@pega/cosmos-react-build 8.8.0 → 9.0.0-build.10.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 (316) hide show
  1. package/lib/components/AuthoringPanel/AuthoringPanel.d.ts +7 -0
  2. package/lib/components/AuthoringPanel/AuthoringPanel.d.ts.map +1 -0
  3. package/lib/components/AuthoringPanel/AuthoringPanel.js +49 -0
  4. package/lib/components/AuthoringPanel/AuthoringPanel.js.map +1 -0
  5. package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts +18 -0
  6. package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts.map +1 -0
  7. package/lib/components/AuthoringPanel/AuthoringPanel.styles.js +133 -0
  8. package/lib/components/AuthoringPanel/AuthoringPanel.styles.js.map +1 -0
  9. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.d.ts +2 -0
  10. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.d.ts.map +1 -0
  11. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.js +16 -0
  12. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.js.map +1 -0
  13. package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts +81 -0
  14. package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts.map +1 -0
  15. package/lib/components/AuthoringPanel/AuthoringPanel.types.js +2 -0
  16. package/lib/components/AuthoringPanel/AuthoringPanel.types.js.map +1 -0
  17. package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts +6 -0
  18. package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts.map +1 -0
  19. package/lib/components/AuthoringPanel/AuthoringPanelHeader.js +41 -0
  20. package/lib/components/AuthoringPanel/AuthoringPanelHeader.js.map +1 -0
  21. package/lib/components/AuthoringPanel/index.d.ts +4 -0
  22. package/lib/components/AuthoringPanel/index.d.ts.map +1 -0
  23. package/lib/components/AuthoringPanel/index.js +3 -0
  24. package/lib/components/AuthoringPanel/index.js.map +1 -0
  25. package/lib/components/Automation/Automation.d.ts +7 -0
  26. package/lib/components/Automation/Automation.d.ts.map +1 -0
  27. package/lib/components/Automation/Automation.js +113 -0
  28. package/lib/components/Automation/Automation.js.map +1 -0
  29. package/lib/components/Automation/Automation.styles.d.ts +12 -0
  30. package/lib/components/Automation/Automation.styles.d.ts.map +1 -0
  31. package/lib/components/Automation/Automation.styles.js +68 -0
  32. package/lib/components/Automation/Automation.styles.js.map +1 -0
  33. package/lib/components/Automation/Automation.test-ids.d.ts +3 -0
  34. package/lib/components/Automation/Automation.test-ids.d.ts.map +1 -0
  35. package/lib/components/Automation/Automation.test-ids.js +21 -0
  36. package/lib/components/Automation/Automation.test-ids.js.map +1 -0
  37. package/lib/components/Automation/Automation.types.d.ts +95 -0
  38. package/lib/components/Automation/Automation.types.d.ts.map +1 -0
  39. package/lib/components/Automation/Automation.types.js +18 -0
  40. package/lib/components/Automation/Automation.types.js.map +1 -0
  41. package/lib/components/Automation/Automation.utils.d.ts +109 -0
  42. package/lib/components/Automation/Automation.utils.d.ts.map +1 -0
  43. package/lib/components/Automation/Automation.utils.js +208 -0
  44. package/lib/components/Automation/Automation.utils.js.map +1 -0
  45. package/lib/components/Automation/AutomationContext.d.ts +4 -0
  46. package/lib/components/Automation/AutomationContext.d.ts.map +1 -0
  47. package/lib/components/Automation/AutomationContext.js +9 -0
  48. package/lib/components/Automation/AutomationContext.js.map +1 -0
  49. package/lib/components/Automation/RuleStep.d.ts +7 -0
  50. package/lib/components/Automation/RuleStep.d.ts.map +1 -0
  51. package/lib/components/Automation/RuleStep.js +151 -0
  52. package/lib/components/Automation/RuleStep.js.map +1 -0
  53. package/lib/components/Automation/index.d.ts +5 -0
  54. package/lib/components/Automation/index.d.ts.map +1 -0
  55. package/lib/components/Automation/index.js +4 -0
  56. package/lib/components/Automation/index.js.map +1 -0
  57. package/lib/components/DynamicInput/BooleanControl.d.ts +2 -2
  58. package/lib/components/DynamicInput/BooleanControl.d.ts.map +1 -1
  59. package/lib/components/DynamicInput/BooleanControl.js.map +1 -1
  60. package/lib/components/DynamicInput/ConstantControl.d.ts +61 -0
  61. package/lib/components/DynamicInput/ConstantControl.d.ts.map +1 -0
  62. package/lib/components/DynamicInput/ConstantControl.js +58 -0
  63. package/lib/components/DynamicInput/ConstantControl.js.map +1 -0
  64. package/lib/components/DynamicInput/DynamicInput.d.ts +2 -2
  65. package/lib/components/DynamicInput/DynamicInput.d.ts.map +1 -1
  66. package/lib/components/DynamicInput/DynamicInput.js +13 -63
  67. package/lib/components/DynamicInput/DynamicInput.js.map +1 -1
  68. package/lib/components/DynamicInput/DynamicInput.styles.d.ts +0 -1
  69. package/lib/components/DynamicInput/DynamicInput.styles.d.ts.map +1 -1
  70. package/lib/components/DynamicInput/DynamicInput.styles.js +48 -41
  71. package/lib/components/DynamicInput/DynamicInput.styles.js.map +1 -1
  72. package/lib/components/DynamicInput/DynamicInput.types.d.ts +26 -81
  73. package/lib/components/DynamicInput/DynamicInput.types.d.ts.map +1 -1
  74. package/lib/components/DynamicInput/DynamicInput.types.js.map +1 -1
  75. package/lib/components/DynamicInput/index.d.ts +2 -0
  76. package/lib/components/DynamicInput/index.d.ts.map +1 -1
  77. package/lib/components/DynamicInput/index.js +1 -0
  78. package/lib/components/DynamicInput/index.js.map +1 -1
  79. package/lib/components/DynamicInput/utils.d.ts.map +1 -1
  80. package/lib/components/DynamicInput/utils.js +3 -2
  81. package/lib/components/DynamicInput/utils.js.map +1 -1
  82. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts +34 -0
  83. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts.map +1 -0
  84. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.js +55 -0
  85. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.js.map +1 -0
  86. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.d.ts +2 -0
  87. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.d.ts.map +1 -0
  88. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.js +10 -0
  89. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.js.map +1 -0
  90. package/lib/components/EmptyRuleTemplate/index.d.ts +3 -0
  91. package/lib/components/EmptyRuleTemplate/index.d.ts.map +1 -0
  92. package/lib/components/EmptyRuleTemplate/index.js +2 -0
  93. package/lib/components/EmptyRuleTemplate/index.js.map +1 -0
  94. package/lib/components/Expression/Expression.d.ts.map +1 -1
  95. package/lib/components/Expression/Expression.js +8 -7
  96. package/lib/components/Expression/Expression.js.map +1 -1
  97. package/lib/components/Expression/Expression.styles.d.ts +5 -1
  98. package/lib/components/Expression/Expression.styles.d.ts.map +1 -1
  99. package/lib/components/Expression/Expression.styles.js +15 -3
  100. package/lib/components/Expression/Expression.styles.js.map +1 -1
  101. package/lib/components/Expression/Expression.test-ids.d.ts +1 -0
  102. package/lib/components/Expression/Expression.test-ids.d.ts.map +1 -1
  103. package/lib/components/Expression/Expression.test-ids.js +6 -0
  104. package/lib/components/Expression/Expression.test-ids.js.map +1 -1
  105. package/lib/components/Expression/ExpressionBuilderModal.d.ts +6 -0
  106. package/lib/components/Expression/ExpressionBuilderModal.d.ts.map +1 -0
  107. package/lib/components/Expression/ExpressionBuilderModal.js +53 -0
  108. package/lib/components/Expression/ExpressionBuilderModal.js.map +1 -0
  109. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +1 -1
  110. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +1 -0
  111. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +1 -1
  112. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +1 -1
  113. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +3 -2
  114. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +1 -1
  115. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +4 -2
  116. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +1 -1
  117. package/lib/components/ExpressionBuilder/ExpressionBuilder.js +66 -25
  118. package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +1 -1
  119. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +18 -2
  120. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +1 -1
  121. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +80 -13
  122. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +1 -1
  123. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.d.ts +5 -0
  124. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.d.ts.map +1 -0
  125. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.js +22 -0
  126. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.js.map +1 -0
  127. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +33 -5
  128. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +1 -1
  129. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +1 -1
  130. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +4 -2
  131. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +1 -1
  132. package/lib/components/ExpressionBuilder/ExpressionDetails.js +6 -4
  133. package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +1 -1
  134. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts +4 -2
  135. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts.map +1 -1
  136. package/lib/components/ExpressionBuilder/ExpressionItem.js +8 -6
  137. package/lib/components/ExpressionBuilder/ExpressionItem.js.map +1 -1
  138. package/lib/components/ExpressionBuilder/ExpressionList.d.ts +4 -2
  139. package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +1 -1
  140. package/lib/components/ExpressionBuilder/ExpressionList.js +17 -5
  141. package/lib/components/ExpressionBuilder/ExpressionList.js.map +1 -1
  142. package/lib/components/ExpressionBuilder/index.d.ts +1 -0
  143. package/lib/components/ExpressionBuilder/index.d.ts.map +1 -1
  144. package/lib/components/ExpressionBuilder/index.js +1 -0
  145. package/lib/components/ExpressionBuilder/index.js.map +1 -1
  146. package/lib/components/FieldReference/FieldReference.types.d.ts +16 -2
  147. package/lib/components/FieldReference/FieldReference.types.d.ts.map +1 -1
  148. package/lib/components/FieldReference/FieldReference.types.js.map +1 -1
  149. package/lib/components/FieldReference/FieldReferenceInput.d.ts.map +1 -1
  150. package/lib/components/FieldReference/FieldReferenceInput.js +5 -5
  151. package/lib/components/FieldReference/FieldReferenceInput.js.map +1 -1
  152. package/lib/components/FieldReference/helpers.d.ts +7 -1
  153. package/lib/components/FieldReference/helpers.d.ts.map +1 -1
  154. package/lib/components/FieldReference/helpers.js +31 -1
  155. package/lib/components/FieldReference/helpers.js.map +1 -1
  156. package/lib/components/FieldReference/index.d.ts +2 -2
  157. package/lib/components/FieldReference/index.d.ts.map +1 -1
  158. package/lib/components/FieldReference/index.js +1 -1
  159. package/lib/components/FieldReference/index.js.map +1 -1
  160. package/lib/components/IconTile/iconUtils.d.ts +2 -1
  161. package/lib/components/IconTile/iconUtils.d.ts.map +1 -1
  162. package/lib/components/IconTile/iconUtils.js +94 -1
  163. package/lib/components/IconTile/iconUtils.js.map +1 -1
  164. package/lib/components/IconTile/index.d.ts +1 -0
  165. package/lib/components/IconTile/index.d.ts.map +1 -1
  166. package/lib/components/IconTile/index.js +1 -0
  167. package/lib/components/IconTile/index.js.map +1 -1
  168. package/lib/components/LifeCycle/Category.d.ts +0 -1
  169. package/lib/components/LifeCycle/Category.d.ts.map +1 -1
  170. package/lib/components/LifeCycle/Category.js +16 -56
  171. package/lib/components/LifeCycle/Category.js.map +1 -1
  172. package/lib/components/LifeCycle/LifeCycle.js +2 -2
  173. package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
  174. package/lib/components/LifeCycle/LifeCycle.types.d.ts +37 -2
  175. package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
  176. package/lib/components/LifeCycle/LifeCycle.types.js +9 -9
  177. package/lib/components/LifeCycle/LifeCycle.types.js.map +1 -1
  178. package/lib/components/LifeCycle/LifeCycleDragDropList.d.ts.map +1 -1
  179. package/lib/components/LifeCycle/LifeCycleDragDropList.js +25 -3
  180. package/lib/components/LifeCycle/LifeCycleDragDropList.js.map +1 -1
  181. package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
  182. package/lib/components/LifeCycle/Stage.js +20 -11
  183. package/lib/components/LifeCycle/Stage.js.map +1 -1
  184. package/lib/components/LifeCycle/Step.d.ts.map +1 -1
  185. package/lib/components/LifeCycle/Step.js +1 -0
  186. package/lib/components/LifeCycle/Step.js.map +1 -1
  187. package/lib/components/LifeCycle/Task.d.ts +7 -1
  188. package/lib/components/LifeCycle/Task.d.ts.map +1 -1
  189. package/lib/components/LifeCycle/Task.js +19 -10
  190. package/lib/components/LifeCycle/Task.js.map +1 -1
  191. package/lib/components/LifeCycle/TaskGroup.d.ts +23 -0
  192. package/lib/components/LifeCycle/TaskGroup.d.ts.map +1 -0
  193. package/lib/components/LifeCycle/TaskGroup.js +92 -0
  194. package/lib/components/LifeCycle/TaskGroup.js.map +1 -0
  195. package/lib/components/LifeCycle/index.d.ts +1 -1
  196. package/lib/components/LifeCycle/index.d.ts.map +1 -1
  197. package/lib/components/LifeCycle/index.js +1 -1
  198. package/lib/components/LifeCycle/index.js.map +1 -1
  199. package/lib/components/LifeCycle/utils.d.ts +6 -1
  200. package/lib/components/LifeCycle/utils.d.ts.map +1 -1
  201. package/lib/components/LifeCycle/utils.js +129 -0
  202. package/lib/components/LifeCycle/utils.js.map +1 -1
  203. package/lib/components/ObjectSelect/InputTree/InputTree.d.ts +21 -0
  204. package/lib/components/ObjectSelect/InputTree/InputTree.d.ts.map +1 -0
  205. package/lib/components/ObjectSelect/InputTree/InputTree.js +20 -0
  206. package/lib/components/ObjectSelect/InputTree/InputTree.js.map +1 -0
  207. package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts +10 -0
  208. package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts.map +1 -0
  209. package/lib/components/ObjectSelect/InputTree/InputTree.styles.js +82 -0
  210. package/lib/components/ObjectSelect/InputTree/InputTree.styles.js.map +1 -0
  211. package/lib/components/ObjectSelect/InputTree/index.d.ts +3 -0
  212. package/lib/components/ObjectSelect/InputTree/index.d.ts.map +1 -0
  213. package/lib/components/ObjectSelect/InputTree/index.js +2 -0
  214. package/lib/components/ObjectSelect/InputTree/index.js.map +1 -0
  215. package/lib/components/ObjectSelect/ObjectPicker.d.ts +11 -5
  216. package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +1 -1
  217. package/lib/components/ObjectSelect/ObjectPicker.js +24 -15
  218. package/lib/components/ObjectSelect/ObjectPicker.js.map +1 -1
  219. package/lib/components/ObjectSelect/ObjectSelect.d.ts +2 -29
  220. package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +1 -1
  221. package/lib/components/ObjectSelect/ObjectSelect.js +80 -23
  222. package/lib/components/ObjectSelect/ObjectSelect.js.map +1 -1
  223. package/lib/components/ObjectSelect/ObjectSelect.types.d.ts +53 -0
  224. package/lib/components/ObjectSelect/ObjectSelect.types.d.ts.map +1 -0
  225. package/lib/components/ObjectSelect/ObjectSelect.types.js +2 -0
  226. package/lib/components/ObjectSelect/ObjectSelect.types.js.map +1 -0
  227. package/lib/components/ObjectSelect/index.d.ts +1 -1
  228. package/lib/components/ObjectSelect/index.d.ts.map +1 -1
  229. package/lib/components/ObjectSelect/index.js.map +1 -1
  230. package/lib/components/ObjectSelect/useCreateModal.d.ts +6 -2
  231. package/lib/components/ObjectSelect/useCreateModal.d.ts.map +1 -1
  232. package/lib/components/ObjectSelect/useCreateModal.js +7 -4
  233. package/lib/components/ObjectSelect/useCreateModal.js.map +1 -1
  234. package/lib/components/PageBanner/PageBanner.d.ts +6 -4
  235. package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
  236. package/lib/components/PageBanner/PageBanner.js +10 -9
  237. package/lib/components/PageBanner/PageBanner.js.map +1 -1
  238. package/lib/components/PageBanner/PageBanner.test-ids.d.ts +2 -0
  239. package/lib/components/PageBanner/PageBanner.test-ids.d.ts.map +1 -0
  240. package/lib/components/PageBanner/PageBanner.test-ids.js +9 -0
  241. package/lib/components/PageBanner/PageBanner.test-ids.js.map +1 -0
  242. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts +12 -0
  243. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts.map +1 -0
  244. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js +158 -0
  245. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js.map +1 -0
  246. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts +5 -0
  247. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts.map +1 -0
  248. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js +17 -0
  249. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js.map +1 -0
  250. package/lib/components/PageTemplates/GalleryPage.d.ts +14 -4
  251. package/lib/components/PageTemplates/GalleryPage.d.ts.map +1 -1
  252. package/lib/components/PageTemplates/GalleryPage.js +57 -12
  253. package/lib/components/PageTemplates/GalleryPage.js.map +1 -1
  254. package/lib/components/PageTemplates/HeaderActionButtons.d.ts +5 -0
  255. package/lib/components/PageTemplates/HeaderActionButtons.d.ts.map +1 -0
  256. package/lib/components/PageTemplates/HeaderActionButtons.js +14 -0
  257. package/lib/components/PageTemplates/HeaderActionButtons.js.map +1 -0
  258. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.d.ts +8 -0
  259. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.d.ts.map +1 -0
  260. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.js +23 -0
  261. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.js.map +1 -0
  262. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.d.ts +5 -0
  263. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.d.ts.map +1 -0
  264. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.js +10 -0
  265. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.js.map +1 -0
  266. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.d.ts +5 -0
  267. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.d.ts.map +1 -0
  268. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.js +10 -0
  269. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.js.map +1 -0
  270. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.d.ts +21 -0
  271. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.d.ts.map +1 -0
  272. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.js +22 -0
  273. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.js.map +1 -0
  274. package/lib/components/PageTemplates/PageTemplate.styles.d.ts +16 -0
  275. package/lib/components/PageTemplates/PageTemplate.styles.d.ts.map +1 -0
  276. package/lib/components/PageTemplates/PageTemplate.styles.js +167 -0
  277. package/lib/components/PageTemplates/PageTemplate.styles.js.map +1 -0
  278. package/lib/components/PageTemplates/PageTemplate.types.d.ts +114 -0
  279. package/lib/components/PageTemplates/PageTemplate.types.d.ts.map +1 -0
  280. package/lib/components/PageTemplates/PageTemplate.types.js +2 -0
  281. package/lib/components/PageTemplates/PageTemplate.types.js.map +1 -0
  282. package/lib/components/PageTemplates/PageTemplates.d.ts +16 -12
  283. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  284. package/lib/components/PageTemplates/PageTemplates.js +12 -12
  285. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  286. package/lib/components/PageTemplates/PageTemplates.test-ids.d.ts +4 -0
  287. package/lib/components/PageTemplates/PageTemplates.test-ids.d.ts.map +1 -0
  288. package/lib/components/PageTemplates/PageTemplates.test-ids.js +25 -0
  289. package/lib/components/PageTemplates/PageTemplates.test-ids.js.map +1 -0
  290. package/lib/components/PageTemplates/ShowcasePage.d.ts +2 -2
  291. package/lib/components/PageTemplates/ShowcasePage.d.ts.map +1 -1
  292. package/lib/components/PageTemplates/ShowcasePage.js +5 -6
  293. package/lib/components/PageTemplates/ShowcasePage.js.map +1 -1
  294. package/lib/components/PageTemplates/index.d.ts +6 -1
  295. package/lib/components/PageTemplates/index.d.ts.map +1 -1
  296. package/lib/components/PageTemplates/index.js +5 -1
  297. package/lib/components/PageTemplates/index.js.map +1 -1
  298. package/lib/components/RulePicker/RulePicker.d.ts +4 -0
  299. package/lib/components/RulePicker/RulePicker.d.ts.map +1 -0
  300. package/lib/components/RulePicker/RulePicker.js +81 -0
  301. package/lib/components/RulePicker/RulePicker.js.map +1 -0
  302. package/lib/index.d.ts +5 -1
  303. package/lib/index.d.ts.map +1 -1
  304. package/lib/index.js +5 -1
  305. package/lib/index.js.map +1 -1
  306. package/lib/utils/typeIconMapping.js +1 -1
  307. package/lib/utils/typeIconMapping.js.map +1 -1
  308. package/package.json +4 -4
  309. package/lib/utils/index.d.ts +0 -2
  310. package/lib/utils/index.d.ts.map +0 -1
  311. package/lib/utils/index.js +0 -2
  312. package/lib/utils/index.js.map +0 -1
  313. package/lib/utils/utils.d.ts +0 -14
  314. package/lib/utils/utils.d.ts.map +0 -1
  315. package/lib/utils/utils.js +0 -13
  316. package/lib/utils/utils.js.map +0 -1
