@ethlete/core 4.28.0 → 4.29.1

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 (141) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/fesm2022/ethlete-core.mjs +149 -142
  3. package/fesm2022/ethlete-core.mjs.map +1 -1
  4. package/index.d.ts +1971 -36
  5. package/package.json +9 -9
  6. package/lib/components/structured-data/index.d.ts +0 -1
  7. package/lib/components/structured-data/structured-data.component.d.ts +0 -11
  8. package/lib/constants/index.d.ts +0 -1
  9. package/lib/constants/viewport.constants.d.ts +0 -8
  10. package/lib/decorators/memo/index.d.ts +0 -1
  11. package/lib/decorators/memo/memo.decorator.d.ts +0 -13
  12. package/lib/directives/animatable/animatable.directive.d.ts +0 -24
  13. package/lib/directives/animatable/index.d.ts +0 -1
  14. package/lib/directives/animated-if/animated-if.directive.d.ts +0 -12
  15. package/lib/directives/animated-if/index.d.ts +0 -1
  16. package/lib/directives/animated-lifecycle/animated-lifecycle.directive.d.ts +0 -29
  17. package/lib/directives/animated-lifecycle/index.d.ts +0 -1
  18. package/lib/directives/animated-overlay/animated-overlay.directive.d.ts +0 -118
  19. package/lib/directives/animated-overlay/index.d.ts +0 -1
  20. package/lib/directives/click-outside/click-outside.directive.d.ts +0 -12
  21. package/lib/directives/click-outside/index.d.ts +0 -1
  22. package/lib/directives/cursor-drag-scroll/cursor-drag-scroll.constants.d.ts +0 -2
  23. package/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.d.ts +0 -30
  24. package/lib/directives/cursor-drag-scroll/index.d.ts +0 -2
  25. package/lib/directives/debug/debug.directive.d.ts +0 -15
  26. package/lib/directives/debug/index.d.ts +0 -1
  27. package/lib/directives/delayable/delayable.directive.d.ts +0 -13
  28. package/lib/directives/delayable/index.d.ts +0 -1
  29. package/lib/directives/is-active-element/index.d.ts +0 -1
  30. package/lib/directives/is-active-element/is-active-element.directive.d.ts +0 -10
  31. package/lib/directives/is-element/index.d.ts +0 -1
  32. package/lib/directives/is-element/is-element.directive.d.ts +0 -10
  33. package/lib/directives/let/index.d.ts +0 -2
  34. package/lib/directives/let/let.directive.d.ts +0 -15
  35. package/lib/directives/let/let.types.d.ts +0 -4
  36. package/lib/directives/observe-content/index.d.ts +0 -1
  37. package/lib/directives/observe-content/observe-content.directive.d.ts +0 -21
  38. package/lib/directives/observe-resize/index.d.ts +0 -1
  39. package/lib/directives/observe-resize/observe-resize.directive.d.ts +0 -21
  40. package/lib/directives/observe-scroll-state/index.d.ts +0 -3
  41. package/lib/directives/observe-scroll-state/observe-scroll-state.constants.d.ts +0 -3
  42. package/lib/directives/observe-scroll-state/observe-scroll-state.directive.d.ts +0 -31
  43. package/lib/directives/observe-scroll-state/observe-scroll-state.types.d.ts +0 -6
  44. package/lib/directives/observe-visibility/index.d.ts +0 -1
  45. package/lib/directives/observe-visibility/observe-visibility.directive.d.ts +0 -30
  46. package/lib/directives/repeat/index.d.ts +0 -1
  47. package/lib/directives/repeat/repeat.directive.d.ts +0 -13
  48. package/lib/directives/root-boundary/index.d.ts +0 -1
  49. package/lib/directives/root-boundary/root-boundary.directive.d.ts +0 -11
  50. package/lib/directives/scroll-observer-first-element/index.d.ts +0 -1
  51. package/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.d.ts +0 -8
  52. package/lib/directives/scroll-observer-ignore-target/index.d.ts +0 -1
  53. package/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.d.ts +0 -6
  54. package/lib/directives/scroll-observer-last-element/index.d.ts +0 -1
  55. package/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.d.ts +0 -8
  56. package/lib/directives/seo/index.d.ts +0 -4
  57. package/lib/directives/seo/seo.directive.constants.d.ts +0 -3
  58. package/lib/directives/seo/seo.directive.d.ts +0 -21
  59. package/lib/directives/seo/seo.directive.types.d.ts +0 -51
  60. package/lib/directives/seo/seo.directive.utils.d.ts +0 -2
  61. package/lib/pipes/infer-mime-type/index.d.ts +0 -2
  62. package/lib/pipes/infer-mime-type/infer-mime-type.pipe.d.ts +0 -7
  63. package/lib/pipes/infer-mime-type/infer-mime-type.util.d.ts +0 -6
  64. package/lib/pipes/normalize-game-result-type/index.d.ts +0 -3
  65. package/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.d.ts +0 -7
  66. package/lib/pipes/normalize-game-result-type/normalize-game-result-type.types.d.ts +0 -4
  67. package/lib/pipes/normalize-game-result-type/normalize-game-result-type.util.d.ts +0 -2
  68. package/lib/pipes/normalize-match-participants/index.d.ts +0 -3
  69. package/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.d.ts +0 -7
  70. package/lib/pipes/normalize-match-participants/normalize-match-participants.types.d.ts +0 -21
  71. package/lib/pipes/normalize-match-participants/normalize-match-participants.util.d.ts +0 -4
  72. package/lib/pipes/normalize-match-score/index.d.ts +0 -3
  73. package/lib/pipes/normalize-match-score/normalize-match-score.pipe.d.ts +0 -7
  74. package/lib/pipes/normalize-match-score/normalize-match-score.types.d.ts +0 -12
  75. package/lib/pipes/normalize-match-score/normalize-match-score.util.d.ts +0 -27
  76. package/lib/pipes/normalize-match-state/index.d.ts +0 -3
  77. package/lib/pipes/normalize-match-state/normalize-match-state.constants.d.ts +0 -7
  78. package/lib/pipes/normalize-match-state/normalize-match-state.pipe.d.ts +0 -7
  79. package/lib/pipes/normalize-match-state/normalize-match-state.util.d.ts +0 -3
  80. package/lib/pipes/normalize-match-type/index.d.ts +0 -2
  81. package/lib/pipes/normalize-match-type/normalize-match-type.pipe.d.ts +0 -7
  82. package/lib/pipes/normalize-match-type/normalize-match-type.util.d.ts +0 -3
  83. package/lib/pipes/to-array/index.d.ts +0 -2
  84. package/lib/pipes/to-array/to-array.pipe.d.ts +0 -7
  85. package/lib/pipes/to-array/to-array.util.d.ts +0 -3
  86. package/lib/props/create-prop-handlers.d.ts +0 -27
  87. package/lib/props/create-props.d.ts +0 -54
  88. package/lib/props/create-setup.d.ts +0 -4
  89. package/lib/props/dependency-stash.d.ts +0 -11
  90. package/lib/props/element-dictionary.d.ts +0 -11
  91. package/lib/props/index.d.ts +0 -8
  92. package/lib/props/props-binding.d.ts +0 -12
  93. package/lib/props/props.directive.d.ts +0 -38
  94. package/lib/props/template-input.d.ts +0 -30
  95. package/lib/services/click-observer.service.d.ts +0 -20
  96. package/lib/services/content-observer.service.d.ts +0 -20
  97. package/lib/services/focus-visible.service.d.ts +0 -11
  98. package/lib/services/index.d.ts +0 -8
  99. package/lib/services/intersection-observer.service.d.ts +0 -20
  100. package/lib/services/resize-observer.service.d.ts +0 -20
  101. package/lib/services/router-state.service.d.ts +0 -96
  102. package/lib/services/viewport.service.d.ts +0 -64
  103. package/lib/services/viewport.types.d.ts +0 -5
  104. package/lib/types/angular.types.d.ts +0 -13
  105. package/lib/types/i18n.types.d.ts +0 -4
  106. package/lib/types/index.d.ts +0 -4
  107. package/lib/types/value.types.d.ts +0 -2
  108. package/lib/types/viewport.types.d.ts +0 -12
  109. package/lib/utils/active-selection-model.utils.d.ts +0 -18
  110. package/lib/utils/angular.utils.d.ts +0 -3
  111. package/lib/utils/animation.utils.d.ts +0 -61
  112. package/lib/utils/clamp.util.d.ts +0 -1
  113. package/lib/utils/clone.util.d.ts +0 -15
  114. package/lib/utils/component-id.utils.d.ts +0 -1
  115. package/lib/utils/cookie.util.d.ts +0 -5
  116. package/lib/utils/destroy.utils.d.ts +0 -1
  117. package/lib/utils/equal.util.d.ts +0 -27
  118. package/lib/utils/form.utils.d.ts +0 -3
  119. package/lib/utils/index.d.ts +0 -27
  120. package/lib/utils/inject.utils.d.ts +0 -3
  121. package/lib/utils/intersection-observer.utils.d.ts +0 -40
  122. package/lib/utils/key-press-manager.utils.d.ts +0 -9
  123. package/lib/utils/logger.d.ts +0 -10
  124. package/lib/utils/media-query-observable.util.d.ts +0 -5
  125. package/lib/utils/mutation-observable.util.d.ts +0 -7
  126. package/lib/utils/object.utils.d.ts +0 -3
  127. package/lib/utils/reactive-binding.util.d.ts +0 -31
  128. package/lib/utils/resize-observable.util.d.ts +0 -5
  129. package/lib/utils/round.utils.d.ts +0 -1
  130. package/lib/utils/runtime-error.utils.d.ts +0 -8
  131. package/lib/utils/scrollable.utils.d.ts +0 -91
  132. package/lib/utils/selection-model.utils.d.ts +0 -108
  133. package/lib/utils/signal.utils.d.ts +0 -312
  134. package/lib/utils/smart-block-scroll-strategy.utils.d.ts +0 -17
  135. package/lib/utils/value.utils.d.ts +0 -4
  136. package/lib/utils/viewport.util.d.ts +0 -6
  137. package/lib/validators/at-least-one-required.validator.d.ts +0 -14
  138. package/lib/validators/index.d.ts +0 -12
  139. package/lib/validators/is-array-not-empty.validator.d.ts +0 -3
  140. package/lib/validators/is-email.validator.d.ts +0 -3
  141. package/lib/validators/must-match.validator.d.ts +0 -5
