@ethlete/core 5.0.0-next.61 → 5.0.0-next.62
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 +47 -0
- package/fesm2022/ethlete-core.mjs +657 -348
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/generators/generators.json +10 -0
- package/generators/migrate-create-destroy/create-destroy.js +317 -0
- package/generators/migrate-create-destroy/migration.js +46 -0
- package/generators/migrate-create-destroy/schema.json +26 -0
- package/generators/migrate-legacy-color-themes/legacy-color-themes.js +123 -0
- package/generators/migrate-legacy-color-themes/migration.js +93 -0
- package/generators/migrate-legacy-color-themes/schema.json +26 -0
- package/generators/migrate-to-v5/removed-exports.js +94 -6
- package/migrations/legacy-color-themes.md +38 -0
- package/migrations/seo-directive-removed.md +2 -1
- package/migrations.json +15 -0
- package/package.json +11 -11
- package/types/ethlete-core.d.ts +261 -170
package/types/ethlete-core.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { InjectionToken, AfterViewInit, Signal, ElementRef, QueryList, WritableSignal, InputSignalWithTransform, Provider, RendererStyleFlags2, Type, ComponentRef, Injector, ViewContainerRef, EnvironmentProviders, Binding, InjectOptions, StaticProvider, TemplateRef, InputSignal, PipeTransform, TrackByFunction, ApplicationRef } from '@angular/core';
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
|
-
import { Observable
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
5
|
import * as _ethlete_core from '@ethlete/core';
|
|
6
|
-
import * as _floating_ui_dom from '@floating-ui/dom';
|
|
7
6
|
import { VirtualElement, Placement, OffsetOptions, Padding } from '@floating-ui/dom';
|
|
8
7
|
import { MatchListView, ParticipantViewUnion, MatchRankingView, StageType } from '@ethlete/types';
|
|
9
8
|
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
@@ -57,16 +56,28 @@ declare const ANIMATION_DEBUG_STORAGE_KEY = "et-overlay-debug";
|
|
|
57
56
|
declare const isAnimationDebugEnabled: () => boolean;
|
|
58
57
|
declare const animationDebugLog: (scope: string, ...args: unknown[]) => void;
|
|
59
58
|
|
|
60
|
-
declare const
|
|
61
|
-
|
|
59
|
+
declare const ANIMATION_ERROR_CODES: {
|
|
60
|
+
/** `*etAnimatedIf` was used without an `[etAnimatedLifecycle]` element around it. */
|
|
61
|
+
readonly MISSING_ANIMATED_LIFECYCLE: 9000;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
declare const ANIMATED_IF_TOKEN: InjectionToken<AnimatedIfDirective<unknown>>;
|
|
65
|
+
type AnimatedIfContext<T> = {
|
|
66
|
+
$implicit: T;
|
|
67
|
+
etAnimatedIf: T;
|
|
68
|
+
};
|
|
69
|
+
declare class AnimatedIfDirective<T = unknown> {
|
|
70
|
+
static ngTemplateGuard_etAnimatedIf: 'binding';
|
|
62
71
|
private templateRef;
|
|
63
72
|
private viewContainerRef;
|
|
64
73
|
private animatedLifecycle;
|
|
65
74
|
private hasView;
|
|
66
|
-
|
|
75
|
+
private context;
|
|
76
|
+
ifValue: _angular_core.InputSignal<T | null>;
|
|
77
|
+
static ngTemplateContextGuard<T>(_dir: AnimatedIfDirective<T>, _ctx: unknown): _ctx is AnimatedIfContext<Exclude<T, false | 0 | '' | null | undefined>>;
|
|
67
78
|
constructor();
|
|
68
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AnimatedIfDirective
|
|
69
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AnimatedIfDirective
|
|
79
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AnimatedIfDirective<any>, never>;
|
|
80
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AnimatedIfDirective<any>, "[etAnimatedIf]", never, { "ifValue": { "alias": "etAnimatedIf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
70
81
|
}
|
|
71
82
|
|
|
72
83
|
declare const ANIMATED_LIFECYCLE_TOKEN: InjectionToken<AnimatedLifecycleDirective>;
|
|
@@ -82,7 +93,11 @@ declare class AnimatedLifecycleDirective implements AfterViewInit {
|
|
|
82
93
|
private transitionIdCounter;
|
|
83
94
|
private forcedThisFrame;
|
|
84
95
|
private forcedFrameResetId;
|
|
85
|
-
|
|
96
|
+
private stateSubject$;
|
|
97
|
+
private _state;
|
|
98
|
+
state: _angular_core.Signal<AnimatedLifecycleState>;
|
|
99
|
+
/** Emits the current lifecycle state synchronously on subscribe, then every change. */
|
|
100
|
+
state$: Observable<AnimatedLifecycleState>;
|
|
86
101
|
stateChange: _angular_core.OutputRef<AnimatedLifecycleState>;
|
|
87
102
|
skipNextEnter: _angular_core.ModelSignal<boolean>;
|
|
88
103
|
constructor();
|
|
@@ -335,6 +350,7 @@ declare class ClickOutsideDirective {
|
|
|
335
350
|
private elementRef;
|
|
336
351
|
private document;
|
|
337
352
|
didClickOutside: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
353
|
+
private pressStartedInside;
|
|
338
354
|
constructor();
|
|
339
355
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClickOutsideDirective, never>;
|
|
340
356
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ClickOutsideDirective, "[etClickOutside]", never, {}, { "didClickOutside": "etClickOutside"; }, never, never, true, never>;
|
|
@@ -788,8 +804,10 @@ declare const signalElementDimensions: (el: SignalElementBindingType) => Signal<
|
|
|
788
804
|
declare const signalHostElementDimensions: () => Signal<NullableElementDimensions>;
|
|
789
805
|
declare const injectViewportSize: () => Signal<ElementSize>;
|
|
790
806
|
|
|
791
|
-
type SignalElementIntersectionOptions = Omit<IntersectionObserverInit, 'root'> & {
|
|
807
|
+
type SignalElementIntersectionOptions = Omit<IntersectionObserverInit, 'root' | 'rootMargin' | 'threshold'> & {
|
|
792
808
|
root?: SignalElementBindingType;
|
|
809
|
+
rootMargin?: MaybeSignal<string>;
|
|
810
|
+
threshold?: MaybeSignal<number | number[]>;
|
|
793
811
|
enabled?: Signal<boolean>;
|
|
794
812
|
};
|
|
795
813
|
type IntersectionObserverEntryWithDetails = IntersectionObserverEntry & {
|
|
@@ -1029,6 +1047,18 @@ type CreateUserConsentProviderOptions = {
|
|
|
1029
1047
|
};
|
|
1030
1048
|
declare const createUserConsentProvider: (options: CreateUserConsentProviderOptions) => Provider;
|
|
1031
1049
|
|
|
1050
|
+
/**
|
|
1051
|
+
* Declares the `et-visually-hidden` class as a styles-only component: content that stays in the
|
|
1052
|
+
* accessibility tree but is clipped out of the layout. Mount it from any component whose template
|
|
1053
|
+
* uses the class.
|
|
1054
|
+
*/
|
|
1055
|
+
declare class VisuallyHiddenStylesComponent {
|
|
1056
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<VisuallyHiddenStylesComponent, never>;
|
|
1057
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<VisuallyHiddenStylesComponent, "et-visually-hidden-styles", never, {}, {}, never, never, true, never>;
|
|
1058
|
+
}
|
|
1059
|
+
/** Mounts {@link VisuallyHiddenStylesComponent}. Call from an injection context. */
|
|
1060
|
+
declare const mountVisuallyHidden: () => _angular_core.ComponentRef<VisuallyHiddenStylesComponent>;
|
|
1061
|
+
|
|
1032
1062
|
/** Inject a signal containing a boolean value indicating if the viewport is xs */
|
|
1033
1063
|
declare const injectIsXs: () => _angular_core.Signal<boolean>;
|
|
1034
1064
|
/** Inject a signal containing a boolean value indicating if the viewport is sm */
|
|
@@ -1309,26 +1339,35 @@ declare const injectRouterState: () => Signal<RouterState>;
|
|
|
1309
1339
|
/** Inject a signal containing the current route fragment (the part after the # inside the url if present) */
|
|
1310
1340
|
declare const injectFragment: <T = string | null>(config?: InjectUtilConfig & InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
1311
1341
|
/** Inject all currently available query parameters as a signal */
|
|
1312
|
-
declare const injectQueryParams: () => Signal<Params>;
|
|
1342
|
+
declare const injectQueryParams: (config?: InjectUtilConfig) => Signal<Params>;
|
|
1313
1343
|
/** Inject all currently available route data as a signal */
|
|
1314
|
-
declare const injectRouteData: () => Signal<Data>;
|
|
1344
|
+
declare const injectRouteData: (config?: InjectUtilConfig) => Signal<Data>;
|
|
1315
1345
|
/** Inject the current route title as a signal */
|
|
1316
|
-
declare const injectRouteTitle: <T = string | null>(config?: InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
1346
|
+
declare const injectRouteTitle: <T = string | null>(config?: InjectUtilConfig & InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
1317
1347
|
/** Inject all currently available path parameters as a signal */
|
|
1318
|
-
declare const injectPathParams: () => Signal<Params>;
|
|
1319
|
-
type InjectQueryParamConfig<T> = InjectUtilTransformConfig<string | null, T> & {
|
|
1348
|
+
declare const injectPathParams: (config?: InjectUtilConfig) => Signal<Params>;
|
|
1349
|
+
type InjectQueryParamConfig<T> = InjectUtilConfig & InjectUtilTransformConfig<string | null, T> & {
|
|
1320
1350
|
/**
|
|
1321
1351
|
* If true, the initial value will be read from the browser's url.
|
|
1322
1352
|
* Note that this will not work with arrays or complex objects.
|
|
1323
1353
|
*/
|
|
1324
1354
|
requireSync?: boolean;
|
|
1325
1355
|
};
|
|
1326
|
-
|
|
1356
|
+
type InjectQueryParamAllConfig<T> = InjectUtilConfig & InjectUtilTransformConfig<string[], T> & {
|
|
1357
|
+
/** If true, the values are read from the browser's url while the router has none. */
|
|
1358
|
+
requireSync?: boolean;
|
|
1359
|
+
};
|
|
1360
|
+
/**
|
|
1361
|
+
* Inject a specific query parameter as a signal. A repeated parameter (`?tag=a&tag=b`) resolves to its first value;
|
|
1362
|
+
* use `injectQueryParamAll` to read every value.
|
|
1363
|
+
*/
|
|
1327
1364
|
declare const injectQueryParam: <T = string | null>(key: string, config?: InjectQueryParamConfig<T>) => Signal<T>;
|
|
1365
|
+
/** Inject every value of a specific query parameter as a signal. Resolves to an empty array when it is absent. */
|
|
1366
|
+
declare const injectQueryParamAll: <T = string[]>(key: string, config?: InjectQueryParamAllConfig<T>) => Signal<T>;
|
|
1328
1367
|
/** Inject a specific route data item as a signal */
|
|
1329
|
-
declare const injectRouteDataItem: <T = unknown>(key: string, config?: InjectUtilTransformConfig<unknown, T>) => Signal<T>;
|
|
1368
|
+
declare const injectRouteDataItem: <T = unknown>(key: string, config?: InjectUtilConfig & InjectUtilTransformConfig<unknown, T>) => Signal<T>;
|
|
1330
1369
|
/** Inject a specific path parameter as a signal */
|
|
1331
|
-
declare const injectPathParam: <T = string | null>(key: string, config?: InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
1370
|
+
declare const injectPathParam: <T = string | null>(key: string, config?: InjectUtilConfig & InjectUtilTransformConfig<string | null, T>) => Signal<T>;
|
|
1332
1371
|
/**
|
|
1333
1372
|
* Inject query params that changed during navigation. Unchanged query params will be ignored.
|
|
1334
1373
|
* Removed query params will be represented by the symbol `ET_PROPERTY_REMOVED`.
|
|
@@ -1360,7 +1399,7 @@ declare const injectPathParamChanges: () => Signal<Record<string, unknown>>;
|
|
|
1360
1399
|
* protected cameFromCart = this.navState?.fromCart ?? false;
|
|
1361
1400
|
* }
|
|
1362
1401
|
*/
|
|
1363
|
-
declare const injectRouterNavigationState: <T>() => T | null;
|
|
1402
|
+
declare const injectRouterNavigationState: <T>(config?: InjectUtilConfig) => T | null;
|
|
1364
1403
|
|
|
1365
1404
|
declare class ScrollObserverDirective {
|
|
1366
1405
|
private elementRef;
|
|
@@ -1691,7 +1730,7 @@ declare const injectNotifications: _ethlete_core.InjectFn<Notifications>;
|
|
|
1691
1730
|
|
|
1692
1731
|
type OverlayRuntimeRole = 'dialog' | 'alertdialog';
|
|
1693
1732
|
type OverlayRuntimeAutoFocusTarget = 'container' | 'first-heading' | 'first-tabbable';
|
|
1694
|
-
type OverlayRuntimeCloseSource = 'api' | 'escape' | 'outside-pointer' | 'drag' | 'reference-detached' | 'replace';
|
|
1733
|
+
type OverlayRuntimeCloseSource = 'api' | 'escape' | 'outside-pointer' | 'drag' | 'reference-detached' | 'replace' | 'navigation';
|
|
1695
1734
|
type OverlayRuntimeCenteredPosition = {
|
|
1696
1735
|
kind: 'center';
|
|
1697
1736
|
};
|
|
@@ -1837,37 +1876,29 @@ type OverlayRuntimeMountConfig<TComponent extends object> = {
|
|
|
1837
1876
|
};
|
|
1838
1877
|
|
|
1839
1878
|
type OverlayRuntimeState = 'mounting' | 'mounted' | 'closing' | 'closed';
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1879
|
+
/**
|
|
1880
|
+
* The handle `OverlayRuntime.mount()` returns. The lifecycle observables replay their event, so a
|
|
1881
|
+
* subscriber that arrives after it still gets one emission.
|
|
1882
|
+
*/
|
|
1883
|
+
type OverlayRuntimeRef<TComponent extends object = object, TResult = unknown> = {
|
|
1884
|
+
readonly id: string;
|
|
1885
|
+
readonly config: Omit<OverlayRuntimeMountConfig<TComponent>, 'component'>;
|
|
1886
|
+
readonly elements: OverlayRuntimeElements;
|
|
1887
|
+
readonly state: Signal<OverlayRuntimeState>;
|
|
1888
|
+
readonly componentInstance: Signal<TComponent | null>;
|
|
1847
1889
|
close(result?: TResult, source?: OverlayRuntimeCloseSource): void;
|
|
1848
|
-
/**
|
|
1849
|
-
* close it previously vetoed (e.g. after an async confirm resolved). */
|
|
1890
|
+
/** Closes while bypassing every registered close guard, e.g. to commit a close a guard vetoed earlier. */
|
|
1850
1891
|
forceClose(result?: TResult, source?: OverlayRuntimeCloseSource): void;
|
|
1851
|
-
/**
|
|
1892
|
+
/** Registers a synchronous veto for pending closes. Returns an unregister function. */
|
|
1852
1893
|
registerCloseGuard(guard: OverlayRuntimeCloseGuard<TResult>): () => void;
|
|
1853
1894
|
beforeOpened(): Observable<void>;
|
|
1854
1895
|
afterOpened(): Observable<void>;
|
|
1855
1896
|
beforeClosed(): Observable<OverlayRuntimeCloseEvent<TResult>>;
|
|
1856
1897
|
afterClosed(): Observable<OverlayRuntimeCloseEvent<TResult>>;
|
|
1857
|
-
attachComponentRef(componentRef: ComponentRef<TComponent>): void;
|
|
1858
|
-
attachPositionUpdater(updater: (strategy: OverlayRuntimePositionStrategy) => void): void;
|
|
1859
1898
|
updatePositionStrategy(strategy: OverlayRuntimePositionStrategy): void;
|
|
1860
|
-
|
|
1861
|
-
/**
|
|
1862
|
-
* Adds or removes the backdrop of an open overlay. `elements.backdropElement` follows.
|
|
1863
|
-
* A closing overlay keeps the backdrop it has, so its leave transition stays intact.
|
|
1864
|
-
*/
|
|
1899
|
+
/** Adds or removes the backdrop of an open overlay. A closing overlay keeps the backdrop it has. */
|
|
1865
1900
|
updateBackdrop(hasBackdrop: boolean): void;
|
|
1866
|
-
markOpened(): void;
|
|
1867
|
-
beginClose(closeEvent: OverlayRuntimeCloseEvent<TResult>): boolean;
|
|
1868
|
-
finishClose(closeEvent: OverlayRuntimeCloseEvent<TResult>): void;
|
|
1869
1901
|
};
|
|
1870
|
-
type OverlayRuntimeRef<TComponent extends object = object, TResult = unknown> = ReturnType<typeof createOverlayRuntimeRef<TComponent, TResult>>;
|
|
1871
1902
|
|
|
1872
1903
|
declare const FOCUSABLE_SELECTOR: string;
|
|
1873
1904
|
declare const isHTMLElement: (value: unknown) => value is HTMLElement;
|
|
@@ -1917,41 +1948,10 @@ declare const resolveOverlayLayer: (element: Element | null | undefined) => numb
|
|
|
1917
1948
|
*/
|
|
1918
1949
|
declare const isOnHigherOverlayLayer: (target: EventTarget | null | undefined, layer: number) => boolean;
|
|
1919
1950
|
|
|
1920
|
-
declare const setBaseElementStyles: (config: OverlayRuntimeMountConfig<object>, hostElement: HTMLElement, paneElement: HTMLElement, renderer: AngularRenderer) => void;
|
|
1921
|
-
declare const setBackdropStyles: (backdropElement: HTMLElement, renderer: AngularRenderer) => void;
|
|
1922
1951
|
declare const applyCenteredPosition: (hostElement: HTMLElement, paneElement: HTMLElement, renderer: AngularRenderer, _config: OverlayRuntimeCenteredPosition) => void;
|
|
1923
1952
|
declare const applyGlobalPosition: (hostElement: HTMLElement, paneElement: HTMLElement, renderer: AngularRenderer, config: OverlayRuntimeGlobalPosition) => void;
|
|
1924
|
-
/**
|
|
1925
|
-
* Clears every inline style any position strategy kind may have set and
|
|
1926
|
-
* restores the base element styles, so a different strategy can be applied afterwards.
|
|
1927
|
-
*/
|
|
1928
|
-
declare const resetPositioningStyles: (config: OverlayRuntimeMountConfig<object>, hostElement: HTMLElement, paneElement: HTMLElement, renderer: AngularRenderer) => void;
|
|
1929
|
-
/**
|
|
1930
|
-
* Positions an anchored overlay pane and returns the cleanup for its auto-update loop.
|
|
1931
|
-
*/
|
|
1932
|
-
type AnchoredPositionSetup = (strategy: OverlayRuntimeAnchoredPosition, paneElement: HTMLElement, overlayRef: OverlayRuntimeRef<object, unknown>, renderer: AngularRenderer) => () => void;
|
|
1933
|
-
/**
|
|
1934
|
-
* Installs the anchored positioning implementation. Called by `anchoredOverlayPosition()`, which is
|
|
1935
|
-
* the only thing that pulls `@floating-ui/dom` into the bundle - apps that never anchor an overlay
|
|
1936
|
-
* do not ship it.
|
|
1937
|
-
*/
|
|
1938
|
-
declare const registerAnchoredPositionSetup: (setup: AnchoredPositionSetup) => void;
|
|
1939
1953
|
declare const setupPositioning: (config: OverlayRuntimeMountConfig<object>, hostElement: HTMLElement, paneElement: HTMLElement, overlayRef: OverlayRuntimeRef<object, unknown>, renderer: AngularRenderer) => () => void;
|
|
1940
1954
|
|
|
1941
|
-
/**
|
|
1942
|
-
* The floating-ui middleware only a subset of anchored overlays needs. Installed by
|
|
1943
|
-
* `enableAnchoredOverlayPositionExtras()`.
|
|
1944
|
-
*/
|
|
1945
|
-
type AnchoredPositionMiddlewareExtras = {
|
|
1946
|
-
size: typeof _floating_ui_dom.size;
|
|
1947
|
-
arrow: typeof _floating_ui_dom.arrow;
|
|
1948
|
-
hide: typeof _floating_ui_dom.hide;
|
|
1949
|
-
};
|
|
1950
|
-
/**
|
|
1951
|
-
* Installs the `size` / `arrow` / `hide` middleware. Called by
|
|
1952
|
-
* `enableAnchoredOverlayPositionExtras()`.
|
|
1953
|
-
*/
|
|
1954
|
-
declare const registerAnchoredPositionMiddlewareExtras: (extras: AnchoredPositionMiddlewareExtras) => void;
|
|
1955
1955
|
declare const createAnchoredPositionCleanup: (strategy: OverlayRuntimeAnchoredPosition, paneElement: HTMLElement, overlayRef: OverlayRuntimeRef<object, unknown>, renderer: AngularRenderer) => () => void;
|
|
1956
1956
|
/**
|
|
1957
1957
|
* Builds an anchored position strategy and installs the anchored positioning implementation.
|
|
@@ -2027,6 +2027,9 @@ declare const createComponentId: (prefix: string) => string;
|
|
|
2027
2027
|
*/
|
|
2028
2028
|
declare const randomId: () => string;
|
|
2029
2029
|
|
|
2030
|
+
/**
|
|
2031
|
+
* @deprecated Use `takeUntilDestroyed()` from `@angular/core/rxjs-interop`. `yarn nx g @ethlete/core:migrate-create-destroy` rewrites the common pattern.
|
|
2032
|
+
*/
|
|
2030
2033
|
declare const createDestroy: () => rxjs.Observable<boolean>;
|
|
2031
2034
|
|
|
2032
2035
|
declare const injectHostElement: <T = HTMLElement>() => T;
|
|
@@ -2111,6 +2114,17 @@ declare const createRxHostListener: <K extends keyof HTMLElementEventMap>(eventN
|
|
|
2111
2114
|
declare const applyHostListener: <K extends keyof HTMLElementEventMap>(eventName: K, handler: (event: HTMLElementEventMap[K]) => void, options?: AddEventListenerOptions) => rxjs.Subscription;
|
|
2112
2115
|
declare const applyHostListeners: (listeners: Partial<{ [K in keyof HTMLElementEventMap]: (event: HTMLElementEventMap[K]) => void; }>, options?: AddEventListenerOptions) => void;
|
|
2113
2116
|
|
|
2117
|
+
/**
|
|
2118
|
+
* Like Angular's `booleanAttribute`, but keeps `null` and `undefined` so a tri-state input can tell
|
|
2119
|
+
* "not set" apart from `false`. A bare attribute (`<et-x closeOnActivate>`) reads as `true`.
|
|
2120
|
+
*
|
|
2121
|
+
* @example
|
|
2122
|
+
* closeOnActivate = input<boolean | undefined, unknown>(undefined, { transform: optionalBooleanAttribute });
|
|
2123
|
+
*/
|
|
2124
|
+
declare function optionalBooleanAttribute(value: null): null;
|
|
2125
|
+
declare function optionalBooleanAttribute(value: undefined): undefined;
|
|
2126
|
+
declare function optionalBooleanAttribute(value: unknown): boolean;
|
|
2127
|
+
|
|
2114
2128
|
declare class TypedQueryList<T> extends QueryList<T> {
|
|
2115
2129
|
get changes(): Observable<TypedQueryList<T>>;
|
|
2116
2130
|
}
|
|
@@ -2173,6 +2187,7 @@ type Translatable = {
|
|
|
2173
2187
|
text: string;
|
|
2174
2188
|
};
|
|
2175
2189
|
|
|
2190
|
+
/** @deprecated Keyed on the deprecated `KeyboardEvent.keyCode`. Compare `KeyboardEvent.key` instead. */
|
|
2176
2191
|
declare class KeyPressManager {
|
|
2177
2192
|
readonly key: number;
|
|
2178
2193
|
private isKeyPressed;
|
|
@@ -2509,8 +2524,8 @@ type ResizeEdge = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
|
|
|
2509
2524
|
type ResizeMoveEvent = {
|
|
2510
2525
|
edge: ResizeEdge;
|
|
2511
2526
|
/** Cumulative delta from the pointerdown position. */
|
|
2512
|
-
|
|
2513
|
-
|
|
2527
|
+
totalDx: number;
|
|
2528
|
+
totalDy: number;
|
|
2514
2529
|
clientX: number;
|
|
2515
2530
|
clientY: number;
|
|
2516
2531
|
};
|
|
@@ -2522,7 +2537,7 @@ declare class ResizeHandlesComponent {
|
|
|
2522
2537
|
private gesture$;
|
|
2523
2538
|
resizeStarted: _angular_core.OutputRef<ResizeEdge>;
|
|
2524
2539
|
resizeMoved: _angular_core.OutputRef<ResizeMoveEvent>;
|
|
2525
|
-
resizeEnded: _angular_core.OutputRef<
|
|
2540
|
+
resizeEnded: _angular_core.OutputRef<ResizeMoveEvent>;
|
|
2526
2541
|
/**
|
|
2527
2542
|
* The browser took the gesture away mid-resize (a system gesture, an incoming call, the tab going
|
|
2528
2543
|
* to the background). Revert to the size the resize started from - the user never let go, so there
|
|
@@ -3078,11 +3093,11 @@ type TitleConfig = {
|
|
|
3078
3093
|
*/
|
|
3079
3094
|
transformer: (title: string, locale: string) => string;
|
|
3080
3095
|
/**
|
|
3081
|
-
* A title part to be
|
|
3096
|
+
* A title part to be suffixed to all titles
|
|
3082
3097
|
*/
|
|
3083
3098
|
suffixPart?: TitlePart;
|
|
3084
3099
|
/**
|
|
3085
|
-
* A title part to be
|
|
3100
|
+
* A title part to be prefixed to all titles
|
|
3086
3101
|
*/
|
|
3087
3102
|
prefixPart?: TitlePart;
|
|
3088
3103
|
};
|
|
@@ -3185,6 +3200,99 @@ declare class ColorInteractiveDirective {
|
|
|
3185
3200
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ColorInteractiveDirective, "[etColorInteractive]", never, {}, {}, never, never, true, never>;
|
|
3186
3201
|
}
|
|
3187
3202
|
|
|
3203
|
+
type ThemeRGBColor = `${number} ${number} ${number}`;
|
|
3204
|
+
type ThemeHSLColor = `${number} ${number}% ${number}%`;
|
|
3205
|
+
type ThemeColor = ThemeRGBColor | ThemeHSLColor;
|
|
3206
|
+
type ThemeColorMap = {
|
|
3207
|
+
default: ThemeColor;
|
|
3208
|
+
hover: ThemeColor;
|
|
3209
|
+
focus?: ThemeColor;
|
|
3210
|
+
active: ThemeColor;
|
|
3211
|
+
disabled: ThemeColor;
|
|
3212
|
+
};
|
|
3213
|
+
type OnThemeColorMap = {
|
|
3214
|
+
default: ThemeColor;
|
|
3215
|
+
hover?: ThemeColor;
|
|
3216
|
+
focus?: ThemeColor;
|
|
3217
|
+
active?: ThemeColor;
|
|
3218
|
+
disabled?: ThemeColor;
|
|
3219
|
+
};
|
|
3220
|
+
type ThemeInkColorMap = {
|
|
3221
|
+
default: ThemeColor;
|
|
3222
|
+
hover?: ThemeColor;
|
|
3223
|
+
focus?: ThemeColor;
|
|
3224
|
+
active?: ThemeColor;
|
|
3225
|
+
disabled?: ThemeColor;
|
|
3226
|
+
};
|
|
3227
|
+
type ThemeSwatch = {
|
|
3228
|
+
color: ThemeColorMap;
|
|
3229
|
+
onColor: OnThemeColorMap;
|
|
3230
|
+
inkColor?: ThemeInkColorMap;
|
|
3231
|
+
};
|
|
3232
|
+
type ColorThemeType = 'success' | 'warning' | 'error';
|
|
3233
|
+
type ColorTheme = {
|
|
3234
|
+
name: string;
|
|
3235
|
+
type?: ColorThemeType;
|
|
3236
|
+
isDefault?: boolean;
|
|
3237
|
+
primary: ThemeSwatch;
|
|
3238
|
+
secondary?: ThemeSwatch;
|
|
3239
|
+
tertiary?: ThemeSwatch;
|
|
3240
|
+
};
|
|
3241
|
+
/**
|
|
3242
|
+
* Augmentable registry for the literal set of color theme names an app defines. Left
|
|
3243
|
+
* empty by default, which keeps theme-name-accepting APIs (like `etProvideColor`) typed
|
|
3244
|
+
* as plain `string`.
|
|
3245
|
+
*
|
|
3246
|
+
* Apps that want those APIs checked and autocompleted against their own theme names
|
|
3247
|
+
* should augment this interface once, near where their themes are defined:
|
|
3248
|
+
*
|
|
3249
|
+
* ```ts
|
|
3250
|
+
* declare module '@ethlete/core' {
|
|
3251
|
+
* interface EthleteColorThemeNameRegistry {
|
|
3252
|
+
* name: 'pitch-green' | 'red' | 'light-grey';
|
|
3253
|
+
* }
|
|
3254
|
+
* }
|
|
3255
|
+
* ```
|
|
3256
|
+
*/
|
|
3257
|
+
interface EthleteColorThemeNameRegistry {
|
|
3258
|
+
}
|
|
3259
|
+
type RegisteredColorThemeName = EthleteColorThemeNameRegistry extends {
|
|
3260
|
+
name: infer N extends string;
|
|
3261
|
+
} ? N : string;
|
|
3262
|
+
/**
|
|
3263
|
+
* Reserved color name. Resolves the color tokens from the ambient surface's neutral swatch
|
|
3264
|
+
* (`SurfaceTheme['interactionColor']`) instead of a registered accent, so a secondary action can
|
|
3265
|
+
* read as chrome without the app registering a neutral color theme. Apps must not register a color
|
|
3266
|
+
* theme under this name.
|
|
3267
|
+
*/
|
|
3268
|
+
declare const SURFACE_COLOR = "surface";
|
|
3269
|
+
type SurfaceColor = typeof SURFACE_COLOR;
|
|
3270
|
+
/** Everything `[etProvideColor]` accepts: a registered theme name, a theme object, `surface`, or nothing. */
|
|
3271
|
+
type ColorThemeInput = RegisteredColorThemeName | SurfaceColor | ColorTheme | null;
|
|
3272
|
+
declare const createCssColorThemeName: (name: string) => string;
|
|
3273
|
+
declare const ɵProvideColorThemes: (valueOverride?: (ColorTheme | undefined)[] | undefined) => _angular_core.StaticProvider[];
|
|
3274
|
+
declare const injectColorThemes: _ethlete_core.InjectFn<ColorTheme[]>;
|
|
3275
|
+
declare const ɵProvideColorThemesPrefix: (valueOverride?: string | undefined) => _angular_core.StaticProvider[];
|
|
3276
|
+
declare const injectColorThemesPrefix: _ethlete_core.InjectFn<string>;
|
|
3277
|
+
declare const provideColorThemesWithTailwind4: (themes: ColorTheme[], prefix?: string) => _angular_core.StaticProvider[][];
|
|
3278
|
+
/**
|
|
3279
|
+
* A signal of the color theme for `type` on the surface this element renders on: the theme the nearest
|
|
3280
|
+
* surface names in `semanticColorThemes`, else the first registered theme of that `type`. Reading it throws
|
|
3281
|
+
* when the app registered no theme of that `type`, so read it only for a state that renders.
|
|
3282
|
+
*
|
|
3283
|
+
* @example
|
|
3284
|
+
* protected successTheme = injectSemanticColorTheme('success');
|
|
3285
|
+
* // <span [etProvideColor]="successTheme()">+12%</span>
|
|
3286
|
+
*/
|
|
3287
|
+
declare const injectSemanticColorTheme: (type: ColorThemeType) => Signal<ColorTheme>;
|
|
3288
|
+
/** @deprecated Use `injectSemanticColorTheme('error')`, which follows the surface the element renders on. */
|
|
3289
|
+
declare const injectErrorTheme: () => ColorTheme;
|
|
3290
|
+
/** @deprecated Use `injectSemanticColorTheme('warning')`, which follows the surface the element renders on. */
|
|
3291
|
+
declare const injectWarningTheme: () => ColorTheme;
|
|
3292
|
+
/** @deprecated Use `injectSemanticColorTheme('success')`, which follows the surface the element renders on. */
|
|
3293
|
+
declare const injectSuccessTheme: () => ColorTheme;
|
|
3294
|
+
declare const injectDefaultColorTheme: () => ColorTheme;
|
|
3295
|
+
|
|
3188
3296
|
declare const SURFACE_TYPE: {
|
|
3189
3297
|
readonly LIGHT: "light";
|
|
3190
3298
|
readonly DARK: "dark";
|
|
@@ -3224,6 +3332,17 @@ type SurfaceTheme = {
|
|
|
3224
3332
|
elevation: number;
|
|
3225
3333
|
isDefault?: boolean;
|
|
3226
3334
|
interactionColor?: SurfaceInteractionColor;
|
|
3335
|
+
/**
|
|
3336
|
+
* The registered color theme that serves a semantic `type` on this surface, e.g.
|
|
3337
|
+
* `{ success: 'success-on-light' }`. A `type` left out falls back to the first registered theme of
|
|
3338
|
+
* that `type`. Read by `injectSemanticColorTheme()`.
|
|
3339
|
+
*/
|
|
3340
|
+
semanticColorThemes?: Partial<Record<ColorThemeType, RegisteredColorThemeName>>;
|
|
3341
|
+
/**
|
|
3342
|
+
* The registered color theme a `[etProvideSurface]` element applies to its subtree, e.g. a darker
|
|
3343
|
+
* `brand-on-light` on a light surface. An `[etProvideColor]` on or above the surface element wins.
|
|
3344
|
+
*/
|
|
3345
|
+
colorTheme?: RegisteredColorThemeName;
|
|
3227
3346
|
background: SurfaceThemeColor;
|
|
3228
3347
|
color: SurfaceThemeColor;
|
|
3229
3348
|
colorMuted: SurfaceThemeColor;
|
|
@@ -3277,6 +3396,9 @@ declare class ProvideSurfaceDirective {
|
|
|
3277
3396
|
private injector;
|
|
3278
3397
|
private parentProvider;
|
|
3279
3398
|
private defaultTheme;
|
|
3399
|
+
private colorThemes;
|
|
3400
|
+
private colorPrefix;
|
|
3401
|
+
private colorProvider;
|
|
3280
3402
|
private currentProviderSync;
|
|
3281
3403
|
private forcedSurface;
|
|
3282
3404
|
surface: InputSignal<RegisteredSurfaceThemeName | null | undefined>;
|
|
@@ -3291,6 +3413,7 @@ declare class ProvideSurfaceDirective {
|
|
|
3291
3413
|
elevation: Signal<number>;
|
|
3292
3414
|
surfaceType: Signal<_ethlete_core.SurfaceType | null>;
|
|
3293
3415
|
surfaceName: Signal<string | undefined>;
|
|
3416
|
+
private colorThemeClass;
|
|
3294
3417
|
protected surfaceClass: Signal<string>;
|
|
3295
3418
|
syncWithProvider(provider: ProvideSurfaceDirective): void;
|
|
3296
3419
|
stopSyncWithProvider(): void;
|
|
@@ -3344,86 +3467,6 @@ declare class AutoSurfaceDirective {
|
|
|
3344
3467
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AutoSurfaceDirective, "[etAutoSurface]", never, { "surfaceProvider": { "alias": "surfaceProvider"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof ProvideSurfaceDirective; inputs: {}; outputs: {}; }]>;
|
|
3345
3468
|
}
|
|
3346
3469
|
|
|
3347
|
-
type ThemeRGBColor = `${number} ${number} ${number}`;
|
|
3348
|
-
type ThemeHSLColor = `${number} ${number}% ${number}%`;
|
|
3349
|
-
type ThemeColor = ThemeRGBColor | ThemeHSLColor;
|
|
3350
|
-
type ThemeColorMap = {
|
|
3351
|
-
default: ThemeColor;
|
|
3352
|
-
hover: ThemeColor;
|
|
3353
|
-
focus?: ThemeColor;
|
|
3354
|
-
active: ThemeColor;
|
|
3355
|
-
disabled: ThemeColor;
|
|
3356
|
-
};
|
|
3357
|
-
type OnThemeColorMap = {
|
|
3358
|
-
default: ThemeColor;
|
|
3359
|
-
hover?: ThemeColor;
|
|
3360
|
-
focus?: ThemeColor;
|
|
3361
|
-
active?: ThemeColor;
|
|
3362
|
-
disabled?: ThemeColor;
|
|
3363
|
-
};
|
|
3364
|
-
type ThemeInkColorMap = {
|
|
3365
|
-
default: ThemeColor;
|
|
3366
|
-
hover?: ThemeColor;
|
|
3367
|
-
focus?: ThemeColor;
|
|
3368
|
-
active?: ThemeColor;
|
|
3369
|
-
disabled?: ThemeColor;
|
|
3370
|
-
};
|
|
3371
|
-
type ThemeSwatch = {
|
|
3372
|
-
color: ThemeColorMap;
|
|
3373
|
-
onColor: OnThemeColorMap;
|
|
3374
|
-
inkColor?: ThemeInkColorMap;
|
|
3375
|
-
};
|
|
3376
|
-
type ColorThemeType = 'success' | 'warning' | 'error';
|
|
3377
|
-
type ColorTheme = {
|
|
3378
|
-
name: string;
|
|
3379
|
-
type?: ColorThemeType;
|
|
3380
|
-
isDefault?: boolean;
|
|
3381
|
-
primary: ThemeSwatch;
|
|
3382
|
-
secondary?: ThemeSwatch;
|
|
3383
|
-
tertiary?: ThemeSwatch;
|
|
3384
|
-
};
|
|
3385
|
-
/**
|
|
3386
|
-
* Augmentable registry for the literal set of color theme names an app defines. Left
|
|
3387
|
-
* empty by default, which keeps theme-name-accepting APIs (like `etProvideColor`) typed
|
|
3388
|
-
* as plain `string`.
|
|
3389
|
-
*
|
|
3390
|
-
* Apps that want those APIs checked and autocompleted against their own theme names
|
|
3391
|
-
* should augment this interface once, near where their themes are defined:
|
|
3392
|
-
*
|
|
3393
|
-
* ```ts
|
|
3394
|
-
* declare module '@ethlete/core' {
|
|
3395
|
-
* interface EthleteColorThemeNameRegistry {
|
|
3396
|
-
* name: 'pitch-green' | 'red' | 'light-grey';
|
|
3397
|
-
* }
|
|
3398
|
-
* }
|
|
3399
|
-
* ```
|
|
3400
|
-
*/
|
|
3401
|
-
interface EthleteColorThemeNameRegistry {
|
|
3402
|
-
}
|
|
3403
|
-
type RegisteredColorThemeName = EthleteColorThemeNameRegistry extends {
|
|
3404
|
-
name: infer N extends string;
|
|
3405
|
-
} ? N : string;
|
|
3406
|
-
/**
|
|
3407
|
-
* Reserved color name. Resolves the color tokens from the ambient surface's neutral swatch
|
|
3408
|
-
* (`SurfaceTheme['interactionColor']`) instead of a registered accent, so a secondary action can
|
|
3409
|
-
* read as chrome without the app registering a neutral color theme. Apps must not register a color
|
|
3410
|
-
* theme under this name.
|
|
3411
|
-
*/
|
|
3412
|
-
declare const SURFACE_COLOR = "surface";
|
|
3413
|
-
type SurfaceColor = typeof SURFACE_COLOR;
|
|
3414
|
-
/** Everything `[etProvideColor]` accepts: a registered theme name, a theme object, `surface`, or nothing. */
|
|
3415
|
-
type ColorThemeInput = RegisteredColorThemeName | SurfaceColor | ColorTheme | null;
|
|
3416
|
-
declare const createCssColorThemeName: (name: string) => string;
|
|
3417
|
-
declare const ɵProvideColorThemes: (valueOverride?: (ColorTheme | undefined)[] | undefined) => _angular_core.StaticProvider[];
|
|
3418
|
-
declare const injectColorThemes: _ethlete_core.InjectFn<ColorTheme[]>;
|
|
3419
|
-
declare const ɵProvideColorThemesPrefix: (valueOverride?: string | undefined) => _angular_core.StaticProvider[];
|
|
3420
|
-
declare const injectColorThemesPrefix: _ethlete_core.InjectFn<string>;
|
|
3421
|
-
declare const provideColorThemesWithTailwind4: (themes: ColorTheme[], prefix?: string) => _angular_core.StaticProvider[][];
|
|
3422
|
-
declare const injectErrorTheme: () => ColorTheme;
|
|
3423
|
-
declare const injectWarningTheme: () => ColorTheme;
|
|
3424
|
-
declare const injectSuccessTheme: () => ColorTheme;
|
|
3425
|
-
declare const injectDefaultColorTheme: () => ColorTheme;
|
|
3426
|
-
|
|
3427
3470
|
/** One choice in a {@link provideColorPalette} palette. */
|
|
3428
3471
|
type ColorPaletteEntry = {
|
|
3429
3472
|
/** The color theme this choice selects - a name the app registered with `provideColorThemesWithTailwind4`. */
|
|
@@ -3431,25 +3474,51 @@ type ColorPaletteEntry = {
|
|
|
3431
3474
|
/** What a user reads next to the swatch. Provide it already translated. */
|
|
3432
3475
|
label: string;
|
|
3433
3476
|
};
|
|
3477
|
+
/**
|
|
3478
|
+
* One palette per surface theme the app registered, keyed by the surface theme name. `default` is
|
|
3479
|
+
* used on every surface without its own list. Every list must keep the same order.
|
|
3480
|
+
*/
|
|
3481
|
+
type ColorPaletteBySurface = {
|
|
3482
|
+
default: ColorPaletteEntry[];
|
|
3483
|
+
} & Partial<Record<RegisteredSurfaceThemeName, ColorPaletteEntry[]>>;
|
|
3484
|
+
type ColorPaletteConfig = ColorPaletteEntry[] | ColorPaletteBySurface;
|
|
3434
3485
|
/**
|
|
3435
3486
|
* The color themes a subtree may offer a user as pickable choices, in the order they should appear.
|
|
3436
3487
|
* A curated slice of what `provideColorThemesWithTailwind4` registered: an app registers every theme
|
|
3437
3488
|
* it renders with, including ones nobody should pick by hand (`error`, `warning`), and adds the
|
|
3438
3489
|
* user-facing label a swatch needs.
|
|
3439
3490
|
*
|
|
3440
|
-
*
|
|
3441
|
-
*
|
|
3491
|
+
* Pass one list, or one list per registered surface theme name plus a `default`. The charts draw with
|
|
3492
|
+
* the list of the surface they sit on; a color picker always offers the `default` list.
|
|
3442
3493
|
*
|
|
3443
3494
|
* @example
|
|
3444
3495
|
* provideColorPalette([
|
|
3445
3496
|
* { token: 'brand', label: 'Team green' },
|
|
3446
3497
|
* { token: 'ocean', label: 'Training blue' },
|
|
3447
3498
|
* ]);
|
|
3499
|
+
*
|
|
3500
|
+
* @example
|
|
3501
|
+
* provideColorPalette({
|
|
3502
|
+
* default: [{ token: 'ocean', label: 'Training' }],
|
|
3503
|
+
* 'dark-card': [{ token: 'ocean-bright', label: 'Training' }],
|
|
3504
|
+
* });
|
|
3505
|
+
*/
|
|
3506
|
+
declare const provideColorPalette: (palette: ColorPaletteConfig) => _angular_core.StaticProvider[];
|
|
3507
|
+
/**
|
|
3508
|
+
* The palette from {@link provideColorPalette}; with one list per surface, the `default` list. Pass
|
|
3509
|
+
* `{ optional: true }` - most apps provide none.
|
|
3448
3510
|
*/
|
|
3449
|
-
declare
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3511
|
+
declare function injectColorPalette(): ColorPaletteEntry[];
|
|
3512
|
+
declare function injectColorPalette(options: InjectOptions & {
|
|
3513
|
+
optional?: false;
|
|
3514
|
+
}): ColorPaletteEntry[];
|
|
3515
|
+
declare function injectColorPalette(options: InjectOptions): ColorPaletteEntry[] | null;
|
|
3516
|
+
/**
|
|
3517
|
+
* The palette from {@link provideColorPalette} for the surface the current subtree renders on: that
|
|
3518
|
+
* surface theme's list, else the `default` list. `null` when no palette is provided.
|
|
3519
|
+
*/
|
|
3520
|
+
declare const injectSurfaceColorPalette: () => Signal<ColorPaletteEntry[] | null>;
|
|
3521
|
+
declare const COLOR_PALETTE: _angular_core.InjectionToken<ColorPaletteConfig>;
|
|
3453
3522
|
|
|
3454
3523
|
/**
|
|
3455
3524
|
* @deprecated Migrate to Tailwind v4. Intent to remove in v6.
|
|
@@ -3501,6 +3570,7 @@ declare class ProvideColorDirective {
|
|
|
3501
3570
|
private prefix;
|
|
3502
3571
|
private injector;
|
|
3503
3572
|
private parentProvider;
|
|
3573
|
+
private appRef;
|
|
3504
3574
|
private currentProviderSync;
|
|
3505
3575
|
private forcedColor;
|
|
3506
3576
|
color: InputSignal<ColorThemeInput | undefined>;
|
|
@@ -3572,8 +3642,9 @@ type UnsavedChangesAbandonReason = 'logout' | (string & {});
|
|
|
3572
3642
|
type UnsavedChangesConfirmContext = {
|
|
3573
3643
|
/**
|
|
3574
3644
|
* Aborts when the session this confirm belongs to ends underneath it - a logout, or an explicit
|
|
3575
|
-
* `abandonAll()`.
|
|
3576
|
-
*
|
|
3645
|
+
* `abandonAll()`. An `Observable` confirm is unsubscribed when it fires; a confirm that returns a
|
|
3646
|
+
* `Promise` must **close its dialog itself**, otherwise it is left on screen over a page the user has
|
|
3647
|
+
* already been redirected away from. The guard itself stops waiting either way.
|
|
3577
3648
|
*
|
|
3578
3649
|
* ```ts
|
|
3579
3650
|
* confirm: (value, { signal }) => {
|
|
@@ -3668,7 +3739,7 @@ type UnsavedChangesTabConfig = {
|
|
|
3668
3739
|
* {@link UNSAVED_CHANGES_TITLE_MARKER}, a string is used as-is.
|
|
3669
3740
|
*
|
|
3670
3741
|
* Goes through the core title store (`injectTitleStore`), so the app's title must be owned by it
|
|
3671
|
-
* (`applyHeadTitleBinding` /
|
|
3742
|
+
* (`applyHeadTitleBinding` / `applySocialMediaBindings`) - an app that writes `document.title` by some
|
|
3672
3743
|
* other means would fight the store over it.
|
|
3673
3744
|
* @default false
|
|
3674
3745
|
*/
|
|
@@ -3757,10 +3828,11 @@ type CreateUnsavedChangesTrackerConfig<T> = {
|
|
|
3757
3828
|
*/
|
|
3758
3829
|
defaultValue?: T | (() => T);
|
|
3759
3830
|
/**
|
|
3760
|
-
*
|
|
3831
|
+
* Runs only when there are changes to discard. Defaults to the confirm set with
|
|
3832
|
+
* `provideUnsavedChangesConfirm()`; without either, dev mode throws `ET9100`.
|
|
3761
3833
|
* @see UnsavedChangesConfirmFn
|
|
3762
3834
|
*/
|
|
3763
|
-
confirm
|
|
3835
|
+
confirm?: UnsavedChangesConfirmFn<T>;
|
|
3764
3836
|
/**
|
|
3765
3837
|
* Custom equality between the current value and the default. Deep-equal by default.
|
|
3766
3838
|
*
|
|
@@ -3827,6 +3899,25 @@ type UnsavedChangesTrackerRef<T> = {
|
|
|
3827
3899
|
*/
|
|
3828
3900
|
declare const createUnsavedChangesTracker: <T>(config: CreateUnsavedChangesTrackerConfig<T>) => UnsavedChangesTrackerRef<T>;
|
|
3829
3901
|
|
|
3902
|
+
/** The confirm an unsaved-changes tracker or guard runs when its own config has none. */
|
|
3903
|
+
declare const UNSAVED_CHANGES_CONFIRM: InjectionToken<UnsavedChangesConfirmFn<unknown>>;
|
|
3904
|
+
/**
|
|
3905
|
+
* Sets the confirm every unsaved-changes tracker and guard below this injector runs when its config has no
|
|
3906
|
+
* `confirm`. `factory` runs once, in an injection context, and returns the confirm.
|
|
3907
|
+
*
|
|
3908
|
+
* @example
|
|
3909
|
+
* provideUnsavedChangesConfirm(() => {
|
|
3910
|
+
* const dialogs = inject(MyDialogs);
|
|
3911
|
+
* return () => dialogs.confirmDiscard();
|
|
3912
|
+
* });
|
|
3913
|
+
*/
|
|
3914
|
+
declare const provideUnsavedChangesConfirm: (factory: () => UnsavedChangesConfirmFn<unknown>) => Provider;
|
|
3915
|
+
|
|
3916
|
+
declare const UNSAVED_CHANGES_ERROR_CODES: {
|
|
3917
|
+
/** An unsaved-changes tracker or guard has no `confirm`, and no `provideUnsavedChangesConfirm()` is in scope. */
|
|
3918
|
+
readonly MISSING_CONFIRM: 9100;
|
|
3919
|
+
};
|
|
3920
|
+
|
|
3830
3921
|
type CreateUnsavedChangesGuardConfig<T> = CreateUnsavedChangesTrackerConfig<T>;
|
|
3831
3922
|
type UnsavedChangesGuardRef<T> = UnsavedChangesTrackerRef<T> & {
|
|
3832
3923
|
/**
|
|
@@ -3848,7 +3939,7 @@ type UnsavedChangesGuardRef<T> = UnsavedChangesTrackerRef<T> & {
|
|
|
3848
3939
|
declare const createUnsavedChangesGuard: <T>(config: CreateUnsavedChangesGuardConfig<T>) => UnsavedChangesGuardRef<T>;
|
|
3849
3940
|
|
|
3850
3941
|
/** The version of `@ethlete/core` this build was cut from. */
|
|
3851
|
-
declare const CORE_VERSION = "5.0.0-next.
|
|
3942
|
+
declare const CORE_VERSION = "5.0.0-next.62";
|
|
3852
3943
|
|
|
3853
|
-
export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, ANIMATION_DEBUG_STORAGE_KEY, AT_LEAST_ONE_REQUIRED, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AutoSurfaceDirective, BOUNDARY_ELEMENT_TOKEN, BREAKPOINT_INSTANCE_TOKEN, BREAKPOINT_ORDER, COLOR_PALETTE, COLOR_PROVIDER, CORE_VERSION, ClickOutsideDirective, ColorInteractiveContainerDirective, ColorInteractiveDirective, ColorInteractiveExcludeDirective, ColorInteractiveHasFocusDirective, DEFAULT_MULTI_INSTANCE_RELS, DEFAULT_MULTI_INSTANCE_TAGS, DEFAULT_OVERLAY_LAYER, DEFAULT_VIEWPORT_CONFIG, DISABLE_LOGGER_PARAM, DragHandleDirective, ET_DISABLE_SCROLL_TOP, ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE, ET_DISABLE_SCROLL_TOP_ON_PATH_PARAM_CHANGE, ET_PROPERTY_REMOVED, ET_RESTORE_SCROLL, EasingTokensStylesComponent, EthleteValidators, FOCUSABLE_SELECTOR, FOCUS_VISIBLE_TRACKER_TOKEN, HtmlToMarkdownPipe, IS_ARRAY_NOT_EMPTY, IS_EMAIL, InferMimeTypePipe, InitialsPipe, IsArrayNotEmpty, IsEmail, jsonLd_d as JsonLD, KeyPressManager, MARKDOWN_VERBATIM_ATTR, MUST_MATCH, MarkdownToHtmlPipe, MatchStateType, MustMatch, NOTIFICATION_CLICK_MESSAGE_TYPE, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OVERLAY_LAYER_ATTRIBUTE, ProvideColorDirective, ProvideSurfaceDirective, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeHandlesComponent, RestoreScrollDirective, RuntimeError, SURFACE_COLOR, SURFACE_PROVIDER, SURFACE_TYPE, SWIPE_VELOCITY_WINDOW_MS, ScrollObserverDirective, ScrollObserverEndDirective, ScrollObserverStartDirective, SlugifyPipe, StructuredDataComponent, SurfaceInteractiveDirective, ToArrayPipe, TypedQueryList, UNSAVED_CHANGES_TITLE_MARKER, ValidateAtLeastOneRequired, anchoredOverlayPosition, animationDebugLog, applyAlternateBinding, applyAlternateLanguagesBindings, applyArticleBindings, applyAuthorBinding, applyCanonicalBinding, applyCenteredPosition, applyDescriptionBinding, applyFaviconOverlay, applyGlobalPosition, applyHeadBinding, applyHeadTitleBinding, applyHeadTitleMarker, applyHostListener, applyHostListeners, applyInitialFocus, applyKeywordsBinding, applyLinkBinding, applyMetaBinding, applyNextBinding, applyOgBinding, applyOpenGraphBindings, applyPrevBinding, applyResourceHintsBindings, applyRobotsBinding, applySocialMediaBindings, applyStructuredDataBinding, applyTwitterCardBindings, boolBreakpointTransform, boundingClientRectToElementRect, breakpointTransformBase, buildElementSignal, buildSignalEffects, canUseSessionMemory, clamp, clone, cloneFormGroup, computedTillFalsy, computedTillTruthy, controlValueSignal, controlValueSignalWithPrevious, copyToClipboard, createAnchoredPositionCleanup, createArrayPropertyBinding, createAutoSessionMemoryKey, createCanAnimateSignal, createComponentId, createCssColorThemeName, createCssSurfaceName, createDestroy, createDocumentElementSignal, createElementDimensions, createEmptyElementSignal, createFlipAnimation, createFlipAnimationGroup, createIsRenderedSignal, createLogger, createObjectUrlHandle,
|
|
3854
|
-
export type { AlternateLanguagesConfig,
|
|
3944
|
+
export { ANIMATABLE_TOKEN, ANIMATED_IF_TOKEN, ANIMATED_LIFECYCLE_TOKEN, ANIMATION_DEBUG_STORAGE_KEY, ANIMATION_ERROR_CODES, AT_LEAST_ONE_REQUIRED, AnimatableDirective, AnimatedIfDirective, AnimatedLifecycleDirective, AutoSurfaceDirective, BOUNDARY_ELEMENT_TOKEN, BREAKPOINT_INSTANCE_TOKEN, BREAKPOINT_ORDER, COLOR_PALETTE, COLOR_PROVIDER, CORE_VERSION, ClickOutsideDirective, ColorInteractiveContainerDirective, ColorInteractiveDirective, ColorInteractiveExcludeDirective, ColorInteractiveHasFocusDirective, DEFAULT_MULTI_INSTANCE_RELS, DEFAULT_MULTI_INSTANCE_TAGS, DEFAULT_OVERLAY_LAYER, DEFAULT_VIEWPORT_CONFIG, DISABLE_LOGGER_PARAM, DragHandleDirective, ET_DISABLE_SCROLL_TOP, ET_DISABLE_SCROLL_TOP_AS_RETURN_ROUTE, ET_DISABLE_SCROLL_TOP_ON_PATH_PARAM_CHANGE, ET_PROPERTY_REMOVED, ET_RESTORE_SCROLL, EasingTokensStylesComponent, EthleteValidators, FOCUSABLE_SELECTOR, FOCUS_VISIBLE_TRACKER_TOKEN, HtmlToMarkdownPipe, IS_ARRAY_NOT_EMPTY, IS_EMAIL, InferMimeTypePipe, InitialsPipe, IsArrayNotEmpty, IsEmail, jsonLd_d as JsonLD, KeyPressManager, MARKDOWN_VERBATIM_ATTR, MUST_MATCH, MarkdownToHtmlPipe, MatchStateType, MustMatch, NOTIFICATION_CLICK_MESSAGE_TYPE, NormalizeGameResultTypePipe, NormalizeMatchParticipantsPipe, NormalizeMatchScorePipe, NormalizeMatchStatePipe, NormalizeMatchTypePipe, OVERLAY_LAYER_ATTRIBUTE, ProvideColorDirective, ProvideSurfaceDirective, RUNTIME_ERROR_NO_DATA, RepeatDirective, ResizeHandlesComponent, RestoreScrollDirective, RuntimeError, SURFACE_COLOR, SURFACE_PROVIDER, SURFACE_TYPE, SWIPE_VELOCITY_WINDOW_MS, ScrollObserverDirective, ScrollObserverEndDirective, ScrollObserverStartDirective, SlugifyPipe, StructuredDataComponent, SurfaceInteractiveDirective, ToArrayPipe, TypedQueryList, UNSAVED_CHANGES_CONFIRM, UNSAVED_CHANGES_ERROR_CODES, UNSAVED_CHANGES_TITLE_MARKER, ValidateAtLeastOneRequired, VisuallyHiddenStylesComponent, anchoredOverlayPosition, animationDebugLog, applyAlternateBinding, applyAlternateLanguagesBindings, applyArticleBindings, applyAuthorBinding, applyCanonicalBinding, applyCenteredPosition, applyDescriptionBinding, applyFaviconOverlay, applyGlobalPosition, applyHeadBinding, applyHeadTitleBinding, applyHeadTitleMarker, applyHostListener, applyHostListeners, applyInitialFocus, applyKeywordsBinding, applyLinkBinding, applyMetaBinding, applyNextBinding, applyOgBinding, applyOpenGraphBindings, applyPrevBinding, applyResourceHintsBindings, applyRobotsBinding, applySocialMediaBindings, applyStructuredDataBinding, applyTwitterCardBindings, boolBreakpointTransform, boundingClientRectToElementRect, breakpointTransformBase, buildElementSignal, buildSignalEffects, canUseSessionMemory, clamp, clone, cloneFormGroup, computedTillFalsy, computedTillTruthy, controlValueSignal, controlValueSignalWithPrevious, copyToClipboard, createAnchoredPositionCleanup, createArrayPropertyBinding, createAutoSessionMemoryKey, createCanAnimateSignal, createComponentId, createCssColorThemeName, createCssSurfaceName, createDestroy, createDocumentElementSignal, createElementDimensions, createEmptyElementSignal, createFlipAnimation, createFlipAnimationGroup, createIsRenderedSignal, createLogger, createObjectUrlHandle, createPropertyBinding, createRootThemeCss, createRoute, createRouterState, createRxHostListener, createSessionMemory, createSwatchCss, createSwipeTracker, createTailwindColorThemes, createTailwindCssVar, createTailwindRgbVar, createThemeStyle, createUnsavedChangesGuard, createUnsavedChangesTabLock, createUnsavedChangesTracker, createUserConsentProvider, deferredSignal, defineLabels, defineProvider, defineRootProvider, defineStaticProvider, defineStaticRootProvider, deleteCookie, dragGestureFrom, easeElastic, easeIn, easeInOut, easeLinear, easeOut, easeOutBack, easeOutBackStrong, elementCanScroll, enableAnchoredOverlayPositionExtras, equal, fetchDeployedBuildFingerprint$, firstElementSignal, focusElement, forceReflow, formatRuntimeError, fromNextFrame, getCookie, getDomain, getElementScrollCoordinates, getFocusableElements, getFormGroupValue, getGroupMatchPoints, getGroupMatchScore, getHeadingElement, getKnockoutMatchScore, getMatchScoreSubLine, getObjectProperty, getScrollContainerTarget, getScrollItemTarget, getScrollSnapTarget, hasCookie, holdScrollRestoration, htmlToMarkdown, inferMimeType, initials, injectAngularRootElement, injectAnimatedBlockSize, injectAppUpdates, injectAppUpdatesConfig, injectBoundaryElement, injectBreakpointInput, injectBreakpointIsMatched, injectBreakpointObserver, injectCanHover, injectColorPalette, injectColorThemes, injectColorThemesPrefix, injectCurrentBreakpoint, injectDefaultColorTheme, injectDefaultSurfaceTheme, injectDeviceInputType, injectDisplayOrientation, injectErrorTheme, injectFaviconStore, injectFileDownload, injectFocusVisibleTracker, injectFragment, injectHasPrecisionInput, injectHasTouchInput, injectHostElement, injectIs2Xl, injectIsDocumentVisible, injectIsLandscape, injectIsLg, injectIsMd, injectIsPortrait, injectIsRouterInitialized, injectIsSm, injectIsXl, injectIsXs, injectLinkStore, injectLinkStoreConfig, injectLocale, injectMediaQueryIsMatched, injectMetaConfig, injectMetaStore, injectNotifications, injectObserveBreakpoint, injectObserveMediaQuery, injectOverlayRuntime, injectParentSurface, injectPathParam, injectPathParamChanges, injectPathParams, injectPrefersReducedMotion, injectQueryParam, injectQueryParamAll, injectQueryParamChanges, injectQueryParams, injectRenderer, injectRoute, injectRouteData, injectRouteDataItem, injectRouteTitle, injectRouterEvent, injectRouterNavigationState, injectRouterState, injectScrollbarDimensions, injectSemanticColorTheme, injectStructuredDataConfig, injectStructuredDataStore, injectStyleManager, injectSuccessTheme, injectSurfaceColorPalette, injectSurfaceContextTracker, injectSurfaceThemes, injectSurfaceThemesPrefix, injectSurfaceType, injectTemplateRef, injectTitleConfig, injectTitleStore, injectUnsavedChangesCoordinator, injectUrl, injectViewportConfig, injectViewportDimensions, injectViewportSize, injectWarningTheme, isAnimationDebugEnabled, isArray, isElement, isElementSignal, isElementVisible, isFocusable, isGroupMatch, isHTMLElement, isHTMLOrSVGElement, isKnockoutMatch, isObject, isOnHigherOverlayLayer, isSafeLinkUrl, isSafeUrl, isStaleBuildError, markdownToHtml, matchesReducedMotion, maybeSignalValue, memoizeSignal, mountEasingTokens, mountVisuallyHidden, nextFrame, normalizeGameResultType, normalizeMatchParticipant, normalizeMatchParticipants, normalizeMatchScore, normalizeMatchState, normalizeMatchType, normalizeUnsavedChangesSource, numberBreakpointTransform, onOverlayViewportInsetsChange, optionalBooleanAttribute, overlayViewportInsets, overlayViewportInsetsFor, ownsActiveElement, previousSignalValue, provideAppUpdates, provideAppUpdatesConfig, provideAppUpdatesInstance, provideBoundaryElement, provideBreakpointInstance, provideBreakpointObserver, provideColorPalette, provideColorThemes, provideColorThemesWithTailwind4, provideFaviconStore, provideFocusVisibleTracker, provideLinkStore, provideLinkStoreConfig, provideLocale, provideMetaConfig, provideMetaStore, provideNotifications, provideOverlayRuntime, provideRenderer, provideStructuredDataConfig, provideStructuredDataStore, provideStyleManager, provideSurfaceContextTracker, provideSurfaceThemesWithTailwind4, provideTitleConfig, provideTitleStore, provideUnsavedChangesConfirm, provideUnsavedChangesCoordinator, provideViewportConfig, randomId, readBuildFingerprint, readFromClipboard, reserveOverlayViewportSpace, resolveAppRootColorProvider, resolveOverlayLayer, resolveSurfaceByElevation, round, routerDisableScrollTop, routerRestoreScroll, scrollToElement, setCookie, setInputSignal, setupFocusTrap, setupPositioning, setupScrollRestoration, signalAnimatedNumber, signalAttributes, signalClasses, signalCountdown, signalDeferredLoading, signalElementChildren, signalElementDimensions, signalElementIntersection, signalElementLastScrollDirection, signalElementMutations, signalElementScrollState, signalHostAttributes, signalHostClasses, signalHostElementDimensions, signalHostElementIntersection, signalHostElementLastScrollDirection, signalHostElementMutations, signalHostElementScrollState, signalHostStyles, signalIsRendered, signalStyles, slugify, suppressTextSelection, switchQueryListChanges, syncSignal, toArray, toArrayTrackByFn, toInjectFn, toProvideFn, toStringBinding, toToken, transformOrReturn, typedBreakpointTransform, useCursorDragScroll, writeScrollbarSizeToCssVariables, writeViewportSizeToCssVariables, ɵProvideColorThemes, ɵProvideColorThemesPrefix, ɵProvideSurfaceThemes, ɵProvideSurfaceThemesPrefix };
|
|
3945
|
+
export type { AlternateLanguagesConfig, AngularRenderer, AnimatedBlockSizeConfig, AnimatedIfContext, AnimatedLifecycleState, AnimatedNumberSignal, AnimatedSizeAxis, AnimationEndEvent, AppUpdates, AppUpdatesConfig, ArticleConfig, BoolBreakpointSignal, Breakpoint, BreakpointInput, BreakpointMap, BuildMediaQueryOptions, BuildSignalEffectsConfig, ColorPaletteBySurface, ColorPaletteConfig, ColorPaletteEntry, ColorTheme, ColorThemeInput, ColorThemeType, ConsentHandler, ControlValueSignalOptions, Countdown, CountdownDeadline, CreateLoggerConfig, CreateSessionMemoryConfig, CreateUnsavedChangesGuardConfig, CreateUnsavedChangesTabLockConfig, CreateUnsavedChangesTrackerConfig, CreateUserConsentProviderOptions, CurrentElementVisibility, CursorDragScrollDirection, CursorDragScrollOptions, DragEndEvent, DragGestureEvent, DragMoveEvent, DragStartEvent, ElementDimensions, ElementLastScrollDirection, ElementLastScrollDirectionType, ElementRect, ElementScrollState, ElementSignal, ElementSignalValue, ElementSize, EthleteColorThemeNameRegistry, EthleteSurfaceThemeNameRegistry, FaviconOverlay, FileDownloadOptions, FlipAnimationConfig, InjectFn, InjectQueryParamAllConfig, InjectQueryParamConfig, InjectUtilConfig, InjectUtilTransformConfig, IntersectionObserverEntryWithDetails, IsElementVisibleOptions, LabelsDefinition, LabelsSource, LinkConfig, LinkStoreConfig, LogicalSize, MaybeSignal, MetaConfig, MetaTagConfig, NgClassType, NormalizedGameResultType, NormalizedMatchParticipant, NormalizedMatchParticipants, NormalizedMatchScore, NormalizedUnsavedChangesSource, NotificationActionConfig, NotificationClickContext, NotificationClickMessage, NotificationDeliveryPath, NotificationPermissionState, NotificationRef, Notifications, NullableElementDimensions, NumberBreakpointSignal, ObjectUrlHandle, OnThemeColorMap, OpenGraphConfig, OverlayRuntime, OverlayRuntimeAnchoredPosition, OverlayRuntimeAnimationDelegate, OverlayRuntimeAnimationDelegateEnterContext, OverlayRuntimeAnimationDelegateLeaveContext, OverlayRuntimeAutoFocusTarget, OverlayRuntimeCenteredPosition, OverlayRuntimeCloseEvent, OverlayRuntimeCloseGuard, OverlayRuntimeCloseSource, OverlayRuntimeComponentBase, OverlayRuntimeElements, OverlayRuntimeGlobalPosition, OverlayRuntimeGlobalPositionAlignment, OverlayRuntimeMountConfig, OverlayRuntimePositionStrategy, OverlayRuntimeRef, OverlayRuntimeRole, OverlayRuntimeShiftOptions, OverlayRuntimeState, OverlayViewportInset, OverlayViewportReservation, ProviderDefinition, ProviderDefinitionOptions, RegisteredColorThemeName, RegisteredSurfaceThemeName, ResizeEdge, ResizeMoveEvent, ResourceHintsConfig, RobotsConfig, RouterDisableScrollTopConfig, RouterState, ScrollContainerTarget, ScrollItemTarget, ScrollRestorationRestoreConfig, ScrollRestorationScrollElement, ScrollSnapOrigin, ScrollSnapTarget, ScrollToElementOptions, SetupScrollRestorationConfig, ShowNotificationConfig, SignalAnimatedNumberOptions, SignalDeferredLoadingOptions, SignalElementBindingComplexType, SignalElementBindingType, SignalElementChildrenOptions, SignalElementIntersectionOptions, SignalElementScrollStateOptions, SocialMediaConfig, StaticProviderDefinition, StructuredDataConfig, StyleManager, SurfaceColor, SurfaceContextEntry, SurfaceContextSurface, SurfaceContextTracker, SurfaceInteractionColor, SurfaceInteractionColorMap, SurfaceOnInteractionColorMap, SurfaceTheme, SurfaceThemeColor, SurfaceType, SwipeEndEvent, SwipeTracker, SwipeUpdateEvent, SyncSignalOptions, ThemeColor, ThemeColorMap, ThemeHSLColor, ThemeInkColorMap, ThemeRGBColor, ThemeSwatch, TitleConfig, TitlePart, Translatable, TwitterCardConfig, TypedBreakpointSignal, UnsavedChangesAbandonReason, UnsavedChangesConfirmContext, UnsavedChangesConfirmFn, UnsavedChangesGuardRef, UnsavedChangesRegistration, UnsavedChangesSource, UnsavedChangesTabConfig, UnsavedChangesTabLockRef, UnsavedChangesTrackerRef, ValidateAtLeastOneRequiredConfig, Vec2, ViewportConfig };
|