@pega/lists-react 9.0.0-build.2.9 → 9.0.0-build.20.1
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 +1 -1
- package/lib/Core/Components/HeaderMenu/actions.d.ts.map +1 -1
- package/lib/Core/Components/HeaderMenu/actions.js +6 -6
- 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 +4 -4
- 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/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/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 +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.d.ts.map +1 -1
- package/lib/Core/Components/RenderingEngine/RenderCell.js +4 -2
- 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/RepeatingStructuresBoot.types.d.ts +12 -2
- 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 -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAGjF,oDAAoD;AACp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,IAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,aAC7D,KAAC,OAAO,IAAC,IAAI,EAAE,IAAI,GAAI,EACvB,KAAC,UAAU,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,GAAI,EAElD,MAAC,kBAAkB,IACjB,SAAS,EAAC,yBAAyB,EACnC,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,IAAI,aAEV,KAAC,cAAc,IACb,QAAQ,EAAE,QAAQ,IAAI,EAAE,EACxB,WAAW,EAAE,IAAI,IAAI,EAAE,EACvB,OAAO,EAAE,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,EACrE,OAAO,EAAE,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,EAC7C,QAAQ,EAAE,QAAQ,kBACL,UAAU,EACvB,GAAG,EAAE,GAAG,GACR,EACF,KAAC,cAAc,IAAC,IAAI,EAAE,IAAI,GAAI,IACX,IACG,GACZ,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { useEffect, useCallback, useMemo, useState, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Timeline as TimelineCosmos } from '@pega/cosmos-react-work';\nimport { defaultThemeProp, useFullscreenContext } from '@pega/cosmos-react-core';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\n// TODO remove ts-ignore once Toolbar migrated to TS\n// @ts-ignore\nimport Toolbar from '../../Components/Toolbar';\nimport EmptyContainer from '../../Components/EmptyContainer';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport getCount from '../../Components/Toolbar/utils/getCount';\nimport { EXTERNAL_FILTERS } from '../../constants';\nimport RsCardWrapper from '../RsCardWrapper';\nimport { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';\n\nimport getActivity, { mapDateFnToGroupOption } from './utility';\n\nconst StyledTimeline = styled(TimelineCosmos)(({ theme }) => {\n return css`\n flex: 1;\n padding-inline-end: ${theme.base.spacing};\n overflow: auto;\n `;\n});\n\nStyledTimeline.defaultProps = defaultThemeProp;\n\ninterface StyledTimelineContainerProps {\n view: RsCoreTypes.View;\n isFullscreen: boolean;\n}\n\nconst StyledTimelineContainer = styled.div<StyledTimelineContainerProps>(\n ({ view, isFullscreen }) => {\n return css`\n position: relative;\n ${() => generateRSHeightStyles({ view, isFullscreen })}\n `;\n }\n);\n\ninterface StyledRowContainerProps {\n isFullscreen: boolean;\n view: RsCoreTypes.View;\n}\n\nconst StyledRowContainer = styled.div<StyledRowContainerProps>(({ isFullscreen, view }) => {\n const {\n bodyHeight,\n totalItemCount,\n meta: { basicMode }\n } = view;\n return css`\n ${() => generateRSDataContainerHeightStyles()};\n position: relative;\n min-height: ${basicMode && totalItemCount === 0 ? '100px' : 'auto'};\n flex-grow: 0;\n\n /* Adjust height based on number of rows configured */\n height: ${bodyHeight && !isFullscreen ? `${bodyHeight}px` : 'auto'};\n `;\n});\n\nconst INITIAL_DEFAULT_CHUNK_SIZE = 40;\nconst APPEND_DEFAULT_CHUNK_SIZE = 25;\n\nexport interface TimelineViewProps {\n view: RsCoreTypes.View;\n}\nconst Timeline = ({ view }: TimelineViewProps) => {\n const isFullscreen = !!useFullscreenContext()?.[0];\n const {\n rows,\n meta = { fieldDefs: [] as RsCoreTypes.FieldDef[], itemKey: '' } as RsCoreTypes.Meta,\n columns,\n groupHeaders,\n state\n } = view;\n const ref = useRef<HTMLTableElement>(null);\n const [loading, setLoading] = useState(false);\n const [hasMore, setHasMore] = useState(true);\n\n const count = getCount({ view });\n const visibleGroupHeaders = groupHeaders?.filter(({ isVisible }) => isVisible)?.length ?? 0;\n const paginationEndIndex = state.paginationOptions?.rootVirtualiser?.endIndex ?? 0;\n\n const onLoadMore = useCallback(() => {\n if (!loading) {\n setLoading(true);\n const endIndex =\n rows!.length + visibleGroupHeaders + (meta.numberOfRows || APPEND_DEFAULT_CHUNK_SIZE);\n view.type.onPaginate({ startIndex: 0, endIndex, id: 'rootVirtualiser' });\n }\n }, [loading, view.type, meta.numberOfRows, rows!.length, visibleGroupHeaders]);\n\n useEffect(() => {\n view.type.onPaginate({\n startIndex: 0,\n endIndex: meta.numberOfRows || INITIAL_DEFAULT_CHUNK_SIZE,\n id: 'rootVirtualiser'\n });\n }, [view.type, meta.numberOfRows]);\n\n useEffect(() => {\n setHasMore(rows!.length !== count.total);\n if (paginationEndIndex <= rows!.length + visibleGroupHeaders || rows!.length === count.total) {\n setLoading(false);\n }\n }, [count.total, rows!.length, paginationEndIndex, visibleGroupHeaders]);\n\n const activity = useMemo(() => getActivity(rows, columns, meta), [rows, columns, meta]);\n\n let loadMore;\n if (hasMore) {\n loadMore = onLoadMore;\n }\n\n return (\n <RsCardWrapper>\n <StyledTimelineContainer view={view} isFullscreen={isFullscreen}>\n <Toolbar view={view} />\n <RenderView view={view} type={EXTERNAL_FILTERS} />\n\n <StyledRowContainer\n className='container row-container'\n isFullscreen={isFullscreen}\n view={view}\n >\n <StyledTimeline\n activity={activity || []}\n currentTime={new Date()}\n groupBy={mapDateFnToGroupOption(view.state.groups?.[0]?.dateFunction)}\n loading={loading || !rows || !!view.isLoading}\n loadMore={loadMore}\n data-test-id='Timeline'\n ref={ref}\n />\n <EmptyContainer view={view} />\n </StyledRowContainer>\n </StyledTimelineContainer>\n </RsCardWrapper>\n );\n};\n\nexport default Timeline;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB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;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { useEffect, useCallback, useMemo, useState, useRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp, useFullscreenContext } from '@pega/cosmos-react-core';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\n\n// TODO remove ts-ignore once Toolbar migrated to TS\n// @ts-ignore\nimport Toolbar from '../../Components/Toolbar';\nimport RenderView from '../../Components/RenderingEngine/RenderView';\nimport getCount from '../../Components/Toolbar/utils/getCount';\nimport { EXTERNAL_FILTERS } from '../../constants';\nimport RsCardWrapper from '../RsCardWrapper';\nimport { generateRSDataContainerHeightStyles, generateRSHeightStyles } from '../../Utils/styles';\nimport EmptyContainer from '../../Components/DefaultComponents/EmptyContainer';\nimport { isFilterApplied } from '../../Utils';\nimport useTranslate from '../../Hooks/useTranslate';\n\nimport TimelineInner from './Timeline';\nimport getActivities from './utils';\n\nconst StyledTimeline = styled(TimelineInner)(({ theme }) => {\n return css`\n flex: 1;\n padding-inline-end: ${theme.base.spacing};\n overflow: auto;\n `;\n});\n\nStyledTimeline.defaultProps = defaultThemeProp;\n\ninterface StyledTimelineContainerProps {\n view: RsCoreTypes.View;\n isFullscreen: boolean;\n}\n\nconst StyledTimelineContainer = styled.div<StyledTimelineContainerProps>(\n ({ view, isFullscreen }) => {\n return css`\n position: relative;\n ${() => generateRSHeightStyles({ view, isFullscreen })}\n `;\n }\n);\n\ninterface StyledRowContainerProps {\n isFullscreen: boolean;\n view: RsCoreTypes.View;\n}\n\nconst StyledRowContainer = styled.div<StyledRowContainerProps>(({ isFullscreen, view }) => {\n const {\n bodyHeight,\n totalItemCount,\n meta: { basicMode }\n } = view;\n return css`\n ${() => generateRSDataContainerHeightStyles()};\n position: relative;\n min-height: ${basicMode && totalItemCount === 0 ? '100px' : 'auto'};\n flex-grow: 0;\n\n /* Adjust height based on number of rows configured */\n height: ${bodyHeight && !isFullscreen ? `${bodyHeight}px` : 'auto'};\n `;\n});\n\nconst INITIAL_DEFAULT_CHUNK_SIZE = 40;\nconst APPEND_DEFAULT_CHUNK_SIZE = 25;\n\nexport interface TimelineViewProps {\n view: RsCoreTypes.View;\n}\n\nconst Timeline = ({ view }: TimelineViewProps) => {\n const isFullscreen = !!useFullscreenContext()?.[0];\n const [translate] = useTranslate();\n const {\n rows,\n meta = { fieldDefs: [] as RsCoreTypes.FieldDef[], itemKey: '' } as RsCoreTypes.Meta,\n columns,\n groupHeaders,\n state,\n domContainer,\n hasNoRecords\n } = view;\n const { filterExpression, externalState, searchText, paginationOptions, groups } = state;\n const ref = useRef<HTMLTableElement>(null);\n const [loading, setLoading] = useState(false);\n const [hasMore, setHasMore] = useState(true);\n\n const count = getCount({ view });\n const visibleGroupHeaders = groupHeaders?.filter(({ isVisible }) => isVisible)?.length ?? 0;\n const paginationEndIndex = paginationOptions?.rootVirtualiser?.endIndex ?? 0;\n\n const onLoadMore = useCallback(() => {\n if (!loading) {\n setLoading(true);\n const endIndex =\n rows!.length + visibleGroupHeaders + (meta.numberOfRows || APPEND_DEFAULT_CHUNK_SIZE);\n view.type.onPaginate({ startIndex: 0, endIndex, id: 'rootVirtualiser' });\n }\n }, [loading, view.type, meta.numberOfRows, rows!.length, visibleGroupHeaders]);\n\n useEffect(() => {\n view.type.onPaginate({\n startIndex: 0,\n endIndex: meta.numberOfRows || INITIAL_DEFAULT_CHUNK_SIZE,\n id: 'rootVirtualiser'\n });\n }, [view.type, meta.numberOfRows]);\n\n useEffect(() => {\n setHasMore(rows!.length !== count.total);\n if (paginationEndIndex <= rows!.length + visibleGroupHeaders || rows!.length === count.total) {\n setLoading(false);\n }\n }, [count.total, rows!.length, paginationEndIndex, visibleGroupHeaders]);\n\n const activities = useMemo(\n () => getActivities(groupHeaders, columns, meta, groups?.[0]),\n [groupHeaders, columns, meta, groups?.[0]]\n );\n\n let loadMore;\n if (hasMore) {\n loadMore = onLoadMore;\n }\n\n return (\n <RsCardWrapper>\n <StyledTimelineContainer view={view} isFullscreen={isFullscreen}>\n <Toolbar view={view} />\n <RenderView view={view} type={EXTERNAL_FILTERS} />\n\n <StyledRowContainer\n className='container row-container'\n isFullscreen={isFullscreen}\n view={view}\n >\n <StyledTimeline\n activities={activities}\n currentTime={new Date()}\n groupBy={groups?.[0]}\n loading={loading || !rows || !!view.isLoading}\n loadMore={loadMore}\n data-test-id='Timeline'\n ref={ref}\n />\n {domContainer && hasNoRecords && (\n <EmptyContainer\n message={\n isFilterApplied(\n { filterExpression, searchText, externalState },\n meta.externalFilters\n )\n ? translate('No records found')\n : translate('No records')\n }\n domContainer={domContainer}\n shouldAnnounce={false}\n />\n )}\n </StyledRowContainer>\n </StyledTimelineContainer>\n </RsCardWrapper>\n );\n};\n\nexport default Timeline;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';
|
|
2
|
+
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
3
|
+
import type { Group } from 'pega-repeating-structures-core/lib/types/State.types';
|
|
4
|
+
import type TimelineProps from './Timeline.types';
|
|
5
|
+
export declare const dateDisplayVariants: Partial<Record<NonNullable<Group['dateFunction']>, DateTimeVariant>>;
|
|
6
|
+
declare const getActivities: (groupHeaders: RsCoreTypes.View["groupHeaders"], columns: RsCoreTypes.View["columns"], { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View["meta"], groupBy?: Group) => TimelineProps["activities"];
|
|
7
|
+
export default getActivities;
|
|
8
|
+
export declare function calculateBodyMaxHeight(maxHeight: string | number | undefined, domContainer: HTMLElement | undefined, pContainer: HTMLElement | null | undefined): string | undefined;
|
|
9
|
+
export declare function isFutureDate(date: string | number | Date | undefined, current: Date): boolean;
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utils.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gEAAgE,CAAC;AAGtG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAMlF,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAmDlD,eAAO,MAAM,mBAAmB,EAAE,OAAO,CACvC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE,eAAe,CAAC,CAS5D,CAAC;AAqCF,QAAA,MAAM,aAAa,GACjB,cAAc,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,EAC9C,SAAS,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EACpC,gDAAgD,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EACxE,UAAU,KAAK,KACd,aAAa,CAAC,YAAY,CA2D5B,CAAC;AAEF,eAAe,aAAa,CAAC;AAE7B,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EACtC,YAAY,EAAE,WAAW,GAAG,SAAS,EACrC,UAAU,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,sBAc3C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CAG7F"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import timezonePlugin from 'dayjs/plugin/timezone';
|
|
4
|
+
import { DateTimeDisplay, NoValue, parseToDate } from '@pega/cosmos-react-core';
|
|
5
|
+
import { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';
|
|
6
|
+
import RenderingEngine from '../../Components/RenderingEngine/RenderCell';
|
|
7
|
+
import ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';
|
|
8
|
+
dayjs.extend(timezonePlugin);
|
|
9
|
+
const getStatusVariant = (data) => {
|
|
10
|
+
let variant;
|
|
11
|
+
const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];
|
|
12
|
+
const infoStrings = ['open', 'hold', 'info', 'new'];
|
|
13
|
+
const successStrings = ['resolved', 'completed', 'success'];
|
|
14
|
+
const pendingStrings = ['pending'];
|
|
15
|
+
if (new RegExp(warnStrings.join('|'), 'i').test(data)) {
|
|
16
|
+
variant = 'warn';
|
|
17
|
+
}
|
|
18
|
+
else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {
|
|
19
|
+
variant = 'info';
|
|
20
|
+
}
|
|
21
|
+
else if (new RegExp(successStrings.join('|'), 'i').test(data)) {
|
|
22
|
+
variant = 'success';
|
|
23
|
+
}
|
|
24
|
+
else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {
|
|
25
|
+
variant = 'pending';
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
variant = 'info';
|
|
29
|
+
}
|
|
30
|
+
return variant;
|
|
31
|
+
};
|
|
32
|
+
const getFieldsAsActivityContent = (columns, row) => {
|
|
33
|
+
return columns
|
|
34
|
+
?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)
|
|
35
|
+
?.map(column => {
|
|
36
|
+
return {
|
|
37
|
+
id: column.field.id,
|
|
38
|
+
name: column.field.label,
|
|
39
|
+
value: _jsx(ValueRenderer, { column: column, row: row })
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const convertDateToTimezone = (value, timezone) => {
|
|
44
|
+
return (dayjs(value)
|
|
45
|
+
.tz(timezone)
|
|
46
|
+
// cSpell:disable-next-line
|
|
47
|
+
.format('YYYY-MM-DDTHH:mm:ss'));
|
|
48
|
+
};
|
|
49
|
+
export const dateDisplayVariants = {
|
|
50
|
+
YEARS: 'year',
|
|
51
|
+
QUARTERS: 'quarteryear',
|
|
52
|
+
MONTHS: 'monthyear',
|
|
53
|
+
WEEKS: 'week',
|
|
54
|
+
DAYS: 'date',
|
|
55
|
+
HOURS: 'datetime',
|
|
56
|
+
MINUTES: 'datetime'
|
|
57
|
+
};
|
|
58
|
+
const renderHeader = (header, groupBy, groupByColumn) => {
|
|
59
|
+
if (!groupByColumn || !header.name) {
|
|
60
|
+
return _jsx(NoValue, {});
|
|
61
|
+
}
|
|
62
|
+
if (groupBy?.dateFunction && typeof header.name !== 'boolean') {
|
|
63
|
+
return (_jsx(DateTimeDisplay, { variant: dateDisplayVariants[groupBy.dateFunction] ?? 'datetime', format: 'long', value: header.name }));
|
|
64
|
+
}
|
|
65
|
+
groupByColumn.setExecutionContext(null);
|
|
66
|
+
return (_jsx(RenderingEngine, { ...groupByColumn.getRenderingEngineProps(), context: {
|
|
67
|
+
getValue: () => header.name,
|
|
68
|
+
getExecutionContext: () => ({
|
|
69
|
+
getValue: () => header.data,
|
|
70
|
+
name: 'groupHeader'
|
|
71
|
+
})
|
|
72
|
+
} }));
|
|
73
|
+
};
|
|
74
|
+
const getActivities = (groupHeaders, columns, { timelineFields, timezone, defaultRowHeight }, groupBy) => {
|
|
75
|
+
const { title, date, status: statusProp, icon, content } = timelineFields ?? {};
|
|
76
|
+
const titleColumn = columns?.find(({ field }) => field.name === title?.name);
|
|
77
|
+
const dateColumn = columns?.find(({ field }) => field.name === date?.name);
|
|
78
|
+
const contentColumn = columns?.find(({ field }) => field.name === content?.name);
|
|
79
|
+
const groupByColumn = columns?.find(({ field }) => field.id === groupBy?.columnId);
|
|
80
|
+
return (groupHeaders ?? [])
|
|
81
|
+
.map(header => {
|
|
82
|
+
return {
|
|
83
|
+
header: renderHeader(header, groupBy, groupByColumn),
|
|
84
|
+
activity: (header.getRows() ?? [])
|
|
85
|
+
.map(row => {
|
|
86
|
+
const data = row.getContext().getValue();
|
|
87
|
+
const dateValue = date?.name ? data[date.name] : undefined;
|
|
88
|
+
const dateFieldType = dateColumn?.field?.type;
|
|
89
|
+
const isDateOnlyFieldType = dateFieldType === FieldType.DATE ||
|
|
90
|
+
dateFieldType === FieldType.DATE_ONLY ||
|
|
91
|
+
dateFieldType === FieldType.DATE_TIMELINE;
|
|
92
|
+
// Activity Object date can't be undefined
|
|
93
|
+
if (!dateValue) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
const statusData = statusProp?.name ? data[statusProp.name] : undefined;
|
|
97
|
+
const status = statusData
|
|
98
|
+
? {
|
|
99
|
+
variant: getStatusVariant(statusData),
|
|
100
|
+
children: statusData
|
|
101
|
+
}
|
|
102
|
+
: undefined;
|
|
103
|
+
const activity = {
|
|
104
|
+
id: row.key,
|
|
105
|
+
title: title?.name && data[title.name] && titleColumn ? (_jsx(ValueRenderer, { column: titleColumn, row: row })) : (_jsx(NoValue, {})),
|
|
106
|
+
date: timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone
|
|
107
|
+
? convertDateToTimezone(dateValue, timezone)
|
|
108
|
+
: dateValue,
|
|
109
|
+
dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',
|
|
110
|
+
icon: icon?.name ? data[icon.name] : undefined,
|
|
111
|
+
defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,
|
|
112
|
+
content: contentColumn ? (_jsx(ValueRenderer, { column: contentColumn, row: row })) : (getFieldsAsActivityContent(columns, row)),
|
|
113
|
+
status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status
|
|
114
|
+
};
|
|
115
|
+
return activity;
|
|
116
|
+
})
|
|
117
|
+
?.filter((item) => !!item)
|
|
118
|
+
};
|
|
119
|
+
})
|
|
120
|
+
.filter(({ activity }) => activity.length > 0);
|
|
121
|
+
};
|
|
122
|
+
export default getActivities;
|
|
123
|
+
export function calculateBodyMaxHeight(maxHeight, domContainer, pContainer) {
|
|
124
|
+
if (maxHeight === undefined)
|
|
125
|
+
return;
|
|
126
|
+
if (!domContainer || !pContainer)
|
|
127
|
+
return;
|
|
128
|
+
const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;
|
|
129
|
+
if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {
|
|
130
|
+
// Means it is a css variable which is a string, and it needs to be computed with calc function
|
|
131
|
+
// If css variable is not defined then fallback to default max height i.e. 550px
|
|
132
|
+
const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;
|
|
133
|
+
return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;
|
|
134
|
+
}
|
|
135
|
+
if (typeof maxHeight === 'number') {
|
|
136
|
+
return `${maxHeight - extraHeight - 32}px`;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export function isFutureDate(date, current) {
|
|
140
|
+
if (!date || !current)
|
|
141
|
+
return false;
|
|
142
|
+
return parseToDate(date).getTime() > current.getTime();
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../Core/Views/Timeline/utils.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAInD,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGhF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAG7F,OAAO,eAAe,MAAM,6CAA6C,CAAC;AAC1E,OAAO,aAAa,MAAM,gDAAgD,CAAC;AAK3E,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC7B,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAA0B,EAAE;IAChE,IAAI,OAA+B,CAAC;IACpC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,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AY,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;IACxE,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAChE,+FAA+F;QAC/F,gFAAgF;QAChF,MAAM,gBAAgB,GAAG,gBAAgB,WAAW,YAAY,CAAC;QACjE,OAAO,YAAY,SAAS,KAAK,gBAAgB,OAAO,WAAW,YAAY,CAAC;IAClF,CAAC;IACD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,EAAE,IAAI,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAwC,EAAE,OAAa;IAClF,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IACpC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport timezonePlugin from 'dayjs/plugin/timezone';\nimport type { ReactText } from 'react';\n\nimport type { DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types';\nimport { DateTimeDisplay, NoValue, parseToDate } from '@pega/cosmos-react-core';\nimport type { FieldValueListProps, StatusProps } from '@pega/cosmos-react-core';\nimport type { RsCoreTypes } from 'pega-repeating-structures-core';\nimport { FieldType, ROW_DENSITY } from 'pega-repeating-structures-core/lib/types/Meta.types';\nimport type { Group } from 'pega-repeating-structures-core/lib/types/State.types';\n\nimport RenderingEngine from '../../Components/RenderingEngine/RenderCell';\nimport ValueRenderer from '../../Components/RenderingEngine/ValueRenderer';\n\nimport type { ActivityObject } from './Timeline.types';\nimport type TimelineProps from './Timeline.types';\n\ndayjs.extend(timezonePlugin);\nconst getStatusVariant = (data: string): StatusProps['variant'] => {\n let variant: StatusProps['variant'];\n const warnStrings = ['fail', 'cancel', 'reject', 'revoke', 'stopped', 'warn'];\n const infoStrings = ['open', 'hold', 'info', 'new'];\n const successStrings = ['resolved', 'completed', 'success'];\n const pendingStrings = ['pending'];\n\n if (new RegExp(warnStrings.join('|'), 'i').test(data)) {\n variant = 'warn';\n } else if (new RegExp(infoStrings.join('|'), 'i').test(data)) {\n variant = 'info';\n } else if (new RegExp(successStrings.join('|'), 'i').test(data)) {\n variant = 'success';\n } else if (new RegExp(pendingStrings.join('|'), 'i').test(data)) {\n variant = 'pending';\n } else {\n variant = 'info';\n }\n return variant;\n};\n\nconst getFieldsAsActivityContent = (\n columns: RsCoreTypes.View['columns'],\n row: RsCoreTypes.Row\n): FieldValueListProps['fields'] | undefined => {\n return columns\n ?.filter(column => column.field.name !== 'RowActionMenu' && !column.hidden)\n ?.map(column => {\n return {\n id: column.field.id,\n name: column.field.label,\n value: <ValueRenderer column={column} row={row} />\n };\n });\n};\n\nconst convertDateToTimezone = (\n value: string | number | Date,\n timezone: RsCoreTypes.Meta['timezone']\n): string => {\n return (\n dayjs(value)\n .tz(timezone)\n // cSpell:disable-next-line\n .format('YYYY-MM-DDTHH:mm:ss')\n );\n};\n\nexport const dateDisplayVariants: Partial<\n Record<NonNullable<Group['dateFunction']>, DateTimeVariant>\n> = {\n YEARS: 'year',\n QUARTERS: 'quarteryear',\n MONTHS: 'monthyear',\n WEEKS: 'week',\n DAYS: 'date',\n HOURS: 'datetime',\n MINUTES: 'datetime'\n};\n\nconst renderHeader = (\n header: RsCoreTypes.GroupGenerator,\n groupBy?: Group,\n groupByColumn?: RsCoreTypes.Column\n) => {\n if (!groupByColumn || !header.name) {\n return <NoValue />;\n }\n\n if (groupBy?.dateFunction && typeof header.name !== 'boolean') {\n return (\n <DateTimeDisplay\n variant={dateDisplayVariants[groupBy.dateFunction] ?? 'datetime'}\n format='long'\n value={header.name}\n />\n );\n }\n\n groupByColumn.setExecutionContext(null);\n\n return (\n <RenderingEngine\n {...groupByColumn.getRenderingEngineProps()}\n context={{\n getValue: () => header.name,\n getExecutionContext: () => ({\n getValue: () => header.data,\n name: 'groupHeader'\n })\n }}\n />\n );\n};\n\nconst getActivities = (\n groupHeaders: RsCoreTypes.View['groupHeaders'],\n columns: RsCoreTypes.View['columns'],\n { timelineFields, timezone, defaultRowHeight }: RsCoreTypes.View['meta'],\n groupBy?: Group\n): TimelineProps['activities'] => {\n const { title, date, status: statusProp, icon, content } = timelineFields ?? {};\n const titleColumn = columns?.find(({ field }) => field.name === title?.name);\n const dateColumn = columns?.find(({ field }) => field.name === date?.name);\n const contentColumn = columns?.find(({ field }) => field.name === content?.name);\n const groupByColumn = columns?.find(({ field }) => field.id === groupBy?.columnId);\n return (groupHeaders ?? [])\n .map(header => {\n return {\n header: renderHeader(header, groupBy, groupByColumn),\n activity: (header.getRows() ?? [])\n .map(row => {\n const data = row.getContext().getValue();\n const dateValue = date?.name ? data[date.name] : undefined;\n const dateFieldType = dateColumn?.field?.type;\n const isDateOnlyFieldType =\n dateFieldType === FieldType.DATE ||\n dateFieldType === FieldType.DATE_ONLY ||\n dateFieldType === FieldType.DATE_TIMELINE;\n\n // Activity Object date can't be undefined\n if (!dateValue) {\n return undefined;\n }\n const statusData = statusProp?.name ? data[statusProp.name] : undefined;\n const status = statusData\n ? {\n variant: getStatusVariant(statusData as string),\n children: statusData as ReactText\n }\n : undefined;\n const activity: ActivityObject = {\n id: row.key as string,\n title:\n title?.name && data[title.name] && titleColumn ? (\n <ValueRenderer column={titleColumn} row={row} />\n ) : (\n <NoValue />\n ),\n date:\n timezone && dateColumn?.formatterAllowed && dateFieldType && !isDateOnlyFieldType // Date only value should be formatted without timezone\n ? convertDateToTimezone(dateValue as string, timezone)\n : (dateValue as string),\n dateVariant: isDateOnlyFieldType ? 'date' : 'datetime',\n icon: icon?.name ? (data[icon.name] as string) : undefined,\n defaultExpanded: defaultRowHeight === ROW_DENSITY.WRAP_CONTENT,\n content: contentColumn ? (\n <ValueRenderer column={contentColumn} row={row} />\n ) : (\n getFieldsAsActivityContent(columns, row)\n ),\n status: statusProp?.getCustomContent ? statusProp.getCustomContent(row) : status\n };\n return activity;\n })\n ?.filter((item): item is ActivityObject => !!item)\n };\n })\n .filter(({ activity }) => activity.length > 0);\n};\n\nexport default getActivities;\n\nexport function calculateBodyMaxHeight(\n maxHeight: string | number | undefined,\n domContainer: HTMLElement | undefined,\n pContainer: HTMLElement | null | undefined\n) {\n if (maxHeight === undefined) return;\n if (!domContainer || !pContainer) return;\n const extraHeight = domContainer.offsetHeight - pContainer.offsetHeight;\n if (typeof maxHeight === 'string' && maxHeight.startsWith('--')) {\n // Means it is a css variable which is a string, and it needs to be computed with calc function\n // If css variable is not defined then fallback to default max height i.e. 550px\n const defaultMaxHeight = `calc(550px + ${extraHeight}px + 32px)`;\n return `calc(var(${maxHeight}, ${defaultMaxHeight}) - ${extraHeight}px - 32px)`;\n }\n if (typeof maxHeight === 'number') {\n return `${maxHeight - extraHeight - 32}px`;\n }\n}\n\nexport function isFutureDate(date: string | number | Date | undefined, current: Date): boolean {\n if (!date || !current) return false;\n return parseToDate(date).getTime() > current.getTime();\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAClD,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;CAIrB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;GAW9B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;IAOvB,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;CAGtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAQ/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAClD,eAAO,MAAM,cAAc,YAAY,CAAC;AAExC,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;CAK7B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;CAIrB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;GAW9B,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;IAOvB,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;CAGtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAQ/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,UAYhC,CAAC"}
|
package/lib/Core/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,CAAC,EAAE,EAAE,EAAE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AAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,gBAAgB,EAAE,oBAAoB;IACtC,gBAAgB,EAAE,oBAAoB;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ;IACR,SAAS;IACT,kBAAkB;IAClB,sBAAsB;IACtB,mBAAmB;IACnB,uBAAuB;IACvB,uBAAuB;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kBAAkB;IAClB,oBAAoB;IACpB,0BAA0B;IAC1B,sBAAsB;IACtB,iBAAiB;IACjB,mBAAmB;IACnB,sBAAsB;IACtB,UAAU;IACV,QAAQ;IACR,QAAQ;CACT,CAAC","sourcesContent":["export const EXTERNAL_FILTERS = 'externalFilters';\nexport const DEFAULT_FORMAT = 'Default';\n\nexport const SELECTION_MODES = {\n single: 'single',\n multi: 'multi',\n multi_on_hover: 'multi_on_hover'\n};\n\nexport const rowDensityClasses = {\n 1: { id: '1', className: 'short-height' },\n 2: { id: '2', className: 'medium-height' },\n 3: { id: '3', className: 'tall-height' },\n 4: { id: '4', className: 'wrap-content-height' }\n};\n\nexport const TEMPLATES = {\n GALLERY: 'Gallery',\n TABLE: 'Table',\n TIMELINE: 'Timeline'\n};\n\nexport const debugInfoFields = {\n className: 'className',\n dataPage: 'dataPage',\n dataSource: 'dataSource',\n timeTaken: 'timeTaken',\n insightId: 'insightId'\n};\n\nexport const CELL_ALIGN_CLASSES = {\n left: 'align-left',\n right: 'align-right',\n center: 'align-center'\n};\n\nexport const NonNullSortActions = [\n {\n actionId: 'asc',\n actionName: 'Sort ascending',\n actionIcon: 'arrow-up'\n },\n {\n actionId: 'desc',\n actionName: 'Sort descending',\n actionIcon: 'arrow-down'\n }\n];\n\nexport const sortActions = [\n ...NonNullSortActions,\n {\n actionId: null,\n actionName: 'Remove sort',\n actionIcon: 'reset'\n }\n];\nexport const TOOLBAR_FEATURES = {\n FILTER: 'filter',\n SORT: 'sort',\n GROUPING: 'grouping'\n} as const;\n\nexport const customFunctions = {\n TEXT_GROUPING: 'TEXT_GROUPING',\n RANGE_GROUPING: 'RANGE_GROUPING',\n INTERVAL_GROUPING: 'INTERVAL_GROUPING'\n};\n\nexport const intervalGroupingBoundaries = {\n includeLowerOnly: 'include-lower-only',\n includeUpperOnly: 'include-upper-only'\n};\n\nexport const FOCUSABLE_SELECTORS = [\n 'button',\n 'a[href]',\n 'input[type=file]',\n 'input[type=checkbox]',\n 'input[type=radio]',\n '.scalarlist-component',\n '.row-error-column svg'\n];\n\nexport const ACTIONABLE_SELECTORS = [\n 'input[type=text]',\n 'input[type=number]',\n 'input[inputmode=numeric]',\n 'input[inputmode=tel]',\n 'input[type=url]',\n 'input[type=email]',\n 'input[role=combobox]',\n 'textarea',\n 'select',\n 'iframe'\n];\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../Core/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AAExC,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE;IACzC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE;IAC1C,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE;IACxC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,qBAAqB,EAAE;CACjD,CA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ClB,sBAAsB;IACtB,mBAAmB;IACnB,uBAAuB;IACvB,uBAAuB;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,kBAAkB;IAClB,mBAAmB,EAAE,sCAAsC;IAC3D,oBAAoB;IACpB,0BAA0B;IAC1B,sBAAsB;IACtB,iBAAiB;IACjB,mBAAmB;IACnB,sBAAsB;IACtB,UAAU;IACV,QAAQ;IACR,QAAQ;CACT,CAAC","sourcesContent":["export const EXTERNAL_FILTERS = 'externalFilters';\nexport const DEFAULT_FORMAT = 'Default';\n\nexport const SELECTION_MODES = {\n single: 'single',\n multi: 'multi',\n multi_on_hover: 'multi_on_hover'\n};\n\nexport const rowDensityClasses = {\n 1: { id: '1', className: 'short-height' },\n 2: { id: '2', className: 'medium-height' },\n 3: { id: '3', className: 'tall-height' },\n 4: { id: '4', className: 'wrap-content-height' }\n};\n\nexport const TEMPLATES = {\n GALLERY: 'Gallery',\n TABLE: 'Table',\n TIMELINE: 'Timeline'\n};\n\nexport const debugInfoFields = {\n className: 'className',\n dataPage: 'dataPage',\n dataSource: 'dataSource',\n timeTaken: 'timeTaken',\n insightId: 'insightId'\n};\n\nexport const CELL_ALIGN_CLASSES = {\n left: 'align-left',\n right: 'align-right',\n center: 'align-center'\n};\n\nexport const NonNullSortActions = [\n {\n actionId: 'asc',\n actionName: 'Sort ascending',\n actionIcon: 'arrow-up'\n },\n {\n actionId: 'desc',\n actionName: 'Sort descending',\n actionIcon: 'arrow-down'\n }\n];\n\nexport const sortActions = [\n ...NonNullSortActions,\n {\n actionId: null,\n actionName: 'Remove sort',\n actionIcon: 'reset'\n }\n];\nexport const TOOLBAR_FEATURES = {\n FILTER: 'filter',\n SORT: 'sort',\n GROUPING: 'grouping'\n} as const;\n\nexport const customFunctions = {\n TEXT_GROUPING: 'TEXT_GROUPING',\n RANGE_GROUPING: 'RANGE_GROUPING',\n INTERVAL_GROUPING: 'INTERVAL_GROUPING'\n};\n\nexport const intervalGroupingBoundaries = {\n includeLowerOnly: 'include-lower-only',\n includeUpperOnly: 'include-upper-only'\n};\n\nexport const FOCUSABLE_SELECTORS = [\n 'button',\n 'a[href]',\n 'input[type=file]',\n 'input[type=checkbox]',\n 'input[type=radio]',\n '.scalarlist-component',\n '.row-error-column svg'\n];\n\nexport const ACTIONABLE_SELECTORS = [\n 'input[type=text]',\n 'input:not([type])', // input without type defaults to text\n 'input[type=number]',\n 'input[inputmode=numeric]',\n 'input[inputmode=tel]',\n 'input[type=url]',\n 'input[type=email]',\n 'input[role=combobox]',\n 'textarea',\n 'select',\n 'iframe'\n];\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';
|
|
2
|
+
type TemplateValue = (typeof REPEATING_STRUCTURE_TEMPLATES)[keyof typeof REPEATING_STRUCTURE_TEMPLATES];
|
|
3
|
+
declare const featureSupport: {
|
|
4
|
+
[feature: string]: TemplateValue[];
|
|
5
|
+
};
|
|
6
|
+
type FeatureKey = keyof typeof featureSupport | string;
|
|
7
|
+
/**
|
|
8
|
+
* Check if a feature should show in toolbar for a given template.
|
|
9
|
+
* Features not in the map are considered supported for all templates.
|
|
10
|
+
*
|
|
11
|
+
* @param template - The template type
|
|
12
|
+
* @param feature - The feature identifier
|
|
13
|
+
* @returns true if the feature should show in toolbar for the template
|
|
14
|
+
*/
|
|
15
|
+
declare const showFeatureForTemplate: (template: TemplateValue, feature: FeatureKey) => boolean;
|
|
16
|
+
export default showFeatureForTemplate;
|
|
17
|
+
//# sourceMappingURL=templateFeatureSupport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateFeatureSupport.d.ts","sourceRoot":"","sources":["../../Core/templateFeatureSupport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAE/E,KAAK,aAAa,GAChB,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,OAAO,6BAA6B,CAAC,CAAC;AAIrF,QAAA,MAAM,cAAc,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE,CAAA;CAUzD,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,OAAO,cAAc,GAAG,MAAM,CAAC;AAEvD;;;;;;;GAOG;AACH,QAAA,MAAM,sBAAsB,GAAI,UAAU,aAAa,EAAE,SAAS,UAAU,KAAG,OAK9E,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';
|
|
2
|
+
// TODO: All such feature map support should be available at View object based via a feature in rs-core based on the template from meta.
|
|
3
|
+
// The consumer can pass along the resolved feature map to their component for decisioning.
|
|
4
|
+
const featureSupport = {
|
|
5
|
+
personalization: ['Table', 'Gallery', 'Timeline'],
|
|
6
|
+
group: ['Table', 'Timeline'],
|
|
7
|
+
showHideColumns: ['Table', 'Gallery'],
|
|
8
|
+
freezeColumns: ['Table'],
|
|
9
|
+
rowDensity: ['Table'],
|
|
10
|
+
showHeaderIcons: ['Table'],
|
|
11
|
+
autoSizeColumns: ['Table'],
|
|
12
|
+
resetColumnWidths: ['Table'],
|
|
13
|
+
wrap: ['Table']
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Check if a feature should show in toolbar for a given template.
|
|
17
|
+
* Features not in the map are considered supported for all templates.
|
|
18
|
+
*
|
|
19
|
+
* @param template - The template type
|
|
20
|
+
* @param feature - The feature identifier
|
|
21
|
+
* @returns true if the feature should show in toolbar for the template
|
|
22
|
+
*/
|
|
23
|
+
const showFeatureForTemplate = (template, feature) => {
|
|
24
|
+
if (!featureSupport[feature]) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return featureSupport[feature].includes(template);
|
|
28
|
+
};
|
|
29
|
+
export default showFeatureForTemplate;
|
|
30
|
+
//# sourceMappingURL=templateFeatureSupport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateFeatureSupport.js","sourceRoot":"","sources":["../../Core/templateFeatureSupport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAK/E,wIAAwI;AACxI,2FAA2F;AAC3F,MAAM,cAAc,GAA2C;IAC7D,eAAe,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;IACjD,KAAK,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;IAC5B,eAAe,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;IACrC,aAAa,EAAE,CAAC,OAAO,CAAC;IACxB,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,eAAe,EAAE,CAAC,OAAO,CAAC;IAC1B,eAAe,EAAE,CAAC,OAAO,CAAC;IAC1B,iBAAiB,EAAE,CAAC,OAAO,CAAC;IAC5B,IAAI,EAAE,CAAC,OAAO,CAAC;CAChB,CAAC;AAIF;;;;;;;GAOG;AACH,MAAM,sBAAsB,GAAG,CAAC,QAAuB,EAAE,OAAmB,EAAW,EAAE;IACvF,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["import { REPEATING_STRUCTURE_TEMPLATES } from 'pega-repeating-structures-core';\n\ntype TemplateValue =\n (typeof REPEATING_STRUCTURE_TEMPLATES)[keyof typeof REPEATING_STRUCTURE_TEMPLATES];\n\n// TODO: All such feature map support should be available at View object based via a feature in rs-core based on the template from meta.\n// The consumer can pass along the resolved feature map to their component for decisioning.\nconst featureSupport: { [feature: string]: TemplateValue[] } = {\n personalization: ['Table', 'Gallery', 'Timeline'],\n group: ['Table', 'Timeline'],\n showHideColumns: ['Table', 'Gallery'],\n freezeColumns: ['Table'],\n rowDensity: ['Table'],\n showHeaderIcons: ['Table'],\n autoSizeColumns: ['Table'],\n resetColumnWidths: ['Table'],\n wrap: ['Table']\n};\n\ntype FeatureKey = keyof typeof featureSupport | string;\n\n/**\n * Check if a feature should show in toolbar for a given template.\n * Features not in the map are considered supported for all templates.\n *\n * @param template - The template type\n * @param feature - The feature identifier\n * @returns true if the feature should show in toolbar for the template\n */\nconst showFeatureForTemplate = (template: TemplateValue, feature: FeatureKey): boolean => {\n if (!featureSupport[feature]) {\n return true;\n }\n return featureSupport[feature].includes(template);\n};\n\nexport default showFeatureForTemplate;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
1
|
+
import type { ReactNode, Ref } from 'react';
|
|
2
2
|
import type { RsCoreTypes } from 'pega-repeating-structures-core';
|
|
3
3
|
import type { FormControlProps, IconName, OmitStrict } from '@pega/cosmos-react-core';
|
|
4
4
|
import type { RsApi } from 'pega-repeating-structures-core/lib/types/ApiContext.types';
|
|
@@ -51,7 +51,17 @@ type ViewRendererProps = ViewContext & {
|
|
|
51
51
|
/** A unique id to identify the current repeating structure. */
|
|
52
52
|
rsID: RsCoreTypes.View['rsID'];
|
|
53
53
|
} & ExternalStateInfo & PropsFromRenderFactory;
|
|
54
|
-
type
|
|
54
|
+
type FormatSettingsRendererProps = {
|
|
55
|
+
ref: Ref<{
|
|
56
|
+
validate: () => boolean;
|
|
57
|
+
}>;
|
|
58
|
+
formatting: {
|
|
59
|
+
type: string;
|
|
60
|
+
config: unknown;
|
|
61
|
+
};
|
|
62
|
+
onChange: (config: unknown) => void;
|
|
63
|
+
};
|
|
64
|
+
type RendererProps = CellRendererProps | ViewRendererProps | FormatSettingsRendererProps;
|
|
55
65
|
export interface RsRenderFactoryReturnType extends OmitStrict<RsCoreTypes.RenderFactoryWithProps, 'component'> {
|
|
56
66
|
/**
|
|
57
67
|
* A function that accepts component props and returns a React node to be rendered as a cell within repeating structures.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepeatingStructuresBoot.types.d.ts","sourceRoot":"","sources":["../../types/RepeatingStructuresBoot.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RepeatingStructuresBoot.types.d.ts","sourceRoot":"","sources":["../../types/RepeatingStructuresBoot.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2DAA2D,CAAC;AACvF,OAAO,KAAK,cAAc,MAAM,+DAA+D,CAAC;AAEhG,KAAK,sBAAsB,GAAG,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;AAChF,KAAK,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;AAClE,KAAK,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;AAG9D;;;GAGG;AACH,KAAK,iBAAiB,GAAG;IACvB,yCAAyC;IACzC,UAAU,EAAE,MAAM,WAAW,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM;QAChB;;;;;;;;;;;;WAYG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,mCAAmC;IACnC,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACtD,iCAAiC;IACjC,KAAK,EAAE,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC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CAAC,kBAAkB,CAAC,CAAC;IAElE,+EAA+E;IAC/E,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAGpD,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CAC/C,CAAC"}
|
|
@@ -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 /**\n * This function is provided as ui props in row generator to attach it as click handler to a row in repeating structure\n * @param {RsCoreTypes.RowData} data - current row data\n * @returns {void} void\n */\n onRowClickAction?: RsCoreTypes.RsCoreInitArgs['onRowClickAction'];\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"]}
|
|
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 /**\n * This function is provided as ui props in row generator to attach it as click handler to a row in repeating structure\n * @param {RsCoreTypes.RowData} data - current row data\n * @returns {void} void\n */\n onRowClickAction?: RsCoreTypes.RsCoreInitArgs['onRowClickAction'];\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,CAAC,QAAQ,CAAC;IAE5C,sDAAsD;IACtD,KAAY,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5E,sDAAsD;IACtD,KAAY,IAAI,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAErE,wBAAwB;IACxB,KAAY,eAAe,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAE3F,mDAAmD;IACnD,KAAY,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/E,sEAAsE;IACtE,KAAY,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;IAEpC;OACG;IACH,KAAY,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;IAEhD;;OAEG;IACH,K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iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAE3F,mDAAmD;IACnD,KAAY,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/E,sEAAsE;IACtE,KAAY,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC;IAEpC;OACG;IACH,KAAY,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;IAEhD;;OAEG;IACH,KAAY,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAExC;;OAEG;IACH,KAAY,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;IACtC;;OAEG;IACH,KAAY,iBAAiB,GAAG,WAAW,CAAC,iBAAiB,CAAC;IAC9D,yEAAyE;IACzE,KAAY,OAAO,GAAG,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAE5D,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-build.
|
|
3
|
+
"version": "9.0.0-build.20.1",
|
|
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,23 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-condition-builder": "9.0.0-build.
|
|
18
|
-
"@pega/cosmos-react-core": "9.0.0-build.
|
|
19
|
-
"@pega/cosmos-react-rte": "9.0.0-build.
|
|
20
|
-
"@
|
|
21
|
-
"@types/lodash.get": "^4.4.9",
|
|
17
|
+
"@pega/cosmos-react-condition-builder": "9.0.0-build.20.1",
|
|
18
|
+
"@pega/cosmos-react-core": "9.0.0-build.20.1",
|
|
19
|
+
"@pega/cosmos-react-rte": "9.0.0-build.20.1",
|
|
20
|
+
"@types/lodash-es": "^4.17.12",
|
|
22
21
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
23
22
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
24
23
|
"@types/uuid": "^9.0.0",
|
|
25
24
|
"dayjs": "^1.11.13",
|
|
26
25
|
"fast-deep-equal": "^3.1.3",
|
|
27
|
-
"lodash
|
|
28
|
-
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.
|
|
29
|
-
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.
|
|
26
|
+
"lodash-es": "^4.17.23",
|
|
27
|
+
"pega-repeating-structures-core": "npm:@pega/lists-core@9.0.0-build.20.1",
|
|
28
|
+
"pega-ui-list-data-apis": "npm:@pega/lists-core-utils@9.0.0-build.20.1",
|
|
30
29
|
"polished": "^4.1.0",
|
|
31
30
|
"prop-types": "^15.8.1",
|
|
32
31
|
"react": "^17.0.0 || ^18.0.0",
|
|
33
32
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
34
|
-
"styled-components": "^
|
|
33
|
+
"styled-components": "^6.3.11",
|
|
35
34
|
"uuid": "^9.0.0"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
@@ -45,7 +44,7 @@
|
|
|
45
44
|
"@testing-library/react": "^16.0.0",
|
|
46
45
|
"@testing-library/user-event": "^14.6.1",
|
|
47
46
|
"jest-axe": "^8.0.0",
|
|
48
|
-
"srs-utils": "9.0.0-build.
|
|
49
|
-
"typescript": "~5.
|
|
47
|
+
"srs-utils": "9.0.0-build.20.1",
|
|
48
|
+
"typescript": "~5.9.3"
|
|
50
49
|
}
|
|
51
50
|
}
|
|
@@ -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
|