@acorex/modules 21.0.0-next.5 → 21.0.0-next.7

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 (109) hide show
  1. package/application-management/index.d.ts +1 -0
  2. package/calendar-management/index.d.ts +6 -7
  3. package/document-management/index.d.ts +1545 -174
  4. package/fesm2022/acorex-modules-application-management.mjs +1 -0
  5. package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
  6. package/fesm2022/{acorex-modules-assessment-management-acorex-modules-assessment-management-C4_2RPxG.mjs → acorex-modules-assessment-management-acorex-modules-assessment-management-7S277fXg.mjs} +23 -23
  7. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-7S277fXg.mjs.map +1 -0
  8. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-column.component-D2YRh7ro.mjs → acorex-modules-assessment-management-answers-viewer-widget-column.component-FnpwLbkS.mjs} +2 -2
  9. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-column.component-D2YRh7ro.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-column.component-FnpwLbkS.mjs.map} +1 -1
  10. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-edit.component-B-S78gfQ.mjs → acorex-modules-assessment-management-answers-viewer-widget-edit.component-By0ETDZf.mjs} +2 -2
  11. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-edit.component-B-S78gfQ.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-edit.component-By0ETDZf.mjs.map} +1 -1
  12. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-view.component-C1BTgRTR.mjs → acorex-modules-assessment-management-answers-viewer-widget-view.component-DxmjBgIo.mjs} +2 -2
  13. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-view.component-C1BTgRTR.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-view.component-DxmjBgIo.mjs.map} +1 -1
  14. package/fesm2022/{acorex-modules-assessment-management-assessment-case.entity-DwTlClTz.mjs → acorex-modules-assessment-management-assessment-case.entity-CBjAGtV3.mjs} +2 -2
  15. package/fesm2022/{acorex-modules-assessment-management-assessment-case.entity-DwTlClTz.mjs.map → acorex-modules-assessment-management-assessment-case.entity-CBjAGtV3.mjs.map} +1 -1
  16. package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-BmvacBUU.mjs → acorex-modules-assessment-management-assessment-session.entity-CMnJ44gj.mjs} +2 -2
  17. package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-BmvacBUU.mjs.map → acorex-modules-assessment-management-assessment-session.entity-CMnJ44gj.mjs.map} +1 -1
  18. package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-D7ZNQBo8.mjs → acorex-modules-assessment-management-fill-assessment-session.command-8OhZEoAp.mjs} +3 -3
  19. package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-D7ZNQBo8.mjs.map → acorex-modules-assessment-management-fill-assessment-session.command-8OhZEoAp.mjs.map} +1 -1
  20. package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-BQxlJax7.mjs → acorex-modules-assessment-management-preview-questionnaire.command-CUybKZFY.mjs} +4 -4
  21. package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-BQxlJax7.mjs.map → acorex-modules-assessment-management-preview-questionnaire.command-CUybKZFY.mjs.map} +1 -1
  22. package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-CIjS5M1b.mjs → acorex-modules-assessment-management-question-bank-item.entity-C9gxvSqN.mjs} +2 -2
  23. package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-CIjS5M1b.mjs.map → acorex-modules-assessment-management-question-bank-item.entity-C9gxvSqN.mjs.map} +1 -1
  24. package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-edit.component-DAYiqBeA.mjs → acorex-modules-assessment-management-questionnaire-builder-edit.component-CUCT7Tcg.mjs} +2 -2
  25. package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-edit.component-DAYiqBeA.mjs.map → acorex-modules-assessment-management-questionnaire-builder-edit.component-CUCT7Tcg.mjs.map} +1 -1
  26. package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-view.component-BTXwZu9a.mjs → acorex-modules-assessment-management-questionnaire-builder-view.component-QhZAjnIv.mjs} +2 -2
  27. package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-view.component-BTXwZu9a.mjs.map → acorex-modules-assessment-management-questionnaire-builder-view.component-QhZAjnIv.mjs.map} +1 -1
  28. package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder.component-BAR6Uee-.mjs → acorex-modules-assessment-management-questionnaire-builder.component-CvdVE1TW.mjs} +3 -3
  29. package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder.component-BAR6Uee-.mjs.map → acorex-modules-assessment-management-questionnaire-builder.component-CvdVE1TW.mjs.map} +1 -1
  30. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer-popup.component-DZ4TltLI.mjs → acorex-modules-assessment-management-questionnaire-viewer-popup.component-iDPvZ1Iu.mjs} +2 -2
  31. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer-popup.component-DZ4TltLI.mjs.map → acorex-modules-assessment-management-questionnaire-viewer-popup.component-iDPvZ1Iu.mjs.map} +1 -1
  32. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer.service-B2GV_e0o.mjs → acorex-modules-assessment-management-questionnaire-viewer.service-C2bz2R0N.mjs} +2 -2
  33. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer.service-B2GV_e0o.mjs.map → acorex-modules-assessment-management-questionnaire-viewer.service-C2bz2R0N.mjs.map} +1 -1
  34. package/fesm2022/{acorex-modules-assessment-management-questionnaire.entity-mOtlUkUO.mjs → acorex-modules-assessment-management-questionnaire.entity-kvgtbI_h.mjs} +2 -2
  35. package/fesm2022/{acorex-modules-assessment-management-questionnaire.entity-mOtlUkUO.mjs.map → acorex-modules-assessment-management-questionnaire.entity-kvgtbI_h.mjs.map} +1 -1
  36. package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-BQ-3r9YQ.mjs → acorex-modules-assessment-management-view-session-answers.command-Dfl4QTDD.mjs} +3 -3
  37. package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-BQ-3r9YQ.mjs.map → acorex-modules-assessment-management-view-session-answers.command-Dfl4QTDD.mjs.map} +1 -1
  38. package/fesm2022/acorex-modules-assessment-management.mjs +1 -1
  39. package/fesm2022/acorex-modules-calendar-management.mjs +46 -74
  40. package/fesm2022/acorex-modules-calendar-management.mjs.map +1 -1
  41. package/fesm2022/acorex-modules-common.mjs +6 -3
  42. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  43. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-Bnp1l18X.mjs → acorex-modules-document-management-attachment-widget.component-zsWIFXD7.mjs} +2 -2
  44. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-Bnp1l18X.mjs.map → acorex-modules-document-management-attachment-widget.component-zsWIFXD7.mjs.map} +1 -1
  45. package/fesm2022/{acorex-modules-document-management-details-view.component-TfRh2Jom.mjs → acorex-modules-document-management-details-view.component-DD7P_Xz7.mjs} +2 -2
  46. package/fesm2022/{acorex-modules-document-management-details-view.component-TfRh2Jom.mjs.map → acorex-modules-document-management-details-view.component-DD7P_Xz7.mjs.map} +1 -1
  47. package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-nKUvSQuz.mjs → acorex-modules-document-management-document-signature-popup.component-DsCP-XfJ.mjs} +5 -5
  48. package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-nKUvSQuz.mjs.map → acorex-modules-document-management-document-signature-popup.component-DsCP-XfJ.mjs.map} +1 -1
  49. package/fesm2022/{acorex-modules-document-management-drive-choose.component-CPQC_Qxe.mjs → acorex-modules-document-management-drive-choose.component-FUlvIsJu.mjs} +7 -7
  50. package/fesm2022/{acorex-modules-document-management-drive-choose.component-CPQC_Qxe.mjs.map → acorex-modules-document-management-drive-choose.component-FUlvIsJu.mjs.map} +1 -1
  51. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-BP_4qwha.mjs → acorex-modules-document-management-large-icons-view.component-Dzc3SOKz.mjs} +2 -2
  52. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-BP_4qwha.mjs.map → acorex-modules-document-management-large-icons-view.component-Dzc3SOKz.mjs.map} +1 -1
  53. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-CP9Ra0z9.mjs → acorex-modules-document-management-large-tiles-view.component-DrRbFkP4.mjs} +2 -2
  54. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-CP9Ra0z9.mjs.map → acorex-modules-document-management-large-tiles-view.component-DrRbFkP4.mjs.map} +1 -1
  55. package/fesm2022/{acorex-modules-document-management-link-dialog.component-nJmv07CR.mjs → acorex-modules-document-management-link-dialog.component-DKGpdhH1.mjs} +3 -3
  56. package/fesm2022/{acorex-modules-document-management-link-dialog.component-nJmv07CR.mjs.map → acorex-modules-document-management-link-dialog.component-DKGpdhH1.mjs.map} +1 -1
  57. package/fesm2022/{acorex-modules-document-management-list-view.component-LhSA_duB.mjs → acorex-modules-document-management-list-view.component-C7cR3m4S.mjs} +2 -2
  58. package/fesm2022/{acorex-modules-document-management-list-view.component-LhSA_duB.mjs.map → acorex-modules-document-management-list-view.component-C7cR3m4S.mjs.map} +1 -1
  59. package/fesm2022/{acorex-modules-document-management-share-dialog.component-DJABAVOV.mjs → acorex-modules-document-management-share-dialog.component-MK4UO_uy.mjs} +3 -3
  60. package/fesm2022/{acorex-modules-document-management-share-dialog.component-DJABAVOV.mjs.map → acorex-modules-document-management-share-dialog.component-MK4UO_uy.mjs.map} +1 -1
  61. package/fesm2022/{acorex-modules-document-management-share-email-dialog.component-Bh_FI1nk.mjs → acorex-modules-document-management-share-email-dialog.component-D5f4T_2K.mjs} +3 -3
  62. package/fesm2022/{acorex-modules-document-management-share-email-dialog.component-Bh_FI1nk.mjs.map → acorex-modules-document-management-share-email-dialog.component-D5f4T_2K.mjs.map} +1 -1
  63. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-BOtJGiPU.mjs → acorex-modules-document-management-small-icons-view.component-BPWvSH3i.mjs} +2 -2
  64. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-BOtJGiPU.mjs.map → acorex-modules-document-management-small-icons-view.component-BPWvSH3i.mjs.map} +1 -1
  65. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BiKZ-FyZ.mjs → acorex-modules-document-management-small-tiles-view.component-fIQ4RY_F.mjs} +2 -2
  66. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BiKZ-FyZ.mjs.map → acorex-modules-document-management-small-tiles-view.component-fIQ4RY_F.mjs.map} +1 -1
  67. package/fesm2022/acorex-modules-document-management.mjs +9326 -1
  68. package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
  69. package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-CR4xmtkI.mjs +381 -0
  70. package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-CR4xmtkI.mjs.map +1 -0
  71. package/fesm2022/acorex-modules-human-capital-management.mjs +5 -2
  72. package/fesm2022/acorex-modules-human-capital-management.mjs.map +1 -1
  73. package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-BIq_sJye.mjs → acorex-modules-platform-management-acorex-modules-platform-management-BOo-XED8.mjs} +2 -2
  74. package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-BIq_sJye.mjs.map → acorex-modules-platform-management-acorex-modules-platform-management-BOo-XED8.mjs.map} +1 -1
  75. package/fesm2022/{acorex-modules-platform-management-menu-list.component-CL-zuLJ1.mjs → acorex-modules-platform-management-menu-list.component-BtQ0O4sx.mjs} +3 -3
  76. package/fesm2022/acorex-modules-platform-management-menu-list.component-BtQ0O4sx.mjs.map +1 -0
  77. package/fesm2022/acorex-modules-platform-management.mjs +1 -1
  78. package/fesm2022/acorex-modules-project-management.mjs +2 -0
  79. package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
  80. package/fesm2022/acorex-modules-report-management.mjs +1 -1
  81. package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
  82. package/fesm2022/acorex-modules-security-management.mjs +3 -1
  83. package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
  84. package/fesm2022/{acorex-modules-settings-management-acorex-modules-settings-management-gQ5Sk1Sj.mjs → acorex-modules-settings-management-acorex-modules-settings-management-R6m7cpPE.mjs} +18 -18
  85. package/fesm2022/{acorex-modules-settings-management-acorex-modules-settings-management-gQ5Sk1Sj.mjs.map → acorex-modules-settings-management-acorex-modules-settings-management-R6m7cpPE.mjs.map} +1 -1
  86. package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-BEDGpTc8.mjs → acorex-modules-settings-management-permission-definition.provider-BNzuJQfL.mjs} +2 -2
  87. package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-BEDGpTc8.mjs.map → acorex-modules-settings-management-permission-definition.provider-BNzuJQfL.mjs.map} +1 -1
  88. package/fesm2022/{acorex-modules-settings-management-setting-page.component-BsA1TfMG.mjs → acorex-modules-settings-management-setting-page.component-B1SnxHdd.mjs} +2 -2
  89. package/fesm2022/{acorex-modules-settings-management-setting-page.component-BsA1TfMG.mjs.map → acorex-modules-settings-management-setting-page.component-B1SnxHdd.mjs.map} +1 -1
  90. package/fesm2022/{acorex-modules-settings-management-setting-view.component-C282orx7.mjs → acorex-modules-settings-management-setting-view.component-BsuZ-NQK.mjs} +2 -2
  91. package/fesm2022/{acorex-modules-settings-management-setting-view.component-C282orx7.mjs.map → acorex-modules-settings-management-setting-view.component-BsuZ-NQK.mjs.map} +1 -1
  92. package/fesm2022/acorex-modules-settings-management.mjs +1 -1
  93. package/fesm2022/{acorex-modules-task-management-task-board.page-CKgZoOGI.mjs → acorex-modules-task-management-task-board.page-Cm8wJD-y.mjs} +529 -73
  94. package/fesm2022/acorex-modules-task-management-task-board.page-Cm8wJD-y.mjs.map +1 -0
  95. package/fesm2022/acorex-modules-task-management.mjs +13 -6
  96. package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
  97. package/fesm2022/acorex-modules-workflow-management.mjs +394 -12
  98. package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
  99. package/human-capital-management/index.d.ts +3 -1
  100. package/package.json +2 -2
  101. package/task-management/index.d.ts +31 -4
  102. package/workflow-management/index.d.ts +93 -6
  103. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-C4_2RPxG.mjs.map +0 -1
  104. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-Dk4Z-JSv.mjs +0 -8995
  105. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-Dk4Z-JSv.mjs.map +0 -1
  106. package/fesm2022/acorex-modules-document-management-drive.component-BzpH_FSJ.mjs +0 -388
  107. package/fesm2022/acorex-modules-document-management-drive.component-BzpH_FSJ.mjs.map +0 -1
  108. package/fesm2022/acorex-modules-platform-management-menu-list.component-CL-zuLJ1.mjs.map +0 -1
  109. package/fesm2022/acorex-modules-task-management-task-board.page-CKgZoOGI.mjs.map +0 -1
