verben-workflow-ui 0.5.92 → 0.5.93

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 (1087) hide show
  1. package/ng-package.json +15 -0
  2. package/package.json +8 -193
  3. package/src/lib/base/core/base-data-page.facade.ts +533 -0
  4. package/src/lib/base/core/base-data-page.service.ts +222 -0
  5. package/src/lib/base/core/base-data-page.state.ts +287 -0
  6. package/src/lib/base/handlers/filter-handler.service.ts +169 -0
  7. package/src/lib/base/handlers/search-handler.service.ts +33 -0
  8. package/src/lib/base/handlers/sort-handler.service.ts +93 -0
  9. package/src/lib/base/models/api-payload.ts +13 -0
  10. package/src/lib/base/models/page-config.interface.ts +49 -0
  11. package/src/lib/base/models/page-filter-tab-option.interface.ts +20 -0
  12. package/src/lib/base/ng-package.json +6 -0
  13. package/src/lib/base/public-api.ts +16 -0
  14. package/src/lib/base/utils/column-helpers.ts +77 -0
  15. package/src/lib/components/actors/actors.columns.ts +40 -0
  16. package/src/lib/components/actors/actors.component.css +0 -0
  17. package/src/lib/components/actors/actors.component.html +320 -0
  18. package/src/lib/components/actors/actors.component.spec.ts +23 -0
  19. package/src/lib/components/actors/actors.component.ts +221 -0
  20. package/src/lib/components/actors/actors.config.ts +55 -0
  21. package/src/lib/components/actors/actors.facade.ts +71 -0
  22. package/src/lib/components/actors/actors.form.component.html +37 -0
  23. package/src/lib/components/actors/actors.form.component.ts +69 -0
  24. package/src/lib/components/actors/actors.model.ts +4 -0
  25. package/src/lib/components/actors/actors.module.ts +13 -0
  26. package/src/lib/components/actors/actors.service.ts +85 -0
  27. package/src/lib/components/actors/actors.state.ts +31 -0
  28. package/src/lib/components/actors/ng-package.json +6 -0
  29. package/src/lib/components/designer/components/label-editor.component.ts +188 -0
  30. package/src/lib/components/designer/components/node-selector.component.ts +208 -0
  31. package/src/lib/components/designer/components/swimlane-label.component.ts +102 -0
  32. package/src/lib/components/designer/components/swimlane-popup.component.ts +51 -0
  33. package/src/lib/components/designer/components/wf-canvas.component.ts +495 -0
  34. package/src/lib/components/designer/components/wf-designer.component.ts +182 -0
  35. package/src/lib/components/designer/components/wf-node.component.ts +91 -0
  36. package/src/lib/components/designer/components/wf-properties-popup.component.ts +257 -0
  37. package/src/lib/components/designer/components/wf-toolbar.component.ts +84 -0
  38. package/src/lib/components/designer/models/types.ts +132 -0
  39. package/src/lib/components/designer/ng-package.json +6 -0
  40. package/src/lib/components/designer/services/canvas-state.service.ts +63 -0
  41. package/src/lib/components/designer/services/connection-segment-interaction.service.ts +141 -0
  42. package/src/lib/components/designer/services/connection.service.ts +350 -0
  43. package/src/lib/components/designer/services/keyboard-handler.service.ts +39 -0
  44. package/src/lib/components/designer/services/label-management.service.ts +72 -0
  45. package/src/lib/components/designer/services/node-finder.service.ts +34 -0
  46. package/src/lib/components/designer/services/node-interaction.service.ts +135 -0
  47. package/src/lib/components/designer/services/node-placement.service.ts +77 -0
  48. package/src/lib/components/designer/services/node-precondition.service.ts +138 -0
  49. package/src/lib/components/designer/services/node-renderer.service.ts +97 -0
  50. package/src/lib/components/designer/services/node-selection.service.ts +110 -0
  51. package/src/lib/components/designer/services/orthogonal-router.service.ts +233 -0
  52. package/src/lib/components/designer/services/position-update.service.ts +56 -0
  53. package/src/lib/components/designer/services/rendering.service.ts +296 -0
  54. package/src/lib/components/designer/services/swimlane-management.service.ts +189 -0
  55. package/src/lib/components/designer/services/swimlane-stats.service.ts +53 -0
  56. package/src/lib/components/designer/services/tag-helper.service.ts +80 -0
  57. package/src/lib/components/designer/services/viewport.service.ts +30 -0
  58. package/src/lib/components/designer/services/wf-facade.service.ts +287 -0
  59. package/src/lib/components/designer/services/wf-mapper.service.ts +447 -0
  60. package/src/lib/components/designer/services/wf-persistence.service.ts +184 -0
  61. package/src/lib/components/designer/services/wf-state.service.ts +143 -0
  62. package/src/lib/components/expiration/expiration.component.css +0 -0
  63. package/src/lib/components/expiration/expiration.component.html +21 -0
  64. package/src/lib/components/expiration/expiration.component.spec.ts +23 -0
  65. package/src/lib/components/expiration/expiration.component.ts +52 -0
  66. package/src/lib/components/expiration/expiration.module.ts +11 -0
  67. package/src/lib/components/expiration/ng-package.json +6 -0
  68. package/src/lib/components/file-render/file-render.component.css +4 -0
  69. package/src/lib/components/file-render/file-render.component.html +21 -0
  70. package/src/lib/components/file-render/file-render.component.spec.ts +23 -0
  71. package/src/lib/components/file-render/file-render.component.ts +34 -0
  72. package/src/lib/components/file-render/file-render.module.ts +19 -0
  73. package/src/lib/components/file-render/ng-package.json +6 -0
  74. package/src/lib/components/file-upload/file-upload.component.css +0 -0
  75. package/src/lib/components/file-upload/file-upload.component.html +69 -0
  76. package/src/lib/components/file-upload/file-upload.component.spec.ts +23 -0
  77. package/src/lib/components/file-upload/file-upload.component.ts +87 -0
  78. package/src/lib/components/file-upload/file-upload.module.ts +40 -0
  79. package/src/lib/components/file-upload/ng-package.json +6 -0
  80. package/src/lib/components/flowable-status/flowable-status.columns.ts +23 -0
  81. package/src/lib/components/flowable-status/flowable-status.component.css +1 -0
  82. package/src/lib/components/flowable-status/flowable-status.component.html +166 -0
  83. package/src/lib/components/flowable-status/flowable-status.component.ts +247 -0
  84. package/src/lib/components/flowable-status/flowable-status.config.ts +54 -0
  85. package/src/lib/components/flowable-status/flowable-status.facade.ts +70 -0
  86. package/src/lib/components/flowable-status/flowable-status.form.component.html +13 -0
  87. package/src/lib/components/flowable-status/flowable-status.form.component.ts +51 -0
  88. package/src/lib/components/flowable-status/flowable-status.model.ts +3 -0
  89. package/src/lib/components/flowable-status/flowable-status.module.ts +13 -0
  90. package/src/lib/components/flowable-status/flowable-status.service.ts +39 -0
  91. package/src/lib/components/flowable-status/flowable-status.state.ts +10 -0
  92. package/src/lib/components/flowable-status/ng-package.json +6 -0
  93. package/src/lib/components/flowable-status/public-api.ts +3 -0
  94. package/src/lib/components/form-control/form-control.component.css +0 -0
  95. package/src/lib/components/form-control/form-control.component.html +254 -0
  96. package/src/lib/components/form-control/form-control.component.spec.ts +23 -0
  97. package/src/lib/components/form-control/form-control.component.ts +169 -0
  98. package/src/lib/components/form-control/form-control.module.ts +47 -0
  99. package/src/lib/components/form-control/ng-package.json +6 -0
  100. package/src/lib/components/form-group/base-table-style.ts +52 -0
  101. package/src/lib/components/form-group/form-fields/form-fields.component.css +114 -0
  102. package/src/lib/components/form-group/form-fields/form-fields.component.html +621 -0
  103. package/src/lib/components/form-group/form-fields/form-fields.component.spec.ts +23 -0
  104. package/src/lib/components/form-group/form-fields/form-fields.component.ts +1115 -0
  105. package/src/lib/components/form-group/form-fields/form-fields.module.ts +48 -0
  106. package/src/lib/components/form-group/form-fields/form-fields.service.ts +70 -0
  107. package/src/lib/components/form-group/form-fields/helper.ts +45 -0
  108. package/src/lib/components/form-group/form-group.component.css +113 -0
  109. package/src/lib/components/form-group/form-group.component.html +486 -0
  110. package/src/lib/components/form-group/form-group.component.spec.ts +22 -0
  111. package/src/lib/components/form-group/form-group.component.ts +791 -0
  112. package/src/lib/components/form-group/form-group.module.ts +54 -0
  113. package/src/lib/components/form-group/form-group.service.ts +53 -0
  114. package/src/lib/components/form-group/helper.ts +45 -0
  115. package/src/lib/components/form-group/ng-package.json +6 -0
  116. package/src/lib/components/form-response/form-response.component.css +114 -0
  117. package/src/lib/components/form-response/form-response.component.html +188 -0
  118. package/src/lib/components/form-response/form-response.component.spec.ts +23 -0
  119. package/src/lib/components/form-response/form-response.component.ts +723 -0
  120. package/src/lib/components/form-response/form-response.module.ts +48 -0
  121. package/src/lib/components/form-response/form-response.service.ts +52 -0
  122. package/src/lib/components/form-response/helper.ts +222 -0
  123. package/src/lib/components/form-response/ng-package.json +6 -0
  124. package/src/lib/components/form-timer/form-timer.component.css +0 -0
  125. package/src/lib/components/form-timer/form-timer.component.html +47 -0
  126. package/src/lib/components/form-timer/form-timer.component.spec.ts +23 -0
  127. package/src/lib/components/form-timer/form-timer.component.ts +50 -0
  128. package/src/lib/components/form-timer/form-timer.module.ts +19 -0
  129. package/src/lib/components/form-timer/ng-package.json +6 -0
  130. package/src/lib/components/form-viewer/form-viewer.component.css +4 -0
  131. package/src/lib/components/form-viewer/form-viewer.component.html +62 -0
  132. package/src/lib/components/form-viewer/form-viewer.component.spec.ts +23 -0
  133. package/src/lib/components/form-viewer/form-viewer.component.ts +31 -0
  134. package/src/lib/components/form-viewer/form-viewer.module.ts +52 -0
  135. package/src/lib/components/form-viewer/ng-package.json +6 -0
  136. package/src/lib/components/forms/base-table-style.ts +52 -0
  137. package/src/lib/components/forms/forms.component.css +126 -0
  138. package/src/lib/components/forms/forms.component.html +538 -0
  139. package/src/lib/components/forms/forms.component.spec.ts +23 -0
  140. package/src/lib/components/forms/forms.component.ts +810 -0
  141. package/src/lib/components/forms/forms.module.ts +10 -0
  142. package/src/lib/components/forms/forms.service.spec.ts +16 -0
  143. package/src/lib/components/forms/forms.service.ts +65 -0
  144. package/src/lib/components/forms/ng-package.json +6 -0
  145. package/src/lib/components/journal/journal.component.css +0 -0
  146. package/src/lib/components/journal/journal.component.html +1 -0
  147. package/src/lib/components/journal/journal.component.spec.ts +23 -0
  148. package/src/lib/components/journal/journal.component.ts +10 -0
  149. package/src/lib/components/journal/journal.module.ts +10 -0
  150. package/src/lib/components/journal/ng-package.json +6 -0
  151. package/src/lib/components/my-queue/my-queue.columns.ts +37 -0
  152. package/src/lib/components/my-queue/my-queue.component.css +8 -0
  153. package/src/lib/components/my-queue/my-queue.component.html +319 -0
  154. package/src/lib/components/my-queue/my-queue.component.spec.ts +23 -0
  155. package/src/lib/components/my-queue/my-queue.component.ts +409 -0
  156. package/src/lib/components/my-queue/my-queue.facade.ts +670 -0
  157. package/src/lib/components/my-queue/my-queue.helper.ts +71 -0
  158. package/src/lib/components/my-queue/my-queue.module.ts +27 -0
  159. package/src/lib/components/my-queue/my-queue.service.spec.ts +16 -0
  160. package/src/lib/components/my-queue/my-queue.service.ts +262 -0
  161. package/src/lib/components/my-queue/my-queue.state.ts +133 -0
  162. package/src/lib/components/my-queue/ng-package.json +6 -0
  163. package/src/lib/components/my-queue/tasks.form.component.html +162 -0
  164. package/src/lib/components/my-queue/tasks.form.component.ts +179 -0
  165. package/src/lib/components/operation-popup/ng-package.json +6 -0
  166. package/src/lib/components/operation-popup/operation-popup.component.css +1 -0
  167. package/src/lib/components/operation-popup/operation-popup.component.html +107 -0
  168. package/src/lib/components/operation-popup/operation-popup.component.ts +476 -0
  169. package/src/lib/components/operation-popup/operation-popup.facade.ts +416 -0
  170. package/src/lib/components/operation-popup/operation-popup.service.ts +120 -0
  171. package/src/lib/components/operation-popup/operation-popup.state.ts +49 -0
  172. package/src/lib/components/stage-details/ng-package.json +6 -0
  173. package/src/lib/components/stage-details/stage-details.component.css +0 -0
  174. package/src/lib/components/stage-details/stage-details.component.html +95 -0
  175. package/src/lib/components/stage-details/stage-details.component.spec.ts +23 -0
  176. package/src/lib/components/stage-details/stage-details.component.ts +43 -0
  177. package/src/lib/components/stage-details/stage-details.module.ts +11 -0
  178. package/src/lib/components/task-form/ng-package.json +6 -0
  179. package/src/lib/components/task-form/task-form.component.css +0 -0
  180. package/src/lib/components/task-form/task-form.component.html +38 -0
  181. package/src/lib/components/task-form/task-form.component.spec.ts +23 -0
  182. package/src/lib/components/task-form/task-form.component.ts +15 -0
  183. package/src/lib/components/task-form/task-form.module.ts +31 -0
  184. package/src/lib/components/task-history/ng-package.json +6 -0
  185. package/src/lib/components/task-history/task-history.component.css +334 -0
  186. package/src/lib/components/task-history/task-history.component.html +145 -0
  187. package/src/lib/components/task-history/task-history.component.spec.ts +23 -0
  188. package/src/lib/components/task-history/task-history.component.ts +232 -0
  189. package/src/lib/components/task-history/task-history.module.ts +11 -0
  190. package/src/lib/components/task-history/task-history.service.ts +32 -0
  191. package/src/lib/components/task-notification/base-table-style.ts +52 -0
  192. package/src/lib/components/task-notification/ng-package.json +6 -0
  193. package/src/lib/components/task-notification/task-notification.component.css +94 -0
  194. package/src/lib/components/task-notification/task-notification.component.html +585 -0
  195. package/src/lib/components/task-notification/task-notification.component.spec.ts +23 -0
  196. package/src/lib/components/task-notification/task-notification.component.ts +770 -0
  197. package/src/lib/components/task-notification/task-notification.module.ts +10 -0
  198. package/src/lib/components/task-notification/task-notification.service.spec.ts +16 -0
  199. package/src/lib/components/task-notification/task-notification.service.ts +397 -0
  200. package/src/lib/components/tasks/ng-package.json +6 -0
  201. package/src/lib/components/tasks/tasks.columns.ts +50 -0
  202. package/src/lib/components/tasks/tasks.component.css +4 -0
  203. package/src/lib/components/tasks/tasks.component.html +385 -0
  204. package/src/lib/components/tasks/tasks.component.spec.ts +23 -0
  205. package/src/lib/components/tasks/tasks.component.ts +211 -0
  206. package/src/lib/components/tasks/tasks.facade.ts +482 -0
  207. package/src/lib/components/tasks/tasks.form.component.html +171 -0
  208. package/src/lib/components/tasks/tasks.form.component.ts +172 -0
  209. package/src/lib/components/tasks/tasks.helper.ts +71 -0
  210. package/src/lib/components/tasks/tasks.models.ts +4 -0
  211. package/src/lib/components/tasks/tasks.module.ts +29 -0
  212. package/src/lib/components/tasks/tasks.service.spec.ts +16 -0
  213. package/src/lib/components/tasks/tasks.service.ts +215 -0
  214. package/src/lib/components/tasks/tasks.state.ts +144 -0
  215. package/src/lib/components/wf/ng-package.json +6 -0
  216. package/src/lib/components/wf/wf.columns.ts +36 -0
  217. package/src/lib/components/wf/wf.component.css +0 -0
  218. package/src/lib/components/wf/wf.component.html +35 -0
  219. package/src/lib/components/wf/wf.component.spec.ts +23 -0
  220. package/src/lib/components/wf/wf.component.ts +71 -0
  221. package/src/lib/components/wf/wf.facade.ts +266 -0
  222. package/src/lib/components/wf/wf.helper.ts +23 -0
  223. package/src/lib/components/wf/wf.module.ts +14 -0
  224. package/src/lib/components/wf/wf.service.spec.ts +16 -0
  225. package/src/lib/components/wf/wf.service.ts +98 -0
  226. package/src/lib/components/wf/wf.state.ts +99 -0
  227. package/src/lib/components/workflow/column.ts +40 -0
  228. package/src/lib/components/workflow/helper.ts +53 -0
  229. package/src/lib/components/workflow/ng-package.json +6 -0
  230. package/src/lib/components/workflow/table-style.ts +53 -0
  231. package/src/lib/components/workflow/workflow.component.css +0 -0
  232. package/src/lib/components/workflow/workflow.component.html +226 -0
  233. package/src/lib/components/workflow/workflow.component.spec.ts +23 -0
  234. package/src/lib/components/workflow/workflow.component.ts +224 -0
  235. package/src/lib/components/workflow/workflow.module.ts +11 -0
  236. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.css +9 -0
  237. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.html +56 -0
  238. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.spec.ts +23 -0
  239. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.ts +142 -0
  240. package/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.css +0 -0
  241. package/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.html +45 -0
  242. package/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.ts +83 -0
  243. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.css +7 -0
  244. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.html +89 -0
  245. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.spec.ts +23 -0
  246. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.ts +87 -0
  247. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.css +11 -0
  248. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.html +74 -0
  249. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.spec.ts +23 -0
  250. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.ts +80 -0
  251. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.css +70 -0
  252. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.html +454 -0
  253. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.spec.ts +23 -0
  254. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.ts +1629 -0
  255. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.connection-drop.spec.ts +100 -0
  256. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.css +63 -0
  257. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.html +49 -0
  258. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.spec.ts +23 -0
  259. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.ts +86 -0
  260. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.types.ts +7 -0
  261. package/src/lib/components/workflow-designer/docs/01-architecture.md +145 -0
  262. package/src/lib/components/workflow-designer/docs/02-coordinate-system.md +171 -0
  263. package/src/lib/components/workflow-designer/docs/03-data-model.md +163 -0
  264. package/src/lib/components/workflow-designer/docs/04-interactions.md +156 -0
  265. package/src/lib/components/workflow-designer/docs/05-persistence.md +117 -0
  266. package/src/lib/components/workflow-designer/docs/06-known-issues.md +181 -0
  267. package/src/lib/components/workflow-designer/docs/07-integration.md +178 -0
  268. package/src/lib/components/workflow-designer/docs/08-api-reference.md +187 -0
  269. package/src/lib/components/workflow-designer/docs/09-development.md +141 -0
  270. package/src/lib/components/workflow-designer/docs/README.md +81 -0
  271. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.css +9 -0
  272. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.html +94 -0
  273. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.spec.ts +23 -0
  274. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.ts +273 -0
  275. package/src/lib/components/workflow-designer/ng-package.json +6 -0
  276. package/src/lib/components/workflow-designer/services/connection.service.ts +324 -0
  277. package/src/lib/components/workflow-designer/services/node-management.service.ts +372 -0
  278. package/src/lib/components/workflow-designer/services/popup.service.ts +276 -0
  279. package/src/lib/components/workflow-designer/services/swimlane.service.ts +176 -0
  280. package/src/lib/components/workflow-designer/services/transformer.service.ts +316 -0
  281. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.css +0 -0
  282. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.html +208 -0
  283. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.spec.ts +23 -0
  284. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.ts +194 -0
  285. package/src/lib/components/workflow-designer/stage-node/stage-node.component.css +15 -0
  286. package/src/lib/components/workflow-designer/stage-node/stage-node.component.html +93 -0
  287. package/src/lib/components/workflow-designer/stage-node/stage-node.component.spec.ts +23 -0
  288. package/src/lib/components/workflow-designer/stage-node/stage-node.component.ts +258 -0
  289. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.css +0 -0
  290. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.html +151 -0
  291. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.spec.ts +23 -0
  292. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.ts +156 -0
  293. package/src/lib/components/workflow-designer/workflow-data.service.spec.ts +16 -0
  294. package/src/lib/components/workflow-designer/workflow-data.service.ts +290 -0
  295. package/src/lib/components/workflow-designer/workflow-designer.component.css +59 -0
  296. package/src/lib/components/workflow-designer/workflow-designer.component.html +29 -0
  297. package/src/lib/components/workflow-designer/workflow-designer.component.spec.ts +23 -0
  298. package/src/lib/components/workflow-designer/workflow-designer.component.ts +553 -0
  299. package/src/lib/components/workflow-designer/workflow-designer.models.ts +114 -0
  300. package/src/lib/components/workflow-designer/workflow-designer.module.ts +88 -0
  301. package/src/lib/components/workflow-designer/workflow-designer.state.ts +1104 -0
  302. package/src/lib/components/workflow-designer/workflow-designer.types.ts +140 -0
  303. package/src/lib/components/workflow-stage/ng-package.json +6 -0
  304. package/src/lib/components/workflow-stage/workflow-stage.component.css +24 -0
  305. package/src/lib/components/workflow-stage/workflow-stage.component.html +339 -0
  306. package/src/lib/components/workflow-stage/workflow-stage.component.spec.ts +23 -0
  307. package/src/lib/components/workflow-stage/workflow-stage.component.ts +349 -0
  308. package/src/lib/components/workflow-stage/workflow-stage.module.ts +53 -0
  309. package/src/lib/components/workflows/ng-package.json +6 -0
  310. package/src/lib/components/workflows/public-api.ts +6 -0
  311. package/src/lib/components/workflows/workflow-form/workflow-form.component.css +0 -0
  312. package/src/lib/components/workflows/workflow-form/workflow-form.component.html +138 -0
  313. package/src/lib/components/workflows/workflow-form/workflow-form.component.spec.ts +23 -0
  314. package/src/lib/components/workflows/workflow-form/workflow-form.component.ts +85 -0
  315. package/src/lib/components/workflows/workflows.api.ts +117 -0
  316. package/src/lib/components/workflows/workflows.columns.ts +41 -0
  317. package/src/lib/components/workflows/workflows.component.css +4 -0
  318. package/src/lib/components/workflows/workflows.component.html +309 -0
  319. package/src/lib/components/workflows/workflows.component.spec.ts +23 -0
  320. package/src/lib/components/workflows/workflows.component.ts +303 -0
  321. package/src/lib/components/workflows/workflows.config.ts +58 -0
  322. package/src/lib/components/workflows/workflows.facade.ts +147 -0
  323. package/src/lib/components/workflows/workflows.module.ts +14 -0
  324. package/src/lib/components/workflows/workflows.service.spec.ts +16 -0
  325. package/src/lib/components/workflows/workflows.service.ts +88 -0
  326. package/src/lib/components/workflows/workflows.state.ts +21 -0
  327. package/src/lib/models/ActionHistory.ts +19 -0
  328. package/src/lib/models/ActionType.ts +9 -0
  329. package/src/lib/models/Actor.ts +12 -0
  330. package/src/lib/models/ActorTag.ts +8 -0
  331. package/src/lib/models/Coord.ts +4 -0
  332. package/src/lib/models/DataType.ts +25 -0
  333. package/src/lib/models/EAVEntity.ts +5 -0
  334. package/src/lib/models/ErrorResponse.ts +7 -0
  335. package/src/lib/models/Escalation.ts +15 -0
  336. package/src/lib/models/EscalationCycle.ts +13 -0
  337. package/src/lib/models/EscalationStage.ts +11 -0
  338. package/src/lib/models/EscalationType.ts +5 -0
  339. package/src/lib/models/File.ts +8 -0
  340. package/src/lib/models/FilterTypes.ts +8 -0
  341. package/src/lib/models/FlowableStatus.ts +6 -0
  342. package/src/lib/models/Form.ts +14 -0
  343. package/src/lib/models/FormEntity.ts +14 -0
  344. package/src/lib/models/FormFill.ts +16 -0
  345. package/src/lib/models/FormProperty.ts +16 -0
  346. package/src/lib/models/FormValues.ts +16 -0
  347. package/src/lib/models/MailConfig.ts +13 -0
  348. package/src/lib/models/MessageConfig.ts +5 -0
  349. package/src/lib/models/MessageMedium.ts +4 -0
  350. package/src/lib/models/OperationAction.ts +15 -0
  351. package/src/lib/models/PagedResult.ts +5 -0
  352. package/src/lib/models/PeriodMode.ts +10 -0
  353. package/src/lib/models/PermissionConfig.ts +8 -0
  354. package/src/lib/models/ReportSchedule.ts +23 -0
  355. package/src/lib/models/ReportType.ts +5 -0
  356. package/src/lib/models/Resource.ts +57 -0
  357. package/src/lib/models/ResponseKeyValue.ts +5 -0
  358. package/src/lib/models/SMSConfig.ts +11 -0
  359. package/src/lib/models/SearchDynamicWrapper.ts +6 -0
  360. package/src/lib/models/SearchOperator.ts +4 -0
  361. package/src/lib/models/SearchPropertySign.ts +9 -0
  362. package/src/lib/models/SearchPropertyValue.ts +13 -0
  363. package/src/lib/models/SearchPropertyValueType.ts +9 -0
  364. package/src/lib/models/Size.ts +4 -0
  365. package/src/lib/models/SortDirection.ts +5 -0
  366. package/src/lib/models/StageActorRule.ts +6 -0
  367. package/src/lib/models/SwimLane.ts +14 -0
  368. package/src/lib/models/Tag.ts +7 -0
  369. package/src/lib/models/Task.ts +32 -0
  370. package/src/lib/models/TaskAssignmentType.ts +4 -0
  371. package/src/lib/models/TaskNotification.ts +16 -0
  372. package/src/lib/models/TaskNotificationMessageType.ts +4 -0
  373. package/src/lib/models/TaskNotificationType.ts +6 -0
  374. package/src/lib/models/TaskStatus.ts +7 -0
  375. package/src/lib/models/Workflow.ts +22 -0
  376. package/src/lib/models/WorkflowAction.ts +14 -0
  377. package/src/lib/models/WorkflowOperation.ts +7 -0
  378. package/src/lib/models/WorkflowStage.ts +27 -0
  379. package/src/lib/models/actors.ts +10 -0
  380. package/src/lib/models/auth-mechanism.ts +14 -0
  381. package/src/lib/models/base.ts +14 -0
  382. package/src/lib/models/ng-package.json +6 -0
  383. package/src/lib/models/object-state.ts +6 -0
  384. package/src/lib/models/operation-type.ts +6 -0
  385. package/src/lib/models/paged.ts +9 -0
  386. package/src/lib/models/query-params.ts +9 -0
  387. package/src/lib/models/status.ts +5 -0
  388. package/src/lib/models/task-history.ts +14 -0
  389. package/src/lib/models/user-access-request-status.ts +5 -0
  390. package/src/lib/models/user.ts +25 -0
  391. package/src/lib/pipes/async-label.pipe.spec.ts +12 -0
  392. package/src/lib/pipes/async-label.pipe.ts +30 -0
  393. package/src/lib/pipes/ng-package.json +6 -0
  394. package/src/lib/services/environment.service.spec.ts +16 -0
  395. package/src/lib/services/environment.service.ts +31 -0
  396. package/src/lib/services/http-web-request.service.spec.ts +16 -0
  397. package/src/lib/services/http-web-request.service.ts +154 -0
  398. package/src/lib/services/label.service.spec.ts +16 -0
  399. package/src/lib/services/label.service.ts +182 -0
  400. package/src/lib/services/ng-package.json +6 -0
  401. package/src/lib/services/public-api.ts +5 -0
  402. package/src/lib/services/util.service.spec.ts +16 -0
  403. package/src/lib/services/util.service.ts +72 -0
  404. package/src/lib/shared/base-table-style.ts +56 -0
  405. package/src/lib/shared/components/base-data-view.component.ts +187 -0
  406. package/src/lib/shared/components/base-model-field.ts +31 -0
  407. package/src/lib/shared/models/DataViewConfig.ts +19 -0
  408. package/src/lib/shared/ng-package.json +6 -0
  409. package/src/lib/shared/public-api.ts +14 -0
  410. package/src/lib/shared/shared.module.ts +67 -0
  411. package/src/lib/utils/index.ts +1 -0
  412. package/src/lib/utils/public-api.ts +2 -0
  413. package/src/lib/utils/store.ts +50 -0
  414. package/src/public-api.ts +56 -0
  415. package/src/styles.css +96 -0
  416. package/tailwind.config copy.js +33 -0
  417. package/tailwind.config.js +20 -0
  418. package/tsconfig.lib.json +15 -0
  419. package/tsconfig.lib.prod.json +11 -0
  420. package/tsconfig.spec.json +15 -0
  421. package/esm2022/public-api.mjs +0 -41
  422. package/esm2022/src/lib/base/core/base-data-page.facade.mjs +0 -412
  423. package/esm2022/src/lib/base/core/base-data-page.service.mjs +0 -140
  424. package/esm2022/src/lib/base/core/base-data-page.state.mjs +0 -216
  425. package/esm2022/src/lib/base/handlers/filter-handler.service.mjs +0 -138
  426. package/esm2022/src/lib/base/handlers/search-handler.service.mjs +0 -31
  427. package/esm2022/src/lib/base/handlers/sort-handler.service.mjs +0 -73
  428. package/esm2022/src/lib/base/index.mjs +0 -2
  429. package/esm2022/src/lib/base/models/api-payload.mjs +0 -7
  430. package/esm2022/src/lib/base/models/page-config.interface.mjs +0 -2
  431. package/esm2022/src/lib/base/models/page-filter-tab-option.interface.mjs +0 -2
  432. package/esm2022/src/lib/base/public-api.mjs +0 -14
  433. package/esm2022/src/lib/base/utils/column-helpers.mjs +0 -55
  434. package/esm2022/src/lib/base/verben-workflow-ui-src-lib-base.mjs +0 -5
  435. package/esm2022/src/lib/components/actors/actors.columns.mjs +0 -39
  436. package/esm2022/src/lib/components/actors/actors.component.mjs +0 -175
  437. package/esm2022/src/lib/components/actors/actors.config.mjs +0 -49
  438. package/esm2022/src/lib/components/actors/actors.facade.mjs +0 -57
  439. package/esm2022/src/lib/components/actors/actors.form.component.mjs +0 -74
  440. package/esm2022/src/lib/components/actors/actors.module.mjs +0 -21
  441. package/esm2022/src/lib/components/actors/actors.service.mjs +0 -65
  442. package/esm2022/src/lib/components/actors/actors.state.mjs +0 -31
  443. package/esm2022/src/lib/components/actors/index.mjs +0 -2
  444. package/esm2022/src/lib/components/actors/public-api.mjs +0 -3
  445. package/esm2022/src/lib/components/actors/verben-workflow-ui-src-lib-components-actors.mjs +0 -5
  446. package/esm2022/src/lib/components/designer/components/label-editor.component.mjs +0 -148
  447. package/esm2022/src/lib/components/designer/components/node-selector.component.mjs +0 -317
  448. package/esm2022/src/lib/components/designer/components/swimlane-label.component.mjs +0 -161
  449. package/esm2022/src/lib/components/designer/components/swimlane-popup.component.mjs +0 -85
  450. package/esm2022/src/lib/components/designer/components/wf-canvas.component.mjs +0 -715
  451. package/esm2022/src/lib/components/designer/components/wf-designer.component.mjs +0 -135
  452. package/esm2022/src/lib/components/designer/components/wf-toolbar.component.mjs +0 -56
  453. package/esm2022/src/lib/components/designer/index.mjs +0 -2
  454. package/esm2022/src/lib/components/designer/models/types.mjs +0 -2
  455. package/esm2022/src/lib/components/designer/public-api.mjs +0 -3
  456. package/esm2022/src/lib/components/designer/services/canvas-state.service.mjs +0 -50
  457. package/esm2022/src/lib/components/designer/services/connection-segment-interaction.service.mjs +0 -108
  458. package/esm2022/src/lib/components/designer/services/connection.service.mjs +0 -266
  459. package/esm2022/src/lib/components/designer/services/keyboard-handler.service.mjs +0 -43
  460. package/esm2022/src/lib/components/designer/services/label-management.service.mjs +0 -66
  461. package/esm2022/src/lib/components/designer/services/node-finder.service.mjs +0 -30
  462. package/esm2022/src/lib/components/designer/services/node-interaction.service.mjs +0 -108
  463. package/esm2022/src/lib/components/designer/services/node-precondition.service.mjs +0 -108
  464. package/esm2022/src/lib/components/designer/services/node-selection.service.mjs +0 -96
  465. package/esm2022/src/lib/components/designer/services/orthogonal-router.service.mjs +0 -167
  466. package/esm2022/src/lib/components/designer/services/position-update.service.mjs +0 -45
  467. package/esm2022/src/lib/components/designer/services/rendering.service.mjs +0 -236
  468. package/esm2022/src/lib/components/designer/services/swimlane-management.service.mjs +0 -145
  469. package/esm2022/src/lib/components/designer/services/swimlane-stats.service.mjs +0 -44
  470. package/esm2022/src/lib/components/designer/services/viewport.service.mjs +0 -30
  471. package/esm2022/src/lib/components/designer/services/wf-facade.service.mjs +0 -239
  472. package/esm2022/src/lib/components/designer/services/wf-mapper.service.mjs +0 -323
  473. package/esm2022/src/lib/components/designer/services/wf-persistence.service.mjs +0 -169
  474. package/esm2022/src/lib/components/designer/services/wf-state.service.mjs +0 -108
  475. package/esm2022/src/lib/components/designer/verben-workflow-ui-src-lib-components-designer.mjs +0 -5
  476. package/esm2022/src/lib/components/expiration/expiration.component.mjs +0 -49
  477. package/esm2022/src/lib/components/expiration/expiration.module.mjs +0 -19
  478. package/esm2022/src/lib/components/expiration/index.mjs +0 -2
  479. package/esm2022/src/lib/components/expiration/public-api.mjs +0 -3
  480. package/esm2022/src/lib/components/expiration/verben-workflow-ui-src-lib-components-expiration.mjs +0 -5
  481. package/esm2022/src/lib/components/file-render/file-render.component.mjs +0 -45
  482. package/esm2022/src/lib/components/file-render/file-render.module.mjs +0 -35
  483. package/esm2022/src/lib/components/file-render/index.mjs +0 -2
  484. package/esm2022/src/lib/components/file-render/public-api.mjs +0 -3
  485. package/esm2022/src/lib/components/file-render/verben-workflow-ui-src-lib-components-file-render.mjs +0 -5
  486. package/esm2022/src/lib/components/file-upload/file-upload.component.mjs +0 -93
  487. package/esm2022/src/lib/components/file-upload/file-upload.module.mjs +0 -63
  488. package/esm2022/src/lib/components/file-upload/index.mjs +0 -2
  489. package/esm2022/src/lib/components/file-upload/public-api.mjs +0 -3
  490. package/esm2022/src/lib/components/file-upload/verben-workflow-ui-src-lib-components-file-upload.mjs +0 -5
  491. package/esm2022/src/lib/components/flowable-status/flowable-status.columns.mjs +0 -21
  492. package/esm2022/src/lib/components/flowable-status/flowable-status.component.mjs +0 -203
  493. package/esm2022/src/lib/components/flowable-status/flowable-status.config.mjs +0 -47
  494. package/esm2022/src/lib/components/flowable-status/flowable-status.facade.mjs +0 -60
  495. package/esm2022/src/lib/components/flowable-status/flowable-status.form.component.mjs +0 -52
  496. package/esm2022/src/lib/components/flowable-status/flowable-status.module.mjs +0 -21
  497. package/esm2022/src/lib/components/flowable-status/flowable-status.service.mjs +0 -35
  498. package/esm2022/src/lib/components/flowable-status/flowable-status.state.mjs +0 -15
  499. package/esm2022/src/lib/components/flowable-status/index.mjs +0 -2
  500. package/esm2022/src/lib/components/flowable-status/public-api.mjs +0 -3
  501. package/esm2022/src/lib/components/flowable-status/verben-workflow-ui-src-lib-components-flowable-status.mjs +0 -5
  502. package/esm2022/src/lib/components/form-control/form-control.component.mjs +0 -155
  503. package/esm2022/src/lib/components/form-control/form-control.module.mjs +0 -75
  504. package/esm2022/src/lib/components/form-control/index.mjs +0 -2
  505. package/esm2022/src/lib/components/form-control/public-api.mjs +0 -3
  506. package/esm2022/src/lib/components/form-control/verben-workflow-ui-src-lib-components-form-control.mjs +0 -5
  507. package/esm2022/src/lib/components/form-group/base-table-style.mjs +0 -53
  508. package/esm2022/src/lib/components/form-group/form-fields/form-fields.component.mjs +0 -952
  509. package/esm2022/src/lib/components/form-group/form-fields/form-fields.module.mjs +0 -75
  510. package/esm2022/src/lib/components/form-group/form-fields/form-fields.service.mjs +0 -73
  511. package/esm2022/src/lib/components/form-group/form-group.component.mjs +0 -699
  512. package/esm2022/src/lib/components/form-group/form-group.module.mjs +0 -85
  513. package/esm2022/src/lib/components/form-group/form-group.service.mjs +0 -56
  514. package/esm2022/src/lib/components/form-group/index.mjs +0 -2
  515. package/esm2022/src/lib/components/form-group/public-api.mjs +0 -5
  516. package/esm2022/src/lib/components/form-group/verben-workflow-ui-src-lib-components-form-group.mjs +0 -5
  517. package/esm2022/src/lib/components/form-response/form-response.component.mjs +0 -641
  518. package/esm2022/src/lib/components/form-response/form-response.module.mjs +0 -76
  519. package/esm2022/src/lib/components/form-response/form-response.service.mjs +0 -54
  520. package/esm2022/src/lib/components/form-response/index.mjs +0 -2
  521. package/esm2022/src/lib/components/form-response/public-api.mjs +0 -3
  522. package/esm2022/src/lib/components/form-response/verben-workflow-ui-src-lib-components-form-response.mjs +0 -5
  523. package/esm2022/src/lib/components/form-timer/form-timer.component.mjs +0 -47
  524. package/esm2022/src/lib/components/form-timer/form-timer.module.mjs +0 -28
  525. package/esm2022/src/lib/components/form-timer/index.mjs +0 -2
  526. package/esm2022/src/lib/components/form-timer/public-api.mjs +0 -3
  527. package/esm2022/src/lib/components/form-timer/verben-workflow-ui-src-lib-components-form-timer.mjs +0 -5
  528. package/esm2022/src/lib/components/form-viewer/form-viewer.component.mjs +0 -38
  529. package/esm2022/src/lib/components/form-viewer/form-viewer.module.mjs +0 -78
  530. package/esm2022/src/lib/components/form-viewer/index.mjs +0 -2
  531. package/esm2022/src/lib/components/form-viewer/public-api.mjs +0 -3
  532. package/esm2022/src/lib/components/form-viewer/verben-workflow-ui-src-lib-components-form-viewer.mjs +0 -5
  533. package/esm2022/src/lib/components/forms/base-table-style.mjs +0 -53
  534. package/esm2022/src/lib/components/forms/forms.component.mjs +0 -673
  535. package/esm2022/src/lib/components/forms/forms.module.mjs +0 -18
  536. package/esm2022/src/lib/components/forms/forms.service.mjs +0 -68
  537. package/esm2022/src/lib/components/forms/index.mjs +0 -2
  538. package/esm2022/src/lib/components/forms/public-api.mjs +0 -3
  539. package/esm2022/src/lib/components/forms/verben-workflow-ui-src-lib-components-forms.mjs +0 -5
  540. package/esm2022/src/lib/components/journal/index.mjs +0 -2
  541. package/esm2022/src/lib/components/journal/journal.component.mjs +0 -11
  542. package/esm2022/src/lib/components/journal/journal.module.mjs +0 -18
  543. package/esm2022/src/lib/components/journal/public-api.mjs +0 -3
  544. package/esm2022/src/lib/components/journal/verben-workflow-ui-src-lib-components-journal.mjs +0 -5
  545. package/esm2022/src/lib/components/my-queue/index.mjs +0 -2
  546. package/esm2022/src/lib/components/my-queue/my-queue.columns.mjs +0 -34
  547. package/esm2022/src/lib/components/my-queue/my-queue.component.mjs +0 -342
  548. package/esm2022/src/lib/components/my-queue/my-queue.facade.mjs +0 -502
  549. package/esm2022/src/lib/components/my-queue/my-queue.module.mjs +0 -46
  550. package/esm2022/src/lib/components/my-queue/my-queue.service.mjs +0 -144
  551. package/esm2022/src/lib/components/my-queue/my-queue.state.mjs +0 -108
  552. package/esm2022/src/lib/components/my-queue/public-api.mjs +0 -4
  553. package/esm2022/src/lib/components/my-queue/tasks.form.component.mjs +0 -167
  554. package/esm2022/src/lib/components/my-queue/verben-workflow-ui-src-lib-components-my-queue.mjs +0 -5
  555. package/esm2022/src/lib/components/operation-popup/index.mjs +0 -2
  556. package/esm2022/src/lib/components/operation-popup/operation-popup.component.mjs +0 -382
  557. package/esm2022/src/lib/components/operation-popup/operation-popup.facade.mjs +0 -338
  558. package/esm2022/src/lib/components/operation-popup/operation-popup.service.mjs +0 -71
  559. package/esm2022/src/lib/components/operation-popup/operation-popup.state.mjs +0 -44
  560. package/esm2022/src/lib/components/operation-popup/public-api.mjs +0 -2
  561. package/esm2022/src/lib/components/operation-popup/verben-workflow-ui-src-lib-components-operation-popup.mjs +0 -5
  562. package/esm2022/src/lib/components/stage-details/index.mjs +0 -2
  563. package/esm2022/src/lib/components/stage-details/public-api.mjs +0 -3
  564. package/esm2022/src/lib/components/stage-details/stage-details.component.mjs +0 -49
  565. package/esm2022/src/lib/components/stage-details/stage-details.module.mjs +0 -19
  566. package/esm2022/src/lib/components/stage-details/verben-workflow-ui-src-lib-components-stage-details.mjs +0 -5
  567. package/esm2022/src/lib/components/task-form/index.mjs +0 -2
  568. package/esm2022/src/lib/components/task-form/public-api.mjs +0 -3
  569. package/esm2022/src/lib/components/task-form/task-form.component.mjs +0 -18
  570. package/esm2022/src/lib/components/task-form/task-form.module.mjs +0 -72
  571. package/esm2022/src/lib/components/task-form/verben-workflow-ui-src-lib-components-task-form.mjs +0 -5
  572. package/esm2022/src/lib/components/task-history/index.mjs +0 -2
  573. package/esm2022/src/lib/components/task-history/public-api.mjs +0 -3
  574. package/esm2022/src/lib/components/task-history/task-history.component.mjs +0 -217
  575. package/esm2022/src/lib/components/task-history/task-history.module.mjs +0 -20
  576. package/esm2022/src/lib/components/task-history/task-history.service.mjs +0 -32
  577. package/esm2022/src/lib/components/task-history/verben-workflow-ui-src-lib-components-task-history.mjs +0 -5
  578. package/esm2022/src/lib/components/task-notification/base-table-style.mjs +0 -53
  579. package/esm2022/src/lib/components/task-notification/index.mjs +0 -2
  580. package/esm2022/src/lib/components/task-notification/public-api.mjs +0 -3
  581. package/esm2022/src/lib/components/task-notification/task-notification.component.mjs +0 -670
  582. package/esm2022/src/lib/components/task-notification/task-notification.module.mjs +0 -18
  583. package/esm2022/src/lib/components/task-notification/task-notification.service.mjs +0 -256
  584. package/esm2022/src/lib/components/task-notification/verben-workflow-ui-src-lib-components-task-notification.mjs +0 -5
  585. package/esm2022/src/lib/components/tasks/index.mjs +0 -2
  586. package/esm2022/src/lib/components/tasks/public-api.mjs +0 -6
  587. package/esm2022/src/lib/components/tasks/tasks.columns.mjs +0 -48
  588. package/esm2022/src/lib/components/tasks/tasks.component.mjs +0 -193
  589. package/esm2022/src/lib/components/tasks/tasks.facade.mjs +0 -372
  590. package/esm2022/src/lib/components/tasks/tasks.form.component.mjs +0 -157
  591. package/esm2022/src/lib/components/tasks/tasks.models.mjs +0 -4
  592. package/esm2022/src/lib/components/tasks/tasks.module.mjs +0 -52
  593. package/esm2022/src/lib/components/tasks/tasks.service.mjs +0 -137
  594. package/esm2022/src/lib/components/tasks/tasks.state.mjs +0 -108
  595. package/esm2022/src/lib/components/tasks/verben-workflow-ui-src-lib-components-tasks.mjs +0 -5
  596. package/esm2022/src/lib/components/wf/index.mjs +0 -2
  597. package/esm2022/src/lib/components/wf/public-api.mjs +0 -4
  598. package/esm2022/src/lib/components/wf/verben-workflow-ui-src-lib-components-wf.mjs +0 -5
  599. package/esm2022/src/lib/components/wf/wf.columns.mjs +0 -34
  600. package/esm2022/src/lib/components/wf/wf.component.mjs +0 -68
  601. package/esm2022/src/lib/components/wf/wf.module.mjs +0 -22
  602. package/esm2022/src/lib/components/wf/wf.service.mjs +0 -82
  603. package/esm2022/src/lib/components/workflow/column.mjs +0 -38
  604. package/esm2022/src/lib/components/workflow/helper.mjs +0 -47
  605. package/esm2022/src/lib/components/workflow/index.mjs +0 -2
  606. package/esm2022/src/lib/components/workflow/public-api.mjs +0 -4
  607. package/esm2022/src/lib/components/workflow/table-style.mjs +0 -53
  608. package/esm2022/src/lib/components/workflow/verben-workflow-ui-src-lib-components-workflow.mjs +0 -5
  609. package/esm2022/src/lib/components/workflow/workflow.component.mjs +0 -210
  610. package/esm2022/src/lib/components/workflow/workflow.module.mjs +0 -19
  611. package/esm2022/src/lib/components/workflow-designer/action-dialog/action-dialog.component.mjs +0 -125
  612. package/esm2022/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.mjs +0 -78
  613. package/esm2022/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.mjs +0 -87
  614. package/esm2022/src/lib/components/workflow-designer/decision-popup/decision-popup.component.mjs +0 -84
  615. package/esm2022/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.mjs +0 -1265
  616. package/esm2022/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.mjs +0 -96
  617. package/esm2022/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.types.mjs +0 -2
  618. package/esm2022/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.mjs +0 -242
  619. package/esm2022/src/lib/components/workflow-designer/index.mjs +0 -2
  620. package/esm2022/src/lib/components/workflow-designer/public-api.mjs +0 -5
  621. package/esm2022/src/lib/components/workflow-designer/services/connection.service.mjs +0 -237
  622. package/esm2022/src/lib/components/workflow-designer/services/node-management.service.mjs +0 -321
  623. package/esm2022/src/lib/components/workflow-designer/services/popup.service.mjs +0 -240
  624. package/esm2022/src/lib/components/workflow-designer/services/swimlane.service.mjs +0 -158
  625. package/esm2022/src/lib/components/workflow-designer/services/transformer.service.mjs +0 -278
  626. package/esm2022/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.mjs +0 -177
  627. package/esm2022/src/lib/components/workflow-designer/stage-node/stage-node.component.mjs +0 -226
  628. package/esm2022/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.mjs +0 -138
  629. package/esm2022/src/lib/components/workflow-designer/verben-workflow-ui-src-lib-components-workflow-designer.mjs +0 -5
  630. package/esm2022/src/lib/components/workflow-designer/workflow-data.service.mjs +0 -210
  631. package/esm2022/src/lib/components/workflow-designer/workflow-designer.component.mjs +0 -460
  632. package/esm2022/src/lib/components/workflow-designer/workflow-designer.module.mjs +0 -126
  633. package/esm2022/src/lib/components/workflow-designer/workflow-designer.state.mjs +0 -922
  634. package/esm2022/src/lib/components/workflow-designer/workflow-designer.types.mjs +0 -2
  635. package/esm2022/src/lib/components/workflow-stage/index.mjs +0 -2
  636. package/esm2022/src/lib/components/workflow-stage/public-api.mjs +0 -3
  637. package/esm2022/src/lib/components/workflow-stage/verben-workflow-ui-src-lib-components-workflow-stage.mjs +0 -5
  638. package/esm2022/src/lib/components/workflow-stage/workflow-stage.component.mjs +0 -328
  639. package/esm2022/src/lib/components/workflow-stage/workflow-stage.module.mjs +0 -82
  640. package/esm2022/src/lib/components/workflows/index.mjs +0 -2
  641. package/esm2022/src/lib/components/workflows/public-api.mjs +0 -7
  642. package/esm2022/src/lib/components/workflows/verben-workflow-ui-src-lib-components-workflows.mjs +0 -5
  643. package/esm2022/src/lib/components/workflows/workflow-form/workflow-form.component.mjs +0 -89
  644. package/esm2022/src/lib/components/workflows/workflows.api.mjs +0 -63
  645. package/esm2022/src/lib/components/workflows/workflows.columns.mjs +0 -39
  646. package/esm2022/src/lib/components/workflows/workflows.component.mjs +0 -236
  647. package/esm2022/src/lib/components/workflows/workflows.config.mjs +0 -51
  648. package/esm2022/src/lib/components/workflows/workflows.facade.mjs +0 -114
  649. package/esm2022/src/lib/components/workflows/workflows.module.mjs +0 -21
  650. package/esm2022/src/lib/components/workflows/workflows.service.mjs +0 -63
  651. package/esm2022/src/lib/components/workflows/workflows.state.mjs +0 -23
  652. package/esm2022/src/lib/models/ActionHistory.mjs +0 -2
  653. package/esm2022/src/lib/models/ActionType.mjs +0 -11
  654. package/esm2022/src/lib/models/Actor.mjs +0 -2
  655. package/esm2022/src/lib/models/ActorTag.mjs +0 -2
  656. package/esm2022/src/lib/models/Coord.mjs +0 -2
  657. package/esm2022/src/lib/models/DataType.mjs +0 -27
  658. package/esm2022/src/lib/models/EAVEntity.mjs +0 -2
  659. package/esm2022/src/lib/models/ErrorResponse.mjs +0 -11
  660. package/esm2022/src/lib/models/Escalation.mjs +0 -2
  661. package/esm2022/src/lib/models/EscalationCycle.mjs +0 -2
  662. package/esm2022/src/lib/models/EscalationStage.mjs +0 -2
  663. package/esm2022/src/lib/models/EscalationType.mjs +0 -7
  664. package/esm2022/src/lib/models/File.mjs +0 -2
  665. package/esm2022/src/lib/models/FilterTypes.mjs +0 -9
  666. package/esm2022/src/lib/models/FlowableStatus.mjs +0 -2
  667. package/esm2022/src/lib/models/Form.mjs +0 -2
  668. package/esm2022/src/lib/models/FormEntity.mjs +0 -2
  669. package/esm2022/src/lib/models/FormFill.mjs +0 -6
  670. package/esm2022/src/lib/models/FormProperty.mjs +0 -2
  671. package/esm2022/src/lib/models/FormValues.mjs +0 -2
  672. package/esm2022/src/lib/models/MailConfig.mjs +0 -2
  673. package/esm2022/src/lib/models/MessageConfig.mjs +0 -2
  674. package/esm2022/src/lib/models/MessageMedium.mjs +0 -6
  675. package/esm2022/src/lib/models/OperationAction.mjs +0 -2
  676. package/esm2022/src/lib/models/PagedResult.mjs +0 -2
  677. package/esm2022/src/lib/models/PeriodMode.mjs +0 -12
  678. package/esm2022/src/lib/models/PermissionConfig.mjs +0 -2
  679. package/esm2022/src/lib/models/ReportSchedule.mjs +0 -2
  680. package/esm2022/src/lib/models/ReportType.mjs +0 -7
  681. package/esm2022/src/lib/models/Resource.mjs +0 -47
  682. package/esm2022/src/lib/models/ResponseKeyValue.mjs +0 -2
  683. package/esm2022/src/lib/models/SMSConfig.mjs +0 -2
  684. package/esm2022/src/lib/models/SearchDynamicWrapper.mjs +0 -2
  685. package/esm2022/src/lib/models/SearchOperator.mjs +0 -6
  686. package/esm2022/src/lib/models/SearchPropertySign.mjs +0 -11
  687. package/esm2022/src/lib/models/SearchPropertyValue.mjs +0 -2
  688. package/esm2022/src/lib/models/SearchPropertyValueType.mjs +0 -11
  689. package/esm2022/src/lib/models/Size.mjs +0 -2
  690. package/esm2022/src/lib/models/SortDirection.mjs +0 -7
  691. package/esm2022/src/lib/models/StageActorRule.mjs +0 -8
  692. package/esm2022/src/lib/models/SwimLane.mjs +0 -2
  693. package/esm2022/src/lib/models/Tag.mjs +0 -2
  694. package/esm2022/src/lib/models/Task.mjs +0 -2
  695. package/esm2022/src/lib/models/TaskAssignmentType.mjs +0 -6
  696. package/esm2022/src/lib/models/TaskNotification.mjs +0 -2
  697. package/esm2022/src/lib/models/TaskNotificationMessageType.mjs +0 -6
  698. package/esm2022/src/lib/models/TaskNotificationType.mjs +0 -8
  699. package/esm2022/src/lib/models/TaskStatus.mjs +0 -9
  700. package/esm2022/src/lib/models/Workflow.mjs +0 -2
  701. package/esm2022/src/lib/models/WorkflowAction.mjs +0 -2
  702. package/esm2022/src/lib/models/WorkflowOperation.mjs +0 -2
  703. package/esm2022/src/lib/models/WorkflowStage.mjs +0 -2
  704. package/esm2022/src/lib/models/actors.mjs +0 -2
  705. package/esm2022/src/lib/models/auth-mechanism.mjs +0 -8
  706. package/esm2022/src/lib/models/base.mjs +0 -2
  707. package/esm2022/src/lib/models/index.mjs +0 -2
  708. package/esm2022/src/lib/models/object-state.mjs +0 -8
  709. package/esm2022/src/lib/models/operation-type.mjs +0 -7
  710. package/esm2022/src/lib/models/paged.mjs +0 -2
  711. package/esm2022/src/lib/models/public-api.mjs +0 -64
  712. package/esm2022/src/lib/models/query-params.mjs +0 -2
  713. package/esm2022/src/lib/models/status.mjs +0 -6
  714. package/esm2022/src/lib/models/task-history.mjs +0 -2
  715. package/esm2022/src/lib/models/user-access-request-status.mjs +0 -7
  716. package/esm2022/src/lib/models/user.mjs +0 -2
  717. package/esm2022/src/lib/models/verben-workflow-ui-src-lib-models.mjs +0 -5
  718. package/esm2022/src/lib/pipes/async-label.pipe.mjs +0 -25
  719. package/esm2022/src/lib/pipes/index.mjs +0 -2
  720. package/esm2022/src/lib/pipes/public-api.mjs +0 -2
  721. package/esm2022/src/lib/pipes/verben-workflow-ui-src-lib-pipes.mjs +0 -5
  722. package/esm2022/src/lib/services/environment.service.mjs +0 -26
  723. package/esm2022/src/lib/services/http-web-request.service.mjs +0 -92
  724. package/esm2022/src/lib/services/index.mjs +0 -2
  725. package/esm2022/src/lib/services/label.service.mjs +0 -134
  726. package/esm2022/src/lib/services/public-api.mjs +0 -5
  727. package/esm2022/src/lib/services/util.service.mjs +0 -73
  728. package/esm2022/src/lib/services/verben-workflow-ui-src-lib-services.mjs +0 -5
  729. package/esm2022/src/lib/shared/base-table-style.mjs +0 -55
  730. package/esm2022/src/lib/shared/components/base-data-view.component.mjs +0 -154
  731. package/esm2022/src/lib/shared/components/base-model-field.mjs +0 -21
  732. package/esm2022/src/lib/shared/index.mjs +0 -7
  733. package/esm2022/src/lib/shared/models/DataViewConfig.mjs +0 -2
  734. package/esm2022/src/lib/shared/public-api.mjs +0 -13
  735. package/esm2022/src/lib/shared/shared.module.mjs +0 -103
  736. package/esm2022/src/lib/shared/verben-workflow-ui-src-lib-shared.mjs +0 -5
  737. package/esm2022/verben-workflow-ui.mjs +0 -5
  738. package/fesm2022/verben-workflow-ui-src-lib-base.mjs +0 -1055
  739. package/fesm2022/verben-workflow-ui-src-lib-base.mjs.map +0 -1
  740. package/fesm2022/verben-workflow-ui-src-lib-components-actors.mjs +0 -484
  741. package/fesm2022/verben-workflow-ui-src-lib-components-actors.mjs.map +0 -1
  742. package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs +0 -3887
  743. package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs.map +0 -1
  744. package/fesm2022/verben-workflow-ui-src-lib-components-expiration.mjs +0 -72
  745. package/fesm2022/verben-workflow-ui-src-lib-components-expiration.mjs.map +0 -1
  746. package/fesm2022/verben-workflow-ui-src-lib-components-file-render.mjs +0 -83
  747. package/fesm2022/verben-workflow-ui-src-lib-components-file-render.mjs.map +0 -1
  748. package/fesm2022/verben-workflow-ui-src-lib-components-file-upload.mjs +0 -159
  749. package/fesm2022/verben-workflow-ui-src-lib-components-file-upload.mjs.map +0 -1
  750. package/fesm2022/verben-workflow-ui-src-lib-components-flowable-status.mjs +0 -430
  751. package/fesm2022/verben-workflow-ui-src-lib-components-flowable-status.mjs.map +0 -1
  752. package/fesm2022/verben-workflow-ui-src-lib-components-form-control.mjs +0 -232
  753. package/fesm2022/verben-workflow-ui-src-lib-components-form-control.mjs.map +0 -1
  754. package/fesm2022/verben-workflow-ui-src-lib-components-form-group.mjs +0 -1967
  755. package/fesm2022/verben-workflow-ui-src-lib-components-form-group.mjs.map +0 -1
  756. package/fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs +0 -769
  757. package/fesm2022/verben-workflow-ui-src-lib-components-form-response.mjs.map +0 -1
  758. package/fesm2022/verben-workflow-ui-src-lib-components-form-timer.mjs +0 -78
  759. package/fesm2022/verben-workflow-ui-src-lib-components-form-timer.mjs.map +0 -1
  760. package/fesm2022/verben-workflow-ui-src-lib-components-form-viewer.mjs +0 -118
  761. package/fesm2022/verben-workflow-ui-src-lib-components-form-viewer.mjs.map +0 -1
  762. package/fesm2022/verben-workflow-ui-src-lib-components-forms.mjs +0 -812
  763. package/fesm2022/verben-workflow-ui-src-lib-components-forms.mjs.map +0 -1
  764. package/fesm2022/verben-workflow-ui-src-lib-components-journal.mjs +0 -33
  765. package/fesm2022/verben-workflow-ui-src-lib-components-journal.mjs.map +0 -1
  766. package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs +0 -1317
  767. package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs.map +0 -1
  768. package/fesm2022/verben-workflow-ui-src-lib-components-operation-popup.mjs +0 -827
  769. package/fesm2022/verben-workflow-ui-src-lib-components-operation-popup.mjs.map +0 -1
  770. package/fesm2022/verben-workflow-ui-src-lib-components-stage-details.mjs +0 -72
  771. package/fesm2022/verben-workflow-ui-src-lib-components-stage-details.mjs.map +0 -1
  772. package/fesm2022/verben-workflow-ui-src-lib-components-task-form.mjs +0 -94
  773. package/fesm2022/verben-workflow-ui-src-lib-components-task-form.mjs.map +0 -1
  774. package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs +0 -269
  775. package/fesm2022/verben-workflow-ui-src-lib-components-task-history.mjs.map +0 -1
  776. package/fesm2022/verben-workflow-ui-src-lib-components-task-notification.mjs +0 -995
  777. package/fesm2022/verben-workflow-ui-src-lib-components-task-notification.mjs.map +0 -1
  778. package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs +0 -1041
  779. package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs.map +0 -1
  780. package/fesm2022/verben-workflow-ui-src-lib-components-wf.mjs +0 -203
  781. package/fesm2022/verben-workflow-ui-src-lib-components-wf.mjs.map +0 -1
  782. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs +0 -5353
  783. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs.map +0 -1
  784. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs +0 -412
  785. package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs.map +0 -1
  786. package/fesm2022/verben-workflow-ui-src-lib-components-workflow.mjs +0 -365
  787. package/fesm2022/verben-workflow-ui-src-lib-components-workflow.mjs.map +0 -1
  788. package/fesm2022/verben-workflow-ui-src-lib-components-workflows.mjs +0 -666
  789. package/fesm2022/verben-workflow-ui-src-lib-components-workflows.mjs.map +0 -1
  790. package/fesm2022/verben-workflow-ui-src-lib-models.mjs +0 -255
  791. package/fesm2022/verben-workflow-ui-src-lib-models.mjs.map +0 -1
  792. package/fesm2022/verben-workflow-ui-src-lib-pipes.mjs +0 -32
  793. package/fesm2022/verben-workflow-ui-src-lib-pipes.mjs.map +0 -1
  794. package/fesm2022/verben-workflow-ui-src-lib-services.mjs +0 -320
  795. package/fesm2022/verben-workflow-ui-src-lib-services.mjs.map +0 -1
  796. package/fesm2022/verben-workflow-ui-src-lib-shared.mjs +0 -336
  797. package/fesm2022/verben-workflow-ui-src-lib-shared.mjs.map +0 -1
  798. package/fesm2022/verben-workflow-ui.mjs +0 -34
  799. package/fesm2022/verben-workflow-ui.mjs.map +0 -1
  800. package/index.d.ts +0 -5
  801. package/public-api.d.ts +0 -22
  802. package/src/lib/base/core/base-data-page.facade.d.ts +0 -138
  803. package/src/lib/base/core/base-data-page.service.d.ts +0 -61
  804. package/src/lib/base/core/base-data-page.state.d.ts +0 -73
  805. package/src/lib/base/handlers/filter-handler.service.d.ts +0 -34
  806. package/src/lib/base/handlers/search-handler.service.d.ts +0 -20
  807. package/src/lib/base/handlers/sort-handler.service.d.ts +0 -30
  808. package/src/lib/base/models/api-payload.d.ts +0 -2
  809. package/src/lib/base/models/page-config.interface.d.ts +0 -24
  810. package/src/lib/base/models/page-filter-tab-option.interface.d.ts +0 -19
  811. package/src/lib/base/public-api.d.ts +0 -9
  812. package/src/lib/base/utils/column-helpers.d.ts +0 -24
  813. package/src/lib/components/actors/actors.columns.d.ts +0 -3
  814. package/src/lib/components/actors/actors.component.d.ts +0 -79
  815. package/src/lib/components/actors/actors.config.d.ts +0 -10
  816. package/src/lib/components/actors/actors.facade.d.ts +0 -29
  817. package/src/lib/components/actors/actors.form.component.d.ts +0 -23
  818. package/src/lib/components/actors/actors.module.d.ts +0 -11
  819. package/src/lib/components/actors/actors.service.d.ts +0 -33
  820. package/src/lib/components/actors/actors.state.d.ts +0 -19
  821. package/src/lib/components/designer/components/label-editor.component.d.ts +0 -22
  822. package/src/lib/components/designer/components/node-selector.component.d.ts +0 -23
  823. package/src/lib/components/designer/components/swimlane-label.component.d.ts +0 -12
  824. package/src/lib/components/designer/components/swimlane-popup.component.d.ts +0 -18
  825. package/src/lib/components/designer/components/wf-canvas.component.d.ts +0 -37
  826. package/src/lib/components/designer/components/wf-designer.component.d.ts +0 -22
  827. package/src/lib/components/designer/components/wf-toolbar.component.d.ts +0 -17
  828. package/src/lib/components/designer/models/types.d.ts +0 -103
  829. package/src/lib/components/designer/services/canvas-state.service.d.ts +0 -24
  830. package/src/lib/components/designer/services/connection-segment-interaction.service.d.ts +0 -36
  831. package/src/lib/components/designer/services/connection.service.d.ts +0 -47
  832. package/src/lib/components/designer/services/keyboard-handler.service.d.ts +0 -9
  833. package/src/lib/components/designer/services/label-management.service.d.ts +0 -14
  834. package/src/lib/components/designer/services/node-finder.service.d.ts +0 -10
  835. package/src/lib/components/designer/services/node-interaction.service.d.ts +0 -19
  836. package/src/lib/components/designer/services/node-precondition.service.d.ts +0 -37
  837. package/src/lib/components/designer/services/node-selection.service.d.ts +0 -19
  838. package/src/lib/components/designer/services/orthogonal-router.service.d.ts +0 -36
  839. package/src/lib/components/designer/services/position-update.service.d.ts +0 -10
  840. package/src/lib/components/designer/services/rendering.service.d.ts +0 -67
  841. package/src/lib/components/designer/services/swimlane-management.service.d.ts +0 -19
  842. package/src/lib/components/designer/services/swimlane-stats.service.d.ts +0 -19
  843. package/src/lib/components/designer/services/viewport.service.d.ts +0 -10
  844. package/src/lib/components/designer/services/wf-facade.service.d.ts +0 -67
  845. package/src/lib/components/designer/services/wf-mapper.service.d.ts +0 -26
  846. package/src/lib/components/designer/services/wf-persistence.service.d.ts +0 -21
  847. package/src/lib/components/designer/services/wf-state.service.d.ts +0 -30
  848. package/src/lib/components/expiration/expiration.component.d.ts +0 -20
  849. package/src/lib/components/expiration/expiration.module.d.ts +0 -9
  850. package/src/lib/components/file-render/file-render.component.d.ts +0 -17
  851. package/src/lib/components/file-render/file-render.module.d.ts +0 -10
  852. package/src/lib/components/file-upload/file-upload.component.d.ts +0 -22
  853. package/src/lib/components/file-upload/file-upload.module.d.ts +0 -11
  854. package/src/lib/components/flowable-status/flowable-status.columns.d.ts +0 -3
  855. package/src/lib/components/flowable-status/flowable-status.component.d.ts +0 -80
  856. package/src/lib/components/flowable-status/flowable-status.config.d.ts +0 -11
  857. package/src/lib/components/flowable-status/flowable-status.facade.d.ts +0 -26
  858. package/src/lib/components/flowable-status/flowable-status.form.component.d.ts +0 -18
  859. package/src/lib/components/flowable-status/flowable-status.module.d.ts +0 -11
  860. package/src/lib/components/flowable-status/flowable-status.service.d.ts +0 -23
  861. package/src/lib/components/flowable-status/flowable-status.state.d.ts +0 -11
  862. package/src/lib/components/flowable-status/public-api.d.ts +0 -2
  863. package/src/lib/components/form-control/form-control.component.d.ts +0 -38
  864. package/src/lib/components/form-control/form-control.module.d.ts +0 -11
  865. package/src/lib/components/form-group/base-table-style.d.ts +0 -1
  866. package/src/lib/components/form-group/form-fields/form-fields.component.d.ts +0 -136
  867. package/src/lib/components/form-group/form-fields/form-fields.module.d.ts +0 -11
  868. package/src/lib/components/form-group/form-fields/form-fields.service.d.ts +0 -9
  869. package/src/lib/components/form-group/form-group.component.d.ts +0 -108
  870. package/src/lib/components/form-group/form-group.module.d.ts +0 -15
  871. package/src/lib/components/form-group/form-group.service.d.ts +0 -9
  872. package/src/lib/components/form-response/form-response.component.d.ts +0 -108
  873. package/src/lib/components/form-response/form-response.module.d.ts +0 -12
  874. package/src/lib/components/form-response/form-response.service.d.ts +0 -9
  875. package/src/lib/components/form-timer/form-timer.component.d.ts +0 -13
  876. package/src/lib/components/form-timer/form-timer.module.d.ts +0 -9
  877. package/src/lib/components/form-viewer/form-viewer.component.d.ts +0 -17
  878. package/src/lib/components/form-viewer/form-viewer.module.d.ts +0 -11
  879. package/src/lib/components/forms/base-table-style.d.ts +0 -1
  880. package/src/lib/components/forms/forms.component.d.ts +0 -88
  881. package/src/lib/components/forms/forms.module.d.ts +0 -8
  882. package/src/lib/components/forms/forms.service.d.ts +0 -9
  883. package/src/lib/components/journal/journal.component.d.ts +0 -5
  884. package/src/lib/components/journal/journal.module.d.ts +0 -8
  885. package/src/lib/components/my-queue/my-queue.columns.d.ts +0 -3
  886. package/src/lib/components/my-queue/my-queue.component.d.ts +0 -58
  887. package/src/lib/components/my-queue/my-queue.facade.d.ts +0 -47
  888. package/src/lib/components/my-queue/my-queue.module.d.ts +0 -15
  889. package/src/lib/components/my-queue/my-queue.service.d.ts +0 -65
  890. package/src/lib/components/my-queue/my-queue.state.d.ts +0 -39
  891. package/src/lib/components/my-queue/tasks.form.component.d.ts +0 -43
  892. package/src/lib/components/operation-popup/operation-popup.component.d.ts +0 -62
  893. package/src/lib/components/operation-popup/operation-popup.facade.d.ts +0 -32
  894. package/src/lib/components/operation-popup/operation-popup.service.d.ts +0 -23
  895. package/src/lib/components/operation-popup/operation-popup.state.d.ts +0 -20
  896. package/src/lib/components/stage-details/stage-details.component.d.ts +0 -24
  897. package/src/lib/components/stage-details/stage-details.module.d.ts +0 -9
  898. package/src/lib/components/task-form/task-form.component.d.ts +0 -10
  899. package/src/lib/components/task-form/task-form.module.d.ts +0 -10
  900. package/src/lib/components/task-history/task-history.component.d.ts +0 -35
  901. package/src/lib/components/task-history/task-history.module.d.ts +0 -10
  902. package/src/lib/components/task-history/task-history.service.d.ts +0 -13
  903. package/src/lib/components/task-notification/base-table-style.d.ts +0 -1
  904. package/src/lib/components/task-notification/task-notification.component.d.ts +0 -89
  905. package/src/lib/components/task-notification/task-notification.module.d.ts +0 -8
  906. package/src/lib/components/task-notification/task-notification.service.d.ts +0 -32
  907. package/src/lib/components/tasks/tasks.columns.d.ts +0 -11
  908. package/src/lib/components/tasks/tasks.component.d.ts +0 -40
  909. package/src/lib/components/tasks/tasks.facade.d.ts +0 -44
  910. package/src/lib/components/tasks/tasks.form.component.d.ts +0 -40
  911. package/src/lib/components/tasks/tasks.models.d.ts +0 -4
  912. package/src/lib/components/tasks/tasks.module.d.ts +0 -17
  913. package/src/lib/components/tasks/tasks.service.d.ts +0 -58
  914. package/src/lib/components/tasks/tasks.state.d.ts +0 -46
  915. package/src/lib/components/wf/wf.columns.d.ts +0 -3
  916. package/src/lib/components/wf/wf.component.d.ts +0 -16
  917. package/src/lib/components/wf/wf.module.d.ts +0 -10
  918. package/src/lib/components/wf/wf.service.d.ts +0 -51
  919. package/src/lib/components/workflow/column.d.ts +0 -3
  920. package/src/lib/components/workflow/helper.d.ts +0 -2
  921. package/src/lib/components/workflow/table-style.d.ts +0 -1
  922. package/src/lib/components/workflow/workflow.component.d.ts +0 -57
  923. package/src/lib/components/workflow/workflow.module.d.ts +0 -9
  924. package/src/lib/components/workflow-designer/action-dialog/action-dialog.component.d.ts +0 -34
  925. package/src/lib/components/workflow-designer/actor-tags-dialog/actor-tags-dialog.component.d.ts +0 -25
  926. package/src/lib/components/workflow-designer/conditions-popup/conditions-popup.component.d.ts +0 -38
  927. package/src/lib/components/workflow-designer/decision-popup/decision-popup.component.d.ts +0 -29
  928. package/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.d.ts +0 -292
  929. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.component.d.ts +0 -39
  930. package/src/lib/components/workflow-designer/designer-toolbar/designer-toolbar.types.d.ts +0 -5
  931. package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.d.ts +0 -46
  932. package/src/lib/components/workflow-designer/services/connection.service.d.ts +0 -101
  933. package/src/lib/components/workflow-designer/services/node-management.service.d.ts +0 -73
  934. package/src/lib/components/workflow-designer/services/popup.service.d.ts +0 -147
  935. package/src/lib/components/workflow-designer/services/swimlane.service.d.ts +0 -66
  936. package/src/lib/components/workflow-designer/services/transformer.service.d.ts +0 -51
  937. package/src/lib/components/workflow-designer/stage-dialog/stage-dialog.component.d.ts +0 -43
  938. package/src/lib/components/workflow-designer/stage-node/stage-node.component.d.ts +0 -58
  939. package/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.d.ts +0 -49
  940. package/src/lib/components/workflow-designer/workflow-data.service.d.ts +0 -59
  941. package/src/lib/components/workflow-designer/workflow-designer.component.d.ts +0 -121
  942. package/src/lib/components/workflow-designer/workflow-designer.module.d.ts +0 -41
  943. package/src/lib/components/workflow-designer/workflow-designer.state.d.ts +0 -278
  944. package/src/lib/components/workflow-designer/workflow-designer.types.d.ts +0 -129
  945. package/src/lib/components/workflow-stage/workflow-stage.component.d.ts +0 -78
  946. package/src/lib/components/workflow-stage/workflow-stage.module.d.ts +0 -12
  947. package/src/lib/components/workflows/public-api.d.ts +0 -4
  948. package/src/lib/components/workflows/workflow-form/workflow-form.component.d.ts +0 -28
  949. package/src/lib/components/workflows/workflows.api.d.ts +0 -38
  950. package/src/lib/components/workflows/workflows.columns.d.ts +0 -3
  951. package/src/lib/components/workflows/workflows.component.d.ts +0 -98
  952. package/src/lib/components/workflows/workflows.config.d.ts +0 -10
  953. package/src/lib/components/workflows/workflows.facade.d.ts +0 -41
  954. package/src/lib/components/workflows/workflows.module.d.ts +0 -11
  955. package/src/lib/components/workflows/workflows.service.d.ts +0 -32
  956. package/src/lib/components/workflows/workflows.state.d.ts +0 -15
  957. package/src/lib/models/ActionHistory.d.ts +0 -16
  958. package/src/lib/models/ActionType.d.ts +0 -9
  959. package/src/lib/models/Actor.d.ts +0 -11
  960. package/src/lib/models/ActorTag.d.ts +0 -6
  961. package/src/lib/models/Coord.d.ts +0 -4
  962. package/src/lib/models/DataType.d.ts +0 -25
  963. package/src/lib/models/EAVEntity.d.ts +0 -4
  964. package/src/lib/models/ErrorResponse.d.ts +0 -6
  965. package/src/lib/models/Escalation.d.ts +0 -14
  966. package/src/lib/models/EscalationCycle.d.ts +0 -12
  967. package/src/lib/models/EscalationStage.d.ts +0 -10
  968. package/src/lib/models/EscalationType.d.ts +0 -5
  969. package/src/lib/models/File.d.ts +0 -7
  970. package/src/lib/models/FilterTypes.d.ts +0 -6
  971. package/src/lib/models/FlowableStatus.d.ts +0 -5
  972. package/src/lib/models/Form.d.ts +0 -13
  973. package/src/lib/models/FormEntity.d.ts +0 -13
  974. package/src/lib/models/FormFill.d.ts +0 -15
  975. package/src/lib/models/FormProperty.d.ts +0 -15
  976. package/src/lib/models/FormValues.d.ts +0 -14
  977. package/src/lib/models/MailConfig.d.ts +0 -12
  978. package/src/lib/models/MessageConfig.d.ts +0 -3
  979. package/src/lib/models/MessageMedium.d.ts +0 -4
  980. package/src/lib/models/OperationAction.d.ts +0 -14
  981. package/src/lib/models/PagedResult.d.ts +0 -5
  982. package/src/lib/models/PeriodMode.d.ts +0 -10
  983. package/src/lib/models/PermissionConfig.d.ts +0 -7
  984. package/src/lib/models/ReportSchedule.d.ts +0 -22
  985. package/src/lib/models/ReportType.d.ts +0 -5
  986. package/src/lib/models/Resource.d.ts +0 -20
  987. package/src/lib/models/ResponseKeyValue.d.ts +0 -5
  988. package/src/lib/models/SMSConfig.d.ts +0 -10
  989. package/src/lib/models/SearchDynamicWrapper.d.ts +0 -5
  990. package/src/lib/models/SearchOperator.d.ts +0 -4
  991. package/src/lib/models/SearchPropertySign.d.ts +0 -9
  992. package/src/lib/models/SearchPropertyValue.d.ts +0 -12
  993. package/src/lib/models/SearchPropertyValueType.d.ts +0 -9
  994. package/src/lib/models/Size.d.ts +0 -4
  995. package/src/lib/models/SortDirection.d.ts +0 -5
  996. package/src/lib/models/StageActorRule.d.ts +0 -6
  997. package/src/lib/models/SwimLane.d.ts +0 -13
  998. package/src/lib/models/Tag.d.ts +0 -6
  999. package/src/lib/models/Task.d.ts +0 -30
  1000. package/src/lib/models/TaskAssignmentType.d.ts +0 -4
  1001. package/src/lib/models/TaskNotification.d.ts +0 -14
  1002. package/src/lib/models/TaskNotificationMessageType.d.ts +0 -4
  1003. package/src/lib/models/TaskNotificationType.d.ts +0 -6
  1004. package/src/lib/models/TaskStatus.d.ts +0 -7
  1005. package/src/lib/models/Workflow.d.ts +0 -21
  1006. package/src/lib/models/WorkflowAction.d.ts +0 -13
  1007. package/src/lib/models/WorkflowOperation.d.ts +0 -6
  1008. package/src/lib/models/WorkflowStage.d.ts +0 -26
  1009. package/src/lib/models/actors.d.ts +0 -8
  1010. package/src/lib/models/auth-mechanism.d.ts +0 -13
  1011. package/src/lib/models/base.d.ts +0 -13
  1012. package/src/lib/models/object-state.d.ts +0 -6
  1013. package/src/lib/models/operation-type.d.ts +0 -5
  1014. package/src/lib/models/paged.d.ts +0 -9
  1015. package/src/lib/models/query-params.d.ts +0 -8
  1016. package/src/lib/models/status.d.ts +0 -4
  1017. package/src/lib/models/task-history.d.ts +0 -17
  1018. package/src/lib/models/user-access-request-status.d.ts +0 -5
  1019. package/src/lib/models/user.d.ts +0 -24
  1020. package/src/lib/pipes/async-label.pipe.d.ts +0 -11
  1021. package/src/lib/services/environment.service.d.ts +0 -23
  1022. package/src/lib/services/http-web-request.service.d.ts +0 -23
  1023. package/src/lib/services/label.service.d.ts +0 -15
  1024. package/src/lib/services/public-api.d.ts +0 -4
  1025. package/src/lib/services/util.service.d.ts +0 -21
  1026. package/src/lib/shared/base-table-style.d.ts +0 -2
  1027. package/src/lib/shared/components/base-data-view.component.d.ts +0 -41
  1028. package/src/lib/shared/components/base-model-field.d.ts +0 -26
  1029. package/src/lib/shared/models/DataViewConfig.d.ts +0 -11
  1030. package/src/lib/shared/public-api.d.ts +0 -5
  1031. package/src/lib/shared/shared.module.d.ts +0 -11
  1032. /package/src/lib/base/{index.d.ts → index.ts} +0 -0
  1033. /package/src/lib/components/actors/{index.d.ts → index.ts} +0 -0
  1034. /package/src/lib/components/actors/{public-api.d.ts → public-api.ts} +0 -0
  1035. /package/src/lib/components/designer/{index.d.ts → index.ts} +0 -0
  1036. /package/src/lib/components/designer/{public-api.d.ts → public-api.ts} +0 -0
  1037. /package/src/lib/components/expiration/{index.d.ts → index.ts} +0 -0
  1038. /package/src/lib/components/expiration/{public-api.d.ts → public-api.ts} +0 -0
  1039. /package/src/lib/components/file-render/{index.d.ts → index.ts} +0 -0
  1040. /package/src/lib/components/file-render/{public-api.d.ts → public-api.ts} +0 -0
  1041. /package/src/lib/components/file-upload/{index.d.ts → index.ts} +0 -0
  1042. /package/src/lib/components/file-upload/{public-api.d.ts → public-api.ts} +0 -0
  1043. /package/src/lib/components/flowable-status/{index.d.ts → index.ts} +0 -0
  1044. /package/src/lib/components/form-control/{index.d.ts → index.ts} +0 -0
  1045. /package/src/lib/components/form-control/{public-api.d.ts → public-api.ts} +0 -0
  1046. /package/src/lib/components/form-group/{index.d.ts → index.ts} +0 -0
  1047. /package/src/lib/components/form-group/{public-api.d.ts → public-api.ts} +0 -0
  1048. /package/src/lib/components/form-response/{index.d.ts → index.ts} +0 -0
  1049. /package/src/lib/components/form-response/{public-api.d.ts → public-api.ts} +0 -0
  1050. /package/src/lib/components/form-timer/{index.d.ts → index.ts} +0 -0
  1051. /package/src/lib/components/form-timer/{public-api.d.ts → public-api.ts} +0 -0
  1052. /package/src/lib/components/form-viewer/{index.d.ts → index.ts} +0 -0
  1053. /package/src/lib/components/form-viewer/{public-api.d.ts → public-api.ts} +0 -0
  1054. /package/src/lib/components/forms/{index.d.ts → index.ts} +0 -0
  1055. /package/src/lib/components/forms/{public-api.d.ts → public-api.ts} +0 -0
  1056. /package/src/lib/components/journal/{index.d.ts → index.ts} +0 -0
  1057. /package/src/lib/components/journal/{public-api.d.ts → public-api.ts} +0 -0
  1058. /package/src/lib/components/my-queue/{index.d.ts → index.ts} +0 -0
  1059. /package/src/lib/components/my-queue/{public-api.d.ts → public-api.ts} +0 -0
  1060. /package/src/lib/components/operation-popup/{index.d.ts → index.ts} +0 -0
  1061. /package/src/lib/components/operation-popup/{public-api.d.ts → public-api.ts} +0 -0
  1062. /package/src/lib/components/stage-details/{index.d.ts → index.ts} +0 -0
  1063. /package/src/lib/components/stage-details/{public-api.d.ts → public-api.ts} +0 -0
  1064. /package/src/lib/components/task-form/{index.d.ts → index.ts} +0 -0
  1065. /package/src/lib/components/task-form/{public-api.d.ts → public-api.ts} +0 -0
  1066. /package/src/lib/components/task-history/{index.d.ts → index.ts} +0 -0
  1067. /package/src/lib/components/task-history/{public-api.d.ts → public-api.ts} +0 -0
  1068. /package/src/lib/components/task-notification/{index.d.ts → index.ts} +0 -0
  1069. /package/src/lib/components/task-notification/{public-api.d.ts → public-api.ts} +0 -0
  1070. /package/src/lib/components/tasks/{index.d.ts → index.ts} +0 -0
  1071. /package/src/lib/components/tasks/{public-api.d.ts → public-api.ts} +0 -0
  1072. /package/src/lib/components/wf/{index.d.ts → index.ts} +0 -0
  1073. /package/src/lib/components/wf/{public-api.d.ts → public-api.ts} +0 -0
  1074. /package/src/lib/components/workflow/{index.d.ts → index.ts} +0 -0
  1075. /package/src/lib/components/workflow/{public-api.d.ts → public-api.ts} +0 -0
  1076. /package/src/lib/components/workflow-designer/{index.d.ts → index.ts} +0 -0
  1077. /package/src/lib/components/workflow-designer/{public-api.d.ts → public-api.ts} +0 -0
  1078. /package/src/lib/components/workflow-stage/{index.d.ts → index.ts} +0 -0
  1079. /package/src/lib/components/workflow-stage/{public-api.d.ts → public-api.ts} +0 -0
  1080. /package/src/lib/components/workflows/{index.d.ts → index.ts} +0 -0
  1081. /package/src/lib/models/{index.d.ts → index.ts} +0 -0
  1082. /package/src/lib/models/{public-api.d.ts → public-api.ts} +0 -0
  1083. /package/src/lib/pipes/{index.d.ts → index.ts} +0 -0
  1084. /package/src/lib/pipes/{public-api.d.ts → public-api.ts} +0 -0
  1085. /package/src/lib/services/{index.d.ts → index.ts} +0 -0
  1086. /package/src/lib/shared/{index.d.ts → index.ts} +0 -0
  1087. /package/{styles → src/styles}/styles.css +0 -0
