@pega/lists-react 9.0.0-build.9.8 → 9.0.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 (437) hide show
  1. package/README.md +0 -4
  2. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts.map +1 -1
  3. package/lib/Core/Components/A11y/RepeatingStructureA11y.js +2 -1
  4. package/lib/Core/Components/A11y/RepeatingStructureA11y.js.map +1 -1
  5. package/lib/Core/Components/AggregateMenu.d.ts.map +1 -1
  6. package/lib/Core/Components/AggregateMenu.js +6 -2
  7. package/lib/Core/Components/AggregateMenu.js.map +1 -1
  8. package/lib/Core/Components/AggregatorCell.d.ts.map +1 -1
  9. package/lib/Core/Components/AggregatorCell.js +3 -1
  10. package/lib/Core/Components/AggregatorCell.js.map +1 -1
  11. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts +6 -15
  12. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts.map +1 -1
  13. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js +111 -166
  14. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js.map +1 -1
  15. package/lib/Core/Components/ContextMenu/QuickFilter.js +1 -1
  16. package/lib/Core/Components/ContextMenu/QuickFilter.js.map +1 -1
  17. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts +1 -1
  18. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts.map +1 -1
  19. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts.map +1 -1
  20. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +33 -5
  21. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -1
  22. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.d.ts +10 -0
  23. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.d.ts.map +1 -0
  24. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.js +27 -0
  25. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.js.map +1 -0
  26. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts +2 -2
  27. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts.map +1 -1
  28. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js +2 -2
  29. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js.map +1 -1
  30. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +3 -1
  31. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
  32. package/lib/Core/Components/DefaultComponents/EmptyContainer.js +11 -2
  33. package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -1
  34. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts +3 -2
  35. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts.map +1 -1
  36. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js +13 -26
  37. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js.map +1 -1
  38. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js +2 -2
  39. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js.map +1 -1
  40. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts +0 -2
  41. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts.map +1 -1
  42. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js +11 -9
  43. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js.map +1 -1
  44. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.d.ts.map +1 -1
  45. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js +20 -19
  46. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js.map +1 -1
  47. package/lib/Core/Components/DefaultComponents/index.d.ts +4 -3
  48. package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -1
  49. package/lib/Core/Components/DefaultComponents/index.js +0 -2
  50. package/lib/Core/Components/DefaultComponents/index.js.map +1 -1
  51. package/lib/Core/Components/Filters/AdvanceFilter.d.ts.map +1 -1
  52. package/lib/Core/Components/Filters/AdvanceFilter.js +5 -2
  53. package/lib/Core/Components/Filters/AdvanceFilter.js.map +1 -1
  54. package/lib/Core/Components/Filters/SelectFilter.d.ts +1 -1
  55. package/lib/Core/Components/Filters/SelectFilter.d.ts.map +1 -1
  56. package/lib/Core/Components/Filters/SelectFilter.js +43 -44
  57. package/lib/Core/Components/Filters/SelectFilter.js.map +1 -1
  58. package/lib/Core/Components/Filters/SimpleFilter.js +1 -1
  59. package/lib/Core/Components/Filters/SimpleFilter.js.map +1 -1
  60. package/lib/Core/Components/Filters/styles.d.ts +1 -1
  61. package/lib/Core/Components/FooterAggregators.d.ts.map +1 -1
  62. package/lib/Core/Components/FooterAggregators.js +6 -3
  63. package/lib/Core/Components/FooterAggregators.js.map +1 -1
  64. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts +12 -0
  65. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts.map +1 -0
  66. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js +62 -0
  67. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js.map +1 -0
  68. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts +33 -0
  69. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts.map +1 -0
  70. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js +106 -0
  71. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js.map +1 -0
  72. package/lib/Core/Components/GroupRenderer/index.d.ts +22 -0
  73. package/lib/Core/Components/GroupRenderer/index.d.ts.map +1 -0
  74. package/lib/Core/Components/GroupRenderer/index.js +395 -0
  75. package/lib/Core/Components/GroupRenderer/index.js.map +1 -0
  76. package/lib/Core/Components/Grouping/GroupingMenu.d.ts.map +1 -1
  77. package/lib/Core/Components/Grouping/GroupingMenu.js +2 -1
  78. package/lib/Core/Components/Grouping/GroupingMenu.js.map +1 -1
  79. package/lib/Core/Components/HeaderCell.d.ts.map +1 -1
  80. package/lib/Core/Components/HeaderCell.js +3 -3
  81. package/lib/Core/Components/HeaderCell.js.map +1 -1
  82. package/lib/Core/Components/HeaderMenu/actions.d.ts +1 -1
  83. package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
  84. package/lib/Core/Components/HeaderMenu/actions.js +3 -4
  85. package/lib/Core/Components/HeaderMenu/actions.js.map +1 -1
  86. package/lib/Core/Components/HeaderMenu/index.d.ts.map +1 -1
  87. package/lib/Core/Components/HeaderMenu/index.js +5 -5
  88. package/lib/Core/Components/HeaderMenu/index.js.map +1 -1
  89. package/lib/Core/Components/HierarchicalGroupRenderer.d.ts.map +1 -1
  90. package/lib/Core/Components/HierarchicalGroupRenderer.js +6 -2
  91. package/lib/Core/Components/HierarchicalGroupRenderer.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/RSWrapper/index.d.ts.map +1 -1
  101. package/lib/Core/Components/RSWrapper/index.js +2 -9
  102. package/lib/Core/Components/RSWrapper/index.js.map +1 -1
  103. package/lib/Core/Components/RenderingEngine/Formatter.d.ts.map +1 -1
  104. package/lib/Core/Components/RenderingEngine/Formatter.js +4 -1
  105. package/lib/Core/Components/RenderingEngine/Formatter.js.map +1 -1
  106. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
  107. package/lib/Core/Components/RenderingEngine/RenderCell.js +19 -8
  108. package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -1
  109. package/lib/Core/Components/RenderingEngine/useHighlighter.d.ts.map +1 -1
  110. package/lib/Core/Components/RenderingEngine/useHighlighter.js +0 -1
  111. package/lib/Core/Components/RenderingEngine/useHighlighter.js.map +1 -1
  112. package/lib/Core/Components/TestIdConstants.d.ts +2 -0
  113. package/lib/Core/Components/TestIdConstants.js +3 -1
  114. package/lib/Core/Components/TestIdConstants.js.map +1 -1
  115. package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
  116. package/lib/Core/Components/Toolbar/AdvanceToolbar.js +7 -18
  117. package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
  118. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +6 -4
  119. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -1
  120. package/lib/Core/Components/Toolbar/ColumnSelector.js +18 -21
  121. package/lib/Core/Components/Toolbar/ColumnSelector.js.map +1 -1
  122. package/lib/Core/Components/Toolbar/DebugInfo.d.ts +3 -5
  123. package/lib/Core/Components/Toolbar/DebugInfo.d.ts.map +1 -1
  124. package/lib/Core/Components/Toolbar/DebugInfo.js +3 -3
  125. package/lib/Core/Components/Toolbar/DebugInfo.js.map +1 -1
  126. package/lib/Core/Components/Toolbar/FieldSelector.d.ts +2 -1
  127. package/lib/Core/Components/Toolbar/FieldSelector.d.ts.map +1 -1
  128. package/lib/Core/Components/Toolbar/FieldSelector.js +14 -7
  129. package/lib/Core/Components/Toolbar/FieldSelector.js.map +1 -1
  130. package/lib/Core/Components/Toolbar/Grouping.types.d.ts +0 -6
  131. package/lib/Core/Components/Toolbar/Grouping.types.d.ts.map +1 -1
  132. package/lib/Core/Components/Toolbar/Grouping.types.js.map +1 -1
  133. package/lib/Core/Components/Toolbar/RefreshBanner.d.ts.map +1 -1
  134. package/lib/Core/Components/Toolbar/RefreshBanner.js +1 -0
  135. package/lib/Core/Components/Toolbar/RefreshBanner.js.map +1 -1
  136. package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
  137. package/lib/Core/Components/Toolbar/SimpleToolbar.js +2 -4
  138. package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
  139. package/lib/Core/Components/Toolbar/hooks/useFilter.d.ts.map +1 -1
  140. package/lib/Core/Components/Toolbar/hooks/useFilter.js +4 -1
  141. package/lib/Core/Components/Toolbar/hooks/useFilter.js.map +1 -1
  142. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts +14 -18
  143. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts.map +1 -1
  144. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js +15 -16
  145. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js.map +1 -1
  146. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts +4 -2
  147. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -1
  148. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +30 -22
  149. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js.map +1 -1
  150. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.d.ts.map +1 -1
  151. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js +17 -6
  152. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js.map +1 -1
  153. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts +7 -2
  154. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts.map +1 -1
  155. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js +12 -5
  156. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js.map +1 -1
  157. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts +1 -1
  158. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts.map +1 -1
  159. package/lib/Core/Components/Toolbar/hooks/useMore.js +134 -80
  160. package/lib/Core/Components/Toolbar/hooks/useMore.js.map +1 -1
  161. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts +8 -6
  162. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts.map +1 -1
  163. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js +18 -3
  164. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js.map +1 -1
  165. package/lib/Core/Components/Toolbar/hooks/useSearch.d.ts.map +1 -1
  166. package/lib/Core/Components/Toolbar/hooks/useSearch.js +7 -10
  167. package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -1
  168. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts +8 -6
  169. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts.map +1 -1
  170. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +16 -10
  171. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -1
  172. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts +4 -2
  173. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts.map +1 -1
  174. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js +9 -3
  175. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js.map +1 -1
  176. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.d.ts.map +1 -1
  177. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js +8 -2
  178. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js.map +1 -1
  179. package/lib/Core/Components/Toolbar/hooks/useSort/utils.d.ts +1 -1
  180. package/lib/Core/Components/Toolbar/hooks/useSort/utils.d.ts.map +1 -1
  181. package/lib/Core/Components/Toolbar/hooks/useSort/utils.js +2 -2
  182. package/lib/Core/Components/Toolbar/hooks/useSort/utils.js.map +1 -1
  183. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts +2 -1
  184. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts.map +1 -1
  185. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js +36 -12
  186. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js.map +1 -1
  187. package/lib/Core/Components/Toolbar/utils/utils.d.ts +28 -7
  188. package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
  189. package/lib/Core/Components/Toolbar/utils/utils.js +43 -11
  190. package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
  191. package/lib/Core/Components/Virtualise/Pagination.d.ts.map +1 -1
  192. package/lib/Core/Components/Virtualise/Pagination.js +2 -1
  193. package/lib/Core/Components/Virtualise/Pagination.js.map +1 -1
  194. package/lib/Core/Components/Virtualise/UseScroll.d.ts +4 -1
  195. package/lib/Core/Components/Virtualise/UseScroll.d.ts.map +1 -1
  196. package/lib/Core/Components/Virtualise/UseScroll.js +16 -3
  197. package/lib/Core/Components/Virtualise/UseScroll.js.map +1 -1
  198. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js +1 -1
  199. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -1
  200. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts +2 -2
  201. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -1
  202. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -1
  203. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +6 -6
  204. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -1
  205. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +6 -5
  206. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -1
  207. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +14 -4
  208. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
  209. package/lib/Core/Components/Virtualise/index.js +19 -4
  210. package/lib/Core/Components/Virtualise/index.js.map +1 -1
  211. package/lib/Core/Components/Virtualise/utility.js +1 -1
  212. package/lib/Core/Components/Virtualise/utility.js.map +1 -1
  213. package/lib/Core/Components/WarningBanner.d.ts +11 -0
  214. package/lib/Core/Components/WarningBanner.d.ts.map +1 -0
  215. package/lib/Core/Components/WarningBanner.js +23 -0
  216. package/lib/Core/Components/WarningBanner.js.map +1 -0
  217. package/lib/Core/Context/LocalizationContext.d.ts +1 -1
  218. package/lib/Core/Context/LocalizationContext.d.ts.map +1 -1
  219. package/lib/Core/Context/LocalizationContext.js.map +1 -1
  220. package/lib/Core/Hooks/a11y/useAnnounce.d.ts +3 -4
  221. package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -1
  222. package/lib/Core/Hooks/a11y/useAnnounce.js +3 -4
  223. package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -1
  224. package/lib/Core/Hooks/useDebounce.js +1 -1
  225. package/lib/Core/Hooks/useDebounce.js.map +1 -1
  226. package/lib/Core/Hooks/useDragDrop.d.ts +2 -2
  227. package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
  228. package/lib/Core/Hooks/useDragDrop.js +9 -9
  229. package/lib/Core/Hooks/useDragDrop.js.map +1 -1
  230. package/lib/Core/Hooks/useRepeat.d.ts +1 -1
  231. package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
  232. package/lib/Core/Hooks/useRepeat.js +58 -11
  233. package/lib/Core/Hooks/useRepeat.js.map +1 -1
  234. package/lib/Core/Hooks/useSelectAllCheckbox.d.ts +21 -0
  235. package/lib/Core/Hooks/useSelectAllCheckbox.d.ts.map +1 -0
  236. package/lib/Core/Hooks/useSelectAllCheckbox.js +23 -0
  237. package/lib/Core/Hooks/useSelectAllCheckbox.js.map +1 -0
  238. package/lib/Core/Localization/defaultTranslations.d.ts +15 -13
  239. package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
  240. package/lib/Core/Localization/defaultTranslations.js +16 -14
  241. package/lib/Core/Localization/defaultTranslations.js.map +1 -1
  242. package/lib/Core/Test/JUnitMocks.d.ts +12 -0
  243. package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
  244. package/lib/Core/Test/JUnitMocks.js +27 -8
  245. package/lib/Core/Test/JUnitMocks.js.map +1 -1
  246. package/lib/Core/Test/TestUtils.d.ts +0 -1
  247. package/lib/Core/Test/TestUtils.d.ts.map +1 -1
  248. package/lib/Core/Test/TestUtils.js +3 -7
  249. package/lib/Core/Test/TestUtils.js.map +1 -1
  250. package/lib/Core/Utils/index.d.ts +15 -0
  251. package/lib/Core/Utils/index.d.ts.map +1 -1
  252. package/lib/Core/Utils/index.js +22 -0
  253. package/lib/Core/Utils/index.js.map +1 -1
  254. package/lib/Core/Utils/styles.d.ts +2 -2
  255. package/lib/Core/Utils/styles.d.ts.map +1 -1
  256. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +4 -0
  257. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -0
  258. package/lib/Core/Views/Gallery/Components/GalleryCard.js +29 -0
  259. package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -0
  260. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts +8 -0
  261. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -0
  262. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +25 -0
  263. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -0
  264. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +8 -0
  265. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +1 -0
  266. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +8 -0
  267. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +1 -0
  268. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +8 -0
  269. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +1 -0
  270. package/lib/Core/Views/Gallery/Components/GalleryHeader.js +15 -0
  271. package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +1 -0
  272. package/lib/Core/Views/Gallery/Gallery.types.d.ts +8 -0
  273. package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -0
  274. package/lib/Core/Views/Gallery/Gallery.types.js +2 -0
  275. package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -0
  276. package/lib/Core/Views/Gallery/GalleryA11y.d.ts +7 -5
  277. package/lib/Core/Views/Gallery/GalleryA11y.d.ts.map +1 -1
  278. package/lib/Core/Views/Gallery/GalleryA11y.js +9 -52
  279. package/lib/Core/Views/Gallery/GalleryA11y.js.map +1 -1
  280. package/lib/Core/Views/Gallery/GalleryContainer.d.ts +23 -0
  281. package/lib/Core/Views/Gallery/GalleryContainer.d.ts.map +1 -0
  282. package/lib/Core/Views/Gallery/GalleryContainer.js +66 -0
  283. package/lib/Core/Views/Gallery/GalleryContainer.js.map +1 -0
  284. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js +1 -1
  285. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js.map +1 -1
  286. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts +9 -0
  287. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +1 -0
  288. package/lib/Core/Views/Gallery/hooks/useRowActions.js +25 -0
  289. package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +1 -0
  290. package/lib/Core/Views/Gallery/index.d.ts +4 -8
  291. package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
  292. package/lib/Core/Views/Gallery/index.js +38 -59
  293. package/lib/Core/Views/Gallery/index.js.map +1 -1
  294. package/lib/Core/Views/Gallery/utils.d.ts +36 -0
  295. package/lib/Core/Views/Gallery/utils.d.ts.map +1 -0
  296. package/lib/Core/Views/Gallery/utils.js +115 -0
  297. package/lib/Core/Views/Gallery/utils.js.map +1 -0
  298. package/lib/Core/Views/Map/Map.styles.d.ts +190 -6
  299. package/lib/Core/Views/Map/Map.styles.d.ts.map +1 -1
  300. package/lib/Core/Views/Map/Map.styles.js.map +1 -1
  301. package/lib/Core/Views/Map/index.d.ts.map +1 -1
  302. package/lib/Core/Views/Map/index.js +2 -2
  303. package/lib/Core/Views/Map/index.js.map +1 -1
  304. package/lib/Core/Views/RsCardWrapper.js.map +1 -1
  305. package/lib/Core/Views/Table/Body.d.ts.map +1 -1
  306. package/lib/Core/Views/Table/Body.js +5 -2
  307. package/lib/Core/Views/Table/Body.js.map +1 -1
  308. package/lib/Core/Views/Table/CellWrapper.d.ts +1 -1
  309. package/lib/Core/Views/Table/CellWrapper.d.ts.map +1 -1
  310. package/lib/Core/Views/Table/CellWrapper.js +4 -2
  311. package/lib/Core/Views/Table/CellWrapper.js.map +1 -1
  312. package/lib/Core/Views/Table/GroupingHeaderCell.d.ts +6 -15
  313. package/lib/Core/Views/Table/GroupingHeaderCell.d.ts.map +1 -1
  314. package/lib/Core/Views/Table/GroupingHeaderCell.js +16 -14
  315. package/lib/Core/Views/Table/GroupingHeaderCell.js.map +1 -1
  316. package/lib/Core/Views/Table/HeaderWrapper.d.ts.map +1 -1
  317. package/lib/Core/Views/Table/HeaderWrapper.js +5 -5
  318. package/lib/Core/Views/Table/HeaderWrapper.js.map +1 -1
  319. package/lib/Core/Views/Table/SkeletonRows.d.ts +1 -1
  320. package/lib/Core/Views/Table/SkeletonRows.d.ts.map +1 -1
  321. package/lib/Core/Views/Table/StyledTableContainer.d.ts +3 -1
  322. package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
  323. package/lib/Core/Views/Table/StyledTableContainer.js +270 -155
  324. package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
  325. package/lib/Core/Views/Table/TableA11y.d.ts +13 -1
  326. package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -1
  327. package/lib/Core/Views/Table/TableA11y.js +233 -13
  328. package/lib/Core/Views/Table/TableA11y.js.map +1 -1
  329. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +3 -1
  330. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
  331. package/lib/Core/Views/Table/VirtualizeWrapper.js +16 -16
  332. package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
  333. package/lib/Core/Views/Table/index.d.ts.map +1 -1
  334. package/lib/Core/Views/Table/index.js +16 -7
  335. package/lib/Core/Views/Table/index.js.map +1 -1
  336. package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -1
  337. package/lib/Core/Views/Timeline/Timeline.js +15 -20
  338. package/lib/Core/Views/Timeline/Timeline.js.map +1 -1
  339. package/lib/Core/Views/Timeline/Timeline.styles.d.ts +392 -15
  340. package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -1
  341. package/lib/Core/Views/Timeline/Timeline.styles.js +44 -44
  342. package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -1
  343. package/lib/Core/Views/Timeline/Timeline.types.d.ts +11 -7
  344. package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -1
  345. package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -1
  346. package/lib/Core/Views/Timeline/TimelineGroup.d.ts +13 -0
  347. package/lib/Core/Views/Timeline/TimelineGroup.d.ts.map +1 -0
  348. package/lib/Core/Views/Timeline/TimelineGroup.js +21 -0
  349. package/lib/Core/Views/Timeline/TimelineGroup.js.map +1 -0
  350. package/lib/Core/Views/Timeline/TimelineItem.d.ts +1 -3
  351. package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -1
  352. package/lib/Core/Views/Timeline/TimelineItem.js +7 -6
  353. package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -1
  354. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +2 -2
  355. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -1
  356. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -1
  357. package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
  358. package/lib/Core/Views/Timeline/index.js +13 -6
  359. package/lib/Core/Views/Timeline/index.js.map +1 -1
  360. package/lib/Core/Views/Timeline/utils.d.ts +8 -10
  361. package/lib/Core/Views/Timeline/utils.d.ts.map +1 -1
  362. package/lib/Core/Views/Timeline/utils.js +136 -58
  363. package/lib/Core/Views/Timeline/utils.js.map +1 -1
  364. package/lib/Core/Views/rs-styles.d.ts +1 -1
  365. package/lib/Core/a11y/loadingAnnouncementBehavior.d.ts +12 -0
  366. package/lib/Core/a11y/loadingAnnouncementBehavior.d.ts.map +1 -0
  367. package/lib/Core/a11y/loadingAnnouncementBehavior.js +37 -0
  368. package/lib/Core/a11y/loadingAnnouncementBehavior.js.map +1 -0
  369. package/lib/Core/constants.d.ts.map +1 -1
  370. package/lib/Core/constants.js +1 -0
  371. package/lib/Core/constants.js.map +1 -1
  372. package/lib/Core/index.d.ts.map +1 -1
  373. package/lib/Core/index.js +1 -2
  374. package/lib/Core/index.js.map +1 -1
  375. package/lib/Core/templateFeatureSupport.d.ts +17 -0
  376. package/lib/Core/templateFeatureSupport.d.ts.map +1 -0
  377. package/lib/Core/templateFeatureSupport.js +31 -0
  378. package/lib/Core/templateFeatureSupport.js.map +1 -0
  379. package/lib/index.d.ts +1 -1
  380. package/lib/index.d.ts.map +1 -1
  381. package/lib/index.js +1 -1
  382. package/lib/index.js.map +1 -1
  383. package/lib/types/RepeatingStructuresBoot.types.d.ts +12 -8
  384. package/lib/types/RepeatingStructuresBoot.types.d.ts.map +1 -1
  385. package/lib/types/RepeatingStructuresBoot.types.js.map +1 -1
  386. package/lib/types.d.ts +2 -0
  387. package/lib/types.d.ts.map +1 -1
  388. package/lib/types.js.map +1 -1
  389. package/package.json +11 -13
  390. package/lib/Core/Components/DefaultComponents/CardItem.d.ts +0 -3
  391. package/lib/Core/Components/DefaultComponents/CardItem.d.ts.map +0 -1
  392. package/lib/Core/Components/DefaultComponents/CardItem.js +0 -78
  393. package/lib/Core/Components/DefaultComponents/CardItem.js.map +0 -1
  394. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts +0 -12
  395. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +0 -1
  396. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +0 -36
  397. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +0 -1
  398. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts +0 -15
  399. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +0 -1
  400. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +0 -50
  401. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +0 -1
  402. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts +0 -12
  403. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map +0 -1
  404. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js +0 -44
  405. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js.map +0 -1
  406. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts +0 -16
  407. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +0 -1
  408. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +0 -64
  409. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +0 -1
  410. package/lib/Core/Components/GroupRenderer.d.ts +0 -31
  411. package/lib/Core/Components/GroupRenderer.d.ts.map +0 -1
  412. package/lib/Core/Components/GroupRenderer.js +0 -348
  413. package/lib/Core/Components/GroupRenderer.js.map +0 -1
  414. package/lib/Core/Components/RSWrapper/__mocks__/uuid.d.ts +0 -2
  415. package/lib/Core/Components/RSWrapper/__mocks__/uuid.d.ts.map +0 -1
  416. package/lib/Core/Components/RSWrapper/__mocks__/uuid.js +0 -4
  417. package/lib/Core/Components/RSWrapper/__mocks__/uuid.js.map +0 -1
  418. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts +0 -6
  419. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts.map +0 -1
  420. package/lib/Core/Components/Toolbar/KeyboardInstructions.js +0 -32
  421. package/lib/Core/Components/Toolbar/KeyboardInstructions.js.map +0 -1
  422. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +0 -7
  423. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +0 -1
  424. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +0 -109
  425. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +0 -1
  426. package/lib/Core/Views/Gallery/ItemWrapper.d.ts +0 -19
  427. package/lib/Core/Views/Gallery/ItemWrapper.d.ts.map +0 -1
  428. package/lib/Core/Views/Gallery/ItemWrapper.js +0 -34
  429. package/lib/Core/Views/Gallery/ItemWrapper.js.map +0 -1
  430. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts +0 -3
  431. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +0 -1
  432. package/lib/Core/Views/Gallery/StyledGalleryContainer.js +0 -51
  433. package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +0 -1
  434. package/lib/Core/Views/Timeline/utility.d.ts +0 -8
  435. package/lib/Core/Views/Timeline/utility.d.ts.map +0 -1
  436. package/lib/Core/Views/Timeline/utility.js +0 -120
  437. package/lib/Core/Views/Timeline/utility.js.map +0 -1
