@ethlete/core 4.19.4 → 4.21.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/esm2022/lib/components/structured-data/structured-data.component.mjs +3 -3
  3. package/esm2022/lib/directives/animatable/animatable.directive.mjs +3 -3
  4. package/esm2022/lib/directives/animated-if/animated-if.directive.mjs +3 -3
  5. package/esm2022/lib/directives/animated-lifecycle/animated-lifecycle.directive.mjs +3 -3
  6. package/esm2022/lib/directives/animated-overlay/animated-overlay.directive.mjs +3 -3
  7. package/esm2022/lib/directives/click-outside/click-outside.directive.mjs +3 -3
  8. package/esm2022/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -3
  9. package/esm2022/lib/directives/debug/debug.directive.mjs +3 -3
  10. package/esm2022/lib/directives/delayable/delayable.directive.mjs +3 -3
  11. package/esm2022/lib/directives/is-active-element/is-active-element.directive.mjs +3 -3
  12. package/esm2022/lib/directives/is-element/is-element.directive.mjs +3 -3
  13. package/esm2022/lib/directives/let/let.directive.mjs +3 -3
  14. package/esm2022/lib/directives/observe-content/observe-content.directive.mjs +3 -3
  15. package/esm2022/lib/directives/observe-resize/observe-resize.directive.mjs +3 -3
  16. package/esm2022/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +3 -3
  17. package/esm2022/lib/directives/observe-visibility/observe-visibility.directive.mjs +3 -3
  18. package/esm2022/lib/directives/repeat/repeat.directive.mjs +3 -3
  19. package/esm2022/lib/directives/root-boundary/root-boundary.directive.mjs +3 -3
  20. package/esm2022/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +3 -3
  21. package/esm2022/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +3 -3
  22. package/esm2022/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +3 -3
  23. package/esm2022/lib/directives/seo/seo.directive.mjs +3 -3
  24. package/esm2022/lib/pipes/infer-mime-type/infer-mime-type.pipe.mjs +3 -3
  25. package/esm2022/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +3 -3
  26. package/esm2022/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +3 -3
  27. package/esm2022/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +3 -3
  28. package/esm2022/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +3 -3
  29. package/esm2022/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +3 -3
  30. package/esm2022/lib/pipes/to-array/to-array.pipe.mjs +3 -3
  31. package/esm2022/lib/props/props.directive.mjs +3 -3
  32. package/esm2022/lib/services/click-observer.service.mjs +6 -6
  33. package/esm2022/lib/services/content-observer.service.mjs +6 -6
  34. package/esm2022/lib/services/focus-visible.service.mjs +3 -3
  35. package/esm2022/lib/services/intersection-observer.service.mjs +6 -6
  36. package/esm2022/lib/services/resize-observer.service.mjs +6 -6
  37. package/esm2022/lib/services/router-state.service.mjs +3 -3
  38. package/esm2022/lib/services/viewport.service.mjs +3 -3
  39. package/esm2022/lib/utils/signal.utils.mjs +19 -8
  40. package/fesm2022/ethlete-core.mjs +141 -130
  41. package/fesm2022/ethlete-core.mjs.map +1 -1
  42. package/lib/utils/signal.utils.d.ts +5 -5
  43. package/package.json +7 -7
@@ -1,5 +1,5 @@
1
1
  import { EffectRef, ElementRef, Injector, QueryList, Signal, WritableSignal } from '@angular/core';
2
- import { FormArray, FormControl, FormGroup } from '@angular/forms';
2
+ import { AbstractControl, FormControl } from '@angular/forms';
3
3
  import { Observable } from 'rxjs';
4
4
  import { Breakpoint } from '../types';
5
5
  type SignalElementBindingComplexType = HTMLElement | ElementRef<HTMLElement> | QueryList<ElementRef<HTMLElement> | HTMLElement> | Array<ElementRef<HTMLElement> | HTMLElement> | null | undefined;