@@ -0,0 +1,1104 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { ObjectState, StageActorRule, Status, SwimLane, Tag, TaskAssignmentType, Workflow, WorkflowAction, WorkflowStage } from 'verben-workflow-ui/src/lib/models';
3
+ import {
4
+ Connection,
5
+ ConnectionPoint,
6
+ Node,
7
+ SwimlaneItem,
8
+ ToolType,
9
+ } from './workflow-designer.types';
10
+
11
+ /**
12
+ * The designer's single source of truth — and, in practice, its domain-logic
13
+ * god object. Holds the entire editing model plus most of the behaviour that
14
+ * operates on it: node placement, connection creation and routing, connection
15
+ * rules, swimlane management, and the whole save-time transform.
16
+ *
17
+ * ## How mutation works here
18
+ *
19
+ * This is a `providedIn: 'root'` singleton injected **by reference** into every
20
+ * component that touches the model. Components mutate its arrays directly
21
+ * (`state.connections.push(...)`) — there is no store, reducer, or action
22
+ * indirection. Change detection works because templates iterate
23
+ * `state.swimlanes` / `state.connections` with `@for`.
24
+ *
25
+ * The one deliberate exception is {@link moveNodeToSwimlane}, which reassigns
26
+ * arrays immutably so `@for` re-renders **both** the source and target lanes.
27
+ * In-place mutation is fine everywhere else, but not across two lanes at once.
28
+ *
29
+ * ## Before you change this class
30
+ *
31
+ * A parallel implementation exists under `services/` (`NodeManagementService`,
32
+ * `ConnectionService`, `TransformerService`, ...) that duplicates much of this
33
+ * logic. It is only partially wired in, and the copies have **drifted** — the
34
+ * two disagree on node placement offsets, connection endpoint offsets, and
35
+ * which node types may connect. This class is the live path; the services are
36
+ * mostly not. Change this one.
37
+ *
38
+ * @see ./docs/01-architecture.md — the split-brain problem in full
39
+ * @see ./docs/02-coordinate-system.md — read before touching any coordinate math
40
+ * @see ./docs/06-known-issues.md — the catalogued divergences
41
+ */
42
+ @Injectable({
43
+ providedIn: 'root',
44
+ })
45
+ export class WorkflowDesignerState {
46
+ /** Ordered lanes. Each owns its own nodes; there is no flat node list. */
47
+ swimlanes: SwimlaneItem[] = [];
48
+ /** Id of the workflow's entry-point node. */
49
+ startNodeId: string | null = null;
50
+ /** All edges, flat across lanes. */
51
+ connections: Connection[] = [];
52
+ draggingConnectionData: {
53
+ sourcePoint?: ConnectionPoint;
54
+ sourceSwimlaneIndex?: number;
55
+ startX?: number;
56
+ startY?: number;
57
+ currentX?: number;
58
+ currentY?: number;
59
+ } = {};
60
+ workflowFormId: string | null = null;
61
+ workflowFormName: string | null = null;
62
+ workflowId: string | null = null;
63
+
64
+ /**
65
+ * The workflow exactly as loaded from the API.
66
+ *
67
+ * This and the three `*Record` maps below are kept so that save can tell new
68
+ * objects from changed ones and emit the correct `ObjectState`. Losing them
69
+ * makes every entity look new on the next save.
70
+ */
71
+ workflow: Workflow | null = null;
72
+ /** Originally-loaded lanes, keyed by id. */
73
+ swimlaneRecord: Record<string, SwimLane> = {};
74
+ /** Originally-loaded stages, keyed by id. */
75
+ stageRecord: Record<string, WorkflowStage> = {};
76
+ /** Originally-loaded actions, keyed by id. */
77
+ actionRecord: Record<string, WorkflowAction> = {};
78
+
79
+ setWorkflowId(id: string): void {
80
+ this.workflowId = id;
81
+ }
82
+
83
+ public laneIdToIndexMap: Map<string, number> = new Map();
84
+
85
+ /**
86
+ * Which node types each source type may connect to. Consulted by
87
+ * {@link canConnect} and {@link getAllowedTargetNodeTypes}.
88
+ *
89
+ * Forms are terminal sinks — they accept incoming edges but have no outgoing
90
+ * ones, which is why `form` maps to an empty list.
91
+ *
92
+ * ⚠️ `ConnectionService` holds a **different** copy of this table that also
93
+ * allows `stage → form`. The two have drifted; this one is the live path.
94
+ * See `./docs/06-known-issues.md` section A.
95
+ */
96
+ private readonly connectionRules: Record<string, string[]> = {
97
+ stage: ['stage', 'decision', 'subflow'],
98
+ decision: ['stage'], // Decisions can only connect to Stages
99
+ // 'action': ['stage', 'form', 'decision'],
100
+ form: [],
101
+ subflow: ['stage', 'decision'],
102
+ };
103
+
104
+ setWorkflowForm(formId: string | null, formName: string | null): void {
105
+ this.workflowFormId = formId;
106
+ this.workflowFormName = formName;
107
+ }
108
+
109
+ addSwimlane(name: string, tags: Tag[]) {
110
+ // Generate a unique key for this swimlane
111
+ const swimlaneKey = `lane-${Date.now()}-${Math.floor(
112
+ Math.random() * 1000
113
+ )}`;
114
+
115
+ this.swimlanes = this.swimlanes.concat([
116
+ {
117
+ order: this.swimlanes.length,
118
+ label: name,
119
+ tags,
120
+ nodes: [],
121
+ id: swimlaneKey, // Store the generated key as id for frontend reference
122
+ },
123
+ ]);
124
+ }
125
+
126
+ registerLaneMapping(laneId: string, swimlaneIndex: number): void {
127
+ this.laneIdToIndexMap.set(laneId, swimlaneIndex);
128
+ }
129
+
130
+ /**
131
+ * Builds the attachment points for a node, laid out to match its rendered
132
+ * shape. Returned coordinates are **relative to the node's own origin**.
133
+ *
134
+ * Layout per type:
135
+ * - **stage** — points every 50px along all four edges.
136
+ * - **decision** — one point at each of the diamond's four edge midpoints.
137
+ * - **form** — `left` (input) points only; forms are terminal sinks.
138
+ * - **subflow** — top, bottom, and two points on each of left and right.
139
+ *
140
+ * Regenerate these whenever a node's size or type changes, or connections
141
+ * will reference point ids that no longer exist.
142
+ */
143
+ generateConnectionPoints(node: Node): ConnectionPoint[] {
144
+ const points: ConnectionPoint[] = [];
145
+ const spacing = 50; // Space between connection points
146
+
147
+ if (node.type === 'stage') {
148
+ // Rectangular shapes - add points around the rectangle
149
+
150
+ // Top edge points
151
+ for (let x = spacing; x < node.width; x += spacing) {
152
+ points.push({
153
+ id: `${node.id}-top-${x}`,
154
+ nodeId: node.id,
155
+ x: x,
156
+ y: 0,
157
+ type: 'top',
158
+ });
159
+ }
160
+
161
+ // Right edge points
162
+ for (let y = spacing; y < node.height; y += spacing) {
163
+ points.push({
164
+ id: `${node.id}-right-${y}`,
165
+ nodeId: node.id,
166
+ x: node.width,
167
+ y: y,
168
+ type: 'right',
169
+ });
170
+ }
171
+
172
+ // Bottom edge points
173
+ for (let x = spacing; x < node.width; x += spacing) {
174
+ points.push({
175
+ id: `${node.id}-bottom-${x}`,
176
+ nodeId: node.id,
177
+ x: x,
178
+ y: node.height,
179
+ type: 'bottom',
180
+ });
181
+ }
182
+
183
+ // Left edge points
184
+ for (let y = spacing; y < node.height; y += spacing) {
185
+ points.push({
186
+ id: `${node.id}-left-${y}`,
187
+ nodeId: node.id,
188
+ x: 0,
189
+ y: y,
190
+ type: 'left',
191
+ });
192
+ }
193
+ } else if (node.type === 'decision') {
194
+ // Diamond shape - add points at the four corners
195
+ points.push({
196
+ id: `${node.id}-top-0`,
197
+ nodeId: node.id,
198
+ x: node.width / 2,
199
+ y: 0,
200
+ type: 'top',
201
+ });
202
+
203
+ points.push({
204
+ id: `${node.id}-right-0`,
205
+ nodeId: node.id,
206
+ x: node.width,
207
+ y: node.height / 2,
208
+ type: 'right',
209
+ });
210
+
211
+ points.push({
212
+ id: `${node.id}-bottom-0`,
213
+ nodeId: node.id,
214
+ x: node.width / 2,
215
+ y: node.height,
216
+ type: 'bottom',
217
+ });
218
+
219
+ points.push({
220
+ id: `${node.id}-left-0`,
221
+ nodeId: node.id,
222
+ x: 0,
223
+ y: node.height / 2,
224
+ type: 'left',
225
+ });
226
+ } else if (node.type === 'form') {
227
+ // Form only has input connection points, no output points
228
+
229
+ // Left edge points (for input connections)
230
+ for (let y = spacing; y < node.height; y += spacing) {
231
+ points.push({
232
+ id: `${node.id}-left-${y}`,
233
+ nodeId: node.id,
234
+ x: 0,
235
+ y: y,
236
+ type: 'left',
237
+ });
238
+ }
239
+ } else if (node.type === 'subflow') {
240
+ // Hexagon shape - add points at the six corners
241
+ points.push({
242
+ id: `${node.id}-top-0`,
243
+ nodeId: node.id,
244
+ x: node.width / 2,
245
+ y: 0,
246
+ type: 'top',
247
+ });
248
+
249
+ points.push({
250
+ id: `${node.id}-right-top`,
251
+ nodeId: node.id,
252
+ x: node.width,
253
+ y: node.height / 4,
254
+ type: 'right',
255
+ });
256
+
257
+ points.push({
258
+ id: `${node.id}-right-bottom`,
259
+ nodeId: node.id,
260
+ x: node.width,
261
+ y: (node.height * 3) / 4,
262
+ type: 'right',
263
+ });
264
+
265
+ points.push({
266
+ id: `${node.id}-bottom-0`,
267
+ nodeId: node.id,
268
+ x: node.width / 2,
269
+ y: node.height,
270
+ type: 'bottom',
271
+ });
272
+
273
+ points.push({
274
+ id: `${node.id}-left-bottom`,
275
+ nodeId: node.id,
276
+ x: 0,
277
+ y: (node.height * 3) / 4,
278
+ type: 'left',
279
+ });
280
+
281
+ points.push({
282
+ id: `${node.id}-left-top`,
283
+ nodeId: node.id,
284
+ x: 0,
285
+ y: node.height / 4,
286
+ type: 'left',
287
+ });
288
+ }
289
+
290
+ return points;
291
+ }
292
+
293
+ /**
294
+ * Creates a node in a swimlane and returns it (or `null` if the lane or type
295
+ * is invalid).
296
+ *
297
+ * ## Coordinate contract — callers must obey both halves
298
+ *
299
+ * 1. `y` must be an **absolute canvas Y**, not lane-relative. This method
300
+ * converts it internally (`y - swimlaneIndex * 263`).
301
+ * 2. `swimlaneIndex` must be the **drop-target** lane — the lane the node is
302
+ * landing in — not the lane a drag started from.
303
+ *
304
+ * Violating either half double-subtracts the lane offset and the node renders
305
+ * roughly one lane too high, attached to the wrong swimlane. That was the
306
+ * connection-drop bug; `designer-canvas.connection-drop.spec.ts` pins it.
307
+ *
308
+ * The canonical correct caller is toolbar placement in
309
+ * `workflow-designer.component.ts`:
310
+ *
311
+ * ```ts
312
+ * const swimlaneIndex = Math.floor(event.y / 263); // target lane from drop Y
313
+ * this.state.addNode(swimlaneIndex, 'stage', event.x, event.y /* absolute *\/);
314
+ * ```
315
+ *
316
+ * The first node created in an empty workflow is automatically marked as the
317
+ * start node.
318
+ *
319
+ * ⚠️ `NodeManagementService.addNode` applies an extra `- 40` that this method
320
+ * and the render template do not. See `./docs/06-known-issues.md` section A.
321
+ *
322
+ * @param swimlaneIndex Target lane index (the lane the node lands in).
323
+ * @param type Node type; `'swimlane'` and `'action'` are rejected.
324
+ * @param x Canvas X.
325
+ * @param y **Absolute** canvas Y.
326
+ * @param useExistingId Reuse `stageData.Code` as the node id instead of
327
+ * generating one — used when rebuilding nodes from a loaded workflow so
328
+ * they keep their backend identity.
329
+ */
330
+ addNode(
331
+ swimlaneIndex: number,
332
+ type: ToolType,
333
+ x: number,
334
+ y: number,
335
+ stageData?: Partial<WorkflowStage>,
336
+ workflowData?: { id: string; name: string },
337
+ useExistingId: boolean = false
338
+ ) {
339
+ if (
340
+ !this.swimlanes[swimlaneIndex] ||
341
+ !type ||
342
+ (type !== 'stage' &&
343
+ type !== 'decision' &&
344
+ type !== 'form' &&
345
+ type !== 'subflow')
346
+ ) {
347
+ return null;
348
+ }
349
+
350
+ // Adjust position relative to swimlane
351
+ const adjustedY = y - swimlaneIndex * 263; // Subtracting header height
352
+
353
+ // Generate a unique ID or use existing
354
+ const id =
355
+ useExistingId && stageData?.Code
356
+ ? stageData.Code
357
+ : `${type}-${Date.now()}-${Math.floor(Math.random() * 1000)}`;
358
+
359
+ // Create node with dimensions based on type
360
+ const node: Node = {
361
+ id,
362
+ type,
363
+ x,
364
+ y: adjustedY,
365
+ width: type === 'subflow' ? 150 : 169, // Width from SVG
366
+ height: 100, // Height from SVG
367
+ isStartNode: false, // Default to false
368
+ stageData: stageData || {}, // Store stage data
369
+ workflowData: workflowData || null,
370
+ };
371
+
372
+ // If this is the first node in the entire workflow, mark it as the start node
373
+ if (this.getNodeCount() === 0) {
374
+ node.isStartNode = true;
375
+ this.startNodeId = id;
376
+ }
377
+
378
+ // Generate connection points for the node
379
+ node.connectionPoints = this.generateConnectionPoints(node);
380
+
381
+ // Add node to the swimlane
382
+ if (!this.swimlanes[swimlaneIndex].nodes) {
383
+ this.swimlanes[swimlaneIndex].nodes = [];
384
+ }
385
+ this.swimlanes[swimlaneIndex].nodes.push(node);
386
+
387
+ return node;
388
+ }
389
+
390
+ // Helper to get total node count across all swimlanes
391
+ getNodeCount(): number {
392
+ return this.swimlanes.reduce(
393
+ (count, swimlane) => count + (swimlane.nodes?.length || 0),
394
+ 0
395
+ );
396
+ }
397
+
398
+ // Find a node by ID (useful for later operations)
399
+ findNodeById(id: string): { node: Node; swimlaneIndex: number } | null {
400
+ for (let i = 0; i < this.swimlanes.length; i++) {
401
+ const swimlane = this.swimlanes[i];
402
+ const node = swimlane.nodes?.find((n) => n.id === id);
403
+ if (node) {
404
+ return { node, swimlaneIndex: i };
405
+ }
406
+ }
407
+ return null;
408
+ }
409
+
410
+ // Find a node by ID (useful for later operations)
411
+ findActionById(connectionId: string): Connection | null {
412
+ return this.connections.find(({ id }) => id === connectionId) ?? null;
413
+ }
414
+
415
+ startConnectionDrag(
416
+ point: ConnectionPoint,
417
+ swimlaneIndex: number,
418
+ globalX: number,
419
+ globalY: number
420
+ ) {
421
+ this.draggingConnectionData = {
422
+ sourcePoint: point,
423
+ sourceSwimlaneIndex: swimlaneIndex,
424
+ startX: globalX,
425
+ startY: globalY,
426
+ currentX: globalX,
427
+ currentY: globalY,
428
+ };
429
+ }
430
+
431
+ updateConnectionDrag(currentX: number, currentY: number) {
432
+ if (this.draggingConnectionData.sourcePoint) {
433
+ this.draggingConnectionData.currentX = currentX;
434
+ this.draggingConnectionData.currentY = currentY;
435
+ }
436
+ }
437
+
438
+ endConnectionDrag() {
439
+ // Clear dragging data
440
+ this.draggingConnectionData = {};
441
+ }
442
+
443
+ isConnectionDragging(): boolean {
444
+ return !!this.draggingConnectionData.sourcePoint;
445
+ }
446
+
447
+ /**
448
+ * Endpoints for the **in-progress** connection preview line: from the source
449
+ * point (resolved to absolute canvas space) to the current cursor position.
450
+ *
451
+ * Returns `null` when no drag is active. For a *saved* connection's
452
+ * endpoints, use {@link getConnectionData} instead.
453
+ */
454
+ getConnectionPathData(): {
455
+ startX: number;
456
+ startY: number;
457
+ endX: number;
458
+ endY: number;
459
+ sourceSwimlaneIndex: number;
460
+ } | null {
461
+ if (!this.draggingConnectionData.sourcePoint) return null;
462
+
463
+ const { sourcePoint, sourceSwimlaneIndex, currentX, currentY } =
464
+ this.draggingConnectionData;
465
+ const node = this.findNodeById(sourcePoint.nodeId)?.node;
466
+
467
+ if (!node || sourceSwimlaneIndex === undefined) return null;
468
+
469
+ // Calculate start point in global coordinates
470
+ const startX = node.x + sourcePoint.x;
471
+ const startY = node.y + sourcePoint.y + sourceSwimlaneIndex * 263; // Add swimlane offset
472
+
473
+ return {
474
+ startX,
475
+ startY,
476
+ endX: currentX ?? startX,
477
+ endY: currentY ?? startY,
478
+ sourceSwimlaneIndex,
479
+ };
480
+ }
481
+
482
+ /**
483
+ * Completes the in-progress drag by pushing a `Connection` from the recorded
484
+ * source point to the given target, and returns it.
485
+ *
486
+ * Reads the source from {@link draggingConnectionData}, so it is only valid
487
+ * during a drag — returns `null` if no source was recorded.
488
+ *
489
+ * Note this does **not** check {@link canConnect}; callers are expected to
490
+ * have validated the pairing before calling. The new connection has an empty
491
+ * label and no action — those are filled in afterwards via the action dialog.
492
+ */
493
+ createConnection(
494
+ targetNodeId: string,
495
+ targetPointId: string,
496
+ targetSwimlaneIndex: number
497
+ ): Connection | null {
498
+ const { sourcePoint, sourceSwimlaneIndex } = this.draggingConnectionData;
499
+
500
+ if (!sourcePoint || sourceSwimlaneIndex === undefined) {
501
+ return null;
502
+ }
503
+
504
+ const connection: Connection = {
505
+ id: `conn-${Date.now()}-${Math.floor(Math.random() * 1000)}`,
506
+ sourceNodeId: sourcePoint.nodeId,
507
+ targetNodeId: targetNodeId,
508
+ sourcePointId: sourcePoint.id,
509
+ targetPointId: targetPointId,
510
+ sourceSwimlaneIndex: sourceSwimlaneIndex,
511
+ targetSwimlaneIndex: targetSwimlaneIndex,
512
+ label: '',
513
+ action: null,
514
+ };
515
+
516
+ this.connections.push(connection);
517
+ return connection;
518
+ }
519
+
520
+ /**
521
+ * Resolves a saved connection's endpoints into **absolute canvas
522
+ * coordinates** for rendering:
523
+ *
524
+ * ```
525
+ * startY = sourceNode.y + sourcePoint.y + connection.sourceSwimlaneIndex * 263
526
+ * endY = targetNode.y + targetPoint.y + connection.targetSwimlaneIndex * 263
527
+ * ```
528
+ *
529
+ * Both offsets are needed because `node.y` is lane-relative and `point.y` is
530
+ * node-relative.
531
+ *
532
+ * Returns `null` if either endpoint's node no longer exists — callers should
533
+ * treat that as "skip rendering this edge", not as an error.
534
+ *
535
+ * ⚠️ Relies on the connection's denormalised lane indices being current. A
536
+ * node moved between lanes without its connections updated renders detached.
537
+ *
538
+ * ⚠️ `ConnectionService.getConnectionData` adds a further `+ 40` here. The two
539
+ * disagree; this is the live path. See `./docs/06-known-issues.md` section A.
540
+ */
541
+ getConnectionData(connection: Connection): {
542
+ startX: number;
543
+ startY: number;
544
+ endX: number;
545
+ endY: number;
546
+ sourceSwimlaneIndex: number;
547
+ targetSwimlaneIndex: number;
548
+ } | null {
549
+ const sourceNodeInfo = this.findNodeById(connection.sourceNodeId);
550
+ const targetNodeInfo = this.findNodeById(connection.targetNodeId);
551
+
552
+ if (!sourceNodeInfo || !targetNodeInfo) {
553
+ return null;
554
+ }
555
+
556
+ const sourceNode = sourceNodeInfo.node;
557
+ const targetNode = targetNodeInfo.node;
558
+
559
+ // Find connection points
560
+ const sourcePoint = sourceNode.connectionPoints?.find(
561
+ (p) => p.id === connection.sourcePointId
562
+ );
563
+ const targetPoint = targetNode.connectionPoints?.find(
564
+ (p) => p.id === connection.targetPointId
565
+ );
566
+
567
+ if (!sourcePoint || !targetPoint) {
568
+ return null;
569
+ }
570
+
571
+ // Calculate global coordinates
572
+ const startX = sourceNode.x + sourcePoint.x;
573
+ const startY =
574
+ sourceNode.y + sourcePoint.y + connection.sourceSwimlaneIndex * 263;
575
+
576
+ const endX = targetNode.x + targetPoint.x;
577
+ const endY =
578
+ targetNode.y + targetPoint.y + connection.targetSwimlaneIndex * 263;
579
+
580
+ return {
581
+ startX,
582
+ startY,
583
+ endX,
584
+ endY,
585
+ sourceSwimlaneIndex: connection.sourceSwimlaneIndex,
586
+ targetSwimlaneIndex: connection.targetSwimlaneIndex,
587
+ };
588
+ }
589
+
590
+ /**
591
+ * Whether an edge from `sourceNodeType` to `targetNodeType` is permitted by
592
+ * {@link connectionRules}. Unknown types return `false`.
593
+ */
594
+ canConnect(sourceNodeType: string, targetNodeType: string): boolean {
595
+ return (
596
+ this.connectionRules[sourceNodeType]?.includes(targetNodeType) || false
597
+ );
598
+ }
599
+
600
+ /**
601
+ * Node types the in-progress drag is allowed to land on. Drives the choices
602
+ * offered in the node-type popup when a connection is dropped on empty
603
+ * canvas. Empty when no drag is active.
604
+ */
605
+ getAllowedTargetNodeTypes(): string[] {
606
+ if (!this.draggingConnectionData.sourcePoint) {
607
+ return [];
608
+ }
609
+
610
+ const sourceNodeInfo = this.findNodeById(
611
+ this.draggingConnectionData.sourcePoint.nodeId
612
+ );
613
+ if (!sourceNodeInfo) {
614
+ return [];
615
+ }
616
+
617
+ const sourceNodeType = sourceNodeInfo.node.type;
618
+
619
+ return this.connectionRules[sourceNodeType] || [];
620
+ }
621
+
622
+ /**
623
+ * Deletes a swimlane. Only succeeds when the lane has no nodes — stages must
624
+ * be moved to another lane first. Returns false when the lane still has nodes
625
+ * or the index is out of range.
626
+ *
627
+ * Keeps everything aligned after removal:
628
+ * - Re-sequences `order` on the remaining lanes (immutable reassignment so
629
+ * Angular's @for blocks re-render).
630
+ * - Decrements the swimlane indices stored on connections whose endpoints
631
+ * live below the removed lane, since those lanes shift up by one.
632
+ *
633
+ * The lane's original record is left in `swimlaneRecord`, so a previously
634
+ * loaded lane is emitted with `ObjectState.Removed` by
635
+ * `transformToWorkflowModel`; a never-saved lane simply disappears.
636
+ */
637
+ deleteSwimlane(index: number): boolean {
638
+ if (index < 0 || index >= this.swimlanes.length) {
639
+ return false;
640
+ }
641
+
642
+ if (this.swimlanes[index].nodes?.length) {
643
+ return false;
644
+ }
645
+
646
+ this.swimlanes = this.swimlanes
647
+ .filter((_, i) => i !== index)
648
+ .map((lane, i) => ({ ...lane, order: i }));
649
+
650
+ this.connections = this.connections.map((conn) => ({
651
+ ...conn,
652
+ sourceSwimlaneIndex:
653
+ conn.sourceSwimlaneIndex > index
654
+ ? conn.sourceSwimlaneIndex - 1
655
+ : conn.sourceSwimlaneIndex,
656
+ targetSwimlaneIndex:
657
+ conn.targetSwimlaneIndex > index
658
+ ? conn.targetSwimlaneIndex - 1
659
+ : conn.targetSwimlaneIndex,
660
+ }));
661
+
662
+ return true;
663
+ }
664
+
665
+ updateSwimlane(index: number, name: string, tags: Tag[]) {
666
+
667
+ if (index >= 0 && index < this.swimlanes.length) {
668
+ this.swimlanes[index] = {
669
+ ...this.swimlanes[index],
670
+ label: name,
671
+ tags: tags,
672
+ };
673
+ }
674
+ }
675
+
676
+ /**
677
+ * Rebuilds the full `Workflow` API model from the current editing state —
678
+ * the save-side counterpart to `parseWorkflowData` in
679
+ * `workflow-designer.component.ts`.
680
+ *
681
+ * Mapping:
682
+ * - swimlanes → `Lanes`
683
+ * - stage **and subflow** nodes → `Stages` (subflows carry `IsSubProcess: true`)
684
+ * - connections → `Actions`
685
+ *
686
+ * Each entity's `DataState` is derived by looking it up in `swimlaneRecord` /
687
+ * `stageRecord` / `actionRecord`: found means `Changed`, absent means `New`.
688
+ * Clearing those maps therefore makes everything save as new.
689
+ *
690
+ * ⚠️ Decision and form nodes are **not** emitted as stages — only `stage` and
691
+ * `subflow` are. Decision semantics survive through the conditions on their
692
+ * connections.
693
+ *
694
+ * ⚠️ When no workflow was loaded, the header is hard-coded (`Name: 'New
695
+ * Workflow'`, empty description, default assignment and status) because the
696
+ * designer has no UI for editing it. See `./docs/06-known-issues.md` section G.
697
+ *
698
+ * This only builds the payload; `WorkflowDataService.saveWorkflows` sends it.
699
+ * Deletions are not part of this — they are issued eagerly at the point of
700
+ * user action. See `./docs/08-api-reference.md` section 3.
701
+ */
702
+ transformToWorkflowModel(): Workflow {
703
+ // Use stored workflow if available, otherwise create a new one
704
+ const workflow: Workflow = this.workflow
705
+ ? { ...this.workflow, DataState: ObjectState.Changed }
706
+ : {
707
+ // BaseModel properties
708
+ Id: '',
709
+ Code: '',
710
+ TenantId: '',
711
+ id: '',
712
+ ServiceName: '',
713
+ CreatedAt: new Date(),
714
+ UpdatedAt: new Date(),
715
+ DataState: this.wasLoadedFromApi(this.workflowId || '')
716
+ ? ObjectState.Changed
717
+ : ObjectState.New,
718
+
719
+ // Workflow specific properties
720
+ Name: 'New Workflow',
721
+ Description: '',
722
+ StageEntryRule: '',
723
+ Form: this.workflowFormId || undefined,
724
+ AssignmentType: TaskAssignmentType.AutoRoute,
725
+ Operation: '',
726
+ Status: Status.Active,
727
+ Actions: [],
728
+ Lanes: [],
729
+ Stages: [],
730
+ };
731
+
732
+ // Update workflow form if changed
733
+ if (this.workflowFormId !== this.workflow?.Form) {
734
+ workflow.Form = this.workflowFormId || workflow.Form;
735
+ }
736
+
737
+ // Transform swimlanes to SwimLane[]
738
+ workflow.Lanes = this.swimlanes.map((swimlane) => {
739
+ // Check if this is an existing swimlane
740
+ if (swimlane.id && this.swimlaneRecord[swimlane.id]) {
741
+ // Update existing lane with changed values
742
+ const existingLane = this.swimlaneRecord[swimlane.id];
743
+ return {
744
+ ...existingLane,
745
+ Name: swimlane.label,
746
+ Tags: swimlane.tags,
747
+ Position: swimlane.order,
748
+ Coordinates: { X: 0, Y: swimlane.order * 263 },
749
+ DataState: ObjectState.Changed,
750
+ UpdatedAt: new Date(),
751
+ };
752
+ } else {
753
+ // Generate a new ID for new swimlanes if not already set
754
+ const laneId =
755
+ swimlane.id ||
756
+ `lane-${Date.now()}-${Math.floor(Math.random() * 1000)}`;
757
+
758
+ // Create new lane
759
+ return {
760
+ Code: '',
761
+ Id: '',
762
+ TenantId: '',
763
+ // id: laneId,
764
+ id: '',
765
+ ServiceName: '',
766
+ CreatedAt: new Date(),
767
+ UpdatedAt: new Date(),
768
+ DataState: ObjectState.New,
769
+ Workflow: workflow.Code,
770
+ Name: swimlane.label,
771
+ Tags: swimlane.tags || [],
772
+ Position: swimlane.order,
773
+ Coordinates: { X: 0, Y: swimlane.order * 263 },
774
+ Size: { Width: 3000, Height: 263 },
775
+ Key: swimlane.id,
776
+ };
777
+ }
778
+ });
779
+
780
+ // Transform nodes to WorkflowStage[]
781
+ const stages: WorkflowStage[] = [];
782
+
783
+ this.swimlanes.forEach((swimlane, swimlaneIndex) => {
784
+ swimlane.nodes?.forEach((node) => {
785
+ if (node.type === 'stage' || node.type === 'subflow') {
786
+ // Check if this is an existing stage
787
+ if (this.stageRecord[node.id]) {
788
+ // Update existing stage with changed values
789
+ const existingStage = this.stageRecord[node.id];
790
+
791
+ // Create a new object with updated properties
792
+ const updatedStage: WorkflowStage = {
793
+ ...existingStage,
794
+ DataState: ObjectState.Changed,
795
+ UpdatedAt: new Date(),
796
+ };
797
+
798
+ // Update properties that may have changed
799
+ if (node.stageData?.Name !== undefined)
800
+ updatedStage.Name =
801
+ node.workflowData?.name ?? node.stageData.Name;
802
+ if (node.stageData?.Description !== undefined)
803
+ updatedStage.Description = node.stageData.Description;
804
+ if (node.stageData?.Duration !== undefined)
805
+ updatedStage.Duration = node.stageData.Duration;
806
+ if (node.stageData?.PassOnRule !== undefined)
807
+ updatedStage.PassOnRule = node.stageData.PassOnRule;
808
+ if (node.stageData?.ActorRule !== undefined)
809
+ updatedStage.ActorRule = node.stageData.ActorRule;
810
+ if (node.stageData?.AssignmentType !== undefined)
811
+ updatedStage.AssignmentType = node.stageData.AssignmentType;
812
+ if (node.stageData?.MinNoOfActor !== undefined)
813
+ updatedStage.MinNoOfActor = node.stageData.MinNoOfActor;
814
+ if (node.stageData?.IsParallel !== undefined)
815
+ updatedStage.IsParallel = node.stageData.IsParallel;
816
+ if (node.stageData?.Tags) updatedStage.Tags = node.stageData.Tags;
817
+
818
+ // Always update these properties
819
+ updatedStage.IsEntryPoint = node.isStartNode;
820
+ updatedStage.IsExitPoint = node.stageData?.IsExitPoint || false;
821
+ updatedStage.Form = node.stageData?.formId || '';
822
+ updatedStage.Coordinates = { X: node.x, Y: node.y };
823
+ updatedStage.SwimLane = this.swimlanes[swimlaneIndex].id || '';
824
+
825
+ // console.log("NODE_TYPE", node.type);
826
+
827
+ // Handle subflow stage
828
+ if (node.type === 'subflow') {
829
+ updatedStage.IsSubProcess = true;
830
+ updatedStage.SubWorkFlow = node.workflowData?.id || '';
831
+ updatedStage.Name = node.workflowData?.name || '';
832
+ }
833
+
834
+ // Add to stages
835
+ stages.push(updatedStage);
836
+ } else {
837
+ // Create a new stage
838
+ stages.push({
839
+ Id: '',
840
+ Code: '',
841
+ TenantId: '',
842
+ // id: node.id,
843
+ id: '',
844
+ ServiceName: '',
845
+ CreatedAt: new Date(),
846
+ UpdatedAt: new Date(),
847
+ DataState: ObjectState.New,
848
+ Workflow: workflow.Code,
849
+ Name:
850
+ (node.type === 'subflow'
851
+ ? node.workflowData?.name
852
+ : node.stageData?.Name) ?? '',
853
+ Description: node.stageData?.Description || '',
854
+ Duration: node.stageData?.Duration || 0,
855
+ PassOnRule: node.stageData?.PassOnRule || '',
856
+ ActorRule: node.stageData?.ActorRule || StageActorRule.None,
857
+ MinNoOfActor: node.stageData?.MinNoOfActor || 0,
858
+ IsParallel: node.stageData?.IsParallel || false,
859
+ IsEntryPoint: node.isStartNode,
860
+ IsExitPoint: node.stageData?.IsExitPoint || false, // Will be updated below
861
+ Tags: node.stageData?.Tags || [],
862
+ Form: node.stageData?.formId ?? '',
863
+ AllowMultiSubProcess: false,
864
+ AssignmentType:
865
+ node.stageData?.AssignmentType ||
866
+ this.workflow?.AssignmentType ||
867
+ TaskAssignmentType.AutoRoute,
868
+ SubWorkFlow: node.workflowData?.id || '',
869
+ SwimLane: this.swimlanes[swimlaneIndex].id || '',
870
+ Coordinates: { X: node.x, Y: node.y },
871
+ IsSubProcess: node.type === 'subflow',
872
+ Key: node.stageData?.Key || node.id,
873
+ });
874
+ }
875
+ }
876
+ });
877
+ });
878
+
879
+ // // Determine which stages are exit points (no outgoing connections)
880
+ // stages.forEach((stage) => {
881
+ // const hasOutgoingConnections = this.connections.some(
882
+ // (conn) =>
883
+ // conn.sourceNodeId === stage.Code || conn.sourceNodeId === stage.id
884
+ // );
885
+ // if (!hasOutgoingConnections) {
886
+ // stage.IsExitPoint = true;
887
+ // }
888
+ // });
889
+
890
+ // Transform connections to WorkflowAction[]
891
+ const actions: WorkflowAction[] = [];
892
+
893
+ this.connections.forEach((conn) => {
894
+ const sourceNode = this.findNodeById(conn.sourceNodeId)?.node;
895
+ const targetNode = this.findNodeById(conn.targetNodeId)?.node;
896
+
897
+ // Check if this is an existing action
898
+ if (this.actionRecord[conn.id]) {
899
+ // Update existing action with changed values
900
+ const existingAction = this.actionRecord[conn.id];
901
+
902
+ // Create updated action with changed properties
903
+ const updatedAction: WorkflowAction = {
904
+ ...existingAction,
905
+ DataState: ObjectState.Changed,
906
+ UpdatedAt: new Date(),
907
+ };
908
+
909
+ // Update properties that may have changed
910
+ updatedAction.Name =
911
+ conn.label ??
912
+ `Action from ${sourceNode?.stageData?.Name || 'Unknown'} to ${targetNode?.stageData?.Name || 'Unknown'
913
+ }`;
914
+ updatedAction.OperationAction = conn.action;
915
+ updatedAction.IsParallel = targetNode?.stageData?.IsParallel || false;
916
+ updatedAction.PassOnRule = conn.condition || '';
917
+ updatedAction.TargetStatus = conn.targetStatus || undefined;
918
+ // updatedAction.SourcePointType = this.getConnectionPointType(conn.sourcePointId);
919
+ // updatedAction.TargetPointType = this.getConnectionPointType(conn.targetPointId);
920
+
921
+ actions.push(updatedAction);
922
+ } else {
923
+ // Create a new action
924
+ actions.push({
925
+ Id: '',
926
+ Code: '',
927
+ TenantId: '',
928
+ // id: conn.id,
929
+ id: '',
930
+ ServiceName: '',
931
+ CreatedAt: new Date(),
932
+ UpdatedAt: new Date(),
933
+ DataState: ObjectState.New,
934
+ Workflow: workflow.Code,
935
+ Name:
936
+ conn.label ??
937
+ `Action from ${sourceNode?.stageData?.Name || 'Unknown'} to ${targetNode?.stageData?.Name || 'Unknown'
938
+ }`,
939
+ OperationAction: conn.action,
940
+ TargetStatus: conn.targetStatus,
941
+ FromStage: conn.sourceNodeId,
942
+ ToStage: conn.targetNodeId,
943
+ IsParallel: sourceNode?.stageData?.IsParallel || false,
944
+ PassOnRule: conn.condition || '',
945
+ SourcePointType: this.getConnectionPointType(conn.sourcePointId),
946
+ TargetPointType: this.getConnectionPointType(conn.targetPointId),
947
+ });
948
+ }
949
+ });
950
+
951
+ // Add deleted objects with Removed state
952
+ Object.keys(this.stageRecord).forEach((stageId) => {
953
+ const exists = stages.some(
954
+ (stage) => stage.Code === stageId || stage.id === stageId
955
+ );
956
+
957
+ if (!exists) {
958
+ const stage = this.stageRecord[stageId];
959
+ stages.push({
960
+ ...stage,
961
+ DataState: ObjectState.Removed,
962
+ UpdatedAt: new Date(),
963
+ });
964
+ }
965
+ });
966
+
967
+ Object.keys(this.actionRecord).forEach((actionId) => {
968
+ const exists = actions.some(
969
+ (action) => action.Code === actionId || action.id === actionId
970
+ );
971
+
972
+ if (!exists) {
973
+ const action = this.actionRecord[actionId];
974
+ actions.push({
975
+ ...action,
976
+ DataState: ObjectState.Removed,
977
+ UpdatedAt: new Date(),
978
+ });
979
+ }
980
+ });
981
+
982
+ // Handle deleted swimlanes
983
+ Object.keys(this.swimlaneRecord).forEach((laneId) => {
984
+ const exists = workflow.Lanes.some(
985
+ (lane) => lane.Code === laneId || lane.id === laneId
986
+ );
987
+
988
+ if (!exists) {
989
+ const lane = this.swimlaneRecord[laneId];
990
+ workflow.Lanes.push({
991
+ ...lane,
992
+ DataState: ObjectState.Removed,
993
+ UpdatedAt: new Date(),
994
+ });
995
+ }
996
+ });
997
+
998
+ workflow.Stages = stages;
999
+ workflow.Actions = actions;
1000
+
1001
+ return workflow;
1002
+ }
1003
+
1004
+ getConnectionPointType(
1005
+ pointId: string
1006
+ ): 'top' | 'right' | 'bottom' | 'left' | undefined {
1007
+ // Extract the type from the connection point ID format
1008
+ // which is usually something like "node-id-top-50"
1009
+ const parts = pointId.split('-');
1010
+ const typeIndex = parts.findIndex(
1011
+ (part) =>
1012
+ part === 'top' ||
1013
+ part === 'right' ||
1014
+ part === 'bottom' ||
1015
+ part === 'left'
1016
+ );
1017
+
1018
+ if (typeIndex >= 0) {
1019
+ return parts[typeIndex] as 'top' | 'right' | 'bottom' | 'left';
1020
+ }
1021
+
1022
+ return undefined;
1023
+ }
1024
+
1025
+ // Add a new property to track loaded objects
1026
+ loadedObjectIds: { [key: string]: string } = {}; // Format: { id: code }
1027
+
1028
+ // Add a method to register loaded objects
1029
+ registerLoadedObject(id: string, code: string): void {
1030
+ this.loadedObjectIds[id] = code;
1031
+ }
1032
+
1033
+ // Method to check if an object was loaded from API
1034
+ wasLoadedFromApi(id: string): boolean {
1035
+ return id in this.loadedObjectIds;
1036
+ }
1037
+
1038
+ // Method to get the code for a loaded object
1039
+ getCodeForObject(id: string): string {
1040
+ return this.loadedObjectIds[id] || '';
1041
+ }
1042
+
1043
+ /**
1044
+ * Moves a node from one swimlane to another and updates all related state:
1045
+ * - Node position (swimlane-relative x/y)
1046
+ * - Swimlane arrays (removes from old, adds to new)
1047
+ * - Connection swimlane indices for this node
1048
+ * - Node's stageData.Tags and SwimLane to match the destination swimlane
1049
+ */
1050
+ moveNodeToSwimlane(
1051
+ nodeId: string,
1052
+ fromSwimlaneIndex: number,
1053
+ toSwimlaneIndex: number,
1054
+ newX: number,
1055
+ absoluteY: number // absolute SVG Y of the node at drop time
1056
+ ): Node | null {
1057
+ const fromSwimlane = this.swimlanes[fromSwimlaneIndex];
1058
+ if (!fromSwimlane?.nodes) return null;
1059
+
1060
+ const nodeIndex = fromSwimlane.nodes.findIndex((n) => n.id === nodeId);
1061
+ if (nodeIndex === -1) return null;
1062
+
1063
+ // Pull the node out – keep a local reference
1064
+ const node = fromSwimlane.nodes[nodeIndex];
1065
+
1066
+ // ── Fix the Y coordinate ──────────────────────────────────────────────
1067
+ // Template formula: absoluteSVGY = node.y + swimlane.order * 263
1068
+ // Connection formula: absoluteY = node.y + swimlaneIndex * 263 + point.y
1069
+ // Both expect node.y to be swimlane-relative:
1070
+ // node.y = absoluteSVGY - swimlane.order * 263
1071
+ node.x = newX;
1072
+ node.y = absoluteY - toSwimlaneIndex * this.swimlaneHeight;
1073
+
1074
+ // ── Move between swimlane arrays (immutable reassignment) ─────────────
1075
+ // Using filter+spread instead of splice/push so Angular's @for block
1076
+ // detects the array change on both old and new swimlane.
1077
+ fromSwimlane.nodes = fromSwimlane.nodes.filter((n) => n.id !== nodeId);
1078
+
1079
+ const toSwimlane = this.swimlanes[toSwimlaneIndex];
1080
+ toSwimlane.nodes = [...(toSwimlane.nodes || []), node];
1081
+
1082
+ // ── Update connection swimlane indices ────────────────────────────────
1083
+ this.connections = this.connections.map((conn) => {
1084
+ if (conn.sourceNodeId !== nodeId && conn.targetNodeId !== nodeId) return conn;
1085
+ return {
1086
+ ...conn,
1087
+ ...(conn.sourceNodeId === nodeId ? { sourceSwimlaneIndex: toSwimlaneIndex } : {}),
1088
+ ...(conn.targetNodeId === nodeId ? { targetSwimlaneIndex: toSwimlaneIndex } : {}),
1089
+ };
1090
+ });
1091
+
1092
+ // ── Sync node metadata to the destination swimlane ────────────────────
1093
+ node.stageData = {
1094
+ ...node.stageData,
1095
+ Tags: [...(toSwimlane.tags || [])],
1096
+ SwimLane: toSwimlane.id || '',
1097
+ };
1098
+
1099
+ return node;
1100
+ }
1101
+
1102
+ /** Swimlane height constant used for coordinate conversions. */
1103
+ readonly swimlaneHeight = 263;
1104
+ }