@@ -5,18 +5,20 @@ import { AXPEntityService, ensureListActions, actionExists, AXP_ENTITY_ACTION_PL
5
5
  import { firstValueFrom } from 'rxjs';
6
6
  import { AXMCalendarManagementModule } from '@acorex/modules/calendar-management';
7
7
  import * as i1 from '@acorex/platform/workflow';
8
- import { AXPWorkflowAction, AXPWorkflowModule, WorkflowCoordinator, AXP_WORKFLOW_DEFINITION_LOADER, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER } from '@acorex/platform/workflow';
8
+ import { AXPWorkflowAction, AXPWorkflowModule, AXPWorkflowManager, AXP_WORKFLOW_DEFINITION_LOADER, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, AXP_WORKFLOW_CATEGORY_PROVIDER, AXP_WORKFLOW_PROVIDER } from '@acorex/platform/workflow';
9
9
  import { provideCommandSetups } from '@acorex/platform/runtime';
10
10
  import { AXPDataGenerator, AXP_MODULE_MANIFEST_PROVIDER } from '@acorex/platform/core';
11
11
  import * as i2 from '@acorex/platform/layout/widget-core';
12
- import { AXPWidgetGroupEnum, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule, AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
12
+ import { AXPWidgetGroupEnum, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule, AXPWidgetsCatalog, AXPWidgetSerializationHelper } from '@acorex/platform/layout/widget-core';
13
13
  import { AXPEntityCommandScope, createAllQueryView, AXPEntityQueryType } from '@acorex/platform/common';
14
14
  import { AXTranslationService } from '@acorex/core/translation';
15
- import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
15
+ import { AXPLayoutBuilderService, AXPDialogRendererComponent } from '@acorex/platform/layout/builder';
16
16
  import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY } from '@acorex/platform/layout/widgets';
17
17
  import { AXToastService } from '@acorex/components/toast';
18
18
  import { AXPWidgetsList } from '@acorex/modules/common';
19
19
  import { AXDialogService } from '@acorex/components/dialog';
20
+ import { AXPopupService } from '@acorex/components/popup';
21
+ import { cloneDeep } from 'lodash-es';
20
22
  import { AXPDomainModule, provideEntity } from '@acorex/platform/domain';
21
23
 
22
24
  const config = {
@@ -60,6 +62,13 @@ const RootConfig = {
60
62
  titlePlural: '@workflow-management:activities.entities.activity-definition.plural',
61
63
  icon: 'fa-light fa-puzzle-piece',
62
64
  },
65
+ workflowCategory: {
66
+ name: 'WorkflowCategory',
67
+ fullName: `${config.module}.WorkflowCategory`,
68
+ title: '@workflow-management:workflows.entities.workflow-category.title',
69
+ titlePlural: '@workflow-management:workflows.entities.workflow-category.plural',
70
+ icon: 'fa-light fa-folder',
71
+ },
63
72
  },
64
73
  };
