@pega/cosmos-react-build 5.0.0-dev.4.7 → 5.0.0-dev.4.8

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 (337) hide show
  1. package/package.json +4 -4
  2. package/lib/components/AppShell/AppShell.d.ts +0 -6
  3. package/lib/components/AppShell/AppShell.d.ts.map +0 -1
  4. package/lib/components/AppShell/AppShell.js +0 -58
  5. package/lib/components/AppShell/AppShell.js.map +0 -1
  6. package/lib/components/AppShell/AppShell.styles.d.ts +0 -17
  7. package/lib/components/AppShell/AppShell.styles.d.ts.map +0 -1
  8. package/lib/components/AppShell/AppShell.styles.js +0 -269
  9. package/lib/components/AppShell/AppShell.styles.js.map +0 -1
  10. package/lib/components/AppShell/AppShell.types.d.ts +0 -72
  11. package/lib/components/AppShell/AppShell.types.d.ts.map +0 -1
  12. package/lib/components/AppShell/AppShell.types.js +0 -2
  13. package/lib/components/AppShell/AppShell.types.js.map +0 -1
  14. package/lib/components/AppShell/AppShellContext.d.ts +0 -5
  15. package/lib/components/AppShell/AppShellContext.d.ts.map +0 -1
  16. package/lib/components/AppShell/AppShellContext.js +0 -8
  17. package/lib/components/AppShell/AppShellContext.js.map +0 -1
  18. package/lib/components/AppShell/Header/AppHeader.d.ts +0 -6
  19. package/lib/components/AppShell/Header/AppHeader.d.ts.map +0 -1
  20. package/lib/components/AppShell/Header/AppHeader.js +0 -73
  21. package/lib/components/AppShell/Header/AppHeader.js.map +0 -1
  22. package/lib/components/AppShell/Header/AppHeader.styles.d.ts +0 -13
  23. package/lib/components/AppShell/Header/AppHeader.styles.d.ts.map +0 -1
  24. package/lib/components/AppShell/Header/AppHeader.styles.js +0 -158
  25. package/lib/components/AppShell/Header/AppHeader.styles.js.map +0 -1
  26. package/lib/components/AppShell/Header/AppHeader.types.d.ts +0 -33
  27. package/lib/components/AppShell/Header/AppHeader.types.d.ts.map +0 -1
  28. package/lib/components/AppShell/Header/AppHeader.types.js +0 -2
  29. package/lib/components/AppShell/Header/AppHeader.types.js.map +0 -1
  30. package/lib/components/AppShell/Header/BranchButton.d.ts +0 -20
  31. package/lib/components/AppShell/Header/BranchButton.d.ts.map +0 -1
  32. package/lib/components/AppShell/Header/BranchButton.js +0 -91
  33. package/lib/components/AppShell/Header/BranchButton.js.map +0 -1
  34. package/lib/components/AppShell/NavigationList.d.ts +0 -6
  35. package/lib/components/AppShell/NavigationList.d.ts.map +0 -1
  36. package/lib/components/AppShell/NavigationList.js +0 -97
  37. package/lib/components/AppShell/NavigationList.js.map +0 -1
  38. package/lib/components/AppShell/index.d.ts +0 -5
  39. package/lib/components/AppShell/index.d.ts.map +0 -1
  40. package/lib/components/AppShell/index.js +0 -2
  41. package/lib/components/AppShell/index.js.map +0 -1
  42. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts +0 -10
  43. package/lib/components/DynamicContentEditor/DynamicContentEditor.d.ts.map +0 -1
  44. package/lib/components/DynamicContentEditor/DynamicContentEditor.js +0 -239
  45. package/lib/components/DynamicContentEditor/DynamicContentEditor.js.map +0 -1
  46. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts +0 -23
  47. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.d.ts.map +0 -1
  48. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js +0 -2
  49. package/lib/components/DynamicContentEditor/DynamicContentEditor.types.js.map +0 -1
  50. package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts +0 -329
  51. package/lib/components/DynamicContentEditor/PegaCustomElement.d.ts.map +0 -1
  52. package/lib/components/DynamicContentEditor/PegaCustomElement.js +0 -23
  53. package/lib/components/DynamicContentEditor/PegaCustomElement.js.map +0 -1
  54. package/lib/components/DynamicContentEditor/index.d.ts +0 -3
  55. package/lib/components/DynamicContentEditor/index.d.ts.map +0 -1
  56. package/lib/components/DynamicContentEditor/index.js +0 -2
  57. package/lib/components/DynamicContentEditor/index.js.map +0 -1
  58. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts +0 -8
  59. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +0 -1
  60. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +0 -176
  61. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +0 -1
  62. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts +0 -10
  63. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +0 -1
  64. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +0 -530
  65. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +0 -1
  66. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts +0 -36
  67. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.d.ts.map +0 -1
  68. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js +0 -2
  69. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.types.js.map +0 -1
  70. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts +0 -13
  71. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.d.ts.map +0 -1
  72. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js +0 -51
  73. package/lib/components/ExpressionBuilder/CodeEditor/getCodeSuggestions.js.map +0 -1
  74. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +0 -6
  75. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +0 -1
  76. package/lib/components/ExpressionBuilder/ExpressionBuilder.js +0 -51
  77. package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +0 -1
  78. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +0 -14
  79. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +0 -1
  80. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +0 -81
  81. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +0 -1
  82. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +0 -74
  83. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +0 -1
  84. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js +0 -2
  85. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +0 -1
  86. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts +0 -7
  87. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.d.ts.map +0 -1
  88. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js +0 -6
  89. package/lib/components/ExpressionBuilder/ExpressionBuilderContext.js.map +0 -1
  90. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +0 -6
  91. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +0 -1
  92. package/lib/components/ExpressionBuilder/ExpressionDetails.js +0 -12
  93. package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +0 -1
  94. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts +0 -6
  95. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts.map +0 -1
  96. package/lib/components/ExpressionBuilder/ExpressionItem.js +0 -39
  97. package/lib/components/ExpressionBuilder/ExpressionItem.js.map +0 -1
  98. package/lib/components/ExpressionBuilder/ExpressionList.d.ts +0 -6
  99. package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +0 -1
  100. package/lib/components/ExpressionBuilder/ExpressionList.js +0 -32
  101. package/lib/components/ExpressionBuilder/ExpressionList.js.map +0 -1
  102. package/lib/components/ExpressionBuilder/index.d.ts +0 -8
  103. package/lib/components/ExpressionBuilder/index.d.ts.map +0 -1
  104. package/lib/components/ExpressionBuilder/index.js +0 -6
  105. package/lib/components/ExpressionBuilder/index.js.map +0 -1
  106. package/lib/components/FlowModeller/AddNode.d.ts +0 -18
  107. package/lib/components/FlowModeller/AddNode.d.ts.map +0 -1
  108. package/lib/components/FlowModeller/AddNode.js +0 -86
  109. package/lib/components/FlowModeller/AddNode.js.map +0 -1
  110. package/lib/components/FlowModeller/Connector.d.ts +0 -7
  111. package/lib/components/FlowModeller/Connector.d.ts.map +0 -1
  112. package/lib/components/FlowModeller/Connector.js +0 -69
  113. package/lib/components/FlowModeller/Connector.js.map +0 -1
  114. package/lib/components/FlowModeller/DeletePopover.d.ts +0 -19
  115. package/lib/components/FlowModeller/DeletePopover.d.ts.map +0 -1
  116. package/lib/components/FlowModeller/DeletePopover.js +0 -136
  117. package/lib/components/FlowModeller/DeletePopover.js.map +0 -1
  118. package/lib/components/FlowModeller/FlowModeller.d.ts +0 -5
  119. package/lib/components/FlowModeller/FlowModeller.d.ts.map +0 -1
  120. package/lib/components/FlowModeller/FlowModeller.js +0 -317
  121. package/lib/components/FlowModeller/FlowModeller.js.map +0 -1
  122. package/lib/components/FlowModeller/FlowModeller.types.d.ts +0 -27
  123. package/lib/components/FlowModeller/FlowModeller.types.d.ts.map +0 -1
  124. package/lib/components/FlowModeller/FlowModeller.types.js +0 -2
  125. package/lib/components/FlowModeller/FlowModeller.types.js.map +0 -1
  126. package/lib/components/FlowModeller/FlowModellerContext.d.ts +0 -11
  127. package/lib/components/FlowModeller/FlowModellerContext.d.ts.map +0 -1
  128. package/lib/components/FlowModeller/FlowModellerContext.js +0 -8
  129. package/lib/components/FlowModeller/FlowModellerContext.js.map +0 -1
  130. package/lib/components/FlowModeller/Node/Node.types.d.ts +0 -75
  131. package/lib/components/FlowModeller/Node/Node.types.d.ts.map +0 -1
  132. package/lib/components/FlowModeller/Node/Node.types.js +0 -27
  133. package/lib/components/FlowModeller/Node/Node.types.js.map +0 -1
  134. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +0 -21
  135. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +0 -1
  136. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +0 -151
  137. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +0 -1
  138. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +0 -6
  139. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +0 -1
  140. package/lib/components/FlowModeller/Node/NodeTemplates.js +0 -70
  141. package/lib/components/FlowModeller/Node/NodeTemplates.js.map +0 -1
  142. package/lib/components/FlowModeller/Node.d.ts +0 -5
  143. package/lib/components/FlowModeller/Node.d.ts.map +0 -1
  144. package/lib/components/FlowModeller/Node.js +0 -22
  145. package/lib/components/FlowModeller/Node.js.map +0 -1
  146. package/lib/components/FlowModeller/Renderer/Renderer.d.ts +0 -5
  147. package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +0 -1
  148. package/lib/components/FlowModeller/Renderer/Renderer.js +0 -48
  149. package/lib/components/FlowModeller/Renderer/Renderer.js.map +0 -1
  150. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +0 -18
  151. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +0 -1
  152. package/lib/components/FlowModeller/Renderer/Renderer.types.js +0 -2
  153. package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +0 -1
  154. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +0 -59
  155. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +0 -1
  156. package/lib/components/FlowModeller/Renderer/Utils/Graph.js +0 -258
  157. package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +0 -1
  158. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +0 -36
  159. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +0 -1
  160. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +0 -120
  161. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +0 -1
  162. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts +0 -27
  163. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.d.ts.map +0 -1
  164. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js +0 -172
  165. package/lib/components/FlowModeller/Renderer/Utils/GraphTraversal.js.map +0 -1
  166. package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts +0 -17
  167. package/lib/components/FlowModeller/Utils/addNodeUtils.d.ts.map +0 -1
  168. package/lib/components/FlowModeller/Utils/addNodeUtils.js +0 -141
  169. package/lib/components/FlowModeller/Utils/addNodeUtils.js.map +0 -1
  170. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts +0 -30
  171. package/lib/components/FlowModeller/Utils/deleteNodeUtils.d.ts.map +0 -1
  172. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js +0 -81
  173. package/lib/components/FlowModeller/Utils/deleteNodeUtils.js.map +0 -1
  174. package/lib/components/FlowModeller/helper.d.ts +0 -39
  175. package/lib/components/FlowModeller/helper.d.ts.map +0 -1
  176. package/lib/components/FlowModeller/helper.js +0 -198
  177. package/lib/components/FlowModeller/helper.js.map +0 -1
  178. package/lib/components/FlowModeller/index.d.ts +0 -20
  179. package/lib/components/FlowModeller/index.d.ts.map +0 -1
  180. package/lib/components/FlowModeller/index.js +0 -12
  181. package/lib/components/FlowModeller/index.js.map +0 -1
  182. package/lib/components/ItemLibrary/ItemLibrary.d.ts +0 -25
  183. package/lib/components/ItemLibrary/ItemLibrary.d.ts.map +0 -1
  184. package/lib/components/ItemLibrary/ItemLibrary.js +0 -62
  185. package/lib/components/ItemLibrary/ItemLibrary.js.map +0 -1
  186. package/lib/components/ItemLibrary/index.d.ts +0 -3
  187. package/lib/components/ItemLibrary/index.d.ts.map +0 -1
  188. package/lib/components/ItemLibrary/index.js +0 -3
  189. package/lib/components/ItemLibrary/index.js.map +0 -1
  190. package/lib/components/LifeCycle/Category.d.ts +0 -15
  191. package/lib/components/LifeCycle/Category.d.ts.map +0 -1
  192. package/lib/components/LifeCycle/Category.js +0 -104
  193. package/lib/components/LifeCycle/Category.js.map +0 -1
  194. package/lib/components/LifeCycle/LifeCycle.d.ts +0 -6
  195. package/lib/components/LifeCycle/LifeCycle.d.ts.map +0 -1
  196. package/lib/components/LifeCycle/LifeCycle.js +0 -77
  197. package/lib/components/LifeCycle/LifeCycle.js.map +0 -1
  198. package/lib/components/LifeCycle/LifeCycle.types.d.ts +0 -154
  199. package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +0 -1
  200. package/lib/components/LifeCycle/LifeCycle.types.js +0 -79
  201. package/lib/components/LifeCycle/LifeCycle.types.js.map +0 -1
  202. package/lib/components/LifeCycle/LifeCycleContext.d.ts +0 -9
  203. package/lib/components/LifeCycle/LifeCycleContext.d.ts.map +0 -1
  204. package/lib/components/LifeCycle/LifeCycleContext.js +0 -7
  205. package/lib/components/LifeCycle/LifeCycleContext.js.map +0 -1
  206. package/lib/components/LifeCycle/LifeCycleList.d.ts +0 -30
  207. package/lib/components/LifeCycle/LifeCycleList.d.ts.map +0 -1
  208. package/lib/components/LifeCycle/LifeCycleList.js +0 -68
  209. package/lib/components/LifeCycle/LifeCycleList.js.map +0 -1
  210. package/lib/components/LifeCycle/Stage.d.ts +0 -29
  211. package/lib/components/LifeCycle/Stage.d.ts.map +0 -1
  212. package/lib/components/LifeCycle/Stage.js +0 -232
  213. package/lib/components/LifeCycle/Stage.js.map +0 -1
  214. package/lib/components/LifeCycle/Step.d.ts +0 -40
  215. package/lib/components/LifeCycle/Step.d.ts.map +0 -1
  216. package/lib/components/LifeCycle/Step.js +0 -170
  217. package/lib/components/LifeCycle/Step.js.map +0 -1
  218. package/lib/components/LifeCycle/Task.d.ts +0 -34
  219. package/lib/components/LifeCycle/Task.d.ts.map +0 -1
  220. package/lib/components/LifeCycle/Task.js +0 -158
  221. package/lib/components/LifeCycle/Task.js.map +0 -1
  222. package/lib/components/LifeCycle/index.d.ts +0 -3
  223. package/lib/components/LifeCycle/index.d.ts.map +0 -1
  224. package/lib/components/LifeCycle/index.js +0 -2
  225. package/lib/components/LifeCycle/index.js.map +0 -1
  226. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts +0 -8
  227. package/lib/components/MobileBuildSummary/MobileBuildSummary.d.ts.map +0 -1
  228. package/lib/components/MobileBuildSummary/MobileBuildSummary.js +0 -33
  229. package/lib/components/MobileBuildSummary/MobileBuildSummary.js.map +0 -1
  230. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts +0 -31
  231. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.d.ts.map +0 -1
  232. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js +0 -2
  233. package/lib/components/MobileBuildSummary/MobileBuildSummary.types.js.map +0 -1
  234. package/lib/components/MobileBuildSummary/index.d.ts +0 -3
  235. package/lib/components/MobileBuildSummary/index.d.ts.map +0 -1
  236. package/lib/components/MobileBuildSummary/index.js +0 -2
  237. package/lib/components/MobileBuildSummary/index.js.map +0 -1
  238. package/lib/components/ObjectPreview/ObjectPreview.d.ts +0 -16
  239. package/lib/components/ObjectPreview/ObjectPreview.d.ts.map +0 -1
  240. package/lib/components/ObjectPreview/ObjectPreview.js +0 -25
  241. package/lib/components/ObjectPreview/ObjectPreview.js.map +0 -1
  242. package/lib/components/ObjectPreview/index.d.ts +0 -3
  243. package/lib/components/ObjectPreview/index.d.ts.map +0 -1
  244. package/lib/components/ObjectPreview/index.js +0 -3
  245. package/lib/components/ObjectPreview/index.js.map +0 -1
  246. package/lib/components/ObjectSelect/ObjectPicker.d.ts +0 -15
  247. package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +0 -1
  248. package/lib/components/ObjectSelect/ObjectPicker.js +0 -40
  249. package/lib/components/ObjectSelect/ObjectPicker.js.map +0 -1
  250. package/lib/components/ObjectSelect/ObjectSelect.d.ts +0 -32
  251. package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +0 -1
  252. package/lib/components/ObjectSelect/ObjectSelect.js +0 -41
  253. package/lib/components/ObjectSelect/ObjectSelect.js.map +0 -1
  254. package/lib/components/ObjectSelect/ObjectSummary.d.ts +0 -32
  255. package/lib/components/ObjectSelect/ObjectSummary.d.ts.map +0 -1
  256. package/lib/components/ObjectSelect/ObjectSummary.js +0 -81
  257. package/lib/components/ObjectSelect/ObjectSummary.js.map +0 -1
  258. package/lib/components/ObjectSelect/index.d.ts +0 -3
  259. package/lib/components/ObjectSelect/index.d.ts.map +0 -1
  260. package/lib/components/ObjectSelect/index.js +0 -2
  261. package/lib/components/ObjectSelect/index.js.map +0 -1
  262. package/lib/components/ObjectSelect/useCreateModal.d.ts +0 -32
  263. package/lib/components/ObjectSelect/useCreateModal.d.ts.map +0 -1
  264. package/lib/components/ObjectSelect/useCreateModal.js +0 -60
  265. package/lib/components/ObjectSelect/useCreateModal.js.map +0 -1
  266. package/lib/components/PageBanner/PageBanner.d.ts +0 -22
  267. package/lib/components/PageBanner/PageBanner.d.ts.map +0 -1
  268. package/lib/components/PageBanner/PageBanner.js +0 -59
  269. package/lib/components/PageBanner/PageBanner.js.map +0 -1
  270. package/lib/components/PageBanner/index.d.ts +0 -3
  271. package/lib/components/PageBanner/index.d.ts.map +0 -1
  272. package/lib/components/PageBanner/index.js +0 -2
  273. package/lib/components/PageBanner/index.js.map +0 -1
  274. package/lib/components/PageTemplates/GalleryPage.d.ts +0 -23
  275. package/lib/components/PageTemplates/GalleryPage.d.ts.map +0 -1
  276. package/lib/components/PageTemplates/GalleryPage.js +0 -47
  277. package/lib/components/PageTemplates/GalleryPage.js.map +0 -1
  278. package/lib/components/PageTemplates/PageTemplates.d.ts +0 -27
  279. package/lib/components/PageTemplates/PageTemplates.d.ts.map +0 -1
  280. package/lib/components/PageTemplates/PageTemplates.js +0 -72
  281. package/lib/components/PageTemplates/PageTemplates.js.map +0 -1
  282. package/lib/components/PageTemplates/ShowcasePage.d.ts +0 -16
  283. package/lib/components/PageTemplates/ShowcasePage.d.ts.map +0 -1
  284. package/lib/components/PageTemplates/ShowcasePage.js +0 -29
  285. package/lib/components/PageTemplates/ShowcasePage.js.map +0 -1
  286. package/lib/components/PageTemplates/index.d.ts +0 -6
  287. package/lib/components/PageTemplates/index.d.ts.map +0 -1
  288. package/lib/components/PageTemplates/index.js +0 -4
  289. package/lib/components/PageTemplates/index.js.map +0 -1
  290. package/lib/components/SummaryCard/SummaryCard.d.ts +0 -15
  291. package/lib/components/SummaryCard/SummaryCard.d.ts.map +0 -1
  292. package/lib/components/SummaryCard/SummaryCard.js +0 -27
  293. package/lib/components/SummaryCard/SummaryCard.js.map +0 -1
  294. package/lib/components/SummaryCard/index.d.ts +0 -3
  295. package/lib/components/SummaryCard/index.d.ts.map +0 -1
  296. package/lib/components/SummaryCard/index.js +0 -3
  297. package/lib/components/SummaryCard/index.js.map +0 -1
  298. package/lib/components/Workbench/ConfigurationPanel.d.ts +0 -5
  299. package/lib/components/Workbench/ConfigurationPanel.d.ts.map +0 -1
  300. package/lib/components/Workbench/ConfigurationPanel.js +0 -10
  301. package/lib/components/Workbench/ConfigurationPanel.js.map +0 -1
  302. package/lib/components/Workbench/Toolbar.d.ts +0 -10
  303. package/lib/components/Workbench/Toolbar.d.ts.map +0 -1
  304. package/lib/components/Workbench/Toolbar.js +0 -14
  305. package/lib/components/Workbench/Toolbar.js.map +0 -1
  306. package/lib/components/Workbench/UtilityPanel.d.ts +0 -7
  307. package/lib/components/Workbench/UtilityPanel.d.ts.map +0 -1
  308. package/lib/components/Workbench/UtilityPanel.js +0 -12
  309. package/lib/components/Workbench/UtilityPanel.js.map +0 -1
  310. package/lib/components/Workbench/Workbench.d.ts +0 -6
  311. package/lib/components/Workbench/Workbench.d.ts.map +0 -1
  312. package/lib/components/Workbench/Workbench.js +0 -23
  313. package/lib/components/Workbench/Workbench.js.map +0 -1
  314. package/lib/components/Workbench/Workbench.styles.d.ts +0 -10
  315. package/lib/components/Workbench/Workbench.styles.d.ts.map +0 -1
  316. package/lib/components/Workbench/Workbench.styles.js +0 -75
  317. package/lib/components/Workbench/Workbench.styles.js.map +0 -1
  318. package/lib/components/Workbench/Workbench.types.d.ts +0 -47
  319. package/lib/components/Workbench/Workbench.types.d.ts.map +0 -1
  320. package/lib/components/Workbench/Workbench.types.js +0 -2
  321. package/lib/components/Workbench/Workbench.types.js.map +0 -1
  322. package/lib/components/Workbench/index.d.ts +0 -2
  323. package/lib/components/Workbench/index.d.ts.map +0 -1
  324. package/lib/components/Workbench/index.js +0 -2
  325. package/lib/components/Workbench/index.js.map +0 -1
  326. package/lib/index.d.ts +0 -23
  327. package/lib/index.d.ts.map +0 -1
  328. package/lib/index.js +0 -24
  329. package/lib/index.js.map +0 -1
  330. package/lib/utils/index.d.ts +0 -2
  331. package/lib/utils/index.d.ts.map +0 -1
  332. package/lib/utils/index.js +0 -2
  333. package/lib/utils/index.js.map +0 -1
  334. package/lib/utils/utils.d.ts +0 -14
  335. package/lib/utils/utils.d.ts.map +0 -1
  336. package/lib/utils/utils.js +0 -13
  337. package/lib/utils/utils.js.map +0 -1
