@pega/cosmos-react-work 5.0.0-dev.4.6 → 5.0.0-dev.4.8

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 (329) hide show
  1. package/package.json +2 -2
  2. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +0 -23
  3. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +0 -1
  4. package/lib/components/AppAnnouncement/AppAnnouncement.js +0 -93
  5. package/lib/components/AppAnnouncement/AppAnnouncement.js.map +0 -1
  6. package/lib/components/AppAnnouncement/index.d.ts +0 -3
  7. package/lib/components/AppAnnouncement/index.d.ts.map +0 -1
  8. package/lib/components/AppAnnouncement/index.js +0 -2
  9. package/lib/components/AppAnnouncement/index.js.map +0 -1
  10. package/lib/components/Article/Article.d.ts +0 -49
  11. package/lib/components/Article/Article.d.ts.map +0 -1
  12. package/lib/components/Article/Article.js +0 -73
  13. package/lib/components/Article/Article.js.map +0 -1
  14. package/lib/components/Article/ArticleFooter.d.ts +0 -40
  15. package/lib/components/Article/ArticleFooter.d.ts.map +0 -1
  16. package/lib/components/Article/ArticleFooter.js +0 -54
  17. package/lib/components/Article/ArticleFooter.js.map +0 -1
  18. package/lib/components/Article/ArticleMeta.d.ts +0 -13
  19. package/lib/components/Article/ArticleMeta.d.ts.map +0 -1
  20. package/lib/components/Article/ArticleMeta.js +0 -24
  21. package/lib/components/Article/ArticleMeta.js.map +0 -1
  22. package/lib/components/Article/index.d.ts +0 -5
  23. package/lib/components/Article/index.d.ts.map +0 -1
  24. package/lib/components/Article/index.js +0 -3
  25. package/lib/components/Article/index.js.map +0 -1
  26. package/lib/components/ArticleList/ArticleList.d.ts +0 -6
  27. package/lib/components/ArticleList/ArticleList.d.ts.map +0 -1
  28. package/lib/components/ArticleList/ArticleList.js +0 -132
  29. package/lib/components/ArticleList/ArticleList.js.map +0 -1
  30. package/lib/components/ArticleList/ArticleList.types.d.ts +0 -87
  31. package/lib/components/ArticleList/ArticleList.types.d.ts.map +0 -1
  32. package/lib/components/ArticleList/ArticleList.types.js +0 -2
  33. package/lib/components/ArticleList/ArticleList.types.js.map +0 -1
  34. package/lib/components/ArticleList/ArticleListFilter.d.ts +0 -6
  35. package/lib/components/ArticleList/ArticleListFilter.d.ts.map +0 -1
  36. package/lib/components/ArticleList/ArticleListFilter.js +0 -61
  37. package/lib/components/ArticleList/ArticleListFilter.js.map +0 -1
  38. package/lib/components/ArticleList/ArticleListHeader.d.ts +0 -5
  39. package/lib/components/ArticleList/ArticleListHeader.d.ts.map +0 -1
  40. package/lib/components/ArticleList/ArticleListHeader.js +0 -20
  41. package/lib/components/ArticleList/ArticleListHeader.js.map +0 -1
  42. package/lib/components/ArticleList/ArticleSummary.d.ts +0 -7
  43. package/lib/components/ArticleList/ArticleSummary.d.ts.map +0 -1
  44. package/lib/components/ArticleList/ArticleSummary.js +0 -56
  45. package/lib/components/ArticleList/ArticleSummary.js.map +0 -1
  46. package/lib/components/ArticleList/index.d.ts +0 -6
  47. package/lib/components/ArticleList/index.d.ts.map +0 -1
  48. package/lib/components/ArticleList/index.js +0 -4
  49. package/lib/components/ArticleList/index.js.map +0 -1
  50. package/lib/components/Assignments/Assignments.d.ts +0 -21
  51. package/lib/components/Assignments/Assignments.d.ts.map +0 -1
  52. package/lib/components/Assignments/Assignments.js +0 -20
  53. package/lib/components/Assignments/Assignments.js.map +0 -1
  54. package/lib/components/Assignments/Assignments.styles.d.ts +0 -8
  55. package/lib/components/Assignments/Assignments.styles.d.ts.map +0 -1
  56. package/lib/components/Assignments/Assignments.styles.js +0 -41
  57. package/lib/components/Assignments/Assignments.styles.js.map +0 -1
  58. package/lib/components/Assignments/index.d.ts +0 -2
  59. package/lib/components/Assignments/index.d.ts.map +0 -1
  60. package/lib/components/Assignments/index.js +0 -2
  61. package/lib/components/Assignments/index.js.map +0 -1
  62. package/lib/components/CasePreview/CasePreview.d.ts +0 -27
  63. package/lib/components/CasePreview/CasePreview.d.ts.map +0 -1
  64. package/lib/components/CasePreview/CasePreview.js +0 -82
  65. package/lib/components/CasePreview/CasePreview.js.map +0 -1
  66. package/lib/components/CasePreview/CasePreview.test-ids.d.ts +0 -2
  67. package/lib/components/CasePreview/CasePreview.test-ids.d.ts.map +0 -1
  68. package/lib/components/CasePreview/CasePreview.test-ids.js +0 -3
  69. package/lib/components/CasePreview/CasePreview.test-ids.js.map +0 -1
  70. package/lib/components/CasePreview/index.d.ts +0 -3
  71. package/lib/components/CasePreview/index.d.ts.map +0 -1
  72. package/lib/components/CasePreview/index.js +0 -2
  73. package/lib/components/CasePreview/index.js.map +0 -1
  74. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts +0 -4
  75. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +0 -1
  76. package/lib/components/CaseView/CaseHeader/CaseHeader.js +0 -127
  77. package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +0 -1
  78. package/lib/components/CaseView/CaseHeader/Summary.d.ts +0 -6
  79. package/lib/components/CaseView/CaseHeader/Summary.d.ts.map +0 -1
  80. package/lib/components/CaseView/CaseHeader/Summary.js +0 -182
  81. package/lib/components/CaseView/CaseHeader/Summary.js.map +0 -1
  82. package/lib/components/CaseView/CaseSummary.d.ts +0 -4
  83. package/lib/components/CaseView/CaseSummary.d.ts.map +0 -1
  84. package/lib/components/CaseView/CaseSummary.js +0 -18
  85. package/lib/components/CaseView/CaseSummary.js.map +0 -1
  86. package/lib/components/CaseView/CaseSummaryFields.d.ts +0 -6
  87. package/lib/components/CaseView/CaseSummaryFields.d.ts.map +0 -1
  88. package/lib/components/CaseView/CaseSummaryFields.js +0 -18
  89. package/lib/components/CaseView/CaseSummaryFields.js.map +0 -1
  90. package/lib/components/CaseView/CaseView.context.d.ts +0 -5
  91. package/lib/components/CaseView/CaseView.context.d.ts.map +0 -1
  92. package/lib/components/CaseView/CaseView.context.js +0 -5
  93. package/lib/components/CaseView/CaseView.context.js.map +0 -1
  94. package/lib/components/CaseView/CaseView.d.ts +0 -8
  95. package/lib/components/CaseView/CaseView.d.ts.map +0 -1
  96. package/lib/components/CaseView/CaseView.js +0 -421
  97. package/lib/components/CaseView/CaseView.js.map +0 -1
  98. package/lib/components/CaseView/CaseView.styles.d.ts +0 -45
  99. package/lib/components/CaseView/CaseView.styles.d.ts.map +0 -1
  100. package/lib/components/CaseView/CaseView.styles.js +0 -559
  101. package/lib/components/CaseView/CaseView.styles.js.map +0 -1
  102. package/lib/components/CaseView/CaseView.test-ids.d.ts +0 -2
  103. package/lib/components/CaseView/CaseView.test-ids.d.ts.map +0 -1
  104. package/lib/components/CaseView/CaseView.test-ids.js +0 -18
  105. package/lib/components/CaseView/CaseView.test-ids.js.map +0 -1
  106. package/lib/components/CaseView/CaseView.types.d.ts +0 -98
  107. package/lib/components/CaseView/CaseView.types.d.ts.map +0 -1
  108. package/lib/components/CaseView/CaseView.types.js +0 -2
  109. package/lib/components/CaseView/CaseView.types.js.map +0 -1
  110. package/lib/components/CaseView/UtilitiesSummary.d.ts +0 -9
  111. package/lib/components/CaseView/UtilitiesSummary.d.ts.map +0 -1
  112. package/lib/components/CaseView/UtilitiesSummary.js +0 -53
  113. package/lib/components/CaseView/UtilitiesSummary.js.map +0 -1
  114. package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts +0 -9
  115. package/lib/components/CaseView/UtilitySummaryItemDialog.d.ts.map +0 -1
  116. package/lib/components/CaseView/UtilitySummaryItemDialog.js +0 -29
  117. package/lib/components/CaseView/UtilitySummaryItemDialog.js.map +0 -1
  118. package/lib/components/CaseView/index.d.ts +0 -5
  119. package/lib/components/CaseView/index.d.ts.map +0 -1
  120. package/lib/components/CaseView/index.js +0 -4
  121. package/lib/components/CaseView/index.js.map +0 -1
  122. package/lib/components/ConfigurableLayout/ConfigurableLayout.d.ts +0 -4
  123. package/lib/components/ConfigurableLayout/ConfigurableLayout.d.ts.map +0 -1
  124. package/lib/components/ConfigurableLayout/ConfigurableLayout.js +0 -86
  125. package/lib/components/ConfigurableLayout/ConfigurableLayout.js.map +0 -1
  126. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts +0 -41
  127. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts.map +0 -1
  128. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.js +0 -2
  129. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.js.map +0 -1
  130. package/lib/components/ConfigurableLayout/LayoutCell.d.ts +0 -6
  131. package/lib/components/ConfigurableLayout/LayoutCell.d.ts.map +0 -1
  132. package/lib/components/ConfigurableLayout/LayoutCell.js +0 -64
  133. package/lib/components/ConfigurableLayout/LayoutCell.js.map +0 -1
  134. package/lib/components/ConfigurableLayout/defaults.d.ts +0 -4
  135. package/lib/components/ConfigurableLayout/defaults.d.ts.map +0 -1
  136. package/lib/components/ConfigurableLayout/defaults.js +0 -4
  137. package/lib/components/ConfigurableLayout/defaults.js.map +0 -1
  138. package/lib/components/ConfigurableLayout/index.d.ts +0 -4
  139. package/lib/components/ConfigurableLayout/index.d.ts.map +0 -1
  140. package/lib/components/ConfigurableLayout/index.js +0 -3
  141. package/lib/components/ConfigurableLayout/index.js.map +0 -1
  142. package/lib/components/ConfigurableLayout/options.d.ts +0 -10
  143. package/lib/components/ConfigurableLayout/options.d.ts.map +0 -1
  144. package/lib/components/ConfigurableLayout/options.js +0 -10
  145. package/lib/components/ConfigurableLayout/options.js.map +0 -1
  146. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts +0 -7
  147. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.d.ts.map +0 -1
  148. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.js +0 -37
  149. package/lib/components/ConfigurableLayout/useTrackWrappedRegions.js.map +0 -1
  150. package/lib/components/Confirmation/Confirmation.d.ts +0 -19
  151. package/lib/components/Confirmation/Confirmation.d.ts.map +0 -1
  152. package/lib/components/Confirmation/Confirmation.js +0 -29
  153. package/lib/components/Confirmation/Confirmation.js.map +0 -1
  154. package/lib/components/Confirmation/index.d.ts +0 -3
  155. package/lib/components/Confirmation/index.d.ts.map +0 -1
  156. package/lib/components/Confirmation/index.js +0 -2
  157. package/lib/components/Confirmation/index.js.map +0 -1
  158. package/lib/components/Details/Details.d.ts +0 -38
  159. package/lib/components/Details/Details.d.ts.map +0 -1
  160. package/lib/components/Details/Details.js +0 -92
  161. package/lib/components/Details/Details.js.map +0 -1
  162. package/lib/components/Details/Details.styles.d.ts +0 -50
  163. package/lib/components/Details/Details.styles.d.ts.map +0 -1
  164. package/lib/components/Details/Details.styles.js +0 -204
  165. package/lib/components/Details/Details.styles.js.map +0 -1
  166. package/lib/components/Details/Details.test-ids.d.ts +0 -2
  167. package/lib/components/Details/Details.test-ids.d.ts.map +0 -1
  168. package/lib/components/Details/Details.test-ids.js +0 -9
  169. package/lib/components/Details/Details.test-ids.js.map +0 -1
  170. package/lib/components/Details/DetailsContext.d.ts +0 -9
  171. package/lib/components/Details/DetailsContext.d.ts.map +0 -1
  172. package/lib/components/Details/DetailsContext.js +0 -9
  173. package/lib/components/Details/DetailsContext.js.map +0 -1
  174. package/lib/components/Details/index.d.ts +0 -4
  175. package/lib/components/Details/index.d.ts.map +0 -1
  176. package/lib/components/Details/index.js +0 -4
  177. package/lib/components/Details/index.js.map +0 -1
  178. package/lib/components/Glimpse/Glimpse.d.ts +0 -20
  179. package/lib/components/Glimpse/Glimpse.d.ts.map +0 -1
  180. package/lib/components/Glimpse/Glimpse.js +0 -12
  181. package/lib/components/Glimpse/Glimpse.js.map +0 -1
  182. package/lib/components/Glimpse/index.d.ts +0 -3
  183. package/lib/components/Glimpse/index.d.ts.map +0 -1
  184. package/lib/components/Glimpse/index.js +0 -2
  185. package/lib/components/Glimpse/index.js.map +0 -1
  186. package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts +0 -6
  187. package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +0 -1
  188. package/lib/components/IntelligentGuidance/IntelligentGuidance.js +0 -83
  189. package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +0 -1
  190. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts +0 -9
  191. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +0 -1
  192. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +0 -199
  193. package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +0 -1
  194. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +0 -35
  195. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +0 -1
  196. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js +0 -2
  197. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +0 -1
  198. package/lib/components/IntelligentGuidance/index.d.ts +0 -3
  199. package/lib/components/IntelligentGuidance/index.d.ts.map +0 -1
  200. package/lib/components/IntelligentGuidance/index.js +0 -2
  201. package/lib/components/IntelligentGuidance/index.js.map +0 -1
  202. package/lib/components/Predictions/Predictions.d.ts +0 -6
  203. package/lib/components/Predictions/Predictions.d.ts.map +0 -1
  204. package/lib/components/Predictions/Predictions.js +0 -68
  205. package/lib/components/Predictions/Predictions.js.map +0 -1
  206. package/lib/components/Predictions/Predictions.types.d.ts +0 -23
  207. package/lib/components/Predictions/Predictions.types.d.ts.map +0 -1
  208. package/lib/components/Predictions/Predictions.types.js +0 -2
  209. package/lib/components/Predictions/Predictions.types.js.map +0 -1
  210. package/lib/components/Predictions/index.d.ts +0 -3
  211. package/lib/components/Predictions/index.d.ts.map +0 -1
  212. package/lib/components/Predictions/index.js +0 -2
  213. package/lib/components/Predictions/index.js.map +0 -1
  214. package/lib/components/SearchResults/Filter.d.ts +0 -8
  215. package/lib/components/SearchResults/Filter.d.ts.map +0 -1
  216. package/lib/components/SearchResults/Filter.js +0 -45
  217. package/lib/components/SearchResults/Filter.js.map +0 -1
  218. package/lib/components/SearchResults/SearchResult.d.ts +0 -4
  219. package/lib/components/SearchResults/SearchResult.d.ts.map +0 -1
  220. package/lib/components/SearchResults/SearchResult.js +0 -27
  221. package/lib/components/SearchResults/SearchResult.js.map +0 -1
  222. package/lib/components/SearchResults/SearchResults.d.ts +0 -6
  223. package/lib/components/SearchResults/SearchResults.d.ts.map +0 -1
  224. package/lib/components/SearchResults/SearchResults.js +0 -121
  225. package/lib/components/SearchResults/SearchResults.js.map +0 -1
  226. package/lib/components/SearchResults/SearchResults.styles.d.ts +0 -11
  227. package/lib/components/SearchResults/SearchResults.styles.d.ts.map +0 -1
  228. package/lib/components/SearchResults/SearchResults.styles.js +0 -88
  229. package/lib/components/SearchResults/SearchResults.styles.js.map +0 -1
  230. package/lib/components/SearchResults/SearchResults.types.d.ts +0 -100
  231. package/lib/components/SearchResults/SearchResults.types.d.ts.map +0 -1
  232. package/lib/components/SearchResults/SearchResults.types.js +0 -2
  233. package/lib/components/SearchResults/SearchResults.types.js.map +0 -1
  234. package/lib/components/SearchResults/index.d.ts +0 -3
  235. package/lib/components/SearchResults/index.d.ts.map +0 -1
  236. package/lib/components/SearchResults/index.js +0 -2
  237. package/lib/components/SearchResults/index.js.map +0 -1
  238. package/lib/components/Stages/StageGlimpse.d.ts +0 -8
  239. package/lib/components/Stages/StageGlimpse.d.ts.map +0 -1
  240. package/lib/components/Stages/StageGlimpse.js +0 -11
  241. package/lib/components/Stages/StageGlimpse.js.map +0 -1
  242. package/lib/components/Stages/Stages.d.ts +0 -6
  243. package/lib/components/Stages/Stages.d.ts.map +0 -1
  244. package/lib/components/Stages/Stages.js +0 -107
  245. package/lib/components/Stages/Stages.js.map +0 -1
  246. package/lib/components/Stages/Stages.styles.d.ts +0 -14
  247. package/lib/components/Stages/Stages.styles.d.ts.map +0 -1
  248. package/lib/components/Stages/Stages.styles.js +0 -270
  249. package/lib/components/Stages/Stages.styles.js.map +0 -1
  250. package/lib/components/Stages/Stages.types.d.ts +0 -38
  251. package/lib/components/Stages/Stages.types.d.ts.map +0 -1
  252. package/lib/components/Stages/Stages.types.js +0 -2
  253. package/lib/components/Stages/Stages.types.js.map +0 -1
  254. package/lib/components/Stages/index.d.ts +0 -3
  255. package/lib/components/Stages/index.d.ts.map +0 -1
  256. package/lib/components/Stages/index.js +0 -2
  257. package/lib/components/Stages/index.js.map +0 -1
  258. package/lib/components/Stakeholders/StakeholderForm.d.ts +0 -7
  259. package/lib/components/Stakeholders/StakeholderForm.d.ts.map +0 -1
  260. package/lib/components/Stakeholders/StakeholderForm.js +0 -49
  261. package/lib/components/Stakeholders/StakeholderForm.js.map +0 -1
  262. package/lib/components/Stakeholders/Stakeholders.d.ts +0 -6
  263. package/lib/components/Stakeholders/Stakeholders.d.ts.map +0 -1
  264. package/lib/components/Stakeholders/Stakeholders.js +0 -220
  265. package/lib/components/Stakeholders/Stakeholders.js.map +0 -1
  266. package/lib/components/Stakeholders/Stakeholders.types.d.ts +0 -75
  267. package/lib/components/Stakeholders/Stakeholders.types.d.ts.map +0 -1
  268. package/lib/components/Stakeholders/Stakeholders.types.js +0 -2
  269. package/lib/components/Stakeholders/Stakeholders.types.js.map +0 -1
  270. package/lib/components/Stakeholders/index.d.ts +0 -3
  271. package/lib/components/Stakeholders/index.d.ts.map +0 -1
  272. package/lib/components/Stakeholders/index.js +0 -2
  273. package/lib/components/Stakeholders/index.js.map +0 -1
  274. package/lib/components/Tags/Tags.d.ts +0 -34
  275. package/lib/components/Tags/Tags.d.ts.map +0 -1
  276. package/lib/components/Tags/Tags.js +0 -230
  277. package/lib/components/Tags/Tags.js.map +0 -1
  278. package/lib/components/Tags/index.d.ts +0 -3
  279. package/lib/components/Tags/index.d.ts.map +0 -1
  280. package/lib/components/Tags/index.js +0 -2
  281. package/lib/components/Tags/index.js.map +0 -1
  282. package/lib/components/Tasks/TaskList.d.ts +0 -39
  283. package/lib/components/Tasks/TaskList.d.ts.map +0 -1
  284. package/lib/components/Tasks/TaskList.js +0 -71
  285. package/lib/components/Tasks/TaskList.js.map +0 -1
  286. package/lib/components/Tasks/Tasks.d.ts +0 -29
  287. package/lib/components/Tasks/Tasks.d.ts.map +0 -1
  288. package/lib/components/Tasks/Tasks.js +0 -52
  289. package/lib/components/Tasks/Tasks.js.map +0 -1
  290. package/lib/components/Tasks/Tasks.test-ids.d.ts +0 -4
  291. package/lib/components/Tasks/Tasks.test-ids.d.ts.map +0 -1
  292. package/lib/components/Tasks/Tasks.test-ids.js +0 -5
  293. package/lib/components/Tasks/Tasks.test-ids.js.map +0 -1
  294. package/lib/components/Tasks/index.d.ts +0 -4
  295. package/lib/components/Tasks/index.d.ts.map +0 -1
  296. package/lib/components/Tasks/index.js +0 -4
  297. package/lib/components/Tasks/index.js.map +0 -1
  298. package/lib/components/Timeline/Timeline.d.ts +0 -6
  299. package/lib/components/Timeline/Timeline.d.ts.map +0 -1
  300. package/lib/components/Timeline/Timeline.js +0 -26
  301. package/lib/components/Timeline/Timeline.js.map +0 -1
  302. package/lib/components/Timeline/Timeline.styles.d.ts +0 -21
  303. package/lib/components/Timeline/Timeline.styles.d.ts.map +0 -1
  304. package/lib/components/Timeline/Timeline.styles.js +0 -165
  305. package/lib/components/Timeline/Timeline.styles.js.map +0 -1
  306. package/lib/components/Timeline/Timeline.types.d.ts +0 -66
  307. package/lib/components/Timeline/Timeline.types.d.ts.map +0 -1
  308. package/lib/components/Timeline/Timeline.types.js +0 -2
  309. package/lib/components/Timeline/Timeline.types.js.map +0 -1
  310. package/lib/components/Timeline/TimelineItem.d.ts +0 -13
  311. package/lib/components/Timeline/TimelineItem.d.ts.map +0 -1
  312. package/lib/components/Timeline/TimelineItem.js +0 -33
  313. package/lib/components/Timeline/TimelineItem.js.map +0 -1
  314. package/lib/components/Timeline/TimelineToolbar.d.ts +0 -6
  315. package/lib/components/Timeline/TimelineToolbar.d.ts.map +0 -1
  316. package/lib/components/Timeline/TimelineToolbar.js +0 -68
  317. package/lib/components/Timeline/TimelineToolbar.js.map +0 -1
  318. package/lib/components/Timeline/index.d.ts +0 -4
  319. package/lib/components/Timeline/index.d.ts.map +0 -1
  320. package/lib/components/Timeline/index.js +0 -3
  321. package/lib/components/Timeline/index.js.map +0 -1
  322. package/lib/components/Timeline/utils.d.ts +0 -15
  323. package/lib/components/Timeline/utils.d.ts.map +0 -1
  324. package/lib/components/Timeline/utils.js +0 -75
  325. package/lib/components/Timeline/utils.js.map +0 -1
  326. package/lib/index.d.ts +0 -37
  327. package/lib/index.d.ts.map +0 -1
  328. package/lib/index.js +0 -38
  329. package/lib/index.js.map +0 -1
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef, useEffect, useState } from 'react';
3
- import { Progress, useConsolidatedRef, useItemIntersection, DateTimeDisplay, Grid } from '@pega/cosmos-react-core';
4
- import { groupByActivity, sortByDate } from './utils';
5
- import { StyledDate, StyledTimeline, StyledLoadingCell } from './Timeline.styles';
6
- import TimelineItem from './TimelineItem';
7
- const Timeline = forwardRef(function Timeline({ activity, currentTime, sortOrder = 'descending', groupBy = 'date', loading, loadMore, ...restProps }, ref) {
8
- const [sortedData, setSortedData] = useState(() => sortByDate(activity, sortOrder));
9
- const listRef = useConsolidatedRef(ref);
10
- useItemIntersection(listRef, activity.length - 1, () => {
11
- if (!loading)
12
- loadMore?.();
13
- }, `:scope li > div`);
14
- useEffect(() => {
15
- setSortedData(sortByDate(activity, sortOrder));
16
- }, [activity, sortOrder]);
17
- return (_jsxs(Grid, { ...restProps, container: {
18
- cols: 'auto 1fr',
19
- colGap: 0.75,
20
- alignItems: 'start'
21
- }, sm: { container: { cols: 'auto auto 1fr', colGap: 0.25 } }, as: StyledTimeline, ref: listRef, children: [groupBy === 'none'
22
- ? sortedData.map((item, index) => (_jsx(TimelineItem, { item: item, timeFormat: 'datetime', prevItemDate: sortedData[index - 1]?.date, nextItemDate: sortedData[index + 1]?.date, currentTime: currentTime }, item.id)))
23
- : groupByActivity(sortedData, groupBy).map(groupedData => (_jsxs(Grid, { item: { colStartEnd: '1/-1' }, as: 'li', children: [_jsx(DateTimeDisplay, { as: StyledDate, variant: groupBy, format: 'long', value: groupedData[0].date }), _jsx("ol", { children: groupedData.map((item, index) => (_jsx(TimelineItem, { item: item, timeFormat: groupBy === 'date' ? 'time' : 'datetime', prevItemDate: groupedData[index - 1]?.date, nextItemDate: groupedData[index + 1]?.date, currentTime: currentTime }, item.id))) })] }, groupedData[0].id))), loading && (_jsx("li", { children: _jsx(StyledLoadingCell, { children: _jsx(Progress, { placement: 'local' }) }) }))] }));
24
- });
25
- export default Timeline;
26
- //# sourceMappingURL=Timeline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Timeline.js","sourceRoot":"","sources":["../../../src/components/Timeline/Timeline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAsC,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5F,OAAO,EACL,QAAQ,EAER,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,IAAI,EACL,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAE1C,MAAM,QAAQ,GAAoD,UAAU,CAAC,SAAS,QAAQ,CAC5F,EACE,QAAQ,EACR,WAAW,EACX,SAAS,GAAG,YAAY,EACxB,OAAO,GAAG,MAAM,EAChB,OAAO,EACP,QAAQ,EACR,GAAG,SAAS,EACmB,EACjC,GAAyB;IAEzB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAEpF,MAAM,OAAO,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACxC,mBAAmB,CACjB,OAAO,EACP,QAAQ,CAAC,MAAM,GAAG,CAAC,EACnB,GAAG,EAAE;QACH,IAAI,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EACF,uBACG,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAChC,KAAC,YAAY,IAEX,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,EACpD,YAAY,EAAE,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,EAC1C,YAAY,EAAE,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,EAC1C,WAAW,EAAE,WAAW,IALnB,IAAI,CAAC,EAAE,CAMZ,CACH,CAAC,GACC,KAlB2C,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAmB5D,CACR,CAAC,EACL,OAAO,IAAI,CACV,uBACE,KAAC,iBAAiB,cAChB,KAAC,QAAQ,IAAC,SAAS,EAAC,OAAO,GAAG,GACZ,GACjB,CACN,IACI,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, useEffect, useState } from 'react';\n\nimport {\n Progress,\n ForwardProps,\n useConsolidatedRef,\n useItemIntersection,\n DateTimeDisplay,\n Grid\n} from '@pega/cosmos-react-core';\n\nimport { groupByActivity, sortByDate } from './utils';\nimport type TimelineProps from './Timeline.types';\nimport { StyledDate, StyledTimeline, StyledLoadingCell } from './Timeline.styles';\nimport TimelineItem from './TimelineItem';\n\nconst Timeline: FunctionComponent<TimelineProps & ForwardProps> = forwardRef(function Timeline(\n {\n activity,\n currentTime,\n sortOrder = 'descending',\n groupBy = 'date',\n loading,\n loadMore,\n ...restProps\n }: PropsWithoutRef<TimelineProps>,\n ref: TimelineProps['ref']\n) {\n const [sortedData, setSortedData] = useState(() => sortByDate(activity, sortOrder));\n\n const listRef = useConsolidatedRef(ref);\n useItemIntersection(\n listRef,\n activity.length - 1,\n () => {\n if (!loading) loadMore?.();\n },\n `:scope li > div`\n );\n\n useEffect(() => {\n setSortedData(sortByDate(activity, sortOrder));\n }, [activity, sortOrder]);\n\n return (\n <Grid\n {...restProps}\n container={{\n cols: 'auto 1fr',\n colGap: 0.75,\n alignItems: 'start'\n }}\n sm={{ container: { cols: 'auto auto 1fr', colGap: 0.25 } }}\n as={StyledTimeline}\n ref={listRef}\n >\n {groupBy === 'none'\n ? sortedData.map((item, index) => (\n <TimelineItem\n key={item.id}\n item={item}\n timeFormat='datetime'\n prevItemDate={sortedData[index - 1]?.date}\n nextItemDate={sortedData[index + 1]?.date}\n currentTime={currentTime}\n />\n ))\n : groupByActivity(sortedData, groupBy).map(groupedData => (\n <Grid item={{ colStartEnd: '1/-1' }} as='li' key={groupedData[0].id}>\n <DateTimeDisplay\n as={StyledDate}\n variant={groupBy}\n format='long'\n value={groupedData[0].date}\n />\n <ol>\n {groupedData.map((item, index) => (\n <TimelineItem\n key={item.id}\n item={item}\n timeFormat={groupBy === 'date' ? 'time' : 'datetime'}\n prevItemDate={groupedData[index - 1]?.date}\n nextItemDate={groupedData[index + 1]?.date}\n currentTime={currentTime}\n />\n ))}\n </ol>\n </Grid>\n ))}\n {loading && (\n <li>\n <StyledLoadingCell>\n <Progress placement='local' />\n </StyledLoadingCell>\n </li>\n )}\n </Grid>\n );\n});\n\nexport default Timeline;\n"]}
@@ -1,21 +0,0 @@
1
- export declare const StyledCard: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").CardProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
2
- export declare const StyledCardContent: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").CardContentProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
3
- export declare const StyledToggleButton: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {
4
- collapsed: boolean;
5
- }, never>;
6
- export declare const StyledCardHeader: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core/lib/components/Grid/Grid.types").default & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
7
- export declare const StyledTimelineIcon: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").FlexProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
8
- interface StyledBulletWrapperProps {
9
- hasPrev: boolean;
10
- hasNext: boolean;
11
- isPrevFuture: boolean;
12
- isNextFuture: boolean;
13
- hasIcon: boolean;
14
- }
15
- export declare const StyledBulletWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, StyledBulletWrapperProps, never>;
16
- export declare const StyledDate: import("styled-components").StyledComponent<"h2", import("styled-components").DefaultTheme, {}, never>;
17
- export declare const StyledTimeline: import("styled-components").StyledComponent<"ol", import("styled-components").DefaultTheme, {}, never>;
18
- export declare const StyledTime: import("styled-components").StyledComponent<import("react").FunctionComponent<import("@pega/cosmos-react-core").DateTimeDisplayProps & import("@pega/cosmos-react-core").ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
19
- export declare const StyledLoadingCell: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
20
- export {};
21
- //# sourceMappingURL=Timeline.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Timeline.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Timeline/Timeline.styles.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,UAAU,mOASrB,CAAC;AAIH,eAAO,MAAM,iBAAiB,0OAS5B,CAAC;AAIH,eAAO,MAAM,kBAAkB;eAA+B,OAAO;SASnE,CAAC;AAIH,eAAO,MAAM,gBAAgB,gQAG5B,CAAC;AAIF,eAAO,MAAM,kBAAkB,mOAU7B,CAAC;AAIH,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,gIA8D/B,CAAC;AAIF,eAAO,MAAM,UAAU,wGAetB,CAAC;AAIF,eAAO,MAAM,cAAc,wGAiBzB,CAAC;AAIH,eAAO,MAAM,UAAU,8OAUrB,CAAC;AAIH,eAAO,MAAM,iBAAiB,yGAQ7B,CAAC"}
@@ -1,165 +0,0 @@
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
- &:not(& &) {
8
- border-radius: 0;
9
- background-color: transparent;
10
- }
11
- `;
12
- });
13
- StyledCard.defaultProps = defaultThemeProp;
14
- export const StyledCardContent = styled(CardContent)(({ theme }) => {
15
- return css `
16
- &:not(${StyledCard} ${StyledCard} > &) {
17
- padding: ${theme.base.spacing} 0 ${theme.base.spacing} ${theme.base['hit-area']['mouse-min']};
18
- @media (pointer: coarse) {
19
- padding-inline-start: ${theme.base['hit-area']['finger-min']};
20
- }
21
- }
22
- `;
23
- });
24
- StyledCardContent.defaultProps = defaultThemeProp;
25
- export const StyledToggleButton = styled(Button)(({ theme, collapsed }) => {
26
- const { rtl } = useDirection();
27
- return css `
28
- ${StyledIcon} {
29
- transition: transform calc(2 * ${theme.base.animation.speed})
30
- ${theme.base.animation.timing.ease};
31
- transform: ${collapsed ? `rotate(${rtl ? '90deg' : '-90deg'})` : 'rotate(0)'};
32
- }
33
- `;
34
- });
35
- StyledToggleButton.defaultProps = defaultThemeProp;
36
- export const StyledCardHeader = styled(Grid) `
37
- padding: 0;
38
- min-height: 2rem;
39
- `;
40
- StyledCardHeader.defaultProps = defaultThemeProp;
41
- export const StyledTimelineIcon = styled(Flex)(({ theme }) => {
42
- return css `
43
- border-radius: 50%;
44
- color: ${theme.base.palette.light};
45
- background: ${theme.base.palette.info};
46
- & > ${StyledIcon} {
47
- height: 1em;
48
- width: 1em;
49
- }
50
- `;
51
- });
52
- StyledTimelineIcon.defaultProps = defaultThemeProp;
53
- export const StyledBulletWrapper = styled.span(({ theme, hasPrev, hasNext, isPrevFuture, isNextFuture, hasIcon }) => {
54
- const { rtl } = useDirection();
55
- return css `
56
- height: 100%;
57
- position: relative;
58
- text-align: center;
59
- padding-block-start: calc(2.25 * ${theme.base.spacing} + 0.0625rem);
60
- min-width: 2rem;
61
-
62
- ${hasPrev &&
63
- css `
64
- &::before {
65
- content: '';
66
- display: block;
67
- position: absolute;
68
- inset-block-start: 0;
69
- inset-inline-start: 50%;
70
- transform: translateX(${rtl ? '50%' : '-50%'});
71
- width: 0.0625rem;
72
- height: calc(2.25 * ${theme.base.spacing} + 0.75rem);
73
- border-inline-start: 0.0625rem ${isPrevFuture ? 'dashed' : 'solid'}
74
- ${theme.base.palette.info};
75
- }
76
- `}
77
-
78
- ${hasNext &&
79
- css `
80
- &::after {
81
- content: '';
82
- display: block;
83
- position: absolute;
84
- inset-block-start: calc(2.25 * ${theme.base.spacing} + 0.75rem);
85
- inset-inline-start: 50%;
86
- transform: translateX(${rtl ? '50%' : '-50%'});
87
- width: 0.0625rem;
88
- height: calc(100% - 2.25 * ${theme.base.spacing} - 0.75rem);
89
- border-inline-start: 0.0625rem ${isNextFuture ? 'dashed' : 'solid'}
90
- ${theme.base.palette.info};
91
- }
92
- `}
93
-
94
- & > ${StyledTimelineIcon} {
95
- position: relative;
96
- margin: 0;
97
- z-index: 1;
98
- width: ${hasIcon ? '1.5rem' : '0.5rem'};
99
- height: ${hasIcon ? '1.5rem' : '0.5rem'};
100
- }
101
-
102
- @media (min-width: ${theme.base.breakpoints.sm}) {
103
- padding-block-start: calc(${theme.base.spacing} + 0.0625rem);
104
- &::before {
105
- height: calc(${theme.base.spacing} + 0.75rem);
106
- }
107
- &::after {
108
- inset-block-start: calc(${theme.base.spacing} + 0.75rem);
109
- height: calc(100% - ${theme.base.spacing} - 0.75rem);
110
- }
111
- }
112
- `;
113
- });
114
- StyledBulletWrapper.defaultProps = defaultThemeProp;
115
- export const StyledDate = styled.h2(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, spacing }, components: { text } } }) => {
116
- const fontSizes = calculateFontSize(fontSize, fontScale);
117
- return css `
118
- grid-column: 1 / -1;
119
- padding-block: calc(3 * ${spacing}) calc(1.25 * ${spacing});
120
- font-size: ${fontSizes[text.h2['font-size']]};
121
- font-weight: ${text.h2['font-weight']};
122
- `;
123
- });
124
- StyledDate.defaultProps = defaultThemeProp;
125
- export const StyledTimeline = styled.ol(({ theme }) => {
126
- return css `
127
- ol,
128
- li {
129
- display: contents;
130
- }
131
-
132
- li:first-child ${StyledDate} {
133
- padding-block-start: 0;
134
- }
135
-
136
- @media (min-width: ${theme.base.breakpoints.sm}) {
137
- ${StyledCard} {
138
- padding-block: calc(0.5 * ${theme.base.spacing});
139
- }
140
- }
141
- `;
142
- });
143
- StyledTimeline.defaultProps = defaultThemeProp;
144
- export const StyledTime = styled(DateTimeDisplay)(({ theme }) => {
145
- return css `
146
- opacity: ${theme.base.transparency['transparent-2']};
147
- white-space: nowrap;
148
- @media (min-width: ${theme.base.breakpoints.sm}) {
149
- text-align: end;
150
- line-height: ${theme.base['hit-area']['mouse-min']};
151
- padding-block-start: calc(0.5 * ${theme.base.spacing} + 0.0625rem);
152
- }
153
- `;
154
- });
155
- StyledTime.defaultProps = defaultThemeProp;
156
- export const StyledLoadingCell = styled.div `
157
- grid-column: 1 / -1;
158
- position: relative;
159
- height: 2.8rem;
160
-
161
- ${StyledBackdrop} {
162
- background: transparent;
163
- }
164
- `;
165
- //# sourceMappingURL=Timeline.styles.js.map
@@ -1 +0,0 @@
1
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,IAAI,CAAC,EAAE,CAAC,WAAW,CAAa,CAAC;qBACzC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;KACtC,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACpD,OAAO,GAAG,CAAA;;;;;;qBAMS,UAAU;;;;yBAIN,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;QAC1C,UAAU;oCACkB,KAAK,CAAC,IAAI,CAAC,OAAO;;;GAGnD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC9D,OAAO,GAAG,CAAA;eACG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;;yBAE9B,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;;qBAE7B,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC;wCAChB,KAAK,CAAC,IAAI,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 {\n Button,\n calculateFontSize,\n Card,\n CardContent,\n DateTimeDisplay,\n defaultThemeProp,\n Flex,\n FontSize,\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 &:not(& &) {\n border-radius: 0;\n background-color: transparent;\n }\n `;\n});\n\nStyledCard.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 & > ${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\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\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 &::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 StyledTimeline = styled.ol(({ theme }) => {\n return css`\n ol,\n li {\n display: contents;\n }\n\n li:first-child ${StyledDate} {\n padding-block-start: 0;\n }\n\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"]}
@@ -1,66 +0,0 @@
1
- import { MouseEvent, ReactElement, ReactNode, Ref } from 'react';
2
- import { BaseProps, FieldValueListProps, IconProps, ListToolbarProps, NoChildrenProp, OmitStrict, StatusProps } from '@pega/cosmos-react-core';
3
- import { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';
4
- import { AcceptedMouseEventElement } from '@pega/cosmos-react-core/lib/components/Menu/Menu.types';
5
- export interface ActivityObject {
6
- /** Unique id for activity */
7
- id: string;
8
- /** Date as ISO8601 string, timestamp or native Date object. */
9
- date: string | number | Date;
10
- /** Header region for rendering text and links. */
11
- title: ReactNode;
12
- /** Name of the icon (to be selected from default Pega icon set) */
13
- icon?: IconProps['name'];
14
- /** Represents the current status of activity */
15
- status?: StatusProps;
16
- /** The set of field values to render in the list. */
17
- content?: FieldValueListProps['fields'] | ReactElement;
18
- }
19
- export type TimelineSortOrder = 'ascending' | 'descending';
20
- export type TimelineGroupBy = Extract<DateTimeVariant, 'date' | 'monthyear' | 'quarteryear' | 'year'> | 'none';
21
- export default interface TimelineProps extends BaseProps, NoChildrenProp {
22
- /** List of activity */
23
- activity: ActivityObject[];
24
- /** Current time as Date */
25
- currentTime: Date;
26
- /**
27
- * List of activity sorted in ascending or descending order.
28
- * @default 'descending'
29
- */
30
- sortOrder?: TimelineSortOrder;
31
- /**
32
- * List of activity grouped by day, month, quarter or year.
33
- * @default 'date'
34
- */
35
- groupBy?: TimelineGroupBy;
36
- /**
37
- * Show a Progress indicator at the end of a list where newly loaded items will be appended.
38
- * @default false
39
- */
40
- loading?: boolean;
41
- /** Callback to fetch more activity items */
42
- loadMore?: () => void;
43
- /** Ref for the wrapping element. */
44
- ref?: Ref<HTMLTableElement>;
45
- }
46
- export interface TimelineToolbarProps extends OmitStrict<ListToolbarProps, 'sort' | 'group'> {
47
- sort?: {
48
- /** An item click handler for all item clicks. */
49
- onItemClick: (id: TimelineSortOrder, e: MouseEvent<AcceptedMouseEventElement>) => void;
50
- /**
51
- * Currently selected sort order.
52
- * @default 'descending'
53
- */
54
- selected: TimelineProps['sortOrder'];
55
- };
56
- group?: {
57
- /** An item click handler for all item clicks. */
58
- onItemClick: (id: TimelineGroupBy, e: MouseEvent<AcceptedMouseEventElement>) => void;
59
- /**
60
- * Currently selected sort order.
61
- * @default 'date'
62
- */
63
- selected: TimelineProps['groupBy'];
64
- };
65
- }
66
- //# sourceMappingURL=Timeline.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Timeline.types.d.ts","sourceRoot":"","sources":["../../../src/components/Timeline/Timeline.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,gEAAgE,CAAC;AACjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,wDAAwD,CAAC;AAEnG,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,EAAE,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Aa,CAAC,WAAW,CAAC,CAAC;KACtC,CAAC;IACF,KAAK,CAAC,EAAE;QACN,iDAAiD;QACjD,WAAW,EAAE,CAAC,EAAE,EAAE,eAAe,EAAE,CAAC,EAAE,UAAU,CAAC,yBAAyB,CAAC,KAAK,IAAI,CAAC;QACrF;;;WAGG;QACH,QAAQ,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;KACpC,CAAC;CACH"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Timeline.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Timeline.types.js","sourceRoot":"","sources":["../../../src/components/Timeline/Timeline.types.ts"],"names":[],"mappings":"","sourcesContent":["import { MouseEvent, ReactElement, ReactNode, Ref } from 'react';\n\nimport {\n BaseProps,\n FieldValueListProps,\n IconProps,\n ListToolbarProps,\n NoChildrenProp,\n OmitStrict,\n StatusProps\n} from '@pega/cosmos-react-core';\nimport { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';\nimport { AcceptedMouseEventElement } from '@pega/cosmos-react-core/lib/components/Menu/Menu.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 /** 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 /** 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 sorted in ascending or descending order.\n * @default 'descending'\n */\n sortOrder?: TimelineSortOrder;\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\nexport interface TimelineToolbarProps extends OmitStrict<ListToolbarProps, 'sort' | 'group'> {\n sort?: {\n /** An item click handler for all item clicks. */\n onItemClick: (id: TimelineSortOrder, e: MouseEvent<AcceptedMouseEventElement>) => void;\n /**\n * Currently selected sort order.\n * @default 'descending'\n */\n selected: TimelineProps['sortOrder'];\n };\n group?: {\n /** An item click handler for all item clicks. */\n onItemClick: (id: TimelineGroupBy, e: MouseEvent<AcceptedMouseEventElement>) => void;\n /**\n * Currently selected sort order.\n * @default 'date'\n */\n selected: TimelineProps['groupBy'];\n };\n}\n"]}
@@ -1,13 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps, DateTimeDisplayProps } from '@pega/cosmos-react-core';
3
- import type { ActivityObject } from './Timeline.types';
4
- interface TimelineItemProps {
5
- item: ActivityObject;
6
- timeFormat: DateTimeDisplayProps['variant'];
7
- prevItemDate: ActivityObject['date'] | undefined;
8
- nextItemDate: ActivityObject['date'] | undefined;
9
- currentTime: Date;
10
- }
11
- declare const TimelineItem: FunctionComponent<TimelineItemProps & ForwardProps>;
12
- export default TimelineItem;
13
- //# sourceMappingURL=TimelineItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineItem.d.ts","sourceRoot":"","sources":["../../../src/components/Timeline/TimelineItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiD,MAAM,OAAO,CAAC;AAEzF,OAAO,EAEL,YAAY,EAKZ,oBAAoB,EAErB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAYvD,UAAU,iBAAiB;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAC5C,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;AAED,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAgHrE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,33 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { isValidElement, useCallback, useRef, useState } from 'react';
3
- import { ExpandCollapse, Grid, Icon, Status, useBreakpoint, FieldValueItem } from '@pega/cosmos-react-core';
4
- import { StyledCard, StyledCardHeader, StyledTimelineIcon, StyledCardContent, StyledBulletWrapper, StyledToggleButton, StyledTime } from './Timeline.styles';
5
- import { isFutureDate } from './utils';
6
- const TimelineItem = ({ item: { date, title, icon, status, content }, timeFormat, prevItemDate, nextItemDate, currentTime }) => {
7
- const [collapsed, setCollapsed] = useState(true);
8
- const isSmallOrAbove = useBreakpoint('sm');
9
- const toggleCollapse = useCallback(() => setCollapsed(prevState => !prevState), []);
10
- const contentListRef = useRef(null);
11
- const isSMContentWidthOrAbove = useBreakpoint('sm', {
12
- breakpointRef: contentListRef
13
- });
14
- return (_jsxs("li", { children: [isSmallOrAbove && _jsx(StyledTime, { variant: timeFormat, value: date }), _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: {
15
- cols: 'auto 1fr',
16
- alignContent: 'evenly',
17
- alignItems: 'center',
18
- gap: 0.5
19
- }, sm: { container: { cols: 'auto 1fr auto' } }, children: [content && (_jsx(StyledToggleButton, { icon: true, variant: 'simple', onClick: toggleCollapse, collapsed: collapsed, "aria-expanded": !collapsed, compact: true, children: _jsx(Icon, { name: 'caret-down' }) })), _jsxs(Grid, { item: { colStart: '2', colEnd: '2' }, container: { rowGap: 0.25 }, children: [title, !isSmallOrAbove && (_jsxs(Grid, { container: {
20
- cols: '1fr auto',
21
- alignContent: 'evenly',
22
- alignItems: 'center'
23
- }, children: [_jsx(StyledTime, { variant: 'time', value: date }), 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 }) }))] }) }) }), content && (_jsx(ExpandCollapse, { dimension: 'height', collapsed: collapsed, nullWhenCollapsed: true, children: _jsx(StyledCardContent, { children: isValidElement(content) ? (content) : (_jsx(Grid, { container: {
24
- gap: 1,
25
- cols: isSMContentWidthOrAbove
26
- ? `repeat(${content.length > 1 ? '2' : '1'}, minmax(16ch, auto) minmax(25%, 1fr))`
27
- : 'minmax(0, 1fr)'
28
- }, ref: contentListRef, children: content.map(({ id, name, value, variant }) => {
29
- return (_jsx(FieldValueItem, { name: name, value: value, variant: isSmallOrAbove ? variant : 'stacked' }, id ?? name));
30
- }) })) }) }))] })] }));
31
- };
32
- export default TimelineItem;
33
- //# sourceMappingURL=TimelineItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineItem.js","sourceRoot":"","sources":["../../../src/components/Timeline/TimelineItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzF,OAAO,EACL,cAAc,EAEd,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,aAAa,EAEb,cAAc,EACf,MAAM,yBAAyB,CAAC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AQ,GAAU,GACtD,CACR,IACgB,GACR,GACT,EACL,OAAO,IAAI,CACV,KAAC,cAAc,IAAC,SAAS,EAAC,QAAQ,EAAC,SAAS,EAAE,SAAS,EAAE,iBAAiB,kBACxE,KAAC,iBAAiB,cACf,cAAc,CAAM,OAAO,CAAC,CAAC,CAAC,CAAC,CAC9B,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,IACH,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { FunctionComponent, isValidElement, useCallback, useRef, useState } from 'react';\n\nimport {\n ExpandCollapse,\n ForwardProps,\n Grid,\n Icon,\n Status,\n useBreakpoint,\n DateTimeDisplayProps,\n FieldValueItem\n} from '@pega/cosmos-react-core';\n\nimport type { ActivityObject } from './Timeline.types';\nimport {\n StyledCard,\n StyledCardHeader,\n StyledTimelineIcon,\n StyledCardContent,\n StyledBulletWrapper,\n StyledToggleButton,\n StyledTime\n} from './Timeline.styles';\nimport { isFutureDate } from './utils';\n\ninterface TimelineItemProps {\n item: ActivityObject;\n timeFormat: DateTimeDisplayProps['variant'];\n prevItemDate: ActivityObject['date'] | undefined;\n nextItemDate: ActivityObject['date'] | undefined;\n currentTime: Date;\n}\n\nconst TimelineItem: FunctionComponent<TimelineItemProps & ForwardProps> = ({\n item: { date, title, icon, status, content },\n timeFormat,\n prevItemDate,\n nextItemDate,\n currentTime\n}: TimelineItemProps & ForwardProps) => {\n const [collapsed, setCollapsed] = useState(true);\n const isSmallOrAbove = useBreakpoint('sm');\n\n const toggleCollapse = useCallback(() => setCollapsed(prevState => !prevState), []);\n const contentListRef = useRef<HTMLDivElement>(null);\n const isSMContentWidthOrAbove = useBreakpoint('sm', {\n breakpointRef: contentListRef\n });\n\n return (\n <li>\n {isSmallOrAbove && <StyledTime variant={timeFormat} value={date} />}\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 {content && (\n <StyledToggleButton\n icon\n variant='simple'\n onClick={toggleCollapse}\n collapsed={collapsed}\n aria-expanded={!collapsed}\n compact\n >\n <Icon name='caret-down' />\n </StyledToggleButton>\n )}\n <Grid item={{ colStart: '2', colEnd: '2' }} container={{ rowGap: 0.25 }}>\n {title}\n {!isSmallOrAbove && (\n <Grid\n container={{\n cols: '1fr auto',\n alignContent: 'evenly',\n alignItems: 'center'\n }}\n >\n <StyledTime variant='time' value={date} />\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 {content && (\n <ExpandCollapse dimension='height' collapsed={collapsed} nullWhenCollapsed>\n <StyledCardContent>\n {isValidElement<any>(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 </li>\n );\n};\n\nexport default TimelineItem;\n"]}
@@ -1,6 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- import { TimelineToolbarProps } from './Timeline.types';
4
- declare const TimelineToolbar: FunctionComponent<TimelineToolbarProps & ForwardProps>;
5
- export default TimelineToolbar;
6
- //# sourceMappingURL=TimelineToolbar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/Timeline/TimelineToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAA4B,MAAM,OAAO,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAwB,MAAM,yBAAyB,CAAC;AAG7E,OAAO,EAAsC,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE5F,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,GAAG,YAAY,CA6E3E,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,68 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef, useMemo } from 'react';
3
- import { ListToolbar, useI18n } from '@pega/cosmos-react-core';
4
- const TimelineToolbar = forwardRef(function TimelineToolbar({ sort, group, ...restProps }, ref) {
5
- const t = useI18n();
6
- const timelineSort = useMemo(() => {
7
- const selected = sort?.selected || 'descending';
8
- return {
9
- mode: 'single-select',
10
- items: [
11
- {
12
- id: 'descending',
13
- text: t('timeline_toolbar_sort_descending'),
14
- icon: 'arrow-down',
15
- selected: selected === 'descending'
16
- },
17
- {
18
- id: 'ascending',
19
- text: t('timeline_toolbar_sort_ascending'),
20
- icon: 'arrow-up',
21
- selected: selected === 'ascending'
22
- }
23
- ],
24
- onItemClick: (id, e) => {
25
- sort?.onItemClick(id, e);
26
- }
27
- };
28
- }, [sort?.selected, sort?.onItemClick]);
29
- const timelineGroup = useMemo(() => {
30
- const selected = group?.selected || 'date';
31
- return {
32
- mode: 'single-select',
33
- items: [
34
- {
35
- id: 'date',
36
- text: t('timeline_toolbar_group_date'),
37
- selected: selected === 'date'
38
- },
39
- {
40
- id: 'monthyear',
41
- text: t('timeline_toolbar_group_monthyear'),
42
- selected: selected === 'monthyear'
43
- },
44
- {
45
- id: 'quarteryear',
46
- text: t('timeline_toolbar_group_quarteryear'),
47
- selected: selected === 'quarteryear'
48
- },
49
- {
50
- id: 'year',
51
- text: t('timeline_toolbar_group_year'),
52
- selected: selected === 'year'
53
- },
54
- {
55
- id: 'none',
56
- text: t('timeline_toolbar_group_none'),
57
- selected: selected === 'none'
58
- }
59
- ],
60
- onItemClick: (id, e) => {
61
- group?.onItemClick(id, e);
62
- }
63
- };
64
- }, [group?.selected, group?.onItemClick]);
65
- return (_jsx(ListToolbar, { ...restProps, sort: sort ? timelineSort : undefined, group: group ? timelineGroup : undefined, ref: ref }));
66
- });
67
- export default TimelineToolbar;
68
- //# sourceMappingURL=TimelineToolbar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TimelineToolbar.js","sourceRoot":"","sources":["../../../src/components/Timeline/TimelineToolbar.tsx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AAC;oBACtC,QAAQ,EAAE,QAAQ,KAAK,MAAM;iBAC9B;gBACD;oBACE,EAAE,EAAE,WAAW;oBACf,IAAI,EAAE,CAAC,CAAC,kCAAkC,CAAC;oBAC3C,QAAQ,EAAE,QAAQ,KAAK,WAAW;iBACnC;gBACD;oBACE,EAAE,EAAE,aAAa;oBACjB,IAAI,EAAE,CAAC,CAAC,oCAAoC,CAAC;oBAC7C,QAAQ,EAAE,QAAQ,KAAK,aAAa;iBACrC;gBACD;oBACE,EAAE,EAAE,MAAM;oBACV,IAAI,EAAE,CAAC,CAAC,6BAA6B,CAAC;oBACtC,QAAQ,EAAE,QAAQ,KAAK,MAAM;iBAC9B;gBACD;oBACE,EAAE,EAAE,MAAM;oBACV,IAAI,EAAE,CAAC,CAAC,6BAA6B,CAAC;oBACtC,QAAQ,EAAE,QAAQ,KAAK,MAAM;iBAC9B;aACF;YACD,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;gBACrB,KAAK,EAAE,WAAW,CAAC,EAAqB,EAAE,CAAC,CAAC,CAAC;YAC/C,CAAC;SACF,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,KAAC,WAAW,OACN,SAAS,EACb,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EACrC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EACxC,GAAG,EAAE,GAAG,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, useMemo } from 'react';\n\nimport { ForwardProps, ListToolbar, useI18n } from '@pega/cosmos-react-core';\nimport { PresetMenuProps } from '@pega/cosmos-react-core/lib/components/ListToolbar/ListToolbar.types';\n\nimport { TimelineGroupBy, TimelineSortOrder, TimelineToolbarProps } from './Timeline.types';\n\nconst TimelineToolbar: FunctionComponent<TimelineToolbarProps & ForwardProps> = forwardRef(\n function TimelineToolbar(\n { sort, group, ...restProps }: PropsWithoutRef<TimelineToolbarProps>,\n ref: TimelineToolbarProps['ref']\n ) {\n const t = useI18n();\n\n const timelineSort: PresetMenuProps = useMemo(() => {\n const selected = sort?.selected || 'descending';\n return {\n mode: 'single-select',\n items: [\n {\n id: 'descending',\n text: t('timeline_toolbar_sort_descending'),\n icon: 'arrow-down',\n selected: selected === 'descending'\n },\n {\n id: 'ascending',\n text: t('timeline_toolbar_sort_ascending'),\n icon: 'arrow-up',\n selected: selected === 'ascending'\n }\n ],\n onItemClick: (id, e) => {\n sort?.onItemClick(id as TimelineSortOrder, e);\n }\n };\n }, [sort?.selected, sort?.onItemClick]);\n\n const timelineGroup: PresetMenuProps = useMemo(() => {\n const selected = group?.selected || 'date';\n return {\n mode: 'single-select',\n items: [\n {\n id: 'date',\n text: t('timeline_toolbar_group_date'),\n selected: selected === 'date'\n },\n {\n id: 'monthyear',\n text: t('timeline_toolbar_group_monthyear'),\n selected: selected === 'monthyear'\n },\n {\n id: 'quarteryear',\n text: t('timeline_toolbar_group_quarteryear'),\n selected: selected === 'quarteryear'\n },\n {\n id: 'year',\n text: t('timeline_toolbar_group_year'),\n selected: selected === 'year'\n },\n {\n id: 'none',\n text: t('timeline_toolbar_group_none'),\n selected: selected === 'none'\n }\n ],\n onItemClick: (id, e) => {\n group?.onItemClick(id as TimelineGroupBy, e);\n }\n };\n }, [group?.selected, group?.onItemClick]);\n\n return (\n <ListToolbar\n {...restProps}\n sort={sort ? timelineSort : undefined}\n group={group ? timelineGroup : undefined}\n ref={ref}\n />\n );\n }\n);\n\nexport default TimelineToolbar;\n"]}
@@ -1,4 +0,0 @@
1
- export { default } from './Timeline';
2
- export type { default as TimelineProps } from './Timeline.types';
3
- export { default as TimelineToolbar } from './TimelineToolbar';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Timeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,3 +0,0 @@
1
- export { default } from './Timeline';
2
- export { default as TimelineToolbar } from './TimelineToolbar';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Timeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { default } from './Timeline';\nexport type { default as TimelineProps } from './Timeline.types';\nexport { default as TimelineToolbar } from './TimelineToolbar';\n"]}
@@ -1,15 +0,0 @@
1
- import type { ActivityObject, TimelineGroupBy, TimelineSortOrder } from './Timeline.types';
2
- export declare function sortByDateAscending(dates: ActivityObject[]): ActivityObject[];
3
- export declare function sortByDateDescending(dates: ActivityObject[]): ActivityObject[];
4
- export declare function sortByDate(activity: ActivityObject[], sortOrder: TimelineSortOrder): ActivityObject[];
5
- export declare function getDatePartAsDate(date: string | number | Date): Date;
6
- export declare function getMonthYearPartAsDate(date: string | number | Date): Date;
7
- export declare function getYearPartAsDate(date: string | number | Date): Date;
8
- export declare function isSameDate(firstDate: string | number | Date, secondDate: string | number | Date): boolean;
9
- export declare function isSameMonthYear(firstDate: string | number | Date, secondDate: string | number | Date): boolean;
10
- export declare function isSameYear(firstDate: string | number | Date, secondDate: string | number | Date): boolean;
11
- export declare function isSameQuarterYear(firstDate: string | number | Date, secondDate: string | number | Date): boolean;
12
- export declare function isSameGroup(firstDate: string | number | Date | undefined, secondDate: string | number | Date | undefined, groupBy: TimelineGroupBy): boolean;
13
- export declare function groupByActivity(activity: ActivityObject[], groupBy: TimelineGroupBy): ActivityObject[][];
14
- export declare function isFutureDate(date: string | number | Date | undefined, current: Date): boolean;
15
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Timeline/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE3F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAE7E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAE9E;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,cAAc,EAAE,EAC1B,SAAS,EAAE,iBAAiB,GAC3B,cAAc,EAAE,CAElB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAGpE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAGzE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAGpE;AAED,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EACjC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GACjC,OAAO,CAET;AAED,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EACjC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GACjC,OAAO,CAIT;AAED,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EACjC,UAAU,EAAE,MA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