@ethlete/core 3.6.1 → 3.8.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/directives/observe-visibility/observe-visibility.directive.mjs +31 -9
- package/esm2022/lib/services/router-state.service.mjs +3 -3
- package/esm2022/lib/services/viewport.service.mjs +10 -4
- package/esm2022/lib/utils/clone.util.mjs +1 -1
- package/esm2022/lib/utils/form.utils.mjs +1 -1
- package/esm2022/lib/utils/mutation-observable.util.mjs +7 -2
- package/esm2022/lib/utils/public-api.mjs +2 -1
- package/esm2022/lib/utils/signal.utils.mjs +72 -0
- package/fesm2022/ethlete-core.mjs +118 -14
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/lib/directives/observe-visibility/observe-visibility.directive.d.ts +18 -3
- package/lib/utils/public-api.d.ts +1 -0
- package/lib/utils/signal.utils.d.ts +7 -0
- package/package.json +2 -2
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import { AfterViewInit, EventEmitter, InjectionToken } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, EventEmitter, InjectionToken, Signal, signal } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare const OBSERVE_VISIBILITY_TOKEN: InjectionToken<ObserveVisibilityDirective>;
|
|
4
|
+
export interface ObserveVisibilityChange {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
isAbove: boolean;
|
|
7
|
+
isBelow: boolean;
|
|
8
|
+
isLeft: boolean;
|
|
9
|
+
isRight: boolean;
|
|
10
|
+
entry: IntersectionObserverEntry;
|
|
11
|
+
}
|
|
12
|
+
export declare const signalVisibilityChangeClasses: (cfg: {
|
|
13
|
+
name: string;
|
|
14
|
+
signal: Signal<ObserveVisibilityChange | null | undefined>;
|
|
15
|
+
}) => {
|
|
16
|
+
[x: string]: Signal<boolean | undefined>;
|
|
17
|
+
};
|
|
4
18
|
export declare class ObserveVisibilityDirective implements AfterViewInit {
|
|
5
19
|
private readonly _destroy$;
|
|
6
20
|
private readonly _elementRef;
|
|
7
21
|
private readonly _intersectionObserverService;
|
|
8
|
-
protected readonly
|
|
9
|
-
readonly etObserveVisibility: EventEmitter<
|
|
22
|
+
protected readonly visibilityChange: import("@angular/core").WritableSignal<ObserveVisibilityChange | null>;
|
|
23
|
+
readonly etObserveVisibility: EventEmitter<ObserveVisibilityChange>;
|
|
24
|
+
constructor();
|
|
10
25
|
ngAfterViewInit(): void;
|
|
11
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<ObserveVisibilityDirective, never>;
|
|
12
27
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ObserveVisibilityDirective, "[etObserveVisibility]", never, {}, { "etObserveVisibility": "etObserveVisibility"; }, never, never, true, never>;
|
|
@@ -15,6 +15,7 @@ export * from './round.utils';
|
|
|
15
15
|
export * from './runtime-error.utils';
|
|
16
16
|
export * from './scrollable.utils';
|
|
17
17
|
export * from './selection-model.utils';
|
|
18
|
+
export * from './signal.utils';
|
|
18
19
|
export * from './smart-block-scroll-strategy.utils';
|
|
19
20
|
export * from './value.utils';
|
|
20
21
|
export * from './viewport.util';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
export declare const signalClasses: <T extends Record<string, Signal<unknown>>>(el: HTMLElement, classMap: T) => void;
|
|
3
|
+
export declare const signalHostClasses: <T extends Record<string, Signal<unknown>>>(classMap: T) => void;
|
|
4
|
+
export declare const signalAttributes: <T extends Record<string, Signal<unknown>>>(el: HTMLElement, attributeMap: T) => void;
|
|
5
|
+
export declare const signalHostAttributes: <T extends Record<string, Signal<unknown>>>(attributeMap: T) => void;
|
|
6
|
+
export declare const signalStyle: <T extends Record<string, Signal<unknown>>>(el: HTMLElement, styleMap: T) => void;
|
|
7
|
+
export declare const signalHostStyle: <T extends Record<string, Signal<unknown>>>(styleMap: T) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.5.0"
|
|
6
6
|
},
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@angular/platform-browser": "16.2.5",
|
|
11
11
|
"@ethlete/types": "1.4.0",
|
|
12
12
|
"rxjs": "7.8.1",
|
|
13
|
-
"@angular/cdk": "16.2.
|
|
13
|
+
"@angular/cdk": "16.2.6",
|
|
14
14
|
"@floating-ui/dom": "1.5.3",
|
|
15
15
|
"@angular/router": "16.2.5",
|
|
16
16
|
"@angular/forms": "16.2.5"
|