@@ -1,158 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState, useCallback, useContext } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import { Flex, defaultThemeProp, Button, Icon, useElement, Actions, useI18n, Avatar, useOuterEvent, useEscape } from '@pega/cosmos-react-core';
5
- import { ItemLibrary } from '../ItemLibrary';
6
- import Step from './Step';
7
- import LifeCycleContext from './LifeCycleContext';
8
- export const StyledTaskList = styled.li(({ theme }) => {
9
- return css `
10
- list-style-type: none;
11
- margin-block-end: ${theme.base.spacing};
12
-
13
- &:last-child > article {
14
- margin-block-end: 0;
15
- }
16
- `;
17
- });
18
- StyledTaskList.defaultProps = defaultThemeProp;
19
- export const StyledCardHeader = styled.header(({ theme }) => {
20
- return css `
21
- padding: 0;
22
- margin: 0 0 calc(0.5 * ${theme.base.spacing});
23
- `;
24
- });
25
- StyledCardHeader.defaultProps = defaultThemeProp;
26
- export const StyledCardContent = styled.div(() => {
27
- return css `
28
- padding: 0;
29
- `;
30
- });
31
- export const StyledTaskButton = styled.button(({ theme }) => {
32
- return css `
33
- background: ${theme.base.palette['primary-background']};
34
- border: none;
35
- height: ${theme.components.button.height};
36
- overflow: hidden;
37
- text-overflow: ellipsis;
38
- white-space: nowrap;
39
- text-align: start;
40
-
41
- &:hover {
42
- cursor: pointer;
43
- }
44
-
45
- &:focus {
46
- outline: none;
47
- }
48
- `;
49
- });
50
- StyledTaskButton.defaultProps = defaultThemeProp;
51
- export const StyledTask = styled.article(({ hasFocus, theme }) => {
52
- return css `
53
- background: ${theme.base.palette['primary-background']};
54
- border: 0.125rem solid transparent;
55
- border-radius: calc(0.5 * ${theme.base['border-radius']});
56
- padding: calc(${theme.base.spacing} - 0.125rem);
57
-
58
- ${hasFocus &&
59
- css `
60
- box-shadow: ${theme.base.shadow.focus};
61
- `}
62
-
63
- &:hover {
64
- cursor: pointer;
65
- }
66
-
67
- &[aria-current='true'] {
68
- border-color: ${theme.base.palette.interactive};
69
- }
70
- `;
71
- });
72
- StyledTask.defaultProps = defaultThemeProp;
73
- export const StyledWarnIcon = styled(Icon)(({ theme }) => {
74
- return css `
75
- color: ${theme.base.palette.urgent};
76
- margin-inline: ${theme.base.spacing};
77
-
78
- &:hover {
79
- cursor: pointer;
80
- }
81
- `;
82
- });
83
- StyledWarnIcon.defaultProps = defaultThemeProp;
84
- const Task = ({ value, visual, actions, item, addStepTitle, addTask, stageItem, error, onAddStep, onClick, categoryItem, id, step: stepProp, nodeLibrary, ...restProps }) => {
85
- const t = useI18n();
86
- const { selectedItemId, readOnly } = useContext(LifeCycleContext);
87
- const [taskHasFocus, setTaskHasFocus] = useState(false);
88
- const [showLibrary, setLibrary] = useState(false);
89
- const [popoverEl, setPopoverEl] = useElement(null);
90
- const [addEl, setAddEl] = useElement();
91
- const onActionItemClick = (actionId, e) => {
92
- const param = {
93
- task: item,
94
- stage: stageItem,
95
- category: categoryItem
96
- };
97
- actions?.forEach(actionItem => {
98
- if (actionItem.id === actionId) {
99
- actionItem.onClick(param, e);
100
- }
101
- });
102
- };
103
- // Deep copy of actions is required to provide consistent callback objects on actions
104
- const actionsClone = [];
105
- if (actions) {
106
- actions.forEach(actionItem => {
107
- const actionCloneItem = {};
108
- Object.keys(actionItem).forEach((key) => {
109
- actionCloneItem[key] = actionItem[key];
110
- });
111
- actionCloneItem.onClick = onActionItemClick;
112
- actionsClone.push(actionCloneItem);
113
- return actionItem;
114
- });
115
- }
116
- const onTaskClick = (e) => {
117
- const actionParam = {
118
- value,
119
- task: item,
120
- stage: stageItem,
121
- category: categoryItem,
122
- type: 'Task'
123
- };
124
- onClick?.(actionParam, e);
125
- };
126
- const onLibraryItemSelect = useCallback((libItem) => {
127
- const param = {
128
- task: item,
129
- stage: stageItem,
130
- category: categoryItem
131
- };
132
- onAddStep?.(param, libItem);
133
- setLibrary(false);
134
- }, [onAddStep]);
135
- useEscape(() => {
136
- setLibrary(false);
137
- });
138
- useOuterEvent('mousedown', [addEl, popoverEl], () => setLibrary(false));
139
- return (_jsx(StyledTaskList, { ...restProps, id: item.id, children: _jsxs(Flex, { as: StyledTask, "aria-current": selectedItemId === id ? 'true' : undefined, container: { direction: 'column' }, id: `${id}-task`, hasFocus: taskHasFocus && selectedItemId !== id, children: [_jsxs(Flex, { as: StyledCardHeader, container: { inline: true, alignItems: 'center' }, children: [visual?.imgurl.length > 0 && _jsx(Avatar, { name: value, imageSrc: visual?.imgurl }), error && _jsx(StyledWarnIcon, { name: 'warn-solid' }), _jsx(Flex, { item: { grow: 1 }, container: { inline: true, alignItems: 'center' }, onClick: onTaskClick, children: _jsx(StyledTaskButton, { onFocus: () => {
140
- setTaskHasFocus(true);
141
- }, onBlur: () => {
142
- setTaskHasFocus(false);
143
- }, "aria-label": t(error ? 'process_name_error' : 'process_name', [value]), children: value }) }), actionsClone && _jsx(Actions, { items: actionsClone, menuAt: 2, iconOnly: true })] }), _jsxs(StyledCardContent, { children: [item?.steps.map((steps) => {
144
- const badgeStatus = steps?.status?.type ? steps.status.type : '';
145
- const badgeLabel = steps?.status?.label ? steps.status.label : '';
146
- return (_jsx(Step, { id: steps.id, value: steps.label, visual: {
147
- imgurl: steps.visual.imgurl,
148
- color: steps.visual.color,
149
- icon: steps.visual.icon,
150
- title: steps.visual.label
151
- }, item: steps, taskItem: item, stageItem: stageItem, badge: {
152
- type: badgeStatus,
153
- label: badgeLabel
154
- }, error: steps.error, categoryItem: categoryItem, ...stepProp }, steps.id));
155
- }), !readOnly && (_jsxs(_Fragment, { children: [_jsx(Button, { variant: 'simple', ref: setAddEl, label: t('add_noun', [addStepTitle]), onClick: () => setLibrary(prev => !prev), icon: true, children: _jsx(Icon, { name: 'plus' }) }), _jsx(ItemLibrary, { items: nodeLibrary, show: showLibrary, target: addEl, onClick: onLibraryItemSelect, ref: setPopoverEl, placeholder: t('search_nodes') })] }))] })] }) }));
156
- };
157
- export default Task;
158
- //# sourceMappingURL=Task.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Task.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/Task.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EAIR,WAAW,EACX,UAAU,EACX,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,IAAI,EACJ,gBAAgB,EAGhB,MAAM,EACN,IAAI,EAEJ,UAAU,EACV,OAAO,EACP,OAAO,EACP,MAAM,EACN,aAAa,EACb,SAAS,EACV,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAe,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,IAAI,MAAM,QAAQ,CAAC;AAU1B,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAuBlD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACpD,OAAO,GAAG,CAAA;;wBAEY,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;GAKvC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM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AAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EACxC,IAAI,kBAEJ,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,GACb,EACT,KAAC,WAAW,IACV,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,KAAoB,EAC5B,OAAO,EAAE,mBAAmB,EAC5B,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,CAAC,CAAC,cAAc,CAAC,GAC9B,IACD,CACJ,IACiB,IACf,GACQ,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import {\n useState,\n FunctionComponent,\n PropsWithChildren,\n MouseEvent,\n useCallback,\n useContext\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Flex,\n defaultThemeProp,\n BaseProps,\n ForwardProps,\n Button,\n Icon,\n Action,\n useElement,\n Actions,\n useI18n,\n Avatar,\n useOuterEvent,\n useEscape\n} from '@pega/cosmos-react-core';\n\nimport { LibraryItem, ItemLibrary } from '../ItemLibrary';\n\nimport Step from './Step';\nimport {\n TaskItemProps,\n StageItemProps,\n StepItemProps,\n CategoryItemProps,\n LifeCycleActionParam,\n StepProps,\n TaskProps\n} from './LifeCycle.types';\nimport LifeCycleContext from './LifeCycleContext';\n\ninterface TaskComponentProps extends BaseProps, TaskProps {\n /** Pass text for the task. */\n value: string;\n /** support for an Avatar, Icon, or other supporting visual. */\n visual: {\n imgurl: string;\n };\n /** Pass task data */\n item: TaskItemProps;\n /** The status is used to show the input error status and the info on tooltip in case of error */\n error?: string;\n /** Step Props */\n step?: StepProps;\n /** Stage data to pass it as callback */\n stageItem: StageItemProps;\n /** Category data to pass it as callback */\n categoryItem: CategoryItemProps;\n /** unique id of task */\n id: string;\n}\n\nexport const StyledTaskList = styled.li(({ theme }) => {\n return css`\n list-style-type: none;\n margin-block-end: ${theme.base.spacing};\n\n &:last-child > article {\n margin-block-end: 0;\n }\n `;\n});\n\nStyledTaskList.defaultProps = defaultThemeProp;\n\nexport const StyledCardHeader = styled.header(({ theme }) => {\n return css`\n padding: 0;\n margin: 0 0 calc(0.5 * ${theme.base.spacing});\n `;\n});\n\nStyledCardHeader.defaultProps = defaultThemeProp;\n\nexport const StyledCardContent = styled.div(() => {\n return css`\n padding: 0;\n `;\n});\n\nexport const StyledTaskButton = styled.button(({ theme }) => {\n return css`\n background: ${theme.base.palette['primary-background']};\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\n &:hover {\n cursor: pointer;\n }\n\n &:focus {\n outline: none;\n }\n `;\n});\n\nStyledTaskButton.defaultProps = defaultThemeProp;\n\nexport const StyledTask = styled.article<{ hasFocus: boolean }>(({ hasFocus, theme }) => {\n return css`\n background: ${theme.base.palette['primary-background']};\n border: 0.125rem solid transparent;\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n padding: calc(${theme.base.spacing} - 0.125rem);\n\n ${hasFocus &&\n css`\n box-shadow: ${theme.base.shadow.focus};\n `}\n\n &:hover {\n cursor: pointer;\n }\n\n &[aria-current='true'] {\n border-color: ${theme.base.palette.interactive};\n }\n `;\n});\n\nStyledTask.defaultProps = defaultThemeProp;\n\nexport const StyledWarnIcon = styled(Icon)(({ theme }) => {\n return css`\n color: ${theme.base.palette.urgent};\n margin-inline: ${theme.base.spacing};\n\n &:hover {\n cursor: pointer;\n }\n `;\n});\n\nStyledWarnIcon.defaultProps = defaultThemeProp;\n\nconst Task: FunctionComponent<TaskComponentProps & ForwardProps> = ({\n value,\n visual,\n actions,\n item,\n addStepTitle,\n addTask,\n stageItem,\n error,\n onAddStep,\n onClick,\n categoryItem,\n id,\n step: stepProp,\n nodeLibrary,\n ...restProps\n}: PropsWithChildren<TaskComponentProps>) => {\n const t = useI18n();\n const { selectedItemId, readOnly } = useContext(LifeCycleContext);\n const [taskHasFocus, setTaskHasFocus] = useState(false);\n const [showLibrary, setLibrary] = useState(false);\n const [popoverEl, setPopoverEl] = useElement<HTMLElement>(null);\n const [addEl, setAddEl] = useElement();\n\n const onActionItemClick = (\n actionId: string,\n e: MouseEvent<HTMLInputElement | HTMLAnchorElement | HTMLButtonElement>\n ) => {\n const param: LifeCycleActionParam = {\n task: item,\n stage: stageItem,\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 onTaskClick = (e: MouseEvent) => {\n const actionParam: LifeCycleActionParam = {\n value,\n task: item,\n stage: stageItem,\n category: categoryItem,\n type: 'Task'\n };\n onClick?.(actionParam, e);\n };\n\n const onLibraryItemSelect = useCallback(\n (libItem: LibraryItem) => {\n const param: LifeCycleActionParam = {\n task: item,\n stage: stageItem,\n category: categoryItem\n };\n onAddStep?.(param, libItem);\n setLibrary(false);\n },\n [onAddStep]\n );\n\n useEscape(() => {\n setLibrary(false);\n });\n\n useOuterEvent('mousedown', [addEl, popoverEl], () => setLibrary(false));\n\n return (\n <StyledTaskList {...restProps} id={item.id}>\n <Flex\n as={StyledTask}\n aria-current={selectedItemId === id ? 'true' : undefined}\n container={{ direction: 'column' }}\n id={`${id}-task`}\n hasFocus={taskHasFocus && selectedItemId !== id}\n >\n <Flex as={StyledCardHeader} container={{ inline: true, alignItems: 'center' }}>\n {visual?.imgurl.length > 0 && <Avatar name={value} imageSrc={visual?.imgurl} />}\n {error && <StyledWarnIcon name='warn-solid' />}\n <Flex\n item={{ grow: 1 }}\n container={{ inline: true, alignItems: 'center' }}\n onClick={onTaskClick}\n >\n <StyledTaskButton\n onFocus={() => {\n setTaskHasFocus(true);\n }}\n onBlur={() => {\n setTaskHasFocus(false);\n }}\n aria-label={t(error ? 'process_name_error' : 'process_name', [value])}\n >\n {value}\n </StyledTaskButton>\n </Flex>\n {actionsClone && <Actions items={actionsClone} menuAt={2} iconOnly />}\n </Flex>\n <StyledCardContent>\n {item?.steps.map((steps: StepItemProps) => {\n const badgeStatus = steps?.status?.type ? steps.status.type : '';\n const badgeLabel = steps?.status?.label ? steps.status.label : '';\n return (\n <Step\n key={steps.id}\n id={steps.id}\n value={steps.label}\n visual={{\n imgurl: steps.visual.imgurl,\n color: steps.visual.color,\n icon: steps.visual.icon,\n title: steps.visual.label\n }}\n item={steps}\n taskItem={item}\n stageItem={stageItem}\n badge={{\n type: badgeStatus,\n label: badgeLabel\n }}\n error={steps.error}\n categoryItem={categoryItem}\n {...stepProp}\n />\n );\n })}\n {!readOnly && (\n <>\n <Button\n variant='simple'\n ref={setAddEl}\n label={t('add_noun', [addStepTitle])}\n onClick={() => setLibrary(prev => !prev)}\n icon\n >\n <Icon name='plus' />\n </Button>\n <ItemLibrary\n items={nodeLibrary}\n show={showLibrary}\n target={addEl as HTMLElement}\n onClick={onLibraryItemSelect}\n ref={setPopoverEl}\n placeholder={t('search_nodes')}\n />\n </>\n )}\n </StyledCardContent>\n </Flex>\n </StyledTaskList>\n );\n};\n\nexport default Task;\n"]}
@@ -1,3 +0,0 @@
1
- export { default } from './LifeCycle';
2
- export type { StepItemProps, TaskItemProps, StageItemProps, CategoryItemProps, CategoriesItemProps, LifeCycleActionParam, LifeCycleAction, LifeCycleProps } from './LifeCycle.types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/LifeCycle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,YAAY,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,cAAc,EACf,MAAM,mBAAmB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default } from './LifeCycle';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/LifeCycle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { default } from './LifeCycle';\nexport type {\n StepItemProps,\n TaskItemProps,\n StageItemProps,\n CategoryItemProps,\n CategoriesItemProps,\n LifeCycleActionParam,\n LifeCycleAction,\n LifeCycleProps\n} from './LifeCycle.types';\n"]}
@@ -1,8 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { MobileBuildSummaryProps } from './MobileBuildSummary.types';
4
- export declare const StyledInteractionTimerIconWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
5
- export declare const StyledContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
- declare const MobileBuildSummary: FunctionComponent<MobileBuildSummaryProps & ForwardProps>;
7
- export default MobileBuildSummary;
8
- //# sourceMappingURL=MobileBuildSummary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MobileBuildSummary.d.ts","sourceRoot":"","sources":["../../../src/components/MobileBuildSummary/MobileBuildSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA+B,MAAM,OAAO,CAAC;AAGvE,OAAO,EAUL,YAAY,EAUb,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAIrE,eAAO,MAAM,iCAAiC,0GAG7C,CAAC;AAIF,eAAO,MAAM,aAAa,yGAEzB,CAAC;AAIF,QAAA,MAAM,kBAAkB,EAAE,iBAAiB,CAAC,uBAAuB,GAAG,YAAY,CAkGjF,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,33 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
3
- import styled from 'styled-components';
4
- import { Button, Card, CardContent, CardHeader, defaultThemeProp, EmptyState, FieldValueList, Flex, formatNumber, Icon, Link, Progress, QRCode, registerIcon, Text, useConfiguration, useI18n, useUID } from '@pega/cosmos-react-core';
5
- import * as osAndroid from '@pega/cosmos-react-core/lib/components/Icon/icons/os-android.icon';
6
- import * as osApple from '@pega/cosmos-react-core/lib/components/Icon/icons/os-apple.icon';
7
- registerIcon(osAndroid, osApple);
8
- export const StyledInteractionTimerIconWrapper = styled.span `
9
- position: relative;
10
- min-height: 4rem;
11
- `;
12
- StyledInteractionTimerIconWrapper.defaultProps = defaultThemeProp;
13
- export const StyledContent = styled.div `
14
- min-height: 10rem;
15
- `;
16
- StyledContent.defaultProps = defaultThemeProp;
17
- const MobileBuildSummary = forwardRef(function MobileBuildSummary({ type, progress = undefined, onBuild, buildSummary, ...restProps }, ref) {
18
- const progressId = useUID();
19
- const { locale } = useConfiguration();
20
- const t = useI18n();
21
- return (_jsxs(Card, { ...restProps, ref: ref, children: [_jsxs(CardHeader, { container: { alignItems: 'center', itemGap: 1 }, children: [_jsx(Icon, { name: type === 'android' ? 'os-android' : 'os-apple' }), _jsx(Text, { variant: 'h3', children: type === 'android' ? 'Android' : 'iOS' })] }), _jsx(CardContent, { children: _jsxs(_Fragment, { children: [progress === undefined && !buildSummary && (_jsxs(Flex, { container: { alignItems: 'center', gap: 1, direction: 'column', justify: 'center' }, as: StyledContent, children: [_jsx(EmptyState, { message: t('no_app_build') }), onBuild && (_jsx(Button, { variant: 'secondary', onClick: onBuild, children: t('build_app') }))] })), progress !== undefined && (_jsxs(Flex, { container: { alignItems: 'center', gap: 1, direction: 'column', justify: 'center' }, as: StyledContent, children: [_jsx(StyledInteractionTimerIconWrapper, { children: _jsx(Progress, { "aria-describedby": progressId, variant: 'ring', placement: 'local', message: formatNumber(progress / 100, {
22
- locale,
23
- options: { style: 'percent' }
24
- }), value: progress, minValue: 0, maxValue: 100 }) }), _jsx(Text, { variant: 'secondary', id: progressId, children: t('build_in_progress') })] })), buildSummary && !progress && (_jsxs(Flex, { container: { wrap: 'wrap', gap: 2 }, as: StyledContent, children: [_jsx(Flex, { container: {
25
- direction: 'column',
26
- alignItems: 'center',
27
- justify: 'center',
28
- gap: 1,
29
- pad: 2
30
- }, children: _jsx(QRCode, { value: buildSummary.qrCodeUrl ?? buildSummary.downloadUrl }) }), _jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(FieldValueList, { variant: 'inline', fields: buildSummary.summaryFields }), _jsxs(Flex, { container: { wrap: 'wrap', rowGap: 1 }, children: [onBuild && (_jsx(Button, { variant: 'secondary', onClick: onBuild, children: t('rebuild_app') })), _jsx(Link, { href: buildSummary.downloadUrl, variant: 'secondary', onClick: buildSummary.onDownload, children: t('download_app') })] })] })] }))] }) })] }));
31
- });
32
- export default MobileBuildSummary;
33
- //# sourceMappingURL=MobileBuildSummary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MobileBuildSummary.js","sourceRoot":"","sources":["../../../src/components/MobileBuildSummary/MobileBuildSummary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,UAAU,EAAmB,MAAM,OAAO,CAAC;AACvE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,IAAI,EACJ,YAAY,EAEZ,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,OAAO,EACP,MAAM,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,SAAS,MAAM,mEAAmE,CAAC;AAC/F,OAAO,KAAK,OAAO,MAAM,iEAAiE,CAAC;AAI3F,YAAY,CAAC,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IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC9C,KAAC,cAAc,IAAC,OAAO,EAAC,QAAQ,EAAC,MAAM,EAAE,YAAY,CAAC,aAAa,GAAI,EACvE,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,aACzC,OAAO,IAAI,CACV,KAAC,MAAM,IAAC,OAAO,EAAC,WAAW,EAAC,OAAO,EAAE,OAAO,YACzC,CAAC,CAAC,aAAa,CAAC,GACV,CACV,EAED,KAAC,IAAI,IACH,IAAI,EAAE,YAAY,CAAC,WAAW,EAC9B,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,YAAY,CAAC,UAAU,YAE/B,CAAC,CAAC,cAAc,CAAC,GACb,IACF,IACF,IACF,CACR,IACA,GACS,IACT,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { FunctionComponent, forwardRef, PropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Button,\n Card,\n CardContent,\n CardHeader,\n defaultThemeProp,\n EmptyState,\n FieldValueList,\n Flex,\n formatNumber,\n ForwardProps,\n Icon,\n Link,\n Progress,\n QRCode,\n registerIcon,\n Text,\n useConfiguration,\n useI18n,\n useUID\n} from '@pega/cosmos-react-core';\nimport * as osAndroid from '@pega/cosmos-react-core/lib/components/Icon/icons/os-android.icon';\nimport * as osApple from '@pega/cosmos-react-core/lib/components/Icon/icons/os-apple.icon';\n\nimport { MobileBuildSummaryProps } from './MobileBuildSummary.types';\n\nregisterIcon(osAndroid, osApple);\n\nexport const StyledInteractionTimerIconWrapper = styled.span`\n position: relative;\n min-height: 4rem;\n`;\n\nStyledInteractionTimerIconWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledContent = styled.div`\n min-height: 10rem;\n`;\n\nStyledContent.defaultProps = defaultThemeProp;\n\nconst MobileBuildSummary: FunctionComponent<MobileBuildSummaryProps & ForwardProps> = forwardRef(\n function MobileBuildSummary(\n {\n type,\n progress = undefined,\n onBuild,\n buildSummary,\n ...restProps\n }: PropsWithoutRef<MobileBuildSummaryProps>,\n ref: MobileBuildSummaryProps['ref']\n ) {\n const progressId = useUID();\n const { locale } = useConfiguration();\n const t = useI18n();\n\n return (\n <Card {...restProps} ref={ref}>\n <CardHeader container={{ alignItems: 'center', itemGap: 1 }}>\n <Icon name={type === 'android' ? 'os-android' : 'os-apple'} />\n <Text variant='h3'>{type === 'android' ? 'Android' : 'iOS'}</Text>\n </CardHeader>\n <CardContent>\n <>\n {progress === undefined && !buildSummary && (\n <Flex\n container={{ alignItems: 'center', gap: 1, direction: 'column', justify: 'center' }}\n as={StyledContent}\n >\n <EmptyState message={t('no_app_build')} />\n {onBuild && (\n <Button variant='secondary' onClick={onBuild}>\n {t('build_app')}\n </Button>\n )}\n </Flex>\n )}\n {progress !== undefined && (\n <Flex\n container={{ alignItems: 'center', gap: 1, direction: 'column', justify: 'center' }}\n as={StyledContent}\n >\n <StyledInteractionTimerIconWrapper>\n <Progress\n aria-describedby={progressId}\n variant='ring'\n placement='local'\n message={formatNumber(progress / 100, {\n locale,\n options: { style: 'percent' }\n })}\n value={progress}\n minValue={0}\n maxValue={100}\n />\n </StyledInteractionTimerIconWrapper>\n <Text variant='secondary' id={progressId}>\n {t('build_in_progress')}\n </Text>\n </Flex>\n )}\n {buildSummary && !progress && (\n <Flex container={{ wrap: 'wrap', gap: 2 }} as={StyledContent}>\n <Flex\n container={{\n direction: 'column',\n alignItems: 'center',\n justify: 'center',\n gap: 1,\n pad: 2\n }}\n >\n <QRCode value={buildSummary.qrCodeUrl ?? buildSummary.downloadUrl} />\n </Flex>\n <Flex container={{ direction: 'column', gap: 2 }}>\n <FieldValueList variant='inline' fields={buildSummary.summaryFields} />\n <Flex container={{ wrap: 'wrap', rowGap: 1 }}>\n {onBuild && (\n <Button variant='secondary' onClick={onBuild}>\n {t('rebuild_app')}\n </Button>\n )}\n\n <Link\n href={buildSummary.downloadUrl}\n variant='secondary'\n onClick={buildSummary.onDownload}\n >\n {t('download_app')}\n </Link>\n </Flex>\n </Flex>\n </Flex>\n )}\n </>\n </CardContent>\n </Card>\n );\n }\n);\n\nexport default MobileBuildSummary;\n"]}
@@ -1,31 +0,0 @@
1
- import { Ref, MouseEventHandler } from 'react';
2
- import { BaseProps, FieldValueListItemProps } from '@pega/cosmos-react-core';
3
- export interface AppBuildProps {
4
- /** URL to the application resource. */
5
- downloadUrl: string;
6
- /** QR code url. */
7
- qrCodeUrl?: string;
8
- /** Click handler for the download link. */
9
- onDownload?: MouseEventHandler<HTMLAnchorElement>;
10
- /** The set of field values to render in the list. */
11
- summaryFields: FieldValueListItemProps[];
12
- }
13
- export interface MobileBuildSummaryProps extends BaseProps {
14
- /** Determines which platform type should be rendered. */
15
- type: 'android' | 'ios';
16
- /**
17
- * Progress state is visible with current progress, if provided.
18
- * Value within the range of 0-100 should be passed.
19
- */
20
- progress?: number;
21
- /**
22
- * Callback when build or rebuild application button is clicked.
23
- * If not passed, button will be not displayed.
24
- */
25
- onBuild?: () => void;
26
- /** The build summary fields to display. */
27
- buildSummary?: AppBuildProps;
28
- /** Ref to the element. */
29
- ref?: Ref<HTMLDivElement>;
30
- }
31
- //# sourceMappingURL=MobileBuildSummary.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MobileBuildSummary.types.d.ts","sourceRoot":"","sources":["../../../src/components/MobileBuildSummary/MobileBuildSummary.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAE7E,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAClD,qDAAqD;IACrD,aAAa,EAAE,uBAAuB,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,yDAAyD;IACzD,IAAI,EAAE,SAAS,GAAG,KAAK,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,0BAA0B;IAC1B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=MobileBuildSummary.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MobileBuildSummary.types.js","sourceRoot":"","sources":["../../../src/components/MobileBuildSummary/MobileBuildSummary.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Ref, MouseEventHandler } from 'react';\n\nimport { BaseProps, FieldValueListItemProps } from '@pega/cosmos-react-core';\n\nexport interface AppBuildProps {\n /** URL to the application resource. */\n downloadUrl: string;\n /** QR code url. */\n qrCodeUrl?: string;\n /** Click handler for the download link. */\n onDownload?: MouseEventHandler<HTMLAnchorElement>;\n /** The set of field values to render in the list. */\n summaryFields: FieldValueListItemProps[];\n}\n\nexport interface MobileBuildSummaryProps extends BaseProps {\n /** Determines which platform type should be rendered. */\n type: 'android' | 'ios';\n /**\n * Progress state is visible with current progress, if provided.\n * Value within the range of 0-100 should be passed.\n */\n progress?: number;\n /**\n * Callback when build or rebuild application button is clicked.\n * If not passed, button will be not displayed.\n */\n onBuild?: () => void;\n /** The build summary fields to display. */\n buildSummary?: AppBuildProps;\n /** Ref to the element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -1,3 +0,0 @@
1
- export { default as MobileBuildSummary } from './MobileBuildSummary';
2
- export type { AppBuildProps, MobileBuildSummaryProps } from './MobileBuildSummary.types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MobileBuildSummary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,YAAY,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default as MobileBuildSummary } from './MobileBuildSummary';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MobileBuildSummary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export { default as MobileBuildSummary } from './MobileBuildSummary';\nexport type { AppBuildProps, MobileBuildSummaryProps } from './MobileBuildSummary.types';\n"]}
@@ -1,16 +0,0 @@
1
- import { FC, PropsWithoutRef, ReactNode, Ref } from 'react';
2
- import { Action, ActionsProps, ForwardProps, OmitStrict, DrawerProps } from '@pega/cosmos-react-core';
3
- import { PageHeaderProps } from '../PageTemplates/PageTemplates';
4
- export interface ObjectPreviewProps extends Pick<DrawerProps, 'onAfterOpen' | 'onAfterClose' | 'onBeforeOpen' | 'onBeforeClose'> {
5
- open?: boolean;
6
- header: OmitStrict<PageHeaderProps, 'status'>;
7
- primaryAction?: Pick<Action, 'text' | 'onClick' | 'disabled'>;
8
- secondaryAction?: Pick<Action, 'text' | 'onClick' | 'disabled'>;
9
- additionalActions?: ActionsProps;
10
- content: ReactNode;
11
- onDismiss: () => void;
12
- ref?: Ref<HTMLDivElement>;
13
- }
14
- declare const ObjectPreview: FC<PropsWithoutRef<ObjectPreviewProps> & ForwardProps>;
15
- export default ObjectPreview;
16
- //# sourceMappingURL=ObjectPreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ObjectPreview.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectPreview/ObjectPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EAEF,eAAe,EACf,SAAS,EACT,GAAG,EAIJ,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,MAAM,EAEN,YAAY,EAGZ,YAAY,EAGZ,UAAU,EAIV,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAA0B,MAAM,gCAAgC,CAAC;AAEzF,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,aAAa,GAAG,cAAc,GAAG,cAAc,GAAG,eAAe,CAAC;IAC5F,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,UAAU,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC9C,aAAa,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;IAC9D,eAAe,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;IAChE,iBAAiB,CAAC,EAAE,YAAY,CAAC;IACjC,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAuDD,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,eAAe,CAAC,kBAAkB,CAAC,GAAG,YAAY,CAyCzE,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,25 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useRef, useEffect } from 'react';
3
- import styled from 'styled-components';
4
- import { Actions, Button, Flex, Icon, OneColumnPage, Drawer, useI18n, useConsolidatedRef } from '@pega/cosmos-react-core';
5
- import { PageHeader, StyledPage } from '../PageTemplates/PageTemplates';
6
- const StyledObjectPreview = styled(Drawer) `
7
- height: calc(100vh - 3rem);
8
- top: 3rem;
9
- `;
10
- const PreviewHeader = ({ header, primaryAction, secondaryAction, additionalActions, onDismiss, dismissButtonRef }) => {
11
- const t = useI18n();
12
- return (_jsxs(Flex, { container: { direction: 'column', rowGap: 1 }, children: [_jsxs(Flex, { container: { justify: 'between' }, children: [_jsx(Button, { icon: true, variant: 'simple', ref: dismissButtonRef, label: t('dismiss_label_a11y'), onClick: onDismiss, children: _jsx(Icon, { name: 'times' }) }), _jsxs(Flex, { container: true, children: [secondaryAction && (_jsx(Button, { onClick: secondaryAction.onClick, disabled: secondaryAction.disabled, children: secondaryAction.text })), primaryAction && (_jsx(Button, { variant: 'primary', onClick: primaryAction.onClick, disabled: primaryAction.disabled, children: primaryAction.text })), additionalActions && _jsx(Actions, { ...additionalActions })] })] }), _jsx(PageHeader, { ...header, titleTag: 'h2' })] }));
13
- };
14
- const ObjectPreview = forwardRef(function ObjectPreview({ content, header, open, onAfterOpen, onAfterClose, onBeforeOpen, onBeforeClose, ...restprops }, ref) {
15
- const contentRef = useConsolidatedRef(ref);
16
- const dismissButtonRef = useRef(null);
17
- useEffect(() => {
18
- if (open && contentRef.current) {
19
- contentRef.current?.querySelector('button')?.focus();
20
- }
21
- }, [open]);
22
- return (_jsx(StyledObjectPreview, { ref: contentRef, open: !!open, nullWhenClosed: true, position: 'fixed', size: '30%', shadow: true, placement: 'right', onAfterOpen: onAfterOpen, onAfterClose: onAfterClose, onBeforeOpen: onBeforeOpen, onBeforeClose: onBeforeClose, children: _jsx(OneColumnPage, { ref: contentRef, title: header.title, as: StyledPage, header: _jsx(PreviewHeader, { dismissButtonRef: dismissButtonRef, header: header, ...restprops }), scrollContent: true, a: content }) }));
23
- });
24
- export default ObjectPreview;
25
- //# sourceMappingURL=ObjectPreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ObjectPreview.js","sourceRoot":"","sources":["../../../src/components/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,CAAC,EAAE,OAAO,GACV,GACkB,CACvB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import {\n FC,\n forwardRef,\n PropsWithoutRef,\n ReactNode,\n Ref,\n useRef,\n useEffect,\n RefObject\n} from 'react';\nimport styled from 'styled-components';\n\nimport {\n Action,\n Actions,\n ActionsProps,\n Button,\n Flex,\n ForwardProps,\n Icon,\n OneColumnPage,\n OmitStrict,\n Drawer,\n useI18n,\n useConsolidatedRef,\n DrawerProps\n} from '@pega/cosmos-react-core';\n\nimport { PageHeaderProps, PageHeader, StyledPage } from '../PageTemplates/PageTemplates';\n\nexport interface ObjectPreviewProps\n extends Pick<DrawerProps, 'onAfterOpen' | 'onAfterClose' | 'onBeforeOpen' | 'onBeforeClose'> {\n open?: boolean;\n header: OmitStrict<PageHeaderProps, 'status'>;\n primaryAction?: Pick<Action, 'text' | 'onClick' | 'disabled'>;\n secondaryAction?: Pick<Action, 'text' | 'onClick' | 'disabled'>;\n additionalActions?: ActionsProps;\n content: ReactNode;\n onDismiss: () => void;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledObjectPreview = styled(Drawer)`\n height: calc(100vh - 3rem);\n top: 3rem;\n`;\n\nconst PreviewHeader: FC<\n OmitStrict<ObjectPreviewProps, 'ref' | 'content' | 'open'> & {\n dismissButtonRef: RefObject<HTMLButtonElement>;\n }\n> = ({\n header,\n primaryAction,\n secondaryAction,\n additionalActions,\n onDismiss,\n dismissButtonRef\n}) => {\n const t = useI18n();\n return (\n <Flex container={{ direction: 'column', rowGap: 1 }}>\n <Flex container={{ justify: 'between' }}>\n <Button\n icon\n variant='simple'\n ref={dismissButtonRef}\n label={t('dismiss_label_a11y')}\n onClick={onDismiss}\n >\n <Icon name='times' />\n </Button>\n <Flex container>\n {secondaryAction && (\n <Button onClick={secondaryAction.onClick} disabled={secondaryAction.disabled}>\n {secondaryAction.text}\n </Button>\n )}\n {primaryAction && (\n <Button\n variant='primary'\n onClick={primaryAction.onClick}\n disabled={primaryAction.disabled}\n >\n {primaryAction.text}\n </Button>\n )}\n {additionalActions && <Actions {...additionalActions} />}\n </Flex>\n </Flex>\n <PageHeader {...header} titleTag='h2' />\n </Flex>\n );\n};\n\nconst ObjectPreview: FC<PropsWithoutRef<ObjectPreviewProps> & ForwardProps> = forwardRef(\n function ObjectPreview(\n { content, header, open, onAfterOpen, onAfterClose, onBeforeOpen, onBeforeClose, ...restprops },\n ref: ObjectPreviewProps['ref']\n ) {\n const contentRef = useConsolidatedRef<HTMLDivElement>(ref);\n const dismissButtonRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (open && contentRef.current) {\n contentRef.current?.querySelector('button')?.focus();\n }\n }, [open]);\n\n return (\n <StyledObjectPreview\n ref={contentRef}\n open={!!open}\n nullWhenClosed\n position='fixed'\n size='30%'\n shadow\n placement='right'\n onAfterOpen={onAfterOpen}\n onAfterClose={onAfterClose}\n onBeforeOpen={onBeforeOpen}\n onBeforeClose={onBeforeClose}\n >\n <OneColumnPage\n ref={contentRef}\n title={header.title}\n as={StyledPage}\n header={\n <PreviewHeader dismissButtonRef={dismissButtonRef} header={header} {...restprops} />\n }\n scrollContent\n a={content}\n />\n </StyledObjectPreview>\n );\n }\n);\n\nexport default ObjectPreview;\n"]}
@@ -1,3 +0,0 @@
1
- export { default as ObjectPreview } from './ObjectPreview';
2
- export * from './ObjectPreview';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectPreview/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,cAAc,iBAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- export { default as ObjectPreview } from './ObjectPreview';
2
- export * from './ObjectPreview';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ObjectPreview/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,cAAc,iBAAiB,CAAC","sourcesContent":["export { default as ObjectPreview } from './ObjectPreview';\nexport * from './ObjectPreview';\n"]}
@@ -1,15 +0,0 @@
1
- import { FunctionComponent, MouseEventHandler } from 'react';
2
- import { BaseProps, MenuProps, MenuItemProps, ComboBoxProps, NoChildrenProp, ButtonProps } from '@pega/cosmos-react-core';
3
- export interface ObjectPickerProps extends BaseProps, NoChildrenProp, Pick<ComboBoxProps, 'id' | 'label' | 'labelHidden' | 'required' | 'disabled' | 'readOnly' | 'name' | 'status' | 'info' | 'placeholder'> {
4
- items: MenuProps['items'];
5
- loading: MenuProps['loading'];
6
- onSelect: MenuItemProps['onClick'];
7
- createProps?: {
8
- onClick?: MouseEventHandler<HTMLButtonElement>;
9
- href?: ButtonProps['href'];
10
- };
11
- ref?: ComboBoxProps['ref'];
12
- }
13
- declare const ObjectPicker: FunctionComponent<ObjectPickerProps>;
14
- export default ObjectPicker;
15
- //# sourceMappingURL=ObjectPicker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ObjectPicker.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectSelect/ObjectPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,SAAS,EAGT,SAAS,EACT,aAAa,EAEb,aAAa,EACb,cAAc,EAMd,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AAMjC,MAAM,WAAW,iBACf,SAAQ,SAAS,EACf,cAAc,EACd,IAAI,CACF,aAAa,EACX,IAAI,GACJ,OAAO,GACP,aAAa,GACb,UAAU,GACV,UAAU,GACV,UAAU,GACV,MAAM,GACN,QAAQ,GACR,MAAM,GACN,aAAa,CAChB;IACH,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC1B,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC9B,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;IAC7F,GAAG,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;CAC5B;AAED,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA8DrD,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -1,40 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useState, useMemo } from 'react';
3
- import { ComboBox, menuHelpers, createStringMatcher, Flex, Button, Icon, useI18n, useConsolidatedRef, registerIcon } from '@pega/cosmos-react-core';
4
- import * as openIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/open.icon';
5
- import * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';
6
- registerIcon(openIcon, plusIcon);
7
- const ObjectPicker = forwardRef(function ObjectPicker({ items, onSelect, createProps, loading, ...restProps }, ref) {
8
- const [filterValue, setFilterValue] = useState('');
9
- const filterRegex = filterValue ? createStringMatcher(filterValue) : undefined;
10
- const t = useI18n();
11
- const comboboxRef = useConsolidatedRef(ref);
12
- const itemsToRender = useMemo(() => {
13
- const newItems = filterValue
14
- ? menuHelpers.flatten(items).filter(({ primary }) => {
15
- return filterRegex?.test(primary);
16
- })
17
- : items;
18
- return menuHelpers.mapTree(newItems, item => ({
19
- ...item,
20
- selected: item.items ? undefined : !!item.selected
21
- }));
22
- }, [filterValue, items]);
23
- return (_jsx(ComboBox, { ...restProps, ref: comboboxRef, mode: 'single-select', value: filterValue, onChange: (e) => setFilterValue(e.target.value), onBlur: () => setFilterValue(''), menu: {
24
- items: itemsToRender,
25
- onItemClick: onSelect,
26
- accent: filterRegex,
27
- loading,
28
- footer: createProps ? (_jsx(Flex, { container: { justify: 'start' }, children: _jsxs(Button, { type: 'button', variant: 'simple', onClick: createProps.onClick, ...(createProps.href && {
29
- href: createProps.href,
30
- target: '_blank',
31
- 'aria-label': t('create_in_new_tab')
32
- }), children: [_jsx(Icon, { name: 'plus' }), t('create_new'), createProps.href && _jsx(Icon, { name: 'open' })] }) })) : undefined
33
- }, onKeyDown: e => {
34
- if (e.key === 'Tab') {
35
- return false;
36
- }
37
- } }));
38
- });
39
- export default ObjectPicker;
40
- //# sourceMappingURL=ObjectPicker.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ObjectPicker.js","sourceRoot":"","sources":["../../../src/components/ObjectSelect/ObjectPicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,OAAO,EAIR,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,QAAQ,EACR,WAAW,EAGX,mBAAmB,EAGnB,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,OAAO,EACP,kBAAkB,EAElB,YAAY,EACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AACxF,OAAO,KAAK,QAAQ,MAAM,6DAA6D,CAAC;AAExF,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAyBjC,MAAM,YAAY,GAAyC,UAAU,CAAC,SAAS,YAAY,CACzF,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,EACvD,GAA6B;IAE7B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE/E,MAAM,CAAC,GAAG,OAAO,EAAE,CA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,KACxB,CAAC,WAAW,CAAC,IAAI,IAAI;wBACvB,IAAI,EAAE,WAAW,CAAC,IAAI;wBACtB,MAAM,EAAE,QAAQ;wBAChB,YAAY,EAAE,CAAC,CAAC,mBAAmB,CAAC;qBACrC,CAAC,aAEF,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,EACnB,CAAC,CAAC,YAAY,CAAC,EACf,WAAW,CAAC,IAAI,IAAI,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,IAClC,GACJ,CACR,CAAC,CAAC,CAAC,SAAS;SACd,EACD,SAAS,EAAE,CAAC,CAAC,EAAE;YACb,IAAI,CAAC,CAAC,GAAG,KAAK,KAAK,EAAE;gBACnB,OAAO,KAAK,CAAC;aACd;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC","sourcesContent":["import {\n forwardRef,\n useState,\n useMemo,\n ChangeEvent,\n FunctionComponent,\n MouseEventHandler\n} from 'react';\n\nimport {\n BaseProps,\n ComboBox,\n menuHelpers,\n MenuProps,\n MenuItemProps,\n createStringMatcher,\n ComboBoxProps,\n NoChildrenProp,\n Flex,\n Button,\n Icon,\n useI18n,\n useConsolidatedRef,\n ButtonProps,\n registerIcon\n} from '@pega/cosmos-react-core';\nimport * as openIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/open.icon';\nimport * as plusIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/plus.icon';\n\nregisterIcon(openIcon, plusIcon);\n\nexport interface ObjectPickerProps\n extends BaseProps,\n NoChildrenProp,\n Pick<\n ComboBoxProps,\n | 'id'\n | 'label'\n | 'labelHidden'\n | 'required'\n | 'disabled'\n | 'readOnly'\n | 'name'\n | 'status'\n | 'info'\n | 'placeholder'\n > {\n items: MenuProps['items'];\n loading: MenuProps['loading'];\n onSelect: MenuItemProps['onClick'];\n createProps?: { onClick?: MouseEventHandler<HTMLButtonElement>; href?: ButtonProps['href'] };\n ref?: ComboBoxProps['ref'];\n}\n\nconst ObjectPicker: FunctionComponent<ObjectPickerProps> = forwardRef(function ObjectPicker(\n { items, onSelect, createProps, loading, ...restProps },\n ref: ObjectPickerProps['ref']\n) {\n const [filterValue, setFilterValue] = useState('');\n const filterRegex = filterValue ? createStringMatcher(filterValue) : undefined;\n\n const t = useI18n();\n const comboboxRef = useConsolidatedRef(ref);\n\n const itemsToRender = useMemo(() => {\n const newItems = filterValue\n ? menuHelpers.flatten(items).filter(({ primary }: MenuItemProps) => {\n return filterRegex?.test(primary);\n })\n : items;\n\n return menuHelpers.mapTree(newItems, item => ({\n ...item,\n selected: item.items ? undefined : !!item.selected\n }));\n }, [filterValue, items]);\n\n return (\n <ComboBox\n {...restProps}\n ref={comboboxRef}\n mode='single-select'\n value={filterValue}\n onChange={(e: ChangeEvent<HTMLInputElement>) => setFilterValue(e.target.value)}\n onBlur={() => setFilterValue('')}\n menu={{\n items: itemsToRender,\n onItemClick: onSelect,\n accent: filterRegex,\n loading,\n footer: createProps ? (\n <Flex container={{ justify: 'start' }}>\n <Button\n type='button'\n variant='simple'\n onClick={createProps.onClick}\n {...(createProps.href && {\n href: createProps.href,\n target: '_blank',\n 'aria-label': t('create_in_new_tab')\n })}\n >\n <Icon name='plus' />\n {t('create_new')}\n {createProps.href && <Icon name='open' />}\n </Button>\n </Flex>\n ) : undefined\n }}\n onKeyDown={e => {\n if (e.key === 'Tab') {\n return false;\n }\n }}\n />\n );\n});\n\nexport default ObjectPicker;\n"]}
@@ -1,32 +0,0 @@
1
- import { Ref } from 'react';
2
- import { BaseProps, FormControlProps, MenuItemProps, NoChildrenProp, MenuProps, ForwardProps } from '@pega/cosmos-react-core';
3
- import { ObjectPickerProps } from './ObjectPicker';
4
- import { ObjectSummaryProps } from './ObjectSummary';
5
- import { CreateModalActionProps, UseCreateModalConfig } from './useCreateModal';
6
- export interface ObjectSelectProps<P extends object = object> extends BaseProps, NoChildrenProp, Omit<FormControlProps, 'value'> {
7
- /** An array of MenuItemProps to be shown in the ObjectPicker menu. */
8
- items: MenuProps['items'];
9
- /** Boolean to trigger loading state for combobox menu */
10
- loading?: ObjectPickerProps['loading'];
11
- /** The value for the ObjectSummary */
12
- value?: ObjectSummaryProps['value'];
13
- /** Props for configuration popover */
14
- configuration?: ObjectSummaryProps['configuration'];
15
- /** Callback fired when a new item is selected and on clearing the selected item. */
16
- onChange: MenuItemProps['onClick'];
17
- /** Callback fired when the preview in the ObjectSummary link is clicked. */
18
- onPreview?: (id: MenuItemProps['id'], e: {
19
- href: string;
20
- }) => void;
21
- /** Callback fired on click of the link inside summary item */
22
- onLinkClick?: ObjectSummaryProps['onLinkClick'];
23
- /** New object creation form options or a link */
24
- createConfiguration?: (UseCreateModalConfig<P> & CreateModalActionProps<P>) | {
25
- href: string;
26
- };
27
- /** Ref placed on the element. */
28
- ref?: Ref<HTMLDivElement>;
29
- }
30
- declare const ObjectSelect: <P extends object = object>(props: ObjectSelectProps<P> & ForwardProps) => JSX.Element | null;
31
- export default ObjectSelect;
32
- //# sourceMappingURL=ObjectSelect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ObjectSelect.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectSelect/ObjectSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,GAAG,EAA+B,MAAM,OAAO,CAAC;AAEtF,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,EAGb,MAAM,yBAAyB,CAAC;AAEjC,OAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAsB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAuB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEhG,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAC1D,SAAQ,SAAS,EACf,cAAc,EACd,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACjC,sEAAsE;IACtE,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC1B,yDAAyD;IACzD,OAAO,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACvC,sCAAsC;IACtC,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,sCAAsC;IACtC,aAAa,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACpD,oFAAoF;IACpF,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACnC,4EAA4E;IAC5E,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACnE,8DAA8D;IAC9D,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAChD,iDAAiD;IACjD,mBAAmB,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/F,iCAAiC;IACjC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,QAAA,MAAM,YAAY,6EAiF+D,WAAW,GAAG,IAAI,CAAC;AAEpG,eAAe,YAAY,CAAC"}
@@ -1,41 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef, useEffect, useRef, useState } from 'react';
3
- import { useAfterInitialEffect, hasProp } from '@pega/cosmos-react-core';
4
- import ObjectPicker from './ObjectPicker';
5
- import ObjectSummary from './ObjectSummary';
6
- import useCreateModal from './useCreateModal';
7
- const ObjectSelect = forwardRef(function ObjectSelect({ items, value, configuration, disabled, onChange, onPreview, onLinkClick, loading, createConfiguration, ...restProps }, ref) {
8
- const [mode, setMode] = useState(value ? 'summary' : 'picker');
9
- const objectPickerRef = useRef(null);
10
- const objectSummaryRef = useRef(null);
11
- const isCreateModalConfig = createConfiguration && hasProp(createConfiguration, 'renderer');
12
- useAfterInitialEffect(() => {
13
- const element = mode === 'summary'
14
- ? objectSummaryRef.current?.querySelector('a')
15
- : objectPickerRef.current?.querySelector('input');
16
- element?.focus();
17
- }, [mode]);
18
- const { renderModal } = useCreateModal(isCreateModalConfig
19
- ? {
20
- ...createConfiguration,
21
- onAfterClose: () => {
22
- createConfiguration.onAfterClose?.();
23
- setMode('summary');
24
- }
25
- }
26
- : undefined);
27
- useEffect(() => {
28
- if (mode === 'create' && isCreateModalConfig) {
29
- renderModal(createConfiguration);
30
- }
31
- }, [mode, createConfiguration]);
32
- return (_jsx("div", { ref: ref, children: value ? (_jsx(ObjectSummary, { ...restProps, value: value, disabled: disabled, onDelete: e => {
33
- setMode('picker');
34
- onChange?.('', e);
35
- }, ref: objectSummaryRef, configuration: configuration, onPreview: e => onPreview?.(value.id, e), onLinkClick: onLinkClick })) : (_jsx(ObjectPicker, { ...restProps, loading: loading, disabled: disabled, ref: objectPickerRef, items: items, onSelect: (id, e) => {
36
- setMode('summary');
37
- onChange?.(id, e);
38
- }, createProps: isCreateModalConfig ? { onClick: () => setMode('create') } : createConfiguration })) }));
39
- });
40
- export default ObjectSelect;
41
- //# sourceMappingURL=ObjectSelect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ObjectSelect.js","sourceRoot":"","sources":["../../../src/components/ObjectSelect/ObjectSelect.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAwB,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,EAOL,qBAAqB,EACrB,OAAO,EACR,MAAM,yBAAyB,CAAC;AAEjC,OAAO,YAAmC,MAAM,gBAAgB,CAAC;AACjE,OAAO,aAAqC,MAAM,iBAAiB,CAAC;AACpE,OAAO,cAAgE,MAAM,kBAAkB,CAAC;AA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IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEhC,OAAO,CACL,cAAK,GAAG,EAAE,GAAG,YACV,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,aAAa,OACR,SAAS,EACb,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,CAAC,CAAC,EAAE;gBACZ,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YACpB,CAAC,EACD,GAAG,EAAE,gBAAgB,EACrB,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EACxC,WAAW,EAAE,WAAW,GACxB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,YAAY,OACP,SAAS,EACb,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;gBAClB,OAAO,CAAC,SAAS,CAAC,CAAC;gBACnB,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YACpB,CAAC,EACD,WAAW,EACT,mBAAmB,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,GAElF,CACH,GACG,CACP,CAAC;AACJ,CAAC,CAAkG,CAAC;AAEpG,eAAe,YAAY,CAAC","sourcesContent":["import { forwardRef, PropsWithoutRef, Ref, useEffect, useRef, useState } from 'react';\n\nimport {\n BaseProps,\n FormControlProps,\n MenuItemProps,\n NoChildrenProp,\n MenuProps,\n ForwardProps,\n useAfterInitialEffect,\n hasProp\n} from '@pega/cosmos-react-core';\n\nimport ObjectPicker, { ObjectPickerProps } from './ObjectPicker';\nimport ObjectSummary, { ObjectSummaryProps } from './ObjectSummary';\nimport useCreateModal, { CreateModalActionProps, UseCreateModalConfig } from './useCreateModal';\n\nexport interface ObjectSelectProps<P extends object = object>\n extends BaseProps,\n NoChildrenProp,\n Omit<FormControlProps, 'value'> {\n /** An array of MenuItemProps to be shown in the ObjectPicker menu. */\n items: MenuProps['items'];\n /** Boolean to trigger loading state for combobox menu */\n loading?: ObjectPickerProps['loading'];\n /** The value for the ObjectSummary */\n value?: ObjectSummaryProps['value'];\n /** Props for configuration popover */\n configuration?: ObjectSummaryProps['configuration'];\n /** Callback fired when a new item is selected and on clearing the selected item. */\n onChange: MenuItemProps['onClick'];\n /** Callback fired when the preview in the ObjectSummary link is clicked. */\n onPreview?: (id: MenuItemProps['id'], e: { href: string }) => void;\n /** Callback fired on click of the link inside summary item */\n onLinkClick?: ObjectSummaryProps['onLinkClick'];\n /** New object creation form options or a link */\n createConfiguration?: (UseCreateModalConfig<P> & CreateModalActionProps<P>) | { href: string };\n /** Ref placed on the element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nconst ObjectSelect = forwardRef(function ObjectSelect<P extends object = object>(\n {\n items,\n value,\n configuration,\n disabled,\n onChange,\n onPreview,\n onLinkClick,\n loading,\n createConfiguration,\n ...restProps\n }: PropsWithoutRef<ObjectSelectProps<P>> & ForwardProps,\n ref: ObjectSelectProps['ref']\n) {\n const [mode, setMode] = useState<'picker' | 'summary' | 'create'>(value ? 'summary' : 'picker');\n const objectPickerRef = useRef<HTMLDivElement>(null);\n const objectSummaryRef = useRef<HTMLDivElement>(null);\n\n const isCreateModalConfig = createConfiguration && hasProp(createConfiguration, 'renderer');\n\n useAfterInitialEffect(() => {\n const element =\n mode === 'summary'\n ? objectSummaryRef.current?.querySelector('a')\n : objectPickerRef.current?.querySelector('input');\n element?.focus();\n }, [mode]);\n\n const { renderModal } = useCreateModal(\n isCreateModalConfig\n ? {\n ...createConfiguration,\n onAfterClose: () => {\n createConfiguration.onAfterClose?.();\n setMode('summary');\n }\n }\n : undefined\n );\n\n useEffect(() => {\n if (mode === 'create' && isCreateModalConfig) {\n renderModal(createConfiguration);\n }\n }, [mode, createConfiguration]);\n\n return (\n <div ref={ref}>\n {value ? (\n <ObjectSummary\n {...restProps}\n value={value}\n disabled={disabled}\n onDelete={e => {\n setMode('picker');\n onChange?.('', e);\n }}\n ref={objectSummaryRef}\n configuration={configuration}\n onPreview={e => onPreview?.(value.id, e)}\n onLinkClick={onLinkClick}\n />\n ) : (\n <ObjectPicker\n {...restProps}\n loading={loading}\n disabled={disabled}\n ref={objectPickerRef}\n items={items}\n onSelect={(id, e) => {\n setMode('summary');\n onChange?.(id, e);\n }}\n createProps={\n isCreateModalConfig ? { onClick: () => setMode('create') } : createConfiguration\n }\n />\n )}\n </div>\n );\n}) as <P extends object = object>(props: ObjectSelectProps<P> & ForwardProps) => JSX.Element | null;\n\nexport default ObjectSelect;\n"]}