@pega/cosmos-react-build 8.0.0-build.9.1 → 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
@@ -0,0 +1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AO,CACL,KAAC,YAAY,IACX,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,IAAI,EAAE,IAAI,CAAC,IAAI,KACX,IAAI,CAAC,IAAI,EACb,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,KAClB,SAAS,EACb,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,GAC/B,CACH,CAAC;gCACJ,CAAC,IApBI,IAAI,CAAC,EAAE,CAqBF,CACb,CAAC;wBACJ,CAAC,CAAC,EAED,kBAAkB,IACT,CACb,CAAC;YACJ,CAAC,GACS,GACiB,CAChC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import { useState, useRef, useMemo, useContext, useLayoutEffect, useEffect } from 'react';\nimport type { ComponentType, ReactNode, RefObject } from 'react';\nimport type { DragSourceMonitor, DropTargetMonitor } from 'react-dnd';\n\nimport { useElement, useUID } from '@pega/cosmos-react-core';\nimport type {\n AsProp,\n BaseProps,\n ForwardProps,\n NoChildrenProp,\n OmitStrict,\n TestIdProp\n} from '@pega/cosmos-react-core';\nimport { Draggable, DragDropListContext, Droppable } from '@pega/cosmos-react-dnd';\nimport type { DraggableItem, DragDropListContextValue } from '@pega/cosmos-react-dnd';\n\nimport type {\n IndexData,\n LifeCycleDragDropEvent,\n LifeCycleDragItemType,\n LifeCycleProps\n} from './LifeCycle.types';\nimport type { StageComponentProps } from './Stage';\nimport type { StepComponentProps } from './Step';\nimport LifeCycleContext from './LifeCycleContext';\nimport { getListLocation } from './utils';\n\ninterface LifeCycleDragDropListProps<T extends object = object>\n extends AsProp,\n BaseProps,\n NoChildrenProp,\n TestIdProp,\n Pick<LifeCycleProps, 'onDragDrop'> {\n /** Unique identifier for the list */\n id?: string;\n /** The type of item within the list. */\n type: LifeCycleDragItemType;\n /** A set of indices that identify the list's location within the LifeCycle. */\n listLocation: IndexData;\n /** Array of data objects used for the list. */\n items: DraggableItem<T>[];\n /** User defined function that should return content for the draggable element. */\n itemRenderer: ComponentType<T>;\n /** A region for non-list item elements to be included in the droppable region. */\n additionalDropZone?: ReactNode;\n}\n\ninterface LifeCycleDragDropListItem<T extends object = object> extends DraggableItem<T> {\n /** Returns the dragged item to its original position. */\n returnToSource?: (item: DraggableItem<T>) => void;\n /** Removes the dragged item from its original position. */\n removeFromSource?: () => void;\n /** Triggers onDragDrop with data related to the new item position. */\n changeTarget?: (item: LifeCycleDragDropListItem<T>) => void;\n /** Data related to the item being dragged. */\n sourceData?: LifeCycleDragDropEvent['sourceData'];\n /** Data related to the target position of the dragged item. */\n targetData?: LifeCycleDragDropEvent['targetData'];\n /** The id of the list that the dragged item originated from. */\n sourceListId?: string;\n /** The id of the list that the item was dropped into. */\n targetListId?: string;\n /** Ref for the items in the droppable list. */\n targetItemsRef?: RefObject<LifeCycleDragDropListItem<T>[]>;\n}\n\nconst LifeCycleDragDropList = <T extends object = object>({\n testId,\n id: idProp,\n type,\n listLocation,\n items,\n itemRenderer: ItemRenderer,\n additionalDropZone,\n onDragDrop,\n as: Component = 'ul',\n ...restProps\n}: LifeCycleDragDropListProps<T> & ForwardProps) => {\n const { lifeCycleData, dragDropConfig, draggedItem, setDraggedItem } =\n useContext(LifeCycleContext);\n const [clonedItems, setClonedItems] = useState<LifeCycleDragDropListItem<T>[]>(items);\n const draggedItemRef = useRef<LifeCycleDragDropListItem<T> | null>(null);\n const draggedItemElRef = useRef<HTMLElement | null>(null);\n const itemHoveringRef = useRef(false);\n const itemRectsRef = useRef<DOMRect[] | null>(null);\n const [listEl, setListEl] = useElement<HTMLElement>();\n const uniqueId = useUID();\n const listId = idProp ?? uniqueId;\n\n const normalizedType = type.replace('alternate-', '') as LifeCycleDragDropEvent['type'];\n\n const getItemData = (\n item: LifeCycleDragDropListItem<T>,\n newIndex?: number\n ): LifeCycleDragDropEvent['sourceData'] => {\n if (item.type === 'stage' || item.type === 'alternate-stage') {\n const data = item.data as StageComponentProps;\n return { alternate: !!data.item.alternate, stage: newIndex ?? data.item.index };\n }\n if (item.type === 'step' || item.type === 'alternate-step') {\n const data = item.data as StepComponentProps;\n return {\n alternate: !!data.item.alternate,\n stage: data.stageItem.index,\n category: data.categoryItem.index,\n task: data.taskItem.index,\n subTask: data.taskItem.subIndex,\n step: newIndex ?? data.item.index\n };\n }\n return { alternate: false, stage: -1 };\n };\n\n const getItemRects = (): DOMRect[] | null => {\n if (!listEl || listEl.children.length === 0) return null;\n return [...listEl.children].map(itemEl => {\n return itemEl.getBoundingClientRect();\n });\n };\n\n useLayoutEffect(() => {\n if (\n !dragDropConfig.loading &&\n (!draggedItem?.navigatingWithKeyboard ||\n (draggedItem?.navigatingWithKeyboard && !draggedItemRef.current))\n ) {\n setClonedItems(items);\n }\n }, [items]);\n\n const internalItemsRef = useRef(clonedItems);\n internalItemsRef.current = clonedItems;\n\n const triggerOnChange = (\n sourceData?: LifeCycleDragDropEvent['sourceData'],\n targetData?: LifeCycleDragDropEvent['targetData']\n ) => {\n if (\n !onDragDrop ||\n !sourceData ||\n !targetData ||\n JSON.stringify(sourceData) === JSON.stringify(targetData)\n )\n return;\n onDragDrop({\n type: normalizedType,\n sourceData,\n targetData\n });\n };\n\n const getInsertIndex = (\n item: DraggableItem<T>,\n monitor: DropTargetMonitor | DragSourceMonitor\n ): number => {\n itemRectsRef.current = getItemRects();\n const { current: itemRects } = itemRectsRef;\n let insertIndex = -1;\n const prevIndex = clonedItems.findIndex(({ id }) => id === item.id);\n\n const clientXY = monitor.getClientOffset();\n if (!itemRects || !clientXY) return insertIndex;\n\n // If dragging stages, position must be calculated on the x-axis rather than the y-axis\n const dragPreviewRectAnchor = normalizedType === 'stage' ? clientXY.x : clientXY.y;\n const orientation = normalizedType === 'stage' ? 'horizontal' : 'vertical';\n\n const calculateMiddle = ({ left, right, top, bottom }: DOMRect): number => {\n if (orientation === 'horizontal') {\n return left + (right - left) / 2;\n }\n return top + (bottom - top) / 2;\n };\n\n const atHead = dragPreviewRectAnchor < calculateMiddle(itemRects[0]);\n const atTail = dragPreviewRectAnchor >= calculateMiddle(itemRects[itemRects.length - 1]);\n\n if (atHead) {\n insertIndex = 0;\n } else if (atTail) {\n insertIndex = prevIndex === itemRects.length - 1 ? prevIndex : itemRects.length;\n } else {\n itemRects.some((rect, i, rects) => {\n if (i === rects.length - 1) {\n if (prevIndex === i) insertIndex = i;\n return true;\n }\n const afterCurrent = dragPreviewRectAnchor >= calculateMiddle(rect);\n const beforeNext = dragPreviewRectAnchor < calculateMiddle(rects[i + 1]);\n\n if (afterCurrent && beforeNext) {\n if (prevIndex !== -1 && i >= prevIndex) insertIndex = i;\n else insertIndex = i + 1;\n return true;\n }\n return false;\n });\n }\n\n return insertIndex;\n };\n\n // Re-arrange items within the applicable lists in relation to the position of the item being dragged\n const positionItems = (item: LifeCycleDragDropListItem<T>, monitor: DropTargetMonitor): void => {\n if (!monitor.canDrop() || !monitor.isOver({ shallow: true })) return;\n\n const prevIndex = clonedItems.findIndex(({ id }) => id === item.id);\n\n const insertIndex = getInsertIndex(item, monitor);\n const targetData = { ...listLocation };\n targetData[normalizedType] = insertIndex;\n item.targetData = targetData;\n item.targetListId = listId;\n\n item.changeTarget = i => triggerOnChange(i.sourceData, i.targetData);\n item.targetItemsRef = internalItemsRef;\n\n let newItems: DraggableItem<T>[];\n\n if (prevIndex !== -1) {\n if (insertIndex === prevIndex) return;\n\n newItems = clonedItems.filter(({ id }) => id !== item.id);\n newItems.splice(insertIndex, 0, item);\n\n setClonedItems(newItems);\n } else {\n newItems = [...clonedItems];\n newItems.splice(insertIndex, 0, item);\n\n setClonedItems(newItems);\n }\n };\n\n // Setup data to manage the item being dragged\n const onBegin =\n (itemId: DraggableItem<T>['id']) =>\n (): OmitStrict<LifeCycleDragDropListItem<T>, keyof DraggableItem<T>> => {\n setDraggedItem({ type: normalizedType, id: itemId, navigatingWithKeyboard: false });\n\n const initialIndex = clonedItems.findIndex(({ id }) => id === itemId);\n const itemToDrag = clonedItems[initialIndex];\n draggedItemRef.current = { ...itemToDrag, sourceListId: listId };\n if (listEl) {\n draggedItemElRef.current = listEl.querySelector(`[id=\"${itemToDrag.id}\"]`);\n if (draggedItemElRef.current) {\n draggedItemElRef.current.setAttribute('style', 'opacity: 0.5');\n }\n }\n const itemData = getItemData(itemToDrag);\n\n return {\n returnToSource: (item: DraggableItem<T>) => {\n setClonedItems(currentItems => {\n const newItems = currentItems.filter(({ id }) => id !== itemId);\n newItems.splice(initialIndex, 0, item);\n return newItems;\n });\n },\n removeFromSource: () => {\n setClonedItems(currentItems => currentItems.filter(({ id }) => id !== itemId));\n },\n changeTarget: i => triggerOnChange(i.sourceData, i.targetData),\n targetItemsRef: internalItemsRef,\n sourceData: itemData,\n targetData: itemData,\n sourceListId: listId,\n targetListId: listId\n };\n };\n\n // Execute necessary actions for when the item is dropped\n const onEnd = (item: LifeCycleDragDropListItem<T> | undefined, monitor: DragSourceMonitor) => {\n if (!item) return;\n\n if (monitor.didDrop()) {\n if (JSON.stringify(item.sourceData) === JSON.stringify(item.targetData)) {\n setDraggedItem(undefined);\n } else {\n item.changeTarget?.(item);\n if (item.sourceListId !== item.targetListId) {\n item.removeFromSource?.();\n }\n }\n } else {\n setDraggedItem(undefined);\n item.returnToSource?.(item);\n }\n draggedItemRef.current = null;\n if (draggedItemElRef.current) {\n draggedItemElRef.current.setAttribute('style', 'opacity: unset');\n draggedItemElRef.current = null;\n }\n };\n\n const contextValue: DragDropListContextValue = useMemo(\n () => ({\n orientation: normalizedType === 'stage' ? 'horizontal' : 'vertical',\n keyboardDragStart: itemId => {\n const index = clonedItems.findIndex(({ id }) => id === itemId);\n if (index === -1) return;\n\n const itemToDrag = clonedItems[index];\n\n if (itemToDrag) {\n setDraggedItem({ type: normalizedType, id: itemId, navigatingWithKeyboard: true });\n const itemData = getItemData(itemToDrag);\n\n itemToDrag.returnToSource = (item: DraggableItem<T>) => {\n setClonedItems(currentItems => {\n const newItems = currentItems.filter(({ id }) => id !== itemId);\n newItems.splice(index, 0, item);\n return newItems;\n });\n };\n itemToDrag.sourceData = itemData;\n itemToDrag.targetData = itemData;\n itemToDrag.sourceListId = listId;\n itemToDrag.targetListId = listId;\n\n draggedItemRef.current = itemToDrag;\n setClonedItems(currentItems => {\n const newItems = currentItems.filter(({ id }) => id !== itemId);\n newItems.splice(index, 0, itemToDrag);\n return newItems;\n });\n }\n },\n keyboardDragEnd: itemId => {\n const item = clonedItems.find(({ id }) => id === itemId);\n if (!item) return;\n\n draggedItemRef.current = null;\n triggerOnChange(item.sourceData, item.targetData);\n },\n keyboardDragCancel: itemId => {\n const index = clonedItems.findIndex(({ id }) => id === itemId);\n if (index === -1) return;\n\n setDraggedItem(undefined);\n draggedItemRef.current = null;\n clonedItems[index].returnToSource?.(clonedItems[index]);\n },\n keyboardReorderItem: (itemId, direction) => {\n const index = clonedItems.findIndex(({ id }) => id === itemId);\n if (index === -1) return;\n\n const itemData = getItemData(clonedItems[index]);\n\n const newItems = [...clonedItems];\n\n if (direction === 'prev' && index !== 0) {\n const item = newItems.splice(index, 1)[0];\n newItems.splice(index - 1, 0, {\n ...item,\n targetData: { ...itemData, [normalizedType]: index - 1 }\n });\n setClonedItems(newItems);\n } else if (direction === 'next' && index !== clonedItems.length - 1) {\n const item = newItems.splice(index, 1)[0];\n newItems.splice(index + 1, 0, {\n ...item,\n targetData: { ...itemData, [normalizedType]: index + 1 }\n });\n setClonedItems(newItems);\n }\n },\n keyboardMoveLists: (itemId, direction) => {\n const item = clonedItems.find(({ id }) => id === itemId);\n if (!item) return;\n\n draggedItemRef.current = null;\n setDraggedItem({ type: normalizedType, id: itemId, navigatingWithKeyboard: false });\n const itemData = getItemData(item);\n\n const targetListLocation = getListLocation(\n listLocation,\n normalizedType,\n lifeCycleData,\n direction\n );\n\n if (targetListLocation) {\n triggerOnChange(itemData, targetListLocation);\n }\n }\n }),\n [clonedItems, triggerOnChange, normalizedType, listLocation, lifeCycleData]\n );\n\n return (\n <DragDropListContext.Provider value={contextValue}>\n <Droppable\n accept={dragDropConfig[type].accept}\n onHover={positionItems}\n onDrop={positionItems}\n >\n {({ dropRef, collected: { isOver } }) => {\n // Reset list items to original state if the item is no longer hovering over the list\n // The useEffect is necessary for setting state within a render function\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n if (!isOver && itemHoveringRef.current) {\n const sourceItem = clonedItems.find(i => i.id === draggedItemRef.current?.id);\n if (!sourceItem && !dragDropConfig.loading) {\n // If item dragged away from target list, reset the items in that list to their original state\n setClonedItems(items);\n }\n }\n itemHoveringRef.current = isOver;\n }, [isOver]);\n\n return (\n <Component\n ref={(el: HTMLElement) => {\n dropRef(el);\n setListEl(el);\n }}\n {...restProps}\n >\n {clonedItems.map(item => {\n return (\n <Draggable\n key={item.id}\n id={item.id}\n type={item.type}\n data={item.data}\n onBegin={onBegin(item.id)}\n onEnd={onEnd}\n >\n {({ dragRef, previewRef, collected }) => {\n return (\n <ItemRenderer\n testId={testId}\n id={item.id}\n type={item.type}\n {...item.data}\n dragRef={dragRef}\n previewRef={previewRef}\n {...collected}\n isDragging={!!item.sourceListId}\n />\n );\n }}\n </Draggable>\n );\n })}\n\n {additionalDropZone}\n </Component>\n );\n }}\n </Droppable>\n </DragDropListContext.Provider>\n );\n};\n\nexport default LifeCycleDragDropList;\n"]}
@@ -1,5 +1,5 @@
1
- import type { FunctionComponent, Ref } from 'react';
2
- import type { NoChildrenProp } from '@pega/cosmos-react-core';
1
+ import type { Ref, RefCallback } from 'react';
2
+ import type { ForwardRefForwardPropsComponent, NoChildrenProp } from '@pega/cosmos-react-core';
3
3
  import type { StageItemProps, TaskProps, StepProps, CategoriesProps, StageType, StageProps } from './LifeCycle.types';
4
4
  export interface LifeCycleListProps extends NoChildrenProp {
5
5
  /** Pass reference to the LifeCycleComponent */
@@ -14,17 +14,19 @@ export interface LifeCycleListProps extends NoChildrenProp {
14
14
  step?: StepProps[];
15
15
  /** Data model should be have stages array */
16
16
  item: StageItemProps;
17
- /** Count of number of stages */
17
+ /** Is first stage in list */
18
18
  isFirstItem?: boolean;
19
- /** Index of stages item */
19
+ /** Is last stage in list */
20
20
  isLastItem?: boolean;
21
21
  /** type of stage */
22
22
  stageVariant?: StageType;
23
23
  /** type of previous stage */
24
- prevStageVariant: StageType;
24
+ prevStageItem: StageItemProps;
25
25
  /** id for the list item */
26
26
  id?: string;
27
+ dragRef?: RefCallback<HTMLElement>;
28
+ previewRef?: RefCallback<HTMLElement>;
27
29
  }
28
- declare const LifeCycleList: FunctionComponent<LifeCycleListProps>;
30
+ declare const LifeCycleList: ForwardRefForwardPropsComponent<LifeCycleListProps>;
29
31
  export default LifeCycleList;
30
32
  //# sourceMappingURL=LifeCycleList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LifeCycleList.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,KAAK,EACV,cAAc,EAEd,SAAS,EACT,SAAS,EACT,eAAe,EACf,SAAS,EACT,UAAU,EACX,MAAM,mBAAmB,CAAC;AAI3B,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,+CAA+C;IAC/C,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC5B,wCAAwC;IACxC,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,0BAA0B;IAC1B,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IACnB,6CAA6C;IAC7C,IAAI,EAAE,cAAc,CAAC;IACrB,gCAAgC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,OAA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,OAAO,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;CACvC;AAOD,QAAA,MAAM,aAAa,EAAE,+BAA+B,CAAC,kBAAkB,CAgHtE,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,33 +1,20 @@
1
1
  import { createElement as _createElement } from "react";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { forwardRef } from 'react';
4
- import styled, { css } from 'styled-components';
5
- import { defaultThemeProp, createUID, useDirection } from '@pega/cosmos-react-core';
4
+ import styled from 'styled-components';
5
+ import { useTheme, useUID } from '@pega/cosmos-react-core';
6
6
  import { getStageInfo } from './LifeCycle.types';
7
- import Stage from './Stage';
8
7
  import Category from './Category';
9
- const StyledLifeCycleList = styled.li(({ theme, lastItem }) => {
10
- const { rtl } = useDirection();
11
- return css `
12
- list-style-type: none;
13
- padding: 0 ${theme.base.spacing} 0 0;
14
- width: 15rem;
15
- ${lastItem &&
16
- css `
17
- padding: 0 calc(0.5 * ${theme.base.spacing}) 0 0;
18
- `}
19
- ${lastItem &&
20
- rtl &&
21
- css `
22
- padding: 0 ${theme.base.spacing} 0 calc(0.5 * ${theme.base.spacing});
23
- `}
24
- `;
25
- });
26
- StyledLifeCycleList.defaultProps = defaultThemeProp;
27
- const LifeCycleList = forwardRef(function LifeCycleList({ item, isFirstItem, isLastItem, categories, stage: stageProps, task, step, prevStageVariant, stageVariant, id, ...restProps }, ref) {
8
+ import Stage from './Stage';
9
+ const StyledLifeCycleList = styled.li `
10
+ list-style-type: none;
11
+ width: 15rem;
12
+ `;
13
+ const LifeCycleList = forwardRef(({ item, isFirstItem, isLastItem, categories, stage: stageProps, task, step, prevStageItem, stageVariant, id, dragRef, previewRef, ...restProps }, ref) => {
28
14
  const showTitle = isFirstItem || false;
29
15
  let sortedCategory = [];
30
- const listId = id || createUID();
16
+ const labelId = useUID();
17
+ const listId = id || labelId;
31
18
  // Function used to rearrange the category data depends on Categories order
32
19
  const catgoryItem = (categoryData) => {
33
20
  const sortedColumn = [];
@@ -45,24 +32,27 @@ const LifeCycleList = forwardRef(function LifeCycleList({ item, isFirstItem, isL
45
32
  if (categories && categories.length !== 0) {
46
33
  sortedCategory = catgoryItem(item.categories);
47
34
  }
48
- const stageInfo = getStageInfo(item.type, prevStageVariant, isLastItem);
49
- return (_jsxs(StyledLifeCycleList, { lastItem: isLastItem, children: [_jsx(Stage, { value: item.label, stageInfo: stageInfo, item: item, error: item.error, id: item.id, ...stageProps }), sortedCategory.length !== 0 &&
35
+ const theme = useTheme();
36
+ const stageInfo = getStageInfo(item.type, item.transitionType, prevStageItem, isLastItem, theme);
37
+ return (_jsxs(StyledLifeCycleList, { id: listId, ref: previewRef, children: [_jsx(Stage, { value: item.label, stageInfo: stageInfo, item: item, error: item.error, id: item.id, dragRef: dragRef, ...stageProps }), sortedCategory.length !== 0 &&
50
38
  sortedCategory.map((categoryItem, categoryindex) => {
51
39
  const taskProps = task[categoryindex];
52
40
  let stepProps;
53
- if (step)
41
+ if (step) {
54
42
  stepProps = step[categoryindex];
55
- return (_createElement(Category, { ...restProps, key: categoryItem.categoryId, id: categoryItem.categoryId, ref: ref, category: categories[categoryindex], item: categoryItem, showTitle: showTitle, stageItem: item, task: taskProps, step: stepProps }));
43
+ }
44
+ return (_createElement(Category, { ...restProps, key: categoryItem.categoryId, id: categoryItem.categoryId, ref: ref, category: categories[categoryindex], item: { ...categoryItem, index: categoryindex, alternate: item.alternate }, showTitle: showTitle, stageItem: item, task: taskProps, step: stepProps }));
56
45
  }), sortedCategory.length === 0 &&
57
46
  categories.length === 0 &&
58
47
  item.categories.length > 0 &&
59
48
  item.categories.map((categoryItem, categoryindex) => {
60
49
  const taskProps = task[categoryindex];
61
50
  let stepProps;
62
- if (step)
51
+ if (step) {
63
52
  stepProps = step[categoryindex];
64
- return (_jsx(Category, { id: categoryItem.categoryId, ref: ref, item: categoryItem, stageItem: item, task: taskProps, step: stepProps, showTitle: showTitle }, categoryItem.categoryId));
65
- })] }, listId));
53
+ }
54
+ return (_jsx(Category, { id: categoryItem.categoryId, ref: ref, item: { ...categoryItem, index: categoryindex, alternate: item.alternate }, stageItem: item, task: taskProps, step: stepProps, showTitle: showTitle }, categoryItem.categoryId));
55
+ })] }));
66
56
  });
67
57
  export default LifeCycleList;
68
58
  //# sourceMappingURL=LifeCycleList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LifeCycleList.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGpF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAUjD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,QAAQ,MAAM,YAAY,CAAC;AA2BlC,MAAM,mBAAmB,GAAG,MAAM,CAAC,EAAE,CAAoC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC/F,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;IAC/B,OAAO,GAAG,CAAA;;iBAEK,KAAK,CAAC,IAAI,CAAC,OAAO;;MAE7B,QAAQ;QACV,GAAG,CAAA;8BACuB,KAAK,CAAC,IAAI,CAAC,OAAO;KAC3C;MACC,QAAQ;QACV,GAAG;QACH,GAAG,CAAA;mBACY,KAAK,CAAC,IAAI,CAAC,OAAO,iBAAiB,KAAK,CAAC,IAAI,CAAC,OAAO;KACnE;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEpD,MAAM,aAAa,GAA0C,UAAU,CA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,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,IAPf,YAAY,CAAC,UAAU,CAQ5B,CACH,CAAC;gBACJ,CAAC,CAAC,KAjDoB,MAAM,CAkDV,CACvB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, createUID, useDirection } from '@pega/cosmos-react-core';\nimport type { NoChildrenProp } from '@pega/cosmos-react-core';\n\nimport { getStageInfo } from './LifeCycle.types';\nimport type {\n StageItemProps,\n CategoryItemProps,\n TaskProps,\n StepProps,\n CategoriesProps,\n StageType,\n StageProps\n} from './LifeCycle.types';\nimport Stage from './Stage';\nimport Category from './Category';\n\nexport interface LifeCycleListProps extends NoChildrenProp {\n /** Pass reference to the LifeCycleComponent */\n ref?: Ref<HTMLOListElement>;\n /** Array of categories column props */\n categories: CategoriesProps[];\n /** Array of Task props */\n task: TaskProps[];\n /** Array of Step props */\n stage?: StageProps;\n /** Array of Stage props */\n step?: StepProps[];\n /** Data model should be have stages array */\n item: StageItemProps;\n /** Count of number of stages */\n isFirstItem?: boolean;\n /** Index of stages item */\n isLastItem?: boolean;\n /** type of stage */\n stageVariant?: StageType;\n /** type of previous stage */\n prevStageVariant: StageType;\n /** id for the list item */\n id?: string;\n}\n\nconst StyledLifeCycleList = styled.li<{ lastItem: boolean | undefined }>(({ theme, lastItem }) => {\n const { rtl } = useDirection();\n return css`\n list-style-type: none;\n padding: 0 ${theme.base.spacing} 0 0;\n width: 15rem;\n ${lastItem &&\n css`\n padding: 0 calc(0.5 * ${theme.base.spacing}) 0 0;\n `}\n ${lastItem &&\n rtl &&\n css`\n padding: 0 ${theme.base.spacing} 0 calc(0.5 * ${theme.base.spacing});\n `}\n `;\n});\n\nStyledLifeCycleList.defaultProps = defaultThemeProp;\n\nconst LifeCycleList: FunctionComponent<LifeCycleListProps> = forwardRef(function LifeCycleList(\n {\n item,\n isFirstItem,\n isLastItem,\n categories,\n stage: stageProps,\n task,\n step,\n prevStageVariant,\n stageVariant,\n id,\n ...restProps\n }: LifeCycleListProps,\n ref: LifeCycleListProps['ref']\n) {\n const showTitle = isFirstItem || false;\n let sortedCategory: CategoryItemProps[] = [];\n const listId = id || createUID();\n\n // Function used to rearrange the category data depends on Categories order\n const catgoryItem = (categoryData: CategoryItemProps[]) => {\n const sortedColumn: CategoryItemProps[] = [];\n if (categories && categories.length > 0 && categoryData.length > 0) {\n categories.forEach(categoryColumnItem => {\n categoryData.forEach((categoryItem: CategoryItemProps) => {\n if (categoryItem.categoryId === categoryColumnItem.id) {\n sortedColumn.push(categoryItem);\n }\n });\n });\n }\n return sortedColumn;\n };\n\n if (categories && categories.length !== 0) {\n sortedCategory = catgoryItem(item.categories);\n }\n\n const stageInfo = getStageInfo(item.type, prevStageVariant, isLastItem);\n return (\n <StyledLifeCycleList key={listId} lastItem={isLastItem}>\n <Stage\n value={item.label}\n stageInfo={stageInfo}\n item={item}\n error={item.error}\n id={item.id}\n {...stageProps}\n />\n {sortedCategory.length !== 0 &&\n sortedCategory.map((categoryItem: CategoryItemProps, categoryindex: number) => {\n const taskProps = task[categoryindex];\n let stepProps;\n if (step) stepProps = step[categoryindex];\n return (\n <Category\n {...restProps}\n key={categoryItem.categoryId}\n id={categoryItem.categoryId}\n ref={ref}\n category={categories[categoryindex]}\n item={categoryItem}\n showTitle={showTitle}\n stageItem={item}\n task={taskProps}\n step={stepProps}\n />\n );\n })}\n {sortedCategory.length === 0 &&\n categories.length === 0 &&\n item.categories.length > 0 &&\n item.categories.map((categoryItem: CategoryItemProps, categoryindex: number) => {\n const taskProps = task[categoryindex];\n let stepProps;\n if (step) stepProps = step[categoryindex];\n\n return (\n <Category\n key={categoryItem.categoryId}\n id={categoryItem.categoryId}\n ref={ref}\n item={categoryItem}\n stageItem={item}\n task={taskProps}\n step={stepProps}\n showTitle={showTitle}\n />\n );\n })}\n </StyledLifeCycleList>\n );\n});\n\nexport default LifeCycleList;\n"]}
1
+ {"version":3,"file":"LifeCycleList.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAUjD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,SAAS,CAAC;AA6B5B,MAAM,mBAAmB,GAAG,MAAM,CAAC,EAAE,CAAA;;;CAGpC,CAAC;AAEF,MAAM,aAAa,GAAwD,UAAU,CACnF,CACE,EACE,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,KAAK,EAAE,UAAU,EACjB,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,EAAE,EACF,OAAO,EACP,UAAU,EACV,GAAG,SAAS,EACO,EACrB,GAA8B,EAC9B,EAAE;IACF,MAAM,SAAS,GAAG,WAAW,IAAI,KAAK,CAAC;IACvC,IAAI,cAAc,GAAwB,EAAE,CAAC;IAC7C,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,EAAE,IAAI,OAAO,CAAC;IAE7B,2EAA2E;IAC3E,MAAM,WAAW,GAAG,CAAC,YAAiC,EAAE,EAAE;QACxD,MAAM,YAAY,GAAwB,EAAE,CAAC;QAC7C,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnE,UAAU,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE;gBACtC,YAAY,CAAC,OAAO,CAAC,CAAC,YAA+B,EAAE,EAAE;oBACvD,IAAI,YAAY,CA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AAQ,EAAE,UAAU,CAAC,aAAa,CAAC,EACnC,IAAI,EAAE,EAAE,GAAG,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,EAC1E,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,IAAI,EACf,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,SAAS,GACf,CACH,CAAC;gBACJ,CAAC,CAAC,EACH,cAAc,CAAC,MAAM,KAAK,CAAC;gBAC1B,UAAU,CAAC,MAAM,KAAK,CAAC;gBACvB,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;gBAC1B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,YAA+B,EAAE,aAAqB,EAAE,EAAE;oBAC7E,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;oBACtC,IAAI,SAAS,CAAC;oBACd,IAAI,IAAI,EAAE,CAAC;wBACT,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;oBAClC,CAAC;oBAED,OAAO,CACL,KAAC,QAAQ,IAEP,EAAE,EAAE,YAAY,CAAC,UAAU,EAC3B,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,EAAE,GAAG,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,EAC1E,SAAS,EAAE,IAAI,EACf,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,IAPf,YAAY,CAAC,UAAU,CAQ5B,CACH,CAAC;gBACJ,CAAC,CAAC,IACgB,CACvB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { Ref, RefCallback } from 'react';\nimport styled from 'styled-components';\n\nimport { useTheme, useUID } from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent, NoChildrenProp } from '@pega/cosmos-react-core';\n\nimport { getStageInfo } from './LifeCycle.types';\nimport type {\n StageItemProps,\n CategoryItemProps,\n TaskProps,\n StepProps,\n CategoriesProps,\n StageType,\n StageProps\n} from './LifeCycle.types';\nimport Category from './Category';\nimport Stage from './Stage';\n\nexport interface LifeCycleListProps extends NoChildrenProp {\n /** Pass reference to the LifeCycleComponent */\n ref?: Ref<HTMLOListElement>;\n /** Array of categories column props */\n categories: CategoriesProps[];\n /** Array of Task props */\n task: TaskProps[];\n /** Array of Step props */\n stage?: StageProps;\n /** Array of Stage props */\n step?: StepProps[];\n /** Data model should be have stages array */\n item: StageItemProps;\n /** Is first stage in list */\n isFirstItem?: boolean;\n /** Is last stage in list */\n isLastItem?: boolean;\n /** type of stage */\n stageVariant?: StageType;\n /** type of previous stage */\n prevStageItem: StageItemProps;\n /** id for the list item */\n id?: string;\n dragRef?: RefCallback<HTMLElement>;\n previewRef?: RefCallback<HTMLElement>;\n}\n\nconst StyledLifeCycleList = styled.li`\n list-style-type: none;\n width: 15rem;\n`;\n\nconst LifeCycleList: ForwardRefForwardPropsComponent<LifeCycleListProps> = forwardRef(\n (\n {\n item,\n isFirstItem,\n isLastItem,\n categories,\n stage: stageProps,\n task,\n step,\n prevStageItem,\n stageVariant,\n id,\n dragRef,\n previewRef,\n ...restProps\n }: LifeCycleListProps,\n ref: LifeCycleListProps['ref']\n ) => {\n const showTitle = isFirstItem || false;\n let sortedCategory: CategoryItemProps[] = [];\n const labelId = useUID();\n const listId = id || labelId;\n\n // Function used to rearrange the category data depends on Categories order\n const catgoryItem = (categoryData: CategoryItemProps[]) => {\n const sortedColumn: CategoryItemProps[] = [];\n if (categories && categories.length > 0 && categoryData.length > 0) {\n categories.forEach(categoryColumnItem => {\n categoryData.forEach((categoryItem: CategoryItemProps) => {\n if (categoryItem.categoryId === categoryColumnItem.id) {\n sortedColumn.push(categoryItem);\n }\n });\n });\n }\n return sortedColumn;\n };\n\n if (categories && categories.length !== 0) {\n sortedCategory = catgoryItem(item.categories);\n }\n\n const theme = useTheme();\n\n const stageInfo = getStageInfo(\n item.type,\n item.transitionType,\n prevStageItem,\n isLastItem,\n theme\n );\n\n return (\n <StyledLifeCycleList id={listId} ref={previewRef}>\n <Stage\n value={item.label}\n stageInfo={stageInfo}\n item={item}\n error={item.error}\n id={item.id}\n dragRef={dragRef}\n {...stageProps}\n />\n {sortedCategory.length !== 0 &&\n sortedCategory.map((categoryItem: CategoryItemProps, categoryindex: number) => {\n const taskProps = task[categoryindex];\n let stepProps;\n if (step) {\n stepProps = step[categoryindex];\n }\n return (\n <Category\n {...restProps}\n key={categoryItem.categoryId}\n id={categoryItem.categoryId}\n ref={ref}\n category={categories[categoryindex]}\n item={{ ...categoryItem, index: categoryindex, alternate: item.alternate }}\n showTitle={showTitle}\n stageItem={item}\n task={taskProps}\n step={stepProps}\n />\n );\n })}\n {sortedCategory.length === 0 &&\n categories.length === 0 &&\n item.categories.length > 0 &&\n item.categories.map((categoryItem: CategoryItemProps, categoryindex: number) => {\n const taskProps = task[categoryindex];\n let stepProps;\n if (step) {\n stepProps = step[categoryindex];\n }\n\n return (\n <Category\n key={categoryItem.categoryId}\n id={categoryItem.categoryId}\n ref={ref}\n item={{ ...categoryItem, index: categoryindex, alternate: item.alternate }}\n stageItem={item}\n task={taskProps}\n step={stepProps}\n showTitle={showTitle}\n />\n );\n })}\n </StyledLifeCycleList>\n );\n }\n);\n\nexport default LifeCycleList;\n"]}
@@ -1,6 +1,7 @@
1
- import type { FunctionComponent, Ref } from 'react';
2
- import type { BaseProps, ForwardProps } from '@pega/cosmos-react-core';
1
+ import type { Ref, RefCallback } from 'react';
2
+ import type { BaseProps, ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
3
3
  import type { StageInfo, StageItemProps, StageProps } from './LifeCycle.types';
4
+ import { type LifeCycleContextValue } from './LifeCycleContext';
4
5
  export interface StageComponentProps extends BaseProps, StageProps {
5
6
  ref?: Ref<HTMLDivElement>;
6
7
  /** Pass text for the task. */
@@ -13,17 +14,21 @@ export interface StageComponentProps extends BaseProps, StageProps {
13
14
  item: StageItemProps;
14
15
  /** The status is used to show the input error status and the info on tooltip in case of error */
15
16
  error?: string;
17
+ dragRef?: RefCallback<HTMLElement>;
16
18
  }
17
- export declare const StyledWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
18
19
  export declare const StyledStageButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
19
20
  error: string | undefined;
21
+ dragEnabled?: LifeCycleContextValue["dragEnabled"];
20
22
  }, never>;
21
23
  export declare const StyledStageActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
22
24
  export declare const StyledWarnIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, import("styled-components").DefaultTheme, {}, never>;
23
25
  export declare const StyledStage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<StageComponentProps, "stageInfo"> & {
24
- status: boolean;
25
26
  error: string;
26
- }, never>;
27
- declare const Stage: FunctionComponent<StageComponentProps & ForwardProps>;
28
- export default Stage;
27
+ dragEnabled?: LifeCycleContextValue["dragEnabled"];
28
+ dragging?: boolean;
29
+ } & Pick<StageItemProps, "transitionType">, never>;
30
+ declare const _default: ForwardRefForwardPropsComponent<StageComponentProps> & {
31
+ getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly string[]>;
32
+ };
33
+ export default _default;
29
34
  //# sourceMappingURL=Stage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stage.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/Stage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,GAAG,EAAc,MAAM,OAAO,CAAC;AAanF,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAU,MAAM,yBAAyB,CAAC;AAE/E,OAAO,KAAK,EAGV,SAAS,EACT,cAA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E,MAAM,CAAC;IACd,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,SAAS,EAAE,SAAS,CAAC;IACrB,2DAA2D;IAC3D,IAAI,EAAE,cAAc,CAAC;IACrB,iGAAiG;IACjG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB;WACrB,MAAM,GAAG,SAAS;kBACX,qBAAqB,CAAC,aAAa,CAAC;SAkClD,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAK7B,CAAC;AAIH,eAAO,MAAM,cAAc,0LAQzB,CAAC;AAIH,eAAO,MAAM,WAAW;WAEb,MAAM;kBACC,qBAAqB,CAAC,aAAa,CAAC;eACvC,OAAO;kDAwHpB,CAAC;;;;AA+IH,wBAAmD"}
@@ -1,21 +1,25 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
2
+ import { forwardRef, useContext } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
- import { Flex, Actions, defaultThemeProp, useDirection, StyledButton, Icon, useI18n, readableColor } from '@pega/cosmos-react-core';
5
- export const StyledWrapper = styled.div `
6
- overflow: hidden;
7
- `;
8
- StyledWrapper.defaultProps = defaultThemeProp;
9
- export const StyledStageButton = styled.button(({ error, theme }) => {
4
+ import { Flex, Actions, defaultThemeProp, useDirection, StyledButton, Icon, useI18n, readableColor, useTestIds, withTestIds, useElement, Tooltip, readableHue } from '@pega/cosmos-react-core';
5
+ import { DragHandle, StyledDragHandle } from '@pega/cosmos-react-dnd';
6
+ import { generateDynamicTestId } from './utils';
7
+ import { getStageTestIds } from './LifeCycle.test-ids';
8
+ import LifeCycleContext, {} from './LifeCycleContext';
9
+ export const StyledStageButton = styled.button(({ error, dragEnabled, theme }) => {
10
10
  return css `
11
11
  height: ${theme.components.button.height};
12
12
  outline: none;
13
13
  border: none;
14
+ border-radius: calc(0.5 * ${theme.base['border-radius']});
14
15
  overflow: hidden;
15
16
  text-overflow: ellipsis;
16
17
  white-space: nowrap;
17
18
  text-align: start;
18
- margin-inline-start: ${theme.base.spacing};
19
+ margin-inline-start: calc(${dragEnabled ? 0.25 : 0.5} * ${theme.base.spacing});
20
+ padding-inline: calc(${dragEnabled ? 0.25 : 0.5} * ${theme.base.spacing});
21
+ background: transparent;
22
+ z-index: 2;
19
23
 
20
24
  ${error &&
21
25
  css `
@@ -26,15 +30,23 @@ export const StyledStageButton = styled.button(({ error, theme }) => {
26
30
  cursor: pointer;
27
31
  }
28
32
 
33
+ &:focus {
34
+ outline: none;
35
+ box-shadow: ${theme.base.shadow.focus};
36
+ }
37
+
29
38
  &:disabled {
30
39
  cursor: not-allowed;
31
40
  }
32
41
  `;
33
42
  });
34
43
  StyledStageButton.defaultProps = defaultThemeProp;
35
- export const StyledStageActions = styled.div `
36
- z-index: 2;
37
- `;
44
+ export const StyledStageActions = styled.div(({ theme }) => {
45
+ return css `
46
+ z-index: 2;
47
+ margin-inline-end: calc(0.875 * ${theme.base.spacing});
48
+ `;
49
+ });
38
50
  StyledStageActions.defaultProps = defaultThemeProp;
39
51
  export const StyledWarnIcon = styled(Icon)(({ theme }) => {
40
52
  return css `
@@ -46,10 +58,11 @@ export const StyledWarnIcon = styled(Icon)(({ theme }) => {
46
58
  `;
47
59
  });
48
60
  StyledWarnIcon.defaultProps = defaultThemeProp;
49
- export const StyledStage = styled.div(({ stageInfo, theme, status, error }) => {
61
+ export const StyledStage = styled.div(({ stageInfo, theme, error, dragEnabled, dragging, transitionType }) => {
50
62
  const { visual: { bgColor, tailPointed, headPointed } } = stageInfo;
51
63
  const { rtl } = useDirection();
52
64
  const contrastColor = readableColor(bgColor);
65
+ const borderRadius = 'border-radius';
53
66
  const roundedEndsStyles = css `
54
67
  content: '';
55
68
  position: absolute;
@@ -60,50 +73,29 @@ export const StyledStage = styled.div(({ stageInfo, theme, status, error }) => {
60
73
  border: 0;
61
74
  border-inline-end: 0.0625rem solid transparent;
62
75
  `;
76
+ const spacing = `calc(0.5 * ${theme.base.spacing})`;
63
77
  return css `
64
78
  position: relative;
65
- padding: calc(0.5 * ${theme.base.spacing});
79
+ padding: ${spacing};
66
80
  background: ${bgColor};
67
81
  border: 0.0625rem solid transparent;
68
82
  width: 100%;
69
-
83
+ height: '${theme.base.spacing}';
70
84
  &:hover {
71
85
  cursor: pointer;
72
86
  }
73
-
74
- &:focus-within {
75
- border: 0.0625rem solid ${theme.base.palette.interactive};
76
-
77
- ${headPointed &&
87
+ ${transitionType === 'resolution' &&
88
+ stageInfo.id === 'alternate' &&
78
89
  css `
79
- &::after {
80
- border-inline-end: 0.0625rem solid ${theme.base.palette.interactive};
81
- ${rtl
82
- ? css `
83
- border-block-start: 0.0625rem solid ${theme.base.palette.interactive};
84
- `
85
- : css `
86
- border-block-end: 0.0625rem solid ${theme.base.palette.interactive};
87
- `}
88
- }
89
- `}
90
+ border: none;
91
+ box-shadow: inset 0 -0.5rem 0 0 ${readableHue(theme.base.colors.green.medium, theme.base.palette.light)};
90
92
 
91
- ${tailPointed &&
92
- css `
93
- &::before {
94
- border-inline-end: 0.0625rem solid ${theme.base.palette.interactive};
95
- ${rtl
96
- ? css `
97
- border-block-end: 0.0625rem solid ${theme.base.palette.interactive};
98
- `
99
- : css `
100
- border-block-start: 0.0625rem solid ${theme.base.palette.interactive};
101
- `}
102
- }
103
- `}
104
- }
93
+ /* adding 0.0625rem to padding since 0.0625rem border is removed. */
94
+ padding: calc(${spacing} + 0.0625rem);
95
+ `}
105
96
 
106
97
  ${headPointed &&
98
+ !dragging &&
107
99
  css `
108
100
  &::after {
109
101
  ${roundedEndsStyles}
@@ -114,11 +106,10 @@ export const StyledStage = styled.div(({ stageInfo, theme, status, error }) => {
114
106
  border-block-end: 0.0625rem solid transparent;
115
107
  ${rtl
116
108
  ? css `
117
- border-radius: calc(0.75 * ${theme.base['border-radius']}) 0.1rem 0.1rem 0.1rem;
109
+ border-radius: calc(0.75 * ${theme.base[borderRadius]}) 0.1rem 0.1rem 0.1rem;
118
110
  `
119
111
  : css `
120
- border-radius: 0.0625rem 0.075rem calc(0.75 * ${theme.base['border-radius']})
121
- 0.0625rem;
112
+ border-radius: 0.0625rem 0.075rem calc(0.75 * ${theme.base[borderRadius]}) 0.0625rem;
122
113
  `}
123
114
  }
124
115
  `}
@@ -126,6 +117,7 @@ export const StyledStage = styled.div(({ stageInfo, theme, status, error }) => {
126
117
  ${tailPointed &&
127
118
  css `
128
119
  ${!error &&
120
+ !dragEnabled &&
129
121
  css `
130
122
  ${StyledStageButton} {
131
123
  margin-inline-start: calc(1.5 * ${theme.base.spacing});
@@ -139,25 +131,30 @@ export const StyledStage = styled.div(({ stageInfo, theme, status, error }) => {
139
131
  }
140
132
  `}
141
133
 
142
- &::before {
143
- ${roundedEndsStyles}
144
- background: ${theme.base.palette['app-background']};
145
- transform: rotateZ(45deg) skew(15deg, 15deg);
146
- inset-inline-start: calc(-1.6 * ${theme.base.spacing});
147
- ${rtl
148
- ? css `
149
- border-block-end: 0.0625rem solid transparent;
150
- border-radius: 0.0625rem 1rem 0.0625rem calc(0.75 * ${theme.base['border-radius']});
151
- `
152
- : css `
153
- border-block-start: 0.0625rem solid transparent;
154
- border-radius: 0.0625rem calc(0.75 * ${theme.base['border-radius']}) 0.0625rem 1rem;
155
- `}
156
- }
134
+ ${!dragging &&
135
+ css `
136
+ &::before {
137
+ ${roundedEndsStyles}
138
+ background: ${theme.base.palette['app-background']};
139
+ transform: rotateZ(45deg) skew(15deg, 15deg);
140
+ inset-inline-start: calc(-1.6 * ${theme.base.spacing});
141
+ ${rtl
142
+ ? css `
143
+ border-block-end: 0.0625rem solid transparent;
144
+ border-radius: 0.0625rem 1rem 0.0625rem calc(0.75 * ${theme.base[borderRadius]});
145
+ `
146
+ : css `
147
+ border-block-start: 0.0625rem solid transparent;
148
+ border-radius: 0.0625rem calc(0.75 * ${theme.base[borderRadius]}) 0.0625rem 1rem;
149
+ `}
150
+ }
151
+ `}
157
152
  `}
158
153
 
159
154
  ${StyledWarnIcon} {
160
155
  color: ${contrastColor};
156
+ margin-inline-start: calc(${dragEnabled ? 0.5 : 1.25} * ${theme.base.spacing});
157
+ margin-inline-end: ${theme.base.spacing};
161
158
  }
162
159
 
163
160
  ${StyledStageActions} {
@@ -168,16 +165,22 @@ export const StyledStage = styled.div(({ stageInfo, theme, status, error }) => {
168
165
 
169
166
  ${StyledStageButton} {
170
167
  color: ${contrastColor};
171
- ${!status &&
172
- css `
173
- background: ${bgColor};
174
- `}
168
+ }
169
+
170
+ ${StyledDragHandle} {
171
+ color: ${contrastColor};
172
+ margin-inline-start: ${theme.base.spacing};
175
173
  }
176
174
  `;
177
175
  });
178
176
  StyledStage.defaultProps = defaultThemeProp;
179
- const Stage = forwardRef(function Stage({ value, actions, stageInfo, onClick, id, item, error, ...restProps }, ref) {
177
+ const Stage = forwardRef(({ value, actions, stageInfo, onClick, id, item, error, dragRef, ...restProps }, ref) => {
178
+ const { dragDropConfig, dragEnabled, draggedItem } = useContext(LifeCycleContext);
179
+ const [stageButtonEl, setStageButtonEl] = useElement();
180
180
  const t = useI18n();
181
+ let accessibilityLabel;
182
+ const stageTestID = generateDynamicTestId([value]);
183
+ const testIds = useTestIds(stageTestID, getStageTestIds);
181
184
  const onStageClick = (e) => {
182
185
  const actionParam = {
183
186
  value,
@@ -186,7 +189,7 @@ const Stage = forwardRef(function Stage({ value, actions, stageInfo, onClick, id
186
189
  };
187
190
  onClick?.(actionParam, e);
188
191
  };
189
- const onActionItemClick = (actionId, e) => {
192
+ const onActionItemClick = (actionId, e, menuButtonEl) => {
190
193
  const param = {
191
194
  stage: item
192
195
  };
@@ -200,7 +203,7 @@ const Stage = forwardRef(function Stage({ value, actions, stageInfo, onClick, id
200
203
  }
201
204
  actionsList?.forEach((actionItem) => {
202
205
  if (actionItem.id === actionId) {
203
- actionItem.onClick?.(param, e);
206
+ actionItem.onClick?.(param, e, menuButtonEl);
204
207
  }
205
208
  });
206
209
  }
@@ -221,11 +224,23 @@ const Stage = forwardRef(function Stage({ value, actions, stageInfo, onClick, id
221
224
  actionCloneItem[key] = actionItem[key];
222
225
  });
223
226
  actionCloneItem.onClick = onActionItemClick;
224
- actionsClone.push(actionCloneItem);
227
+ actionsClone.push({
228
+ ...actionCloneItem
229
+ });
225
230
  return actionItem;
226
231
  });
227
232
  }
228
- return (_jsxs(Flex, { ...restProps, container: { inline: true, alignItems: 'center' }, as: StyledStage, ref: ref, error: error, stageInfo: stageInfo, id: item.id, "aria-label": error ? t('stage_name_error', [value]) : undefined, children: [error && _jsx(StyledWarnIcon, { name: 'warn-solid' }), _jsx(Flex, { as: StyledWrapper, container: { inline: true }, item: { grow: 1 }, onClick: onStageClick, children: _jsx(StyledStageButton, { error: error, "aria-label": error ? undefined : t('stage_name', [value]), children: value }) }), _jsx(StyledStageActions, { children: actionsClone && _jsx(Actions, { items: actionsClone, menuAt: 2, iconOnly: true }) })] }));
233
+ if (item.transitionType === 'resolution') {
234
+ accessibilityLabel = `${t('wait_for_user_action', [t('stage_name', [value])])}`;
235
+ }
236
+ else if (item.transitionType === 'wait') {
237
+ accessibilityLabel = `${t('resolve_case', [t('stage_name', [value])])}`;
238
+ }
239
+ else {
240
+ accessibilityLabel = t('stage_name', [value]);
241
+ }
242
+ const stageDragEnabled = dragEnabled && dragDropConfig[item.alternate ? 'alternate-stage' : 'stage'].enabled;
243
+ return (_jsxs(Flex, { "data-testid": testIds.root, ...restProps, container: { inline: true, alignItems: 'center' }, as: StyledStage, ref: ref, error: error, dragEnabled: stageDragEnabled, dragging: draggedItem?.type === 'stage', stageInfo: stageInfo, "aria-label": error ? t('stage_name_error', [value]) : undefined, transitionType: item.transitionType, children: [stageDragEnabled && (_jsx(DragHandle, { itemId: id, ref: dragRef, onClick: e => e.stopPropagation() })), error && _jsx(StyledWarnIcon, { name: 'warn-solid' }), _jsxs(Flex, { container: { inline: true }, item: { grow: 1 }, onClick: onStageClick, children: [_jsx(StyledStageButton, { error: error, dragEnabled: stageDragEnabled, "aria-label": error ? undefined : accessibilityLabel, ref: setStageButtonEl, children: value }), stageButtonEl && (_jsx(Tooltip, { target: stageButtonEl, smart: true, children: value }))] }), _jsx(StyledStageActions, { children: actionsClone && (_jsx(Actions, { items: actionsClone, menuAt: 2, iconOnly: true, contextualLabel: t('stage_name', [value]) })) })] }));
229
244
  });
230
- export default Stage;
245
+ export default withTestIds(Stage, getStageTestIds);
231
246
  //# sourceMappingURL=Stage.js.map