verben-workflow-ui 0.6.6 → 0.6.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 (1121) hide show
  1. package/esm2022/public-api.mjs +43 -0
  2. package/esm2022/src/lib/base/core/base-data-page.facade.mjs +412 -0
  3. package/esm2022/src/lib/base/core/base-data-page.service.mjs +140 -0
  4. package/esm2022/src/lib/base/core/base-data-page.state.mjs +216 -0
  5. package/esm2022/src/lib/base/handlers/filter-handler.service.mjs +138 -0
  6. package/esm2022/src/lib/base/handlers/search-handler.service.mjs +31 -0
  7. package/esm2022/src/lib/base/handlers/sort-handler.service.mjs +73 -0
  8. package/esm2022/src/lib/base/index.mjs +2 -0
  9. package/esm2022/src/lib/base/models/api-payload.mjs +7 -0
  10. package/esm2022/src/lib/base/models/page-config.interface.mjs +2 -0
  11. package/esm2022/src/lib/base/models/page-filter-tab-option.interface.mjs +2 -0
  12. package/esm2022/src/lib/base/public-api.mjs +14 -0
  13. package/esm2022/src/lib/base/utils/column-helpers.mjs +55 -0
  14. package/esm2022/src/lib/base/verben-workflow-ui-src-lib-base.mjs +5 -0
  15. package/esm2022/src/lib/components/actors/actors.columns.mjs +39 -0
  16. package/esm2022/src/lib/components/actors/actors.component.mjs +175 -0
  17. package/esm2022/src/lib/components/actors/actors.config.mjs +49 -0
  18. package/esm2022/src/lib/components/actors/actors.facade.mjs +57 -0
  19. package/esm2022/src/lib/components/actors/actors.form.component.mjs +74 -0
  20. package/esm2022/src/lib/components/actors/actors.module.mjs +21 -0
  21. package/esm2022/src/lib/components/actors/actors.service.mjs +65 -0
  22. package/esm2022/src/lib/components/actors/actors.state.mjs +31 -0
  23. package/esm2022/src/lib/components/actors/index.mjs +2 -0
  24. package/esm2022/src/lib/components/actors/public-api.mjs +3 -0
  25. package/esm2022/src/lib/components/actors/verben-workflow-ui-src-lib-components-actors.mjs +5 -0
  26. package/esm2022/src/lib/components/designer/components/label-editor.component.mjs +148 -0
  27. package/esm2022/src/lib/components/designer/components/node-selector.component.mjs +317 -0
  28. package/esm2022/src/lib/components/designer/components/swimlane-label.component.mjs +161 -0
  29. package/esm2022/src/lib/components/designer/components/swimlane-popup.component.mjs +85 -0
  30. package/esm2022/src/lib/components/designer/components/wf-canvas.component.mjs +715 -0
  31. package/esm2022/src/lib/components/designer/components/wf-designer.component.mjs +135 -0
  32. package/esm2022/src/lib/components/designer/components/wf-toolbar.component.mjs +56 -0
  33. package/esm2022/src/lib/components/designer/index.mjs +2 -0
  34. package/esm2022/src/lib/components/designer/models/types.mjs +2 -0
  35. package/esm2022/src/lib/components/designer/public-api.mjs +3 -0
  36. package/esm2022/src/lib/components/designer/services/canvas-state.service.mjs +50 -0
  37. package/esm2022/src/lib/components/designer/services/connection-segment-interaction.service.mjs +108 -0
  38. package/esm2022/src/lib/components/designer/services/connection.service.mjs +267 -0
  39. package/esm2022/src/lib/components/designer/services/keyboard-handler.service.mjs +43 -0
  40. package/esm2022/src/lib/components/designer/services/label-management.service.mjs +66 -0
  41. package/esm2022/src/lib/components/designer/services/node-finder.service.mjs +30 -0
  42. package/esm2022/src/lib/components/designer/services/node-interaction.service.mjs +108 -0
  43. package/esm2022/src/lib/components/designer/services/node-precondition.service.mjs +108 -0
  44. package/esm2022/src/lib/components/designer/services/node-selection.service.mjs +96 -0
  45. package/esm2022/src/lib/components/designer/services/orthogonal-router.service.mjs +167 -0
  46. package/esm2022/src/lib/components/designer/services/position-update.service.mjs +45 -0
  47. package/esm2022/src/lib/components/designer/services/rendering.service.mjs +236 -0
  48. package/esm2022/src/lib/components/designer/services/swimlane-management.service.mjs +145 -0
  49. package/esm2022/src/lib/components/designer/services/swimlane-stats.service.mjs +44 -0
  50. package/esm2022/src/lib/components/designer/services/viewport.service.mjs +30 -0
  51. package/esm2022/src/lib/components/designer/services/wf-facade.service.mjs +239 -0
  52. package/esm2022/src/lib/components/designer/services/wf-mapper.service.mjs +326 -0
  53. package/esm2022/src/lib/components/designer/services/wf-persistence.service.mjs +169 -0
  54. package/esm2022/src/lib/components/designer/services/wf-state.service.mjs +108 -0
  55. package/esm2022/src/lib/components/designer/verben-workflow-ui-src-lib-components-designer.mjs +5 -0
  56. package/esm2022/src/lib/components/expiration/expiration.component.mjs +49 -0
  57. package/esm2022/src/lib/components/expiration/expiration.module.mjs +19 -0
  58. package/esm2022/src/lib/components/expiration/index.mjs +2 -0
  59. package/esm2022/src/lib/components/expiration/public-api.mjs +3 -0
  60. package/esm2022/src/lib/components/expiration/verben-workflow-ui-src-lib-components-expiration.mjs +5 -0
  61. package/esm2022/src/lib/components/file-render/file-render.component.mjs +45 -0
  62. package/esm2022/src/lib/components/file-render/file-render.module.mjs +35 -0
  63. package/esm2022/src/lib/components/file-render/index.mjs +2 -0
  64. package/esm2022/src/lib/components/file-render/public-api.mjs +3 -0
  65. package/esm2022/src/lib/components/file-render/verben-workflow-ui-src-lib-components-file-render.mjs +5 -0
  66. package/esm2022/src/lib/components/file-upload/file-upload.component.mjs +93 -0
  67. package/esm2022/src/lib/components/file-upload/file-upload.module.mjs +63 -0
  68. package/esm2022/src/lib/components/file-upload/index.mjs +2 -0
  69. package/esm2022/src/lib/components/file-upload/public-api.mjs +3 -0
  70. package/esm2022/src/lib/components/file-upload/verben-workflow-ui-src-lib-components-file-upload.mjs +5 -0
  71. package/esm2022/src/lib/components/flowable-status/flowable-status.columns.mjs +21 -0
  72. package/esm2022/src/lib/components/flowable-status/flowable-status.component.mjs +203 -0
  73. package/esm2022/src/lib/components/flowable-status/flowable-status.config.mjs +47 -0
  74. package/esm2022/src/lib/components/flowable-status/flowable-status.facade.mjs +60 -0
  75. package/esm2022/src/lib/components/flowable-status/flowable-status.form.component.mjs +52 -0
  76. package/esm2022/src/lib/components/flowable-status/flowable-status.module.mjs +21 -0
  77. package/esm2022/src/lib/components/flowable-status/flowable-status.service.mjs +35 -0
  78. package/esm2022/src/lib/components/flowable-status/flowable-status.state.mjs +15 -0
  79. package/esm2022/src/lib/components/flowable-status/index.mjs +2 -0
  80. package/esm2022/src/lib/components/flowable-status/public-api.mjs +3 -0
  81. package/esm2022/src/lib/components/flowable-status/verben-workflow-ui-src-lib-components-flowable-status.mjs +5 -0
  82. package/esm2022/src/lib/components/form-control/form-control.component.mjs +180 -0
  83. package/esm2022/src/lib/components/form-control/form-control.module.mjs +75 -0
  84. package/esm2022/src/lib/components/form-control/index.mjs +2 -0
  85. package/esm2022/src/lib/components/form-control/public-api.mjs +3 -0
  86. package/esm2022/src/lib/components/form-control/verben-workflow-ui-src-lib-components-form-control.mjs +5 -0
  87. package/esm2022/src/lib/components/form-group/base-table-style.mjs +53 -0
  88. package/esm2022/src/lib/components/form-group/form-fields/form-fields.component.mjs +952 -0
  89. package/esm2022/src/lib/components/form-group/form-fields/form-fields.module.mjs +75 -0
  90. package/esm2022/src/lib/components/form-group/form-fields/form-fields.service.mjs +73 -0
  91. package/esm2022/src/lib/components/form-group/form-group.component.mjs +698 -0
  92. package/esm2022/src/lib/components/form-group/form-group.module.mjs +85 -0
  93. package/esm2022/src/lib/components/form-group/form-group.service.mjs +56 -0
  94. package/esm2022/src/lib/components/form-group/index.mjs +2 -0
  95. package/esm2022/src/lib/components/form-group/public-api.mjs +5 -0
  96. package/esm2022/src/lib/components/form-group/verben-workflow-ui-src-lib-components-form-group.mjs +5 -0
  97. package/esm2022/src/lib/components/form-response/form-response.component.mjs +638 -0
  98. package/esm2022/src/lib/components/form-response/form-response.module.mjs +76 -0
  99. package/esm2022/src/lib/components/form-response/form-response.service.mjs +54 -0
  100. package/esm2022/src/lib/components/form-response/index.mjs +2 -0
  101. package/esm2022/src/lib/components/form-response/public-api.mjs +3 -0
  102. package/esm2022/src/lib/components/form-response/verben-workflow-ui-src-lib-components-form-response.mjs +5 -0
  103. package/esm2022/src/lib/components/form-timer/form-timer.component.mjs +47 -0
  104. package/esm2022/src/lib/components/form-timer/form-timer.module.mjs +28 -0
  105. package/esm2022/src/lib/components/form-timer/index.mjs +2 -0
  106. package/esm2022/src/lib/components/form-timer/public-api.mjs +3 -0
  107. package/esm2022/src/lib/components/form-timer/verben-workflow-ui-src-lib-components-form-timer.mjs +5 -0
  108. package/esm2022/src/lib/components/form-values/form-values.component.mjs +1157 -0
  109. package/esm2022/src/lib/components/form-values/form-values.module.mjs +20 -0
  110. package/esm2022/src/lib/components/form-values/form-values.service.mjs +48 -0
  111. package/esm2022/src/lib/components/form-values/index.mjs +2 -0
  112. package/esm2022/src/lib/components/form-values/public-api.mjs +4 -0
  113. package/esm2022/src/lib/components/form-values/verben-workflow-ui-src-lib-components-form-values.mjs +5 -0
  114. package/esm2022/src/lib/components/form-viewer/form-viewer.component.mjs +38 -0
  115. package/esm2022/src/lib/components/form-viewer/form-viewer.module.mjs +78 -0
  116. package/esm2022/src/lib/components/form-viewer/index.mjs +2 -0
  117. package/esm2022/src/lib/components/form-viewer/public-api.mjs +3 -0
  118. package/esm2022/src/lib/components/form-viewer/verben-workflow-ui-src-lib-components-form-viewer.mjs +5 -0
  119. package/esm2022/src/lib/components/forms/base-table-style.mjs +53 -0
  120. package/esm2022/src/lib/components/forms/forms.component.mjs +673 -0
  121. package/esm2022/src/lib/components/forms/forms.module.mjs +18 -0
  122. package/esm2022/src/lib/components/forms/forms.service.mjs +68 -0
  123. package/esm2022/src/lib/components/forms/index.mjs +2 -0
  124. package/esm2022/src/lib/components/forms/public-api.mjs +3 -0
  125. package/esm2022/src/lib/components/forms/verben-workflow-ui-src-lib-components-forms.mjs +5 -0
  126. package/esm2022/src/lib/components/journal/index.mjs +2 -0
  127. package/esm2022/src/lib/components/journal/journal.component.mjs +11 -0
  128. package/esm2022/src/lib/components/journal/journal.module.mjs +18 -0
  129. package/esm2022/src/lib/components/journal/public-api.mjs +3 -0
  130. package/esm2022/src/lib/components/journal/verben-workflow-ui-src-lib-components-journal.mjs +5 -0
  131. package/esm2022/src/lib/components/my-queue/index.mjs +2 -0
  132. package/esm2022/src/lib/components/my-queue/my-queue.columns.mjs +34 -0
  133. package/esm2022/src/lib/components/my-queue/my-queue.component.mjs +342 -0
  134. package/esm2022/src/lib/components/my-queue/my-queue.facade.mjs +502 -0
  135. package/esm2022/src/lib/components/my-queue/my-queue.module.mjs +47 -0
  136. package/esm2022/src/lib/components/my-queue/my-queue.service.mjs +144 -0
  137. package/esm2022/src/lib/components/my-queue/my-queue.state.mjs +108 -0
  138. package/esm2022/src/lib/components/my-queue/public-api.mjs +4 -0
  139. package/esm2022/src/lib/components/my-queue/tasks.form.component.mjs +191 -0
  140. package/esm2022/src/lib/components/my-queue/verben-workflow-ui-src-lib-components-my-queue.mjs +5 -0
  141. package/esm2022/src/lib/components/operation-popup/index.mjs +2 -0
  142. package/esm2022/src/lib/components/operation-popup/operation-popup.component.mjs +382 -0
  143. package/esm2022/src/lib/components/operation-popup/operation-popup.facade.mjs +345 -0
  144. package/esm2022/src/lib/components/operation-popup/operation-popup.service.mjs +82 -0
  145. package/esm2022/src/lib/components/operation-popup/operation-popup.state.mjs +44 -0
  146. package/esm2022/src/lib/components/operation-popup/public-api.mjs +3 -0
  147. package/esm2022/src/lib/components/operation-popup/verben-workflow-ui-src-lib-components-operation-popup.mjs +5 -0
  148. package/esm2022/src/lib/components/stage-details/index.mjs +2 -0
  149. package/esm2022/src/lib/components/stage-details/public-api.mjs +3 -0
  150. package/esm2022/src/lib/components/stage-details/stage-details.component.mjs +49 -0
  151. package/esm2022/src/lib/components/stage-details/stage-details.module.mjs +19 -0
  152. package/esm2022/src/lib/components/stage-details/verben-workflow-ui-src-lib-components-stage-details.mjs +5 -0
  153. package/esm2022/src/lib/components/task-form/index.mjs +2 -0
  154. package/esm2022/src/lib/components/task-form/public-api.mjs +3 -0
  155. package/esm2022/src/lib/components/task-form/task-form.component.mjs +18 -0
  156. package/esm2022/src/lib/components/task-form/task-form.module.mjs +72 -0
  157. package/esm2022/src/lib/components/task-form/verben-workflow-ui-src-lib-components-task-form.mjs +5 -0
  158. package/esm2022/src/lib/components/task-history/index.mjs +2 -0
  159. package/esm2022/src/lib/components/task-history/public-api.mjs +3 -0
  160. package/esm2022/src/lib/components/task-history/task-history.component.mjs +249 -0
  161. package/esm2022/src/lib/components/task-history/task-history.module.mjs +21 -0
  162. package/esm2022/src/lib/components/task-history/task-history.service.mjs +32 -0
  163. package/esm2022/src/lib/components/task-history/verben-workflow-ui-src-lib-components-task-history.mjs +5 -0
  164. package/esm2022/src/lib/components/task-notification/base-table-style.mjs +53 -0
  165. package/esm2022/src/lib/components/task-notification/index.mjs +2 -0
  166. package/esm2022/src/lib/components/task-notification/public-api.mjs +3 -0
  167. package/esm2022/src/lib/components/task-notification/task-notification.component.mjs +670 -0
  168. package/esm2022/src/lib/components/task-notification/task-notification.module.mjs +18 -0
  169. package/esm2022/src/lib/components/task-notification/task-notification.service.mjs +256 -0
  170. package/esm2022/src/lib/components/task-notification/verben-workflow-ui-src-lib-components-task-notification.mjs +5 -0
  171. package/esm2022/src/lib/components/tasks/index.mjs +2 -0
  172. package/esm2022/src/lib/components/tasks/public-api.mjs +6 -0
  173. package/esm2022/src/lib/components/tasks/tasks.columns.mjs +48 -0
  174. package/esm2022/src/lib/components/tasks/tasks.component.mjs +194 -0
  175. package/esm2022/src/lib/components/tasks/tasks.facade.mjs +372 -0
  176. package/esm2022/src/lib/components/tasks/tasks.form.component.mjs +164 -0
  177. package/esm2022/src/lib/components/tasks/tasks.models.mjs +4 -0
  178. package/esm2022/src/lib/components/tasks/tasks.module.mjs +52 -0
  179. package/esm2022/src/lib/components/tasks/tasks.service.mjs +137 -0
  180. package/esm2022/src/lib/components/tasks/tasks.state.mjs +108 -0
  181. package/esm2022/src/lib/components/tasks/verben-workflow-ui-src-lib-components-tasks.mjs +5 -0
  182. package/esm2022/src/lib/components/wf/index.mjs +2 -0
  183. package/esm2022/src/lib/components/wf/public-api.mjs +4 -0
  184. package/esm2022/src/lib/components/wf/verben-workflow-ui-src-lib-components-wf.mjs +5 -0
  185. package/esm2022/src/lib/components/wf/wf.columns.mjs +34 -0
  186. package/esm2022/src/lib/components/wf/wf.component.mjs +68 -0
  187. package/esm2022/src/lib/components/wf/wf.module.mjs +22 -0
  188. package/esm2022/src/lib/components/wf/wf.service.mjs +82 -0
  189. package/esm2022/src/lib/components/workflow/column.mjs +38 -0
  190. package/esm2022/src/lib/components/workflow/helper.mjs +47 -0
  191. package/esm2022/src/lib/components/workflow/index.mjs +2 -0
  192. package/esm2022/src/lib/components/workflow/public-api.mjs +4 -0
  193. package/esm2022/src/lib/components/workflow/table-style.mjs +53 -0
  194. package/esm2022/src/lib/components/workflow/verben-workflow-ui-src-lib-components-workflow.mjs +5 -0
  195. package/esm2022/src/lib/components/workflow/workflow.component.mjs +210 -0
  196. package/esm2022/src/lib/components/workflow/workflow.module.mjs +19 -0
  197. package/esm2022/src/lib/components/workflow-designer/action-dialog/action-dialog.component.mjs +127 -0
  198. package/esm2022/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.mjs +78 -0
  199. package/esm2022/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.mjs +87 -0
  200. package/esm2022/src/lib/components/workflow-designer/decision-popup/decision-popup.component.mjs +84 -0
  201. package/esm2022/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.mjs +1270 -0
  202. package/esm2022/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.mjs +96 -0
  203. package/esm2022/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.types.mjs +2 -0
  204. package/esm2022/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.mjs +260 -0
  205. package/esm2022/src/lib/components/workflow-designer/index.mjs +2 -0
  206. package/esm2022/src/lib/components/workflow-designer/public-api.mjs +5 -0
  207. package/esm2022/src/lib/components/workflow-designer/services/connection.service.mjs +238 -0
  208. package/esm2022/src/lib/components/workflow-designer/services/node-management.service.mjs +321 -0
  209. package/esm2022/src/lib/components/workflow-designer/services/popup.service.mjs +240 -0
  210. package/esm2022/src/lib/components/workflow-designer/services/swimlane.service.mjs +158 -0
  211. package/esm2022/src/lib/components/workflow-designer/services/transformer.service.mjs +280 -0
  212. package/esm2022/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.mjs +177 -0
  213. package/esm2022/src/lib/components/workflow-designer/stage-node/stage-node.component.mjs +226 -0
  214. package/esm2022/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.mjs +137 -0
  215. package/esm2022/src/lib/components/workflow-designer/verben-workflow-ui-src-lib-components-workflow-designer.mjs +5 -0
  216. package/esm2022/src/lib/components/workflow-designer/workflow-data.service.mjs +210 -0
  217. package/esm2022/src/lib/components/workflow-designer/workflow-designer.component.mjs +460 -0
  218. package/esm2022/src/lib/components/workflow-designer/workflow-designer.module.mjs +129 -0
  219. package/esm2022/src/lib/components/workflow-designer/workflow-designer.state.mjs +928 -0
  220. package/esm2022/src/lib/components/workflow-designer/workflow-designer.types.mjs +2 -0
  221. package/esm2022/src/lib/components/workflow-stage/index.mjs +2 -0
  222. package/esm2022/src/lib/components/workflow-stage/public-api.mjs +3 -0
  223. package/esm2022/src/lib/components/workflow-stage/verben-workflow-ui-src-lib-components-workflow-stage.mjs +5 -0
  224. package/esm2022/src/lib/components/workflow-stage/workflow-stage.component.mjs +331 -0
  225. package/esm2022/src/lib/components/workflow-stage/workflow-stage.module.mjs +82 -0
  226. package/esm2022/src/lib/components/workflows/index.mjs +2 -0
  227. package/esm2022/src/lib/components/workflows/public-api.mjs +7 -0
  228. package/esm2022/src/lib/components/workflows/verben-workflow-ui-src-lib-components-workflows.mjs +5 -0
  229. package/esm2022/src/lib/components/workflows/workflow-form/workflow-form.component.mjs +89 -0
  230. package/esm2022/src/lib/components/workflows/workflows.api.mjs +63 -0
  231. package/esm2022/src/lib/components/workflows/workflows.columns.mjs +39 -0
  232. package/esm2022/src/lib/components/workflows/workflows.component.mjs +236 -0
  233. package/esm2022/src/lib/components/workflows/workflows.config.mjs +51 -0
  234. package/esm2022/src/lib/components/workflows/workflows.facade.mjs +114 -0
  235. package/esm2022/src/lib/components/workflows/workflows.module.mjs +21 -0
  236. package/esm2022/src/lib/components/workflows/workflows.service.mjs +63 -0
  237. package/esm2022/src/lib/components/workflows/workflows.state.mjs +23 -0
  238. package/esm2022/src/lib/models/ActionHistory.mjs +2 -0
  239. package/esm2022/src/lib/models/ActionType.mjs +11 -0
  240. package/esm2022/src/lib/models/Actor.mjs +2 -0
  241. package/esm2022/src/lib/models/ActorTag.mjs +2 -0
  242. package/esm2022/src/lib/models/Coord.mjs +2 -0
  243. package/esm2022/src/lib/models/DataExtensionValue.mjs +2 -0
  244. package/esm2022/src/lib/models/DataType.mjs +27 -0
  245. package/esm2022/src/lib/models/EAVDataType.mjs +20 -0
  246. package/esm2022/src/lib/models/EAVEntity.mjs +2 -0
  247. package/esm2022/src/lib/models/EntityDataValue.mjs +2 -0
  248. package/esm2022/src/lib/models/EntityProperty.mjs +2 -0
  249. package/esm2022/src/lib/models/ErrorResponse.mjs +11 -0
  250. package/esm2022/src/lib/models/Escalation.mjs +2 -0
  251. package/esm2022/src/lib/models/EscalationCycle.mjs +2 -0
  252. package/esm2022/src/lib/models/EscalationStage.mjs +2 -0
  253. package/esm2022/src/lib/models/EscalationType.mjs +7 -0
  254. package/esm2022/src/lib/models/File.mjs +2 -0
  255. package/esm2022/src/lib/models/FilterTypes.mjs +9 -0
  256. package/esm2022/src/lib/models/FlowableStatus.mjs +2 -0
  257. package/esm2022/src/lib/models/Form.mjs +2 -0
  258. package/esm2022/src/lib/models/FormEntity.mjs +2 -0
  259. package/esm2022/src/lib/models/FormFill.mjs +6 -0
  260. package/esm2022/src/lib/models/FormProperty.mjs +2 -0
  261. package/esm2022/src/lib/models/FormValue.mjs +6 -0
  262. package/esm2022/src/lib/models/MailConfig.mjs +2 -0
  263. package/esm2022/src/lib/models/MessageConfig.mjs +2 -0
  264. package/esm2022/src/lib/models/MessageMedium.mjs +6 -0
  265. package/esm2022/src/lib/models/OperationAction.mjs +2 -0
  266. package/esm2022/src/lib/models/PagedResult.mjs +2 -0
  267. package/esm2022/src/lib/models/PeriodMode.mjs +12 -0
  268. package/esm2022/src/lib/models/PermissionConfig.mjs +2 -0
  269. package/esm2022/src/lib/models/Property.mjs +2 -0
  270. package/esm2022/src/lib/models/ReportSchedule.mjs +2 -0
  271. package/esm2022/src/lib/models/ReportType.mjs +7 -0
  272. package/esm2022/src/lib/models/Resource.mjs +47 -0
  273. package/esm2022/src/lib/models/ResponseKeyValue.mjs +2 -0
  274. package/esm2022/src/lib/models/SMSConfig.mjs +2 -0
  275. package/esm2022/src/lib/models/SearchDynamicWrapper.mjs +2 -0
  276. package/esm2022/src/lib/models/SearchOperator.mjs +6 -0
  277. package/esm2022/src/lib/models/SearchPropertySign.mjs +11 -0
  278. package/esm2022/src/lib/models/SearchPropertyValue.mjs +2 -0
  279. package/esm2022/src/lib/models/SearchPropertyValueType.mjs +11 -0
  280. package/esm2022/src/lib/models/Size.mjs +2 -0
  281. package/esm2022/src/lib/models/SortDirection.mjs +7 -0
  282. package/esm2022/src/lib/models/StageActorRule.mjs +8 -0
  283. package/esm2022/src/lib/models/SwimLane.mjs +2 -0
  284. package/esm2022/src/lib/models/Tag.mjs +2 -0
  285. package/esm2022/src/lib/models/Task.mjs +2 -0
  286. package/esm2022/src/lib/models/TaskAssignmentType.mjs +6 -0
  287. package/esm2022/src/lib/models/TaskNotification.mjs +2 -0
  288. package/esm2022/src/lib/models/TaskNotificationMessageType.mjs +6 -0
  289. package/esm2022/src/lib/models/TaskNotificationType.mjs +9 -0
  290. package/esm2022/src/lib/models/TaskStatus.mjs +9 -0
  291. package/esm2022/src/lib/models/Workflow.mjs +2 -0
  292. package/esm2022/src/lib/models/WorkflowAction.mjs +2 -0
  293. package/esm2022/src/lib/models/WorkflowOperation.mjs +2 -0
  294. package/esm2022/src/lib/models/WorkflowStage.mjs +2 -0
  295. package/esm2022/src/lib/models/actors.mjs +2 -0
  296. package/esm2022/src/lib/models/auth-mechanism.mjs +8 -0
  297. package/esm2022/src/lib/models/base.mjs +2 -0
  298. package/esm2022/src/lib/models/index.mjs +2 -0
  299. package/esm2022/src/lib/models/object-state.mjs +8 -0
  300. package/esm2022/src/lib/models/operation-type.mjs +7 -0
  301. package/esm2022/src/lib/models/paged.mjs +2 -0
  302. package/esm2022/src/lib/models/public-api.mjs +66 -0
  303. package/esm2022/src/lib/models/query-params.mjs +2 -0
  304. package/esm2022/src/lib/models/status.mjs +6 -0
  305. package/esm2022/src/lib/models/task-history.mjs +2 -0
  306. package/esm2022/src/lib/models/user-access-request-status.mjs +7 -0
  307. package/esm2022/src/lib/models/user.mjs +2 -0
  308. package/esm2022/src/lib/models/verben-workflow-ui-src-lib-models.mjs +5 -0
  309. package/esm2022/src/lib/pipes/async-label.pipe.mjs +25 -0
  310. package/esm2022/src/lib/pipes/index.mjs +2 -0
  311. package/esm2022/src/lib/pipes/public-api.mjs +2 -0
  312. package/esm2022/src/lib/pipes/verben-workflow-ui-src-lib-pipes.mjs +5 -0
  313. package/esm2022/src/lib/services/environment.service.mjs +26 -0
  314. package/esm2022/src/lib/services/http-web-request.service.mjs +92 -0
  315. package/esm2022/src/lib/services/index.mjs +2 -0
  316. package/esm2022/src/lib/services/label.service.mjs +134 -0
  317. package/esm2022/src/lib/services/public-api.mjs +5 -0
  318. package/esm2022/src/lib/services/util.service.mjs +75 -0
  319. package/esm2022/src/lib/services/verben-workflow-ui-src-lib-services.mjs +5 -0
  320. package/esm2022/src/lib/shared/base-table-style.mjs +55 -0
  321. package/esm2022/src/lib/shared/components/base-data-view.component.mjs +154 -0
  322. package/esm2022/src/lib/shared/components/base-model-field.mjs +21 -0
  323. package/esm2022/src/lib/shared/index.mjs +7 -0
  324. package/esm2022/src/lib/shared/models/DataViewConfig.mjs +2 -0
  325. package/esm2022/src/lib/shared/public-api.mjs +13 -0
  326. package/esm2022/src/lib/shared/shared.module.mjs +103 -0
  327. package/esm2022/src/lib/shared/verben-workflow-ui-src-lib-shared.mjs +5 -0
  328. package/esm2022/verben-workflow-ui.mjs +5 -0
  329. package/fesm2022/verben-workflow-ui-src-lib-base.mjs +1055 -0
  330. package/fesm2022/verben-workflow-ui-src-lib-base.mjs.map +1 -0
  331. package/fesm2022/verben-workflow-ui-src-lib-components-actors.mjs +484 -0
  332. package/fesm2022/verben-workflow-ui-src-lib-components-actors.mjs.map +1 -0
  333. package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs +3891 -0
  334. package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs.map +1 -0
  335. package/fesm2022/verben-workflow-ui-src-lib-components-expiration.mjs +72 -0
  336. package/fesm2022/verben-workflow-ui-src-lib-components-expiration.mjs.map +1 -0
  337. package/fesm2022/verben-workflow-ui-src-lib-components-file-render.mjs +83 -0
  338. package/fesm2022/verben-workflow-ui-src-lib-components-file-render.mjs.map +1 -0
  339. package/fesm2022/verben-workflow-ui-src-lib-components-file-upload.mjs +159 -0
  340. package/fesm2022/verben-workflow-ui-src-lib-components-file-upload.mjs.map +1 -0
  341. package/fesm2022/verben-workflow-ui-src-lib-components-flowable-status.mjs +430 -0
  342. package/fesm2022/verben-workflow-ui-src-lib-components-flowable-status.mjs.map +1 -0
  343. package/fesm2022/verben-workflow-ui-src-lib-components-form-control.mjs +257 -0
  344. package/fesm2022/verben-workflow-ui-src-lib-components-form-control.mjs.map +1 -0
  345. package/fesm2022/verben-workflow-ui-src-lib-components-form-group.mjs +1966 -0
  346. package/fesm2022/verben-workflow-ui-src-lib-components-form-group.mjs.map +1 -0
  347. package/fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs +766 -0
  348. package/fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs.map +1 -0
  349. package/fesm2022/verben-workflow-ui-src-lib-components-form-timer.mjs +78 -0
  350. package/fesm2022/verben-workflow-ui-src-lib-components-form-timer.mjs.map +1 -0
  351. package/fesm2022/verben-workflow-ui-src-lib-components-form-values.mjs +1226 -0
  352. package/fesm2022/verben-workflow-ui-src-lib-components-form-values.mjs.map +1 -0
  353. package/fesm2022/verben-workflow-ui-src-lib-components-form-viewer.mjs +118 -0
  354. package/fesm2022/verben-workflow-ui-src-lib-components-form-viewer.mjs.map +1 -0
  355. package/fesm2022/verben-workflow-ui-src-lib-components-forms.mjs +812 -0
  356. package/fesm2022/verben-workflow-ui-src-lib-components-forms.mjs.map +1 -0
  357. package/fesm2022/verben-workflow-ui-src-lib-components-journal.mjs +33 -0
  358. package/fesm2022/verben-workflow-ui-src-lib-components-journal.mjs.map +1 -0
  359. package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs +1338 -0
  360. package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs.map +1 -0
  361. package/fesm2022/verben-workflow-ui-src-lib-components-operation-popup.mjs +845 -0
  362. package/fesm2022/verben-workflow-ui-src-lib-components-operation-popup.mjs.map +1 -0
  363. package/fesm2022/verben-workflow-ui-src-lib-components-stage-details.mjs +72 -0
  364. package/fesm2022/verben-workflow-ui-src-lib-components-stage-details.mjs.map +1 -0
  365. package/fesm2022/verben-workflow-ui-src-lib-components-task-form.mjs +94 -0
  366. package/fesm2022/verben-workflow-ui-src-lib-components-task-form.mjs.map +1 -0
  367. package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs +302 -0
  368. package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs.map +1 -0
  369. package/fesm2022/verben-workflow-ui-src-lib-components-task-notification.mjs +995 -0
  370. package/fesm2022/verben-workflow-ui-src-lib-components-task-notification.mjs.map +1 -0
  371. package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs +1049 -0
  372. package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs.map +1 -0
  373. package/fesm2022/verben-workflow-ui-src-lib-components-wf.mjs +203 -0
  374. package/fesm2022/verben-workflow-ui-src-lib-components-wf.mjs.map +1 -0
  375. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs +5389 -0
  376. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs.map +1 -0
  377. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs +415 -0
  378. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs.map +1 -0
  379. package/fesm2022/verben-workflow-ui-src-lib-components-workflow.mjs +365 -0
  380. package/fesm2022/verben-workflow-ui-src-lib-components-workflow.mjs.map +1 -0
  381. package/fesm2022/verben-workflow-ui-src-lib-components-workflows.mjs +666 -0
  382. package/fesm2022/verben-workflow-ui-src-lib-components-workflows.mjs.map +1 -0
  383. package/fesm2022/verben-workflow-ui-src-lib-models.mjs +261 -0
  384. package/fesm2022/verben-workflow-ui-src-lib-models.mjs.map +1 -0
  385. package/fesm2022/verben-workflow-ui-src-lib-pipes.mjs +32 -0
  386. package/fesm2022/verben-workflow-ui-src-lib-pipes.mjs.map +1 -0
  387. package/fesm2022/verben-workflow-ui-src-lib-services.mjs +322 -0
  388. package/fesm2022/verben-workflow-ui-src-lib-services.mjs.map +1 -0
  389. package/fesm2022/verben-workflow-ui-src-lib-shared.mjs +336 -0
  390. package/fesm2022/verben-workflow-ui-src-lib-shared.mjs.map +1 -0
  391. package/fesm2022/verben-workflow-ui.mjs +35 -0
  392. package/fesm2022/verben-workflow-ui.mjs.map +1 -0
  393. package/index.d.ts +5 -0
  394. package/package.json +199 -8
  395. package/public-api.d.ts +23 -0
  396. package/src/lib/base/core/base-data-page.facade.d.ts +138 -0
  397. package/src/lib/base/core/base-data-page.service.d.ts +61 -0
  398. package/src/lib/base/core/base-data-page.state.d.ts +73 -0
  399. package/src/lib/base/handlers/filter-handler.service.d.ts +34 -0
  400. package/src/lib/base/handlers/search-handler.service.d.ts +20 -0
  401. package/src/lib/base/handlers/sort-handler.service.d.ts +30 -0
  402. package/src/lib/base/models/api-payload.d.ts +2 -0
  403. package/src/lib/base/models/page-config.interface.d.ts +24 -0
  404. package/src/lib/base/models/page-filter-tab-option.interface.d.ts +19 -0
  405. package/src/lib/base/public-api.d.ts +9 -0
  406. package/src/lib/base/utils/column-helpers.d.ts +24 -0
  407. package/src/lib/components/actors/actors.columns.d.ts +3 -0
  408. package/src/lib/components/actors/actors.component.d.ts +79 -0
  409. package/src/lib/components/actors/actors.config.d.ts +10 -0
  410. package/src/lib/components/actors/actors.facade.d.ts +29 -0
  411. package/src/lib/components/actors/actors.form.component.d.ts +23 -0
  412. package/src/lib/components/actors/actors.module.d.ts +11 -0
  413. package/src/lib/components/actors/actors.service.d.ts +33 -0
  414. package/src/lib/components/actors/actors.state.d.ts +19 -0
  415. package/src/lib/components/designer/components/label-editor.component.d.ts +22 -0
  416. package/src/lib/components/designer/components/node-selector.component.d.ts +23 -0
  417. package/src/lib/components/designer/components/swimlane-label.component.d.ts +12 -0
  418. package/src/lib/components/designer/components/swimlane-popup.component.d.ts +18 -0
  419. package/src/lib/components/designer/components/wf-canvas.component.d.ts +37 -0
  420. package/src/lib/components/designer/components/wf-designer.component.d.ts +22 -0
  421. package/src/lib/components/designer/components/wf-toolbar.component.d.ts +17 -0
  422. package/src/lib/components/designer/models/types.d.ts +104 -0
  423. package/src/lib/components/designer/services/canvas-state.service.d.ts +24 -0
  424. package/src/lib/components/designer/services/connection-segment-interaction.service.d.ts +36 -0
  425. package/src/lib/components/designer/services/connection.service.d.ts +47 -0
  426. package/src/lib/components/designer/services/keyboard-handler.service.d.ts +9 -0
  427. package/src/lib/components/designer/services/label-management.service.d.ts +14 -0
  428. package/src/lib/components/designer/services/node-finder.service.d.ts +10 -0
  429. package/src/lib/components/designer/services/node-interaction.service.d.ts +19 -0
  430. package/src/lib/components/designer/services/node-precondition.service.d.ts +37 -0
  431. package/src/lib/components/designer/services/node-selection.service.d.ts +19 -0
  432. package/src/lib/components/designer/services/orthogonal-router.service.d.ts +36 -0
  433. package/src/lib/components/designer/services/position-update.service.d.ts +10 -0
  434. package/src/lib/components/designer/services/rendering.service.d.ts +67 -0
  435. package/src/lib/components/designer/services/swimlane-management.service.d.ts +19 -0
  436. package/src/lib/components/designer/services/swimlane-stats.service.d.ts +19 -0
  437. package/src/lib/components/designer/services/viewport.service.d.ts +10 -0
  438. package/src/lib/components/designer/services/wf-facade.service.d.ts +67 -0
  439. package/src/lib/components/designer/services/wf-mapper.service.d.ts +26 -0
  440. package/src/lib/components/designer/services/wf-persistence.service.d.ts +21 -0
  441. package/src/lib/components/designer/services/wf-state.service.d.ts +30 -0
  442. package/src/lib/components/expiration/expiration.component.d.ts +20 -0
  443. package/src/lib/components/expiration/expiration.module.d.ts +9 -0
  444. package/src/lib/components/file-render/file-render.component.d.ts +17 -0
  445. package/src/lib/components/file-render/file-render.module.d.ts +10 -0
  446. package/src/lib/components/file-upload/file-upload.component.d.ts +22 -0
  447. package/src/lib/components/file-upload/file-upload.module.d.ts +11 -0
  448. package/src/lib/components/flowable-status/flowable-status.columns.d.ts +3 -0
  449. package/src/lib/components/flowable-status/flowable-status.component.d.ts +80 -0
  450. package/src/lib/components/flowable-status/flowable-status.config.d.ts +11 -0
  451. package/src/lib/components/flowable-status/flowable-status.facade.d.ts +26 -0
  452. package/src/lib/components/flowable-status/flowable-status.form.component.d.ts +18 -0
  453. package/src/lib/components/flowable-status/flowable-status.module.d.ts +11 -0
  454. package/src/lib/components/flowable-status/flowable-status.service.d.ts +23 -0
  455. package/src/lib/components/flowable-status/flowable-status.state.d.ts +11 -0
  456. package/src/lib/components/flowable-status/public-api.d.ts +2 -0
  457. package/src/lib/components/form-control/form-control.component.d.ts +39 -0
  458. package/src/lib/components/form-control/form-control.module.d.ts +11 -0
  459. package/src/lib/components/form-group/base-table-style.d.ts +1 -0
  460. package/src/lib/components/form-group/form-fields/form-fields.component.d.ts +136 -0
  461. package/src/lib/components/form-group/form-fields/form-fields.module.d.ts +11 -0
  462. package/src/lib/components/form-group/form-fields/form-fields.service.d.ts +9 -0
  463. package/src/lib/components/form-group/form-group.component.d.ts +108 -0
  464. package/src/lib/components/form-group/form-group.module.d.ts +15 -0
  465. package/src/lib/components/form-group/form-group.service.d.ts +9 -0
  466. package/src/lib/components/form-response/form-response.component.d.ts +106 -0
  467. package/src/lib/components/form-response/form-response.module.d.ts +12 -0
  468. package/src/lib/components/form-response/form-response.service.d.ts +9 -0
  469. package/src/lib/components/form-timer/form-timer.component.d.ts +13 -0
  470. package/src/lib/components/form-timer/form-timer.module.d.ts +9 -0
  471. package/src/lib/components/form-values/form-values.component.d.ts +118 -0
  472. package/src/lib/components/form-values/form-values.module.d.ts +10 -0
  473. package/src/lib/components/form-values/form-values.service.d.ts +9 -0
  474. package/src/lib/components/form-viewer/form-viewer.component.d.ts +17 -0
  475. package/src/lib/components/form-viewer/form-viewer.module.d.ts +11 -0
  476. package/src/lib/components/forms/base-table-style.d.ts +1 -0
  477. package/src/lib/components/forms/forms.component.d.ts +88 -0
  478. package/src/lib/components/forms/forms.module.d.ts +8 -0
  479. package/src/lib/components/forms/forms.service.d.ts +9 -0
  480. package/src/lib/components/journal/journal.component.d.ts +5 -0
  481. package/src/lib/components/journal/journal.module.d.ts +8 -0
  482. package/src/lib/components/my-queue/my-queue.columns.d.ts +3 -0
  483. package/src/lib/components/my-queue/my-queue.component.d.ts +58 -0
  484. package/src/lib/components/my-queue/my-queue.facade.d.ts +47 -0
  485. package/src/lib/components/my-queue/my-queue.module.d.ts +15 -0
  486. package/src/lib/components/my-queue/my-queue.service.d.ts +65 -0
  487. package/src/lib/components/my-queue/my-queue.state.d.ts +39 -0
  488. package/src/lib/components/my-queue/tasks.form.component.d.ts +48 -0
  489. package/src/lib/components/operation-popup/operation-popup.component.d.ts +62 -0
  490. package/src/lib/components/operation-popup/operation-popup.facade.d.ts +32 -0
  491. package/src/lib/components/operation-popup/operation-popup.service.d.ts +23 -0
  492. package/src/lib/components/operation-popup/operation-popup.state.d.ts +20 -0
  493. package/src/lib/components/stage-details/stage-details.component.d.ts +24 -0
  494. package/src/lib/components/stage-details/stage-details.module.d.ts +9 -0
  495. package/src/lib/components/task-form/task-form.component.d.ts +10 -0
  496. package/src/lib/components/task-form/task-form.module.d.ts +10 -0
  497. package/src/lib/components/task-history/task-history.component.d.ts +41 -0
  498. package/src/lib/components/task-history/task-history.module.d.ts +11 -0
  499. package/src/lib/components/task-history/task-history.service.d.ts +13 -0
  500. package/src/lib/components/task-notification/base-table-style.d.ts +1 -0
  501. package/src/lib/components/task-notification/task-notification.component.d.ts +89 -0
  502. package/src/lib/components/task-notification/task-notification.module.d.ts +8 -0
  503. package/src/lib/components/task-notification/task-notification.service.d.ts +32 -0
  504. package/src/lib/components/tasks/tasks.columns.d.ts +11 -0
  505. package/src/lib/components/tasks/tasks.component.d.ts +40 -0
  506. package/src/lib/components/tasks/tasks.facade.d.ts +44 -0
  507. package/src/lib/components/tasks/tasks.form.component.d.ts +40 -0
  508. package/src/lib/components/tasks/tasks.models.d.ts +4 -0
  509. package/src/lib/components/tasks/tasks.module.d.ts +17 -0
  510. package/src/lib/components/tasks/tasks.service.d.ts +58 -0
  511. package/src/lib/components/tasks/tasks.state.d.ts +46 -0
  512. package/src/lib/components/wf/wf.columns.d.ts +3 -0
  513. package/src/lib/components/wf/wf.component.d.ts +16 -0
  514. package/src/lib/components/wf/wf.module.d.ts +10 -0
  515. package/src/lib/components/wf/wf.service.d.ts +51 -0
  516. package/src/lib/components/workflow/column.d.ts +3 -0
  517. package/src/lib/components/workflow/helper.d.ts +2 -0
  518. package/src/lib/components/workflow/table-style.d.ts +1 -0
  519. package/src/lib/components/workflow/workflow.component.d.ts +57 -0
  520. package/src/lib/components/workflow/workflow.module.d.ts +9 -0
  521. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.d.ts +34 -0
  522. package/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.d.ts +25 -0
  523. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.d.ts +38 -0
  524. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.d.ts +29 -0
  525. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.d.ts +292 -0
  526. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.d.ts +39 -0
  527. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.types.d.ts +5 -0
  528. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.d.ts +47 -0
  529. package/src/lib/components/workflow-designer/services/connection.service.d.ts +101 -0
  530. package/src/lib/components/workflow-designer/services/node-management.service.d.ts +73 -0
  531. package/src/lib/components/workflow-designer/services/popup.service.d.ts +147 -0
  532. package/src/lib/components/workflow-designer/services/swimlane.service.d.ts +66 -0
  533. package/src/lib/components/workflow-designer/services/transformer.service.d.ts +51 -0
  534. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.d.ts +43 -0
  535. package/src/lib/components/workflow-designer/stage-node/stage-node.component.d.ts +58 -0
  536. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.d.ts +49 -0
  537. package/src/lib/components/workflow-designer/workflow-data.service.d.ts +59 -0
  538. package/src/lib/components/workflow-designer/workflow-designer.component.d.ts +121 -0
  539. package/src/lib/components/workflow-designer/workflow-designer.module.d.ts +41 -0
  540. package/src/lib/components/workflow-designer/workflow-designer.state.d.ts +278 -0
  541. package/src/lib/components/workflow-designer/workflow-designer.types.d.ts +130 -0
  542. package/src/lib/components/workflow-stage/workflow-stage.component.d.ts +78 -0
  543. package/src/lib/components/workflow-stage/workflow-stage.module.d.ts +12 -0
  544. package/src/lib/components/workflows/public-api.d.ts +4 -0
  545. package/src/lib/components/workflows/workflow-form/workflow-form.component.d.ts +28 -0
  546. package/src/lib/components/workflows/workflows.api.d.ts +38 -0
  547. package/src/lib/components/workflows/workflows.columns.d.ts +3 -0
  548. package/src/lib/components/workflows/workflows.component.d.ts +98 -0
  549. package/src/lib/components/workflows/workflows.config.d.ts +10 -0
  550. package/src/lib/components/workflows/workflows.facade.d.ts +41 -0
  551. package/src/lib/components/workflows/workflows.module.d.ts +11 -0
  552. package/src/lib/components/workflows/workflows.service.d.ts +32 -0
  553. package/src/lib/components/workflows/workflows.state.d.ts +15 -0
  554. package/src/lib/models/ActionHistory.d.ts +16 -0
  555. package/src/lib/models/ActionType.d.ts +9 -0
  556. package/src/lib/models/Actor.d.ts +11 -0
  557. package/src/lib/models/ActorTag.d.ts +6 -0
  558. package/src/lib/models/Coord.d.ts +4 -0
  559. package/src/lib/models/DataExtensionValue.d.ts +4 -0
  560. package/src/lib/models/DataType.d.ts +25 -0
  561. package/src/lib/models/EAVDataType.d.ts +18 -0
  562. package/src/lib/models/EAVEntity.d.ts +4 -0
  563. package/src/lib/models/EntityDataValue.d.ts +6 -0
  564. package/src/lib/models/EntityProperty.d.ts +7 -0
  565. package/src/lib/models/ErrorResponse.d.ts +6 -0
  566. package/src/lib/models/Escalation.d.ts +14 -0
  567. package/src/lib/models/EscalationCycle.d.ts +12 -0
  568. package/src/lib/models/EscalationStage.d.ts +10 -0
  569. package/src/lib/models/EscalationType.d.ts +5 -0
  570. package/src/lib/models/File.d.ts +7 -0
  571. package/src/lib/models/FilterTypes.d.ts +6 -0
  572. package/src/lib/models/FlowableStatus.d.ts +5 -0
  573. package/src/lib/models/Form.d.ts +13 -0
  574. package/src/lib/models/FormEntity.d.ts +13 -0
  575. package/src/lib/models/FormFill.d.ts +15 -0
  576. package/src/lib/models/FormProperty.d.ts +15 -0
  577. package/src/lib/models/FormValue.d.ts +13 -0
  578. package/src/lib/models/MailConfig.d.ts +12 -0
  579. package/src/lib/models/MessageConfig.d.ts +3 -0
  580. package/src/lib/models/MessageMedium.d.ts +4 -0
  581. package/src/lib/models/OperationAction.d.ts +14 -0
  582. package/src/lib/models/PagedResult.d.ts +5 -0
  583. package/src/lib/models/PeriodMode.d.ts +10 -0
  584. package/src/lib/models/PermissionConfig.d.ts +7 -0
  585. package/src/lib/models/Property.d.ts +5 -0
  586. package/src/lib/models/ReportSchedule.d.ts +22 -0
  587. package/src/lib/models/ReportType.d.ts +5 -0
  588. package/src/lib/models/Resource.d.ts +20 -0
  589. package/src/lib/models/ResponseKeyValue.d.ts +5 -0
  590. package/src/lib/models/SMSConfig.d.ts +10 -0
  591. package/src/lib/models/SearchDynamicWrapper.d.ts +5 -0
  592. package/src/lib/models/SearchOperator.d.ts +4 -0
  593. package/src/lib/models/SearchPropertySign.d.ts +9 -0
  594. package/src/lib/models/SearchPropertyValue.d.ts +12 -0
  595. package/src/lib/models/SearchPropertyValueType.d.ts +9 -0
  596. package/src/lib/models/Size.d.ts +4 -0
  597. package/src/lib/models/SortDirection.d.ts +5 -0
  598. package/src/lib/models/StageActorRule.d.ts +6 -0
  599. package/src/lib/models/SwimLane.d.ts +13 -0
  600. package/src/lib/models/Tag.d.ts +6 -0
  601. package/src/lib/models/Task.d.ts +32 -0
  602. package/src/lib/models/TaskAssignmentType.d.ts +4 -0
  603. package/src/lib/models/TaskNotification.d.ts +14 -0
  604. package/src/lib/models/TaskNotificationMessageType.d.ts +4 -0
  605. package/src/lib/models/TaskNotificationType.d.ts +7 -0
  606. package/src/lib/models/TaskStatus.d.ts +7 -0
  607. package/src/lib/models/Workflow.d.ts +21 -0
  608. package/src/lib/models/WorkflowAction.d.ts +14 -0
  609. package/src/lib/models/WorkflowOperation.d.ts +6 -0
  610. package/src/lib/models/WorkflowStage.d.ts +26 -0
  611. package/src/lib/models/actors.d.ts +8 -0
  612. package/src/lib/models/auth-mechanism.d.ts +13 -0
  613. package/src/lib/models/base.d.ts +13 -0
  614. package/src/lib/models/object-state.d.ts +6 -0
  615. package/src/lib/models/operation-type.d.ts +5 -0
  616. package/src/lib/models/paged.d.ts +9 -0
  617. package/src/lib/models/query-params.d.ts +8 -0
  618. package/src/lib/models/status.d.ts +4 -0
  619. package/src/lib/models/task-history.d.ts +17 -0
  620. package/src/lib/models/user-access-request-status.d.ts +5 -0
  621. package/src/lib/models/user.d.ts +24 -0
  622. package/src/lib/pipes/async-label.pipe.d.ts +11 -0
  623. package/src/lib/services/environment.service.d.ts +23 -0
  624. package/src/lib/services/http-web-request.service.d.ts +23 -0
  625. package/src/lib/services/label.service.d.ts +15 -0
  626. package/src/lib/services/public-api.d.ts +4 -0
  627. package/src/lib/services/util.service.d.ts +20 -0
  628. package/src/lib/shared/base-table-style.d.ts +2 -0
  629. package/src/lib/shared/components/base-data-view.component.d.ts +41 -0
  630. package/src/lib/shared/components/base-model-field.d.ts +26 -0
  631. package/src/lib/shared/models/DataViewConfig.d.ts +11 -0
  632. package/src/lib/shared/public-api.d.ts +5 -0
  633. package/src/lib/shared/shared.module.d.ts +11 -0
  634. package/ng-package.json +0 -15
  635. package/src/lib/base/core/base-data-page.facade.ts +0 -533
  636. package/src/lib/base/core/base-data-page.service.ts +0 -222
  637. package/src/lib/base/core/base-data-page.state.ts +0 -287
  638. package/src/lib/base/handlers/filter-handler.service.ts +0 -169
  639. package/src/lib/base/handlers/search-handler.service.ts +0 -33
  640. package/src/lib/base/handlers/sort-handler.service.ts +0 -93
  641. package/src/lib/base/models/api-payload.ts +0 -13
  642. package/src/lib/base/models/page-config.interface.ts +0 -49
  643. package/src/lib/base/models/page-filter-tab-option.interface.ts +0 -20
  644. package/src/lib/base/ng-package.json +0 -6
  645. package/src/lib/base/public-api.ts +0 -16
  646. package/src/lib/base/utils/column-helpers.ts +0 -77
  647. package/src/lib/components/actors/actors.columns.ts +0 -40
  648. package/src/lib/components/actors/actors.component.css +0 -0
  649. package/src/lib/components/actors/actors.component.html +0 -320
  650. package/src/lib/components/actors/actors.component.spec.ts +0 -23
  651. package/src/lib/components/actors/actors.component.ts +0 -221
  652. package/src/lib/components/actors/actors.config.ts +0 -55
  653. package/src/lib/components/actors/actors.facade.ts +0 -71
  654. package/src/lib/components/actors/actors.form.component.html +0 -37
  655. package/src/lib/components/actors/actors.form.component.ts +0 -69
  656. package/src/lib/components/actors/actors.model.ts +0 -4
  657. package/src/lib/components/actors/actors.module.ts +0 -13
  658. package/src/lib/components/actors/actors.service.ts +0 -85
  659. package/src/lib/components/actors/actors.state.ts +0 -31
  660. package/src/lib/components/actors/ng-package.json +0 -6
  661. package/src/lib/components/designer/components/label-editor.component.ts +0 -188
  662. package/src/lib/components/designer/components/node-selector.component.ts +0 -208
  663. package/src/lib/components/designer/components/swimlane-label.component.ts +0 -102
  664. package/src/lib/components/designer/components/swimlane-popup.component.ts +0 -51
  665. package/src/lib/components/designer/components/wf-canvas.component.ts +0 -495
  666. package/src/lib/components/designer/components/wf-designer.component.ts +0 -182
  667. package/src/lib/components/designer/components/wf-node.component.ts +0 -91
  668. package/src/lib/components/designer/components/wf-properties-popup.component.ts +0 -257
  669. package/src/lib/components/designer/components/wf-toolbar.component.ts +0 -84
  670. package/src/lib/components/designer/models/types.ts +0 -133
  671. package/src/lib/components/designer/ng-package.json +0 -6
  672. package/src/lib/components/designer/services/canvas-state.service.ts +0 -63
  673. package/src/lib/components/designer/services/connection-segment-interaction.service.ts +0 -141
  674. package/src/lib/components/designer/services/connection.service.ts +0 -351
  675. package/src/lib/components/designer/services/keyboard-handler.service.ts +0 -39
  676. package/src/lib/components/designer/services/label-management.service.ts +0 -72
  677. package/src/lib/components/designer/services/node-finder.service.ts +0 -34
  678. package/src/lib/components/designer/services/node-interaction.service.ts +0 -135
  679. package/src/lib/components/designer/services/node-placement.service.ts +0 -77
  680. package/src/lib/components/designer/services/node-precondition.service.ts +0 -138
  681. package/src/lib/components/designer/services/node-renderer.service.ts +0 -97
  682. package/src/lib/components/designer/services/node-selection.service.ts +0 -110
  683. package/src/lib/components/designer/services/orthogonal-router.service.ts +0 -233
  684. package/src/lib/components/designer/services/position-update.service.ts +0 -56
  685. package/src/lib/components/designer/services/rendering.service.ts +0 -296
  686. package/src/lib/components/designer/services/swimlane-management.service.ts +0 -189
  687. package/src/lib/components/designer/services/swimlane-stats.service.ts +0 -53
  688. package/src/lib/components/designer/services/tag-helper.service.ts +0 -80
  689. package/src/lib/components/designer/services/viewport.service.ts +0 -30
  690. package/src/lib/components/designer/services/wf-facade.service.ts +0 -287
  691. package/src/lib/components/designer/services/wf-mapper.service.ts +0 -450
  692. package/src/lib/components/designer/services/wf-persistence.service.ts +0 -184
  693. package/src/lib/components/designer/services/wf-state.service.ts +0 -143
  694. package/src/lib/components/expiration/expiration.component.css +0 -0
  695. package/src/lib/components/expiration/expiration.component.html +0 -21
  696. package/src/lib/components/expiration/expiration.component.spec.ts +0 -23
  697. package/src/lib/components/expiration/expiration.component.ts +0 -52
  698. package/src/lib/components/expiration/expiration.module.ts +0 -11
  699. package/src/lib/components/expiration/ng-package.json +0 -6
  700. package/src/lib/components/file-render/file-render.component.css +0 -4
  701. package/src/lib/components/file-render/file-render.component.html +0 -21
  702. package/src/lib/components/file-render/file-render.component.spec.ts +0 -23
  703. package/src/lib/components/file-render/file-render.component.ts +0 -34
  704. package/src/lib/components/file-render/file-render.module.ts +0 -19
  705. package/src/lib/components/file-render/ng-package.json +0 -6
  706. package/src/lib/components/file-upload/file-upload.component.css +0 -0
  707. package/src/lib/components/file-upload/file-upload.component.html +0 -69
  708. package/src/lib/components/file-upload/file-upload.component.spec.ts +0 -23
  709. package/src/lib/components/file-upload/file-upload.component.ts +0 -87
  710. package/src/lib/components/file-upload/file-upload.module.ts +0 -40
  711. package/src/lib/components/file-upload/ng-package.json +0 -6
  712. package/src/lib/components/flowable-status/flowable-status.columns.ts +0 -23
  713. package/src/lib/components/flowable-status/flowable-status.component.css +0 -1
  714. package/src/lib/components/flowable-status/flowable-status.component.html +0 -166
  715. package/src/lib/components/flowable-status/flowable-status.component.ts +0 -247
  716. package/src/lib/components/flowable-status/flowable-status.config.ts +0 -54
  717. package/src/lib/components/flowable-status/flowable-status.facade.ts +0 -70
  718. package/src/lib/components/flowable-status/flowable-status.form.component.html +0 -13
  719. package/src/lib/components/flowable-status/flowable-status.form.component.ts +0 -51
  720. package/src/lib/components/flowable-status/flowable-status.model.ts +0 -3
  721. package/src/lib/components/flowable-status/flowable-status.module.ts +0 -13
  722. package/src/lib/components/flowable-status/flowable-status.service.ts +0 -39
  723. package/src/lib/components/flowable-status/flowable-status.state.ts +0 -10
  724. package/src/lib/components/flowable-status/ng-package.json +0 -6
  725. package/src/lib/components/flowable-status/public-api.ts +0 -3
  726. package/src/lib/components/form-control/form-control.component.css +0 -0
  727. package/src/lib/components/form-control/form-control.component.html +0 -259
  728. package/src/lib/components/form-control/form-control.component.spec.ts +0 -23
  729. package/src/lib/components/form-control/form-control.component.ts +0 -197
  730. package/src/lib/components/form-control/form-control.module.ts +0 -47
  731. package/src/lib/components/form-control/ng-package.json +0 -6
  732. package/src/lib/components/form-group/base-table-style.ts +0 -52
  733. package/src/lib/components/form-group/form-fields/form-fields.component.css +0 -114
  734. package/src/lib/components/form-group/form-fields/form-fields.component.html +0 -621
  735. package/src/lib/components/form-group/form-fields/form-fields.component.spec.ts +0 -23
  736. package/src/lib/components/form-group/form-fields/form-fields.component.ts +0 -1115
  737. package/src/lib/components/form-group/form-fields/form-fields.module.ts +0 -48
  738. package/src/lib/components/form-group/form-fields/form-fields.service.ts +0 -70
  739. package/src/lib/components/form-group/form-fields/helper.ts +0 -45
  740. package/src/lib/components/form-group/form-group.component.css +0 -113
  741. package/src/lib/components/form-group/form-group.component.html +0 -486
  742. package/src/lib/components/form-group/form-group.component.spec.ts +0 -22
  743. package/src/lib/components/form-group/form-group.component.ts +0 -789
  744. package/src/lib/components/form-group/form-group.module.ts +0 -54
  745. package/src/lib/components/form-group/form-group.service.ts +0 -53
  746. package/src/lib/components/form-group/helper.ts +0 -45
  747. package/src/lib/components/form-group/ng-package.json +0 -6
  748. package/src/lib/components/form-response/form-response.component.css +0 -114
  749. package/src/lib/components/form-response/form-response.component.html +0 -188
  750. package/src/lib/components/form-response/form-response.component.spec.ts +0 -23
  751. package/src/lib/components/form-response/form-response.component.ts +0 -735
  752. package/src/lib/components/form-response/form-response.module.ts +0 -48
  753. package/src/lib/components/form-response/form-response.service.ts +0 -52
  754. package/src/lib/components/form-response/helper.ts +0 -222
  755. package/src/lib/components/form-response/ng-package.json +0 -6
  756. package/src/lib/components/form-timer/form-timer.component.css +0 -0
  757. package/src/lib/components/form-timer/form-timer.component.html +0 -47
  758. package/src/lib/components/form-timer/form-timer.component.spec.ts +0 -23
  759. package/src/lib/components/form-timer/form-timer.component.ts +0 -50
  760. package/src/lib/components/form-timer/form-timer.module.ts +0 -19
  761. package/src/lib/components/form-timer/ng-package.json +0 -6
  762. package/src/lib/components/form-values/form-values.component.css +0 -48
  763. package/src/lib/components/form-values/form-values.component.html +0 -225
  764. package/src/lib/components/form-values/form-values.component.ts +0 -1437
  765. package/src/lib/components/form-values/form-values.module.ts +0 -13
  766. package/src/lib/components/form-values/form-values.service.ts +0 -45
  767. package/src/lib/components/form-values/ng-package.json +0 -6
  768. package/src/lib/components/form-viewer/form-viewer.component.css +0 -4
  769. package/src/lib/components/form-viewer/form-viewer.component.html +0 -62
  770. package/src/lib/components/form-viewer/form-viewer.component.spec.ts +0 -23
  771. package/src/lib/components/form-viewer/form-viewer.component.ts +0 -31
  772. package/src/lib/components/form-viewer/form-viewer.module.ts +0 -52
  773. package/src/lib/components/form-viewer/ng-package.json +0 -6
  774. package/src/lib/components/forms/base-table-style.ts +0 -52
  775. package/src/lib/components/forms/forms.component.css +0 -126
  776. package/src/lib/components/forms/forms.component.html +0 -538
  777. package/src/lib/components/forms/forms.component.spec.ts +0 -23
  778. package/src/lib/components/forms/forms.component.ts +0 -810
  779. package/src/lib/components/forms/forms.module.ts +0 -10
  780. package/src/lib/components/forms/forms.service.spec.ts +0 -16
  781. package/src/lib/components/forms/forms.service.ts +0 -65
  782. package/src/lib/components/forms/ng-package.json +0 -6
  783. package/src/lib/components/journal/journal.component.css +0 -0
  784. package/src/lib/components/journal/journal.component.html +0 -1
  785. package/src/lib/components/journal/journal.component.spec.ts +0 -23
  786. package/src/lib/components/journal/journal.component.ts +0 -10
  787. package/src/lib/components/journal/journal.module.ts +0 -10
  788. package/src/lib/components/journal/ng-package.json +0 -6
  789. package/src/lib/components/my-queue/my-queue.columns.ts +0 -37
  790. package/src/lib/components/my-queue/my-queue.component.css +0 -8
  791. package/src/lib/components/my-queue/my-queue.component.html +0 -319
  792. package/src/lib/components/my-queue/my-queue.component.spec.ts +0 -23
  793. package/src/lib/components/my-queue/my-queue.component.ts +0 -409
  794. package/src/lib/components/my-queue/my-queue.facade.ts +0 -670
  795. package/src/lib/components/my-queue/my-queue.helper.ts +0 -71
  796. package/src/lib/components/my-queue/my-queue.module.ts +0 -28
  797. package/src/lib/components/my-queue/my-queue.service.spec.ts +0 -16
  798. package/src/lib/components/my-queue/my-queue.service.ts +0 -262
  799. package/src/lib/components/my-queue/my-queue.state.ts +0 -133
  800. package/src/lib/components/my-queue/ng-package.json +0 -6
  801. package/src/lib/components/my-queue/tasks.form.component.html +0 -168
  802. package/src/lib/components/my-queue/tasks.form.component.ts +0 -201
  803. package/src/lib/components/operation-popup/ng-package.json +0 -6
  804. package/src/lib/components/operation-popup/operation-popup.component.css +0 -1
  805. package/src/lib/components/operation-popup/operation-popup.component.html +0 -107
  806. package/src/lib/components/operation-popup/operation-popup.component.ts +0 -476
  807. package/src/lib/components/operation-popup/operation-popup.facade.ts +0 -435
  808. package/src/lib/components/operation-popup/operation-popup.service.ts +0 -143
  809. package/src/lib/components/operation-popup/operation-popup.state.ts +0 -49
  810. package/src/lib/components/stage-details/ng-package.json +0 -6
  811. package/src/lib/components/stage-details/stage-details.component.css +0 -0
  812. package/src/lib/components/stage-details/stage-details.component.html +0 -95
  813. package/src/lib/components/stage-details/stage-details.component.spec.ts +0 -23
  814. package/src/lib/components/stage-details/stage-details.component.ts +0 -43
  815. package/src/lib/components/stage-details/stage-details.module.ts +0 -11
  816. package/src/lib/components/task-form/ng-package.json +0 -6
  817. package/src/lib/components/task-form/task-form.component.css +0 -0
  818. package/src/lib/components/task-form/task-form.component.html +0 -38
  819. package/src/lib/components/task-form/task-form.component.spec.ts +0 -23
  820. package/src/lib/components/task-form/task-form.component.ts +0 -15
  821. package/src/lib/components/task-form/task-form.module.ts +0 -31
  822. package/src/lib/components/task-history/ng-package.json +0 -6
  823. package/src/lib/components/task-history/task-history.component.css +0 -334
  824. package/src/lib/components/task-history/task-history.component.html +0 -292
  825. package/src/lib/components/task-history/task-history.component.spec.ts +0 -23
  826. package/src/lib/components/task-history/task-history.component.ts +0 -284
  827. package/src/lib/components/task-history/task-history.module.ts +0 -12
  828. package/src/lib/components/task-history/task-history.service.ts +0 -32
  829. package/src/lib/components/task-notification/base-table-style.ts +0 -52
  830. package/src/lib/components/task-notification/ng-package.json +0 -6
  831. package/src/lib/components/task-notification/task-notification.component.css +0 -94
  832. package/src/lib/components/task-notification/task-notification.component.html +0 -585
  833. package/src/lib/components/task-notification/task-notification.component.spec.ts +0 -23
  834. package/src/lib/components/task-notification/task-notification.component.ts +0 -793
  835. package/src/lib/components/task-notification/task-notification.module.ts +0 -10
  836. package/src/lib/components/task-notification/task-notification.service.spec.ts +0 -16
  837. package/src/lib/components/task-notification/task-notification.service.ts +0 -397
  838. package/src/lib/components/tasks/ng-package.json +0 -6
  839. package/src/lib/components/tasks/tasks.columns.ts +0 -50
  840. package/src/lib/components/tasks/tasks.component.css +0 -4
  841. package/src/lib/components/tasks/tasks.component.html +0 -385
  842. package/src/lib/components/tasks/tasks.component.spec.ts +0 -23
  843. package/src/lib/components/tasks/tasks.component.ts +0 -212
  844. package/src/lib/components/tasks/tasks.facade.ts +0 -482
  845. package/src/lib/components/tasks/tasks.form.component.html +0 -181
  846. package/src/lib/components/tasks/tasks.form.component.ts +0 -174
  847. package/src/lib/components/tasks/tasks.helper.ts +0 -71
  848. package/src/lib/components/tasks/tasks.models.ts +0 -4
  849. package/src/lib/components/tasks/tasks.module.ts +0 -29
  850. package/src/lib/components/tasks/tasks.service.spec.ts +0 -16
  851. package/src/lib/components/tasks/tasks.service.ts +0 -215
  852. package/src/lib/components/tasks/tasks.state.ts +0 -144
  853. package/src/lib/components/wf/ng-package.json +0 -6
  854. package/src/lib/components/wf/wf.columns.ts +0 -36
  855. package/src/lib/components/wf/wf.component.css +0 -0
  856. package/src/lib/components/wf/wf.component.html +0 -35
  857. package/src/lib/components/wf/wf.component.spec.ts +0 -23
  858. package/src/lib/components/wf/wf.component.ts +0 -71
  859. package/src/lib/components/wf/wf.facade.ts +0 -266
  860. package/src/lib/components/wf/wf.helper.ts +0 -25
  861. package/src/lib/components/wf/wf.module.ts +0 -14
  862. package/src/lib/components/wf/wf.service.spec.ts +0 -16
  863. package/src/lib/components/wf/wf.service.ts +0 -98
  864. package/src/lib/components/wf/wf.state.ts +0 -99
  865. package/src/lib/components/workflow/column.ts +0 -40
  866. package/src/lib/components/workflow/helper.ts +0 -53
  867. package/src/lib/components/workflow/ng-package.json +0 -6
  868. package/src/lib/components/workflow/table-style.ts +0 -53
  869. package/src/lib/components/workflow/workflow.component.css +0 -0
  870. package/src/lib/components/workflow/workflow.component.html +0 -226
  871. package/src/lib/components/workflow/workflow.component.spec.ts +0 -23
  872. package/src/lib/components/workflow/workflow.component.ts +0 -224
  873. package/src/lib/components/workflow/workflow.module.ts +0 -11
  874. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.css +0 -9
  875. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.html +0 -134
  876. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.spec.ts +0 -23
  877. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.ts +0 -147
  878. package/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.css +0 -0
  879. package/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.html +0 -45
  880. package/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.ts +0 -83
  881. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.css +0 -7
  882. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.html +0 -89
  883. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.spec.ts +0 -23
  884. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.ts +0 -87
  885. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.css +0 -11
  886. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.html +0 -74
  887. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.spec.ts +0 -23
  888. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.ts +0 -80
  889. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.css +0 -70
  890. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.html +0 -454
  891. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.spec.ts +0 -23
  892. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.ts +0 -1654
  893. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.connection-drop.spec.ts +0 -100
  894. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.css +0 -63
  895. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.html +0 -49
  896. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.spec.ts +0 -23
  897. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.ts +0 -86
  898. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.types.ts +0 -7
  899. package/src/lib/components/workflow-designer/docs/01-architecture.md +0 -145
  900. package/src/lib/components/workflow-designer/docs/02-coordinate-system.md +0 -171
  901. package/src/lib/components/workflow-designer/docs/03-data-model.md +0 -163
  902. package/src/lib/components/workflow-designer/docs/04-interactions.md +0 -156
  903. package/src/lib/components/workflow-designer/docs/05-persistence.md +0 -117
  904. package/src/lib/components/workflow-designer/docs/06-known-issues.md +0 -181
  905. package/src/lib/components/workflow-designer/docs/07-integration.md +0 -178
  906. package/src/lib/components/workflow-designer/docs/08-api-reference.md +0 -187
  907. package/src/lib/components/workflow-designer/docs/09-development.md +0 -141
  908. package/src/lib/components/workflow-designer/docs/README.md +0 -81
  909. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.css +0 -13
  910. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.html +0 -204
  911. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.spec.ts +0 -23
  912. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.ts +0 -308
  913. package/src/lib/components/workflow-designer/ng-package.json +0 -6
  914. package/src/lib/components/workflow-designer/services/connection.service.ts +0 -325
  915. package/src/lib/components/workflow-designer/services/node-management.service.ts +0 -372
  916. package/src/lib/components/workflow-designer/services/popup.service.ts +0 -276
  917. package/src/lib/components/workflow-designer/services/swimlane.service.ts +0 -176
  918. package/src/lib/components/workflow-designer/services/transformer.service.ts +0 -318
  919. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.css +0 -0
  920. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.html +0 -208
  921. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.spec.ts +0 -23
  922. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.ts +0 -194
  923. package/src/lib/components/workflow-designer/stage-node/stage-node.component.css +0 -15
  924. package/src/lib/components/workflow-designer/stage-node/stage-node.component.html +0 -93
  925. package/src/lib/components/workflow-designer/stage-node/stage-node.component.spec.ts +0 -23
  926. package/src/lib/components/workflow-designer/stage-node/stage-node.component.ts +0 -258
  927. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.css +0 -0
  928. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.html +0 -150
  929. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.spec.ts +0 -23
  930. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.ts +0 -153
  931. package/src/lib/components/workflow-designer/workflow-data.service.spec.ts +0 -16
  932. package/src/lib/components/workflow-designer/workflow-data.service.ts +0 -290
  933. package/src/lib/components/workflow-designer/workflow-designer.component.css +0 -59
  934. package/src/lib/components/workflow-designer/workflow-designer.component.html +0 -29
  935. package/src/lib/components/workflow-designer/workflow-designer.component.spec.ts +0 -23
  936. package/src/lib/components/workflow-designer/workflow-designer.component.ts +0 -548
  937. package/src/lib/components/workflow-designer/workflow-designer.models.ts +0 -114
  938. package/src/lib/components/workflow-designer/workflow-designer.module.ts +0 -90
  939. package/src/lib/components/workflow-designer/workflow-designer.state.ts +0 -1123
  940. package/src/lib/components/workflow-designer/workflow-designer.types.ts +0 -141
  941. package/src/lib/components/workflow-stage/ng-package.json +0 -6
  942. package/src/lib/components/workflow-stage/workflow-stage.component.css +0 -24
  943. package/src/lib/components/workflow-stage/workflow-stage.component.html +0 -339
  944. package/src/lib/components/workflow-stage/workflow-stage.component.spec.ts +0 -23
  945. package/src/lib/components/workflow-stage/workflow-stage.component.ts +0 -355
  946. package/src/lib/components/workflow-stage/workflow-stage.module.ts +0 -53
  947. package/src/lib/components/workflows/ng-package.json +0 -6
  948. package/src/lib/components/workflows/public-api.ts +0 -6
  949. package/src/lib/components/workflows/workflow-form/workflow-form.component.css +0 -0
  950. package/src/lib/components/workflows/workflow-form/workflow-form.component.html +0 -138
  951. package/src/lib/components/workflows/workflow-form/workflow-form.component.spec.ts +0 -23
  952. package/src/lib/components/workflows/workflow-form/workflow-form.component.ts +0 -85
  953. package/src/lib/components/workflows/workflows.api.ts +0 -117
  954. package/src/lib/components/workflows/workflows.columns.ts +0 -41
  955. package/src/lib/components/workflows/workflows.component.css +0 -4
  956. package/src/lib/components/workflows/workflows.component.html +0 -309
  957. package/src/lib/components/workflows/workflows.component.spec.ts +0 -23
  958. package/src/lib/components/workflows/workflows.component.ts +0 -303
  959. package/src/lib/components/workflows/workflows.config.ts +0 -58
  960. package/src/lib/components/workflows/workflows.facade.ts +0 -147
  961. package/src/lib/components/workflows/workflows.module.ts +0 -14
  962. package/src/lib/components/workflows/workflows.service.spec.ts +0 -16
  963. package/src/lib/components/workflows/workflows.service.ts +0 -88
  964. package/src/lib/components/workflows/workflows.state.ts +0 -21
  965. package/src/lib/models/ActionHistory.ts +0 -19
  966. package/src/lib/models/ActionType.ts +0 -9
  967. package/src/lib/models/Actor.ts +0 -12
  968. package/src/lib/models/ActorTag.ts +0 -8
  969. package/src/lib/models/Coord.ts +0 -4
  970. package/src/lib/models/DataExtensionValue.ts +0 -5
  971. package/src/lib/models/DataType.ts +0 -25
  972. package/src/lib/models/EAVDataType.ts +0 -18
  973. package/src/lib/models/EAVEntity.ts +0 -5
  974. package/src/lib/models/EntityDataValue.ts +0 -7
  975. package/src/lib/models/EntityProperty.ts +0 -8
  976. package/src/lib/models/ErrorResponse.ts +0 -7
  977. package/src/lib/models/Escalation.ts +0 -15
  978. package/src/lib/models/EscalationCycle.ts +0 -13
  979. package/src/lib/models/EscalationStage.ts +0 -11
  980. package/src/lib/models/EscalationType.ts +0 -5
  981. package/src/lib/models/File.ts +0 -8
  982. package/src/lib/models/FilterTypes.ts +0 -8
  983. package/src/lib/models/FlowableStatus.ts +0 -6
  984. package/src/lib/models/Form.ts +0 -14
  985. package/src/lib/models/FormEntity.ts +0 -14
  986. package/src/lib/models/FormFill.ts +0 -16
  987. package/src/lib/models/FormProperty.ts +0 -16
  988. package/src/lib/models/FormValue.ts +0 -19
  989. package/src/lib/models/MailConfig.ts +0 -13
  990. package/src/lib/models/MessageConfig.ts +0 -5
  991. package/src/lib/models/MessageMedium.ts +0 -4
  992. package/src/lib/models/OperationAction.ts +0 -15
  993. package/src/lib/models/PagedResult.ts +0 -5
  994. package/src/lib/models/PeriodMode.ts +0 -10
  995. package/src/lib/models/PermissionConfig.ts +0 -8
  996. package/src/lib/models/Property.ts +0 -6
  997. package/src/lib/models/ReportSchedule.ts +0 -23
  998. package/src/lib/models/ReportType.ts +0 -5
  999. package/src/lib/models/Resource.ts +0 -57
  1000. package/src/lib/models/ResponseKeyValue.ts +0 -5
  1001. package/src/lib/models/SMSConfig.ts +0 -11
  1002. package/src/lib/models/SearchDynamicWrapper.ts +0 -6
  1003. package/src/lib/models/SearchOperator.ts +0 -4
  1004. package/src/lib/models/SearchPropertySign.ts +0 -9
  1005. package/src/lib/models/SearchPropertyValue.ts +0 -13
  1006. package/src/lib/models/SearchPropertyValueType.ts +0 -9
  1007. package/src/lib/models/Size.ts +0 -4
  1008. package/src/lib/models/SortDirection.ts +0 -5
  1009. package/src/lib/models/StageActorRule.ts +0 -6
  1010. package/src/lib/models/SwimLane.ts +0 -14
  1011. package/src/lib/models/Tag.ts +0 -7
  1012. package/src/lib/models/Task.ts +0 -33
  1013. package/src/lib/models/TaskAssignmentType.ts +0 -4
  1014. package/src/lib/models/TaskNotification.ts +0 -16
  1015. package/src/lib/models/TaskNotificationMessageType.ts +0 -4
  1016. package/src/lib/models/TaskNotificationType.ts +0 -7
  1017. package/src/lib/models/TaskStatus.ts +0 -7
  1018. package/src/lib/models/Workflow.ts +0 -22
  1019. package/src/lib/models/WorkflowAction.ts +0 -15
  1020. package/src/lib/models/WorkflowOperation.ts +0 -7
  1021. package/src/lib/models/WorkflowStage.ts +0 -27
  1022. package/src/lib/models/actors.ts +0 -10
  1023. package/src/lib/models/auth-mechanism.ts +0 -14
  1024. package/src/lib/models/base.ts +0 -14
  1025. package/src/lib/models/ng-package.json +0 -6
  1026. package/src/lib/models/object-state.ts +0 -6
  1027. package/src/lib/models/operation-type.ts +0 -6
  1028. package/src/lib/models/paged.ts +0 -9
  1029. package/src/lib/models/query-params.ts +0 -9
  1030. package/src/lib/models/status.ts +0 -5
  1031. package/src/lib/models/task-history.ts +0 -14
  1032. package/src/lib/models/user-access-request-status.ts +0 -5
  1033. package/src/lib/models/user.ts +0 -25
  1034. package/src/lib/pipes/async-label.pipe.spec.ts +0 -12
  1035. package/src/lib/pipes/async-label.pipe.ts +0 -30
  1036. package/src/lib/pipes/ng-package.json +0 -6
  1037. package/src/lib/services/environment.service.spec.ts +0 -16
  1038. package/src/lib/services/environment.service.ts +0 -31
  1039. package/src/lib/services/http-web-request.service.spec.ts +0 -16
  1040. package/src/lib/services/http-web-request.service.ts +0 -154
  1041. package/src/lib/services/label.service.spec.ts +0 -16
  1042. package/src/lib/services/label.service.ts +0 -182
  1043. package/src/lib/services/ng-package.json +0 -6
  1044. package/src/lib/services/public-api.ts +0 -5
  1045. package/src/lib/services/util.service.spec.ts +0 -16
  1046. package/src/lib/services/util.service.ts +0 -72
  1047. package/src/lib/shared/base-table-style.ts +0 -56
  1048. package/src/lib/shared/components/base-data-view.component.ts +0 -187
  1049. package/src/lib/shared/components/base-model-field.ts +0 -31
  1050. package/src/lib/shared/models/DataViewConfig.ts +0 -19
  1051. package/src/lib/shared/ng-package.json +0 -6
  1052. package/src/lib/shared/public-api.ts +0 -14
  1053. package/src/lib/shared/shared.module.ts +0 -67
  1054. package/src/lib/utils/index.ts +0 -1
  1055. package/src/lib/utils/public-api.ts +0 -2
  1056. package/src/lib/utils/store.ts +0 -50
  1057. package/src/public-api.ts +0 -58
  1058. package/src/styles.css +0 -96
  1059. package/tailwind.config copy.js +0 -33
  1060. package/tailwind.config.js +0 -20
  1061. package/tsconfig.lib.json +0 -15
  1062. package/tsconfig.lib.prod.json +0 -11
  1063. package/tsconfig.spec.json +0 -15
  1064. /package/src/lib/base/{index.ts → index.d.ts} +0 -0
  1065. /package/src/lib/components/actors/{index.ts → index.d.ts} +0 -0
  1066. /package/src/lib/components/actors/{public-api.ts → public-api.d.ts} +0 -0
  1067. /package/src/lib/components/designer/{index.ts → index.d.ts} +0 -0
  1068. /package/src/lib/components/designer/{public-api.ts → public-api.d.ts} +0 -0
  1069. /package/src/lib/components/expiration/{index.ts → index.d.ts} +0 -0
  1070. /package/src/lib/components/expiration/{public-api.ts → public-api.d.ts} +0 -0
  1071. /package/src/lib/components/file-render/{index.ts → index.d.ts} +0 -0
  1072. /package/src/lib/components/file-render/{public-api.ts → public-api.d.ts} +0 -0
  1073. /package/src/lib/components/file-upload/{index.ts → index.d.ts} +0 -0
  1074. /package/src/lib/components/file-upload/{public-api.ts → public-api.d.ts} +0 -0
  1075. /package/src/lib/components/flowable-status/{index.ts → index.d.ts} +0 -0
  1076. /package/src/lib/components/form-control/{index.ts → index.d.ts} +0 -0
  1077. /package/src/lib/components/form-control/{public-api.ts → public-api.d.ts} +0 -0
  1078. /package/src/lib/components/form-group/{index.ts → index.d.ts} +0 -0
  1079. /package/src/lib/components/form-group/{public-api.ts → public-api.d.ts} +0 -0
  1080. /package/src/lib/components/form-response/{index.ts → index.d.ts} +0 -0
  1081. /package/src/lib/components/form-response/{public-api.ts → public-api.d.ts} +0 -0
  1082. /package/src/lib/components/form-timer/{index.ts → index.d.ts} +0 -0
  1083. /package/src/lib/components/form-timer/{public-api.ts → public-api.d.ts} +0 -0
  1084. /package/src/lib/components/form-values/{index.ts → index.d.ts} +0 -0
  1085. /package/src/lib/components/form-values/{public-api.ts → public-api.d.ts} +0 -0
  1086. /package/src/lib/components/form-viewer/{index.ts → index.d.ts} +0 -0
  1087. /package/src/lib/components/form-viewer/{public-api.ts → public-api.d.ts} +0 -0
  1088. /package/src/lib/components/forms/{index.ts → index.d.ts} +0 -0
  1089. /package/src/lib/components/forms/{public-api.ts → public-api.d.ts} +0 -0
  1090. /package/src/lib/components/journal/{index.ts → index.d.ts} +0 -0
  1091. /package/src/lib/components/journal/{public-api.ts → public-api.d.ts} +0 -0
  1092. /package/src/lib/components/my-queue/{index.ts → index.d.ts} +0 -0
  1093. /package/src/lib/components/my-queue/{public-api.ts → public-api.d.ts} +0 -0
  1094. /package/src/lib/components/operation-popup/{index.ts → index.d.ts} +0 -0
  1095. /package/src/lib/components/operation-popup/{public-api.ts → public-api.d.ts} +0 -0
  1096. /package/src/lib/components/stage-details/{index.ts → index.d.ts} +0 -0
  1097. /package/src/lib/components/stage-details/{public-api.ts → public-api.d.ts} +0 -0
  1098. /package/src/lib/components/task-form/{index.ts → index.d.ts} +0 -0
  1099. /package/src/lib/components/task-form/{public-api.ts → public-api.d.ts} +0 -0
  1100. /package/src/lib/components/task-history/{index.ts → index.d.ts} +0 -0
  1101. /package/src/lib/components/task-history/{public-api.ts → public-api.d.ts} +0 -0
  1102. /package/src/lib/components/task-notification/{index.ts → index.d.ts} +0 -0
  1103. /package/src/lib/components/task-notification/{public-api.ts → public-api.d.ts} +0 -0
  1104. /package/src/lib/components/tasks/{index.ts → index.d.ts} +0 -0
  1105. /package/src/lib/components/tasks/{public-api.ts → public-api.d.ts} +0 -0
  1106. /package/src/lib/components/wf/{index.ts → index.d.ts} +0 -0
  1107. /package/src/lib/components/wf/{public-api.ts → public-api.d.ts} +0 -0
  1108. /package/src/lib/components/workflow/{index.ts → index.d.ts} +0 -0
  1109. /package/src/lib/components/workflow/{public-api.ts → public-api.d.ts} +0 -0
  1110. /package/src/lib/components/workflow-designer/{index.ts → index.d.ts} +0 -0
  1111. /package/src/lib/components/workflow-designer/{public-api.ts → public-api.d.ts} +0 -0
  1112. /package/src/lib/components/workflow-stage/{index.ts → index.d.ts} +0 -0
  1113. /package/src/lib/components/workflow-stage/{public-api.ts → public-api.d.ts} +0 -0
  1114. /package/src/lib/components/workflows/{index.ts → index.d.ts} +0 -0
  1115. /package/src/lib/models/{index.ts → index.d.ts} +0 -0
  1116. /package/src/lib/models/{public-api.ts → public-api.d.ts} +0 -0
  1117. /package/src/lib/pipes/{index.ts → index.d.ts} +0 -0
  1118. /package/src/lib/pipes/{public-api.ts → public-api.d.ts} +0 -0
  1119. /package/src/lib/services/{index.ts → index.d.ts} +0 -0
  1120. /package/src/lib/shared/{index.ts → index.d.ts} +0 -0
  1121. /package/{src/styles → styles}/styles.css +0 -0