65
74
 
@@ -550,7 +559,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
550
559
  class ExecuteWorkflowCommand {
551
560
  constructor() {
552
561
  //#region ---- Services ----
553
- this.workflowCoordinator = inject(WorkflowCoordinator);
562
+ this.workflowManager = inject(AXPWorkflowManager);
554
563
  this.toastService = inject(AXToastService);
555
564
  }
556
565
  //#endregion
@@ -559,7 +568,7 @@ class ExecuteWorkflowCommand {
559
568
  try {
560
569
  console.log(`[ExecuteWorkflowCommand] Starting workflow: ${input.workflowId}`);
561
570
  // Start workflow execution
562
- const result = await this.workflowCoordinator.startWorkflow(input.workflowId, input.input || {});
571
+ const result = await this.workflowManager.start(input.workflowId, input.input || {});
563
572
  if (!result.success) {
564
573
  this.toastService.show({
565
574
  color: 'danger',
@@ -574,7 +583,7 @@ class ExecuteWorkflowCommand {
574
583
  text: result.error || 'Unknown error'
575
584
  },
576
585
  data: {
577
- executionId: result.executionId || '',
586
+ instanceId: result.instanceId || '',
578
587
  output: null,
579
588
  }
580
589
  };
@@ -585,9 +594,9 @@ class ExecuteWorkflowCommand {
585
594
  const task = currentResult.nextTask;
586
595
  console.log(`[ExecuteWorkflowCommand] Executing frontend task: ${task.activityType}`);
587
596
  // Execute frontend task
588
- const { output, outcome } = await this.workflowCoordinator.executeTask(task);
597
+ const { output, outcome } = await this.workflowManager.execute(task);
589
598
  // Complete task and get next
590
- currentResult = await this.workflowCoordinator.completeTask(currentResult.executionId, task, outcome, output);
599
+ currentResult = await this.workflowManager.complete(currentResult.instanceId, task, outcome, output);
591
600
  if (!currentResult.success) {
592
601
  this.toastService.show({
593
602
  color: 'danger',
@@ -602,7 +611,7 @@ class ExecuteWorkflowCommand {
602
611
  text: currentResult.error || 'Unknown error'
603
612
  },
604
613
  data: {
605
- executionId: currentResult.executionId || '',
614
+ instanceId: currentResult.instanceId || '',
606
615
  output: null,
607
616
  }
608
617
  };
@@ -620,7 +629,7 @@ class ExecuteWorkflowCommand {
620
629
  return {
621
630
  success: true,
622
631
  data: {
623
- executionId: currentResult.executionId,
632
+ instanceId: currentResult.instanceId,
624
633
  output: currentResult.state?.output,
625
634
  }
626
635
  };
@@ -640,7 +649,7 @@ class ExecuteWorkflowCommand {
640
649
  text: error.message || 'Unknown error'
641
650
  },
642
651
  data: {
643
- executionId: '',
652
+ instanceId: '',
644
653
  output: null,
645
654
  }
646
655
  };
@@ -1485,6 +1494,188 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1485
1494
  type: Injectable
1486
1495
  }] });
1487
1496
 
1497
+ /**
1498
+ * Workflow Category Provider
1499
+ *
1500
+ * Provides workflow categories from entity service.
1501
+ * Reads from entity service (mock data or API).
1502
+ */
1503
+ class AXMWorkflowCategoryProvider {
1504
+ constructor() {
1505
+ //#region ---- Services & Dependencies ----
1506
+ this.entityService = inject(AXPEntityService);
1507
+ this.categoryService = this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.workflowCategory?.name || 'WorkflowCategory').data();
1508
+ }
1509
+ //#endregion
1510
+ //#region ---- AXPWorkflowCategoryProvider Implementation ----
1511
+ async getList(parentId) {
1512
+ const filters = [];
1513
+ if (parentId === undefined) {
1514
+ // Root categories: parentId is null or undefined
1515
+ filters.push({
1516
+ field: 'parentId',
1517
+ operator: {
1518
+ type: 'isNull',
1519
+ },
1520
+ });
1521
+ }
1522
+ else {
1523
+ // Child categories: parentId matches
1524
+ filters.push({
1525
+ field: 'parentId',
1526
+ operator: {
1527
+ type: 'equal',
1528
+ },
1529
+ value: parentId,
1530
+ });
1531
+ }
1532
+ const result = await this.categoryService.query({
1533
+ skip: 0,
1534
+ take: 1000,
1535
+ filter: {
1536
+ logic: 'and',
1537
+ filters,
1538
+ },
1539
+ });
1540
+ return (result.items || []);
1541
+ }
1542
+ async getById(id) {
1543
+ const result = await this.categoryService.query({
1544
+ skip: 0,
1545
+ take: 1,
1546
+ filter: {
1547
+ logic: 'and',
1548
+ filters: [{
1549
+ field: 'id',
1550
+ operator: {
1551
+ type: 'equal',
1552
+ },
1553
+ value: id,
1554
+ }],
1555
+ },
1556
+ });
1557
+ if (result.items && result.items.length > 0) {
1558
+ return result.items[0];
1559
+ }
1560
+ return undefined;
1561
+ }
1562
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXMWorkflowCategoryProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1563
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXMWorkflowCategoryProvider }); }
1564
+ }
1565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXMWorkflowCategoryProvider, decorators: [{
1566
+ type: Injectable
1567
+ }] });
1568
+
1569
+ /**
1570
+ * Workflow Definition Metadata Provider
1571
+ *
1572
+ * Provides workflow definition metadata (metadata only).
1573
+ * Workflow definition metadata contains metadata for UI and tooling.
1574
+ * The `name` property is used as the workflow identifier.
1575
+ * Reads from entity service (mock data or API).
1576
+ */
1577
+ class AXMWorkflowDefinitionMetadataProvider {
1578
+ constructor() {
1579
+ //#region ---- Services & Dependencies ----
1580
+ this.entityService = inject(AXPEntityService);
1581
+ this.workflowDefinitionService = this.entityService.withEntity(RootConfig.module.name, RootConfig.entities.workflowDefinition.name).data();
1582
+ }
1583
+ //#endregion
1584
+ //#region ---- AXPWorkflowProvider Implementation ----
1585
+ async getList(categoryId) {
1586
+ // Use 'equal' operator to filter by category field
1587
+ const result = await this.workflowDefinitionService.query({
1588
+ skip: 0,
1589
+ take: 1000,
1590
+ filter: {
1591
+ logic: 'and',
1592
+ filters: [{
1593
+ field: 'category',
1594
+ operator: {
1595
+ type: 'equal',
1596
+ },
1597
+ value: categoryId,
1598
+ }]
1599
+ }
1600
+ });
1601
+ // Convert entity data to metadata format
1602
+ return (result.items || []).map((item) => ({
1603
+ name: item.name || item.id || '',
1604
+ title: item.title || item.name || item.id || '',
1605
+ description: item.description || undefined,
1606
+ category: item.category || categoryId,
1607
+ icon: item.icon || 'fa-light fa-diagram-project',
1608
+ version: item.version || 1,
1609
+ isPublished: item.isPublished ?? true,
1610
+ isBrowsable: item.isBrowsable ?? true,
1611
+ }));
1612
+ }
1613
+ async getById(name) {
1614
+ // Try to find by name field first, then by id field
1615
+ const byName = await this.workflowDefinitionService.query({
1616
+ skip: 0,
1617
+ take: 1,
1618
+ filter: {
1619
+ logic: 'and',
1620
+ filters: [{
1621
+ field: 'name',
1622
+ operator: {
1623
+ type: 'equal',
1624
+ },
1625
+ value: name,
1626
+ }]
1627
+ }
1628
+ });
1629
+ if (byName.items && byName.items.length > 0) {
1630
+ const item = byName.items[0];
1631
+ return {
1632
+ name: item.name || item.id || '',
1633
+ title: item.title || item.name || item.id || '',
1634
+ description: item.description || undefined,
1635
+ category: item.category || undefined,
1636
+ icon: item.icon || 'fa-light fa-diagram-project',
1637
+ version: item.version || 1,
1638
+ isPublished: item.isPublished ?? true,
1639
+ isBrowsable: item.isBrowsable ?? true,
1640
+ };
1641
+ }
1642
+ // Try by id field
1643
+ const byId = await this.workflowDefinitionService.query({
1644
+ skip: 0,
1645
+ take: 1,
1646
+ filter: {
1647
+ logic: 'and',
1648
+ filters: [{
1649
+ field: 'id',
1650
+ operator: {
1651
+ type: 'equal',
1652
+ },
1653
+ value: name,
1654
+ }]
1655
+ }
1656
+ });
1657
+ if (byId.items && byId.items.length > 0) {
1658
+ const item = byId.items[0];
1659
+ return {
1660
+ name: item.name || item.id || '',
1661
+ title: item.title || item.name || item.id || '',
1662
+ description: item.description || undefined,
1663
+ category: item.category || undefined,
1664
+ icon: item.icon || 'fa-light fa-diagram-project',
1665
+ version: item.version || 1,
1666
+ isPublished: item.isPublished ?? true,
1667
+ isBrowsable: item.isBrowsable ?? true,
1668
+ };
1669
+ }
1670
+ return undefined;
1671
+ }
1672
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXMWorkflowDefinitionMetadataProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1673
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXMWorkflowDefinitionMetadataProvider }); }
1674
+ }
1675
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXMWorkflowDefinitionMetadataProvider, decorators: [{
1676
+ type: Injectable
1677
+ }] });
1678
+
1488
1679
  //#endregion
