@pega/cosmos-react-build 2.1.4 → 3.0.0-dev.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 (234) hide show
  1. package/lib/components/AppHeader/AppHeader.d.ts +6 -4
  2. package/lib/components/AppHeader/AppHeader.d.ts.map +1 -1
  3. package/lib/components/AppHeader/AppHeader.js +10 -8
  4. package/lib/components/AppHeader/AppHeader.js.map +1 -1
  5. package/lib/components/AppHeader/AppHeader.styles.d.ts +1 -1
  6. package/lib/components/AppHeader/AppHeader.styles.d.ts.map +1 -1
  7. package/lib/components/AppHeader/AppHeader.styles.js +7 -18
  8. package/lib/components/AppHeader/AppHeader.styles.js.map +1 -1
  9. package/lib/components/AppHeader/BranchButton.d.ts +19 -0
  10. package/lib/components/AppHeader/BranchButton.d.ts.map +1 -0
  11. package/lib/components/AppHeader/BranchButton.js +87 -0
  12. package/lib/components/AppHeader/BranchButton.js.map +1 -0
  13. package/lib/components/AppHeader/index.d.ts +1 -0
  14. package/lib/components/AppHeader/index.d.ts.map +1 -1
  15. package/lib/components/AppHeader/index.js +1 -0
  16. package/lib/components/AppHeader/index.js.map +1 -1
  17. package/lib/components/AppShell/AppShell.d.ts +1 -0
  18. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  19. package/lib/components/AppShell/AppShell.js +15 -20
  20. package/lib/components/AppShell/AppShell.js.map +1 -1
  21. package/lib/components/AppShell/AppShell.styles.d.ts +1 -0
  22. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  23. package/lib/components/AppShell/AppShell.styles.js +17 -2
  24. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  25. package/lib/components/AppShell/AppShell.types.d.ts +6 -9
  26. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  27. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  28. package/lib/components/AppShell/AppShellContext.d.ts +1 -0
  29. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  30. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +9 -0
  31. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +1 -0
  32. package/lib/components/DynamicContentEditor/DynamicContentEditor.js +235 -0
  33. package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +1 -0
  34. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +23 -0
  35. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts.map +1 -0
  36. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js +2 -0
  37. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js.map +1 -0
  38. package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts +308 -0
  39. package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts.map +1 -0
  40. package/lib/components/DynamicContentEditor/PegaCustomElement.js +23 -0
  41. package/lib/components/DynamicContentEditor/PegaCustomElement.js.map +1 -0
  42. package/lib/components/DynamicContentEditor/index.d.ts +3 -0
  43. package/lib/components/DynamicContentEditor/index.d.ts.map +1 -0
  44. package/lib/components/DynamicContentEditor/index.js +2 -0
  45. package/lib/components/DynamicContentEditor/index.js.map +1 -0
  46. package/lib/components/FlowModeller/AddNode.d.ts +9 -7
  47. package/lib/components/FlowModeller/AddNode.d.ts.map +1 -1
  48. package/lib/components/FlowModeller/AddNode.js +9 -3
  49. package/lib/components/FlowModeller/AddNode.js.map +1 -1
  50. package/lib/components/FlowModeller/Connector.d.ts +7 -0
  51. package/lib/components/FlowModeller/Connector.d.ts.map +1 -0
  52. package/lib/components/FlowModeller/Connector.js +34 -0
  53. package/lib/components/FlowModeller/Connector.js.map +1 -0
  54. package/lib/components/FlowModeller/DeletePopover.d.ts +19 -0
  55. package/lib/components/FlowModeller/DeletePopover.d.ts.map +1 -0
  56. package/lib/components/FlowModeller/DeletePopover.js +105 -0
  57. package/lib/components/FlowModeller/DeletePopover.js.map +1 -0
  58. package/lib/components/FlowModeller/FlowModeller.d.ts +6 -2
  59. package/lib/components/FlowModeller/FlowModeller.d.ts.map +1 -1
  60. package/lib/components/FlowModeller/FlowModeller.js +110 -58
  61. package/lib/components/FlowModeller/FlowModeller.js.map +1 -1
  62. package/lib/components/FlowModeller/Node/Node.types.d.ts +18 -12
  63. package/lib/components/FlowModeller/Node/Node.types.d.ts.map +1 -1
  64. package/lib/components/FlowModeller/Node/Node.types.js +2 -3
  65. package/lib/components/FlowModeller/Node/Node.types.js.map +1 -1
  66. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +7 -4
  67. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +1 -1
  68. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +21 -11
  69. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +1 -1
  70. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +1 -1
  71. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +1 -1
  72. package/lib/components/FlowModeller/Node/NodeTemplates.js +37 -18
  73. package/lib/components/FlowModeller/Node/NodeTemplates.js.map +1 -1
  74. package/lib/components/FlowModeller/Node.d.ts +5 -0
  75. package/lib/components/FlowModeller/Node.d.ts.map +1 -0
  76. package/lib/components/FlowModeller/Node.js +22 -0
  77. package/lib/components/FlowModeller/Node.js.map +1 -0
  78. package/lib/components/FlowModeller/Renderer/Connectors.d.ts +2 -0
  79. package/lib/components/FlowModeller/Renderer/Connectors.d.ts.map +1 -1
  80. package/lib/components/FlowModeller/Renderer/Connectors.js +5 -3
  81. package/lib/components/FlowModeller/Renderer/Connectors.js.map +1 -1
  82. package/lib/components/FlowModeller/Renderer/Nodes.d.ts +2 -0
  83. package/lib/components/FlowModeller/Renderer/Nodes.d.ts.map +1 -1
  84. package/lib/components/FlowModeller/Renderer/Nodes.js +3 -3
  85. package/lib/components/FlowModeller/Renderer/Nodes.js.map +1 -1
  86. package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +1 -1
  87. package/lib/components/FlowModeller/Renderer/Renderer.js +2 -2
  88. package/lib/components/FlowModeller/Renderer/Renderer.js.map +1 -1
  89. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +10 -4
  90. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +1 -1
  91. package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +1 -1
  92. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +3 -3
  93. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +1 -1
  94. package/lib/components/FlowModeller/Renderer/Utils/Graph.js +7 -1
  95. package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +1 -1
  96. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +8 -4
  97. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +1 -1
  98. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js +23 -3
  99. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +1 -1
  100. package/lib/components/FlowModeller/Utils/{AddNodeUtils.d.ts → addNodeUtils.d.ts} +1 -1
  101. package/lib/components/FlowModeller/Utils/{AddNodeUtils.d.ts.map → addNodeUtils.d.ts.map} +1 -1
  102. package/lib/components/FlowModeller/Utils/{AddNodeUtils.js → addNodeUtils.js} +1 -1
  103. package/lib/components/FlowModeller/Utils/addNodeUtils.js.map +1 -0
  104. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts +29 -0
  105. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts.map +1 -0
  106. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js +71 -0
  107. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js.map +1 -0
  108. package/lib/components/FlowModeller/helper.d.ts +4 -7
  109. package/lib/components/FlowModeller/helper.d.ts.map +1 -1
  110. package/lib/components/FlowModeller/helper.js +67 -43
  111. package/lib/components/FlowModeller/helper.js.map +1 -1
  112. package/lib/components/FlowModeller/index.d.ts +5 -1
  113. package/lib/components/FlowModeller/index.d.ts.map +1 -1
  114. package/lib/components/FlowModeller/index.js +5 -1
  115. package/lib/components/FlowModeller/index.js.map +1 -1
  116. package/lib/components/ItemLibrary/ItemLibrary.d.ts +25 -0
  117. package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +1 -0
  118. package/lib/components/{FlowModeller/NodeLibrary.js → ItemLibrary/ItemLibrary.js} +26 -12
  119. package/lib/components/ItemLibrary/ItemLibrary.js.map +1 -0
  120. package/lib/components/ItemLibrary/index.d.ts +3 -0
  121. package/lib/components/ItemLibrary/index.d.ts.map +1 -0
  122. package/lib/components/ItemLibrary/index.js +3 -0
  123. package/lib/components/ItemLibrary/index.js.map +1 -0
  124. package/lib/components/LifeCycle/Category.d.ts.map +1 -1
  125. package/lib/components/LifeCycle/Category.js +11 -8
  126. package/lib/components/LifeCycle/Category.js.map +1 -1
  127. package/lib/components/LifeCycle/LifeCycle.d.ts.map +1 -1
  128. package/lib/components/LifeCycle/LifeCycle.js +5 -5
  129. package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
  130. package/lib/components/LifeCycle/LifeCycle.types.d.ts +14 -5
  131. package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
  132. package/lib/components/LifeCycle/LifeCycle.types.js +78 -1
  133. package/lib/components/LifeCycle/LifeCycle.types.js.map +1 -1
  134. package/lib/components/LifeCycle/LifeCycleList.d.ts +4 -3
  135. package/lib/components/LifeCycle/LifeCycleList.d.ts.map +1 -1
  136. package/lib/components/LifeCycle/LifeCycleList.js +6 -3
  137. package/lib/components/LifeCycle/LifeCycleList.js.map +1 -1
  138. package/lib/components/LifeCycle/Stage.d.ts +6 -10
  139. package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
  140. package/lib/components/LifeCycle/Stage.js +47 -55
  141. package/lib/components/LifeCycle/Stage.js.map +1 -1
  142. package/lib/components/LifeCycle/Step.d.ts +5 -6
  143. package/lib/components/LifeCycle/Step.d.ts.map +1 -1
  144. package/lib/components/LifeCycle/Step.js +31 -43
  145. package/lib/components/LifeCycle/Step.js.map +1 -1
  146. package/lib/components/LifeCycle/Task.d.ts +6 -1
  147. package/lib/components/LifeCycle/Task.d.ts.map +1 -1
  148. package/lib/components/LifeCycle/Task.js +26 -10
  149. package/lib/components/LifeCycle/Task.js.map +1 -1
  150. package/lib/components/LifeCycle/index.d.ts +1 -2
  151. package/lib/components/LifeCycle/index.d.ts.map +1 -1
  152. package/lib/components/LifeCycle/index.js.map +1 -1
  153. package/lib/components/ObjectPreview/ObjectPreview.d.ts +16 -0
  154. package/lib/components/ObjectPreview/ObjectPreview.d.ts.map +1 -0
  155. package/lib/components/ObjectPreview/ObjectPreview.js +25 -0
  156. package/lib/components/ObjectPreview/ObjectPreview.js.map +1 -0
  157. package/lib/components/ObjectPreview/index.d.ts +3 -0
  158. package/lib/components/ObjectPreview/index.d.ts.map +1 -0
  159. package/lib/components/ObjectPreview/index.js +3 -0
  160. package/lib/components/ObjectPreview/index.js.map +1 -0
  161. package/lib/components/ObjectSelect/ObjectConfig.d.ts +18 -0
  162. package/lib/components/ObjectSelect/ObjectConfig.d.ts.map +1 -0
  163. package/lib/components/ObjectSelect/ObjectConfig.js +14 -0
  164. package/lib/components/ObjectSelect/ObjectConfig.js.map +1 -0
  165. package/lib/components/ObjectSelect/ObjectPicker.d.ts +11 -0
  166. package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +1 -0
  167. package/lib/components/ObjectSelect/ObjectPicker.js +26 -0
  168. package/lib/components/ObjectSelect/ObjectPicker.js.map +1 -0
  169. package/lib/components/ObjectSelect/ObjectSelect.d.ts +27 -0
  170. package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +1 -0
  171. package/lib/components/ObjectSelect/ObjectSelect.js +25 -0
  172. package/lib/components/ObjectSelect/ObjectSelect.js.map +1 -0
  173. package/lib/components/ObjectSelect/ObjectSummary.d.ts +22 -0
  174. package/lib/components/ObjectSelect/ObjectSummary.d.ts.map +1 -0
  175. package/lib/components/ObjectSelect/ObjectSummary.js +50 -0
  176. package/lib/components/ObjectSelect/ObjectSummary.js.map +1 -0
  177. package/lib/components/ObjectSelect/index.d.ts +3 -0
  178. package/lib/components/ObjectSelect/index.d.ts.map +1 -0
  179. package/lib/components/ObjectSelect/index.js +2 -0
  180. package/lib/components/ObjectSelect/index.js.map +1 -0
  181. package/lib/components/PageTemplates/GalleryPage.js +4 -4
  182. package/lib/components/PageTemplates/GalleryPage.js.map +1 -1
  183. package/lib/components/PageTemplates/PageTemplates.d.ts +3 -3
  184. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  185. package/lib/components/PageTemplates/PageTemplates.js +29 -47
  186. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  187. package/lib/components/SummaryCard/SummaryCard.d.ts +2 -3
  188. package/lib/components/SummaryCard/SummaryCard.d.ts.map +1 -1
  189. package/lib/components/SummaryCard/SummaryCard.js +3 -4
  190. package/lib/components/SummaryCard/SummaryCard.js.map +1 -1
  191. package/lib/components/Workbench/ConfigurationPanel.d.ts.map +1 -1
  192. package/lib/components/Workbench/ConfigurationPanel.js +3 -4
  193. package/lib/components/Workbench/ConfigurationPanel.js.map +1 -1
  194. package/lib/components/Workbench/Toolbar.d.ts +1 -5
  195. package/lib/components/Workbench/Toolbar.d.ts.map +1 -1
  196. package/lib/components/Workbench/Toolbar.js +8 -8
  197. package/lib/components/Workbench/Toolbar.js.map +1 -1
  198. package/lib/components/Workbench/UtilityPanel.js +1 -1
  199. package/lib/components/Workbench/UtilityPanel.js.map +1 -1
  200. package/lib/components/Workbench/Workbench.d.ts.map +1 -1
  201. package/lib/components/Workbench/Workbench.js +2 -3
  202. package/lib/components/Workbench/Workbench.js.map +1 -1
  203. package/lib/components/Workbench/Workbench.styles.d.ts +2 -3
  204. package/lib/components/Workbench/Workbench.styles.d.ts.map +1 -1
  205. package/lib/components/Workbench/Workbench.styles.js +23 -23
  206. package/lib/components/Workbench/Workbench.styles.js.map +1 -1
  207. package/lib/components/Workbench/Workbench.types.d.ts +0 -2
  208. package/lib/components/Workbench/Workbench.types.d.ts.map +1 -1
  209. package/lib/components/Workbench/Workbench.types.js.map +1 -1
  210. package/lib/index.d.ts +7 -1
  211. package/lib/index.d.ts.map +1 -1
  212. package/lib/index.js +7 -1
  213. package/lib/index.js.map +1 -1
  214. package/lib/utils/index.d.ts +2 -0
  215. package/lib/utils/index.d.ts.map +1 -0
  216. package/lib/utils/index.js +2 -0
  217. package/lib/utils/index.js.map +1 -0
  218. package/lib/utils/utils.d.ts +14 -0
  219. package/lib/utils/utils.d.ts.map +1 -0
  220. package/lib/utils/utils.js +13 -0
  221. package/lib/utils/utils.js.map +1 -0
  222. package/package.json +19 -15
  223. package/lib/components/FlowModeller/NodeLibrary.d.ts +0 -13
  224. package/lib/components/FlowModeller/NodeLibrary.d.ts.map +0 -1
  225. package/lib/components/FlowModeller/NodeLibrary.js.map +0 -1
  226. package/lib/components/FlowModeller/Utils/AddNodeUtils.js.map +0 -1
  227. package/lib/components/Visual/Visual.d.ts +0 -17
  228. package/lib/components/Visual/Visual.d.ts.map +0 -1
  229. package/lib/components/Visual/Visual.js +0 -28
  230. package/lib/components/Visual/Visual.js.map +0 -1
  231. package/lib/components/Visual/index.d.ts +0 -3
  232. package/lib/components/Visual/index.d.ts.map +0 -1
  233. package/lib/components/Visual/index.js +0 -3
  234. package/lib/components/Visual/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"LifeCycle.types.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycle.types.ts"],"names":[],"mappings":"","sourcesContent":["import { MouseEvent } from 'react';\n\nimport { Action, StatusProps } from '@pega/cosmos-react-core';\n\nexport interface VisualColorProps {\n color:\n | 'magenta'\n | 'studio'\n | 'congressBlue'\n | 'Japaneselaurel'\n | 'violet'\n | 'yellow'\n | 'orange'\n | 'darkyellow';\n}\n\nexport interface StepItemProps {\n id: string;\n label: string;\n visual: {\n color: VisualColorProps['color'];\n icon: string;\n label: string;\n imgurl: string;\n };\n status: { type?: StatusProps['variant'] | ''; label: string };\n error: string;\n}\n\nexport interface TaskItemProps {\n id: string;\n label: string;\n visual: {\n imgurl: string;\n };\n error: string;\n steps: StepItemProps[];\n}\n\nexport interface StageItemProps {\n /* Data model should have id of the stage item */\n id: string;\n /* Data model should have the stage label */\n label: string;\n /* Data model should have the categoryData array */\n categories: CategoryItemProps[];\n /* Data model should have the stageType as below */\n type: 'start' | 'default' | 'resolution' | 'alternate';\n error: string;\n}\n\nexport interface CategoryItemProps {\n /* Data model should have id of the stage item */\n id: string;\n /* Data model should have id of the stage item */\n categoryId: string;\n /* Data model should have the categoryData array */\n tasks: TaskItemProps[] | TaskItemProps[][];\n}\n\nexport interface CategoriesItemProps {\n label: string;\n id: string;\n}\n\nexport interface LifeCycleActionParam {\n value?: string;\n stage?: StageItemProps;\n task?: TaskItemProps;\n category?: CategoryItemProps;\n step?: StepItemProps;\n}\n\nexport interface LifeCycleAction extends Omit<Action, 'onClick'> {\n onClick: (\n param: LifeCycleActionParam,\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n}\n"]}
