@pega/lists-react 9.0.0-build.2.9 → 9.0.0-build.20.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 (404) hide show
  1. package/README.md +1 -4
  2. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts +10 -5
  3. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts.map +1 -1
  4. package/lib/Core/Components/A11y/RepeatingStructureA11y.js +27 -2
  5. package/lib/Core/Components/A11y/RepeatingStructureA11y.js.map +1 -1
  6. package/lib/Core/Components/AggregateMenu.d.ts +1 -0
  7. package/lib/Core/Components/AggregateMenu.d.ts.map +1 -1
  8. package/lib/Core/Components/AggregateMenu.js +32 -18
  9. package/lib/Core/Components/AggregateMenu.js.map +1 -1
  10. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts +6 -15
  11. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts.map +1 -1
  12. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js +91 -163
  13. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js.map +1 -1
  14. package/lib/Core/Components/ContextMenu/QuickFilter.js +7 -7
  15. package/lib/Core/Components/ContextMenu/QuickFilter.js.map +1 -1
  16. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts +1 -1
  17. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts.map +1 -1
  18. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts +2 -1
  19. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts.map +1 -1
  20. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +9 -21
  21. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -1
  22. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts +2 -1
  23. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts.map +1 -1
  24. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js +4 -3
  25. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js.map +1 -1
  26. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts +2 -1
  27. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts.map +1 -1
  28. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js +4 -3
  29. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js.map +1 -1
  30. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts +0 -2
  31. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts.map +1 -1
  32. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js +0 -2
  33. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js.map +1 -1
  34. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +5 -1
  35. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
  36. package/lib/Core/Components/DefaultComponents/EmptyContainer.js +12 -5
  37. package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -1
  38. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts +3 -2
  39. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts.map +1 -1
  40. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js +13 -26
  41. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js.map +1 -1
  42. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js +2 -2
  43. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js.map +1 -1
  44. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts +0 -2
  45. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts.map +1 -1
  46. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js +11 -9
  47. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js.map +1 -1
  48. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.d.ts.map +1 -1
  49. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js +5 -0
  50. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js.map +1 -1
  51. package/lib/Core/Components/DefaultComponents/index.d.ts +5 -3
  52. package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -1
  53. package/lib/Core/Components/DefaultComponents/index.js +0 -2
  54. package/lib/Core/Components/DefaultComponents/index.js.map +1 -1
  55. package/lib/Core/Components/Filters/CommonFilter.d.ts.map +1 -1
  56. package/lib/Core/Components/Filters/CommonFilter.js +2 -2
  57. package/lib/Core/Components/Filters/CommonFilter.js.map +1 -1
  58. package/lib/Core/Components/Filters/FilterType.js +5 -5
  59. package/lib/Core/Components/Filters/FilterType.js.map +1 -1
  60. package/lib/Core/Components/Filters/SelectFilter.d.ts.map +1 -1
  61. package/lib/Core/Components/Filters/SelectFilter.js +2 -2
  62. package/lib/Core/Components/Filters/SelectFilter.js.map +1 -1
  63. package/lib/Core/Components/Filters/styles.d.ts +1 -1
  64. package/lib/Core/Components/FooterAggregators.d.ts.map +1 -1
  65. package/lib/Core/Components/FooterAggregators.js +3 -2
  66. package/lib/Core/Components/FooterAggregators.js.map +1 -1
  67. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts +12 -0
  68. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts.map +1 -0
  69. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js +62 -0
  70. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js.map +1 -0
  71. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts +33 -0
  72. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts.map +1 -0
  73. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js +106 -0
  74. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js.map +1 -0
  75. package/lib/Core/Components/{GroupRenderer.d.ts → GroupRenderer/index.d.ts} +8 -1
  76. package/lib/Core/Components/GroupRenderer/index.d.ts.map +1 -0
  77. package/lib/Core/Components/GroupRenderer/index.js +367 -0
  78. package/lib/Core/Components/GroupRenderer/index.js.map +1 -0
  79. package/lib/Core/Components/Grouping/GroupingMenu.d.ts.map +1 -1
  80. package/lib/Core/Components/Grouping/GroupingMenu.js +6 -5
  81. package/lib/Core/Components/Grouping/GroupingMenu.js.map +1 -1
  82. package/lib/Core/Components/HeaderCell.d.ts.map +1 -1
  83. package/lib/Core/Components/HeaderCell.js +8 -5
  84. package/lib/Core/Components/HeaderCell.js.map +1 -1
  85. package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
  86. package/lib/Core/Components/HeaderMenu/actions.js +3 -3
  87. package/lib/Core/Components/HeaderMenu/actions.js.map +1 -1
  88. package/lib/Core/Components/HeaderMenu/index.d.ts.map +1 -1
  89. package/lib/Core/Components/HeaderMenu/index.js +2 -2
  90. package/lib/Core/Components/HeaderMenu/index.js.map +1 -1
  91. package/lib/Core/Components/NotificationManager.js +1 -1
  92. package/lib/Core/Components/NotificationManager.js.map +1 -1
  93. package/lib/Core/Components/RSWrapper/HeaderBarGadget.d.ts.map +1 -1
  94. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js +2 -1
  95. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js.map +1 -1
  96. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts +1 -1
  97. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
  98. package/lib/Core/Components/RenderingEngine/RenderCell.js +2 -1
  99. package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -1
  100. package/lib/Core/Components/TestIdConstants.d.ts +1 -0
  101. package/lib/Core/Components/TestIdConstants.js +2 -1
  102. package/lib/Core/Components/TestIdConstants.js.map +1 -1
  103. package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
  104. package/lib/Core/Components/Toolbar/AdvanceToolbar.js +9 -33
  105. package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
  106. package/lib/Core/Components/Toolbar/AnnounceRowsCount.d.ts +1 -1
  107. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js +1 -1
  108. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js.map +1 -1
  109. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +20 -9
  110. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -1
  111. package/lib/Core/Components/Toolbar/ColumnSelector.js +89 -65
  112. package/lib/Core/Components/Toolbar/ColumnSelector.js.map +1 -1
  113. package/lib/Core/Components/Toolbar/DebugInfo.d.ts +3 -5
  114. package/lib/Core/Components/Toolbar/DebugInfo.d.ts.map +1 -1
  115. package/lib/Core/Components/Toolbar/DebugInfo.js +3 -3
  116. package/lib/Core/Components/Toolbar/DebugInfo.js.map +1 -1
  117. package/lib/Core/Components/Toolbar/FieldSelector.d.ts +1 -0
  118. package/lib/Core/Components/Toolbar/FieldSelector.d.ts.map +1 -1
  119. package/lib/Core/Components/Toolbar/FieldSelector.js +3 -2
  120. package/lib/Core/Components/Toolbar/FieldSelector.js.map +1 -1
  121. package/lib/Core/Components/Toolbar/Grouping.types.d.ts +0 -6
  122. package/lib/Core/Components/Toolbar/Grouping.types.d.ts.map +1 -1
  123. package/lib/Core/Components/Toolbar/Grouping.types.js.map +1 -1
  124. package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
  125. package/lib/Core/Components/Toolbar/SimpleToolbar.js +4 -3
  126. package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
  127. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts +14 -18
  128. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts.map +1 -1
  129. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js +15 -16
  130. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js.map +1 -1
  131. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts +2 -1
  132. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -1
  133. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +10 -7
  134. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js.map +1 -1
  135. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.d.ts.map +1 -1
  136. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js +6 -3
  137. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js.map +1 -1
  138. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts +7 -2
  139. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts.map +1 -1
  140. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js +11 -3
  141. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js.map +1 -1
  142. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts +1 -1
  143. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts.map +1 -1
  144. package/lib/Core/Components/Toolbar/hooks/useMore.js +81 -79
  145. package/lib/Core/Components/Toolbar/hooks/useMore.js.map +1 -1
  146. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts +8 -6
  147. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts.map +1 -1
  148. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js +18 -3
  149. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js.map +1 -1
  150. package/lib/Core/Components/Toolbar/hooks/useSearch.d.ts.map +1 -1
  151. package/lib/Core/Components/Toolbar/hooks/useSearch.js +6 -9
  152. package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -1
  153. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts +4 -4
  154. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts.map +1 -1
  155. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +6 -6
  156. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -1
  157. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts +2 -1
  158. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts.map +1 -1
  159. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js +8 -2
  160. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js.map +1 -1
  161. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.d.ts.map +1 -1
  162. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js +2 -2
  163. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js.map +1 -1
  164. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts +6 -0
  165. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts.map +1 -0
  166. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js +17 -0
  167. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js.map +1 -0
  168. package/lib/Core/Components/Toolbar/utils/utils.d.ts +1 -1
  169. package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
  170. package/lib/Core/Components/Toolbar/utils/utils.js +2 -1
  171. package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
  172. package/lib/Core/Components/Virtualise/Pagination.d.ts.map +1 -1
  173. package/lib/Core/Components/Virtualise/Pagination.js +2 -1
  174. package/lib/Core/Components/Virtualise/Pagination.js.map +1 -1
  175. package/lib/Core/Components/Virtualise/UseScroll.d.ts +4 -1
  176. package/lib/Core/Components/Virtualise/UseScroll.d.ts.map +1 -1
  177. package/lib/Core/Components/Virtualise/UseScroll.js +16 -3
  178. package/lib/Core/Components/Virtualise/UseScroll.js.map +1 -1
  179. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts +97 -0
  180. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts.map +1 -0
  181. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js +251 -0
  182. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -0
  183. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts +22 -0
  184. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts.map +1 -0
  185. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js +38 -0
  186. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js.map +1 -0
  187. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts +22 -0
  188. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts.map +1 -0
  189. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js +45 -0
  190. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js.map +1 -0
  191. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts +49 -0
  192. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -0
  193. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js +55 -0
  194. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -0
  195. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts +21 -0
  196. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts.map +1 -0
  197. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js +39 -0
  198. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js.map +1 -0
  199. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts +38 -0
  200. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts.map +1 -0
  201. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js +62 -0
  202. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js.map +1 -0
  203. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +112 -0
  204. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -0
  205. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +214 -0
  206. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -0
  207. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +21 -8
  208. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
  209. package/lib/Core/Components/Virtualise/index.js +21 -13
  210. package/lib/Core/Components/Virtualise/index.js.map +1 -1
  211. package/lib/Core/Components/Virtualise/utility.d.ts +1 -1
  212. package/lib/Core/Components/Virtualise/utility.d.ts.map +1 -1
  213. package/lib/Core/Components/Virtualise/utility.js +3 -2
  214. package/lib/Core/Components/Virtualise/utility.js.map +1 -1
  215. package/lib/Core/Context/LocalizationContext.d.ts +1 -1
  216. package/lib/Core/Context/LocalizationContext.d.ts.map +1 -1
  217. package/lib/Core/Context/LocalizationContext.js.map +1 -1
  218. package/lib/Core/Hooks/a11y/useAnnounce.d.ts +19 -0
  219. package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -0
  220. package/lib/Core/Hooks/a11y/useAnnounce.js +49 -0
  221. package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -0
  222. package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
  223. package/lib/Core/Hooks/useDragDrop.js +2 -0
  224. package/lib/Core/Hooks/useDragDrop.js.map +1 -1
  225. package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
  226. package/lib/Core/Hooks/useRepeat.js +20 -1
  227. package/lib/Core/Hooks/useRepeat.js.map +1 -1
  228. package/lib/Core/Localization/defaultTranslations.d.ts +16 -13
  229. package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
  230. package/lib/Core/Localization/defaultTranslations.js +17 -14
  231. package/lib/Core/Localization/defaultTranslations.js.map +1 -1
  232. package/lib/Core/Test/JUnitMocks.d.ts +6 -617
  233. package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
  234. package/lib/Core/Test/JUnitMocks.js +5 -4
  235. package/lib/Core/Test/JUnitMocks.js.map +1 -1
  236. package/lib/Core/Utils/index.d.ts +11 -0
  237. package/lib/Core/Utils/index.d.ts.map +1 -1
  238. package/lib/Core/Utils/index.js +22 -8
  239. package/lib/Core/Utils/index.js.map +1 -1
  240. package/lib/Core/Utils/styles.d.ts +2 -2
  241. package/lib/Core/Utils/styles.d.ts.map +1 -1
  242. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +4 -0
  243. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -0
  244. package/lib/Core/Views/Gallery/Components/GalleryCard.js +18 -0
  245. package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -0
  246. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts +8 -0
  247. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -0
  248. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +25 -0
  249. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -0
  250. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +8 -0
  251. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +1 -0
  252. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +8 -0
  253. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +1 -0
  254. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +8 -0
  255. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +1 -0
  256. package/lib/Core/Views/Gallery/Components/GalleryHeader.js +15 -0
  257. package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +1 -0
  258. package/lib/Core/Views/Gallery/Gallery.types.d.ts +8 -0
  259. package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -0
  260. package/lib/Core/Views/Gallery/Gallery.types.js +2 -0
  261. package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -0
  262. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts +13 -1
  263. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +1 -1
  264. package/lib/Core/Views/Gallery/StyledGalleryContainer.js +30 -40
  265. package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +1 -1
  266. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js +1 -1
  267. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js.map +1 -1
  268. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts +9 -0
  269. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +1 -0
  270. package/lib/Core/Views/Gallery/hooks/useRowActions.js +25 -0
  271. package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +1 -0
  272. package/lib/Core/Views/Gallery/index.d.ts +4 -8
  273. package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
  274. package/lib/Core/Views/Gallery/index.js +22 -62
  275. package/lib/Core/Views/Gallery/index.js.map +1 -1
  276. package/lib/Core/Views/Gallery/utils.d.ts +36 -0
  277. package/lib/Core/Views/Gallery/utils.d.ts.map +1 -0
  278. package/lib/Core/Views/Gallery/utils.js +91 -0
  279. package/lib/Core/Views/Gallery/utils.js.map +1 -0
  280. package/lib/Core/Views/Map/Map.styles.d.ts +190 -6
  281. package/lib/Core/Views/Map/Map.styles.d.ts.map +1 -1
  282. package/lib/Core/Views/Map/Map.styles.js.map +1 -1
  283. package/lib/Core/Views/Map/index.d.ts.map +1 -1
  284. package/lib/Core/Views/Map/index.js +10 -4
  285. package/lib/Core/Views/Map/index.js.map +1 -1
  286. package/lib/Core/Views/RsCardWrapper.js.map +1 -1
  287. package/lib/Core/Views/Table/CellWrapper.d.ts +1 -1
  288. package/lib/Core/Views/Table/CellWrapper.d.ts.map +1 -1
  289. package/lib/Core/Views/Table/CellWrapper.js +4 -2
  290. package/lib/Core/Views/Table/CellWrapper.js.map +1 -1
  291. package/lib/Core/Views/Table/HeaderWrapper.d.ts.map +1 -1
  292. package/lib/Core/Views/Table/HeaderWrapper.js +5 -5
  293. package/lib/Core/Views/Table/HeaderWrapper.js.map +1 -1
  294. package/lib/Core/Views/Table/Row.d.ts +3 -1
  295. package/lib/Core/Views/Table/Row.d.ts.map +1 -1
  296. package/lib/Core/Views/Table/Row.js +5 -3
  297. package/lib/Core/Views/Table/Row.js.map +1 -1
  298. package/lib/Core/Views/Table/SkeletonRows.d.ts +1 -1
  299. package/lib/Core/Views/Table/SkeletonRows.d.ts.map +1 -1
  300. package/lib/Core/Views/Table/StyledTableContainer.d.ts +3 -1
  301. package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
  302. package/lib/Core/Views/Table/StyledTableContainer.js +269 -158
  303. package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
  304. package/lib/Core/Views/Table/TableA11y.d.ts +11 -0
  305. package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -1
  306. package/lib/Core/Views/Table/TableA11y.js +207 -2
  307. package/lib/Core/Views/Table/TableA11y.js.map +1 -1
  308. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +5 -1
  309. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
  310. package/lib/Core/Views/Table/VirtualizeWrapper.js +38 -15
  311. package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
  312. package/lib/Core/Views/Table/index.d.ts.map +1 -1
  313. package/lib/Core/Views/Table/index.js +6 -4
  314. package/lib/Core/Views/Table/index.js.map +1 -1
  315. package/lib/Core/Views/Table/useCountChange.d.ts +10 -0
  316. package/lib/Core/Views/Table/useCountChange.d.ts.map +1 -0
  317. package/lib/Core/Views/Table/useCountChange.js +39 -0
  318. package/lib/Core/Views/Table/useCountChange.js.map +1 -0
  319. package/lib/Core/Views/Timeline/Timeline.d.ts +5 -0
  320. package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -0
  321. package/lib/Core/Views/Timeline/Timeline.js +28 -0
  322. package/lib/Core/Views/Timeline/Timeline.js.map +1 -0
  323. package/lib/Core/Views/Timeline/Timeline.styles.d.ts +393 -0
  324. package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -0
  325. package/lib/Core/Views/Timeline/Timeline.styles.js +175 -0
  326. package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -0
  327. package/lib/Core/Views/Timeline/Timeline.types.d.ts +48 -0
  328. package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -0
  329. package/lib/Core/Views/Timeline/Timeline.types.js +2 -0
  330. package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -0
  331. package/lib/Core/Views/Timeline/TimelineItem.d.ts +12 -0
  332. package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -0
  333. package/lib/Core/Views/Timeline/TimelineItem.js +43 -0
  334. package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -0
  335. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +4 -0
  336. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -0
  337. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js +141 -0
  338. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -0
  339. package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
  340. package/lib/Core/Views/Timeline/index.js +14 -8
  341. package/lib/Core/Views/Timeline/index.js.map +1 -1
  342. package/lib/Core/Views/Timeline/utils.d.ts +10 -0
  343. package/lib/Core/Views/Timeline/utils.d.ts.map +1 -0
  344. package/lib/Core/Views/Timeline/utils.js +144 -0
  345. package/lib/Core/Views/Timeline/utils.js.map +1 -0
  346. package/lib/Core/Views/rs-styles.d.ts +1 -1
  347. package/lib/Core/constants.d.ts.map +1 -1
  348. package/lib/Core/constants.js +1 -0
  349. package/lib/Core/constants.js.map +1 -1
  350. package/lib/Core/templateFeatureSupport.d.ts +17 -0
  351. package/lib/Core/templateFeatureSupport.d.ts.map +1 -0
  352. package/lib/Core/templateFeatureSupport.js +30 -0
  353. package/lib/Core/templateFeatureSupport.js.map +1 -0
  354. package/lib/types.d.ts +2 -0
  355. package/lib/types.d.ts.map +1 -1
  356. package/lib/types.js.map +1 -1
  357. package/package.json +11 -12
  358. package/lib/Core/Components/DefaultComponents/CardItem.d.ts +0 -3
  359. package/lib/Core/Components/DefaultComponents/CardItem.d.ts.map +0 -1
  360. package/lib/Core/Components/DefaultComponents/CardItem.js +0 -78
  361. package/lib/Core/Components/DefaultComponents/CardItem.js.map +0 -1
  362. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts +0 -12
  363. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +0 -1
  364. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +0 -35
  365. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +0 -1
  366. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts +0 -15
  367. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +0 -1
  368. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +0 -49
  369. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +0 -1
  370. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts +0 -12
  371. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map +0 -1
  372. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js +0 -44
  373. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js.map +0 -1
  374. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts +0 -16
  375. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +0 -1
  376. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +0 -63
  377. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +0 -1
  378. package/lib/Core/Components/EmptyContainer.d.ts +0 -5
  379. package/lib/Core/Components/EmptyContainer.d.ts.map +0 -1
  380. package/lib/Core/Components/EmptyContainer.js +0 -12
  381. package/lib/Core/Components/EmptyContainer.js.map +0 -1
  382. package/lib/Core/Components/GroupRenderer.d.ts.map +0 -1
  383. package/lib/Core/Components/GroupRenderer.js +0 -240
  384. package/lib/Core/Components/GroupRenderer.js.map +0 -1
  385. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts +0 -6
  386. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts.map +0 -1
  387. package/lib/Core/Components/Toolbar/KeyboardInstructions.js +0 -32
  388. package/lib/Core/Components/Toolbar/KeyboardInstructions.js.map +0 -1
  389. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +0 -8
  390. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +0 -1
  391. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +0 -61
  392. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +0 -1
  393. package/lib/Core/Hooks/useSelect.d.ts +0 -9
  394. package/lib/Core/Hooks/useSelect.d.ts.map +0 -1
  395. package/lib/Core/Hooks/useSelect.js +0 -24
  396. package/lib/Core/Hooks/useSelect.js.map +0 -1
  397. package/lib/Core/Views/Gallery/ItemWrapper.d.ts +0 -19
  398. package/lib/Core/Views/Gallery/ItemWrapper.d.ts.map +0 -1
  399. package/lib/Core/Views/Gallery/ItemWrapper.js +0 -34
  400. package/lib/Core/Views/Gallery/ItemWrapper.js.map +0 -1
  401. package/lib/Core/Views/Timeline/utility.d.ts +0 -8
  402. package/lib/Core/Views/Timeline/utility.d.ts.map +0 -1
  403. package/lib/Core/Views/Timeline/utility.js +0 -120
  404. package/lib/Core/Views/Timeline/utility.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineToolbar.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/Toolbar/Timeline/TimelineToolbar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,gEAAgE,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAKlE,QAAA,MAAM,eAAe,GAAI,wBAGtB;IACD,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;CACxB,GAAG,UAAU,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC,4CA4ErD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,61 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useMemo } from 'react';
