@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
package/lib/Core/Utils/index.js
CHANGED
|
@@ -76,7 +76,9 @@ export const getFieldIcon = (type) => {
|
|
|
76
76
|
case FieldType.DATE:
|
|
77
77
|
case FieldType.TIME:
|
|
78
78
|
return 'dataviz-datetime-field';
|
|
79
|
+
// TODO: FieldType.OBJECT should have its own icon to represent it as a complex type instead of custom.
|
|
79
80
|
case FieldType.CUSTOM:
|
|
81
|
+
case FieldType.OBJECT:
|
|
80
82
|
return 'distribute-item-center';
|
|
81
83
|
case FieldType.URL:
|
|
82
84
|
case FieldType.TEXT:
|
|
@@ -91,6 +93,26 @@ export function isAccessibleValue(value) {
|
|
|
91
93
|
export const isRowReorderFieldEnabled = (meta) => {
|
|
92
94
|
return meta.dragHandle || !!meta.rowReorderField;
|
|
93
95
|
};
|
|
96
|
+
export const hasColumnById = (columns, columnId) => {
|
|
97
|
+
return Boolean(columns?.some(column => column.field.id === columnId));
|
|
98
|
+
};
|
|
99
|
+
export const ACTION_COLUMN_TYPES = {
|
|
100
|
+
ROW_REORDER: 'RowReorder',
|
|
101
|
+
ROW_DELETE: 'RowDeleteAction'
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Resolves the frame-local `document` and `window` from the owning frame of the
|
|
105
|
+
* given element ref. Use instead of the globals `document`/`window` whenever the
|
|
106
|
+
* component may be rendered inside an iframe — e.g. when attaching document-level
|
|
107
|
+
* event listeners, dispatching synthetic events, or querying the DOM.
|
|
108
|
+
*/
|
|
109
|
+
export function getBrowserContext(element) {
|
|
110
|
+
const ownerDocument = element?.ownerDocument ?? document;
|
|
111
|
+
return {
|
|
112
|
+
document: ownerDocument,
|
|
113
|
+
window: ownerDocument.defaultView ?? window
|
|
114
|
+
};
|
|
115
|
+
}
|
|
94
116
|
/**
|
|
95
117
|
* Indicates if any of the filters (filterExpression, searchText, externalFilters) is applied on the view.
|
|
96
118
|
* @param view View object
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Core/Utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAoB,MAAM,gCAAgC,CAAC;AAI7E;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,CAAM,EAAE,CAAM;IACtC,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC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sB,GAC1B,eAAe;QACf,aAAa,EAAE,CAAC,eAAe,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAEzD,OAAO,OAAO,CAAC,gBAAgB,IAAI,UAAU,IAAI,sBAAsB,CAAC,CAAC;AAC3E,CAAC,CAAC","sourcesContent":["import fastDeepEqual from 'fast-deep-equal/es6';\n\nimport type { IconName } from '@pega/cosmos-react-core';\nimport { FieldType, type RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport type { RSTypes } from '../../types';\n\n/**\n * Performs a deep comparison between two values to determine if they are equivalent.\n * A wrapper on fast-deep-equal\n */\nexport function deepEqual(x: any, y: any) {\n return fastDeepEqual(x, y);\n}\n\nexport function deepCopy<T>(oldObj: T): T {\n let newObj: any = oldObj;\n\n if (oldObj && typeof oldObj === 'object') {\n newObj = Array.isArray(oldObj) ? [] : ({} as T);\n\n Object.keys(oldObj).forEach(key => {\n if (Object.hasOwn(oldObj, key)) {\n newObj[key] = deepCopy(oldObj[key as keyof T]);\n }\n });\n }\n\n return newObj;\n}\n\nexport function debounced(delay: number, fn: (...arg: any) => void) {\n let timerId: any;\n return function inner(...args: any) {\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(() => {\n fn(...args);\n timerId = null;\n }, delay);\n };\n}\n\nexport function isFunction(obj: any) {\n return typeof obj === 'function';\n}\n\nexport function isArray(obj: any) {\n return Array.isArray(obj);\n}\n\nexport function isObject(obj: any) {\n return obj === Object(obj) && !(isFunction(obj) || isArray(obj));\n}\n\n// Concat CSS classes\nexport function createClassName(...args: any) {\n const classes = args.reduce((arr: [], arg: any) => {\n let val;\n\n if (isArray(arg)) {\n val = createClassName(...arg);\n } else if (typeof arg === 'string' && /\\S/.test(arg)) {\n val = arg.replace(/ \\s+/g, ' ').trim();\n } else if (isFunction(arg)) {\n val = createClassName(arg());\n } else if (isObject(arg)) {\n val = Object.keys(arg).filter(key => !!arg[key] && key);\n }\n\n return val ? arr.concat(val) : arr;\n }, []);\n\n return classes.length ? classes.join(' ') : undefined;\n}\n\nexport function keyFrom(...args: (string | number | null | undefined)[]): string {\n return args.map(val => `${val}`).join('-');\n}\n\nexport const allowToggle = (visibleColumns: string | any[]) => {\n return !(visibleColumns.length === 1);\n};\n\nexport const getFieldIcon = (type: RSTypes.FieldDef['type']): IconName => {\n switch (type) {\n case FieldType.NUMBER:\n return 'dataviz-numeric-field';\n case FieldType.BOOLEAN:\n return 'circle-mixed-left';\n case FieldType.DATE_TIME:\n case FieldType.DATE:\n case FieldType.TIME:\n return 'dataviz-datetime-field';\n case FieldType.CUSTOM:\n return 'distribute-item-center';\n case FieldType.URL:\n case FieldType.TEXT:\n default:\n return 'dataviz-string-field';\n }\n};\n\nexport function isAccessibleValue(value: any) {\n return value !== null && value !== undefined && value !== '––';\n}\n\n// TODO: temporary method, till meta.dragHandle is completely removed.\nexport const isRowReorderFieldEnabled = (meta: RSTypes.Meta): boolean => {\n return meta.dragHandle || !!meta.rowReorderField;\n};\n\n/**\n * Indicates if any of the filters (filterExpression, searchText, externalFilters) is applied on the view.\n * @param view View object\n * @returns true if any filter is applied, false otherwise.\n */\nexport const isFilterApplied = (\n {\n filterExpression,\n searchText,\n externalState\n }: {\n filterExpression: RsCoreTypes.View['state']['filterExpression'];\n searchText: RsCoreTypes.View['state']['searchText'];\n externalState: RsCoreTypes.View['state']['externalState'];\n },\n externalFilters: RsCoreTypes.Meta['externalFilters']\n): boolean => {\n const isExternalFiltersExist =\n externalFilters &&\n externalState?.[externalFilters] &&\n Object.keys(externalState[externalFilters]).length > 0;\n\n return Boolean(filterExpression || searchText || isExternalFiltersExist);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Core/Utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAoB,MAAM,gCAAgC,CAAC;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;AACnD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAoC,EAAE,QAAgB,EAAW,EAAE;IAC/F,OAAO,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,WAAW,EAAE,YAAY;IACzB,UAAU,EAAE,iBAAiB;CACrB,CAAC;AAEX;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAuB;IAIvD,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,IAAI,QAAQ,CAAC;IACzD,OAAO;QACL,QAAQ,EAAE,aAAa;QACvB,MAAM,EAAE,aAAa,CAAC,WAAW,IAAI,MAAM;KAC5C,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,EACE,gBAAgB,EAChB,UAAU,EACV,aAAa,EAKd,EACD,eAAoD,EAC3C,EAAE;IACX,MAAM,sBAAsB,GAC1B,eAAe;QACf,aAAa,EAAE,CAAC,eAAe,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAEzD,OAAO,OAAO,CAAC,gBAAgB,IAAI,UAAU,IAAI,sBAAsB,CAAC,CAAC;AAC3E,CAAC,CAAC","sourcesContent":["import fastDeepEqual from 'fast-deep-equal/es6';\n\nimport type { IconName } from '@pega/cosmos-react-core';\nimport { FieldType, type RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport type { RSTypes } from '../../types';\n\n/**\n * Performs a deep comparison between two values to determine if they are equivalent.\n * A wrapper on fast-deep-equal\n */\nexport function deepEqual(x: any, y: any) {\n return fastDeepEqual(x, y);\n}\n\nexport function deepCopy<T>(oldObj: T): T {\n let newObj: any = oldObj;\n\n if (oldObj && typeof oldObj === 'object') {\n newObj = Array.isArray(oldObj) ? [] : ({} as T);\n\n Object.keys(oldObj).forEach(key => {\n if (Object.hasOwn(oldObj, key)) {\n newObj[key] = deepCopy(oldObj[key as keyof T]);\n }\n });\n }\n\n return newObj;\n}\n\nexport function debounced(delay: number, fn: (...arg: any) => void) {\n let timerId: any;\n return function inner(...args: any) {\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(() => {\n fn(...args);\n timerId = null;\n }, delay);\n };\n}\n\nexport function isFunction(obj: any) {\n return typeof obj === 'function';\n}\n\nexport function isArray(obj: any) {\n return Array.isArray(obj);\n}\n\nexport function isObject(obj: any) {\n return obj === Object(obj) && !(isFunction(obj) || isArray(obj));\n}\n\n// Concat CSS classes\nexport function createClassName(...args: any) {\n const classes = args.reduce((arr: [], arg: any) => {\n let val;\n\n if (isArray(arg)) {\n val = createClassName(...arg);\n } else if (typeof arg === 'string' && /\\S/.test(arg)) {\n val = arg.replace(/ \\s+/g, ' ').trim();\n } else if (isFunction(arg)) {\n val = createClassName(arg());\n } else if (isObject(arg)) {\n val = Object.keys(arg).filter(key => !!arg[key] && key);\n }\n\n return val ? arr.concat(val) : arr;\n }, []);\n\n return classes.length ? classes.join(' ') : undefined;\n}\n\nexport function keyFrom(...args: (string | number | null | undefined)[]): string {\n return args.map(val => `${val}`).join('-');\n}\n\nexport const allowToggle = (visibleColumns: string | any[]) => {\n return !(visibleColumns.length === 1);\n};\n\nexport const getFieldIcon = (type: RSTypes.FieldDef['type']): IconName => {\n switch (type) {\n case FieldType.NUMBER:\n return 'dataviz-numeric-field';\n case FieldType.BOOLEAN:\n return 'circle-mixed-left';\n case FieldType.DATE_TIME:\n case FieldType.DATE:\n case FieldType.TIME:\n return 'dataviz-datetime-field';\n // TODO: FieldType.OBJECT should have its own icon to represent it as a complex type instead of custom.\n case FieldType.CUSTOM:\n case FieldType.OBJECT:\n return 'distribute-item-center';\n case FieldType.URL:\n case FieldType.TEXT:\n default:\n return 'dataviz-string-field';\n }\n};\n\nexport function isAccessibleValue(value: any) {\n return value !== null && value !== undefined && value !== '––';\n}\n\n// TODO: temporary method, till meta.dragHandle is completely removed.\nexport const isRowReorderFieldEnabled = (meta: RSTypes.Meta): boolean => {\n return meta.dragHandle || !!meta.rowReorderField;\n};\n\nexport const hasColumnById = (columns: RsCoreTypes.View['columns'], columnId: string): boolean => {\n return Boolean(columns?.some(column => column.field.id === columnId));\n};\n\nexport const ACTION_COLUMN_TYPES = {\n ROW_REORDER: 'RowReorder',\n ROW_DELETE: 'RowDeleteAction'\n} as const;\n\n/**\n * Resolves the frame-local `document` and `window` from the owning frame of the\n * given element ref. Use instead of the globals `document`/`window` whenever the\n * component may be rendered inside an iframe — e.g. when attaching document-level\n * event listeners, dispatching synthetic events, or querying the DOM.\n */\nexport function getBrowserContext(element: Element | null): {\n document: Document;\n window: Window & typeof globalThis;\n} {\n const ownerDocument = element?.ownerDocument ?? document;\n return {\n document: ownerDocument,\n window: ownerDocument.defaultView ?? window\n };\n}\n\n/**\n * Indicates if any of the filters (filterExpression, searchText, externalFilters) is applied on the view.\n * @param view View object\n * @returns true if any filter is applied, false otherwise.\n */\nexport const isFilterApplied = (\n {\n filterExpression,\n searchText,\n externalState\n }: {\n filterExpression: RsCoreTypes.View['state']['filterExpression'];\n searchText: RsCoreTypes.View['state']['searchText'];\n externalState: RsCoreTypes.View['state']['externalState'];\n },\n externalFilters: RsCoreTypes.Meta['externalFilters']\n): boolean => {\n const isExternalFiltersExist =\n externalFilters &&\n externalState?.[externalFilters] &&\n Object.keys(externalState[externalFilters]).length > 0;\n\n return Boolean(filterExpression || searchText || isExternalFiltersExist);\n};\n"]}
|
|
@@ -2,6 +2,6 @@ import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
|
2
2
|
export declare const generateRSHeightStyles: ({ view, isFullscreen }: {
|
|
3
3
|
view: RsCoreTypes.View;
|
|
4
4
|
isFullscreen: boolean;
|
|
5
|
-
}) => import("styled-components").
|
|
6
|
-
export declare const generateRSDataContainerHeightStyles: () => import("styled-components").
|
|
5
|
+
}) => import("styled-components").RuleSet<object>;
|
|
6
|
+
export declare const generateRSDataContainerHeightStyles: () => import("styled-components").RuleSet<object>;
|
|
7
7
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../Core/Utils/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAgElE,eAAO,MAAM,sBAAsB,GAAI,wBAGpC;IACD,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;CACvB,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../Core/Utils/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAgElE,eAAO,MAAM,sBAAsB,GAAI,wBAGpC;IACD,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;CACvB,gDAUA,CAAC;AAGF,eAAO,MAAM,mCAAmC,mDAM/C,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GalleryCardProps } from '../Gallery.types';
|
|
2
|
+
declare const GalleryCard: import("react").MemoExoticComponent<({ headerColumn, row, meta, visibleColumns }: GalleryCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export default GalleryCard;
|
|
4
|
+
//# sourceMappingURL=GalleryCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryCard.d.ts","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,QAAA,MAAM,WAAW,oFAAsD,gBAAgB,6CA2CrF,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { SelectionCardDisplay } from '@pega/cosmos-react-core';
|
|
4
|
+
import { getCardData, getCardUIProps } from '../utils';
|
|
5
|
+
import useRowActions from '../hooks/useRowActions';
|
|
6
|
+
const GalleryCard = memo(({ headerColumn, row, meta, visibleColumns }) => {
|
|
7
|
+
const { label, image, footer, fields, 'aria-label': ariaLabel } = getCardData({
|
|
8
|
+
row,
|
|
9
|
+
visibleColumns,
|
|
10
|
+
meta,
|
|
11
|
+
headerColumn
|
|
12
|
+
});
|
|
13
|
+
const uiProps = getCardUIProps({ row });
|
|
14
|
+
const fetchActionsCb = useRowActions({ row, meta });
|
|
15
|
+
const { onCardClick } = meta.galleryConfig ?? {};
|
|
16
|
+
const rowData = onCardClick ? row.getContext().getValue() : undefined;
|
|
17
|
+
return (_jsx(SelectionCardDisplay, { "aria-label": ariaLabel, label: label, headingTag: 'h3', image: image, fields: fields, "data-gallery-card": true, actions: fetchActionsCb, ...uiProps, footer: footer, ...(onCardClick &&
|
|
18
|
+
rowData && {
|
|
19
|
+
onClick: () => onCardClick(rowData),
|
|
20
|
+
onKeyDown: (e) => {
|
|
21
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
onCardClick(rowData);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}) }));
|
|
27
|
+
});
|
|
28
|
+
export default GalleryCard;
|
|
29
|
+
//# sourceMappingURL=GalleryCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryCard.js","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC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AC;oBACnB,WAAW,CAAC,OAAO,CAAC,CAAC;gBACvB,CAAC;YACH,CAAC;SACF,CAAC,GACJ,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC","sourcesContent":["import { memo } from 'react';\nimport type { KeyboardEvent } from 'react';\n\nimport { SelectionCardDisplay } from '@pega/cosmos-react-core';\n\nimport type { GalleryCardProps } from '../Gallery.types';\nimport { getCardData, getCardUIProps } from '../utils';\nimport useRowActions from '../hooks/useRowActions';\n\nconst GalleryCard = memo(({ headerColumn, row, meta, visibleColumns }: GalleryCardProps) => {\n const {\n label,\n image,\n footer,\n fields,\n 'aria-label': ariaLabel\n } = getCardData({\n row,\n visibleColumns,\n meta,\n headerColumn\n });\n\n const uiProps = getCardUIProps({ row });\n const fetchActionsCb = useRowActions({ row, meta });\n const { onCardClick } = meta.galleryConfig ?? {};\n\n const rowData = onCardClick ? row.getContext().getValue() : undefined;\n\n return (\n <SelectionCardDisplay\n aria-label={ariaLabel}\n label={label}\n headingTag='h3'\n image={image}\n fields={fields}\n data-gallery-card\n actions={fetchActionsCb}\n {...uiProps}\n footer={footer}\n {...(onCardClick &&\n rowData && {\n onClick: () => onCardClick(rowData),\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onCardClick(rowData);\n }\n }\n })}\n />\n );\n});\n\nexport default GalleryCard;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
2
|
+
import type { GalleryCardProps } from '../Gallery.types';
|
|
3
|
+
interface GalleryCheckboxCardProps extends GalleryCardProps {
|
|
4
|
+
selectionColumn: RsCoreTypes.Column;
|
|
5
|
+
}
|
|
6
|
+
declare const GalleryCheckboxCard: import("react").MemoExoticComponent<({ headerColumn, selectionColumn, row, meta, visibleColumns }: GalleryCheckboxCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export default GalleryCheckboxCard;
|
|
8
|
+
//# sourceMappingURL=GalleryCheckboxCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryCheckboxCard.d.ts","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCheckboxCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAGlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,UAAU,wBAAyB,SAAQ,gBAAgB;IACzD,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC;CACrC;AAED,QAAA,MAAM,mBAAmB,qGACwC,wBAAwB,6CA6CxF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useCallback } from 'react';
|
|
3
|
+
import { CheckboxCard } from '@pega/cosmos-react-core';
|
|
4
|
+
import { getCardData, getCardUIProps } from '../utils';
|
|
5
|
+
import useRowActions from '../hooks/useRowActions';
|
|
6
|
+
const GalleryCheckboxCard = memo(({ headerColumn, selectionColumn, row, meta, visibleColumns }) => {
|
|
7
|
+
const { label, image, fields, 'aria-label': ariaLabel } = getCardData({
|
|
8
|
+
row,
|
|
9
|
+
visibleColumns,
|
|
10
|
+
meta,
|
|
11
|
+
headerColumn
|
|
12
|
+
});
|
|
13
|
+
const uiProps = getCardUIProps({ row });
|
|
14
|
+
const { selectRow, getContext } = row;
|
|
15
|
+
const disableSelectionOnLoad = selectionColumn
|
|
16
|
+
.getContext()
|
|
17
|
+
?.getRsMeta()?.disableSelectionOnLoad;
|
|
18
|
+
// TODO: identify the usecase for column.disableSelection. Keeping it for now to keep the behavior in sync with RowSelectionColumn in table.
|
|
19
|
+
const disableSelection = selectionColumn.disableSelection ?? disableSelectionOnLoad;
|
|
20
|
+
const handleChange = useCallback((event) => selectRow(event.target.checked), [row, selectRow]);
|
|
21
|
+
const fetchActionsCb = useRowActions({ row, meta });
|
|
22
|
+
return (_jsx(CheckboxCard, { "aria-label": ariaLabel, label: label, headingTag: 'h3', image: image, fields: fields, "data-gallery-card": true, onChange: handleChange, checked: getContext()?.$selected, readOnly: disableSelection, ...uiProps, actions: fetchActionsCb }));
|
|
23
|
+
});
|
|
24
|
+
export default GalleryCheckboxCard;
|
|
25
|
+
//# sourceMappingURL=GalleryCheckboxCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryCheckboxCard.js","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryCheckboxCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAoB,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,aAAa,MAAM,wBAAwB,CAAC;AAMnD,MAAM,mBAAmB,GAAG,IAAI,CAC9B,CAAC,EAAE,YAAY,EAAE,eAAe,EAAE,GAAG,EAAE,IAAI,EAAE,cAAc,EAA4B,EAAE,EAAE;IACzF,MAAM,EACJ,KAAK,EACL,KAAK,EACL,MAAM,EACN,YAAY,EAAE,SAAS,EACxB,GAAG,WAAW,CAAC;QACd,GAAG;QACH,cAAc;QACd,IAAI;QACJ,YAAY;KACb,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAExC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC;IACtC,MAAM,sBAAsB,GAAG,eAAe;SAC3C,UAAU,EAAE;QACb,EAAE,SAAS,EAAE,EAAE,sBAAsB,CAAC;IACxC,4IAA4I;IAC5I,MAAM,gBAAgB,GAAG,eAAe,CAAC,gBAAgB,IAAI,sBAAsB,CAAC;IAEpF,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAAoC,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EACzE,CAAC,GAAG,EAAE,SAAS,CAAC,CACjB,CAAC;IAEF,MAAM,cAAc,GAAG,aAAa,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;IAEpD,OAAO,CACL,KAAC,YAAY,kBACC,SAAS,EACrB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAC,IAAI,EACf,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,6BAEd,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,UAAU,EAAE,EAAE,SAAS,EAChC,QAAQ,EAAE,gBAAgB,KACtB,OAAO,EACX,OAAO,EAAE,cAAc,GACvB,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { memo, useCallback, type ChangeEvent } from 'react';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport { CheckboxCard } from '@pega/cosmos-react-core';\n\nimport type { GalleryCardProps } from '../Gallery.types';\nimport { getCardData, getCardUIProps } from '../utils';\nimport useRowActions from '../hooks/useRowActions';\n\ninterface GalleryCheckboxCardProps extends GalleryCardProps {\n selectionColumn: RsCoreTypes.Column;\n}\n\nconst GalleryCheckboxCard = memo(\n ({ headerColumn, selectionColumn, row, meta, visibleColumns }: GalleryCheckboxCardProps) => {\n const {\n label,\n image,\n fields,\n 'aria-label': ariaLabel\n } = getCardData({\n row,\n visibleColumns,\n meta,\n headerColumn\n });\n\n const uiProps = getCardUIProps({ row });\n\n const { selectRow, getContext } = row;\n const disableSelectionOnLoad = selectionColumn\n .getContext()\n ?.getRsMeta()?.disableSelectionOnLoad;\n // TODO: identify the usecase for column.disableSelection. Keeping it for now to keep the behavior in sync with RowSelectionColumn in table.\n const disableSelection = selectionColumn.disableSelection ?? disableSelectionOnLoad;\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => selectRow(event.target.checked),\n [row, selectRow]\n );\n\n const fetchActionsCb = useRowActions({ row, meta });\n\n return (\n <CheckboxCard\n aria-label={ariaLabel}\n label={label}\n headingTag='h3'\n image={image}\n fields={fields}\n data-gallery-card\n onChange={handleChange}\n checked={getContext()?.$selected}\n readOnly={disableSelection}\n {...uiProps}\n actions={fetchActionsCb}\n />\n );\n }\n);\n\nexport default GalleryCheckboxCard;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
2
|
+
interface GalleryFieldValueProps {
|
|
3
|
+
column: RsCoreTypes.Column;
|
|
4
|
+
row: RsCoreTypes.Row;
|
|
5
|
+
}
|
|
6
|
+
declare function GalleryFieldValue({ column, row }: GalleryFieldValueProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default GalleryFieldValue;
|
|
8
|
+
//# sourceMappingURL=GalleryFieldValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryFieldValue.d.ts","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryFieldValue.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAIlE,UAAU,sBAAsB;IAC9B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC;IAC3B,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC;CACtB;AAED,iBAAS,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,sBAAsB,2CAIjE;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import RenderingEngine from '../../../Components/RenderingEngine/RenderCell';
|
|
3
|
+
function GalleryFieldValue({ column, row }) {
|
|
4
|
+
column.setExecutionContext(row);
|
|
5
|
+
return _jsx(RenderingEngine, { ...column.getRenderingEngineProps(), highlighter: true });
|
|
6
|
+
}
|
|
7
|
+
export default GalleryFieldValue;
|
|
8
|
+
//# sourceMappingURL=GalleryFieldValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryFieldValue.js","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryFieldValue.tsx"],"names":[],"mappings":";AAEA,OAAO,eAAe,MAAM,gDAAgD,CAAC;AAO7E,SAAS,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,EAA0B;IAChE,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAEhC,OAAO,KAAC,eAAe,OAAK,MAAM,CAAC,uBAAuB,EAAE,EAAE,WAAW,SAAG,CAAC;AAC/E,CAAC;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport RenderingEngine from '../../../Components/RenderingEngine/RenderCell';\n\ninterface GalleryFieldValueProps {\n column: RsCoreTypes.Column;\n row: RsCoreTypes.Row;\n}\n\nfunction GalleryFieldValue({ column, row }: GalleryFieldValueProps) {\n column.setExecutionContext(row);\n\n return <RenderingEngine {...column.getRenderingEngineProps()} highlighter />;\n}\n\nexport default GalleryFieldValue;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
2
|
+
type GalleryHeaderProps = {
|
|
3
|
+
headerColumn?: RsCoreTypes.Column;
|
|
4
|
+
row: RsCoreTypes.Row;
|
|
5
|
+
};
|
|
6
|
+
declare function GalleryHeader({ headerColumn, row }: GalleryHeaderProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default GalleryHeader;
|
|
8
|
+
//# sourceMappingURL=GalleryHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryHeader.d.ts","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAIlE,KAAK,kBAAkB,GAAG;IACxB,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IAClC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC;CACtB,CAAC;AAMF,iBAAS,aAAa,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE,kBAAkB,kDAY/D;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import RenderingEngine from '../../../Components/RenderingEngine/RenderCell';
|
|
4
|
+
const StyledHeaderContainer = styled.div `
|
|
5
|
+
word-break: break-word;
|
|
6
|
+
`;
|
|
7
|
+
function GalleryHeader({ headerColumn, row }) {
|
|
8
|
+
if (!headerColumn) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
headerColumn?.setExecutionContext(row);
|
|
12
|
+
return (_jsx(StyledHeaderContainer, { children: _jsx(RenderingEngine, { ...headerColumn.getRenderingEngineProps() }) }));
|
|
13
|
+
}
|
|
14
|
+
export default GalleryHeader;
|
|
15
|
+
//# sourceMappingURL=GalleryHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryHeader.js","sourceRoot":"","sources":["../../../../../Core/Views/Gallery/Components/GalleryHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAIvC,OAAO,eAAe,MAAM,gDAAgD,CAAC;AAO7E,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEvC,CAAC;AAEF,SAAS,aAAa,CAAC,EAAE,YAAY,EAAE,GAAG,EAAsB;IAC9D,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY,EAAE,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAEvC,OAAO,CACL,KAAC,qBAAqB,cACpB,KAAC,eAAe,OAAK,YAAY,CAAC,uBAAuB,EAAE,GAAI,GACzC,CACzB,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC","sourcesContent":["import styled from 'styled-components';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport RenderingEngine from '../../../Components/RenderingEngine/RenderCell';\n\ntype GalleryHeaderProps = {\n headerColumn?: RsCoreTypes.Column;\n row: RsCoreTypes.Row;\n};\n\nconst StyledHeaderContainer = styled.div`\n word-break: break-word;\n`;\n\nfunction GalleryHeader({ headerColumn, row }: GalleryHeaderProps) {\n if (!headerColumn) {\n return null;\n }\n\n headerColumn?.setExecutionContext(row);\n\n return (\n <StyledHeaderContainer>\n <RenderingEngine {...headerColumn.getRenderingEngineProps()} />\n </StyledHeaderContainer>\n );\n}\n\nexport default GalleryHeader;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
2
|
+
export interface GalleryCardProps {
|
|
3
|
+
headerColumn?: RsCoreTypes.Column;
|
|
4
|
+
row: RsCoreTypes.Row;
|
|
5
|
+
meta: RsCoreTypes.Meta;
|
|
6
|
+
visibleColumns: RsCoreTypes.Column[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=Gallery.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gallery.types.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Gallery/Gallery.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC;IAClC,GAAG,EAAE,WAAW,CAAC,GAAG,CAAC;IACrB,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IACvB,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gallery.types.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/Gallery.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nexport interface GalleryCardProps {\n headerColumn?: RsCoreTypes.Column;\n row: RsCoreTypes.Row;\n meta: RsCoreTypes.Meta;\n visibleColumns: RsCoreTypes.Column[];\n}\n"]}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { BaseA11y } from 'pega-repeating-structures-core';
|
|
2
|
+
import type { useLiveLog } from '@pega/cosmos-react-core';
|
|
2
3
|
export type Selectors = {
|
|
3
4
|
focusElementSelector: string;
|
|
4
|
-
|
|
5
|
+
belowLoader: string;
|
|
5
6
|
};
|
|
7
|
+
type AnnounceMethod = ReturnType<typeof useLiveLog>['announceAssertive'];
|
|
6
8
|
declare class GalleryA11y extends BaseA11y {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
#private;
|
|
10
|
+
constructor(selectors: Selectors, focusableSelectors: string[], container: HTMLElement, announceAssertive: AnnounceMethod, announcePolite: AnnounceMethod, translate: (key: string) => string);
|
|
11
|
+
onFocusHandler(event?: Event): void;
|
|
12
|
+
itemsLoadedCallback(): void;
|
|
11
13
|
}
|
|
12
14
|
export default GalleryA11y;
|
|
13
15
|
//# sourceMappingURL=GalleryA11y.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalleryA11y.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Gallery/GalleryA11y.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"GalleryA11y.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Gallery/GalleryA11y.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAI1D,MAAM,MAAM,SAAS,GAAG;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,mBAAmB,CAAC,CAAC;AAEzE,cAAM,WAAY,SAAQ,QAAQ;;gBAI9B,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,MAAM,EAAE,EAC5B,SAAS,EAAE,WAAW,EACtB,iBAAiB,EAAE,cAAc,EACjC,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM;IAY3B,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK;IAIrC,mBAAmB;CAGpB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,59 +1,16 @@
|
|
|
1
1
|
import { BaseA11y } from 'pega-repeating-structures-core';
|
|
2
|
-
|
|
3
|
-
if (!element)
|
|
4
|
-
return;
|
|
5
|
-
element.tabIndex = 0;
|
|
6
|
-
element.focus();
|
|
7
|
-
}
|
|
2
|
+
import createLoadingAnnouncementBehavior from '../../a11y/loadingAnnouncementBehavior';
|
|
8
3
|
class GalleryA11y extends BaseA11y {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const colItem = element.closest(this.selectors.focusElementSelector);
|
|
14
|
-
if (!colItem)
|
|
15
|
-
return false;
|
|
16
|
-
return element.matches(this.focusableSelectors.join(','));
|
|
4
|
+
#loadingAnnouncement;
|
|
5
|
+
constructor(selectors, focusableSelectors, container, announceAssertive, announcePolite, translate) {
|
|
6
|
+
super(selectors, focusableSelectors, {}, container);
|
|
7
|
+
this.#loadingAnnouncement = createLoadingAnnouncementBehavior(selectors, container, announceAssertive, announcePolite, translate);
|
|
17
8
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (this.stopEventHandler(event)) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
let nextItem;
|
|
24
|
-
const sortedColumns = this.getSortedColumns(currentCol.closest(this.selectors.parentElementSelector));
|
|
25
|
-
if (keyCode === this.keys.UP || keyCode === this.keys.LEFT) {
|
|
26
|
-
nextItem = sortedColumns[sortedColumns.indexOf(currentCol) - 1];
|
|
27
|
-
}
|
|
28
|
-
else if (keyCode === this.keys.RIGHT || keyCode === this.keys.DOWN) {
|
|
29
|
-
nextItem = sortedColumns[sortedColumns.indexOf(currentCol) + 1];
|
|
30
|
-
}
|
|
31
|
-
else if (keyCode === this.keys.TAB) {
|
|
32
|
-
this.containerTabHandler(event, currentCol, shiftKey);
|
|
33
|
-
}
|
|
34
|
-
if (nextItem && currentCol) {
|
|
35
|
-
event.preventDefault();
|
|
36
|
-
const focusableElements = this.getFocusableElementsInCell(nextItem);
|
|
37
|
-
currentCol.tabIndex = -1;
|
|
38
|
-
if (focusableElements.length === 1) {
|
|
39
|
-
gainFocus(focusableElements[0]);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
gainFocus(nextItem);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
9
|
+
onFocusHandler(event) {
|
|
10
|
+
this.#loadingAnnouncement.onFocus(event);
|
|
45
11
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (!(rootNode instanceof Document || rootNode instanceof ShadowRoot))
|
|
49
|
-
return;
|
|
50
|
-
const currentCol = rootNode.activeElement?.closest(this.selectors.focusElementSelector);
|
|
51
|
-
if (rootNode.activeElement instanceof HTMLElement &&
|
|
52
|
-
currentCol instanceof HTMLElement &&
|
|
53
|
-
(currentCol === rootNode.activeElement ||
|
|
54
|
-
this.doesCardContainFocusableElement(rootNode.activeElement))) {
|
|
55
|
-
this.galleryContainerEventHandlers(event, currentCol);
|
|
56
|
-
}
|
|
12
|
+
itemsLoadedCallback() {
|
|
13
|
+
this.#loadingAnnouncement.onItemsLoaded();
|
|
57
14
|
}
|
|
58
15
|
}
|
|
59
16
|
export default GalleryA11y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalleryA11y.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/GalleryA11y.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"GalleryA11y.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/GalleryA11y.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG1D,OAAO,iCAAiC,MAAM,wCAAwC,CAAC;AASvF,MAAM,WAAY,SAAQ,QAAQ;IAChC,oBAAoB,CAAuD;IAE3E,YACE,SAAoB,EACpB,kBAA4B,EAC5B,SAAsB,EACtB,iBAAiC,EACjC,cAA8B,EAC9B,SAAkC;QAElC,KAAK,CAAC,SAAS,EAAE,kBAAkB,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;QACpD,IAAI,CAAC,oBAAoB,GAAG,iCAAiC,CAC3D,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,SAAS,CACV,CAAC;IACJ,CAAC;IAEQ,cAAc,CAAC,KAAa;QACnC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,mBAAmB;QACjB,IAAI,CAAC,oBAAoB,CAAC,aAAa,EAAE,CAAC;IAC5C,CAAC;CACF;AAED,eAAe,WAAW,CAAC","sourcesContent":["import { BaseA11y } from 'pega-repeating-structures-core';\nimport type { useLiveLog } from '@pega/cosmos-react-core';\n\nimport createLoadingAnnouncementBehavior from '../../a11y/loadingAnnouncementBehavior';\n\nexport type Selectors = {\n focusElementSelector: string;\n belowLoader: string;\n};\n\ntype AnnounceMethod = ReturnType<typeof useLiveLog>['announceAssertive'];\n\nclass GalleryA11y extends BaseA11y {\n #loadingAnnouncement: ReturnType<typeof createLoadingAnnouncementBehavior>;\n\n constructor(\n selectors: Selectors,\n focusableSelectors: string[],\n container: HTMLElement,\n announceAssertive: AnnounceMethod,\n announcePolite: AnnounceMethod,\n translate: (key: string) => string\n ) {\n super(selectors, focusableSelectors, {}, container);\n this.#loadingAnnouncement = createLoadingAnnouncementBehavior(\n selectors,\n container,\n announceAssertive,\n announcePolite,\n translate\n );\n }\n\n override onFocusHandler(event?: Event) {\n this.#loadingAnnouncement.onFocus(event);\n }\n\n itemsLoadedCallback() {\n this.#loadingAnnouncement.onItemsLoaded();\n }\n}\n\nexport default GalleryA11y;\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
3
|
+
import type { ImageSize, WithAttributes } from '@pega/cosmos-react-core';
|
|
4
|
+
interface GalleryContainerProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
view: RsCoreTypes.View;
|
|
7
|
+
isFullscreen: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
image?: {
|
|
10
|
+
placement?: RsCoreTypes.HeroImagePlacement;
|
|
11
|
+
size?: ImageSize;
|
|
12
|
+
};
|
|
13
|
+
tile?: {
|
|
14
|
+
placement?: RsCoreTypes.HeroImagePlacement;
|
|
15
|
+
size?: ImageSize;
|
|
16
|
+
};
|
|
17
|
+
isStackLayout?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const GalleryContainer: import("react").ForwardRefExoticComponent<Omit<WithAttributes<"div", GalleryContainerProps>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
export default GalleryContainer;
|
|
21
|
+
declare const StyledVirtualizeContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
|
+
export { StyledVirtualizeContainer };
|
|
23
|
+
//# sourceMappingURL=GalleryContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryContainer.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Gallery/GalleryContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAYzE,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE;QACN,SAAS,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;QAC3C,IAAI,CAAC,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,SAAS,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;QAC3C,IAAI,CAAC,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA6DD,QAAA,MAAM,gBAAgB,sJAoBrB,CAAC;AAIF,eAAe,gBAAgB,CAAC;AAEhC,QAAA,MAAM,yBAAyB,6NAG9B,CAAC;AAGF,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import { getBaseCardContainerStyles, getInlineImageCardContainerStyles, StyledHeader, StyledSelectionCard } from '@pega/cosmos-react-core/lib/components/SelectionCard/SelectionCard.styles';
|
|
5
|
+
import { defaultThemeProp } from '@pega/cosmos-react-core';
|
|
6
|
+
import { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';
|
|
7
|
+
import { DEFAULT_IMAGE_PLACEMENT, DEFAULT_IMAGE_SIZE, GALLERY_IMAGE_PLACEMENT_MAP, isInlinePlacement } from './utils';
|
|
8
|
+
const StyledGalleryContainer = styled.div(({ view, isFullscreen, isStackLayout, theme }) => {
|
|
9
|
+
return css `
|
|
10
|
+
${generateRSHeightStyles({ view, isFullscreen })}
|
|
11
|
+
|
|
12
|
+
.grid-container {
|
|
13
|
+
position: absolute;
|
|
14
|
+
width: 100%;
|
|
15
|
+
padding: 0.2rem;
|
|
16
|
+
${getBaseCardContainerStyles(theme)}
|
|
17
|
+
${isStackLayout &&
|
|
18
|
+
css `
|
|
19
|
+
grid-template-columns: 1fr;
|
|
20
|
+
`}
|
|
21
|
+
${StyledSelectionCard} ${StyledHeader} {
|
|
22
|
+
min-height: auto;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
});
|
|
27
|
+
StyledGalleryContainer.defaultProps = defaultThemeProp;
|
|
28
|
+
const StyledInlineImageGalleryContainer = styled(StyledGalleryContainer)(({ theme, imageSize, imagePlacement, isStackLayout }) => {
|
|
29
|
+
return css `
|
|
30
|
+
*:has(> .grid-container) {
|
|
31
|
+
container-type: inline-size;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.grid-container {
|
|
35
|
+
${!isStackLayout &&
|
|
36
|
+
getInlineImageCardContainerStyles(theme, {
|
|
37
|
+
placement: GALLERY_IMAGE_PLACEMENT_MAP[imagePlacement],
|
|
38
|
+
size: imageSize
|
|
39
|
+
})}
|
|
40
|
+
|
|
41
|
+
${StyledSelectionCard} ${StyledHeader} {
|
|
42
|
+
min-height: auto;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
});
|
|
47
|
+
StyledInlineImageGalleryContainer.defaultProps = defaultThemeProp;
|
|
48
|
+
const GalleryContainer = forwardRef(({ image, tile, isStackLayout, ...props }, ref) => {
|
|
49
|
+
const layoutSource = image ?? tile;
|
|
50
|
+
if (layoutSource) {
|
|
51
|
+
const { placement = DEFAULT_IMAGE_PLACEMENT, size = DEFAULT_IMAGE_SIZE } = layoutSource;
|
|
52
|
+
if (isInlinePlacement(placement)) {
|
|
53
|
+
return (_jsx(StyledInlineImageGalleryContainer, { ref: ref, isStackLayout: isStackLayout, imageSize: size, imagePlacement: placement, ...props }));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return _jsx(StyledGalleryContainer, { ref: ref, isStackLayout: isStackLayout, ...props });
|
|
57
|
+
});
|
|
58
|
+
GalleryContainer.displayName = 'GalleryContainer';
|
|
59
|
+
export default GalleryContainer;
|
|
60
|
+
const StyledVirtualizeContainer = styled.div `
|
|
61
|
+
${generateRSDataContainerHeightStyles};
|
|
62
|
+
position: relative;
|
|
63
|
+
`;
|
|
64
|
+
StyledVirtualizeContainer.defaultProps = defaultThemeProp;
|
|
65
|
+
export { StyledVirtualizeContainer };
|
|
66
|
+
//# sourceMappingURL=GalleryContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GalleryContainer.js","sourceRoot":"","sources":["../../../../Core/Views/Gallery/GalleryContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,OAAO,CAAC;AACnD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,0BAA0B,EAC1B,iCAAiC,EACjC,YAAY,EACZ,mBAAmB,EACpB,MAAM,2EAA2E,CAAC;AAGnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,mCAAmC,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjG,OAAO,EACL,uBAAuB,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CACL,KAAC,iCAAiC,IAChC,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,IAAI,EACf,cAAc,EAAE,SAAS,KACrB,KAAK,GACT,CACH,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,KAAC,sBAAsB,IAAC,GAAG,EAAE,GAAG,EAAE,aAAa,EAAE,aAAa,KAAM,KAAK,GAAI,CAAC;AACvF,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,eAAe,gBAAgB,CAAC;AAEhC,MAAM,yBAAyB,GAAG,MAAM,CAAC,GAAG,CAAA;IACxC,mCAAmC;;CAEtC,CAAC;AAEF,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,CAAC","sourcesContent":["import { forwardRef, type ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n getBaseCardContainerStyles,\n getInlineImageCardContainerStyles,\n StyledHeader,\n StyledSelectionCard\n} from '@pega/cosmos-react-core/lib/components/SelectionCard/SelectionCard.styles';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport type { ImageSize, WithAttributes } from '@pega/cosmos-react-core';\nimport { defaultThemeProp } from '@pega/cosmos-react-core';\n\nimport { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';\n\nimport {\n DEFAULT_IMAGE_PLACEMENT,\n DEFAULT_IMAGE_SIZE,\n GALLERY_IMAGE_PLACEMENT_MAP,\n isInlinePlacement\n} from './utils';\n\ninterface GalleryContainerProps {\n children?: ReactNode;\n view: RsCoreTypes.View;\n isFullscreen: boolean;\n className?: string;\n image?: {\n placement?: RsCoreTypes.HeroImagePlacement;\n size?: ImageSize;\n };\n tile?: {\n placement?: RsCoreTypes.HeroImagePlacement;\n size?: ImageSize;\n };\n isStackLayout?: boolean;\n}\n\ninterface StyledGalleryContainerProps {\n view: RsCoreTypes.View;\n isFullscreen: boolean;\n isStackLayout?: boolean;\n}\n\ninterface StyledInlineImageGalleryContainerProps extends StyledGalleryContainerProps {\n imagePlacement: Extract<RsCoreTypes.HeroImagePlacement, 'left' | 'right'>;\n imageSize: ImageSize;\n}\n\nconst StyledGalleryContainer = styled.div<StyledGalleryContainerProps>(\n ({ view, isFullscreen, isStackLayout, theme }) => {\n return css`\n ${generateRSHeightStyles({ view, isFullscreen })}\n\n .grid-container {\n position: absolute;\n width: 100%;\n padding: 0.2rem;\n ${getBaseCardContainerStyles(theme)}\n ${isStackLayout &&\n css`\n grid-template-columns: 1fr;\n `}\n ${StyledSelectionCard} ${StyledHeader} {\n min-height: auto;\n }\n }\n `;\n }\n);\n\nStyledGalleryContainer.defaultProps = defaultThemeProp;\n\nconst StyledInlineImageGalleryContainer = styled(StyledGalleryContainer)<\n Pick<StyledInlineImageGalleryContainerProps, 'imageSize' | 'imagePlacement'>\n>(({ theme, imageSize, imagePlacement, isStackLayout }) => {\n return css`\n *:has(> .grid-container) {\n container-type: inline-size;\n }\n\n .grid-container {\n ${!isStackLayout &&\n getInlineImageCardContainerStyles(theme, {\n placement: GALLERY_IMAGE_PLACEMENT_MAP[imagePlacement],\n size: imageSize\n })}\n\n ${StyledSelectionCard} ${StyledHeader} {\n min-height: auto;\n }\n }\n `;\n});\n\nStyledInlineImageGalleryContainer.defaultProps = defaultThemeProp;\n\nconst GalleryContainer = forwardRef<HTMLDivElement, WithAttributes<'div', GalleryContainerProps>>(\n ({ image, tile, isStackLayout, ...props }, ref) => {\n const layoutSource = image ?? tile;\n if (layoutSource) {\n const { placement = DEFAULT_IMAGE_PLACEMENT, size = DEFAULT_IMAGE_SIZE } = layoutSource;\n if (isInlinePlacement(placement)) {\n return (\n <StyledInlineImageGalleryContainer\n ref={ref}\n isStackLayout={isStackLayout}\n imageSize={size}\n imagePlacement={placement}\n {...props}\n />\n );\n }\n }\n\n return <StyledGalleryContainer ref={ref} isStackLayout={isStackLayout} {...props} />;\n }\n);\n\nGalleryContainer.displayName = 'GalleryContainer';\n\nexport default GalleryContainer;\n\nconst StyledVirtualizeContainer = styled.div`\n ${generateRSDataContainerHeightStyles};\n position: relative;\n`;\n\nStyledVirtualizeContainer.defaultProps = defaultThemeProp;\nexport { StyledVirtualizeContainer };\n"]}
|