@ethlete/core 0.2.0-next.8 → 1.0.0
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/components/public-api.mjs +2 -0
- package/esm2020/lib/components/structured-data/public-api.mjs +2 -0
- package/esm2020/lib/components/structured-data/structured-data.component.mjs +37 -0
- package/esm2020/lib/directives/animatable/animatable.directive.mjs +79 -0
- package/esm2020/lib/directives/animatable/public-api.mjs +2 -0
- package/esm2020/lib/directives/animated-lifecycle/animated-lifecycle.directive.mjs +115 -0
- package/esm2020/lib/directives/animated-lifecycle/public-api.mjs +2 -0
- package/esm2020/lib/directives/click-outside/click-outside.directive.mjs +3 -3
- package/esm2020/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +5 -5
- package/esm2020/lib/directives/let/let.directive.mjs +8 -8
- package/esm2020/lib/directives/observe-content/observe-content.directive.mjs +7 -7
- package/esm2020/lib/directives/observe-resize/observe-resize.directive.mjs +7 -7
- package/esm2020/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +11 -10
- package/esm2020/lib/directives/public-api.mjs +3 -2
- package/esm2020/lib/directives/repeat/repeat.directive.mjs +10 -11
- 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/public-api.mjs +3 -1
- 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 +7 -7
- package/esm2020/lib/services/public-api.mjs +2 -1
- package/esm2020/lib/services/resize-observer.service.mjs +6 -6
- package/esm2020/lib/services/router-state.service.mjs +115 -0
- package/esm2020/lib/services/viewport.service.mjs +16 -16
- package/esm2020/lib/types/angular.types.mjs +36 -2
- package/esm2020/lib/types/i18n.types.mjs +2 -0
- package/esm2020/lib/types/public-api.mjs +3 -2
- package/esm2020/lib/utils/animation.utils.mjs +18 -0
- package/esm2020/lib/utils/clone.util.mjs +78 -0
- package/esm2020/lib/utils/cookie.util.mjs +48 -0
- package/esm2020/lib/utils/equal.util.mjs +118 -0
- package/esm2020/lib/utils/media-query-observable.util.mjs +18 -0
- package/esm2020/lib/utils/public-api.mjs +8 -2
- package/esm2020/lib/utils/reactive-binding.util.mjs +111 -0
- package/esm2020/lib/validators/is-array-not-empty.validator.mjs +9 -0
- package/esm2020/lib/validators/is-email.validator.mjs +10 -0
- package/esm2020/lib/validators/must-match.validator.mjs +19 -0
- package/esm2020/lib/validators/public-api.mjs +12 -0
- package/fesm2015/ethlete-core.mjs +1232 -138
- package/fesm2015/ethlete-core.mjs.map +1 -1
- package/fesm2020/ethlete-core.mjs +1238 -138
- package/fesm2020/ethlete-core.mjs.map +1 -1
- package/lib/components/public-api.d.ts +1 -0
- package/lib/components/structured-data/public-api.d.ts +1 -0
- package/lib/components/structured-data/structured-data.component.d.ts +11 -0
- package/lib/directives/animatable/animatable.directive.d.ts +20 -0
- package/lib/directives/animatable/public-api.d.ts +1 -0
- package/lib/directives/animated-lifecycle/animated-lifecycle.directive.d.ts +22 -0
- package/lib/directives/animated-lifecycle/public-api.d.ts +1 -0
- package/lib/directives/observe-content/observe-content.directive.d.ts +2 -2
- package/lib/directives/observe-resize/observe-resize.directive.d.ts +2 -2
- package/lib/directives/observe-scroll-state/observe-scroll-state.directive.d.ts +2 -2
- package/lib/directives/observe-scroll-state/observe-scroll-state.types.d.ts +1 -1
- package/lib/directives/public-api.d.ts +2 -1
- package/lib/directives/repeat/repeat.directive.d.ts +2 -3
- package/lib/directives/seo/seo.directive.types.d.ts +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/public-api.d.ts +2 -0
- package/lib/services/public-api.d.ts +1 -0
- package/lib/services/router-state.service.d.ts +40 -0
- package/lib/services/viewport.types.d.ts +1 -1
- package/lib/types/angular.types.d.ts +14 -1
- package/lib/types/i18n.types.d.ts +4 -0
- package/lib/types/public-api.d.ts +2 -1
- package/lib/types/viewport.types.d.ts +2 -2
- package/lib/utils/animation.utils.d.ts +4 -0
- package/lib/utils/clone.util.d.ts +15 -0
- package/lib/utils/cookie.util.d.ts +5 -0
- package/lib/utils/equal.util.d.ts +27 -0
- package/lib/utils/media-query-observable.util.d.ts +5 -0
- package/lib/utils/public-api.d.ts +7 -1
- package/lib/utils/reactive-binding.util.d.ts +19 -0
- package/lib/validators/is-array-not-empty.validator.d.ts +3 -0
- package/lib/validators/is-email.validator.d.ts +3 -0
- package/lib/validators/must-match.validator.d.ts +3 -0
- package/lib/validators/public-api.d.ts +8 -0
- package/package.json +8 -5
- package/esm2020/lib/directives/destroy/destroy.directive.mjs +0 -22
- package/esm2020/lib/directives/destroy/public-api.mjs +0 -2
- package/lib/directives/destroy/destroy.directive.d.ts +0 -9
- package/lib/directives/destroy/public-api.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './structured-data/public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './structured-data.component';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import { JsonLD } from '@ethlete/types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class StructuredDataComponent {
|
|
5
|
+
private readonly _sanitizer;
|
|
6
|
+
set data(currentValue: JsonLD.WithContext<JsonLD.Thing> | JsonLD.Graph | null | undefined);
|
|
7
|
+
jsonLD?: SafeHtml;
|
|
8
|
+
getSafeHTML(value: JsonLD.WithContext<JsonLD.Thing> | JsonLD.Graph | null | undefined): SafeHtml;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StructuredDataComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StructuredDataComponent, "et-structured-data", never, { "data": "data"; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InjectionToken, OnInit } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare const ANIMATABLE_TOKEN: InjectionToken<AnimatableDirective>;
|
|
5
|
+
export declare class AnimatableDirective implements OnInit {
|
|
6
|
+
private _didEmitStart;
|
|
7
|
+
private readonly _parent;
|
|
8
|
+
private readonly _destroy$;
|
|
9
|
+
private readonly _elementRef;
|
|
10
|
+
private readonly _animationStart$;
|
|
11
|
+
private readonly _animationEnd$;
|
|
12
|
+
readonly animationStart$: Observable<void>;
|
|
13
|
+
readonly animationEnd$: Observable<void>;
|
|
14
|
+
private readonly _hostActiveAnimationCount$;
|
|
15
|
+
private readonly _totalActiveAnimationCount$;
|
|
16
|
+
readonly isAnimating$: Observable<boolean>;
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnimatableDirective, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AnimatableDirective, "[etAnimatable]", ["etAnimatable"], {}, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './animatable.directive';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "../animatable/animatable.directive";
|
|
4
|
+
export declare const ANIMATED_LIFECYCLE_TOKEN: InjectionToken<AnimatedLifecycleDirective>;
|
|
5
|
+
export declare class AnimatedLifecycleDirective {
|
|
6
|
+
private readonly _destroy$;
|
|
7
|
+
private readonly _elementRef;
|
|
8
|
+
private readonly _animatable;
|
|
9
|
+
private readonly _classList;
|
|
10
|
+
private _state$;
|
|
11
|
+
readonly state$: import("rxjs").Observable<"entering" | "entered" | "leaving" | "left" | "init">;
|
|
12
|
+
get state(): "entering" | "entered" | "leaving" | "left" | "init";
|
|
13
|
+
private readonly _bindings;
|
|
14
|
+
enter(config?: {
|
|
15
|
+
onlyTransition?: boolean;
|
|
16
|
+
}): void;
|
|
17
|
+
leave(config?: {
|
|
18
|
+
onlyTransition?: boolean;
|
|
19
|
+
}): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnimatedLifecycleDirective, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AnimatedLifecycleDirective, "[etAnimatedLifecycle]", ["etAnimatedLifecycle"], {}, {}, never, never, true, [{ directive: typeof i1.AnimatableDirective; inputs: {}; outputs: {}; }]>;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './animated-lifecycle.directive';
|
|
@@ -5,7 +5,7 @@ export declare class ObserveContentDirective implements AfterContentInit, OnDest
|
|
|
5
5
|
private _contentObserver;
|
|
6
6
|
private _elementRef;
|
|
7
7
|
private _ngZone;
|
|
8
|
-
readonly
|
|
8
|
+
readonly valueChange: EventEmitter<MutationRecord[]>;
|
|
9
9
|
get disabled(): boolean;
|
|
10
10
|
set disabled(value: BooleanInput);
|
|
11
11
|
private _disabled;
|
|
@@ -18,5 +18,5 @@ export declare class ObserveContentDirective implements AfterContentInit, OnDest
|
|
|
18
18
|
private _subscribe;
|
|
19
19
|
private _unsubscribe;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<ObserveContentDirective, never>;
|
|
21
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ObserveContentDirective, "[etObserveContent]", ["etObserveContent"], { "disabled": "etObserveContentDisabled"; "debounce": "etObserveContentDebounce"; }, { "
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ObserveContentDirective, "[etObserveContent]", ["etObserveContent"], { "disabled": "etObserveContentDisabled"; "debounce": "etObserveContentDebounce"; }, { "valueChange": "etObserveContent"; }, never, never, true, never>;
|
|
22
22
|
}
|
|
@@ -5,7 +5,7 @@ export declare class ObserveResizeDirective implements AfterContentInit, OnDestr
|
|
|
5
5
|
private _resizeObserver;
|
|
6
6
|
private _elementRef;
|
|
7
7
|
private _ngZone;
|
|
8
|
-
readonly
|
|
8
|
+
readonly valueChange: EventEmitter<ResizeObserverEntry[]>;
|
|
9
9
|
get disabled(): boolean;
|
|
10
10
|
set disabled(value: BooleanInput);
|
|
11
11
|
private _disabled;
|
|
@@ -18,5 +18,5 @@ export declare class ObserveResizeDirective implements AfterContentInit, OnDestr
|
|
|
18
18
|
private _subscribe;
|
|
19
19
|
private _unsubscribe;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<ObserveResizeDirective, never>;
|
|
21
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ObserveResizeDirective, "[etObserveResize]", ["etObserveResize"], { "disabled": "etObserveResizeDisabled"; "debounce": "etObserveResizeDebounce"; }, { "
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ObserveResizeDirective, "[etObserveResize]", ["etObserveResize"], { "disabled": "etObserveResizeDisabled"; "debounce": "etObserveResizeDebounce"; }, { "valueChange": "etObserveResize"; }, never, never, true, never>;
|
|
22
22
|
}
|
|
@@ -17,7 +17,7 @@ export declare class ObserveScrollStateDirective implements OnInit, OnDestroy {
|
|
|
17
17
|
set observerThreshold(value: NumberInput);
|
|
18
18
|
private _threshold;
|
|
19
19
|
private _intersectionObserver;
|
|
20
|
-
|
|
20
|
+
valueChange: EventEmitter<ScrollObserverScrollState>;
|
|
21
21
|
ngOnInit(): void;
|
|
22
22
|
ngOnDestroy(): void;
|
|
23
23
|
private _checkChildren;
|
|
@@ -27,5 +27,5 @@ export declare class ObserveScrollStateDirective implements OnInit, OnDestroy {
|
|
|
27
27
|
private _clearIntersectionObserver;
|
|
28
28
|
private _getNonIgnoredChild;
|
|
29
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<ObserveScrollStateDirective, never>;
|
|
30
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ObserveScrollStateDirective, "[etObserveScrollState]", ["etObserveScrollState"], { "observerRootMargin": "observerRootMargin"; "observerThreshold": "observerThreshold"; }, { "
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ObserveScrollStateDirective, "[etObserveScrollState]", ["etObserveScrollState"], { "observerRootMargin": "observerRootMargin"; "observerThreshold": "observerThreshold"; }, { "valueChange": "etObserveScrollState"; }, never, never, true, never>;
|
|
31
31
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export * from './animatable/public-api';
|
|
2
|
+
export * from './animated-lifecycle/public-api';
|
|
1
3
|
export * from './click-outside/public-api';
|
|
2
4
|
export * from './cursor-drag-scroll/public-api';
|
|
3
|
-
export * from './destroy/public-api';
|
|
4
5
|
export * from './let/public-api';
|
|
5
6
|
export * from './observe-content/public-api';
|
|
6
7
|
export * from './observe-resize/public-api';
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { NumberInput } from '@angular/cdk/coercion';
|
|
2
|
-
import {
|
|
2
|
+
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class RepeatDirective
|
|
4
|
+
export declare class RepeatDirective {
|
|
5
5
|
private _mainTemplateRef;
|
|
6
6
|
private _viewContainerRef;
|
|
7
7
|
get repeatCount(): number;
|
|
8
8
|
set repeatCount(value: NumberInput);
|
|
9
9
|
private _repeatCount;
|
|
10
10
|
constructor(_mainTemplateRef: TemplateRef<unknown>, _viewContainerRef: ViewContainerRef);
|
|
11
|
-
ngOnInit(): void;
|
|
12
11
|
private _render;
|
|
13
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<RepeatDirective, never>;
|
|
14
13
|
static ɵdir: i0.ɵɵDirectiveDeclaration<RepeatDirective, "[etRepeat]", never, { "repeatCount": "etRepeat"; }, {}, never, never, true, never>;
|
|
@@ -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
|
+
type NormalizedParticipantType = 'team' | 'player' | 'unknown';
|
|
8
|
+
export 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/lib/public-api.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './components/public-api';
|
|
1
2
|
export * from './constants/public-api';
|
|
2
3
|
export * from './decorators/public-api';
|
|
3
4
|
export * from './directives/public-api';
|
|
@@ -5,3 +6,4 @@ export * from './pipes/public-api';
|
|
|
5
6
|
export * from './services/public-api';
|
|
6
7
|
export * from './types/public-api';
|
|
7
8
|
export * from './utils/public-api';
|
|
9
|
+
export * from './validators/public-api';
|
|
@@ -3,5 +3,6 @@ export * from './content-observer.service';
|
|
|
3
3
|
export * from './destroy.service';
|
|
4
4
|
export * from './focus-visible.service';
|
|
5
5
|
export * from './resize-observer.service';
|
|
6
|
+
export * from './router-state.service';
|
|
6
7
|
export * from './viewport.service';
|
|
7
8
|
export * from './viewport.types';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Data, Params } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare const routerDisableScrollTop: (config?: {
|
|
5
|
+
asReturnRoute?: boolean;
|
|
6
|
+
}) => {
|
|
7
|
+
disableScrollTop: boolean;
|
|
8
|
+
disableScrollTopAsReturnRoute?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
disableScrollTopAsReturnRoute: boolean;
|
|
11
|
+
disableScrollTop?: undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare class RouterStateService {
|
|
14
|
+
private _isScrollTopOnNavigationEnabled;
|
|
15
|
+
private readonly _router;
|
|
16
|
+
private readonly _route$;
|
|
17
|
+
private readonly _state$;
|
|
18
|
+
get route$(): Observable<string>;
|
|
19
|
+
get state$(): Observable<{
|
|
20
|
+
data: Data;
|
|
21
|
+
pathParams: Params;
|
|
22
|
+
queryParams: Params;
|
|
23
|
+
title: string | null;
|
|
24
|
+
fragment: string | null;
|
|
25
|
+
}>;
|
|
26
|
+
constructor();
|
|
27
|
+
enableScrollEnhancements(config?: {
|
|
28
|
+
scrollElement?: HTMLElement;
|
|
29
|
+
queryParamTriggerList?: string[];
|
|
30
|
+
fragment?: {
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
smooth?: boolean;
|
|
33
|
+
};
|
|
34
|
+
}): void;
|
|
35
|
+
selectQueryParam<T = string | undefined>(key: string): Observable<T>;
|
|
36
|
+
selectPathParam<T = string | undefined>(key: string): Observable<T>;
|
|
37
|
+
selectData<T = unknown>(key: string): Observable<T>;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouterStateService, never>;
|
|
39
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RouterStateService>;
|
|
40
|
+
}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { QueryList } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export type NgClassType = string | string[] | Set<string> | {
|
|
2
4
|
[klass: string]: any;
|
|
3
5
|
} | null | undefined;
|
|
6
|
+
export declare class TypedQueryList<T> extends QueryList<T | undefined> {
|
|
7
|
+
[Symbol.iterator]: () => Iterator<T>;
|
|
8
|
+
get changes(): Observable<TypedQueryList<T>>;
|
|
9
|
+
toArray(): T[];
|
|
10
|
+
forEach(fn: (item: T, index: number, array: T[]) => void): void;
|
|
11
|
+
filter(fn: (item: T, index: number, array: T[]) => boolean): T[];
|
|
12
|
+
map<U>(fn: (item: T, index: number, array: T[]) => U): U[];
|
|
13
|
+
reduce<U>(fn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
|
|
14
|
+
some(fn: (value: T, index: number, array: T[]) => boolean): boolean;
|
|
15
|
+
find(fn: (value: T, index: number, array: T[]) => boolean): T | undefined;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Vec2 = [number, number];
|
|
2
2
|
export interface ViewportConfig {
|
|
3
3
|
breakpoints: {
|
|
4
4
|
xs: Vec2;
|
|
@@ -9,4 +9,4 @@ export interface ViewportConfig {
|
|
|
9
9
|
'2xl': Vec2;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type Breakpoint = keyof ViewportConfig['breakpoints'];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stolen from klona to avoid adding a dependency
|
|
3
|
+
* https://github.com/lukeed/klona
|
|
4
|
+
*
|
|
5
|
+
* MIT License
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
8
|
+
*
|
|
9
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
10
|
+
*
|
|
11
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
14
|
+
*/
|
|
15
|
+
export declare const clone: <T>(original: T) => T;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const hasCookie: (name: string) => boolean;
|
|
2
|
+
export declare const getCookie: (name: string) => string | null | undefined;
|
|
3
|
+
export declare const setCookie: (name: string, data: string, expiresInDays?: number, domain?: string | null) => void;
|
|
4
|
+
export declare const deleteCookie: (name: string, path: string, domain?: string | null) => void;
|
|
5
|
+
export declare const getDomain: () => string | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stolen from dequal to avoid adding a dependency
|
|
3
|
+
* https://github.com/lukeed/dequal
|
|
4
|
+
*
|
|
5
|
+
* The MIT License (MIT)
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
8
|
+
*
|
|
9
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
* in the Software without restriction, including without limitation the rights
|
|
12
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
* furnished to do so, subject to the following conditions:
|
|
15
|
+
*
|
|
16
|
+
* The above copyright notice and this permission notice shall be included in
|
|
17
|
+
* all copies or substantial portions of the Software.
|
|
18
|
+
*
|
|
19
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
+
* THE SOFTWARE.
|
|
26
|
+
*/
|
|
27
|
+
export declare const equal: (foo: any, bar: any) => boolean;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './animation.utils';
|
|
2
2
|
export * from './clamp.util';
|
|
3
|
+
export * from './clone.util';
|
|
4
|
+
export * from './cookie.util';
|
|
5
|
+
export * from './equal.util';
|
|
6
|
+
export * from './media-query-observable.util';
|
|
7
|
+
export * from './reactive-binding.util';
|
|
3
8
|
export * from './scrollable.utils';
|
|
9
|
+
export * from './viewport.util';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
type AttributeValueBinding = {
|
|
4
|
+
render: boolean;
|
|
5
|
+
value: boolean | string | number;
|
|
6
|
+
};
|
|
7
|
+
type AttributeRenderBinding = boolean;
|
|
8
|
+
export type ReactiveAttributes = {
|
|
9
|
+
attribute: string | string[];
|
|
10
|
+
observable: Observable<AttributeValueBinding | AttributeRenderBinding>;
|
|
11
|
+
elementRef?: ElementRef<HTMLElement>;
|
|
12
|
+
};
|
|
13
|
+
export interface ReactiveBindingResult {
|
|
14
|
+
reset: () => void;
|
|
15
|
+
remove: (...attributes: string[]) => void;
|
|
16
|
+
push: (value: ReactiveAttributes) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const createReactiveBindings: (...values: ReactiveAttributes[]) => ReactiveBindingResult;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './is-array-not-empty.validator';
|
|
2
|
+
export * from './is-email.validator';
|
|
3
|
+
export * from './must-match.validator';
|
|
4
|
+
export declare const Validators: {
|
|
5
|
+
readonly MustMatch: (controlName: string, matchingControlName: string) => (formGroup: import("@angular/forms").FormGroup<any>) => void;
|
|
6
|
+
readonly IsEmail: (control: import("@angular/forms").AbstractControl<any, any>) => import("@angular/forms").ValidationErrors | null;
|
|
7
|
+
readonly IsArrayNotEmpty: (control: import("@angular/forms").AbstractControl<any, any>) => import("@angular/forms").ValidationErrors | null;
|
|
8
|
+
};
|
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"tslib": "2.
|
|
5
|
+
"tslib": "2.5.0"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
8
|
"@angular/common": "^14.0.0 || ^15.0.0",
|
|
9
9
|
"@angular/core": "^14.0.0 || ^15.0.0",
|
|
10
|
-
"
|
|
11
|
-
"@
|
|
12
|
-
"
|
|
10
|
+
"@angular/platform-browser": "15.1.4",
|
|
11
|
+
"@ethlete/types": "1.0.0",
|
|
12
|
+
"rxjs": "7.8.0",
|
|
13
|
+
"@angular/cdk": "15.1.4",
|
|
14
|
+
"@angular/router": "15.1.4",
|
|
15
|
+
"@angular/forms": "15.1.4"
|
|
13
16
|
},
|
|
14
17
|
"module": "fesm2015/ethlete-core.mjs",
|
|
15
18
|
"es2020": "fesm2020/ethlete-core.mjs",
|