@pega/lists-react 8.8.0 → 9.0.0-build.10.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 (233) hide show
  1. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts +10 -5
  2. package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts.map +1 -1
  3. package/lib/Core/Components/A11y/RepeatingStructureA11y.js +27 -2
  4. package/lib/Core/Components/A11y/RepeatingStructureA11y.js.map +1 -1
  5. package/lib/Core/Components/AggregateMenu.d.ts +1 -0
  6. package/lib/Core/Components/AggregateMenu.d.ts.map +1 -1
  7. package/lib/Core/Components/AggregateMenu.js +26 -16
  8. package/lib/Core/Components/AggregateMenu.js.map +1 -1
  9. package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts.map +1 -1
  10. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js +4 -2
  11. package/lib/Core/Components/ContextMenu/ContextMenuContainer.js.map +1 -1
  12. package/lib/Core/Components/ContextMenu/QuickFilter.js +6 -6
  13. package/lib/Core/Components/ContextMenu/QuickFilter.js.map +1 -1
  14. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +1 -1
  15. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +3 -2
  16. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +1 -1
  17. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +1 -1
  18. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +3 -2
  19. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +1 -1
  20. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +1 -1
  21. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +7 -6
  22. package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +1 -1
  23. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts +2 -1
  24. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts.map +1 -1
  25. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +9 -21
  26. package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -1
  27. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts +2 -1
  28. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts.map +1 -1
  29. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js +4 -3
  30. package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js.map +1 -1
  31. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts +2 -1
  32. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts.map +1 -1
  33. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js +4 -3
  34. package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js.map +1 -1
  35. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +3 -1
  36. package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
  37. package/lib/Core/Components/DefaultComponents/EmptyContainer.js +2 -4
  38. package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -1
  39. package/lib/Core/Components/DefaultComponents/index.d.ts +3 -1
  40. package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -1
  41. package/lib/Core/Components/Filters/CommonFilter.d.ts.map +1 -1
  42. package/lib/Core/Components/Filters/CommonFilter.js +2 -2
  43. package/lib/Core/Components/Filters/CommonFilter.js.map +1 -1
  44. package/lib/Core/Components/Filters/FilterType.js +5 -5
  45. package/lib/Core/Components/Filters/FilterType.js.map +1 -1
  46. package/lib/Core/Components/Filters/SelectFilter.d.ts.map +1 -1
  47. package/lib/Core/Components/Filters/SelectFilter.js +2 -2
  48. package/lib/Core/Components/Filters/SelectFilter.js.map +1 -1
  49. package/lib/Core/Components/GroupRenderer.d.ts +16 -0
  50. package/lib/Core/Components/GroupRenderer.d.ts.map +1 -1
  51. package/lib/Core/Components/GroupRenderer.js +120 -5
  52. package/lib/Core/Components/GroupRenderer.js.map +1 -1
  53. package/lib/Core/Components/Grouping/GroupingMenu.js +3 -3
  54. package/lib/Core/Components/Grouping/GroupingMenu.js.map +1 -1
  55. package/lib/Core/Components/HeaderCell.d.ts.map +1 -1
  56. package/lib/Core/Components/HeaderCell.js +5 -2
  57. package/lib/Core/Components/HeaderCell.js.map +1 -1
  58. package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
  59. package/lib/Core/Components/HeaderMenu/actions.js +4 -3
  60. package/lib/Core/Components/HeaderMenu/actions.js.map +1 -1
  61. package/lib/Core/Components/HeaderMenu/index.d.ts.map +1 -1
  62. package/lib/Core/Components/HeaderMenu/index.js +2 -2
  63. package/lib/Core/Components/HeaderMenu/index.js.map +1 -1
  64. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts +1 -1
  65. package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
  66. package/lib/Core/Components/RenderingEngine/RenderCell.js +4 -1
  67. package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -1
  68. package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
  69. package/lib/Core/Components/Toolbar/AdvanceToolbar.js +4 -17
  70. package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
  71. package/lib/Core/Components/Toolbar/AnnounceRowsCount.d.ts +1 -1
  72. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js +1 -1
  73. package/lib/Core/Components/Toolbar/AnnounceRowsCount.js.map +1 -1
  74. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +20 -9
  75. package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -1
  76. package/lib/Core/Components/Toolbar/ColumnSelector.js +89 -65
  77. package/lib/Core/Components/Toolbar/ColumnSelector.js.map +1 -1
  78. package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
  79. package/lib/Core/Components/Toolbar/SimpleToolbar.js +4 -2
  80. package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
  81. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +2 -3
  82. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +1 -1
  83. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +92 -44
  84. package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +1 -1
  85. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js +3 -3
  86. package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js.map +1 -1
  87. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts +1 -1
  88. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -1
  89. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +3 -2
  90. package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js.map +1 -1
  91. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts +2 -2
  92. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts.map +1 -1
  93. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js +3 -2
  94. package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js.map +1 -1
  95. package/lib/Core/Components/Toolbar/hooks/useMore.d.ts.map +1 -1
  96. package/lib/Core/Components/Toolbar/hooks/useMore.js +2 -2
  97. package/lib/Core/Components/Toolbar/hooks/useMore.js.map +1 -1
  98. package/lib/Core/Components/Toolbar/hooks/useSearch.js +4 -4
  99. package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -1
  100. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +1 -1
  101. package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -1
  102. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts +6 -0
  103. package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts.map +1 -0
  104. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js +17 -0
  105. package/lib/Core/Components/Toolbar/hooks/useWrapAction.js.map +1 -0
  106. package/lib/Core/Components/Toolbar/utils/utils.d.ts +1 -1
  107. package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
  108. package/lib/Core/Components/Toolbar/utils/utils.js +2 -1
  109. package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
  110. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts +97 -0
  111. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts.map +1 -0
  112. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js +251 -0
  113. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -0
  114. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts +22 -0
  115. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts.map +1 -0
  116. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js +38 -0
  117. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js.map +1 -0
  118. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts +22 -0
  119. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts.map +1 -0
  120. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js +45 -0
  121. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js.map +1 -0
  122. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts +49 -0
  123. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -0
  124. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js +55 -0
  125. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -0
  126. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts +21 -0
  127. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts.map +1 -0
  128. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js +39 -0
  129. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js.map +1 -0
  130. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts +38 -0
  131. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts.map +1 -0
  132. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js +62 -0
  133. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js.map +1 -0
  134. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +112 -0
  135. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -0
  136. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +214 -0
  137. package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -0
  138. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +8 -5
  139. package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
  140. package/lib/Core/Components/Virtualise/index.js +9 -16
  141. package/lib/Core/Components/Virtualise/index.js.map +1 -1
  142. package/lib/Core/Components/Virtualise/utility.d.ts +1 -1
  143. package/lib/Core/Components/Virtualise/utility.d.ts.map +1 -1
  144. package/lib/Core/Components/Virtualise/utility.js +3 -2
  145. package/lib/Core/Components/Virtualise/utility.js.map +1 -1
  146. package/lib/Core/Hooks/a11y/useAnnounce.d.ts +19 -0
  147. package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -0
  148. package/lib/Core/Hooks/a11y/useAnnounce.js +49 -0
  149. package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -0
  150. package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
  151. package/lib/Core/Hooks/useDragDrop.js +2 -0
  152. package/lib/Core/Hooks/useDragDrop.js.map +1 -1
  153. package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
  154. package/lib/Core/Hooks/useRepeat.js +7 -0
  155. package/lib/Core/Hooks/useRepeat.js.map +1 -1
  156. package/lib/Core/Localization/defaultTranslations.d.ts +7 -49
  157. package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
  158. package/lib/Core/Localization/defaultTranslations.js +8 -50
  159. package/lib/Core/Localization/defaultTranslations.js.map +1 -1
  160. package/lib/Core/Test/JUnitMocks.d.ts +6 -617
  161. package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
  162. package/lib/Core/Test/JUnitMocks.js +5 -4
  163. package/lib/Core/Test/JUnitMocks.js.map +1 -1
  164. package/lib/Core/Utils/index.d.ts +11 -0
  165. package/lib/Core/Utils/index.d.ts.map +1 -1
  166. package/lib/Core/Utils/index.js +20 -8
  167. package/lib/Core/Utils/index.js.map +1 -1
  168. package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +1 -1
  169. package/lib/Core/Views/Gallery/StyledGalleryContainer.js +1 -0
  170. package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +1 -1
  171. package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
  172. package/lib/Core/Views/Gallery/index.js +7 -4
  173. package/lib/Core/Views/Gallery/index.js.map +1 -1
  174. package/lib/Core/Views/Map/index.d.ts.map +1 -1
  175. package/lib/Core/Views/Map/index.js +9 -3
  176. package/lib/Core/Views/Map/index.js.map +1 -1
  177. package/lib/Core/Views/Table/Row.d.ts +3 -1
  178. package/lib/Core/Views/Table/Row.d.ts.map +1 -1
  179. package/lib/Core/Views/Table/Row.js +5 -3
  180. package/lib/Core/Views/Table/Row.js.map +1 -1
  181. package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
  182. package/lib/Core/Views/Table/StyledTableContainer.js +7 -11
  183. package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
  184. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +3 -1
  185. package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
  186. package/lib/Core/Views/Table/VirtualizeWrapper.js +27 -4
  187. package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
  188. package/lib/Core/Views/Table/index.d.ts.map +1 -1
  189. package/lib/Core/Views/Table/index.js +2 -2
  190. package/lib/Core/Views/Table/index.js.map +1 -1
  191. package/lib/Core/Views/Table/useCountChange.d.ts +10 -0
  192. package/lib/Core/Views/Table/useCountChange.d.ts.map +1 -0
  193. package/lib/Core/Views/Table/useCountChange.js +39 -0
  194. package/lib/Core/Views/Table/useCountChange.js.map +1 -0
  195. package/lib/Core/Views/Timeline/Timeline.d.ts +5 -0
  196. package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -0
  197. package/lib/Core/Views/Timeline/Timeline.js +28 -0
  198. package/lib/Core/Views/Timeline/Timeline.js.map +1 -0
  199. package/lib/Core/Views/Timeline/Timeline.styles.d.ts +24 -0
  200. package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -0
  201. package/lib/Core/Views/Timeline/Timeline.styles.js +182 -0
  202. package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -0
  203. package/lib/Core/Views/Timeline/Timeline.types.d.ts +50 -0
  204. package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -0
  205. package/lib/Core/Views/Timeline/Timeline.types.js +2 -0
  206. package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -0
  207. package/lib/Core/Views/Timeline/TimelineItem.d.ts +12 -0
  208. package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -0
  209. package/lib/Core/Views/Timeline/TimelineItem.js +43 -0
  210. package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -0
  211. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +4 -0
  212. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -0
  213. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js +141 -0
  214. package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -0
  215. package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
  216. package/lib/Core/Views/Timeline/index.js +12 -6
  217. package/lib/Core/Views/Timeline/index.js.map +1 -1
  218. package/lib/Core/Views/Timeline/utility.d.ts +1 -1
  219. package/lib/Core/Views/Timeline/utility.d.ts.map +1 -1
  220. package/lib/Core/Views/Timeline/utility.js.map +1 -1
  221. package/lib/Core/Views/Timeline/utils.d.ts +12 -0
  222. package/lib/Core/Views/Timeline/utils.d.ts.map +1 -0
  223. package/lib/Core/Views/Timeline/utils.js +66 -0
  224. package/lib/Core/Views/Timeline/utils.js.map +1 -0
  225. package/package.json +7 -8
  226. package/lib/Core/Components/EmptyContainer.d.ts +0 -5
  227. package/lib/Core/Components/EmptyContainer.d.ts.map +0 -1
  228. package/lib/Core/Components/EmptyContainer.js +0 -12
  229. package/lib/Core/Components/EmptyContainer.js.map +0 -1
  230. package/lib/Core/Hooks/useSelect.d.ts +0 -9
  231. package/lib/Core/Hooks/useSelect.d.ts.map +0 -1
  232. package/lib/Core/Hooks/useSelect.js +0 -24
  233. package/lib/Core/Hooks/useSelect.js.map +0 -1
