@ethlete/core 4.11.0 → 4.12.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/CHANGELOG.md +16 -0
- 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-if/animated-if.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 +3 -3
- 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/debug/debug.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/observe-visibility/observe-visibility.directive.mjs +3 -3
- package/esm2022/lib/directives/repeat/repeat.directive.mjs +3 -3
- package/esm2022/lib/directives/root-boundary/root-boundary.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/infer-mime-type/infer-mime-type.pipe.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/props/props.directive.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/intersection-observer.service.mjs +6 -6
- 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/intersection-observer.utils.mjs +50 -12
- package/esm2022/lib/utils/signal.utils.mjs +70 -1
- package/fesm2022/ethlete-core.mjs +1599 -1493
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/lib/utils/intersection-observer.utils.d.ts +36 -10
- package/lib/utils/signal.utils.d.ts +31 -1
- package/package.json +7 -7
|
@@ -1,14 +1,40 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const getIntersectionInfo: (intersections: IntersectionObserverEntry[]) => {
|
|
2
|
+
partial: {
|
|
3
|
+
hasAny: boolean;
|
|
4
|
+
hasMultiple: boolean;
|
|
5
|
+
first: {
|
|
6
|
+
intersection: IntersectionObserverEntry;
|
|
7
|
+
index: number;
|
|
8
|
+
};
|
|
9
|
+
last: {
|
|
10
|
+
intersection: IntersectionObserverEntry;
|
|
11
|
+
index: number;
|
|
12
|
+
};
|
|
13
|
+
biggest: {
|
|
14
|
+
intersection: IntersectionObserverEntry;
|
|
15
|
+
index: number;
|
|
16
|
+
};
|
|
5
17
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
18
|
+
full: {
|
|
19
|
+
hasAny: boolean;
|
|
20
|
+
hasMultiple: boolean;
|
|
21
|
+
first: {
|
|
22
|
+
index: number;
|
|
23
|
+
intersection: IntersectionObserverEntry | undefined;
|
|
24
|
+
};
|
|
25
|
+
last: {
|
|
26
|
+
index: number;
|
|
27
|
+
intersection: IntersectionObserverEntry | undefined;
|
|
28
|
+
};
|
|
9
29
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
30
|
+
none: {
|
|
31
|
+
first: {
|
|
32
|
+
index: number;
|
|
33
|
+
intersection: IntersectionObserverEntry | undefined;
|
|
34
|
+
};
|
|
35
|
+
last: {
|
|
36
|
+
index: number;
|
|
37
|
+
intersection: IntersectionObserverEntry | undefined;
|
|
38
|
+
};
|
|
13
39
|
};
|
|
14
40
|
} | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementRef, QueryList, Signal, WritableSignal } from '@angular/core';
|
|
1
|
+
import { ElementRef, Injector, QueryList, Signal, WritableSignal } from '@angular/core';
|
|
2
2
|
import { FormArray, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
type SignalElementBindingComplexType = HTMLElement | ElementRef<HTMLElement> | QueryList<ElementRef<HTMLElement> | HTMLElement> | Array<ElementRef<HTMLElement> | HTMLElement> | null | undefined;
|
|
@@ -136,4 +136,34 @@ export interface DebouncedControlValueSignalOptions {
|
|
|
136
136
|
* @deprecated Use `controlValueSignal` instead with `debounceTime` set to `300` and `debounceFirst` set to `true`.
|
|
137
137
|
*/
|
|
138
138
|
export declare const debouncedControlValueSignal: <T extends FormControl<any>>(control: T, options?: DebouncedControlValueSignalOptions) => Signal<ReturnType<T["getRawValue"]>>;
|
|
139
|
+
export type InjectUtilConfig = {
|
|
140
|
+
/** The injector to use for the injection. Must be provided if the function is not called from within a injection context. */
|
|
141
|
+
injector?: Injector;
|
|
142
|
+
};
|
|
143
|
+
export type InjectUtilTransformConfig<In, Out> = {
|
|
144
|
+
/**
|
|
145
|
+
* A transform function similar to the `transform` function in Angular input bindings.
|
|
146
|
+
* Can be used to transform the value before it is returned.
|
|
147
|
+
* E.g. transforming `"true"` to `true` for a boolean attribute.
|
|
148
|
+
*/
|
|
149
|
+
transform?: (value: In) => Out;
|
|
150
|
+
};
|
|
151
|
+
export declare const injectOrRunInContext: <T>(fn: () => T, config?: InjectUtilConfig) => T;
|
|
152
|
+
export declare const transformOrReturn: <In, Out>(src: Signal<In>, config?: InjectUtilTransformConfig<In, Out>) => Signal<Out>;
|
|
153
|
+
/** Inject a signal containing the current route fragment (the part after the # inside the url if present) */
|
|
154
|
+
export declare const injectFragment: <T = string | null>(config?: InjectUtilConfig & InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
155
|
+
/** Inject all currently available query parameters as a signal */
|
|
156
|
+
export declare const injectQueryParams: (config?: InjectUtilConfig) => Signal<import("@angular/router").Params>;
|
|
157
|
+
/** Inject all currently available route data as a signal */
|
|
158
|
+
export declare const injectRouteData: (config?: InjectUtilConfig) => Signal<import("@angular/router").Data>;
|
|
159
|
+
/** Inject the current route title as a signal */
|
|
160
|
+
export declare const injectRouteTitle: <T = string | null>(config?: InjectUtilConfig & InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
161
|
+
/** Inject all currently available path parameters as a signal */
|
|
162
|
+
export declare const injectPathParams: (config?: InjectUtilConfig) => Signal<import("@angular/router").Params>;
|
|
163
|
+
/** Inject a specific query parameter as a signal */
|
|
164
|
+
export declare const injectQueryParam: <T extends string>(key: string, config?: InjectUtilConfig & InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
165
|
+
/** Inject a specific route data item as a signal */
|
|
166
|
+
export declare const injectRouteDataItem: <T = unknown>(key: string, config?: InjectUtilConfig & InjectUtilTransformConfig<unknown, T>) => Signal<T>;
|
|
167
|
+
/** Inject a specific path parameter as a signal */
|
|
168
|
+
export declare const injectPathParam: <T = string | null>(key: string, config?: InjectUtilConfig & InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
139
169
|
export {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.12.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/cdk": "17.3.
|
|
6
|
-
"@angular/common": "17.3.
|
|
7
|
-
"@angular/core": "17.3.
|
|
8
|
-
"@angular/forms": "17.3.
|
|
9
|
-
"@angular/platform-browser": "17.3.
|
|
10
|
-
"@angular/router": "17.3.
|
|
5
|
+
"@angular/cdk": "17.3.6",
|
|
6
|
+
"@angular/common": "17.3.5",
|
|
7
|
+
"@angular/core": "17.3.5",
|
|
8
|
+
"@angular/forms": "17.3.5",
|
|
9
|
+
"@angular/platform-browser": "17.3.5",
|
|
10
|
+
"@angular/router": "17.3.5",
|
|
11
11
|
"@ethlete/theming": "^2.3.1",
|
|
12
12
|
"@ethlete/types": "^1.6.2",
|
|
13
13
|
"@floating-ui/dom": "^1.5.3",
|