@dereekb/dbx-core 0.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/README.md +7 -0
- package/dereekb-dbx-core.d.ts +5 -0
- package/esm2020/dereekb-dbx-core.mjs +5 -0
- package/esm2020/index.mjs +2 -0
- package/esm2020/lib/action/action.handler.mjs +140 -0
- package/esm2020/lib/action/action.holder.mjs +50 -0
- package/esm2020/lib/action/action.machine.mjs +37 -0
- package/esm2020/lib/action/action.mjs +51 -0
- package/esm2020/lib/action/action.module.mjs +38 -0
- package/esm2020/lib/action/action.store.mjs +188 -0
- package/esm2020/lib/action/action.store.source.mjs +149 -0
- package/esm2020/lib/action/directive/auto/action.automodify.directive.mjs +53 -0
- package/esm2020/lib/action/directive/auto/action.autotrigger.directive.mjs +131 -0
- package/esm2020/lib/action/directive/auto/action.autotrigger.value.directive.mjs +79 -0
- package/esm2020/lib/action/directive/auto/index.mjs +4 -0
- package/esm2020/lib/action/directive/context/action.component.mjs +18 -0
- package/esm2020/lib/action/directive/context/action.directive.mjs +33 -0
- package/esm2020/lib/action/directive/context/action.source.directive.mjs +40 -0
- package/esm2020/lib/action/directive/context/index.mjs +4 -0
- package/esm2020/lib/action/directive/debug/action.logger.directive.mjs +30 -0
- package/esm2020/lib/action/directive/debug/index.mjs +2 -0
- package/esm2020/lib/action/directive/index.mjs +6 -0
- package/esm2020/lib/action/directive/map/action.map.directive.mjs +74 -0
- package/esm2020/lib/action/directive/map/action.map.key.directive.mjs +40 -0
- package/esm2020/lib/action/directive/map/action.map.mjs +6 -0
- package/esm2020/lib/action/directive/map/action.map.source.directive.mjs +49 -0
- package/esm2020/lib/action/directive/map/action.map.working.disable.directive.mjs +41 -0
- package/esm2020/lib/action/directive/map/index.mjs +6 -0
- package/esm2020/lib/action/directive/state/action.disabled.directive.mjs +49 -0
- package/esm2020/lib/action/directive/state/action.disabled.modified.directive.mjs +35 -0
- package/esm2020/lib/action/directive/state/action.handler.directive.mjs +55 -0
- package/esm2020/lib/action/directive/state/action.success.component.mjs +50 -0
- package/esm2020/lib/action/directive/state/action.success.directive.mjs +48 -0
- package/esm2020/lib/action/directive/state/action.value.directive.mjs +52 -0
- package/esm2020/lib/action/directive/state/action.working.component.mjs +32 -0
- package/esm2020/lib/action/directive/state/index.mjs +8 -0
- package/esm2020/lib/action/index.mjs +10 -0
- package/esm2020/lib/action/snackbar/index.mjs +3 -0
- package/esm2020/lib/action/snackbar/snackbar.mjs +24 -0
- package/esm2020/lib/button/action/action.button.directive.mjs +46 -0
- package/esm2020/lib/button/action/action.button.trigger.directive.mjs +36 -0
- package/esm2020/lib/button/action/index.mjs +3 -0
- package/esm2020/lib/button/button.directive.mjs +109 -0
- package/esm2020/lib/button/button.loading.directive.mjs +43 -0
- package/esm2020/lib/button/button.mjs +9 -0
- package/esm2020/lib/button/button.module.mjs +40 -0
- package/esm2020/lib/button/index.mjs +7 -0
- package/esm2020/lib/button/router/button.segue.directive.mjs +43 -0
- package/esm2020/lib/button/router/index.mjs +2 -0
- package/esm2020/lib/index.mjs +9 -0
- package/esm2020/lib/injected/index.mjs +6 -0
- package/esm2020/lib/injected/injected.component.mjs +34 -0
- package/esm2020/lib/injected/injected.component.module.mjs +26 -0
- package/esm2020/lib/injected/injected.directive.mjs +32 -0
- package/esm2020/lib/injected/injected.instance.mjs +101 -0
- package/esm2020/lib/injected/injected.mjs +2 -0
- package/esm2020/lib/pipe/date/date.pipe.module.mjs +54 -0
- package/esm2020/lib/pipe/date/datedistance.pipe.mjs +42 -0
- package/esm2020/lib/pipe/date/dateformatdistance.pipe.mjs +37 -0
- package/esm2020/lib/pipe/date/datefromtoformat.pipe.mjs +35 -0
- package/esm2020/lib/pipe/date/index.mjs +9 -0
- package/esm2020/lib/pipe/date/minutesstring.pipe.mjs +32 -0
- package/esm2020/lib/pipe/date/timedistance.pipe.mjs +49 -0
- package/esm2020/lib/pipe/date/tojsdate.pipe.mjs +18 -0
- package/esm2020/lib/pipe/date/tominutes.pipe.mjs +17 -0
- package/esm2020/lib/pipe/index.mjs +2 -0
- package/esm2020/lib/router/anchor/anchor.directive.mjs +40 -0
- package/esm2020/lib/router/anchor/anchor.mjs +35 -0
- package/esm2020/lib/router/anchor/clickable.mjs +2 -0
- package/esm2020/lib/router/anchor/index.mjs +4 -0
- package/esm2020/lib/router/index.mjs +4 -0
- package/esm2020/lib/router/router/index.mjs +4 -0
- package/esm2020/lib/router/router/provider/angular/angular.router.service.mjs +51 -0
- package/esm2020/lib/router/router/provider/angular/angular.router.service.module.mjs +30 -0
- package/esm2020/lib/router/router/provider/angular/index.mjs +3 -0
- package/esm2020/lib/router/router/provider/index.mjs +3 -0
- package/esm2020/lib/router/router/provider/uirouter/index.mjs +3 -0
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.mjs +39 -0
- package/esm2020/lib/router/router/provider/uirouter/uirouter.router.service.module.mjs +31 -0
- package/esm2020/lib/router/router/service/index.mjs +3 -0
- package/esm2020/lib/router/router/service/router.service.mjs +6 -0
- package/esm2020/lib/router/router/service/router.transition.service.mjs +6 -0
- package/esm2020/lib/router/router/transition/index.mjs +3 -0
- package/esm2020/lib/router/router/transition/transition.mjs +12 -0
- package/esm2020/lib/router/router/transition/transition.watcher.directive.mjs +35 -0
- package/esm2020/lib/router/segue.mjs +8 -0
- package/esm2020/lib/storage/index.mjs +9 -0
- package/esm2020/lib/storage/storage.accessor.mjs +16 -0
- package/esm2020/lib/storage/storage.accessor.simple.factory.mjs +33 -0
- package/esm2020/lib/storage/storage.accessor.simple.mjs +161 -0
- package/esm2020/lib/storage/storage.accessor.string.mjs +50 -0
- package/esm2020/lib/storage/storage.di.mjs +4 -0
- package/esm2020/lib/storage/storage.module.mjs +37 -0
- package/esm2020/lib/storage/storage.object.localstorage.mjs +46 -0
- package/esm2020/lib/storage/storage.object.memory.mjs +17 -0
- package/esm2020/lib/subscription/index.mjs +2 -0
- package/esm2020/lib/subscription/subscription.directive.mjs +46 -0
- package/esm2020/lib/util/index.mjs +2 -0
- package/esm2020/lib/util/view.mjs +34 -0
- package/fesm2015/dereekb-dbx-core.mjs +2875 -0
- package/fesm2015/dereekb-dbx-core.mjs.map +1 -0
- package/fesm2020/dereekb-dbx-core.mjs +2856 -0
- package/fesm2020/dereekb-dbx-core.mjs.map +1 -0
- package/index.d.ts +1 -0
- package/lib/action/action.d.ts +43 -0
- package/lib/action/action.handler.d.ts +73 -0
- package/lib/action/action.holder.d.ts +28 -0
- package/lib/action/action.machine.d.ts +23 -0
- package/lib/action/action.module.d.ts +25 -0
- package/lib/action/action.store.d.ts +147 -0
- package/lib/action/action.store.source.d.ts +72 -0
- package/lib/action/directive/auto/action.automodify.directive.d.ts +15 -0
- package/lib/action/directive/auto/action.autotrigger.directive.d.ts +54 -0
- package/lib/action/directive/auto/action.autotrigger.value.directive.d.ts +25 -0
- package/lib/action/directive/auto/index.d.ts +3 -0
- package/lib/action/directive/context/action.component.d.ts +6 -0
- package/lib/action/directive/context/action.directive.d.ts +13 -0
- package/lib/action/directive/context/action.source.directive.d.ts +16 -0
- package/lib/action/directive/context/index.d.ts +3 -0
- package/lib/action/directive/debug/action.logger.directive.d.ts +14 -0
- package/lib/action/directive/debug/index.d.ts +1 -0
- package/lib/action/directive/index.d.ts +5 -0
- package/lib/action/directive/map/action.map.d.ts +13 -0
- package/lib/action/directive/map/action.map.directive.d.ts +35 -0
- package/lib/action/directive/map/action.map.key.directive.d.ts +20 -0
- package/lib/action/directive/map/action.map.source.directive.d.ts +20 -0
- package/lib/action/directive/map/action.map.working.disable.directive.d.ts +21 -0
- package/lib/action/directive/map/index.d.ts +5 -0
- package/lib/action/directive/state/action.disabled.directive.d.ts +20 -0
- package/lib/action/directive/state/action.disabled.modified.directive.d.ts +16 -0
- package/lib/action/directive/state/action.handler.directive.d.ts +22 -0
- package/lib/action/directive/state/action.success.component.d.ts +15 -0
- package/lib/action/directive/state/action.success.directive.d.ts +24 -0
- package/lib/action/directive/state/action.value.directive.d.ts +22 -0
- package/lib/action/directive/state/action.working.component.d.ts +12 -0
- package/lib/action/directive/state/index.d.ts +7 -0
- package/lib/action/index.d.ts +9 -0
- package/lib/action/snackbar/index.d.ts +1 -0
- package/lib/action/snackbar/snackbar.d.ts +50 -0
- package/lib/button/action/action.button.directive.d.ts +18 -0
- package/lib/button/action/action.button.trigger.directive.d.ts +17 -0
- package/lib/button/action/index.d.ts +2 -0
- package/lib/button/button.d.ts +26 -0
- package/lib/button/button.directive.d.ts +52 -0
- package/lib/button/button.loading.directive.d.ts +21 -0
- package/lib/button/button.module.d.ts +11 -0
- package/lib/button/index.d.ts +6 -0
- package/lib/button/router/button.segue.directive.d.ts +18 -0
- package/lib/button/router/index.d.ts +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/injected/index.d.ts +5 -0
- package/lib/injected/injected.component.d.ts +15 -0
- package/lib/injected/injected.component.module.d.ts +8 -0
- package/lib/injected/injected.d.ts +26 -0
- package/lib/injected/injected.directive.d.ts +17 -0
- package/lib/injected/injected.instance.d.ts +29 -0
- package/lib/pipe/date/date.pipe.module.d.ts +13 -0
- package/lib/pipe/date/datedistance.pipe.d.ts +8 -0
- package/lib/pipe/date/dateformatdistance.pipe.d.ts +13 -0
- package/lib/pipe/date/datefromtoformat.pipe.d.ts +14 -0
- package/lib/pipe/date/index.d.ts +8 -0
- package/lib/pipe/date/minutesstring.pipe.d.ts +8 -0
- package/lib/pipe/date/timedistance.pipe.d.ts +13 -0
- package/lib/pipe/date/tojsdate.pipe.d.ts +9 -0
- package/lib/pipe/date/tominutes.pipe.d.ts +7 -0
- package/lib/pipe/index.d.ts +1 -0
- package/lib/router/anchor/anchor.d.ts +31 -0
- package/lib/router/anchor/anchor.directive.d.ts +20 -0
- package/lib/router/anchor/clickable.d.ts +17 -0
- package/lib/router/anchor/index.d.ts +3 -0
- package/lib/router/index.d.ts +3 -0
- package/lib/router/router/index.d.ts +3 -0
- package/lib/router/router/provider/angular/angular.router.service.d.ts +17 -0
- package/lib/router/router/provider/angular/angular.router.service.module.d.ts +8 -0
- package/lib/router/router/provider/angular/index.d.ts +2 -0
- package/lib/router/router/provider/index.d.ts +2 -0
- package/lib/router/router/provider/uirouter/index.d.ts +2 -0
- package/lib/router/router/provider/uirouter/uirouter.router.service.d.ts +19 -0
- package/lib/router/router/provider/uirouter/uirouter.router.service.module.d.ts +8 -0
- package/lib/router/router/service/index.d.ts +2 -0
- package/lib/router/router/service/router.service.d.ts +12 -0
- package/lib/router/router/service/router.transition.service.d.ts +11 -0
- package/lib/router/router/transition/index.d.ts +2 -0
- package/lib/router/router/transition/transition.d.ts +13 -0
- package/lib/router/router/transition/transition.watcher.directive.d.ts +18 -0
- package/lib/router/segue.d.ts +28 -0
- package/lib/storage/index.d.ts +8 -0
- package/lib/storage/storage.accessor.d.ts +35 -0
- package/lib/storage/storage.accessor.simple.d.ts +75 -0
- package/lib/storage/storage.accessor.simple.factory.d.ts +18 -0
- package/lib/storage/storage.accessor.string.d.ts +16 -0
- package/lib/storage/storage.di.d.ts +3 -0
- package/lib/storage/storage.module.d.ts +10 -0
- package/lib/storage/storage.object.localstorage.d.ts +16 -0
- package/lib/storage/storage.object.memory.d.ts +9 -0
- package/lib/subscription/index.d.ts +1 -0
- package/lib/subscription/subscription.directive.d.ts +25 -0
- package/lib/util/index.d.ts +1 -0
- package/lib/util/view.d.ts +22 -0
- package/package.json +52 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ActionContextStoreSourceInstance } from '../../action.store.source';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Displays the input content when success is set.
|
|
5
|
+
*
|
|
6
|
+
* Can be configured to show for a limited time afterwards, etc.
|
|
7
|
+
*/
|
|
8
|
+
export declare class DbNgxActionSuccessComponent {
|
|
9
|
+
readonly source: ActionContextStoreSourceInstance;
|
|
10
|
+
hideAfter?: number;
|
|
11
|
+
readonly show$: import("rxjs").Observable<boolean>;
|
|
12
|
+
constructor(source: ActionContextStoreSourceInstance);
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxActionSuccessComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbNgxActionSuccessComponent, "dbx-action-success", never, { "hideAfter": "hideAfter"; }, {}, never, ["*"]>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { AbstractSubscriptionDirective } from '../../../subscription';
|
|
4
|
+
import { ActionContextStoreSourceInstance } from '../../action.store.source';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Performs the action on success.
|
|
8
|
+
*/
|
|
9
|
+
export declare type SuccessActionFunction<O> = (value: O) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Directive that executes a function on ActionContextStore Success.
|
|
12
|
+
*/
|
|
13
|
+
export declare class DbNgxActionSuccessDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
14
|
+
readonly source: ActionContextStoreSourceInstance;
|
|
15
|
+
private _successFunction;
|
|
16
|
+
readonly successFunction$: import("rxjs").Observable<SuccessActionFunction<O>>;
|
|
17
|
+
get successFunction(): Maybe<SuccessActionFunction<O>>;
|
|
18
|
+
set successFunction(successFunction: Maybe<SuccessActionFunction<O>>);
|
|
19
|
+
constructor(source: ActionContextStoreSourceInstance);
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
ngOnDestroy(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxActionSuccessDirective<any, any>, [{ host: true; }]>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbNgxActionSuccessDirective<any, any>, "[dbxActionSuccess]", never, { "successFunction": "dbxActionSuccess"; }, {}, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { Maybe, ObjectOrGetter } from '@dereekb/util';
|
|
3
|
+
import { AbstractSubscriptionDirective } from '../../../subscription';
|
|
4
|
+
import { ActionContextStoreSourceInstance } from '../../action.store.source';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Directive that provides a default value when triggered.
|
|
8
|
+
*
|
|
9
|
+
* No value is required, allowing the directive to automatically call readyValue with undefined.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DbNgxActionValueDirective<T, O> extends AbstractSubscriptionDirective implements OnInit {
|
|
12
|
+
readonly source: ActionContextStoreSourceInstance<T, O>;
|
|
13
|
+
private _valueOrFunction;
|
|
14
|
+
readonly valueOrFunction$: import("rxjs").Observable<ObjectOrGetter<T>>;
|
|
15
|
+
get valueOrFunction(): Maybe<ObjectOrGetter<T>>;
|
|
16
|
+
set valueOrFunction(valueOrFunction: Maybe<ObjectOrGetter<T>>);
|
|
17
|
+
constructor(source: ActionContextStoreSourceInstance<T, O>);
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
ngOnDestroy(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxActionValueDirective<any, any>, [{ host: true; }]>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbNgxActionValueDirective<any, any>, "[dbxActionValue]", never, { "valueOrFunction": "dbxActionValue"; }, {}, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ActionContextStoreSourceInstance } from '../../action.store.source';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Displays the input content when working is set.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DbNgxActionWorkingComponent {
|
|
7
|
+
readonly source: ActionContextStoreSourceInstance;
|
|
8
|
+
readonly show$: import("rxjs").Observable<boolean>;
|
|
9
|
+
constructor(source: ActionContextStoreSourceInstance);
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxActionWorkingComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbNgxActionWorkingComponent, "dbx-action-working", never, {}, {}, never, ["*"]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './action.disabled.directive';
|
|
2
|
+
export * from './action.disabled.modified.directive';
|
|
3
|
+
export * from './action.handler.directive';
|
|
4
|
+
export * from './action.success.component';
|
|
5
|
+
export * from './action.success.directive';
|
|
6
|
+
export * from './action.value.directive';
|
|
7
|
+
export * from './action.working.component';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './directive';
|
|
2
|
+
export * from './snackbar';
|
|
3
|
+
export * from './action.handler';
|
|
4
|
+
export * from './action.holder';
|
|
5
|
+
export * from './action.machine';
|
|
6
|
+
export * from './action.module';
|
|
7
|
+
export * from './action.store.source';
|
|
8
|
+
export * from './action.store';
|
|
9
|
+
export * from './action';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './snackbar';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Type } from "@angular/core";
|
|
2
|
+
import { Maybe } from "@dereekb/util";
|
|
3
|
+
import { ActionContextStoreSourceInstance } from "../action.store.source";
|
|
4
|
+
export declare const DEFAULT_SNACKBAR_DIRECTIVE_DURATION: number;
|
|
5
|
+
export declare const DEFAULT_SNACKBAR_UNDO_DIRECTIVE_DURATION: number;
|
|
6
|
+
export declare enum ActionSnackbarDefaultType {
|
|
7
|
+
NONE = "none",
|
|
8
|
+
CREATE = "create",
|
|
9
|
+
SAVE = "save",
|
|
10
|
+
DELETE = "delete",
|
|
11
|
+
MERGE = "merge",
|
|
12
|
+
SEND = "send",
|
|
13
|
+
CANCEL = "cancel",
|
|
14
|
+
RESTORE = "restore",
|
|
15
|
+
REFRESH = "refresh",
|
|
16
|
+
MARK_READ = "read",
|
|
17
|
+
MARK_UNREAD = "unread"
|
|
18
|
+
}
|
|
19
|
+
export declare enum ActionSnackbarEventType {
|
|
20
|
+
WORKING = 0,
|
|
21
|
+
SUCCESS = 1,
|
|
22
|
+
REJECTED = 2
|
|
23
|
+
}
|
|
24
|
+
export interface ActionSnackbarEvent<O = any> {
|
|
25
|
+
type: ActionSnackbarEventType;
|
|
26
|
+
value?: Maybe<O>;
|
|
27
|
+
error?: Maybe<any>;
|
|
28
|
+
}
|
|
29
|
+
export interface ActionSnackBarOpenConfig {
|
|
30
|
+
message: string;
|
|
31
|
+
action?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ActionSnackbarPopupConfig<C = any> {
|
|
34
|
+
open?: ActionSnackBarOpenConfig;
|
|
35
|
+
component?: Maybe<Type<any>>;
|
|
36
|
+
config?: C;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Performs the action on success.
|
|
40
|
+
*/
|
|
41
|
+
export declare type ActionSnackbarFunction<O = any, C = any> = (event: ActionSnackbarEvent<O>) => ActionSnackbarPopupConfig<C>;
|
|
42
|
+
export interface DbNgxActionSnackbarGetUndoConfig extends Omit<DbNgxActionSnackbarComponentConfig, 'message' | 'action'>, Partial<Pick<DbNgxActionSnackbarComponentConfig, 'message' | 'action'>> {
|
|
43
|
+
duration?: number;
|
|
44
|
+
}
|
|
45
|
+
export declare type ActionSnackbarGetUndoConfigFunction = () => Maybe<DbNgxActionSnackbarGetUndoConfig>;
|
|
46
|
+
export interface DbNgxActionSnackbarComponentConfig {
|
|
47
|
+
action: string;
|
|
48
|
+
message?: Maybe<string>;
|
|
49
|
+
actionSource: ActionContextStoreSourceInstance;
|
|
50
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, NgZone } from '@angular/core';
|
|
2
|
+
import { DbNgxButton } from '../button';
|
|
3
|
+
import { ActionContextStoreSourceInstance } from '../../action/action.store.source';
|
|
4
|
+
import { DbNgxActionButtonTriggerDirective } from './action.button.trigger.directive';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Context used for linking a button to an ActionContext.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DbNgxActionButtonDirective extends DbNgxActionButtonTriggerDirective implements OnInit, OnDestroy {
|
|
10
|
+
private readonly ngZone;
|
|
11
|
+
private _workingSub;
|
|
12
|
+
private _disabledSub;
|
|
13
|
+
constructor(button: DbNgxButton, source: ActionContextStoreSourceInstance, ngZone: NgZone);
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxActionButtonDirective, [{ host: true; }, null, null]>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbNgxActionButtonDirective, "[dbxActionButton]", never, {}, {}, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractSubscriptionDirective } from '../../subscription';
|
|
3
|
+
import { DbNgxButton } from '../button';
|
|
4
|
+
import { ActionContextStoreSourceInstance } from '../../action/action.store.source';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Context used for linking a button to an ActionContext and only look for triggers.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DbNgxActionButtonTriggerDirective extends AbstractSubscriptionDirective implements OnInit {
|
|
10
|
+
readonly button: DbNgxButton;
|
|
11
|
+
readonly source: ActionContextStoreSourceInstance;
|
|
12
|
+
constructor(button: DbNgxButton, source: ActionContextStoreSourceInstance);
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
protected _buttonClicked(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxActionButtonTriggerDirective, [{ host: true; }, null]>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbNgxActionButtonTriggerDirective, "[dbxActionButtonTrigger]", never, {}, {}, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Type, Provider } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
/**
|
|
5
|
+
* Used for intercepting button click events.
|
|
6
|
+
*
|
|
7
|
+
* Can be used to delay/modify trigger/click behaviors.
|
|
8
|
+
*/
|
|
9
|
+
export interface DbNgxButtonInterceptor {
|
|
10
|
+
/**
|
|
11
|
+
* Handles a button click event. Returns an observable that will say whether or not to continue the click event.
|
|
12
|
+
*/
|
|
13
|
+
interceptButtonClick: () => Observable<boolean>;
|
|
14
|
+
}
|
|
15
|
+
export declare abstract class DbNgxButton {
|
|
16
|
+
abstract disabled$: Observable<boolean>;
|
|
17
|
+
abstract working$: Observable<boolean>;
|
|
18
|
+
abstract disabled: Maybe<boolean>;
|
|
19
|
+
abstract working: Maybe<boolean>;
|
|
20
|
+
abstract icon?: string;
|
|
21
|
+
abstract text?: string;
|
|
22
|
+
abstract clicked$: Observable<any>;
|
|
23
|
+
abstract setButtonInterceptor(interceptor: DbNgxButtonInterceptor): void;
|
|
24
|
+
abstract clickButton(): void;
|
|
25
|
+
}
|
|
26
|
+
export declare function ProvideDbNgxButton<S extends DbNgxButton>(sourceType: Type<S>): Provider[];
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { BehaviorSubject, Subject } from 'rxjs';
|
|
4
|
+
import { AbstractSubscriptionDirective } from '../subscription';
|
|
5
|
+
import { DbNgxButton, DbNgxButtonInterceptor } from './button';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Abstract button component.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class AbstractDbNgxButtonDirective extends AbstractSubscriptionDirective implements DbNgxButton, OnInit, OnDestroy {
|
|
11
|
+
private _disabled;
|
|
12
|
+
private _working;
|
|
13
|
+
readonly disabled$: import("rxjs").Observable<boolean>;
|
|
14
|
+
readonly working$: import("rxjs").Observable<boolean>;
|
|
15
|
+
get disabled(): boolean;
|
|
16
|
+
set disabled(disabled: boolean);
|
|
17
|
+
get working(): boolean;
|
|
18
|
+
set working(working: boolean);
|
|
19
|
+
icon?: string;
|
|
20
|
+
text?: string;
|
|
21
|
+
readonly buttonClick: EventEmitter<any>;
|
|
22
|
+
readonly clicked$: import("rxjs").Observable<any>;
|
|
23
|
+
constructor();
|
|
24
|
+
/**
|
|
25
|
+
* Pre-interceptor button click.
|
|
26
|
+
*/
|
|
27
|
+
protected _buttonClick: Subject<void>;
|
|
28
|
+
protected _buttonInterceptor: BehaviorSubject<Maybe<DbNgxButtonInterceptor>>;
|
|
29
|
+
ngOnInit(): void;
|
|
30
|
+
ngOnDestroy(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Sets the button interceptor. If any interceptor is already set, it is replaced.
|
|
33
|
+
*/
|
|
34
|
+
setButtonInterceptor(interceptor: DbNgxButtonInterceptor): void;
|
|
35
|
+
/**
|
|
36
|
+
* Main function to use for handling clicks on the button.
|
|
37
|
+
*/
|
|
38
|
+
clickButton(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Forces a button click. Skips the interceptors if any are configured.
|
|
41
|
+
*/
|
|
42
|
+
protected _forceButtonClicked(): void;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbNgxButtonDirective, never>;
|
|
44
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbNgxButtonDirective, never, never, { "disabled": "disabled"; "working": "working"; "icon": "icon"; "text": "text"; }, { "buttonClick": "buttonClick"; }, never>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Provides an DbNgxButton directive.
|
|
48
|
+
*/
|
|
49
|
+
export declare class DbNgxButtonDirective extends AbstractDbNgxButtonDirective {
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxButtonDirective, never>;
|
|
51
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbNgxButtonDirective, "[dbxButton]", ["dbxButton"], {}, {}, never>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
|
+
import { LoadingContext } from '@dereekb/rxjs';
|
|
3
|
+
import { AbstractSubscriptionDirective } from '../subscription';
|
|
4
|
+
import { DbNgxButton } from './button';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Context used for linking a button to a LoadingContext.
|
|
8
|
+
*
|
|
9
|
+
* It will be set working when the context is set loading.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DbNgxLoadingButtonDirective extends AbstractSubscriptionDirective {
|
|
12
|
+
readonly button: DbNgxButton;
|
|
13
|
+
readonly ngZone: NgZone;
|
|
14
|
+
constructor(button: DbNgxButton, ngZone: NgZone);
|
|
15
|
+
/**
|
|
16
|
+
* Sets a LoadingContext that is watched for the loading state.
|
|
17
|
+
*/
|
|
18
|
+
set context(context: LoadingContext);
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxLoadingButtonDirective, [{ host: true; }, null]>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbNgxLoadingButtonDirective, "[dbxLoadingButton]", never, { "context": "dbxLoadingButton"; }, {}, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./button.directive";
|
|
3
|
+
import * as i2 from "./button.loading.directive";
|
|
4
|
+
import * as i3 from "./action/action.button.trigger.directive";
|
|
5
|
+
import * as i4 from "./action/action.button.directive";
|
|
6
|
+
import * as i5 from "./router/button.segue.directive";
|
|
7
|
+
export declare class DbNgxCoreButtonModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxCoreButtonModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbNgxCoreButtonModule, [typeof i1.DbNgxButtonDirective, typeof i2.DbNgxLoadingButtonDirective, typeof i3.DbNgxActionButtonTriggerDirective, typeof i4.DbNgxActionButtonDirective, typeof i5.DbNgxButtonSegueDirective], never, [typeof i1.DbNgxButtonDirective, typeof i2.DbNgxLoadingButtonDirective, typeof i3.DbNgxActionButtonTriggerDirective, typeof i4.DbNgxActionButtonDirective, typeof i5.DbNgxButtonSegueDirective]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbNgxCoreButtonModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { AbstractSubscriptionDirective } from '../../subscription';
|
|
4
|
+
import { DbNgxButton } from '../button';
|
|
5
|
+
import { SegueRef, DbNgxRouterService } from '../../router';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DbNgxButtonSegueDirective extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
8
|
+
readonly dbxButton: DbNgxButton;
|
|
9
|
+
readonly dbxRouterService: DbNgxRouterService;
|
|
10
|
+
private _segueRef;
|
|
11
|
+
readonly segueRef$: import("rxjs").Observable<SegueRef<any>>;
|
|
12
|
+
get segueRef(): Maybe<SegueRef>;
|
|
13
|
+
set segueRef(segueRef: Maybe<SegueRef>);
|
|
14
|
+
constructor(dbxButton: DbNgxButton, dbxRouterService: DbNgxRouterService);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxButtonSegueDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbNgxButtonSegueDirective, "[dbxButtonSegue]", never, { "segueRef": "dbxButtonSegue"; }, {}, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './button.segue.directive';
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { DbNgxInjectedComponentConfig, DbNgxInjectedTemplateConfig } from './injected';
|
|
3
|
+
import { AbstractDbNgxInjectedDirective } from './injected.directive';
|
|
4
|
+
import { Maybe } from '@dereekb/util';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Component that injects content based on the configuration into the view.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DbNgxInjectedComponent<T> extends AbstractDbNgxInjectedDirective<T> {
|
|
10
|
+
set config(config: Maybe<DbNgxInjectedComponentConfig<T>>);
|
|
11
|
+
set template(template: Maybe<DbNgxInjectedTemplateConfig<T>>);
|
|
12
|
+
set content(content: Maybe<ViewContainerRef>);
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxInjectedComponent<any>, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbNgxInjectedComponent<any>, "dbx-injected-content, [dbx-injected-content]", never, { "config": "config"; "template": "template"; }, {}, never, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./injected.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class DbNgxInjectedComponentModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxInjectedComponentModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbNgxInjectedComponentModule, [typeof i1.DbNgxInjectedComponent], [typeof i2.CommonModule], [typeof i1.DbNgxInjectedComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbNgxInjectedComponentModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Injector, TemplateRef, Type, ViewRef } from "@angular/core";
|
|
2
|
+
import { Maybe } from "@dereekb/util";
|
|
3
|
+
export interface DbNgxInjectedComponentConfig<T = any> {
|
|
4
|
+
/**
|
|
5
|
+
* Type of Component to initialize.
|
|
6
|
+
*/
|
|
7
|
+
componentClass: Type<T>;
|
|
8
|
+
/**
|
|
9
|
+
* Custom Injector to use when creating the component.
|
|
10
|
+
*/
|
|
11
|
+
injector?: Injector;
|
|
12
|
+
/**
|
|
13
|
+
* Custom initialization code when an instance is created.
|
|
14
|
+
*/
|
|
15
|
+
init?: (instance: T) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface DbNgxInjectedTemplateConfig<T = any> {
|
|
18
|
+
/**
|
|
19
|
+
* Template ref to display.
|
|
20
|
+
*/
|
|
21
|
+
templateRef?: Maybe<TemplateRef<T>>;
|
|
22
|
+
/**
|
|
23
|
+
* View ref to inject.
|
|
24
|
+
*/
|
|
25
|
+
viewRef?: Maybe<ViewRef>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ViewContainerRef, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { DbNgxInjectedComponentConfig, DbNgxInjectedTemplateConfig } from './injected';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Abstract directive that injects content based on the configuration into the view.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class AbstractDbNgxInjectedDirective<T> implements OnInit, OnDestroy {
|
|
9
|
+
private _instance;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
ngOnDestroy(): void;
|
|
12
|
+
setConfig(config: Maybe<DbNgxInjectedComponentConfig>): void;
|
|
13
|
+
setTemplate(template: Maybe<DbNgxInjectedTemplateConfig>): void;
|
|
14
|
+
setContent(content: Maybe<ViewContainerRef>): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbNgxInjectedDirective<any>, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbNgxInjectedDirective<any>, never, never, {}, {}, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComponentRef, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { DbNgxInjectedComponentConfig, DbNgxInjectedTemplateConfig } from './injected';
|
|
3
|
+
import { Initialized, Destroyable, Maybe } from '@dereekb/util';
|
|
4
|
+
/**
|
|
5
|
+
* Instance used by components to inject content based on the configuration into the view.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DbNgxInjectedComponentInstance<T> implements Initialized, Destroyable {
|
|
8
|
+
private _subscriptionObject;
|
|
9
|
+
private _config;
|
|
10
|
+
private _template;
|
|
11
|
+
private _content;
|
|
12
|
+
private _componentRef;
|
|
13
|
+
readonly config$: import("rxjs").Observable<Maybe<DbNgxInjectedComponentConfig<T>>>;
|
|
14
|
+
readonly template$: import("rxjs").Observable<Maybe<DbNgxInjectedTemplateConfig<T>>>;
|
|
15
|
+
readonly content$: import("rxjs").Observable<ViewContainerRef>;
|
|
16
|
+
get config(): Maybe<DbNgxInjectedComponentConfig<T>>;
|
|
17
|
+
set config(config: Maybe<DbNgxInjectedComponentConfig<T>>);
|
|
18
|
+
get template(): Maybe<DbNgxInjectedTemplateConfig<T>>;
|
|
19
|
+
set template(template: Maybe<DbNgxInjectedTemplateConfig<T>>);
|
|
20
|
+
get content(): Maybe<Maybe<ViewContainerRef>>;
|
|
21
|
+
set content(content: Maybe<Maybe<ViewContainerRef>>);
|
|
22
|
+
get componentRef(): Maybe<ComponentRef<T>>;
|
|
23
|
+
set componentRef(componentRef: Maybe<ComponentRef<T>>);
|
|
24
|
+
init(): void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
private _initComponent;
|
|
27
|
+
private _initTemplate;
|
|
28
|
+
private _reset;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./datefromtoformat.pipe";
|
|
3
|
+
import * as i2 from "./dateformatdistance.pipe";
|
|
4
|
+
import * as i3 from "./minutesstring.pipe";
|
|
5
|
+
import * as i4 from "./timedistance.pipe";
|
|
6
|
+
import * as i5 from "./datedistance.pipe";
|
|
7
|
+
import * as i6 from "./tojsdate.pipe";
|
|
8
|
+
import * as i7 from "./tominutes.pipe";
|
|
9
|
+
export declare class DbNgxDatePipeModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbNgxDatePipeModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbNgxDatePipeModule, [typeof i1.DateFromToTimePipe, typeof i2.DateFormatDistancePipe, typeof i3.MinutesStringPipe, typeof i4.TimeDistanceCountdownPipe, typeof i4.TimeDistancePipe, typeof i5.DateDistancePipe, typeof i6.ToJsDatePipe, typeof i7.ToMinutesPipe], never, [typeof i1.DateFromToTimePipe, typeof i2.DateFormatDistancePipe, typeof i3.MinutesStringPipe, typeof i4.TimeDistanceCountdownPipe, typeof i4.TimeDistancePipe, typeof i5.DateDistancePipe, typeof i6.ToJsDatePipe, typeof i7.ToMinutesPipe]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbNgxDatePipeModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DateOrDateString } from '@dereekb/util';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DateDistancePipe implements PipeTransform {
|
|
5
|
+
transform(input: DateOrDateString | undefined, to: Date, unavailable?: string): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateDistancePipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateDistancePipe, "dateDistance">;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DateOrDateString, Maybe } from '@dereekb/util';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Pipe that takes in a date and appends the distance to it in parenthesis.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DateFormatDistancePipe implements PipeTransform {
|
|
8
|
+
private locale;
|
|
9
|
+
constructor(locale: string);
|
|
10
|
+
transform(input: Maybe<DateOrDateString>, format: string, includeSeconds?: boolean): Maybe<string>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateFormatDistancePipe, never>;
|
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateFormatDistancePipe, "dateFormatDistance">;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { Maybe, DateOrDateString } from '@dereekb/util';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Pipe that takes in a date and number of minutes and outputs a formatted date.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DateFromToTimePipe implements PipeTransform {
|
|
8
|
+
private locale;
|
|
9
|
+
constructor(locale: string);
|
|
10
|
+
transform(input: Maybe<DateOrDateString>, format: string, minutes: number): Maybe<string>;
|
|
11
|
+
static formatFromTo(input: Maybe<DateOrDateString>, format: string, minutes: number, locale: string): Maybe<string>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateFromToTimePipe, never>;
|
|
13
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DateFromToTimePipe, "dateFromPlusTo">;
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './date.pipe.module';
|
|
2
|
+
export * from './datedistance.pipe';
|
|
3
|
+
export * from './dateformatdistance.pipe';
|
|
4
|
+
export * from './datefromtoformat.pipe';
|
|
5
|
+
export * from './minutesstring.pipe';
|
|
6
|
+
export * from './timedistance.pipe';
|
|
7
|
+
export * from './tojsdate.pipe';
|
|
8
|
+
export * from './tominutes.pipe';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MinutesStringPipe implements PipeTransform {
|
|
5
|
+
transform(input: Maybe<number | string>): Maybe<string>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MinutesStringPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MinutesStringPipe, "minutesString">;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { Maybe, DateOrDateString } from '@dereekb/util';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TimeDistanceCountdownPipe implements PipeTransform {
|
|
5
|
+
transform(input: Maybe<DateOrDateString>, soonString?: string, unavailable?: string): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeDistanceCountdownPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TimeDistanceCountdownPipe, "timeCountdownDistance">;
|
|
8
|
+
}
|
|
9
|
+
export declare class TimeDistancePipe implements PipeTransform {
|
|
10
|
+
transform(input: Maybe<DateOrDateString>, to?: Date, unavailable?: string): string;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeDistancePipe, never>;
|
|
12
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TimeDistancePipe, "timeDistance">;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DateOrDateString, Maybe } from '@dereekb/util';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ToJsDatePipe implements PipeTransform {
|
|
5
|
+
static toJsDate(input: Maybe<DateOrDateString>): Maybe<Date>;
|
|
6
|
+
transform(input: Maybe<DateOrDateString>): Maybe<Date>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToJsDatePipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ToJsDatePipe, "toJsDate">;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ToMinutesPipe implements PipeTransform {
|
|
4
|
+
transform(milliseconds: number): number;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToMinutesPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ToMinutesPipe, "toMinutes">;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './date';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ClickableFunction, ClickableUrl } from './clickable';
|
|
2
|
+
import { SegueRef } from '../segue';
|
|
3
|
+
import { Maybe } from '@dereekb/util';
|
|
4
|
+
import { Type, Provider } from '@angular/core';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
export interface ClickableAnchor extends ClickableFunction, ClickableUrl, SegueRef {
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface ClickableAnchorLink extends ClickableAnchor {
|
|
10
|
+
title: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ClickableIconAnchorLink extends Omit<ClickableAnchorLink, 'title'> {
|
|
14
|
+
icon: string;
|
|
15
|
+
}
|
|
16
|
+
export declare enum AnchorType {
|
|
17
|
+
None = 0,
|
|
18
|
+
Clickable = 1,
|
|
19
|
+
Sref = 2,
|
|
20
|
+
Href = 3,
|
|
21
|
+
Disabled = 4
|
|
22
|
+
}
|
|
23
|
+
export declare function anchorTypeForAnchor(anchor: Maybe<ClickableAnchor>, disabled?: Maybe<boolean>): AnchorType;
|
|
24
|
+
export declare abstract class DbNgxAnchor<T extends ClickableAnchor = ClickableAnchor> {
|
|
25
|
+
abstract disabled$: Observable<Maybe<boolean>>;
|
|
26
|
+
abstract anchor$: Observable<Maybe<T>>;
|
|
27
|
+
abstract disabled: Maybe<boolean>;
|
|
28
|
+
abstract anchor: Maybe<T>;
|
|
29
|
+
abstract type$: Observable<AnchorType>;
|
|
30
|
+
}
|
|
31
|
+
export declare function ProvideDbNgxAnchor<S extends DbNgxAnchor>(sourceType: Type<S>): Provider[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { AnchorType, ClickableAnchor, DbNgxAnchor } from './anchor';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Abstract anchor directive.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AbstractDbNgxAnchorDirective<T extends ClickableAnchor = ClickableAnchor> implements DbNgxAnchor {
|
|
9
|
+
private _disabled;
|
|
10
|
+
private _anchor;
|
|
11
|
+
readonly disabled$: Observable<Maybe<boolean>>;
|
|
12
|
+
readonly anchor$: Observable<Maybe<T>>;
|
|
13
|
+
readonly type$: Observable<AnchorType>;
|
|
14
|
+
get anchor(): Maybe<T>;
|
|
15
|
+
set anchor(anchor: Maybe<T>);
|
|
16
|
+
get disabled(): Maybe<boolean>;
|
|
17
|
+
set disabled(disabled: Maybe<boolean>);
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbNgxAnchorDirective<any>, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbNgxAnchorDirective<any>, never, never, { "anchor": "anchor"; "disabled": "disabled"; }, {}, never>;
|
|
20
|
+
}
|