@@ -1,108 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { TypedQueryList } from '../types';
3
- export type SelectionModelTypes = string | number | Record<string, unknown> | unknown;
4
- export type SelectionModelPropertyPath = string;
5
- export type SelectionModelOptionValueFn<T extends SelectionModelTypes = any> = (option: T) => unknown;
6
- /**
7
- * You can use a property path or a function to get the value of an option. The function should be as **lightweight as possible** as it will be called **a lot**.
8
- *
9
- * @example
10
- * // Property path
11
- * "id" // option.id
12
- * "user.name" // option.user.name
13
- *
14
- * // Function
15
- * (option) => option.id // option.id
16
- * (option) => option.user.name // option.user.name
17
- */
18
- export type SelectionModelBinding<T extends SelectionModelTypes = any> = SelectionModelPropertyPath | SelectionModelOptionValueFn<T>;
19
- export declare class SelectionModel<T extends SelectionModelTypes = unknown> {
20
- private readonly _destroy$;
21
- private _lastSelectionSetSubscription;
22
- get selection$(): Observable<T[]>;
23
- get selection(): T[];
24
- private readonly _selection$;
25
- get options$(): Observable<T[]>;
26
- get options(): T[];
27
- private readonly _options$;
28
- readonly optionsSignal: import("@angular/core").Signal<T[] | undefined>;
29
- get valueBinding$(): Observable<SelectionModelBinding<T> | null>;
30
- get valueBinding(): SelectionModelBinding<T> | null;
31
- private readonly _valueBinding$;
32
- get keyBinding$(): Observable<SelectionModelBinding<T> | null>;
33
- get keyBinding(): SelectionModelBinding<T> | null;
34
- private readonly _keyBinding$;
35
- get labelBinding$(): Observable<SelectionModelBinding<T> | null>;
36
- get labelBinding(): SelectionModelBinding<T> | null;
37
- private readonly _labelBinding$;
38
- get disabledBinding$(): Observable<SelectionModelBinding<T> | null>;
39
- get disabledBinding(): SelectionModelBinding<T> | null;
40
- private readonly _disabledBinding$;
41
- get allowMultiple$(): Observable<boolean>;
42
- get allowMultiple(): boolean;
43
- private readonly _allowMultiple$;
44
- get filter$(): Observable<string>;
45
- get filter(): string;
46
- private readonly _filter$;
47
- readonly value$: Observable<unknown>;
48
- readonly filteredOptions$: Observable<T[]>;
49
- private readonly _optionsAndSelection$;
50
- constructor();
51
- setSelection(selection: T | T[]): this;
52
- setSelectionFromValue(value: unknown): void;
53
- setSelectionFromValue$(value: unknown): void;
54
- setValueBinding(fnOrPropertyPath: SelectionModelBinding<T> | null): this;
55
- setKeyBinding(fnOrPropertyPath: SelectionModelBinding<T> | null): this;
56
- setLabelBinding(fnOrPropertyPath: SelectionModelBinding<T> | null): this;
57
- setDisabledBinding(fnOrPropertyPath: SelectionModelBinding<T> | null): this;
58
- setOptions(options: T[]): this;
59
- setOptionsFromQueryList(queryList: TypedQueryList<T>): this;
60
- setOptionsFromQueryList$(queryList$: Observable<TypedQueryList<T> | null | undefined>): this;
61
- setAllowMultiple(allowMultiple: boolean): this;
62
- setFilter(filter: string | null): void;
63
- reset(): void;
64
- trackByOptionKey: (option: T) => unknown;
65
- getOptionByValue$(value: unknown): Observable<T | undefined>;
66
- getOptionByLabel$(label: string): Observable<T | undefined>;
67
- getOptionByKey$(key: string): Observable<T | undefined>;
68
- isSelected$(option: T): Observable<boolean>;
69
- isDisabled$(option: T): Observable<boolean>;
70
- getLabel$(option: T): Observable<unknown>;
71
- getValue$(option: T): Observable<unknown>;
72
- getKey$(option: T): Observable<unknown>;
73
- getOptionByValue(value: unknown): T | undefined;
74
- getOptionByLabel(label: string): T | undefined;
75
- getOptionByKey(key: string): T | undefined;
76
- getOption(value: unknown, propertyPath?: SelectionModelBinding<T> | null, options?: T[]): T | undefined;
77
- getOptionByIndex(index: number, options?: T[]): T | null;
78
- getOptionByOffset(offset: number, index: number, config?: {
79
- loop?: boolean;
80
- clamp?: boolean;
81
- skipDisabled?: boolean;
82
- options?: T[];
83
- }): T | null;
84
- getFirstOption(options?: T[]): T | null;
85
- getLastOption(options?: T[]): T | null;
86
- getOptionIndex(option: T, options?: T[]): number | null;
87
- getNonMultipleSelectedOption(): T | null;
88
- getNonMultipleSelectedOptionIndex(): number | null;
89
- getNonMultipleOptionByOffsetFromSelected(offset: number, config?: {
90
- loop?: boolean;
91
- clamp?: boolean;
92
- }): T | null;
93
- getLabel(option: T): unknown;
94
- getValue(option: T): unknown;
95
- getKey(option: T): unknown;
96
- getDisabled(option: T): unknown;
97
- execFnOrGetOptionProperty(option: T, fnOrPropertyPath: SelectionModelBinding<T> | null): unknown;
98
- execFnOrGetOptionPropertyNullable(option: T, fnOrPropertyPath: SelectionModelBinding<T> | null): unknown;
99
- getOptionProperty(option: T, propertyPath: string | null): unknown;
100
- isSelected(option: T): boolean;
101
- isDisabled(option: T): boolean;
102
- getFilteredOptions(filter?: string, options?: T[]): T[];
103
- addSelectedOption(option: T): void;
104
- removeSelectedOption(option: T): void;
105
- clearSelectedOptions(): void;
106
- toggleSelectedOption(option: T): void;
107
- toggleAllSelectedOptions(): void;
108
- }
@@ -1,312 +0,0 @@
1
- import { EffectRef, ElementRef, Injector, QueryList, Signal, WritableSignal } from '@angular/core';
2
- import { AbstractControl, FormControl } from '@angular/forms';
3
- import { Observable } from 'rxjs';
4
- import { RouterState } from '../services';
5
- import { Breakpoint } from '../types';
6
- type SignalElementBindingComplexType = HTMLElement | ElementRef<HTMLElement> | QueryList<ElementRef<HTMLElement> | HTMLElement> | Array<ElementRef<HTMLElement> | HTMLElement> | null | undefined;
7
- type SignalElementBindingType = HTMLElement | ElementRef<HTMLElement> | Observable<SignalElementBindingComplexType> | Signal<SignalElementBindingComplexType> | QueryList<ElementRef<HTMLElement> | HTMLElement> | ElementSignal;
8
- type ElementSignal = Signal<{
9
- /** @deprecated Always use currentElements */
10
- currentElement: HTMLElement | null;
11
- /** @deprecated Always use previousElements */
12
- previousElement: HTMLElement | null;
13
- currentElements: HTMLElement[];
14
- previousElements: HTMLElement[];
15
- }>;
16
- export interface BuildSignalEffectsConfig<T extends Record<string, Signal<unknown>>> {
17
- /** The tokens to apply and their signal value */
18
- tokenMap: T;
19
- /** This function will be invoked for elements that were removed from the signal effects */
20
- cleanupFn: (el: HTMLElement, tokens: string[]) => void;
21
- /** This function will be invoked for elements that were added to the signal effects or when their signal value changes */
22
- updateFn: (el: HTMLElement, tokens: string[], conditionResult: unknown) => void;
23
- }
24
- export declare const buildSignalEffects: <T extends Record<string, Signal<unknown>>>(el: SignalElementBindingType, config: BuildSignalEffectsConfig<T>) => {
25
- remove: (tokens: string) => void;
26
- removeMany: (tokens: string[]) => void;
27
- has: (tokens: string) => boolean;
28
- push: (tokens: string, signal: Signal<unknown>) => void;
29
- pushMany: (map: Record<string, Signal<unknown>>) => void;
30
- };
31
- export declare const signalIsRendered: () => Signal<boolean>;
32
- export declare const signalClasses: <T extends Record<string, Signal<unknown>>>(el: SignalElementBindingType, classMap: T) => {
33
- remove: (tokens: string) => void;
34
- removeMany: (tokens: string[]) => void;
35
- has: (tokens: string) => boolean;
36
- push: (tokens: string, signal: Signal<unknown>) => void;
37
- pushMany: (map: Record<string, Signal<unknown>>) => void;
38
- };
39
- export declare const signalHostClasses: <T extends Record<string, Signal<unknown>>>(classMap: T) => {
40
- remove: (tokens: string) => void;
41
- removeMany: (tokens: string[]) => void;
42
- has: (tokens: string) => boolean;
43
- push: (tokens: string, signal: Signal<unknown>) => void;
44
- pushMany: (map: Record<string, Signal<unknown>>) => void;
45
- };
46
- export declare const signalAttributes: <T extends Record<string, Signal<unknown>>>(el: SignalElementBindingType, attributeMap: T) => {
47
- remove: (tokens: string) => void;
48
- removeMany: (tokens: string[]) => void;
49
- has: (tokens: string) => boolean;
50
- push: (tokens: string, signal: Signal<unknown>) => void;
51
- pushMany: (map: Record<string, Signal<unknown>>) => void;
52
- };
53
- export declare const signalHostAttributes: <T extends Record<string, Signal<unknown>>>(attributeMap: T) => {
54
- remove: (tokens: string) => void;
55
- removeMany: (tokens: string[]) => void;
56
- has: (tokens: string) => boolean;
57
- push: (tokens: string, signal: Signal<unknown>) => void;
58
- pushMany: (map: Record<string, Signal<unknown>>) => void;
59
- };
60
- export declare const signalStyles: <T extends Record<string, Signal<unknown>>>(el: SignalElementBindingType, styleMap: T) => {
61
- remove: (tokens: string) => void;
62
- removeMany: (tokens: string[]) => void;
63
- has: (tokens: string) => boolean;
64
- push: (tokens: string, signal: Signal<unknown>) => void;
65
- pushMany: (map: Record<string, Signal<unknown>>) => void;
66
- };
67
- export declare const signalHostStyles: <T extends Record<string, Signal<unknown>>>(styleMap: T) => {
68
- remove: (tokens: string) => void;
69
- removeMany: (tokens: string[]) => void;
70
- has: (tokens: string) => boolean;
71
- push: (tokens: string, signal: Signal<unknown>) => void;
72
- pushMany: (map: Record<string, Signal<unknown>>) => void;
73
- };
74
- export interface LogicalSize {
75
- inlineSize: number;
76
- blockSize: number;
77
- }
78
- export type ElementRect = {
79
- bottom: number;
80
- height: number;
81
- left: number;
82
- right: number;
83
- top: number;
84
- width: number;
85
- x: number;
86
- y: number;
87
- };
88
- export type ElementSize = {
89
- width: number;
90
- height: number;
91
- };
92
- export declare const boundingClientRectToElementRect: (rect: DOMRectReadOnly) => ElementRect;
93
- export declare const createElementDimensions: (el: HTMLElement | null, rect?: DOMRect) => NullableElementDimensions;
94
- export type ElementDimensions = {
95
- rect: () => ElementRect;
96
- client: ElementSize;
97
- scroll: ElementSize;
98
- offset: ElementSize;
99
- };
100
- export type NullableElementDimensions = {
101
- [K in keyof ElementDimensions]: ElementDimensions[K] | null;
102
- };
103
- export declare const signalElementDimensions: (el: SignalElementBindingType) => Signal<NullableElementDimensions>;
104
- export declare const signalHostElementDimensions: () => Signal<NullableElementDimensions>;
105
- export declare const signalElementMutations: (el: SignalElementBindingType, options?: MutationObserverInit) => Signal<MutationRecord | null>;
106
- export declare const signalHostElementMutations: (options?: MutationObserverInit) => Signal<MutationRecord | null>;
107
- export type SignalElementScrollStateOptions = {
108
- /** The initial scroll position to scroll to. Once a truthy value get's emitted, all further values will be ignored. */
109
- initialScrollPosition?: Signal<ScrollToOptions | null>;
110
- };
111
- export type ElementScrollState = {
112
- canScroll: boolean;
113
- canScrollHorizontally: boolean;
114
- canScrollVertically: boolean;
115
- elementDimensions: NullableElementDimensions;
116
- };
117
- export declare const areScrollStatesEqual: (a: ElementScrollState, b: ElementScrollState) => boolean;
118
- export declare const signalElementScrollState: (el: SignalElementBindingType, options?: SignalElementScrollStateOptions) => Signal<ElementScrollState>;
119
- export declare const signalHostElementScrollState: () => Signal<ElementScrollState>;
120
- export type SignalElementIntersectionOptions = Omit<IntersectionObserverInit, 'root'> & {
121
- root?: SignalElementBindingType;
122
- enabled?: Signal<boolean>;
123
- };
124
- export declare const signalElementIntersection: (el: SignalElementBindingType, options?: SignalElementIntersectionOptions) => Signal<IntersectionObserverEntry[]>;
125
- export declare const signalHostElementIntersection: (options?: SignalElementIntersectionOptions) => Signal<IntersectionObserverEntry[]>;
126
- export declare const signalElementChildren: (el: SignalElementBindingType) => Signal<HTMLElement[]>;
127
- export declare const previousSignalValue: <T>(signal: Signal<T>) => Signal<T | undefined>;
128
- export type SyncSignalOptions = {
129
- /**
130
- * If true, the target signal will not be updated with the source signal's value in a sync operation.
131
- * This should be set to true for signals that need to be initialized first before syncing (eg. required inputs)
132
- * @default false
133
- */
134
- skipSyncRead?: boolean;
135
- /**
136
- * If true, the first time the effect will be triggered will be skipped.
137
- * @default false
138
- */
139
- skipFirstRun?: boolean;
140
- };
141
- export declare const syncSignal: <T>(from: Signal<T>, to: WritableSignal<T>, options?: SyncSignalOptions) => EffectRef;
142
- export interface ControlValueSignalOptions {
143
- debounceTime?: number;
144
- /**
145
- * @default false
146
- */
147
- debounceFirst?: boolean;
148
- }
149
- export declare const controlValueSignal: <T extends Signal<AbstractControl | null> | AbstractControl, J extends T extends Signal<infer I> ? I : T>(control: T, options?: ControlValueSignalOptions) => Signal<ReturnType<NonNullable<J>["getRawValue"]> | null>;
150
- /**
151
- * The first item in the pair is the previous value and the second item is the current value.
152
- */
153
- export declare const controlValueSignalWithPrevious: <T extends AbstractControl>(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]>;
154
- /**
155
- * @deprecated Use `controlValueSignal` instead with `debounceTime` option.
156
- */
157
- export interface DebouncedControlValueSignalOptions {
158
- /**
159
- * @default 300
160
- */
161
- debounceTime?: number;
162
- }
163
- /**
164
- * @deprecated Use `controlValueSignal` instead with `debounceTime` set to `300` and `debounceFirst` set to `true`.
165
- */
166
- export declare const debouncedControlValueSignal: <T extends FormControl>(control: T, options?: DebouncedControlValueSignalOptions) => Signal<ReturnType<NonNullable<T extends Signal<infer I> ? I : T>["getRawValue"]> | null>;
167
- export type InjectUtilConfig = {
168
- /** The injector to use for the injection. Must be provided if the function is not called from within a injection context. */
169
- injector?: Injector;
170
- };
171
- export type InjectUtilTransformConfig<In, Out> = {
172
- /**
173
- * A transform function similar to the `transform` function in Angular input bindings.
174
- * Can be used to transform the value before it is returned.
175
- * E.g. transforming `"true"` to `true` for a boolean attribute.
176
- */
177
- transform?: (value: In) => Out;
178
- };
179
- export declare const transformOrReturn: <In, Out>(src: Signal<In>, config?: InjectUtilTransformConfig<In, Out>) => Signal<Out>;
180
- /** Inject the current router event */
181
- export declare const injectRouterEvent: () => Signal<import("@angular/router").Event | null>;
182
- /**
183
- * Inject the current url.
184
- * The url includes query params as well as the fragment. Use `injectRoute` instead if you are not intrusted in those.
185
- * @example "/my-page?query=1&param=true#fragment"
186
- */
187
- export declare const injectUrl: () => Signal<string>;
188
- /**
189
- * Inject the current route
190
- * @example "/my-page"
191
- */
192
- export declare const injectRoute: () => Signal<string>;
193
- /**
194
- * Inject the complete router state. This includes the current route data, path params, query params, title and fragment.
195
- */
196
- export declare const injectRouterState: () => Signal<RouterState>;
197
- /** Inject a signal containing the current route fragment (the part after the # inside the url if present) */
198
- export declare const injectFragment: <T = string | null>(config?: InjectUtilConfig & InjectUtilTransformConfig<string | null, T>) => Signal<T>;
199
- /** Inject all currently available query parameters as a signal */
200
- export declare const injectQueryParams: () => Signal<import("@angular/router").Params>;
201
- /** Inject all currently available route data as a signal */
202
- export declare const injectRouteData: () => Signal<import("@angular/router").Data>;
203
- /** Inject the current route title as a signal */
204
- export declare const injectRouteTitle: <T = string | null>(config?: InjectUtilTransformConfig<string | null, T>) => Signal<T>;
205
- /** Inject all currently available path parameters as a signal */
206
- export declare const injectPathParams: () => Signal<import("@angular/router").Params>;
207
- /** Inject a specific query parameter as a signal */
208
- export declare const injectQueryParam: <T = string | null>(key: string, config?: InjectUtilTransformConfig<string | null, T>) => Signal<T>;
209
- /** Inject a specific route data item as a signal */
210
- export declare const injectRouteDataItem: <T = unknown>(key: string, config?: InjectUtilTransformConfig<unknown, T>) => Signal<T>;
211
- /** Inject a specific path parameter as a signal */
212
- export declare const injectPathParam: <T = string | null>(key: string, config?: InjectUtilTransformConfig<string | null, T>) => Signal<T>;
213
- /**
214
- * Inject query params that changed during navigation. Unchanged query params will be ignored.
215
- * Removed query params will be represented by the symbol `ET_PROPERTY_REMOVED`.
216
- */
217
- export declare const injectQueryParamChanges: () => Signal<Record<string, unknown>>;
218
- /**
219
- * Inject path params that changed during navigation. Unchanged path params will be ignored.
220
- * Removed path params will be represented by the symbol `ET_PROPERTY_REMOVED`.
221
- */
222
- export declare const injectPathParamChanges: () => Signal<Record<string, unknown>>;
223
- export declare const createIsRenderedSignal: () => {
224
- state: WritableSignal<boolean>;
225
- bind: () => EffectRef;
226
- };
227
- export declare const createCanAnimateSignal: () => {
228
- state: Signal<boolean>;
229
- };
230
- export type ElementLastScrollDirectionType = 'up' | 'down' | 'left' | 'right';
231
- export type ElementLastScrollDirection = {
232
- type: ElementLastScrollDirectionType;
233
- time: number;
234
- };
235
- export declare const signalElementLastScrollDirection: (el: SignalElementBindingType) => Signal<ElementLastScrollDirection | null>;
236
- export declare const signalHostElementLastScrollDirection: () => Signal<ElementLastScrollDirection | null>;
237
- export type CursorDragScrollDirection = 'horizontal' | 'vertical' | 'both';
238
- export type MaybeSignal<T> = T | Signal<T>;
239
- export declare const maybeSignalValue: <T>(value: MaybeSignal<T>) => T;
240
- export type CursorDragScrollOptions = {
241
- /** If true, cursor drag scrolling will be enabled. */
242
- enabled?: Signal<boolean>;
243
- /** The allowed scroll direction. */
244
- allowedDirection?: MaybeSignal<CursorDragScrollDirection>;
245
- };
246
- /** A function to apply cursor drag scroll behavior to an element. */
247
- export declare const useCursorDragScroll: (el: SignalElementBindingType, options?: CursorDragScrollOptions) => {
248
- isDragging: Signal<boolean>;
249
- currentDragAmount: Signal<{
250
- x: number;
251
- y: number;
252
- }>;
253
- };
254
- /**
255
- * A computed that will only be reactive until the source signal contains a truthy value.
256
- * All subsequent changes inside the computation will be ignored.
257
- */
258
- export declare const computedTillTruthy: <T>(source: Signal<T>) => Signal<T | null>;
259
- /**
260
- * A computed that will only be reactive until the source signal contains a falsy value.
261
- * All subsequent changes inside the computation will be ignored.
262
- */
263
- export declare const computedTillFalsy: <T>(source: Signal<T>) => Signal<T | null>;
264
- /**
265
- * A writeable signal that will be set to the provided value once all inputs are set.
266
- * During that time, the signal will be set to `null`.
267
- */
268
- export declare const deferredSignal: <T extends () => unknown>(valueFn: T) => WritableSignal<ReturnType<T> | null>;
269
- /** Inject a signal containing a boolean value indicating if the viewport is xs */
270
- export declare const injectIsXs: () => Signal<boolean>;
271
- /** Inject a signal containing a boolean value indicating if the viewport is sm */
272
- export declare const injectIsSm: () => Signal<boolean>;
273
- /** Inject a signal containing a boolean value indicating if the viewport is md */
274
- export declare const injectIsMd: () => Signal<boolean>;
275
- /** Inject a signal containing a boolean value indicating if the viewport is lg */
276
- export declare const injectIsLg: () => Signal<boolean>;
277
- /** Inject a signal containing a boolean value indicating if the viewport is xl */
278
- export declare const injectIsXl: () => Signal<boolean>;
279
- /** Inject a signal containing a boolean value indicating if the viewport is 2xl */
280
- export declare const injectIs2Xl: () => Signal<boolean>;
281
- /**
282
- * Inject a boolean value indicating if the viewport is matching the provided options.
283
- * This value is not reactive. If you want to react to changes, use the {@link injectObserveBreakpoint} function instead.
284
- */
285
- export declare const injectBreakpointIsMatched: (options: {
286
- min?: number | Breakpoint;
287
- max?: number | Breakpoint;
288
- }) => boolean;
289
- /**
290
- * Inject a signal containing a boolean value indicating if the viewport is matching the provided options.
291
- */
292
- export declare const injectObserveBreakpoint: (options: {
293
- min?: number | Breakpoint;
294
- max?: number | Breakpoint;
295
- }) => Signal<boolean>;
296
- /** Inject a signal containing the current breakpoint. */
297
- export declare const injectCurrentBreakpoint: () => Signal<"xs" | "sm" | "md" | "lg" | "xl" | "2xl">;
298
- /** Inject a signal that indicates if the user is using a portrait display */
299
- export declare const injectIsPortrait: () => Signal<boolean>;
300
- /** Inject a signal that indicates if the user is using a landscape display */
301
- export declare const injectIsLandscape: () => Signal<boolean>;
302
- /** Inject a signal containing the current display orientation */
303
- export declare const injectDisplayOrientation: () => Signal<"portrait" | "landscape">;
304
- /** Inject a signal that indicates if the device has a touch input */
305
- export declare const injectHasTouchInput: () => Signal<boolean>;
306
- /** Inject a signal that indicates if the device has a fine input (mouse or stylus) */
307
- export declare const injectHasPrecisionInput: () => Signal<boolean>;
308
- /** Inject a signal containing the current device input type */
309
- export declare const injectDeviceInputType: () => Signal<"touch" | "mouse">;
310
- /** Inject a signal containing a boolean value indicating if the user can hover (eg. using a mouse) */
311
- export declare const injectCanHover: () => Signal<boolean>;
312
- export {};
@@ -1,17 +0,0 @@
1
- import { ScrollStrategy } from '@angular/cdk/overlay';
2
- /**
3
- * @deprecated Will be removed in v5. Scroll blocking for overlays is build in by default.
4
- */
5
- export declare class SmartBlockScrollStrategy implements ScrollStrategy {
6
- #private;
7
- private _previousHTMLStyles;
8
- private _previousScrollPosition;
9
- private _isEnabled;
10
- private _urlSubscription;
11
- private _resizeSubscription;
12
- private _didNavigate;
13
- attach(): void;
14
- enable(): void;
15
- disable(): void;
16
- private _canBeEnabled;
17
- }
@@ -1,4 +0,0 @@
1
- import { Primitive } from '../types';
2
- export declare const isPrimitiveArray: (value: unknown) => value is Array<Primitive>;
3
- export declare const isObjectArray: (value: unknown) => value is Array<Record<string, unknown>>;
4
- export declare const isEmptyArray: (value: unknown) => value is [];
@@ -1,6 +0,0 @@
1
- import { VIEWPORT_CONFIG } from '../constants';
2
- import { ViewportConfig } from '../types';
3
- export declare const provideViewportConfig: (viewportConfig: ViewportConfig) => {
4
- provide: typeof VIEWPORT_CONFIG;
5
- useValue: typeof viewportConfig;
6
- };
@@ -1,14 +0,0 @@
1
- import { ValidatorFn } from '@angular/forms';
2
- export declare const AT_LEAST_ONE_REQUIRED = "atLeastOneRequired";
3
- export interface ValidateAtLeastOneRequiredConfig {
4
- /**
5
- * Keys of form controls to validate in the supplied form group
6
- */
7
- keys: string[];
8
- /**
9
- * If true, the value `false` will result in a validation error
10
- * @default false
11
- */
12
- checkFalse?: boolean;
13
- }
14
- export declare const ValidateAtLeastOneRequired: (config: ValidateAtLeastOneRequiredConfig) => ValidatorFn;
@@ -1,12 +0,0 @@
1
- export * from './at-least-one-required.validator';
2
- export * from './is-array-not-empty.validator';
3
- export * from './is-email.validator';
4
- export * from './must-match.validator';
5
- export declare const Validators: {
6
- readonly MustMatch: (controlName: string, matchingControlName: string) => (formGroup: import("@angular/forms").AbstractControl) => {
7
- mustMatch: boolean;
8
- } | null;
9
- readonly IsEmail: (control: import("@angular/forms").AbstractControl) => import("@angular/forms").ValidationErrors | null;
10
- readonly IsArrayNotEmpty: (control: import("@angular/forms").AbstractControl) => import("@angular/forms").ValidationErrors | null;
11
- readonly ValidateAtLeastOneRequired: (config: import("./at-least-one-required.validator").ValidateAtLeastOneRequiredConfig) => import("@angular/forms").ValidatorFn;
12
- };
@@ -1,3 +0,0 @@
1
- import { AbstractControl, ValidationErrors } from '@angular/forms';
2
- export declare const IS_ARRAY_NOT_EMPTY = "isArrayNotEmpty";
3
- export declare const IsArrayNotEmpty: (control: AbstractControl) => ValidationErrors | null;
@@ -1,3 +0,0 @@
1
- import { AbstractControl, ValidationErrors } from '@angular/forms';
2
- export declare const IS_EMAIL = "isEmail";
3
- export declare const IsEmail: (control: AbstractControl) => ValidationErrors | null;
@@ -1,5 +0,0 @@
1
- import { AbstractControl } from '@angular/forms';
2
- export declare const MUST_MATCH = "mustMatch";
3
- export declare const MustMatch: (controlName: string, matchingControlName: string) => (formGroup: AbstractControl) => {
4
- mustMatch: boolean;
5
- } | null;