@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.
- package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +3 -3
- package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -3
- package/esm2020/lib/directives/destroy/destroy.directive.mjs +3 -3
- package/esm2020/lib/directives/let/let.directive.mjs +3 -3
- package/esm2020/lib/directives/observe-content/observe-content.directive.mjs +3 -3
- package/esm2020/lib/directives/observe-resize/observe-resize.directive.mjs +3 -3
- package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +3 -3
- package/esm2020/lib/directives/repeat/repeat.directive.mjs +3 -3
- package/esm2020/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +3 -3
- package/esm2020/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +3 -3
- package/esm2020/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +3 -3
- package/esm2020/lib/directives/seo/seo.directive.mjs +8 -4
- package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.mjs +2 -0
- package/esm2020/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.mjs +34 -0
- package/esm2020/lib/pipes/normalize-game-result-type/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.types.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-participants/normalize-match-participants.util.mjs +47 -0
- package/esm2020/lib/pipes/normalize-match-participants/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.types.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-score/normalize-match-score.util.mjs +126 -0
- package/esm2020/lib/pipes/normalize-match-score/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-state/index.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.constants.mjs +2 -0
- package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-state/normalize-match-state.util.mjs +19 -0
- package/esm2020/lib/pipes/normalize-match-state/public-api.mjs +4 -0
- package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +15 -0
- package/esm2020/lib/pipes/normalize-match-type/normalize-match-type.util.mjs +38 -0
- package/esm2020/lib/pipes/normalize-match-type/public-api.mjs +3 -0
- package/esm2020/lib/pipes/public-api.mjs +6 -1
- package/esm2020/lib/pipes/to-array/to-array.pipe.mjs +3 -3
- package/esm2020/lib/services/click-observer.service.mjs +6 -6
- package/esm2020/lib/services/content-observer.service.mjs +6 -6
- package/esm2020/lib/services/destroy.service.mjs +3 -3
- package/esm2020/lib/services/focus-visible.service.mjs +3 -3
- package/esm2020/lib/services/resize-observer.service.mjs +6 -6
- package/esm2020/lib/services/viewport.service.mjs +3 -3
- package/esm2020/lib/types/i18n.types.mjs +2 -0
- package/esm2020/lib/types/public-api.mjs +3 -2
- package/fesm2015/ethlete-core.mjs +385 -67
- package/fesm2015/ethlete-core.mjs.map +1 -1
- package/fesm2020/ethlete-core.mjs +393 -67
- package/fesm2020/ethlete-core.mjs.map +1 -1
- package/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.d.ts +7 -0
- package/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.d.ts +4 -0
- package/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.d.ts +2 -0
- package/lib/pipes/normalize-game-result-type/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-participants/normalize-match-participants.types.d.ts +21 -0
- package/lib/pipes/normalize-match-participants/normalize-match-participants.util.d.ts +4 -0
- package/lib/pipes/normalize-match-participants/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-score/normalize-match-score.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-score/normalize-match-score.types.d.ts +12 -0
- package/lib/pipes/normalize-match-score/normalize-match-score.util.d.ts +27 -0
- package/lib/pipes/normalize-match-score/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-state/index.d.ts +1 -0
- package/lib/pipes/normalize-match-state/normalize-match-state.constants.d.ts +7 -0
- package/lib/pipes/normalize-match-state/normalize-match-state.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-state/normalize-match-state.util.d.ts +3 -0
- package/lib/pipes/normalize-match-state/public-api.d.ts +3 -0
- package/lib/pipes/normalize-match-type/normalize-match-type.pipe.d.ts +7 -0
- package/lib/pipes/normalize-match-type/normalize-match-type.util.d.ts +3 -0
- package/lib/pipes/normalize-match-type/public-api.d.ts +2 -0
- package/lib/pipes/public-api.d.ts +5 -0
- package/lib/types/i18n.types.d.ts +4 -0
- package/lib/types/public-api.d.ts +2 -1
- 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,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,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,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 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -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,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
|
+
}
|
|
@@ -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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/core",
|
|
3
|
-
"version": "0.2.0-next.
|
|
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.
|
|
12
|
-
"@angular/platform-browser": "15.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",
|