@@ -1,76 +1,55 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import PropTypes from 'prop-types';
3
- import { useCallback, useRef, useEffect } from 'react';
4
- import styled from 'styled-components';
5
- import { useFullscreenContext } from '@pega/cosmos-react-core';
6
- import LoadingIndicator from '../../Components/LoadingIndicator';
7
- import GalleryFooter from '../../Components/Footer';
2
+ import { useEffect, useMemo, useRef } from 'react';
3
+ import { FieldType } from 'pega-repeating-structures-core';
4
+ import { useLiveLog, useFullscreenContext } from '@pega/cosmos-react-core';
5
+ import { rowSelectColumnMeta } from 'pega-repeating-structures-core';
6
+ import useTranslate from '../../Hooks/useTranslate';
8
7
  import Virtualiser from '../Table/VirtualizeWrapper';
9
8
  import Toolbar from '../../Components/Toolbar';
10
9
  import RenderView from '../../Components/RenderingEngine/RenderView';
11
- import { EXTERNAL_FILTERS } from '../../constants';
12
- import { resolveViewComponent } from '../../Components/RenderingEngine/ComponentResolverFactory';
13
- import RepeatingStructureA11y from '../../Components/A11y/RepeatingStructureA11y';
14
- import useTranslate from '../../Hooks/useTranslate';
10
+ import { EXTERNAL_FILTERS, SELECTION_MODES } from '../../constants';
15
11
  import RsCardWrapper from '../RsCardWrapper';
