@pega/lists-react 9.0.0-build.9.9 → 10.0.0-build.1.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 +0 -4
- package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts.map +1 -1
- package/lib/Core/Components/A11y/RepeatingStructureA11y.js +2 -1
- package/lib/Core/Components/A11y/RepeatingStructureA11y.js.map +1 -1
- package/lib/Core/Components/AggregateMenu.d.ts.map +1 -1
- package/lib/Core/Components/AggregateMenu.js +6 -2
- package/lib/Core/Components/AggregateMenu.js.map +1 -1
- package/lib/Core/Components/AggregatorCell.d.ts.map +1 -1
- package/lib/Core/Components/AggregatorCell.js +3 -1
- package/lib/Core/Components/AggregatorCell.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 +111 -166
- package/lib/Core/Components/ContextMenu/ContextMenuContainer.js.map +1 -1
- package/lib/Core/Components/ContextMenu/QuickFilter.js +1 -1
- 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.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +33 -5
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.d.ts +10 -0
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.d.ts.map +1 -0
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.js +27 -0
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.js.map +1 -0
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts +2 -2
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.js +2 -2
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +3 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.js +11 -2
- 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 +20 -19
- package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/index.d.ts +4 -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/AdvanceFilter.d.ts.map +1 -1
- package/lib/Core/Components/Filters/AdvanceFilter.js +5 -2
- package/lib/Core/Components/Filters/AdvanceFilter.js.map +1 -1
- package/lib/Core/Components/Filters/SelectFilter.d.ts +1 -1
- package/lib/Core/Components/Filters/SelectFilter.d.ts.map +1 -1
- package/lib/Core/Components/Filters/SelectFilter.js +43 -44
- package/lib/Core/Components/Filters/SelectFilter.js.map +1 -1
- package/lib/Core/Components/Filters/SimpleFilter.js +1 -1
- package/lib/Core/Components/Filters/SimpleFilter.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 +6 -3
- 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/index.d.ts +22 -0
- package/lib/Core/Components/GroupRenderer/index.d.ts.map +1 -0
- package/lib/Core/Components/GroupRenderer/index.js +395 -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 +2 -1
- 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 +3 -3
- package/lib/Core/Components/HeaderCell.js.map +1 -1
- package/lib/Core/Components/HeaderMenu/actions.d.ts +1 -1
- package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
- package/lib/Core/Components/HeaderMenu/actions.js +3 -4
- 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 +5 -5
- package/lib/Core/Components/HeaderMenu/index.js.map +1 -1
- package/lib/Core/Components/HierarchicalGroupRenderer.d.ts.map +1 -1
- package/lib/Core/Components/HierarchicalGroupRenderer.js +6 -2
- package/lib/Core/Components/HierarchicalGroupRenderer.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/RFColumnConfigurator.d.ts.map +1 -1
- package/lib/Core/Components/RFColumnConfigurator.js +32 -9
- package/lib/Core/Components/RFColumnConfigurator.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/RSWrapper/index.d.ts.map +1 -1
- package/lib/Core/Components/RSWrapper/index.js +2 -9
- package/lib/Core/Components/RSWrapper/index.js.map +1 -1
- package/lib/Core/Components/RenderingEngine/Formatter.d.ts.map +1 -1
- package/lib/Core/Components/RenderingEngine/Formatter.js +4 -1
- package/lib/Core/Components/RenderingEngine/Formatter.js.map +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.js +19 -8
- package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -1
- package/lib/Core/Components/RenderingEngine/useHighlighter.d.ts.map +1 -1
- package/lib/Core/Components/RenderingEngine/useHighlighter.js +0 -1
- package/lib/Core/Components/RenderingEngine/useHighlighter.js.map +1 -1
- package/lib/Core/Components/TestIdConstants.d.ts +2 -0
- package/lib/Core/Components/TestIdConstants.js +3 -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 +7 -18
- package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
- package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +6 -4
- package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/ColumnSelector.js +18 -21
- 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 +2 -1
- package/lib/Core/Components/Toolbar/FieldSelector.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/FieldSelector.js +14 -7
- 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/RefreshBanner.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/RefreshBanner.js +1 -0
- package/lib/Core/Components/Toolbar/RefreshBanner.js.map +1 -1
- package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/SimpleToolbar.js +2 -4
- package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useFilter.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useFilter.js +4 -1
- package/lib/Core/Components/Toolbar/hooks/useFilter.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 +4 -2
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +30 -22
- 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 +17 -6
- 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 +12 -5
- 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 +134 -80
- 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 +7 -10
- package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts +8 -6
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +16 -10
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts +4 -2
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js +9 -3
- 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 +8 -2
- package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/utils.d.ts +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/utils.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/utils.js +2 -2
- package/lib/Core/Components/Toolbar/hooks/useSort/utils.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts +2 -1
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.js +36 -12
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.js.map +1 -1
- package/lib/Core/Components/Toolbar/utils/utils.d.ts +28 -7
- package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/utils/utils.js +43 -11
- 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.js +1 -1
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -1
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +1 -1
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +1 -1
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -1
- package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +14 -4
- package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
- package/lib/Core/Components/Virtualise/index.js +19 -4
- package/lib/Core/Components/Virtualise/index.js.map +1 -1
- package/lib/Core/Components/Virtualise/utility.js +1 -1
- package/lib/Core/Components/Virtualise/utility.js.map +1 -1
- package/lib/Core/Components/WarningBanner.d.ts +11 -0
- package/lib/Core/Components/WarningBanner.d.ts.map +1 -0
- package/lib/Core/Components/WarningBanner.js +23 -0
- package/lib/Core/Components/WarningBanner.js.map +1 -0
- 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 +3 -4
- package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -1
- package/lib/Core/Hooks/a11y/useAnnounce.js +3 -4
- package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -1
- package/lib/Core/Hooks/useDebounce.js +1 -1
- package/lib/Core/Hooks/useDebounce.js.map +1 -1
- package/lib/Core/Hooks/useDragDrop.d.ts +2 -2
- package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
- package/lib/Core/Hooks/useDragDrop.js +9 -9
- package/lib/Core/Hooks/useDragDrop.js.map +1 -1
- package/lib/Core/Hooks/useRepeat.d.ts +1 -1
- package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
- package/lib/Core/Hooks/useRepeat.js +58 -11
- package/lib/Core/Hooks/useRepeat.js.map +1 -1
- package/lib/Core/Hooks/useSelectAllCheckbox.d.ts +21 -0
- package/lib/Core/Hooks/useSelectAllCheckbox.d.ts.map +1 -0
- package/lib/Core/Hooks/useSelectAllCheckbox.js +23 -0
- package/lib/Core/Hooks/useSelectAllCheckbox.js.map +1 -0
- package/lib/Core/Localization/defaultTranslations.d.ts +15 -13
- package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
- package/lib/Core/Localization/defaultTranslations.js +16 -14
- package/lib/Core/Localization/defaultTranslations.js.map +1 -1
- package/lib/Core/Test/JUnitMocks.d.ts +12 -0
- package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
- package/lib/Core/Test/JUnitMocks.js +27 -8
- package/lib/Core/Test/JUnitMocks.js.map +1 -1
- package/lib/Core/Test/TestUtils.d.ts +0 -1
- package/lib/Core/Test/TestUtils.d.ts.map +1 -1
- package/lib/Core/Test/TestUtils.js +3 -7
- package/lib/Core/Test/TestUtils.js.map +1 -1
- package/lib/Core/Utils/index.d.ts +15 -0
- package/lib/Core/Utils/index.d.ts.map +1 -1
- package/lib/Core/Utils/index.js +22 -0
- 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 +29 -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/GalleryA11y.d.ts +7 -5
- package/lib/Core/Views/Gallery/GalleryA11y.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/GalleryA11y.js +9 -52
- package/lib/Core/Views/Gallery/GalleryA11y.js.map +1 -1
- package/lib/Core/Views/Gallery/GalleryContainer.d.ts +23 -0
- package/lib/Core/Views/Gallery/GalleryContainer.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/GalleryContainer.js +66 -0
- package/lib/Core/Views/Gallery/GalleryContainer.js.map +1 -0
- 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 +38 -59
- 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 +115 -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 +2 -2
- package/lib/Core/Views/Map/index.js.map +1 -1
- package/lib/Core/Views/RsCardWrapper.js.map +1 -1
- package/lib/Core/Views/Table/Body.d.ts.map +1 -1
- package/lib/Core/Views/Table/Body.js +5 -2
- package/lib/Core/Views/Table/Body.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/GroupingHeaderCell.d.ts +6 -15
- package/lib/Core/Views/Table/GroupingHeaderCell.d.ts.map +1 -1
- package/lib/Core/Views/Table/GroupingHeaderCell.js +16 -14
- package/lib/Core/Views/Table/GroupingHeaderCell.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/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 +270 -155
- package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
- package/lib/Core/Views/Table/TableA11y.d.ts +13 -1
- package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -1
- package/lib/Core/Views/Table/TableA11y.js +233 -13
- package/lib/Core/Views/Table/TableA11y.js.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +3 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.js +16 -16
- 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 +16 -7
- package/lib/Core/Views/Table/index.js.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.js +15 -20
- package/lib/Core/Views/Timeline/Timeline.js.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.styles.d.ts +392 -15
- package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.styles.js +44 -44
- package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.types.d.ts +11 -7
- package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -1
- package/lib/Core/Views/Timeline/TimelineGroup.d.ts +13 -0
- package/lib/Core/Views/Timeline/TimelineGroup.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/TimelineGroup.js +21 -0
- package/lib/Core/Views/Timeline/TimelineGroup.js.map +1 -0
- package/lib/Core/Views/Timeline/TimelineItem.d.ts +1 -3
- package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/TimelineItem.js +7 -6
- package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -1
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +2 -2
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -1
- package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/index.js +13 -6
- package/lib/Core/Views/Timeline/index.js.map +1 -1
- package/lib/Core/Views/Timeline/utils.d.ts +8 -10
- package/lib/Core/Views/Timeline/utils.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/utils.js +136 -58
- package/lib/Core/Views/Timeline/utils.js.map +1 -1
- package/lib/Core/Views/rs-styles.d.ts +1 -1
- package/lib/Core/a11y/loadingAnnouncementBehavior.d.ts +12 -0
- package/lib/Core/a11y/loadingAnnouncementBehavior.d.ts.map +1 -0
- package/lib/Core/a11y/loadingAnnouncementBehavior.js +37 -0
- package/lib/Core/a11y/loadingAnnouncementBehavior.js.map +1 -0
- 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/index.d.ts.map +1 -1
- package/lib/Core/index.js +1 -2
- package/lib/Core/index.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 +31 -0
- package/lib/Core/templateFeatureSupport.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/types/RepeatingStructuresBoot.types.d.ts +12 -8
- package/lib/types/RepeatingStructuresBoot.types.d.ts.map +1 -1
- package/lib/types/RepeatingStructuresBoot.types.js.map +1 -1
- 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 -13
- 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 -36
- 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 -50
- 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 -64
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +0 -1
- package/lib/Core/Components/GroupRenderer.d.ts +0 -31
- package/lib/Core/Components/GroupRenderer.d.ts.map +0 -1
- package/lib/Core/Components/GroupRenderer.js +0 -348
- package/lib/Core/Components/GroupRenderer.js.map +0 -1
- package/lib/Core/Components/RSWrapper/__mocks__/uuid.d.ts +0 -2
- package/lib/Core/Components/RSWrapper/__mocks__/uuid.d.ts.map +0 -1
- package/lib/Core/Components/RSWrapper/__mocks__/uuid.js +0 -4
- package/lib/Core/Components/RSWrapper/__mocks__/uuid.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 -7
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +0 -1
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +0 -109
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.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/Gallery/StyledGalleryContainer.d.ts +0 -3
- package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +0 -1
- package/lib/Core/Views/Gallery/StyledGalleryContainer.js +0 -51
- package/lib/Core/Views/Gallery/StyledGalleryContainer.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,12 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function isSameGroup(firstDate: string | number | Date | undefined, secondDate: string | number | Date | undefined, groupBy: TimelineGroupBy): boolean;
|
|
10
|
-
export declare function groupByActivity(activity: ActivityObject[], groupBy: TimelineGroupBy): ActivityObject[][];
|
|
1
|
+
import type { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';
|
|
2
|
+
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
3
|
+
import type { Group } from 'pega-repeating-structures-core/lib/types/State.types';
|
|
4
|
+
import type TimelineProps from './Timeline.types';
|
|
5
|
+
export declare const dateDisplayVariants: Partial<Record<NonNullable<Group['dateFunction']>, DateTimeVariant>>;
|
|
6
|
+
declare const getActivities: (groupHeaders: RsCoreTypes.View["groupHeaders"], columns: RsCoreTypes.View["columns"], { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View["meta"], groupBy?: Group) => TimelineProps["activities"];
|
|
7
|
+
export default getActivities;
|
|
8
|
+
export declare function calculateBodyMaxHeight(maxHeight: string | number | undefined, domContainer: HTMLElement | undefined, pContainer: HTMLElement | null | undefined): string | undefined;
|
|
11
9
|
export declare function isFutureDate(date: string | number | Date | undefined, current: Date): boolean;
|
|
12
10
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utils.
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utils.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gEAAgE,CAAC;AAGtG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAMlF,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAmDlD,eAAO,MAAM,mBAAmB,EAAE,OAAO,CACvC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,eAAe,CAAC,CAS5D,CAAC;AAqCF,QAAA,MAAM,aAAa,GACjB,cAAc,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,EAC9C,SAAS,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EACpC,gDAAgD,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EACxE,UAAU,KAAK,KACd,aAAa,CAAC,YAAY,CA2D5B,CAAC;AAEF,eAAe,aAAa,CAAC;AAE7B,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EACtC,YAAY,EAAE,WAAW,GAAG,SAAS,EACrC,UAAU,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,sBAc3C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CAG7F"}
|
|
@@ -1,62 +1,140 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import timezonePlugin from 'dayjs/plugin/timezone';
|
|
4
|
+
import { DateTimeDisplay, NoValue, parseToDate } from '@pega/cosmos-react-core';
|
|
5
|
+
import { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';
|
|
6
|
+
import RenderingEngine from '../../Components/RenderingEngine/RenderCell';
|
|
7
|
+
import ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';
|
|
8
|
+
dayjs.extend(timezonePlugin);
|
|
9
|
+
const getStatusVariant = (data) => {
|
|
10
|
+
let variant;
|
|
11
|
+
const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];
|
|
12
|
+
const infoStrings = ['open', 'hold', 'info', 'new'];
|
|
13
|
+
const successStrings = ['resolved', 'completed', 'success'];
|
|
14
|
+
const pendingStrings = ['pending'];
|
|
15
|
+
if (new RegExp(warnStrings.join('|'), 'i').test(data)) {
|
|
16
|
+
variant = 'warn';
|
|
17
|
+
}
|
|
18
|
+
else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {
|
|
19
|
+
variant = 'info';
|
|
20
|
+
}
|
|
21
|
+
else if (new RegExp(successStrings.join('|'), 'i').test(data)) {
|
|
22
|
+
variant = 'success';
|
|
23
|
+
}
|
|
24
|
+
else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {
|
|
25
|
+
variant = 'pending';
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
variant = 'info';
|
|
29
|
+
}
|
|
30
|
+
return variant;
|
|
31
|
+
};
|
|
32
|
+
const getFieldsAsActivityContent = (columns, row) => {
|
|
33
|
+
return columns
|
|
34
|
+
?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)
|
|
35
|
+
?.map(column => {
|
|
36
|
+
return {
|
|
37
|
+
id: column.field.id,
|
|
38
|
+
name: column.field.label,
|
|
39
|
+
value: _jsx(ValueRenderer, { column: column, row: row })
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const convertDateToTimezone = (value, timezone) => {
|
|
44
|
+
return (dayjs(value)
|
|
45
|
+
.tz(timezone)
|
|
46
|
+
// cSpell:disable-next-line
|
|
47
|
+
.format('YYYY-MM-DDTHH:mm:ss'));
|
|
48
|
+
};
|
|
49
|
+
export const dateDisplayVariants = {
|
|
50
|
+
YEARS: 'year',
|
|
51
|
+
QUARTERS: 'quarteryear',
|
|
52
|
+
MONTHS: 'monthyear',
|
|
53
|
+
WEEKS: 'week',
|
|
54
|
+
DAYS: 'date',
|
|
55
|
+
HOURS: 'datetime',
|
|
56
|
+
MINUTES: 'datetime'
|
|
57
|
+
};
|
|
58
|
+
const renderHeader = (header, groupBy, groupByColumn) => {
|
|
59
|
+
if (!groupByColumn || !header.name) {
|
|
60
|
+
return _jsx(NoValue, {});
|
|
61
|
+
}
|
|
62
|
+
if (groupBy?.dateFunction && typeof header.name !== 'boolean') {
|
|
63
|
+
return (_jsx(DateTimeDisplay, { variant: dateDisplayVariants[groupBy.dateFunction] ?? 'datetime', format: 'long', value: header.name }));
|
|
64
|
+
}
|
|
65
|
+
groupByColumn.setExecutionContext(null);
|
|
66
|
+
return (_jsx(RenderingEngine, { ...groupByColumn.getRenderingEngineProps(), context: {
|
|
67
|
+
getValue: () => header.name,
|
|
68
|
+
getExecutionContext: () => ({
|
|
69
|
+
getValue: () => header.data,
|
|
70
|
+
name: 'groupHeader'
|
|
71
|
+
})
|
|
72
|
+
} }));
|
|
73
|
+
};
|
|
74
|
+
const getActivities = (groupHeaders, columns, { timelineFields, timezone, defaultRowHeight }, groupBy) => {
|
|
75
|
+
const { title, date, status: statusProp, icon, content } = timelineFields ?? {};
|
|
76
|
+
const titleColumn = columns?.find(({ field }) => field.name === title?.name);
|
|
77
|
+
const dateColumn = columns?.find(({ field }) => field.name === date?.name);
|
|
78
|
+
const contentColumn = columns?.find(({ field }) => field.name === content?.name);
|
|
79
|
+
const groupByColumn = columns?.find(({ field }) => field.id === groupBy?.columnId);
|
|
80
|
+
return (groupHeaders ?? [])
|
|
81
|
+
.map(header => {
|
|
82
|
+
return {
|
|
83
|
+
header: renderHeader(header, groupBy, groupByColumn),
|
|
84
|
+
activity: (header.getRows() ?? [])
|
|
85
|
+
.map(row => {
|
|
86
|
+
const data = row.getContext().getValue();
|
|
87
|
+
const dateValue = date?.name ? data[date.name] : undefined;
|
|
88
|
+
const dateFieldType = dateColumn?.field?.type;
|
|
89
|
+
const isDateOnlyFieldType = dateFieldType === FieldType.DATE ||
|
|
90
|
+
dateFieldType === FieldType.DATE_ONLY ||
|
|
91
|
+
dateFieldType === FieldType.DATE_TIMELINE;
|
|
92
|
+
// Activity Object date can't be undefined
|
|
93
|
+
if (!dateValue) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
const statusData = statusProp?.name ? data[statusProp.name] : undefined;
|
|
97
|
+
const status = statusData
|
|
98
|
+
? {
|
|
99
|
+
variant: getStatusVariant(statusData),
|
|
100
|
+
children: statusData
|
|
101
|
+
}
|
|
102
|
+
: undefined;
|
|
103
|
+
const activity = {
|
|
104
|
+
id: row.key,
|
|
105
|
+
title: title?.name && data[title.name] && titleColumn ? (_jsx(ValueRenderer, { column: titleColumn, row: row })) : (_jsx(NoValue, {})),
|
|
106
|
+
date: timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone
|
|
107
|
+
? convertDateToTimezone(dateValue, timezone)
|
|
108
|
+
: dateValue,
|
|
109
|
+
dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',
|
|
110
|
+
icon: icon?.name ? data[icon.name] : undefined,
|
|
111
|
+
defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,
|
|
112
|
+
content: contentColumn ? (_jsx(ValueRenderer, { column: contentColumn, row: row })) : (getFieldsAsActivityContent(columns, row)),
|
|
113
|
+
status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status
|
|
114
|
+
};
|
|
115
|
+
return activity;
|
|
116
|
+
})
|
|
117
|
+
?.filter((item) => !!item)
|
|
118
|
+
};
|
|
119
|
+
})
|
|
120
|
+
.filter(({ activity }) => activity.length > 0);
|
|
121
|
+
};
|
|
122
|
+
export default getActivities;
|
|
123
|
+
export function calculateBodyMaxHeight(maxHeight, domContainer, pContainer) {
|
|
124
|
+
if (maxHeight === undefined)
|
|
125
|
+
return;
|
|
126
|
+
if (!domContainer || !pContainer)
|
|
127
|
+
return;
|
|
128
|
+
const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;
|
|
129
|
+
if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {
|
|
130
|
+
// Means it is a css variable which is a string, and it needs to be computed with calc function
|
|
131
|
+
// If css variable is not defined then fallback to default max height i.e. 550px
|
|
132
|
+
const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;
|
|
133
|
+
return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;
|
|
134
|
+
}
|
|
135
|
+
if (typeof maxHeight === 'number') {
|
|
136
|
+
return `${maxHeight - extraHeight - 32}px`;
|
|
47
137
|
}
|
|
48
|
-
}
|
|
49
|
-
export function groupByActivity(activity, groupBy) {
|
|
50
|
-
return activity.reduce((result, item, index) => {
|
|
51
|
-
const isFirstItemInGroup = !isSameGroup(activity[index - 1]?.date, item.date, groupBy);
|
|
52
|
-
if (isFirstItemInGroup) {
|
|
53
|
-
result.push([item]);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
result[result.length - 1].push(item);
|
|
57
|
-
}
|
|
58
|
-
return result;
|
|
59
|
-
}, []);
|
|
60
138
|
}
|
|
61
139
|
export function isFutureDate(date, current) {
|
|
62
140
|
if (!date || !current)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,WAAW,EACZ,MAAM,6DAA6D,CAAC;AAIrE,MAAM,UAAU,iBAAiB,CAAC,IAA4B;IAC5D,M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,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAwC,EAAE,OAAa;IAClF,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IACpC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC","sourcesContent":["import {\n getQuarter,\n parseToDate\n} from '@pega/cosmos-react-core/lib/components/DateTime/Input/utils';\n\nimport type { ActivityObject, TimelineGroupBy } from './Timeline.types';\n\nexport function getDatePartAsDate(date: string | number | Date): Date {\n const parsedDate = parseToDate(date);\n return new Date(parsedDate.getUTCFullYear(), parsedDate.getUTCMonth(), parsedDate.getUTCDate());\n}\n\nexport function getMonthYearPartAsDate(date: string | number | Date): Date {\n const parsedDate = parseToDate(date);\n return new Date(parsedDate.getUTCFullYear(), parsedDate.getUTCMonth());\n}\n\nexport function getYearPartAsDate(date: string | number | Date): Date {\n const parsedDate = parseToDate(date);\n return new Date(parsedDate.getUTCFullYear());\n}\n\nexport function isSameDate(\n firstDate: string | number | Date,\n secondDate: string | number | Date\n): boolean {\n return getDatePartAsDate(firstDate).getTime() === getDatePartAsDate(secondDate).getTime();\n}\n\nexport function isSameMonthYear(\n firstDate: string | number | Date,\n secondDate: string | number | Date\n): boolean {\n return (\n getMonthYearPartAsDate(firstDate).getTime() === getMonthYearPartAsDate(secondDate).getTime()\n );\n}\n\nexport function isSameYear(\n firstDate: string | number | Date,\n secondDate: string | number | Date\n): boolean {\n return getYearPartAsDate(firstDate).getTime() === getYearPartAsDate(secondDate).getTime();\n}\n\nexport function isSameQuarterYear(\n firstDate: string | number | Date,\n secondDate: string | number | Date\n): boolean {\n return isSameYear(firstDate, secondDate) && getQuarter(firstDate) === getQuarter(secondDate);\n}\n\nexport function isSameGroup(\n firstDate: string | number | Date | undefined,\n secondDate: string | number | Date | undefined,\n groupBy: TimelineGroupBy\n): boolean {\n if (!firstDate || !secondDate) return false;\n switch (groupBy) {\n case 'none': {\n return true;\n }\n case 'date': {\n return isSameDate(firstDate, secondDate);\n }\n case 'monthyear': {\n return isSameMonthYear(firstDate, secondDate);\n }\n case 'quarteryear': {\n return isSameQuarterYear(firstDate, secondDate);\n }\n case 'year': {\n return isSameYear(firstDate, secondDate);\n }\n default:\n return false;\n }\n}\n\nexport function groupByActivity(\n activity: ActivityObject[],\n groupBy: TimelineGroupBy\n): ActivityObject[][] {\n return activity.reduce((result: ActivityObject[][], item, index) => {\n const isFirstItemInGroup = !isSameGroup(activity[index - 1]?.date, item.date, groupBy);\n if (isFirstItemInGroup) {\n result.push([item]);\n } else {\n result[result.length - 1].push(item);\n }\n return result;\n }, []);\n}\n\nexport function isFutureDate(date: string | number | Date | undefined, current: Date): boolean {\n if (!date || !current) return false;\n return parseToDate(date).getTime() > current.getTime();\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utils.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAInD,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGhF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAG7F,OAAO,eAAe,MAAM,6CAA6C,CAAC;AAC1E,OAAO,aAAa,MAAM,gDAAgD,CAAC;AAK3E,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,W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,YAAY,CAAC;IACxE,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAChE,+FAA+F;QAC/F,gFAAgF;QAChF,MAAM,gBAAgB,GAAG,gBAAgB,WAAW,YAAY,CAAC;QACjE,OAAO,YAAY,SAAS,KAAK,gBAAgB,OAAO,WAAW,YAAY,CAAC;IAClF,CAAC;IACD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,EAAE,IAAI,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAwC,EAAE,OAAa;IAClF,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IACpC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport timezonePlugin from 'dayjs/plugin/timezone';\nimport type { ReactText } from 'react';\n\nimport type { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';\nimport { DateTimeDisplay, NoValue, parseToDate } from '@pega/cosmos-react-core';\nimport type { FieldValueListProps, StatusProps } from '@pega/cosmos-react-core';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';\nimport type { Group } from 'pega-repeating-structures-core/lib/types/State.types';\n\nimport RenderingEngine from '../../Components/RenderingEngine/RenderCell';\nimport ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';\n\nimport type { ActivityObject } from './Timeline.types';\nimport type TimelineProps from './Timeline.types';\n\ndayjs.extend(timezonePlugin);\nconst getStatusVariant = (data: string): StatusProps['variant'] => {\n let variant: StatusProps['variant'];\n const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];\n const infoStrings = ['open', 'hold', 'info', 'new'];\n const successStrings = ['resolved', 'completed', 'success'];\n const pendingStrings = ['pending'];\n\n if (new RegExp(warnStrings.join('|'), 'i').test(data)) {\n variant = 'warn';\n } else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {\n variant = 'info';\n } else if (new RegExp(successStrings.join('|'), 'i').test(data)) {\n variant = 'success';\n } else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {\n variant = 'pending';\n } else {\n variant = 'info';\n }\n return variant;\n};\n\nconst getFieldsAsActivityContent = (\n columns: RsCoreTypes.View['columns'],\n row: RsCoreTypes.Row\n): FieldValueListProps['fields'] | undefined => {\n return columns\n ?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)\n ?.map(column => {\n return {\n id: column.field.id,\n name: column.field.label,\n value: <ValueRenderer column={column} row={row} />\n };\n });\n};\n\nconst convertDateToTimezone = (\n value: string | number | Date,\n timezone: RsCoreTypes.Meta['timezone']\n): string => {\n return (\n dayjs(value)\n .tz(timezone)\n // cSpell:disable-next-line\n .format('YYYY-MM-DDTHH:mm:ss')\n );\n};\n\nexport const dateDisplayVariants: Partial<\n Record<NonNullable<Group['dateFunction']>, DateTimeVariant>\n> = {\n YEARS: 'year',\n QUARTERS: 'quarteryear',\n MONTHS: 'monthyear',\n WEEKS: 'week',\n DAYS: 'date',\n HOURS: 'datetime',\n MINUTES: 'datetime'\n};\n\nconst renderHeader = (\n header: RsCoreTypes.GroupGenerator,\n groupBy?: Group,\n groupByColumn?: RsCoreTypes.Column\n) => {\n if (!groupByColumn || !header.name) {\n return <NoValue />;\n }\n\n if (groupBy?.dateFunction && typeof header.name !== 'boolean') {\n return (\n <DateTimeDisplay\n variant={dateDisplayVariants[groupBy.dateFunction] ?? 'datetime'}\n format='long'\n value={header.name}\n />\n );\n }\n\n groupByColumn.setExecutionContext(null);\n\n return (\n <RenderingEngine\n {...groupByColumn.getRenderingEngineProps()}\n context={{\n getValue: () => header.name,\n getExecutionContext: () => ({\n getValue: () => header.data,\n name: 'groupHeader'\n })\n }}\n />\n );\n};\n\nconst getActivities = (\n groupHeaders: RsCoreTypes.View['groupHeaders'],\n columns: RsCoreTypes.View['columns'],\n { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View['meta'],\n groupBy?: Group\n): TimelineProps['activities'] => {\n const { title, date, status: statusProp, icon, content } = timelineFields ?? {};\n const titleColumn = columns?.find(({ field }) => field.name === title?.name);\n const dateColumn = columns?.find(({ field }) => field.name === date?.name);\n const contentColumn = columns?.find(({ field }) => field.name === content?.name);\n const groupByColumn = columns?.find(({ field }) => field.id === groupBy?.columnId);\n return (groupHeaders ?? [])\n .map(header => {\n return {\n header: renderHeader(header, groupBy, groupByColumn),\n activity: (header.getRows() ?? [])\n .map(row => {\n const data = row.getContext().getValue();\n const dateValue = date?.name ? data[date.name] : undefined;\n const dateFieldType = dateColumn?.field?.type;\n const isDateOnlyFieldType =\n dateFieldType === FieldType.DATE ||\n dateFieldType === FieldType.DATE_ONLY ||\n dateFieldType === FieldType.DATE_TIMELINE;\n\n // Activity Object date can't be undefined\n if (!dateValue) {\n return undefined;\n }\n const statusData = statusProp?.name ? data[statusProp.name] : undefined;\n const status = statusData\n ? {\n variant: getStatusVariant(statusData as string),\n children: statusData as ReactText\n }\n : undefined;\n const activity: ActivityObject = {\n id: row.key as string,\n title:\n title?.name && data[title.name] && titleColumn ? (\n <ValueRenderer column={titleColumn} row={row} />\n ) : (\n <NoValue />\n ),\n date:\n timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone\n ? convertDateToTimezone(dateValue as string, timezone)\n : (dateValue as string),\n dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',\n icon: icon?.name ? (data[icon.name] as string) : undefined,\n defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,\n content: contentColumn ? (\n <ValueRenderer column={contentColumn} row={row} />\n ) : (\n getFieldsAsActivityContent(columns, row)\n ),\n status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status\n };\n return activity;\n })\n ?.filter((item): item is ActivityObject => !!item)\n };\n })\n .filter(({ activity }) => activity.length > 0);\n};\n\nexport default getActivities;\n\nexport function calculateBodyMaxHeight(\n maxHeight: string | number | undefined,\n domContainer: HTMLElement | undefined,\n pContainer: HTMLElement | null | undefined\n) {\n if (maxHeight === undefined) return;\n if (!domContainer || !pContainer) return;\n const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;\n if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {\n // Means it is a css variable which is a string, and it needs to be computed with calc function\n // If css variable is not defined then fallback to default max height i.e. 550px\n const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;\n return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;\n }\n if (typeof maxHeight === 'number') {\n return `${maxHeight - extraHeight - 32}px`;\n }\n}\n\nexport function isFutureDate(date: string | number | Date | undefined, current: Date): boolean {\n if (!date || !current) return false;\n return parseToDate(date).getTime() > current.getTime();\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { useLiveLog } from '@pega/cosmos-react-core';
|
|
2
|
+
type AnnounceMethod = ReturnType<typeof useLiveLog>['announceAssertive'];
|
|
3
|
+
interface LoadingSelectors {
|
|
4
|
+
focusElementSelector: string;
|
|
5
|
+
belowLoader: string;
|
|
6
|
+
}
|
|
7
|
+
declare function createLoadingAnnouncementBehavior(selectors: LoadingSelectors, container: HTMLElement, announceAssertive: AnnounceMethod, announcePolite: AnnounceMethod, translate: (key: string) => string): {
|
|
8
|
+
onFocus(event: Event | undefined): void;
|
|
9
|
+
onItemsLoaded(): void;
|
|
10
|
+
};
|
|
11
|
+
export default createLoadingAnnouncementBehavior;
|
|
12
|
+
//# sourceMappingURL=loadingAnnouncementBehavior.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadingAnnouncementBehavior.d.ts","sourceRoot":"","sources":["../../../Core/a11y/loadingAnnouncementBehavior.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,mBAAmB,CAAC,CAAC;AAEzE,UAAU,gBAAgB;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,iBAAS,iCAAiC,CACxC,SAAS,EAAE,gBAAgB,EAC3B,SAAS,EAAE,WAAW,EACtB,iBAAiB,EAAE,cAAc,EACjC,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM;mBAOjB,KAAK,GAAG,SAAS;;EA4BnC;AAED,eAAe,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { isInstance } from '@pega/cosmos-react-core';
|
|
2
|
+
function createLoadingAnnouncementBehavior(selectors, container, announceAssertive, announcePolite, translate) {
|
|
3
|
+
const { focusElementSelector, belowLoader } = selectors;
|
|
4
|
+
let hasAnnouncedLoading = false;
|
|
5
|
+
let wasLoadingMore = false;
|
|
6
|
+
return {
|
|
7
|
+
onFocus(event) {
|
|
8
|
+
if (hasAnnouncedLoading)
|
|
9
|
+
return;
|
|
10
|
+
if (!container.querySelector(belowLoader))
|
|
11
|
+
return;
|
|
12
|
+
const target = event?.target;
|
|
13
|
+
if (!isInstance(target, Element))
|
|
14
|
+
return;
|
|
15
|
+
const item = target.closest(focusElementSelector);
|
|
16
|
+
if (!item)
|
|
17
|
+
return;
|
|
18
|
+
const allItems = container.querySelectorAll(focusElementSelector);
|
|
19
|
+
if (item === allItems[allItems.length - 1]) {
|
|
20
|
+
hasAnnouncedLoading = true;
|
|
21
|
+
announceAssertive({ message: translate('Loading more results'), type: 'info' });
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
onItemsLoaded() {
|
|
25
|
+
const isLoadingMore = !!container.querySelector(belowLoader);
|
|
26
|
+
if (wasLoadingMore && !isLoadingMore) {
|
|
27
|
+
if (hasAnnouncedLoading) {
|
|
28
|
+
announcePolite({ message: translate('Loading completed'), type: 'info' });
|
|
29
|
+
}
|
|
30
|
+
hasAnnouncedLoading = false;
|
|
31
|
+
}
|
|
32
|
+
wasLoadingMore = isLoadingMore;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export default createLoadingAnnouncementBehavior;
|
|
37
|
+
//# sourceMappingURL=loadingAnnouncementBehavior.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadingAnnouncementBehavior.js","sourceRoot":"","sources":["../../../Core/a11y/loadingAnnouncementBehavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAUrD,SAAS,iCAAiC,CACxC,SAA2B,EAC3B,SAAsB,EACtB,iBAAiC,EACjC,cAA8B,EAC9B,SAAkC;IAElC,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;IACxD,IAAI,mBAAmB,GAAG,KAAK,CAAC;IAChC,IAAI,cAAc,GAAG,KAAK,CAAC;IAE3B,OAAO;QACL,OAAO,CAAC,KAAwB;YAC9B,IAAI,mBAAmB;gBAAE,OAAO;YAChC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC;gBAAE,OAAO;YAElD,MAAM,MAAM,GAAG,KAAK,EAAE,MAAM,CAAC;YAC7B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC;gBAAE,OAAO;YAEzC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;YAClD,IAAI,CAAC,IAAI;gBAAE,OAAO;YAElB,MAAM,QAAQ,GAAG,SAAS,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;YAClE,IAAI,IAAI,KAAK,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;gBAC3C,mBAAmB,GAAG,IAAI,CAAC;gBAC3B,iBAAiB,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,sBAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;YAClF,CAAC;QACH,CAAC;QAED,aAAa;YACX,MAAM,aAAa,GAAG,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;YAC7D,IAAI,cAAc,IAAI,CAAC,aAAa,EAAE,CAAC;gBACrC,IAAI,mBAAmB,EAAE,CAAC;oBACxB,cAAc,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;gBAC5E,CAAC;gBACD,mBAAmB,GAAG,KAAK,CAAC;YAC9B,CAAC;YACD,cAAc,GAAG,aAAa,CAAC;QACjC,CAAC;KACF,CAAC;AACJ,CAAC;AAED,eAAe,iCAAiC,CAAC","sourcesContent":["import { isInstance } from '@pega/cosmos-react-core';\nimport type { useLiveLog } from '@pega/cosmos-react-core';\n\ntype AnnounceMethod = ReturnType<typeof useLiveLog>['announceAssertive'];\n\ninterface LoadingSelectors {\n focusElementSelector: string;\n belowLoader: string;\n}\n\nfunction createLoadingAnnouncementBehavior(\n selectors: LoadingSelectors,\n container: HTMLElement,\n announceAssertive: AnnounceMethod,\n announcePolite: AnnounceMethod,\n translate: (key: string) => string\n) {\n const { focusElementSelector, belowLoader } = selectors;\n let hasAnnouncedLoading = false;\n let wasLoadingMore = false;\n\n return {\n onFocus(event: Event | undefined) {\n if (hasAnnouncedLoading) return;\n if (!container.querySelector(belowLoader)) return;\n\n const target = event?.target;\n if (!isInstance(target, Element)) return;\n\n const item = target.closest(focusElementSelector);\n if (!item) return;\n\n const allItems = container.querySelectorAll(focusElementSelector);\n if (item === allItems[allItems.length - 1]) {\n hasAnnouncedLoading = true;\n announceAssertive({ message: translate('Loading more results'), type: 'info' });\n }\n },\n\n onItemsLoaded() {\n const isLoadingMore = !!container.querySelector(belowLoader);\n if (wasLoadingMore && !isLoadingMore) {\n if (hasAnnouncedLoading) {\n announcePolite({ message: translate('Loading completed'), type: 'info' });\n }\n hasAnnouncedLoading = false;\n }\n wasLoadingMore = isLoadingMore;\n }\n };\n}\n\nexport default createLoadingAnnouncementBehavior;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAClD,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;CAIrB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;GAW9B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;IAOvB,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;CAGtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAQ/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAClD,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;CAI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sBAAsB;IACtB,iBAAiB;IACjB,mBAAmB;IACnB,sBAAsB;IACtB,UAAU;IACV,QAAQ;IACR,QAAQ;CACT,CAAC","sourcesContent":["export const EXTERNAL_FILTERS = 'externalFilters';\nexport const DEFAULT_FORMAT = 'Default';\n\nexport const SELECTION_MODES = {\n single: 'single',\n multi: 'multi',\n multi_on_hover: 'multi_on_hover'\n};\n\nexport const rowDensityClasses = {\n 1: { id: '1', className: 'short-height' },\n 2: { id: '2', className: 'medium-height' },\n 3: { id: '3', className: 'tall-height' },\n 4: { id: '4', className: 'wrap-content-height' }\n};\n\nexport const TEMPLATES = {\n GALLERY: 'Gallery',\n TABLE: 'Table',\n TIMELINE: 'Timeline'\n};\n\nexport const debugInfoFields = {\n className: 'className',\n dataPage: 'dataPage',\n dataSource: 'dataSource',\n timeTaken: 'timeTaken',\n insightId: 'insightId'\n};\n\nexport const CELL_ALIGN_CLASSES = {\n left: 'align-left',\n right: 'align-right',\n center: 'align-center'\n};\n\nexport const NonNullSortActions = [\n {\n actionId: 'asc',\n actionName: 'Sort ascending',\n actionIcon: 'arrow-up'\n },\n {\n actionId: 'desc',\n actionName: 'Sort descending',\n actionIcon: 'arrow-down'\n }\n];\n\nexport const sortActions = [\n ...NonNullSortActions,\n {\n actionId: null,\n actionName: 'Remove sort',\n actionIcon: 'reset'\n }\n];\nexport const TOOLBAR_FEATURES = {\n FILTER: 'filter',\n SORT: 'sort',\n GROUPING: 'grouping'\n} as const;\n\nexport const customFunctions = {\n TEXT_GROUPING: 'TEXT_GROUPING',\n RANGE_GROUPING: 'RANGE_GROUPING',\n INTERVAL_GROUPING: 'INTERVAL_GROUPING'\n};\n\nexport const intervalGroupingBoundaries = {\n includeLowerOnly: 'include-lower-only',\n includeUpperOnly: 'include-upper-only'\n};\n\nexport const FOCUSABLE_SELECTORS = [\n 'button',\n 'a[href]',\n 'input[type=file]',\n 'input[type=checkbox]',\n 'input[type=radio]',\n '.scalarlist-component',\n '.row-error-column svg'\n];\n\nexport const ACTIONABLE_SELECTORS = [\n 'input[type=text]',\n 'input[type=number]',\n 'input[inputmode=numeric]',\n 'input[inputmode=tel]',\n 'input[type=url]',\n 'input[type=email]',\n 'input[role=combobox]',\n 'textarea',\n 'select',\n 'iframe'\n];\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE;IACzC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE;IAC1C,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE;IACxC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,qBAAqB,EAAE;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;QACE,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,gBAAgB;QAC5B,UAAU,EAAE,UAAU;KACvB;IACD;QACE,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,iBAAiB;QAC7B,UAAU,EAAE,YAAY;KACzB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,kBAAkB;IACrB;QACE,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,OAAO;KACpB;CACF,CAAC;AACF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACZ,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,gBAAgB,EAAE,oBAAoB;IACtC,gBAAgB,EAAE,oBAAoB;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ;IACR,SAAS;IACT,kBAAkB;IAClB,sBAAsB;IACtB,mBAAmB;IACnB,uBAAuB;IACvB,uBAAuB;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kBAAkB;IAClB,mBAAmB,EAAE,sCAAsC;IAC3D,oBAAoB;IACpB,0BAA0B;IAC1B,sBAAsB;IACtB,iBAAiB;IACjB,mBAAmB;IACnB,sBAAsB;IACtB,UAAU;IACV,QAAQ;IACR,QAAQ;CACT,CAAC","sourcesContent":["export const EXTERNAL_FILTERS = 'externalFilters';\nexport const DEFAULT_FORMAT = 'Default';\n\nexport const SELECTION_MODES = {\n single: 'single',\n multi: 'multi',\n multi_on_hover: 'multi_on_hover'\n};\n\nexport const rowDensityClasses = {\n 1: { id: '1', className: 'short-height' },\n 2: { id: '2', className: 'medium-height' },\n 3: { id: '3', className: 'tall-height' },\n 4: { id: '4', className: 'wrap-content-height' }\n};\n\nexport const TEMPLATES = {\n GALLERY: 'Gallery',\n TABLE: 'Table',\n TIMELINE: 'Timeline'\n};\n\nexport const debugInfoFields = {\n className: 'className',\n dataPage: 'dataPage',\n dataSource: 'dataSource',\n timeTaken: 'timeTaken',\n insightId: 'insightId'\n};\n\nexport const CELL_ALIGN_CLASSES = {\n left: 'align-left',\n right: 'align-right',\n center: 'align-center'\n};\n\nexport const NonNullSortActions = [\n {\n actionId: 'asc',\n actionName: 'Sort ascending',\n actionIcon: 'arrow-up'\n },\n {\n actionId: 'desc',\n actionName: 'Sort descending',\n actionIcon: 'arrow-down'\n }\n];\n\nexport const sortActions = [\n ...NonNullSortActions,\n {\n actionId: null,\n actionName: 'Remove sort',\n actionIcon: 'reset'\n }\n];\nexport const TOOLBAR_FEATURES = {\n FILTER: 'filter',\n SORT: 'sort',\n GROUPING: 'grouping'\n} as const;\n\nexport const customFunctions = {\n TEXT_GROUPING: 'TEXT_GROUPING',\n RANGE_GROUPING: 'RANGE_GROUPING',\n INTERVAL_GROUPING: 'INTERVAL_GROUPING'\n};\n\nexport const intervalGroupingBoundaries = {\n includeLowerOnly: 'include-lower-only',\n includeUpperOnly: 'include-upper-only'\n};\n\nexport const FOCUSABLE_SELECTORS = [\n 'button',\n 'a[href]',\n 'input[type=file]',\n 'input[type=checkbox]',\n 'input[type=radio]',\n '.scalarlist-component',\n '.row-error-column svg'\n];\n\nexport const ACTIONABLE_SELECTORS = [\n 'input[type=text]',\n 'input:not([type])', // input without type defaults to text\n 'input[type=number]',\n 'input[inputmode=numeric]',\n 'input[inputmode=tel]',\n 'input[type=url]',\n 'input[type=email]',\n 'input[role=combobox]',\n 'textarea',\n 'select',\n 'iframe'\n];\n"]}
|
package/lib/Core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Core/index.jsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,yDAFa,OAAO,OAAO,EAAE,wBAAwB,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,KAAK,EAAE,OAAO,UAAU,EAAE,wBAAwB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../Core/index.jsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,yDAFa,OAAO,OAAO,EAAE,wBAAwB,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,KAAK,EAAE,OAAO,UAAU,EAAE,wBAAwB,CAAC,CAwDvI"}
|
package/lib/Core/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ToolbarProvider } from './Context/ToolbarContext';
|
|
|
10
10
|
*/
|
|
11
11
|
export default function repeatComponent(Component) {
|
|
12
12
|
return function RepeatInnerComponent(props, ref) {
|
|
13
|
-
const { meta, apiContext, persistedInfo, renderFactory, renderFormatterTypeMap, onViewReady, formatters, mode, toolBarOptions,
|
|
13
|
+
const { meta, apiContext, persistedInfo, renderFactory, renderFormatterTypeMap, onViewReady, formatters, mode, toolBarOptions, presets, errors, additionalInfo, styleFormats } = props;
|
|
14
14
|
const instance = useRepeat({
|
|
15
15
|
meta,
|
|
16
16
|
apiContext,
|
|
@@ -21,7 +21,6 @@ export default function repeatComponent(Component) {
|
|
|
21
21
|
formatters,
|
|
22
22
|
mode,
|
|
23
23
|
toolBarOptions,
|
|
24
|
-
onRowClickAction,
|
|
25
24
|
presets,
|
|
26
25
|
styleFormats,
|
|
27
26
|
repeatComponentInstance: ref
|
package/lib/Core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../Core/index.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,E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AAO;YACP,YAAY;YACZ,uBAAuB,EAAE,GAAG;SAC7B,CAAC,CAAC;QAEH,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClC,MAAM,aAAa,GAAG,OAAO,CAC3B,GAAG,EAAE,CAAC,CAAC;YACL,oBAAoB;YACpB,oBAAoB;SACrB,CAAC,EACF,EAAE,CACH,CAAC;QAEF,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;QAElF,gFAAgF;QAEhF,OAAO,CACL,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,aAAa,YAC1C,KAAC,eAAe,IAAC,KAAK,EAAE,mBAAmB,YACzC,KAAC,SAAS,IAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE,GAAI,GACvB,GACK,CAC1B,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport {\n resolveCellComponent,\n resolveViewComponent\n} from './Components/RenderingEngine/ComponentResolverFactory';\nimport GlobalContext from './Context/GlobalContext';\nimport useRepeat from './Hooks/useRepeat';\nimport useReactToProps from './Hooks/useReactToProps';\nimport { ToolbarProvider } from './Context/ToolbarContext';\n\n/**\n * @returns {import('react').ForwardRefRenderFunction<import('../types').RsCoreTypes.RsApi, import('../types').RepeatingStructuresProps>}\n */\nexport default function repeatComponent(Component) {\n return function RepeatInnerComponent(props, ref) {\n const {\n meta,\n apiContext,\n persistedInfo,\n renderFactory,\n renderFormatterTypeMap,\n onViewReady,\n formatters,\n mode,\n toolBarOptions,\n presets,\n errors,\n additionalInfo,\n styleFormats\n } = props;\n\n const instance = useRepeat({\n meta,\n apiContext,\n persistedInfo,\n renderFactory,\n renderFormatterTypeMap,\n onViewReady,\n formatters,\n mode,\n toolBarOptions,\n presets,\n styleFormats,\n repeatComponentInstance: ref\n });\n\n useReactToProps(errors, instance);\n const globalContext = useMemo(\n () => ({\n resolveCellComponent,\n resolveViewComponent\n }),\n []\n );\n\n const toolbarContextValue = useMemo(() => ({ additionalInfo }), [additionalInfo]);\n\n // TODO : Freeze view object before passing it down to component except columns.\n\n return (\n <GlobalContext.Provider value={globalContext}>\n <ToolbarProvider value={toolbarContextValue}>\n <Component view={instance.getView()} />\n </ToolbarProvider>\n </GlobalContext.Provider>\n );\n };\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';
|
|
2
|
+
type TemplateValue = (typeof REPEATING_STRUCTURE_TEMPLATES)[keyof typeof REPEATING_STRUCTURE_TEMPLATES];
|
|
3
|
+
declare const featureSupport: {
|
|
4
|
+
[feature: string]: TemplateValue[];
|
|
5
|
+
};
|
|
6
|
+
type FeatureKey = keyof typeof featureSupport | string;
|
|
7
|
+
/**
|
|
8
|
+
* Check if a feature should show in toolbar for a given template.
|
|
9
|
+
* Features not in the map are considered supported for all templates.
|
|
10
|
+
*
|
|
11
|
+
* @param template - The template type
|
|
12
|
+
* @param feature - The feature identifier
|
|
13
|
+
* @returns true if the feature should show in toolbar for the template
|
|
14
|
+
*/
|
|
15
|
+
declare const showFeatureForTemplate: (template: TemplateValue, feature: FeatureKey) => boolean;
|
|
16
|
+
export default showFeatureForTemplate;
|
|
17
|
+
//# sourceMappingURL=templateFeatureSupport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateFeatureSupport.d.ts","sourceRoot":"","sources":["../../Core/templateFeatureSupport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E,KAAK,aAAa,GAChB,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,OAAO,6BAA6B,CAAC,CAAC;AAIrF,QAAA,MAAM,cAAc,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE,CAAA;CAWzD,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,OAAO,cAAc,GAAG,MAAM,CAAC;AAEvD;;;;;;;GAOG;AACH,QAAA,MAAM,sBAAsB,GAAI,UAAU,aAAa,EAAE,SAAS,UAAU,KAAG,OAK9E,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';
|
|
2
|
+
// TODO: All such feature map support should be available at View object based via a feature in rs-core based on the template from meta.
|
|
3
|
+
// The consumer can pass along the resolved feature map to their component for decisioning.
|
|
4
|
+
const featureSupport = {
|
|
5
|
+
personalization: ['Table', 'Gallery', 'Timeline'],
|
|
6
|
+
group: ['Table', 'Timeline'],
|
|
7
|
+
showHideColumns: ['Table', 'Gallery'],
|
|
8
|
+
galleryLayout: ['Gallery'],
|
|
9
|
+
freezeColumns: ['Table'],
|
|
10
|
+
rowDensity: ['Table'],
|
|
11
|
+
showHeaderIcons: ['Table'],
|
|
12
|
+
autoSizeColumns: ['Table'],
|
|
13
|
+
resetColumnWidths: ['Table'],
|
|
14
|
+
wrap: ['Table']
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Check if a feature should show in toolbar for a given template.
|
|
18
|
+
* Features not in the map are considered supported for all templates.
|
|
19
|
+
*
|
|
20
|
+
* @param template - The template type
|
|
21
|
+
* @param feature - The feature identifier
|
|
22
|
+
* @returns true if the feature should show in toolbar for the template
|
|
23
|
+
*/
|
|
24
|
+
const showFeatureForTemplate = (template, feature) => {
|
|
25
|
+
if (!featureSupport[feature]) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return featureSupport[feature].includes(template);
|
|
29
|
+
};
|
|
30
|
+
export default showFeatureForTemplate;
|
|
31
|
+
//# sourceMappingURL=templateFeatureSupport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateFeatureSupport.js","sourceRoot":"","sources":["../../Core/templateFeatureSupport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAK/E,wIAAwI;AACxI,2FAA2F;AAC3F,MAAM,cAAc,GAA2C;IAC7D,eAAe,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;IACjD,KAAK,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;IAC5B,eAAe,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;IACrC,aAAa,EAAE,CAAC,SAAS,CAAC;IAC1B,aAAa,EAAE,CAAC,OAAO,CAAC;IACxB,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,eAAe,EAAE,CAAC,OAAO,CAAC;IAC1B,eAAe,EAAE,CAAC,OAAO,CAAC;IAC1B,iBAAiB,EAAE,CAAC,OAAO,CAAC;IAC5B,IAAI,EAAE,CAAC,OAAO,CAAC;CAChB,CAAC;AAIF;;;;;;;GAOG;AACH,MAAM,sBAAsB,GAAG,CAAC,QAAuB,EAAE,OAAmB,EAAW,EAAE;IACvF,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';\n\ntype TemplateValue =\n (typeof REPEATING_STRUCTURE_TEMPLATES)[keyof typeof REPEATING_STRUCTURE_TEMPLATES];\n\n// TODO: All such feature map support should be available at View object based via a feature in rs-core based on the template from meta.\n// The consumer can pass along the resolved feature map to their component for decisioning.\nconst featureSupport: { [feature: string]: TemplateValue[] } = {\n personalization: ['Table', 'Gallery', 'Timeline'],\n group: ['Table', 'Timeline'],\n showHideColumns: ['Table', 'Gallery'],\n galleryLayout: ['Gallery'],\n freezeColumns: ['Table'],\n rowDensity: ['Table'],\n showHeaderIcons: ['Table'],\n autoSizeColumns: ['Table'],\n resetColumnWidths: ['Table'],\n wrap: ['Table']\n};\n\ntype FeatureKey = keyof typeof featureSupport | string;\n\n/**\n * Check if a feature should show in toolbar for a given template.\n * Features not in the map are considered supported for all templates.\n *\n * @param template - The template type\n * @param feature - The feature identifier\n * @returns true if the feature should show in toolbar for the template\n */\nconst showFeatureForTemplate = (template: TemplateValue, feature: FeatureKey): boolean => {\n if (!featureSupport[feature]) {\n return true;\n }\n return featureSupport[feature].includes(template);\n};\n\nexport default showFeatureForTemplate;\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as RepeatingStructures } from './Core/Components/RSWrapper/index';
|
|
2
|
-
export { convertMetaIntoState, UPDATE_DEBUG_INFO, TOGGLE_DISABLE_SELECTION, TOGGLE_REQUIRED, NOTIFY_DATA_REFRESH, USER_CONFIRMATION_ACTION, SET_IN_EXTERNAL_STATE, UPDATE_SELECTED_ROWS } from 'pega-repeating-structures-core';
|
|
2
|
+
export { convertMetaIntoState, UPDATE_DEBUG_INFO, TOGGLE_DISABLE_SELECTION, TOGGLE_REQUIRED, NOTIFY_DATA_REFRESH, USER_CONFIRMATION_ACTION, SET_IN_EXTERNAL_STATE, UPDATE_SELECTED_ROWS, SET_WARNING_MESSAGES } from 'pega-repeating-structures-core';
|
|
3
3
|
export { EXTERNAL_FILTERS, FOCUSABLE_SELECTORS, ACTIONABLE_SELECTORS } from './Core/constants';
|
|
4
4
|
export type { RSTypes } from './types';
|
|
5
5
|
export type { RepeatingStructuresProps } from './types/RepeatingStructuresBoot.types';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAGnF,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE/F,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEtF,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAGnF,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE/F,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAEtF,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as RepeatingStructures } from './Core/Components/RSWrapper/index';
|
|
2
2
|
// FIXME: revisit these imports
|
|
3
|
-
export { convertMetaIntoState, UPDATE_DEBUG_INFO, TOGGLE_DISABLE_SELECTION, TOGGLE_REQUIRED, NOTIFY_DATA_REFRESH, USER_CONFIRMATION_ACTION, SET_IN_EXTERNAL_STATE, UPDATE_SELECTED_ROWS } from 'pega-repeating-structures-core';
|
|
3
|
+
export { convertMetaIntoState, UPDATE_DEBUG_INFO, TOGGLE_DISABLE_SELECTION, TOGGLE_REQUIRED, NOTIFY_DATA_REFRESH, USER_CONFIRMATION_ACTION, SET_IN_EXTERNAL_STATE, UPDATE_SELECTED_ROWS, SET_WARNING_MESSAGES } from 'pega-repeating-structures-core';
|
|
4
4
|
// Dispatch Action constants that is used by consumer in order to send particular actions to Repeating structures
|
|
5
5
|
export { EXTERNAL_FILTERS, FOCUSABLE_SELECTORS, ACTIONABLE_SELECTORS } from './Core/constants';
|
|
6
6
|
export { ROW_DENSITY } from 'pega-repeating-structures-core';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAEnF,+BAA+B;AAC/B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AAExC,iHAAiH;AACjH,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAK/F,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["export { default as RepeatingStructures } from './Core/Components/RSWrapper/index';\n\n// FIXME: revisit these imports\nexport {\n convertMetaIntoState,\n UPDATE_DEBUG_INFO,\n TOGGLE_DISABLE_SELECTION,\n TOGGLE_REQUIRED,\n NOTIFY_DATA_REFRESH,\n USER_CONFIRMATION_ACTION,\n SET_IN_EXTERNAL_STATE,\n UPDATE_SELECTED_ROWS\n} from 'pega-repeating-structures-core';\n\n// Dispatch Action constants that is used by consumer in order to send particular actions to Repeating structures\nexport { EXTERNAL_FILTERS, FOCUSABLE_SELECTORS, ACTIONABLE_SELECTORS } from './Core/constants';\n\nexport type { RSTypes } from './types';\nexport type { RepeatingStructuresProps } from './types/RepeatingStructuresBoot.types';\n\nexport { ROW_DENSITY } from 'pega-repeating-structures-core';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAEnF,+BAA+B;AAC/B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,gCAAgC,CAAC;AAExC,iHAAiH;AACjH,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAK/F,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["export { default as RepeatingStructures } from './Core/Components/RSWrapper/index';\n\n// FIXME: revisit these imports\nexport {\n convertMetaIntoState,\n UPDATE_DEBUG_INFO,\n TOGGLE_DISABLE_SELECTION,\n TOGGLE_REQUIRED,\n NOTIFY_DATA_REFRESH,\n USER_CONFIRMATION_ACTION,\n SET_IN_EXTERNAL_STATE,\n UPDATE_SELECTED_ROWS,\n SET_WARNING_MESSAGES\n} from 'pega-repeating-structures-core';\n\n// Dispatch Action constants that is used by consumer in order to send particular actions to Repeating structures\nexport { EXTERNAL_FILTERS, FOCUSABLE_SELECTORS, ACTIONABLE_SELECTORS } from './Core/constants';\n\nexport type { RSTypes } from './types';\nexport type { RepeatingStructuresProps } from './types/RepeatingStructuresBoot.types';\n\nexport { ROW_DENSITY } from 'pega-repeating-structures-core';\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { ReactNode, Ref } from 'react';
|
|
2
2
|
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
3
3
|
import type { FormControlProps, IconName, OmitStrict } from '@pega/cosmos-react-core';
|
|
4
4
|
import type { RsApi } from 'pega-repeating-structures-core/lib/types/ApiContext.types';
|
|
@@ -51,7 +51,17 @@ type ViewRendererProps = ViewContext & {
|
|
|
51
51
|
/** A unique id to identify the current repeating structure. */
|
|
52
52
|
rsID: RsCoreTypes.View['rsID'];
|
|
53
53
|
} & ExternalStateInfo & PropsFromRenderFactory;
|
|
54
|
-
type
|
|
54
|
+
type FormatSettingsRendererProps = {
|
|
55
|
+
ref: Ref<{
|
|
56
|
+
validate: () => boolean;
|
|
57
|
+
}>;
|
|
58
|
+
formatting: {
|
|
59
|
+
type: string;
|
|
60
|
+
config: unknown;
|
|
61
|
+
};
|
|
62
|
+
onChange: (config: unknown) => void;
|
|
63
|
+
};
|
|
64
|
+
type RendererProps = CellRendererProps | ViewRendererProps | FormatSettingsRendererProps;
|
|
55
65
|
export interface RsRenderFactoryReturnType extends OmitStrict<RsCoreTypes.RenderFactoryWithProps, 'component'> {
|
|
56
66
|
/**
|
|
57
67
|
* A function that accepts component props and returns a React node to be rendered as a cell within repeating structures.
|
|
@@ -117,12 +127,6 @@ export type RepeatingStructuresProps = {
|
|
|
117
127
|
styleFormats?: RsStyleFormat[];
|
|
118
128
|
/** A list of all the toolbar actions to be displayed at the top of a repeating structure */
|
|
119
129
|
toolBarOptions?: RsCoreTypes.RsCoreInitArgs['toolBarOptions'];
|
|
120
|
-
/**
|
|
121
|
-
* This function is provided as ui props in row generator to attach it as click handler to a row in repeating structure
|
|
122
|
-
* @param {RsCoreTypes.RowData} data - current row data
|
|
123
|
-
* @returns {void} void
|
|
124
|
-
*/
|
|
125
|
-
onRowClickAction?: RsCoreTypes.RsCoreInitArgs['onRowClickAction'];
|
|
126
130
|
/** Pass a heading and content to show additional information in the toolbar */
|
|
127
131
|
additionalInfo?: FormControlProps['additionalInfo'];
|
|
128
132
|
translations?: RsCoreBootArgs['translations'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepeatingStructuresBoot.types.d.ts","sourceRoot":"","sources":["../../types/RepeatingStructuresBoot.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RepeatingStructuresBoot.types.d.ts","sourceRoot":"","sources":["../../types/RepeatingStructuresBoot.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2DAA2D,CAAC;AACvF,OAAO,KAAK,cAAc,MAAM,+DAA+D,CAAC;AAEhG,KAAK,sBAAsB,GAAG,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;AAChF,KAAK,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;AAClE,KAAK,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;AAG9D;;;GAGG;AACH,KAAK,iBAAiB,GAAG;IACvB,yCAAyC;IACzC,UAAU,EAAE,MAAM,WAAW,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM;QAChB;;;;;;;;;;;;WAYG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,mCAAmC;IACnC,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACtD,iCAAiC;IACjC,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC,CAAC;CACrD,GAAG,aAAa,GACf,sBAAs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