@dereekb/dbx-core 0.0.1 → 1.2.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/README.md +4 -5
- package/esm2020/lib/action/action.handler.mjs +2 -2
- package/esm2020/lib/action/action.module.mjs +21 -21
- 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 +5 -5
- package/esm2020/lib/action/directive/auto/action.autotrigger.directive.mjs +7 -7
- package/esm2020/lib/action/directive/auto/action.autotrigger.value.directive.mjs +5 -5
- package/esm2020/lib/action/directive/context/action.directive.mjs +8 -8
- package/esm2020/lib/action/directive/context/action.source.directive.mjs +7 -7
- package/esm2020/lib/action/directive/context/index.mjs +1 -2
- package/esm2020/lib/action/directive/debug/action.logger.directive.mjs +6 -6
- package/esm2020/lib/action/directive/map/action.map.directive.mjs +7 -7
- package/esm2020/lib/action/directive/map/action.map.key.directive.mjs +9 -9
- package/esm2020/lib/action/directive/map/action.map.source.directive.mjs +7 -7
- package/esm2020/lib/action/directive/map/action.map.working.disable.directive.mjs +8 -8
- package/esm2020/lib/action/directive/state/action.disabled.directive.mjs +5 -5
- package/esm2020/lib/action/directive/state/action.disabled.modified.directive.mjs +5 -5
- package/esm2020/lib/action/directive/state/action.handler.directive.mjs +5 -5
- package/esm2020/lib/action/directive/state/action.success.component.mjs +5 -5
- package/esm2020/lib/action/directive/state/action.success.directive.mjs +5 -5
- package/esm2020/lib/action/directive/state/action.value.directive.mjs +5 -5
- package/esm2020/lib/action/directive/state/action.working.component.mjs +5 -5
- package/esm2020/lib/action/snackbar/snackbar.mjs +1 -1
- package/esm2020/lib/button/action/action.button.directive.mjs +8 -8
- package/esm2020/lib/button/action/action.button.trigger.directive.mjs +7 -7
- package/esm2020/lib/button/button.directive.mjs +12 -12
- package/esm2020/lib/button/button.loading.directive.mjs +7 -7
- package/esm2020/lib/button/button.mjs +6 -5
- package/esm2020/lib/button/button.module.mjs +28 -28
- package/esm2020/lib/button/router/button.segue.directive.mjs +8 -8
- package/esm2020/lib/filter/action/action.filter.source.directive.mjs +33 -0
- package/esm2020/lib/filter/action/index.mjs +2 -0
- package/esm2020/lib/filter/filter.abstract.connector.directive.mjs +24 -0
- package/esm2020/lib/filter/filter.abstract.source.directive.mjs +38 -0
- package/esm2020/lib/filter/filter.connector.directive.mjs +25 -0
- package/esm2020/lib/filter/filter.content.mjs +24 -0
- package/esm2020/lib/filter/filter.map.connector.directive.mjs +40 -0
- package/esm2020/lib/filter/filter.map.directive.mjs +26 -0
- package/esm2020/lib/filter/filter.map.instance.directive.mjs +26 -0
- package/esm2020/lib/filter/filter.map.source.directive.mjs +41 -0
- package/esm2020/lib/filter/filter.module.mjs +46 -0
- package/esm2020/lib/filter/filter.source.directive.mjs +19 -0
- package/esm2020/lib/filter/index.mjs +12 -0
- package/esm2020/lib/index.mjs +2 -1
- package/esm2020/lib/injected/injected.component.mjs +6 -6
- package/esm2020/lib/injected/injected.component.module.mjs +9 -9
- package/esm2020/lib/injected/injected.directive.mjs +11 -10
- package/esm2020/lib/injected/injected.instance.mjs +20 -5
- package/esm2020/lib/injected/injected.mjs +16 -2
- package/esm2020/lib/pipe/date/date.pipe.module.mjs +6 -6
- package/esm2020/lib/pipe/date/datedistance.pipe.mjs +7 -7
- package/esm2020/lib/pipe/date/dateformatdistance.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/datefromtoformat.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/minutesstring.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/timedistance.pipe.mjs +6 -6
- package/esm2020/lib/pipe/date/tojsdate.pipe.mjs +3 -3
- package/esm2020/lib/pipe/date/tominutes.pipe.mjs +3 -3
- package/esm2020/lib/router/anchor/anchor.directive.mjs +7 -7
- package/esm2020/lib/router/anchor/anchor.mjs +43 -15
- package/esm2020/lib/router/router/provider/angular/angular.router.service.mjs +15 -9
- package/esm2020/lib/router/router/provider/angular/angular.router.service.module.mjs +14 -14
- package/esm2020/lib/router/router/provider/uirouter/index.mjs +2 -1
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.mjs +20 -9
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.module.mjs +15 -15
- package/esm2020/lib/router/router/provider/uirouter/util/future.mjs +38 -0
- package/esm2020/lib/router/router/provider/uirouter/util/index.mjs +2 -0
- package/esm2020/lib/router/router/service/router.service.mjs +2 -2
- package/esm2020/lib/router/router/service/router.transition.service.mjs +2 -2
- package/esm2020/lib/router/router/transition/index.mjs +3 -1
- package/esm2020/lib/router/router/transition/transition.directive.mjs +22 -0
- package/esm2020/lib/router/router/transition/transition.mjs +6 -6
- package/esm2020/lib/router/router/transition/transition.rxjs.mjs +18 -0
- package/esm2020/lib/router/router/transition/transition.watcher.directive.mjs +10 -11
- package/esm2020/lib/storage/storage.accessor.simple.factory.mjs +3 -3
- package/esm2020/lib/storage/storage.accessor.simple.mjs +3 -3
- package/esm2020/lib/storage/storage.di.mjs +3 -3
- package/esm2020/lib/storage/storage.module.mjs +7 -7
- package/esm2020/lib/subscription/subscription.directive.mjs +6 -6
- package/esm2020/lib/util/view.mjs +12 -1
- package/fesm2015/dereekb-dbx-core.mjs +760 -332
- package/fesm2015/dereekb-dbx-core.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-core.mjs +760 -332
- package/fesm2020/dereekb-dbx-core.mjs.map +1 -1
- package/lib/action/action.handler.d.ts +1 -1
- package/lib/action/action.module.d.ts +22 -23
- package/lib/action/action.store.source.d.ts +1 -1
- package/lib/action/directive/auto/action.automodify.directive.d.ts +3 -3
- package/lib/action/directive/auto/action.autotrigger.directive.d.ts +5 -5
- package/lib/action/directive/auto/action.autotrigger.value.directive.d.ts +5 -5
- package/lib/action/directive/context/action.directive.d.ts +4 -4
- package/lib/action/directive/context/action.source.directive.d.ts +4 -4
- package/lib/action/directive/context/index.d.ts +0 -1
- package/lib/action/directive/debug/action.logger.directive.d.ts +3 -3
- package/lib/action/directive/map/action.map.directive.d.ts +5 -5
- package/lib/action/directive/map/action.map.key.directive.d.ts +6 -6
- package/lib/action/directive/map/action.map.source.directive.d.ts +5 -5
- package/lib/action/directive/map/action.map.working.disable.directive.d.ts +6 -6
- package/lib/action/directive/state/action.disabled.directive.d.ts +3 -3
- package/lib/action/directive/state/action.disabled.modified.directive.d.ts +3 -3
- package/lib/action/directive/state/action.handler.directive.d.ts +3 -3
- package/lib/action/directive/state/action.success.component.d.ts +3 -3
- package/lib/action/directive/state/action.success.directive.d.ts +3 -3
- package/lib/action/directive/state/action.value.directive.d.ts +3 -3
- package/lib/action/directive/state/action.working.component.d.ts +3 -3
- package/lib/action/snackbar/snackbar.d.ts +3 -3
- package/lib/button/action/action.button.directive.d.ts +6 -6
- package/lib/button/action/action.button.trigger.directive.d.ts +6 -6
- package/lib/button/button.d.ts +4 -4
- package/lib/button/button.directive.d.ts +10 -10
- package/lib/button/button.loading.directive.d.ts +6 -6
- package/lib/button/button.module.d.ts +4 -4
- package/lib/button/router/button.segue.directive.d.ts +8 -8
- package/lib/filter/action/action.filter.source.directive.d.ts +17 -0
- package/lib/filter/action/index.d.ts +1 -0
- package/lib/filter/filter.abstract.connector.directive.d.ts +16 -0
- package/lib/filter/filter.abstract.source.directive.d.ts +20 -0
- package/lib/filter/filter.connector.directive.d.ts +9 -0
- package/lib/filter/filter.content.d.ts +10 -0
- package/lib/filter/filter.map.connector.directive.d.ts +14 -0
- package/lib/filter/filter.map.directive.d.ts +13 -0
- package/lib/filter/filter.map.instance.directive.d.ts +18 -0
- package/lib/filter/filter.map.source.directive.d.ts +16 -0
- package/lib/filter/filter.module.d.ts +12 -0
- package/lib/filter/filter.source.directive.d.ts +9 -0
- package/lib/filter/index.d.ts +11 -0
- package/lib/index.d.ts +1 -0
- package/lib/injected/injected.component.d.ts +7 -7
- package/lib/injected/injected.component.module.d.ts +4 -4
- package/lib/injected/injected.d.ts +25 -5
- package/lib/injected/injected.directive.d.ts +9 -7
- package/lib/injected/injected.instance.d.ts +11 -9
- package/lib/pipe/date/date.pipe.module.d.ts +4 -4
- package/lib/pipe/date/datedistance.pipe.d.ts +2 -2
- package/lib/router/anchor/anchor.d.ts +31 -8
- package/lib/router/anchor/anchor.directive.d.ts +4 -4
- package/lib/router/router/provider/angular/angular.router.service.d.ts +9 -7
- package/lib/router/router/provider/angular/angular.router.service.module.d.ts +5 -5
- package/lib/router/router/provider/uirouter/index.d.ts +1 -0
- package/lib/router/router/provider/uirouter/uirouter.router.service.d.ts +9 -7
- package/lib/router/router/provider/uirouter/uirouter.router.service.module.d.ts +5 -5
- package/lib/router/router/provider/uirouter/util/future.d.ts +1 -0
- package/lib/router/router/provider/uirouter/util/index.d.ts +1 -0
- package/lib/router/router/service/router.service.d.ts +17 -1
- package/lib/router/router/service/router.transition.service.d.ts +4 -4
- package/lib/router/router/transition/index.d.ts +2 -0
- package/lib/router/router/transition/transition.d.ts +3 -3
- package/lib/router/router/transition/transition.directive.d.ts +14 -0
- package/lib/router/router/transition/transition.rxjs.d.ts +11 -0
- package/lib/router/router/transition/transition.watcher.directive.d.ts +4 -4
- package/lib/storage/storage.module.d.ts +5 -5
- package/lib/util/view.d.ts +9 -0
- package/package.json +13 -13
- package/esm2020/lib/action/directive/context/action.component.mjs +0 -18
- package/lib/action/directive/context/action.component.d.ts +0 -6
|
@@ -17,7 +17,7 @@ export declare class WorkHandlerContextSourceDelegate<T = any, O = any> implemen
|
|
|
17
17
|
reject(error: any): void;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Used by
|
|
20
|
+
* Used by DbxActionHandlerDirective when handling a function.
|
|
21
21
|
*/
|
|
22
22
|
export declare class WorkHandlerContext<T = any, O = any> implements Destroyable {
|
|
23
23
|
readonly value: T;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./directive/context/action.
|
|
3
|
-
import * as i2 from "./directive/
|
|
4
|
-
import * as i3 from "./directive/map/action.map.directive";
|
|
5
|
-
import * as i4 from "./directive/map/action.map.
|
|
6
|
-
import * as i5 from "./directive/map/action.map.
|
|
7
|
-
import * as i6 from "./directive/
|
|
8
|
-
import * as i7 from "./directive/
|
|
9
|
-
import * as i8 from "./directive/state/action.
|
|
10
|
-
import * as i9 from "./directive/state/action.disabled.directive";
|
|
11
|
-
import * as i10 from "./directive/
|
|
12
|
-
import * as i11 from "./directive/auto/action.autotrigger.directive";
|
|
13
|
-
import * as i12 from "./directive/auto/action.
|
|
14
|
-
import * as i13 from "./directive/
|
|
15
|
-
import * as i14 from "./directive/
|
|
16
|
-
import * as i15 from "./directive/
|
|
17
|
-
import * as i16 from "./directive/state/action.success.
|
|
18
|
-
import * as i17 from "./directive/state/action.
|
|
19
|
-
import * as i18 from "
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
static
|
|
23
|
-
static
|
|
24
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DbNgxCoreActionModule>;
|
|
2
|
+
import * as i1 from "./directive/context/action.directive";
|
|
3
|
+
import * as i2 from "./directive/map/action.map.directive";
|
|
4
|
+
import * as i3 from "./directive/map/action.map.key.directive";
|
|
5
|
+
import * as i4 from "./directive/map/action.map.source.directive";
|
|
6
|
+
import * as i5 from "./directive/map/action.map.working.disable.directive";
|
|
7
|
+
import * as i6 from "./directive/context/action.source.directive";
|
|
8
|
+
import * as i7 from "./directive/state/action.handler.directive";
|
|
9
|
+
import * as i8 from "./directive/state/action.disabled.directive";
|
|
10
|
+
import * as i9 from "./directive/state/action.disabled.modified.directive";
|
|
11
|
+
import * as i10 from "./directive/auto/action.autotrigger.directive";
|
|
12
|
+
import * as i11 from "./directive/auto/action.autotrigger.value.directive";
|
|
13
|
+
import * as i12 from "./directive/auto/action.automodify.directive";
|
|
14
|
+
import * as i13 from "./directive/state/action.value.directive";
|
|
15
|
+
import * as i14 from "./directive/debug/action.logger.directive";
|
|
16
|
+
import * as i15 from "./directive/state/action.success.component";
|
|
17
|
+
import * as i16 from "./directive/state/action.success.directive";
|
|
18
|
+
import * as i17 from "./directive/state/action.working.component";
|
|
19
|
+
import * as i18 from "@angular/common";
|
|
20
|
+
export declare class DbxCoreActionModule {
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxCoreActionModule, never>;
|
|
22
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxCoreActionModule, [typeof i1.DbxActionDirective, typeof i2.DbxActionContextMapDirective, typeof i3.DbxActionFromMapDirective, typeof i4.DbxActionMapSourceDirective, typeof i5.DbxActionMapWorkingDisableDirective, typeof i6.DbxActionSourceDirective, typeof i7.DbxActionHandlerDirective, typeof i8.DbxActionDisabledDirective, typeof i9.DbxActionDisabledUntilModifiedDirective, typeof i10.DbxActionAutoTriggerDirective, typeof i11.DbxActionAutoTriggerValueDirective, typeof i12.DbxActionAutoModifyDirective, typeof i13.DbxActionValueDirective, typeof i14.DbxActionContextLoggerDirective, typeof i15.DbxActionSuccessComponent, typeof i16.DbxActionSuccessDirective, typeof i17.DbxActionWorkingComponent], [typeof i18.CommonModule], [typeof i1.DbxActionDirective, typeof i2.DbxActionContextMapDirective, typeof i3.DbxActionFromMapDirective, typeof i4.DbxActionMapSourceDirective, typeof i5.DbxActionMapWorkingDisableDirective, typeof i6.DbxActionSourceDirective, typeof i7.DbxActionHandlerDirective, typeof i8.DbxActionDisabledDirective, typeof i9.DbxActionDisabledUntilModifiedDirective, typeof i10.DbxActionAutoTriggerDirective, typeof i11.DbxActionAutoTriggerValueDirective, typeof i12.DbxActionAutoModifyDirective, typeof i13.DbxActionValueDirective, typeof i14.DbxActionContextLoggerDirective, typeof i15.DbxActionSuccessComponent, typeof i16.DbxActionSuccessDirective, typeof i17.DbxActionWorkingComponent]>;
|
|
23
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbxCoreActionModule>;
|
|
25
24
|
}
|
|
@@ -18,7 +18,7 @@ export declare abstract class ActionContextStoreSource<T = any, O = any> {
|
|
|
18
18
|
abstract readonly store$: Observable<ActionContextStore<T, O>>;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Secondary source. Used by
|
|
21
|
+
* Secondary source. Used by DbxActionContextComponent to find secondary sources.
|
|
22
22
|
*/
|
|
23
23
|
export declare abstract class SecondaryActionContextStoreSource<T = any, O = any> extends ActionContextStoreSource<T, O> {
|
|
24
24
|
}
|
|
@@ -2,7 +2,7 @@ import { OnInit, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { AbstractSubscriptionDirective } from '../../../subscription';
|
|
3
3
|
import { ActionContextStoreSourceInstance } from '../../action.store.source';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class DbxActionAutoModifyDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
6
6
|
readonly source: ActionContextStoreSourceInstance<T, O>;
|
|
7
7
|
private readonly _autoModifyEnabled;
|
|
8
8
|
get autoModifyEnabled(): boolean;
|
|
@@ -10,6 +10,6 @@ export declare class DbNgxActionAutoModifyDirective<T, O> extends AbstractSubscr
|
|
|
10
10
|
constructor(source: ActionContextStoreSourceInstance<T, O>);
|
|
11
11
|
ngOnInit(): void;
|
|
12
12
|
ngOnDestroy(): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionAutoModifyDirective<any, any>, [{ host: true; }]>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionAutoModifyDirective<any, any>, "[dbxActionAutoModify]", never, { "autoModifyEnabled": "dbxActionAutoModify"; }, {}, never>;
|
|
15
15
|
}
|
|
@@ -5,16 +5,16 @@ import { ActionContextStoreSourceInstance } from '../../action.store.source';
|
|
|
5
5
|
import { Maybe } from '@dereekb/util';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
* Extension of
|
|
8
|
+
* Extension of DbxActionTransitionSafetyDirective that automatically triggers the action periodically when it is in a modified state.
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class DbxActionAutoTriggerDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
11
11
|
readonly source: ActionContextStoreSourceInstance<T, O>;
|
|
12
12
|
private _triggerEnabled;
|
|
13
13
|
/**
|
|
14
14
|
* How much to throttle the auto-triggering.
|
|
15
15
|
*/
|
|
16
16
|
get triggerEnabled(): boolean;
|
|
17
|
-
set triggerEnabled(triggerEnabled: boolean);
|
|
17
|
+
set triggerEnabled(triggerEnabled: Maybe<boolean> | any);
|
|
18
18
|
triggerDebounce: number;
|
|
19
19
|
triggerThrottle: number;
|
|
20
20
|
triggerErrorThrottle: number;
|
|
@@ -49,6 +49,6 @@ export declare class DbNgxActionAutoTriggerDirective<T, O> extends AbstractSubsc
|
|
|
49
49
|
get isEnabled(): boolean;
|
|
50
50
|
ngOnInit(): void;
|
|
51
51
|
ngOnDestroy(): void;
|
|
52
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
53
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionAutoTriggerDirective<any, any>, [{ host: true; }]>;
|
|
53
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionAutoTriggerDirective<any, any>, "dbxActionAutoTrigger, [dbxActionAutoTrigger]", never, { "triggerEnabled": "dbxActionAutoTrigger"; "triggerDebounce": "triggerDebounce"; "triggerThrottle": "triggerThrottle"; "triggerErrorThrottle": "triggerErrorThrottle"; "fastTrigger": "fastTrigger"; "instantTrigger": "instantTrigger"; "triggerLimit": "triggerLimit"; }, {}, never>;
|
|
54
54
|
}
|
|
@@ -3,11 +3,11 @@ import { OnInit } from '@angular/core';
|
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { OnDestroy } from '@angular/core';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare type
|
|
6
|
+
export declare type DbxActionAutoTriggerIsModifiedFn<T> = (value: T) => Observable<boolean>;
|
|
7
7
|
/**
|
|
8
8
|
* Directive that watches an observable for changes and sets the new value and modified states as necessary.
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class DbxActionAutoTriggerValueDirective<T, O> implements OnInit, OnDestroy {
|
|
11
11
|
readonly source: ActionContextStoreSourceInstance<T, O>;
|
|
12
12
|
private _valueObs;
|
|
13
13
|
private _isModifiedFn;
|
|
@@ -15,11 +15,11 @@ export declare class DbNgxActionAutoTriggerValueDirective<T, O> implements OnIni
|
|
|
15
15
|
private _triggerSub;
|
|
16
16
|
set dbxActionAutoTriggerValue(dbxActionAutoTriggerValue: Observable<T>);
|
|
17
17
|
set dbxActionAutoTriggerModifiedNonEmptyValue(requireNonEmpty: boolean);
|
|
18
|
-
set dbxActionAutoTriggerModified(dbxActionAutoTriggerModified:
|
|
18
|
+
set dbxActionAutoTriggerModified(dbxActionAutoTriggerModified: DbxActionAutoTriggerIsModifiedFn<T>);
|
|
19
19
|
readonly modifiedValue$: Observable<[boolean, T]>;
|
|
20
20
|
constructor(source: ActionContextStoreSourceInstance<T, O>);
|
|
21
21
|
ngOnInit(): void;
|
|
22
22
|
ngOnDestroy(): void;
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
24
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionAutoTriggerValueDirective<any, any>, [{ host: true; }]>;
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionAutoTriggerValueDirective<any, any>, "[dbxActionAutoTriggerValue]", never, { "dbxActionAutoTriggerValue": "dbxActionAutoTriggerValue"; "dbxActionAutoTriggerModifiedNonEmptyValue": "dbxActionAutoTriggerModifiedNonEmptyValue"; "dbxActionAutoTriggerModified": "dbxActionAutoTriggerModified"; }, {}, never>;
|
|
25
25
|
}
|
|
@@ -3,11 +3,11 @@ import { SecondaryActionContextStoreSource } from '../../action.store.source';
|
|
|
3
3
|
import { ActionContextBaseSource } from '../../action.holder';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
|
-
* Provides an
|
|
6
|
+
* Provides an DbxActionContext.
|
|
7
7
|
*/
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class DbxActionDirective<T = any, O = any> extends ActionContextBaseSource implements OnDestroy {
|
|
9
9
|
constructor(inputSource: SecondaryActionContextStoreSource);
|
|
10
10
|
ngOnDestroy(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
12
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionDirective<any, any>, [{ optional: true; host: true; }]>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionDirective<any, any>, "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", ["action"], {}, {}, never>;
|
|
13
13
|
}
|
|
@@ -3,14 +3,14 @@ import { Maybe } from '@dereekb/util';
|
|
|
3
3
|
import { SecondaryActionContextStoreSource, ActionContextStoreSource } from '../../action.store.source';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
|
-
* Directive that provides a
|
|
6
|
+
* Directive that provides a DbxActionSourceDirective that is passed in.
|
|
7
7
|
*/
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class DbxActionSourceDirective implements SecondaryActionContextStoreSource, OnDestroy {
|
|
9
9
|
private _source;
|
|
10
10
|
readonly store$: import("rxjs").Observable<import("@dereekb/dbx-core").ActionContextStore<any, any>>;
|
|
11
11
|
ngOnDestroy(): void;
|
|
12
12
|
get source(): Maybe<ActionContextStoreSource>;
|
|
13
13
|
set source(source: Maybe<ActionContextStoreSource>);
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
15
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionSourceDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionSourceDirective, "[dbxActionSource]", never, { "source": "dbxActionSource"; }, {}, never>;
|
|
16
16
|
}
|
|
@@ -5,10 +5,10 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
/**
|
|
6
6
|
* Prints out the current state to the console. Useful for debugging.
|
|
7
7
|
*/
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class DbxActionContextLoggerDirective extends AbstractSubscriptionDirective implements OnInit {
|
|
9
9
|
readonly source: ActionContextStoreSourceInstance;
|
|
10
10
|
constructor(source: ActionContextStoreSourceInstance);
|
|
11
11
|
ngOnInit(): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionContextLoggerDirective, [{ host: true; }]>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionContextLoggerDirective, "[dbxActionLogger],[dbxActionContextLogger]", never, {}, {}, never>;
|
|
14
14
|
}
|
|
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
*
|
|
10
10
|
* This is useful for passing action contexts around via the providers instead of explicit injection.
|
|
11
11
|
*/
|
|
12
|
-
export declare class
|
|
12
|
+
export declare class DbxActionContextMapDirective implements ActionContextStoreSourceMap, OnDestroy {
|
|
13
13
|
private readonly _map;
|
|
14
14
|
readonly map$: Observable<Map<string, ActionContextStoreSource<any, any>>>;
|
|
15
15
|
readonly areAnyWorking$: Observable<boolean>;
|
|
@@ -22,14 +22,14 @@ export declare class DbNgxActionContextMapDirective implements ActionContextStor
|
|
|
22
22
|
checkAnyAre(mapFn: (input: ActionContextStore) => Observable<boolean>, emptyArrayValue?: boolean): Observable<boolean>;
|
|
23
23
|
reduceFromAllSources<O, R>(mapFn: (input: ActionContextStore) => Observable<O>, reduceFn: (values: O[]) => R): Observable<R>;
|
|
24
24
|
fromAllSources<O>(mapFn: (input: ActionContextStore) => Observable<O>): Observable<O[]>;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
26
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionContextMapDirective, never>;
|
|
26
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionContextMapDirective, "[dbxActionContextMap]", ["actionMap"], {}, {}, never>;
|
|
27
27
|
}
|
|
28
|
-
export declare class
|
|
28
|
+
export declare class DbxActionContextMapDirectiveSourceInstance implements ActionContextStoreSource {
|
|
29
29
|
private readonly parent;
|
|
30
30
|
readonly key: ActionKey;
|
|
31
31
|
readonly _source$: Observable<ActionContextStoreSource<any, any> | undefined>;
|
|
32
32
|
readonly _store$: Observable<ActionContextStore<any, any> | undefined>;
|
|
33
33
|
readonly store$: Observable<ActionContextStore<any, any>>;
|
|
34
|
-
constructor(parent:
|
|
34
|
+
constructor(parent: DbxActionContextMapDirective, key: ActionKey);
|
|
35
35
|
}
|
|
@@ -2,19 +2,19 @@ import { OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { Maybe } from '@dereekb/util';
|
|
3
3
|
import { ActionKey } from './action.map';
|
|
4
4
|
import { SecondaryActionContextStoreSource } from '../../action.store.source';
|
|
5
|
-
import {
|
|
5
|
+
import { DbxActionContextMapDirective } from './action.map.directive';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
* Directive that provides a ActionContextStoreSource using the input key and
|
|
8
|
+
* Directive that provides a ActionContextStoreSource using the input key and DbxActionContextMapDirective.
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class DbxActionFromMapDirective implements SecondaryActionContextStoreSource, OnDestroy {
|
|
11
11
|
private readonly _map;
|
|
12
12
|
private _key;
|
|
13
13
|
readonly store$: import("rxjs").Observable<import("@dereekb/dbx-core").ActionContextStore<any, any>>;
|
|
14
|
-
constructor(_map:
|
|
14
|
+
constructor(_map: DbxActionContextMapDirective);
|
|
15
15
|
ngOnDestroy(): void;
|
|
16
16
|
get key(): Maybe<ActionKey>;
|
|
17
17
|
set key(key: Maybe<ActionKey>);
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
19
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionFromMapDirective, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionFromMapDirective, "[dbxActionFromMap]", never, { "key": "dbxActionFromMap"; }, {}, never>;
|
|
20
20
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { ActionContextStoreSource } from '../../action.store.source';
|
|
3
|
-
import {
|
|
3
|
+
import { DbxActionContextMapDirective } from './action.map.directive';
|
|
4
4
|
import { ActionKey } from './action.map';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
7
|
* Used to communicate with an dbxActionMap and set the ActionContextStore to the store based on the key.
|
|
8
8
|
*/
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class DbxActionMapSourceDirective implements OnDestroy {
|
|
10
10
|
readonly source: ActionContextStoreSource;
|
|
11
11
|
private readonly _map;
|
|
12
12
|
private _key;
|
|
13
|
-
constructor(source: ActionContextStoreSource, _map:
|
|
13
|
+
constructor(source: ActionContextStoreSource, _map: DbxActionContextMapDirective);
|
|
14
14
|
ngOnDestroy(): void;
|
|
15
15
|
set key(key: ActionKey);
|
|
16
16
|
private _addToStore;
|
|
17
17
|
private _removeFromToStore;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
19
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionMapSourceDirective, [{ host: true; }, null]>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionMapSourceDirective, "[dbxActionMapSource]", never, { "key": "dbxActionMapSource"; }, {}, never>;
|
|
20
20
|
}
|
|
@@ -2,20 +2,20 @@ import { OnInit, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { Maybe } from '@dereekb/util';
|
|
3
3
|
import { AbstractSubscriptionDirective } from '../../../subscription';
|
|
4
4
|
import { ActionContextStoreSourceInstance } from '../../action.store.source';
|
|
5
|
-
import {
|
|
5
|
+
import { DbxActionContextMapDirective } from './action.map.directive';
|
|
6
6
|
import { ActionDisabledKey } from '../../action';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare const DEFAULT_ACTION_MAP_WORKING_DISABLED_KEY = "";
|
|
8
|
+
export declare const DEFAULT_ACTION_MAP_WORKING_DISABLED_KEY = "__disabled";
|
|
9
9
|
/**
|
|
10
10
|
* Used to communicate with an dbxActionMap and set the ActionContextStore to be disabled if any other element in the map is working.
|
|
11
11
|
*/
|
|
12
|
-
export declare class
|
|
12
|
+
export declare class DbxActionMapWorkingDisableDirective extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
13
13
|
readonly source: ActionContextStoreSourceInstance;
|
|
14
14
|
private readonly _map;
|
|
15
15
|
disabledKey: Maybe<ActionDisabledKey>;
|
|
16
|
-
constructor(source: ActionContextStoreSourceInstance, _map:
|
|
16
|
+
constructor(source: ActionContextStoreSourceInstance, _map: DbxActionContextMapDirective);
|
|
17
17
|
ngOnInit(): void;
|
|
18
18
|
ngOnDestroy(): void;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
20
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionMapWorkingDisableDirective, [{ host: true; }, null]>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionMapWorkingDisableDirective, "[dbxActionMapWorkingDisable]", never, { "disabledKey": "dbxActionMapWorkingDisable"; }, {}, never>;
|
|
21
21
|
}
|
|
@@ -6,7 +6,7 @@ export declare const APP_ACTION_DISABLED_DIRECTIVE_KEY = "dbx_action_disabled";
|
|
|
6
6
|
/**
|
|
7
7
|
* Directive that allows disabling an action using the inputs.
|
|
8
8
|
*/
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class DbxActionDisabledDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
10
10
|
readonly source: ActionContextStoreSourceInstance<T, O>;
|
|
11
11
|
private _disabled;
|
|
12
12
|
readonly disabled$: import("rxjs").Observable<boolean>;
|
|
@@ -15,6 +15,6 @@ export declare class DbNgxActionDisabledDirective<T, O> extends AbstractSubscrip
|
|
|
15
15
|
ngOnDestroy(): void;
|
|
16
16
|
get disabled(): boolean;
|
|
17
17
|
set disabled(disabled: boolean);
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
19
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionDisabledDirective<any, any>, [{ host: true; }]>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionDisabledDirective<any, any>, "[dbxActionDisabled]", never, { "disabled": "dbxActionDisabled"; }, {}, never>;
|
|
20
20
|
}
|
|
@@ -6,11 +6,11 @@ export declare const APP_ACTION_DISABLED_UNTIL_MODIFIED_DIRECTIVE_KEY = "dbx_act
|
|
|
6
6
|
/**
|
|
7
7
|
* Directive that sets the disabled state based on the current isModified state.
|
|
8
8
|
*/
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class DbxActionDisabledUntilModifiedDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
10
10
|
readonly source: ActionContextStoreSourceInstance<T, O>;
|
|
11
11
|
constructor(source: ActionContextStoreSourceInstance<T, O>);
|
|
12
12
|
ngOnInit(): void;
|
|
13
13
|
ngOnDestroy(): void;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
15
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionDisabledUntilModifiedDirective<any, any>, [{ host: true; }]>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionDisabledUntilModifiedDirective<any, any>, "[dbxActionDisabledUntilModified]", never, {}, {}, never>;
|
|
16
16
|
}
|
|
@@ -7,7 +7,7 @@ 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
|
|
10
|
+
export declare class DbxActionHandlerDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
11
11
|
readonly source: ActionContextStoreSourceInstance<T, O>;
|
|
12
12
|
private _handlerFunction;
|
|
13
13
|
readonly handlerFunction$: import("rxjs").Observable<HandleActionFunction<T, O>>;
|
|
@@ -17,6 +17,6 @@ export declare class DbNgxActionHandlerDirective<T, O> extends AbstractSubscript
|
|
|
17
17
|
constructor(source: ActionContextStoreSourceInstance<T, O>);
|
|
18
18
|
ngOnInit(): void;
|
|
19
19
|
ngOnDestroy(): void;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
21
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionHandlerDirective<any, any>, [{ host: true; }]>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionHandlerDirective<any, any>, "[dbxActionHandler]", never, { "handlerFunction": "dbxActionHandler"; }, {}, never>;
|
|
22
22
|
}
|
|
@@ -5,11 +5,11 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
*
|
|
6
6
|
* Can be configured to show for a limited time afterwards, etc.
|
|
7
7
|
*/
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class DbxActionSuccessComponent {
|
|
9
9
|
readonly source: ActionContextStoreSourceInstance;
|
|
10
10
|
hideAfter?: number;
|
|
11
11
|
readonly show$: import("rxjs").Observable<boolean>;
|
|
12
12
|
constructor(source: ActionContextStoreSourceInstance);
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionSuccessComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxActionSuccessComponent, "dbx-action-success", never, { "hideAfter": "hideAfter"; }, {}, never, ["*"]>;
|
|
15
15
|
}
|
|
@@ -10,7 +10,7 @@ export declare type SuccessActionFunction<O> = (value: O) => void;
|
|
|
10
10
|
/**
|
|
11
11
|
* Directive that executes a function on ActionContextStore Success.
|
|
12
12
|
*/
|
|
13
|
-
export declare class
|
|
13
|
+
export declare class DbxActionSuccessDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
14
14
|
readonly source: ActionContextStoreSourceInstance;
|
|
15
15
|
private _successFunction;
|
|
16
16
|
readonly successFunction$: import("rxjs").Observable<SuccessActionFunction<O>>;
|
|
@@ -19,6 +19,6 @@ export declare class DbNgxActionSuccessDirective<T, O> extends AbstractSubscript
|
|
|
19
19
|
constructor(source: ActionContextStoreSourceInstance);
|
|
20
20
|
ngOnInit(): void;
|
|
21
21
|
ngOnDestroy(): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
23
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionSuccessDirective<any, any>, [{ host: true; }]>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionSuccessDirective<any, any>, "[dbxActionSuccess]", never, { "successFunction": "dbxActionSuccess"; }, {}, never>;
|
|
24
24
|
}
|
|
@@ -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 with undefined.
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class DbxActionValueDirective<T, O> extends AbstractSubscriptionDirective implements OnInit {
|
|
12
12
|
readonly source: ActionContextStoreSourceInstance<T, O>;
|
|
13
13
|
private _valueOrFunction;
|
|
14
14
|
readonly valueOrFunction$: import("rxjs").Observable<ObjectOrGetter<T>>;
|
|
@@ -17,6 +17,6 @@ export declare class DbNgxActionValueDirective<T, O> extends AbstractSubscriptio
|
|
|
17
17
|
constructor(source: ActionContextStoreSourceInstance<T, O>);
|
|
18
18
|
ngOnInit(): void;
|
|
19
19
|
ngOnDestroy(): void;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
21
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionValueDirective<any, any>, [{ host: true; }]>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionValueDirective<any, any>, "[dbxActionValue]", never, { "valueOrFunction": "dbxActionValue"; }, {}, never>;
|
|
22
22
|
}
|
|
@@ -3,10 +3,10 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
/**
|
|
4
4
|
* Displays the input content when working is set.
|
|
5
5
|
*/
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class DbxActionWorkingComponent {
|
|
7
7
|
readonly source: ActionContextStoreSourceInstance;
|
|
8
8
|
readonly show$: import("rxjs").Observable<boolean>;
|
|
9
9
|
constructor(source: ActionContextStoreSourceInstance);
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionWorkingComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxActionWorkingComponent, "dbx-action-working", never, {}, {}, never, ["*"]>;
|
|
12
12
|
}
|
|
@@ -39,11 +39,11 @@ export interface ActionSnackbarPopupConfig<C = any> {
|
|
|
39
39
|
* Performs the action on success.
|
|
40
40
|
*/
|
|
41
41
|
export declare type ActionSnackbarFunction<O = any, C = any> = (event: ActionSnackbarEvent<O>) => ActionSnackbarPopupConfig<C>;
|
|
42
|
-
export interface
|
|
42
|
+
export interface DbxActionSnackbarGetUndoConfig extends Omit<DbxActionSnackbarComponentConfig, 'message' | 'action'>, Partial<Pick<DbxActionSnackbarComponentConfig, 'message' | 'action'>> {
|
|
43
43
|
duration?: number;
|
|
44
44
|
}
|
|
45
|
-
export declare type ActionSnackbarGetUndoConfigFunction = () => Maybe<
|
|
46
|
-
export interface
|
|
45
|
+
export declare type ActionSnackbarGetUndoConfigFunction = () => Maybe<DbxActionSnackbarGetUndoConfig>;
|
|
46
|
+
export interface DbxActionSnackbarComponentConfig {
|
|
47
47
|
action: string;
|
|
48
48
|
message?: Maybe<string>;
|
|
49
49
|
actionSource: ActionContextStoreSourceInstance;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { OnInit, OnDestroy, NgZone } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { DbxButton } from '../button';
|
|
3
3
|
import { ActionContextStoreSourceInstance } from '../../action/action.store.source';
|
|
4
|
-
import {
|
|
4
|
+
import { DbxActionButtonTriggerDirective } from './action.button.trigger.directive';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
7
|
* Context used for linking a button to an ActionContext.
|
|
8
8
|
*/
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class DbxActionButtonDirective extends DbxActionButtonTriggerDirective implements OnInit, OnDestroy {
|
|
10
10
|
private readonly ngZone;
|
|
11
11
|
private _workingSub;
|
|
12
12
|
private _disabledSub;
|
|
13
|
-
constructor(button:
|
|
13
|
+
constructor(button: DbxButton, source: ActionContextStoreSourceInstance, ngZone: NgZone);
|
|
14
14
|
ngOnInit(): void;
|
|
15
15
|
ngOnDestroy(): void;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
17
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionButtonDirective, [{ host: true; }, null, null]>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionButtonDirective, "[dbxActionButton]", never, {}, {}, never>;
|
|
18
18
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractSubscriptionDirective } from '../../subscription';
|
|
3
|
-
import {
|
|
3
|
+
import { DbxButton } from '../button';
|
|
4
4
|
import { ActionContextStoreSourceInstance } from '../../action/action.store.source';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
7
|
* Context used for linking a button to an ActionContext and only look for triggers.
|
|
8
8
|
*/
|
|
9
|
-
export declare class
|
|
10
|
-
readonly button:
|
|
9
|
+
export declare class DbxActionButtonTriggerDirective extends AbstractSubscriptionDirective implements OnInit {
|
|
10
|
+
readonly button: DbxButton;
|
|
11
11
|
readonly source: ActionContextStoreSourceInstance;
|
|
12
|
-
constructor(button:
|
|
12
|
+
constructor(button: DbxButton, source: ActionContextStoreSourceInstance);
|
|
13
13
|
ngOnInit(): void;
|
|
14
14
|
protected _buttonClicked(): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionButtonTriggerDirective, [{ host: true; }, null]>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionButtonTriggerDirective, "[dbxActionButtonTrigger]", never, {}, {}, never>;
|
|
17
17
|
}
|
package/lib/button/button.d.ts
CHANGED
|
@@ -6,13 +6,13 @@ import { Observable } from 'rxjs';
|
|
|
6
6
|
*
|
|
7
7
|
* Can be used to delay/modify trigger/click behaviors.
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface DbxButtonInterceptor {
|
|
10
10
|
/**
|
|
11
11
|
* Handles a button click event. Returns an observable that will say whether or not to continue the click event.
|
|
12
12
|
*/
|
|
13
13
|
interceptButtonClick: () => Observable<boolean>;
|
|
14
14
|
}
|
|
15
|
-
export declare abstract class
|
|
15
|
+
export declare abstract class DbxButton {
|
|
16
16
|
abstract disabled$: Observable<boolean>;
|
|
17
17
|
abstract working$: Observable<boolean>;
|
|
18
18
|
abstract disabled: Maybe<boolean>;
|
|
@@ -20,7 +20,7 @@ export declare abstract class DbNgxButton {
|
|
|
20
20
|
abstract icon?: string;
|
|
21
21
|
abstract text?: string;
|
|
22
22
|
abstract clicked$: Observable<any>;
|
|
23
|
-
abstract setButtonInterceptor(interceptor:
|
|
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[];
|
|
@@ -2,12 +2,12 @@ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { Maybe } from '@dereekb/util';
|
|
3
3
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
4
4
|
import { AbstractSubscriptionDirective } from '../subscription';
|
|
5
|
-
import {
|
|
5
|
+
import { DbxButton, DbxButtonInterceptor } from './button';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
8
|
* Abstract button component.
|
|
9
9
|
*/
|
|
10
|
-
export declare abstract class
|
|
10
|
+
export declare abstract class AbstractDbxButtonDirective extends AbstractSubscriptionDirective implements DbxButton, OnInit, OnDestroy {
|
|
11
11
|
private _disabled;
|
|
12
12
|
private _working;
|
|
13
13
|
readonly disabled$: import("rxjs").Observable<boolean>;
|
|
@@ -25,13 +25,13 @@ export declare abstract class AbstractDbNgxButtonDirective extends AbstractSubsc
|
|
|
25
25
|
* Pre-interceptor button click.
|
|
26
26
|
*/
|
|
27
27
|
protected _buttonClick: Subject<void>;
|
|
28
|
-
protected _buttonInterceptor: BehaviorSubject<Maybe<
|
|
28
|
+
protected _buttonInterceptor: BehaviorSubject<Maybe<DbxButtonInterceptor>>;
|
|
29
29
|
ngOnInit(): void;
|
|
30
30
|
ngOnDestroy(): void;
|
|
31
31
|
/**
|
|
32
32
|
* Sets the button interceptor. If any interceptor is already set, it is replaced.
|
|
33
33
|
*/
|
|
34
|
-
setButtonInterceptor(interceptor:
|
|
34
|
+
setButtonInterceptor(interceptor: DbxButtonInterceptor): void;
|
|
35
35
|
/**
|
|
36
36
|
* Main function to use for handling clicks on the button.
|
|
37
37
|
*/
|
|
@@ -40,13 +40,13 @@ export declare abstract class AbstractDbNgxButtonDirective extends AbstractSubsc
|
|
|
40
40
|
* Forces a button click. Skips the interceptors if any are configured.
|
|
41
41
|
*/
|
|
42
42
|
protected _forceButtonClicked(): void;
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
44
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbxButtonDirective, never>;
|
|
44
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxButtonDirective, never, never, { "disabled": "disabled"; "working": "working"; "icon": "icon"; "text": "text"; }, { "buttonClick": "buttonClick"; }, never>;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* Provides an
|
|
47
|
+
* Provides an DbxButton directive.
|
|
48
48
|
*/
|
|
49
|
-
export declare class
|
|
50
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
51
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<
|
|
49
|
+
export declare class DbxButtonDirective extends AbstractDbxButtonDirective {
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxButtonDirective, never>;
|
|
51
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxButtonDirective, "[dbxButton]", ["dbxButton"], {}, {}, never>;
|
|
52
52
|
}
|