@dereekb/dbx-core 2.1.0 → 3.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 +3 -3
- package/esm2020/lib/action/directive/state/action.value.trigger.directive.mjs +6 -6
- package/esm2020/lib/action/directive/state/action.value.trigger.instance.mjs +2 -1
- package/esm2020/lib/action/directive/state/action.working.component.mjs +28 -22
- package/esm2020/lib/action/directive/state/index.mjs +2 -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 +1672 -575
- package/fesm2015/dereekb-dbx-core.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-core.mjs +1682 -585
- 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.trigger.instance.d.ts +2 -2
- package/lib/action/directive/state/action.working.component.d.ts +11 -5
- package/lib/action/directive/state/index.d.ts +1 -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 +6 -13
- 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, asObservable, returnIfIs, 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,7 @@ 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']
|
|
1493
1394
|
}] } });
|
|
1494
1395
|
|
|
1495
1396
|
/**
|
|
@@ -1528,6 +1429,7 @@ class DbxActionValueOnTriggerInstance {
|
|
|
1528
1429
|
destroy() {
|
|
1529
1430
|
this.source.lockSet.onNextUnlock(() => {
|
|
1530
1431
|
this._triggeredSub.destroy();
|
|
1432
|
+
this._valueGetter.complete();
|
|
1531
1433
|
});
|
|
1532
1434
|
}
|
|
1533
1435
|
}
|
|
@@ -1564,9 +1466,9 @@ class AbstractDbxActionValueOnTriggerDirective {
|
|
|
1564
1466
|
this._triggeredSub.destroy();
|
|
1565
1467
|
}
|
|
1566
1468
|
}
|
|
1567
|
-
AbstractDbxActionValueOnTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1568
|
-
AbstractDbxActionValueOnTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1569
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
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: [{
|
|
1570
1472
|
type: Directive
|
|
1571
1473
|
}], ctorParameters: function () { return [{ type: DbxActionContextStoreSourceInstance }, { type: undefined }]; } });
|
|
1572
1474
|
/**
|
|
@@ -1584,9 +1486,9 @@ class DbxActionValueTriggerDirective extends AbstractDbxActionValueOnTriggerDire
|
|
|
1584
1486
|
this.isModifiedFunction = isModifiedFunction;
|
|
1585
1487
|
}
|
|
1586
1488
|
}
|
|
1587
|
-
DbxActionValueTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1588
|
-
DbxActionValueTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1589
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
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: [{
|
|
1590
1492
|
type: Directive,
|
|
1591
1493
|
args: [{
|
|
1592
1494
|
exportAs: 'dbxActionValueOnTrigger',
|
|
@@ -1613,14 +1515,15 @@ class DbxActionContextMachine extends DbxActionContextBaseSource {
|
|
|
1613
1515
|
this._successSub = new SubscriptionObject();
|
|
1614
1516
|
// Handle Value Ready
|
|
1615
1517
|
this._handleValueReadySub.subscription = this.sourceInstance.valueReady$.subscribe((value) => {
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
delegate: new
|
|
1619
|
-
})
|
|
1518
|
+
const doWork = workFactory({
|
|
1519
|
+
work: config.handleValueReady,
|
|
1520
|
+
delegate: new DbxActionWorkInstanceDelegate(this.sourceInstance)
|
|
1521
|
+
});
|
|
1522
|
+
doWork(value);
|
|
1620
1523
|
});
|
|
1621
1524
|
// If this is a one-time use, then destroy it after the first success comes through.
|
|
1622
1525
|
if (this.config.oneTimeUse) {
|
|
1623
|
-
this.sourceInstance.success$.pipe(first(), delay(1000)).subscribe(() => {
|
|
1526
|
+
this.sourceInstance.success$.pipe(first(), delay$1(1000)).subscribe(() => {
|
|
1624
1527
|
this.destroy();
|
|
1625
1528
|
});
|
|
1626
1529
|
}
|
|
@@ -1641,18 +1544,18 @@ class DbxActionContextMachine extends DbxActionContextBaseSource {
|
|
|
1641
1544
|
|
|
1642
1545
|
class DbxCoreActionModule {
|
|
1643
1546
|
}
|
|
1644
|
-
DbxCoreActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1645
|
-
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,
|
|
1646
1549
|
DbxActionMapWorkingDisableDirective, DbxActionSourceDirective, DbxActionHandlerDirective, DbxActionDisabledDirective, DbxActionEnforceModifiedDirective,
|
|
1647
1550
|
DbxActionAutoTriggerDirective, dbxActionValueStreamDirective, DbxActionAutoModifyDirective, DbxActionValueDirective, DbxActionContextLoggerDirective,
|
|
1648
|
-
|
|
1551
|
+
DbxActionHasSuccessDirective, DbxActionSuccessHandlerDirective, DbxActionIsWorkingDirective], imports: [CommonModule], exports: [DbxActionDirective, DbxActionContextMapDirective, DbxActionFromMapDirective, DbxActionMapSourceDirective,
|
|
1649
1552
|
DbxActionMapWorkingDisableDirective, DbxActionSourceDirective, DbxActionHandlerDirective, DbxActionDisabledDirective, DbxActionEnforceModifiedDirective,
|
|
1650
1553
|
DbxActionAutoTriggerDirective, dbxActionValueStreamDirective, DbxActionAutoModifyDirective, DbxActionValueDirective, DbxActionContextLoggerDirective,
|
|
1651
|
-
|
|
1652
|
-
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: [[
|
|
1653
1556
|
CommonModule
|
|
1654
1557
|
]] });
|
|
1655
|
-
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: [{
|
|
1656
1559
|
type: NgModule,
|
|
1657
1560
|
args: [{
|
|
1658
1561
|
imports: [
|
|
@@ -1662,13 +1565,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1662
1565
|
DbxActionDirective, DbxActionContextMapDirective, DbxActionFromMapDirective, DbxActionMapSourceDirective,
|
|
1663
1566
|
DbxActionMapWorkingDisableDirective, DbxActionSourceDirective, DbxActionHandlerDirective, DbxActionDisabledDirective, DbxActionEnforceModifiedDirective,
|
|
1664
1567
|
DbxActionAutoTriggerDirective, dbxActionValueStreamDirective, DbxActionAutoModifyDirective, DbxActionValueDirective, DbxActionContextLoggerDirective,
|
|
1665
|
-
|
|
1568
|
+
DbxActionHasSuccessDirective, DbxActionSuccessHandlerDirective, DbxActionIsWorkingDirective,
|
|
1666
1569
|
],
|
|
1667
1570
|
exports: [
|
|
1668
1571
|
DbxActionDirective, DbxActionContextMapDirective, DbxActionFromMapDirective, DbxActionMapSourceDirective,
|
|
1669
1572
|
DbxActionMapWorkingDisableDirective, DbxActionSourceDirective, DbxActionHandlerDirective, DbxActionDisabledDirective, DbxActionEnforceModifiedDirective,
|
|
1670
1573
|
DbxActionAutoTriggerDirective, dbxActionValueStreamDirective, DbxActionAutoModifyDirective, DbxActionValueDirective, DbxActionContextLoggerDirective,
|
|
1671
|
-
|
|
1574
|
+
DbxActionHasSuccessDirective, DbxActionSuccessHandlerDirective, DbxActionIsWorkingDirective
|
|
1672
1575
|
]
|
|
1673
1576
|
}]
|
|
1674
1577
|
}] });
|
|
@@ -1681,162 +1584,459 @@ function makeDbxActionContextSourceReference(sourceInstance) {
|
|
|
1681
1584
|
}
|
|
1682
1585
|
|
|
1683
1586
|
/**
|
|
1684
|
-
*
|
|
1685
|
-
*
|
|
1686
|
-
* @param cdRef
|
|
1687
|
-
* @param timeout
|
|
1688
|
-
* @returns
|
|
1587
|
+
* Client auth service used to retrieve info about the current state of client authentication and client roles they may have.
|
|
1689
1588
|
*/
|
|
1690
|
-
|
|
1691
|
-
return tap$1(() => setTimeout(() => safeDetectChanges(cdRef), timeout));
|
|
1589
|
+
class DbxAuthService {
|
|
1692
1590
|
}
|
|
1591
|
+
|
|
1693
1592
|
/**
|
|
1694
|
-
*
|
|
1695
|
-
*
|
|
1696
|
-
* @param cdRef
|
|
1593
|
+
* This generates a TransitionHookFn that can be used with redirecting routes.
|
|
1697
1594
|
*/
|
|
1698
|
-
function
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
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;
|
|
1702
1652
|
}
|
|
1653
|
+
|
|
1703
1654
|
/**
|
|
1704
|
-
*
|
|
1705
|
-
* or more specifically if the parent component passed any target content to the child. This will still return true if
|
|
1706
|
-
* passed content is empty.
|
|
1707
|
-
*
|
|
1708
|
-
* TS:
|
|
1709
|
-
* @ViewChild('customLoading', { static: false }) customCustom: ElementRef;
|
|
1655
|
+
* Creates a AuthTransitionRedirectTargetGetter that can redirect values based on the current authUserState.
|
|
1710
1656
|
*
|
|
1711
|
-
*
|
|
1712
|
-
*
|
|
1713
|
-
* <ng-content select="[content]"></ng-content>
|
|
1714
|
-
* </div>
|
|
1657
|
+
* @param stateMap
|
|
1658
|
+
* @returns
|
|
1715
1659
|
*/
|
|
1716
|
-
function
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
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
|
+
};
|
|
1725
1679
|
}
|
|
1726
1680
|
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
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 });
|
|
1734
1701
|
}
|
|
1735
1702
|
|
|
1736
1703
|
/**
|
|
1737
|
-
*
|
|
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
|
|
1738
1708
|
*/
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
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 });
|
|
1753
1730
|
}
|
|
1754
|
-
DbxActionButtonTriggerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: DbxActionButtonTriggerDirective, deps: [{ token: DbxButton, host: true }, { token: DbxActionContextStoreSourceInstance }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1755
|
-
DbxActionButtonTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.4", type: DbxActionButtonTriggerDirective, selector: "[dbxActionButtonTrigger]", usesInheritance: true, ngImport: i0 });
|
|
1756
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImport: i0, type: DbxActionButtonTriggerDirective, decorators: [{
|
|
1757
|
-
type: Directive,
|
|
1758
|
-
args: [{
|
|
1759
|
-
selector: '[dbxActionButtonTrigger]'
|
|
1760
|
-
}]
|
|
1761
|
-
}], ctorParameters: function () { return [{ type: DbxButton, decorators: [{
|
|
1762
|
-
type: Host
|
|
1763
|
-
}] }, { type: DbxActionContextStoreSourceInstance }]; } });
|
|
1764
1731
|
|
|
1765
1732
|
/**
|
|
1766
|
-
*
|
|
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
|
|
1767
1737
|
*/
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
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
|
+
};
|
|
1785
1770
|
}
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
this._workingSub.destroy();
|
|
1789
|
-
this._disabledSub.destroy();
|
|
1771
|
+
else {
|
|
1772
|
+
return input;
|
|
1790
1773
|
}
|
|
1791
1774
|
}
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
}]
|
|
1799
|
-
}], ctorParameters: function () { return [{ type: DbxButton, decorators: [{
|
|
1800
|
-
type: Host
|
|
1801
|
-
}] }, { type: DbxActionContextStoreSourceInstance }, { type: i0.ChangeDetectorRef }]; } });
|
|
1775
|
+
function toParsedHasAuthStateConfig(input) {
|
|
1776
|
+
return {
|
|
1777
|
+
allowed: maybeSet(input.allowedStates),
|
|
1778
|
+
disallowed: maybeSet(input.disallowedStates)
|
|
1779
|
+
};
|
|
1780
|
+
}
|
|
1802
1781
|
|
|
1803
|
-
const
|
|
1804
|
-
getChildren: (x) => x.children
|
|
1805
|
-
});
|
|
1806
|
-
const flattenExpandedClickableAnchorLinkTree = flattenTreeToArrayFunction();
|
|
1807
|
-
const flattenExpandedClickableAnchorLinkTreeToLinks = flattenTreeToArrayFunction((x) => x.value);
|
|
1782
|
+
const DBX_INIT_APP_CONTEXT_STATE = 'init';
|
|
1808
1783
|
/**
|
|
1809
|
-
* Fully expands the given parent link and flattens the tree to a single parent link.
|
|
1810
1784
|
*
|
|
1811
|
-
* @param link
|
|
1812
|
-
* @returns
|
|
1813
1785
|
*/
|
|
1814
|
-
|
|
1815
|
-
return flattenExpandedClickableAnchorLinkTree(expandClickableAnchorLinkTreeNode(link));
|
|
1816
|
-
}
|
|
1786
|
+
const DBX_PUBLIC_APP_CONTEXT_STATE = 'public';
|
|
1817
1787
|
/**
|
|
1818
|
-
*
|
|
1788
|
+
*
|
|
1819
1789
|
*/
|
|
1820
|
-
const
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
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);
|
|
1889
|
+
}
|
|
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)))))));
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
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
|
+
});
|
|
2002
|
+
|
|
2003
|
+
const expandClickableAnchorLinkTreeNode = expandTreeFunction({
|
|
2004
|
+
getChildren: (x) => x.children
|
|
2005
|
+
});
|
|
2006
|
+
const flattenExpandedClickableAnchorLinkTree = flattenTreeToArrayFunction();
|
|
2007
|
+
const flattenExpandedClickableAnchorLinkTreeToLinks = flattenTreeToArrayFunction((x) => x.value);
|
|
2008
|
+
/**
|
|
2009
|
+
* Fully expands the given parent link and flattens the tree to a single parent link.
|
|
2010
|
+
*
|
|
2011
|
+
* @param link
|
|
2012
|
+
* @returns
|
|
2013
|
+
*/
|
|
2014
|
+
function expandClickableAnchorLinkTree(link) {
|
|
2015
|
+
return flattenExpandedClickableAnchorLinkTree(expandClickableAnchorLinkTreeNode(link));
|
|
2016
|
+
}
|
|
2017
|
+
/**
|
|
2018
|
+
* Expands an array of links into an array of ExpandedClickableAnchorLinkTree tree values.
|
|
2019
|
+
*/
|
|
2020
|
+
const expandClickableAnchorLinkTrees = expandFlattenTreeFunction(expandClickableAnchorLinkTreeNode, flattenExpandedClickableAnchorLinkTree);
|
|
2021
|
+
var AnchorType;
|
|
2022
|
+
(function (AnchorType) {
|
|
2023
|
+
/**
|
|
2024
|
+
* When the anchor has no specific content but is not disabled.
|
|
2025
|
+
*
|
|
2026
|
+
* Is a passthrough for the content.
|
|
2027
|
+
*/
|
|
2028
|
+
AnchorType[AnchorType["PLAIN"] = 0] = "PLAIN";
|
|
2029
|
+
AnchorType[AnchorType["CLICKABLE"] = 1] = "CLICKABLE";
|
|
2030
|
+
AnchorType[AnchorType["SREF"] = 2] = "SREF";
|
|
2031
|
+
AnchorType[AnchorType["HREF"] = 3] = "HREF";
|
|
2032
|
+
AnchorType[AnchorType["DISABLED"] = 4] = "DISABLED";
|
|
2033
|
+
})(AnchorType || (AnchorType = {}));
|
|
2034
|
+
function anchorTypeForAnchor(anchor, disabled) {
|
|
2035
|
+
let type = AnchorType.DISABLED;
|
|
2036
|
+
if (!disabled && anchor) {
|
|
2037
|
+
if (anchor.disabled) {
|
|
2038
|
+
type = AnchorType.DISABLED;
|
|
2039
|
+
}
|
|
1840
2040
|
else if (anchor.ref) {
|
|
1841
2041
|
type = AnchorType.SREF;
|
|
1842
2042
|
}
|
|
@@ -1861,6 +2061,28 @@ function ProvideDbxAnchor(sourceType) {
|
|
|
1861
2061
|
}];
|
|
1862
2062
|
}
|
|
1863
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
|
+
|
|
1864
2086
|
/**
|
|
1865
2087
|
* Abstract anchor directive.
|
|
1866
2088
|
*/
|
|
@@ -1870,7 +2092,17 @@ class AbstractDbxAnchorDirective {
|
|
|
1870
2092
|
this._anchor = new BehaviorSubject(undefined);
|
|
1871
2093
|
this.disabled$ = this._disabled.asObservable();
|
|
1872
2094
|
this.anchor$ = this._anchor.pipe(skipFirstMaybe(), distinctUntilChanged(), shareReplay(1));
|
|
1873
|
-
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);
|
|
1874
2106
|
}
|
|
1875
2107
|
get anchor() {
|
|
1876
2108
|
return this._anchor.value;
|
|
@@ -1885,11 +2117,13 @@ class AbstractDbxAnchorDirective {
|
|
|
1885
2117
|
this._disabled.next(disabled);
|
|
1886
2118
|
}
|
|
1887
2119
|
}
|
|
1888
|
-
AbstractDbxAnchorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1889
|
-
AbstractDbxAnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
1890
|
-
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: [{
|
|
1891
2123
|
type: Directive
|
|
1892
|
-
}], propDecorators: {
|
|
2124
|
+
}], ctorParameters: function () { return []; }, propDecorators: { ref: [{
|
|
2125
|
+
type: Input
|
|
2126
|
+
}], anchor: [{
|
|
1893
2127
|
type: Input
|
|
1894
2128
|
}], disabled: [{
|
|
1895
2129
|
type: Input
|
|
@@ -1914,6 +2148,7 @@ class DbxAngularRouterService {
|
|
|
1914
2148
|
constructor(router, activatedRoute) {
|
|
1915
2149
|
this.router = router;
|
|
1916
2150
|
this.activatedRoute = activatedRoute;
|
|
2151
|
+
this.params$ = this.activatedRoute.params;
|
|
1917
2152
|
this.transitions$ = this.router.events.pipe(map((x) => {
|
|
1918
2153
|
let event;
|
|
1919
2154
|
if (x instanceof NavigationStart) {
|
|
@@ -1929,7 +2164,8 @@ class DbxAngularRouterService {
|
|
|
1929
2164
|
return event;
|
|
1930
2165
|
}), filterMaybe());
|
|
1931
2166
|
}
|
|
1932
|
-
go(
|
|
2167
|
+
go(input) {
|
|
2168
|
+
const segueRef = asSegueRef(input);
|
|
1933
2169
|
let ref = segueRef.ref;
|
|
1934
2170
|
if (isArray(ref)) {
|
|
1935
2171
|
return this.router.navigate(ref, {
|
|
@@ -1950,9 +2186,9 @@ class DbxAngularRouterService {
|
|
|
1950
2186
|
return 0; // TODO!
|
|
1951
2187
|
}
|
|
1952
2188
|
}
|
|
1953
|
-
DbxAngularRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1954
|
-
DbxAngularRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
1955
|
-
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: [{
|
|
1956
2192
|
type: Injectable
|
|
1957
2193
|
}], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i1$1.ActivatedRoute }]; } });
|
|
1958
2194
|
|
|
@@ -1962,6 +2198,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
1962
2198
|
class DbxRouterService {
|
|
1963
2199
|
}
|
|
1964
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
|
+
|
|
1965
2213
|
/**
|
|
1966
2214
|
* Router service definition that provides high level information about router transitions.
|
|
1967
2215
|
*/
|
|
@@ -1986,10 +2234,10 @@ class DbxCoreAngularRouterSegueModule {
|
|
|
1986
2234
|
};
|
|
1987
2235
|
}
|
|
1988
2236
|
}
|
|
1989
|
-
DbxCoreAngularRouterSegueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
1990
|
-
DbxCoreAngularRouterSegueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
1991
|
-
DbxCoreAngularRouterSegueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
1992
|
-
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: [{
|
|
1993
2241
|
type: NgModule,
|
|
1994
2242
|
args: [{}]
|
|
1995
2243
|
}] });
|
|
@@ -2039,12 +2287,15 @@ class DbxUIRouterService {
|
|
|
2039
2287
|
this.state = state;
|
|
2040
2288
|
this.transitionService = transitionService;
|
|
2041
2289
|
this.uiRouterGlobals = uiRouterGlobals;
|
|
2290
|
+
this._params = new BehaviorSubject(this.uiRouterGlobals.params);
|
|
2291
|
+
this.params$ = this._params.asObservable();
|
|
2042
2292
|
this._transitions = new Subject();
|
|
2043
2293
|
this.transitions$ = this._transitions.asObservable();
|
|
2044
2294
|
const emitTransition = (type) => {
|
|
2045
2295
|
this._transitions.next({
|
|
2046
2296
|
type
|
|
2047
2297
|
});
|
|
2298
|
+
this._params.next(this.uiRouterGlobals.params);
|
|
2048
2299
|
};
|
|
2049
2300
|
this.transitionService.onStart({}, () => {
|
|
2050
2301
|
emitTransition(DbxRouterTransitionEventType.START);
|
|
@@ -2053,27 +2304,45 @@ class DbxUIRouterService {
|
|
|
2053
2304
|
emitTransition(DbxRouterTransitionEventType.SUCCESS);
|
|
2054
2305
|
});
|
|
2055
2306
|
}
|
|
2056
|
-
|
|
2307
|
+
ngOnDestroy() {
|
|
2308
|
+
this._transitions.complete();
|
|
2309
|
+
}
|
|
2310
|
+
get params() {
|
|
2311
|
+
return this.uiRouterGlobals.params;
|
|
2312
|
+
}
|
|
2313
|
+
go(input) {
|
|
2314
|
+
const segueRef = asSegueRef(input);
|
|
2057
2315
|
const params = { ...this.uiRouterGlobals.current.params, ...segueRef.refParams };
|
|
2058
2316
|
return this.state.go(segueRef.ref, params, segueRef.refOptions).then(_ => true).catch(_ => false);
|
|
2059
2317
|
}
|
|
2060
|
-
isActive(
|
|
2318
|
+
isActive(input) {
|
|
2319
|
+
const segueRef = asSegueRef(input);
|
|
2061
2320
|
const { ref, refParams } = segueRef;
|
|
2062
2321
|
const targetRef = (ref.startsWith('.') ? `^${ref}` : ref);
|
|
2063
2322
|
const active = this.state.includes(targetRef, refParams);
|
|
2064
2323
|
return active;
|
|
2065
2324
|
}
|
|
2066
|
-
comparePrecision(
|
|
2067
|
-
const
|
|
2068
|
-
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;
|
|
2069
2330
|
return (aLength > bLength) ? 1 : (aLength === bLength) ? 0 : -1;
|
|
2070
2331
|
}
|
|
2071
2332
|
}
|
|
2072
|
-
DbxUIRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2073
|
-
DbxUIRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
2074
|
-
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: [{
|
|
2075
2336
|
type: Injectable
|
|
2076
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
|
+
}
|
|
2077
2346
|
|
|
2078
2347
|
class DbxCoreUIRouterSegueModule {
|
|
2079
2348
|
static forRoot() {
|
|
@@ -2093,80 +2362,532 @@ class DbxCoreUIRouterSegueModule {
|
|
|
2093
2362
|
};
|
|
2094
2363
|
}
|
|
2095
2364
|
}
|
|
2096
|
-
DbxCoreUIRouterSegueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2097
|
-
DbxCoreUIRouterSegueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
2098
|
-
DbxCoreUIRouterSegueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2099
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2100
|
-
type: NgModule,
|
|
2101
|
-
args: [{}]
|
|
2102
|
-
}] });
|
|
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
|
+
}
|
|
2103
2815
|
|
|
2104
|
-
|
|
2105
|
-
* Convenience function for filtering success from the input observable.
|
|
2106
|
-
*
|
|
2107
|
-
* @param obs
|
|
2108
|
-
* @returns
|
|
2109
|
-
*/
|
|
2110
|
-
function successTransition(obs) {
|
|
2111
|
-
return obs.pipe(filterTransitionSuccess());
|
|
2112
|
-
}
|
|
2113
|
-
function filterTransitionSuccess() {
|
|
2114
|
-
return filterTransitionEvent(DbxRouterTransitionEventType.SUCCESS);
|
|
2816
|
+
class DbxButton {
|
|
2115
2817
|
}
|
|
2116
|
-
function
|
|
2117
|
-
return
|
|
2818
|
+
function ProvideDbxButton(sourceType) {
|
|
2819
|
+
return [{
|
|
2820
|
+
provide: DbxButton,
|
|
2821
|
+
useExisting: forwardRef(() => sourceType)
|
|
2822
|
+
}];
|
|
2118
2823
|
}
|
|
2119
2824
|
|
|
2120
2825
|
/**
|
|
2121
|
-
*
|
|
2826
|
+
* Context used for linking a button to an ActionContext and only look for triggers.
|
|
2122
2827
|
*/
|
|
2123
|
-
class
|
|
2124
|
-
constructor(
|
|
2125
|
-
|
|
2126
|
-
this.
|
|
2127
|
-
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();
|
|
2128
2841
|
}
|
|
2129
2842
|
}
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2133
|
-
type: Directive
|
|
2134
|
-
|
|
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 }]; } });
|
|
2135
2853
|
|
|
2136
2854
|
/**
|
|
2137
|
-
*
|
|
2855
|
+
* Context used for linking a button to an ActionContext.
|
|
2138
2856
|
*/
|
|
2139
|
-
class
|
|
2140
|
-
constructor(
|
|
2141
|
-
super(
|
|
2142
|
-
this.
|
|
2143
|
-
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();
|
|
2144
2863
|
}
|
|
2145
2864
|
ngOnInit() {
|
|
2146
|
-
|
|
2147
|
-
|
|
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);
|
|
2148
2873
|
});
|
|
2149
2874
|
}
|
|
2150
2875
|
ngOnDestroy() {
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
zoneUpdateForSuccessfulTransition() {
|
|
2155
|
-
this.ngZone.run(() => this.updateForSuccessfulTransition());
|
|
2876
|
+
super.ngOnDestroy();
|
|
2877
|
+
this._workingSub.destroy();
|
|
2878
|
+
this._disabledSub.destroy();
|
|
2156
2879
|
}
|
|
2157
2880
|
}
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2
|
|
2161
|
-
type: Directive
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
return obs.pipe(map(x => refStringToSegueRef(x, options)));
|
|
2169
|
-
}
|
|
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 }]; } });
|
|
2170
2891
|
|
|
2171
2892
|
// MARK: Button Directives
|
|
2172
2893
|
class DbxButtonSegueDirective extends AbstractSubscriptionDirective {
|
|
@@ -2188,10 +2909,14 @@ class DbxButtonSegueDirective extends AbstractSubscriptionDirective {
|
|
|
2188
2909
|
this.dbxRouterService.go(segueRef);
|
|
2189
2910
|
})))).subscribe();
|
|
2190
2911
|
}
|
|
2912
|
+
ngOnDestroy() {
|
|
2913
|
+
super.ngOnDestroy();
|
|
2914
|
+
this._segueRef.complete();
|
|
2915
|
+
}
|
|
2191
2916
|
}
|
|
2192
|
-
DbxButtonSegueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2193
|
-
DbxButtonSegueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2194
|
-
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: [{
|
|
2195
2920
|
type: Directive,
|
|
2196
2921
|
args: [{
|
|
2197
2922
|
selector: '[dbxButtonSegue]'
|
|
@@ -2272,9 +2997,9 @@ class AbstractDbxButtonDirective extends AbstractSubscriptionDirective {
|
|
|
2272
2997
|
this.buttonClick.emit();
|
|
2273
2998
|
}
|
|
2274
2999
|
}
|
|
2275
|
-
AbstractDbxButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2276
|
-
AbstractDbxButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2277
|
-
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: [{
|
|
2278
3003
|
type: Directive
|
|
2279
3004
|
}], ctorParameters: function () { return []; }, propDecorators: { disabled: [{
|
|
2280
3005
|
type: Input
|
|
@@ -2293,9 +3018,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2293
3018
|
*/
|
|
2294
3019
|
class DbxButtonDirective extends AbstractDbxButtonDirective {
|
|
2295
3020
|
}
|
|
2296
|
-
DbxButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2297
|
-
DbxButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2298
|
-
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: [{
|
|
2299
3024
|
type: Directive,
|
|
2300
3025
|
args: [{
|
|
2301
3026
|
selector: '[dbxButton]',
|
|
@@ -2328,9 +3053,9 @@ class DbxLoadingButtonDirective extends AbstractSubscriptionDirective {
|
|
|
2328
3053
|
this.sub = subscription;
|
|
2329
3054
|
}
|
|
2330
3055
|
}
|
|
2331
|
-
DbxLoadingButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2332
|
-
DbxLoadingButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2333
|
-
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: [{
|
|
2334
3059
|
type: Directive,
|
|
2335
3060
|
args: [{
|
|
2336
3061
|
selector: '[dbxLoadingButton]'
|
|
@@ -2344,8 +3069,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2344
3069
|
|
|
2345
3070
|
class DbxCoreButtonModule {
|
|
2346
3071
|
}
|
|
2347
|
-
DbxCoreButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2348
|
-
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,
|
|
2349
3074
|
DbxLoadingButtonDirective,
|
|
2350
3075
|
DbxActionButtonTriggerDirective,
|
|
2351
3076
|
DbxActionButtonDirective,
|
|
@@ -2354,8 +3079,8 @@ DbxCoreButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
|
|
|
2354
3079
|
DbxActionButtonTriggerDirective,
|
|
2355
3080
|
DbxActionButtonDirective,
|
|
2356
3081
|
DbxButtonSegueDirective] });
|
|
2357
|
-
DbxCoreButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2358
|
-
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: [{
|
|
2359
3084
|
type: NgModule,
|
|
2360
3085
|
args: [{
|
|
2361
3086
|
imports: [],
|
|
@@ -2376,6 +3101,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2376
3101
|
}]
|
|
2377
3102
|
}] });
|
|
2378
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
|
+
|
|
2379
3184
|
/**
|
|
2380
3185
|
* Pipe that takes in a date and number of minutes and outputs a formatted date.
|
|
2381
3186
|
*/
|
|
@@ -2396,9 +3201,9 @@ class DateFromToTimePipe {
|
|
|
2396
3201
|
return undefined;
|
|
2397
3202
|
}
|
|
2398
3203
|
}
|
|
2399
|
-
DateFromToTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2400
|
-
DateFromToTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2401
|
-
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: [{
|
|
2402
3207
|
type: Pipe,
|
|
2403
3208
|
args: [{ name: 'dateFromPlusTo' }]
|
|
2404
3209
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -2429,24 +3234,31 @@ class MinutesStringPipe {
|
|
|
2429
3234
|
}
|
|
2430
3235
|
}
|
|
2431
3236
|
}
|
|
2432
|
-
MinutesStringPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2433
|
-
MinutesStringPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2434
|
-
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: [{
|
|
2435
3240
|
type: Pipe,
|
|
2436
3241
|
args: [{ name: 'minutesString', pure: false }]
|
|
2437
3242
|
}] });
|
|
2438
3243
|
|
|
2439
3244
|
class ToJsDatePipe {
|
|
2440
3245
|
static toJsDate(input) {
|
|
2441
|
-
|
|
3246
|
+
let date;
|
|
3247
|
+
if (input != null) {
|
|
3248
|
+
date = toJsDate(input);
|
|
3249
|
+
if (!isValid(date)) {
|
|
3250
|
+
date = undefined;
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
return date;
|
|
2442
3254
|
}
|
|
2443
3255
|
transform(input) {
|
|
2444
3256
|
return ToJsDatePipe.toJsDate(input);
|
|
2445
3257
|
}
|
|
2446
3258
|
}
|
|
2447
|
-
ToJsDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2448
|
-
ToJsDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2449
|
-
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: [{
|
|
2450
3262
|
type: Pipe,
|
|
2451
3263
|
args: [{ name: 'toJsDate' }]
|
|
2452
3264
|
}] });
|
|
@@ -2470,9 +3282,9 @@ class TimeDistanceCountdownPipe {
|
|
|
2470
3282
|
}
|
|
2471
3283
|
}
|
|
2472
3284
|
}
|
|
2473
|
-
TimeDistanceCountdownPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2474
|
-
TimeDistanceCountdownPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2475
|
-
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: [{
|
|
2476
3288
|
type: Pipe,
|
|
2477
3289
|
args: [{ name: 'timeCountdownDistance', pure: false }]
|
|
2478
3290
|
}] });
|
|
@@ -2489,9 +3301,9 @@ class TimeDistancePipe {
|
|
|
2489
3301
|
}
|
|
2490
3302
|
}
|
|
2491
3303
|
}
|
|
2492
|
-
TimeDistancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2493
|
-
TimeDistancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2494
|
-
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: [{
|
|
2495
3307
|
type: Pipe,
|
|
2496
3308
|
args: [{ name: 'timeDistance', pure: false }]
|
|
2497
3309
|
}] });
|
|
@@ -2504,9 +3316,9 @@ class ToMinutesPipe {
|
|
|
2504
3316
|
return milliseconds;
|
|
2505
3317
|
}
|
|
2506
3318
|
}
|
|
2507
|
-
ToMinutesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2508
|
-
ToMinutesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2509
|
-
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: [{
|
|
2510
3322
|
type: Pipe,
|
|
2511
3323
|
args: [{ name: 'toMinutes' }]
|
|
2512
3324
|
}] });
|
|
@@ -2533,9 +3345,9 @@ class DateFormatDistancePipe {
|
|
|
2533
3345
|
return undefined;
|
|
2534
3346
|
}
|
|
2535
3347
|
}
|
|
2536
|
-
DateFormatDistancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2537
|
-
DateFormatDistancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2538
|
-
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: [{
|
|
2539
3351
|
type: Pipe,
|
|
2540
3352
|
args: [{ name: 'dateFormatDistance', pure: false }]
|
|
2541
3353
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -2574,17 +3386,17 @@ class DateDistancePipe {
|
|
|
2574
3386
|
}
|
|
2575
3387
|
}
|
|
2576
3388
|
}
|
|
2577
|
-
DateDistancePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2578
|
-
DateDistancePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2
|
|
2579
|
-
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: [{
|
|
2580
3392
|
type: Pipe,
|
|
2581
3393
|
args: [{ name: 'dateDistance', pure: false }]
|
|
2582
3394
|
}] });
|
|
2583
3395
|
|
|
2584
3396
|
class DbxDatePipeModule {
|
|
2585
3397
|
}
|
|
2586
|
-
DbxDatePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2587
|
-
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,
|
|
2588
3400
|
DateFormatDistancePipe,
|
|
2589
3401
|
MinutesStringPipe,
|
|
2590
3402
|
TimeDistanceCountdownPipe,
|
|
@@ -2599,8 +3411,8 @@ DbxDatePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
|
2599
3411
|
DateDistancePipe,
|
|
2600
3412
|
ToJsDatePipe,
|
|
2601
3413
|
ToMinutesPipe] });
|
|
2602
|
-
DbxDatePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
2603
|
-
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: [{
|
|
2604
3416
|
type: NgModule,
|
|
2605
3417
|
args: [{
|
|
2606
3418
|
exports: [
|
|
@@ -2626,6 +3438,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2626
3438
|
}]
|
|
2627
3439
|
}] });
|
|
2628
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
|
+
|
|
2629
3500
|
/**
|
|
2630
3501
|
* Abstract FilterSource implementation.
|
|
2631
3502
|
*/
|
|
@@ -2654,9 +3525,9 @@ class AbstractFilterSourceDirective {
|
|
|
2654
3525
|
return of(undefined);
|
|
2655
3526
|
}
|
|
2656
3527
|
}
|
|
2657
|
-
AbstractFilterSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2658
|
-
AbstractFilterSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2659
|
-
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: [{
|
|
2660
3531
|
type: Directive
|
|
2661
3532
|
}] });
|
|
2662
3533
|
|
|
@@ -2679,9 +3550,9 @@ class AbstractActionFilterSourceDirective extends AbstractFilterSourceDirective
|
|
|
2679
3550
|
this.filterAction.trigger();
|
|
2680
3551
|
}
|
|
2681
3552
|
}
|
|
2682
|
-
AbstractActionFilterSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2683
|
-
AbstractActionFilterSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2684
|
-
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: [{
|
|
2685
3556
|
type: Directive
|
|
2686
3557
|
}], propDecorators: { filterAction: [{
|
|
2687
3558
|
type: ViewChild,
|
|
@@ -2703,9 +3574,9 @@ class AbstractFilterSourceConnectorDirective {
|
|
|
2703
3574
|
this._source.next(filterSource);
|
|
2704
3575
|
}
|
|
2705
3576
|
}
|
|
2706
|
-
AbstractFilterSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2707
|
-
AbstractFilterSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2708
|
-
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: [{
|
|
2709
3580
|
type: Directive
|
|
2710
3581
|
}] });
|
|
2711
3582
|
|
|
@@ -2736,12 +3607,12 @@ function ProvideFilterSourceConnector(sourceType) {
|
|
|
2736
3607
|
*/
|
|
2737
3608
|
class DbxFilterSourceConnectorDirective extends AbstractFilterSourceConnectorDirective {
|
|
2738
3609
|
}
|
|
2739
|
-
DbxFilterSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2740
|
-
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: [
|
|
2741
3612
|
...ProvideFilterSource(DbxFilterSourceConnectorDirective),
|
|
2742
3613
|
...ProvideFilterSourceConnector(DbxFilterSourceConnectorDirective)
|
|
2743
3614
|
], usesInheritance: true, ngImport: i0 });
|
|
2744
|
-
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: [{
|
|
2745
3616
|
type: Directive,
|
|
2746
3617
|
args: [{
|
|
2747
3618
|
selector: '[dbxFilterSourceConnector]',
|
|
@@ -2766,11 +3637,11 @@ class AbstractDbxFilterMapInstanceDirective {
|
|
|
2766
3637
|
this._key.complete();
|
|
2767
3638
|
}
|
|
2768
3639
|
}
|
|
2769
|
-
AbstractDbxFilterMapInstanceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2770
|
-
AbstractDbxFilterMapInstanceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2771
|
-
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: [{
|
|
2772
3643
|
type: Directive
|
|
2773
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
3644
|
+
}], ctorParameters: function () { return [{ type: i1$5.FilterMap }]; } });
|
|
2774
3645
|
|
|
2775
3646
|
/**
|
|
2776
3647
|
* Provides a FilterSource from a parent FilterMap.
|
|
@@ -2790,11 +3661,11 @@ class DbxFilterMapSourceDirective extends AbstractDbxFilterMapInstanceDirective
|
|
|
2790
3661
|
this.instance$.pipe(first$1()).subscribe((x) => x.initWithFilter(filterObs));
|
|
2791
3662
|
}
|
|
2792
3663
|
}
|
|
2793
|
-
DbxFilterMapSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2794
|
-
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: [
|
|
2795
3666
|
...ProvideFilterSource(DbxFilterMapSourceDirective)
|
|
2796
3667
|
], exportAs: ["dbxFilterMapSource"], usesInheritance: true, ngImport: i0 });
|
|
2797
|
-
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: [{
|
|
2798
3669
|
type: Directive,
|
|
2799
3670
|
args: [{
|
|
2800
3671
|
selector: '[dbxFilterMapSource]',
|
|
@@ -2823,12 +3694,12 @@ class DbxFilterMapSourceConnectorDirective extends DbxFilterMapSourceDirective {
|
|
|
2823
3694
|
this.instance$.pipe(first$1()).subscribe((x) => x.connectWithSource(filterSource));
|
|
2824
3695
|
}
|
|
2825
3696
|
}
|
|
2826
|
-
DbxFilterMapSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2827
|
-
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: [
|
|
2828
3699
|
...ProvideFilterSource(DbxFilterMapSourceConnectorDirective),
|
|
2829
3700
|
...ProvideFilterSourceConnector(DbxFilterMapSourceConnectorDirective)
|
|
2830
3701
|
], exportAs: ["dbxFilterMapSourceConnector"], usesInheritance: true, ngImport: i0 });
|
|
2831
|
-
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: [{
|
|
2832
3703
|
type: Directive,
|
|
2833
3704
|
args: [{
|
|
2834
3705
|
selector: '[dbxFilterMapSourceConnector]',
|
|
@@ -2854,25 +3725,25 @@ class DbxFilterMapDirective {
|
|
|
2854
3725
|
this.filterMap.destroy();
|
|
2855
3726
|
}
|
|
2856
3727
|
}
|
|
2857
|
-
DbxFilterMapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2858
|
-
DbxFilterMapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2859
|
-
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: [{
|
|
2860
3731
|
type: Directive,
|
|
2861
3732
|
args: [{
|
|
2862
3733
|
selector: '[dbxFilterMap]',
|
|
2863
3734
|
exportAs: 'dbxFilterMap',
|
|
2864
3735
|
providers: [FilterMap]
|
|
2865
3736
|
}]
|
|
2866
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
3737
|
+
}], ctorParameters: function () { return [{ type: i1$5.FilterMap }]; } });
|
|
2867
3738
|
|
|
2868
3739
|
/**
|
|
2869
3740
|
* Basic filter source directive.
|
|
2870
3741
|
*/
|
|
2871
3742
|
class DbxFilterSourceDirective extends AbstractFilterSourceDirective {
|
|
2872
3743
|
}
|
|
2873
|
-
DbxFilterSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2874
|
-
DbxFilterSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2
|
|
2875
|
-
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: [{
|
|
2876
3747
|
type: Directive,
|
|
2877
3748
|
args: [{
|
|
2878
3749
|
selector: '[dbxFilterSource]',
|
|
@@ -2882,8 +3753,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2882
3753
|
|
|
2883
3754
|
class DbxCoreFilterModule {
|
|
2884
3755
|
}
|
|
2885
|
-
DbxCoreFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
2886
|
-
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,
|
|
2887
3758
|
DbxFilterSourceConnectorDirective,
|
|
2888
3759
|
DbxFilterMapDirective,
|
|
2889
3760
|
DbxFilterMapSourceConnectorDirective,
|
|
@@ -2892,10 +3763,10 @@ DbxCoreFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
|
|
|
2892
3763
|
DbxFilterMapDirective,
|
|
2893
3764
|
DbxFilterMapSourceConnectorDirective,
|
|
2894
3765
|
DbxFilterMapSourceDirective] });
|
|
2895
|
-
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: [[
|
|
2896
3767
|
CommonModule
|
|
2897
3768
|
]] });
|
|
2898
|
-
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: [{
|
|
2899
3770
|
type: NgModule,
|
|
2900
3771
|
args: [{
|
|
2901
3772
|
imports: [
|
|
@@ -2918,14 +3789,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
2918
3789
|
}]
|
|
2919
3790
|
}] });
|
|
2920
3791
|
|
|
2921
|
-
const
|
|
3792
|
+
const DBX_INJECTION_COMPONENT_DATA = new InjectionToken('DbxInjectionComponentConfigData');
|
|
2922
3793
|
/**
|
|
2923
3794
|
* Merges multiple configurations into a single configuration.
|
|
2924
3795
|
*
|
|
2925
3796
|
* @param configs
|
|
2926
3797
|
* @returns
|
|
2927
3798
|
*/
|
|
2928
|
-
function
|
|
3799
|
+
function mergeDbxInjectionComponentConfigs(configs) {
|
|
2929
3800
|
const providers = mergeArrays(filterMaybeValues(configs).map(x => x.providers));
|
|
2930
3801
|
const result = mergeObjects(configs);
|
|
2931
3802
|
result.providers = providers;
|
|
@@ -2935,7 +3806,7 @@ function mergeDbxInjectedComponentConfigs(configs) {
|
|
|
2935
3806
|
/**
|
|
2936
3807
|
* Instance used by components to inject content based on the configuration into the view.
|
|
2937
3808
|
*/
|
|
2938
|
-
class
|
|
3809
|
+
class DbxInjectionInstance {
|
|
2939
3810
|
constructor(_injector) {
|
|
2940
3811
|
this._injector = _injector;
|
|
2941
3812
|
this._subscriptionObject = new SubscriptionObject();
|
|
@@ -3011,7 +3882,7 @@ class DbxInjectedComponentInstance {
|
|
|
3011
3882
|
injector = Injector.create({
|
|
3012
3883
|
parent: parentInjector,
|
|
3013
3884
|
providers: mergeArrayOrValueIntoArray([{
|
|
3014
|
-
provide:
|
|
3885
|
+
provide: DBX_INJECTION_COMPONENT_DATA,
|
|
3015
3886
|
useValue: data
|
|
3016
3887
|
}], providers ?? [])
|
|
3017
3888
|
});
|
|
@@ -3045,10 +3916,10 @@ class DbxInjectedComponentInstance {
|
|
|
3045
3916
|
/**
|
|
3046
3917
|
* Abstract directive that injects content based on the configuration into the view.
|
|
3047
3918
|
*/
|
|
3048
|
-
class
|
|
3919
|
+
class AbstractDbxInjectionDirective {
|
|
3049
3920
|
constructor(_injector) {
|
|
3050
3921
|
this._injector = _injector;
|
|
3051
|
-
this._instance = new
|
|
3922
|
+
this._instance = new DbxInjectionInstance(this._injector);
|
|
3052
3923
|
}
|
|
3053
3924
|
ngOnInit() {
|
|
3054
3925
|
this._instance.init();
|
|
@@ -3066,16 +3937,16 @@ class AbstractDbxInjectedDirective {
|
|
|
3066
3937
|
this._instance.content = content;
|
|
3067
3938
|
}
|
|
3068
3939
|
}
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
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: [{
|
|
3072
3943
|
type: Directive
|
|
3073
3944
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
3074
3945
|
|
|
3075
3946
|
/**
|
|
3076
3947
|
* Component that injects content based on the configuration into the view.
|
|
3077
3948
|
*/
|
|
3078
|
-
class
|
|
3949
|
+
class DbxInjectionComponent extends AbstractDbxInjectionDirective {
|
|
3079
3950
|
set config(config) {
|
|
3080
3951
|
this.setConfig(config);
|
|
3081
3952
|
}
|
|
@@ -3086,12 +3957,12 @@ class DbxInjectedComponent extends AbstractDbxInjectedDirective {
|
|
|
3086
3957
|
this.setContent(content);
|
|
3087
3958
|
}
|
|
3088
3959
|
}
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
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: [{
|
|
3092
3963
|
type: Component,
|
|
3093
3964
|
args: [{
|
|
3094
|
-
selector: 'dbx-
|
|
3965
|
+
selector: 'dbx-injection, [dbxInjection], [dbx-injection]',
|
|
3095
3966
|
template: `<ng-template #content></ng-template>`
|
|
3096
3967
|
}]
|
|
3097
3968
|
}], propDecorators: { config: [{
|
|
@@ -3103,28 +3974,254 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
3103
3974
|
args: ['content', { static: true, read: ViewContainerRef }]
|
|
3104
3975
|
}] } });
|
|
3105
3976
|
|
|
3106
|
-
|
|
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 {
|
|
3107
4115
|
}
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
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: [[
|
|
3111
4121
|
CommonModule
|
|
3112
4122
|
]] });
|
|
3113
|
-
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: [{
|
|
3114
4124
|
type: NgModule,
|
|
3115
4125
|
args: [{
|
|
3116
4126
|
imports: [
|
|
3117
4127
|
CommonModule
|
|
3118
4128
|
],
|
|
3119
4129
|
declarations: [
|
|
3120
|
-
|
|
4130
|
+
DbxInjectionComponent,
|
|
4131
|
+
DbxInjectionContextDirective
|
|
3121
4132
|
],
|
|
3122
4133
|
exports: [
|
|
3123
|
-
|
|
4134
|
+
DbxInjectionComponent,
|
|
4135
|
+
DbxInjectionContextDirective
|
|
3124
4136
|
],
|
|
3125
4137
|
}]
|
|
3126
4138
|
}] });
|
|
3127
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
|
+
|
|
3128
4225
|
class StringifySimpleStorageAccessorConverter {
|
|
3129
4226
|
stringifyValue(value) {
|
|
3130
4227
|
return JSON.stringify(value);
|
|
@@ -3350,11 +4447,11 @@ class SimpleStorageAccessorFactory {
|
|
|
3350
4447
|
return new SimpleStorageAccessor(delegate, accessorConfig);
|
|
3351
4448
|
}
|
|
3352
4449
|
}
|
|
3353
|
-
SimpleStorageAccessorFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3354
|
-
SimpleStorageAccessorFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2
|
|
3355
|
-
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: [{
|
|
3356
4453
|
type: Injectable
|
|
3357
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
4454
|
+
}], ctorParameters: function () { return [{ type: i1$6.FullStorageObject, decorators: [{
|
|
3358
4455
|
type: Inject,
|
|
3359
4456
|
args: [DEFAULT_STORAGE_OBJECT_TOKEN]
|
|
3360
4457
|
}] }]; } });
|
|
@@ -3459,10 +4556,10 @@ class DbxStorageModule {
|
|
|
3459
4556
|
};
|
|
3460
4557
|
}
|
|
3461
4558
|
}
|
|
3462
|
-
DbxStorageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2
|
|
3463
|
-
DbxStorageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2
|
|
3464
|
-
DbxStorageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2
|
|
3465
|
-
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: [{
|
|
3466
4563
|
type: NgModule
|
|
3467
4564
|
}] });
|
|
3468
4565
|
|
|
@@ -3470,5 +4567,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.4", ngImpor
|
|
|
3470
4567
|
* Generated bundle index. Do not edit.
|
|
3471
4568
|
*/
|
|
3472
4569
|
|
|
3473
|
-
export { APP_ACTION_DISABLED_DIRECTIVE_KEY, APP_ACTION_ENFORCE_MODIFIED_DIRECTIVE_KEY, AbstractActionFilterSourceDirective, AbstractDbxActionValueOnTriggerDirective, 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 };
|
|
3474
4571
|
//# sourceMappingURL=dereekb-dbx-core.mjs.map
|