@pega/cosmos-react-build 3.0.0-dev.9.1 → 3.0.0-rc.10

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 (240) hide show
  1. package/lib/components/AppHeader/AppHeader.d.ts +1 -1
  2. package/lib/components/AppHeader/AppHeader.d.ts.map +1 -1
  3. package/lib/components/AppHeader/AppHeader.js +7 -6
  4. package/lib/components/AppHeader/AppHeader.js.map +1 -1
  5. package/lib/components/AppHeader/AppHeader.styles.d.ts +1 -2
  6. package/lib/components/AppHeader/AppHeader.styles.d.ts.map +1 -1
  7. package/lib/components/AppHeader/AppHeader.styles.js +10 -12
  8. package/lib/components/AppHeader/AppHeader.styles.js.map +1 -1
  9. package/lib/components/AppHeader/BranchButton.d.ts.map +1 -1
  10. package/lib/components/AppHeader/BranchButton.js +22 -18
  11. package/lib/components/AppHeader/BranchButton.js.map +1 -1
  12. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppShell.js +19 -2
  14. package/lib/components/AppShell/AppShell.js.map +1 -1
  15. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  16. package/lib/components/AppShell/AppShell.styles.js +1 -3
  17. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  18. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +1 -1
  19. package/lib/components/DynamicContentEditor/DynamicContentEditor.js +50 -38
  20. package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +1 -1
  21. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +2 -2
  22. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts.map +1 -1
  23. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js.map +1 -1
  24. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts +8 -0
  25. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +1 -0
  26. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +192 -0
  27. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +1 -0
  28. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts +10 -0
  29. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +1 -0
  30. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +530 -0
  31. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +1 -0
  32. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts +35 -0
  33. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts.map +1 -0
  34. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js +2 -0
  35. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js.map +1 -0
  36. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts +13 -0
  37. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts.map +1 -0
  38. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js +51 -0
  39. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js.map +1 -0
  40. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +6 -0
  41. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +1 -0
  42. package/lib/components/ExpressionBuilder/ExpressionBuilder.js +51 -0
  43. package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +1 -0
  44. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +14 -0
  45. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +1 -0
  46. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +81 -0
  47. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +1 -0
  48. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +74 -0
  49. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +1 -0
  50. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js +2 -0
  51. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +1 -0
  52. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts +7 -0
  53. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts.map +1 -0
  54. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js +6 -0
  55. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js.map +1 -0
  56. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +6 -0
  57. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +1 -0
  58. package/lib/components/ExpressionBuilder/ExpressionDetails.js +12 -0
  59. package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +1 -0
  60. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts +6 -0
  61. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts.map +1 -0
  62. package/lib/components/ExpressionBuilder/ExpressionItem.js +39 -0
  63. package/lib/components/ExpressionBuilder/ExpressionItem.js.map +1 -0
  64. package/lib/components/ExpressionBuilder/ExpressionList.d.ts +6 -0
  65. package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +1 -0
  66. package/lib/components/ExpressionBuilder/ExpressionList.js +32 -0
  67. package/lib/components/ExpressionBuilder/ExpressionList.js.map +1 -0
  68. package/lib/components/ExpressionBuilder/index.d.ts +8 -0
  69. package/lib/components/ExpressionBuilder/index.d.ts.map +1 -0
  70. package/lib/components/ExpressionBuilder/index.js +6 -0
  71. package/lib/components/ExpressionBuilder/index.js.map +1 -0
  72. package/lib/components/FlowModeller/AddNode.d.ts +2 -2
  73. package/lib/components/FlowModeller/AddNode.d.ts.map +1 -1
  74. package/lib/components/FlowModeller/AddNode.js +26 -7
  75. package/lib/components/FlowModeller/AddNode.js.map +1 -1
  76. package/lib/components/FlowModeller/Connector.d.ts +3 -3
  77. package/lib/components/FlowModeller/Connector.d.ts.map +1 -1
  78. package/lib/components/FlowModeller/Connector.js +41 -4
  79. package/lib/components/FlowModeller/Connector.js.map +1 -1
  80. package/lib/components/FlowModeller/DeletePopover.d.ts.map +1 -1
  81. package/lib/components/FlowModeller/DeletePopover.js +56 -25
  82. package/lib/components/FlowModeller/DeletePopover.js.map +1 -1
  83. package/lib/components/FlowModeller/FlowModeller.d.ts +3 -23
  84. package/lib/components/FlowModeller/FlowModeller.d.ts.map +1 -1
  85. package/lib/components/FlowModeller/FlowModeller.js +94 -17
  86. package/lib/components/FlowModeller/FlowModeller.js.map +1 -1
  87. package/lib/components/FlowModeller/FlowModeller.types.d.ts +27 -0
  88. package/lib/components/FlowModeller/FlowModeller.types.d.ts.map +1 -0
  89. package/lib/components/FlowModeller/FlowModeller.types.js +2 -0
  90. package/lib/components/FlowModeller/FlowModeller.types.js.map +1 -0
  91. package/lib/components/FlowModeller/FlowModellerContext.d.ts +11 -0
  92. package/lib/components/FlowModeller/FlowModellerContext.d.ts.map +1 -0
  93. package/lib/components/FlowModeller/FlowModellerContext.js +8 -0
  94. package/lib/components/FlowModeller/FlowModellerContext.js.map +1 -0
  95. package/lib/components/FlowModeller/Node/Node.types.d.ts +13 -4
  96. package/lib/components/FlowModeller/Node/Node.types.d.ts.map +1 -1
  97. package/lib/components/FlowModeller/Node/Node.types.js.map +1 -1
  98. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +1 -1
  99. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +17 -8
  100. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +1 -1
  101. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +1 -1
  102. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +1 -1
  103. package/lib/components/FlowModeller/Node/NodeTemplates.js +25 -12
  104. package/lib/components/FlowModeller/Node/NodeTemplates.js.map +1 -1
  105. package/lib/components/FlowModeller/Node.d.ts.map +1 -1
  106. package/lib/components/FlowModeller/Node.js +3 -4
  107. package/lib/components/FlowModeller/Node.js.map +1 -1
  108. package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +1 -1
  109. package/lib/components/FlowModeller/Renderer/Renderer.js +37 -6
  110. package/lib/components/FlowModeller/Renderer/Renderer.js.map +1 -1
  111. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +3 -9
  112. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +1 -1
  113. package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +1 -1
  114. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +5 -0
  115. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +1 -1
  116. package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +1 -1
  117. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +2 -1
  118. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +1 -1
  119. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +19 -6
  120. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +1 -1
  121. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +1 -2
  122. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +1 -1
  123. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +1 -1
  124. package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts +6 -5
  125. package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts.map +1 -1
  126. package/lib/components/FlowModeller/Utils/addNodeUtils.js +57 -34
  127. package/lib/components/FlowModeller/Utils/addNodeUtils.js.map +1 -1
  128. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts +3 -2
  129. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts.map +1 -1
  130. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js +11 -1
  131. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js.map +1 -1
  132. package/lib/components/FlowModeller/helper.d.ts +21 -2
  133. package/lib/components/FlowModeller/helper.d.ts.map +1 -1
  134. package/lib/components/FlowModeller/helper.js +91 -45
  135. package/lib/components/FlowModeller/helper.js.map +1 -1
  136. package/lib/components/FlowModeller/index.d.ts +4 -3
  137. package/lib/components/FlowModeller/index.d.ts.map +1 -1
  138. package/lib/components/FlowModeller/index.js.map +1 -1
  139. package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +1 -1
  140. package/lib/components/ItemLibrary/ItemLibrary.js +1 -4
  141. package/lib/components/ItemLibrary/ItemLibrary.js.map +1 -1
  142. package/lib/components/LifeCycle/Category.d.ts +3 -20
  143. package/lib/components/LifeCycle/Category.d.ts.map +1 -1
  144. package/lib/components/LifeCycle/Category.js +15 -12
  145. package/lib/components/LifeCycle/Category.js.map +1 -1
  146. package/lib/components/LifeCycle/LifeCycle.d.ts +3 -19
  147. package/lib/components/LifeCycle/LifeCycle.d.ts.map +1 -1
  148. package/lib/components/LifeCycle/LifeCycle.js +14 -10
  149. package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
  150. package/lib/components/LifeCycle/LifeCycle.types.d.ts +70 -2
  151. package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
  152. package/lib/components/LifeCycle/LifeCycle.types.js.map +1 -1
  153. package/lib/components/LifeCycle/LifeCycleContext.d.ts +9 -0
  154. package/lib/components/LifeCycle/LifeCycleContext.d.ts.map +1 -0
  155. package/lib/components/LifeCycle/LifeCycleContext.js +7 -0
  156. package/lib/components/LifeCycle/LifeCycleContext.js.map +1 -0
  157. package/lib/components/LifeCycle/LifeCycleList.d.ts +1 -5
  158. package/lib/components/LifeCycle/LifeCycleList.d.ts.map +1 -1
  159. package/lib/components/LifeCycle/LifeCycleList.js +3 -3
  160. package/lib/components/LifeCycle/LifeCycleList.js.map +1 -1
  161. package/lib/components/LifeCycle/Stage.d.ts +7 -25
  162. package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
  163. package/lib/components/LifeCycle/Stage.js +81 -128
  164. package/lib/components/LifeCycle/Stage.js.map +1 -1
  165. package/lib/components/LifeCycle/Step.d.ts +11 -29
  166. package/lib/components/LifeCycle/Step.d.ts.map +1 -1
  167. package/lib/components/LifeCycle/Step.js +71 -136
  168. package/lib/components/LifeCycle/Step.js.map +1 -1
  169. package/lib/components/LifeCycle/Task.d.ts +9 -34
  170. package/lib/components/LifeCycle/Task.d.ts.map +1 -1
  171. package/lib/components/LifeCycle/Task.js +58 -98
  172. package/lib/components/LifeCycle/Task.js.map +1 -1
  173. package/lib/components/LifeCycle/index.d.ts +2 -2
  174. package/lib/components/LifeCycle/index.d.ts.map +1 -1
  175. package/lib/components/LifeCycle/index.js.map +1 -1
  176. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts +9 -0
  177. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts.map +1 -0
  178. package/lib/components/MobileBuildSummary/MobileBuildSummary.js +44 -0
  179. package/lib/components/MobileBuildSummary/MobileBuildSummary.js.map +1 -0
  180. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts +29 -0
  181. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts.map +1 -0
  182. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js +2 -0
  183. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js.map +1 -0
  184. package/lib/components/MobileBuildSummary/index.d.ts +3 -0
  185. package/lib/components/MobileBuildSummary/index.d.ts.map +1 -0
  186. package/lib/components/MobileBuildSummary/index.js +2 -0
  187. package/lib/components/MobileBuildSummary/index.js.map +1 -0
  188. package/lib/components/ObjectPreview/ObjectPreview.d.ts +1 -1
  189. package/lib/components/ObjectPreview/ObjectPreview.d.ts.map +1 -1
  190. package/lib/components/ObjectPreview/ObjectPreview.js +1 -1
  191. package/lib/components/ObjectPreview/ObjectPreview.js.map +1 -1
  192. package/lib/components/ObjectSelect/ObjectPicker.d.ts +9 -5
  193. package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +1 -1
  194. package/lib/components/ObjectSelect/ObjectPicker.js +19 -5
  195. package/lib/components/ObjectSelect/ObjectPicker.js.map +1 -1
  196. package/lib/components/ObjectSelect/ObjectSelect.d.ts +10 -5
  197. package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +1 -1
  198. package/lib/components/ObjectSelect/ObjectSelect.js +24 -8
  199. package/lib/components/ObjectSelect/ObjectSelect.js.map +1 -1
  200. package/lib/components/ObjectSelect/ObjectSummary.d.ts +6 -4
  201. package/lib/components/ObjectSelect/ObjectSummary.d.ts.map +1 -1
  202. package/lib/components/ObjectSelect/ObjectSummary.js +28 -33
  203. package/lib/components/ObjectSelect/ObjectSummary.js.map +1 -1
  204. package/lib/components/ObjectSelect/useCreateModal.d.ts +34 -0
  205. package/lib/components/ObjectSelect/useCreateModal.d.ts.map +1 -0
  206. package/lib/components/ObjectSelect/useCreateModal.js +61 -0
  207. package/lib/components/ObjectSelect/useCreateModal.js.map +1 -0
  208. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  209. package/lib/components/PageTemplates/PageTemplates.js +26 -8
  210. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  211. package/lib/components/Workbench/ConfigurationPanel.d.ts.map +1 -1
  212. package/lib/components/Workbench/ConfigurationPanel.js +4 -14
  213. package/lib/components/Workbench/ConfigurationPanel.js.map +1 -1
  214. package/lib/components/Workbench/Workbench.d.ts.map +1 -1
  215. package/lib/components/Workbench/Workbench.js +2 -2
  216. package/lib/components/Workbench/Workbench.js.map +1 -1
  217. package/lib/components/Workbench/Workbench.styles.d.ts +1 -0
  218. package/lib/components/Workbench/Workbench.styles.d.ts.map +1 -1
  219. package/lib/components/Workbench/Workbench.styles.js +4 -0
  220. package/lib/components/Workbench/Workbench.styles.js.map +1 -1
  221. package/lib/components/Workbench/Workbench.types.d.ts +2 -2
  222. package/lib/components/Workbench/Workbench.types.d.ts.map +1 -1
  223. package/lib/components/Workbench/Workbench.types.js.map +1 -1
  224. package/lib/index.d.ts +3 -0
  225. package/lib/index.d.ts.map +1 -1
  226. package/lib/index.js +3 -0
  227. package/lib/index.js.map +1 -1
  228. package/package.json +11 -8
  229. package/lib/components/FlowModeller/Renderer/Connectors.d.ts +0 -15
  230. package/lib/components/FlowModeller/Renderer/Connectors.d.ts.map +0 -1
  231. package/lib/components/FlowModeller/Renderer/Connectors.js +0 -49
  232. package/lib/components/FlowModeller/Renderer/Connectors.js.map +0 -1
  233. package/lib/components/FlowModeller/Renderer/Nodes.d.ts +0 -11
  234. package/lib/components/FlowModeller/Renderer/Nodes.d.ts.map +0 -1
  235. package/lib/components/FlowModeller/Renderer/Nodes.js +0 -31
  236. package/lib/components/FlowModeller/Renderer/Nodes.js.map +0 -1
  237. package/lib/components/ObjectSelect/ObjectConfig.d.ts +0 -18
  238. package/lib/components/ObjectSelect/ObjectConfig.d.ts.map +0 -1
  239. package/lib/components/ObjectSelect/ObjectConfig.js +0 -14
  240. package/lib/components/ObjectSelect/ObjectConfig.js.map +0 -1