@@ -124,7 +124,7 @@ export declare const signalElementIntersection: (el: SignalElementBindingType, o
124
124
  export declare const signalHostElementIntersection: (options?: SignalElementIntersectionOptions) => Signal<IntersectionObserverEntry[]>;
125
125
  export declare const signalElementChildren: (el: SignalElementBindingType) => Signal<HTMLElement[]>;
126
126
  export declare const previousSignalValue: <T>(signal: Signal<T>) => Signal<T | undefined>;
127
- export declare const syncSignal: <T>(from: Signal<T>, to: WritableSignal<T>) => void;
127
+ export declare const syncSignal: <T>(from: Signal<T>, to: WritableSignal<T>) => EffectRef;
128
128
  export interface ControlValueSignalOptions {
129
129
  /**
130
130
  * @default 300
@@ -135,11 +135,11 @@ export interface ControlValueSignalOptions {
135
135
  */
136
136
  debounceFirst?: boolean;
137
137
  }
138
- export declare const controlValueSignal: <T extends FormGroup<any> | FormArray<any> | FormControl<any>>(control: T, options?: ControlValueSignalOptions) => Signal<ReturnType<T["getRawValue"]>>;
138
+ export declare const controlValueSignal: <T extends AbstractControl<any, any> | Signal<AbstractControl<any, any> | null>, J extends T extends Signal<infer I> ? I : T>(control: T, options?: ControlValueSignalOptions) => Signal<ReturnType<NonNullable<J>["getRawValue"]> | null>;
139
139
  /**
140
140
  * The first item in the pair is the previous value and the second item is the current value.
141
141
  */
142
- export declare const controlValueSignalWithPrevious: <T extends FormGroup<any> | FormArray<any> | FormControl<any>>(control: T, options?: ControlValueSignalOptions) => Signal<any[] | [ReturnType<T["getRawValue"]>, ReturnType<T["getRawValue"]>]>;
142
+ export declare const controlValueSignalWithPrevious: <T extends AbstractControl<any, any>>(control: T, options?: ControlValueSignalOptions) => Signal<any[] | [ReturnType<NonNullable<T extends Signal<infer I> ? I : T>["getRawValue"]> | null, ReturnType<NonNullable<T extends Signal<infer I> ? I : T>["getRawValue"]> | null]>;
143
143
  /**
144
144
  * @deprecated Use `controlValueSignal` instead with `debounceTime` option.
145
145
  */
@@ -152,7 +152,7 @@ export interface DebouncedControlValueSignalOptions {
152
152
  /**
153
153
  * @deprecated Use `controlValueSignal` instead with `debounceTime` set to `300` and `debounceFirst` set to `true`.
154
154
  */
155
- export declare const debouncedControlValueSignal: <T extends FormControl<any>>(control: T, options?: DebouncedControlValueSignalOptions) => Signal<ReturnType<T["getRawValue"]>>;
155
+ export declare const debouncedControlValueSignal: <T extends FormControl<any>>(control: T, options?: DebouncedControlValueSignalOptions) => Signal<ReturnType<NonNullable<T extends Signal<infer I> ? I : T>["getRawValue"]> | null>;
156
156
  export type InjectUtilConfig = {
157
157
  /** The injector to use for the injection. Must be provided if the function is not called from within a injection context. */
158
158
  injector?: Injector;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ethlete/core",
3
- "version": "4.19.4",
3
+ "version": "4.21.0",
4
4
  "peerDependencies": {
5
- "@angular/cdk": "18.0.2",
6
- "@angular/common": "18.0.2",
7
- "@angular/core": "18.0.2",
8
- "@angular/forms": "18.0.2",
9
- "@angular/platform-browser": "18.0.2",
10
- "@angular/router": "18.0.2",
5
+ "@angular/cdk": "18.0.3",
6
+ "@angular/common": "18.0.3",
7
+ "@angular/core": "18.0.3",
8
+ "@angular/forms": "18.0.3",
9
+ "@angular/platform-browser": "18.0.3",
10
+ "@angular/router": "18.0.3",
11
11
  "@ethlete/theming": "^2.3.1",
12
12
  "@ethlete/types": "^1.6.2",
13
13
  "@floating-ui/dom": "^1.5.3",