@pega/cosmos-react-build 8.0.0-build.9.0 → 8.0.0

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 (428) hide show
  1. package/lib/components/AppShell/AppShell.styles.d.ts +1 -1
  2. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  3. package/lib/components/AppShell/AppShell.styles.js +1 -46
  4. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  5. package/lib/components/AppShell/Header/AppHeader.d.ts +2 -3
  6. package/lib/components/AppShell/Header/AppHeader.d.ts.map +1 -1
  7. package/lib/components/AppShell/Header/AppHeader.js +4 -4
  8. package/lib/components/AppShell/Header/AppHeader.js.map +1 -1
  9. package/lib/components/AppShell/Header/AppHeader.styles.d.ts +2 -2
  10. package/lib/components/AppShell/Header/AppHeader.styles.d.ts.map +1 -1
  11. package/lib/components/BackgroundPicker/BackgroundPicker.d.ts +6 -0
  12. package/lib/components/BackgroundPicker/BackgroundPicker.d.ts.map +1 -0
  13. package/lib/components/BackgroundPicker/BackgroundPicker.js +82 -0
  14. package/lib/components/BackgroundPicker/BackgroundPicker.js.map +1 -0
  15. package/lib/components/BackgroundPicker/BackgroundPicker.styles.d.ts +15 -0
  16. package/lib/components/BackgroundPicker/BackgroundPicker.styles.d.ts.map +1 -0
  17. package/lib/components/BackgroundPicker/BackgroundPicker.styles.js +152 -0
  18. package/lib/components/BackgroundPicker/BackgroundPicker.styles.js.map +1 -0
  19. package/lib/components/BackgroundPicker/BackgroundPicker.test-ids.d.ts +5 -0
  20. package/lib/components/BackgroundPicker/BackgroundPicker.test-ids.d.ts.map +1 -0
  21. package/lib/components/BackgroundPicker/BackgroundPicker.test-ids.js +30 -0
  22. package/lib/components/BackgroundPicker/BackgroundPicker.test-ids.js.map +1 -0
  23. package/lib/components/BackgroundPicker/BackgroundPicker.types.d.ts +98 -0
  24. package/lib/components/BackgroundPicker/BackgroundPicker.types.d.ts.map +1 -0
  25. package/lib/components/BackgroundPicker/BackgroundPicker.types.js +29 -0
  26. package/lib/components/BackgroundPicker/BackgroundPicker.types.js.map +1 -0
  27. package/lib/components/BackgroundPicker/GradientConfig.d.ts +6 -0
  28. package/lib/components/BackgroundPicker/GradientConfig.d.ts.map +1 -0
  29. package/lib/components/BackgroundPicker/GradientConfig.js +149 -0
  30. package/lib/components/BackgroundPicker/GradientConfig.js.map +1 -0
  31. package/lib/components/BackgroundPicker/ImageConfig.d.ts +6 -0
  32. package/lib/components/BackgroundPicker/ImageConfig.d.ts.map +1 -0
  33. package/lib/components/BackgroundPicker/ImageConfig.js +64 -0
  34. package/lib/components/BackgroundPicker/ImageConfig.js.map +1 -0
  35. package/lib/components/BackgroundPicker/SolidColorConfig.d.ts +6 -0
  36. package/lib/components/BackgroundPicker/SolidColorConfig.d.ts.map +1 -0
  37. package/lib/components/BackgroundPicker/SolidColorConfig.js +24 -0
  38. package/lib/components/BackgroundPicker/SolidColorConfig.js.map +1 -0
  39. package/lib/components/BackgroundPicker/index.d.ts +3 -0
  40. package/lib/components/BackgroundPicker/index.d.ts.map +1 -0
  41. package/lib/components/BackgroundPicker/index.js +2 -0
  42. package/lib/components/BackgroundPicker/index.js.map +1 -0
  43. package/lib/components/BackgroundPicker/utils.d.ts +24 -0
  44. package/lib/components/BackgroundPicker/utils.d.ts.map +1 -0
  45. package/lib/components/BackgroundPicker/utils.js +186 -0
  46. package/lib/components/BackgroundPicker/utils.js.map +1 -0
  47. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +2 -3
  48. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +1 -1
  49. package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +1 -1
  50. package/lib/components/DynamicInput/BooleanControl.d.ts +3 -5
  51. package/lib/components/DynamicInput/BooleanControl.d.ts.map +1 -1
  52. package/lib/components/DynamicInput/BooleanControl.js.map +1 -1
  53. package/lib/components/DynamicInput/DynamicInput.d.ts +1 -2
  54. package/lib/components/DynamicInput/DynamicInput.d.ts.map +1 -1
  55. package/lib/components/DynamicInput/DynamicInput.js +33 -33
  56. package/lib/components/DynamicInput/DynamicInput.js.map +1 -1
  57. package/lib/components/DynamicInput/DynamicInput.styles.d.ts +2 -2
  58. package/lib/components/DynamicInput/DynamicInput.styles.d.ts.map +1 -1
  59. package/lib/components/DynamicInput/DynamicInput.styles.js +1 -0
  60. package/lib/components/DynamicInput/DynamicInput.styles.js.map +1 -1
  61. package/lib/components/DynamicInput/DynamicInput.types.d.ts +61 -11
  62. package/lib/components/DynamicInput/DynamicInput.types.d.ts.map +1 -1
  63. package/lib/components/DynamicInput/DynamicInput.types.js.map +1 -1
  64. package/lib/components/Expression/Expression.d.ts +6 -0
  65. package/lib/components/Expression/Expression.d.ts.map +1 -0
  66. package/lib/components/Expression/Expression.js +36 -0
  67. package/lib/components/Expression/Expression.js.map +1 -0
  68. package/lib/components/Expression/Expression.styles.d.ts +7 -0
  69. package/lib/components/Expression/Expression.styles.d.ts.map +1 -0
  70. package/lib/components/Expression/Expression.styles.js +47 -0
  71. package/lib/components/Expression/Expression.styles.js.map +1 -0
  72. package/lib/components/Expression/Expression.test-ids.d.ts +2 -0
  73. package/lib/components/Expression/Expression.test-ids.d.ts.map +1 -0
  74. package/lib/components/Expression/Expression.test-ids.js +8 -0
  75. package/lib/components/Expression/Expression.test-ids.js.map +1 -0
  76. package/lib/components/Expression/Expression.types.d.ts +53 -0
  77. package/lib/components/Expression/Expression.types.d.ts.map +1 -0
  78. package/lib/components/Expression/Expression.types.js +2 -0
  79. package/lib/components/Expression/Expression.types.js.map +1 -0
  80. package/lib/components/Expression/index.d.ts +3 -0
  81. package/lib/components/Expression/index.d.ts.map +1 -0
  82. package/lib/components/Expression/index.js +2 -0
  83. package/lib/components/Expression/index.js.map +1 -0
  84. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts +7 -5
  85. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +1 -1
  86. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +393 -76
  87. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +1 -1
  88. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts +9 -2
  89. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +1 -1
  90. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +100 -26
  91. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +1 -1
  92. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.test-ids.d.ts +2 -0
  93. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.test-ids.d.ts.map +1 -0
  94. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.test-ids.js +6 -0
  95. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.test-ids.js.map +1 -0
  96. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts +32 -6
  97. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts.map +1 -1
  98. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js.map +1 -1
  99. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts.map +1 -1
  100. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js +1 -0
  101. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js.map +1 -1
  102. package/lib/components/ExpressionBuilder/CodeEditor/mode/jsonLinter.d.ts +3 -0
  103. package/lib/components/ExpressionBuilder/CodeEditor/mode/jsonLinter.d.ts.map +1 -0
  104. package/lib/components/ExpressionBuilder/CodeEditor/mode/jsonLinter.js +34 -0
  105. package/lib/components/ExpressionBuilder/CodeEditor/mode/jsonLinter.js.map +1 -0
  106. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +2 -3
  107. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +1 -1
  108. package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +1 -1
  109. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +1 -1
  110. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +1 -1
  111. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +3 -1
  112. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +1 -1
  113. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +1 -1
  114. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +2 -3
  115. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +1 -1
  116. package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +1 -1
  117. package/lib/components/ExpressionBuilder/ExpressionList.d.ts +2 -3
  118. package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +1 -1
  119. package/lib/components/ExpressionBuilder/ExpressionList.js.map +1 -1
  120. package/lib/components/ExpressionBuilder/index.d.ts +1 -1
  121. package/lib/components/ExpressionBuilder/index.d.ts.map +1 -1
  122. package/lib/components/ExpressionBuilder/index.js.map +1 -1
  123. package/lib/components/FieldReference/FieldReference.styles.d.ts +1 -0
  124. package/lib/components/FieldReference/FieldReference.styles.d.ts.map +1 -1
  125. package/lib/components/FieldReference/FieldReference.styles.js +45 -37
  126. package/lib/components/FieldReference/FieldReference.styles.js.map +1 -1
  127. package/lib/components/FieldReference/FieldReference.test-ids.d.ts +1 -0
  128. package/lib/components/FieldReference/FieldReference.test-ids.d.ts.map +1 -1
  129. package/lib/components/FieldReference/FieldReference.test-ids.js +3 -0
  130. package/lib/components/FieldReference/FieldReference.test-ids.js.map +1 -1
  131. package/lib/components/FieldReference/FieldReference.types.d.ts +6 -1
  132. package/lib/components/FieldReference/FieldReference.types.d.ts.map +1 -1
  133. package/lib/components/FieldReference/FieldReference.types.js.map +1 -1
  134. package/lib/components/FieldReference/FieldReferenceDisplay.d.ts.map +1 -1
  135. package/lib/components/FieldReference/FieldReferenceDisplay.js +11 -7
  136. package/lib/components/FieldReference/FieldReferenceDisplay.js.map +1 -1
  137. package/lib/components/FieldReference/FieldReferenceInput.d.ts.map +1 -1
  138. package/lib/components/FieldReference/FieldReferenceInput.js +17 -11
  139. package/lib/components/FieldReference/FieldReferenceInput.js.map +1 -1
  140. package/lib/components/FieldReference/FieldReferenceMenuList.d.ts +5 -4
  141. package/lib/components/FieldReference/FieldReferenceMenuList.d.ts.map +1 -1
  142. package/lib/components/FieldReference/FieldReferenceMenuList.js +7 -5
  143. package/lib/components/FieldReference/FieldReferenceMenuList.js.map +1 -1
  144. package/lib/components/FieldReference/index.d.ts +2 -2
  145. package/lib/components/FieldReference/index.d.ts.map +1 -1
  146. package/lib/components/FieldReference/index.js +1 -1
  147. package/lib/components/FieldReference/index.js.map +1 -1
  148. package/lib/components/IconTile/IconTile.d.ts +7 -3
  149. package/lib/components/IconTile/IconTile.d.ts.map +1 -1
  150. package/lib/components/IconTile/IconTile.js +40 -4
  151. package/lib/components/IconTile/IconTile.js.map +1 -1
  152. package/lib/components/IconTile/IconTile.types.d.ts +17 -15
  153. package/lib/components/IconTile/IconTile.types.d.ts.map +1 -1
  154. package/lib/components/IconTile/IconTile.types.js.map +1 -1
  155. package/lib/components/IconTile/Tiles/Ai.d.ts +1 -1
  156. package/lib/components/IconTile/Tiles/Ai.d.ts.map +1 -1
  157. package/lib/components/IconTile/Tiles/Ai.js.map +1 -1
  158. package/lib/components/IconTile/Tiles/Automation.d.ts +1 -1
  159. package/lib/components/IconTile/Tiles/Automation.d.ts.map +1 -1
  160. package/lib/components/IconTile/Tiles/Automation.js.map +1 -1
  161. package/lib/components/IconTile/Tiles/AutomationAppend.d.ts +1 -1
  162. package/lib/components/IconTile/Tiles/AutomationAppend.d.ts.map +1 -1
  163. package/lib/components/IconTile/Tiles/AutomationAppend.js.map +1 -1
  164. package/lib/components/IconTile/Tiles/AutomationCall.d.ts +1 -1
  165. package/lib/components/IconTile/Tiles/AutomationCall.d.ts.map +1 -1
  166. package/lib/components/IconTile/Tiles/AutomationCall.js.map +1 -1
  167. package/lib/components/IconTile/Tiles/AutomationForEach.d.ts +1 -1
  168. package/lib/components/IconTile/Tiles/AutomationForEach.d.ts.map +1 -1
  169. package/lib/components/IconTile/Tiles/AutomationForEach.js.map +1 -1
  170. package/lib/components/IconTile/Tiles/AutomationReturn.d.ts +1 -1
  171. package/lib/components/IconTile/Tiles/AutomationReturn.d.ts.map +1 -1
  172. package/lib/components/IconTile/Tiles/AutomationReturn.js.map +1 -1
  173. package/lib/components/IconTile/Tiles/AutomationSet.d.ts +1 -1
  174. package/lib/components/IconTile/Tiles/AutomationSet.d.ts.map +1 -1
  175. package/lib/components/IconTile/Tiles/AutomationSet.js.map +1 -1
  176. package/lib/components/IconTile/Tiles/Case.d.ts +1 -1
  177. package/lib/components/IconTile/Tiles/Case.d.ts.map +1 -1
  178. package/lib/components/IconTile/Tiles/Case.js.map +1 -1
  179. package/lib/components/IconTile/Tiles/CaseGoTo.d.ts +1 -1
  180. package/lib/components/IconTile/Tiles/CaseGoTo.d.ts.map +1 -1
  181. package/lib/components/IconTile/Tiles/CaseGoTo.js.map +1 -1
  182. package/lib/components/IconTile/Tiles/CaseProcess.d.ts +1 -1
  183. package/lib/components/IconTile/Tiles/CaseProcess.d.ts.map +1 -1
  184. package/lib/components/IconTile/Tiles/CaseProcess.js.map +1 -1
  185. package/lib/components/IconTile/Tiles/CaseSla.d.ts +1 -1
  186. package/lib/components/IconTile/Tiles/CaseSla.d.ts.map +1 -1
  187. package/lib/components/IconTile/Tiles/CaseSla.js.map +1 -1
  188. package/lib/components/IconTile/Tiles/CaseStage.d.ts +1 -1
  189. package/lib/components/IconTile/Tiles/CaseStage.d.ts.map +1 -1
  190. package/lib/components/IconTile/Tiles/CaseStage.js.map +1 -1
  191. package/lib/components/IconTile/Tiles/CaseWait.d.ts +1 -1
  192. package/lib/components/IconTile/Tiles/CaseWait.d.ts.map +1 -1
  193. package/lib/components/IconTile/Tiles/CaseWait.js.map +1 -1
  194. package/lib/components/IconTile/Tiles/LogicDecisionStep.d.ts +1 -1
  195. package/lib/components/IconTile/Tiles/LogicDecisionStep.d.ts.map +1 -1
  196. package/lib/components/IconTile/Tiles/LogicDecisionStep.js.map +1 -1
  197. package/lib/components/IconTile/Tiles/LogicFunction.d.ts +1 -1
  198. package/lib/components/IconTile/Tiles/LogicFunction.d.ts.map +1 -1
  199. package/lib/components/IconTile/Tiles/LogicFunction.js.map +1 -1
  200. package/lib/components/IconTile/Tiles/LogicValidation.d.ts +1 -1
  201. package/lib/components/IconTile/Tiles/LogicValidation.d.ts.map +1 -1
  202. package/lib/components/IconTile/Tiles/LogicValidation.js.map +1 -1
  203. package/lib/components/IconTile/Tiles/LogicWhen.d.ts +1 -1
  204. package/lib/components/IconTile/Tiles/LogicWhen.d.ts.map +1 -1
  205. package/lib/components/IconTile/Tiles/LogicWhen.js.map +1 -1
  206. package/lib/components/IconTile/Tiles/RuleAuthenticate.d.ts +1 -1
  207. package/lib/components/IconTile/Tiles/RuleAuthenticate.d.ts.map +1 -1
  208. package/lib/components/IconTile/Tiles/RuleAuthenticate.js.map +1 -1
  209. package/lib/components/IconTile/Tiles/RuleConfiguration.d.ts +1 -1
  210. package/lib/components/IconTile/Tiles/RuleConfiguration.d.ts.map +1 -1
  211. package/lib/components/IconTile/Tiles/RuleConfiguration.js.map +1 -1
  212. package/lib/components/IconTile/Tiles/RuleConnector.d.ts +1 -1
  213. package/lib/components/IconTile/Tiles/RuleConnector.d.ts.map +1 -1
  214. package/lib/components/IconTile/Tiles/RuleConnector.js.map +1 -1
  215. package/lib/components/IconTile/Tiles/RuleDataPage.d.ts +1 -1
  216. package/lib/components/IconTile/Tiles/RuleDataPage.d.ts.map +1 -1
  217. package/lib/components/IconTile/Tiles/RuleDataPage.js.map +1 -1
  218. package/lib/components/IconTile/Tiles/RuleField.d.ts +1 -1
  219. package/lib/components/IconTile/Tiles/RuleField.d.ts.map +1 -1
  220. package/lib/components/IconTile/Tiles/RuleField.js.map +1 -1
  221. package/lib/components/IconTile/Tiles/RuleInsight.d.ts +1 -1
  222. package/lib/components/IconTile/Tiles/RuleInsight.d.ts.map +1 -1
  223. package/lib/components/IconTile/Tiles/RuleInsight.js.map +1 -1
  224. package/lib/components/IconTile/Tiles/RuleIntegrationSystem.d.ts +1 -1
  225. package/lib/components/IconTile/Tiles/RuleIntegrationSystem.d.ts.map +1 -1
  226. package/lib/components/IconTile/Tiles/RuleIntegrationSystem.js.map +1 -1
  227. package/lib/components/IconTile/Tiles/RuleLiveData.d.ts +1 -1
  228. package/lib/components/IconTile/Tiles/RuleLiveData.d.ts.map +1 -1
  229. package/lib/components/IconTile/Tiles/RuleLiveData.js.map +1 -1
  230. package/lib/components/IconTile/Tiles/RuleParagraph.d.ts +1 -1
  231. package/lib/components/IconTile/Tiles/RuleParagraph.d.ts.map +1 -1
  232. package/lib/components/IconTile/Tiles/RuleParagraph.js.map +1 -1
  233. package/lib/components/IconTile/Tiles/RulePermission.d.ts +1 -1
  234. package/lib/components/IconTile/Tiles/RulePermission.d.ts.map +1 -1
  235. package/lib/components/IconTile/Tiles/RulePermission.js.map +1 -1
  236. package/lib/components/IconTile/Tiles/RulePersona.d.ts +1 -1
  237. package/lib/components/IconTile/Tiles/RulePersona.d.ts.map +1 -1
  238. package/lib/components/IconTile/Tiles/RulePersona.js.map +1 -1
  239. package/lib/components/IconTile/Tiles/RulePortal.d.ts +1 -1
  240. package/lib/components/IconTile/Tiles/RulePortal.d.ts.map +1 -1
  241. package/lib/components/IconTile/Tiles/RulePortal.js.map +1 -1
  242. package/lib/components/IconTile/Tiles/RuleRecord.d.ts +1 -1
  243. package/lib/components/IconTile/Tiles/RuleRecord.d.ts.map +1 -1
  244. package/lib/components/IconTile/Tiles/RuleRecord.js.map +1 -1
  245. package/lib/components/IconTile/Tiles/RuleSystem.d.ts +1 -1
  246. package/lib/components/IconTile/Tiles/RuleSystem.d.ts.map +1 -1
  247. package/lib/components/IconTile/Tiles/RuleSystem.js.map +1 -1
  248. package/lib/components/IconTile/Tiles/RuleView.d.ts +1 -1
  249. package/lib/components/IconTile/Tiles/RuleView.d.ts.map +1 -1
  250. package/lib/components/IconTile/Tiles/RuleView.js.map +1 -1
  251. package/lib/components/IconTile/Tiles/Task.d.ts +1 -1
  252. package/lib/components/IconTile/Tiles/Task.d.ts.map +1 -1
  253. package/lib/components/IconTile/Tiles/Task.js.map +1 -1
  254. package/lib/components/IconTile/Tiles/TaskAction.d.ts +1 -1
  255. package/lib/components/IconTile/Tiles/TaskAction.d.ts.map +1 -1
  256. package/lib/components/IconTile/Tiles/TaskAction.js.map +1 -1
  257. package/lib/components/IconTile/iconUtils.d.ts +11 -0
  258. package/lib/components/IconTile/iconUtils.d.ts.map +1 -0
  259. package/lib/components/IconTile/iconUtils.js +41 -0
  260. package/lib/components/IconTile/iconUtils.js.map +1 -0
  261. package/lib/components/IconTile/index.d.ts +1 -0
  262. package/lib/components/IconTile/index.d.ts.map +1 -1
  263. package/lib/components/IconTile/index.js.map +1 -1
  264. package/lib/components/ItemLibrary/ItemLibrary.d.ts +10 -10
  265. package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +1 -1
  266. package/lib/components/ItemLibrary/ItemLibrary.js +26 -18
  267. package/lib/components/ItemLibrary/ItemLibrary.js.map +1 -1
  268. package/lib/components/LifeCycle/Category.d.ts +8 -6
  269. package/lib/components/LifeCycle/Category.d.ts.map +1 -1
  270. package/lib/components/LifeCycle/Category.js +53 -36
  271. package/lib/components/LifeCycle/Category.js.map +1 -1
  272. package/lib/components/LifeCycle/LifeCycle.d.ts +8 -4
  273. package/lib/components/LifeCycle/LifeCycle.d.ts.map +1 -1
  274. package/lib/components/LifeCycle/LifeCycle.js +113 -19
  275. package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
  276. package/lib/components/LifeCycle/LifeCycle.test-ids.d.ts +6 -0
  277. package/lib/components/LifeCycle/LifeCycle.test-ids.d.ts.map +1 -0
  278. package/lib/components/LifeCycle/LifeCycle.test-ids.js +10 -0
  279. package/lib/components/LifeCycle/LifeCycle.test-ids.js.map +1 -0
  280. package/lib/components/LifeCycle/LifeCycle.types.d.ts +713 -58
  281. package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
  282. package/lib/components/LifeCycle/LifeCycle.types.js +71 -61
  283. package/lib/components/LifeCycle/LifeCycle.types.js.map +1 -1
  284. package/lib/components/LifeCycle/LifeCycleContext.d.ts +16 -4
  285. package/lib/components/LifeCycle/LifeCycleContext.d.ts.map +1 -1
  286. package/lib/components/LifeCycle/LifeCycleContext.js +7 -1
  287. package/lib/components/LifeCycle/LifeCycleContext.js.map +1 -1
  288. package/lib/components/LifeCycle/LifeCycleDragDropList.d.ts +21 -0
  289. package/lib/components/LifeCycle/LifeCycleDragDropList.d.ts.map +1 -0
  290. package/lib/components/LifeCycle/LifeCycleDragDropList.js +298 -0
  291. package/lib/components/LifeCycle/LifeCycleDragDropList.js.map +1 -0
  292. package/lib/components/LifeCycle/LifeCycleList.d.ts +8 -6
  293. package/lib/components/LifeCycle/LifeCycleList.d.ts.map +1 -1
  294. package/lib/components/LifeCycle/LifeCycleList.js +20 -30
  295. package/lib/components/LifeCycle/LifeCycleList.js.map +1 -1
  296. package/lib/components/LifeCycle/Stage.d.ts +12 -7
  297. package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
  298. package/lib/components/LifeCycle/Stage.js +87 -72
  299. package/lib/components/LifeCycle/Stage.js.map +1 -1
  300. package/lib/components/LifeCycle/Step.d.ts +21 -14
  301. package/lib/components/LifeCycle/Step.d.ts.map +1 -1
  302. package/lib/components/LifeCycle/Step.js +75 -51
  303. package/lib/components/LifeCycle/Step.js.map +1 -1
  304. package/lib/components/LifeCycle/Task.d.ts +18 -7
  305. package/lib/components/LifeCycle/Task.d.ts.map +1 -1
  306. package/lib/components/LifeCycle/Task.js +119 -55
  307. package/lib/components/LifeCycle/Task.js.map +1 -1
  308. package/lib/components/LifeCycle/index.d.ts +2 -1
  309. package/lib/components/LifeCycle/index.d.ts.map +1 -1
  310. package/lib/components/LifeCycle/index.js +1 -0
  311. package/lib/components/LifeCycle/index.js.map +1 -1
  312. package/lib/components/LifeCycle/utils.d.ts +14 -0
  313. package/lib/components/LifeCycle/utils.d.ts.map +1 -0
  314. package/lib/components/LifeCycle/utils.js +250 -0
  315. package/lib/components/LifeCycle/utils.js.map +1 -0
  316. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts +2 -3
  317. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts.map +1 -1
  318. package/lib/components/MobileBuildSummary/MobileBuildSummary.js.map +1 -1
  319. package/lib/components/ObjectSelect/ObjectPicker.d.ts +2 -2
  320. package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +1 -1
  321. package/lib/components/ObjectSelect/ObjectPicker.js.map +1 -1
  322. package/lib/components/PageTemplates/GalleryPage.d.ts +2 -2
  323. package/lib/components/PageTemplates/GalleryPage.d.ts.map +1 -1
  324. package/lib/components/PageTemplates/GalleryPage.js.map +1 -1
  325. package/lib/components/PageTemplates/PageTemplates.d.ts +5 -5
  326. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  327. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  328. package/lib/components/PageTemplates/ShowcasePage.d.ts +2 -2
  329. package/lib/components/PageTemplates/ShowcasePage.d.ts.map +1 -1
  330. package/lib/components/PageTemplates/ShowcasePage.js.map +1 -1
  331. package/lib/components/RuleSelect/RuleSelect.js +3 -3
  332. package/lib/components/RuleSelect/RuleSelect.js.map +1 -1
  333. package/lib/components/Workbench/Workbench.d.ts +2 -3
  334. package/lib/components/Workbench/Workbench.d.ts.map +1 -1
  335. package/lib/components/Workbench/Workbench.js.map +1 -1
  336. package/lib/components/Workbench/Workbench.styles.d.ts +2 -2
  337. package/lib/components/Workbench/Workbench.styles.d.ts.map +1 -1
  338. package/lib/index.d.ts +4 -2
  339. package/lib/index.d.ts.map +1 -1
  340. package/lib/index.js +4 -2
  341. package/lib/index.js.map +1 -1
  342. package/lib/{components/FieldReference → utils}/typeIconMapping.d.ts +8 -0
  343. package/lib/utils/typeIconMapping.d.ts.map +1 -0
  344. package/lib/{components/FieldReference → utils}/typeIconMapping.js +15 -3
  345. package/lib/utils/typeIconMapping.js.map +1 -0
  346. package/package.json +16 -14
  347. package/lib/components/FieldReference/typeIconMapping.d.ts.map +0 -1
  348. package/lib/components/FieldReference/typeIconMapping.js.map +0 -1
  349. package/lib/components/FlowModeller/AddNode.d.ts +0 -18
  350. package/lib/components/FlowModeller/AddNode.d.ts.map +0 -1
  351. package/lib/components/FlowModeller/AddNode.js +0 -86
  352. package/lib/components/FlowModeller/AddNode.js.map +0 -1
  353. package/lib/components/FlowModeller/Connector.d.ts +0 -6
  354. package/lib/components/FlowModeller/Connector.d.ts.map +0 -1
  355. package/lib/components/FlowModeller/Connector.js +0 -69
  356. package/lib/components/FlowModeller/Connector.js.map +0 -1
  357. package/lib/components/FlowModeller/DeletePopover.d.ts +0 -19
  358. package/lib/components/FlowModeller/DeletePopover.d.ts.map +0 -1
  359. package/lib/components/FlowModeller/DeletePopover.js +0 -136
  360. package/lib/components/FlowModeller/DeletePopover.js.map +0 -1
  361. package/lib/components/FlowModeller/FlowModeller.d.ts +0 -5
  362. package/lib/components/FlowModeller/FlowModeller.d.ts.map +0 -1
  363. package/lib/components/FlowModeller/FlowModeller.js +0 -317
  364. package/lib/components/FlowModeller/FlowModeller.js.map +0 -1
  365. package/lib/components/FlowModeller/FlowModeller.types.d.ts +0 -27
  366. package/lib/components/FlowModeller/FlowModeller.types.d.ts.map +0 -1
  367. package/lib/components/FlowModeller/FlowModeller.types.js +0 -2
  368. package/lib/components/FlowModeller/FlowModeller.types.js.map +0 -1
  369. package/lib/components/FlowModeller/FlowModellerContext.d.ts +0 -10
  370. package/lib/components/FlowModeller/FlowModellerContext.d.ts.map +0 -1
  371. package/lib/components/FlowModeller/FlowModellerContext.js +0 -8
  372. package/lib/components/FlowModeller/FlowModellerContext.js.map +0 -1
  373. package/lib/components/FlowModeller/Node/Node.types.d.ts +0 -75
  374. package/lib/components/FlowModeller/Node/Node.types.d.ts.map +0 -1
  375. package/lib/components/FlowModeller/Node/Node.types.js +0 -27
  376. package/lib/components/FlowModeller/Node/Node.types.js.map +0 -1
  377. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +0 -20
  378. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +0 -1
  379. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +0 -151
  380. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +0 -1
  381. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +0 -6
  382. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +0 -1
  383. package/lib/components/FlowModeller/Node/NodeTemplates.js +0 -69
  384. package/lib/components/FlowModeller/Node/NodeTemplates.js.map +0 -1
  385. package/lib/components/FlowModeller/Node.d.ts +0 -5
  386. package/lib/components/FlowModeller/Node.d.ts.map +0 -1
  387. package/lib/components/FlowModeller/Node.js +0 -22
  388. package/lib/components/FlowModeller/Node.js.map +0 -1
  389. package/lib/components/FlowModeller/Renderer/Renderer.d.ts +0 -5
  390. package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +0 -1
  391. package/lib/components/FlowModeller/Renderer/Renderer.js +0 -48
  392. package/lib/components/FlowModeller/Renderer/Renderer.js.map +0 -1
  393. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +0 -18
  394. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +0 -1
  395. package/lib/components/FlowModeller/Renderer/Renderer.types.js +0 -2
  396. package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +0 -1
  397. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +0 -59
  398. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +0 -1
  399. package/lib/components/FlowModeller/Renderer/Utils/Graph.js +0 -258
  400. package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +0 -1
  401. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +0 -36
  402. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +0 -1
  403. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +0 -120
  404. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +0 -1
  405. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +0 -28
  406. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +0 -1
  407. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js +0 -172
  408. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +0 -1
  409. package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts +0 -18
  410. package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts.map +0 -1
  411. package/lib/components/FlowModeller/Utils/addNodeUtils.js +0 -141
  412. package/lib/components/FlowModeller/Utils/addNodeUtils.js.map +0 -1
  413. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts +0 -30
  414. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts.map +0 -1
  415. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js +0 -81
  416. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js.map +0 -1
  417. package/lib/components/FlowModeller/helper.d.ts +0 -39
  418. package/lib/components/FlowModeller/helper.d.ts.map +0 -1
  419. package/lib/components/FlowModeller/helper.js +0 -198
  420. package/lib/components/FlowModeller/helper.js.map +0 -1
  421. package/lib/components/FlowModeller/index.d.ts +0 -20
  422. package/lib/components/FlowModeller/index.d.ts.map +0 -1
  423. package/lib/components/FlowModeller/index.js +0 -12
  424. package/lib/components/FlowModeller/index.js.map +0 -1
  425. package/lib/components/IconTile/IconTile.styles.d.ts +0 -7
  426. package/lib/components/IconTile/IconTile.styles.d.ts.map +0 -1
  427. package/lib/components/IconTile/IconTile.styles.js +0 -68
  428. package/lib/components/IconTile/IconTile.styles.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlowModeller.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/FlowModeller.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAuB,MAAM,OAAO,CAAC;AAuBlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAsF9D,QAAA,MAAM,YAAY,sIAWf,eAAe,CAAC,iBAAiB,CAAC,gBAgTpC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,317 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useReducer, useCallback, useRef, useMemo } from 'react';