@@ -0,0 +1,208 @@
1
+ import { treeHelpers } from '@pega/cosmos-react-core';
2
+ import { AutomationActions } from './Automation.types';
3
+ export const automationTreeHelpers = {
4
+ /**
5
+ * Get the index of a node
6
+ * @param nodes Rulesteps
7
+ * @param id Id of required node
8
+ * @returns Index of the node in list of nodes
9
+ */
10
+ getNodeIndex(nodes, id) {
11
+ return (nodes ?? []).findIndex(n => n.id === id);
12
+ },
13
+ /**
14
+ * Add a node
15
+ * @param nodes Current tree nodes
16
+ * @param index Index in list where new node should be appended.
17
+ * @param newNode New node
18
+ * @returns Updated node list
19
+ */
20
+ addNode(nodes, index, newNode) {
21
+ return [...(nodes ?? []).slice(0, index), newNode, ...(nodes ?? []).slice(index)];
22
+ },
23
+ /**
24
+ * Add a step before a node.
25
+ * @param nodes Current tree nodes
26
+ * @param id Id of node clicked
27
+ * @param newNode New node
28
+ * @returns Updated tree
29
+ */
30
+ addStepBefore(nodes, id, newNode) {
31
+ const parentNode = treeHelpers.getParentNode([...nodes], id);
32
+ if (!parentNode) {
33
+ return this.addNode(nodes, this.getNodeIndex(nodes, id), newNode);
34
+ }
35
+ return treeHelpers.mapNode([...nodes], parentNode.id, node => {
36
+ return {
37
+ ...node,
38
+ nodes: this.addNode(node.nodes || [], this.getNodeIndex(node.nodes || [], id), newNode)
39
+ };
40
+ });
41
+ },
42
+ /**
43
+ * Add step after a node.
44
+ * @param nodes Current tree nodes
45
+ * @param id Id of node clicked
46
+ * @param newNode New node
47
+ * @returns Updated tree
48
+ */
49
+ addStepAfter(nodes, id, newNode) {
50
+ const parentNode = treeHelpers.getParentNode([...nodes], id);
51
+ if (!parentNode) {
52
+ return this.addNode(nodes, this.getNodeIndex(nodes, id) + 1, newNode);
53
+ }
54
+ return treeHelpers.mapNode([...nodes], parentNode.id, node => {
55
+ return {
56
+ ...node,
57
+ nodes: this.addNode(node.nodes || [], this.getNodeIndex(node.nodes || [], id) + 1, newNode)
58
+ };
59
+ });
60
+ },
61
+ /**
62
+ * Add sub-step on a node.
63
+ * @param nodes Current tree nodes
64
+ * @param id Id of node clicked
65
+ * @param newNode New node
66
+ * @returns Updated tree
67
+ */
68
+ addSubStep(nodes, id, newNode) {
69
+ return treeHelpers.appendTo([...nodes], id, [newNode]);
70
+ },
71
+ /**
72
+ * Delete the node.
73
+ * @param nodes Current tree nodes
74
+ * @param id Id of node clicked
75
+ * @returns Updated tree
76
+ */
77
+ deleteStep(nodes, id) {
78
+ const parentNode = treeHelpers.getParentNode([...nodes], id);
79
+ if (!parentNode) {
80
+ return nodes.filter(node => node.id !== id);
81
+ }
82
+ return treeHelpers.mapNode([...nodes], parentNode.id, node => ({
83
+ ...node,
84
+ nodes: [...(node.nodes ?? [])].filter(n => n.id !== id)
85
+ }));
86
+ },
87
+ /**
88
+ * Toggle expand/collapse of node.
89
+ * @param nodes Current tree nodes
90
+ * @param id Id of node clicked
91
+ * @param expand Option to set expand collapse if user specifies explicitly
92
+ * @returns Updated tree
93
+ */
94
+ toggleExpandCollapse(nodes, id) {
95
+ return treeHelpers.mapNode([...nodes], id, node => ({
96
+ ...node,
97
+ expanded: !node.expanded,
98
+ mountContent: true
99
+ }));
100
+ },
101
+ /**
102
+ * Change step type of a node.
103
+ * @param nodes Current tree nodes
104
+ * @param id Id of node clicked
105
+ * @param stepName Name of step,
106
+ * @param stepVisual Visual of step
107
+ * @returns Updated tree
108
+ */
109
+ changeStep(nodes, id, stepName, stepVisual) {
110
+ return treeHelpers.mapNode([...nodes], id, node => ({
111
+ ...node,
112
+ stepName,
113
+ stepVisual
114
+ }));
115
+ },
116
+ /**
117
+ * Expand all nodes of tree.
118
+ * @param nodes Current tree nodes
119
+ * @returns Updated tree
120
+ */
121
+ expandAll(nodes) {
122
+ return treeHelpers.mapTree([...nodes], node => ({
123
+ ...node,
124
+ expanded: true,
125
+ mountContent: true
126
+ }));
127
+ },
128
+ /**
129
+ * Collapse all nodes of tree.
130
+ * @param nodes Current tree nodes
131
+ * @returns Updated tree
132
+ */
133
+ collapseAll(nodes) {
134
+ return treeHelpers.mapTree([...nodes], node => ({
135
+ ...node,
136
+ expanded: false
137
+ }));
138
+ },
139
+ /**
140
+ * Calculate the step numbers and append to tree
141
+ * @param nodes Current tree nodes
142
+ * @param prefix Helper prefix text
143
+ * @param depth Depth of node
144
+ * @returns Updated tree with step numbers
145
+ */
146
+ calculateStepIndices(nodes, prefix = '', depth = 0) {
147
+ return nodes?.map((node, index) => {
148
+ let currentPrefix = prefix ? `${prefix}.${index + 1}` : `${index + 1}`;
149
+ if (node.stepName === AutomationActions.ActionErrorHandler) {
150
+ const segments = currentPrefix.split('.');
151
+ segments[segments.length - 1] = 'Err';
152
+ currentPrefix = segments.join('.');
153
+ }
154
+ return {
155
+ ...node,
156
+ stepNumber: currentPrefix,
157
+ nodes: node.nodes ? this.calculateStepIndices(node.nodes, currentPrefix, depth + 1) : []
158
+ };
159
+ });
160
+ },
161
+ /**
162
+ *
163
+ * @param nodes Rule steps
164
+ * @param stepId Current step id
165
+ * @returns Next node.
166
+ */
167
+ getNextNode(nodes, stepId) {
168
+ const nodelist = treeHelpers.flatten(nodes);
169
+ const currentNodeIndex = this.getNodeIndex(nodelist, stepId);
170
+ return currentNodeIndex === nodelist.length - 1
171
+ ? nodelist[nodelist.length - 1]
172
+ : nodelist[currentNodeIndex + 1];
173
+ },
174
+ /**
175
+ *
176
+ * @param nodes Rule steps
177
+ * @param stepId Current step id
178
+ * @returns Previous node.
179
+ */
180
+ getPreviousNode(nodes, stepId) {
181
+ const nodelist = treeHelpers.flatten(nodes);
182
+ const currentNodeIndex = this.getNodeIndex(nodelist, stepId);
183
+ return currentNodeIndex === 0 ? nodelist[0] : nodelist[currentNodeIndex - 1];
184
+ },
185
+ /**
186
+ * Converts rule step data to AutomationWrapperProps
187
+ * @param ruleStepData Raw rule data
188
+ * @param fn Helper function to create node.
189
+ * @returns Tree in AutomationWrapperProps structure.
190
+ */
191
+ constructRuleStepTree(ruleStepData, fn) {
192
+ if (!ruleStepData || ruleStepData.length === 0) {
193
+ return [];
194
+ }
195
+ return ruleStepData.map(({ Id, Type, RuleSteps, ...rest }) => {
196
+ return {
197
+ ...fn(Id, Type),
198
+ meta: { Id, Type, ...rest },
199
+ nodes: this.constructRuleStepTree(Array.isArray(RuleSteps) ? RuleSteps : [], fn)
200
+ };
201
+ });
202
+ }
203
+ };
204
+ const AUTOMATION_ACTION_TYPES_SET = new Set(Object.values(AutomationActions));
205
+ export const isValidAutomationActionType = (value) => {
206
+ return AUTOMATION_ACTION_TYPES_SET.has(value);
207
+ };
208
+ //# sourceMappingURL=Automation.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Automation.utils.js","sourceRoot":"","sources":["../../../src/components/Automation/Automation.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC;;;;;OAKG;IACH,YAAY,CAAC,KAAyB,EAAE,EAA0B;QAChE,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACnD,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,KAAyB,EAAE,KAAa,EAAE,OAAyB;QACzE,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CACX,KAAyB,EACzB,EAA0B,EAC1B,OAAyB;QAEzB,MAAM,UAAU,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7D,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC;QACD,O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AK,EAAE,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC;aACjF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,MAAM,2BAA2B,GAAG,IAAI,GAAG,CAAS,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAEtF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAa,EAAiC,EAAE;IAC1F,OAAO,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC,CAAC","sourcesContent":["import { treeHelpers } from '@pega/cosmos-react-core';\n\nimport { AutomationActions } from './Automation.types';\nimport type { RuleStepData, RuleStepTreeNode, AutomationActionType } from './Automation.types';\n\nexport const automationTreeHelpers = {\n /**\n * Get the index of a node\n * @param nodes Rulesteps\n * @param id Id of required node\n * @returns Index of the node in list of nodes\n */\n getNodeIndex(nodes: RuleStepTreeNode[], id: RuleStepTreeNode['id']): number {\n return (nodes ?? []).findIndex(n => n.id === id);\n },\n\n /**\n * Add a node\n * @param nodes Current tree nodes\n * @param index Index in list where new node should be appended.\n * @param newNode New node\n * @returns Updated node list\n */\n addNode(nodes: RuleStepTreeNode[], index: number, newNode: RuleStepTreeNode): RuleStepTreeNode[] {\n return [...(nodes ?? []).slice(0, index), newNode, ...(nodes ?? []).slice(index)];\n },\n\n /**\n * Add a step before a node.\n * @param nodes Current tree nodes\n * @param id Id of node clicked\n * @param newNode New node\n * @returns Updated tree\n */\n addStepBefore(\n nodes: RuleStepTreeNode[],\n id: RuleStepTreeNode['id'],\n newNode: RuleStepTreeNode\n ): RuleStepTreeNode[] {\n const parentNode = treeHelpers.getParentNode([...nodes], id);\n if (!parentNode) {\n return this.addNode(nodes, this.getNodeIndex(nodes, id), newNode);\n }\n return treeHelpers.mapNode([...nodes], parentNode.id, node => {\n return {\n ...node,\n nodes: this.addNode(node.nodes || [], this.getNodeIndex(node.nodes || [], id), newNode)\n };\n });\n },\n\n /**\n * Add step after a node.\n * @param nodes Current tree nodes\n * @param id Id of node clicked\n * @param newNode New node\n * @returns Updated tree\n */\n addStepAfter(\n nodes: RuleStepTreeNode[],\n id: RuleStepTreeNode['id'],\n newNode: RuleStepTreeNode\n ): RuleStepTreeNode[] {\n const parentNode = treeHelpers.getParentNode([...nodes], id);\n if (!parentNode) {\n return this.addNode(nodes, this.getNodeIndex(nodes, id) + 1, newNode);\n }\n return treeHelpers.mapNode([...nodes], parentNode.id, node => {\n return {\n ...node,\n nodes: this.addNode(node.nodes || [], this.getNodeIndex(node.nodes || [], id) + 1, newNode)\n };\n });\n },\n\n /**\n * Add sub-step on a node.\n * @param nodes Current tree nodes\n * @param id Id of node clicked\n * @param newNode New node\n * @returns Updated tree\n */\n addSubStep(\n nodes: RuleStepTreeNode[],\n id: RuleStepTreeNode['id'],\n newNode: RuleStepTreeNode\n ): RuleStepTreeNode[] {\n return treeHelpers.appendTo([...nodes], id, [newNode]);\n },\n\n /**\n * Delete the node.\n * @param nodes Current tree nodes\n * @param id Id of node clicked\n * @returns Updated tree\n */\n deleteStep(nodes: RuleStepTreeNode[], id: RuleStepTreeNode['id']): RuleStepTreeNode[] {\n const parentNode = treeHelpers.getParentNode([...nodes], id);\n if (!parentNode) {\n return nodes.filter(node => node.id !== id);\n }\n return treeHelpers.mapNode([...nodes], parentNode.id, node => ({\n ...node,\n nodes: [...(node.nodes ?? [])].filter(n => n.id !== id)\n }));\n },\n\n /**\n * Toggle expand/collapse of node.\n * @param nodes Current tree nodes\n * @param id Id of node clicked\n * @param expand Option to set expand collapse if user specifies explicitly\n * @returns Updated tree\n */\n toggleExpandCollapse(nodes: RuleStepTreeNode[], id: RuleStepTreeNode['id']): RuleStepTreeNode[] {\n return treeHelpers.mapNode([...nodes], id, node => ({\n ...node,\n expanded: !node.expanded,\n mountContent: true\n }));\n },\n\n /**\n * Change step type of a node.\n * @param nodes Current tree nodes\n * @param id Id of node clicked\n * @param stepName Name of step,\n * @param stepVisual Visual of step\n * @returns Updated tree\n */\n changeStep(\n nodes: RuleStepTreeNode[],\n id: RuleStepTreeNode['id'],\n stepName: RuleStepTreeNode['stepName'],\n stepVisual: RuleStepTreeNode['stepVisual']\n ): RuleStepTreeNode[] {\n return treeHelpers.mapNode([...nodes], id, node => ({\n ...node,\n stepName,\n stepVisual\n }));\n },\n\n /**\n * Expand all nodes of tree.\n * @param nodes Current tree nodes\n * @returns Updated tree\n */\n expandAll(nodes: RuleStepTreeNode[]): RuleStepTreeNode[] {\n return treeHelpers.mapTree([...nodes], node => ({\n ...node,\n expanded: true,\n mountContent: true\n }));\n },\n\n /**\n * Collapse all nodes of tree.\n * @param nodes Current tree nodes\n * @returns Updated tree\n */\n collapseAll(nodes: RuleStepTreeNode[]): RuleStepTreeNode[] {\n return treeHelpers.mapTree([...nodes], node => ({\n ...node,\n expanded: false\n }));\n },\n\n /**\n * Calculate the step numbers and append to tree\n * @param nodes Current tree nodes\n * @param prefix Helper prefix text\n * @param depth Depth of node\n * @returns Updated tree with step numbers\n */\n calculateStepIndices(\n nodes: RuleStepTreeNode[],\n prefix: string = '',\n depth: number = 0\n ): RuleStepTreeNode[] {\n return nodes?.map((node, index) => {\n let currentPrefix = prefix ? `${prefix}.${index + 1}` : `${index + 1}`;\n if (node.stepName === AutomationActions.ActionErrorHandler) {\n const segments = currentPrefix.split('.');\n segments[segments.length - 1] = 'Err';\n currentPrefix = segments.join('.');\n }\n return {\n ...node,\n stepNumber: currentPrefix,\n nodes: node.nodes ? this.calculateStepIndices(node.nodes, currentPrefix, depth + 1) : []\n };\n });\n },\n\n /**\n *\n * @param nodes Rule steps\n * @param stepId Current step id\n * @returns Next node.\n */\n getNextNode(nodes: RuleStepTreeNode[], stepId: RuleStepTreeNode['stepId']): RuleStepTreeNode {\n const nodelist = treeHelpers.flatten(nodes);\n const currentNodeIndex = this.getNodeIndex(nodelist, stepId);\n return currentNodeIndex === nodelist.length - 1\n ? nodelist[nodelist.length - 1]\n : nodelist[currentNodeIndex + 1];\n },\n\n /**\n *\n * @param nodes Rule steps\n * @param stepId Current step id\n * @returns Previous node.\n */\n getPreviousNode(nodes: RuleStepTreeNode[], stepId: RuleStepTreeNode['stepId']): RuleStepTreeNode {\n const nodelist = treeHelpers.flatten(nodes);\n const currentNodeIndex = this.getNodeIndex(nodelist, stepId);\n return currentNodeIndex === 0 ? nodelist[0] : nodelist[currentNodeIndex - 1];\n },\n\n /**\n * Converts rule step data to AutomationWrapperProps\n * @param ruleStepData Raw rule data\n * @param fn Helper function to create node.\n * @returns Tree in AutomationWrapperProps structure.\n */\n constructRuleStepTree(\n ruleStepData: RuleStepData[],\n fn: (stepId: RuleStepTreeNode['stepId'], stepName: AutomationActionType) => RuleStepTreeNode\n ): RuleStepTreeNode[] {\n if (!ruleStepData || ruleStepData.length === 0) {\n return [];\n }\n\n return ruleStepData.map(({ Id, Type, RuleSteps, ...rest }) => {\n return {\n ...fn(Id, Type),\n meta: { Id, Type, ...rest },\n nodes: this.constructRuleStepTree(Array.isArray(RuleSteps) ? RuleSteps : [], fn)\n };\n });\n }\n};\n\nconst AUTOMATION_ACTION_TYPES_SET = new Set<string>(Object.values(AutomationActions));\n\nexport const isValidAutomationActionType = (value: string): value is AutomationActionType => {\n return AUTOMATION_ACTION_TYPES_SET.has(value);\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import type { AutomationContextValue } from './Automation.types';
2
+ declare const AutomationContext: import("react").Context<AutomationContextValue>;
3
+ export default AutomationContext;
4
+ //# sourceMappingURL=AutomationContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutomationContext.d.ts","sourceRoot":"","sources":["../../../src/components/Automation/AutomationContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,QAAA,MAAM,iBAAiB,iDAKrB,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { createContext } from 'react';
2
+ const AutomationContext = createContext({
3
+ firstNodeId: undefined,
4
+ focusInsideNode: false,
5
+ focusInsideTree: false,
6
+ focusedNodeId: undefined
7
+ });
8
+ export default AutomationContext;
9
+ //# sourceMappingURL=AutomationContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutomationContext.js","sourceRoot":"","sources":["../../../src/components/Automation/AutomationContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,MAAM,iBAAiB,GAAG,aAAa,CAAyB;IAC9D,WAAW,EAAE,SAAS;IACtB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,KAAK;IACtB,aAAa,EAAE,SAAS;CACzB,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC","sourcesContent":["import { createContext } from 'react';\n\nimport type { AutomationContextValue } from './Automation.types';\n\nconst AutomationContext = createContext<AutomationContextValue>({\n firstNodeId: undefined,\n focusInsideNode: false,\n focusInsideTree: false,\n focusedNodeId: undefined\n});\n\nexport default AutomationContext;\n"]}
@@ -0,0 +1,7 @@
1
+ import type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
2
+ import type { RuleStepProps } from './Automation.types';
3
+ declare const _default: ForwardRefForwardPropsComponent<RuleStepProps> & {
4
+ getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["expand-collapse-button", "error-icon", "step-number", "switch-menu", "summary", "summary-tooltip", "comment", "comment-tooltip", "add-step-menu", "step-actions", "content"]>;
5
+ };
6
+ export default _default;
7
+ //# sourceMappingURL=RuleStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RuleStep.d.ts","sourceRoot":"","sources":["../../../src/components/Automation/RuleStep.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAgB/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;;;;AAgVxD,wBAAyD"}
@@ -0,0 +1,151 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useState, useRef, useEffect, useContext, useMemo } from 'react';
3
+ import { useDirection, Progress, Tooltip, useElement, Flex, Button, MenuButton, Icon, VisuallyHiddenText, ExpandCollapse, useConsolidatedRef, Text, useI18n, useTestIds, withTestIds, useEvent, Actions, getFocusables, registerIcon } from '@pega/cosmos-react-core';
4
+ import * as caretDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-down.icon';
5
+ import * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';
6
+ import * as caretRightIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-right.icon';
7
+ import IconTile from '../IconTile';
8
+ import { StyledContainer, StyledStepHeader, StyledErrorIcon, StyledSummary, StyledComment, StyledContent } from './Automation.styles';
9
+ import { AutomationActions } from './Automation.types';
10
+ import { getRuleStepTestIds } from './Automation.test-ids';
11
+ import AutomationContext from './AutomationContext';
12
+ import { isValidAutomationActionType } from './Automation.utils';
13
+ registerIcon(caretDownIcon, caretLeftIcon, caretRightIcon);
14
+ const RuleStep = forwardRef(({ testId, stepId, stepName, stepNumber, stepVisual, switchMenu, summary, comment, addStepMenu, content, onExpandCollapse, stepActions, expanded, error, readOnly, loading, mountContent = expanded, ...restProps }, ref) => {
15
+ const t = useI18n();
16
+ const { rtl } = useDirection();
17
+ const testIds = useTestIds(testId, getRuleStepTestIds);
18
+ const ruleStepRef = useConsolidatedRef(ref);
19
+ const ruleStepActionsRef = useRef(null);
20
+ const [summaryEl, setSummaryEl] = useElement(null);
21
+ const [commentEl, setCommentEl] = useElement(null);
22
+ const [ruleStepTabIndex, setRuleStepTabIndex] = useState(-1);
23
+ const { focusedNodeId, focusInsideNode, firstNodeId } = useContext(AutomationContext);
24
+ const focused = stepId === focusedNodeId;
25
+ const translatedStepName = useMemo(() => {
26
+ switch (stepName) {
27
+ case AutomationActions.ActionSet:
28
+ case AutomationActions.ActionSetRow:
29
+ return t('action_set');
30
+ case AutomationActions.ActionWhen:
31
+ return t('action_when');
32
+ case AutomationActions.ActionAppend:
33
+ return t('action_append');
34
+ case AutomationActions.ActionCall:
35
+ return t('action_call');
36
+ case AutomationActions.ActionCreate:
37
+ return t('action_create');
38
+ case AutomationActions.ActionForEach:
39
+ return t('action_for_each');
40
+ case AutomationActions.ActionExit:
41
+ case AutomationActions.ActionExitAutomation:
42
+ case AutomationActions.ActionExitIteration:
43
+ case AutomationActions.ActionExitForEach:
44
+ return t('action_exit');
45
+ case AutomationActions.ActionReturn:
46
+ return t('action_return');
47
+ case AutomationActions.ActionRemove:
48
+ case AutomationActions.ActionRemoveRow:
49
+ return t('action_remove');
50
+ case AutomationActions.ActionErrorHandler:
51
+ return t('action_error_handler');
52
+ default:
53
+ return stepName;
54
+ }
55
+ }, [stepName]);
56
+ const stepDetail = `${stepNumber}, ${translatedStepName}, ${summary || ''}, ${comment || ''}`;
57
+ const setFocusableElementsTabIndex = (tabIndex) => {
58
+ const focusables = getFocusables(ruleStepRef, { includeNegativeTabIndex: true });
59
+ focusables.forEach(item => item.setAttribute('tabIndex', tabIndex.toString()));
60
+ return focusables;
61
+ };
62
+ const onKeyDown = (e) => {
63
+ switch (e.key) {
64
+ case 'Escape': {
65
+ if (focusInsideNode && focused) {
66
+ ruleStepRef.current?.focus();
67
+ }
68
+ setFocusableElementsTabIndex('-1');
69
+ break;
70
+ }
71
+ case 'Enter': {
72
+ if (!focusInsideNode) {
73
+ e.preventDefault();
74
+ const focusables = setFocusableElementsTabIndex('0');
75
+ if (focused) {
76
+ focusables[0]?.focus();
77
+ }
78
+ }
79
+ break;
80
+ }
81
+ case 'ArrowRight': {
82
+ if (!focusInsideNode && !expanded) {
83
+ onExpandCollapse?.(stepId);
84
+ setFocusableElementsTabIndex('-1');
85
+ }
86
+ break;
87
+ }
88
+ case 'ArrowLeft': {
89
+ if (!focusInsideNode && expanded) {
90
+ onExpandCollapse?.(stepId);
91
+ }
92
+ break;
93
+ }
94
+ default:
95
+ break;
96
+ }
97
+ };
98
+ useEvent('keydown', onKeyDown, { target: ruleStepRef });
99
+ // effect to focus the current step
100
+ useEffect(() => {
101
+ if (!focusInsideNode) {
102
+ setFocusableElementsTabIndex('-1');
103
+ if (focused) {
104
+ ruleStepRef.current?.focus();
105
+ }
106
+ }
107
+ else {
108
+ const focusables = setFocusableElementsTabIndex('0');
109
+ if (focused) {
110
+ focusables[0]?.focus();
111
+ }
112
+ }
113
+ }, [focused, focusedNodeId, focusInsideNode]);
114
+ // effect to calculate tabIndex for step
115
+ useEffect(() => {
116
+ if (focusedNodeId) {
117
+ setRuleStepTabIndex(stepId === focusedNodeId && !focusInsideNode ? 0 : -1);
118
+ }
119
+ else {
120
+ setRuleStepTabIndex(stepId === firstNodeId ? 0 : -1);
121
+ }
122
+ }, [focusedNodeId, firstNodeId, focusInsideNode]);
123
+ useEffect(() => {
124
+ if (expanded) {
125
+ setFocusableElementsTabIndex(focusInsideNode ? '0' : '-1');
126
+ }
127
+ if (!expanded && !focusInsideNode) {
128
+ setFocusableElementsTabIndex('-1');
129
+ }
130
+ }, [expanded]);
131
+ return (_jsxs(Flex, { item: { grow: 1 }, as: StyledContainer, "data-testid": `${stepNumber}-${testIds.root}`, tabIndex: ruleStepTabIndex, ref: ruleStepRef, role: 'treeitem', "aria-expanded": expanded, "aria-describedby": stepId, "aria-label": `${expanded ? t('expanded_step', [stepDetail]) : t('collapsed_step', [stepDetail])}`, ...restProps, children: [_jsxs(Flex, { container: { justify: 'between', pad: 1 }, children: [_jsxs(Flex, { as: StyledStepHeader, container: { direction: 'column' }, children: [_jsxs(Flex, { item: { shrink: 1, grow: 1, basis: 'auto' }, container: { gap: 1, alignItems: 'center' }, children: [_jsx(Button, { icon: true, variant: 'simple', compact: true, onClick: () => onExpandCollapse?.(stepId), "data-testid": `${stepNumber}-${testIds.expandCollapseButton}`, "aria-label": `${expanded ? t('collapse_step', [stepNumber]) : t('expand_step', [stepNumber])}`, "aria-expanded": expanded, label: expanded ? t('collapse') : t('expand'), tabIndex: focusInsideNode ? 0 : -1, children: _jsx(Icon, { name: expanded ? 'caret-down' : `caret-${rtl ? 'left' : 'right'}` }) }), _jsx(Text, { "data-testid": `${stepNumber}-${testIds.stepNumber}`, children: stepNumber }), error && (_jsx(StyledErrorIcon, { "data-testid": `${stepNumber}-${testIds.errorIcon}`, name: 'warn-solid' })), _jsx(Flex, { item: { shrink: 0 }, children: stepVisual && _jsx(IconTile, { ...stepVisual }) }), switchMenu && !readOnly ? (_jsx(MenuButton, { testId: `${stepNumber}${testIds.switchMenu}`, ...switchMenu, tabIndex: focusInsideNode ? 0 : -1, variant: 'text', text: translatedStepName, menu: {
132
+ ...switchMenu.menu,
133
+ onItemClick: (id) => {
134
+ if (isValidAutomationActionType(id)) {
135
+ switchMenu?.menu.onItemClick?.(id, stepId, stepNumber);
136
+ }
137
+ }
138
+ } })) : (translatedStepName), summary && (_jsxs(_Fragment, { children: [_jsx(StyledSummary, { "data-testid": `${stepNumber}-${testIds.summary}`, variant: 'secondary', ref: setSummaryEl, children: summary }), _jsx(Tooltip, { smart: true, target: summaryEl, hideDelay: 'none', "data-testid": `${stepNumber}-${testIds.summaryTooltip}`, children: summary })] }))] }), comment && (_jsxs(_Fragment, { children: [_jsx(StyledComment, { ref: setCommentEl, "data-testid": `${stepNumber}-${testIds.comment}`, variant: 'secondary', children: comment }), _jsx(Tooltip, { smart: true, target: commentEl, hideDelay: 'none', "data-testid": `${stepNumber}-${testIds.commentTooltip}`, children: comment })] }))] }), _jsxs(Flex, { ref: ruleStepActionsRef, item: { shrink: 0 }, container: { justify: 'center', alignItems: 'center' }, children: [addStepMenu && !readOnly && (_jsx(MenuButton, { testId: `${stepNumber}-${testIds.addStepMenu}`, ...addStepMenu, icon: 'plus', iconOnly: true, compact: true, text: t('add_step'), variant: 'simple', tabIndex: focusInsideNode ? 0 : -1, menu: {
139
+ ...addStepMenu.menu,
140
+ scrollAt: 20,
141
+ mode: 'action',
142
+ variant: 'drill-down',
143
+ onItemClick: (id) => {
144
+ if (isValidAutomationActionType(id)) {
145
+ addStepMenu?.menu.onItemClick?.(id, stepId, stepNumber);
146
+ }
147
+ }
148
+ } })), stepActions && (_jsx(Actions, { "data-testid": `${stepNumber}-${testIds.stepActions}`, compact: true, contextualLabel: `step-${stepNumber}`, items: stepActions, tabIndex: focusInsideNode ? 0 : -1 }))] })] }), _jsx(VisuallyHiddenText, { id: stepId, children: error ? `Step name ${translatedStepName} has errors` : `Step name ${translatedStepName}` }), (content || loading) && (_jsx(ExpandCollapse, { transitionSpeed: '0.1s', collapsed: !expanded, children: _jsxs(StyledContent, { "data-testid": `${stepNumber}-${testIds.content}`, children: [(expanded || mountContent) && content, loading && (_jsx(Progress, { variant: 'ring', placement: 'local', focusOnVisible: true, message: t('loading') }))] }) }))] }));
149
+ });
150
+ export default withTestIds(RuleStep, getRuleStepTestIds);
151
+ //# sourceMappingURL=RuleStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RuleStep.js","sourceRoot":"","sources":["../../../src/components/Automation/RuleStep.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGrF,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,UAAU,EACV,IAAI,EACJ,MAAM,EACN,UAAU,EACV,IAAI,EACJ,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,IAAI,EACJ,OAAO,EACP,UAAU,EACV,WAAW,EACX,QAAQ,EACR,OAAO,EACP,aAAa,EACb,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,aAAa,MAAM,mEAAmE,CAAC;AAC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AI,YAAY,CAAC,IAAI,OAAO,EAErC,OAAO,IAAI,CACV,KAAC,QAAQ,IAAC,OAAO,EAAC,MAAM,EAAC,SAAS,EAAC,OAAO,EAAC,cAAc,QAAC,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC,GAAI,CACpF,IACa,GACD,CAClB,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { forwardRef, useState, useRef, useEffect, useContext, useMemo } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport {\n useDirection,\n Progress,\n Tooltip,\n useElement,\n Flex,\n Button,\n MenuButton,\n Icon,\n VisuallyHiddenText,\n ExpandCollapse,\n useConsolidatedRef,\n Text,\n useI18n,\n useTestIds,\n withTestIds,\n useEvent,\n Actions,\n getFocusables,\n registerIcon\n} from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';\nimport * as caretDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-down.icon';\nimport * as caretLeftIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-left.icon';\nimport * as caretRightIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-right.icon';\n\nimport IconTile from '../IconTile';\n\nimport {\n StyledContainer,\n StyledStepHeader,\n StyledErrorIcon,\n StyledSummary,\n StyledComment,\n StyledContent\n} from './Automation.styles';\nimport { AutomationActions } from './Automation.types';\nimport type { RuleStepProps } from './Automation.types';\nimport { getRuleStepTestIds } from './Automation.test-ids';\nimport AutomationContext from './AutomationContext';\nimport { isValidAutomationActionType } from './Automation.utils';\n\nregisterIcon(caretDownIcon, caretLeftIcon, caretRightIcon);\n\nconst RuleStep: ForwardRefForwardPropsComponent<RuleStepProps> = forwardRef(\n (\n {\n testId,\n stepId,\n stepName,\n stepNumber,\n stepVisual,\n switchMenu,\n summary,\n comment,\n addStepMenu,\n content,\n onExpandCollapse,\n stepActions,\n expanded,\n error,\n readOnly,\n loading,\n mountContent = expanded,\n ...restProps\n }: PropsWithoutRef<RuleStepProps>,\n ref: RuleStepProps['ref']\n ) => {\n const t = useI18n();\n const { rtl } = useDirection();\n const testIds = useTestIds(testId, getRuleStepTestIds);\n\n const ruleStepRef = useConsolidatedRef(ref);\n const ruleStepActionsRef = useRef<HTMLDivElement | null>(null);\n\n const [summaryEl, setSummaryEl] = useElement(null);\n const [commentEl, setCommentEl] = useElement(null);\n\n const [ruleStepTabIndex, setRuleStepTabIndex] = useState(-1);\n const { focusedNodeId, focusInsideNode, firstNodeId } = useContext(AutomationContext);\n\n const focused = stepId === focusedNodeId;\n\n const translatedStepName = useMemo(() => {\n switch (stepName) {\n case AutomationActions.ActionSet:\n case AutomationActions.ActionSetRow:\n return t('action_set');\n\n case AutomationActions.ActionWhen:\n return t('action_when');\n\n case AutomationActions.ActionAppend:\n return t('action_append');\n\n case AutomationActions.ActionCall:\n return t('action_call');\n\n case AutomationActions.ActionCreate:\n return t('action_create');\n\n case AutomationActions.ActionForEach:\n return t('action_for_each');\n\n case AutomationActions.ActionExit:\n case AutomationActions.ActionExitAutomation:\n case AutomationActions.ActionExitIteration:\n case AutomationActions.ActionExitForEach:\n return t('action_exit');\n\n case AutomationActions.ActionReturn:\n return t('action_return');\n\n case AutomationActions.ActionRemove:\n case AutomationActions.ActionRemoveRow:\n return t('action_remove');\n\n case AutomationActions.ActionErrorHandler:\n return t('action_error_handler');\n\n default:\n return stepName;\n }\n }, [stepName]);\n\n const stepDetail = `${stepNumber}, ${translatedStepName}, ${summary || ''}, ${comment || ''}`;\n\n const setFocusableElementsTabIndex = (tabIndex: number | string) => {\n const focusables = getFocusables(ruleStepRef, { includeNegativeTabIndex: true });\n focusables.forEach(item => item.setAttribute('tabIndex', tabIndex.toString()));\n\n return focusables;\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'Escape': {\n if (focusInsideNode && focused) {\n ruleStepRef.current?.focus();\n }\n setFocusableElementsTabIndex('-1');\n break;\n }\n case 'Enter': {\n if (!focusInsideNode) {\n e.preventDefault();\n const focusables = setFocusableElementsTabIndex('0');\n if (focused) {\n focusables[0]?.focus();\n }\n }\n break;\n }\n case 'ArrowRight': {\n if (!focusInsideNode && !expanded) {\n onExpandCollapse?.(stepId);\n setFocusableElementsTabIndex('-1');\n }\n break;\n }\n case 'ArrowLeft': {\n if (!focusInsideNode && expanded) {\n onExpandCollapse?.(stepId);\n }\n break;\n }\n default:\n break;\n }\n };\n\n useEvent('keydown', onKeyDown, { target: ruleStepRef });\n\n // effect to focus the current step\n useEffect(() => {\n if (!focusInsideNode) {\n setFocusableElementsTabIndex('-1');\n if (focused) {\n ruleStepRef.current?.focus();\n }\n } else {\n const focusables = setFocusableElementsTabIndex('0');\n if (focused) {\n focusables[0]?.focus();\n }\n }\n }, [focused, focusedNodeId, focusInsideNode]);\n\n // effect to calculate tabIndex for step\n useEffect(() => {\n if (focusedNodeId) {\n setRuleStepTabIndex(stepId === focusedNodeId && !focusInsideNode ? 0 : -1);\n } else {\n setRuleStepTabIndex(stepId === firstNodeId ? 0 : -1);\n }\n }, [focusedNodeId, firstNodeId, focusInsideNode]);\n\n useEffect(() => {\n if (expanded) {\n setFocusableElementsTabIndex(focusInsideNode ? '0' : '-1');\n }\n if (!expanded && !focusInsideNode) {\n setFocusableElementsTabIndex('-1');\n }\n }, [expanded]);\n\n return (\n <Flex\n item={{ grow: 1 }}\n as={StyledContainer}\n data-testid={`${stepNumber}-${testIds.root}`}\n tabIndex={ruleStepTabIndex}\n ref={ruleStepRef}\n role='treeitem'\n aria-expanded={expanded}\n aria-describedby={stepId}\n aria-label={`${expanded ? t('expanded_step', [stepDetail]) : t('collapsed_step', [stepDetail])}`}\n {...restProps}\n >\n <Flex container={{ justify: 'between', pad: 1 }}>\n <Flex as={StyledStepHeader} container={{ direction: 'column' }}>\n <Flex\n item={{ shrink: 1, grow: 1, basis: 'auto' }}\n container={{ gap: 1, alignItems: 'center' }}\n >\n <Button\n icon\n variant='simple'\n compact\n onClick={() => onExpandCollapse?.(stepId)}\n data-testid={`${stepNumber}-${testIds.expandCollapseButton}`}\n aria-label={`${expanded ? t('collapse_step', [stepNumber]) : t('expand_step', [stepNumber])}`}\n aria-expanded={expanded}\n label={expanded ? t('collapse') : t('expand')}\n tabIndex={focusInsideNode ? 0 : -1}\n >\n <Icon name={expanded ? 'caret-down' : `caret-${rtl ? 'left' : 'right'}`} />\n </Button>\n\n <Text data-testid={`${stepNumber}-${testIds.stepNumber}`}>{stepNumber}</Text>\n\n {error && (\n <StyledErrorIcon\n data-testid={`${stepNumber}-${testIds.errorIcon}`}\n name='warn-solid'\n />\n )}\n\n <Flex item={{ shrink: 0 }}>{stepVisual && <IconTile {...stepVisual} />}</Flex>\n\n {switchMenu && !readOnly ? (\n <MenuButton\n testId={`${stepNumber}${testIds.switchMenu}`}\n {...switchMenu}\n tabIndex={focusInsideNode ? 0 : -1}\n variant='text'\n text={translatedStepName}\n menu={{\n ...switchMenu.menu,\n onItemClick: (id: string) => {\n if (isValidAutomationActionType(id)) {\n switchMenu?.menu.onItemClick?.(id, stepId, stepNumber);\n }\n }\n }}\n />\n ) : (\n translatedStepName\n )}\n\n {summary && (\n <>\n <StyledSummary\n data-testid={`${stepNumber}-${testIds.summary}`}\n variant='secondary'\n ref={setSummaryEl}\n >\n {summary}\n </StyledSummary>\n <Tooltip\n smart\n target={summaryEl}\n hideDelay='none'\n data-testid={`${stepNumber}-${testIds.summaryTooltip}`}\n >\n {summary}\n </Tooltip>\n </>\n )}\n </Flex>\n\n {comment && (\n <>\n <StyledComment\n ref={setCommentEl}\n data-testid={`${stepNumber}-${testIds.comment}`}\n variant='secondary'\n >\n {comment}\n </StyledComment>\n <Tooltip\n smart\n target={commentEl}\n hideDelay='none'\n data-testid={`${stepNumber}-${testIds.commentTooltip}`}\n >\n {comment}\n </Tooltip>\n </>\n )}\n </Flex>\n\n <Flex\n ref={ruleStepActionsRef}\n item={{ shrink: 0 }}\n container={{ justify: 'center', alignItems: 'center' }}\n >\n {addStepMenu && !readOnly && (\n <MenuButton\n testId={`${stepNumber}-${testIds.addStepMenu}`}\n {...addStepMenu}\n icon='plus'\n iconOnly\n compact\n text={t('add_step')}\n variant='simple'\n tabIndex={focusInsideNode ? 0 : -1}\n menu={{\n ...addStepMenu.menu,\n scrollAt: 20,\n mode: 'action',\n variant: 'drill-down',\n onItemClick: (id: string) => {\n if (isValidAutomationActionType(id)) {\n addStepMenu?.menu.onItemClick?.(id, stepId, stepNumber);\n }\n }\n }}\n />\n )}\n\n {stepActions && (\n <Actions\n data-testid={`${stepNumber}-${testIds.stepActions}`}\n compact\n contextualLabel={`step-${stepNumber}`}\n items={stepActions}\n tabIndex={focusInsideNode ? 0 : -1}\n />\n )}\n </Flex>\n </Flex>\n\n <VisuallyHiddenText id={stepId}>\n {error ? `Step name ${translatedStepName} has errors` : `Step name ${translatedStepName}`}\n </VisuallyHiddenText>\n\n {(content || loading) && (\n <ExpandCollapse transitionSpeed='0.1s' collapsed={!expanded}>\n <StyledContent data-testid={`${stepNumber}-${testIds.content}`}>\n {(expanded || mountContent) && content}\n\n {loading && (\n <Progress variant='ring' placement='local' focusOnVisible message={t('loading')} />\n )}\n </StyledContent>\n </ExpandCollapse>\n )}\n </Flex>\n );\n }\n);\n\nexport default withTestIds(RuleStep, getRuleStepTestIds);\n"]}
@@ -0,0 +1,5 @@
1
+ export { default } from './Automation';
2
+ export { default as RuleStep } from './RuleStep';
3
+ export { automationTreeHelpers } from './Automation.utils';
4
+ export type { RuleStepProps, AutomationProps, RuleStepTreeNode, AutomationActionType, AutomationActions } from './Automation.types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EACV,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default } from './Automation';
2
+ export { default as RuleStep } from './RuleStep';
3
+ export { automationTreeHelpers } from './Automation.utils';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Automation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { default } from './Automation';\nexport { default as RuleStep } from './RuleStep';\nexport { automationTreeHelpers } from './Automation.utils';\nexport type {\n RuleStepProps,\n AutomationProps,\n RuleStepTreeNode,\n AutomationActionType,\n AutomationActions\n} from './Automation.types';\n"]}
@@ -1,7 +1,7 @@
1
1
  import type { FC } from 'react';
