@ethlete/core 2.8.1 → 3.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/esm2022/lib/components/structured-data/structured-data.component.mjs +3 -3
- package/esm2022/lib/directives/animatable/animatable.directive.mjs +3 -3
- package/esm2022/lib/directives/animated-lifecycle/animated-lifecycle.directive.mjs +3 -3
- package/esm2022/lib/directives/animated-overlay/animated-overlay.directive.mjs +83 -56
- package/esm2022/lib/directives/click-outside/click-outside.directive.mjs +3 -3
- package/esm2022/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -3
- package/esm2022/lib/directives/delayable/delayable.directive.mjs +3 -3
- package/esm2022/lib/directives/is-active-element/is-active-element.directive.mjs +3 -3
- package/esm2022/lib/directives/is-element/is-element.directive.mjs +3 -3
- package/esm2022/lib/directives/let/let.directive.mjs +3 -3
- package/esm2022/lib/directives/observe-content/observe-content.directive.mjs +3 -3
- package/esm2022/lib/directives/observe-resize/observe-resize.directive.mjs +3 -3
- package/esm2022/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +3 -3
- package/esm2022/lib/directives/repeat/repeat.directive.mjs +3 -3
- package/esm2022/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +3 -3
- package/esm2022/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +3 -3
- package/esm2022/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +3 -3
- package/esm2022/lib/directives/seo/seo.directive.mjs +3 -3
- package/esm2022/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +3 -3
- package/esm2022/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +3 -3
- package/esm2022/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +3 -3
- package/esm2022/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +3 -3
- package/esm2022/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +3 -3
- package/esm2022/lib/pipes/to-array/to-array.pipe.mjs +3 -3
- package/esm2022/lib/services/click-observer.service.mjs +6 -6
- package/esm2022/lib/services/content-observer.service.mjs +6 -6
- package/esm2022/lib/services/focus-visible.service.mjs +3 -3
- package/esm2022/lib/services/resize-observer.service.mjs +6 -6
- package/esm2022/lib/services/router-state.service.mjs +3 -3
- package/esm2022/lib/services/viewport.service.mjs +3 -3
- package/esm2022/lib/utils/public-api.mjs +1 -2
- package/fesm2022/ethlete-core.mjs +179 -178
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/lib/directives/animated-overlay/animated-overlay.directive.d.ts +29 -16
- package/lib/utils/public-api.d.ts +0 -1
- package/package.json +7 -7
- package/esm2022/lib/utils/rxjs.utils.mjs +0 -27
- package/lib/utils/rxjs.utils.d.ts +0 -9
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
2
2
|
import { ComponentPortal, ComponentType } from '@angular/cdk/portal';
|
|
3
|
-
import { ComponentRef, StaticProvider } from '@angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import { Options as ArrowOptions } from '@popperjs/core/lib/modifiers/arrow';
|
|
6
|
-
import { Options as OffsetOptions } from '@popperjs/core/lib/modifiers/offset';
|
|
3
|
+
import { ComponentRef, ElementRef, StaticProvider } from '@angular/core';
|
|
4
|
+
import { OffsetOptions, Padding, Placement } from '@floating-ui/dom';
|
|
7
5
|
import { Subject } from 'rxjs';
|
|
8
6
|
import { AnimatedLifecycleDirective } from '../animated-lifecycle';
|
|
9
7
|
import * as i0 from "@angular/core";
|
|
10
8
|
import * as i1 from "../observe-resize/observe-resize.directive";
|
|
11
9
|
export interface AnimatedOverlayComponentBase {
|
|
10
|
+
_elementRef?: ElementRef<HTMLElement>;
|
|
12
11
|
_animatedLifecycle?: AnimatedLifecycleDirective;
|
|
13
12
|
_markForCheck?: () => void;
|
|
14
13
|
}
|
|
@@ -23,7 +22,7 @@ export declare class AnimatedOverlayDirective<T extends AnimatedOverlayComponent
|
|
|
23
22
|
private _portal;
|
|
24
23
|
private _overlayRef;
|
|
25
24
|
private _componentRef;
|
|
26
|
-
private
|
|
25
|
+
private _floatingElCleanupFn;
|
|
27
26
|
private _beforeOpened;
|
|
28
27
|
private _afterOpened;
|
|
29
28
|
private _beforeClosed;
|
|
@@ -33,25 +32,41 @@ export declare class AnimatedOverlayDirective<T extends AnimatedOverlayComponent
|
|
|
33
32
|
private readonly _isUnmounting$;
|
|
34
33
|
/**
|
|
35
34
|
* The placement of the animated overlay.
|
|
36
|
-
* @default
|
|
35
|
+
* @default undefined
|
|
37
36
|
*/
|
|
38
|
-
placement
|
|
37
|
+
placement?: Placement;
|
|
39
38
|
/**
|
|
40
39
|
* The allowed auto placements of the animated overlay.
|
|
41
|
-
* @see https://
|
|
40
|
+
* @see https://floating-ui.com/docs/flip#fallbackplacements
|
|
42
41
|
*/
|
|
43
|
-
|
|
42
|
+
fallbackPlacements?: Placement[];
|
|
44
43
|
/**
|
|
45
44
|
* The offset of the animated overlay.
|
|
46
|
-
* @see https://
|
|
45
|
+
* @see https://floating-ui.com/docs/offset
|
|
47
46
|
*/
|
|
48
|
-
offset: OffsetOptions
|
|
47
|
+
offset: OffsetOptions | null;
|
|
49
48
|
/**
|
|
50
49
|
* The arrow padding.
|
|
51
|
-
* @see https://
|
|
50
|
+
* @see https://floating-ui.com/docs/arrow#padding
|
|
52
51
|
* @default 4
|
|
53
52
|
*/
|
|
54
|
-
arrowPadding:
|
|
53
|
+
arrowPadding: Padding | null;
|
|
54
|
+
/**
|
|
55
|
+
* The viewport padding.
|
|
56
|
+
* @default 8
|
|
57
|
+
*/
|
|
58
|
+
viewportPadding: Padding | null;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the animated overlay should auto resize to fit the available space.
|
|
61
|
+
* Useful for things like selects where the list of options might be longer than the available space.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
autoResize: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the animated overlay should auto hide when the reference element is hidden.
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
autoHide: boolean;
|
|
55
70
|
get isMounted(): boolean;
|
|
56
71
|
get isMounted$(): import("rxjs").Observable<boolean>;
|
|
57
72
|
get isMounting(): boolean;
|
|
@@ -60,7 +75,6 @@ export declare class AnimatedOverlayDirective<T extends AnimatedOverlayComponent
|
|
|
60
75
|
get portal(): ComponentPortal<T> | null;
|
|
61
76
|
get overlayRef(): OverlayRef | null;
|
|
62
77
|
get componentRef(): ComponentRef<T> | null;
|
|
63
|
-
get popper(): PopperInstance | null;
|
|
64
78
|
mount(config: {
|
|
65
79
|
component: ComponentType<T>;
|
|
66
80
|
providers?: StaticProvider[];
|
|
@@ -73,7 +87,6 @@ export declare class AnimatedOverlayDirective<T extends AnimatedOverlayComponent
|
|
|
73
87
|
beforeClosed(): Subject<void>;
|
|
74
88
|
afterClosed(): Subject<void>;
|
|
75
89
|
_destroy(): void;
|
|
76
|
-
_reposition(): void;
|
|
77
90
|
static ɵfac: i0.ɵɵFactoryDeclaration<AnimatedOverlayDirective<any>, never>;
|
|
78
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AnimatedOverlayDirective<any>, never, never, { "placement": { "alias": "placement"; "required": false; }; "
|
|
91
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AnimatedOverlayDirective<any>, never, never, { "placement": { "alias": "placement"; "required": false; }; "fallbackPlacements": { "alias": "fallbackPlacements"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "arrowPadding": { "alias": "arrowPadding"; "required": false; }; "viewportPadding": { "alias": "viewportPadding"; "required": false; }; "autoResize": { "alias": "autoResize"; "required": false; }; "autoHide": { "alias": "autoHide"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.ObserveResizeDirective; inputs: {}; outputs: {}; }]>;
|
|
79
92
|
}
|
|
@@ -10,7 +10,6 @@ export * from './mutation-observable.util';
|
|
|
10
10
|
export * from './reactive-binding.util';
|
|
11
11
|
export * from './round.utils';
|
|
12
12
|
export * from './runtime-error.utils';
|
|
13
|
-
export * from './rxjs.utils';
|
|
14
13
|
export * from './scrollable.utils';
|
|
15
14
|
export * from './selection-model.utils';
|
|
16
15
|
export * from './smart-block-scroll-strategy.utils';
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.5.0"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
8
|
"@angular/common": "^15.2.1 || ^16.0.0",
|
|
9
9
|
"@angular/core": "^15.2.1 || ^16.0.0",
|
|
10
|
-
"@angular/platform-browser": "16.1.
|
|
11
|
-
"@ethlete/types": "1.
|
|
10
|
+
"@angular/platform-browser": "16.1.6",
|
|
11
|
+
"@ethlete/types": "1.3.0",
|
|
12
12
|
"rxjs": "7.8.1",
|
|
13
|
-
"@angular/cdk": "16.1.
|
|
14
|
-
"@
|
|
15
|
-
"@angular/router": "16.1.
|
|
16
|
-
"@angular/forms": "16.1.
|
|
13
|
+
"@angular/cdk": "16.1.5",
|
|
14
|
+
"@floating-ui/dom": "1.4.5",
|
|
15
|
+
"@angular/router": "16.1.6",
|
|
16
|
+
"@angular/forms": "16.1.6"
|
|
17
17
|
},
|
|
18
18
|
"module": "fesm2022/ethlete-core.mjs",
|
|
19
19
|
"typings": "index.d.ts",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
export class BehaviorSubjectWithSubscriberCount extends BehaviorSubject {
|
|
4
|
-
constructor() {
|
|
5
|
-
super(...arguments);
|
|
6
|
-
this._subscriberCount = 0;
|
|
7
|
-
}
|
|
8
|
-
get subscriberCount() {
|
|
9
|
-
return this._subscriberCount;
|
|
10
|
-
}
|
|
11
|
-
subscribe(observerOrNext) {
|
|
12
|
-
this._subscriberCount++;
|
|
13
|
-
const sub = super.subscribe(observerOrNext);
|
|
14
|
-
return {
|
|
15
|
-
...sub,
|
|
16
|
-
unsubscribe: () => {
|
|
17
|
-
sub.unsubscribe();
|
|
18
|
-
this._subscriberCount--;
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
unsubscribe() {
|
|
23
|
-
this._subscriberCount--;
|
|
24
|
-
return super.unsubscribe();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnhqcy51dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9zcmMvbGliL3V0aWxzL3J4anMudXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsdURBQXVEO0FBQ3ZELE9BQU8sRUFBRSxlQUFlLEVBQTBCLE1BQU0sTUFBTSxDQUFDO0FBRS9ELE1BQU0sT0FBTyxrQ0FBc0MsU0FBUSxlQUFrQjtJQUE3RTs7UUFDVSxxQkFBZ0IsR0FBRyxDQUFDLENBQUM7SUFvQy9CLENBQUM7SUFsQ0MsSUFBSSxlQUFlO1FBQ2pCLE9BQU8sSUFBSSxDQUFDLGdCQUFnQixDQUFDO0lBQy9CLENBQUM7SUFhUSxTQUFTLENBQUMsY0FBbUI7UUFDcEMsSUFBSSxDQUFDLGdCQUFnQixFQUFFLENBQUM7UUFFeEIsTUFBTSxHQUFHLEdBQUcsS0FBSyxDQUFDLFNBQVMsQ0FBQyxjQUFjLENBQUMsQ0FBQztRQUU1QyxPQUFPO1lBQ0wsR0FBRyxHQUFHO1lBQ04sV0FBVyxFQUFFLEdBQUcsRUFBRTtnQkFDaEIsR0FBRyxDQUFDLFdBQVcsRUFBRSxDQU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AgICBjb21wbGV0ZT86ICgoKSA9PiB2b2lkKSB8IG51bGwsXG4gICk6IFN1YnNjcmlwdGlvbjtcbiAgb3ZlcnJpZGUgc3Vic2NyaWJlKG9ic2VydmVyT3JOZXh0PzogUGFydGlhbDxPYnNlcnZlcjxUPj4gfCAoKHZhbHVlOiBUKSA9PiB2b2lkKSB8IHVuZGVmaW5lZCk6IFN1YnNjcmlwdGlvbjtcbiAgb3ZlcnJpZGUgc3Vic2NyaWJlKG9ic2VydmVyT3JOZXh0OiBhbnkpIHtcbiAgICB0aGlzLl9zdWJzY3JpYmVyQ291bnQrKztcblxuICAgIGNvbnN0IHN1YiA9IHN1cGVyLnN1YnNjcmliZShvYnNlcnZlck9yTmV4dCk7XG5cbiAgICByZXR1cm4ge1xuICAgICAgLi4uc3ViLFxuICAgICAgdW5zdWJzY3JpYmU6ICgpID0+IHtcbiAgICAgICAgc3ViLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgIHRoaXMuX3N1YnNjcmliZXJDb3VudC0tO1xuICAgICAgfSxcbiAgICB9O1xuICB9XG5cbiAgb3ZlcnJpZGUgdW5zdWJzY3JpYmUoKSB7XG4gICAgdGhpcy5fc3Vic2NyaWJlckNvdW50LS07XG5cbiAgICByZXR1cm4gc3VwZXIudW5zdWJzY3JpYmUoKTtcbiAgfVxufVxuIl19
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BehaviorSubject, Observer, Subscription } from 'rxjs';
|
|
2
|
-
export declare class BehaviorSubjectWithSubscriberCount<T> extends BehaviorSubject<T> {
|
|
3
|
-
private _subscriberCount;
|
|
4
|
-
get subscriberCount(): number;
|
|
5
|
-
subscribe(observerOrNext?: Partial<Observer<T>> | ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;
|
|
6
|
-
subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;
|
|
7
|
-
subscribe(observerOrNext?: Partial<Observer<T>> | ((value: T) => void) | undefined): Subscription;
|
|
8
|
-
unsubscribe(): void;
|
|
9
|
-
}
|