@acorex/platform 21.0.0-next.39 → 21.0.0-next.41

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.
Files changed (59) hide show
  1. package/fesm2022/acorex-platform-common.mjs +6 -2
  2. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  3. package/fesm2022/acorex-platform-core.mjs +8 -1
  4. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-domain.mjs +3 -0
  6. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-layout-builder.mjs +137 -34
  8. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-layout-components.mjs +25 -13
  10. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-designer.mjs +261 -58
  12. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-entity.mjs +1583 -632
  14. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-layout-widget-core.mjs +169 -85
  16. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  17. package/fesm2022/{acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs → acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs} +9 -4
  18. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-layout-widgets.mjs +1053 -409
  20. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-runtime.mjs +120 -9
  22. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  23. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs → acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs} +3 -3
  24. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +1 -0
  25. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs → acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs} +3 -3
  26. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs → acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs} +3 -3
  28. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-themes-default.mjs +10 -10
  30. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  31. package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs} +2 -2
  32. package/fesm2022/acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
  34. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
  35. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs} +38 -16
  36. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-themes-shared.mjs +183 -84
  38. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  39. package/fesm2022/acorex-platform-workflow.mjs +52 -11
  40. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  41. package/package.json +1 -1
  42. package/types/acorex-platform-common.d.ts +14 -10
  43. package/types/acorex-platform-core.d.ts +13 -2
  44. package/types/acorex-platform-domain.d.ts +28 -2
  45. package/types/acorex-platform-layout-builder.d.ts +61 -29
  46. package/types/acorex-platform-layout-designer.d.ts +88 -16
  47. package/types/acorex-platform-layout-entity.d.ts +190 -15
  48. package/types/acorex-platform-layout-widget-core.d.ts +81 -71
  49. package/types/acorex-platform-layout-widgets.d.ts +131 -54
  50. package/types/acorex-platform-runtime.d.ts +156 -61
  51. package/types/acorex-platform-workflow.d.ts +37 -2
  52. package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs.map +0 -1
  53. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +0 -1
  54. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs.map +0 -1
  55. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs.map +0 -1
  56. package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
  57. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs +0 -65
  58. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +0 -1
  59. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +0 -1
@@ -872,6 +872,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
872
872
  */
873
873
  const AXP_WORKFLOW_ENGINE = new InjectionToken('AXP_WORKFLOW_ENGINE');
874
874
 
875
+ /**
876
+ * Activity types that use the task board (suspend until user acts via inbox), not inline interactive execution.
877
+ */
878
+ const AXP_WORKFLOW_TASK_BOARD_ACTIVITY_TYPES = [
879
+ 'workflow-activity:human-task',
880
+ 'workflow-activity:cartable',
881
+ ];
882
+ function axpIsWorkflowTaskBoardActivityType(activityType) {
883
+ return !!activityType && AXP_WORKFLOW_TASK_BOARD_ACTIVITY_TYPES.includes(activityType);
884
+ }
885
+
875
886
  //#endregion
