@pega/lists-react 9.0.0-build.2.9 → 9.0.0-build.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -4
- package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts +10 -5
- package/lib/Core/Components/A11y/RepeatingStructureA11y.d.ts.map +1 -1
- package/lib/Core/Components/A11y/RepeatingStructureA11y.js +27 -2
- package/lib/Core/Components/A11y/RepeatingStructureA11y.js.map +1 -1
- package/lib/Core/Components/AggregateMenu.d.ts +1 -0
- package/lib/Core/Components/AggregateMenu.d.ts.map +1 -1
- package/lib/Core/Components/AggregateMenu.js +32 -18
- package/lib/Core/Components/AggregateMenu.js.map +1 -1
- package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts +6 -15
- package/lib/Core/Components/ContextMenu/ContextMenuContainer.d.ts.map +1 -1
- package/lib/Core/Components/ContextMenu/ContextMenuContainer.js +91 -163
- package/lib/Core/Components/ContextMenu/ContextMenuContainer.js.map +1 -1
- package/lib/Core/Components/ContextMenu/QuickFilter.js +7 -7
- package/lib/Core/Components/ContextMenu/QuickFilter.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/ColumnMergeTemplates/CustomCellWrapper.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts +2 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js +9 -21
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowActionMenu.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts +2 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js +4 -3
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowDragDropHandle.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts +2 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js +4 -3
- package/lib/Core/Components/DefaultComponents/CellRenderers/RowError.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts +0 -2
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.js +0 -2
- package/lib/Core/Components/DefaultComponents/CellRenderers/index.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts +5 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/EmptyContainer.js +12 -5
- package/lib/Core/Components/DefaultComponents/EmptyContainer.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts +3 -2
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js +13 -26
- package/lib/Core/Components/DefaultComponents/PersonalizationCreateEdit.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js +2 -2
- package/lib/Core/Components/DefaultComponents/PersonalizationDeleteConfirmation.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts +0 -2
- package/lib/Core/Components/DefaultComponents/PersonalizationSelector.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js +11 -9
- package/lib/Core/Components/DefaultComponents/PersonalizationSelector.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js +5 -0
- package/lib/Core/Components/DefaultComponents/SelectAllCheckbox.js.map +1 -1
- package/lib/Core/Components/DefaultComponents/index.d.ts +5 -3
- package/lib/Core/Components/DefaultComponents/index.d.ts.map +1 -1
- package/lib/Core/Components/DefaultComponents/index.js +0 -2
- package/lib/Core/Components/DefaultComponents/index.js.map +1 -1
- package/lib/Core/Components/Filters/CommonFilter.d.ts.map +1 -1
- package/lib/Core/Components/Filters/CommonFilter.js +2 -2
- package/lib/Core/Components/Filters/CommonFilter.js.map +1 -1
- package/lib/Core/Components/Filters/FilterType.js +5 -5
- package/lib/Core/Components/Filters/FilterType.js.map +1 -1
- package/lib/Core/Components/Filters/SelectFilter.d.ts.map +1 -1
- package/lib/Core/Components/Filters/SelectFilter.js +2 -2
- package/lib/Core/Components/Filters/SelectFilter.js.map +1 -1
- package/lib/Core/Components/Filters/styles.d.ts +1 -1
- package/lib/Core/Components/FooterAggregators.d.ts.map +1 -1
- package/lib/Core/Components/FooterAggregators.js +3 -2
- package/lib/Core/Components/FooterAggregators.js.map +1 -1
- package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts +12 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.d.ts.map +1 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js +62 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalFieldDataModal.js.map +1 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts +33 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.d.ts.map +1 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js +106 -0
- package/lib/Core/Components/GroupRenderer/GroupAdditionalInfo.js.map +1 -0
- package/lib/Core/Components/{GroupRenderer.d.ts → GroupRenderer/index.d.ts} +8 -1
- package/lib/Core/Components/GroupRenderer/index.d.ts.map +1 -0
- package/lib/Core/Components/GroupRenderer/index.js +367 -0
- package/lib/Core/Components/GroupRenderer/index.js.map +1 -0
- package/lib/Core/Components/Grouping/GroupingMenu.d.ts.map +1 -1
- package/lib/Core/Components/Grouping/GroupingMenu.js +6 -5
- package/lib/Core/Components/Grouping/GroupingMenu.js.map +1 -1
- package/lib/Core/Components/HeaderCell.d.ts.map +1 -1
- package/lib/Core/Components/HeaderCell.js +8 -5
- package/lib/Core/Components/HeaderCell.js.map +1 -1
- package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
- package/lib/Core/Components/HeaderMenu/actions.js +3 -3
- package/lib/Core/Components/HeaderMenu/actions.js.map +1 -1
- package/lib/Core/Components/HeaderMenu/index.d.ts.map +1 -1
- package/lib/Core/Components/HeaderMenu/index.js +2 -2
- package/lib/Core/Components/HeaderMenu/index.js.map +1 -1
- package/lib/Core/Components/NotificationManager.js +1 -1
- package/lib/Core/Components/NotificationManager.js.map +1 -1
- package/lib/Core/Components/RSWrapper/HeaderBarGadget.d.ts.map +1 -1
- package/lib/Core/Components/RSWrapper/HeaderBarGadget.js +2 -1
- package/lib/Core/Components/RSWrapper/HeaderBarGadget.js.map +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.d.ts +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.js +2 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.js.map +1 -1
- package/lib/Core/Components/TestIdConstants.d.ts +1 -0
- package/lib/Core/Components/TestIdConstants.js +2 -1
- package/lib/Core/Components/TestIdConstants.js.map +1 -1
- package/lib/Core/Components/Toolbar/AdvanceToolbar.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/AdvanceToolbar.js +9 -33
- package/lib/Core/Components/Toolbar/AdvanceToolbar.js.map +1 -1
- package/lib/Core/Components/Toolbar/AnnounceRowsCount.d.ts +1 -1
- package/lib/Core/Components/Toolbar/AnnounceRowsCount.js +1 -1
- package/lib/Core/Components/Toolbar/AnnounceRowsCount.js.map +1 -1
- package/lib/Core/Components/Toolbar/ColumnSelector.d.ts +20 -9
- package/lib/Core/Components/Toolbar/ColumnSelector.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/ColumnSelector.js +89 -65
- package/lib/Core/Components/Toolbar/ColumnSelector.js.map +1 -1
- package/lib/Core/Components/Toolbar/DebugInfo.d.ts +3 -5
- package/lib/Core/Components/Toolbar/DebugInfo.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/DebugInfo.js +3 -3
- package/lib/Core/Components/Toolbar/DebugInfo.js.map +1 -1
- package/lib/Core/Components/Toolbar/FieldSelector.d.ts +1 -0
- package/lib/Core/Components/Toolbar/FieldSelector.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/FieldSelector.js +3 -2
- package/lib/Core/Components/Toolbar/FieldSelector.js.map +1 -1
- package/lib/Core/Components/Toolbar/Grouping.types.d.ts +0 -6
- package/lib/Core/Components/Toolbar/Grouping.types.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/Grouping.types.js.map +1 -1
- package/lib/Core/Components/Toolbar/SimpleToolbar.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/SimpleToolbar.js +4 -3
- package/lib/Core/Components/Toolbar/SimpleToolbar.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts +14 -18
- package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js +15 -16
- package/lib/Core/Components/Toolbar/hooks/useGroup/DateFunctionSelector.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts +2 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js +10 -7
- package/lib/Core/Components/Toolbar/hooks/useGroup/GroupRenderer.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js +6 -3
- package/lib/Core/Components/Toolbar/hooks/useGroup/useGroup.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts +7 -2
- package/lib/Core/Components/Toolbar/hooks/useGroup/utils.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js +11 -3
- package/lib/Core/Components/Toolbar/hooks/useGroup/utils.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useMore.d.ts +1 -1
- package/lib/Core/Components/Toolbar/hooks/useMore.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useMore.js +81 -79
- package/lib/Core/Components/Toolbar/hooks/useMore.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts +8 -6
- package/lib/Core/Components/Toolbar/hooks/usePersonalization.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/usePersonalization.js +18 -3
- package/lib/Core/Components/Toolbar/hooks/usePersonalization.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSearch.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSearch.js +6 -9
- package/lib/Core/Components/Toolbar/hooks/useSearch.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts +4 -4
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.js +6 -6
- package/lib/Core/Components/Toolbar/hooks/useSort/Row.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts +2 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js +8 -2
- package/lib/Core/Components/Toolbar/hooks/useSort/SortRenderer.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/useSort.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js +2 -2
- package/lib/Core/Components/Toolbar/hooks/useSort/useSort.js.map +1 -1
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts +6 -0
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.d.ts.map +1 -0
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.js +17 -0
- package/lib/Core/Components/Toolbar/hooks/useWrapAction.js.map +1 -0
- package/lib/Core/Components/Toolbar/utils/utils.d.ts +1 -1
- package/lib/Core/Components/Toolbar/utils/utils.d.ts.map +1 -1
- package/lib/Core/Components/Toolbar/utils/utils.js +2 -1
- package/lib/Core/Components/Toolbar/utils/utils.js.map +1 -1
- package/lib/Core/Components/Virtualise/Pagination.d.ts.map +1 -1
- package/lib/Core/Components/Virtualise/Pagination.js +2 -1
- package/lib/Core/Components/Virtualise/Pagination.js.map +1 -1
- package/lib/Core/Components/Virtualise/UseScroll.d.ts +4 -1
- package/lib/Core/Components/Virtualise/UseScroll.d.ts.map +1 -1
- package/lib/Core/Components/Virtualise/UseScroll.js +16 -3
- package/lib/Core/Components/Virtualise/UseScroll.js.map +1 -1
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts +97 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js +251 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/VariableHeightVirtualizer.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts +22 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js +38 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useChildrenHeightResizeObserver.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts +22 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js +45 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useLoaderPositioning.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts +49 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js +55 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts +21 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js +39 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useScroll.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts +38 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js +62 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/useVirtualizerItemCount.js.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +112 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +214 -0
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -0
- package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +21 -8
- package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
- package/lib/Core/Components/Virtualise/index.js +21 -13
- package/lib/Core/Components/Virtualise/index.js.map +1 -1
- package/lib/Core/Components/Virtualise/utility.d.ts +1 -1
- package/lib/Core/Components/Virtualise/utility.d.ts.map +1 -1
- package/lib/Core/Components/Virtualise/utility.js +3 -2
- package/lib/Core/Components/Virtualise/utility.js.map +1 -1
- package/lib/Core/Context/LocalizationContext.d.ts +1 -1
- package/lib/Core/Context/LocalizationContext.d.ts.map +1 -1
- package/lib/Core/Context/LocalizationContext.js.map +1 -1
- package/lib/Core/Hooks/a11y/useAnnounce.d.ts +19 -0
- package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -0
- package/lib/Core/Hooks/a11y/useAnnounce.js +49 -0
- package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -0
- package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
- package/lib/Core/Hooks/useDragDrop.js +2 -0
- package/lib/Core/Hooks/useDragDrop.js.map +1 -1
- package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
- package/lib/Core/Hooks/useRepeat.js +20 -1
- package/lib/Core/Hooks/useRepeat.js.map +1 -1
- package/lib/Core/Localization/defaultTranslations.d.ts +16 -13
- package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
- package/lib/Core/Localization/defaultTranslations.js +17 -14
- package/lib/Core/Localization/defaultTranslations.js.map +1 -1
- package/lib/Core/Test/JUnitMocks.d.ts +6 -617
- package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
- package/lib/Core/Test/JUnitMocks.js +5 -4
- package/lib/Core/Test/JUnitMocks.js.map +1 -1
- package/lib/Core/Utils/index.d.ts +11 -0
- package/lib/Core/Utils/index.d.ts.map +1 -1
- package/lib/Core/Utils/index.js +22 -8
- package/lib/Core/Utils/index.js.map +1 -1
- package/lib/Core/Utils/styles.d.ts +2 -2
- package/lib/Core/Utils/styles.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +4 -0
- package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryCard.js +18 -0
- package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +25 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.js +15 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +1 -0
- package/lib/Core/Views/Gallery/Gallery.types.d.ts +8 -0
- package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Gallery.types.js +2 -0
- package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -0
- package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts +13 -1
- package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/StyledGalleryContainer.js +30 -40
- package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +1 -1
- package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js +1 -1
- package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js.map +1 -1
- package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts +9 -0
- package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/hooks/useRowActions.js +25 -0
- package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +1 -0
- package/lib/Core/Views/Gallery/index.d.ts +4 -8
- package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/index.js +22 -62
- package/lib/Core/Views/Gallery/index.js.map +1 -1
- package/lib/Core/Views/Gallery/utils.d.ts +36 -0
- package/lib/Core/Views/Gallery/utils.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/utils.js +91 -0
- package/lib/Core/Views/Gallery/utils.js.map +1 -0
- package/lib/Core/Views/Map/Map.styles.d.ts +190 -6
- package/lib/Core/Views/Map/Map.styles.d.ts.map +1 -1
- package/lib/Core/Views/Map/Map.styles.js.map +1 -1
- package/lib/Core/Views/Map/index.d.ts.map +1 -1
- package/lib/Core/Views/Map/index.js +10 -4
- package/lib/Core/Views/Map/index.js.map +1 -1
- package/lib/Core/Views/RsCardWrapper.js.map +1 -1
- package/lib/Core/Views/Table/CellWrapper.d.ts +1 -1
- package/lib/Core/Views/Table/CellWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/CellWrapper.js +4 -2
- package/lib/Core/Views/Table/CellWrapper.js.map +1 -1
- package/lib/Core/Views/Table/HeaderWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/HeaderWrapper.js +5 -5
- package/lib/Core/Views/Table/HeaderWrapper.js.map +1 -1
- package/lib/Core/Views/Table/Row.d.ts +3 -1
- package/lib/Core/Views/Table/Row.d.ts.map +1 -1
- package/lib/Core/Views/Table/Row.js +5 -3
- package/lib/Core/Views/Table/Row.js.map +1 -1
- package/lib/Core/Views/Table/SkeletonRows.d.ts +1 -1
- package/lib/Core/Views/Table/SkeletonRows.d.ts.map +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.d.ts +3 -1
- package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.js +269 -158
- package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
- package/lib/Core/Views/Table/TableA11y.d.ts +11 -0
- package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -1
- package/lib/Core/Views/Table/TableA11y.js +207 -2
- package/lib/Core/Views/Table/TableA11y.js.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +5 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.js +38 -15
- package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
- package/lib/Core/Views/Table/index.d.ts.map +1 -1
- package/lib/Core/Views/Table/index.js +6 -4
- package/lib/Core/Views/Table/index.js.map +1 -1
- package/lib/Core/Views/Table/useCountChange.d.ts +10 -0
- package/lib/Core/Views/Table/useCountChange.d.ts.map +1 -0
- package/lib/Core/Views/Table/useCountChange.js +39 -0
- package/lib/Core/Views/Table/useCountChange.js.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.d.ts +5 -0
- package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.js +28 -0
- package/lib/Core/Views/Timeline/Timeline.js.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.styles.d.ts +393 -0
- package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.styles.js +175 -0
- package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.types.d.ts +48 -0
- package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/Timeline.types.js +2 -0
- package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -0
- package/lib/Core/Views/Timeline/TimelineItem.d.ts +12 -0
- package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/TimelineItem.js +43 -0
- package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -0
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +4 -0
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js +141 -0
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -0
- package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/index.js +14 -8
- package/lib/Core/Views/Timeline/index.js.map +1 -1
- package/lib/Core/Views/Timeline/utils.d.ts +10 -0
- package/lib/Core/Views/Timeline/utils.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/utils.js +144 -0
- package/lib/Core/Views/Timeline/utils.js.map +1 -0
- package/lib/Core/Views/rs-styles.d.ts +1 -1
- package/lib/Core/constants.d.ts.map +1 -1
- package/lib/Core/constants.js +1 -0
- package/lib/Core/constants.js.map +1 -1
- package/lib/Core/templateFeatureSupport.d.ts +17 -0
- package/lib/Core/templateFeatureSupport.d.ts.map +1 -0
- package/lib/Core/templateFeatureSupport.js +30 -0
- package/lib/Core/templateFeatureSupport.js.map +1 -0
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +11 -12
- package/lib/Core/Components/DefaultComponents/CardItem.d.ts +0 -3
- package/lib/Core/Components/DefaultComponents/CardItem.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CardItem.js +0 -78
- package/lib/Core/Components/DefaultComponents/CardItem.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts +0 -12
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +0 -35
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts +0 -15
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +0 -49
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts +0 -12
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js +0 -44
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts +0 -16
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +0 -63
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +0 -1
- package/lib/Core/Components/EmptyContainer.d.ts +0 -5
- package/lib/Core/Components/EmptyContainer.d.ts.map +0 -1
- package/lib/Core/Components/EmptyContainer.js +0 -12
- package/lib/Core/Components/EmptyContainer.js.map +0 -1
- package/lib/Core/Components/GroupRenderer.d.ts.map +0 -1
- package/lib/Core/Components/GroupRenderer.js +0 -240
- package/lib/Core/Components/GroupRenderer.js.map +0 -1
- package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts +0 -6
- package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts.map +0 -1
- package/lib/Core/Components/Toolbar/KeyboardInstructions.js +0 -32
- package/lib/Core/Components/Toolbar/KeyboardInstructions.js.map +0 -1
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +0 -8
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +0 -1
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +0 -61
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +0 -1
- package/lib/Core/Hooks/useSelect.d.ts +0 -9
- package/lib/Core/Hooks/useSelect.d.ts.map +0 -1
- package/lib/Core/Hooks/useSelect.js +0 -24
- package/lib/Core/Hooks/useSelect.js.map +0 -1
- package/lib/Core/Views/Gallery/ItemWrapper.d.ts +0 -19
- package/lib/Core/Views/Gallery/ItemWrapper.d.ts.map +0 -1
- package/lib/Core/Views/Gallery/ItemWrapper.js +0 -34
- package/lib/Core/Views/Gallery/ItemWrapper.js.map +0 -1
- package/lib/Core/Views/Timeline/utility.d.ts +0 -8
- package/lib/Core/Views/Timeline/utility.d.ts.map +0 -1
- package/lib/Core/Views/Timeline/utility.js +0 -120
- package/lib/Core/Views/Timeline/utility.js.map +0 -1
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export default RadioGroup;
|
|
2
|
-
declare function RadioGroup(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace RadioGroup {
|
|
4
|
-
namespace propTypes {
|
|
5
|
-
let onCancel: PropTypes.Validator<(...args: any[]) => any>;
|
|
6
|
-
let onSubmit: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
|
-
let getField: PropTypes.Validator<(...args: any[]) => any>;
|
|
8
|
-
let getValue: PropTypes.Validator<(...args: any[]) => any>;
|
|
9
|
-
let getFormatter: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
|
-
let renderFactory: PropTypes.Validator<(...args: any[]) => any>;
|
|
11
|
-
let resolveCellComponent: PropTypes.Validator<(...args: any[]) => any>;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
import PropTypes from 'prop-types';
|
|
15
|
-
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.jsx"],"names":[],"mappings":";AAQA,iFA+CC;;;;;;;;;;;;sBAtDqB,YAAY"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import { RadioButton, RadioCheckGroup } from '@pega/cosmos-react-core';
|
|
6
|
-
const StyledRadioGroup = styled.div ``;
|
|
7
|
-
function RadioGroup(props) {
|
|
8
|
-
const { getField, getValue, getFormatter, renderFactory, resolveCellComponent } = props;
|
|
9
|
-
const field = getField();
|
|
10
|
-
const { id } = field;
|
|
11
|
-
const oldValue = getValue();
|
|
12
|
-
const translatedValue = oldValue === 'null' || oldValue === '' || oldValue === null || typeof oldValue === 'undefined'
|
|
13
|
-
? 'Empty'
|
|
14
|
-
: oldValue;
|
|
15
|
-
const [value, setValue] = useState(translatedValue);
|
|
16
|
-
const radioOptions = field.type === 'boolean' ? [true, false, 'Empty'] : field.filterPickListOptions;
|
|
17
|
-
const onChange = event => {
|
|
18
|
-
setValue(event.target.id);
|
|
19
|
-
let newValue = event.target.id;
|
|
20
|
-
if (field.type === 'boolean') {
|
|
21
|
-
if (event.target.id === 'Empty')
|
|
22
|
-
newValue = null;
|
|
23
|
-
else
|
|
24
|
-
newValue = event.target.id === 'true';
|
|
25
|
-
}
|
|
26
|
-
props.onSubmit({ oldValue, newValue });
|
|
27
|
-
};
|
|
28
|
-
return (_jsx(StyledRadioGroup, { children: _jsx(RadioCheckGroup, { name: id, children: radioOptions.map(item => {
|
|
29
|
-
const checkedProp = {};
|
|
30
|
-
if (item === value)
|
|
31
|
-
checkedProp.defaultChecked = true;
|
|
32
|
-
return (_jsx(RadioButton, { id: `${item}`, name: `${item}`, onClick: onChange, label: resolveCellComponent('cellRenderer', renderFactory, {
|
|
33
|
-
...props,
|
|
34
|
-
getValue: () => item.toString(),
|
|
35
|
-
getFormattedValue: () => getFormatter?.()?.(item) || item.toString()
|
|
36
|
-
}), ...checkedProp }, `${item}`));
|
|
37
|
-
}) }) }));
|
|
38
|
-
}
|
|
39
|
-
RadioGroup.propTypes = {
|
|
40
|
-
onCancel: PropTypes.func.isRequired,
|
|
41
|
-
onSubmit: PropTypes.func.isRequired,
|
|
42
|
-
getField: PropTypes.func.isRequired,
|
|
43
|
-
getValue: PropTypes.func.isRequired,
|
|
44
|
-
getFormatter: PropTypes.func.isRequired,
|
|
45
|
-
renderFactory: PropTypes.func.isRequired,
|
|
46
|
-
resolveCellComponent: PropTypes.func.isRequired
|
|
47
|
-
};
|
|
48
|
-
export default RadioGroup;
|
|
49
|
-
//# sourceMappingURL=Radio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEvE,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAA,EAAE,CAAC;AAEtC,SAAS,UAAU,CAAC,KAAK;IACvB,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,GAAG,KAAK,CAAC;IACxF,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACrB,MAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC;IAC5B,MAAM,eAAe,GACnB,QAAQ,KAAK,MAAM,IAAI,QAAQ,KAAK,EAAE,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,KAAK,WAAW;QAC5F,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,QAAQ,CAAC;IACf,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,eAAe,C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AAC,IAAI,IAAI,CAAC,QAAQ,EAAE;qBACrE,CAAC,KACE,WAAW,IATV,GAAG,IAAI,EAAE,CAUd,CACH,CAAC;YACJ,CAAC,CAAC,GACc,GACD,CACpB,CAAC;AACJ,CAAC;AAED,UAAU,CAAC,SAAS,GAAG;IACrB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACvC,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACxC,oBAAoB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAChD,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nimport { RadioButton, RadioCheckGroup } from '@pega/cosmos-react-core';\n\nconst StyledRadioGroup = styled.div``;\n\nfunction RadioGroup(props) {\n const { getField, getValue, getFormatter, renderFactory, resolveCellComponent } = props;\n const field = getField();\n const { id } = field;\n const oldValue = getValue();\n const translatedValue =\n oldValue === 'null' || oldValue === '' || oldValue === null || typeof oldValue === 'undefined'\n ? 'Empty'\n : oldValue;\n const [value, setValue] = useState(translatedValue);\n const radioOptions =\n field.type === 'boolean' ? [true, false, 'Empty'] : field.filterPickListOptions;\n const onChange = event => {\n setValue(event.target.id);\n let newValue = event.target.id;\n if (field.type === 'boolean') {\n if (event.target.id === 'Empty') newValue = null;\n else newValue = event.target.id === 'true';\n }\n props.onSubmit({ oldValue, newValue });\n };\n\n return (\n <StyledRadioGroup>\n <RadioCheckGroup name={id}>\n {radioOptions.map(item => {\n const checkedProp = {};\n if (item === value) checkedProp.defaultChecked = true;\n\n return (\n <RadioButton\n key={`${item}`}\n id={`${item}`}\n name={`${item}`}\n onClick={onChange}\n label={resolveCellComponent('cellRenderer', renderFactory, {\n ...props,\n getValue: () => item.toString(),\n getFormattedValue: () => getFormatter?.()?.(item) || item.toString()\n })}\n {...checkedProp}\n />\n );\n })}\n </RadioCheckGroup>\n </StyledRadioGroup>\n );\n}\n\nRadioGroup.propTypes = {\n onCancel: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n getField: PropTypes.func.isRequired,\n getValue: PropTypes.func.isRequired,\n getFormatter: PropTypes.func.isRequired,\n renderFactory: PropTypes.func.isRequired,\n resolveCellComponent: PropTypes.func.isRequired\n};\n\nexport default RadioGroup;\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default TextInput;
|
|
2
|
-
declare function TextInput(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace TextInput {
|
|
4
|
-
namespace propTypes {
|
|
5
|
-
let onCancel: PropTypes.Validator<(...args: any[]) => any>;
|
|
6
|
-
let onSubmit: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
|
-
let getField: PropTypes.Validator<(...args: any[]) => any>;
|
|
8
|
-
let getValue: PropTypes.Validator<(...args: any[]) => any>;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
import PropTypes from 'prop-types';
|
|
12
|
-
//# sourceMappingURL=TextInput.d.ts.map
|
package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.jsx"],"names":[],"mappings":";AASA,gFA2CC;;;;;;;;;sBAnDqB,YAAY"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useRef, useEffect } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { Input } from '@pega/cosmos-react-core';
|
|
5
|
-
const styles = {
|
|
6
|
-
input: { width: '100%', outline: 'none', border: 'none', boxShadow: 'none' }
|
|
7
|
-
};
|
|
8
|
-
function TextInput(props) {
|
|
9
|
-
const { getField, getValue } = props;
|
|
10
|
-
const { type } = getField();
|
|
11
|
-
const oldValue = getValue();
|
|
12
|
-
const [value, setValue] = useState(oldValue);
|
|
13
|
-
const inputRef = useRef(null);
|
|
14
|
-
const onChange = event => {
|
|
15
|
-
let { value: val } = event.target;
|
|
16
|
-
if (type?.toLowerCase() === 'number') {
|
|
17
|
-
val = parseInt(val, 10);
|
|
18
|
-
}
|
|
19
|
-
setValue(val);
|
|
20
|
-
};
|
|
21
|
-
const onKeyDown = event => {
|
|
22
|
-
if (event.key === 'Enter') {
|
|
23
|
-
props.onSubmit({ oldValue, newValue: value });
|
|
24
|
-
}
|
|
25
|
-
else if (event.key === 'Escape') {
|
|
26
|
-
props.onCancel();
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const onBlur = () => props.onSubmit({ oldValue, newValue: value });
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
inputRef.current?.focus();
|
|
32
|
-
}, [inputRef]);
|
|
33
|
-
return (_jsx(Input, { ...props, value: value, type: type, style: styles.input, ref: ref => {
|
|
34
|
-
inputRef.current = ref;
|
|
35
|
-
}, onChange: onChange, onBlur: onBlur, onKeyDown: onKeyDown }));
|
|
36
|
-
}
|
|
37
|
-
TextInput.propTypes = {
|
|
38
|
-
onCancel: PropTypes.func.isRequired,
|
|
39
|
-
onSubmit: PropTypes.func.isRequired,
|
|
40
|
-
getField: PropTypes.func.isRequired,
|
|
41
|
-
getValue: PropTypes.func.isRequired
|
|
42
|
-
};
|
|
43
|
-
export default TextInput;
|
|
44
|
-
//# sourceMappingURL=TextInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/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AAC;YAClC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACnB,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IAEnE,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,KAAC,KAAK,OACA,KAAK,EACT,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,GAAG,EAAE,GAAG,CAAC,EAAE;YACT,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC;QACzB,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC;AAED,SAAS,CAAC,SAAS,GAAG;IACpB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CACpC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["import { useState, useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Input } from '@pega/cosmos-react-core';\n\nconst styles = {\n input: { width: '100%', outline: 'none', border: 'none', boxShadow: 'none' }\n};\n\nfunction TextInput(props) {\n const { getField, getValue } = props;\n const { type } = getField();\n const oldValue = getValue();\n const [value, setValue] = useState(oldValue);\n const inputRef = useRef(null);\n\n const onChange = event => {\n let { value: val } = event.target;\n if (type?.toLowerCase() === 'number') {\n val = parseInt(val, 10);\n }\n setValue(val);\n };\n\n const onKeyDown = event => {\n if (event.key === 'Enter') {\n props.onSubmit({ oldValue, newValue: value });\n } else if (event.key === 'Escape') {\n props.onCancel();\n }\n };\n\n const onBlur = () => props.onSubmit({ oldValue, newValue: value });\n\n useEffect(() => {\n inputRef.current?.focus();\n }, [inputRef]);\n\n return (\n <Input\n {...props}\n value={value}\n type={type}\n style={styles.input}\n ref={ref => {\n inputRef.current = ref;\n }}\n onChange={onChange}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n />\n );\n}\n\nTextInput.propTypes = {\n onCancel: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n getField: PropTypes.func.isRequired,\n getValue: PropTypes.func.isRequired\n};\n\nexport default TextInput;\n"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export default Editor;
|
|
2
|
-
declare function Editor(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace Editor {
|
|
4
|
-
namespace propTypes {
|
|
5
|
-
let getField: PropTypes.Validator<(...args: any[]) => any>;
|
|
6
|
-
let onCancel: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
|
-
let getElement: PropTypes.Validator<(...args: any[]) => any>;
|
|
8
|
-
let setEditContext: PropTypes.Validator<(...args: any[]) => any>;
|
|
9
|
-
let getFormatter: PropTypes.Validator<(...args: any[]) => any>;
|
|
10
|
-
let getValue: PropTypes.Validator<(...args: any[]) => any>;
|
|
11
|
-
let renderFactory: PropTypes.Validator<(...args: any[]) => any>;
|
|
12
|
-
let resolveCellComponent: PropTypes.Validator<(...args: any[]) => any>;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
import PropTypes from 'prop-types';
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/index.jsx"],"names":[],"mappings":";AAaA,6EA8DC;;;;;;;;;;;;;sBA3EqB,YAAY"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { Popover, useElement, useOuterEvent } from '@pega/cosmos-react-core';
|
|
5
|
-
import TextInput from './TextInput';
|
|
6
|
-
import DateTime from './DateTime';
|
|
7
|
-
import Radio from './Radio';
|
|
8
|
-
const StyledPopover = styled.div `
|
|
9
|
-
padding: 1rem;
|
|
10
|
-
min-width: 7rem;
|
|
11
|
-
`;
|
|
12
|
-
function Editor(props) {
|
|
13
|
-
const { getField, onCancel, getElement, setEditContext, getFormatter, getValue, renderFactory, resolveCellComponent } = props;
|
|
14
|
-
setEditContext();
|
|
15
|
-
const { type, filterPickList, filterPickListOptions } = getField();
|
|
16
|
-
const showInPopOver = type === 'boolean' || (filterPickList && filterPickListOptions);
|
|
17
|
-
const [popperRef, setPopperRef] = useElement();
|
|
18
|
-
const [popperTarget, setPopperTarget] = useElement(getElement());
|
|
19
|
-
useOuterEvent('mousedown', [popperRef], () => {
|
|
20
|
-
setPopperTarget(null);
|
|
21
|
-
if (showInPopOver)
|
|
22
|
-
onCancel();
|
|
23
|
-
});
|
|
24
|
-
let Component = null;
|
|
25
|
-
switch (type) {
|
|
26
|
-
case 'text':
|
|
27
|
-
case 'number':
|
|
28
|
-
Component = TextInput;
|
|
29
|
-
break;
|
|
30
|
-
case 'date':
|
|
31
|
-
case 'datetime':
|
|
32
|
-
Component = DateTime;
|
|
33
|
-
break;
|
|
34
|
-
case 'boolean':
|
|
35
|
-
Component = Radio;
|
|
36
|
-
break;
|
|
37
|
-
default:
|
|
38
|
-
Component = TextInput;
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
if (filterPickList && filterPickListOptions) {
|
|
42
|
-
Component = Radio;
|
|
43
|
-
}
|
|
44
|
-
if (!showInPopOver)
|
|
45
|
-
return _jsx(Component, { ...props });
|
|
46
|
-
const value = getValue();
|
|
47
|
-
return (_jsxs(_Fragment, { children: [resolveCellComponent('cellRenderer', renderFactory, {
|
|
48
|
-
...props,
|
|
49
|
-
getFormattedValue: () => getFormatter?.()?.(value) || value
|
|
50
|
-
}), showInPopOver && (_jsx(Popover, { ref: setPopperRef, className: 'editpopper', target: popperTarget, children: _jsx(StyledPopover, { children: _jsx(Component, { ...props }) }) }))] }));
|
|
51
|
-
}
|
|
52
|
-
Editor.propTypes = {
|
|
53
|
-
getField: PropTypes.func.isRequired,
|
|
54
|
-
onCancel: PropTypes.func.isRequired,
|
|
55
|
-
getElement: PropTypes.func.isRequired,
|
|
56
|
-
setEditContext: PropTypes.func.isRequired,
|
|
57
|
-
getFormatter: PropTypes.func.isRequired,
|
|
58
|
-
getValue: PropTypes.func.isRequired,
|
|
59
|
-
renderFactory: PropTypes.func.isRequired,
|
|
60
|
-
resolveCellComponent: PropTypes.func.isRequired
|
|
61
|
-
};
|
|
62
|
-
export default Editor;
|
|
63
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/index.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7E,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAG/B,CAAC;AACF,SAAS,MAAM,CAAC,KAAK;IACnB,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,cAAc,EACd,YAAY,EACZ,QAA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AC,YAAY,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK;aAC5D,CAAC,EAED,aAAa,IAAI,CAChB,KAAC,OAAO,IAAC,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,YAAY,EAAC,MAAM,EAAE,YAAY,YACrE,KAAC,aAAa,cACZ,KAAC,SAAS,OAAK,KAAK,GAAI,GACV,GACR,CACX,IACA,CACJ,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,SAAS,GAAG;IACjB,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACrC,cAAc,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACzC,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACvC,QAAQ,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACnC,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACxC,oBAAoB,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;CAChD,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nimport { Popover, useElement, useOuterEvent } from '@pega/cosmos-react-core';\n\nimport TextInput from './TextInput';\nimport DateTime from './DateTime';\nimport Radio from './Radio';\n\nconst StyledPopover = styled.div`\n padding: 1rem;\n min-width: 7rem;\n`;\nfunction Editor(props) {\n const {\n getField,\n onCancel,\n getElement,\n setEditContext,\n getFormatter,\n getValue,\n renderFactory,\n resolveCellComponent\n } = props;\n setEditContext();\n\n const { type, filterPickList, filterPickListOptions } = getField();\n const showInPopOver = type === 'boolean' || (filterPickList && filterPickListOptions);\n const [popperRef, setPopperRef] = useElement();\n const [popperTarget, setPopperTarget] = useElement(getElement());\n\n useOuterEvent('mousedown', [popperRef], () => {\n setPopperTarget(null);\n if (showInPopOver) onCancel();\n });\n let Component = null;\n switch (type) {\n case 'text':\n case 'number':\n Component = TextInput;\n break;\n case 'date':\n case 'datetime':\n Component = DateTime;\n break;\n case 'boolean':\n Component = Radio;\n break;\n\n default:\n Component = TextInput;\n break;\n }\n if (filterPickList && filterPickListOptions) {\n Component = Radio;\n }\n\n if (!showInPopOver) return <Component {...props} />;\n const value = getValue();\n return (\n <>\n {resolveCellComponent('cellRenderer', renderFactory, {\n ...props,\n getFormattedValue: () => getFormatter?.()?.(value) || value\n })}\n\n {showInPopOver && (\n <Popover ref={setPopperRef} className='editpopper' target={popperTarget}>\n <StyledPopover>\n <Component {...props} />\n </StyledPopover>\n </Popover>\n )}\n </>\n );\n}\n\nEditor.propTypes = {\n getField: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n getElement: PropTypes.func.isRequired,\n setEditContext: PropTypes.func.isRequired,\n getFormatter: PropTypes.func.isRequired,\n getValue: PropTypes.func.isRequired,\n renderFactory: PropTypes.func.isRequired,\n resolveCellComponent: PropTypes.func.isRequired\n};\n\nexport default Editor;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyContainer.d.ts","sourceRoot":"","sources":["../../../Core/Components/EmptyContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAMlE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,WAAW,CAAC,IAAI,CAAA;CAAE,kDAM1E"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// TODO remove ts-ignore once ComponentResolverFactory migrated to TS
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import { resolveViewComponent } from './RenderingEngine/ComponentResolverFactory';
|
|
5
|
-
export default function EmptyContainer({ view }) {
|
|
6
|
-
const { domContainer, hasNoRecords, renderFactory, getContext } = view;
|
|
7
|
-
if (domContainer && hasNoRecords) {
|
|
8
|
-
return _jsxs(_Fragment, { children: [" ", resolveViewComponent('emptyContainerRenderer', renderFactory, getContext()), " "] });
|
|
9
|
-
}
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=EmptyContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyContainer.js","sourceRoot":"","sources":["../../../Core/Components/EmptyContainer.tsx"],"names":[],"mappings":";AAEA,qEAAqE;AACrE,aAAa;AACb,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAElF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,IAAI,EAA8B;IACzE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IACvE,IAAI,YAAY,IAAI,YAAY,EAAE,CAAC;QACjC,OAAO,mCAAI,oBAAoB,CAAC,wBAAwB,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,SAAK,CAAC;IAC9F,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { RsCoreTypes } from 'pega-repeating-structures-core';\n\n// TODO remove ts-ignore once ComponentResolverFactory migrated to TS\n// @ts-ignore\nimport { resolveViewComponent } from './RenderingEngine/ComponentResolverFactory';\n\nexport default function EmptyContainer({ view }: { view: RsCoreTypes.View }) {\n const { domContainer, hasNoRecords, renderFactory, getContext } = view;\n if (domContainer && hasNoRecords) {\n return <> {resolveViewComponent('emptyContainerRenderer', renderFactory, getContext())} </>;\n }\n return null;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GroupRenderer.d.ts","sourceRoot":"","sources":["../../../Core/Components/GroupRenderer.jsx"],"names":[],"mappings":"AA6NA;;;mDAyGC;;;;;;;;;;sBAtUqB,YAAY"}
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { useRef } from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import { Icon } from '@pega/cosmos-react-core';
|
|
6
|
-
import BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';
|
|
7
|
-
import { getGroupFromKey } from 'pega-ui-list-data-apis';
|
|
8
|
-
import { createClassName as cx } from '../Utils';
|
|
9
|
-
import useTranslate from '../Hooks/useTranslate';
|
|
10
|
-
import { customFunctions, intervalGroupingBoundaries } from '../constants';
|
|
11
|
-
import AggregatorCell from './AggregatorCell';
|
|
12
|
-
import RenderingEngine from './RenderingEngine/RenderCell';
|
|
13
|
-
import DateValueDisplay from './DateValueDisplay';
|
|
14
|
-
import TestIdConstants from './TestIdConstants';
|
|
15
|
-
const groupheaderleftdisplacement = headerLevel => `${(headerLevel.level + 1) * 0.5}rem`;
|
|
16
|
-
/**
|
|
17
|
-
* TODO: remove currentColor style after cosmos fixes the issue
|
|
18
|
-
* Cosmos yet to handle dark theme on BareButton
|
|
19
|
-
*/
|
|
20
|
-
const StyledGroupHeader = styled.div `
|
|
21
|
-
--group-left: ${props => groupheaderleftdisplacement(props.groupHeader)};
|
|
22
|
-
--group-bg-color: ${props => props.theme.base.palette['secondary-background']};
|
|
23
|
-
background-color: var(--group-bg-color);
|
|
24
|
-
&:has(button[aria-expanded='true']) {
|
|
25
|
-
filter: ${props => props.theme.base.shadow['low-filter']};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&.row.sticky-group-header {
|
|
29
|
-
position: sticky;
|
|
30
|
-
display: block;
|
|
31
|
-
top: calc(
|
|
32
|
-
${props => props.groupHeader.isLeafNode && props.groupHeader.level !== 0
|
|
33
|
-
? 'calc(var(--row-height) + var(--group-header-height))'
|
|
34
|
-
: 'var(--row-height)'}
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
/* z-index starting from 8 because freeze-line has z-index 7 */
|
|
38
|
-
z-index: ${props => `${8 + props.groupHeader.index}`};
|
|
39
|
-
> .cell-action,
|
|
40
|
-
.cell-fixed {
|
|
41
|
-
background-color: var(--group-bg-color);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.group-label {
|
|
46
|
-
width: 0.437rem;
|
|
47
|
-
display: inline-block;
|
|
48
|
-
flex-shrink: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.group-header-groupby {
|
|
52
|
-
font-weight: ${props => props.theme.base['font-weight'].normal};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.group-context-count .group-count {
|
|
56
|
-
font-weight: ${props => props.theme.base['font-weight'].bold};
|
|
57
|
-
white-space: pre;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&.row.group-header-row {
|
|
61
|
-
height: auto;
|
|
62
|
-
border-bottom: ${props => (!props.isAggregationApplied ? 'var(--border-style)' : 'none')};
|
|
63
|
-
|
|
64
|
-
.group-header-aggregation-row {
|
|
65
|
-
display: flex;
|
|
66
|
-
|
|
67
|
-
/* Using height 0 so that the aggregations aren't visible when not applied but the cells can take the width and stretch the group header to the full width */
|
|
68
|
-
height: ${props => (props.isAggregationApplied ? 'var(--group-header-height)' : 0)};
|
|
69
|
-
|
|
70
|
-
&::before {
|
|
71
|
-
content: '';
|
|
72
|
-
position: sticky;
|
|
73
|
-
inset-block-start: 0;
|
|
74
|
-
inset-inline-start: 0;
|
|
75
|
-
width: 0.25rem;
|
|
76
|
-
height: 100%;
|
|
77
|
-
background-color: ${props => props.groupHeader.colorIndicator};
|
|
78
|
-
z-index: 12;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&.group-header-row .stickyGroupHeader {
|
|
84
|
-
position: sticky;
|
|
85
|
-
left: 0;
|
|
86
|
-
width: 0;
|
|
87
|
-
z-index: 10;
|
|
88
|
-
height: var(--group-header-height);
|
|
89
|
-
|
|
90
|
-
> button {
|
|
91
|
-
color: currentColor;
|
|
92
|
-
position: absolute;
|
|
93
|
-
left: 0;
|
|
94
|
-
top: 0;
|
|
95
|
-
bottom: 0;
|
|
96
|
-
width: max-content;
|
|
97
|
-
max-width: var(--container-width);
|
|
98
|
-
display: flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
background-color: var(--group-bg-color);
|
|
101
|
-
padding-left: var(--group-left);
|
|
102
|
-
margin-inline-start: 0.25rem;
|
|
103
|
-
z-index: 30;
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
white-space: nowrap;
|
|
106
|
-
text-align: inherit;
|
|
107
|
-
font-stretch: inherit;
|
|
108
|
-
|
|
109
|
-
> .group-wrapper {
|
|
110
|
-
margin-inline-start: ${({ groupHeader, theme }) => groupHeader.count === 0 ? `calc(${theme.base.spacing} * 2.25)` : 'unset'};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.cell-content {
|
|
114
|
-
max-height: var(--group-header-height);
|
|
115
|
-
padding: 0;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
button:focus {
|
|
119
|
-
box-shadow: ${({ theme }) => theme.base.shadow['focus-inset']};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&::before {
|
|
123
|
-
content: '';
|
|
124
|
-
position: absolute;
|
|
125
|
-
inset-block-start: 0;
|
|
126
|
-
inset-inline-start: 0;
|
|
127
|
-
width: 0.25rem;
|
|
128
|
-
height: 100%;
|
|
129
|
-
background-color: ${props => props.groupHeader.colorIndicator};
|
|
130
|
-
z-index: 12;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
.group-header.cell {
|
|
134
|
-
left: 0;
|
|
135
|
-
padding-left: var(--group-left);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
div.group-header.cell-fixed {
|
|
139
|
-
background-color: var(--group-bg-color);
|
|
140
|
-
}
|
|
141
|
-
`;
|
|
142
|
-
/**
|
|
143
|
-
* Returns label for interval grouping based on interval and boundaries
|
|
144
|
-
Response data depends on boundary settings.
|
|
145
|
-
Ex: For sample data of profit
|
|
146
|
-
profit --> cases(count)
|
|
147
|
-
{'0': 10, 1': 100, '2':30, '10': 35, '15':45, '20':2}
|
|
148
|
-
For Interval 10
|
|
149
|
-
If the boundary is 'include-lower-only',
|
|
150
|
-
and value is 10 then label -> 10 to 20
|
|
151
|
-
|
|
152
|
-
If boundary is 'include-upper-only',
|
|
153
|
-
and value is 10 then label -> 0 to 10
|
|
154
|
-
* */
|
|
155
|
-
function buildIntervalGroupingLabel(value, customFunction, translate) {
|
|
156
|
-
const { interval, boundaries } = customFunction;
|
|
157
|
-
// To restrict the decimals in labels
|
|
158
|
-
const intervalDecimalLength = (interval.toString().split('.')[1] || '').length;
|
|
159
|
-
value = Number(value);
|
|
160
|
-
// In case of 'include-lower-only'
|
|
161
|
-
let lowerValue = value.toFixed(intervalDecimalLength);
|
|
162
|
-
let upperValue = (value + interval).toFixed(intervalDecimalLength);
|
|
163
|
-
// In case of boundary 'include-upper-only'
|
|
164
|
-
if (boundaries === intervalGroupingBoundaries.includeUpperOnly) {
|
|
165
|
-
lowerValue = (value - interval).toFixed(intervalDecimalLength);
|
|
166
|
-
upperValue = value.toFixed(intervalDecimalLength);
|
|
167
|
-
}
|
|
168
|
-
return `${lowerValue} ${translate('to')} ${upperValue}`;
|
|
169
|
-
}
|
|
170
|
-
function GroupName({ view, column, groupHeader, dateFunction, customFunction }) {
|
|
171
|
-
const [translate] = useTranslate();
|
|
172
|
-
const { locale, timezone } = view.meta;
|
|
173
|
-
const isRangeGrouping = customFunction?.type === customFunctions.RANGE_GROUPING;
|
|
174
|
-
const isIntervalGrouping = customFunction?.type === customFunctions.INTERVAL_GROUPING;
|
|
175
|
-
if (dateFunction) {
|
|
176
|
-
return (_jsx(DateValueDisplay, { value: groupHeader.name, dateFunction: dateFunction, locale: locale, timezone: timezone }));
|
|
177
|
-
}
|
|
178
|
-
if (isRangeGrouping) {
|
|
179
|
-
/** If custom range grouping applied on number field , we need to show group name as text instead of number */
|
|
180
|
-
return groupHeader.name;
|
|
181
|
-
}
|
|
182
|
-
if (isIntervalGrouping) {
|
|
183
|
-
/** If custom range grouping applied on number , we need to show group name based on value and custom function details like interval and boundaries */
|
|
184
|
-
return buildIntervalGroupingLabel(groupHeader.name, customFunction, translate);
|
|
185
|
-
}
|
|
186
|
-
column.setExecutionContext(null); // If null is not set then it will execute on the previous row context and facing issues when cell is edited. Based on column.editMode and current context renderer varies (it can be cellEditRenderer)
|
|
187
|
-
const columnRendererProps = {
|
|
188
|
-
...column.getRenderingEngineProps(),
|
|
189
|
-
context: {
|
|
190
|
-
getValue: () => groupHeader.name,
|
|
191
|
-
getExecutionContext: () => {
|
|
192
|
-
return { getValue: () => groupHeader.data, name: 'groupHeader' };
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
return _jsx(RenderingEngine, { ...columnRendererProps });
|
|
197
|
-
}
|
|
198
|
-
// NOTE: While making any changes in GroupRenderer.jsx, also make similar changes in HierarchicalGroupRenderer.jsx file if applicable
|
|
199
|
-
export default function GroupHeader({ groupHeader, columns }) {
|
|
200
|
-
const buttonRef = useRef();
|
|
201
|
-
// TODO: This we are adding temporary to show freeze border until we make group header rendering change
|
|
202
|
-
// when we will pick up aggregation.
|
|
203
|
-
if (!groupHeader.isVisible)
|
|
204
|
-
return null;
|
|
205
|
-
const view = columns[0].parent;
|
|
206
|
-
// If grouping by a regular column (i.e. without a dateFunction), determine props for the renderer
|
|
207
|
-
const { columnId, dateFunction, customFunction } = getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};
|
|
208
|
-
// if state.groups is not yet prepared/updated, then getGroupFromKey will return undefined
|
|
209
|
-
if (!columnId) {
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
const column = columns.find(c => c.field.id === columnId);
|
|
213
|
-
const formatter = view.getFormatterByKey('Integer');
|
|
214
|
-
const { locale } = view.meta;
|
|
215
|
-
const groupCountFormatted = formatter
|
|
216
|
-
? formatter(groupHeader.count, { locale })
|
|
217
|
-
: groupHeader.count;
|
|
218
|
-
const isAggregationApplied = columns.filter(c => !c.hidden).some(c => c.aggregated);
|
|
219
|
-
return (_jsxs(StyledGroupHeader, { groupHeader: groupHeader, className: cx('row group-header-row sticky-group-header'), "data-test-id": 'groupHeader', "data-testid": TestIdConstants.groupHeader, isAggregationApplied: isAggregationApplied, role: 'row', onFocus: e => {
|
|
220
|
-
if (buttonRef.current && !e.currentTarget.contains(e.relatedTarget)) {
|
|
221
|
-
e.preventDefault();
|
|
222
|
-
buttonRef.current.focus();
|
|
223
|
-
}
|
|
224
|
-
}, children: [_jsx("div", { className: 'stickyGroupHeader', children: _jsxs(BareButton, { ref: buttonRef, "aria-label": `${column.field.hideGroupColumnNameLabel ? '' : groupHeader.label} ${groupHeader.name}, ${groupCountFormatted} items`, "aria-expanded": !!groupHeader.isExpanded, style: {
|
|
225
|
-
paddingRight: 'var(--group-left)'
|
|
226
|
-
}, onClick: () => groupHeader.count > 0 && view.type.toggleGroupExpansion({ groupHeader }), tabIndex: -1, children: [groupHeader.count > 0 &&
|
|
227
|
-
(groupHeader.isExpanded ? _jsx(Icon, { name: 'caret-down' }) : _jsx(Icon, { name: 'caret-right' })), _jsxs("div", { className: 'group-wrapper', children: [_jsx("div", { className: 'group-label' }), !column.field.hideGroupColumnNameLabel && (_jsxs("span", { className: 'group-header-groupby', "data-test-id": groupHeader.groupBy, "data-testid": `${TestIdConstants.groupHeaderGroupBy}-${groupHeader.groupBy}`, children: [groupHeader.label, ":"] })), _jsx("div", { className: 'group-label' }), _jsxs("span", { className: 'group-context-count', style: { display: 'inline-flex' }, "data-test-id": 'groupHeader', "data-testid": TestIdConstants.groupHeaderCount, children: [_jsx(GroupName, { view: view, column: column, groupHeader: groupHeader, dateFunction: dateFunction, customFunction: customFunction }), _jsx("span", { className: 'group-count', children: ` (${groupCountFormatted})` })] })] })] }) }), _jsx("div", { className: 'group-header-aggregation-row', children: columns.map(c => {
|
|
228
|
-
const cxt = {
|
|
229
|
-
getValue: () => groupHeader?.aggregation?.[c.field.name]?.[c.aggregationType?.toLowerCase()]
|
|
230
|
-
};
|
|
231
|
-
return (_jsx(AggregatorCell, { column: c, context: cxt, className: cx('cell', {
|
|
232
|
-
'cell-fixed': column.frozen
|
|
233
|
-
}) }, c.field.id));
|
|
234
|
-
}) })] }));
|
|
235
|
-
}
|
|
236
|
-
GroupHeader.propTypes = {
|
|
237
|
-
columns: PropTypes.arrayOf(PropTypes.any).isRequired,
|
|
238
|
-
groupHeader: PropTypes.objectOf(PropTypes.any).isRequired
|
|
239
|
-
};
|
|
240
|
-
//# sourceMappingURL=GroupRenderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GroupRenderer.js","sourceRoot":"","sources":["../../../Core/Components/GroupRenderer.jsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,UAAU,MAAM,0DAA0D,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,eAAe,IAAI,EAAE,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,2BAA2B,GAAG,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,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components';\n\nimport { Icon } from '@pega/cosmos-react-core';\nimport BareButton from '@pega/cosmos-react-core/lib/components/Button/BareButton';\nimport { getGroupFromKey } from 'pega-ui-list-data-apis';\n\nimport { createClassName as cx } from '../Utils';\nimport useTranslate from '../Hooks/useTranslate';\nimport { customFunctions, intervalGroupingBoundaries } from '../constants';\n\nimport AggregatorCell from './AggregatorCell';\nimport RenderingEngine from './RenderingEngine/RenderCell';\nimport DateValueDisplay from './DateValueDisplay';\nimport TestIdConstants from './TestIdConstants';\n\nconst groupheaderleftdisplacement = headerLevel => `${(headerLevel.level + 1) * 0.5}rem`;\n/**\n * TODO: remove currentColor style after cosmos fixes the issue\n * Cosmos yet to handle dark theme on BareButton\n */\n\nconst StyledGroupHeader = styled.div`\n --group-left: ${props => groupheaderleftdisplacement(props.groupHeader)};\n --group-bg-color: ${props => props.theme.base.palette['secondary-background']};\n background-color: var(--group-bg-color);\n &:has(button[aria-expanded='true']) {\n filter: ${props => props.theme.base.shadow['low-filter']};\n }\n\n &.row.sticky-group-header {\n position: sticky;\n display: block;\n top: calc(\n ${props =>\n props.groupHeader.isLeafNode && props.groupHeader.level !== 0\n ? 'calc(var(--row-height) + var(--group-header-height))'\n : 'var(--row-height)'}\n );\n\n /* z-index starting from 8 because freeze-line has z-index 7 */\n z-index: ${props => `${8 + props.groupHeader.index}`};\n > .cell-action,\n .cell-fixed {\n background-color: var(--group-bg-color);\n }\n }\n\n .group-label {\n width: 0.437rem;\n display: inline-block;\n flex-shrink: 0;\n }\n\n .group-header-groupby {\n font-weight: ${props => props.theme.base['font-weight'].normal};\n }\n\n .group-context-count .group-count {\n font-weight: ${props => props.theme.base['font-weight'].bold};\n white-space: pre;\n }\n\n &.row.group-header-row {\n height: auto;\n border-bottom: ${props => (!props.isAggregationApplied ? 'var(--border-style)' : 'none')};\n\n .group-header-aggregation-row {\n display: flex;\n\n /* Using height 0 so that the aggregations aren't visible when not applied but the cells can take the width and stretch the group header to the full width */\n height: ${props => (props.isAggregationApplied ? 'var(--group-header-height)' : 0)};\n\n &::before {\n content: '';\n position: sticky;\n inset-block-start: 0;\n inset-inline-start: 0;\n width: 0.25rem;\n height: 100%;\n background-color: ${props => props.groupHeader.colorIndicator};\n z-index: 12;\n }\n }\n }\n\n &.group-header-row .stickyGroupHeader {\n position: sticky;\n left: 0;\n width: 0;\n z-index: 10;\n height: var(--group-header-height);\n\n > button {\n color: currentColor;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: max-content;\n max-width: var(--container-width);\n display: flex;\n align-items: center;\n background-color: var(--group-bg-color);\n padding-left: var(--group-left);\n margin-inline-start: 0.25rem;\n z-index: 30;\n cursor: pointer;\n white-space: nowrap;\n text-align: inherit;\n font-stretch: inherit;\n\n > .group-wrapper {\n margin-inline-start: ${({ groupHeader, theme }) =>\n groupHeader.count === 0 ? `calc(${theme.base.spacing} * 2.25)` : 'unset'};\n }\n\n .cell-content {\n max-height: var(--group-header-height);\n padding: 0;\n }\n }\n button:focus {\n box-shadow: ${({ theme }) => theme.base.shadow['focus-inset']};\n }\n\n &::before {\n content: '';\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n width: 0.25rem;\n height: 100%;\n background-color: ${props => props.groupHeader.colorIndicator};\n z-index: 12;\n }\n }\n .group-header.cell {\n left: 0;\n padding-left: var(--group-left);\n }\n\n div.group-header.cell-fixed {\n background-color: var(--group-bg-color);\n }\n`;\n\n/**\n * Returns label for interval grouping based on interval and boundaries\n Response data depends on boundary settings.\n Ex: For sample data of profit\n profit --> cases(count)\n {'0': 10, 1': 100, '2':30, '10': 35, '15':45, '20':2}\n For Interval 10\n If the boundary is 'include-lower-only',\n and value is 10 then label -> 10 to 20\n\n If boundary is 'include-upper-only',\n and value is 10 then label -> 0 to 10\n * */\nfunction buildIntervalGroupingLabel(value, customFunction, translate) {\n const { interval, boundaries } = customFunction;\n // To restrict the decimals in labels\n const intervalDecimalLength = (interval.toString().split('.')[1] || '').length;\n value = Number(value);\n // In case of 'include-lower-only'\n let lowerValue = value.toFixed(intervalDecimalLength);\n let upperValue = (value + interval).toFixed(intervalDecimalLength);\n // In case of boundary 'include-upper-only'\n if (boundaries === intervalGroupingBoundaries.includeUpperOnly) {\n lowerValue = (value - interval).toFixed(intervalDecimalLength);\n upperValue = value.toFixed(intervalDecimalLength);\n }\n return `${lowerValue} ${translate('to')} ${upperValue}`;\n}\n\nfunction GroupName({ view, column, groupHeader, dateFunction, customFunction }) {\n const [translate] = useTranslate();\n const { locale, timezone } = view.meta;\n const isRangeGrouping = customFunction?.type === customFunctions.RANGE_GROUPING;\n const isIntervalGrouping = customFunction?.type === customFunctions.INTERVAL_GROUPING;\n\n if (dateFunction) {\n return (\n <DateValueDisplay\n value={groupHeader.name}\n dateFunction={dateFunction}\n locale={locale}\n timezone={timezone}\n />\n );\n }\n\n if (isRangeGrouping) {\n /** If custom range grouping applied on number field , we need to show group name as text instead of number */\n return groupHeader.name;\n }\n\n if (isIntervalGrouping) {\n /** If custom range grouping applied on number , we need to show group name based on value and custom function details like interval and boundaries */\n return buildIntervalGroupingLabel(groupHeader.name, customFunction, translate);\n }\n\n column.setExecutionContext(null); // If null is not set then it will execute on the previous row context and facing issues when cell is edited. Based on column.editMode and current context renderer varies (it can be cellEditRenderer)\n\n const columnRendererProps = {\n ...column.getRenderingEngineProps(),\n context: {\n getValue: () => groupHeader.name,\n getExecutionContext: () => {\n return { getValue: () => groupHeader.data, name: 'groupHeader' };\n }\n }\n };\n\n return <RenderingEngine {...columnRendererProps} />;\n}\n\n// NOTE: While making any changes in GroupRenderer.jsx, also make similar changes in HierarchicalGroupRenderer.jsx file if applicable\n\nexport default function GroupHeader({ groupHeader, columns }) {\n const buttonRef = useRef();\n\n // TODO: This we are adding temporary to show freeze border until we make group header rendering change\n // when we will pick up aggregation.\n if (!groupHeader.isVisible) return null;\n\n const view = columns[0].parent;\n // If grouping by a regular column (i.e. without a dateFunction), determine props for the renderer\n const { columnId, dateFunction, customFunction } =\n getGroupFromKey(groupHeader.groupBy, view.state.groups) ?? {};\n // if state.groups is not yet prepared/updated, then getGroupFromKey will return undefined\n if (!columnId) {\n return null;\n }\n\n const column = columns.find(c => c.field.id === columnId);\n const formatter = view.getFormatterByKey('Integer');\n const { locale } = view.meta;\n const groupCountFormatted = formatter\n ? formatter(groupHeader.count, { locale })\n : groupHeader.count;\n const isAggregationApplied = columns.filter(c => !c.hidden).some(c => c.aggregated);\n\n return (\n <StyledGroupHeader\n groupHeader={groupHeader}\n className={cx('row group-header-row sticky-group-header')}\n data-test-id='groupHeader'\n data-testid={TestIdConstants.groupHeader}\n isAggregationApplied={isAggregationApplied}\n role='row'\n onFocus={e => {\n if (buttonRef.current && !e.currentTarget.contains(e.relatedTarget)) {\n e.preventDefault();\n buttonRef.current.focus();\n }\n }}\n >\n <div className='stickyGroupHeader'>\n <BareButton\n ref={buttonRef}\n aria-label={`${\n column.field.hideGroupColumnNameLabel ? '' : groupHeader.label\n } ${groupHeader.name}, ${groupCountFormatted} items`}\n aria-expanded={!!groupHeader.isExpanded}\n style={{\n paddingRight: 'var(--group-left)'\n }}\n onClick={() => groupHeader.count > 0 && view.type.toggleGroupExpansion({ groupHeader })}\n tabIndex={-1}\n >\n {groupHeader.count > 0 &&\n (groupHeader.isExpanded ? <Icon name='caret-down' /> : <Icon name='caret-right' />)}\n <div className='group-wrapper'>\n <div className='group-label' />\n {!column.field.hideGroupColumnNameLabel && (\n <span\n className='group-header-groupby'\n data-test-id={groupHeader.groupBy}\n data-testid={`${TestIdConstants.groupHeaderGroupBy}-${groupHeader.groupBy}`}\n >\n {groupHeader.label}:\n </span>\n )}\n <div className='group-label' />\n <span\n className='group-context-count'\n style={{ display: 'inline-flex' }}\n data-test-id='groupHeader'\n data-testid={TestIdConstants.groupHeaderCount}\n >\n <GroupName\n view={view}\n column={column}\n groupHeader={groupHeader}\n dateFunction={dateFunction}\n customFunction={customFunction}\n />\n {/* adding whitespace pre to preserve the space at the begining of count text */}\n <span className='group-count'>{` (${groupCountFormatted})`}</span>\n </span>\n </div>\n </BareButton>\n </div>\n <div className='group-header-aggregation-row'>\n {columns.map(c => {\n const cxt = {\n getValue: () =>\n groupHeader?.aggregation?.[c.field.name]?.[c.aggregationType?.toLowerCase()]\n };\n return (\n <AggregatorCell\n key={c.field.id}\n column={c}\n context={cxt}\n className={cx('cell', {\n 'cell-fixed': column.frozen\n })}\n />\n );\n })}\n </div>\n </StyledGroupHeader>\n );\n}\n\nGroupHeader.propTypes = {\n columns: PropTypes.arrayOf(PropTypes.any).isRequired,\n groupHeader: PropTypes.objectOf(PropTypes.any).isRequired\n};\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type RsCoreTypes } from 'pega-repeating-structures-core';
|
|
2
|
-
declare const _default: import("react").MemoExoticComponent<({ template }: {
|
|
3
|
-
template: RsCoreTypes.Meta["template"];
|
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element | null>;
|
|
5
|
-
export default _default;
|
|
6
|
-
//# sourceMappingURL=KeyboardInstructions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardInstructions.d.ts","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/KeyboardInstructions.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAiC,KAAK,WAAW,EAAE,MAAM,gCAAgC,CAAC;2EASrD;IAAE,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;CAAE;AAkCtF,wBAA0C"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';
|
|
5
|
-
import { Text, Flex, UnorderedList } from '@pega/cosmos-react-core';
|
|
6
|
-
import useTranslate from '../../Hooks/useTranslate';
|
|
7
|
-
const InstructionLabel = styled(Text) `
|
|
8
|
-
font-weight: ${({ theme }) => theme.base['font-weight'].bold};
|
|
9
|
-
`;
|
|
10
|
-
const KeyboardInstructions = ({ template }) => {
|
|
11
|
-
const [translate] = useTranslate();
|
|
12
|
-
if (template === REPEATING_STRUCTURE_TEMPLATES.TABLE) {
|
|
13
|
-
const keyboardInstructions = [
|
|
14
|
-
{
|
|
15
|
-
label: translate('table_a11y_instructions_arrow_keys_label'),
|
|
16
|
-
description: translate('table_a11y_instructions_arrow_keys_description')
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: translate('table_a11y_instructions_enter_label'),
|
|
20
|
-
description: translate('table_a11y_instructions_enter_description')
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
label: translate('table_a11y_instructions_escape_label'),
|
|
24
|
-
description: translate('table_a11y_instructions_escape_description')
|
|
25
|
-
}
|
|
26
|
-
];
|
|
27
|
-
return (_jsxs(Flex, { container: { gap: 2, direction: 'column' }, children: [_jsx(Text, { as: 'p', children: translate('table_a11y_intro') }), _jsx(UnorderedList, { items: keyboardInstructions.map(instruction => (_jsxs(_Fragment, { children: [_jsx(InstructionLabel, { children: instruction.label }), " \u2013", ' ', instruction.description] }))) })] }));
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
};
|
|
31
|
-
export default memo(KeyboardInstructions);
|
|
32
|
-
//# sourceMappingURL=KeyboardInstructions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardInstructions.js","sourceRoot":"","sources":["../../../../Core/Components/Toolbar/KeyboardInstructions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,6BAA6B,EAAoB,MAAM,gCAAgC,CAAC;AACjG,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAA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o } from 'react';\nimport styled from 'styled-components';\n\nimport { REPEATING_STRUCTURE_TEMPLATES, type RsCoreTypes } from 'pega-repeating-structures-core';\nimport { Text, Flex, UnorderedList } from '@pega/cosmos-react-core';\n\nimport useTranslate from '../../Hooks/useTranslate';\n\nconst InstructionLabel = styled(Text)`\n font-weight: ${({ theme }) => theme.base['font-weight'].bold};\n`;\n\nconst KeyboardInstructions = ({ template }: { template: RsCoreTypes.Meta['template'] }) => {\n const [translate] = useTranslate();\n if (template === REPEATING_STRUCTURE_TEMPLATES.TABLE) {\n const keyboardInstructions = [\n {\n label: translate('table_a11y_instructions_arrow_keys_label'),\n description: translate('table_a11y_instructions_arrow_keys_description')\n },\n {\n label: translate('table_a11y_instructions_enter_label'),\n description: translate('table_a11y_instructions_enter_description')\n },\n {\n label: translate('table_a11y_instructions_escape_label'),\n description: translate('table_a11y_instructions_escape_description')\n }\n ];\n return (\n <Flex container={{ gap: 2, direction: 'column' }}>\n <Text as='p'>{translate('table_a11y_intro')}</Text>\n <UnorderedList\n items={keyboardInstructions.map(instruction => (\n <>\n <InstructionLabel>{instruction.label}</InstructionLabel> –{' '}\n {instruction.description}\n </>\n ))}\n />\n </Flex>\n );\n }\n return null;\n};\n\nexport default memo(KeyboardInstructions);\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { OmitStrict } from '@pega/cosmos-react-core';
|
|
2
|
-
import type { TimelineToolbarProps } from '@pega/cosmos-react-work/lib/components/Timeline/Timeline.types';
|
|
3
|
-
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
4
|
-
declare const TimelineToolbar: ({ view, ...restProps }: {
|
|
5
|
-
view: RsCoreTypes.View;
|
|
6
|
-
} & OmitStrict<TimelineToolbarProps, "sort" | "group">) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default TimelineToolbar;
|
|
8
|
-
//# sourceMappingURL=TimelineToolbar.d.ts.map
|