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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. package/README.md +1 -4
  2. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts +10 -5
  3. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts.map +1 -1
  4. package/lib/Core/Components/A11y/RepeatingStructureA11y.js +27 -2
  5. package/lib/Core/Components/A11y/RepeatingStructureA11y.js.map +1 -1
  6. package/lib/Core/Components/AggregateMenu.d.ts +1 -0
  7. package/lib/Core/Components/AggregateMenu.d.ts.map +1 -1
  8. package/lib/Core/Components/AggregateMenu.js +32 -18
  9. package/lib/Core/Components/AggregateMenu.js.map +1 -1
  10. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts +6 -15
  11. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts.map +1 -1
  12. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js +91 -163
  13. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js.map +1 -1
  14. package/lib/Core/Components/ContextMenu/QuickFilter.js +7 -7
  15. package/lib/Core/Components/ContextMenu/QuickFilter.js.map +1 -1
  16. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts +1 -1
  17. package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts.map +1 -1
  18. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts +2 -1
  19. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts.map +1 -1
  20. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +9 -21
  21. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -1
  22. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts +2 -1
  23. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts.map +1 -1
  24. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js +4 -3
  25. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js.map +1 -1
  26. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts +2 -1
  27. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts.map +1 -1
  28. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js +4 -3
  29. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js.map +1 -1
  30. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts +0 -2
  31. package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts.map +1 -1
  32. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js +0 -2
  33. package/lib/Core/Components/DefaultComponents/CellRenderers/index.js.map +1 -1
  34. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +5 -1
  35. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
  36. package/lib/Core/Components/DefaultComponents/EmptyContainer.js +12 -5
  37. package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -1
  38. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts +3 -2
  39. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts.map +1 -1
  40. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js +13 -26
  41. package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js.map +1 -1
  42. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js +2 -2
  43. package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js.map +1 -1
  44. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts +0 -2
  45. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts.map +1 -1
  46. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js +11 -9
  47. package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js.map +1 -1
  48. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.d.ts.map +1 -1
  49. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js +5 -0
  50. package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js.map +1 -1
  51. package/lib/Core/Components/DefaultComponents/index.d.ts +5 -3
  52. package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -1
  53. package/lib/Core/Components/DefaultComponents/index.js +0 -2
  54. package/lib/Core/Components/DefaultComponents/index.js.map +1 -1
  55. package/lib/Core/Components/Filters/CommonFilter.d.ts.map +1 -1
  56. package/lib/Core/Components/Filters/CommonFilter.js +2 -2
  57. package/lib/Core/Components/Filters/CommonFilter.js.map +1 -1
  58. package/lib/Core/Components/Filters/FilterType.js +5 -5
  59. package/lib/Core/Components/Filters/FilterType.js.map +1 -1
  60. package/lib/Core/Components/Filters/SelectFilter.d.ts.map +1 -1
  61. package/lib/Core/Components/Filters/SelectFilter.js +2 -2
  62. package/lib/Core/Components/Filters/SelectFilter.js.map +1 -1
  63. package/lib/Core/Components/Filters/styles.d.ts +1 -1
  64. package/lib/Core/Components/FooterAggregators.d.ts.map +1 -1
  65. package/lib/Core/Components/FooterAggregators.js +3 -2
  66. package/lib/Core/Components/FooterAggregators.js.map +1 -1
  67. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts +12 -0
  68. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts.map +1 -0
  69. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js +62 -0
  70. package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js.map +1 -0
  71. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts +33 -0
  72. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts.map +1 -0
  73. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js +106 -0
  74. package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js.map +1 -0
  75. package/lib/Core/Components/{GroupRenderer.d.ts → GroupRenderer/index.d.ts} +8 -1
  76. package/lib/Core/Components/GroupRenderer/index.d.ts.map +1 -0
  77. package/lib/Core/Components/GroupRenderer/index.js +367 -0
  78. package/lib/Core/Components/GroupRenderer/index.js.map +1 -0
  79. package/lib/Core/Components/Grouping/GroupingMenu.d.ts.map +1 -1
  80. package/lib/Core/Components/Grouping/GroupingMenu.js +6 -5
  81. package/lib/Core/Components/Grouping/GroupingMenu.js.map +1 -1
  82. package/lib/Core/Components/HeaderCell.d.ts.map +1 -1
  83. package/lib/Core/Components/HeaderCell.js +8 -5
  84. package/lib/Core/Components/HeaderCell.js.map +1 -1
  85. package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
  86. package/lib/Core/Components/HeaderMenu/actions.js +3 -3
  87. package/lib/Core/Components/HeaderMenu/actions.js.map +1 -1
  88. package/lib/Core/Components/HeaderMenu/index.d.ts.map +1 -1
  89. package/lib/Core/Components/HeaderMenu/index.js +2 -2
  90. package/lib/Core/Components/HeaderMenu/index.js.map +1 -1
  91. package/lib/Core/Components/NotificationManager.js +1 -1
  92. package/lib/Core/Components/NotificationManager.js.map +1 -1
  93. package/lib/Core/Components/RSWrapper/HeaderBarGadget.d.ts.map +1 -1
  94. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js +2 -1
  95. package/lib/Core/Components/RSWrapper/HeaderBarGadget.js.map +1 -1
  96. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts +1 -1
  97. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
  98. package/lib/Core/Components/RenderingEngine/RenderCell.js +2 -1
  99. package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -1
  100. package/lib/Core/Components/TestIdConstants.d.ts +1 -0
  101. package/lib/Core/Components/TestIdConstants.js +2 -1
  102. package/lib/Core/Components/TestIdConstants.js.map +1 -1
  103. package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
  104. package/lib/Core/Components/Toolbar/AdvanceToolbar.js +9 -33
  105. package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
  106. package/lib/Core/Components/Toolbar/AnnounceRowsCount.d.ts +1 -1
  107. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js +1 -1
  108. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js.map +1 -1
  109. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +20 -9
  110. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -1
  111. package/lib/Core/Components/Toolbar/ColumnSelector.js +89 -65
  112. package/lib/Core/Components/Toolbar/ColumnSelector.js.map +1 -1
  113. package/lib/Core/Components/Toolbar/DebugInfo.d.ts +3 -5
  114. package/lib/Core/Components/Toolbar/DebugInfo.d.ts.map +1 -1
  115. package/lib/Core/Components/Toolbar/DebugInfo.js +3 -3
  116. package/lib/Core/Components/Toolbar/DebugInfo.js.map +1 -1
  117. package/lib/Core/Components/Toolbar/FieldSelector.d.ts +1 -0
  118. package/lib/Core/Components/Toolbar/FieldSelector.d.ts.map +1 -1
  119. package/lib/Core/Components/Toolbar/FieldSelector.js +3 -2
  120. package/lib/Core/Components/Toolbar/FieldSelector.js.map +1 -1
  121. package/lib/Core/Components/Toolbar/Grouping.types.d.ts +0 -6
  122. package/lib/Core/Components/Toolbar/Grouping.types.d.ts.map +1 -1
  123. package/lib/Core/Components/Toolbar/Grouping.types.js.map +1 -1
  124. package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
  125. package/lib/Core/Components/Toolbar/SimpleToolbar.js +4 -3
  126. package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
  127. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts +14 -18
  128. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts.map +1 -1
  129. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js +15 -16
  130. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js.map +1 -1
  131. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts +2 -1
  132. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -1
  133. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +10 -7
  134. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js.map +1 -1
  135. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.d.ts.map +1 -1
  136. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js +6 -3
  137. package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js.map +1 -1
  138. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts +7 -2
  139. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts.map +1 -1
  140. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js +11 -3
  141. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js.map +1 -1
  142. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts +1 -1
  143. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts.map +1 -1
  144. package/lib/Core/Components/Toolbar/hooks/useMore.js +81 -79
  145. package/lib/Core/Components/Toolbar/hooks/useMore.js.map +1 -1
  146. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts +8 -6
  147. package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts.map +1 -1
  148. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js +18 -3
  149. package/lib/Core/Components/Toolbar/hooks/usePersonalization.js.map +1 -1
  150. package/lib/Core/Components/Toolbar/hooks/useSearch.d.ts.map +1 -1
  151. package/lib/Core/Components/Toolbar/hooks/useSearch.js +6 -9
  152. package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -1
  153. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts +4 -4
  154. package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts.map +1 -1
  155. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +6 -6
  156. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -1
  157. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts +2 -1
  158. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts.map +1 -1
  159. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js +8 -2
  160. package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js.map +1 -1
  161. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.d.ts.map +1 -1
  162. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js +2 -2
  163. package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js.map +1 -1
  164. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts +6 -0
  165. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts.map +1 -0
  166. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js +17 -0
  167. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js.map +1 -0
  168. package/lib/Core/Components/Toolbar/utils/utils.d.ts +1 -1
  169. package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
  170. package/lib/Core/Components/Toolbar/utils/utils.js +2 -1
  171. package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
  172. package/lib/Core/Components/Virtualise/Pagination.d.ts.map +1 -1
  173. package/lib/Core/Components/Virtualise/Pagination.js +2 -1
  174. package/lib/Core/Components/Virtualise/Pagination.js.map +1 -1
  175. package/lib/Core/Components/Virtualise/UseScroll.d.ts +4 -1
  176. package/lib/Core/Components/Virtualise/UseScroll.d.ts.map +1 -1
  177. package/lib/Core/Components/Virtualise/UseScroll.js +16 -3
  178. package/lib/Core/Components/Virtualise/UseScroll.js.map +1 -1
  179. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts +97 -0
  180. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts.map +1 -0
  181. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js +251 -0
  182. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -0
  183. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts +22 -0
  184. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts.map +1 -0
  185. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js +38 -0
  186. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js.map +1 -0
  187. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts +22 -0
  188. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts.map +1 -0
  189. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js +45 -0
  190. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js.map +1 -0
  191. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts +49 -0
  192. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -0
  193. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js +55 -0
  194. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -0
  195. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts +21 -0
  196. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts.map +1 -0
  197. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js +39 -0
  198. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js.map +1 -0
  199. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts +38 -0
  200. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts.map +1 -0
  201. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js +62 -0
  202. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js.map +1 -0
  203. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +112 -0
  204. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -0
  205. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +214 -0
  206. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -0
  207. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +21 -8
  208. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
  209. package/lib/Core/Components/Virtualise/index.js +21 -13
  210. package/lib/Core/Components/Virtualise/index.js.map +1 -1
  211. package/lib/Core/Components/Virtualise/utility.d.ts +1 -1
  212. package/lib/Core/Components/Virtualise/utility.d.ts.map +1 -1
  213. package/lib/Core/Components/Virtualise/utility.js +3 -2
  214. package/lib/Core/Components/Virtualise/utility.js.map +1 -1
  215. package/lib/Core/Context/LocalizationContext.d.ts +1 -1
  216. package/lib/Core/Context/LocalizationContext.d.ts.map +1 -1
  217. package/lib/Core/Context/LocalizationContext.js.map +1 -1
  218. package/lib/Core/Hooks/a11y/useAnnounce.d.ts +19 -0
  219. package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -0
  220. package/lib/Core/Hooks/a11y/useAnnounce.js +49 -0
  221. package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -0
  222. package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
  223. package/lib/Core/Hooks/useDragDrop.js +2 -0
  224. package/lib/Core/Hooks/useDragDrop.js.map +1 -1
  225. package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
  226. package/lib/Core/Hooks/useRepeat.js +20 -1
  227. package/lib/Core/Hooks/useRepeat.js.map +1 -1
  228. package/lib/Core/Localization/defaultTranslations.d.ts +16 -13
  229. package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
  230. package/lib/Core/Localization/defaultTranslations.js +17 -14
  231. package/lib/Core/Localization/defaultTranslations.js.map +1 -1
  232. package/lib/Core/Test/JUnitMocks.d.ts +6 -617
  233. package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
  234. package/lib/Core/Test/JUnitMocks.js +5 -4
  235. package/lib/Core/Test/JUnitMocks.js.map +1 -1
  236. package/lib/Core/Utils/index.d.ts +11 -0
  237. package/lib/Core/Utils/index.d.ts.map +1 -1
  238. package/lib/Core/Utils/index.js +22 -8
  239. package/lib/Core/Utils/index.js.map +1 -1
  240. package/lib/Core/Utils/styles.d.ts +2 -2
  241. package/lib/Core/Utils/styles.d.ts.map +1 -1
  242. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +4 -0
  243. package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -0
  244. package/lib/Core/Views/Gallery/Components/GalleryCard.js +18 -0
  245. package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -0
  246. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts +8 -0
  247. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -0
  248. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +25 -0
  249. package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -0
  250. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +8 -0
  251. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +1 -0
  252. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +8 -0
  253. package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +1 -0
  254. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +8 -0
  255. package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +1 -0
  256. package/lib/Core/Views/Gallery/Components/GalleryHeader.js +15 -0
  257. package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +1 -0
  258. package/lib/Core/Views/Gallery/Gallery.types.d.ts +8 -0
  259. package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -0
  260. package/lib/Core/Views/Gallery/Gallery.types.js +2 -0
  261. package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -0
  262. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts +13 -1
  263. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +1 -1
  264. package/lib/Core/Views/Gallery/StyledGalleryContainer.js +30 -40
  265. package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +1 -1
  266. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js +1 -1
  267. package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js.map +1 -1
  268. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts +9 -0
  269. package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +1 -0
  270. package/lib/Core/Views/Gallery/hooks/useRowActions.js +25 -0
  271. package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +1 -0
  272. package/lib/Core/Views/Gallery/index.d.ts +4 -8
  273. package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
  274. package/lib/Core/Views/Gallery/index.js +22 -62
  275. package/lib/Core/Views/Gallery/index.js.map +1 -1
  276. package/lib/Core/Views/Gallery/utils.d.ts +36 -0
  277. package/lib/Core/Views/Gallery/utils.d.ts.map +1 -0
  278. package/lib/Core/Views/Gallery/utils.js +91 -0
  279. package/lib/Core/Views/Gallery/utils.js.map +1 -0
  280. package/lib/Core/Views/Map/Map.styles.d.ts +190 -6
  281. package/lib/Core/Views/Map/Map.styles.d.ts.map +1 -1
  282. package/lib/Core/Views/Map/Map.styles.js.map +1 -1
  283. package/lib/Core/Views/Map/index.d.ts.map +1 -1
  284. package/lib/Core/Views/Map/index.js +10 -4
  285. package/lib/Core/Views/Map/index.js.map +1 -1
  286. package/lib/Core/Views/RsCardWrapper.js.map +1 -1
  287. package/lib/Core/Views/Table/CellWrapper.d.ts +1 -1
  288. package/lib/Core/Views/Table/CellWrapper.d.ts.map +1 -1
  289. package/lib/Core/Views/Table/CellWrapper.js +4 -2
  290. package/lib/Core/Views/Table/CellWrapper.js.map +1 -1
  291. package/lib/Core/Views/Table/HeaderWrapper.d.ts.map +1 -1
  292. package/lib/Core/Views/Table/HeaderWrapper.js +5 -5
  293. package/lib/Core/Views/Table/HeaderWrapper.js.map +1 -1
  294. package/lib/Core/Views/Table/Row.d.ts +3 -1
  295. package/lib/Core/Views/Table/Row.d.ts.map +1 -1
  296. package/lib/Core/Views/Table/Row.js +5 -3
  297. package/lib/Core/Views/Table/Row.js.map +1 -1
  298. package/lib/Core/Views/Table/SkeletonRows.d.ts +1 -1
  299. package/lib/Core/Views/Table/SkeletonRows.d.ts.map +1 -1
  300. package/lib/Core/Views/Table/StyledTableContainer.d.ts +3 -1
  301. package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
  302. package/lib/Core/Views/Table/StyledTableContainer.js +269 -158
  303. package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
  304. package/lib/Core/Views/Table/TableA11y.d.ts +11 -0
  305. package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -1
  306. package/lib/Core/Views/Table/TableA11y.js +207 -2
  307. package/lib/Core/Views/Table/TableA11y.js.map +1 -1
  308. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +5 -1
  309. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
  310. package/lib/Core/Views/Table/VirtualizeWrapper.js +38 -15
  311. package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
  312. package/lib/Core/Views/Table/index.d.ts.map +1 -1
  313. package/lib/Core/Views/Table/index.js +6 -4
  314. package/lib/Core/Views/Table/index.js.map +1 -1
  315. package/lib/Core/Views/Table/useCountChange.d.ts +10 -0
  316. package/lib/Core/Views/Table/useCountChange.d.ts.map +1 -0
  317. package/lib/Core/Views/Table/useCountChange.js +39 -0
  318. package/lib/Core/Views/Table/useCountChange.js.map +1 -0
  319. package/lib/Core/Views/Timeline/Timeline.d.ts +5 -0
  320. package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -0
  321. package/lib/Core/Views/Timeline/Timeline.js +28 -0
  322. package/lib/Core/Views/Timeline/Timeline.js.map +1 -0
  323. package/lib/Core/Views/Timeline/Timeline.styles.d.ts +393 -0
  324. package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -0
  325. package/lib/Core/Views/Timeline/Timeline.styles.js +175 -0
  326. package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -0
  327. package/lib/Core/Views/Timeline/Timeline.types.d.ts +48 -0
  328. package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -0
  329. package/lib/Core/Views/Timeline/Timeline.types.js +2 -0
  330. package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -0
  331. package/lib/Core/Views/Timeline/TimelineItem.d.ts +12 -0
  332. package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -0
  333. package/lib/Core/Views/Timeline/TimelineItem.js +43 -0
  334. package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -0
  335. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +4 -0
  336. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -0
  337. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js +141 -0
  338. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -0
  339. package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
  340. package/lib/Core/Views/Timeline/index.js +14 -8
  341. package/lib/Core/Views/Timeline/index.js.map +1 -1
  342. package/lib/Core/Views/Timeline/utils.d.ts +10 -0
  343. package/lib/Core/Views/Timeline/utils.d.ts.map +1 -0
  344. package/lib/Core/Views/Timeline/utils.js +144 -0
  345. package/lib/Core/Views/Timeline/utils.js.map +1 -0
  346. package/lib/Core/Views/rs-styles.d.ts +1 -1
  347. package/lib/Core/constants.d.ts.map +1 -1
  348. package/lib/Core/constants.js +1 -0
  349. package/lib/Core/constants.js.map +1 -1
  350. package/lib/Core/templateFeatureSupport.d.ts +17 -0
  351. package/lib/Core/templateFeatureSupport.d.ts.map +1 -0
  352. package/lib/Core/templateFeatureSupport.js +30 -0
  353. package/lib/Core/templateFeatureSupport.js.map +1 -0
  354. package/lib/types.d.ts +2 -0
  355. package/lib/types.d.ts.map +1 -1
  356. package/lib/types.js.map +1 -1
  357. package/package.json +11 -12
  358. package/lib/Core/Components/DefaultComponents/CardItem.d.ts +0 -3
  359. package/lib/Core/Components/DefaultComponents/CardItem.d.ts.map +0 -1
  360. package/lib/Core/Components/DefaultComponents/CardItem.js +0 -78
  361. package/lib/Core/Components/DefaultComponents/CardItem.js.map +0 -1
  362. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts +0 -12
  363. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +0 -1
  364. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +0 -35
  365. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +0 -1
  366. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts +0 -15
  367. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +0 -1
  368. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +0 -49
  369. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +0 -1
  370. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts +0 -12
  371. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map +0 -1
  372. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js +0 -44
  373. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js.map +0 -1
  374. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts +0 -16
  375. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +0 -1
  376. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +0 -63
  377. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +0 -1
  378. package/lib/Core/Components/EmptyContainer.d.ts +0 -5
  379. package/lib/Core/Components/EmptyContainer.d.ts.map +0 -1
  380. package/lib/Core/Components/EmptyContainer.js +0 -12
  381. package/lib/Core/Components/EmptyContainer.js.map +0 -1
  382. package/lib/Core/Components/GroupRenderer.d.ts.map +0 -1
  383. package/lib/Core/Components/GroupRenderer.js +0 -240
  384. package/lib/Core/Components/GroupRenderer.js.map +0 -1
  385. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts +0 -6
  386. package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts.map +0 -1
  387. package/lib/Core/Components/Toolbar/KeyboardInstructions.js +0 -32
  388. package/lib/Core/Components/Toolbar/KeyboardInstructions.js.map +0 -1
  389. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +0 -8
  390. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +0 -1
  391. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +0 -61
  392. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +0 -1
  393. package/lib/Core/Hooks/useSelect.d.ts +0 -9
  394. package/lib/Core/Hooks/useSelect.d.ts.map +0 -1
  395. package/lib/Core/Hooks/useSelect.js +0 -24
  396. package/lib/Core/Hooks/useSelect.js.map +0 -1
  397. package/lib/Core/Views/Gallery/ItemWrapper.d.ts +0 -19
  398. package/lib/Core/Views/Gallery/ItemWrapper.d.ts.map +0 -1
  399. package/lib/Core/Views/Gallery/ItemWrapper.js +0 -34
  400. package/lib/Core/Views/Gallery/ItemWrapper.js.map +0 -1
  401. package/lib/Core/Views/Timeline/utility.d.ts +0 -8
  402. package/lib/Core/Views/Timeline/utility.d.ts.map +0 -1
  403. package/lib/Core/Views/Timeline/utility.js +0 -120
  404. package/lib/Core/Views/Timeline/utility.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAGjF,oDAAoD;AACpD,aAAa;AACb,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,UAAU,MAAM,6CAA6C,CAAC;AACrE,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,mCAAmC,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjG,OAAO,WAAW,EAAE,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1D,OAAO,GAAG,CAAA;;0BAEc,KAAK,CAAC,IAAI,CAAC,OAAO;;GAEzC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAO/C,MAAM,uBAAuB,GAAG,MAAM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ACX,IACG,GACZ,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { useEffect, useCallback, useMemo, useState, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Timeline as TimelineCosmos } from '@pega/cosmos-react-work';\nimport { defaultThemeProp, useFullscreenContext } from '@pega/cosmos-react-core';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\n// TODO remove ts-ignore once Toolbar migrated to TS\n// @ts-ignore\nimport Toolbar from '../../Components/Toolbar';\nimport EmptyContainer from '../../Components/EmptyContainer';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport getCount from '../../Components/Toolbar/utils/getCount';\nimport { EXTERNAL_FILTERS } from '../../constants';\nimport RsCardWrapper from '../RsCardWrapper';\nimport { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';\n\nimport getActivity, { mapDateFnToGroupOption } from './utility';\n\nconst StyledTimeline = styled(TimelineCosmos)(({ theme }) => {\n return css`\n flex: 1;\n padding-inline-end: ${theme.base.spacing};\n overflow: auto;\n `;\n});\n\nStyledTimeline.defaultProps = defaultThemeProp;\n\ninterface StyledTimelineContainerProps {\n view: RsCoreTypes.View;\n isFullscreen: boolean;\n}\n\nconst StyledTimelineContainer = styled.div<StyledTimelineContainerProps>(\n ({ view, isFullscreen }) => {\n return css`\n position: relative;\n ${() => generateRSHeightStyles({ view, isFullscreen })}\n `;\n }\n);\n\ninterface StyledRowContainerProps {\n isFullscreen: boolean;\n view: RsCoreTypes.View;\n}\n\nconst StyledRowContainer = styled.div<StyledRowContainerProps>(({ isFullscreen, view }) => {\n const {\n bodyHeight,\n totalItemCount,\n meta: { basicMode }\n } = view;\n return css`\n ${() => generateRSDataContainerHeightStyles()};\n position: relative;\n min-height: ${basicMode && totalItemCount === 0 ? '100px' : 'auto'};\n flex-grow: 0;\n\n /* Adjust height based on number of rows configured */\n height: ${bodyHeight && !isFullscreen ? `${bodyHeight}px` : 'auto'};\n `;\n});\n\nconst INITIAL_DEFAULT_CHUNK_SIZE = 40;\nconst APPEND_DEFAULT_CHUNK_SIZE = 25;\n\nexport interface TimelineViewProps {\n view: RsCoreTypes.View;\n}\nconst Timeline = ({ view }: TimelineViewProps) => {\n const isFullscreen = !!useFullscreenContext()?.[0];\n const {\n rows,\n meta = { fieldDefs: [] as RsCoreTypes.FieldDef[], itemKey: '' } as RsCoreTypes.Meta,\n columns,\n groupHeaders,\n state\n } = view;\n const ref = useRef<HTMLTableElement>(null);\n const [loading, setLoading] = useState(false);\n const [hasMore, setHasMore] = useState(true);\n\n const count = getCount({ view });\n const visibleGroupHeaders = groupHeaders?.filter(({ isVisible }) => isVisible)?.length ?? 0;\n const paginationEndIndex = state.paginationOptions?.rootVirtualiser?.endIndex ?? 0;\n\n const onLoadMore = useCallback(() => {\n if (!loading) {\n setLoading(true);\n const endIndex =\n rows!.length + visibleGroupHeaders + (meta.numberOfRows || APPEND_DEFAULT_CHUNK_SIZE);\n view.type.onPaginate({ startIndex: 0, endIndex, id: 'rootVirtualiser' });\n }\n }, [loading, view.type, meta.numberOfRows, rows!.length, visibleGroupHeaders]);\n\n useEffect(() => {\n view.type.onPaginate({\n startIndex: 0,\n endIndex: meta.numberOfRows || INITIAL_DEFAULT_CHUNK_SIZE,\n id: 'rootVirtualiser'\n });\n }, [view.type, meta.numberOfRows]);\n\n useEffect(() => {\n setHasMore(rows!.length !== count.total);\n if (paginationEndIndex <= rows!.length + visibleGroupHeaders || rows!.length === count.total) {\n setLoading(false);\n }\n }, [count.total, rows!.length, paginationEndIndex, visibleGroupHeaders]);\n\n const activity = useMemo(() => getActivity(rows, columns, meta), [rows, columns, meta]);\n\n let loadMore;\n if (hasMore) {\n loadMore = onLoadMore;\n }\n\n return (\n <RsCardWrapper>\n <StyledTimelineContainer view={view} isFullscreen={isFullscreen}>\n <Toolbar view={view} />\n <RenderView view={view} type={EXTERNAL_FILTERS} />\n\n <StyledRowContainer\n className='container row-container'\n isFullscreen={isFullscreen}\n view={view}\n >\n <StyledTimeline\n activity={activity || []}\n currentTime={new Date()}\n groupBy={mapDateFnToGroupOption(view.state.groups?.[0]?.dateFunction)}\n loading={loading || !rows || !!view.isLoading}\n loadMore={loadMore}\n data-test-id='Timeline'\n ref={ref}\n />\n <EmptyContainer view={view} />\n </StyledRowContainer>\n </StyledTimelineContainer>\n </RsCardWrapper>\n );\n};\n\nexport default Timeline;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAGjF,oDAAoD;AACpD,aAAa;AACb,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,UAAU,MAAM,6CAA6C,CAAC;AACrE,OAAO,QAAQ,MAAM,yCAAyC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,mCAAmC,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjG,OAAO,cAAc,MAAM,mDAAmD,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAEpD,OAAO,aAAa,MAAM,YAAY,CAAC;AACvC,OAAO,aAAa,MAAM,SAAS,CAAC;AAEpC,MAAM,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,OAAO,GAAG,CAAA;;0BAEc,KAAK,CAAC,IAAI,CAAC,OAAO;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AAU,EACtB,WAAW,EAAE,IAAI,IAAI,EAAE,EACvB,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EACpB,OAAO,EAAE,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,EAC7C,QAAQ,EAAE,QAAQ,kBACL,UAAU,EACvB,GAAG,EAAE,GAAG,GACR,EACD,YAAY,IAAI,YAAY,IAAI,CAC/B,KAAC,cAAc,IACb,OAAO,EACL,eAAe,CACb,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,EAAE,EAC/C,IAAI,CAAC,eAAe,CACrB;gCACC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC;gCAC/B,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,EAE7B,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,KAAK,GACrB,CACH,IACkB,IACG,GACZ,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { useEffect, useCallback, useMemo, useState, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, useFullscreenContext } from '@pega/cosmos-react-core';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\n// TODO remove ts-ignore once Toolbar migrated to TS\n// @ts-ignore\nimport Toolbar from '../../Components/Toolbar';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport getCount from '../../Components/Toolbar/utils/getCount';\nimport { EXTERNAL_FILTERS } from '../../constants';\nimport RsCardWrapper from '../RsCardWrapper';\nimport { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';\nimport EmptyContainer from '../../Components/DefaultComponents/EmptyContainer';\nimport { isFilterApplied } from '../../Utils';\nimport useTranslate from '../../Hooks/useTranslate';\n\nimport TimelineInner from './Timeline';\nimport getActivities from './utils';\n\nconst StyledTimeline = styled(TimelineInner)(({ theme }) => {\n return css`\n flex: 1;\n padding-inline-end: ${theme.base.spacing};\n overflow: auto;\n `;\n});\n\nStyledTimeline.defaultProps = defaultThemeProp;\n\ninterface StyledTimelineContainerProps {\n view: RsCoreTypes.View;\n isFullscreen: boolean;\n}\n\nconst StyledTimelineContainer = styled.div<StyledTimelineContainerProps>(\n ({ view, isFullscreen }) => {\n return css`\n position: relative;\n ${() => generateRSHeightStyles({ view, isFullscreen })}\n `;\n }\n);\n\ninterface StyledRowContainerProps {\n isFullscreen: boolean;\n view: RsCoreTypes.View;\n}\n\nconst StyledRowContainer = styled.div<StyledRowContainerProps>(({ isFullscreen, view }) => {\n const {\n bodyHeight,\n totalItemCount,\n meta: { basicMode }\n } = view;\n return css`\n ${() => generateRSDataContainerHeightStyles()};\n position: relative;\n min-height: ${basicMode && totalItemCount === 0 ? '100px' : 'auto'};\n flex-grow: 0;\n\n /* Adjust height based on number of rows configured */\n height: ${bodyHeight && !isFullscreen ? `${bodyHeight}px` : 'auto'};\n `;\n});\n\nconst INITIAL_DEFAULT_CHUNK_SIZE = 40;\nconst APPEND_DEFAULT_CHUNK_SIZE = 25;\n\nexport interface TimelineViewProps {\n view: RsCoreTypes.View;\n}\n\nconst Timeline = ({ view }: TimelineViewProps) => {\n const isFullscreen = !!useFullscreenContext()?.[0];\n const [translate] = useTranslate();\n const {\n rows,\n meta = { fieldDefs: [] as RsCoreTypes.FieldDef[], itemKey: '' } as RsCoreTypes.Meta,\n columns,\n groupHeaders,\n state,\n domContainer,\n hasNoRecords\n } = view;\n const { filterExpression, externalState, searchText, paginationOptions, groups } = state;\n const ref = useRef<HTMLTableElement>(null);\n const [loading, setLoading] = useState(false);\n const [hasMore, setHasMore] = useState(true);\n\n const count = getCount({ view });\n const visibleGroupHeaders = groupHeaders?.filter(({ isVisible }) => isVisible)?.length ?? 0;\n const paginationEndIndex = paginationOptions?.rootVirtualiser?.endIndex ?? 0;\n\n const onLoadMore = useCallback(() => {\n if (!loading) {\n setLoading(true);\n const endIndex =\n rows!.length + visibleGroupHeaders + (meta.numberOfRows || APPEND_DEFAULT_CHUNK_SIZE);\n view.type.onPaginate({ startIndex: 0, endIndex, id: 'rootVirtualiser' });\n }\n }, [loading, view.type, meta.numberOfRows, rows!.length, visibleGroupHeaders]);\n\n useEffect(() => {\n view.type.onPaginate({\n startIndex: 0,\n endIndex: meta.numberOfRows || INITIAL_DEFAULT_CHUNK_SIZE,\n id: 'rootVirtualiser'\n });\n }, [view.type, meta.numberOfRows]);\n\n useEffect(() => {\n setHasMore(rows!.length !== count.total);\n if (paginationEndIndex <= rows!.length + visibleGroupHeaders || rows!.length === count.total) {\n setLoading(false);\n }\n }, [count.total, rows!.length, paginationEndIndex, visibleGroupHeaders]);\n\n const activities = useMemo(\n () => getActivities(groupHeaders, columns, meta, groups?.[0]),\n [groupHeaders, columns, meta, groups?.[0]]\n );\n\n let loadMore;\n if (hasMore) {\n loadMore = onLoadMore;\n }\n\n return (\n <RsCardWrapper>\n <StyledTimelineContainer view={view} isFullscreen={isFullscreen}>\n <Toolbar view={view} />\n <RenderView view={view} type={EXTERNAL_FILTERS} />\n\n <StyledRowContainer\n className='container row-container'\n isFullscreen={isFullscreen}\n view={view}\n >\n <StyledTimeline\n activities={activities}\n currentTime={new Date()}\n groupBy={groups?.[0]}\n loading={loading || !rows || !!view.isLoading}\n loadMore={loadMore}\n data-test-id='Timeline'\n ref={ref}\n />\n {domContainer && hasNoRecords && (\n <EmptyContainer\n message={\n isFilterApplied(\n { filterExpression, searchText, externalState },\n meta.externalFilters\n )\n ? translate('No records found')\n : translate('No records')\n }\n domContainer={domContainer}\n shouldAnnounce={false}\n />\n )}\n </StyledRowContainer>\n </StyledTimelineContainer>\n </RsCardWrapper>\n );\n};\n\nexport default Timeline;\n"]}