@@ -0,0 +1,182 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { Button, calculateFontSize, Card, CardContent, DateTimeDisplay, defaultThemeProp, Flex, Grid, StyledBackdrop, StyledIcon, useDirection } from '@pega/cosmos-react-core';
3
+ export const StyledCard = styled(Card)(({ theme }) => {
4
+ return css `
5
+ border-block-start: 0.0625rem solid ${theme.base.palette['border-line']};
6
+ padding-block: ${theme.base.spacing};
7
+
8
+ &:not(& &) {
9
+ border-radius: 0;
10
+ background-color: transparent;
11
+ }
12
+ `;
13
+ });
14
+ StyledCard.defaultProps = defaultThemeProp;
15
+ export const StyledTitle = styled.div `
16
+ display: -webkit-inline-box;
17
+ -webkit-line-clamp: 1;
18
+ -webkit-box-orient: vertical;
19
+ overflow: hidden;
20
+ `;
21
+ StyledTitle.defaultProps = defaultThemeProp;
22
+ export const StyledCardContent = styled(CardContent)(({ theme }) => {
23
+ return css `
24
+ &:not(${StyledCard} ${StyledCard} > &) {
25
+ padding: ${theme.base.spacing} 0 ${theme.base.spacing} ${theme.base['hit-area']['mouse-min']};
26
+ @media (pointer: coarse) {
27
+ padding-inline-start: ${theme.base['hit-area']['finger-min']};
28
+ }
29
+ }
30
+ `;
31
+ });
32
+ StyledCardContent.defaultProps = defaultThemeProp;
33
+ export const StyledToggleButton = styled(Button)(({ theme, collapsed }) => {
34
+ const { rtl } = useDirection();
35
+ return css `
36
+ ${StyledIcon} {
37
+ transition: transform calc(2 * ${theme.base.animation.speed})
38
+ ${theme.base.animation.timing.ease};
39
+ transform: ${collapsed ? `rotate(${rtl ? '90deg' : '-90deg'})` : 'rotate(0)'};
40
+ }
41
+ `;
42
+ });
43
+ StyledToggleButton.defaultProps = defaultThemeProp;
44
+ export const StyledCardHeader = styled(Grid) `
45
+ padding: 0;
46
+ min-height: 2rem;
47
+ `;
48
+ StyledCardHeader.defaultProps = defaultThemeProp;
49
+ export const StyledTimelineIcon = styled(Flex)(({ theme }) => {
50
+ return css `
51
+ border-radius: 50%;
52
+ color: ${theme.base.palette.light};
53
+ background: ${theme.base.palette.info};
54
+
55
+ & > ${StyledIcon} {
56
+ height: 1em;
57
+ width: 1em;
58
+ }
59
+ `;
60
+ });
61
+ StyledTimelineIcon.defaultProps = defaultThemeProp;
62
+ export const StyledBulletWrapper = styled.span(({ theme, hasPrev, hasNext, isPrevFuture, isNextFuture, hasIcon }) => {
63
+ const { rtl } = useDirection();
64
+ return css `
65
+ height: 100%;
66
+ position: relative;
67
+ text-align: center;
68
+ padding-block-start: calc(2.25 * ${theme.base.spacing} + 0.0625rem);
69
+ min-width: 2rem;
70
+
71
+ ${hasPrev &&
72
+ css `
73
+ &::before {
74
+ content: '';
75
+ display: block;
76
+ position: absolute;
77
+ inset-block-start: 0;
78
+ inset-inline-start: 50%;
79
+ transform: translateX(${rtl ? '50%' : '-50%'});
80
+ width: 0.0625rem;
81
+ height: calc(2.25 * ${theme.base.spacing} + 0.75rem);
82
+ border-inline-start: 0.0625rem ${isPrevFuture ? 'dashed' : 'solid'}
83
+ ${theme.base.palette.info};
84
+ }
85
+ `}
86
+ ${hasNext &&
87
+ css `
88
+ &::after {
89
+ content: '';
90
+ display: block;
91
+ position: absolute;
92
+ inset-block-start: calc(2.25 * ${theme.base.spacing} + 0.75rem);
93
+ inset-inline-start: 50%;
94
+ transform: translateX(${rtl ? '50%' : '-50%'});
95
+ width: 0.0625rem;
96
+ height: calc(100% - 2.25 * ${theme.base.spacing} - 0.75rem);
97
+ border-inline-start: 0.0625rem ${isNextFuture ? 'dashed' : 'solid'}
98
+ ${theme.base.palette.info};
99
+ }
100
+ `}
101
+ & > ${StyledTimelineIcon} {
102
+ position: relative;
103
+ margin: 0;
104
+ z-index: 1;
105
+ width: ${hasIcon ? '1.5rem' : '0.5rem'};
106
+ height: ${hasIcon ? '1.5rem' : '0.5rem'};
107
+ }
108
+
109
+ @media (min-width: ${theme.base.breakpoints.sm}) {
110
+ padding-block-start: calc(${theme.base.spacing} + 0.0625rem);
111
+ &::before {
112
+ height: calc(${theme.base.spacing} + 0.75rem);
113
+ }
114
+
115
+ &::after {
116
+ inset-block-start: calc(${theme.base.spacing} + 0.75rem);
117
+ height: calc(100% - ${theme.base.spacing} - 0.75rem);
118
+ }
119
+ }
120
+ `;
121
+ });
122
+ StyledBulletWrapper.defaultProps = defaultThemeProp;
123
+ export const StyledDate = styled.h2(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, spacing }, components: { text } } }) => {
124
+ const fontSizes = calculateFontSize(fontSize, fontScale);
125
+ return css `
126
+ grid-column: 1 / -1;
127
+ padding-block: calc(3 * ${spacing}) calc(1.25 * ${spacing});
128
+ font-size: ${fontSizes[text.h2['font-size']]};
129
+ font-weight: ${text.h2['font-weight']};
130
+ `;
131
+ });
132
+ StyledDate.defaultProps = defaultThemeProp;
133
+ export const StyledTimelineList = styled.ol `
134
+ display: contents;
135
+ `;
136
+ StyledTimelineList.defaultProps = defaultThemeProp;
137
+ export const StyledTimelineListItem = styled.li `
138
+ display: contents;
139
+
140
+ &:first-child ${StyledDate} {
141
+ padding-block-start: 0;
142
+ }
143
+
144
+ &:has(${StyledCardContent} .cell-content > span:empty):not(:has(${StyledTimelineList}))
145
+ ${StyledCard}
146
+ ${StyledToggleButton} {
147
+ display: none;
148
+ }
149
+ `;
150
+ StyledTimelineListItem.defaultProps = defaultThemeProp;
151
+ export const StyledTimeline = styled.ol(({ theme }) => {
152
+ return css `
153
+ @media (min-width: ${theme.base.breakpoints.sm}) {
154
+ ${StyledCard} {
155
+ padding-block: calc(0.5 * ${theme.base.spacing});
156
+ }
157
+ }
158
+ `;
159
+ });
160
+ StyledTimeline.defaultProps = defaultThemeProp;
161
+ export const StyledTime = styled(DateTimeDisplay)(({ theme }) => {
162
+ return css `
163
+ opacity: ${theme.base.transparency['transparent-2']};
164
+ white-space: nowrap;
165
+ @media (min-width: ${theme.base.breakpoints.sm}) {
166
+ text-align: end;
167
+ line-height: ${theme.base['hit-area']['mouse-min']};
168
+ padding-block-start: calc(0.5 * ${theme.base.spacing} + 0.0625rem);
169
+ }
170
+ `;
171
+ });
172
+ StyledTime.defaultProps = defaultThemeProp;
173
+ export const StyledLoadingCell = styled.div `
174
+ grid-column: 1 / -1;
175
+ position: relative;
176
+ height: 2.8rem;
177
+
178
+ ${StyledBackdrop} {
179
+ background: transparent;
180
+ }
181
+ `;
182
+ //# sourceMappingURL=Timeline.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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AAI,CAAC,OAAO;;GAEvD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;IAKvC,cAAc;;;CAGjB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport type { FontSize } from '@pega/cosmos-react-core';\nimport {\n Button,\n calculateFontSize,\n Card,\n CardContent,\n DateTimeDisplay,\n defaultThemeProp,\n Flex,\n Grid,\n StyledBackdrop,\n StyledIcon,\n useDirection\n} from '@pega/cosmos-react-core';\n\nexport const StyledCard = styled(Card)(({ theme }) => {\n return css`\n border-block-start: 0.0625rem solid ${theme.base.palette['border-line']};\n padding-block: ${theme.base.spacing};\n\n &:not(& &) {\n border-radius: 0;\n background-color: transparent;\n }\n `;\n});\n\nStyledCard.defaultProps = defaultThemeProp;\n\nexport const StyledTitle = styled.div`\n display: -webkit-inline-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n\nStyledTitle.defaultProps = defaultThemeProp;\n\nexport const StyledCardContent = styled(CardContent)(({ theme }) => {\n return css`\n &:not(${StyledCard} ${StyledCard} > &) {\n padding: ${theme.base.spacing} 0 ${theme.base.spacing} ${theme.base['hit-area']['mouse-min']};\n @media (pointer: coarse) {\n padding-inline-start: ${theme.base['hit-area']['finger-min']};\n }\n }\n `;\n});\n\nStyledCardContent.defaultProps = defaultThemeProp;\n\nexport const StyledToggleButton = styled(Button)<{ collapsed: boolean }>(({ theme, collapsed }) => {\n const { rtl } = useDirection();\n return css`\n ${StyledIcon} {\n transition: transform calc(2 * ${theme.base.animation.speed})\n ${theme.base.animation.timing.ease};\n transform: ${collapsed ? `rotate(${rtl ? '90deg' : '-90deg'})` : 'rotate(0)'};\n }\n `;\n});\n\nStyledToggleButton.defaultProps = defaultThemeProp;\n\nexport const StyledCardHeader = styled(Grid)`\n padding: 0;\n min-height: 2rem;\n`;\n\nStyledCardHeader.defaultProps = defaultThemeProp;\n\nexport const StyledTimelineIcon = styled(Flex)(({ theme }) => {\n return css`\n border-radius: 50%;\n color: ${theme.base.palette.light};\n background: ${theme.base.palette.info};\n\n & > ${StyledIcon} {\n height: 1em;\n width: 1em;\n }\n `;\n});\n\nStyledTimelineIcon.defaultProps = defaultThemeProp;\n\ninterface StyledBulletWrapperProps {\n hasPrev: boolean;\n hasNext: boolean;\n isPrevFuture: boolean;\n isNextFuture: boolean;\n hasIcon: boolean;\n}\n\nexport const StyledBulletWrapper = styled.span<StyledBulletWrapperProps>(\n ({ theme, hasPrev, hasNext, isPrevFuture, isNextFuture, hasIcon }) => {\n const { rtl } = useDirection();\n return css`\n height: 100%;\n position: relative;\n text-align: center;\n padding-block-start: calc(2.25 * ${theme.base.spacing} + 0.0625rem);\n min-width: 2rem;\n\n ${hasPrev &&\n css`\n &::before {\n content: '';\n display: block;\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 50%;\n transform: translateX(${rtl ? '50%' : '-50%'});\n width: 0.0625rem;\n height: calc(2.25 * ${theme.base.spacing} + 0.75rem);\n border-inline-start: 0.0625rem ${isPrevFuture ? 'dashed' : 'solid'}\n ${theme.base.palette.info};\n }\n `}\n ${hasNext &&\n css`\n &::after {\n content: '';\n display: block;\n position: absolute;\n inset-block-start: calc(2.25 * ${theme.base.spacing} + 0.75rem);\n inset-inline-start: 50%;\n transform: translateX(${rtl ? '50%' : '-50%'});\n width: 0.0625rem;\n height: calc(100% - 2.25 * ${theme.base.spacing} - 0.75rem);\n border-inline-start: 0.0625rem ${isNextFuture ? 'dashed' : 'solid'}\n ${theme.base.palette.info};\n }\n `}\n & > ${StyledTimelineIcon} {\n position: relative;\n margin: 0;\n z-index: 1;\n width: ${hasIcon ? '1.5rem' : '0.5rem'};\n height: ${hasIcon ? '1.5rem' : '0.5rem'};\n }\n\n @media (min-width: ${theme.base.breakpoints.sm}) {\n padding-block-start: calc(${theme.base.spacing} + 0.0625rem);\n &::before {\n height: calc(${theme.base.spacing} + 0.75rem);\n }\n\n &::after {\n inset-block-start: calc(${theme.base.spacing} + 0.75rem);\n height: calc(100% - ${theme.base.spacing} - 0.75rem);\n }\n }\n `;\n }\n);\n\nStyledBulletWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledDate = styled.h2(\n ({\n theme: {\n base: { 'font-size': fontSize, 'font-scale': fontScale, spacing },\n components: { text }\n }\n }) => {\n const fontSizes = calculateFontSize(fontSize, fontScale);\n return css`\n grid-column: 1 / -1;\n padding-block: calc(3 * ${spacing}) calc(1.25 * ${spacing});\n font-size: ${fontSizes[text.h2['font-size'] as FontSize]};\n font-weight: ${text.h2['font-weight']};\n `;\n }\n);\n\nStyledDate.defaultProps = defaultThemeProp;\n\nexport const StyledTimelineList = styled.ol`\n display: contents;\n`;\n\nStyledTimelineList.defaultProps = defaultThemeProp;\n\nexport const StyledTimelineListItem = styled.li`\n display: contents;\n\n &:first-child ${StyledDate} {\n padding-block-start: 0;\n }\n\n &:has(${StyledCardContent} .cell-content > span:empty):not(:has(${StyledTimelineList}))\n ${StyledCard}\n ${StyledToggleButton} {\n display: none;\n }\n`;\n\nStyledTimelineListItem.defaultProps = defaultThemeProp;\n\nexport const StyledTimeline = styled.ol(({ theme }) => {\n return css`\n @media (min-width: ${theme.base.breakpoints.sm}) {\n ${StyledCard} {\n padding-block: calc(0.5 * ${theme.base.spacing});\n }\n }\n `;\n});\n\nStyledTimeline.defaultProps = defaultThemeProp;\n\nexport const StyledTime = styled(DateTimeDisplay)(({ theme }) => {\n return css`\n opacity: ${theme.base.transparency['transparent-2']};\n white-space: nowrap;\n @media (min-width: ${theme.base.breakpoints.sm}) {\n text-align: end;\n line-height: ${theme.base['hit-area']['mouse-min']};\n padding-block-start: calc(0.5 * ${theme.base.spacing} + 0.0625rem);\n }\n `;\n});\n\nStyledTime.defaultProps = defaultThemeProp;\n\nexport const StyledLoadingCell = styled.div`\n grid-column: 1 / -1;\n position: relative;\n height: 2.8rem;\n\n ${StyledBackdrop} {\n background: transparent;\n }\n`;\n"]}
@@ -0,0 +1,50 @@
1
+ import type { ReactElement, ReactNode, Ref } from 'react';
2
+ import type { BaseProps, DateTimeDisplayProps, FieldValueListProps, IconProps, NoChildrenProp, StatusProps } from '@pega/cosmos-react-core';
3
+ import type { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';
4
+ export interface ActivityObject {
5
+ /** Unique id for activity */
6
+ id: string;
7
+ /** Date as ISO8601 string, timestamp or native Date object. */
8
+ date: string | number | Date;
9
+ /**
10
+ * Controls date time variant. Set to 'time' when groupBy is 'date'.
11
+ * @default datetime
12
+ */
13
+ dateVariant?: DateTimeDisplayProps['variant'];
14
+ /** Header region for rendering text and links. */
15
+ title: ReactNode;
16
+ /** Name of the icon (to be selected from default Pega icon set) */
17
+ icon?: IconProps['name'];
18
+ /**
19
+ * Default visually expanded state for the activity item.
20
+ * @default false
21
+ */
22
+ defaultExpanded?: boolean;
23
+ /** Represents the current status of activity */
24
+ status?: StatusProps;
25
+ /** The set of field values to render in the list. */
26
+ content?: FieldValueListProps['fields'] | ReactElement;
27
+ }
28
+ export type TimelineSortOrder = 'ascending' | 'descending';
29
+ export type TimelineGroupBy = Extract<DateTimeVariant, 'date' | 'monthyear' | 'quarteryear' | 'year'> | 'none';
30
+ export default interface TimelineProps extends BaseProps, NoChildrenProp {
31
+ /** List of activity */
32
+ activity: ActivityObject[];
33
+ /** Current time as Date */
34
+ currentTime: Date;
35
+ /**
36
+ * List of activity grouped by day, month, quarter or year.
37
+ * @default 'date'
38
+ */
39
+ groupBy?: TimelineGroupBy;
40
+ /**
41
+ * Show a Progress indicator at the end of a list where newly loaded items will be appended.
42
+ * @default false
43
+ */
44
+ loading?: boolean;
45
+ /** Callback to fetch more activity items */
46
+ loadMore?: () => void;
47
+ /** Ref for the wrapping element. */
48
+ ref?: Ref<HTMLTableElement>;
49
+ }
50
+ //# sourceMappingURL=Timeline.types.d.ts.map
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H,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Timeline.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timeline.types.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/Timeline.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactElement, ReactNode, Ref } from 'react';\n\nimport type {\n BaseProps,\n DateTimeDisplayProps,\n FieldValueListProps,\n IconProps,\n NoChildrenProp,\n StatusProps\n} from '@pega/cosmos-react-core';\nimport type { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';\n\nexport interface ActivityObject {\n /** Unique id for activity */\n id: string;\n /** Date as ISO8601 string, timestamp or native Date object. */\n date: string | number | Date;\n /**\n * Controls date time variant. Set to 'time' when groupBy is 'date'.\n * @default datetime\n */\n dateVariant?: DateTimeDisplayProps['variant'];\n /** Header region for rendering text and links. */\n title: ReactNode;\n /** Name of the icon (to be selected from default Pega icon set) */\n icon?: IconProps['name'];\n /**\n * Default visually expanded state for the activity item.\n * @default false\n */\n defaultExpanded?: boolean;\n /** Represents the current status of activity */\n status?: StatusProps;\n /** The set of field values to render in the list. */\n content?: FieldValueListProps['fields'] | ReactElement;\n}\n\nexport type TimelineSortOrder = 'ascending' | 'descending';\nexport type TimelineGroupBy =\n | Extract<DateTimeVariant, 'date' | 'monthyear' | 'quarteryear' | 'year'>\n | 'none';\n\nexport default interface TimelineProps extends BaseProps, NoChildrenProp {\n /** List of activity */\n activity: ActivityObject[];\n /** Current time as Date */\n currentTime: Date;\n /**\n * List of activity grouped by day, month, quarter or year.\n * @default 'date'\n */\n groupBy?: TimelineGroupBy;\n /**\n * Show a Progress indicator at the end of a list where newly loaded items will be appended.\n * @default false\n */\n loading?: boolean;\n /** Callback to fetch more activity items */\n loadMore?: () => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLTableElement>;\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import type { FunctionComponent } from 'react';
2
+ import type { ForwardProps } from '@pega/cosmos-react-core';
3
+ import type { ActivityObject } from './Timeline.types';
4
+ interface TimelineItemProps {
5
+ item: ActivityObject;
6
+ prevItemDate: ActivityObject['date'] | undefined;
7
+ nextItemDate: ActivityObject['date'] | undefined;
8
+ currentTime: Date;
9
+ }
10
+ declare const TimelineItem: FunctionComponent<TimelineItemProps & ForwardProps>;
11
+ export default TimelineItem;
12
+ //# sourceMappingURL=TimelineItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimelineItem.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/TimelineItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,OAAO,CAAC;AAG7D,OAAO,KAAK,EAA2B,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAsBrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,UAAU,iBAAiB;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,YAAY,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACjD,YAAY,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACjD,WAAW,EAAE,IAAI,CAAC;CACnB;AAgBD,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAgHrE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef, useState } from 'react';
3
+ import { ExpandCollapse, FieldValueItem, Grid, Icon, Status, useBreakpoint, isValidElement } from '@pega/cosmos-react-core';
4
+ import { StyledBulletWrapper, StyledCard, StyledCardContent, StyledCardHeader, StyledTime, StyledTimelineIcon, StyledTimelineListItem, StyledTitle, StyledToggleButton } from './Timeline.styles';
5
+ import { isFutureDate } from './utils';
6
+ const shouldRenderContent = (content) => {
7
+ if (!content) {
8
+ return false;
9
+ }
10
+ if (Array.isArray(content)) {
11
+ return content.length > 0;
12
+ }
13
+ return true;
14
+ };
15
+ const TimelineItem = ({ item: { date, dateVariant = 'datetime', title, icon, defaultExpanded = false, status, content }, prevItemDate, nextItemDate, currentTime }) => {
16
+ const [expanded, setExpanded] = useState(defaultExpanded);
17
+ const isSmallOrAbove = useBreakpoint('sm');
18
+ const contentListRef = useRef(null);
19
+ const isSMContentWidthOrAbove = useBreakpoint('sm', {
20
+ breakpointRef: contentListRef
21
+ });
22
+ return (_jsxs(StyledTimelineListItem, { children: [isSmallOrAbove && _jsx(StyledTime, { variant: dateVariant, value: date, format: 'short' }), _jsx(StyledBulletWrapper, { hasIcon: !!icon, hasPrev: !!prevItemDate, hasNext: !!nextItemDate, isPrevFuture: isFutureDate(prevItemDate, currentTime), isNextFuture: isFutureDate(nextItemDate, currentTime), children: _jsx(StyledTimelineIcon, { container: { inline: true, alignItems: 'center', justify: 'center' }, children: icon && _jsx(Icon, { name: icon }) }) }), _jsxs("div", { children: [_jsx("div", { children: _jsx(StyledCard, { children: _jsxs(StyledCardHeader, { container: {
23
+ cols: 'auto 1fr',
24
+ alignContent: 'evenly',
25
+ alignItems: 'center',
26
+ gap: 0.5
27
+ }, sm: { container: { cols: 'auto 1fr auto' } }, children: [shouldRenderContent(content) && (_jsx(StyledToggleButton, { icon: true, variant: 'simple', onClick: () => {
28
+ setExpanded(cur => !cur);
29
+ }, collapsed: !expanded, "aria-expanded": expanded, compact: true, children: _jsx(Icon, { name: 'caret-down' }) })), _jsxs(Grid, { item: { colStart: '2', colEnd: '2' }, container: { rowGap: 0.25 }, children: [_jsx(StyledTitle, { children: title }), !isSmallOrAbove && (_jsxs(Grid, { container: {
30
+ cols: '1fr auto',
31
+ alignContent: 'evenly',
32
+ alignItems: 'center'
33
+ }, children: [_jsx(StyledTime, { variant: 'time', value: date, format: 'short' }), status && _jsx(Status, { variant: status.variant, children: status.children })] }))] }), isSmallOrAbove && status && (_jsx(Grid, { sm: { item: { colStart: '3', colEnd: '3' } }, children: _jsx(Status, { variant: status.variant, children: status.children }) }))] }) }) }), shouldRenderContent(content) && (_jsx(ExpandCollapse, { dimension: 'height', collapsed: !expanded, children: _jsx(StyledCardContent, { children: isValidElement(content) ? (content) : (_jsx(Grid, { container: {
34
+ gap: 1,
35
+ cols: isSMContentWidthOrAbove
36
+ ? `repeat(${content.length > 1 ? '2' : '1'}, minmax(16ch, auto) minmax(25%, 1fr))`
37
+ : 'minmax(0, 1fr)'
38
+ }, ref: contentListRef, children: content.map(({ id, name, value, variant }) => {
39
+ return (_jsx(FieldValueItem, { name: name, value: value, variant: isSmallOrAbove ? variant : 'stacked' }, id ?? name));
40
+ }) })) }) }))] })] }));
41
+ };
42
+ export default TimelineItem;
43
+ //# sourceMappingURL=TimelineItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimelineItem.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/TimelineItem.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGzC,OAAO,EACL,cAAc,EACd,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,aAAa,EACb,cAAc,EACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AASvC,MAAM,mBAAmB,GAAG,CAC1B,OAA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AC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,YAChD,KAAC,MAAM,IAAC,OAAO,EAAE,MAAM,CAAC,OAAO,YAAG,MAAM,CAAC,QAAQ,GAAU,GACtD,CACR,IACgB,GACR,GACT,EACL,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAC/B,KAAC,cAAc,IAAC,SAAS,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,QAAQ,YACrD,KAAC,iBAAiB,cACf,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CACzB,OAAO,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IACH,SAAS,EAAE;oCACT,GAAG,EAAE,CAAC;oCACN,IAAI,EAAE,uBAAuB;wCAC3B,CAAC,CAAC,UACE,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAC7B,wCAAwC;wCAC1C,CAAC,CAAC,gBAAgB;iCACrB,EACD,GAAG,EAAE,cAAc,YAElB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;oCAC5C,OAAO,CACL,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IACxC,EAAE,IAAI,IAAI,CACf,CACH,CAAC;gCACJ,CAAC,CAAC,GACG,CACR,GACiB,GACL,CAClB,IACG,IACiB,CAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import type { FunctionComponent, ReactElement } from 'react';\nimport { useRef, useState } from 'react';\n\nimport type { FieldValueListItemProps, ForwardProps } from '@pega/cosmos-react-core';\nimport {\n ExpandCollapse,\n FieldValueItem,\n Grid,\n Icon,\n Status,\n useBreakpoint,\n isValidElement\n} from '@pega/cosmos-react-core';\n\nimport {\n StyledBulletWrapper,\n StyledCard,\n StyledCardContent,\n StyledCardHeader,\n StyledTime,\n StyledTimelineIcon,\n StyledTimelineListItem,\n StyledTitle,\n StyledToggleButton\n} from './Timeline.styles';\nimport type { ActivityObject } from './Timeline.types';\nimport { isFutureDate } from './utils';\n\ninterface TimelineItemProps {\n item: ActivityObject;\n prevItemDate: ActivityObject['date'] | undefined;\n nextItemDate: ActivityObject['date'] | undefined;\n currentTime: Date;\n}\n\nconst shouldRenderContent = (\n content: ActivityObject['content']\n): content is [FieldValueListItemProps, ...FieldValueListItemProps[]] | ReactElement => {\n if (!content) {\n return false;\n }\n\n if (Array.isArray(content)) {\n return content.length > 0;\n }\n\n return true;\n};\n\nconst TimelineItem: FunctionComponent<TimelineItemProps & ForwardProps> = ({\n item: { date, dateVariant = 'datetime', title, icon, defaultExpanded = false, status, content },\n prevItemDate,\n nextItemDate,\n currentTime\n}: TimelineItemProps & ForwardProps) => {\n const [expanded, setExpanded] = useState(defaultExpanded);\n const isSmallOrAbove = useBreakpoint('sm');\n\n const contentListRef = useRef<HTMLDivElement>(null);\n const isSMContentWidthOrAbove = useBreakpoint('sm', {\n breakpointRef: contentListRef\n });\n\n return (\n <StyledTimelineListItem>\n {isSmallOrAbove && <StyledTime variant={dateVariant} value={date} format='short' />}\n <StyledBulletWrapper\n hasIcon={!!icon}\n hasPrev={!!prevItemDate}\n hasNext={!!nextItemDate}\n isPrevFuture={isFutureDate(prevItemDate, currentTime)}\n isNextFuture={isFutureDate(nextItemDate, currentTime)}\n >\n <StyledTimelineIcon container={{ inline: true, alignItems: 'center', justify: 'center' }}>\n {icon && <Icon name={icon} />}\n </StyledTimelineIcon>\n </StyledBulletWrapper>\n <div>\n <div>\n <StyledCard>\n <StyledCardHeader\n container={{\n cols: 'auto 1fr',\n alignContent: 'evenly',\n alignItems: 'center',\n gap: 0.5\n }}\n sm={{ container: { cols: 'auto 1fr auto' } }}\n >\n {shouldRenderContent(content) && (\n <StyledToggleButton\n icon\n variant='simple'\n onClick={() => {\n setExpanded(cur => !cur);\n }}\n collapsed={!expanded}\n aria-expanded={expanded}\n compact\n >\n <Icon name='caret-down' />\n </StyledToggleButton>\n )}\n <Grid item={{ colStart: '2', colEnd: '2' }} container={{ rowGap: 0.25 }}>\n <StyledTitle>{title}</StyledTitle>\n {!isSmallOrAbove && (\n <Grid\n container={{\n cols: '1fr auto',\n alignContent: 'evenly',\n alignItems: 'center'\n }}\n >\n <StyledTime variant='time' value={date} format='short' />\n {status && <Status variant={status.variant}>{status.children}</Status>}\n </Grid>\n )}\n </Grid>\n {isSmallOrAbove && status && (\n <Grid sm={{ item: { colStart: '3', colEnd: '3' } }}>\n <Status variant={status.variant}>{status.children}</Status>\n </Grid>\n )}\n </StyledCardHeader>\n </StyledCard>\n </div>\n {shouldRenderContent(content) && (\n <ExpandCollapse dimension='height' collapsed={!expanded}>\n <StyledCardContent>\n {isValidElement(content) ? (\n content\n ) : (\n <Grid\n container={{\n gap: 1,\n cols: isSMContentWidthOrAbove\n ? `repeat(${\n content.length > 1 ? '2' : '1'\n }, minmax(16ch, auto) minmax(25%, 1fr))`\n : 'minmax(0, 1fr)'\n }}\n ref={contentListRef}\n >\n {content.map(({ id, name, value, variant }) => {\n return (\n <FieldValueItem\n name={name}\n value={value}\n variant={isSmallOrAbove ? variant : 'stacked'}\n key={id ?? name}\n />\n );\n })}\n </Grid>\n )}\n </StyledCardContent>\n </ExpandCollapse>\n )}\n </div>\n </StyledTimelineListItem>\n );\n};\n\nexport default TimelineItem;\n"]}
@@ -0,0 +1,4 @@
1
+ import type TimelineProps from '../Timeline.types';
2
+ declare const activity: TimelineProps['activity'];
3
+ export default activity;
4
+ //# sourceMappingURL=Timeline.mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timeline.mocks.d.ts","sourceRoot":"","sources":["../../../../../Core/Views/Timeline/__tests__/Timeline.mocks.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAEnD,QAAA,MAAM,QAAQ,EAAE,aAAa,CAAC,UAAU,CA+JvC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,141 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Link, CurrencyDisplay, Text, HTML } from '@pega/cosmos-react-core';
3
+ const activity = [
4
+ {
5
+ id: '1',
6
+ date: Date.UTC(2025, 2, 20, 19, 28, 22),
7
+ title: 'Email blast: "Buy today"',
8
+ icon: 'bell-off-solid',
9
+ content: [
10
+ {
11
+ id: '11',
12
+ name: 'Progress and Risk',
13
+ value: _jsx(HTML, { content: '<ul><li>Progress</li><li>Risk</li></ul>' })
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ id: '2',
19
+ date: Date.UTC(2025, 2, 20, 18, 6, 22),
20
+ title: 'Confirm eligibility',
21
+ icon: 'circle-stacked-mixed'
22
+ },
23
+ {
24
+ id: '3',
25
+ date: Date.UTC(2023, 2, 10, 9, 26, 22),
26
+ title: 'Review customer bill',
27
+ status: { variant: 'pending', children: 'Wait' }
28
+ },
29
+ {
30
+ id: '4',
31
+ date: Date.UTC(2022, 7, 10, 18, 6, 22),
32
+ title: 'Confirm eligibility',
33
+ icon: 'circle-stacked-mixed'
34
+ },
35
+ {
36
+ id: '5',
37
+ date: Date.UTC(2022, 6, 18, 0, 1, 22),
38
+ title: (_jsx(Link, { href: 'https://www.pega.com', target: '_blank', children: "Visit Pega" }))
39
+ },
40
+ {
41
+ id: '6',
42
+ date: Date.UTC(2021, 6, 10, 13, 20, 22),
43
+ title: 'Update plat',
44
+ icon: 'bulb-solid',
45
+ status: { variant: 'success', children: 'Good' }
46
+ },
47
+ {
48
+ id: '7',
49
+ date: Date.UTC(2021, 1, 20, 13, 20, 22),
50
+ title: 'Sent over request',
51
+ icon: 'bulb-solid',
52
+ defaultExpanded: true,
53
+ status: { variant: 'success', children: 'Good' },
54
+ content: [
55
+ { id: '31', name: 'Date range', value: _jsx(Text, { children: "Jan 1, 2021 - May 3, 2021" }) },
56
+ {
57
+ id: '32',
58
+ name: "What's next",
59
+ value: (_jsx(Text, { children: "We will fulfill your request within 3 business days. You will receive your statement copy via mail at 23 Main St. Boston, MA." }))
60
+ },
61
+ {
62
+ id: '33',
63
+ name: 'Current due amount',
64
+ value: _jsx(CurrencyDisplay, { value: 1343.45, currencyISOCode: 'USD' })
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ id: '8',
70
+ date: Date.UTC(2021, 1, 20, 13, 19, 22),
71
+ title: 'Fulfill customer request for last month’s billing statement',
72
+ icon: 'layers',
73
+ status: { variant: 'pending', children: 'Wait' },
74
+ content: [
75
+ { id: '41', name: 'Date range', value: _jsx(Text, { children: "Jan 1, 2021 - May 3, 2021" }) },
76
+ {
77
+ id: '42',
78
+ name: "What's next",
79
+ value: (_jsx(Text, { children: "We will fulfill your request within 3 business days. You will receive your statement copy via mail at 23 Main St. Boston, MA." }))
80
+ },
81
+ {
82
+ id: '43',
83
+ name: 'Current due amount',
84
+ value: _jsx(CurrencyDisplay, { value: 121, currencyISOCode: 'USD' })
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ id: '9',
90
+ date: Date.UTC(2021, 1, 20, 0, 1, 22),
91
+ title: (_jsx(Link, { href: 'https://community.pega.com/support', target: '_blank', children: "Visit Pega support for assistance" }))
92
+ },
93
+ {
94
+ id: '10',
95
+ date: Date.UTC(2021, 1, 19, 13, 20, 22),
96
+ title: 'Sent over request',
97
+ icon: 'bulb-solid',
98
+ status: { variant: 'success', children: 'Good' },
99
+ content: [
100
+ { id: '61', name: 'Date range', value: _jsx(Text, { children: "Jan 1, 2021 - May 3, 2021" }) },
101
+ {
102
+ id: '62',
103
+ name: "What's next",
104
+ value: (_jsx(Text, { children: "We will fulfill your request within 3 business days. You will receive your statement copy via mail at 23 Main St. Boston, MA." }))
105
+ },
106
+ {
107
+ id: '64',
108
+ name: 'Current due amount long label',
109
+ value: _jsx(CurrencyDisplay, { value: 248.87, currencyISOCode: 'USD' })
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ id: '11',
115
+ date: Date.UTC(2021, 1, 17, 36, 20, 22),
116
+ title: 'Initial claim received',
117
+ status: { variant: 'pending', children: 'Wait' }
118
+ },
119
+ {
120
+ id: '12',
121
+ date: Date.UTC(2020, 12, 15, 13, 19, 22),
122
+ title: 'Balance inquiry',
123
+ icon: 'phone-solid',
124
+ status: { variant: 'pending', children: 'Wait' }
125
+ },
126
+ {
127
+ id: '13',
128
+ date: Date.UTC(2020, 2, 20, 19, 28, 22),
129
+ title: 'Email blast: "Best Offer"',
130
+ icon: 'bell-off-solid'
131
+ },
132
+ {
133
+ id: '14',
134
+ date: Date.UTC(2020, 1, 12, 10, 25, 48),
135
+ title: 'Receive customer bill',
136
+ icon: 'layers',
137
+ status: { variant: 'success', children: 'Good' }
138
+ }
139
+ ];
140
+ export default activity;
141
+ //# sourceMappingURL=Timeline.mocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timeline.mocks.js","sourceRoot":"","sources":["../../../../../Core/Views/Timeline/__tests__/Timeline.mocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAI5E,MAAM,QAAQ,GAA8B;IAC1C;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QACvC,KAAK,EAAE,0BAA0B;QACjC,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE;YACP;gBACE,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,KAAC,IAAI,IAAC,OAAO,EAAC,yCAAyC,GAAG;aAClE;SACF;KACF;IACD;QACE,EAAE,EAAE,GA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,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QACxC,KAAK,EAAE,iBAAiB;QACxB,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE;KACjD;IACD;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QACvC,KAAK,EAAE,2BAA2B;QAClC,IAAI,EAAE,gBAAgB;KACvB;IACD;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;QACvC,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE;KACjD;CACF,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { Link, CurrencyDisplay, Text, HTML } from '@pega/cosmos-react-core';\n\nimport type TimelineProps from '../Timeline.types';\n\nconst activity: TimelineProps['activity'] = [\n {\n id: '1',\n date: Date.UTC(2025, 2, 20, 19, 28, 22),\n title: 'Email blast: \"Buy today\"',\n icon: 'bell-off-solid',\n content: [\n {\n id: '11',\n name: 'Progress and Risk',\n value: <HTML content='<ul><li>Progress</li><li>Risk</li></ul>' />\n }\n ]\n },\n {\n id: '2',\n date: Date.UTC(2025, 2, 20, 18, 6, 22),\n title: 'Confirm eligibility',\n icon: 'circle-stacked-mixed'\n },\n {\n id: '3',\n date: Date.UTC(2023, 2, 10, 9, 26, 22),\n title: 'Review customer bill',\n status: { variant: 'pending', children: 'Wait' }\n },\n {\n id: '4',\n date: Date.UTC(2022, 7, 10, 18, 6, 22),\n title: 'Confirm eligibility',\n icon: 'circle-stacked-mixed'\n },\n {\n id: '5',\n date: Date.UTC(2022, 6, 18, 0, 1, 22),\n title: (\n <Link href='https://www.pega.com' target='_blank'>\n Visit Pega\n </Link>\n )\n },\n {\n id: '6',\n date: Date.UTC(2021, 6, 10, 13, 20, 22),\n title: 'Update plat',\n icon: 'bulb-solid',\n status: { variant: 'success', children: 'Good' }\n },\n {\n id: '7',\n date: Date.UTC(2021, 1, 20, 13, 20, 22),\n title: 'Sent over request',\n icon: 'bulb-solid',\n defaultExpanded: true,\n status: { variant: 'success', children: 'Good' },\n content: [\n { id: '31', name: 'Date range', value: <Text>Jan 1, 2021 - May 3, 2021</Text> },\n {\n id: '32',\n name: \"What's next\",\n value: (\n <Text>\n We will fulfill your request within 3 business days. You will receive your statement\n copy via mail at 23 Main St. Boston, MA.\n </Text>\n )\n },\n {\n id: '33',\n name: 'Current due amount',\n value: <CurrencyDisplay value={1343.45} currencyISOCode='USD' />\n }\n ]\n },\n {\n id: '8',\n date: Date.UTC(2021, 1, 20, 13, 19, 22),\n title: 'Fulfill customer request for last month’s billing statement',\n icon: 'layers',\n status: { variant: 'pending', children: 'Wait' },\n content: [\n { id: '41', name: 'Date range', value: <Text>Jan 1, 2021 - May 3, 2021</Text> },\n {\n id: '42',\n name: \"What's next\",\n value: (\n <Text>\n We will fulfill your request within 3 business days. You will receive your statement\n copy via mail at 23 Main St. Boston, MA.\n </Text>\n )\n },\n {\n id: '43',\n name: 'Current due amount',\n value: <CurrencyDisplay value={121} currencyISOCode='USD' />\n }\n ]\n },\n {\n id: '9',\n date: Date.UTC(2021, 1, 20, 0, 1, 22),\n title: (\n <Link href='https://community.pega.com/support' target='_blank'>\n Visit Pega support for assistance\n </Link>\n )\n },\n {\n id: '10',\n date: Date.UTC(2021, 1, 19, 13, 20, 22),\n title: 'Sent over request',\n icon: 'bulb-solid',\n status: { variant: 'success', children: 'Good' },\n content: [\n { id: '61', name: 'Date range', value: <Text>Jan 1, 2021 - May 3, 2021</Text> },\n {\n id: '62',\n name: \"What's next\",\n value: (\n <Text>\n We will fulfill your request within 3 business days. You will receive your statement\n copy via mail at 23 Main St. Boston, MA.\n </Text>\n )\n },\n {\n id: '64',\n name: 'Current due amount long label',\n value: <CurrencyDisplay value={248.87} currencyISOCode='USD' />\n }\n ]\n },\n {\n id: '11',\n date: Date.UTC(2021, 1, 17, 36, 20, 22),\n title: 'Initial claim received',\n status: { variant: 'pending', children: 'Wait' }\n },\n {\n id: '12',\n date: Date.UTC(2020, 12, 15, 13, 19, 22),\n title: 'Balance inquiry',\n icon: 'phone-solid',\n status: { variant: 'pending', children: 'Wait' }\n },\n {\n id: '13',\n date: Date.UTC(2020, 2, 20, 19, 28, 22),\n title: 'Email blast: \"Best Offer\"',\n icon: 'bell-off-solid'\n },\n {\n id: '14',\n date: Date.UTC(2020, 1, 12, 10, 25, 48),\n title: 'Receive customer bill',\n icon: 'layers',\n status: { variant: 'success', children: 'Good' }\n }\n];\n\nexport default activity;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AA+DlE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;CACxB;AACD,QAAA,MAAM,QAAQ,GAAI,UAAU,iBAAiB,4CAyE5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAkElE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;CACxB;AAED,QAAA,MAAM,QAAQ,GAAI,UAAU,iBAAiB,4CAwF5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,19 +1,21 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useCallback, useMemo, useState, useRef } from 'react';
3
3
  import styled, { css } from 'styled-components';
4
- import { Timeline as TimelineCosmos } from '@pega/cosmos-react-work';
5
4
  import { defaultThemeProp, useFullscreenContext } from '@pega/cosmos-react-core';
6
5
  // TODO remove ts-ignore once Toolbar migrated to TS
7
6
  // @ts-ignore
8
7
  import Toolbar from '../../Components/Toolbar';
9
- import EmptyContainer from '../../Components/EmptyContainer';
10
8
  import RenderView from '../../Components/RenderingEngine/RenderView';
11
9
  import getCount from '../../Components/Toolbar/utils/getCount';
12
10
  import { EXTERNAL_FILTERS } from '../../constants';
13
11
  import RsCardWrapper from '../RsCardWrapper';
14
12
  import { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';
13
+ import EmptyContainer from '../../Components/DefaultComponents/EmptyContainer';
14
+ import { isFilterApplied } from '../../Utils';
15
+ import useTranslate from '../../Hooks/useTranslate';
16
+ import TimelineInner from './Timeline';
15
17
  import getActivity, { mapDateFnToGroupOption } from './utility';
16
- const StyledTimeline = styled(TimelineCosmos)(({ theme }) => {
18
+ const StyledTimeline = styled(TimelineInner)(({ theme }) => {
17
19
  return css `
18
20
  flex: 1;
19
21
  padding-inline-end: ${theme.base.spacing};
@@ -43,13 +45,15 @@ const INITIAL_DEFAULT_CHUNK_SIZE = 40;
43
45
  const APPEND_DEFAULT_CHUNK_SIZE = 25;
44
46
  const Timeline = ({ view }) => {
45
47
  const isFullscreen = !!useFullscreenContext()?.[0];
46
- const { rows, meta = { fieldDefs: [], itemKey: '' }, columns, groupHeaders, state } = view;
48
+ const [translate] = useTranslate();
49
+ const { rows, meta = { fieldDefs: [], itemKey: '' }, columns, groupHeaders, state, domContainer, hasNoRecords } = view;
50
+ const { filterExpression, externalState, searchText, paginationOptions, groups } = state;
47
51
  const ref = useRef(null);
48
52
  const [loading, setLoading] = useState(false);
49
53
  const [hasMore, setHasMore] = useState(true);
50
54
  const count = getCount({ view });
51
55
  const visibleGroupHeaders = groupHeaders?.filter(({ isVisible }) => isVisible)?.length ?? 0;
52
- const paginationEndIndex = state.paginationOptions?.rootVirtualiser?.endIndex ?? 0;
56
+ const paginationEndIndex = paginationOptions?.rootVirtualiser?.endIndex ?? 0;
53
57
  const onLoadMore = useCallback(() => {
54
58
  if (!loading) {
55
59
  setLoading(true);
@@ -75,7 +79,9 @@ const Timeline = ({ view }) => {
75
79
  if (hasMore) {
76
80
  loadMore = onLoadMore;
77
81
  }
78
- return (_jsx(RsCardWrapper, { children: _jsxs(StyledTimelineContainer, { view: view, isFullscreen: isFullscreen, children: [_jsx(Toolbar, { view: view }), _jsx(RenderView, { view: view, type: EXTERNAL_FILTERS }), _jsxs(StyledRowContainer, { className: 'container row-container', isFullscreen: isFullscreen, view: view, children: [_jsx(StyledTimeline, { activity: activity || [], currentTime: new Date(), groupBy: mapDateFnToGroupOption(view.state.groups?.[0]?.dateFunction), loading: loading || !rows || !!view.isLoading, loadMore: loadMore, "data-test-id": 'Timeline', ref: ref }), _jsx(EmptyContainer, { view: view })] })] }) }));
82
+ return (_jsx(RsCardWrapper, { children: _jsxs(StyledTimelineContainer, { view: view, isFullscreen: isFullscreen, children: [_jsx(Toolbar, { view: view }), _jsx(RenderView, { view: view, type: EXTERNAL_FILTERS }), _jsxs(StyledRowContainer, { className: 'container row-container', isFullscreen: isFullscreen, view: view, children: [_jsx(StyledTimeline, { activity: activity || [], currentTime: new Date(), groupBy: mapDateFnToGroupOption(groups?.[0]?.dateFunction), loading: loading || !rows || !!view.isLoading, loadMore: loadMore, "data-test-id": 'Timeline', ref: ref }), domContainer && hasNoRecords && (_jsx(EmptyContainer, { message: isFilterApplied({ filterExpression, searchText, externalState }, meta.externalFilters)
83
+ ? translate('No records found')
84
+ : translate('No records') }))] })] }) }));
79
85
  };
80
86
  export default Timeline;
81
87
  //# sourceMappingURL=index.js.map