16
- import { generateRSDataContainerHeightStyles } from '../../Utils/styles';
17
- import EmptyContainer from '../../Components/DefaultComponents/EmptyContainer';
18
- import { isFilterApplied } from '../../Utils';
19
- import StyledGalleryContainer from './StyledGalleryContainer';
20
- import ItemWrapper from './ItemWrapper';
12
+ import LoadingIndicator from '../../Components/LoadingIndicator';
13
+ import WarningBanner from '../../Components/WarningBanner';
14
+ import GalleryCard from './Components/GalleryCard';
15
+ import GalleryCheckboxCard from './Components/GalleryCheckboxCard';
16
+ import GalleryContainer, { StyledVirtualizeContainer } from './GalleryContainer';
21
17
  import GalleryA11y from './GalleryA11y';
22
- const StyledGVirtualizeContainer = styled.div `
23
- ${() => generateRSDataContainerHeightStyles()};
24
- position: relative;
25
- `;
26
18
  function Gallery({ view }) {
19
+ const layoutType = view.galleryLayout;
27
20
  const isFullscreen = !!useFullscreenContext()?.[0];
28
- const { rows, columns = [], meta, renderFactory, getContext, state: { filterExpression, searchText, externalState } = {}, domContainer, hasNoRecords } = view;
29
- const { cardHeader, secondaryText, externalFilters } = meta;
30
- const headerColumn = columns.find(({ field }) => field.name === cardHeader?.name);
31
- const secondaryTextColumn = columns.find(({ field }) => field.name === secondaryText?.name);
32
- const filteredColumns = columns.filter(c => c.field.name !== 'RowActionMenu');
33
- const rowActionMenuColumn = columns.find(c => c.field.name === 'RowActionMenu');
34
21
  const containerRef = useRef(null);
22
+ const { announceAssertive, announcePolite } = useLiveLog();
35
23
  const [translate] = useTranslate();
36
- const a11yRef = useRef(new GalleryA11y({
37
- topFocusRef: '.top',
38
- bottomFocusRef: '.bottom',
39
- focusElementSelector: '.tile',
40
- parentElementSelector: '.grid-container'
41
- },
42
- // TODO: consider additional focusbales: input elements, checkbox, radios, etc...
43
- [`button[aria-label^=${translate('Actions')}]`], {
44
- TAB: 9,
45
- LEFT: 37,
46
- UP: 38,
47
- RIGHT: 39,
48
- DOWN: 40
49
- }, null));
24
+ const a11yRef = useRef(null);
50
25
  useEffect(() => {
51
- a11yRef.current.setContainer(containerRef.current);
26
+ if (containerRef.current) {
27
+ a11yRef.current = new GalleryA11y({
28
+ focusElementSelector: '[data-gallery-card]',
29
+ belowLoader: '.below-loader'
30
+ }, [], containerRef.current, announceAssertive, announcePolite, translate);
31
+ }
52
32
  return () => {
53
- containerRef.current = null;
54
33
  a11yRef.current = null;
55
34
  };
56
- }, [a11yRef, containerRef]);
57
- const keyDownHandler = useCallback(e => {
58
- a11yRef.current.a11yHandler(e);
59
- }, [a11yRef]);
60
- return (_jsx(RsCardWrapper, { children: _jsxs(StyledGalleryContainer, { className: 'rv-gallery', "data-test-id": 'Gallery', view: view, isFullscreen: isFullscreen, children: [_jsx(Toolbar, { view: view }), _jsx(RenderView, { view: view, type: EXTERNAL_FILTERS }), _jsx(RepeatingStructureA11y, { view: view, a11yRef: a11yRef, children: _jsxs(StyledGVirtualizeContainer, { ref: containerRef, onKeyDown: keyDownHandler, className: 'container', children: [_jsx(Virtualiser, { id: 'rootVirtualiser', rowContainerClass: 'grid-container card-item-grid-container', view: view, children: rows &&
61
- rows.map(row => (_jsx(ItemWrapper, { ...row.getUIProps(), children: resolveViewComponent('CardItemRenderer', renderFactory, {
62
- row,
63
- headerColumn,
64
- secondaryTextColumn,
65
- filteredColumns,
66
- rowActionMenuColumn,
67
- ...getContext()
68
- }) }, row.reactKey))) }), _jsx(GalleryFooter, { view: view }), _jsx(LoadingIndicator, { view: view, show: !rows || !!view.isLoading }), domContainer && hasNoRecords && (_jsx(EmptyContainer, { message: isFilterApplied({ filterExpression, searchText, externalState }, externalFilters)
69
- ? translate('No records found')
70
- : translate('No records') }))] }) })] }) }));
35
+ }, [announceAssertive, announcePolite, translate]);
36
+ useEffect(() => {
37
+ a11yRef.current?.itemsLoadedCallback();
38
+ });
39
+ const isCardList = layoutType === 'cardlist';
40
+ const { columns = [], meta, rows } = view;
41
+ const { galleryConfig: { heroImage, tile: tileConfig, header } = {}, selectionMode } = meta;
42
+ const headerColumn = useMemo(() => (header?.field ? columns.find(col => col.field.id === header.field) : undefined), [header, columns]);
43
+ const selectionColumn = useMemo(() => columns.find(col => col.field.id === rowSelectColumnMeta.field.id), [columns]);
44
+ const visibleColumns = useMemo(() => {
45
+ const cols = [...columns].filter(col => !col.hidden && col.field.type !== FieldType.ACTION_FIELD_TYPE);
46
+ cols.sort((colA, colB) => (colA.order ?? 0) - (colB.order ?? 0));
47
+ return cols;
48
+ }, [columns]);
49
+ return (_jsx(RsCardWrapper, { children: _jsxs(GalleryContainer, { "data-test-id": 'gallery', "data-testid": 'gallery', view: view, isFullscreen: isFullscreen, image: heroImage, isStackLayout: isCardList, tile: tileConfig, children: [_jsx(WarningBanner, { warningMessages: view.warningMessages }), _jsx(Toolbar, { view: view }), _jsx(RenderView, { view: view, type: EXTERNAL_FILTERS }), _jsxs(StyledVirtualizeContainer, { ref: containerRef, className: 'container', onFocusCapture: e => a11yRef.current?.onFocusHandler(e.nativeEvent), children: [_jsx(Virtualiser, { id: 'rootVirtualiser', rowContainerClass: 'grid-container', view: view, bufferMultiplier: 0.8, children: rows?.length
50
+ ? rows.map(row => selectionMode === SELECTION_MODES.multi && selectionColumn ? (_jsx(GalleryCheckboxCard, { meta: meta, row: row, visibleColumns: visibleColumns, headerColumn: headerColumn, selectionColumn: selectionColumn }, row.reactKey)) : (_jsx(GalleryCard, { meta: meta, row: row, visibleColumns: visibleColumns, headerColumn: headerColumn }, row.reactKey)))
51
+ : [] }), _jsx(LoadingIndicator, { view: view, show: !rows || !!view.isLoading })] })] }) }));
71
52
  }
