@pega/lists-react 9.0.0-build.2.9 → 9.0.0-build.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -4
- package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts +10 -5
- package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts.map +1 -1
- package/lib/Core/Components/A11y/RepeatingStructureA11y.js +27 -2
- package/lib/Core/Components/A11y/RepeatingStructureA11y.js.map +1 -1
- package/lib/Core/Components/AggregateMenu.d.ts +1 -0
- package/lib/Core/Components/AggregateMenu.d.ts.map +1 -1
- package/lib/Core/Components/AggregateMenu.js +32 -18
- package/lib/Core/Components/AggregateMenu.js.map +1 -1
- package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts +6 -15
- package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts.map +1 -1
- package/lib/Core/Components/ContextMenu/ContextMenuContainer.js +91 -163
- package/lib/Core/Components/ContextMenu/ContextMenuContainer.js.map +1 -1
- package/lib/Core/Components/ContextMenu/QuickFilter.js +7 -7
- package/lib/Core/Components/ContextMenu/QuickFilter.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts +2 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +9 -21
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts +2 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js +4 -3
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts +2 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js +4 -3
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts +0 -2
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.js +0 -2
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +5 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.js +12 -5
- package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts +3 -2
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js +13 -26
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js +2 -2
- package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts +0 -2
- package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js +11 -9
- package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js +5 -0
- package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/index.d.ts +5 -3
- package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/index.js +0 -2
- package/lib/Core/Components/DefaultComponents/index.js.map +1 -1
- package/lib/Core/Components/Filters/CommonFilter.d.ts.map +1 -1
- package/lib/Core/Components/Filters/CommonFilter.js +2 -2
- package/lib/Core/Components/Filters/CommonFilter.js.map +1 -1
- package/lib/Core/Components/Filters/FilterType.js +5 -5
- package/lib/Core/Components/Filters/FilterType.js.map +1 -1
- package/lib/Core/Components/Filters/SelectFilter.d.ts.map +1 -1
- package/lib/Core/Components/Filters/SelectFilter.js +2 -2
- package/lib/Core/Components/Filters/SelectFilter.js.map +1 -1
- package/lib/Core/Components/Filters/styles.d.ts +1 -1
- package/lib/Core/Components/FooterAggregators.d.ts.map +1 -1
- package/lib/Core/Components/FooterAggregators.js +3 -2
- package/lib/Core/Components/FooterAggregators.js.map +1 -1
- package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts +12 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts.map +1 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js +62 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js.map +1 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts +33 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts.map +1 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js +106 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js.map +1 -0
- package/lib/Core/Components/{GroupRenderer.d.ts → GroupRenderer/index.d.ts} +8 -1
- package/lib/Core/Components/GroupRenderer/index.d.ts.map +1 -0
- package/lib/Core/Components/GroupRenderer/index.js +367 -0
- package/lib/Core/Components/GroupRenderer/index.js.map +1 -0
- package/lib/Core/Components/Grouping/GroupingMenu.d.ts.map +1 -1
- package/lib/Core/Components/Grouping/GroupingMenu.js +6 -5
- package/lib/Core/Components/Grouping/GroupingMenu.js.map +1 -1
- package/lib/Core/Components/HeaderCell.d.ts.map +1 -1
- package/lib/Core/Components/HeaderCell.js +8 -5
- package/lib/Core/Components/HeaderCell.js.map +1 -1
- package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
- package/lib/Core/Components/HeaderMenu/actions.js +3 -3
- package/lib/Core/Components/HeaderMenu/actions.js.map +1 -1
- package/lib/Core/Components/HeaderMenu/index.d.ts.map +1 -1
- package/lib/Core/Components/HeaderMenu/index.js +2 -2
- package/lib/Core/Components/HeaderMenu/index.js.map +1 -1
- package/lib/Core/Components/NotificationManager.js +1 -1
- package/lib/Core/Components/NotificationManager.js.map +1 -1
- package/lib/Core/Components/RSWrapper/HeaderBarGadget.d.ts.map +1 -1
- package/lib/Core/Components/RSWrapper/HeaderBarGadget.js +2 -1
- package/lib/Core/Components/RSWrapper/HeaderBarGadget.js.map +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.d.ts +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.js +2 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -1
- package/lib/Core/Components/TestIdConstants.d.ts +1 -0
- package/lib/Core/Components/TestIdConstants.js +2 -1
- package/lib/Core/Components/TestIdConstants.js.map +1 -1
- package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/AdvanceToolbar.js +9 -33
- package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
- package/lib/Core/Components/Toolbar/AnnounceRowsCount.d.ts +1 -1
- package/lib/Core/Components/Toolbar/AnnounceRowsCount.js +1 -1
- package/lib/Core/Components/Toolbar/AnnounceRowsCount.js.map +1 -1
- package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +20 -9
- package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/ColumnSelector.js +89 -65
- package/lib/Core/Components/Toolbar/ColumnSelector.js.map +1 -1
- package/lib/Core/Components/Toolbar/DebugInfo.d.ts +3 -5
- package/lib/Core/Components/Toolbar/DebugInfo.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/DebugInfo.js +3 -3
- package/lib/Core/Components/Toolbar/DebugInfo.js.map +1 -1
- package/lib/Core/Components/Toolbar/FieldSelector.d.ts +1 -0
- package/lib/Core/Components/Toolbar/FieldSelector.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/FieldSelector.js +3 -2
- package/lib/Core/Components/Toolbar/FieldSelector.js.map +1 -1
- package/lib/Core/Components/Toolbar/Grouping.types.d.ts +0 -6
- package/lib/Core/Components/Toolbar/Grouping.types.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/Grouping.types.js.map +1 -1
- package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/SimpleToolbar.js +4 -3
- package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts +14 -18
- package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js +15 -16
- package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts +2 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +10 -7
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js +6 -3
- package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts +7 -2
- package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js +11 -3
- package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useMore.d.ts +1 -1
- package/lib/Core/Components/Toolbar/hooks/useMore.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useMore.js +81 -79
- package/lib/Core/Components/Toolbar/hooks/useMore.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts +8 -6
- package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/usePersonalization.js +18 -3
- package/lib/Core/Components/Toolbar/hooks/usePersonalization.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSearch.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSearch.js +6 -9
- package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts +4 -4
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +6 -6
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts +2 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js +8 -2
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/useSort.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js +2 -2
- package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts +6 -0
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts.map +1 -0
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.js +17 -0
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.js.map +1 -0
- package/lib/Core/Components/Toolbar/utils/utils.d.ts +1 -1
- package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/utils/utils.js +2 -1
- package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
- package/lib/Core/Components/Virtualise/Pagination.d.ts.map +1 -1
- package/lib/Core/Components/Virtualise/Pagination.js +2 -1
- package/lib/Core/Components/Virtualise/Pagination.js.map +1 -1
- package/lib/Core/Components/Virtualise/UseScroll.d.ts +4 -1
- package/lib/Core/Components/Virtualise/UseScroll.d.ts.map +1 -1
- package/lib/Core/Components/Virtualise/UseScroll.js +16 -3
- package/lib/Core/Components/Virtualise/UseScroll.js.map +1 -1
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts +97 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js +251 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts +22 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js +38 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts +22 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js +45 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts +49 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js +55 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts +21 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js +39 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts +38 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js +62 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +112 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +214 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -0
- package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +21 -8
- package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
- package/lib/Core/Components/Virtualise/index.js +21 -13
- package/lib/Core/Components/Virtualise/index.js.map +1 -1
- package/lib/Core/Components/Virtualise/utility.d.ts +1 -1
- package/lib/Core/Components/Virtualise/utility.d.ts.map +1 -1
- package/lib/Core/Components/Virtualise/utility.js +3 -2
- package/lib/Core/Components/Virtualise/utility.js.map +1 -1
- package/lib/Core/Context/LocalizationContext.d.ts +1 -1
- package/lib/Core/Context/LocalizationContext.d.ts.map +1 -1
- package/lib/Core/Context/LocalizationContext.js.map +1 -1
- package/lib/Core/Hooks/a11y/useAnnounce.d.ts +19 -0
- package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -0
- package/lib/Core/Hooks/a11y/useAnnounce.js +49 -0
- package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -0
- package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
- package/lib/Core/Hooks/useDragDrop.js +2 -0
- package/lib/Core/Hooks/useDragDrop.js.map +1 -1
- package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
- package/lib/Core/Hooks/useRepeat.js +20 -1
- package/lib/Core/Hooks/useRepeat.js.map +1 -1
- package/lib/Core/Localization/defaultTranslations.d.ts +16 -13
- package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
- package/lib/Core/Localization/defaultTranslations.js +17 -14
- package/lib/Core/Localization/defaultTranslations.js.map +1 -1
- package/lib/Core/Test/JUnitMocks.d.ts +6 -617
- package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
- package/lib/Core/Test/JUnitMocks.js +5 -4
- package/lib/Core/Test/JUnitMocks.js.map +1 -1
- package/lib/Core/Utils/index.d.ts +11 -0
- package/lib/Core/Utils/index.d.ts.map +1 -1
- package/lib/Core/Utils/index.js +22 -8
- package/lib/Core/Utils/index.js.map +1 -1
- package/lib/Core/Utils/styles.d.ts +2 -2
- package/lib/Core/Utils/styles.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +4 -0
- package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryCard.js +18 -0
- package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +25 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.js +15 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +1 -0
- package/lib/Core/Views/Gallery/Gallery.types.d.ts +8 -0
- package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Gallery.types.js +2 -0
- package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -0
- package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts +13 -1
- package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/StyledGalleryContainer.js +30 -40
- package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +1 -1
- package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js +1 -1
- package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js.map +1 -1
- package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts +9 -0
- package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/hooks/useRowActions.js +25 -0
- package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +1 -0
- package/lib/Core/Views/Gallery/index.d.ts +4 -8
- package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/index.js +22 -62
- package/lib/Core/Views/Gallery/index.js.map +1 -1
- package/lib/Core/Views/Gallery/utils.d.ts +36 -0
- package/lib/Core/Views/Gallery/utils.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/utils.js +91 -0
- package/lib/Core/Views/Gallery/utils.js.map +1 -0
- package/lib/Core/Views/Map/Map.styles.d.ts +190 -6
- package/lib/Core/Views/Map/Map.styles.d.ts.map +1 -1
- package/lib/Core/Views/Map/Map.styles.js.map +1 -1
- package/lib/Core/Views/Map/index.d.ts.map +1 -1
- package/lib/Core/Views/Map/index.js +10 -4
- package/lib/Core/Views/Map/index.js.map +1 -1
- package/lib/Core/Views/RsCardWrapper.js.map +1 -1
- package/lib/Core/Views/Table/CellWrapper.d.ts +1 -1
- package/lib/Core/Views/Table/CellWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/CellWrapper.js +4 -2
- package/lib/Core/Views/Table/CellWrapper.js.map +1 -1
- package/lib/Core/Views/Table/HeaderWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/HeaderWrapper.js +5 -5
- package/lib/Core/Views/Table/HeaderWrapper.js.map +1 -1
- package/lib/Core/Views/Table/Row.d.ts +3 -1
- package/lib/Core/Views/Table/Row.d.ts.map +1 -1
- package/lib/Core/Views/Table/Row.js +5 -3
- package/lib/Core/Views/Table/Row.js.map +1 -1
- package/lib/Core/Views/Table/SkeletonRows.d.ts +1 -1
- package/lib/Core/Views/Table/SkeletonRows.d.ts.map +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.d.ts +3 -1
- package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.js +269 -158
- package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
- package/lib/Core/Views/Table/TableA11y.d.ts +11 -0
- package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -1
- package/lib/Core/Views/Table/TableA11y.js +207 -2
- package/lib/Core/Views/Table/TableA11y.js.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +5 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.js +38 -15
- package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
- package/lib/Core/Views/Table/index.d.ts.map +1 -1
- package/lib/Core/Views/Table/index.js +6 -4
- package/lib/Core/Views/Table/index.js.map +1 -1
- package/lib/Core/Views/Table/useCountChange.d.ts +10 -0
- package/lib/Core/Views/Table/useCountChange.d.ts.map +1 -0
- package/lib/Core/Views/Table/useCountChange.js +39 -0
- package/lib/Core/Views/Table/useCountChange.js.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.d.ts +5 -0
- package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.js +28 -0
- package/lib/Core/Views/Timeline/Timeline.js.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.styles.d.ts +393 -0
- package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.styles.js +175 -0
- package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.types.d.ts +48 -0
- package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.types.js +2 -0
- package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -0
- package/lib/Core/Views/Timeline/TimelineItem.d.ts +12 -0
- package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/TimelineItem.js +43 -0
- package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -0
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +4 -0
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js +141 -0
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -0
- package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/index.js +14 -8
- package/lib/Core/Views/Timeline/index.js.map +1 -1
- package/lib/Core/Views/Timeline/utils.d.ts +10 -0
- package/lib/Core/Views/Timeline/utils.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/utils.js +144 -0
- package/lib/Core/Views/Timeline/utils.js.map +1 -0
- package/lib/Core/Views/rs-styles.d.ts +1 -1
- package/lib/Core/constants.d.ts.map +1 -1
- package/lib/Core/constants.js +1 -0
- package/lib/Core/constants.js.map +1 -1
- package/lib/Core/templateFeatureSupport.d.ts +17 -0
- package/lib/Core/templateFeatureSupport.d.ts.map +1 -0
- package/lib/Core/templateFeatureSupport.js +30 -0
- package/lib/Core/templateFeatureSupport.js.map +1 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +11 -12
- package/lib/Core/Components/DefaultComponents/CardItem.d.ts +0 -3
- package/lib/Core/Components/DefaultComponents/CardItem.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CardItem.js +0 -78
- package/lib/Core/Components/DefaultComponents/CardItem.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts +0 -12
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +0 -35
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts +0 -15
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +0 -49
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts +0 -12
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js +0 -44
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts +0 -16
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +0 -63
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +0 -1
- package/lib/Core/Components/EmptyContainer.d.ts +0 -5
- package/lib/Core/Components/EmptyContainer.d.ts.map +0 -1
- package/lib/Core/Components/EmptyContainer.js +0 -12
- package/lib/Core/Components/EmptyContainer.js.map +0 -1
- package/lib/Core/Components/GroupRenderer.d.ts.map +0 -1
- package/lib/Core/Components/GroupRenderer.js +0 -240
- package/lib/Core/Components/GroupRenderer.js.map +0 -1
- package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts +0 -6
- package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts.map +0 -1
- package/lib/Core/Components/Toolbar/KeyboardInstructions.js +0 -32
- package/lib/Core/Components/Toolbar/KeyboardInstructions.js.map +0 -1
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +0 -8
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +0 -1
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +0 -61
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +0 -1
- package/lib/Core/Hooks/useSelect.d.ts +0 -9
- package/lib/Core/Hooks/useSelect.d.ts.map +0 -1
- package/lib/Core/Hooks/useSelect.js +0 -24
- package/lib/Core/Hooks/useSelect.js.map +0 -1
- package/lib/Core/Views/Gallery/ItemWrapper.d.ts +0 -19
- package/lib/Core/Views/Gallery/ItemWrapper.d.ts.map +0 -1
- package/lib/Core/Views/Gallery/ItemWrapper.js +0 -34
- package/lib/Core/Views/Gallery/ItemWrapper.js.map +0 -1
- package/lib/Core/Views/Timeline/utility.d.ts +0 -8
- package/lib/Core/Views/Timeline/utility.d.ts.map +0 -1
- package/lib/Core/Views/Timeline/utility.js +0 -120
- package/lib/Core/Views/Timeline/utility.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TimelineToolbar.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/Toolbar/Timeline/TimelineToolbar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,gEAAgE,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAKlE,QAAA,MAAM,eAAe,GAAI,wBAGtB;IACD,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;CACxB,GAAG,UAAU,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC,4CA4ErD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { TimelineToolbar as TimelineToolbarCosmos } from '@pega/cosmos-react-work';
|
|
4
|
-
import { TOOLBAR_FEATURES } from '../../../constants';
|
|
5
|
-
import { mapDateFnToGroupOption } from '../../../Views/Timeline/utility';
|
|
6
|
-
const TimelineToolbar = ({ view, ...restProps }) => {
|
|
7
|
-
const displaySort = view.shouldDisplayFeature(TOOLBAR_FEATURES.SORT);
|
|
8
|
-
const displayGrouping = view.shouldDisplayFeature(TOOLBAR_FEATURES.GROUPING);
|
|
9
|
-
const sort = useMemo(() => ({
|
|
10
|
-
selected: view.state.sortingOrder?.[0]?.order === 'asc' ? 'ascending' : 'descending',
|
|
11
|
-
onItemClick: id => {
|
|
12
|
-
if (view.state?.sortingOrder?.[0]) {
|
|
13
|
-
view.type.applySorting([
|
|
14
|
-
{
|
|
15
|
-
...view.state.sortingOrder[0],
|
|
16
|
-
order: id === 'ascending' ? 'asc' : 'desc'
|
|
17
|
-
}
|
|
18
|
-
]);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}), [view.state.sortingOrder, view.type.applySorting]);
|
|
22
|
-
const group = useMemo(() => ({
|
|
23
|
-
selected: mapDateFnToGroupOption(view.state.groups?.[0]?.dateFunction),
|
|
24
|
-
onItemClick: id => {
|
|
25
|
-
let dateFunction;
|
|
26
|
-
switch (id) {
|
|
27
|
-
case 'year':
|
|
28
|
-
dateFunction = 'YEARS';
|
|
29
|
-
break;
|
|
30
|
-
case 'quarteryear':
|
|
31
|
-
dateFunction = 'QUARTERS';
|
|
32
|
-
break;
|
|
33
|
-
case 'monthyear':
|
|
34
|
-
dateFunction = 'MONTHS';
|
|
35
|
-
break;
|
|
36
|
-
case 'date':
|
|
37
|
-
dateFunction = 'DAYS';
|
|
38
|
-
break;
|
|
39
|
-
default:
|
|
40
|
-
}
|
|
41
|
-
view.type.applyGrouping(dateFunction && view.meta.timelineFields?.date?.label
|
|
42
|
-
? [
|
|
43
|
-
{
|
|
44
|
-
columnId: view.meta.timelineFields.date.label,
|
|
45
|
-
dateFunction,
|
|
46
|
-
level: 0,
|
|
47
|
-
order: view.state.sortingOrder?.[0]?.order ?? 'desc'
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
: []);
|
|
51
|
-
}
|
|
52
|
-
}), [
|
|
53
|
-
view.state.groups,
|
|
54
|
-
view.type.applyGrouping,
|
|
55
|
-
view.meta.timelineFields?.date,
|
|
56
|
-
view.state.sortingOrder
|
|
57
|
-
]);
|
|
58
|
-
return (_jsx(TimelineToolbarCosmos, { sort: displaySort ? sort : undefined, group: view.meta.grouping && displayGrouping ? group : undefined, ...restProps }));
|
|
59
|
-
};
|
|
60
|
-
export default TimelineToolbar;
|
|
61
|
-
//# sourceMappingURL=TimelineToolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TimelineToolbar.js","sourceRoot":"","sources":["../../../../../Core/Components/Toolbar/Timeline/TimelineToolbar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAQnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,MAAM,eAAe,GAAG,CAAC,EACvB,IAAI,EACJ,GAAG,SAAS,EAGwC,EAAE,EAAE;IACxD,MAAM,WAAW,GAAG,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACrE,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAE7E,MAAM,IAAI,GAAG,OAAO,CAIlB,GAAG,EAAE,CAAC,CAAC;QACL,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY;QACpF,WAAW,EAAE,EAAE,CAAC,EAAE;YAChB,IAAI,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;oBACrB;wBACE,GAAG,IA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F;QACE,IAAI,CAAC,KAAK,CAAC,MAAM;QACjB,IAAI,CAAC,IAAI,CAAC,aAAa;QACvB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI;QAC9B,IAAI,CAAC,KAAK,CAAC,YAAY;KACxB,CACF,CAAC;IAEF,OAAO,CACL,KAAC,qBAAqB,IACpB,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACpC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,KAC5D,SAAS,GACb,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import type { Group } from 'packages/lists-rs-core/types/State.types';\nimport { useMemo } from 'react';\n\nimport type { OmitStrict } from '@pega/cosmos-react-core';\nimport { TimelineToolbar as TimelineToolbarCosmos } from '@pega/cosmos-react-work';\nimport type {\n TimelineGroupBy,\n TimelineSortOrder,\n TimelineToolbarProps\n} from '@pega/cosmos-react-work/lib/components/Timeline/Timeline.types';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport { TOOLBAR_FEATURES } from '../../../constants';\nimport { mapDateFnToGroupOption } from '../../../Views/Timeline/utility';\n\nconst TimelineToolbar = ({\n view,\n ...restProps\n}: {\n view: RsCoreTypes.View;\n} & OmitStrict<TimelineToolbarProps, 'sort' | 'group'>) => {\n const displaySort = view.shouldDisplayFeature(TOOLBAR_FEATURES.SORT);\n const displayGrouping = view.shouldDisplayFeature(TOOLBAR_FEATURES.GROUPING);\n\n const sort = useMemo<{\n selected: TimelineSortOrder;\n onItemClick: (id: TimelineSortOrder) => void;\n }>(\n () => ({\n selected: view.state.sortingOrder?.[0]?.order === 'asc' ? 'ascending' : 'descending',\n onItemClick: id => {\n if (view.state?.sortingOrder?.[0]) {\n view.type.applySorting([\n {\n ...view.state.sortingOrder[0],\n order: id === 'ascending' ? 'asc' : 'desc'\n }\n ]);\n }\n }\n }),\n [view.state.sortingOrder, view.type.applySorting]\n );\n\n const group = useMemo<{\n selected: TimelineGroupBy | undefined;\n onItemClick: (id: TimelineGroupBy) => void;\n }>(\n () => ({\n selected: mapDateFnToGroupOption(view.state.groups?.[0]?.dateFunction),\n onItemClick: id => {\n let dateFunction: Group['dateFunction'];\n switch (id) {\n case 'year':\n dateFunction = 'YEARS';\n break;\n case 'quarteryear':\n dateFunction = 'QUARTERS';\n break;\n case 'monthyear':\n dateFunction = 'MONTHS';\n break;\n case 'date':\n dateFunction = 'DAYS';\n break;\n default:\n }\n view.type.applyGrouping(\n dateFunction && view.meta.timelineFields?.date?.label\n ? [\n {\n columnId: view.meta.timelineFields.date.label,\n dateFunction,\n level: 0,\n order: view.state.sortingOrder?.[0]?.order ?? 'desc'\n }\n ]\n : []\n );\n }\n }),\n [\n view.state.groups,\n view.type.applyGrouping,\n view.meta.timelineFields?.date,\n view.state.sortingOrder\n ]\n );\n\n return (\n <TimelineToolbarCosmos\n sort={displaySort ? sort : undefined}\n group={view.meta.grouping && displayGrouping ? group : undefined}\n {...restProps}\n />\n );\n};\n\nexport default TimelineToolbar;\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A custom React hook to manage a set of selected items.
|
|
3
|
-
*
|
|
4
|
-
* @param - The initial list of selected item IDs.
|
|
5
|
-
*
|
|
6
|
-
* @returns An array containing the set of selected items, a function to toggle selection, and a function to check if an item is selected.
|
|
7
|
-
*/
|
|
8
|
-
export default function useSelect(initialSelected?: string[]): [Set<string>, (id: string) => void, (item: string) => boolean];
|
|
9
|
-
//# sourceMappingURL=useSelect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSelect.d.ts","sourceRoot":"","sources":["../../../Core/Hooks/useSelect.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,eAAe,GAAE,MAAM,EAAO,GAC7B,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAkBhE"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useCallback, useState } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* A custom React hook to manage a set of selected items.
|
|
4
|
-
*
|
|
5
|
-
* @param - The initial list of selected item IDs.
|
|
6
|
-
*
|
|
7
|
-
* @returns An array containing the set of selected items, a function to toggle selection, and a function to check if an item is selected.
|
|
8
|
-
*/
|
|
9
|
-
export default function useSelect(initialSelected = []) {
|
|
10
|
-
const [selected, setSelected] = useState(new Set([...initialSelected]));
|
|
11
|
-
const onSelect = useCallback((id) => {
|
|
12
|
-
const value = id;
|
|
13
|
-
if (selected.has(value)) {
|
|
14
|
-
selected.delete(value);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
selected.add(value);
|
|
18
|
-
}
|
|
19
|
-
setSelected(new Set(selected));
|
|
20
|
-
}, [selected, setSelected]);
|
|
21
|
-
const isSelected = useCallback((item) => selected.has(item), [selected]);
|
|
22
|
-
return [selected, onSelect, isSelected];
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=useSelect.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSelect.js","sourceRoot":"","sources":["../../../Core/Hooks/useSelect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,kBAA4B,EAAE;IAE9B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAExE,MAAM,QAAQ,GAAG,WAAW,CAC1B,CAAC,EAAU,EAAE,EAAE;QACb,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YACxB,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;QACD,WAAW,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjC,CAAC,EACD,CAAC,QAAQ,EAAE,WAAW,CAAC,CACxB,CAAC;IACF,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEjF,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["import { useCallback, useState } from 'react';\n\n/**\n * A custom React hook to manage a set of selected items.\n *\n * @param - The initial list of selected item IDs.\n *\n * @returns An array containing the set of selected items, a function to toggle selection, and a function to check if an item is selected.\n */\nexport default function useSelect(\n initialSelected: string[] = []\n): [Set<string>, (id: string) => void, (item: string) => boolean] {\n const [selected, setSelected] = useState(new Set([...initialSelected]));\n\n const onSelect = useCallback(\n (id: string) => {\n const value = id;\n if (selected.has(value)) {\n selected.delete(value);\n } else {\n selected.add(value);\n }\n setSelected(new Set(selected));\n },\n [selected, setSelected]\n );\n const isSelected = useCallback((item: string) => selected.has(item), [selected]);\n\n return [selected, onSelect, isSelected];\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default ItemWrapper;
|
|
2
|
-
declare function ItemWrapper({ children, itemKey }: {
|
|
3
|
-
children: any;
|
|
4
|
-
itemKey: any;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare namespace ItemWrapper {
|
|
7
|
-
namespace propTypes {
|
|
8
|
-
let children: PropTypes.Requireable<object>;
|
|
9
|
-
let itemKey: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
10
|
-
}
|
|
11
|
-
namespace defaultProps {
|
|
12
|
-
let children_1: never[];
|
|
13
|
-
export { children_1 as children };
|
|
14
|
-
let itemKey_1: string;
|
|
15
|
-
export { itemKey_1 as itemKey };
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
import PropTypes from 'prop-types';
|
|
19
|
-
//# sourceMappingURL=ItemWrapper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ItemWrapper.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Gallery/ItemWrapper.jsx"],"names":[],"mappings":";AAsBA;;;4CAOC;;;;;;;;;;;;;sBA7BqB,YAAY"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import styled, { css } from 'styled-components';
|
|
4
|
-
import { useTheme, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
5
|
-
import { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';
|
|
6
|
-
const StyledItemWrapper = styled.div(({ theme }) => {
|
|
7
|
-
return css `
|
|
8
|
-
&.tile {
|
|
9
|
-
flex: 1;
|
|
10
|
-
position: relative;
|
|
11
|
-
border: 0.063rem solid ${props => props.theme.base.palette['border-line']};
|
|
12
|
-
background: ${props => props.theme.base.palette['primary-background']};
|
|
13
|
-
box-shadow: 0 0 0.313rem 0 rgba(238, 238, 238, 1);
|
|
14
|
-
&& ${StyledCardContent} {
|
|
15
|
-
padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
19
|
-
});
|
|
20
|
-
StyledItemWrapper.defaultProps = defaultThemeProp;
|
|
21
|
-
function ItemWrapper({ children, itemKey }) {
|
|
22
|
-
const theme = useTheme();
|
|
23
|
-
return (_jsx(StyledItemWrapper, { theme: theme, "data-key": itemKey, className: 'tile', children: children }));
|
|
24
|
-
}
|
|
25
|
-
ItemWrapper.propTypes = {
|
|
26
|
-
children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
|
27
|
-
itemKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
28
|
-
};
|
|
29
|
-
ItemWrapper.defaultProps = {
|
|
30
|
-
children: [],
|
|
31
|
-
itemKey: ''
|
|
32
|
-
};
|
|
33
|
-
export default ItemWrapper;
|
|
34
|
-
//# sourceMappingURL=ItemWrapper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ItemWrapper.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/ItemWrapper.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAE5F,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjD,OAAO,GAAG,CAAA;;;;+BAImB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;oBAC3D,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;WAEhE,iBAAiB;8BACE,KAAK,CAAC,IAAI,CAAC,OAAO,UAAU,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO;;;GAGpF,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,SAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE;IACxC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,CACL,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,cAAY,OAAO,EAAE,SAAS,EAAC,MAAM,YACjE,QAAQ,GACS,CACrB,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,SAAS,GAAG;IACtB,QAAQ,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IAClE,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CACnE,CAAC;AAEF,WAAW,CAAC,YAAY,GAAG;IACzB,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport styled, { css } from 'styled-components';\n\nimport { useTheme, defaultThemeProp } from '@pega/cosmos-react-core';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\n\nconst StyledItemWrapper = styled.div(({ theme }) => {\n return css`\n &.tile {\n flex: 1;\n position: relative;\n border: 0.063rem solid ${props => props.theme.base.palette['border-line']};\n background: ${props => props.theme.base.palette['primary-background']};\n box-shadow: 0 0 0.313rem 0 rgba(238, 238, 238, 1);\n && ${StyledCardContent} {\n padding: calc(1.5 * ${theme.base.spacing}) calc(${theme.components.card.padding} * 2);\n }\n }\n `;\n});\nStyledItemWrapper.defaultProps = defaultThemeProp;\n\nfunction ItemWrapper({ children, itemKey }) {\n const theme = useTheme();\n return (\n <StyledItemWrapper theme={theme} data-key={itemKey} className='tile'>\n {children}\n </StyledItemWrapper>\n );\n}\n\nItemWrapper.propTypes = {\n children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n itemKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n};\n\nItemWrapper.defaultProps = {\n children: [],\n itemKey: ''\n};\n\nexport default ItemWrapper;\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Group } from 'packages/lists-rs-core/types/State.types';
|
|
2
|
-
import type { ActivityObject, TimelineGroupBy } from '@pega/cosmos-react-work/lib/components/Timeline/Timeline.types';
|
|
3
|
-
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
4
|
-
declare const getActivity: (rows: RsCoreTypes.View["rows"], columns: RsCoreTypes.View["columns"], { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View["meta"]) => ActivityObject[] | undefined;
|
|
5
|
-
export default getActivity;
|
|
6
|
-
export declare const mapDateFnToGroupOption: (dateFunction: Group["dateFunction"]) => TimelineGroupBy;
|
|
7
|
-
export declare function calculateBodyMaxHeight(maxHeight: string | number | undefined, domContainer: HTMLElement | undefined, pContainer: HTMLElement | null | undefined): string | undefined;
|
|
8
|
-
//# sourceMappingURL=utility.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utility.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0CAA0C,CAAC;AAMtE,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAChB,MAAM,gEAAgE,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAqDlE,QAAA,MAAM,WAAW,GACf,MAAM,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAC9B,SAAS,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EACpC,gDAAgD,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,KACvE,cAAc,EAAE,GAAG,SAqDrB,CAAC;AAEF,eAAe,WAAW,CAAC;AAE3B,eAAO,MAAM,sBAAsB,GAAI,cAAc,KAAK,CAAC,cAAc,CAAC,KAAG,eAa5E,CAAC;AAEF,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EACtC,YAAY,EAAE,WAAW,GAAG,SAAS,EACrC,UAAU,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,sBAc3C"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import dayjs from 'dayjs';
|
|
3
|
-
import timezonePlugin from 'dayjs/plugin/timezone';
|
|
4
|
-
import { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';
|
|
5
|
-
import { NoValue } from '@pega/cosmos-react-core';
|
|
6
|
-
import ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';
|
|
7
|
-
dayjs.extend(timezonePlugin);
|
|
8
|
-
const getStatusVariant = (data) => {
|
|
9
|
-
let variant;
|
|
10
|
-
const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];
|
|
11
|
-
const infoStrings = ['open', 'hold', 'info', 'new'];
|
|
12
|
-
const successStrings = ['resolved', 'completed', 'success'];
|
|
13
|
-
const pendingStrings = ['pending'];
|
|
14
|
-
if (new RegExp(warnStrings.join('|'), 'i').test(data)) {
|
|
15
|
-
variant = 'warn';
|
|
16
|
-
}
|
|
17
|
-
else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {
|
|
18
|
-
variant = 'info';
|
|
19
|
-
}
|
|
20
|
-
else if (new RegExp(successStrings.join('|'), 'i').test(data)) {
|
|
21
|
-
variant = 'success';
|
|
22
|
-
}
|
|
23
|
-
else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {
|
|
24
|
-
variant = 'pending';
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
variant = 'info';
|
|
28
|
-
}
|
|
29
|
-
return variant;
|
|
30
|
-
};
|
|
31
|
-
const getFieldsAsActivityContent = (columns, row) => {
|
|
32
|
-
return columns
|
|
33
|
-
?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)
|
|
34
|
-
?.map(column => {
|
|
35
|
-
return {
|
|
36
|
-
id: column.field.id,
|
|
37
|
-
name: column.field.label,
|
|
38
|
-
value: _jsx(ValueRenderer, { column: column, row: row })
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
const convertDateToTimezone = (value, timezone) => {
|
|
43
|
-
return (dayjs(value)
|
|
44
|
-
.tz(timezone)
|
|
45
|
-
// cSpell:disable-next-line
|
|
46
|
-
.format('YYYY-MM-DDTHH:mm:ss'));
|
|
47
|
-
};
|
|
48
|
-
const getActivity = (rows, columns, { timelineFields, timezone, defaultRowHeight }) => {
|
|
49
|
-
const { title, date, status: statusProp, icon, content } = timelineFields ?? {};
|
|
50
|
-
const titleColumn = columns?.find(({ field }) => field.name === title?.name);
|
|
51
|
-
const dateColumn = columns?.find(({ field }) => field.name === date?.name);
|
|
52
|
-
const contentColumn = columns?.find(({ field }) => field.name === content?.name);
|
|
53
|
-
return rows
|
|
54
|
-
?.map(row => {
|
|
55
|
-
const data = row.getContext().getValue();
|
|
56
|
-
const dateValue = date?.name ? data[date.name] : undefined;
|
|
57
|
-
const dateFieldType = dateColumn?.field?.type;
|
|
58
|
-
const isDateOnlyFieldType = dateFieldType === FieldType.DATE ||
|
|
59
|
-
dateFieldType === FieldType.DATE_ONLY ||
|
|
60
|
-
dateFieldType === FieldType.DATE_TIMELINE;
|
|
61
|
-
// Activity Object date can't be undefined
|
|
62
|
-
if (!dateValue) {
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
const statusData = statusProp?.name ? data[statusProp.name] : undefined;
|
|
66
|
-
let status;
|
|
67
|
-
if (statusData) {
|
|
68
|
-
status = {
|
|
69
|
-
variant: getStatusVariant(statusData),
|
|
70
|
-
children: statusData
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
const activity = {
|
|
74
|
-
id: row.key,
|
|
75
|
-
title: title?.name && data[title.name] && titleColumn ? (_jsx(ValueRenderer, { column: titleColumn, row: row })) : (_jsx(NoValue, {})),
|
|
76
|
-
date: timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone
|
|
77
|
-
? convertDateToTimezone(dateValue, timezone)
|
|
78
|
-
: dateValue,
|
|
79
|
-
dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',
|
|
80
|
-
icon: icon?.name ? data[icon.name] : undefined,
|
|
81
|
-
defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,
|
|
82
|
-
content: contentColumn ? (_jsx(ValueRenderer, { column: contentColumn, row: row })) : (getFieldsAsActivityContent(columns, row)),
|
|
83
|
-
status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status
|
|
84
|
-
};
|
|
85
|
-
return activity;
|
|
86
|
-
})
|
|
87
|
-
?.filter((item) => !!item);
|
|
88
|
-
};
|
|
89
|
-
export default getActivity;
|
|
90
|
-
export const mapDateFnToGroupOption = (dateFunction) => {
|
|
91
|
-
switch (dateFunction) {
|
|
92
|
-
case 'YEARS':
|
|
93
|
-
return 'year';
|
|
94
|
-
case 'QUARTERS':
|
|
95
|
-
return 'quarteryear';
|
|
96
|
-
case 'MONTHS':
|
|
97
|
-
return 'monthyear';
|
|
98
|
-
case 'DAYS':
|
|
99
|
-
return 'date';
|
|
100
|
-
default:
|
|
101
|
-
return 'none';
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
export function calculateBodyMaxHeight(maxHeight, domContainer, pContainer) {
|
|
105
|
-
if (maxHeight === undefined)
|
|
106
|
-
return;
|
|
107
|
-
if (!domContainer || !pContainer)
|
|
108
|
-
return;
|
|
109
|
-
const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;
|
|
110
|
-
if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {
|
|
111
|
-
// Means it is a css variable which is a string, and it needs to be computed with calc function
|
|
112
|
-
// If css variable is not defined then fallback to default max height i.e. 550px
|
|
113
|
-
const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;
|
|
114
|
-
return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;
|
|
115
|
-
}
|
|
116
|
-
if (typeof maxHeight === 'number') {
|
|
117
|
-
return `${maxHeight - extraHeight - 32}px`;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
//# sourceMappingURL=utility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utility.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAInD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAE7F,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAOlD,OAAO,aAAa,MAAM,gDAAgD,CAAC;AAE3E,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC7B,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAA0B,EAAE;IAChE,IAAI,OAA+B,CAAC;IACpC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAC9E,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACpD,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,CAAC,SAAS,CAAC,CAAC;IAEnC,IAAI,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACtD,OAAO,GAAG,MAAM,CAAC;IACnB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,GAAG,EAAE,IAAI,CAAC;IAC7C,CAAC;AACH,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport timezonePlugin from 'dayjs/plugin/timezone';\nimport type { Group } from 'packages/lists-rs-core/types/State.types';\nimport type { ReactText } from 'react';\n\nimport { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';\nimport type { FieldValueListProps, StatusProps } from '@pega/cosmos-react-core';\nimport { NoValue } from '@pega/cosmos-react-core';\nimport type {\n ActivityObject,\n TimelineGroupBy\n} from '@pega/cosmos-react-work/lib/components/Timeline/Timeline.types';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';\n\ndayjs.extend(timezonePlugin);\nconst getStatusVariant = (data: string): StatusProps['variant'] => {\n let variant: StatusProps['variant'];\n const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];\n const infoStrings = ['open', 'hold', 'info', 'new'];\n const successStrings = ['resolved', 'completed', 'success'];\n const pendingStrings = ['pending'];\n\n if (new RegExp(warnStrings.join('|'), 'i').test(data)) {\n variant = 'warn';\n } else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {\n variant = 'info';\n } else if (new RegExp(successStrings.join('|'), 'i').test(data)) {\n variant = 'success';\n } else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {\n variant = 'pending';\n } else {\n variant = 'info';\n }\n return variant;\n};\n\nconst getFieldsAsActivityContent = (\n columns: RsCoreTypes.View['columns'],\n row: RsCoreTypes.Row\n): FieldValueListProps['fields'] | undefined => {\n return columns\n ?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)\n ?.map(column => {\n return {\n id: column.field.id,\n name: column.field.label,\n value: <ValueRenderer column={column} row={row} />\n };\n });\n};\n\nconst convertDateToTimezone = (\n value: string | number | Date,\n timezone: RsCoreTypes.Meta['timezone']\n): string => {\n return (\n dayjs(value)\n .tz(timezone)\n // cSpell:disable-next-line\n .format('YYYY-MM-DDTHH:mm:ss')\n );\n};\n\nconst getActivity = (\n rows: RsCoreTypes.View['rows'],\n columns: RsCoreTypes.View['columns'],\n { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View['meta']\n): ActivityObject[] | undefined => {\n const { title, date, status: statusProp, icon, content } = timelineFields ?? {};\n const titleColumn = columns?.find(({ field }) => field.name === title?.name);\n const dateColumn = columns?.find(({ field }) => field.name === date?.name);\n const contentColumn = columns?.find(({ field }) => field.name === content?.name);\n\n return rows\n ?.map(row => {\n const data = row.getContext().getValue();\n const dateValue = date?.name ? data[date.name] : undefined;\n const dateFieldType = dateColumn?.field?.type;\n const isDateOnlyFieldType =\n dateFieldType === FieldType.DATE ||\n dateFieldType === FieldType.DATE_ONLY ||\n dateFieldType === FieldType.DATE_TIMELINE;\n\n // Activity Object date can't be undefined\n if (!dateValue) {\n return undefined;\n }\n const statusData = statusProp?.name ? data[statusProp.name] : undefined;\n let status;\n if (statusData) {\n status = {\n variant: getStatusVariant(statusData as string),\n children: statusData as ReactText\n };\n }\n const activity: ActivityObject = {\n id: row.key as string,\n title:\n title?.name && data[title.name] && titleColumn ? (\n <ValueRenderer column={titleColumn} row={row} />\n ) : (\n <NoValue />\n ),\n date:\n timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone\n ? convertDateToTimezone(dateValue as string, timezone)\n : (dateValue as string),\n dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',\n icon: icon?.name ? (data[icon.name] as string) : undefined,\n defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,\n content: contentColumn ? (\n <ValueRenderer column={contentColumn} row={row} />\n ) : (\n getFieldsAsActivityContent(columns, row)\n ),\n status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status\n };\n return activity;\n })\n ?.filter((item): item is ActivityObject => !!item);\n};\n\nexport default getActivity;\n\nexport const mapDateFnToGroupOption = (dateFunction: Group['dateFunction']): TimelineGroupBy => {\n switch (dateFunction) {\n case 'YEARS':\n return 'year';\n case 'QUARTERS':\n return 'quarteryear';\n case 'MONTHS':\n return 'monthyear';\n case 'DAYS':\n return 'date';\n default:\n return 'none';\n }\n};\n\nexport function calculateBodyMaxHeight(\n maxHeight: string | number | undefined,\n domContainer: HTMLElement | undefined,\n pContainer: HTMLElement | null | undefined\n) {\n if (maxHeight === undefined) return;\n if (!domContainer || !pContainer) return;\n const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;\n if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {\n // Means it is a css variable which is a string, and it needs to be computed with calc function\n // If css variable is not defined then fallback to default max height i.e. 550px\n const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;\n return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;\n }\n if (typeof maxHeight === 'number') {\n return `${maxHeight - extraHeight - 32}px`;\n }\n}\n"]}
|