@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,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProgressPercent = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Преобразует value/maxValue в целый процент 0–100.
|
|
6
|
+
* Дробная часть отбрасывается вниз, некорректные значения дают 0.
|
|
7
|
+
* @param value - Текущее значение
|
|
8
|
+
* @param maxValue - Максимальное значение (должно быть положительным и конечным)
|
|
9
|
+
* @returns Целый процент от 0 до 100
|
|
10
|
+
*/
|
|
11
|
+
const getProgressPercent = (value, maxValue) => {
|
|
12
|
+
if (!Number.isFinite(maxValue) || maxValue <= 0) {
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
15
|
+
if (!Number.isFinite(value)) {
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
return Math.max(0, Math.min(100, Math.floor((value / maxValue) * 100)));
|
|
19
|
+
};
|
|
20
|
+
exports.getProgressPercent = getProgressPercent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getProgressPercent } from './getProgressPercent';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProgressPercent = void 0;
|
|
4
|
+
var getProgressPercent_1 = require("./getProgressPercent");
|
|
5
|
+
Object.defineProperty(exports, "getProgressPercent", { enumerable: true, get: function () { return getProgressPercent_1.getProgressPercent; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { getMeterAriaValue } from './getMeterAriaValue';
|
|
2
|
+
export { getDonutChartCssVars } from './getDonutChartCssVars';
|
|
3
|
+
export { getGeometry } from './getGeometry';
|
|
4
|
+
export { getProgressCirclePath } from './getProgressCirclePath';
|
|
5
|
+
export { getProgressOffset } from './getProgressOffset';
|
|
6
|
+
export { getProgressPercent } from './getProgressPercent';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProgressPercent = exports.getProgressOffset = exports.getProgressCirclePath = exports.getGeometry = exports.getDonutChartCssVars = exports.getMeterAriaValue = void 0;
|
|
4
|
+
var getMeterAriaValue_1 = require("./getMeterAriaValue");
|
|
5
|
+
Object.defineProperty(exports, "getMeterAriaValue", { enumerable: true, get: function () { return getMeterAriaValue_1.getMeterAriaValue; } });
|
|
6
|
+
var getDonutChartCssVars_1 = require("./getDonutChartCssVars");
|
|
7
|
+
Object.defineProperty(exports, "getDonutChartCssVars", { enumerable: true, get: function () { return getDonutChartCssVars_1.getDonutChartCssVars; } });
|
|
8
|
+
var getGeometry_1 = require("./getGeometry");
|
|
9
|
+
Object.defineProperty(exports, "getGeometry", { enumerable: true, get: function () { return getGeometry_1.getGeometry; } });
|
|
10
|
+
var getProgressCirclePath_1 = require("./getProgressCirclePath");
|
|
11
|
+
Object.defineProperty(exports, "getProgressCirclePath", { enumerable: true, get: function () { return getProgressCirclePath_1.getProgressCirclePath; } });
|
|
12
|
+
var getProgressOffset_1 = require("./getProgressOffset");
|
|
13
|
+
Object.defineProperty(exports, "getProgressOffset", { enumerable: true, get: function () { return getProgressOffset_1.getProgressOffset; } });
|
|
14
|
+
var getProgressPercent_1 = require("./getProgressPercent");
|
|
15
|
+
Object.defineProperty(exports, "getProgressPercent", { enumerable: true, get: function () { return getProgressPercent_1.getProgressPercent; } });
|
|
@@ -13,6 +13,6 @@ export declare const Title: import("@emotion/styled/dist/declarations/src/types"
|
|
|
13
13
|
export declare const StyledChevron: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
14
14
|
isActive?: boolean | undefined;
|
|
15
15
|
className?: string | undefined;
|
|
16
|
-
} & Omit<import("../..").WithoutEmotionSpecific<import("
|
|
16
|
+
} & Omit<import("../..").WithoutEmotionSpecific<import("../..").SvgIconProps>, "classes" | "children" | "ref"> & {
|
|
17
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
18
18
|
}, {}, {}>;
|
|
@@ -12,7 +12,7 @@ export declare const StyledButton: import("@emotion/styled/dist/declarations/src
|
|
|
12
12
|
export declare const StyledChevron: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
13
13
|
isActive?: boolean | undefined;
|
|
14
14
|
className?: string | undefined;
|
|
15
|
-
} & Omit<import("../..").WithoutEmotionSpecific<import("
|
|
15
|
+
} & Omit<import("../..").WithoutEmotionSpecific<import("../..").SvgIconProps>, "classes" | "children" | "ref"> & {
|
|
16
16
|
theme?: import("@emotion/react").Theme | undefined;
|
|
17
17
|
}, {}, {}>;
|
|
18
18
|
export declare const Container: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
@@ -7,6 +7,7 @@ const StepErrorFillMd_1 = require("../../../icons/StepErrorFillMd");
|
|
|
7
7
|
const StepSuccessFillMd_1 = require("../../../icons/StepSuccessFillMd");
|
|
8
8
|
const cva_1 = require("../../utils/cva");
|
|
9
9
|
const constants_1 = require("./constants");
|
|
10
|
+
const useLogic_1 = require("./useLogic");
|
|
10
11
|
const stepIcon = (0, cva_1.cva)(constants_1.stepIconClassnames.root, {
|
|
11
12
|
variants: {
|
|
12
13
|
isActive: {
|
|
@@ -24,10 +25,11 @@ const stepIcon = (0, cva_1.cva)(constants_1.stepIconClassnames.root, {
|
|
|
24
25
|
},
|
|
25
26
|
});
|
|
26
27
|
const StepIcon = ({ icon: Icon, isActive, isCompleted, isError, isWarning, }) => {
|
|
28
|
+
const { isShowError } = (0, useLogic_1.useLogic)({ isError, isActive, isCompleted });
|
|
27
29
|
if (Icon) {
|
|
28
30
|
return ((0, jsx_runtime_1.jsx)(Icon, { isActive: isActive, isCompleted: isCompleted, isError: isError, isWarning: isWarning, className: stepIcon({ isActive, isCompleted, isError, isWarning }) }));
|
|
29
31
|
}
|
|
30
|
-
if (
|
|
32
|
+
if (isShowError) {
|
|
31
33
|
return (0, jsx_runtime_1.jsx)(StepErrorFillMd_1.StepErrorFillMd, { className: stepIcon({ isError: true }) });
|
|
32
34
|
}
|
|
33
35
|
if (isCompleted) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useLogic';
|
|
@@ -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("./useLogic"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLogic = void 0;
|
|
4
|
+
const useLogic = ({ isError, isActive, isCompleted, }) => {
|
|
5
|
+
const isShowError = (isError && !isActive) || (isError && isCompleted && isActive);
|
|
6
|
+
return {
|
|
7
|
+
isShowError,
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
exports.useLogic = useLogic;
|
|
@@ -3,13 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageContent = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const PageContext_1 = require("../PageContext");
|
|
6
7
|
const PageLayoutFooter_1 = require("../PageLayoutFooter");
|
|
7
8
|
const classNames_1 = require("../utils/classNames");
|
|
9
|
+
const cva_1 = require("../utils/cva");
|
|
8
10
|
const constants_1 = require("./constants");
|
|
9
11
|
const styles_1 = require("./styles");
|
|
10
|
-
const
|
|
12
|
+
const contentCva = (0, cva_1.cva)(constants_1.pageContentClassnames.content, {
|
|
13
|
+
variants: {
|
|
14
|
+
isUnconstrained: {
|
|
15
|
+
true: constants_1.pageContentClassnames.isUnconstrained,
|
|
16
|
+
},
|
|
17
|
+
hasHeader: {
|
|
18
|
+
true: constants_1.pageContentClassnames.contentHasHeader,
|
|
19
|
+
},
|
|
20
|
+
hasAside: {
|
|
21
|
+
true: constants_1.pageContentClassnames.hasAside,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
});
|
|
11
25
|
exports.PageContent = (0, react_1.forwardRef)((props, forwardedRef) => {
|
|
12
|
-
const { hasAside
|
|
13
|
-
const { className, children, isFullHeight = true, footer, scrollRef, header, } = props;
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, classNames_1.classNames)(className, constants_1.pageContentClassnames.pageContent), ref: forwardedRef, "$isFullHeight": isFullHeight, "$isSeparatorShown": hasAside || Boolean(header), children: [header && header, (0, jsx_runtime_1.jsx)(styles_1.Content, { ref: scrollRef, className:
|
|
26
|
+
const { hasAside } = (0, react_1.useContext)(PageContext_1.PageContext);
|
|
27
|
+
const { className, children, isFullHeight = true, footer, scrollRef, header, isUnconstrained = false, } = props;
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, classNames_1.classNames)(className, constants_1.pageContentClassnames.pageContent), ref: forwardedRef, "$isFullHeight": isFullHeight, "$isSeparatorShown": hasAside || Boolean(header), children: [header && header, (0, jsx_runtime_1.jsx)(styles_1.Content, { ref: scrollRef, className: contentCva({
|
|
29
|
+
isUnconstrained,
|
|
30
|
+
hasHeader: Boolean(header),
|
|
31
|
+
hasAside,
|
|
32
|
+
}), children: children }), footer && !(0, react_1.isValidElement)(footer) && ((0, jsx_runtime_1.jsx)(PageLayoutFooter_1.PageLayoutFooter, { ...footer })), (0, react_1.isValidElement)(footer) && footer] }));
|
|
15
33
|
});
|
|
@@ -5,7 +5,9 @@ const createUIKitClassname_1 = require("../utils/createUIKitClassname");
|
|
|
5
5
|
exports.pageContentClassnames = {
|
|
6
6
|
pageContent: (0, createUIKitClassname_1.createUIKitClassname)('page-content'),
|
|
7
7
|
content: (0, createUIKitClassname_1.createUIKitClassname)('page-content__content'),
|
|
8
|
+
isUnconstrained: (0, createUIKitClassname_1.createUIKitClassname)('page-content__content_unconstrained'),
|
|
8
9
|
contentHasHeader: (0, createUIKitClassname_1.createUIKitClassname)('page-content__content_has-header'),
|
|
10
|
+
hasAside: (0, createUIKitClassname_1.createUIKitClassname)('page-content__content_has-aside'),
|
|
9
11
|
animation: (0, createUIKitClassname_1.createUIKitClassname)('page-content_animation'),
|
|
10
12
|
withPdfViewer: (0, createUIKitClassname_1.createUIKitClassname)('page-content_with-pdf-viewer'),
|
|
11
13
|
};
|
|
@@ -10,7 +10,5 @@ export declare const Wrapper: import("@emotion/styled/dist/declarations/src/type
|
|
|
10
10
|
export declare const Content: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
11
11
|
theme?: import("@emotion/react").Theme | undefined;
|
|
12
12
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
13
|
-
} & {
|
|
14
|
-
$hasAside?: boolean | undefined;
|
|
15
13
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
14
|
export {};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Content = exports.Wrapper = void 0;
|
|
4
|
-
const constants_1 = require("../
|
|
4
|
+
const constants_1 = require("../constants");
|
|
5
5
|
const PdfViewer_1 = require("../PdfViewer");
|
|
6
6
|
const styled_1 = require("../styled");
|
|
7
7
|
const constants_2 = require("./constants");
|
|
8
|
-
const getPaddingContent = (theme, hasAside) => {
|
|
9
|
-
return hasAside ? theme.spacing(4, 6, 4) : theme.spacing(0, 6, 4);
|
|
10
|
-
};
|
|
11
8
|
exports.Wrapper = (0, styled_1.styled)('article', {
|
|
12
9
|
shouldForwardProp: (prop) => !['$isFullHeight', '$isSeparatorShown'].includes(prop),
|
|
13
10
|
}) `
|
|
@@ -63,7 +60,11 @@ exports.Content = styled_1.styled.div `
|
|
|
63
60
|
overflow: auto;
|
|
64
61
|
flex-grow: 1;
|
|
65
62
|
|
|
66
|
-
padding: ${({ theme
|
|
63
|
+
padding: ${({ theme }) => theme.spacing(0, 6, 4)};
|
|
64
|
+
|
|
65
|
+
&.${constants_2.pageContentClassnames.contentHasHeader}, &.${constants_2.pageContentClassnames.hasAside} {
|
|
66
|
+
padding: ${({ theme }) => theme.spacing(4, 6, 4)};
|
|
67
|
+
}
|
|
67
68
|
|
|
68
69
|
${({ theme }) => theme.breakpoints.down('laptop')} {
|
|
69
70
|
padding-right: ${({ theme }) => theme.spacing(4)};
|
|
@@ -83,16 +84,21 @@ exports.Content = styled_1.styled.div `
|
|
|
83
84
|
border: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
84
85
|
border-radius: ${({ theme }) => theme.shape.medium};
|
|
85
86
|
|
|
86
|
-
/* Причина игнора: Не критично для отображения */
|
|
87
|
-
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
88
|
-
&:has(.${constants_1.cardGridClassnames.root}) {
|
|
89
|
-
border: none;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
87
|
&.${constants_2.pageContentClassnames.contentHasHeader} {
|
|
93
88
|
border-top-left-radius: 0;
|
|
94
89
|
border-top-right-radius: 0;
|
|
95
90
|
}
|
|
91
|
+
|
|
92
|
+
/* Причина игнора: Не критично для отображения */
|
|
93
|
+
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
94
|
+
&.${constants_2.pageContentClassnames.isUnconstrained}, &:has(> .${constants_1.selfContainedClassname}) {
|
|
95
|
+
margin: 0;
|
|
96
|
+
padding: 0;
|
|
97
|
+
|
|
98
|
+
background-color: unset;
|
|
99
|
+
border: none;
|
|
100
|
+
border-radius: 0;
|
|
101
|
+
}
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
/* Причина игнора: Не критично для отображения */
|
|
@@ -21,7 +21,7 @@ export declare const Credentials: import("@emotion/styled/dist/declarations/src/
|
|
|
21
21
|
export declare const StyledChevron: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
22
22
|
isActive?: boolean | undefined;
|
|
23
23
|
className?: string | undefined;
|
|
24
|
-
} & Omit<import("..").WithoutEmotionSpecific<import("
|
|
24
|
+
} & Omit<import("..").WithoutEmotionSpecific<import("..").SvgIconProps>, "classes" | "children" | "ref"> & {
|
|
25
25
|
theme?: import("@emotion/react").Theme | undefined;
|
|
26
26
|
}, {}, {}>;
|
|
27
27
|
export declare const StyledAvatar: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<AvatarProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
|
|
@@ -12,4 +12,13 @@ export type SearchFieldProps = Omit<TextFieldProps, 'startAdornment' | 'endAdorn
|
|
|
12
12
|
* Если true, будет отображаться лоадер в конце инпута
|
|
13
13
|
*/
|
|
14
14
|
isLoading?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Если true, вводимое пользователем значение будет применяться с debounce задержкой
|
|
17
|
+
*/
|
|
18
|
+
isDebounced?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Время, на которое будет откладываться вызов onChange при вводе символов в инпут
|
|
21
|
+
* @default 250
|
|
22
|
+
*/
|
|
23
|
+
debounceDelay?: number;
|
|
15
24
|
};
|
|
@@ -15,5 +15,5 @@ type UseLogicResult = {
|
|
|
15
15
|
onBlur: (event: FocusEvent<HTMLInputElement>) => void;
|
|
16
16
|
hideHelperText?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare const useLogic: ({ onChange: propsOnChange, defaultValue, value, inputRef: externalInputRef, disabled, onBlur: propsOnBlur, fullWidth, isLoading, placeholder, inputComponent, hideHelperText, ...restProps }: SearchFieldProps) => UseLogicResult;
|
|
18
|
+
export declare const useLogic: ({ onChange: propsOnChange, defaultValue, value, inputRef: externalInputRef, disabled, onBlur: propsOnBlur, fullWidth, isLoading, placeholder, inputComponent, hideHelperText, isDebounced, debounceDelay, ...restProps }: SearchFieldProps) => UseLogicResult;
|
|
19
19
|
export {};
|
|
@@ -4,7 +4,9 @@ exports.useLogic = void 0;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const useFirstMountState_1 = require("../../useFirstMountState");
|
|
6
6
|
const useForwardedRef_1 = require("../../useForwardedRef");
|
|
7
|
-
const
|
|
7
|
+
const debounce_1 = require("../../utils/debounce");
|
|
8
|
+
const DEFAULT_DEBOUNCE_TIME = 250;
|
|
9
|
+
const useLogic = ({ onChange: propsOnChange, defaultValue, value, inputRef: externalInputRef, disabled, onBlur: propsOnBlur, fullWidth, isLoading, placeholder = 'Поиск', inputComponent, hideHelperText = true, isDebounced, debounceDelay = DEFAULT_DEBOUNCE_TIME, ...restProps }) => {
|
|
8
10
|
const inputRef = (0, useForwardedRef_1.useForwardedRef)(externalInputRef);
|
|
9
11
|
const [internalValue, setInternalValue] = (0, react_1.useState)(defaultValue || value || '');
|
|
10
12
|
const isFirstRender = (0, useFirstMountState_1.useFirstMountState)();
|
|
@@ -16,13 +18,29 @@ const useLogic = ({ onChange: propsOnChange, defaultValue, value, inputRef: exte
|
|
|
16
18
|
setInternalValue('');
|
|
17
19
|
}
|
|
18
20
|
}, [value]);
|
|
21
|
+
const createChangeEvent = (0, react_1.useCallback)((eventValue) => ({
|
|
22
|
+
target: {
|
|
23
|
+
value: eventValue,
|
|
24
|
+
},
|
|
25
|
+
}), []);
|
|
26
|
+
const debouncedOnChange = (0, react_1.useMemo)(() => isDebounced
|
|
27
|
+
? (0, debounce_1.debounce)((targetValue) => propsOnChange?.(createChangeEvent(targetValue)), {
|
|
28
|
+
waitMs: debounceDelay,
|
|
29
|
+
}).call
|
|
30
|
+
: () => undefined, [createChangeEvent, propsOnChange, isDebounced]);
|
|
19
31
|
const onChange = (event) => {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
const originalValue = event.target.value;
|
|
33
|
+
setInternalValue(originalValue);
|
|
34
|
+
if (!propsOnChange) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const trimmedValue = originalValue.trim();
|
|
38
|
+
return isDebounced
|
|
39
|
+
? debouncedOnChange(trimmedValue)
|
|
40
|
+
: propsOnChange({
|
|
41
|
+
...event,
|
|
42
|
+
target: { ...event.target, value: trimmedValue },
|
|
43
|
+
});
|
|
26
44
|
};
|
|
27
45
|
const onBlur = (event) => {
|
|
28
46
|
propsOnBlur?.(event);
|
|
@@ -30,15 +48,9 @@ const useLogic = ({ onChange: propsOnChange, defaultValue, value, inputRef: exte
|
|
|
30
48
|
setInternalValue(value);
|
|
31
49
|
}
|
|
32
50
|
};
|
|
33
|
-
const createChangeEvent = (eventValue) => {
|
|
34
|
-
return {
|
|
35
|
-
target: {
|
|
36
|
-
value: eventValue,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
51
|
const onClearValue = () => {
|
|
41
|
-
|
|
52
|
+
setInternalValue('');
|
|
53
|
+
propsOnChange?.(createChangeEvent(''));
|
|
42
54
|
inputRef.current.value = '';
|
|
43
55
|
inputRef.current?.focus();
|
|
44
56
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const selfContainedClassname: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.selfContainedClassname = void 0;
|
|
4
|
+
const createUIKitClassname_1 = require("../utils/createUIKitClassname");
|
|
5
|
+
exports.selfContainedClassname = (0, createUIKitClassname_1.createUIKitClassname)('self-contained');
|
package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type UseLogicParams } from './useLogic';
|
|
2
3
|
export type HintPlaceholderProps = UseLogicParams;
|
|
3
|
-
export declare const HintPlaceholder: (props: HintPlaceholderProps) => import("react/jsx-runtime").JSX.Element
|
|
4
|
+
export declare const HintPlaceholder: (props: HintPlaceholderProps) => number | bigint | true | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined>;
|
package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/HintPlaceholder.js
CHANGED
|
@@ -10,7 +10,10 @@ const useLogic_1 = require("./useLogic");
|
|
|
10
10
|
const HintPlaceholder = (props) => {
|
|
11
11
|
const { extensions, className, isMultiple, maxFileCount, maxFileSize, placeholder, } = (0, useLogic_1.useLogic)(props);
|
|
12
12
|
if (placeholder) {
|
|
13
|
-
|
|
13
|
+
if (typeof placeholder === 'string') {
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { className: className, color: "grey", colorIntensity: "600", variant: "caption", align: "center", children: placeholder }));
|
|
15
|
+
}
|
|
16
|
+
return placeholder;
|
|
14
17
|
}
|
|
15
18
|
if (isMultiple) {
|
|
16
19
|
return ((0, jsx_runtime_1.jsxs)(Typography_1.Typography, { className: className, color: "grey", colorIntensity: "600", variant: "caption", align: "center", children: ["\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B. \u041D\u0435 \u0431\u043E\u043B\u0435\u0435 ", maxFileCount, ' ', (0, declensionFile_1.declensionFile)(maxFileCount), " \u0440\u0430\u0437\u043C\u0435\u0440\u043E\u043C \u043D\u0435 \u0431\u043E\u043B\u0435\u0435", ' ', (0, formatFileSizeToView_1.formatFileSizeToView)(maxFileSize), extensions && ' в формате ', (0, jsx_runtime_1.jsx)(styles_1.Extensions, { children: extensions })] }));
|
package/node/components/fileUploading/FileUploaderDropzone/HintPlaceholder/useLogic/useLogic.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
export type UseLogicParams = {
|
|
2
3
|
/**
|
|
3
4
|
* Флаг доступности множественной загрузки файлов
|
|
@@ -16,9 +17,9 @@ export type UseLogicParams = {
|
|
|
16
17
|
*/
|
|
17
18
|
maxFileSize: number;
|
|
18
19
|
/**
|
|
19
|
-
* Вспомогательный текст
|
|
20
|
+
* Вспомогательный текст или контент
|
|
20
21
|
*/
|
|
21
|
-
placeholder?:
|
|
22
|
+
placeholder?: ReactNode;
|
|
22
23
|
className?: string;
|
|
23
24
|
};
|
|
24
25
|
export declare const useLogic: ({ accept, ...restProps }: UseLogicParams) => {
|
|
@@ -35,9 +36,9 @@ export declare const useLogic: ({ accept, ...restProps }: UseLogicParams) => {
|
|
|
35
36
|
*/
|
|
36
37
|
maxFileSize: number;
|
|
37
38
|
/**
|
|
38
|
-
* Вспомогательный текст
|
|
39
|
+
* Вспомогательный текст или контент
|
|
39
40
|
*/
|
|
40
|
-
placeholder?:
|
|
41
|
+
placeholder?: ReactNode;
|
|
41
42
|
className?: string | undefined;
|
|
42
43
|
extensions: string;
|
|
43
44
|
};
|
package/node/components/fileUploading/PreviewFileUploaderDropZone/HintPlaceholder/HintPlaceholder.js
CHANGED
|
@@ -8,6 +8,15 @@ const styles_1 = require("./styles");
|
|
|
8
8
|
const useLogic_1 = require("./useLogic");
|
|
9
9
|
const HintPlaceholder = (props) => {
|
|
10
10
|
const { extensions, imageProps, maxFileSize, placeholder, className, RenderImage, } = (0, useLogic_1.useLogic)(props);
|
|
11
|
-
|
|
11
|
+
const renderPlaceholder = () => {
|
|
12
|
+
if (!placeholder) {
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)(Typography_1.Typography, { component: "p", color: "textSecondary", variant: "caption", align: "center", children: ["\u041F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0438\u043B\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B. \u0420\u0430\u0437\u043C\u0435\u0440\u043E\u043C \u043D\u0435 \u0431\u043E\u043B\u0435\u0435", ' ', (0, formatFileSizeToView_1.formatFileSizeToView)(maxFileSize), extensions && ' в формате ', (0, jsx_runtime_1.jsx)(styles_1.Extensions, { children: extensions })] }));
|
|
14
|
+
}
|
|
15
|
+
if (typeof placeholder === 'string') {
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { component: "p", color: "textSecondary", variant: "caption", align: "center", children: placeholder }));
|
|
17
|
+
}
|
|
18
|
+
return placeholder;
|
|
19
|
+
};
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: className, children: [(0, jsx_runtime_1.jsx)(RenderImage, { ...imageProps, alt: "\u0424\u0430\u0439\u043B\u044B \u0434\u043B\u044F \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438" }), renderPlaceholder()] }));
|
|
12
21
|
};
|
|
13
22
|
exports.HintPlaceholder = HintPlaceholder;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
export type UseLogicParams = {
|
|
3
3
|
/**
|
|
4
4
|
* Массив разрешенных расширений
|
|
@@ -9,9 +9,9 @@ export type UseLogicParams = {
|
|
|
9
9
|
*/
|
|
10
10
|
maxFileSize: number;
|
|
11
11
|
/**
|
|
12
|
-
* Вспомогательный текст
|
|
12
|
+
* Вспомогательный текст или контент
|
|
13
13
|
*/
|
|
14
|
-
placeholder?:
|
|
14
|
+
placeholder?: ReactNode;
|
|
15
15
|
/**
|
|
16
16
|
* Кастомное изображение для placeholder. Дефолтное берется из configProvider, если было прокинуто
|
|
17
17
|
*/
|
|
@@ -24,9 +24,9 @@ export declare const useLogic: ({ accept, placeholderImgSrc, ...rest }: UseLogic
|
|
|
24
24
|
*/
|
|
25
25
|
maxFileSize: number;
|
|
26
26
|
/**
|
|
27
|
-
* Вспомогательный текст
|
|
27
|
+
* Вспомогательный текст или контент
|
|
28
28
|
*/
|
|
29
|
-
placeholder?:
|
|
29
|
+
placeholder?: ReactNode;
|
|
30
30
|
className?: string | undefined;
|
|
31
31
|
RenderImage: import("@emotion/styled").StyledComponent<{
|
|
32
32
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -12,7 +12,7 @@ export declare const useFileUploader: ({ value, isDisabled, isMultiple, accept,
|
|
|
12
12
|
accept: string[];
|
|
13
13
|
maxFileCount: number;
|
|
14
14
|
maxFileSize: number;
|
|
15
|
-
placeholder:
|
|
15
|
+
placeholder: import("react").ReactNode;
|
|
16
16
|
};
|
|
17
17
|
fileInputProps: {
|
|
18
18
|
id: string | undefined;
|
package/node/components/fileUploading/hooks/usePreviewFileUploader/usePreviewFileUploader.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare const usePreviewFileUploader: ({ placeholderImgSrc, isHidePersona
|
|
|
53
53
|
accept: string[];
|
|
54
54
|
maxFileCount: number;
|
|
55
55
|
maxFileSize: number;
|
|
56
|
-
placeholder:
|
|
56
|
+
placeholder: import("react").ReactNode;
|
|
57
57
|
};
|
|
58
58
|
isLimitMaxFileCount: boolean;
|
|
59
59
|
maxFileCount: number;
|
|
@@ -160,9 +160,9 @@ type BaseFileUploaderProps = {
|
|
|
160
160
|
*/
|
|
161
161
|
restrictions?: RestrictionFn[];
|
|
162
162
|
/**
|
|
163
|
-
* Вспомогательный текст
|
|
163
|
+
* Вспомогательный текст или контент
|
|
164
164
|
*/
|
|
165
|
-
placeholder?:
|
|
165
|
+
placeholder?: ReactNode;
|
|
166
166
|
/**
|
|
167
167
|
* Реф для доступа к input элементу
|
|
168
168
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useProfiler } from './useProfiler';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useProfiler = void 0;
|
|
4
|
+
var useProfiler_1 = require("./useProfiler");
|
|
5
|
+
Object.defineProperty(exports, "useProfiler", { enumerable: true, get: function () { return useProfiler_1.useProfiler; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type UseProfilerParams = {
|
|
2
|
+
componentName: string;
|
|
3
|
+
props: Record<string, unknown>;
|
|
4
|
+
id?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Хук для отладки ререндеров компонентов.
|
|
8
|
+
* Логирует номер рендера, изменившиеся props и предупреждает,
|
|
9
|
+
* если ссылка на объект изменилась при неизменном содержимом.
|
|
10
|
+
*
|
|
11
|
+
* Только для внутреннего использования в uikit, не является публичным API.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useProfiler: ({ componentName, props, id, }: UseProfilerParams) => void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useProfiler = void 0;
|
|
4
|
+
/** biome-ignore-all lint/suspicious/noConsole: сообщения для отладки */
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const utils_1 = require("./utils");
|
|
7
|
+
/**
|
|
8
|
+
* Хук для отладки ререндеров компонентов.
|
|
9
|
+
* Логирует номер рендера, изменившиеся props и предупреждает,
|
|
10
|
+
* если ссылка на объект изменилась при неизменном содержимом.
|
|
11
|
+
*
|
|
12
|
+
* Только для внутреннего использования в uikit, не является публичным API.
|
|
13
|
+
*/
|
|
14
|
+
const useProfiler = ({ componentName, props, id, }) => {
|
|
15
|
+
const renderCountRef = (0, react_1.useRef)(0);
|
|
16
|
+
const prevPropsRef = (0, react_1.useRef)(props);
|
|
17
|
+
renderCountRef.current += 1;
|
|
18
|
+
const prevProps = prevPropsRef.current;
|
|
19
|
+
const entityId = id ? ` [id:${id}]` : '';
|
|
20
|
+
const changedProps = {};
|
|
21
|
+
Object.keys(props).forEach((key) => {
|
|
22
|
+
const prevValue = prevProps[key];
|
|
23
|
+
const currentValue = props[key];
|
|
24
|
+
if (!Object.is(prevValue, currentValue)) {
|
|
25
|
+
const isContentEqual = (0, utils_1.isObject)(currentValue) && (0, utils_1.shallowEqual)(prevValue, currentValue);
|
|
26
|
+
changedProps[key] = {
|
|
27
|
+
from: prevValue,
|
|
28
|
+
to: currentValue,
|
|
29
|
+
isLinkChangedButContentEqual: isContentEqual,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
(0, react_1.useEffect)(() => {
|
|
34
|
+
console.group(`🔍 [${componentName}${entityId}] Рендер #${renderCountRef.current}`);
|
|
35
|
+
if (Object.keys(changedProps).length > 0) {
|
|
36
|
+
console.log('Изменились параметры компонента:', changedProps);
|
|
37
|
+
Object.keys(changedProps).forEach((key) => {
|
|
38
|
+
if (changedProps[key].isLinkChangedButContentEqual) {
|
|
39
|
+
console.warn(`Параметр "${key}" изменил ссылку, хотя данные внутри остались прежними`);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
console.log('Изменений не произошло, но происходит ререндер');
|
|
45
|
+
}
|
|
46
|
+
console.groupEnd();
|
|
47
|
+
});
|
|
48
|
+
prevPropsRef.current = props;
|
|
49
|
+
};
|
|
50
|
+
exports.useProfiler = useProfiler;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './shallowEqual';
|