@dereekb/dbx-core 13.4.0 → 13.4.2
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, DestroyRef, input, Directive, computed, signal, Injectable, forwardRef, effect, TemplateRef, ViewContainerRef, Injector, runInInjectionContext, NgModule, InjectionToken, makeEnvironmentProviders, output, model, NgZone, Input, Pipe, LOCALE_ID, viewChild,
|
|
2
|
+
import { inject, DestroyRef, input, Directive, computed, signal, Injectable, forwardRef, effect, TemplateRef, ViewContainerRef, Injector, runInInjectionContext, NgModule, InjectionToken, makeEnvironmentProviders, output, model, NgZone, Input, Pipe, LOCALE_ID, viewChild, ChangeDetectionStrategy, Component, Inject, Optional } from '@angular/core';
|
|
3
3
|
import { SubscriptionObject, LockSet, loadingStateContext, listLoadingStateContext, filterMaybe, LoadingStateType, beginLoading, idleLoadingState, errorResult, successResult, scanCount, workFactory, asObservable, combineLatestFromMapValuesObsFn, emitDelayObs, makeIsModifiedFunctionObservable, returnIfIs, timeoutStartWith, onFalseToTrue, onTrueToFalse, setContainsAllValuesFrom, setContainsNoValueFrom, maybeValueFromObservableOrValue, distinctUntilKeysChange, maybeValueFromObservableOrValueGetter, switchMapToDefault, asObservableFromGetter, FilterSource, FilterSourceConnector, FilterSourceInstance, FilterMap, skipAllInitialMaybe, switchMapObject } from '@dereekb/rxjs';
|
|
4
|
-
import { getValueFromGetter, DestroyFunctionObject, isNotFalse, isDefinedAndNotFalse, BooleanStringKeyArrayUtility, reduceBooleansWithOrFn, asGetter, toReadableError, hasValueOrNotEmpty, isGetter, asArray, setIncludes, isAllowed, maybeSet, iterableToSet, expandTreeFunction, flattenTreeToArrayFunction, expandFlattenTreeFunction, mailToUrlString, telUrlString, mergeObjects, KeyValueTypleValueFilter, filterMaybeArrayValues, defaultForwardFunctionFactory, cutString, dollarAmountString, objectHasKey, objectHasKeys, mergeArrays, flattenArrayOrValueArray, promiseReference, DataIsExpiredError, DataDoesNotExistError, hasNonNullValue, unixDateTimeSecondsNumberForNow, isThrottled, splitJoinRemainder, StorageObjectUtility, SHARED_MEMORY_STORAGE } from '@dereekb/util';
|
|
4
|
+
import { getValueFromGetter, DestroyFunctionObject, isNotFalse, isDefinedAndNotFalse, BooleanStringKeyArrayUtility, reduceBooleansWithOrFn, asGetter, toReadableError, hasValueOrNotEmpty, isGetter, asArray, setIncludes, isAllowed, maybeSet, iterableToSet, expandTreeFunction, flattenTreeToArrayFunction, expandFlattenTreeFunction, mailToUrlString, telUrlString, mergeObjects, KeyValueTypleValueFilter, filterMaybeArrayValues, defaultForwardFunctionFactory, MINUTES_IN_DAY, MINUTES_IN_HOUR, millisecondsToMinutes, cutString, dollarAmountString, objectHasKey, objectHasKeys, safeEqualityComparatorFunction, mergeArrays, flattenArrayOrValueArray, promiseReference, DataIsExpiredError, DataDoesNotExistError, hasNonNullValue, unixDateTimeSecondsNumberForNow, isThrottled, splitJoinRemainder, StorageObjectUtility, SHARED_MEMORY_STORAGE } from '@dereekb/util';
|
|
5
5
|
import { switchMap, first, distinctUntilChanged, filter, EMPTY, debounce, interval, throttle, exhaustMap, mergeMap, map, shareReplay, combineLatest, startWith, of, delay, BehaviorSubject, tap, combineLatestWith, catchError, withLatestFrom, firstValueFrom, takeUntil, Subject, Observable } from 'rxjs';
|
|
6
6
|
import { toObservable, outputToObservable, toSignal } from '@angular/core/rxjs-interop';
|
|
7
7
|
import { ComponentStore } from '@ngrx/component-store';
|
|
@@ -27,6 +27,9 @@ import { formatDate } from '@angular/common';
|
|
|
27
27
|
* @example
|
|
28
28
|
* // Clean up a destroy function directly:
|
|
29
29
|
* clean(() => resource.release());
|
|
30
|
+
*
|
|
31
|
+
* @param input - The Destroyable object or destroy function to register for cleanup.
|
|
32
|
+
* @returns The same input, for chaining.
|
|
30
33
|
*/
|
|
31
34
|
function clean(input) {
|
|
32
35
|
const destroyRef = inject(DestroyRef);
|
|
@@ -51,6 +54,9 @@ function clean(input) {
|
|
|
51
54
|
* @example
|
|
52
55
|
* // Complete a ReplaySubject when the component is destroyed:
|
|
53
56
|
* readonly events$ = completeOnDestroy(new ReplaySubject<Event>(1));
|
|
57
|
+
*
|
|
58
|
+
* @param input - The Subject to register for completion on destroy.
|
|
59
|
+
* @returns The same input, for chaining.
|
|
54
60
|
*/
|
|
55
61
|
function completeOnDestroy(input) {
|
|
56
62
|
clean(() => input.complete());
|
|
@@ -70,6 +76,9 @@ function completeOnDestroy(input) {
|
|
|
70
76
|
* // Or create first, then set the subscription later:
|
|
71
77
|
* readonly _sub = cleanSubscription();
|
|
72
78
|
* this._sub.subscription = obs$.subscribe(handler);
|
|
79
|
+
*
|
|
80
|
+
* @param sub - Optional subscription or getter to wrap.
|
|
81
|
+
* @returns A SubscriptionObject that is automatically destroyed when the context is destroyed.
|
|
73
82
|
*/
|
|
74
83
|
function cleanSubscription(sub) {
|
|
75
84
|
const subscription = getValueFromGetter(sub);
|
|
@@ -83,7 +92,8 @@ function cleanSubscription(sub) {
|
|
|
83
92
|
*
|
|
84
93
|
* Must be run within an Angular injection context.
|
|
85
94
|
*
|
|
86
|
-
* @param config Optional configuration for destruction behavior and callbacks.
|
|
95
|
+
* @param config - Optional configuration for destruction behavior and callbacks.
|
|
96
|
+
* @returns A CleanLockSet that is automatically destroyed when the context is destroyed.
|
|
87
97
|
*
|
|
88
98
|
* @example
|
|
89
99
|
* // Create a simple lockset:
|
|
@@ -150,6 +160,9 @@ function cleanWithLockSet(lockSet, onDestroy) {
|
|
|
150
160
|
* // Create first, then set the subscription later:
|
|
151
161
|
* readonly _sub = cleanSubscriptionWithLockSet({ lockSet: this.lockSet });
|
|
152
162
|
* this._sub.subscription = obs$.subscribe(handler);
|
|
163
|
+
*
|
|
164
|
+
* @param input - Configuration specifying the lock set and optional initial subscription.
|
|
165
|
+
* @returns A SubscriptionObject that is destroyed when the context is destroyed and the lock set unlocks.
|
|
153
166
|
*/
|
|
154
167
|
function cleanSubscriptionWithLockSet(input) {
|
|
155
168
|
const subscription = getValueFromGetter(input.sub);
|
|
@@ -171,6 +184,9 @@ function cleanSubscriptionWithLockSet(input) {
|
|
|
171
184
|
* // Create empty, then set the observable source later:
|
|
172
185
|
* readonly context = cleanLoadingContext<MyData>();
|
|
173
186
|
* this.context.obs = this.data$;
|
|
187
|
+
*
|
|
188
|
+
* @param input - Optional loading state context input configuration.
|
|
189
|
+
* @returns A mutable loading state context that is automatically destroyed on cleanup.
|
|
174
190
|
*/
|
|
175
191
|
function cleanLoadingContext(input) {
|
|
176
192
|
return clean(loadingStateContext(input));
|
|
@@ -188,6 +204,9 @@ function cleanLoadingContext(input) {
|
|
|
188
204
|
* // Create empty, then set the observable source later:
|
|
189
205
|
* readonly listContext = cleanListLoadingContext<MyItem>();
|
|
190
206
|
* this.listContext.obs = this.items$;
|
|
207
|
+
*
|
|
208
|
+
* @param input - Optional list loading state context input configuration.
|
|
209
|
+
* @returns A mutable list loading state context that is automatically destroyed on cleanup.
|
|
191
210
|
*/
|
|
192
211
|
function cleanListLoadingContext(input) {
|
|
193
212
|
return clean(listLoadingStateContext(input));
|
|
@@ -206,6 +225,9 @@ function cleanListLoadingContext(input) {
|
|
|
206
225
|
* // Create first, then set the destroy function later:
|
|
207
226
|
* readonly _destroy = cleanDestroy();
|
|
208
227
|
* this._destroy.setDestroyFunction(() => resource.release());
|
|
228
|
+
*
|
|
229
|
+
* @param input - Optional destroy function to wrap.
|
|
230
|
+
* @returns A DestroyFunctionObject that will be automatically destroyed when the context is destroyed.
|
|
209
231
|
*/
|
|
210
232
|
function cleanDestroy(input) {
|
|
211
233
|
const destroyFunction = new DestroyFunctionObject(input);
|
|
@@ -462,6 +484,7 @@ class DbxActionAutoModifyDirective {
|
|
|
462
484
|
source = inject((DbxActionContextStoreSourceInstance), { host: true });
|
|
463
485
|
autoModifyEnabled = input(true, { ...(ngDevMode ? { debugName: "autoModifyEnabled" } : {}), alias: 'dbxActionAutoModify', transform: isNotFalse });
|
|
464
486
|
markAsModified$ = toObservable(this.autoModifyEnabled).pipe(distinctUntilChanged(), switchMap((x) => {
|
|
487
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
465
488
|
let obs;
|
|
466
489
|
if (x) {
|
|
467
490
|
obs = this.source.isModified$.pipe(filter((x) => !x));
|
|
@@ -734,7 +757,9 @@ function isIdleActionState(actionState) {
|
|
|
734
757
|
case DbxActionState.REJECTED:
|
|
735
758
|
case DbxActionState.RESOLVED:
|
|
736
759
|
return true;
|
|
737
|
-
|
|
760
|
+
case DbxActionState.TRIGGERED:
|
|
761
|
+
case DbxActionState.VALUE_READY:
|
|
762
|
+
case DbxActionState.WORKING:
|
|
738
763
|
return false;
|
|
739
764
|
}
|
|
740
765
|
}
|
|
@@ -760,7 +785,9 @@ function loadingStateTypeForActionState(actionState) {
|
|
|
760
785
|
case DbxActionState.DISABLED:
|
|
761
786
|
loadingStateType = LoadingStateType.IDLE;
|
|
762
787
|
break;
|
|
763
|
-
|
|
788
|
+
case DbxActionState.TRIGGERED:
|
|
789
|
+
case DbxActionState.VALUE_READY:
|
|
790
|
+
case DbxActionState.WORKING:
|
|
764
791
|
loadingStateType = LoadingStateType.LOADING;
|
|
765
792
|
break;
|
|
766
793
|
}
|
|
@@ -893,7 +920,9 @@ function loadingStateForActionContextState(state) {
|
|
|
893
920
|
case DbxActionState.DISABLED:
|
|
894
921
|
loadingState = idleLoadingState();
|
|
895
922
|
break;
|
|
896
|
-
|
|
923
|
+
case DbxActionState.TRIGGERED:
|
|
924
|
+
case DbxActionState.VALUE_READY:
|
|
925
|
+
case DbxActionState.WORKING:
|
|
897
926
|
loadingState = beginLoading(state.workProgress != null ? { loadingProgress: state.workProgress } : undefined);
|
|
898
927
|
break;
|
|
899
928
|
}
|
|
@@ -1062,7 +1091,7 @@ class ActionContextStore extends ComponentStore {
|
|
|
1062
1091
|
*
|
|
1063
1092
|
* Updates every state update instead of when the value changes.
|
|
1064
1093
|
*/
|
|
1065
|
-
isModifiedAndCanTriggerUpdates$ = this.state$.pipe(map((x) => actionContextIsModifiedAndCanTrigger(x), shareReplay(1))
|
|
1094
|
+
isModifiedAndCanTriggerUpdates$ = this.state$.pipe(map((x) => actionContextIsModifiedAndCanTrigger(x)), shareReplay(1));
|
|
1066
1095
|
/**
|
|
1067
1096
|
* Whether or not it can be triggered and modified.
|
|
1068
1097
|
*/
|
|
@@ -1148,6 +1177,7 @@ class ActionContextStore extends ComponentStore {
|
|
|
1148
1177
|
map((x) => x[0]), shareReplay(1));
|
|
1149
1178
|
}
|
|
1150
1179
|
// MARK: Cleanup
|
|
1180
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
1151
1181
|
ngOnDestroy() {
|
|
1152
1182
|
// do not call super.destroy here, to keep the component store from destroying itself.
|
|
1153
1183
|
// the lockset is configured to cleanup the component store.
|
|
@@ -1236,6 +1266,7 @@ class DbxActionContextBaseSource {
|
|
|
1236
1266
|
}
|
|
1237
1267
|
/**
|
|
1238
1268
|
* Triggers the context and then readies the value.
|
|
1269
|
+
*
|
|
1239
1270
|
* @param value
|
|
1240
1271
|
*/
|
|
1241
1272
|
triggerWithValue(value) {
|
|
@@ -2127,6 +2158,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2127
2158
|
* Useful for Angular directive inputs where the attribute can be applied without a value
|
|
2128
2159
|
* (e.g., `<div myDirective>` passes `''`), and you want to treat that as "not provided".
|
|
2129
2160
|
*
|
|
2161
|
+
* @param value - The input value to transform.
|
|
2162
|
+
* @returns The original value, or `undefined` if the value is an empty string.
|
|
2163
|
+
*
|
|
2130
2164
|
* @example
|
|
2131
2165
|
* ```typescript
|
|
2132
2166
|
* @Directive({ selector: '[appHighlight]' })
|
|
@@ -3145,8 +3179,7 @@ function enableIsLoggedInHook(transitionService, config) {
|
|
|
3145
3179
|
const isSecureCriteria = {
|
|
3146
3180
|
entering: (state) => {
|
|
3147
3181
|
const data = state?.data;
|
|
3148
|
-
|
|
3149
|
-
return match;
|
|
3182
|
+
return Boolean(data?.requiredLogIn);
|
|
3150
3183
|
}
|
|
3151
3184
|
};
|
|
3152
3185
|
const assertIsLoggedIn = makeAuthTransitionHook({
|
|
@@ -3179,8 +3212,7 @@ function enableHasAuthRoleHook(transitionService, config) {
|
|
|
3179
3212
|
const isSecureCriteria = {
|
|
3180
3213
|
entering: (state) => {
|
|
3181
3214
|
const data = state?.data;
|
|
3182
|
-
|
|
3183
|
-
return match;
|
|
3215
|
+
return Boolean(data?.authRoles);
|
|
3184
3216
|
}
|
|
3185
3217
|
};
|
|
3186
3218
|
const assertHasAuthRole = makeAuthTransitionHook({
|
|
@@ -3227,10 +3259,10 @@ function hasAuthRoleDecisionPipe(stateData) {
|
|
|
3227
3259
|
});
|
|
3228
3260
|
let mapFn;
|
|
3229
3261
|
if (authRolesMode === 'any') {
|
|
3230
|
-
mapFn = map((x) => authRoleConfigs.
|
|
3262
|
+
mapFn = map((x) => authRoleConfigs.some((y) => setIncludes(x, y.requiredRoles, y.authRolesMode))); // find the first match
|
|
3231
3263
|
}
|
|
3232
3264
|
else {
|
|
3233
|
-
mapFn = map((x) => authRoleConfigs.
|
|
3265
|
+
mapFn = map((x) => !authRoleConfigs.some((y) => !setIncludes(x, y.requiredRoles, y.authRolesMode))); // find the first failed match
|
|
3234
3266
|
}
|
|
3235
3267
|
return mapFn;
|
|
3236
3268
|
}
|
|
@@ -3254,8 +3286,7 @@ function enableHasAuthStateHook(transitionService, config) {
|
|
|
3254
3286
|
const isSecureCriteria = {
|
|
3255
3287
|
entering: (state) => {
|
|
3256
3288
|
const data = state?.data;
|
|
3257
|
-
|
|
3258
|
-
return match;
|
|
3289
|
+
return Boolean(data?.authStates);
|
|
3259
3290
|
}
|
|
3260
3291
|
};
|
|
3261
3292
|
const assertHasAuthState = makeAuthTransitionHook({
|
|
@@ -3345,7 +3376,7 @@ var index$3 = /*#__PURE__*/Object.freeze({
|
|
|
3345
3376
|
/**
|
|
3346
3377
|
* The feature key for these items/reducers.
|
|
3347
3378
|
*/
|
|
3348
|
-
const
|
|
3379
|
+
const DBX_APP_CONTEXT_STATE_FEATURE_KEY = 'data';
|
|
3349
3380
|
const initialState$1 = {
|
|
3350
3381
|
state: DBX_INIT_APP_CONTEXT_STATE
|
|
3351
3382
|
};
|
|
@@ -3358,13 +3389,17 @@ on(setState, (_, { state }) => ({ state })));
|
|
|
3358
3389
|
/**
|
|
3359
3390
|
* Global feature key for our app.
|
|
3360
3391
|
*/
|
|
3361
|
-
const
|
|
3392
|
+
const FEATURE_KEY$1 = 'app.context';
|
|
3362
3393
|
/**
|
|
3363
3394
|
* Reducers mapping for the DbxAppContextFeatureState
|
|
3395
|
+
*
|
|
3396
|
+
* @param state - The current feature state, or undefined for initialization.
|
|
3397
|
+
* @param action - The dispatched action to reduce.
|
|
3398
|
+
* @returns The updated feature state.
|
|
3364
3399
|
*/
|
|
3365
3400
|
function reducers$1(state, action) {
|
|
3366
3401
|
return combineReducers({
|
|
3367
|
-
[
|
|
3402
|
+
[DBX_APP_CONTEXT_STATE_FEATURE_KEY]: reducer$1
|
|
3368
3403
|
})(state, action);
|
|
3369
3404
|
}
|
|
3370
3405
|
/**
|
|
@@ -3372,15 +3407,15 @@ function reducers$1(state, action) {
|
|
|
3372
3407
|
*
|
|
3373
3408
|
* Used by createSelector() to retrieve more specific data from the DbxAppContextFeatureState.
|
|
3374
3409
|
*/
|
|
3375
|
-
const selectAppContextFeature = createFeatureSelector(
|
|
3410
|
+
const selectAppContextFeature = createFeatureSelector(FEATURE_KEY$1);
|
|
3376
3411
|
/**
|
|
3377
3412
|
* Selector to retrieve the state value from our DbxAppContextStateData in our DbxAppContextFeatureState.
|
|
3378
3413
|
*/
|
|
3379
|
-
const selectDbxAppContextState = createSelector(selectAppContextFeature, (featureState) => featureState[
|
|
3414
|
+
const selectDbxAppContextState = createSelector(selectAppContextFeature, (featureState) => featureState[DBX_APP_CONTEXT_STATE_FEATURE_KEY].state);
|
|
3380
3415
|
|
|
3381
3416
|
var index$2 = /*#__PURE__*/Object.freeze({
|
|
3382
3417
|
__proto__: null,
|
|
3383
|
-
|
|
3418
|
+
FEATURE_KEY: FEATURE_KEY$1,
|
|
3384
3419
|
reducers: reducers$1,
|
|
3385
3420
|
selectAppContextFeature: selectAppContextFeature,
|
|
3386
3421
|
selectDbxAppContextState: selectDbxAppContextState
|
|
@@ -3535,7 +3570,7 @@ var index$1 = /*#__PURE__*/Object.freeze({
|
|
|
3535
3570
|
/**
|
|
3536
3571
|
* NgRx feature key for the auth user sub-state within the auth feature.
|
|
3537
3572
|
*/
|
|
3538
|
-
const
|
|
3573
|
+
const DBX_APP_AUTH_USER_FEATURE_KEY = 'user';
|
|
3539
3574
|
/**
|
|
3540
3575
|
* Initial state for the auth user reducer.
|
|
3541
3576
|
*
|
|
@@ -3548,14 +3583,14 @@ const initialState = {
|
|
|
3548
3583
|
userState: 'none',
|
|
3549
3584
|
userRoles: []
|
|
3550
3585
|
};
|
|
3551
|
-
const reducer = createReducer(initialState, on(loggedOut, () => ({ ...initialState })), on(setUserIdentifier, (state, { id: userId }) => ({ ...state, userId })), on(setUserIsOnboarded, (state, { isOnboarded }) => ({ ...state, isOnboarded })), on(setUserState, (state, { state: userState }) => ({ ...state, userState })), on(setUserRoles, (state, { roles: userRoles }) => ({ ...state, userRoles:
|
|
3586
|
+
const reducer = createReducer(initialState, on(loggedOut, () => ({ ...initialState })), on(setUserIdentifier, (state, { id: userId }) => ({ ...state, userId })), on(setUserIsOnboarded, (state, { isOnboarded }) => ({ ...state, isOnboarded })), on(setUserState, (state, { state: userState }) => ({ ...state, userState })), on(setUserRoles, (state, { roles: userRoles }) => ({ ...state, userRoles: [...userRoles] })));
|
|
3552
3587
|
|
|
3553
3588
|
/**
|
|
3554
3589
|
* NgRx feature key used to register the auth feature state in the global store.
|
|
3555
3590
|
*
|
|
3556
3591
|
* The auth state is registered under `'app.auth'` in the root NgRx state tree.
|
|
3557
3592
|
*/
|
|
3558
|
-
const
|
|
3593
|
+
const FEATURE_KEY = 'app.auth';
|
|
3559
3594
|
/**
|
|
3560
3595
|
* Combined reducer function for the auth feature state.
|
|
3561
3596
|
*
|
|
@@ -3568,13 +3603,13 @@ const featureKey = 'app.auth';
|
|
|
3568
3603
|
*/
|
|
3569
3604
|
function reducers(state, action) {
|
|
3570
3605
|
return combineReducers({
|
|
3571
|
-
[
|
|
3606
|
+
[DBX_APP_AUTH_USER_FEATURE_KEY]: reducer
|
|
3572
3607
|
})(state, action);
|
|
3573
3608
|
}
|
|
3574
3609
|
/**
|
|
3575
3610
|
* NgRx feature selector that retrieves the entire {@link DbxAppAuthFeatureState} from the global store.
|
|
3576
3611
|
*/
|
|
3577
|
-
const selectAppAuthFeature = createFeatureSelector(
|
|
3612
|
+
const selectAppAuthFeature = createFeatureSelector(FEATURE_KEY);
|
|
3578
3613
|
/**
|
|
3579
3614
|
* NgRx selector that retrieves the {@link DbxAppAuthStateUser} from the auth feature state.
|
|
3580
3615
|
*
|
|
@@ -3582,11 +3617,11 @@ const selectAppAuthFeature = createFeatureSelector(featureKey);
|
|
|
3582
3617
|
*
|
|
3583
3618
|
* @see {@link DbxAppAuthStateService.authStateUser$} for the observable wrapper.
|
|
3584
3619
|
*/
|
|
3585
|
-
const selectDbxAppAuthUser = createSelector(selectAppAuthFeature, (featureState) => featureState[
|
|
3620
|
+
const selectDbxAppAuthUser = createSelector(selectAppAuthFeature, (featureState) => featureState[DBX_APP_AUTH_USER_FEATURE_KEY]);
|
|
3586
3621
|
|
|
3587
3622
|
var index = /*#__PURE__*/Object.freeze({
|
|
3588
3623
|
__proto__: null,
|
|
3589
|
-
|
|
3624
|
+
FEATURE_KEY: FEATURE_KEY,
|
|
3590
3625
|
reducers: reducers,
|
|
3591
3626
|
selectAppAuthFeature: selectAppAuthFeature,
|
|
3592
3627
|
selectDbxAppAuthUser: selectDbxAppAuthUser
|
|
@@ -3722,9 +3757,13 @@ class DbxAppAuthRouterService {
|
|
|
3722
3757
|
dbxAppAuthRoutes = inject(DbxAppAuthRoutes);
|
|
3723
3758
|
_isAuthRouterEffectsEnabled = new BehaviorSubject(true);
|
|
3724
3759
|
_ignoredRoutes = new BehaviorSubject(new Set());
|
|
3725
|
-
/**
|
|
3760
|
+
/**
|
|
3761
|
+
* Observable of whether auth router effects are currently enabled.
|
|
3762
|
+
*/
|
|
3726
3763
|
isAuthRouterEffectsEnabled$ = this._isAuthRouterEffectsEnabled.asObservable();
|
|
3727
|
-
/**
|
|
3764
|
+
/**
|
|
3765
|
+
* Observable of the set of route refs that are excluded from auth redirect effects.
|
|
3766
|
+
*/
|
|
3728
3767
|
ignoredRoutes$ = this._ignoredRoutes.asObservable();
|
|
3729
3768
|
/**
|
|
3730
3769
|
* Observable that emits `true` when the current route is in the ignored set.
|
|
@@ -3749,6 +3788,8 @@ class DbxAppAuthRouterService {
|
|
|
3749
3788
|
// MARK: Effects
|
|
3750
3789
|
/**
|
|
3751
3790
|
* Whether or not DbxAppAuthRouterEffects are enabled.
|
|
3791
|
+
*
|
|
3792
|
+
* @returns Whether auth router effects are currently enabled.
|
|
3752
3793
|
*/
|
|
3753
3794
|
get isAuthRouterEffectsEnabled() {
|
|
3754
3795
|
return this._isAuthRouterEffectsEnabled.value;
|
|
@@ -3763,6 +3804,8 @@ class DbxAppAuthRouterService {
|
|
|
3763
3804
|
*
|
|
3764
3805
|
* Uses hierarchical matching — adding a parent route (e.g., `'/app/oauth'`)
|
|
3765
3806
|
* will also ignore all child routes (e.g., `'/app/oauth/login'`).
|
|
3807
|
+
*
|
|
3808
|
+
* @param ref - The route ref to add to the ignored set.
|
|
3766
3809
|
*/
|
|
3767
3810
|
addIgnoredRoute(ref) {
|
|
3768
3811
|
const current = this._ignoredRoutes.value;
|
|
@@ -3772,6 +3815,8 @@ class DbxAppAuthRouterService {
|
|
|
3772
3815
|
}
|
|
3773
3816
|
/**
|
|
3774
3817
|
* Removes a route from the ignored set.
|
|
3818
|
+
*
|
|
3819
|
+
* @param ref - The route ref to remove from the ignored set.
|
|
3775
3820
|
*/
|
|
3776
3821
|
removeIgnoredRoute(ref) {
|
|
3777
3822
|
const current = this._ignoredRoutes.value;
|
|
@@ -3781,6 +3826,8 @@ class DbxAppAuthRouterService {
|
|
|
3781
3826
|
}
|
|
3782
3827
|
/**
|
|
3783
3828
|
* Returns `true` if the current route matches any of the ignored routes.
|
|
3829
|
+
*
|
|
3830
|
+
* @returns Whether the current route is in the ignored set.
|
|
3784
3831
|
*/
|
|
3785
3832
|
get isCurrentRouteIgnoredByAuthEffects() {
|
|
3786
3833
|
return this._checkCurrentRouteIgnored(this._ignoredRoutes.value);
|
|
@@ -4043,23 +4090,37 @@ class DbxAppAuthEffects {
|
|
|
4043
4090
|
actions$ = inject(Actions);
|
|
4044
4091
|
store = inject((Store));
|
|
4045
4092
|
// MARK: Auth
|
|
4046
|
-
/**
|
|
4093
|
+
/**
|
|
4094
|
+
* Dispatches {@link DbxAppAuthActions.loggedIn} when the auth service emits a login event.
|
|
4095
|
+
*/
|
|
4047
4096
|
emitLoggedIn = createEffect(() => this.dbxAuthService.onLogIn$.pipe(map(() => loggedIn())));
|
|
4048
|
-
/**
|
|
4097
|
+
/**
|
|
4098
|
+
* Dispatches {@link DbxAppAuthActions.loggedOut} when the auth service emits a logout event.
|
|
4099
|
+
*/
|
|
4049
4100
|
emitLoggedOut = createEffect(() => this.dbxAuthService.onLogOut$.pipe(map(() => loggedOut())));
|
|
4050
|
-
/**
|
|
4101
|
+
/**
|
|
4102
|
+
* Forwards the {@link DbxAppAuthActions.logout} command to {@link DbxAuthService.logOut}.
|
|
4103
|
+
*/
|
|
4051
4104
|
forwardLogoutToAuthService = createEffect(() => this.actions$.pipe(ofType(logout), tap(() => {
|
|
4052
4105
|
// Perform the logout
|
|
4053
|
-
this.dbxAuthService.logOut();
|
|
4106
|
+
void this.dbxAuthService.logOut();
|
|
4054
4107
|
})), { dispatch: false });
|
|
4055
4108
|
// MARK: User
|
|
4056
|
-
/**
|
|
4109
|
+
/**
|
|
4110
|
+
* Syncs the user identifier from the auth service into the NgRx store.
|
|
4111
|
+
*/
|
|
4057
4112
|
setUserIdentifier = createEffect(() => this.dbxAuthService.userIdentifier$.pipe(map((id) => setUserIdentifier({ id }))));
|
|
4058
|
-
/**
|
|
4113
|
+
/**
|
|
4114
|
+
* Syncs the user's {@link AuthUserState} from the auth service into the NgRx store.
|
|
4115
|
+
*/
|
|
4059
4116
|
setUserState = createEffect(() => this.dbxAuthService.authUserState$.pipe(map((state) => setUserState({ state }))));
|
|
4060
|
-
/**
|
|
4061
|
-
|
|
4062
|
-
|
|
4117
|
+
/**
|
|
4118
|
+
* Syncs the user's auth roles from the auth service into the NgRx store.
|
|
4119
|
+
*/
|
|
4120
|
+
setUserRoles = createEffect(() => this.dbxAuthService.authRoles$.pipe(map((roles) => setUserRoles({ roles: [...(roles ?? [])] }))));
|
|
4121
|
+
/**
|
|
4122
|
+
* Syncs the user's onboarding status from the auth service into the NgRx store.
|
|
4123
|
+
*/
|
|
4063
4124
|
setUserIsOnboarded = createEffect(() => this.dbxAuthService.isOnboarded$.pipe(map((isOnboarded) => setUserIsOnboarded({ isOnboarded }))));
|
|
4064
4125
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxAppAuthEffects, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4065
4126
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxAppAuthEffects });
|
|
@@ -4083,7 +4144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4083
4144
|
* @see {@link fromDbxAppAuth}
|
|
4084
4145
|
*/
|
|
4085
4146
|
function provideDbxAppAuthState() {
|
|
4086
|
-
return makeEnvironmentProviders([provideState(
|
|
4147
|
+
return makeEnvironmentProviders([provideState(FEATURE_KEY, reducers), provideEffects(DbxAppAuthEffects)]);
|
|
4087
4148
|
}
|
|
4088
4149
|
|
|
4089
4150
|
/**
|
|
@@ -4248,9 +4309,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4248
4309
|
* @see {@link fromDbxAppAuth.selectDbxAppAuthUser}
|
|
4249
4310
|
*/
|
|
4250
4311
|
class DbxAppAuthStateService {
|
|
4251
|
-
/**
|
|
4312
|
+
/**
|
|
4313
|
+
* NgRx store instance typed to the full auth state.
|
|
4314
|
+
*/
|
|
4252
4315
|
store = inject((Store));
|
|
4253
|
-
/**
|
|
4316
|
+
/**
|
|
4317
|
+
* Observable of the current {@link DbxAppAuthStateUser} from the NgRx store.
|
|
4318
|
+
*/
|
|
4254
4319
|
authStateUser$ = this.store.select(selectDbxAppAuthUser);
|
|
4255
4320
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxAppAuthStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4256
4321
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxAppAuthStateService, providedIn: 'root' });
|
|
@@ -4277,6 +4342,7 @@ class DbxButton {
|
|
|
4277
4342
|
* Creates Angular providers that register a {@link DbxButton} implementation for DI.
|
|
4278
4343
|
*
|
|
4279
4344
|
* @param sourceType - The concrete button directive or component class to provide.
|
|
4345
|
+
* @returns An array of Angular providers for the button.
|
|
4280
4346
|
*
|
|
4281
4347
|
* @example
|
|
4282
4348
|
* ```typescript
|
|
@@ -4405,7 +4471,7 @@ class DbxButtonSegueDirective {
|
|
|
4405
4471
|
cleanSubscription(() => this.dbxButton.clicked$.subscribe(() => {
|
|
4406
4472
|
const segueRef = this.segueRef();
|
|
4407
4473
|
if (segueRef) {
|
|
4408
|
-
this.dbxRouterService.go(segueRef);
|
|
4474
|
+
void this.dbxRouterService.go(segueRef);
|
|
4409
4475
|
}
|
|
4410
4476
|
}));
|
|
4411
4477
|
}
|
|
@@ -4498,6 +4564,8 @@ class AbstractDbxButtonDirective {
|
|
|
4498
4564
|
}
|
|
4499
4565
|
/**
|
|
4500
4566
|
* Sets the button interceptor. If any interceptor is already set, it is replaced.
|
|
4567
|
+
*
|
|
4568
|
+
* @param interceptor - The interceptor to set on the button.
|
|
4501
4569
|
*/
|
|
4502
4570
|
setButtonInterceptor(interceptor) {
|
|
4503
4571
|
this._buttonInterceptor.next(interceptor);
|
|
@@ -4700,7 +4768,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4700
4768
|
* @returns EnvironmentProviders
|
|
4701
4769
|
*/
|
|
4702
4770
|
function provideDbxAppContextState() {
|
|
4703
|
-
return makeEnvironmentProviders([provideState(
|
|
4771
|
+
return makeEnvironmentProviders([provideState(FEATURE_KEY$1, reducers$1)]);
|
|
4704
4772
|
}
|
|
4705
4773
|
|
|
4706
4774
|
/**
|
|
@@ -4754,6 +4822,8 @@ class DbxAppEnviromentService {
|
|
|
4754
4822
|
}
|
|
4755
4823
|
/**
|
|
4756
4824
|
* Returns the environment, typed as a specific type.
|
|
4825
|
+
*
|
|
4826
|
+
* @returns The environment cast to the specified type.
|
|
4757
4827
|
*/
|
|
4758
4828
|
getEnvironment() {
|
|
4759
4829
|
return this.environment;
|
|
@@ -4769,6 +4839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4769
4839
|
* Registers {@link DbxAppEnviroment} and {@link DbxAppEnviromentService} as environment-level providers.
|
|
4770
4840
|
*
|
|
4771
4841
|
* @param environment - The concrete environment configuration to provide.
|
|
4842
|
+
* @returns The environment providers for the application environment.
|
|
4772
4843
|
*
|
|
4773
4844
|
* @example
|
|
4774
4845
|
* ```typescript
|
|
@@ -4925,15 +4996,25 @@ function provideDbxAnchor(sourceType) {
|
|
|
4925
4996
|
* @see {@link anchorTypeForAnchor} for anchor type resolution logic
|
|
4926
4997
|
*/
|
|
4927
4998
|
class AbstractDbxAnchorDirective {
|
|
4928
|
-
/**
|
|
4999
|
+
/**
|
|
5000
|
+
* Model input for the segue ref or router link to navigate to.
|
|
5001
|
+
*/
|
|
4929
5002
|
ref = model(...(ngDevMode ? [undefined, { debugName: "ref" }] : []));
|
|
4930
|
-
/**
|
|
5003
|
+
/**
|
|
5004
|
+
* Model input for the full anchor configuration object.
|
|
5005
|
+
*/
|
|
4931
5006
|
anchor = model(...(ngDevMode ? [undefined, { debugName: "anchor" }] : []));
|
|
4932
|
-
/**
|
|
5007
|
+
/**
|
|
5008
|
+
* Model input for externally controlling the disabled state.
|
|
5009
|
+
*/
|
|
4933
5010
|
disabled = model(...(ngDevMode ? [undefined, { debugName: "disabled" }] : []));
|
|
4934
|
-
/**
|
|
5011
|
+
/**
|
|
5012
|
+
* Model input for externally controlling the selected state.
|
|
5013
|
+
*/
|
|
4935
5014
|
selected = model(...(ngDevMode ? [undefined, { debugName: "selected" }] : []));
|
|
4936
|
-
/**
|
|
5015
|
+
/**
|
|
5016
|
+
* Computed anchor that merges the `ref` input with the `anchor` input, preferring `ref` when set.
|
|
5017
|
+
*/
|
|
4937
5018
|
anchorSignal = computed(() => {
|
|
4938
5019
|
const ref = this.ref();
|
|
4939
5020
|
const anchor = this.anchor();
|
|
@@ -4943,46 +5024,72 @@ class AbstractDbxAnchorDirective {
|
|
|
4943
5024
|
}
|
|
4944
5025
|
return result;
|
|
4945
5026
|
}, ...(ngDevMode ? [{ debugName: "anchorSignal" }] : []));
|
|
4946
|
-
/**
|
|
5027
|
+
/**
|
|
5028
|
+
* Computed selected state that combines the `selected` input with the anchor's own `selected` property.
|
|
5029
|
+
*/
|
|
4947
5030
|
selectedSignal = computed(() => {
|
|
4948
5031
|
const selected = this.selected();
|
|
4949
5032
|
const anchor = this.anchorSignal();
|
|
4950
5033
|
return selected || anchor?.selected;
|
|
4951
5034
|
}, ...(ngDevMode ? [{ debugName: "selectedSignal" }] : []));
|
|
4952
|
-
/**
|
|
5035
|
+
/**
|
|
5036
|
+
* Computed {@link ClickableAnchorType} derived from the current anchor and disabled state.
|
|
5037
|
+
*/
|
|
4953
5038
|
typeSignal = computed(() => {
|
|
4954
5039
|
const anchor = this.anchorSignal();
|
|
4955
5040
|
const disabled = this.disabled();
|
|
4956
5041
|
return anchorTypeForAnchor(anchor, disabled);
|
|
4957
5042
|
}, ...(ngDevMode ? [{ debugName: "typeSignal" }] : []));
|
|
4958
|
-
/**
|
|
5043
|
+
/**
|
|
5044
|
+
* Computed disabled state that combines the `disabled` input with the anchor's own `disabled` property.
|
|
5045
|
+
*/
|
|
4959
5046
|
disabledSignal = computed(() => {
|
|
4960
5047
|
const disabled = this.disabled();
|
|
4961
5048
|
const anchor = this.anchorSignal();
|
|
4962
5049
|
return disabled || anchor?.disabled;
|
|
4963
5050
|
}, ...(ngDevMode ? [{ debugName: "disabledSignal" }] : []));
|
|
4964
|
-
/**
|
|
5051
|
+
/**
|
|
5052
|
+
* Computed URL extracted from the current anchor's `url` property.
|
|
5053
|
+
*/
|
|
4965
5054
|
urlSignal = computed(() => this.anchorSignal()?.url, ...(ngDevMode ? [{ debugName: "urlSignal" }] : []));
|
|
4966
|
-
/**
|
|
5055
|
+
/**
|
|
5056
|
+
* Computed target (e.g., `_blank`) extracted from the current anchor's `target` property.
|
|
5057
|
+
*/
|
|
4967
5058
|
targetSignal = computed(() => this.anchorSignal()?.target, ...(ngDevMode ? [{ debugName: "targetSignal" }] : []));
|
|
4968
5059
|
anchor$ = toObservable(this.anchorSignal);
|
|
4969
5060
|
disabled$ = toObservable(this.disabledSignal);
|
|
4970
5061
|
selected$ = toObservable(this.selectedSignal);
|
|
4971
5062
|
type$ = toObservable(this.typeSignal);
|
|
4972
5063
|
// MARK: Accessors
|
|
4973
|
-
/**
|
|
5064
|
+
/**
|
|
5065
|
+
* Sets the segue ref or router link for this anchor.
|
|
5066
|
+
*
|
|
5067
|
+
* @param ref - The segue ref or router link to set.
|
|
5068
|
+
*/
|
|
4974
5069
|
setRef(ref) {
|
|
4975
5070
|
this.ref.set(ref);
|
|
4976
5071
|
}
|
|
4977
|
-
/**
|
|
5072
|
+
/**
|
|
5073
|
+
* Sets the full anchor configuration object.
|
|
5074
|
+
*
|
|
5075
|
+
* @param anchor - The anchor configuration to set.
|
|
5076
|
+
*/
|
|
4978
5077
|
setAnchor(anchor) {
|
|
4979
5078
|
this.anchor.set(anchor);
|
|
4980
5079
|
}
|
|
4981
|
-
/**
|
|
5080
|
+
/**
|
|
5081
|
+
* Sets the external disabled state override.
|
|
5082
|
+
*
|
|
5083
|
+
* @param disabled - Whether the anchor should be disabled.
|
|
5084
|
+
*/
|
|
4982
5085
|
setDisabled(disabled) {
|
|
4983
5086
|
this.disabled.set(disabled);
|
|
4984
5087
|
}
|
|
4985
|
-
/**
|
|
5088
|
+
/**
|
|
5089
|
+
* Sets the external selected state override.
|
|
5090
|
+
*
|
|
5091
|
+
* @param selected - Whether the anchor should be selected.
|
|
5092
|
+
*/
|
|
4986
5093
|
setSelected(selected) {
|
|
4987
5094
|
this.selected.set(selected);
|
|
4988
5095
|
}
|
|
@@ -5116,6 +5223,7 @@ const DEFAULT_REDIRECT_FOR_USER_IDENTIFIER_PARAM_KEY = 'uid';
|
|
|
5116
5223
|
* missing or matches the placeholder value.
|
|
5117
5224
|
*
|
|
5118
5225
|
* @param input - Configuration specifying the route criteria, access control logic, and optional parameter overrides.
|
|
5226
|
+
* @returns The result of registering the transition hook.
|
|
5119
5227
|
*
|
|
5120
5228
|
* @see {@link RedirectForUserIdentifierParamHookInput}
|
|
5121
5229
|
* @see {@link redirectForIdentifierParamHook}
|
|
@@ -5223,13 +5331,13 @@ class DbxAngularRouterService {
|
|
|
5223
5331
|
}));
|
|
5224
5332
|
return this.go(segueUpdate);
|
|
5225
5333
|
}
|
|
5226
|
-
isActive(
|
|
5334
|
+
isActive(_segueRef) {
|
|
5227
5335
|
return false; // TODO!
|
|
5228
5336
|
}
|
|
5229
|
-
isActiveExactly(
|
|
5337
|
+
isActiveExactly(_segueRef) {
|
|
5230
5338
|
return false; // TODO!
|
|
5231
5339
|
}
|
|
5232
|
-
comparePrecision(
|
|
5340
|
+
comparePrecision(_a, _b) {
|
|
5233
5341
|
return 0; // TODO!
|
|
5234
5342
|
}
|
|
5235
5343
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxAngularRouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -5388,8 +5496,7 @@ class DbxUIRouterService {
|
|
|
5388
5496
|
}
|
|
5389
5497
|
}
|
|
5390
5498
|
const targetRef = ref.startsWith('.') ? `^${ref}` : ref;
|
|
5391
|
-
|
|
5392
|
-
return active;
|
|
5499
|
+
return exactly ? this.state.is(targetRef, refParams) : this.state.includes(targetRef, refParams);
|
|
5393
5500
|
}
|
|
5394
5501
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxUIRouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5395
5502
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxUIRouterService });
|
|
@@ -5508,8 +5615,7 @@ function isLatestSuccessfulRoute(config) {
|
|
|
5508
5615
|
const routes = asArray(config.routes);
|
|
5509
5616
|
const checkRoute = activeExactly ? (route) => dbxRouterService.isActiveExactly(route) : (route) => dbxRouterService.isActive(route);
|
|
5510
5617
|
return successTransition(dbxRouterTransitionService.transitions$).pipe(startWith(undefined), map(() => {
|
|
5511
|
-
|
|
5512
|
-
return isActive;
|
|
5618
|
+
return routes.some(checkRoute);
|
|
5513
5619
|
}), distinctUntilChanged(), shareReplay(1));
|
|
5514
5620
|
}
|
|
5515
5621
|
|
|
@@ -5534,9 +5640,13 @@ function isLatestSuccessfulRoute(config) {
|
|
|
5534
5640
|
*/
|
|
5535
5641
|
class AbstractTransitionDirective {
|
|
5536
5642
|
dbxRouterTransitionService = inject(DbxRouterTransitionService);
|
|
5537
|
-
/**
|
|
5643
|
+
/**
|
|
5644
|
+
* Observable that emits on each successful router transition.
|
|
5645
|
+
*/
|
|
5538
5646
|
transitionSuccess$ = successTransition(this.dbxRouterTransitionService.transitions$);
|
|
5539
|
-
/**
|
|
5647
|
+
/**
|
|
5648
|
+
* Observable that emits immediately on initialization and on each subsequent successful transition.
|
|
5649
|
+
*/
|
|
5540
5650
|
initAndUpdateOnTransitionSuccess$ = this.transitionSuccess$.pipe(startWith(undefined));
|
|
5541
5651
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AbstractTransitionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5542
5652
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.0", type: AbstractTransitionDirective, isStandalone: true, ngImport: i0 });
|
|
@@ -5631,8 +5741,8 @@ function onRouterTransitionSuccessEvent(events$) {
|
|
|
5631
5741
|
/**
|
|
5632
5742
|
* Creates an observable that returns true when the route for the input segueRef is active.
|
|
5633
5743
|
*
|
|
5634
|
-
* @param
|
|
5635
|
-
* @
|
|
5744
|
+
* @param config - Configuration specifying the router service, segue ref, and matching options.
|
|
5745
|
+
* @returns An observable that emits `true` when the segue ref's route is active.
|
|
5636
5746
|
*/
|
|
5637
5747
|
function isSegueRefActiveOnTransitionSuccess(config) {
|
|
5638
5748
|
const isActiveFn = isSegueRefActiveFunction(config);
|
|
@@ -5641,8 +5751,8 @@ function isSegueRefActiveOnTransitionSuccess(config) {
|
|
|
5641
5751
|
/**
|
|
5642
5752
|
* Operator function that maps the input segueRef to a boolean depending on the current route state.
|
|
5643
5753
|
*
|
|
5644
|
-
* @param
|
|
5645
|
-
* @
|
|
5754
|
+
* @param config - Configuration specifying the router service and default behavior for null refs.
|
|
5755
|
+
* @returns An RxJS operator that maps a segue ref to whether it is currently active.
|
|
5646
5756
|
*/
|
|
5647
5757
|
function isSegueRefActive(config) {
|
|
5648
5758
|
const { defaultIfNull = false } = config;
|
|
@@ -5695,7 +5805,7 @@ function dbxRouteParamReaderInstance(dbxRouterService, defaultParamKey, defaultV
|
|
|
5695
5805
|
setParamValue(value) {
|
|
5696
5806
|
combineLatest([paramKey$, asObservableFromGetter(value)])
|
|
5697
5807
|
.pipe(first())
|
|
5698
|
-
.subscribe(([paramKey, value]) => dbxRouterService.updateParams({ [paramKey]: value }));
|
|
5808
|
+
.subscribe(([paramKey, value]) => void dbxRouterService.updateParams({ [paramKey]: value }));
|
|
5699
5809
|
}
|
|
5700
5810
|
};
|
|
5701
5811
|
return result;
|
|
@@ -6343,6 +6453,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6343
6453
|
*/
|
|
6344
6454
|
class DateFormatFromToPipe {
|
|
6345
6455
|
locale = inject(LOCALE_ID);
|
|
6456
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
6346
6457
|
static formatFromTo(input, format, minutes, locale) {
|
|
6347
6458
|
if (input) {
|
|
6348
6459
|
const date = toJsDate(input);
|
|
@@ -6669,30 +6780,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6669
6780
|
* <!-- Output: "~5 hours" -->
|
|
6670
6781
|
*
|
|
6671
6782
|
* <span>{{ 5000 | minutesString }}</span>
|
|
6672
|
-
* <!-- Output: "~
|
|
6783
|
+
* <!-- Output: "~4 days" -->
|
|
6673
6784
|
* ```
|
|
6674
6785
|
*/
|
|
6675
6786
|
class MinutesStringPipe {
|
|
6676
6787
|
transform(input) {
|
|
6677
6788
|
const minutes = Number(input);
|
|
6789
|
+
let result;
|
|
6678
6790
|
if (input != null && !isNaN(minutes)) {
|
|
6679
|
-
if (minutes >
|
|
6680
|
-
const unrounded = minutes /
|
|
6791
|
+
if (minutes > MINUTES_IN_DAY * 2.5) {
|
|
6792
|
+
const unrounded = minutes / MINUTES_IN_DAY;
|
|
6681
6793
|
const days = Math.ceil(unrounded);
|
|
6682
|
-
|
|
6794
|
+
result = (unrounded !== days ? '~' : '') + days + ' days';
|
|
6683
6795
|
}
|
|
6684
|
-
else if (minutes >
|
|
6685
|
-
const unrounded = minutes /
|
|
6796
|
+
else if (minutes > MINUTES_IN_HOUR * 3) {
|
|
6797
|
+
const unrounded = minutes / MINUTES_IN_HOUR;
|
|
6686
6798
|
const hours = Math.ceil(unrounded);
|
|
6687
|
-
|
|
6799
|
+
result = (unrounded !== hours ? '~' : '') + hours + ' hours';
|
|
6688
6800
|
}
|
|
6689
6801
|
else {
|
|
6690
|
-
|
|
6802
|
+
result = minutes + ' minutes';
|
|
6691
6803
|
}
|
|
6692
6804
|
}
|
|
6693
|
-
|
|
6694
|
-
return undefined;
|
|
6695
|
-
}
|
|
6805
|
+
return result;
|
|
6696
6806
|
}
|
|
6697
6807
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: MinutesStringPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
6698
6808
|
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: MinutesStringPipe, isStandalone: true, name: "minutesString", pure: false });
|
|
@@ -6794,7 +6904,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6794
6904
|
}] });
|
|
6795
6905
|
|
|
6796
6906
|
/**
|
|
6797
|
-
* Converts a duration in milliseconds to whole minutes
|
|
6907
|
+
* Converts a duration in milliseconds to whole minutes using {@link millisecondsToMinutes}.
|
|
6798
6908
|
*
|
|
6799
6909
|
* Returns the original value (0 or falsy) if the input is falsy.
|
|
6800
6910
|
*
|
|
@@ -6809,10 +6919,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6809
6919
|
*/
|
|
6810
6920
|
class ToMinutesPipe {
|
|
6811
6921
|
transform(milliseconds) {
|
|
6922
|
+
let result = milliseconds;
|
|
6812
6923
|
if (milliseconds) {
|
|
6813
|
-
|
|
6924
|
+
result = millisecondsToMinutes(milliseconds);
|
|
6814
6925
|
}
|
|
6815
|
-
return
|
|
6926
|
+
return result;
|
|
6816
6927
|
}
|
|
6817
6928
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ToMinutesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
6818
6929
|
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: ToMinutesPipe, isStandalone: true, name: "toMinutes" });
|
|
@@ -6847,7 +6958,7 @@ class PrettyJsonPipe {
|
|
|
6847
6958
|
try {
|
|
6848
6959
|
json = JSON.stringify(input, null, spacing);
|
|
6849
6960
|
}
|
|
6850
|
-
catch
|
|
6961
|
+
catch {
|
|
6851
6962
|
console.error('prettyjson pipe failed parsing input: ', input);
|
|
6852
6963
|
json = 'ERROR';
|
|
6853
6964
|
}
|
|
@@ -6912,7 +7023,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6912
7023
|
* ```
|
|
6913
7024
|
*/
|
|
6914
7025
|
class GetValuePipe {
|
|
7026
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6915
7027
|
transform(input, args) {
|
|
7028
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6916
7029
|
return getValueFromGetter(input, args);
|
|
6917
7030
|
}
|
|
6918
7031
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: GetValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
@@ -6938,7 +7051,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
6938
7051
|
* ```
|
|
6939
7052
|
*/
|
|
6940
7053
|
class GetValueOncePipe {
|
|
7054
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6941
7055
|
transform(input, args) {
|
|
7056
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6942
7057
|
return getValueFromGetter(input, args);
|
|
6943
7058
|
}
|
|
6944
7059
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: GetValueOncePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
@@ -7015,6 +7130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
7015
7130
|
* Creates Angular providers that register a {@link FilterSource} implementation for DI.
|
|
7016
7131
|
*
|
|
7017
7132
|
* @param sourceType - The concrete filter source class to provide.
|
|
7133
|
+
* @returns An array of Angular providers for the filter source.
|
|
7018
7134
|
*
|
|
7019
7135
|
* @example
|
|
7020
7136
|
* ```typescript
|
|
@@ -7037,6 +7153,7 @@ function provideFilterSource(sourceType) {
|
|
|
7037
7153
|
* Creates Angular providers that register both a {@link FilterSourceConnector} and {@link FilterSource} for DI.
|
|
7038
7154
|
*
|
|
7039
7155
|
* @param sourceType - The concrete connector class to provide.
|
|
7156
|
+
* @returns An array of Angular providers for the filter source connector.
|
|
7040
7157
|
*/
|
|
7041
7158
|
function provideFilterSourceConnector(sourceType) {
|
|
7042
7159
|
return [
|
|
@@ -7068,6 +7185,7 @@ class FilterSourceDirective {
|
|
|
7068
7185
|
*
|
|
7069
7186
|
* @param sourceType - The concrete directive class.
|
|
7070
7187
|
* @param defaultFilterFactory - Optional factory to provide an initial filter value via DI.
|
|
7188
|
+
* @returns An array of Angular providers for the filter source directive.
|
|
7071
7189
|
*
|
|
7072
7190
|
* @example
|
|
7073
7191
|
* ```typescript
|
|
@@ -7330,12 +7448,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
7330
7448
|
|
|
7331
7449
|
/**
|
|
7332
7450
|
* Type guard that checks if an object is a {@link ClickableFilterPreset}.
|
|
7451
|
+
*
|
|
7452
|
+
* @param preset - The object to check.
|
|
7453
|
+
* @returns `true` if the object has a `presetValue` property.
|
|
7333
7454
|
*/
|
|
7334
7455
|
function isClickableFilterPreset(preset) {
|
|
7335
7456
|
return objectHasKey(preset, 'presetValue');
|
|
7336
7457
|
}
|
|
7337
7458
|
/**
|
|
7338
7459
|
* Type guard that checks if an object is a {@link ClickablePartialFilterPreset}.
|
|
7460
|
+
*
|
|
7461
|
+
* @param preset - The object to check.
|
|
7462
|
+
* @returns `true` if the object has `partialPresetValue` and `isActive` properties.
|
|
7339
7463
|
*/
|
|
7340
7464
|
function isClickablePartialFilterPreset(preset) {
|
|
7341
7465
|
return objectHasKeys(preset, ['partialPresetValue', 'isActive']);
|
|
@@ -7391,14 +7515,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
7391
7515
|
* ```
|
|
7392
7516
|
*/
|
|
7393
7517
|
const DBX_INJECTION_COMPONENT_DATA = new InjectionToken('DbxInjectionComponentConfigData');
|
|
7518
|
+
/**
|
|
7519
|
+
* Compares two {@link DbxInjectionComponentConfig} values for structural equality, safely handling nullish values.
|
|
7520
|
+
*
|
|
7521
|
+
* Compares `componentClass`, `data`, `init`, and `injector` by reference. Does NOT compare
|
|
7522
|
+
* `providers` or `ngModuleRef`, as provider arrays typically change on every list data update
|
|
7523
|
+
* (e.g., with new `DBX_VALUE_LIST_VIEW_ITEM` values) without requiring component recreation.
|
|
7524
|
+
*
|
|
7525
|
+
* When both values are nullish, uses strict equality (`null === null` is `true`,
|
|
7526
|
+
* `null === undefined` is `false`). The comparator is only invoked when both are non-nullish.
|
|
7527
|
+
*/
|
|
7528
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7529
|
+
const dbxInjectionComponentConfigIsEqual = safeEqualityComparatorFunction((a, b) => a.componentClass === b.componentClass && a.data === b.data && a.init === b.init && a.injector === b.injector);
|
|
7394
7530
|
/**
|
|
7395
7531
|
* Merges multiple partial {@link DbxInjectionComponentConfig} objects into a single configuration.
|
|
7396
7532
|
*
|
|
7397
|
-
* Provider arrays are concatenated
|
|
7398
|
-
*
|
|
7533
|
+
* Provider arrays are concatenated so that all providers from all configs are preserved.
|
|
7534
|
+
* All other properties are merged with later values taking precedence.
|
|
7399
7535
|
*
|
|
7400
|
-
* @
|
|
7401
|
-
* @param configs - An array of partial configs (may contain `undefined`/`null` entries which are filtered out).
|
|
7536
|
+
* @param configs - An array of partial configs to merge. May contain `undefined`/`null` entries which are filtered out.
|
|
7402
7537
|
* @returns A single merged partial configuration.
|
|
7403
7538
|
*/
|
|
7404
7539
|
function mergeDbxInjectionComponentConfigs(configs) {
|
|
@@ -7457,7 +7592,7 @@ class DbxInjectionInstance {
|
|
|
7457
7592
|
_content = new BehaviorSubject(undefined);
|
|
7458
7593
|
_componentRef = new BehaviorSubject(undefined);
|
|
7459
7594
|
_injector;
|
|
7460
|
-
config$ = this._config.pipe(maybeValueFromObservableOrValueGetter(), distinctUntilChanged(), shareReplay(1));
|
|
7595
|
+
config$ = this._config.pipe(maybeValueFromObservableOrValueGetter(), distinctUntilChanged(dbxInjectionComponentConfigIsEqual), shareReplay(1));
|
|
7461
7596
|
template$ = this._template.pipe(maybeValueFromObservableOrValueGetter(), distinctUntilChanged(), shareReplay(1));
|
|
7462
7597
|
content$ = this._content.pipe(filterMaybe(), distinctUntilChanged(), shareReplay(1));
|
|
7463
7598
|
get config() {
|
|
@@ -7663,7 +7798,7 @@ class DbxInjectionComponent extends AbstractDbxInjectionDirective {
|
|
|
7663
7798
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxInjectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7664
7799
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.0", type: DbxInjectionComponent, isStandalone: true, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
7665
7800
|
<ng-template #content></ng-template>
|
|
7666
|
-
`, isInline: true });
|
|
7801
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7667
7802
|
}
|
|
7668
7803
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: DbxInjectionComponent, decorators: [{
|
|
7669
7804
|
type: Component,
|
|
@@ -7673,6 +7808,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
7673
7808
|
<ng-template #content></ng-template>
|
|
7674
7809
|
`,
|
|
7675
7810
|
imports: [],
|
|
7811
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7676
7812
|
standalone: true
|
|
7677
7813
|
}]
|
|
7678
7814
|
}], propDecorators: { content: [{ type: i0.ViewChild, args: ['content', { ...{ read: ViewContainerRef }, isSignal: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }] } });
|
|
@@ -7832,6 +7968,9 @@ class DbxInjectionContextDirective {
|
|
|
7832
7968
|
}
|
|
7833
7969
|
/**
|
|
7834
7970
|
* {@inheritDoc DbxInjectionContext.showContext}
|
|
7971
|
+
*
|
|
7972
|
+
* @param config - The injection context configuration describing the component and its usage.
|
|
7973
|
+
* @returns A promise that resolves with the output of the injected component's usage.
|
|
7835
7974
|
*/
|
|
7836
7975
|
async showContext(config) {
|
|
7837
7976
|
// clear the current context before showing something new.
|
|
@@ -7841,9 +7980,11 @@ class DbxInjectionContextDirective {
|
|
|
7841
7980
|
let error;
|
|
7842
7981
|
// wait for the promise to resolve and use to finish using that instance.
|
|
7843
7982
|
try {
|
|
7983
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
7844
7984
|
promiseRef = promiseReference(async (resolve, reject) => {
|
|
7845
7985
|
const injectionConfig = {
|
|
7846
7986
|
...config.config,
|
|
7987
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
7847
7988
|
init: async (instance) => {
|
|
7848
7989
|
// init if available in the base config.
|
|
7849
7990
|
if (config.config.init) {
|
|
@@ -7883,6 +8024,8 @@ class DbxInjectionContextDirective {
|
|
|
7883
8024
|
}
|
|
7884
8025
|
/**
|
|
7885
8026
|
* {@inheritDoc DbxInjectionContext.resetContext}
|
|
8027
|
+
*
|
|
8028
|
+
* @returns `true` if an active context was cleared, `false` otherwise.
|
|
7886
8029
|
*/
|
|
7887
8030
|
resetContext() {
|
|
7888
8031
|
let clearedValue = false;
|
|
@@ -7961,12 +8104,17 @@ class AbstractForwardDbxInjectionContextDirective {
|
|
|
7961
8104
|
// MARK: DbxInjectionContext
|
|
7962
8105
|
/**
|
|
7963
8106
|
* {@inheritDoc DbxInjectionContext.showContext}
|
|
8107
|
+
*
|
|
8108
|
+
* @param config - The injection context configuration to forward to the host context.
|
|
8109
|
+
* @returns A promise that resolves with the output of the injected component's usage.
|
|
7964
8110
|
*/
|
|
7965
8111
|
showContext(config) {
|
|
7966
8112
|
return this.dbxInjectionContext.showContext(config);
|
|
7967
8113
|
}
|
|
7968
8114
|
/**
|
|
7969
8115
|
* {@inheritDoc DbxInjectionContext.resetContext}
|
|
8116
|
+
*
|
|
8117
|
+
* @returns `true` if an active context was cleared, `false` otherwise.
|
|
7970
8118
|
*/
|
|
7971
8119
|
resetContext() {
|
|
7972
8120
|
return this.dbxInjectionContext.resetContext();
|
|
@@ -8004,6 +8152,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
8004
8152
|
* });
|
|
8005
8153
|
* ```
|
|
8006
8154
|
*/
|
|
8155
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8007
8156
|
function switchMapDbxInjectionComponentConfig(defaultConfig) {
|
|
8008
8157
|
const defaultAsGetter = asGetter(defaultConfig);
|
|
8009
8158
|
return switchMapObject({
|
|
@@ -8179,6 +8328,8 @@ class WrapperSimpleStorageAccessorDelegate {
|
|
|
8179
8328
|
/**
|
|
8180
8329
|
* Validates that a storage key prefix is non-empty and does not contain the prefix splitter character.
|
|
8181
8330
|
*
|
|
8331
|
+
* @param prefix - The prefix string to validate.
|
|
8332
|
+
* @param prefixSplitter - The splitter string that separates the prefix from the key.
|
|
8182
8333
|
* @throws {Error} If the prefix is invalid or the splitter is empty.
|
|
8183
8334
|
*/
|
|
8184
8335
|
function assertValidStorageKeyPrefix(prefix, prefixSplitter) {
|
|
@@ -8191,9 +8342,13 @@ function assertValidStorageKeyPrefix(prefix, prefixSplitter) {
|
|
|
8191
8342
|
}
|
|
8192
8343
|
/**
|
|
8193
8344
|
* Checks whether a storage key prefix is valid (non-empty and does not contain the splitter).
|
|
8345
|
+
*
|
|
8346
|
+
* @param prefix - The prefix string to validate.
|
|
8347
|
+
* @param prefixSpltter - The splitter string that separates the prefix from the key.
|
|
8348
|
+
* @returns `true` if the prefix is valid.
|
|
8194
8349
|
*/
|
|
8195
8350
|
function isValidStorageKeyPrefix(prefix, prefixSpltter) {
|
|
8196
|
-
return Boolean(prefix
|
|
8351
|
+
return Boolean(prefix?.indexOf(prefixSpltter) === -1);
|
|
8197
8352
|
}
|
|
8198
8353
|
/**
|
|
8199
8354
|
* Full-featured {@link StorageAccessor} that adds key namespacing, JSON serialization,
|
|
@@ -8496,7 +8651,7 @@ class FullLocalStorageObject {
|
|
|
8496
8651
|
this._localStorage.removeItem(test);
|
|
8497
8652
|
return true;
|
|
8498
8653
|
}
|
|
8499
|
-
catch
|
|
8654
|
+
catch {
|
|
8500
8655
|
return false;
|
|
8501
8656
|
}
|
|
8502
8657
|
}
|
|
@@ -8550,6 +8705,8 @@ class MemoryStorageObject extends FullLocalStorageObject {
|
|
|
8550
8705
|
* Creates the default {@link FullStorageObject}, preferring `localStorage` and
|
|
8551
8706
|
* falling back to an in-memory store if `localStorage` is unavailable.
|
|
8552
8707
|
*
|
|
8708
|
+
* @returns A FullStorageObject backed by localStorage or an in-memory fallback.
|
|
8709
|
+
*
|
|
8553
8710
|
* @example
|
|
8554
8711
|
* ```typescript
|
|
8555
8712
|
* const storage = defaultStorageObjectFactory();
|
|
@@ -8568,6 +8725,8 @@ function defaultStorageObjectFactory() {
|
|
|
8568
8725
|
*
|
|
8569
8726
|
* Call in your application config to enable storage-based services throughout the app.
|
|
8570
8727
|
*
|
|
8728
|
+
* @returns The environment providers for storage services.
|
|
8729
|
+
*
|
|
8571
8730
|
* @example
|
|
8572
8731
|
* ```typescript
|
|
8573
8732
|
* export const appConfig: ApplicationConfig = {
|
|
@@ -8604,6 +8763,7 @@ function provideDbxStorage() {
|
|
|
8604
8763
|
*
|
|
8605
8764
|
* @param cdRef - The change detector to trigger. If `null`/`undefined`, the operator is a no-op.
|
|
8606
8765
|
* @param timeout - Delay in milliseconds before calling `detectChanges`.
|
|
8766
|
+
* @returns An RxJS operator that triggers change detection on each emission.
|
|
8607
8767
|
*
|
|
8608
8768
|
* @example
|
|
8609
8769
|
* ```typescript
|
|
@@ -8611,6 +8771,7 @@ function provideDbxStorage() {
|
|
|
8611
8771
|
* ```
|
|
8612
8772
|
*/
|
|
8613
8773
|
function tapDetectChanges(cdRef, timeout = 0) {
|
|
8774
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8614
8775
|
return cdRef ? tap(() => setTimeout(() => safeDetectChanges(cdRef), timeout)) : tap();
|
|
8615
8776
|
}
|
|
8616
8777
|
/**
|
|
@@ -8621,6 +8782,7 @@ function tapDetectChanges(cdRef, timeout = 0) {
|
|
|
8621
8782
|
* @param cdRef - The change detector to trigger.
|
|
8622
8783
|
*/
|
|
8623
8784
|
function safeDetectChanges(cdRef) {
|
|
8785
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8624
8786
|
safeUseCdRef(cdRef, () => cdRef.detectChanges());
|
|
8625
8787
|
}
|
|
8626
8788
|
/**
|
|
@@ -8633,6 +8795,7 @@ function safeDetectChanges(cdRef) {
|
|
|
8633
8795
|
*
|
|
8634
8796
|
* @param cdRef - The change detector to mark. If `null`/`undefined`, the operator is a no-op.
|
|
8635
8797
|
* @param timeout - Delay in milliseconds before calling `markForCheck`.
|
|
8798
|
+
* @returns An RxJS operator that marks the view for check on each emission.
|
|
8636
8799
|
*
|
|
8637
8800
|
* @example
|
|
8638
8801
|
* ```typescript
|
|
@@ -8640,6 +8803,7 @@ function safeDetectChanges(cdRef) {
|
|
|
8640
8803
|
* ```
|
|
8641
8804
|
*/
|
|
8642
8805
|
function tapSafeMarkForCheck(cdRef, timeout = 0) {
|
|
8806
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8643
8807
|
return cdRef ? tap(() => setTimeout(() => safeMarkForCheck(cdRef), timeout)) : tap();
|
|
8644
8808
|
}
|
|
8645
8809
|
/**
|
|
@@ -8650,6 +8814,7 @@ function tapSafeMarkForCheck(cdRef, timeout = 0) {
|
|
|
8650
8814
|
* @param cdRef - The change detector to mark.
|
|
8651
8815
|
*/
|
|
8652
8816
|
function safeMarkForCheck(cdRef) {
|
|
8817
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8653
8818
|
safeUseCdRef(cdRef, () => cdRef.markForCheck());
|
|
8654
8819
|
}
|
|
8655
8820
|
/**
|
|
@@ -8672,6 +8837,7 @@ function safeUseCdRef(cdRef, use) {
|
|
|
8672
8837
|
* Useful for conditionally showing fallback content when no projection is provided.
|
|
8673
8838
|
*
|
|
8674
8839
|
* @param ref - Reference to the wrapper element around `ng-content`.
|
|
8840
|
+
* @returns `true` if the wrapper element has any child nodes.
|
|
8675
8841
|
*
|
|
8676
8842
|
* @example
|
|
8677
8843
|
* ```typescript
|
|
@@ -8707,5 +8873,5 @@ function checkNgContentWrapperHasContent(ref) {
|
|
|
8707
8873
|
* Generated bundle index. Do not edit.
|
|
8708
8874
|
*/
|
|
8709
8875
|
|
|
8710
|
-
export { ACTION_CONTEXT_STORE_LOCKSET_DESTROY_DELAY_TIME, APP_ACTION_DISABLED_DIRECTIVE_KEY, APP_ACTION_DISABLED_ON_SUCCESS_DIRECTIVE_KEY, APP_ACTION_ENFORCE_MODIFIED_DIRECTIVE_KEY, AbstractDbxActionHandlerDirective, AbstractDbxActionValueGetterDirective, AbstractDbxAnchorDirective, AbstractDbxButtonDirective, AbstractDbxFilterMapInstanceDirective, AbstractDbxFilterMapSourceDirective, AbstractDbxInjectionDirective, AbstractFilterSourceConnectorDirective, AbstractFilterSourceDirective, AbstractForwardDbxInjectionContextDirective, AbstractIfDirective, AbstractTransitionDirective, AbstractTransitionWatcherDirective, ActionContextStore, ActionContextStoreSource, ActionContextStoreSourceMap, AsObservablePipe, CutTextPipe, DBX_ACTION_HANDLER_LOCK_KEY, DBX_APP_APP_CONTEXT_STATE, DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN, DBX_AUTH_APP_CONTEXT_STATE, DBX_INIT_APP_CONTEXT_STATE, DBX_INJECTION_COMPONENT_DATA, DBX_KNOWN_APP_CONTEXT_STATES, DBX_OAUTH_APP_CONTEXT_STATE, DBX_ONBOARD_APP_CONTEXT_STATE, DBX_PUBLIC_APP_CONTEXT_STATE, DBX_ROUTE_MODEL_ID_PARAM_DEFAULT_ID_PARAM_KEY, DBX_ROUTE_MODEL_ID_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_ROUTE_MODEL_ID_PARAM_DEFAULT_USE_PARAM_VALUE, DEFAULT_ACTION_DISABLED_KEY, DEFAULT_ACTION_MAP_WORKING_DISABLED_KEY, DEFAULT_REDIRECT_FOR_IDENTIFIER_PARAM_KEY, DEFAULT_REDIRECT_FOR_IDENTIFIER_PARAM_VALUE, DEFAULT_REDIRECT_FOR_USER_IDENTIFIER_PARAM_KEY, DEFAULT_REDIRECT_FOR_USER_IDENTIFIER_PARAM_VALUE, DEFAULT_STORAGE_ACCESSOR_FACTORY_TOKEN, DEFAULT_STORAGE_OBJECT_TOKEN, DateDayRangePipe, DateDayTimeRangePipe, DateDistancePipe, DateFormatDistancePipe, DateFormatFromToPipe, DateRangeDistancePipe, DateTimeRangeOnlyDistancePipe, DateTimeRangeOnlyPipe, DateTimeRangePipe, DbxActionAutoModifyDirective, DbxActionAutoTriggerDirective, DbxActionButtonDirective, DbxActionButtonTriggerDirective, DbxActionContextBaseSource, DbxActionContextLoggerDirective, DbxActionContextMachine, DbxActionContextMachineAsService, DbxActionContextMapDirective, DbxActionContextStoreSourceInstance, DbxActionDirective, DbxActionDisabledDirective, DbxActionDisabledOnSuccessDirective, DbxActionEnforceModifiedDirective, DbxActionErrorHandlerDirective, DbxActionFromMapDirective, DbxActionHandlerDirective, DbxActionHandlerInstance, DbxActionHandlerValueDirective, DbxActionHasSuccessDirective, DbxActionIdleDirective, DbxActionIsWorkingDirective, DbxActionMapSourceDirective, DbxActionMapWorkingDisableDirective, DbxActionPreSuccessDirective, DbxActionSourceDirective, DbxActionState, DbxActionSuccessHandlerDirective, DbxActionTriggeredDirective, DbxActionValueDirective, DbxActionValueGetterInstance, DbxActionValueStreamDirective, DbxActionValueTriggerDirective, DbxActionWorkInstanceDelegate, DbxAnchor, DbxAngularRouterService, DbxAppAuthRouterEffects, DbxAppAuthRouterService, DbxAppAuthRoutes, DbxAppAuthStateService, DbxAppContextService, DbxAppContextStateDirective, DbxAppEnviroment, DbxAppEnviromentService, DbxAuthHasAnyRoleDirective, DbxAuthHasRolesDirective, DbxAuthNotAnyRoleDirective, DbxAuthService, DbxButton, DbxButtonDirective, DbxButtonSegueDirective, DbxCoreActionModule, DbxCoreAngularRouterSegueModule, DbxCoreButtonModule, DbxCoreFilterModule, DbxFilterConnectSourceDirective, DbxFilterMapDirective, DbxFilterMapSourceConnectorDirective, DbxFilterMapSourceDirective, DbxFilterSourceConnectorDirective, DbxFilterSourceDirective, DbxInjectionArrayComponent, DbxInjectionComponent, DbxInjectionContext, DbxInjectionContextDirective, DbxInjectionInstance, DbxLoadingButtonDirective, DbxRouteModelIdDirective, DbxRouteModelIdDirectiveDelegate, DbxRouteModelIdFromAuthUserIdDirective, DbxRouteModelKeyDirective, DbxRouteModelKeyDirectiveDelegate, DbxRouteParamDefaultRedirectInstance, DbxRouterService, DbxRouterTransitionEventType, DbxRouterTransitionService, DbxUIRouterService, DollarAmountPipe, FILTER_SOURCE_DIRECTIVE_DEFAULT_FILTER_TOKEN, FilterSourceDirective, FullLocalStorageObject, GetValueOncePipe, GetValuePipe, InstantStorageAccessor, LimitedStorageAccessor, LockSetComponentStore, MemoryStorageObject, MinutesStringPipe, NO_AUTH_USER_IDENTIFIER, PrettyJsonPipe, SecondaryActionContextStoreSource, SimpleStorageAccessor, SimpleStorageAccessorFactory, StorageAccessor, StringStorageAccessor, StringifySimpleStorageAccessorConverter, SystemDateToTargetDatePipe, TargetDateToSystemDatePipe, TimeDistanceCountdownPipe, TimeDistancePipe, TimezoneAbbreviationPipe, ToJsDatePipe, ToMinutesPipe, WrapperSimpleStorageAccessorDelegate, actionContextHasNoErrorAndIsModifiedAndCanTrigger, actionContextIsModifiedAndCanTrigger, actionContextStoreSourceMap, actionContextStoreSourceMapReader, actionContextStoreSourcePipe, anchorTypeForAnchor, asSegueRef, asSegueRefString, assertValidStorageKeyPrefix, authRolesSetContainsAllRolesFrom, authRolesSetContainsAnyRoleFrom, authRolesSetContainsNoRolesFrom, authUserIdentifier, canReadyValue, canTriggerAction, canTriggerActionState, checkNgContentWrapperHasContent, clean, cleanDestroy, cleanListLoadingContext, cleanLoadingContext, cleanLockSet, cleanSubscription, cleanSubscriptionWithLockSet, cleanWithLockSet, clickableUrlInNewTab, clickableUrlMailTo, clickableUrlTel, completeOnDestroy, dbxActionWorkProgress, dbxButtonDisplayType, dbxRouteModelIdParamRedirect, dbxRouteModelKeyParamRedirect, dbxRouteParamReaderInstance, defaultStorageObjectFactory, enableHasAuthRoleHook, enableHasAuthStateHook, enableIsLoggedInHook, expandClickableAnchorLinkTree, expandClickableAnchorLinkTreeNode, expandClickableAnchorLinkTrees, filterTransitionEvent, filterTransitionSuccess, flattenExpandedClickableAnchorLinkTree, flattenExpandedClickableAnchorLinkTreeToLinks, fromAllActionContextStoreSourceMapSources, index as fromDbxAppAuth, index$2 as fromDbxAppContext, goWithRouter, hasAuthRoleDecisionPipe, isActionContextDisabled, isActionContextEnabled, isClickableFilterPreset, isClickablePartialFilterPreset, isDisabledActionContextState, isIdleActionState, isLatestSuccessfulRoute, isSegueRef, isSegueRefActive, isSegueRefActiveFunction, isSegueRefActiveOnTransitionSuccess, isValidStorageKeyPrefix, isWorkingActionState, latestSuccessfulRoutes, loadingStateForActionContextState, loadingStateTypeForActionContextState, loadingStateTypeForActionState, loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, makeAuthTransitionHook, makeDbxActionContextSourceReference, mapRefStringObsToSegueRefObs, mergeDbxInjectionComponentConfigs, mergeStaticProviders, newWithInjector, index$1 as onDbxAppAuth, index$3 as onDbxAppContext, onRouterTransitionEventType, onRouterTransitionSuccessEvent, pipeActionStore, provideActionStoreSource, provideDbxAnchor, provideDbxAppAuth, provideDbxAppAuthRouter, provideDbxAppAuthRouterState, provideDbxAppAuthState, provideDbxAppContextState, provideDbxAppEnviroment, provideDbxButton, provideDbxInjectionContext, provideDbxRouteModelIdDirectiveDelegate, provideDbxRouteModelKeyDirectiveDelegate, provideDbxStorage, provideDbxUIRouterService, provideFilterSource, provideFilterSourceConnector, provideFilterSourceDirective, provideSecondaryActionStoreSource, redirectBasedOnAuthUserState, redirectForIdentifierParamHook, redirectForUserIdentifierParamHook, refStringToSegueRef, safeDetectChanges, safeMarkForCheck, safeUseCdRef, successTransition, switchMapDbxInjectionComponentConfig, tapDetectChanges, tapSafeMarkForCheck, transformEmptyStringInputToUndefined, useActionStore };
|
|
8876
|
+
export { ACTION_CONTEXT_STORE_LOCKSET_DESTROY_DELAY_TIME, APP_ACTION_DISABLED_DIRECTIVE_KEY, APP_ACTION_DISABLED_ON_SUCCESS_DIRECTIVE_KEY, APP_ACTION_ENFORCE_MODIFIED_DIRECTIVE_KEY, AbstractDbxActionHandlerDirective, AbstractDbxActionValueGetterDirective, AbstractDbxAnchorDirective, AbstractDbxButtonDirective, AbstractDbxFilterMapInstanceDirective, AbstractDbxFilterMapSourceDirective, AbstractDbxInjectionDirective, AbstractFilterSourceConnectorDirective, AbstractFilterSourceDirective, AbstractForwardDbxInjectionContextDirective, AbstractIfDirective, AbstractTransitionDirective, AbstractTransitionWatcherDirective, ActionContextStore, ActionContextStoreSource, ActionContextStoreSourceMap, AsObservablePipe, CutTextPipe, DBX_ACTION_HANDLER_LOCK_KEY, DBX_APP_APP_CONTEXT_STATE, DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN, DBX_AUTH_APP_CONTEXT_STATE, DBX_INIT_APP_CONTEXT_STATE, DBX_INJECTION_COMPONENT_DATA, DBX_KNOWN_APP_CONTEXT_STATES, DBX_OAUTH_APP_CONTEXT_STATE, DBX_ONBOARD_APP_CONTEXT_STATE, DBX_PUBLIC_APP_CONTEXT_STATE, DBX_ROUTE_MODEL_ID_PARAM_DEFAULT_ID_PARAM_KEY, DBX_ROUTE_MODEL_ID_PARAM_DEFAULT_KEY_PARAM_KEY, DBX_ROUTE_MODEL_ID_PARAM_DEFAULT_USE_PARAM_VALUE, DEFAULT_ACTION_DISABLED_KEY, DEFAULT_ACTION_MAP_WORKING_DISABLED_KEY, DEFAULT_REDIRECT_FOR_IDENTIFIER_PARAM_KEY, DEFAULT_REDIRECT_FOR_IDENTIFIER_PARAM_VALUE, DEFAULT_REDIRECT_FOR_USER_IDENTIFIER_PARAM_KEY, DEFAULT_REDIRECT_FOR_USER_IDENTIFIER_PARAM_VALUE, DEFAULT_STORAGE_ACCESSOR_FACTORY_TOKEN, DEFAULT_STORAGE_OBJECT_TOKEN, DateDayRangePipe, DateDayTimeRangePipe, DateDistancePipe, DateFormatDistancePipe, DateFormatFromToPipe, DateRangeDistancePipe, DateTimeRangeOnlyDistancePipe, DateTimeRangeOnlyPipe, DateTimeRangePipe, DbxActionAutoModifyDirective, DbxActionAutoTriggerDirective, DbxActionButtonDirective, DbxActionButtonTriggerDirective, DbxActionContextBaseSource, DbxActionContextLoggerDirective, DbxActionContextMachine, DbxActionContextMachineAsService, DbxActionContextMapDirective, DbxActionContextStoreSourceInstance, DbxActionDirective, DbxActionDisabledDirective, DbxActionDisabledOnSuccessDirective, DbxActionEnforceModifiedDirective, DbxActionErrorHandlerDirective, DbxActionFromMapDirective, DbxActionHandlerDirective, DbxActionHandlerInstance, DbxActionHandlerValueDirective, DbxActionHasSuccessDirective, DbxActionIdleDirective, DbxActionIsWorkingDirective, DbxActionMapSourceDirective, DbxActionMapWorkingDisableDirective, DbxActionPreSuccessDirective, DbxActionSourceDirective, DbxActionState, DbxActionSuccessHandlerDirective, DbxActionTriggeredDirective, DbxActionValueDirective, DbxActionValueGetterInstance, DbxActionValueStreamDirective, DbxActionValueTriggerDirective, DbxActionWorkInstanceDelegate, DbxAnchor, DbxAngularRouterService, DbxAppAuthRouterEffects, DbxAppAuthRouterService, DbxAppAuthRoutes, DbxAppAuthStateService, DbxAppContextService, DbxAppContextStateDirective, DbxAppEnviroment, DbxAppEnviromentService, DbxAuthHasAnyRoleDirective, DbxAuthHasRolesDirective, DbxAuthNotAnyRoleDirective, DbxAuthService, DbxButton, DbxButtonDirective, DbxButtonSegueDirective, DbxCoreActionModule, DbxCoreAngularRouterSegueModule, DbxCoreButtonModule, DbxCoreFilterModule, DbxFilterConnectSourceDirective, DbxFilterMapDirective, DbxFilterMapSourceConnectorDirective, DbxFilterMapSourceDirective, DbxFilterSourceConnectorDirective, DbxFilterSourceDirective, DbxInjectionArrayComponent, DbxInjectionComponent, DbxInjectionContext, DbxInjectionContextDirective, DbxInjectionInstance, DbxLoadingButtonDirective, DbxRouteModelIdDirective, DbxRouteModelIdDirectiveDelegate, DbxRouteModelIdFromAuthUserIdDirective, DbxRouteModelKeyDirective, DbxRouteModelKeyDirectiveDelegate, DbxRouteParamDefaultRedirectInstance, DbxRouterService, DbxRouterTransitionEventType, DbxRouterTransitionService, DbxUIRouterService, DollarAmountPipe, FILTER_SOURCE_DIRECTIVE_DEFAULT_FILTER_TOKEN, FilterSourceDirective, FullLocalStorageObject, GetValueOncePipe, GetValuePipe, InstantStorageAccessor, LimitedStorageAccessor, LockSetComponentStore, MemoryStorageObject, MinutesStringPipe, NO_AUTH_USER_IDENTIFIER, PrettyJsonPipe, SecondaryActionContextStoreSource, SimpleStorageAccessor, SimpleStorageAccessorFactory, StorageAccessor, StringStorageAccessor, StringifySimpleStorageAccessorConverter, SystemDateToTargetDatePipe, TargetDateToSystemDatePipe, TimeDistanceCountdownPipe, TimeDistancePipe, TimezoneAbbreviationPipe, ToJsDatePipe, ToMinutesPipe, WrapperSimpleStorageAccessorDelegate, actionContextHasNoErrorAndIsModifiedAndCanTrigger, actionContextIsModifiedAndCanTrigger, actionContextStoreSourceMap, actionContextStoreSourceMapReader, actionContextStoreSourcePipe, anchorTypeForAnchor, asSegueRef, asSegueRefString, assertValidStorageKeyPrefix, authRolesSetContainsAllRolesFrom, authRolesSetContainsAnyRoleFrom, authRolesSetContainsNoRolesFrom, authUserIdentifier, canReadyValue, canTriggerAction, canTriggerActionState, checkNgContentWrapperHasContent, clean, cleanDestroy, cleanListLoadingContext, cleanLoadingContext, cleanLockSet, cleanSubscription, cleanSubscriptionWithLockSet, cleanWithLockSet, clickableUrlInNewTab, clickableUrlMailTo, clickableUrlTel, completeOnDestroy, dbxActionWorkProgress, dbxButtonDisplayType, dbxInjectionComponentConfigIsEqual, dbxRouteModelIdParamRedirect, dbxRouteModelKeyParamRedirect, dbxRouteParamReaderInstance, defaultStorageObjectFactory, enableHasAuthRoleHook, enableHasAuthStateHook, enableIsLoggedInHook, expandClickableAnchorLinkTree, expandClickableAnchorLinkTreeNode, expandClickableAnchorLinkTrees, filterTransitionEvent, filterTransitionSuccess, flattenExpandedClickableAnchorLinkTree, flattenExpandedClickableAnchorLinkTreeToLinks, fromAllActionContextStoreSourceMapSources, index as fromDbxAppAuth, index$2 as fromDbxAppContext, goWithRouter, hasAuthRoleDecisionPipe, isActionContextDisabled, isActionContextEnabled, isClickableFilterPreset, isClickablePartialFilterPreset, isDisabledActionContextState, isIdleActionState, isLatestSuccessfulRoute, isSegueRef, isSegueRefActive, isSegueRefActiveFunction, isSegueRefActiveOnTransitionSuccess, isValidStorageKeyPrefix, isWorkingActionState, latestSuccessfulRoutes, loadingStateForActionContextState, loadingStateTypeForActionContextState, loadingStateTypeForActionState, loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, makeAuthTransitionHook, makeDbxActionContextSourceReference, mapRefStringObsToSegueRefObs, mergeDbxInjectionComponentConfigs, mergeStaticProviders, newWithInjector, index$1 as onDbxAppAuth, index$3 as onDbxAppContext, onRouterTransitionEventType, onRouterTransitionSuccessEvent, pipeActionStore, provideActionStoreSource, provideDbxAnchor, provideDbxAppAuth, provideDbxAppAuthRouter, provideDbxAppAuthRouterState, provideDbxAppAuthState, provideDbxAppContextState, provideDbxAppEnviroment, provideDbxButton, provideDbxInjectionContext, provideDbxRouteModelIdDirectiveDelegate, provideDbxRouteModelKeyDirectiveDelegate, provideDbxStorage, provideDbxUIRouterService, provideFilterSource, provideFilterSourceConnector, provideFilterSourceDirective, provideSecondaryActionStoreSource, redirectBasedOnAuthUserState, redirectForIdentifierParamHook, redirectForUserIdentifierParamHook, refStringToSegueRef, safeDetectChanges, safeMarkForCheck, safeUseCdRef, successTransition, switchMapDbxInjectionComponentConfig, tapDetectChanges, tapSafeMarkForCheck, transformEmptyStringInputToUndefined, useActionStore };
|
|
8711
8877
|
//# sourceMappingURL=dereekb-dbx-core.mjs.map
|