@pega/lists-react 9.0.0-build.9.9 → 9.0.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
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { useRef, useCallback } from 'react';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
import { Icon, Text, MetaList, Tooltip, VisuallyHiddenText, Flex } from '@pega/cosmos-react-core';
|
|
6
|
+
import BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';
|
|
7
|
+
import { getGroupFromKey } from 'pega-ui-list-data-apis';
|
|
8
|
+
import { createClassName as cx } from '../../Utils';
|
|
9
|
+
import useTranslate from '../../Hooks/useTranslate';
|
|
10
|
+
import { customFunctions, intervalGroupingBoundaries } from '../../constants';
|
|
11
|
+
import AggregatorCell from '../AggregatorCell';
|
|
12
|
+
import RenderingEngine from '../RenderingEngine/RenderCell';
|
|
13
|
+
import DateValueDisplay from '../DateValueDisplay';
|
|
14
|
+
import TestIdConstants from '../TestIdConstants';
|
|
15
|
+
import GroupAdditionalInfo from './GroupAdditionalInfo';
|
|
16
|
+
const groupheaderleftdisplacement = headerLevel => `${(headerLevel.level + 1) * 0.5}rem`;
|
|
17
|
+
const ColorBadge = styled.div(({ theme, colorIndicator }) => {
|
|
18
|
+
const borderVerticalOuter = theme.components.table.border['vertical-outer'];
|
|
19
|
+
return css `
|
|
20
|
+
position: sticky;
|
|
21
|
+
inset-inline-start: 0;
|
|
22
|
+
z-index: 10;
|
|
23
|
+
|
|
24
|
+
&::before {
|
|
25
|
+
content: '';
|
|
26
|
+
position: absolute;
|
|
27
|
+
inset-block-start: 0;
|
|
28
|
+
inset-inline-start: 0;
|
|
29
|
+
width: 0.25rem;
|
|
30
|
+
height: 100%;
|
|
31
|
+
background-color: ${colorIndicator};
|
|
32
|
+
z-index: 12;
|
|
33
|
+
|
|
34
|
+
/* Apply border radius to group header when table vertical outer border was disabled */
|
|
35
|
+
${!borderVerticalOuter &&
|
|
36
|
+
css `
|
|
37
|
+
border-top-left-radius: min(${theme.base['border-radius']}, 0.25rem);
|
|
38
|
+
border-bottom-left-radius: min(${theme.base['border-radius']}, 0.25rem);
|
|
39
|
+
`}
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* TODO: remove currentColor style after cosmos fixes the issue
|
|
45
|
+
* Cosmos yet to handle dark theme on BareButton
|
|
46
|
+
*/
|
|
47
|
+
const StyledGroupHeader = styled.div(({ theme, isAggregationApplied, groupHeader }) => {
|
|
48
|
+
const borderVerticalOuter = theme.components.table.border['vertical-outer'];
|
|
49
|
+
const borderHorizontalInner = theme.components.table.border['horizontal-inner'];
|
|
50
|
+
return css `
|
|
51
|
+
--group-left: ${groupheaderleftdisplacement(groupHeader)};
|
|
52
|
+
background-color: var(--group-bg-color);
|
|
53
|
+
|
|
54
|
+
/* On scroll-state-stuck shadow will be removed on all group-header-row. Below shadow will be applied only to the first group-header-row. */
|
|
55
|
+
&.group-header-row:nth-child(${groupHeader.level + 1}) {
|
|
56
|
+
filter: ${theme.base.shadow['low-filter']};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:has(button[aria-expanded='true']) {
|
|
60
|
+
> div {
|
|
61
|
+
box-shadow: ${theme.base.shadow.low};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
${!borderHorizontalInner &&
|
|
66
|
+
css `
|
|
67
|
+
> div {
|
|
68
|
+
/* On scroll-state-stuck this shadow will be removed */
|
|
69
|
+
box-shadow: ${theme.base.shadow.low};
|
|
70
|
+
}
|
|
71
|
+
`}
|
|
72
|
+
|
|
73
|
+
&.row.sticky-group-header {
|
|
74
|
+
position: sticky;
|
|
75
|
+
|
|
76
|
+
/* Declare as a scroll-state container so descendants can query the stuck state */
|
|
77
|
+
@supports (container-type: scroll-state) {
|
|
78
|
+
container-name: group-header-container;
|
|
79
|
+
container-type: scroll-state;
|
|
80
|
+
}
|
|
81
|
+
display: block;
|
|
82
|
+
top: calc(
|
|
83
|
+
${groupHeader.isLeafNode && groupHeader.level !== 0
|
|
84
|
+
? 'calc(var(--row-height) + var(--group-header-height))'
|
|
85
|
+
: 'var(--row-height)'}
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
/* z-index starting from 8 because freeze-line has z-index 7 */
|
|
89
|
+
z-index: ${`${8 + groupHeader.index}`};
|
|
90
|
+
> .cell-action,
|
|
91
|
+
.cell-fixed {
|
|
92
|
+
background-color: var(--group-bg-color);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.group-label {
|
|
97
|
+
width: 0.437rem;
|
|
98
|
+
display: inline-block;
|
|
99
|
+
flex-shrink: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.group-header-groupby {
|
|
103
|
+
font-weight: ${theme.base['font-weight'].normal};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.group-context-count .group-count {
|
|
107
|
+
font-weight: ${theme.base['font-weight'].bold};
|
|
108
|
+
white-space: pre;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.row.group-header-row {
|
|
112
|
+
height: auto;
|
|
113
|
+
border-bottom: ${!isAggregationApplied && borderHorizontalInner
|
|
114
|
+
? 'var(--border-style)'
|
|
115
|
+
: 'none'};
|
|
116
|
+
|
|
117
|
+
.group-header-aggregation-row {
|
|
118
|
+
display: flex;
|
|
119
|
+
|
|
120
|
+
/* Using height 0 so that the aggregations aren't visible when not applied but the cells can take the width and stretch the group header to the full width */
|
|
121
|
+
height: ${isAggregationApplied ? 'var(--group-header-height)' : 0};
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Apply border radius to group header when table vertical outer border was disabled */
|
|
126
|
+
${!borderVerticalOuter &&
|
|
127
|
+
css `
|
|
128
|
+
/* consider three group-header-rows stacked vertically, the first and second group headers have RULE 2 AND RULE 3 applied, the third group-header has only RULE 3 applied */
|
|
129
|
+
&.group-header-row {
|
|
130
|
+
/* RULE 1- if there are no adjacent group-headers, apply border-radius to all corners */
|
|
131
|
+
border-radius: min(${theme.base['border-radius']}, 0.25rem);
|
|
132
|
+
|
|
133
|
+
/* RULE-2- if there is an adjacent group-header below, remove bottom border-radius */
|
|
134
|
+
&:has(+ .group-header-row) {
|
|
135
|
+
border-radius: 0;
|
|
136
|
+
|
|
137
|
+
& ${ColorBadge}::before {
|
|
138
|
+
border-radius: 0;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/*RULE 3- if there is an adjacent group-header, go to the adjacent group header and remove top border-radius */
|
|
143
|
+
&:has(+ .group-header-row) + .group-header-row {
|
|
144
|
+
border-top-left-radius: 0;
|
|
145
|
+
border-top-right-radius: 0;
|
|
146
|
+
|
|
147
|
+
& ${ColorBadge}::before {
|
|
148
|
+
border-top-left-radius: 0;
|
|
149
|
+
border-top-right-radius: 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
`}
|
|
154
|
+
|
|
155
|
+
&.group-header-row .stickyGroupHeader {
|
|
156
|
+
position: sticky;
|
|
157
|
+
left: 0;
|
|
158
|
+
width: 0;
|
|
159
|
+
z-index: 10;
|
|
160
|
+
height: var(--group-header-height);
|
|
161
|
+
|
|
162
|
+
> button {
|
|
163
|
+
color: currentColor;
|
|
164
|
+
position: absolute;
|
|
165
|
+
left: 0;
|
|
166
|
+
top: 0;
|
|
167
|
+
bottom: 0;
|
|
168
|
+
width: max-content;
|
|
169
|
+
max-width: var(--container-width);
|
|
170
|
+
display: flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
background-color: var(--group-bg-color);
|
|
173
|
+
padding-left: var(--group-left);
|
|
174
|
+
margin-inline-start: 0.25rem;
|
|
175
|
+
z-index: 30;
|
|
176
|
+
cursor: pointer;
|
|
177
|
+
white-space: nowrap;
|
|
178
|
+
text-align: inherit;
|
|
179
|
+
font-stretch: inherit;
|
|
180
|
+
|
|
181
|
+
> .group-wrapper {
|
|
182
|
+
margin-inline-start: ${groupHeader.count === 0
|
|
183
|
+
? `calc(${theme.base.spacing} * 2.25)`
|
|
184
|
+
: 'unset'};
|
|
185
|
+
align-items: baseline;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.cell-content {
|
|
189
|
+
max-height: var(--group-header-height);
|
|
190
|
+
padding: 0;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
button:focus {
|
|
194
|
+
box-shadow: ${theme.base.shadow['focus-inset']};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
.group-header.cell {
|
|
198
|
+
left: 0;
|
|
199
|
+
padding-left: var(--group-left);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
div.group-header.cell-fixed {
|
|
203
|
+
background-color: var(--group-bg-color);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* When the group header is stuck to the top (overlapped by another group header),
|
|
207
|
+
remove the expanded-state box-shadow and add a top border for visual separation */
|
|
208
|
+
@supports (container-type: scroll-state) {
|
|
209
|
+
@container group-header-container scroll-state(stuck: top) {
|
|
210
|
+
&:has(button[aria-expanded='true']) > div {
|
|
211
|
+
box-shadow: none;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
`;
|
|
216
|
+
});
|
|
217
|
+
const StyledMetaList = styled(MetaList) `
|
|
218
|
+
margin-inline-start: 0;
|
|
219
|
+
|
|
220
|
+
/* Overrides default MetaList padding and margin which was causing text-overflow issues */
|
|
221
|
+
margin: 0;
|
|
222
|
+
padding: 0 0.3rem;
|
|
223
|
+
`;
|
|
224
|
+
const GroupAdditionalInfoSeparator = styled.span `
|
|
225
|
+
margin-inline-start: 0.3rem;
|
|
226
|
+
`;
|
|
227
|
+
/**
|
|
228
|
+
* Generates unique ARIA label IDs for accessibility.
|
|
229
|
+
* - groupLabelId: for the group label (e.g., "Status:")
|
|
230
|
+
* - groupNameId: for the group value (e.g., "Open")
|
|
231
|
+
* - additionalInfoIds: for any additional fields shown in the group header
|
|
232
|
+
* These IDs are used in aria-labelledby to improve screen reader support.
|
|
233
|
+
*/
|
|
234
|
+
const getAriaLabelIds = (uniqueId, additionalFields) => {
|
|
235
|
+
const groupLabelId = `group-label-${uniqueId}`;
|
|
236
|
+
const groupNameId = `group-name-${uniqueId}`;
|
|
237
|
+
const additionalInfoIds = additionalFields?.map(additionalField => `group-additional-info-${uniqueId}-${additionalField.id}` /* used in aria-labelledby */);
|
|
238
|
+
return { groupLabelId, groupNameId, additionalInfoIds };
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Returns label for interval grouping based on interval and boundaries
|
|
242
|
+
Response data depends on boundary settings.
|
|
243
|
+
Ex: For sample data of profit
|
|
244
|
+
profit --> cases(count)
|
|
245
|
+
{'0': 10, 1': 100, '2':30, '10': 35, '15':45, '20':2}
|
|
246
|
+
For Interval 10
|
|
247
|
+
If the boundary is 'include-lower-only',
|
|
248
|
+
and value is 10 then label -> 10 to 20
|
|
249
|
+
|
|
250
|
+
If boundary is 'include-upper-only',
|
|
251
|
+
and value is 10 then label -> 0 to 10
|
|
252
|
+
* */
|
|
253
|
+
function buildIntervalGroupingLabel(value, customFunction, translate) {
|
|
254
|
+
const { interval, boundaries } = customFunction;
|
|
255
|
+
// To restrict the decimals in labels
|
|
256
|
+
const intervalDecimalLength = (interval.toString().split('.')[1] || '').length;
|
|
257
|
+
value = Number(value);
|
|
258
|
+
// In case of 'include-lower-only'
|
|
259
|
+
let lowerValue = value.toFixed(intervalDecimalLength);
|
|
260
|
+
let upperValue = (value + interval).toFixed(intervalDecimalLength);
|
|
261
|
+
// In case of boundary 'include-upper-only'
|
|
262
|
+
if (boundaries === intervalGroupingBoundaries.includeUpperOnly) {
|
|
263
|
+
lowerValue = (value - interval).toFixed(intervalDecimalLength);
|
|
264
|
+
upperValue = value.toFixed(intervalDecimalLength);
|
|
265
|
+
}
|
|
266
|
+
return `${lowerValue} ${translate('to')} ${upperValue}`;
|
|
267
|
+
}
|
|
268
|
+
export function GroupName({ view, column, groupHeader, dateFunction, customFunction }) {
|
|
269
|
+
const [translate] = useTranslate();
|
|
270
|
+
const { locale, timezone } = view.meta;
|
|
271
|
+
const isRangeGrouping = customFunction?.type === customFunctions.RANGE_GROUPING;
|
|
272
|
+
const isIntervalGrouping = customFunction?.type === customFunctions.INTERVAL_GROUPING;
|
|
273
|
+
if (dateFunction) {
|
|
274
|
+
return (_jsx(DateValueDisplay, { value: groupHeader.name, dateFunction: dateFunction, locale: locale, timezone: timezone }));
|
|
275
|
+
}
|
|
276
|
+
if (isRangeGrouping) {
|
|
277
|
+
/** If custom range grouping applied on number field , we need to show group name as text instead of number */
|
|
278
|
+
return groupHeader.name;
|
|
279
|
+
}
|
|
280
|
+
if (isIntervalGrouping) {
|
|
281
|
+
/** If custom range grouping applied on number , we need to show group name based on value and custom function details like interval and boundaries */
|
|
282
|
+
return buildIntervalGroupingLabel(groupHeader.name, customFunction, translate);
|
|
283
|
+
}
|
|
284
|
+
column.setExecutionContext(null); // If null is not set then it will execute on the previous row context and facing issues when cell is edited. Based on column.editMode and current context renderer varies (it can be cellEditRenderer)
|
|
285
|
+
const columnRendererProps = {
|
|
286
|
+
...column.getRenderingEngineProps(),
|
|
287
|
+
context: {
|
|
288
|
+
getValue: () => groupHeader.name,
|
|
289
|
+
getExecutionContext: () => {
|
|
290
|
+
return { getValue: () => groupHeader.data, name: 'groupHeader' };
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
return _jsx(RenderingEngine, { ...columnRendererProps });
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Tooltip content for the group header.
|
|
298
|
+
* Shows the group label, value, and any additional fields.
|
|
299
|
+
* Used for hover/focus tooltips on the group header button.
|
|
300
|
+
*/
|
|
301
|
+
function GroupHeaderToolTip({ column, groupHeader, columns, additionalFields, target }) {
|
|
302
|
+
const view = column.parent;
|
|
303
|
+
const { dateFunction, customFunction } = getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};
|
|
304
|
+
const formatter = view.getFormatterByKey('Integer');
|
|
305
|
+
const { locale } = view.meta;
|
|
306
|
+
const groupCountFormatted = formatter
|
|
307
|
+
? formatter(groupHeader.count, { locale })
|
|
308
|
+
: groupHeader.count;
|
|
309
|
+
return (_jsxs(Tooltip, { smart: true, target: target, showDelay: 'short', hideDelay: 'none', describeTarget: false, children: [_jsxs(Text, { children: [!column.field.hideGroupColumnNameLabel && groupHeader.label, ": "] }), _jsxs(Text, { children: [_jsx(GroupName, { view: view, column: column, groupHeader: groupHeader, dateFunction: dateFunction, customFunction: customFunction }), _jsx(Text, { children: ` (${groupCountFormatted})` })] }), !!(groupHeader.additionalFieldsData?.length && additionalFields.length) && (_jsx(_Fragment, { children: groupHeader.additionalFieldsData?.map(additionalFieldData => {
|
|
310
|
+
return (_jsxs(_Fragment, { children: [' • ', _jsx(GroupAdditionalInfo, { groupHeader: groupHeader, additionalField: additionalFields.find(additionalField => additionalField.id === additionalFieldData.id), columns: columns, additionalFieldData: additionalFieldData, rendererContext: 'GroupHeaderTooltip' })] }));
|
|
311
|
+
}) }))] }));
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Renders the main group header label and count.
|
|
315
|
+
* - Shows the group label (e.g., "Status:") unless hidden by column config.
|
|
316
|
+
* - Shows the group value and item count.
|
|
317
|
+
* - Uses ARIA IDs for accessibility.
|
|
318
|
+
*/
|
|
319
|
+
function GroupHeaderLabel({ column, groupHeader }) {
|
|
320
|
+
const view = column.parent;
|
|
321
|
+
const { dateFunction, customFunction } = getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};
|
|
322
|
+
const formatter = view.getFormatterByKey('Integer');
|
|
323
|
+
const { locale } = view.meta;
|
|
324
|
+
const groupCountFormatted = formatter
|
|
325
|
+
? formatter(groupHeader.count, { locale })
|
|
326
|
+
: groupHeader.count;
|
|
327
|
+
const { groupLabelId, groupNameId } = getAriaLabelIds(groupHeader.uniqueId);
|
|
328
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: 'group-label' }), !column.field.hideGroupColumnNameLabel && (_jsxs("span", { className: 'group-header-groupby', "data-test-id": groupHeader.groupBy, "data-testid": `${TestIdConstants.groupHeaderGroupBy}-${groupHeader.groupBy}`, id: groupLabelId, children: [groupHeader.label, ":"] })), _jsx("div", { className: 'group-label' }), _jsxs("span", { className: 'group-context-count', style: { display: 'inline-flex' }, "data-test-id": 'groupHeader', "data-testid": TestIdConstants.groupHeaderCount, id: groupNameId, children: [_jsx(GroupName, { view: view, column: column, groupHeader: groupHeader, dateFunction: dateFunction, customFunction: customFunction }), _jsx("span", { className: 'group-count', children: ` (${groupCountFormatted})` }), _jsx(VisuallyHiddenText, { children: " items" })] })] }));
|
|
329
|
+
}
|
|
330
|
+
// NOTE: While making any changes in GroupRenderer.jsx, also make similar changes in HierarchicalGroupRenderer.jsx file if applicable
|
|
331
|
+
export default function GroupHeader({ groupHeader, columns }) {
|
|
332
|
+
const buttonRef = useRef();
|
|
333
|
+
const view = columns[0].parent;
|
|
334
|
+
const toggleGroup = useCallback(() => {
|
|
335
|
+
if (groupHeader.count > 0) {
|
|
336
|
+
view.type.toggleGroupExpansion({ groupHeader });
|
|
337
|
+
}
|
|
338
|
+
}, [groupHeader, view]);
|
|
339
|
+
// TODO: This we are adding temporary to show freeze border until we make group header rendering change
|
|
340
|
+
// when we will pick up aggregation.
|
|
341
|
+
if (!groupHeader.isVisible)
|
|
342
|
+
return null;
|
|
343
|
+
// If grouping by a regular column (i.e. without a dateFunction), determine props for the renderer
|
|
344
|
+
const { columnId, additionalFields = [] } = getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};
|
|
345
|
+
// if state.groups is not yet prepared/updated, then getGroupFromKey will return undefined
|
|
346
|
+
if (!columnId) {
|
|
347
|
+
return null;
|
|
348
|
+
}
|
|
349
|
+
const column = columns.find(c => c.field.id === columnId);
|
|
350
|
+
const isAggregationApplied = columns.filter(c => !c.hidden).some(c => c.aggregated);
|
|
351
|
+
// Generate unique ARIA label IDs for accessibility
|
|
352
|
+
const { groupLabelId, groupNameId, additionalInfoIds = [] } = getAriaLabelIds(groupHeader.uniqueId, additionalFields);
|
|
353
|
+
let groupAdditionalInfo;
|
|
354
|
+
// Prepare additional info components if present
|
|
355
|
+
if (groupHeader.additionalFieldsData?.length && additionalFields.length) {
|
|
356
|
+
groupAdditionalInfo = groupHeader.additionalFieldsData.reduce((acc, additionalFieldData, idx) => {
|
|
357
|
+
const additionalField = additionalFields.find(field => field.id === additionalFieldData.id);
|
|
358
|
+
if (additionalField) {
|
|
359
|
+
acc.push(_jsx(Flex, { container: { gap: 0.5 }, id: additionalInfoIds[idx], children: _jsx(GroupAdditionalInfo, { additionalFieldData: additionalFieldData, additionalField: additionalField, columns: columns, groupHeader: groupHeader, rendererContext: 'GroupHeader' }) }));
|
|
360
|
+
}
|
|
361
|
+
return acc;
|
|
362
|
+
}, []);
|
|
363
|
+
}
|
|
364
|
+
// FIXME: Import rather than COPY, i would rather
|
|
365
|
+
return (_jsx(StyledGroupHeader, { groupHeader: groupHeader, className: cx('row group-header-row sticky-group-header'), "data-test-id": 'groupHeader', "data-testid": `${TestIdConstants.groupHeader}-${groupHeader.label}-${groupHeader.name}`, isAggregationApplied: isAggregationApplied, role: 'row', onFocus: e => {
|
|
366
|
+
if (buttonRef.current && !e.currentTarget.contains(e.relatedTarget)) {
|
|
367
|
+
e.preventDefault();
|
|
368
|
+
buttonRef.current.focus();
|
|
369
|
+
}
|
|
370
|
+
}, children: _jsxs(Flex, { container: true, children: [_jsx(ColorBadge, { colorIndicator: groupHeader.colorIndicator }), _jsxs("div", { children: [_jsxs("div", { className: 'stickyGroupHeader', children: [_jsxs(BareButton, { ref: buttonRef, "data-testid": `${TestIdConstants.groupHeaderButton}-${groupHeader.label}-${groupHeader.name}`, "aria-labelledby": [groupLabelId, groupNameId, ...additionalInfoIds].join(' '), "aria-expanded": !!groupHeader.isExpanded, style: {
|
|
371
|
+
paddingRight: 'var(--group-left)'
|
|
372
|
+
}, onClick: () => toggleGroup(), onKeyDown: event => {
|
|
373
|
+
if (event.key === 'Enter') {
|
|
374
|
+
// Prevent capturing of group header toggle click to its child renderers.
|
|
375
|
+
event.preventDefault();
|
|
376
|
+
event.stopPropagation();
|
|
377
|
+
toggleGroup();
|
|
378
|
+
}
|
|
379
|
+
}, tabIndex: -1, icon: true, children: [groupHeader.count > 0 &&
|
|
380
|
+
(groupHeader.isExpanded ? _jsx(Icon, { name: 'caret-down' }) : _jsx(Icon, { name: 'caret-right' })), _jsxs("div", { className: 'group-wrapper', children: [_jsx(GroupHeaderLabel, { column: column, groupHeader: groupHeader }), groupAdditionalInfo && (_jsxs(_Fragment, { children: [_jsx(Text, { variant: 'secondary', as: GroupAdditionalInfoSeparator, children: "\u2022" }), _jsx(StyledMetaList, { wrapItems: false, items: groupAdditionalInfo })] }))] })] }), buttonRef.current && (_jsx(GroupHeaderToolTip, { target: buttonRef.current, column: column, groupHeader: groupHeader, columns: columns, additionalFields: additionalFields }))] }), _jsx("div", { className: 'group-header-aggregation-row', children: [...columns]
|
|
381
|
+
.sort((colA, colB) => colA.order - colB.order)
|
|
382
|
+
.map(c => {
|
|
383
|
+
const cxt = {
|
|
384
|
+
getValue: () => groupHeader?.aggregation?.[c.field.name]?.[c.aggregationType?.toLowerCase()]
|
|
385
|
+
};
|
|
386
|
+
return (_jsx(AggregatorCell, { column: c, context: cxt, className: cx('cell', {
|
|
387
|
+
'cell-fixed': column.frozen
|
|
388
|
+
}) }, c.field.id));
|
|
389
|
+
}) })] })] }) }));
|
|
390
|
+
}
|
|
391
|
+
GroupHeader.propTypes = {
|
|
392
|
+
columns: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
393
|
+
groupHeader: PropTypes.objectOf(PropTypes.any).isRequired
|
|
394
|
+
};
|
|
395
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Components/GroupRenderer/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,O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IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;iCAC7C,GAAG,CAAC,CAAC,CAAC,EAAE;gCACP,MAAM,GAAG,GAAG;oCACV,QAAQ,EAAE,GAAG,EAAE,CACb,WAAW,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,WAAW,EAAE,CAAC;iCAC/E,CAAC;gCACF,OAAO,CACL,KAAC,cAAc,IAEb,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,GAAG,EACZ,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE;wCACpB,YAAY,EAAE,MAAM,CAAC,MAAM;qCAC5B,CAAC,IALG,CAAC,CAAC,KAAK,CAAC,EAAE,CAMf,CACH,CAAC;4BACJ,CAAC,CAAC,GACA,IACF,IACD,GACW,CACrB,CAAC;AACJ,CAAC;AAED,WAAW,CAAC,SAAS,GAAG;IACtB,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IACpD,WAAW,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;CAC1D,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useRef, useCallback } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Icon, Text, MetaList, Tooltip, VisuallyHiddenText, Flex } from '@pega/cosmos-react-core';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\nimport { getGroupFromKey } from 'pega-ui-list-data-apis';\n\nimport { createClassName as cx } from '../../Utils';\nimport useTranslate from '../../Hooks/useTranslate';\nimport { customFunctions, intervalGroupingBoundaries } from '../../constants';\nimport AggregatorCell from '../AggregatorCell';\nimport RenderingEngine from '../RenderingEngine/RenderCell';\nimport DateValueDisplay from '../DateValueDisplay';\nimport TestIdConstants from '../TestIdConstants';\n\nimport GroupAdditionalInfo from './GroupAdditionalInfo';\n\nconst groupheaderleftdisplacement = headerLevel => `${(headerLevel.level + 1) * 0.5}rem`;\n\nconst ColorBadge = styled.div(({ theme, colorIndicator }) => {\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n\n return css`\n position: sticky;\n inset-inline-start: 0;\n z-index: 10;\n\n &::before {\n content: '';\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n width: 0.25rem;\n height: 100%;\n background-color: ${colorIndicator};\n z-index: 12;\n\n /* Apply border radius to group header when table vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n border-top-left-radius: min(${theme.base['border-radius']}, 0.25rem);\n border-bottom-left-radius: min(${theme.base['border-radius']}, 0.25rem);\n `}\n }\n `;\n});\n\n/**\n * TODO: remove currentColor style after cosmos fixes the issue\n * Cosmos yet to handle dark theme on BareButton\n */\n\nconst StyledGroupHeader = styled.div(({ theme, isAggregationApplied, groupHeader }) => {\n const borderVerticalOuter = theme.components.table.border['vertical-outer'];\n const borderHorizontalInner = theme.components.table.border['horizontal-inner'];\n\n return css`\n --group-left: ${groupheaderleftdisplacement(groupHeader)};\n background-color: var(--group-bg-color);\n\n /* On scroll-state-stuck shadow will be removed on all group-header-row. Below shadow will be applied only to the first group-header-row. */\n &.group-header-row:nth-child(${groupHeader.level + 1}) {\n filter: ${theme.base.shadow['low-filter']};\n }\n\n &:has(button[aria-expanded='true']) {\n > div {\n box-shadow: ${theme.base.shadow.low};\n }\n }\n\n ${!borderHorizontalInner &&\n css`\n > div {\n /* On scroll-state-stuck this shadow will be removed */\n box-shadow: ${theme.base.shadow.low};\n }\n `}\n\n &.row.sticky-group-header {\n position: sticky;\n\n /* Declare as a scroll-state container so descendants can query the stuck state */\n @supports (container-type: scroll-state) {\n container-name: group-header-container;\n container-type: scroll-state;\n }\n display: block;\n top: calc(\n ${groupHeader.isLeafNode && groupHeader.level !== 0\n ? 'calc(var(--row-height) + var(--group-header-height))'\n : 'var(--row-height)'}\n );\n\n /* z-index starting from 8 because freeze-line has z-index 7 */\n z-index: ${`${8 + groupHeader.index}`};\n > .cell-action,\n .cell-fixed {\n background-color: var(--group-bg-color);\n }\n }\n\n .group-label {\n width: 0.437rem;\n display: inline-block;\n flex-shrink: 0;\n }\n\n .group-header-groupby {\n font-weight: ${theme.base['font-weight'].normal};\n }\n\n .group-context-count .group-count {\n font-weight: ${theme.base['font-weight'].bold};\n white-space: pre;\n }\n\n &.row.group-header-row {\n height: auto;\n border-bottom: ${!isAggregationApplied && borderHorizontalInner\n ? 'var(--border-style)'\n : 'none'};\n\n .group-header-aggregation-row {\n display: flex;\n\n /* Using height 0 so that the aggregations aren't visible when not applied but the cells can take the width and stretch the group header to the full width */\n height: ${isAggregationApplied ? 'var(--group-header-height)' : 0};\n }\n }\n\n /* Apply border radius to group header when table vertical outer border was disabled */\n ${!borderVerticalOuter &&\n css`\n /* consider three group-header-rows stacked vertically, the first and second group headers have RULE 2 AND RULE 3 applied, the third group-header has only RULE 3 applied */\n &.group-header-row {\n /* RULE 1- if there are no adjacent group-headers, apply border-radius to all corners */\n border-radius: min(${theme.base['border-radius']}, 0.25rem);\n\n /* RULE-2- if there is an adjacent group-header below, remove bottom border-radius */\n &:has(+ .group-header-row) {\n border-radius: 0;\n\n & ${ColorBadge}::before {\n border-radius: 0;\n }\n }\n\n /*RULE 3- if there is an adjacent group-header, go to the adjacent group header and remove top border-radius */\n &:has(+ .group-header-row) + .group-header-row {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n\n & ${ColorBadge}::before {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n }\n }\n `}\n\n &.group-header-row .stickyGroupHeader {\n position: sticky;\n left: 0;\n width: 0;\n z-index: 10;\n height: var(--group-header-height);\n\n > button {\n color: currentColor;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: max-content;\n max-width: var(--container-width);\n display: flex;\n align-items: center;\n background-color: var(--group-bg-color);\n padding-left: var(--group-left);\n margin-inline-start: 0.25rem;\n z-index: 30;\n cursor: pointer;\n white-space: nowrap;\n text-align: inherit;\n font-stretch: inherit;\n\n > .group-wrapper {\n margin-inline-start: ${groupHeader.count === 0\n ? `calc(${theme.base.spacing} * 2.25)`\n : 'unset'};\n align-items: baseline;\n }\n\n .cell-content {\n max-height: var(--group-header-height);\n padding: 0;\n }\n }\n button:focus {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n }\n .group-header.cell {\n left: 0;\n padding-left: var(--group-left);\n }\n\n div.group-header.cell-fixed {\n background-color: var(--group-bg-color);\n }\n\n /* When the group header is stuck to the top (overlapped by another group header),\n remove the expanded-state box-shadow and add a top border for visual separation */\n @supports (container-type: scroll-state) {\n @container group-header-container scroll-state(stuck: top) {\n &:has(button[aria-expanded='true']) > div {\n box-shadow: none;\n }\n }\n }\n `;\n});\n\nconst StyledMetaList = styled(MetaList)`\n margin-inline-start: 0;\n\n /* Overrides default MetaList padding and margin which was causing text-overflow issues */\n margin: 0;\n padding: 0 0.3rem;\n`;\nconst GroupAdditionalInfoSeparator = styled.span`\n margin-inline-start: 0.3rem;\n`;\n\n/**\n * Generates unique ARIA label IDs for accessibility.\n * - groupLabelId: for the group label (e.g., \"Status:\")\n * - groupNameId: for the group value (e.g., \"Open\")\n * - additionalInfoIds: for any additional fields shown in the group header\n * These IDs are used in aria-labelledby to improve screen reader support.\n */\nconst getAriaLabelIds = (uniqueId, additionalFields) => {\n const groupLabelId = `group-label-${uniqueId}`;\n const groupNameId = `group-name-${uniqueId}`;\n const additionalInfoIds = additionalFields?.map(\n additionalField =>\n `group-additional-info-${uniqueId}-${additionalField.id}` /* used in aria-labelledby */\n );\n return { groupLabelId, groupNameId, additionalInfoIds };\n};\n/**\n * Returns label for interval grouping based on interval and boundaries\n Response data depends on boundary settings.\n Ex: For sample data of profit\n profit --> cases(count)\n {'0': 10, 1': 100, '2':30, '10': 35, '15':45, '20':2}\n For Interval 10\n If the boundary is 'include-lower-only',\n and value is 10 then label -> 10 to 20\n\n If boundary is 'include-upper-only',\n and value is 10 then label -> 0 to 10\n * */\nfunction buildIntervalGroupingLabel(value, customFunction, translate) {\n const { interval, boundaries } = customFunction;\n // To restrict the decimals in labels\n const intervalDecimalLength = (interval.toString().split('.')[1] || '').length;\n value = Number(value);\n // In case of 'include-lower-only'\n let lowerValue = value.toFixed(intervalDecimalLength);\n let upperValue = (value + interval).toFixed(intervalDecimalLength);\n // In case of boundary 'include-upper-only'\n if (boundaries === intervalGroupingBoundaries.includeUpperOnly) {\n lowerValue = (value - interval).toFixed(intervalDecimalLength);\n upperValue = value.toFixed(intervalDecimalLength);\n }\n return `${lowerValue} ${translate('to')} ${upperValue}`;\n}\n\nexport function GroupName({ view, column, groupHeader, dateFunction, customFunction }) {\n const [translate] = useTranslate();\n const { locale, timezone } = view.meta;\n const isRangeGrouping = customFunction?.type === customFunctions.RANGE_GROUPING;\n const isIntervalGrouping = customFunction?.type === customFunctions.INTERVAL_GROUPING;\n\n if (dateFunction) {\n return (\n <DateValueDisplay\n value={groupHeader.name}\n dateFunction={dateFunction}\n locale={locale}\n timezone={timezone}\n />\n );\n }\n\n if (isRangeGrouping) {\n /** If custom range grouping applied on number field , we need to show group name as text instead of number */\n return groupHeader.name;\n }\n\n if (isIntervalGrouping) {\n /** If custom range grouping applied on number , we need to show group name based on value and custom function details like interval and boundaries */\n return buildIntervalGroupingLabel(groupHeader.name, customFunction, translate);\n }\n\n column.setExecutionContext(null); // If null is not set then it will execute on the previous row context and facing issues when cell is edited. Based on column.editMode and current context renderer varies (it can be cellEditRenderer)\n\n const columnRendererProps = {\n ...column.getRenderingEngineProps(),\n context: {\n getValue: () => groupHeader.name,\n getExecutionContext: () => {\n return { getValue: () => groupHeader.data, name: 'groupHeader' };\n }\n }\n };\n\n return <RenderingEngine {...columnRendererProps} />;\n}\n\n/**\n * Tooltip content for the group header.\n * Shows the group label, value, and any additional fields.\n * Used for hover/focus tooltips on the group header button.\n */\nfunction GroupHeaderToolTip({ column, groupHeader, columns, additionalFields, target }) {\n const view = column.parent;\n const { dateFunction, customFunction } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n const formatter = view.getFormatterByKey('Integer');\n const { locale } = view.meta;\n const groupCountFormatted = formatter\n ? formatter(groupHeader.count, { locale })\n : groupHeader.count;\n\n return (\n <Tooltip smart target={target} showDelay='short' hideDelay='none' describeTarget={false}>\n <Text>{!column.field.hideGroupColumnNameLabel && groupHeader.label}: </Text>\n <Text>\n <GroupName\n view={view}\n column={column}\n groupHeader={groupHeader}\n dateFunction={dateFunction}\n customFunction={customFunction}\n />\n <Text>{` (${groupCountFormatted})`}</Text>\n </Text>\n {!!(groupHeader.additionalFieldsData?.length && additionalFields.length) && (\n <>\n {groupHeader.additionalFieldsData?.map(additionalFieldData => {\n return (\n <>\n {' • '}\n <GroupAdditionalInfo\n groupHeader={groupHeader}\n additionalField={additionalFields.find(\n additionalField => additionalField.id === additionalFieldData.id\n )}\n columns={columns}\n additionalFieldData={additionalFieldData}\n rendererContext='GroupHeaderTooltip'\n />\n </>\n );\n })}\n </>\n )}\n </Tooltip>\n );\n}\n\n/**\n * Renders the main group header label and count.\n * - Shows the group label (e.g., \"Status:\") unless hidden by column config.\n * - Shows the group value and item count.\n * - Uses ARIA IDs for accessibility.\n */\nfunction GroupHeaderLabel({ column, groupHeader }) {\n const view = column.parent;\n const { dateFunction, customFunction } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n const formatter = view.getFormatterByKey('Integer');\n const { locale } = view.meta;\n const groupCountFormatted = formatter\n ? formatter(groupHeader.count, { locale })\n : groupHeader.count;\n const { groupLabelId, groupNameId } = getAriaLabelIds(groupHeader.uniqueId);\n return (\n <>\n <div className='group-label' />\n {!column.field.hideGroupColumnNameLabel && (\n <span\n className='group-header-groupby'\n data-test-id={groupHeader.groupBy}\n data-testid={`${TestIdConstants.groupHeaderGroupBy}-${groupHeader.groupBy}`}\n id={groupLabelId}\n >\n {groupHeader.label}:\n </span>\n )}\n <div className='group-label' />\n <span\n className='group-context-count'\n style={{ display: 'inline-flex' }}\n data-test-id='groupHeader'\n data-testid={TestIdConstants.groupHeaderCount}\n id={groupNameId}\n >\n <GroupName\n view={view}\n column={column}\n groupHeader={groupHeader}\n dateFunction={dateFunction}\n customFunction={customFunction}\n />\n {/* adding whitespace pre to preserve the space at the begining of count text */}\n <span className='group-count'>{` (${groupCountFormatted})`}</span>\n <VisuallyHiddenText> items</VisuallyHiddenText>\n </span>\n </>\n );\n}\n// NOTE: While making any changes in GroupRenderer.jsx, also make similar changes in HierarchicalGroupRenderer.jsx file if applicable\n\nexport default function GroupHeader({ groupHeader, columns }) {\n const buttonRef = useRef();\n const view = columns[0].parent;\n const toggleGroup = useCallback(() => {\n if (groupHeader.count > 0) {\n view.type.toggleGroupExpansion({ groupHeader });\n }\n }, [groupHeader, view]);\n\n // TODO: This we are adding temporary to show freeze border until we make group header rendering change\n // when we will pick up aggregation.\n if (!groupHeader.isVisible) return null;\n\n // If grouping by a regular column (i.e. without a dateFunction), determine props for the renderer\n const { columnId, additionalFields = [] } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n // if state.groups is not yet prepared/updated, then getGroupFromKey will return undefined\n if (!columnId) {\n return null;\n }\n\n const column = columns.find(c => c.field.id === columnId);\n const isAggregationApplied = columns.filter(c => !c.hidden).some(c => c.aggregated);\n\n // Generate unique ARIA label IDs for accessibility\n const {\n groupLabelId,\n groupNameId,\n additionalInfoIds = []\n } = getAriaLabelIds(groupHeader.uniqueId, additionalFields);\n let groupAdditionalInfo;\n\n // Prepare additional info components if present\n if (groupHeader.additionalFieldsData?.length && additionalFields.length) {\n groupAdditionalInfo = groupHeader.additionalFieldsData.reduce(\n (acc, additionalFieldData, idx) => {\n const additionalField = additionalFields.find(field => field.id === additionalFieldData.id);\n if (additionalField) {\n acc.push(\n <Flex container={{ gap: 0.5 }} id={additionalInfoIds[idx]}>\n <GroupAdditionalInfo\n additionalFieldData={additionalFieldData}\n additionalField={additionalField}\n columns={columns}\n groupHeader={groupHeader}\n rendererContext='GroupHeader'\n />\n </Flex>\n );\n }\n return acc;\n },\n []\n );\n }\n\n // FIXME: Import rather than COPY, i would rather\n return (\n <StyledGroupHeader\n groupHeader={groupHeader}\n className={cx('row group-header-row sticky-group-header')}\n data-test-id='groupHeader'\n data-testid={`${TestIdConstants.groupHeader}-${groupHeader.label}-${groupHeader.name}`}\n isAggregationApplied={isAggregationApplied}\n role='row'\n onFocus={e => {\n if (buttonRef.current && !e.currentTarget.contains(e.relatedTarget)) {\n e.preventDefault();\n buttonRef.current.focus();\n }\n }}\n >\n <Flex container>\n <ColorBadge colorIndicator={groupHeader.colorIndicator} />\n <div>\n <div className='stickyGroupHeader'>\n <BareButton\n ref={buttonRef}\n data-testid={`${TestIdConstants.groupHeaderButton}-${groupHeader.label}-${groupHeader.name}`}\n // ARIA labels for accessibility, includes additional info if present\n aria-labelledby={[groupLabelId, groupNameId, ...additionalInfoIds].join(' ')}\n aria-expanded={!!groupHeader.isExpanded}\n style={{\n paddingRight: 'var(--group-left)'\n }}\n onClick={() => toggleGroup()}\n onKeyDown={event => {\n if (event.key === 'Enter') {\n // Prevent capturing of group header toggle click to its child renderers.\n event.preventDefault();\n event.stopPropagation();\n toggleGroup();\n }\n }}\n tabIndex={-1}\n icon\n >\n {groupHeader.count > 0 &&\n (groupHeader.isExpanded ? <Icon name='caret-down' /> : <Icon name='caret-right' />)}\n <div className='group-wrapper'>\n {/* Main group label and count */}\n <GroupHeaderLabel column={column} groupHeader={groupHeader} />\n {/* Render additional info if present */}\n {groupAdditionalInfo && (\n <>\n <Text variant='secondary' as={GroupAdditionalInfoSeparator}>\n •\n </Text>\n <StyledMetaList wrapItems={false} items={groupAdditionalInfo} />\n </>\n )}\n </div>\n </BareButton>\n {/* Tooltip for group header, shown on hover/focus */}\n {buttonRef.current && (\n <GroupHeaderToolTip\n target={buttonRef.current}\n column={column}\n groupHeader={groupHeader}\n columns={columns}\n additionalFields={additionalFields}\n />\n )}\n </div>\n <div className='group-header-aggregation-row'>\n {[...columns]\n .sort((colA, colB) => colA.order - colB.order)\n .map(c => {\n const cxt = {\n getValue: () =>\n groupHeader?.aggregation?.[c.field.name]?.[c.aggregationType?.toLowerCase()]\n };\n return (\n <AggregatorCell\n key={c.field.id}\n column={c}\n context={cxt}\n className={cx('cell', {\n 'cell-fixed': column.frozen\n })}\n />\n );\n })}\n </div>\n </div>\n </Flex>\n </StyledGroupHeader>\n );\n}\n\nGroupHeader.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.any).isRequired,\n groupHeader: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingMenu.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Grouping/GroupingMenu.jsx"],"names":[],"mappings":"AA0BA;;;
|
|
1
|
+
{"version":3,"file":"GroupingMenu.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Grouping/GroupingMenu.jsx"],"names":[],"mappings":"AA0BA;;;mDAsEC;;;;;;;;;;sBAhGqB,YAAY"}
|
|
@@ -52,7 +52,8 @@ export default function GroupingMenu({ column, finishPopOver }) {
|
|
|
52
52
|
columnId: column.field.id,
|
|
53
53
|
dateFunction: selectedDateFunction,
|
|
54
54
|
level: groups.length,
|
|
55
|
-
order
|
|
55
|
+
// Set sort order from column else default to 'asc'
|
|
56
|
+
order: column.sortOrder ?? 'asc'
|
|
56
57
|
};
|
|
57
58
|
applyGrouping([...groups, newGroup]);
|
|
58
59
|
finishPopOver();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingMenu.js","sourceRoot":"","sources":["../../../../Core/Components/Grouping/GroupingMenu.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OA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AAa,KAAK,EAAE,CAAC,CAAC,GAAG,YAC7B,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,IADR,CAAC,CAAC,GAAG,CAET,CACV,CAAC,GACK,EACT,MAAC,YAAY,eACX,KAAC,MAAM,IAAC,OAAO,EAAE,aAAa,YAAG,SAAS,CAAC,QAAQ,CAAC,GAAU,EAC9D,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,QAAQ,YACxC,SAAS,CAAC,QAAQ,CAAC,GACb,IACI,IACI,CACtB,CAAC;AACJ,CAAC;AAED,YAAY,CAAC,SAAS,GAAG;IACvB,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU;IACpD,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACzC,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport { useMemo, useState } from 'react';\nimport styled from 'styled-components';\n\nimport { Button, Flex, Option, Select } from '@pega/cosmos-react-core';\nimport { dateFunctionLabels, FieldType } from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\n\nconst StyledFooter = styled.footer`\n margin-top: 0.625rem;\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n`;\n\nconst StyledGroupingMenu = styled(Flex)`\n z-index: ${props => props.theme.base['z-index'].popover};\n max-height: 35.156rem;\n padding: 0.625rem;\n overflow: auto;\n max-width: ${props => props.theme.base['content-width'].lg};\n min-width: calc(${props => props.theme.base['content-width'].lg} * 0.3125);\n display: flex;\n flex-direction: column;\n`;\nexport default function GroupingMenu({ column, finishPopOver }) {\n const [translate] = useTranslate();\n const [selectedDateFunction, setSelectedDateFunction] = useState(undefined);\n const view = column.parent;\n const {\n meta: { dateFunctions },\n state: { groups = [] },\n type: { applyGrouping }\n } = view;\n\n const fieldType = column.field.type;\n const allOptions = useMemo(() => {\n // If date functions are disabled or not applicable to the current field type\n if (!dateFunctions || ![FieldType.DATE, FieldType.DATE_TIME].includes(fieldType)) {\n return [];\n }\n\n return [\n // Date functions applicable for the given field type\n ...dateFunctions[fieldType === FieldType.DATE ? 'DATE_ONLY' : 'DATE_TIME'].map(f => ({\n key: f,\n dateFunction: f,\n label: translate(dateFunctionLabels[f])\n })),\n\n // Option for grouping directly by the field values\n // The key 'NONE' is needed to work with the Select component\n { key: 'NONE', dateFunction: undefined, label: 'Default' }\n ];\n }, [dateFunctions, fieldType, translate]);\n\n if (allOptions.length === 0) {\n return null;\n }\n\n const onSubmit = () => {\n const newGroup = {\n columnId: column.field.id,\n dateFunction: selectedDateFunction,\n level: groups.length,\n // Set sort order from column else default to 'asc'\n order: column.sortOrder ?? 'asc'\n };\n applyGrouping([...groups, newGroup]);\n finishPopOver();\n };\n\n return (\n <StyledGroupingMenu>\n <Select\n label='Date function'\n labelHidden\n data-test-id='GroupingDateFuncSelector'\n value={selectedDateFunction || 'NONE'} // Can't set up `undefined` as value\n onChange={e => setSelectedDateFunction(e.target.value)}\n >\n {allOptions.map(o => (\n <Option key={o.key} value={o.key}>\n {translate(o.label)}\n </Option>\n ))}\n </Select>\n <StyledFooter>\n <Button onClick={finishPopOver}>{translate('Cancel')}</Button>\n <Button variant='primary' onClick={onSubmit}>\n {translate('Submit')}\n </Button>\n </StyledFooter>\n </StyledGroupingMenu>\n );\n}\n\nGroupingMenu.propTypes = {\n column: PropTypes.objectOf(PropTypes.any).isRequired,\n finishPopOver: PropTypes.func.isRequired\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderCell.d.ts","sourceRoot":"","sources":["../../../Core/Components/HeaderCell.jsx"],"names":[],"mappings":";AAUA;;;
|
|
1
|
+
{"version":3,"file":"HeaderCell.d.ts","sourceRoot":"","sources":["../../../Core/Components/HeaderCell.jsx"],"names":[],"mappings":";AAUA;;;4CAkEC;;;;;;;;;;;sBA5EqB,YAAY"}
|
|
@@ -17,13 +17,13 @@ function HeaderCell({ column, popoverButtonRef }) {
|
|
|
17
17
|
getValue: () => column.field.type !== FieldType.ACTION_FIELD_TYPE
|
|
18
18
|
? column.categorizedHeaderLabel
|
|
19
19
|
: undefined
|
|
20
|
-
} })] }), headerLabelEl && (_jsx(Tooltip, { smart: true, target: headerLabelEl, children: column.categorizedHeaderLabel })), headerIcons && (_jsxs(_Fragment, { children: [_jsx(RenderingEngine, { formatter: false, ...column.getRenderingEngineProps(), context: {
|
|
20
|
+
} })] }), headerLabelEl && (_jsx(Tooltip, { smart: true, target: headerLabelEl, children: column.categorizedHeaderLabel })), headerIcons && (_jsxs(_Fragment, { children: [column.filtered && (_jsx(RenderingEngine, { formatter: false, ...column.getRenderingEngineProps(), context: {
|
|
21
21
|
getRendererType: () => 'filterRenderer',
|
|
22
22
|
showTooltip: () => false
|
|
23
|
-
} }), _jsx(RenderingEngine, { formatter: false, ...column.getRenderingEngineProps(), context: {
|
|
23
|
+
} })), column.sorted && (_jsx(RenderingEngine, { formatter: false, ...column.getRenderingEngineProps(), context: {
|
|
24
24
|
getRendererType: () => 'sortRenderer',
|
|
25
25
|
showTooltip: () => false
|
|
26
|
-
} })] }))] }), column.field.showMenu && headerIcons && (_jsx("div", { className: 'icons-ph', children: _jsx(HeaderMenu, { column: column, popoverButtonRef: popoverButtonRef }) })), column.field.resize && _jsx(HeaderCellResizer, { column: column })] }));
|
|
26
|
+
} }))] }))] }), column.field.showMenu && headerIcons && (_jsx("div", { className: 'icons-ph', children: _jsx(HeaderMenu, { column: column, popoverButtonRef: popoverButtonRef }) })), column.field.resize && _jsx(HeaderCellResizer, { column: column })] }));
|
|
27
27
|
}
|
|
28
28
|
HeaderCell.propTypes = {
|
|
29
29
|
column: PropTypes.objectOf(PropTypes.any).isRequired,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderCell.js","sourceRoot":"","sources":["../../../Core/Components/HeaderCell.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,OAAO,E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UAAU,CAAC","sourcesContent":["import PropTypes from 'prop-types';\n\nimport { Tooltip, useElement } from '@pega/cosmos-react-core';\nimport { FieldType } from 'pega-repeating-structures-core';\n\nimport HeaderCellResizer from './ColumnResizer';\nimport RenderingEngine from './RenderingEngine/RenderCell';\nimport FieldTypeIcon from './FieldTypeIcon';\nimport HeaderMenu from './HeaderMenu';\n\nfunction HeaderCell({ column, popoverButtonRef }) {\n const isSmallOrAbove = column.parent.state?.responsive?.sm;\n const headerIcons = !!isSmallOrAbove;\n const [headerLabelEl, setheaderLabelEl] = useElement(null);\n return (\n <>\n <div className='header-lable-container'>\n <div\n className='header-label'\n aria-hidden\n data-testid='header-label'\n {...(column.field.type !== FieldType.ACTION_FIELD_TYPE && column.categorizedHeaderLabel\n ? { ref: setheaderLabelEl }\n : {})}\n >\n <FieldTypeIcon column={column} />\n <RenderingEngine\n formatter={false}\n {...column.getRenderingEngineProps()}\n context={{\n getRendererType: () => 'headerCellRenderer',\n getValue: () =>\n column.field.type !== FieldType.ACTION_FIELD_TYPE\n ? column.categorizedHeaderLabel\n : undefined\n }}\n />\n </div>\n {headerLabelEl && (\n <Tooltip smart target={headerLabelEl}>\n {column.categorizedHeaderLabel}\n </Tooltip>\n )}\n {headerIcons && (\n <>\n {column.filtered && (\n <RenderingEngine\n formatter={false}\n {...column.getRenderingEngineProps()}\n context={{\n getRendererType: () => 'filterRenderer',\n showTooltip: () => false\n }}\n />\n )}\n {column.sorted && (\n <RenderingEngine\n formatter={false}\n {...column.getRenderingEngineProps()}\n context={{\n getRendererType: () => 'sortRenderer',\n showTooltip: () => false\n }}\n />\n )}\n </>\n )}\n </div>\n {column.field.showMenu && headerIcons && (\n <div className='icons-ph'>\n <HeaderMenu column={column} popoverButtonRef={popoverButtonRef} />\n </div>\n )}\n {column.field.resize && <HeaderCellResizer column={column} />}\n </>\n );\n}\n\nHeaderCell.propTypes = {\n column: PropTypes.objectOf(PropTypes.any).isRequired,\n popoverButtonRef: PropTypes.objectOf(PropTypes.any).isRequired\n};\n\nexport default HeaderCell;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function customizeColumn(column: any,
|
|
1
|
+
export function customizeColumn(column: any, rfConfig: any, displayMode: any, newColumnAlias: any, oldAlias: any): void;
|
|
2
2
|
/**
|
|
3
3
|
* This method is executed when a column is removed from the table, it sets the focus to the next
|
|
4
4
|
* column on the left, or if its the first column, then on the next column on right.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../Core/Components/HeaderMenu/actions.js"],"names":[],"mappings":"AA0BA,
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../Core/Components/HeaderMenu/actions.js"],"names":[],"mappings":"AA0BA,wHAaC;AAmDD;;;;GAIG;AACH,oCAFW,MAAM,QAahB;AAED;;;;;;UAwHC"}
|
|
@@ -18,9 +18,9 @@ function isColumnWithDateFuncGrouping(column) {
|
|
|
18
18
|
return (view.meta.dateFunctions &&
|
|
19
19
|
(column.field.type === FieldType.DATE || column.field.type === FieldType.DATE_TIME));
|
|
20
20
|
}
|
|
21
|
-
export function customizeColumn(column,
|
|
22
|
-
if (
|
|
23
|
-
column.applyFormatter(
|
|
21
|
+
export function customizeColumn(column, rfConfig, displayMode, newColumnAlias, oldAlias) {
|
|
22
|
+
if (rfConfig !== undefined) {
|
|
23
|
+
column.applyFormatter(rfConfig);
|
|
24
24
|
}
|
|
25
25
|
if (displayMode !== undefined) {
|
|
26
26
|
column.applyDisplay(displayMode);
|
|
@@ -160,7 +160,6 @@ export function getActions({ column, setMoreContent, onUndoHierarchy, translate,
|
|
|
160
160
|
icon: 'sigma',
|
|
161
161
|
label: column.aggregated ? translate('Remove aggregation') : translate('Aggregate'),
|
|
162
162
|
show: !!(column.field.aggregation &&
|
|
163
|
-
(column.field.type === FieldType.NUMBER || column.field.type === FieldType.CURRENCY) &&
|
|
164
163
|
aggregateOptions[column.field.type] &&
|
|
165
164
|
aggregateOptions[column.field.type].length),
|
|
166
165
|
onClick: () => {
|