1489
1680
  /**
1490
1681
  * CheckPermission Activity (Backend)
@@ -1874,6 +2065,169 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1874
2065
  type: Injectable
1875
2066
  }] });
1876
2067
 
2068
+ //#region ---- Imports ----
2069
+ //#endregion
2070
+ /**
2071
+ * ShowLayoutPopup Activity (Frontend)
2072
+ *
2073
+ * Shows a popup dialog with a custom layout built using layout builder.
2074
+ * The layout can be provided as JSON string or AXPWidgetNode object.
2075
+ *
2076
+ * Execution Mode: frontend
2077
+ * Activity Type: workflow-activity:show-layout-popup
2078
+ *
2079
+ * Outcomes:
2080
+ * Outcomes are dynamically generated based on the actions provided in the input.
2081
+ * Each action creates a corresponding outcome with the action name (from command.name or action.name).
2082
+ * If no actions are provided, default actions (cancel, submit) are used.
2083
+ *
2084
+ * Examples:
2085
+ * - If action has command.name = 'save', outcome will be { save: true }
2086
+ * - If action has name = 'delete', outcome will be { delete: true }
2087
+ * - Default outcomes: { cancel: true } or { submit: true }
2088
+ */
2089
+ class ShowLayoutPopupActivity {
2090
+ constructor() {
2091
+ //#region ---- Services & Dependencies ----
2092
+ this.popupService = inject(AXPopupService);
2093
+ }
2094
+ //#endregion
2095
+ //#region ---- AXPCommand Implementation ----
2096
+ async execute(input) {
2097
+ try {
2098
+ // Parse layout definition
2099
+ let layoutNode;
2100
+ if (typeof input.layout === 'string') {
2101
+ // If it's a JSON string, parse it
2102
+ try {
2103
+ layoutNode = AXPWidgetSerializationHelper.fromJson(input.layout);
2104
+ }
2105
+ catch (error) {
2106
+ throw new Error(`Invalid layout JSON: ${error.message}`);
2107
+ }
2108
+ }
2109
+ else {
2110
+ // If it's already an object, use it directly (clone to avoid mutations)
2111
+ layoutNode = cloneDeep(input.layout);
2112
+ }
2113
+ // Validate layout node
2114
+ if (!layoutNode || !layoutNode.type) {
2115
+ throw new Error('Invalid layout: missing type property');
2116
+ }
2117
+ // Build actions from input or use defaults
2118
+ const actions = input.actions || {
2119
+ suffix: [
2120
+ {
2121
+ title: '@general:actions.cancel.title',
2122
+ icon: 'fa-times',
2123
+ color: 'default',
2124
+ command: { name: 'cancel' },
2125
+ },
2126
+ {
2127
+ title: '@general:actions.submit.title',
2128
+ icon: 'fa-check',
2129
+ color: 'primary',
2130
+ command: { name: 'submit', options: { validate: true } },
2131
+ },
2132
+ ],
2133
+ };
2134
+ // Create dialog configuration
2135
+ const dialogConfig = {
2136
+ title: input.title || 'Dialog',
2137
+ context: input.context || {},
2138
+ definition: layoutNode,
2139
+ actions: {
2140
+ footer: {
2141
+ prefix: actions.prefix || [],
2142
+ suffix: actions.suffix || [],
2143
+ },
2144
+ },
2145
+ };
2146
+ // Extract action names for outcomes (from command.name or action.name)
2147
+ const actionNames = new Set();
2148
+ if (actions.prefix) {
2149
+ actions.prefix.forEach((action) => {
2150
+ const actionName = action.command?.name || action.name || 'unknown';
2151
+ actionNames.add(actionName);
2152
+ });
2153
+ }
2154
+ if (actions.suffix) {
2155
+ actions.suffix.forEach((action) => {
2156
+ const actionName = action.command?.name || action.name || 'unknown';
2157
+ actionNames.add(actionName);
2158
+ });
2159
+ }
2160
+ // Show dialog using AXPDialogRendererComponent
2161
+ const dialogResult = await new Promise((resolve) => {
2162
+ this.popupService.open(AXPDialogRendererComponent, {
2163
+ title: dialogConfig.title,
2164
+ size: input.size || 'md',
2165
+ closeButton: input.closeButton !== undefined ? input.closeButton : true,
2166
+ closeOnBackdropClick: false,
2167
+ draggable: false,
2168
+ data: {
2169
+ config: dialogConfig,
2170
+ callBack: (result) => {
2171
+ resolve({
2172
+ context: result.context?.() || dialogConfig.context,
2173
+ action: result.action?.() || 'cancel',
2174
+ });
2175
+ },
2176
+ },
2177
+ });
2178
+ });
2179
+ // Extract result data and action
2180
+ const result = dialogResult?.context || {};
2181
+ const action = dialogResult?.action || 'cancel';
2182
+ // Build outcomes dynamically based on action names
2183
+ // Each action creates a corresponding outcome
2184
+ const outcomes = {};
2185
+ // Set the outcome for the clicked action to true
2186
+ if (action && actionNames.has(action)) {
2187
+ outcomes[action] = true;
2188
+ }
2189
+ else if (action) {
2190
+ // If action is not in the list, still add it as outcome
2191
+ outcomes[action] = true;
2192
+ }
2193
+ console.log(`[ShowLayoutPopupActivity] Dialog closed with action: ${action}`, result);
2194
+ return {
2195
+ success: true,
2196
+ data: {
2197
+ output: {
2198
+ result,
2199
+ action,
2200
+ },
2201
+ outcomes,
2202
+ },
2203
+ };
2204
+ }
2205
+ catch (error) {
2206
+ console.error(`[ShowLayoutPopupActivity] Failed to show layout popup:`, error);
2207
+ return {
2208
+ success: false,
2209
+ message: {
2210
+ text: error.message || 'Failed to show layout popup',
2211
+ },
2212
+ data: {
2213
+ output: {
2214
+ result: {},
2215
+ action: 'cancel',
2216
+ },
2217
+ outcomes: {
2218
+ cancel: true,
2219
+ },
2220
+ },
2221
+ };
2222
+ }
2223
+ }
2224
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ShowLayoutPopupActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2225
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ShowLayoutPopupActivity }); }
2226
+ }
2227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ShowLayoutPopupActivity, decorators: [{
2228
+ type: Injectable
2229
+ }] });
2230
+
1877
2231
  class AXMWorkflowManagementModule {
1878
2232
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXMWorkflowManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1879
2233
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXMWorkflowManagementModule, imports: [AXMCalendarManagementModule,
@@ -1891,6 +2245,7 @@ class AXMWorkflowManagementModule {
1891
2245
  provideEntity([
1892
2246
  RootConfig.entities.activityCategory.fullName,
1893
2247
  RootConfig.entities.activityDefinition.fullName,
2248
+ RootConfig.entities.workflowCategory?.fullName || `${RootConfig.module.name}.WorkflowCategory`,
1894
2249
  ]),
1895
2250
  // Module Manifest Provider
1896
2251
  {
@@ -1913,11 +2268,24 @@ class AXMWorkflowManagementModule {
1913
2268
  useClass: AXMWorkflowActivitiesDefinitionProvider,
1914
2269
  multi: true,
1915
2270
  },
2271
+ // Workflow Category Provider
2272
+ {
2273
+ provide: AXP_WORKFLOW_CATEGORY_PROVIDER,
2274
+ useClass: AXMWorkflowCategoryProvider,
2275
+ multi: true,
2276
+ },
2277
+ // Workflow Definition Metadata Provider
2278
+ {
2279
+ provide: AXP_WORKFLOW_PROVIDER,
2280
+ useClass: AXMWorkflowDefinitionMetadataProvider,
2281
+ multi: true,
2282
+ },
1916
2283
  // Provide activity classes for dependency injection
1917
2284
  CheckPermissionActivity,
1918
2285
  ExecuteQueryActivity,
1919
2286
  ExecuteCommandActivity,
1920
2287
  ShowConfirmPopupActivity,
2288
+ ShowLayoutPopupActivity,
1921
2289
  ], imports: [AXMCalendarManagementModule,
1922
2290
  AXMSignPluginModule,
1923
2291
  AXPDomainModule,
@@ -1944,6 +2312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1944
2312
  provideEntity([
1945
2313
  RootConfig.entities.activityCategory.fullName,
1946
2314
  RootConfig.entities.activityDefinition.fullName,
2315
+ RootConfig.entities.workflowCategory?.fullName || `${RootConfig.module.name}.WorkflowCategory`,
1947
2316
  ]),
1948
2317
  // Module Manifest Provider
1949
2318
  {
@@ -1966,11 +2335,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1966
2335
  useClass: AXMWorkflowActivitiesDefinitionProvider,
1967
2336
  multi: true,
1968
2337
  },
2338
+ // Workflow Category Provider
2339
+ {
2340
+ provide: AXP_WORKFLOW_CATEGORY_PROVIDER,
2341
+ useClass: AXMWorkflowCategoryProvider,
2342
+ multi: true,
2343
+ },
2344
+ // Workflow Definition Metadata Provider
2345
+ {
2346
+ provide: AXP_WORKFLOW_PROVIDER,
2347
+ useClass: AXMWorkflowDefinitionMetadataProvider,
2348
+ multi: true,
2349
+ },
1969
2350
  // Provide activity classes for dependency injection
1970
2351
  CheckPermissionActivity,
1971
2352
  ExecuteQueryActivity,
1972
2353
  ExecuteCommandActivity,
1973
2354
  ShowConfirmPopupActivity,
2355
+ ShowLayoutPopupActivity,
1974
2356
  ],
1975
2357
  }]
1976
2358
  }] });
