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

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 +0,0 @@
1
- {"version":3,"file":"AppHeader.js","sourceRoot":"","sources":["../../../../src/components/AppShell/Header/AppHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAKV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,MAAM,EAGP,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,eAAe,EACf,IAAI,EACJ,WAAW,EAGX,aAAa,EACb,MAAM,EACN,IAAI,EACJ,OAAO,EACP,OAAO,EACP,UAAU,EACV,MAAM,EACP,MAAM,yBAAyB,CAAC;AACjC,OAAO,gBAAgB,MAAM,0DAA0D,CAAC;AACxF,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,kEAAkE,CAAC;AAE1E,OAAO,EACL,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,KAAK,GAA+B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACtD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CA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mBAAmB,EAAE,mBAAmB,GACxC,CACH,EACA,gBAAgB,IAAI,CAAC,eAAe,IAAI,KAAK,EAAE,QAAQ,IAAI,CAC1D,KAAC,gBAAgB,IACf,EAAE,EAAE,uBAAuB,EAC3B,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,EAC/B,OAAO,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,YAEtC,KAAC,MAAM,OAAK,KAAK,CAAC,QAAQ,CAAC,MAAM,GAAI,GACpB,CACpB,IACI,EACN,KAAK,IAAI,KAAC,KAAK,OAAK,KAAK,GAAI,IACzB,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n MouseEvent,\n FC,\n PropsWithoutRef,\n useCallback,\n useEffect,\n useState,\n useRef,\n Dispatch,\n SetStateAction\n} from 'react';\n\nimport {\n ContextSwitcher,\n Flex,\n SearchInput,\n ForwardProps,\n SearchInputProps,\n useBreakpoint,\n Button,\n Icon,\n useI18n,\n Tooltip,\n useElement,\n Avatar\n} from '@pega/cosmos-react-core';\nimport AppShellOperator from '@pega/cosmos-react-core/lib/components/AppShell/Operator';\nimport {\n StyledAppHeaderSearchForm,\n StyledAppHeaderOperator\n} from '@pega/cosmos-react-core/lib/components/AppShell/AppHeader.styles';\n\nimport {\n StyledAppHeader,\n StyledTabs,\n StyledUtilsContainer,\n StyledBrandContainer,\n StyledAppHeaderSearch,\n StyledAppName,\n StyledAppVersion,\n StyledBrandButton,\n StyledBrandImage,\n StyledContext\n} from './AppHeader.styles';\nimport { AppHeaderProps, LinkProps, UtilsProps } from './AppHeader.types';\nimport BranchButton from './BranchButton';\n\nconst Links: FC<{ links: LinkProps[] }> = ({ links }) => {\n const [currentTabId, setCurrentTabId] = useState(links[0].id);\n\n useEffect(() => {\n setCurrentTabId(links[0].id);\n }, [links]);\n\n const handleTabClick = useCallback(\n (id: string, e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => {\n const newActiveTab = links.find(item => item.id === id);\n if (newActiveTab) {\n newActiveTab.onClick?.(id, e);\n setCurrentTabId(newActiveTab.id);\n }\n },\n [links]\n );\n\n return <StyledTabs tabs={links} currentTabId={currentTabId} onTabClick={handleTabClick} />;\n};\n\nconst AppHeaderSearch: FC<\n SearchInputProps & {\n showSearchButton: boolean;\n setShowSearchButton: Dispatch<SetStateAction<boolean>>;\n }\n> = ({ showSearchButton, setShowSearchButton, ...restProps }) => {\n const isMediumOrAbove = useBreakpoint('md');\n const t = useI18n();\n\n const searchInputRef = useCallback(\n node => {\n if (!showSearchButton && node) {\n node.focus();\n }\n },\n [showSearchButton]\n );\n const focusSearchBtn = useRef(false);\n const searchButtonRef = useCallback(node => {\n if (node && focusSearchBtn.current) {\n node.focus();\n }\n }, []);\n\n return isMediumOrAbove || !showSearchButton ? (\n <Flex\n as={StyledAppHeaderSearch}\n item={{ shrink: 0, grow: 1 }}\n md={{ item: { grow: 0, shrink: 1 } }}\n container={{ justify: 'between', alignItems: 'center', gap: 1 }}\n >\n <StyledAppHeaderSearchForm\n role='search'\n aria-label={t('sitewide')}\n onSubmit={e => e.preventDefault()}\n isMediumOrAbove={isMediumOrAbove}\n >\n <SearchInput {...restProps} ref={searchInputRef} />\n </StyledAppHeaderSearchForm>\n <Button\n variant='simple'\n icon\n onClick={() => {\n setShowSearchButton(true);\n focusSearchBtn.current = true;\n }}\n label={t('collapse_search')}\n >\n <Icon name='times' />\n </Button>\n </Flex>\n ) : (\n <Button\n variant='simple'\n icon\n onClick={() => setShowSearchButton(false)}\n ref={searchButtonRef}\n label={t('expand_search')}\n >\n <Icon name='search' />\n </Button>\n );\n};\n\nconst Utils: FC<UtilsProps> = ({ operator, branch, action, appInfo }) => {\n const isMediumOrAbove = useBreakpoint('md');\n const isSmallOrAbove = useBreakpoint('sm');\n const [appInfoEl, setAppInfoEl] = useElement(null);\n\n return (\n <Flex\n container={{ justify: 'between', alignItems: 'center' }}\n md={{ container: { justify: 'end' } }}\n item={{ shrink: 1 }}\n as={StyledUtilsContainer}\n >\n {appInfo && (\n <Flex\n container={{ justify: 'between', alignItems: 'center', gap: 0.5 }}\n item={{ shrink: 1 }}\n ref={setAppInfoEl}\n >\n <Flex as={StyledAppName} item={{ shrink: 1 }}>\n {appInfo.name}\n </Flex>\n <StyledAppVersion>{appInfo.version}</StyledAppVersion>\n <Tooltip target={appInfoEl} hideDelay='none'>\n {`${appInfo.name} ${appInfo.version}`}\n </Tooltip>\n </Flex>\n )}\n <Flex container={{ alignItems: 'center' }}>\n {branch && <BranchButton {...branch} compact={isSmallOrAbove ? branch.compact : true} />}\n {action && (\n <Flex\n container={{ justify: 'between', alignItems: 'center', gap: 0.5 }}\n item={{ shrink: 0 }}\n as={Button}\n variant='secondary'\n icon={!isMediumOrAbove}\n label={isMediumOrAbove ? undefined : action.text}\n onClick={(e: MouseEvent<HTMLButtonElement>) => action.onClick?.(action.id, e)}\n disabled={action.disabled}\n >\n {action.icon && <Icon name={action.icon} />}\n {isMediumOrAbove && action.text}\n </Flex>\n )}\n </Flex>\n {isMediumOrAbove && (\n <AppShellOperator\n as={StyledAppHeaderOperator}\n actions={operator.actions}\n popover={{ placement: 'bottom-end' }}\n >\n <Avatar {...operator.avatar} />\n </AppShellOperator>\n )}\n </Flex>\n );\n};\n\nconst AppHeader: FunctionComponent<AppHeaderProps & ForwardProps> = forwardRef(function AppHeader(\n {\n contextSwitcher: { contexts, onContextClick, label: contextSwitcherLabel } = {},\n brand,\n utils,\n links\n }: PropsWithoutRef<AppHeaderProps>,\n ref: AppHeaderProps['ref']\n) {\n const selectedContext = contexts?.length > 1 ? contexts.find(ctx => ctx.selected)! : contexts[0];\n\n const isMediumOrAbove = useBreakpoint('md');\n const [showSearchButton, setShowSearchButton] = useState(true);\n\n useEffect(() => {\n if (isMediumOrAbove && !showSearchButton) {\n setShowSearchButton(true);\n }\n }, [isMediumOrAbove]);\n\n return (\n <Flex\n as={StyledAppHeader}\n container={{\n justify: 'between',\n alignItems: 'center',\n colGap: 2,\n wrap: 'wrap',\n pad: [0, 1]\n }}\n md={{ container: { wrap: 'nowrap' } }}\n ref={ref}\n >\n {showSearchButton && (\n <Flex\n as={StyledBrandContainer}\n container={{\n justify: 'between',\n alignItems: 'center',\n gap: 1\n }}\n item={{ shrink: 0, alignSelf: 'stretch' }}\n >\n {contexts && onContextClick && contexts.length > 1 && (\n <ContextSwitcher\n contexts={contexts}\n onContextClick={onContextClick}\n label={contextSwitcherLabel}\n />\n )}\n <Flex\n as={brand.onClick || brand.href ? StyledBrandButton : 'div'}\n variant='simple'\n container={{ alignItems: 'center', justify: 'between', gap: 2, pad: 1 }}\n aria-label={`${brand.label} - ${selectedContext.primary}`}\n onClick={brand.onClick}\n href={brand.href}\n >\n <Flex item={{ shrink: 0 }} as={StyledBrandImage} src={brand.logo} alt={brand.label} />\n <Flex container={{ justify: 'between', alignItems: 'center', gap: 1 }}>\n {selectedContext.visual}\n <StyledContext>{selectedContext.primary}</StyledContext>\n </Flex>\n </Flex>\n </Flex>\n )}\n {links && links.length > 0 && <Links links={links} />}\n\n <Flex\n container={{\n gap: 1,\n justify: 'center',\n alignItems: 'center'\n }}\n item={{ grow: showSearchButton ? 0 : 1 }}\n md={{ item: { grow: showSearchButton ? 1 : 0 } }}\n >\n {utils?.search && (\n <AppHeaderSearch\n {...utils.search}\n showSearchButton={showSearchButton}\n setShowSearchButton={setShowSearchButton}\n />\n )}\n {showSearchButton && !isMediumOrAbove && utils?.operator && (\n <AppShellOperator\n as={StyledAppHeaderOperator}\n actions={utils.operator.actions}\n popover={{ placement: 'bottom-start' }}\n >\n <Avatar {...utils.operator.avatar} />\n </AppShellOperator>\n )}\n </Flex>\n {utils && <Utils {...utils} />}\n </Flex>\n );\n});\n\nexport default AppHeader;\n"]}
@@ -1,13 +0,0 @@
1
- /// <reference types="react" />
2
- import { Text, Tabs } from '@pega/cosmos-react-core';
3
- export declare const StyledAppHeader: import("styled-components").StyledComponent<"header", import("styled-components").DefaultTheme, {}, never>;
4
- export declare const StyledBrandContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
5
- export declare const StyledBrandButton: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core/lib/components/Button/BareButton").BareButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
6
- export declare const StyledBrandImage: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ImageProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
7
- export declare const StyledContext: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
8
- export declare const StyledTabs: typeof Tabs;
9
- export declare const StyledAppHeaderSearch: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
10
- export declare const StyledUtilsContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
- export declare const StyledAppName: typeof Text;
12
- export declare const StyledAppVersion: typeof Text;
13
- //# sourceMappingURL=AppHeader.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppHeader.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/AppShell/Header/AppHeader.styles.ts"],"names":[],"mappings":";AAEA,OAAO,EAAoB,IAAI,EAAE,IAAI,EAAuB,MAAM,yBAAyB,CAAC;AAI5F,eAAO,MAAM,eAAe,4GA8B3B,CAAC;AAIF,eAAO,MAAM,oBAAoB,yGAkBhC,CAAC;AAIF,eAAO,MAAM,iBAAiB,0QAa5B,CAAC;AAIH,eAAO,MAAM,gBAAgB,oOAgB5B,CAAC;AAEF,eAAO,MAAM,aAAa,0GAIzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OAAO,IA8B/B,CAAC;AAIF,eAAO,MAAM,qBAAqB,yGA0BjC,CAAC;AAIF,eAAO,MAAM,oBAAoB,yGAmBhC,CAAC;AAIF,eAAO,MAAM,aAAa,EAAE,OAAO,IAUjC,CAAC;AAIH,eAAO,MAAM,gBAAgB,EAAE,OAAO,IAKpC,CAAC"}
@@ -1,158 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
- import { defaultThemeProp, Text, Tabs, Image, StyledButton } from '@pega/cosmos-react-core';
3
- import { StyledAppHeaderSearchForm } from '@pega/cosmos-react-core/lib/components/AppShell/AppHeader.styles';
4
- import BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';
5
- export const StyledAppHeader = styled.header(({ theme: { base: { palette, breakpoints, 'z-index': zIndex } } }) => {
6
- return css `
7
- height: 6rem;
8
- border-bottom: 0.0625rem solid ${palette['border-line']};
9
- background-color: ${palette['primary-background']};
10
- position: sticky;
11
- top: 0;
12
- z-index: calc(${zIndex.drawer + 1});
13
- & > div {
14
- height: 50%;
15
- }
16
-
17
- @media (pointer: coarse) {
18
- height: 8rem;
19
- }
20
-
21
- @media (min-width: ${breakpoints.md}) {
22
- height: 3rem;
23
-
24
- & > div {
25
- height: 100%;
26
- }
27
- }
28
- `;
29
- });
30
- StyledAppHeader.defaultProps = defaultThemeProp;
31
- export const StyledBrandContainer = styled.div(({ theme: { base: { 'hit-area': hitArea, breakpoints, spacing } } }) => {
32
- return css `
33
- max-width: calc(100% - calc(3 * ${hitArea.mouse}));
34
-
35
- @media (min-width: ${breakpoints.xs}) and (pointer: coarse) {
36
- max-width: calc(100% - calc(3 * ${hitArea.mouse}) - calc(2 * ${spacing}));
37
- }
38
-
39
- @media (min-width: ${breakpoints.md}) {
40
- max-width: 30%;
41
- }
42
- `;
43
- });
44
- StyledBrandContainer.defaultProps = defaultThemeProp;
45
- export const StyledBrandButton = styled(BareButton)(({ theme }) => {
46
- return css `
47
- text-decoration: none;
48
- min-width: 0;
49
-
50
- & > div:last-child {
51
- min-width: 0;
52
- }
53
-
54
- &:not([disabled]):focus {
55
- box-shadow: ${theme.base.shadow.focus};
56
- }
57
- `;
58
- });
59
- StyledBrandButton.defaultProps = defaultThemeProp;
60
- export const StyledBrandImage = styled(Image)(({ theme: { base: { breakpoints } } }) => {
61
- return css `
62
- height: 1.5rem;
63
- max-width: 17ch;
64
- display: none;
65
-
66
- @media (min-width: ${breakpoints.sm}) {
67
- display: unset;
68
- }
69
- `;
70
- });
71
- export const StyledContext = styled.span `
72
- overflow: hidden;
73
- text-overflow: ellipsis;
74
- white-space: nowrap;
75
- `;
76
- export const StyledTabs = styled(Tabs)(({ theme: { base: { breakpoints, 'font-weight': fontWeight } } }) => {
77
- return css `
78
- display: none;
79
- border: none;
80
- min-height: 3rem;
81
- [role='tab'] {
82
- height: auto;
83
- span:first-of-type {
84
- text-transform: none;
85
- }
86
- }
87
- [role='tab'][aria-selected='false'] > span {
88
- font-weight: ${fontWeight['semi-bold']};
89
- }
90
- [role='tab']:hover,
91
- [role='tab']:focus,
92
- [role='tab']:active {
93
- box-shadow: none;
94
- }
95
-
96
- @media (min-width: ${breakpoints.md}) {
97
- display: inherit;
98
- }
99
- `;
100
- });
101
- StyledTabs.defaultProps = defaultThemeProp;
102
- export const StyledAppHeaderSearch = styled.div(({ theme: { base: { spacing, breakpoints, 'content-width': contentWidth } } }) => {
103
- return css `
104
- padding-block: ${spacing};
105
- width: 100%;
106
- ${StyledAppHeaderSearchForm} {
107
- margin-inline-start: 0;
108
- max-width: 100%;
109
- }
110
-
111
- @media (min-width: ${breakpoints.md}) {
112
- ${StyledAppHeaderSearchForm} {
113
- margin-inline-start: auto;
114
- max-width: ${contentWidth.lg};
115
- }
116
-
117
- ${StyledButton} {
118
- display: none;
119
- }
120
- }
121
- `;
122
- });
123
- StyledAppHeaderSearch.defaultProps = defaultThemeProp;
124
- export const StyledUtilsContainer = styled.div(({ theme: { base: { spacing, breakpoints } } }) => {
125
- return css `
126
- width: 100%;
127
- & > div,
128
- & > span,
129
- & > button {
130
- margin-inline-start: ${spacing};
131
- }
132
-
133
- @media (min-width: ${breakpoints.md}) {
134
- width: auto;
135
- }
136
- `;
137
- });
138
- StyledUtilsContainer.defaultProps = defaultThemeProp;
139
- export const StyledAppName = styled(Text)(({ theme }) => {
140
- return css `
141
- max-width: ${theme.base['content-width'].sm};
142
- text-overflow: ellipsis;
143
- overflow: hidden;
144
- white-space: nowrap;
145
- color: ${theme.base.palette['foreground-color']};
146
- font-weight: ${theme.base['font-weight']['semi-bold']};
147
- margin-inline-start: 0;
148
- `;
149
- });
150
- StyledAppName.defaultProps = defaultThemeProp;
151
- export const StyledAppVersion = styled(Text)(({ theme }) => {
152
- return css `
153
- font-weight: ${theme.base['font-weight']['semi-bold']};
154
- margin-inline-start: 0;
155
- `;
156
- });
157
- StyledAppVersion.defaultProps = defaultThemeProp;
158
- //# sourceMappingURL=AppHeader.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppHeader.styles.js","sourceRoot":"","sources":["../../../../src/components/AppShell/Header/AppHeader.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAC7G,OAAO,UAAU,MAAM,0DAA0D,CAAC;AAElF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAC1C,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,EAClD,EACF,EAAE,EAAE;IACH,OAAO,GAAG,CAAA;;uCAEyB,OAAO,CAAC,aAAa,CAAC;0BACnC,OAAO,CAAC,oBAAoB,CAAC;;;sBAGjC,MAAM,CAAC,MAAM,GAAG,CAAC;;;;;;;;;2BASZ,WAAW,CAAC,EAAE;;;;;;;KAOpC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC;A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AAC;AAE9C,MAAM,CAAC,MAAM,gBAAgB,GAAgB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACtE,OAAO,GAAG,CAAA;mBACO,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC;;GAEtD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, Text, Tabs, Image, StyledButton } from '@pega/cosmos-react-core';\nimport { StyledAppHeaderSearchForm } from '@pega/cosmos-react-core/lib/components/AppShell/AppHeader.styles';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\n\nexport const StyledAppHeader = styled.header(\n ({\n theme: {\n base: { palette, breakpoints, 'z-index': zIndex }\n }\n }) => {\n return css`\n height: 6rem;\n border-bottom: 0.0625rem solid ${palette['border-line']};\n background-color: ${palette['primary-background']};\n position: sticky;\n top: 0;\n z-index: calc(${zIndex.drawer + 1});\n & > div {\n height: 50%;\n }\n\n @media (pointer: coarse) {\n height: 8rem;\n }\n\n @media (min-width: ${breakpoints.md}) {\n height: 3rem;\n\n & > div {\n height: 100%;\n }\n }\n `;\n }\n);\n\nStyledAppHeader.defaultProps = defaultThemeProp;\n\nexport const StyledBrandContainer = styled.div(\n ({\n theme: {\n base: { 'hit-area': hitArea, breakpoints, spacing }\n }\n }) => {\n return css`\n max-width: calc(100% - calc(3 * ${hitArea.mouse}));\n\n @media (min-width: ${breakpoints.xs}) and (pointer: coarse) {\n max-width: calc(100% - calc(3 * ${hitArea.mouse}) - calc(2 * ${spacing}));\n }\n\n @media (min-width: ${breakpoints.md}) {\n max-width: 30%;\n }\n `;\n }\n);\n\nStyledBrandContainer.defaultProps = defaultThemeProp;\n\nexport const StyledBrandButton = styled(BareButton)(({ theme }) => {\n return css`\n text-decoration: none;\n min-width: 0;\n\n & > div:last-child {\n min-width: 0;\n }\n\n &:not([disabled]):focus {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledBrandButton.defaultProps = defaultThemeProp;\n\nexport const StyledBrandImage = styled(Image)(\n ({\n theme: {\n base: { breakpoints }\n }\n }) => {\n return css`\n height: 1.5rem;\n max-width: 17ch;\n display: none;\n\n @media (min-width: ${breakpoints.sm}) {\n display: unset;\n }\n `;\n }\n);\n\nexport const StyledContext = styled.span`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nexport const StyledTabs: typeof Tabs = styled(Tabs)(\n ({\n theme: {\n base: { breakpoints, 'font-weight': fontWeight }\n }\n }) => {\n return css`\n display: none;\n border: none;\n min-height: 3rem;\n [role='tab'] {\n height: auto;\n span:first-of-type {\n text-transform: none;\n }\n }\n [role='tab'][aria-selected='false'] > span {\n font-weight: ${fontWeight['semi-bold']};\n }\n [role='tab']:hover,\n [role='tab']:focus,\n [role='tab']:active {\n box-shadow: none;\n }\n\n @media (min-width: ${breakpoints.md}) {\n display: inherit;\n }\n `;\n }\n);\n\nStyledTabs.defaultProps = defaultThemeProp;\n\nexport const StyledAppHeaderSearch = styled.div(\n ({\n theme: {\n base: { spacing, breakpoints, 'content-width': contentWidth }\n }\n }) => {\n return css`\n padding-block: ${spacing};\n width: 100%;\n ${StyledAppHeaderSearchForm} {\n margin-inline-start: 0;\n max-width: 100%;\n }\n\n @media (min-width: ${breakpoints.md}) {\n ${StyledAppHeaderSearchForm} {\n margin-inline-start: auto;\n max-width: ${contentWidth.lg};\n }\n\n ${StyledButton} {\n display: none;\n }\n }\n `;\n }\n);\n\nStyledAppHeaderSearch.defaultProps = defaultThemeProp;\n\nexport const StyledUtilsContainer = styled.div(\n ({\n theme: {\n base: { spacing, breakpoints }\n }\n }) => {\n return css`\n width: 100%;\n & > div,\n & > span,\n & > button {\n margin-inline-start: ${spacing};\n }\n\n @media (min-width: ${breakpoints.md}) {\n width: auto;\n }\n `;\n }\n);\n\nStyledUtilsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledAppName: typeof Text = styled(Text)(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].sm};\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ${theme.base.palette['foreground-color']};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n margin-inline-start: 0;\n `;\n});\n\nStyledAppName.defaultProps = defaultThemeProp;\n\nexport const StyledAppVersion: typeof Text = styled(Text)(({ theme }) => {\n return css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n margin-inline-start: 0;\n `;\n});\n\nStyledAppVersion.defaultProps = defaultThemeProp;\n"]}
@@ -1,33 +0,0 @@
1
- import { Ref, MouseEvent } from 'react';
2
- import { AppShellProps, OmitStrict, Action, BaseProps, NoChildrenProp, Tab, AvatarProps, SearchInputProps } from '@pega/cosmos-react-core';
3
- import { ContextSwitcherProps } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.types';
4
- import { BranchButtonProps } from './BranchButton';
5
- export interface OperatorProps extends OmitStrict<AppShellProps['operator'], 'avatar'> {
6
- avatar: Pick<AvatarProps, 'name' | 'imageSrc'>;
7
- }
8
- export interface AppHeaderProps extends BaseProps, NoChildrenProp {
9
- contextSwitcher: ContextSwitcherProps;
10
- brand: {
11
- label: string;
12
- logo: string;
13
- href?: string;
14
- onClick?: (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
15
- };
16
- links?: LinkProps[];
17
- utils?: UtilsProps;
18
- ref?: Ref<HTMLDivElement>;
19
- }
20
- export interface LinkProps extends Tab {
21
- onClick?: (id: string, e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
22
- }
23
- export interface UtilsProps {
24
- operator: OperatorProps;
25
- search?: SearchInputProps;
26
- branch?: BranchButtonProps;
27
- action?: Pick<Action, 'id' | 'text' | 'onClick' | 'disabled' | 'icon'>;
28
- appInfo?: {
29
- name: string;
30
- version: string;
31
- };
32
- }
33
- //# sourceMappingURL=AppHeader.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppHeader.types.d.ts","sourceRoot":"","sources":["../../../../src/components/AppShell/Header/AppHeader.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EACL,aAAa,EACb,UAAU,EACV,MAAM,EACN,SAAS,EACT,cAAc,EACd,GAAG,EACH,WAAW,EACX,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gEAAgE,CAAC;AAEtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,aAAc,SAAQ,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;IACpF,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC;CAChD;AACD,MAAM,WAAW,cAAe,SAAQ,SAAS,EAAE,cAAc;IAC/D,eAAe,EAAE,oBAAoB,CAAC;IACtC,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,KAAK,IAAI,CAAC;KAC1E,CAAC;IACF,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,SAAU,SAAQ,GAAG;IACpC,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,KAAK,IAAI,CAAC;CACvF;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;IACvE,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=AppHeader.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppHeader.types.js","sourceRoot":"","sources":["../../../../src/components/AppShell/Header/AppHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Ref, MouseEvent } from 'react';\n\nimport {\n AppShellProps,\n OmitStrict,\n Action,\n BaseProps,\n NoChildrenProp,\n Tab,\n AvatarProps,\n SearchInputProps\n} from '@pega/cosmos-react-core';\nimport { ContextSwitcherProps } from '@pega/cosmos-react-core/lib/components/AppShell/AppShell.types';\n\nimport { BranchButtonProps } from './BranchButton';\n\nexport interface OperatorProps extends OmitStrict<AppShellProps['operator'], 'avatar'> {\n avatar: Pick<AvatarProps, 'name' | 'imageSrc'>;\n}\nexport interface AppHeaderProps extends BaseProps, NoChildrenProp {\n contextSwitcher: ContextSwitcherProps;\n brand: {\n label: string;\n logo: string;\n href?: string;\n onClick?: (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n };\n links?: LinkProps[];\n utils?: UtilsProps;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport interface LinkProps extends Tab {\n onClick?: (id: string, e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n}\n\nexport interface UtilsProps {\n operator: OperatorProps;\n search?: SearchInputProps;\n branch?: BranchButtonProps;\n action?: Pick<Action, 'id' | 'text' | 'onClick' | 'disabled' | 'icon'>;\n appInfo?: {\n name: string;\n version: string;\n };\n}\n"]}
@@ -1,20 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { DefaultTheme } from 'styled-components';
3
- import { Button, CountProps, MenuProps, StatusProps } from '@pega/cosmos-react-core';
4
- export interface BranchButtonProps {
5
- /** The text for the BranchButton also used to set the aria-label. */
6
- text: string;
7
- /** Determines the variant for the BranchButton. */
8
- variant?: Extract<StatusProps['variant'], 'success' | 'urgent'>;
9
- /** Only display the branch and caret icon */
10
- compact?: boolean;
11
- /** The total count representing the number of unmerged changes. */
12
- count?: CountProps['children'];
13
- /** An array of MenuItemProps. */
14
- items: MenuProps['items'];
15
- }
16
- export declare const StyledBranchButton: typeof Button;
17
- export declare const StyledWarnIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, DefaultTheme, {}, never>;
18
- declare const BranchButton: FunctionComponent<BranchButtonProps>;
19
- export default BranchButton;
20
- //# sourceMappingURL=BranchButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BranchButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AppShell/Header/BranchButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAiB,MAAM,OAAO,CAAC;AACnE,OAAe,EAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG9D,OAAO,EACL,MAAM,EACN,UAAU,EAMV,SAAS,EAMT,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AAQjC,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC,CAAC;IAChE,6CAA6C;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mEAAmE;IACnE,KAAK,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAC/B,iCAAiC;IACjC,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,kBAAkB,EAAE,OAAO,MAuDvC,CAAC;AAqBF,eAAO,MAAM,cAAc,8JAIzB,CAAC;AAgBH,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAoEtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,91 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import { readableColor } from 'polished';
5
- import { Button, defaultThemeProp, Flex, Icon, Menu, Count, Popover, useDirection, useElement, registerIcon, useOuterEvent, useI18n, tryCatch } from '@pega/cosmos-react-core';
6
- import * as nodesDownSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/nodes-down-solid.icon';
7
- import * as warnSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/warn-solid.icon';
8
- import * as caretDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-down.icon';
9
- import { StyledCount } from '@pega/cosmos-react-core/lib/components/Badges/Count';
10
- registerIcon(nodesDownSolidIcon, warnSolidIcon, caretDownIcon);
11
- export const StyledBranchButton = styled(Button)(({ theme, branchVariant }) => {
12
- const { base: { colors, palette: { 'primary-background': primaryBackground }, shadow: { focus }, spacing }, components: { badges: { status, count: { default: { background, foreground } } } } } = theme;
13
- const backgroundColor = branchVariant ? status[branchVariant].background : primaryBackground;
14
- const borderColor = !branchVariant ? colors.gray.medium : 'transparent';
15
- const countBgColor = branchVariant === 'success' ? colors.green.medium : background;
16
- const countColor = branchVariant === 'success' ? colors.white : foreground;
17
- const buttonColor = tryCatch(() => readableColor(backgroundColor));
18
- return css `
19
- flex-shrink: 0;
20
- background-color: ${backgroundColor};
21
- border-color: ${borderColor};
22
- color: ${buttonColor};
23
- padding-inline-start: ${spacing};
24
- padding-inline-end: ${spacing};
25
-
26
- &:hover {
27
- background-color: ${backgroundColor};
28
- box-shadow: ${focus};
29
- }
30
-
31
- svg {
32
- height: 1rem;
33
- width: 1rem;
34
- }
35
-
36
- ${StyledCount} {
37
- background-color: ${countBgColor};
38
- color: ${countColor};
39
- }
40
- `;
41
- });
42
- StyledBranchButton.defaultProps = defaultThemeProp;
43
- const StyledBranchButtonPopover = styled(Popover)(({ theme: { base: { spacing, 'content-width': contentWidth } } }) => {
44
- const minWidth = `calc(${contentWidth.xs} + (2 * ${spacing}))`;
45
- return css `
46
- min-width: ${minWidth};
47
- max-width: calc(${minWidth} + 5ch);
48
- `;
49
- });
50
- StyledBranchButtonPopover.defaultProps = defaultThemeProp;
51
- export const StyledWarnIcon = styled(Icon)(({ theme }) => {
52
- return css `
53
- color: ${theme.base.colors.red.medium};
54
- `;
55
- });
56
- StyledWarnIcon.defaultProps = defaultThemeProp;
57
- const StyledEllipsizedText = styled.span(({ theme }) => {
58
- return css `
59
- max-width: ${theme.base['content-width'].xs};
60
- white-space: nowrap;
61
- overflow: hidden;
62
- text-overflow: ellipsis;
63
- line-height: 1.5;
64
- `;
65
- });
66
- StyledEllipsizedText.defaultProps = defaultThemeProp;
67
- const BranchButton = (props) => {
68
- const { text, variant, count, compact = false, items = [] } = props;
69
- const [open, setOpen] = useState(false);
70
- const [popoverEl, setPopoverRef] = useElement();
71
- const [buttonEl, setButtonEl] = useElement();
72
- const { rtl } = useDirection();
73
- const t = useI18n();
74
- useOuterEvent('mousedown', [popoverEl, buttonEl], () => {
75
- if (open)
76
- setOpen(false);
77
- });
78
- let ariaLabel = t('branch_with_no_changes', [text]);
79
- if (variant === 'success') {
80
- ariaLabel = t('branch_with_no_potential_conflicts', [text, count ?? 0]);
81
- }
82
- else if (variant === 'urgent') {
83
- ariaLabel = t('branch_with_potential_conflicts', [text]);
84
- }
85
- return (_jsxs(_Fragment, { children: [_jsx(StyledBranchButton, { ref: setButtonEl, "aria-expanded": open, "aria-haspopup": 'menu', "aria-controls": 'branch-popover', "aria-label": ariaLabel, branchVariant: variant, label: !open && compact ? text : undefined, onClick: () => setOpen(cur => !cur), onKeyDown: (e) => {
86
- if (e.key === 'Escape')
87
- setOpen(false);
88
- }, children: _jsxs(Flex, { container: { alignItems: 'center', gap: compact ? 1 : 0.5 }, children: [_jsx(Icon, { name: 'nodes-down-solid' }), !compact && (_jsxs(_Fragment, { children: [_jsx(StyledEllipsizedText, { children: text }), variant === 'urgent' ? (_jsx(StyledWarnIcon, { name: 'warn-solid' })) : (count !== undefined && _jsx(Count, { children: count }))] })), _jsx(Icon, { name: 'caret-down' })] }) }), _jsx(StyledBranchButtonPopover, { placement: rtl ? 'bottom-end' : 'bottom-start', id: 'branch-popover', hideOnTargetHidden: true, show: open, target: buttonEl, ref: setPopoverRef, children: _jsx(Menu, { items: items, scrollAt: 20, onItemClick: () => setOpen(false), focusControlEl: buttonEl || undefined }) })] }));
89
- };
90
- export default BranchButton;
91
- //# sourceMappingURL=BranchButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BranchButton.js","sourceRoot":"","sources":["../../../../src/components/AppShell/Header/BranchButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAoC,MAAM,OAAO,CAAC;AACnE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,MAAM,EAEN,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,EAEb,OAAO,EACP,QAAQ,EACT,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,kBAAkB,MAAM,yEAAyE,CAAC;AAC9G,OAAO,KAAK,aAAa,MAAM,mEAAmE,CAAC;AACnG,OAAO,KAAK,aAAa,MAAM,mEAAmE,CAAC;AACnG,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AA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AC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,aAC/D,KAAC,IAAI,IAAC,IAAI,EAAC,kBAAkB,GAAG,EAC/B,CAAC,OAAO,IAAI,CACX,8BACE,KAAC,oBAAoB,cAAE,IAAI,GAAwB,EAClD,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CACtB,KAAC,cAAc,IAAC,IAAI,EAAC,YAAY,GAAG,CACrC,CAAC,CAAC,CAAC,CACF,KAAK,KAAK,SAAS,IAAI,KAAC,KAAK,cAAE,KAAK,GAAS,CAC9C,IACA,CACJ,EACD,KAAC,IAAI,IAAC,IAAI,EAAC,YAAY,GAAG,IACrB,GACY,EACrB,KAAC,yBAAyB,IACxB,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,EAC9C,EAAE,EAAC,gBAAgB,EACnB,kBAAkB,QAClB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,QAAQ,EAChB,GAAG,EAAE,aAAa,YAElB,KAAC,IAAI,IACH,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,EAAE,EACZ,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EACjC,cAAc,EAAE,QAAQ,IAAI,SAAS,GACrC,GACwB,IAC3B,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { useState, FunctionComponent, KeyboardEvent } from 'react';\nimport styled, { css, DefaultTheme } from 'styled-components';\nimport { readableColor } from 'polished';\n\nimport {\n Button,\n CountProps,\n defaultThemeProp,\n Flex,\n Icon,\n Menu,\n Count,\n MenuProps,\n Popover,\n useDirection,\n useElement,\n registerIcon,\n useOuterEvent,\n StatusProps,\n useI18n,\n tryCatch\n} from '@pega/cosmos-react-core';\nimport * as nodesDownSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/nodes-down-solid.icon';\nimport * as warnSolidIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/warn-solid.icon';\nimport * as caretDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/caret-down.icon';\nimport { StyledCount } from '@pega/cosmos-react-core/lib/components/Badges/Count';\n\nregisterIcon(nodesDownSolidIcon, warnSolidIcon, caretDownIcon);\n\nexport interface BranchButtonProps {\n /** The text for the BranchButton also used to set the aria-label. */\n text: string;\n /** Determines the variant for the BranchButton. */\n variant?: Extract<StatusProps['variant'], 'success' | 'urgent'>;\n /** Only display the branch and caret icon */\n compact?: boolean;\n /** The total count representing the number of unmerged changes. */\n count?: CountProps['children'];\n /** An array of MenuItemProps. */\n items: MenuProps['items'];\n}\n\nexport const StyledBranchButton: typeof Button = styled(Button)(\n ({\n theme,\n branchVariant\n }: {\n theme: DefaultTheme;\n branchVariant: BranchButtonProps['variant'];\n }) => {\n const {\n base: {\n colors,\n palette: { 'primary-background': primaryBackground },\n shadow: { focus },\n spacing\n },\n components: {\n badges: {\n status,\n count: {\n default: { background, foreground }\n }\n }\n }\n } = theme;\n\n const backgroundColor = branchVariant ? status[branchVariant].background : primaryBackground;\n const borderColor = !branchVariant ? colors.gray.medium : 'transparent';\n const countBgColor = branchVariant === 'success' ? colors.green.medium : background;\n const countColor = branchVariant === 'success' ? colors.white : foreground;\n const buttonColor = tryCatch(() => readableColor(backgroundColor));\n\n return css`\n flex-shrink: 0;\n background-color: ${backgroundColor};\n border-color: ${borderColor};\n color: ${buttonColor};\n padding-inline-start: ${spacing};\n padding-inline-end: ${spacing};\n\n &:hover {\n background-color: ${backgroundColor};\n box-shadow: ${focus};\n }\n\n svg {\n height: 1rem;\n width: 1rem;\n }\n\n ${StyledCount} {\n background-color: ${countBgColor};\n color: ${countColor};\n }\n `;\n }\n);\n\nStyledBranchButton.defaultProps = defaultThemeProp;\n\nconst StyledBranchButtonPopover = styled(Popover)(\n ({\n theme: {\n base: { spacing, 'content-width': contentWidth }\n }\n }) => {\n const minWidth = `calc(${contentWidth.xs} + (2 * ${spacing}))`;\n\n return css`\n min-width: ${minWidth};\n max-width: calc(${minWidth} + 5ch);\n `;\n }\n);\n\nStyledBranchButtonPopover.defaultProps = defaultThemeProp;\n\nexport const StyledWarnIcon = styled(Icon)(({ theme }) => {\n return css`\n color: ${theme.base.colors.red.medium};\n `;\n});\n\nStyledWarnIcon.defaultProps = defaultThemeProp;\n\nconst StyledEllipsizedText = styled.span(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].xs};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.5;\n `;\n});\n\nStyledEllipsizedText.defaultProps = defaultThemeProp;\n\nconst BranchButton: FunctionComponent<BranchButtonProps> = (props: BranchButtonProps) => {\n const { text, variant, count, compact = false, items = [] } = props;\n\n const [open, setOpen] = useState(false);\n\n const [popoverEl, setPopoverRef] = useElement<HTMLElement>();\n const [buttonEl, setButtonEl] = useElement<HTMLElement>();\n const { rtl } = useDirection();\n const t = useI18n();\n\n useOuterEvent('mousedown', [popoverEl, buttonEl], () => {\n if (open) setOpen(false);\n });\n\n let ariaLabel = t('branch_with_no_changes', [text]);\n if (variant === 'success') {\n ariaLabel = t('branch_with_no_potential_conflicts', [text, count ?? 0]);\n } else if (variant === 'urgent') {\n ariaLabel = t('branch_with_potential_conflicts', [text]);\n }\n\n return (\n <>\n <StyledBranchButton\n ref={setButtonEl}\n aria-expanded={open}\n aria-haspopup='menu'\n aria-controls='branch-popover'\n aria-label={ariaLabel}\n branchVariant={variant}\n label={!open && compact ? text : undefined}\n onClick={() => setOpen(cur => !cur)}\n onKeyDown={(e: KeyboardEvent) => {\n if (e.key === 'Escape') setOpen(false);\n }}\n >\n <Flex container={{ alignItems: 'center', gap: compact ? 1 : 0.5 }}>\n <Icon name='nodes-down-solid' />\n {!compact && (\n <>\n <StyledEllipsizedText>{text}</StyledEllipsizedText>\n {variant === 'urgent' ? (\n <StyledWarnIcon name='warn-solid' />\n ) : (\n count !== undefined && <Count>{count}</Count>\n )}\n </>\n )}\n <Icon name='caret-down' />\n </Flex>\n </StyledBranchButton>\n <StyledBranchButtonPopover\n placement={rtl ? 'bottom-end' : 'bottom-start'}\n id='branch-popover'\n hideOnTargetHidden\n show={open}\n target={buttonEl}\n ref={setPopoverRef}\n >\n <Menu\n items={items}\n scrollAt={20}\n onItemClick={() => setOpen(false)}\n focusControlEl={buttonEl || undefined}\n />\n </StyledBranchButtonPopover>\n </>\n );\n};\n\nexport default BranchButton;\n"]}
@@ -1,6 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { NavProps, NavItemRenderProps } from './AppShell.types';
3
- export declare const NavLinkItem: FunctionComponent<NavItemRenderProps>;
4
- declare const NavigationList: FunctionComponent<NavProps>;
5
- export default NavigationList;
6
- //# sourceMappingURL=NavigationList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NavigationList.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/NavigationList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAmBf,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AA2HhE,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,kBAAkB,CAgC7D,CAAC;AAEF,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,QAAQ,CAuC/C,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,97 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useContext, useEffect, useRef, useState } from 'react';
3
- import { useTheme, useEscape, useDirection, Icon, Tooltip, ExpandCollapse, useElement, StandardTree, treeHelpers, useAfterInitialEffect, useUID } from '@pega/cosmos-react-core';
4
- import BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';
5
- import { StyledNavList, StyledAppShellCaretIcon, StyledNavListItem } from './AppShell.styles';
6
- import AppShellContext from './AppShellContext';
7
- const transformItems = (items, expandedIds) => {
8
- if (!items)
9
- return [];
10
- return items.map(item => ({
11
- id: item.id,
12
- label: item.label,
13
- onClick: (id, e) => {
14
- e.stopPropagation();
15
- item.onClick?.(id, e);
16
- },
17
- expanded: item.items ? expandedIds.has(item.id) : undefined,
18
- href: item.href,
19
- nodes: item.items ? transformItems(item.items, expandedIds) : undefined
20
- }));
21
- };
22
- const NavParentItem = ({ label, visual, items, currentItemId }) => {
23
- const { navOpen, navState, openNav } = useContext(AppShellContext);
24
- const { end } = useDirection();
25
- const treeId = useUID();
26
- const { base: { animation } } = useTheme();
27
- const [collapsed, setCollapsed] = useState(true);
28
- const [managedItems, setManagedItems] = useState(() => transformItems(items, new Set()));
29
- const [buttonEl, setButtonEl] = useElement();
30
- const treeRef = useRef(null);
31
- const toggleCollapsed = (e) => {
32
- e.stopPropagation();
33
- if (!navOpen) {
34
- setCollapsed(false);
35
- openNav();
36
- }
37
- else
38
- setCollapsed(state => !state);
39
- };
40
- useEscape(() => {
41
- setCollapsed(true);
42
- buttonEl?.focus();
43
- }, treeRef);
44
- useEffect(() => {
45
- if (currentItemId && treeHelpers.getNode(managedItems, currentItemId)) {
46
- setManagedItems(nodes => treeHelpers.expandTo(nodes, currentItemId));
47
- setCollapsed(false);
48
- }
49
- }, [currentItemId]);
50
- useAfterInitialEffect(() => {
51
- setManagedItems(cur => {
52
- const expandedIds = new Set();
53
- treeHelpers.forEachNode(cur, node => {
54
- if (node.expanded)
55
- expandedIds.add(node.id);
56
- });
57
- return transformItems(items, expandedIds);
58
- });
59
- }, [items]);
60
- return (_jsxs(_Fragment, { children: [_jsxs(BareButton, { ref: setButtonEl, "aria-expanded": !collapsed, "aria-controls": treeId, "aria-label": label, onClick: toggleCollapsed, children: [visual, _jsx("span", { children: label }), navState === 'open' && (_jsx(StyledAppShellCaretIcon, { name: `caret-${end}`, nestedListCollapsed: collapsed }))] }), !navOpen && (_jsx(Tooltip, { target: buttonEl, placement: end, showDelay: 'none', hideDelay: 'none', children: label })), _jsx(ExpandCollapse, { id: treeId, collapsed: collapsed || !navOpen, transitionSpeed: managedItems.length >= 10 ? `calc(2 * ${animation.speed})` : animation.speed, children: _jsx(StandardTree, { ref: treeRef, nodes: managedItems, currentNodeId: currentItemId, selectableParents: false, onNodeToggle: nodeId => {
61
- setManagedItems(nodes => treeHelpers.mapNode(nodes, nodeId, node => {
62
- return {
63
- ...node,
64
- expanded: !node.expanded
65
- };
66
- }));
67
- } }) })] }));
68
- };
69
- export const NavLinkItem = ({ id, label, visual, href, onClick }) => {
70
- const { navOpen } = useContext(AppShellContext);
71
- const { end } = useDirection();
72
- const [listItemEl, setListItemEl] = useElement();
73
- return (_jsxs(_Fragment, { children: [_jsxs(BareButton, { ref: setListItemEl, href: href, onClick: (e) => {
74
- e.stopPropagation();
75
- onClick?.(id, e);
76
- }, "aria-label": label, children: [visual, _jsx("span", { children: label })] }), !navOpen && (_jsx(Tooltip, { target: listItemEl, placement: end, showDelay: 'none', hideDelay: 'none', children: label }))] }));
77
- };
78
- const NavigationList = ({ items, currentItemId }) => {
79
- let ItemComponent;
80
- return (_jsx(StyledNavList, { children: items.map(item => {
81
- let activeTreeRoot = false;
82
- if (item.items) {
83
- ItemComponent = NavParentItem;
84
- if (currentItemId &&
85
- treeHelpers.getNode(transformItems(item.items, new Set()), currentItemId) !== undefined) {
86
- activeTreeRoot = true;
87
- }
88
- }
89
- else {
90
- ItemComponent = NavLinkItem;
91
- }
92
- const ariaCurrent = item.href ? 'page' : 'true';
93
- return (_jsx(StyledNavListItem, { "aria-current": currentItemId === item.id ? ariaCurrent : undefined, activeTreeRoot: activeTreeRoot, id: item.id, children: _jsx(ItemComponent, { ...item, visual: _jsx(Icon, { name: item.icon }), currentItemId: currentItemId }) }, item.id));
94
- }) }));
95
- };
96
- export default NavigationList;
97
- //# sourceMappingURL=NavigationList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NavigationList.js","sourceRoot":"","sources":["../../../src/components/AppShell/NavigationList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAKL,UA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,EAAE,EAAE;IAC/E,IAAI,aAA0B,CAAC;IAE/B,OAAO,CACL,KAAC,aAAa,cACX,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAChB,IAAI,cAAc,GAAG,KAAK,CAAC;YAE3B,IAAI,IAAI,CAAC,KAAK,EAAE;gBACd,aAAa,GAAG,aAAa,CAAC;gBAE9B,IACE,aAAa;oBACb,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,EAAE,CAAC,EAAE,aAAa,CAAC,KAAK,SAAS,EACvF;oBACA,cAAc,GAAG,IAAI,CAAC;iBACvB;aACF;iBAAM;gBACL,aAAa,GAAG,WAAW,CAAC;aAC7B;YAED,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;YAChD,OAAO,CACL,KAAC,iBAAiB,oBACF,aAAa,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EACjE,cAAc,EAAE,cAAc,EAE9B,EAAE,EAAE,IAAI,CAAC,EAAE,YAEX,KAAC,aAAa,OACR,IAAI,EACR,MAAM,EAAE,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,EACjC,aAAa,EAAE,aAAa,GAC5B,IAPG,IAAI,CAAC,EAAE,CAQM,CACrB,CAAC;QACJ,CAAC,CAAC,GACY,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import {\n ElementType,\n FunctionComponent,\n KeyboardEvent,\n MouseEvent,\n useContext,\n useEffect,\n useRef,\n useState\n} from 'react';\n\nimport {\n useTheme,\n useEscape,\n useDirection,\n Icon,\n Tooltip,\n ExpandCollapse,\n useElement,\n StandardTree,\n StandardTreeNode,\n StandardTreeProps,\n treeHelpers,\n useAfterInitialEffect,\n useUID\n} from '@pega/cosmos-react-core';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\n\nimport { NavProps, NavItemRenderProps } from './AppShell.types';\nimport { StyledNavList, StyledAppShellCaretIcon, StyledNavListItem } from './AppShell.styles';\nimport AppShellContext from './AppShellContext';\n\nconst transformItems = (\n items: NavItemRenderProps['items'],\n expandedIds: Set<StandardTreeNode['id']>\n): StandardTreeProps['nodes'] => {\n if (!items) return [];\n\n return items.map(item => ({\n id: item.id,\n label: item.label,\n onClick: (id: string, e: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => {\n e.stopPropagation();\n item.onClick?.(id, e);\n },\n expanded: item.items ? expandedIds.has(item.id) : undefined,\n href: item.href,\n nodes: item.items ? transformItems(item.items, expandedIds) : undefined\n }));\n};\n\nconst NavParentItem: FunctionComponent<NavItemRenderProps> = ({\n label,\n visual,\n items,\n currentItemId\n}) => {\n const { navOpen, navState, openNav } = useContext(AppShellContext);\n const { end } = useDirection();\n const treeId = useUID();\n const {\n base: { animation }\n } = useTheme();\n const [collapsed, setCollapsed] = useState(true);\n const [managedItems, setManagedItems] = useState<StandardTreeProps['nodes']>(() =>\n transformItems(items, new Set())\n );\n\n const [buttonEl, setButtonEl] = useElement<HTMLButtonElement>();\n const treeRef = useRef<HTMLUListElement>(null);\n\n const toggleCollapsed = (e: MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation();\n if (!navOpen) {\n setCollapsed(false);\n openNav();\n } else setCollapsed(state => !state);\n };\n\n useEscape(() => {\n setCollapsed(true);\n buttonEl?.focus();\n }, treeRef);\n\n useEffect(() => {\n if (currentItemId && treeHelpers.getNode(managedItems, currentItemId)) {\n setManagedItems(nodes => treeHelpers.expandTo(nodes, currentItemId));\n setCollapsed(false);\n }\n }, [currentItemId]);\n\n useAfterInitialEffect(() => {\n setManagedItems(cur => {\n const expandedIds = new Set<StandardTreeNode['id']>();\n\n treeHelpers.forEachNode(cur, node => {\n if (node.expanded) expandedIds.add(node.id);\n });\n\n return transformItems(items, expandedIds);\n });\n }, [items]);\n\n return (\n <>\n <BareButton\n ref={setButtonEl}\n aria-expanded={!collapsed}\n aria-controls={treeId}\n aria-label={label}\n onClick={toggleCollapsed}\n >\n {visual}\n <span>{label}</span>\n {navState === 'open' && (\n <StyledAppShellCaretIcon name={`caret-${end}`} nestedListCollapsed={collapsed} />\n )}\n </BareButton>\n {!navOpen && (\n <Tooltip target={buttonEl} placement={end} showDelay='none' hideDelay='none'>\n {label}\n </Tooltip>\n )}\n <ExpandCollapse\n id={treeId}\n collapsed={collapsed || !navOpen}\n transitionSpeed={\n managedItems.length >= 10 ? `calc(2 * ${animation.speed})` : animation.speed\n }\n >\n <StandardTree\n ref={treeRef}\n nodes={managedItems as StandardTreeNode[]}\n currentNodeId={currentItemId}\n selectableParents={false}\n onNodeToggle={nodeId => {\n setManagedItems(nodes =>\n treeHelpers.mapNode(nodes, nodeId, node => {\n return {\n ...node,\n expanded: !node.expanded\n };\n })\n );\n }}\n />\n </ExpandCollapse>\n </>\n );\n};\n\nexport const NavLinkItem: FunctionComponent<NavItemRenderProps> = ({\n id,\n label,\n visual,\n href,\n onClick\n}) => {\n const { navOpen } = useContext(AppShellContext);\n const { end } = useDirection();\n const [listItemEl, setListItemEl] = useElement<HTMLAnchorElement | HTMLButtonElement>();\n\n return (\n <>\n <BareButton\n ref={setListItemEl}\n href={href}\n onClick={(e: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => {\n e.stopPropagation();\n onClick?.(id, e);\n }}\n aria-label={label}\n >\n {visual}\n <span>{label}</span>\n </BareButton>\n {!navOpen && (\n <Tooltip target={listItemEl} placement={end} showDelay='none' hideDelay='none'>\n {label}\n </Tooltip>\n )}\n </>\n );\n};\n\nconst NavigationList: FunctionComponent<NavProps> = ({ items, currentItemId }) => {\n let ItemComponent: ElementType;\n\n return (\n <StyledNavList>\n {items.map(item => {\n let activeTreeRoot = false;\n\n if (item.items) {\n ItemComponent = NavParentItem;\n\n if (\n currentItemId &&\n treeHelpers.getNode(transformItems(item.items, new Set()), currentItemId) !== undefined\n ) {\n activeTreeRoot = true;\n }\n } else {\n ItemComponent = NavLinkItem;\n }\n\n const ariaCurrent = item.href ? 'page' : 'true';\n return (\n <StyledNavListItem\n aria-current={currentItemId === item.id ? ariaCurrent : undefined}\n activeTreeRoot={activeTreeRoot}\n key={item.id}\n id={item.id}\n >\n <ItemComponent\n {...item}\n visual={<Icon name={item.icon} />}\n currentItemId={currentItemId}\n />\n </StyledNavListItem>\n );\n })}\n </StyledNavList>\n );\n};\n\nexport default NavigationList;\n"]}
@@ -1,5 +0,0 @@
1
- export { default } from './AppShell';
2
- export type { AppShellProps, NavProps, NavItemProps, NestedNavItemProps } from './AppShell.types';
3
- export type { AppHeaderProps } from './Header/AppHeader.types';
4
- export type { BranchButtonProps } from './Header/BranchButton';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAClG,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default } from './AppShell';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AppShell/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export { default } from './AppShell';\nexport type { AppShellProps, NavProps, NavItemProps, NestedNavItemProps } from './AppShell.types';\nexport type { AppHeaderProps } from './Header/AppHeader.types';\nexport type { BranchButtonProps } from './Header/BranchButton';\n"]}
@@ -1,10 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { DynamicContentEditorProps } from './DynamicContentEditor.types';
4
- export declare const StyledSearchPopover: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
5
- offset?: number | undefined;
6
- portal?: boolean | undefined;
7
- }, never>;
8
- declare const DynamicContentEditor: FunctionComponent<DynamicContentEditorProps & ForwardProps>;
9
- export default DynamicContentEditor;
10
- //# sourceMappingURL=DynamicContentEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DynamicContentEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicContentEditor/DynamicContentEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAgD,MAAM,OAAO,CAAC;AAKpG,OAAO,EAGL,YAAY,EAab,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,yBAAyB,EAAY,MAAM,8BAA8B,CAAC;AAOnF,eAAO,MAAM,mBAAmB;;;SAE/B,CAAC;AAIF,QAAA,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,yBAAyB,GAAG,YAAY,CAyTlF,CAAC;AAEL,eAAe,oBAAoB,CAAC"}