@dereekb/dbx-core 2.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/action/action.handler.mjs +3 -125
- package/esm2020/lib/action/action.machine.mjs +8 -7
- package/esm2020/lib/action/action.module.mjs +10 -10
- package/esm2020/lib/action/action.store.mjs +3 -3
- package/esm2020/lib/action/action.store.source.mjs +3 -3
- package/esm2020/lib/action/directive/auto/action.automodify.directive.mjs +4 -4
- package/esm2020/lib/action/directive/auto/action.autotrigger.directive.mjs +7 -6
- package/esm2020/lib/action/directive/context/action.directive.mjs +3 -3
- package/esm2020/lib/action/directive/context/action.source.directive.mjs +3 -3
- package/esm2020/lib/action/directive/debug/action.logger.directive.mjs +3 -3
- package/esm2020/lib/action/directive/map/action.map.directive.mjs +3 -3
- package/esm2020/lib/action/directive/map/action.map.key.directive.mjs +3 -3
- package/esm2020/lib/action/directive/map/action.map.source.directive.mjs +3 -3
- package/esm2020/lib/action/directive/map/action.map.working.disable.directive.mjs +3 -3
- package/esm2020/lib/action/directive/state/action.disabled.directive.mjs +5 -6
- package/esm2020/lib/action/directive/state/action.enforce.modified.directive.mjs +6 -6
- package/esm2020/lib/action/directive/state/action.handler.directive.mjs +10 -9
- package/esm2020/lib/action/directive/state/action.success.directive.mjs +23 -35
- package/esm2020/lib/action/directive/state/action.success.handler.directive.mjs +48 -0
- package/esm2020/lib/action/directive/state/action.value.directive.mjs +8 -8
- package/esm2020/lib/action/directive/state/action.value.stream.directive.mjs +4 -4
- package/esm2020/lib/action/directive/state/action.value.trigger.directive.mjs +73 -0
- package/esm2020/lib/action/directive/state/action.value.trigger.instance.mjs +43 -0
- package/esm2020/lib/action/directive/state/action.working.component.mjs +28 -22
- package/esm2020/lib/action/directive/state/index.mjs +4 -2
- package/esm2020/lib/auth/auth.module.mjs +26 -0
- package/esm2020/lib/auth/auth.role.any.directive.mjs +36 -0
- package/esm2020/lib/auth/auth.role.has.directive.mjs +36 -0
- package/esm2020/lib/auth/auth.state.module.mjs +28 -0
- package/esm2020/lib/auth/auth.state.service.mjs +23 -0
- package/esm2020/lib/auth/auth.user.mjs +11 -0
- package/esm2020/lib/auth/index.mjs +10 -0
- package/esm2020/lib/auth/router/auth.router.mjs +6 -0
- package/esm2020/lib/auth/router/auth.router.module.mjs +26 -0
- package/esm2020/lib/auth/router/auth.router.service.mjs +61 -0
- package/esm2020/lib/auth/router/index.mjs +6 -0
- package/esm2020/lib/auth/router/provider/uirouter/auth.hook.mjs +23 -0
- package/esm2020/lib/auth/router/provider/uirouter/hook.mjs +65 -0
- package/esm2020/lib/auth/router/provider/uirouter/index.mjs +6 -0
- package/esm2020/lib/auth/router/provider/uirouter/redirect.mjs +29 -0
- package/esm2020/lib/auth/router/provider/uirouter/role.hook.mjs +32 -0
- package/esm2020/lib/auth/router/provider/uirouter/state.hook.mjs +53 -0
- package/esm2020/lib/auth/router/state/auth.router.state.module.mjs +32 -0
- package/esm2020/lib/auth/router/state/effect/auth.router.state.effect.mjs +46 -0
- package/esm2020/lib/auth/router/state/effect/index.mjs +2 -0
- package/esm2020/lib/auth/router/state/index.mjs +3 -0
- package/esm2020/lib/auth/service/auth.service.mjs +6 -0
- package/esm2020/lib/auth/service/auth.service.rxjs.mjs +27 -0
- package/esm2020/lib/auth/service/index.mjs +3 -0
- package/esm2020/lib/auth/state/action/auth.action.mjs +14 -0
- package/esm2020/lib/auth/state/action/index.mjs +12 -0
- package/esm2020/lib/auth/state/action/user.action.mjs +18 -0
- package/esm2020/lib/auth/state/effect/auth.effect.mjs +44 -0
- package/esm2020/lib/auth/state/index.mjs +13 -0
- package/esm2020/lib/auth/state/reducer/index.mjs +23 -0
- package/esm2020/lib/auth/state/reducer/user.reducer.mjs +12 -0
- package/esm2020/lib/auth/state/state.mjs +2 -0
- package/esm2020/lib/button/action/action.button.directive.mjs +3 -3
- package/esm2020/lib/button/action/action.button.trigger.directive.mjs +3 -3
- package/esm2020/lib/button/button.directive.mjs +6 -6
- package/esm2020/lib/button/button.loading.directive.mjs +3 -3
- package/esm2020/lib/button/button.mjs +1 -1
- package/esm2020/lib/button/button.module.mjs +4 -4
- package/esm2020/lib/button/router/button.segue.directive.mjs +8 -4
- package/esm2020/lib/context/context.directive.mjs +41 -0
- package/esm2020/lib/context/context.mjs +22 -0
- package/esm2020/lib/context/context.module.mjs +28 -0
- package/esm2020/lib/context/context.service.mjs +29 -0
- package/esm2020/lib/context/index.mjs +6 -0
- package/esm2020/lib/context/state/action/data.action.mjs +10 -0
- package/esm2020/lib/context/state/action/index.mjs +7 -0
- package/esm2020/lib/context/state/effect/index.mjs +38 -0
- package/esm2020/lib/context/state/index.mjs +13 -0
- package/esm2020/lib/context/state/reducer/data.reducer.mjs +16 -0
- package/esm2020/lib/context/state/reducer/index.mjs +25 -0
- package/esm2020/lib/context/state/state.mjs +2 -0
- package/esm2020/lib/filter/action/action.filter.source.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.abstract.connector.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.abstract.source.directive.mjs +4 -4
- package/esm2020/lib/filter/filter.connector.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.map.connector.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.map.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.map.instance.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.map.source.directive.mjs +3 -3
- package/esm2020/lib/filter/filter.module.mjs +4 -4
- package/esm2020/lib/filter/filter.source.directive.mjs +3 -3
- package/esm2020/lib/index.mjs +6 -2
- package/esm2020/lib/injection/index.mjs +9 -0
- package/esm2020/lib/injection/injection.component.mjs +34 -0
- package/esm2020/lib/injection/injection.component.module.mjs +31 -0
- package/esm2020/lib/injection/injection.context.directive.mjs +124 -0
- package/esm2020/lib/injection/injection.context.forward.directive.mjs +30 -0
- package/esm2020/lib/injection/injection.context.mjs +18 -0
- package/esm2020/lib/injection/injection.directive.mjs +33 -0
- package/esm2020/lib/injection/injection.instance.mjs +116 -0
- package/esm2020/lib/injection/injection.mjs +16 -0
- package/esm2020/lib/ngrx/index.mjs +2 -0
- package/esm2020/lib/ngrx/store.lockset.mjs +64 -0
- package/esm2020/lib/pipe/date/date.pipe.module.mjs +4 -4
- package/esm2020/lib/pipe/date/datedistance.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/dateformatdistance.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/datefromtoformat.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/minutesstring.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/timedistance.pipe.mjs +6 -6
- package/esm2020/lib/pipe/date/tojsdate.pipe.mjs +13 -5
- package/esm2020/lib/pipe/date/tominutes.pipe.mjs +3 -3
- package/esm2020/lib/pipe/index.mjs +3 -1
- package/esm2020/lib/pipe/misc/index.mjs +3 -0
- package/esm2020/lib/pipe/misc/misc.pipe.module.mjs +20 -0
- package/esm2020/lib/pipe/misc/prettyjson.pipe.mjs +27 -0
- package/esm2020/lib/pipe/pipe.module.mjs +21 -0
- package/esm2020/lib/router/anchor/anchor.directive.mjs +18 -5
- package/esm2020/lib/router/anchor/anchor.mjs +1 -1
- package/esm2020/lib/router/router/provider/angular/angular.router.service.mjs +8 -5
- package/esm2020/lib/router/router/provider/angular/angular.router.service.module.mjs +4 -4
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.mjs +32 -10
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.module.mjs +4 -4
- package/esm2020/lib/router/router/service/index.mjs +2 -1
- package/esm2020/lib/router/router/service/router.go.mjs +14 -0
- package/esm2020/lib/router/router/service/router.service.mjs +1 -1
- package/esm2020/lib/router/router/transition/transition.directive.mjs +7 -7
- package/esm2020/lib/router/router/transition/transition.watcher.directive.mjs +6 -6
- package/esm2020/lib/router/segue.mjs +17 -2
- package/esm2020/lib/storage/storage.accessor.simple.factory.mjs +3 -3
- package/esm2020/lib/storage/storage.module.mjs +4 -4
- package/esm2020/lib/subscription/subscription.directive.mjs +6 -6
- package/esm2020/lib/util/view.mjs +18 -2
- package/esm2020/lib/view/if.directive.mjs +30 -0
- package/esm2020/lib/view/index.mjs +2 -0
- package/fesm2015/dereekb-dbx-core.mjs +1742 -538
- package/fesm2015/dereekb-dbx-core.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-core.mjs +1748 -544
- package/fesm2020/dereekb-dbx-core.mjs.map +1 -1
- package/lib/action/action.handler.d.ts +4 -72
- package/lib/action/action.module.d.ts +3 -3
- package/lib/action/directive/auto/action.automodify.directive.d.ts +1 -1
- package/lib/action/directive/auto/action.autotrigger.directive.d.ts +3 -3
- package/lib/action/directive/state/action.disabled.directive.d.ts +1 -1
- package/lib/action/directive/state/action.enforce.modified.directive.d.ts +3 -2
- package/lib/action/directive/state/action.success.directive.d.ts +9 -17
- package/lib/action/directive/state/action.success.handler.directive.d.ts +24 -0
- package/lib/action/directive/state/action.value.directive.d.ts +5 -5
- package/lib/action/directive/state/action.value.stream.directive.d.ts +2 -2
- package/lib/action/directive/state/action.value.trigger.directive.d.ts +34 -0
- package/lib/action/directive/state/action.value.trigger.instance.d.ts +34 -0
- package/lib/action/directive/state/action.working.component.d.ts +11 -5
- package/lib/action/directive/state/index.d.ts +3 -1
- package/lib/auth/auth.module.d.ts +8 -0
- package/lib/auth/auth.role.any.directive.d.ts +20 -0
- package/lib/auth/auth.role.has.directive.d.ts +20 -0
- package/lib/auth/auth.state.module.d.ts +8 -0
- package/lib/auth/auth.state.service.d.ts +13 -0
- package/lib/auth/auth.user.d.ts +28 -0
- package/lib/auth/index.d.ts +9 -0
- package/lib/auth/router/auth.router.d.ts +10 -0
- package/lib/auth/router/auth.router.module.d.ts +9 -0
- package/lib/auth/router/auth.router.service.d.ts +38 -0
- package/lib/auth/router/index.d.ts +5 -0
- package/lib/auth/router/provider/uirouter/auth.hook.d.ts +18 -0
- package/lib/auth/router/provider/uirouter/hook.d.ts +46 -0
- package/lib/auth/router/provider/uirouter/index.d.ts +5 -0
- package/lib/auth/router/provider/uirouter/redirect.d.ts +9 -0
- package/lib/auth/router/provider/uirouter/role.hook.d.ts +26 -0
- package/lib/auth/router/provider/uirouter/state.hook.d.ts +31 -0
- package/lib/auth/router/state/auth.router.state.module.d.ts +14 -0
- package/lib/auth/router/state/effect/auth.router.state.effect.d.ts +32 -0
- package/lib/auth/router/state/effect/index.d.ts +1 -0
- package/lib/auth/router/state/index.d.ts +2 -0
- package/lib/auth/service/auth.service.d.ts +46 -0
- package/lib/auth/service/auth.service.rxjs.d.ts +18 -0
- package/lib/auth/service/index.d.ts +2 -0
- package/lib/auth/state/action/auth.action.d.ts +12 -0
- package/lib/auth/state/action/index.d.ts +11 -0
- package/lib/auth/state/action/user.action.d.ts +34 -0
- package/lib/auth/state/effect/auth.effect.d.ts +31 -0
- package/lib/auth/state/index.d.ts +12 -0
- package/lib/auth/state/reducer/index.d.ts +29 -0
- package/lib/auth/state/reducer/user.reducer.d.ts +11 -0
- package/lib/auth/state/state.d.ts +5 -0
- package/lib/button/button.d.ts +3 -3
- package/lib/button/router/button.segue.directive.d.ts +1 -0
- package/lib/context/context.d.ts +39 -0
- package/lib/context/context.directive.d.ts +19 -0
- package/lib/context/context.module.d.ts +8 -0
- package/lib/context/context.service.d.ts +16 -0
- package/lib/context/index.d.ts +5 -0
- package/lib/context/state/action/data.action.d.ts +13 -0
- package/lib/context/state/action/index.d.ts +6 -0
- package/lib/context/state/effect/index.d.ts +39 -0
- package/lib/context/state/index.d.ts +12 -0
- package/lib/context/state/reducer/data.reducer.d.ts +13 -0
- package/lib/context/state/reducer/index.d.ts +34 -0
- package/lib/context/state/state.d.ts +9 -0
- package/lib/filter/filter.abstract.source.directive.d.ts +2 -2
- package/lib/index.d.ts +5 -1
- package/lib/injection/index.d.ts +8 -0
- package/lib/injection/injection.component.d.ts +15 -0
- package/lib/injection/injection.component.module.d.ts +9 -0
- package/lib/injection/injection.context.d.ts +39 -0
- package/lib/injection/injection.context.directive.d.ts +25 -0
- package/lib/injection/injection.context.forward.directive.d.ts +16 -0
- package/lib/{injected/injected.d.ts → injection/injection.d.ts} +4 -4
- package/lib/injection/injection.directive.d.ts +19 -0
- package/lib/{injected/injected.instance.d.ts → injection/injection.instance.d.ts} +8 -8
- package/lib/ngrx/index.d.ts +1 -0
- package/lib/ngrx/store.lockset.d.ts +36 -0
- package/lib/pipe/index.d.ts +2 -0
- package/lib/pipe/misc/index.d.ts +2 -0
- package/lib/pipe/misc/misc.pipe.module.d.ts +7 -0
- package/lib/pipe/misc/prettyjson.pipe.d.ts +9 -0
- package/lib/pipe/pipe.module.d.ts +8 -0
- package/lib/router/anchor/anchor.d.ts +5 -1
- package/lib/router/anchor/anchor.directive.d.ts +10 -2
- package/lib/router/router/provider/angular/angular.router.service.d.ts +7 -5
- package/lib/router/router/provider/uirouter/uirouter.router.service.d.ts +11 -5
- package/lib/router/router/service/index.d.ts +1 -0
- package/lib/router/router/service/router.go.d.ts +14 -0
- package/lib/router/router/service/router.service.d.ts +10 -4
- package/lib/router/router/transition/transition.directive.d.ts +2 -2
- package/lib/router/router/transition/transition.watcher.directive.d.ts +1 -1
- package/lib/router/segue.d.ts +10 -3
- package/lib/util/view.d.ts +12 -0
- package/lib/view/if.directive.d.ts +19 -0
- package/lib/view/index.d.ts +1 -0
- package/package.json +7 -19
- package/esm2020/lib/action/directive/state/action.success.component.mjs +0 -50
- package/esm2020/lib/injected/index.mjs +0 -6
- package/esm2020/lib/injected/injected.component.mjs +0 -34
- package/esm2020/lib/injected/injected.component.module.mjs +0 -26
- package/esm2020/lib/injected/injected.directive.mjs +0 -33
- package/esm2020/lib/injected/injected.instance.mjs +0 -116
- package/esm2020/lib/injected/injected.mjs +0 -16
- package/lib/action/directive/state/action.success.component.d.ts +0 -15
- package/lib/injected/index.d.ts +0 -5
- package/lib/injected/injected.component.d.ts +0 -15
- package/lib/injected/injected.component.module.d.ts +0 -8
- package/lib/injected/injected.directive.d.ts +0 -19
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Injectable, forwardRef, Host, Input, Optional,
|
|
2
|
+
import { Directive, Injectable, forwardRef, Host, Input, Optional, NgModule, InjectionToken, Inject, EventEmitter, Output, LOCALE_ID, Pipe, ViewChild, Injector, ViewContainerRef, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from 'rxjs';
|
|
4
|
-
import { BehaviorSubject, combineLatest, Subject, interval, EMPTY, of,
|
|
5
|
-
import * as i1$
|
|
6
|
-
import { SubscriptionObject, LockSet, filterMaybe, LoadingStateType, beginLoading, idleLoadingState, errorResult, successResult, scanCount, combineLatestFromMapValuesObsFn, skipFirstMaybe, FilterSourceInstance, FilterSource, FilterSourceConnector, FilterMap } from '@dereekb/rxjs';
|
|
7
|
-
import { switchMap, first, distinctUntilChanged, filter, debounce, throttle, exhaustMap, mergeMap, map, shareReplay, withLatestFrom, startWith, tap, delay } from 'rxjs/operators';
|
|
8
|
-
import * as i1$
|
|
9
|
-
import { isDefinedAndNotFalse, hasValueOrNotEmpty, BooleanStringKeyArrayUtilityInstance, reduceBooleansWithOrFn,
|
|
4
|
+
import { BehaviorSubject, combineLatest, Subject, interval, EMPTY, of, distinctUntilChanged as distinctUntilChanged$1, exhaustMap as exhaustMap$1, shareReplay as shareReplay$1, delay, switchMap as switchMap$1, map as map$1, catchError, first as first$1, firstValueFrom, filter as filter$1, takeUntil, startWith as startWith$1, tap as tap$1, Observable } from 'rxjs';
|
|
5
|
+
import * as i1$5 from '@dereekb/rxjs';
|
|
6
|
+
import { SubscriptionObject, LockSet, filterMaybe, LoadingStateType, beginLoading, idleLoadingState, errorResult, successResult, scanCount, combineLatestFromMapValuesObsFn, workFactory, emitDelayObs, asObservable, returnIfIs, skipFirstMaybe, onFalseToTrue, onTrueToFalse, setContainsAllValuesFrom, FilterSourceInstance, FilterSource, FilterSourceConnector, FilterMap } from '@dereekb/rxjs';
|
|
7
|
+
import { switchMap, first, distinctUntilChanged, filter, debounce, throttle, exhaustMap, mergeMap, map, shareReplay, withLatestFrom, startWith, tap, delay as delay$1 } from 'rxjs/operators';
|
|
8
|
+
import * as i1$6 from '@dereekb/util';
|
|
9
|
+
import { isDefinedAndNotFalse, hasValueOrNotEmpty, BooleanStringKeyArrayUtilityInstance, reduceBooleansWithOrFn, getValueFromGetter, isGetter, setIncludesFunction, maybeSet, isAllowed, expandTreeFunction, flattenTreeToArrayFunction, expandFlattenTreeFunction, mergeArrayIntoArray, objectFlatMergeMatrix, mergeArrays, filterMaybeValues, mergeObjects, mergeArrayOrValueIntoArray, makePromiseFullRef, DataIsExpiredError, DataDoesNotExistError, filterMaybeValuesFn, StorageObjectUtility, SHARED_MEMORY_STORAGE } from '@dereekb/util';
|
|
10
10
|
import { ComponentStore } from '@ngrx/component-store';
|
|
11
|
-
import * as i2 from '@angular/common';
|
|
12
11
|
import { CommonModule, formatDate } from '@angular/common';
|
|
12
|
+
import * as i1$3 from '@ngrx/effects';
|
|
13
|
+
import { ofType, createEffect, EffectsModule } from '@ngrx/effects';
|
|
14
|
+
import * as i1$4 from '@ngrx/store';
|
|
15
|
+
import { createAction, props, createReducer, on, combineReducers, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
|
|
13
16
|
import * as i1$1 from '@angular/router';
|
|
14
17
|
import { NavigationStart, NavigationEnd } from '@angular/router';
|
|
15
18
|
import { isArray } from 'class-validator';
|
|
16
19
|
import * as i1$2 from '@uirouter/core';
|
|
17
|
-
import { addMinutes, isPast, formatDistance,
|
|
20
|
+
import { addMinutes, isValid, isPast, formatDistance, formatDistanceToNow, startOfDay, isSameDay } from 'date-fns';
|
|
18
21
|
import { toJsDate, formatToTimeString, unixTimeNumberForNow, timeHasExpired } from '@dereekb/date';
|
|
19
22
|
|
|
20
23
|
/**
|
|
@@ -32,9 +35,9 @@ class AbstractSubscriptionDirective {
|
|
|
32
35
|
this._subscriptionObject.subscription = subscription;
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
|
-
AbstractSubscriptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
36
|
-
AbstractSubscriptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
38
|
+
AbstractSubscriptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractSubscriptionDirective, deps: [{ token: i1.Subscription }], target: i0.ɵɵFactoryTarget.Directive });
|
|
39
|
+
AbstractSubscriptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractSubscriptionDirective, ngImport: i0 });
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractSubscriptionDirective, decorators: [{
|
|
38
41
|
type: Directive
|
|
39
42
|
}], ctorParameters: function () { return [{ type: i1.Subscription }]; } });
|
|
40
43
|
/**
|
|
@@ -52,9 +55,9 @@ class AbstractLockSetSubscriptionDirective extends AbstractSubscriptionDirective
|
|
|
52
55
|
super.ngOnDestroy();
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
|
-
AbstractLockSetSubscriptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
56
|
-
AbstractLockSetSubscriptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
58
|
+
AbstractLockSetSubscriptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractLockSetSubscriptionDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
59
|
+
AbstractLockSetSubscriptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractLockSetSubscriptionDirective, usesInheritance: true, ngImport: i0 });
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractLockSetSubscriptionDirective, decorators: [{
|
|
58
61
|
type: Directive
|
|
59
62
|
}] });
|
|
60
63
|
|
|
@@ -186,9 +189,9 @@ class DbxActionContextStoreSourceInstance {
|
|
|
186
189
|
this.useStore((x) => x.reset());
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
|
-
DbxActionContextStoreSourceInstance.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
190
|
-
DbxActionContextStoreSourceInstance.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
192
|
+
DbxActionContextStoreSourceInstance.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionContextStoreSourceInstance, deps: [{ token: ActionContextStoreSource }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
193
|
+
DbxActionContextStoreSourceInstance.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionContextStoreSourceInstance });
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionContextStoreSourceInstance, decorators: [{
|
|
192
195
|
type: Injectable
|
|
193
196
|
}], ctorParameters: function () { return [{ type: ActionContextStoreSource }]; } });
|
|
194
197
|
const actionContextStoreSourceInstanceFactory = (source) => {
|
|
@@ -247,9 +250,9 @@ class DbxActionAutoModifyDirective extends AbstractSubscriptionDirective {
|
|
|
247
250
|
});
|
|
248
251
|
}
|
|
249
252
|
}
|
|
250
|
-
DbxActionAutoModifyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
251
|
-
DbxActionAutoModifyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
253
|
+
DbxActionAutoModifyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionAutoModifyDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
254
|
+
DbxActionAutoModifyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionAutoModifyDirective, selector: "[dbxActionAutoModify]", inputs: { autoModifyEnabled: ["dbxActionAutoModify", "autoModifyEnabled"] }, usesInheritance: true, ngImport: i0 });
|
|
255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionAutoModifyDirective, decorators: [{
|
|
253
256
|
type: Directive,
|
|
254
257
|
args: [{
|
|
255
258
|
selector: '[dbxActionAutoModify]',
|
|
@@ -273,12 +276,12 @@ class DbxActionAutoTriggerDirective extends AbstractSubscriptionDirective {
|
|
|
273
276
|
super();
|
|
274
277
|
this.source = source;
|
|
275
278
|
this._triggerEnabled = new BehaviorSubject(true);
|
|
279
|
+
this._triggerLimit = new BehaviorSubject(undefined);
|
|
280
|
+
this._trigger = new Subject();
|
|
276
281
|
this.triggerDebounce = DEFAULT_DEBOUNCE_MS;
|
|
277
282
|
this.triggerThrottle = DEFAULT_THROTTLE_MS;
|
|
278
283
|
this.triggerErrorThrottle = DEFAULT_ERROR_THROTTLE_MS;
|
|
279
284
|
this.maxErrorsForThrottle = MAX_ERRORS_TO_THROTTLE_ON;
|
|
280
|
-
this._triggerLimit = new BehaviorSubject(undefined);
|
|
281
|
-
this._trigger = new Subject();
|
|
282
285
|
this._triggerCount = 0;
|
|
283
286
|
this._errorCount$ = this.source.errorCountSinceLastSuccess$;
|
|
284
287
|
this._triggerCount$ = this.source.isModifiedAndCanTriggerUpdates$.pipe(filter(() => this.isEnabled), filter((x) => x), debounce(() => interval(this.triggerDebounce)), throttle(() => this._errorCount$.pipe(first(), exhaustMap((count) => interval(this.triggerThrottle + (Math.min(count, this.maxErrorsForThrottle) * this.triggerErrorThrottle)))), { leading: true, trailing: true }),
|
|
@@ -352,14 +355,15 @@ class DbxActionAutoTriggerDirective extends AbstractSubscriptionDirective {
|
|
|
352
355
|
ngOnDestroy() {
|
|
353
356
|
this.source.lockSet.onNextUnlock(() => {
|
|
354
357
|
super.ngOnDestroy();
|
|
358
|
+
this._triggerEnabled.complete();
|
|
355
359
|
this._trigger.complete();
|
|
356
360
|
this._triggerLimit.complete();
|
|
357
361
|
});
|
|
358
362
|
}
|
|
359
363
|
}
|
|
360
|
-
DbxActionAutoTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
361
|
-
DbxActionAutoTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
364
|
+
DbxActionAutoTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionAutoTriggerDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
365
|
+
DbxActionAutoTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionAutoTriggerDirective, selector: "dbxActionAutoTrigger, [dbxActionAutoTrigger]", inputs: { triggerEnabled: ["dbxActionAutoTrigger", "triggerEnabled"], triggerDebounce: "triggerDebounce", triggerThrottle: "triggerThrottle", triggerErrorThrottle: "triggerErrorThrottle", fastTrigger: "fastTrigger", instantTrigger: "instantTrigger", triggerLimit: "triggerLimit" }, usesInheritance: true, ngImport: i0 });
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionAutoTriggerDirective, decorators: [{
|
|
363
367
|
type: Directive,
|
|
364
368
|
args: [{
|
|
365
369
|
selector: 'dbxActionAutoTrigger, [dbxActionAutoTrigger]',
|
|
@@ -438,9 +442,9 @@ class dbxActionValueStreamDirective {
|
|
|
438
442
|
});
|
|
439
443
|
}
|
|
440
444
|
}
|
|
441
|
-
dbxActionValueStreamDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
442
|
-
dbxActionValueStreamDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
445
|
+
dbxActionValueStreamDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: dbxActionValueStreamDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
446
|
+
dbxActionValueStreamDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: dbxActionValueStreamDirective, selector: "[dbxActionValueStream]", inputs: { dbxActionValueStream: "dbxActionValueStream", dbxActionValueStreamIsNotEmpty: "dbxActionValueStreamIsNotEmpty", dbxActionValueStreamModified: "dbxActionValueStreamModified" }, ngImport: i0 });
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: dbxActionValueStreamDirective, decorators: [{
|
|
444
448
|
type: Directive,
|
|
445
449
|
args: [{
|
|
446
450
|
selector: '[dbxActionValueStream]',
|
|
@@ -737,9 +741,9 @@ class ActionContextStore extends ComponentStore {
|
|
|
737
741
|
}, 2000);
|
|
738
742
|
}
|
|
739
743
|
}
|
|
740
|
-
ActionContextStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
741
|
-
ActionContextStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
742
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
744
|
+
ActionContextStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ActionContextStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
745
|
+
ActionContextStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ActionContextStore });
|
|
746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ActionContextStore, decorators: [{
|
|
743
747
|
type: Injectable
|
|
744
748
|
}], ctorParameters: function () { return []; } });
|
|
745
749
|
|
|
@@ -812,9 +816,9 @@ class DbxActionDirective extends DbxActionContextBaseSource {
|
|
|
812
816
|
});
|
|
813
817
|
}
|
|
814
818
|
}
|
|
815
|
-
DbxActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
816
|
-
DbxActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
819
|
+
DbxActionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionDirective, deps: [{ token: SecondaryActionContextStoreSource, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
820
|
+
DbxActionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", providers: ProvideActionStoreSource(DbxActionDirective), exportAs: ["action", "dbxAction"], usesInheritance: true, ngImport: i0 });
|
|
821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionDirective, decorators: [{
|
|
818
822
|
type: Directive,
|
|
819
823
|
args: [{
|
|
820
824
|
selector: 'dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]',
|
|
@@ -848,9 +852,9 @@ class DbxActionSourceDirective {
|
|
|
848
852
|
this._source.next(source);
|
|
849
853
|
}
|
|
850
854
|
}
|
|
851
|
-
DbxActionSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
852
|
-
DbxActionSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
853
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
855
|
+
DbxActionSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionSourceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
856
|
+
DbxActionSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionSourceDirective, selector: "[dbxActionSource]", inputs: { source: ["dbxActionSource", "source"] }, providers: ProvideSecondaryActionStoreSource(DbxActionSourceDirective), ngImport: i0 });
|
|
857
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionSourceDirective, decorators: [{
|
|
854
858
|
type: Directive,
|
|
855
859
|
args: [{
|
|
856
860
|
selector: '[dbxActionSource]',
|
|
@@ -875,9 +879,9 @@ class DbxActionContextLoggerDirective extends AbstractSubscriptionDirective {
|
|
|
875
879
|
});
|
|
876
880
|
}
|
|
877
881
|
}
|
|
878
|
-
DbxActionContextLoggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
879
|
-
DbxActionContextLoggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
882
|
+
DbxActionContextLoggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionContextLoggerDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
883
|
+
DbxActionContextLoggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionContextLoggerDirective, selector: "[dbxActionLogger],[dbxActionContextLogger]", usesInheritance: true, ngImport: i0 });
|
|
884
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionContextLoggerDirective, decorators: [{
|
|
881
885
|
type: Directive,
|
|
882
886
|
args: [{
|
|
883
887
|
selector: '[dbxActionLogger],[dbxActionContextLogger]'
|
|
@@ -933,9 +937,9 @@ class DbxActionContextMapDirective {
|
|
|
933
937
|
return this.map$.pipe(switchMap(combineLatestFromMapValuesObsFn((x) => x.store$.pipe(switchMap(mapFn)))));
|
|
934
938
|
}
|
|
935
939
|
}
|
|
936
|
-
DbxActionContextMapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
937
|
-
DbxActionContextMapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
938
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
940
|
+
DbxActionContextMapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionContextMapDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
941
|
+
DbxActionContextMapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionContextMapDirective, selector: "[dbxActionContextMap]", providers: [], exportAs: ["actionMap"], ngImport: i0 });
|
|
942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionContextMapDirective, decorators: [{
|
|
939
943
|
type: Directive,
|
|
940
944
|
args: [{
|
|
941
945
|
selector: '[dbxActionContextMap]',
|
|
@@ -972,9 +976,9 @@ class DbxActionFromMapDirective {
|
|
|
972
976
|
this._key.next(key);
|
|
973
977
|
}
|
|
974
978
|
}
|
|
975
|
-
DbxActionFromMapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
976
|
-
DbxActionFromMapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
977
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
979
|
+
DbxActionFromMapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionFromMapDirective, deps: [{ token: DbxActionContextMapDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
980
|
+
DbxActionFromMapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionFromMapDirective, selector: "[dbxActionFromMap]", inputs: { key: ["dbxActionFromMap", "key"] }, providers: ProvideSecondaryActionStoreSource(DbxActionFromMapDirective), ngImport: i0 });
|
|
981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionFromMapDirective, decorators: [{
|
|
978
982
|
type: Directive,
|
|
979
983
|
args: [{
|
|
980
984
|
selector: '[dbxActionFromMap]',
|
|
@@ -1014,9 +1018,9 @@ class DbxActionMapSourceDirective {
|
|
|
1014
1018
|
}
|
|
1015
1019
|
}
|
|
1016
1020
|
}
|
|
1017
|
-
DbxActionMapSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1018
|
-
DbxActionMapSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1021
|
+
DbxActionMapSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionMapSourceDirective, deps: [{ token: ActionContextStoreSource, host: true }, { token: DbxActionContextMapDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1022
|
+
DbxActionMapSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionMapSourceDirective, selector: "[dbxActionMapSource]", inputs: { key: ["dbxActionMapSource", "key"] }, ngImport: i0 });
|
|
1023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionMapSourceDirective, decorators: [{
|
|
1020
1024
|
type: Directive,
|
|
1021
1025
|
args: [{
|
|
1022
1026
|
selector: '[dbxActionMapSource]'
|
|
@@ -1054,9 +1058,9 @@ class DbxActionMapWorkingDisableDirective extends AbstractSubscriptionDirective
|
|
|
1054
1058
|
this.source.enable(this.disabledKey || DEFAULT_ACTION_MAP_WORKING_DISABLED_KEY);
|
|
1055
1059
|
}
|
|
1056
1060
|
}
|
|
1057
|
-
DbxActionMapWorkingDisableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1058
|
-
DbxActionMapWorkingDisableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1059
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1061
|
+
DbxActionMapWorkingDisableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionMapWorkingDisableDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }, { token: DbxActionContextMapDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1062
|
+
DbxActionMapWorkingDisableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionMapWorkingDisableDirective, selector: "[dbxActionMapWorkingDisable]", inputs: { disabledKey: ["dbxActionMapWorkingDisable", "disabledKey"] }, usesInheritance: true, ngImport: i0 });
|
|
1063
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionMapWorkingDisableDirective, decorators: [{
|
|
1060
1064
|
type: Directive,
|
|
1061
1065
|
args: [{
|
|
1062
1066
|
selector: '[dbxActionMapWorkingDisable]'
|
|
@@ -1093,13 +1097,13 @@ class DbxActionDisabledDirective extends AbstractSubscriptionDirective {
|
|
|
1093
1097
|
return this._disabled.value;
|
|
1094
1098
|
}
|
|
1095
1099
|
set disabled(disabled) {
|
|
1096
|
-
const disable =
|
|
1100
|
+
const disable = disabled !== false;
|
|
1097
1101
|
this._disabled.next(disable);
|
|
1098
1102
|
}
|
|
1099
1103
|
}
|
|
1100
|
-
DbxActionDisabledDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1101
|
-
DbxActionDisabledDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1104
|
+
DbxActionDisabledDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionDisabledDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1105
|
+
DbxActionDisabledDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionDisabledDirective, selector: "[dbxActionDisabled]", inputs: { disabled: ["dbxActionDisabled", "disabled"] }, usesInheritance: true, ngImport: i0 });
|
|
1106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionDisabledDirective, decorators: [{
|
|
1103
1107
|
type: Directive,
|
|
1104
1108
|
args: [{
|
|
1105
1109
|
selector: '[dbxActionDisabled]'
|
|
@@ -1112,9 +1116,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1112
1116
|
}] } });
|
|
1113
1117
|
|
|
1114
1118
|
/**
|
|
1115
|
-
*
|
|
1119
|
+
* WorkInstanceDelegate implementation using an DbxActionContextStoreSourceInstance.
|
|
1116
1120
|
*/
|
|
1117
|
-
class
|
|
1121
|
+
class DbxActionWorkInstanceDelegate {
|
|
1118
1122
|
constructor(source) {
|
|
1119
1123
|
this.source = source;
|
|
1120
1124
|
}
|
|
@@ -1128,126 +1132,6 @@ class WorkHandlerContextSourceDelegate {
|
|
|
1128
1132
|
this.source.reject(error);
|
|
1129
1133
|
}
|
|
1130
1134
|
}
|
|
1131
|
-
/**
|
|
1132
|
-
* Used by DbxActionHandlerDirective when handling a function.
|
|
1133
|
-
*/
|
|
1134
|
-
class WorkHandlerContext {
|
|
1135
|
-
constructor(value, delegate) {
|
|
1136
|
-
this.value = value;
|
|
1137
|
-
this.delegate = delegate;
|
|
1138
|
-
this._done = false;
|
|
1139
|
-
this._doneActionBegan = false;
|
|
1140
|
-
this._actionBegan = new BehaviorSubject(false);
|
|
1141
|
-
this._isComplete = new BehaviorSubject(false);
|
|
1142
|
-
// Schedule to cleanup self once isComplete is true.
|
|
1143
|
-
this._isComplete.subscribe((done) => {
|
|
1144
|
-
if (done) {
|
|
1145
|
-
this.destroy();
|
|
1146
|
-
}
|
|
1147
|
-
});
|
|
1148
|
-
}
|
|
1149
|
-
get actionBegan() {
|
|
1150
|
-
return this._doneActionBegan ?? this._actionBegan.value;
|
|
1151
|
-
}
|
|
1152
|
-
get actionBegan$() {
|
|
1153
|
-
return this._done ? of(this._doneActionBegan) : this._actionBegan.asObservable();
|
|
1154
|
-
}
|
|
1155
|
-
get isComplete() {
|
|
1156
|
-
return this._done || this._isComplete.value;
|
|
1157
|
-
}
|
|
1158
|
-
get isComplete$() {
|
|
1159
|
-
return this._done ? of(true) : this._isComplete.asObservable();
|
|
1160
|
-
}
|
|
1161
|
-
/**
|
|
1162
|
-
* Begins working using an observable.
|
|
1163
|
-
*/
|
|
1164
|
-
startWorkingWithObservable(actionObs) {
|
|
1165
|
-
this.startWorking();
|
|
1166
|
-
actionObs.pipe(first()).subscribe((actionResult) => {
|
|
1167
|
-
this.success(actionResult);
|
|
1168
|
-
}, (error) => {
|
|
1169
|
-
const message = error.message ?? error.code ?? undefined;
|
|
1170
|
-
this.reject((message) ? ({ message }) : undefined);
|
|
1171
|
-
});
|
|
1172
|
-
}
|
|
1173
|
-
/**
|
|
1174
|
-
* Notifies the system that the action has begun.
|
|
1175
|
-
*/
|
|
1176
|
-
startWorking() {
|
|
1177
|
-
this._setWorking();
|
|
1178
|
-
this.delegate.startWorking();
|
|
1179
|
-
}
|
|
1180
|
-
/**
|
|
1181
|
-
* Sets success on the action.
|
|
1182
|
-
*/
|
|
1183
|
-
success(result) {
|
|
1184
|
-
this._setComplete();
|
|
1185
|
-
this.delegate.success(result);
|
|
1186
|
-
}
|
|
1187
|
-
/**
|
|
1188
|
-
* Sets rejected on the action.
|
|
1189
|
-
*/
|
|
1190
|
-
reject(error) {
|
|
1191
|
-
this._setComplete();
|
|
1192
|
-
this.delegate.reject(error);
|
|
1193
|
-
}
|
|
1194
|
-
destroy() {
|
|
1195
|
-
this._doneActionBegan = this.actionBegan;
|
|
1196
|
-
this._done = true;
|
|
1197
|
-
// Delay to prevent error.
|
|
1198
|
-
setTimeout(() => {
|
|
1199
|
-
this._actionBegan.complete();
|
|
1200
|
-
this._isComplete.complete();
|
|
1201
|
-
});
|
|
1202
|
-
}
|
|
1203
|
-
_setWorking() {
|
|
1204
|
-
if (this.actionBegan) {
|
|
1205
|
-
throw new Error('Action already has been triggered for this context.');
|
|
1206
|
-
}
|
|
1207
|
-
this._actionBegan.next(true);
|
|
1208
|
-
}
|
|
1209
|
-
_setComplete() {
|
|
1210
|
-
if (this.isComplete) {
|
|
1211
|
-
throw new Error('Action has already been marked as completed.');
|
|
1212
|
-
}
|
|
1213
|
-
this._isComplete.next(true);
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
/**
|
|
1217
|
-
* Creates a function that uses a provider to always handle new values.
|
|
1218
|
-
*/
|
|
1219
|
-
function handleWorkValueReadyWithConfigFn(providerFn) {
|
|
1220
|
-
return (value) => {
|
|
1221
|
-
const config = providerFn(value);
|
|
1222
|
-
return handleWorkValueReadyFn(config)(value);
|
|
1223
|
-
};
|
|
1224
|
-
}
|
|
1225
|
-
/**
|
|
1226
|
-
* Creates a function that handles the incoming value and creates a WorkHandlerContext.
|
|
1227
|
-
*/
|
|
1228
|
-
function handleWorkValueReadyFn({ handlerFunction, delegate }) {
|
|
1229
|
-
return (value) => {
|
|
1230
|
-
const handler = new WorkHandlerContext(value, delegate);
|
|
1231
|
-
let fnResult;
|
|
1232
|
-
try {
|
|
1233
|
-
fnResult = handlerFunction(value, handler);
|
|
1234
|
-
}
|
|
1235
|
-
catch (e) {
|
|
1236
|
-
console.error('Action encountered an unexpected error.', e);
|
|
1237
|
-
handler.reject(e);
|
|
1238
|
-
return;
|
|
1239
|
-
}
|
|
1240
|
-
if (!handler.isComplete) {
|
|
1241
|
-
if (fnResult && isObservable(fnResult)) {
|
|
1242
|
-
if (handler.actionBegan) {
|
|
1243
|
-
throw new Error('Action already marked as begun from handlerFunction result. Either return an observable or use the handler directly.');
|
|
1244
|
-
}
|
|
1245
|
-
handler.startWorkingWithObservable(fnResult);
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
return handler;
|
|
1249
|
-
};
|
|
1250
|
-
}
|
|
1251
1135
|
|
|
1252
1136
|
/**
|
|
1253
1137
|
* Context used for defining a function that performs an action using the input function on ValueReady.
|
|
@@ -1258,7 +1142,7 @@ class DbxActionHandlerDirective extends AbstractSubscriptionDirective {
|
|
|
1258
1142
|
this.source = source;
|
|
1259
1143
|
this._handlerFunction = new BehaviorSubject(undefined);
|
|
1260
1144
|
this.handlerFunction$ = this._handlerFunction.pipe(filterMaybe(), shareReplay(1));
|
|
1261
|
-
this._delegate = new
|
|
1145
|
+
this._delegate = new DbxActionWorkInstanceDelegate(this.source);
|
|
1262
1146
|
}
|
|
1263
1147
|
get handlerFunction() {
|
|
1264
1148
|
return this._handlerFunction.value;
|
|
@@ -1267,8 +1151,8 @@ class DbxActionHandlerDirective extends AbstractSubscriptionDirective {
|
|
|
1267
1151
|
this._handlerFunction.next(handlerFunction);
|
|
1268
1152
|
}
|
|
1269
1153
|
ngOnInit() {
|
|
1270
|
-
this.sub = this.handlerFunction$.pipe(switchMap(
|
|
1271
|
-
const context =
|
|
1154
|
+
this.sub = this.handlerFunction$.pipe(switchMap(work => this.source.valueReady$.pipe(tap((value) => {
|
|
1155
|
+
const context = workFactory({ work, delegate: this._delegate })(value);
|
|
1272
1156
|
if (context) {
|
|
1273
1157
|
// Add the action to the lockSet for the source to prevent it from being destroyed until the action completes.
|
|
1274
1158
|
this.source.lockSet.addLock('dbxActionHandler', context.isComplete$.pipe(map(x => !x)));
|
|
@@ -1278,12 +1162,13 @@ class DbxActionHandlerDirective extends AbstractSubscriptionDirective {
|
|
|
1278
1162
|
ngOnDestroy() {
|
|
1279
1163
|
this.source.lockSet.onNextUnlock(() => {
|
|
1280
1164
|
super.ngOnDestroy();
|
|
1165
|
+
this._handlerFunction.complete();
|
|
1281
1166
|
});
|
|
1282
1167
|
}
|
|
1283
1168
|
}
|
|
1284
|
-
DbxActionHandlerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1285
|
-
DbxActionHandlerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1169
|
+
DbxActionHandlerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionHandlerDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1170
|
+
DbxActionHandlerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: { handlerFunction: ["dbxActionHandler", "handlerFunction"] }, usesInheritance: true, ngImport: i0 });
|
|
1171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionHandlerDirective, decorators: [{
|
|
1287
1172
|
type: Directive,
|
|
1288
1173
|
args: [{
|
|
1289
1174
|
selector: '[dbxActionHandler]',
|
|
@@ -1296,52 +1181,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1296
1181
|
}] } });
|
|
1297
1182
|
|
|
1298
1183
|
/**
|
|
1299
|
-
*
|
|
1300
|
-
*
|
|
1301
|
-
* Can be configured to show for a limited time afterwards, etc.
|
|
1184
|
+
* Abstract directive class that watches a show$ observable and behaves like *ngIf.
|
|
1302
1185
|
*/
|
|
1303
|
-
class
|
|
1304
|
-
constructor(
|
|
1186
|
+
class AbstractIfDirective extends AbstractSubscriptionDirective {
|
|
1187
|
+
constructor(templateRef, viewContainer) {
|
|
1188
|
+
super();
|
|
1189
|
+
this.templateRef = templateRef;
|
|
1190
|
+
this.viewContainer = viewContainer;
|
|
1191
|
+
}
|
|
1192
|
+
ngOnInit() {
|
|
1193
|
+
this.sub = this.show$.pipe(distinctUntilChanged$1()).subscribe((show) => {
|
|
1194
|
+
if (show) {
|
|
1195
|
+
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
1196
|
+
}
|
|
1197
|
+
else {
|
|
1198
|
+
this.viewContainer.clear();
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
AbstractIfDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractIfDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1204
|
+
AbstractIfDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractIfDirective, usesInheritance: true, ngImport: i0 });
|
|
1205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractIfDirective, decorators: [{
|
|
1206
|
+
type: Directive
|
|
1207
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* Structural directive that displays the content when the store has a success value.
|
|
1211
|
+
*/
|
|
1212
|
+
class DbxActionHasSuccessDirective extends AbstractIfDirective {
|
|
1213
|
+
constructor(templateRef, viewContainer, source) {
|
|
1214
|
+
super(templateRef, viewContainer);
|
|
1305
1215
|
this.source = source;
|
|
1306
|
-
this.show$ = this.source.isSuccess$.pipe(exhaustMap((success) => {
|
|
1216
|
+
this.show$ = this.source.isSuccess$.pipe(exhaustMap$1((success) => {
|
|
1307
1217
|
if (success) {
|
|
1308
|
-
|
|
1309
|
-
return of(false).pipe(delay(this.hideAfter), startWith(true));
|
|
1310
|
-
}
|
|
1311
|
-
else {
|
|
1312
|
-
return of(true);
|
|
1313
|
-
}
|
|
1218
|
+
return emitDelayObs(true, false, this.hideAfter || undefined);
|
|
1314
1219
|
}
|
|
1315
1220
|
else {
|
|
1316
1221
|
return of(false);
|
|
1317
1222
|
}
|
|
1318
|
-
}), shareReplay(1));
|
|
1223
|
+
}), shareReplay$1(1));
|
|
1319
1224
|
}
|
|
1320
1225
|
}
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
</ng-container>
|
|
1326
|
-
`, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i2.AsyncPipe } });
|
|
1327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: DbxActionSuccessComponent, decorators: [{
|
|
1328
|
-
type: Component,
|
|
1226
|
+
DbxActionHasSuccessDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionHasSuccessDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: DbxActionContextStoreSourceInstance }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1227
|
+
DbxActionHasSuccessDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionHasSuccessDirective, selector: "[dbxActionHasSuccess]", inputs: { hideAfter: ["dbxActionHasSuccess", "hideAfter"] }, usesInheritance: true, ngImport: i0 });
|
|
1228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionHasSuccessDirective, decorators: [{
|
|
1229
|
+
type: Directive,
|
|
1329
1230
|
args: [{
|
|
1330
|
-
selector: '
|
|
1331
|
-
template: `
|
|
1332
|
-
<ng-container *ngIf="show$ | async">
|
|
1333
|
-
<ng-content></ng-content>
|
|
1334
|
-
</ng-container>
|
|
1335
|
-
`
|
|
1231
|
+
selector: '[dbxActionHasSuccess]'
|
|
1336
1232
|
}]
|
|
1337
|
-
}], ctorParameters: function () { return [{ type: DbxActionContextStoreSourceInstance }]; }, propDecorators: { hideAfter: [{
|
|
1338
|
-
type: Input
|
|
1233
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: DbxActionContextStoreSourceInstance }]; }, propDecorators: { hideAfter: [{
|
|
1234
|
+
type: Input,
|
|
1235
|
+
args: ['dbxActionHasSuccess']
|
|
1339
1236
|
}] } });
|
|
1340
1237
|
|
|
1341
1238
|
/**
|
|
1342
1239
|
* Directive that executes a function on ActionContextStore Success.
|
|
1343
1240
|
*/
|
|
1344
|
-
class
|
|
1241
|
+
class DbxActionSuccessHandlerDirective extends AbstractSubscriptionDirective {
|
|
1345
1242
|
constructor(source) {
|
|
1346
1243
|
super();
|
|
1347
1244
|
this.source = source;
|
|
@@ -1355,7 +1252,7 @@ class DbxActionSuccessDirective extends AbstractSubscriptionDirective {
|
|
|
1355
1252
|
this._successFunction.next(successFunction);
|
|
1356
1253
|
}
|
|
1357
1254
|
ngOnInit() {
|
|
1358
|
-
this.sub = this.successFunction$.pipe(switchMap(successFunction => this.source.success$.pipe(map(x =>
|
|
1255
|
+
this.sub = this.successFunction$.pipe(switchMap(successFunction => this.source.success$.pipe(map(x => [successFunction, x]), tap(([successFn, result]) => {
|
|
1359
1256
|
successFn(result);
|
|
1360
1257
|
})))).subscribe();
|
|
1361
1258
|
}
|
|
@@ -1364,24 +1261,24 @@ class DbxActionSuccessDirective extends AbstractSubscriptionDirective {
|
|
|
1364
1261
|
this._successFunction.complete();
|
|
1365
1262
|
}
|
|
1366
1263
|
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1264
|
+
DbxActionSuccessHandlerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionSuccessHandlerDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1265
|
+
DbxActionSuccessHandlerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionSuccessHandlerDirective, selector: "[dbxActionSuccessHandler]", inputs: { successFunction: ["dbxActionSuccessHandler", "successFunction"] }, usesInheritance: true, ngImport: i0 });
|
|
1266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionSuccessHandlerDirective, decorators: [{
|
|
1370
1267
|
type: Directive,
|
|
1371
1268
|
args: [{
|
|
1372
|
-
selector: '[
|
|
1269
|
+
selector: '[dbxActionSuccessHandler]',
|
|
1373
1270
|
}]
|
|
1374
1271
|
}], ctorParameters: function () { return [{ type: DbxActionContextStoreSourceInstance, decorators: [{
|
|
1375
1272
|
type: Host
|
|
1376
1273
|
}] }]; }, propDecorators: { successFunction: [{
|
|
1377
1274
|
type: Input,
|
|
1378
|
-
args: ['
|
|
1275
|
+
args: ['dbxActionSuccessHandler']
|
|
1379
1276
|
}] } });
|
|
1380
1277
|
|
|
1381
1278
|
/**
|
|
1382
1279
|
* Directive that provides a default value when triggered.
|
|
1383
1280
|
*
|
|
1384
|
-
* No value is required, allowing the directive to automatically call readyValue
|
|
1281
|
+
* No value is required, allowing the directive to automatically call readyValue.
|
|
1385
1282
|
*/
|
|
1386
1283
|
class DbxActionValueDirective extends AbstractSubscriptionDirective {
|
|
1387
1284
|
constructor(source) {
|
|
@@ -1394,11 +1291,11 @@ class DbxActionValueDirective extends AbstractSubscriptionDirective {
|
|
|
1394
1291
|
return this._valueOrFunction.value;
|
|
1395
1292
|
}
|
|
1396
1293
|
set valueOrFunction(valueOrFunction) {
|
|
1397
|
-
this._valueOrFunction.next(valueOrFunction
|
|
1294
|
+
this._valueOrFunction.next(valueOrFunction);
|
|
1398
1295
|
}
|
|
1399
1296
|
ngOnInit() {
|
|
1400
1297
|
this.sub = this.valueOrFunction$.pipe(switchMap(valueOrFunction => this.source.triggered$.pipe(tap(() => {
|
|
1401
|
-
const value =
|
|
1298
|
+
const value = getValueFromGetter(valueOrFunction);
|
|
1402
1299
|
this.source.readyValue(value);
|
|
1403
1300
|
})))).subscribe();
|
|
1404
1301
|
}
|
|
@@ -1409,9 +1306,9 @@ class DbxActionValueDirective extends AbstractSubscriptionDirective {
|
|
|
1409
1306
|
});
|
|
1410
1307
|
}
|
|
1411
1308
|
}
|
|
1412
|
-
DbxActionValueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1413
|
-
DbxActionValueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1309
|
+
DbxActionValueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionValueDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1310
|
+
DbxActionValueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionValueDirective, selector: "[dbxActionValue]", inputs: { valueOrFunction: ["dbxActionValue", "valueOrFunction"] }, usesInheritance: true, ngImport: i0 });
|
|
1311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionValueDirective, decorators: [{
|
|
1415
1312
|
type: Directive,
|
|
1416
1313
|
args: [{
|
|
1417
1314
|
selector: '[dbxActionValue]',
|
|
@@ -1424,31 +1321,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1424
1321
|
}] } });
|
|
1425
1322
|
|
|
1426
1323
|
/**
|
|
1427
|
-
*
|
|
1324
|
+
* Structural directive that displays the content when the store is working.
|
|
1325
|
+
*
|
|
1326
|
+
* Can specify a period in milliseconds that shows how long to show up after working for a particular number of seconds.
|
|
1428
1327
|
*/
|
|
1429
|
-
class
|
|
1430
|
-
constructor(source) {
|
|
1328
|
+
class DbxActionIsWorkingDirective extends AbstractIfDirective {
|
|
1329
|
+
constructor(templateRef, viewContainer, source) {
|
|
1330
|
+
super(templateRef, viewContainer);
|
|
1431
1331
|
this.source = source;
|
|
1432
|
-
this.show$ = this.source.isWorking
|
|
1332
|
+
this.show$ = this.source.isWorking$.pipe(exhaustMap$1((isWorking) => {
|
|
1333
|
+
if (isWorking && this.showAfter) {
|
|
1334
|
+
return emitDelayObs(false, true, this.showAfter || undefined);
|
|
1335
|
+
}
|
|
1336
|
+
else {
|
|
1337
|
+
return of(isWorking);
|
|
1338
|
+
}
|
|
1339
|
+
}), shareReplay$1(1));
|
|
1433
1340
|
}
|
|
1434
1341
|
}
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
</ng-container>
|
|
1440
|
-
`, isInline: true, directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i2.AsyncPipe } });
|
|
1441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: DbxActionWorkingComponent, decorators: [{
|
|
1442
|
-
type: Component,
|
|
1342
|
+
DbxActionIsWorkingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionIsWorkingDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: DbxActionContextStoreSourceInstance }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1343
|
+
DbxActionIsWorkingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionIsWorkingDirective, selector: "[dbxActionIsWorking]", inputs: { showAfter: ["dbxActionIsWorking", "showAfter"] }, usesInheritance: true, ngImport: i0 });
|
|
1344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionIsWorkingDirective, decorators: [{
|
|
1345
|
+
type: Directive,
|
|
1443
1346
|
args: [{
|
|
1444
|
-
selector: '
|
|
1445
|
-
template: `
|
|
1446
|
-
<ng-container *ngIf="show$ | async">
|
|
1447
|
-
<ng-content></ng-content>
|
|
1448
|
-
</ng-container>
|
|
1449
|
-
`
|
|
1347
|
+
selector: '[dbxActionIsWorking]'
|
|
1450
1348
|
}]
|
|
1451
|
-
}], ctorParameters: function () { return [{ type: DbxActionContextStoreSourceInstance }]; }
|
|
1349
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: DbxActionContextStoreSourceInstance }]; }, propDecorators: { showAfter: [{
|
|
1350
|
+
type: Input,
|
|
1351
|
+
args: ['dbxActionIsWorking']
|
|
1352
|
+
}] } });
|
|
1452
1353
|
|
|
1453
1354
|
const APP_ACTION_ENFORCE_MODIFIED_DIRECTIVE_KEY = 'dbx_action_enforce_modified';
|
|
1454
1355
|
/**
|
|
@@ -1461,7 +1362,7 @@ class DbxActionEnforceModifiedDirective extends AbstractSubscriptionDirective {
|
|
|
1461
1362
|
this._enabled = new BehaviorSubject(true);
|
|
1462
1363
|
}
|
|
1463
1364
|
ngOnInit() {
|
|
1464
|
-
this.sub = combineLatest([this.source.isModified$, this._enabled]).pipe(delay
|
|
1365
|
+
this.sub = combineLatest([this.source.isModified$, this._enabled]).pipe(delay(0)).subscribe(([modified, enableDirective]) => {
|
|
1465
1366
|
const disable = enableDirective && !modified;
|
|
1466
1367
|
this.source.disable(APP_ACTION_ENFORCE_MODIFIED_DIRECTIVE_KEY, disable);
|
|
1467
1368
|
});
|
|
@@ -1475,12 +1376,12 @@ class DbxActionEnforceModifiedDirective extends AbstractSubscriptionDirective {
|
|
|
1475
1376
|
return this._enabled.value;
|
|
1476
1377
|
}
|
|
1477
1378
|
set enabled(enabled) {
|
|
1478
|
-
this._enabled.next(enabled ?? true);
|
|
1379
|
+
this._enabled.next(Boolean(enabled) ?? true);
|
|
1479
1380
|
}
|
|
1480
1381
|
}
|
|
1481
|
-
DbxActionEnforceModifiedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1482
|
-
DbxActionEnforceModifiedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1483
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1382
|
+
DbxActionEnforceModifiedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionEnforceModifiedDirective, deps: [{ token: DbxActionContextStoreSourceInstance, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1383
|
+
DbxActionEnforceModifiedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionEnforceModifiedDirective, selector: "[dbxActionEnforceModified]", inputs: { enabled: ["dbxActionEnforceModified", "enabled"] }, usesInheritance: true, ngImport: i0 });
|
|
1384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionEnforceModifiedDirective, decorators: [{
|
|
1484
1385
|
type: Directive,
|
|
1485
1386
|
args: [{
|
|
1486
1387
|
selector: '[dbxActionEnforceModified]'
|
|
@@ -1489,7 +1390,115 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1489
1390
|
type: Host
|
|
1490
1391
|
}] }]; }, propDecorators: { enabled: [{
|
|
1491
1392
|
type: Input,
|
|
1492
|
-
args: ['
|
|
1393
|
+
args: ['dbxActionEnforceModified']
|
|
1394
|
+
}] } });
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* Utility class that handles trigger events to retrieve a value.
|
|
1398
|
+
*/
|
|
1399
|
+
class DbxActionValueOnTriggerInstance {
|
|
1400
|
+
constructor(config) {
|
|
1401
|
+
this._valueGetter = new BehaviorSubject(undefined);
|
|
1402
|
+
this.valueGetter$ = this._valueGetter.pipe(filterMaybe());
|
|
1403
|
+
this._triggeredSub = new SubscriptionObject();
|
|
1404
|
+
this.source = config.source;
|
|
1405
|
+
this._valueGetter.next(config.valueGetter);
|
|
1406
|
+
}
|
|
1407
|
+
get valueGetter() {
|
|
1408
|
+
return this._valueGetter.value;
|
|
1409
|
+
}
|
|
1410
|
+
set valueGetter(valueGetter) {
|
|
1411
|
+
this._valueGetter.next(valueGetter);
|
|
1412
|
+
}
|
|
1413
|
+
init() {
|
|
1414
|
+
// Ready the value after the source is triggered. Do modified check one last time.
|
|
1415
|
+
this._triggeredSub.subscription = this.source.triggered$.pipe(switchMap$1(() => this.valueGetter$.pipe(switchMap$1((valueGetter) => asObservable(valueGetter())))
|
|
1416
|
+
.pipe(
|
|
1417
|
+
// If the value is not null/undefined and is considered modified, then pass the value.
|
|
1418
|
+
switchMap$1((value) => returnIfIs(this.isModifiedFunction, value, false).pipe(map$1((value) => ({ value })))),
|
|
1419
|
+
// Catch any errors and pass them to reject.
|
|
1420
|
+
catchError((reject) => of({ reject }))))).subscribe((result) => {
|
|
1421
|
+
if (result.value != null) {
|
|
1422
|
+
this.source.readyValue(result.value);
|
|
1423
|
+
}
|
|
1424
|
+
else {
|
|
1425
|
+
this.source.reject(result.reject);
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1429
|
+
destroy() {
|
|
1430
|
+
this.source.lockSet.onNextUnlock(() => {
|
|
1431
|
+
this._triggeredSub.destroy();
|
|
1432
|
+
this._valueGetter.complete();
|
|
1433
|
+
});
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* Abstract class for directives that may perform an action when trigger is called, and returns a value.
|
|
1439
|
+
*/
|
|
1440
|
+
class AbstractDbxActionValueOnTriggerDirective {
|
|
1441
|
+
constructor(source, valueGetter) {
|
|
1442
|
+
this.source = source;
|
|
1443
|
+
this._triggeredSub = new SubscriptionObject();
|
|
1444
|
+
this._instance = new DbxActionValueOnTriggerInstance({
|
|
1445
|
+
source: this.source,
|
|
1446
|
+
valueGetter
|
|
1447
|
+
});
|
|
1448
|
+
}
|
|
1449
|
+
get valueGetter() {
|
|
1450
|
+
return this._instance.valueGetter;
|
|
1451
|
+
}
|
|
1452
|
+
set valueGetter(valueGetter) {
|
|
1453
|
+
this._instance.valueGetter = valueGetter;
|
|
1454
|
+
}
|
|
1455
|
+
get isModifiedFunction() {
|
|
1456
|
+
return this._instance.isModifiedFunction;
|
|
1457
|
+
}
|
|
1458
|
+
set isModifiedFunction(isModifiedFunction) {
|
|
1459
|
+
this._instance.isModifiedFunction = isModifiedFunction;
|
|
1460
|
+
}
|
|
1461
|
+
ngOnInit() {
|
|
1462
|
+
this._instance.init();
|
|
1463
|
+
}
|
|
1464
|
+
ngOnDestroy() {
|
|
1465
|
+
this._instance.destroy();
|
|
1466
|
+
this._triggeredSub.destroy();
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
AbstractDbxActionValueOnTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxActionValueOnTriggerDirective, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
1470
|
+
AbstractDbxActionValueOnTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractDbxActionValueOnTriggerDirective, ngImport: i0 });
|
|
1471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxActionValueOnTriggerDirective, decorators: [{
|
|
1472
|
+
type: Directive
|
|
1473
|
+
}], ctorParameters: function () { return [{ type: DbxActionContextStoreSourceInstance }, { type: undefined }]; } });
|
|
1474
|
+
/**
|
|
1475
|
+
* Action directive that is used to trigger/display a popover, then watches that popover for a value.
|
|
1476
|
+
*/
|
|
1477
|
+
class DbxActionValueTriggerDirective extends AbstractDbxActionValueOnTriggerDirective {
|
|
1478
|
+
constructor(elementRef, source) {
|
|
1479
|
+
super(source);
|
|
1480
|
+
this.elementRef = elementRef;
|
|
1481
|
+
}
|
|
1482
|
+
set dbxActionValueOnTrigger(dbxActionValueTrigger) {
|
|
1483
|
+
this.valueGetter = dbxActionValueTrigger;
|
|
1484
|
+
}
|
|
1485
|
+
set dbxActionValueTriggerModified(isModifiedFunction) {
|
|
1486
|
+
this.isModifiedFunction = isModifiedFunction;
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
DbxActionValueTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionValueTriggerDirective, deps: [{ token: i0.ElementRef }, { token: DbxActionContextStoreSourceInstance }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1490
|
+
DbxActionValueTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionValueTriggerDirective, selector: "[dbxActionValueOnTrigger]", inputs: { dbxActionValueOnTrigger: "dbxActionValueOnTrigger", dbxActionValueTriggerModified: "dbxActionValueTriggerModified" }, exportAs: ["dbxActionValueOnTrigger"], usesInheritance: true, ngImport: i0 });
|
|
1491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionValueTriggerDirective, decorators: [{
|
|
1492
|
+
type: Directive,
|
|
1493
|
+
args: [{
|
|
1494
|
+
exportAs: 'dbxActionValueOnTrigger',
|
|
1495
|
+
selector: '[dbxActionValueOnTrigger]'
|
|
1496
|
+
}]
|
|
1497
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DbxActionContextStoreSourceInstance }]; }, propDecorators: { dbxActionValueOnTrigger: [{
|
|
1498
|
+
type: Input,
|
|
1499
|
+
args: ['dbxActionValueOnTrigger']
|
|
1500
|
+
}], dbxActionValueTriggerModified: [{
|
|
1501
|
+
type: Input
|
|
1493
1502
|
}] } });
|
|
1494
1503
|
|
|
1495
1504
|
/**
|
|
@@ -1506,14 +1515,15 @@ class DbxActionContextMachine extends DbxActionContextBaseSource {
|
|
|
1506
1515
|
this._successSub = new SubscriptionObject();
|
|
1507
1516
|
// Handle Value Ready
|
|
1508
1517
|
this._handleValueReadySub.subscription = this.sourceInstance.valueReady$.subscribe((value) => {
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
delegate: new
|
|
1512
|
-
})
|
|
1518
|
+
const doWork = workFactory({
|
|
1519
|
+
work: config.handleValueReady,
|
|
1520
|
+
delegate: new DbxActionWorkInstanceDelegate(this.sourceInstance)
|
|
1521
|
+
});
|
|
1522
|
+
doWork(value);
|
|
1513
1523
|
});
|
|
1514
1524
|
// If this is a one-time use, then destroy it after the first success comes through.
|
|
1515
1525
|
if (this.config.oneTimeUse) {
|
|
1516
|
-
this.sourceInstance.success$.pipe(first(), delay(1000)).subscribe(() => {
|
|
1526
|
+
this.sourceInstance.success$.pipe(first(), delay$1(1000)).subscribe(() => {
|
|
1517
1527
|
this.destroy();
|
|
1518
1528
|
});
|
|
1519
1529
|
}
|
|
@@ -1534,18 +1544,18 @@ class DbxActionContextMachine extends DbxActionContextBaseSource {
|
|
|
1534
1544
|
|
|
1535
1545
|
class DbxCoreActionModule {
|
|
1536
1546
|
}
|
|
1537
|
-
DbxCoreActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1538
|
-
DbxCoreActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1547
|
+
DbxCoreActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1548
|
+
DbxCoreActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreActionModule, declarations: [DbxActionDirective, DbxActionContextMapDirective, DbxActionFromMapDirective, DbxActionMapSourceDirective,
|
|
1539
1549
|
DbxActionMapWorkingDisableDirective, DbxActionSourceDirective, DbxActionHandlerDirective, DbxActionDisabledDirective, DbxActionEnforceModifiedDirective,
|
|
1540
1550
|
DbxActionAutoTriggerDirective, dbxActionValueStreamDirective, DbxActionAutoModifyDirective, DbxActionValueDirective, DbxActionContextLoggerDirective,
|
|
1541
|
-
|
|
1551
|
+
DbxActionHasSuccessDirective, DbxActionSuccessHandlerDirective, DbxActionIsWorkingDirective], imports: [CommonModule], exports: [DbxActionDirective, DbxActionContextMapDirective, DbxActionFromMapDirective, DbxActionMapSourceDirective,
|
|
1542
1552
|
DbxActionMapWorkingDisableDirective, DbxActionSourceDirective, DbxActionHandlerDirective, DbxActionDisabledDirective, DbxActionEnforceModifiedDirective,
|
|
1543
1553
|
DbxActionAutoTriggerDirective, dbxActionValueStreamDirective, DbxActionAutoModifyDirective, DbxActionValueDirective, DbxActionContextLoggerDirective,
|
|
1544
|
-
|
|
1545
|
-
DbxCoreActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1554
|
+
DbxActionHasSuccessDirective, DbxActionSuccessHandlerDirective, DbxActionIsWorkingDirective] });
|
|
1555
|
+
DbxCoreActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreActionModule, imports: [[
|
|
1546
1556
|
CommonModule
|
|
1547
1557
|
]] });
|
|
1548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreActionModule, decorators: [{
|
|
1549
1559
|
type: NgModule,
|
|
1550
1560
|
args: [{
|
|
1551
1561
|
imports: [
|
|
@@ -1555,13 +1565,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1555
1565
|
DbxActionDirective, DbxActionContextMapDirective, DbxActionFromMapDirective, DbxActionMapSourceDirective,
|
|
1556
1566
|
DbxActionMapWorkingDisableDirective, DbxActionSourceDirective, DbxActionHandlerDirective, DbxActionDisabledDirective, DbxActionEnforceModifiedDirective,
|
|
1557
1567
|
DbxActionAutoTriggerDirective, dbxActionValueStreamDirective, DbxActionAutoModifyDirective, DbxActionValueDirective, DbxActionContextLoggerDirective,
|
|
1558
|
-
|
|
1568
|
+
DbxActionHasSuccessDirective, DbxActionSuccessHandlerDirective, DbxActionIsWorkingDirective,
|
|
1559
1569
|
],
|
|
1560
1570
|
exports: [
|
|
1561
1571
|
DbxActionDirective, DbxActionContextMapDirective, DbxActionFromMapDirective, DbxActionMapSourceDirective,
|
|
1562
1572
|
DbxActionMapWorkingDisableDirective, DbxActionSourceDirective, DbxActionHandlerDirective, DbxActionDisabledDirective, DbxActionEnforceModifiedDirective,
|
|
1563
1573
|
DbxActionAutoTriggerDirective, dbxActionValueStreamDirective, DbxActionAutoModifyDirective, DbxActionValueDirective, DbxActionContextLoggerDirective,
|
|
1564
|
-
|
|
1574
|
+
DbxActionHasSuccessDirective, DbxActionSuccessHandlerDirective, DbxActionIsWorkingDirective
|
|
1565
1575
|
]
|
|
1566
1576
|
}]
|
|
1567
1577
|
}] });
|
|
@@ -1574,124 +1584,421 @@ function makeDbxActionContextSourceReference(sourceInstance) {
|
|
|
1574
1584
|
}
|
|
1575
1585
|
|
|
1576
1586
|
/**
|
|
1577
|
-
*
|
|
1578
|
-
*
|
|
1579
|
-
* @param cdRef
|
|
1580
|
-
* @param timeout
|
|
1581
|
-
* @returns
|
|
1587
|
+
* Client auth service used to retrieve info about the current state of client authentication and client roles they may have.
|
|
1582
1588
|
*/
|
|
1583
|
-
|
|
1584
|
-
return tap$1(() => setTimeout(() => safeDetectChanges(cdRef), timeout));
|
|
1589
|
+
class DbxAuthService {
|
|
1585
1590
|
}
|
|
1591
|
+
|
|
1586
1592
|
/**
|
|
1587
|
-
*
|
|
1588
|
-
*
|
|
1589
|
-
* @param cdRef
|
|
1593
|
+
* This generates a TransitionHookFn that can be used with redirecting routes.
|
|
1590
1594
|
*/
|
|
1591
|
-
function
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
+
function makeAuthTransitionHook(config) {
|
|
1596
|
+
const { defaultRedirectTarget, errorRedirectTarget = defaultRedirectTarget } = config;
|
|
1597
|
+
// https://ui-router.github.io/ng2/docs/latest/modules/transition.html#hookresult
|
|
1598
|
+
const assertIsAuthenticated = (transition) => {
|
|
1599
|
+
const injector = transition.injector();
|
|
1600
|
+
const authService = injector.get(DbxAuthService);
|
|
1601
|
+
const $state = transition.router.stateService;
|
|
1602
|
+
const decisionObs = config.makeDecisionsObs(transition, authService, injector);
|
|
1603
|
+
function redirectOut() {
|
|
1604
|
+
const stateData = transition.targetState().state().data;
|
|
1605
|
+
const redirectTo = stateData?.redirectTo;
|
|
1606
|
+
let redirectToObs;
|
|
1607
|
+
if (redirectTo) {
|
|
1608
|
+
let resultObs;
|
|
1609
|
+
if (isGetter(redirectTo)) {
|
|
1610
|
+
resultObs = getValueFromGetter(redirectTo, { authService, injector, transition });
|
|
1611
|
+
}
|
|
1612
|
+
else {
|
|
1613
|
+
resultObs = of(redirectTo);
|
|
1614
|
+
}
|
|
1615
|
+
redirectToObs = resultObs.pipe(map$1((stateRef) => {
|
|
1616
|
+
let redirectTarget;
|
|
1617
|
+
let redirectParams;
|
|
1618
|
+
if (stateRef) {
|
|
1619
|
+
redirectTarget = stateRef.ref;
|
|
1620
|
+
redirectParams = stateRef.refParams;
|
|
1621
|
+
}
|
|
1622
|
+
if (!redirectTarget) {
|
|
1623
|
+
redirectTarget = defaultRedirectTarget;
|
|
1624
|
+
}
|
|
1625
|
+
return $state.target(redirectTarget, redirectParams);
|
|
1626
|
+
}));
|
|
1627
|
+
}
|
|
1628
|
+
else {
|
|
1629
|
+
redirectToObs = of($state.target(defaultRedirectTarget));
|
|
1630
|
+
}
|
|
1631
|
+
return redirectToObs;
|
|
1632
|
+
}
|
|
1633
|
+
const resultObs = decisionObs.pipe(first$1(), switchMap$1((decision) => {
|
|
1634
|
+
if (typeof decision === 'boolean') {
|
|
1635
|
+
if (decision) {
|
|
1636
|
+
return of(true);
|
|
1637
|
+
}
|
|
1638
|
+
else {
|
|
1639
|
+
return redirectOut();
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
else {
|
|
1643
|
+
return of($state.target(decision.ref, decision.refParams, decision.refOptions));
|
|
1644
|
+
}
|
|
1645
|
+
}), catchError((x) => {
|
|
1646
|
+
console.warn('Encountered error in auth transition hook.', x);
|
|
1647
|
+
return of($state.target(errorRedirectTarget, { location: true })); // Redirect to home
|
|
1648
|
+
}));
|
|
1649
|
+
return firstValueFrom(resultObs);
|
|
1650
|
+
};
|
|
1651
|
+
return assertIsAuthenticated;
|
|
1595
1652
|
}
|
|
1653
|
+
|
|
1596
1654
|
/**
|
|
1597
|
-
*
|
|
1598
|
-
* or more specifically if the parent component passed any target content to the child. This will still return true if
|
|
1599
|
-
* passed content is empty.
|
|
1600
|
-
*
|
|
1601
|
-
* TS:
|
|
1602
|
-
* @ViewChild('customLoading', { static: false }) customCustom: ElementRef;
|
|
1655
|
+
* Creates a AuthTransitionRedirectTargetGetter that can redirect values based on the current authUserState.
|
|
1603
1656
|
*
|
|
1604
|
-
*
|
|
1605
|
-
*
|
|
1606
|
-
* <ng-content select="[content]"></ng-content>
|
|
1607
|
-
* </div>
|
|
1657
|
+
* @param stateMap
|
|
1658
|
+
* @returns
|
|
1608
1659
|
*/
|
|
1609
|
-
function
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1660
|
+
function redirectBasedOnAuthUserState(stateMap) {
|
|
1661
|
+
return (input) => {
|
|
1662
|
+
return input.authService.authUserState$.pipe(first$1(), switchMap$1((authUserState) => {
|
|
1663
|
+
const getter = stateMap[authUserState];
|
|
1664
|
+
let result;
|
|
1665
|
+
if (getter) {
|
|
1666
|
+
if (isGetter(getter)) {
|
|
1667
|
+
result = getValueFromGetter(getter, input);
|
|
1668
|
+
}
|
|
1669
|
+
else {
|
|
1670
|
+
result = of(getter);
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
if (!result) {
|
|
1674
|
+
result = of(undefined);
|
|
1675
|
+
}
|
|
1676
|
+
return result;
|
|
1677
|
+
}));
|
|
1678
|
+
};
|
|
1618
1679
|
}
|
|
1619
1680
|
|
|
1620
|
-
|
|
1681
|
+
/**
|
|
1682
|
+
* This hook redirects to the configured default state when a user is not logged in for configured states.
|
|
1683
|
+
*/
|
|
1684
|
+
function enableIsLoggedInHook(transitionService, config) {
|
|
1685
|
+
// Matches if the destination state's data property has a truthy 'isSecure' property
|
|
1686
|
+
const isSecureCriteria = {
|
|
1687
|
+
entering: (state) => {
|
|
1688
|
+
const data = state?.data;
|
|
1689
|
+
const match = Boolean(data?.requiredLogIn);
|
|
1690
|
+
return match;
|
|
1691
|
+
}
|
|
1692
|
+
};
|
|
1693
|
+
const assertIsLoggedIn = makeAuthTransitionHook({
|
|
1694
|
+
...config.options,
|
|
1695
|
+
makeDecisionsObs(transition, authService) {
|
|
1696
|
+
return authService.isLoggedIn$;
|
|
1697
|
+
}
|
|
1698
|
+
});
|
|
1699
|
+
// Register the "requires auth" hook with the TransitionsService
|
|
1700
|
+
transitionService.onBefore(isSecureCriteria, assertIsLoggedIn, { priority: 100 });
|
|
1621
1701
|
}
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1702
|
+
|
|
1703
|
+
/**
|
|
1704
|
+
* This hook redirects to the configured default state when a user:
|
|
1705
|
+
*
|
|
1706
|
+
* - does not have an allowed state
|
|
1707
|
+
* - has a disallowed state
|
|
1708
|
+
*/
|
|
1709
|
+
function enableHasAuthRoleHook(transitionService, config) {
|
|
1710
|
+
// Matches if the destination state's data property has a truthy 'isSecure' property
|
|
1711
|
+
const isSecureCriteria = {
|
|
1712
|
+
entering: (state) => {
|
|
1713
|
+
const data = state?.data;
|
|
1714
|
+
const match = Boolean(data?.authRoles);
|
|
1715
|
+
return match;
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
const assertHasAuthRole = makeAuthTransitionHook({
|
|
1719
|
+
...config.options,
|
|
1720
|
+
makeDecisionsObs(transition, authService) {
|
|
1721
|
+
const targetState = transition.targetState();
|
|
1722
|
+
const data = targetState.state().data;
|
|
1723
|
+
const requiredRoles = new Set(data.authRoles);
|
|
1724
|
+
const setIncludes = setIncludesFunction(requiredRoles, data.authRolesMode);
|
|
1725
|
+
return authService.authUserState$.pipe(map$1(x => setIncludes(x)));
|
|
1726
|
+
}
|
|
1727
|
+
});
|
|
1728
|
+
// Register the "requires auth" hook with the TransitionsService
|
|
1729
|
+
transitionService.onBefore(isSecureCriteria, assertHasAuthRole, { priority: 100 });
|
|
1627
1730
|
}
|
|
1628
1731
|
|
|
1629
1732
|
/**
|
|
1630
|
-
*
|
|
1733
|
+
* This hook redirects to the configured default state when a user:
|
|
1734
|
+
*
|
|
1735
|
+
* - does not have an allowed state
|
|
1736
|
+
* - has a disallowed state
|
|
1631
1737
|
*/
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1738
|
+
function enableHasAuthStateHook(transitionService, config) {
|
|
1739
|
+
// Matches if the destination state's data property has a truthy 'isSecure' property
|
|
1740
|
+
const isSecureCriteria = {
|
|
1741
|
+
entering: (state) => {
|
|
1742
|
+
const data = state?.data;
|
|
1743
|
+
const match = Boolean(data?.authStates);
|
|
1744
|
+
return match;
|
|
1745
|
+
}
|
|
1746
|
+
};
|
|
1747
|
+
const assertHasAuthState = makeAuthTransitionHook({
|
|
1748
|
+
...config.options,
|
|
1749
|
+
makeDecisionsObs(transition, authService) {
|
|
1750
|
+
const targetState = transition.targetState();
|
|
1751
|
+
const data = targetState.state().data;
|
|
1752
|
+
const config = toHasAuthStateObjectConfig(data.authStates);
|
|
1753
|
+
const parsed = toParsedHasAuthStateConfig(config);
|
|
1754
|
+
return authService.authUserState$.pipe(map$1(x => isAllowed(x, parsed)));
|
|
1755
|
+
}
|
|
1756
|
+
});
|
|
1757
|
+
// Register the "requires auth" hook with the TransitionsService
|
|
1758
|
+
transitionService.onBefore(isSecureCriteria, assertHasAuthState, { priority: 100 });
|
|
1759
|
+
}
|
|
1760
|
+
// MARK: Utility
|
|
1761
|
+
function toHasAuthStateObjectConfig(input) {
|
|
1762
|
+
const isString = typeof input === 'string';
|
|
1763
|
+
if ((Array.isArray(input) || isString)) {
|
|
1764
|
+
if (isString) {
|
|
1765
|
+
input = [input];
|
|
1766
|
+
}
|
|
1767
|
+
return {
|
|
1768
|
+
allowedStates: input
|
|
1769
|
+
};
|
|
1642
1770
|
}
|
|
1643
|
-
|
|
1644
|
-
|
|
1771
|
+
else {
|
|
1772
|
+
return input;
|
|
1645
1773
|
}
|
|
1646
1774
|
}
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
}]
|
|
1654
|
-
}], ctorParameters: function () { return [{ type: DbxButton, decorators: [{
|
|
1655
|
-
type: Host
|
|
1656
|
-
}] }, { type: DbxActionContextStoreSourceInstance }]; } });
|
|
1775
|
+
function toParsedHasAuthStateConfig(input) {
|
|
1776
|
+
return {
|
|
1777
|
+
allowed: maybeSet(input.allowedStates),
|
|
1778
|
+
disallowed: maybeSet(input.disallowedStates)
|
|
1779
|
+
};
|
|
1780
|
+
}
|
|
1657
1781
|
|
|
1782
|
+
const DBX_INIT_APP_CONTEXT_STATE = 'init';
|
|
1658
1783
|
/**
|
|
1659
|
-
*
|
|
1784
|
+
*
|
|
1660
1785
|
*/
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1786
|
+
const DBX_PUBLIC_APP_CONTEXT_STATE = 'public';
|
|
1787
|
+
/**
|
|
1788
|
+
*
|
|
1789
|
+
*/
|
|
1790
|
+
const DBX_AUTH_APP_CONTEXT_STATE = 'auth';
|
|
1791
|
+
/**
|
|
1792
|
+
*
|
|
1793
|
+
*/
|
|
1794
|
+
const DBX_ONBOARDING_APP_CONTEXT_STATE = 'onboarding';
|
|
1795
|
+
/**
|
|
1796
|
+
*
|
|
1797
|
+
*/
|
|
1798
|
+
const DBX_APP_APP_CONTEXT_STATE = 'app';
|
|
1799
|
+
/**
|
|
1800
|
+
* Array of all DbxKnownAppContextState values, minus the init state.
|
|
1801
|
+
*/
|
|
1802
|
+
const DBX_KNOWN_APP_CONTEXT_STATES = [DBX_PUBLIC_APP_CONTEXT_STATE, DBX_AUTH_APP_CONTEXT_STATE, DBX_ONBOARDING_APP_CONTEXT_STATE, DBX_APP_APP_CONTEXT_STATE];
|
|
1803
|
+
|
|
1804
|
+
/**
|
|
1805
|
+
* Action to set the current DbxAppContextState value.
|
|
1806
|
+
*/
|
|
1807
|
+
const setState = createAction('[App/Context] Set State', props());
|
|
1808
|
+
/**
|
|
1809
|
+
* Resets the app back to the init context.
|
|
1810
|
+
*/
|
|
1811
|
+
const resetState = createAction('[App/Context] Reset');
|
|
1812
|
+
|
|
1813
|
+
var data_action = /*#__PURE__*/Object.freeze({
|
|
1814
|
+
__proto__: null,
|
|
1815
|
+
setState: setState,
|
|
1816
|
+
resetState: resetState
|
|
1817
|
+
});
|
|
1818
|
+
|
|
1819
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
|
1820
|
+
__proto__: null,
|
|
1821
|
+
DbxAppContextActions: data_action
|
|
1822
|
+
});
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* The feature key for these items/reducers.
|
|
1826
|
+
*/
|
|
1827
|
+
const dbxAppContextStateFeatureKey = 'data';
|
|
1828
|
+
const initialState$1 = {
|
|
1829
|
+
state: DBX_INIT_APP_CONTEXT_STATE
|
|
1830
|
+
};
|
|
1831
|
+
const reducer$1 = createReducer(initialState$1,
|
|
1832
|
+
/**
|
|
1833
|
+
* When DbxAppContextActions.dbxAppContextSetState is pushed, update the app's state to match the argument state.
|
|
1834
|
+
*/
|
|
1835
|
+
on(setState, (_, { state }) => ({ state })));
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
* Global feature key for our app.
|
|
1839
|
+
*/
|
|
1840
|
+
const featureKey$1 = 'app.context';
|
|
1841
|
+
/**
|
|
1842
|
+
* Reducers mapping for the DbxAppContextFeatureState
|
|
1843
|
+
*/
|
|
1844
|
+
function reducers$1(state, action) {
|
|
1845
|
+
return combineReducers({
|
|
1846
|
+
[dbxAppContextStateFeatureKey]: reducer$1
|
|
1847
|
+
})(state, action);
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* Selects the DbxAppContextFeatureState feature context.
|
|
1851
|
+
*
|
|
1852
|
+
* Used by createSelector() to retrieve more specific data from the DbxAppContextFeatureState.
|
|
1853
|
+
*/
|
|
1854
|
+
const selectAppContextFeature = createFeatureSelector(featureKey$1);
|
|
1855
|
+
/**
|
|
1856
|
+
* Selector to retrieve the state value from our DbxAppContextStateData in our DbxAppContextFeatureState.
|
|
1857
|
+
*/
|
|
1858
|
+
const selectDbxAppContextState = createSelector(selectAppContextFeature, (featureState) => featureState[dbxAppContextStateFeatureKey].state);
|
|
1859
|
+
|
|
1860
|
+
var index$2 = /*#__PURE__*/Object.freeze({
|
|
1861
|
+
__proto__: null,
|
|
1862
|
+
featureKey: featureKey$1,
|
|
1863
|
+
reducers: reducers$1,
|
|
1864
|
+
selectAppContextFeature: selectAppContextFeature,
|
|
1865
|
+
selectDbxAppContextState: selectDbxAppContextState
|
|
1866
|
+
});
|
|
1867
|
+
|
|
1868
|
+
// MARK: Abstract Context Effects
|
|
1869
|
+
/**
|
|
1870
|
+
* Abstract effects class that only runs/allows effects when the DbxAppContextState in the ngrx state matches input activeState value.
|
|
1871
|
+
*/
|
|
1872
|
+
class AbstractOnDbxAppContextStateEffects {
|
|
1873
|
+
constructor(
|
|
1874
|
+
/**
|
|
1875
|
+
* The state(s) to activate on.
|
|
1876
|
+
*/
|
|
1877
|
+
activeStates,
|
|
1878
|
+
/**
|
|
1879
|
+
* ngrx Actions
|
|
1880
|
+
*/
|
|
1881
|
+
actions$,
|
|
1882
|
+
/**
|
|
1883
|
+
* ngrx Store
|
|
1884
|
+
*/
|
|
1885
|
+
store) {
|
|
1886
|
+
this.actions$ = actions$;
|
|
1887
|
+
this.store = store;
|
|
1888
|
+
this._activeStatesSet = new Set(activeStates);
|
|
1678
1889
|
}
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1890
|
+
/**
|
|
1891
|
+
* Configures all actions of the sub-class to only activate when the DbxAppContextState in App
|
|
1892
|
+
*
|
|
1893
|
+
* @param resolvedEffects$
|
|
1894
|
+
* @returns
|
|
1895
|
+
*/
|
|
1896
|
+
ngrxOnRunEffects(resolvedEffects$) {
|
|
1897
|
+
return this.actions$.pipe(ofType(setState), filter$1(({ state }) => {
|
|
1898
|
+
return this._activeStatesSet.has(state);
|
|
1899
|
+
}), exhaustMap$1(() => resolvedEffects$.pipe(takeUntil(this.actions$.pipe(ofType(setState), filter$1(({ state }) => !this._activeStatesSet.has(state)))))));
|
|
1683
1900
|
}
|
|
1684
1901
|
}
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1902
|
+
|
|
1903
|
+
const NO_AUTH_USER_IDENTIFIER = '0';
|
|
1904
|
+
/**
|
|
1905
|
+
* Creates an AuthUserIdentifier from the input. If the input is undefined, returns the NoAuthUserIdentifier.
|
|
1906
|
+
*
|
|
1907
|
+
* @param inputId
|
|
1908
|
+
* @returns
|
|
1909
|
+
*/
|
|
1910
|
+
function authUserIdentifier(inputId) {
|
|
1911
|
+
return (inputId) ? inputId : NO_AUTH_USER_IDENTIFIER;
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
/**
|
|
1915
|
+
* Action for when the user has logged in.
|
|
1916
|
+
*/
|
|
1917
|
+
const loggedIn = createAction('[App/Auth] Auth Logged In');
|
|
1918
|
+
/**
|
|
1919
|
+
* Action for when the user has logged out.
|
|
1920
|
+
*/
|
|
1921
|
+
const loggedOut = createAction('[App/Auth] Auth Logged Out');
|
|
1922
|
+
/**
|
|
1923
|
+
* Action to log the user out.
|
|
1924
|
+
*/
|
|
1925
|
+
const logout = createAction('[App/Auth] Auth Logout');
|
|
1926
|
+
|
|
1927
|
+
var auth_action = /*#__PURE__*/Object.freeze({
|
|
1928
|
+
__proto__: null,
|
|
1929
|
+
loggedIn: loggedIn,
|
|
1930
|
+
loggedOut: loggedOut,
|
|
1931
|
+
logout: logout
|
|
1932
|
+
});
|
|
1933
|
+
|
|
1934
|
+
/**
|
|
1935
|
+
* Sets the user's identifier in the auth.
|
|
1936
|
+
*/
|
|
1937
|
+
const setUserIdentifier = createAction('[App/Auth] Set User Identifier', props());
|
|
1938
|
+
/**
|
|
1939
|
+
* Sets the user's state in the auth.
|
|
1940
|
+
*/
|
|
1941
|
+
const setUserState = createAction('[App/Auth] Set User State', props());
|
|
1942
|
+
/**
|
|
1943
|
+
* Sets the user's roles in the auth.
|
|
1944
|
+
*/
|
|
1945
|
+
const setUserRoles = createAction('[App/Auth] Set User Roles', props());
|
|
1946
|
+
/**
|
|
1947
|
+
* Sets the user's onboarding state.
|
|
1948
|
+
*/
|
|
1949
|
+
const setUserIsOnboarded = createAction('[App/Auth] Set User Is Onboarded', props());
|
|
1950
|
+
|
|
1951
|
+
var user_action = /*#__PURE__*/Object.freeze({
|
|
1952
|
+
__proto__: null,
|
|
1953
|
+
setUserIdentifier: setUserIdentifier,
|
|
1954
|
+
setUserState: setUserState,
|
|
1955
|
+
setUserRoles: setUserRoles,
|
|
1956
|
+
setUserIsOnboarded: setUserIsOnboarded
|
|
1957
|
+
});
|
|
1958
|
+
|
|
1959
|
+
var index$1 = /*#__PURE__*/Object.freeze({
|
|
1960
|
+
__proto__: null,
|
|
1961
|
+
DbxAppAuthActions: auth_action,
|
|
1962
|
+
DbxAppAuthUserActions: user_action
|
|
1963
|
+
});
|
|
1964
|
+
|
|
1965
|
+
const dbxAppAuthUserFeatureKey = 'user';
|
|
1966
|
+
const initialState = {
|
|
1967
|
+
userId: NO_AUTH_USER_IDENTIFIER,
|
|
1968
|
+
isOnboarded: false,
|
|
1969
|
+
userState: 'none',
|
|
1970
|
+
userRoles: []
|
|
1971
|
+
};
|
|
1972
|
+
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: Array.from(userRoles) })));
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* Global feature key
|
|
1976
|
+
*/
|
|
1977
|
+
const featureKey = 'app.auth';
|
|
1978
|
+
/**
|
|
1979
|
+
* Reducers mapping for the DbxAppAuthFeatureState
|
|
1980
|
+
*/
|
|
1981
|
+
function reducers(state, action) {
|
|
1982
|
+
return combineReducers({
|
|
1983
|
+
[dbxAppAuthUserFeatureKey]: reducer
|
|
1984
|
+
})(state, action);
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* Selects the DbxAppAuthFeatureState feature context.
|
|
1988
|
+
*/
|
|
1989
|
+
const selectAppAuthFeature = createFeatureSelector(featureKey);
|
|
1990
|
+
/**
|
|
1991
|
+
* Selector to retrieve the state value from our DbxAppContextStateData in our DbxAppContextFeatureState.
|
|
1992
|
+
*/
|
|
1993
|
+
const selectDbxAppAuthUser = createSelector(selectAppAuthFeature, (featureState) => featureState[dbxAppAuthUserFeatureKey]);
|
|
1994
|
+
|
|
1995
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
1996
|
+
__proto__: null,
|
|
1997
|
+
featureKey: featureKey,
|
|
1998
|
+
reducers: reducers,
|
|
1999
|
+
selectAppAuthFeature: selectAppAuthFeature,
|
|
2000
|
+
selectDbxAppAuthUser: selectDbxAppAuthUser
|
|
2001
|
+
});
|
|
1695
2002
|
|
|
1696
2003
|
const expandClickableAnchorLinkTreeNode = expandTreeFunction({
|
|
1697
2004
|
getChildren: (x) => x.children
|
|
@@ -1754,6 +2061,28 @@ function ProvideDbxAnchor(sourceType) {
|
|
|
1754
2061
|
}];
|
|
1755
2062
|
}
|
|
1756
2063
|
|
|
2064
|
+
function isSegueRef(input) {
|
|
2065
|
+
return (typeof input === 'object') && input.ref != null;
|
|
2066
|
+
}
|
|
2067
|
+
function asSegueRef(input) {
|
|
2068
|
+
const type = typeof input;
|
|
2069
|
+
if (type === 'string') {
|
|
2070
|
+
return refStringToSegueRef(input);
|
|
2071
|
+
}
|
|
2072
|
+
else if (isSegueRef(input)) {
|
|
2073
|
+
return input;
|
|
2074
|
+
}
|
|
2075
|
+
else {
|
|
2076
|
+
return { ref: undefined };
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
function refStringToSegueRef(ref, options) {
|
|
2080
|
+
return { ...options, ref };
|
|
2081
|
+
}
|
|
2082
|
+
function mapRefStringObsToSegueRefObs(obs, options) {
|
|
2083
|
+
return obs.pipe(map$1(x => refStringToSegueRef(x, options)));
|
|
2084
|
+
}
|
|
2085
|
+
|
|
1757
2086
|
/**
|
|
1758
2087
|
* Abstract anchor directive.
|
|
1759
2088
|
*/
|
|
@@ -1763,7 +2092,17 @@ class AbstractDbxAnchorDirective {
|
|
|
1763
2092
|
this._anchor = new BehaviorSubject(undefined);
|
|
1764
2093
|
this.disabled$ = this._disabled.asObservable();
|
|
1765
2094
|
this.anchor$ = this._anchor.pipe(skipFirstMaybe(), distinctUntilChanged(), shareReplay(1));
|
|
1766
|
-
this.type$ = combineLatest([this.disabled$, this.anchor$]).pipe(delay
|
|
2095
|
+
this.type$ = combineLatest([this.disabled$, this.anchor$]).pipe(delay(0), map(([disabled, anchor]) => anchorTypeForAnchor(anchor, disabled)), distinctUntilChanged(), shareReplay(1));
|
|
2096
|
+
}
|
|
2097
|
+
ngOnDestroy() {
|
|
2098
|
+
this._disabled.complete();
|
|
2099
|
+
this._anchor.complete();
|
|
2100
|
+
}
|
|
2101
|
+
/**
|
|
2102
|
+
* Convenience input to create an Anchor from the input SegueRef.
|
|
2103
|
+
*/
|
|
2104
|
+
set ref(ref) {
|
|
2105
|
+
this.anchor = asSegueRef(ref);
|
|
1767
2106
|
}
|
|
1768
2107
|
get anchor() {
|
|
1769
2108
|
return this._anchor.value;
|
|
@@ -1778,11 +2117,13 @@ class AbstractDbxAnchorDirective {
|
|
|
1778
2117
|
this._disabled.next(disabled);
|
|
1779
2118
|
}
|
|
1780
2119
|
}
|
|
1781
|
-
AbstractDbxAnchorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1782
|
-
AbstractDbxAnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1783
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2120
|
+
AbstractDbxAnchorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxAnchorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2121
|
+
AbstractDbxAnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractDbxAnchorDirective, inputs: { ref: "ref", anchor: "anchor", disabled: "disabled" }, ngImport: i0 });
|
|
2122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxAnchorDirective, decorators: [{
|
|
1784
2123
|
type: Directive
|
|
1785
|
-
}], propDecorators: {
|
|
2124
|
+
}], ctorParameters: function () { return []; }, propDecorators: { ref: [{
|
|
2125
|
+
type: Input
|
|
2126
|
+
}], anchor: [{
|
|
1786
2127
|
type: Input
|
|
1787
2128
|
}], disabled: [{
|
|
1788
2129
|
type: Input
|
|
@@ -1807,6 +2148,7 @@ class DbxAngularRouterService {
|
|
|
1807
2148
|
constructor(router, activatedRoute) {
|
|
1808
2149
|
this.router = router;
|
|
1809
2150
|
this.activatedRoute = activatedRoute;
|
|
2151
|
+
this.params$ = this.activatedRoute.params;
|
|
1810
2152
|
this.transitions$ = this.router.events.pipe(map((x) => {
|
|
1811
2153
|
let event;
|
|
1812
2154
|
if (x instanceof NavigationStart) {
|
|
@@ -1822,7 +2164,8 @@ class DbxAngularRouterService {
|
|
|
1822
2164
|
return event;
|
|
1823
2165
|
}), filterMaybe());
|
|
1824
2166
|
}
|
|
1825
|
-
go(
|
|
2167
|
+
go(input) {
|
|
2168
|
+
const segueRef = asSegueRef(input);
|
|
1826
2169
|
let ref = segueRef.ref;
|
|
1827
2170
|
if (isArray(ref)) {
|
|
1828
2171
|
return this.router.navigate(ref, {
|
|
@@ -1843,9 +2186,9 @@ class DbxAngularRouterService {
|
|
|
1843
2186
|
return 0; // TODO!
|
|
1844
2187
|
}
|
|
1845
2188
|
}
|
|
1846
|
-
DbxAngularRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1847
|
-
DbxAngularRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
1848
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2189
|
+
DbxAngularRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAngularRouterService, deps: [{ token: i1$1.Router }, { token: i1$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2190
|
+
DbxAngularRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAngularRouterService });
|
|
2191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAngularRouterService, decorators: [{
|
|
1849
2192
|
type: Injectable
|
|
1850
2193
|
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }]; } });
|
|
1851
2194
|
|
|
@@ -1855,6 +2198,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1855
2198
|
class DbxRouterService {
|
|
1856
2199
|
}
|
|
1857
2200
|
|
|
2201
|
+
/**
|
|
2202
|
+
* Creates a GoWithRouter function.
|
|
2203
|
+
*
|
|
2204
|
+
* @param dbxRouterService
|
|
2205
|
+
* @returns
|
|
2206
|
+
*/
|
|
2207
|
+
function goWithRouter(dbxRouterService) {
|
|
2208
|
+
return (route) => {
|
|
2209
|
+
return firstValueFrom(asObservable(route)).then(x => dbxRouterService.go(x));
|
|
2210
|
+
};
|
|
2211
|
+
}
|
|
2212
|
+
|
|
1858
2213
|
/**
|
|
1859
2214
|
* Router service definition that provides high level information about router transitions.
|
|
1860
2215
|
*/
|
|
@@ -1879,10 +2234,10 @@ class DbxCoreAngularRouterSegueModule {
|
|
|
1879
2234
|
};
|
|
1880
2235
|
}
|
|
1881
2236
|
}
|
|
1882
|
-
DbxCoreAngularRouterSegueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1883
|
-
DbxCoreAngularRouterSegueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1884
|
-
DbxCoreAngularRouterSegueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1885
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2237
|
+
DbxCoreAngularRouterSegueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAngularRouterSegueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2238
|
+
DbxCoreAngularRouterSegueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAngularRouterSegueModule });
|
|
2239
|
+
DbxCoreAngularRouterSegueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAngularRouterSegueModule });
|
|
2240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAngularRouterSegueModule, decorators: [{
|
|
1886
2241
|
type: NgModule,
|
|
1887
2242
|
args: [{}]
|
|
1888
2243
|
}] });
|
|
@@ -1932,12 +2287,15 @@ class DbxUIRouterService {
|
|
|
1932
2287
|
this.state = state;
|
|
1933
2288
|
this.transitionService = transitionService;
|
|
1934
2289
|
this.uiRouterGlobals = uiRouterGlobals;
|
|
2290
|
+
this._params = new BehaviorSubject(this.uiRouterGlobals.params);
|
|
2291
|
+
this.params$ = this._params.asObservable();
|
|
1935
2292
|
this._transitions = new Subject();
|
|
1936
2293
|
this.transitions$ = this._transitions.asObservable();
|
|
1937
2294
|
const emitTransition = (type) => {
|
|
1938
2295
|
this._transitions.next({
|
|
1939
2296
|
type
|
|
1940
2297
|
});
|
|
2298
|
+
this._params.next(this.uiRouterGlobals.params);
|
|
1941
2299
|
};
|
|
1942
2300
|
this.transitionService.onStart({}, () => {
|
|
1943
2301
|
emitTransition(DbxRouterTransitionEventType.START);
|
|
@@ -1946,27 +2304,45 @@ class DbxUIRouterService {
|
|
|
1946
2304
|
emitTransition(DbxRouterTransitionEventType.SUCCESS);
|
|
1947
2305
|
});
|
|
1948
2306
|
}
|
|
1949
|
-
|
|
2307
|
+
ngOnDestroy() {
|
|
2308
|
+
this._transitions.complete();
|
|
2309
|
+
}
|
|
2310
|
+
get params() {
|
|
2311
|
+
return this.uiRouterGlobals.params;
|
|
2312
|
+
}
|
|
2313
|
+
go(input) {
|
|
2314
|
+
const segueRef = asSegueRef(input);
|
|
1950
2315
|
const params = { ...this.uiRouterGlobals.current.params, ...segueRef.refParams };
|
|
1951
2316
|
return this.state.go(segueRef.ref, params, segueRef.refOptions).then(_ => true).catch(_ => false);
|
|
1952
2317
|
}
|
|
1953
|
-
isActive(
|
|
2318
|
+
isActive(input) {
|
|
2319
|
+
const segueRef = asSegueRef(input);
|
|
1954
2320
|
const { ref, refParams } = segueRef;
|
|
1955
2321
|
const targetRef = (ref.startsWith('.') ? `^${ref}` : ref);
|
|
1956
2322
|
const active = this.state.includes(targetRef, refParams);
|
|
1957
2323
|
return active;
|
|
1958
2324
|
}
|
|
1959
|
-
comparePrecision(
|
|
1960
|
-
const
|
|
1961
|
-
const
|
|
2325
|
+
comparePrecision(aInput, bInput) {
|
|
2326
|
+
const aRef = readSegueRefString(aInput);
|
|
2327
|
+
const bRef = readSegueRefString(bInput);
|
|
2328
|
+
const aLength = aRef.length;
|
|
2329
|
+
const bLength = bRef.length;
|
|
1962
2330
|
return (aLength > bLength) ? 1 : (aLength === bLength) ? 0 : -1;
|
|
1963
2331
|
}
|
|
1964
2332
|
}
|
|
1965
|
-
DbxUIRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1966
|
-
DbxUIRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
1967
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2333
|
+
DbxUIRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxUIRouterService, deps: [{ token: i1$2.StateService }, { token: i1$2.TransitionService }, { token: i1$2.UIRouterGlobals }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2334
|
+
DbxUIRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxUIRouterService });
|
|
2335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxUIRouterService, decorators: [{
|
|
1968
2336
|
type: Injectable
|
|
1969
2337
|
}], ctorParameters: function () { return [{ type: i1$2.StateService }, { type: i1$2.TransitionService }, { type: i1$2.UIRouterGlobals }]; } });
|
|
2338
|
+
function readSegueRefString(input) {
|
|
2339
|
+
if (typeof input === 'string') {
|
|
2340
|
+
return input;
|
|
2341
|
+
}
|
|
2342
|
+
else {
|
|
2343
|
+
return input?.ref ?? '';
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
1970
2346
|
|
|
1971
2347
|
class DbxCoreUIRouterSegueModule {
|
|
1972
2348
|
static forRoot() {
|
|
@@ -1986,80 +2362,532 @@ class DbxCoreUIRouterSegueModule {
|
|
|
1986
2362
|
};
|
|
1987
2363
|
}
|
|
1988
2364
|
}
|
|
1989
|
-
DbxCoreUIRouterSegueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1990
|
-
DbxCoreUIRouterSegueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1991
|
-
DbxCoreUIRouterSegueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1992
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
1993
|
-
type: NgModule,
|
|
1994
|
-
args: [{}]
|
|
1995
|
-
}] });
|
|
2365
|
+
DbxCoreUIRouterSegueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreUIRouterSegueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2366
|
+
DbxCoreUIRouterSegueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreUIRouterSegueModule });
|
|
2367
|
+
DbxCoreUIRouterSegueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreUIRouterSegueModule });
|
|
2368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreUIRouterSegueModule, decorators: [{
|
|
2369
|
+
type: NgModule,
|
|
2370
|
+
args: [{}]
|
|
2371
|
+
}] });
|
|
2372
|
+
|
|
2373
|
+
/**
|
|
2374
|
+
* Convenience function for filtering success from the input observable.
|
|
2375
|
+
*
|
|
2376
|
+
* @param obs
|
|
2377
|
+
* @returns
|
|
2378
|
+
*/
|
|
2379
|
+
function successTransition(obs) {
|
|
2380
|
+
return obs.pipe(filterTransitionSuccess());
|
|
2381
|
+
}
|
|
2382
|
+
function filterTransitionSuccess() {
|
|
2383
|
+
return filterTransitionEvent(DbxRouterTransitionEventType.SUCCESS);
|
|
2384
|
+
}
|
|
2385
|
+
function filterTransitionEvent(type) {
|
|
2386
|
+
return filter$1(x => x.type === type);
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
/**
|
|
2390
|
+
* Abstract directive that listens to onSuccess transition events and runs a function.
|
|
2391
|
+
*/
|
|
2392
|
+
class AbstractTransitionDirective {
|
|
2393
|
+
constructor(dbxRouterTransitionService) {
|
|
2394
|
+
this.dbxRouterTransitionService = dbxRouterTransitionService;
|
|
2395
|
+
this.transitionSuccess$ = successTransition(this.dbxRouterTransitionService.transitions$);
|
|
2396
|
+
this.initAndUpdateOnTransitionSuccess$ = this.transitionSuccess$.pipe(startWith$1(undefined));
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
AbstractTransitionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractTransitionDirective, deps: [{ token: DbxRouterTransitionService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2400
|
+
AbstractTransitionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractTransitionDirective, ngImport: i0 });
|
|
2401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractTransitionDirective, decorators: [{
|
|
2402
|
+
type: Directive
|
|
2403
|
+
}], ctorParameters: function () { return [{ type: DbxRouterTransitionService }]; } });
|
|
2404
|
+
|
|
2405
|
+
/**
|
|
2406
|
+
* Abstract directive that listens to onSuccess transition events and runs a function.
|
|
2407
|
+
*/
|
|
2408
|
+
class AbstractTransitionWatcherDirective extends AbstractTransitionDirective {
|
|
2409
|
+
constructor(dbxRouterTransitionService, ngZone) {
|
|
2410
|
+
super(dbxRouterTransitionService);
|
|
2411
|
+
this.ngZone = ngZone;
|
|
2412
|
+
this._transitionSub = new SubscriptionObject();
|
|
2413
|
+
}
|
|
2414
|
+
ngOnInit() {
|
|
2415
|
+
this._transitionSub.subscription = this.transitionSuccess$.subscribe(() => {
|
|
2416
|
+
this.updateForSuccessfulTransition();
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2419
|
+
ngOnDestroy() {
|
|
2420
|
+
this._transitionSub.destroy();
|
|
2421
|
+
}
|
|
2422
|
+
// MARK: Action
|
|
2423
|
+
zoneUpdateForSuccessfulTransition() {
|
|
2424
|
+
this.ngZone.run(() => this.updateForSuccessfulTransition());
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
AbstractTransitionWatcherDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractTransitionWatcherDirective, deps: [{ token: DbxRouterTransitionService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2428
|
+
AbstractTransitionWatcherDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractTransitionWatcherDirective, usesInheritance: true, ngImport: i0 });
|
|
2429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractTransitionWatcherDirective, decorators: [{
|
|
2430
|
+
type: Directive
|
|
2431
|
+
}], ctorParameters: function () { return [{ type: DbxRouterTransitionService }, { type: i0.NgZone }]; } });
|
|
2432
|
+
|
|
2433
|
+
/**
|
|
2434
|
+
* Auth routes configurations for an app.
|
|
2435
|
+
*/
|
|
2436
|
+
class DbxAppAuthRoutes {
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
/**
|
|
2440
|
+
* Helper service for navigating to important auth-related routes.
|
|
2441
|
+
*/
|
|
2442
|
+
class DbxAppAuthRouterService {
|
|
2443
|
+
constructor(dbxRouterService, dbxAppAuthRoutes) {
|
|
2444
|
+
this.dbxRouterService = dbxRouterService;
|
|
2445
|
+
this.dbxAppAuthRoutes = dbxAppAuthRoutes;
|
|
2446
|
+
}
|
|
2447
|
+
get hasOnboardingState() {
|
|
2448
|
+
return Boolean(this.dbxAppAuthRoutes.onboardRef);
|
|
2449
|
+
}
|
|
2450
|
+
// MARK: Navigate
|
|
2451
|
+
/**
|
|
2452
|
+
* Navigates to the login state.
|
|
2453
|
+
*
|
|
2454
|
+
* @returns
|
|
2455
|
+
*/
|
|
2456
|
+
goToLogin() {
|
|
2457
|
+
return goWithRouter(this.dbxRouterService)(this.dbxAppAuthRoutes.loginRef);
|
|
2458
|
+
}
|
|
2459
|
+
/**
|
|
2460
|
+
* Navigates to the logged out state, if it exists, otherwise navigates to the login state.
|
|
2461
|
+
*
|
|
2462
|
+
* @returns
|
|
2463
|
+
*/
|
|
2464
|
+
goToLoggedOut() {
|
|
2465
|
+
return goWithRouter(this.dbxRouterService)(this.dbxAppAuthRoutes.loggedOutRef ?? this.dbxAppAuthRoutes.loginRef);
|
|
2466
|
+
}
|
|
2467
|
+
/**
|
|
2468
|
+
* Navigates to the onboarding state if it is available, otherwise navigates to the app.
|
|
2469
|
+
*
|
|
2470
|
+
* @returns
|
|
2471
|
+
*/
|
|
2472
|
+
goToOnboarding() {
|
|
2473
|
+
return goWithRouter(this.dbxRouterService)(this.dbxAppAuthRoutes.onboardRef ?? this.dbxAppAuthRoutes.appRef);
|
|
2474
|
+
}
|
|
2475
|
+
/**
|
|
2476
|
+
* Navigates to the app state.
|
|
2477
|
+
*
|
|
2478
|
+
* @returns
|
|
2479
|
+
*/
|
|
2480
|
+
goToApp() {
|
|
2481
|
+
return goWithRouter(this.dbxRouterService)(this.dbxAppAuthRoutes.appRef);
|
|
2482
|
+
}
|
|
2483
|
+
}
|
|
2484
|
+
DbxAppAuthRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterService, deps: [{ token: DbxRouterService }, { token: DbxAppAuthRoutes }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2485
|
+
DbxAppAuthRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterService, providedIn: 'root' });
|
|
2486
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterService, decorators: [{
|
|
2487
|
+
type: Injectable,
|
|
2488
|
+
args: [{
|
|
2489
|
+
providedIn: 'root'
|
|
2490
|
+
}]
|
|
2491
|
+
}], ctorParameters: function () { return [{ type: DbxRouterService }, { type: DbxAppAuthRoutes }]; } });
|
|
2492
|
+
|
|
2493
|
+
/**
|
|
2494
|
+
* Used by DbxAppAuthRouterEffects to configure the states that should be activve by default.
|
|
2495
|
+
*/
|
|
2496
|
+
const DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN = new InjectionToken('DbxAppAuthRouterEffectsActiveStates');
|
|
2497
|
+
/**
|
|
2498
|
+
* Set of ngrx effects that handle navigation in the app when the auth changes in certain ways.
|
|
2499
|
+
*
|
|
2500
|
+
* Is configurable via the DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN to choose which states this effect is active or not. By default is equal to DBX_KNOWN_APP_CONTEXT_STATES.
|
|
2501
|
+
*/
|
|
2502
|
+
class DbxAppAuthRouterEffects extends AbstractOnDbxAppContextStateEffects {
|
|
2503
|
+
constructor(activeStates, actions$, store, dbxAppAuthRouterService) {
|
|
2504
|
+
super(activeStates ?? DBX_KNOWN_APP_CONTEXT_STATES, actions$, store);
|
|
2505
|
+
this.dbxAppAuthRouterService = dbxAppAuthRouterService;
|
|
2506
|
+
/**
|
|
2507
|
+
* Effect to redirect to the login when logout occurs.
|
|
2508
|
+
*/
|
|
2509
|
+
this.redirectToLoginOnLogout = createEffect(() => this.actions$.pipe(ofType(loggedOut), exhaustMap$1(() => this.dbxAppAuthRouterService.goToLogin())), { dispatch: false });
|
|
2510
|
+
/**
|
|
2511
|
+
* Effect to redirect to the app when login occurs.
|
|
2512
|
+
*/
|
|
2513
|
+
this.redirectToOnboardOnLogIn = createEffect(() => this.actions$.pipe(ofType(loggedIn), exhaustMap$1(() => this.dbxAppAuthRouterService.goToApp())), { dispatch: false });
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
DbxAppAuthRouterEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterEffects, deps: [{ token: DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN, optional: true }, { token: i1$3.Actions }, { token: i1$4.Store }, { token: DbxAppAuthRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2517
|
+
DbxAppAuthRouterEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterEffects });
|
|
2518
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterEffects, decorators: [{
|
|
2519
|
+
type: Injectable
|
|
2520
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
2521
|
+
type: Inject,
|
|
2522
|
+
args: [DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN]
|
|
2523
|
+
}, {
|
|
2524
|
+
type: Optional
|
|
2525
|
+
}] }, { type: i1$3.Actions }, { type: i1$4.Store }, { type: DbxAppAuthRouterService }]; } });
|
|
2526
|
+
|
|
2527
|
+
class DbxAppAuthRouterStateModule {
|
|
2528
|
+
static forRoot(config) {
|
|
2529
|
+
return {
|
|
2530
|
+
ngModule: DbxAppAuthRouterStateModule,
|
|
2531
|
+
providers: [{
|
|
2532
|
+
provide: DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN,
|
|
2533
|
+
useValue: config.activeRoutesToApplyEffects
|
|
2534
|
+
}]
|
|
2535
|
+
};
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
DbxAppAuthRouterStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2539
|
+
DbxAppAuthRouterStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterStateModule, imports: [i1$3.EffectsFeatureModule] });
|
|
2540
|
+
DbxAppAuthRouterStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterStateModule, imports: [[
|
|
2541
|
+
EffectsModule.forFeature([DbxAppAuthRouterEffects])
|
|
2542
|
+
]] });
|
|
2543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterStateModule, decorators: [{
|
|
2544
|
+
type: NgModule,
|
|
2545
|
+
args: [{
|
|
2546
|
+
imports: [
|
|
2547
|
+
EffectsModule.forFeature([DbxAppAuthRouterEffects])
|
|
2548
|
+
],
|
|
2549
|
+
declarations: [],
|
|
2550
|
+
exports: []
|
|
2551
|
+
}]
|
|
2552
|
+
}] });
|
|
2553
|
+
|
|
2554
|
+
class DbxAppAuthRouterModule {
|
|
2555
|
+
static forRoot(dbxAppAuthRoutes) {
|
|
2556
|
+
return {
|
|
2557
|
+
ngModule: DbxAppAuthRouterModule,
|
|
2558
|
+
providers: [{
|
|
2559
|
+
provide: DbxAppAuthRoutes,
|
|
2560
|
+
useValue: dbxAppAuthRoutes
|
|
2561
|
+
}]
|
|
2562
|
+
};
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
DbxAppAuthRouterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2566
|
+
DbxAppAuthRouterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterModule });
|
|
2567
|
+
DbxAppAuthRouterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterModule, imports: [[]] });
|
|
2568
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterModule, decorators: [{
|
|
2569
|
+
type: NgModule,
|
|
2570
|
+
args: [{
|
|
2571
|
+
imports: [],
|
|
2572
|
+
declarations: [],
|
|
2573
|
+
exports: []
|
|
2574
|
+
}]
|
|
2575
|
+
}] });
|
|
2576
|
+
|
|
2577
|
+
/**
|
|
2578
|
+
* Convenience operator that emits events when the input observable goes from false to true.
|
|
2579
|
+
*
|
|
2580
|
+
* @param isLoggedInObs
|
|
2581
|
+
* @returns
|
|
2582
|
+
*/
|
|
2583
|
+
function loggedInObsFromIsLoggedIn(isLoggedInObs) {
|
|
2584
|
+
return isLoggedInObs.pipe(onFalseToTrue(), map$1(_ => undefined));
|
|
2585
|
+
}
|
|
2586
|
+
/**
|
|
2587
|
+
* Convenience operator that emits events when the input observable goes from true to false.
|
|
2588
|
+
*
|
|
2589
|
+
* @param isLoggedInObs
|
|
2590
|
+
* @returns
|
|
2591
|
+
*/
|
|
2592
|
+
function loggedOutObsFromIsLoggedIn(isLoggedInObs) {
|
|
2593
|
+
return isLoggedInObs.pipe(onTrueToFalse(), map$1(_ => undefined));
|
|
2594
|
+
}
|
|
2595
|
+
function authRolesSetContainsAllRolesFrom(roles) {
|
|
2596
|
+
return setContainsAllValuesFrom(roles);
|
|
2597
|
+
}
|
|
2598
|
+
function authRolesSetContainsAnyRoleFrom(roles) {
|
|
2599
|
+
return setContainsAllValuesFrom(roles);
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
/**
|
|
2603
|
+
* Structural decorator directive similar to ngIf that embeds content if the current auth user has any of the target role(s).
|
|
2604
|
+
*/
|
|
2605
|
+
class DbxAuthHasAnyRoleDirective extends AbstractIfDirective {
|
|
2606
|
+
constructor(templateRef, viewContainer, dbxAuthService) {
|
|
2607
|
+
super(templateRef, viewContainer);
|
|
2608
|
+
this.dbxAuthService = dbxAuthService;
|
|
2609
|
+
this._targetRoles = new BehaviorSubject(undefined);
|
|
2610
|
+
this.targetRoles$ = this._targetRoles.asObservable();
|
|
2611
|
+
this.show$ = this.dbxAuthService.authRoles$.pipe(authRolesSetContainsAnyRoleFrom(this.targetRoles$));
|
|
2612
|
+
}
|
|
2613
|
+
ngOnDestroy() {
|
|
2614
|
+
this._targetRoles.complete();
|
|
2615
|
+
}
|
|
2616
|
+
set targetRoles(roles) {
|
|
2617
|
+
this._targetRoles.next(roles);
|
|
2618
|
+
}
|
|
2619
|
+
}
|
|
2620
|
+
DbxAuthHasAnyRoleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAuthHasAnyRoleDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: DbxAuthService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2621
|
+
DbxAuthHasAnyRoleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxAuthHasAnyRoleDirective, selector: "[dbxAuthHasAnyRole]", inputs: { targetRoles: ["dbxAuthHasAnyRole", "targetRoles"] }, usesInheritance: true, ngImport: i0 });
|
|
2622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAuthHasAnyRoleDirective, decorators: [{
|
|
2623
|
+
type: Directive,
|
|
2624
|
+
args: [{
|
|
2625
|
+
selector: '[dbxAuthHasAnyRole]'
|
|
2626
|
+
}]
|
|
2627
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: DbxAuthService }]; }, propDecorators: { targetRoles: [{
|
|
2628
|
+
type: Input,
|
|
2629
|
+
args: ['dbxAuthHasAnyRole']
|
|
2630
|
+
}] } });
|
|
2631
|
+
|
|
2632
|
+
/**
|
|
2633
|
+
* Structural decorator directive similar to ngIf that embeds content if the current auth user has all of the target role(s).
|
|
2634
|
+
*/
|
|
2635
|
+
class DbxAuthHasRolesDirective extends AbstractIfDirective {
|
|
2636
|
+
constructor(templateRef, viewContainer, dbxAuthService) {
|
|
2637
|
+
super(templateRef, viewContainer);
|
|
2638
|
+
this.dbxAuthService = dbxAuthService;
|
|
2639
|
+
this._targetRoles = new BehaviorSubject(undefined);
|
|
2640
|
+
this.targetRoles$ = this._targetRoles.asObservable();
|
|
2641
|
+
this.show$ = this.dbxAuthService.authRoles$.pipe(authRolesSetContainsAllRolesFrom(this.targetRoles$));
|
|
2642
|
+
}
|
|
2643
|
+
ngOnDestroy() {
|
|
2644
|
+
this._targetRoles.complete();
|
|
2645
|
+
}
|
|
2646
|
+
set targetRoles(roles) {
|
|
2647
|
+
this._targetRoles.next(roles);
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
DbxAuthHasRolesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAuthHasRolesDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: DbxAuthService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2651
|
+
DbxAuthHasRolesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxAuthHasRolesDirective, selector: "[dbxAuthHasRoles]", inputs: { targetRoles: ["dbxAuthHasRoles", "targetRoles"] }, usesInheritance: true, ngImport: i0 });
|
|
2652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAuthHasRolesDirective, decorators: [{
|
|
2653
|
+
type: Directive,
|
|
2654
|
+
args: [{
|
|
2655
|
+
selector: '[dbxAuthHasRoles]'
|
|
2656
|
+
}]
|
|
2657
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: DbxAuthService }]; }, propDecorators: { targetRoles: [{
|
|
2658
|
+
type: Input,
|
|
2659
|
+
args: ['dbxAuthHasRoles']
|
|
2660
|
+
}] } });
|
|
2661
|
+
|
|
2662
|
+
class DbxCoreAuthModule {
|
|
2663
|
+
}
|
|
2664
|
+
DbxCoreAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2665
|
+
DbxCoreAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAuthModule, declarations: [DbxAuthHasRolesDirective,
|
|
2666
|
+
DbxAuthHasAnyRoleDirective], exports: [DbxAuthHasRolesDirective,
|
|
2667
|
+
DbxAuthHasAnyRoleDirective] });
|
|
2668
|
+
DbxCoreAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAuthModule, imports: [[]] });
|
|
2669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAuthModule, decorators: [{
|
|
2670
|
+
type: NgModule,
|
|
2671
|
+
args: [{
|
|
2672
|
+
imports: [],
|
|
2673
|
+
declarations: [
|
|
2674
|
+
DbxAuthHasRolesDirective,
|
|
2675
|
+
DbxAuthHasAnyRoleDirective
|
|
2676
|
+
],
|
|
2677
|
+
exports: [
|
|
2678
|
+
DbxAuthHasRolesDirective,
|
|
2679
|
+
DbxAuthHasAnyRoleDirective
|
|
2680
|
+
]
|
|
2681
|
+
}]
|
|
2682
|
+
}] });
|
|
2683
|
+
|
|
2684
|
+
/**
|
|
2685
|
+
* Set of ngrx effects that repeat events from DbxAuthService.
|
|
2686
|
+
*/
|
|
2687
|
+
class DbxAppAuthEffects {
|
|
2688
|
+
constructor(actions$, store, dbxAuthService) {
|
|
2689
|
+
this.actions$ = actions$;
|
|
2690
|
+
this.store = store;
|
|
2691
|
+
this.dbxAuthService = dbxAuthService;
|
|
2692
|
+
// MARK: Auth
|
|
2693
|
+
this.emitLoggedIn = createEffect(() => this.dbxAuthService.onLogIn$
|
|
2694
|
+
.pipe(map$1(() => loggedIn())));
|
|
2695
|
+
this.emitLoggedOut = createEffect(() => this.dbxAuthService.onLogOut$
|
|
2696
|
+
.pipe(map$1(() => loggedOut())));
|
|
2697
|
+
this.forwardLogoutToAuthService = createEffect(() => this.actions$.pipe(ofType(logout), tap$1(() => {
|
|
2698
|
+
// Perform the logout
|
|
2699
|
+
this.dbxAuthService.logOut();
|
|
2700
|
+
})), { dispatch: false });
|
|
2701
|
+
// MARK: Auth
|
|
2702
|
+
this.setUserIdentifier = createEffect(() => this.dbxAuthService.userIdentifier$
|
|
2703
|
+
.pipe(map$1((id) => setUserIdentifier({ id }))));
|
|
2704
|
+
this.setUserState = createEffect(() => this.dbxAuthService.authUserState$
|
|
2705
|
+
.pipe(map$1((state) => setUserState({ state }))));
|
|
2706
|
+
this.setUserRoles = createEffect(() => this.dbxAuthService.authRoles$
|
|
2707
|
+
.pipe(map$1((roles) => setUserRoles({ roles: Array.from(roles ?? []) }))));
|
|
2708
|
+
this.setUserIsOnboarded = createEffect(() => this.dbxAuthService.isOnboarded$
|
|
2709
|
+
.pipe(map$1((isOnboarded) => setUserIsOnboarded({ isOnboarded }))));
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
DbxAppAuthEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthEffects, deps: [{ token: i1$3.Actions }, { token: i1$4.Store }, { token: DbxAuthService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2713
|
+
DbxAppAuthEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthEffects });
|
|
2714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthEffects, decorators: [{
|
|
2715
|
+
type: Injectable
|
|
2716
|
+
}], ctorParameters: function () { return [{ type: i1$3.Actions }, { type: i1$4.Store }, { type: DbxAuthService }]; } });
|
|
2717
|
+
|
|
2718
|
+
class DbxAppAuthStateModule {
|
|
2719
|
+
}
|
|
2720
|
+
DbxAppAuthStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2721
|
+
DbxAppAuthStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateModule, imports: [i1$4.StoreFeatureModule, i1$3.EffectsFeatureModule] });
|
|
2722
|
+
DbxAppAuthStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateModule, imports: [[
|
|
2723
|
+
StoreModule.forFeature(featureKey, reducers),
|
|
2724
|
+
EffectsModule.forFeature([DbxAppAuthEffects])
|
|
2725
|
+
]] });
|
|
2726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateModule, decorators: [{
|
|
2727
|
+
type: NgModule,
|
|
2728
|
+
args: [{
|
|
2729
|
+
imports: [
|
|
2730
|
+
StoreModule.forFeature(featureKey, reducers),
|
|
2731
|
+
EffectsModule.forFeature([DbxAppAuthEffects])
|
|
2732
|
+
],
|
|
2733
|
+
declarations: [],
|
|
2734
|
+
exports: []
|
|
2735
|
+
}]
|
|
2736
|
+
}] });
|
|
2737
|
+
|
|
2738
|
+
/**
|
|
2739
|
+
* State for accessing the app's DbxAppAuthState defined within the DbxAppAuthFullState for the ngrx store.
|
|
2740
|
+
*/
|
|
2741
|
+
class DbxAppAuthStateService {
|
|
2742
|
+
constructor(store) {
|
|
2743
|
+
this.store = store;
|
|
2744
|
+
this.authStateUser$ = this.store.select(selectDbxAppAuthUser);
|
|
2745
|
+
}
|
|
2746
|
+
}
|
|
2747
|
+
DbxAppAuthStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateService, deps: [{ token: i1$4.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2748
|
+
DbxAppAuthStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateService, providedIn: 'root' });
|
|
2749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateService, decorators: [{
|
|
2750
|
+
type: Injectable,
|
|
2751
|
+
args: [{
|
|
2752
|
+
providedIn: 'root'
|
|
2753
|
+
}]
|
|
2754
|
+
}], ctorParameters: function () { return [{ type: i1$4.Store }]; } });
|
|
2755
|
+
|
|
2756
|
+
/**
|
|
2757
|
+
* Convenience function used within observables for views that need to detect changes after a value changes.
|
|
2758
|
+
*
|
|
2759
|
+
* @param cdRef
|
|
2760
|
+
* @param timeout
|
|
2761
|
+
* @returns
|
|
2762
|
+
*/
|
|
2763
|
+
function tapDetectChanges(cdRef, timeout = 0) {
|
|
2764
|
+
return tap$1(() => setTimeout(() => safeDetectChanges(cdRef), timeout));
|
|
2765
|
+
}
|
|
2766
|
+
/**
|
|
2767
|
+
* Triggers a detection change on the input view as long as the view has not been destroyed.
|
|
2768
|
+
*
|
|
2769
|
+
* @param cdRef
|
|
2770
|
+
*/
|
|
2771
|
+
function safeDetectChanges(cdRef) {
|
|
2772
|
+
safeUseCdRef(cdRef, () => cdRef.detectChanges());
|
|
2773
|
+
}
|
|
2774
|
+
/**
|
|
2775
|
+
* Marks the ChangeDetectorRef for changes as long as the view has not been destroyed.
|
|
2776
|
+
*
|
|
2777
|
+
* @param cdRef
|
|
2778
|
+
*/
|
|
2779
|
+
function safeMarkForCheck(cdRef) {
|
|
2780
|
+
safeUseCdRef(cdRef, () => cdRef.markForCheck());
|
|
2781
|
+
}
|
|
2782
|
+
/**
|
|
2783
|
+
* Triggers a detection change on the input view as long as the view has not been destroyed.
|
|
2784
|
+
*
|
|
2785
|
+
* @param cdRef
|
|
2786
|
+
*/
|
|
2787
|
+
function safeUseCdRef(cdRef, use) {
|
|
2788
|
+
if (!cdRef.destroyed) {
|
|
2789
|
+
cdRef.markForCheck();
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
/**
|
|
2793
|
+
* Used to check an injected ElementRef that wraps an ng-content injection point whether or not any content was injected,
|
|
2794
|
+
* or more specifically if the parent component passed any target content to the child. This will still return true if
|
|
2795
|
+
* passed content is empty.
|
|
2796
|
+
*
|
|
2797
|
+
* TS:
|
|
2798
|
+
* @ViewChild('customLoading', { static: false }) customCustom: ElementRef;
|
|
2799
|
+
*
|
|
2800
|
+
* HTML:
|
|
2801
|
+
* <div #customContent>
|
|
2802
|
+
* <ng-content select="[content]"></ng-content>
|
|
2803
|
+
* </div>
|
|
2804
|
+
*/
|
|
2805
|
+
function checkNgContentWrapperHasContent(ref) {
|
|
2806
|
+
// https://github.com/angular/angular/issues/26083
|
|
2807
|
+
let hasContent = false;
|
|
2808
|
+
if (ref != null) {
|
|
2809
|
+
const childNodes = ref.nativeElement.childNodes;
|
|
2810
|
+
const hasChildNodes = childNodes && childNodes.length > 0;
|
|
2811
|
+
hasContent = Boolean(hasChildNodes);
|
|
2812
|
+
}
|
|
2813
|
+
return hasContent;
|
|
2814
|
+
}
|
|
1996
2815
|
|
|
1997
|
-
|
|
1998
|
-
* Convenience function for filtering success from the input observable.
|
|
1999
|
-
*
|
|
2000
|
-
* @param obs
|
|
2001
|
-
* @returns
|
|
2002
|
-
*/
|
|
2003
|
-
function successTransition(obs) {
|
|
2004
|
-
return obs.pipe(filterTransitionSuccess());
|
|
2005
|
-
}
|
|
2006
|
-
function filterTransitionSuccess() {
|
|
2007
|
-
return filterTransitionEvent(DbxRouterTransitionEventType.SUCCESS);
|
|
2816
|
+
class DbxButton {
|
|
2008
2817
|
}
|
|
2009
|
-
function
|
|
2010
|
-
return
|
|
2818
|
+
function ProvideDbxButton(sourceType) {
|
|
2819
|
+
return [{
|
|
2820
|
+
provide: DbxButton,
|
|
2821
|
+
useExisting: forwardRef(() => sourceType)
|
|
2822
|
+
}];
|
|
2011
2823
|
}
|
|
2012
2824
|
|
|
2013
2825
|
/**
|
|
2014
|
-
*
|
|
2826
|
+
* Context used for linking a button to an ActionContext and only look for triggers.
|
|
2015
2827
|
*/
|
|
2016
|
-
class
|
|
2017
|
-
constructor(
|
|
2018
|
-
|
|
2019
|
-
this.
|
|
2020
|
-
this.
|
|
2828
|
+
class DbxActionButtonTriggerDirective extends AbstractSubscriptionDirective {
|
|
2829
|
+
constructor(button, source) {
|
|
2830
|
+
super();
|
|
2831
|
+
this.button = button;
|
|
2832
|
+
this.source = source;
|
|
2833
|
+
}
|
|
2834
|
+
ngOnInit() {
|
|
2835
|
+
this.sub = this.button.clicked$.subscribe(() => {
|
|
2836
|
+
this._buttonClicked();
|
|
2837
|
+
});
|
|
2838
|
+
}
|
|
2839
|
+
_buttonClicked() {
|
|
2840
|
+
this.source.trigger();
|
|
2021
2841
|
}
|
|
2022
2842
|
}
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2026
|
-
type: Directive
|
|
2027
|
-
|
|
2843
|
+
DbxActionButtonTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionButtonTriggerDirective, deps: [{ token: DbxButton, host: true }, { token: DbxActionContextStoreSourceInstance }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2844
|
+
DbxActionButtonTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionButtonTriggerDirective, selector: "[dbxActionButtonTrigger]", usesInheritance: true, ngImport: i0 });
|
|
2845
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionButtonTriggerDirective, decorators: [{
|
|
2846
|
+
type: Directive,
|
|
2847
|
+
args: [{
|
|
2848
|
+
selector: '[dbxActionButtonTrigger]'
|
|
2849
|
+
}]
|
|
2850
|
+
}], ctorParameters: function () { return [{ type: DbxButton, decorators: [{
|
|
2851
|
+
type: Host
|
|
2852
|
+
}] }, { type: DbxActionContextStoreSourceInstance }]; } });
|
|
2028
2853
|
|
|
2029
2854
|
/**
|
|
2030
|
-
*
|
|
2855
|
+
* Context used for linking a button to an ActionContext.
|
|
2031
2856
|
*/
|
|
2032
|
-
class
|
|
2033
|
-
constructor(
|
|
2034
|
-
super(
|
|
2035
|
-
this.
|
|
2036
|
-
this.
|
|
2857
|
+
class DbxActionButtonDirective extends DbxActionButtonTriggerDirective {
|
|
2858
|
+
constructor(button, source, cdRef) {
|
|
2859
|
+
super(button, source);
|
|
2860
|
+
this.cdRef = cdRef;
|
|
2861
|
+
this._workingSub = new SubscriptionObject();
|
|
2862
|
+
this._disabledSub = new SubscriptionObject();
|
|
2037
2863
|
}
|
|
2038
2864
|
ngOnInit() {
|
|
2039
|
-
|
|
2040
|
-
|
|
2865
|
+
super.ngOnInit();
|
|
2866
|
+
this._workingSub.subscription = this.source.isWorking$.subscribe((working) => {
|
|
2867
|
+
this.button.working = working;
|
|
2868
|
+
safeDetectChanges(this.cdRef);
|
|
2869
|
+
});
|
|
2870
|
+
this._disabledSub.subscription = this.source.isDisabled$.subscribe((disabled) => {
|
|
2871
|
+
this.button.disabled = disabled;
|
|
2872
|
+
safeDetectChanges(this.cdRef);
|
|
2041
2873
|
});
|
|
2042
2874
|
}
|
|
2043
2875
|
ngOnDestroy() {
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
zoneUpdateForSuccessfulTransition() {
|
|
2048
|
-
this.ngZone.run(() => this.updateForSuccessfulTransition());
|
|
2876
|
+
super.ngOnDestroy();
|
|
2877
|
+
this._workingSub.destroy();
|
|
2878
|
+
this._disabledSub.destroy();
|
|
2049
2879
|
}
|
|
2050
2880
|
}
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2054
|
-
type: Directive
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
return obs.pipe(map(x => refStringToSegueRef(x, options)));
|
|
2062
|
-
}
|
|
2881
|
+
DbxActionButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionButtonDirective, deps: [{ token: DbxButton, host: true }, { token: DbxActionContextStoreSourceInstance }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2882
|
+
DbxActionButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxActionButtonDirective, selector: "[dbxActionButton]", usesInheritance: true, ngImport: i0 });
|
|
2883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionButtonDirective, decorators: [{
|
|
2884
|
+
type: Directive,
|
|
2885
|
+
args: [{
|
|
2886
|
+
selector: '[dbxActionButton]'
|
|
2887
|
+
}]
|
|
2888
|
+
}], ctorParameters: function () { return [{ type: DbxButton, decorators: [{
|
|
2889
|
+
type: Host
|
|
2890
|
+
}] }, { type: DbxActionContextStoreSourceInstance }, { type: i0.ChangeDetectorRef }]; } });
|
|
2063
2891
|
|
|
2064
2892
|
// MARK: Button Directives
|
|
2065
2893
|
class DbxButtonSegueDirective extends AbstractSubscriptionDirective {
|
|
@@ -2081,10 +2909,14 @@ class DbxButtonSegueDirective extends AbstractSubscriptionDirective {
|
|
|
2081
2909
|
this.dbxRouterService.go(segueRef);
|
|
2082
2910
|
})))).subscribe();
|
|
2083
2911
|
}
|
|
2912
|
+
ngOnDestroy() {
|
|
2913
|
+
super.ngOnDestroy();
|
|
2914
|
+
this._segueRef.complete();
|
|
2915
|
+
}
|
|
2084
2916
|
}
|
|
2085
|
-
DbxButtonSegueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2086
|
-
DbxButtonSegueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2087
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2917
|
+
DbxButtonSegueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxButtonSegueDirective, deps: [{ token: DbxButton }, { token: DbxRouterService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2918
|
+
DbxButtonSegueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxButtonSegueDirective, selector: "[dbxButtonSegue]", inputs: { segueRef: ["dbxButtonSegue", "segueRef"] }, usesInheritance: true, ngImport: i0 });
|
|
2919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxButtonSegueDirective, decorators: [{
|
|
2088
2920
|
type: Directive,
|
|
2089
2921
|
args: [{
|
|
2090
2922
|
selector: '[dbxButtonSegue]'
|
|
@@ -2165,9 +2997,9 @@ class AbstractDbxButtonDirective extends AbstractSubscriptionDirective {
|
|
|
2165
2997
|
this.buttonClick.emit();
|
|
2166
2998
|
}
|
|
2167
2999
|
}
|
|
2168
|
-
AbstractDbxButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2169
|
-
AbstractDbxButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3000
|
+
AbstractDbxButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3001
|
+
AbstractDbxButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractDbxButtonDirective, inputs: { disabled: "disabled", working: "working", icon: "icon", text: "text" }, outputs: { buttonClick: "buttonClick" }, usesInheritance: true, ngImport: i0 });
|
|
3002
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxButtonDirective, decorators: [{
|
|
2171
3003
|
type: Directive
|
|
2172
3004
|
}], ctorParameters: function () { return []; }, propDecorators: { disabled: [{
|
|
2173
3005
|
type: Input
|
|
@@ -2186,9 +3018,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2186
3018
|
*/
|
|
2187
3019
|
class DbxButtonDirective extends AbstractDbxButtonDirective {
|
|
2188
3020
|
}
|
|
2189
|
-
DbxButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2190
|
-
DbxButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3021
|
+
DbxButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3022
|
+
DbxButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxButtonDirective, selector: "[dbxButton]", providers: ProvideDbxButton(DbxButtonDirective), exportAs: ["dbxButton"], usesInheritance: true, ngImport: i0 });
|
|
3023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxButtonDirective, decorators: [{
|
|
2192
3024
|
type: Directive,
|
|
2193
3025
|
args: [{
|
|
2194
3026
|
selector: '[dbxButton]',
|
|
@@ -2221,9 +3053,9 @@ class DbxLoadingButtonDirective extends AbstractSubscriptionDirective {
|
|
|
2221
3053
|
this.sub = subscription;
|
|
2222
3054
|
}
|
|
2223
3055
|
}
|
|
2224
|
-
DbxLoadingButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2225
|
-
DbxLoadingButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2226
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3056
|
+
DbxLoadingButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxLoadingButtonDirective, deps: [{ token: DbxButton, host: true }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3057
|
+
DbxLoadingButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxLoadingButtonDirective, selector: "[dbxLoadingButton]", inputs: { context: ["dbxLoadingButton", "context"] }, usesInheritance: true, ngImport: i0 });
|
|
3058
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxLoadingButtonDirective, decorators: [{
|
|
2227
3059
|
type: Directive,
|
|
2228
3060
|
args: [{
|
|
2229
3061
|
selector: '[dbxLoadingButton]'
|
|
@@ -2237,8 +3069,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2237
3069
|
|
|
2238
3070
|
class DbxCoreButtonModule {
|
|
2239
3071
|
}
|
|
2240
|
-
DbxCoreButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2241
|
-
DbxCoreButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3072
|
+
DbxCoreButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3073
|
+
DbxCoreButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreButtonModule, declarations: [DbxButtonDirective,
|
|
2242
3074
|
DbxLoadingButtonDirective,
|
|
2243
3075
|
DbxActionButtonTriggerDirective,
|
|
2244
3076
|
DbxActionButtonDirective,
|
|
@@ -2247,8 +3079,8 @@ DbxCoreButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
|
|
|
2247
3079
|
DbxActionButtonTriggerDirective,
|
|
2248
3080
|
DbxActionButtonDirective,
|
|
2249
3081
|
DbxButtonSegueDirective] });
|
|
2250
|
-
DbxCoreButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3082
|
+
DbxCoreButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreButtonModule, imports: [[]] });
|
|
3083
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreButtonModule, decorators: [{
|
|
2252
3084
|
type: NgModule,
|
|
2253
3085
|
args: [{
|
|
2254
3086
|
imports: [],
|
|
@@ -2269,6 +3101,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2269
3101
|
}]
|
|
2270
3102
|
}] });
|
|
2271
3103
|
|
|
3104
|
+
/**
|
|
3105
|
+
* State for accessing the app's DbxAppContextState defined within the DbxAppContextFullState for the ngrx store.
|
|
3106
|
+
*/
|
|
3107
|
+
class DbxAppContextService {
|
|
3108
|
+
constructor(store) {
|
|
3109
|
+
this.store = store;
|
|
3110
|
+
this.state$ = this.store.select(selectDbxAppContextState);
|
|
3111
|
+
}
|
|
3112
|
+
setState(state) {
|
|
3113
|
+
this.store.dispatch(setState({ state }));
|
|
3114
|
+
}
|
|
3115
|
+
resetState() {
|
|
3116
|
+
this.store.next(resetState());
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
DbxAppContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextService, deps: [{ token: i1$4.Store }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3120
|
+
DbxAppContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextService, providedIn: 'root' });
|
|
3121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextService, decorators: [{
|
|
3122
|
+
type: Injectable,
|
|
3123
|
+
args: [{
|
|
3124
|
+
providedIn: 'root'
|
|
3125
|
+
}]
|
|
3126
|
+
}], ctorParameters: function () { return [{ type: i1$4.Store }]; } });
|
|
3127
|
+
|
|
3128
|
+
/**
|
|
3129
|
+
* Used to set the DbxAppContextState for an app to the input state using the DbxAppContextService.
|
|
3130
|
+
*/
|
|
3131
|
+
class DbxAppContextStateDirective extends AbstractSubscriptionDirective {
|
|
3132
|
+
constructor(dbxAppContextStateService) {
|
|
3133
|
+
super();
|
|
3134
|
+
this.dbxAppContextStateService = dbxAppContextStateService;
|
|
3135
|
+
this._state = new BehaviorSubject(undefined);
|
|
3136
|
+
}
|
|
3137
|
+
ngOnInit() {
|
|
3138
|
+
this.sub = this._state.pipe(filterMaybe()).subscribe((state) => {
|
|
3139
|
+
this.dbxAppContextStateService.setState(state);
|
|
3140
|
+
});
|
|
3141
|
+
}
|
|
3142
|
+
ngOnDestroy() {
|
|
3143
|
+
super.ngOnDestroy();
|
|
3144
|
+
this._state.complete();
|
|
3145
|
+
}
|
|
3146
|
+
set state(state) {
|
|
3147
|
+
this._state.next(state);
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
DbxAppContextStateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateDirective, deps: [{ token: DbxAppContextService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3151
|
+
DbxAppContextStateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxAppContextStateDirective, selector: "[dbxAppContextState]", inputs: { state: ["dbxAppContextState", "state"] }, usesInheritance: true, ngImport: i0 });
|
|
3152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateDirective, decorators: [{
|
|
3153
|
+
type: Directive,
|
|
3154
|
+
args: [{
|
|
3155
|
+
selector: '[dbxAppContextState]'
|
|
3156
|
+
}]
|
|
3157
|
+
}], ctorParameters: function () { return [{ type: DbxAppContextService }]; }, propDecorators: { state: [{
|
|
3158
|
+
type: Input,
|
|
3159
|
+
args: ['dbxAppContextState']
|
|
3160
|
+
}] } });
|
|
3161
|
+
|
|
3162
|
+
class DbxAppContextStateModule {
|
|
3163
|
+
}
|
|
3164
|
+
DbxAppContextStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3165
|
+
DbxAppContextStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateModule, declarations: [DbxAppContextStateDirective], imports: [i1$4.StoreFeatureModule], exports: [DbxAppContextStateDirective] });
|
|
3166
|
+
DbxAppContextStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateModule, imports: [[
|
|
3167
|
+
StoreModule.forFeature(featureKey$1, reducers$1)
|
|
3168
|
+
]] });
|
|
3169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateModule, decorators: [{
|
|
3170
|
+
type: NgModule,
|
|
3171
|
+
args: [{
|
|
3172
|
+
imports: [
|
|
3173
|
+
StoreModule.forFeature(featureKey$1, reducers$1)
|
|
3174
|
+
],
|
|
3175
|
+
declarations: [
|
|
3176
|
+
DbxAppContextStateDirective
|
|
3177
|
+
],
|
|
3178
|
+
exports: [
|
|
3179
|
+
DbxAppContextStateDirective
|
|
3180
|
+
]
|
|
3181
|
+
}]
|
|
3182
|
+
}] });
|
|
3183
|
+
|
|
2272
3184
|
/**
|
|
2273
3185
|
* Pipe that takes in a date and number of minutes and outputs a formatted date.
|
|
2274
3186
|
*/
|
|
@@ -2289,9 +3201,9 @@ class DateFromToTimePipe {
|
|
|
2289
3201
|
return undefined;
|
|
2290
3202
|
}
|
|
2291
3203
|
}
|
|
2292
|
-
DateFromToTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2293
|
-
DateFromToTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2294
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3204
|
+
DateFromToTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DateFromToTimePipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3205
|
+
DateFromToTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DateFromToTimePipe, name: "dateFromPlusTo" });
|
|
3206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DateFromToTimePipe, decorators: [{
|
|
2295
3207
|
type: Pipe,
|
|
2296
3208
|
args: [{ name: 'dateFromPlusTo' }]
|
|
2297
3209
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -2322,24 +3234,31 @@ class MinutesStringPipe {
|
|
|
2322
3234
|
}
|
|
2323
3235
|
}
|
|
2324
3236
|
}
|
|
2325
|
-
MinutesStringPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2326
|
-
MinutesStringPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2327
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3237
|
+
MinutesStringPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: MinutesStringPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3238
|
+
MinutesStringPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: MinutesStringPipe, name: "minutesString", pure: false });
|
|
3239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: MinutesStringPipe, decorators: [{
|
|
2328
3240
|
type: Pipe,
|
|
2329
3241
|
args: [{ name: 'minutesString', pure: false }]
|
|
2330
3242
|
}] });
|
|
2331
3243
|
|
|
2332
3244
|
class ToJsDatePipe {
|
|
2333
3245
|
static toJsDate(input) {
|
|
2334
|
-
|
|
3246
|
+
let date;
|
|
3247
|
+
if (input != null) {
|
|
3248
|
+
date = toJsDate(input);
|
|
3249
|
+
if (!isValid(date)) {
|
|
3250
|
+
date = undefined;
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
return date;
|
|
2335
3254
|
}
|
|
2336
3255
|
transform(input) {
|
|
2337
3256
|
return ToJsDatePipe.toJsDate(input);
|
|
2338
3257
|
}
|
|
2339
3258
|
}
|
|
2340
|
-
ToJsDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2341
|
-
ToJsDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2342
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3259
|
+
ToJsDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ToJsDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3260
|
+
ToJsDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ToJsDatePipe, name: "toJsDate" });
|
|
3261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ToJsDatePipe, decorators: [{
|
|
2343
3262
|
type: Pipe,
|
|
2344
3263
|
args: [{ name: 'toJsDate' }]
|
|
2345
3264
|
}] });
|
|
@@ -2363,9 +3282,9 @@ class TimeDistanceCountdownPipe {
|
|
|
2363
3282
|
}
|
|
2364
3283
|
}
|
|
2365
3284
|
}
|
|
2366
|
-
TimeDistanceCountdownPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2367
|
-
TimeDistanceCountdownPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3285
|
+
TimeDistanceCountdownPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TimeDistanceCountdownPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3286
|
+
TimeDistanceCountdownPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TimeDistanceCountdownPipe, name: "timeCountdownDistance", pure: false });
|
|
3287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TimeDistanceCountdownPipe, decorators: [{
|
|
2369
3288
|
type: Pipe,
|
|
2370
3289
|
args: [{ name: 'timeCountdownDistance', pure: false }]
|
|
2371
3290
|
}] });
|
|
@@ -2382,9 +3301,9 @@ class TimeDistancePipe {
|
|
|
2382
3301
|
}
|
|
2383
3302
|
}
|
|
2384
3303
|
}
|
|
2385
|
-
TimeDistancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2386
|
-
TimeDistancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3304
|
+
TimeDistancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TimeDistancePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3305
|
+
TimeDistancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TimeDistancePipe, name: "timeDistance", pure: false });
|
|
3306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TimeDistancePipe, decorators: [{
|
|
2388
3307
|
type: Pipe,
|
|
2389
3308
|
args: [{ name: 'timeDistance', pure: false }]
|
|
2390
3309
|
}] });
|
|
@@ -2397,9 +3316,9 @@ class ToMinutesPipe {
|
|
|
2397
3316
|
return milliseconds;
|
|
2398
3317
|
}
|
|
2399
3318
|
}
|
|
2400
|
-
ToMinutesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2401
|
-
ToMinutesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3319
|
+
ToMinutesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ToMinutesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3320
|
+
ToMinutesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ToMinutesPipe, name: "toMinutes" });
|
|
3321
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: ToMinutesPipe, decorators: [{
|
|
2403
3322
|
type: Pipe,
|
|
2404
3323
|
args: [{ name: 'toMinutes' }]
|
|
2405
3324
|
}] });
|
|
@@ -2426,9 +3345,9 @@ class DateFormatDistancePipe {
|
|
|
2426
3345
|
return undefined;
|
|
2427
3346
|
}
|
|
2428
3347
|
}
|
|
2429
|
-
DateFormatDistancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2430
|
-
DateFormatDistancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3348
|
+
DateFormatDistancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DateFormatDistancePipe, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3349
|
+
DateFormatDistancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DateFormatDistancePipe, name: "dateFormatDistance", pure: false });
|
|
3350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DateFormatDistancePipe, decorators: [{
|
|
2432
3351
|
type: Pipe,
|
|
2433
3352
|
args: [{ name: 'dateFormatDistance', pure: false }]
|
|
2434
3353
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -2467,17 +3386,17 @@ class DateDistancePipe {
|
|
|
2467
3386
|
}
|
|
2468
3387
|
}
|
|
2469
3388
|
}
|
|
2470
|
-
DateDistancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2471
|
-
DateDistancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3389
|
+
DateDistancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DateDistancePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3390
|
+
DateDistancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DateDistancePipe, name: "dateDistance", pure: false });
|
|
3391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DateDistancePipe, decorators: [{
|
|
2473
3392
|
type: Pipe,
|
|
2474
3393
|
args: [{ name: 'dateDistance', pure: false }]
|
|
2475
3394
|
}] });
|
|
2476
3395
|
|
|
2477
3396
|
class DbxDatePipeModule {
|
|
2478
3397
|
}
|
|
2479
|
-
DbxDatePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2480
|
-
DbxDatePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3398
|
+
DbxDatePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDatePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3399
|
+
DbxDatePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDatePipeModule, declarations: [DateFromToTimePipe,
|
|
2481
3400
|
DateFormatDistancePipe,
|
|
2482
3401
|
MinutesStringPipe,
|
|
2483
3402
|
TimeDistanceCountdownPipe,
|
|
@@ -2492,8 +3411,8 @@ DbxDatePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
|
2492
3411
|
DateDistancePipe,
|
|
2493
3412
|
ToJsDatePipe,
|
|
2494
3413
|
ToMinutesPipe] });
|
|
2495
|
-
DbxDatePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3414
|
+
DbxDatePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDatePipeModule });
|
|
3415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDatePipeModule, decorators: [{
|
|
2497
3416
|
type: NgModule,
|
|
2498
3417
|
args: [{
|
|
2499
3418
|
exports: [
|
|
@@ -2519,6 +3438,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2519
3438
|
}]
|
|
2520
3439
|
}] });
|
|
2521
3440
|
|
|
3441
|
+
class PrettyJsonPipe {
|
|
3442
|
+
static toPrettyJson(input, spacing = 2) {
|
|
3443
|
+
let json;
|
|
3444
|
+
if (input) {
|
|
3445
|
+
try {
|
|
3446
|
+
json = JSON.stringify(input, null, spacing);
|
|
3447
|
+
}
|
|
3448
|
+
catch (e) {
|
|
3449
|
+
console.error('prettyjson pipe failed parsing input: ', input);
|
|
3450
|
+
json = 'ERROR';
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
return json;
|
|
3454
|
+
}
|
|
3455
|
+
transform(input, spacing) {
|
|
3456
|
+
return PrettyJsonPipe.toPrettyJson(input, spacing);
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
PrettyJsonPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: PrettyJsonPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3460
|
+
PrettyJsonPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: PrettyJsonPipe, name: "prettyjson" });
|
|
3461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: PrettyJsonPipe, decorators: [{
|
|
3462
|
+
type: Pipe,
|
|
3463
|
+
args: [{ name: 'prettyjson' }]
|
|
3464
|
+
}] });
|
|
3465
|
+
|
|
3466
|
+
class DbxMiscPipeModule {
|
|
3467
|
+
}
|
|
3468
|
+
DbxMiscPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxMiscPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3469
|
+
DbxMiscPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxMiscPipeModule, declarations: [PrettyJsonPipe], exports: [PrettyJsonPipe] });
|
|
3470
|
+
DbxMiscPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxMiscPipeModule });
|
|
3471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxMiscPipeModule, decorators: [{
|
|
3472
|
+
type: NgModule,
|
|
3473
|
+
args: [{
|
|
3474
|
+
exports: [
|
|
3475
|
+
PrettyJsonPipe
|
|
3476
|
+
],
|
|
3477
|
+
declarations: [
|
|
3478
|
+
PrettyJsonPipe
|
|
3479
|
+
]
|
|
3480
|
+
}]
|
|
3481
|
+
}] });
|
|
3482
|
+
|
|
3483
|
+
class DbxPipesModule {
|
|
3484
|
+
}
|
|
3485
|
+
DbxPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3486
|
+
DbxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, exports: [DbxMiscPipeModule,
|
|
3487
|
+
DbxDatePipeModule] });
|
|
3488
|
+
DbxPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, imports: [DbxMiscPipeModule,
|
|
3489
|
+
DbxDatePipeModule] });
|
|
3490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, decorators: [{
|
|
3491
|
+
type: NgModule,
|
|
3492
|
+
args: [{
|
|
3493
|
+
exports: [
|
|
3494
|
+
DbxMiscPipeModule,
|
|
3495
|
+
DbxDatePipeModule,
|
|
3496
|
+
]
|
|
3497
|
+
}]
|
|
3498
|
+
}] });
|
|
3499
|
+
|
|
2522
3500
|
/**
|
|
2523
3501
|
* Abstract FilterSource implementation.
|
|
2524
3502
|
*/
|
|
@@ -2547,9 +3525,9 @@ class AbstractFilterSourceDirective {
|
|
|
2547
3525
|
return of(undefined);
|
|
2548
3526
|
}
|
|
2549
3527
|
}
|
|
2550
|
-
AbstractFilterSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2551
|
-
AbstractFilterSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3528
|
+
AbstractFilterSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractFilterSourceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3529
|
+
AbstractFilterSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractFilterSourceDirective, ngImport: i0 });
|
|
3530
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractFilterSourceDirective, decorators: [{
|
|
2553
3531
|
type: Directive
|
|
2554
3532
|
}] });
|
|
2555
3533
|
|
|
@@ -2572,9 +3550,9 @@ class AbstractActionFilterSourceDirective extends AbstractFilterSourceDirective
|
|
|
2572
3550
|
this.filterAction.trigger();
|
|
2573
3551
|
}
|
|
2574
3552
|
}
|
|
2575
|
-
AbstractActionFilterSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2576
|
-
AbstractActionFilterSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2577
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3553
|
+
AbstractActionFilterSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractActionFilterSourceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3554
|
+
AbstractActionFilterSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractActionFilterSourceDirective, viewQueries: [{ propertyName: "filterAction", first: true, predicate: DbxActionContextStoreSourceInstance, descendants: true, read: DbxActionContextStoreSourceInstance, static: true }], usesInheritance: true, ngImport: i0 });
|
|
3555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractActionFilterSourceDirective, decorators: [{
|
|
2578
3556
|
type: Directive
|
|
2579
3557
|
}], propDecorators: { filterAction: [{
|
|
2580
3558
|
type: ViewChild,
|
|
@@ -2596,9 +3574,9 @@ class AbstractFilterSourceConnectorDirective {
|
|
|
2596
3574
|
this._source.next(filterSource);
|
|
2597
3575
|
}
|
|
2598
3576
|
}
|
|
2599
|
-
AbstractFilterSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2600
|
-
AbstractFilterSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3577
|
+
AbstractFilterSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractFilterSourceConnectorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3578
|
+
AbstractFilterSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractFilterSourceConnectorDirective, ngImport: i0 });
|
|
3579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractFilterSourceConnectorDirective, decorators: [{
|
|
2602
3580
|
type: Directive
|
|
2603
3581
|
}] });
|
|
2604
3582
|
|
|
@@ -2629,12 +3607,12 @@ function ProvideFilterSourceConnector(sourceType) {
|
|
|
2629
3607
|
*/
|
|
2630
3608
|
class DbxFilterSourceConnectorDirective extends AbstractFilterSourceConnectorDirective {
|
|
2631
3609
|
}
|
|
2632
|
-
DbxFilterSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2633
|
-
DbxFilterSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
3610
|
+
DbxFilterSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterSourceConnectorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3611
|
+
DbxFilterSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterSourceConnectorDirective, selector: "[dbxFilterSourceConnector]", providers: [
|
|
2634
3612
|
...ProvideFilterSource(DbxFilterSourceConnectorDirective),
|
|
2635
3613
|
...ProvideFilterSourceConnector(DbxFilterSourceConnectorDirective)
|
|
2636
3614
|
], usesInheritance: true, ngImport: i0 });
|
|
2637
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterSourceConnectorDirective, decorators: [{
|
|
2638
3616
|
type: Directive,
|
|
2639
3617
|
args: [{
|
|
2640
3618
|
selector: '[dbxFilterSourceConnector]',
|
|
@@ -2659,11 +3637,11 @@ class AbstractDbxFilterMapInstanceDirective {
|
|
|
2659
3637
|
this._key.complete();
|
|
2660
3638
|
}
|
|
2661
3639
|
}
|
|
2662
|
-
AbstractDbxFilterMapInstanceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2663
|
-
AbstractDbxFilterMapInstanceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3640
|
+
AbstractDbxFilterMapInstanceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxFilterMapInstanceDirective, deps: [{ token: i1$5.FilterMap }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3641
|
+
AbstractDbxFilterMapInstanceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractDbxFilterMapInstanceDirective, ngImport: i0 });
|
|
3642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxFilterMapInstanceDirective, decorators: [{
|
|
2665
3643
|
type: Directive
|
|
2666
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
3644
|
+
}], ctorParameters: function () { return [{ type: i1$5.FilterMap }]; } });
|
|
2667
3645
|
|
|
2668
3646
|
/**
|
|
2669
3647
|
* Provides a FilterSource from a parent FilterMap.
|
|
@@ -2683,11 +3661,11 @@ class DbxFilterMapSourceDirective extends AbstractDbxFilterMapInstanceDirective
|
|
|
2683
3661
|
this.instance$.pipe(first$1()).subscribe((x) => x.initWithFilter(filterObs));
|
|
2684
3662
|
}
|
|
2685
3663
|
}
|
|
2686
|
-
DbxFilterMapSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2687
|
-
DbxFilterMapSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
3664
|
+
DbxFilterMapSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapSourceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3665
|
+
DbxFilterMapSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterMapSourceDirective, selector: "[dbxFilterMapSource]", inputs: { key: ["dbxFilterMapSource", "key"] }, providers: [
|
|
2688
3666
|
...ProvideFilterSource(DbxFilterMapSourceDirective)
|
|
2689
3667
|
], exportAs: ["dbxFilterMapSource"], usesInheritance: true, ngImport: i0 });
|
|
2690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapSourceDirective, decorators: [{
|
|
2691
3669
|
type: Directive,
|
|
2692
3670
|
args: [{
|
|
2693
3671
|
selector: '[dbxFilterMapSource]',
|
|
@@ -2716,12 +3694,12 @@ class DbxFilterMapSourceConnectorDirective extends DbxFilterMapSourceDirective {
|
|
|
2716
3694
|
this.instance$.pipe(first$1()).subscribe((x) => x.connectWithSource(filterSource));
|
|
2717
3695
|
}
|
|
2718
3696
|
}
|
|
2719
|
-
DbxFilterMapSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2720
|
-
DbxFilterMapSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
3697
|
+
DbxFilterMapSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapSourceConnectorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3698
|
+
DbxFilterMapSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterMapSourceConnectorDirective, selector: "[dbxFilterMapSourceConnector]", inputs: { key: ["dbxFilterMapSourceConnector", "key"] }, providers: [
|
|
2721
3699
|
...ProvideFilterSource(DbxFilterMapSourceConnectorDirective),
|
|
2722
3700
|
...ProvideFilterSourceConnector(DbxFilterMapSourceConnectorDirective)
|
|
2723
3701
|
], exportAs: ["dbxFilterMapSourceConnector"], usesInheritance: true, ngImport: i0 });
|
|
2724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapSourceConnectorDirective, decorators: [{
|
|
2725
3703
|
type: Directive,
|
|
2726
3704
|
args: [{
|
|
2727
3705
|
selector: '[dbxFilterMapSourceConnector]',
|
|
@@ -2747,25 +3725,25 @@ class DbxFilterMapDirective {
|
|
|
2747
3725
|
this.filterMap.destroy();
|
|
2748
3726
|
}
|
|
2749
3727
|
}
|
|
2750
|
-
DbxFilterMapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2751
|
-
DbxFilterMapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3728
|
+
DbxFilterMapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapDirective, deps: [{ token: i1$5.FilterMap }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3729
|
+
DbxFilterMapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterMapDirective, selector: "[dbxFilterMap]", providers: [FilterMap], exportAs: ["dbxFilterMap"], ngImport: i0 });
|
|
3730
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapDirective, decorators: [{
|
|
2753
3731
|
type: Directive,
|
|
2754
3732
|
args: [{
|
|
2755
3733
|
selector: '[dbxFilterMap]',
|
|
2756
3734
|
exportAs: 'dbxFilterMap',
|
|
2757
3735
|
providers: [FilterMap]
|
|
2758
3736
|
}]
|
|
2759
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
3737
|
+
}], ctorParameters: function () { return [{ type: i1$5.FilterMap }]; } });
|
|
2760
3738
|
|
|
2761
3739
|
/**
|
|
2762
3740
|
* Basic filter source directive.
|
|
2763
3741
|
*/
|
|
2764
3742
|
class DbxFilterSourceDirective extends AbstractFilterSourceDirective {
|
|
2765
3743
|
}
|
|
2766
|
-
DbxFilterSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2767
|
-
DbxFilterSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2768
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3744
|
+
DbxFilterSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterSourceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3745
|
+
DbxFilterSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterSourceDirective, selector: "[dbxFilterSource]", providers: ProvideFilterSource(DbxFilterSourceDirective), usesInheritance: true, ngImport: i0 });
|
|
3746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterSourceDirective, decorators: [{
|
|
2769
3747
|
type: Directive,
|
|
2770
3748
|
args: [{
|
|
2771
3749
|
selector: '[dbxFilterSource]',
|
|
@@ -2775,8 +3753,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2775
3753
|
|
|
2776
3754
|
class DbxCoreFilterModule {
|
|
2777
3755
|
}
|
|
2778
|
-
DbxCoreFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2779
|
-
DbxCoreFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3756
|
+
DbxCoreFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3757
|
+
DbxCoreFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, declarations: [DbxFilterSourceDirective,
|
|
2780
3758
|
DbxFilterSourceConnectorDirective,
|
|
2781
3759
|
DbxFilterMapDirective,
|
|
2782
3760
|
DbxFilterMapSourceConnectorDirective,
|
|
@@ -2785,10 +3763,10 @@ DbxCoreFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
|
|
|
2785
3763
|
DbxFilterMapDirective,
|
|
2786
3764
|
DbxFilterMapSourceConnectorDirective,
|
|
2787
3765
|
DbxFilterMapSourceDirective] });
|
|
2788
|
-
DbxCoreFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
3766
|
+
DbxCoreFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, imports: [[
|
|
2789
3767
|
CommonModule
|
|
2790
3768
|
]] });
|
|
2791
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, decorators: [{
|
|
2792
3770
|
type: NgModule,
|
|
2793
3771
|
args: [{
|
|
2794
3772
|
imports: [
|
|
@@ -2811,14 +3789,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2811
3789
|
}]
|
|
2812
3790
|
}] });
|
|
2813
3791
|
|
|
2814
|
-
const
|
|
3792
|
+
const DBX_INJECTION_COMPONENT_DATA = new InjectionToken('DbxInjectionComponentConfigData');
|
|
2815
3793
|
/**
|
|
2816
3794
|
* Merges multiple configurations into a single configuration.
|
|
2817
3795
|
*
|
|
2818
3796
|
* @param configs
|
|
2819
3797
|
* @returns
|
|
2820
3798
|
*/
|
|
2821
|
-
function
|
|
3799
|
+
function mergeDbxInjectionComponentConfigs(configs) {
|
|
2822
3800
|
const providers = mergeArrays(filterMaybeValues(configs).map(x => x.providers));
|
|
2823
3801
|
const result = mergeObjects(configs);
|
|
2824
3802
|
result.providers = providers;
|
|
@@ -2828,7 +3806,7 @@ function mergeDbxInjectedComponentConfigs(configs) {
|
|
|
2828
3806
|
/**
|
|
2829
3807
|
* Instance used by components to inject content based on the configuration into the view.
|
|
2830
3808
|
*/
|
|
2831
|
-
class
|
|
3809
|
+
class DbxInjectionInstance {
|
|
2832
3810
|
constructor(_injector) {
|
|
2833
3811
|
this._injector = _injector;
|
|
2834
3812
|
this._subscriptionObject = new SubscriptionObject();
|
|
@@ -2904,7 +3882,7 @@ class DbxInjectedComponentInstance {
|
|
|
2904
3882
|
injector = Injector.create({
|
|
2905
3883
|
parent: parentInjector,
|
|
2906
3884
|
providers: mergeArrayOrValueIntoArray([{
|
|
2907
|
-
provide:
|
|
3885
|
+
provide: DBX_INJECTION_COMPONENT_DATA,
|
|
2908
3886
|
useValue: data
|
|
2909
3887
|
}], providers ?? [])
|
|
2910
3888
|
});
|
|
@@ -2938,10 +3916,10 @@ class DbxInjectedComponentInstance {
|
|
|
2938
3916
|
/**
|
|
2939
3917
|
* Abstract directive that injects content based on the configuration into the view.
|
|
2940
3918
|
*/
|
|
2941
|
-
class
|
|
3919
|
+
class AbstractDbxInjectionDirective {
|
|
2942
3920
|
constructor(_injector) {
|
|
2943
3921
|
this._injector = _injector;
|
|
2944
|
-
this._instance = new
|
|
3922
|
+
this._instance = new DbxInjectionInstance(this._injector);
|
|
2945
3923
|
}
|
|
2946
3924
|
ngOnInit() {
|
|
2947
3925
|
this._instance.init();
|
|
@@ -2959,16 +3937,16 @@ class AbstractDbxInjectedDirective {
|
|
|
2959
3937
|
this._instance.content = content;
|
|
2960
3938
|
}
|
|
2961
3939
|
}
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3940
|
+
AbstractDbxInjectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxInjectionDirective, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3941
|
+
AbstractDbxInjectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractDbxInjectionDirective, ngImport: i0 });
|
|
3942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractDbxInjectionDirective, decorators: [{
|
|
2965
3943
|
type: Directive
|
|
2966
3944
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
2967
3945
|
|
|
2968
3946
|
/**
|
|
2969
3947
|
* Component that injects content based on the configuration into the view.
|
|
2970
3948
|
*/
|
|
2971
|
-
class
|
|
3949
|
+
class DbxInjectionComponent extends AbstractDbxInjectionDirective {
|
|
2972
3950
|
set config(config) {
|
|
2973
3951
|
this.setConfig(config);
|
|
2974
3952
|
}
|
|
@@ -2979,12 +3957,12 @@ class DbxInjectedComponent extends AbstractDbxInjectedDirective {
|
|
|
2979
3957
|
this.setContent(content);
|
|
2980
3958
|
}
|
|
2981
3959
|
}
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
3960
|
+
DbxInjectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3961
|
+
DbxInjectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: { config: "config", template: "template" }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: `<ng-template #content></ng-template>`, isInline: true });
|
|
3962
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponent, decorators: [{
|
|
2985
3963
|
type: Component,
|
|
2986
3964
|
args: [{
|
|
2987
|
-
selector: 'dbx-
|
|
3965
|
+
selector: 'dbx-injection, [dbxInjection], [dbx-injection]',
|
|
2988
3966
|
template: `<ng-template #content></ng-template>`
|
|
2989
3967
|
}]
|
|
2990
3968
|
}], propDecorators: { config: [{
|
|
@@ -2996,28 +3974,254 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2996
3974
|
args: ['content', { static: true, read: ViewContainerRef }]
|
|
2997
3975
|
}] } });
|
|
2998
3976
|
|
|
2999
|
-
|
|
3977
|
+
/**
|
|
3978
|
+
* View that can switch to show another arbitrary view, then switch back when the promise ends.
|
|
3979
|
+
*
|
|
3980
|
+
* It is similar to *ngIf/*ngSwitch, but the original child content is retained instead of discarded,
|
|
3981
|
+
* and returns once the special context is done being used.
|
|
3982
|
+
*/
|
|
3983
|
+
class DbxInjectionContext {
|
|
3984
|
+
}
|
|
3985
|
+
/**
|
|
3986
|
+
* Allows a directive to provide a formly context and form.
|
|
3987
|
+
*/
|
|
3988
|
+
function ProvideDbxInjectionContext(type) {
|
|
3989
|
+
return [{
|
|
3990
|
+
provide: DbxInjectionContext,
|
|
3991
|
+
useExisting: type
|
|
3992
|
+
}];
|
|
3993
|
+
}
|
|
3994
|
+
|
|
3995
|
+
/**
|
|
3996
|
+
* DbxInjectedViewContext implementation. Acts similar to *ngIf, but instead switches to a different view without destroying the original child view.
|
|
3997
|
+
*/
|
|
3998
|
+
class DbxInjectionContextDirective {
|
|
3999
|
+
constructor(_injector, _templateRef, _viewContainer) {
|
|
4000
|
+
this._injector = _injector;
|
|
4001
|
+
this._templateRef = _templateRef;
|
|
4002
|
+
this._viewContainer = _viewContainer;
|
|
4003
|
+
this._instance = new DbxInjectionInstance(this._injector);
|
|
4004
|
+
this._isDetached = false;
|
|
4005
|
+
}
|
|
4006
|
+
set config(config) {
|
|
4007
|
+
let reattach = false;
|
|
4008
|
+
if (config) {
|
|
4009
|
+
if (!this._isDetached) {
|
|
4010
|
+
// detach the original view before setting config.
|
|
4011
|
+
this._viewContainer.detach();
|
|
4012
|
+
this._isDetached = true;
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
else if (this._isDetached) {
|
|
4016
|
+
reattach = true;
|
|
4017
|
+
}
|
|
4018
|
+
this._instance.config = config;
|
|
4019
|
+
if (reattach) {
|
|
4020
|
+
this._viewContainer.insert(this._embeddedView);
|
|
4021
|
+
this._isDetached = false;
|
|
4022
|
+
}
|
|
4023
|
+
}
|
|
4024
|
+
ngOnInit() {
|
|
4025
|
+
this._instance.content = this._viewContainer;
|
|
4026
|
+
this._instance.init();
|
|
4027
|
+
this._embeddedView = this._viewContainer.createEmbeddedView(this._templateRef);
|
|
4028
|
+
// detach the embedded view
|
|
4029
|
+
this._viewContainer.detach();
|
|
4030
|
+
// reattach it through the template configuration.
|
|
4031
|
+
// the template configuration acts as the default.
|
|
4032
|
+
this._instance.template = {
|
|
4033
|
+
viewRef: this._embeddedView
|
|
4034
|
+
};
|
|
4035
|
+
}
|
|
4036
|
+
ngOnDestroy() {
|
|
4037
|
+
this._instance.destroy();
|
|
4038
|
+
this._embeddedView?.destroy(); // destroy our embedded view too.
|
|
4039
|
+
}
|
|
4040
|
+
async showContext(config) {
|
|
4041
|
+
// clear the current context before showing something new.
|
|
4042
|
+
this.resetContext();
|
|
4043
|
+
let promiseRef;
|
|
4044
|
+
let result;
|
|
4045
|
+
let error;
|
|
4046
|
+
// wait for the promise to resolve and use to finish using that instance.
|
|
4047
|
+
try {
|
|
4048
|
+
promiseRef = makePromiseFullRef(async (resolve, reject) => {
|
|
4049
|
+
const injectionConfig = {
|
|
4050
|
+
...config.config,
|
|
4051
|
+
init: async (instance) => {
|
|
4052
|
+
// init if available in the base config.
|
|
4053
|
+
if (config.config.init) {
|
|
4054
|
+
config.config.init(instance);
|
|
4055
|
+
}
|
|
4056
|
+
try {
|
|
4057
|
+
resolve(config.use(instance));
|
|
4058
|
+
}
|
|
4059
|
+
catch (e) {
|
|
4060
|
+
reject(e);
|
|
4061
|
+
}
|
|
4062
|
+
}
|
|
4063
|
+
};
|
|
4064
|
+
this.config = injectionConfig;
|
|
4065
|
+
});
|
|
4066
|
+
this._currentPromise = promiseRef;
|
|
4067
|
+
// await the promise
|
|
4068
|
+
await promiseRef.promise;
|
|
4069
|
+
}
|
|
4070
|
+
catch (e) {
|
|
4071
|
+
error = e;
|
|
4072
|
+
}
|
|
4073
|
+
// if we're still using the same promiseRef
|
|
4074
|
+
if (promiseRef && promiseRef === this._currentPromise) {
|
|
4075
|
+
// clear the config to reshow the view
|
|
4076
|
+
this.config = undefined;
|
|
4077
|
+
// clear the current promise
|
|
4078
|
+
this._currentPromise = undefined;
|
|
4079
|
+
}
|
|
4080
|
+
if (error != null) {
|
|
4081
|
+
return Promise.reject(error);
|
|
4082
|
+
}
|
|
4083
|
+
else {
|
|
4084
|
+
return result;
|
|
4085
|
+
}
|
|
4086
|
+
}
|
|
4087
|
+
resetContext() {
|
|
4088
|
+
let clearedValue = false;
|
|
4089
|
+
if (this._currentPromise) {
|
|
4090
|
+
const promise = this._currentPromise;
|
|
4091
|
+
// clear the current promise too
|
|
4092
|
+
this._currentPromise = undefined;
|
|
4093
|
+
// clear the config.
|
|
4094
|
+
this.config = undefined;
|
|
4095
|
+
// send a rejection signal to bail out.
|
|
4096
|
+
promise.reject(new Error('dbxInjectionContext bailout'));
|
|
4097
|
+
clearedValue = true;
|
|
4098
|
+
}
|
|
4099
|
+
return clearedValue;
|
|
4100
|
+
}
|
|
4101
|
+
}
|
|
4102
|
+
DbxInjectionContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionContextDirective, deps: [{ token: i0.Injector }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4103
|
+
DbxInjectionContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxInjectionContextDirective, selector: "[dbxInjectionContext]", inputs: { config: "config" }, providers: ProvideDbxInjectionContext(DbxInjectionContextDirective), ngImport: i0 });
|
|
4104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionContextDirective, decorators: [{
|
|
4105
|
+
type: Directive,
|
|
4106
|
+
args: [{
|
|
4107
|
+
selector: '[dbxInjectionContext]',
|
|
4108
|
+
providers: ProvideDbxInjectionContext(DbxInjectionContextDirective)
|
|
4109
|
+
}]
|
|
4110
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { config: [{
|
|
4111
|
+
type: Input
|
|
4112
|
+
}] } });
|
|
4113
|
+
|
|
4114
|
+
class DbxInjectionComponentModule {
|
|
3000
4115
|
}
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
4116
|
+
DbxInjectionComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4117
|
+
DbxInjectionComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, declarations: [DbxInjectionComponent,
|
|
4118
|
+
DbxInjectionContextDirective], imports: [CommonModule], exports: [DbxInjectionComponent,
|
|
4119
|
+
DbxInjectionContextDirective] });
|
|
4120
|
+
DbxInjectionComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, imports: [[
|
|
3004
4121
|
CommonModule
|
|
3005
4122
|
]] });
|
|
3006
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, decorators: [{
|
|
3007
4124
|
type: NgModule,
|
|
3008
4125
|
args: [{
|
|
3009
4126
|
imports: [
|
|
3010
4127
|
CommonModule
|
|
3011
4128
|
],
|
|
3012
4129
|
declarations: [
|
|
3013
|
-
|
|
4130
|
+
DbxInjectionComponent,
|
|
4131
|
+
DbxInjectionContextDirective
|
|
3014
4132
|
],
|
|
3015
4133
|
exports: [
|
|
3016
|
-
|
|
4134
|
+
DbxInjectionComponent,
|
|
4135
|
+
DbxInjectionContextDirective
|
|
3017
4136
|
],
|
|
3018
4137
|
}]
|
|
3019
4138
|
}] });
|
|
3020
4139
|
|
|
4140
|
+
/**
|
|
4141
|
+
* Abstract DbxInjectionContext implementation that forwards commands to a host DbxInjectionContext.
|
|
4142
|
+
*
|
|
4143
|
+
* This abstract type is used by related types for dependency injection purposes, so that those types
|
|
4144
|
+
* can be injected instead of just any DbxInjectionContext.
|
|
4145
|
+
*/
|
|
4146
|
+
class AbstractForwardDbxInjectionContextDirective {
|
|
4147
|
+
constructor(dbxInjectionContext) {
|
|
4148
|
+
this.dbxInjectionContext = dbxInjectionContext;
|
|
4149
|
+
}
|
|
4150
|
+
// MARK: DbxInjectionContext
|
|
4151
|
+
showContext(config) {
|
|
4152
|
+
return this.dbxInjectionContext.showContext(config);
|
|
4153
|
+
}
|
|
4154
|
+
resetContext() {
|
|
4155
|
+
return this.dbxInjectionContext.resetContext();
|
|
4156
|
+
}
|
|
4157
|
+
}
|
|
4158
|
+
AbstractForwardDbxInjectionContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractForwardDbxInjectionContextDirective, deps: [{ token: DbxInjectionContext, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4159
|
+
AbstractForwardDbxInjectionContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: AbstractForwardDbxInjectionContextDirective, ngImport: i0 });
|
|
4160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AbstractForwardDbxInjectionContextDirective, decorators: [{
|
|
4161
|
+
type: Directive
|
|
4162
|
+
}], ctorParameters: function () { return [{ type: DbxInjectionContext, decorators: [{
|
|
4163
|
+
type: Host
|
|
4164
|
+
}] }]; } });
|
|
4165
|
+
|
|
4166
|
+
/**
|
|
4167
|
+
* Abstract ComponentStore extension that provides a LockSet and OnDestroy delaying/cleanup.
|
|
4168
|
+
*/
|
|
4169
|
+
class LockSetComponentStore extends ComponentStore {
|
|
4170
|
+
constructor(initialState) {
|
|
4171
|
+
super(initialState);
|
|
4172
|
+
this.initialState = initialState;
|
|
4173
|
+
this.lockSet = new LockSet();
|
|
4174
|
+
this.lockSetDestroyDelayMs = 2000;
|
|
4175
|
+
// MARK: State Changes
|
|
4176
|
+
this.resetStore = this.updater(() => ({ ...this.initialState }));
|
|
4177
|
+
}
|
|
4178
|
+
// MARK: Locks
|
|
4179
|
+
setupLockSet({ parent, locks }) {
|
|
4180
|
+
if (parent) {
|
|
4181
|
+
this.setParentLockSet(parent);
|
|
4182
|
+
}
|
|
4183
|
+
if (locks) {
|
|
4184
|
+
for (const key in locks) {
|
|
4185
|
+
if (locks[key]) {
|
|
4186
|
+
this.addLock(key, locks[key]);
|
|
4187
|
+
}
|
|
4188
|
+
}
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
setParentLockSet(obs) {
|
|
4192
|
+
this.lockSet.setParentLockSet(asObservable(obs).pipe(map$1(x => x?.lockSet)));
|
|
4193
|
+
}
|
|
4194
|
+
addLock(key, obs) {
|
|
4195
|
+
this.lockSet.addLock(key, obs);
|
|
4196
|
+
}
|
|
4197
|
+
// MARK: Cleanup
|
|
4198
|
+
ngOnDestroy() {
|
|
4199
|
+
// Wait for any actions to complete before destroying.
|
|
4200
|
+
this.lockSet.destroyOnNextUnlock({
|
|
4201
|
+
fn: () => {
|
|
4202
|
+
this._destroyNow();
|
|
4203
|
+
},
|
|
4204
|
+
timeout: this.lockSetDestroyTimeoutMs,
|
|
4205
|
+
}, this.lockSetDestroyDelayMs);
|
|
4206
|
+
}
|
|
4207
|
+
/**
|
|
4208
|
+
* Completes the cleanup of the object.
|
|
4209
|
+
*/
|
|
4210
|
+
_destroyNow() {
|
|
4211
|
+
this.lockSet.destroy();
|
|
4212
|
+
}
|
|
4213
|
+
}
|
|
4214
|
+
LockSetComponentStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: LockSetComponentStore, deps: [{ token: null, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4215
|
+
LockSetComponentStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: LockSetComponentStore });
|
|
4216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: LockSetComponentStore, decorators: [{
|
|
4217
|
+
type: Injectable
|
|
4218
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
4219
|
+
type: Inject,
|
|
4220
|
+
args: [null]
|
|
4221
|
+
}, {
|
|
4222
|
+
type: Optional
|
|
4223
|
+
}] }]; } });
|
|
4224
|
+
|
|
3021
4225
|
class StringifySimpleStorageAccessorConverter {
|
|
3022
4226
|
stringifyValue(value) {
|
|
3023
4227
|
return JSON.stringify(value);
|
|
@@ -3243,11 +4447,11 @@ class SimpleStorageAccessorFactory {
|
|
|
3243
4447
|
return new SimpleStorageAccessor(delegate, accessorConfig);
|
|
3244
4448
|
}
|
|
3245
4449
|
}
|
|
3246
|
-
SimpleStorageAccessorFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3247
|
-
SimpleStorageAccessorFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
3248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4450
|
+
SimpleStorageAccessorFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SimpleStorageAccessorFactory, deps: [{ token: DEFAULT_STORAGE_OBJECT_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4451
|
+
SimpleStorageAccessorFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SimpleStorageAccessorFactory });
|
|
4452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SimpleStorageAccessorFactory, decorators: [{
|
|
3249
4453
|
type: Injectable
|
|
3250
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
4454
|
+
}], ctorParameters: function () { return [{ type: i1$6.FullStorageObject, decorators: [{
|
|
3251
4455
|
type: Inject,
|
|
3252
4456
|
args: [DEFAULT_STORAGE_OBJECT_TOKEN]
|
|
3253
4457
|
}] }]; } });
|
|
@@ -3352,10 +4556,10 @@ class DbxStorageModule {
|
|
|
3352
4556
|
};
|
|
3353
4557
|
}
|
|
3354
4558
|
}
|
|
3355
|
-
DbxStorageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3356
|
-
DbxStorageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3357
|
-
DbxStorageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
3358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
4559
|
+
DbxStorageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxStorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4560
|
+
DbxStorageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxStorageModule });
|
|
4561
|
+
DbxStorageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxStorageModule });
|
|
4562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxStorageModule, decorators: [{
|
|
3359
4563
|
type: NgModule
|
|
3360
4564
|
}] });
|
|
3361
4565
|
|
|
@@ -3363,5 +4567,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
3363
4567
|
* Generated bundle index. Do not edit.
|
|
3364
4568
|
*/
|
|
3365
4569
|
|
|
3366
|
-
export { APP_ACTION_DISABLED_DIRECTIVE_KEY, APP_ACTION_ENFORCE_MODIFIED_DIRECTIVE_KEY, AbstractActionFilterSourceDirective, AbstractDbxAnchorDirective, AbstractDbxButtonDirective, AbstractDbxFilterMapInstanceDirective,
|
|
4570
|
+
export { APP_ACTION_DISABLED_DIRECTIVE_KEY, APP_ACTION_ENFORCE_MODIFIED_DIRECTIVE_KEY, AbstractActionFilterSourceDirective, AbstractDbxActionValueOnTriggerDirective, AbstractDbxAnchorDirective, AbstractDbxButtonDirective, AbstractDbxFilterMapInstanceDirective, AbstractDbxInjectionDirective, AbstractFilterSourceConnectorDirective, AbstractFilterSourceDirective, AbstractForwardDbxInjectionContextDirective, AbstractIfDirective, AbstractLockSetSubscriptionDirective, AbstractSubscriptionDirective, AbstractTransitionDirective, AbstractTransitionWatcherDirective, ActionContextStore, ActionContextStoreSource, ActionContextStoreSourceMap, AnchorType, 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_ONBOARDING_APP_CONTEXT_STATE, DBX_PUBLIC_APP_CONTEXT_STATE, DEFAULT_ACTION_DISABLED_KEY, DEFAULT_ACTION_MAP_WORKING_DISABLED_KEY, DEFAULT_STORAGE_ACCESSOR_FACTORY_TOKEN, DEFAULT_STORAGE_OBJECT_TOKEN, DateDistancePipe, DateFormatDistancePipe, DateFromToTimePipe, DbxActionAutoModifyDirective, DbxActionAutoTriggerDirective, DbxActionButtonDirective, DbxActionButtonTriggerDirective, DbxActionContextBaseSource, DbxActionContextLoggerDirective, DbxActionContextMachine, DbxActionContextMapDirective, DbxActionContextMapDirectiveSourceInstance, DbxActionContextStoreSourceInstance, DbxActionDirective, DbxActionDisabledDirective, DbxActionEnforceModifiedDirective, DbxActionFromMapDirective, DbxActionHandlerDirective, DbxActionHasSuccessDirective, DbxActionIsWorkingDirective, DbxActionMapSourceDirective, DbxActionMapWorkingDisableDirective, DbxActionSourceDirective, DbxActionState, DbxActionSuccessHandlerDirective, DbxActionValueDirective, DbxActionValueOnTriggerInstance, DbxActionValueTriggerDirective, DbxActionWorkInstanceDelegate, DbxAnchor, DbxAngularRouterService, DbxAppAuthRouterEffects, DbxAppAuthRouterModule, DbxAppAuthRouterService, DbxAppAuthRouterStateModule, DbxAppAuthRoutes, DbxAppAuthStateModule, DbxAppAuthStateService, DbxAppContextService, DbxAppContextStateDirective, DbxAppContextStateModule, DbxAuthHasAnyRoleDirective, DbxAuthHasRolesDirective, DbxAuthService, DbxButton, DbxButtonDirective, DbxButtonSegueDirective, DbxCoreActionModule, DbxCoreAngularRouterSegueModule, DbxCoreAuthModule, DbxCoreButtonModule, DbxCoreFilterModule, DbxCoreUIRouterSegueModule, DbxDatePipeModule, DbxFilterMapDirective, DbxFilterMapSourceConnectorDirective, DbxFilterMapSourceDirective, DbxFilterSourceConnectorDirective, DbxFilterSourceDirective, DbxInjectionComponent, DbxInjectionComponentModule, DbxInjectionContext, DbxInjectionContextDirective, DbxInjectionInstance, DbxLoadingButtonDirective, DbxMiscPipeModule, DbxPipesModule, DbxRouterService, DbxRouterTransitionEventType, DbxRouterTransitionService, DbxStorageModule, DbxUIRouterService, FullLocalStorageObject, InstantStorageAccessor, LimitedStorageAccessor, LockSetComponentStore, MemoryStorageObject, MinutesStringPipe, NO_AUTH_USER_IDENTIFIER, PrettyJsonPipe, ProvideActionStoreSource, ProvideDbxAnchor, ProvideDbxButton, ProvideDbxInjectionContext, ProvideFilterSource, ProvideFilterSourceConnector, ProvideSecondaryActionStoreSource, SecondaryActionContextStoreSource, SimpleStorageAccessor, SimpleStorageAccessorFactory, StorageAccessor, StringStorageAccessor, StringifySimpleStorageAccessorConverter, TimeDistanceCountdownPipe, TimeDistancePipe, ToJsDatePipe, ToMinutesPipe, WrapperSimpleStorageAccessorDelegate, actionContextHasNoErrorAndIsModifiedAndCanTrigger, actionContextIsModifiedAndCanTrigger, actionContextStoreSourceInstanceFactory, actionContextStoreSourcePipe, anchorTypeForAnchor, asSegueRef, authRolesSetContainsAllRolesFrom, authRolesSetContainsAnyRoleFrom, authUserIdentifier, canReadyValue, canTriggerAction, canTriggerActionState, checkNgContentWrapperHasContent, dbxActionValueStreamDirective, defaultStorageObjectFactory, enableHasAuthRoleHook, enableHasAuthStateHook, enableIsLoggedInHook, expandClickableAnchorLinkTree, expandClickableAnchorLinkTreeNode, expandClickableAnchorLinkTrees, filterTransitionEvent, filterTransitionSuccess, flattenExpandedClickableAnchorLinkTree, flattenExpandedClickableAnchorLinkTreeToLinks, index as fromDbxAppAuth, index$2 as fromDbxAppContext, goWithRouter, isActionContextDisabled, isActionContextEnabled, isDisabledActionContextState, isIdleActionState, isSegueRef, isWorkingActionState, loadingStateForActionContextState, loadingStateTypeForActionContextState, loadingStateTypeForActionState, loggedInObsFromIsLoggedIn, loggedOutObsFromIsLoggedIn, makeAuthTransitionHook, makeDbxActionContextSourceReference, mapRefStringObsToSegueRefObs, mergeDbxInjectionComponentConfigs, index$1 as onDbxAppAuth, index$3 as onDbxAppContext, pipeActionStore, readSegueRefString, redirectBasedOnAuthUserState, refStringToSegueRef, safeDetectChanges, safeMarkForCheck, safeUseCdRef, successTransition, tapDetectChanges, useActionStore };
|
|
3367
4571
|
//# sourceMappingURL=dereekb-dbx-core.mjs.map
|