@acorex/platform 20.6.0-next.10 → 20.6.0-next.11
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 +3 -0
- package/core/index.d.ts +102 -32
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +44 -22
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +49 -4
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +873 -140
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +2 -2
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs → acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs} +37 -6
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity.mjs +528 -118
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +7 -7
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +2 -8
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +761 -336
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +79 -3
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs → acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +112 -11
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs +55 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +3 -3
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +277 -38
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/components/index.d.ts +248 -11
- package/layout/entity/index.d.ts +57 -9
- package/layout/widget-core/index.d.ts +4 -5
- package/layout/widgets/index.d.ts +57 -23
- package/package.json +1 -1
- package/runtime/index.d.ts +36 -8
- package/themes/default/index.d.ts +25 -2
- package/workflow/index.d.ts +38 -37
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs.map +0 -1
|
@@ -435,8 +435,11 @@ class Activity {
|
|
|
435
435
|
*/
|
|
436
436
|
createResult(output, outcome = 'Done') {
|
|
437
437
|
return {
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
success: true,
|
|
439
|
+
data: {
|
|
440
|
+
output,
|
|
441
|
+
outcomes: { [outcome]: true },
|
|
442
|
+
},
|
|
440
443
|
};
|
|
441
444
|
}
|
|
442
445
|
}
|
|
@@ -943,15 +946,29 @@ class WorkflowCoordinator {
|
|
|
943
946
|
// Execute activity via CommandBus
|
|
944
947
|
// Activities registered as AXPCommand return {output, outcomes}
|
|
945
948
|
const result = await this.commandService.execute(task.activityType, task.input || task.config || {});
|
|
946
|
-
|
|
949
|
+
if (!result) {
|
|
950
|
+
return {
|
|
951
|
+
output: null,
|
|
952
|
+
outcome: 'Failed',
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
if (!result.success) {
|
|
956
|
+
return {
|
|
957
|
+
output: {
|
|
958
|
+
error: result.message?.text,
|
|
959
|
+
},
|
|
960
|
+
outcome: 'Failed',
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
const commandResult = result.data;
|
|
964
|
+
const outcomes = commandResult?.outcomes ?? {};
|
|
947
965
|
let outcome = 'Done';
|
|
948
|
-
if (
|
|
949
|
-
|
|
950
|
-
outcome = result.outcomes['Done'] ? 'Done' : Object.keys(result.outcomes)[0] || 'Done';
|
|
966
|
+
if (Object.keys(outcomes).length > 0) {
|
|
967
|
+
outcome = outcomes['Done'] ? 'Done' : Object.keys(outcomes)[0] || 'Done';
|
|
951
968
|
}
|
|
952
969
|
return {
|
|
953
|
-
output:
|
|
954
|
-
outcome
|
|
970
|
+
output: commandResult?.output ?? null,
|
|
971
|
+
outcome,
|
|
955
972
|
};
|
|
956
973
|
}
|
|
957
974
|
catch (error) {
|
|
@@ -1043,7 +1060,19 @@ class Sequence extends Activity {
|
|
|
1043
1060
|
async execute(input) {
|
|
1044
1061
|
// Execute all activities in sequence
|
|
1045
1062
|
for (const activity of this.activities) {
|
|
1046
|
-
await activity.execute(input);
|
|
1063
|
+
const result = await activity.execute(input);
|
|
1064
|
+
if (!result.success) {
|
|
1065
|
+
return {
|
|
1066
|
+
success: false,
|
|
1067
|
+
message: result.message,
|
|
1068
|
+
data: {
|
|
1069
|
+
output: undefined,
|
|
1070
|
+
outcomes: {
|
|
1071
|
+
Failed: true,
|
|
1072
|
+
},
|
|
1073
|
+
},
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1047
1076
|
}
|
|
1048
1077
|
return this.createResult(undefined, 'Done');
|
|
1049
1078
|
}
|
|
@@ -1104,10 +1133,21 @@ class ShowConfirmDialog extends Activity {
|
|
|
1104
1133
|
}
|
|
1105
1134
|
catch (err) {
|
|
1106
1135
|
console.error('[ShowConfirmDialog] Error showing dialog:', err);
|
|
1107
|
-
return
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1136
|
+
return {
|
|
1137
|
+
success: false,
|
|
1138
|
+
message: {
|
|
1139
|
+
text: err instanceof Error ? err.message : 'Failed to show confirm dialog',
|
|
1140
|
+
},
|
|
1141
|
+
data: {
|
|
1142
|
+
output: {
|
|
1143
|
+
result: false,
|
|
1144
|
+
action: 'error',
|
|
1145
|
+
},
|
|
1146
|
+
outcomes: {
|
|
1147
|
+
Cancelled: true,
|
|
1148
|
+
},
|
|
1149
|
+
},
|
|
1150
|
+
};
|
|
1111
1151
|
}
|
|
1112
1152
|
}
|
|
1113
1153
|
}
|
|
@@ -1164,10 +1204,21 @@ class ShowAlertDialog extends Activity {
|
|
|
1164
1204
|
}
|
|
1165
1205
|
catch (err) {
|
|
1166
1206
|
console.error('[ShowAlertDialog] Error showing dialog:', err);
|
|
1167
|
-
return
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1207
|
+
return {
|
|
1208
|
+
success: false,
|
|
1209
|
+
message: {
|
|
1210
|
+
text: err instanceof Error ? err.message : 'Failed to show alert dialog',
|
|
1211
|
+
},
|
|
1212
|
+
data: {
|
|
1213
|
+
output: {
|
|
1214
|
+
result: false,
|
|
1215
|
+
action: 'error',
|
|
1216
|
+
},
|
|
1217
|
+
outcomes: {
|
|
1218
|
+
Failed: true,
|
|
1219
|
+
},
|
|
1220
|
+
},
|
|
1221
|
+
};
|
|
1171
1222
|
}
|
|
1172
1223
|
}
|
|
1173
1224
|
}
|
|
@@ -1223,7 +1274,18 @@ class ShowToast extends Activity {
|
|
|
1223
1274
|
}
|
|
1224
1275
|
catch (err) {
|
|
1225
1276
|
console.error('[ShowToast] Error showing toast:', err);
|
|
1226
|
-
return
|
|
1277
|
+
return {
|
|
1278
|
+
success: false,
|
|
1279
|
+
message: {
|
|
1280
|
+
text: err instanceof Error ? err.message : 'Failed to show toast',
|
|
1281
|
+
},
|
|
1282
|
+
data: {
|
|
1283
|
+
output: undefined,
|
|
1284
|
+
outcomes: {
|
|
1285
|
+
Failed: true,
|
|
1286
|
+
},
|
|
1287
|
+
},
|
|
1288
|
+
};
|
|
1227
1289
|
}
|
|
1228
1290
|
}
|
|
1229
1291
|
}
|
|
@@ -1273,13 +1335,35 @@ class Navigate extends Activity {
|
|
|
1273
1335
|
break;
|
|
1274
1336
|
default:
|
|
1275
1337
|
console.error(`[Navigate] Unknown navigation mode: ${mode}`);
|
|
1276
|
-
return
|
|
1338
|
+
return {
|
|
1339
|
+
success: false,
|
|
1340
|
+
message: {
|
|
1341
|
+
text: `Unknown navigation mode: ${mode}`,
|
|
1342
|
+
},
|
|
1343
|
+
data: {
|
|
1344
|
+
output: undefined,
|
|
1345
|
+
outcomes: {
|
|
1346
|
+
Failed: true,
|
|
1347
|
+
},
|
|
1348
|
+
},
|
|
1349
|
+
};
|
|
1277
1350
|
}
|
|
1278
1351
|
return this.createResult(undefined, 'Done');
|
|
1279
1352
|
}
|
|
1280
1353
|
catch (err) {
|
|
1281
1354
|
console.error('[Navigate] Error navigating:', err);
|
|
1282
|
-
return
|
|
1355
|
+
return {
|
|
1356
|
+
success: false,
|
|
1357
|
+
message: {
|
|
1358
|
+
text: err instanceof Error ? err.message : 'Failed to navigate',
|
|
1359
|
+
},
|
|
1360
|
+
data: {
|
|
1361
|
+
output: undefined,
|
|
1362
|
+
outcomes: {
|
|
1363
|
+
Failed: true,
|
|
1364
|
+
},
|
|
1365
|
+
},
|
|
1366
|
+
};
|
|
1283
1367
|
}
|
|
1284
1368
|
}
|
|
1285
1369
|
}
|
|
@@ -1315,7 +1399,18 @@ class SetVariable extends Activity {
|
|
|
1315
1399
|
}
|
|
1316
1400
|
catch (err) {
|
|
1317
1401
|
console.error('[SetVariable] Error setting variable:', err);
|
|
1318
|
-
return
|
|
1402
|
+
return {
|
|
1403
|
+
success: false,
|
|
1404
|
+
message: {
|
|
1405
|
+
text: err instanceof Error ? err.message : 'Failed to set variable',
|
|
1406
|
+
},
|
|
1407
|
+
data: {
|
|
1408
|
+
output: undefined,
|
|
1409
|
+
outcomes: {
|
|
1410
|
+
Failed: true,
|
|
1411
|
+
},
|
|
1412
|
+
},
|
|
1413
|
+
};
|
|
1319
1414
|
}
|
|
1320
1415
|
}
|
|
1321
1416
|
}
|
|
@@ -1351,7 +1446,18 @@ class DispatchEvent extends Activity {
|
|
|
1351
1446
|
}
|
|
1352
1447
|
catch (err) {
|
|
1353
1448
|
console.error('[DispatchEvent] Error dispatching event:', err);
|
|
1354
|
-
return
|
|
1449
|
+
return {
|
|
1450
|
+
success: false,
|
|
1451
|
+
message: {
|
|
1452
|
+
text: err instanceof Error ? err.message : 'Failed to dispatch event',
|
|
1453
|
+
},
|
|
1454
|
+
data: {
|
|
1455
|
+
output: undefined,
|
|
1456
|
+
outcomes: {
|
|
1457
|
+
Failed: true,
|
|
1458
|
+
},
|
|
1459
|
+
},
|
|
1460
|
+
};
|
|
1355
1461
|
}
|
|
1356
1462
|
}
|
|
1357
1463
|
}
|
|
@@ -1393,13 +1499,36 @@ class If extends Activity {
|
|
|
1393
1499
|
}
|
|
1394
1500
|
// Execute activities in the chosen branch
|
|
1395
1501
|
for (const activity of activities) {
|
|
1396
|
-
await activity.execute(input);
|
|
1502
|
+
const activityResult = await activity.execute(input);
|
|
1503
|
+
if (!activityResult.success) {
|
|
1504
|
+
return {
|
|
1505
|
+
success: false,
|
|
1506
|
+
message: activityResult.message,
|
|
1507
|
+
data: {
|
|
1508
|
+
output: { branch: conditionResult ? 'then' : 'else', failedActivity: activity },
|
|
1509
|
+
outcomes: {
|
|
1510
|
+
Failed: true,
|
|
1511
|
+
},
|
|
1512
|
+
},
|
|
1513
|
+
};
|
|
1514
|
+
}
|
|
1397
1515
|
}
|
|
1398
1516
|
return this.createResult(result, conditionResult ? 'Then' : 'Else');
|
|
1399
1517
|
}
|
|
1400
1518
|
catch (err) {
|
|
1401
1519
|
console.error('[If] Error evaluating condition:', err);
|
|
1402
|
-
return
|
|
1520
|
+
return {
|
|
1521
|
+
success: false,
|
|
1522
|
+
message: {
|
|
1523
|
+
text: err instanceof Error ? err.message : 'Failed to evaluate condition',
|
|
1524
|
+
},
|
|
1525
|
+
data: {
|
|
1526
|
+
output: { branch: 'error' },
|
|
1527
|
+
outcomes: {
|
|
1528
|
+
Failed: true,
|
|
1529
|
+
},
|
|
1530
|
+
},
|
|
1531
|
+
};
|
|
1403
1532
|
}
|
|
1404
1533
|
}
|
|
1405
1534
|
evaluateCondition(condition) {
|
|
@@ -1441,7 +1570,22 @@ class While extends Activity {
|
|
|
1441
1570
|
while (conditionResult && iteration < maxIterations) {
|
|
1442
1571
|
// Execute activities in the loop
|
|
1443
1572
|
for (const activity of activities) {
|
|
1444
|
-
await activity.execute(input);
|
|
1573
|
+
const activityResult = await activity.execute(input);
|
|
1574
|
+
if (!activityResult.success) {
|
|
1575
|
+
return {
|
|
1576
|
+
success: false,
|
|
1577
|
+
message: activityResult.message,
|
|
1578
|
+
data: {
|
|
1579
|
+
output: {
|
|
1580
|
+
iterations: iteration,
|
|
1581
|
+
completed: false,
|
|
1582
|
+
},
|
|
1583
|
+
outcomes: {
|
|
1584
|
+
Failed: true,
|
|
1585
|
+
},
|
|
1586
|
+
},
|
|
1587
|
+
};
|
|
1588
|
+
}
|
|
1445
1589
|
}
|
|
1446
1590
|
iteration++;
|
|
1447
1591
|
conditionResult = this.evaluateCondition(condition);
|
|
@@ -1454,7 +1598,18 @@ class While extends Activity {
|
|
|
1454
1598
|
}
|
|
1455
1599
|
catch (err) {
|
|
1456
1600
|
console.error('[While] Error in loop execution:', err);
|
|
1457
|
-
return
|
|
1601
|
+
return {
|
|
1602
|
+
success: false,
|
|
1603
|
+
message: {
|
|
1604
|
+
text: err instanceof Error ? err.message : 'Failed during loop execution',
|
|
1605
|
+
},
|
|
1606
|
+
data: {
|
|
1607
|
+
output: { iterations: 0, completed: false },
|
|
1608
|
+
outcomes: {
|
|
1609
|
+
Failed: true,
|
|
1610
|
+
},
|
|
1611
|
+
},
|
|
1612
|
+
};
|
|
1458
1613
|
}
|
|
1459
1614
|
}
|
|
1460
1615
|
evaluateCondition(condition) {
|
|
@@ -1504,7 +1659,23 @@ class ForEach extends Activity {
|
|
|
1504
1659
|
};
|
|
1505
1660
|
// Execute activities for current item
|
|
1506
1661
|
for (const activity of activities) {
|
|
1507
|
-
await activity.execute(itemContext);
|
|
1662
|
+
const activityResult = await activity.execute(itemContext);
|
|
1663
|
+
if (!activityResult.success) {
|
|
1664
|
+
return {
|
|
1665
|
+
success: false,
|
|
1666
|
+
message: activityResult.message,
|
|
1667
|
+
data: {
|
|
1668
|
+
output: {
|
|
1669
|
+
totalItems: items.length,
|
|
1670
|
+
processedItems: results.length,
|
|
1671
|
+
results,
|
|
1672
|
+
},
|
|
1673
|
+
outcomes: {
|
|
1674
|
+
Failed: true,
|
|
1675
|
+
},
|
|
1676
|
+
},
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1508
1679
|
}
|
|
1509
1680
|
results.push({
|
|
1510
1681
|
item: currentItem,
|
|
@@ -1521,7 +1692,18 @@ class ForEach extends Activity {
|
|
|
1521
1692
|
}
|
|
1522
1693
|
catch (err) {
|
|
1523
1694
|
console.error('[ForEach] Error in iteration:', err);
|
|
1524
|
-
return
|
|
1695
|
+
return {
|
|
1696
|
+
success: false,
|
|
1697
|
+
message: {
|
|
1698
|
+
text: err instanceof Error ? err.message : 'Failed during iteration',
|
|
1699
|
+
},
|
|
1700
|
+
data: {
|
|
1701
|
+
output: { totalItems: 0, processedItems: 0, results: [] },
|
|
1702
|
+
outcomes: {
|
|
1703
|
+
Failed: true,
|
|
1704
|
+
},
|
|
1705
|
+
},
|
|
1706
|
+
};
|
|
1525
1707
|
}
|
|
1526
1708
|
}
|
|
1527
1709
|
}
|
|
@@ -1566,20 +1748,66 @@ class ExecuteCommand extends Activity {
|
|
|
1566
1748
|
}
|
|
1567
1749
|
// Execute command through Command Bus
|
|
1568
1750
|
const result = await this.commandService.execute(commandKey, commandInput);
|
|
1751
|
+
if (!result) {
|
|
1752
|
+
return {
|
|
1753
|
+
success: false,
|
|
1754
|
+
message: {
|
|
1755
|
+
text: `Command '${commandKey}' returned no result`,
|
|
1756
|
+
},
|
|
1757
|
+
data: {
|
|
1758
|
+
output: {
|
|
1759
|
+
commandKey,
|
|
1760
|
+
success: false,
|
|
1761
|
+
executedAt: new Date().toISOString(),
|
|
1762
|
+
},
|
|
1763
|
+
outcomes: {
|
|
1764
|
+
Failed: true,
|
|
1765
|
+
},
|
|
1766
|
+
},
|
|
1767
|
+
};
|
|
1768
|
+
}
|
|
1769
|
+
if (!result.success) {
|
|
1770
|
+
return {
|
|
1771
|
+
success: false,
|
|
1772
|
+
message: result.message,
|
|
1773
|
+
data: {
|
|
1774
|
+
output: {
|
|
1775
|
+
commandKey,
|
|
1776
|
+
success: false,
|
|
1777
|
+
executedAt: new Date().toISOString(),
|
|
1778
|
+
error: result.message?.text,
|
|
1779
|
+
},
|
|
1780
|
+
outcomes: {
|
|
1781
|
+
Failed: true,
|
|
1782
|
+
},
|
|
1783
|
+
},
|
|
1784
|
+
};
|
|
1785
|
+
}
|
|
1569
1786
|
return this.createResult({
|
|
1570
1787
|
commandKey,
|
|
1571
1788
|
success: true,
|
|
1572
|
-
output: result,
|
|
1573
|
-
executedAt: new Date().toISOString()
|
|
1789
|
+
output: result.data,
|
|
1790
|
+
executedAt: new Date().toISOString(),
|
|
1574
1791
|
}, 'Done');
|
|
1575
1792
|
}
|
|
1576
1793
|
catch (err) {
|
|
1577
1794
|
console.error('[ExecuteCommand] Error executing command:', err);
|
|
1578
|
-
return
|
|
1579
|
-
commandKey,
|
|
1795
|
+
return {
|
|
1580
1796
|
success: false,
|
|
1581
|
-
|
|
1582
|
-
|
|
1797
|
+
message: {
|
|
1798
|
+
text: err instanceof Error ? err.message : 'Unknown error',
|
|
1799
|
+
},
|
|
1800
|
+
data: {
|
|
1801
|
+
output: {
|
|
1802
|
+
commandKey,
|
|
1803
|
+
success: false,
|
|
1804
|
+
error: err instanceof Error ? err.message : 'Unknown error',
|
|
1805
|
+
},
|
|
1806
|
+
outcomes: {
|
|
1807
|
+
Failed: true,
|
|
1808
|
+
},
|
|
1809
|
+
},
|
|
1810
|
+
};
|
|
1583
1811
|
}
|
|
1584
1812
|
}
|
|
1585
1813
|
}
|
|
@@ -1635,11 +1863,22 @@ class ExecuteQuery extends Activity {
|
|
|
1635
1863
|
}
|
|
1636
1864
|
catch (err) {
|
|
1637
1865
|
console.error('[ExecuteQuery] Error executing query:', err);
|
|
1638
|
-
return
|
|
1639
|
-
queryKey,
|
|
1866
|
+
return {
|
|
1640
1867
|
success: false,
|
|
1641
|
-
|
|
1642
|
-
|
|
1868
|
+
message: {
|
|
1869
|
+
text: err instanceof Error ? err.message : 'Unknown error',
|
|
1870
|
+
},
|
|
1871
|
+
data: {
|
|
1872
|
+
output: {
|
|
1873
|
+
queryKey,
|
|
1874
|
+
success: false,
|
|
1875
|
+
error: err instanceof Error ? err.message : 'Unknown error',
|
|
1876
|
+
},
|
|
1877
|
+
outcomes: {
|
|
1878
|
+
Failed: true,
|
|
1879
|
+
},
|
|
1880
|
+
},
|
|
1881
|
+
};
|
|
1643
1882
|
}
|
|
1644
1883
|
}
|
|
1645
1884
|
}
|