@dereekb/dbx-core 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/action/action.handler.mjs +1 -1
- package/esm2020/lib/action/action.holder.mjs +1 -1
- package/esm2020/lib/action/action.machine.mjs +1 -1
- package/esm2020/lib/action/action.mjs +2 -2
- package/esm2020/lib/action/action.module.mjs +70 -22
- package/esm2020/lib/action/action.reference.mjs +1 -1
- package/esm2020/lib/action/action.store.mjs +30 -28
- package/esm2020/lib/action/action.store.source.mjs +26 -23
- package/esm2020/lib/action/directive/auto/action.automodify.directive.mjs +3 -3
- package/esm2020/lib/action/directive/auto/action.autotrigger.directive.mjs +7 -7
- package/esm2020/lib/action/directive/context/action.directive.mjs +1 -1
- package/esm2020/lib/action/directive/context/action.source.directive.mjs +1 -1
- package/esm2020/lib/action/directive/debug/action.logger.directive.mjs +1 -1
- package/esm2020/lib/action/directive/map/action.map.directive.mjs +4 -4
- package/esm2020/lib/action/directive/map/action.map.key.directive.mjs +1 -1
- package/esm2020/lib/action/directive/map/action.map.source.directive.mjs +1 -1
- package/esm2020/lib/action/directive/map/action.map.working.disable.directive.mjs +1 -1
- package/esm2020/lib/action/directive/state/action.disabled.directive.mjs +1 -1
- package/esm2020/lib/action/directive/state/action.enforce.modified.directive.mjs +4 -2
- package/esm2020/lib/action/directive/state/action.handler.directive.mjs +7 -5
- package/esm2020/lib/action/directive/state/action.success.directive.mjs +1 -1
- package/esm2020/lib/action/directive/state/action.success.handler.directive.mjs +6 -4
- package/esm2020/lib/action/directive/state/action.value.directive.mjs +6 -4
- package/esm2020/lib/action/directive/state/action.value.stream.directive.mjs +2 -2
- package/esm2020/lib/action/directive/state/action.value.trigger.directive.mjs +5 -5
- package/esm2020/lib/action/directive/state/action.value.trigger.instance.mjs +5 -4
- package/esm2020/lib/action/directive/state/action.working.component.mjs +1 -1
- package/esm2020/lib/auth/auth.module.mjs +4 -12
- package/esm2020/lib/auth/auth.role.any.directive.mjs +1 -1
- package/esm2020/lib/auth/auth.role.has.directive.mjs +1 -1
- package/esm2020/lib/auth/auth.state.module.mjs +3 -9
- package/esm2020/lib/auth/auth.state.service.mjs +3 -3
- package/esm2020/lib/auth/auth.user.mjs +2 -2
- package/esm2020/lib/auth/index.mjs +1 -1
- package/esm2020/lib/auth/router/auth.router.module.mjs +5 -3
- package/esm2020/lib/auth/router/auth.router.service.mjs +5 -5
- package/esm2020/lib/auth/router/provider/uirouter/auth.hook.mjs +1 -1
- package/esm2020/lib/auth/router/provider/uirouter/hook.mjs +1 -1
- package/esm2020/lib/auth/router/provider/uirouter/redirect.mjs +2 -2
- package/esm2020/lib/auth/router/provider/uirouter/role.hook.mjs +2 -2
- package/esm2020/lib/auth/router/provider/uirouter/state.hook.mjs +3 -3
- package/esm2020/lib/auth/router/state/auth.router.state.module.mjs +7 -9
- package/esm2020/lib/auth/router/state/effect/auth.router.state.effect.mjs +1 -1
- package/esm2020/lib/auth/service/auth.service.mjs +1 -1
- package/esm2020/lib/auth/service/auth.service.rxjs.mjs +1 -1
- package/esm2020/lib/auth/state/action/auth.action.mjs +1 -1
- package/esm2020/lib/auth/state/action/user.action.mjs +1 -1
- package/esm2020/lib/auth/state/effect/auth.effect.mjs +7 -13
- package/esm2020/lib/auth/state/reducer/index.mjs +2 -2
- package/esm2020/lib/button/action/action.button.directive.mjs +1 -1
- package/esm2020/lib/button/action/action.button.trigger.directive.mjs +1 -1
- package/esm2020/lib/button/button.directive.mjs +5 -3
- package/esm2020/lib/button/button.loading.directive.mjs +2 -2
- package/esm2020/lib/button/button.mjs +5 -3
- package/esm2020/lib/button/button.module.mjs +4 -24
- package/esm2020/lib/button/router/button.segue.directive.mjs +5 -3
- package/esm2020/lib/context/context.directive.mjs +3 -3
- package/esm2020/lib/context/context.mjs +1 -1
- package/esm2020/lib/context/context.module.mjs +5 -13
- package/esm2020/lib/context/context.service.mjs +3 -3
- package/esm2020/lib/context/state/action/data.action.mjs +1 -1
- package/esm2020/lib/context/state/effect/index.mjs +1 -1
- package/esm2020/lib/context/state/reducer/index.mjs +2 -2
- package/esm2020/lib/context/state/state.mjs +1 -1
- package/esm2020/lib/filter/action/action.filter.source.directive.mjs +1 -1
- package/esm2020/lib/filter/filter.abstract.connector.directive.mjs +2 -2
- package/esm2020/lib/filter/filter.abstract.source.directive.mjs +1 -1
- package/esm2020/lib/filter/filter.connector.directive.mjs +3 -9
- package/esm2020/lib/filter/filter.content.mjs +12 -7
- package/esm2020/lib/filter/filter.map.connector.directive.mjs +3 -9
- package/esm2020/lib/filter/filter.map.directive.mjs +1 -1
- package/esm2020/lib/filter/filter.map.instance.directive.mjs +1 -1
- package/esm2020/lib/filter/filter.map.source.directive.mjs +4 -8
- package/esm2020/lib/filter/filter.module.mjs +6 -30
- package/esm2020/lib/filter/filter.source.directive.mjs +1 -1
- package/esm2020/lib/injection/injection.component.mjs +7 -3
- package/esm2020/lib/injection/injection.component.module.mjs +6 -18
- package/esm2020/lib/injection/injection.context.directive.mjs +1 -1
- package/esm2020/lib/injection/injection.context.forward.directive.mjs +3 -3
- package/esm2020/lib/injection/injection.context.mjs +5 -3
- package/esm2020/lib/injection/injection.directive.mjs +1 -1
- package/esm2020/lib/injection/injection.instance.mjs +5 -3
- package/esm2020/lib/injection/injection.mjs +4 -4
- package/esm2020/lib/ngrx/store.lockset.mjs +3 -3
- package/esm2020/lib/pipe/date/date.pipe.module.mjs +4 -36
- package/esm2020/lib/pipe/date/datedistance.pipe.mjs +1 -1
- package/esm2020/lib/pipe/date/dateformatdistance.pipe.mjs +1 -1
- package/esm2020/lib/pipe/date/datefromtoformat.pipe.mjs +1 -1
- package/esm2020/lib/pipe/date/minutesstring.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/timedistance.pipe.mjs +1 -1
- package/esm2020/lib/pipe/date/tojsdate.pipe.mjs +1 -1
- package/esm2020/lib/pipe/date/tominutes.pipe.mjs +1 -1
- package/esm2020/lib/pipe/misc/misc.pipe.module.mjs +3 -7
- package/esm2020/lib/pipe/misc/prettyjson.pipe.mjs +1 -1
- package/esm2020/lib/pipe/pipe.module.mjs +4 -9
- package/esm2020/lib/router/anchor/anchor.directive.mjs +1 -1
- package/esm2020/lib/router/anchor/anchor.mjs +5 -3
- package/esm2020/lib/router/anchor/clickable.mjs +1 -1
- package/esm2020/lib/router/router/provider/angular/angular.router.service.mjs +6 -6
- package/esm2020/lib/router/router/provider/angular/angular.router.service.module.mjs +1 -1
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.mjs +9 -6
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.module.mjs +1 -1
- package/esm2020/lib/router/router/service/router.go.mjs +4 -4
- package/esm2020/lib/router/router/service/router.service.mjs +1 -1
- package/esm2020/lib/router/router/service/router.transition.service.mjs +1 -1
- package/esm2020/lib/router/router/transition/transition.directive.mjs +1 -1
- package/esm2020/lib/router/router/transition/transition.rxjs.mjs +4 -4
- package/esm2020/lib/router/router/transition/transition.watcher.directive.mjs +1 -1
- package/esm2020/lib/router/segue.mjs +3 -3
- package/esm2020/lib/storage/storage.accessor.mjs +1 -1
- package/esm2020/lib/storage/storage.accessor.simple.factory.mjs +1 -1
- package/esm2020/lib/storage/storage.accessor.simple.mjs +6 -4
- package/esm2020/lib/storage/storage.accessor.string.mjs +2 -2
- package/esm2020/lib/storage/storage.module.mjs +9 -5
- package/esm2020/lib/storage/storage.object.localstorage.mjs +2 -2
- package/esm2020/lib/storage/storage.object.memory.mjs +1 -1
- package/esm2020/lib/subscription/subscription.directive.mjs +1 -1
- package/esm2020/lib/util/view.mjs +1 -1
- package/esm2020/lib/view/if.directive.mjs +4 -4
- package/fesm2015/dereekb-dbx-core.mjs +290 -336
- package/fesm2015/dereekb-dbx-core.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-core.mjs +287 -336
- package/fesm2020/dereekb-dbx-core.mjs.map +1 -1
- package/lib/action/action.d.ts +1 -1
- package/lib/action/action.reference.d.ts +2 -2
- package/lib/action/directive/state/action.value.trigger.directive.d.ts +5 -5
- package/lib/auth/auth.state.service.d.ts +2 -2
- package/lib/auth/auth.user.d.ts +1 -1
- package/lib/auth/router/auth.router.service.d.ts +2 -2
- package/lib/auth/router/provider/uirouter/redirect.d.ts +2 -2
- package/lib/context/context.directive.d.ts +2 -2
- package/lib/context/context.service.d.ts +2 -2
- package/lib/filter/filter.content.d.ts +1 -1
- package/lib/injection/injection.context.d.ts +2 -2
- package/lib/injection/injection.context.forward.directive.d.ts +1 -1
- package/lib/injection/injection.d.ts +2 -2
- package/lib/router/anchor/clickable.d.ts +1 -1
- package/lib/router/router/provider/angular/angular.router.service.d.ts +2 -2
- package/lib/router/router/provider/uirouter/uirouter.router.service.d.ts +2 -2
- package/lib/router/router/service/router.go.d.ts +3 -3
- package/lib/router/router/service/router.service.d.ts +3 -3
- package/lib/router/router/transition/transition.rxjs.d.ts +2 -2
- package/lib/util/view.d.ts +2 -2
- package/lib/view/if.directive.d.ts +4 -4
- package/package.json +4 -4
|
@@ -109,64 +109,64 @@ class DbxActionContextStoreSourceInstance {
|
|
|
109
109
|
return useActionStore(this.source, useFn);
|
|
110
110
|
}
|
|
111
111
|
get state$() {
|
|
112
|
-
return this.pipeStore(x => x.state$);
|
|
112
|
+
return this.pipeStore((x) => x.state$);
|
|
113
113
|
}
|
|
114
114
|
get triggered$() {
|
|
115
|
-
return this.pipeStore(x => x.triggered$);
|
|
115
|
+
return this.pipeStore((x) => x.triggered$);
|
|
116
116
|
}
|
|
117
117
|
get valueReady$() {
|
|
118
|
-
return this.pipeStore(x => x.valueReady$);
|
|
118
|
+
return this.pipeStore((x) => x.valueReady$);
|
|
119
119
|
}
|
|
120
120
|
get success$() {
|
|
121
|
-
return this.pipeStore(x => x.success$);
|
|
121
|
+
return this.pipeStore((x) => x.success$);
|
|
122
122
|
}
|
|
123
123
|
get error$() {
|
|
124
|
-
return this.pipeStore(x => x.error$);
|
|
124
|
+
return this.pipeStore((x) => x.error$);
|
|
125
125
|
}
|
|
126
126
|
get rejected$() {
|
|
127
|
-
return this.pipeStore(x => x.rejected$);
|
|
127
|
+
return this.pipeStore((x) => x.rejected$);
|
|
128
128
|
}
|
|
129
129
|
get isModified$() {
|
|
130
|
-
return this.pipeStore(x => x.isModified$);
|
|
130
|
+
return this.pipeStore((x) => x.isModified$);
|
|
131
131
|
}
|
|
132
132
|
get canTrigger$() {
|
|
133
|
-
return this.pipeStore(x => x.canTrigger$);
|
|
133
|
+
return this.pipeStore((x) => x.canTrigger$);
|
|
134
134
|
}
|
|
135
135
|
get isModifiedAndCanTriggerUpdates$() {
|
|
136
|
-
return this.pipeStore(x => x.isModifiedAndCanTriggerUpdates$);
|
|
136
|
+
return this.pipeStore((x) => x.isModifiedAndCanTriggerUpdates$);
|
|
137
137
|
}
|
|
138
138
|
get isModifiedAndCanTrigger$() {
|
|
139
|
-
return this.pipeStore(x => x.isModifiedAndCanTrigger$);
|
|
139
|
+
return this.pipeStore((x) => x.isModifiedAndCanTrigger$);
|
|
140
140
|
}
|
|
141
141
|
get actionState$() {
|
|
142
|
-
return this.pipeStore(x => x.actionState$);
|
|
142
|
+
return this.pipeStore((x) => x.actionState$);
|
|
143
143
|
}
|
|
144
144
|
get loadingState$() {
|
|
145
|
-
return this.pipeStore(x => x.loadingState$);
|
|
145
|
+
return this.pipeStore((x) => x.loadingState$);
|
|
146
146
|
}
|
|
147
147
|
get loadingStateType$() {
|
|
148
|
-
return this.pipeStore(x => x.loadingStateType$);
|
|
148
|
+
return this.pipeStore((x) => x.loadingStateType$);
|
|
149
149
|
}
|
|
150
150
|
get isWorking$() {
|
|
151
|
-
return this.pipeStore(x => x.isWorking$);
|
|
151
|
+
return this.pipeStore((x) => x.isWorking$);
|
|
152
152
|
}
|
|
153
153
|
get isSuccess$() {
|
|
154
|
-
return this.pipeStore(x => x.isSuccess$);
|
|
154
|
+
return this.pipeStore((x) => x.isSuccess$);
|
|
155
155
|
}
|
|
156
156
|
get disabledKeys$() {
|
|
157
|
-
return this.pipeStore(x => x.disabledKeys$);
|
|
157
|
+
return this.pipeStore((x) => x.disabledKeys$);
|
|
158
158
|
}
|
|
159
159
|
get isDisabled$() {
|
|
160
|
-
return this.pipeStore(x => x.isDisabled$);
|
|
160
|
+
return this.pipeStore((x) => x.isDisabled$);
|
|
161
161
|
}
|
|
162
162
|
get errorCountSinceLastSuccess$() {
|
|
163
|
-
return this.pipeStore(x => x.errorCountSinceLastSuccess$);
|
|
163
|
+
return this.pipeStore((x) => x.errorCountSinceLastSuccess$);
|
|
164
164
|
}
|
|
165
165
|
enable(key, enable = true) {
|
|
166
166
|
this.disable(key, !enable);
|
|
167
167
|
}
|
|
168
168
|
disable(key, disable = true) {
|
|
169
|
-
this.useStore((x) => (disable
|
|
169
|
+
this.useStore((x) => (disable ? x.disable(key) : x.enable(key)));
|
|
170
170
|
}
|
|
171
171
|
setIsModified(isModified) {
|
|
172
172
|
this.useStore((x) => x.setIsModified(isModified));
|
|
@@ -202,7 +202,8 @@ const actionContextStoreSourceInstanceFactory = (source) => {
|
|
|
202
202
|
* Provides an ActionContextStoreSource, as well as an DbxActionContextStoreSourceInstance.
|
|
203
203
|
*/
|
|
204
204
|
function provideActionStoreSource(sourceType) {
|
|
205
|
-
return [
|
|
205
|
+
return [
|
|
206
|
+
{
|
|
206
207
|
provide: ActionContextStoreSource,
|
|
207
208
|
useExisting: forwardRef(() => sourceType)
|
|
208
209
|
},
|
|
@@ -210,10 +211,12 @@ function provideActionStoreSource(sourceType) {
|
|
|
210
211
|
provide: DbxActionContextStoreSourceInstance,
|
|
211
212
|
useFactory: actionContextStoreSourceInstanceFactory,
|
|
212
213
|
deps: [ActionContextStoreSource]
|
|
213
|
-
}
|
|
214
|
+
}
|
|
215
|
+
];
|
|
214
216
|
}
|
|
215
217
|
function provideSecondaryActionStoreSource(sourceType) {
|
|
216
|
-
return [
|
|
218
|
+
return [
|
|
219
|
+
{
|
|
217
220
|
provide: SecondaryActionContextStoreSource,
|
|
218
221
|
useExisting: forwardRef(() => sourceType)
|
|
219
222
|
},
|
|
@@ -236,7 +239,7 @@ class DbxActionAutoModifyDirective extends AbstractSubscriptionDirective {
|
|
|
236
239
|
ngOnInit() {
|
|
237
240
|
const obs = combineLatest([
|
|
238
241
|
this._autoModifyEnabled.pipe(distinctUntilChanged()),
|
|
239
|
-
this.source.isModified$.pipe(filter(x => !x)) // Only when not modified send a value.
|
|
242
|
+
this.source.isModified$.pipe(filter((x) => !x)) // Only when not modified send a value.
|
|
240
243
|
]);
|
|
241
244
|
this.sub = obs.subscribe(([autoModifyEnabled, isModified]) => {
|
|
242
245
|
if (autoModifyEnabled && !isModified) {
|
|
@@ -256,7 +259,7 @@ DbxActionAutoModifyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12
|
|
|
256
259
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionAutoModifyDirective, decorators: [{
|
|
257
260
|
type: Directive,
|
|
258
261
|
args: [{
|
|
259
|
-
selector: '[dbxActionAutoModify]'
|
|
262
|
+
selector: '[dbxActionAutoModify]'
|
|
260
263
|
}]
|
|
261
264
|
}], ctorParameters: function () {
|
|
262
265
|
return [{ type: DbxActionContextStoreSourceInstance, decorators: [{
|
|
@@ -287,9 +290,9 @@ class DbxActionAutoTriggerDirective extends AbstractSubscriptionDirective {
|
|
|
287
290
|
this.maxErrorsForThrottle = MAX_ERRORS_TO_THROTTLE_ON;
|
|
288
291
|
this._triggerCount = 0;
|
|
289
292
|
this._errorCount$ = this.source.errorCountSinceLastSuccess$;
|
|
290
|
-
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 +
|
|
293
|
+
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 }),
|
|
291
294
|
// Check again for the "trailing" piece.
|
|
292
|
-
filter(() => this.isEnabled), mergeMap(() => this.source.isModifiedAndCanTrigger$.pipe(first())), filter((x) => x), map(() => this._triggerCount += 1), shareReplay(1));
|
|
295
|
+
filter(() => this.isEnabled), mergeMap(() => this.source.isModifiedAndCanTrigger$.pipe(first())), filter((x) => x), map(() => (this._triggerCount += 1)), shareReplay(1));
|
|
293
296
|
/**
|
|
294
297
|
* Observable for the trigger mechanism.
|
|
295
298
|
*/
|
|
@@ -301,9 +304,9 @@ class DbxActionAutoTriggerDirective extends AbstractSubscriptionDirective {
|
|
|
301
304
|
return EMPTY;
|
|
302
305
|
}
|
|
303
306
|
}));
|
|
304
|
-
this._isTriggerLimited$ = combineLatest([this.triggerCount$, this._triggerLimit]).pipe(map(([triggerCount, limit]) => [triggerCount,
|
|
305
|
-
this.isTriggerLimited$ = this._isTriggerLimited$.pipe(map(x => x[1]));
|
|
306
|
-
this.trigger$ = this._isTriggerLimited$.pipe(filter(x => !x[1]), distinctUntilChanged((a, b) => a[0] === b[0]), // Only trigger when the count changes.
|
|
307
|
+
this._isTriggerLimited$ = combineLatest([this.triggerCount$, this._triggerLimit]).pipe(map(([triggerCount, limit]) => [triggerCount, limit ? triggerCount > limit : false]), shareReplay(1));
|
|
308
|
+
this.isTriggerLimited$ = this._isTriggerLimited$.pipe(map((x) => x[1]));
|
|
309
|
+
this.trigger$ = this._isTriggerLimited$.pipe(filter((x) => !x[1]), distinctUntilChanged((a, b) => a[0] === b[0]), // Only trigger when the count changes.
|
|
307
310
|
map(() => undefined));
|
|
308
311
|
}
|
|
309
312
|
/**
|
|
@@ -369,7 +372,7 @@ DbxActionAutoTriggerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "1
|
|
|
369
372
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionAutoTriggerDirective, decorators: [{
|
|
370
373
|
type: Directive,
|
|
371
374
|
args: [{
|
|
372
|
-
selector: 'dbxActionAutoTrigger, [dbxActionAutoTrigger]'
|
|
375
|
+
selector: 'dbxActionAutoTrigger, [dbxActionAutoTrigger]'
|
|
373
376
|
}]
|
|
374
377
|
}], ctorParameters: function () {
|
|
375
378
|
return [{ type: DbxActionContextStoreSourceInstance, decorators: [{
|
|
@@ -452,7 +455,7 @@ dbxActionValueStreamDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "1
|
|
|
452
455
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: dbxActionValueStreamDirective, decorators: [{
|
|
453
456
|
type: Directive,
|
|
454
457
|
args: [{
|
|
455
|
-
selector: '[dbxActionValueStream]'
|
|
458
|
+
selector: '[dbxActionValueStream]'
|
|
456
459
|
}]
|
|
457
460
|
}], ctorParameters: function () {
|
|
458
461
|
return [{ type: DbxActionContextStoreSourceInstance, decorators: [{
|
|
@@ -595,11 +598,11 @@ class ActionContextStore extends ComponentStore {
|
|
|
595
598
|
super(Object.assign({}, INITIAL_STATE));
|
|
596
599
|
this.lockSet = new LockSet();
|
|
597
600
|
// MARK: Accessors
|
|
598
|
-
this.actionState$ = this.state$.pipe(map(x => isDisabledActionContextState(x) ? DbxActionState.DISABLED : x.actionState), shareReplay(1));
|
|
601
|
+
this.actionState$ = this.state$.pipe(map((x) => (isDisabledActionContextState(x) ? DbxActionState.DISABLED : x.actionState)), shareReplay(1));
|
|
599
602
|
/**
|
|
600
603
|
* Returns the current disabled reasons/keys.
|
|
601
604
|
*/
|
|
602
|
-
this.disabledKeys$ = this.state$.pipe(map(x => { var _a; return [...(_a = x.disabled) !== null && _a !== void 0 ? _a : []]; }), distinctUntilChanged(), shareReplay(1));
|
|
605
|
+
this.disabledKeys$ = this.state$.pipe(map((x) => { var _a; return [...((_a = x.disabled) !== null && _a !== void 0 ? _a : [])]; }), distinctUntilChanged(), shareReplay(1));
|
|
603
606
|
/**
|
|
604
607
|
* Maps the current state to true or not when the action state changes to/from disabled.
|
|
605
608
|
*/
|
|
@@ -607,7 +610,7 @@ class ActionContextStore extends ComponentStore {
|
|
|
607
610
|
/**
|
|
608
611
|
* Pipes when idle but modified.
|
|
609
612
|
*/
|
|
610
|
-
this.isModified$ = this.afterDistinctBoolean(x => x.isModified);
|
|
613
|
+
this.isModified$ = this.afterDistinctBoolean((x) => x.isModified);
|
|
611
614
|
/**
|
|
612
615
|
* Pipes true when triggered.
|
|
613
616
|
*/
|
|
@@ -615,11 +618,11 @@ class ActionContextStore extends ComponentStore {
|
|
|
615
618
|
/**
|
|
616
619
|
* Pipes the readied value on ValueReady.
|
|
617
620
|
*/
|
|
618
|
-
this.valueReady$ = this.afterDistinctActionState(DbxActionState.VALUE_READY, x => x.value);
|
|
621
|
+
this.valueReady$ = this.afterDistinctActionState(DbxActionState.VALUE_READY, (x) => x.value);
|
|
619
622
|
/**
|
|
620
623
|
* Pipes the error on the rejection state.
|
|
621
624
|
*/
|
|
622
|
-
this.rejected$ = this.afterDistinctActionState(DbxActionState.REJECTED, x => x.error);
|
|
625
|
+
this.rejected$ = this.afterDistinctActionState(DbxActionState.REJECTED, (x) => x.error);
|
|
623
626
|
/**
|
|
624
627
|
* Pipes the result when the ActionState becomes working.
|
|
625
628
|
*/
|
|
@@ -627,27 +630,27 @@ class ActionContextStore extends ComponentStore {
|
|
|
627
630
|
/**
|
|
628
631
|
* Whether or not it is currently in a working state.
|
|
629
632
|
*/
|
|
630
|
-
this.isWorking$ = this.afterDistinctBoolean(x => isWorkingActionState(x.actionState));
|
|
633
|
+
this.isWorking$ = this.afterDistinctBoolean((x) => isWorkingActionState(x.actionState));
|
|
631
634
|
/**
|
|
632
635
|
* Pipes the current error.
|
|
633
636
|
*/
|
|
634
|
-
this.error$ = this.state$.pipe(map(x => x.error), distinctUntilChanged(), shareReplay(1));
|
|
637
|
+
this.error$ = this.state$.pipe(map((x) => x.error), distinctUntilChanged(), shareReplay(1));
|
|
635
638
|
/**
|
|
636
639
|
* Pipes the result when the ActionState becomes success.
|
|
637
640
|
*/
|
|
638
|
-
this.success$ = this.afterDistinctActionState(DbxActionState.RESOLVED, x => x.result);
|
|
641
|
+
this.success$ = this.afterDistinctActionState(DbxActionState.RESOLVED, (x) => x.result);
|
|
639
642
|
/**
|
|
640
643
|
* Whether or not it is currently in a success state.
|
|
641
644
|
*/
|
|
642
|
-
this.isSuccess$ = this.afterDistinctBoolean(x => x.actionState === DbxActionState.RESOLVED);
|
|
645
|
+
this.isSuccess$ = this.afterDistinctBoolean((x) => x.actionState === DbxActionState.RESOLVED);
|
|
643
646
|
/**
|
|
644
647
|
* Returns a loading state based on the current state.
|
|
645
648
|
*/
|
|
646
|
-
this.loadingState$ = this.afterDistinctLoadingStateTypeChange().pipe(map(x => loadingStateForActionContextState(x)), shareReplay(1));
|
|
649
|
+
this.loadingState$ = this.afterDistinctLoadingStateTypeChange().pipe(map((x) => loadingStateForActionContextState(x)), shareReplay(1));
|
|
647
650
|
/**
|
|
648
651
|
* Returns the current LoadingStateType based on the current state.
|
|
649
652
|
*/
|
|
650
|
-
this.loadingStateType$ = this.state$.pipe(map(x => loadingStateTypeForActionContextState(x)), distinctUntilChanged(), shareReplay(1));
|
|
653
|
+
this.loadingStateType$ = this.state$.pipe(map((x) => loadingStateTypeForActionContextState(x)), distinctUntilChanged(), shareReplay(1));
|
|
651
654
|
/**
|
|
652
655
|
* Number of errors since last success.
|
|
653
656
|
*/
|
|
@@ -671,29 +674,25 @@ class ActionContextStore extends ComponentStore {
|
|
|
671
674
|
/**
|
|
672
675
|
* Adds a disabled reason.
|
|
673
676
|
*/
|
|
674
|
-
this.disable = this.updater((state, key) => (Object.assign(Object.assign({}, state), { disabled: BooleanStringKeyArrayUtilityInstance.insert(state.disabled,
|
|
677
|
+
this.disable = this.updater((state, key) => (Object.assign(Object.assign({}, state), { disabled: BooleanStringKeyArrayUtilityInstance.insert(state.disabled, key !== null && key !== void 0 ? key : DEFAULT_ACTION_DISABLED_KEY) })));
|
|
675
678
|
/**
|
|
676
679
|
* Removes a disabled reason.
|
|
677
680
|
*/
|
|
678
|
-
this.enable = this.updater((state, key) => (Object.assign(Object.assign({}, state), { disabled: BooleanStringKeyArrayUtilityInstance.remove(state.disabled,
|
|
681
|
+
this.enable = this.updater((state, key) => (Object.assign(Object.assign({}, state), { disabled: BooleanStringKeyArrayUtilityInstance.remove(state.disabled, key !== null && key !== void 0 ? key : DEFAULT_ACTION_DISABLED_KEY) })));
|
|
679
682
|
/**
|
|
680
683
|
* Triggers the modified state, if not disabled.
|
|
681
684
|
*/
|
|
682
|
-
this.setIsModified = this.updater((state, isModified) => (Object.assign(Object.assign({}, state), { actionState:
|
|
685
|
+
this.setIsModified = this.updater((state, isModified) => (Object.assign(Object.assign({}, state), { actionState: state.actionState === DbxActionState.RESOLVED ? DbxActionState.IDLE : state.actionState, isModified: isModified !== null && isModified !== void 0 ? isModified : true })));
|
|
683
686
|
/**
|
|
684
687
|
* Triggers the action if the state is currently not idle. The current state is cleared, but the error is retained (as we may need the error from the previous attempt).
|
|
685
688
|
*
|
|
686
689
|
* Will not fire if the action is disabled.
|
|
687
690
|
*/
|
|
688
|
-
this.trigger = this.updater((state) => canTriggerAction(state)
|
|
689
|
-
? ({ isModified: state.isModified, actionState: DbxActionState.TRIGGERED, error: state.error, value: undefined })
|
|
690
|
-
: state);
|
|
691
|
+
this.trigger = this.updater((state) => (canTriggerAction(state) ? { isModified: state.isModified, actionState: DbxActionState.TRIGGERED, error: state.error, value: undefined } : state));
|
|
691
692
|
/**
|
|
692
693
|
* Updates the value, setting value ready. The current result is cleared.
|
|
693
694
|
*/
|
|
694
|
-
this.readyValue = this.updater((state, value) => canReadyValue(state)
|
|
695
|
-
? (Object.assign(Object.assign({}, state), { actionState: DbxActionState.VALUE_READY, value, result: undefined }))
|
|
696
|
-
: state);
|
|
695
|
+
this.readyValue = this.updater((state, value) => (canReadyValue(state) ? Object.assign(Object.assign({}, state), { actionState: DbxActionState.VALUE_READY, value, result: undefined }) : state));
|
|
697
696
|
/**
|
|
698
697
|
* Notifys the context that the action is in progress.
|
|
699
698
|
*/
|
|
@@ -701,7 +700,16 @@ class ActionContextStore extends ComponentStore {
|
|
|
701
700
|
/**
|
|
702
701
|
* Triggers rejection of the action. The value is cleared.
|
|
703
702
|
*/
|
|
704
|
-
this.reject = this.updater((state, error) => {
|
|
703
|
+
this.reject = this.updater((state, error) => {
|
|
704
|
+
var _a;
|
|
705
|
+
return ({
|
|
706
|
+
isModified: state.isModified,
|
|
707
|
+
actionState: DbxActionState.REJECTED,
|
|
708
|
+
error,
|
|
709
|
+
errorCount: ((_a = state.errorCount) !== null && _a !== void 0 ? _a : 0) + 1,
|
|
710
|
+
disabled: state.disabled
|
|
711
|
+
});
|
|
712
|
+
});
|
|
705
713
|
/**
|
|
706
714
|
* Updates the state to success, and optionally sets a result.
|
|
707
715
|
*
|
|
@@ -716,19 +724,19 @@ class ActionContextStore extends ComponentStore {
|
|
|
716
724
|
}
|
|
717
725
|
// MARK: Utility
|
|
718
726
|
afterDistinctBoolean(fromState) {
|
|
719
|
-
return this.state$.pipe(map(x => fromState(x)), distinctUntilChanged(), shareReplay(1));
|
|
727
|
+
return this.state$.pipe(map((x) => fromState(x)), distinctUntilChanged(), shareReplay(1));
|
|
720
728
|
}
|
|
721
729
|
afterDistinctActionState(actionState, fromState) {
|
|
722
730
|
return this.afterDistinctActionStateChange().pipe(filter((x) => x.actionState === actionState), // Only pipe when the new action state matches.
|
|
723
|
-
map(x => fromState(x)), shareReplay(1));
|
|
731
|
+
map((x) => fromState(x)), shareReplay(1));
|
|
724
732
|
}
|
|
725
733
|
afterDistinctActionStateChange() {
|
|
726
|
-
return this.state$.pipe(map((x) =>
|
|
727
|
-
map(x => x[0]), shareReplay(1));
|
|
734
|
+
return this.state$.pipe(map((x) => [x, x.actionState]), distinctUntilChanged((a, b) => (a === null || a === void 0 ? void 0 : a[1]) === (b === null || b === void 0 ? void 0 : b[1])), // Filter out when the state remains the same.
|
|
735
|
+
map((x) => x[0]), shareReplay(1));
|
|
728
736
|
}
|
|
729
737
|
afterDistinctLoadingStateTypeChange() {
|
|
730
|
-
return this.state$.pipe(map((x) =>
|
|
731
|
-
map(x => x[0]), shareReplay(1));
|
|
738
|
+
return this.state$.pipe(map((x) => [x, loadingStateForActionContextState(x)]), distinctUntilChanged((a, b) => (a === null || a === void 0 ? void 0 : a[1]) === (b === null || b === void 0 ? void 0 : b[1])), // Filter out when the loading state remains the same.
|
|
739
|
+
map((x) => x[0]), shareReplay(1));
|
|
732
740
|
}
|
|
733
741
|
// MARK: Cleanup
|
|
734
742
|
ngOnDestroy() {
|
|
@@ -900,7 +908,7 @@ class DbxActionContextMapDirective {
|
|
|
900
908
|
constructor() {
|
|
901
909
|
this._map = new BehaviorSubject(new Map());
|
|
902
910
|
this.map$ = this._map.asObservable();
|
|
903
|
-
this.areAnyWorking$ = this.checkAnyAre(x => x.isWorking$, false);
|
|
911
|
+
this.areAnyWorking$ = this.checkAnyAre((x) => x.isWorking$, false);
|
|
904
912
|
}
|
|
905
913
|
get map() {
|
|
906
914
|
return this._map.value;
|
|
@@ -945,14 +953,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
945
953
|
args: [{
|
|
946
954
|
selector: '[dbxActionContextMap]',
|
|
947
955
|
exportAs: 'actionMap',
|
|
948
|
-
providers: []
|
|
956
|
+
providers: []
|
|
949
957
|
}]
|
|
950
958
|
}] });
|
|
951
959
|
class DbxActionContextMapDirectiveSourceInstance {
|
|
952
960
|
constructor(parent, key) {
|
|
953
961
|
this.parent = parent;
|
|
954
962
|
this.key = key;
|
|
955
|
-
this._source$ = this.parent.map$.pipe(map(x => x.get(this.key)), distinctUntilChanged());
|
|
963
|
+
this._source$ = this.parent.map$.pipe(map((x) => x.get(this.key)), distinctUntilChanged());
|
|
956
964
|
this._store$ = this._source$.pipe(switchMap((x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.store$) !== null && _a !== void 0 ? _a : of(undefined); }), shareReplay(1));
|
|
957
965
|
this.store$ = actionContextStoreSourcePipe(this._store$);
|
|
958
966
|
}
|
|
@@ -1158,13 +1166,15 @@ class DbxActionHandlerDirective extends AbstractSubscriptionDirective {
|
|
|
1158
1166
|
this._handlerFunction.next(handlerFunction);
|
|
1159
1167
|
}
|
|
1160
1168
|
ngOnInit() {
|
|
1161
|
-
this.sub = this.handlerFunction
|
|
1169
|
+
this.sub = this.handlerFunction$
|
|
1170
|
+
.pipe(switchMap((work) => this.source.valueReady$.pipe(tap((value) => {
|
|
1162
1171
|
const context = workFactory({ work, delegate: this._delegate })(value);
|
|
1163
1172
|
if (context) {
|
|
1164
1173
|
// Add the action to the lockSet for the source to prevent it from being destroyed until the action completes.
|
|
1165
|
-
this.source.lockSet.addLock('dbxActionHandler', context.isComplete$.pipe(map(x => !x)));
|
|
1174
|
+
this.source.lockSet.addLock('dbxActionHandler', context.isComplete$.pipe(map((x) => !x)));
|
|
1166
1175
|
}
|
|
1167
|
-
}))))
|
|
1176
|
+
}))))
|
|
1177
|
+
.subscribe();
|
|
1168
1178
|
}
|
|
1169
1179
|
ngOnDestroy() {
|
|
1170
1180
|
this.source.lockSet.onNextUnlock(() => {
|
|
@@ -1178,7 +1188,7 @@ DbxActionHandlerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.
|
|
|
1178
1188
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionHandlerDirective, decorators: [{
|
|
1179
1189
|
type: Directive,
|
|
1180
1190
|
args: [{
|
|
1181
|
-
selector: '[dbxActionHandler]'
|
|
1191
|
+
selector: '[dbxActionHandler]'
|
|
1182
1192
|
}]
|
|
1183
1193
|
}], ctorParameters: function () {
|
|
1184
1194
|
return [{ type: DbxActionContextStoreSourceInstance, decorators: [{
|
|
@@ -1261,9 +1271,11 @@ class DbxActionSuccessHandlerDirective extends AbstractSubscriptionDirective {
|
|
|
1261
1271
|
this._successFunction.next(successFunction);
|
|
1262
1272
|
}
|
|
1263
1273
|
ngOnInit() {
|
|
1264
|
-
this.sub = this.successFunction
|
|
1274
|
+
this.sub = this.successFunction$
|
|
1275
|
+
.pipe(switchMap((successFunction) => this.source.success$.pipe(map((x) => [successFunction, x]), tap(([successFn, result]) => {
|
|
1265
1276
|
successFn(result);
|
|
1266
|
-
}))))
|
|
1277
|
+
}))))
|
|
1278
|
+
.subscribe();
|
|
1267
1279
|
}
|
|
1268
1280
|
ngOnDestroy() {
|
|
1269
1281
|
super.ngOnDestroy();
|
|
@@ -1275,7 +1287,7 @@ DbxActionSuccessHandlerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion:
|
|
|
1275
1287
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionSuccessHandlerDirective, decorators: [{
|
|
1276
1288
|
type: Directive,
|
|
1277
1289
|
args: [{
|
|
1278
|
-
selector: '[dbxActionSuccessHandler]'
|
|
1290
|
+
selector: '[dbxActionSuccessHandler]'
|
|
1279
1291
|
}]
|
|
1280
1292
|
}], ctorParameters: function () {
|
|
1281
1293
|
return [{ type: DbxActionContextStoreSourceInstance, decorators: [{
|
|
@@ -1305,10 +1317,12 @@ class DbxActionValueDirective extends AbstractSubscriptionDirective {
|
|
|
1305
1317
|
this._valueOrFunction.next(valueOrFunction);
|
|
1306
1318
|
}
|
|
1307
1319
|
ngOnInit() {
|
|
1308
|
-
this.sub = this.valueOrFunction
|
|
1320
|
+
this.sub = this.valueOrFunction$
|
|
1321
|
+
.pipe(switchMap((valueOrFunction) => this.source.triggered$.pipe(tap(() => {
|
|
1309
1322
|
const value = getValueFromGetter(valueOrFunction);
|
|
1310
1323
|
this.source.readyValue(value);
|
|
1311
|
-
}))))
|
|
1324
|
+
}))))
|
|
1325
|
+
.subscribe();
|
|
1312
1326
|
}
|
|
1313
1327
|
ngOnDestroy() {
|
|
1314
1328
|
this.source.lockSet.onNextUnlock(() => {
|
|
@@ -1322,7 +1336,7 @@ DbxActionValueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0"
|
|
|
1322
1336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxActionValueDirective, decorators: [{
|
|
1323
1337
|
type: Directive,
|
|
1324
1338
|
args: [{
|
|
1325
|
-
selector: '[dbxActionValue]'
|
|
1339
|
+
selector: '[dbxActionValue]'
|
|
1326
1340
|
}]
|
|
1327
1341
|
}], ctorParameters: function () {
|
|
1328
1342
|
return [{ type: DbxActionContextStoreSourceInstance, decorators: [{
|
|
@@ -1375,7 +1389,9 @@ class DbxActionEnforceModifiedDirective extends AbstractSubscriptionDirective {
|
|
|
1375
1389
|
this._enabled = new BehaviorSubject(true);
|
|
1376
1390
|
}
|
|
1377
1391
|
ngOnInit() {
|
|
1378
|
-
this.sub = combineLatest([this.source.isModified$, this._enabled])
|
|
1392
|
+
this.sub = combineLatest([this.source.isModified$, this._enabled])
|
|
1393
|
+
.pipe(delay(0))
|
|
1394
|
+
.subscribe(([modified, enableDirective]) => {
|
|
1379
1395
|
const disable = enableDirective && !modified;
|
|
1380
1396
|
this.source.disable(APP_ACTION_ENFORCE_MODIFIED_DIRECTIVE_KEY, disable);
|
|
1381
1397
|
});
|
|
@@ -1428,12 +1444,13 @@ class DbxActionValueOnTriggerInstance {
|
|
|
1428
1444
|
}
|
|
1429
1445
|
init() {
|
|
1430
1446
|
// Ready the value after the source is triggered. Do modified check one last time.
|
|
1431
|
-
this._triggeredSub.subscription = this.source.triggered
|
|
1432
|
-
.pipe(
|
|
1447
|
+
this._triggeredSub.subscription = this.source.triggered$
|
|
1448
|
+
.pipe(switchMap(() => this.valueGetter$.pipe(switchMap((valueGetter) => asObservable(valueGetter()))).pipe(
|
|
1433
1449
|
// If the value is not null/undefined and is considered modified, then pass the value.
|
|
1434
1450
|
switchMap((value) => returnIfIs(this.isModifiedFunction, value, false).pipe(map((value) => ({ value })))),
|
|
1435
1451
|
// Catch unknown errors and pass them to reject.
|
|
1436
|
-
catchError((reject) => of({ reject: toReadableError(reject) })))))
|
|
1452
|
+
catchError((reject) => of({ reject: toReadableError(reject) })))))
|
|
1453
|
+
.subscribe((result) => {
|
|
1437
1454
|
if (result.value != null) {
|
|
1438
1455
|
this.source.readyValue(result.value);
|
|
1439
1456
|
}
|
|
@@ -1560,33 +1577,81 @@ class DbxActionContextMachine extends DbxActionContextBaseSource {
|
|
|
1560
1577
|
class DbxCoreActionModule {
|
|
1561
1578
|
}
|
|
1562
1579
|
DbxCoreActionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1563
|
-
DbxCoreActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreActionModule, declarations: [DbxActionDirective,
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
DbxActionMapWorkingDisableDirective,
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1580
|
+
DbxCoreActionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreActionModule, declarations: [DbxActionDirective,
|
|
1581
|
+
DbxActionContextMapDirective,
|
|
1582
|
+
DbxActionFromMapDirective,
|
|
1583
|
+
DbxActionMapSourceDirective,
|
|
1584
|
+
DbxActionMapWorkingDisableDirective,
|
|
1585
|
+
DbxActionSourceDirective,
|
|
1586
|
+
DbxActionHandlerDirective,
|
|
1587
|
+
DbxActionDisabledDirective,
|
|
1588
|
+
DbxActionEnforceModifiedDirective,
|
|
1589
|
+
DbxActionAutoTriggerDirective,
|
|
1590
|
+
dbxActionValueStreamDirective,
|
|
1591
|
+
DbxActionAutoModifyDirective,
|
|
1592
|
+
DbxActionValueDirective,
|
|
1593
|
+
DbxActionContextLoggerDirective,
|
|
1594
|
+
DbxActionHasSuccessDirective,
|
|
1595
|
+
DbxActionSuccessHandlerDirective,
|
|
1596
|
+
DbxActionIsWorkingDirective], imports: [CommonModule], exports: [DbxActionDirective,
|
|
1597
|
+
DbxActionContextMapDirective,
|
|
1598
|
+
DbxActionFromMapDirective,
|
|
1599
|
+
DbxActionMapSourceDirective,
|
|
1600
|
+
DbxActionMapWorkingDisableDirective,
|
|
1601
|
+
DbxActionSourceDirective,
|
|
1602
|
+
DbxActionHandlerDirective,
|
|
1603
|
+
DbxActionDisabledDirective,
|
|
1604
|
+
DbxActionEnforceModifiedDirective,
|
|
1605
|
+
DbxActionAutoTriggerDirective,
|
|
1606
|
+
dbxActionValueStreamDirective,
|
|
1607
|
+
DbxActionAutoModifyDirective,
|
|
1608
|
+
DbxActionValueDirective,
|
|
1609
|
+
DbxActionContextLoggerDirective,
|
|
1610
|
+
DbxActionHasSuccessDirective,
|
|
1611
|
+
DbxActionSuccessHandlerDirective,
|
|
1612
|
+
DbxActionIsWorkingDirective] });
|
|
1613
|
+
DbxCoreActionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreActionModule, imports: [[CommonModule]] });
|
|
1573
1614
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreActionModule, decorators: [{
|
|
1574
1615
|
type: NgModule,
|
|
1575
1616
|
args: [{
|
|
1576
|
-
imports: [
|
|
1577
|
-
CommonModule
|
|
1578
|
-
],
|
|
1617
|
+
imports: [CommonModule],
|
|
1579
1618
|
declarations: [
|
|
1580
|
-
DbxActionDirective,
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1619
|
+
DbxActionDirective,
|
|
1620
|
+
DbxActionContextMapDirective,
|
|
1621
|
+
DbxActionFromMapDirective,
|
|
1622
|
+
DbxActionMapSourceDirective,
|
|
1623
|
+
DbxActionMapWorkingDisableDirective,
|
|
1624
|
+
DbxActionSourceDirective,
|
|
1625
|
+
DbxActionHandlerDirective,
|
|
1626
|
+
DbxActionDisabledDirective,
|
|
1627
|
+
DbxActionEnforceModifiedDirective,
|
|
1628
|
+
DbxActionAutoTriggerDirective,
|
|
1629
|
+
dbxActionValueStreamDirective,
|
|
1630
|
+
DbxActionAutoModifyDirective,
|
|
1631
|
+
DbxActionValueDirective,
|
|
1632
|
+
DbxActionContextLoggerDirective,
|
|
1633
|
+
DbxActionHasSuccessDirective,
|
|
1634
|
+
DbxActionSuccessHandlerDirective,
|
|
1635
|
+
DbxActionIsWorkingDirective
|
|
1584
1636
|
],
|
|
1585
1637
|
exports: [
|
|
1586
|
-
DbxActionDirective,
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1638
|
+
DbxActionDirective,
|
|
1639
|
+
DbxActionContextMapDirective,
|
|
1640
|
+
DbxActionFromMapDirective,
|
|
1641
|
+
DbxActionMapSourceDirective,
|
|
1642
|
+
DbxActionMapWorkingDisableDirective,
|
|
1643
|
+
DbxActionSourceDirective,
|
|
1644
|
+
DbxActionHandlerDirective,
|
|
1645
|
+
DbxActionDisabledDirective,
|
|
1646
|
+
DbxActionEnforceModifiedDirective,
|
|
1647
|
+
DbxActionAutoTriggerDirective,
|
|
1648
|
+
dbxActionValueStreamDirective,
|
|
1649
|
+
DbxActionAutoModifyDirective,
|
|
1650
|
+
DbxActionValueDirective,
|
|
1651
|
+
DbxActionContextLoggerDirective,
|
|
1652
|
+
DbxActionHasSuccessDirective,
|
|
1653
|
+
DbxActionSuccessHandlerDirective,
|
|
1654
|
+
DbxActionIsWorkingDirective
|
|
1590
1655
|
]
|
|
1591
1656
|
}]
|
|
1592
1657
|
}] });
|
|
@@ -1599,7 +1664,7 @@ function makeDbxActionContextSourceReference(sourceInstance) {
|
|
|
1599
1664
|
}
|
|
1600
1665
|
|
|
1601
1666
|
function isSegueRef(input) {
|
|
1602
|
-
return
|
|
1667
|
+
return typeof input === 'object' && hasValueOrNotEmpty(input.ref);
|
|
1603
1668
|
}
|
|
1604
1669
|
function asSegueRef(input) {
|
|
1605
1670
|
const type = typeof input;
|
|
@@ -1628,7 +1693,7 @@ function refStringToSegueRef(ref, options) {
|
|
|
1628
1693
|
return Object.assign(Object.assign({}, options), { ref });
|
|
1629
1694
|
}
|
|
1630
1695
|
function mapRefStringObsToSegueRefObs(obs, options) {
|
|
1631
|
-
return obs.pipe(map(x => refStringToSegueRef(x, options)));
|
|
1696
|
+
return obs.pipe(map((x) => refStringToSegueRef(x, options)));
|
|
1632
1697
|
}
|
|
1633
1698
|
|
|
1634
1699
|
/**
|
|
@@ -1765,7 +1830,7 @@ function enableHasAuthRoleHook(transitionService, config) {
|
|
|
1765
1830
|
const data = targetState.state().data;
|
|
1766
1831
|
const requiredRoles = new Set(data.authRoles);
|
|
1767
1832
|
const setIncludes = setIncludesFunction(requiredRoles, data.authRolesMode);
|
|
1768
|
-
return authService.authUserState$.pipe(map(x => setIncludes(x)));
|
|
1833
|
+
return authService.authUserState$.pipe(map((x) => setIncludes(x)));
|
|
1769
1834
|
} }));
|
|
1770
1835
|
// Register the "requires auth" hook with the TransitionsService
|
|
1771
1836
|
transitionService.onBefore(isSecureCriteria, assertHasAuthRole, { priority: 100 });
|
|
@@ -1791,7 +1856,7 @@ function enableHasAuthStateHook(transitionService, config) {
|
|
|
1791
1856
|
const data = targetState.state().data;
|
|
1792
1857
|
const config = toHasAuthStateObjectConfig(data.authStates);
|
|
1793
1858
|
const parsed = toParsedHasAuthStateConfig(config);
|
|
1794
|
-
return authService.authUserState$.pipe(map(x => isAllowed(x, parsed)));
|
|
1859
|
+
return authService.authUserState$.pipe(map((x) => isAllowed(x, parsed)));
|
|
1795
1860
|
} }));
|
|
1796
1861
|
// Register the "requires auth" hook with the TransitionsService
|
|
1797
1862
|
transitionService.onBefore(isSecureCriteria, assertHasAuthState, { priority: 100 });
|
|
@@ -1799,7 +1864,7 @@ function enableHasAuthStateHook(transitionService, config) {
|
|
|
1799
1864
|
// MARK: Utility
|
|
1800
1865
|
function toHasAuthStateObjectConfig(input) {
|
|
1801
1866
|
const isString = typeof input === 'string';
|
|
1802
|
-
if (
|
|
1867
|
+
if (Array.isArray(input) || isString) {
|
|
1803
1868
|
if (isString) {
|
|
1804
1869
|
input = [input];
|
|
1805
1870
|
}
|
|
@@ -1947,7 +2012,7 @@ const NO_AUTH_USER_IDENTIFIER = '0';
|
|
|
1947
2012
|
* @returns
|
|
1948
2013
|
*/
|
|
1949
2014
|
function authUserIdentifier(inputId) {
|
|
1950
|
-
return
|
|
2015
|
+
return inputId ? inputId : NO_AUTH_USER_IDENTIFIER;
|
|
1951
2016
|
}
|
|
1952
2017
|
|
|
1953
2018
|
/**
|
|
@@ -2094,10 +2159,12 @@ function anchorTypeForAnchor(anchor, disabled) {
|
|
|
2094
2159
|
class DbxAnchor {
|
|
2095
2160
|
}
|
|
2096
2161
|
function provideDbxAnchor(sourceType) {
|
|
2097
|
-
return [
|
|
2162
|
+
return [
|
|
2163
|
+
{
|
|
2098
2164
|
provide: DbxAnchor,
|
|
2099
2165
|
useExisting: forwardRef(() => sourceType)
|
|
2100
|
-
}
|
|
2166
|
+
}
|
|
2167
|
+
];
|
|
2101
2168
|
}
|
|
2102
2169
|
|
|
2103
2170
|
/**
|
|
@@ -2218,7 +2285,7 @@ class DbxRouterService {
|
|
|
2218
2285
|
*/
|
|
2219
2286
|
function goWithRouter(dbxRouterService) {
|
|
2220
2287
|
return (route) => {
|
|
2221
|
-
return firstValueFrom(asObservable(route)).then(x => dbxRouterService.go(x));
|
|
2288
|
+
return firstValueFrom(asObservable(route)).then((x) => dbxRouterService.go(x));
|
|
2222
2289
|
};
|
|
2223
2290
|
}
|
|
2224
2291
|
|
|
@@ -2288,13 +2355,16 @@ class DbxUIRouterService {
|
|
|
2288
2355
|
go(input) {
|
|
2289
2356
|
const segueRef = asSegueRef(input);
|
|
2290
2357
|
const params = Object.assign(Object.assign({}, this.uiRouterGlobals.current.params), segueRef.refParams);
|
|
2291
|
-
return this.state
|
|
2358
|
+
return this.state
|
|
2359
|
+
.go(segueRef.ref, params, segueRef.refOptions)
|
|
2360
|
+
.then(() => true)
|
|
2361
|
+
.catch(() => false);
|
|
2292
2362
|
}
|
|
2293
2363
|
isActive(input) {
|
|
2294
2364
|
const segueRef = asSegueRef(input);
|
|
2295
2365
|
const ref = segueRef.ref;
|
|
2296
2366
|
const refParams = segueRef.refParams;
|
|
2297
|
-
const targetRef =
|
|
2367
|
+
const targetRef = ref.startsWith('.') ? `^${ref}` : ref;
|
|
2298
2368
|
const active = this.state.includes(targetRef, refParams);
|
|
2299
2369
|
return active;
|
|
2300
2370
|
}
|
|
@@ -2303,7 +2373,7 @@ class DbxUIRouterService {
|
|
|
2303
2373
|
const bRef = asSegueRefString(bInput);
|
|
2304
2374
|
const aLength = aRef.length;
|
|
2305
2375
|
const bLength = bRef.length;
|
|
2306
|
-
return
|
|
2376
|
+
return aLength > bLength ? 1 : aLength === bLength ? 0 : -1;
|
|
2307
2377
|
}
|
|
2308
2378
|
}
|
|
2309
2379
|
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 });
|
|
@@ -2351,7 +2421,7 @@ function filterTransitionSuccess() {
|
|
|
2351
2421
|
return filterTransitionEvent(DbxRouterTransitionEventType.SUCCESS);
|
|
2352
2422
|
}
|
|
2353
2423
|
function filterTransitionEvent(type) {
|
|
2354
|
-
return filter(x => x.type === type);
|
|
2424
|
+
return filter((x) => x.type === type);
|
|
2355
2425
|
}
|
|
2356
2426
|
|
|
2357
2427
|
/**
|
|
@@ -2500,24 +2570,22 @@ class DbxAppAuthRouterStateModule {
|
|
|
2500
2570
|
static forRoot(config) {
|
|
2501
2571
|
return {
|
|
2502
2572
|
ngModule: DbxAppAuthRouterStateModule,
|
|
2503
|
-
providers: [
|
|
2573
|
+
providers: [
|
|
2574
|
+
{
|
|
2504
2575
|
provide: DBX_APP_AUTH_ROUTER_EFFECTS_TOKEN,
|
|
2505
2576
|
useValue: config.activeRoutesToApplyEffects
|
|
2506
|
-
}
|
|
2577
|
+
}
|
|
2578
|
+
]
|
|
2507
2579
|
};
|
|
2508
2580
|
}
|
|
2509
2581
|
}
|
|
2510
2582
|
DbxAppAuthRouterStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2511
2583
|
DbxAppAuthRouterStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterStateModule, imports: [i1$3.EffectsFeatureModule] });
|
|
2512
|
-
DbxAppAuthRouterStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterStateModule, imports: [[
|
|
2513
|
-
EffectsModule.forFeature([DbxAppAuthRouterEffects])
|
|
2514
|
-
]] });
|
|
2584
|
+
DbxAppAuthRouterStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterStateModule, imports: [[EffectsModule.forFeature([DbxAppAuthRouterEffects])]] });
|
|
2515
2585
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthRouterStateModule, decorators: [{
|
|
2516
2586
|
type: NgModule,
|
|
2517
2587
|
args: [{
|
|
2518
|
-
imports: [
|
|
2519
|
-
EffectsModule.forFeature([DbxAppAuthRouterEffects])
|
|
2520
|
-
],
|
|
2588
|
+
imports: [EffectsModule.forFeature([DbxAppAuthRouterEffects])],
|
|
2521
2589
|
declarations: [],
|
|
2522
2590
|
exports: []
|
|
2523
2591
|
}]
|
|
@@ -2527,10 +2595,12 @@ class DbxAppAuthRouterModule {
|
|
|
2527
2595
|
static forRoot(dbxAppAuthRoutes) {
|
|
2528
2596
|
return {
|
|
2529
2597
|
ngModule: DbxAppAuthRouterModule,
|
|
2530
|
-
providers: [
|
|
2598
|
+
providers: [
|
|
2599
|
+
{
|
|
2531
2600
|
provide: DbxAppAuthRoutes,
|
|
2532
2601
|
useValue: dbxAppAuthRoutes
|
|
2533
|
-
}
|
|
2602
|
+
}
|
|
2603
|
+
]
|
|
2534
2604
|
};
|
|
2535
2605
|
}
|
|
2536
2606
|
}
|
|
@@ -2634,22 +2704,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
2634
2704
|
class DbxCoreAuthModule {
|
|
2635
2705
|
}
|
|
2636
2706
|
DbxCoreAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2637
|
-
DbxCoreAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAuthModule, declarations: [DbxAuthHasRolesDirective,
|
|
2638
|
-
DbxAuthHasAnyRoleDirective], exports: [DbxAuthHasRolesDirective,
|
|
2639
|
-
DbxAuthHasAnyRoleDirective] });
|
|
2707
|
+
DbxCoreAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAuthModule, declarations: [DbxAuthHasRolesDirective, DbxAuthHasAnyRoleDirective], exports: [DbxAuthHasRolesDirective, DbxAuthHasAnyRoleDirective] });
|
|
2640
2708
|
DbxCoreAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAuthModule, imports: [[]] });
|
|
2641
2709
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreAuthModule, decorators: [{
|
|
2642
2710
|
type: NgModule,
|
|
2643
2711
|
args: [{
|
|
2644
2712
|
imports: [],
|
|
2645
|
-
declarations: [
|
|
2646
|
-
|
|
2647
|
-
DbxAuthHasAnyRoleDirective
|
|
2648
|
-
],
|
|
2649
|
-
exports: [
|
|
2650
|
-
DbxAuthHasRolesDirective,
|
|
2651
|
-
DbxAuthHasAnyRoleDirective
|
|
2652
|
-
]
|
|
2713
|
+
declarations: [DbxAuthHasRolesDirective, DbxAuthHasAnyRoleDirective],
|
|
2714
|
+
exports: [DbxAuthHasRolesDirective, DbxAuthHasAnyRoleDirective]
|
|
2653
2715
|
}]
|
|
2654
2716
|
}] });
|
|
2655
2717
|
|
|
@@ -2662,23 +2724,17 @@ class DbxAppAuthEffects {
|
|
|
2662
2724
|
this.store = store;
|
|
2663
2725
|
this.dbxAuthService = dbxAuthService;
|
|
2664
2726
|
// MARK: Auth
|
|
2665
|
-
this.emitLoggedIn = createEffect(() => this.dbxAuthService.onLogIn
|
|
2666
|
-
|
|
2667
|
-
this.emitLoggedOut = createEffect(() => this.dbxAuthService.onLogOut$
|
|
2668
|
-
.pipe(map(() => loggedOut())));
|
|
2727
|
+
this.emitLoggedIn = createEffect(() => this.dbxAuthService.onLogIn$.pipe(map(() => loggedIn())));
|
|
2728
|
+
this.emitLoggedOut = createEffect(() => this.dbxAuthService.onLogOut$.pipe(map(() => loggedOut())));
|
|
2669
2729
|
this.forwardLogoutToAuthService = createEffect(() => this.actions$.pipe(ofType(logout), tap(() => {
|
|
2670
2730
|
// Perform the logout
|
|
2671
2731
|
this.dbxAuthService.logOut();
|
|
2672
2732
|
})), { dispatch: false });
|
|
2673
2733
|
// MARK: Auth
|
|
2674
|
-
this.setUserIdentifier = createEffect(() => this.dbxAuthService.userIdentifier
|
|
2675
|
-
|
|
2676
|
-
this.
|
|
2677
|
-
|
|
2678
|
-
this.setUserRoles = createEffect(() => this.dbxAuthService.authRoles$
|
|
2679
|
-
.pipe(map((roles) => setUserRoles({ roles: Array.from(roles !== null && roles !== void 0 ? roles : []) }))));
|
|
2680
|
-
this.setUserIsOnboarded = createEffect(() => this.dbxAuthService.isOnboarded$
|
|
2681
|
-
.pipe(map((isOnboarded) => setUserIsOnboarded({ isOnboarded }))));
|
|
2734
|
+
this.setUserIdentifier = createEffect(() => this.dbxAuthService.userIdentifier$.pipe(map((id) => setUserIdentifier({ id }))));
|
|
2735
|
+
this.setUserState = createEffect(() => this.dbxAuthService.authUserState$.pipe(map((state) => setUserState({ state }))));
|
|
2736
|
+
this.setUserRoles = createEffect(() => this.dbxAuthService.authRoles$.pipe(map((roles) => setUserRoles({ roles: Array.from(roles !== null && roles !== void 0 ? roles : []) }))));
|
|
2737
|
+
this.setUserIsOnboarded = createEffect(() => this.dbxAuthService.isOnboarded$.pipe(map((isOnboarded) => setUserIsOnboarded({ isOnboarded }))));
|
|
2682
2738
|
}
|
|
2683
2739
|
}
|
|
2684
2740
|
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 });
|
|
@@ -2691,17 +2747,11 @@ class DbxAppAuthStateModule {
|
|
|
2691
2747
|
}
|
|
2692
2748
|
DbxAppAuthStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2693
2749
|
DbxAppAuthStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateModule, imports: [i1$4.StoreFeatureModule, i1$3.EffectsFeatureModule] });
|
|
2694
|
-
DbxAppAuthStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateModule, imports: [[
|
|
2695
|
-
StoreModule.forFeature(featureKey, reducers),
|
|
2696
|
-
EffectsModule.forFeature([DbxAppAuthEffects])
|
|
2697
|
-
]] });
|
|
2750
|
+
DbxAppAuthStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateModule, imports: [[StoreModule.forFeature(featureKey, reducers), EffectsModule.forFeature([DbxAppAuthEffects])]] });
|
|
2698
2751
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppAuthStateModule, decorators: [{
|
|
2699
2752
|
type: NgModule,
|
|
2700
2753
|
args: [{
|
|
2701
|
-
imports: [
|
|
2702
|
-
StoreModule.forFeature(featureKey, reducers),
|
|
2703
|
-
EffectsModule.forFeature([DbxAppAuthEffects])
|
|
2704
|
-
],
|
|
2754
|
+
imports: [StoreModule.forFeature(featureKey, reducers), EffectsModule.forFeature([DbxAppAuthEffects])],
|
|
2705
2755
|
declarations: [],
|
|
2706
2756
|
exports: []
|
|
2707
2757
|
}]
|
|
@@ -2788,10 +2838,12 @@ function checkNgContentWrapperHasContent(ref) {
|
|
|
2788
2838
|
class DbxButton {
|
|
2789
2839
|
}
|
|
2790
2840
|
function provideDbxButton(sourceType) {
|
|
2791
|
-
return [
|
|
2841
|
+
return [
|
|
2842
|
+
{
|
|
2792
2843
|
provide: DbxButton,
|
|
2793
2844
|
useExisting: forwardRef(() => sourceType)
|
|
2794
|
-
}
|
|
2845
|
+
}
|
|
2846
|
+
];
|
|
2795
2847
|
}
|
|
2796
2848
|
|
|
2797
2849
|
/**
|
|
@@ -2881,9 +2933,11 @@ class DbxButtonSegueDirective extends AbstractSubscriptionDirective {
|
|
|
2881
2933
|
this._segueRef.next(segueRef);
|
|
2882
2934
|
}
|
|
2883
2935
|
ngOnInit() {
|
|
2884
|
-
this.sub = this.segueRef
|
|
2936
|
+
this.sub = this.segueRef$
|
|
2937
|
+
.pipe(switchMap((segueRef) => this.dbxButton.clicked$.pipe(tap(() => {
|
|
2885
2938
|
this.dbxRouterService.go(segueRef);
|
|
2886
|
-
}))))
|
|
2939
|
+
}))))
|
|
2940
|
+
.subscribe();
|
|
2887
2941
|
}
|
|
2888
2942
|
ngOnDestroy() {
|
|
2889
2943
|
super.ngOnDestroy();
|
|
@@ -2933,7 +2987,8 @@ class AbstractDbxButtonDirective extends AbstractSubscriptionDirective {
|
|
|
2933
2987
|
this._working.next(working);
|
|
2934
2988
|
}
|
|
2935
2989
|
ngOnInit() {
|
|
2936
|
-
this.sub = this._buttonClick
|
|
2990
|
+
this.sub = this._buttonClick
|
|
2991
|
+
.pipe(switchMap(() => this._buttonInterceptor.pipe(switchMap((x) => {
|
|
2937
2992
|
if (x) {
|
|
2938
2993
|
return x.interceptButtonClick().pipe(first());
|
|
2939
2994
|
}
|
|
@@ -2941,7 +2996,8 @@ class AbstractDbxButtonDirective extends AbstractSubscriptionDirective {
|
|
|
2941
2996
|
return of(true);
|
|
2942
2997
|
}
|
|
2943
2998
|
}), filter((x) => Boolean(x)) // Ignore false values.
|
|
2944
|
-
)))
|
|
2999
|
+
)))
|
|
3000
|
+
.subscribe(() => {
|
|
2945
3001
|
this._forceButtonClicked();
|
|
2946
3002
|
});
|
|
2947
3003
|
}
|
|
@@ -3023,7 +3079,7 @@ class DbxLoadingButtonDirective extends AbstractSubscriptionDirective {
|
|
|
3023
3079
|
let subscription;
|
|
3024
3080
|
if (context) {
|
|
3025
3081
|
subscription = context.stream$.subscribe((x) => {
|
|
3026
|
-
this.ngZone.run(() => this.button.working = x.loading);
|
|
3082
|
+
this.ngZone.run(() => (this.button.working = x.loading));
|
|
3027
3083
|
});
|
|
3028
3084
|
}
|
|
3029
3085
|
this.sub = subscription;
|
|
@@ -3048,34 +3104,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
3048
3104
|
class DbxCoreButtonModule {
|
|
3049
3105
|
}
|
|
3050
3106
|
DbxCoreButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3051
|
-
DbxCoreButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreButtonModule, declarations: [DbxButtonDirective,
|
|
3052
|
-
DbxLoadingButtonDirective,
|
|
3053
|
-
DbxActionButtonTriggerDirective,
|
|
3054
|
-
DbxActionButtonDirective,
|
|
3055
|
-
DbxButtonSegueDirective], exports: [DbxButtonDirective,
|
|
3056
|
-
DbxLoadingButtonDirective,
|
|
3057
|
-
DbxActionButtonTriggerDirective,
|
|
3058
|
-
DbxActionButtonDirective,
|
|
3059
|
-
DbxButtonSegueDirective] });
|
|
3107
|
+
DbxCoreButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreButtonModule, declarations: [DbxButtonDirective, DbxLoadingButtonDirective, DbxActionButtonTriggerDirective, DbxActionButtonDirective, DbxButtonSegueDirective], exports: [DbxButtonDirective, DbxLoadingButtonDirective, DbxActionButtonTriggerDirective, DbxActionButtonDirective, DbxButtonSegueDirective] });
|
|
3060
3108
|
DbxCoreButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreButtonModule, imports: [[]] });
|
|
3061
3109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreButtonModule, decorators: [{
|
|
3062
3110
|
type: NgModule,
|
|
3063
3111
|
args: [{
|
|
3064
3112
|
imports: [],
|
|
3065
|
-
declarations: [
|
|
3066
|
-
|
|
3067
|
-
DbxLoadingButtonDirective,
|
|
3068
|
-
DbxActionButtonTriggerDirective,
|
|
3069
|
-
DbxActionButtonDirective,
|
|
3070
|
-
DbxButtonSegueDirective
|
|
3071
|
-
],
|
|
3072
|
-
exports: [
|
|
3073
|
-
DbxButtonDirective,
|
|
3074
|
-
DbxLoadingButtonDirective,
|
|
3075
|
-
DbxActionButtonTriggerDirective,
|
|
3076
|
-
DbxActionButtonDirective,
|
|
3077
|
-
DbxButtonSegueDirective
|
|
3078
|
-
],
|
|
3113
|
+
declarations: [DbxButtonDirective, DbxLoadingButtonDirective, DbxActionButtonTriggerDirective, DbxActionButtonDirective, DbxButtonSegueDirective],
|
|
3114
|
+
exports: [DbxButtonDirective, DbxLoadingButtonDirective, DbxActionButtonTriggerDirective, DbxActionButtonDirective, DbxButtonSegueDirective]
|
|
3079
3115
|
}]
|
|
3080
3116
|
}] });
|
|
3081
3117
|
|
|
@@ -3141,21 +3177,13 @@ class DbxAppContextStateModule {
|
|
|
3141
3177
|
}
|
|
3142
3178
|
DbxAppContextStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3143
3179
|
DbxAppContextStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateModule, declarations: [DbxAppContextStateDirective], imports: [i1$4.StoreFeatureModule], exports: [DbxAppContextStateDirective] });
|
|
3144
|
-
DbxAppContextStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateModule, imports: [[
|
|
3145
|
-
StoreModule.forFeature(featureKey$1, reducers$1)
|
|
3146
|
-
]] });
|
|
3180
|
+
DbxAppContextStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateModule, imports: [[StoreModule.forFeature(featureKey$1, reducers$1)]] });
|
|
3147
3181
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxAppContextStateModule, decorators: [{
|
|
3148
3182
|
type: NgModule,
|
|
3149
3183
|
args: [{
|
|
3150
|
-
imports: [
|
|
3151
|
-
|
|
3152
|
-
]
|
|
3153
|
-
declarations: [
|
|
3154
|
-
DbxAppContextStateDirective
|
|
3155
|
-
],
|
|
3156
|
-
exports: [
|
|
3157
|
-
DbxAppContextStateDirective
|
|
3158
|
-
]
|
|
3184
|
+
imports: [StoreModule.forFeature(featureKey$1, reducers$1)],
|
|
3185
|
+
declarations: [DbxAppContextStateDirective],
|
|
3186
|
+
exports: [DbxAppContextStateDirective]
|
|
3159
3187
|
}]
|
|
3160
3188
|
}] });
|
|
3161
3189
|
|
|
@@ -3198,12 +3226,12 @@ class MinutesStringPipe {
|
|
|
3198
3226
|
if (minutes > 3600) {
|
|
3199
3227
|
const unrounded = minutes / 3600;
|
|
3200
3228
|
const days = Math.ceil(unrounded);
|
|
3201
|
-
return (
|
|
3229
|
+
return (unrounded !== days ? '~' : '') + days + ' days';
|
|
3202
3230
|
}
|
|
3203
3231
|
else if (minutes > 180) {
|
|
3204
3232
|
const unrounded = minutes / 60;
|
|
3205
3233
|
const hours = Math.ceil(unrounded);
|
|
3206
|
-
return (
|
|
3234
|
+
return (unrounded !== hours ? '~' : '') + hours + ' hours';
|
|
3207
3235
|
}
|
|
3208
3236
|
else {
|
|
3209
3237
|
return minutes + ' minutes';
|
|
@@ -3375,45 +3403,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
3375
3403
|
class DbxDatePipeModule {
|
|
3376
3404
|
}
|
|
3377
3405
|
DbxDatePipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDatePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3378
|
-
DbxDatePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDatePipeModule, declarations: [DateFromToTimePipe,
|
|
3379
|
-
DateFormatDistancePipe,
|
|
3380
|
-
MinutesStringPipe,
|
|
3381
|
-
TimeDistanceCountdownPipe,
|
|
3382
|
-
TimeDistancePipe,
|
|
3383
|
-
DateDistancePipe,
|
|
3384
|
-
ToJsDatePipe,
|
|
3385
|
-
ToMinutesPipe], exports: [DateFromToTimePipe,
|
|
3386
|
-
DateFormatDistancePipe,
|
|
3387
|
-
MinutesStringPipe,
|
|
3388
|
-
TimeDistanceCountdownPipe,
|
|
3389
|
-
TimeDistancePipe,
|
|
3390
|
-
DateDistancePipe,
|
|
3391
|
-
ToJsDatePipe,
|
|
3392
|
-
ToMinutesPipe] });
|
|
3406
|
+
DbxDatePipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDatePipeModule, declarations: [DateFromToTimePipe, DateFormatDistancePipe, MinutesStringPipe, TimeDistanceCountdownPipe, TimeDistancePipe, DateDistancePipe, ToJsDatePipe, ToMinutesPipe], exports: [DateFromToTimePipe, DateFormatDistancePipe, MinutesStringPipe, TimeDistanceCountdownPipe, TimeDistancePipe, DateDistancePipe, ToJsDatePipe, ToMinutesPipe] });
|
|
3393
3407
|
DbxDatePipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDatePipeModule });
|
|
3394
3408
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxDatePipeModule, decorators: [{
|
|
3395
3409
|
type: NgModule,
|
|
3396
3410
|
args: [{
|
|
3397
|
-
exports: [
|
|
3398
|
-
|
|
3399
|
-
DateFormatDistancePipe,
|
|
3400
|
-
MinutesStringPipe,
|
|
3401
|
-
TimeDistanceCountdownPipe,
|
|
3402
|
-
TimeDistancePipe,
|
|
3403
|
-
DateDistancePipe,
|
|
3404
|
-
ToJsDatePipe,
|
|
3405
|
-
ToMinutesPipe
|
|
3406
|
-
],
|
|
3407
|
-
declarations: [
|
|
3408
|
-
DateFromToTimePipe,
|
|
3409
|
-
DateFormatDistancePipe,
|
|
3410
|
-
MinutesStringPipe,
|
|
3411
|
-
TimeDistanceCountdownPipe,
|
|
3412
|
-
TimeDistancePipe,
|
|
3413
|
-
DateDistancePipe,
|
|
3414
|
-
ToJsDatePipe,
|
|
3415
|
-
ToMinutesPipe
|
|
3416
|
-
]
|
|
3411
|
+
exports: [DateFromToTimePipe, DateFormatDistancePipe, MinutesStringPipe, TimeDistanceCountdownPipe, TimeDistancePipe, DateDistancePipe, ToJsDatePipe, ToMinutesPipe],
|
|
3412
|
+
declarations: [DateFromToTimePipe, DateFormatDistancePipe, MinutesStringPipe, TimeDistanceCountdownPipe, TimeDistancePipe, DateDistancePipe, ToJsDatePipe, ToMinutesPipe]
|
|
3417
3413
|
}]
|
|
3418
3414
|
}] });
|
|
3419
3415
|
|
|
@@ -3450,29 +3446,20 @@ DbxMiscPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
|
|
|
3450
3446
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxMiscPipeModule, decorators: [{
|
|
3451
3447
|
type: NgModule,
|
|
3452
3448
|
args: [{
|
|
3453
|
-
exports: [
|
|
3454
|
-
|
|
3455
|
-
],
|
|
3456
|
-
declarations: [
|
|
3457
|
-
PrettyJsonPipe
|
|
3458
|
-
]
|
|
3449
|
+
exports: [PrettyJsonPipe],
|
|
3450
|
+
declarations: [PrettyJsonPipe]
|
|
3459
3451
|
}]
|
|
3460
3452
|
}] });
|
|
3461
3453
|
|
|
3462
3454
|
class DbxPipesModule {
|
|
3463
3455
|
}
|
|
3464
3456
|
DbxPipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3465
|
-
DbxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, exports: [DbxMiscPipeModule,
|
|
3466
|
-
|
|
3467
|
-
DbxPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, imports: [DbxMiscPipeModule,
|
|
3468
|
-
DbxDatePipeModule] });
|
|
3457
|
+
DbxPipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, exports: [DbxMiscPipeModule, DbxDatePipeModule] });
|
|
3458
|
+
DbxPipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, imports: [DbxMiscPipeModule, DbxDatePipeModule] });
|
|
3469
3459
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxPipesModule, decorators: [{
|
|
3470
3460
|
type: NgModule,
|
|
3471
3461
|
args: [{
|
|
3472
|
-
exports: [
|
|
3473
|
-
DbxMiscPipeModule,
|
|
3474
|
-
DbxDatePipeModule,
|
|
3475
|
-
]
|
|
3462
|
+
exports: [DbxMiscPipeModule, DbxDatePipeModule]
|
|
3476
3463
|
}]
|
|
3477
3464
|
}] });
|
|
3478
3465
|
|
|
@@ -3544,7 +3531,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
3544
3531
|
class AbstractFilterSourceConnectorDirective {
|
|
3545
3532
|
constructor() {
|
|
3546
3533
|
this._source = new BehaviorSubject(undefined);
|
|
3547
|
-
this.filter$ = this._source.pipe(switchMap(x => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.filter$) !== null && _a !== void 0 ? _a : of(undefined); }), filterMaybe(), shareReplay(1));
|
|
3534
|
+
this.filter$ = this._source.pipe(switchMap((x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.filter$) !== null && _a !== void 0 ? _a : of(undefined); }), filterMaybe(), shareReplay(1));
|
|
3548
3535
|
}
|
|
3549
3536
|
ngOnDestroy() {
|
|
3550
3537
|
this._source.complete();
|
|
@@ -3563,22 +3550,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
3563
3550
|
* Angular provider convenience function for a FilterSource.
|
|
3564
3551
|
*/
|
|
3565
3552
|
function provideFilterSource(sourceType) {
|
|
3566
|
-
return [
|
|
3553
|
+
return [
|
|
3554
|
+
{
|
|
3567
3555
|
provide: FilterSource,
|
|
3568
3556
|
useExisting: forwardRef(() => sourceType)
|
|
3569
|
-
}
|
|
3557
|
+
}
|
|
3558
|
+
];
|
|
3570
3559
|
}
|
|
3571
3560
|
/**
|
|
3572
3561
|
* Angular provider convenience function for a FilterSourceConnector.
|
|
3573
3562
|
*/
|
|
3574
3563
|
function provideFilterSourceConnector(sourceType) {
|
|
3575
|
-
return [
|
|
3564
|
+
return [
|
|
3565
|
+
{
|
|
3576
3566
|
provide: FilterSourceConnector,
|
|
3577
3567
|
useExisting: forwardRef(() => sourceType)
|
|
3578
|
-
},
|
|
3568
|
+
},
|
|
3569
|
+
{
|
|
3579
3570
|
provide: FilterSource,
|
|
3580
3571
|
useExisting: forwardRef(() => sourceType)
|
|
3581
|
-
}
|
|
3572
|
+
}
|
|
3573
|
+
];
|
|
3582
3574
|
}
|
|
3583
3575
|
|
|
3584
3576
|
/**
|
|
@@ -3587,18 +3579,12 @@ function provideFilterSourceConnector(sourceType) {
|
|
|
3587
3579
|
class DbxFilterSourceConnectorDirective extends AbstractFilterSourceConnectorDirective {
|
|
3588
3580
|
}
|
|
3589
3581
|
DbxFilterSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterSourceConnectorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3590
|
-
DbxFilterSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterSourceConnectorDirective, selector: "[dbxFilterSourceConnector]", providers: [
|
|
3591
|
-
...provideFilterSource(DbxFilterSourceConnectorDirective),
|
|
3592
|
-
...provideFilterSourceConnector(DbxFilterSourceConnectorDirective)
|
|
3593
|
-
], usesInheritance: true, ngImport: i0 });
|
|
3582
|
+
DbxFilterSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterSourceConnectorDirective, selector: "[dbxFilterSourceConnector]", providers: [...provideFilterSource(DbxFilterSourceConnectorDirective), ...provideFilterSourceConnector(DbxFilterSourceConnectorDirective)], usesInheritance: true, ngImport: i0 });
|
|
3594
3583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterSourceConnectorDirective, decorators: [{
|
|
3595
3584
|
type: Directive,
|
|
3596
3585
|
args: [{
|
|
3597
3586
|
selector: '[dbxFilterSourceConnector]',
|
|
3598
|
-
providers: [
|
|
3599
|
-
...provideFilterSource(DbxFilterSourceConnectorDirective),
|
|
3600
|
-
...provideFilterSourceConnector(DbxFilterSourceConnectorDirective)
|
|
3601
|
-
]
|
|
3587
|
+
providers: [...provideFilterSource(DbxFilterSourceConnectorDirective), ...provideFilterSourceConnector(DbxFilterSourceConnectorDirective)]
|
|
3602
3588
|
}]
|
|
3603
3589
|
}] });
|
|
3604
3590
|
|
|
@@ -3628,7 +3614,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
3628
3614
|
class DbxFilterMapSourceDirective extends AbstractDbxFilterMapInstanceDirective {
|
|
3629
3615
|
constructor() {
|
|
3630
3616
|
super(...arguments);
|
|
3631
|
-
this.filter$ = this.instance$.pipe(switchMap(x => x.filter$));
|
|
3617
|
+
this.filter$ = this.instance$.pipe(switchMap((x) => x.filter$));
|
|
3632
3618
|
}
|
|
3633
3619
|
get key() {
|
|
3634
3620
|
return this._key.value;
|
|
@@ -3641,17 +3627,13 @@ class DbxFilterMapSourceDirective extends AbstractDbxFilterMapInstanceDirective
|
|
|
3641
3627
|
}
|
|
3642
3628
|
}
|
|
3643
3629
|
DbxFilterMapSourceDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapSourceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3644
|
-
DbxFilterMapSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterMapSourceDirective, selector: "[dbxFilterMapSource]", inputs: { key: ["dbxFilterMapSource", "key"] }, providers: [
|
|
3645
|
-
...provideFilterSource(DbxFilterMapSourceDirective)
|
|
3646
|
-
], exportAs: ["dbxFilterMapSource"], usesInheritance: true, ngImport: i0 });
|
|
3630
|
+
DbxFilterMapSourceDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterMapSourceDirective, selector: "[dbxFilterMapSource]", inputs: { key: ["dbxFilterMapSource", "key"] }, providers: [...provideFilterSource(DbxFilterMapSourceDirective)], exportAs: ["dbxFilterMapSource"], usesInheritance: true, ngImport: i0 });
|
|
3647
3631
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapSourceDirective, decorators: [{
|
|
3648
3632
|
type: Directive,
|
|
3649
3633
|
args: [{
|
|
3650
3634
|
selector: '[dbxFilterMapSource]',
|
|
3651
3635
|
exportAs: 'dbxFilterMapSource',
|
|
3652
|
-
providers: [
|
|
3653
|
-
...provideFilterSource(DbxFilterMapSourceDirective)
|
|
3654
|
-
]
|
|
3636
|
+
providers: [...provideFilterSource(DbxFilterMapSourceDirective)]
|
|
3655
3637
|
}]
|
|
3656
3638
|
}], propDecorators: { key: [{
|
|
3657
3639
|
type: Input,
|
|
@@ -3674,19 +3656,13 @@ class DbxFilterMapSourceConnectorDirective extends DbxFilterMapSourceDirective {
|
|
|
3674
3656
|
}
|
|
3675
3657
|
}
|
|
3676
3658
|
DbxFilterMapSourceConnectorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapSourceConnectorDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
3677
|
-
DbxFilterMapSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterMapSourceConnectorDirective, selector: "[dbxFilterMapSourceConnector]", inputs: { key: ["dbxFilterMapSourceConnector", "key"] }, providers: [
|
|
3678
|
-
...provideFilterSource(DbxFilterMapSourceConnectorDirective),
|
|
3679
|
-
...provideFilterSourceConnector(DbxFilterMapSourceConnectorDirective)
|
|
3680
|
-
], exportAs: ["dbxFilterMapSourceConnector"], usesInheritance: true, ngImport: i0 });
|
|
3659
|
+
DbxFilterMapSourceConnectorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: DbxFilterMapSourceConnectorDirective, selector: "[dbxFilterMapSourceConnector]", inputs: { key: ["dbxFilterMapSourceConnector", "key"] }, providers: [...provideFilterSource(DbxFilterMapSourceConnectorDirective), ...provideFilterSourceConnector(DbxFilterMapSourceConnectorDirective)], exportAs: ["dbxFilterMapSourceConnector"], usesInheritance: true, ngImport: i0 });
|
|
3681
3660
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxFilterMapSourceConnectorDirective, decorators: [{
|
|
3682
3661
|
type: Directive,
|
|
3683
3662
|
args: [{
|
|
3684
3663
|
selector: '[dbxFilterMapSourceConnector]',
|
|
3685
3664
|
exportAs: 'dbxFilterMapSourceConnector',
|
|
3686
|
-
providers: [
|
|
3687
|
-
...provideFilterSource(DbxFilterMapSourceConnectorDirective),
|
|
3688
|
-
...provideFilterSourceConnector(DbxFilterMapSourceConnectorDirective)
|
|
3689
|
-
]
|
|
3665
|
+
providers: [...provideFilterSource(DbxFilterMapSourceConnectorDirective), ...provideFilterSourceConnector(DbxFilterMapSourceConnectorDirective)]
|
|
3690
3666
|
}]
|
|
3691
3667
|
}], propDecorators: { key: [{
|
|
3692
3668
|
type: Input,
|
|
@@ -3733,38 +3709,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
3733
3709
|
class DbxCoreFilterModule {
|
|
3734
3710
|
}
|
|
3735
3711
|
DbxCoreFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3736
|
-
DbxCoreFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, declarations: [DbxFilterSourceDirective,
|
|
3737
|
-
|
|
3738
|
-
DbxFilterMapDirective,
|
|
3739
|
-
DbxFilterMapSourceConnectorDirective,
|
|
3740
|
-
DbxFilterMapSourceDirective], imports: [CommonModule], exports: [DbxFilterSourceDirective,
|
|
3741
|
-
DbxFilterSourceConnectorDirective,
|
|
3742
|
-
DbxFilterMapDirective,
|
|
3743
|
-
DbxFilterMapSourceConnectorDirective,
|
|
3744
|
-
DbxFilterMapSourceDirective] });
|
|
3745
|
-
DbxCoreFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, imports: [[
|
|
3746
|
-
CommonModule
|
|
3747
|
-
]] });
|
|
3712
|
+
DbxCoreFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, declarations: [DbxFilterSourceDirective, DbxFilterSourceConnectorDirective, DbxFilterMapDirective, DbxFilterMapSourceConnectorDirective, DbxFilterMapSourceDirective], imports: [CommonModule], exports: [DbxFilterSourceDirective, DbxFilterSourceConnectorDirective, DbxFilterMapDirective, DbxFilterMapSourceConnectorDirective, DbxFilterMapSourceDirective] });
|
|
3713
|
+
DbxCoreFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, imports: [[CommonModule]] });
|
|
3748
3714
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxCoreFilterModule, decorators: [{
|
|
3749
3715
|
type: NgModule,
|
|
3750
3716
|
args: [{
|
|
3751
|
-
imports: [
|
|
3752
|
-
|
|
3753
|
-
]
|
|
3754
|
-
declarations: [
|
|
3755
|
-
DbxFilterSourceDirective,
|
|
3756
|
-
DbxFilterSourceConnectorDirective,
|
|
3757
|
-
DbxFilterMapDirective,
|
|
3758
|
-
DbxFilterMapSourceConnectorDirective,
|
|
3759
|
-
DbxFilterMapSourceDirective,
|
|
3760
|
-
],
|
|
3761
|
-
exports: [
|
|
3762
|
-
DbxFilterSourceDirective,
|
|
3763
|
-
DbxFilterSourceConnectorDirective,
|
|
3764
|
-
DbxFilterMapDirective,
|
|
3765
|
-
DbxFilterMapSourceConnectorDirective,
|
|
3766
|
-
DbxFilterMapSourceDirective,
|
|
3767
|
-
]
|
|
3717
|
+
imports: [CommonModule],
|
|
3718
|
+
declarations: [DbxFilterSourceDirective, DbxFilterSourceConnectorDirective, DbxFilterMapDirective, DbxFilterMapSourceConnectorDirective, DbxFilterMapSourceDirective],
|
|
3719
|
+
exports: [DbxFilterSourceDirective, DbxFilterSourceConnectorDirective, DbxFilterMapDirective, DbxFilterMapSourceConnectorDirective, DbxFilterMapSourceDirective]
|
|
3768
3720
|
}]
|
|
3769
3721
|
}] });
|
|
3770
3722
|
|
|
@@ -3776,7 +3728,7 @@ const DBX_INJECTION_COMPONENT_DATA = new InjectionToken('DbxInjectionComponentCo
|
|
|
3776
3728
|
* @returns
|
|
3777
3729
|
*/
|
|
3778
3730
|
function mergeDbxInjectionComponentConfigs(configs) {
|
|
3779
|
-
const providers = mergeArrays(filterMaybeValues(configs).map(x => x.providers));
|
|
3731
|
+
const providers = mergeArrays(filterMaybeValues(configs).map((x) => x.providers));
|
|
3780
3732
|
const result = mergeObjects(configs);
|
|
3781
3733
|
result.providers = providers;
|
|
3782
3734
|
return result;
|
|
@@ -3860,10 +3812,12 @@ class DbxInjectionInstance {
|
|
|
3860
3812
|
if (providers || data) {
|
|
3861
3813
|
injector = Injector.create({
|
|
3862
3814
|
parent: parentInjector,
|
|
3863
|
-
providers: mergeArrayOrValueIntoArray([
|
|
3815
|
+
providers: mergeArrayOrValueIntoArray([
|
|
3816
|
+
{
|
|
3864
3817
|
provide: DBX_INJECTION_COMPONENT_DATA,
|
|
3865
3818
|
useValue: data
|
|
3866
|
-
}
|
|
3819
|
+
}
|
|
3820
|
+
], providers !== null && providers !== void 0 ? providers : [])
|
|
3867
3821
|
});
|
|
3868
3822
|
}
|
|
3869
3823
|
const componentRef = content.createComponent(componentClass, { injector, ngModuleRef });
|
|
@@ -3937,12 +3891,16 @@ class DbxInjectionComponent extends AbstractDbxInjectionDirective {
|
|
|
3937
3891
|
}
|
|
3938
3892
|
}
|
|
3939
3893
|
DbxInjectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3940
|
-
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:
|
|
3894
|
+
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: `
|
|
3895
|
+
<ng-template #content></ng-template>
|
|
3896
|
+
`, isInline: true });
|
|
3941
3897
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponent, decorators: [{
|
|
3942
3898
|
type: Component,
|
|
3943
3899
|
args: [{
|
|
3944
3900
|
selector: 'dbx-injection, [dbxInjection], [dbx-injection]',
|
|
3945
|
-
template:
|
|
3901
|
+
template: `
|
|
3902
|
+
<ng-template #content></ng-template>
|
|
3903
|
+
`
|
|
3946
3904
|
}]
|
|
3947
3905
|
}], propDecorators: { config: [{
|
|
3948
3906
|
type: Input
|
|
@@ -3965,10 +3923,12 @@ class DbxInjectionContext {
|
|
|
3965
3923
|
* Allows a directive to provide a formly context and form.
|
|
3966
3924
|
*/
|
|
3967
3925
|
function provideDbxInjectionContext(type) {
|
|
3968
|
-
return [
|
|
3926
|
+
return [
|
|
3927
|
+
{
|
|
3969
3928
|
provide: DbxInjectionContext,
|
|
3970
3929
|
useExisting: type
|
|
3971
|
-
}
|
|
3930
|
+
}
|
|
3931
|
+
];
|
|
3972
3932
|
}
|
|
3973
3933
|
|
|
3974
3934
|
/**
|
|
@@ -4093,26 +4053,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
4093
4053
|
class DbxInjectionComponentModule {
|
|
4094
4054
|
}
|
|
4095
4055
|
DbxInjectionComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4096
|
-
DbxInjectionComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, declarations: [DbxInjectionComponent,
|
|
4097
|
-
|
|
4098
|
-
DbxInjectionContextDirective] });
|
|
4099
|
-
DbxInjectionComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, imports: [[
|
|
4100
|
-
CommonModule
|
|
4101
|
-
]] });
|
|
4056
|
+
DbxInjectionComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, declarations: [DbxInjectionComponent, DbxInjectionContextDirective], imports: [CommonModule], exports: [DbxInjectionComponent, DbxInjectionContextDirective] });
|
|
4057
|
+
DbxInjectionComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, imports: [[CommonModule]] });
|
|
4102
4058
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: DbxInjectionComponentModule, decorators: [{
|
|
4103
4059
|
type: NgModule,
|
|
4104
4060
|
args: [{
|
|
4105
|
-
imports: [
|
|
4106
|
-
|
|
4107
|
-
]
|
|
4108
|
-
declarations: [
|
|
4109
|
-
DbxInjectionComponent,
|
|
4110
|
-
DbxInjectionContextDirective
|
|
4111
|
-
],
|
|
4112
|
-
exports: [
|
|
4113
|
-
DbxInjectionComponent,
|
|
4114
|
-
DbxInjectionContextDirective
|
|
4115
|
-
],
|
|
4061
|
+
imports: [CommonModule],
|
|
4062
|
+
declarations: [DbxInjectionComponent, DbxInjectionContextDirective],
|
|
4063
|
+
exports: [DbxInjectionComponent, DbxInjectionContextDirective]
|
|
4116
4064
|
}]
|
|
4117
4065
|
}] });
|
|
4118
4066
|
|
|
@@ -4170,7 +4118,7 @@ class LockSetComponentStore extends ComponentStore {
|
|
|
4170
4118
|
}
|
|
4171
4119
|
}
|
|
4172
4120
|
setParentLockSet(obs) {
|
|
4173
|
-
this.lockSet.setParentLockSet(asObservable(obs).pipe(map(x => x === null || x === void 0 ? void 0 : x.lockSet)));
|
|
4121
|
+
this.lockSet.setParentLockSet(asObservable(obs).pipe(map((x) => x === null || x === void 0 ? void 0 : x.lockSet)));
|
|
4174
4122
|
}
|
|
4175
4123
|
addLock(key, obs) {
|
|
4176
4124
|
this.lockSet.addLock(key, obs);
|
|
@@ -4182,7 +4130,7 @@ class LockSetComponentStore extends ComponentStore {
|
|
|
4182
4130
|
fn: () => {
|
|
4183
4131
|
this._destroyNow();
|
|
4184
4132
|
},
|
|
4185
|
-
timeout: this.lockSetDestroyTimeoutMs
|
|
4133
|
+
timeout: this.lockSetDestroyTimeoutMs
|
|
4186
4134
|
}, this.lockSetDestroyDelayMs);
|
|
4187
4135
|
}
|
|
4188
4136
|
/**
|
|
@@ -4287,7 +4235,8 @@ class SimpleStorageAccessor {
|
|
|
4287
4235
|
}
|
|
4288
4236
|
all() {
|
|
4289
4237
|
return this._delegate.all(this._config.fullPrefix).pipe(map((allStoredData) => {
|
|
4290
|
-
return allStoredData
|
|
4238
|
+
return allStoredData
|
|
4239
|
+
.map((storedData) => {
|
|
4291
4240
|
const readStoredData = this.readStoredData(storedData);
|
|
4292
4241
|
if (!readStoredData.expired) {
|
|
4293
4242
|
return readStoredData.convertedData;
|
|
@@ -4295,11 +4244,12 @@ class SimpleStorageAccessor {
|
|
|
4295
4244
|
else {
|
|
4296
4245
|
return null;
|
|
4297
4246
|
}
|
|
4298
|
-
})
|
|
4247
|
+
})
|
|
4248
|
+
.filter(filterMaybeValuesFn);
|
|
4299
4249
|
}));
|
|
4300
4250
|
}
|
|
4301
4251
|
allKeys() {
|
|
4302
|
-
return this._delegate.allKeys(this._config.fullPrefix).pipe(map((keys) => keys.map(x => this.decodeStorageKey(x))));
|
|
4252
|
+
return this._delegate.allKeys(this._config.fullPrefix).pipe(map((keys) => keys.map((x) => this.decodeStorageKey(x))));
|
|
4303
4253
|
}
|
|
4304
4254
|
clear() {
|
|
4305
4255
|
return this._delegate.clear();
|
|
@@ -4394,7 +4344,7 @@ class StringStorageAccessor {
|
|
|
4394
4344
|
});
|
|
4395
4345
|
}
|
|
4396
4346
|
all() {
|
|
4397
|
-
return this.allKeys().pipe(map(x => filterMaybeValues(x.map(y => this._storage.getItem(y)))), shareReplay(1));
|
|
4347
|
+
return this.allKeys().pipe(map((x) => filterMaybeValues(x.map((y) => this._storage.getItem(y)))), shareReplay(1));
|
|
4398
4348
|
}
|
|
4399
4349
|
allKeys() {
|
|
4400
4350
|
return new Observable((x) => {
|
|
@@ -4493,7 +4443,7 @@ class FullLocalStorageObject {
|
|
|
4493
4443
|
}
|
|
4494
4444
|
removeAll() {
|
|
4495
4445
|
const keys = StorageObjectUtility.allKeysFromStorageObject(this);
|
|
4496
|
-
keys.forEach(x => this.removeItem(x));
|
|
4446
|
+
keys.forEach((x) => this.removeItem(x));
|
|
4497
4447
|
return keys;
|
|
4498
4448
|
}
|
|
4499
4449
|
}
|
|
@@ -4524,16 +4474,20 @@ class DbxStorageModule {
|
|
|
4524
4474
|
static forRoot() {
|
|
4525
4475
|
return {
|
|
4526
4476
|
ngModule: DbxStorageModule,
|
|
4527
|
-
providers: [
|
|
4477
|
+
providers: [
|
|
4478
|
+
{
|
|
4528
4479
|
provide: DEFAULT_STORAGE_OBJECT_TOKEN,
|
|
4529
4480
|
useFactory: defaultStorageObjectFactory
|
|
4530
|
-
},
|
|
4481
|
+
},
|
|
4482
|
+
{
|
|
4531
4483
|
provide: DEFAULT_STORAGE_ACCESSOR_FACTORY_TOKEN,
|
|
4532
4484
|
useClass: SimpleStorageAccessorFactory
|
|
4533
|
-
},
|
|
4485
|
+
},
|
|
4486
|
+
{
|
|
4534
4487
|
provide: SimpleStorageAccessorFactory,
|
|
4535
4488
|
useExisting: DEFAULT_STORAGE_ACCESSOR_FACTORY_TOKEN
|
|
4536
|
-
}
|
|
4489
|
+
}
|
|
4490
|
+
]
|
|
4537
4491
|
};
|
|
4538
4492
|
}
|
|
4539
4493
|
}
|