@acorex/platform 20.9.19 → 20.9.21
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/fesm2022/acorex-platform-common.mjs +43 -4
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +220 -43
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +70 -12
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-layout-entity.d.ts +49 -3
- package/types/acorex-platform-themes-default.d.ts +8 -0
|
@@ -1430,10 +1430,49 @@ class AXPUnsavedChangesConfirmService {
|
|
|
1430
1430
|
return confirmed;
|
|
1431
1431
|
}
|
|
1432
1432
|
async prompt(options) {
|
|
1433
|
-
const title = await
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1433
|
+
const [title, message, yesText, noText] = await Promise.all([
|
|
1434
|
+
this.translateService.translateAsync(options?.title ?? '@general:messages.unsaved-changes.title'),
|
|
1435
|
+
this.translateService.translateAsync(options?.message ?? '@general:messages.unsaved-changes.message'),
|
|
1436
|
+
this.translateService.translateAsync('@general:terms.common.yes-no.yes'),
|
|
1437
|
+
this.translateService.translateAsync('@general:terms.common.yes-no.no'),
|
|
1438
|
+
]);
|
|
1439
|
+
return new Promise((resolve) => {
|
|
1440
|
+
const popup = this.dialogService.open({
|
|
1441
|
+
title,
|
|
1442
|
+
content: message,
|
|
1443
|
+
type: 'warning',
|
|
1444
|
+
orientation: 'horizontal',
|
|
1445
|
+
draggable: false,
|
|
1446
|
+
buttons: [
|
|
1447
|
+
{
|
|
1448
|
+
name: 'yes',
|
|
1449
|
+
text: yesText,
|
|
1450
|
+
color: 'warning',
|
|
1451
|
+
autofocus: false,
|
|
1452
|
+
onClick: () => {
|
|
1453
|
+
popup.close();
|
|
1454
|
+
resolve(true);
|
|
1455
|
+
},
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
name: 'no',
|
|
1459
|
+
text: noText,
|
|
1460
|
+
color: 'default',
|
|
1461
|
+
autofocus: true,
|
|
1462
|
+
onClick: () => {
|
|
1463
|
+
popup.close();
|
|
1464
|
+
resolve(false);
|
|
1465
|
+
},
|
|
1466
|
+
hotkey: {
|
|
1467
|
+
Escape: () => {
|
|
1468
|
+
popup.close();
|
|
1469
|
+
resolve(false);
|
|
1470
|
+
},
|
|
1471
|
+
},
|
|
1472
|
+
},
|
|
1473
|
+
],
|
|
1474
|
+
});
|
|
1475
|
+
});
|
|
1437
1476
|
}
|
|
1438
1477
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPUnsavedChangesConfirmService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1439
1478
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPUnsavedChangesConfirmService, providedIn: 'root' }); }
|