@@ -1,22 +1,12 @@
1
- import { FunctionComponent, ChangeEvent, FocusEvent } from 'react';
2
- import { BaseProps, ForwardProps, FormControlProps } from '@pega/cosmos-react-core';
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseProps, ForwardProps, Icon } from '@pega/cosmos-react-core';
3
3
  import { ColorName } from '../../utils';
4
- import { TaskItemProps, StepItemProps, StageItemProps, CategoryItemProps, LifeCycleAction, LifeCycleActionParam } from './LifeCycle.types';
5
- export interface StepProps extends Omit<FormControlProps, 'status' | 'id'> {
6
- /** Pass an array of Action objects to append button(s) inline with the Input. */
7
- actions?: LifeCycleAction[];
8
- /** Input Change */
9
- onChange?: (param: LifeCycleActionParam, e: ChangeEvent<HTMLInputElement>) => void;
10
- /** callback for Focus of input */
11
- onFocus?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;
12
- /** callback for Blur of input */
13
- onBlur?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;
14
- }
4
+ import { TaskItemProps, StepItemProps, StageItemProps, CategoryItemProps, StepProps } from './LifeCycle.types';
15
5
  interface StepComponentProps extends BaseProps, StepProps {
16
6
  /** Pass text for the step. */
17
- value?: string;
18
- /** step data id */
19
- id?: string;
7
+ value: string;
8
+ /** unique id of step */
9
+ id: string;
20
10
  /** Determines the visual for icon, color and label to render.
21
11
  * This color is passed as a variant and accessible colors are used to display.
22
12
  * Icon and label are passed as normal string */
@@ -33,22 +23,14 @@ interface StepComponentProps extends BaseProps, StepProps {
33
23
  taskItem: TaskItemProps;
34
24
  categoryItem: CategoryItemProps;
35
25
  }
36
- export declare const StyledStepType: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
37
- color: ColorName;
38
- ref: HTMLDivElement;
39
- img: string;
40
- }, never>;
26
+ export declare const StyledStepType: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Pick<StepComponentProps, "visual">, never>;
41
27
  export declare const StyledStepBadge: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