72
- Gallery.propTypes = {
73
- view: PropTypes.objectOf(PropTypes.any).isRequired
74
- };
53
+ Gallery.displayName = 'Gallery';
75
54
  export default Gallery;
76
55
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,UAAU,MAAM,6CAA6C,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AACjG,OAAO,sBAAsB,MAAM,8CAA8C,CAAC;AAClF,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,mCAAmC,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,cAAc,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EA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O,YAClD,MAAC,0BAA0B,IACzB,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,cAAc,EACzB,SAAS,EAAC,WAAW,aAErB,KAAC,WAAW,IACV,EAAE,EAAC,iBAAiB,EACpB,iBAAiB,EAAC,yCAAyC,EAC3D,IAAI,EAAE,IAAI,YAET,IAAI;oCACH,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACd,KAAC,WAAW,OAAwB,GAAG,CAAC,UAAU,EAAE,YACjD,oBAAoB,CAAC,kBAAkB,EAAE,aAAa,EAAE;4CACvD,GAAG;4CACH,YAAY;4CACZ,mBAAmB;4CACnB,eAAe;4CACf,mBAAmB;4CACnB,GAAG,UAAU,EAAE;yCAChB,CAAC,IARc,GAAG,CAAC,QAAQ,CAShB,CACf,CAAC,GACQ,EACd,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAI,EAC7B,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,GAAI,EAChE,YAAY,IAAI,YAAY,IAAI,CAC/B,KAAC,cAAc,IACb,OAAO,EACL,eAAe,CAAC,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,eAAe,CAAC;oCAC/E,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC;oCAC/B,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,GAE7B,CACH,IAC0B,GACN,IACF,GACX,CACjB,CAAC;AACJ,CAAC;AAED,OAAO,CAAC,SAAS,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useCallback, useRef, useEffect } from 'react';\nimport styled from 'styled-components';\n\nimport { useFullscreenContext } from '@pega/cosmos-react-core';\n\nimport LoadingIndicator from '../../Components/LoadingIndicator';\nimport GalleryFooter from '../../Components/Footer';\nimport Virtualiser from '../Table/VirtualizeWrapper';\nimport Toolbar from '../../Components/Toolbar';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport { EXTERNAL_FILTERS } from '../../constants';\nimport { resolveViewComponent } from '../../Components/RenderingEngine/ComponentResolverFactory';\nimport RepeatingStructureA11y from '../../Components/A11y/RepeatingStructureA11y';\nimport useTranslate from '../../Hooks/useTranslate';\nimport RsCardWrapper from '../RsCardWrapper';\nimport { generateRSDataContainerHeightStyles } from '../../Utils/styles';\nimport EmptyContainer from '../../Components/DefaultComponents/EmptyContainer';\nimport { isFilterApplied } from '../../Utils';\n\nimport StyledGalleryContainer from './StyledGalleryContainer';\nimport ItemWrapper from './ItemWrapper';\nimport GalleryA11y from './GalleryA11y';\n\nconst StyledGVirtualizeContainer = styled.div`\n ${() => generateRSDataContainerHeightStyles()};\n position: relative;\n`;\n\nfunction Gallery({ view }) {\n const isFullscreen = !!useFullscreenContext()?.[0];\n const {\n rows,\n columns = [],\n meta,\n renderFactory,\n getContext,\n state: { filterExpression, searchText, externalState } = {},\n domContainer,\n hasNoRecords\n } = view;\n const { cardHeader, secondaryText, externalFilters } = meta;\n const headerColumn = columns.find(({ field }) => field.name === cardHeader?.name);\n const secondaryTextColumn = columns.find(({ field }) => field.name === secondaryText?.name);\n const filteredColumns = columns.filter(c => c.field.name !== 'RowActionMenu');\n const rowActionMenuColumn = columns.find(c => c.field.name === 'RowActionMenu');\n const containerRef = useRef(null);\n const [translate] = useTranslate();\n const a11yRef = useRef(\n new GalleryA11y(\n {\n topFocusRef: '.top',\n bottomFocusRef: '.bottom',\n focusElementSelector: '.tile',\n parentElementSelector: '.grid-container'\n },\n // TODO: consider additional focusbales: input elements, checkbox, radios, etc...\n [`button[aria-label^=${translate('Actions')}]`],\n {\n TAB: 9,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n },\n null\n )\n );\n\n useEffect(() => {\n a11yRef.current.setContainer(containerRef.current);\n return () => {\n containerRef.current = null;\n a11yRef.current = null;\n };\n }, [a11yRef, containerRef]);\n\n const keyDownHandler = useCallback(\n e => {\n a11yRef.current.a11yHandler(e);\n },\n [a11yRef]\n );\n\n return (\n <RsCardWrapper>\n <StyledGalleryContainer\n className='rv-gallery'\n data-test-id='Gallery'\n view={view}\n isFullscreen={isFullscreen}\n >\n <Toolbar view={view} />\n <RenderView view={view} type={EXTERNAL_FILTERS} />\n <RepeatingStructureA11y view={view} a11yRef={a11yRef}>\n <StyledGVirtualizeContainer\n ref={containerRef}\n onKeyDown={keyDownHandler}\n className='container'\n >\n <Virtualiser\n id='rootVirtualiser'\n rowContainerClass='grid-container card-item-grid-container'\n view={view}\n >\n {rows &&\n rows.map(row => (\n <ItemWrapper key={row.reactKey} {...row.getUIProps()}>\n {resolveViewComponent('CardItemRenderer', renderFactory, {\n row,\n headerColumn,\n secondaryTextColumn,\n filteredColumns,\n rowActionMenuColumn,\n ...getContext()\n })}\n </ItemWrapper>\n ))}\n </Virtualiser>\n <GalleryFooter view={view} />\n <LoadingIndicator view={view} show={!rows || !!view.isLoading} />\n {domContainer && hasNoRecords && (\n <EmptyContainer\n message={\n isFilterApplied({ filterExpression, searchText, externalState }, externalFilters)\n ? translate('No records found')\n : translate('No records')\n }\n />\n )}\n </StyledGVirtualizeContainer>\n </RepeatingStructureA11y>\n </StyledGalleryContainer>\n </RsCardWrapper>\n );\n}\n\nGallery.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nexport default Gallery;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAoB,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,yBAA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9B,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,IAL3B,GAAG,CAAC,QAAQ,CAMjB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,WAAW,IAEV,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,IAJrB,GAAG,CAAC,QAAQ,CAKjB,CACH,CACF;gCACH,CAAC,CAAC,EAAE,GACM,EACd,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,GAAI,IACvC,IACX,GACL,CACjB,CAAC;AACJ,CAAC;AAED,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,eAAe,OAAO,CAAC","sourcesContent":["import { useEffect, useMemo, useRef } from 'react';\n\nimport { FieldType, type RsCoreTypes } from 'pega-repeating-structures-core';\nimport { useLiveLog, useFullscreenContext } from '@pega/cosmos-react-core';\nimport { rowSelectColumnMeta } from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\nimport Virtualiser from '../Table/VirtualizeWrapper';\nimport Toolbar from '../../Components/Toolbar';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport { EXTERNAL_FILTERS, SELECTION_MODES } from '../../constants';\nimport RsCardWrapper from '../RsCardWrapper';\nimport LoadingIndicator from '../../Components/LoadingIndicator';\nimport WarningBanner from '../../Components/WarningBanner';\n\nimport GalleryCard from './Components/GalleryCard';\nimport GalleryCheckboxCard from './Components/GalleryCheckboxCard';\nimport GalleryContainer, { StyledVirtualizeContainer } from './GalleryContainer';\nimport GalleryA11y from './GalleryA11y';\n\nfunction Gallery({ view }: { view: RsCoreTypes.View }) {\n const layoutType = view.galleryLayout;\n const isFullscreen = !!useFullscreenContext()?.[0];\n const containerRef = useRef<HTMLDivElement>(null);\n const { announceAssertive, announcePolite } = useLiveLog();\n const [translate] = useTranslate();\n const a11yRef = useRef<GalleryA11y | null>(null);\n\n useEffect(() => {\n if (containerRef.current) {\n a11yRef.current = new GalleryA11y(\n {\n focusElementSelector: '[data-gallery-card]',\n belowLoader: '.below-loader'\n },\n [],\n containerRef.current,\n announceAssertive,\n announcePolite,\n translate\n );\n }\n return () => {\n a11yRef.current = null;\n };\n }, [announceAssertive, announcePolite, translate]);\n\n useEffect(() => {\n a11yRef.current?.itemsLoadedCallback();\n });\n const isCardList = layoutType === 'cardlist';\n\n const { columns = [], meta, rows } = view;\n const { galleryConfig: { heroImage, tile: tileConfig, header } = {}, selectionMode } = meta;\n\n const headerColumn = useMemo(\n () => (header?.field ? columns.find(col => col.field.id === header.field) : undefined),\n [header, columns]\n );\n\n const selectionColumn = useMemo(\n () => columns.find(col => col.field.id === rowSelectColumnMeta.field.id),\n [columns]\n );\n\n const visibleColumns = useMemo(() => {\n const cols = [...columns].filter(\n col => !col.hidden && col.field.type !== FieldType.ACTION_FIELD_TYPE\n );\n cols.sort((colA, colB) => (colA.order ?? 0) - (colB.order ?? 0));\n return cols;\n }, [columns]);\n\n return (\n <RsCardWrapper>\n <GalleryContainer\n data-test-id='gallery'\n data-testid='gallery'\n view={view}\n isFullscreen={isFullscreen}\n image={heroImage}\n isStackLayout={isCardList}\n tile={tileConfig}\n >\n <WarningBanner warningMessages={view.warningMessages} />\n <Toolbar view={view} />\n <RenderView view={view} type={EXTERNAL_FILTERS} />\n <StyledVirtualizeContainer\n ref={containerRef}\n className='container'\n onFocusCapture={e => a11yRef.current?.onFocusHandler(e.nativeEvent)}\n >\n <Virtualiser\n id='rootVirtualiser'\n rowContainerClass='grid-container'\n view={view}\n bufferMultiplier={0.8}\n >\n {rows?.length\n ? rows.map(row =>\n selectionMode === SELECTION_MODES.multi && selectionColumn ? (\n <GalleryCheckboxCard\n key={row.reactKey}\n meta={meta}\n row={row}\n visibleColumns={visibleColumns}\n headerColumn={headerColumn}\n selectionColumn={selectionColumn}\n />\n ) : (\n <GalleryCard\n key={row.reactKey}\n meta={meta}\n row={row}\n visibleColumns={visibleColumns}\n headerColumn={headerColumn}\n />\n )\n )\n : []}\n </Virtualiser>\n <LoadingIndicator view={view} show={!rows || !!view.isLoading} />\n </StyledVirtualizeContainer>\n </GalleryContainer>\n </RsCardWrapper>\n );\n}\n\nGallery.displayName = 'Gallery';\n\nexport default Gallery;\n"]}
@@ -0,0 +1,36 @@
1
+ import { type RsCoreTypes } from 'pega-repeating-structures-core';
2
+ import type { ImageSize, SelectionCardDisplayProps } from '@pega/cosmos-react-core';
3
+ import type { GalleryCardProps } from './Gallery.types';
4
+ export declare const GALLERY_IMAGE_PLACEMENT_MAP: {
5
+ readonly left: "inline-start";
6
+ readonly right: "inline-end";
7
+ readonly top: "block-start";
8
+ };
9
+ export declare const DEFAULT_IMAGE_PLACEMENT: RsCoreTypes.HeroImagePlacement;
10
+ export declare const DEFAULT_IMAGE_SIZE: ImageSize;
11
+ export declare const isInlinePlacement: (placement: RsCoreTypes.HeroImagePlacement) => placement is Extract<RsCoreTypes.HeroImagePlacement, "left" | "right">;
12
+ /**
13
+ * Generates the data required to display a card in the gallery view.
14
+ *
15
+ * @param props - The properties required to generate the card data.
16
+ * @param props.row - The data for the current row.
17
+ * @param props.visibleColumns - The columns that are visible in the gallery.
18
+ * @param props.meta - Metadata including gallery configuration.
19
+ * @param props.headerColumn - The column used for the card header.
20
+ * @param props.actionColumn - The column used for card actions.
21
+ * @returns An object containing the card's label, image, footer, and fields to be displayed.
22
+ */
23
+ export declare function getCardData({ row, visibleColumns, meta, headerColumn }: GalleryCardProps): Pick<SelectionCardDisplayProps, 'label' | 'image' | 'fields' | 'aria-label' | 'footer'>;
24
+ /**
25
+ * Extracts UI-related props from a row for card components.
26
+ *
27
+ * @param props - The properties containing the row.
28
+ * @param props.row - The data row.
29
+ * @returns An object containing card-safe row metadata.
30
+ */
31
+ export declare function getCardUIProps({ row }: {
32
+ row: RsCoreTypes.Row;
33
+ }): {
34
+ 'data-key': string;
35
+ };
36
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Gallery/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EAAkB,SAAS,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEpG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,eAAO,MAAM,2BAA2B;;;;CAImC,CAAC;AAG5E,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,kBAA2B,CAAC;AAC9E,eAAO,MAAM,kBAAkB,EAAE,SAAsB,CAAC;AAExD,eAAO,MAAM,iBAAiB,GAC5B,WAAW,WAAW,CAAC,kBAAkB,KACxC,SAAS,IAAI,OAAO,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAEvE,CAAC;AAuCF;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,cAAc,EACd,IAAI,EACJ,YAAY,EACb,EAAE,gBAAgB,GAAG,IAAI,CACxB,yBAAyB,EACzB,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,CACvD,CAgEA;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,EAAE,WAAW,CAAC,GAAG,CAAA;CAAE;;EAK/D"}
@@ -0,0 +1,115 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { isEmpty } from 'pega-repeating-structures-core';
3
+ import GalleryFieldValue from './Components/GalleryFieldValue';
4
+ import GalleryHeader from './Components/GalleryHeader';
5
+ export const GALLERY_IMAGE_PLACEMENT_MAP = {
6
+ left: 'inline-start',
7
+ right: 'inline-end',
8
+ top: 'block-start'
9
+ };
10
+ const INLINE_PLACEMENTS = ['left', 'right'];
11
+ export const DEFAULT_IMAGE_PLACEMENT = 'left';
12
+ export const DEFAULT_IMAGE_SIZE = 'flexible';
13
+ export const isInlinePlacement = (placement) => {
14
+ return INLINE_PLACEMENTS.includes(placement);
15
+ };
16
+ /**
17
+ * Extracts image data from the provided metadata and row context.
18
+ *
19
+ * @param meta - The metadata object containing gallery configuration.
20
+ * @param row - The row object providing context and data values.
21
+ * @returns An object containing:
22
+ * - `src`: The image source URL.
23
+ * - `alt`: The alternative text for the image.
24
+ * - `placement`: The placement of the image within the gallery.
25
+ * - `size`: The size of the image.
26
+ */
27
+ function getImageData(meta, row) {
28
+ const { galleryConfig: { heroImage: { source, altText, placement, size } = {} } = {} } = meta;
29
+ const rowData = row.getContext().getValue();
30
+ let altTextValue = '';
31
+ if (altText && 'field' in altText) {
32
+ altTextValue = altText.field in rowData ? String(rowData[altText.field]) : '';
33
+ }
34
+ else if (altText && 'value' in altText) {
35
+ altTextValue = altText.value;
36
+ }
37
+ const imageUrl = source?.field && source?.field in rowData ? String(rowData[source.field]) : '';
38
+ const imagePlacement = GALLERY_IMAGE_PLACEMENT_MAP[placement ?? DEFAULT_IMAGE_PLACEMENT];
39
+ const imageSize = size || DEFAULT_IMAGE_SIZE;
40
+ return { src: imageUrl, alt: altTextValue, placement: imagePlacement, size: imageSize };
41
+ }
42
+ /**
43
+ * Generates the data required to display a card in the gallery view.
44
+ *
45
+ * @param props - The properties required to generate the card data.
46
+ * @param props.row - The data for the current row.
47
+ * @param props.visibleColumns - The columns that are visible in the gallery.
48
+ * @param props.meta - Metadata including gallery configuration.
49
+ * @param props.headerColumn - The column used for the card header.
50
+ * @param props.actionColumn - The column used for card actions.
51
+ * @returns An object containing the card's label, image, footer, and fields to be displayed.
52
+ */
53
+ export function getCardData({ row, visibleColumns, meta, headerColumn }) {
54
+ const { galleryConfig: { heroImage, tile: tileConfig, showFieldLabels = true } = {} } = meta;
55
+ // Must set execution context for each column to ensure correct value retrieval
56
+ visibleColumns.forEach(col => col.setExecutionContext(row));
57
+ const rowData = row.getContext().getValue();
58
+ const fields = visibleColumns.map(col => ({
59
+ id: col.field.id,
60
+ ...(showFieldLabels && { name: col.getContext()?.getLabel() }),
61
+ ...(col.field.layoutMode && { variant: col.field.layoutMode }),
62
+ // TODO: Add truncation for non-tile cards once `truncate` is typed at
63
+ // the field-level API.
64
+ ...(!heroImage && tileConfig
65
+ ? { value: String(rowData[col.field.id] ?? ''), truncate: true }
66
+ : { value: _jsx(GalleryFieldValue, { column: col, row: row }) })
67
+ }));
68
+ const heroImageData = heroImage ? getImageData(meta, row) : undefined;
69
+ let image = heroImageData;
70
+ if (!heroImage && tileConfig) {
71
+ const foregroundColor = tileConfig.foregroundColor.field in rowData
72
+ ? String(rowData[tileConfig.foregroundColor.field])
73
+ : undefined;
74
+ const backgroundColor = tileConfig.backgroundColor.field in rowData
75
+ ? String(rowData[tileConfig.backgroundColor.field])
76
+ : undefined;
77
+ if (foregroundColor && backgroundColor) {
78
+ const tileName = tileConfig.iconName && tileConfig.iconName.field in rowData
79
+ ? String(rowData[tileConfig.iconName.field]) || undefined
80
+ : undefined;
81
+ const tileText = tileConfig.text && tileConfig.text.field in rowData
82
+ ? String(rowData[tileConfig.text.field]) || undefined
83
+ : undefined;
84
+ const tileBase = {
85
+ foregroundColor,
86
+ backgroundColor
87
+ };
88
+ if (tileName) {
89
+ image = { ...tileBase, icon: tileName };
90
+ }
91
+ else if (tileText) {
92
+ image = { ...tileBase, text: tileText };
93
+ }
94
+ }
95
+ }
96
+ const footer = meta.galleryConfig?.renderCardFooter?.(rowData) ?? null;
97
+ const label = _jsx(GalleryHeader, { headerColumn: headerColumn, row: row });
98
+ const headerValue = row.getContext()?.getRowHeader()?.getValue();
99
+ const ariaLabel = !isEmpty(headerValue) ? String(headerValue) : undefined;
100
+ return { fields, image, footer, label, 'aria-label': ariaLabel };
101
+ }
102
+ /**
103
+ * Extracts UI-related props from a row for card components.
104
+ *
105
+ * @param props - The properties containing the row.
106
+ * @param props.row - The data row.
107
+ * @returns An object containing card-safe row metadata.
108
+ */
109
+ export function getCardUIProps({ row }) {
110
+ const uiProps = row.getUIProps();
111
+ return {
112
+ 'data-key': uiProps['data-key']
113
+ };
114
+ }
115
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/utils.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAoB,MAAM,gCAAgC,CAAC;AAI3E,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,aAAa,MAAM,4BAA4B,CAAC;AAEvD,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,YAAY;IACnB,GAAG,EAAE,aAAa;CACuD,CAAC;AAE5E,MAAM,iBAAiB,GAAqC,CAAC,MAAM,EAAE,OAAO,CAAU,CAAC;AACvF,MAAM,CAAC,MAAM,uBAAuB,GAAmC,MAAM,CAAC;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAc,UAAU,CAAC;AAExD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,SAAyC,EAC+B,EAAE;IAC1E,OAAO,iBAAiB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,SAAS,YAAY,CACnB,IAAsB,EACtB,GAAoB;IAOpB,MAAM,EAAE,aAAa,EAAE,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;IAC9F,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC;IAE5C,IAAI,YAAY,GAAG,EAAE,CAAC;IACtB,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;QAClC,YAAY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,YAAY,EAAE,SAAS,EAAE,CAAC;AACnE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,GAAG,EAA4B;IAC9D,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;IACjC,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC;KAChC,CAAC;AACJ,CAAC","sourcesContent":["import { isEmpty, type RsCoreTypes } from 'pega-repeating-structures-core';\nimport type { ImagePlacement, ImageSize, SelectionCardDisplayProps } from '@pega/cosmos-react-core';\n\nimport type { GalleryCardProps } from './Gallery.types';\nimport GalleryFieldValue from './Components/GalleryFieldValue';\nimport GalleryHeader from './Components/GalleryHeader';\n\nexport const GALLERY_IMAGE_PLACEMENT_MAP = {\n left: 'inline-start',\n right: 'inline-end',\n top: 'block-start'\n} as const satisfies Record<RsCoreTypes.HeroImagePlacement, ImagePlacement>;\n\nconst INLINE_PLACEMENTS: RsCoreTypes.HeroImagePlacement[] = ['left', 'right'] as const;\nexport const DEFAULT_IMAGE_PLACEMENT: RsCoreTypes.HeroImagePlacement = 'left';\nexport const DEFAULT_IMAGE_SIZE: ImageSize = 'flexible';\n\nexport const isInlinePlacement = (\n placement: RsCoreTypes.HeroImagePlacement\n): placement is Extract<RsCoreTypes.HeroImagePlacement, 'left' | 'right'> => {\n return INLINE_PLACEMENTS.includes(placement);\n};\n\n/**\n * Extracts image data from the provided metadata and row context.\n *\n * @param meta - The metadata object containing gallery configuration.\n * @param row - The row object providing context and data values.\n * @returns An object containing:\n * - `src`: The image source URL.\n * - `alt`: The alternative text for the image.\n * - `placement`: The placement of the image within the gallery.\n * - `size`: The size of the image.\n */\nfunction getImageData(\n meta: RsCoreTypes.Meta,\n row: RsCoreTypes.Row\n): {\n src: string;\n alt: string;\n placement: ImagePlacement;\n size: ImageSize;\n} {\n const { galleryConfig: { heroImage: { source, altText, placement, size } = {} } = {} } = meta;\n const rowData = row.getContext().getValue();\n\n let altTextValue = '';\n if (altText && 'field' in altText) {\n altTextValue = altText.field in rowData ? String(rowData[altText.field]) : '';\n } else if (altText && 'value' in altText) {\n altTextValue = altText.value;\n }\n\n const imageUrl = source?.field && source?.field in rowData ? String(rowData[source.field]) : '';\n const imagePlacement = GALLERY_IMAGE_PLACEMENT_MAP[placement ?? DEFAULT_IMAGE_PLACEMENT];\n const imageSize = size || DEFAULT_IMAGE_SIZE;\n\n return { src: imageUrl, alt: altTextValue, placement: imagePlacement, size: imageSize };\n}\n\n/**\n * Generates the data required to display a card in the gallery view.\n *\n * @param props - The properties required to generate the card data.\n * @param props.row - The data for the current row.\n * @param props.visibleColumns - The columns that are visible in the gallery.\n * @param props.meta - Metadata including gallery configuration.\n * @param props.headerColumn - The column used for the card header.\n * @param props.actionColumn - The column used for card actions.\n * @returns An object containing the card's label, image, footer, and fields to be displayed.\n */\nexport function getCardData({\n row,\n visibleColumns,\n meta,\n headerColumn\n}: GalleryCardProps): Pick<\n SelectionCardDisplayProps,\n 'label' | 'image' | 'fields' | 'aria-label' | 'footer'\n> {\n const { galleryConfig: { heroImage, tile: tileConfig, showFieldLabels = true } = {} } = meta;\n\n // Must set execution context for each column to ensure correct value retrieval\n visibleColumns.forEach(col => col.setExecutionContext(row));\n\n const rowData = row.getContext().getValue();\n\n const fields = visibleColumns.map(col => ({\n id: col.field.id,\n ...(showFieldLabels && { name: col.getContext()?.getLabel() }),\n ...(col.field.layoutMode && { variant: col.field.layoutMode }),\n // TODO: Add truncation for non-tile cards once `truncate` is typed at\n // the field-level API.\n ...(!heroImage && tileConfig\n ? { value: String(rowData[col.field.id] ?? ''), truncate: true }\n : { value: <GalleryFieldValue column={col} row={row} /> })\n }));\n\n const heroImageData = heroImage ? getImageData(meta, row) : undefined;\n\n let image: SelectionCardDisplayProps['image'] = heroImageData;\n\n if (!heroImage && tileConfig) {\n const foregroundColor =\n tileConfig.foregroundColor.field in rowData\n ? String(rowData[tileConfig.foregroundColor.field])\n : undefined;\n const backgroundColor =\n tileConfig.backgroundColor.field in rowData\n ? String(rowData[tileConfig.backgroundColor.field])\n : undefined;\n\n if (foregroundColor && backgroundColor) {\n const tileName =\n tileConfig.iconName && tileConfig.iconName.field in rowData\n ? String(rowData[tileConfig.iconName.field]) || undefined\n : undefined;\n const tileText =\n tileConfig.text && tileConfig.text.field in rowData\n ? String(rowData[tileConfig.text.field]) || undefined\n : undefined;\n\n const tileBase = {\n foregroundColor,\n backgroundColor\n };\n\n if (tileName) {\n image = { ...tileBase, icon: tileName };\n } else if (tileText) {\n image = { ...tileBase, text: tileText };\n }\n }\n }\n\n const footer = meta.galleryConfig?.renderCardFooter?.(rowData) ?? null;\n\n const label = <GalleryHeader headerColumn={headerColumn} row={row} />;\n\n const headerValue = row.getContext()?.getRowHeader()?.getValue();\n const ariaLabel = !isEmpty(headerValue) ? String(headerValue) : undefined;\n\n return { fields, image, footer, label, 'aria-label': ariaLabel };\n}\n\n/**\n * Extracts UI-related props from a row for card components.\n *\n * @param props - The properties containing the row.\n * @param props.row - The data row.\n * @returns An object containing card-safe row metadata.\n */\nexport function getCardUIProps({ row }: { row: RsCoreTypes.Row }) {\n const uiProps = row.getUIProps();\n return {\n 'data-key': uiProps['data-key']\n };\n}\n"]}