3
- import { TimelineToolbar as TimelineToolbarCosmos } from '@pega/cosmos-react-work';
4
- import { TOOLBAR_FEATURES } from '../../../constants';
5
- import { mapDateFnToGroupOption } from '../../../Views/Timeline/utility';
6
- const TimelineToolbar = ({ view, ...restProps }) => {
7
- const displaySort = view.shouldDisplayFeature(TOOLBAR_FEATURES.SORT);
8
- const displayGrouping = view.shouldDisplayFeature(TOOLBAR_FEATURES.GROUPING);
9
- const sort = useMemo(() => ({
10
- selected: view.state.sortingOrder?.[0]?.order === 'asc' ? 'ascending' : 'descending',
11
- onItemClick: id => {
12
- if (view.state?.sortingOrder?.[0]) {
13
- view.type.applySorting([
14
- {
15
- ...view.state.sortingOrder[0],
16
- order: id === 'ascending' ? 'asc' : 'desc'
17
- }
18
- ]);
19
- }
20
- }
21
- }), [view.state.sortingOrder, view.type.applySorting]);
22
- const group = useMemo(() => ({
23
- selected: mapDateFnToGroupOption(view.state.groups?.[0]?.dateFunction),
24
- onItemClick: id => {
25
- let dateFunction;
26
- switch (id) {
27
- case 'year':
28
- dateFunction = 'YEARS';
29
- break;
30
- case 'quarteryear':
31
- dateFunction = 'QUARTERS';
32
- break;
33
- case 'monthyear':
34
- dateFunction = 'MONTHS';
35
- break;
36
- case 'date':
37
- dateFunction = 'DAYS';
38
- break;
39
- default:
40
- }
41
- view.type.applyGrouping(dateFunction && view.meta.timelineFields?.date?.label
42
- ? [
43
- {
44
- columnId: view.meta.timelineFields.date.label,
45
- dateFunction,
46
- level: 0,
47
- order: view.state.sortingOrder?.[0]?.order ?? 'desc'
48
- }
49
- ]
50
- : []);
51
- }
52
- }), [
53
- view.state.groups,
54
- view.type.applyGrouping,
55
- view.meta.timelineFields?.date,
56
- view.state.sortingOrder
57
- ]);
58
- return (_jsx(TimelineToolbarCosmos, { sort: displaySort ? sort : undefined, group: view.meta.grouping && displayGrouping ? group : undefined, ...restProps }));
59
- };
60
- export default TimelineToolbar;
61
- //# sourceMappingURL=TimelineToolbar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineToolbar.js","sourceRoot":"","sources":["../../../../../Core/Components/Toolbar/Timeline/TimelineToolbar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAQnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,MAAM,eAAe,GAAG,CAAC,EACvB,IAAI,EACJ,GAAG,SAAS,EAGwC,EAAE,EAAE;IACxD,MAAM,WAAW,GAAG,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACrE,MAAM,eAAe,GAAG,IAAI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M;gBACR,QAAQ;YACV,CAAC;YACD,IAAI,CAAC,IAAI,CAAC,aAAa,CACrB,YAAY,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,KAAK;gBACnD,CAAC,CAAC;oBACE;wBACE,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK;wBAC7C,YAAY;wBACZ,KAAK,EAAE,CAAC;wBACR,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,MAAM;qBACrD;iBACF;gBACH,CAAC,CAAC,EAAE,CACP,CAAC;QACJ,CAAC;KACF,CAAC,EACF;QACE,IAAI,CAAC,KAAK,CAAC,MAAM;QACjB,IAAI,CAAC,IAAI,CAAC,aAAa;QACvB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI;QAC9B,IAAI,CAAC,KAAK,CAAC,YAAY;KACxB,CACF,CAAC;IAEF,OAAO,CACL,KAAC,qBAAqB,IACpB,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACpC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,KAC5D,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import type { Group } from 'packages/lists-rs-core/types/State.types';\nimport { useMemo } from 'react';\n\nimport type { OmitStrict } from '@pega/cosmos-react-core';\nimport { TimelineToolbar as TimelineToolbarCosmos } from '@pega/cosmos-react-work';\nimport type {\n TimelineGroupBy,\n TimelineSortOrder,\n TimelineToolbarProps\n} from '@pega/cosmos-react-work/lib/components/Timeline/Timeline.types';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport { TOOLBAR_FEATURES } from '../../../constants';\nimport { mapDateFnToGroupOption } from '../../../Views/Timeline/utility';\n\nconst TimelineToolbar = ({\n view,\n ...restProps\n}: {\n view: RsCoreTypes.View;\n} & OmitStrict<TimelineToolbarProps, 'sort' | 'group'>) => {\n const displaySort = view.shouldDisplayFeature(TOOLBAR_FEATURES.SORT);\n const displayGrouping = view.shouldDisplayFeature(TOOLBAR_FEATURES.GROUPING);\n\n const sort = useMemo<{\n selected: TimelineSortOrder;\n onItemClick: (id: TimelineSortOrder) => void;\n }>(\n () => ({\n selected: view.state.sortingOrder?.[0]?.order === 'asc' ? 'ascending' : 'descending',\n onItemClick: id => {\n if (view.state?.sortingOrder?.[0]) {\n view.type.applySorting([\n {\n ...view.state.sortingOrder[0],\n order: id === 'ascending' ? 'asc' : 'desc'\n }\n ]);\n }\n }\n }),\n [view.state.sortingOrder, view.type.applySorting]\n );\n\n const group = useMemo<{\n selected: TimelineGroupBy | undefined;\n onItemClick: (id: TimelineGroupBy) => void;\n }>(\n () => ({\n selected: mapDateFnToGroupOption(view.state.groups?.[0]?.dateFunction),\n onItemClick: id => {\n let dateFunction: Group['dateFunction'];\n switch (id) {\n case 'year':\n dateFunction = 'YEARS';\n break;\n case 'quarteryear':\n dateFunction = 'QUARTERS';\n break;\n case 'monthyear':\n dateFunction = 'MONTHS';\n break;\n case 'date':\n dateFunction = 'DAYS';\n break;\n default:\n }\n view.type.applyGrouping(\n dateFunction && view.meta.timelineFields?.date?.label\n ? [\n {\n columnId: view.meta.timelineFields.date.label,\n dateFunction,\n level: 0,\n order: view.state.sortingOrder?.[0]?.order ?? 'desc'\n }\n ]\n : []\n );\n }\n }),\n [\n view.state.groups,\n view.type.applyGrouping,\n view.meta.timelineFields?.date,\n view.state.sortingOrder\n ]\n );\n\n return (\n <TimelineToolbarCosmos\n sort={displaySort ? sort : undefined}\n group={view.meta.grouping && displayGrouping ? group : undefined}\n {...restProps}\n />\n );\n};\n\nexport default TimelineToolbar;\n"]}
@@ -1,9 +0,0 @@
1
- /**
2
- * A custom React hook to manage a set of selected items.
3
- *
4
- * @param - The initial list of selected item IDs.
5
- *
6
- * @returns An array containing the set of selected items, a function to toggle selection, and a function to check if an item is selected.
7
- */
8
- export default function useSelect(initialSelected?: string[]): [Set<string>, (id: string) => void, (item: string) => boolean];
9
- //# sourceMappingURL=useSelect.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSelect.d.ts","sourceRoot":"","sources":["../../../Core/Hooks/useSelect.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,eAAe,GAAE,MAAM,EAAO,GAC7B,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAkBhE"}
@@ -1,24 +0,0 @@
1
- import { useCallback, useState } from 'react';
2
- /**
3
- * A custom React hook to manage a set of selected items.
4
- *
5
- * @param - The initial list of selected item IDs.
6
- *
7
- * @returns An array containing the set of selected items, a function to toggle selection, and a function to check if an item is selected.
8
- */
9
- export default function useSelect(initialSelected = []) {
10
- const [selected, setSelected] = useState(new Set([...initialSelected]));
11
- const onSelect = useCallback((id) => {
12
- const value = id;
13
- if (selected.has(value)) {
14
- selected.delete(value);
15
- }
16
- else {
17
- selected.add(value);
18
- }
19
- setSelected(new Set(selected));
20
- }, [selected, setSelected]);
21
- const isSelected = useCallback((item) => selected.has(item), [selected]);
22
- return [selected, onSelect, isSelected];
23
- }
24
- //# sourceMappingURL=useSelect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSelect.js","sourceRoot":"","sources":["../../../Core/Hooks/useSelect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,kBAA4B,EAAE;IAE9B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAExE,MAAM,QAAQ,GAAG,WAAW,CAC1B,CAAC,EAAU,EAAE,EAAE;QACb,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YACxB,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;QACD,WAAW,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjC,CAAC,EACD,CAAC,QAAQ,EAAE,WAAW,CAAC,CACxB,CAAC;IACF,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEjF,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import { useCallback, useState } from 'react';\n\n/**\n * A custom React hook to manage a set of selected items.\n *\n * @param - The initial list of selected item IDs.\n *\n * @returns An array containing the set of selected items, a function to toggle selection, and a function to check if an item is selected.\n */\nexport default function useSelect(\n initialSelected: string[] = []\n): [Set<string>, (id: string) => void, (item: string) => boolean] {\n const [selected, setSelected] = useState(new Set([...initialSelected]));\n\n const onSelect = useCallback(\n (id: string) => {\n const value = id;\n if (selected.has(value)) {\n selected.delete(value);\n } else {\n selected.add(value);\n }\n setSelected(new Set(selected));\n },\n [selected, setSelected]\n );\n const isSelected = useCallback((item: string) => selected.has(item), [selected]);\n\n return [selected, onSelect, isSelected];\n}\n"]}
@@ -1,19 +0,0 @@
1
- export default ItemWrapper;
2
- declare function ItemWrapper({ children, itemKey }: {
3
- children: any;
4
- itemKey: any;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- declare namespace ItemWrapper {
7
- namespace propTypes {
8
- let children: PropTypes.Requireable<object>;
9
- let itemKey: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
10
- }
11
- namespace defaultProps {
12
- let children_1: never[];
13
- export { children_1 as children };
14
- let itemKey_1: string;
15
- export { itemKey_1 as itemKey };
16
- }
17
- }
18
- import PropTypes from 'prop-types';
19
- //# sourceMappingURL=ItemWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ItemWrapper.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Gallery/ItemWrapper.jsx"],"names":[],"mappings":";AAsBA;;;4CAOC;;;;;;;;;;;;;sBA7BqB,YAAY"}
@@ -1,34 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import PropTypes from 'prop-types';
3
- import styled, { css } from 'styled-components';
4
- import { useTheme, defaultThemeProp } from '@pega/cosmos-react-core';
5
- import { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';
6
- const StyledItemWrapper = styled.div(({ theme }) => {
7
- return css `
8
- &.tile {
9
- flex: 1;
10
- position: relative;
11
- border: 0.063rem solid ${props => props.theme.base.palette['border-line']};
12
- background: ${props => props.theme.base.palette['primary-background']};
13
- box-shadow: 0 0 0.313rem 0 rgba(238, 238, 238, 1);
14
- && ${StyledCardContent} {
15
- padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);
16
- }
17
- }
18
- `;
19
- });
20
- StyledItemWrapper.defaultProps = defaultThemeProp;
21
- function ItemWrapper({ children, itemKey }) {
22
- const theme = useTheme();
23
- return (_jsx(StyledItemWrapper, { theme: theme, "data-key": itemKey, className: 'tile', children: children }));
24
- }
25
- ItemWrapper.propTypes = {
26
- children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
27
- itemKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
28
- };
29
- ItemWrapper.defaultProps = {
30
- children: [],
31
- itemKey: ''
32
- };
33
- export default ItemWrapper;
34
- //# sourceMappingURL=ItemWrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ItemWrapper.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/ItemWrapper.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAE5F,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjD,OAAO,GAAG,CAAA;;;;+BAImB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;oBAC3D,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;WAEhE,iBAAiB;8BACE,KAAK,CAAC,IAAI,CAAC,OAAO,UAAU,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO;;;GAGpF,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,SAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE;IACxC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,CACL,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,cAAY,OAAO,EAAE,SAAS,EAAC,MAAM,YACjE,QAAQ,GACS,CACrB,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,SAAS,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IAClE,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CACnE,CAAC;AAEF,WAAW,CAAC,YAAY,GAAG;IACzB,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport styled, { css } from 'styled-components';\n\nimport { useTheme, defaultThemeProp } from '@pega/cosmos-react-core';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\n\nconst StyledItemWrapper = styled.div(({ theme }) => {\n return css`\n &.tile {\n flex: 1;\n position: relative;\n border: 0.063rem solid ${props => props.theme.base.palette['border-line']};\n background: ${props => props.theme.base.palette['primary-background']};\n box-shadow: 0 0 0.313rem 0 rgba(238, 238, 238, 1);\n && ${StyledCardContent} {\n padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);\n }\n }\n `;\n});\nStyledItemWrapper.defaultProps = defaultThemeProp;\n\nfunction ItemWrapper({ children, itemKey }) {\n const theme = useTheme();\n return (\n <StyledItemWrapper theme={theme} data-key={itemKey} className='tile'>\n {children}\n </StyledItemWrapper>\n );\n}\n\nItemWrapper.propTypes = {\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n itemKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n};\n\nItemWrapper.defaultProps = {\n children: [],\n itemKey: ''\n};\n\nexport default ItemWrapper;\n"]}
@@ -1,8 +0,0 @@
1
- import type { Group } from 'packages/lists-rs-core/types/State.types';
2
- import type { ActivityObject, TimelineGroupBy } from '@pega/cosmos-react-work/lib/components/Timeline/Timeline.types';
3
- import type { RsCoreTypes } from 'pega-repeating-structures-core';
4
- declare const getActivity: (rows: RsCoreTypes.View["rows"], columns: RsCoreTypes.View["columns"], { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View["meta"]) => ActivityObject[] | undefined;
5
- export default getActivity;
6
- export declare const mapDateFnToGroupOption: (dateFunction: Group["dateFunction"]) => TimelineGroupBy;
7
- export declare function calculateBodyMaxHeight(maxHeight: string | number | undefined, domContainer: HTMLElement | undefined, pContainer: HTMLElement | null | undefined): string | undefined;
8
- //# sourceMappingURL=utility.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utility.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0CAA0C,CAAC;AAMtE,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAChB,MAAM,gEAAgE,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAqDlE,QAAA,MAAM,WAAW,GACf,MAAM,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAC9B,SAAS,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EACpC,gDAAgD,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,KACvE,cAAc,EAAE,GAAG,SAqDrB,CAAC;AAEF,eAAe,WAAW,CAAC;AAE3B,eAAO,MAAM,sBAAsB,GAAI,cAAc,KAAK,CAAC,cAAc,CAAC,KAAG,eAa5E,CAAC;AAEF,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EACtC,YAAY,EAAE,WAAW,GAAG,SAAS,EACrC,UAAU,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,sBAc3C"}
@@ -1,120 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import dayjs from 'dayjs';
3
- import timezonePlugin from 'dayjs/plugin/timezone';
4
- import { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';
5
- import { NoValue } from '@pega/cosmos-react-core';
6
- import ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';
7
- dayjs.extend(timezonePlugin);
8
- const getStatusVariant = (data) => {
9
- let variant;
10
- const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];
11
- const infoStrings = ['open', 'hold', 'info', 'new'];
12
- const successStrings = ['resolved', 'completed', 'success'];
13
- const pendingStrings = ['pending'];
14
- if (new RegExp(warnStrings.join('|'), 'i').test(data)) {
15
- variant = 'warn';
16
- }
17
- else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {
18
- variant = 'info';
19
- }
20
- else if (new RegExp(successStrings.join('|'), 'i').test(data)) {
21
- variant = 'success';
22
- }
23
- else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {
24
- variant = 'pending';
25
- }
26
- else {
27
- variant = 'info';
28
- }
29
- return variant;
30
- };
31
- const getFieldsAsActivityContent = (columns, row) => {
32
- return columns
33
- ?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)
34
- ?.map(column => {
35
- return {
36
- id: column.field.id,
37
- name: column.field.label,
38
- value: _jsx(ValueRenderer, { column: column, row: row })
39
- };
40
- });
41
- };
42
- const convertDateToTimezone = (value, timezone) => {
43
- return (dayjs(value)
44
- .tz(timezone)
45
- // cSpell:disable-next-line
46
- .format('YYYY-MM-DDTHH:mm:ss'));
47
- };
48
- const getActivity = (rows, columns, { timelineFields, timezone, defaultRowHeight }) => {
49
- const { title, date, status: statusProp, icon, content } = timelineFields ?? {};
50
- const titleColumn = columns?.find(({ field }) => field.name === title?.name);
51
- const dateColumn = columns?.find(({ field }) => field.name === date?.name);
52
- const contentColumn = columns?.find(({ field }) => field.name === content?.name);
53
- return rows
54
- ?.map(row => {
55
- const data = row.getContext().getValue();
56
- const dateValue = date?.name ? data[date.name] : undefined;
57
- const dateFieldType = dateColumn?.field?.type;
58
- const isDateOnlyFieldType = dateFieldType === FieldType.DATE ||
59
- dateFieldType === FieldType.DATE_ONLY ||
60
- dateFieldType === FieldType.DATE_TIMELINE;
61
- // Activity Object date can't be undefined
62
- if (!dateValue) {
63
- return undefined;
64
- }
65
- const statusData = statusProp?.name ? data[statusProp.name] : undefined;
66
- let status;
67
- if (statusData) {
68
- status = {
69
- variant: getStatusVariant(statusData),
70
- children: statusData
71
- };
72
- }
73
- const activity = {
74
- id: row.key,
75
- title: title?.name && data[title.name] && titleColumn ? (_jsx(ValueRenderer, { column: titleColumn, row: row })) : (_jsx(NoValue, {})),
76
- date: timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone
77
- ? convertDateToTimezone(dateValue, timezone)
78
- : dateValue,
79
- dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',
80
- icon: icon?.name ? data[icon.name] : undefined,
81
- defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,
82
- content: contentColumn ? (_jsx(ValueRenderer, { column: contentColumn, row: row })) : (getFieldsAsActivityContent(columns, row)),
83
- status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status
84
- };
85
- return activity;
86
- })
87
- ?.filter((item) => !!item);
88
- };
89
- export default getActivity;
90
- export const mapDateFnToGroupOption = (dateFunction) => {
91
- switch (dateFunction) {
92
- case 'YEARS':
93
- return 'year';
94
- case 'QUARTERS':
95
- return 'quarteryear';
96
- case 'MONTHS':
97
- return 'monthyear';
98
- case 'DAYS':
99
- return 'date';
100
- default:
101
- return 'none';
102
- }
103
- };
104
- export function calculateBodyMaxHeight(maxHeight, domContainer, pContainer) {
105
- if (maxHeight === undefined)
106
- return;
107
- if (!domContainer || !pContainer)
108
- return;
109
- const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;
110
- if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {
111
- // Means it is a css variable which is a string, and it needs to be computed with calc function
112
- // If css variable is not defined then fallback to default max height i.e. 550px
113
- const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;
114
- return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;
115
- }
116
- if (typeof maxHeight === 'number') {
117
- return `${maxHeight - extraHeight - 32}px`;
118
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,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC;AAE3B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,YAAmC,EAAmB,EAAE;IAC7F,QAAQ,YAAY,EAAE,CAAC;QACrB,KAAK,OAAO;YACV,OAAO,MAAM,CAAC;QAChB,KAAK,UAAU;YACb,OAAO,aAAa,CAAC;QACvB,KAAK,QAAQ;YACX,OAAO,WAAW,CAAC;QACrB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,UAAU,sBAAsB,CACpC,SAAsC,EACtC,YAAqC,EACrC,UAA0C;IAE1C,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO;IACpC,IAAI,CAAC,YAAY,IAAI,CAAC,UAAU;QAAE,OAAO;IACzC,MAAM,WAAW,GAAG,YAAY,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;IACxE,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAChE,+FAA+F;QAC/F,gFAAgF;QAChF,MAAM,gBAAgB,GAAG,gBAAgB,WAAW,YAAY,CAAC;QACjE,OAAO,YAAY,SAAS,KAAK,gBAAgB,OAAO,WAAW,YAAY,CAAC;IAClF,CAAC;IACD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,EAAE,IAAI,CAAC;IAC7C,CAAC;AACH,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport timezonePlugin from 'dayjs/plugin/timezone';\nimport type { Group } from 'packages/lists-rs-core/types/State.types';\nimport type { ReactText } from 'react';\n\nimport { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';\nimport type { FieldValueListProps, StatusProps } from '@pega/cosmos-react-core';\nimport { NoValue } from '@pega/cosmos-react-core';\nimport type {\n ActivityObject,\n TimelineGroupBy\n} from '@pega/cosmos-react-work/lib/components/Timeline/Timeline.types';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';\n\ndayjs.extend(timezonePlugin);\nconst getStatusVariant = (data: string): StatusProps['variant'] => {\n let variant: StatusProps['variant'];\n const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];\n const infoStrings = ['open', 'hold', 'info', 'new'];\n const successStrings = ['resolved', 'completed', 'success'];\n const pendingStrings = ['pending'];\n\n if (new RegExp(warnStrings.join('|'), 'i').test(data)) {\n variant = 'warn';\n } else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {\n variant = 'info';\n } else if (new RegExp(successStrings.join('|'), 'i').test(data)) {\n variant = 'success';\n } else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {\n variant = 'pending';\n } else {\n variant = 'info';\n }\n return variant;\n};\n\nconst getFieldsAsActivityContent = (\n columns: RsCoreTypes.View['columns'],\n row: RsCoreTypes.Row\n): FieldValueListProps['fields'] | undefined => {\n return columns\n ?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)\n ?.map(column => {\n return {\n id: column.field.id,\n name: column.field.label,\n value: <ValueRenderer column={column} row={row} />\n };\n });\n};\n\nconst convertDateToTimezone = (\n value: string | number | Date,\n timezone: RsCoreTypes.Meta['timezone']\n): string => {\n return (\n dayjs(value)\n .tz(timezone)\n // cSpell:disable-next-line\n .format('YYYY-MM-DDTHH:mm:ss')\n );\n};\n\nconst getActivity = (\n rows: RsCoreTypes.View['rows'],\n columns: RsCoreTypes.View['columns'],\n { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View['meta']\n): ActivityObject[] | undefined => {\n const { title, date, status: statusProp, icon, content } = timelineFields ?? {};\n const titleColumn = columns?.find(({ field }) => field.name === title?.name);\n const dateColumn = columns?.find(({ field }) => field.name === date?.name);\n const contentColumn = columns?.find(({ field }) => field.name === content?.name);\n\n return rows\n ?.map(row => {\n const data = row.getContext().getValue();\n const dateValue = date?.name ? data[date.name] : undefined;\n const dateFieldType = dateColumn?.field?.type;\n const isDateOnlyFieldType =\n dateFieldType === FieldType.DATE ||\n dateFieldType === FieldType.DATE_ONLY ||\n dateFieldType === FieldType.DATE_TIMELINE;\n\n // Activity Object date can't be undefined\n if (!dateValue) {\n return undefined;\n }\n const statusData = statusProp?.name ? data[statusProp.name] : undefined;\n let status;\n if (statusData) {\n status = {\n variant: getStatusVariant(statusData as string),\n children: statusData as ReactText\n };\n }\n const activity: ActivityObject = {\n id: row.key as string,\n title:\n title?.name && data[title.name] && titleColumn ? (\n <ValueRenderer column={titleColumn} row={row} />\n ) : (\n <NoValue />\n ),\n date:\n timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone\n ? convertDateToTimezone(dateValue as string, timezone)\n : (dateValue as string),\n dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',\n icon: icon?.name ? (data[icon.name] as string) : undefined,\n defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,\n content: contentColumn ? (\n <ValueRenderer column={contentColumn} row={row} />\n ) : (\n getFieldsAsActivityContent(columns, row)\n ),\n status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status\n };\n return activity;\n })\n ?.filter((item): item is ActivityObject => !!item);\n};\n\nexport default getActivity;\n\nexport const mapDateFnToGroupOption = (dateFunction: Group['dateFunction']): TimelineGroupBy => {\n switch (dateFunction) {\n case 'YEARS':\n return 'year';\n case 'QUARTERS':\n return 'quarteryear';\n case 'MONTHS':\n return 'monthyear';\n case 'DAYS':\n return 'date';\n default:\n return 'none';\n }\n};\n\nexport function calculateBodyMaxHeight(\n maxHeight: string | number | undefined,\n domContainer: HTMLElement | undefined,\n pContainer: HTMLElement | null | undefined\n) {\n if (maxHeight === undefined) return;\n if (!domContainer || !pContainer) return;\n const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;\n if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {\n // Means it is a css variable which is a string, and it needs to be computed with calc function\n // If css variable is not defined then fallback to default max height i.e. 550px\n const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;\n return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;\n }\n if (typeof maxHeight === 'number') {\n return `${maxHeight - extraHeight - 32}px`;\n }\n}\n"]}