42
- export declare const StyledStepValueInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
43
- error: string | undefined;
44
- }, never>;
45
- export declare const StyledStepStatus: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
46
- badge: string;
47
- error: string;
48
- }, never>;
28
+ export declare const StyledStepWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
49
29
  export declare const StyledStep: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
50
- error: string;
30
+ hasFocus: boolean;
51
31
  }, never>;
32
+ export declare const StyledStepButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
33
+ export declare const StyledWarnIcon: typeof Icon;
52
34
  declare const Step: FunctionComponent<StepComponentProps & ForwardProps>;
53
35
  export default Step;
54
36
  //# sourceMappingURL=Step.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/Step.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL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AEhC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,cAAc,CAAC;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,YAAY,EAAE,iBAAiB,CAAC;CACjC;AAED,eAAO,MAAM,cAAc,yIAkB1B,CAAC;AAIF,eAAO,MAAM,eAAe,yGAa1B,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGAK5B,CAAC;AAIH,eAAO,MAAM,UAAU;cAA0B,OAAO;SAmBtD,CAAC;AAYH,eAAO,MAAM,gBAAgB,4GAkB3B,CAAC;AAIH,eAAO,MAAM,cAAc,EAAE,OAAO,IAclC,CAAC;AAIH,QAAA,MAAM,IAAI,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,CAiI9D,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,13 +1,14 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useContext } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
4
  import { readableColor } from 'polished';
5
- import { Flex, defaultThemeProp, Icon, Tooltip, useElement, Status, Actions, useI18n, Avatar, StyledTooltip } from '@pega/cosmos-react-core';
5
+ import { Flex, defaultThemeProp, Icon, Tooltip, useElement, Status, Actions, useI18n, Avatar } from '@pega/cosmos-react-core';
6
6
  import { colorMap } from '../../utils';