2
2
  import type { ComboBoxProps } from '@pega/cosmos-react-core';
3
- import type { ConstantBooleanConfig } from './DynamicInput.types';
4
- type BooleanControlProps = ConstantBooleanConfig['props'] & Pick<ComboBoxProps, 'required'>;
3
+ import type { ConstantBooleanConfig } from './ConstantControl';
4
+ type BooleanControlProps = ConstantBooleanConfig['props'] & Pick<ComboBoxProps, 'required' | 'disabled' | 'status' | 'readOnly'>;
5
5
  declare const BooleanControl: FC<BooleanControlProps>;
6
6
  export default BooleanControl;
7
7
  //# sourceMappingURL=BooleanControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BooleanControl.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicInput/BooleanControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,KAAK,mBAAmB,GAAG,qBAAqB,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;AAE5F,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAqC3C,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"BooleanControl.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicInput/BooleanControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,KAAK,mBAAmB,GAAG,qBAAqB,CAAC,OAAO,CAAC,GACvD,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC;AAEvE,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAqC3C,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BooleanControl.js","sourceRoot":"","sources":["../../../src/components/DynamicInput/BooleanControl.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAM5D,MAAM,cAAc,GAA4B,CAAC,EAC/C,aAAa,EACb,KAAK,EACL,QAAQ,EACR,EAAE,EACF,QAAQ,EACR,GAAG,SAAS,EACQ,EAAE,EAAE;IACxB,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,SAAS,GACb,aAAa,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzF,MAAM,KAAK,GAAG;QACZ,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,KAAK,IAAI,EAAE;QAC/D,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE;KACzD,CAAC;IAEF,OAAO,CACL,KAAC,QAAQ,OACH,SAAS,EACb,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,EAAE,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;gBAC9C,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO;aAC3D;SACF,EACD,IAAI,EAAE;YACJ,IAAI,EAAE,eAAe;YACrB,KAAK;YACL,WAAW,EAAE,MAAM,CAAC,EAAE;gBACpB,QAAQ,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;YAC9B,CAAC;SACF,EACD,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import type { FC } from 'react';\n\nimport type { ComboBoxProps } from '@pega/cosmos-react-core';\nimport { ComboBox, useI18n } from '@pega/cosmos-react-core';\n\nimport type { ConstantBooleanConfig } from './DynamicInput.types';\n\ntype BooleanControlProps = ConstantBooleanConfig['props'] & Pick<ComboBoxProps, 'required'>;\n\nconst BooleanControl: FC<BooleanControlProps> = ({\n booleanLabels,\n value,\n onChange,\n id,\n required,\n ...restProps\n}: BooleanControlProps) => {\n const t = useI18n();\n const primaries =\n booleanLabels === 'always|never' ? [t('always'), t('never')] : [t('true'), t('false')];\n\n const items = [\n { id: 'true', primary: primaries[0], selected: value === true },\n { id: 'false', primary: primaries[1], selected: !value }\n ];\n\n return (\n <ComboBox\n {...restProps}\n selected={{\n items: {\n id: value === true ? items[0].id : items[1].id,\n text: value === true ? items[0].primary : items[1].primary\n }\n }}\n menu={{\n mode: 'single-select',\n items,\n onItemClick: itemId => {\n onChange(itemId === 'true');\n }\n }}\n id={id}\n required={required}\n />\n );\n};\n\nexport default BooleanControl;\n"]}
