@dereekb/dbx-core 11.1.8 → 12.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/esm2022/lib/action/action.holder.mjs +1 -1
- package/esm2022/lib/action/action.machine.mjs +5 -5
- package/esm2022/lib/action/action.mjs +1 -1
- package/esm2022/lib/action/action.module.mjs +14 -13
- package/esm2022/lib/action/action.store.mjs +22 -10
- package/esm2022/lib/action/action.store.source.mjs +4 -1
- package/esm2022/lib/action/directive/auto/action.automodify.directive.mjs +24 -32
- package/esm2022/lib/action/directive/auto/action.autotrigger.directive.mjs +74 -87
- package/esm2022/lib/action/directive/auto/index.mjs +1 -2
- package/esm2022/lib/action/directive/context/action.directive.mjs +7 -6
- package/esm2022/lib/action/directive/context/action.source.directive.mjs +12 -25
- package/esm2022/lib/action/directive/debug/action.logger.directive.mjs +6 -5
- package/esm2022/lib/action/directive/map/action.map.directive.mjs +21 -65
- package/esm2022/lib/action/directive/map/action.map.key.directive.mjs +9 -8
- package/esm2022/lib/action/directive/map/action.map.mjs +54 -1
- package/esm2022/lib/action/directive/map/action.map.source.directive.mjs +10 -9
- package/esm2022/lib/action/directive/map/action.map.utility.mjs +37 -0
- package/esm2022/lib/action/directive/map/action.map.working.disable.directive.mjs +16 -16
- package/esm2022/lib/action/directive/map/index.mjs +2 -1
- package/esm2022/lib/action/directive/state/action.disabled.directive.mjs +6 -5
- package/esm2022/lib/action/directive/state/action.disableonsuccess.directive.mjs +6 -5
- package/esm2022/lib/action/directive/state/action.enforce.modified.directive.mjs +6 -5
- package/esm2022/lib/action/directive/state/action.handler.directive.mjs +29 -43
- package/esm2022/lib/action/directive/state/action.handler.instance.mjs +12 -14
- package/esm2022/lib/action/directive/state/action.presuccess.directive.mjs +6 -5
- package/esm2022/lib/action/directive/state/action.success.directive.mjs +6 -5
- package/esm2022/lib/action/directive/state/action.success.handler.directive.mjs +12 -23
- package/esm2022/lib/action/directive/state/action.value.directive.mjs +23 -24
- package/esm2022/lib/action/directive/state/action.value.stream.directive.mjs +22 -36
- package/esm2022/lib/action/directive/state/action.value.trigger.directive.mjs +50 -42
- package/esm2022/lib/action/directive/state/action.value.trigger.instance.mjs +27 -15
- package/esm2022/lib/action/directive/state/action.working.directive.mjs +35 -0
- package/esm2022/lib/action/directive/state/index.mjs +3 -2
- package/esm2022/lib/auth/auth.module.mjs +13 -7
- package/esm2022/lib/auth/auth.providers.mjs +16 -0
- package/esm2022/lib/auth/auth.role.any.directive.mjs +13 -14
- package/esm2022/lib/auth/auth.role.has.directive.mjs +13 -14
- package/esm2022/lib/auth/auth.role.not.directive.mjs +13 -14
- package/esm2022/lib/auth/auth.state.providers.mjs +14 -0
- package/esm2022/lib/auth/auth.state.service.mjs +3 -3
- package/esm2022/lib/auth/index.mjs +3 -2
- package/esm2022/lib/auth/router/auth.router.module.mjs +4 -4
- package/esm2022/lib/auth/router/auth.router.providers.mjs +19 -0
- package/esm2022/lib/auth/router/auth.router.service.mjs +5 -5
- package/esm2022/lib/auth/router/index.mjs +2 -1
- package/esm2022/lib/auth/router/provider/uirouter/hook.mjs +1 -1
- package/esm2022/lib/auth/router/provider/uirouter/redirect.mjs +1 -1
- package/esm2022/lib/auth/router/provider/uirouter/role.hook.mjs +1 -1
- package/esm2022/lib/auth/router/provider/uirouter/state.hook.mjs +1 -1
- package/esm2022/lib/auth/router/state/auth.router.state.module.mjs +10 -9
- package/esm2022/lib/auth/router/state/auth.router.state.providers.mjs +23 -0
- package/esm2022/lib/auth/router/state/effect/auth.router.state.effect.mjs +4 -4
- package/esm2022/lib/auth/router/state/index.mjs +2 -1
- package/esm2022/lib/auth/state/effect/auth.effect.mjs +5 -5
- package/esm2022/lib/button/action/action.button.directive.mjs +9 -12
- package/esm2022/lib/button/action/action.button.trigger.directive.mjs +7 -6
- package/esm2022/lib/button/button.directive.mjs +51 -60
- package/esm2022/lib/button/button.loading.directive.mjs +19 -20
- package/esm2022/lib/button/button.mjs +3 -3
- package/esm2022/lib/button/button.module.mjs +16 -8
- package/esm2022/lib/button/router/button.segue.directive.mjs +8 -7
- package/esm2022/lib/context/context.directive.mjs +7 -6
- package/esm2022/lib/context/context.mjs +8 -5
- package/esm2022/lib/context/context.module.mjs +9 -10
- package/esm2022/lib/context/context.providers.mjs +12 -0
- package/esm2022/lib/context/context.service.mjs +3 -3
- package/esm2022/lib/context/index.mjs +2 -1
- package/esm2022/lib/environment/environment.mjs +6 -0
- package/esm2022/lib/environment/environment.providers.mjs +19 -0
- package/esm2022/lib/environment/environment.service.mjs +30 -0
- package/esm2022/lib/environment/index.mjs +4 -3
- package/esm2022/lib/filter/filter.abstract.connector.directive.mjs +4 -4
- package/esm2022/lib/filter/filter.abstract.source.directive.mjs +31 -20
- package/esm2022/lib/filter/filter.connect.source.directive.mjs +6 -5
- package/esm2022/lib/filter/filter.connector.directive.mjs +6 -5
- package/esm2022/lib/filter/filter.map.connector.directive.mjs +12 -18
- package/esm2022/lib/filter/filter.map.directive.mjs +6 -5
- package/esm2022/lib/filter/filter.map.instance.directive.mjs +13 -10
- package/esm2022/lib/filter/filter.map.source.directive.mjs +22 -18
- package/esm2022/lib/filter/filter.module.mjs +8 -10
- package/esm2022/lib/filter/filter.source.directive.mjs +6 -5
- package/esm2022/lib/injection/injection.array.component.mjs +18 -31
- package/esm2022/lib/injection/injection.component.mjs +17 -23
- package/esm2022/lib/injection/injection.component.module.mjs +13 -9
- package/esm2022/lib/injection/injection.context.directive.mjs +7 -6
- package/esm2022/lib/injection/injection.context.forward.directive.mjs +3 -3
- package/esm2022/lib/injection/injection.directive.mjs +4 -4
- package/esm2022/lib/injection/injection.instance.mjs +7 -4
- package/esm2022/lib/injection/injection.mjs +1 -1
- package/esm2022/lib/injection/injection.rxjs.mjs +1 -1
- package/esm2022/lib/ngrx/store.lockset.mjs +6 -6
- package/esm2022/lib/pipe/async/asobservable.pipe.mjs +8 -5
- package/esm2022/lib/pipe/async/async.pipe.module.mjs +10 -7
- package/esm2022/lib/pipe/date/date.pipe.module.mjs +29 -8
- package/esm2022/lib/pipe/date/datedayrange.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/datedaytimerange.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/datedistance.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/dateformatdistance.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/datefromtoformat.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/daterangedistance.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/datetimerange.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/datetimerangeonly.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/datetimerangeonlydistance.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/minutesstring.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/systemdatetotargetdate.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/targetdatetosystemdate.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/timedistance.pipe.mjs +17 -9
- package/esm2022/lib/pipe/date/timezoneabbreviation.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/tojsdate.pipe.mjs +9 -5
- package/esm2022/lib/pipe/date/tominutes.pipe.mjs +9 -5
- package/esm2022/lib/pipe/misc/misc.pipe.module.mjs +12 -7
- package/esm2022/lib/pipe/misc/prettyjson.pipe.mjs +8 -5
- package/esm2022/lib/pipe/pipe.module.mjs +13 -6
- package/esm2022/lib/pipe/value/cuttext.pipe.mjs +9 -5
- package/esm2022/lib/pipe/value/dollar.pipe.mjs +9 -5
- package/esm2022/lib/pipe/value/getvalue.pipe.mjs +9 -7
- package/esm2022/lib/pipe/value/value.pipe.module.mjs +16 -8
- package/esm2022/lib/router/anchor/anchor.directive.mjs +12 -5
- package/esm2022/lib/router/anchor/anchor.mjs +7 -20
- package/esm2022/lib/router/anchor/clickable.mjs +1 -1
- package/esm2022/lib/router/auth/hook/id.hook.mjs +1 -1
- package/esm2022/lib/router/model/id.param.redirect.mjs +1 -1
- package/esm2022/lib/router/model/model.module.mjs +15 -9
- package/esm2022/lib/router/model/model.router.id.directive.mjs +6 -5
- package/esm2022/lib/router/model/model.router.key.directive.mjs +6 -5
- package/esm2022/lib/router/model/model.router.uid.directive.mjs +6 -5
- package/esm2022/lib/router/router/provider/angular/angular.router.service.mjs +4 -4
- package/esm2022/lib/router/router/provider/angular/angular.router.service.module.mjs +7 -6
- package/esm2022/lib/router/router/provider/uirouter/index.mjs +2 -1
- package/esm2022/lib/router/router/provider/uirouter/uirouter.router.service.mjs +5 -5
- package/esm2022/lib/router/router/provider/uirouter/uirouter.router.service.module.mjs +8 -5
- package/esm2022/lib/router/router/provider/uirouter/uirouter.router.service.providers.mjs +24 -0
- package/esm2022/lib/router/router/service/router.service.rxjs.mjs +1 -1
- package/esm2022/lib/router/router/transition/transition.directive.mjs +3 -3
- package/esm2022/lib/router/router/transition/transition.watcher.directive.mjs +4 -4
- package/esm2022/lib/router/router/util/route.default.mjs +1 -1
- package/esm2022/lib/router/segue.mjs +1 -1
- package/esm2022/lib/storage/index.mjs +2 -2
- package/esm2022/lib/storage/storage.accessor.simple.factory.mjs +3 -3
- package/esm2022/lib/storage/storage.accessor.simple.mjs +1 -1
- package/esm2022/lib/storage/storage.object.localstorage.mjs +1 -1
- package/esm2022/lib/storage/storage.providers.mjs +41 -0
- package/esm2022/lib/subscription/subscription.directive.mjs +7 -7
- package/esm2022/lib/util/view.mjs +9 -1
- package/esm2022/lib/view/if.directive.mjs +4 -4
- package/fesm2022/dereekb-dbx-core.mjs +2483 -2234
- package/fesm2022/dereekb-dbx-core.mjs.map +1 -1
- package/lib/action/action.module.d.ts +5 -3
- package/lib/action/action.store.d.ts +18 -9
- package/lib/action/action.store.source.d.ts +1 -0
- package/lib/action/directive/auto/action.automodify.directive.d.ts +4 -6
- package/lib/action/directive/auto/action.autotrigger.directive.d.ts +15 -32
- package/lib/action/directive/auto/index.d.ts +0 -1
- package/lib/action/directive/context/action.directive.d.ts +1 -1
- package/lib/action/directive/context/action.source.directive.d.ts +3 -7
- package/lib/action/directive/debug/action.logger.directive.d.ts +1 -1
- package/lib/action/directive/map/action.map.d.ts +31 -1
- package/lib/action/directive/map/action.map.directive.d.ts +4 -24
- package/lib/action/directive/map/action.map.key.directive.d.ts +3 -3
- package/lib/action/directive/map/action.map.source.directive.d.ts +2 -2
- package/lib/action/directive/map/action.map.utility.d.ts +48 -0
- package/lib/action/directive/map/action.map.working.disable.directive.d.ts +4 -4
- package/lib/action/directive/map/index.d.ts +1 -0
- package/lib/action/directive/state/action.disabled.directive.d.ts +1 -1
- package/lib/action/directive/state/action.disableonsuccess.directive.d.ts +1 -1
- package/lib/action/directive/state/action.enforce.modified.directive.d.ts +1 -1
- package/lib/action/directive/state/action.handler.directive.d.ts +12 -13
- package/lib/action/directive/state/action.handler.instance.d.ts +4 -4
- package/lib/action/directive/state/action.presuccess.directive.d.ts +1 -1
- package/lib/action/directive/state/action.success.directive.d.ts +1 -1
- package/lib/action/directive/state/action.success.handler.directive.d.ts +2 -5
- package/lib/action/directive/state/action.value.directive.d.ts +10 -5
- package/lib/action/directive/state/action.value.stream.directive.d.ts +11 -11
- package/lib/action/directive/state/action.value.trigger.directive.d.ts +23 -17
- package/lib/action/directive/state/action.value.trigger.instance.d.ts +28 -17
- package/lib/action/directive/state/{action.working.component.d.ts → action.working.directive.d.ts} +1 -1
- package/lib/action/directive/state/index.d.ts +2 -1
- package/lib/auth/auth.module.d.ts +8 -1
- package/lib/auth/auth.providers.d.ts +12 -0
- package/lib/auth/auth.role.any.directive.d.ts +7 -7
- package/lib/auth/auth.role.has.directive.d.ts +7 -7
- package/lib/auth/auth.role.not.directive.d.ts +7 -7
- package/lib/auth/auth.state.providers.d.ts +7 -0
- package/lib/auth/index.d.ts +2 -1
- package/lib/auth/router/auth.router.providers.d.ts +18 -0
- package/lib/auth/router/index.d.ts +1 -0
- package/lib/auth/router/state/auth.router.state.module.d.ts +4 -2
- package/lib/auth/router/state/auth.router.state.providers.d.ts +19 -0
- package/lib/auth/router/state/index.d.ts +1 -0
- package/lib/auth/state/action/auth.action.d.ts +3 -3
- package/lib/auth/state/action/user.action.d.ts +4 -4
- package/lib/auth/state/effect/auth.effect.d.ts +9 -9
- package/lib/auth/state/reducer/user.reducer.d.ts +1 -1
- package/lib/button/action/action.button.directive.d.ts +3 -4
- package/lib/button/action/action.button.trigger.directive.d.ts +2 -2
- package/lib/button/button.d.ts +55 -14
- package/lib/button/button.directive.d.ts +25 -18
- package/lib/button/button.loading.directive.d.ts +7 -9
- package/lib/button/button.module.d.ts +9 -1
- package/lib/button/router/button.segue.directive.d.ts +4 -3
- package/lib/context/context.d.ts +7 -4
- package/lib/context/context.directive.d.ts +1 -1
- package/lib/context/context.module.d.ts +4 -2
- package/lib/context/context.providers.d.ts +7 -0
- package/lib/context/index.d.ts +1 -0
- package/lib/context/state/action/data.action.d.ts +2 -2
- package/lib/context/state/reducer/data.reducer.d.ts +1 -1
- package/lib/environment/environment.providers.d.ts +8 -0
- package/lib/environment/index.d.ts +3 -2
- package/lib/filter/filter.abstract.connector.directive.d.ts +1 -1
- package/lib/filter/filter.abstract.source.directive.d.ts +14 -10
- package/lib/filter/filter.connect.source.directive.d.ts +1 -1
- package/lib/filter/filter.connector.directive.d.ts +1 -1
- package/lib/filter/filter.map.connector.directive.d.ts +6 -6
- package/lib/filter/filter.map.directive.d.ts +1 -1
- package/lib/filter/filter.map.instance.directive.d.ts +4 -5
- package/lib/filter/filter.map.source.directive.d.ts +13 -6
- package/lib/filter/filter.module.d.ts +1 -2
- package/lib/filter/filter.source.directive.d.ts +1 -1
- package/lib/injection/injection.array.component.d.ts +3 -9
- package/lib/injection/injection.component.d.ts +8 -4
- package/lib/injection/injection.component.module.d.ts +8 -3
- package/lib/injection/injection.context.directive.d.ts +2 -2
- package/lib/injection/injection.d.ts +8 -8
- package/lib/injection/injection.directive.d.ts +4 -3
- package/lib/injection/injection.instance.d.ts +5 -4
- package/lib/pipe/async/asobservable.pipe.d.ts +1 -1
- package/lib/pipe/async/async.pipe.module.d.ts +4 -1
- package/lib/pipe/date/date.pipe.module.d.ts +22 -1
- package/lib/pipe/date/datedayrange.pipe.d.ts +1 -1
- package/lib/pipe/date/datedaytimerange.pipe.d.ts +1 -1
- package/lib/pipe/date/datedistance.pipe.d.ts +1 -1
- package/lib/pipe/date/dateformatdistance.pipe.d.ts +2 -2
- package/lib/pipe/date/datefromtoformat.pipe.d.ts +2 -2
- package/lib/pipe/date/daterangedistance.pipe.d.ts +1 -1
- package/lib/pipe/date/datetimerange.pipe.d.ts +1 -1
- package/lib/pipe/date/datetimerangeonly.pipe.d.ts +1 -1
- package/lib/pipe/date/datetimerangeonlydistance.pipe.d.ts +1 -1
- package/lib/pipe/date/minutesstring.pipe.d.ts +1 -1
- package/lib/pipe/date/systemdatetotargetdate.pipe.d.ts +1 -1
- package/lib/pipe/date/targetdatetosystemdate.pipe.d.ts +1 -1
- package/lib/pipe/date/timedistance.pipe.d.ts +2 -2
- package/lib/pipe/date/timezoneabbreviation.pipe.d.ts +1 -1
- package/lib/pipe/date/tojsdate.pipe.d.ts +1 -1
- package/lib/pipe/date/tominutes.pipe.d.ts +1 -1
- package/lib/pipe/misc/misc.pipe.module.d.ts +6 -1
- package/lib/pipe/misc/prettyjson.pipe.d.ts +1 -1
- package/lib/pipe/pipe.module.d.ts +6 -1
- package/lib/pipe/value/cuttext.pipe.d.ts +1 -1
- package/lib/pipe/value/dollar.pipe.d.ts +1 -1
- package/lib/pipe/value/getvalue.pipe.d.ts +2 -2
- package/lib/pipe/value/value.pipe.module.d.ts +9 -1
- package/lib/router/anchor/anchor.d.ts +26 -28
- package/lib/router/anchor/anchor.directive.d.ts +12 -6
- package/lib/router/anchor/clickable.d.ts +3 -3
- package/lib/router/model/model.module.d.ts +8 -1
- package/lib/router/model/model.router.id.directive.d.ts +1 -1
- package/lib/router/model/model.router.key.directive.d.ts +1 -1
- package/lib/router/model/model.router.uid.directive.d.ts +1 -1
- package/lib/router/router/provider/angular/angular.router.service.d.ts +2 -1
- package/lib/router/router/provider/uirouter/index.d.ts +1 -0
- package/lib/router/router/provider/uirouter/uirouter.router.service.d.ts +2 -1
- package/lib/router/router/provider/uirouter/uirouter.router.service.module.d.ts +3 -0
- package/lib/router/router/provider/uirouter/uirouter.router.service.providers.d.ts +7 -0
- package/lib/router/router/transition/transition.watcher.directive.d.ts +1 -1
- package/lib/storage/index.d.ts +1 -1
- package/lib/storage/storage.providers.d.ts +13 -0
- package/lib/subscription/subscription.directive.d.ts +8 -8
- package/lib/util/view.d.ts +8 -0
- package/package.json +8 -8
- package/esm2022/lib/action/directive/state/action.working.component.mjs +0 -34
- package/esm2022/lib/auth/auth.state.module.mjs +0 -22
- package/esm2022/lib/environment/service/environment.mjs +0 -6
- package/esm2022/lib/environment/service/environment.service.mjs +0 -33
- package/esm2022/lib/storage/storage.module.mjs +0 -41
- package/lib/auth/auth.state.module.d.ts +0 -8
- package/lib/storage/storage.module.d.ts +0 -10
- /package/lib/environment/{service/environment.d.ts → environment.d.ts} +0 -0
- /package/lib/environment/{service/environment.service.d.ts → environment.service.d.ts} +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { DbxActionContextStoreSourceInstance } from '../../action.store.source';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
4
|
-
import {
|
|
4
|
+
import { Maybe } from '@dereekb/util';
|
|
5
|
+
import { IsEqualFunction, IsModifiedFunction } from '@dereekb/rxjs';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* Directive that watches a value observable for changes and sets the new value and modified states as necessary.
|
|
8
9
|
*/
|
|
9
|
-
export declare class
|
|
10
|
+
export declare class DbxActionValueStreamDirective<T, O> implements OnInit, OnDestroy {
|
|
10
11
|
readonly source: DbxActionContextStoreSourceInstance<T, O>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
set dbxActionValueStreamModified(dbxActionValueStreamModified: IsModifiedFunction<T>);
|
|
12
|
+
readonly dbxActionValueStream: import("@angular/core").InputSignal<Observable<T>>;
|
|
13
|
+
readonly dbxActionValueStreamIsEqualValue: import("@angular/core").InputSignal<Maybe<IsEqualFunction<T>>>;
|
|
14
|
+
readonly dbxActionValueStreamIsModifiedValue: import("@angular/core").InputSignal<Maybe<IsModifiedFunction<T>>>;
|
|
15
|
+
private readonly _modifiedSub;
|
|
16
|
+
private readonly _triggerSub;
|
|
17
|
+
readonly isModifiedFunction$: Observable<IsModifiedFunction<T>>;
|
|
18
18
|
readonly modifiedValue$: Observable<[boolean, T]>;
|
|
19
19
|
ngOnInit(): void;
|
|
20
20
|
ngOnDestroy(): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
22
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionValueStreamDirective<any, any>, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionValueStreamDirective<any, any>, "[dbxActionValueStream]", never, { "dbxActionValueStream": { "alias": "dbxActionValueStream"; "required": false; "isSignal": true; }; "dbxActionValueStreamIsEqualValue": { "alias": "dbxActionValueStreamIsEqualValue"; "required": false; "isSignal": true; }; "dbxActionValueStreamIsModifiedValue": { "alias": "dbxActionValueStreamIsModifiedValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
23
23
|
}
|
|
@@ -1,33 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IsModifiedFunction } from '@dereekb/rxjs';
|
|
1
|
+
import { OnDestroy, OnInit, Signal } from '@angular/core';
|
|
2
|
+
import { IsEqualFunction, IsModifiedFunction } from '@dereekb/rxjs';
|
|
3
3
|
import { type Maybe } from '@dereekb/util';
|
|
4
4
|
import { DbxActionContextStoreSourceInstance } from '../../action.store.source';
|
|
5
|
-
import {
|
|
5
|
+
import { DbxActionValueGetterValueGetterFunction } from './action.value.trigger.instance';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
export interface DbxActionValueGetterDirectiveComputeInputsConfig<T> {
|
|
8
|
+
readonly valueGetterSignal?: Signal<Maybe<DbxActionValueGetterValueGetterFunction<T>>>;
|
|
9
|
+
readonly isModifiedSignal?: Signal<Maybe<IsModifiedFunction>>;
|
|
10
|
+
readonly isEqualSignal?: Signal<Maybe<IsEqualFunction>>;
|
|
11
|
+
}
|
|
7
12
|
/**
|
|
8
13
|
* Abstract class for directives that may perform an action when trigger is called, and returns a value.
|
|
9
14
|
*/
|
|
10
|
-
export declare abstract class
|
|
15
|
+
export declare abstract class AbstractDbxActionValueGetterDirective<T> implements OnInit, OnDestroy {
|
|
16
|
+
private readonly _injector;
|
|
11
17
|
readonly source: DbxActionContextStoreSourceInstance<T, unknown>;
|
|
12
18
|
private readonly _triggerInstance;
|
|
13
|
-
private _triggeredSub;
|
|
14
|
-
get valueGetter(): Maybe<DbxActionValueOnTriggerFunction<T>>;
|
|
15
|
-
set valueGetter(valueGetter: Maybe<DbxActionValueOnTriggerFunction<T>>);
|
|
16
|
-
get isModifiedFunction(): Maybe<IsModifiedFunction<T>>;
|
|
17
|
-
set isModifiedFunction(isModifiedFunction: Maybe<IsModifiedFunction<T>>);
|
|
18
19
|
ngOnInit(): void;
|
|
19
20
|
ngOnDestroy(): void;
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
setValueGetterFunction(valueGetterFunction: Maybe<DbxActionValueGetterValueGetterFunction<T>>): void;
|
|
22
|
+
protected configureInputs(config: DbxActionValueGetterDirectiveComputeInputsConfig<T>): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbxActionValueGetterDirective<any>, never>;
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxActionValueGetterDirective<any>, never, never, {}, {}, never, never, false, never>;
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
|
-
* Action directive that
|
|
27
|
+
* Action directive that uses a getter function instead and waits for the trigger to be called before calling the function.
|
|
28
|
+
*
|
|
29
|
+
* Similar to DbxActionValueDirective, but the getter is called when a trigger is activated.
|
|
30
|
+
* The DbxActionValueDirective always pipes the latests value while waiting for a trigger, and does not allow using a getter.
|
|
25
31
|
*/
|
|
26
|
-
export declare class DbxActionValueTriggerDirective<T = object> extends
|
|
27
|
-
readonly
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
export declare class DbxActionValueTriggerDirective<T = object> extends AbstractDbxActionValueGetterDirective<T> implements OnDestroy {
|
|
33
|
+
readonly dbxActionValueGetter: import("@angular/core").InputSignal<Maybe<DbxActionValueGetterValueGetterFunction<T>>>;
|
|
34
|
+
readonly dbxActionValueGetterIsModified: import("@angular/core").InputSignal<Maybe<IsModifiedFunction>>;
|
|
35
|
+
readonly dbxActionValueGetterIsEqual: import("@angular/core").InputSignal<Maybe<IsEqualFunction>>;
|
|
30
36
|
constructor();
|
|
31
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionValueTriggerDirective<any>, never>;
|
|
32
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionValueTriggerDirective<any>, "[
|
|
38
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionValueTriggerDirective<any>, "[dbxActionValueGetter]", ["dbxActionValueGetter"], { "dbxActionValueGetter": { "alias": "dbxActionValueGetter"; "required": false; "isSignal": true; }; "dbxActionValueGetterIsModified": { "alias": "dbxActionValueGetterIsModified"; "required": false; "isSignal": true; }; "dbxActionValueGetterIsEqual": { "alias": "dbxActionValueGetterIsEqual"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
33
39
|
}
|
|
@@ -1,34 +1,45 @@
|
|
|
1
1
|
import { Destroyable, Initialized, Maybe, ReadableError } from '@dereekb/util';
|
|
2
|
-
import {
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ObservableOrValue, IsModifiedFunction, IsEqualFunction } from '@dereekb/rxjs';
|
|
3
4
|
import { DbxActionContextStoreSourceInstance } from '../../action.store.source';
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* DbxActionValueGetterInstance function. Returns an ObervableGetter that returns a value.
|
|
6
7
|
*/
|
|
7
|
-
export type
|
|
8
|
-
export interface
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export type DbxActionValueGetterValueGetterFunction<T> = () => ObservableOrValue<Maybe<T>>;
|
|
9
|
+
export interface DbxActionValueGetterResult<T = unknown> {
|
|
10
|
+
/**
|
|
11
|
+
* The value to trigger with
|
|
12
|
+
*/
|
|
13
|
+
readonly value?: Maybe<T>;
|
|
14
|
+
/**
|
|
15
|
+
* The error to reject with
|
|
16
|
+
*/
|
|
17
|
+
readonly reject?: Maybe<ReadableError>;
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
|
-
*
|
|
20
|
+
* DbxActionValueGetterInstance configuration.
|
|
14
21
|
*/
|
|
15
|
-
export interface
|
|
22
|
+
export interface DbxActionValueGetterInstanceConfig<T> {
|
|
16
23
|
readonly source: DbxActionContextStoreSourceInstance<T, unknown>;
|
|
17
|
-
readonly valueGetter?: Maybe<
|
|
24
|
+
readonly valueGetter?: Maybe<DbxActionValueGetterValueGetterFunction<T>>;
|
|
25
|
+
readonly isEqualFunction?: Maybe<IsEqualFunction<T>>;
|
|
18
26
|
readonly isModifiedFunction?: Maybe<IsModifiedFunction<T>>;
|
|
19
27
|
}
|
|
20
28
|
/**
|
|
21
29
|
* Utility class that handles trigger events to retrieve a value.
|
|
22
30
|
*/
|
|
23
|
-
export declare class
|
|
24
|
-
private
|
|
25
|
-
readonly
|
|
31
|
+
export declare class DbxActionValueGetterInstance<T> implements Initialized, Destroyable {
|
|
32
|
+
private readonly _valueGetterFunction;
|
|
33
|
+
readonly valueGetterFunction$: Observable<DbxActionValueGetterValueGetterFunction<T>>;
|
|
34
|
+
private readonly _isModifiedFunction;
|
|
35
|
+
private readonly _isEqualFunction;
|
|
36
|
+
readonly isModifiedFunction$: Observable<IsModifiedFunction<T>>;
|
|
26
37
|
readonly source: DbxActionContextStoreSourceInstance<T, unknown>;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
private readonly _triggeredSub;
|
|
39
|
+
constructor(config: DbxActionValueGetterInstanceConfig<T>);
|
|
40
|
+
setValueGetterFunction(valueGetterFunction: Maybe<DbxActionValueGetterValueGetterFunction<T>>): void;
|
|
41
|
+
setIsModifiedFunction(isModifiedFunction: Maybe<IsModifiedFunction<T>>): void;
|
|
42
|
+
setIsEqualFunction(isEqualFunction: Maybe<IsEqualFunction<T>>): void;
|
|
32
43
|
init(): void;
|
|
33
44
|
destroy(): void;
|
|
34
45
|
}
|
package/lib/action/directive/state/{action.working.component.d.ts → action.working.directive.d.ts}
RENAMED
|
@@ -11,5 +11,5 @@ export declare class DbxActionIsWorkingDirective extends AbstractIfDirective imp
|
|
|
11
11
|
showAfter?: Maybe<number> | '';
|
|
12
12
|
readonly show$: import("rxjs").Observable<boolean>;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionIsWorkingDirective, never>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionIsWorkingDirective, "[dbxActionIsWorking]", never, { "showAfter": { "alias": "dbxActionIsWorking"; "required": false; }; }, {}, never, never,
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionIsWorkingDirective, "[dbxActionIsWorking]", never, { "showAfter": { "alias": "dbxActionIsWorking"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
15
|
}
|
|
@@ -6,7 +6,8 @@ export * from './action.presuccess.directive';
|
|
|
6
6
|
export * from './action.success.directive';
|
|
7
7
|
export * from './action.success.handler.directive';
|
|
8
8
|
export * from './action.value.directive';
|
|
9
|
-
export * from './action.working.
|
|
9
|
+
export * from './action.working.directive';
|
|
10
10
|
export * from './action.enforce.modified.directive';
|
|
11
11
|
export * from './action.value.trigger.directive';
|
|
12
12
|
export * from './action.value.trigger.instance';
|
|
13
|
+
export * from './action.value.stream.directive';
|
|
@@ -2,8 +2,15 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import * as i1 from "./auth.role.has.directive";
|
|
3
3
|
import * as i2 from "./auth.role.any.directive";
|
|
4
4
|
import * as i3 from "./auth.role.not.directive";
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated import the directives directly instead of using this module.
|
|
7
|
+
*
|
|
8
|
+
* @see DbxAuthHasRolesDirective
|
|
9
|
+
* @see DbxAuthHasAnyRoleDirective
|
|
10
|
+
* @see DbxAuthNotAnyRoleDirective
|
|
11
|
+
*/
|
|
5
12
|
export declare class DbxCoreAuthModule {
|
|
6
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxCoreAuthModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxCoreAuthModule, [typeof i1.DbxAuthHasRolesDirective, typeof i2.DbxAuthHasAnyRoleDirective, typeof i3.DbxAuthNotAnyRoleDirective],
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxCoreAuthModule, never, [typeof i1.DbxAuthHasRolesDirective, typeof i2.DbxAuthHasAnyRoleDirective, typeof i3.DbxAuthNotAnyRoleDirective], [typeof i1.DbxAuthHasRolesDirective, typeof i2.DbxAuthHasAnyRoleDirective, typeof i3.DbxAuthNotAnyRoleDirective]>;
|
|
8
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxCoreAuthModule>;
|
|
9
16
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { ProvideDbxAppAuthRouterConfig } from './router/auth.router.providers';
|
|
3
|
+
import { ProvideDbxAppAuthRouterStateConfig } from './router/state/auth.router.state.providers';
|
|
4
|
+
export interface ProvideDbxAppAuthConfig extends ProvideDbxAppAuthRouterConfig, ProvideDbxAppAuthRouterStateConfig {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The "all-in-one" provider for an app's dbx-core auth providers.
|
|
8
|
+
*
|
|
9
|
+
* @param config Configuration
|
|
10
|
+
* @returns EnvironmentProviders
|
|
11
|
+
*/
|
|
12
|
+
export declare function provideDbxAppAuth(config: ProvideDbxAppAuthConfig): EnvironmentProviders;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AuthRole, ArrayOrValue, type Maybe } from '@dereekb/util';
|
|
2
|
-
import {
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import { AbstractIfDirective } from '../view/if.directive';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* Structural decorator directive similar to ngIf that embeds content if the current auth user has any of the target role(s).
|
|
7
7
|
*/
|
|
8
|
-
export declare class DbxAuthHasAnyRoleDirective extends AbstractIfDirective
|
|
9
|
-
private _targetRoles;
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
|
|
8
|
+
export declare class DbxAuthHasAnyRoleDirective extends AbstractIfDirective {
|
|
9
|
+
private readonly _targetRoles;
|
|
10
|
+
private readonly _authService;
|
|
11
|
+
readonly targetRoles$: Observable<Maybe<ArrayOrValue<string>>>;
|
|
12
|
+
readonly show$: Observable<boolean>;
|
|
13
13
|
set targetRoles(roles: Maybe<ArrayOrValue<AuthRole>>);
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAuthHasAnyRoleDirective, never>;
|
|
15
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxAuthHasAnyRoleDirective, "[dbxAuthHasAnyRole]", never, { "targetRoles": { "alias": "dbxAuthHasAnyRole"; "required": false; }; }, {}, never, never,
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxAuthHasAnyRoleDirective, "[dbxAuthHasAnyRole]", never, { "targetRoles": { "alias": "dbxAuthHasAnyRole"; "required": false; }; }, {}, never, never, true, never>;
|
|
16
16
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Maybe, AuthRole, ArrayOrValue } from '@dereekb/util';
|
|
2
|
-
import {
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import { AbstractIfDirective } from '../view/if.directive';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* Structural decorator directive similar to ngIf that embeds content if the current auth user has all of the target role(s).
|
|
7
7
|
*/
|
|
8
|
-
export declare class DbxAuthHasRolesDirective extends AbstractIfDirective
|
|
9
|
-
private _targetRoles;
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
|
|
8
|
+
export declare class DbxAuthHasRolesDirective extends AbstractIfDirective {
|
|
9
|
+
private readonly _targetRoles;
|
|
10
|
+
private readonly _authService;
|
|
11
|
+
readonly targetRoles$: Observable<Maybe<ArrayOrValue<string>>>;
|
|
12
|
+
readonly show$: Observable<boolean>;
|
|
13
13
|
set targetRoles(roles: Maybe<ArrayOrValue<AuthRole>>);
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAuthHasRolesDirective, never>;
|
|
15
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxAuthHasRolesDirective, "[dbxAuthHasRoles]", never, { "targetRoles": { "alias": "dbxAuthHasRoles"; "required": false; }; }, {}, never, never,
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxAuthHasRolesDirective, "[dbxAuthHasRoles]", never, { "targetRoles": { "alias": "dbxAuthHasRoles"; "required": false; }; }, {}, never, never, true, never>;
|
|
16
16
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Maybe, AuthRole, ArrayOrValue } from '@dereekb/util';
|
|
2
|
-
import {
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
3
|
import { AbstractIfDirective } from '../view/if.directive';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* Structural decorator directive similar to ngIf that embeds content if the current auth user has none of the target role(s).
|
|
7
7
|
*/
|
|
8
|
-
export declare class DbxAuthNotAnyRoleDirective extends AbstractIfDirective
|
|
9
|
-
private _targetRoles;
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
|
|
8
|
+
export declare class DbxAuthNotAnyRoleDirective extends AbstractIfDirective {
|
|
9
|
+
private readonly _targetRoles;
|
|
10
|
+
private readonly _authService;
|
|
11
|
+
readonly targetRoles$: Observable<Maybe<ArrayOrValue<string>>>;
|
|
12
|
+
readonly show$: Observable<boolean>;
|
|
13
13
|
set targetRoles(roles: Maybe<ArrayOrValue<AuthRole>>);
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAuthNotAnyRoleDirective, never>;
|
|
15
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxAuthNotAnyRoleDirective, "[dbxAuthNotAnyRole]", never, { "targetRoles": { "alias": "dbxAuthNotAnyRole"; "required": false; }; }, {}, never, never,
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxAuthNotAnyRoleDirective, "[dbxAuthNotAnyRole]", never, { "targetRoles": { "alias": "dbxAuthNotAnyRole"; "required": false; }; }, {}, never, never, true, never>;
|
|
16
16
|
}
|
package/lib/auth/index.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ export * from './service';
|
|
|
3
3
|
export * from './state';
|
|
4
4
|
export * from './auth.user';
|
|
5
5
|
export * from './auth.module';
|
|
6
|
+
export * from './auth.providers';
|
|
6
7
|
export * from './auth.role.any.directive';
|
|
7
8
|
export * from './auth.role.has.directive';
|
|
8
9
|
export * from './auth.role.not.directive';
|
|
9
|
-
export * from './auth.state.
|
|
10
|
+
export * from './auth.state.providers';
|
|
10
11
|
export * from './auth.state.service';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { DbxAppAuthRoutes } from './auth.router';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for provideDbxAppAuthRouter().
|
|
5
|
+
*/
|
|
6
|
+
export interface ProvideDbxAppAuthRouterConfig {
|
|
7
|
+
/**
|
|
8
|
+
* DbxAppAuthRoutes configuration.
|
|
9
|
+
*/
|
|
10
|
+
readonly dbxAppAuthRoutes: DbxAppAuthRoutes;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Creates EnvironmentProviders for providing DbxAppAuthRoutes configuration.
|
|
14
|
+
*
|
|
15
|
+
* @param config Configuration
|
|
16
|
+
* @returns EnvironmentProviders
|
|
17
|
+
*/
|
|
18
|
+
export declare function provideDbxAppAuthRouter(config: ProvideDbxAppAuthRouterConfig): EnvironmentProviders;
|
|
@@ -2,13 +2,15 @@ import { ModuleWithProviders } from '@angular/core';
|
|
|
2
2
|
import { ArrayOrValue } from '@dereekb/util';
|
|
3
3
|
import { DbxAppContextState } from '../../../context';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@ngrx/effects";
|
|
6
5
|
export interface DbxAppAuthRouterStateModuleConfig {
|
|
7
6
|
readonly activeRoutesToApplyEffects: ArrayOrValue<DbxAppContextState>;
|
|
8
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use provideDbxAppAuthRouterState() instead.
|
|
10
|
+
*/
|
|
9
11
|
export declare class DbxAppAuthRouterStateModule {
|
|
10
12
|
static forRoot(config: DbxAppAuthRouterStateModuleConfig): ModuleWithProviders<DbxAppAuthRouterStateModule>;
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAppAuthRouterStateModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxAppAuthRouterStateModule, never,
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxAppAuthRouterStateModule, never, never, never>;
|
|
13
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxAppAuthRouterStateModule>;
|
|
14
16
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { ArrayOrValue } from '@dereekb/util';
|
|
3
|
+
import { DbxAppContextState } from '../../../context';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for provideDbxAppAuthRouterState().
|
|
6
|
+
*/
|
|
7
|
+
export interface ProvideDbxAppAuthRouterStateConfig {
|
|
8
|
+
/**
|
|
9
|
+
* Active routes to apply effects to.
|
|
10
|
+
*/
|
|
11
|
+
readonly activeRoutesToApplyEffects: ArrayOrValue<DbxAppContextState>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates EnvironmentProviders for providing DbxAppAuthRouterState configuration and effects.
|
|
15
|
+
*
|
|
16
|
+
* @param config Configuration
|
|
17
|
+
* @returns EnvironmentProviders
|
|
18
|
+
*/
|
|
19
|
+
export declare function provideDbxAppAuthRouterState(config: ProvideDbxAppAuthRouterStateConfig): EnvironmentProviders;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Action for when the user has logged in.
|
|
3
3
|
*/
|
|
4
|
-
export declare const loggedIn: import("@ngrx/store").ActionCreator<"[App/Auth] Auth Logged In", () => import("@ngrx/store
|
|
4
|
+
export declare const loggedIn: import("@ngrx/store").ActionCreator<"[App/Auth] Auth Logged In", () => import("@ngrx/store").Action<"[App/Auth] Auth Logged In">>;
|
|
5
5
|
/**
|
|
6
6
|
* Action for when the user has logged out.
|
|
7
7
|
*/
|
|
8
|
-
export declare const loggedOut: import("@ngrx/store").ActionCreator<"[App/Auth] Auth Logged Out", () => import("@ngrx/store
|
|
8
|
+
export declare const loggedOut: import("@ngrx/store").ActionCreator<"[App/Auth] Auth Logged Out", () => import("@ngrx/store").Action<"[App/Auth] Auth Logged Out">>;
|
|
9
9
|
/**
|
|
10
10
|
* Action to log the user out.
|
|
11
11
|
*/
|
|
12
|
-
export declare const logout: import("@ngrx/store").ActionCreator<"[App/Auth] Auth Logout", () => import("@ngrx/store
|
|
12
|
+
export declare const logout: import("@ngrx/store").ActionCreator<"[App/Auth] Auth Logout", () => import("@ngrx/store").Action<"[App/Auth] Auth Logout">>;
|
|
@@ -7,7 +7,7 @@ export declare const setUserIdentifier: import("@ngrx/store").ActionCreator<"[Ap
|
|
|
7
7
|
id: AuthUserIdentifier;
|
|
8
8
|
}) => {
|
|
9
9
|
id: AuthUserIdentifier;
|
|
10
|
-
} & import("@ngrx/store
|
|
10
|
+
} & import("@ngrx/store").Action<"[App/Auth] Set User Identifier">>;
|
|
11
11
|
/**
|
|
12
12
|
* Sets the user's state in the auth.
|
|
13
13
|
*/
|
|
@@ -15,7 +15,7 @@ export declare const setUserState: import("@ngrx/store").ActionCreator<"[App/Aut
|
|
|
15
15
|
state: AuthUserState;
|
|
16
16
|
}) => {
|
|
17
17
|
state: AuthUserState;
|
|
18
|
-
} & import("@ngrx/store
|
|
18
|
+
} & import("@ngrx/store").Action<"[App/Auth] Set User State">>;
|
|
19
19
|
/**
|
|
20
20
|
* Sets the user's roles in the auth.
|
|
21
21
|
*/
|
|
@@ -23,7 +23,7 @@ export declare const setUserRoles: import("@ngrx/store").ActionCreator<"[App/Aut
|
|
|
23
23
|
roles: AuthRole[];
|
|
24
24
|
}) => {
|
|
25
25
|
roles: AuthRole[];
|
|
26
|
-
} & import("@ngrx/store
|
|
26
|
+
} & import("@ngrx/store").Action<"[App/Auth] Set User Roles">>;
|
|
27
27
|
/**
|
|
28
28
|
* Sets the user's onboarding state.
|
|
29
29
|
*/
|
|
@@ -31,4 +31,4 @@ export declare const setUserIsOnboarded: import("@ngrx/store").ActionCreator<"[A
|
|
|
31
31
|
isOnboarded: boolean;
|
|
32
32
|
}) => {
|
|
33
33
|
isOnboarded: boolean;
|
|
34
|
-
} & import("@ngrx/store
|
|
34
|
+
} & import("@ngrx/store").Action<"[App/Auth] Set User Is Onboarded">>;
|
|
@@ -8,21 +8,21 @@ export declare class DbxAppAuthEffects {
|
|
|
8
8
|
private readonly dbxAuthService;
|
|
9
9
|
protected readonly actions$: Actions<any>;
|
|
10
10
|
protected readonly store: Store<any>;
|
|
11
|
-
readonly emitLoggedIn: import("rxjs").Observable<import("@ngrx/store
|
|
12
|
-
readonly emitLoggedOut: import("rxjs").Observable<import("@ngrx/store
|
|
13
|
-
readonly forwardLogoutToAuthService: import("rxjs").Observable<import("@ngrx/store
|
|
11
|
+
readonly emitLoggedIn: import("rxjs").Observable<import("@ngrx/store").Action<"[App/Auth] Auth Logged In">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
12
|
+
readonly emitLoggedOut: import("rxjs").Observable<import("@ngrx/store").Action<"[App/Auth] Auth Logged Out">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
13
|
+
readonly forwardLogoutToAuthService: import("rxjs").Observable<import("@ngrx/store").Action<"[App/Auth] Auth Logout">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
14
14
|
readonly setUserIdentifier: import("rxjs").Observable<{
|
|
15
|
-
id:
|
|
16
|
-
} & import("@ngrx/store
|
|
15
|
+
id: import("@dereekb/dbx-core").AuthUserIdentifier;
|
|
16
|
+
} & import("@ngrx/store").Action<"[App/Auth] Set User Identifier">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
17
17
|
readonly setUserState: import("rxjs").Observable<{
|
|
18
18
|
state: import("@dereekb/dbx-core").AuthUserState;
|
|
19
|
-
} & import("@ngrx/store
|
|
19
|
+
} & import("@ngrx/store").Action<"[App/Auth] Set User State">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
20
20
|
readonly setUserRoles: import("rxjs").Observable<{
|
|
21
|
-
roles:
|
|
22
|
-
} & import("@ngrx/store
|
|
21
|
+
roles: import("dist/packages/util/src").AuthRole[];
|
|
22
|
+
} & import("@ngrx/store").Action<"[App/Auth] Set User Roles">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
23
23
|
readonly setUserIsOnboarded: import("rxjs").Observable<{
|
|
24
24
|
isOnboarded: boolean;
|
|
25
|
-
} & import("@ngrx/store
|
|
25
|
+
} & import("@ngrx/store").Action<"[App/Auth] Set User Is Onboarded">> & import("@ngrx/effects").CreateEffectMetadata;
|
|
26
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAppAuthEffects, never>;
|
|
27
27
|
static ɵprov: i0.ɵɵInjectableDeclaration<DbxAppAuthEffects>;
|
|
28
28
|
}
|
|
@@ -8,4 +8,4 @@ export interface DbxAppAuthStateUser {
|
|
|
8
8
|
userRoles: AuthRole[];
|
|
9
9
|
}
|
|
10
10
|
export declare const initialState: DbxAppAuthStateUser;
|
|
11
|
-
export declare const reducer: import("@ngrx/store").ActionReducer<DbxAppAuthStateUser, import("@ngrx/store").Action
|
|
11
|
+
export declare const reducer: import("@ngrx/store").ActionReducer<DbxAppAuthStateUser, import("@ngrx/store").Action<string>>;
|
|
@@ -5,11 +5,10 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
* Context used for linking a button to an ActionContext.
|
|
6
6
|
*/
|
|
7
7
|
export declare class DbxActionButtonDirective extends DbxActionButtonTriggerDirective implements OnInit, OnDestroy {
|
|
8
|
-
private readonly
|
|
9
|
-
private
|
|
10
|
-
private _disabledSub;
|
|
8
|
+
private readonly _workingSub;
|
|
9
|
+
private readonly _disabledSub;
|
|
11
10
|
ngOnInit(): void;
|
|
12
11
|
ngOnDestroy(): void;
|
|
13
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionButtonDirective, never>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionButtonDirective, "[dbxActionButton]", never, {}, {}, never, never,
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionButtonDirective, "[dbxActionButton]", never, {}, {}, never, never, true, never>;
|
|
15
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { AbstractSubscriptionDirective } from '../../subscription';
|
|
2
|
+
import { AbstractSubscriptionDirective } from '../../subscription/subscription.directive';
|
|
3
3
|
import { DbxButton } from '../button';
|
|
4
4
|
import { DbxActionContextStoreSourceInstance } from '../../action/action.store.source';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -12,5 +12,5 @@ export declare class DbxActionButtonTriggerDirective extends AbstractSubscriptio
|
|
|
12
12
|
ngOnInit(): void;
|
|
13
13
|
protected _buttonClicked(): void;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionButtonTriggerDirective, never>;
|
|
15
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionButtonTriggerDirective, "[dbxActionButtonTrigger]", never, {}, {}, never, never,
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionButtonTriggerDirective, "[dbxActionButtonTrigger]", never, {}, {}, never, never, true, never>;
|
|
16
16
|
}
|
package/lib/button/button.d.ts
CHANGED
|
@@ -15,44 +15,85 @@ export interface DbxButtonInterceptor {
|
|
|
15
15
|
/**
|
|
16
16
|
* Text and icon display content for a button.
|
|
17
17
|
*/
|
|
18
|
-
export interface
|
|
18
|
+
export interface DbxButtonDisplay {
|
|
19
19
|
/**
|
|
20
20
|
* button Icon, if applicable
|
|
21
21
|
*/
|
|
22
|
-
icon?: Maybe<string>;
|
|
22
|
+
readonly icon?: Maybe<string>;
|
|
23
23
|
/**
|
|
24
24
|
* button text, if applicable
|
|
25
25
|
*/
|
|
26
|
-
text?: Maybe<string>;
|
|
26
|
+
readonly text?: Maybe<string>;
|
|
27
27
|
}
|
|
28
|
-
export declare abstract class DbxButton
|
|
28
|
+
export declare abstract class DbxButton {
|
|
29
|
+
/**
|
|
30
|
+
* Observable of the disabled state of the button.
|
|
31
|
+
*/
|
|
29
32
|
abstract readonly disabled$: Observable<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Observable of the working state of the button.
|
|
35
|
+
*/
|
|
30
36
|
abstract readonly working$: Observable<boolean>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
abstract text?: Maybe<string>;
|
|
37
|
+
/**
|
|
38
|
+
* Observable of the clicked event of the button.
|
|
39
|
+
*/
|
|
35
40
|
abstract readonly clicked$: Observable<unknown>;
|
|
41
|
+
/**
|
|
42
|
+
* Observable of the display content of the button.
|
|
43
|
+
*/
|
|
44
|
+
abstract readonly display$: Observable<DbxButtonDisplay>;
|
|
45
|
+
/**
|
|
46
|
+
* Sets the disabled state of the button. If null/undefined the button will be disabled.
|
|
47
|
+
*
|
|
48
|
+
* @param disabled
|
|
49
|
+
*/
|
|
50
|
+
abstract setDisabled(disabled?: Maybe<boolean>): void;
|
|
51
|
+
/**
|
|
52
|
+
* Sets the working state of the button. IF null/undefined the button will be marked as working.
|
|
53
|
+
*
|
|
54
|
+
* @param working
|
|
55
|
+
*/
|
|
56
|
+
abstract setWorking(working?: Maybe<boolean>): void;
|
|
57
|
+
/**
|
|
58
|
+
* Sets the display content of the button.
|
|
59
|
+
*
|
|
60
|
+
* @param content
|
|
61
|
+
*/
|
|
62
|
+
abstract setDisplayContent(content: DbxButtonDisplay): void;
|
|
63
|
+
/**
|
|
64
|
+
* Sets the button interceptor. If any interceptor is already set, it is replaced.
|
|
65
|
+
*
|
|
66
|
+
* @param interceptor
|
|
67
|
+
*/
|
|
36
68
|
abstract setButtonInterceptor(interceptor: DbxButtonInterceptor): void;
|
|
69
|
+
/**
|
|
70
|
+
* Main function to use for handling clicks on the button.
|
|
71
|
+
*/
|
|
37
72
|
abstract clickButton(): void;
|
|
38
73
|
}
|
|
39
74
|
export declare function provideDbxButton<S extends DbxButton>(sourceType: Type<S>): Provider[];
|
|
40
|
-
export type DbxButtonDisplayContentType = 'text_button' | 'icon_button';
|
|
41
75
|
/**
|
|
42
|
-
*
|
|
76
|
+
* The display type of a button.
|
|
77
|
+
*
|
|
78
|
+
* text_button: A text button has text or is empty.
|
|
79
|
+
* icon_button: An icon button only has an icon and no text.
|
|
80
|
+
*/
|
|
81
|
+
export type DbxButtonDisplayType = 'text_button' | 'icon_button';
|
|
82
|
+
/**
|
|
83
|
+
* Delegate class used for retrieving the DbxButtonDisplay given an input value.
|
|
43
84
|
*/
|
|
44
85
|
export interface DbxButtonDisplayDelegate<T> {
|
|
45
86
|
/**
|
|
46
|
-
* Returns the
|
|
87
|
+
* Returns the DbxButtonDisplay for the input value.
|
|
47
88
|
*
|
|
48
89
|
* @param value
|
|
49
90
|
*/
|
|
50
|
-
buttonDisplayContentForValue(value: T):
|
|
91
|
+
buttonDisplayContentForValue(value: T): DbxButtonDisplay;
|
|
51
92
|
}
|
|
52
93
|
/**
|
|
53
|
-
* Returns the
|
|
94
|
+
* Returns the DbxButtonDisplayType given the input content.
|
|
54
95
|
*
|
|
55
96
|
* @param content
|
|
56
97
|
* @returns
|
|
57
98
|
*/
|
|
58
|
-
export declare function
|
|
99
|
+
export declare function dbxButtonDisplayType(content: DbxButtonDisplay): DbxButtonDisplayType;
|