@pega/lists-react 9.0.0-build.2.9 → 9.0.0-build.20.1

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 (414) 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 +1 -1
  86. package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
  87. package/lib/Core/Components/HeaderMenu/actions.js +6 -6
  88. package/lib/Core/Components/HeaderMenu/actions.js.map +1 -1
  89. package/lib/Core/Components/HeaderMenu/index.d.ts.map +1 -1
  90. package/lib/Core/Components/HeaderMenu/index.js +4 -4
  91. package/lib/Core/Components/HeaderMenu/index.js.map +1 -1
  92. package/lib/Core/Components/NotificationManager.js +1 -1
  93. package/lib/Core/Components/NotificationManager.js.map +1 -1
  94. package/lib/Core/Components/RFColumnConfigurator.d.ts.map +1 -1
  95. package/lib/Core/Components/RFColumnConfigurator.js +32 -9
  96. package/lib/Core/Components/RFColumnConfigurator.js.map +1 -1
  97. package/lib/Core/Components/RSWrapper/HeaderBarGadget.d.ts.map +1 -1
  98. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js +2 -1
  99. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js.map +1 -1
  100. package/lib/Core/Components/RenderingEngine/Formatter.d.ts.map +1 -1
  101. package/lib/Core/Components/RenderingEngine/Formatter.js +4 -1
  102. package/lib/Core/Components/RenderingEngine/Formatter.js.map +1 -1
  103. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts +1 -1
  104. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
  105. package/lib/Core/Components/RenderingEngine/RenderCell.js +4 -2
  106. package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -1
  107. package/lib/Core/Components/TestIdConstants.d.ts +1 -0
  108. package/lib/Core/Components/TestIdConstants.js +2 -1
  109. package/lib/Core/Components/TestIdConstants.js.map +1 -1
  110. package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
  111. package/lib/Core/Components/Toolbar/AdvanceToolbar.js +9 -33
  112. package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
  113. package/lib/Core/Components/Toolbar/AnnounceRowsCount.d.ts +1 -1
  114. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js +1 -1
  115. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js.map +1 -1
  116. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +20 -9
  117. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -1
  118. package/lib/Core/Components/Toolbar/ColumnSelector.js +89 -65
  119. package/lib/Core/Components/Toolbar/ColumnSelector.js.map +1 -1
  120. package/lib/Core/Components/Toolbar/DebugInfo.d.ts +3 -5
  121. package/lib/Core/Components/Toolbar/DebugInfo.d.ts.map +1 -1
  122. package/lib/Core/Components/Toolbar/DebugInfo.js +3 -3
  123. package/lib/Core/Components/Toolbar/DebugInfo.js.map +1 -1
  124. package/lib/Core/Components/Toolbar/FieldSelector.d.ts +1 -0
  125. package/lib/Core/Components/Toolbar/FieldSelector.d.ts.map +1 -1
  126. package/lib/Core/Components/Toolbar/FieldSelector.js +3 -2
  127. package/lib/Core/Components/Toolbar/FieldSelector.js.map +1 -1
  128. package/lib/Core/Components/Toolbar/Grouping.types.d.ts +0 -6
  129. package/lib/Core/Components/Toolbar/Grouping.types.d.ts.map +1 -1
  130. package/lib/Core/Components/Toolbar/Grouping.types.js.map +1 -1
  131. package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
  132. package/lib/Core/Components/Toolbar/SimpleToolbar.js +4 -3
  133. package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
  134. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts +14 -18
  135. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts.map +1 -1
  136. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js +15 -16
  137. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js.map +1 -1
  138. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts +2 -1
  139. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -1
  140. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +10 -7
  141. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js.map +1 -1
  142. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.d.ts.map +1 -1
  143. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js +6 -3
  144. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js.map +1 -1
  145. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts +7 -2
  146. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts.map +1 -1
  147. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js +11 -3
  148. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js.map +1 -1
  149. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts +1 -1
  150. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts.map +1 -1
  151. package/lib/Core/Components/Toolbar/hooks/useMore.js +81 -79
  152. package/lib/Core/Components/Toolbar/hooks/useMore.js.map +1 -1
  153. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts +8 -6
  154. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts.map +1 -1
  155. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js +18 -3
  156. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js.map +1 -1
  157. package/lib/Core/Components/Toolbar/hooks/useSearch.d.ts.map +1 -1
  158. package/lib/Core/Components/Toolbar/hooks/useSearch.js +6 -9
  159. package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -1
  160. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts +4 -4
  161. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts.map +1 -1
  162. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +6 -6
  163. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -1
  164. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts +2 -1
  165. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts.map +1 -1
  166. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js +8 -2
  167. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js.map +1 -1
  168. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.d.ts.map +1 -1
  169. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js +2 -2
  170. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js.map +1 -1
  171. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts +6 -0
  172. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts.map +1 -0
  173. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js +17 -0
  174. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js.map +1 -0
  175. package/lib/Core/Components/Toolbar/utils/utils.d.ts +1 -1
  176. package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
  177. package/lib/Core/Components/Toolbar/utils/utils.js +2 -1
  178. package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
  179. package/lib/Core/Components/Virtualise/Pagination.d.ts.map +1 -1
  180. package/lib/Core/Components/Virtualise/Pagination.js +2 -1
  181. package/lib/Core/Components/Virtualise/Pagination.js.map +1 -1
  182. package/lib/Core/Components/Virtualise/UseScroll.d.ts +4 -1
  183. package/lib/Core/Components/Virtualise/UseScroll.d.ts.map +1 -1
  184. package/lib/Core/Components/Virtualise/UseScroll.js +16 -3
  185. package/lib/Core/Components/Virtualise/UseScroll.js.map +1 -1
  186. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts +97 -0
  187. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts.map +1 -0
  188. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js +251 -0
  189. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -0
  190. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts +22 -0
  191. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts.map +1 -0
  192. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js +38 -0
  193. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js.map +1 -0
  194. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts +22 -0
  195. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts.map +1 -0
  196. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js +45 -0
  197. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js.map +1 -0
  198. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts +49 -0
  199. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -0
  200. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js +55 -0
  201. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -0
  202. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts +21 -0
  203. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts.map +1 -0
  204. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js +39 -0
  205. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js.map +1 -0
  206. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts +38 -0
  207. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts.map +1 -0
  208. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js +62 -0
  209. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js.map +1 -0
  210. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +112 -0
  211. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -0
  212. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +214 -0
  213. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -0
  214. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +21 -8
  215. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
  216. package/lib/Core/Components/Virtualise/index.js +21 -13
  217. package/lib/Core/Components/Virtualise/index.js.map +1 -1
  218. package/lib/Core/Components/Virtualise/utility.d.ts +1 -1
  219. package/lib/Core/Components/Virtualise/utility.d.ts.map +1 -1
  220. package/lib/Core/Components/Virtualise/utility.js +3 -2
  221. package/lib/Core/Components/Virtualise/utility.js.map +1 -1
  222. package/lib/Core/Context/LocalizationContext.d.ts +1 -1
  223. package/lib/Core/Context/LocalizationContext.d.ts.map +1 -1
  224. package/lib/Core/Context/LocalizationContext.js.map +1 -1
  225. package/lib/Core/Hooks/a11y/useAnnounce.d.ts +19 -0
  226. package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -0
  227. package/lib/Core/Hooks/a11y/useAnnounce.js +49 -0
  228. package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -0
  229. package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
  230. package/lib/Core/Hooks/useDragDrop.js +2 -0
  231. package/lib/Core/Hooks/useDragDrop.js.map +1 -1
  232. package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
  233. package/lib/Core/Hooks/useRepeat.js +20 -1
  234. package/lib/Core/Hooks/useRepeat.js.map +1 -1
  235. package/lib/Core/Localization/defaultTranslations.d.ts +16 -13
  236. package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
  237. package/lib/Core/Localization/defaultTranslations.js +17 -14
  238. package/lib/Core/Localization/defaultTranslations.js.map +1 -1
  239. package/lib/Core/Test/JUnitMocks.d.ts +6 -617
  240. package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
  241. package/lib/Core/Test/JUnitMocks.js +5 -4
  242. package/lib/Core/Test/JUnitMocks.js.map +1 -1
  243. package/lib/Core/Utils/index.d.ts +11 -0
  244. package/lib/Core/Utils/index.d.ts.map +1 -1
  245. package/lib/Core/Utils/index.js +22 -8
  246. package/lib/Core/Utils/index.js.map +1 -1
  247. package/lib/Core/Utils/styles.d.ts +2 -2
  248. package/lib/Core/Utils/styles.d.ts.map +1 -1
  249. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +4 -0
  250. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -0
  251. package/lib/Core/Views/Gallery/Components/GalleryCard.js +18 -0
  252. package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -0
  253. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts +8 -0
  254. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -0
  255. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +25 -0
  256. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -0
  257. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +8 -0
  258. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +1 -0
  259. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +8 -0
  260. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +1 -0
  261. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +8 -0
  262. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +1 -0
  263. package/lib/Core/Views/Gallery/Components/GalleryHeader.js +15 -0
  264. package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +1 -0
  265. package/lib/Core/Views/Gallery/Gallery.types.d.ts +8 -0
  266. package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -0
  267. package/lib/Core/Views/Gallery/Gallery.types.js +2 -0
  268. package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -0
  269. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts +13 -1
  270. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +1 -1
  271. package/lib/Core/Views/Gallery/StyledGalleryContainer.js +30 -40
  272. package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +1 -1
  273. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js +1 -1
  274. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js.map +1 -1
  275. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts +9 -0
  276. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +1 -0
  277. package/lib/Core/Views/Gallery/hooks/useRowActions.js +25 -0
  278. package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +1 -0
  279. package/lib/Core/Views/Gallery/index.d.ts +4 -8
  280. package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
  281. package/lib/Core/Views/Gallery/index.js +22 -62
  282. package/lib/Core/Views/Gallery/index.js.map +1 -1
  283. package/lib/Core/Views/Gallery/utils.d.ts +36 -0
  284. package/lib/Core/Views/Gallery/utils.d.ts.map +1 -0
  285. package/lib/Core/Views/Gallery/utils.js +91 -0
  286. package/lib/Core/Views/Gallery/utils.js.map +1 -0
  287. package/lib/Core/Views/Map/Map.styles.d.ts +190 -6
  288. package/lib/Core/Views/Map/Map.styles.d.ts.map +1 -1
  289. package/lib/Core/Views/Map/Map.styles.js.map +1 -1
  290. package/lib/Core/Views/Map/index.d.ts.map +1 -1
  291. package/lib/Core/Views/Map/index.js +10 -4
  292. package/lib/Core/Views/Map/index.js.map +1 -1
  293. package/lib/Core/Views/RsCardWrapper.js.map +1 -1
  294. package/lib/Core/Views/Table/CellWrapper.d.ts +1 -1
  295. package/lib/Core/Views/Table/CellWrapper.d.ts.map +1 -1
  296. package/lib/Core/Views/Table/CellWrapper.js +4 -2
  297. package/lib/Core/Views/Table/CellWrapper.js.map +1 -1
  298. package/lib/Core/Views/Table/HeaderWrapper.d.ts.map +1 -1
  299. package/lib/Core/Views/Table/HeaderWrapper.js +5 -5
  300. package/lib/Core/Views/Table/HeaderWrapper.js.map +1 -1
  301. package/lib/Core/Views/Table/Row.d.ts +3 -1
  302. package/lib/Core/Views/Table/Row.d.ts.map +1 -1
  303. package/lib/Core/Views/Table/Row.js +5 -3
  304. package/lib/Core/Views/Table/Row.js.map +1 -1
  305. package/lib/Core/Views/Table/SkeletonRows.d.ts +1 -1
  306. package/lib/Core/Views/Table/SkeletonRows.d.ts.map +1 -1
  307. package/lib/Core/Views/Table/StyledTableContainer.d.ts +3 -1
  308. package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
  309. package/lib/Core/Views/Table/StyledTableContainer.js +269 -158
  310. package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
  311. package/lib/Core/Views/Table/TableA11y.d.ts +11 -0
  312. package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -1
  313. package/lib/Core/Views/Table/TableA11y.js +207 -2
  314. package/lib/Core/Views/Table/TableA11y.js.map +1 -1
  315. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +5 -1
  316. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
  317. package/lib/Core/Views/Table/VirtualizeWrapper.js +38 -15
  318. package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
  319. package/lib/Core/Views/Table/index.d.ts.map +1 -1
  320. package/lib/Core/Views/Table/index.js +6 -4
  321. package/lib/Core/Views/Table/index.js.map +1 -1
  322. package/lib/Core/Views/Table/useCountChange.d.ts +10 -0
  323. package/lib/Core/Views/Table/useCountChange.d.ts.map +1 -0
  324. package/lib/Core/Views/Table/useCountChange.js +39 -0
  325. package/lib/Core/Views/Table/useCountChange.js.map +1 -0
  326. package/lib/Core/Views/Timeline/Timeline.d.ts +5 -0
  327. package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -0
  328. package/lib/Core/Views/Timeline/Timeline.js +28 -0
  329. package/lib/Core/Views/Timeline/Timeline.js.map +1 -0
  330. package/lib/Core/Views/Timeline/Timeline.styles.d.ts +393 -0
  331. package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -0
  332. package/lib/Core/Views/Timeline/Timeline.styles.js +175 -0
  333. package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -0
  334. package/lib/Core/Views/Timeline/Timeline.types.d.ts +48 -0
  335. package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -0
  336. package/lib/Core/Views/Timeline/Timeline.types.js +2 -0
  337. package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -0
  338. package/lib/Core/Views/Timeline/TimelineItem.d.ts +12 -0
  339. package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -0
  340. package/lib/Core/Views/Timeline/TimelineItem.js +43 -0
  341. package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -0
  342. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +4 -0
  343. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -0
  344. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js +141 -0
  345. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -0
  346. package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
  347. package/lib/Core/Views/Timeline/index.js +14 -8
  348. package/lib/Core/Views/Timeline/index.js.map +1 -1
  349. package/lib/Core/Views/Timeline/utils.d.ts +10 -0
  350. package/lib/Core/Views/Timeline/utils.d.ts.map +1 -0
  351. package/lib/Core/Views/Timeline/utils.js +144 -0
  352. package/lib/Core/Views/Timeline/utils.js.map +1 -0
  353. package/lib/Core/Views/rs-styles.d.ts +1 -1
  354. package/lib/Core/constants.d.ts.map +1 -1
  355. package/lib/Core/constants.js +1 -0
  356. package/lib/Core/constants.js.map +1 -1
  357. package/lib/Core/templateFeatureSupport.d.ts +17 -0
  358. package/lib/Core/templateFeatureSupport.d.ts.map +1 -0
  359. package/lib/Core/templateFeatureSupport.js +30 -0
  360. package/lib/Core/templateFeatureSupport.js.map +1 -0
  361. package/lib/types/RepeatingStructuresBoot.types.d.ts +12 -2
  362. package/lib/types/RepeatingStructuresBoot.types.d.ts.map +1 -1
  363. package/lib/types/RepeatingStructuresBoot.types.js.map +1 -1
  364. package/lib/types.d.ts +2 -0
  365. package/lib/types.d.ts.map +1 -1
  366. package/lib/types.js.map +1 -1
  367. package/package.json +11 -12
  368. package/lib/Core/Components/DefaultComponents/CardItem.d.ts +0 -3
  369. package/lib/Core/Components/DefaultComponents/CardItem.d.ts.map +0 -1
  370. package/lib/Core/Components/DefaultComponents/CardItem.js +0 -78
  371. package/lib/Core/Components/DefaultComponents/CardItem.js.map +0 -1
  372. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts +0 -12
  373. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +0 -1
  374. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +0 -35
  375. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +0 -1
  376. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts +0 -15
  377. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +0 -1
  378. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +0 -49
  379. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +0 -1
  380. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts +0 -12
  381. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map +0 -1
  382. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js +0 -44
  383. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js.map +0 -1
  384. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts +0 -16
  385. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +0 -1
  386. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +0 -63
  387. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +0 -1
  388. package/lib/Core/Components/EmptyContainer.d.ts +0 -5
  389. package/lib/Core/Components/EmptyContainer.d.ts.map +0 -1
  390. package/lib/Core/Components/EmptyContainer.js +0 -12
  391. package/lib/Core/Components/EmptyContainer.js.map +0 -1
  392. package/lib/Core/Components/GroupRenderer.d.ts.map +0 -1
  393. package/lib/Core/Components/GroupRenderer.js +0 -240
  394. package/lib/Core/Components/GroupRenderer.js.map +0 -1
  395. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts +0 -6
  396. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts.map +0 -1
  397. package/lib/Core/Components/Toolbar/KeyboardInstructions.js +0 -32
  398. package/lib/Core/Components/Toolbar/KeyboardInstructions.js.map +0 -1
  399. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +0 -8
  400. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +0 -1
  401. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +0 -61
  402. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +0 -1
  403. package/lib/Core/Hooks/useSelect.d.ts +0 -9
  404. package/lib/Core/Hooks/useSelect.d.ts.map +0 -1
  405. package/lib/Core/Hooks/useSelect.js +0 -24
  406. package/lib/Core/Hooks/useSelect.js.map +0 -1
  407. package/lib/Core/Views/Gallery/ItemWrapper.d.ts +0 -19
  408. package/lib/Core/Views/Gallery/ItemWrapper.d.ts.map +0 -1
  409. package/lib/Core/Views/Gallery/ItemWrapper.js +0 -34
  410. package/lib/Core/Views/Gallery/ItemWrapper.js.map +0 -1
  411. package/lib/Core/Views/Timeline/utility.d.ts +0 -8
  412. package/lib/Core/Views/Timeline/utility.d.ts.map +0 -1
  413. package/lib/Core/Views/Timeline/utility.js +0 -120
  414. package/lib/Core/Views/Timeline/utility.js.map +0 -1
