@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickFilter.js","sourceRoot":"","sources":["../../../../Core/Components/ContextMenu/QuickFilter.js"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"QuickFilter.js","sourceRoot":"","sources":["../../../../Core/Components/ContextMenu/QuickFilter.js"],"names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,CAAC,OAAO,EAAE,CAAC;QACnD,KAAK,GAAG,IAAI,CAAC;IACf,CAAC;SAAM,IAAI,UAAU,EAAE,CAAC;QACtB,KAAK,GAAG,UAAU,IAAI,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,KAAK,GAAG,UAAU,CAAC;IACrB,CAAC;IAED,MAAM,qBAAqB,GAAG,SAAS,CAAC;QACtC,UAAU;QACV,KAAK;QACL,gBAAgB;QAChB,MAAM;KACP,CAAC,CAAC;IACH,qBAAqB,CAAC;QACpB,SAAS,EAAE,qBAAqB;KACjC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,EAAE;IACF,MAAM,OAAO,GAAG,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACjD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,mDAAmD;QACnD,oBAAoB,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACN,qBAAqB,CAAC;YACpB,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC","sourcesContent":["import get from 'lodash-es/get';\n\nimport { addFilter, getFilters, comparatorMap, FieldType } from 'pega-repeating-structures-core';\n\nimport { TOOLBAR_FEATURES } from '../../constants';\n\nconst getBooleanComparator = inputValue => {\n let comparator;\n if (inputValue?.toString().toLowerCase() === 'true') {\n comparator = comparatorMap.isTrue;\n } else if (inputValue?.toString().toLowerCase() === 'false') {\n comparator = comparatorMap.isFalse;\n } else {\n comparator = comparatorMap.isNull;\n }\n return comparator;\n};\n\nexport const quickFilterEnabled = (columns, colId) => {\n if (!colId) {\n return false;\n }\n const column = columns.find(col => col.field.id.toString() === colId.toString());\n return (\n column &&\n column.parent.shouldDisplayFeature(TOOLBAR_FEATURES.FILTER, column) &&\n !(column.field.type === FieldType.DATE || column.field.type === FieldType.DATE_TIME)\n );\n};\n\nexport const applyFilter = (\n columns,\n targetCell,\n rowContextData,\n filterExpression,\n actionColumnFiltering\n) => {\n // preparing filter object to apply equals filter\n const { colId } = targetCell.dataset;\n const column = columns.find(col => col.field.id.toString() === colId.toString());\n const inputValue = get(rowContextData, column.field.name);\n const isPickList = column.field.type === FieldType.TEXT && column.field.filterPickList;\n let comparator;\n let input;\n\n // decide the comparator based on filtered value or column type\n if (inputValue === null || inputValue === undefined) {\n comparator = comparatorMap.isNull;\n } else if (column.field.type === FieldType.BOOLEAN) {\n comparator = getBooleanComparator(inputValue);\n } else if (isPickList) {\n comparator = comparatorMap.in;\n } else {\n comparator = comparatorMap.equals;\n }\n\n // decide input value for expression rhs\n if (column.field.type === FieldType.NUMBER) {\n input = inputValue && parseFloat(inputValue);\n } else if (column.field.type === FieldType.BOOLEAN) {\n input = null;\n } else if (isPickList) {\n input = inputValue && [inputValue];\n } else {\n input = inputValue;\n }\n\n const localFilterExpression = addFilter({\n comparator,\n input,\n filterExpression,\n column\n });\n actionColumnFiltering({\n filterExp: localFilterExpression\n });\n};\n\nexport const removeFilter = (\n filterExpression,\n targetCell,\n actionColumnFiltering,\n actionClearFiltering\n) => {\n const filters = getFilters({ filterExpression });\n if (filters.length > 1) {\n // removing equals filter applied on current column\n actionClearFiltering(targetCell.dataset.colId);\n } else {\n actionColumnFiltering({\n filterExp: null\n });\n }\n};\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export default CustomCellWrapper;
|
|
2
|
-
declare const CustomCellWrapper: import("styled-components").
|
|
2
|
+
declare const CustomCellWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
3
|
//# sourceMappingURL=CustomCellWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomCellWrapper.d.ts","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.js"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"CustomCellWrapper.d.ts","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.js"],"names":[],"mappings":";AAEA,6PAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowActionMenu.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowActionMenu.jsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RowActionMenu.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowActionMenu.jsx"],"names":[],"mappings":";AAoDA;;;;4CA4DC;;;;;;;sBA/GqB,YAAY"}
|
|
@@ -13,27 +13,55 @@ const hydrateActions = (actions, rowContext, refreshRow) => {
|
|
|
13
13
|
}
|
|
14
14
|
}));
|
|
15
15
|
};
|
|
16
|
+
const isActionConfig = actionConfig => {
|
|
17
|
+
return !!actionConfig && typeof actionConfig === 'object';
|
|
18
|
+
};
|
|
19
|
+
const isVisibleInMenu = (actionConfig, rowContext) => {
|
|
20
|
+
return (isActionConfig(actionConfig) &&
|
|
21
|
+
actionConfig.placement === 'menu' &&
|
|
22
|
+
actionConfig.isVisible?.(rowContext));
|
|
23
|
+
};
|
|
24
|
+
const getConfigActions = ({ editing, deleting }, rowContext, refreshRow, translate) => {
|
|
25
|
+
const actions = [];
|
|
26
|
+
if (isVisibleInMenu(editing, rowContext) && typeof editing.onClick === 'function') {
|
|
27
|
+
actions.push({
|
|
28
|
+
text: translate('Edit'),
|
|
29
|
+
id: 'edit',
|
|
30
|
+
onClick: editing.onClick
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
if (isVisibleInMenu(deleting, rowContext) && typeof deleting.onClick === 'function') {
|
|
34
|
+
actions.push({
|
|
35
|
+
text: translate('Delete'),
|
|
36
|
+
id: 'delete',
|
|
37
|
+
onClick: deleting.onClick
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return hydrateActions(actions, rowContext, refreshRow.bind(null, rowContext));
|
|
41
|
+
};
|
|
16
42
|
function RowActionMenu({ getRsMeta, getExecutionContext, getParentContext }) {
|
|
17
43
|
const [translate] = useTranslate();
|
|
18
44
|
const { getValue, getRowActionDetails, refreshRow } = getExecutionContext();
|
|
19
45
|
const [rowActions, setRowActions] = useState([]);
|
|
20
46
|
const [actionsFetched, setActionsFetched] = useState(false);
|
|
21
47
|
const rowContext = getValue();
|
|
22
|
-
const
|
|
23
|
-
const
|
|
48
|
+
const rsMeta = getRsMeta();
|
|
49
|
+
const { rowActions: tableMetaRowActions } = rsMeta;
|
|
50
|
+
const staticActions = useMemo(() => hydrateActions(tableMetaRowActions ?? [], rowContext, refreshRow.bind(null, rowContext)), [rowContext, tableMetaRowActions]);
|
|
24
51
|
const fetchCaseDeatils = () => {
|
|
25
52
|
setActionsFetched(false);
|
|
26
53
|
const currentRowContext = getExecutionContext()?.getValue();
|
|
54
|
+
let actions = [];
|
|
55
|
+
const configActions = getConfigActions(rsMeta, rowContext, refreshRow, translate);
|
|
27
56
|
getRowActionDetails(currentRowContext)
|
|
28
57
|
.then(response => {
|
|
29
58
|
if (Array.isArray(response)) {
|
|
30
59
|
const latestRowContext = getExecutionContext()?.getValue();
|
|
31
|
-
|
|
32
|
-
const arr = [...actions, ...staticActions];
|
|
33
|
-
setRowActions(arr);
|
|
60
|
+
actions = hydrateActions(response, latestRowContext, refreshRow.bind(null, latestRowContext));
|
|
34
61
|
}
|
|
35
62
|
})
|
|
36
63
|
.finally(() => {
|
|
64
|
+
setRowActions([...configActions, ...actions, ...staticActions]);
|
|
37
65
|
setActionsFetched(true);
|
|
38
66
|
});
|
|
39
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowActionMenu.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowActionMenu.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAEvD,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE;IACzD,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC5B,GAAG,MAAM;QACT,OAAO,EAAE,MAAM,CAAC,IAAI;QACpB,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACzC,CAAC;KACF,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AAEF,SAAS,aAAa,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,EAAE;IACzE,MAAM,CAAC,SAAS,CAAC,GAAG,YAAY,EAAE,CAAC;IACnC,MAAM,EAAE,QAAQ,EAAE,mBAAmB,EAAE,UAAU,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAC5E,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,MAAM,UAAU,GAAG,QAAQ,EAAE,CAAC;IAC9B,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"RowActionMenu.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/Row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,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;YACvC,SAAS,EAAE,SAAS,CAAC,sBAAsB,CAAC;YAC5C,OAAO,EAAE,CAAC,cAAc;SACzB,gBAEC,cAAc,CAAC,CAAC,CAAC,GAAG,qBAAqB,MAAM,cAAc,EAAE,CAAC,CAAC,CAAC,GAAG,qBAAqB,EAAE,EAE9F,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAC,YAAY,EACtB,OAAO,EAAE;YACP,MAAM,EAAE,IAAI;SACb,EACD,IAAI,EAAC,MAAM,GACX,CACH,CAAC;AACJ,CAAC;AAED,aAAa,CAAC,SAAS,GAAG;IACxB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACpC,mBAAmB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAC/C,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { useState, useMemo } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { MenuButton } from '@pega/cosmos-react-core';\nimport { ROW_DENSITY } from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../../Hooks/useTranslate';\n\nconst hydrateActions = (actions, rowContext, refreshRow) => {\n return actions.map(action => ({\n ...action,\n primary: action.text,\n onClick: () => {\n action.onClick(rowContext, refreshRow);\n }\n }));\n};\n\nconst isActionConfig = actionConfig => {\n return !!actionConfig && typeof actionConfig === 'object';\n};\n\nconst isVisibleInMenu = (actionConfig, rowContext) => {\n return (\n isActionConfig(actionConfig) &&\n actionConfig.placement === 'menu' &&\n actionConfig.isVisible?.(rowContext)\n );\n};\n\nconst getConfigActions = ({ editing, deleting }, rowContext, refreshRow, translate) => {\n const actions = [];\n\n if (isVisibleInMenu(editing, rowContext) && typeof editing.onClick === 'function') {\n actions.push({\n text: translate('Edit'),\n id: 'edit',\n onClick: editing.onClick\n });\n }\n\n if (isVisibleInMenu(deleting, rowContext) && typeof deleting.onClick === 'function') {\n actions.push({\n text: translate('Delete'),\n id: 'delete',\n onClick: deleting.onClick\n });\n }\n\n return hydrateActions(actions, rowContext, refreshRow.bind(null, rowContext));\n};\n\nfunction RowActionMenu({ getRsMeta, getExecutionContext, getParentContext }) {\n const [translate] = useTranslate();\n const { getValue, getRowActionDetails, refreshRow } = getExecutionContext();\n const [rowActions, setRowActions] = useState([]);\n const [actionsFetched, setActionsFetched] = useState(false);\n const rowContext = getValue();\n const rsMeta = getRsMeta();\n const { rowActions: tableMetaRowActions } = rsMeta;\n const staticActions = useMemo(\n () => hydrateActions(tableMetaRowActions ?? [], rowContext, refreshRow.bind(null, rowContext)),\n [rowContext, tableMetaRowActions]\n );\n\n const fetchCaseDeatils = () => {\n setActionsFetched(false);\n const currentRowContext = getExecutionContext()?.getValue();\n let actions = [];\n const configActions = getConfigActions(rsMeta, rowContext, refreshRow, translate);\n getRowActionDetails(currentRowContext)\n .then(response => {\n if (Array.isArray(response)) {\n const latestRowContext = getExecutionContext()?.getValue();\n actions = hydrateActions(\n response,\n latestRowContext,\n refreshRow.bind(null, latestRowContext)\n );\n }\n })\n .finally(() => {\n setRowActions([...configActions, ...actions, ...staticActions]);\n setActionsFetched(true);\n });\n };\n const rowHeaderValue = getExecutionContext().getRowHeader()?.getValue();\n const translatedActionsText = translate('Actions');\n\n return (\n <MenuButton\n text={translatedActionsText}\n iconOnly\n variant='simple'\n compact={getParentContext().getRowDensity() === ROW_DENSITY.SHORT}\n tabIndex={-1}\n menu={{\n items: actionsFetched ? rowActions : [],\n emptyText: translate('No actions available'),\n loading: !actionsFetched\n }}\n aria-label={\n rowHeaderValue ? `${translatedActionsText} - ${rowHeaderValue}` : `${translatedActionsText}`\n }\n onClick={fetchCaseDeatils}\n placement='bottom-end'\n popover={{\n portal: true\n }}\n icon='more'\n />\n );\n}\n\nRowActionMenu.propTypes = {\n getRsMeta: PropTypes.func.isRequired,\n getExecutionContext: PropTypes.func.isRequired\n};\n\nexport default RowActionMenu;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
2
|
+
interface RowDeleteProps {
|
|
3
|
+
getExecutionContext: RsCoreTypes.ColumnContext['getExecutionContext'];
|
|
4
|
+
getRsMeta: () => ReturnType<RsCoreTypes.ColumnContext['getRsMeta']> & {
|
|
5
|
+
deleting: RsCoreTypes.ActionConfig;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
declare function RowDeleteAction({ getExecutionContext, getRsMeta }: RowDeleteProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default RowDeleteAction;
|
|
10
|
+
//# sourceMappingURL=RowDeleteAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RowDeleteAction.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAIlE,UAAU,cAAc;IACtB,mBAAmB,EAAE,WAAW,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACtE,SAAS,EAAE,MAAM,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,GAAG;QACpE,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC;KACpC,CAAC;CACH;AAYD,iBAAS,eAAe,CAAC,EAAE,mBAAmB,EAAE,SAAS,EAAE,EAAE,cAAc,2CAiC1E;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { Button, Icon } from '@pega/cosmos-react-core';
|
|
4
|
+
import useTranslate from '../../../Hooks/useTranslate';
|
|
5
|
+
const StyledButton = styled(Button)(({ $isVisible }) => css `
|
|
6
|
+
visibility: ${$isVisible ? 'visible' : 'hidden'};
|
|
7
|
+
`);
|
|
8
|
+
function RowDeleteAction({ getExecutionContext, getRsMeta }) {
|
|
9
|
+
const [translate] = useTranslate();
|
|
10
|
+
const executionContext = getExecutionContext();
|
|
11
|
+
const rowContext = executionContext?.getValue();
|
|
12
|
+
const rowHeaderValue = executionContext?.getRowHeader?.()?.getValue();
|
|
13
|
+
const deleteText = translate('Delete this row');
|
|
14
|
+
const deletingConfig = getRsMeta().deleting;
|
|
15
|
+
// RowDelete renderer only mounts for delete-column configuration.
|
|
16
|
+
const isVisibleFromMeta = rowContext ? deletingConfig.isVisible(rowContext) : false;
|
|
17
|
+
const handleDelete = () => {
|
|
18
|
+
if (!rowContext) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
// RowDelete uses action-config callback for delete behavior.
|
|
22
|
+
deletingConfig.onClick(rowContext, executionContext?.refreshRow);
|
|
23
|
+
};
|
|
24
|
+
return (_jsx(StyledButton, { variant: 'simple', icon: true, "$isVisible": isVisibleFromMeta, ...(!isVisibleFromMeta && { tabIndex: -1 }), label: deleteText, "aria-label": rowHeaderValue ? `${deleteText} - ${rowHeaderValue}` : deleteText, onClick: isVisibleFromMeta ? handleDelete : undefined, children: _jsx(Icon, { name: 'trash' }) }));
|
|
25
|
+
}
|
|
26
|
+
export default RowDeleteAction;
|
|
27
|
+
//# sourceMappingURL=RowDeleteAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RowDeleteAction.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/RowDeleteAction.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAavD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CACjC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;kBACP,UAAU,CAAC,CAA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,eAAe,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { Button, Icon } from '@pega/cosmos-react-core';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport useTranslate from '../../../Hooks/useTranslate';\n\ninterface RowDeleteProps {\n getExecutionContext: RsCoreTypes.ColumnContext['getExecutionContext'];\n getRsMeta: () => ReturnType<RsCoreTypes.ColumnContext['getRsMeta']> & {\n deleting: RsCoreTypes.ActionConfig;\n };\n}\n\ninterface StyledButtonProps {\n $isVisible: boolean;\n}\n\nconst StyledButton = styled(Button)<StyledButtonProps>(\n ({ $isVisible }) => css`\n visibility: ${$isVisible ? 'visible' : 'hidden'};\n `\n);\n\nfunction RowDeleteAction({ getExecutionContext, getRsMeta }: RowDeleteProps) {\n const [translate] = useTranslate();\n const executionContext = getExecutionContext();\n const rowContext = executionContext?.getValue();\n const rowHeaderValue = executionContext?.getRowHeader?.()?.getValue();\n const deleteText = translate('Delete this row');\n const deletingConfig = getRsMeta().deleting;\n\n // RowDelete renderer only mounts for delete-column configuration.\n const isVisibleFromMeta = rowContext ? deletingConfig.isVisible(rowContext) : false;\n\n const handleDelete = () => {\n if (!rowContext) {\n return;\n }\n\n // RowDelete uses action-config callback for delete behavior.\n deletingConfig.onClick(rowContext, executionContext?.refreshRow);\n };\n\n return (\n <StyledButton\n variant='simple'\n icon\n $isVisible={isVisibleFromMeta}\n {...(!isVisibleFromMeta && { tabIndex: -1 })}\n label={deleteText}\n aria-label={rowHeaderValue ? `${deleteText} - ${rowHeaderValue}` : deleteText}\n onClick={isVisibleFromMeta ? handleDelete : undefined}\n >\n <Icon name='trash' />\n </StyledButton>\n );\n}\n\nexport default RowDeleteAction;\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
Operator: typeof Operator;
|
|
3
|
-
cellEditRenderer: typeof Editor;
|
|
4
3
|
RowActionMenu: typeof RowActionMenu;
|
|
5
4
|
RowDragDropHandle: typeof RowDragDropHandle;
|
|
6
5
|
RowSelectHandle: import("react").MemoExoticComponent<{
|
|
@@ -16,6 +15,7 @@ declare const _default: {
|
|
|
16
15
|
};
|
|
17
16
|
}>;
|
|
18
17
|
RowError: typeof RowError;
|
|
18
|
+
RowDeleteAction: typeof RowDeleteAction;
|
|
19
19
|
'Text-Default': typeof DefaultTextRenderer;
|
|
20
20
|
comma: typeof import("./ColumnMergeTemplates/Comma").default;
|
|
21
21
|
space: typeof import("./ColumnMergeTemplates/Space").default;
|
|
@@ -40,10 +40,10 @@ declare const _default: {
|
|
|
40
40
|
};
|
|
41
41
|
export default _default;
|
|
42
42
|
import Operator from './Operator';
|
|
43
|
-
import Editor from './EditComponents';
|
|
44
43
|
import RowActionMenu from './RowActionMenu';
|
|
45
44
|
import RowDragDropHandle from './RowDragDropHandle';
|
|
46
45
|
import RowError from './RowError';
|
|
46
|
+
import RowDeleteAction from './RowDeleteAction';
|
|
47
47
|
import DefaultTextRenderer from './DefaultTextRenderer';
|
|
48
48
|
import CustomCell from './CustomCell';
|
|
49
49
|
import RichText from './RichText';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAKqB,YAAY;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAKqB,YAAY;0BAEP,iBAAiB;8BACb,qBAAqB;qBAG9B,YAAY;4BACL,mBAAmB;gCAFf,uBAAuB;uBAPhC,cAAc;qBAFhB,YAAY;uBACV,cAAc"}
|
|
@@ -5,12 +5,12 @@ import CustomCell from './CustomCell';
|
|
|
5
5
|
import Link from './Link';
|
|
6
6
|
import Operator from './Operator';
|
|
7
7
|
import templates from './ColumnMergeTemplates';
|
|
8
|
-
import Editor from './EditComponents';
|
|
9
8
|
import RowActionMenu from './RowActionMenu';
|
|
10
9
|
import RowDragDropHandle from './RowDragDropHandle';
|
|
11
10
|
import RowSelectHandle from './RowSelectHandle';
|
|
12
11
|
import DefaultTextRenderer from './DefaultTextRenderer';
|
|
13
12
|
import RowError from './RowError';
|
|
13
|
+
import RowDeleteAction from './RowDeleteAction';
|
|
14
14
|
export default {
|
|
15
15
|
cellRenderer: Cell,
|
|
16
16
|
customCellRenderer: CustomCell,
|
|
@@ -19,11 +19,11 @@ export default {
|
|
|
19
19
|
...Link,
|
|
20
20
|
...templates,
|
|
21
21
|
Operator,
|
|
22
|
-
cellEditRenderer: Editor,
|
|
23
22
|
RowActionMenu,
|
|
24
23
|
RowDragDropHandle,
|
|
25
24
|
RowSelectHandle,
|
|
26
25
|
RowError,
|
|
26
|
+
RowDeleteAction,
|
|
27
27
|
'Text-Default': DefaultTextRenderer
|
|
28
28
|
};
|
|
29
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/index.js"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../Core/Components/DefaultComponents/CellRenderers/index.js"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,eAAe;IACb,YAAY,EAAE,IAAI;IAClB,kBAAkB,EAAE,UAAU;IAC9B,QAAQ;IACR,UAAU;IACV,GAAG,IAAI;IACP,GAAG,SAAS;IACZ,QAAQ;IACR,aAAa;IACb,iBAAiB;IACjB,eAAe;IACf,QAAQ;IACR,eAAe;IACf,cAAc,EAAE,mBAAmB;CACpC,CAAC","sourcesContent":["import Cell from './Cell';\nimport RichText from './RichText';\nimport CheckCross from './CheckCross';\nimport CustomCell from './CustomCell';\nimport Link from './Link';\nimport Operator from './Operator';\nimport templates from './ColumnMergeTemplates';\nimport RowActionMenu from './RowActionMenu';\nimport RowDragDropHandle from './RowDragDropHandle';\nimport RowSelectHandle from './RowSelectHandle';\nimport DefaultTextRenderer from './DefaultTextRenderer';\nimport RowError from './RowError';\nimport RowDeleteAction from './RowDeleteAction';\n\nexport default {\n cellRenderer: Cell,\n customCellRenderer: CustomCell,\n RichText,\n CheckCross,\n ...Link,\n ...templates,\n Operator,\n RowActionMenu,\n RowDragDropHandle,\n RowSelectHandle,\n RowError,\n RowDeleteAction,\n 'Text-Default': DefaultTextRenderer\n};\n"]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export default EmptyContainer;
|
|
2
|
-
declare function EmptyContainer({ message }: {
|
|
2
|
+
declare function EmptyContainer({ message, shouldAnnounce, domContainer }: {
|
|
3
3
|
message: any;
|
|
4
|
+
shouldAnnounce: any;
|
|
5
|
+
domContainer: any;
|
|
4
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
//# sourceMappingURL=EmptyContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"EmptyContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAuBA;;;;4CAqBC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { defaultThemeProp, EmptyState, useLiveLog } from '@pega/cosmos-react-core';
|
|
4
5
|
import TestIdConstants from '../TestIdConstants';
|
|
5
6
|
const EmptyContainerStyle = styled.div `
|
|
6
7
|
position: absolute;
|
|
@@ -16,7 +17,15 @@ const EmptyContainerStyle = styled.div `
|
|
|
16
17
|
overflow: hidden;
|
|
17
18
|
`;
|
|
18
19
|
EmptyContainerStyle.defaultProps = defaultThemeProp;
|
|
19
|
-
const EmptyContainer = ({ message }) => {
|
|
20
|
+
const EmptyContainer = ({ message, shouldAnnounce, domContainer }) => {
|
|
21
|
+
const { announcePolite } = useLiveLog();
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (shouldAnnounce &&
|
|
24
|
+
typeof document !== 'undefined' &&
|
|
25
|
+
domContainer?.contains(document.activeElement)) {
|
|
26
|
+
announcePolite({ message });
|
|
27
|
+
}
|
|
28
|
+
}, [shouldAnnounce, message, announcePolite, domContainer]);
|
|
20
29
|
return (_jsx(EmptyContainerStyle, { "data-test-id": TestIdConstants.noRecords, "data-testid": TestIdConstants.noRecords, children: _jsx(EmptyState, { message: message }) }));
|
|
21
30
|
};
|
|
22
31
|
export default EmptyContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyContainer.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"EmptyContainer.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/EmptyContainer.jsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEnF,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAEjD,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;gBAUtB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;;CAEtE,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEpD,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,EAAE;IACnE,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IAExC,SAAS,CAAC,GAAG,EAAE;QACb,IACE,cAAc;YACd,OAAO,QAAQ,KAAK,WAAW;YAC/B,YAAY,EAAE,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC9C,CAAC;YACD,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;IAE5D,OAAO,CACL,KAAC,mBAAmB,oBACJ,eAAe,CAAC,SAAS,iBAC1B,eAAe,CAAC,SAAS,YAEtC,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,GAAI,GACZ,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import styled from 'styled-components';\nimport { useEffect } from 'react';\n\nimport { defaultThemeProp, EmptyState, useLiveLog } from '@pega/cosmos-react-core';\n\nimport TestIdConstants from '../TestIdConstants';\n\nconst EmptyContainerStyle = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n top: var(--row-height, 0);\n left: 0;\n right: 0;\n bottom: 0;\n background: ${props => props.theme.base.palette['primary-background']};\n overflow: hidden;\n`;\n\nEmptyContainerStyle.defaultProps = defaultThemeProp;\n\nconst EmptyContainer = ({ message, shouldAnnounce, domContainer }) => {\n const { announcePolite } = useLiveLog();\n\n useEffect(() => {\n if (\n shouldAnnounce &&\n typeof document !== 'undefined' &&\n domContainer?.contains(document.activeElement)\n ) {\n announcePolite({ message });\n }\n }, [shouldAnnounce, message, announcePolite, domContainer]);\n\n return (\n <EmptyContainerStyle\n data-test-id={TestIdConstants.noRecords}\n data-testid={TestIdConstants.noRecords}\n >\n <EmptyState message={message} />\n </EmptyContainerStyle>\n );\n};\n\nexport default EmptyContainer;\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
declare function PersonalizationCreateEdit({ view, onFinish, editing }: {
|
|
1
|
+
declare function PersonalizationCreateEdit({ view, onFinish, editing, target }: {
|
|
2
2
|
view: any;
|
|
3
3
|
onFinish: any;
|
|
4
4
|
editing?: boolean | undefined;
|
|
5
|
+
target: any;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
declare namespace PersonalizationCreateEdit {
|
|
7
8
|
namespace propTypes {
|
|
@@ -10,6 +11,7 @@ declare namespace PersonalizationCreateEdit {
|
|
|
10
11
|
[x: string]: any;
|
|
11
12
|
}>;
|
|
12
13
|
let editing: PropTypes.Requireable<boolean>;
|
|
14
|
+
let target: PropTypes.Requireable<Element>;
|
|
13
15
|
}
|
|
14
16
|
namespace defaultProps {
|
|
15
17
|
export function onFinish_1(): void;
|
|
@@ -19,6 +21,5 @@ declare namespace PersonalizationCreateEdit {
|
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
export default PersonalizationCreateEdit;
|
|
22
|
-
export const StyledModalContent: import("styled-components").StyledComponent<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").FlexProps>, import("styled-components").DefaultTheme, {}, never>;
|
|
23
24
|
import PropTypes from 'prop-types';
|
|
24
25
|
//# sourceMappingURL=PersonalizationCreateEdit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonalizationCreateEdit.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PersonalizationCreateEdit.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":"AAOA;;;;;4CAqHC;;;;;;;;;;;QAUW,mCAAQ;;;;;;;sBArIE,YAAY"}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect, useMemo, useRef } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import
|
|
5
|
-
import { Flex, Button, Input, Checkbox, Text } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Flex, Input, Checkbox, FormDialog } from '@pega/cosmos-react-core';
|
|
6
5
|
import useTranslate from '../../Hooks/useTranslate';
|
|
7
|
-
export
|
|
8
|
-
return css `
|
|
9
|
-
position: relative;
|
|
10
|
-
padding: 1.25rem;
|
|
11
|
-
overflow: auto;
|
|
12
|
-
`;
|
|
13
|
-
});
|
|
14
|
-
export default function PersonalizationCreateEdit({ view, onFinish, editing = false }) {
|
|
6
|
+
export default function PersonalizationCreateEdit({ view, onFinish, editing = false, target }) {
|
|
15
7
|
const { state: { personalization }, meta: { nonPersonalizationViewName } } = view;
|
|
16
8
|
const personalizationNames = useMemo(() => {
|
|
17
9
|
const personalizations = personalization?.allPersonalizations || {};
|
|
@@ -32,17 +24,7 @@ export default function PersonalizationCreateEdit({ view, onFinish, editing = fa
|
|
|
32
24
|
const viewAlreadyPresentError = translate('This view is already present.');
|
|
33
25
|
const viewNameEmptyError = translate('This view name cannot be empty.');
|
|
34
26
|
const viewNameMaxLengthError = translate('View name must contain less than 65 characters.');
|
|
35
|
-
|
|
36
|
-
// but will be a no-op if undefined or null
|
|
37
|
-
const [markAsDefault, setMarkAsDefault] = useState(() => {
|
|
38
|
-
if (!editing) {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
if (editing && personalization.defaultPersonalization === personalization.active) {
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
return null;
|
|
45
|
-
});
|
|
27
|
+
const [markAsDefault, setMarkAsDefault] = useState(!!(editing && personalization.defaultPersonalization === personalization.active));
|
|
46
28
|
useEffect(() => {
|
|
47
29
|
if (viewName && viewName.toLowerCase() === nonPersonalizationViewName.toLowerCase()) {
|
|
48
30
|
setError(defaultNameError);
|
|
@@ -79,21 +61,26 @@ export default function PersonalizationCreateEdit({ view, onFinish, editing = fa
|
|
|
79
61
|
return;
|
|
80
62
|
}
|
|
81
63
|
if (editing) {
|
|
82
|
-
view.type.editPersonalization(personalization.active, trimmedName,
|
|
64
|
+
view.type.editPersonalization(personalization.active, trimmedName,
|
|
65
|
+
// markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false
|
|
66
|
+
// but will be a no-op if undefined or null
|
|
67
|
+
markAsDefault || null, isAppDefaultView);
|
|
83
68
|
}
|
|
84
69
|
else {
|
|
85
|
-
|
|
70
|
+
// markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false
|
|
71
|
+
// but will be a no-op if undefined or null
|
|
72
|
+
view.type.createPersonalization(trimmedName, markAsDefault || null);
|
|
86
73
|
}
|
|
87
74
|
onFinish();
|
|
88
75
|
return undefined;
|
|
89
76
|
};
|
|
90
|
-
|
|
91
|
-
return (_jsx(Flex, { as: StyledModalContent, container: { direction: 'column' }, item: { grow: 1 }, children: _jsxs(Flex, { container: { direction: 'column', itemGap: 2 }, children: [_jsx(Text, { variant: 'h2', className: 'modalHeader', children: heading }), _jsx(Input, { ref: viewNameRef, name: 'viewName', required: true, label: translate('View name'), autoComplete: 'off', status: error ? 'error' : null, info: error, value: viewName, onChange: onChange }), !(editing && isAppDefaultView) && (_jsx(Checkbox, { checked: markAsDefault, label: translate('Mark as default?'), required: false, disabled: false, onChange: () => setMarkAsDefault(curState => !curState) })), _jsxs(Flex, { container: { alignContent: 'center', justify: 'between' }, className: 'modalFooter', children: [_jsx(Button, { onClick: onFinish, children: translate('Cancel') }), _jsx("div", { children: _jsx(Button, { variant: 'primary', onClick: onSubmit, children: translate('Submit') }) })] })] }) }));
|
|
77
|
+
return (_jsx(FormDialog, { heading: translate(editing ? 'Edit customized view' : 'Add customized view'), onCancel: onFinish, onSubmit: onSubmit, target: target, children: _jsxs(Flex, { container: { direction: 'column', gap: 2 }, children: [_jsx(Input, { ref: viewNameRef, name: 'viewName', required: true, label: translate('View name'), autoComplete: 'off', status: error ? 'error' : undefined, info: error, value: viewName, onChange: onChange }), !(editing && isAppDefaultView) && (_jsx(Checkbox, { checked: markAsDefault, label: translate('Always show this view first'), onChange: () => setMarkAsDefault(curState => !curState) }))] }) }));
|
|
92
78
|
}
|
|
93
79
|
PersonalizationCreateEdit.propTypes = {
|
|
94
80
|
onFinish: PropTypes.func,
|
|
95
81
|
view: PropTypes.objectOf(PropTypes.any).isRequired,
|
|
96
|
-
editing: PropTypes.bool
|
|
82
|
+
editing: PropTypes.bool,
|
|
83
|
+
target: PropTypes.instanceOf(Element)
|
|
97
84
|
};
|
|
98
85
|
PersonalizationCreateEdit.defaultProps = {
|
|
99
86
|
onFinish: () => { },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonalizationCreateEdit.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,SAAS,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"PersonalizationCreateEdit.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationCreateEdit.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE5E,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAEpD,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,KAAK,EAAE,MAAM,EAAE;IAC3F,MAAM,EACJ,KAAK,EAAE,EAAE,eAAe,EAAE,EAC1B,IAAI,EAAE,EAAE,0BAA0B,EAAE,EACrC,GAAG,IAAI,CAAC;IACT,MAAM,oBAAoB,GAAG,OAAO,CAAC,GAAG,EAAE;QACxC,MAAM,gBAAgB,GAAG,eAAe,EAAE,mBAAmB,IAAI,EAAE,CAAC;QACpE,OAAO,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9F,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IACtB,MAAM,CAAC,SA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o, useRef } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Flex, Input, Checkbox, FormDialog } from '@pega/cosmos-react-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\n\nexport default function PersonalizationCreateEdit({ view, onFinish, editing = false, target }) {\n const {\n state: { personalization },\n meta: { nonPersonalizationViewName }\n } = view;\n const personalizationNames = useMemo(() => {\n const personalizations = personalization?.allPersonalizations || {};\n return Object.keys(personalizations).map(key => personalizations[key]?.name?.toLowerCase());\n }, [personalization]);\n const [translate] = useTranslate();\n const currentPersonalization = personalization?.allPersonalizations?.[personalization.active];\n const currentPersonalizationName = currentPersonalization?.name;\n const isAppDefaultView = personalization.active === 'APP_DEFAULT';\n const [viewName, setViewName] = useState(() => {\n if (editing) return currentPersonalizationName;\n return '';\n });\n const [error, setError] = useState();\n const viewNameRef = useRef(null);\n const defaultNameError = `${nonPersonalizationViewName} ${translate(\n 'name is reserved for non Personalized view and cannot be used.'\n )}`;\n const viewAlreadyPresentError = translate('This view is already present.');\n const viewNameEmptyError = translate('This view name cannot be empty.');\n const viewNameMaxLengthError = translate('View name must contain less than 65 characters.');\n const [markAsDefault, setMarkAsDefault] = useState(\n !!(editing && personalization.defaultPersonalization === personalization.active)\n );\n\n useEffect(() => {\n if (viewName && viewName.toLowerCase() === nonPersonalizationViewName.toLowerCase()) {\n setError(defaultNameError);\n return;\n }\n if (\n personalizationNames.includes(viewName?.trim().toLowerCase()) &&\n !(editing && viewName.trim() === currentPersonalizationName)\n ) {\n setError(viewAlreadyPresentError);\n return;\n }\n if (viewName?.length > 64) {\n setError(viewNameMaxLengthError);\n return;\n }\n setError(null);\n }, [\n defaultNameError,\n currentPersonalizationName,\n editing,\n nonPersonalizationViewName,\n personalizationNames,\n viewName,\n viewAlreadyPresentError,\n viewNameMaxLengthError\n ]);\n\n const onChange = e => {\n setViewName(e.target.value);\n };\n\n const onSubmit = () => {\n const trimmedName = viewName.trim();\n if (!trimmedName) {\n viewNameRef.current.focus();\n setError(viewNameEmptyError);\n return;\n }\n if (editing) {\n view.type.editPersonalization(\n personalization.active,\n trimmedName,\n // markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false\n // but will be a no-op if undefined or null\n markAsDefault || null,\n isAppDefaultView\n );\n } else {\n // markAsDefault is meant to be null rather than false as APIS will remove the default if it sees false\n // but will be a no-op if undefined or null\n view.type.createPersonalization(trimmedName, markAsDefault || null);\n }\n\n onFinish();\n return undefined;\n };\n\n return (\n <FormDialog\n heading={translate(editing ? 'Edit customized view' : 'Add customized view')}\n onCancel={onFinish}\n onSubmit={onSubmit}\n target={target}\n >\n <Flex container={{ direction: 'column', gap: 2 }}>\n <Input\n ref={viewNameRef}\n name='viewName'\n required\n label={translate('View name')}\n autoComplete='off'\n status={error ? 'error' : undefined}\n info={error}\n value={viewName}\n onChange={onChange}\n />\n\n {!(editing && isAppDefaultView) && (\n <Checkbox\n checked={markAsDefault}\n label={translate('Always show this view first')}\n onChange={() => setMarkAsDefault(curState => !curState)}\n />\n )}\n </Flex>\n </FormDialog>\n );\n}\n\nPersonalizationCreateEdit.propTypes = {\n onFinish: PropTypes.func,\n view: PropTypes.objectOf(PropTypes.any).isRequired,\n editing: PropTypes.bool,\n target: PropTypes.instanceOf(Element)\n};\n\nPersonalizationCreateEdit.defaultProps = {\n onFinish: () => {},\n editing: false\n};\n"]}
|
|
@@ -10,10 +10,10 @@ export default function PersonalizationDeleteConfirmation(props) {
|
|
|
10
10
|
dismiss();
|
|
11
11
|
}, [onSubmit, dismiss]);
|
|
12
12
|
const modalProps = {
|
|
13
|
-
heading: translate('Delete view'),
|
|
13
|
+
heading: translate('Delete customized view'),
|
|
14
14
|
actions: (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: dismiss, children: translate('No') }), _jsx(Button, { variant: 'primary', onClick: onSubmitAction, children: translate('Yes') })] }))
|
|
15
15
|
};
|
|
16
|
-
return (_jsx(Modal, { heading: modalProps.heading, actions: modalProps.actions, children: _jsx(Text, { children: `${translate('Are you sure you want to delete view')} ${currentActiveViewName}?` }) }));
|
|
16
|
+
return (_jsx(Modal, { heading: modalProps.heading, actions: modalProps.actions, children: _jsx(Text, { children: `${translate('Are you sure you want to delete customized view')} ${currentActiveViewName}?` }) }));
|
|
17
17
|
}
|
|
18
18
|
PersonalizationDeleteConfirmation.propTypes = {
|
|
19
19
|
currentActiveViewName: PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonalizationDeleteConfirmation.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/E,MAAM,CAAC,OAAO,UAAU,iCAAiC,CAAC,KAAK;IAC7D,MAAM,EAAE,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC7D,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,EAAE,CAAC;IAEtC,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE;QACtC,QAAQ,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;IACZ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAExB,MAAM,UAAU,GAAG;QACjB,OAAO,EAAE,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"PersonalizationDeleteConfirmation.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/E,MAAM,CAAC,OAAO,UAAU,iCAAiC,CAAC,KAAK;IAC7D,MAAM,EAAE,QAAQ,EAAE,qBAAqB,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC7D,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,EAAE,CAAC;IAEtC,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE;QACtC,QAAQ,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;IACZ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAExB,MAAM,UAAU,GAAG;QACjB,OAAO,EAAE,SAAS,CAAC,wBAAwB,CAAC;QAC5C,OAAO,EAAE,CACP,8BACE,KAAC,MAAM,IAAC,OAAO,EAAE,OAAO,YAAG,SAAS,CAAC,IAAI,CAAC,GAAU,EACpD,KAAC,MAAM,IAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,cAAc,YAC9C,SAAS,CAAC,KAAK,CAAC,GACV,IACR,CACJ;KACF,CAAC;IAEF,OAAO,CACL,KAAC,KAAK,IAAC,OAAO,EAAE,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,YAC7D,KAAC,IAAI,cAAE,GAAG,SAAS,CAAC,iDAAiD,CAAC,IAAI,qBAAqB,GAAG,GAAQ,GACpG,CACT,CAAC;AACJ,CAAC;AAED,iCAAiC,CAAC,SAAS,GAAG;IAC5C,qBAAqB,EAAE,SAAS,CAAC,MAAM;IACvC,QAAQ,EAAE,SAAS,CAAC,IAAI;CACzB,CAAC;AAEF,iCAAiC,CAAC,YAAY,GAAG;IAC/C,qBAAqB,EAAE,EAAE;IACzB,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;CACnB,CAAC","sourcesContent":["import { useCallback } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Text, Button, Modal, useModalContext } from '@pega/cosmos-react-core';\n\nexport default function PersonalizationDeleteConfirmation(props) {\n const { onSubmit, currentActiveViewName, translate } = props;\n const { dismiss } = useModalContext();\n\n const onSubmitAction = useCallback(() => {\n onSubmit();\n dismiss();\n }, [onSubmit, dismiss]);\n\n const modalProps = {\n heading: translate('Delete customized view'),\n actions: (\n <>\n <Button onClick={dismiss}>{translate('No')}</Button>\n <Button variant='primary' onClick={onSubmitAction}>\n {translate('Yes')}\n </Button>\n </>\n )\n };\n\n return (\n <Modal heading={modalProps.heading} actions={modalProps.actions}>\n <Text>{`${translate('Are you sure you want to delete customized view')} ${currentActiveViewName}?`}</Text>\n </Modal>\n );\n}\n\nPersonalizationDeleteConfirmation.propTypes = {\n currentActiveViewName: PropTypes.string,\n onSubmit: PropTypes.func\n};\n\nPersonalizationDeleteConfirmation.defaultProps = {\n currentActiveViewName: '',\n onSubmit: () => {}\n};\n"]}
|
|
@@ -18,8 +18,6 @@ export function usePersonalizationSelector({ personalization, nonPersonalization
|
|
|
18
18
|
}): {
|
|
19
19
|
actions: never[][];
|
|
20
20
|
activePersonalizationName: any;
|
|
21
|
-
defaultId: undefined;
|
|
22
|
-
appDefaultId: undefined;
|
|
23
21
|
};
|
|
24
22
|
import PropTypes from 'prop-types';
|
|
25
23
|
//# sourceMappingURL=PersonalizationSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonalizationSelector.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationSelector.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PersonalizationSelector.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/PersonalizationSelector.jsx"],"names":[],"mappings":"AA+GA;;4CAYC;;;;;;;;;AAtFM;;;;;;;;;EAwEN;sBA7GqB,YAAY"}
|
|
@@ -36,16 +36,12 @@ export const usePersonalizationSelector = ({ personalization, nonPersonalization
|
|
|
36
36
|
name: personalizations[key]?.name,
|
|
37
37
|
isPreset: personalizations[key]?.isPreset
|
|
38
38
|
}));
|
|
39
|
-
let defaultId;
|
|
40
|
-
let appDefaultId;
|
|
41
39
|
const primaryName = option => {
|
|
42
40
|
if (option.id === 'APP_DEFAULT') {
|
|
43
|
-
appDefaultId = option.id;
|
|
44
41
|
return `${option.name} (app default)`;
|
|
45
42
|
// eslint-disable-next-line no-else-return
|
|
46
43
|
}
|
|
47
44
|
else if (option.id === defaultPersonalization) {
|
|
48
|
-
defaultId = option.id;
|
|
49
45
|
return `${option.name} (default)`;
|
|
50
46
|
}
|
|
51
47
|
else {
|
|
@@ -62,13 +58,19 @@ export const usePersonalizationSelector = ({ personalization, nonPersonalization
|
|
|
62
58
|
personalisationClicked(option, personalization, actionPersonalizationSetActive, activePersonalizationName, create, translate);
|
|
63
59
|
}
|
|
64
60
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
acc[
|
|
61
|
+
// If this is the default personalization,
|
|
62
|
+
// place it at the beginning of the preset personalizations (acc[0])
|
|
63
|
+
if (option.id === defaultPersonalization) {
|
|
64
|
+
acc[0].unshift(obj);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
// Preset personalizations go into acc[0],
|
|
68
|
+
// custom personalizations go into acc[1]
|
|
69
|
+
(option.isPreset ? acc[0] : acc[1]).push(obj);
|
|
70
|
+
}
|
|
69
71
|
return acc;
|
|
70
72
|
}, [[], []]);
|
|
71
|
-
return { actions, activePersonalizationName
|
|
73
|
+
return { actions, activePersonalizationName };
|
|
72
74
|
};
|
|
73
75
|
export default function PersonalizationSelector({ view }) {
|
|
74
76
|
const { state: { personalization }, meta: { nonPersonalizationViewName } } = view;
|