nuxeo-development-framework 4.0.7 → 4.0.8
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 +20 -22
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/shared/components/nuxeo-dialog/confirmation/ndf-confirmation-dialog.component.js +7 -8
- package/esm2015/lib/shared/components/nuxeo-dialog/nuxeo.dialog.js +22 -23
- package/fesm2015/nuxeo-development-framework.js +21 -23
- 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
|
@@ -2391,9 +2391,9 @@
|
|
|
2391
2391
|
__extends(NdfNuxeoDialog, _super);
|
|
2392
2392
|
function NdfNuxeoDialog(injector) {
|
|
2393
2393
|
var _this = _super.call(this, injector) || this;
|
|
2394
|
-
_this.dialogTitle =
|
|
2395
|
-
_this.subTitle =
|
|
2396
|
-
_this.loaderMode =
|
|
2394
|
+
_this.dialogTitle = '';
|
|
2395
|
+
_this.subTitle = '';
|
|
2396
|
+
_this.loaderMode = 'spinner';
|
|
2397
2397
|
_this.dialogBodyTopOffset = 0;
|
|
2398
2398
|
_this.data = injector.get(i1$4.MAT_DIALOG_DATA, null);
|
|
2399
2399
|
_this.dialogRef = injector.get(i1$4.MatDialogRef, null);
|
|
@@ -2408,14 +2408,14 @@
|
|
|
2408
2408
|
this.dialogBodyTopOffset = this.dialogBody.nativeElement.scrollTop;
|
|
2409
2409
|
if (action) {
|
|
2410
2410
|
if (!this.isArrowFunction(action)) {
|
|
2411
|
-
throw new Error(
|
|
2411
|
+
throw new Error('The action should be arrow function');
|
|
2412
2412
|
}
|
|
2413
2413
|
this.loading = true;
|
|
2414
2414
|
//TODO here we should find a way to test if actions instance of DialogActionType
|
|
2415
2415
|
var result = action.apply(void 0, __spreadArray([], __read(params)));
|
|
2416
2416
|
if (!rxjs.isObservable(result)) {
|
|
2417
2417
|
this.loading = false;
|
|
2418
|
-
throw new Error(
|
|
2418
|
+
throw new Error('The action you used should return an Observable');
|
|
2419
2419
|
}
|
|
2420
2420
|
result.pipe(operators.takeUntil(this.destroy$)).subscribe(function (value) {
|
|
2421
2421
|
_this.loading = false;
|
|
@@ -2430,10 +2430,10 @@
|
|
|
2430
2430
|
};
|
|
2431
2431
|
NdfNuxeoDialog.prototype.isArrowFunction = function (fn) {
|
|
2432
2432
|
var strFn = fn.toString();
|
|
2433
|
-
var firstIndex = strFn.indexOf(
|
|
2434
|
-
var lastIndex = strFn.indexOf(
|
|
2435
|
-
var target = strFn.substring(firstIndex, lastIndex).replace(
|
|
2436
|
-
return target.includes(
|
|
2433
|
+
var firstIndex = strFn.indexOf(')');
|
|
2434
|
+
var lastIndex = strFn.indexOf('{') + 1;
|
|
2435
|
+
var target = strFn.substring(firstIndex, lastIndex).replace(' ', '');
|
|
2436
|
+
return target.includes('=>');
|
|
2437
2437
|
};
|
|
2438
2438
|
NdfNuxeoDialog.prototype.onClose = function () {
|
|
2439
2439
|
this.dialogRef.close();
|
|
@@ -2441,14 +2441,13 @@
|
|
|
2441
2441
|
return NdfNuxeoDialog;
|
|
2442
2442
|
}(BaseComponent));
|
|
2443
2443
|
NdfNuxeoDialog.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfNuxeoDialog, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2444
|
-
NdfNuxeoDialog.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<div SetDirRtl class=\"ndf-dialog-wrapper\">\r\n\t<div
|
|
2444
|
+
NdfNuxeoDialog.ɵcmp = i0__namespace.ɵɵ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__namespace, template: "<div SetDirRtl class=\"ndf-dialog-wrapper flex flex-col\">\r\n\t<div\r\n\t\tclass=\"dialog-header flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7\"\r\n\t>\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\r\n\t\t#dialogBody\r\n\t\tclass=\"dialog-body flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99\"\r\n\t\t[ngClass]=\"{'overflow-hidden': loading}\"\r\n\t>\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 flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 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 flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 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 .dialog-body{height:auto;max-height:calc(100vh - 208px)}\n"], components: [{ type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: SetDirRtlDirective, selector: "[SetDirRtl]" }, { type: i2__namespace$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
|
|
2445
2445
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfNuxeoDialog, decorators: [{
|
|
2446
2446
|
type: i0.Component,
|
|
2447
2447
|
args: [{
|
|
2448
|
-
selector:
|
|
2449
|
-
templateUrl:
|
|
2450
|
-
styleUrls: [
|
|
2451
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
2448
|
+
selector: 'ndf-nuxeo-dialog',
|
|
2449
|
+
templateUrl: './nuxeo.dialog.html',
|
|
2450
|
+
styleUrls: ['./nuxeo.dialog.scss']
|
|
2452
2451
|
}]
|
|
2453
2452
|
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; }, propDecorators: { dialogTitle: [{
|
|
2454
2453
|
type: i0.Input
|
|
@@ -2458,13 +2457,13 @@
|
|
|
2458
2457
|
type: i0.Input
|
|
2459
2458
|
}], contentTemplate: [{
|
|
2460
2459
|
type: i0.ContentChild,
|
|
2461
|
-
args: [
|
|
2460
|
+
args: ['contentTemplate']
|
|
2462
2461
|
}], actionsTemplate: [{
|
|
2463
2462
|
type: i0.ContentChild,
|
|
2464
|
-
args: [
|
|
2463
|
+
args: ['actionsTemplate']
|
|
2465
2464
|
}], dialogBody: [{
|
|
2466
2465
|
type: i0.ViewChild,
|
|
2467
|
-
args: [
|
|
2466
|
+
args: ['dialogBody']
|
|
2468
2467
|
}] } });
|
|
2469
2468
|
|
|
2470
2469
|
var NdfConfirmationDialogComponent = /** @class */ (function (_super) {
|
|
@@ -2475,14 +2474,13 @@
|
|
|
2475
2474
|
return NdfConfirmationDialogComponent;
|
|
2476
2475
|
}(BaseDialogComponent));
|
|
2477
2476
|
NdfConfirmationDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfConfirmationDialogComponent, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2478
|
-
NdfConfirmationDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfConfirmationDialogComponent, selector: "ndf-confirmation-dialog", usesInheritance: true, ngImport: i0__namespace, 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\
|
|
2477
|
+
NdfConfirmationDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfConfirmationDialogComponent, selector: "ndf-confirmation-dialog", usesInheritance: true, ngImport: i0__namespace, 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\t'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600':\r\n\t\t\t\t\t\t\tdialogData.icon.color === 'primary',\r\n\t\t\t\t\t\t'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600':\r\n\t\t\t\t\t\t\tdialogData.icon.color === 'accent',\r\n\t\t\t\t\t\t'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600':\r\n\t\t\t\t\t\t\tdialogData.icon.color === 'warn',\r\n\t\t\t\t\t\t'text-gray-600 bg-gray-100 dark:text-gray-50 dark:bg-gray-600':\r\n\t\t\t\t\t\t\tdialogData.icon.color === 'basic',\r\n\t\t\t\t\t\t'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600':\r\n\t\t\t\t\t\t\tdialogData.icon.color === 'info',\r\n\t\t\t\t\t\t'text-green-500 bg-green-100 dark:text-green-50 dark:bg-green-500':\r\n\t\t\t\t\t\t\tdialogData.icon.color === 'success',\r\n\t\t\t\t\t\t'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500':\r\n\t\t\t\t\t\t\tdialogData.icon.color === 'warning',\r\n\t\t\t\t\t\t'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600':\r\n\t\t\t\t\t\t\tdialogData.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: ["::ng-deep .ndf-confirmation-dialog-panel{min-width:25%!important}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "loaderMode"] }, { type: i2__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1__namespace.TranslatePipe } });
|
|
2479
2478
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NdfConfirmationDialogComponent, decorators: [{
|
|
2480
2479
|
type: i0.Component,
|
|
2481
2480
|
args: [{
|
|
2482
|
-
selector:
|
|
2483
|
-
templateUrl:
|
|
2484
|
-
styleUrls: [
|
|
2485
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
2481
|
+
selector: 'ndf-confirmation-dialog',
|
|
2482
|
+
templateUrl: './ndf-confirmation-dialog.component.html',
|
|
2483
|
+
styleUrls: ['./ndf-confirmation-dialog.component.scss']
|
|
2486
2484
|
}]
|
|
2487
2485
|
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
|
|
2488
2486
|
|