1
+ {"version":3,"file":"LifeCycle.types.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycle.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,SAAS,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAsFlF,MAAM,iBAAiB,GAAiC;IACtD,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,MAAM,EAAE;YACN,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI;YACpC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM;YACtC,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,IAAI;SAClB;KACF;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,MAAM,EAAE;YACN,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CA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AoF;AACpF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,WAAsB,EACtB,QAA0B,EAC1B,UAA+B,EAC/B,EAAE;IACF,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,WAAW,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC;IACrF,qCAAqC;IACrC,MAAM,MAAM,GAAc;QACxB,GAAG,gBAAgB;QACnB,MAAM,EAAE;YACN,GAAG,gBAAgB,CAAC,MAAM;SAC3B;KACF,CAAC;IAEF,IAAI,QAAQ,EAAE;QACZ,MAAM,aAAa,GAAG,iBAAiB,CAAC,QAAQ,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC;QAC7E,MAAM,CAAC,MAAM,CAAC,WAAW;YACvB,gBAAgB,CAAC,MAAM,CAAC,WAAW,IAAI,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC;KAC3E;IACD,IAAI,UAAU,EAAE;QACd,MAAM,CAAC,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC;KACnC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import { MouseEvent } from 'react';\n\nimport { Action, StatusProps, WorkTheme as Theme } from '@pega/cosmos-react-core';\n\nimport { ColorName } from '../../utils';\n\nexport type StageType =\n | 'start'\n | 'default'\n | 'default-wait'\n | 'resolution'\n | 'alternate'\n | 'alternate-wait';\n\nexport interface StepItemProps {\n id: string;\n label: string;\n visual: {\n color: ColorName;\n icon: string;\n label: string;\n imgurl: string;\n };\n status: { type?: StatusProps['variant'] | ''; label: string };\n error: string;\n}\n\nexport interface TaskItemProps {\n id: string;\n label: string;\n visual: {\n imgurl: string;\n };\n error: string;\n steps: StepItemProps[];\n}\n\nexport interface StageItemProps {\n /* Data model should have id of the stage item */\n id: string;\n /* Data model should have the stage label */\n label: string;\n /* Data model should have the categoryData array */\n categories: CategoryItemProps[];\n /* Data model should have the stageType as below */\n type: StageType;\n error: string;\n}\n\nexport interface CategoryItemProps {\n /* Data model should have id of the stage item */\n id: string;\n /* id to map with category items */\n categoryId: string;\n /* Data model should have the categoryData array */\n tasks: TaskItemProps[] | TaskItemProps[][];\n}\n\nexport interface CategoriesItemProps {\n label: string;\n id: string;\n}\n\nexport interface LifeCycleActionParam {\n value?: string;\n stage?: StageItemProps;\n task?: TaskItemProps;\n category?: CategoryItemProps;\n step?: StepItemProps;\n}\n\nexport interface LifeCycleAction extends Omit<Action, 'onClick'> {\n onClick: (\n param: LifeCycleActionParam,\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n}\n\nexport interface StageInfo {\n id: StageType;\n visual: {\n bgColor: string;\n bgHover: string;\n tailPointed?: boolean;\n headPointed?: boolean;\n };\n}\n\nconst StageTypeDefaults: Record<StageType, StageInfo> = {\n start: {\n id: 'start',\n visual: {\n bgColor: Theme.base.colors.blue.dark,\n bgHover: Theme.base.colors.blue.medium,\n tailPointed: false,\n headPointed: true\n }\n },\n default: {\n id: 'default',\n visual: {\n bgColor: Theme.base.colors.blue.medium,\n bgHover: Theme.base.colors.blue.light,\n tailPointed: true,\n headPointed: true\n }\n },\n 'default-wait': {\n id: 'default-wait',\n visual: {\n bgColor: Theme.base.colors.blue.medium,\n bgHover: Theme.base.colors.blue.light,\n tailPointed: true,\n headPointed: false\n }\n },\n resolution: {\n id: 'resolution',\n visual: {\n bgColor: Theme.base.colors.green.medium,\n bgHover: Theme.base.colors.green.light,\n tailPointed: true,\n headPointed: false\n }\n },\n alternate: {\n id: 'alternate',\n visual: {\n bgColor: Theme.base.colors.red.dark,\n bgHover: Theme.base.colors.red.medium,\n tailPointed: false,\n headPointed: false\n }\n },\n 'alternate-wait': {\n id: 'alternate-wait',\n visual: {\n bgColor: Theme.base.colors.red.dark,\n bgHover: Theme.base.colors.red.medium,\n tailPointed: false,\n headPointed: false\n }\n }\n};\n\n// calculates the final stage info based on prev type and returns the final stage info\n// second param is mandatory for accurate results, optional only for the first stage\nexport const getStageInfo = (\n currentType: StageType,\n prevType: StageType | null,\n isLastItem: boolean | undefined\n) => {\n const currentStageInfo = StageTypeDefaults[currentType] || StageTypeDefaults.default;\n // cloning, to avoid getting modified\n const result: StageInfo = {\n ...currentStageInfo,\n visual: {\n ...currentStageInfo.visual\n }\n };\n\n if (prevType) {\n const prevStageInfo = StageTypeDefaults[prevType] || StageTypeDefaults.start;\n result.visual.tailPointed =\n currentStageInfo.visual.tailPointed && prevStageInfo.visual.headPointed;\n }\n if (isLastItem) {\n result.visual.headPointed = false;\n }\n return result;\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  import { FunctionComponent, Ref } from 'react';
2
- import type { NoChildrenProp } from '@pega/cosmos-react-core';
3
- import { StageItemProps } from './LifeCycle.types';
2
+ import { NoChildrenProp } from '@pega/cosmos-react-core';
3
+ import { StageItemProps, StageType } from './LifeCycle.types';
4
4
  import { StageProps } from './Stage';
5
5
  import { CategoriesProps } from './Category';
6
6
  import { TaskProps } from './Task';
@@ -14,7 +14,8 @@ export interface LifeCycleListProps extends NoChildrenProp {
14
14
  item: StageItemProps;
15
15
  isFirstItem?: boolean;
16
16
  isLastItem?: boolean;
17
- stageVariant?: 'start' | 'default' | 'resolution' | 'alternate';
17
+ stageVariant?: StageType;
18
+ prevStageVariant: StageType;
18
19
  id?: string;
19
20
  }
20
21
  declare const LifeCycleList: FunctionComponent<LifeCycleListProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"LifeCycleList.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,cAAc,EAAqB,MAAM,mBAAmB,CAAC;AACtE,OAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE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EAAE,eAAe,EAAE,CAAC;IAE9B,IAAI,EAAE,SAAS,EAAE,CAAC;IAElB,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC;IAEnB,IAAI,EAAE,cAAc,CAAC;IAErB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,gBAAgB,EAAE,SAAS,CAAC;IAE5B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAsBD,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,CAiGxD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -2,7 +2,8 @@ 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
4
  import styled, { css } from 'styled-components';
5
- import { createUID, useDirection } from '@pega/cosmos-react-core';
5
+ import { defaultThemeProp, createUID, useDirection } from '@pega/cosmos-react-core';
6
+ import { getStageInfo } from './LifeCycle.types';
6
7
  import Stage from './Stage';
7
8
  import Category from './Category';
8
9
  const StyledLifeCycleList = styled.li(({ theme, lastItem }) => {
@@ -22,7 +23,8 @@ const StyledLifeCycleList = styled.li(({ theme, lastItem }) => {
22
23
  `}
23
24
  `;
24
25
  });
25
- const LifeCycleList = forwardRef(({ item, isFirstItem, categories, isLastItem, stage: stageProps, task, step, stageVariant, id, ...restProps }, ref) => {
26
+ StyledLifeCycleList.defaultProps = defaultThemeProp;
27
+ const LifeCycleList = forwardRef(({ item, isFirstItem, isLastItem, categories, stage: stageProps, task, step, prevStageVariant, stageVariant, id, ...restProps }, ref) => {
26
28
  const showTitle = isFirstItem || false;
27
29
  let sortedCategory = [];
28
30
  const listId = id || createUID();
@@ -43,7 +45,8 @@ const LifeCycleList = forwardRef(({ item, isFirstItem, categories, isLastItem, s
43
45
  if (categories && categories.length !== 0) {
44
46
  sortedCategory = catgoryItem(item.categories);
45
47
  }
46
- return (_jsxs(StyledLifeCycleList, { role: 'row', lastItem: isLastItem, children: [_jsx(Stage, { value: item.label, variant: stageVariant || (item.type ? item.type : 'default'), item: item, tailPointed: isFirstItem, headPointed: isLastItem, error: item.error, id: item.id, ...stageProps }, void 0), sortedCategory.length !== 0 &&
48
+ const stageInfo = getStageInfo(item.type, prevStageVariant, isLastItem);
49
+ return (_jsxs(StyledLifeCycleList, { role: 'row', lastItem: isLastItem, children: [_jsx(Stage, { value: item.label, stageInfo: stageInfo, item: item, error: item.error, id: item.id, ...stageProps }), sortedCategory.length !== 0 &&
47
50
  sortedCategory.map((categoryItem, categoryindex) => {
48
51
  const taskProps = task[categoryindex];
49
52
  let stepProps;
@@ -1 +1 @@
1
- {"version":3,"file":"LifeCycleList.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,OAAO,CAAC;AAC3D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,KAAqB,MAAM,SAAS,CAAC;AAC5C,OAAO,QAA6B,MAAM,YAAY,CAAC;AA2BvD,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,I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AQ,IAEP,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,YAAY,CAAC,UAAU,EAC3B,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,IAAI,EACf,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,IARf,YAAY,CAAC,UAAU,CAS5B,CACH,CAAC;gBACJ,CAAC,CAAC,KArDoB,MAAM,CAsDV,CACvB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { NoChildrenProp } from '@pega/cosmos-react-core';\nimport { createUID, useDirection } from '@pega/cosmos-react-core';\n\nimport { StageItemProps, CategoryItemProps } from './LifeCycle.types';\nimport Stage, { StageProps } from './Stage';\nimport Category, { CategoriesProps } from './Category';\nimport { TaskProps } from './Task';\nimport { StepProps } from './Step';\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 stages */\n stageVariant?: 'start' | 'default' | 'resolution' | 'alternate';\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\nconst LifeCycleList: FunctionComponent<LifeCycleListProps> = forwardRef(\n (\n {\n item,\n isFirstItem,\n categories,\n isLastItem,\n stage: stageProps,\n task,\n step,\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 return (\n <StyledLifeCycleList key={listId} role='row' lastItem={isLastItem}>\n <Stage\n value={item.label}\n variant={stageVariant || (item.type ? item.type : 'default')}\n item={item}\n tailPointed={isFirstItem}\n headPointed={isLastItem}\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 role='gridcell'\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 role='gridcell'\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);\n\nexport default LifeCycleList;\n"]}
1
+ {"version":3,"file":"LifeCycleList.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/LifeCycleList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,OAAO,CAAC;AAC3D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAkB,SAAS,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEpG,OAAO,EAAqC,YAAY,EAAa,MAAM,mBAAmB,CAAC;AAC/F,OAAO,KAAqB,MAAM,SAAS,CAAC;AAC5C,OAAO,QAA6B,MAAM,YAAY,CAAC;AA4BvD,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,CACrE,CACE,EACE,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,KAAK,EAAE,UAAU,EACjB,IAAI,EACJ,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,EAAE,EACF,GAAG,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CAoDV,CACvB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, NoChildrenProp, createUID, useDirection } from '@pega/cosmos-react-core';\n\nimport { StageItemProps, CategoryItemProps, getStageInfo, StageType } from './LifeCycle.types';\nimport Stage, { StageProps } from './Stage';\nimport Category, { CategoriesProps } from './Category';\nimport { TaskProps } from './Task';\nimport { StepProps } from './Step';\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 stages */\n stageVariant?: StageType;\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(\n (\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} role='row' 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 role='gridcell'\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 role='gridcell'\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);\n\nexport default LifeCycleList;\n"]}
@@ -1,9 +1,9 @@
1
1
  import { FunctionComponent, Ref, ChangeEvent, FocusEvent } from 'react';
2
2
  import { BaseProps, ForwardProps, FormControlProps } from '@pega/cosmos-react-core';
3
- import { LifeCycleAction, LifeCycleActionParam, StageItemProps } from './LifeCycle.types';
3
+ import { LifeCycleAction, LifeCycleActionParam, StageInfo, StageItemProps, StageType } from './LifeCycle.types';
4
4
  export interface StageProps extends Omit<FormControlProps, 'status' | 'id'> {
5
5
  /** Pass an array of Action objects to append button(s) inline with the Input. */
6
- actions?: LifeCycleAction[];
6
+ actions?: Record<StageType, LifeCycleAction[]> | LifeCycleAction[];
7
7
  /** Callback for Add stage */
8
8
  onAddStage?: () => void;
9
9
  /** Callback for Adding alternate stage */
@@ -12,6 +12,8 @@ export interface StageProps extends Omit<FormControlProps, 'status' | 'id'> {
12
12
  onChange?: (param: LifeCycleActionParam, e: ChangeEvent<HTMLInputElement>) => void;
13
13
  /** onFocus of input */
14
14
  onFocus?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;
15
+ /** onBlur of input */
16
+ onBlur?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;
15
17
  }
16
18
  export interface StageComponentProps extends BaseProps, StageProps {
17
19
  ref?: Ref<HTMLDivElement>;
@@ -19,11 +21,7 @@ export interface StageComponentProps extends BaseProps, StageProps {
19
21
  value: string;
20
22
  id: string;
21
23
  /** Controls the styling of the stage. */
22
- variant?: StageItemProps['type'] | 'default';
23
- /** To make the stage with pointed tail */
24
- tailPointed?: boolean;
25
- /** To make the stage with pointed head */
26
- headPointed?: boolean;
24
+ stageInfo: StageInfo;
27
25
  /** Full data object which can be passed to the callback */
28
26
  item: StageItemProps;
29
27
  error?: string;
@@ -38,9 +36,7 @@ export declare const StyledInput: import("styled-components").StyledComponent<"i
38
36
  export declare const StyledStageActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
39
37
  error?: string | undefined;
40
38
  }, never>;
41
- export declare const StyledStage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<StageComponentProps, "variant"> & {
42
- tailPointed: boolean;
43
- headPointed: boolean;
39
+ export declare const StyledStage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<StageComponentProps, "stageInfo"> & {
44
40
  status: boolean;
45
41
  }, never>;
46
42
  export declare const StyledInputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"Stage.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/Stage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAEjB,GAAG,EACH,WAAW,EACX,UAAU,EAEX,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,SAAS,EACT,YAAY,EAKZ,gBAAgB,EAMjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE1F,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzE,iFAAiF;IACjF,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,0CAA0C;IAC1C,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,mBAAmB;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACnF,uBAAuB;IACvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAClF;AAED,MAAM,WAAW,mBAAoB,SAAQ,SAAS,EAAE,UAAU;IAChE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IAEd,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,OAAO,C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StyledDragIcon = styled.div(({ theme, error }) => {
9
9
  return css `
10
- width: 0%;
11
- transition: width ${theme.base.animation.speed};
10
+ width: 1.5rem;
11
+ visibility: hidden;
12
12
  ${error &&
13
13
  css `
14
14
  display: block;
@@ -19,6 +19,7 @@ export const StyledDragIcon = styled.div(({ theme, error }) => {
19
19
  text-align: center;
20
20
  `;
21
21
  });
22
+ StyledDragIcon.defaultProps = defaultThemeProp;
22
23
  export const StyledInput = styled.input(({ error, theme }) => {
23
24
  return css `
24
25
  height: ${theme.components.input.height};
@@ -51,6 +52,7 @@ export const StyledInput = styled.input(({ error, theme }) => {
51
52
  `}
52
53
  `;
53
54
  });
55
+ StyledInput.defaultProps = defaultThemeProp;
54
56
  export const StyledStageActions = styled.div(({ theme, error }) => {
55
57
  return css `
56
58
  z-index: 2;
@@ -67,31 +69,9 @@ export const StyledStageActions = styled.div(({ theme, error }) => {
67
69
  }
68
70
  `;
69
71
  });
70
- export const StyledStage = styled.div(({ variant, theme, tailPointed, headPointed, status }) => {
71
- let bgColor;
72
- let bgHover = '';
73
- switch (variant) {
74
- case 'start':
75
- bgColor = theme.base.colors.blue.dark;
76
- bgHover = theme.base.colors.blue.medium;
77
- break;
78
- case 'default':
79
- bgColor = theme.base.colors.blue.medium;
80
- bgHover = theme.base.colors.blue.light;
81
- break;
82
- case 'resolution':
83
- bgColor = theme.base.colors.green.medium;
84
- bgHover = theme.base.colors.green.light;
85
- break;
86
- case 'alternate':
87
- bgColor = theme.base.colors.red.light;
88
- bgHover = theme.base.colors.red['extra-light'];
89
- break;
90
- // eslint-disable-next-line sonarjs/no-duplicated-branches
91
- default:
92
- bgColor = theme.base.colors.blue.medium;
93
- bgHover = theme.base.colors.blue.light;
94
- }
72
+ StyledStageActions.defaultProps = defaultThemeProp;
73
+ export const StyledStage = styled.div(({ stageInfo, theme, status }) => {
74
+ const { visual: { bgColor, bgHover, tailPointed, headPointed } } = stageInfo;
95
75
  const { rtl } = useDirection();
96
76
  const roundedEndsStyles = css `
97
77
  content: '';
@@ -112,20 +92,8 @@ export const StyledStage = styled.div(({ variant, theme, tailPointed, headPointe
112
92
 
113
93
  &:hover {
114
94
  cursor: pointer;
115
- ${StyledDragIcon} {
116
- @keyframes anim {
117
- 0% {
118
- transform: scale(0);
119
- }
120
- 100% {
121
- transform: scale(1);
122
- }
123
- }
124
- animation: anim ${theme.base.animation.speed} ${theme.base.animation.timing.ease};
125
- width: 10%;
126
- transition: width ${theme.base.animation.speed};
127
- }
128
- ${StyledStageActions} {
95
+
96
+ ${StyledDragIcon},${StyledStageActions} {
129
97
  ${css `
130
98
  visibility: visible;
131
99
  `}
@@ -133,7 +101,7 @@ export const StyledStage = styled.div(({ variant, theme, tailPointed, headPointe
133
101
  }
134
102
  &:focus-within {
135
103
  border: 0.0625rem solid ${theme.base.colors.blue.medium};
136
- ${!headPointed &&
104
+ ${headPointed &&
137
105
  css `
138
106
  &::after {
139
107
  border-inline-end: 0.0625rem solid ${theme.base.colors.blue.medium};
@@ -146,7 +114,7 @@ export const StyledStage = styled.div(({ variant, theme, tailPointed, headPointe
146
114
  `}
147
115
  }
148
116
  `}
149
- ${!tailPointed &&
117
+ ${tailPointed &&
150
118
  css `
151
119
  &::before {
152
120
  border-inline-end: 0.0625rem solid ${theme.base.colors.blue.medium};
@@ -181,7 +149,7 @@ export const StyledStage = styled.div(({ variant, theme, tailPointed, headPointe
181
149
  }
182
150
  }
183
151
 
184
- ${!headPointed &&
152
+ ${headPointed &&
185
153
  css `
186
154
  &::after {
187
155
  ${roundedEndsStyles}
@@ -201,7 +169,7 @@ export const StyledStage = styled.div(({ variant, theme, tailPointed, headPointe
201
169
  }
202
170
  `}
203
171
 
204
- ${!tailPointed &&
172
+ ${tailPointed &&
205
173
  css `
206
174
  &::before {
207
175
  ${roundedEndsStyles}
@@ -211,11 +179,11 @@ export const StyledStage = styled.div(({ variant, theme, tailPointed, headPointe
211
179
  ${rtl
212
180
  ? css `
213
181
  border-block-end: 0.0625rem solid transparent;
214
- border-radius: 0.0625rem 0 0.0625rem calc(0.75 * ${theme.base['border-radius']});
182
+ border-radius: 0.0625rem 1rem 0.0625rem calc(0.75 * ${theme.base['border-radius']});
215
183
  `
216
184
  : css `
217
185
  border-block-start: 0.0625rem solid transparent;
218
- border-radius: 0.0625rem calc(0.75 * ${theme.base['border-radius']}) 0.0625rem 0;
186
+ border-radius: 0.0625rem calc(0.75 * ${theme.base['border-radius']}) 0.0625rem 1rem;
219
187
  `}
220
188
  }
221
189
  `}
@@ -246,13 +214,13 @@ export const StyledInputWrapper = styled.div `
246
214
  }
247
215
  }
248
216
  `;
249
- const Stage = forwardRef(({ value, actions, variant = 'default', headPointed = true, tailPointed = true, onChange, onFocus, id, item, error, ...restProps }, ref) => {
217
+ const Stage = forwardRef(({ value, actions, stageInfo, onChange, onFocus, onBlur, id, item, error, ...restProps }, ref) => {
250
218
  const [inputEl, setInputEl] = useElement();
251
219
  const [stageName, setStageName] = useState(value);
252
220
  const onInputChange = (e) => {
253
221
  setStageName(e.target.value);
254
222
  const param = {
255
- value: stageName,
223
+ value: e.target.value,
256
224
  stage: item
257
225
  };
258
226
  onChange?.(param, e);
@@ -264,20 +232,44 @@ const Stage = forwardRef(({ value, actions, variant = 'default', headPointed = t
264
232
  };
265
233
  onFocus?.(param, e);
266
234
  };
235
+ const onInputBlur = (e) => {
236
+ setStageName(e.target.value);
237
+ const param = {
238
+ value: e.target.value,
239
+ stage: item
240
+ };
241
+ onBlur?.(param, e);
242
+ };
267
243
  const onActionItemClick = (actionId, e) => {
268
244
  const param = {
269
245
  stage: item
270
246
  };
271
- actions?.forEach((actionItem) => {
272
- if (actionItem.id === actionId) {
273
- actionItem.onClick?.(param, e);
247
+ if (actions) {
248
+ let actionsList = [];
249
+ if (Array.isArray(actions)) {
250
+ actionsList = actions;
274
251
  }
275
- });
252
+ else {
253
+ actionsList = actions[item.type];
254
+ }
255
+ actionsList?.forEach((actionItem) => {
256
+ if (actionItem.id === actionId) {
257
+ actionItem.onClick?.(param, e);
258
+ }
259
+ });
260
+ }
276
261
  };
277
262
  /* Deep copy of actions object is required to provide consistent callback objects on actions */
278
263
  const actionsClone = [];
279
264
  if (actions) {
280
- actions.forEach(actionItem => {
265
+ let actionsList = [];
266
+ if (Array.isArray(actions)) {
267
+ actionsList = actions;
268
+ }
269
+ else {
270
+ actionsList = actions[item.type];
271
+ }
272
+ actionsList.forEach(actionItem => {
281
273
  const actionCloneItem = {};
282
274
  Object.keys(actionItem).forEach((key) => {
283
275
  actionCloneItem[key] = actionItem[key];
@@ -287,7 +279,7 @@ const Stage = forwardRef(({ value, actions, variant = 'default', headPointed = t
287
279
  return actionItem;
288
280
  });
289
281
  }
290
- return (_jsx(Flex, { container: { inline: true }, as: StyledStage, ...restProps, ref: ref, variant: variant || 'default', tailPointed: tailPointed, headPointed: headPointed, status: error, role: 'columnheader', children: _jsxs(Flex, { as: StyledWrapper, container: { inline: true }, children: [_jsx(Flex, { as: StyledDragIcon, error: error, children: _jsx(Icon, { name: 'drag' }, void 0) }, void 0), _jsxs(Flex, { container: true, children: [_jsxs(Flex, { as: StyledInputWrapper, item: { grow: 1 }, container: { inline: true, alignItems: 'center' }, children: [_jsx(StyledInput, { value: stageName, type: 'text', ref: setInputEl, error: error, id: item.id, onChange: onInputChange, "aria-label": stageName, onFocus: onInputFocus }, void 0), stageName && (_jsx(Tooltip, { target: inputEl, hideDelay: 'none', children: error || stageName }, void 0))] }, void 0), _jsx(StyledStageActions, { error: error, children: actionsClone && _jsx(Actions, { items: actionsClone, menuAt: 2, iconOnly: true }, void 0) }, void 0)] }, void 0)] }, void 0) }, void 0));
282
+ return (_jsx(Flex, { container: { inline: true }, as: StyledStage, ...restProps, ref: ref, stageInfo: stageInfo, status: error, role: 'columnheader', id: item.id, children: _jsxs(Flex, { as: StyledWrapper, container: { inline: true }, children: [item.type !== 'alternate' && item.type !== 'alternate-wait' && (_jsx(Flex, { as: StyledDragIcon, error: error, children: _jsx(Icon, { name: 'drag' }) })), _jsxs(Flex, { container: true, children: [_jsxs(Flex, { as: StyledInputWrapper, item: { grow: 1 }, container: { inline: true, alignItems: 'center' }, children: [_jsx(StyledInput, { value: stageName, type: 'text', ref: setInputEl, error: error, onChange: onInputChange, "aria-label": stageName, onFocus: onInputFocus, onBlur: onInputBlur }), stageName && (_jsx(Tooltip, { target: inputEl, hideDelay: 'none', children: error || stageName }))] }), _jsx(StyledStageActions, { error: error, children: actionsClone && _jsx(Actions, { items: actionsClone, menuAt: 2, iconOnly: true }) })] })] }) }));
291
283
  });
292
284
  export default Stage;
293
285
  //# sourceMappingURL=Stage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stage.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/Stage.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EACR,UAAU,EAOX,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,IAAI,EAGJ,OAAO,EACP,IAAI,EACJ,OAAO,EACP,UAAU,EAEV,gBAAgB,EAChB,YAAY,EACZ,aAAa,EAEb,YAAY,EACb,MAAM,yBAAyB,CAAC;AAmCjC,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEtC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAoB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC/E,OAAO,GAAG,CAAA;;wBAEY,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK;MAC5C,KAAK;QACP,GAAG,CAAA;;KAEF;4BACuB,KAAK,CAAC,IAAI,CAAC,OAAO;yBACrB,KAAK,CAAC,IAAI,CAAC,OAAO;aAC9B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;GAEjC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,C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,KAAK,EAAE,KAAK,YAC7B,YAAY,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,iBAAG,WAClD,YAChB,YACF,WACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["import {\n useState,\n forwardRef,\n FunctionComponent,\n PropsWithChildren,\n Ref,\n ChangeEvent,\n FocusEvent,\n MouseEvent\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Flex,\n BaseProps,\n ForwardProps,\n Actions,\n Icon,\n Tooltip,\n useElement,\n FormControlProps,\n defaultThemeProp,\n useDirection,\n StyledTooltip,\n Action,\n StyledButton\n} from '@pega/cosmos-react-core';\n\nimport { LifeCycleAction, LifeCycleActionParam, StageItemProps } from './LifeCycle.types';\n\nexport interface StageProps extends Omit<FormControlProps, 'status' | 'id'> {\n /** Pass an array of Action objects to append button(s) inline with the Input. */\n actions?: LifeCycleAction[];\n /** Callback for Add stage */\n onAddStage?: () => void;\n /** Callback for Adding alternate stage */\n onAddAlternateStage?: () => void;\n /** Input Change */\n onChange?: (param: LifeCycleActionParam, e: ChangeEvent<HTMLInputElement>) => void;\n /** onFocus of input */\n onFocus?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;\n}\n\nexport interface StageComponentProps extends BaseProps, StageProps {\n ref?: Ref<HTMLDivElement>;\n /** Pass text for the task. */\n value: string;\n /* unique id of the component */\n id: string;\n /** Controls the styling of the stage. */\n variant?: StageItemProps['type'] | 'default';\n /** To make the stage with pointed tail */\n tailPointed?: boolean;\n /** To make the stage with pointed head */\n headPointed?: boolean;\n /** Full data object which can be passed to the callback */\n item: StageItemProps;\n /* The status is used to show the input error status and the info on tooltip in case of error */\n error?: string;\n}\n\nexport const StyledWrapper = styled.div`\n overflow: hidden;\n`;\n\nexport const StyledDragIcon = styled.div<{ error: string }>(({ theme, error }) => {\n return css`\n width: 0%;\n transition: width ${theme.base.animation.speed};\n ${error &&\n css`\n display: block;\n `}\n padding: 0 calc(0.5 * ${theme.base.spacing});\n margin: calc(0.5 * ${theme.base.spacing}) 0;\n color: ${theme.base.colors.white};\n text-align: center;\n `;\n});\n\nexport const StyledInput = styled.input<{ error: string | undefined }>(({ error, theme }) => {\n return css`\n height: ${theme.components.input.height};\n padding: 0 calc(0.5 * ${theme.base.spacing});\n text-overflow: ellipsis;\n border: 0.0625rem solid transparent;\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n width: 100%;\n color: ${theme.base.colors.white};\n outline: none;\n &:hover {\n cursor: pointer;\n }\n &:disabled {\n cursor: not-allowed;\n }\n ${error\n ? css`\n background: ${theme.base.colors.red['extra-light']};\n border: 0.0625rem solid ${theme.base.colors.red.medium};\n color: ${theme.base.colors.black};\n `\n : css`\n background: ${theme.base.palette['primary-background']};\n &&:focus:enabled {\n color: ${theme.base.colors.black};\n background: ${theme.base.palette['primary-background']};\n border: 0.0625rem solid ${theme.base.colors.blue.medium};\n }\n `}\n `;\n});\n\nexport const StyledStageActions = styled.div<{\n error?: string;\n}>(({ theme, error }) => {\n return css`\n z-index: 2;\n visibility: hidden;\n margin-inline-start: calc(0.5 * ${theme.base.spacing});\n\n ${error &&\n css`\n visibility: visible;\n `}\n\n & > ${StyledButton} {\n color: ${theme.base.colors.white};\n }\n `;\n});\n\nexport const StyledStage = styled.div<\n Pick<StageComponentProps, 'variant'> & {\n tailPointed: boolean;\n headPointed: boolean;\n status: boolean;\n }\n>(({ variant, theme, tailPointed, headPointed, status }) => {\n let bgColor;\n let bgHover = '';\n switch (variant) {\n case 'start':\n bgColor = theme.base.colors.blue.dark;\n bgHover = theme.base.colors.blue.medium;\n break;\n case 'default':\n bgColor = theme.base.colors.blue.medium;\n bgHover = theme.base.colors.blue.light;\n break;\n case 'resolution':\n bgColor = theme.base.colors.green.medium;\n bgHover = theme.base.colors.green.light;\n break;\n case 'alternate':\n bgColor = theme.base.colors.red.light;\n bgHover = theme.base.colors.red['extra-light'];\n break;\n // eslint-disable-next-line sonarjs/no-duplicated-branches\n default:\n bgColor = theme.base.colors.blue.medium;\n bgHover = theme.base.colors.blue.light;\n }\n const { rtl } = useDirection();\n const roundedEndsStyles = css`\n content: '';\n position: absolute;\n display: block;\n width: calc(3 * ${theme.base.spacing});\n height: calc(3 * ${theme.base.spacing});\n top: calc(1 * ${theme.base.spacing});\n border: 0;\n border-inline-end: 0.0625rem solid transparent;\n `;\n\n return css`\n position: relative;\n padding: calc(0.5 * ${theme.base.spacing});\n background: ${bgColor};\n border: 0.0625rem solid transparent;\n width: 100%;\n\n &:hover {\n cursor: pointer;\n ${StyledDragIcon} {\n @keyframes anim {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n animation: anim ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n width: 10%;\n transition: width ${theme.base.animation.speed};\n }\n ${StyledStageActions} {\n ${css`\n visibility: visible;\n `}\n }\n }\n &:focus-within {\n border: 0.0625rem solid ${theme.base.colors.blue.medium};\n ${!headPointed &&\n css`\n &::after {\n border-inline-end: 0.0625rem solid ${theme.base.colors.blue.medium};\n ${rtl\n ? css`\n border-block-start: 0.0625rem solid ${theme.base.colors.blue.medium};\n `\n : css`\n border-block-end: 0.0625rem solid ${theme.base.colors.blue.medium};\n `}\n }\n `}\n ${!tailPointed &&\n css`\n &::before {\n border-inline-end: 0.0625rem solid ${theme.base.colors.blue.medium};\n ${rtl\n ? css`\n border-block-end: 0.0625rem solid ${theme.base.colors.blue.medium};\n `\n : css`\n border-block-start: 0.0625rem solid ${theme.base.colors.blue.medium};\n `}\n }\n `}\n ${StyledDragIcon} {\n ${css`\n @keyframes anim {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n animation: anim ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n width: 10%;\n transition: width ${theme.base.animation.speed};\n `}\n }\n ${StyledStageActions} {\n ${css`\n visibility: visible;\n `}\n }\n }\n\n ${!headPointed &&\n css`\n &::after {\n ${roundedEndsStyles}\n z-index: 1;\n background: inherit;\n transform: rotateZ(-45deg) skew(-15deg, -15deg);\n inset-inline-end: calc(1.6 * ${theme.base.spacing} * -1);\n border-block-end: 0.0625rem solid transparent;\n ${rtl\n ? css`\n border-radius: calc(0.75 * ${theme.base['border-radius']}) 0.1rem 0.1rem 0.1rem;\n `\n : css`\n border-radius: 0.0625rem 0.075rem calc(0.75 * ${theme.base['border-radius']})\n 0.0625rem;\n `}\n }\n `}\n\n ${!tailPointed &&\n css`\n &::before {\n ${roundedEndsStyles}\n background: ${theme.base.palette['app-background']};\n transform: rotateZ(45deg) skew(15deg, 15deg);\n inset-inline-start: calc(-1.6 * ${theme.base.spacing});\n ${rtl\n ? css`\n border-block-end: 0.0625rem solid transparent;\n border-radius: 0.0625rem 0 0.0625rem calc(0.75 * ${theme.base['border-radius']});\n `\n : css`\n border-block-start: 0.0625rem solid transparent;\n border-radius: 0.0625rem calc(0.75 * ${theme.base['border-radius']}) 0.0625rem 0;\n `}\n }\n `}\n\n ${StyledInput} {\n ${!status &&\n css`\n border: 0.0625rem solid transparent;\n background: ${bgColor};\n `}\n :hover:not([readonly]):not([disabled]):not(:focus) {\n ${!status &&\n css`\n border: 0.0625rem solid transparent;\n background: ${bgHover};\n `}\n }\n }\n `;\n});\n\nStyledStage.defaultProps = defaultThemeProp;\n\nexport const StyledInputWrapper = styled.div`\n &:focus-within {\n ${StyledTooltip} {\n ${css`\n display: none;\n `}\n }\n }\n`;\n\nconst Stage: FunctionComponent<StageComponentProps & ForwardProps> = forwardRef(\n (\n {\n value,\n actions,\n variant = 'default',\n headPointed = true,\n tailPointed = true,\n onChange,\n onFocus,\n id,\n item,\n error,\n ...restProps\n }: PropsWithChildren<StageComponentProps>,\n ref: StageComponentProps['ref']\n ) => {\n const [inputEl, setInputEl] = useElement();\n const [stageName, setStageName] = useState(value);\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n setStageName(e.target.value);\n const param: LifeCycleActionParam = {\n value: stageName,\n stage: item\n };\n onChange?.(param, e);\n };\n\n const onInputFocus = (e: FocusEvent<HTMLInputElement>) => {\n const param: LifeCycleActionParam = {\n value: stageName,\n stage: item\n };\n onFocus?.(param, e);\n };\n\n const onActionItemClick = (\n actionId: string,\n e: MouseEvent<HTMLInputElement | HTMLAnchorElement | HTMLButtonElement>\n ) => {\n const param: LifeCycleActionParam = {\n stage: item\n };\n actions?.forEach((actionItem: LifeCycleAction) => {\n if (actionItem.id === actionId) {\n actionItem.onClick?.(param, e);\n }\n });\n };\n\n /* Deep copy of actions object is required to provide consistent callback objects on actions */\n const actionsClone: Action[] = [];\n\n if (actions) {\n actions.forEach(actionItem => {\n const actionCloneItem = {} as Action;\n Object.keys(actionItem).forEach((key: string) => {\n actionCloneItem[key] = actionItem[key];\n });\n actionCloneItem.onClick = onActionItemClick;\n actionsClone.push(actionCloneItem);\n return actionItem;\n });\n }\n\n return (\n <Flex\n container={{ inline: true }}\n as={StyledStage}\n {...restProps}\n ref={ref}\n variant={variant || 'default'}\n tailPointed={tailPointed}\n headPointed={headPointed}\n status={error}\n role='columnheader'\n >\n <Flex as={StyledWrapper} container={{ inline: true }}>\n <Flex as={StyledDragIcon} error={error}>\n <Icon name='drag' />\n </Flex>\n <Flex container>\n <Flex\n as={StyledInputWrapper}\n item={{ grow: 1 }}\n container={{ inline: true, alignItems: 'center' }}\n >\n <StyledInput\n value={stageName}\n type='text'\n ref={setInputEl}\n error={error}\n id={item.id}\n onChange={onInputChange}\n aria-label={stageName}\n onFocus={onInputFocus}\n />\n {stageName && (\n <Tooltip target={inputEl} hideDelay='none'>\n {error || stageName}\n </Tooltip>\n )}\n </Flex>\n <StyledStageActions error={error}>\n {actionsClone && <Actions items={actionsClone} menuAt={2} iconOnly />}\n </StyledStageActions>\n </Flex>\n </Flex>\n </Flex>\n );\n }\n);\n\nexport default Stage;\n"]}
1
+ {"version":3,"file":"Stage.js","sourceRoot":"","sources":["../../../src/components/L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,mBACb,MAAC,IAAI,IACH,EAAE,EAAE,kBAAkB,EACtB,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EACjB,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,aAEjD,KAAC,WAAW,IACV,KAAK,EAAE,SAAS,EAChB,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,aAAa,gBACX,SAAS,EACrB,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,WAAW,GACnB,EACD,SAAS,IAAI,CACZ,KAAC,OAAO,IAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAC,MAAM,YACvC,KAAK,IAAI,SAAS,GACX,CACX,IACI,EACP,KAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,YAC7B,YAAY,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,SAAG,GAClD,IAChB,IACF,GACF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["import {\n useState,\n forwardRef,\n FunctionComponent,\n PropsWithChildren,\n Ref,\n ChangeEvent,\n FocusEvent,\n MouseEvent\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Flex,\n BaseProps,\n ForwardProps,\n Actions,\n Icon,\n Tooltip,\n useElement,\n FormControlProps,\n defaultThemeProp,\n useDirection,\n StyledTooltip,\n Action,\n StyledButton\n} from '@pega/cosmos-react-core';\n\nimport {\n LifeCycleAction,\n LifeCycleActionParam,\n StageInfo,\n StageItemProps,\n StageType\n} from './LifeCycle.types';\n\nexport interface StageProps extends Omit<FormControlProps, 'status' | 'id'> {\n /** Pass an array of Action objects to append button(s) inline with the Input. */\n actions?: Record<StageType, LifeCycleAction[]> | LifeCycleAction[];\n /** Callback for Add stage */\n onAddStage?: () => void;\n /** Callback for Adding alternate stage */\n onAddAlternateStage?: () => void;\n /** Input Change */\n onChange?: (param: LifeCycleActionParam, e: ChangeEvent<HTMLInputElement>) => void;\n /** onFocus of input */\n onFocus?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;\n /** onBlur of input */\n onBlur?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;\n}\n\nexport interface StageComponentProps extends BaseProps, StageProps {\n ref?: Ref<HTMLDivElement>;\n /** Pass text for the task. */\n value: string;\n /* unique id of the component */\n id: string;\n /** Controls the styling of the stage. */\n stageInfo: StageInfo;\n /** Full data object which can be passed to the callback */\n item: StageItemProps;\n /* The status is used to show the input error status and the info on tooltip in case of error */\n error?: string;\n}\n\nexport const StyledWrapper = styled.div`\n overflow: hidden;\n`;\n\nexport const StyledDragIcon = styled.div<{ error: string }>(({ theme, error }) => {\n return css`\n width: 1.5rem;\n visibility: hidden;\n ${error &&\n css`\n display: block;\n `}\n padding: 0 calc(0.5 * ${theme.base.spacing});\n margin: calc(0.5 * ${theme.base.spacing}) 0;\n color: ${theme.base.colors.white};\n text-align: center;\n `;\n});\n\nStyledDragIcon.defaultProps = defaultThemeProp;\n\nexport const StyledInput = styled.input<{ error: string | undefined }>(({ error, theme }) => {\n return css`\n height: ${theme.components.input.height};\n padding: 0 calc(0.5 * ${theme.base.spacing});\n text-overflow: ellipsis;\n border: 0.0625rem solid transparent;\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n width: 100%;\n color: ${theme.base.colors.white};\n outline: none;\n &:hover {\n cursor: pointer;\n }\n &:disabled {\n cursor: not-allowed;\n }\n ${error\n ? css`\n background: ${theme.base.colors.red['extra-light']};\n border: 0.0625rem solid ${theme.base.colors.red.medium};\n color: ${theme.base.colors.black};\n `\n : css`\n background: ${theme.base.palette['primary-background']};\n &&:focus:enabled {\n color: ${theme.base.colors.black};\n background: ${theme.base.palette['primary-background']};\n border: 0.0625rem solid ${theme.base.colors.blue.medium};\n }\n `}\n `;\n});\n\nStyledInput.defaultProps = defaultThemeProp;\n\nexport const StyledStageActions = styled.div<{\n error?: string;\n}>(({ theme, error }) => {\n return css`\n z-index: 2;\n visibility: hidden;\n margin-inline-start: calc(0.5 * ${theme.base.spacing});\n\n ${error &&\n css`\n visibility: visible;\n `}\n\n & > ${StyledButton} {\n color: ${theme.base.colors.white};\n }\n `;\n});\n\nStyledStageActions.defaultProps = defaultThemeProp;\n\nexport const StyledStage = styled.div<\n Pick<StageComponentProps, 'stageInfo'> & {\n status: boolean;\n }\n>(({ stageInfo, theme, status }) => {\n const {\n visual: { bgColor, bgHover, tailPointed, headPointed }\n } = stageInfo;\n\n const { rtl } = useDirection();\n const roundedEndsStyles = css`\n content: '';\n position: absolute;\n display: block;\n width: calc(3 * ${theme.base.spacing});\n height: calc(3 * ${theme.base.spacing});\n top: calc(1 * ${theme.base.spacing});\n border: 0;\n border-inline-end: 0.0625rem solid transparent;\n `;\n\n return css`\n position: relative;\n padding: calc(0.5 * ${theme.base.spacing});\n background: ${bgColor};\n border: 0.0625rem solid transparent;\n width: 100%;\n\n &:hover {\n cursor: pointer;\n\n ${StyledDragIcon},${StyledStageActions} {\n ${css`\n visibility: visible;\n `}\n }\n }\n &:focus-within {\n border: 0.0625rem solid ${theme.base.colors.blue.medium};\n ${headPointed &&\n css`\n &::after {\n border-inline-end: 0.0625rem solid ${theme.base.colors.blue.medium};\n ${rtl\n ? css`\n border-block-start: 0.0625rem solid ${theme.base.colors.blue.medium};\n `\n : css`\n border-block-end: 0.0625rem solid ${theme.base.colors.blue.medium};\n `}\n }\n `}\n ${tailPointed &&\n css`\n &::before {\n border-inline-end: 0.0625rem solid ${theme.base.colors.blue.medium};\n ${rtl\n ? css`\n border-block-end: 0.0625rem solid ${theme.base.colors.blue.medium};\n `\n : css`\n border-block-start: 0.0625rem solid ${theme.base.colors.blue.medium};\n `}\n }\n `}\n ${StyledDragIcon} {\n ${css`\n @keyframes anim {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n animation: anim ${theme.base.animation.speed} ${theme.base.animation.timing.ease};\n width: 10%;\n transition: width ${theme.base.animation.speed};\n `}\n }\n ${StyledStageActions} {\n ${css`\n visibility: visible;\n `}\n }\n }\n\n ${headPointed &&\n css`\n &::after {\n ${roundedEndsStyles}\n z-index: 1;\n background: inherit;\n transform: rotateZ(-45deg) skew(-15deg, -15deg);\n inset-inline-end: calc(1.6 * ${theme.base.spacing} * -1);\n border-block-end: 0.0625rem solid transparent;\n ${rtl\n ? css`\n border-radius: calc(0.75 * ${theme.base['border-radius']}) 0.1rem 0.1rem 0.1rem;\n `\n : css`\n border-radius: 0.0625rem 0.075rem calc(0.75 * ${theme.base['border-radius']})\n 0.0625rem;\n `}\n }\n `}\n\n ${tailPointed &&\n css`\n &::before {\n ${roundedEndsStyles}\n background: ${theme.base.palette['app-background']};\n transform: rotateZ(45deg) skew(15deg, 15deg);\n inset-inline-start: calc(-1.6 * ${theme.base.spacing});\n ${rtl\n ? css`\n border-block-end: 0.0625rem solid transparent;\n border-radius: 0.0625rem 1rem 0.0625rem calc(0.75 * ${theme.base['border-radius']});\n `\n : css`\n border-block-start: 0.0625rem solid transparent;\n border-radius: 0.0625rem calc(0.75 * ${theme.base['border-radius']}) 0.0625rem 1rem;\n `}\n }\n `}\n\n ${StyledInput} {\n ${!status &&\n css`\n border: 0.0625rem solid transparent;\n background: ${bgColor};\n `}\n :hover:not([readonly]):not([disabled]):not(:focus) {\n ${!status &&\n css`\n border: 0.0625rem solid transparent;\n background: ${bgHover};\n `}\n }\n }\n `;\n});\n\nStyledStage.defaultProps = defaultThemeProp;\n\nexport const StyledInputWrapper = styled.div`\n &:focus-within {\n ${StyledTooltip} {\n ${css`\n display: none;\n `}\n }\n }\n`;\n\nconst Stage: FunctionComponent<StageComponentProps & ForwardProps> = forwardRef(\n (\n {\n value,\n actions,\n stageInfo,\n onChange,\n onFocus,\n onBlur,\n id,\n item,\n error,\n ...restProps\n }: PropsWithChildren<StageComponentProps>,\n ref: StageComponentProps['ref']\n ) => {\n const [inputEl, setInputEl] = useElement();\n const [stageName, setStageName] = useState(value);\n\n const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n setStageName(e.target.value);\n const param: LifeCycleActionParam = {\n value: e.target.value,\n stage: item\n };\n onChange?.(param, e);\n };\n\n const onInputFocus = (e: FocusEvent<HTMLInputElement>) => {\n const param: LifeCycleActionParam = {\n value: stageName,\n stage: item\n };\n onFocus?.(param, e);\n };\n\n const onInputBlur = (e: FocusEvent<HTMLInputElement>) => {\n setStageName(e.target.value);\n const param: LifeCycleActionParam = {\n value: e.target.value,\n stage: item\n };\n onBlur?.(param, e);\n };\n\n const onActionItemClick = (\n actionId: string,\n e: MouseEvent<HTMLInputElement | HTMLAnchorElement | HTMLButtonElement>\n ) => {\n const param: LifeCycleActionParam = {\n stage: item\n };\n\n if (actions) {\n let actionsList: LifeCycleAction[] = [];\n\n if (Array.isArray(actions)) {\n actionsList = actions;\n } else {\n actionsList = actions[item.type];\n }\n\n actionsList?.forEach((actionItem: LifeCycleAction) => {\n if (actionItem.id === actionId) {\n actionItem.onClick?.(param, e);\n }\n });\n }\n };\n\n /* Deep copy of actions object is required to provide consistent callback objects on actions */\n const actionsClone: Action[] = [];\n\n if (actions) {\n let actionsList: LifeCycleAction[] = [];\n if (Array.isArray(actions)) {\n actionsList = actions;\n } else {\n actionsList = actions[item.type];\n }\n\n actionsList.forEach(actionItem => {\n const actionCloneItem = {} as Action;\n Object.keys(actionItem).forEach((key: string) => {\n actionCloneItem[key] = actionItem[key];\n });\n actionCloneItem.onClick = onActionItemClick;\n actionsClone.push(actionCloneItem);\n return actionItem;\n });\n }\n\n return (\n <Flex\n container={{ inline: true }}\n as={StyledStage}\n {...restProps}\n ref={ref}\n stageInfo={stageInfo}\n status={error}\n role='columnheader'\n id={item.id}\n >\n <Flex as={StyledWrapper} container={{ inline: true }}>\n {item.type !== 'alternate' && item.type !== 'alternate-wait' && (\n <Flex as={StyledDragIcon} error={error}>\n <Icon name='drag' />\n </Flex>\n )}\n <Flex container>\n <Flex\n as={StyledInputWrapper}\n item={{ grow: 1 }}\n container={{ inline: true, alignItems: 'center' }}\n >\n <StyledInput\n value={stageName}\n type='text'\n ref={setInputEl}\n error={error}\n onChange={onInputChange}\n aria-label={stageName}\n onFocus={onInputFocus}\n onBlur={onInputBlur}\n />\n {stageName && (\n <Tooltip target={inputEl} hideDelay='none'>\n {error || stageName}\n </Tooltip>\n )}\n </Flex>\n <StyledStageActions error={error}>\n {actionsClone && <Actions items={actionsClone} menuAt={2} iconOnly />}\n </StyledStageActions>\n </Flex>\n </Flex>\n </Flex>\n );\n }\n);\n\nexport default Stage;\n"]}
@@ -1,5 +1,6 @@
1
1
  import { FunctionComponent, ChangeEvent, FocusEvent } from 'react';
2
2
  import { BaseProps, ForwardProps, FormControlProps } from '@pega/cosmos-react-core';
3
+ import { ColorName } from '../../utils';
3
4
  import { TaskItemProps, StepItemProps, StageItemProps, CategoryItemProps, LifeCycleAction, LifeCycleActionParam } from './LifeCycle.types';
4
5
  export interface StepProps extends Omit<FormControlProps, 'status' | 'id'> {
5
6
  /** Pass an array of Action objects to append button(s) inline with the Input. */
@@ -8,6 +9,8 @@ export interface StepProps extends Omit<FormControlProps, 'status' | 'id'> {
8
9
  onChange?: (param: LifeCycleActionParam, e: ChangeEvent<HTMLInputElement>) => void;
9
10
  /** callback for Focus of input */
10
11
  onFocus?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;
12
+ /** callback for Blur of input */
13
+ onBlur?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;
11
14
  }
12
15
  interface StepComponentProps extends BaseProps, StepProps {
13
16
  /** Pass text for the step. */
@@ -19,7 +22,7 @@ interface StepComponentProps extends BaseProps, StepProps {
19
22
  * Icon and label are passed as normal string */
20
23
  visual: {
21
24
  imgurl: string;
22
- color: 'magenta' | 'studio' | 'congressBlue' | 'Japaneselaurel' | 'violet' | 'yellow' | 'orange' | 'darkyellow';
25
+ color: ColorName;
23
26
  icon: string;
24
27
  title: string;
25
28
  };
@@ -30,11 +33,7 @@ interface StepComponentProps extends BaseProps, StepProps {
30
33
  taskItem: TaskItemProps;
31
34
  categoryItem: CategoryItemProps;
32
35
  }
33
- export declare const StyledStepType: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
34
- color: string;
35
- ref: HTMLDivElement;
36
- img: string;
37
- }, never>;
36
+ export declare const StyledStepType: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StepComponentProps, never>;
38
37
  export declare const StyledStepBadge: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
39
38
  export declare const StyledStepValueInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
40
39
  error: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/Step.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,WAAW,EACX,UAAU,EAEX,MAAM,OAAO,CAAC;AAIf,OAAO,EAGL,SAAS,EACT,YAAY,EAKZ,gBAAgB,EAMjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,IAAI,CAAC;IACxE,iFAAiF;IACjF,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,mBAAmB;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACnF,kCAAkC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,C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