@astral/ui 4.74.0 → 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/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/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,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DataGridStorageProvider"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DataGridStorageContext"), exports);
|
|
18
|
+
__exportStar(require("./DataGridStorageProvider"), exports);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
type MobileSkeletonProps = {
|
|
2
2
|
cellsCount: number;
|
|
3
3
|
rowsCount: number;
|
|
4
|
+
mobileDisplayVariant: 'cards' | 'list';
|
|
4
5
|
};
|
|
5
|
-
export declare const MobileSkeleton: ({ cellsCount, rowsCount, }: MobileSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const MobileSkeleton: ({ cellsCount, mobileDisplayVariant, rowsCount, }: MobileSkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -3,11 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MobileSkeleton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Skeleton_1 = require("../../Skeleton");
|
|
6
|
+
const cva_1 = require("../../utils/cva");
|
|
7
|
+
const constants_1 = require("../constants");
|
|
6
8
|
const styles_1 = require("./styles");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
+
const rootCva = (0, cva_1.cva)(constants_1.dataGridSkeletonClassnames.list, {
|
|
10
|
+
variants: {
|
|
11
|
+
mobileDisplayVariant: {
|
|
12
|
+
cards: constants_1.dataGridClassnames.mobileVariantCards,
|
|
13
|
+
list: constants_1.dataGridClassnames.mobileVariantList,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
const itemCva = (0, cva_1.cva)(constants_1.dataGridSkeletonClassnames.item, {
|
|
18
|
+
variants: {
|
|
19
|
+
mobileDisplayVariant: {
|
|
20
|
+
cards: constants_1.dataGridClassnames.mobileVariantCards,
|
|
21
|
+
list: constants_1.dataGridClassnames.mobileVariantList,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
const MobileSkeleton = ({ cellsCount, mobileDisplayVariant, rowsCount, }) => {
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Root, { className: rootCva({ mobileDisplayVariant }), children: Array.from({ length: rowsCount }, (_, rowIndex) => ((0, jsx_runtime_1.jsxs)(styles_1.RowWrapper
|
|
9
27
|
// biome-ignore lint/suspicious/noArrayIndexKey: Статичный скелетон
|
|
10
|
-
, { children: [Array.from({ length: cellsCount - 1 }, (_cell, cellIndex) => (
|
|
28
|
+
, { className: itemCva({ mobileDisplayVariant }), children: [Array.from({ length: cellsCount - 1 }, (_cell, cellIndex) => (
|
|
11
29
|
// biome-ignore lint/suspicious/noArrayIndexKey: Статичный скелетон
|
|
12
30
|
(0, jsx_runtime_1.jsxs)(styles_1.Cell, { children: [(0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { variant: "rounded", height: 20 }), (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { variant: "rounded", height: 16, width: "50%" })] }, cellIndex))), (0, jsx_runtime_1.jsx)(styles_1.Actions, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { variant: "rounded", width: "100%", height: 40 }) })] }, rowIndex))) }));
|
|
13
31
|
};
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Actions = exports.Cell = exports.RowWrapper = exports.Root = void 0;
|
|
4
4
|
const styled_1 = require("../../styled");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
5
6
|
exports.Root = styled_1.styled.div `
|
|
6
7
|
display: flex;
|
|
7
8
|
flex-direction: column;
|
|
8
9
|
|
|
9
10
|
width: 100%;
|
|
11
|
+
|
|
12
|
+
&.${constants_1.dataGridClassnames.mobileVariantCards} {
|
|
13
|
+
gap: ${({ theme }) => theme.spacing(2)};
|
|
14
|
+
}
|
|
10
15
|
`;
|
|
11
16
|
exports.RowWrapper = styled_1.styled.div `
|
|
12
17
|
display: flex;
|
|
@@ -27,6 +32,13 @@ exports.RowWrapper = styled_1.styled.div `
|
|
|
27
32
|
&:last-of-type {
|
|
28
33
|
padding-bottom: 0;
|
|
29
34
|
}
|
|
35
|
+
|
|
36
|
+
&.${constants_1.dataGridClassnames.mobileVariantCards} {
|
|
37
|
+
padding: ${({ theme }) => theme.spacing(5, 4, 4)};
|
|
38
|
+
|
|
39
|
+
border: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
40
|
+
border-radius: ${({ theme }) => theme.shape.medium};
|
|
41
|
+
}
|
|
30
42
|
`;
|
|
31
43
|
exports.Cell = styled_1.styled.div `
|
|
32
44
|
display: flex;
|
|
@@ -16,10 +16,6 @@ export type NestedChildrenProps<TData extends Record<string, CellValue>> = {
|
|
|
16
16
|
* Поле, которое будет использоваться в качестве ключа
|
|
17
17
|
*/
|
|
18
18
|
keyId: keyof TData;
|
|
19
|
-
/**
|
|
20
|
-
* Идентификатор строки
|
|
21
|
-
*/
|
|
22
|
-
rowId: string;
|
|
23
19
|
/**
|
|
24
20
|
* Вариант отображения вложенных элементов
|
|
25
21
|
*/
|
|
@@ -52,4 +48,4 @@ export type NestedChildrenProps<TData extends Record<string, CellValue>> = {
|
|
|
52
48
|
className?: string;
|
|
53
49
|
}) => ReactElement;
|
|
54
50
|
};
|
|
55
|
-
export declare const NestedChildren:
|
|
51
|
+
export declare const NestedChildren: <TData extends Record<string, unknown>>(props: NestedChildrenProps<TData>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,18 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NestedChildren = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
5
|
const Collapse_1 = require("../../../Collapse");
|
|
6
|
+
const cva_1 = require("../../../utils/cva");
|
|
7
7
|
const constants_1 = require("../constants");
|
|
8
|
+
const constants_2 = require("./constants");
|
|
8
9
|
const styles_1 = require("./styles");
|
|
9
10
|
const useLogic_1 = require("./useLogic");
|
|
10
|
-
|
|
11
|
+
const rootCva = (0, cva_1.cva)(constants_2.nestedChildrenClassnames.root, {
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
subrows: constants_2.nestedChildrenClassnames.variantSubrows,
|
|
15
|
+
tree: constants_2.nestedChildrenClassnames.variantTree,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
const NestedChildren = (props) => {
|
|
11
20
|
const { isShowAllChildren, isShowMoreButton, isShowConnector, nextLevel, initialVisibleChildren, otherChildren, handleToggleShowAllChildren, } = (0, useLogic_1.useLogic)(props);
|
|
12
|
-
const { isOpen, data, keyId, level, gridColumns, moreButtonColumnPosition, renderRow, } = props;
|
|
21
|
+
const { isOpen, data, keyId, level, gridColumns, moreButtonColumnPosition, renderRow, variant, } = props;
|
|
13
22
|
if (!data || !data.length) {
|
|
14
23
|
return null;
|
|
15
24
|
}
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(Collapse_1.Collapse, { in: isOpen, unmountOnExit: true, children: (0, jsx_runtime_1.jsxs)(styles_1.NestedRows, { "$level": level, "$isShowConnector": isShowConnector, children: [initialVisibleChildren.map(({ children, options, ...nestedRow }) => {
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(Collapse_1.Collapse, { in: isOpen, unmountOnExit: true, children: (0, jsx_runtime_1.jsxs)(styles_1.NestedRows, { "$level": level, "$isShowConnector": isShowConnector, className: rootCva({ variant }), children: [initialVisibleChildren.map(({ children, options, ...nestedRow }) => {
|
|
17
26
|
const nestedRowId = nestedRow[keyId];
|
|
18
27
|
return renderRow({
|
|
19
28
|
key: nestedRowId,
|
|
@@ -21,8 +30,9 @@ exports.NestedChildren = (0, react_1.memo)((props) => {
|
|
|
21
30
|
options,
|
|
22
31
|
nestedChildren: children,
|
|
23
32
|
level: nextLevel,
|
|
33
|
+
className: constants_1.dataGridRowClassnames.nestedChildren,
|
|
24
34
|
});
|
|
25
|
-
}), isOpen && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Collapse_1.Collapse, { in: isShowAllChildren, component: "li", unmountOnExit: true, children: (0, jsx_runtime_1.jsx)(styles_1.NestedRows, { "$level": level, "$isShowConnector": isShowConnector, children: otherChildren.map(({ children, options, ...nestedRow }) => {
|
|
35
|
+
}), isOpen && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Collapse_1.Collapse, { in: isShowAllChildren, component: "li", unmountOnExit: true, children: (0, jsx_runtime_1.jsx)(styles_1.NestedRows, { "$level": level, "$isShowConnector": isShowConnector, className: constants_2.nestedChildrenClassnames.additionalRows, children: otherChildren.map(({ children, options, ...nestedRow }) => {
|
|
26
36
|
const nestedRowId = nestedRow[keyId];
|
|
27
37
|
return renderRow({
|
|
28
38
|
key: nestedRowId,
|
|
@@ -30,7 +40,8 @@ exports.NestedChildren = (0, react_1.memo)((props) => {
|
|
|
30
40
|
options,
|
|
31
41
|
nestedChildren: children,
|
|
32
42
|
level: nextLevel,
|
|
33
|
-
className: constants_1.dataGridRowClassnames.hidden
|
|
43
|
+
className: `${constants_1.dataGridRowClassnames.hidden} ${constants_1.dataGridRowClassnames.nestedChildren}`,
|
|
34
44
|
});
|
|
35
45
|
}) }) }), isShowMoreButton && ((0, jsx_runtime_1.jsx)(styles_1.MoreButtonRow, { "$level": nextLevel, "$isShowConnector": isShowConnector, "$gridColumns": gridColumns, children: (0, jsx_runtime_1.jsx)(styles_1.MoreButton, { "$moreButtonColumnPosition": moreButtonColumnPosition, variant: "link", onClick: handleToggleShowAllChildren, children: isShowAllChildren ? 'Скрыть' : 'Показать все' }) }))] }))] }) }));
|
|
36
|
-
}
|
|
46
|
+
};
|
|
47
|
+
exports.NestedChildren = NestedChildren;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nestedChildrenClassnames = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../../../utils/createUIKitClassname");
|
|
5
|
+
exports.nestedChildrenClassnames = {
|
|
6
|
+
root: (0, createUIKitClassname_1.createUIKitClassname)('data-grid-nested-rows'),
|
|
7
|
+
additionalRows: (0, createUIKitClassname_1.createUIKitClassname)('data-grid-nested-rows__additional-rows'),
|
|
8
|
+
variantSubrows: (0, createUIKitClassname_1.createUIKitClassname)('data-grid-nested-rows_variant-subrows'),
|
|
9
|
+
variantTree: (0, createUIKitClassname_1.createUIKitClassname)('data-grid-nested-rows_variant-tree'),
|
|
10
|
+
};
|
|
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MoreButton = exports.MoreButtonRow = exports.NestedRows = void 0;
|
|
4
4
|
const Button_1 = require("../../../Button");
|
|
5
5
|
const styled_1 = require("../../../styled");
|
|
6
|
+
const Cell_1 = require("../../Cell");
|
|
6
7
|
const constants_1 = require("../../constants");
|
|
8
|
+
const constants_2 = require("../constants");
|
|
9
|
+
const constants_3 = require("./constants");
|
|
7
10
|
exports.NestedRows = (0, styled_1.styled)('ul', {
|
|
8
11
|
shouldForwardProp: (prop) => !['$level', '$isShowConnector'].includes(prop),
|
|
9
12
|
}) `
|
|
@@ -30,9 +33,26 @@ exports.NestedRows = (0, styled_1.styled)('ul', {
|
|
|
30
33
|
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
/* TODO: Убрать после реализации задачи по адаптации вложенных строк https://track.astral.ru/soft/browse/UIKIT-2188 */
|
|
34
36
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
35
|
-
|
|
37
|
+
&::before {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
&.${constants_3.nestedChildrenClassnames.variantSubrows} .${Cell_1.dataGridCellClassnames.root}:first-of-type {
|
|
41
|
+
display: none;
|
|
42
|
+
|
|
43
|
+
& + .${Cell_1.dataGridCellClassnames.root} {
|
|
44
|
+
margin-top: 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
& .${Cell_1.dataGridCellClassnames.actionColumn} {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Высота последнего декоративного элемента полная тк у AdditionalRows есть кнопка "Показать все/Скрыть" */
|
|
53
|
+
&.${constants_3.nestedChildrenClassnames.additionalRows} .${constants_2.dataGridRowClassnames.nestedChildren}:last-of-type::before {
|
|
54
|
+
height: 100%;
|
|
55
|
+
}
|
|
36
56
|
}
|
|
37
57
|
`;
|
|
38
58
|
exports.MoreButtonRow = (0, styled_1.styled)('li', {
|
|
@@ -62,6 +82,21 @@ exports.MoreButtonRow = (0, styled_1.styled)('li', {
|
|
|
62
82
|
border-left: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
63
83
|
border-radius: 0 0 0 ${({ theme }) => theme.shape.small};
|
|
64
84
|
}
|
|
85
|
+
|
|
86
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
87
|
+
/* 20px колонка под декоративный элемент рядом с кнопкой "Показать все/Скрыть" */
|
|
88
|
+
grid-template-columns: 20px auto;
|
|
89
|
+
|
|
90
|
+
height: 40px;
|
|
91
|
+
|
|
92
|
+
&::before {
|
|
93
|
+
left: 0;
|
|
94
|
+
|
|
95
|
+
display: block;
|
|
96
|
+
|
|
97
|
+
width: ${constants_1.MOBILE_TREE_LINE_WIDTH}px;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
65
100
|
`;
|
|
66
101
|
exports.MoreButton = (0, styled_1.styled)(Button_1.Button, {
|
|
67
102
|
shouldForwardProp: (prop) => !['$moreButtonColumnPosition'].includes(prop),
|
|
@@ -70,4 +105,8 @@ exports.MoreButton = (0, styled_1.styled)(Button_1.Button, {
|
|
|
70
105
|
justify-self: start;
|
|
71
106
|
|
|
72
107
|
margin: ${({ theme }) => theme.spacing(0, 2)};
|
|
108
|
+
|
|
109
|
+
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
110
|
+
margin: 0;
|
|
111
|
+
}
|
|
73
112
|
`;
|
|
@@ -2,7 +2,7 @@ import { type MouseEvent } from 'react';
|
|
|
2
2
|
import type { CellValue } from '../../../types';
|
|
3
3
|
import { type NestedChildrenProps } from '../NestedChildren';
|
|
4
4
|
type UseLogicParams<TData extends Record<string, CellValue>> = NestedChildrenProps<TData>;
|
|
5
|
-
export declare const useLogic: <TData extends Record<string, unknown>>({
|
|
5
|
+
export declare const useLogic: <TData extends Record<string, unknown>>({ data, level, variant, initialVisibleChildrenCount, }: UseLogicParams<TData>) => {
|
|
6
6
|
isShowAllChildren: boolean;
|
|
7
7
|
isShowMoreButton: boolean;
|
|
8
8
|
isShowConnector: boolean;
|
|
@@ -2,19 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const DataGridContext_1 = require("../../../DataGridContext");
|
|
6
5
|
const enums_1 = require("../../../enums");
|
|
7
|
-
const useLogic = ({
|
|
8
|
-
const { checkIsMoreOpened, toggleOpenMoreItems } = (0, react_1.useContext)(DataGridContext_1.DataGridContext);
|
|
6
|
+
const useLogic = ({ data, level, variant, initialVisibleChildrenCount, }) => {
|
|
9
7
|
const isTreeVariant = Object.is(variant, enums_1.Variant.Tree);
|
|
10
8
|
const nextLevel = isTreeVariant ? level + 1 : 0;
|
|
11
9
|
const initialVisibleChildren = data?.slice(0, initialVisibleChildrenCount);
|
|
12
10
|
const otherChildren = data?.slice(initialVisibleChildrenCount);
|
|
13
|
-
const isShowAllChildren =
|
|
11
|
+
const [isShowAllChildren, setIsShowAllChildren] = (0, react_1.useState)(false);
|
|
14
12
|
const isShowMoreButton = Boolean(otherChildren?.length);
|
|
15
13
|
const handleToggleShowAllChildren = (event) => {
|
|
16
14
|
event.stopPropagation();
|
|
17
|
-
|
|
15
|
+
setIsShowAllChildren((prev) => !prev);
|
|
18
16
|
};
|
|
19
17
|
return {
|
|
20
18
|
isShowAllChildren,
|
|
@@ -6,7 +6,6 @@ const react_1 = require("react");
|
|
|
6
6
|
const BottomDrawer_1 = require("../../BottomDrawer");
|
|
7
7
|
const Checkbox_1 = require("../../Checkbox");
|
|
8
8
|
const Tooltip_1 = require("../../Tooltip");
|
|
9
|
-
const checkIsDeepEqual_1 = require("../../utils/checkIsDeepEqual");
|
|
10
9
|
const classNames_1 = require("../../utils/classNames");
|
|
11
10
|
const cva_1 = require("../../utils/cva");
|
|
12
11
|
const getInertProps_1 = require("../../utils/getInertProps");
|
|
@@ -22,6 +21,13 @@ const rootCva = (0, cva_1.cva)(constants_1.dataGridRowClassnames.root, {
|
|
|
22
21
|
isShowConnector: {
|
|
23
22
|
true: constants_1.dataGridRowClassnames.showConnector,
|
|
24
23
|
},
|
|
24
|
+
mobileDisplayVariant: {
|
|
25
|
+
cards: constants_1.dataGridRowClassnames.mobileVariantCards,
|
|
26
|
+
list: constants_1.dataGridRowClassnames.mobileVariantList,
|
|
27
|
+
},
|
|
28
|
+
hasNestedChildren: {
|
|
29
|
+
true: constants_1.dataGridRowClassnames.hasNestedChildren,
|
|
30
|
+
},
|
|
25
31
|
},
|
|
26
32
|
});
|
|
27
33
|
const rowContentCva = (0, cva_1.cva)(constants_1.dataGridRowContentClassnames.root, {
|
|
@@ -41,9 +47,21 @@ const groupedColumnLabelCva = (0, cva_1.cva)(constants_1.dataGridGroupedColumnLa
|
|
|
41
47
|
},
|
|
42
48
|
},
|
|
43
49
|
});
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
const singleCellCva = (0, cva_1.cva)(constants_1.dataGridRowCellClassnames.single, {
|
|
51
|
+
variants: {
|
|
52
|
+
isFirstCell: {
|
|
53
|
+
true: constants_1.dataGridRowCellClassnames.firstCell,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated Компонент Row устарел и будет удалён в будущих версиях.
|
|
59
|
+
* DataGrid переходит на модель кастомизации строк через параметр `renderRow`,
|
|
60
|
+
* который позволяет полностью контролировать рендер каждой строки.
|
|
61
|
+
*/
|
|
62
|
+
const RowInner = (props) => {
|
|
63
|
+
const { isOpen, isShowConnector, childrenColumns, rowId, handleToggle, checkboxProps, rowProps, isHovered, tooltipProps, nestedChildrenProps, disabled, isRenderCollapseButton, rowRef, rowStyles, drawerProps, disabledReasonText, isActive, isSelectable, mobileDisplayVariant, rootRowElement, rootRowRef, } = (0, useLogic_1.useLogic)(props);
|
|
64
|
+
const { className, row, options, variant, gridColumns, isInitialExpanded, expandedLevel, level, nestedChildren, initialVisibleChildrenCount, moreButtonColumnPosition, isVisibleCollapseButton, columns, emptyCellValue, activeRowId, keyId, onSelectRow, onRowClick, sectionOffset, totalColumnsCount, registerRowElement, unregisterRowElement, onRowEnter, onRowLeave, style,
|
|
47
65
|
// В этот rest-оператор попадают специфичные пропсы (атрибуты) virtuoso
|
|
48
66
|
// Необходимы для DataGridInfinite
|
|
49
67
|
...selfProps } = props;
|
|
@@ -71,24 +89,25 @@ const RowComponent = (props) => {
|
|
|
71
89
|
}), children: label }), children.map((child, childIndex) => {
|
|
72
90
|
const childCellId = `${cellId}-${childIndex}`;
|
|
73
91
|
const shouldRenderStartAdornment = isFirstCell && childIndex === 0;
|
|
74
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.CellStyled, { row: row, cell: child, isHideOnMobile: isHideOnMobile, emptyCellValue: emptyCellValue, isDisabled: isDisabledCell, startAdornment: shouldRenderStartAdornment && renderStartAdornment(), isHidePersonalData: child.isHidePersonalData, className: Cell_1.dataGridCellClassnames.grouped }, childCellId));
|
|
92
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.CellStyled, { row: row, cell: child, isHideOnMobile: isHideOnMobile, emptyCellValue: emptyCellValue, isDisabled: isDisabledCell, startAdornment: shouldRenderStartAdornment && renderStartAdornment(), isHidePersonalData: child.isHidePersonalData, hasNestedChildren: Boolean(nestedChildren?.length), className: (0, classNames_1.classNames)(Cell_1.dataGridCellClassnames.grouped), rootRowElement: rootRowElement }, childCellId));
|
|
75
93
|
})] }, cellId));
|
|
76
94
|
}
|
|
77
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.CellStyled, { row: row, cell: cell, emptyCellValue: emptyCellValue, startAdornment: isFirstCell && renderStartAdornment(), isDisabled: isDisabledCell, isHidePersonalData: cell.isHidePersonalData }, cellId));
|
|
95
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.CellStyled, { className: singleCellCva({ isFirstCell }), row: row, cell: cell, emptyCellValue: emptyCellValue, startAdornment: isFirstCell && renderStartAdornment(), isDisabled: isDisabledCell, isHidePersonalData: cell.isHidePersonalData, hasNestedChildren: Boolean(nestedChildren?.length), rootRowElement: rootRowElement }, cellId));
|
|
78
96
|
});
|
|
79
97
|
}, [
|
|
98
|
+
row,
|
|
80
99
|
isOpen,
|
|
81
100
|
columns,
|
|
82
101
|
disabled,
|
|
83
102
|
checkboxProps.checked,
|
|
84
103
|
totalColumnsCount,
|
|
85
104
|
sectionOffset,
|
|
105
|
+
rootRowElement,
|
|
86
106
|
]);
|
|
87
|
-
const renderRow = (0, react_1.useCallback)(({ key, ...nestedRowProps }) => ((0, jsx_runtime_1.jsx)(
|
|
107
|
+
const renderRow = (0, react_1.useCallback)(({ key, ...nestedRowProps }) => ((0, jsx_runtime_1.jsx)(RowInner, { keyId: keyId, ...nestedRowProps, variant: variant, isSelectable: isSelectable, gridColumns: gridColumns, isInitialExpanded: isInitialExpanded, expandedLevel: expandedLevel, initialVisibleChildrenCount: initialVisibleChildrenCount, moreButtonColumnPosition: moreButtonColumnPosition, isVisibleCollapseButton: isVisibleCollapseButton, activeRowId: activeRowId, columns: childrenColumns, onSelectRow: onSelectRow, onRowClick: onRowClick, totalColumnsCount: totalColumnsCount, registerRowElement: registerRowElement, unregisterRowElement: unregisterRowElement, onRowEnter: onRowEnter, onRowLeave: onRowLeave, sectionOffset: sectionOffset }, key)), [
|
|
88
108
|
keyId,
|
|
89
109
|
variant,
|
|
90
110
|
isSelectable,
|
|
91
|
-
selectedRows,
|
|
92
111
|
gridColumns,
|
|
93
112
|
isInitialExpanded,
|
|
94
113
|
expandedLevel,
|
|
@@ -105,32 +124,10 @@ const RowComponent = (props) => {
|
|
|
105
124
|
onRowEnter,
|
|
106
125
|
onRowLeave,
|
|
107
126
|
]);
|
|
108
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, classNames_1.classNames)(className, rootCva({
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
};
|
|
113
|
-
const arePropsEqual = (prevProps, nextProps) => {
|
|
114
|
-
const deepEqualityProps = new Set(['row']);
|
|
115
|
-
// Список пропсов, которые нужно игнорировать при сравнении
|
|
116
|
-
const skipProps = new Set([
|
|
117
|
-
'selectedRows',
|
|
118
|
-
'onSelectRow',
|
|
119
|
-
'columns',
|
|
120
|
-
]);
|
|
121
|
-
const keys = Object.keys(prevProps);
|
|
122
|
-
return keys.every((key) => {
|
|
123
|
-
const typedKey = key;
|
|
124
|
-
// Не сравниваем свойства, которые нужно пропустить
|
|
125
|
-
if (skipProps.has(typedKey)) {
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
const prevValue = prevProps[typedKey];
|
|
129
|
-
const nextValue = nextProps[typedKey];
|
|
130
|
-
if (deepEqualityProps.has(typedKey)) {
|
|
131
|
-
return (0, checkIsDeepEqual_1.checkIsDeepEqual)(prevValue, nextValue);
|
|
132
|
-
}
|
|
133
|
-
return prevValue === nextValue;
|
|
134
|
-
});
|
|
127
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, classNames_1.classNames)(className, rootCva({
|
|
128
|
+
isShowConnector,
|
|
129
|
+
mobileDisplayVariant,
|
|
130
|
+
hasNestedChildren: Boolean(nestedChildren?.length),
|
|
131
|
+
})), style: rowStyles, ...selfProps, ref: rootRowRef, children: [(0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { followCursor: true, arrow: false, ...tooltipProps, children: (0, jsx_runtime_1.jsx)(styles_1.ContentWrapper, { "data-row-id": rowId, ref: rowRef, onPointerEnter: () => onRowEnter?.(rowId), onPointerLeave: (event) => onRowLeave?.(rowId, event.nativeEvent), className: rowContentCva({ isHovered, isActive }), "$gridColumns": gridColumns, [constants_1.DISABLE_ROW_ATTR]: disabled, ...rowProps, children: renderCells() }) }), (0, jsx_runtime_1.jsx)(NestedChildren_1.NestedChildren, { ...nestedChildrenProps, data: nestedChildren, keyId: keyId, level: level, variant: variant, gridColumns: gridColumns, initialVisibleChildrenCount: initialVisibleChildrenCount, moreButtonColumnPosition: moreButtonColumnPosition, renderRow: renderRow }), (0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { ...drawerProps, children: (0, jsx_runtime_1.jsx)(styles_1.BottomDrawerContent, { children: disabledReasonText }) })] }, `row-${rowId}`));
|
|
135
132
|
};
|
|
136
|
-
exports.Row = (0, react_1.memo)(
|
|
133
|
+
exports.Row = (0, react_1.memo)(RowInner);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ChangeEvent } from 'react';
|
|
2
2
|
export type RowContextProps = {
|
|
3
3
|
isDisabled: boolean;
|
|
4
|
+
isSelectable?: boolean;
|
|
4
5
|
disabledReason?: string;
|
|
5
6
|
addDisabledRow: (disabledReason?: string) => void;
|
|
6
7
|
removeDisabledRow: () => void;
|
|
8
|
+
row: Record<string, unknown>;
|
|
9
|
+
onSelectRow: (row: Record<string, unknown>) => (event: ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
onRowEnter?: (rowId: string) => void;
|
|
11
|
+
onRowLeave?: (rowId: string, event: PointerEvent) => void;
|
|
12
|
+
registerRowElement?: (rowId: string, el: HTMLElement) => void;
|
|
13
|
+
unregisterRowElement?: (rowId: string, el: HTMLElement) => void;
|
|
14
|
+
itemProps?: object;
|
|
15
|
+
isSelected?: boolean;
|
|
7
16
|
};
|
|
8
17
|
export declare const RowContext: import("react").Context<RowContextProps>;
|
|
@@ -4,6 +4,15 @@ exports.RowContext = void 0;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
exports.RowContext = (0, react_1.createContext)({
|
|
6
6
|
isDisabled: false,
|
|
7
|
+
isSelectable: false,
|
|
7
8
|
addDisabledRow: () => undefined,
|
|
8
9
|
removeDisabledRow: () => undefined,
|
|
10
|
+
row: {},
|
|
11
|
+
onSelectRow: () => () => undefined,
|
|
12
|
+
onRowEnter: () => undefined,
|
|
13
|
+
onRowLeave: () => undefined,
|
|
14
|
+
registerRowElement: () => undefined,
|
|
15
|
+
unregisterRowElement: () => undefined,
|
|
16
|
+
itemProps: {},
|
|
17
|
+
isSelected: false,
|
|
9
18
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
type
|
|
2
|
+
import { type RowContextProps } from '../RowContext';
|
|
3
|
+
type RowContextProviderProps = Pick<RowContextProps, 'row' | 'itemProps' | 'onSelectRow' | 'onRowEnter' | 'onRowLeave' | 'registerRowElement' | 'unregisterRowElement' | 'isSelectable' | 'isSelected'> & {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
};
|
|
5
|
-
export declare const RowContextProvider: ({ children }: RowContextProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const RowContextProvider: ({ row, itemProps, onSelectRow, onRowEnter, onRowLeave, registerRowElement, unregisterRowElement, children, isSelectable, isSelected, }: RowContextProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -4,7 +4,7 @@ exports.RowContextProvider = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const RowContext_1 = require("../RowContext");
|
|
7
|
-
const RowContextProvider = ({ children }) => {
|
|
7
|
+
const RowContextProvider = ({ row, itemProps, onSelectRow, onRowEnter, onRowLeave, registerRowElement, unregisterRowElement, children, isSelectable, isSelected, }) => {
|
|
8
8
|
const [isDisabled, setDisabled] = (0, react_1.useState)(false);
|
|
9
9
|
const [disabledReason, setDisabledReason] = (0, react_1.useState)();
|
|
10
10
|
const addDisabledRow = (0, react_1.useCallback)((reason) => {
|
|
@@ -17,10 +17,33 @@ const RowContextProvider = ({ children }) => {
|
|
|
17
17
|
}, []);
|
|
18
18
|
const contextValue = (0, react_1.useMemo)(() => ({
|
|
19
19
|
isDisabled,
|
|
20
|
+
isSelectable,
|
|
20
21
|
disabledReason,
|
|
21
22
|
addDisabledRow,
|
|
22
23
|
removeDisabledRow,
|
|
23
|
-
|
|
24
|
+
row,
|
|
25
|
+
itemProps,
|
|
26
|
+
onSelectRow,
|
|
27
|
+
onRowEnter,
|
|
28
|
+
onRowLeave,
|
|
29
|
+
registerRowElement,
|
|
30
|
+
unregisterRowElement,
|
|
31
|
+
isSelected,
|
|
32
|
+
}), [
|
|
33
|
+
isDisabled,
|
|
34
|
+
isSelectable,
|
|
35
|
+
disabledReason,
|
|
36
|
+
addDisabledRow,
|
|
37
|
+
removeDisabledRow,
|
|
38
|
+
row,
|
|
39
|
+
itemProps,
|
|
40
|
+
onSelectRow,
|
|
41
|
+
onRowEnter,
|
|
42
|
+
onRowLeave,
|
|
43
|
+
registerRowElement,
|
|
44
|
+
unregisterRowElement,
|
|
45
|
+
isSelected,
|
|
46
|
+
]);
|
|
24
47
|
return ((0, jsx_runtime_1.jsx)(RowContext_1.RowContext.Provider, { value: contextValue, children: children }));
|
|
25
48
|
};
|
|
26
49
|
exports.RowContextProvider = RowContextProvider;
|
|
@@ -7,6 +7,11 @@ export declare const dataGridRowClassnames: {
|
|
|
7
7
|
hover: string;
|
|
8
8
|
hasPinnedColumns: string;
|
|
9
9
|
checkbox: string;
|
|
10
|
+
mobileVariantCards: string;
|
|
11
|
+
mobileVariantList: string;
|
|
12
|
+
nestedChildren: string;
|
|
13
|
+
hasOpenChildren: string;
|
|
14
|
+
hasNestedChildren: string;
|
|
10
15
|
};
|
|
11
16
|
export declare const dataGridRowContentClassnames: {
|
|
12
17
|
root: string;
|
|
@@ -16,6 +21,7 @@ export declare const dataGridRowContentClassnames: {
|
|
|
16
21
|
export declare const dataGridRowCellClassnames: {
|
|
17
22
|
single: string;
|
|
18
23
|
grouped: string;
|
|
24
|
+
firstCell: string;
|
|
19
25
|
};
|
|
20
26
|
export declare const dataGridGroupedColumnLabelClassnames: {
|
|
21
27
|
root: string;
|
|
@@ -11,6 +11,11 @@ exports.dataGridRowClassnames = {
|
|
|
11
11
|
hover: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row_hover'),
|
|
12
12
|
hasPinnedColumns: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row_has-pinned-columns'),
|
|
13
13
|
checkbox: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row-checkbox'),
|
|
14
|
+
mobileVariantCards: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row_mobile-variant-cards'),
|
|
15
|
+
mobileVariantList: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row_mobile-variant-list'),
|
|
16
|
+
nestedChildren: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row-nested-children'),
|
|
17
|
+
hasOpenChildren: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row_has-open-children'),
|
|
18
|
+
hasNestedChildren: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row_has-nested-children'),
|
|
14
19
|
};
|
|
15
20
|
exports.dataGridRowContentClassnames = {
|
|
16
21
|
root: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row-content'),
|
|
@@ -20,6 +25,7 @@ exports.dataGridRowContentClassnames = {
|
|
|
20
25
|
exports.dataGridRowCellClassnames = {
|
|
21
26
|
single: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row-cell_single'),
|
|
22
27
|
grouped: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row-cell_grouped'),
|
|
28
|
+
firstCell: (0, createUIKitClassname_1.createUIKitClassname)('data-grid__row-cell_first'),
|
|
23
29
|
};
|
|
24
30
|
exports.dataGridGroupedColumnLabelClassnames = {
|
|
25
31
|
root: (0, createUIKitClassname_1.createUIKitClassname)('data-grid-grouped-column-label'),
|