nuxeo-development-framework 4.0.6 → 4.0.7
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/bundles/nuxeo-development-framework.umd.js +22 -20
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/shared/components/nuxeo-dialog/confirmation/ndf-confirmation-dialog.component.js +8 -7
- package/esm2015/lib/shared/components/nuxeo-dialog/nuxeo.dialog.js +23 -22
- package/fesm2015/nuxeo-development-framework.js +23 -21
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/shared/components/nuxeo-dialog/confirmation/ndf-confirmation-dialog.component.d.ts +3 -3
- package/lib/shared/components/nuxeo-dialog/nuxeo.dialog.d.ts +5 -5
- package/package.json +1 -1
package/esm2015/lib/shared/components/nuxeo-dialog/confirmation/ndf-confirmation-dialog.component.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Component } from
|
|
2
|
-
import { BaseDialogComponent } from
|
|
1
|
+
import { Component, ViewEncapsulation } from "@angular/core";
|
|
2
|
+
import { BaseDialogComponent } from "../../base/base-dialog.component";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "../nuxeo.dialog";
|
|
5
5
|
import * as i2 from "@angular/material/icon";
|
|
@@ -11,13 +11,14 @@ export class NdfConfirmationDialogComponent extends BaseDialogComponent {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
NdfConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfConfirmationDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
-
NdfConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfConfirmationDialogComponent, selector: "ndf-confirmation-dialog", usesInheritance: true, ngImport: i0, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ dialogData.title | translate }}\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<!-- Content -->\r\n\t\t<div class=\"flex flex-row gap-x-2 items-center\">\r\n\t\t\t<!-- Icon -->\r\n\t\t\t<ng-container *ngIf=\"dialogData.icon.show\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\"\r\n\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\tprimaryIcon: dialogData.icon.color === 'primary',\r\n\t\t\t\t\t\taccentIcon: dialogData.icon.color === 'accent',\r\n\t\t\t\t\t\twarnIcon: dialogData.icon.color === 'warn',\r\n\t\t\t\t\t\tbasicIcon: dialogData.icon.color === 'basic',\r\n\t\t\t\t\t\tinfoIcon: dialogData.icon.color === 'info',\r\n\t\t\t\t\t\tsuccessIcon: dialogData.icon.color === 'success',\r\n\t\t\t\t\t\twarningIcon: dialogData.icon.color === 'warning',\r\n\t\t\t\t\t\terrorIcon: dialogData.icon.color === 'error'\r\n\t\t\t\t\t}\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\tclass=\"text-current\"\r\n\t\t\t\t\t\t[svgIcon]=\"dialogData.icon.name\"\r\n\t\t\t\t\t></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-container>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"text-secondary\"\r\n\t\t\t\t[innerHtml]=\"dialogData.message | translate\"\r\n\t\t\t></div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t\t<ng-container *ngIf=\"dialogData.actions.confirm.show\">\r\n\t\t\t<button\r\n\t\t\t\t(click)=\"dialog.executeAction(dialogData.actions.confirm.fn)\"\r\n\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t[color]=\"dialogData.actions.confirm.color\"\r\n\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t>\r\n\t\t\t\t{{ dialogData.actions.confirm.label | translate }}\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\t\t<ng-container *ngIf=\"dialogData.actions.moreActions.length\">\r\n\t\t\t<ng-container *ngFor=\"let btn of dialogData.actions.moreActions\">\r\n\t\t\t\t<button\r\n\t\t\t\t\t(click)=\"dialog.executeAction(btn.fn)\"\r\n\t\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t\t[color]=\"btn.color\"\r\n\t\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t\t>\r\n\t\t\t\t\t{{ btn.label | translate }}\r\n\t\t\t\t</button>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [".primaryIcon{@apply text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600;}.accentIcon{@apply text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600;}.warnIcon{@apply text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600;}.basicIcon{@apply text-gray-600 bg-gray-100 dark:text-gray-50 dark:bg-gray-600;}.infoIcon{@apply text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600;}.successIcon{@apply text-green-500 bg-green-100 dark:text-green-50 dark:bg-green-500;}.warningIcon{@apply text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500;}.errorIcon{@apply text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600;}::ng-deep .ndf-confirmation-dialog-panel{min-width:25%!important}\n"], components: [{ type: i1.NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "loaderMode"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe } });
|
|
14
|
+
NdfConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfConfirmationDialogComponent, selector: "ndf-confirmation-dialog", usesInheritance: true, ngImport: i0, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ dialogData.title | translate }}\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<!-- Content -->\r\n\t\t<div class=\"flex flex-row gap-x-2 items-center\">\r\n\t\t\t<!-- Icon -->\r\n\t\t\t<ng-container *ngIf=\"dialogData.icon.show\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\"\r\n\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\tprimaryIcon: dialogData.icon.color === 'primary',\r\n\t\t\t\t\t\taccentIcon: dialogData.icon.color === 'accent',\r\n\t\t\t\t\t\twarnIcon: dialogData.icon.color === 'warn',\r\n\t\t\t\t\t\tbasicIcon: dialogData.icon.color === 'basic',\r\n\t\t\t\t\t\tinfoIcon: dialogData.icon.color === 'info',\r\n\t\t\t\t\t\tsuccessIcon: dialogData.icon.color === 'success',\r\n\t\t\t\t\t\twarningIcon: dialogData.icon.color === 'warning',\r\n\t\t\t\t\t\terrorIcon: dialogData.icon.color === 'error'\r\n\t\t\t\t\t}\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\tclass=\"text-current\"\r\n\t\t\t\t\t\t[svgIcon]=\"dialogData.icon.name\"\r\n\t\t\t\t\t></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-container>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"text-secondary\"\r\n\t\t\t\t[innerHtml]=\"dialogData.message | translate\"\r\n\t\t\t></div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t\t<ng-container *ngIf=\"dialogData.actions.confirm.show\">\r\n\t\t\t<button\r\n\t\t\t\t(click)=\"dialog.executeAction(dialogData.actions.confirm.fn)\"\r\n\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t[color]=\"dialogData.actions.confirm.color\"\r\n\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t>\r\n\t\t\t\t{{ dialogData.actions.confirm.label | translate }}\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\t\t<ng-container *ngIf=\"dialogData.actions.moreActions.length\">\r\n\t\t\t<ng-container *ngFor=\"let btn of dialogData.actions.moreActions\">\r\n\t\t\t\t<button\r\n\t\t\t\t\t(click)=\"dialog.executeAction(btn.fn)\"\r\n\t\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t\t[color]=\"btn.color\"\r\n\t\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t\t>\r\n\t\t\t\t\t{{ btn.label | translate }}\r\n\t\t\t\t</button>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [".ndf-dialog-wrapper .primaryIcon{@apply text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600;}.ndf-dialog-wrapper .accentIcon{@apply text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600;}.ndf-dialog-wrapper .warnIcon{@apply text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600;}.ndf-dialog-wrapper .basicIcon{@apply text-gray-600 bg-gray-100 dark:text-gray-50 dark:bg-gray-600;}.ndf-dialog-wrapper .infoIcon{@apply text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600;}.ndf-dialog-wrapper .successIcon{@apply text-green-500 bg-green-100 dark:text-green-50 dark:bg-green-500;}.ndf-dialog-wrapper .warningIcon{@apply text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500;}.ndf-dialog-wrapper .errorIcon{@apply text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600;}::ng-deep .ndf-confirmation-dialog-panel{min-width:25%!important}\n"], components: [{ type: i1.NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "loaderMode"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i4.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfConfirmationDialogComponent, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
17
|
args: [{
|
|
18
|
-
selector:
|
|
19
|
-
templateUrl:
|
|
20
|
-
styleUrls: [
|
|
18
|
+
selector: "ndf-confirmation-dialog",
|
|
19
|
+
templateUrl: "./ndf-confirmation-dialog.component.html",
|
|
20
|
+
styleUrls: ["./ndf-confirmation-dialog.component.scss"],
|
|
21
|
+
encapsulation: ViewEncapsulation.None,
|
|
21
22
|
}]
|
|
22
23
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmRmLWNvbmZpcm1hdGlvbi1kaWFsb2cuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVj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WY9XCJkaWFsb2dEYXRhLmFjdGlvbnMubW9yZUFjdGlvbnMubGVuZ3RoXCI+XHJcblx0XHRcdDxuZy1jb250YWluZXIgKm5nRm9yPVwibGV0IGJ0biBvZiBkaWFsb2dEYXRhLmFjdGlvbnMubW9yZUFjdGlvbnNcIj5cclxuXHRcdFx0XHQ8YnV0dG9uXHJcblx0XHRcdFx0XHQoY2xpY2spPVwiZGlhbG9nLmV4ZWN1dGVBY3Rpb24oYnRuLmZuKVwiXHJcblx0XHRcdFx0XHRjbGFzcz1cInN1Ym1pc3Npb24tYnV0dG9uXCJcclxuXHRcdFx0XHRcdFtjb2xvcl09XCJidG4uY29sb3JcIlxyXG5cdFx0XHRcdFx0W2Rpc2FibGVkXT1cImRpYWxvZy5sb2FkaW5nXCJcclxuXHRcdFx0XHQ+XHJcblx0XHRcdFx0XHR7eyBidG4ubGFiZWwgfCB0cmFuc2xhdGUgfX1cclxuXHRcdFx0XHQ8L2J1dHRvbj5cclxuXHRcdFx0PC9uZy1jb250YWluZXI+XHJcblx0XHQ8L25nLWNvbnRhaW5lcj5cclxuXHQ8L25nLXRlbXBsYXRlPlxyXG48L25kZi1udXhlby1kaWFsb2c+XHJcbiJdfQ==
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Component, ContentChild, Input, ViewChild } from
|
|
2
|
-
import { MatDialogRef, MAT_DIALOG_DATA } from
|
|
3
|
-
import { isObservable } from
|
|
4
|
-
import { takeUntil } from
|
|
5
|
-
import { BaseComponent } from
|
|
1
|
+
import { Component, ContentChild, Input, ViewChild, ViewEncapsulation, } from "@angular/core";
|
|
2
|
+
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
|
|
3
|
+
import { isObservable } from "rxjs";
|
|
4
|
+
import { takeUntil } from "rxjs/operators";
|
|
5
|
+
import { BaseComponent } from "../../components/base";
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
import * as i1 from "@angular/material/icon";
|
|
8
8
|
import * as i2 from "../../../directive/rtl/set-dir-rtl.directive";
|
|
@@ -12,9 +12,9 @@ import * as i5 from "@ngx-translate/core";
|
|
|
12
12
|
export class NdfNuxeoDialog extends BaseComponent {
|
|
13
13
|
constructor(injector) {
|
|
14
14
|
super(injector);
|
|
15
|
-
this.dialogTitle =
|
|
16
|
-
this.subTitle =
|
|
17
|
-
this.loaderMode =
|
|
15
|
+
this.dialogTitle = "";
|
|
16
|
+
this.subTitle = "";
|
|
17
|
+
this.loaderMode = "spinner";
|
|
18
18
|
this.dialogBodyTopOffset = 0;
|
|
19
19
|
this.data = injector.get(MAT_DIALOG_DATA, null);
|
|
20
20
|
this.dialogRef = injector.get(MatDialogRef, null);
|
|
@@ -23,14 +23,14 @@ export class NdfNuxeoDialog extends BaseComponent {
|
|
|
23
23
|
this.dialogBodyTopOffset = this.dialogBody.nativeElement.scrollTop;
|
|
24
24
|
if (action) {
|
|
25
25
|
if (!this.isArrowFunction(action)) {
|
|
26
|
-
throw new Error(
|
|
26
|
+
throw new Error("The action should be arrow function");
|
|
27
27
|
}
|
|
28
28
|
this.loading = true;
|
|
29
29
|
//TODO here we should find a way to test if actions instance of DialogActionType
|
|
30
30
|
const result = action(...params);
|
|
31
31
|
if (!isObservable(result)) {
|
|
32
32
|
this.loading = false;
|
|
33
|
-
throw new Error(
|
|
33
|
+
throw new Error("The action you used should return an Observable");
|
|
34
34
|
}
|
|
35
35
|
result.pipe(takeUntil(this.destroy$)).subscribe((value) => {
|
|
36
36
|
this.loading = false;
|
|
@@ -45,23 +45,24 @@ export class NdfNuxeoDialog extends BaseComponent {
|
|
|
45
45
|
}
|
|
46
46
|
isArrowFunction(fn) {
|
|
47
47
|
const strFn = fn.toString();
|
|
48
|
-
const firstIndex = strFn.indexOf(
|
|
49
|
-
const lastIndex = strFn.indexOf(
|
|
50
|
-
const target = strFn.substring(firstIndex, lastIndex).replace(
|
|
51
|
-
return target.includes(
|
|
48
|
+
const firstIndex = strFn.indexOf(")");
|
|
49
|
+
const lastIndex = strFn.indexOf("{") + 1;
|
|
50
|
+
const target = strFn.substring(firstIndex, lastIndex).replace(" ", "");
|
|
51
|
+
return target.includes("=>");
|
|
52
52
|
}
|
|
53
53
|
onClose() {
|
|
54
54
|
this.dialogRef.close();
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
NdfNuxeoDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
-
NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper\">\r\n\t<div class=\"dialog-header\">\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div #dialogBody class=\"dialog-body\" [ngClass]=\"{'overflow-hidden': loading}\">\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper{@apply flex flex-col;}.ndf-dialog-wrapper .dialog-header{@apply flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7;}.ndf-dialog-wrapper .dialog-body{height:auto;max-height:calc(100vh - 208px);@apply flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99;}.ndf-dialog-wrapper .overlay{@apply flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0;}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.SetDirRtlDirective, selector: "[SetDirRtl]" }, { type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i5.TranslatePipe } });
|
|
58
|
+
NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper\">\r\n\t<div class=\"dialog-header\">\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div #dialogBody class=\"dialog-body\" [ngClass]=\"{'overflow-hidden': loading}\">\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper{@apply flex flex-col;}.ndf-dialog-wrapper .dialog-header{@apply flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7;}.ndf-dialog-wrapper .dialog-body{height:auto;max-height:calc(100vh - 208px);@apply flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99;}.ndf-dialog-wrapper .overlay{@apply flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0;}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2.SetDirRtlDirective, selector: "[SetDirRtl]" }, { type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i5.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
59
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, decorators: [{
|
|
60
60
|
type: Component,
|
|
61
61
|
args: [{
|
|
62
|
-
selector:
|
|
63
|
-
templateUrl:
|
|
64
|
-
styleUrls: [
|
|
62
|
+
selector: "ndf-nuxeo-dialog",
|
|
63
|
+
templateUrl: "./nuxeo.dialog.html",
|
|
64
|
+
styleUrls: ["./nuxeo.dialog.scss"],
|
|
65
|
+
encapsulation: ViewEncapsulation.None,
|
|
65
66
|
}]
|
|
66
67
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { dialogTitle: [{
|
|
67
68
|
type: Input
|
|
@@ -71,12 +72,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
71
72
|
type: Input
|
|
72
73
|
}], contentTemplate: [{
|
|
73
74
|
type: ContentChild,
|
|
74
|
-
args: [
|
|
75
|
+
args: ["contentTemplate"]
|
|
75
76
|
}], actionsTemplate: [{
|
|
76
77
|
type: ContentChild,
|
|
77
|
-
args: [
|
|
78
|
+
args: ["actionsTemplate"]
|
|
78
79
|
}], dialogBody: [{
|
|
79
80
|
type: ViewChild,
|
|
80
|
-
args: [
|
|
81
|
+
args: ["dialogBody"]
|
|
81
82
|
}] } });
|
|
82
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
83
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnV4ZW8uZGlhbG9nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbnV4ZW8tZGV2ZWxvcG1lbnQtZnJhbWV3b3JrL3NyYy9saWIvc2hhcmVkL2NvbXBvbmVudHMvbnV4ZW8tZGlhbG9nL251eGVvLmRpYWxvZy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/core';
|
|
2
|
-
import { Component, NgModule, Injectable, Directive, Inject, InjectionToken, Optional, ChangeDetectorRef, Input, ContentChild, ViewChild, EventEmitter, Output, HostListener, Pipe,
|
|
2
|
+
import { Component, NgModule, Injectable, Directive, Inject, InjectionToken, Optional, ChangeDetectorRef, Input, ViewEncapsulation, ContentChild, ViewChild, EventEmitter, Output, HostListener, Pipe, Self, SkipSelf, ChangeDetectionStrategy, ViewContainerRef, forwardRef, APP_INITIALIZER, TemplateRef } from '@angular/core';
|
|
3
3
|
import * as i4$1 from '@angular/common';
|
|
4
4
|
import { CommonModule, APP_BASE_HREF, DatePipe, registerLocaleData, DOCUMENT } from '@angular/common';
|
|
5
5
|
import * as i1$2 from '@angular/common/http';
|
|
@@ -1771,9 +1771,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1771
1771
|
class NdfNuxeoDialog extends BaseComponent {
|
|
1772
1772
|
constructor(injector) {
|
|
1773
1773
|
super(injector);
|
|
1774
|
-
this.dialogTitle =
|
|
1775
|
-
this.subTitle =
|
|
1776
|
-
this.loaderMode =
|
|
1774
|
+
this.dialogTitle = "";
|
|
1775
|
+
this.subTitle = "";
|
|
1776
|
+
this.loaderMode = "spinner";
|
|
1777
1777
|
this.dialogBodyTopOffset = 0;
|
|
1778
1778
|
this.data = injector.get(MAT_DIALOG_DATA, null);
|
|
1779
1779
|
this.dialogRef = injector.get(MatDialogRef, null);
|
|
@@ -1782,14 +1782,14 @@ class NdfNuxeoDialog extends BaseComponent {
|
|
|
1782
1782
|
this.dialogBodyTopOffset = this.dialogBody.nativeElement.scrollTop;
|
|
1783
1783
|
if (action) {
|
|
1784
1784
|
if (!this.isArrowFunction(action)) {
|
|
1785
|
-
throw new Error(
|
|
1785
|
+
throw new Error("The action should be arrow function");
|
|
1786
1786
|
}
|
|
1787
1787
|
this.loading = true;
|
|
1788
1788
|
//TODO here we should find a way to test if actions instance of DialogActionType
|
|
1789
1789
|
const result = action(...params);
|
|
1790
1790
|
if (!isObservable(result)) {
|
|
1791
1791
|
this.loading = false;
|
|
1792
|
-
throw new Error(
|
|
1792
|
+
throw new Error("The action you used should return an Observable");
|
|
1793
1793
|
}
|
|
1794
1794
|
result.pipe(takeUntil(this.destroy$)).subscribe((value) => {
|
|
1795
1795
|
this.loading = false;
|
|
@@ -1804,23 +1804,24 @@ class NdfNuxeoDialog extends BaseComponent {
|
|
|
1804
1804
|
}
|
|
1805
1805
|
isArrowFunction(fn) {
|
|
1806
1806
|
const strFn = fn.toString();
|
|
1807
|
-
const firstIndex = strFn.indexOf(
|
|
1808
|
-
const lastIndex = strFn.indexOf(
|
|
1809
|
-
const target = strFn.substring(firstIndex, lastIndex).replace(
|
|
1810
|
-
return target.includes(
|
|
1807
|
+
const firstIndex = strFn.indexOf(")");
|
|
1808
|
+
const lastIndex = strFn.indexOf("{") + 1;
|
|
1809
|
+
const target = strFn.substring(firstIndex, lastIndex).replace(" ", "");
|
|
1810
|
+
return target.includes("=>");
|
|
1811
1811
|
}
|
|
1812
1812
|
onClose() {
|
|
1813
1813
|
this.dialogRef.close();
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
1816
|
NdfNuxeoDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1817
|
-
NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper\">\r\n\t<div class=\"dialog-header\">\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div #dialogBody class=\"dialog-body\" [ngClass]=\"{'overflow-hidden': loading}\">\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper{@apply flex flex-col;}.ndf-dialog-wrapper .dialog-header{@apply flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7;}.ndf-dialog-wrapper .dialog-body{height:auto;max-height:calc(100vh - 208px);@apply flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99;}.ndf-dialog-wrapper .overlay{@apply flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0;}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: SetDirRtlDirective, selector: "[SetDirRtl]" }, { type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
1817
|
+
NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper\">\r\n\t<div class=\"dialog-header\">\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div #dialogBody class=\"dialog-body\" [ngClass]=\"{'overflow-hidden': loading}\">\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper{@apply flex flex-col;}.ndf-dialog-wrapper .dialog-header{@apply flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7;}.ndf-dialog-wrapper .dialog-body{height:auto;max-height:calc(100vh - 208px);@apply flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99;}.ndf-dialog-wrapper .overlay{@apply flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0;}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: SetDirRtlDirective, selector: "[SetDirRtl]" }, { type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
1818
1818
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, decorators: [{
|
|
1819
1819
|
type: Component,
|
|
1820
1820
|
args: [{
|
|
1821
|
-
selector:
|
|
1822
|
-
templateUrl:
|
|
1823
|
-
styleUrls: [
|
|
1821
|
+
selector: "ndf-nuxeo-dialog",
|
|
1822
|
+
templateUrl: "./nuxeo.dialog.html",
|
|
1823
|
+
styleUrls: ["./nuxeo.dialog.scss"],
|
|
1824
|
+
encapsulation: ViewEncapsulation.None,
|
|
1824
1825
|
}]
|
|
1825
1826
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { dialogTitle: [{
|
|
1826
1827
|
type: Input
|
|
@@ -1830,13 +1831,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1830
1831
|
type: Input
|
|
1831
1832
|
}], contentTemplate: [{
|
|
1832
1833
|
type: ContentChild,
|
|
1833
|
-
args: [
|
|
1834
|
+
args: ["contentTemplate"]
|
|
1834
1835
|
}], actionsTemplate: [{
|
|
1835
1836
|
type: ContentChild,
|
|
1836
|
-
args: [
|
|
1837
|
+
args: ["actionsTemplate"]
|
|
1837
1838
|
}], dialogBody: [{
|
|
1838
1839
|
type: ViewChild,
|
|
1839
|
-
args: [
|
|
1840
|
+
args: ["dialogBody"]
|
|
1840
1841
|
}] } });
|
|
1841
1842
|
|
|
1842
1843
|
class NdfConfirmationDialogComponent extends BaseDialogComponent {
|
|
@@ -1845,13 +1846,14 @@ class NdfConfirmationDialogComponent extends BaseDialogComponent {
|
|
|
1845
1846
|
}
|
|
1846
1847
|
}
|
|
1847
1848
|
NdfConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfConfirmationDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1848
|
-
NdfConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfConfirmationDialogComponent, selector: "ndf-confirmation-dialog", usesInheritance: true, ngImport: i0, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ dialogData.title | translate }}\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<!-- Content -->\r\n\t\t<div class=\"flex flex-row gap-x-2 items-center\">\r\n\t\t\t<!-- Icon -->\r\n\t\t\t<ng-container *ngIf=\"dialogData.icon.show\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\"\r\n\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\tprimaryIcon: dialogData.icon.color === 'primary',\r\n\t\t\t\t\t\taccentIcon: dialogData.icon.color === 'accent',\r\n\t\t\t\t\t\twarnIcon: dialogData.icon.color === 'warn',\r\n\t\t\t\t\t\tbasicIcon: dialogData.icon.color === 'basic',\r\n\t\t\t\t\t\tinfoIcon: dialogData.icon.color === 'info',\r\n\t\t\t\t\t\tsuccessIcon: dialogData.icon.color === 'success',\r\n\t\t\t\t\t\twarningIcon: dialogData.icon.color === 'warning',\r\n\t\t\t\t\t\terrorIcon: dialogData.icon.color === 'error'\r\n\t\t\t\t\t}\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\tclass=\"text-current\"\r\n\t\t\t\t\t\t[svgIcon]=\"dialogData.icon.name\"\r\n\t\t\t\t\t></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-container>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"text-secondary\"\r\n\t\t\t\t[innerHtml]=\"dialogData.message | translate\"\r\n\t\t\t></div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t\t<ng-container *ngIf=\"dialogData.actions.confirm.show\">\r\n\t\t\t<button\r\n\t\t\t\t(click)=\"dialog.executeAction(dialogData.actions.confirm.fn)\"\r\n\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t[color]=\"dialogData.actions.confirm.color\"\r\n\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t>\r\n\t\t\t\t{{ dialogData.actions.confirm.label | translate }}\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\t\t<ng-container *ngIf=\"dialogData.actions.moreActions.length\">\r\n\t\t\t<ng-container *ngFor=\"let btn of dialogData.actions.moreActions\">\r\n\t\t\t\t<button\r\n\t\t\t\t\t(click)=\"dialog.executeAction(btn.fn)\"\r\n\t\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t\t[color]=\"btn.color\"\r\n\t\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t\t>\r\n\t\t\t\t\t{{ btn.label | translate }}\r\n\t\t\t\t</button>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [".primaryIcon{@apply text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600;}.accentIcon{@apply text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600;}.warnIcon{@apply text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600;}.basicIcon{@apply text-gray-600 bg-gray-100 dark:text-gray-50 dark:bg-gray-600;}.infoIcon{@apply text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600;}.successIcon{@apply text-green-500 bg-green-100 dark:text-green-50 dark:bg-green-500;}.warningIcon{@apply text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500;}.errorIcon{@apply text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600;}::ng-deep .ndf-confirmation-dialog-panel{min-width:25%!important}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "loaderMode"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
1849
|
+
NdfConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfConfirmationDialogComponent, selector: "ndf-confirmation-dialog", usesInheritance: true, ngImport: i0, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ dialogData.title | translate }}\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<!-- Content -->\r\n\t\t<div class=\"flex flex-row gap-x-2 items-center\">\r\n\t\t\t<!-- Icon -->\r\n\t\t\t<ng-container *ngIf=\"dialogData.icon.show\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\"\r\n\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\tprimaryIcon: dialogData.icon.color === 'primary',\r\n\t\t\t\t\t\taccentIcon: dialogData.icon.color === 'accent',\r\n\t\t\t\t\t\twarnIcon: dialogData.icon.color === 'warn',\r\n\t\t\t\t\t\tbasicIcon: dialogData.icon.color === 'basic',\r\n\t\t\t\t\t\tinfoIcon: dialogData.icon.color === 'info',\r\n\t\t\t\t\t\tsuccessIcon: dialogData.icon.color === 'success',\r\n\t\t\t\t\t\twarningIcon: dialogData.icon.color === 'warning',\r\n\t\t\t\t\t\terrorIcon: dialogData.icon.color === 'error'\r\n\t\t\t\t\t}\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\tclass=\"text-current\"\r\n\t\t\t\t\t\t[svgIcon]=\"dialogData.icon.name\"\r\n\t\t\t\t\t></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-container>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"text-secondary\"\r\n\t\t\t\t[innerHtml]=\"dialogData.message | translate\"\r\n\t\t\t></div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t\t<ng-container *ngIf=\"dialogData.actions.confirm.show\">\r\n\t\t\t<button\r\n\t\t\t\t(click)=\"dialog.executeAction(dialogData.actions.confirm.fn)\"\r\n\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t[color]=\"dialogData.actions.confirm.color\"\r\n\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t>\r\n\t\t\t\t{{ dialogData.actions.confirm.label | translate }}\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\t\t<ng-container *ngIf=\"dialogData.actions.moreActions.length\">\r\n\t\t\t<ng-container *ngFor=\"let btn of dialogData.actions.moreActions\">\r\n\t\t\t\t<button\r\n\t\t\t\t\t(click)=\"dialog.executeAction(btn.fn)\"\r\n\t\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t\t[color]=\"btn.color\"\r\n\t\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t\t>\r\n\t\t\t\t\t{{ btn.label | translate }}\r\n\t\t\t\t</button>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [".ndf-dialog-wrapper .primaryIcon{@apply text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600;}.ndf-dialog-wrapper .accentIcon{@apply text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600;}.ndf-dialog-wrapper .warnIcon{@apply text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600;}.ndf-dialog-wrapper .basicIcon{@apply text-gray-600 bg-gray-100 dark:text-gray-50 dark:bg-gray-600;}.ndf-dialog-wrapper .infoIcon{@apply text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600;}.ndf-dialog-wrapper .successIcon{@apply text-green-500 bg-green-100 dark:text-green-50 dark:bg-green-500;}.ndf-dialog-wrapper .warningIcon{@apply text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500;}.ndf-dialog-wrapper .errorIcon{@apply text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600;}::ng-deep .ndf-confirmation-dialog-panel{min-width:25%!important}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "loaderMode"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
1849
1850
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfConfirmationDialogComponent, decorators: [{
|
|
1850
1851
|
type: Component,
|
|
1851
1852
|
args: [{
|
|
1852
|
-
selector:
|
|
1853
|
-
templateUrl:
|
|
1854
|
-
styleUrls: [
|
|
1853
|
+
selector: "ndf-confirmation-dialog",
|
|
1854
|
+
templateUrl: "./ndf-confirmation-dialog.component.html",
|
|
1855
|
+
styleUrls: ["./ndf-confirmation-dialog.component.scss"],
|
|
1856
|
+
encapsulation: ViewEncapsulation.None,
|
|
1855
1857
|
}]
|
|
1856
1858
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
1857
1859
|
|