1
+ {"version":3,"file":"BooleanControl.js","sourceRoot":"","sources":["../../../src/components/DynamicInput/BooleanControl.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAO5D,MAAM,cAAc,GAA4B,CAAC,EAC/C,aAAa,EACb,KAAK,EACL,QAAQ,EACR,EAAE,EACF,QAAQ,EACR,GAAG,SAAS,EACQ,EAAE,EAAE;IACxB,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,SAAS,GACb,aAAa,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzF,MAAM,KAAK,GAAG;QACZ,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,KAAK,IAAI,EAAE;QAC/D,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE;KACzD,CAAC;IAEF,OAAO,CACL,KAAC,QAAQ,OACH,SAAS,EACb,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,EAAE,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;gBAC9C,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO;aAC3D;SACF,EACD,IAAI,EAAE;YACJ,IAAI,EAAE,eAAe;YACrB,KAAK;YACL,WAAW,EAAE,MAAM,CAAC,EAAE;gBACpB,QAAQ,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;YAC9B,CAAC;SACF,EACD,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import type { FC } from 'react';\n\nimport type { ComboBoxProps } from '@pega/cosmos-react-core';\nimport { ComboBox, useI18n } from '@pega/cosmos-react-core';\n\nimport type { ConstantBooleanConfig } from './ConstantControl';\n\ntype BooleanControlProps = ConstantBooleanConfig['props'] &\n Pick<ComboBoxProps, 'required' | 'disabled' | 'status' | 'readOnly'>;\n\nconst BooleanControl: FC<BooleanControlProps> = ({\n booleanLabels,\n value,\n onChange,\n id,\n required,\n ...restProps\n}: BooleanControlProps) => {\n const t = useI18n();\n const primaries =\n booleanLabels === 'always|never' ? [t('always'), t('never')] : [t('true'), t('false')];\n\n const items = [\n { id: 'true', primary: primaries[0], selected: value === true },\n { id: 'false', primary: primaries[1], selected: !value }\n ];\n\n return (\n <ComboBox\n {...restProps}\n selected={{\n items: {\n id: value === true ? items[0].id : items[1].id,\n text: value === true ? items[0].primary : items[1].primary\n }\n }}\n menu={{\n mode: 'single-select',\n items,\n onItemClick: itemId => {\n onChange(itemId === 'true');\n }\n }}\n id={id}\n required={required}\n />\n );\n};\n\nexport default BooleanControl;\n"]}
@@ -0,0 +1,61 @@
1
+ import type { ComboBoxProps, CurrencyInputProps, DateInputProps, DateTimeInputProps, FormControlProps, InputProps, NumberInputProps, OmitStrict, PhoneInputProps, TextAreaProps, TimeInputProps } from '@pega/cosmos-react-core';
2
+ export type FormControlPropsToOmit = keyof Pick<FormControlProps, 'label' | 'labelHidden' | 'additionalInfo' | 'info' | 'required'>;
3
+ type ConstantTextConfig = {
4
+ format: 'Text';
5
+ props: OmitStrict<InputProps, FormControlPropsToOmit | 'onChange'> & {
6
+ onChange: (value: string | undefined) => void;
7
+ };
8
+ };
9
+ type ConstantDecimalConfig = {
10
+ format: 'Decimal';
11
+ props: OmitStrict<NumberInputProps, FormControlPropsToOmit>;
12
+ };
13
+ type ConstantIntegerConfig = {
14
+ format: 'Integer';
15
+ props: OmitStrict<NumberInputProps, FormControlPropsToOmit | 'showGroupSeparators' | 'showDecimal'>;
16
+ };
17
+ type ConstantPercentageConfig = {
18
+ format: 'Percentage';
19
+ props: OmitStrict<NumberInputProps, FormControlPropsToOmit | 'showGroupSeparators' | 'numberOfDecimals' | 'unit'>;
20
+ };
21
+ type ConstantTextAreaConfig = {
22
+ format: 'Text (paragraph)';
23
+ props: OmitStrict<TextAreaProps, FormControlPropsToOmit | 'onChange'> & {
24
+ onChange: (value: string | undefined) => void;
25
+ };
26
+ };
27
+ type ConstantDateConfig = {
28
+ format: 'Date';
29
+ props: OmitStrict<DateInputProps, FormControlPropsToOmit>;
30
+ };
31
+ type ConstantDateTimeConfig = {
32
+ format: 'DateTime';
33
+ props: OmitStrict<DateTimeInputProps, FormControlPropsToOmit>;
34
+ };
35
+ type ConstantTimeConfig = {
36
+ format: 'Time';
37
+ props: OmitStrict<TimeInputProps, FormControlPropsToOmit>;
38
+ };
39
+ export type BooleanLabels = 'true|false' | 'always|never';
40
+ export type ConstantBooleanConfig = {
41
+ format: 'Boolean';
42
+ props: OmitStrict<ComboBoxProps, FormControlPropsToOmit | 'value' | 'onChange'> & {
43
+ value?: boolean;
44
+ onChange: (value: boolean) => void;
45
+ booleanLabels?: BooleanLabels;
46
+ };
47
+ };
48
+ type ConstantCurrencyConfig = {
49
+ format: 'Currency';
50
+ props: OmitStrict<CurrencyInputProps, FormControlPropsToOmit>;
51
+ };
52
+ type ConstantPhoneConfig = {
53
+ format: 'Phone';
54
+ props: OmitStrict<PhoneInputProps, FormControlPropsToOmit | 'showCountryCode'>;
55
+ };
56
+ export type ConstantControlConfig = ConstantTextConfig | ConstantDecimalConfig | ConstantIntegerConfig | ConstantPercentageConfig | ConstantTextAreaConfig | ConstantDateConfig | ConstantDateTimeConfig | ConstantTimeConfig | ConstantBooleanConfig | ConstantCurrencyConfig | ConstantPhoneConfig;
57
+ declare const ConstantControl: ({ format, props, required, "data-testid": testId, id: inputUid }: Pick<FormControlProps, "id" | "required" | "disabled" | "status" | "readOnly"> & {
58
+ "data-testid"?: string;
59
+ } & ConstantControlConfig) => JSX.Element | null;
60
+ export default ConstantControl;
61
+ //# sourceMappingURL=ConstantControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConstantControl.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicInput/ConstantControl.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,aAAa,EACb,cAAc,EACf,MAAM,yBAAyB,CAAC;AAIjC,MAAM,MAAM,sBAAsB,GAAG,MAAM,IAAI,CAC7C,gBAAgB,EAChB,OAAO,GAAG,aAAa,GAAG,gBAAgB,GAAG,MAAM,GAAG,UAAU,CACjE,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,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