876
887
  /**
877
888
  * Workflow Expression Scope Service
@@ -1093,6 +1104,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1093
1104
  const ENGINE_BUILTIN_ACTIVITY_TYPES = new Set([
1094
1105
  'workflow-activity:set-variable',
1095
1106
  'workflow-activity:http-request',
1107
+ 'workflow-activity:resolve-employee-user-id',
1096
1108
  ]);
1097
1109
  //#endregion
1098
1110
  /**
@@ -1157,7 +1169,7 @@ class ActivityExecutor {
1157
1169
  outcome: 'Done'
1158
1170
  };
1159
1171
  }
1160
- // Flatten properties if nested (workflow-studio format)
1172
+ // Flatten properties if nested (designer-style nested payload)
1161
1173
  let commandInput = evaluatedInputs;
1162
1174
  if (commandInput['properties'] && typeof commandInput['properties'] === 'object') {
1163
1175
  // Flatten: {properties: {text: "..."}} -> {text: "..."}
@@ -1299,9 +1311,9 @@ class AXPWorkflowManager {
1299
1311
  let iterationCount = 0;
1300
1312
  while (currentTask && iterationCount < maxIterations) {
1301
1313
  iterationCount++;
1302
- // Interactive = frontend executionMode and NOT workflow-activity:human-task (that one goes to task board)
1314
+ // Interactive = frontend executionMode and NOT task-board activities (human-task, cartable)
1303
1315
  const isInteractive = (currentTask.executionMode === 'frontend' || currentTask.executionMode === 'both') &&
1304
- currentTask.activityType !== 'workflow-activity:human-task';
1316
+ !axpIsWorkflowTaskBoardActivityType(currentTask.activityType);
1305
1317
  if (isInteractive) {
1306
1318
  // Execute frontend activity
1307
1319
  const execResult = await this.activityExecutor.execute(currentTask, currentState, currentActivityOutputs);
@@ -1339,9 +1351,9 @@ class AXPWorkflowManager {
1339
1351
  output: completeResponse.output,
1340
1352
  };
1341
1353
  }
1342
- // Backend decides: if nextTask is workflow-activity:human-task or not frontend, return it (task board or done)
1354
+ // Backend decides: if nextTask is task-board activity or not frontend, return it (task board or done)
1343
1355
  const nextInteractive = (completeResponse.nextTask.executionMode === 'frontend' || completeResponse.nextTask.executionMode === 'both') &&
1344
- completeResponse.nextTask.activityType !== 'workflow-activity:human-task';
1356
+ !axpIsWorkflowTaskBoardActivityType(completeResponse.nextTask.activityType);
1345
1357
  if (!nextInteractive) {
1346
1358
  return {
1347
1359
  nextTask: completeResponse.nextTask,
@@ -1352,7 +1364,7 @@ class AXPWorkflowManager {
1352
1364
  currentTask = completeResponse.nextTask;
1353
1365
  }
1354
1366
  else {
1355
- // Not interactive (e.g. workflow-activity:human-task) - return as-is for task board
1367
+ // Not interactive (e.g. human-task / cartable) - return as-is for task board
1356
1368
  return {
1357
1369
  nextTask: currentTask,
1358
1370
  state: currentState,
@@ -1403,13 +1415,13 @@ class AXPWorkflowManager {
1403
1415
  startNormalizedState.lastUpdated = new Date(startNormalizedState.lastUpdated);
1404
1416
  }
1405
1417
  this.stateCache.set(response.instanceId, startNormalizedState);
1406
- // 🎯 Interactive flow: Execute frontend activities that are NOT workflow-activity:human-task (those go to task board)
1418
+ // 🎯 Interactive flow: Execute frontend activities that are NOT task-board types (those go to task board)
1407
1419
  let finalNextTask = response.pendingTask || null;
1408
1420
  let finalOutput = startNormalizedState.output;
1409
1421
  const pendingTask = response.pendingTask;
1410
1422
  if (pendingTask &&
1411
1423
  (pendingTask.executionMode === 'frontend' || pendingTask.executionMode === 'both') &&
1412
- pendingTask.activityType !== 'workflow-activity:human-task') {
1424
+ !axpIsWorkflowTaskBoardActivityType(pendingTask.activityType)) {
1413
1425
  const interactiveResult = await this.executeInteractiveFlow(response.instanceId, pendingTask, startNormalizedState, response.activityOutputs || response.state.activityOutputs);
1414
1426
  finalNextTask = interactiveResult.nextTask;
1415
1427
  startNormalizedState = interactiveResult.state;
@@ -1472,13 +1484,13 @@ class AXPWorkflowManager {
1472
1484
  if (normalizedState) {
1473
1485
  this.stateCache.set(instanceId, normalizedState);
1474
1486
  }
1475
- // 🎯 Interactive flow: Execute frontend activities that are NOT workflow-activity:human-task (those go to task board)
1487
+ // 🎯 Interactive flow: Execute frontend activities that are NOT task-board types (those go to task board)
1476
1488
  let finalNextTask = response.nextTask || null;
1477
1489
  let finalOutput = response.output;
1478
1490
  const nextTask = response.nextTask;
1479
1491
  if (nextTask &&
1480
1492
  (nextTask.executionMode === 'frontend' || nextTask.executionMode === 'both') &&
1481
- nextTask.activityType !== 'workflow-activity:human-task') {
1493
+ !axpIsWorkflowTaskBoardActivityType(nextTask.activityType)) {
1482
1494
  const interactiveResult = await this.executeInteractiveFlow(instanceId, nextTask, normalizedState, normalizedState?.activityOutputs);
1483
1495
  finalNextTask = interactiveResult.nextTask;
1484
1496
  normalizedState = interactiveResult.state;
@@ -1549,6 +1561,35 @@ class AXPWorkflowManager {
1549
1561
  return null;
1550
1562
  }
1551
1563
  }
1564
+ /**
1565
+ * Claim a pooled workflow task (assign current user on the bookmark without advancing the workflow).
1566
+ * Supported only when the injected workflow engine implements {@link AXPWorkflowEngine.claimTask}.
1567
+ */
1568
+ async claimTask(instanceId, bookmarkId, stepId) {
1569
+ const claim = this.workflowEngine.claimTask?.bind(this.workflowEngine);
1570
+ if (!claim) {
1571
+ return {
1572
+ success: false,
1573
+ instanceId,
1574
+ error: 'Claim task is not supported by this workflow engine',
1575
+ };
1576
+ }
1577
+ try {
1578
+ const result = await claim({ instanceId, bookmarkId, stepId });
1579
+ return {
1580
+ success: result.success,
1581
+ instanceId,
1582
+ error: result.error,
1583
+ };
1584
+ }
1585
+ catch (error) {
1586
+ return {
1587
+ success: false,
1588
+ instanceId,
1589
+ error: error instanceof Error ? error.message : 'Failed to claim task',
1590
+ };
1591
+ }
1592
+ }
1552
1593
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1553
1594
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowManager, providedIn: 'root' }); }
1554
1595
  }
@@ -2517,5 +2558,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
2517
2558
  * Generated bundle index. Do not edit.
2518
2559
  */
2519
2560
 
2520
- export { AXPActivityDefinitionService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowDefinitionService, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowFunction, AXPWorkflowLocalEngine, AXPWorkflowManager, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, AXP_WORKFLOW_CATEGORY_PROVIDER, AXP_WORKFLOW_ENGINE, AXP_WORKFLOW_PROVIDER, ActivityExecutor, WorkflowExpressionScopeService, createWorkFlowEvent, ofType };
2561
+ export { AXPActivityDefinitionService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowDefinitionService, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowFunction, AXPWorkflowLocalEngine, AXPWorkflowManager, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, AXP_WORKFLOW_CATEGORY_PROVIDER, AXP_WORKFLOW_ENGINE, AXP_WORKFLOW_PROVIDER, AXP_WORKFLOW_TASK_BOARD_ACTIVITY_TYPES, ActivityExecutor, WorkflowExpressionScopeService, axpIsWorkflowTaskBoardActivityType, createWorkFlowEvent, ofType };
2521
2562
  //# sourceMappingURL=acorex-platform-workflow.mjs.map