@@ -0,0 +1,10 @@
1
+ import type { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';
2
+ import type { RsCoreTypes } from 'pega-repeating-structures-core';
3
+ import type { Group } from 'pega-repeating-structures-core/lib/types/State.types';
4
+ import type TimelineProps from './Timeline.types';
5
+ export declare const dateDisplayVariants: Partial<Record<NonNullable<Group['dateFunction']>, DateTimeVariant>>;
6
+ declare const getActivities: (groupHeaders: RsCoreTypes.View["groupHeaders"], columns: RsCoreTypes.View["columns"], { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View["meta"], groupBy?: Group) => TimelineProps["activities"];
7
+ export default getActivities;
8
+ export declare function calculateBodyMaxHeight(maxHeight: string | number | undefined, domContainer: HTMLElement | undefined, pContainer: HTMLElement | null | undefined): string | undefined;
9
+ export declare function isFutureDate(date: string | number | Date | undefined, current: Date): boolean;
10
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utils.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gEAAgE,CAAC;AAGtG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAMlF,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAmDlD,eAAO,MAAM,mBAAmB,EAAE,OAAO,CACvC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,eAAe,CAAC,CAS5D,CAAC;AAqCF,QAAA,MAAM,aAAa,GACjB,cAAc,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,EAC9C,SAAS,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EACpC,gDAAgD,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EACxE,UAAU,KAAK,KACd,aAAa,CAAC,YAAY,CA2D5B,CAAC;AAEF,eAAe,aAAa,CAAC;AAE7B,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EACtC,YAAY,EAAE,WAAW,GAAG,SAAS,EACrC,UAAU,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,sBAc3C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CAG7F"}
@@ -0,0 +1,144 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import dayjs from 'dayjs';
3
+ import timezonePlugin from 'dayjs/plugin/timezone';
4
+ import { DateTimeDisplay, NoValue, parseToDate } from '@pega/cosmos-react-core';
5
+ import { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';
6
+ import RenderingEngine from '../../Components/RenderingEngine/RenderCell';
7
+ import ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';
8
+ dayjs.extend(timezonePlugin);
9
+ const getStatusVariant = (data) => {
10
+ let variant;
11
+ const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];
12
+ const infoStrings = ['open', 'hold', 'info', 'new'];
13
+ const successStrings = ['resolved', 'completed', 'success'];
14
+ const pendingStrings = ['pending'];
15
+ if (new RegExp(warnStrings.join('|'), 'i').test(data)) {
16
+ variant = 'warn';
17
+ }
18
+ else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {
19
+ variant = 'info';
20
+ }
21
+ else if (new RegExp(successStrings.join('|'), 'i').test(data)) {
22
+ variant = 'success';
23
+ }
24
+ else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {
25
+ variant = 'pending';
26
+ }
27
+ else {
28
+ variant = 'info';
29
+ }
30
+ return variant;
31
+ };
32
+ const getFieldsAsActivityContent = (columns, row) => {
33
+ return columns
34
+ ?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)
35
+ ?.map(column => {
36
+ return {
37
+ id: column.field.id,
38
+ name: column.field.label,
39
+ value: _jsx(ValueRenderer, { column: column, row: row })
40
+ };
41
+ });
42
+ };
43
+ const convertDateToTimezone = (value, timezone) => {
44
+ return (dayjs(value)
45
+ .tz(timezone)
46
+ // cSpell:disable-next-line
47
+ .format('YYYY-MM-DDTHH:mm:ss'));
48
+ };
49
+ export const dateDisplayVariants = {
50
+ YEARS: 'year',
51
+ QUARTERS: 'quarteryear',
52
+ MONTHS: 'monthyear',
53
+ WEEKS: 'week',
54
+ DAYS: 'date',
55
+ HOURS: 'datetime',
56
+ MINUTES: 'datetime'
57
+ };
58
+ const renderHeader = (header, groupBy, groupByColumn) => {
59
+ if (!groupByColumn || !header.name) {
60
+ return _jsx(NoValue, {});
61
+ }
62
+ if (groupBy?.dateFunction && typeof header.name !== 'boolean') {
63
+ return (_jsx(DateTimeDisplay, { variant: dateDisplayVariants[groupBy.dateFunction] ?? 'datetime', format: 'long', value: header.name }));
64
+ }
65
+ groupByColumn.setExecutionContext(null);
66
+ return (_jsx(RenderingEngine, { ...groupByColumn.getRenderingEngineProps(), context: {
67
+ getValue: () => header.name,
68
+ getExecutionContext: () => ({
69
+ getValue: () => header.data,
70
+ name: 'groupHeader'
71
+ })
72
+ } }));
73
+ };
74
+ const getActivities = (groupHeaders, columns, { timelineFields, timezone, defaultRowHeight }, groupBy) => {
75
+ const { title, date, status: statusProp, icon, content } = timelineFields ?? {};
76
+ const titleColumn = columns?.find(({ field }) => field.name === title?.name);
77
+ const dateColumn = columns?.find(({ field }) => field.name === date?.name);
78
+ const contentColumn = columns?.find(({ field }) => field.name === content?.name);
79
+ const groupByColumn = columns?.find(({ field }) => field.id === groupBy?.columnId);
80
+ return (groupHeaders ?? [])
81
+ .map(header => {
82
+ return {
83
+ header: renderHeader(header, groupBy, groupByColumn),
84
+ activity: (header.getRows() ?? [])
85
+ .map(row => {
86
+ const data = row.getContext().getValue();
87
+ const dateValue = date?.name ? data[date.name] : undefined;
88
+ const dateFieldType = dateColumn?.field?.type;
89
+ const isDateOnlyFieldType = dateFieldType === FieldType.DATE ||
90
+ dateFieldType === FieldType.DATE_ONLY ||
91
+ dateFieldType === FieldType.DATE_TIMELINE;
92
+ // Activity Object date can't be undefined
93
+ if (!dateValue) {
94
+ return undefined;
95
+ }
96
+ const statusData = statusProp?.name ? data[statusProp.name] : undefined;
97
+ const status = statusData
98
+ ? {
99
+ variant: getStatusVariant(statusData),
100
+ children: statusData
101
+ }
102
+ : undefined;
103
+ const activity = {
104
+ id: row.key,
105
+ title: title?.name && data[title.name] && titleColumn ? (_jsx(ValueRenderer, { column: titleColumn, row: row })) : (_jsx(NoValue, {})),
106
+ date: timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone
107
+ ? convertDateToTimezone(dateValue, timezone)
108
+ : dateValue,
109
+ dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',
110
+ icon: icon?.name ? data[icon.name] : undefined,
111
+ defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,
112
+ content: contentColumn ? (_jsx(ValueRenderer, { column: contentColumn, row: row })) : (getFieldsAsActivityContent(columns, row)),
113
+ status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status
114
+ };
115
+ return activity;
116
+ })
117
+ ?.filter((item) => !!item)
118
+ };
119
+ })
120
+ .filter(({ activity }) => activity.length > 0);
121
+ };
122
+ export default getActivities;
123
+ export function calculateBodyMaxHeight(maxHeight, domContainer, pContainer) {
124
+ if (maxHeight === undefined)
125
+ return;
126
+ if (!domContainer || !pContainer)
127
+ return;
128
+ const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;
129
+ if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {
130
+ // Means it is a css variable which is a string, and it needs to be computed with calc function
131
+ // If css variable is not defined then fallback to default max height i.e. 550px
132
+ const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;
133
+ return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;
134
+ }
135
+ if (typeof maxHeight === 'number') {
136
+ return `${maxHeight - extraHeight - 32}px`;
137
+ }
138
+ }
139
+ export function isFutureDate(date, current) {
140
+ if (!date || !current)
141
+ return false;
142
+ return parseToDate(date).getTime() > current.getTime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AAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport timezonePlugin from 'dayjs/plugin/timezone';\nimport type { ReactText } from 'react';\n\nimport type { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';\nimport { DateTimeDisplay, NoValue, parseToDate } from '@pega/cosmos-react-core';\nimport type { FieldValueListProps, StatusProps } from '@pega/cosmos-react-core';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';\nimport type { Group } from 'pega-repeating-structures-core/lib/types/State.types';\n\nimport RenderingEngine from '../../Components/RenderingEngine/RenderCell';\nimport ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';\n\nimport type { ActivityObject } from './Timeline.types';\nimport type TimelineProps from './Timeline.types';\n\ndayjs.extend(timezonePlugin);\nconst getStatusVariant = (data: string): StatusProps['variant'] => {\n let variant: StatusProps['variant'];\n const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];\n const infoStrings = ['open', 'hold', 'info', 'new'];\n const successStrings = ['resolved', 'completed', 'success'];\n const pendingStrings = ['pending'];\n\n if (new RegExp(warnStrings.join('|'), 'i').test(data)) {\n variant = 'warn';\n } else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {\n variant = 'info';\n } else if (new RegExp(successStrings.join('|'), 'i').test(data)) {\n variant = 'success';\n } else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {\n variant = 'pending';\n } else {\n variant = 'info';\n }\n return variant;\n};\n\nconst getFieldsAsActivityContent = (\n columns: RsCoreTypes.View['columns'],\n row: RsCoreTypes.Row\n): FieldValueListProps['fields'] | undefined => {\n return columns\n ?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)\n ?.map(column => {\n return {\n id: column.field.id,\n name: column.field.label,\n value: <ValueRenderer column={column} row={row} />\n };\n });\n};\n\nconst convertDateToTimezone = (\n value: string | number | Date,\n timezone: RsCoreTypes.Meta['timezone']\n): string => {\n return (\n dayjs(value)\n .tz(timezone)\n // cSpell:disable-next-line\n .format('YYYY-MM-DDTHH:mm:ss')\n );\n};\n\nexport const dateDisplayVariants: Partial<\n Record<NonNullable<Group['dateFunction']>, DateTimeVariant>\n> = {\n YEARS: 'year',\n QUARTERS: 'quarteryear',\n MONTHS: 'monthyear',\n WEEKS: 'week',\n DAYS: 'date',\n HOURS: 'datetime',\n MINUTES: 'datetime'\n};\n\nconst renderHeader = (\n header: RsCoreTypes.GroupGenerator,\n groupBy?: Group,\n groupByColumn?: RsCoreTypes.Column\n) => {\n if (!groupByColumn || !header.name) {\n return <NoValue />;\n }\n\n if (groupBy?.dateFunction && typeof header.name !== 'boolean') {\n return (\n <DateTimeDisplay\n variant={dateDisplayVariants[groupBy.dateFunction] ?? 'datetime'}\n format='long'\n value={header.name}\n />\n );\n }\n\n groupByColumn.setExecutionContext(null);\n\n return (\n <RenderingEngine\n {...groupByColumn.getRenderingEngineProps()}\n context={{\n getValue: () => header.name,\n getExecutionContext: () => ({\n getValue: () => header.data,\n name: 'groupHeader'\n })\n }}\n />\n );\n};\n\nconst getActivities = (\n groupHeaders: RsCoreTypes.View['groupHeaders'],\n columns: RsCoreTypes.View['columns'],\n { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View['meta'],\n groupBy?: Group\n): TimelineProps['activities'] => {\n const { title, date, status: statusProp, icon, content } = timelineFields ?? {};\n const titleColumn = columns?.find(({ field }) => field.name === title?.name);\n const dateColumn = columns?.find(({ field }) => field.name === date?.name);\n const contentColumn = columns?.find(({ field }) => field.name === content?.name);\n const groupByColumn = columns?.find(({ field }) => field.id === groupBy?.columnId);\n return (groupHeaders ?? [])\n .map(header => {\n return {\n header: renderHeader(header, groupBy, groupByColumn),\n activity: (header.getRows() ?? [])\n .map(row => {\n const data = row.getContext().getValue();\n const dateValue = date?.name ? data[date.name] : undefined;\n const dateFieldType = dateColumn?.field?.type;\n const isDateOnlyFieldType =\n dateFieldType === FieldType.DATE ||\n dateFieldType === FieldType.DATE_ONLY ||\n dateFieldType === FieldType.DATE_TIMELINE;\n\n // Activity Object date can't be undefined\n if (!dateValue) {\n return undefined;\n }\n const statusData = statusProp?.name ? data[statusProp.name] : undefined;\n const status = statusData\n ? {\n variant: getStatusVariant(statusData as string),\n children: statusData as ReactText\n }\n : undefined;\n const activity: ActivityObject = {\n id: row.key as string,\n title:\n title?.name && data[title.name] && titleColumn ? (\n <ValueRenderer column={titleColumn} row={row} />\n ) : (\n <NoValue />\n ),\n date:\n timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone\n ? convertDateToTimezone(dateValue as string, timezone)\n : (dateValue as string),\n dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',\n icon: icon?.name ? (data[icon.name] as string) : undefined,\n defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,\n content: contentColumn ? (\n <ValueRenderer column={contentColumn} row={row} />\n ) : (\n getFieldsAsActivityContent(columns, row)\n ),\n status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status\n };\n return activity;\n })\n ?.filter((item): item is ActivityObject => !!item)\n };\n })\n .filter(({ activity }) => activity.length > 0);\n};\n\nexport default getActivities;\n\nexport function calculateBodyMaxHeight(\n maxHeight: string | number | undefined,\n domContainer: HTMLElement | undefined,\n pContainer: HTMLElement | null | undefined\n) {\n if (maxHeight === undefined) return;\n if (!domContainer || !pContainer) return;\n const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;\n if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {\n // Means it is a css variable which is a string, and it needs to be computed with calc function\n // If css variable is not defined then fallback to default max height i.e. 550px\n const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;\n return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;\n }\n if (typeof maxHeight === 'number') {\n return `${maxHeight - extraHeight - 32}px`;\n }\n}\n\nexport function isFutureDate(date: string | number | Date | undefined, current: Date): boolean {\n if (!date || !current) return false;\n return parseToDate(date).getTime() > current.getTime();\n}\n"]}
@@ -1,3 +1,3 @@
1
- declare const _default: import("styled-components").FlattenSimpleInterpolation;
1
+ declare const _default: import("styled-components").RuleSet<object>;
2
2
  export default _default;
3
3
  //# sourceMappingURL=rs-styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAClD,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;CAIrB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;GAW9B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;IAOvB,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;CAGtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAQ/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAWhC,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAClD,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;CAIrB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;GAW9B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;IAOvB,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;CAGtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAQ/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAYhC,CAAC"}
@@ -73,6 +73,7 @@ export const FOCUSABLE_SELECTORS = [
73
73
  ];
74
74
  export const ACTIONABLE_SELECTORS = [
75
75
  'input[type=text]',
76
+ 'input:not([type])', // input without type defaults to text
76
77
  'input[type=number]',
77
78
  'input[inputmode=numeric]',
78
79
  'input[inputmode=tel]',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE;IACzC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE;IAC1C,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE;IACxC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,qBAAqB,EAAE;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,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BAAuB;IACvB,uBAAuB;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kBAAkB;IAClB,oBAAoB;IACpB,0BAA0B;IAC1B,sBAAsB;IACtB,iBAAiB;IACjB,mBAAmB;IACnB,sBAAsB;IACtB,UAAU;IACV,QAAQ;IACR,QAAQ;CACT,CAAC","sourcesContent":["export const EXTERNAL_FILTERS = 'externalFilters';\nexport const DEFAULT_FORMAT = 'Default';\n\nexport const SELECTION_MODES = {\n single: 'single',\n multi: 'multi',\n multi_on_hover: 'multi_on_hover'\n};\n\nexport const rowDensityClasses = {\n 1: { id: '1', className: 'short-height' },\n 2: { id: '2', className: 'medium-height' },\n 3: { id: '3', className: 'tall-height' },\n 4: { id: '4', className: 'wrap-content-height' }\n};\n\nexport const TEMPLATES = {\n GALLERY: 'Gallery',\n TABLE: 'Table',\n TIMELINE: 'Timeline'\n};\n\nexport const debugInfoFields = {\n className: 'className',\n dataPage: 'dataPage',\n dataSource: 'dataSource',\n timeTaken: 'timeTaken',\n insightId: 'insightId'\n};\n\nexport const CELL_ALIGN_CLASSES = {\n left: 'align-left',\n right: 'align-right',\n center: 'align-center'\n};\n\nexport const NonNullSortActions = [\n {\n actionId: 'asc',\n actionName: 'Sort ascending',\n actionIcon: 'arrow-up'\n },\n {\n actionId: 'desc',\n actionName: 'Sort descending',\n actionIcon: 'arrow-down'\n }\n];\n\nexport const sortActions = [\n ...NonNullSortActions,\n {\n actionId: null,\n actionName: 'Remove sort',\n actionIcon: 'reset'\n }\n];\nexport const TOOLBAR_FEATURES = {\n FILTER: 'filter',\n SORT: 'sort',\n GROUPING: 'grouping'\n} as const;\n\nexport const customFunctions = {\n TEXT_GROUPING: 'TEXT_GROUPING',\n RANGE_GROUPING: 'RANGE_GROUPING',\n INTERVAL_GROUPING: 'INTERVAL_GROUPING'\n};\n\nexport const intervalGroupingBoundaries = {\n includeLowerOnly: 'include-lower-only',\n includeUpperOnly: 'include-upper-only'\n};\n\nexport const FOCUSABLE_SELECTORS = [\n 'button',\n 'a[href]',\n 'input[type=file]',\n 'input[type=checkbox]',\n 'input[type=radio]',\n '.scalarlist-component',\n '.row-error-column svg'\n];\n\nexport const ACTIONABLE_SELECTORS = [\n 'input[type=text]',\n 'input[type=number]',\n 'input[inputmode=numeric]',\n 'input[inputmode=tel]',\n 'input[type=url]',\n 'input[type=email]',\n 'input[role=combobox]',\n 'textarea',\n 'select',\n 'iframe'\n];\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE;IACzC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE;IAC1C,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE;IACxC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,qBAAqB,EAAE;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;CACvB,CAAC;AAEF,MAAM,CAAC,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= 'externalFilters';\nexport const DEFAULT_FORMAT = 'Default';\n\nexport const SELECTION_MODES = {\n single: 'single',\n multi: 'multi',\n multi_on_hover: 'multi_on_hover'\n};\n\nexport const rowDensityClasses = {\n 1: { id: '1', className: 'short-height' },\n 2: { id: '2', className: 'medium-height' },\n 3: { id: '3', className: 'tall-height' },\n 4: { id: '4', className: 'wrap-content-height' }\n};\n\nexport const TEMPLATES = {\n GALLERY: 'Gallery',\n TABLE: 'Table',\n TIMELINE: 'Timeline'\n};\n\nexport const debugInfoFields = {\n className: 'className',\n dataPage: 'dataPage',\n dataSource: 'dataSource',\n timeTaken: 'timeTaken',\n insightId: 'insightId'\n};\n\nexport const CELL_ALIGN_CLASSES = {\n left: 'align-left',\n right: 'align-right',\n center: 'align-center'\n};\n\nexport const NonNullSortActions = [\n {\n actionId: 'asc',\n actionName: 'Sort ascending',\n actionIcon: 'arrow-up'\n },\n {\n actionId: 'desc',\n actionName: 'Sort descending',\n actionIcon: 'arrow-down'\n }\n];\n\nexport const sortActions = [\n ...NonNullSortActions,\n {\n actionId: null,\n actionName: 'Remove sort',\n actionIcon: 'reset'\n }\n];\nexport const TOOLBAR_FEATURES = {\n FILTER: 'filter',\n SORT: 'sort',\n GROUPING: 'grouping'\n} as const;\n\nexport const customFunctions = {\n TEXT_GROUPING: 'TEXT_GROUPING',\n RANGE_GROUPING: 'RANGE_GROUPING',\n INTERVAL_GROUPING: 'INTERVAL_GROUPING'\n};\n\nexport const intervalGroupingBoundaries = {\n includeLowerOnly: 'include-lower-only',\n includeUpperOnly: 'include-upper-only'\n};\n\nexport const FOCUSABLE_SELECTORS = [\n 'button',\n 'a[href]',\n 'input[type=file]',\n 'input[type=checkbox]',\n 'input[type=radio]',\n '.scalarlist-component',\n '.row-error-column svg'\n];\n\nexport const ACTIONABLE_SELECTORS = [\n 'input[type=text]',\n 'input:not([type])', // input without type defaults to text\n 'input[type=number]',\n 'input[inputmode=numeric]',\n 'input[inputmode=tel]',\n 'input[type=url]',\n 'input[type=email]',\n 'input[role=combobox]',\n 'textarea',\n 'select',\n 'iframe'\n];\n"]}
@@ -0,0 +1,17 @@
1
+ import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';
2
+ type TemplateValue = (typeof REPEATING_STRUCTURE_TEMPLATES)[keyof typeof REPEATING_STRUCTURE_TEMPLATES];
3
+ declare const featureSupport: {
4
+ [feature: string]: TemplateValue[];
5
+ };
6
+ type FeatureKey = keyof typeof featureSupport | string;
7
+ /**
8
+ * Check if a feature should show in toolbar for a given template.
9
+ * Features not in the map are considered supported for all templates.
10
+ *
11
+ * @param template - The template type
12
+ * @param feature - The feature identifier
13
+ * @returns true if the feature should show in toolbar for the template
14
+ */
15
+ declare const showFeatureForTemplate: (template: TemplateValue, feature: FeatureKey) => boolean;
16
+ export default showFeatureForTemplate;
17
+ //# sourceMappingURL=templateFeatureSupport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateFeatureSupport.d.ts","sourceRoot":"","sources":["../../Core/templateFeatureSupport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E,KAAK,aAAa,GAChB,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,OAAO,6BAA6B,CAAC,CAAC;AAIrF,QAAA,MAAM,cAAc,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE,CAAA;CAUzD,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,OAAO,cAAc,GAAG,MAAM,CAAC;AAEvD;;;;;;;GAOG;AACH,QAAA,MAAM,sBAAsB,GAAI,UAAU,aAAa,EAAE,SAAS,UAAU,KAAG,OAK9E,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';
2
+ // TODO: All such feature map support should be available at View object based via a feature in rs-core based on the template from meta.
3
+ // The consumer can pass along the resolved feature map to their component for decisioning.
4
+ const featureSupport = {
5
+ personalization: ['Table', 'Gallery', 'Timeline'],
6
+ group: ['Table', 'Timeline'],
7
+ showHideColumns: ['Table', 'Gallery'],
8
+ freezeColumns: ['Table'],
9
+ rowDensity: ['Table'],
10
+ showHeaderIcons: ['Table'],
11
+ autoSizeColumns: ['Table'],
12
+ resetColumnWidths: ['Table'],
13
+ wrap: ['Table']
14
+ };
15
+ /**
16
+ * Check if a feature should show in toolbar for a given template.
17
+ * Features not in the map are considered supported for all templates.
18
+ *
19
+ * @param template - The template type
20
+ * @param feature - The feature identifier
21
+ * @returns true if the feature should show in toolbar for the template
22
+ */
23
+ const showFeatureForTemplate = (template, feature) => {
24
+ if (!featureSupport[feature]) {
25
+ return true;
26
+ }
27
+ return featureSupport[feature].includes(template);
28
+ };
29
+ export default showFeatureForTemplate;
30
+ //# sourceMappingURL=templateFeatureSupport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateFeatureSupport.js","sourceRoot":"","sources":["../../Core/templateFeatureSupport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAK/E,wIAAwI;AACxI,2FAA2F;AAC3F,MAAM,cAAc,GAA2C;IAC7D,eAAe,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;IACjD,KAAK,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;IAC5B,eAAe,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;IACrC,aAAa,EAAE,CAAC,OAAO,CAAC;IACxB,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,eAAe,EAAE,CAAC,OAAO,CAAC;IAC1B,eAAe,EAAE,CAAC,OAAO,CAAC;IAC1B,iBAAiB,EAAE,CAAC,OAAO,CAAC;IAC5B,IAAI,EAAE,CAAC,OAAO,CAAC;CAChB,CAAC;AAIF;;;;;;;GAOG;AACH,MAAM,sBAAsB,GAAG,CAAC,QAAuB,EAAE,OAAmB,EAAW,EAAE;IACvF,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';\n\ntype TemplateValue =\n (typeof REPEATING_STRUCTURE_TEMPLATES)[keyof typeof REPEATING_STRUCTURE_TEMPLATES];\n\n// TODO: All such feature map support should be available at View object based via a feature in rs-core based on the template from meta.\n// The consumer can pass along the resolved feature map to their component for decisioning.\nconst featureSupport: { [feature: string]: TemplateValue[] } = {\n personalization: ['Table', 'Gallery', 'Timeline'],\n group: ['Table', 'Timeline'],\n showHideColumns: ['Table', 'Gallery'],\n freezeColumns: ['Table'],\n rowDensity: ['Table'],\n showHeaderIcons: ['Table'],\n autoSizeColumns: ['Table'],\n resetColumnWidths: ['Table'],\n wrap: ['Table']\n};\n\ntype FeatureKey = keyof typeof featureSupport | string;\n\n/**\n * Check if a feature should show in toolbar for a given template.\n * Features not in the map are considered supported for all templates.\n *\n * @param template - The template type\n * @param feature - The feature identifier\n * @returns true if the feature should show in toolbar for the template\n */\nconst showFeatureForTemplate = (template: TemplateValue, feature: FeatureKey): boolean => {\n if (!featureSupport[feature]) {\n return true;\n }\n return featureSupport[feature].includes(template);\n};\n\nexport default showFeatureForTemplate;\n"]}
package/lib/types.d.ts CHANGED
@@ -3,6 +3,8 @@ import type { RepeatingStructuresProps, RsStyleFormat as RsStyleFormatType } fro
3
3
  export declare namespace RSTypes {
4
4
  /** Group configuration on repeating structure state */
5
5
  type Group = RsCoreTypes.Group;
6
+ /** Group Additional field configuration for a group. */
7
+ type GroupAdditionalField = RsCoreTypes.GroupAdditionalField;
6
8
  /** Metadata for field */
7
9
  type FieldDef = RsCoreTypes.FieldDef;
8
10
  /** Group filter from the repeating structure state */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,KAAK,EACV,wBAAwB,EACxB,aAAa,IAAI,iBAAiB,EACnC,MAAM,uCAAuC,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAE/B,uDAAuD;IACvD,KAAY,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IAEtC,yBAAyB;IACzB,KAAY,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;IAE5C,sDAAsD;IACtD,KAAY,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5E,sDAAsD;IACtD,KAAY,IAAI,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAErE,wBAAwB;IACxB,KAAY,eAAe,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAE3F,mDAAmD;IACnD,KAAY,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/E,sEAAsE;IACtE,KAAY,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;IAEpC;OACG;IACH,KAAY,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;IAEhD;;OAEG;IACH,KAAY,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAExC;;OAEG;IACH,KAAY,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IACtC;;OAEG;IACH,KAAY,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,CAAC;IAC9D,yEAAyE;IACzE,KA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;IACtE,KAAY,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;IAEpC;OACG;IACH,KAAY,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;IAEhD;;OAEG;IACH,KAAY,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAExC;;OAEG;IACH,KAAY,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IACtC;;OAEG;IACH,KAAY,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,CAAC;IAC9D,yEAAyE;IACzE,KAAY,OAAO,GAAG,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAE5D,2FAA2F;IAC3F,KAAY,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IAEtC,+CAA+C;IAC/C,KAAY,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IAE1C,KAAY,2BAA2B,GAAG,wBAAwB,CAAC;IAEnE,KAAY,aAAa,GAAG,iBAAiB,CAAC;CAC/C"}
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport type {\n RepeatingStructuresProps,\n RsStyleFormat as RsStyleFormatType\n} from './types/RepeatingStructuresBoot.types';\n\nexport declare namespace RSTypes {\n // Exported members\n /** Group configuration on repeating structure state */\n export type Group = RsCoreTypes.Group;\n\n /** Metadata for field */\n export type FieldDef = RsCoreTypes.FieldDef;\n\n /** Group filter from the repeating structure state */\n export type GroupFilter = NonNullable<RsCoreTypes.State['groupFilters']>[0];\n\n /** Sort configuration on repeating structure state */\n export type Sort = NonNullable<RsCoreTypes.State['sortingOrder']>[0];\n\n /** Aggregation types */\n export type AggregationType = NonNullable<RsCoreTypes.State['aggregationInfo']>[0]['type'];\n\n /** Aggregation state on the repeating structure */\n export type Aggregation = NonNullable<RsCoreTypes.State['aggregationInfo']>[0];\n\n /** A meta data object to provide definition of repeating structure */\n export type Meta = RsCoreTypes.Meta;\n\n /** A set of api's to communicate b/w repeating structure and its consumer (e.g. providing data to repeating structure)\n */\n export type ApiContext = RsCoreTypes.ApiContext;\n\n /**\n * Error object from the repeating structure\n */\n export type Errors = RsCoreTypes.Errors;\n\n /**\n * State object from the repeating structure\n */\n export type State = RsCoreTypes.State;\n /**\n * Personalized state object from the repeating structure. This state is generally shared to consumer.\n */\n export type PersonalizedState = RsCoreTypes.PersonalizedState;\n /** An array of multiple variants of metadata of repeating structures. */\n export type Presets = RsCoreTypes.RsCoreInitArgs['presets'];\n\n /** The set of methods exposed to consumers for communicating with repeating structure. */\n export type RsApi = RsCoreTypes.RsApi;\n\n /** Represents a row in Repeating structures */\n export type RowData = RsCoreTypes.RowData;\n\n export type RepeatingStructuresInitArgs = RepeatingStructuresProps;\n\n export type RsStyleFormat = RsStyleFormatType;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport type {\n RepeatingStructuresProps,\n RsStyleFormat as RsStyleFormatType\n} from './types/RepeatingStructuresBoot.types';\n\nexport declare namespace RSTypes {\n // Exported members\n /** Group configuration on repeating structure state */\n export type Group = RsCoreTypes.Group;\n\n /** Group Additional field configuration for a group. */\n export type GroupAdditionalField = RsCoreTypes.GroupAdditionalField;\n\n /** Metadata for field */\n export type FieldDef = RsCoreTypes.FieldDef;\n\n /** Group filter from the repeating structure state */\n export type GroupFilter = NonNullable<RsCoreTypes.State['groupFilters']>[0];\n\n /** Sort configuration on repeating structure state */\n export type Sort = NonNullable<RsCoreTypes.State['sortingOrder']>[0];\n\n /** Aggregation types */\n export type AggregationType = NonNullable<RsCoreTypes.State['aggregationInfo']>[0]['type'];\n\n /** Aggregation state on the repeating structure */\n export type Aggregation = NonNullable<RsCoreTypes.State['aggregationInfo']>[0];\n\n /** A meta data object to provide definition of repeating structure */\n export type Meta = RsCoreTypes.Meta;\n\n /** A set of api's to communicate b/w repeating structure and its consumer (e.g. providing data to repeating structure)\n */\n export type ApiContext = RsCoreTypes.ApiContext;\n\n /**\n * Error object from the repeating structure\n */\n export type Errors = RsCoreTypes.Errors;\n\n /**\n * State object from the repeating structure\n */\n export type State = RsCoreTypes.State;\n /**\n * Personalized state object from the repeating structure. This state is generally shared to consumer.\n */\n export type PersonalizedState = RsCoreTypes.PersonalizedState;\n /** An array of multiple variants of metadata of repeating structures. */\n export type Presets = RsCoreTypes.RsCoreInitArgs['presets'];\n\n /** The set of methods exposed to consumers for communicating with repeating structure. */\n export type RsApi = RsCoreTypes.RsApi;\n\n /** Represents a row in Repeating structures */\n export type RowData = RsCoreTypes.RowData;\n\n export type RepeatingStructuresInitArgs = RepeatingStructuresProps;\n\n export type RsStyleFormat = RsStyleFormatType;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/lists-react",
3
- "version": "9.0.0-build.2.9",
3
+ "version": "9.0.0-build.20.0",
4
4
  "description": "Repeating view structures such as Table, Gallery(Repeating layouts), Kanban etc.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Pegasystems",
@@ -14,24 +14,23 @@
14
14
  "build": "tsc -b tsconfig.build.json"
15
15
  },
16
16
  "dependencies": {
17
- "@pega/cosmos-react-condition-builder": "9.0.0-build.2.9",
18
- "@pega/cosmos-react-core": "9.0.0-build.2.9",
19
- "@pega/cosmos-react-rte": "9.0.0-build.2.9",
20
- "@pega/cosmos-react-work": "9.0.0-build.2.9",
21
- "@types/lodash.get": "^4.4.9",
17
+ "@pega/cosmos-react-condition-builder": "9.0.0-build.20.0",
18
+ "@pega/cosmos-react-core": "9.0.0-build.20.0",
19
+ "@pega/cosmos-react-rte": "9.0.0-build.20.0",
20
+ "@types/lodash-es": "^4.17.12",
22
21
  "@types/react": "^17.0.62 || ^18.3.3",
23
22
  "@types/react-dom": "^17.0.20 || ^18.3.0",
24
23
  "@types/uuid": "^9.0.0",
25
24
  "dayjs": "^1.11.13",
26
25
  "fast-deep-equal": "^3.1.3",
27
- "lodash.get": "^4.4.2",
28
- "pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.2.9",
29
- "pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.2.9",
26
+ "lodash-es": "^4.17.23",
27
+ "pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.20.0",
28
+ "pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.20.0",
30
29
  "polished": "^4.1.0",
31
30
  "prop-types": "^15.8.1",
32
31
  "react": "^17.0.0 || ^18.0.0",
33
32
  "react-dom": "^17.0.0 || ^18.0.0",
34
- "styled-components": "^5.2.0",
33
+ "styled-components": "^6.3.11",
35
34
  "uuid": "^9.0.0"
36
35
  },
37
36
  "devDependencies": {
@@ -45,7 +44,7 @@
45
44
  "@testing-library/react": "^16.0.0",
46
45
  "@testing-library/user-event": "^14.6.1",
47
46
  "jest-axe": "^8.0.0",
48
- "srs-utils": "9.0.0-build.2.9",
49
- "typescript": "~5.8.3"
47
+ "srs-utils": "9.0.0-build.20.0",
48
+ "typescript": "~5.9.3"
50
49
  }
51
50
  }
@@ -1,3 +0,0 @@
1
- export default CardItem;
2
- declare const CardItem: import("react").NamedExoticComponent<object>;
3
- //# sourceMappingURL=CardItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CardItem.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/CardItem.jsx"],"names":[],"mappings":";AAqEA,qEAgCE"}
@@ -1,78 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { memo, Fragment } from 'react';
3
- import styled from 'styled-components';
4
- import { CardContent, Card, Text, CardHeader, useTheme } from '@pega/cosmos-react-core';
5
- import RenderingEngine from '../RenderingEngine/RenderCell';
6
- const StyledUL = styled.ul `
7
- & > li > span {
8
- overflow: hidden;
9
- display: -webkit-box;
10
- -webkit-line-clamp: 3;
11
- -webkit-box-orient: vertical;
12
- word-break: break-word;
13
- }
14
- & > li {
15
- list-style-type: none;
16
- padding-block-start: calc(${props => props.theme.base.spacing} / 2);
17
- }
18
- `;
19
- const FieldValues = ({ row, columns }) => {
20
- const theme = useTheme();
21
- return (_jsx(StyledUL, { theme: theme, children: columns.map(column => {
22
- if (column.hidden)
23
- return null;
24
- column.setExecutionContext(row);
25
- const { id } = column.field;
26
- return (_jsx(Fragment, { children: _jsx("li", { children: _jsx(RenderingEngine, { highlighter: true, ...column.getRenderingEngineProps() }) }) }, id));
27
- }) }));
28
- };
29
- const CardHeaderText = styled(Text) `
30
- white-space: nowrap;
31
- max-width: 100%;
32
- text-overflow: ellipsis;
33
- overflow: hidden;
34
- `;
35
- const StyledCard = styled(Card) `
36
- padding: 0.625rem;
37
- min-width: 6.25rem;
38
- `;
39
- const StyledCardContent = styled(CardContent) `
40
- && {
41
- padding-bottom: 0.5rem;
42
- }
43
- &.cardContent {
44
- padding-left: 0.5rem;
45
- }
46
- `;
47
- const StyledCardHeader = styled(CardHeader) `
48
- &.cardHeader {
49
- padding: 0.5rem;
50
- flex-direction: column;
51
- align-items: flex-start;
52
- }
53
- .cardRowAction {
54
- position: absolute;
55
- right: 0.5rem;
56
- }
57
- `;
58
- const CardItem = memo(({ row, headerColumn, secondaryTextColumn, filteredColumns, rowActionMenuColumn }) => {
59
- const data = row.getContext().getValue();
60
- if (!data)
61
- return null;
62
- if (headerColumn)
63
- headerColumn.setExecutionContext(row);
64
- if (secondaryTextColumn)
65
- secondaryTextColumn.setExecutionContext(row);
66
- if (rowActionMenuColumn)
67
- rowActionMenuColumn.setExecutionContext(row);
68
- return (_jsxs(StyledCard, { variant: 'cover', children: [_jsxs(StyledCardHeader, { className: 'cardHeader', children: [headerColumn && (_jsx(CardHeaderText, { variant: 'h4', children: _jsx(RenderingEngine, { highlighter: true, ...headerColumn.getRenderingEngineProps() }) })), secondaryTextColumn && (_jsx(CardHeaderText, { variant: 'h4', children: _jsx(RenderingEngine, { highlighter: true, ...secondaryTextColumn.getRenderingEngineProps() }) })), rowActionMenuColumn && (_jsx("div", { className: 'cardRowAction', children: _jsx(RenderingEngine, { highlighter: true, ...rowActionMenuColumn.getRenderingEngineProps() }) }))] }), _jsx(StyledCardContent, { className: 'cardContent', children: FieldValues({ row, columns: filteredColumns }) })] }));
69
- });
70
- CardItem.defaultProps = {
71
- row: {},
72
- columns: []
73
- };
74
- CardItem.mapStateToProps = instance => ({
75
- columns: instance.columns
76
- });
77
- export default CardItem;
78
- //# sourceMappingURL=CardItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CardItem.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/CardItem.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExF,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;gCAUM,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;;CAEhE,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE;IACvC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,CACL,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACpB,IAAI,MAAM,CAAC,MAAM;gBAAE,OAAO,IAAI,CAAC;YAC/B,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;YAChC,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC,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C,cAAc,IAAC,OAAO,EAAC,IAAI,YAC1B,KAAC,eAAe,IAAC,WAAW,WAAK,mBAAmB,CAAC,uBAAuB,EAAE,GAAI,GACnE,CAClB,EACA,mBAAmB,IAAI,CACtB,cAAK,SAAS,EAAC,eAAe,YAC5B,KAAC,eAAe,IAAC,WAAW,WAAK,mBAAmB,CAAC,uBAAuB,EAAE,GAAI,GAC9E,CACP,IACgB,EACnB,KAAC,iBAAiB,IAAC,SAAS,EAAC,aAAa,YACvC,WAAW,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,GAC7B,IACT,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,YAAY,GAAG;IACtB,GAAG,EAAE,EAAE;IACP,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,QAAQ,CAAC,OAAO;CAC1B,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { memo, Fragment } from 'react';\nimport styled from 'styled-components';\n\nimport { CardContent, Card, Text, CardHeader, useTheme } from '@pega/cosmos-react-core';\n\nimport RenderingEngine from '../RenderingEngine/RenderCell';\n\nconst StyledUL = styled.ul`\n & > li > span {\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n word-break: break-word;\n }\n & > li {\n list-style-type: none;\n padding-block-start: calc(${props => props.theme.base.spacing} / 2);\n }\n`;\n\nconst FieldValues = ({ row, columns }) => {\n const theme = useTheme();\n return (\n <StyledUL theme={theme}>\n {columns.map(column => {\n if (column.hidden) return null;\n column.setExecutionContext(row);\n const { id } = column.field;\n return (\n <Fragment key={id}>\n <li>\n <RenderingEngine highlighter {...column.getRenderingEngineProps()} />\n </li>\n </Fragment>\n );\n })}\n </StyledUL>\n );\n};\nconst CardHeaderText = styled(Text)`\n white-space: nowrap;\n max-width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\nconst StyledCard = styled(Card)`\n padding: 0.625rem;\n min-width: 6.25rem;\n`;\nconst StyledCardContent = styled(CardContent)`\n && {\n padding-bottom: 0.5rem;\n }\n &.cardContent {\n padding-left: 0.5rem;\n }\n`;\nconst StyledCardHeader = styled(CardHeader)`\n &.cardHeader {\n padding: 0.5rem;\n flex-direction: column;\n align-items: flex-start;\n }\n .cardRowAction {\n position: absolute;\n right: 0.5rem;\n }\n`;\nconst CardItem = memo(\n ({ row, headerColumn, secondaryTextColumn, filteredColumns, rowActionMenuColumn }) => {\n const data = row.getContext().getValue();\n if (!data) return null;\n if (headerColumn) headerColumn.setExecutionContext(row);\n if (secondaryTextColumn) secondaryTextColumn.setExecutionContext(row);\n if (rowActionMenuColumn) rowActionMenuColumn.setExecutionContext(row);\n return (\n <StyledCard variant='cover'>\n <StyledCardHeader className='cardHeader'>\n {headerColumn && (\n <CardHeaderText variant='h4'>\n <RenderingEngine highlighter {...headerColumn.getRenderingEngineProps()} />\n </CardHeaderText>\n )}\n {secondaryTextColumn && (\n <CardHeaderText variant='h4'>\n <RenderingEngine highlighter {...secondaryTextColumn.getRenderingEngineProps()} />\n </CardHeaderText>\n )}\n {rowActionMenuColumn && (\n <div className='cardRowAction'>\n <RenderingEngine highlighter {...rowActionMenuColumn.getRenderingEngineProps()} />\n </div>\n )}\n </StyledCardHeader>\n <StyledCardContent className='cardContent'>\n {FieldValues({ row, columns: filteredColumns })}\n </StyledCardContent>\n </StyledCard>\n );\n }\n);\n\nCardItem.defaultProps = {\n row: {},\n columns: []\n};\n\nCardItem.mapStateToProps = instance => ({\n columns: instance.columns\n});\n\nexport default CardItem;\n"]}
@@ -1,12 +0,0 @@
1
- export default DateTime;
2
- declare function DateTime(props: any): import("react/jsx-runtime").JSX.Element;
3
- declare namespace DateTime {
4
- namespace propTypes {
5
- let onCancel: PropTypes.Validator<(...args: any[]) => any>;
6
- let onSubmit: PropTypes.Validator<(...args: any[]) => any>;
7
- let getField: PropTypes.Validator<(...args: any[]) => any>;
8
- let getValue: PropTypes.Validator<(...args: any[]) => any>;
9
- }
10
- }
11
- import PropTypes from 'prop-types';
12
- //# sourceMappingURL=DateTime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.jsx"],"names":[],"mappings":";AASA,+EAkCC;;;;;;;;;sBA1CqB,YAAY"}
@@ -1,35 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useState, useRef, useEffect } from 'react';
3
- import PropTypes from 'prop-types';
4
- import { Input } from '@pega/cosmos-react-core';
5
- const styles = {
6
- input: { width: '100%' }
7
- };
8
- function DateTime(props) {
9
- const { getField, getValue } = props;
10
- const { type } = getField();
11
- const oldValue = getValue();
12
- const [value, setValue] = useState(type === 'datetime' ? oldValue?.slice(0, -1) : oldValue);
13
- const inputRef = useRef(null);
14
- const onChange = event => setValue(event.target.value);
15
- const onEscape = event => {
16
- if (event.key === 'Escape') {
17
- props.onCancel();
18
- }
19
- };
20
- const onBlur = () => props.onSubmit({ oldValue, newValue: value });
21
- useEffect(() => {
22
- inputRef.current?.focus();
23
- }, [inputRef]);
24
- return (_jsx(Input, { ...props, type: type === 'datetime' ? 'datetime-local' : type, value: value, style: styles.input, ref: ref => {
25
- inputRef.current = ref;
26
- }, onChange: onChange, onBlur: onBlur, onKeyDown: onEscape }));
27
- }
28
- DateTime.propTypes = {
29
- onCancel: PropTypes.func.isRequired,
30
- onSubmit: PropTypes.func.isRequired,
31
- getField: PropTypes.func.isRequired,
32
- getValue: PropTypes.func.isRequired
33
- };
34
- export default DateTime;
35
- //# sourceMappingURL=DateTime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTime.js","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,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AAK,EACT,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,EACnD,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,GAAG,EAAE,GAAG,CAAC,EAAE;YACT,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC;QACzB,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,GACnB,CACH,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,SAAS,GAAG;IACnB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACpC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { useState, useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Input } from '@pega/cosmos-react-core';\n\nconst styles = {\n input: { width: '100%' }\n};\n\nfunction DateTime(props) {\n const { getField, getValue } = props;\n const { type } = getField();\n const oldValue = getValue();\n const [value, setValue] = useState(type === 'datetime' ? oldValue?.slice(0, -1) : oldValue);\n const inputRef = useRef(null);\n\n const onChange = event => setValue(event.target.value);\n\n const onEscape = event => {\n if (event.key === 'Escape') {\n props.onCancel();\n }\n };\n\n const onBlur = () => props.onSubmit({ oldValue, newValue: value });\n useEffect(() => {\n inputRef.current?.focus();\n }, [inputRef]);\n\n return (\n <Input\n {...props}\n type={type === 'datetime' ? 'datetime-local' : type}\n value={value}\n style={styles.input}\n ref={ref => {\n inputRef.current = ref;\n }}\n onChange={onChange}\n onBlur={onBlur}\n onKeyDown={onEscape}\n />\n );\n}\n\nDateTime.propTypes = {\n onCancel: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n getField: PropTypes.func.isRequired,\n getValue: PropTypes.func.isRequired\n};\n\nexport default DateTime;\n"]}