3
- import { createUID, useElement, useOuterEvent, useI18n } from '@pega/cosmos-react-core';
4
- import ItemLibrary from '../ItemLibrary/ItemLibrary';
5
- import { DirectedGraph } from './Renderer/Utils/Graph';
6
- import FlowRenderer from './Renderer/Renderer';
7
- import { START_NODETYPE, STOP_NODETYPE } from './Node/Node.types';
8
- import PlaceHolderHelper from './Utils/addNodeUtils';
9
- import { AddButton } from './AddNode';
10
- import FlowModellerHelper from './helper';
11
- import DeletePopover from './DeletePopover';
12
- import Connector from './Connector';
13
- import Node from './Node';
14
- import FlowModellerContext from './FlowModellerContext';
15
- const initState = {
16
- showLib: false,
17
- activeItem: null,
18
- allowNonBranchNode: false,
19
- activeAddBtnMeta: {
20
- target: null,
21
- meta: {
22
- refType: 'node',
23
- refId: ''
24
- }
25
- },
26
- graphData: { nodes: [], connectors: [] },
27
- highlightItems: undefined,
28
- showDeletePopover: false,
29
- deleteProps: undefined
30
- };
31
- const reducer = (state, action) => {
32
- switch (action.type) {
33
- case 'showLibrary':
34
- // minor optimization, not to update state.. if no change in the value
35
- return action.payload.show === state.showLib
36
- ? state
37
- : { ...state, showLib: action.payload.show, allowNonBranchNode: false };
38
- case 'setActiveItem':
39
- return {
40
- ...state,
41
- activeItem: action.payload.target
42
- };
43
- case 'setActiveAddButton':
44
- state.activeAddBtnMeta = {
45
- ...action.payload
46
- };
47
- return {
48
- ...state,
49
- showLib: true,
50
- allowNonBranchNode: action.payload.allowNonBranchNode
51
- };
52
- case 'setGraphData':
53
- return {
54
- ...state,
55
- graphData: action.payload.graphData,
56
- highlightItems: action.payload.highlightItems
57
- };
58
- case 'highlight':
59
- // minor optimization to avoid unnecessary re-render
60
- if (action.payload.hideDeletePopover === !state.showDeletePopover) {
61
- return state;
62
- }
63
- return {
64
- ...state,
65
- highlightItems: action.payload.highlightItems,
66
- showDeletePopover: action.payload.hideDeletePopover !== true && state.showDeletePopover
67
- };
68
- case 'showDeletePopover':
69
- return {
70
- ...state,
71
- showDeletePopover: action.payload.showDeletePopover,
72
- deleteProps: action.payload.deleteProps
73
- };
74
- default:
75
- return state;
76
- }
77
- };
78
- const FlowModeller = ({ graphData, highlightData, onNodeActionClick, onNodeAdd, nodeLibrary, onNodeClick, onDelete, actions, readOnly, selectedNodeId }) => {
79
- const [state, dispatch] = useReducer(reducer, initState);
80
- const [popoverEl, setPopoverEl] = useElement(null);
81
- const [deletePopoverEl, setDeletePopoverEl] = useElement(null);
82
- const stateRef = useRef(initState);
83
- // stateRef always refers to the same state obj
84
- // "fixed" callbacks can refer to this object whenever
85
- // it need the current value. Note: the callbacks will not
86
- // be reactive - they will not re-run the instant state changes,
87
- // but they *will* see the current value whenever they do run
88
- stateRef.current = state;
89
- const t = useI18n();
90
- const onNodeCreate = (el, meta) => {
91
- const graph = new DirectedGraph(graphData);
92
- let isAllowNonBranchNode = false;
93
- if (meta.refType === 'connector') {
94
- if (!Array.isArray(meta.refId))
95
- meta.refId = [meta.refId];
96
- const connectorData = graph.getConnector(meta.refId[0]);
97
- const toNode = graph.getNode(connectorData.toNodeId);
98
- const inConnectors = graph.getInConnectors(toNode.id);
99
- let hiddenConnectorsCount = 0;
100
- inConnectors.forEach(connector => {
101
- const node = graph.getNode(connector.fromNodeId);
102
- if (node.type.minConnectors === 0)
103
- hiddenConnectorsCount += 1;
104
- });
105
- const isPlaceholderConnector = meta.refId.length > 1;
106
- /** if node is being added on a placeholder connector then reduce number of in connectors of destination node
107
- * by total number of connectors converging/joining to form placeholder connector and add one to the in connector count
108
- */
109
- const inConnectorsCount = isPlaceholderConnector
110
- ? inConnectors.length - meta.refId.length + 1
111
- : inConnectors.length;
112
- /** if node is being added on a placeholder connector then reduce number of hidden connectors of destination node
113
- * by total number of connectors converging/joining to from placeholder connector and are originating from go to nodes
114
- */
115
- if (isPlaceholderConnector) {
116
- meta.refId.forEach(connector => {
117
- if (graph.getNode(graph.getConnector(connector).fromNodeId).type.minConnectors === 0)
118
- hiddenConnectorsCount -= 1;
119
- });
120
- }
121
- /** check destination/target node in connectors count is more than one
122
- * check non-hidden/visible connectors among in connectors of destination/target node are more than 1
123
- * check connectors converging/joining to form a placeholder connector are not equal to total number of in connectors
124
- */
125
- if (inConnectorsCount > 1 &&
126
- inConnectorsCount - hiddenConnectorsCount > 1 &&
127
- inConnectors.length !== meta.refId.length) {
128
- isAllowNonBranchNode = true;
129
- }
130
- else {
131
- isAllowNonBranchNode = false;
132
- }
133
- }
134
- dispatch({
135
- type: 'setActiveAddButton',
136
- payload: {
137
- target: el,
138
- meta,
139
- allowNonBranchNode: isAllowNonBranchNode
140
- }
141
- });
142
- };
143
- const closeMenu = () => {
144
- dispatch({
145
- type: 'showLibrary',
146
- payload: {
147
- show: false
148
- }
149
- });
150
- };
151
- const closeDeleteModel = () => {
152
- // un-highlight the nodes and connectors
153
- dispatch({
154
- type: 'highlight',
155
- payload: {
156
- highlightItems: undefined,
157
- hideDeletePopover: true
158
- }
159
- });
160
- };
161
- const onDeleteWrapper = (params, e) => {
162
- const result = FlowModellerHelper.deleteNode(graphData, params.nodeId);
163
- if (result) {
164
- if (!result.updates && result.error) {
165
- onDelete?.({ ...params, additionalData: result }, t('delete_referenced_step_error'), e);
166
- }
167
- else if (result.error) {
168
- onDelete?.({ ...params, additionalData: result }, t('delete_step_error'), e);
169
- }
170
- onDelete?.({ ...params, additionalData: result }, '', e);
171
- }
172
- else {
173
- dispatch({
174
- type: 'showDeletePopover',
175
- payload: {
176
- showDeletePopover: true,
177
- deleteProps: {
178
- flowGraphData: graphData,
179
- rendererGraphData: stateRef.current.graphData,
180
- nodeId: params.nodeId,
181
- target: {
182
- getBoundingClientRect: () => document
183
- .getElementById(`modeller-node-${stateRef.current.deleteProps?.nodeId}`)
184
- ?.getBoundingClientRect()
185
- },
186
- onChange: highlights => {
187
- dispatch({
188
- type: 'highlight',
189
- payload: {
190
- highlightItems: highlights
191
- }
192
- });
193
- },
194
- onSubmit: outcome => {
195
- // un-highlight the nodes and connectors
196
- closeDeleteModel();
197
- if (outcome.error) {
198
- onDelete?.({ ...params, additionalData: outcome }, t('delete_step_error'), e);
199
- }
200
- else {
201
- onDelete?.({ ...params, additionalData: outcome }, '', e);
202
- }
203
- },
204
- onCancel: closeDeleteModel
205
- }
206
- }
207
- });
208
- }
209
- };
210
- useEffect(() => {
211
- const graph = new DirectedGraph(graphData);
212
- const onGetNewPHNode = metaData => {
213
- return {
214
- id: createUID(),
215
- children: (_jsx(AddButton, { addNodeHandler: (e) => {
216
- onNodeCreate(e.currentTarget, metaData);
217
- } })),
218
- position: { x: 0, y: 0 },
219
- dimensions: { width: 1, height: 0 }
220
- };
221
- };
222
- const onGetNewPHConnector = (fromNodeId, toNodeId) => {
223
- return {
224
- id: createUID(),
225
- fromNodeId,
226
- toNodeId,
227
- points: [],
228
- data: {
229
- onNodeCreate,
230
- type: 'default'
231
- }
232
- };
233
- };
234
- const flowNodes = graphData.nodes.map(node => {
235
- const flowNode = {
236
- ...node,
237
- dimensions: {
238
- width: 280,
239
- height: 120
240
- },
241
- position: {
242
- x: 0,
243
- y: 0
244
- },
245
- data: {
246
- selected: selectedNodeId === node.id,
247
- actions,
248
- onDelete: onDeleteWrapper,
249
- onActionClick: onNodeActionClick,
250
- onClick: onNodeClick
251
- }
252
- };
253
- if (node.type.id === START_NODETYPE.id || node.type.id === STOP_NODETYPE.id) {
254
- flowNode.dimensions.width = 59;
255
- flowNode.dimensions.height = 59;
256
- }
257
- return flowNode;
258
- });
259
- const connectors = graphData.connectors.map(connector => {
260
- const nodeData = graph.getNode(connector.fromNodeId);
261
- const isBranchNode = nodeData.type.minConnectors === 0;
262
- return {
263
- ...connector,
264
- points: [],
265
- data: {
266
- label: connector.label,
267
- onNodeCreate,
268
- type: !isBranchNode ? 'default' : 'hidden'
269
- }
270
- };
271
- });
272
- // inject the placeholderAddNodes dynamically
273
- const newGraphData = PlaceHolderHelper.injectPlaceholderNodes({ nodes: flowNodes, connectors }, onGetNewPHNode, onGetNewPHConnector);
274
- dispatch({
275
- type: 'setGraphData',
276
- payload: {
277
- graphData: newGraphData
278
- }
279
- });
280
- }, [graphData, selectedNodeId]);
281
- // Library popover functionality
282
- const onLibraryItemSelect = useCallback((libItem) => {
283
- const metaData = state.activeAddBtnMeta.meta;
284
- closeMenu();
285
- onNodeAdd(libItem.type, metaData);
286
- }, [state.activeAddBtnMeta]);
287
- const onKeydown = useCallback((e) => {
288
- if (e.key === 'Escape') {
289
- closeMenu();
290
- }
291
- }, [closeMenu]);
292
- useOuterEvent('mousedown', [popoverEl], closeMenu);
293
- useOuterEvent('mousedown', [deletePopoverEl], closeDeleteModel);
294
- useEffect(() => {
295
- document.addEventListener('keydown', onKeydown);
296
- return () => {
297
- document.removeEventListener('keydown', onKeydown);
298
- };
299
- }, []);
300
- let items = nodeLibrary !== undefined ? nodeLibrary : [];
301
- if (!state.allowNonBranchNode) {
302
- items = items.filter(shapeTypes => {
303
- if (shapeTypes.type) {
304
- return shapeTypes.type.minConnectors !== 0;
305
- }
306
- return true;
307
- });
308
- }
309
- const ctxValue = useMemo(() => ({
310
- readOnly,
311
- highlights: highlightData ?? state.highlightItems,
312
- showNodeLibrary: state.showLib
313
- }), [readOnly, state.highlightItems, highlightData, state.showLib]);
314
- return (_jsxs("div", { children: [_jsx(FlowModellerContext.Provider, { value: ctxValue, children: _jsx(FlowRenderer, { graphData: state.graphData, connector: Connector, node: Node }) }), state.showDeletePopover && state.deleteProps && (_jsx(DeletePopover, { show: state.showDeletePopover, ref: setDeletePopoverEl, ...state.deleteProps })), _jsx(ItemLibrary, { show: state.showLib, target: state.activeAddBtnMeta.target, placeholder: t('search_nodes'), items: items, onClick: onLibraryItemSelect, ref: setPopoverEl, position: 'bottom' })] }));
315
- };
316
- export default FlowModeller;
317
- //# sourceMappingURL=FlowModeller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlowModeller.js","sourceRoot":"","sources":["../../../src/components/FlowModeller/FlowModeller.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAG5E,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGxF,OAAO,WAAW,MAAM,4BAA4B,CAAC;AAGrD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,kBAAkB,MAAM,UAAU,CAAC;AAC1C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AAoBxD,MAAM,SAAS,GAAkB;IAC/B,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,IAAI;IAChB,kBAAkB,EAAE,KAAK;IACzB,gBAAgB,EAAE;QAChB,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM;YACf,KAAK,EA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AAM,QAAQ,GAAG,OAAO,CACtB,GAAG,EAAE,CAAC,CAAC;QACL,QAAQ;QACR,UAAU,EAAE,aAAa,IAAI,KAAK,CAAC,cAAc;QACjD,eAAe,EAAE,KAAK,CAAC,OAAO;KAC/B,CAAC,EACF,CAAC,QAAQ,EAAE,KAAK,CAAC,cAAc,EAAE,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAC/D,CAAC;IAEF,OAAO,CACL,0BACE,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YAC3C,KAAC,YAAY,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,GAAI,GACjD,EAC9B,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAC,WAAW,IAAI,CAC/C,KAAC,aAAa,IACZ,IAAI,EAAE,KAAK,CAAC,iBAAiB,EAC7B,GAAG,EAAE,kBAAkB,KACnB,KAAK,CAAC,WAAW,GACrB,CACH,EACD,KAAC,WAAW,IACV,IAAI,EAAE,KAAK,CAAC,OAAO,EACnB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,MAAM,EACrC,WAAW,EAAE,CAAC,CAAC,cAAc,CAAC,EAC9B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,mBAAmB,EAC5B,GAAG,EAAE,YAAY,EACjB,QAAQ,EAAC,QAAQ,GACjB,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { useEffect, useReducer, useCallback, useRef, useMemo } from 'react';\nimport type { PropsWithoutRef, MouseEvent, Reducer } from 'react';\n\nimport { createUID, useElement, useOuterEvent, useI18n } from '@pega/cosmos-react-core';\nimport type { PopoverProps, OmitStrict } from '@pega/cosmos-react-core';\n\nimport ItemLibrary from '../ItemLibrary/ItemLibrary';\nimport type { LibraryItem } from '../ItemLibrary/ItemLibrary';\n\nimport { DirectedGraph } from './Renderer/Utils/Graph';\nimport type { GraphData } from './Renderer/Utils/Graph';\nimport type { AddNodeHandlerParams } from './Renderer/Renderer.types';\nimport FlowRenderer from './Renderer/Renderer';\nimport { START_NODETYPE, STOP_NODETYPE } from './Node/Node.types';\nimport type { ActionParams, NodeLibraryItem, NodeComponentData } from './Node/Node.types';\nimport PlaceHolderHelper from './Utils/addNodeUtils';\nimport { AddButton } from './AddNode';\nimport FlowModellerHelper from './helper';\nimport DeletePopover from './DeletePopover';\nimport type { DeletePopoverProps } from './DeletePopover';\nimport Connector from './Connector';\nimport Node from './Node';\nimport type { DeleteNodeModalOption, DeleteNodeOutcome } from './Utils/deleteNodeUtils';\nimport FlowModellerContext from './FlowModellerContext';\nimport type { FlowModellerProps } from './FlowModeller.types';\nimport type { PlottedGraphNode, PlottedGraphConnector } from './Renderer/Utils/GraphLayout';\n\ntype ModellerState = {\n showLib: boolean;\n allowNonBranchNode: boolean;\n activeItem: Element | null;\n activeAddBtnMeta: {\n target: null; // we will maintain ref of an Element\n meta: AddNodeHandlerParams;\n };\n graphData: GraphData<PlottedGraphNode, PlottedGraphConnector>;\n highlightItems?: DeleteNodeModalOption['pathItems'];\n showDeletePopover: boolean;\n deleteProps:\n | OmitStrict<DeletePopoverProps & { target: PopoverProps['target'] }, 'show'>\n | undefined;\n};\n\nconst initState: ModellerState = {\n showLib: false,\n activeItem: null,\n allowNonBranchNode: false,\n activeAddBtnMeta: {\n target: null,\n meta: {\n refType: 'node',\n refId: ''\n }\n },\n graphData: { nodes: [], connectors: [] },\n highlightItems: undefined,\n showDeletePopover: false,\n deleteProps: undefined\n};\n\nconst reducer = (state: ModellerState, action: { type: string; payload: any }) => {\n switch (action.type) {\n case 'showLibrary':\n // minor optimization, not to update state.. if no change in the value\n return action.payload.show === state.showLib\n ? state\n : { ...state, showLib: action.payload.show, allowNonBranchNode: false };\n case 'setActiveItem':\n return {\n ...state,\n activeItem: action.payload.target\n };\n case 'setActiveAddButton':\n state.activeAddBtnMeta = {\n ...action.payload\n };\n\n return {\n ...state,\n showLib: true,\n allowNonBranchNode: action.payload.allowNonBranchNode\n };\n case 'setGraphData':\n return {\n ...state,\n graphData: action.payload.graphData,\n highlightItems: action.payload.highlightItems\n };\n case 'highlight':\n // minor optimization to avoid unnecessary re-render\n if (action.payload.hideDeletePopover === !state.showDeletePopover) {\n return state;\n }\n\n return {\n ...state,\n highlightItems: action.payload.highlightItems,\n showDeletePopover: action.payload.hideDeletePopover !== true && state.showDeletePopover\n };\n case 'showDeletePopover':\n return {\n ...state,\n showDeletePopover: action.payload.showDeletePopover,\n deleteProps: action.payload.deleteProps\n };\n default:\n return state;\n }\n};\n\nconst FlowModeller = ({\n graphData,\n highlightData,\n onNodeActionClick,\n onNodeAdd,\n nodeLibrary,\n onNodeClick,\n onDelete,\n actions,\n readOnly,\n selectedNodeId\n}: PropsWithoutRef<FlowModellerProps>) => {\n const [state, dispatch] = useReducer<Reducer<ModellerState, any>>(reducer, initState);\n const [popoverEl, setPopoverEl] = useElement<HTMLElement>(null);\n const [deletePopoverEl, setDeletePopoverEl] = useElement<HTMLElement>(null);\n const stateRef = useRef<ModellerState>(initState);\n\n // stateRef always refers to the same state obj\n // \"fixed\" callbacks can refer to this object whenever\n // it need the current value. Note: the callbacks will not\n // be reactive - they will not re-run the instant state changes,\n // but they *will* see the current value whenever they do run\n stateRef.current = state;\n const t = useI18n();\n\n const onNodeCreate = (el: HTMLElement | SVGForeignObjectElement, meta: AddNodeHandlerParams) => {\n const graph = new DirectedGraph(graphData);\n let isAllowNonBranchNode = false;\n if (meta.refType === 'connector') {\n if (!Array.isArray(meta.refId)) meta.refId = [meta.refId];\n const connectorData = graph.getConnector(meta.refId[0]);\n const toNode = graph.getNode(connectorData.toNodeId);\n const inConnectors = graph.getInConnectors(toNode.id);\n let hiddenConnectorsCount = 0;\n inConnectors.forEach(connector => {\n const node = graph.getNode(connector.fromNodeId);\n if (node.type.minConnectors === 0) hiddenConnectorsCount += 1;\n });\n const isPlaceholderConnector = meta.refId.length > 1;\n\n /** if node is being added on a placeholder connector then reduce number of in connectors of destination node\n * by total number of connectors converging/joining to form placeholder connector and add one to the in connector count\n */\n const inConnectorsCount = isPlaceholderConnector\n ? inConnectors.length - meta.refId.length + 1\n : inConnectors.length;\n\n /** if node is being added on a placeholder connector then reduce number of hidden connectors of destination node\n * by total number of connectors converging/joining to from placeholder connector and are originating from go to nodes\n */\n if (isPlaceholderConnector) {\n meta.refId.forEach(connector => {\n if (graph.getNode(graph.getConnector(connector).fromNodeId).type.minConnectors === 0)\n hiddenConnectorsCount -= 1;\n });\n }\n\n /** check destination/target node in connectors count is more than one\n * check non-hidden/visible connectors among in connectors of destination/target node are more than 1\n * check connectors converging/joining to form a placeholder connector are not equal to total number of in connectors\n */\n if (\n inConnectorsCount > 1 &&\n inConnectorsCount - hiddenConnectorsCount > 1 &&\n inConnectors.length !== meta.refId.length\n ) {\n isAllowNonBranchNode = true;\n } else {\n isAllowNonBranchNode = false;\n }\n }\n dispatch({\n type: 'setActiveAddButton',\n payload: {\n target: el,\n meta,\n allowNonBranchNode: isAllowNonBranchNode\n }\n });\n };\n\n const closeMenu = () => {\n dispatch({\n type: 'showLibrary',\n payload: {\n show: false\n }\n });\n };\n\n const closeDeleteModel = () => {\n // un-highlight the nodes and connectors\n dispatch({\n type: 'highlight',\n payload: {\n highlightItems: undefined,\n hideDeletePopover: true\n }\n });\n };\n\n const onDeleteWrapper = (params: ActionParams, e: MouseEvent) => {\n const result: DeleteNodeOutcome | false = FlowModellerHelper.deleteNode(\n graphData,\n params.nodeId\n );\n if (result) {\n if (!result.updates && result.error) {\n onDelete?.({ ...params, additionalData: result }, t('delete_referenced_step_error'), e);\n } else if (result.error) {\n onDelete?.({ ...params, additionalData: result }, t('delete_step_error'), e);\n }\n onDelete?.({ ...params, additionalData: result }, '', e);\n } else {\n dispatch({\n type: 'showDeletePopover',\n payload: {\n showDeletePopover: true,\n deleteProps: {\n flowGraphData: graphData,\n rendererGraphData: stateRef.current.graphData,\n nodeId: params.nodeId,\n target: {\n getBoundingClientRect: () =>\n document\n .getElementById(`modeller-node-${stateRef.current.deleteProps?.nodeId}`)\n ?.getBoundingClientRect()\n } as PopoverProps['target'],\n onChange: highlights => {\n dispatch({\n type: 'highlight',\n payload: {\n highlightItems: highlights\n }\n });\n },\n onSubmit: outcome => {\n // un-highlight the nodes and connectors\n closeDeleteModel();\n if (outcome.error) {\n onDelete?.({ ...params, additionalData: outcome }, t('delete_step_error'), e);\n } else {\n onDelete?.({ ...params, additionalData: outcome }, '', e);\n }\n },\n onCancel: closeDeleteModel\n } as ModellerState['deleteProps']\n }\n });\n }\n };\n\n useEffect(() => {\n const graph = new DirectedGraph(graphData);\n const onGetNewPHNode: (metaData: AddNodeHandlerParams) => PlottedGraphNode = metaData => {\n return {\n id: createUID(),\n children: (\n <AddButton\n addNodeHandler={(e: MouseEvent<HTMLButtonElement>) => {\n onNodeCreate(e.currentTarget as HTMLElement, metaData);\n }}\n />\n ),\n position: { x: 0, y: 0 },\n dimensions: { width: 1, height: 0 }\n };\n };\n\n const onGetNewPHConnector: (\n fromNodeId: string,\n toNodeId: string,\n metaData: AddNodeHandlerParams\n ) => PlottedGraphConnector = (fromNodeId, toNodeId) => {\n return {\n id: createUID(),\n fromNodeId,\n toNodeId,\n points: [],\n data: {\n onNodeCreate,\n type: 'default'\n }\n };\n };\n\n const flowNodes: PlottedGraphNode[] = graphData.nodes.map(node => {\n const flowNode: PlottedGraphNode = {\n ...node,\n dimensions: {\n width: 280,\n height: 120\n },\n position: {\n x: 0,\n y: 0\n },\n data: {\n selected: selectedNodeId === node.id,\n actions,\n onDelete: onDeleteWrapper,\n onActionClick: onNodeActionClick,\n onClick: onNodeClick\n } as NodeComponentData\n };\n\n if (node.type.id === START_NODETYPE.id || node.type.id === STOP_NODETYPE.id) {\n flowNode.dimensions.width = 59;\n flowNode.dimensions.height = 59;\n }\n return flowNode;\n });\n\n const connectors: PlottedGraphConnector[] = graphData.connectors.map(connector => {\n const nodeData = graph.getNode(connector.fromNodeId);\n const isBranchNode = nodeData.type.minConnectors === 0;\n return {\n ...connector,\n points: [],\n data: {\n label: connector.label,\n onNodeCreate,\n type: !isBranchNode ? 'default' : 'hidden'\n }\n };\n });\n\n // inject the placeholderAddNodes dynamically\n const newGraphData: GraphData<PlottedGraphNode, PlottedGraphConnector> =\n PlaceHolderHelper.injectPlaceholderNodes(\n { nodes: flowNodes, connectors },\n onGetNewPHNode,\n onGetNewPHConnector\n );\n\n dispatch({\n type: 'setGraphData',\n payload: {\n graphData: newGraphData\n }\n });\n }, [graphData, selectedNodeId]);\n\n // Library popover functionality\n const onLibraryItemSelect = useCallback(\n (libItem: LibraryItem) => {\n const metaData = state.activeAddBtnMeta.meta;\n closeMenu();\n onNodeAdd((libItem as NodeLibraryItem).type, metaData);\n },\n [state.activeAddBtnMeta]\n );\n\n const onKeydown = useCallback(\n (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n closeMenu();\n }\n },\n [closeMenu]\n );\n\n useOuterEvent('mousedown', [popoverEl], closeMenu);\n useOuterEvent('mousedown', [deletePopoverEl], closeDeleteModel);\n\n useEffect(() => {\n document.addEventListener('keydown', onKeydown);\n\n return () => {\n document.removeEventListener('keydown', onKeydown);\n };\n }, []);\n\n let items: NodeLibraryItem[] = nodeLibrary !== undefined ? nodeLibrary : [];\n\n if (!state.allowNonBranchNode) {\n items = items.filter(shapeTypes => {\n if (shapeTypes.type) {\n return shapeTypes.type.minConnectors !== 0;\n }\n return true;\n });\n }\n const ctxValue = useMemo(\n () => ({\n readOnly,\n highlights: highlightData ?? state.highlightItems,\n showNodeLibrary: state.showLib\n }),\n [readOnly, state.highlightItems, highlightData, state.showLib]\n );\n\n return (\n <div>\n <FlowModellerContext.Provider value={ctxValue}>\n <FlowRenderer graphData={state.graphData} connector={Connector} node={Node} />\n </FlowModellerContext.Provider>\n {state.showDeletePopover && state.deleteProps && (\n <DeletePopover\n show={state.showDeletePopover}\n ref={setDeletePopoverEl}\n {...state.deleteProps}\n />\n )}\n <ItemLibrary\n show={state.showLib}\n target={state.activeAddBtnMeta.target}\n placeholder={t('search_nodes')}\n items={items}\n onClick={onLibraryItemSelect}\n ref={setPopoverEl}\n position='bottom'\n />\n </div>\n );\n};\n\nexport default FlowModeller;\n"]}
@@ -1,27 +0,0 @@
1
- import type { MouseEvent } from 'react';
2
- import type { Action } from '@pega/cosmos-react-core';
3
- import type { GraphData, ConnectorProps } from './Renderer/Utils/Graph';
4
- import type { AddNodeHandlerParams, RendererProps } from './Renderer/Renderer.types';
5
- import type { ActionParams, NodeProps, NodeLibraryItem, NodeType } from './Node/Node.types';
6
- export interface FlowModellerProps {
7
- graphData: GraphData<NodeProps, ConnectorProps>;
8
- /** Node actions */
9
- actions?: Action[];
10
- /** Callback to add node from connector */
11
- onNodeAdd: (nodeType: NodeType, params: AddNodeHandlerParams) => void;
12
- /** Callback for handling the click on the node */
13
- onNodeClick?: (nodeId: string) => void;
14
- /** Callback for actions on Node */
15
- onNodeActionClick?: (param: ActionParams, e: MouseEvent) => void;
16
- /** Callback for node deletion */
17
- onDelete?: (param: ActionParams, error: string, e: MouseEvent) => void;
18
- /** Types of nodes */
19
- nodeLibrary: NodeLibraryItem[];
20
- /** Highlights */
21
- highlightData?: RendererProps['highlights'];
22
- /** To make FlowModeller readOnly state */
23
- readOnly?: boolean;
24
- /** Current selected node */
25
- selectedNodeId?: NodeProps['id'];
26
- }
27
- //# sourceMappingURL=FlowModeller.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlowModeller.types.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/FlowModeller.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5F,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,SAAS,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAChD,mBAAmB;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,0CAA0C;IAC1C,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACtE,kDAAkD;IAClD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,mCAAmC;IACnC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACjE,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACvE,qBAAqB;IACrB,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,iBAAiB;IACjB,aAAa,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAC5C,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;CAClC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=FlowModeller.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlowModeller.types.js","sourceRoot":"","sources":["../../../src/components/FlowModeller/FlowModeller.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { MouseEvent } from 'react';\n\nimport type { Action } from '@pega/cosmos-react-core';\n\nimport type { GraphData, ConnectorProps } from './Renderer/Utils/Graph';\nimport type { AddNodeHandlerParams, RendererProps } from './Renderer/Renderer.types';\nimport type { ActionParams, NodeProps, NodeLibraryItem, NodeType } from './Node/Node.types';\n\nexport interface FlowModellerProps {\n graphData: GraphData<NodeProps, ConnectorProps>;\n /** Node actions */\n actions?: Action[];\n /** Callback to add node from connector */\n onNodeAdd: (nodeType: NodeType, params: AddNodeHandlerParams) => void;\n /** Callback for handling the click on the node */\n onNodeClick?: (nodeId: string) => void;\n /** Callback for actions on Node */\n onNodeActionClick?: (param: ActionParams, e: MouseEvent) => void;\n /** Callback for node deletion */\n onDelete?: (param: ActionParams, error: string, e: MouseEvent) => void;\n /** Types of nodes */\n nodeLibrary: NodeLibraryItem[];\n /** Highlights */\n highlightData?: RendererProps['highlights'];\n /** To make FlowModeller readOnly state */\n readOnly?: boolean;\n /** Current selected node */\n selectedNodeId?: NodeProps['id'];\n}\n"]}
@@ -1,10 +0,0 @@
1
- import type { FlowModellerProps } from './FlowModeller.types';
2
- import type { RendererProps } from './Renderer/Renderer.types';
3
- export interface FlowModellerContextValue {
4
- readOnly: FlowModellerProps['readOnly'];
5
- highlights: RendererProps['highlights'];
6
- showNodeLibrary: boolean;
7
- }
8
- declare const FlowModellerContext: import("react").Context<FlowModellerContextValue>;
9
- export default FlowModellerContext;
10
- //# sourceMappingURL=FlowModellerContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlowModellerContext.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/FlowModellerContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACxC,UAAU,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACxC,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,QAAA,MAAM,mBAAmB,mDAIvB,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
@@ -1,8 +0,0 @@
1
- import { createContext } from 'react';
2
- const FlowModellerContext = createContext({
3
- readOnly: false,
4
- highlights: { nodes: {}, connectors: {} },
5
- showNodeLibrary: false
6
- });
7
- export default FlowModellerContext;
8
- //# sourceMappingURL=FlowModellerContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlowModellerContext.js","sourceRoot":"","sources":["../../../src/components/FlowModeller/FlowModellerContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAWtC,MAAM,mBAAmB,GAAG,aAAa,CAA2B;IAClE,QAAQ,EAAE,KAAK;IACf,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACzC,eAAe,EAAE,KAAK;CACvB,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC","sourcesContent":["import { createContext } from 'react';\n\nimport type { FlowModellerProps } from './FlowModeller.types';\nimport type { RendererProps } from './Renderer/Renderer.types';\n\nexport interface FlowModellerContextValue {\n readOnly: FlowModellerProps['readOnly'];\n highlights: RendererProps['highlights'];\n showNodeLibrary: boolean;\n}\n\nconst FlowModellerContext = createContext<FlowModellerContextValue>({\n readOnly: false,\n highlights: { nodes: {}, connectors: {} },\n showNodeLibrary: false\n});\n\nexport default FlowModellerContext;\n"]}
@@ -1,75 +0,0 @@
1
- import type { MouseEvent, KeyboardEvent } from 'react';
2
- import type { Action, OmitStrict } from '@pega/cosmos-react-core';
3
- import type { Node } from '../Renderer/Utils/Graph';
4
- import type { ItemVisual, LibraryItem } from '../../ItemLibrary/ItemLibrary';
5
- export interface NodeType extends ItemVisual {
6
- /** node type id. this must be unique */
7
- id: string;
8
- /** human readable name of the type */
9
- name: string;
10
- /** min no. of connectors */
11
- minConnectors: number;
12
- defaults: {
13
- node: OmitStrict<NodeProps, 'type' | 'id'>;
14
- connector: {
15
- label: string;
16
- }[];
17
- };
18
- }
19
- export interface ReferenceProps {
20
- /** id of the reference node */
21
- id: string;
22
- /** label of the reference node */
23
- label: string;
24
- }
25
- export interface NodeProps extends Node {
26
- /** Unique id for Node */
27
- id: string;
28
- /** Label for Node */
29
- label: string;
30
- /** Description for Node */
31
- description?: string;
32
- /** Referenced Node id */
33
- reference?: NodeProps['id'];
34
- /** Additional data for Node */
35
- additionalData?: AdditionalDataItemProps[];
36
- /** type of the Node */
37
- type: NodeType;
38
- /** error message for node */
39
- error?: string;
40
- }
41
- export interface ModellerNodeComponentProps<NodeComponentData> extends NodeProps {
42
- data: NodeComponentData;
43
- }
44
- export interface NodeComponentData {
45
- /** Callback for the node actions click */
46
- onActionClick?: (params: ActionParams, e: MouseEvent | KeyboardEvent) => void;
47
- /** Callback for the node click */
48
- onClick?: (nodeId: NodeProps['id'], e: MouseEvent | KeyboardEvent) => void;
49
- /** Callback for node deletion */
50
- onDelete?: (params: ActionParams, e: MouseEvent | KeyboardEvent) => void;
51
- /** Actions for the node click */
52
- actions?: Action[];
53
- /** If node is selected */
54
- selected?: boolean;
55
- }
56
- export interface NodeComponentProps extends NodeProps, NodeComponentData {
57
- referencedNode?: NodeProps;
58
- }
59
- export interface AdditionalDataItemProps {
60
- id: string;
61
- label: string;
62
- value: string;
63
- }
64
- export interface ActionParams {
65
- actionId: string;
66
- nodeId: NodeProps['id'];
67
- additionalData?: unknown;
68
- }
69
- export interface NodeLibraryItem extends LibraryItem {
70
- type: NodeType;
71
- items?: NodeLibraryItem[];
72
- }
73
- export declare const START_NODETYPE: NodeType;
74
- export declare const STOP_NODETYPE: NodeType;
75
- //# sourceMappingURL=Node.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Node.types.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Node/Node.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,EAA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E,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IAC9E,kCAAkC;IAClC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IAC3E,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IACzE,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,SAAS,EAAE,iBAAiB;IACtE,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,EAAE,QAY3B,CAAC;AAEH,eAAO,MAAM,aAAa,EAAE,QAY1B,CAAC"}
@@ -1,27 +0,0 @@
1
- export const START_NODETYPE = Object.freeze({
2
- id: 'start',
3
- name: 'start',
4
- color: 'green',
5
- icon: 'circle',
6
- minConnectors: 1,
7
- defaults: {
8
- node: {
9
- label: 'Start'
10
- },
11
- connector: []
12
- }
13
- });
14
- export const STOP_NODETYPE = Object.freeze({
15
- id: 'stop',
16
- name: 'stop',
17
- color: 'red',
18
- icon: 'circle',
19
- minConnectors: 0,
20
- defaults: {
21
- node: {
22
- label: 'Stop'
23
- },
24
- connector: []
25
- }
26
- });
27
- //# sourceMappingURL=Node.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Node.types.js","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Node/Node.types.ts"],"names":[],"mappings":"AAmFA,MAAM,CAAC,MAAM,cAAc,GAAa,MAAM,CAAC,MAAM,CAAC;IACpD,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,QAAQ;IACd,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,KAAK,EAAE,OAAO;SACf;QACD,SAAS,EAAE,EAAE;KACd;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAa,MAAM,CAAC,MAAM,CAAC;IACnD,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,QAAQ;IACd,aAAa,EAAE,CAAC;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;SACd;QACD,SAAS,EAAE,EAAE;KACd;CACF,CAAC,CAAC","sourcesContent":["import type { MouseEvent, KeyboardEvent } from 'react';\n\nimport type { Action, OmitStrict } from '@pega/cosmos-react-core';\n\nimport type { Node } from '../Renderer/Utils/Graph';\nimport type { ItemVisual, LibraryItem } from '../../ItemLibrary/ItemLibrary';\n\nexport interface NodeType extends ItemVisual {\n /** node type id. this must be unique */\n id: string;\n /** human readable name of the type */\n name: string;\n /** min no. of connectors */\n minConnectors: number;\n defaults: {\n node: OmitStrict<NodeProps, 'type' | 'id'>;\n connector: {\n label: string;\n }[];\n };\n}\n\nexport interface ReferenceProps {\n /** id of the reference node */\n id: string;\n /** label of the reference node */\n label: string;\n}\n\nexport interface NodeProps extends Node {\n /** Unique id for Node */\n id: string;\n /** Label for Node */\n label: string;\n /** Description for Node */\n description?: string;\n /** Referenced Node id */\n reference?: NodeProps['id'];\n /** Additional data for Node */\n additionalData?: AdditionalDataItemProps[];\n /** type of the Node */\n type: NodeType;\n /** error message for node */\n error?: string;\n}\n\nexport interface ModellerNodeComponentProps<NodeComponentData> extends NodeProps {\n data: NodeComponentData;\n}\n\nexport interface NodeComponentData {\n /** Callback for the node actions click */\n onActionClick?: (params: ActionParams, e: MouseEvent | KeyboardEvent) => void;\n /** Callback for the node click */\n onClick?: (nodeId: NodeProps['id'], e: MouseEvent | KeyboardEvent) => void;\n /** Callback for node deletion */\n onDelete?: (params: ActionParams, e: MouseEvent | KeyboardEvent) => void;\n /** Actions for the node click */\n actions?: Action[];\n /** If node is selected */\n selected?: boolean;\n}\n\nexport interface NodeComponentProps extends NodeProps, NodeComponentData {\n referencedNode?: NodeProps;\n}\n\nexport interface AdditionalDataItemProps {\n id: string;\n label: string;\n value: string;\n}\nexport interface ActionParams {\n actionId: string;\n nodeId: NodeProps['id'];\n additionalData?: unknown;\n}\n\nexport interface NodeLibraryItem extends LibraryItem {\n type: NodeType;\n items?: NodeLibraryItem[];\n}\n\nexport const START_NODETYPE: NodeType = Object.freeze({\n id: 'start',\n name: 'start',\n color: 'green',\n icon: 'circle',\n minConnectors: 1,\n defaults: {\n node: {\n label: 'Start'\n },\n connector: []\n }\n});\n\nexport const STOP_NODETYPE: NodeType = Object.freeze({\n id: 'stop',\n name: 'stop',\n color: 'red',\n icon: 'circle',\n minConnectors: 0,\n defaults: {\n node: {\n label: 'Stop'\n },\n connector: []\n }\n});\n"]}
@@ -1,20 +0,0 @@
1
- import type { NodeType } from './Node.types';
2
- export declare const StyledCircle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
- export declare const StyledLabel: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").TextProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
4
- nodeType: NodeType;
5
- }, never>;
6
- export declare const StyledIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
- export declare const StyledNodeTemplateHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {}, never>;
8
- export declare const StyledText: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").TextProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
9
- error?: string | undefined;
10
- }, never>;
11
- export declare const StyledNodeTemplate: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").CardProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
12
- highlight: boolean;
13
- }, never>;
14
- export declare const StyledNodeTemplateFooter: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").CardFooterProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
15
- export declare const StyledNodeTempleteContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
16
- export declare const StyledAdditionalData: import("styled-components").StyledComponent<"dl", import("styled-components").DefaultTheme, {}, never>;
17
- export declare const StyledAdditionalDataItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
18
- export declare const StyledTextWithEllipsis: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").TextProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
19
- export declare const StyledErrorIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, import("styled-components").DefaultTheme, {}, never>;
20
- //# sourceMappingURL=NodeTemplate.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NodeTemplate.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/FlowModeller/Node/NodeTemplate.styles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,eAAO,MAAM,YAAY,yGAYvB,CAAC;AAIH,eAAO,MAAM,WAAW;cAA4B,QAAQ;SAW1D,CAAC;AAIH,eAAO,MAAM,UAAU,yGAWrB,CAAC;AAIH,eAAO,MAAM,wBAAwB,4GAOnC,CAAC;AAIH,eAAO,MAAM,UAAU;YAA0B,MAAM,GAAG,SAAS;SAOjE,CAAC;AAIH,eAAO,MAAM,kBAAkB;eAA6B,OAAO;SAoCjE,CAAC;AAIH,eAAO,MAAM,wBAAwB,yOAOnC,CAAC;AAIH,eAAO,MAAM,yBAAyB,yGAapC,CAAC;AAIH,eAAO,MAAM,oBAAoB,wGAEhC,CAAC;AAEF,eAAO,MAAM,wBAAwB,yGAMnC,CAAC;AAIH,eAAO,MAAM,sBAAsB,mOAQjC,CAAC;AAIH,eAAO,MAAM,eAAe,0LAK1B,CAAC"}