@pega/lists-react 9.0.0-build.9.8 → 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/usePagination.d.ts +2 -2
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.d.ts.map +1 -1
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/usePagination.js.map +1 -1
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts +6 -6
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.d.ts.map +1 -1
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js +6 -5
- package/lib/Core/Components/Virtualise/VariableHeightVirtualizer/utils.js.map +1 -1
- package/lib/Core/Components/Virtualise/VirtualizeInfinite.js +14 -4
- package/lib/Core/Components/Virtualise/VirtualizeInfinite.js.map +1 -1
- package/lib/Core/Components/Virtualise/index.js +19 -4
- package/lib/Core/Components/Virtualise/index.js.map +1 -1
- package/lib/Core/Components/Virtualise/utility.js +1 -1
- package/lib/Core/Components/Virtualise/utility.js.map +1 -1
- package/lib/Core/Components/WarningBanner.d.ts +11 -0
- package/lib/Core/Components/WarningBanner.d.ts.map +1 -0
- package/lib/Core/Components/WarningBanner.js +23 -0
- package/lib/Core/Components/WarningBanner.js.map +1 -0
- package/lib/Core/Context/LocalizationContext.d.ts +1 -1
- package/lib/Core/Context/LocalizationContext.d.ts.map +1 -1
- package/lib/Core/Context/LocalizationContext.js.map +1 -1
- package/lib/Core/Hooks/a11y/useAnnounce.d.ts +3 -4
- package/lib/Core/Hooks/a11y/useAnnounce.d.ts.map +1 -1
- package/lib/Core/Hooks/a11y/useAnnounce.js +3 -4
- package/lib/Core/Hooks/a11y/useAnnounce.js.map +1 -1
- package/lib/Core/Hooks/useDebounce.js +1 -1
- package/lib/Core/Hooks/useDebounce.js.map +1 -1
- package/lib/Core/Hooks/useDragDrop.d.ts +2 -2
- package/lib/Core/Hooks/useDragDrop.d.ts.map +1 -1
- package/lib/Core/Hooks/useDragDrop.js +9 -9
- package/lib/Core/Hooks/useDragDrop.js.map +1 -1
- package/lib/Core/Hooks/useRepeat.d.ts +1 -1
- package/lib/Core/Hooks/useRepeat.d.ts.map +1 -1
- package/lib/Core/Hooks/useRepeat.js +58 -11
- package/lib/Core/Hooks/useRepeat.js.map +1 -1
- package/lib/Core/Hooks/useSelectAllCheckbox.d.ts +21 -0
- package/lib/Core/Hooks/useSelectAllCheckbox.d.ts.map +1 -0
- package/lib/Core/Hooks/useSelectAllCheckbox.js +23 -0
- package/lib/Core/Hooks/useSelectAllCheckbox.js.map +1 -0
- package/lib/Core/Localization/defaultTranslations.d.ts +15 -13
- package/lib/Core/Localization/defaultTranslations.d.ts.map +1 -1
- package/lib/Core/Localization/defaultTranslations.js +16 -14
- package/lib/Core/Localization/defaultTranslations.js.map +1 -1
- package/lib/Core/Test/JUnitMocks.d.ts +12 -0
- package/lib/Core/Test/JUnitMocks.d.ts.map +1 -1
- package/lib/Core/Test/JUnitMocks.js +27 -8
- package/lib/Core/Test/JUnitMocks.js.map +1 -1
- package/lib/Core/Test/TestUtils.d.ts +0 -1
- package/lib/Core/Test/TestUtils.d.ts.map +1 -1
- package/lib/Core/Test/TestUtils.js +3 -7
- package/lib/Core/Test/TestUtils.js.map +1 -1
- package/lib/Core/Utils/index.d.ts +15 -0
- package/lib/Core/Utils/index.d.ts.map +1 -1
- package/lib/Core/Utils/index.js +22 -0
- package/lib/Core/Utils/index.js.map +1 -1
- package/lib/Core/Utils/styles.d.ts +2 -2
- package/lib/Core/Utils/styles.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts +4 -0
- package/lib/Core/Views/Gallery/Components/GalleryCard.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryCard.js +29 -0
- package/lib/Core/Views/Gallery/Components/GalleryCard.js.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js +25 -0
- package/lib/Core/Views/Gallery/Components/GalleryCheckboxCard.js.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryFieldValue.js.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts +8 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.js +15 -0
- package/lib/Core/Views/Gallery/Components/GalleryHeader.js.map +1 -0
- package/lib/Core/Views/Gallery/Gallery.types.d.ts +8 -0
- package/lib/Core/Views/Gallery/Gallery.types.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/Gallery.types.js +2 -0
- package/lib/Core/Views/Gallery/Gallery.types.js.map +1 -0
- package/lib/Core/Views/Gallery/GalleryA11y.d.ts +7 -5
- package/lib/Core/Views/Gallery/GalleryA11y.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/GalleryA11y.js +9 -52
- package/lib/Core/Views/Gallery/GalleryA11y.js.map +1 -1
- package/lib/Core/Views/Gallery/GalleryContainer.d.ts +23 -0
- package/lib/Core/Views/Gallery/GalleryContainer.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/GalleryContainer.js +66 -0
- package/lib/Core/Views/Gallery/GalleryContainer.js.map +1 -0
- package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js +1 -1
- package/lib/Core/Views/Gallery/_tests_/Samples/GalleryA11ySample.js.map +1 -1
- package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts +9 -0
- package/lib/Core/Views/Gallery/hooks/useRowActions.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/hooks/useRowActions.js +25 -0
- package/lib/Core/Views/Gallery/hooks/useRowActions.js.map +1 -0
- package/lib/Core/Views/Gallery/index.d.ts +4 -8
- package/lib/Core/Views/Gallery/index.d.ts.map +1 -1
- package/lib/Core/Views/Gallery/index.js +38 -59
- package/lib/Core/Views/Gallery/index.js.map +1 -1
- package/lib/Core/Views/Gallery/utils.d.ts +36 -0
- package/lib/Core/Views/Gallery/utils.d.ts.map +1 -0
- package/lib/Core/Views/Gallery/utils.js +115 -0
- package/lib/Core/Views/Gallery/utils.js.map +1 -0
- package/lib/Core/Views/Map/Map.styles.d.ts +190 -6
- package/lib/Core/Views/Map/Map.styles.d.ts.map +1 -1
- package/lib/Core/Views/Map/Map.styles.js.map +1 -1
- package/lib/Core/Views/Map/index.d.ts.map +1 -1
- package/lib/Core/Views/Map/index.js +2 -2
- package/lib/Core/Views/Map/index.js.map +1 -1
- package/lib/Core/Views/RsCardWrapper.js.map +1 -1
- package/lib/Core/Views/Table/Body.d.ts.map +1 -1
- package/lib/Core/Views/Table/Body.js +5 -2
- package/lib/Core/Views/Table/Body.js.map +1 -1
- package/lib/Core/Views/Table/CellWrapper.d.ts +1 -1
- package/lib/Core/Views/Table/CellWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/CellWrapper.js +4 -2
- package/lib/Core/Views/Table/CellWrapper.js.map +1 -1
- package/lib/Core/Views/Table/GroupingHeaderCell.d.ts +6 -15
- package/lib/Core/Views/Table/GroupingHeaderCell.d.ts.map +1 -1
- package/lib/Core/Views/Table/GroupingHeaderCell.js +16 -14
- package/lib/Core/Views/Table/GroupingHeaderCell.js.map +1 -1
- package/lib/Core/Views/Table/HeaderWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/HeaderWrapper.js +5 -5
- package/lib/Core/Views/Table/HeaderWrapper.js.map +1 -1
- package/lib/Core/Views/Table/SkeletonRows.d.ts +1 -1
- package/lib/Core/Views/Table/SkeletonRows.d.ts.map +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.d.ts +3 -1
- package/lib/Core/Views/Table/StyledTableContainer.d.ts.map +1 -1
- package/lib/Core/Views/Table/StyledTableContainer.js +270 -155
- package/lib/Core/Views/Table/StyledTableContainer.js.map +1 -1
- package/lib/Core/Views/Table/TableA11y.d.ts +13 -1
- package/lib/Core/Views/Table/TableA11y.d.ts.map +1 -1
- package/lib/Core/Views/Table/TableA11y.js +233 -13
- package/lib/Core/Views/Table/TableA11y.js.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.d.ts +3 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.d.ts.map +1 -1
- package/lib/Core/Views/Table/VirtualizeWrapper.js +16 -16
- package/lib/Core/Views/Table/VirtualizeWrapper.js.map +1 -1
- package/lib/Core/Views/Table/index.d.ts.map +1 -1
- package/lib/Core/Views/Table/index.js +16 -7
- package/lib/Core/Views/Table/index.js.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.js +15 -20
- package/lib/Core/Views/Timeline/Timeline.js.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.styles.d.ts +392 -15
- package/lib/Core/Views/Timeline/Timeline.styles.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.styles.js +44 -44
- package/lib/Core/Views/Timeline/Timeline.styles.js.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.types.d.ts +11 -7
- package/lib/Core/Views/Timeline/Timeline.types.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/Timeline.types.js.map +1 -1
- package/lib/Core/Views/Timeline/TimelineGroup.d.ts +13 -0
- package/lib/Core/Views/Timeline/TimelineGroup.d.ts.map +1 -0
- package/lib/Core/Views/Timeline/TimelineGroup.js +21 -0
- package/lib/Core/Views/Timeline/TimelineGroup.js.map +1 -0
- package/lib/Core/Views/Timeline/TimelineItem.d.ts +1 -3
- package/lib/Core/Views/Timeline/TimelineItem.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/TimelineItem.js +7 -6
- package/lib/Core/Views/Timeline/TimelineItem.js.map +1 -1
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts +2 -2
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/__tests__/Timeline.mocks.js.map +1 -1
- package/lib/Core/Views/Timeline/index.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/index.js +13 -6
- package/lib/Core/Views/Timeline/index.js.map +1 -1
- package/lib/Core/Views/Timeline/utils.d.ts +8 -10
- package/lib/Core/Views/Timeline/utils.d.ts.map +1 -1
- package/lib/Core/Views/Timeline/utils.js +136 -58
- package/lib/Core/Views/Timeline/utils.js.map +1 -1
- package/lib/Core/Views/rs-styles.d.ts +1 -1
- package/lib/Core/a11y/loadingAnnouncementBehavior.d.ts +12 -0
- package/lib/Core/a11y/loadingAnnouncementBehavior.d.ts.map +1 -0
- package/lib/Core/a11y/loadingAnnouncementBehavior.js +37 -0
- package/lib/Core/a11y/loadingAnnouncementBehavior.js.map +1 -0
- package/lib/Core/constants.d.ts.map +1 -1
- package/lib/Core/constants.js +1 -0
- package/lib/Core/constants.js.map +1 -1
- package/lib/Core/index.d.ts.map +1 -1
- package/lib/Core/index.js +1 -2
- package/lib/Core/index.js.map +1 -1
- package/lib/Core/templateFeatureSupport.d.ts +17 -0
- package/lib/Core/templateFeatureSupport.d.ts.map +1 -0
- package/lib/Core/templateFeatureSupport.js +31 -0
- package/lib/Core/templateFeatureSupport.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/types/RepeatingStructuresBoot.types.d.ts +12 -8
- package/lib/types/RepeatingStructuresBoot.types.d.ts.map +1 -1
- package/lib/types/RepeatingStructuresBoot.types.js.map +1 -1
- package/lib/types.d.ts +2 -0
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +11 -13
- package/lib/Core/Components/DefaultComponents/CardItem.d.ts +0 -3
- package/lib/Core/Components/DefaultComponents/CardItem.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CardItem.js +0 -78
- package/lib/Core/Components/DefaultComponents/CardItem.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts +0 -12
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js +0 -36
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts +0 -15
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js +0 -50
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/Radio.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts +0 -12
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js +0 -44
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/TextInput.js.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts +0 -16
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.d.ts.map +0 -1
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js +0 -64
- package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/index.js.map +0 -1
- package/lib/Core/Components/GroupRenderer.d.ts +0 -31
- package/lib/Core/Components/GroupRenderer.d.ts.map +0 -1
- package/lib/Core/Components/GroupRenderer.js +0 -348
- package/lib/Core/Components/GroupRenderer.js.map +0 -1
- package/lib/Core/Components/RSWrapper/__mocks__/uuid.d.ts +0 -2
- package/lib/Core/Components/RSWrapper/__mocks__/uuid.d.ts.map +0 -1
- package/lib/Core/Components/RSWrapper/__mocks__/uuid.js +0 -4
- package/lib/Core/Components/RSWrapper/__mocks__/uuid.js.map +0 -1
- package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts +0 -6
- package/lib/Core/Components/Toolbar/KeyboardInstructions.d.ts.map +0 -1
- package/lib/Core/Components/Toolbar/KeyboardInstructions.js +0 -32
- package/lib/Core/Components/Toolbar/KeyboardInstructions.js.map +0 -1
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts +0 -7
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.d.ts.map +0 -1
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js +0 -109
- package/lib/Core/Components/Toolbar/Timeline/TimelineToolbar.js.map +0 -1
- package/lib/Core/Views/Gallery/ItemWrapper.d.ts +0 -19
- package/lib/Core/Views/Gallery/ItemWrapper.d.ts.map +0 -1
- package/lib/Core/Views/Gallery/ItemWrapper.js +0 -34
- package/lib/Core/Views/Gallery/ItemWrapper.js.map +0 -1
- package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts +0 -3
- package/lib/Core/Views/Gallery/StyledGalleryContainer.d.ts.map +0 -1
- package/lib/Core/Views/Gallery/StyledGalleryContainer.js +0 -51
- package/lib/Core/Views/Gallery/StyledGalleryContainer.js.map +0 -1
- package/lib/Core/Views/Timeline/utility.d.ts +0 -8
- package/lib/Core/Views/Timeline/utility.d.ts.map +0 -1
- package/lib/Core/Views/Timeline/utility.js +0 -120
- package/lib/Core/Views/Timeline/utility.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepeatingStructuresBoot.types.js","sourceRoot":"","sources":["../../types/RepeatingStructuresBoot.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport type { FormControlProps, IconName, OmitStrict } from '@pega/cosmos-react-core';\nimport type { RsApi } from 'pega-repeating-structures-core/lib/types/ApiContext.types';\nimport type RsCoreBootArgs from 'pega-repeating-structures-core/lib/types/RsCoreBootArgs.types';\n\ntype PropsFromRenderFactory = Pick<RsCoreTypes.RenderFactoryWithProps, 'props'>;\ntype ColumnContext = ReturnType<RsCoreTypes.Column['getContext']>;\ntype ViewContext = ReturnType<RsCoreTypes.View['getContext']>;\n\n// Contract for Cell renderer props.\n/**\n * A set of props that will be exposed to Cell renderers.\n *\n */\ntype CellRendererProps = {\n /** Reference to the cell body element */\n getElement: () => HTMLElement;\n /** Styles applicable to current cell. This should be applied to cell renderers.\n * This is method is only available for data cells.\n */\n getStyles?: () => {\n /**\n * Foreground color applicable to the cell content, otherwise undefined.\n *\n * Note: This will be applied by default to `cell container`(having class `cell-content`) of repeating structures.\n *\n * Supports standard CSS color formats like below:\n * - Named colors: `'red'`, `'blue'`, `'green'`, `'yellow'`, `'black'`, `'white'`, etc.\n * - Hex codes: `'#RRGGBB'`, `'#RGB'`, `'#RRGGBBAA'`, `'#RGBA'`\n * - RGB: `'rgb(255, 0, 0)'`\n * - RGBA: `'rgba(255, 0, 0, 0.5)'`\n *\n * Optional\n */\n foregroundColor?: string;\n };\n /** Formatted value of the cell. */\n value: ReturnType<ColumnContext['getFormattedValue']>;\n /** Tooltip value of the cell. */\n title: ReturnType<ColumnContext['getToolTipValue']>;\n} & ColumnContext &\n PropsFromRenderFactory;\n\n// Contract for View renderer props.\ntype ExternalStateInfo = {\n /** External state key and its persisted value in the RS state. Supported external state keys are:\n * - Value of {@link RsCoreTypes.Meta.externalFilters externalFilters}\n */\n [externalStateKey: string]: NonNullable<RsCoreTypes.State['externalState']>[''];\n};\n\n/**\n * A set of props that will be exposed to View renderer. Supported view renderers are:\n * - Renderer for {@link RsCoreTypes.Meta.externalFilters externalFilters}\n */\ntype ViewRendererProps = ViewContext & {\n /** A unique id to identify the current repeating structure. */\n rsID: RsCoreTypes.View['rsID'];\n} & ExternalStateInfo &\n PropsFromRenderFactory;\n\ntype RendererProps = CellRendererProps | ViewRendererProps;\n\n// RsCore exposes generic function types for `component`.\n// For RepeatingStructures, these types are overridden to include additional renderer props, and the return type is specified as ReactNode.\nexport interface RsRenderFactoryReturnType\n extends OmitStrict<RsCoreTypes.RenderFactoryWithProps, 'component'> {\n /**\n * A function that accepts component props and returns a React node to be rendered as a cell within repeating structures.\n * @param props - The props passed by repeating structures and {@link PropsFromRenderFactory static props } from the render factory.\n * @returns The component function or null or undefined. If component definition is null/undefined then cell will be rendered directly with value derived for the cell or the formatted value(if {@link RsCoreTypes.RsCoreInitArgs.formatters formatters} are provided for that column)\n */\n component: ((props: RendererProps) => ReactNode) | null | undefined;\n}\n\ntype RsCoreStyleFormat = NonNullable<RsCoreTypes.RsCoreInitArgs['styleFormats']>[number];\ninterface RsStyleFormatConfig extends OmitStrict<RsCoreStyleFormat['config'], 'icon'> {\n /**\n * An icon used as a visual indicator of the applied format.\n * Optional.\n */\n icon?: {\n /** Icon from 'budicon' set of cosmos. */\n name: IconName;\n /** The color of icon. */\n color: string;\n };\n}\n\n// RS can only accept icons that are supported in cosmos, while RsCore accepts icon generically, therefore overriding the interface.\nexport interface RsStyleFormat extends OmitStrict<RsCoreStyleFormat, 'config'> {\n config: RsStyleFormatConfig;\n}\n\nexport type RepeatingStructuresProps = {\n /** An initial state that can be provided to repeating structure to load repeating structure instance with that state.\\\n * **Note**: If {@link RSTypes.Meta.personalization personalization} in meta is set to true then persistedInfo will be ignored. */\n persistedInfo?: RsCoreTypes.PersonalizedState;\n\n /** A meta data object to provide definition of repeating structure */\n meta: RsCoreTypes.Meta;\n\n /** A set of api's provided to repeating structure to establish communication b/w repeating structure and its consumer (e.g. providing data to repeating structure) */\n apiContext: RsCoreTypes.ApiContext;\n\n /** To provide multiple variants of metadata of repeating structures. If multiple variations is provided make sure the first variation should be part of {@link RepeatingStructuresProps.meta meta} key and rest all should be fed to presets. */\n presets?: RsCoreTypes.RsCoreInitArgs['presets'];\n\n /** A debug mode will print logs in console for the action dispatched by RsCore and the state derived after consumption of it. */\n mode?: 'info' | 'debug' | 'normal';\n\n errors?: RsCoreTypes.Errors;\n\n /** This should be a factory function that returns component or component definition for specified type.\n * @param type -\n * - For cell renderer - Value of {@link RsCoreTypes.FieldDef.cellRenderer cellRenderer}(if added in fieldDefs of that column).\n * - For view renderer - Value of supported external view renderers in `Meta`. Supported view renderer is {@link RsCoreTypes.Meta.externalFilters externalFilters}.\n *\n * @param field - Metadata which contains info configured for that column. Applicable only in case of `cell renderer`.\n * @returns It should return a component definition (or an object that contains component definition).\n * This component definition will be used by RepeatingStructures to render a cell with the component provided by renderFactory.\n * If component definition is not provided from render factory or renderFactory is not provided to Repeating structures then cell will be rendered directly with value derived for the cell or the formatted value(if {@link RsCoreTypes.RsCoreInitArgs.formatters formatters} are provided for that column)\n */\n renderFactory?: (\n type: string,\n field?: RsCoreTypes.FieldDef\n ) => Pick<RsRenderFactoryReturnType, 'component'> | RsRenderFactoryReturnType;\n\n /** A map of formatters that will be displayed to consumer to format a fieldDef in repeating structure */\n renderFormatterTypeMap?: RsCoreTypes.RsCoreInitArgs['renderFormatterTypeMap'];\n\n /**\n * This function acts as a callback that is invoked when the view is ready\n * @param utilityCallbacks - Few utility callbacks to interact with Repeating structures.\n * @returns {void} void\n */\n onViewReady?: (utilityCallbacks: Pick<RsApi, 'setRecordCount' | 'dispatchAction'>) => void;\n\n /** An object of formatter functions which formats the raw value. */\n formatters?: RsCoreTypes.RsCoreInitArgs['formatters'];\n\n /** A set of style formatters to be applied on FieldDef. E.g. background, icon.\n *\n * **Note**: Style formats are only supported for `Table` template.\n */\n styleFormats?: RsStyleFormat[];\n\n /** A list of all the toolbar actions to be displayed at the top of a repeating structure */\n toolBarOptions?: RsCoreTypes.RsCoreInitArgs['toolBarOptions'];\n\n
|
|
1
|
+
{"version":3,"file":"RepeatingStructuresBoot.types.js","sourceRoot":"","sources":["../../types/RepeatingStructuresBoot.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport type { FormControlProps, IconName, OmitStrict } from '@pega/cosmos-react-core';\nimport type { RsApi } from 'pega-repeating-structures-core/lib/types/ApiContext.types';\nimport type RsCoreBootArgs from 'pega-repeating-structures-core/lib/types/RsCoreBootArgs.types';\n\ntype PropsFromRenderFactory = Pick<RsCoreTypes.RenderFactoryWithProps, 'props'>;\ntype ColumnContext = ReturnType<RsCoreTypes.Column['getContext']>;\ntype ViewContext = ReturnType<RsCoreTypes.View['getContext']>;\n\n// Contract for Cell renderer props.\n/**\n * A set of props that will be exposed to Cell renderers.\n *\n */\ntype CellRendererProps = {\n /** Reference to the cell body element */\n getElement: () => HTMLElement;\n /** Styles applicable to current cell. This should be applied to cell renderers.\n * This is method is only available for data cells.\n */\n getStyles?: () => {\n /**\n * Foreground color applicable to the cell content, otherwise undefined.\n *\n * Note: This will be applied by default to `cell container`(having class `cell-content`) of repeating structures.\n *\n * Supports standard CSS color formats like below:\n * - Named colors: `'red'`, `'blue'`, `'green'`, `'yellow'`, `'black'`, `'white'`, etc.\n * - Hex codes: `'#RRGGBB'`, `'#RGB'`, `'#RRGGBBAA'`, `'#RGBA'`\n * - RGB: `'rgb(255, 0, 0)'`\n * - RGBA: `'rgba(255, 0, 0, 0.5)'`\n *\n * Optional\n */\n foregroundColor?: string;\n };\n /** Formatted value of the cell. */\n value: ReturnType<ColumnContext['getFormattedValue']>;\n /** Tooltip value of the cell. */\n title: ReturnType<ColumnContext['getToolTipValue']>;\n} & ColumnContext &\n PropsFromRenderFactory;\n\n// Contract for View renderer props.\ntype ExternalStateInfo = {\n /** External state key and its persisted value in the RS state. Supported external state keys are:\n * - Value of {@link RsCoreTypes.Meta.externalFilters externalFilters}\n */\n [externalStateKey: string]: NonNullable<RsCoreTypes.State['externalState']>[''];\n};\n\n/**\n * A set of props that will be exposed to View renderer. Supported view renderers are:\n * - Renderer for {@link RsCoreTypes.Meta.externalFilters externalFilters}\n */\ntype ViewRendererProps = ViewContext & {\n /** A unique id to identify the current repeating structure. */\n rsID: RsCoreTypes.View['rsID'];\n} & ExternalStateInfo &\n PropsFromRenderFactory;\n\ntype FormatSettingsRendererProps = {\n ref: Ref<{ validate: () => boolean }>;\n formatting: { type: string; config: unknown };\n onChange: (config: unknown) => void;\n};\n\ntype RendererProps = CellRendererProps | ViewRendererProps | FormatSettingsRendererProps;\n\n// RsCore exposes generic function types for `component`.\n// For RepeatingStructures, these types are overridden to include additional renderer props, and the return type is specified as ReactNode.\nexport interface RsRenderFactoryReturnType\n extends OmitStrict<RsCoreTypes.RenderFactoryWithProps, 'component'> {\n /**\n * A function that accepts component props and returns a React node to be rendered as a cell within repeating structures.\n * @param props - The props passed by repeating structures and {@link PropsFromRenderFactory static props } from the render factory.\n * @returns The component function or null or undefined. If component definition is null/undefined then cell will be rendered directly with value derived for the cell or the formatted value(if {@link RsCoreTypes.RsCoreInitArgs.formatters formatters} are provided for that column)\n */\n component: ((props: RendererProps) => ReactNode) | null | undefined;\n}\n\ntype RsCoreStyleFormat = NonNullable<RsCoreTypes.RsCoreInitArgs['styleFormats']>[number];\ninterface RsStyleFormatConfig extends OmitStrict<RsCoreStyleFormat['config'], 'icon'> {\n /**\n * An icon used as a visual indicator of the applied format.\n * Optional.\n */\n icon?: {\n /** Icon from 'budicon' set of cosmos. */\n name: IconName;\n /** The color of icon. */\n color: string;\n };\n}\n\n// RS can only accept icons that are supported in cosmos, while RsCore accepts icon generically, therefore overriding the interface.\nexport interface RsStyleFormat extends OmitStrict<RsCoreStyleFormat, 'config'> {\n config: RsStyleFormatConfig;\n}\n\nexport type RepeatingStructuresProps = {\n /** An initial state that can be provided to repeating structure to load repeating structure instance with that state.\\\n * **Note**: If {@link RSTypes.Meta.personalization personalization} in meta is set to true then persistedInfo will be ignored. */\n persistedInfo?: RsCoreTypes.PersonalizedState;\n\n /** A meta data object to provide definition of repeating structure */\n meta: RsCoreTypes.Meta;\n\n /** A set of api's provided to repeating structure to establish communication b/w repeating structure and its consumer (e.g. providing data to repeating structure) */\n apiContext: RsCoreTypes.ApiContext;\n\n /** To provide multiple variants of metadata of repeating structures. If multiple variations is provided make sure the first variation should be part of {@link RepeatingStructuresProps.meta meta} key and rest all should be fed to presets. */\n presets?: RsCoreTypes.RsCoreInitArgs['presets'];\n\n /** A debug mode will print logs in console for the action dispatched by RsCore and the state derived after consumption of it. */\n mode?: 'info' | 'debug' | 'normal';\n\n errors?: RsCoreTypes.Errors;\n\n /** This should be a factory function that returns component or component definition for specified type.\n * @param type -\n * - For cell renderer - Value of {@link RsCoreTypes.FieldDef.cellRenderer cellRenderer}(if added in fieldDefs of that column).\n * - For view renderer - Value of supported external view renderers in `Meta`. Supported view renderer is {@link RsCoreTypes.Meta.externalFilters externalFilters}.\n *\n * @param field - Metadata which contains info configured for that column. Applicable only in case of `cell renderer`.\n * @returns It should return a component definition (or an object that contains component definition).\n * This component definition will be used by RepeatingStructures to render a cell with the component provided by renderFactory.\n * If component definition is not provided from render factory or renderFactory is not provided to Repeating structures then cell will be rendered directly with value derived for the cell or the formatted value(if {@link RsCoreTypes.RsCoreInitArgs.formatters formatters} are provided for that column)\n */\n renderFactory?: (\n type: string,\n field?: RsCoreTypes.FieldDef\n ) => Pick<RsRenderFactoryReturnType, 'component'> | RsRenderFactoryReturnType;\n\n /** A map of formatters that will be displayed to consumer to format a fieldDef in repeating structure */\n renderFormatterTypeMap?: RsCoreTypes.RsCoreInitArgs['renderFormatterTypeMap'];\n\n /**\n * This function acts as a callback that is invoked when the view is ready\n * @param utilityCallbacks - Few utility callbacks to interact with Repeating structures.\n * @returns {void} void\n */\n onViewReady?: (utilityCallbacks: Pick<RsApi, 'setRecordCount' | 'dispatchAction'>) => void;\n\n /** An object of formatter functions which formats the raw value. */\n formatters?: RsCoreTypes.RsCoreInitArgs['formatters'];\n\n /** A set of style formatters to be applied on FieldDef. E.g. background, icon.\n *\n * **Note**: Style formats are only supported for `Table` template.\n */\n styleFormats?: RsStyleFormat[];\n\n /** A list of all the toolbar actions to be displayed at the top of a repeating structure */\n toolBarOptions?: RsCoreTypes.RsCoreInitArgs['toolBarOptions'];\n\n /** Pass a heading and content to show additional information in the toolbar */\n additionalInfo?: FormControlProps['additionalInfo'];\n\n /* Used to provide localized strings, typically overriding default translations */\n translations?: RsCoreBootArgs['translations'];\n};\n"]}
|
package/lib/types.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import type { RepeatingStructuresProps, RsStyleFormat as RsStyleFormatType } fro
|
|
|
3
3
|
export declare namespace RSTypes {
|
|
4
4
|
/** Group configuration on repeating structure state */
|
|
5
5
|
type Group = RsCoreTypes.Group;
|
|
6
|
+
/** Group Additional field configuration for a group. */
|
|
7
|
+
type GroupAdditionalField = RsCoreTypes.GroupAdditionalField;
|
|
6
8
|
/** Metadata for field */
|
|
7
9
|
type FieldDef = RsCoreTypes.FieldDef;
|
|
8
10
|
/** Group filter from the repeating structure state */
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,KAAK,EACV,wBAAwB,EACxB,aAAa,IAAI,iBAAiB,EACnC,MAAM,uCAAuC,CAAC;AAE/C,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAE/B,uDAAuD;IACvD,KAAY,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IAEtC,yBAAyB;IACzB,KAAY,QAAQ,GAAG,WAAW,CA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D,2FAA2F;IAC3F,KAAY,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IAEtC,+CAA+C;IAC/C,KAAY,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC;IAE1C,KAAY,2BAA2B,GAAG,wBAAwB,CAAC;IAEnE,KAAY,aAAa,GAAG,iBAAiB,CAAC;CAC/C"}
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport type {\n RepeatingStructuresProps,\n RsStyleFormat as RsStyleFormatType\n} from './types/RepeatingStructuresBoot.types';\n\nexport declare namespace RSTypes {\n // Exported members\n /** Group configuration on repeating structure state */\n export type Group = RsCoreTypes.Group;\n\n /** Metadata for field */\n export type FieldDef = RsCoreTypes.FieldDef;\n\n /** Group filter from the repeating structure state */\n export type GroupFilter = NonNullable<RsCoreTypes.State['groupFilters']>[0];\n\n /** Sort configuration on repeating structure state */\n export type Sort = NonNullable<RsCoreTypes.State['sortingOrder']>[0];\n\n /** Aggregation types */\n export type AggregationType = NonNullable<RsCoreTypes.State['aggregationInfo']>[0]['type'];\n\n /** Aggregation state on the repeating structure */\n export type Aggregation = NonNullable<RsCoreTypes.State['aggregationInfo']>[0];\n\n /** A meta data object to provide definition of repeating structure */\n export type Meta = RsCoreTypes.Meta;\n\n /** A set of api's to communicate b/w repeating structure and its consumer (e.g. providing data to repeating structure)\n */\n export type ApiContext = RsCoreTypes.ApiContext;\n\n /**\n * Error object from the repeating structure\n */\n export type Errors = RsCoreTypes.Errors;\n\n /**\n * State object from the repeating structure\n */\n export type State = RsCoreTypes.State;\n /**\n * Personalized state object from the repeating structure. This state is generally shared to consumer.\n */\n export type PersonalizedState = RsCoreTypes.PersonalizedState;\n /** An array of multiple variants of metadata of repeating structures. */\n export type Presets = RsCoreTypes.RsCoreInitArgs['presets'];\n\n /** The set of methods exposed to consumers for communicating with repeating structure. */\n export type RsApi = RsCoreTypes.RsApi;\n\n /** Represents a row in Repeating structures */\n export type RowData = RsCoreTypes.RowData;\n\n export type RepeatingStructuresInitArgs = RepeatingStructuresProps;\n\n export type RsStyleFormat = RsStyleFormatType;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"","sourcesContent":["import type { RsCoreTypes } from 'pega-repeating-structures-core';\n\nimport type {\n RepeatingStructuresProps,\n RsStyleFormat as RsStyleFormatType\n} from './types/RepeatingStructuresBoot.types';\n\nexport declare namespace RSTypes {\n // Exported members\n /** Group configuration on repeating structure state */\n export type Group = RsCoreTypes.Group;\n\n /** Group Additional field configuration for a group. */\n export type GroupAdditionalField = RsCoreTypes.GroupAdditionalField;\n\n /** Metadata for field */\n export type FieldDef = RsCoreTypes.FieldDef;\n\n /** Group filter from the repeating structure state */\n export type GroupFilter = NonNullable<RsCoreTypes.State['groupFilters']>[0];\n\n /** Sort configuration on repeating structure state */\n export type Sort = NonNullable<RsCoreTypes.State['sortingOrder']>[0];\n\n /** Aggregation types */\n export type AggregationType = NonNullable<RsCoreTypes.State['aggregationInfo']>[0]['type'];\n\n /** Aggregation state on the repeating structure */\n export type Aggregation = NonNullable<RsCoreTypes.State['aggregationInfo']>[0];\n\n /** A meta data object to provide definition of repeating structure */\n export type Meta = RsCoreTypes.Meta;\n\n /** A set of api's to communicate b/w repeating structure and its consumer (e.g. providing data to repeating structure)\n */\n export type ApiContext = RsCoreTypes.ApiContext;\n\n /**\n * Error object from the repeating structure\n */\n export type Errors = RsCoreTypes.Errors;\n\n /**\n * State object from the repeating structure\n */\n export type State = RsCoreTypes.State;\n /**\n * Personalized state object from the repeating structure. This state is generally shared to consumer.\n */\n export type PersonalizedState = RsCoreTypes.PersonalizedState;\n /** An array of multiple variants of metadata of repeating structures. */\n export type Presets = RsCoreTypes.RsCoreInitArgs['presets'];\n\n /** The set of methods exposed to consumers for communicating with repeating structure. */\n export type RsApi = RsCoreTypes.RsApi;\n\n /** Represents a row in Repeating structures */\n export type RowData = RsCoreTypes.RowData;\n\n export type RepeatingStructuresInitArgs = RepeatingStructuresProps;\n\n export type RsStyleFormat = RsStyleFormatType;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/lists-react",
|
|
3
|
-
"version": "9.0.0
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Repeating view structures such as Table, Gallery(Repeating layouts), Kanban etc.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|
|
@@ -14,24 +14,22 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "9.0.0
|
|
18
|
-
"@pega/cosmos-react-core": "9.0.0
|
|
19
|
-
"@pega/cosmos-react-rte": "9.0.0
|
|
20
|
-
"@types/lodash
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "9.0.0",
|
|
18
|
+
"@pega/cosmos-react-core": "9.0.0",
|
|
19
|
+
"@pega/cosmos-react-rte": "9.0.0",
|
|
20
|
+
"@types/lodash-es": "^4.17.12",
|
|
21
21
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
22
22
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
23
|
-
"@types/uuid": "^9.0.0",
|
|
24
23
|
"dayjs": "^1.11.13",
|
|
25
24
|
"fast-deep-equal": "^3.1.3",
|
|
26
|
-
"lodash
|
|
27
|
-
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0
|
|
28
|
-
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0
|
|
25
|
+
"lodash-es": "^4.18.1",
|
|
26
|
+
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0",
|
|
27
|
+
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0",
|
|
29
28
|
"polished": "^4.1.0",
|
|
30
29
|
"prop-types": "^15.8.1",
|
|
31
30
|
"react": "^17.0.0 || ^18.0.0",
|
|
32
31
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
33
|
-
"styled-components": "
|
|
34
|
-
"uuid": "^9.0.0"
|
|
32
|
+
"styled-components": "~6.3.11"
|
|
35
33
|
},
|
|
36
34
|
"devDependencies": {
|
|
37
35
|
"@storybook/addon-coverage": "^1.0.4",
|
|
@@ -44,7 +42,7 @@
|
|
|
44
42
|
"@testing-library/react": "^16.0.0",
|
|
45
43
|
"@testing-library/user-event": "^14.6.1",
|
|
46
44
|
"jest-axe": "^8.0.0",
|
|
47
|
-
"srs-utils": "9.0.0
|
|
48
|
-
"typescript": "~5.
|
|
45
|
+
"srs-utils": "9.0.0",
|
|
46
|
+
"typescript": "~5.9.3"
|
|
49
47
|
}
|
|
50
48
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardItem.d.ts","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/CardItem.jsx"],"names":[],"mappings":";AAqEA,qEAgCE"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo, Fragment } from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { CardContent, Card, Text, CardHeader, useTheme } from '@pega/cosmos-react-core';
|
|
5
|
-
import RenderingEngine from '../RenderingEngine/RenderCell';
|
|
6
|
-
const StyledUL = styled.ul `
|
|
7
|
-
& > li > span {
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
display: -webkit-box;
|
|
10
|
-
-webkit-line-clamp: 3;
|
|
11
|
-
-webkit-box-orient: vertical;
|
|
12
|
-
word-break: break-word;
|
|
13
|
-
}
|
|
14
|
-
& > li {
|
|
15
|
-
list-style-type: none;
|
|
16
|
-
padding-block-start: calc(${props => props.theme.base.spacing} / 2);
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
19
|
-
const FieldValues = ({ row, columns }) => {
|
|
20
|
-
const theme = useTheme();
|
|
21
|
-
return (_jsx(StyledUL, { theme: theme, children: columns.map(column => {
|
|
22
|
-
if (column.hidden)
|
|
23
|
-
return null;
|
|
24
|
-
column.setExecutionContext(row);
|
|
25
|
-
const { id } = column.field;
|
|
26
|
-
return (_jsx(Fragment, { children: _jsx("li", { children: _jsx(RenderingEngine, { highlighter: true, ...column.getRenderingEngineProps() }) }) }, id));
|
|
27
|
-
}) }));
|
|
28
|
-
};
|
|
29
|
-
const CardHeaderText = styled(Text) `
|
|
30
|
-
white-space: nowrap;
|
|
31
|
-
max-width: 100%;
|
|
32
|
-
text-overflow: ellipsis;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
`;
|
|
35
|
-
const StyledCard = styled(Card) `
|
|
36
|
-
padding: 0.625rem;
|
|
37
|
-
min-width: 6.25rem;
|
|
38
|
-
`;
|
|
39
|
-
const StyledCardContent = styled(CardContent) `
|
|
40
|
-
&& {
|
|
41
|
-
padding-bottom: 0.5rem;
|
|
42
|
-
}
|
|
43
|
-
&.cardContent {
|
|
44
|
-
padding-left: 0.5rem;
|
|
45
|
-
}
|
|
46
|
-
`;
|
|
47
|
-
const StyledCardHeader = styled(CardHeader) `
|
|
48
|
-
&.cardHeader {
|
|
49
|
-
padding: 0.5rem;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
align-items: flex-start;
|
|
52
|
-
}
|
|
53
|
-
.cardRowAction {
|
|
54
|
-
position: absolute;
|
|
55
|
-
right: 0.5rem;
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
58
|
-
const CardItem = memo(({ row, headerColumn, secondaryTextColumn, filteredColumns, rowActionMenuColumn }) => {
|
|
59
|
-
const data = row.getContext().getValue();
|
|
60
|
-
if (!data)
|
|
61
|
-
return null;
|
|
62
|
-
if (headerColumn)
|
|
63
|
-
headerColumn.setExecutionContext(row);
|
|
64
|
-
if (secondaryTextColumn)
|
|
65
|
-
secondaryTextColumn.setExecutionContext(row);
|
|
66
|
-
if (rowActionMenuColumn)
|
|
67
|
-
rowActionMenuColumn.setExecutionContext(row);
|
|
68
|
-
return (_jsxs(StyledCard, { variant: 'cover', children: [_jsxs(StyledCardHeader, { className: 'cardHeader', children: [headerColumn && (_jsx(CardHeaderText, { variant: 'h4', children: _jsx(RenderingEngine, { highlighter: true, ...headerColumn.getRenderingEngineProps() }) })), secondaryTextColumn && (_jsx(CardHeaderText, { variant: 'h4', children: _jsx(RenderingEngine, { highlighter: true, ...secondaryTextColumn.getRenderingEngineProps() }) })), rowActionMenuColumn && (_jsx("div", { className: 'cardRowAction', children: _jsx(RenderingEngine, { highlighter: true, ...rowActionMenuColumn.getRenderingEngineProps() }) }))] }), _jsx(StyledCardContent, { className: 'cardContent', children: FieldValues({ row, columns: filteredColumns }) })] }));
|
|
69
|
-
});
|
|
70
|
-
CardItem.defaultProps = {
|
|
71
|
-
row: {},
|
|
72
|
-
columns: []
|
|
73
|
-
};
|
|
74
|
-
CardItem.mapStateToProps = instance => ({
|
|
75
|
-
columns: instance.columns
|
|
76
|
-
});
|
|
77
|
-
export default CardItem;
|
|
78
|
-
//# sourceMappingURL=CardItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardItem.js","sourceRoot":"","sources":["../../../../Core/Components/DefaultComponents/CardItem.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExF,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAE5D,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;gCAUM,KAAK,CAAC,EAA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AAC,GAAG,CAAC,CAAC;IACxD,IAAI,mBAAmB;QAAE,mBAAmB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACtE,IAAI,mBAAmB;QAAE,mBAAmB,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC;IACtE,OAAO,CACL,MAAC,UAAU,IAAC,OAAO,EAAC,OAAO,aACzB,MAAC,gBAAgB,IAAC,SAAS,EAAC,YAAY,aACrC,YAAY,IAAI,CACf,KAAC,cAAc,IAAC,OAAO,EAAC,IAAI,YAC1B,KAAC,eAAe,IAAC,WAAW,WAAK,YAAY,CAAC,uBAAuB,EAAE,GAAI,GAC5D,CAClB,EACA,mBAAmB,IAAI,CACtB,KAAC,cAAc,IAAC,OAAO,EAAC,IAAI,YAC1B,KAAC,eAAe,IAAC,WAAW,WAAK,mBAAmB,CAAC,uBAAuB,EAAE,GAAI,GACnE,CAClB,EACA,mBAAmB,IAAI,CACtB,cAAK,SAAS,EAAC,eAAe,YAC5B,KAAC,eAAe,IAAC,WAAW,WAAK,mBAAmB,CAAC,uBAAuB,EAAE,GAAI,GAC9E,CACP,IACgB,EACnB,KAAC,iBAAiB,IAAC,SAAS,EAAC,aAAa,YACvC,WAAW,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,GAC7B,IACT,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,YAAY,GAAG;IACtB,GAAG,EAAE,EAAE;IACP,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,QAAQ,CAAC,OAAO;CAC1B,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { memo, Fragment } from 'react';\nimport styled from 'styled-components';\n\nimport { CardContent, Card, Text, CardHeader, useTheme } from '@pega/cosmos-react-core';\n\nimport RenderingEngine from '../RenderingEngine/RenderCell';\n\nconst StyledUL = styled.ul`\n & > li > span {\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n word-break: break-word;\n }\n & > li {\n list-style-type: none;\n padding-block-start: calc(${props => props.theme.base.spacing} / 2);\n }\n`;\n\nconst FieldValues = ({ row, columns }) => {\n const theme = useTheme();\n return (\n <StyledUL theme={theme}>\n {columns.map(column => {\n if (column.hidden) return null;\n column.setExecutionContext(row);\n const { id } = column.field;\n return (\n <Fragment key={id}>\n <li>\n <RenderingEngine highlighter {...column.getRenderingEngineProps()} />\n </li>\n </Fragment>\n );\n })}\n </StyledUL>\n );\n};\nconst CardHeaderText = styled(Text)`\n white-space: nowrap;\n max-width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\nconst StyledCard = styled(Card)`\n padding: 0.625rem;\n min-width: 6.25rem;\n`;\nconst StyledCardContent = styled(CardContent)`\n && {\n padding-bottom: 0.5rem;\n }\n &.cardContent {\n padding-left: 0.5rem;\n }\n`;\nconst StyledCardHeader = styled(CardHeader)`\n &.cardHeader {\n padding: 0.5rem;\n flex-direction: column;\n align-items: flex-start;\n }\n .cardRowAction {\n position: absolute;\n right: 0.5rem;\n }\n`;\nconst CardItem = memo(\n ({ row, headerColumn, secondaryTextColumn, filteredColumns, rowActionMenuColumn }) => {\n const data = row.getContext().getValue();\n if (!data) return null;\n if (headerColumn) headerColumn.setExecutionContext(row);\n if (secondaryTextColumn) secondaryTextColumn.setExecutionContext(row);\n if (rowActionMenuColumn) rowActionMenuColumn.setExecutionContext(row);\n return (\n <StyledCard variant='cover'>\n <StyledCardHeader className='cardHeader'>\n {headerColumn && (\n <CardHeaderText variant='h4'>\n <RenderingEngine highlighter {...headerColumn.getRenderingEngineProps()} />\n </CardHeaderText>\n )}\n {secondaryTextColumn && (\n <CardHeaderText variant='h4'>\n <RenderingEngine highlighter {...secondaryTextColumn.getRenderingEngineProps()} />\n </CardHeaderText>\n )}\n {rowActionMenuColumn && (\n <div className='cardRowAction'>\n <RenderingEngine highlighter {...rowActionMenuColumn.getRenderingEngineProps()} />\n </div>\n )}\n </StyledCardHeader>\n <StyledCardContent className='cardContent'>\n {FieldValues({ row, columns: filteredColumns })}\n </StyledCardContent>\n </StyledCard>\n );\n }\n);\n\nCardItem.defaultProps = {\n row: {},\n columns: []\n};\n\nCardItem.mapStateToProps = instance => ({\n columns: instance.columns\n});\n\nexport default CardItem;\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default DateTime;
|
|
2
|
-
declare function DateTime(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
declare namespace DateTime {
|
|
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=DateTime.d.ts.map
|
package/lib/Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.jsx"],"names":[],"mappings":";AAUA,+EAoCC;;;;;;;;;sBA7CqB,YAAY"}
|
|
@@ -1,36 +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
|
-
import { FieldType } from 'pega-repeating-structures-core';
|
|
6
|
-
const styles = {
|
|
7
|
-
input: { width: '100%' }
|
|
8
|
-
};
|
|
9
|
-
function DateTime(props) {
|
|
10
|
-
const { getField, getValue } = props;
|
|
11
|
-
const { type } = getField();
|
|
12
|
-
const oldValue = getValue();
|
|
13
|
-
const [value, setValue] = useState(type === FieldType.DATE_TIME ? oldValue?.slice(0, -1) : oldValue);
|
|
14
|
-
const inputRef = useRef(null);
|
|
15
|
-
const onChange = event => setValue(event.target.value);
|
|
16
|
-
const onEscape = event => {
|
|
17
|
-
if (event.key === 'Escape') {
|
|
18
|
-
props.onCancel();
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const onBlur = () => props.onSubmit({ oldValue, newValue: value });
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
inputRef.current?.focus();
|
|
24
|
-
}, [inputRef]);
|
|
25
|
-
return (_jsx(Input, { ...props, type: type === FieldType.DATE_TIME ? 'datetime-local' : type, value: value, style: styles.input, ref: ref => {
|
|
26
|
-
inputRef.current = ref;
|
|
27
|
-
}, onChange: onChange, onBlur: onBlur, onKeyDown: onEscape }));
|
|
28
|
-
}
|
|
29
|
-
DateTime.propTypes = {
|
|
30
|
-
onCancel: PropTypes.func.isRequired,
|
|
31
|
-
onSubmit: PropTypes.func.isRequired,
|
|
32
|
-
getField: PropTypes.func.isRequired,
|
|
33
|
-
getValue: PropTypes.func.isRequired
|
|
34
|
-
};
|
|
35
|
-
export default DateTime;
|
|
36
|
-
//# sourceMappingURL=DateTime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DateTime.js","sourceRoot":"","sources":["../../../../../../Core/Components/DefaultComponents/CellRenderers/EditComponents/DateTime.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,EA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AE,GAAG,CAAC,EAAE;YACT,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC;QACzB,CAAC,EACD,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,GACnB,CACH,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,SAAS,GAAG;IACnB,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,QAAQ,CAAC","sourcesContent":["import { useState, useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { Input } from '@pega/cosmos-react-core';\nimport { FieldType } from 'pega-repeating-structures-core';\n\nconst styles = {\n input: { width: '100%' }\n};\n\nfunction DateTime(props) {\n const { getField, getValue } = props;\n const { type } = getField();\n const oldValue = getValue();\n const [value, setValue] = useState(\n type === FieldType.DATE_TIME ? oldValue?.slice(0, -1) : oldValue\n );\n const inputRef = useRef(null);\n\n const onChange = event => setValue(event.target.value);\n\n const onEscape = event => {\n if (event.key === 'Escape') {\n props.onCancel();\n }\n };\n\n const onBlur = () => props.onSubmit({ oldValue, newValue: value });\n useEffect(() => {\n inputRef.current?.focus();\n }, [inputRef]);\n\n return (\n <Input\n {...props}\n type={type === FieldType.DATE_TIME ? 'datetime-local' : type}\n value={value}\n style={styles.input}\n ref={ref => {\n inputRef.current = ref;\n }}\n onChange={onChange}\n onBlur={onBlur}\n onKeyDown={onEscape}\n />\n );\n}\n\nDateTime.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 DateTime;\n"]}
|
|
@@ -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":";AASA,iFA+CC;;;;;;;;;;;;sBAvDqB,YAAY"}
|
|
@@ -1,50 +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
|
-
import { FieldType } from 'pega-repeating-structures-core';
|
|
7
|
-
const StyledRadioGroup = styled.div ``;
|
|
8
|
-
function RadioGroup(props) {
|
|
9
|
-
const { getField, getValue, getFormatter, renderFactory, resolveCellComponent } = props;
|
|
10
|
-
const field = getField();
|
|
11
|
-
const { id } = field;
|
|
12
|
-
const oldValue = getValue();
|
|
13
|
-
const translatedValue = oldValue === 'null' || oldValue === '' || oldValue === null || typeof oldValue === 'undefined'
|
|
14
|
-
? 'Empty'
|
|
15
|
-
: oldValue;
|
|
16
|
-
const [value, setValue] = useState(translatedValue);
|
|
17
|
-
const radioOptions = field.type === FieldType.BOOLEAN ? [true, false, 'Empty'] : field.filterPickListOptions;
|
|
18
|
-
const onChange = event => {
|
|
19
|
-
setValue(event.target.id);
|
|
20
|
-
let newValue = event.target.id;
|
|
21
|
-
if (field.type === FieldType.BOOLEAN) {
|
|
22
|
-
if (event.target.id === 'Empty')
|
|
23
|
-
newValue = null;
|
|
24
|
-
else
|
|
25
|
-
newValue = event.target.id === 'true';
|
|
26
|
-
}
|
|
27
|
-
props.onSubmit({ oldValue, newValue });
|
|
28
|
-
};
|
|
29
|
-
return (_jsx(StyledRadioGroup, { children: _jsx(RadioCheckGroup, { name: id, children: radioOptions.map(item => {
|
|
30
|
-
const checkedProp = {};
|
|
31
|
-
if (item === value)
|
|
32
|
-
checkedProp.defaultChecked = true;
|
|
33
|
-
return (_jsx(RadioButton, { id: `${item}`, name: `${item}`, onClick: onChange, label: resolveCellComponent('cellRenderer', renderFactory, {
|
|
34
|
-
...props,
|
|
35
|
-
getValue: () => item.toString(),
|
|
36
|
-
getFormattedValue: () => getFormatter?.()?.(item) || item.toString()
|
|
37
|
-
}), ...checkedProp }, `${item}`));
|
|
38
|
-
}) }) }));
|
|
39
|
-
}
|
|
40
|
-
RadioGroup.propTypes = {
|
|
41
|
-
onCancel: PropTypes.func.isRequired,
|
|
42
|
-
onSubmit: PropTypes.func.isRequired,
|
|
43
|
-
getField: PropTypes.func.isRequired,
|
|
44
|
-
getValue: PropTypes.func.isRequired,
|
|
45
|
-
getFormatter: PropTypes.func.isRequired,
|
|
46
|
-
renderFactory: PropTypes.func.isRequired,
|
|
47
|
-
resolveCellComponent: PropTypes.func.isRequired
|
|
48
|
-
};
|
|
49
|
-
export default RadioGroup;
|
|
50
|
-
//# sourceMappingURL=Radio.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../../../../Core/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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';\nimport { FieldType } from 'pega-repeating-structures-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 === FieldType.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 === FieldType.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/TextInput.jsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,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AAE,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":";AAcA,6EA8DC;;;;;;;;;;;;;sBA5EqB,YAAY"}
|
|
@@ -1,64 +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 { FieldType } from 'pega-repeating-structures-core';
|
|
6
|
-
import TextInput from './TextInput';
|
|
7
|
-
import DateTime from './DateTime';
|
|
8
|
-
import Radio from './Radio';
|
|
9
|
-
const StyledPopover = styled.div `
|
|
10
|
-
padding: 1rem;
|
|
11
|
-
min-width: 7rem;
|
|
12
|
-
`;
|
|
13
|
-
function Editor(props) {
|
|
14
|
-
const { getField, onCancel, getElement, setEditContext, getFormatter, getValue, renderFactory, resolveCellComponent } = props;
|
|
15
|
-
setEditContext();
|
|
16
|
-
const { type, filterPickList, filterPickListOptions } = getField();
|
|
17
|
-
const showInPopOver = type === FieldType.BOOLEAN || (filterPickList && filterPickListOptions);
|
|
18
|
-
const [popperRef, setPopperRef] = useElement();
|
|
19
|
-
const [popperTarget, setPopperTarget] = useElement(getElement());
|
|
20
|
-
useOuterEvent('mousedown', [popperRef], () => {
|
|
21
|
-
setPopperTarget(null);
|
|
22
|
-
if (showInPopOver)
|
|
23
|
-
onCancel();
|
|
24
|
-
});
|
|
25
|
-
let Component = null;
|
|
26
|
-
switch (type) {
|
|
27
|
-
case FieldType.TEXT:
|
|
28
|
-
case FieldType.NUMBER:
|
|
29
|
-
Component = TextInput;
|
|
30
|
-
break;
|
|
31
|
-
case FieldType.DATE:
|
|
32
|
-
case FieldType.DATE_TIME:
|
|
33
|
-
Component = DateTime;
|
|
34
|
-
break;
|
|
35
|
-
case FieldType.BOOLEAN:
|
|
36
|
-
Component = Radio;
|
|
37
|
-
break;
|
|
38
|
-
default:
|
|
39
|
-
Component = TextInput;
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
if (filterPickList && filterPickListOptions) {
|
|
43
|
-
Component = Radio;
|
|
44
|
-
}
|
|
45
|
-
if (!showInPopOver)
|
|
46
|
-
return _jsx(Component, { ...props });
|
|
47
|
-
const value = getValue();
|
|
48
|
-
return (_jsxs(_Fragment, { children: [resolveCellComponent('cellRenderer', renderFactory, {
|
|
49
|
-
...props,
|
|
50
|
-
getFormattedValue: () => getFormatter?.()?.(value) || value
|
|
51
|
-
}), showInPopOver && (_jsx(Popover, { ref: setPopperRef, className: 'editpopper', target: popperTarget, children: _jsx(StyledPopover, { children: _jsx(Component, { ...props }) }) }))] }));
|
|
52
|
-
}
|
|
53
|
-
Editor.propTypes = {
|
|
54
|
-
getField: PropTypes.func.isRequired,
|
|
55
|
-
onCancel: PropTypes.func.isRequired,
|
|
56
|
-
getElement: PropTypes.func.isRequired,
|
|
57
|
-
setEditContext: PropTypes.func.isRequired,
|
|
58
|
-
getFormatter: PropTypes.func.isRequired,
|
|
59
|
-
getValue: PropTypes.func.isRequired,
|
|
60
|
-
renderFactory: PropTypes.func.isRequired,
|
|
61
|
-
resolveCellComponent: PropTypes.func.isRequired
|
|
62
|
-
};
|
|
63
|
-
export default Editor;
|
|
64
|
-
//# 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;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,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,QAAQ,EACR,aAAa,EACb,oBAAoB,EACrB,GAAG,KAAK,CAAC;IACV,cAAc,EAAE,CAAC;IAEjB,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,qBAAqB,EAAE,GAAG,QAAQ,EAAE,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AAa,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';\nimport { FieldType } from 'pega-repeating-structures-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 === FieldType.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 FieldType.TEXT:\n case FieldType.NUMBER:\n Component = TextInput;\n break;\n case FieldType.DATE:\n case FieldType.DATE_TIME:\n Component = DateTime;\n break;\n case FieldType.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,31 +0,0 @@
|
|
|
1
|
-
declare function GroupHeader({ groupHeader, columns }: {
|
|
2
|
-
groupHeader: any;
|
|
3
|
-
columns: any;
|
|
4
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
-
declare namespace GroupHeader {
|
|
6
|
-
namespace propTypes {
|
|
7
|
-
let columns: PropTypes.Validator<any[]>;
|
|
8
|
-
let groupHeader: PropTypes.Validator<{
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
}>;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export default GroupHeader;
|
|
14
|
-
/**
|
|
15
|
-
* Formats additional field data based on its type and properties.
|
|
16
|
-
*/
|
|
17
|
-
export type AdditionalFieldData = NonNullable<Awaited<ReturnType<NonNullable<import("pega-repeating-structures-core").RsCoreTypes.ApiContext["fetchGroupedInfo"]>>>[number]["additionalFieldsData"]>[number];
|
|
18
|
-
/**
|
|
19
|
-
* Formats additional field data based on its type and properties.
|
|
20
|
-
*/
|
|
21
|
-
export type Column = import("pega-repeating-structures-core").RsCoreTypes.Column;
|
|
22
|
-
/**
|
|
23
|
-
* Formats additional field data based on its type and properties.
|
|
24
|
-
*/
|
|
25
|
-
export type Meta = import("pega-repeating-structures-core").RsCoreTypes.Meta;
|
|
26
|
-
/**
|
|
27
|
-
* Formats additional field data based on its type and properties.
|
|
28
|
-
*/
|
|
29
|
-
export type GroupGenerator = import("pega-repeating-structures-core").RsCoreTypes.GroupGenerator;
|
|
30
|
-
import PropTypes from 'prop-types';
|
|
31
|
-
//# sourceMappingURL=GroupRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GroupRenderer.d.ts","sourceRoot":"","sources":["../../../Core/Components/GroupRenderer.jsx"],"names":[],"mappings":"AAwXA;;;mDAqIC;;;;;;;;;;;;;kCA7UY,WAAW,CACnB,OAAO,CACL,UAAU,CACR,WAAW,CACnB,OAAiB,gCAAgC,EAAE,WAAW,CAAC,UAAU,CAAC,kBAAkB,CAAC,CACpF,CACF,CACF,CAAC,MAAM,CAAC,CAAC,sBAAsB,CAAC,CAClC,CAAC,MAAM,CAAC;;;;qBAEC,OAAO,gCAAgC,EAAE,WAAW,CAAC,MAAM;;;;mBAC3D,OAAO,gCAAgC,EAAE,WAAW,CAAC,IAAI;;;;6BACzD,OAAO,gCAAgC,EAAE,WAAW,CAAC,cAAc;sBA5L1D,YAAY"}
|