7
- export const StyledStepType = styled.div(({ theme, color, img }) => {
8
- const bgColor = colorMap[color];
7
+ import LifeCycleContext from './LifeCycleContext';
8
+ export const StyledStepType = styled.div(({ visual, theme }) => {
9
+ const bgColor = colorMap[visual.color];
9
10
  const contrastColor = readableColor(bgColor);
10
- return img
11
+ return visual.imgurl
11
12
  ? css `
12
13
  height: 2rem;
13
14
  padding-inline-end: calc(0.25 * ${theme.base.spacing});
@@ -28,6 +29,7 @@ export const StyledStepBadge = styled.div(({ theme }) => {
28
29
  justify-content: flex-end;
29
30
  width: auto;
30
31
  max-width: calc(50% - ${theme.base.spacing});
32
+
31
33
  > span {
32
34
  white-space: nowrap;
33
35
  text-overflow: ellipsis;
@@ -36,137 +38,85 @@ export const StyledStepBadge = styled.div(({ theme }) => {
36
38
  `;
37
39
  });
38
40
  StyledStepBadge.defaultProps = defaultThemeProp;
39
- const StyledStepValue = styled.div(({ theme, error }) => {
41
+ export const StyledStepWrapper = styled.div(({ theme }) => {
40
42
  return css `
43
+ width: 100%;
44
+ margin: 0 0 calc(0.5 * ${theme.base.spacing});
45
+ `;
46
+ });
47
+ StyledStepWrapper.defaultProps = defaultThemeProp;
48
+ export const StyledStep = styled.div(({ hasFocus, theme }) => {
49
+ return css `
50
+ background: ${theme.base.palette['secondary-background']};
51
+ border: 0.125rem solid transparent;
41
52
  border-radius: calc(0.5 * ${theme.base['border-radius']});
42
- ${error &&
53
+
54
+ ${hasFocus &&
43
55
  css `
44
- background: ${theme.base.colors.red['extra-light']};
56
+ box-shadow: ${theme.base.shadow.focus};
45
57
  `}
58
+
59
+ &:hover {
60
+ cursor: pointer;
61
+ }
62
+
63
+ &[aria-current='step'] {
64
+ border-color: ${theme.base.palette.interactive};
65
+ }
46
66
  `;
47
67
  });
48
- StyledStepValue.defaultProps = defaultThemeProp;
49
- export const StyledStepValueInput = styled.input(({ error, theme }) => {
68
+ StyledStep.defaultProps = defaultThemeProp;
69
+ const StyledStepButtonWrapper = styled.div(({ theme }) => {
50
70
  return css `
51
- height: ${theme.components.input.height};
52
- padding: 0 calc(0.5 * ${theme.base.spacing});
53
- border: none;
54
- border-inline-start: 0.0625rem solid transparent;
55
- border-inline-end: 0.0625rem solid transparent;
56
- text-overflow: ellipsis;
57
- min-width: 40%;
58
- outline: none;
59
- &:hover {
60
- cursor: pointer;
61
- }
62
- &:disabled {
63
- cursor: not-allowed;
64
- }
65
- ${error
66
- ? css `
67
- background: ${theme.base.colors.red['extra-light']};
68
- &:focus:enabled {
69
- border-color: ${theme.base.colors.red.medium};
70
- }
71
- `
72
- : css `
73
- background: ${theme.base.palette['secondary-background']};
74
- &&:hover {
75
- background: ${theme.base.palette['app-background']};
76
- }
77
- &&:focus:enabled {
78
- background: ${theme.base.palette['primary-background']};
79
- border-color: ${theme.base.colors.blue.medium};
80
- }
81
- `}
82
- `;
71
+ border-radius: calc(0.5 * ${theme.base['border-radius']});
72
+ `;
83
73
  });
84
- StyledStepValueInput.defaultProps = defaultThemeProp;
85
- export const StyledStepStatus = styled.div(({ theme, badge, error }) => {
74
+ StyledStepButtonWrapper.defaultProps = defaultThemeProp;
75
+ export const StyledStepButton = styled.button(({ theme }) => {
86
76
  return css `
87
77
  border: none;
88
- ${badge &&
89
- css `
90
- display: none;
91
- `}
92
- visibility: hidden;
78
+ height: ${theme.components.button.height};
79
+ overflow: hidden;
80
+ text-overflow: ellipsis;
81
+ white-space: nowrap;
82
+ text-align: start;
83
+ background: ${theme.base.palette['secondary-background']};
84
+
93
85
  &:hover {
94
86
  cursor: pointer;
95
87
  }
96
- &:focus:not([disabled]) {
97
- outline: 0.0625rem solid ${theme.base.colors.blue.medium};
88
+
89
+ &:focus {
90
+ outline: none;
98
91
  }
99
- ${error &&
100
- !badge &&
101
- css `
102
- visibility: visible;
103
- `}
104
92
  `;
105
93
  });
106
- StyledStepStatus.defaultProps = defaultThemeProp;
107
- export const StyledStep = styled.div(({ theme, error }) => {
94
+ StyledStepButton.defaultProps = defaultThemeProp;
95
+ export const StyledWarnIcon = styled(Icon)(({ theme }) => {
108
96
  return css `
109
- background: ${theme.base.palette['secondary-background']};
110
- border: 0.0625rem solid transparent;
111
- border-radius: calc(0.5 * ${theme.base['border-radius']});
112
- margin: 0 0 calc(0.5 * ${theme.base.spacing});
113
- width: 100%;
114
- ${error &&
115
- css `
116
- border-color: ${theme.base.colors.red.medium};
117
- box-shadow: none;
118
- `}
97
+ color: ${theme.base.palette.urgent};
98
+ margin-inline-end: ${theme.base.spacing};
99
+
119
100
  &:hover {
120
101
  cursor: pointer;
121
- ${StyledStepBadge} {
122
- ${css `
123
- display: none;
124
- `}
125
- }
126
- ${StyledStepStatus} {
127
- ${css `
128
- visibility: visible;
129
- display: inline-block;
130
- `}
131
- }
132
102
  }
133
- &:focus-within {
134
- ${!error &&
135
- css `
136
- border-color: ${theme.base.colors.blue.medium};
137
- box-shadow: ${theme.components['form-control'][':focus']['box-shadow']};
138
- `}
139
- ${StyledStepBadge} {
140
- ${css `
141
- display: none;
142
- `}
143
- }
144
- ${StyledStepStatus} {
145
- ${css `
146
- display: inline-block;
147
- visibility: visible;
148
- `}
149
- }
150
- ${StyledTooltip} {
151
- ${css `
152
- visibility: hidden;
153
- `}
154
- }
103
+
104
+ &:focus {
105
+ outline: none;
106
+ box-shadow: ${theme.base.shadow.focus};
155
107
  }
156
108
  `;
157
109
  });
158
- StyledStep.defaultProps = defaultThemeProp;
159
- const Step = ({ value, id, visual, actions, badge, error, onChange, categoryItem, item, stageItem, taskItem, onFocus, onBlur, ...restProps }) => {
110
+ StyledWarnIcon.defaultProps = defaultThemeProp;
111
+ const Step = ({ value, id, visual, actions, badge, error, categoryItem, item, stageItem, taskItem, onClick, ...restProps }) => {
160
112
  const t = useI18n();
161
- const [stepValue, setStepValue] = useState(value);
113
+ const { selectedItemId } = useContext(LifeCycleContext);
114
+ const [stepHasFocus, setStepHasFocus] = useState(false);
162
115
  const [iconEl, setIconEl] = useElement();
163
- const [actionEl, setActionEl] = useElement();
164
- const [inputEl, setInputEl] = useElement();
165
- const actionsLabel = t('actions');
166
- const singleActionLabel = actions?.[0]?.text ?? '';
167
- const tooltipValue = stepValue || error;
116
+ const [errorIcon, setErrorIcon] = useElement();
168
117
  /* Need to check the value with statusProps */
169
118
  const onActionItemClick = (actionId, e) => {
119
+ e.stopPropagation();
170
120
  const param = {
171
121
  task: taskItem,
172
122
  stage: stageItem,
@@ -192,38 +142,23 @@ const Step = ({ value, id, visual, actions, badge, error, onChange, categoryItem
192
142
  return actionItem;
193
143
  });
194
144
  }
195
- const onInputChange = (e) => {
196
- setStepValue(e.target.value);
197
- const actionParam = {
198
- value: e.target.value,
199
- step: item,
200
- task: taskItem,
201
- category: categoryItem,
202
- stage: stageItem
203
- };
204
- onChange?.(actionParam, e);
205
- };
206
- const onInputFocus = (e) => {
207
- const actionParam = {
208
- value: e.target.value,
209
- step: item,
210
- task: taskItem,
211
- category: categoryItem,
212
- stage: stageItem
213
- };
214
- onFocus?.(actionParam, e);
215
- };
216
- const onInputBlur = (e) => {
145
+ const onStepClick = (e) => {
146
+ e.stopPropagation();
217
147
  const actionParam = {
218
- value: e.target.value,
148
+ value,
219
149
  step: item,
220
150
  task: taskItem,
221
151
  category: categoryItem,
222
- stage: stageItem
152
+ stage: stageItem,
153
+ type: 'Step'
223
154
  };
224
- onBlur?.(actionParam, e);
155
+ onClick?.(actionParam, e);
225
156
  };
226
- return (_jsxs(Flex, { as: StyledStep, container: { inline: true }, error: error, children: [_jsxs(Flex, { as: StyledStepType, color: visual.color, ref: setIconEl, img: visual.imgurl, children: [visual.imgurl.length > 0 && (_jsx(Avatar, { name: visual.title || '', imageSrc: visual?.imgurl, shape: 'squircle', size: 'm' })), !visual.imgurl && _jsx(Icon, { name: visual.icon })] }), _jsx(Tooltip, { target: iconEl, children: visual.title }), _jsxs(Flex, { as: StyledStepValue, item: { grow: 2 }, error: error, container: { inline: true, alignItems: 'center' }, children: [_jsx(StyledStepValueInput, { value: stepValue, type: 'text', ref: setInputEl, error: error, onChange: onInputChange, "aria-label": stepValue, id: item.id, ...restProps, onFocus: onInputFocus, onBlur: onInputBlur }), badge?.type && (_jsx(Flex, { as: StyledStepBadge, container: { inline: true, alignItems: 'center' }, children: _jsx(Status, { variant: badge?.type || 'success', children: badge?.label }) }))] }), _jsx(Tooltip, { target: inputEl, hideDelay: 'none', children: error || tooltipValue || 'test' }), _jsx(Flex, { as: StyledStepStatus, ref: setActionEl, badge: badge?.type, error: error, children: actionsClone && _jsx(Actions, { items: actionsClone, menuAt: 2, iconOnly: true }) }), _jsx(Tooltip, { target: actionEl, "aria-hidden": 'true', children: actions && actions?.length > 1 ? actionsLabel : singleActionLabel })] }));
157
+ return (_jsxs(Flex, { as: StyledStepWrapper, container: { inline: true, alignItems: 'center' }, children: [error && (_jsxs(_Fragment, { children: [_jsx(StyledWarnIcon, { role: 'status', tabIndex: '0', "aria-label": t('item_error', [error]), ref: setErrorIcon, name: 'warn-solid' }), _jsx(Tooltip, { target: errorIcon, "aria-hidden": !!error, hideDelay: 'none', children: error })] })), _jsxs(Flex, { as: StyledStep, container: { inline: true }, "aria-current": selectedItemId === id ? 'step' : undefined, error: error, id: id, item: { grow: 1 }, hasFocus: stepHasFocus && selectedItemId !== id, onClick: onStepClick, children: [_jsxs(StyledStepType, { visual: visual, ref: setIconEl, children: [visual.imgurl.length > 0 && (_jsx(Avatar, { name: visual.title, imageSrc: visual?.imgurl, shape: 'squircle', size: 'm' })), !visual.imgurl && _jsx(Icon, { name: visual.icon })] }), _jsx(Tooltip, { target: iconEl, children: visual.title }), _jsxs(Flex, { as: StyledStepButtonWrapper, item: { grow: 1 }, container: { inline: true, alignItems: 'center', justify: 'between' }, children: [_jsx(StyledStepButton, { ...restProps, onFocus: () => {
158
+ setStepHasFocus(true);
159
+ }, onBlur: () => {
160
+ setStepHasFocus(false);
161
+ }, "aria-label": t('step_name', [value]), children: value }), badge?.type && (_jsx(Flex, { as: StyledStepBadge, container: { inline: true, alignItems: 'center' }, children: _jsx(Status, { variant: badge?.type || 'success', children: badge?.label }) }))] }), actionsClone && _jsx(Actions, { items: actionsClone, menuAt: 2, iconOnly: true })] })] }));
227
162
  };
228
163
  export default Step;
229
164
  //# sourceMappingURL=Step.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Step.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/Step.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EAMT,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG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,SAAS,YAAG,KAAK,EAAE,KAAK,GAAU,GAC7D,CACR,IACI,EACP,KAAC,OAAO,IAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAC,MAAM,YACvC,KAAK,IAAI,YAAY,IAAI,MAAM,GACxB,EACV,KAAC,IAAI,IAAC,EAAE,EAAE,gBAAgB,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,YAC3E,YAAY,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,SAAG,GAChE,EACP,KAAC,OAAO,IAAC,MAAM,EAAE,QAAQ,iBAAc,MAAM,YAC1C,OAAO,IAAI,OAAO,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,GAC1D,IACL,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import {\n useState,\n FunctionComponent,\n PropsWithoutRef,\n ChangeEvent,\n FocusEvent,\n MouseEvent\n} from 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor } from 'polished';\n\nimport {\n Flex,\n defaultThemeProp,\n BaseProps,\n ForwardProps,\n Icon,\n Tooltip,\n useElement,\n Status,\n FormControlProps,\n Actions,\n useI18n,\n Avatar,\n StyledTooltip,\n Action\n} from '@pega/cosmos-react-core';\n\nimport { colorMap, ColorName } from '../../utils';\n\nimport {\n TaskItemProps,\n StepItemProps,\n StageItemProps,\n CategoryItemProps,\n LifeCycleAction,\n LifeCycleActionParam\n} from './LifeCycle.types';\n\nexport interface StepProps extends Omit<FormControlProps, 'status' | 'id'> {\n /** Pass an array of Action objects to append button(s) inline with the Input. */\n actions?: LifeCycleAction[];\n /** Input Change */\n onChange?: (param: LifeCycleActionParam, e: ChangeEvent<HTMLInputElement>) => void;\n /** callback for Focus of input */\n onFocus?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;\n /** callback for Blur of input */\n onBlur?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;\n}\n\ninterface StepComponentProps extends BaseProps, StepProps {\n /** Pass text for the step. */\n value?: string;\n /** step data id */\n id?: string;\n /** Determines the visual for icon, color and label to render.\n * This color is passed as a variant and accessible colors are used to display.\n * Icon and label are passed as normal string */\n visual: {\n imgurl: string;\n color: ColorName;\n icon: string;\n title: string;\n };\n /* Determines the variant and label for the badges */\n badge?: StepItemProps['status'];\n /* The status is used to show the input error status and the info on tooltip in case of error */\n error?: string;\n /* Data of the steps which can be used to send the full info back */\n item: StepItemProps;\n stageItem: StageItemProps;\n taskItem: TaskItemProps;\n categoryItem: CategoryItemProps;\n}\n\nexport const StyledStepType = styled.div<{ color: ColorName; ref: HTMLDivElement; img: string }>(\n ({ theme, color, img }) => {\n const bgColor = colorMap[color];\n\n const contrastColor = readableColor(bgColor);\n return img\n ? css`\n height: 2rem;\n padding-inline-end: calc(0.25 * ${theme.base.spacing});\n `\n : css`\n background: ${bgColor};\n margin: calc(0.5 * ${theme.base.spacing});\n padding: 0 calc(0.5 * ${theme.base.spacing});\n color: ${contrastColor};\n text-align: center;\n border-radius: calc(0.25 * ${theme.base['border-radius']});\n `;\n }\n);\n\nStyledStepType.defaultProps = defaultThemeProp;\n\nexport const StyledStepBadge = styled.div(({ theme }) => {\n return css`\n padding: 0 calc(0.5 * ${theme.base.spacing});\n justify-content: flex-end;\n width: auto;\n max-width: calc(50% - ${theme.base.spacing});\n > span {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n `;\n});\n\nStyledStepBadge.defaultProps = defaultThemeProp;\n\nconst StyledStepValue = styled.div<{ error: string }>(({ theme, error }) => {\n return css`\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n ${error &&\n css`\n background: ${theme.base.colors.red['extra-light']};\n `}\n `;\n});\n\nStyledStepValue.defaultProps = defaultThemeProp;\n\nexport const StyledStepValueInput = styled.input<{ error: string | undefined }>(\n ({ error, theme }) => {\n return css`\n height: ${theme.components.input.height};\n padding: 0 calc(0.5 * ${theme.base.spacing});\n border: none;\n border-inline-start: 0.0625rem solid transparent;\n border-inline-end: 0.0625rem solid transparent;\n text-overflow: ellipsis;\n min-width: 40%;\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 &:focus:enabled {\n border-color: ${theme.base.colors.red.medium};\n }\n `\n : css`\n background: ${theme.base.palette['secondary-background']};\n &&:hover {\n background: ${theme.base.palette['app-background']};\n }\n &&:focus:enabled {\n background: ${theme.base.palette['primary-background']};\n border-color: ${theme.base.colors.blue.medium};\n }\n `}\n `;\n }\n);\n\nStyledStepValueInput.defaultProps = defaultThemeProp;\n\nexport const StyledStepStatus = styled.div<{\n badge: string;\n error: string;\n}>(({ theme, badge, error }) => {\n return css`\n border: none;\n ${badge &&\n css`\n display: none;\n `}\n visibility: hidden;\n &:hover {\n cursor: pointer;\n }\n &:focus:not([disabled]) {\n outline: 0.0625rem solid ${theme.base.colors.blue.medium};\n }\n ${error &&\n !badge &&\n css`\n visibility: visible;\n `}\n `;\n});\n\nStyledStepStatus.defaultProps = defaultThemeProp;\n\nexport const StyledStep = styled.div<{ error: string }>(({ theme, error }) => {\n return css`\n background: ${theme.base.palette['secondary-background']};\n border: 0.0625rem solid transparent;\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n margin: 0 0 calc(0.5 * ${theme.base.spacing});\n width: 100%;\n ${error &&\n css`\n border-color: ${theme.base.colors.red.medium};\n box-shadow: none;\n `}\n &:hover {\n cursor: pointer;\n ${StyledStepBadge} {\n ${css`\n display: none;\n `}\n }\n ${StyledStepStatus} {\n ${css`\n visibility: visible;\n display: inline-block;\n `}\n }\n }\n &:focus-within {\n ${!error &&\n css`\n border-color: ${theme.base.colors.blue.medium};\n box-shadow: ${theme.components['form-control'][':focus']['box-shadow']};\n `}\n ${StyledStepBadge} {\n ${css`\n display: none;\n `}\n }\n ${StyledStepStatus} {\n ${css`\n display: inline-block;\n visibility: visible;\n `}\n }\n ${StyledTooltip} {\n ${css`\n visibility: hidden;\n `}\n }\n }\n `;\n});\n\nStyledStep.defaultProps = defaultThemeProp;\n\nconst Step: FunctionComponent<StepComponentProps & ForwardProps> = ({\n value,\n id,\n visual,\n actions,\n badge,\n error,\n onChange,\n categoryItem,\n item,\n stageItem,\n taskItem,\n onFocus,\n onBlur,\n ...restProps\n}: PropsWithoutRef<StepComponentProps>) => {\n const t = useI18n();\n const [stepValue, setStepValue] = useState(value);\n const [iconEl, setIconEl] = useElement();\n const [actionEl, setActionEl] = useElement();\n const [inputEl, setInputEl] = useElement();\n const actionsLabel = t('actions');\n const singleActionLabel = (actions?.[0]?.text as string) ?? '';\n const tooltipValue = stepValue || error;\n\n /* Need to check the value with statusProps */\n\n const onActionItemClick = (\n actionId: string,\n e: MouseEvent<HTMLInputElement | HTMLAnchorElement | HTMLButtonElement>\n ) => {\n const param: LifeCycleActionParam = {\n task: taskItem,\n stage: stageItem,\n step: item,\n category: categoryItem\n };\n actions?.forEach(actionItem => {\n if (actionItem.id === actionId) {\n actionItem.onClick(param, e);\n }\n });\n };\n /* Deep copy of actions 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 const onInputChange = (e: ChangeEvent<HTMLInputElement>) => {\n setStepValue(e.target.value);\n const actionParam: LifeCycleActionParam = {\n value: e.target.value,\n step: item,\n task: taskItem,\n category: categoryItem,\n stage: stageItem\n };\n onChange?.(actionParam, e);\n };\n\n const onInputFocus = (e: FocusEvent<HTMLInputElement>) => {\n const actionParam: LifeCycleActionParam = {\n value: e.target.value,\n step: item,\n task: taskItem,\n category: categoryItem,\n stage: stageItem\n };\n onFocus?.(actionParam, e);\n };\n\n const onInputBlur = (e: FocusEvent<HTMLInputElement>) => {\n const actionParam: LifeCycleActionParam = {\n value: e.target.value,\n step: item,\n task: taskItem,\n category: categoryItem,\n stage: stageItem\n };\n onBlur?.(actionParam, e);\n };\n\n return (\n <Flex as={StyledStep} container={{ inline: true }} error={error}>\n <Flex as={StyledStepType} color={visual.color} ref={setIconEl} img={visual.imgurl}>\n {visual.imgurl.length > 0 && (\n <Avatar name={visual.title || ''} imageSrc={visual?.imgurl} shape='squircle' size='m' />\n )}\n {!visual.imgurl && <Icon name={visual.icon} />}\n </Flex>\n\n <Tooltip target={iconEl}>{visual.title}</Tooltip>\n\n <Flex\n as={StyledStepValue}\n item={{ grow: 2 }}\n error={error}\n container={{ inline: true, alignItems: 'center' }}\n >\n <StyledStepValueInput\n value={stepValue}\n type='text'\n ref={setInputEl}\n error={error}\n onChange={onInputChange}\n aria-label={stepValue}\n id={item.id}\n {...restProps}\n onFocus={onInputFocus}\n onBlur={onInputBlur}\n />\n {badge?.type && (\n <Flex as={StyledStepBadge} container={{ inline: true, alignItems: 'center' }}>\n <Status variant={badge?.type || 'success'}>{badge?.label}</Status>\n </Flex>\n )}\n </Flex>\n <Tooltip target={inputEl} hideDelay='none'>\n {error || tooltipValue || 'test'}\n </Tooltip>\n <Flex as={StyledStepStatus} ref={setActionEl} badge={badge?.type} error={error}>\n {actionsClone && <Actions items={actionsClone} menuAt={2} iconOnly />}\n </Flex>\n <Tooltip target={actionEl} aria-hidden='true'>\n {actions && actions?.length > 1 ? actionsLabel : singleActionLabel}\n </Tooltip>\n </Flex>\n );\n};\n\nexport default Step;\n"]}
1
+ {"version":3,"file":"Step.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/Step.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAkD,UAAU,EAAE,MAAM,OAAO,CAAC;AAC7F,OAAO,MAAM,EAAE,E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CACX,eAAe,CAAC,KAAK,CAAC,CAAC;gCACzB,CAAC,gBACW,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,YAElC,KAAK,GACW,EAClB,KAAK,EAAE,IAAI,IAAI,CACd,KAAC,IAAI,IAAC,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,YAC1E,KAAC,MAAM,IAAC,OAAO,EAAE,KAAK,EAAE,IAAI,IAAI,SAAS,YAAG,KAAK,EAAE,KAAK,GAAU,GAC7D,CACR,IACI,EACN,YAAY,IAAI,KAAC,OAAO,IAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,SAAG,IAChE,IACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import { useState, FunctionComponent, PropsWithoutRef, MouseEvent, useContext } from 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor } from 'polished';\n\nimport {\n Flex,\n defaultThemeProp,\n BaseProps,\n ForwardProps,\n Icon,\n Tooltip,\n useElement,\n Status,\n Actions,\n useI18n,\n Avatar,\n Action\n} from '@pega/cosmos-react-core';\n\nimport { colorMap, ColorName } from '../../utils';\n\nimport {\n TaskItemProps,\n StepItemProps,\n StageItemProps,\n CategoryItemProps,\n LifeCycleActionParam,\n StepProps\n} from './LifeCycle.types';\nimport LifeCycleContext from './LifeCycleContext';\n\ninterface StepComponentProps extends BaseProps, StepProps {\n /** Pass text for the step. */\n value: string;\n /** unique id of step */\n id: string;\n /** Determines the visual for icon, color and label to render.\n * This color is passed as a variant and accessible colors are used to display.\n * Icon and label are passed as normal string */\n visual: {\n imgurl: string;\n color: ColorName;\n icon: string;\n title: string;\n };\n /* Determines the variant and label for the badges */\n badge?: StepItemProps['status'];\n /* The status is used to show the input error status and the info on tooltip in case of error */\n error?: string;\n /* Data of the steps which can be used to send the full info back */\n item: StepItemProps;\n stageItem: StageItemProps;\n taskItem: TaskItemProps;\n categoryItem: CategoryItemProps;\n}\n\nexport const StyledStepType = styled.div<Pick<StepComponentProps, 'visual'>>(\n ({ visual, theme }) => {\n const bgColor = colorMap[visual.color];\n const contrastColor = readableColor(bgColor);\n return visual.imgurl\n ? css`\n height: 2rem;\n padding-inline-end: calc(0.25 * ${theme.base.spacing});\n `\n : css`\n background: ${bgColor};\n margin: calc(0.5 * ${theme.base.spacing});\n padding: 0 calc(0.5 * ${theme.base.spacing});\n color: ${contrastColor};\n text-align: center;\n border-radius: calc(0.25 * ${theme.base['border-radius']});\n `;\n }\n);\n\nStyledStepType.defaultProps = defaultThemeProp;\n\nexport const StyledStepBadge = styled.div(({ theme }) => {\n return css`\n padding: 0 calc(0.5 * ${theme.base.spacing});\n justify-content: flex-end;\n width: auto;\n max-width: calc(50% - ${theme.base.spacing});\n\n > span {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n `;\n});\n\nStyledStepBadge.defaultProps = defaultThemeProp;\n\nexport const StyledStepWrapper = styled.div(({ theme }) => {\n return css`\n width: 100%;\n margin: 0 0 calc(0.5 * ${theme.base.spacing});\n `;\n});\n\nStyledStepWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledStep = styled.div<{ hasFocus: boolean }>(({ hasFocus, theme }) => {\n return css`\n background: ${theme.base.palette['secondary-background']};\n border: 0.125rem solid transparent;\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n\n ${hasFocus &&\n css`\n box-shadow: ${theme.base.shadow.focus};\n `}\n\n &:hover {\n cursor: pointer;\n }\n\n &[aria-current='step'] {\n border-color: ${theme.base.palette.interactive};\n }\n `;\n});\n\nStyledStep.defaultProps = defaultThemeProp;\n\nconst StyledStepButtonWrapper = styled.div<{ error: string }>(({ theme }) => {\n return css`\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n `;\n});\n\nStyledStepButtonWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledStepButton = styled.button(({ theme }) => {\n return css`\n border: none;\n height: ${theme.components.button.height};\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: start;\n background: ${theme.base.palette['secondary-background']};\n\n &:hover {\n cursor: pointer;\n }\n\n &:focus {\n outline: none;\n }\n `;\n});\n\nStyledStepButton.defaultProps = defaultThemeProp;\n\nexport const StyledWarnIcon: typeof Icon = styled(Icon)(({ theme }) => {\n return css`\n color: ${theme.base.palette.urgent};\n margin-inline-end: ${theme.base.spacing};\n\n &:hover {\n cursor: pointer;\n }\n\n &:focus {\n outline: none;\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledWarnIcon.defaultProps = defaultThemeProp;\n\nconst Step: FunctionComponent<StepComponentProps & ForwardProps> = ({\n value,\n id,\n visual,\n actions,\n badge,\n error,\n categoryItem,\n item,\n stageItem,\n taskItem,\n onClick,\n ...restProps\n}: PropsWithoutRef<StepComponentProps>) => {\n const t = useI18n();\n const { selectedItemId } = useContext(LifeCycleContext);\n const [stepHasFocus, setStepHasFocus] = useState(false);\n const [iconEl, setIconEl] = useElement();\n const [errorIcon, setErrorIcon] = useElement();\n\n /* Need to check the value with statusProps */\n\n const onActionItemClick = (\n actionId: string,\n e: MouseEvent<HTMLInputElement | HTMLAnchorElement | HTMLButtonElement>\n ) => {\n e.stopPropagation();\n const param: LifeCycleActionParam = {\n task: taskItem,\n stage: stageItem,\n step: item,\n category: categoryItem\n };\n actions?.forEach(actionItem => {\n if (actionItem.id === actionId) {\n actionItem.onClick(param, e);\n }\n });\n };\n /* Deep copy of actions 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 const onStepClick = (e: MouseEvent) => {\n e.stopPropagation();\n const actionParam: LifeCycleActionParam = {\n value,\n step: item,\n task: taskItem,\n category: categoryItem,\n stage: stageItem,\n type: 'Step'\n };\n onClick?.(actionParam, e);\n };\n\n return (\n <Flex as={StyledStepWrapper} container={{ inline: true, alignItems: 'center' }}>\n {error && (\n <>\n <StyledWarnIcon\n role='status'\n tabIndex='0'\n aria-label={t('item_error', [error])}\n ref={setErrorIcon}\n name='warn-solid'\n />\n <Tooltip target={errorIcon} aria-hidden={!!error} hideDelay='none'>\n {error}\n </Tooltip>\n </>\n )}\n <Flex\n as={StyledStep}\n container={{ inline: true }}\n aria-current={selectedItemId === id ? 'step' : undefined}\n error={error}\n id={id}\n item={{ grow: 1 }}\n hasFocus={stepHasFocus && selectedItemId !== id}\n onClick={onStepClick}\n >\n <StyledStepType visual={visual} ref={setIconEl}>\n {visual.imgurl.length > 0 && (\n <Avatar name={visual.title} imageSrc={visual?.imgurl} shape='squircle' size='m' />\n )}\n {!visual.imgurl && <Icon name={visual.icon} />}\n </StyledStepType>\n\n <Tooltip target={iconEl}>{visual.title}</Tooltip>\n\n <Flex\n as={StyledStepButtonWrapper}\n item={{ grow: 1 }}\n container={{ inline: true, alignItems: 'center', justify: 'between' }}\n >\n <StyledStepButton\n {...restProps}\n onFocus={() => {\n setStepHasFocus(true);\n }}\n onBlur={() => {\n setStepHasFocus(false);\n }}\n aria-label={t('step_name', [value])}\n >\n {value}\n </StyledStepButton>\n {badge?.type && (\n <Flex as={StyledStepBadge} container={{ inline: true, alignItems: 'center' }}>\n <Status variant={badge?.type || 'success'}>{badge?.label}</Status>\n </Flex>\n )}\n </Flex>\n {actionsClone && <Actions items={actionsClone} menuAt={2} iconOnly />}\n </Flex>\n </Flex>\n );\n};\n\nexport default Step;\n"]}
@@ -1,31 +1,9 @@
1
- import { FunctionComponent, ChangeEvent, FocusEvent } from 'react';
2
- import { BaseProps, ForwardProps, FormControlProps } from '@pega/cosmos-react-core';
3
- import { LibraryItem } from '../ItemLibrary';
4
- import { StepProps } from './Step';
5
- import { TaskItemProps, StageItemProps, CategoryItemProps, LifeCycleAction, LifeCycleActionParam } from './LifeCycle.types';
6
- export interface TaskProps extends Omit<FormControlProps, 'status' | 'id'> {
7
- /** Pass an array of Action objects to append button(s) inline with the Input. */
8
- actions?: LifeCycleAction[];
9
- /** Tooltip for adding items to the task component */
10
- addStepTitle: string;
11
- /** Region for adding the task component */
12
- addTask: {
13
- title: string;
14
- showOnce: boolean;
15
- onAddTask?: LifeCycleAction['onClick'];
16
- };
17
- onAddStep?: (param: LifeCycleActionParam, selectedItem: LibraryItem) => void;
18
- onChange?: (param: LifeCycleActionParam, e: ChangeEvent<HTMLInputElement>) => void;
19
- /** callback for Focus of input */
20
- onFocus?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;
21
- /** callback for Blur of input */
22
- onBlur?: (param: LifeCycleActionParam, e: FocusEvent<HTMLInputElement>) => void;
23
- /** Types of Nodes */
24
- nodeLibrary: LibraryItem[];
25
- }
1
+ import { FunctionComponent } from 'react';
2
+ import { BaseProps, ForwardProps, Icon } from '@pega/cosmos-react-core';
3
+ import { TaskItemProps, StageItemProps, CategoryItemProps, StepProps, TaskProps } from './LifeCycle.types';
26
4
  interface TaskComponentProps extends BaseProps, TaskProps {
27
5
  /** Pass text for the task. */
28
- value?: string;
6
+ value: string;
29
7
  /** support for an Avatar, Icon, or other supporting visual. */
30
8
  visual: {
31
9
  imgurl: string;
@@ -39,20 +17,17 @@ interface TaskComponentProps extends BaseProps, TaskProps {
39
17
  stageItem: StageItemProps;
40
18
  /** Category data to pass it as callback */
41
19
  categoryItem: CategoryItemProps;
20
+ /** unique id of task */
42
21
  id: string;
43
22
  }
44
23
  export declare const StyledTaskList: import("styled-components").StyledComponent<"li", import("styled-components").DefaultTheme, {}, never>;
45
24
  export declare const StyledCardHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {}, never>;
46
25
  export declare const StyledCardContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
47
- export declare const StyledInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
48
- error: string | undefined;
49
- }, never>;
50
- export declare const StyledTaskActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
51
- ref: HTMLDivElement;
52
- error: string;
26
+ export declare const StyledTaskButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
27
+ export declare const StyledTask: import("styled-components").StyledComponent<"article", import("styled-components").DefaultTheme, {
28
+ hasFocus: boolean;
53
29
  }, never>;
54
- export declare const StyledTask: import("styled-components").StyledComponent<"article", import("styled-components").DefaultTheme, {}, never>;
55
- export declare const StyledInputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
30
+ export declare const StyledWarnIcon: typeof Icon;
56
31
  declare const Task: FunctionComponent<TaskComponentProps & ForwardProps>;
57
32
  export default Task;
58
33
  //# sourceMappingURL=Task.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Task.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/Task.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,WAAW,EACX,UAAU,EAGX,MAAM,OAAO,CAAC;AAGf,OAAO,EAGL,SAAS,EACT,YAAY,EAOZ,gBAAgB,EAMjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAe,MAAM,gBAAgB,CAAC;AAE1D,OAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EACL,aAAa,EACb,cAAc,EAEd,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,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,OAAO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