@paperless/angular 0.1.0-alpha.222 → 0.1.0-alpha.224
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/modules/toast/components/toast-container/toast-container.component.mjs +3 -3
- package/esm2020/lib/modules/toast/directives/toast.directive.mjs +12 -4
- package/esm2020/lib/modules/toast/types.mjs +1 -1
- package/fesm2015/paperless-angular.mjs +13 -5
- package/fesm2015/paperless-angular.mjs.map +1 -1
- package/fesm2020/paperless-angular.mjs +13 -5
- package/fesm2020/paperless-angular.mjs.map +1 -1
- package/lib/modules/toast/directives/toast.directive.d.ts +4 -1
- package/lib/modules/toast/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -2862,6 +2862,7 @@ class ToastDirective {
|
|
|
2862
2862
|
this.delay = 5000;
|
|
2863
2863
|
this.index = 0;
|
|
2864
2864
|
this.dismissOnAction = true;
|
|
2865
|
+
this.actionData = {};
|
|
2865
2866
|
this.dismiss = new EventEmitter();
|
|
2866
2867
|
}
|
|
2867
2868
|
ngOnInit() {
|
|
@@ -2871,8 +2872,11 @@ class ToastDirective {
|
|
|
2871
2872
|
setTimeout(() => this.doDismiss(), this.delay);
|
|
2872
2873
|
}
|
|
2873
2874
|
onAction() {
|
|
2874
|
-
if (this.dismissOnAction) {
|
|
2875
|
-
this.doDismiss();
|
|
2875
|
+
if (this.dismissOnAction && !this.actionFunc) {
|
|
2876
|
+
return this.doDismiss();
|
|
2877
|
+
}
|
|
2878
|
+
if (this.actionFunc) {
|
|
2879
|
+
this.actionFunc(this, this.actionData);
|
|
2876
2880
|
}
|
|
2877
2881
|
}
|
|
2878
2882
|
doDismiss() {
|
|
@@ -2880,7 +2884,7 @@ class ToastDirective {
|
|
|
2880
2884
|
}
|
|
2881
2885
|
}
|
|
2882
2886
|
ToastDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ToastDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2883
|
-
ToastDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.9", type: ToastDirective, selector: "p-toast", inputs: { delay: "delay", index: "index", dismissOnAction: "dismissOnAction" }, outputs: { dismiss: "dismiss" }, host: { listeners: { "action": "onAction()" } }, ngImport: i0 });
|
|
2887
|
+
ToastDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.9", type: ToastDirective, selector: "p-toast", inputs: { delay: "delay", index: "index", dismissOnAction: "dismissOnAction", actionFunc: "actionFunc", actionData: "actionData" }, outputs: { dismiss: "dismiss" }, host: { listeners: { "action": "onAction()" } }, ngImport: i0 });
|
|
2884
2888
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ToastDirective, decorators: [{
|
|
2885
2889
|
type: Directive,
|
|
2886
2890
|
args: [{
|
|
@@ -2895,6 +2899,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImpor
|
|
|
2895
2899
|
type: Input
|
|
2896
2900
|
}], dismissOnAction: [{
|
|
2897
2901
|
type: Input
|
|
2902
|
+
}], actionFunc: [{
|
|
2903
|
+
type: Input
|
|
2904
|
+
}], actionData: [{
|
|
2905
|
+
type: Input
|
|
2898
2906
|
}], dismiss: [{
|
|
2899
2907
|
type: Output
|
|
2900
2908
|
}] } });
|
|
@@ -2912,7 +2920,7 @@ let ToastContainer = class ToastContainer {
|
|
|
2912
2920
|
}
|
|
2913
2921
|
};
|
|
2914
2922
|
ToastContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ToastContainer, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2915
|
-
ToastContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.9", type: ToastContainer, selector: "p-toast-container", inputs: { placement: "placement" }, ngImport: i0, template: "<p-toast\n *ngFor=\"let toast of toasts$ | async; let index = index\"\n [variant]=\"toast.variant\"\n [header]=\"toast.header\"\n [content]=\"toast.content\"\n [index]=\"index\"\n [delay]=\"toast.options.delay ?? 5000\"\n [dismissOnAction]=\"toast.options.dismissOnAction ?? true\"\n [enableAction]=\"toast.options.enableAction\"\n [actionIcon]=\"toast.options.icon?.variant\"\n [actionIconFlip]=\"toast.options.icon?.flip\"\n [actionIconRotate]=\"toast.options.icon?.rotate\"\n (dismiss)=\"dismiss($event)\"\n [@pSlideInBottomOutTop]\n></p-toast>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PToast, selector: "p-toast", inputs: ["actionIcon", "actionIconFlip", "actionIconRotate", "content", "enableAction", "header", "variant"] }, { kind: "directive", type: ToastDirective, selector: "p-toast", inputs: ["delay", "index", "dismissOnAction"], outputs: ["dismiss"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], animations: [SLIDE_IN_TOP_OUT_BOTTOM], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2923
|
+
ToastContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.9", type: ToastContainer, selector: "p-toast-container", inputs: { placement: "placement" }, ngImport: i0, template: "<p-toast\n *ngFor=\"let toast of toasts$ | async; let index = index\"\n [variant]=\"toast.variant\"\n [header]=\"toast.header\"\n [content]=\"toast.content\"\n [index]=\"index\"\n [delay]=\"toast.options.delay ?? 5000\"\n [dismissOnAction]=\"toast.options.dismissOnAction ?? true\"\n [enableAction]=\"toast.options.enableAction\"\n [actionFunc]=\"toast.options.action\"\n [actionData]=\"toast.options.actionData\"\n [actionIcon]=\"toast.options.icon?.variant\"\n [actionIconFlip]=\"toast.options.icon?.flip\"\n [actionIconRotate]=\"toast.options.icon?.rotate\"\n (dismiss)=\"dismiss($event)\"\n [@pSlideInBottomOutTop]\n></p-toast>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PToast, selector: "p-toast", inputs: ["actionIcon", "actionIconFlip", "actionIconRotate", "content", "enableAction", "header", "variant"] }, { kind: "directive", type: ToastDirective, selector: "p-toast", inputs: ["delay", "index", "dismissOnAction", "actionFunc", "actionData"], outputs: ["dismiss"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], animations: [SLIDE_IN_TOP_OUT_BOTTOM], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2916
2924
|
ToastContainer = __decorate([
|
|
2917
2925
|
ProxyCmp({
|
|
2918
2926
|
defineCustomElementFn: undefined,
|
|
@@ -2921,7 +2929,7 @@ ToastContainer = __decorate([
|
|
|
2921
2929
|
], ToastContainer);
|
|
2922
2930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ToastContainer, decorators: [{
|
|
2923
2931
|
type: Component,
|
|
2924
|
-
args: [{ selector: 'p-toast-container', changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['placement'], animations: [SLIDE_IN_TOP_OUT_BOTTOM], template: "<p-toast\n *ngFor=\"let toast of toasts$ | async; let index = index\"\n [variant]=\"toast.variant\"\n [header]=\"toast.header\"\n [content]=\"toast.content\"\n [index]=\"index\"\n [delay]=\"toast.options.delay ?? 5000\"\n [dismissOnAction]=\"toast.options.dismissOnAction ?? true\"\n [enableAction]=\"toast.options.enableAction\"\n [actionIcon]=\"toast.options.icon?.variant\"\n [actionIconFlip]=\"toast.options.icon?.flip\"\n [actionIconRotate]=\"toast.options.icon?.rotate\"\n (dismiss)=\"dismiss($event)\"\n [@pSlideInBottomOutTop]\n></p-toast>\n" }]
|
|
2932
|
+
args: [{ selector: 'p-toast-container', changeDetection: ChangeDetectionStrategy.OnPush, inputs: ['placement'], animations: [SLIDE_IN_TOP_OUT_BOTTOM], template: "<p-toast\n *ngFor=\"let toast of toasts$ | async; let index = index\"\n [variant]=\"toast.variant\"\n [header]=\"toast.header\"\n [content]=\"toast.content\"\n [index]=\"index\"\n [delay]=\"toast.options.delay ?? 5000\"\n [dismissOnAction]=\"toast.options.dismissOnAction ?? true\"\n [enableAction]=\"toast.options.enableAction\"\n [actionFunc]=\"toast.options.action\"\n [actionData]=\"toast.options.actionData\"\n [actionIcon]=\"toast.options.icon?.variant\"\n [actionIconFlip]=\"toast.options.icon?.flip\"\n [actionIconRotate]=\"toast.options.icon?.rotate\"\n (dismiss)=\"dismiss($event)\"\n [@pSlideInBottomOutTop]\n></p-toast>\n" }]
|
|
2925
2933
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: ToastService }]; } });
|
|
2926
2934
|
|
|
2927
2935
|
const TOAST_COMPONENTS = [ToastContainer];
|