@pega/cosmos-react-build 8.8.0 → 9.0.0-build.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/lib/components/AuthoringPanel/AuthoringPanel.d.ts +7 -0
  2. package/lib/components/AuthoringPanel/AuthoringPanel.d.ts.map +1 -0
  3. package/lib/components/AuthoringPanel/AuthoringPanel.js +49 -0
  4. package/lib/components/AuthoringPanel/AuthoringPanel.js.map +1 -0
  5. package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts +18 -0
  6. package/lib/components/AuthoringPanel/AuthoringPanel.styles.d.ts.map +1 -0
  7. package/lib/components/AuthoringPanel/AuthoringPanel.styles.js +133 -0
  8. package/lib/components/AuthoringPanel/AuthoringPanel.styles.js.map +1 -0
  9. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.d.ts +2 -0
  10. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.d.ts.map +1 -0
  11. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.js +16 -0
  12. package/lib/components/AuthoringPanel/AuthoringPanel.test-ids.js.map +1 -0
  13. package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts +81 -0
  14. package/lib/components/AuthoringPanel/AuthoringPanel.types.d.ts.map +1 -0
  15. package/lib/components/AuthoringPanel/AuthoringPanel.types.js +2 -0
  16. package/lib/components/AuthoringPanel/AuthoringPanel.types.js.map +1 -0
  17. package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts +6 -0
  18. package/lib/components/AuthoringPanel/AuthoringPanelHeader.d.ts.map +1 -0
  19. package/lib/components/AuthoringPanel/AuthoringPanelHeader.js +41 -0
  20. package/lib/components/AuthoringPanel/AuthoringPanelHeader.js.map +1 -0
  21. package/lib/components/AuthoringPanel/index.d.ts +4 -0
  22. package/lib/components/AuthoringPanel/index.d.ts.map +1 -0
  23. package/lib/components/AuthoringPanel/index.js +3 -0
  24. package/lib/components/AuthoringPanel/index.js.map +1 -0
  25. package/lib/components/Automation/Automation.d.ts +7 -0
  26. package/lib/components/Automation/Automation.d.ts.map +1 -0
  27. package/lib/components/Automation/Automation.js +113 -0
  28. package/lib/components/Automation/Automation.js.map +1 -0
  29. package/lib/components/Automation/Automation.styles.d.ts +12 -0
  30. package/lib/components/Automation/Automation.styles.d.ts.map +1 -0
  31. package/lib/components/Automation/Automation.styles.js +68 -0
  32. package/lib/components/Automation/Automation.styles.js.map +1 -0
  33. package/lib/components/Automation/Automation.test-ids.d.ts +3 -0
  34. package/lib/components/Automation/Automation.test-ids.d.ts.map +1 -0
  35. package/lib/components/Automation/Automation.test-ids.js +21 -0
  36. package/lib/components/Automation/Automation.test-ids.js.map +1 -0
  37. package/lib/components/Automation/Automation.types.d.ts +95 -0
  38. package/lib/components/Automation/Automation.types.d.ts.map +1 -0
  39. package/lib/components/Automation/Automation.types.js +18 -0
  40. package/lib/components/Automation/Automation.types.js.map +1 -0
  41. package/lib/components/Automation/Automation.utils.d.ts +109 -0
  42. package/lib/components/Automation/Automation.utils.d.ts.map +1 -0
  43. package/lib/components/Automation/Automation.utils.js +208 -0
  44. package/lib/components/Automation/Automation.utils.js.map +1 -0
  45. package/lib/components/Automation/AutomationContext.d.ts +4 -0
  46. package/lib/components/Automation/AutomationContext.d.ts.map +1 -0
  47. package/lib/components/Automation/AutomationContext.js +9 -0
  48. package/lib/components/Automation/AutomationContext.js.map +1 -0
  49. package/lib/components/Automation/RuleStep.d.ts +7 -0
  50. package/lib/components/Automation/RuleStep.d.ts.map +1 -0
  51. package/lib/components/Automation/RuleStep.js +151 -0
  52. package/lib/components/Automation/RuleStep.js.map +1 -0
  53. package/lib/components/Automation/index.d.ts +5 -0
  54. package/lib/components/Automation/index.d.ts.map +1 -0
  55. package/lib/components/Automation/index.js +4 -0
  56. package/lib/components/Automation/index.js.map +1 -0
  57. package/lib/components/DynamicInput/BooleanControl.d.ts +2 -2
  58. package/lib/components/DynamicInput/BooleanControl.d.ts.map +1 -1
  59. package/lib/components/DynamicInput/BooleanControl.js.map +1 -1
  60. package/lib/components/DynamicInput/ConstantControl.d.ts +61 -0
  61. package/lib/components/DynamicInput/ConstantControl.d.ts.map +1 -0
  62. package/lib/components/DynamicInput/ConstantControl.js +58 -0
  63. package/lib/components/DynamicInput/ConstantControl.js.map +1 -0
  64. package/lib/components/DynamicInput/DynamicInput.d.ts +2 -2
  65. package/lib/components/DynamicInput/DynamicInput.d.ts.map +1 -1
  66. package/lib/components/DynamicInput/DynamicInput.js +13 -63
  67. package/lib/components/DynamicInput/DynamicInput.js.map +1 -1
  68. package/lib/components/DynamicInput/DynamicInput.styles.d.ts +0 -1
  69. package/lib/components/DynamicInput/DynamicInput.styles.d.ts.map +1 -1
  70. package/lib/components/DynamicInput/DynamicInput.styles.js +48 -41
  71. package/lib/components/DynamicInput/DynamicInput.styles.js.map +1 -1
  72. package/lib/components/DynamicInput/DynamicInput.types.d.ts +26 -81
  73. package/lib/components/DynamicInput/DynamicInput.types.d.ts.map +1 -1
  74. package/lib/components/DynamicInput/DynamicInput.types.js.map +1 -1
  75. package/lib/components/DynamicInput/index.d.ts +2 -0
  76. package/lib/components/DynamicInput/index.d.ts.map +1 -1
  77. package/lib/components/DynamicInput/index.js +1 -0
  78. package/lib/components/DynamicInput/index.js.map +1 -1
  79. package/lib/components/DynamicInput/utils.d.ts.map +1 -1
  80. package/lib/components/DynamicInput/utils.js +3 -2
  81. package/lib/components/DynamicInput/utils.js.map +1 -1
  82. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts +34 -0
  83. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.d.ts.map +1 -0
  84. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.js +55 -0
  85. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.js.map +1 -0
  86. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.d.ts +2 -0
  87. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.d.ts.map +1 -0
  88. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.js +10 -0
  89. package/lib/components/EmptyRuleTemplate/EmptyRuleTemplate.test-ids.js.map +1 -0
  90. package/lib/components/EmptyRuleTemplate/index.d.ts +3 -0
  91. package/lib/components/EmptyRuleTemplate/index.d.ts.map +1 -0
  92. package/lib/components/EmptyRuleTemplate/index.js +2 -0
  93. package/lib/components/EmptyRuleTemplate/index.js.map +1 -0
  94. package/lib/components/Expression/Expression.d.ts.map +1 -1
  95. package/lib/components/Expression/Expression.js +8 -7
  96. package/lib/components/Expression/Expression.js.map +1 -1
  97. package/lib/components/Expression/Expression.styles.d.ts +5 -1
  98. package/lib/components/Expression/Expression.styles.d.ts.map +1 -1
  99. package/lib/components/Expression/Expression.styles.js +15 -3
  100. package/lib/components/Expression/Expression.styles.js.map +1 -1
  101. package/lib/components/Expression/Expression.test-ids.d.ts +1 -0
  102. package/lib/components/Expression/Expression.test-ids.d.ts.map +1 -1
  103. package/lib/components/Expression/Expression.test-ids.js +6 -0
  104. package/lib/components/Expression/Expression.test-ids.js.map +1 -1
  105. package/lib/components/Expression/ExpressionBuilderModal.d.ts +6 -0
  106. package/lib/components/Expression/ExpressionBuilderModal.d.ts.map +1 -0
  107. package/lib/components/Expression/ExpressionBuilderModal.js +53 -0
  108. package/lib/components/Expression/ExpressionBuilderModal.js.map +1 -0
  109. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.d.ts.map +1 -1
  110. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js +1 -0
  111. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.js.map +1 -1
  112. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.d.ts.map +1 -1
  113. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js +3 -2
  114. package/lib/components/ExpressionBuilder/CodeEditor/CodeEditor.styles.js.map +1 -1
  115. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts +4 -2
  116. package/lib/components/ExpressionBuilder/ExpressionBuilder.d.ts.map +1 -1
  117. package/lib/components/ExpressionBuilder/ExpressionBuilder.js +66 -25
  118. package/lib/components/ExpressionBuilder/ExpressionBuilder.js.map +1 -1
  119. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts +18 -2
  120. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.d.ts.map +1 -1
  121. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js +80 -13
  122. package/lib/components/ExpressionBuilder/ExpressionBuilder.styles.js.map +1 -1
  123. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.d.ts +5 -0
  124. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.d.ts.map +1 -0
  125. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.js +22 -0
  126. package/lib/components/ExpressionBuilder/ExpressionBuilder.test-ids.js.map +1 -0
  127. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts +33 -5
  128. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.d.ts.map +1 -1
  129. package/lib/components/ExpressionBuilder/ExpressionBuilder.types.js.map +1 -1
  130. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts +4 -2
  131. package/lib/components/ExpressionBuilder/ExpressionDetails.d.ts.map +1 -1
  132. package/lib/components/ExpressionBuilder/ExpressionDetails.js +6 -4
  133. package/lib/components/ExpressionBuilder/ExpressionDetails.js.map +1 -1
  134. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts +4 -2
  135. package/lib/components/ExpressionBuilder/ExpressionItem.d.ts.map +1 -1
  136. package/lib/components/ExpressionBuilder/ExpressionItem.js +8 -6
  137. package/lib/components/ExpressionBuilder/ExpressionItem.js.map +1 -1
  138. package/lib/components/ExpressionBuilder/ExpressionList.d.ts +4 -2
  139. package/lib/components/ExpressionBuilder/ExpressionList.d.ts.map +1 -1
  140. package/lib/components/ExpressionBuilder/ExpressionList.js +17 -5
  141. package/lib/components/ExpressionBuilder/ExpressionList.js.map +1 -1
  142. package/lib/components/ExpressionBuilder/index.d.ts +1 -0
  143. package/lib/components/ExpressionBuilder/index.d.ts.map +1 -1
  144. package/lib/components/ExpressionBuilder/index.js +1 -0
  145. package/lib/components/ExpressionBuilder/index.js.map +1 -1
  146. package/lib/components/FieldReference/FieldReference.types.d.ts +16 -2
  147. package/lib/components/FieldReference/FieldReference.types.d.ts.map +1 -1
  148. package/lib/components/FieldReference/FieldReference.types.js.map +1 -1
  149. package/lib/components/FieldReference/FieldReferenceInput.d.ts.map +1 -1
  150. package/lib/components/FieldReference/FieldReferenceInput.js +5 -5
  151. package/lib/components/FieldReference/FieldReferenceInput.js.map +1 -1
  152. package/lib/components/FieldReference/helpers.d.ts +7 -1
  153. package/lib/components/FieldReference/helpers.d.ts.map +1 -1
  154. package/lib/components/FieldReference/helpers.js +31 -1
  155. package/lib/components/FieldReference/helpers.js.map +1 -1
  156. package/lib/components/FieldReference/index.d.ts +2 -2
  157. package/lib/components/FieldReference/index.d.ts.map +1 -1
  158. package/lib/components/FieldReference/index.js +1 -1
  159. package/lib/components/FieldReference/index.js.map +1 -1
  160. package/lib/components/IconTile/iconUtils.d.ts +2 -1
  161. package/lib/components/IconTile/iconUtils.d.ts.map +1 -1
  162. package/lib/components/IconTile/iconUtils.js +94 -1
  163. package/lib/components/IconTile/iconUtils.js.map +1 -1
  164. package/lib/components/IconTile/index.d.ts +1 -0
  165. package/lib/components/IconTile/index.d.ts.map +1 -1
  166. package/lib/components/IconTile/index.js +1 -0
  167. package/lib/components/IconTile/index.js.map +1 -1
  168. package/lib/components/LifeCycle/Category.d.ts +0 -1
  169. package/lib/components/LifeCycle/Category.d.ts.map +1 -1
  170. package/lib/components/LifeCycle/Category.js +16 -56
  171. package/lib/components/LifeCycle/Category.js.map +1 -1
  172. package/lib/components/LifeCycle/LifeCycle.js +2 -2
  173. package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
  174. package/lib/components/LifeCycle/LifeCycle.types.d.ts +37 -2
  175. package/lib/components/LifeCycle/LifeCycle.types.d.ts.map +1 -1
  176. package/lib/components/LifeCycle/LifeCycle.types.js +9 -9
  177. package/lib/components/LifeCycle/LifeCycle.types.js.map +1 -1
  178. package/lib/components/LifeCycle/LifeCycleDragDropList.d.ts.map +1 -1
  179. package/lib/components/LifeCycle/LifeCycleDragDropList.js +25 -3
  180. package/lib/components/LifeCycle/LifeCycleDragDropList.js.map +1 -1
  181. package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
  182. package/lib/components/LifeCycle/Stage.js +20 -11
  183. package/lib/components/LifeCycle/Stage.js.map +1 -1
  184. package/lib/components/LifeCycle/Step.d.ts.map +1 -1
  185. package/lib/components/LifeCycle/Step.js +1 -0
  186. package/lib/components/LifeCycle/Step.js.map +1 -1
  187. package/lib/components/LifeCycle/Task.d.ts +7 -1
  188. package/lib/components/LifeCycle/Task.d.ts.map +1 -1
  189. package/lib/components/LifeCycle/Task.js +19 -10
  190. package/lib/components/LifeCycle/Task.js.map +1 -1
  191. package/lib/components/LifeCycle/TaskGroup.d.ts +23 -0
  192. package/lib/components/LifeCycle/TaskGroup.d.ts.map +1 -0
  193. package/lib/components/LifeCycle/TaskGroup.js +92 -0
  194. package/lib/components/LifeCycle/TaskGroup.js.map +1 -0
  195. package/lib/components/LifeCycle/index.d.ts +1 -1
  196. package/lib/components/LifeCycle/index.d.ts.map +1 -1
  197. package/lib/components/LifeCycle/index.js +1 -1
  198. package/lib/components/LifeCycle/index.js.map +1 -1
  199. package/lib/components/LifeCycle/utils.d.ts +6 -1
  200. package/lib/components/LifeCycle/utils.d.ts.map +1 -1
  201. package/lib/components/LifeCycle/utils.js +129 -0
  202. package/lib/components/LifeCycle/utils.js.map +1 -1
  203. package/lib/components/ObjectSelect/InputTree/InputTree.d.ts +21 -0
  204. package/lib/components/ObjectSelect/InputTree/InputTree.d.ts.map +1 -0
  205. package/lib/components/ObjectSelect/InputTree/InputTree.js +20 -0
  206. package/lib/components/ObjectSelect/InputTree/InputTree.js.map +1 -0
  207. package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts +10 -0
  208. package/lib/components/ObjectSelect/InputTree/InputTree.styles.d.ts.map +1 -0
  209. package/lib/components/ObjectSelect/InputTree/InputTree.styles.js +82 -0
  210. package/lib/components/ObjectSelect/InputTree/InputTree.styles.js.map +1 -0
  211. package/lib/components/ObjectSelect/InputTree/index.d.ts +3 -0
  212. package/lib/components/ObjectSelect/InputTree/index.d.ts.map +1 -0
  213. package/lib/components/ObjectSelect/InputTree/index.js +2 -0
  214. package/lib/components/ObjectSelect/InputTree/index.js.map +1 -0
  215. package/lib/components/ObjectSelect/ObjectPicker.d.ts +11 -5
  216. package/lib/components/ObjectSelect/ObjectPicker.d.ts.map +1 -1
  217. package/lib/components/ObjectSelect/ObjectPicker.js +24 -15
  218. package/lib/components/ObjectSelect/ObjectPicker.js.map +1 -1
  219. package/lib/components/ObjectSelect/ObjectSelect.d.ts +2 -29
  220. package/lib/components/ObjectSelect/ObjectSelect.d.ts.map +1 -1
  221. package/lib/components/ObjectSelect/ObjectSelect.js +80 -23
  222. package/lib/components/ObjectSelect/ObjectSelect.js.map +1 -1
  223. package/lib/components/ObjectSelect/ObjectSelect.types.d.ts +53 -0
  224. package/lib/components/ObjectSelect/ObjectSelect.types.d.ts.map +1 -0
  225. package/lib/components/ObjectSelect/ObjectSelect.types.js +2 -0
  226. package/lib/components/ObjectSelect/ObjectSelect.types.js.map +1 -0
  227. package/lib/components/ObjectSelect/index.d.ts +1 -1
  228. package/lib/components/ObjectSelect/index.d.ts.map +1 -1
  229. package/lib/components/ObjectSelect/index.js.map +1 -1
  230. package/lib/components/ObjectSelect/useCreateModal.d.ts +6 -2
  231. package/lib/components/ObjectSelect/useCreateModal.d.ts.map +1 -1
  232. package/lib/components/ObjectSelect/useCreateModal.js +7 -4
  233. package/lib/components/ObjectSelect/useCreateModal.js.map +1 -1
  234. package/lib/components/PageBanner/PageBanner.d.ts +6 -4
  235. package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
  236. package/lib/components/PageBanner/PageBanner.js +10 -9
  237. package/lib/components/PageBanner/PageBanner.js.map +1 -1
  238. package/lib/components/PageBanner/PageBanner.test-ids.d.ts +2 -0
  239. package/lib/components/PageBanner/PageBanner.test-ids.d.ts.map +1 -0
  240. package/lib/components/PageBanner/PageBanner.test-ids.js +9 -0
  241. package/lib/components/PageBanner/PageBanner.test-ids.js.map +1 -0
  242. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts +12 -0
  243. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.d.ts.map +1 -0
  244. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js +158 -0
  245. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageHeader.js.map +1 -0
  246. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts +5 -0
  247. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.d.ts.map +1 -0
  248. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js +17 -0
  249. package/lib/components/PageTemplates/ConstructPageTemplate/ConstructPageTemplate.js.map +1 -0
  250. package/lib/components/PageTemplates/GalleryPage.d.ts +14 -4
  251. package/lib/components/PageTemplates/GalleryPage.d.ts.map +1 -1
  252. package/lib/components/PageTemplates/GalleryPage.js +57 -12
  253. package/lib/components/PageTemplates/GalleryPage.js.map +1 -1
  254. package/lib/components/PageTemplates/HeaderActionButtons.d.ts +5 -0
  255. package/lib/components/PageTemplates/HeaderActionButtons.d.ts.map +1 -0
  256. package/lib/components/PageTemplates/HeaderActionButtons.js +14 -0
  257. package/lib/components/PageTemplates/HeaderActionButtons.js.map +1 -0
  258. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.d.ts +8 -0
  259. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.d.ts.map +1 -0
  260. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.js +23 -0
  261. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageHeader.js.map +1 -0
  262. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.d.ts +5 -0
  263. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.d.ts.map +1 -0
  264. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.js +10 -0
  265. package/lib/components/PageTemplates/InventoryPageTemplate/InventoryPageTemplate.js.map +1 -0
  266. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.d.ts +5 -0
  267. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.d.ts.map +1 -0
  268. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.js +10 -0
  269. package/lib/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.js.map +1 -0
  270. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.d.ts +21 -0
  271. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.d.ts.map +1 -0
  272. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.js +22 -0
  273. package/lib/components/PageTemplates/OverviewPageTemplate/PageBanner.js.map +1 -0
  274. package/lib/components/PageTemplates/PageTemplate.styles.d.ts +16 -0
  275. package/lib/components/PageTemplates/PageTemplate.styles.d.ts.map +1 -0
  276. package/lib/components/PageTemplates/PageTemplate.styles.js +167 -0
  277. package/lib/components/PageTemplates/PageTemplate.styles.js.map +1 -0
  278. package/lib/components/PageTemplates/PageTemplate.types.d.ts +114 -0
  279. package/lib/components/PageTemplates/PageTemplate.types.d.ts.map +1 -0
  280. package/lib/components/PageTemplates/PageTemplate.types.js +2 -0
  281. package/lib/components/PageTemplates/PageTemplate.types.js.map +1 -0
  282. package/lib/components/PageTemplates/PageTemplates.d.ts +16 -12
  283. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  284. package/lib/components/PageTemplates/PageTemplates.js +12 -12
  285. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  286. package/lib/components/PageTemplates/PageTemplates.test-ids.d.ts +4 -0
  287. package/lib/components/PageTemplates/PageTemplates.test-ids.d.ts.map +1 -0
  288. package/lib/components/PageTemplates/PageTemplates.test-ids.js +25 -0
  289. package/lib/components/PageTemplates/PageTemplates.test-ids.js.map +1 -0
  290. package/lib/components/PageTemplates/ShowcasePage.d.ts +2 -2
  291. package/lib/components/PageTemplates/ShowcasePage.d.ts.map +1 -1
  292. package/lib/components/PageTemplates/ShowcasePage.js +5 -6
  293. package/lib/components/PageTemplates/ShowcasePage.js.map +1 -1
  294. package/lib/components/PageTemplates/index.d.ts +6 -1
  295. package/lib/components/PageTemplates/index.d.ts.map +1 -1
  296. package/lib/components/PageTemplates/index.js +5 -1
  297. package/lib/components/PageTemplates/index.js.map +1 -1
  298. package/lib/components/RulePicker/RulePicker.d.ts +4 -0
  299. package/lib/components/RulePicker/RulePicker.d.ts.map +1 -0
  300. package/lib/components/RulePicker/RulePicker.js +81 -0
  301. package/lib/components/RulePicker/RulePicker.js.map +1 -0
  302. package/lib/index.d.ts +5 -1
  303. package/lib/index.d.ts.map +1 -1
  304. package/lib/index.js +5 -1
  305. package/lib/index.js.map +1 -1
  306. package/lib/utils/typeIconMapping.js +1 -1
  307. package/lib/utils/typeIconMapping.js.map +1 -1
  308. package/package.json +4 -4
  309. package/lib/utils/index.d.ts +0 -2
  310. package/lib/utils/index.d.ts.map +0 -1
  311. package/lib/utils/index.js +0 -2
  312. package/lib/utils/index.js.map +0 -1
  313. package/lib/utils/utils.d.ts +0 -14
  314. package/lib/utils/utils.d.ts.map +0 -1
  315. package/lib/utils/utils.js +0 -13
  316. package/lib/utils/utils.js.map +0 -1
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { OneColumnPage as CoreOneColumnPage } from '@pega/cosmos-react-core';
4
+ import { StyledOverviewPage } from '../PageTemplate.styles';
5
+ import PageBanner from './PageBanner';
6
+ const OverviewPageTemplate = forwardRef(function OverviewPageTemplate({ testId, header, content, ...restProps }, ref) {
7
+ return (_jsx(CoreOneColumnPage, { ...restProps, a: content, as: StyledOverviewPage, header: _jsx(PageBanner, { ...header, testId: testId }), scrollContent: true, title: header.title, ref: ref }));
8
+ });
9
+ export default OverviewPageTemplate;
10
+ //# sourceMappingURL=OverviewPageTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverviewPageTemplate.js","sourceRoot":"","sources":["../../../../src/components/PageTemplates/OverviewPageTemplate/OverviewPageTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAI7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,oBAAoB,GAA+D,UAAU,CACjG,SAAS,oBAAoB,CAC3B,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,EAA8C,EACrF,GAAqC;IAErC,OAAO,CACL,KAAC,iBAAiB,OACZ,SAAS,EACb,CAAC,EAAE,OAAO,EACV,EAAE,EAAE,kBAAkB,EACtB,MAAM,EAAE,KAAC,UAAU,OAAK,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,EAClD,aAAa,QACb,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,GAAG,EAAE,GAAG,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { PropsWithoutRef } from 'react';\n\nimport { OneColumnPage as CoreOneColumnPage } from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';\n\nimport type { OverviewPageTemplateProps } from '../PageTemplate.types';\nimport { StyledOverviewPage } from '../PageTemplate.styles';\n\nimport PageBanner from './PageBanner';\n\nconst OverviewPageTemplate: ForwardRefForwardPropsComponent<OverviewPageTemplateProps> = forwardRef(\n function OverviewPageTemplate(\n { testId, header, content, ...restProps }: PropsWithoutRef<OverviewPageTemplateProps>,\n ref: OverviewPageTemplateProps['ref']\n ) {\n return (\n <CoreOneColumnPage\n {...restProps}\n a={content}\n as={StyledOverviewPage}\n header={<PageBanner {...header} testId={testId} />}\n scrollContent\n title={header.title}\n ref={ref}\n />\n );\n }\n);\n\nexport default OverviewPageTemplate;\n"]}
@@ -0,0 +1,21 @@
1
+ import type { FunctionComponent, MouseEventHandler } from 'react';
2
+ import { type ImageProps, type NoChildrenProp, type TestIdProp } from '@pega/cosmos-react-core';
3
+ interface Action {
4
+ label: string;
5
+ onClick: MouseEventHandler<HTMLButtonElement>;
6
+ }
7
+ export interface PageBannerProps extends NoChildrenProp, TestIdProp {
8
+ title: string;
9
+ description: string;
10
+ image?: ImageProps;
11
+ actions?: [Action] | [Action, Action];
12
+ link?: {
13
+ label: string;
14
+ href: string;
15
+ };
16
+ }
17
+ declare const _default: FunctionComponent<PageBannerProps> & {
18
+ getTestIds: (testIdProp?: TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["title", "status", "edit-details", "additional-info-icon", "type", "meta-data", "primary-meta-data", "secondary-meta-data", "visual", "primary-action", "secondary-action", "additional-actions", "banner-description", "banner-link", "banner-actions", "banner-image"]>;
19
+ };
20
+ export default _default;
21
+ //# sourceMappingURL=PageBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/PageTemplates/OverviewPageTemplate/PageBanner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAElE,OAAO,EAML,KAAK,UAAU,EAIf,KAAK,cAAc,EACnB,KAAK,UAAU,EAGhB,MAAM,yBAAyB,CAAC;AAKjC,UAAU,MAAM;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,eAAgB,SAAQ,cAAc,EAAE,UAAU;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,IAAI,CAAC,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;;;;AA8DD,wBAA6D"}
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef } from 'react';
3
+ import { Flex, Grid, Image, Text, Button, Link, useBreakpoint, ShowMoreLess, useTestIds, withTestIds } from '@pega/cosmos-react-core';
4
+ import { StyledActions, StyledPageBanner } from '../PageTemplate.styles';
5
+ import { getPageHeaderTestIds } from '../PageTemplates.test-ids';
6
+ const PageBanner = ({ testId, title, description, image, actions, link }) => {
7
+ const testIds = useTestIds(testId, getPageHeaderTestIds);
8
+ const headerRef = useRef(null);
9
+ const isMediumOrAbove = useBreakpoint('md', { breakpointRef: headerRef });
10
+ const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: headerRef });
11
+ const largePadding = 8;
12
+ const smallPadding = 2;
13
+ const largeGap = 8;
14
+ const mediumGap = 4;
15
+ return (_jsx("div", { ref: headerRef, children: _jsxs(Grid, { container: {
16
+ cols: isSmallOrAbove && image ? '1fr 25%' : '1fr',
17
+ pad: isMediumOrAbove ? [0, largePadding, 0, smallPadding] : [0, smallPadding],
18
+ gap: isMediumOrAbove ? largeGap : mediumGap
19
+ }, as: StyledPageBanner, children: [_jsxs(Flex, { container: { direction: 'column', pad: [smallPadding, 0], rowGap: 1 }, children: [_jsx(Text, { "data-testid": testIds.title, variant: 'h1', children: title }), _jsx(ShowMoreLess, { lines: 3, children: _jsx(Text, { "data-testid": testIds.bannerDescription, as: 'p', children: description }) }), (actions || link) && (_jsxs(StyledActions, { "data-testid": testIds.bannerActions, container: { alignItems: 'center', pad: [1, 0, 0, 0], colGap: 2, wrap: 'wrap' }, children: [actions?.map(action => (_jsx(Button, { onClick: action.onClick, children: action.label }, action.label))), link && (_jsx(Link, { "data-testid": testIds.bannerLink, href: link.href, children: link.label }))] }))] }), isSmallOrAbove && image && _jsx(Image, { ...image, "data-testid": testIds.bannerImage })] }) }));
20
+ };
21
+ export default withTestIds(PageBanner, getPageHeaderTestIds);
22
+ //# sourceMappingURL=PageBanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageBanner.js","sourceRoot":"","sources":["../../../../src/components/PageTemplates/OverviewPageTemplate/PageBanner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,MAAM,EAEN,IAAI,EACJ,aAAa,EACb,YAAY,EAGZ,UAAU,EACV,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAkBjE,MAAM,UAAU,GAAuC,CAAC,EACtD,MAAM,EACN,KAAK,EACL,WAAW,EACX,KAAK,EACL,OAAO,EACP,IAAI,EACL,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,eAAe,GAAG,aAAa,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1E,MA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AI,EAAE,MAAM,EAAE,aAE9E,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CACtB,KAAC,MAAM,IAAoB,OAAO,EAAE,MAAM,CAAC,OAAO,YAC/C,MAAM,CAAC,KAAK,IADF,MAAM,CAAC,KAAK,CAEhB,CACV,CAAC,EACD,IAAI,IAAI,CACP,KAAC,IAAI,mBAAc,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,YACnD,IAAI,CAAC,KAAK,GACN,CACR,IACa,CACjB,IACI,EACN,cAAc,IAAI,KAAK,IAAI,KAAC,KAAK,OAAK,KAAK,iBAAe,OAAO,CAAC,WAAW,GAAI,IAC7E,GACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { useRef } from 'react';\nimport type { FunctionComponent, MouseEventHandler } from 'react';\n\nimport {\n Flex,\n Grid,\n Image,\n Text,\n Button,\n type ImageProps,\n Link,\n useBreakpoint,\n ShowMoreLess,\n type NoChildrenProp,\n type TestIdProp,\n useTestIds,\n withTestIds\n} from '@pega/cosmos-react-core';\n\nimport { StyledActions, StyledPageBanner } from '../PageTemplate.styles';\nimport { getPageHeaderTestIds } from '../PageTemplates.test-ids';\n\ninterface Action {\n label: string;\n onClick: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport interface PageBannerProps extends NoChildrenProp, TestIdProp {\n title: string;\n description: string;\n image?: ImageProps;\n actions?: [Action] | [Action, Action];\n link?: {\n label: string;\n href: string;\n };\n}\n\nconst PageBanner: FunctionComponent<PageBannerProps> = ({\n testId,\n title,\n description,\n image,\n actions,\n link\n}) => {\n const testIds = useTestIds(testId, getPageHeaderTestIds);\n const headerRef = useRef<HTMLDivElement>(null);\n const isMediumOrAbove = useBreakpoint('md', { breakpointRef: headerRef });\n const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: headerRef });\n const largePadding = 8;\n const smallPadding = 2;\n const largeGap = 8;\n const mediumGap = 4;\n\n return (\n <div ref={headerRef}>\n <Grid\n container={{\n cols: isSmallOrAbove && image ? '1fr 25%' : '1fr',\n pad: isMediumOrAbove ? [0, largePadding, 0, smallPadding] : [0, smallPadding],\n gap: isMediumOrAbove ? largeGap : mediumGap\n }}\n as={StyledPageBanner}\n >\n <Flex container={{ direction: 'column', pad: [smallPadding, 0], rowGap: 1 }}>\n <Text data-testid={testIds.title} variant='h1'>\n {title}\n </Text>\n <ShowMoreLess lines={3}>\n <Text data-testid={testIds.bannerDescription} as='p'>\n {description}\n </Text>\n </ShowMoreLess>\n {(actions || link) && (\n <StyledActions\n data-testid={testIds.bannerActions}\n container={{ alignItems: 'center', pad: [1, 0, 0, 0], colGap: 2, wrap: 'wrap' }}\n >\n {actions?.map(action => (\n <Button key={action.label} onClick={action.onClick}>\n {action.label}\n </Button>\n ))}\n {link && (\n <Link data-testid={testIds.bannerLink} href={link.href}>\n {link.label}\n </Link>\n )}\n </StyledActions>\n )}\n </Flex>\n {isSmallOrAbove && image && <Image {...image} data-testid={testIds.bannerImage} />}\n </Grid>\n </div>\n );\n};\n\nexport default withTestIds(PageBanner, getPageHeaderTestIds);\n"]}
@@ -0,0 +1,16 @@
1
+ import { Text, Button } from '@pega/cosmos-react-core';
2
+ export declare const StyledPageBanner: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledActions: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const StyledDescription: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
5
+ export declare const StyledInventoryPage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
+ export declare const StyledInventoryPageTitleWrapper: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
7
+ export declare const StyledOverviewPage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
8
+ export declare const StyledHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
9
+ export declare const StyledTitleContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
10
+ export declare const StyledTextWithEllipsis: typeof Text;
11
+ export declare const StyledText: typeof Text;
12
+ export declare const StyledPrimaryMetaButton: typeof Button;
13
+ export declare const StyledPrimaryActionWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
14
+ hasAdditionalAction: boolean;
15
+ }, never>;
16
+ //# sourceMappingURL=PageTemplate.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageTemplate.styles.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplate.styles.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,IAAI,EAEJ,MAAM,EAOP,MAAM,yBAAyB,CAAC;AAWjC,eAAO,MAAM,gBAAgB,yGAiD3B,CAAC;AAIH,eAAO,MAAM,aAAa,kNAEzB,CAAC;AAGF,eAAO,MAAM,iBAAiB,yGAO5B,CAAC;AAKH,eAAO,MAAM,mBAAmB,yGA+B/B,CAAC;AAIF,eAAO,MAAM,+BAA+B,kNAW1C,CAAC;AAKH,eAAO,MAAM,kBAAkB,yGAa9B,CAAC;AAGF,eAAO,MAAM,YAAY,yGAUvB,CAAC;AAIH,eAAO,MAAM,oBAAoB,yGAEhC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,OAAO,IAG3C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,OAAO,IAQ9B,CAAC;AAEH,eAAO,MAAM,uBAAuB,EAAE,OAAO,MAoB3C,CAAC;AAIH,eAAO,MAAM,0BAA0B;yBAAqC,OAAO;SAUlF,CAAC"}
@@ -0,0 +1,167 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { transparentize } from 'polished';
3
+ import { Text, defaultThemeProp, Button, StyledPageHeader, StyledButton, StyledLink, StyledShowMoreLessButton, Flex, StyledImage } from '@pega/cosmos-react-core';
4
+ import { StyledBanner, StyledBannerMessageList } from '@pega/cosmos-react-core/lib/components/Banner/Banner';
5
+ import { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';
6
+ import { calculateFontSize } from '@pega/cosmos-react-core/lib/styles';
7
+ import { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';
8
+ // Page banner styles
9
+ export const StyledPageBanner = styled.div(({ theme }) => {
10
+ const { base: { 'font-weight': fontWeight, 'content-width': contentWidth, 'border-radius': borderRadius, spacing, palette: { 'foreground-color': color } } } = theme;
11
+ return css `
12
+ background: ${transparentize(0.95, color)};
13
+ border-radius: ${borderRadius};
14
+ padding-block-start: ${spacing};
15
+
16
+ &,
17
+ h1 {
18
+ color: ${color};
19
+ }
20
+
21
+ h1:focus-visible {
22
+ outline: transparent;
23
+ }
24
+
25
+ ${StyledButton} {
26
+ color: ${color};
27
+ }
28
+
29
+ ${StyledButton} + ${StyledButton} {
30
+ margin-inline-start: 0;
31
+ }
32
+
33
+ ${StyledLink}, ${StyledShowMoreLessButton} {
34
+ font-weight: ${fontWeight['semi-bold']};
35
+ color: ${color};
36
+ }
37
+
38
+ p {
39
+ max-width: ${contentWidth.xl};
40
+ }
41
+
42
+ ${StyledImage} {
43
+ object-fit: contain;
44
+ max-height: 10rem;
45
+ justify-self: center;
46
+ align-self: center;
47
+ }
48
+ `;
49
+ });
50
+ StyledPageBanner.defaultProps = defaultThemeProp;
51
+ export const StyledActions = styled(Flex) `
52
+ margin-block-start: auto;
53
+ `;
54
+ // Common styles
55
+ export const StyledDescription = styled.div(({ theme }) => {
56
+ return css `
57
+ max-width: ${theme.base['content-width'].lg};
58
+ * {
59
+ overflow: hidden;
60
+ }
61
+ `;
62
+ });
63
+ StyledDescription.defaultProps = defaultThemeProp;
64
+ // Inventory page styles
65
+ export const StyledInventoryPage = styled.div(({ theme: { base: { spacing, palette: { 'primary-background': primaryBackground } } } }) => {
66
+ return css `
67
+ background: ${primaryBackground};
68
+ height: 100%;
69
+
70
+ ${StyledBanner},
71
+ ${StyledTabs} {
72
+ margin-block-start: calc(1.5 * ${spacing});
73
+ }
74
+
75
+ ${StyledPageHeader} {
76
+ padding: calc(2 * ${spacing});
77
+ }
78
+
79
+ ${StyledBannerMessageList} {
80
+ max-height: 25vh;
81
+ overflow: auto;
82
+ }
83
+ ${StyledDescription} {
84
+ margin-block-start: calc(${spacing} * 1.5);
85
+ }
86
+ `;
87
+ });
88
+ StyledInventoryPage.defaultProps = defaultThemeProp;
89
+ export const StyledInventoryPageTitleWrapper = styled(Flex)(({ theme }) => {
90
+ const { base: { 'content-width': contentWidth, spacing } } = theme;
91
+ return css `
92
+ max-width: ${contentWidth.xl};
93
+
94
+ h1 {
95
+ margin-inline-end: calc(${spacing} * 2);
96
+ }
97
+ `;
98
+ });
99
+ StyledInventoryPageTitleWrapper.defaultProps = defaultThemeProp;
100
+ // overview page styles
101
+ export const StyledOverviewPage = styled.div `
102
+ /* remove the default padding set by header */
103
+ ${StyledPageHeader} {
104
+ padding: 0;
105
+ }
106
+
107
+ ${StyledShowMoreLessButton} {
108
+ max-width: fit-content;
109
+ }
110
+
111
+ ${StyledPageBanner} {
112
+ background: none;
113
+ }
114
+ `;
115
+ // Construct page styles
116
+ export const StyledHeader = styled.div(({ theme }) => {
117
+ return css `
118
+ background: ${transparentize(0.95, theme.base.palette['foreground-color'])};
119
+ border-radius: ${theme.base['border-radius']};
120
+ padding: calc(2 * ${theme.base.spacing});
121
+
122
+ h1:focus-visible {
123
+ box-shadow: ${theme.base.shadow['focus-inset']};
124
+ }
125
+ `;
126
+ });
127
+ StyledHeader.defaultProps = defaultThemeProp;
128
+ export const StyledTitleContainer = styled.div `
129
+ width: calc(100% - 3rem);
130
+ `;
131
+ export const StyledTextWithEllipsis = styled(Text) `
132
+ display: block;
133
+ ${ellipsisOverflow}
134
+ `;
135
+ export const StyledText = styled(Text)(({ showEllipsis }) => {
136
+ return css `
137
+ width: 100%;
138
+ white-space: nowrap;
139
+ ${showEllipsis && ellipsisOverflow}
140
+ `;
141
+ });
142
+ export const StyledPrimaryMetaButton = styled(Button)(props => {
143
+ const { theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, shadow }, components: { text } } } = props;
144
+ const fontSizes = calculateFontSize(fontSize, fontScale);
145
+ return css `
146
+ font-size: ${fontSizes[text.h1['font-size']]};
147
+ font-weight: ${text.h1['font-weight']};
148
+ width: 100%;
149
+ ${ellipsisOverflow}
150
+
151
+ &:not([disabled]):focus {
152
+ box-shadow: ${shadow['focus-inset']};
153
+ }
154
+ `;
155
+ });
156
+ StyledPrimaryMetaButton.defaultProps = defaultThemeProp;
157
+ export const StyledPrimaryActionWrapper = styled.div(({ theme, hasAdditionalAction }) => {
158
+ return css `
159
+ margin-inline-end: ${hasAdditionalAction ? theme.base.spacing : 0};
160
+
161
+ ${StyledButton} {
162
+ font-weight: ${theme.base['font-weight']['semi-bold']};
163
+ }
164
+ `;
165
+ });
166
+ StyledPrimaryActionWrapper.defaultProps = defaultThemeProp;
167
+ //# sourceMappingURL=PageTemplate.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageTemplate.styles.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplate.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EACL,IAAI,EACJ,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,wBAAwB,EACxB,IAAI,EACJ,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,YAAY,EACZ,uBAAuB,EACxB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,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CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;;QAE/D,YAAY;uBACG,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC;;KAExD,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,0BAA0B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { transparentize } from 'polished';\n\nimport {\n Text,\n defaultThemeProp,\n Button,\n StyledPageHeader,\n StyledButton,\n StyledLink,\n StyledShowMoreLessButton,\n Flex,\n StyledImage\n} from '@pega/cosmos-react-core';\nimport {\n StyledBanner,\n StyledBannerMessageList\n} from '@pega/cosmos-react-core/lib/components/Banner/Banner';\nimport { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\nimport { calculateFontSize } from '@pega/cosmos-react-core/lib/styles';\nimport type { FontSize } from '@pega/cosmos-react-core/lib/styles';\nimport { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';\n\n// Page banner styles\nexport const StyledPageBanner = styled.div(({ theme }) => {\n const {\n base: {\n 'font-weight': fontWeight,\n 'content-width': contentWidth,\n 'border-radius': borderRadius,\n spacing,\n palette: { 'foreground-color': color }\n }\n } = theme;\n\n return css`\n background: ${transparentize(0.95, color)};\n border-radius: ${borderRadius};\n padding-block-start: ${spacing};\n\n &,\n h1 {\n color: ${color};\n }\n\n h1:focus-visible {\n outline: transparent;\n }\n\n ${StyledButton} {\n color: ${color};\n }\n\n ${StyledButton} + ${StyledButton} {\n margin-inline-start: 0;\n }\n\n ${StyledLink}, ${StyledShowMoreLessButton} {\n font-weight: ${fontWeight['semi-bold']};\n color: ${color};\n }\n\n p {\n max-width: ${contentWidth.xl};\n }\n\n ${StyledImage} {\n object-fit: contain;\n max-height: 10rem;\n justify-self: center;\n align-self: center;\n }\n `;\n});\n\nStyledPageBanner.defaultProps = defaultThemeProp;\n\nexport const StyledActions = styled(Flex)`\n margin-block-start: auto;\n`;\n\n// Common styles\nexport const StyledDescription = styled.div(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].lg};\n * {\n overflow: hidden;\n }\n `;\n});\n\nStyledDescription.defaultProps = defaultThemeProp;\n\n// Inventory page styles\nexport const StyledInventoryPage = styled.div(\n ({\n theme: {\n base: {\n spacing,\n palette: { 'primary-background': primaryBackground }\n }\n }\n }) => {\n return css`\n background: ${primaryBackground};\n height: 100%;\n\n ${StyledBanner},\n ${StyledTabs} {\n margin-block-start: calc(1.5 * ${spacing});\n }\n\n ${StyledPageHeader} {\n padding: calc(2 * ${spacing});\n }\n\n ${StyledBannerMessageList} {\n max-height: 25vh;\n overflow: auto;\n }\n ${StyledDescription} {\n margin-block-start: calc(${spacing} * 1.5);\n }\n `;\n }\n);\n\nStyledInventoryPage.defaultProps = defaultThemeProp;\n\nexport const StyledInventoryPageTitleWrapper = styled(Flex)(({ theme }) => {\n const {\n base: { 'content-width': contentWidth, spacing }\n } = theme;\n return css`\n max-width: ${contentWidth.xl};\n\n h1 {\n margin-inline-end: calc(${spacing} * 2);\n }\n `;\n});\n\nStyledInventoryPageTitleWrapper.defaultProps = defaultThemeProp;\n\n// overview page styles\nexport const StyledOverviewPage = styled.div`\n /* remove the default padding set by header */\n ${StyledPageHeader} {\n padding: 0;\n }\n\n ${StyledShowMoreLessButton} {\n max-width: fit-content;\n }\n\n ${StyledPageBanner} {\n background: none;\n }\n`;\n\n// Construct page styles\nexport const StyledHeader = styled.div(({ theme }) => {\n return css`\n background: ${transparentize(0.95, theme.base.palette['foreground-color'])};\n border-radius: ${theme.base['border-radius']};\n padding: calc(2 * ${theme.base.spacing});\n\n h1:focus-visible {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n `;\n});\n\nStyledHeader.defaultProps = defaultThemeProp;\n\nexport const StyledTitleContainer = styled.div`\n width: calc(100% - 3rem);\n`;\n\nexport const StyledTextWithEllipsis: typeof Text = styled(Text)`\n display: block;\n ${ellipsisOverflow}\n`;\n\nexport const StyledText: typeof Text = styled(Text)<{ showEllipsis: boolean }>(({\n showEllipsis\n}) => {\n return css`\n width: 100%;\n white-space: nowrap;\n ${showEllipsis && ellipsisOverflow}\n `;\n});\n\nexport const StyledPrimaryMetaButton: typeof Button = styled(Button)(props => {\n const {\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, shadow },\n components: { text }\n }\n } = props;\n\n const fontSizes = calculateFontSize(fontSize, fontScale);\n\n return css`\n font-size: ${fontSizes[text.h1['font-size'] as FontSize]};\n font-weight: ${text.h1['font-weight']};\n width: 100%;\n ${ellipsisOverflow}\n\n &:not([disabled]):focus {\n box-shadow: ${shadow['focus-inset']};\n }\n `;\n});\n\nStyledPrimaryMetaButton.defaultProps = defaultThemeProp;\n\nexport const StyledPrimaryActionWrapper = styled.div<{ hasAdditionalAction: boolean }>(\n ({ theme, hasAdditionalAction }) => {\n return css`\n margin-inline-end: ${hasAdditionalAction ? theme.base.spacing : 0};\n\n ${StyledButton} {\n font-weight: ${theme.base['font-weight']['semi-bold']};\n }\n `;\n }\n);\n\nStyledPrimaryActionWrapper.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,114 @@
1
+ import type { MouseEvent, ReactNode, Ref } from 'react';
2
+ import type { BannerProps, OmitStrict, TestIdProp, ButtonProps, BaseProps, TabsProps, MenuItemProps, TestIdsRecord } from '@pega/cosmos-react-core';
3
+ import type { OneColumnPageProps, TabbedPageTab } from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';
4
+ import type { IconTileProps } from '../IconTile';
5
+ import type { PageBannerProps } from './OverviewPageTemplate/PageBanner';
6
+ import { elements as pageHeaderElements } from './PageTemplates.test-ids';
7
+ export interface PageTemplateProps extends BaseProps, TestIdProp {
8
+ /** PropTypes for error banner inside Page Template. */
9
+ errorBanner?: Pick<BannerProps, 'variant' | 'onDismiss' | 'messages'>;
10
+ /** If true, disables all the action buttons on page header. */
11
+ progress?: boolean;
12
+ /** Ref to the Page Template. */
13
+ ref?: Ref<HTMLDivElement>;
14
+ }
15
+ type PageHeaderProps = {
16
+ /** The primary header text on the page header. */
17
+ title: string;
18
+ /** Description text for the page header and additional info dialog. */
19
+ description?: string;
20
+ };
21
+ export type HeaderActionItemProps = Pick<MenuItemProps, 'id' | 'onClick' | 'disabled' | 'primary'>;
22
+ export interface MetaFieldValueListProps {
23
+ id?: string;
24
+ name: string;
25
+ value?: string;
26
+ onClick?: (value: string) => void;
27
+ }
28
+ export interface ActionButtonProps {
29
+ testIds: Partial<TestIdsRecord<typeof pageHeaderElements>>;
30
+ progress?: PageTemplateProps['progress'];
31
+ primaryAction?: (HeaderActionItemProps & {
32
+ variant?: ButtonProps['variant'];
33
+ }) | ReactNode;
34
+ secondaryAction?: HeaderActionItemProps;
35
+ additionalActions?: HeaderActionItemProps[];
36
+ animatePrimaryButton?: boolean;
37
+ }
38
+ type ConstructPageTemplateContentProps = {
39
+ tabs: OmitStrict<TabsProps, 'tabs'> & {
40
+ tabs: TabbedPageTab[];
41
+ };
42
+ content?: never;
43
+ } | {
44
+ tabs?: never;
45
+ content: ReactNode;
46
+ };
47
+ export type ConstructPageTemplateProps = PageTemplateProps & {
48
+ header: PageHeaderProps & {
49
+ /**
50
+ * Metadata for the Page Header and additional info dialog.
51
+ * Only First 4 items of metadata are rendered on page header.
52
+ */
53
+ metadata?: {
54
+ /** Primary Metadata
55
+ * Primary Metadata highlights the important metadata for the user by staying next to the title
56
+ */
57
+ primary?: MetaFieldValueListProps[];
58
+ /** Secondary Metadata
59
+ * Secondary Metadata highlights the next secondary meta information for the user by staying close to the action button
60
+ */
61
+ secondary?: [MetaFieldValueListProps] | [MetaFieldValueListProps, MetaFieldValueListProps];
62
+ /** Additional Metadata
63
+ * All meta information for the user shown within the interaction of Info icon.
64
+ */
65
+ additional: MetaFieldValueListProps[];
66
+ };
67
+ /** A visual associated with the page header. */
68
+ visual: OmitStrict<IconTileProps, 'size'>;
69
+ /** The type of the page content. */
70
+ type: {
71
+ name: string;
72
+ onClick?: (e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
73
+ href?: string;
74
+ };
75
+ /**
76
+ * PrimaryAction button on page header.
77
+ * If variant is set as primary, live log is triggered announcing the user about dirty changes state on the page. */
78
+ primaryAction?: ActionButtonProps['primaryAction'];
79
+ /**
80
+ * SecondaryAction to the page header.
81
+ * Secondary Action button shifts inside the additionalActions based on screen width.
82
+ */
83
+ secondaryAction?: HeaderActionItemProps;
84
+ /** A set of Action Buttons to render on the Action Menu button on page header. */
85
+ additionalActions?: HeaderActionItemProps[];
86
+ };
87
+ /** Determines if the template is in preview mode */
88
+ isPreview?: boolean;
89
+ } & ConstructPageTemplateContentProps;
90
+ export interface InventoryPageTemplateProps extends PageTemplateProps {
91
+ header: PageHeaderProps & {
92
+ /**
93
+ * PrimaryAction button on page header.
94
+ * If variant is set as primary, live log is triggered announcing the user about dirty changes state on the page. */
95
+ primaryAction?: HeaderActionItemProps & {
96
+ variant?: ButtonProps['variant'];
97
+ };
98
+ /**
99
+ * SecondaryAction to the page header.
100
+ * Secondary Action button shifts inside the additionalActions based on screen width.
101
+ */
102
+ secondaryAction?: HeaderActionItemProps;
103
+ /** A set of Action Buttons to render on the Action Menu button on page header. */
104
+ additionalActions?: HeaderActionItemProps[];
105
+ };
106
+ content: OneColumnPageProps['a'];
107
+ }
108
+ export interface OverviewPageTemplateProps extends TestIdProp, BaseProps {
109
+ header: PageBannerProps;
110
+ content: OneColumnPageProps['a'];
111
+ ref?: Ref<HTMLDivElement>;
112
+ }
113
+ export {};
114
+ //# sourceMappingURL=PageTemplate.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageTemplate.types.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplate.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,KAAK,EACV,WAAW,EACX,UAAU,E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,EAAE,qBAAqB,CAAC;QACxC,kFAAkF;QAClF,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;KAC7C,CAAC;IACF,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,iCAAiC,CAAC;AAEtC,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,MAAM,EAAE,eAAe,GAAG;QACxB;;4HAEoH;QACpH,aAAa,CAAC,EAAE,qBAAqB,GAAG;YACtC,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;SAClC,CAAC;QACF;;;WAGG;QACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;QACxC,kFAAkF;QAClF,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;KAC7C,CAAC;IACF,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,yBAA0B,SAAQ,UAAU,EAAE,SAAS;IACtE,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACjC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ import { elements as pageHeaderElements } from './PageTemplates.test-ids';
2
+ //# sourceMappingURL=PageTemplate.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageTemplate.types.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplate.types.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,QAAQ,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import type { MouseEvent, ReactNode, Ref } from 'react';\n\nimport type {\n BannerProps,\n OmitStrict,\n TestIdProp,\n ButtonProps,\n BaseProps,\n TabsProps,\n MenuItemProps,\n TestIdsRecord\n} from '@pega/cosmos-react-core';\nimport type {\n OneColumnPageProps,\n TabbedPageTab\n} from '@pega/cosmos-react-core/lib/components/PageTemplates/PageTemplates';\n\nimport type { IconTileProps } from '../IconTile';\n\nimport type { PageBannerProps } from './OverviewPageTemplate/PageBanner';\nimport { elements as pageHeaderElements } from './PageTemplates.test-ids';\n\nexport interface PageTemplateProps extends BaseProps, TestIdProp {\n /** PropTypes for error banner inside Page Template. */\n errorBanner?: Pick<BannerProps, 'variant' | 'onDismiss' | 'messages'>;\n /** If true, disables all the action buttons on page header. */\n progress?: boolean;\n /** Ref to the Page Template. */\n ref?: Ref<HTMLDivElement>;\n}\n\ntype PageHeaderProps = {\n /** The primary header text on the page header. */\n title: string;\n /** Description text for the page header and additional info dialog. */\n description?: string;\n};\n\nexport type HeaderActionItemProps = Pick<MenuItemProps, 'id' | 'onClick' | 'disabled' | 'primary'>;\n\nexport interface MetaFieldValueListProps {\n id?: string;\n name: string;\n value?: string;\n onClick?: (value: string) => void;\n}\n\nexport interface ActionButtonProps {\n testIds: Partial<TestIdsRecord<typeof pageHeaderElements>>;\n progress?: PageTemplateProps['progress'];\n primaryAction?:\n | (HeaderActionItemProps & {\n variant?: ButtonProps['variant'];\n })\n | ReactNode;\n secondaryAction?: HeaderActionItemProps;\n additionalActions?: HeaderActionItemProps[];\n animatePrimaryButton?: boolean;\n}\n\ntype ConstructPageTemplateContentProps =\n | {\n tabs: OmitStrict<TabsProps, 'tabs'> & {\n tabs: TabbedPageTab[];\n };\n content?: never;\n }\n | {\n tabs?: never;\n content: ReactNode;\n };\n\nexport type ConstructPageTemplateProps = PageTemplateProps & {\n header: PageHeaderProps & {\n /**\n * Metadata for the Page Header and additional info dialog.\n * Only First 4 items of metadata are rendered on page header.\n */\n metadata?: {\n /** Primary Metadata\n * Primary Metadata highlights the important metadata for the user by staying next to the title\n */\n primary?: MetaFieldValueListProps[];\n /** Secondary Metadata\n * Secondary Metadata highlights the next secondary meta information for the user by staying close to the action button\n */\n secondary?: [MetaFieldValueListProps] | [MetaFieldValueListProps, MetaFieldValueListProps];\n /** Additional Metadata\n * All meta information for the user shown within the interaction of Info icon.\n */\n additional: MetaFieldValueListProps[];\n };\n /** A visual associated with the page header. */\n visual: OmitStrict<IconTileProps, 'size'>;\n /** The type of the page content. */\n type: {\n name: string;\n onClick?: (e?: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;\n href?: string;\n };\n /**\n * PrimaryAction button on page header.\n * If variant is set as primary, live log is triggered announcing the user about dirty changes state on the page. */\n primaryAction?: ActionButtonProps['primaryAction'];\n /**\n * SecondaryAction to the page header.\n * Secondary Action button shifts inside the additionalActions based on screen width.\n */\n secondaryAction?: HeaderActionItemProps;\n /** A set of Action Buttons to render on the Action Menu button on page header. */\n additionalActions?: HeaderActionItemProps[];\n };\n /** Determines if the template is in preview mode */\n isPreview?: boolean;\n} & ConstructPageTemplateContentProps;\n\nexport interface InventoryPageTemplateProps extends PageTemplateProps {\n header: PageHeaderProps & {\n /**\n * PrimaryAction button on page header.\n * If variant is set as primary, live log is triggered announcing the user about dirty changes state on the page. */\n primaryAction?: HeaderActionItemProps & {\n variant?: ButtonProps['variant'];\n };\n /**\n * SecondaryAction to the page header.\n * Secondary Action button shifts inside the additionalActions based on screen width.\n */\n secondaryAction?: HeaderActionItemProps;\n /** A set of Action Buttons to render on the Action Menu button on page header. */\n additionalActions?: HeaderActionItemProps[];\n };\n content: OneColumnPageProps['a'];\n}\n\nexport interface OverviewPageTemplateProps extends TestIdProp, BaseProps {\n header: PageBannerProps;\n content: OneColumnPageProps['a'];\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -1,27 +1,31 @@
1
1
  import type { MouseEvent } from 'react';
2
- import type { OneColumnPageProps as CoreOneColumnPageProps, TabbedPageProps as CoreTabbedPageProps, FieldValueListProps, ForwardRefForwardPropsComponent, PageTemplateProps, OmitStrict, StatusProps } from '@pega/cosmos-react-core';
3
- export interface PageHeaderProps extends Pick<PageTemplateProps, 'title' | 'actions'> {
2
+ import type { OneColumnPageProps as CoreOneColumnPageProps, TabbedPageProps as CoreTabbedPageProps, FieldValueListProps, PageTemplateProps, OmitStrict, StatusProps, TestIdProp, ForwardRefForwardPropsComponent } from '@pega/cosmos-react-core';
3
+ export interface AdditionalInfoProps extends TestIdProp {
4
+ title: string;
5
+ description?: string;
6
+ fields: FieldValueListProps['fields'];
7
+ onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;
8
+ }
9
+ export interface PageHeaderProps extends Pick<PageTemplateProps, 'title' | 'actions'>, TestIdProp {
4
10
  metadata?: FieldValueListProps['fields'];
5
11
  status?: {
6
12
  type: StatusProps['variant'];
7
13
  label: string;
8
14
  };
9
15
  titleTag?: 'h1' | 'h2';
10
- additionalInfo?: {
11
- title: string;
12
- description?: string;
13
- fields: FieldValueListProps['fields'];
14
- onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;
15
- };
16
+ additionalInfo?: AdditionalInfoProps;
16
17
  }
17
18
  type OmittedPageProps = 'header' | 'scrollContent';
18
- export interface OneColumnPageProps extends OmitStrict<CoreOneColumnPageProps, OmittedPageProps>, PageHeaderProps {
19
+ export interface OneColumnPageProps extends OmitStrict<CoreOneColumnPageProps, OmittedPageProps>, PageHeaderProps, TestIdProp {
19
20
  }
20
- export interface TabbedPageProps extends OmitStrict<CoreTabbedPageProps, OmittedPageProps>, PageHeaderProps {
21
+ export interface TabbedPageProps extends OmitStrict<CoreTabbedPageProps, OmittedPageProps>, PageHeaderProps, TestIdProp {
21
22
  }
22
23
  export declare const StyledPage: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
23
- export declare const PageHeader: ({ title, metadata, additionalInfo, actions, status, titleTag }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const PageHeader: ({ testId, title, metadata, additionalInfo, actions, status, titleTag }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
24
25
  export declare const TabbedPage: ForwardRefForwardPropsComponent<TabbedPageProps>;
25
26
  export declare const OneColumnPage: ForwardRefForwardPropsComponent<OneColumnPageProps>;
26
- export {};
27
+ declare const _default: (({ testId, title, metadata, additionalInfo, actions, status, titleTag }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element) & {
28
+ getTestIds: (testIdProp?: TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["title", "status", "edit-details", "additional-info-icon", "type", "meta-data", "primary-meta-data", "secondary-meta-data", "visual", "primary-action", "secondary-action", "additional-actions", "banner-description", "banner-link", "banner-actions", "banner-image"]>;
29
+ };
30
+ export default _default;
27
31
  //# sourceMappingURL=PageTemplates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageTemplates.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplates.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAmB,UAAU,EAAE,MAAM,OAAO,CAAC;AAuBzD,OAAO,KAAK,EACV,kBAAkB,IAAI,sBAAsB,EAC5C,eAAe,IAAI,mBAAmB,EACtC,mBAAmB,EACnB,+BAA+B,EAC/B,iBAAiB,EACjB,UAAU,EACV,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AAWjC,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAAC;IACnF,QAAQ,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACzD,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE;QACf,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACtC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;KACrD,CAAC;CACH;AAED,KAAK,gBAAgB,GAAG,QAAQ,GAAG,eAAe,C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KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACzD,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC;AAED,KAAK,gBAAgB,GAAG,QAAQ,GAAG,eAAe,CAAC;AAEnD,MAAM,WAAW,kBACf,SAAQ,UAAU,CAAC,sBAAsB,EAAE,gBAAgB,CAAC,EAC1D,eAAe,EACf,UAAU;CAAG;AAEjB,MAAM,WAAW,eACf,SAAQ,UAAU,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,EACvD,eAAe,EACf,UAAU;CAAG;AA6BjB,eAAO,MAAM,UAAU,yGA8BtB,CAAC;AAIF,eAAO,MAAM,UAAU,GAAI,wEAQxB,eAAe,4CAuEjB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,+BAA+B,CAAC,eAAe,CAgBvE,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,+BAA+B,CAAC,kBAAkB,CAoB7E,CAAC;kGA/GC,eAAe;;;AAiHlB,wBAA6D"}
@@ -1,14 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useMemo, useRef } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
- import { OneColumnPage as CoreOneColumnPage, TabbedPage as CoreTabbedPage, Flex, Status, SummaryItem, Text, Button, Popover, FieldValueList, defaultThemeProp, useI18n, StyledSummaryItemActions, registerIcon, StyledRegion, MetaList, StyledBreadcrumbs, StyledPageHeader, AdditionalInfo } from '@pega/cosmos-react-core';
5
- import * as nodesDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/nodes-down.icon';
6
- import * as informationIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/information.icon';
7
- import { StyledForm } from '@pega/cosmos-react-core/lib/components/MultiStepForm/MultiStepForm';
4
+ import { OneColumnPage as CoreOneColumnPage, TabbedPage as CoreTabbedPage, Flex, Status, SummaryItem, Text, Button, Popover, FieldValueList, defaultThemeProp, useI18n, StyledSummaryItemActions, StyledRegion, MetaList, StyledBreadcrumbs, StyledPageHeader, AdditionalInfo, useTestIds, withTestIds, useElement, Tooltip } from '@pega/cosmos-react-core';
8
5
  import { StyledBanner } from '@pega/cosmos-react-core/lib/components/Banner/Banner';
9
6
  import { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';
10
7
  import { StyledWorkbench } from '../Workbench/Workbench.styles';
11
- registerIcon(nodesDownIcon, informationIcon);
8
+ import { getPageHeaderTestIds } from './PageTemplates.test-ids';
12
9
  const StyledTextWithEllipsis = styled(Text) `
13
10
  overflow: hidden;
14
11
  white-space: nowrap;
@@ -28,9 +25,9 @@ const StyledHeaderContent = styled(SummaryItem) `
28
25
  align-self: start;
29
26
  }
30
27
  `;
31
- export const StyledPage = styled.div(({ theme: { base: { spacing, palette: { 'primary-background': primaryBackground } } } }) => {
28
+ export const StyledPage = styled.div(({ theme: { base: { spacing } } }) => {
32
29
  return css `
33
- background: ${primaryBackground};
30
+ background: none;
34
31
  height: 100%;
35
32
 
36
33
  ${StyledBanner},
@@ -44,8 +41,8 @@ export const StyledPage = styled.div(({ theme: { base: { spacing, palette: { 'pr
44
41
  margin: 0 calc(-2 * ${spacing});
45
42
  }
46
43
 
47
- ${StyledRegion} ${StyledForm} {
48
- max-width: 80ch;
44
+ ${StyledRegion} ${StyledTabs} {
45
+ margin-block-start: 0;
49
46
  }
50
47
 
51
48
  ${StyledPageHeader} > ${StyledBreadcrumbs} {
@@ -54,14 +51,16 @@ export const StyledPage = styled.div(({ theme: { base: { spacing, palette: { 'pr
54
51
  `;
55
52
  });
56
53
  StyledPage.defaultProps = defaultThemeProp;
57
- export const PageHeader = ({ title, metadata, additionalInfo, actions, status, titleTag }) => {
54
+ export const PageHeader = ({ testId, title, metadata, additionalInfo, actions, status, titleTag }) => {
58
55
  const t = useI18n();
56
+ const [el, setEl] = useElement();
57
+ const testIds = useTestIds(testId, getPageHeaderTestIds);
59
58
  const metaListItems = useMemo(() => metadata?.map(({ name, value }) => `${name}: ${value}`), [metadata]);
60
59
  const infoDialogHandle = useRef(null);
61
- return (_jsx(StyledHeaderContent, { container: true, primary: _jsxs(Flex, { container: { alignItems: 'center', gap: 0.5, wrap: 'wrap' }, children: [_jsxs(Flex, { container: { gap: 0.5, alignItems: 'end' }, item: { shrink: 0 }, children: [_jsx(StyledTextWithEllipsis, { variant: 'h1', forwardedAs: titleTag, children: title }), additionalInfo && (_jsx(AdditionalInfo, { heading: additionalInfo.title, dialogHandle: infoDialogHandle, children: _jsxs(Flex, { container: { direction: 'column', alignItems: 'start', gap: 2 }, children: [_jsxs(Flex, { container: { direction: 'column', gap: 1 }, item: { grow: 1, alignSelf: 'stretch' }, children: [additionalInfo.description && _jsx(Text, { as: 'p', children: additionalInfo.description }), _jsx(FieldValueList, { variant: 'inline', fields: additionalInfo.fields })] }), additionalInfo.onEdit && (_jsx(Button, { onClick: (e) => {
60
+ return (_jsx(StyledHeaderContent, { testId: testId, container: true, primary: _jsxs(Flex, { container: { alignItems: 'center', gap: 0.5, wrap: 'wrap' }, children: [_jsxs(Flex, { container: { gap: 0.5, alignItems: 'end' }, item: { shrink: 0 }, children: [_jsx(StyledTextWithEllipsis, { "data-testid": testIds.title, variant: 'h1', as: titleTag, ref: setEl, children: title }), el && (_jsx(Tooltip, { target: el, smart: true, showDelay: 'none', hideDelay: 'none', children: title })), additionalInfo && (_jsx(AdditionalInfo, { "data-testid": additionalInfo.testId, heading: additionalInfo.title, dialogHandle: infoDialogHandle, children: _jsxs(Flex, { container: { direction: 'column', alignItems: 'start', gap: 2 }, children: [_jsxs(Flex, { container: { direction: 'column', gap: 1 }, item: { grow: 1, alignSelf: 'stretch' }, children: [additionalInfo.description && _jsx(Text, { as: 'p', children: additionalInfo.description }), _jsx(FieldValueList, { variant: 'inline', fields: additionalInfo.fields })] }), additionalInfo.onEdit && (_jsx(Button, { "data-testid": testIds.editDetails, onClick: (e) => {
62
61
  infoDialogHandle.current?.close();
63
62
  additionalInfo.onEdit?.(e);
64
- }, children: t('edit_details') }))] }) }))] }), status && _jsx(Status, { variant: status.type, children: status.label })] }), secondary: metaListItems && _jsx(MetaList, { items: metaListItems }), actions: actions }));
63
+ }, children: t('edit_details') }))] }) }))] }), status && (_jsx(Status, { "data-testid": testIds.status, variant: status.type, children: status.label }))] }), secondary: metaListItems && _jsx(MetaList, { items: metaListItems }), actions: actions }));
65
64
  };
66
65
  export const TabbedPage = forwardRef(function TabbedPage({ tabs, ...restProps }, ref) {
67
66
  return (_jsx(CoreTabbedPage, { ...restProps, as: StyledPage, header: _jsx(PageHeader, { ...restProps }), tabs: tabs, ref: ref, scrollContent: true }));
@@ -69,4 +68,5 @@ export const TabbedPage = forwardRef(function TabbedPage({ tabs, ...restProps },
69
68
  export const OneColumnPage = forwardRef(function OneColumnPage({ a, ...restProps }, ref) {
70
69
  return (_jsx(CoreOneColumnPage, { ...restProps, as: StyledPage, header: _jsx(PageHeader, { ...restProps }), scrollContent: true, a: a, ref: ref }));
71
70
  });
71
+ export default withTestIds(PageHeader, getPageHeaderTestIds);
72
72
  //# sourceMappingURL=PageTemplates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageTemplates.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplates.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,UAAU,IAAI,cAAc,EAC5B,IAAI,EACJ,MAAM,EACN,WAAW,EACX,IAAI,EACJ,MAAM,EACN,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,wBAAwB,EACxB,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACf,MAAM,yBAAyB,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AAU,EACd,MAAM,EAAE,KAAC,UAAU,OAAK,SAAS,GAAI,EACrC,aAAa,QACb,CAAC,EAAE,CAAC,EACJ,GAAG,EAAE,GAAG,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { forwardRef, useMemo, useRef } from 'react';\nimport type { PropsWithoutRef, MouseEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n OneColumnPage as CoreOneColumnPage,\n TabbedPage as CoreTabbedPage,\n Flex,\n Status,\n SummaryItem,\n Text,\n Button,\n Popover,\n FieldValueList,\n defaultThemeProp,\n useI18n,\n StyledSummaryItemActions,\n registerIcon,\n StyledRegion,\n MetaList,\n StyledBreadcrumbs,\n StyledPageHeader,\n AdditionalInfo\n} from '@pega/cosmos-react-core';\nimport type {\n OneColumnPageProps as CoreOneColumnPageProps,\n TabbedPageProps as CoreTabbedPageProps,\n FieldValueListProps,\n ForwardRefForwardPropsComponent,\n PageTemplateProps,\n OmitStrict,\n StatusProps,\n DialogHandleValue\n} from '@pega/cosmos-react-core';\nimport * as nodesDownIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/nodes-down.icon';\nimport * as informationIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/information.icon';\nimport { StyledForm } from '@pega/cosmos-react-core/lib/components/MultiStepForm/MultiStepForm';\nimport { StyledBanner } from '@pega/cosmos-react-core/lib/components/Banner/Banner';\nimport { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\n\nimport { StyledWorkbench } from '../Workbench/Workbench.styles';\n\nregisterIcon(nodesDownIcon, informationIcon);\n\nexport interface PageHeaderProps extends Pick<PageTemplateProps, 'title' | 'actions'> {\n metadata?: FieldValueListProps['fields'];\n status?: { type: StatusProps['variant']; label: string };\n titleTag?: 'h1' | 'h2';\n additionalInfo?: {\n title: string;\n description?: string;\n fields: FieldValueListProps['fields'];\n onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;\n };\n}\n\ntype OmittedPageProps = 'header' | 'scrollContent';\n\nexport interface OneColumnPageProps\n extends OmitStrict<CoreOneColumnPageProps, OmittedPageProps>,\n PageHeaderProps {}\n\nexport interface TabbedPageProps\n extends OmitStrict<CoreTabbedPageProps, OmittedPageProps>,\n PageHeaderProps {}\n\nconst StyledTextWithEllipsis: typeof Text = styled(Text)`\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 1.15;\n`;\n\nconst StyledInfoPopover = styled(Popover)(({\n theme: {\n base: { 'content-width': contentWidth }\n }\n}) => {\n return css`\n min-width: ${contentWidth.sm};\n max-width: ${contentWidth.md};\n overflow-wrap: break-word;\n `;\n});\n\nStyledInfoPopover.defaultProps = defaultThemeProp;\n\nconst StyledHeaderContent = styled(SummaryItem)`\n ${StyledSummaryItemActions} {\n align-self: start;\n }\n`;\n\nexport const StyledPage = styled.div(\n ({\n theme: {\n base: {\n spacing,\n palette: { 'primary-background': primaryBackground }\n }\n }\n }) => {\n return css`\n background: ${primaryBackground};\n height: 100%;\n\n ${StyledBanner},\n ${StyledTabs} {\n margin-block-start: calc(1.5 * ${spacing});\n }\n\n ${StyledRegion} ${StyledWorkbench} {\n position: absolute;\n width: 100%;\n margin: 0 calc(-2 * ${spacing});\n }\n\n ${StyledRegion} ${StyledForm} {\n max-width: 80ch;\n }\n\n ${StyledPageHeader} > ${StyledBreadcrumbs} {\n margin-block-end: 0;\n }\n `;\n }\n);\n\nStyledPage.defaultProps = defaultThemeProp;\n\nexport const PageHeader = ({\n title,\n metadata,\n additionalInfo,\n actions,\n status,\n titleTag\n}: PageHeaderProps) => {\n const t = useI18n();\n\n const metaListItems = useMemo(\n () => metadata?.map(({ name, value }) => `${name}: ${value}`),\n [metadata]\n );\n\n const infoDialogHandle = useRef<DialogHandleValue>(null);\n\n return (\n <StyledHeaderContent\n container\n primary={\n <Flex container={{ alignItems: 'center', gap: 0.5, wrap: 'wrap' }}>\n <Flex container={{ gap: 0.5, alignItems: 'end' }} item={{ shrink: 0 }}>\n <StyledTextWithEllipsis variant='h1' forwardedAs={titleTag}>\n {title}\n </StyledTextWithEllipsis>\n {additionalInfo && (\n <AdditionalInfo heading={additionalInfo.title} dialogHandle={infoDialogHandle}>\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n <Flex\n container={{ direction: 'column', gap: 1 }}\n item={{ grow: 1, alignSelf: 'stretch' }}\n >\n {additionalInfo.description && <Text as='p'>{additionalInfo.description}</Text>}\n <FieldValueList variant='inline' fields={additionalInfo.fields} />\n </Flex>\n {additionalInfo.onEdit && (\n <Button\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n infoDialogHandle.current?.close();\n additionalInfo.onEdit?.(e);\n }}\n >\n {t('edit_details')}\n </Button>\n )}\n </Flex>\n </AdditionalInfo>\n )}\n </Flex>\n {status && <Status variant={status.type}>{status.label}</Status>}\n </Flex>\n }\n secondary={metaListItems && <MetaList items={metaListItems} />}\n actions={actions}\n />\n );\n};\n\nexport const TabbedPage: ForwardRefForwardPropsComponent<TabbedPageProps> = forwardRef(\n function TabbedPage(\n { tabs, ...restProps }: PropsWithoutRef<TabbedPageProps>,\n ref: TabbedPageProps['ref']\n ) {\n return (\n <CoreTabbedPage\n {...restProps}\n as={StyledPage}\n header={<PageHeader {...restProps} />}\n tabs={tabs}\n ref={ref}\n scrollContent\n />\n );\n }\n);\n\nexport const OneColumnPage: ForwardRefForwardPropsComponent<OneColumnPageProps> = forwardRef(\n function OneColumnPage(\n {\n a,\n\n ...restProps\n }: PropsWithoutRef<OneColumnPageProps>,\n ref: OneColumnPageProps['ref']\n ) {\n return (\n <CoreOneColumnPage\n {...restProps}\n as={StyledPage}\n header={<PageHeader {...restProps} />}\n scrollContent\n a={a}\n ref={ref}\n />\n );\n }\n);\n"]}
1
+ {"version":3,"file":"PageTemplates.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/PageTemplates.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM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EAAE,aAAa,IAAI,KAAC,QAAQ,IAAC,KAAK,EAAE,aAAa,GAAI,EAC9D,OAAO,EAAE,OAAO,GAChB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAqD,UAAU,CACpF,SAAS,UAAU,CACjB,EAAE,IAAI,EAAE,GAAG,SAAS,EAAoC,EACxD,GAA2B;IAE3B,OAAO,CACL,KAAC,cAAc,OACT,SAAS,EACb,EAAE,EAAE,UAAU,EACd,MAAM,EAAE,KAAC,UAAU,OAAK,SAAS,GAAI,EACrC,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,aAAa,SACb,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAwD,UAAU,CAC1F,SAAS,aAAa,CACpB,EACE,CAAC,EAED,GAAG,SAAS,EACwB,EACtC,GAA8B;IAE9B,OAAO,CACL,KAAC,iBAAiB,OACZ,SAAS,EACb,EAAE,EAAE,UAAU,EACd,MAAM,EAAE,KAAC,UAAU,OAAK,SAAS,GAAI,EACrC,aAAa,QACb,CAAC,EAAE,CAAC,EACJ,GAAG,EAAE,GAAG,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { forwardRef, useMemo, useRef } from 'react';\nimport type { PropsWithoutRef, MouseEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n OneColumnPage as CoreOneColumnPage,\n TabbedPage as CoreTabbedPage,\n Flex,\n Status,\n SummaryItem,\n Text,\n Button,\n Popover,\n FieldValueList,\n defaultThemeProp,\n useI18n,\n StyledSummaryItemActions,\n StyledRegion,\n MetaList,\n StyledBreadcrumbs,\n StyledPageHeader,\n AdditionalInfo,\n useTestIds,\n withTestIds,\n useElement,\n Tooltip\n} from '@pega/cosmos-react-core';\nimport type {\n OneColumnPageProps as CoreOneColumnPageProps,\n TabbedPageProps as CoreTabbedPageProps,\n FieldValueListProps,\n PageTemplateProps,\n OmitStrict,\n StatusProps,\n DialogHandleValue,\n TestIdProp,\n ForwardRefForwardPropsComponent\n} from '@pega/cosmos-react-core';\nimport { StyledBanner } from '@pega/cosmos-react-core/lib/components/Banner/Banner';\nimport { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\n\nimport { StyledWorkbench } from '../Workbench/Workbench.styles';\n\nimport { getPageHeaderTestIds } from './PageTemplates.test-ids';\n\nexport interface AdditionalInfoProps extends TestIdProp {\n title: string;\n description?: string;\n fields: FieldValueListProps['fields'];\n onEdit?: (e: MouseEvent<HTMLButtonElement>) => void;\n}\nexport interface PageHeaderProps extends Pick<PageTemplateProps, 'title' | 'actions'>, TestIdProp {\n metadata?: FieldValueListProps['fields'];\n status?: { type: StatusProps['variant']; label: string };\n titleTag?: 'h1' | 'h2';\n additionalInfo?: AdditionalInfoProps;\n}\n\ntype OmittedPageProps = 'header' | 'scrollContent';\n\nexport interface OneColumnPageProps\n extends OmitStrict<CoreOneColumnPageProps, OmittedPageProps>,\n PageHeaderProps,\n TestIdProp {}\n\nexport interface TabbedPageProps\n extends OmitStrict<CoreTabbedPageProps, OmittedPageProps>,\n PageHeaderProps,\n TestIdProp {}\n\nconst StyledTextWithEllipsis: typeof Text = styled(Text)`\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 1.15;\n`;\n\nconst StyledInfoPopover = styled(Popover)(({\n theme: {\n base: { 'content-width': contentWidth }\n }\n}) => {\n return css`\n min-width: ${contentWidth.sm};\n max-width: ${contentWidth.md};\n overflow-wrap: break-word;\n `;\n});\n\nStyledInfoPopover.defaultProps = defaultThemeProp;\n\nconst StyledHeaderContent = styled(SummaryItem)`\n ${StyledSummaryItemActions} {\n align-self: start;\n }\n`;\n\nexport const StyledPage = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n return css`\n background: none;\n height: 100%;\n\n ${StyledBanner},\n ${StyledTabs} {\n margin-block-start: calc(1.5 * ${spacing});\n }\n\n ${StyledRegion} ${StyledWorkbench} {\n position: absolute;\n width: 100%;\n margin: 0 calc(-2 * ${spacing});\n }\n\n ${StyledRegion} ${StyledTabs} {\n margin-block-start: 0;\n }\n\n ${StyledPageHeader} > ${StyledBreadcrumbs} {\n margin-block-end: 0;\n }\n `;\n }\n);\n\nStyledPage.defaultProps = defaultThemeProp;\n\nexport const PageHeader = ({\n testId,\n title,\n metadata,\n additionalInfo,\n actions,\n status,\n titleTag\n}: PageHeaderProps) => {\n const t = useI18n();\n const [el, setEl] = useElement();\n const testIds = useTestIds(testId, getPageHeaderTestIds);\n const metaListItems = useMemo(\n () => metadata?.map(({ name, value }) => `${name}: ${value}`),\n [metadata]\n );\n\n const infoDialogHandle = useRef<DialogHandleValue>(null);\n\n return (\n <StyledHeaderContent\n testId={testId}\n container\n primary={\n <Flex container={{ alignItems: 'center', gap: 0.5, wrap: 'wrap' }}>\n <Flex container={{ gap: 0.5, alignItems: 'end' }} item={{ shrink: 0 }}>\n <StyledTextWithEllipsis\n data-testid={testIds.title}\n variant='h1'\n as={titleTag}\n ref={setEl}\n >\n {title}\n </StyledTextWithEllipsis>\n {el && (\n <Tooltip target={el} smart showDelay='none' hideDelay='none'>\n {title}\n </Tooltip>\n )}\n {additionalInfo && (\n <AdditionalInfo\n data-testid={additionalInfo.testId}\n heading={additionalInfo.title}\n dialogHandle={infoDialogHandle}\n >\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n <Flex\n container={{ direction: 'column', gap: 1 }}\n item={{ grow: 1, alignSelf: 'stretch' }}\n >\n {additionalInfo.description && <Text as='p'>{additionalInfo.description}</Text>}\n <FieldValueList variant='inline' fields={additionalInfo.fields} />\n </Flex>\n {additionalInfo.onEdit && (\n <Button\n data-testid={testIds.editDetails}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n infoDialogHandle.current?.close();\n additionalInfo.onEdit?.(e);\n }}\n >\n {t('edit_details')}\n </Button>\n )}\n </Flex>\n </AdditionalInfo>\n )}\n </Flex>\n {status && (\n <Status data-testid={testIds.status} variant={status.type}>\n {status.label}\n </Status>\n )}\n </Flex>\n }\n secondary={metaListItems && <MetaList items={metaListItems} />}\n actions={actions}\n />\n );\n};\n\nexport const TabbedPage: ForwardRefForwardPropsComponent<TabbedPageProps> = forwardRef(\n function TabbedPage(\n { tabs, ...restProps }: PropsWithoutRef<TabbedPageProps>,\n ref: TabbedPageProps['ref']\n ) {\n return (\n <CoreTabbedPage\n {...restProps}\n as={StyledPage}\n header={<PageHeader {...restProps} />}\n tabs={tabs}\n ref={ref}\n scrollContent\n />\n );\n }\n);\n\nexport const OneColumnPage: ForwardRefForwardPropsComponent<OneColumnPageProps> = forwardRef(\n function OneColumnPage(\n {\n a,\n\n ...restProps\n }: PropsWithoutRef<OneColumnPageProps>,\n ref: OneColumnPageProps['ref']\n ) {\n return (\n <CoreOneColumnPage\n {...restProps}\n as={StyledPage}\n header={<PageHeader {...restProps} />}\n scrollContent\n a={a}\n ref={ref}\n />\n );\n }\n);\n\nexport default withTestIds(PageHeader, getPageHeaderTestIds);\n"]}