@pega/lists-react 9.0.0-build.2.8 → 9.0.0-build.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. package/README.md +1 -4
  2. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts +10 -5
  3. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts.map +1 -1
  4. package/lib/Core/Components/A11y/RepeatingStructureA11y.js +27 -2
  5. package/lib/Core/Components/A11y/RepeatingStructureA11y.js.map +1 -1
  6. package/lib/Core/Components/AggregateMenu.d.ts +1 -0
  7. package/lib/Core/Components/AggregateMenu.d.ts.map +1 -1
  8. package/lib/Core/Components/AggregateMenu.js +32 -18
  9. package/lib/Core/Components/AggregateMenu.js.map +1 -1
  10. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts +6 -15
  11. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts.map +1 -1
  12. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js +91 -163
  13. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js.map +1 -1
  14. package/lib/Core/Components/ContextMenu/QuickFilter.js +7 -7
  15. package/lib/Core/Components/ContextMenu/QuickFilter.js.map +1 -1
  16. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts +1 -1
  17. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts.map +1 -1
  18. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts +2 -1
  19. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts.map +1 -1
  20. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +9 -21
  21. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -1
  22. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts +2 -1
  23. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts.map +1 -1
  24. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js +4 -3
  25. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js.map +1 -1
  26. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts +2 -1
  27. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts.map +1 -1
  28. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js +4 -3
  29. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js.map +1 -1
  30. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts +0 -2
  31. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts.map +1 -1
  32. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js +0 -2
  33. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js.map +1 -1
  34. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +5 -1
  35. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
  36. package/lib/Core/Components/DefaultComponents/EmptyContainer.js +12 -5
  37. package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -1
  38. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts +3 -2
  39. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts.map +1 -1
  40. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js +13 -26
  41. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js.map +1 -1
  42. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js +2 -2
  43. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js.map +1 -1
  44. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts +0 -2
  45. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts.map +1 -1
  46. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js +11 -9
  47. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js.map +1 -1
  48. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.d.ts.map +1 -1
  49. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js +5 -0
  50. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js.map +1 -1
  51. package/lib/Core/Components/DefaultComponents/index.d.ts +5 -3
  52. package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -1
  53. package/lib/Core/Components/DefaultComponents/index.js +0 -2
  54. package/lib/Core/Components/DefaultComponents/index.js.map +1 -1
  55. package/lib/Core/Components/Filters/CommonFilter.d.ts.map +1 -1
  56. package/lib/Core/Components/Filters/CommonFilter.js +2 -2
  57. package/lib/Core/Components/Filters/CommonFilter.js.map +1 -1
  58. package/lib/Core/Components/Filters/FilterType.js +5 -5
  59. package/lib/Core/Components/Filters/FilterType.js.map +1 -1
  60. package/lib/Core/Components/Filters/SelectFilter.d.ts.map +1 -1
  61. package/lib/Core/Components/Filters/SelectFilter.js +2 -2
  62. package/lib/Core/Components/Filters/SelectFilter.js.map +1 -1
  63. package/lib/Core/Components/Filters/styles.d.ts +1 -1
  64. package/lib/Core/Components/FooterAggregators.d.ts.map +1 -1
  65. package/lib/Core/Components/FooterAggregators.js +3 -2
  66. package/lib/Core/Components/FooterAggregators.js.map +1 -1
  67. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts +12 -0
  68. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts.map +1 -0
  69. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js +62 -0
  70. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js.map +1 -0
  71. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts +33 -0
  72. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts.map +1 -0
  73. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js +106 -0
  74. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js.map +1 -0
  75. package/lib/Core/Components/{GroupRenderer.d.ts → GroupRenderer/index.d.ts} +8 -1
  76. package/lib/Core/Components/GroupRenderer/index.d.ts.map +1 -0
  77. package/lib/Core/Components/GroupRenderer/index.js +367 -0
  78. package/lib/Core/Components/GroupRenderer/index.js.map +1 -0
  79. package/lib/Core/Components/Grouping/GroupingMenu.d.ts.map +1 -1
  80. package/lib/Core/Components/Grouping/GroupingMenu.js +6 -5
  81. package/lib/Core/Components/Grouping/GroupingMenu.js.map +1 -1
  82. package/lib/Core/Components/HeaderCell.d.ts.map +1 -1
  83. package/lib/Core/Components/HeaderCell.js +8 -5
  84. package/lib/Core/Components/HeaderCell.js.map +1 -1
  85. package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
  86. package/lib/Core/Components/HeaderMenu/actions.js +3 -3
  87. package/lib/Core/Components/HeaderMenu/actions.js.map +1 -1
  88. package/lib/Core/Components/HeaderMenu/index.d.ts.map +1 -1
  89. package/lib/Core/Components/HeaderMenu/index.js +2 -2
  90. package/lib/Core/Components/HeaderMenu/index.js.map +1 -1
  91. package/lib/Core/Components/NotificationManager.js +1 -1
  92. package/lib/Core/Components/NotificationManager.js.map +1 -1
  93. package/lib/Core/Components/RSWrapper/HeaderBarGadget.d.ts.map +1 -1
  94. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js +2 -1
  95. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js.map +1 -1
  96. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts +1 -1
  97. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
  98. package/lib/Core/Components/RenderingEngine/RenderCell.js +2 -1
  99. package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -1
  100. package/lib/Core/Components/TestIdConstants.d.ts +1 -0
  101. package/lib/Core/Components/TestIdConstants.js +2 -1
  102. package/lib/Core/Components/TestIdConstants.js.map +1 -1
  103. package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
  104. package/lib/Core/Components/Toolbar/AdvanceToolbar.js +9 -33
  105. package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
  106. package/lib/Core/Components/Toolbar/AnnounceRowsCount.d.ts +1 -1
  107. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js +1 -1
  108. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js.map +1 -1
  109. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +20 -9
  110. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -1
  111. package/lib/Core/Components/Toolbar/ColumnSelector.js +89 -65
  112. package/lib/Core/Components/Toolbar/ColumnSelector.js.map +1 -1
  113. package/lib/Core/Components/Toolbar/DebugInfo.d.ts +3 -5
  114. package/lib/Core/Components/Toolbar/DebugInfo.d.ts.map +1 -1
  115. package/lib/Core/Components/Toolbar/DebugInfo.js +3 -3
  116. package/lib/Core/Components/Toolbar/DebugInfo.js.map +1 -1
  117. package/lib/Core/Components/Toolbar/FieldSelector.d.ts +1 -0
  118. package/lib/Core/Components/Toolbar/FieldSelector.d.ts.map +1 -1
  119. package/lib/Core/Components/Toolbar/FieldSelector.js +3 -2
  120. package/lib/Core/Components/Toolbar/FieldSelector.js.map +1 -1
  121. package/lib/Core/Components/Toolbar/Grouping.types.d.ts +0 -6
  122. package/lib/Core/Components/Toolbar/Grouping.types.d.ts.map +1 -1
  123. package/lib/Core/Components/Toolbar/Grouping.types.js.map +1 -1
  124. package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
  125. package/lib/Core/Components/Toolbar/SimpleToolbar.js +4 -3
  126. package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
  127. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts +14 -18
  128. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts.map +1 -1
  129. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js +15 -16
  130. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js.map +1 -1
  131. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts +2 -1
  132. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -1
  133. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +10 -7
  134. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js.map +1 -1
  135. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.d.ts.map +1 -1
  136. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js +6 -3
  137. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js.map +1 -1
  138. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts +7 -2
  139. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts.map +1 -1
  140. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js +11 -3
  141. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js.map +1 -1
  142. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts +1 -1
  143. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts.map +1 -1
  144. package/lib/Core/Components/Toolbar/hooks/useMore.js +81 -79
  145. package/lib/Core/Components/Toolbar/hooks/useMore.js.map +1 -1
  146. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts +8 -6
  147. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts.map +1 -1
  148. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js +18 -3
  149. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js.map +1 -1
  150. package/lib/Core/Components/Toolbar/hooks/useSearch.d.ts.map +1 -1
  151. package/lib/Core/Components/Toolbar/hooks/useSearch.js +6 -9
  152. package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -1
  153. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts +4 -4
  154. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts.map +1 -1
  155. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +6 -6
  156. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -1
  157. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts +2 -1
  158. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts.map +1 -1
  159. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js +8 -2
  160. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js.map +1 -1
  161. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.d.ts.map +1 -1
  162. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js +2 -2
  163. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js.map +1 -1
  164. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts +6 -0
  165. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts.map +1 -0
  166. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js +17 -0
  167. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js.map +1 -0
  168. package/lib/Core/Components/Toolbar/utils/utils.d.ts +1 -1
  169. package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
  170. package/lib/Core/Components/Toolbar/utils/utils.js +2 -1
  171. package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
  172. package/lib/Core/Components/Virtualise/Pagination.d.ts.map +1 -1
  173. package/lib/Core/Components/Virtualise/Pagination.js +2 -1
  174. package/lib/Core/Components/Virtualise/Pagination.js.map +1 -1
  175. package/lib/Core/Components/Virtualise/UseScroll.d.ts +4 -1
  176. package/lib/Core/Components/Virtualise/UseScroll.d.ts.map +1 -1
  177. package/lib/Core/Components/Virtualise/UseScroll.js +16 -3
  178. package/lib/Core/Components/Virtualise/UseScroll.js.map +1 -1
  179. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts +97 -0
  180. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts.map +1 -0
  181. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js +251 -0
  182. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -0
  183. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts +22 -0
  184. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts.map +1 -0
  185. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js +38 -0
  186. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js.map +1 -0
  187. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts +22 -0
  188. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts.map +1 -0
  189. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js +45 -0
  190. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js.map +1 -0
  191. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts +49 -0
  192. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -0
  193. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js +55 -0
  194. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -0
  195. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts +21 -0
  196. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts.map +1 -0
  197. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js +39 -0
  198. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js.map +1 -0
  199. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts +38 -0
  200. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts.map +1 -0
  201. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js +62 -0
  202. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js.map +1 -0
  203. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +112 -0
  204. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -0
  205. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +214 -0
  206. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -0
  207. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +21 -8
  208. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
  209. package/lib/Core/Components/Virtualise/index.js +21 -13
  210. package/lib/Core/Components/Virtualise/index.js.map +1 -1
  211. package/lib/Core/Components/Virtualise/utility.d.ts +1 -1
  212. package/lib/Core/Components/Virtualise/utility.d.ts.map +1 -1
  213. package/lib/Core/Components/Virtualise/utility.js +3 -2
  214. package/lib/Core/Components/Virtualise/utility.js.map +1 -1
  215. package/lib/Core/Context/LocalizationContext.d.ts +1 -1
  216. package/lib/Core/Context/LocalizationContext.d.ts.map +1 -1
  217. package/lib/Core/Context/LocalizationContext.js.map +1 -1
  218. package/lib/Core/Hooks/a11y/useAnnounce.d.ts +19 -0
  219. package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -0
  220. package/lib/Core/Hooks/a11y/useAnnounce.js +49 -0
  221. package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -0
  222. package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
  223. package/lib/Core/Hooks/useDragDrop.js +2 -0
  224. package/lib/Core/Hooks/useDragDrop.js.map +1 -1
  225. package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
  226. package/lib/Core/Hooks/useRepeat.js +20 -1
  227. package/lib/Core/Hooks/useRepeat.js.map +1 -1
  228. package/lib/Core/Localization/defaultTranslations.d.ts +16 -13
  229. package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
  230. package/lib/Core/Localization/defaultTranslations.js +17 -14
  231. package/lib/Core/Localization/defaultTranslations.js.map +1 -1
  232. package/lib/Core/Test/JUnitMocks.d.ts +6 -617
  233. package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
  234. package/lib/Core/Test/JUnitMocks.js +5 -4
  235. package/lib/Core/Test/JUnitMocks.js.map +1 -1
  236. package/lib/Core/Utils/index.d.ts +11 -0
  237. package/lib/Core/Utils/index.d.ts.map +1 -1
  238. package/lib/Core/Utils/index.js +22 -8
  239. package/lib/Core/Utils/index.js.map +1 -1
  240. package/lib/Core/Utils/styles.d.ts +2 -2
  241. package/lib/Core/Utils/styles.d.ts.map +1 -1
  242. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +4 -0
  243. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -0
  244. package/lib/Core/Views/Gallery/Components/GalleryCard.js +18 -0
  245. package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -0
  246. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts +8 -0
  247. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -0
  248. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +25 -0
  249. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -0
  250. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +8 -0
  251. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +1 -0
  252. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +8 -0
  253. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +1 -0
  254. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +8 -0
  255. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +1 -0
  256. package/lib/Core/Views/Gallery/Components/GalleryHeader.js +15 -0
  257. package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +1 -0
  258. package/lib/Core/Views/Gallery/Gallery.types.d.ts +8 -0
  259. package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -0
  260. package/lib/Core/Views/Gallery/Gallery.types.js +2 -0
  261. package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -0
  262. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts +13 -1
  263. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +1 -1
  264. package/lib/Core/Views/Gallery/StyledGalleryContainer.js +30 -40
  265. package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +1 -1
  266. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js +1 -1
  267. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js.map +1 -1
  268. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts +9 -0
  269. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +1 -0
  270. package/lib/Core/Views/Gallery/hooks/useRowActions.js +25 -0
  271. package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +1 -0
  272. package/lib/Core/Views/Gallery/index.d.ts +4 -8
  273. package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
  274. package/lib/Core/Views/Gallery/index.js +22 -62
  275. package/lib/Core/Views/Gallery/index.js.map +1 -1
  276. package/lib/Core/Views/Gallery/utils.d.ts +36 -0
  277. package/lib/Core/Views/Gallery/utils.d.ts.map +1 -0
  278. package/lib/Core/Views/Gallery/utils.js +91 -0
  279. package/lib/Core/Views/Gallery/utils.js.map +1 -0
  280. package/lib/Core/Views/Map/Map.styles.d.ts +190 -6
  281. package/lib/Core/Views/Map/Map.styles.d.ts.map +1 -1
  282. package/lib/Core/Views/Map/Map.styles.js.map +1 -1
  283. package/lib/Core/Views/Map/index.d.ts.map +1 -1
  284. package/lib/Core/Views/Map/index.js +10 -4
  285. package/lib/Core/Views/Map/index.js.map +1 -1
  286. package/lib/Core/Views/RsCardWrapper.js.map +1 -1
  287. package/lib/Core/Views/Table/CellWrapper.d.ts +1 -1
  288. package/lib/Core/Views/Table/CellWrapper.d.ts.map +1 -1
  289. package/lib/Core/Views/Table/CellWrapper.js +4 -2
  290. package/lib/Core/Views/Table/CellWrapper.js.map +1 -1
  291. package/lib/Core/Views/Table/HeaderWrapper.d.ts.map +1 -1
  292. package/lib/Core/Views/Table/HeaderWrapper.js +5 -5
  293. package/lib/Core/Views/Table/HeaderWrapper.js.map +1 -1
  294. package/lib/Core/Views/Table/Row.d.ts +3 -1
  295. package/lib/Core/Views/Table/Row.d.ts.map +1 -1
  296. package/lib/Core/Views/Table/Row.js +5 -3
  297. package/lib/Core/Views/Table/Row.js.map +1 -1
  298. package/lib/Core/Views/Table/SkeletonRows.d.ts +1 -1
  299. package/lib/Core/Views/Table/SkeletonRows.d.ts.map +1 -1
  300. package/lib/Core/Views/Table/StyledTableContainer.d.ts +3 -1
  301. package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
  302. package/lib/Core/Views/Table/StyledTableContainer.js +269 -158
  303. package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
  304. package/lib/Core/Views/Table/TableA11y.d.ts +11 -0
  305. package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -1
  306. package/lib/Core/Views/Table/TableA11y.js +207 -2
  307. package/lib/Core/Views/Table/TableA11y.js.map +1 -1
  308. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +5 -1
  309. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
  310. package/lib/Core/Views/Table/VirtualizeWrapper.js +38 -15
  311. package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
  312. package/lib/Core/Views/Table/index.d.ts.map +1 -1
  313. package/lib/Core/Views/Table/index.js +6 -4
  314. package/lib/Core/Views/Table/index.js.map +1 -1
  315. package/lib/Core/Views/Table/useCountChange.d.ts +10 -0
  316. package/lib/Core/Views/Table/useCountChange.d.ts.map +1 -0
  317. package/lib/Core/Views/Table/useCountChange.js +39 -0
  318. package/lib/Core/Views/Table/useCountChange.js.map +1 -0
  319. package/lib/Core/Views/Timeline/Timeline.d.ts +5 -0
  320. package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -0
  321. package/lib/Core/Views/Timeline/Timeline.js +28 -0
  322. package/lib/Core/Views/Timeline/Timeline.js.map +1 -0
  323. package/lib/Core/Views/Timeline/Timeline.styles.d.ts +393 -0
  324. package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -0
  325. package/lib/Core/Views/Timeline/Timeline.styles.js +175 -0
  326. package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -0
  327. package/lib/Core/Views/Timeline/Timeline.types.d.ts +48 -0
  328. package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -0
  329. package/lib/Core/Views/Timeline/Timeline.types.js +2 -0
  330. package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -0
  331. package/lib/Core/Views/Timeline/TimelineItem.d.ts +12 -0
  332. package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -0
  333. package/lib/Core/Views/Timeline/TimelineItem.js +43 -0
  334. package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -0
  335. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +4 -0
  336. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -0
  337. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js +141 -0
  338. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -0
  339. package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
  340. package/lib/Core/Views/Timeline/index.js +14 -8
  341. package/lib/Core/Views/Timeline/index.js.map +1 -1
  342. package/lib/Core/Views/Timeline/utils.d.ts +10 -0
  343. package/lib/Core/Views/Timeline/utils.d.ts.map +1 -0
  344. package/lib/Core/Views/Timeline/utils.js +144 -0
  345. package/lib/Core/Views/Timeline/utils.js.map +1 -0
  346. package/lib/Core/Views/rs-styles.d.ts +1 -1
  347. package/lib/Core/constants.d.ts.map +1 -1
  348. package/lib/Core/constants.js +1 -0
  349. package/lib/Core/constants.js.map +1 -1
  350. package/lib/Core/templateFeatureSupport.d.ts +17 -0
  351. package/lib/Core/templateFeatureSupport.d.ts.map +1 -0
  352. package/lib/Core/templateFeatureSupport.js +30 -0
  353. package/lib/Core/templateFeatureSupport.js.map +1 -0
  354. package/lib/types.d.ts +2 -0
  355. package/lib/types.d.ts.map +1 -1
  356. package/lib/types.js.map +1 -1
  357. package/package.json +11 -12
  358. package/lib/Core/Components/DefaultComponents/CardItem.d.ts +0 -3
  359. package/lib/Core/Components/DefaultComponents/CardItem.d.ts.map +0 -1
  360. package/lib/Core/Components/DefaultComponents/CardItem.js +0 -78
  361. package/lib/Core/Components/DefaultComponents/CardItem.js.map +0 -1
  362. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts +0 -12
  363. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +0 -1
  364. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +0 -35
  365. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +0 -1
  366. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts +0 -15
  367. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +0 -1
  368. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +0 -49
  369. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +0 -1
  370. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts +0 -12
  371. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map +0 -1
  372. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js +0 -44
  373. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js.map +0 -1
  374. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts +0 -16
  375. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +0 -1
  376. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +0 -63
  377. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +0 -1
  378. package/lib/Core/Components/EmptyContainer.d.ts +0 -5
  379. package/lib/Core/Components/EmptyContainer.d.ts.map +0 -1
  380. package/lib/Core/Components/EmptyContainer.js +0 -12
  381. package/lib/Core/Components/EmptyContainer.js.map +0 -1
  382. package/lib/Core/Components/GroupRenderer.d.ts.map +0 -1
  383. package/lib/Core/Components/GroupRenderer.js +0 -240
  384. package/lib/Core/Components/GroupRenderer.js.map +0 -1
  385. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts +0 -6
  386. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts.map +0 -1
  387. package/lib/Core/Components/Toolbar/KeyboardInstructions.js +0 -32
  388. package/lib/Core/Components/Toolbar/KeyboardInstructions.js.map +0 -1
  389. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +0 -8
  390. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +0 -1
  391. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +0 -61
  392. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +0 -1
  393. package/lib/Core/Hooks/useSelect.d.ts +0 -9
  394. package/lib/Core/Hooks/useSelect.d.ts.map +0 -1
  395. package/lib/Core/Hooks/useSelect.js +0 -24
  396. package/lib/Core/Hooks/useSelect.js.map +0 -1
  397. package/lib/Core/Views/Gallery/ItemWrapper.d.ts +0 -19
  398. package/lib/Core/Views/Gallery/ItemWrapper.d.ts.map +0 -1
  399. package/lib/Core/Views/Gallery/ItemWrapper.js +0 -34
  400. package/lib/Core/Views/Gallery/ItemWrapper.js.map +0 -1
  401. package/lib/Core/Views/Timeline/utility.d.ts +0 -8
  402. package/lib/Core/Views/Timeline/utility.d.ts.map +0 -1
  403. package/lib/Core/Views/Timeline/utility.js +0 -120
  404. package/lib/Core/Views/Timeline/utility.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuContainer.js","sourceRoot":"","sources":["../../../../Core/Components/ContextMenu/ContextMenuContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,eAAe,IAAI,EAAE,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;CAE/B,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7C,OAAO,GAAG,CAAA;;;;;;;;;;;0BAWc,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;oBAC3C,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;;GAEjD,CAAC;AACJ,CAAC,CAAC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I,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IAClD,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CACvD,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useRef, useState, useMemo, useEffect, useCallback } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Popover, Icon, useElement, useOuterEvent } from '@pega/cosmos-react-core';\nimport {\n getRowContextData,\n getScrollerElem,\n isFilterApplied\n} from 'pega-repeating-structures-core';\n\nimport { createClassName as cx } from '../../Utils';\nimport useTranslate from '../../Hooks/useTranslate';\nimport useScrollAway from '../../Hooks/useScrollAway';\n\nimport { applyFilter, quickFilterEnabled, removeFilter } from './QuickFilter';\nimport copyText from './CopyPaste';\n\nconst StyledPopover = styled.div`\n width: 10rem;\n`;\n\nconst StyledContent = styled.div(({ theme }) => {\n return css`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0.25rem;\n border-radius: 0.156rem;\n box-sizing: border-box;\n cursor: pointer;\n margin-top: 0.125rem;\n margin-bottom: 0.125rem;\n :hover {\n background-color: ${theme.base.colors.blue['extra-light']};\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n `;\n});\n\nconst StyledListItem = styled.div(({ theme }) => {\n return css`\n button {\n display: flex;\n align-items: center;\n /* stylelint-disable unit-allowed-list */\n padding: 4px 8px;\n }\n .label {\n padding-left: 14px;\n vertical-align: text-top;\n }\n .disabled {\n padding-left: 14px;\n vertical-align: text-top;\n opacity: ${theme.base['disabled-opacity']};\n }\n `;\n});\n\nconst StyledButton = styled.button`\n display: block;\n text-align: start;\n background: none;\n border: none;\n line-height: 1;\n outline: none;\n cursor: pointer;\n color: ${props => props.theme.base.palette['foreground-color']};\n border-radius: 0;\n`;\n\nconst getDefaultMenuItems = (\n column,\n rowContextData,\n targetCell,\n columns,\n filterExpression,\n actionColumnFiltering,\n actionClearFiltering,\n translate\n) => {\n const isFiltered = isFilterApplied(column, filterExpression);\n return [\n {\n id: 'quickFilter',\n icon: isFiltered ? 'times' : 'filter',\n label: isFiltered ? translate('Remove filter') : translate('Filter by this'),\n show: !!quickFilterEnabled(columns, column.field.id),\n disabled: false,\n onClick: () => {\n if (isFiltered) {\n return removeFilter(\n filterExpression,\n targetCell,\n actionColumnFiltering,\n actionClearFiltering\n );\n }\n return applyFilter(\n columns,\n targetCell,\n rowContextData,\n filterExpression,\n actionColumnFiltering\n );\n }\n },\n {\n id: 'copyText',\n icon: 'copy',\n label: translate('Copy text'),\n show: true,\n disabled: false,\n onClick: () => copyText(targetCell)\n },\n {\n id: 'pasteText',\n icon: 'documents',\n label: translate('Paste text'),\n show: true,\n disabled: true,\n onClick: () => {}\n }\n ];\n};\n\nconst getMenuItems = (\n targetCell,\n column,\n rowContextData,\n columns,\n filterExpression,\n actionColumnFiltering,\n actionClearFiltering,\n translate\n) => {\n const fieldContextOptions = column.field?.contextMenuOptions || [];\n return [\n ...getDefaultMenuItems(\n column,\n rowContextData,\n targetCell,\n columns,\n filterExpression,\n actionColumnFiltering,\n actionClearFiltering,\n translate\n ),\n ...fieldContextOptions\n ];\n};\n\nconst shouldOverrideContextMenu = (targetCell, columns) => {\n if (!targetCell) {\n return false;\n }\n const { colId } = targetCell.dataset;\n\n const { field } = columns.find(col => col.field.id.toString() === colId?.toString()) || {};\n return !(!field || field?.noContextMenu);\n};\n\nconst MenuItem = ({\n menu = {},\n target = {},\n column = {},\n rowContextData = {},\n onMenuItemClick = () => {}\n}) => {\n const { onClick = () => {}, icon, disabled = false, show = true, label } = menu;\n if (!show) {\n return null;\n }\n\n return (\n <StyledContent\n onClick={() => {\n onMenuItemClick();\n onClick(target, column, rowContextData);\n }}\n >\n <StyledListItem>\n <StyledButton>\n {icon && <Icon name={icon} />}\n <span className={cx('label', { disabled })}>{label}</span>\n </StyledButton>\n </StyledListItem>\n </StyledContent>\n );\n};\n\nMenuItem.propTypes = {\n menu: PropTypes.objectOf(PropTypes.any),\n target: PropTypes.objectOf(PropTypes.any),\n column: PropTypes.objectOf(PropTypes.any),\n rowContextData: PropTypes.objectOf(PropTypes.any),\n onMenuItemClick: PropTypes.func\n};\n\nexport default function ContextMenuContainer({ view, selector }) {\n const {\n columns,\n data,\n state: { paginationOptions, filterExpression } = {},\n domContainer,\n type: { applyFilter: applyViewFilter, clearFilter }\n } = view;\n const [translate] = useTranslate();\n const contextMenuRef = useRef({}).current;\n const [showMenu, setShowMenu] = useState(false);\n const [menuItems, setMenuItems] = useState([]);\n const [popperRef, setPopperRef] = useElement();\n const scrollerElem = useMemo(() => getScrollerElem(view), [view]);\n\n useOuterEvent('mousedown', [popperRef], () => {\n setShowMenu(false);\n });\n\n useScrollAway(popperRef, scrollerElem, () => {\n setShowMenu(false);\n });\n\n const onMenuItemClick = useCallback(event => {\n if (event && event.key !== 'Escape') {\n return;\n }\n setShowMenu(false);\n }, []);\n\n const contextMenuListener = useCallback(\n e => {\n const targetElement = selector ? e.target.closest(selector.query.toString()) : e.target;\n if (\n shouldOverrideContextMenu(targetElement, columns) &&\n // TODO: We will add \"Open link in new tab\" option in context menu once the custom context menu is made accessible.\n !e.target.closest('a')\n ) {\n e.stopPropagation();\n e.preventDefault();\n contextMenuRef.targetCell = targetElement;\n const { colId } = contextMenuRef.targetCell.dataset;\n contextMenuRef.column = columns.find(col => col.field.id.toString() === colId?.toString());\n contextMenuRef.rowContextData = getRowContextData(data, paginationOptions, targetElement);\n targetElement.classList.add('selection-border', 'disable-select');\n const options = getMenuItems(\n targetElement,\n contextMenuRef.column,\n contextMenuRef.rowContextData,\n columns,\n filterExpression,\n applyViewFilter,\n clearFilter,\n translate\n );\n setShowMenu(true);\n setMenuItems(options);\n }\n },\n\n [\n selector,\n columns,\n contextMenuRef.targetCell,\n contextMenuRef.column,\n contextMenuRef.rowContextData,\n data,\n paginationOptions,\n filterExpression,\n applyViewFilter,\n clearFilter,\n translate\n ]\n );\n\n useEffect(() => {\n if (domContainer) {\n domContainer.addEventListener('contextmenu', contextMenuListener);\n domContainer.addEventListener('keydown', onMenuItemClick);\n }\n return () => {\n if (domContainer) {\n domContainer.removeEventListener('contextmenu', contextMenuListener);\n domContainer.removeEventListener('keydown', onMenuItemClick);\n }\n };\n }, [domContainer, contextMenuListener, onMenuItemClick]);\n\n if (!contextMenuRef.targetCell || !showMenu || !domContainer) {\n if (contextMenuRef.targetCell && selector) {\n contextMenuRef.targetCell.classList.remove('selection-border', 'disable-select');\n }\n return null;\n }\n\n return (\n <Popover portal ref={setPopperRef} target={contextMenuRef.targetCell}>\n <StyledPopover>\n {menuItems.map(menu => (\n <MenuItem\n key={menu.id}\n onMenuItemClick={onMenuItemClick}\n target={contextMenuRef.targetCell}\n column={contextMenuRef.column}\n rowContextData={contextMenuRef.rowContextData}\n menu={menu}\n />\n ))}\n </StyledPopover>\n </Popover>\n );\n}\n\nContextMenuContainer.propTypes = {\n view: PropTypes.objectOf(PropTypes.any).isRequired,\n selector: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
1
+ {"version":3,"file":"ContextMenuContainer.js","sourceRoot":"","sources":["../../../../Core/Components/ContextMenu/ContextMenuContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC,OAAO,EACL,OAAO,EACP,IAAI,EACJ,UAAU,EACV,aAAa,EACb,IAAI,EACJ,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAExC,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,kBA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AAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBACpB,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,WAAW,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,EACD,cAAc,EAAE,WAAW,CAAC,UAAU,EACtC,SAAS,EAAC,aAAa,iBACV,eAAe,CAAC,WAAW,kBAE3B,aAAa,GAC1B,GACM,CACX,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC","sourcesContent":["import { useState, useMemo, useEffect, useCallback } from 'react';\nimport { v4 as uuidV4 } from 'uuid';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport type { MenuItemProps } from '@pega/cosmos-react-core';\nimport {\n Popover,\n Icon,\n useElement,\n useOuterEvent,\n Menu,\n isInstance\n} from '@pega/cosmos-react-core';\nimport {\n getRowContextData,\n getScrollerElem,\n isFilterApplied\n} from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\nimport useScrollAway from '../../Hooks/useScrollAway';\nimport TestIdConstants from '../TestIdConstants';\n\nimport { applyFilter, quickFilterEnabled, removeFilter } from './QuickFilter';\nimport copyText from './CopyPaste';\n\ntype MenuContext = {\n targetCell: HTMLElement;\n column: RsCoreTypes.Column;\n rowContextData: RsCoreTypes.RowData;\n menuId: string;\n} | null;\n\nconst getMenuItems = (\n targetCell: HTMLElement,\n column: RsCoreTypes.Column,\n rowContextData: RsCoreTypes.RowData,\n view: RsCoreTypes.View,\n translate: (key: string) => string\n): MenuItemProps[] => {\n const {\n columns = [],\n state: { filterExpression } = {},\n type: { applyFilter: applyViewFilter, clearFilter }\n } = view;\n const defaultMenuItems: MenuItemProps[] = [];\n\n if (quickFilterEnabled(columns, column.field.id)) {\n const isFiltered = filterExpression && isFilterApplied(column, filterExpression);\n defaultMenuItems.push({\n id: 'quickFilter',\n visual: isFiltered ? <Icon name='times' /> : <Icon name='filter' />,\n primary: isFiltered ? translate('Remove filter') : translate('Filter by this'),\n\n onClick: () => {\n if (isFiltered) {\n removeFilter(filterExpression, targetCell, applyViewFilter, clearFilter);\n } else {\n applyFilter(columns, targetCell, rowContextData, filterExpression, applyViewFilter);\n }\n }\n });\n }\n\n defaultMenuItems.push({\n id: 'copyText',\n visual: <Icon name='copy' />,\n primary: translate('Copy text'),\n onClick: () => copyText(targetCell)\n });\n\n const fieldSpecificMenuItems: MenuItemProps[] = (column.field?.contextMenuOptions || []).map(\n option => ({\n id: option.id,\n visual: option.icon ? <Icon name={option.icon} /> : undefined,\n primary: option.label || '',\n onClick: () => option.onClick?.(targetCell)\n })\n );\n\n return [...defaultMenuItems, ...fieldSpecificMenuItems];\n};\n\nconst shouldOverrideContextMenu = (\n targetCell: HTMLElement,\n columns: RsCoreTypes.Column[] = []\n): boolean => {\n const { colId } = targetCell.dataset;\n\n const { field } = columns.find(col => col.field.id.toString() === colId?.toString()) || {};\n return !(!field || field?.noContextMenu);\n};\n\nexport default function ContextMenuContainer({\n view,\n selector\n}: {\n view: RsCoreTypes.View;\n selector: { query: string };\n}) {\n const { columns = [], data = [], state: { paginationOptions } = {}, domContainer } = view;\n\n const [translate] = useTranslate();\n const [menuContext, setMenuContext] = useState<MenuContext>(null);\n const [showMenu, setShowMenu] = useState(false);\n const [menuItems, setMenuItems] = useState<MenuItemProps[]>([]);\n const [popperRef, setPopperRef] = useElement();\n const scrollerElem = useMemo(() => getScrollerElem(view), [view]);\n\n useOuterEvent('mousedown', [popperRef], () => {\n setShowMenu(false);\n });\n\n useScrollAway(popperRef, scrollerElem, () => {\n setShowMenu(false);\n });\n\n useEffect(() => {\n if (!showMenu) {\n const targetCell = menuContext?.targetCell;\n if (targetCell) {\n targetCell.removeAttribute('data-context-menu-active');\n targetCell.removeAttribute('aria-expanded');\n targetCell.removeAttribute('aria-controls');\n }\n setMenuContext(null);\n }\n }, [showMenu]);\n\n const contextMenuListener = useCallback(\n (e: MouseEvent) => {\n const target = e.target;\n if (!isInstance(target, Element)) return;\n\n const targetElement = target.closest(selector.query.toString());\n if (!isInstance(targetElement, HTMLElement)) return;\n\n if (shouldOverrideContextMenu(targetElement, columns) && !target.closest('a')) {\n e.stopPropagation();\n e.preventDefault();\n\n const { colId } = targetElement.dataset;\n const column = columns.find(col => col.field.id.toString() === colId?.toString());\n if (!column) return;\n\n targetElement.setAttribute('data-context-menu-active', 'true');\n targetElement.setAttribute('aria-expanded', 'true');\n const menuId = `rs-context-menu-${uuidV4()}`;\n targetElement.setAttribute('aria-controls', menuId);\n\n const rowContextData = getRowContextData(data, paginationOptions || {}, targetElement);\n const options = getMenuItems(targetElement, column, rowContextData, view, translate);\n if (!options.length) return;\n\n setShowMenu(true);\n setMenuItems(options);\n setMenuContext({\n column,\n targetCell: targetElement,\n rowContextData,\n menuId\n });\n }\n },\n [selector, columns, data, paginationOptions, translate, view]\n );\n\n const onKeydown = useCallback(({ key }: KeyboardEvent) => {\n if (key === 'Escape') setShowMenu(false);\n }, []);\n\n useEffect(() => {\n const abortController = new AbortController();\n if (!domContainer) return;\n\n domContainer.addEventListener('contextmenu', contextMenuListener, {\n signal: abortController.signal\n });\n document.addEventListener('keydown', onKeydown, {\n signal: abortController.signal\n });\n\n return () => {\n abortController.abort();\n };\n }, [domContainer, contextMenuListener]);\n\n return showMenu && menuContext ? (\n <Popover ref={setPopperRef} target={menuContext.targetCell}>\n <Menu\n id={menuContext.menuId}\n items={menuItems}\n onItemClick={(_, e) => {\n e.preventDefault();\n setShowMenu(false);\n }}\n focusControlEl={menuContext.targetCell}\n className='action-menu'\n data-testid={TestIdConstants.contextMenu}\n // TODO: remove this older test-id syntax after checking usage across the test suites\n data-test-id='action-menu'\n />\n </Popover>\n ) : null;\n}\n"]}
@@ -1,5 +1,5 @@
1
- import get from 'lodash.get';
2
- import { addFilter, getFilters, comparatorMap } from 'pega-repeating-structures-core';
1
+ import get from 'lodash-es/get';
2
+ import { addFilter, getFilters, comparatorMap, FieldType } from 'pega-repeating-structures-core';
3
3
  import { TOOLBAR_FEATURES } from '../../constants';
4
4
  const getBooleanComparator = inputValue => {
5
5
  let comparator;
@@ -21,21 +21,21 @@ export const quickFilterEnabled = (columns, colId) => {
21
21
  const column = columns.find(col => col.field.id.toString() === colId.toString());
22
22
  return (column &&
23
23
  column.parent.shouldDisplayFeature(TOOLBAR_FEATURES.FILTER, column) &&
24
- !(column.field.type === 'date' || column.field.type === 'datetime'));
24
+ !(column.field.type === FieldType.DATE || column.field.type === FieldType.DATE_TIME));
25
25
  };
26
26
  export const applyFilter = (columns, targetCell, rowContextData, filterExpression, actionColumnFiltering) => {
27
27
  // preparing filter object to apply equals filter
28
28
  const { colId } = targetCell.dataset;
29
29
  const column = columns.find(col => col.field.id.toString() === colId.toString());
30
30
  const inputValue = get(rowContextData, column.field.name);
31
- const isPickList = column.field.type === 'text' && column.field.filterPickList;
31
+ const isPickList = column.field.type === FieldType.TEXT && column.field.filterPickList;
32
32
  let comparator;
33
33
  let input;
34
34
  // decide the comparator based on filtered value or column type
35
35
  if (inputValue === null || inputValue === undefined) {
36
36
  comparator = comparatorMap.isNull;
37
37
  }
38
- else if (column.field.type === 'boolean') {
38
+ else if (column.field.type === FieldType.BOOLEAN) {
39
39
  comparator = getBooleanComparator(inputValue);
40
40
  }
41
41
  else if (isPickList) {
@@ -45,10 +45,10 @@ export const applyFilter = (columns, targetCell, rowContextData, filterExpressio
45
45
  comparator = comparatorMap.equals;
46
46
  }
47
47
  // decide input value for expression rhs
48
- if (column.field.type === 'number') {
48
+ if (column.field.type === FieldType.NUMBER) {
49
49
  input = inputValue && parseFloat(inputValue);
50
50
  }
51
- else if (column.field.type === 'boolean') {
51
+ else if (column.field.type === FieldType.BOOLEAN) {
52
52
  input = null;
53
53
  }
54
54
  else if (isPickList) {
@@ -1 +1 @@
1
- {"version":3,"file":"QuickFilter.js","sourceRoot":"","sources":["../../../../Core/Components/ContextMenu/QuickFilter.js"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,UAAU,E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M,CAAC;QACN,KAAK,GAAG,UAAU,CAAC;IACrB,CAAC;IAED,MAAM,qBAAqB,GAAG,SAAS,CAAC;QACtC,UAAU;QACV,KAAK;QACL,gBAAgB;QAChB,MAAM;KACP,CAAC,CAAC;IACH,qBAAqB,CAAC;QACpB,SAAS,EAAE,qBAAqB;KACjC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,EAAE;IACF,MAAM,OAAO,GAAG,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACjD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,mDAAmD;QACnD,oBAAoB,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACN,qBAAqB,CAAC;YACpB,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC","sourcesContent":["import get from 'lodash.get';\n\nimport { addFilter, getFilters, comparatorMap } from 'pega-repeating-structures-core';\n\nimport { TOOLBAR_FEATURES } from '../../constants';\n\nconst getBooleanComparator = inputValue => {\n let comparator;\n if (inputValue?.toString().toLowerCase() === 'true') {\n comparator = comparatorMap.isTrue;\n } else if (inputValue?.toString().toLowerCase() === 'false') {\n comparator = comparatorMap.isFalse;\n } else {\n comparator = comparatorMap.isNull;\n }\n return comparator;\n};\n\nexport const quickFilterEnabled = (columns, colId) => {\n if (!colId) {\n return false;\n }\n const column = columns.find(col => col.field.id.toString() === colId.toString());\n return (\n column &&\n column.parent.shouldDisplayFeature(TOOLBAR_FEATURES.FILTER, column) &&\n !(column.field.type === 'date' || column.field.type === 'datetime')\n );\n};\n\nexport const applyFilter = (\n columns,\n targetCell,\n rowContextData,\n filterExpression,\n actionColumnFiltering\n) => {\n // preparing filter object to apply equals filter\n const { colId } = targetCell.dataset;\n const column = columns.find(col => col.field.id.toString() === colId.toString());\n const inputValue = get(rowContextData, column.field.name);\n const isPickList = column.field.type === 'text' && column.field.filterPickList;\n let comparator;\n let input;\n\n // decide the comparator based on filtered value or column type\n if (inputValue === null || inputValue === undefined) {\n comparator = comparatorMap.isNull;\n } else if (column.field.type === 'boolean') {\n comparator = getBooleanComparator(inputValue);\n } else if (isPickList) {\n comparator = comparatorMap.in;\n } else {\n comparator = comparatorMap.equals;\n }\n\n // decide input value for expression rhs\n if (column.field.type === 'number') {\n input = inputValue && parseFloat(inputValue);\n } else if (column.field.type === 'boolean') {\n input = null;\n } else if (isPickList) {\n input = inputValue && [inputValue];\n } else {\n input = inputValue;\n }\n\n const localFilterExpression = addFilter({\n comparator,\n input,\n filterExpression,\n column\n });\n actionColumnFiltering({\n filterExp: localFilterExpression\n });\n};\n\nexport const removeFilter = (\n filterExpression,\n targetCell,\n actionColumnFiltering,\n actionClearFiltering\n) => {\n const filters = getFilters({ filterExpression });\n if (filters.length > 1) {\n // removing equals filter applied on current column\n actionClearFiltering(targetCell.dataset.colId);\n } else {\n actionColumnFiltering({\n filterExp: null\n });\n }\n};\n"]}
1
+ {"version":3,"file":"QuickFilter.js","sourceRoot":"","sources":["../../../../Core/Components/ContextMenu/QuickFilter.js"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,eAAe,CAAC;AAEhC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAEjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,oBAAoB,GAAG,UAAU,CAAC,EAAE;IACxC,IAAI,UAAU,CAAC;IACf,IAAI,UAAU,EAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;QACpD,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;IACpC,CAAC;SAAM,IAAI,UAAU,EAAE,QAAQ,EAAE,CAAC,WAAW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B,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,EAAE;IACF,MAAM,OAAO,GAAG,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACjD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,mDAAmD;QACnD,oBAAoB,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACN,qBAAqB,CAAC;YACpB,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC","sourcesContent":["import get from 'lodash-es/get';\n\nimport { addFilter, getFilters, comparatorMap, FieldType } from 'pega-repeating-structures-core';\n\nimport { TOOLBAR_FEATURES } from '../../constants';\n\nconst getBooleanComparator = inputValue => {\n let comparator;\n if (inputValue?.toString().toLowerCase() === 'true') {\n comparator = comparatorMap.isTrue;\n } else if (inputValue?.toString().toLowerCase() === 'false') {\n comparator = comparatorMap.isFalse;\n } else {\n comparator = comparatorMap.isNull;\n }\n return comparator;\n};\n\nexport const quickFilterEnabled = (columns, colId) => {\n if (!colId) {\n return false;\n }\n const column = columns.find(col => col.field.id.toString() === colId.toString());\n return (\n column &&\n column.parent.shouldDisplayFeature(TOOLBAR_FEATURES.FILTER, column) &&\n !(column.field.type === FieldType.DATE || column.field.type === FieldType.DATE_TIME)\n );\n};\n\nexport const applyFilter = (\n columns,\n targetCell,\n rowContextData,\n filterExpression,\n actionColumnFiltering\n) => {\n // preparing filter object to apply equals filter\n const { colId } = targetCell.dataset;\n const column = columns.find(col => col.field.id.toString() === colId.toString());\n const inputValue = get(rowContextData, column.field.name);\n const isPickList = column.field.type === FieldType.TEXT && column.field.filterPickList;\n let comparator;\n let input;\n\n // decide the comparator based on filtered value or column type\n if (inputValue === null || inputValue === undefined) {\n comparator = comparatorMap.isNull;\n } else if (column.field.type === FieldType.BOOLEAN) {\n comparator = getBooleanComparator(inputValue);\n } else if (isPickList) {\n comparator = comparatorMap.in;\n } else {\n comparator = comparatorMap.equals;\n }\n\n // decide input value for expression rhs\n if (column.field.type === FieldType.NUMBER) {\n input = inputValue && parseFloat(inputValue);\n } else if (column.field.type === FieldType.BOOLEAN) {\n input = null;\n } else if (isPickList) {\n input = inputValue && [inputValue];\n } else {\n input = inputValue;\n }\n\n const localFilterExpression = addFilter({\n comparator,\n input,\n filterExpression,\n column\n });\n actionColumnFiltering({\n filterExp: localFilterExpression\n });\n};\n\nexport const removeFilter = (\n filterExpression,\n targetCell,\n actionColumnFiltering,\n actionClearFiltering\n) => {\n const filters = getFilters({ filterExpression });\n if (filters.length > 1) {\n // removing equals filter applied on current column\n actionClearFiltering(targetCell.dataset.colId);\n } else {\n actionColumnFiltering({\n filterExp: null\n });\n }\n};\n"]}
@@ -1,3 +1,3 @@
1
1
  export default CustomCellWrapper;
2
- declare const CustomCellWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ declare const CustomCellWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  //# sourceMappingURL=CustomCellWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomCellWrapper.d.ts","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.js"],"names":[],"mappings":";AAEA,yIAMG"}
1
+ {"version":3,"file":"CustomCellWrapper.d.ts","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.js"],"names":[],"mappings":";AAEA,6PAMG"}
@@ -1,7 +1,8 @@
1
1
  export default RowActionMenu;
2
- declare function RowActionMenu({ getRsMeta, getExecutionContext }: {
2
+ declare function RowActionMenu({ getRsMeta, getExecutionContext, getParentContext }: {
3
3
  getRsMeta: any;
4
4
  getExecutionContext: any;
5
+ getParentContext: any;
5
6
  }): import("react/jsx-runtime").JSX.Element;
6
7
  declare namespace RowActionMenu {
7
8
  namespace propTypes {
@@ -1 +1 @@
1
- {"version":3,"file":"RowActionMenu.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowActionMenu.jsx"],"names":[],"mappings":";AA6BA;;;4CA8DC;;;;;;;sBAzFqB,YAAY"}
1
+ {"version":3,"file":"RowActionMenu.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowActionMenu.jsx"],"names":[],"mappings":";AAkBA;;;;4CA0DC;;;;;;;sBA3EqB,YAAY"}
@@ -1,19 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState, useMemo } from 'react';
3
- import styled from 'styled-components';
4
3
  import PropTypes from 'prop-types';
5
4
  import { MenuButton } from '@pega/cosmos-react-core';
5
+ import { ROW_DENSITY } from 'pega-repeating-structures-core';
6
6
  import useTranslate from '../../../Hooks/useTranslate';
7
- const StyledActionMenu = styled.div `
8
- button {
9
- /* stylelint-disable unit-allowed-list */
10
- height: 25px;
11
- min-height: 25px;
12
- > svg {
13
- height: 70%;
14
- }
15
- }
16
- `;
17
7
  const hydrateActions = (actions, rowContext, refreshRow) => {
18
8
  return actions.map(action => ({
19
9
  ...action,
@@ -23,7 +13,7 @@ const hydrateActions = (actions, rowContext, refreshRow) => {
23
13
  }
24
14
  }));
25
15
  };
26
- function RowActionMenu({ getRsMeta, getExecutionContext }) {
16
+ function RowActionMenu({ getRsMeta, getExecutionContext, getParentContext }) {
27
17
  const [translate] = useTranslate();
28
18
  const { getValue, getRowActionDetails, refreshRow } = getExecutionContext();
29
19
  const [rowActions, setRowActions] = useState([]);
@@ -49,15 +39,13 @@ function RowActionMenu({ getRsMeta, getExecutionContext }) {
49
39
  };
50
40
  const rowHeaderValue = getExecutionContext().getRowHeader()?.getValue();
51
41
  const translatedActionsText = translate('Actions');
52
- return (_jsx(StyledActionMenu, { className: 'row-action-menu', children: _jsx(MenuButton, { compact: true, text: translatedActionsText, iconOnly: true, variant: 'simple', tabIndex: -1, menu: {
53
- items: actionsFetched ? rowActions : [],
54
- emptyText: translate('No actions available'),
55
- loading: !actionsFetched
56
- }, "aria-label": rowHeaderValue
57
- ? `${translatedActionsText} - ${rowHeaderValue}`
58
- : `${translatedActionsText}`, onClick: fetchCaseDeatils, placement: 'bottom-end', popover: {
59
- portal: true
60
- }, icon: 'more' }) }));
42
+ return (_jsx(MenuButton, { text: translatedActionsText, iconOnly: true, variant: 'simple', compact: getParentContext().getRowDensity() === ROW_DENSITY.SHORT, tabIndex: -1, menu: {
43
+ items: actionsFetched ? rowActions : [],
44
+ emptyText: translate('No actions available'),
45
+ loading: !actionsFetched
46
+ }, "aria-label": rowHeaderValue ? `${translatedActionsText} - ${rowHeaderValue}` : `${translatedActionsText}`, onClick: fetchCaseDeatils, placement: 'bottom-end', popover: {
47
+ portal: true
48
+ }, icon: 'more' }));
61
49
  }
62
50
  RowActionMenu.propTypes = {
63
51
  getRsMeta: PropTypes.func.isRequired,
@@ -1 +1 @@
1
- {"version":3,"file":"RowActionMenu.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowActionMenu.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAEvD,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;CASlC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE;IACzD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CA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CAAC,UAAU;CAC/C,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useState, useMemo } from 'react';\nimport styled from 'styled-components';\nimport PropTypes from 'prop-types';\n\nimport { MenuButton } from '@pega/cosmos-react-core';\n\nimport useTranslate from '../../../Hooks/useTranslate';\n\nconst StyledActionMenu = styled.div`\n button {\n /* stylelint-disable unit-allowed-list */\n height: 25px;\n min-height: 25px;\n > svg {\n height: 70%;\n }\n }\n`;\n\nconst hydrateActions = (actions, rowContext, refreshRow) => {\n return actions.map(action => ({\n ...action,\n primary: action.text,\n onClick: () => {\n action.onClick(rowContext, refreshRow);\n }\n }));\n};\n\nfunction RowActionMenu({ getRsMeta, getExecutionContext }) {\n const [translate] = useTranslate();\n const { getValue, getRowActionDetails, refreshRow } = getExecutionContext();\n const [rowActions, setRowActions] = useState([]);\n const [actionsFetched, setActionsFetched] = useState(false);\n const rowContext = getValue();\n const { rowActions: tableMetaRowActions } = getRsMeta();\n const staticActions = useMemo(\n () => hydrateActions(tableMetaRowActions ?? [], rowContext, refreshRow.bind(null, rowContext)),\n [rowContext]\n );\n\n const fetchCaseDeatils = () => {\n setActionsFetched(false);\n const currentRowContext = getExecutionContext()?.getValue();\n getRowActionDetails(currentRowContext)\n .then(response => {\n if (Array.isArray(response)) {\n const latestRowContext = getExecutionContext()?.getValue();\n const actions = hydrateActions(\n response,\n latestRowContext,\n refreshRow.bind(null, latestRowContext)\n );\n const arr = [...actions, ...staticActions];\n setRowActions(arr);\n }\n })\n .finally(() => {\n setActionsFetched(true);\n });\n };\n const rowHeaderValue = getExecutionContext().getRowHeader()?.getValue();\n const translatedActionsText = translate('Actions');\n\n return (\n <StyledActionMenu className='row-action-menu'>\n <MenuButton\n compact\n text={translatedActionsText}\n iconOnly\n variant='simple'\n tabIndex={-1}\n menu={{\n items: actionsFetched ? rowActions : [],\n emptyText: translate('No actions available'),\n loading: !actionsFetched\n }}\n aria-label={\n rowHeaderValue\n ? `${translatedActionsText} - ${rowHeaderValue}`\n : `${translatedActionsText}`\n }\n onClick={fetchCaseDeatils}\n placement='bottom-end'\n popover={{\n portal: true\n }}\n icon='more'\n />\n </StyledActionMenu>\n );\n}\n\nRowActionMenu.propTypes = {\n getRsMeta: PropTypes.func.isRequired,\n getExecutionContext: PropTypes.func.isRequired\n};\n\nexport default RowActionMenu;\n"]}
1
+ {"version":3,"file":"RowActionMenu.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowActionMenu.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAEvD,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE;IACzD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC5B,GAAG,MAAM;QACT,OAAO,EAAE,MAAM,CAAC,IAAI;QACpB,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACzC,CAAC;KACF,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,SAAS,aAAa,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,EAAE;IACzE,MAAM,CAAC,SAAS,CAAC,GAAG,YAAY,EAAE,CAAC;IACnC,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,UAAU,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAC5E,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAA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AU,IACT,IAAI,EAAE,qBAAqB,EAC3B,QAAQ,QACR,OAAO,EAAC,QAAQ,EAChB,OAAO,EAAE,gBAAgB,EAAE,CAAC,aAAa,EAAE,KAAK,WAAW,CAAC,KAAK,EACjE,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAE;YACJ,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;YACvC,SAAS,EAAE,SAAS,CAAC,sBAAsB,CAAC;YAC5C,OAAO,EAAE,CAAC,cAAc;SACzB,gBAEC,cAAc,CAAC,CAAC,CAAC,GAAG,qBAAqB,MAAM,cAAc,EAAE,CAAC,CAAC,CAAC,GAAG,qBAAqB,EAAE,EAE9F,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAC,YAAY,EACtB,OAAO,EAAE;YACP,MAAM,EAAE,IAAI;SACb,EACD,IAAI,EAAC,MAAM,GACX,CACH,CAAC;AACJ,CAAC;AAED,aAAa,CAAC,SAAS,GAAG;IACxB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACpC,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAC/C,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useState, useMemo } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { MenuButton } from '@pega/cosmos-react-core';\nimport { ROW_DENSITY } from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../../Hooks/useTranslate';\n\nconst hydrateActions = (actions, rowContext, refreshRow) => {\n return actions.map(action => ({\n ...action,\n primary: action.text,\n onClick: () => {\n action.onClick(rowContext, refreshRow);\n }\n }));\n};\n\nfunction RowActionMenu({ getRsMeta, getExecutionContext, getParentContext }) {\n const [translate] = useTranslate();\n const { getValue, getRowActionDetails, refreshRow } = getExecutionContext();\n const [rowActions, setRowActions] = useState([]);\n const [actionsFetched, setActionsFetched] = useState(false);\n const rowContext = getValue();\n const { rowActions: tableMetaRowActions } = getRsMeta();\n const staticActions = useMemo(\n () => hydrateActions(tableMetaRowActions ?? [], rowContext, refreshRow.bind(null, rowContext)),\n [rowContext]\n );\n\n const fetchCaseDeatils = () => {\n setActionsFetched(false);\n const currentRowContext = getExecutionContext()?.getValue();\n getRowActionDetails(currentRowContext)\n .then(response => {\n if (Array.isArray(response)) {\n const latestRowContext = getExecutionContext()?.getValue();\n const actions = hydrateActions(\n response,\n latestRowContext,\n refreshRow.bind(null, latestRowContext)\n );\n const arr = [...actions, ...staticActions];\n setRowActions(arr);\n }\n })\n .finally(() => {\n setActionsFetched(true);\n });\n };\n const rowHeaderValue = getExecutionContext().getRowHeader()?.getValue();\n const translatedActionsText = translate('Actions');\n\n return (\n <MenuButton\n text={translatedActionsText}\n iconOnly\n variant='simple'\n compact={getParentContext().getRowDensity() === ROW_DENSITY.SHORT}\n tabIndex={-1}\n menu={{\n items: actionsFetched ? rowActions : [],\n emptyText: translate('No actions available'),\n loading: !actionsFetched\n }}\n aria-label={\n rowHeaderValue ? `${translatedActionsText} - ${rowHeaderValue}` : `${translatedActionsText}`\n }\n onClick={fetchCaseDeatils}\n placement='bottom-end'\n popover={{\n portal: true\n }}\n icon='more'\n />\n );\n}\n\nRowActionMenu.propTypes = {\n getRsMeta: PropTypes.func.isRequired,\n getExecutionContext: PropTypes.func.isRequired\n};\n\nexport default RowActionMenu;\n"]}
@@ -1,6 +1,7 @@
1
1
  export default RowDragDropHandle;
2
- declare function RowDragDropHandle({ getExecutionContext }: {
2
+ declare function RowDragDropHandle({ getExecutionContext, getParentContext }: {
3
3
  getExecutionContext: any;
4
+ getParentContext: any;
4
5
  }): import("react/jsx-runtime").JSX.Element;
5
6
  declare namespace RowDragDropHandle {
6
7
  namespace propTypes {
@@ -1 +1 @@
1
- {"version":3,"file":"RowDragDropHandle.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.jsx"],"names":[],"mappings":";AAIA;;4CAMC;;;;;;sBAVqB,YAAY"}
1
+ {"version":3,"file":"RowDragDropHandle.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.jsx"],"names":[],"mappings":";AAKA;;;4CAWC;;;;;;sBAhBqB,YAAY"}
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import PropTypes from 'prop-types';
3
- import { Icon, Flex } from '@pega/cosmos-react-core';
4
- function RowDragDropHandle({ getExecutionContext }) {
5
- return (_jsx(Flex, { item: true, ...getExecutionContext?.().getDragProps?.(), children: _jsx(Icon, { name: 'drag' }) }));
3
+ import { Icon, Button } from '@pega/cosmos-react-core';
4
+ import { ROW_DENSITY } from 'pega-repeating-structures-core';
5
+ function RowDragDropHandle({ getExecutionContext, getParentContext }) {
6
+ return (_jsx(Button, { variant: 'simple', compact: getParentContext().getRowDensity() === ROW_DENSITY.SHORT, icon: true, ...getExecutionContext?.().getDragProps?.(), children: _jsx(Icon, { name: 'drag' }) }));
6
7
  }
7
8
  RowDragDropHandle.propTypes = {
8
9
  getExecutionContext: PropTypes.func.isRequired
@@ -1 +1 @@
1
- {"version":3,"file":"RowDragDropHandle.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAErD,SAAS,iBAAiB,CAAC,EAAE,mBAAmB,EAAE;IAChD,OAAO,CACL,KAAC,IAAI,IAAC,IAAI,WAAK,mBAAmB,EAAE,EAAE,CAAC,YAAY,EAAE,EAAE,YACrD,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,GACf,CACR,CAAC;AACJ,CAAC;AAED,iBAAiB,CAAC,SAAS,GAAG;IAC5B,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAC/C,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import PropTypes from 'prop-types';\n\nimport { Icon, Flex } from '@pega/cosmos-react-core';\n\nfunction RowDragDropHandle({ getExecutionContext }) {\n return (\n <Flex item {...getExecutionContext?.().getDragProps?.()}>\n <Icon name='drag' />\n </Flex>\n );\n}\n\nRowDragDropHandle.propTypes = {\n getExecutionContext: PropTypes.func.isRequired\n};\n\nexport default RowDragDropHandle;\n"]}
1
+ {"version":3,"file":"RowDragDropHandle.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,SAAS,iBAAiB,CAAC,EAAE,mBAAmB,EAAE,gBAAgB,EAAE;IAClE,OAAO,CACL,KAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,OAAO,EAAE,gBAAgB,EAAE,CAAC,aAAa,EAAE,KAAK,WAAW,CAAC,KAAK,EACjE,IAAI,WACA,mBAAmB,EAAE,EAAE,CAAC,YAAY,EAAE,EAAE,YAE5C,KAAC,IAAI,IAAC,IAAI,EAAC,MAAM,GAAG,GACb,CACV,CAAC;AACJ,CAAC;AAED,iBAAiB,CAAC,SAAS,GAAG;IAC5B,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAC/C,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import PropTypes from 'prop-types';\n\nimport { Icon, Button } from '@pega/cosmos-react-core';\nimport { ROW_DENSITY } from 'pega-repeating-structures-core';\n\nfunction RowDragDropHandle({ getExecutionContext, getParentContext }) {\n return (\n <Button\n variant='simple'\n compact={getParentContext().getRowDensity() === ROW_DENSITY.SHORT}\n icon\n {...getExecutionContext?.().getDragProps?.()}\n >\n <Icon name='drag' />\n </Button>\n );\n}\n\nRowDragDropHandle.propTypes = {\n getExecutionContext: PropTypes.func.isRequired\n};\n\nexport default RowDragDropHandle;\n"]}
@@ -1,6 +1,7 @@
1
1
  export default RowError;
2
- declare function RowError({ getExecutionContext }: {
2
+ declare function RowError({ getExecutionContext, getParentContext }: {
3
3
  getExecutionContext: any;
4
+ getParentContext: any;
4
5
  }): import("react/jsx-runtime").JSX.Element | null;
5
6
  declare namespace RowError {
6
7
  namespace propTypes {
@@ -1 +1 @@
1
- {"version":3,"file":"RowError.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowError.jsx"],"names":[],"mappings":";AAIA;;mDAWC;;;;;;sBAfqB,YAAY"}
1
+ {"version":3,"file":"RowError.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowError.jsx"],"names":[],"mappings":";AAKA;;;mDAeC;;;;;;sBApBqB,YAAY"}
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import PropTypes from 'prop-types';
3
- import { Icon, Tooltip, Flex, useElement } from '@pega/cosmos-react-core';
4
- function RowError({ getExecutionContext }) {
3
+ import { Icon, Tooltip, useElement, Button } from '@pega/cosmos-react-core';
4
+ import { ROW_DENSITY } from 'pega-repeating-structures-core';
5
+ function RowError({ getExecutionContext, getParentContext }) {
5
6
  const [avatarEl, setAvatarEl] = useElement(null);
6
7
  const message = getExecutionContext().getRowError()?.message;
7
- return message ? (_jsxs(Flex, { children: [_jsx(Icon, { ref: setAvatarEl, name: 'warn-solid', "aria-label": message }), _jsx(Tooltip, { target: avatarEl, showDelay: 'none', hideDelay: 'none', describeTarget: false, children: getExecutionContext().getRowError()?.message })] })) : null;
8
+ return message ? (_jsxs(Button, { variant: 'simple', icon: true, compact: getParentContext().getRowDensity() === ROW_DENSITY.SHORT, children: [_jsx(Icon, { ref: setAvatarEl, name: 'warn-solid', "aria-label": message }), _jsx(Tooltip, { target: avatarEl, showDelay: 'none', hideDelay: 'none', describeTarget: false, children: getExecutionContext().getRowError()?.message })] })) : null;
8
9
  }
9
10
  RowError.propTypes = {
10
11
  getExecutionContext: PropTypes.func.isRequired
@@ -1 +1 @@
1
- {"version":3,"file":"RowError.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowError.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1E,SAAS,QAAQ,CAAC,EAAE,mBAAmB,EAAE;IACvC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,mBAAmB,EAAE,CAAC,WAAW,EAAE,EAAE,OAAO,CAAC;IAC7D,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAC,YAAY,gBAAa,OAAO,GAAI,EACjE,KAAC,OAAO,IAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,EAAC,cAAc,EAAE,KAAK,YAC/E,mBAAmB,EAAE,CAAC,WAAW,EAAE,EAAE,OAAO,GACrC,IACL,CACR,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,QAAQ,CAAC,SAAS,GAAG;IACnB,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAC/C,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import PropTypes from 'prop-types';\n\nimport { Icon, Tooltip, Flex, useElement } from '@pega/cosmos-react-core';\n\nfunction RowError({ getExecutionContext }) {\n const [avatarEl, setAvatarEl] = useElement(null);\n const message = getExecutionContext().getRowError()?.message;\n return message ? (\n <Flex>\n <Icon ref={setAvatarEl} name='warn-solid' aria-label={message} />\n <Tooltip target={avatarEl} showDelay='none' hideDelay='none' describeTarget={false}>\n {getExecutionContext().getRowError()?.message}\n </Tooltip>\n </Flex>\n ) : null;\n}\n\nRowError.propTypes = {\n getExecutionContext: PropTypes.func.isRequired\n};\n\nexport default RowError;\n"]}
1
+ {"version":3,"file":"RowError.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowError.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,SAAS,QAAQ,CAAC,EAAE,mBAAmB,EAAE,gBAAgB,EAAE;IACzD,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,mBAAmB,EAAE,CAAC,WAAW,EAAE,EAAE,OAAO,CAAC;IAC7D,OAAO,OAAO,CAAC,CAAC,CAAC,CACf,MAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,IAAI,QACJ,OAAO,EAAE,gBAAgB,EAAE,CAAC,aAAa,EAAE,KAAK,WAAW,CAAC,KAAK,aAEjE,KAAC,IAAI,IAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAC,YAAY,gBAAa,OAAO,GAAI,EACjE,KAAC,OAAO,IAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,EAAC,cAAc,EAAE,KAAK,YAC/E,mBAAmB,EAAE,CAAC,WAAW,EAAE,EAAE,OAAO,GACrC,IACH,CACV,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,QAAQ,CAAC,SAAS,GAAG;IACnB,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAC/C,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import PropTypes from 'prop-types';\n\nimport { Icon, Tooltip, useElement, Button } from '@pega/cosmos-react-core';\nimport { ROW_DENSITY } from 'pega-repeating-structures-core';\n\nfunction RowError({ getExecutionContext, getParentContext }) {\n const [avatarEl, setAvatarEl] = useElement(null);\n const message = getExecutionContext().getRowError()?.message;\n return message ? (\n <Button\n variant='simple'\n icon\n compact={getParentContext().getRowDensity() === ROW_DENSITY.SHORT}\n >\n <Icon ref={setAvatarEl} name='warn-solid' aria-label={message} />\n <Tooltip target={avatarEl} showDelay='none' hideDelay='none' describeTarget={false}>\n {getExecutionContext().getRowError()?.message}\n </Tooltip>\n </Button>\n ) : null;\n}\n\nRowError.propTypes = {\n getExecutionContext: PropTypes.func.isRequired\n};\n\nexport default RowError;\n"]}
@@ -1,6 +1,5 @@
1
1
  declare const _default: {
2
2
  Operator: typeof Operator;
3
- cellEditRenderer: typeof Editor;
4
3
  RowActionMenu: typeof RowActionMenu;
5
4
  RowDragDropHandle: typeof RowDragDropHandle;
6
5
  RowSelectHandle: import("react").MemoExoticComponent<{
@@ -40,7 +39,6 @@ declare const _default: {
40
39
  };
41
40
  export default _default;
42
41
  import Operator from './Operator';
43
- import Editor from './EditComponents';
44
42
  import RowActionMenu from './RowActionMenu';
45
43
  import RowDragDropHandle from './RowDragDropHandle';
46
44
  import RowError from './RowError';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAKqB,YAAY;mBAEd,kBAAkB;0BACX,iBAAiB;8BACb,qBAAqB;qBAG9B,YAAY;gCADD,uBAAuB;uBARhC,cAAc;qBAFhB,YAAY;uBACV,cAAc"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAKqB,YAAY;0BAEP,iBAAiB;8BACb,qBAAqB;qBAG9B,YAAY;gCADD,uBAAuB;uBAPhC,cAAc;qBAFhB,YAAY;uBACV,cAAc"}
@@ -5,7 +5,6 @@ import CustomCell from './CustomCell';
5
5
  import Link from './Link';
6
6
  import Operator from './Operator';
7
7
  import templates from './ColumnMergeTemplates';
8
- import Editor from './EditComponents';
9
8
  import RowActionMenu from './RowActionMenu';
10
9
  import RowDragDropHandle from './RowDragDropHandle';
11
10
  import RowSelectHandle from './RowSelectHandle';
@@ -19,7 +18,6 @@ export default {
19
18
  ...Link,
20
19
  ...templates,
21
20
  Operator,
22
- cellEditRenderer: Editor,
23
21
  RowActionMenu,
24
22
  RowDragDropHandle,
25
23
  RowSelectHandle,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/index.js"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,eAAe;IACb,YAAY,EAAE,IAAI;IAClB,kBAAkB,EAAE,UAAU;IAC9B,QAAQ;IACR,UAAU;IACV,GAAG,IAAI;IACP,GAAG,SAAS;IACZ,QAAQ;IACR,gBAAgB,EAAE,MAAM;IACxB,aAAa;IACb,iBAAiB;IACjB,eAAe;IACf,QAAQ;IACR,cAAc,EAAE,mBAAmB;CACpC,CAAC","sourcesContent":["import Cell from './Cell';\nimport RichText from './RichText';\nimport CheckCross from './CheckCross';\nimport CustomCell from './CustomCell';\nimport Link from './Link';\nimport Operator from './Operator';\nimport templates from './ColumnMergeTemplates';\nimport Editor from './EditComponents';\nimport RowActionMenu from './RowActionMenu';\nimport RowDragDropHandle from './RowDragDropHandle';\nimport RowSelectHandle from './RowSelectHandle';\nimport DefaultTextRenderer from './DefaultTextRenderer';\nimport RowError from './RowError';\n\nexport default {\n cellRenderer: Cell,\n customCellRenderer: CustomCell,\n RichText,\n CheckCross,\n ...Link,\n ...templates,\n Operator,\n cellEditRenderer: Editor,\n RowActionMenu,\n RowDragDropHandle,\n RowSelectHandle,\n RowError,\n 'Text-Default': DefaultTextRenderer\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/index.js"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,eAAe;IACb,YAAY,EAAE,IAAI;IAClB,kBAAkB,EAAE,UAAU;IAC9B,QAAQ;IACR,UAAU;IACV,GAAG,IAAI;IACP,GAAG,SAAS;IACZ,QAAQ;IACR,aAAa;IACb,iBAAiB;IACjB,eAAe;IACf,QAAQ;IACR,cAAc,EAAE,mBAAmB;CACpC,CAAC","sourcesContent":["import Cell from './Cell';\nimport RichText from './RichText';\nimport CheckCross from './CheckCross';\nimport CustomCell from './CustomCell';\nimport Link from './Link';\nimport Operator from './Operator';\nimport templates from './ColumnMergeTemplates';\nimport RowActionMenu from './RowActionMenu';\nimport RowDragDropHandle from './RowDragDropHandle';\nimport RowSelectHandle from './RowSelectHandle';\nimport DefaultTextRenderer from './DefaultTextRenderer';\nimport RowError from './RowError';\n\nexport default {\n cellRenderer: Cell,\n customCellRenderer: CustomCell,\n RichText,\n CheckCross,\n ...Link,\n ...templates,\n Operator,\n RowActionMenu,\n RowDragDropHandle,\n RowSelectHandle,\n RowError,\n 'Text-Default': DefaultTextRenderer\n};\n"]}
@@ -1,3 +1,7 @@
1
1
  export default EmptyContainer;
2
- declare function EmptyContainer(): import("react/jsx-runtime").JSX.Element;
2
+ declare function EmptyContainer({ message, shouldAnnounce, domContainer }: {
3
+ message: any;
4
+ shouldAnnounce: any;
5
+ domContainer: any;
6
+ }): import("react/jsx-runtime").JSX.Element;
3
7
  //# sourceMappingURL=EmptyContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAuBA,2EAWC"}
1
+ {"version":3,"file":"EmptyContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAuBA;;;;4CAqBC"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import styled from 'styled-components';
3
- import { defaultThemeProp, EmptyState } from '@pega/cosmos-react-core';
3
+ import { useEffect } from 'react';
4
+ import { defaultThemeProp, EmptyState, useLiveLog } from '@pega/cosmos-react-core';
4
5
  import TestIdConstants from '../TestIdConstants';
5
- import useTranslate from '../../Hooks/useTranslate';
6
6
  const EmptyContainerStyle = styled.div `
7
7
  position: absolute;
8
8
  display: flex;
@@ -17,9 +17,16 @@ const EmptyContainerStyle = styled.div `
17
17
  overflow: hidden;
18
18
  `;
19
19
  EmptyContainerStyle.defaultProps = defaultThemeProp;
20
- const EmptyContainer = () => {
21
- const [translate] = useTranslate();
22
- return (_jsx(EmptyContainerStyle, { "data-test-id": TestIdConstants.noRecords, "data-testid": TestIdConstants.noRecords, children: _jsx(EmptyState, { message: translate('No records found.') }) }));
20
+ const EmptyContainer = ({ message, shouldAnnounce, domContainer }) => {
21
+ const { announcePolite } = useLiveLog();
22
+ useEffect(() => {
23
+ if (shouldAnnounce &&
24
+ typeof document !== 'undefined' &&
25
+ domContainer?.contains(document.activeElement)) {
26
+ announcePolite({ message });
27
+ }
28
+ }, [shouldAnnounce, message, announcePolite, domContainer]);
29
+ return (_jsx(EmptyContainerStyle, { "data-test-id": TestIdConstants.noRecords, "data-testid": TestIdConstants.noRecords, children: _jsx(EmptyState, { message: message }) }));
23
30
  };
24
31
  export default EmptyContainer;
25
32
  //# sourceMappingURL=EmptyContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EmptyContainer.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAEpD,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;gBAUtB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;CAEtE,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEpD,MAAM,cAAc,GAAG,GAAG,EAAE;IAC1B,MAAM,CAAC,SAAS,CAAC,GAAG,YAAY,EAAE,CAAC;IAEnC,OAAO,CACL,KAAC,mBAAmB,oBACJ,eAAe,CAAC,SAAS,iBAC1B,eAAe,CAAC,SAAS,YAEtC,KAAC,UAAU,IAAC,OAAO,EAAE,SAAS,CAAC,mBAAmB,CAAC,GAAI,GACnC,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import styled from 'styled-components';\n\nimport { defaultThemeProp, EmptyState } from '@pega/cosmos-react-core';\n\nimport TestIdConstants from '../TestIdConstants';\nimport useTranslate from '../../Hooks/useTranslate';\n\nconst EmptyContainerStyle = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n top: var(--row-height, 0);\n left: 0;\n right: 0;\n bottom: 0;\n background: ${props => props.theme.base.palette['primary-background']};\n overflow: hidden;\n`;\n\nEmptyContainerStyle.defaultProps = defaultThemeProp;\n\nconst EmptyContainer = () => {\n const [translate] = useTranslate();\n\n return (\n <EmptyContainerStyle\n data-test-id={TestIdConstants.noRecords}\n data-testid={TestIdConstants.noRecords}\n >\n <EmptyState message={translate('No records found.')} />\n </EmptyContainerStyle>\n );\n};\n\nexport default EmptyContainer;\n"]}
1
+ {"version":3,"file":"EmptyContainer.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEnF,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;gBAUtB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;CAEtE,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEpD,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,EAAE;IACnE,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IAExC,SAAS,CAAC,GAAG,EAAE;QACb,IACE,cAAc;YACd,OAAO,QAAQ,KAAK,WAAW;YAC/B,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC9C,CAAC;YACD,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;IAE5D,OAAO,CACL,KAAC,mBAAmB,oBACJ,eAAe,CAAC,SAAS,iBAC1B,eAAe,CAAC,SAAS,YAEtC,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,GAAI,GACZ,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import styled from 'styled-components';\nimport { useEffect } from 'react';\n\nimport { defaultThemeProp, EmptyState, useLiveLog } from '@pega/cosmos-react-core';\n\nimport TestIdConstants from '../TestIdConstants';\n\nconst EmptyContainerStyle = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n top: var(--row-height, 0);\n left: 0;\n right: 0;\n bottom: 0;\n background: ${props => props.theme.base.palette['primary-background']};\n overflow: hidden;\n`;\n\nEmptyContainerStyle.defaultProps = defaultThemeProp;\n\nconst EmptyContainer = ({ message, shouldAnnounce, domContainer }) => {\n const { announcePolite } = useLiveLog();\n\n useEffect(() => {\n if (\n shouldAnnounce &&\n typeof document !== 'undefined' &&\n domContainer?.contains(document.activeElement)\n ) {\n announcePolite({ message });\n }\n }, [shouldAnnounce, message, announcePolite, domContainer]);\n\n return (\n <EmptyContainerStyle\n data-test-id={TestIdConstants.noRecords}\n data-testid={TestIdConstants.noRecords}\n >\n <EmptyState message={message} />\n </EmptyContainerStyle>\n );\n};\n\nexport default EmptyContainer;\n"]}
@@ -1,7 +1,8 @@
1
- declare function PersonalizationCreateEdit({ view, onFinish, editing }: {
1
+ declare function PersonalizationCreateEdit({ view, onFinish, editing, target }: {
2
2
  view: any;
3
3
  onFinish: any;
4
4
  editing?: boolean | undefined;
5
+ target: any;
5
6
  }): import("react/jsx-runtime").JSX.Element;
6
7
  declare namespace PersonalizationCreateEdit {
7
8
  namespace propTypes {
@@ -10,6 +11,7 @@ declare namespace PersonalizationCreateEdit {
10
11
  [x: string]: any;
11
12
  }>;
12
13
  let editing: PropTypes.Requireable<boolean>;
14
+ let target: PropTypes.Requireable<Element>;
13
15
  }
14
16
  namespace defaultProps {
15
17
  export function onFinish_1(): void;
@@ -19,6 +21,5 @@ declare namespace PersonalizationCreateEdit {
19
21
  }
20
22
  }
21
23
  export default PersonalizationCreateEdit;
22
- export const StyledModalContent: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
23
24
  import PropTypes from 'prop-types';
24
25
  //# sourceMappingURL=PersonalizationCreateEdit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PersonalizationCreateEdit.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":"AAgBA;;;;4CAoIC;;;;;;;;;;QASW,mCAAQ;;;;;;;AArJpB,kPAMG;sBAbmB,YAAY"}
1
+ {"version":3,"file":"PersonalizationCreateEdit.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":"AAOA;;;;;4CAqHC;;;;;;;;;;;QAUW,mCAAQ;;;;;;;sBArIE,YAAY"}
@@ -1,17 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useMemo, useRef } from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import styled, { css } from 'styled-components';
5
- import { Flex, Button, Input, Checkbox, Text } from '@pega/cosmos-react-core';
4
+ import { Flex, Input, Checkbox, FormDialog } from '@pega/cosmos-react-core';
6
5
  import useTranslate from '../../Hooks/useTranslate';
7
- export const StyledModalContent = styled(Flex)(() => {
8
- return css `
9
- position: relative;
10
- padding: 1.25rem;
11
- overflow: auto;
12
- `;
13
- });
14
- export default function PersonalizationCreateEdit({ view, onFinish, editing = false }) {
6
+ export default function PersonalizationCreateEdit({ view, onFinish, editing = false, target }) {
15
7
  const { state: { personalization }, meta: { nonPersonalizationViewName } } = view;
16
8
  const personalizationNames = useMemo(() => {
17
9
  const personalizations = personalization?.allPersonalizations || {};
@@ -32,17 +24,7 @@ export default function PersonalizationCreateEdit({ view, onFinish, editing = fa
32
24
  const viewAlreadyPresentError = translate('This view is already present.');
33
25
  const viewNameEmptyError = translate('This view name cannot be empty.');
34
26
  const viewNameMaxLengthError = translate('View name must contain less than 65 characters.');
35
- // markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false
36
- // but will be a no-op if undefined or null
37
- const [markAsDefault, setMarkAsDefault] = useState(() => {
38
- if (!editing) {
39
- return true;
40
- }
41
- if (editing && personalization.defaultPersonalization === personalization.active) {
42
- return true;
43
- }
44
- return null;
45
- });
27
+ const [markAsDefault, setMarkAsDefault] = useState(!!(editing && personalization.defaultPersonalization === personalization.active));
46
28
  useEffect(() => {
47
29
  if (viewName && viewName.toLowerCase() === nonPersonalizationViewName.toLowerCase()) {
48
30
  setError(defaultNameError);
@@ -79,21 +61,26 @@ export default function PersonalizationCreateEdit({ view, onFinish, editing = fa
79
61
  return;
80
62
  }
81
63
  if (editing) {
82
- view.type.editPersonalization(personalization.active, trimmedName, markAsDefault, isAppDefaultView);
64
+ view.type.editPersonalization(personalization.active, trimmedName,
65
+ // markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false
66
+ // but will be a no-op if undefined or null
67
+ markAsDefault || null, isAppDefaultView);
83
68
  }
84
69
  else {
85
- view.type.createPersonalization(trimmedName, markAsDefault);
70
+ // markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false
71
+ // but will be a no-op if undefined or null
72
+ view.type.createPersonalization(trimmedName, markAsDefault || null);
86
73
  }
87
74
  onFinish();
88
75
  return undefined;
89
76
  };
90
- const heading = editing ? translate('Edit view') : translate('Save view as..');
91
- return (_jsx(Flex, { as: StyledModalContent, container: { direction: 'column' }, item: { grow: 1 }, children: _jsxs(Flex, { container: { direction: 'column', itemGap: 2 }, children: [_jsx(Text, { variant: 'h2', className: 'modalHeader', children: heading }), _jsx(Input, { ref: viewNameRef, name: 'viewName', required: true, label: translate('View name'), autoComplete: 'off', status: error ? 'error' : null, info: error, value: viewName, onChange: onChange }), !(editing && isAppDefaultView) && (_jsx(Checkbox, { checked: markAsDefault, label: translate('Mark as default?'), required: false, disabled: false, onChange: () => setMarkAsDefault(curState => !curState) })), _jsxs(Flex, { container: { alignContent: 'center', justify: 'between' }, className: 'modalFooter', children: [_jsx(Button, { onClick: onFinish, children: translate('Cancel') }), _jsx("div", { children: _jsx(Button, { variant: 'primary', onClick: onSubmit, children: translate('Submit') }) })] })] }) }));
77
+ return (_jsx(FormDialog, { heading: translate(editing ? 'Edit customized view' : 'Add customized view'), onCancel: onFinish, onSubmit: onSubmit, target: target, children: _jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(Input, { ref: viewNameRef, name: 'viewName', required: true, label: translate('View name'), autoComplete: 'off', status: error ? 'error' : undefined, info: error, value: viewName, onChange: onChange }), !(editing && isAppDefaultView) && (_jsx(Checkbox, { checked: markAsDefault, label: translate('Always show this view first'), onChange: () => setMarkAsDefault(curState => !curState) }))] }) }));
92
78
  }
93
79
  PersonalizationCreateEdit.propTypes = {
94
80
  onFinish: PropTypes.func,
95
81
  view: PropTypes.objectOf(PropTypes.any).isRequired,
96
- editing: PropTypes.bool
82
+ editing: PropTypes.bool,
83
+ target: PropTypes.instanceOf(Element)
97
84
  };
98
85
  PersonalizationCreateEdit.defaultProps = {
99
86
  onFinish: () => { },