package/README.md CHANGED
@@ -49,7 +49,7 @@ import { RepeatingStructures } from '@pega/lists-react';
49
49
  | showCount | Boolean | No | `true` | Display count in toolbar |
50
50
  | defaultRowHeight | String | No | `undefined` | Row density id value from [displayDensity](#displayDensity) options |
51
51
  | allowBulkActions | boolean | No | `false` | Renders the 'Bulk actions' button in the table toolbar, which gets enabled on row selection |
52
- | dateFunctions | Object | No | `undefined` | Enables date-functions like MONTHS/WEEKS/... during Grouping and Filtering. ([Object structure](https://git.pega.io/projects/PS/repos/cosmos/browse/packages/cosmos-condition-builder/src/components/ConditionBuilder/ConditionBuilder.types.ts?until=dfcf607851276bfeb877e9fb2c8f55d4396fd8b7&untilPath=packages%2Fcosmos-condition-builder%2Fsrc%2Fcomponents%2FConditionBuilder%2FConditionBuilder.types.ts#79-85)) |
52
+ | dateFunctions | Object | No | `undefined` | Enables date-functions like MONTHS/WEEKS/... during Grouping and Filtering. ([Object structure](https://github.com/Pega-UXEngineering/constellation-frontend/blob/028ffa1642e12c61a3383b9babc0e0e83800d352/packages/cosmos-condition-builder/src/components/ConditionBuilder/ConditionBuilder.types.ts#L137)) |
53
53
  | relativeDates | Boolean | No | `false` | Enables Relative Dates, such as "Last 7 days" or "Current Year", in Filtering for DateTime or Date_Only values. |
54
54
  | footer | Boolean | No | `true` | Display footer on the view |
55
55
  | dynamicFieldTemplates | Object | No | `dynamicFieldTemplates: [{ name: 'Comma separated', value: 'comma',selected: true }, { name: 'Space separated', value: 'space' }, { name: 'Multi line', value: 'multiline' }, { name: 'Forward slash', value: 'forwardslash' }]` | Templates for dynamic fields. See section on Dynamic fields |
@@ -203,9 +203,6 @@ APIs exposed on the component ref are accessible via `compRef.current.<API_NAME>
203
203
 
204
204
  - The first focus will be on the table's first header cell if earlier no navigation has been done.
205
205
  - To navigate between the cells, use the arrow keys.
206
- - Pressing enter on the cell can turn the cell in edit mode if it is editable.
207
- - Pressing enter again will submit the data
208
- - Pressing escape will discard the changes and turn the cell back to read mode.
209
206
  - To focus out from the table cells, press the tab key and focus will be shifted to the next focusable element on the page after table.
210
207
  - Next time when navigated again to the table, the last visited cell will be focused.
211
208
 
@@ -1,8 +1,13 @@
1
- declare function RepeatingStructureA11y({ children, a11yRef, view }: {
2
- children: any;
3
- a11yRef: any;
4
- view: any;
5
- }): import("react/jsx-runtime").JSX.Element;
1
+ /**
2
+ * Provides accessibility features for repeating structures, including focus boundary handling
3
+ * and announcing changes in the view's state for accessibility purposes.
4
+ *
5
+ * @param {Object} props.a11yRef - A reference object containing accessibility-related handlers.
6
+ * @param {Object} props.view - The view object containing the current state of the repeating structure.
7
+ *
8
+ * @returns {JSX.Element} The rendered structure with accessibility features.
9
+ */
10
+ declare function RepeatingStructureA11y({ children, a11yRef, view }: Object): JSX.Element;
6
11
  declare namespace RepeatingStructureA11y {
7
12
  namespace propTypes {
8
13
  let children: PropTypes.Requireable<object>;
@@ -1 +1 @@
1
- {"version":3,"file":"RepeatingStructureA11y.d.ts","sourceRoot":"","sources":["../../../../Core/Components/A11y/RepeatingStructureA11y.jsx"],"names":[],"mappings":"AAeA;;;;4CAgBC;;;;;;;;;;;;;;;;;sBA9BqB,YAAY"}
1
+ {"version":3,"file":"RepeatingStructureA11y.d.ts","sourceRoot":"","sources":["../../../../Core/Components/A11y/RepeatingStructureA11y.jsx"],"names":[],"mappings":"AAgBA;;;;;;;;GAQG;AACH,qEALW,MAAM,GAGJ,GAAG,CAAC,OAAO,CAgDvB;;;;;;;;;;;;;;;;;sBAtEqB,YAAY"}
@@ -2,7 +2,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { useCallback } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import styled from 'styled-components';
5
- import useAnnounceGroup from '../../Hooks/a11y/useAnnounceGroup';
5
+ import useAnnounce from '../../Hooks/a11y/useAnnounce';
6
+ import useTranslate from '../../Hooks/useTranslate';
6
7
  const StyledInput = styled.input `
7
8
  width: 0;
8
9
  height: 0;
@@ -11,12 +12,36 @@ const StyledInput = styled.input `
11
12
  outline: none;
12
13
  opacity: 0;
13
14
  `;
15
+ /**
16
+ * Provides accessibility features for repeating structures, including focus boundary handling
17
+ * and announcing changes in the view's state for accessibility purposes.
18
+ *
19
+ * @param {Object} props.a11yRef - A reference object containing accessibility-related handlers.
20
+ * @param {Object} props.view - The view object containing the current state of the repeating structure.
21
+ *
22
+ * @returns {JSX.Element} The rendered structure with accessibility features.
23
+ */
14
24
  export default function RepeatingStructureA11y({ children, a11yRef, view }) {
25
+ const [translate] = useTranslate();
15
26
  const onFocusHandler = useCallback(e => {
16
27
  a11yRef.current.boundaryElementsFocusHandler(e);
17
28
  }, [a11yRef]);
18
29
  const { state } = view;
19
- useAnnounceGroup(state);
30
+ // For show/hide columns, we only use the 'modified' message because there is always at least one column present.
31
+ // Any change—whether adding or removing a column is considered a modification for accessibility announcement.
32
+ useAnnounce(state.hiddenColumns, {
33
+ modified: translate('Show/Hide modified')
34
+ }, state.personalization?.active);
35
+ useAnnounce(state.freezeColumns, {
36
+ added: translate('Freeze applied'),
37
+ modified: translate('Freeze modified'),
38
+ removed: translate('Freeze removed')
39
+ }, state.personalization?.active);
40
+ useAnnounce(state.groups, {
41
+ added: translate('Group applied'),
42
+ modified: translate('Group modified'),
43
+ removed: translate('Group removed')
44
+ }, state.personalization?.active);
20
45
  return (_jsxs(_Fragment, { children: [_jsx(StyledInput, { className: 'top', type: 'text', "aria-hidden": true, onFocus: onFocusHandler }), children, _jsx(StyledInput, { className: 'bottom', type: 'text', "aria-hidden": true, onFocus: onFocusHandler })] }));
21
46
  }
22
47
  RepeatingStructureA11y.propTypes = {
@@ -1 +1 @@
1
- {"version":3,"file":"RepeatingStructureA11y.js","sourceRoot":"","sources":["../../../../Core/Components/A11y/RepeatingStructureA11y.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AAEjE,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAA;;;;;;;CAO/B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE;IACxE,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,CAAC,EAAE;QACF,OAAO,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IACF,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACxB,OAAO,CACL,8BACE,KAAC,WAAW,IAAC,SAAS,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,uBAAa,OAAO,EAAE,cAAc,GAAI,EAC/E,QAAQ,EACT,KAAC,WAAW,IAAC,SAAS,EAAC,QAAQ,EAAC,IAAI,EAAC,MAAM,uBAAa,OAAO,EAAE,cAAc,GAAI,IAClF,CACJ,CAAC;AACJ,CAAC;AAED,sBAAsB,CAAC,SAAS,GAAG;IACjC,QAAQ,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IAClE,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,UAAU;IAC1D,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,sBAAsB,CAAC,YAAY,GAAG;IACpC,QAAQ,EAAE,EAAE;CACb,CAAC","sourcesContent":["import { useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nimport useAnnounceGroup from '../../Hooks/a11y/useAnnounceGroup';\n\nconst StyledInput = styled.input`\n width: 0;\n height: 0;\n border-width: 0;\n position: absolute;\n outline: none;\n opacity: 0;\n`;\n\nexport default function RepeatingStructureA11y({ children, a11yRef, view }) {\n const onFocusHandler = useCallback(\n e => {\n a11yRef.current.boundaryElementsFocusHandler(e);\n },\n [a11yRef]\n );\n const { state } = view;\n useAnnounceGroup(state);\n return (\n <>\n <StyledInput className='top' type='text' aria-hidden onFocus={onFocusHandler} />\n {children}\n <StyledInput className='bottom' type='text' aria-hidden onFocus={onFocusHandler} />\n </>\n );\n}\n\nRepeatingStructureA11y.propTypes = {\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n a11yRef: PropTypes.objectOf(PropTypes.objectOf).isRequired,\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nRepeatingStructureA11y.defaultProps = {\n children: []\n};\n"]}
1
+ {"version":3,"file":"RepeatingStructureA11y.js","sourceRoot":"","sources":["../../../../Core/Components/A11y/RepeatingStructureA11y.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,O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OAAO,CACL,8BACE,KAAC,WAAW,IAAC,SAAS,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,uBAAa,OAAO,EAAE,cAAc,GAAI,EAC/E,QAAQ,EACT,KAAC,WAAW,IAAC,SAAS,EAAC,QAAQ,EAAC,IAAI,EAAC,MAAM,uBAAa,OAAO,EAAE,cAAc,GAAI,IAClF,CACJ,CAAC;AACJ,CAAC;AAED,sBAAsB,CAAC,SAAS,GAAG;IACjC,QAAQ,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IAClE,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,UAAU;IAC1D,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,sBAAsB,CAAC,YAAY,GAAG;IACpC,QAAQ,EAAE,EAAE;CACb,CAAC","sourcesContent":["import { useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nimport useAnnounce from '../../Hooks/a11y/useAnnounce';\nimport useTranslate from '../../Hooks/useTranslate';\n\nconst StyledInput = styled.input`\n width: 0;\n height: 0;\n border-width: 0;\n position: absolute;\n outline: none;\n opacity: 0;\n`;\n\n/**\n * Provides accessibility features for repeating structures, including focus boundary handling\n * and announcing changes in the view's state for accessibility purposes.\n *\n * @param {Object} props.a11yRef - A reference object containing accessibility-related handlers.\n * @param {Object} props.view - The view object containing the current state of the repeating structure.\n *\n * @returns {JSX.Element} The rendered structure with accessibility features.\n */\nexport default function RepeatingStructureA11y({ children, a11yRef, view }) {\n const [translate] = useTranslate();\n const onFocusHandler = useCallback(\n e => {\n a11yRef.current.boundaryElementsFocusHandler(e);\n },\n [a11yRef]\n );\n const { state } = view;\n // For show/hide columns, we only use the 'modified' message because there is always at least one column present.\n // Any change—whether adding or removing a column is considered a modification for accessibility announcement.\n useAnnounce(\n state.hiddenColumns,\n {\n modified: translate('Show/Hide modified')\n },\n state.personalization?.active\n );\n\n useAnnounce(\n state.freezeColumns,\n {\n added: translate('Freeze applied'),\n modified: translate('Freeze modified'),\n removed: translate('Freeze removed')\n },\n state.personalization?.active\n );\n\n useAnnounce(\n state.groups,\n {\n added: translate('Group applied'),\n modified: translate('Group modified'),\n removed: translate('Group removed')\n },\n state.personalization?.active\n );\n\n return (\n <>\n <StyledInput className='top' type='text' aria-hidden onFocus={onFocusHandler} />\n {children}\n <StyledInput className='bottom' type='text' aria-hidden onFocus={onFocusHandler} />\n </>\n );\n}\n\nRepeatingStructureA11y.propTypes = {\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n a11yRef: PropTypes.objectOf(PropTypes.objectOf).isRequired,\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nRepeatingStructureA11y.defaultProps = {\n children: []\n};\n"]}
@@ -19,5 +19,6 @@ declare namespace AggregateMenu {
19
19
  }
20
20
  }
21
21
  export default AggregateMenu;
22
+ export function getFormattedAggregationValue(rawAggregationValue: number | string, aggregationType: string, column: import("pega-repeating-structures-core").RsCoreTypes.Column): string | number;
22
23
  import PropTypes from 'prop-types';
23
24
  //# sourceMappingURL=AggregateMenu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AggregateMenu.d.ts","sourceRoot":"","sources":["../../../Core/Components/AggregateMenu.jsx"],"names":[],"mappings":"AAuCA;;;mDAmEC;;;;;;;;;;;;;;;;;;sBAzGqB,YAAY"}
1
+ {"version":3,"file":"AggregateMenu.d.ts","sourceRoot":"","sources":["../../../Core/Components/AggregateMenu.jsx"],"names":[],"mappings":"AAqEA;;;mDA2DC;;;;;;;;;;;;;;;;;;AA9EM,kEALI,MAAM,GAAC,MAAM,mBACb,MAAM,UACN,OAAO,gCAAgC,EAAE,WAAW,CAAC,MAAM,GACzD,MAAM,GAAC,MAAM,CAmBzB;sBAlEqB,YAAY"}
@@ -12,6 +12,9 @@ const StyledMenuButton = styled(MenuButton) `
12
12
  }
13
13
  `;
14
14
  const StyledCell = styled.div `
15
+ &:not(:has(${StyledMenuButton})) {
16
+ gap: 0.25rem;
17
+ }
15
18
  display: flex;
16
19
  text-align: right;
17
20
  justify-content: flex-end;
@@ -25,11 +28,36 @@ const StyledCell = styled.div `
25
28
  const StyledAggregationValue = styled.div `
26
29
  font-weight: ${props => props.theme.base['font-weight']['semi-bold']};
27
30
  `;
31
+ /**
32
+ * Formats the aggregation value based on the aggregation type and column context.
33
+ *
34
+ * @param {number|string} rawAggregationValue - The raw aggregation value to format.
35
+ * @param {string} aggregationType - The type of aggregation (e.g., 'Avg').
36
+ * @param {import('pega-repeating-structures-core').RsCoreTypes.Column} column - The column object.
37
+ * @returns {string|number} The formatted aggregation value or the raw value if no formatter is available.
38
+ */
39
+ export const getFormattedAggregationValue = (rawAggregationValue, aggregationType, column) => {
40
+ const formatter = column.getContext().getFormatter();
41
+ const fieldDef = column.getContext().getField();
42
+ const { fieldType } = fieldDef;
43
+ const { locale, timezone } = column.parent.meta;
44
+ if (!formatter)
45
+ return rawAggregationValue;
46
+ if (aggregationType === 'Avg' && fieldType === 'Integer') {
47
+ return formatNumber(Number(rawAggregationValue), {
48
+ locale,
49
+ useGrouping: true,
50
+ maximumFractionDigits: 2
51
+ });
52
+ }
53
+ return formatter(rawAggregationValue, { locale, timezone, fieldDef });
54
+ };
28
55
  export default function AggregateMenu({ column, context }) {
29
- const { aggregateOptions, locale, timezone } = column.parent.meta;
56
+ const { aggregateOptions } = column.parent.meta;
30
57
  const { aggregationType } = column;
31
58
  const uid = createUID();
32
59
  const [translate] = useTranslate();
60
+ const isFooterAggregate = context.getExecutionContext?.()?.name === 'footer';
33
61
  const actions = aggregateOptions[column.field.type]?.map(label => ({
34
62
  primary: translate(label),
35
63
  id: label,
@@ -39,28 +67,14 @@ export default function AggregateMenu({ column, context }) {
39
67
  if (!actions)
40
68
  return null;
41
69
  const rawAggregationValue = context.getValue();
42
- const formatter = column.getContext().getFormatter();
43
- const fieldDef = column.getContext().getField();
44
- const { fieldType } = fieldDef;
45
- const aggregationValue = (() => {
46
- if (!formatter)
47
- return rawAggregationValue;
48
- if (aggregationType === 'Avg' && fieldType === 'Integer') {
49
- return formatNumber(Number(rawAggregationValue), {
50
- locale,
51
- useGrouping: true,
52
- maximumFractionDigits: 2
53
- });
54
- }
55
- return formatter(rawAggregationValue, { locale, timezone, fieldDef });
56
- })();
70
+ const aggregationValue = getFormattedAggregationValue(rawAggregationValue, aggregationType, column);
57
71
  const buttonText = translate('Aggregate options');
58
- return (_jsxs(StyledCell, { children: [_jsx("span", { children: translate(aggregationType) }), _jsx(StyledMenuButton, { className: 'aggregate-button', menu: {
72
+ return (_jsxs(StyledCell, { children: [_jsx("span", { children: translate(aggregationType) }), isFooterAggregate && (_jsx(StyledMenuButton, { className: 'aggregate-button', menu: {
59
73
  items: actions,
60
74
  mode: 'single-select'
61
75
  }, popover: {
62
76
  portal: true
63
- }, icon: 'arrow-micro-down', iconOnly: true, variant: 'simple', compact: true, text: buttonText, "aria-labelledby": `${uid}_label` }), _jsx(Flex, { container: true, as: StyledAggregationValue, item: { shrink: 0 }, "data-testid": TestIdConstants.aggregateDisplayValue, children: aggregationValue }), _jsx(VisuallyHiddenText, { id: `${uid}_label`, "aria-hidden": true, children: `${translate(aggregationType)} ${context.getValue()} ${buttonText}` })] }));
77
+ }, icon: 'arrow-micro-down', iconOnly: true, variant: 'simple', compact: true, text: buttonText, "aria-labelledby": `${uid}_label` })), _jsx(Flex, { container: true, as: StyledAggregationValue, item: { shrink: 0 }, "data-testid": TestIdConstants.aggregateDisplayValue, children: aggregationValue }), _jsx(VisuallyHiddenText, { id: `${uid}_label`, "aria-hidden": true, children: `${translate(aggregationType)} ${context.getValue()} ${buttonText}` })] }));
64
78
  }
65
79
  AggregateMenu.propTypes = {
66
80
  column: PropTypes.objectOf(PropTypes.any),
@@ -1 +1 @@
1
- {"version":3,"file":"AggregateMenu.js","source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ACP,IAAI,EAAE,UAAU,qBACC,GAAG,GAAG,QAAQ,GAC/B,EACF,KAAC,IAAI,IACH,SAAS,QACT,EAAE,EAAE,sBAAsB,EAC1B,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,iBACN,eAAe,CAAC,qBAAqB,YAEjD,gBAAgB,GACZ,EACP,KAAC,kBAAkB,IAAC,EAAE,EAAE,GAAG,GAAG,QAAQ,iCACnC,GAAG,SAAS,CAAC,eAAe,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,IAAI,UAAU,EAAE,GACjD,IACV,CACd,CAAC;AACJ,CAAC;AAED,aAAa,CAAC,SAAS,GAAG;IACxB,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;IACzC,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;CAC3C,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG;IAC3B,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,EAAE;CACZ,CAAC","sourcesContent":["import styled from 'styled-components';\nimport PropTypes from 'prop-types';\n\nimport {\n Flex,\n MenuButton,\n VisuallyHiddenText,\n createUID,\n formatNumber\n} from '@pega/cosmos-react-core';\n\nimport useTranslate from '../Hooks/useTranslate';\n\nimport TestIdConstants from './TestIdConstants';\n\nconst StyledMenuButton = styled(MenuButton)`\n color: ${props => props.theme.base.palette['foreground-color']};\n svg {\n width: 1.5rem;\n height: 1.5rem;\n }\n`;\n\nconst StyledCell = styled.div`\n display: flex;\n text-align: right;\n justify-content: flex-end;\n align-items: center;\n margin-inline-end: var(--cell-padding);\n\n &:hover {\n background-clip: padding-box;\n }\n`;\n\nconst StyledAggregationValue = styled.div`\n font-weight: ${props => props.theme.base['font-weight']['semi-bold']};\n`;\n\nexport default function AggregateMenu({ column, context }) {\n const { aggregateOptions, locale, timezone } = column.parent.meta;\n const { aggregationType } = column;\n const uid = createUID();\n const [translate] = useTranslate();\n\n const actions = aggregateOptions[column.field.type]?.map(label => ({\n primary: translate(label),\n id: label,\n onClick: () => column.applyAggregation(label),\n selected: aggregationType === label\n }));\n if (!actions) return null;\n\n const rawAggregationValue = context.getValue();\n const formatter = column.getContext().getFormatter();\n const fieldDef = column.getContext().getField();\n const { fieldType } = fieldDef;\n\n const aggregationValue = (() => {\n if (!formatter) return rawAggregationValue;\n\n if (aggregationType === 'Avg' && fieldType === 'Integer') {\n return formatNumber(Number(rawAggregationValue), {\n locale,\n useGrouping: true,\n maximumFractionDigits: 2\n });\n }\n\n return formatter(rawAggregationValue, { locale, timezone, fieldDef });\n })();\n\n const buttonText = translate('Aggregate options');\n\n return (\n <StyledCell>\n <span>{translate(aggregationType)}</span>\n <StyledMenuButton\n className='aggregate-button'\n menu={{\n items: actions,\n mode: 'single-select'\n }}\n popover={{\n portal: true\n }}\n icon='arrow-micro-down'\n iconOnly\n variant='simple'\n compact\n text={buttonText} // Text property to display tooltip on hover\n aria-labelledby={`${uid}_label`}\n />\n <Flex\n container\n as={StyledAggregationValue}\n item={{ shrink: 0 }}\n data-testid={TestIdConstants.aggregateDisplayValue}\n >\n {aggregationValue}\n </Flex>\n <VisuallyHiddenText id={`${uid}_label`} aria-hidden>\n {`${translate(aggregationType)} ${context.getValue()} ${buttonText}`}\n </VisuallyHiddenText>\n </StyledCell>\n );\n}\n\nAggregateMenu.propTypes = {\n column: PropTypes.objectOf(PropTypes.any),\n context: PropTypes.objectOf(PropTypes.any)\n};\n\nAggregateMenu.defaultProps = {\n column: {},\n context: {}\n};\n"]}
1
+ {"version":3,"file":"AggregateMenu.js","sourceRoot":"","sources":["../../../Core/Components/AggregateMenu.jsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EACL,IAAI,EACJ,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,YAAY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EACD,IAAI,EAAC,kBAAkB,EACvB,QAAQ,QACR,OAAO,EAAC,QAAQ,EAChB,OAAO,QACP,IAAI,EAAE,UAAU,qBACC,GAAG,GAAG,QAAQ,GAC/B,CACH,EACD,KAAC,IAAI,IACH,SAAS,QACT,EAAE,EAAE,sBAAsB,EAC1B,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,iBACN,eAAe,CAAC,qBAAqB,YAEjD,gBAAgB,GACZ,EACP,KAAC,kBAAkB,IAAC,EAAE,EAAE,GAAG,GAAG,QAAQ,iCACnC,GAAG,SAAS,CAAC,eAAe,CAAC,IAAI,OAAO,CAAC,QAAQ,EAAE,IAAI,UAAU,EAAE,GACjD,IACV,CACd,CAAC;AACJ,CAAC;AAED,aAAa,CAAC,SAAS,GAAG;IACxB,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;IACzC,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;CAC3C,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG;IAC3B,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,EAAE;CACZ,CAAC","sourcesContent":["import styled from 'styled-components';\nimport PropTypes from 'prop-types';\n\nimport {\n Flex,\n MenuButton,\n VisuallyHiddenText,\n createUID,\n formatNumber\n} from '@pega/cosmos-react-core';\n\nimport useTranslate from '../Hooks/useTranslate';\n\nimport TestIdConstants from './TestIdConstants';\n\nconst StyledMenuButton = styled(MenuButton)`\n color: ${props => props.theme.base.palette['foreground-color']};\n svg {\n width: 1.5rem;\n height: 1.5rem;\n }\n`;\n\nconst StyledCell = styled.div`\n &:not(:has(${StyledMenuButton})) {\n gap: 0.25rem;\n }\n display: flex;\n text-align: right;\n justify-content: flex-end;\n align-items: center;\n margin-inline-end: var(--cell-padding);\n\n &:hover {\n background-clip: padding-box;\n }\n`;\n\nconst StyledAggregationValue = styled.div`\n font-weight: ${props => props.theme.base['font-weight']['semi-bold']};\n`;\n\n/**\n * Formats the aggregation value based on the aggregation type and column context.\n *\n * @param {number|string} rawAggregationValue - The raw aggregation value to format.\n * @param {string} aggregationType - The type of aggregation (e.g., 'Avg').\n * @param {import('pega-repeating-structures-core').RsCoreTypes.Column} column - The column object.\n * @returns {string|number} The formatted aggregation value or the raw value if no formatter is available.\n */\nexport const getFormattedAggregationValue = (rawAggregationValue, aggregationType, column) => {\n const formatter = column.getContext().getFormatter();\n const fieldDef = column.getContext().getField();\n const { fieldType } = fieldDef;\n const { locale, timezone } = column.parent.meta;\n\n if (!formatter) return rawAggregationValue;\n\n if (aggregationType === 'Avg' && fieldType === 'Integer') {\n return formatNumber(Number(rawAggregationValue), {\n locale,\n useGrouping: true,\n maximumFractionDigits: 2\n });\n }\n\n return formatter(rawAggregationValue, { locale, timezone, fieldDef });\n};\n\nexport default function AggregateMenu({ column, context }) {\n const { aggregateOptions } = column.parent.meta;\n const { aggregationType } = column;\n const uid = createUID();\n const [translate] = useTranslate();\n const isFooterAggregate = context.getExecutionContext?.()?.name === 'footer';\n\n const actions = aggregateOptions[column.field.type]?.map(label => ({\n primary: translate(label),\n id: label,\n onClick: () => column.applyAggregation(label),\n selected: aggregationType === label\n }));\n if (!actions) return null;\n\n const rawAggregationValue = context.getValue();\n\n const aggregationValue = getFormattedAggregationValue(\n rawAggregationValue,\n aggregationType,\n column\n );\n\n const buttonText = translate('Aggregate options');\n\n return (\n <StyledCell>\n <span>{translate(aggregationType)}</span>\n {isFooterAggregate && (\n <StyledMenuButton\n className='aggregate-button'\n menu={{\n items: actions,\n mode: 'single-select'\n }}\n popover={{\n portal: true\n }}\n icon='arrow-micro-down'\n iconOnly\n variant='simple'\n compact\n text={buttonText} // Text property to display tooltip on hover\n aria-labelledby={`${uid}_label`}\n />\n )}\n <Flex\n container\n as={StyledAggregationValue}\n item={{ shrink: 0 }}\n data-testid={TestIdConstants.aggregateDisplayValue}\n >\n {aggregationValue}\n </Flex>\n <VisuallyHiddenText id={`${uid}_label`} aria-hidden>\n {`${translate(aggregationType)} ${context.getValue()} ${buttonText}`}\n </VisuallyHiddenText>\n </StyledCell>\n );\n}\n\nAggregateMenu.propTypes = {\n column: PropTypes.objectOf(PropTypes.any),\n context: PropTypes.objectOf(PropTypes.any)\n};\n\nAggregateMenu.defaultProps = {\n column: {},\n context: {}\n};\n"]}
@@ -1,17 +1,8 @@
1
- declare function ContextMenuContainer({ view, selector }: {
2
- view: any;
3
- selector: any;
1
+ import type { RsCoreTypes } from 'pega-repeating-structures-core';
2
+ export default function ContextMenuContainer({ view, selector }: {
3
+ view: RsCoreTypes.View;
4
+ selector: {
5
+ query: string;
6
+ };
4
7
  }): import("react/jsx-runtime").JSX.Element | null;
5
- declare namespace ContextMenuContainer {
6
- namespace propTypes {
7
- let view: PropTypes.Validator<{
8
- [x: string]: any;
9
- }>;
10
- let selector: PropTypes.Validator<{
11
- [x: string]: any;
12
- }>;
13
- }
14
- }
15
- export default ContextMenuContainer;
16
- import PropTypes from 'prop-types';
17
8
  //# sourceMappingURL=ContextMenuContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Components/ContextMenu/ContextMenuContainer.jsx"],"names":[],"mappings":"AAwMA;;;mDA+GC;;;;;;;;;;;;sBAvTqB,YAAY"}
1
+ {"version":3,"file":"ContextMenuContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Components/ContextMenu/ContextMenuContainer.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AA0FlE,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,IAAI,EACJ,QAAQ,EACT,EAAE;IACD,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IACvB,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7B,kDAyGA"}
@@ -1,134 +1,55 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import PropTypes from 'prop-types';
3
- import { useRef, useState, useMemo, useEffect, useCallback } from 'react';
4
- import styled, { css } from 'styled-components';
5
- import { Popover, Icon, useElement, useOuterEvent } from '@pega/cosmos-react-core';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useState, useMemo, useEffect, useCallback } from 'react';
3
+ import { v4 as uuidV4 } from 'uuid';
4
+ import { Popover, Icon, useElement, useOuterEvent, Menu, isInstance } from '@pega/cosmos-react-core';
6
5
  import { getRowContextData, getScrollerElem, isFilterApplied } from 'pega-repeating-structures-core';
7
- import { createClassName as cx } from '../../Utils';
8
6
  import useTranslate from '../../Hooks/useTranslate';
9
7
  import useScrollAway from '../../Hooks/useScrollAway';
8
+ import TestIdConstants from '../TestIdConstants';
10
9
  import { applyFilter, quickFilterEnabled, removeFilter } from './QuickFilter';
11
10
  import copyText from './CopyPaste';
12
- const StyledPopover = styled.div `
13
- width: 10rem;
14
- `;
15
- const StyledContent = styled.div(({ theme }) => {
16
- return css `
17
- white-space: nowrap;
18
- overflow: hidden;
19
- text-overflow: ellipsis;
20
- padding: 0.25rem;
21
- border-radius: 0.156rem;
22
- box-sizing: border-box;
23
- cursor: pointer;
24
- margin-top: 0.125rem;
25
- margin-bottom: 0.125rem;
26
- :hover {
27
- background-color: ${theme.base.colors.blue['extra-light']};
28
- box-shadow: ${theme.base.shadow['focus-inset']};
29
- }
30
- `;
31
- });
32
- const StyledListItem = styled.div(({ theme }) => {
33
- return css `
34
- button {
35
- display: flex;
36
- align-items: center;
37
- /* stylelint-disable unit-allowed-list */
38
- padding: 4px 8px;
39
- }
40
- .label {
41
- padding-left: 14px;
42
- vertical-align: text-top;
43
- }
44
- .disabled {
45
- padding-left: 14px;
46
- vertical-align: text-top;
47
- opacity: ${theme.base['disabled-opacity']};
48
- }
49
- `;
50
- });
51
- const StyledButton = styled.button `
52
- display: block;
53
- text-align: start;
54
- background: none;
55
- border: none;
56
- line-height: 1;
57
- outline: none;
58
- cursor: pointer;
59
- color: ${props => props.theme.base.palette['foreground-color']};
60
- border-radius: 0;
61
- `;
62
- const getDefaultMenuItems = (column, rowContextData, targetCell, columns, filterExpression, actionColumnFiltering, actionClearFiltering, translate) => {
63
- const isFiltered = isFilterApplied(column, filterExpression);
64
- return [
65
- {
11
+ const getMenuItems = (targetCell, column, rowContextData, view, translate) => {
12
+ const { columns = [], state: { filterExpression } = {}, type: { applyFilter: applyViewFilter, clearFilter } } = view;
13
+ const defaultMenuItems = [];
14
+ if (quickFilterEnabled(columns, column.field.id)) {
15
+ const isFiltered = filterExpression && isFilterApplied(column, filterExpression);
16
+ defaultMenuItems.push({
66
17
  id: 'quickFilter',
67
- icon: isFiltered ? 'times' : 'filter',
68
- label: isFiltered ? translate('Remove filter') : translate('Filter by this'),
69
- show: !!quickFilterEnabled(columns, column.field.id),
70
- disabled: false,
18
+ visual: isFiltered ? _jsx(Icon, { name: 'times' }) : _jsx(Icon, { name: 'filter' }),
19
+ primary: isFiltered ? translate('Remove filter') : translate('Filter by this'),
71
20
  onClick: () => {
72
21
  if (isFiltered) {
73
- return removeFilter(filterExpression, targetCell, actionColumnFiltering, actionClearFiltering);
22
+ removeFilter(filterExpression, targetCell, applyViewFilter, clearFilter);
23
+ }
24
+ else {
25
+ applyFilter(columns, targetCell, rowContextData, filterExpression, applyViewFilter);
74
26
  }
75
- return applyFilter(columns, targetCell, rowContextData, filterExpression, actionColumnFiltering);
76
27
  }
77
- },
78
- {
79
- id: 'copyText',
80
- icon: 'copy',
81
- label: translate('Copy text'),
82
- show: true,
83
- disabled: false,
84
- onClick: () => copyText(targetCell)
85
- },
86
- {
87
- id: 'pasteText',
88
- icon: 'documents',
89
- label: translate('Paste text'),
90
- show: true,
91
- disabled: true,
92
- onClick: () => { }
93
- }
94
- ];
95
- };
96
- const getMenuItems = (targetCell, column, rowContextData, columns, filterExpression, actionColumnFiltering, actionClearFiltering, translate) => {
97
- const fieldContextOptions = column.field?.contextMenuOptions || [];
98
- return [
99
- ...getDefaultMenuItems(column, rowContextData, targetCell, columns, filterExpression, actionColumnFiltering, actionClearFiltering, translate),
100
- ...fieldContextOptions
101
- ];
102
- };
103
- const shouldOverrideContextMenu = (targetCell, columns) => {
104
- if (!targetCell) {
105
- return false;
28
+ });
106
29
  }
30
+ defaultMenuItems.push({
31
+ id: 'copyText',
32
+ visual: _jsx(Icon, { name: 'copy' }),
33
+ primary: translate('Copy text'),
34
+ onClick: () => copyText(targetCell)
35
+ });
36
+ const fieldSpecificMenuItems = (column.field?.contextMenuOptions || []).map(option => ({
37
+ id: option.id,
38
+ visual: option.icon ? _jsx(Icon, { name: option.icon }) : undefined,
39
+ primary: option.label || '',
40
+ onClick: () => option.onClick?.(targetCell)
41
+ }));
42
+ return [...defaultMenuItems, ...fieldSpecificMenuItems];
43
+ };
44
+ const shouldOverrideContextMenu = (targetCell, columns = []) => {
107
45
  const { colId } = targetCell.dataset;
108
46
  const { field } = columns.find(col => col.field.id.toString() === colId?.toString()) || {};
109
47
  return !(!field || field?.noContextMenu);
110
48
  };
111
- const MenuItem = ({ menu = {}, target = {}, column = {}, rowContextData = {}, onMenuItemClick = () => { } }) => {
112
- const { onClick = () => { }, icon, disabled = false, show = true, label } = menu;
113
- if (!show) {
114
- return null;
115
- }
116
- return (_jsx(StyledContent, { onClick: () => {
117
- onMenuItemClick();
118
- onClick(target, column, rowContextData);
119
- }, children: _jsx(StyledListItem, { children: _jsxs(StyledButton, { children: [icon && _jsx(Icon, { name: icon }), _jsx("span", { className: cx('label', { disabled }), children: label })] }) }) }));
120
- };
121
- MenuItem.propTypes = {
122
- menu: PropTypes.objectOf(PropTypes.any),
123
- target: PropTypes.objectOf(PropTypes.any),
124
- column: PropTypes.objectOf(PropTypes.any),
125
- rowContextData: PropTypes.objectOf(PropTypes.any),
126
- onMenuItemClick: PropTypes.func
127
- };
128
49
  export default function ContextMenuContainer({ view, selector }) {
129
- const { columns, data, state: { paginationOptions, filterExpression } = {}, domContainer, type: { applyFilter: applyViewFilter, clearFilter } } = view;
50
+ const { columns = [], data = [], state: { paginationOptions } = {}, domContainer } = view;
130
51
  const [translate] = useTranslate();
131
- const contextMenuRef = useRef({}).current;
52
+ const [menuContext, setMenuContext] = useState(null);
132
53
  const [showMenu, setShowMenu] = useState(false);
133
54
  const [menuItems, setMenuItems] = useState([]);
134
55
  const [popperRef, setPopperRef] = useElement();
@@ -139,63 +60,70 @@ export default function ContextMenuContainer({ view, selector }) {
139
60
  useScrollAway(popperRef, scrollerElem, () => {
140
61
  setShowMenu(false);
141
62
  });
142
- const onMenuItemClick = useCallback(event => {
143
- if (event && event.key !== 'Escape') {
144
- return;
63
+ useEffect(() => {
64
+ if (!showMenu) {
65
+ const targetCell = menuContext?.targetCell;
66
+ if (targetCell) {
67
+ targetCell.removeAttribute('data-context-menu-active');
68
+ targetCell.removeAttribute('aria-expanded');
69
+ targetCell.removeAttribute('aria-controls');
70
+ }
71
+ setMenuContext(null);
145
72
  }
146
- setShowMenu(false);
147
- }, []);
148
- const contextMenuListener = useCallback(e => {
149
- const targetElement = selector ? e.target.closest(selector.query.toString()) : e.target;
150
- if (shouldOverrideContextMenu(targetElement, columns) &&
151
- // TODO: We will add "Open link in new tab" option in context menu once the custom context menu is made accessible.
152
- !e.target.closest('a')) {
73
+ }, [showMenu]);
74
+ const contextMenuListener = useCallback((e) => {
75
+ const target = e.target;
76
+ if (!isInstance(target, Element))
77
+ return;
78
+ const targetElement = target.closest(selector.query.toString());
79
+ if (!isInstance(targetElement, HTMLElement))
80
+ return;
81
+ if (shouldOverrideContextMenu(targetElement, columns) && !target.closest('a')) {
153
82
  e.stopPropagation();
154
83
  e.preventDefault();
155
- contextMenuRef.targetCell = targetElement;
156
- const { colId } = contextMenuRef.targetCell.dataset;
157
- contextMenuRef.column = columns.find(col => col.field.id.toString() === colId?.toString());
158
- contextMenuRef.rowContextData = getRowContextData(data, paginationOptions, targetElement);
159
- targetElement.classList.add('selection-border', 'disable-select');
160
- const options = getMenuItems(targetElement, contextMenuRef.column, contextMenuRef.rowContextData, columns, filterExpression, applyViewFilter, clearFilter, translate);
84
+ const { colId } = targetElement.dataset;
85
+ const column = columns.find(col => col.field.id.toString() === colId?.toString());
86
+ if (!column)
87
+ return;
88
+ targetElement.setAttribute('data-context-menu-active', 'true');
89
+ targetElement.setAttribute('aria-expanded', 'true');
90
+ const menuId = `rs-context-menu-${uuidV4()}`;
91
+ targetElement.setAttribute('aria-controls', menuId);
92
+ const rowContextData = getRowContextData(data, paginationOptions || {}, targetElement);
93
+ const options = getMenuItems(targetElement, column, rowContextData, view, translate);
94
+ if (!options.length)
95
+ return;
161
96
  setShowMenu(true);
162
97
  setMenuItems(options);
98
+ setMenuContext({
99
+ column,
100
+ targetCell: targetElement,
101
+ rowContextData,
102
+ menuId
103
+ });
163
104
  }
164
- }, [
165
- selector,
166
- columns,
167
- contextMenuRef.targetCell,
168
- contextMenuRef.column,
169
- contextMenuRef.rowContextData,
170
- data,
171
- paginationOptions,
172
- filterExpression,
173
- applyViewFilter,
174
- clearFilter,
175
- translate
176
- ]);
105
+ }, [selector, columns, data, paginationOptions, translate, view]);
106
+ const onKeydown = useCallback(({ key }) => {
107
+ if (key === 'Escape')
108
+ setShowMenu(false);
109
+ }, []);
177
110
  useEffect(() => {
178
- if (domContainer) {
179
- domContainer.addEventListener('contextmenu', contextMenuListener);
180
- domContainer.addEventListener('keydown', onMenuItemClick);
181
- }
111
+ const abortController = new AbortController();
112
+ if (!domContainer)
113
+ return;
114
+ domContainer.addEventListener('contextmenu', contextMenuListener, {
115
+ signal: abortController.signal
116
+ });
117
+ document.addEventListener('keydown', onKeydown, {
118
+ signal: abortController.signal
119
+ });
182
120
  return () => {
183
- if (domContainer) {
184
- domContainer.removeEventListener('contextmenu', contextMenuListener);
185
- domContainer.removeEventListener('keydown', onMenuItemClick);
186
- }
121
+ abortController.abort();
187
122
  };
188
- }, [domContainer, contextMenuListener, onMenuItemClick]);
189
- if (!contextMenuRef.targetCell || !showMenu || !domContainer) {
190
- if (contextMenuRef.targetCell && selector) {
191
- contextMenuRef.targetCell.classList.remove('selection-border', 'disable-select');
192
- }
193
- return null;
194
- }
195
- return (_jsx(Popover, { portal: true, ref: setPopperRef, target: contextMenuRef.targetCell, children: _jsx(StyledPopover, { children: menuItems.map(menu => (_jsx(MenuItem, { onMenuItemClick: onMenuItemClick, target: contextMenuRef.targetCell, column: contextMenuRef.column, rowContextData: contextMenuRef.rowContextData, menu: menu }, menu.id))) }) }));
123
+ }, [domContainer, contextMenuListener]);
124
+ return showMenu && menuContext ? (_jsx(Popover, { ref: setPopperRef, target: menuContext.targetCell, children: _jsx(Menu, { id: menuContext.menuId, items: menuItems, onItemClick: (_, e) => {
125
+ e.preventDefault();
126
+ setShowMenu(false);
127
+ }, focusControlEl: menuContext.targetCell, className: 'action-menu', "data-testid": TestIdConstants.contextMenu, "data-test-id": 'action-menu' }) })) : null;
196
128
  }
197
- ContextMenuContainer.propTypes = {
198
- view: PropTypes.objectOf(PropTypes.any).isRequired,
199
- selector: PropTypes.objectOf(PropTypes.any).isRequired
200
- };
201
129
  //# sourceMappingURL=ContextMenuContainer.js.map