@@ -1979,5 +2361,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1979
2361
  * Generated bundle index. Do not edit.
1980
2362
  */
1981
2363
 
1982
- export { AXCCategoryProvider, AXMMenuProvider, AXMSignPluginModule, AXMSignPopupAction, AXMSignWorkflow, AXMWorkflowActivitiesDefinitionProvider, AXMWorkflowManagementModule, AXMWorkflowManagementModuleEntityProvider, AXMWorkflowManagementWorkflowDefinitionEntityModule, AXMWorkflowManagementWorkflowDefinitionEntityService, AXMWorkflowManagementWorkflowDefinitionEntityServiceImpl, AXMWorkflowManagementWorkflowInstanceEntityModule, AXMWorkflowManagementWorkflowInstanceEntityService, AXMWorkflowManagementWorkflowInstanceEntityServiceImpl, CheckPermissionActivity, ExecuteCommandActivity, ExecuteQueryActivity, ExecuteWorkflowCommand, RootConfig, ShowConfirmPopupActivity, signPlugin, factory$1 as workflowDefinitionEntityFactory, factory as workflowInstanceEntityFactory };
2364
+ export { AXCCategoryProvider, AXMMenuProvider, AXMSignPluginModule, AXMSignPopupAction, AXMSignWorkflow, AXMWorkflowActivitiesDefinitionProvider, AXMWorkflowManagementModule, AXMWorkflowManagementModuleEntityProvider, AXMWorkflowManagementWorkflowDefinitionEntityModule, AXMWorkflowManagementWorkflowDefinitionEntityService, AXMWorkflowManagementWorkflowDefinitionEntityServiceImpl, AXMWorkflowManagementWorkflowInstanceEntityModule, AXMWorkflowManagementWorkflowInstanceEntityService, AXMWorkflowManagementWorkflowInstanceEntityServiceImpl, CheckPermissionActivity, ExecuteCommandActivity, ExecuteQueryActivity, ExecuteWorkflowCommand, RootConfig, ShowConfirmPopupActivity, ShowLayoutPopupActivity, signPlugin, factory$1 as workflowDefinitionEntityFactory, factory as workflowInstanceEntityFactory };
1983
2365
  //# sourceMappingURL=acorex-modules-workflow-management.mjs.map