@dereekb/dbx-core 12.4.0 → 12.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/action/directive/state/action.error.handler.directive.mjs +32 -0
- package/esm2022/lib/action/directive/state/index.mjs +2 -1
- package/fesm2022/dereekb-dbx-core.mjs +26 -1
- package/fesm2022/dereekb-dbx-core.mjs.map +1 -1
- package/lib/action/directive/state/action.error.handler.directive.d.ts +20 -0
- package/lib/action/directive/state/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ReadableError, type Maybe } from '@dereekb/util';
|
|
3
|
+
import { AbstractSubscriptionDirective } from '../../../subscription';
|
|
4
|
+
import { DbxActionContextStoreSourceInstance } from '../../action.store.source';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Performs the action on error.
|
|
8
|
+
*/
|
|
9
|
+
export type DbxActionErrorHandlerFunction = (error?: Maybe<ReadableError>) => void;
|
|
10
|
+
/**
|
|
11
|
+
* Directive that executes a function on ActionContextStore error.
|
|
12
|
+
*/
|
|
13
|
+
export declare class DbxActionErrorHandlerDirective<T, O> extends AbstractSubscriptionDirective implements OnInit, OnDestroy {
|
|
14
|
+
readonly source: DbxActionContextStoreSourceInstance<T, O>;
|
|
15
|
+
readonly dbxActionErrorHandler: import("@angular/core").InputSignal<Maybe<DbxActionErrorHandlerFunction>>;
|
|
16
|
+
readonly errorFunction$: import("rxjs").Observable<DbxActionErrorHandlerFunction>;
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxActionErrorHandlerDirective<any, any>, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxActionErrorHandlerDirective<any, any>, "[dbxActionErrorHandler]", never, { "dbxActionErrorHandler": { "alias": "dbxActionErrorHandler"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -6,6 +6,7 @@ export * from './action.idle.directive';
|
|
|
6
6
|
export * from './action.presuccess.directive';
|
|
7
7
|
export * from './action.success.directive';
|
|
8
8
|
export * from './action.success.handler.directive';
|
|
9
|
+
export * from './action.error.handler.directive';
|
|
9
10
|
export * from './action.value.directive';
|
|
10
11
|
export * from './action.working.directive';
|
|
11
12
|
export * from './action.enforce.modified.directive';
|