@ethlete/core 0.2.0-next.8 → 0.2.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +3 -3
  2. package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -3
  3. package/esm2020/lib/directives/destroy/destroy.directive.mjs +3 -3
  4. package/esm2020/lib/directives/let/let.directive.mjs +3 -3
  5. package/esm2020/lib/directives/observe-content/observe-content.directive.mjs +3 -3
  6. package/esm2020/lib/directives/observe-resize/observe-resize.directive.mjs +3 -3
  7. package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +3 -3
  8. package/esm2020/lib/directives/repeat/repeat.directive.mjs +3 -3
  9. package/esm2020/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +3 -3
  10. package/esm2020/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +3 -3
  11. package/esm2020/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +3 -3
  12. package/esm2020/lib/directives/seo/seo.directive.mjs +8 -4
  13. package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +15 -0
  14. package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.mjs +2 -0
  15. package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.mjs +34 -0
  16. package/esm2020/lib/pipes/normalize-game-result-type/public-api.mjs +4 -0
  17. package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +15 -0
  18. package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.types.mjs +2 -0
  19. package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.util.mjs +47 -0
  20. package/esm2020/lib/pipes/normalize-match-participants/public-api.mjs +4 -0
  21. package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +15 -0
  22. package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.types.mjs +2 -0
  23. package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.util.mjs +126 -0
  24. package/esm2020/lib/pipes/normalize-match-score/public-api.mjs +4 -0
  25. package/esm2020/lib/pipes/normalize-match-state/index.mjs +2 -0
  26. package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.constants.mjs +2 -0
  27. package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +15 -0
  28. package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.util.mjs +19 -0
  29. package/esm2020/lib/pipes/normalize-match-state/public-api.mjs +4 -0
  30. package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +15 -0
  31. package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.util.mjs +38 -0
  32. package/esm2020/lib/pipes/normalize-match-type/public-api.mjs +3 -0
  33. package/esm2020/lib/pipes/public-api.mjs +6 -1
  34. package/esm2020/lib/pipes/to-array/to-array.pipe.mjs +3 -3
  35. package/esm2020/lib/services/click-observer.service.mjs +6 -6
  36. package/esm2020/lib/services/content-observer.service.mjs +6 -6
  37. package/esm2020/lib/services/destroy.service.mjs +3 -3
  38. package/esm2020/lib/services/focus-visible.service.mjs +3 -3
  39. package/esm2020/lib/services/resize-observer.service.mjs +6 -6
  40. package/esm2020/lib/services/viewport.service.mjs +3 -3
  41. package/esm2020/lib/types/i18n.types.mjs +2 -0
  42. package/esm2020/lib/types/public-api.mjs +3 -2
  43. package/fesm2015/ethlete-core.mjs +385 -67
  44. package/fesm2015/ethlete-core.mjs.map +1 -1
  45. package/fesm2020/ethlete-core.mjs +393 -67
  46. package/fesm2020/ethlete-core.mjs.map +1 -1
  47. package/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.d.ts +7 -0
  48. package/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.d.ts +4 -0
  49. package/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.d.ts +2 -0
  50. package/lib/pipes/normalize-game-result-type/public-api.d.ts +3 -0
  51. package/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.d.ts +7 -0
  52. package/lib/pipes/normalize-match-participants/normalize-match-participants.types.d.ts +21 -0
  53. package/lib/pipes/normalize-match-participants/normalize-match-participants.util.d.ts +4 -0
  54. package/lib/pipes/normalize-match-participants/public-api.d.ts +3 -0
  55. package/lib/pipes/normalize-match-score/normalize-match-score.pipe.d.ts +7 -0
  56. package/lib/pipes/normalize-match-score/normalize-match-score.types.d.ts +12 -0
  57. package/lib/pipes/normalize-match-score/normalize-match-score.util.d.ts +27 -0
  58. package/lib/pipes/normalize-match-score/public-api.d.ts +3 -0
  59. package/lib/pipes/normalize-match-state/index.d.ts +1 -0
  60. package/lib/pipes/normalize-match-state/normalize-match-state.constants.d.ts +7 -0
  61. package/lib/pipes/normalize-match-state/normalize-match-state.pipe.d.ts +7 -0
  62. package/lib/pipes/normalize-match-state/normalize-match-state.util.d.ts +3 -0
  63. package/lib/pipes/normalize-match-state/public-api.d.ts +3 -0
  64. package/lib/pipes/normalize-match-type/normalize-match-type.pipe.d.ts +7 -0
  65. package/lib/pipes/normalize-match-type/normalize-match-type.util.d.ts +3 -0
  66. package/lib/pipes/normalize-match-type/public-api.d.ts +2 -0
  67. package/lib/pipes/public-api.d.ts +5 -0
  68. package/lib/types/i18n.types.d.ts +4 -0
  69. package/lib/types/public-api.d.ts +2 -1
  70. package/package.json +4 -3
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NormalizeGameResultTypePipe implements PipeTransform {
4
+ transform: (type: string | null) => import("@ethlete/core").NormalizedGameResultType | null;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<NormalizeGameResultTypePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<NormalizeGameResultTypePipe, "etNormalizeGameResultType", true>;
7
+ }
@@ -0,0 +1,4 @@
1
+ import { Translatable } from '../../types';
2
+ export interface NormalizedGameResultType extends Translatable {
3
+ shortCode: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ import { NormalizedGameResultType } from './normalize-game-result-type.types';
2
+ export declare const normalizeGameResultType: (type: string | null) => NormalizedGameResultType | null;
@@ -0,0 +1,3 @@
1
+ export * from './normalize-game-result-type.pipe';
2
+ export * from './normalize-game-result-type.types';
3
+ export * from './normalize-game-result-type.util';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NormalizeMatchParticipantsPipe implements PipeTransform {
4
+ transform: (match: import("@ethlete/types").MatchListView | null) => import("@ethlete/core").NormalizedMatchParticipants | null;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<NormalizeMatchParticipantsPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<NormalizeMatchParticipantsPipe, "etNormalizeMatchParticipants", true>;
7
+ }
@@ -0,0 +1,21 @@
1
+ import { ParticipantViewUnion } from '@ethlete/types';
2
+ import { Translatable } from '../../types';
3
+ export interface NormalizedMatchParticipants {
4
+ home: NormalizedMatchParticipant | null;
5
+ away: NormalizedMatchParticipant | null;
6
+ }
7
+ declare type NormalizedParticipantType = 'team' | 'player' | 'unknown';
8
+ export declare type NormalizedMatchParticipant = ({
9
+ type: 'tbd';
10
+ participantType: NormalizedParticipantType;
11
+ data: ParticipantViewUnion | null;
12
+ } & Translatable) | {
13
+ type: 'participant';
14
+ participantType: NormalizedParticipantType;
15
+ data: ParticipantViewUnion;
16
+ } | ({
17
+ type: 'none';
18
+ participantType: NormalizedParticipantType;
19
+ data: ParticipantViewUnion | null;
20
+ } & Translatable);
21
+ export {};
@@ -0,0 +1,4 @@
1
+ import { MatchListView } from '@ethlete/types';
2
+ import { NormalizedMatchParticipant, NormalizedMatchParticipants } from './normalize-match-participants.types';
3
+ export declare const normalizeMatchParticipants: (match: MatchListView | null) => NormalizedMatchParticipants | null;
4
+ export declare const normalizeMatchParticipant: (match: MatchListView | null, side: 'home' | 'away') => NormalizedMatchParticipant | null;
@@ -0,0 +1,3 @@
1
+ export * from './normalize-match-participants.pipe';
2
+ export * from './normalize-match-participants.types';
3
+ export * from './normalize-match-participants.util';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NormalizeMatchScorePipe implements PipeTransform {
4
+ transform: (match: import("@ethlete/types").MatchListView | null | undefined) => import("@ethlete/core").NormalizedMatchScore | null;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<NormalizeMatchScorePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<NormalizeMatchScorePipe, "etNormalizeMatchScore", true>;
7
+ }
@@ -0,0 +1,12 @@
1
+ export interface NormalizedMatchScore {
2
+ home: {
3
+ score: string | number | null;
4
+ isWinner: boolean;
5
+ };
6
+ away: {
7
+ score: string | number | null;
8
+ isWinner: boolean;
9
+ };
10
+ subLine: string | null;
11
+ isNumeric: boolean;
12
+ }
@@ -0,0 +1,27 @@
1
+ import { MatchListView, MatchRankingView } from '@ethlete/types';
2
+ import { NormalizedMatchScore } from './normalize-match-score.types';
3
+ export declare const normalizeMatchScore: (match: MatchListView | null | undefined) => NormalizedMatchScore | null;
4
+ export declare const isKnockoutMatch: (match: MatchListView | null | undefined) => boolean;
5
+ export declare const isGroupMatch: (match: MatchListView | null | undefined) => boolean;
6
+ export declare const getKnockoutMatchScore: (score: MatchRankingView | null | undefined) => "match-score.knockout.won" | "match-score.knockout.lost" | "match-score.knockout.tie" | null;
7
+ export declare const getMatchScoreSubLine: (match: MatchListView | null | undefined) => "match-score.groups.sub-line" | null;
8
+ export declare const getGroupMatchScore: (match: MatchListView | null | undefined) => {
9
+ home: {
10
+ score: number;
11
+ isWinner: boolean;
12
+ };
13
+ away: {
14
+ score: number;
15
+ isWinner: boolean;
16
+ };
17
+ } | null;
18
+ export declare const getGroupMatchPoints: (match: MatchListView | null | undefined) => {
19
+ home: {
20
+ score: number;
21
+ isWinner: boolean;
22
+ };
23
+ away: {
24
+ score: number;
25
+ isWinner: boolean;
26
+ };
27
+ } | null;
@@ -0,0 +1,3 @@
1
+ export * from './normalize-match-score.pipe';
2
+ export * from './normalize-match-score.types';
3
+ export * from './normalize-match-score.util';
@@ -0,0 +1 @@
1
+ export * from './public-api';
@@ -0,0 +1,7 @@
1
+ export declare const enum MatchStateType {
2
+ PREPARING_ROUND = "preparingRound",
3
+ PRE_MATCH = "preMatch",
4
+ LIVE = "live",
5
+ POST_MATCH = "postMatch",
6
+ AUTO_WIN = "autoWin"
7
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NormalizeMatchStatePipe implements PipeTransform {
4
+ transform: (match: import("@ethlete/types").MatchListView | null | undefined) => import("@ethlete/core").MatchStateType | null;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<NormalizeMatchStatePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<NormalizeMatchStatePipe, "etNormalizeMatchState", true>;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { MatchListView } from '@ethlete/types';
2
+ import { MatchStateType } from './normalize-match-state.constants';
3
+ export declare const normalizeMatchState: (match: MatchListView | null | undefined) => MatchStateType | null;
@@ -0,0 +1,3 @@
1
+ export * from './normalize-match-state.constants';
2
+ export * from './normalize-match-state.pipe';
3
+ export * from './normalize-match-state.util';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NormalizeMatchTypePipe implements PipeTransform {
4
+ transform: (matchType: import("@ethlete/types").StageType | null | undefined) => import("@ethlete/core").Translatable | null;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<NormalizeMatchTypePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<NormalizeMatchTypePipe, "etNormalizeMatchType", true>;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { StageType } from '@ethlete/types';
2
+ import { Translatable } from '../../types';
3
+ export declare const normalizeMatchType: (matchType: StageType | null | undefined) => Translatable | null;
@@ -0,0 +1,2 @@
1
+ export * from './normalize-match-type.pipe';
2
+ export * from './normalize-match-type.util';
@@ -1 +1,6 @@
1
+ export * from './normalize-game-result-type/public-api';
2
+ export * from './normalize-match-participants/public-api';
3
+ export * from './normalize-match-score/public-api';
4
+ export * from './normalize-match-state/public-api';
5
+ export * from './normalize-match-type/public-api';
1
6
  export * from './to-array/public-api';
@@ -0,0 +1,4 @@
1
+ export interface Translatable {
2
+ i18n: string;
3
+ text: string;
4
+ }
@@ -1,2 +1,3 @@
1
- export * from './viewport.types';
2
1
  export * from './angular.types';
2
+ export * from './i18n.types';
3
+ export * from './viewport.types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethlete/core",
3
- "version": "0.2.0-next.8",
3
+ "version": "0.2.0-next.9",
4
4
  "dependencies": {
5
5
  "tslib": "2.4.1"
6
6
  },
@@ -8,8 +8,9 @@
8
8
  "@angular/common": "^14.0.0 || ^15.0.0",
9
9
  "@angular/core": "^14.0.0 || ^15.0.0",
10
10
  "rxjs": "7.5.7",
11
- "@angular/cdk": "15.0.0",
12
- "@angular/platform-browser": "15.0.0"
11
+ "@angular/cdk": "15.0.2",
12
+ "@angular/platform-browser": "15.0.2",
13
+ "@ethlete/types": "0.2.0-next.1"
13
14
  },
14
15
  "module": "fesm2015/ethlete-core.mjs",
15
16
  "es2020": "fesm2020/ethlete-core.mjs",