@astral/ui 4.73.1 → 4.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/CardGridInfinite/CardGridInfinite.js +11 -2
- package/components/CardGridInfinite/styles.js +4 -0
- package/components/CardGridInfinite/useLogic/useLogic.d.ts +1 -1
- package/components/CardGridInfinite/useLogic/useLogic.js +3 -13
- package/components/Chevron/Chevron.d.ts +1 -1
- package/components/ConfirmAction/ConfirmAction.js +3 -3
- package/components/ConfirmAction/constants.d.ts +1 -0
- package/components/ConfirmAction/constants.js +1 -0
- package/components/ConfirmAction/styles.js +13 -0
- package/components/ConfirmAction/types.d.ts +1 -1
- package/components/DataGrid/Body/Body.d.ts +1 -1
- package/components/DataGrid/Body/Body.js +5 -3
- package/components/DataGrid/Body/types.d.ts +5 -0
- package/components/DataGrid/Cell/Cell.d.ts +9 -1
- package/components/DataGrid/Cell/Cell.js +16 -2
- package/components/DataGrid/CustomRowWrapper/CustomRowWrapper.d.ts +19 -0
- package/components/DataGrid/CustomRowWrapper/CustomRowWrapper.js +15 -0
- package/components/DataGrid/CustomRowWrapper/index.d.ts +1 -0
- package/components/DataGrid/CustomRowWrapper/index.js +1 -0
- package/components/DataGrid/DataGrid.js +14 -3
- package/components/DataGrid/DataGridContext/DataGridContext.d.ts +9 -5
- package/components/DataGrid/DataGridContext/DataGridContext.js +7 -4
- package/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.d.ts +3 -4
- package/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.js +18 -48
- package/components/DataGrid/DataGridStorageContext/DataGridStorageContext.d.ts +29 -0
- package/components/DataGrid/DataGridStorageContext/DataGridStorageContext.js +28 -0
- package/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/DataGridStorageProvider.d.ts +6 -0
- package/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/DataGridStorageProvider.js +12 -0
- package/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/index.d.ts +1 -0
- package/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/index.js +1 -0
- package/components/DataGrid/DataGridStorageContext/index.d.ts +2 -0
- package/components/DataGrid/DataGridStorageContext/index.js +2 -0
- package/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +2 -1
- package/components/DataGrid/MobileSkeleton/MobileSkeleton.js +21 -3
- package/components/DataGrid/MobileSkeleton/styles.js +12 -0
- package/components/DataGrid/Row/NestedChildren/NestedChildren.d.ts +1 -5
- package/components/DataGrid/Row/NestedChildren/NestedChildren.js +17 -7
- package/components/DataGrid/Row/NestedChildren/constants.d.ts +6 -0
- package/components/DataGrid/Row/NestedChildren/constants.js +7 -0
- package/components/DataGrid/Row/NestedChildren/styles.js +42 -3
- package/components/DataGrid/Row/NestedChildren/useLogic/useLogic.d.ts +1 -1
- package/components/DataGrid/Row/NestedChildren/useLogic/useLogic.js +4 -6
- package/components/DataGrid/Row/Row.js +34 -37
- package/components/DataGrid/Row/RowContext/RowContext.d.ts +10 -1
- package/components/DataGrid/Row/RowContext/RowContext.js +9 -0
- package/components/DataGrid/Row/RowContext/RowProvider/RowProvider.d.ts +3 -2
- package/components/DataGrid/Row/RowContext/RowProvider/RowProvider.js +25 -2
- package/components/DataGrid/Row/constants.d.ts +6 -0
- package/components/DataGrid/Row/constants.js +6 -0
- package/components/DataGrid/Row/styles.js +102 -3
- package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +1 -0
- package/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +1 -1
- package/components/DataGrid/Row/useLogic/useLogic.d.ts +5 -2
- package/components/DataGrid/Row/useLogic/useLogic.js +21 -19
- package/components/DataGrid/RowBase/GroupCell/GroupCell.d.ts +2 -0
- package/components/DataGrid/RowBase/GroupCell/GroupCell.js +22 -0
- package/components/DataGrid/RowBase/GroupCell/constants.d.ts +4 -0
- package/components/DataGrid/RowBase/GroupCell/constants.js +5 -0
- package/components/DataGrid/RowBase/GroupCell/index.d.ts +1 -0
- package/components/DataGrid/RowBase/GroupCell/index.js +1 -0
- package/components/DataGrid/RowBase/GroupCell/styles.d.ts +12 -0
- package/components/DataGrid/RowBase/GroupCell/styles.js +16 -0
- package/components/DataGrid/RowBase/GroupCell/types.d.ts +11 -0
- package/components/DataGrid/RowBase/GroupCell/types.js +1 -0
- package/components/DataGrid/RowBase/RowBase.d.ts +3 -0
- package/components/DataGrid/RowBase/RowBase.js +69 -0
- package/components/DataGrid/RowBase/constants.d.ts +9 -0
- package/components/DataGrid/RowBase/constants.js +10 -0
- package/components/DataGrid/RowBase/index.d.ts +3 -0
- package/components/DataGrid/RowBase/index.js +2 -0
- package/components/DataGrid/RowBase/styles.d.ts +17 -0
- package/components/DataGrid/RowBase/styles.js +87 -0
- package/components/DataGrid/RowBase/types.d.ts +92 -0
- package/components/DataGrid/RowBase/types.js +1 -0
- package/components/DataGrid/RowBase/useLogic/useLogic.d.ts +46 -0
- package/components/DataGrid/RowBase/useLogic/useLogic.js +90 -0
- package/components/DataGrid/constants.d.ts +8 -0
- package/components/DataGrid/constants.js +8 -0
- package/components/DataGrid/index.d.ts +3 -0
- package/components/DataGrid/index.js +3 -0
- package/components/DataGrid/styles.js +14 -0
- package/components/DataGrid/tests/performance/testDataGridPerformance.d.ts +21 -0
- package/components/DataGrid/tests/performance/testDataGridPerformance.js +102 -0
- package/components/DataGrid/types.d.ts +11 -0
- package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +3 -1
- package/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +2 -1
- package/components/DataGrid/useLogic/useLogic.d.ts +4 -1
- package/components/DataGrid/useLogic/useLogic.js +20 -7
- package/components/DataGridActionCell/DataGridMainActions/Action/MainIconButton/MainIconButton.js +4 -2
- package/components/DataGridActionCell/DataGridMainActions/Action/MobileMainButton/MobileMainButton.js +4 -2
- package/components/DataGridActionCell/types.d.ts +4 -0
- package/components/DataGridCollapsibleRow/DataGridCollapsibleRow.d.ts +2 -0
- package/components/DataGridCollapsibleRow/DataGridCollapsibleRow.js +29 -0
- package/components/DataGridCollapsibleRow/constants.d.ts +11 -0
- package/components/DataGridCollapsibleRow/constants.js +12 -0
- package/components/DataGridCollapsibleRow/index.d.ts +2 -0
- package/components/DataGridCollapsibleRow/index.js +1 -0
- package/components/DataGridCollapsibleRow/public.d.ts +2 -0
- package/components/DataGridCollapsibleRow/public.js +1 -0
- package/components/DataGridCollapsibleRow/styles.d.ts +42 -0
- package/components/DataGridCollapsibleRow/styles.js +99 -0
- package/components/DataGridCollapsibleRow/types.d.ts +19 -0
- package/components/DataGridCollapsibleRow/types.js +1 -0
- package/components/DataGridCollapsibleRow/useLogic/index.js +1 -0
- package/components/DataGridCollapsibleRow/useLogic/useLogic.d.ts +29 -0
- package/components/DataGridCollapsibleRow/useLogic/useLogic.js +62 -0
- package/components/DataGridInfinite/DataGridInfinite.js +37 -27
- package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.d.ts +23 -0
- package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.js +21 -0
- package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/DataGridInfiniteContextProvider.d.ts +7 -0
- package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/DataGridInfiniteContextProvider.js +5 -0
- package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/index.d.ts +1 -0
- package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/index.js +1 -0
- package/components/DataGridInfinite/DataGridInfiniteContext/index.d.ts +2 -0
- package/components/DataGridInfinite/DataGridInfiniteContext/index.js +2 -0
- package/components/DataGridInfinite/List/List.js +2 -1
- package/components/DataGridInfinite/List/constants.d.ts +3 -0
- package/components/DataGridInfinite/List/constants.js +4 -0
- package/components/DataGridInfinite/List/index.d.ts +1 -0
- package/components/DataGridInfinite/List/index.js +1 -0
- package/components/DataGridInfinite/Row/Row.d.ts +2 -0
- package/components/DataGridInfinite/Row/Row.js +10 -0
- package/components/DataGridInfinite/Row/index.d.ts +1 -0
- package/components/DataGridInfinite/Row/index.js +1 -0
- package/components/DataGridInfinite/Row/types.d.ts +2 -0
- package/components/DataGridInfinite/Row/types.js +1 -0
- package/components/DataGridInfinite/Row/useLogic/index.d.ts +1 -0
- package/components/DataGridInfinite/Row/useLogic/index.js +1 -0
- package/components/DataGridInfinite/Row/useLogic/useLogic.d.ts +33 -0
- package/components/DataGridInfinite/Row/useLogic/useLogic.js +35 -0
- package/components/DataGridInfinite/faker.js +1 -1
- package/components/DataGridInfinite/styles.d.ts +6 -0
- package/components/DataGridInfinite/styles.js +11 -0
- package/components/DataGridInfinite/useLogic/useLogic.d.ts +6 -3
- package/components/DataGridInfinite/useLogic/useLogic.js +29 -10
- package/components/DialogActions/styles.js +2 -0
- package/components/DonutChart/DonutChart.d.ts +2 -0
- package/components/DonutChart/DonutChart.js +9 -0
- package/components/DonutChart/constants.d.ts +15 -0
- package/components/DonutChart/constants.js +16 -0
- package/components/DonutChart/index.d.ts +3 -0
- package/components/DonutChart/index.js +2 -0
- package/components/DonutChart/public.d.ts +3 -0
- package/components/DonutChart/public.js +2 -0
- package/components/DonutChart/styles.d.ts +21 -0
- package/components/DonutChart/styles.js +41 -0
- package/components/DonutChart/types.d.ts +27 -0
- package/components/DonutChart/types.js +1 -0
- package/components/DonutChart/useLogic/hooks/index.d.ts +1 -0
- package/components/DonutChart/useLogic/hooks/index.js +1 -0
- package/components/DonutChart/useLogic/hooks/useRenderWidth/index.d.ts +1 -0
- package/components/DonutChart/useLogic/hooks/useRenderWidth/index.js +1 -0
- package/components/DonutChart/useLogic/hooks/useRenderWidth/useRenderWidth.d.ts +9 -0
- package/components/DonutChart/useLogic/hooks/useRenderWidth/useRenderWidth.js +30 -0
- package/components/DonutChart/useLogic/index.d.ts +1 -0
- package/components/DonutChart/useLogic/index.js +1 -0
- package/components/DonutChart/useLogic/useLogic.d.ts +15 -0
- package/components/DonutChart/useLogic/useLogic.js +40 -0
- package/components/DonutChart/useLogic/utils/getDonutChartCssVars/getDonutChartCssVars.d.ts +16 -0
- package/components/DonutChart/useLogic/utils/getDonutChartCssVars/getDonutChartCssVars.js +10 -0
- package/components/DonutChart/useLogic/utils/getDonutChartCssVars/index.d.ts +1 -0
- package/components/DonutChart/useLogic/utils/getDonutChartCssVars/index.js +1 -0
- package/components/DonutChart/useLogic/utils/getGeometry/getGeometry.d.ts +10 -0
- package/components/DonutChart/useLogic/utils/getGeometry/getGeometry.js +13 -0
- package/components/DonutChart/useLogic/utils/getGeometry/index.d.ts +1 -0
- package/components/DonutChart/useLogic/utils/getGeometry/index.js +1 -0
- package/components/DonutChart/useLogic/utils/getMeterAriaValue/getMeterAriaValue.d.ts +13 -0
- package/components/DonutChart/useLogic/utils/getMeterAriaValue/getMeterAriaValue.js +22 -0
- package/components/DonutChart/useLogic/utils/getMeterAriaValue/index.d.ts +1 -0
- package/components/DonutChart/useLogic/utils/getMeterAriaValue/index.js +1 -0
- package/components/DonutChart/useLogic/utils/getProgressCirclePath/getProgressCirclePath.d.ts +9 -0
- package/components/DonutChart/useLogic/utils/getProgressCirclePath/getProgressCirclePath.js +29 -0
- package/components/DonutChart/useLogic/utils/getProgressCirclePath/index.d.ts +1 -0
- package/components/DonutChart/useLogic/utils/getProgressCirclePath/index.js +1 -0
- package/components/DonutChart/useLogic/utils/getProgressOffset/getProgressOffset.d.ts +8 -0
- package/components/DonutChart/useLogic/utils/getProgressOffset/getProgressOffset.js +21 -0
- package/components/DonutChart/useLogic/utils/getProgressOffset/index.d.ts +1 -0
- package/components/DonutChart/useLogic/utils/getProgressOffset/index.js +1 -0
- package/components/DonutChart/useLogic/utils/getProgressPercent/getProgressPercent.d.ts +8 -0
- package/components/DonutChart/useLogic/utils/getProgressPercent/getProgressPercent.js +16 -0
- package/components/DonutChart/useLogic/utils/getProgressPercent/index.d.ts +1 -0
- package/components/DonutChart/useLogic/utils/getProgressPercent/index.js +1 -0
- package/components/DonutChart/useLogic/utils/index.d.ts +6 -0
- package/components/DonutChart/useLogic/utils/index.js +6 -0
- package/components/ExpansionPanel/Summary/styles.d.ts +1 -1
- package/components/MenuOrganization/OrganizationButton/styles.d.ts +1 -1
- package/components/NewStepper/StepIcon/StepIcon.js +3 -1
- package/components/NewStepper/StepIcon/useLogic/index.d.ts +1 -0
- package/components/NewStepper/StepIcon/useLogic/index.js +1 -0
- package/components/NewStepper/StepIcon/useLogic/useLogic.d.ts +8 -0
- package/components/NewStepper/StepIcon/useLogic/useLogic.js +6 -0
- package/components/PageContent/PageContent.js +23 -5
- package/components/PageContent/constants.d.ts +2 -0
- package/components/PageContent/constants.js +2 -0
- package/components/PageContent/styles.d.ts +0 -2
- package/components/PageContent/styles.js +17 -11
- package/components/PageContent/types.d.ts +4 -0
- package/components/Profile/styles.d.ts +1 -1
- package/components/SearchField/types.d.ts +9 -0
- package/components/SearchField/useLogic/useLogic.d.ts +1 -1
- package/components/SearchField/useLogic/useLogic.js +28 -16
- package/components/constants/classnames.d.ts +1 -0
- package/components/constants/classnames.js +2 -0
- package/components/constants/index.d.ts +1 -0
- package/components/constants/index.js +1 -0
- package/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.d.ts +2 -1
- package/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.js +4 -1
- package/components/fileUploading/FileUploaderDropzone/HintPlaceholder/useLogic/useLogic.d.ts +5 -4
- package/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/HintPlaceholder.js +11 -2
- package/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/useLogic/useLogic.d.ts +5 -5
- package/components/fileUploading/hooks/useFileUploader/useFileUploader.d.ts +1 -1
- package/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +1 -1
- package/components/fileUploading/types.d.ts +2 -2
- package/components/useProfiler/index.d.ts +1 -0
- package/components/useProfiler/index.js +1 -0
- package/components/useProfiler/useProfiler.d.ts +14 -0
- package/components/useProfiler/useProfiler.js +46 -0
- package/components/useProfiler/utils/index.d.ts +1 -0
- package/components/useProfiler/utils/index.js +1 -0
- package/components/useProfiler/utils/shallowEqual/index.d.ts +1 -0
- package/components/useProfiler/utils/shallowEqual/index.js +1 -0
- package/components/useProfiler/utils/shallowEqual/shallowEqual.d.ts +5 -0
- package/components/useProfiler/utils/shallowEqual/shallowEqual.js +26 -0
- package/hook-form/FormFilters/FormFilters.js +1 -1
- package/hook-form/FormFilters/FormFiltersSkeleton/FormFiltersSkeleton.d.ts +5 -1
- package/hook-form/FormFilters/FormFiltersSkeleton/FormFiltersSkeleton.js +4 -3
- package/hook-form/FormFilters/FormQuickFiltersSkeleton/FormQuickFiltersSkeleton.d.ts +1 -0
- package/hook-form/FormFilters/FormQuickFiltersSkeleton/FormQuickFiltersSkeleton.js +9 -0
- package/hook-form/FormFilters/FormQuickFiltersSkeleton/index.d.ts +1 -0
- package/hook-form/FormFilters/FormQuickFiltersSkeleton/index.js +1 -0
- package/hook-form/FormFilters/FormQuickFiltersSkeleton/styles.d.ts +5 -0
- package/hook-form/FormFilters/FormQuickFiltersSkeleton/styles.js +5 -0
- package/node/components/CardGridInfinite/CardGridInfinite.js +13 -4
- package/node/components/CardGridInfinite/styles.js +4 -0
- package/node/components/CardGridInfinite/useLogic/useLogic.d.ts +1 -1
- package/node/components/CardGridInfinite/useLogic/useLogic.js +1 -11
- package/node/components/Chevron/Chevron.d.ts +1 -1
- package/node/components/ConfirmAction/ConfirmAction.js +2 -2
- package/node/components/ConfirmAction/constants.d.ts +1 -0
- package/node/components/ConfirmAction/constants.js +2 -1
- package/node/components/ConfirmAction/styles.js +13 -0
- package/node/components/ConfirmAction/types.d.ts +1 -1
- package/node/components/DataGrid/Body/Body.d.ts +1 -1
- package/node/components/DataGrid/Body/Body.js +5 -3
- package/node/components/DataGrid/Body/types.d.ts +5 -0
- package/node/components/DataGrid/Cell/Cell.d.ts +9 -1
- package/node/components/DataGrid/Cell/Cell.js +16 -2
- package/node/components/DataGrid/CustomRowWrapper/CustomRowWrapper.d.ts +19 -0
- package/node/components/DataGrid/CustomRowWrapper/CustomRowWrapper.js +18 -0
- package/node/components/DataGrid/CustomRowWrapper/index.d.ts +1 -0
- package/node/components/DataGrid/CustomRowWrapper/index.js +5 -0
- package/node/components/DataGrid/DataGrid.js +27 -16
- package/node/components/DataGrid/DataGridContext/DataGridContext.d.ts +9 -5
- package/node/components/DataGrid/DataGridContext/DataGridContext.js +7 -4
- package/node/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.d.ts +3 -4
- package/node/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.js +17 -47
- package/node/components/DataGrid/DataGridStorageContext/DataGridStorageContext.d.ts +29 -0
- package/node/components/DataGrid/DataGridStorageContext/DataGridStorageContext.js +31 -0
- package/node/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/DataGridStorageProvider.d.ts +6 -0
- package/node/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/DataGridStorageProvider.js +16 -0
- package/node/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/index.d.ts +1 -0
- package/node/components/DataGrid/DataGridStorageContext/DataGridStorageProvider/index.js +17 -0
- package/node/components/DataGrid/DataGridStorageContext/index.d.ts +2 -0
- package/node/components/DataGrid/DataGridStorageContext/index.js +18 -0
- package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.d.ts +2 -1
- package/node/components/DataGrid/MobileSkeleton/MobileSkeleton.js +21 -3
- package/node/components/DataGrid/MobileSkeleton/styles.js +12 -0
- package/node/components/DataGrid/Row/NestedChildren/NestedChildren.d.ts +1 -5
- package/node/components/DataGrid/Row/NestedChildren/NestedChildren.js +18 -7
- package/node/components/DataGrid/Row/NestedChildren/constants.d.ts +6 -0
- package/node/components/DataGrid/Row/NestedChildren/constants.js +10 -0
- package/node/components/DataGrid/Row/NestedChildren/styles.js +41 -2
- package/node/components/DataGrid/Row/NestedChildren/useLogic/useLogic.d.ts +1 -1
- package/node/components/DataGrid/Row/NestedChildren/useLogic/useLogic.js +3 -5
- package/node/components/DataGrid/Row/Row.js +33 -36
- package/node/components/DataGrid/Row/RowContext/RowContext.d.ts +10 -1
- package/node/components/DataGrid/Row/RowContext/RowContext.js +9 -0
- package/node/components/DataGrid/Row/RowContext/RowProvider/RowProvider.d.ts +3 -2
- package/node/components/DataGrid/Row/RowContext/RowProvider/RowProvider.js +25 -2
- package/node/components/DataGrid/Row/constants.d.ts +6 -0
- package/node/components/DataGrid/Row/constants.js +6 -0
- package/node/components/DataGrid/Row/styles.js +99 -0
- package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.d.ts +1 -0
- package/node/components/DataGrid/Row/useLogic/hooks/useMobileLogic.js +1 -1
- package/node/components/DataGrid/Row/useLogic/useLogic.d.ts +5 -2
- package/node/components/DataGrid/Row/useLogic/useLogic.js +20 -18
- package/node/components/DataGrid/RowBase/GroupCell/GroupCell.d.ts +2 -0
- package/node/components/DataGrid/RowBase/GroupCell/GroupCell.js +26 -0
- package/node/components/DataGrid/RowBase/GroupCell/constants.d.ts +4 -0
- package/node/components/DataGrid/RowBase/GroupCell/constants.js +8 -0
- package/node/components/DataGrid/RowBase/GroupCell/index.d.ts +1 -0
- package/node/components/DataGrid/RowBase/GroupCell/index.js +5 -0
- package/node/components/DataGrid/RowBase/GroupCell/styles.d.ts +12 -0
- package/node/components/DataGrid/RowBase/GroupCell/styles.js +19 -0
- package/node/components/DataGrid/RowBase/GroupCell/types.d.ts +11 -0
- package/node/components/DataGrid/RowBase/GroupCell/types.js +2 -0
- package/node/components/DataGrid/RowBase/RowBase.d.ts +3 -0
- package/node/components/DataGrid/RowBase/RowBase.js +72 -0
- package/node/components/DataGrid/RowBase/constants.d.ts +9 -0
- package/node/components/DataGrid/RowBase/constants.js +13 -0
- package/node/components/DataGrid/RowBase/index.d.ts +3 -0
- package/node/components/DataGrid/RowBase/index.js +7 -0
- package/node/components/DataGrid/RowBase/styles.d.ts +17 -0
- package/node/components/DataGrid/RowBase/styles.js +90 -0
- package/node/components/DataGrid/RowBase/types.d.ts +92 -0
- package/node/components/DataGrid/RowBase/types.js +2 -0
- package/node/components/DataGrid/RowBase/useLogic/index.d.ts +1 -0
- package/node/components/DataGrid/RowBase/useLogic/useLogic.d.ts +46 -0
- package/node/components/DataGrid/RowBase/useLogic/useLogic.js +94 -0
- package/node/components/DataGrid/constants.d.ts +8 -0
- package/node/components/DataGrid/constants.js +9 -1
- package/node/components/DataGrid/index.d.ts +3 -0
- package/node/components/DataGrid/index.js +7 -1
- package/node/components/DataGrid/styles.js +40 -26
- package/node/components/DataGrid/tests/performance/testDataGridPerformance.d.ts +21 -0
- package/node/components/DataGrid/tests/performance/testDataGridPerformance.js +106 -0
- package/node/components/DataGrid/types.d.ts +11 -0
- package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.d.ts +3 -1
- package/node/components/DataGrid/useLogic/hooks/useDataGridMobileLogic/useDataGridMobileLogic.js +2 -1
- package/node/components/DataGrid/useLogic/useLogic.d.ts +4 -1
- package/node/components/DataGrid/useLogic/useLogic.js +19 -6
- package/node/components/DataGridActionCell/DataGridMainActions/Action/MainIconButton/MainIconButton.js +4 -2
- package/node/components/DataGridActionCell/DataGridMainActions/Action/MobileMainButton/MobileMainButton.js +4 -2
- package/node/components/DataGridActionCell/types.d.ts +4 -0
- package/node/components/DataGridCollapsibleRow/DataGridCollapsibleRow.d.ts +2 -0
- package/node/components/DataGridCollapsibleRow/DataGridCollapsibleRow.js +33 -0
- package/node/components/DataGridCollapsibleRow/constants.d.ts +11 -0
- package/node/components/DataGridCollapsibleRow/constants.js +15 -0
- package/node/components/DataGridCollapsibleRow/index.d.ts +2 -0
- package/node/components/DataGridCollapsibleRow/index.js +5 -0
- package/node/components/DataGridCollapsibleRow/public.d.ts +2 -0
- package/node/components/DataGridCollapsibleRow/public.js +5 -0
- package/node/components/DataGridCollapsibleRow/styles.d.ts +42 -0
- package/node/components/DataGridCollapsibleRow/styles.js +102 -0
- package/node/components/DataGridCollapsibleRow/types.d.ts +19 -0
- package/node/components/DataGridCollapsibleRow/types.js +2 -0
- package/node/components/DataGridCollapsibleRow/useLogic/index.d.ts +1 -0
- package/node/components/DataGridCollapsibleRow/useLogic/index.js +17 -0
- package/node/components/DataGridCollapsibleRow/useLogic/useLogic.d.ts +29 -0
- package/node/components/DataGridCollapsibleRow/useLogic/useLogic.js +66 -0
- package/node/components/DataGridInfinite/DataGridInfinite.js +45 -35
- package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.d.ts +23 -0
- package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.js +24 -0
- package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/DataGridInfiniteContextProvider.d.ts +7 -0
- package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/DataGridInfiniteContextProvider.js +9 -0
- package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/index.d.ts +1 -0
- package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContextProvider/index.js +17 -0
- package/node/components/DataGridInfinite/DataGridInfiniteContext/index.d.ts +2 -0
- package/node/components/DataGridInfinite/DataGridInfiniteContext/index.js +18 -0
- package/node/components/DataGridInfinite/List/List.js +2 -1
- package/node/components/DataGridInfinite/List/constants.d.ts +3 -0
- package/node/components/DataGridInfinite/List/constants.js +7 -0
- package/node/components/DataGridInfinite/List/index.d.ts +1 -0
- package/node/components/DataGridInfinite/List/index.js +3 -0
- package/node/components/DataGridInfinite/Row/Row.d.ts +2 -0
- package/node/components/DataGridInfinite/Row/Row.js +14 -0
- package/node/components/DataGridInfinite/Row/index.d.ts +1 -0
- package/node/components/DataGridInfinite/Row/index.js +17 -0
- package/node/components/DataGridInfinite/Row/types.d.ts +2 -0
- package/node/components/DataGridInfinite/Row/types.js +2 -0
- package/node/components/DataGridInfinite/Row/useLogic/index.d.ts +1 -0
- package/node/components/DataGridInfinite/Row/useLogic/index.js +17 -0
- package/node/components/DataGridInfinite/Row/useLogic/useLogic.d.ts +33 -0
- package/node/components/DataGridInfinite/Row/useLogic/useLogic.js +39 -0
- package/node/components/DataGridInfinite/faker.js +1 -1
- package/node/components/DataGridInfinite/styles.d.ts +6 -0
- package/node/components/DataGridInfinite/styles.js +12 -1
- package/node/components/DataGridInfinite/useLogic/useLogic.d.ts +6 -3
- package/node/components/DataGridInfinite/useLogic/useLogic.js +33 -14
- package/node/components/DialogActions/styles.js +2 -0
- package/node/components/DonutChart/DonutChart.d.ts +2 -0
- package/node/components/DonutChart/DonutChart.js +13 -0
- package/node/components/DonutChart/constants.d.ts +15 -0
- package/node/components/DonutChart/constants.js +19 -0
- package/node/components/DonutChart/index.d.ts +3 -0
- package/node/components/DonutChart/index.js +7 -0
- package/node/components/DonutChart/public.d.ts +3 -0
- package/node/components/DonutChart/public.js +7 -0
- package/node/components/DonutChart/styles.d.ts +21 -0
- package/node/components/DonutChart/styles.js +44 -0
- package/node/components/DonutChart/types.d.ts +27 -0
- package/node/components/DonutChart/types.js +2 -0
- package/node/components/DonutChart/useLogic/hooks/index.d.ts +1 -0
- package/node/components/DonutChart/useLogic/hooks/index.js +17 -0
- package/node/components/DonutChart/useLogic/hooks/useRenderWidth/index.d.ts +1 -0
- package/node/components/DonutChart/useLogic/hooks/useRenderWidth/index.js +17 -0
- package/node/components/DonutChart/useLogic/hooks/useRenderWidth/useRenderWidth.d.ts +9 -0
- package/node/components/DonutChart/useLogic/hooks/useRenderWidth/useRenderWidth.js +34 -0
- package/node/components/DonutChart/useLogic/index.d.ts +1 -0
- package/node/components/DonutChart/useLogic/index.js +17 -0
- package/node/components/DonutChart/useLogic/useLogic.d.ts +15 -0
- package/node/components/DonutChart/useLogic/useLogic.js +44 -0
- package/node/components/DonutChart/useLogic/utils/getDonutChartCssVars/getDonutChartCssVars.d.ts +16 -0
- package/node/components/DonutChart/useLogic/utils/getDonutChartCssVars/getDonutChartCssVars.js +14 -0
- package/node/components/DonutChart/useLogic/utils/getDonutChartCssVars/index.d.ts +1 -0
- package/node/components/DonutChart/useLogic/utils/getDonutChartCssVars/index.js +5 -0
- package/node/components/DonutChart/useLogic/utils/getGeometry/getGeometry.d.ts +10 -0
- package/node/components/DonutChart/useLogic/utils/getGeometry/getGeometry.js +17 -0
- package/node/components/DonutChart/useLogic/utils/getGeometry/index.d.ts +1 -0
- package/node/components/DonutChart/useLogic/utils/getGeometry/index.js +5 -0
- package/node/components/DonutChart/useLogic/utils/getMeterAriaValue/getMeterAriaValue.d.ts +13 -0
- package/node/components/DonutChart/useLogic/utils/getMeterAriaValue/getMeterAriaValue.js +26 -0
- package/node/components/DonutChart/useLogic/utils/getMeterAriaValue/index.d.ts +1 -0
- package/node/components/DonutChart/useLogic/utils/getMeterAriaValue/index.js +5 -0
- package/node/components/DonutChart/useLogic/utils/getProgressCirclePath/getProgressCirclePath.d.ts +9 -0
- package/node/components/DonutChart/useLogic/utils/getProgressCirclePath/getProgressCirclePath.js +33 -0
- package/node/components/DonutChart/useLogic/utils/getProgressCirclePath/index.d.ts +1 -0
- package/node/components/DonutChart/useLogic/utils/getProgressCirclePath/index.js +5 -0
- package/node/components/DonutChart/useLogic/utils/getProgressOffset/getProgressOffset.d.ts +8 -0
- package/node/components/DonutChart/useLogic/utils/getProgressOffset/getProgressOffset.js +25 -0
- package/node/components/DonutChart/useLogic/utils/getProgressOffset/index.d.ts +1 -0
- package/node/components/DonutChart/useLogic/utils/getProgressOffset/index.js +5 -0
- package/node/components/DonutChart/useLogic/utils/getProgressPercent/getProgressPercent.d.ts +8 -0
- package/node/components/DonutChart/useLogic/utils/getProgressPercent/getProgressPercent.js +20 -0
- package/node/components/DonutChart/useLogic/utils/getProgressPercent/index.d.ts +1 -0
- package/node/components/DonutChart/useLogic/utils/getProgressPercent/index.js +5 -0
- package/node/components/DonutChart/useLogic/utils/index.d.ts +6 -0
- package/node/components/DonutChart/useLogic/utils/index.js +15 -0
- package/node/components/ExpansionPanel/Summary/styles.d.ts +1 -1
- package/node/components/MenuOrganization/OrganizationButton/styles.d.ts +1 -1
- package/node/components/NewStepper/StepIcon/StepIcon.js +3 -1
- package/node/components/NewStepper/StepIcon/useLogic/index.d.ts +1 -0
- package/node/components/NewStepper/StepIcon/useLogic/index.js +17 -0
- package/node/components/NewStepper/StepIcon/useLogic/useLogic.d.ts +8 -0
- package/node/components/NewStepper/StepIcon/useLogic/useLogic.js +10 -0
- package/node/components/PageContent/PageContent.js +22 -4
- package/node/components/PageContent/constants.d.ts +2 -0
- package/node/components/PageContent/constants.js +2 -0
- package/node/components/PageContent/styles.d.ts +0 -2
- package/node/components/PageContent/styles.js +17 -11
- package/node/components/PageContent/types.d.ts +4 -0
- package/node/components/Profile/styles.d.ts +1 -1
- package/node/components/SearchField/types.d.ts +9 -0
- package/node/components/SearchField/useLogic/useLogic.d.ts +1 -1
- package/node/components/SearchField/useLogic/useLogic.js +27 -15
- package/node/components/constants/classnames.d.ts +1 -0
- package/node/components/constants/classnames.js +5 -0
- package/node/components/constants/index.d.ts +1 -0
- package/node/components/constants/index.js +1 -0
- package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.d.ts +2 -1
- package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.js +4 -1
- package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/useLogic/useLogic.d.ts +5 -4
- package/node/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/HintPlaceholder.js +10 -1
- package/node/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/useLogic/useLogic.d.ts +5 -5
- package/node/components/fileUploading/hooks/useFileUploader/useFileUploader.d.ts +1 -1
- package/node/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts +1 -1
- package/node/components/fileUploading/types.d.ts +2 -2
- package/node/components/useProfiler/index.d.ts +1 -0
- package/node/components/useProfiler/index.js +5 -0
- package/node/components/useProfiler/useProfiler.d.ts +14 -0
- package/node/components/useProfiler/useProfiler.js +50 -0
- package/node/components/useProfiler/utils/index.d.ts +1 -0
- package/node/components/useProfiler/utils/index.js +17 -0
- package/node/components/useProfiler/utils/shallowEqual/index.d.ts +1 -0
- package/node/components/useProfiler/utils/shallowEqual/index.js +6 -0
- package/node/components/useProfiler/utils/shallowEqual/shallowEqual.d.ts +5 -0
- package/node/components/useProfiler/utils/shallowEqual/shallowEqual.js +31 -0
- package/node/hook-form/FormFilters/FormFilters.js +1 -1
- package/node/hook-form/FormFilters/FormFiltersSkeleton/FormFiltersSkeleton.d.ts +5 -1
- package/node/hook-form/FormFilters/FormFiltersSkeleton/FormFiltersSkeleton.js +3 -2
- package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/FormQuickFiltersSkeleton.d.ts +1 -0
- package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/FormQuickFiltersSkeleton.js +13 -0
- package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/index.d.ts +1 -0
- package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/index.js +17 -0
- package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/styles.d.ts +5 -0
- package/node/hook-form/FormFilters/FormQuickFiltersSkeleton/styles.js +8 -0
- package/package.json +1 -1
- package/components/PageContent/useLogic/useLogic.d.ts +0 -7
- package/components/PageContent/useLogic/useLogic.js +0 -11
- package/node/components/PageContent/useLogic/useLogic.d.ts +0 -7
- package/node/components/PageContent/useLogic/useLogic.js +0 -15
- /package/components/{PageContent → DataGrid/RowBase}/useLogic/index.d.ts +0 -0
- /package/components/{PageContent → DataGrid/RowBase}/useLogic/index.js +0 -0
- /package/{node/components/PageContent → components/DataGridCollapsibleRow}/useLogic/index.d.ts +0 -0
- /package/node/components/{PageContent → DataGrid/RowBase}/useLogic/index.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FormQuickFiltersSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import { FormFiltersLayoutContext } from '../../../components/PageHeader';
|
|
4
|
+
import { Skeleton } from '../../../components/Skeleton';
|
|
5
|
+
import { FormQuickFiltersSkeletonWrapper } from './styles';
|
|
6
|
+
export const FormQuickFiltersSkeleton = () => {
|
|
7
|
+
const { quickFiltersClassName } = useContext(FormFiltersLayoutContext) ?? {};
|
|
8
|
+
return (_jsxs(FormQuickFiltersSkeletonWrapper, { className: quickFiltersClassName, children: [_jsx(Skeleton, { variant: "rounded", width: 42, height: 24 }), _jsx(Skeleton, { variant: "rounded", width: 92, height: 24 }), _jsx(Skeleton, { variant: "rounded", width: 124, height: 24 })] }));
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormQuickFiltersSkeleton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormQuickFiltersSkeleton';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const FormQuickFiltersSkeletonWrapper: import("../../../components/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -5,8 +5,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_virtuoso_1 = require("react-virtuoso");
|
|
7
7
|
const ContentState_1 = require("../ContentState");
|
|
8
|
+
const constants_1 = require("../constants");
|
|
9
|
+
const cva_1 = require("../utils/cva");
|
|
8
10
|
const Card_1 = require("./Card");
|
|
9
|
-
const
|
|
11
|
+
const constants_2 = require("./constants");
|
|
10
12
|
const Footer_1 = require("./Footer");
|
|
11
13
|
const List_1 = require("./List");
|
|
12
14
|
const NoDataPlaceholder_1 = require("./NoDataPlaceholder");
|
|
@@ -14,8 +16,15 @@ const OnTopButton_1 = require("./OnTopButton");
|
|
|
14
16
|
const SkeletonGrid_1 = require("./SkeletonGrid");
|
|
15
17
|
const styles_1 = require("./styles");
|
|
16
18
|
const useLogic_1 = require("./useLogic");
|
|
19
|
+
const rootCva = (0, cva_1.cva)([constants_2.cardGridClassnames.root, constants_1.selfContainedClassname], {
|
|
20
|
+
variants: {
|
|
21
|
+
isLoading: {
|
|
22
|
+
true: constants_2.cardGridClassnames.loading,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
17
26
|
const CardGridInfinite = (props) => {
|
|
18
|
-
const { contentStateProps, desktopCardWidth, virtuosoProps, scrollParent, skeleton, footerProps, onTopButtonProps, list, noDataImgSrc, defineCard,
|
|
27
|
+
const { contentStateProps, desktopCardWidth, virtuosoProps, scrollParent, skeleton, footerProps, onTopButtonProps, list, noDataImgSrc, defineCard, isLoading, isMobile, } = (0, useLogic_1.useLogic)(props);
|
|
19
28
|
const VirtuosoList = (0, react_1.useMemo)(() => (0, react_1.forwardRef)((listProps, ref) => ((0, jsx_runtime_1.jsx)(List_1.List, { ...listProps, ref: ref, desktopCardWidth: desktopCardWidth }))), [desktopCardWidth]);
|
|
20
29
|
const renderVirtuoso = () => {
|
|
21
30
|
if (!scrollParent) {
|
|
@@ -28,11 +37,11 @@ const CardGridInfinite = (props) => {
|
|
|
28
37
|
Footer: () => (0, jsx_runtime_1.jsx)(Footer_1.Footer, { ...footerProps }),
|
|
29
38
|
}, itemContent: (_, item) => (0, jsx_runtime_1.jsx)(Card_1.Card, { item: item, ...defineCard(item) }) }));
|
|
30
39
|
}
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(react_virtuoso_1.VirtuosoGrid, { ...virtuosoProps, data: list, customScrollParent: scrollParent, listClassName:
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(react_virtuoso_1.VirtuosoGrid, { ...virtuosoProps, data: list, customScrollParent: scrollParent, listClassName: constants_2.cardGridClassnames.list, components: {
|
|
32
41
|
List: VirtuosoList,
|
|
33
42
|
Footer: () => (0, jsx_runtime_1.jsx)(Footer_1.Footer, { ...footerProps }),
|
|
34
43
|
}, itemContent: (_, item) => (0, jsx_runtime_1.jsx)(Card_1.Card, { item: item, ...defineCard(item) }) }));
|
|
35
44
|
};
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.ContentStateWrapper, { className:
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ContentStateWrapper, { className: rootCva({ isLoading }), children: (0, jsx_runtime_1.jsx)(ContentState_1.ContentState, { ...contentStateProps, loadingContent: (0, jsx_runtime_1.jsx)(SkeletonGrid_1.SkeletonGrid, { skeleton: skeleton, desktopCardWidth: desktopCardWidth }), children: list?.length ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [renderVirtuoso(), (0, jsx_runtime_1.jsx)(OnTopButton_1.OnTopButton, { ...onTopButtonProps })] })) : ((0, jsx_runtime_1.jsx)(NoDataPlaceholder_1.NoDataPlaceholder, { noDataImgSrc: noDataImgSrc })) }) }));
|
|
37
46
|
};
|
|
38
47
|
exports.CardGridInfinite = CardGridInfinite;
|
|
@@ -26,4 +26,8 @@ exports.ContentStateWrapper = styled_1.styled.div `
|
|
|
26
26
|
& .${LoadingPlaceholder_1.loadingPlaceholderClassnames.root} {
|
|
27
27
|
justify-content: flex-start
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
31
|
+
margin: ${({ theme }) => theme.spacing(0, 4, 4)};
|
|
32
|
+
}
|
|
29
33
|
`;
|
|
@@ -37,6 +37,6 @@ export declare const useLogic: <TDataItem extends Record<string, unknown>>({ lis
|
|
|
37
37
|
list: TDataItem[] | undefined;
|
|
38
38
|
noDataImgSrc: string | undefined;
|
|
39
39
|
defineCard: (itemData: TDataItem) => Omit<import("..").CardProps<TDataItem>, "item">;
|
|
40
|
-
|
|
40
|
+
isLoading: boolean | undefined;
|
|
41
41
|
};
|
|
42
42
|
export {};
|
|
@@ -6,17 +6,10 @@ const ConfigProvider_1 = require("../../ConfigProvider");
|
|
|
6
6
|
const useScrollManagement_1 = require("../../useScrollManagement");
|
|
7
7
|
const useStickyButton_1 = require("../../useStickyButton");
|
|
8
8
|
const useViewportType_1 = require("../../useViewportType");
|
|
9
|
-
const classNames_1 = require("../../utils/classNames");
|
|
10
9
|
const constants_1 = require("../constants");
|
|
11
10
|
const useLogic = ({ list, isLoading, isError, errorMsg, errorImgSrc, scrollRef, skeleton, onRetry, endOfScrollMsg, isEndReached, onLoadMore, noDataImgSrc, defineCard, desktopCardWidth, }) => {
|
|
12
11
|
const { imagesMap } = (0, react_1.useContext)(ConfigProvider_1.ConfigContext);
|
|
13
12
|
const { isMobile } = (0, useViewportType_1.useViewportType)();
|
|
14
|
-
(0, react_1.useEffect)(() => {
|
|
15
|
-
if (isMobile && scrollRef?.current) {
|
|
16
|
-
scrollRef.current.style.backgroundColor = 'unset';
|
|
17
|
-
scrollRef.current.style.padding = 'unset';
|
|
18
|
-
}
|
|
19
|
-
}, [isMobile]);
|
|
20
13
|
const contentStateProps = (0, react_1.useMemo)(() => {
|
|
21
14
|
const isNoData = !list?.length;
|
|
22
15
|
return {
|
|
@@ -42,9 +35,6 @@ const useLogic = ({ list, isLoading, isError, errorMsg, errorImgSrc, scrollRef,
|
|
|
42
35
|
recalculateVerticalScroll();
|
|
43
36
|
propsHandleRangeChanged(range);
|
|
44
37
|
};
|
|
45
|
-
const classnames = (0, react_1.useMemo)(() => (0, classNames_1.classNames)(constants_1.cardGridClassnames.root, {
|
|
46
|
-
[constants_1.cardGridClassnames.loading]: isLoading,
|
|
47
|
-
}), [isLoading]);
|
|
48
38
|
return {
|
|
49
39
|
contentStateProps,
|
|
50
40
|
desktopCardWidth,
|
|
@@ -74,7 +64,7 @@ const useLogic = ({ list, isLoading, isError, errorMsg, errorImgSrc, scrollRef,
|
|
|
74
64
|
list,
|
|
75
65
|
noDataImgSrc,
|
|
76
66
|
defineCard,
|
|
77
|
-
|
|
67
|
+
isLoading,
|
|
78
68
|
};
|
|
79
69
|
};
|
|
80
70
|
exports.useLogic = useLogic;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type SvgIconProps } from '@mui/material/SvgIcon';
|
|
2
1
|
import type { ReactElement } from 'react';
|
|
2
|
+
import { type SvgIconProps } from '../SvgIcon';
|
|
3
3
|
import { type WithoutEmotionSpecific } from '../types/WithoutEmotionSpecific';
|
|
4
4
|
export type ChevronProps = {
|
|
5
5
|
isActive?: boolean;
|
|
@@ -11,7 +11,7 @@ const ConfirmAction = (props) => {
|
|
|
11
11
|
const { actionComponentProps, popoverProps, cancelButtonProps, confirmButtonProps, } = (0, useLogic_1.useLogic)(props);
|
|
12
12
|
const { text, confirmButtonProps: externalConfirmButtonProps, popoverProps: externalPopoverProps, actionComponent, } = props;
|
|
13
13
|
const { text: confirmButtonText = 'Подтвердить' } = externalConfirmButtonProps || {};
|
|
14
|
-
const { anchorOrigin = constants_1.DEFAULT_ANCHOR_ORIGIN, transformOrigin = constants_1.DEFAULT_TRANSFORM_ORIGIN, } = externalPopoverProps || {};
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [actionComponent(actionComponentProps), (0, jsx_runtime_1.jsx)(Popover_1.Popover, { anchorOrigin: anchorOrigin, transformOrigin: transformOrigin, ...popoverProps, children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [text && (0, jsx_runtime_1.jsx)(styles_1.StyledTypography, { children: text }), (0, jsx_runtime_1.jsxs)(styles_1.Actions, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { ...confirmButtonProps, children: confirmButtonText })] })] }) })] }));
|
|
14
|
+
const { anchorOrigin = constants_1.DEFAULT_ANCHOR_ORIGIN, transformOrigin = constants_1.DEFAULT_TRANSFORM_ORIGIN, title = constants_1.DEFAULT_MOBILE_TITLE, } = externalPopoverProps || {};
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [actionComponent(actionComponentProps), (0, jsx_runtime_1.jsx)(Popover_1.Popover, { anchorOrigin: anchorOrigin, transformOrigin: transformOrigin, title: title, ...popoverProps, children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [text && (0, jsx_runtime_1.jsx)(styles_1.StyledTypography, { children: text }), (0, jsx_runtime_1.jsxs)(styles_1.Actions, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { ...confirmButtonProps, children: confirmButtonText })] })] }) })] }));
|
|
16
16
|
};
|
|
17
17
|
exports.ConfirmAction = ConfirmAction;
|
|
@@ -6,6 +6,7 @@ export declare const DEFAULT_TRANSFORM_ORIGIN: {
|
|
|
6
6
|
vertical: string;
|
|
7
7
|
horizontal: string;
|
|
8
8
|
};
|
|
9
|
+
export declare const DEFAULT_MOBILE_TITLE = "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F";
|
|
9
10
|
export declare const confirmActionClassnames: {
|
|
10
11
|
actionComponent: string;
|
|
11
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.confirmActionClassnames = exports.DEFAULT_TRANSFORM_ORIGIN = exports.DEFAULT_ANCHOR_ORIGIN = void 0;
|
|
3
|
+
exports.confirmActionClassnames = exports.DEFAULT_MOBILE_TITLE = exports.DEFAULT_TRANSFORM_ORIGIN = exports.DEFAULT_ANCHOR_ORIGIN = void 0;
|
|
4
4
|
const createUIKitClassname_1 = require("../utils/createUIKitClassname");
|
|
5
5
|
exports.DEFAULT_ANCHOR_ORIGIN = {
|
|
6
6
|
vertical: 'bottom',
|
|
@@ -10,6 +10,7 @@ exports.DEFAULT_TRANSFORM_ORIGIN = {
|
|
|
10
10
|
vertical: 'top',
|
|
11
11
|
horizontal: 'right',
|
|
12
12
|
};
|
|
13
|
+
exports.DEFAULT_MOBILE_TITLE = 'Подтверждение действия';
|
|
13
14
|
exports.confirmActionClassnames = {
|
|
14
15
|
actionComponent: (0, createUIKitClassname_1.createUIKitClassname)('confirm-action__action-component'),
|
|
15
16
|
};
|
|
@@ -9,13 +9,26 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
9
9
|
|
|
10
10
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
11
11
|
max-width: unset;
|
|
12
|
+
padding: 0;
|
|
12
13
|
}
|
|
13
14
|
`;
|
|
14
15
|
exports.StyledTypography = (0, styled_1.styled)(Typography_1.Typography) `
|
|
15
16
|
margin-bottom: ${({ theme }) => theme.spacing(3)};
|
|
17
|
+
|
|
18
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: ${({ theme }) => theme.spacing(5, 4)};
|
|
21
|
+
}
|
|
16
22
|
`;
|
|
17
23
|
exports.Actions = styled_1.styled.div `
|
|
18
24
|
display: flex;
|
|
19
25
|
gap: ${({ theme }) => theme.spacing(3)};
|
|
20
26
|
justify-content: end;
|
|
27
|
+
|
|
28
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
29
|
+
flex-direction: column-reverse;
|
|
30
|
+
gap: ${({ theme }) => theme.spacing(2)};
|
|
31
|
+
|
|
32
|
+
padding: ${({ theme }) => theme.spacing(4)};
|
|
33
|
+
}
|
|
21
34
|
`;
|
|
@@ -25,7 +25,7 @@ export type ConfirmActionProps = {
|
|
|
25
25
|
/**
|
|
26
26
|
* Параметры всплывающего окна
|
|
27
27
|
*/
|
|
28
|
-
popoverProps?: Pick<PopoverProps, 'anchorOrigin' | 'transformOrigin'>;
|
|
28
|
+
popoverProps?: Pick<PopoverProps, 'anchorOrigin' | 'transformOrigin' | 'title'>;
|
|
29
29
|
/**
|
|
30
30
|
* Кнопка, действие которой необходимо подтвердить
|
|
31
31
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { BodyProps } from './types';
|
|
2
|
-
export declare const Body: <TData extends Record<string, unknown>>({ rows, selectedRows, minDisplayRows, keyId, noDataPlaceholder, className, ...rowProps }: BodyProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Body: <TData extends Record<string, unknown>>({ rows, selectedRows, minDisplayRows, keyId, noDataPlaceholder, className, renderRow, columns, isSelectable, onSelectRow, onRowEnter, onRowLeave, registerRowElement, unregisterRowElement, ...rowProps }: BodyProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,7 @@ exports.Body = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const classNames_1 = require("../../utils/classNames");
|
|
6
6
|
const cva_1 = require("../../utils/cva");
|
|
7
|
+
const CustomRowWrapper_1 = require("../CustomRowWrapper");
|
|
7
8
|
const Row_1 = require("../Row");
|
|
8
9
|
const RowContext_1 = require("../Row/RowContext");
|
|
9
10
|
const constants_1 = require("./constants");
|
|
@@ -17,12 +18,13 @@ const bodyCva = (0, cva_1.cva)(constants_1.bodyClassnames.root, {
|
|
|
17
18
|
},
|
|
18
19
|
},
|
|
19
20
|
});
|
|
20
|
-
const Body = ({ rows, selectedRows = [], minDisplayRows, keyId, noDataPlaceholder, className, ...rowProps }) => {
|
|
21
|
+
const Body = ({ rows, selectedRows = [], minDisplayRows, keyId, noDataPlaceholder, className, renderRow, columns, isSelectable, onSelectRow, onRowEnter, onRowLeave, registerRowElement, unregisterRowElement, ...rowProps }) => {
|
|
21
22
|
const { disableMinHeight, bodyCssVars } = (0, useLogic_1.useLogic)({ minDisplayRows });
|
|
22
|
-
const renderedRows = rows.map((
|
|
23
|
+
const renderedRows = rows.map((row, index) => {
|
|
23
24
|
const rowId = row[keyId];
|
|
24
25
|
const isSelected = Boolean(selectedRows?.find((selectedRow) => selectedRow[keyId] === rowId));
|
|
25
|
-
|
|
26
|
+
const { children, options } = row;
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(RowContext_1.RowContextProvider, { row: row, onSelectRow: onSelectRow, onRowEnter: onRowEnter, onRowLeave: onRowLeave, registerRowElement: registerRowElement, unregisterRowElement: unregisterRowElement, isSelectable: isSelectable, isSelected: isSelected, children: renderRow ? ((0, jsx_runtime_1.jsx)(CustomRowWrapper_1.CustomRowWrapper, { index: index, renderRow: renderRow, row: row })) : ((0, jsx_runtime_1.jsx)(Row_1.Row, { row: row, options: options, keyId: keyId, level: INITIAL_LEVEL, nestedChildren: children, isSelected: isSelected, columns: columns, isSelectable: isSelectable, onSelectRow: onSelectRow, onRowEnter: onRowEnter, onRowLeave: onRowLeave, registerRowElement: registerRowElement, unregisterRowElement: unregisterRowElement, ...rowProps }, rowId)) }, rowId));
|
|
26
28
|
});
|
|
27
29
|
return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: (0, classNames_1.classNames)(className, bodyCva({ disableMinHeight })), style: bodyCssVars, children: rows.length ? renderedRows : noDataPlaceholder }));
|
|
28
30
|
};
|
|
@@ -107,4 +107,9 @@ export type BodyProps<TData extends Record<string, CellValue>> = {
|
|
|
107
107
|
* Класс применяемый для корневого элемента
|
|
108
108
|
*/
|
|
109
109
|
className?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Кастомный компонент для отображения строк таблицы
|
|
112
|
+
*/
|
|
113
|
+
renderRow?: (row: TData, index: number) => ReactNode;
|
|
110
114
|
};
|
|
115
|
+
export type ContextOnSelectRow = (row: Record<string, unknown>) => (event: ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -30,5 +30,13 @@ export type CellProps<TData extends Record<string, CellValue>> = {
|
|
|
30
30
|
* Скрытие ячейки на мобильных устройствах
|
|
31
31
|
*/
|
|
32
32
|
isHideOnMobile?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Флаг наличия вложенных элементов в строке
|
|
35
|
+
*/
|
|
36
|
+
hasNestedChildren?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Ссылка на корневой элемент строки
|
|
39
|
+
*/
|
|
40
|
+
rootRowElement?: HTMLLIElement | null;
|
|
33
41
|
};
|
|
34
|
-
export declare const Cell: <TData extends Record<string, unknown>>(props: CellProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare const Cell: <TData extends Record<string, unknown>>(props: CellProps<TData>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Cell = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_dom_1 = require("react-dom");
|
|
5
6
|
const OverflowTypography_1 = require("../../OverflowTypography");
|
|
6
7
|
const personalDataSecurity_1 = require("../../personalDataSecurity");
|
|
8
|
+
const useViewportType_1 = require("../../useViewportType");
|
|
7
9
|
const classNames_1 = require("../../utils/classNames");
|
|
8
10
|
const cva_1 = require("../../utils/cva");
|
|
9
11
|
const getInertProps_1 = require("../../utils/getInertProps");
|
|
@@ -26,6 +28,9 @@ const cellCva = (0, cva_1.cva)(constants_1.dataGridCellClassnames.root, {
|
|
|
26
28
|
center: constants_1.dataGridCellClassnames.alignCenter,
|
|
27
29
|
right: constants_1.dataGridCellClassnames.alignRight,
|
|
28
30
|
},
|
|
31
|
+
isActionColumn: {
|
|
32
|
+
true: constants_1.dataGridCellClassnames.actionColumn,
|
|
33
|
+
},
|
|
29
34
|
},
|
|
30
35
|
});
|
|
31
36
|
const cellContentCva = (0, cva_1.cva)(constants_1.dataGridCellClassnames.cellContent, {
|
|
@@ -47,18 +52,27 @@ const columnLabelCva = (0, cva_1.cva)(constants_1.dataGridCellClassnames.columnL
|
|
|
47
52
|
});
|
|
48
53
|
const Cell = (props) => {
|
|
49
54
|
const { formattedValue, hasStartAdornment, isActionColumn, label, hideTitleOnMobile, isTabularNums, } = (0, useLogic_1.useLogic)(props);
|
|
50
|
-
const { className, startAdornment, row, cell, isDisabled, isHidePersonalData, isHideOnMobile, } = props;
|
|
55
|
+
const { className, startAdornment, row, cell, isDisabled, isHidePersonalData, isHideOnMobile, hasNestedChildren, rootRowElement, } = props;
|
|
51
56
|
const { renderCell, align = 'left' } = cell;
|
|
57
|
+
const { isMobile } = (0, useViewportType_1.useViewportType)();
|
|
52
58
|
const hidePersonalDataClassname = (0, personalDataSecurity_1.useHidePersonalData)({
|
|
53
59
|
isEnabled: isHidePersonalData === true,
|
|
54
60
|
});
|
|
55
|
-
|
|
61
|
+
const cellNode = ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, classNames_1.classNames)(className, hidePersonalDataClassname, cellCva({
|
|
56
62
|
isHideOnMobile: cell.isHideOnMobile || isHideOnMobile,
|
|
57
63
|
isDisabled,
|
|
58
64
|
withStartAdornment: hasStartAdornment,
|
|
59
65
|
align,
|
|
66
|
+
isActionColumn,
|
|
60
67
|
})), ...(0, getInertProps_1.getInertProps)(isDisabled), children: [startAdornment && startAdornment, (0, jsx_runtime_1.jsxs)(styles_1.CellContent, { className: cellContentCva({ isActionColumn, isTabularNums }), children: [(0, jsx_runtime_1.jsx)(styles_1.ColumnLabel, { variant: "caption", color: "textSecondary", className: columnLabelCva({
|
|
61
68
|
hidden: hideTitleOnMobile || isActionColumn,
|
|
62
69
|
}), children: label }), renderCell?.(row), !renderCell && ((0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography, { rowsCount: 2, tooltipProps: { className: hidePersonalDataClassname }, children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: formattedValue }) }))] })] }));
|
|
70
|
+
if (isActionColumn && isMobile && hasNestedChildren) {
|
|
71
|
+
if (!rootRowElement) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return (0, react_dom_1.createPortal)(cellNode, rootRowElement);
|
|
75
|
+
}
|
|
76
|
+
return cellNode;
|
|
63
77
|
};
|
|
64
78
|
exports.Cell = Cell;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type RenderRow } from '../types';
|
|
3
|
+
type CustomRowWrapperProps = {
|
|
4
|
+
index: number;
|
|
5
|
+
renderRow: RenderRow;
|
|
6
|
+
row: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Обёртка с `memo` для изоляции пользовательского `renderRow`.
|
|
10
|
+
*
|
|
11
|
+
* При re-render родителя (`Body`, Virtuoso `Item`) без обёртки `renderRow(row, index)`
|
|
12
|
+
* вызывается заново на каждой строке и каждый раз создаёт новые React-elements, из‑за чего `memo` у дочерних компонентов
|
|
13
|
+
* (например, `DataGridCollapsibleRow`) не срабатывает.
|
|
14
|
+
*
|
|
15
|
+
* `CustomRowWrapper` повторно вызывает `renderRow` только когда изменились
|
|
16
|
+
* `index`, `row` или ссылка на `renderRow`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const CustomRowWrapper: import("react").MemoExoticComponent<({ index, renderRow, row }: CustomRowWrapperProps) => import("react/jsx-runtime").JSX.Element>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomRowWrapper = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
/**
|
|
7
|
+
* Обёртка с `memo` для изоляции пользовательского `renderRow`.
|
|
8
|
+
*
|
|
9
|
+
* При re-render родителя (`Body`, Virtuoso `Item`) без обёртки `renderRow(row, index)`
|
|
10
|
+
* вызывается заново на каждой строке и каждый раз создаёт новые React-elements, из‑за чего `memo` у дочерних компонентов
|
|
11
|
+
* (например, `DataGridCollapsibleRow`) не срабатывает.
|
|
12
|
+
*
|
|
13
|
+
* `CustomRowWrapper` повторно вызывает `renderRow` только когда изменились
|
|
14
|
+
* `index`, `row` или ссылка на `renderRow`.
|
|
15
|
+
*/
|
|
16
|
+
exports.CustomRowWrapper = (0, react_1.memo)(({ index, renderRow, row }) => {
|
|
17
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: renderRow(row, index) });
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CustomRowWrapper } from './CustomRowWrapper';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomRowWrapper = void 0;
|
|
4
|
+
var CustomRowWrapper_1 = require("./CustomRowWrapper");
|
|
5
|
+
Object.defineProperty(exports, "CustomRowWrapper", { enumerable: true, get: function () { return CustomRowWrapper_1.CustomRowWrapper; } });
|
|
@@ -5,11 +5,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const ConfigProvider_1 = require("../ConfigProvider");
|
|
7
7
|
const ContentState_1 = require("../ContentState");
|
|
8
|
+
const constants_1 = require("../constants");
|
|
8
9
|
const classNames_1 = require("../utils/classNames");
|
|
9
10
|
const cva_1 = require("../utils/cva");
|
|
10
11
|
const getInertProps_1 = require("../utils/getInertProps");
|
|
11
12
|
const Body_1 = require("./Body");
|
|
12
|
-
const
|
|
13
|
+
const constants_2 = require("./constants");
|
|
13
14
|
const DataGridContext_1 = require("./DataGridContext");
|
|
14
15
|
const enums_1 = require("./enums");
|
|
15
16
|
const Head_1 = require("./Head");
|
|
@@ -19,43 +20,50 @@ const NoData_1 = require("./NoData");
|
|
|
19
20
|
const PinnedSections_1 = require("./PinnedSections");
|
|
20
21
|
const styles_1 = require("./styles");
|
|
21
22
|
const useLogic_1 = require("./useLogic");
|
|
22
|
-
const pinnedSectionsCva = (0, cva_1.cva)(
|
|
23
|
+
const pinnedSectionsCva = (0, cva_1.cva)(constants_2.dataGridClassnames.pinnedSections, {
|
|
23
24
|
variants: {
|
|
24
25
|
isDisabled: {
|
|
25
|
-
true:
|
|
26
|
+
true: constants_2.dataGridClassnames.disabled,
|
|
26
27
|
},
|
|
27
28
|
},
|
|
28
29
|
});
|
|
29
|
-
const dataGridCva = (0, cva_1.cva)(
|
|
30
|
+
const dataGridCva = (0, cva_1.cva)(constants_2.dataGridClassnames.root, {
|
|
30
31
|
variants: {
|
|
31
32
|
hasPinnedColumns: {
|
|
32
|
-
true:
|
|
33
|
+
true: constants_2.dataGridClassnames.hasPinnedSections,
|
|
33
34
|
},
|
|
34
35
|
isAllowHorizontalScroll: {
|
|
35
|
-
true:
|
|
36
|
+
true: constants_2.dataGridClassnames.isAllowHorizontalScroll,
|
|
36
37
|
},
|
|
37
38
|
gridViewMode: {
|
|
38
|
-
full:
|
|
39
|
-
standard:
|
|
39
|
+
full: constants_2.dataGridClassnames.gridViewFull,
|
|
40
|
+
standard: constants_2.dataGridClassnames.gridViewStandard,
|
|
40
41
|
},
|
|
41
42
|
hasGroupedColumns: {
|
|
42
|
-
true:
|
|
43
|
+
true: constants_2.dataGridClassnames.hasGroupedColumns,
|
|
44
|
+
},
|
|
45
|
+
mobileDisplayVariant: {
|
|
46
|
+
cards: constants_2.dataGridClassnames.mobileVariantCards,
|
|
47
|
+
list: constants_2.dataGridClassnames.mobileVariantList,
|
|
48
|
+
},
|
|
49
|
+
isSelfContained: {
|
|
50
|
+
true: constants_1.selfContainedClassname,
|
|
43
51
|
},
|
|
44
52
|
},
|
|
45
53
|
});
|
|
46
|
-
const bodyCva = (0, cva_1.cva)(
|
|
54
|
+
const bodyCva = (0, cva_1.cva)(constants_2.dataGridClassnames.body, {
|
|
47
55
|
variants: {
|
|
48
56
|
isNoData: {
|
|
49
|
-
true:
|
|
57
|
+
true: constants_2.dataGridClassnames.bodyEmpty,
|
|
50
58
|
},
|
|
51
59
|
},
|
|
52
60
|
});
|
|
53
61
|
const DataGrid = (props) => {
|
|
54
|
-
const { dataGridClassName, isDataGridDisabled, treeRenderConfig, headColumns, headProps, bodyProps, gridColumns, loaderProps, renderRows, isAllowHorizontalScroll, isHideHead, hasPinnedColumns, contentStateProps, rowHoverProps, containerRef, sections, isNoData, isMobile, mobileSkeletonProps, isLoading, containerCssVars, hasGroupedColumns, gridViewMode, } = (0, useLogic_1.useLogic)(props);
|
|
62
|
+
const { dataGridClassName, isDataGridDisabled, treeRenderConfig, headColumns, headProps, bodyProps, gridColumns, loaderProps, renderRows, isAllowHorizontalScroll, isHideHead, hasPinnedColumns, contentStateProps, rowHoverProps, containerRef, sections, isNoData, isMobile, mobileSkeletonProps, isLoading, containerCssVars, hasGroupedColumns, gridViewMode, mobileDisplayVariant, isSelfContained, } = (0, useLogic_1.useLogic)(props);
|
|
55
63
|
const { emptySymbol } = (0, react_1.useContext)(ConfigProvider_1.ConfigContext);
|
|
56
|
-
const { columns, selectedRows = [], minDisplayRows =
|
|
64
|
+
const { columns, selectedRows = [], minDisplayRows = constants_2.MIN_DISPLAY_ROWS_BY_DEFAULT, variant = enums_1.Variant.Tree, footer, noDataPlaceholder, subrows, keyId, activeRowId, emptyCellValue = emptySymbol, onRowClick, noDataOptions, headPreAddon, isTabularNums, renderRow, } = props;
|
|
57
65
|
const { moreButtonColumnPosition = 1, isVisibleCollapseButton = true } = subrows || {};
|
|
58
|
-
const { isInitialExpanded = false, expandedLevel =
|
|
66
|
+
const { isInitialExpanded = false, expandedLevel = constants_2.EXPANDED_LEVEL_BY_DEFAULT, initialVisibleChildrenCount = constants_2.INITIAL_OPENED_NESTED_CHILDREN_COUNT_BY_DEFAULT, } = treeRenderConfig || {};
|
|
59
67
|
const Wrapper = isDataGridDisabled
|
|
60
68
|
? styles_1.DisabledDataGridWrapper
|
|
61
69
|
: styles_1.DataGridWrapper;
|
|
@@ -81,10 +89,11 @@ const DataGrid = (props) => {
|
|
|
81
89
|
noDataPlaceholder: renderedPlaceholder(),
|
|
82
90
|
onRowClick,
|
|
83
91
|
...rowHoverProps,
|
|
92
|
+
renderRow,
|
|
84
93
|
};
|
|
85
94
|
const renderTableContent = () => {
|
|
86
95
|
if (!hasPinnedColumns || isMobile) {
|
|
87
|
-
return ((0, jsx_runtime_1.jsxs)(Wrapper, { ...(0, getInertProps_1.getInertProps)(isDataGridDisabled), className:
|
|
96
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper, { ...(0, getInertProps_1.getInertProps)(isDataGridDisabled), className: constants_2.dataGridClassnames.wrapper, children: [headPreAddon, !isHideHead && ((0, jsx_runtime_1.jsx)(Head_1.Head, { ...headProps, columns: headColumns, gridColumns: gridColumns })), (0, jsx_runtime_1.jsx)(ContentState_1.ContentState, { ...contentStateProps, loadingContent: isMobile && (0, jsx_runtime_1.jsx)(MobileSkeleton_1.MobileSkeleton, { ...mobileSkeletonProps }), children: (0, jsx_runtime_1.jsx)(Body_1.Body, { ...commonBodyProps, activeRowId: activeRowId, columns: columns, gridColumns: gridColumns, className: bodyCva({
|
|
88
97
|
isNoData,
|
|
89
98
|
}) }) })] }));
|
|
90
99
|
}
|
|
@@ -92,11 +101,13 @@ const DataGrid = (props) => {
|
|
|
92
101
|
isDisabled: isDataGridDisabled,
|
|
93
102
|
}), isDisabled: isDataGridDisabled, headProps: headProps, gridColumns: gridColumns, bodyProps: commonBodyProps, isNoData: isNoData }) }));
|
|
94
103
|
};
|
|
95
|
-
return ((0, jsx_runtime_1.jsx)(DataGridContext_1.DataGridContextProvider, { isLoading: isLoading, isTabularNums: isTabularNums, children: (0, jsx_runtime_1.jsxs)(styles_1.Container, { ref: containerRef, style: containerCssVars, className: (0, classNames_1.classNames)(dataGridClassName, dataGridCva({
|
|
104
|
+
return ((0, jsx_runtime_1.jsx)(DataGridContext_1.DataGridContextProvider, { isLoading: isLoading, isTabularNums: isTabularNums, gridColumns: gridColumns, emptyCellValue: emptyCellValue, activeRowId: activeRowId, keyId: keyId, columns: columns, onRowClick: onRowClick, mobileDisplayVariant: mobileDisplayVariant, children: (0, jsx_runtime_1.jsxs)(styles_1.Container, { ref: containerRef, style: containerCssVars, className: (0, classNames_1.classNames)(dataGridClassName, dataGridCva({
|
|
96
105
|
isAllowHorizontalScroll,
|
|
97
106
|
hasPinnedColumns,
|
|
98
107
|
gridViewMode,
|
|
99
108
|
hasGroupedColumns,
|
|
109
|
+
mobileDisplayVariant,
|
|
110
|
+
isSelfContained,
|
|
100
111
|
})), children: [renderTableContent(), (0, jsx_runtime_1.jsx)(Loader_1.Loader, { ...loaderProps }), footer && footer] }) }));
|
|
101
112
|
};
|
|
102
113
|
exports.DataGrid = DataGrid;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type DataGridColumns } from '../types';
|
|
2
3
|
export type DataGridContextProps = {
|
|
3
|
-
checkIsOpened: (key: string) => boolean;
|
|
4
|
-
checkIsMoreOpened: (key: string) => boolean;
|
|
5
|
-
toggleOpenItems: (key: string) => void;
|
|
6
|
-
toggleOpenMoreItems: (key: string) => void;
|
|
7
4
|
isLoading?: boolean;
|
|
8
5
|
isTabularNums?: boolean;
|
|
6
|
+
gridColumns: string;
|
|
7
|
+
emptyCellValue: ReactNode;
|
|
8
|
+
activeRowId?: string;
|
|
9
|
+
keyId: unknown;
|
|
10
|
+
columns: DataGridColumns<Record<string, unknown>>[];
|
|
11
|
+
onRowClick?: (row: Record<string, unknown>) => void;
|
|
12
|
+
mobileDisplayVariant?: 'list' | 'cards';
|
|
9
13
|
};
|
|
10
14
|
export declare const DataGridContext: import("react").Context<DataGridContextProps>;
|
|
@@ -3,10 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DataGridContext = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
exports.DataGridContext = (0, react_1.createContext)({
|
|
6
|
-
checkIsOpened: () => false,
|
|
7
|
-
checkIsMoreOpened: () => false,
|
|
8
|
-
toggleOpenItems: () => undefined,
|
|
9
|
-
toggleOpenMoreItems: () => undefined,
|
|
10
6
|
isLoading: false,
|
|
11
7
|
isTabularNums: false,
|
|
8
|
+
gridColumns: '',
|
|
9
|
+
emptyCellValue: '',
|
|
10
|
+
activeRowId: '',
|
|
11
|
+
keyId: '',
|
|
12
|
+
columns: [],
|
|
13
|
+
onRowClick: () => undefined,
|
|
14
|
+
mobileDisplayVariant: 'list',
|
|
12
15
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
isTabularNums?: boolean;
|
|
2
|
+
import { type DataGridContextProps } from '../DataGridContext';
|
|
3
|
+
type DataGridContextProviderProps = Pick<DataGridContextProps, 'isLoading' | 'isTabularNums' | 'gridColumns' | 'emptyCellValue' | 'activeRowId' | 'keyId' | 'columns' | 'onRowClick' | 'mobileDisplayVariant'> & {
|
|
5
4
|
children: ReactNode;
|
|
6
5
|
};
|
|
7
|
-
export declare const DataGridContextProvider: ({ isLoading, isTabularNums, children, }: DataGridContextProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const DataGridContextProvider: ({ isLoading, isTabularNums, gridColumns, emptyCellValue, activeRowId, children, keyId, columns, onRowClick, mobileDisplayVariant, }: DataGridContextProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -3,60 +3,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DataGridContextProvider = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const DataGridStorageContext_1 = require("../../DataGridStorageContext");
|
|
6
7
|
const DataGridContext_1 = require("../DataGridContext");
|
|
7
|
-
const
|
|
8
|
-
isOpenedItems: true,
|
|
9
|
-
iOpenedMoreItems: false,
|
|
10
|
-
};
|
|
11
|
-
const DataGridContextProvider = ({ isLoading, isTabularNums, children, }) => {
|
|
12
|
-
const [openedItems, setOpenedItems] = (0, react_1.useState)({});
|
|
13
|
-
const checkIsOpened = (0, react_1.useCallback)((key) => {
|
|
14
|
-
if (openedItems[key]) {
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
return false;
|
|
18
|
-
}, [openedItems]);
|
|
19
|
-
const checkIsMoreOpened = (0, react_1.useCallback)((key) => {
|
|
20
|
-
if (openedItems[key]) {
|
|
21
|
-
return openedItems[key].iOpenedMoreItems;
|
|
22
|
-
}
|
|
23
|
-
return false;
|
|
24
|
-
}, [openedItems]);
|
|
25
|
-
const toggleOpenItems = (0, react_1.useCallback)((key) => setOpenedItems((currentOpenedItems) => {
|
|
26
|
-
if (checkIsOpened(key)) {
|
|
27
|
-
const newOpenedItems = { ...currentOpenedItems };
|
|
28
|
-
delete newOpenedItems[key];
|
|
29
|
-
return newOpenedItems;
|
|
30
|
-
}
|
|
31
|
-
return { ...currentOpenedItems, [key]: ROW_FLAGS_BY_DEFAULT };
|
|
32
|
-
}), [openedItems]);
|
|
33
|
-
const toggleOpenMoreItems = (0, react_1.useCallback)((key) => setOpenedItems((currentOpenedItems) => {
|
|
34
|
-
if (checkIsMoreOpened(key)) {
|
|
35
|
-
const newOpenedItems = { ...currentOpenedItems };
|
|
36
|
-
newOpenedItems[key] = ROW_FLAGS_BY_DEFAULT;
|
|
37
|
-
return newOpenedItems;
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
...currentOpenedItems,
|
|
41
|
-
[key]: { ...ROW_FLAGS_BY_DEFAULT, iOpenedMoreItems: true },
|
|
42
|
-
};
|
|
43
|
-
}), [openedItems]);
|
|
8
|
+
const DataGridContextProvider = ({ isLoading, isTabularNums, gridColumns, emptyCellValue, activeRowId, children, keyId, columns, onRowClick, mobileDisplayVariant, }) => {
|
|
44
9
|
const contextValue = (0, react_1.useMemo)(() => ({
|
|
45
|
-
checkIsOpened,
|
|
46
|
-
checkIsMoreOpened,
|
|
47
|
-
toggleOpenItems,
|
|
48
|
-
toggleOpenMoreItems,
|
|
49
10
|
isLoading,
|
|
50
11
|
isTabularNums,
|
|
12
|
+
gridColumns,
|
|
13
|
+
emptyCellValue,
|
|
14
|
+
activeRowId,
|
|
15
|
+
keyId,
|
|
16
|
+
columns,
|
|
17
|
+
onRowClick,
|
|
18
|
+
mobileDisplayVariant,
|
|
51
19
|
}), [
|
|
52
|
-
checkIsOpened,
|
|
53
|
-
checkIsMoreOpened,
|
|
54
|
-
toggleOpenItems,
|
|
55
|
-
toggleOpenMoreItems,
|
|
56
20
|
isLoading,
|
|
57
|
-
openedItems,
|
|
58
21
|
isTabularNums,
|
|
22
|
+
gridColumns,
|
|
23
|
+
emptyCellValue,
|
|
24
|
+
activeRowId,
|
|
25
|
+
keyId,
|
|
26
|
+
columns,
|
|
27
|
+
onRowClick,
|
|
28
|
+
mobileDisplayVariant,
|
|
59
29
|
]);
|
|
60
|
-
return ((0, jsx_runtime_1.jsx)(DataGridContext_1.DataGridContext.Provider, { value: contextValue, children: children }));
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(DataGridContext_1.DataGridContext.Provider, { value: contextValue, children: (0, jsx_runtime_1.jsx)(DataGridStorageContext_1.DataGridStorageProvider, { children: children }) }));
|
|
61
31
|
};
|
|
62
32
|
exports.DataGridContextProvider = DataGridContextProvider;
|