@acorex/platform 20.0.5 → 20.0.6
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/common/index.d.ts +102 -2
- package/domain/index.d.ts +1 -65
- package/fesm2022/acorex-platform-common.mjs +243 -1
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +32 -38
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +2 -0
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +183 -11
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +117 -35
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +4 -17
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +6 -5
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-D99jLndX.mjs → acorex-platform-themes-default-entity-master-single-view.component--tn_1mKA.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component--tn_1mKA.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +6 -6
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-5kuroU6r.mjs → acorex-platform-widgets-checkbox-widget-designer.component-BuU7nJ6u.mjs} +2 -2
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-BuU7nJ6u.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-tITe8tiu.mjs → acorex-platform-widgets-page-widget-designer.component-Dwts3at7.mjs} +3 -1
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-Dwts3at7.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +79 -67
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/index.d.ts +4 -3
- package/layout/components/index.d.ts +103 -2
- package/layout/entity/index.d.ts +9 -0
- package/package.json +1 -1
- package/runtime/index.d.ts +5 -5
- package/widgets/index.d.ts +5 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-D99jLndX.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-5kuroU6r.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-tITe8tiu.mjs.map +0 -1
|
@@ -1362,22 +1362,35 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
// Compute consolidated ids from all entities
|
|
1364
1364
|
const idLength = entities.reduce((acc, curr) => acc + curr.ids.length, 0);
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1365
|
+
let dialog;
|
|
1366
|
+
let showDialogTimeout;
|
|
1367
|
+
let isDialogShown = false;
|
|
1368
|
+
// Create dialog config but don't show it yet
|
|
1369
|
+
const createDialog = async () => {
|
|
1370
|
+
dialog = this.loadingDialog.show({
|
|
1371
|
+
title: await this.translationService.translateAsync('workflow.deleting'),
|
|
1372
|
+
mode: 'determinate',
|
|
1373
|
+
status: 'Deleting...',
|
|
1374
|
+
progressValue: 0,
|
|
1375
|
+
text: `0/${idLength}`,
|
|
1376
|
+
buttons: [
|
|
1377
|
+
{
|
|
1378
|
+
text: await this.translationService.translateAsync('cancel'),
|
|
1379
|
+
color: 'danger',
|
|
1380
|
+
onClick: () => {
|
|
1381
|
+
if (dialog) {
|
|
1382
|
+
dialog.close();
|
|
1383
|
+
}
|
|
1384
|
+
},
|
|
1377
1385
|
},
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1386
|
+
],
|
|
1387
|
+
});
|
|
1388
|
+
isDialogShown = true;
|
|
1389
|
+
};
|
|
1390
|
+
// Set timeout to show dialog after 2 seconds if process is not complete
|
|
1391
|
+
showDialogTimeout = setTimeout(async () => {
|
|
1392
|
+
await createDialog();
|
|
1393
|
+
}, 2000);
|
|
1381
1394
|
let allPromises = [];
|
|
1382
1395
|
for (const entity of entities) {
|
|
1383
1396
|
const entityDefinition = entityDefinitions[entity.source];
|
|
@@ -1393,25 +1406,33 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
|
1393
1406
|
})
|
|
1394
1407
|
.map((p) => p?.then((value) => {
|
|
1395
1408
|
deletedCount++;
|
|
1396
|
-
dialog
|
|
1397
|
-
|
|
1409
|
+
if (isDialogShown && dialog) {
|
|
1410
|
+
dialog.setProgressText(`${deletedCount}/${idLength}`);
|
|
1411
|
+
dialog.setProgressValue((deletedCount / idLength) * 100);
|
|
1412
|
+
}
|
|
1398
1413
|
return { status: 'fulfilled', value };
|
|
1399
1414
|
}, (reason) => ({ status: 'rejected', reason })));
|
|
1400
1415
|
allPromises = allPromises.concat(entityPromises);
|
|
1401
1416
|
}
|
|
1402
1417
|
else {
|
|
1418
|
+
// Clear timeout if error occurs
|
|
1419
|
+
clearTimeout(showDialogTimeout);
|
|
1403
1420
|
throw new Error(`The delete operation cannot be performed on ${entityDefinition.title}. This action might be restricted or not applicable for the selected item.`);
|
|
1404
1421
|
}
|
|
1405
1422
|
}
|
|
1406
1423
|
const results = await Promise.all(allPromises);
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1424
|
+
// Clear timeout as process is complete
|
|
1425
|
+
clearTimeout(showDialogTimeout);
|
|
1426
|
+
if (isDialogShown) {
|
|
1427
|
+
setTimeout(() => {
|
|
1428
|
+
dialog.close();
|
|
1429
|
+
}, 300);
|
|
1430
|
+
}
|
|
1412
1431
|
// Store the last entity for use in event dispatching
|
|
1413
1432
|
const lastEntity = entities[entities.length - 1];
|
|
1414
1433
|
// Handle different scenarios for alerts
|
|
1434
|
+
const successfulPromises = results.filter((result) => result?.status === 'fulfilled').length;
|
|
1435
|
+
const failedPromises = results.filter((result) => result?.status === 'rejected').length;
|
|
1415
1436
|
if (successfulPromises > 0 && failedPromises === 0) {
|
|
1416
1437
|
// All items deleted successfully
|
|
1417
1438
|
if (showResult) {
|
|
@@ -2026,9 +2047,53 @@ class AXMEntityCrudServiceImpl {
|
|
|
2026
2047
|
}
|
|
2027
2048
|
return this._entityDataProvider.query(request);
|
|
2028
2049
|
}
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2050
|
+
async getRoots(request) {
|
|
2051
|
+
const queryRequest = {
|
|
2052
|
+
skip: 0,
|
|
2053
|
+
take: 1000,
|
|
2054
|
+
filter: {
|
|
2055
|
+
value: true,
|
|
2056
|
+
field: 'parentId',
|
|
2057
|
+
operator: {
|
|
2058
|
+
type: 'isEmpty',
|
|
2059
|
+
},
|
|
2060
|
+
}
|
|
2061
|
+
};
|
|
2062
|
+
const result = await this._entityDataProvider.query(queryRequest);
|
|
2063
|
+
return result;
|
|
2064
|
+
}
|
|
2065
|
+
async getChildren(request) {
|
|
2066
|
+
const parentKey = request.parentKey ?? 'parentId';
|
|
2067
|
+
const queryRequest = {
|
|
2068
|
+
skip: 0,
|
|
2069
|
+
take: 1000,
|
|
2070
|
+
filter: {
|
|
2071
|
+
value: request.parentId,
|
|
2072
|
+
field: parentKey,
|
|
2073
|
+
operator: {
|
|
2074
|
+
type: 'equal',
|
|
2075
|
+
},
|
|
2076
|
+
}
|
|
2077
|
+
};
|
|
2078
|
+
const result = await this._entityDataProvider.query(queryRequest);
|
|
2079
|
+
console.log(request, result);
|
|
2080
|
+
return result;
|
|
2081
|
+
}
|
|
2082
|
+
async getByCategory(request) {
|
|
2083
|
+
const queryRequest = {
|
|
2084
|
+
skip: 0,
|
|
2085
|
+
take: 1000,
|
|
2086
|
+
filter: {
|
|
2087
|
+
value: request.categoryId,
|
|
2088
|
+
field: request.categoryKey ?? 'categoryIds',
|
|
2089
|
+
operator: {
|
|
2090
|
+
type: 'contains',
|
|
2091
|
+
},
|
|
2092
|
+
}
|
|
2093
|
+
};
|
|
2094
|
+
const result = await this._entityDataProvider.query(queryRequest);
|
|
2095
|
+
return result;
|
|
2096
|
+
}
|
|
2032
2097
|
get storageService() {
|
|
2033
2098
|
return this._storageService;
|
|
2034
2099
|
}
|
|
@@ -2144,11 +2209,19 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
2144
2209
|
<ax-loading></ax-loading>
|
|
2145
2210
|
}
|
|
2146
2211
|
@else{
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2212
|
+
@if(displayItems().length > 1) {
|
|
2213
|
+
@for (item of displayItems(); track $index) {
|
|
2214
|
+
<ax-badge class="ax-p-0.5" [color]="'surface'" [text]="item.text" ></ax-badge>
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
@else if(displayItems().length == 1) {
|
|
2218
|
+
<ax-badge class="ax-p-0.5" [color]="'surface'" [text]="displayItems()[0].text" ></ax-badge>
|
|
2219
|
+
}
|
|
2220
|
+
@else {
|
|
2221
|
+
<span class="ax-text-muted">-</span>
|
|
2222
|
+
}
|
|
2150
2223
|
}
|
|
2151
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "
|
|
2224
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2152
2225
|
}
|
|
2153
2226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPLookupWidgetViewComponent, decorators: [{
|
|
2154
2227
|
type: Component,
|
|
@@ -2160,9 +2233,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
2160
2233
|
<ax-loading></ax-loading>
|
|
2161
2234
|
}
|
|
2162
2235
|
@else{
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2236
|
+
@if(displayItems().length > 1) {
|
|
2237
|
+
@for (item of displayItems(); track $index) {
|
|
2238
|
+
<ax-badge class="ax-p-0.5" [color]="'surface'" [text]="item.text" ></ax-badge>
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
@else if(displayItems().length == 1) {
|
|
2242
|
+
<ax-badge class="ax-p-0.5" [color]="'surface'" [text]="displayItems()[0].text" ></ax-badge>
|
|
2243
|
+
}
|
|
2244
|
+
@else {
|
|
2245
|
+
<span class="ax-text-muted">-</span>
|
|
2246
|
+
}
|
|
2166
2247
|
}
|
|
2167
2248
|
`,
|
|
2168
2249
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -2819,7 +2900,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
2819
2900
|
<ax-badge [text]="item[this.textField]" color="primary"></ax-badge>
|
|
2820
2901
|
}
|
|
2821
2902
|
</div>
|
|
2822
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "
|
|
2903
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2823
2904
|
}
|
|
2824
2905
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPLookupWidgetColumnComponent, decorators: [{
|
|
2825
2906
|
type: Component,
|
|
@@ -2929,7 +3010,7 @@ class AXPTagableBoxWidgetColumnComponent extends AXPValueWidgetComponent {
|
|
|
2929
3010
|
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-inline-block">{{ internalValue()[0] }}</span>
|
|
2930
3011
|
} }
|
|
2931
3012
|
</div>
|
|
2932
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "
|
|
3013
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2933
3014
|
}
|
|
2934
3015
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, decorators: [{
|
|
2935
3016
|
type: Component,
|
|
@@ -3213,7 +3294,7 @@ class AXPTagableBoxWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
3213
3294
|
@for (item of internalValue(); track $index) {
|
|
3214
3295
|
<ax-badge [look]="'twotone'" [text]="item" color="primary"></ax-badge>
|
|
3215
3296
|
}
|
|
3216
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "
|
|
3297
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3217
3298
|
}
|
|
3218
3299
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, decorators: [{
|
|
3219
3300
|
type: Component,
|
|
@@ -3611,6 +3692,7 @@ class AXPEntityApplyUpdatesAction extends AXPWorkflowAction {
|
|
|
3611
3692
|
}
|
|
3612
3693
|
async execute(context) {
|
|
3613
3694
|
try {
|
|
3695
|
+
debugger;
|
|
3614
3696
|
const [moduleName, entityName] = context.getVariable('entity').split('.');
|
|
3615
3697
|
const data = context.getVariable('data');
|
|
3616
3698
|
const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
|