@dereekb/dbx-core 4.1.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/action/action.handler.mjs +1 -1
- package/esm2020/lib/action/action.holder.mjs +1 -1
- package/esm2020/lib/action/action.machine.mjs +2 -2
- package/esm2020/lib/action/action.reference.mjs +1 -1
- package/esm2020/lib/action/action.store.mjs +3 -3
- package/esm2020/lib/action/action.store.source.mjs +5 -5
- package/esm2020/lib/action/directive/auto/action.automodify.directive.mjs +3 -6
- package/esm2020/lib/action/directive/auto/action.autotrigger.directive.mjs +3 -6
- package/esm2020/lib/action/directive/context/action.directive.mjs +4 -4
- package/esm2020/lib/action/directive/context/action.source.directive.mjs +5 -6
- package/esm2020/lib/action/directive/map/action.map.directive.mjs +3 -4
- package/esm2020/lib/action/directive/map/action.map.key.directive.mjs +5 -6
- package/esm2020/lib/action/directive/map/action.map.mjs +1 -1
- package/esm2020/lib/action/directive/state/action.disabled.directive.mjs +2 -3
- package/esm2020/lib/action/directive/state/action.handler.directive.mjs +2 -3
- package/esm2020/lib/action/directive/state/action.success.directive.mjs +1 -1
- package/esm2020/lib/action/directive/state/action.success.handler.directive.mjs +2 -3
- package/esm2020/lib/action/directive/state/action.value.directive.mjs +2 -3
- package/esm2020/lib/action/directive/state/action.value.stream.directive.mjs +4 -5
- package/esm2020/lib/action/directive/state/action.value.trigger.directive.mjs +2 -3
- package/esm2020/lib/action/directive/state/action.value.trigger.instance.mjs +4 -3
- package/esm2020/lib/action/directive/state/action.working.component.mjs +1 -1
- 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/router/provider/uirouter/hook.mjs +3 -2
- package/esm2020/lib/auth/router/provider/uirouter/redirect.mjs +1 -1
- package/esm2020/lib/auth/service/auth.service.rxjs.mjs +3 -3
- package/esm2020/lib/auth/state/reducer/user.reducer.mjs +1 -1
- package/esm2020/lib/button/action/action.button.directive.mjs +1 -1
- package/esm2020/lib/button/button.directive.mjs +5 -6
- package/esm2020/lib/button/button.mjs +2 -2
- package/esm2020/lib/button/router/button.segue.directive.mjs +2 -3
- package/esm2020/lib/context/state/effect/index.mjs +1 -1
- package/esm2020/lib/filter/filter.abstract.connector.directive.mjs +3 -2
- package/esm2020/lib/filter/filter.connector.directive.mjs +6 -6
- package/esm2020/lib/filter/filter.content.mjs +3 -3
- package/esm2020/lib/filter/filter.map.connector.directive.mjs +6 -6
- package/esm2020/lib/filter/filter.map.instance.directive.mjs +2 -3
- package/esm2020/lib/filter/filter.map.source.directive.mjs +4 -4
- package/esm2020/lib/filter/filter.source.directive.mjs +4 -4
- package/esm2020/lib/injection/injection.context.directive.mjs +4 -4
- package/esm2020/lib/injection/injection.context.forward.directive.mjs +1 -1
- package/esm2020/lib/injection/injection.context.mjs +2 -2
- package/esm2020/lib/injection/injection.directive.mjs +1 -1
- package/esm2020/lib/injection/injection.instance.mjs +3 -4
- package/esm2020/lib/injection/injection.mjs +1 -1
- package/esm2020/lib/ngrx/store.lockset.mjs +1 -1
- package/esm2020/lib/pipe/date/datedistance.pipe.mjs +4 -7
- package/esm2020/lib/pipe/date/dateformatdistance.pipe.mjs +1 -1
- package/esm2020/lib/pipe/date/datefromtoformat.pipe.mjs +4 -4
- package/esm2020/lib/pipe/date/timedistance.pipe.mjs +1 -1
- package/esm2020/lib/pipe/date/tojsdate.pipe.mjs +1 -1
- package/esm2020/lib/pipe/misc/prettyjson.pipe.mjs +1 -1
- package/esm2020/lib/router/anchor/anchor.directive.mjs +3 -4
- package/esm2020/lib/router/anchor/anchor.mjs +2 -2
- package/esm2020/lib/router/router/provider/angular/angular.router.service.mjs +2 -2
- package/esm2020/lib/router/router/provider/uirouter/index.mjs +1 -2
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.mjs +7 -14
- package/esm2020/lib/router/router/service/router.go.mjs +1 -1
- package/esm2020/lib/router/router/transition/transition.directive.mjs +1 -1
- package/esm2020/lib/router/segue.mjs +15 -3
- package/esm2020/lib/storage/storage.accessor.mjs +1 -1
- package/esm2020/lib/storage/storage.accessor.simple.mjs +2 -2
- package/esm2020/lib/storage/storage.accessor.string.mjs +4 -5
- package/esm2020/lib/subscription/subscription.directive.mjs +1 -1
- package/esm2020/lib/util/view.mjs +2 -2
- package/esm2020/lib/view/if.directive.mjs +1 -1
- package/fesm2015/dereekb-dbx-core.mjs +126 -164
- package/fesm2015/dereekb-dbx-core.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-core.mjs +126 -163
- package/fesm2020/dereekb-dbx-core.mjs.map +1 -1
- package/lib/action/action.handler.d.ts +8 -4
- package/lib/action/action.holder.d.ts +3 -3
- package/lib/action/action.machine.d.ts +2 -2
- package/lib/action/action.reference.d.ts +1 -1
- package/lib/action/action.store.d.ts +3 -3
- package/lib/action/action.store.source.d.ts +9 -10
- package/lib/action/directive/auto/action.autotrigger.directive.d.ts +4 -4
- package/lib/action/directive/context/action.directive.d.ts +2 -2
- package/lib/action/directive/context/action.source.directive.d.ts +1 -1
- package/lib/action/directive/map/action.map.d.ts +1 -1
- package/lib/action/directive/map/action.map.directive.d.ts +5 -6
- package/lib/action/directive/map/action.map.key.directive.d.ts +1 -1
- package/lib/action/directive/state/action.handler.directive.d.ts +5 -5
- package/lib/action/directive/state/action.success.directive.d.ts +1 -1
- package/lib/action/directive/state/action.value.directive.d.ts +2 -2
- package/lib/action/directive/state/action.value.stream.directive.d.ts +2 -3
- package/lib/action/directive/state/action.value.trigger.directive.d.ts +4 -4
- package/lib/action/directive/state/action.value.trigger.instance.d.ts +5 -5
- package/lib/action/directive/state/action.working.component.d.ts +1 -1
- package/lib/auth/auth.role.any.directive.d.ts +2 -3
- package/lib/auth/auth.role.has.directive.d.ts +2 -3
- package/lib/auth/router/provider/uirouter/hook.d.ts +2 -1
- package/lib/button/button.d.ts +2 -2
- package/lib/button/router/button.segue.directive.d.ts +1 -1
- package/lib/context/state/effect/index.d.ts +1 -1
- package/lib/filter/filter.abstract.connector.directive.d.ts +2 -3
- package/lib/filter/filter.connector.directive.d.ts +1 -1
- package/lib/filter/filter.content.d.ts +2 -2
- package/lib/filter/filter.map.instance.directive.d.ts +1 -1
- package/lib/injection/injection.context.d.ts +3 -3
- package/lib/injection/injection.context.directive.d.ts +3 -3
- package/lib/injection/injection.context.forward.directive.d.ts +1 -1
- package/lib/injection/injection.d.ts +5 -5
- package/lib/injection/injection.directive.d.ts +2 -2
- package/lib/pipe/date/datedistance.pipe.d.ts +1 -1
- package/lib/pipe/date/datefromtoformat.pipe.d.ts +1 -1
- package/lib/pipe/date/tojsdate.pipe.d.ts +1 -0
- package/lib/pipe/misc/prettyjson.pipe.d.ts +2 -2
- package/lib/router/anchor/anchor.d.ts +1 -1
- package/lib/router/anchor/anchor.directive.d.ts +0 -1
- package/lib/router/router/provider/uirouter/index.d.ts +0 -1
- package/lib/router/router/provider/uirouter/uirouter.router.service.d.ts +0 -1
- package/lib/router/router/service/router.go.d.ts +2 -2
- package/lib/router/segue.d.ts +13 -10
- package/lib/storage/storage.accessor.d.ts +1 -1
- package/lib/storage/storage.accessor.simple.d.ts +8 -5
- package/lib/storage/storage.accessor.string.d.ts +1 -1
- package/lib/util/view.d.ts +1 -1
- package/lib/view/if.directive.d.ts +3 -3
- package/package.json +5 -5
- package/esm2020/lib/router/router/provider/uirouter/util/future.mjs +0 -38
- package/esm2020/lib/router/router/provider/uirouter/util/index.mjs +0 -2
- package/lib/router/router/provider/uirouter/util/future.d.ts +0 -1
- package/lib/router/router/provider/uirouter/util/index.d.ts +0 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import { Maybe, ReadableError } from '@dereekb/util';
|
|
1
2
|
import { DbxActionContextStoreSourceInstance } from './action.store.source';
|
|
2
|
-
import {
|
|
3
|
+
import { WorkUsingContext, WorkUsingObservable, WorkInstanceDelegate } from '@dereekb/rxjs';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
3
5
|
/**
|
|
4
6
|
* WorkInstanceDelegate implementation using an DbxActionContextStoreSourceInstance.
|
|
5
7
|
*/
|
|
6
|
-
export declare class DbxActionWorkInstanceDelegate<T =
|
|
8
|
+
export declare class DbxActionWorkInstanceDelegate<T = unknown, O = unknown> implements WorkInstanceDelegate<O> {
|
|
7
9
|
readonly source: DbxActionContextStoreSourceInstance<T, O>;
|
|
8
10
|
constructor(source: DbxActionContextStoreSourceInstance<T, O>);
|
|
9
11
|
startWorking(): void;
|
|
10
12
|
success(result: O): void;
|
|
11
|
-
reject(error:
|
|
13
|
+
reject(error: Maybe<ReadableError | Observable<ReadableError>>): void;
|
|
12
14
|
}
|
|
13
|
-
export declare type
|
|
15
|
+
export declare type HandleActionWithFunctionOrContext<T = unknown, O = unknown> = HandleActionFunction<T, O> | HandleActionWithContext<T, O>;
|
|
16
|
+
export declare type HandleActionFunction<T = unknown, O = unknown> = WorkUsingObservable<T, O>;
|
|
17
|
+
export declare type HandleActionWithContext<T = unknown, O = unknown> = WorkUsingContext<T, O>;
|
|
@@ -7,15 +7,15 @@ import { DbxActionDisabledKey } from './action';
|
|
|
7
7
|
/**
|
|
8
8
|
* Abstract class that can either use SecondaryActionContextStoreSource or create it's own.
|
|
9
9
|
*/
|
|
10
|
-
export declare class DbxActionContextBaseSource<T =
|
|
11
|
-
readonly inputSource?: SecondaryActionContextStoreSource<
|
|
10
|
+
export declare class DbxActionContextBaseSource<T = unknown, O = unknown> implements ActionContextStoreSource<T, O>, Destroyable {
|
|
11
|
+
readonly inputSource?: SecondaryActionContextStoreSource<T, O> | undefined;
|
|
12
12
|
private readonly _store?;
|
|
13
13
|
private readonly _store$;
|
|
14
14
|
private readonly _instance;
|
|
15
15
|
readonly isModified$: Observable<boolean>;
|
|
16
16
|
readonly triggered$: Observable<boolean>;
|
|
17
17
|
readonly success$: Observable<Maybe<O>>;
|
|
18
|
-
constructor(inputSource?: SecondaryActionContextStoreSource<
|
|
18
|
+
constructor(inputSource?: SecondaryActionContextStoreSource<T, O> | undefined);
|
|
19
19
|
destroy(): void;
|
|
20
20
|
get lockSet(): LockSet;
|
|
21
21
|
get sourceInstance(): DbxActionContextStoreSourceInstance<T, O>;
|
|
@@ -6,7 +6,7 @@ import { Destroyable, Maybe } from '@dereekb/util';
|
|
|
6
6
|
/**
|
|
7
7
|
* DbxActionContextMachine configuration.
|
|
8
8
|
*/
|
|
9
|
-
export interface DbxActionContextMachineConfig<T =
|
|
9
|
+
export interface DbxActionContextMachineConfig<T = unknown, O = unknown> {
|
|
10
10
|
/**
|
|
11
11
|
* Whether or not the machine should clean itself up after being triggered once.
|
|
12
12
|
*/
|
|
@@ -25,7 +25,7 @@ export interface DbxActionContextMachineConfig<T = any, O = any> {
|
|
|
25
25
|
*
|
|
26
26
|
* It can be configured to activate only once before cleaning itself up. It can be used directly as a DbxActionContextSourceReference in cases where it is created as a one-off action.
|
|
27
27
|
*/
|
|
28
|
-
export declare class DbxActionContextMachine<T =
|
|
28
|
+
export declare class DbxActionContextMachine<T = unknown, O = unknown> extends DbxActionContextBaseSource<T, O> implements DbxActionContextSourceReference<T, O>, Destroyable {
|
|
29
29
|
readonly config: DbxActionContextMachineConfig<T, O>;
|
|
30
30
|
private _isShutdown;
|
|
31
31
|
private _handleValueReadySub;
|
|
@@ -5,7 +5,7 @@ import { DbxActionContextStoreSourceInstance } from "./action.store.source";
|
|
|
5
5
|
*
|
|
6
6
|
* This is used in cases where the action is passed around and the context it is passed to needs to clean up.
|
|
7
7
|
*/
|
|
8
|
-
export interface DbxActionContextSourceReference<T =
|
|
8
|
+
export interface DbxActionContextSourceReference<T = unknown, O = unknown> extends Destroyable {
|
|
9
9
|
readonly sourceInstance: DbxActionContextStoreSourceInstance<T, O>;
|
|
10
10
|
}
|
|
11
11
|
export declare function makeDbxActionContextSourceReference<T, O>(sourceInstance: DbxActionContextStoreSourceInstance<T, O>): DbxActionContextSourceReference<T, O>;
|
|
@@ -14,9 +14,9 @@ export declare function canTriggerAction(state: ActionContextState): boolean;
|
|
|
14
14
|
export declare function canReadyValue(state: ActionContextState): boolean;
|
|
15
15
|
export declare function actionContextIsModifiedAndCanTrigger(state: ActionContextState): boolean;
|
|
16
16
|
export declare function actionContextHasNoErrorAndIsModifiedAndCanTrigger(state: ActionContextState): boolean;
|
|
17
|
-
export declare function loadingStateForActionContextState<O>(state: ActionContextState): LoadingState<O>;
|
|
17
|
+
export declare function loadingStateForActionContextState<O = unknown>(state: ActionContextState<unknown, O>): LoadingState<O>;
|
|
18
18
|
export declare function loadingStateTypeForActionContextState(state: ActionContextState): LoadingStateType;
|
|
19
|
-
export interface ActionContextState<T =
|
|
19
|
+
export interface ActionContextState<T = unknown, O = unknown> {
|
|
20
20
|
actionState: DbxActionState;
|
|
21
21
|
isModified: boolean;
|
|
22
22
|
/**
|
|
@@ -40,7 +40,7 @@ export interface ActionContextState<T = any, O = any> {
|
|
|
40
40
|
*/
|
|
41
41
|
errorCount?: number;
|
|
42
42
|
}
|
|
43
|
-
export declare class ActionContextStore<T =
|
|
43
|
+
export declare class ActionContextStore<T = unknown, O = unknown> extends ComponentStore<ActionContextState<T, O>> implements OnDestroy {
|
|
44
44
|
readonly lockSet: LockSet;
|
|
45
45
|
constructor();
|
|
46
46
|
readonly actionState$: Observable<DbxActionState>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Observable, Subscription } from 'rxjs';
|
|
2
|
-
import { Provider, Type } from '@angular/core';
|
|
2
|
+
import { Provider, Type, OnDestroy } from '@angular/core';
|
|
3
3
|
import { LockSet, LoadingState, LoadingStateType } from '@dereekb/rxjs';
|
|
4
|
-
import { OnDestroy } from '@angular/core';
|
|
5
4
|
import { Maybe, ReadableError } from '@dereekb/util';
|
|
6
5
|
import { ActionContextState, ActionContextStore } from './action.store';
|
|
7
6
|
import { DbxActionDisabledKey, DbxActionState } from './action';
|
|
@@ -9,7 +8,7 @@ import * as i0 from "@angular/core";
|
|
|
9
8
|
/**
|
|
10
9
|
* Source that provides a ActionContextStore observable.
|
|
11
10
|
*/
|
|
12
|
-
export declare abstract class ActionContextStoreSource<T =
|
|
11
|
+
export declare abstract class ActionContextStoreSource<T = unknown, O = unknown> {
|
|
13
12
|
/**
|
|
14
13
|
* Observable referencing the ActionContextStore.
|
|
15
14
|
*
|
|
@@ -20,20 +19,20 @@ export declare abstract class ActionContextStoreSource<T = any, O = any> {
|
|
|
20
19
|
/**
|
|
21
20
|
* Secondary source. Used by DbxActionContextComponent to find secondary sources.
|
|
22
21
|
*/
|
|
23
|
-
export declare abstract class SecondaryActionContextStoreSource<T =
|
|
22
|
+
export declare abstract class SecondaryActionContextStoreSource<T = unknown, O = unknown> extends ActionContextStoreSource<T, O> {
|
|
24
23
|
}
|
|
25
24
|
export declare function actionContextStoreSourcePipe<T, O>(obs: Observable<Maybe<ActionContextStore<T, O>>>): Observable<ActionContextStore<T, O>>;
|
|
26
25
|
export declare type PipeActionStoreFunction<R, T, O> = (store: ActionContextStore<T, O>) => Observable<R>;
|
|
27
|
-
export declare function pipeActionStore<R =
|
|
26
|
+
export declare function pipeActionStore<R = unknown, T = unknown, O = unknown>(source: ActionContextStoreSource<T, O>, pipeFn: PipeActionStoreFunction<R, T, O>): Observable<R>;
|
|
28
27
|
export declare type UseActionStoreFunction<T, O> = (store: ActionContextStore<T, O>) => void;
|
|
29
28
|
/**
|
|
30
29
|
* Convenience function for subscribing to the input source once and using the provided store.
|
|
31
30
|
*/
|
|
32
|
-
export declare function useActionStore<T =
|
|
31
|
+
export declare function useActionStore<T = unknown, O = unknown>(source: ActionContextStoreSource<T, O>, useFn: UseActionStoreFunction<T, O>): Subscription;
|
|
33
32
|
/**
|
|
34
33
|
* Service that wraps a ActionContextStoreSource.
|
|
35
34
|
*/
|
|
36
|
-
export declare class DbxActionContextStoreSourceInstance<T =
|
|
35
|
+
export declare class DbxActionContextStoreSourceInstance<T = unknown, O = unknown> implements ActionContextStoreSource<T, O>, OnDestroy {
|
|
37
36
|
readonly source: ActionContextStoreSource<T, O>;
|
|
38
37
|
readonly lockSet: LockSet;
|
|
39
38
|
constructor(source: ActionContextStoreSource<T, O>);
|
|
@@ -71,9 +70,9 @@ export declare class DbxActionContextStoreSourceInstance<T = any, O = any> imple
|
|
|
71
70
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionContextStoreSourceInstance<any, any>, never>;
|
|
72
71
|
static ɵprov: i0.ɵɵInjectableDeclaration<DbxActionContextStoreSourceInstance<any, any>>;
|
|
73
72
|
}
|
|
74
|
-
export declare const actionContextStoreSourceInstanceFactory: (source: ActionContextStoreSource) => DbxActionContextStoreSourceInstance<
|
|
73
|
+
export declare const actionContextStoreSourceInstanceFactory: (source: ActionContextStoreSource) => DbxActionContextStoreSourceInstance<unknown, unknown>;
|
|
75
74
|
/**
|
|
76
75
|
* Provides an ActionContextStoreSource, as well as an DbxActionContextStoreSourceInstance.
|
|
77
76
|
*/
|
|
78
|
-
export declare function
|
|
79
|
-
export declare function
|
|
77
|
+
export declare function provideActionStoreSource<S extends ActionContextStoreSource>(sourceType: Type<S>): Provider[];
|
|
78
|
+
export declare function provideSecondaryActionStoreSource<S extends SecondaryActionContextStoreSource>(sourceType: Type<S>): Provider[];
|
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
/**
|
|
8
8
|
* Directive that automatically triggers the action periodically when it is in a modified state.
|
|
9
9
|
*/
|
|
10
|
-
export declare class DbxActionAutoTriggerDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
10
|
+
export declare class DbxActionAutoTriggerDirective<T = unknown, O = unknown> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
11
11
|
readonly source: DbxActionContextStoreSourceInstance<T, O>;
|
|
12
12
|
private readonly _triggerEnabled;
|
|
13
13
|
private readonly _triggerLimit;
|
|
@@ -16,7 +16,7 @@ export declare class DbxActionAutoTriggerDirective<T, O> extends AbstractSubscri
|
|
|
16
16
|
* How much to throttle the auto-triggering.
|
|
17
17
|
*/
|
|
18
18
|
get triggerEnabled(): boolean;
|
|
19
|
-
set triggerEnabled(triggerEnabled: Maybe<boolean> |
|
|
19
|
+
set triggerEnabled(triggerEnabled: Maybe<boolean> | '');
|
|
20
20
|
triggerDebounce: number;
|
|
21
21
|
triggerThrottle: number;
|
|
22
22
|
triggerErrorThrottle: number;
|
|
@@ -26,13 +26,13 @@ export declare class DbxActionAutoTriggerDirective<T, O> extends AbstractSubscri
|
|
|
26
26
|
*
|
|
27
27
|
* Used in forms that are simple.
|
|
28
28
|
*/
|
|
29
|
-
set fastTrigger(fastTrigger:
|
|
29
|
+
set fastTrigger(fastTrigger: Maybe<boolean> | '');
|
|
30
30
|
/**
|
|
31
31
|
* Optional input to override both triggerDebounce and triggerThrottle to be 0.
|
|
32
32
|
*
|
|
33
33
|
* Used in forms that generally return a single value.
|
|
34
34
|
*/
|
|
35
|
-
set instantTrigger(instantTrigger:
|
|
35
|
+
set instantTrigger(instantTrigger: Maybe<boolean> | '');
|
|
36
36
|
get triggerLimit(): Maybe<number>;
|
|
37
37
|
set triggerLimit(triggerLimit: Maybe<number>);
|
|
38
38
|
private _triggerCount;
|
|
@@ -5,8 +5,8 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
/**
|
|
6
6
|
* Provides an DbxActionContext.
|
|
7
7
|
*/
|
|
8
|
-
export declare class DbxActionDirective<T =
|
|
9
|
-
constructor(inputSource: SecondaryActionContextStoreSource);
|
|
8
|
+
export declare class DbxActionDirective<T = unknown, O = unknown> extends DbxActionContextBaseSource<T, O> implements OnDestroy {
|
|
9
|
+
constructor(inputSource: SecondaryActionContextStoreSource<T, O>);
|
|
10
10
|
ngOnDestroy(): void;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionDirective<any, any>, [{ optional: true; host: true; }]>;
|
|
12
12
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionDirective<any, any>, "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", ["action", "dbxAction"], {}, {}, never>;
|
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class DbxActionSourceDirective implements SecondaryActionContextStoreSource, OnDestroy {
|
|
9
9
|
private _source;
|
|
10
|
-
readonly store$: import("rxjs").Observable<import("@dereekb/dbx-core").ActionContextStore<
|
|
10
|
+
readonly store$: import("rxjs").Observable<import("@dereekb/dbx-core").ActionContextStore<unknown, unknown>>;
|
|
11
11
|
ngOnDestroy(): void;
|
|
12
12
|
get source(): Maybe<ActionContextStoreSource>;
|
|
13
13
|
set source(source: Maybe<ActionContextStoreSource>);
|
|
@@ -3,7 +3,7 @@ export declare type ActionKey = string;
|
|
|
3
3
|
/**
|
|
4
4
|
* Map that returns sources for ActionKey values.
|
|
5
5
|
*/
|
|
6
|
-
export declare abstract class ActionContextStoreSourceMap<T =
|
|
6
|
+
export declare abstract class ActionContextStoreSourceMap<T = unknown, O = unknown> {
|
|
7
7
|
/**
|
|
8
8
|
* Returns a ActionContextStoreSource for the input action key.
|
|
9
9
|
*
|
|
@@ -11,11 +11,10 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class DbxActionContextMapDirective implements ActionContextStoreSourceMap, OnDestroy {
|
|
13
13
|
private readonly _map;
|
|
14
|
-
readonly map$: Observable<Map<string, ActionContextStoreSource<
|
|
14
|
+
readonly map$: Observable<Map<string, ActionContextStoreSource<unknown, unknown>>>;
|
|
15
15
|
readonly areAnyWorking$: Observable<boolean>;
|
|
16
|
-
constructor();
|
|
17
16
|
get map(): Map<ActionKey, ActionContextStoreSource>;
|
|
18
|
-
sourceForKey(key: ActionKey): ActionContextStoreSource<
|
|
17
|
+
sourceForKey(key: ActionKey): ActionContextStoreSource<unknown, unknown>;
|
|
19
18
|
addStoreSource(key: ActionKey, source: ActionContextStoreSource): void;
|
|
20
19
|
removeStore(key: ActionKey): void;
|
|
21
20
|
ngOnDestroy(): void;
|
|
@@ -28,8 +27,8 @@ export declare class DbxActionContextMapDirective implements ActionContextStoreS
|
|
|
28
27
|
export declare class DbxActionContextMapDirectiveSourceInstance implements ActionContextStoreSource {
|
|
29
28
|
private readonly parent;
|
|
30
29
|
readonly key: ActionKey;
|
|
31
|
-
readonly _source$: Observable<ActionContextStoreSource<
|
|
32
|
-
readonly _store$: Observable<ActionContextStore<
|
|
33
|
-
readonly store$: Observable<ActionContextStore<
|
|
30
|
+
readonly _source$: Observable<ActionContextStoreSource<unknown, unknown> | undefined>;
|
|
31
|
+
readonly _store$: Observable<ActionContextStore<unknown, unknown> | undefined>;
|
|
32
|
+
readonly store$: Observable<ActionContextStore<unknown, unknown>>;
|
|
34
33
|
constructor(parent: DbxActionContextMapDirective, key: ActionKey);
|
|
35
34
|
}
|
|
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
export declare class DbxActionFromMapDirective implements SecondaryActionContextStoreSource, OnDestroy {
|
|
11
11
|
private readonly _map;
|
|
12
12
|
private _key;
|
|
13
|
-
readonly store$: import("rxjs").Observable<import("@dereekb/dbx-core").ActionContextStore<
|
|
13
|
+
readonly store$: import("rxjs").Observable<import("@dereekb/dbx-core").ActionContextStore<unknown, unknown>>;
|
|
14
14
|
constructor(_map: DbxActionContextMapDirective);
|
|
15
15
|
ngOnDestroy(): void;
|
|
16
16
|
get key(): Maybe<ActionKey>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractSubscriptionDirective } from '../../../subscription';
|
|
3
3
|
import { DbxActionContextStoreSourceInstance } from '../../action.store.source';
|
|
4
|
-
import {
|
|
4
|
+
import { HandleActionWithFunctionOrContext } from '../../action.handler';
|
|
5
5
|
import { Maybe } from '@dereekb/util';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* Context used for defining a function that performs an action using the input function on ValueReady.
|
|
9
9
|
*/
|
|
10
|
-
export declare class DbxActionHandlerDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
10
|
+
export declare class DbxActionHandlerDirective<T = unknown, O = unknown> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
11
11
|
readonly source: DbxActionContextStoreSourceInstance<T, O>;
|
|
12
12
|
private _handlerFunction;
|
|
13
|
-
readonly handlerFunction$: import("rxjs").Observable<
|
|
14
|
-
get handlerFunction(): Maybe<
|
|
15
|
-
set handlerFunction(handlerFunction: Maybe<
|
|
13
|
+
readonly handlerFunction$: import("rxjs").Observable<HandleActionWithFunctionOrContext<T, O>>;
|
|
14
|
+
get handlerFunction(): Maybe<HandleActionWithFunctionOrContext<T, O>>;
|
|
15
|
+
set handlerFunction(handlerFunction: Maybe<HandleActionWithFunctionOrContext<T, O>>);
|
|
16
16
|
private _delegate;
|
|
17
17
|
constructor(source: DbxActionContextStoreSourceInstance<T, O>);
|
|
18
18
|
ngOnInit(): void;
|
|
@@ -10,7 +10,7 @@ export declare class DbxActionHasSuccessDirective extends AbstractIfDirective im
|
|
|
10
10
|
readonly source: DbxActionContextStoreSourceInstance;
|
|
11
11
|
hideAfter?: Maybe<number> | '';
|
|
12
12
|
readonly show$: import("rxjs").Observable<boolean>;
|
|
13
|
-
constructor(templateRef: TemplateRef<
|
|
13
|
+
constructor(templateRef: TemplateRef<unknown>, viewContainer: ViewContainerRef, source: DbxActionContextStoreSourceInstance);
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionHasSuccessDirective, never>;
|
|
15
15
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionHasSuccessDirective, "[dbxActionHasSuccess]", never, { "hideAfter": "dbxActionHasSuccess"; }, {}, never>;
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { Maybe, GetterOrValue } from '@dereekb/util';
|
|
3
3
|
import { AbstractSubscriptionDirective } from '../../../subscription';
|
|
4
4
|
import { DbxActionContextStoreSourceInstance } from '../../action.store.source';
|
|
@@ -8,7 +8,7 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
*
|
|
9
9
|
* No value is required, allowing the directive to automatically call readyValue.
|
|
10
10
|
*/
|
|
11
|
-
export declare class DbxActionValueDirective<T, O> extends AbstractSubscriptionDirective implements OnInit {
|
|
11
|
+
export declare class DbxActionValueDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
12
12
|
readonly source: DbxActionContextStoreSourceInstance<T, O>;
|
|
13
13
|
private _valueOrFunction;
|
|
14
14
|
readonly valueOrFunction$: import("rxjs").Observable<GetterOrValue<T>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DbxActionContextStoreSourceInstance } from '../../action.store.source';
|
|
2
|
-
import { OnInit } from '@angular/core';
|
|
3
2
|
import { Observable } from 'rxjs';
|
|
4
|
-
import { OnDestroy } from '@angular/core';
|
|
3
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
5
4
|
import { IsModifiedFunction } from '@dereekb/rxjs';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
/**
|
|
@@ -14,7 +13,7 @@ export declare class dbxActionValueStreamDirective<T, O> implements OnInit, OnDe
|
|
|
14
13
|
private _modifiedSub;
|
|
15
14
|
private _triggerSub;
|
|
16
15
|
set dbxActionValueStream(dbxActionValueStream: Observable<T>);
|
|
17
|
-
set dbxActionValueStreamIsNotEmpty(requireNonEmpty:
|
|
16
|
+
set dbxActionValueStreamIsNotEmpty(requireNonEmpty: unknown);
|
|
18
17
|
set dbxActionValueStreamModified(dbxActionValueStreamModified: IsModifiedFunction<T>);
|
|
19
18
|
readonly modifiedValue$: Observable<[boolean, T]>;
|
|
20
19
|
constructor(source: DbxActionContextStoreSourceInstance<T, O>);
|
|
@@ -7,11 +7,11 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
/**
|
|
8
8
|
* Abstract class for directives that may perform an action when trigger is called, and returns a value.
|
|
9
9
|
*/
|
|
10
|
-
export declare abstract class AbstractDbxActionValueOnTriggerDirective<T> {
|
|
11
|
-
readonly source: DbxActionContextStoreSourceInstance<T,
|
|
10
|
+
export declare abstract class AbstractDbxActionValueOnTriggerDirective<T> implements OnInit, OnDestroy {
|
|
11
|
+
readonly source: DbxActionContextStoreSourceInstance<T, unknown>;
|
|
12
12
|
private readonly _instance;
|
|
13
13
|
private _triggeredSub;
|
|
14
|
-
constructor(source: DbxActionContextStoreSourceInstance<T,
|
|
14
|
+
constructor(source: DbxActionContextStoreSourceInstance<T, unknown>, valueGetter?: Maybe<DbxActionValueOnTriggerFunction<T>>);
|
|
15
15
|
get valueGetter(): Maybe<DbxActionValueOnTriggerFunction<T>>;
|
|
16
16
|
set valueGetter(valueGetter: Maybe<DbxActionValueOnTriggerFunction<T>>);
|
|
17
17
|
get isModifiedFunction(): Maybe<IsModifiedFunction<T>>;
|
|
@@ -28,7 +28,7 @@ export declare class DbxActionValueTriggerDirective<T = object> extends Abstract
|
|
|
28
28
|
readonly elementRef: ElementRef;
|
|
29
29
|
set dbxActionValueOnTrigger(dbxActionValueTrigger: Maybe<DbxActionValueOnTriggerFunction<T>>);
|
|
30
30
|
set dbxActionValueTriggerModified(isModifiedFunction: Maybe<IsModifiedFunction>);
|
|
31
|
-
constructor(elementRef: ElementRef, source: DbxActionContextStoreSourceInstance<T,
|
|
31
|
+
constructor(elementRef: ElementRef, source: DbxActionContextStoreSourceInstance<T, unknown>);
|
|
32
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionValueTriggerDirective<any>, never>;
|
|
33
33
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionValueTriggerDirective<any>, "[dbxActionValueOnTrigger]", ["dbxActionValueOnTrigger"], { "dbxActionValueOnTrigger": "dbxActionValueOnTrigger"; "dbxActionValueTriggerModified": "dbxActionValueTriggerModified"; }, {}, never>;
|
|
34
34
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import { Destroyable, Initialized, Maybe, ReadableError } from '@dereekb/util';
|
|
1
2
|
import { ObservableOrValue, IsModifiedFunction } from '@dereekb/rxjs';
|
|
2
|
-
import { Destroyable, Initialized, Maybe } from '@dereekb/util';
|
|
3
3
|
import { DbxActionContextStoreSourceInstance } from '../../action.store.source';
|
|
4
4
|
/**
|
|
5
5
|
* DbxActionValueOnTriggerInstance function. Returns an ObervableGetter that returns a value.
|
|
6
6
|
*/
|
|
7
7
|
export declare type DbxActionValueOnTriggerFunction<T> = () => ObservableOrValue<Maybe<T>>;
|
|
8
|
-
export interface DbxActionValueOnTriggerResult<T =
|
|
8
|
+
export interface DbxActionValueOnTriggerResult<T = unknown> {
|
|
9
9
|
value?: Maybe<T>;
|
|
10
|
-
reject?:
|
|
10
|
+
reject?: Maybe<ReadableError>;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* DbxActionValueOnTriggerInstance configuration.
|
|
14
14
|
*/
|
|
15
15
|
export interface DbxActionValueOnTriggerInstanceConfig<T> {
|
|
16
|
-
readonly source: DbxActionContextStoreSourceInstance<T,
|
|
16
|
+
readonly source: DbxActionContextStoreSourceInstance<T, unknown>;
|
|
17
17
|
readonly valueGetter?: Maybe<DbxActionValueOnTriggerFunction<T>>;
|
|
18
18
|
readonly isModifiedFunction?: Maybe<IsModifiedFunction<T>>;
|
|
19
19
|
}
|
|
@@ -23,7 +23,7 @@ export interface DbxActionValueOnTriggerInstanceConfig<T> {
|
|
|
23
23
|
export declare class DbxActionValueOnTriggerInstance<T> implements Initialized, Destroyable {
|
|
24
24
|
private _valueGetter;
|
|
25
25
|
readonly valueGetter$: import("rxjs").Observable<DbxActionValueOnTriggerFunction<T>>;
|
|
26
|
-
readonly source: DbxActionContextStoreSourceInstance<T,
|
|
26
|
+
readonly source: DbxActionContextStoreSourceInstance<T, unknown>;
|
|
27
27
|
isModifiedFunction?: Maybe<IsModifiedFunction<T>>;
|
|
28
28
|
private _triggeredSub;
|
|
29
29
|
constructor(config: DbxActionValueOnTriggerInstanceConfig<T>);
|
|
@@ -12,7 +12,7 @@ export declare class DbxActionIsWorkingDirective extends AbstractIfDirective imp
|
|
|
12
12
|
readonly source: DbxActionContextStoreSourceInstance;
|
|
13
13
|
showAfter?: Maybe<number> | '';
|
|
14
14
|
readonly show$: import("rxjs").Observable<boolean>;
|
|
15
|
-
constructor(templateRef: TemplateRef<
|
|
15
|
+
constructor(templateRef: TemplateRef<unknown>, viewContainer: ViewContainerRef, source: DbxActionContextStoreSourceInstance);
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionIsWorkingDirective, never>;
|
|
17
17
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionIsWorkingDirective, "[dbxActionIsWorking]", never, { "showAfter": "dbxActionIsWorking"; }, {}, never>;
|
|
18
18
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { AuthRole, ArrayOrValue } from '@dereekb/util';
|
|
1
|
+
import { AuthRole, ArrayOrValue, Maybe } from '@dereekb/util';
|
|
2
2
|
import { TemplateRef, ViewContainerRef, OnDestroy } from '@angular/core';
|
|
3
3
|
import { DbxAuthService } from './service';
|
|
4
|
-
import { Maybe } from '@dereekb/util';
|
|
5
4
|
import { AbstractIfDirective } from '../view/if.directive';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
/**
|
|
@@ -12,7 +11,7 @@ export declare class DbxAuthHasAnyRoleDirective extends AbstractIfDirective impl
|
|
|
12
11
|
private _targetRoles;
|
|
13
12
|
readonly targetRoles$: import("rxjs").Observable<Maybe<ArrayOrValue<string>>>;
|
|
14
13
|
readonly show$: import("rxjs").Observable<boolean>;
|
|
15
|
-
constructor(templateRef: TemplateRef<
|
|
14
|
+
constructor(templateRef: TemplateRef<unknown>, viewContainer: ViewContainerRef, dbxAuthService: DbxAuthService);
|
|
16
15
|
ngOnDestroy(): void;
|
|
17
16
|
set targetRoles(roles: Maybe<ArrayOrValue<AuthRole>>);
|
|
18
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAuthHasAnyRoleDirective, never>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { AuthRole, ArrayOrValue } from '@dereekb/util';
|
|
1
|
+
import { Maybe, AuthRole, ArrayOrValue } from '@dereekb/util';
|
|
2
2
|
import { TemplateRef, ViewContainerRef, OnDestroy } from '@angular/core';
|
|
3
3
|
import { DbxAuthService } from './service';
|
|
4
|
-
import { Maybe } from '@dereekb/util';
|
|
5
4
|
import { AbstractIfDirective } from '../view/if.directive';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
/**
|
|
@@ -12,7 +11,7 @@ export declare class DbxAuthHasRolesDirective extends AbstractIfDirective implem
|
|
|
12
11
|
private _targetRoles;
|
|
13
12
|
readonly targetRoles$: import("rxjs").Observable<Maybe<ArrayOrValue<string>>>;
|
|
14
13
|
readonly show$: import("rxjs").Observable<boolean>;
|
|
15
|
-
constructor(templateRef: TemplateRef<
|
|
14
|
+
constructor(templateRef: TemplateRef<unknown>, viewContainer: ViewContainerRef, dbxAuthService: DbxAuthService);
|
|
16
15
|
ngOnDestroy(): void;
|
|
17
16
|
set targetRoles(roles: Maybe<ArrayOrValue<AuthRole>>);
|
|
18
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxAuthHasRolesDirective, never>;
|
|
@@ -16,7 +16,8 @@ export interface AuthTransitionDecisionGetterInput {
|
|
|
16
16
|
readonly injector: Injector;
|
|
17
17
|
readonly authService: DbxAuthService;
|
|
18
18
|
}
|
|
19
|
-
export declare type
|
|
19
|
+
export declare type AuthTransitionRedirectTarget = Observable<Maybe<SegueRef>>;
|
|
20
|
+
export declare type AuthTransitionRedirectTargetGetter = FactoryWithRequiredInput<AuthTransitionRedirectTarget, AuthTransitionDecisionGetterInput>;
|
|
20
21
|
export declare type AuthTransitionRedirectTargetOrGetter = Maybe<SegueRef> | AuthTransitionRedirectTargetGetter;
|
|
21
22
|
export interface AuthTransitionHookOptions {
|
|
22
23
|
/**
|
package/lib/button/button.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export declare abstract class DbxButton {
|
|
|
19
19
|
abstract working: Maybe<boolean>;
|
|
20
20
|
abstract icon?: Maybe<string>;
|
|
21
21
|
abstract text?: Maybe<string>;
|
|
22
|
-
abstract readonly clicked$: Observable<
|
|
22
|
+
abstract readonly clicked$: Observable<unknown>;
|
|
23
23
|
abstract setButtonInterceptor(interceptor: DbxButtonInterceptor): void;
|
|
24
24
|
abstract clickButton(): void;
|
|
25
25
|
}
|
|
26
|
-
export declare function
|
|
26
|
+
export declare function provideDbxButton<S extends DbxButton>(sourceType: Type<S>): Provider[];
|
|
@@ -8,7 +8,7 @@ export declare class DbxButtonSegueDirective extends AbstractSubscriptionDirecti
|
|
|
8
8
|
readonly dbxButton: DbxButton;
|
|
9
9
|
readonly dbxRouterService: DbxRouterService;
|
|
10
10
|
private _segueRef;
|
|
11
|
-
readonly segueRef$: import("rxjs").Observable<SegueRef<
|
|
11
|
+
readonly segueRef$: import("rxjs").Observable<SegueRef<object>>;
|
|
12
12
|
get segueRef(): Maybe<SegueRef>;
|
|
13
13
|
set segueRef(segueRef: Maybe<SegueRef>);
|
|
14
14
|
constructor(dbxButton: DbxButton, dbxRouterService: DbxRouterService);
|
|
@@ -6,7 +6,7 @@ import { ArrayOrValue } from '@dereekb/util';
|
|
|
6
6
|
/**
|
|
7
7
|
* Abstract effects class that only runs/allows effects when the DbxAppContextState in the ngrx state matches input activeState value.
|
|
8
8
|
*/
|
|
9
|
-
export declare abstract class AbstractOnDbxAppContextStateEffects<S =
|
|
9
|
+
export declare abstract class AbstractOnDbxAppContextStateEffects<S = unknown> implements OnRunEffects {
|
|
10
10
|
/**
|
|
11
11
|
* ngrx Actions
|
|
12
12
|
*/
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { OnDestroy } from '@angular/core';
|
|
3
3
|
import { FilterSourceConnector, FilterSource } from '@dereekb/rxjs';
|
|
4
|
-
import { Maybe } from '@dereekb/util';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
/**
|
|
7
6
|
* Abstract FilterSourceConnector directive.
|
|
8
7
|
*/
|
|
9
|
-
export declare abstract class AbstractFilterSourceConnectorDirective<F> implements FilterSourceConnector<F>, OnDestroy {
|
|
8
|
+
export declare abstract class AbstractFilterSourceConnectorDirective<F> implements FilterSourceConnector<F>, FilterSource<F>, OnDestroy {
|
|
10
9
|
private _source;
|
|
11
|
-
readonly filter$: Observable<
|
|
10
|
+
readonly filter$: Observable<F>;
|
|
12
11
|
ngOnDestroy(): void;
|
|
13
12
|
connectWithSource(filterSource: FilterSource<F>): void;
|
|
14
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractFilterSourceConnectorDirective<any>, never>;
|
|
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
/**
|
|
4
4
|
* Used as a FilterSource and FilterSourceConnector.
|
|
5
5
|
*/
|
|
6
|
-
export declare class DbxFilterSourceConnectorDirective<F> extends AbstractFilterSourceConnectorDirective<F> {
|
|
6
|
+
export declare class DbxFilterSourceConnectorDirective<F = unknown> extends AbstractFilterSourceConnectorDirective<F> {
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFilterSourceConnectorDirective<any>, never>;
|
|
8
8
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxFilterSourceConnectorDirective<any>, "[dbxFilterSourceConnector]", never, {}, {}, never>;
|
|
9
9
|
}
|
|
@@ -3,8 +3,8 @@ import { Provider, Type } from '@angular/core';
|
|
|
3
3
|
/**
|
|
4
4
|
* Angular provider convenience function for a FilterSource.
|
|
5
5
|
*/
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function provideFilterSource<S extends FilterSource>(sourceType: Type<S>): Provider[];
|
|
7
7
|
/**
|
|
8
8
|
* Angular provider convenience function for a FilterSourceConnector.
|
|
9
9
|
*/
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function provideFilterSourceConnector<S extends FilterSourceConnector>(sourceType: Type<S>): Provider[];
|
|
@@ -3,7 +3,7 @@ import { DbxInjectionComponentConfig } from "./injection";
|
|
|
3
3
|
/**
|
|
4
4
|
* DbxInjectedViewContext showContext() configuration.
|
|
5
5
|
*/
|
|
6
|
-
export interface DbxInjectionContextConfig<T =
|
|
6
|
+
export interface DbxInjectionContextConfig<T = unknown, O = unknown> {
|
|
7
7
|
/**
|
|
8
8
|
* Injected config.
|
|
9
9
|
*/
|
|
@@ -25,7 +25,7 @@ export declare abstract class DbxInjectionContext {
|
|
|
25
25
|
*
|
|
26
26
|
* The original content is hidden instead of removed from the context to avoid destruction of children elements.
|
|
27
27
|
*/
|
|
28
|
-
abstract showContext<T =
|
|
28
|
+
abstract showContext<T = unknown, O = unknown>(config: DbxInjectionContextConfig<T>): Promise<O>;
|
|
29
29
|
/**
|
|
30
30
|
* Bails out of any current promise, if one is set.
|
|
31
31
|
*
|
|
@@ -36,4 +36,4 @@ export declare abstract class DbxInjectionContext {
|
|
|
36
36
|
/**
|
|
37
37
|
* Allows a directive to provide a formly context and form.
|
|
38
38
|
*/
|
|
39
|
-
export declare function
|
|
39
|
+
export declare function provideDbxInjectionContext<T extends DbxInjectionContext>(type: Type<T>): Provider[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Injector, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
1
|
+
import { Injector, TemplateRef, ViewContainerRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { DbxInjectionContext, DbxInjectionContextConfig } from './injection.context';
|
|
3
3
|
import { DbxInjectionComponentConfig } from './injection';
|
|
4
4
|
import { Maybe } from '@dereekb/util';
|
|
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
/**
|
|
7
7
|
* DbxInjectedViewContext implementation. Acts similar to *ngIf, but instead switches to a different view without destroying the original child view.
|
|
8
8
|
*/
|
|
9
|
-
export declare class DbxInjectionContextDirective<O =
|
|
9
|
+
export declare class DbxInjectionContextDirective<O = unknown> implements DbxInjectionContext, OnInit, OnDestroy {
|
|
10
10
|
private readonly _injector;
|
|
11
11
|
private readonly _templateRef;
|
|
12
12
|
private readonly _viewContainer;
|
|
@@ -15,7 +15,7 @@ export declare class DbxInjectionContextDirective<O = any> implements DbxInjecti
|
|
|
15
15
|
private _embeddedView;
|
|
16
16
|
private _isDetached;
|
|
17
17
|
constructor(_injector: Injector, _templateRef: TemplateRef<O>, _viewContainer: ViewContainerRef);
|
|
18
|
-
set config(config: Maybe<DbxInjectionComponentConfig<
|
|
18
|
+
set config(config: Maybe<DbxInjectionComponentConfig<unknown>>);
|
|
19
19
|
ngOnInit(): void;
|
|
20
20
|
ngOnDestroy(): void;
|
|
21
21
|
showContext<T, O>(config: DbxInjectionContextConfig<T>): Promise<O>;
|
|
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
export declare abstract class AbstractForwardDbxInjectionContextDirective implements DbxInjectionContext {
|
|
10
10
|
readonly dbxInjectionContext: DbxInjectionContext;
|
|
11
11
|
constructor(dbxInjectionContext: DbxInjectionContext);
|
|
12
|
-
showContext<T =
|
|
12
|
+
showContext<T = unknown, O = unknown>(config: DbxInjectionContextConfig<T, unknown>): Promise<O>;
|
|
13
13
|
resetContext(): boolean;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractForwardDbxInjectionContextDirective, [{ host: true; }]>;
|
|
15
15
|
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractForwardDbxInjectionContextDirective, never, never, {}, {}, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InjectionToken, Injector, NgModuleRef, StaticProvider, TemplateRef, Type, ViewRef } from "@angular/core";
|
|
2
2
|
import { Maybe } from "@dereekb/util";
|
|
3
3
|
export declare const DBX_INJECTION_COMPONENT_DATA: InjectionToken<unknown>;
|
|
4
|
-
export interface DbxInjectionComponentConfig<T =
|
|
4
|
+
export interface DbxInjectionComponentConfig<T = unknown> {
|
|
5
5
|
/**
|
|
6
6
|
* Type of Component to initialize.
|
|
7
7
|
*/
|
|
@@ -23,11 +23,11 @@ export interface DbxInjectionComponentConfig<T = any> {
|
|
|
23
23
|
*/
|
|
24
24
|
init?: (instance: T) => void;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* unknown optional data to inject into the component.
|
|
27
27
|
*/
|
|
28
|
-
data?:
|
|
28
|
+
data?: unknown;
|
|
29
29
|
}
|
|
30
|
-
export interface DbxInjectionTemplateConfig<T =
|
|
30
|
+
export interface DbxInjectionTemplateConfig<T = unknown> {
|
|
31
31
|
/**
|
|
32
32
|
* Template ref to display.
|
|
33
33
|
*/
|
|
@@ -43,4 +43,4 @@ export interface DbxInjectionTemplateConfig<T = any> {
|
|
|
43
43
|
* @param configs
|
|
44
44
|
* @returns
|
|
45
45
|
*/
|
|
46
|
-
export declare function mergeDbxInjectionComponentConfigs(configs: Maybe<Partial<DbxInjectionComponentConfig
|
|
46
|
+
export declare function mergeDbxInjectionComponentConfigs<T = unknown>(configs: Maybe<Partial<DbxInjectionComponentConfig<T>>>[]): Partial<DbxInjectionComponentConfig<T>>;
|