@@ -0,0 +1,3891 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output, ViewChild, HostListener, signal, computed, Injectable, inject, input } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i2 from '@angular/forms';
6
+ import { FormsModule } from '@angular/forms';
7
+ import * as i1$1 from 'verben-ng-ui';
8
+ import { VerbenDialogueModule, DropDownModule } from 'verben-ng-ui';
9
+ import { WorkflowApiService } from 'verben-workflow-ui/src/lib/components/workflows';
10
+ import { TaskAssignmentType, Status, ObjectState, StageActorRule, ErrorResponse } from 'verben-workflow-ui/src/lib/models';
11
+ import { UtilService, EnvironmentService } from 'verben-workflow-ui/src/lib/services';
12
+
13
+ // components/workflow/toolbar/wf-toolbar.component.ts
14
+ class WFToolbarComponent {
15
+ selectedTool = null;
16
+ toolSelected = new EventEmitter();
17
+ toolbarItems = [
18
+ { id: 'swimlane', label: 'Swimlane', icon: 'icons/swimlane.svg' },
19
+ { id: 'stage', label: 'Stage', icon: 'icons/stage.svg' },
20
+ { id: 'action', label: 'Action', icon: 'icons/action.svg' },
21
+ { id: 'form', label: 'Form', icon: 'icons/form.svg' },
22
+ // { id: 'decision', label: 'Decision', icon: 'icons/decision.svg' },
23
+ { id: 'decision', label: 'Decision', icon: 'icons/stage.svg' },
24
+ { id: 'subflow', label: 'Subflow', icon: 'icons/subflow.svg' },
25
+ ];
26
+ onToolSelect(toolId) {
27
+ // If same tool is selected, deselect it
28
+ this.toolSelected.emit(this.selectedTool === toolId ? null : toolId);
29
+ }
30
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WFToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: WFToolbarComponent, isStandalone: true, selector: "wf-toolbar", inputs: { selectedTool: "selectedTool" }, outputs: { toolSelected: "toolSelected" }, ngImport: i0, template: `
32
+ <div class="toolbar">
33
+ @for (item of toolbarItems; track item.id) {
34
+ <button
35
+ class="tool-button"
36
+ [class.active]="selectedTool === item.id"
37
+ (click)="onToolSelect(item.id)"
38
+ >
39
+ <img [src]="item.icon" [alt]="item.label" class="tool-icon" />
40
+ </button>
41
+ }
42
+ </div>
43
+ `, isInline: true, styles: [".toolbar{display:flex;padding:.5rem;gap:.5rem;background:#fff;border:1px solid #aa00ff;border-radius:7px;box-shadow:4px 4px 4px 3px #00000040}.tool-button{display:flex;align-items:center;justify-content:center;border:1px solid #e5e7eb;border-radius:.375rem;background:#fff;cursor:pointer;transition:all .2s;&:hover{background:#f9fafb}&.active{background:#f3e8ff;border-color:#d8b4fe}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
44
+ }
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WFToolbarComponent, decorators: [{
46
+ type: Component,
47
+ args: [{ selector: 'wf-toolbar', standalone: true, imports: [CommonModule], template: `
48
+ <div class="toolbar">
49
+ @for (item of toolbarItems; track item.id) {
50
+ <button
51
+ class="tool-button"
52
+ [class.active]="selectedTool === item.id"
53
+ (click)="onToolSelect(item.id)"
54
+ >
55
+ <img [src]="item.icon" [alt]="item.label" class="tool-icon" />
56
+ </button>
57
+ }
58
+ </div>
59
+ `, styles: [".toolbar{display:flex;padding:.5rem;gap:.5rem;background:#fff;border:1px solid #aa00ff;border-radius:7px;box-shadow:4px 4px 4px 3px #00000040}.tool-button{display:flex;align-items:center;justify-content:center;border:1px solid #e5e7eb;border-radius:.375rem;background:#fff;cursor:pointer;transition:all .2s;&:hover{background:#f9fafb}&.active{background:#f3e8ff;border-color:#d8b4fe}}\n"] }]
60
+ }], propDecorators: { selectedTool: [{
61
+ type: Input
62
+ }], toolSelected: [{
63
+ type: Output
64
+ }] } });
65
+
66
+ // components/label-editor.component.ts
67
+ class LabelEditorComponent {
68
+ label = '';
69
+ x = 0;
70
+ y = 0;
71
+ isConnection = false;
72
+ isSwimlane = false;
73
+ labelChange = new EventEmitter();
74
+ openDialog = new EventEmitter();
75
+ labelInput;
76
+ isEditing = false;
77
+ Math = Math;
78
+ getEditorPosition() {
79
+ // const offsetX = this.isConnection ? -25 : -25; // Center the label
80
+ // const offsetY = -10; // Slight upward offset to center vertically
81
+ const offsetX = this.isConnection ? 0 : 0; // Center the label
82
+ const offsetY = 0; // Slight upward offset to center vertically
83
+ // return `translate(${this.x + offsetX}px, ${this.y + offsetY}px)`;
84
+ return `translate(50%, 50%)`;
85
+ }
86
+ getLabelStyle() {
87
+ if (this.isEditing)
88
+ return {};
89
+ return {
90
+ 'text-anchor': 'middle',
91
+ 'dominant-baseline': 'middle',
92
+ 'pointer-events': 'all',
93
+ };
94
+ }
95
+ startEditing() {
96
+ this.isEditing = true;
97
+ setTimeout(() => {
98
+ if (this.labelInput) {
99
+ this.labelInput.nativeElement.focus();
100
+ this.labelInput.nativeElement.select();
101
+ }
102
+ });
103
+ }
104
+ finishEditing() {
105
+ if (this.isEditing) {
106
+ const newValue = this.labelInput.nativeElement.value.trim();
107
+ if (newValue && newValue !== this.label) {
108
+ this.labelChange.emit(newValue);
109
+ }
110
+ this.isEditing = false;
111
+ }
112
+ }
113
+ cancelEditing() {
114
+ this.isEditing = false;
115
+ }
116
+ onEscapePress() {
117
+ this.cancelEditing();
118
+ }
119
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LabelEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
120
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LabelEditorComponent, isStandalone: true, selector: "wf-label-editor", inputs: { label: "label", x: "x", y: "y", isConnection: "isConnection", isSwimlane: "isSwimlane" }, outputs: { labelChange: "labelChange", openDialog: "openDialog" }, host: { listeners: { "document:keydown.escape": "onEscapePress()" } }, viewQueries: [{ propertyName: "labelInput", first: true, predicate: ["labelInput"], descendants: true }], ngImport: i0, template: `
121
+ <div
122
+ class="label-container"
123
+ [class.editing]="isEditing"
124
+ [class.swimlane-label]="isSwimlane"
125
+ >
126
+ @if (isEditing) {
127
+ <input
128
+ #labelInput
129
+ type="text"
130
+ [value]="label"
131
+ (blur)="finishEditing()"
132
+ (keyup.enter)="finishEditing()"
133
+ (keyup.escape)="cancelEditing()"
134
+ class="label-input"
135
+ [class.swimlane-input]="isSwimlane"
136
+ [style.width.px]="Math.max(100, label.length * 8)"
137
+ />
138
+ } @else {
139
+ <span
140
+ (dblclick)="startEditing()"
141
+ class="label-text"
142
+ [class.connection-label]="isConnection"
143
+ [class.swimlane-text]="isSwimlane"
144
+ >
145
+ {{ label }}
146
+ <svg (click)="openDialog.emit($event)" class="edit-icon" width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
147
+ <path d="M8.78934 3.19845L11.8027 6.21184M12.1148 2.0038L12.9974 2.8864C13.5858 3.47481 13.5858 4.42879 12.9974 5.01719L4.26925 13.7453H1.25586V10.7319L9.98399 2.0038C10.5724 1.4154 11.5264 1.4154 12.1148 2.0038Z" stroke="#3479E9" stroke-linecap="square"/>
148
+ </svg>
149
+ </span>
150
+ }
151
+ </div>
152
+ `, isInline: true, styles: [":host{display:block;width:100%;height:100%}.label-container{display:flex;align-items:center;justify-content:center;min-width:50px;z-index:1000}.label-container.editing{background:#fff;padding:2px;border-radius:4px;box-shadow:0 2px 4px #0000001a}.label-input{padding:2px 4px;border:1px solid #d36cff;border-radius:2px;font-size:12px;font-family:inherit;outline:none;&.swimlane-input{font-size:14px;font-weight:500;min-width:150px}}.label-text{cursor:text;-webkit-user-select:none;user-select:none;font-size:12px;pointer-events:all;display:inline-block;min-width:20px;min-height:14px;position:relative}.connection-label{background:#fff;padding:2px 4px;border:1px solid #e5e7eb;border-radius:2px}.swimlane-text{font-size:14px;font-weight:500;color:#64748b}.swimlane-label{position:absolute;left:20px}.edit-icon{position:absolute;right:-14px;top:-14px;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
153
+ }
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LabelEditorComponent, decorators: [{
155
+ type: Component,
156
+ args: [{ selector: 'wf-label-editor', standalone: true, imports: [CommonModule], template: `
157
+ <div
158
+ class="label-container"
159
+ [class.editing]="isEditing"
160
+ [class.swimlane-label]="isSwimlane"
161
+ >
162
+ @if (isEditing) {
163
+ <input
164
+ #labelInput
165
+ type="text"
166
+ [value]="label"
167
+ (blur)="finishEditing()"
168
+ (keyup.enter)="finishEditing()"
169
+ (keyup.escape)="cancelEditing()"
170
+ class="label-input"
171
+ [class.swimlane-input]="isSwimlane"
172
+ [style.width.px]="Math.max(100, label.length * 8)"
173
+ />
174
+ } @else {
175
+ <span
176
+ (dblclick)="startEditing()"
177
+ class="label-text"
178
+ [class.connection-label]="isConnection"
179
+ [class.swimlane-text]="isSwimlane"
180
+ >
181
+ {{ label }}
182
+ <svg (click)="openDialog.emit($event)" class="edit-icon" width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
183
+ <path d="M8.78934 3.19845L11.8027 6.21184M12.1148 2.0038L12.9974 2.8864C13.5858 3.47481 13.5858 4.42879 12.9974 5.01719L4.26925 13.7453H1.25586V10.7319L9.98399 2.0038C10.5724 1.4154 11.5264 1.4154 12.1148 2.0038Z" stroke="#3479E9" stroke-linecap="square"/>
184
+ </svg>
185
+ </span>
186
+ }
187
+ </div>
188
+ `, styles: [":host{display:block;width:100%;height:100%}.label-container{display:flex;align-items:center;justify-content:center;min-width:50px;z-index:1000}.label-container.editing{background:#fff;padding:2px;border-radius:4px;box-shadow:0 2px 4px #0000001a}.label-input{padding:2px 4px;border:1px solid #d36cff;border-radius:2px;font-size:12px;font-family:inherit;outline:none;&.swimlane-input{font-size:14px;font-weight:500;min-width:150px}}.label-text{cursor:text;-webkit-user-select:none;user-select:none;font-size:12px;pointer-events:all;display:inline-block;min-width:20px;min-height:14px;position:relative}.connection-label{background:#fff;padding:2px 4px;border:1px solid #e5e7eb;border-radius:2px}.swimlane-text{font-size:14px;font-weight:500;color:#64748b}.swimlane-label{position:absolute;left:20px}.edit-icon{position:absolute;right:-14px;top:-14px;cursor:pointer}\n"] }]
189
+ }], propDecorators: { label: [{
190
+ type: Input
191
+ }], x: [{
192
+ type: Input
193
+ }], y: [{
194
+ type: Input
195
+ }], isConnection: [{
196
+ type: Input
197
+ }], isSwimlane: [{
198
+ type: Input
199
+ }], labelChange: [{
200
+ type: Output
201
+ }], openDialog: [{
202
+ type: Output
203
+ }], labelInput: [{
204
+ type: ViewChild,
205
+ args: ['labelInput']
206
+ }], onEscapePress: [{
207
+ type: HostListener,
208
+ args: ['document:keydown.escape']
209
+ }] } });
210
+
211
+ // services/wf-state.service.ts
212
+ class WorkflowStateService {
213
+ state = signal({
214
+ objects: [],
215
+ selectedObjectId: null,
216
+ selectedTool: null,
217
+ });
218
+ // Computed signals for better reactivity
219
+ objects = computed(() => this.state().objects);
220
+ selectedObjectId = computed(() => this.state().selectedObjectId);
221
+ selectedTool = computed(() => this.state().selectedTool);
222
+ // private swimlaneManagement = inject(SwimlaneManagementService);
223
+ // Computed signals for filtered objects
224
+ nodes = computed(() => this.objects().filter((obj) => obj.type !== 'swimlane' && obj.type !== 'action'));
225
+ swimlanes = computed(() => this.objects().filter((obj) => obj.type === 'swimlane'));
226
+ connections = computed(() => this.objects().filter((obj) => obj.type === 'action'));
227
+ addObject(object) {
228
+ this.state.update((state) => ({
229
+ ...state,
230
+ objects: [...state.objects, object],
231
+ }));
232
+ }
233
+ updateObject(id, changes) {
234
+ this.state.update((state) => ({
235
+ ...state,
236
+ objects: state.objects.map((obj) => obj.id === id ? { ...obj, ...changes } : obj),
237
+ }));
238
+ }
239
+ updateMultipleObjects(updates) {
240
+ this.state.update((state) => ({
241
+ ...state,
242
+ objects: state.objects.map((obj) => {
243
+ const update = updates.find((u) => u.id === obj.id);
244
+ return update ? { ...obj, ...update.changes } : obj;
245
+ }),
246
+ }));
247
+ }
248
+ removeObject(id) {
249
+ this.state.update((state) => ({
250
+ ...state,
251
+ objects: state.objects.filter((obj) => obj.id !== id),
252
+ }));
253
+ }
254
+ setSelectedTool(tool) {
255
+ this.state.update((state) => ({ ...state, selectedTool: tool }));
256
+ }
257
+ setSelectedObject(id) {
258
+ this.state.update((state) => ({ ...state, selectedObjectId: id }));
259
+ }
260
+ getObjectById(id) {
261
+ return this.objects().find((obj) => obj.id === id);
262
+ }
263
+ // Initialize workflow with default objects
264
+ initializeWorkflow() {
265
+ const swimlaneHeight = 260;
266
+ const swimlane = {
267
+ id: crypto.randomUUID(),
268
+ type: 'swimlane',
269
+ position: { x: 0, y: 0 },
270
+ size: { width: 3000 - 40, height: swimlaneHeight },
271
+ label: 'Default Swimlane',
272
+ };
273
+ // Position start node vertically centered in the swimlane
274
+ const startNodeHeight = 46; // Height of start node
275
+ const startY = (swimlaneHeight - startNodeHeight) / 2;
276
+ const startNode = {
277
+ id: crypto.randomUUID(),
278
+ type: 'start',
279
+ position: { x: 50, y: startY },
280
+ size: { width: 58, height: startNodeHeight },
281
+ label: 'Start',
282
+ };
283
+ const initialConnection = {
284
+ id: crypto.randomUUID(),
285
+ type: 'action',
286
+ position: startNode.position,
287
+ size: { width: 0, height: 0 },
288
+ label: '',
289
+ fromId: startNode.id,
290
+ toId: '',
291
+ points: [
292
+ {
293
+ x: startNode.position.x + startNode.size.width,
294
+ y: startNode.position.y + startNode.size.height / 2,
295
+ },
296
+ {
297
+ x: startNode.position.x + startNode.size.width + 50,
298
+ y: startNode.position.y + startNode.size.height / 2,
299
+ },
300
+ ],
301
+ };
302
+ this.state.set({
303
+ ...this.state(),
304
+ objects: [swimlane, startNode, initialConnection],
305
+ });
306
+ }
307
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
308
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowStateService, providedIn: 'root' });
309
+ }
310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowStateService, decorators: [{
311
+ type: Injectable,
312
+ args: [{
313
+ providedIn: 'root',
314
+ }]
315
+ }] });
316
+
317
+ // services/label-management.service.ts
318
+ class LabelManagementService {
319
+ workflowState = inject(WorkflowStateService);
320
+ updateLabel(objectId, newLabel) {
321
+ this.workflowState.updateObject(objectId, { label: newLabel });
322
+ }
323
+ getLabelPosition(object) {
324
+ if (object.type === 'action') {
325
+ return this.getConnectionLabelPosition(object);
326
+ }
327
+ // // // For regular nodes, use SVG coordinates
328
+ // if (object.type === 'swimlane') {
329
+ // return {
330
+ // x: 100, // Fixed position for swimlane labels
331
+ // y: object.position.y + 20,
332
+ // };
333
+ // }
334
+ // For regular nodes, use SVG coordinates
335
+ // For swimlanes, position label at the left side
336
+ if (object.type === 'swimlane') {
337
+ return {
338
+ x: object.position.x + 20, // Small indent from left edge
339
+ y: object.position.y + object.size.height / 2, // Vertically centered
340
+ };
341
+ }
342
+ return {
343
+ x: object.position.x + object.size.width / 2,
344
+ y: object.position.y + object.size.height / 2,
345
+ };
346
+ }
347
+ getConnectionLabelPosition(connection) {
348
+ if (!connection.points || connection.points.length < 2) {
349
+ return { x: 0, y: 0 };
350
+ }
351
+ // Find the middle point of the connection
352
+ const midIndex = Math.floor(connection.points.length / 2);
353
+ const point1 = connection.points[midIndex - 1];
354
+ const point2 = connection.points[midIndex];
355
+ return {
356
+ x: (point1.x + point2.x) / 2,
357
+ y: (point1.y + point2.y) / 2 - 10, // Offset above the line
358
+ };
359
+ }
360
+ getSVGTextPosition(object) {
361
+ // Center the label for all node types
362
+ const centerX = object.size.width / 2;
363
+ let centerY = object.size.height / 2;
364
+ // Adjust position for form type
365
+ if (object.type === 'form') {
366
+ centerY = object.size.height + 20; // Position below the form
367
+ }
368
+ return { x: centerX, y: centerY };
369
+ }
370
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LabelManagementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
371
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LabelManagementService, providedIn: 'root' });
372
+ }
373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LabelManagementService, decorators: [{
374
+ type: Injectable,
375
+ args: [{
376
+ providedIn: 'root',
377
+ }]
378
+ }] });
379
+
380
+ // components/workflow/swimlane-label.component.ts
381
+ class SwimlaneLabelComponent {
382
+ label = '';
383
+ count = 0;
384
+ addClick = new EventEmitter();
385
+ labelChange = new EventEmitter();
386
+ onAddClick(event) {
387
+ event.stopPropagation();
388
+ this.addClick.emit(event);
389
+ }
390
+ onLabelChange(newLabel) {
391
+ this.labelChange.emit(newLabel);
392
+ }
393
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimlaneLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
394
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SwimlaneLabelComponent, isStandalone: true, selector: "[wf-swimlane-label]", inputs: { label: "label", count: "count" }, outputs: { addClick: "addClick", labelChange: "labelChange" }, ngImport: i0, template: `
395
+ <svg:g>
396
+ <!-- Plus icon at top -->
397
+ <svg:g
398
+ transform="translate(0, 20)"
399
+ class="cursor-pointer"
400
+ (click)="onAddClick($event)"
401
+ >
402
+ <svg:circle r="10" fill="white" stroke="#D8B4FE" stroke-width="1" />
403
+ <svg:path
404
+ d="M-6 0h12 M0 -6v12"
405
+ stroke="#9333EA"
406
+ stroke-width="2"
407
+ stroke-linecap="round"
408
+ />
409
+ </svg:g>
410
+
411
+ <!-- Label in middle with edit support -->
412
+ <svg:g transform="translate(0, 120)">
413
+ <svg:foreignObject
414
+ x="-60"
415
+ y="-12"
416
+ width="180"
417
+ height="24"
418
+ transform="rotate(-90)"
419
+ >
420
+ <xhtml:div
421
+ xmlns="http://www.w3.org/1999/xhtml"
422
+ style="width: 100%; height: 100%;"
423
+ >
424
+ <wf-label-editor
425
+ [label]="label"
426
+ [x]="0"
427
+ [y]="0"
428
+ (labelChange)="onLabelChange($event)"
429
+ />
430
+ </xhtml:div>
431
+ </svg:foreignObject>
432
+ </svg:g>
433
+
434
+ <!-- Count badge at bottom -->
435
+ <svg:g transform="translate(0, 200)">
436
+ <svg:rect
437
+ x="-15"
438
+ y="-10"
439
+ width="20"
440
+ height="20"
441
+ rx="20"
442
+ fill="#F3E8FF"
443
+ stroke="#D8B4FE"
444
+ />
445
+ <svg:text
446
+ x="0"
447
+ y="4"
448
+ text-anchor="middle"
449
+ font-size="12"
450
+ fill="#7E22CE"
451
+ font-weight="500"
452
+ transform="rotate(-90)"
453
+ >
454
+ {{ count }}
455
+ </svg:text>
456
+ </svg:g>
457
+ </svg:g>
458
+ `, isInline: true, styles: [":host{display:block}circle:hover{fill:#f3e8ff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: LabelEditorComponent, selector: "wf-label-editor", inputs: ["label", "x", "y", "isConnection", "isSwimlane"], outputs: ["labelChange", "openDialog"] }] });
459
+ }
460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimlaneLabelComponent, decorators: [{
461
+ type: Component,
462
+ args: [{ selector: '[wf-swimlane-label]', standalone: true, imports: [CommonModule, LabelEditorComponent], template: `
463
+ <svg:g>
464
+ <!-- Plus icon at top -->
465
+ <svg:g
466
+ transform="translate(0, 20)"
467
+ class="cursor-pointer"
468
+ (click)="onAddClick($event)"
469
+ >
470
+ <svg:circle r="10" fill="white" stroke="#D8B4FE" stroke-width="1" />
471
+ <svg:path
472
+ d="M-6 0h12 M0 -6v12"
473
+ stroke="#9333EA"
474
+ stroke-width="2"
475
+ stroke-linecap="round"
476
+ />
477
+ </svg:g>
478
+
479
+ <!-- Label in middle with edit support -->
480
+ <svg:g transform="translate(0, 120)">
481
+ <svg:foreignObject
482
+ x="-60"
483
+ y="-12"
484
+ width="180"
485
+ height="24"
486
+ transform="rotate(-90)"
487
+ >
488
+ <xhtml:div
489
+ xmlns="http://www.w3.org/1999/xhtml"
490
+ style="width: 100%; height: 100%;"
491
+ >
492
+ <wf-label-editor
493
+ [label]="label"
494
+ [x]="0"
495
+ [y]="0"
496
+ (labelChange)="onLabelChange($event)"
497
+ />
498
+ </xhtml:div>
499
+ </svg:foreignObject>
500
+ </svg:g>
501
+
502
+ <!-- Count badge at bottom -->
503
+ <svg:g transform="translate(0, 200)">
504
+ <svg:rect
505
+ x="-15"
506
+ y="-10"
507
+ width="20"
508
+ height="20"
509
+ rx="20"
510
+ fill="#F3E8FF"
511
+ stroke="#D8B4FE"
512
+ />
513
+ <svg:text
514
+ x="0"
515
+ y="4"
516
+ text-anchor="middle"
517
+ font-size="12"
518
+ fill="#7E22CE"
519
+ font-weight="500"
520
+ transform="rotate(-90)"
521
+ >
522
+ {{ count }}
523
+ </svg:text>
524
+ </svg:g>
525
+ </svg:g>
526
+ `, styles: [":host{display:block}circle:hover{fill:#f3e8ff}\n"] }]
527
+ }], propDecorators: { label: [{
528
+ type: Input
529
+ }], count: [{
530
+ type: Input
531
+ }], addClick: [{
532
+ type: Output
533
+ }], labelChange: [{
534
+ type: Output
535
+ }] } });
536
+
537
+ // components/workflow/swimlane-popup.component.ts
538
+ class SwimLanePopupComponent {
539
+ position;
540
+ close = new EventEmitter();
541
+ actionSelected = new EventEmitter();
542
+ actions = [
543
+ { id: 'add-above', label: 'Add Swimlane Above' },
544
+ { id: 'add-below', label: 'Add Swimlane Below' },
545
+ { id: 'delete', label: 'Delete Swimlane' },
546
+ ];
547
+ onActionClick(action) {
548
+ this.actionSelected.emit(action.id);
549
+ this.close.emit();
550
+ }
551
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimLanePopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
552
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SwimLanePopupComponent, isStandalone: true, selector: "wf-swimlane-popup", inputs: { position: "position" }, outputs: { close: "close", actionSelected: "actionSelected" }, ngImport: i0, template: `
553
+ <div
554
+ class="fixed bg-white rounded-lg shadow-lg border border-slate-200 p-4 min-w-[200px]"
555
+ [style.left.px]="position.x"
556
+ [style.top.px]="position.y"
557
+ >
558
+ <div class="flex justify-between items-center mb-4">
559
+ <h3 class="text-sm font-medium text-slate-900">Swimlane Actions</h3>
560
+ <button
561
+ class="text-slate-400 hover:text-slate-600"
562
+ (click)="close.emit()"
563
+ >×</button>
564
+ </div>
565
+
566
+ <div class="space-y-2">
567
+ <button
568
+ *ngFor="let action of actions"
569
+ class="w-full text-left px-3 py-2 text-sm text-slate-700 hover:bg-purple-50 rounded-md"
570
+ (click)="onActionClick(action)"
571
+ >
572
+ {{ action.label }}
573
+ </button>
574
+ </div>
575
+ </div>
576
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
577
+ }
578
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimLanePopupComponent, decorators: [{
579
+ type: Component,
580
+ args: [{
581
+ selector: 'wf-swimlane-popup',
582
+ standalone: true,
583
+ imports: [CommonModule],
584
+ template: `
585
+ <div
586
+ class="fixed bg-white rounded-lg shadow-lg border border-slate-200 p-4 min-w-[200px]"
587
+ [style.left.px]="position.x"
588
+ [style.top.px]="position.y"
589
+ >
590
+ <div class="flex justify-between items-center mb-4">
591
+ <h3 class="text-sm font-medium text-slate-900">Swimlane Actions</h3>
592
+ <button
593
+ class="text-slate-400 hover:text-slate-600"
594
+ (click)="close.emit()"
595
+ >×</button>
596
+ </div>
597
+
598
+ <div class="space-y-2">
599
+ <button
600
+ *ngFor="let action of actions"
601
+ class="w-full text-left px-3 py-2 text-sm text-slate-700 hover:bg-purple-50 rounded-md"
602
+ (click)="onActionClick(action)"
603
+ >
604
+ {{ action.label }}
605
+ </button>
606
+ </div>
607
+ </div>
608
+ `
609
+ }]
610
+ }], propDecorators: { position: [{
611
+ type: Input
612
+ }], close: [{
613
+ type: Output
614
+ }], actionSelected: [{
615
+ type: Output
616
+ }] } });
617
+
618
+ // services/swimlane-stats.service.ts
619
+ class SwimlaneStatsService {
620
+ workflowState = inject(WorkflowStateService);
621
+ popupState = signal({
622
+ isOpen: false,
623
+ position: { x: 0, y: 0 },
624
+ swimlaneId: null,
625
+ });
626
+ popupStatus = this.popupState.asReadonly();
627
+ getNodeCount(swimlaneId) {
628
+ const nodes = this.workflowState.nodes();
629
+ return nodes.filter((node) => this.isNodeInSwimlane(node, swimlaneId))
630
+ .length;
631
+ }
632
+ isNodeInSwimlane(node, swimlaneId) {
633
+ const swimlane = this.workflowState.getObjectById(swimlaneId);
634
+ if (!swimlane)
635
+ return false;
636
+ return (node.position.y >= swimlane.position.y &&
637
+ node.position.y <= swimlane.position.y + swimlane.size.height);
638
+ }
639
+ openPopup(position, swimlaneId) {
640
+ this.popupState.set({
641
+ isOpen: true,
642
+ position,
643
+ swimlaneId,
644
+ });
645
+ }
646
+ closePopup() {
647
+ this.popupState.update((state) => ({ ...state, isOpen: false }));
648
+ }
649
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimlaneStatsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
650
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimlaneStatsService, providedIn: 'root' });
651
+ }
652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimlaneStatsService, decorators: [{
653
+ type: Injectable,
654
+ args: [{
655
+ providedIn: 'root',
656
+ }]
657
+ }] });
658
+
659
+ // services/canvas-state.service.ts
660
+ class CanvasStateService {
661
+ state = signal({
662
+ width: 3000,
663
+ height: 2000,
664
+ gridSize: 20,
665
+ isConnecting: false,
666
+ isDragging: false,
667
+ dragStartPosition: null,
668
+ dragOffset: { x: 0, y: 0 },
669
+ connectionPreview: null,
670
+ });
671
+ canvasState = this.state.asReadonly();
672
+ setConnecting(isConnecting) {
673
+ this.state.update((state) => ({ ...state, isConnecting }));
674
+ }
675
+ setDragging(isDragging) {
676
+ this.state.update((state) => ({ ...state, isDragging }));
677
+ }
678
+ setDragStartPosition(position) {
679
+ this.state.update((state) => ({ ...state, dragStartPosition: position }));
680
+ }
681
+ setDragOffset(offset) {
682
+ this.state.update((state) => ({ ...state, dragOffset: offset }));
683
+ }
684
+ setConnectionPreview(points) {
685
+ this.state.update((state) => ({ ...state, connectionPreview: points }));
686
+ }
687
+ resetInteractionState() {
688
+ this.state.update((state) => ({
689
+ ...state,
690
+ isConnecting: false,
691
+ isDragging: false,
692
+ dragStartPosition: null,
693
+ dragOffset: { x: 0, y: 0 },
694
+ connectionPreview: null,
695
+ }));
696
+ }
697
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CanvasStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
698
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CanvasStateService, providedIn: 'root' });
699
+ }
700
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CanvasStateService, decorators: [{
701
+ type: Injectable,
702
+ args: [{
703
+ providedIn: 'root',
704
+ }]
705
+ }] });
706
+
707
+ // services/node-finder.service.ts
708
+ class NodeFinderService {
709
+ workflowState = inject(WorkflowStateService);
710
+ findNodeAtPoint(point) {
711
+ return (this.workflowState
712
+ .nodes()
713
+ .find((node) => this.isPointInNode(point, node)) || null);
714
+ }
715
+ isPointInNode(point, node) {
716
+ return (point.x >= node.position.x &&
717
+ point.x <= node.position.x + node.size.width &&
718
+ point.y >= node.position.y &&
719
+ point.y <= node.position.y + node.size.height);
720
+ }
721
+ isProtectedNode(node) {
722
+ return ['start', 'swimlane'].includes(node.type);
723
+ }
724
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeFinderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
725
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeFinderService, providedIn: 'root' });
726
+ }
727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeFinderService, decorators: [{
728
+ type: Injectable,
729
+ args: [{
730
+ providedIn: 'root',
731
+ }]
732
+ }] });
733
+
734
+ class NodeSelectionService {
735
+ workflowState = inject(WorkflowStateService);
736
+ nodeFinder = inject(NodeFinderService);
737
+ canvasState = inject(CanvasStateService);
738
+ handleNodeClick(point) {
739
+ // Clear any ongoing interactions first
740
+ this.canvasState.resetInteractionState();
741
+ const nodes = this.workflowState.nodes();
742
+ const clickedNode = this.nodeFinder.findNodeAtPoint(point);
743
+ if (clickedNode) {
744
+ this.selectNode(clickedNode.id);
745
+ }
746
+ else {
747
+ this.clearSelection();
748
+ }
749
+ }
750
+ selectNode(nodeId) {
751
+ // Don't reselect if already selected
752
+ if (this.workflowState.selectedObjectId() === nodeId)
753
+ return;
754
+ this.workflowState.setSelectedObject(nodeId);
755
+ }
756
+ clearSelection() {
757
+ this.workflowState.setSelectedObject(null);
758
+ }
759
+ isSelected(nodeId) {
760
+ return this.workflowState.selectedObjectId() === nodeId;
761
+ }
762
+ getSelectedNode() {
763
+ const selectedId = this.workflowState.selectedObjectId();
764
+ if (!selectedId)
765
+ return null;
766
+ return this.workflowState.getObjectById(selectedId) || null;
767
+ }
768
+ canSelectNode(node) {
769
+ // Add any rules for node selection here
770
+ // For example, prevent selecting swimlanes
771
+ return node.type !== 'swimlane';
772
+ }
773
+ handleToolSelection(nodeType) {
774
+ // Clear selection when tool is selected
775
+ if (nodeType) {
776
+ this.clearSelection();
777
+ }
778
+ }
779
+ handleKeyboardEvent(event) {
780
+ // Handle keyboard shortcuts for selection
781
+ // For example, 'Escape' to clear selection
782
+ if (event.key === 'Escape') {
783
+ this.clearSelection();
784
+ }
785
+ }
786
+ handleClickOutside(event) {
787
+ // Check if click is outside any node and clear selection
788
+ const target = event.target;
789
+ if (target.tagName === 'svg' ||
790
+ target.classList.contains('canvas-container')) {
791
+ this.clearSelection();
792
+ }
793
+ }
794
+ deleteSelectedObject() {
795
+ const selectedId = this.workflowState.selectedObjectId();
796
+ if (!selectedId)
797
+ return;
798
+ const selectedObject = this.workflowState.getObjectById(selectedId);
799
+ if (!selectedObject)
800
+ return;
801
+ // First, remove any connections to/from this object
802
+ const connections = this.workflowState.connections();
803
+ const relatedConnectionIds = connections
804
+ .filter((conn) => conn.fromId === selectedId || conn.toId === selectedId)
805
+ .map((conn) => conn.id);
806
+ // Remove all related connections
807
+ relatedConnectionIds.forEach((id) => {
808
+ this.workflowState.removeObject(id);
809
+ });
810
+ // Remove the selected object
811
+ this.workflowState.removeObject(selectedId);
812
+ // Clear the selection
813
+ this.clearSelection();
814
+ }
815
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
816
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeSelectionService, providedIn: 'root' });
817
+ }
818
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeSelectionService, decorators: [{
819
+ type: Injectable,
820
+ args: [{
821
+ providedIn: 'root',
822
+ }]
823
+ }] });
824
+
825
+ // services/keyboard-handler.service.ts
826
+ class KeyboardHandlerService {
827
+ workflowState = inject(WorkflowStateService);
828
+ selection = inject(NodeSelectionService);
829
+ handleKeyDown(event) {
830
+ // Only handle keyboard events if an object is selected
831
+ if (!this.workflowState.selectedObjectId())
832
+ return;
833
+ switch (event.key) {
834
+ case 'Delete':
835
+ case 'Backspace':
836
+ this.handleDelete();
837
+ break;
838
+ // Add other keyboard shortcuts here
839
+ }
840
+ }
841
+ handleDelete() {
842
+ const selectedId = this.workflowState.selectedObjectId();
843
+ if (!selectedId)
844
+ return;
845
+ const selectedObject = this.workflowState.getObjectById(selectedId);
846
+ if (!selectedObject)
847
+ return;
848
+ // Don't delete protected nodes like start node or swimlanes
849
+ if (['start', 'swimlane'].includes(selectedObject.type))
850
+ return;
851
+ // Remove the object and its connections
852
+ this.selection.deleteSelectedObject();
853
+ }
854
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KeyboardHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
855
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KeyboardHandlerService, providedIn: 'root' });
856
+ }
857
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KeyboardHandlerService, decorators: [{
858
+ type: Injectable,
859
+ args: [{
860
+ providedIn: 'root',
861
+ }]
862
+ }] });
863
+
864
+ // services/rendering.service.ts
865
+ class RenderingService {
866
+ // Node path generation
867
+ generateNodePath(object) {
868
+ switch (object.type) {
869
+ case 'start':
870
+ return this.getStartNodePath(object.size.width, object.size.height);
871
+ case 'decision':
872
+ return this.getDecisionPath(object.size.width, object.size.height);
873
+ case 'form':
874
+ return this.getFormPath(object.size.width, object.size.height);
875
+ case 'subflow':
876
+ return this.getSubflowPath(object.size.width, object.size.height);
877
+ default:
878
+ return '';
879
+ }
880
+ }
881
+ // Individual path generators
882
+ getStartNodePath(width, height) {
883
+ return `M${width} ${height / 2}
884
+ A${width / 2} ${height / 2} 0 0 0
885
+ 0 ${height / 2}
886
+ A${width / 2} ${height / 2} 0 0 0
887
+ ${width} ${height / 2}`;
888
+ }
889
+ getFormPath(width, height) {
890
+ // Use exact path from design SVG
891
+ return `M74.0625 40.5591V85.0625C74.0625 87.9716 72.9069 90.7615 70.8498 92.8186C68.7928 94.8756 66.0028 96.0312 63.0938 96.0312H11.9062C8.99716 96.0312 6.20721 94.8756 4.15017 92.8186C2.09313 90.7615 0.9375 87.9716 0.9375 85.0625V11.9375C0.9375 9.02841 2.09313 6.23846 4.15017 4.18142C6.20721 2.12438 8.99716 0.96875 11.9062 0.96875H34.4722C36.4109 0.969043 38.2701 1.73921 39.6412 3.10994L71.9213 35.3901C73.292 36.7611 74.0622 38.6204 74.0625 40.5591Z`;
892
+ }
893
+ getStartNodePaths() {
894
+ return {
895
+ circle: 'M57.5 23C57.5 35.3246 44.8544 45.5 29 45.5C13.1456 45.5 0.5 35.3246 0.5 23C0.5 10.6754 13.1456 0.5 29 0.5C44.8544 0.5 57.5 10.6754 57.5 23Z',
896
+ arrow: 'M74 6L64 0.226497V11.7735L74 6ZM0 7H65V5H0V7Z',
897
+ };
898
+ }
899
+ getNodeStyle(isSelected) {
900
+ return {
901
+ fill: 'white',
902
+ stroke: '#D36CFF',
903
+ strokeWidth: isSelected ? 2 : 1,
904
+ strokeLinejoin: 'round',
905
+ };
906
+ }
907
+ getConnectionStyle(isSelected) {
908
+ return {
909
+ stroke: '#D36CFF',
910
+ strokeWidth: isSelected ? '2' : '1',
911
+ fill: 'none',
912
+ };
913
+ }
914
+ getConnectionPreviewStyle() {
915
+ return {
916
+ stroke: '#D36CFF',
917
+ strokeWidth: '1',
918
+ strokeDasharray: '4',
919
+ fill: 'none',
920
+ };
921
+ }
922
+ getSwimlaneStyle() {
923
+ return {
924
+ fill: '#f8fafc',
925
+ stroke: '#e2e8f0',
926
+ strokeWidth: '1',
927
+ };
928
+ }
929
+ getNodeTransforms(node) {
930
+ const baseTransform = `translate(${node.position.x}, ${node.position.y})`;
931
+ switch (node.type) {
932
+ case 'start':
933
+ return {
934
+ node: baseTransform,
935
+ arrow: 'translate(57, 17)', // Position arrow relative to circle
936
+ };
937
+ case 'decision':
938
+ return {
939
+ node: baseTransform,
940
+ indicator: `translate(${node.size.width + 10}, -10)`, // Position properties indicator
941
+ };
942
+ default:
943
+ return { node: baseTransform };
944
+ }
945
+ }
946
+ getDecisionNodePath(width, height) {
947
+ return `M${width / 2} 0 L${width} ${height / 2} L${width / 2} ${height} L0 ${height / 2} Z`;
948
+ }
949
+ getPropertiesIndicator() {
950
+ return {
951
+ circle: {
952
+ r: 8,
953
+ style: {
954
+ fill: 'white',
955
+ stroke: '#D36CFF',
956
+ strokeWidth: 1,
957
+ },
958
+ },
959
+ text: {
960
+ content: 'i',
961
+ style: {
962
+ fontSize: '12px',
963
+ textAnchor: 'middle',
964
+ alignmentBaseline: 'middle',
965
+ userSelect: 'none',
966
+ pointerEvents: 'none',
967
+ },
968
+ },
969
+ };
970
+ }
971
+ getLabelStyle(nodeType) {
972
+ const baseStyle = {
973
+ fontSize: '12px',
974
+ textAnchor: 'middle',
975
+ dominantBaseline: 'middle',
976
+ userSelect: 'none',
977
+ pointerEvents: 'none',
978
+ };
979
+ switch (nodeType) {
980
+ case 'swimlane':
981
+ return {
982
+ ...baseStyle,
983
+ fontSize: '14px',
984
+ fontWeight: '500',
985
+ fill: '#64748b',
986
+ // writingMode: 'vertical-lr',
987
+ };
988
+ default:
989
+ return baseStyle;
990
+ }
991
+ }
992
+ getDefaultDimensions() {
993
+ return {
994
+ width: 3000,
995
+ height: 2000,
996
+ gridSize: 20,
997
+ };
998
+ }
999
+ getGridPattern() {
1000
+ return {
1001
+ pattern: {
1002
+ width: 20,
1003
+ height: 20,
1004
+ },
1005
+ path: {
1006
+ d: 'M 20 0 L 0 0 0 20',
1007
+ style: {
1008
+ fill: 'none',
1009
+ stroke: '#e2e8f0',
1010
+ strokeWidth: '0.5',
1011
+ },
1012
+ },
1013
+ };
1014
+ }
1015
+ // getConnectionPath(points: Position[]): string {
1016
+ // if (!points || points.length < 2) return '';
1017
+ // const [start, ...rest] = points;
1018
+ // const end = rest[rest.length - 1];
1019
+ // // Create the main path
1020
+ // const mainPath =
1021
+ // `M ${start.x} ${start.y} ` + rest.map((p) => `L ${p.x} ${p.y}`).join(' ');
1022
+ // // Add arrowhead
1023
+ // const arrowPath = this.createArrowhead(
1024
+ // end,
1025
+ // this.getEndPointAngle(points[points.length - 2], end)
1026
+ // );
1027
+ // return `${mainPath} ${arrowPath}`;
1028
+ // }
1029
+ /**
1030
+ * Gets the SVG path for a connection
1031
+ */
1032
+ getConnectionPath(points) {
1033
+ if (!points || points.length < 2)
1034
+ return '';
1035
+ // Create the main path
1036
+ const pathCommands = points.map((point, index) => {
1037
+ return index === 0
1038
+ ? `M ${point.x} ${point.y}`
1039
+ : `L ${point.x} ${point.y}`;
1040
+ });
1041
+ // Add arrowhead to the last segment
1042
+ const lastSegmentStart = points[points.length - 2];
1043
+ const lastSegmentEnd = points[points.length - 1];
1044
+ const arrowPath = this.createArrowhead(lastSegmentEnd, this.getEndPointAngle(lastSegmentStart, lastSegmentEnd));
1045
+ return `${pathCommands.join(' ')} ${arrowPath}`;
1046
+ }
1047
+ /**
1048
+ * Gets style for an individual connection segment
1049
+ */
1050
+ getConnectionSegmentStyle(isSelected, isHovered) {
1051
+ return {
1052
+ stroke: '#D36CFF',
1053
+ strokeWidth: isSelected ? '2' : isHovered ? '2' : '1',
1054
+ fill: 'none',
1055
+ transition: 'stroke-width 0.2s ease',
1056
+ };
1057
+ }
1058
+ createArrowhead(point, angle) {
1059
+ const arrowSize = 10;
1060
+ const arrowPoints = [
1061
+ {
1062
+ x: point.x - arrowSize * Math.cos(angle - Math.PI / 6),
1063
+ y: point.y - arrowSize * Math.sin(angle - Math.PI / 6),
1064
+ },
1065
+ point,
1066
+ {
1067
+ x: point.x - arrowSize * Math.cos(angle + Math.PI / 6),
1068
+ y: point.y - arrowSize * Math.sin(angle + Math.PI / 6),
1069
+ },
1070
+ ];
1071
+ return (`M ${arrowPoints[0].x} ${arrowPoints[0].y} ` +
1072
+ `L ${arrowPoints[1].x} ${arrowPoints[1].y} ` +
1073
+ `L ${arrowPoints[2].x} ${arrowPoints[2].y}`);
1074
+ }
1075
+ getEndPointAngle(p1, p2) {
1076
+ return Math.atan2(p2.y - p1.y, p2.x - p1.x);
1077
+ }
1078
+ getDecisionPath(width, height) {
1079
+ // Using the exact dimensions from your SVG
1080
+ const centerX = width / 2;
1081
+ const centerY = height / 2;
1082
+ return `M0.981845 ${centerY} L${centerX} 0.580976 L${width - 0.981845} ${centerY} L${centerX} ${height - 0.580976}Z`;
1083
+ }
1084
+ getSubflowPath(width, height) {
1085
+ // Using the exact dimensions from your SVG
1086
+ return `M1.19873 ${height * 0.252887}L${width / 2} 0.57735L${width - 1.19873} ${height * 0.252887}V${height * 0.747113}L${width / 2} ${height - 0.57735}L1.19873 ${height * 0.747113}V${height * 0.252887}`;
1087
+ }
1088
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RenderingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1089
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RenderingService, providedIn: 'root' });
1090
+ }
1091
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RenderingService, decorators: [{
1092
+ type: Injectable,
1093
+ args: [{
1094
+ providedIn: 'root',
1095
+ }]
1096
+ }] });
1097
+
1098
+ // services/orthogonal-router.service.ts
1099
+ class OrthogonalRouterService {
1100
+ /**
1101
+ * Finds the closest node side and point for a given mouse position
1102
+ */
1103
+ findConnectionPoint(node, mousePos) {
1104
+ const { position: pos, size } = node;
1105
+ // Calculate distances to each side
1106
+ const distToTop = Math.abs(mousePos.y - pos.y);
1107
+ const distToBottom = Math.abs(mousePos.y - (pos.y + size.height));
1108
+ const distToLeft = Math.abs(mousePos.x - pos.x);
1109
+ const distToRight = Math.abs(mousePos.x - (pos.x + size.width));
1110
+ // Find the minimum distance
1111
+ const minDist = Math.min(distToTop, distToBottom, distToLeft, distToRight);
1112
+ // Determine connection point based on closest side
1113
+ let side;
1114
+ let x;
1115
+ let y;
1116
+ if (minDist === distToTop) {
1117
+ side = 'top';
1118
+ x = Math.min(Math.max(mousePos.x, pos.x), pos.x + size.width);
1119
+ y = pos.y;
1120
+ }
1121
+ else if (minDist === distToBottom) {
1122
+ side = 'bottom';
1123
+ x = Math.min(Math.max(mousePos.x, pos.x), pos.x + size.width);
1124
+ y = pos.y + size.height;
1125
+ }
1126
+ else if (minDist === distToLeft) {
1127
+ side = 'left';
1128
+ x = pos.x;
1129
+ y = Math.min(Math.max(mousePos.y, pos.y), pos.y + size.height);
1130
+ }
1131
+ else {
1132
+ side = 'right';
1133
+ x = pos.x + size.width;
1134
+ y = Math.min(Math.max(mousePos.y, pos.y), pos.y + size.height);
1135
+ }
1136
+ return { x, y, side };
1137
+ }
1138
+ /**
1139
+ * Calculates the optimal orthogonal route between two points
1140
+ */
1141
+ calculateRoute(startNode, endNode, startPoint, endPoint) {
1142
+ // Convert connection points to routing points
1143
+ const start = { ...startPoint, type: 'start' };
1144
+ const end = { ...endPoint, type: 'end' };
1145
+ // If points are aligned vertically or horizontally, create direct route
1146
+ if (Math.abs(start.x - end.x) < 10) {
1147
+ return this.createVerticalRoute(start, end);
1148
+ }
1149
+ if (Math.abs(start.y - end.y) < 10) {
1150
+ return this.createHorizontalRoute(start, end);
1151
+ }
1152
+ // Create route based on connection sides
1153
+ return this.createRouteFromSides(start, end, startPoint.side, endPoint.side);
1154
+ }
1155
+ createRouteFromSides(start, end, startSide, endSide) {
1156
+ const points = [start];
1157
+ // Determine if we need to start horizontally or vertically based on the start side
1158
+ const startHorizontal = startSide === 'left' || startSide === 'right';
1159
+ const endHorizontal = endSide === 'left' || endSide === 'right';
1160
+ if (startHorizontal) {
1161
+ // Start with horizontal movement
1162
+ const midX = (start.x + end.x) / 2;
1163
+ if (start.y !== end.y) {
1164
+ points.push(this.createBendPoint(midX, start.y, true));
1165
+ points.push(this.createBendPoint(midX, end.y, false));
1166
+ }
1167
+ }
1168
+ else {
1169
+ // Start with vertical movement
1170
+ const midY = (start.y + end.y) / 2;
1171
+ if (start.x !== end.x) {
1172
+ points.push(this.createBendPoint(start.x, midY, false));
1173
+ points.push(this.createBendPoint(end.x, midY, true));
1174
+ }
1175
+ }
1176
+ points.push(end);
1177
+ return this.simplifyRoute(points);
1178
+ }
1179
+ createBendPoint(x, y, isHorizontal) {
1180
+ return { x, y, type: 'bend', isHorizontal };
1181
+ }
1182
+ createHorizontalRoute(start, end) {
1183
+ return [start, { ...end, type: 'end', isHorizontal: true }];
1184
+ }
1185
+ createVerticalRoute(start, end) {
1186
+ return [start, { ...end, type: 'end', isHorizontal: false }];
1187
+ }
1188
+ simplifyRoute(points) {
1189
+ // Remove unnecessary bends (where three points form a straight line)
1190
+ const simplified = points.filter((point, index) => {
1191
+ if (index === 0 || index === points.length - 1)
1192
+ return true;
1193
+ const prev = points[index - 1];
1194
+ const next = points[index + 1];
1195
+ // Keep point if it creates an actual bend
1196
+ return (!(prev.x === point.x && point.x === next.x) &&
1197
+ !(prev.y === point.y && point.y === next.y));
1198
+ });
1199
+ // Update point types and horizontal flags
1200
+ return simplified.map((point, index) => ({
1201
+ ...point,
1202
+ type: index === 0
1203
+ ? 'start'
1204
+ : index === simplified.length - 1
1205
+ ? 'end'
1206
+ : 'bend',
1207
+ isHorizontal: index < simplified.length - 1
1208
+ ? simplified[index + 1].y === point.y
1209
+ : point.y === simplified[index - 1].y,
1210
+ }));
1211
+ }
1212
+ /**
1213
+ * Updates a segment's position while maintaining orthogonal constraints
1214
+ */
1215
+ updateSegment(points, segmentIndex, newPosition) {
1216
+ const updatedPoints = [...points];
1217
+ const currentPoint = points[segmentIndex];
1218
+ const nextPoint = points[segmentIndex + 1];
1219
+ if (!currentPoint || !nextPoint)
1220
+ return points;
1221
+ // Determine if this is a horizontal or vertical segment
1222
+ const isHorizontal = currentPoint.y === nextPoint.y;
1223
+ if (isHorizontal) {
1224
+ // Moving a horizontal segment - adjust y coordinate
1225
+ updatedPoints[segmentIndex].y = newPosition.y;
1226
+ updatedPoints[segmentIndex + 1].y = newPosition.y;
1227
+ }
1228
+ else {
1229
+ // Moving a vertical segment - adjust x coordinate
1230
+ updatedPoints[segmentIndex].x = newPosition.x;
1231
+ updatedPoints[segmentIndex + 1].x = newPosition.x;
1232
+ }
1233
+ return this.simplifyRoute(updatedPoints);
1234
+ }
1235
+ /**
1236
+ * Determines if a point is near enough to a line segment for manipulation
1237
+ */
1238
+ isPointNearSegment(point, segmentStart, segmentEnd, threshold = 10) {
1239
+ // For horizontal segments
1240
+ if (segmentStart.y === segmentEnd.y) {
1241
+ return (Math.abs(point.y - segmentStart.y) <= threshold &&
1242
+ point.x >= Math.min(segmentStart.x, segmentEnd.x) &&
1243
+ point.x <= Math.max(segmentStart.x, segmentEnd.x));
1244
+ }
1245
+ // For vertical segments
1246
+ if (segmentStart.x === segmentEnd.x) {
1247
+ return (Math.abs(point.x - segmentStart.x) <= threshold &&
1248
+ point.y >= Math.min(segmentStart.y, segmentEnd.y) &&
1249
+ point.y <= Math.max(segmentStart.y, segmentEnd.y));
1250
+ }
1251
+ return false;
1252
+ }
1253
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OrthogonalRouterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1254
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OrthogonalRouterService, providedIn: 'root' });
1255
+ }
1256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: OrthogonalRouterService, decorators: [{
1257
+ type: Injectable,
1258
+ args: [{
1259
+ providedIn: 'root',
1260
+ }]
1261
+ }] });
1262
+
1263
+ // services/connection-segment-interaction.service.ts
1264
+ class ConnectionSegmentInteractionService {
1265
+ workflowState = inject(WorkflowStateService);
1266
+ orthogonalRouter = inject(OrthogonalRouterService);
1267
+ dragState = null;
1268
+ /**
1269
+ * Identifies if a point is near any connection segment
1270
+ */
1271
+ findSegmentAtPoint(point) {
1272
+ const connections = this.workflowState.connections();
1273
+ for (const connection of connections) {
1274
+ const points = connection.points;
1275
+ if (!points || points.length < 2)
1276
+ continue;
1277
+ // Check each segment
1278
+ for (let i = 0; i < points.length - 1; i++) {
1279
+ if (this.orthogonalRouter.isPointNearSegment(point, points[i], points[i + 1])) {
1280
+ return {
1281
+ connectionId: connection.id,
1282
+ segmentIndex: i,
1283
+ };
1284
+ }
1285
+ }
1286
+ }
1287
+ return null;
1288
+ }
1289
+ /**
1290
+ * Starts dragging a connection segment
1291
+ */
1292
+ startDragging(connectionId, segmentIndex, point) {
1293
+ this.dragState = {
1294
+ connectionId,
1295
+ segmentIndex,
1296
+ initialPosition: point,
1297
+ };
1298
+ }
1299
+ /**
1300
+ * Updates segment position during drag
1301
+ */
1302
+ updateDragging(point) {
1303
+ if (!this.dragState)
1304
+ return;
1305
+ const connection = this.workflowState.getObjectById(this.dragState.connectionId);
1306
+ if (!connection || !connection.points)
1307
+ return;
1308
+ // Convert Position[] to RoutingPoint[]
1309
+ const routingPoints = connection.points.map((p, index) => ({
1310
+ ...p,
1311
+ type: index === 0
1312
+ ? 'start'
1313
+ : index === connection.points.length - 1
1314
+ ? 'end'
1315
+ : 'bend',
1316
+ isHorizontal: index < connection.points.length - 1
1317
+ ? connection.points[index].y === connection.points[index + 1].y
1318
+ : false,
1319
+ }));
1320
+ const updatedPoints = this.orthogonalRouter.updateSegment(routingPoints, this.dragState.segmentIndex, point);
1321
+ // Convert back to Position[] for storage
1322
+ const positionPoints = updatedPoints.map((p) => ({
1323
+ x: p.x,
1324
+ y: p.y,
1325
+ }));
1326
+ this.workflowState.updateObject(connection.id, {
1327
+ points: positionPoints,
1328
+ });
1329
+ }
1330
+ /**
1331
+ * Completes the drag operation
1332
+ */
1333
+ finishDragging() {
1334
+ // Additional cleanup if needed
1335
+ this.dragState = null;
1336
+ }
1337
+ /**
1338
+ * Returns whether a segment is currently being dragged
1339
+ */
1340
+ isDragging() {
1341
+ return this.dragState !== null;
1342
+ }
1343
+ /**
1344
+ * Gets cursor style based on segment orientation
1345
+ */
1346
+ getSegmentCursor(connectionId, segmentIndex) {
1347
+ const connection = this.workflowState.getObjectById(connectionId);
1348
+ if (!connection || !connection.points)
1349
+ return 'default';
1350
+ const point = connection.points[segmentIndex];
1351
+ const nextPoint = connection.points[segmentIndex + 1];
1352
+ if (!point || !nextPoint)
1353
+ return 'default';
1354
+ // Return appropriate cursor based on segment orientation
1355
+ return point.y === nextPoint.y ? 'ns-resize' : 'ew-resize';
1356
+ }
1357
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConnectionSegmentInteractionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1358
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConnectionSegmentInteractionService, providedIn: 'root' });
1359
+ }
1360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConnectionSegmentInteractionService, decorators: [{
1361
+ type: Injectable,
1362
+ args: [{
1363
+ providedIn: 'root',
1364
+ }]
1365
+ }] });
1366
+
1367
+ // services/connection.service.ts
1368
+ class ConnectionService {
1369
+ workflowState = inject(WorkflowStateService);
1370
+ canvasState = inject(CanvasStateService);
1371
+ nodeFinder = inject(NodeFinderService);
1372
+ rendering = inject(RenderingService);
1373
+ orthogonalRouter = inject(OrthogonalRouterService);
1374
+ segmentInteraction = inject(ConnectionSegmentInteractionService);
1375
+ connectionEndpoints = new Map();
1376
+ startConnection(sourceNode, point) {
1377
+ if (!this.canStartConnection(sourceNode))
1378
+ return;
1379
+ const startPoint = {
1380
+ ...this.orthogonalRouter.findConnectionPoint(sourceNode, point),
1381
+ type: 'start',
1382
+ position: point,
1383
+ };
1384
+ this.canvasState.setConnecting(true);
1385
+ this.workflowState.setSelectedObject(sourceNode.id);
1386
+ // Store the start point for later use
1387
+ const tempId = 'preview';
1388
+ this.connectionEndpoints.set(tempId, {
1389
+ startPoint,
1390
+ endPoint: { ...startPoint }, // Create a new object with the same properties
1391
+ });
1392
+ // Calculate initial preview route
1393
+ const previewPoints = this.orthogonalRouter.calculateRoute(sourceNode, { position: point, size: { width: 0, height: 0 } }, startPoint, startPoint);
1394
+ this.canvasState.setConnectionPreview(previewPoints);
1395
+ }
1396
+ updateConnectionPreview(point) {
1397
+ const sourceNodeId = this.workflowState.selectedObjectId();
1398
+ if (!sourceNodeId)
1399
+ return;
1400
+ const sourceNode = this.workflowState.getObjectById(sourceNodeId);
1401
+ if (!sourceNode)
1402
+ return;
1403
+ const endpoints = this.connectionEndpoints.get('preview');
1404
+ if (!endpoints)
1405
+ return;
1406
+ const endPoint = {
1407
+ x: point.x,
1408
+ y: point.y,
1409
+ side: this.determineEndSide(endpoints.startPoint, point),
1410
+ type: 'end',
1411
+ position: point,
1412
+ };
1413
+ // Update preview with new end point
1414
+ const previewPoints = this.orthogonalRouter.calculateRoute(sourceNode, { position: point, size: { width: 0, height: 0 } }, endpoints.startPoint, endPoint);
1415
+ this.canvasState.setConnectionPreview(previewPoints);
1416
+ }
1417
+ finalizeConnection(point) {
1418
+ const sourceNodeId = this.workflowState.selectedObjectId();
1419
+ if (!sourceNodeId)
1420
+ return;
1421
+ const sourceNode = this.workflowState.getObjectById(sourceNodeId);
1422
+ if (!sourceNode)
1423
+ return;
1424
+ const targetNode = this.nodeFinder.findNodeAtPoint(point);
1425
+ const endpoints = this.connectionEndpoints.get('preview');
1426
+ if (targetNode && endpoints && this.canConnect(sourceNode, targetNode)) {
1427
+ const endPoint = {
1428
+ ...this.orthogonalRouter.findConnectionPoint(targetNode, point),
1429
+ type: 'end',
1430
+ position: point,
1431
+ };
1432
+ // Calculate final route
1433
+ const routePoints = this.orthogonalRouter.calculateRoute(sourceNode, targetNode, endpoints.startPoint, endPoint);
1434
+ const newConnection = {
1435
+ id: crypto.randomUUID(),
1436
+ type: 'action',
1437
+ fromId: sourceNode.id,
1438
+ toId: targetNode.id,
1439
+ label: '',
1440
+ position: sourceNode.position,
1441
+ size: { width: 0, height: 0 },
1442
+ points: routePoints,
1443
+ order: sourceNode.order,
1444
+ };
1445
+ // Store the connection endpoints for later use
1446
+ this.connectionEndpoints.set(newConnection.id, {
1447
+ startPoint: endpoints.startPoint,
1448
+ endPoint,
1449
+ });
1450
+ this.workflowState.addObject(newConnection);
1451
+ }
1452
+ this.connectionEndpoints.delete('preview');
1453
+ }
1454
+ updateConnectionsForNode(nodeId) {
1455
+ const node = this.workflowState.getObjectById(nodeId);
1456
+ if (!node)
1457
+ return;
1458
+ const connections = this.workflowState
1459
+ .connections()
1460
+ .filter((conn) => conn.fromId === nodeId || conn.toId === nodeId);
1461
+ connections.forEach((connection) => {
1462
+ const sourceNode = this.workflowState.getObjectById(connection.fromId);
1463
+ const targetNode = this.workflowState.getObjectById(connection.toId);
1464
+ if (sourceNode && targetNode) {
1465
+ // Determine connection points based on current node positions
1466
+ const startPoint = {
1467
+ ...this.orthogonalRouter.findConnectionPoint(sourceNode, {
1468
+ x: sourceNode.position.x + sourceNode.size.width / 2,
1469
+ y: sourceNode.position.y + sourceNode.size.height / 2,
1470
+ }),
1471
+ type: 'start',
1472
+ position: sourceNode.position,
1473
+ };
1474
+ const endPoint = {
1475
+ ...this.orthogonalRouter.findConnectionPoint(targetNode, {
1476
+ x: targetNode.position.x + targetNode.size.width / 2,
1477
+ y: targetNode.position.y + targetNode.size.height / 2,
1478
+ }),
1479
+ type: 'end',
1480
+ position: targetNode.position,
1481
+ };
1482
+ // Calculate completely new route
1483
+ const newPoints = this.orthogonalRouter.calculateRoute(sourceNode, targetNode, startPoint, endPoint);
1484
+ // Update connection
1485
+ this.workflowState.updateObject(connection.id, {
1486
+ points: newPoints,
1487
+ });
1488
+ // Store new endpoints
1489
+ this.connectionEndpoints.set(connection.id, { startPoint, endPoint });
1490
+ }
1491
+ });
1492
+ }
1493
+ determineEndSide(startPoint, endPoint) {
1494
+ // Determine the best side for the end point based on relative position
1495
+ const dx = endPoint.x - startPoint.x;
1496
+ const dy = endPoint.y - startPoint.y;
1497
+ if (Math.abs(dx) > Math.abs(dy)) {
1498
+ return dx > 0 ? 'left' : 'right';
1499
+ }
1500
+ else {
1501
+ return dy > 0 ? 'top' : 'bottom';
1502
+ }
1503
+ }
1504
+ /**
1505
+ * Handles clicking on a connection segment
1506
+ */
1507
+ handleSegmentClick(point) {
1508
+ const segment = this.segmentInteraction.findSegmentAtPoint(point);
1509
+ if (segment) {
1510
+ this.segmentInteraction.startDragging(segment.connectionId, segment.segmentIndex, point);
1511
+ }
1512
+ }
1513
+ /**
1514
+ * Updates segment position during drag
1515
+ */
1516
+ handleSegmentDrag(point) {
1517
+ if (this.segmentInteraction.isDragging()) {
1518
+ this.segmentInteraction.updateDragging(point);
1519
+ }
1520
+ }
1521
+ /**
1522
+ * Completes segment drag operation
1523
+ */
1524
+ finishSegmentDrag() {
1525
+ this.segmentInteraction.finishDragging();
1526
+ }
1527
+ /**
1528
+ * Gets cursor style for a segment
1529
+ */
1530
+ getSegmentCursor(connectionId, segmentIndex) {
1531
+ return this.segmentInteraction.getSegmentCursor(connectionId, segmentIndex);
1532
+ }
1533
+ getConnectionPath(connection) {
1534
+ if (!connection.points || connection.points.length < 2)
1535
+ return '';
1536
+ const points = connection.points;
1537
+ const [start, ...rest] = points;
1538
+ return (`M ${start.x} ${start.y} ` + rest.map((p) => `L ${p.x} ${p.y}`).join(' '));
1539
+ }
1540
+ canStartConnection(node) {
1541
+ if (node.type === 'start') {
1542
+ // Start node can only have one outgoing connection
1543
+ return !this.hasOutgoingConnections(node.id);
1544
+ }
1545
+ return ['stage', 'decision', 'form', 'subflow'].includes(node.type);
1546
+ }
1547
+ canConnect(source, target) {
1548
+ if (!target || source.id === target.id)
1549
+ return false;
1550
+ // Prevent connections to start node and swimlanes
1551
+ if (['start', 'swimlane'].includes(target.type))
1552
+ return false;
1553
+ // Prevent duplicate connections
1554
+ return !this.hasConnection(source.id, target.id);
1555
+ }
1556
+ hasConnection(sourceId, targetId) {
1557
+ return this.workflowState
1558
+ .connections()
1559
+ .some((conn) => conn.fromId === sourceId &&
1560
+ conn.toId === targetId);
1561
+ }
1562
+ getPreviewPath() {
1563
+ const preview = this.canvasState.canvasState().connectionPreview;
1564
+ if (!preview || preview.length < 2)
1565
+ return '';
1566
+ // Use the rendering service for consistent path generation
1567
+ return this.rendering.getConnectionPath(preview);
1568
+ }
1569
+ hasOutgoingConnections(nodeId) {
1570
+ return this.workflowState
1571
+ .connections()
1572
+ .some((conn) => conn.fromId === nodeId);
1573
+ }
1574
+ getConnectionPoint(node, type) {
1575
+ const center = {
1576
+ x: node.position.x + node.size.width / 2,
1577
+ y: node.position.y + node.size.height / 2,
1578
+ };
1579
+ switch (node.type) {
1580
+ case 'stage':
1581
+ return {
1582
+ x: type === 'input'
1583
+ ? node.position.x
1584
+ : node.position.x + node.size.width,
1585
+ y: center.y,
1586
+ };
1587
+ case 'decision':
1588
+ return type === 'input'
1589
+ ? { x: center.x, y: node.position.y }
1590
+ : { x: node.position.x + node.size.width, y: center.y };
1591
+ default:
1592
+ return type === 'input'
1593
+ ? { x: node.position.x, y: center.y }
1594
+ : { x: node.position.x + node.size.width, y: center.y };
1595
+ }
1596
+ }
1597
+ recalculateConnectionPoints(source, target, existingPoints) {
1598
+ // Start and end points
1599
+ const startPoint = this.getConnectionPoint(source, 'output');
1600
+ const endPoint = this.getConnectionPoint(target, 'input');
1601
+ // If it's a simple connection, just return direct path
1602
+ if (existingPoints.length <= 2) {
1603
+ return [startPoint, endPoint];
1604
+ }
1605
+ // For complex paths, maintain the middle points' relative positions
1606
+ const middlePoints = existingPoints.slice(1, -1).map((point) => ({
1607
+ x: point.x + (startPoint.x - existingPoints[0].x),
1608
+ y: point.y + (startPoint.y - existingPoints[0].y),
1609
+ }));
1610
+ return [startPoint, ...middlePoints, endPoint];
1611
+ }
1612
+ // Use nodeFinder methods instead of NodeInteractionService
1613
+ findTargetNode(point) {
1614
+ return this.nodeFinder.findNodeAtPoint(point);
1615
+ }
1616
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConnectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1617
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConnectionService, providedIn: 'root' });
1618
+ }
1619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConnectionService, decorators: [{
1620
+ type: Injectable,
1621
+ args: [{
1622
+ providedIn: 'root',
1623
+ }]
1624
+ }] });
1625
+
1626
+ // services/workflow-mapper.service.ts
1627
+ class WorkflowMapperService {
1628
+ connectionService;
1629
+ constructor(connectionService) {
1630
+ this.connectionService = connectionService;
1631
+ }
1632
+ // Frontend to Backend transformation
1633
+ toBackendWorkflow(objects, workflowMetadata) {
1634
+ const swimlanes = objects.filter((obj) => obj.type === 'swimlane');
1635
+ const stages = objects.filter((obj) => obj.type === 'stage');
1636
+ const connections = objects.filter((obj) => obj.type === 'action' &&
1637
+ obj?.fromId &&
1638
+ obj?.toId);
1639
+ const startNode = objects.find((obj) => obj.type === 'start');
1640
+ const forms = objects.filter((obj) => obj.type === 'form');
1641
+ // Find entry points (stages connected to start node)
1642
+ const entryPointIds = connections
1643
+ .filter((conn) => conn.fromId === startNode?.id)
1644
+ .map((conn) => conn.toId);
1645
+ // Find exit points (stages with no outgoing connections)
1646
+ const exitPointIds = stages
1647
+ .filter((stage) => !connections.some((conn) => conn.fromId === stage.id))
1648
+ .map((stage) => stage.id);
1649
+ // Preserve original workflow code if it exists, otherwise generate a new one
1650
+ const code = workflowMetadata.code || this.generateCode(workflowMetadata.name);
1651
+ const workflow = {
1652
+ Id: workflowMetadata.id || '',
1653
+ id: workflowMetadata.id || '',
1654
+ Code: code,
1655
+ Name: workflowMetadata.name,
1656
+ Description: workflowMetadata.description || `Workflow for ${workflowMetadata.name}`,
1657
+ StageEntryRule: this.generateStageEntryRule(entryPointIds.length),
1658
+ Form: workflowMetadata.formId || '',
1659
+ AssignmentType: TaskAssignmentType.Queue,
1660
+ Status: Status.Active,
1661
+ Actions: connections.map((connection) => this.toBackendAction(connection, code)),
1662
+ Lanes: swimlanes.map((lane) => this.toBackendSwimlane(lane, code)),
1663
+ Stages: [],
1664
+ TenantId: workflowMetadata.tenantId || '',
1665
+ ServiceName: 'Workflow',
1666
+ CreatedAt: workflowMetadata.createdAt || new Date(),
1667
+ UpdatedAt: new Date(),
1668
+ DataState: workflowMetadata.isNew ? ObjectState.New : ObjectState.Changed,
1669
+ };
1670
+ // Map stages with entry/exit point information
1671
+ const mappedStages = stages.map((stage) => this.toBackendStage(stage, code, entryPointIds.includes(stage.id), exitPointIds.includes(stage.id), this.findSwimlaneForStage(stage, swimlanes), workflowMetadata.tenantId || ''));
1672
+ // Store stages in workflow
1673
+ workflow.Stages = mappedStages;
1674
+ return workflow;
1675
+ }
1676
+ generateCode(name) {
1677
+ return name
1678
+ .toLowerCase()
1679
+ .replace(/[^a-z0-9]+/g, '-')
1680
+ .replace(/^-+|-+$/g, '');
1681
+ }
1682
+ findSwimlaneForStage(stage, swimlanes) {
1683
+ return (swimlanes.find((lane) => stage.position.y >= lane.position.y &&
1684
+ stage.position.y <= lane.position.y + lane.size.height)?.id || '');
1685
+ }
1686
+ generateStageEntryRule(entryPointCount) {
1687
+ return entryPointCount > 1 ? 'parallel-entry' : 'single-entry';
1688
+ }
1689
+ toBackendSwimlane(frontendLane, workflow) {
1690
+ // Preserve original ID if available
1691
+ const originalId = frontendLane.originalId || '';
1692
+ return {
1693
+ Id: originalId,
1694
+ id: originalId,
1695
+ Code: frontendLane.originalCode || this.generateCode(frontendLane.label),
1696
+ Position: Math.floor(frontendLane.position.y / frontendLane.size.height),
1697
+ Workflow: workflow,
1698
+ Coordinates: {
1699
+ X: frontendLane.position.x,
1700
+ Y: frontendLane.position.y,
1701
+ },
1702
+ Size: {
1703
+ Width: frontendLane.size.width,
1704
+ Height: frontendLane.size.height,
1705
+ },
1706
+ Tags: frontendLane.tags || [], // This now correctly maps Tag[] to Tag[]
1707
+ TenantId: frontendLane.tenantId || '',
1708
+ ServiceName: 'Workflow',
1709
+ CreatedAt: frontendLane.createdAt || new Date(),
1710
+ UpdatedAt: new Date(),
1711
+ DataState: originalId ? ObjectState.Changed : ObjectState.New,
1712
+ };
1713
+ }
1714
+ toBackendStage(frontendStage, workflowId, isEntryPoint, isExitPoint, swimlaneId, tenantId) {
1715
+ const stage = frontendStage;
1716
+ const originalId = stage.originalId || '';
1717
+ return {
1718
+ Id: originalId,
1719
+ id: originalId,
1720
+ Code: stage.originalCode || this.generateCode(stage.label),
1721
+ Key: stage.id,
1722
+ Workflow: workflowId,
1723
+ Name: stage.label,
1724
+ Description: stage.description || '',
1725
+ Duration: stage.duration || 0,
1726
+ PassOnRule: stage.passOnRule || '',
1727
+ ActorRule: stage.actorRule || StageActorRule.Any,
1728
+ MinNoOfActor: stage.minNoOfActor || 1,
1729
+ IsParallel: stage.isParallel || false,
1730
+ IsEntryPoint: isEntryPoint,
1731
+ IsExitPoint: isExitPoint,
1732
+ Tags: stage.tags || [], // Now correctly maps Tag[] to Tag[]
1733
+ Form: stage.form || '',
1734
+ AllowMultiSubProcess: stage.allowMultiSubProcess || false,
1735
+ AssignmentType: stage.assignmentType ||
1736
+ TaskAssignmentType.Queue,
1737
+ SubWorkFlow: stage.subWorkflow || '',
1738
+ SwimLane: swimlaneId,
1739
+ Coordinates: {
1740
+ X: stage.position.x,
1741
+ Y: stage.position.y,
1742
+ },
1743
+ IsSubProcess: stage.isSubProcess || false,
1744
+ TenantId: tenantId,
1745
+ ServiceName: 'Workflow',
1746
+ CreatedAt: stage.createdAt || new Date(),
1747
+ UpdatedAt: new Date(),
1748
+ DataState: originalId ? ObjectState.Changed : ObjectState.New,
1749
+ };
1750
+ }
1751
+ toBackendAction(frontendAction, workflow) {
1752
+ const originalId = frontendAction.originalId || '';
1753
+ return {
1754
+ Id: originalId,
1755
+ id: originalId,
1756
+ Code: frontendAction.originalCode ||
1757
+ `${frontendAction.fromId}-to-${frontendAction.toId}`,
1758
+ Workflow: workflow,
1759
+ Name: frontendAction.label || 'Unnamed Action',
1760
+ OperationAction: null,
1761
+ FromStage: frontendAction.fromId,
1762
+ ToStage: frontendAction.toId,
1763
+ IsParallel: frontendAction.isParallel || false,
1764
+ PassOnRule: frontendAction.passOnRule || '',
1765
+ TenantId: frontendAction.tenantId || '',
1766
+ Position: frontendAction.order,
1767
+ ServiceName: 'Workflow',
1768
+ CreatedAt: frontendAction.createdAt || new Date(),
1769
+ UpdatedAt: new Date(),
1770
+ DataState: originalId ? ObjectState.Changed : ObjectState.New,
1771
+ };
1772
+ }
1773
+ // Backend to Frontend transformation
1774
+ toFrontendObjects(workflow) {
1775
+ const objects = [];
1776
+ // Create metadata object to store workflow information
1777
+ const metadata = {
1778
+ id: workflow.Id,
1779
+ code: workflow.Code,
1780
+ name: workflow.Name,
1781
+ description: workflow.Description,
1782
+ tenantId: workflow.TenantId,
1783
+ formId: workflow.Form,
1784
+ createdAt: workflow.CreatedAt,
1785
+ isNew: workflow.DataState === ObjectState.New,
1786
+ };
1787
+ // Start with the start node
1788
+ const startNode = this.createStartNode();
1789
+ objects.push(startNode);
1790
+ // Convert swimlanes
1791
+ const swimlanes = workflow.Lanes.map((lane) => this.toFrontendSwimlane(lane));
1792
+ objects.push(...swimlanes);
1793
+ // Convert stages
1794
+ const stages = workflow.Stages.map((stage) => this.toFrontendStage(stage));
1795
+ objects.push(...stages);
1796
+ // Create connections, including from start node to entry points
1797
+ const connections = this.createConnections(workflow, startNode.id, stages);
1798
+ objects.push(...connections);
1799
+ return { objects, metadata };
1800
+ }
1801
+ createStartNode() {
1802
+ return {
1803
+ id: 'start-node',
1804
+ type: 'start',
1805
+ position: { x: 50, y: 37 },
1806
+ size: { width: 58, height: 46 },
1807
+ label: 'Start',
1808
+ };
1809
+ }
1810
+ toFrontendSwimlane(backendLane) {
1811
+ // Normalize the coordinates and size
1812
+ const coordinates = backendLane.Coordinates || {
1813
+ X: 0,
1814
+ Y: backendLane.Position * 120,
1815
+ };
1816
+ const position = {
1817
+ x: coordinates.X ?? 0,
1818
+ y: coordinates.Y ?? 0,
1819
+ };
1820
+ const size = backendLane.Size || { Width: 2960, Height: 120 };
1821
+ const normalizedSize = {
1822
+ width: size.Width ?? 2960,
1823
+ height: size.Height ?? 120,
1824
+ };
1825
+ return {
1826
+ id: backendLane.Code,
1827
+ type: 'swimlane',
1828
+ position,
1829
+ size: normalizedSize,
1830
+ label: backendLane.Code,
1831
+ // Store original backend information for later use
1832
+ originalId: backendLane.Id,
1833
+ originalCode: backendLane.Code,
1834
+ tags: backendLane.Tags || [],
1835
+ tenantId: backendLane.TenantId,
1836
+ createdAt: backendLane.CreatedAt,
1837
+ };
1838
+ }
1839
+ toFrontendStage(backendStage) {
1840
+ // Normalize coordinates
1841
+ const coordinates = backendStage.Coordinates || { X: 0, Y: 0 };
1842
+ const position = {
1843
+ x: coordinates.X ?? 0,
1844
+ y: coordinates.Y ?? 0,
1845
+ };
1846
+ return {
1847
+ id: backendStage.Key || backendStage.Code,
1848
+ type: 'stage',
1849
+ position,
1850
+ size: { width: 120, height: 80 }, // Default size for stages
1851
+ label: backendStage.Name,
1852
+ // Store original backend information
1853
+ originalId: backendStage.Id,
1854
+ originalCode: backendStage.Code,
1855
+ description: backendStage.Description,
1856
+ duration: backendStage.Duration,
1857
+ passOnRule: backendStage.PassOnRule,
1858
+ actorRule: backendStage.ActorRule,
1859
+ minNoOfActor: backendStage.MinNoOfActor,
1860
+ isParallel: backendStage.IsParallel,
1861
+ isEntryPoint: backendStage.IsEntryPoint,
1862
+ isExitPoint: backendStage.IsExitPoint,
1863
+ tags: backendStage.Tags,
1864
+ forms: backendStage.Form,
1865
+ allowMultiSubProcess: backendStage.AllowMultiSubProcess,
1866
+ assignmentType: backendStage.AssignmentType,
1867
+ subWorkflow: backendStage.SubWorkFlow,
1868
+ isSubProcess: backendStage.IsSubProcess,
1869
+ tenantId: backendStage.TenantId,
1870
+ createdAt: backendStage.CreatedAt,
1871
+ };
1872
+ }
1873
+ createConnections(workflow, startNodeId, stages) {
1874
+ const connections = [];
1875
+ const actions = workflow.Actions;
1876
+ // Create connections from start node to entry points
1877
+ stages
1878
+ .filter((stage) => workflow.Stages.find((s) => s.Key === stage.id || s.Code === stage.id)
1879
+ ?.IsEntryPoint)
1880
+ .forEach((entryStage) => {
1881
+ connections.push(this.createConnection(crypto.randomUUID(), startNodeId, entryStage.id, 'Start', stages));
1882
+ });
1883
+ // Create connections between stages
1884
+ actions.forEach((action) => {
1885
+ connections.push(this.createConnection(action.Code, action.FromStage, action.ToStage, action.Name || '', stages, {
1886
+ originalId: action.Id,
1887
+ originalCode: action.Code,
1888
+ isParallel: action.IsParallel,
1889
+ passOnRule: action.PassOnRule,
1890
+ tenantId: action.TenantId,
1891
+ createdAt: action.CreatedAt,
1892
+ position: action.Position,
1893
+ }));
1894
+ });
1895
+ return connections;
1896
+ }
1897
+ createConnection(id, fromId, toId, label, stages, properties) {
1898
+ const sourceNode = stages.find((s) => s.id === fromId) || this.createStartNode();
1899
+ const targetNode = stages.find((s) => s.id === toId);
1900
+ if (!targetNode) {
1901
+ // Return a minimal connection to avoid breaking the application
1902
+ return {
1903
+ id,
1904
+ type: 'action',
1905
+ fromId,
1906
+ toId,
1907
+ label,
1908
+ position: { x: 0, y: 0 },
1909
+ size: { width: 0, height: 0 },
1910
+ points: [],
1911
+ ...properties,
1912
+ };
1913
+ }
1914
+ const points = this.connectionService.recalculateConnectionPoints(sourceNode, targetNode, []);
1915
+ return {
1916
+ id,
1917
+ type: 'action',
1918
+ fromId,
1919
+ toId,
1920
+ label,
1921
+ position: sourceNode.position,
1922
+ size: { width: 0, height: 0 },
1923
+ points,
1924
+ // Store all additional properties from backend
1925
+ originalId: properties?.originalId,
1926
+ originalCode: properties?.originalCode,
1927
+ isParallel: properties?.isParallel,
1928
+ passOnRule: properties?.passOnRule,
1929
+ tenantId: properties?.tenantId,
1930
+ createdAt: properties?.createdAt,
1931
+ properties: properties?.properties,
1932
+ order: properties?.position,
1933
+ };
1934
+ }
1935
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowMapperService, deps: [{ token: ConnectionService }], target: i0.ɵɵFactoryTarget.Injectable });
1936
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowMapperService, providedIn: 'root' });
1937
+ }
1938
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowMapperService, decorators: [{
1939
+ type: Injectable,
1940
+ args: [{
1941
+ providedIn: 'root',
1942
+ }]
1943
+ }], ctorParameters: () => [{ type: ConnectionService }] });
1944
+
1945
+ // services/workflow-persistence.service.ts
1946
+ class WorkflowPersistenceService {
1947
+ workflowState = inject(WorkflowStateService);
1948
+ mapper = inject(WorkflowMapperService);
1949
+ service = inject(WorkflowApiService);
1950
+ utilSvc = inject(UtilService);
1951
+ // Add a property to store the current workflow metadata
1952
+ currentWorkflowMetadata = {
1953
+ id: '',
1954
+ code: '',
1955
+ name: 'New Workflow',
1956
+ description: '',
1957
+ isNew: true,
1958
+ };
1959
+ // Getter for workflow metadata
1960
+ get workflowMetadata() {
1961
+ return { ...this.currentWorkflowMetadata };
1962
+ }
1963
+ // Save workflow with current metadata
1964
+ async saveWorkflow() {
1965
+ const currentObjects = this.workflowState.objects();
1966
+ const workflow = this.mapper.toBackendWorkflow(currentObjects, this.currentWorkflowMetadata);
1967
+ const results = await this.service.saveWorkflows([workflow]);
1968
+ // A failed save resolves an ErrorResponse rather than throwing. This used
1969
+ // to fall through the `results.length` check and return silently, leaving
1970
+ // the designer looking like it had saved.
1971
+ if (results instanceof ErrorResponse) {
1972
+ this.utilSvc.showError(results.ErrorMsg);
1973
+ return [];
1974
+ }
1975
+ // Update metadata with saved workflow info if successful
1976
+ if (results.length > 0) {
1977
+ const savedWorkflow = results[0];
1978
+ this.updateWorkflowMetadata({
1979
+ id: savedWorkflow.Id,
1980
+ code: savedWorkflow.Code,
1981
+ name: savedWorkflow.Name,
1982
+ description: savedWorkflow.Description,
1983
+ tenantId: savedWorkflow.TenantId,
1984
+ formId: savedWorkflow.Form,
1985
+ createdAt: savedWorkflow.CreatedAt,
1986
+ isNew: false,
1987
+ });
1988
+ }
1989
+ return results;
1990
+ }
1991
+ // Load workflow by ID
1992
+ async loadWorkflow(workflowId) {
1993
+ try {
1994
+ const data = await this.service.getWorkflowWithParam(workflowId);
1995
+ if (data instanceof ErrorResponse) {
1996
+ this.utilSvc.showError(data.ErrorMsg);
1997
+ return;
1998
+ }
1999
+ const workflow = data.Result[0];
2000
+ if (workflow) {
2001
+ const result = this.mapper.toFrontendObjects(workflow);
2002
+ // Update metadata
2003
+ this.updateWorkflowMetadata({
2004
+ id: workflow.Id,
2005
+ code: workflow.Code,
2006
+ name: workflow.Name,
2007
+ description: workflow.Description,
2008
+ tenantId: workflow.TenantId,
2009
+ formId: workflow.Form,
2010
+ createdAt: workflow.CreatedAt,
2011
+ isNew: false,
2012
+ });
2013
+ // Clear existing state and load new objects
2014
+ this.workflowState.state.set({
2015
+ objects: result.objects,
2016
+ selectedObjectId: null,
2017
+ selectedTool: null,
2018
+ });
2019
+ }
2020
+ }
2021
+ catch (error) {
2022
+ throw error;
2023
+ }
2024
+ }
2025
+ // Update workflow metadata
2026
+ updateWorkflowMetadata(metadata) {
2027
+ this.currentWorkflowMetadata = {
2028
+ ...this.currentWorkflowMetadata,
2029
+ ...metadata,
2030
+ };
2031
+ }
2032
+ // Create a new workflow
2033
+ createNewWorkflow(name, description) {
2034
+ // Reset the state
2035
+ this.workflowState.initializeWorkflow();
2036
+ // Set up new metadata
2037
+ this.updateWorkflowMetadata({
2038
+ id: '',
2039
+ code: '',
2040
+ name: name,
2041
+ description: description || `New workflow: ${name}`,
2042
+ isNew: true,
2043
+ });
2044
+ }
2045
+ // Update existing workflow
2046
+ async updateWorkflow(workflowName, description) {
2047
+ // Update metadata
2048
+ this.updateWorkflowMetadata({
2049
+ name: workflowName,
2050
+ description: description || this.currentWorkflowMetadata.description,
2051
+ });
2052
+ // Save with updated metadata
2053
+ return this.saveWorkflow();
2054
+ }
2055
+ // Load all workflows
2056
+ async loadWorkflows() {
2057
+ try {
2058
+ const data = await this.service.getWorkflows(0, 0, 'createdAt', 'ASC');
2059
+ if (data instanceof ErrorResponse) {
2060
+ this.utilSvc.showError(data.ErrorMsg);
2061
+ return [];
2062
+ }
2063
+ return data.Result;
2064
+ }
2065
+ catch (error) {
2066
+ throw error;
2067
+ }
2068
+ }
2069
+ // Load forms
2070
+ async loadForms() {
2071
+ try {
2072
+ const data = await this.service.getForms(0, 0, 'createdAt', 'ASC');
2073
+ if (data instanceof ErrorResponse) {
2074
+ this.utilSvc.showError(data.ErrorMsg);
2075
+ return [];
2076
+ }
2077
+ return data.Result;
2078
+ }
2079
+ catch (error) {
2080
+ throw error;
2081
+ }
2082
+ }
2083
+ // Load tags
2084
+ async loadTags() {
2085
+ try {
2086
+ const data = await this.service.getTags(0, 0, 'createdAt', 'ASC');
2087
+ if (data instanceof ErrorResponse) {
2088
+ this.utilSvc.showError(data.ErrorMsg);
2089
+ return [];
2090
+ }
2091
+ return data.Result;
2092
+ }
2093
+ catch (error) {
2094
+ throw error;
2095
+ }
2096
+ }
2097
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowPersistenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2098
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowPersistenceService, providedIn: 'root' });
2099
+ }
2100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowPersistenceService, decorators: [{
2101
+ type: Injectable,
2102
+ args: [{
2103
+ providedIn: 'root',
2104
+ }]
2105
+ }] });
2106
+
2107
+ // services/node-precondition.service.ts
2108
+ class NodePreconditionService {
2109
+ persistence = inject(WorkflowPersistenceService);
2110
+ preconditionRequired = new Set([
2111
+ 'form',
2112
+ 'subflow',
2113
+ 'swimlane',
2114
+ 'decision',
2115
+ ]);
2116
+ pendingNodeSignal = signal(null);
2117
+ pendingNode = this.pendingNodeSignal.asReadonly();
2118
+ // Replace mock data signals with real data signals
2119
+ formOptions = signal([]);
2120
+ workflowOptions = signal([]);
2121
+ tagOptions = signal([]);
2122
+ // Add readonly accessors
2123
+ forms = this.formOptions.asReadonly();
2124
+ workflows = this.workflowOptions.asReadonly();
2125
+ tags = this.tagOptions.asReadonly();
2126
+ // Add initialization method to load real data
2127
+ async initializeData() {
2128
+ try {
2129
+ const [forms, workflows, tags] = await Promise.all([
2130
+ this.persistence.loadForms(),
2131
+ this.persistence.loadWorkflows(),
2132
+ this.persistence.loadTags(),
2133
+ ]);
2134
+ this.formOptions.set(forms.map((form) => ({
2135
+ type: 'form',
2136
+ id: form.Id,
2137
+ name: form.Name,
2138
+ })));
2139
+ this.workflowOptions.set(workflows.map((workflow) => ({
2140
+ type: 'subflow',
2141
+ id: workflow.Id,
2142
+ name: workflow.Name,
2143
+ })));
2144
+ this.tagOptions.set(tags);
2145
+ }
2146
+ catch (error) {
2147
+ }
2148
+ }
2149
+ requiresPrecondition(type) {
2150
+ return this.preconditionRequired.has(type);
2151
+ }
2152
+ setPendingNode(type, position) {
2153
+ this.pendingNodeSignal.set({ type, position });
2154
+ }
2155
+ clearPendingNode() {
2156
+ this.pendingNodeSignal.set(null);
2157
+ }
2158
+ async getItems(type) {
2159
+ switch (type) {
2160
+ case 'form':
2161
+ return this.mapForms(await this.persistence.loadForms());
2162
+ case 'subflow':
2163
+ return this.mapWorkflows(await this.persistence.loadWorkflows());
2164
+ case 'swimlane':
2165
+ return this.mapTags(await this.persistence.loadTags());
2166
+ case 'decision':
2167
+ return this.getDecisionConditions();
2168
+ default:
2169
+ return [];
2170
+ }
2171
+ }
2172
+ mapForms(forms) {
2173
+ return forms.map((form) => ({
2174
+ type: 'form',
2175
+ id: form.Id,
2176
+ name: form.Name,
2177
+ }));
2178
+ }
2179
+ mapWorkflows(workflows) {
2180
+ return workflows.map((workflow) => ({
2181
+ type: 'subflow',
2182
+ id: workflow.Id,
2183
+ name: workflow.Name,
2184
+ }));
2185
+ }
2186
+ mapTags(tags) {
2187
+ return [
2188
+ {
2189
+ type: 'swimlane',
2190
+ tags: tags,
2191
+ },
2192
+ ];
2193
+ }
2194
+ getDecisionConditions() {
2195
+ return [
2196
+ {
2197
+ type: 'decision',
2198
+ condition: '', // Empty condition to be filled by user
2199
+ },
2200
+ ];
2201
+ }
2202
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodePreconditionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2203
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodePreconditionService, providedIn: 'root' });
2204
+ }
2205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodePreconditionService, decorators: [{
2206
+ type: Injectable,
2207
+ args: [{
2208
+ providedIn: 'root',
2209
+ }]
2210
+ }] });
2211
+
2212
+ // Update imports
2213
+ class NodeSelectorComponent {
2214
+ // Replace existing properties with these
2215
+ selectedTags = [];
2216
+ selectedFormId = '';
2217
+ selectedWorkflowId = '';
2218
+ condition = '';
2219
+ preconditionService = inject(NodePreconditionService);
2220
+ select = new EventEmitter();
2221
+ // Methods for dropdown handling
2222
+ onTagSelectionChange(event) {
2223
+ // Handle tag selection change if needed
2224
+ }
2225
+ onDropdownChange(event) {
2226
+ }
2227
+ onFormSubmit() {
2228
+ const selectedForm = this.preconditionService
2229
+ .forms()
2230
+ .find((f) => f.id === this.selectedFormId);
2231
+ if (selectedForm) {
2232
+ this.select.emit(selectedForm);
2233
+ }
2234
+ }
2235
+ onWorkflowSubmit() {
2236
+ const selectedWorkflow = this.preconditionService
2237
+ .workflows()
2238
+ .find((w) => w.id === this.selectedWorkflowId);
2239
+ if (selectedWorkflow) {
2240
+ this.select.emit(selectedWorkflow);
2241
+ }
2242
+ }
2243
+ getDialogTitle() {
2244
+ const type = this.preconditionService.pendingNode()?.type;
2245
+ switch (type) {
2246
+ case 'form':
2247
+ return 'Select Form';
2248
+ case 'subflow':
2249
+ return 'Select Workflow';
2250
+ case 'swimlane':
2251
+ return 'Select Tags';
2252
+ case 'decision':
2253
+ return 'Set Condition';
2254
+ default:
2255
+ return 'Select';
2256
+ }
2257
+ }
2258
+ onTagsSubmit() {
2259
+ this.select.emit({
2260
+ type: 'swimlane',
2261
+ id: crypto.randomUUID(),
2262
+ name: 'Swimlane',
2263
+ tags: this.selectedTags,
2264
+ });
2265
+ }
2266
+ onConditionSubmit() {
2267
+ this.select.emit({
2268
+ type: 'decision',
2269
+ id: crypto.randomUUID(),
2270
+ name: 'Decision',
2271
+ condition: this.condition,
2272
+ });
2273
+ }
2274
+ onSelect(data) {
2275
+ this.select.emit(data);
2276
+ }
2277
+ onModalClose(event) {
2278
+ this.preconditionService.clearPendingNode();
2279
+ }
2280
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2281
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: NodeSelectorComponent, isStandalone: true, selector: "wf-node-selector", outputs: { select: "select" }, ngImport: i0, template: `
2282
+ <verben-dialogue
2283
+ [isVisible]="!!preconditionService.pendingNode()"
2284
+ [showCloseIcon]="true"
2285
+ [dismissOutsideClick]="true"
2286
+ [closeOnEscape]="true"
2287
+ [size]="'small'"
2288
+ [mode]="'dialogue'"
2289
+ [customClass]="'precondition-dialogue'"
2290
+ [headerTemplate]="headerTemplate"
2291
+ [bodyTemplate]="bodyTemplate"
2292
+ (closeModal)="onModalClose($event)"
2293
+ >
2294
+ </verben-dialogue>
2295
+
2296
+ <ng-template #headerTemplate>
2297
+ <h3 class="text-lg font-semibold">{{ getDialogTitle() }}</h3>
2298
+ </ng-template>
2299
+
2300
+ <ng-template #bodyTemplate>
2301
+ <div class="p-6">
2302
+ @switch (preconditionService.pendingNode()?.type) { @case ('swimlane') {
2303
+ <div class="space-y-4">
2304
+ <verben-drop-down
2305
+ [multiselect]="true"
2306
+ display="chip"
2307
+ [required]="true"
2308
+ [filter]="true"
2309
+ [showClear]="true"
2310
+ placeholder="Select Tags"
2311
+ optionLabel="Name"
2312
+ styleClass="w-full"
2313
+ [options]="preconditionService.tags()"
2314
+ [(ngModel)]="selectedTags"
2315
+ (onChange)="onTagSelectionChange($event)"
2316
+ ></verben-drop-down>
2317
+
2318
+ <button
2319
+ class="w-full px-4 py-2 bg-purple-600 text-white rounded-md"
2320
+ [disabled]="!selectedTags.length"
2321
+ (click)="onTagsSubmit()"
2322
+ >
2323
+ Apply Tags
2324
+ </button>
2325
+ </div>
2326
+ } @case ('decision') {
2327
+ <div class="space-y-4">
2328
+ <div>
2329
+ <label class="block text-sm font-medium mb-2">Condition</label>
2330
+ <textarea
2331
+ class="w-full p-2 border rounded-md"
2332
+ rows="3"
2333
+ [(ngModel)]="condition"
2334
+ placeholder="Enter condition..."
2335
+ ></textarea>
2336
+ </div>
2337
+ <button
2338
+ class="w-full px-4 py-2 bg-purple-600 text-white rounded-md"
2339
+ [disabled]="!condition"
2340
+ (click)="onConditionSubmit()"
2341
+ >
2342
+ Apply Condition
2343
+ </button>
2344
+ </div>
2345
+ } @case ('form') {
2346
+ <div class="space-y-4">
2347
+ <verben-drop-down
2348
+ [required]="true"
2349
+ [filter]="true"
2350
+ [showClear]="true"
2351
+ placeholder="Select Form"
2352
+ optionLabel="name"
2353
+ optionValue="id"
2354
+ styleClass="w-full"
2355
+ [options]="preconditionService.forms()"
2356
+ [(ngModel)]="selectedFormId"
2357
+ (onChange)="onDropdownChange($event)"
2358
+ ></verben-drop-down>
2359
+
2360
+ <button
2361
+ class="w-full px-4 py-2 bg-purple-600 text-white rounded-md"
2362
+ [disabled]="!selectedFormId"
2363
+ (click)="onFormSubmit()"
2364
+ >
2365
+ Select Form
2366
+ </button>
2367
+ </div>
2368
+ } @default {
2369
+ <div class="space-y-4">
2370
+ <verben-drop-down
2371
+ [required]="true"
2372
+ [filter]="true"
2373
+ [showClear]="true"
2374
+ placeholder="Select Workflow"
2375
+ optionLabel="name"
2376
+ optionValue="id"
2377
+ styleClass="w-full"
2378
+ [options]="preconditionService.workflows()"
2379
+ [(ngModel)]="selectedWorkflowId"
2380
+ (onChange)="onDropdownChange($event)"
2381
+ ></verben-drop-down>
2382
+
2383
+ <button
2384
+ class="w-full px-4 py-2 bg-purple-600 text-white rounded-md"
2385
+ [disabled]="!selectedWorkflowId"
2386
+ (click)="onWorkflowSubmit()"
2387
+ >
2388
+ Select Workflow
2389
+ </button>
2390
+ </div>
2391
+ } }
2392
+ </div>
2393
+ </ng-template>
2394
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: VerbenDialogueModule }, { kind: "component", type: i1$1.VerbenDialogueComponent, selector: "verben-dialogue", inputs: ["dialogueWidth", "headerTemplate", "bodyTemplate", "footerTemplate", "showCloseIcon", "dismissOutsideClick", "closeOnEscape", "isVisible", "size", "backdropColor", "customClass", "disableFooter", "margin", "padding", "borderRadius", "dialogueBgColor", "width", "closeIconClass", "boxShadow", "enableTransition", "modalData", "mode", "position", "drawerWidth"], outputs: ["openModal", "closeModal"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: DropDownModule }, { kind: "component", type: i1$1.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "overlayWidth", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "refPageSize", "disabled", "required", "autoScrollToCurrentItem", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }] });
2395
+ }
2396
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeSelectorComponent, decorators: [{
2397
+ type: Component,
2398
+ args: [{
2399
+ selector: 'wf-node-selector',
2400
+ standalone: true,
2401
+ imports: [CommonModule, VerbenDialogueModule, FormsModule, DropDownModule],
2402
+ template: `
2403
+ <verben-dialogue
2404
+ [isVisible]="!!preconditionService.pendingNode()"
2405
+ [showCloseIcon]="true"
2406
+ [dismissOutsideClick]="true"
2407
+ [closeOnEscape]="true"
2408
+ [size]="'small'"
2409
+ [mode]="'dialogue'"
2410
+ [customClass]="'precondition-dialogue'"
2411
+ [headerTemplate]="headerTemplate"
2412
+ [bodyTemplate]="bodyTemplate"
2413
+ (closeModal)="onModalClose($event)"
2414
+ >
2415
+ </verben-dialogue>
2416
+
2417
+ <ng-template #headerTemplate>
2418
+ <h3 class="text-lg font-semibold">{{ getDialogTitle() }}</h3>
2419
+ </ng-template>
2420
+
2421
+ <ng-template #bodyTemplate>
2422
+ <div class="p-6">
2423
+ @switch (preconditionService.pendingNode()?.type) { @case ('swimlane') {
2424
+ <div class="space-y-4">
2425
+ <verben-drop-down
2426
+ [multiselect]="true"
2427
+ display="chip"
2428
+ [required]="true"
2429
+ [filter]="true"
2430
+ [showClear]="true"
2431
+ placeholder="Select Tags"
2432
+ optionLabel="Name"
2433
+ styleClass="w-full"
2434
+ [options]="preconditionService.tags()"
2435
+ [(ngModel)]="selectedTags"
2436
+ (onChange)="onTagSelectionChange($event)"
2437
+ ></verben-drop-down>
2438
+
2439
+ <button
2440
+ class="w-full px-4 py-2 bg-purple-600 text-white rounded-md"
2441
+ [disabled]="!selectedTags.length"
2442
+ (click)="onTagsSubmit()"
2443
+ >
2444
+ Apply Tags
2445
+ </button>
2446
+ </div>
2447
+ } @case ('decision') {
2448
+ <div class="space-y-4">
2449
+ <div>
2450
+ <label class="block text-sm font-medium mb-2">Condition</label>
2451
+ <textarea
2452
+ class="w-full p-2 border rounded-md"
2453
+ rows="3"
2454
+ [(ngModel)]="condition"
2455
+ placeholder="Enter condition..."
2456
+ ></textarea>
2457
+ </div>
2458
+ <button
2459
+ class="w-full px-4 py-2 bg-purple-600 text-white rounded-md"
2460
+ [disabled]="!condition"
2461
+ (click)="onConditionSubmit()"
2462
+ >
2463
+ Apply Condition
2464
+ </button>
2465
+ </div>
2466
+ } @case ('form') {
2467
+ <div class="space-y-4">
2468
+ <verben-drop-down
2469
+ [required]="true"
2470
+ [filter]="true"
2471
+ [showClear]="true"
2472
+ placeholder="Select Form"
2473
+ optionLabel="name"
2474
+ optionValue="id"
2475
+ styleClass="w-full"
2476
+ [options]="preconditionService.forms()"
2477
+ [(ngModel)]="selectedFormId"
2478
+ (onChange)="onDropdownChange($event)"
2479
+ ></verben-drop-down>
2480
+
2481
+ <button
2482
+ class="w-full px-4 py-2 bg-purple-600 text-white rounded-md"
2483
+ [disabled]="!selectedFormId"
2484
+ (click)="onFormSubmit()"
2485
+ >
2486
+ Select Form
2487
+ </button>
2488
+ </div>
2489
+ } @default {
2490
+ <div class="space-y-4">
2491
+ <verben-drop-down
2492
+ [required]="true"
2493
+ [filter]="true"
2494
+ [showClear]="true"
2495
+ placeholder="Select Workflow"
2496
+ optionLabel="name"
2497
+ optionValue="id"
2498
+ styleClass="w-full"
2499
+ [options]="preconditionService.workflows()"
2500
+ [(ngModel)]="selectedWorkflowId"
2501
+ (onChange)="onDropdownChange($event)"
2502
+ ></verben-drop-down>
2503
+
2504
+ <button
2505
+ class="w-full px-4 py-2 bg-purple-600 text-white rounded-md"
2506
+ [disabled]="!selectedWorkflowId"
2507
+ (click)="onWorkflowSubmit()"
2508
+ >
2509
+ Select Workflow
2510
+ </button>
2511
+ </div>
2512
+ } }
2513
+ </div>
2514
+ </ng-template>
2515
+ `,
2516
+ }]
2517
+ }], propDecorators: { select: [{
2518
+ type: Output
2519
+ }] } });
2520
+
2521
+ // services/viewport.service.ts
2522
+ class ViewportService {
2523
+ getCanvasPoint(event, canvasRef) {
2524
+ const rect = canvasRef.nativeElement.getBoundingClientRect();
2525
+ return {
2526
+ x: event.clientX - rect.left,
2527
+ y: event.clientY - rect.top,
2528
+ };
2529
+ }
2530
+ snapToGrid(position, gridSize) {
2531
+ return {
2532
+ x: Math.round(position.x / gridSize) * gridSize,
2533
+ y: Math.round(position.y / gridSize) * gridSize,
2534
+ };
2535
+ }
2536
+ getObjectTransform(position) {
2537
+ return `translate(${position.x}, ${position.y})`;
2538
+ }
2539
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2540
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewportService, providedIn: 'root' });
2541
+ }
2542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ViewportService, decorators: [{
2543
+ type: Injectable,
2544
+ args: [{
2545
+ providedIn: 'root',
2546
+ }]
2547
+ }] });
2548
+
2549
+ // services/position-update.service.ts
2550
+ class PositionUpdateService {
2551
+ workflowState = inject(WorkflowStateService);
2552
+ connection = inject(ConnectionService);
2553
+ updateNodeWithConnections(nodeId, newPosition) {
2554
+ // Update node position
2555
+ this.workflowState.updateObject(nodeId, { position: newPosition });
2556
+ // Update connected paths
2557
+ const connections = this.workflowState
2558
+ .connections()
2559
+ .filter((conn) => conn.fromId === nodeId || conn.toId === nodeId);
2560
+ const updates = this.getConnectionUpdates(nodeId, newPosition, connections);
2561
+ if (updates.length > 0) {
2562
+ this.workflowState.updateMultipleObjects(updates);
2563
+ }
2564
+ }
2565
+ getConnectionUpdates(nodeId, newPosition, connections) {
2566
+ return connections
2567
+ .map((conn) => {
2568
+ const sourceNode = this.workflowState.getObjectById(conn.fromId);
2569
+ const targetNode = this.workflowState.getObjectById(conn.toId);
2570
+ if (!sourceNode || !targetNode)
2571
+ return null;
2572
+ const points = this.connection.recalculateConnectionPoints(sourceNode, targetNode, conn.points);
2573
+ return {
2574
+ id: conn.id,
2575
+ changes: { points },
2576
+ };
2577
+ })
2578
+ .filter((update) => update !== null);
2579
+ }
2580
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PositionUpdateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2581
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PositionUpdateService, providedIn: 'root' });
2582
+ }
2583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PositionUpdateService, decorators: [{
2584
+ type: Injectable,
2585
+ args: [{
2586
+ providedIn: 'root',
2587
+ }]
2588
+ }] });
2589
+
2590
+ // services/node-interaction.service.ts
2591
+ class NodeInteractionService {
2592
+ viewport = inject(ViewportService);
2593
+ workflowState = inject(WorkflowStateService);
2594
+ canvasState = inject(CanvasStateService);
2595
+ positionUpdate = inject(PositionUpdateService);
2596
+ nodeFinder = inject(NodeFinderService);
2597
+ // Use nodeFinder instead of direct implementation
2598
+ findNodeAtPoint(point) {
2599
+ return this.nodeFinder.findNodeAtPoint(point);
2600
+ }
2601
+ isPointInNode(point, node) {
2602
+ return (point.x >= node.position.x &&
2603
+ point.x <= node.position.x + node.size.width &&
2604
+ point.y >= node.position.y &&
2605
+ point.y <= node.position.y + node.size.height);
2606
+ }
2607
+ startDragging(node, point) {
2608
+ if (this.isProtectedNode(node))
2609
+ return;
2610
+ this.canvasState.setDragging(true);
2611
+ this.canvasState.setDragStartPosition(point);
2612
+ this.workflowState.setSelectedObject(node.id);
2613
+ // Calculate offset from node position to click position
2614
+ this.canvasState.setDragOffset({
2615
+ x: point.x - node.position.x,
2616
+ y: point.y - node.position.y,
2617
+ });
2618
+ }
2619
+ handleDragging(currentPoint, gridSize) {
2620
+ const objectId = this.workflowState.selectedObjectId();
2621
+ if (!objectId)
2622
+ return;
2623
+ const selectedNode = this.workflowState.getObjectById(objectId);
2624
+ if (!selectedNode)
2625
+ return;
2626
+ const { dragOffset } = this.canvasState.canvasState();
2627
+ const newPosition = {
2628
+ x: currentPoint.x - dragOffset.x,
2629
+ y: currentPoint.y - dragOffset.y,
2630
+ };
2631
+ // Snap to grid
2632
+ const snappedPosition = this.viewport.snapToGrid(newPosition, gridSize);
2633
+ // Find nearest swimlane if applicable
2634
+ const nearestSwimlane = this.findNearestSwimlane(snappedPosition);
2635
+ if (nearestSwimlane) {
2636
+ snappedPosition.y =
2637
+ nearestSwimlane.position.y +
2638
+ (nearestSwimlane.size.height - selectedNode.size.height) / 2;
2639
+ }
2640
+ // Update node position
2641
+ this.workflowState.updateObject(selectedNode.id, {
2642
+ position: snappedPosition,
2643
+ });
2644
+ // Use the new service
2645
+ this.positionUpdate.updateNodeWithConnections(selectedNode.id, snappedPosition);
2646
+ }
2647
+ finalizeDragging(finalPoint) {
2648
+ const objectId = this.workflowState.selectedObjectId();
2649
+ if (!objectId)
2650
+ return;
2651
+ const selectedNode = this.workflowState.getObjectById(objectId);
2652
+ if (!selectedNode)
2653
+ return;
2654
+ // Perform any final position adjustments
2655
+ const boundedPosition = this.keepWithinBounds(selectedNode.position, this.canvasState.canvasState().width, this.canvasState.canvasState().height);
2656
+ if (boundedPosition !== selectedNode.position) {
2657
+ this.workflowState.updateObject(selectedNode.id, {
2658
+ position: boundedPosition,
2659
+ });
2660
+ }
2661
+ }
2662
+ findNearestSwimlane(position) {
2663
+ const swimlanes = this.workflowState.swimlanes();
2664
+ for (const swimlane of swimlanes) {
2665
+ if (position.y >= swimlane.position.y &&
2666
+ position.y <= swimlane.position.y + swimlane.size.height) {
2667
+ return swimlane;
2668
+ }
2669
+ }
2670
+ return null;
2671
+ }
2672
+ keepWithinBounds(position, width, height) {
2673
+ return {
2674
+ x: Math.max(0, Math.min(position.x, width - 100)), // 100 is minimum node width
2675
+ y: Math.max(0, Math.min(position.y, height - 60)), // 60 is minimum node height
2676
+ };
2677
+ }
2678
+ isProtectedNode(node) {
2679
+ return ['start', 'swimlane'].includes(node.type);
2680
+ }
2681
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeInteractionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2682
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeInteractionService, providedIn: 'root' });
2683
+ }
2684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NodeInteractionService, decorators: [{
2685
+ type: Injectable,
2686
+ args: [{
2687
+ providedIn: 'root',
2688
+ }]
2689
+ }] });
2690
+
2691
+ class SwimlaneManagementService {
2692
+ workflowState = inject(WorkflowStateService);
2693
+ canvasState = inject(CanvasStateService);
2694
+ DEFAULT_SWIMLANE_HEIGHT = 260;
2695
+ createSwimlane(clickPosition) {
2696
+ const swimlanes = this.workflowState.swimlanes();
2697
+ const canvasWidth = this.canvasState.canvasState().width;
2698
+ // Calculate the new swimlane's position
2699
+ const newPosition = this.calculateNewSwimlanePosition(clickPosition, swimlanes);
2700
+ const newSwimlane = {
2701
+ id: crypto.randomUUID(),
2702
+ type: 'swimlane',
2703
+ position: { x: 0, y: this.findNearestSwimlanePosition(clickPosition) },
2704
+ size: { width: canvasWidth - 40, height: this.DEFAULT_SWIMLANE_HEIGHT },
2705
+ label: `Swimlane ${swimlanes.length + 1}`,
2706
+ };
2707
+ this.workflowState.addObject(newSwimlane);
2708
+ this.reorderSwimlanes();
2709
+ }
2710
+ getVerticalCenterForSwimlane(swimlaneY) {
2711
+ return swimlaneY + this.DEFAULT_SWIMLANE_HEIGHT / 2;
2712
+ }
2713
+ getSwimlaneHeight() {
2714
+ return this.DEFAULT_SWIMLANE_HEIGHT;
2715
+ }
2716
+ calculateNewSwimlanePosition(clickY, swimlanes) {
2717
+ if (swimlanes.length === 0)
2718
+ return 0;
2719
+ // Sort swimlanes by vertical position
2720
+ const sortedSwimlanes = [...swimlanes].sort((a, b) => a.position.y - b.position.y);
2721
+ // Find the appropriate insertion point based on click position
2722
+ for (let i = 0; i < sortedSwimlanes.length; i++) {
2723
+ const swimlane = sortedSwimlanes[i];
2724
+ if (clickY < swimlane.position.y + swimlane.size.height / 2) {
2725
+ return i * this.DEFAULT_SWIMLANE_HEIGHT;
2726
+ }
2727
+ }
2728
+ // If click is below all existing swimlanes, add to the end
2729
+ return sortedSwimlanes.length * this.DEFAULT_SWIMLANE_HEIGHT;
2730
+ }
2731
+ // reorderSwimlanes(): void {
2732
+ // const swimlanes = [...this.workflowState.swimlanes()].sort(
2733
+ // (a, b) => a.position.y - b.position.y
2734
+ // );
2735
+ // const updates = swimlanes.map((swimlane, index) => ({
2736
+ // id: swimlane.id,
2737
+ // changes: {
2738
+ // position: { x: 0, y: index * this.DEFAULT_SWIMLANE_HEIGHT },
2739
+ // size: { ...swimlane.size },
2740
+ // },
2741
+ // }));
2742
+ // this.workflowState.updateMultipleObjects(updates);
2743
+ // }
2744
+ reorderSwimlanes() {
2745
+ const swimlanes = [...this.workflowState.swimlanes()].sort((a, b) => a.position.y - b.position.y);
2746
+ // Update positions and adjust contained nodes
2747
+ swimlanes.forEach((swimlane, index) => {
2748
+ const oldY = swimlane.position.y;
2749
+ const newY = index * this.DEFAULT_SWIMLANE_HEIGHT;
2750
+ // Update swimlane position
2751
+ this.workflowState.updateObject(swimlane.id, {
2752
+ position: { x: 0, y: newY },
2753
+ size: { ...swimlane.size, height: this.DEFAULT_SWIMLANE_HEIGHT },
2754
+ });
2755
+ // If position changed, adjust contained nodes
2756
+ if (oldY !== newY) {
2757
+ this.adjustNodesInSwimlane(swimlane.id, oldY, newY);
2758
+ }
2759
+ });
2760
+ }
2761
+ adjustNodesInSwimlane(swimlaneId, oldY, newY) {
2762
+ const nodes = this.workflowState.nodes();
2763
+ const swimlane = this.workflowState.getObjectById(swimlaneId);
2764
+ if (!swimlane)
2765
+ return;
2766
+ nodes.forEach((node) => {
2767
+ if (this.isNodeInSwimlane(node, swimlane)) {
2768
+ const relativeY = node.position.y - oldY; // Position relative to old swimlane top
2769
+ const newNodeY = newY + relativeY; // Maintain relative position in new location
2770
+ this.workflowState.updateObject(node.id, {
2771
+ position: { ...node.position, y: newNodeY },
2772
+ });
2773
+ }
2774
+ });
2775
+ }
2776
+ isNodeInSwimlane(node, swimlane) {
2777
+ return (node.position.y >= swimlane.position.y &&
2778
+ node.position.y <= swimlane.position.y + swimlane.size.height);
2779
+ }
2780
+ resizeSwimlanesForCanvas(canvasWidth) {
2781
+ const swimlanes = this.workflowState.swimlanes();
2782
+ const updates = swimlanes.map((swimlane) => ({
2783
+ id: swimlane.id,
2784
+ changes: {
2785
+ size: { width: canvasWidth - 40, height: this.DEFAULT_SWIMLANE_HEIGHT },
2786
+ },
2787
+ }));
2788
+ this.workflowState.updateMultipleObjects(updates);
2789
+ }
2790
+ getTotalHeight() {
2791
+ const swimlanes = this.workflowState.swimlanes();
2792
+ return swimlanes.length * this.DEFAULT_SWIMLANE_HEIGHT;
2793
+ }
2794
+ swapSwimlanes(swimlane1Id, swimlane2Id) {
2795
+ const swimlane1 = this.workflowState.getObjectById(swimlane1Id);
2796
+ const swimlane2 = this.workflowState.getObjectById(swimlane2Id);
2797
+ if (!swimlane1 || !swimlane2)
2798
+ return;
2799
+ const temp = swimlane1.position.y;
2800
+ this.workflowState.updateObject(swimlane1Id, {
2801
+ position: { ...swimlane1.position, y: swimlane2.position.y },
2802
+ });
2803
+ this.workflowState.updateObject(swimlane2Id, {
2804
+ position: { ...swimlane2.position, y: temp },
2805
+ });
2806
+ this.reorderSwimlanes();
2807
+ }
2808
+ findNearestSwimlanePosition(yPosition) {
2809
+ const swimlanes = this.workflowState.swimlanes();
2810
+ if (swimlanes.length === 0)
2811
+ return 0;
2812
+ const sortedSwimlanes = [...swimlanes].sort((a, b) => a.position.y - b.position.y);
2813
+ // Find the first swimlane that's below the given position
2814
+ for (let i = 0; i < sortedSwimlanes.length; i++) {
2815
+ if (sortedSwimlanes[i].position.y > yPosition) {
2816
+ return i * sortedSwimlanes[0].size.height;
2817
+ }
2818
+ }
2819
+ // If no swimlane is below, add to the end
2820
+ return sortedSwimlanes.length * sortedSwimlanes[0].size.height;
2821
+ }
2822
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimlaneManagementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2823
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimlaneManagementService, providedIn: 'root' });
2824
+ }
2825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SwimlaneManagementService, decorators: [{
2826
+ type: Injectable,
2827
+ args: [{
2828
+ providedIn: 'root',
2829
+ }]
2830
+ }] });
2831
+
2832
+ // services/workflow-facade.service.ts
2833
+ class WorkflowFacadeService {
2834
+ workflowState = inject(WorkflowStateService);
2835
+ viewport = inject(ViewportService);
2836
+ nodeInteraction = inject(NodeInteractionService);
2837
+ connection = inject(ConnectionService);
2838
+ rendering = inject(RenderingService);
2839
+ selection = inject(NodeSelectionService);
2840
+ canvasStateService = inject(CanvasStateService);
2841
+ swimlaneManagement = inject(SwimlaneManagementService);
2842
+ persistence = inject(WorkflowPersistenceService);
2843
+ segmentInteraction = inject(ConnectionSegmentInteractionService);
2844
+ preconditionService = inject(NodePreconditionService);
2845
+ // Canvas State Accessors
2846
+ canvasState = this.canvasStateService.canvasState;
2847
+ workflowObjects = this.workflowState.objects;
2848
+ selectedObjectId = this.workflowState.selectedObjectId;
2849
+ selectedTool = this.workflowState.selectedTool;
2850
+ // Filtered Object Accessors
2851
+ nodes = this.workflowState.nodes;
2852
+ swimlanes = this.workflowState.swimlanes;
2853
+ connections = this.workflowState.connections;
2854
+ // Rendering Methods
2855
+ getNodeStyle = this.rendering.getNodeStyle;
2856
+ getConnectionStyle = this.rendering.getConnectionStyle;
2857
+ getStartNodePaths = this.rendering.getStartNodePaths;
2858
+ getNodeTransforms = this.rendering.getNodeTransforms;
2859
+ getGridPattern = this.rendering.getGridPattern;
2860
+ // Connection methods
2861
+ getConnectionPath(points) {
2862
+ return this.rendering.getConnectionPath(points);
2863
+ }
2864
+ // Added these getter methods to expose connection service functionality
2865
+ getConnectionPreviewPath = () => this.connection.getPreviewPath();
2866
+ hasOutgoingConnections = (nodeId) => this.connection.hasOutgoingConnections(nodeId);
2867
+ // Segment interaction methods
2868
+ handleSegmentMouseDown(event, canvasRef, connectionId, segmentIndex) {
2869
+ const point = this.viewport.getCanvasPoint(event, canvasRef);
2870
+ this.segmentInteraction.startDragging(connectionId, segmentIndex, point);
2871
+ this.canvasStateService.setDragging(true);
2872
+ }
2873
+ getSegmentCursor(connectionId, segmentIndex) {
2874
+ return this.segmentInteraction.getSegmentCursor(connectionId, segmentIndex);
2875
+ }
2876
+ // Mouse Event Handlers
2877
+ handleMouseDown(event, canvasRef) {
2878
+ if (event.button !== 0)
2879
+ return;
2880
+ const point = this.viewport.getCanvasPoint(event, canvasRef);
2881
+ const clickedNode = this.nodeInteraction.findNodeAtPoint(point
2882
+ // this.nodes()
2883
+ );
2884
+ if (this.selectedTool() === 'action' && clickedNode) {
2885
+ this.connection.startConnection(clickedNode, point);
2886
+ }
2887
+ else if (this.selectedTool()) {
2888
+ this.handleToolPlacement(point);
2889
+ }
2890
+ else if (clickedNode) {
2891
+ if (event.target instanceof Element &&
2892
+ event.target.classList.contains('properties-indicator')) {
2893
+ // Handle properties click
2894
+ return;
2895
+ }
2896
+ this.nodeInteraction.startDragging(clickedNode, point);
2897
+ }
2898
+ else {
2899
+ this.selection.handleClickOutside(event);
2900
+ }
2901
+ }
2902
+ handleMouseMove(event, canvasRef) {
2903
+ const point = this.viewport.getCanvasPoint(event, canvasRef);
2904
+ const { isConnecting, isDragging } = this.canvasState();
2905
+ if (isConnecting) {
2906
+ this.connection.updateConnectionPreview(point);
2907
+ }
2908
+ else if (isDragging) {
2909
+ // this.nodeInteraction.handleDragging(point, this.canvasState().gridSize);
2910
+ if (this.segmentInteraction.isDragging()) {
2911
+ this.segmentInteraction.updateDragging(point);
2912
+ }
2913
+ else {
2914
+ this.nodeInteraction.handleDragging(point, this.canvasState().gridSize);
2915
+ }
2916
+ }
2917
+ }
2918
+ handleMouseUp(event, canvasRef) {
2919
+ const point = this.viewport.getCanvasPoint(event, canvasRef);
2920
+ const { isConnecting, isDragging } = this.canvasState();
2921
+ if (isConnecting) {
2922
+ this.connection.finalizeConnection(point);
2923
+ }
2924
+ else if (isDragging) {
2925
+ // this.nodeInteraction.finalizeDragging(point);
2926
+ if (this.segmentInteraction.isDragging()) {
2927
+ this.segmentInteraction.finishDragging();
2928
+ }
2929
+ else {
2930
+ this.nodeInteraction.finalizeDragging(point);
2931
+ }
2932
+ }
2933
+ this.canvasStateService.resetInteractionState();
2934
+ }
2935
+ handleMouseLeave() {
2936
+ this.canvasStateService.resetInteractionState();
2937
+ }
2938
+ // Tool and Object Management
2939
+ handleToolSelection(tool) {
2940
+ this.workflowState.setSelectedTool(tool);
2941
+ this.selection.handleToolSelection(tool);
2942
+ }
2943
+ // private handleToolPlacement(point: Position): void {
2944
+ // console.log('Tool placement triggered', {
2945
+ // selectedTool: this.selectedTool(),
2946
+ // point,
2947
+ // });
2948
+ // if (this.selectedTool() === 'swimlane') {
2949
+ // this.swimlaneManagement.createSwimlane(point.y);
2950
+ // console.log(
2951
+ // 'Swimlane created, current swimlanes:',
2952
+ // this.workflowState.swimlanes()
2953
+ // );
2954
+ // this.workflowState.setSelectedTool(null);
2955
+ // return;
2956
+ // }
2957
+ // const newNode: WorkflowObject = {
2958
+ // id: crypto.randomUUID(),
2959
+ // type: this.selectedTool()!,
2960
+ // position: this.viewport.snapToGrid(point, this.canvasState().gridSize),
2961
+ // size: this.getDefaultSize(this.selectedTool()!),
2962
+ // label: `New ${this.selectedTool()}`,
2963
+ // };
2964
+ // this.workflowState.addObject(newNode);
2965
+ // this.workflowState.setSelectedTool(null);
2966
+ // }
2967
+ handleToolPlacement(point) {
2968
+ if (!this.selectedTool())
2969
+ return;
2970
+ const nodeType = this.selectedTool();
2971
+ // Check if precondition is required
2972
+ if (this.preconditionService.requiresPrecondition(nodeType)) {
2973
+ this.preconditionService.setPendingNode(nodeType, point);
2974
+ return; // Don't create node yet
2975
+ }
2976
+ // Create node immediately if no precondition required
2977
+ this.createNode(nodeType, point);
2978
+ }
2979
+ createNode(type, position, selectedData) {
2980
+ const baseNode = {
2981
+ id: crypto.randomUUID(),
2982
+ type: type,
2983
+ position: this.viewport.snapToGrid(position, this.canvasState().gridSize),
2984
+ size: this.getDefaultSize(type),
2985
+ };
2986
+ let nodeData;
2987
+ switch (type) {
2988
+ case 'form':
2989
+ case 'subflow':
2990
+ nodeData = {
2991
+ ...baseNode,
2992
+ label: selectedData?.name || `New ${type}`,
2993
+ referenceId: selectedData?.id,
2994
+ };
2995
+ break;
2996
+ case 'swimlane':
2997
+ nodeData = {
2998
+ ...baseNode,
2999
+ label: selectedData?.name || 'Swimlane',
3000
+ tags: selectedData?.tags || [],
3001
+ order: this.workflowState.swimlanes().length, // Add order based on current swimlane count
3002
+ };
3003
+ break;
3004
+ case 'decision':
3005
+ nodeData = {
3006
+ ...baseNode,
3007
+ label: selectedData?.name || 'Decision',
3008
+ condition: selectedData?.condition || '',
3009
+ };
3010
+ break;
3011
+ default:
3012
+ nodeData = {
3013
+ ...baseNode,
3014
+ label: `New ${type}`,
3015
+ };
3016
+ }
3017
+ this.workflowState.addObject(nodeData);
3018
+ this.workflowState.setSelectedTool(null);
3019
+ }
3020
+ // Call this when a form/subflow is selected
3021
+ finalizeNodeCreation(selectedData) {
3022
+ const pendingNode = this.preconditionService.pendingNode();
3023
+ if (!pendingNode)
3024
+ return;
3025
+ this.createNode(pendingNode.type, pendingNode.position, selectedData);
3026
+ this.preconditionService.clearPendingNode();
3027
+ }
3028
+ handleSwimlaneCreation(point) {
3029
+ const swimlaneManagement = inject(SwimlaneManagementService);
3030
+ swimlaneManagement.createSwimlane(point.y);
3031
+ }
3032
+ getDefaultSize(type) {
3033
+ const sizes = {
3034
+ stage: { width: 120, height: 80 },
3035
+ action: { width: 40, height: 40 },
3036
+ form: { width: 75, height: 96 }, // Exact size from design SVG
3037
+ decision: { width: 100, height: 100 },
3038
+ subflow: { width: 120, height: 80 },
3039
+ swimlane: { width: 0, height: 0 }, // Handled separately
3040
+ start: { width: 58, height: 46 },
3041
+ };
3042
+ return sizes[type];
3043
+ }
3044
+ // Initialization
3045
+ initializeWorkflow() {
3046
+ this.workflowState.initializeWorkflow();
3047
+ }
3048
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowFacadeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3049
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowFacadeService, providedIn: 'root' });
3050
+ }
3051
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowFacadeService, decorators: [{
3052
+ type: Injectable,
3053
+ args: [{
3054
+ providedIn: 'root',
3055
+ }]
3056
+ }] });
3057
+
3058
+ // components/workflow/canvas/wf-canvas.component.ts
3059
+ class WFCanvasComponent {
3060
+ facade;
3061
+ containerRef;
3062
+ canvasRef;
3063
+ labelService = inject(LabelManagementService);
3064
+ swimlaneStats = inject(SwimlaneStatsService);
3065
+ keyboardHandler = inject(KeyboardHandlerService);
3066
+ preconditionService = inject(NodePreconditionService);
3067
+ hoveredSegment = null;
3068
+ constructor(facade) {
3069
+ this.facade = facade;
3070
+ }
3071
+ onKeyDown(event) {
3072
+ // Only handle keyboard events if the canvas is focused
3073
+ if (this.containerRef.nativeElement.contains(document.activeElement)) {
3074
+ this.keyboardHandler.handleKeyDown(event);
3075
+ }
3076
+ }
3077
+ // Add click handler to ensure the canvas can receive keyboard events
3078
+ onClick() {
3079
+ this.containerRef.nativeElement.focus();
3080
+ }
3081
+ updateLabel(objectId, newLabel) {
3082
+ this.labelService.updateLabel(objectId, newLabel);
3083
+ }
3084
+ // Event handlers
3085
+ onMouseDown(event) {
3086
+ this.facade.handleMouseDown(event, this.canvasRef);
3087
+ }
3088
+ onMouseMove(event) {
3089
+ this.facade.handleMouseMove(event, this.canvasRef);
3090
+ }
3091
+ onMouseUp(event) {
3092
+ this.facade.handleMouseUp(event, this.canvasRef);
3093
+ }
3094
+ onMouseLeave() {
3095
+ this.facade.handleMouseLeave();
3096
+ }
3097
+ onSwimlaneAddClick(event, swimlane) {
3098
+ const rect = this.canvasRef.nativeElement.getBoundingClientRect();
3099
+ const position = {
3100
+ x: event.clientX - rect.left + 20,
3101
+ y: event.clientY - rect.top,
3102
+ };
3103
+ this.swimlaneStats.openPopup(position, swimlane.id);
3104
+ }
3105
+ onPopupAction(actionId) {
3106
+ const swimlaneId = this.swimlaneStats.popupStatus().swimlaneId;
3107
+ if (!swimlaneId)
3108
+ return;
3109
+ switch (actionId) {
3110
+ case 'add-above':
3111
+ // Handle adding swimlane above
3112
+ break;
3113
+ case 'add-below':
3114
+ // Handle adding swimlane below
3115
+ break;
3116
+ case 'delete':
3117
+ // Handle deletion
3118
+ break;
3119
+ }
3120
+ }
3121
+ getSegmentPath(start, end) {
3122
+ return `M ${start.x} ${start.y} L ${end.x} ${end.y}`;
3123
+ }
3124
+ isSegmentHovered(connectionId, index) {
3125
+ return (this.hoveredSegment?.connectionId === connectionId &&
3126
+ this.hoveredSegment?.index === index);
3127
+ }
3128
+ onSegmentMouseDown(event, connectionId, segmentIndex) {
3129
+ event.stopPropagation();
3130
+ this.facade.handleSegmentMouseDown(event, this.canvasRef, connectionId, segmentIndex);
3131
+ }
3132
+ onNodeSelected(data) {
3133
+ this.facade.finalizeNodeCreation(data);
3134
+ }
3135
+ onNodeSelectionCancelled() {
3136
+ this.facade.preconditionService.clearPendingNode();
3137
+ }
3138
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WFCanvasComponent, deps: [{ token: WorkflowFacadeService }], target: i0.ɵɵFactoryTarget.Component });
3139
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: WFCanvasComponent, isStandalone: true, selector: "wf-canvas", host: { listeners: { "window:keydown": "onKeyDown($event)", "click": "onClick()" } }, viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true }, { propertyName: "canvasRef", first: true, predicate: ["canvas"], descendants: true }], ngImport: i0, template: `
3140
+ <div
3141
+ class="canvas-container"
3142
+ #container
3143
+ [class.connecting]="facade.canvasState().isConnecting"
3144
+ (mousedown)="onMouseDown($event)"
3145
+ (mousemove)="onMouseMove($event)"
3146
+ (mouseup)="onMouseUp($event)"
3147
+ (mouseleave)="onMouseLeave()"
3148
+ >
3149
+ <svg
3150
+ #canvas
3151
+ [attr.width]="facade.canvasState().width"
3152
+ [attr.height]="facade.canvasState().height"
3153
+ >
3154
+ <!-- Grid Pattern -->
3155
+ <defs>
3156
+ <pattern
3157
+ id="grid"
3158
+ [attr.width]="facade.canvasState().gridSize"
3159
+ [attr.height]="facade.canvasState().gridSize"
3160
+ patternUnits="userSpaceOnUse"
3161
+ >
3162
+ <path
3163
+ [attr.d]="facade.getGridPattern().path.d"
3164
+ [ngStyle]="facade.getGridPattern().path.style"
3165
+ />
3166
+ </pattern>
3167
+ </defs>
3168
+
3169
+ <!-- Background grid -->
3170
+ <rect width="100%" height="100%" fill="url(#grid)" />
3171
+
3172
+ <!-- Swimlanes -->
3173
+ @for (swimlane of facade.swimlanes(); track swimlane.id) {
3174
+ <g [attr.transform]="facade.getNodeTransforms(swimlane).node">
3175
+ <rect
3176
+ [attr.width]="swimlane.size.width"
3177
+ [attr.height]="swimlane.size.height"
3178
+ [ngStyle]="facade.rendering.getSwimlaneStyle()"
3179
+ />
3180
+ <!-- <text
3181
+ x="100"
3182
+ y="20"
3183
+ [ngStyle]="facade.rendering.getLabelStyle('swimlane')"
3184
+ >
3185
+ {{ swimlane.label }}
3186
+ </text> -->
3187
+ <!-- <foreignObject
3188
+ [attr.x]="labelService.getLabelPosition(swimlane).x"
3189
+ [attr.y]="labelService.getLabelPosition(swimlane).y"
3190
+ width="150"
3191
+ height="40"
3192
+ style="overflow: visible;"
3193
+ >
3194
+ <wf-label-editor
3195
+ [label]="swimlane.label || 'New Swimlane'"
3196
+ [x]="0"
3197
+ [y]="0"
3198
+ [isSwimlane]="true"
3199
+ (labelChange)="updateLabel(swimlane.id, $event)"
3200
+ />
3201
+ </foreignObject> -->
3202
+
3203
+ <!-- <g
3204
+ wf-swimlane-label
3205
+ [label]="swimlane.label"
3206
+ [count]="swimlaneStats.getNodeCount(swimlane.id)"
3207
+ [x]="20"
3208
+ [y]="swimlane.size.height - 20"
3209
+ (addClick)="onSwimlaneAddClick($event, swimlane)"
3210
+ (labelChange)="updateLabel(swimlane.id, $event)"
3211
+ /> -->
3212
+
3213
+ <g transform="translate(30, 20)">
3214
+ <g
3215
+ wf-swimlane-label
3216
+ [label]="swimlane.label"
3217
+ [count]="swimlaneStats.getNodeCount(swimlane.id)"
3218
+ (addClick)="onSwimlaneAddClick($event, swimlane)"
3219
+ (labelChange)="updateLabel(swimlane.id, $event)"
3220
+ />
3221
+ </g>
3222
+
3223
+ <!-- <foreignObject
3224
+ [attr.x]="50"
3225
+ [attr.y]="20"
3226
+ width="150"
3227
+ height="40"
3228
+ style="overflow: visible;"
3229
+ >
3230
+ <wf-label-editor
3231
+ [label]="swimlane.label || 'New Swimlane'"
3232
+ [x]="0"
3233
+ [y]="0"
3234
+ [isSwimlane]="true"
3235
+ (labelChange)="updateLabel(swimlane.id, $event)"
3236
+ />
3237
+ </foreignObject> -->
3238
+ </g>
3239
+ }
3240
+
3241
+ <!-- Connections with labels -->
3242
+ @for (connection of facade.connections(); track connection.id) {
3243
+ <g
3244
+ class="connection"
3245
+ [class.selected]="facade.selection.isSelected(connection.id)"
3246
+ >
3247
+ <!-- <path
3248
+ [attr.d]="facade.getConnectionPath(connection.points)"
3249
+ [ngStyle]="
3250
+ facade.getConnectionStyle(
3251
+ facade.selection.isSelected(connection.id)
3252
+ )
3253
+ "
3254
+ /> -->
3255
+ <!-- Complete connection path with arrowhead -->
3256
+ <path
3257
+ [attr.d]="facade.getConnectionPath(connection.points)"
3258
+ [ngStyle]="
3259
+ facade.getConnectionStyle(
3260
+ facade.selection.isSelected(connection.id)
3261
+ )
3262
+ "
3263
+ />
3264
+ <!-- Render segments -->
3265
+ @for (point of connection.points; let i = $index; track i) { @if (i <
3266
+ connection.points.length - 1) {
3267
+ <!-- Interactive segment -->
3268
+ <!-- <path
3269
+ [attr.d]="getSegmentPath(point, connection.points[i + 1])"
3270
+ [ngStyle]="
3271
+ facade.getConnectionStyle(
3272
+ facade.selection.isSelected(connection.id)
3273
+ )
3274
+ "
3275
+ [style.cursor]="facade.getSegmentCursor(connection.id, i)"
3276
+ (mousedown)="onSegmentMouseDown($event, connection.id, i)"
3277
+ class="connection-segment"
3278
+ /> -->
3279
+ <g
3280
+ class="segment-group"
3281
+ (mouseenter)="
3282
+ hoveredSegment = { connectionId: connection.id, index: i }
3283
+ "
3284
+ (mouseleave)="hoveredSegment = null"
3285
+ >
3286
+ <!-- Hit detection area -->
3287
+ <path
3288
+ [attr.d]="getSegmentPath(point, connection.points[i + 1])"
3289
+ class="segment-hitarea"
3290
+ [style.cursor]="facade.getSegmentCursor(connection.id, i)"
3291
+ (mousedown)="onSegmentMouseDown($event, connection.id, i)"
3292
+ />
3293
+
3294
+ <!-- Visible segment -->
3295
+ <path
3296
+ [attr.d]="getSegmentPath(point, connection.points[i + 1])"
3297
+ [ngStyle]="
3298
+ facade.rendering.getConnectionSegmentStyle(
3299
+ facade.selection.isSelected(connection.id),
3300
+ isSegmentHovered(connection.id, i)
3301
+ )
3302
+ "
3303
+ />
3304
+ </g>
3305
+ } }
3306
+ <!-- Connection Label -->
3307
+ @if (connection.fromId && connection.toId) {
3308
+ <foreignObject
3309
+ [attr.x]="labelService.getLabelPosition(connection).x"
3310
+ [attr.y]="labelService.getLabelPosition(connection).y"
3311
+ width="150"
3312
+ height="40"
3313
+ style="overflow: visible; pointer-events: all;"
3314
+ [attr.transform]="'translate(-10, -10)'"
3315
+ >
3316
+ <wf-label-editor
3317
+ [label]="connection.label || 'New Action'"
3318
+ [x]="0"
3319
+ [y]="0"
3320
+ [isConnection]="true"
3321
+ (labelChange)="updateLabel(connection.id, $event)"
3322
+ />
3323
+ </foreignObject>
3324
+ }
3325
+ </g>
3326
+ }
3327
+
3328
+ <!-- Nodes -->
3329
+ @for (node of facade.nodes(); track node.id) {
3330
+ <g
3331
+ [attr.transform]="facade.getNodeTransforms(node).node"
3332
+ [class.selected]="facade.selection.isSelected(node.id)"
3333
+ [class.dragging]="
3334
+ facade.canvasState().isDragging &&
3335
+ facade.selection.isSelected(node.id)
3336
+ "
3337
+ >
3338
+ @switch (node.type) { @case ('start') {
3339
+ <path
3340
+ [attr.d]="facade.getStartNodePaths().circle"
3341
+ [ngStyle]="
3342
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3343
+ "
3344
+ />
3345
+ @if (!facade.hasOutgoingConnections(node.id)) {
3346
+ <path
3347
+ [attr.d]="facade.getStartNodePaths().arrow"
3348
+ [attr.transform]="facade.getNodeTransforms(node).arrow"
3349
+ fill="#D36CFF"
3350
+ />
3351
+ } }@case ('form') {
3352
+ <path
3353
+ [attr.d]="facade.rendering.generateNodePath(node)"
3354
+ [ngStyle]="
3355
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3356
+ "
3357
+ />
3358
+ } @case ('decision') {
3359
+ <path
3360
+ [attr.d]="
3361
+ facade.rendering.getDecisionPath(
3362
+ node.size.width,
3363
+ node.size.height
3364
+ )
3365
+ "
3366
+ [ngStyle]="
3367
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3368
+ "
3369
+ />
3370
+ } @case ('subflow') {
3371
+ <path
3372
+ [attr.d]="
3373
+ facade.rendering.getSubflowPath(node.size.width, node.size.height)
3374
+ "
3375
+ [ngStyle]="
3376
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3377
+ "
3378
+ />
3379
+ } @default {
3380
+ <rect
3381
+ [attr.width]="node.size.width"
3382
+ [attr.height]="node.size.height"
3383
+ [attr.rx]="4"
3384
+ [ngStyle]="
3385
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3386
+ "
3387
+ />
3388
+ } }
3389
+
3390
+ <!-- Node label -->
3391
+ <!-- <text
3392
+ [attr.x]="node.size.width / 2"
3393
+ [attr.y]="node.size.height / 2"
3394
+ [ngStyle]="facade.rendering.getLabelStyle(node.type)"
3395
+ >
3396
+ {{ node.label }}
3397
+ </text> -->
3398
+ <foreignObject
3399
+ [attr.x]="0"
3400
+ [attr.y]="0"
3401
+ [attr.width]="node.size.width"
3402
+ [attr.height]="node.size.height"
3403
+ style="overflow: visible;"
3404
+ >
3405
+ <wf-label-editor
3406
+ [label]="node.label"
3407
+ [x]="labelService.getSVGTextPosition(node).x"
3408
+ [y]="labelService.getSVGTextPosition(node).y"
3409
+ (labelChange)="updateLabel(node.id, $event)"
3410
+ />
3411
+ </foreignObject>
3412
+ </g>
3413
+ }
3414
+
3415
+ <!-- Connection preview with arrowhead -->
3416
+ @if (facade.canvasState().connectionPreview) {
3417
+ <path
3418
+ [attr.d]="facade.getConnectionPreviewPath()"
3419
+ [ngStyle]="facade.rendering.getConnectionPreviewStyle()"
3420
+ />
3421
+ }
3422
+ </svg>
3423
+
3424
+ @if (swimlaneStats.popupStatus().isOpen) {
3425
+ <wf-swimlane-popup
3426
+ [position]="swimlaneStats.popupStatus().position"
3427
+ (close)="swimlaneStats.closePopup()"
3428
+ (actionSelected)="onPopupAction($event)"
3429
+ />
3430
+ }
3431
+ </div>
3432
+
3433
+ <wf-node-selector
3434
+ (select)="onNodeSelected($event)"
3435
+ (cancel)="onNodeSelectionCancelled()"
3436
+ />
3437
+ `, isInline: true, styles: [".canvas-container{flex:1;overflow:auto;position:relative;background:#fff;&.connecting{cursor:crosshair}}.connection{path{stroke:#d36cff;stroke-width:2;fill:none;pointer-events:none}&.selected path{stroke-width:3}}.selected{:not(text){stroke-width:3}}.dragging{cursor:grabbing}.connection{pointer-events:none}.segment-group{pointer-events:all}.segment-hitarea{stroke:transparent;stroke-width:10;fill:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: LabelEditorComponent, selector: "wf-label-editor", inputs: ["label", "x", "y", "isConnection", "isSwimlane"], outputs: ["labelChange", "openDialog"] }, { kind: "component", type: SwimlaneLabelComponent, selector: "[wf-swimlane-label]", inputs: ["label", "count"], outputs: ["addClick", "labelChange"] }, { kind: "component", type: SwimLanePopupComponent, selector: "wf-swimlane-popup", inputs: ["position"], outputs: ["close", "actionSelected"] }, { kind: "component", type: NodeSelectorComponent, selector: "wf-node-selector", outputs: ["select"] }] });
3438
+ }
3439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WFCanvasComponent, decorators: [{
3440
+ type: Component,
3441
+ args: [{ selector: 'wf-canvas', standalone: true, imports: [
3442
+ CommonModule,
3443
+ LabelEditorComponent,
3444
+ SwimlaneLabelComponent,
3445
+ SwimLanePopupComponent,
3446
+ NodeSelectorComponent,
3447
+ ], template: `
3448
+ <div
3449
+ class="canvas-container"
3450
+ #container
3451
+ [class.connecting]="facade.canvasState().isConnecting"
3452
+ (mousedown)="onMouseDown($event)"
3453
+ (mousemove)="onMouseMove($event)"
3454
+ (mouseup)="onMouseUp($event)"
3455
+ (mouseleave)="onMouseLeave()"
3456
+ >
3457
+ <svg
3458
+ #canvas
3459
+ [attr.width]="facade.canvasState().width"
3460
+ [attr.height]="facade.canvasState().height"
3461
+ >
3462
+ <!-- Grid Pattern -->
3463
+ <defs>
3464
+ <pattern
3465
+ id="grid"
3466
+ [attr.width]="facade.canvasState().gridSize"
3467
+ [attr.height]="facade.canvasState().gridSize"
3468
+ patternUnits="userSpaceOnUse"
3469
+ >
3470
+ <path
3471
+ [attr.d]="facade.getGridPattern().path.d"
3472
+ [ngStyle]="facade.getGridPattern().path.style"
3473
+ />
3474
+ </pattern>
3475
+ </defs>
3476
+
3477
+ <!-- Background grid -->
3478
+ <rect width="100%" height="100%" fill="url(#grid)" />
3479
+
3480
+ <!-- Swimlanes -->
3481
+ @for (swimlane of facade.swimlanes(); track swimlane.id) {
3482
+ <g [attr.transform]="facade.getNodeTransforms(swimlane).node">
3483
+ <rect
3484
+ [attr.width]="swimlane.size.width"
3485
+ [attr.height]="swimlane.size.height"
3486
+ [ngStyle]="facade.rendering.getSwimlaneStyle()"
3487
+ />
3488
+ <!-- <text
3489
+ x="100"
3490
+ y="20"
3491
+ [ngStyle]="facade.rendering.getLabelStyle('swimlane')"
3492
+ >
3493
+ {{ swimlane.label }}
3494
+ </text> -->
3495
+ <!-- <foreignObject
3496
+ [attr.x]="labelService.getLabelPosition(swimlane).x"
3497
+ [attr.y]="labelService.getLabelPosition(swimlane).y"
3498
+ width="150"
3499
+ height="40"
3500
+ style="overflow: visible;"
3501
+ >
3502
+ <wf-label-editor
3503
+ [label]="swimlane.label || 'New Swimlane'"
3504
+ [x]="0"
3505
+ [y]="0"
3506
+ [isSwimlane]="true"
3507
+ (labelChange)="updateLabel(swimlane.id, $event)"
3508
+ />
3509
+ </foreignObject> -->
3510
+
3511
+ <!-- <g
3512
+ wf-swimlane-label
3513
+ [label]="swimlane.label"
3514
+ [count]="swimlaneStats.getNodeCount(swimlane.id)"
3515
+ [x]="20"
3516
+ [y]="swimlane.size.height - 20"
3517
+ (addClick)="onSwimlaneAddClick($event, swimlane)"
3518
+ (labelChange)="updateLabel(swimlane.id, $event)"
3519
+ /> -->
3520
+
3521
+ <g transform="translate(30, 20)">
3522
+ <g
3523
+ wf-swimlane-label
3524
+ [label]="swimlane.label"
3525
+ [count]="swimlaneStats.getNodeCount(swimlane.id)"
3526
+ (addClick)="onSwimlaneAddClick($event, swimlane)"
3527
+ (labelChange)="updateLabel(swimlane.id, $event)"
3528
+ />
3529
+ </g>
3530
+
3531
+ <!-- <foreignObject
3532
+ [attr.x]="50"
3533
+ [attr.y]="20"
3534
+ width="150"
3535
+ height="40"
3536
+ style="overflow: visible;"
3537
+ >
3538
+ <wf-label-editor
3539
+ [label]="swimlane.label || 'New Swimlane'"
3540
+ [x]="0"
3541
+ [y]="0"
3542
+ [isSwimlane]="true"
3543
+ (labelChange)="updateLabel(swimlane.id, $event)"
3544
+ />
3545
+ </foreignObject> -->
3546
+ </g>
3547
+ }
3548
+
3549
+ <!-- Connections with labels -->
3550
+ @for (connection of facade.connections(); track connection.id) {
3551
+ <g
3552
+ class="connection"
3553
+ [class.selected]="facade.selection.isSelected(connection.id)"
3554
+ >
3555
+ <!-- <path
3556
+ [attr.d]="facade.getConnectionPath(connection.points)"
3557
+ [ngStyle]="
3558
+ facade.getConnectionStyle(
3559
+ facade.selection.isSelected(connection.id)
3560
+ )
3561
+ "
3562
+ /> -->
3563
+ <!-- Complete connection path with arrowhead -->
3564
+ <path
3565
+ [attr.d]="facade.getConnectionPath(connection.points)"
3566
+ [ngStyle]="
3567
+ facade.getConnectionStyle(
3568
+ facade.selection.isSelected(connection.id)
3569
+ )
3570
+ "
3571
+ />
3572
+ <!-- Render segments -->
3573
+ @for (point of connection.points; let i = $index; track i) { @if (i <
3574
+ connection.points.length - 1) {
3575
+ <!-- Interactive segment -->
3576
+ <!-- <path
3577
+ [attr.d]="getSegmentPath(point, connection.points[i + 1])"
3578
+ [ngStyle]="
3579
+ facade.getConnectionStyle(
3580
+ facade.selection.isSelected(connection.id)
3581
+ )
3582
+ "
3583
+ [style.cursor]="facade.getSegmentCursor(connection.id, i)"
3584
+ (mousedown)="onSegmentMouseDown($event, connection.id, i)"
3585
+ class="connection-segment"
3586
+ /> -->
3587
+ <g
3588
+ class="segment-group"
3589
+ (mouseenter)="
3590
+ hoveredSegment = { connectionId: connection.id, index: i }
3591
+ "
3592
+ (mouseleave)="hoveredSegment = null"
3593
+ >
3594
+ <!-- Hit detection area -->
3595
+ <path
3596
+ [attr.d]="getSegmentPath(point, connection.points[i + 1])"
3597
+ class="segment-hitarea"
3598
+ [style.cursor]="facade.getSegmentCursor(connection.id, i)"
3599
+ (mousedown)="onSegmentMouseDown($event, connection.id, i)"
3600
+ />
3601
+
3602
+ <!-- Visible segment -->
3603
+ <path
3604
+ [attr.d]="getSegmentPath(point, connection.points[i + 1])"
3605
+ [ngStyle]="
3606
+ facade.rendering.getConnectionSegmentStyle(
3607
+ facade.selection.isSelected(connection.id),
3608
+ isSegmentHovered(connection.id, i)
3609
+ )
3610
+ "
3611
+ />
3612
+ </g>
3613
+ } }
3614
+ <!-- Connection Label -->
3615
+ @if (connection.fromId && connection.toId) {
3616
+ <foreignObject
3617
+ [attr.x]="labelService.getLabelPosition(connection).x"
3618
+ [attr.y]="labelService.getLabelPosition(connection).y"
3619
+ width="150"
3620
+ height="40"
3621
+ style="overflow: visible; pointer-events: all;"
3622
+ [attr.transform]="'translate(-10, -10)'"
3623
+ >
3624
+ <wf-label-editor
3625
+ [label]="connection.label || 'New Action'"
3626
+ [x]="0"
3627
+ [y]="0"
3628
+ [isConnection]="true"
3629
+ (labelChange)="updateLabel(connection.id, $event)"
3630
+ />
3631
+ </foreignObject>
3632
+ }
3633
+ </g>
3634
+ }
3635
+
3636
+ <!-- Nodes -->
3637
+ @for (node of facade.nodes(); track node.id) {
3638
+ <g
3639
+ [attr.transform]="facade.getNodeTransforms(node).node"
3640
+ [class.selected]="facade.selection.isSelected(node.id)"
3641
+ [class.dragging]="
3642
+ facade.canvasState().isDragging &&
3643
+ facade.selection.isSelected(node.id)
3644
+ "
3645
+ >
3646
+ @switch (node.type) { @case ('start') {
3647
+ <path
3648
+ [attr.d]="facade.getStartNodePaths().circle"
3649
+ [ngStyle]="
3650
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3651
+ "
3652
+ />
3653
+ @if (!facade.hasOutgoingConnections(node.id)) {
3654
+ <path
3655
+ [attr.d]="facade.getStartNodePaths().arrow"
3656
+ [attr.transform]="facade.getNodeTransforms(node).arrow"
3657
+ fill="#D36CFF"
3658
+ />
3659
+ } }@case ('form') {
3660
+ <path
3661
+ [attr.d]="facade.rendering.generateNodePath(node)"
3662
+ [ngStyle]="
3663
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3664
+ "
3665
+ />
3666
+ } @case ('decision') {
3667
+ <path
3668
+ [attr.d]="
3669
+ facade.rendering.getDecisionPath(
3670
+ node.size.width,
3671
+ node.size.height
3672
+ )
3673
+ "
3674
+ [ngStyle]="
3675
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3676
+ "
3677
+ />
3678
+ } @case ('subflow') {
3679
+ <path
3680
+ [attr.d]="
3681
+ facade.rendering.getSubflowPath(node.size.width, node.size.height)
3682
+ "
3683
+ [ngStyle]="
3684
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3685
+ "
3686
+ />
3687
+ } @default {
3688
+ <rect
3689
+ [attr.width]="node.size.width"
3690
+ [attr.height]="node.size.height"
3691
+ [attr.rx]="4"
3692
+ [ngStyle]="
3693
+ facade.getNodeStyle(facade.selection.isSelected(node.id))
3694
+ "
3695
+ />
3696
+ } }
3697
+
3698
+ <!-- Node label -->
3699
+ <!-- <text
3700
+ [attr.x]="node.size.width / 2"
3701
+ [attr.y]="node.size.height / 2"
3702
+ [ngStyle]="facade.rendering.getLabelStyle(node.type)"
3703
+ >
3704
+ {{ node.label }}
3705
+ </text> -->
3706
+ <foreignObject
3707
+ [attr.x]="0"
3708
+ [attr.y]="0"
3709
+ [attr.width]="node.size.width"
3710
+ [attr.height]="node.size.height"
3711
+ style="overflow: visible;"
3712
+ >
3713
+ <wf-label-editor
3714
+ [label]="node.label"
3715
+ [x]="labelService.getSVGTextPosition(node).x"
3716
+ [y]="labelService.getSVGTextPosition(node).y"
3717
+ (labelChange)="updateLabel(node.id, $event)"
3718
+ />
3719
+ </foreignObject>
3720
+ </g>
3721
+ }
3722
+
3723
+ <!-- Connection preview with arrowhead -->
3724
+ @if (facade.canvasState().connectionPreview) {
3725
+ <path
3726
+ [attr.d]="facade.getConnectionPreviewPath()"
3727
+ [ngStyle]="facade.rendering.getConnectionPreviewStyle()"
3728
+ />
3729
+ }
3730
+ </svg>
3731
+
3732
+ @if (swimlaneStats.popupStatus().isOpen) {
3733
+ <wf-swimlane-popup
3734
+ [position]="swimlaneStats.popupStatus().position"
3735
+ (close)="swimlaneStats.closePopup()"
3736
+ (actionSelected)="onPopupAction($event)"
3737
+ />
3738
+ }
3739
+ </div>
3740
+
3741
+ <wf-node-selector
3742
+ (select)="onNodeSelected($event)"
3743
+ (cancel)="onNodeSelectionCancelled()"
3744
+ />
3745
+ `, styles: [".canvas-container{flex:1;overflow:auto;position:relative;background:#fff;&.connecting{cursor:crosshair}}.connection{path{stroke:#d36cff;stroke-width:2;fill:none;pointer-events:none}&.selected path{stroke-width:3}}.selected{:not(text){stroke-width:3}}.dragging{cursor:grabbing}.connection{pointer-events:none}.segment-group{pointer-events:all}.segment-hitarea{stroke:transparent;stroke-width:10;fill:none}\n"] }]
3746
+ }], ctorParameters: () => [{ type: WorkflowFacadeService }], propDecorators: { containerRef: [{
3747
+ type: ViewChild,
3748
+ args: ['container']
3749
+ }], canvasRef: [{
3750
+ type: ViewChild,
3751
+ args: ['canvas']
3752
+ }], onKeyDown: [{
3753
+ type: HostListener,
3754
+ args: ['window:keydown', ['$event']]
3755
+ }], onClick: [{
3756
+ type: HostListener,
3757
+ args: ['click']
3758
+ }] } });
3759
+
3760
+ // components/workflow/wf-designer.component.ts
3761
+ class WFDesignerComponent {
3762
+ workflowId = input.required();
3763
+ facade = inject(WorkflowFacadeService);
3764
+ saving = signal(false);
3765
+ // Computed signals for reactive UI
3766
+ workflowName = computed(() => this.facade.persistence.workflowMetadata.name || 'Untitled Workflow');
3767
+ workflowDescription = computed(() => this.facade.persistence.workflowMetadata.description || '');
3768
+ isSaving = this.saving.asReadonly();
3769
+ constructor() {
3770
+ this.facade.initializeWorkflow();
3771
+ }
3772
+ ngOnInit() {
3773
+ const workflowId = this.workflowId();
3774
+ if (workflowId) {
3775
+ this.loadWorkflow(workflowId);
3776
+ }
3777
+ }
3778
+ loadWorkflow(workflowId) {
3779
+ this.facade.persistence.loadWorkflow(workflowId).catch((error) => {
3780
+ // Optionally show an error notification here
3781
+ });
3782
+ }
3783
+ handleToolSelection(tool) {
3784
+ this.facade.handleToolSelection(tool);
3785
+ }
3786
+ handleSave() {
3787
+ if (this.isSaving())
3788
+ return;
3789
+ this.saving.set(true);
3790
+ this.facade.persistence
3791
+ .saveWorkflow()
3792
+ .then((results) => {
3793
+ // Optionally show a success notification
3794
+ })
3795
+ .catch((error) => {
3796
+ // Optionally show an error notification
3797
+ })
3798
+ .finally(() => {
3799
+ this.saving.set(false);
3800
+ });
3801
+ }
3802
+ handleNodeSelection(data) {
3803
+ this.facade.finalizeNodeCreation(data);
3804
+ }
3805
+ handleNodeSelectionCancel() {
3806
+ // The node selection was canceled, clear the pending node
3807
+ this.facade.preconditionService.clearPendingNode();
3808
+ }
3809
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WFDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3810
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: WFDesignerComponent, isStandalone: true, selector: "wf-designer", inputs: { workflowId: { classPropertyName: "workflowId", publicName: "workflowId", isSignal: true, isRequired: true, transformFunction: null } }, providers: [EnvironmentService], ngImport: i0, template: `
3811
+ <div class="workflow-designer">
3812
+ <div class="workflow-header">
3813
+ <h1 class="workflow-title">{{ workflowName() }}</h1>
3814
+ <p *ngIf="workflowDescription()" class="workflow-description">
3815
+ {{ workflowDescription() }}
3816
+ </p>
3817
+ </div>
3818
+
3819
+ <wf-toolbar
3820
+ [selectedTool]="facade.selectedTool()"
3821
+ (toolSelected)="handleToolSelection($event)"
3822
+ />
3823
+
3824
+ <wf-canvas />
3825
+
3826
+ <div class="workflow-actions">
3827
+ <button
3828
+ class="save-button"
3829
+ (click)="handleSave()"
3830
+ [disabled]="isSaving()"
3831
+ >
3832
+ {{ isSaving() ? 'Saving...' : 'Save' }}
3833
+ </button>
3834
+ </div>
3835
+
3836
+ <!-- Node selector dialog for forms, subflows, etc. -->
3837
+ <wf-node-selector
3838
+ (select)="handleNodeSelection($event)"
3839
+ (cancel)="handleNodeSelectionCancel()"
3840
+ />
3841
+ </div>
3842
+ `, isInline: true, styles: [".workflow-designer{display:flex;flex-direction:column;height:100vh;background:#fff}.workflow-header{padding:1rem;border-bottom:1px solid #e5e7eb}.workflow-title{font-size:1.25rem;font-weight:600;color:#111827}.workflow-description{font-size:.875rem;color:#6b7280;margin-top:.25rem}.workflow-actions{padding:.75rem;border-top:1px solid #e5e7eb;display:flex;justify-content:flex-end}.save-button{padding:.5rem 1rem;background-color:#9333ea;color:#fff;font-weight:500;border-radius:.375rem;border:none;cursor:pointer;transition:background-color .2s}.save-button:hover{background-color:#7e22ce}.save-button:disabled{background-color:#d8b4fe;cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: WFToolbarComponent, selector: "wf-toolbar", inputs: ["selectedTool"], outputs: ["toolSelected"] }, { kind: "component", type: WFCanvasComponent, selector: "wf-canvas" }, { kind: "component", type: NodeSelectorComponent, selector: "wf-node-selector", outputs: ["select"] }] });
3843
+ }
3844
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WFDesignerComponent, decorators: [{
3845
+ type: Component,
3846
+ args: [{ selector: 'wf-designer', standalone: true, imports: [
3847
+ CommonModule,
3848
+ WFToolbarComponent,
3849
+ WFCanvasComponent,
3850
+ NodeSelectorComponent,
3851
+ ], providers: [EnvironmentService], template: `
3852
+ <div class="workflow-designer">
3853
+ <div class="workflow-header">
3854
+ <h1 class="workflow-title">{{ workflowName() }}</h1>
3855
+ <p *ngIf="workflowDescription()" class="workflow-description">
3856
+ {{ workflowDescription() }}
3857
+ </p>
3858
+ </div>
3859
+
3860
+ <wf-toolbar
3861
+ [selectedTool]="facade.selectedTool()"
3862
+ (toolSelected)="handleToolSelection($event)"
3863
+ />
3864
+
3865
+ <wf-canvas />
3866
+
3867
+ <div class="workflow-actions">
3868
+ <button
3869
+ class="save-button"
3870
+ (click)="handleSave()"
3871
+ [disabled]="isSaving()"
3872
+ >
3873
+ {{ isSaving() ? 'Saving...' : 'Save' }}
3874
+ </button>
3875
+ </div>
3876
+
3877
+ <!-- Node selector dialog for forms, subflows, etc. -->
3878
+ <wf-node-selector
3879
+ (select)="handleNodeSelection($event)"
3880
+ (cancel)="handleNodeSelectionCancel()"
3881
+ />
3882
+ </div>
3883
+ `, styles: [".workflow-designer{display:flex;flex-direction:column;height:100vh;background:#fff}.workflow-header{padding:1rem;border-bottom:1px solid #e5e7eb}.workflow-title{font-size:1.25rem;font-weight:600;color:#111827}.workflow-description{font-size:.875rem;color:#6b7280;margin-top:.25rem}.workflow-actions{padding:.75rem;border-top:1px solid #e5e7eb;display:flex;justify-content:flex-end}.save-button{padding:.5rem 1rem;background-color:#9333ea;color:#fff;font-weight:500;border-radius:.375rem;border:none;cursor:pointer;transition:background-color .2s}.save-button:hover{background-color:#7e22ce}.save-button:disabled{background-color:#d8b4fe;cursor:not-allowed}\n"] }]
3884
+ }], ctorParameters: () => [] });
3885
+
3886
+ /**
3887
+ * Generated bundle index. Do not edit.
3888
+ */
3889
+
3890
+ export { LabelEditorComponent, WFDesignerComponent };
3891
+ //# sourceMappingURL=verben-workflow-ui-src-lib-components-designer.mjs.map