@astral/ui 4.113.3 → 4.115.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/ActionGroup/ActionGroup.js +2 -2
- package/components/ActionGroup/SecondaryActions/SecondaryActions.d.ts +1 -1
- package/components/ActionGroup/SecondaryActions/SecondaryActions.js +2 -2
- package/components/ActionGroup/types.d.ts +9 -0
- package/components/DataGrid/Body/Body.d.ts +1 -1
- package/components/DataGrid/Body/Body.js +7 -3
- package/components/DataGrid/Body/types.d.ts +11 -3
- package/components/DataGrid/DataGrid.js +13 -6
- package/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.d.ts +3 -2
- package/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.js +3 -2
- package/components/DataGrid/DataGridSelectionContext/DataGridSelectionContext.d.ts +25 -0
- package/components/DataGrid/DataGridSelectionContext/DataGridSelectionContext.js +13 -0
- package/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/DataGridSelectionProvider.d.ts +7 -0
- package/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/DataGridSelectionProvider.js +8 -0
- package/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/index.d.ts +1 -0
- package/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/index.js +1 -0
- package/components/DataGrid/DataGridSelectionContext/index.d.ts +2 -0
- package/components/DataGrid/DataGridSelectionContext/index.js +2 -0
- package/components/DataGrid/PinnedSections/PinnedSections.js +2 -2
- package/components/DataGrid/PinnedSections/useLogic/useLogic.d.ts +1 -0
- package/components/DataGrid/PinnedSections/useLogic/useLogic.js +4 -3
- package/components/DataGrid/Row/Row.js +13 -9
- package/components/DataGrid/Row/RowContext/RowContext.d.ts +15 -4
- package/components/DataGrid/Row/RowContext/RowContext.js +3 -3
- package/components/DataGrid/Row/RowContext/RowProvider/RowProvider.d.ts +10 -1
- package/components/DataGrid/Row/RowContext/RowProvider/RowProvider.js +23 -17
- package/components/DataGrid/Row/types.d.ts +7 -3
- package/components/DataGrid/Row/useLogic/useLogic.d.ts +6 -4
- package/components/DataGrid/Row/useLogic/useLogic.js +21 -12
- package/components/DataGrid/RowBase/RowBase.js +5 -2
- package/components/DataGrid/RowBase/types.d.ts +9 -5
- package/components/DataGrid/RowBase/useLogic/useLogic.d.ts +5 -4
- package/components/DataGrid/RowBase/useLogic/useLogic.js +16 -10
- package/components/DataGrid/RowCheckbox/RowCheckbox.d.ts +5 -0
- package/components/DataGrid/RowCheckbox/RowCheckbox.js +13 -0
- package/components/DataGrid/RowCheckbox/constants.d.ts +4 -0
- package/components/DataGrid/RowCheckbox/constants.js +4 -0
- package/components/DataGrid/RowCheckbox/index.d.ts +1 -0
- package/components/DataGrid/RowCheckbox/index.js +1 -0
- package/components/DataGrid/RowCheckbox/types.d.ts +7 -0
- package/components/DataGrid/RowCheckbox/types.js +1 -0
- package/components/DataGrid/constants.d.ts +2 -0
- package/components/DataGrid/constants.js +2 -0
- package/components/DataGrid/hooks/index.d.ts +1 -0
- package/components/DataGrid/hooks/index.js +1 -0
- package/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/index.d.ts +1 -0
- package/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/index.js +1 -0
- package/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/useWarnRowsWithoutDisabledReason.d.ts +5 -0
- package/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/useWarnRowsWithoutDisabledReason.js +17 -0
- package/components/DataGrid/index.d.ts +1 -1
- package/components/DataGrid/public.d.ts +1 -1
- package/components/DataGrid/styles.d.ts +4 -0
- package/components/DataGrid/styles.js +26 -0
- package/components/DataGrid/tests/performance/testDataGridPerformance.d.ts +3 -1
- package/components/DataGrid/tests/performance/testDataGridPerformance.js +234 -2
- package/components/DataGrid/tests/selection/testDataGridSelection.d.ts +14 -0
- package/components/DataGrid/tests/selection/testDataGridSelection.js +562 -0
- package/components/DataGrid/types.d.ts +41 -1
- package/components/DataGrid/useLogic/useLogic.d.ts +8 -3
- package/components/DataGrid/useLogic/useLogic.js +23 -10
- package/components/DataGrid/utils/checkIsMassActionsOpen/checkIsMassActionsOpen.d.ts +10 -0
- package/components/DataGrid/utils/checkIsMassActionsOpen/checkIsMassActionsOpen.js +4 -0
- package/components/DataGrid/utils/checkIsMassActionsOpen/index.d.ts +1 -0
- package/components/DataGrid/utils/checkIsMassActionsOpen/index.js +1 -0
- package/components/DataGrid/utils/getRowDisabledState/getRowDisabledState.d.ts +31 -0
- package/components/DataGrid/utils/getRowDisabledState/getRowDisabledState.js +20 -0
- package/components/DataGrid/utils/getRowDisabledState/index.d.ts +1 -0
- package/components/DataGrid/utils/getRowDisabledState/index.js +1 -0
- package/components/DataGrid/utils/index.d.ts +4 -0
- package/components/DataGrid/utils/index.js +4 -0
- package/components/DataGrid/utils/resolveRowDisabled/index.d.ts +1 -0
- package/components/DataGrid/utils/resolveRowDisabled/index.js +1 -0
- package/components/DataGrid/utils/resolveRowDisabled/resolveRowDisabled.d.ts +5 -0
- package/components/DataGrid/utils/resolveRowDisabled/resolveRowDisabled.js +17 -0
- package/components/DataGrid/utils/resolveRowsDisabled/index.d.ts +1 -0
- package/components/DataGrid/utils/resolveRowsDisabled/index.js +1 -0
- package/components/DataGrid/utils/resolveRowsDisabled/resolveRowsDisabled.d.ts +16 -0
- package/components/DataGrid/utils/resolveRowsDisabled/resolveRowsDisabled.js +17 -0
- package/components/DataGridActionCell/hooks/useBlockingActions/useBlockingActions.js +3 -3
- package/components/DataGridCollapsibleRow/useLogic/useLogic.d.ts +3 -2
- package/components/DataGridCollapsibleRow/useLogic/useLogic.js +4 -3
- package/components/DataGridInfinite/DataGridInfinite.js +18 -14
- package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.d.ts +1 -1
- package/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.js +1 -1
- package/components/DataGridInfinite/Footer/Footer.d.ts +6 -0
- package/components/DataGridInfinite/Footer/Footer.js +25 -0
- package/components/DataGridInfinite/Footer/index.d.ts +2 -0
- package/components/DataGridInfinite/Footer/index.js +1 -0
- package/components/DataGridInfinite/Footer/types.d.ts +26 -0
- package/components/DataGridInfinite/Footer/types.js +1 -0
- package/components/DataGridInfinite/Row/Row.js +2 -2
- package/components/DataGridInfinite/Row/index.d.ts +1 -0
- package/components/DataGridInfinite/Row/types.d.ts +17 -2
- package/components/DataGridInfinite/Row/useLogic/useLogic.d.ts +4 -2
- package/components/DataGridInfinite/Row/useLogic/useLogic.js +12 -4
- package/components/DataGridInfinite/constants.d.ts +3 -0
- package/components/DataGridInfinite/constants.js +3 -0
- package/components/DataGridInfinite/faker.d.ts +1 -5
- package/components/DataGridInfinite/faker.js +1 -2
- package/components/DataGridInfinite/styles.d.ts +4 -0
- package/components/DataGridInfinite/styles.js +24 -0
- package/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -3
- package/components/DataGridInfinite/useLogic/useLogic.js +52 -16
- package/components/DataGridMassActions/DataGridMassActions.d.ts +15 -0
- package/components/DataGridMassActions/DataGridMassActions.js +32 -0
- package/components/DataGridMassActions/constants.d.ts +4 -0
- package/components/DataGridMassActions/constants.js +5 -0
- package/components/DataGridMassActions/index.d.ts +2 -0
- package/components/DataGridMassActions/index.js +1 -0
- package/components/DataGridMassActions/public.d.ts +2 -0
- package/components/DataGridMassActions/public.js +1 -0
- package/components/DataGridMassActions/styles.d.ts +8 -0
- package/components/DataGridMassActions/styles.js +49 -0
- package/components/DataGridMassActions/tests/testDataGridMassActions.d.ts +23 -0
- package/components/DataGridMassActions/tests/testDataGridMassActions.js +77 -0
- package/components/DataGridMassActions/types.d.ts +2 -0
- package/components/DataGridMassActions/types.js +1 -0
- package/components/DataGridMassActions/useLogic/index.d.ts +1 -0
- package/components/DataGridMassActions/useLogic/index.js +1 -0
- package/components/DataGridMassActions/useLogic/useLogic.d.ts +6 -0
- package/components/DataGridMassActions/useLogic/useLogic.js +21 -0
- package/components/IconDropdownButton/IconDropdownButton.d.ts +5 -0
- package/components/IconDropdownButton/IconDropdownButton.js +2 -2
- package/components/MassActions/MassActions.d.ts +5 -0
- package/components/MassActions/MassActions.js +17 -0
- package/components/MassActions/constants.d.ts +6 -0
- package/components/MassActions/constants.js +12 -0
- package/components/MassActions/index.d.ts +2 -0
- package/components/MassActions/index.js +1 -0
- package/components/MassActions/styles.d.ts +34 -0
- package/components/MassActions/styles.js +43 -0
- package/components/MassActions/types.d.ts +20 -0
- package/components/MassActions/types.js +1 -0
- package/components/MassActions/useLogic/index.d.ts +1 -0
- package/components/MassActions/useLogic/index.js +1 -0
- package/components/MassActions/useLogic/useLogic.d.ts +7 -0
- package/components/MassActions/useLogic/useLogic.js +9 -0
- package/components/PageHeader/PageActions/SecondaryActions/styles.d.ts +1 -1
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +0 -1
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +0 -1
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +2 -1
- package/components/index.d.ts +1 -1
- package/node/components/ActionGroup/ActionGroup.js +2 -2
- package/node/components/ActionGroup/SecondaryActions/SecondaryActions.d.ts +1 -1
- package/node/components/ActionGroup/SecondaryActions/SecondaryActions.js +2 -2
- package/node/components/ActionGroup/types.d.ts +9 -0
- package/node/components/DataGrid/Body/Body.d.ts +1 -1
- package/node/components/DataGrid/Body/Body.js +7 -3
- package/node/components/DataGrid/Body/types.d.ts +11 -3
- package/node/components/DataGrid/DataGrid.js +12 -5
- package/node/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.d.ts +3 -2
- package/node/components/DataGrid/DataGridContext/DataGridProvider/DataGridProvider.js +3 -2
- package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionContext.d.ts +25 -0
- package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionContext.js +16 -0
- package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/DataGridSelectionProvider.d.ts +7 -0
- package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/DataGridSelectionProvider.js +12 -0
- package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/index.d.ts +1 -0
- package/node/components/DataGrid/DataGridSelectionContext/DataGridSelectionProvider/index.js +17 -0
- package/node/components/DataGrid/DataGridSelectionContext/index.d.ts +2 -0
- package/node/components/DataGrid/DataGridSelectionContext/index.js +18 -0
- package/node/components/DataGrid/PinnedSections/PinnedSections.js +2 -2
- package/node/components/DataGrid/PinnedSections/useLogic/useLogic.d.ts +1 -0
- package/node/components/DataGrid/PinnedSections/useLogic/useLogic.js +4 -3
- package/node/components/DataGrid/Row/Row.js +13 -9
- package/node/components/DataGrid/Row/RowContext/RowContext.d.ts +15 -4
- package/node/components/DataGrid/Row/RowContext/RowContext.js +3 -3
- package/node/components/DataGrid/Row/RowContext/RowProvider/RowProvider.d.ts +10 -1
- package/node/components/DataGrid/Row/RowContext/RowProvider/RowProvider.js +23 -17
- package/node/components/DataGrid/Row/types.d.ts +7 -3
- package/node/components/DataGrid/Row/useLogic/useLogic.d.ts +6 -4
- package/node/components/DataGrid/Row/useLogic/useLogic.js +23 -14
- package/node/components/DataGrid/RowBase/RowBase.js +5 -2
- package/node/components/DataGrid/RowBase/types.d.ts +9 -5
- package/node/components/DataGrid/RowBase/useLogic/useLogic.d.ts +5 -4
- package/node/components/DataGrid/RowBase/useLogic/useLogic.js +16 -10
- package/node/components/DataGrid/RowCheckbox/RowCheckbox.d.ts +5 -0
- package/node/components/DataGrid/RowCheckbox/RowCheckbox.js +17 -0
- package/node/components/DataGrid/RowCheckbox/constants.d.ts +4 -0
- package/node/components/DataGrid/RowCheckbox/constants.js +7 -0
- package/node/components/DataGrid/RowCheckbox/index.d.ts +1 -0
- package/node/components/DataGrid/RowCheckbox/index.js +17 -0
- package/node/components/DataGrid/RowCheckbox/types.d.ts +7 -0
- package/node/components/DataGrid/RowCheckbox/types.js +2 -0
- package/node/components/DataGrid/constants.d.ts +2 -0
- package/node/components/DataGrid/constants.js +2 -0
- package/node/components/DataGrid/hooks/index.d.ts +1 -0
- package/node/components/DataGrid/hooks/index.js +1 -0
- package/node/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/index.d.ts +1 -0
- package/node/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/index.js +17 -0
- package/node/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/useWarnRowsWithoutDisabledReason.d.ts +5 -0
- package/node/components/DataGrid/hooks/useWarnRowsWithoutDisabledReason/useWarnRowsWithoutDisabledReason.js +21 -0
- package/node/components/DataGrid/index.d.ts +1 -1
- package/node/components/DataGrid/public.d.ts +1 -1
- package/node/components/DataGrid/styles.d.ts +4 -0
- package/node/components/DataGrid/styles.js +27 -1
- package/node/components/DataGrid/tests/performance/testDataGridPerformance.d.ts +3 -1
- package/node/components/DataGrid/tests/performance/testDataGridPerformance.js +232 -0
- package/node/components/DataGrid/tests/selection/testDataGridSelection.d.ts +14 -0
- package/node/components/DataGrid/tests/selection/testDataGridSelection.js +566 -0
- package/node/components/DataGrid/types.d.ts +41 -1
- package/node/components/DataGrid/useLogic/useLogic.d.ts +8 -3
- package/node/components/DataGrid/useLogic/useLogic.js +25 -12
- package/node/components/DataGrid/utils/checkIsMassActionsOpen/checkIsMassActionsOpen.d.ts +10 -0
- package/node/components/DataGrid/utils/checkIsMassActionsOpen/checkIsMassActionsOpen.js +8 -0
- package/node/components/DataGrid/utils/checkIsMassActionsOpen/index.d.ts +1 -0
- package/node/components/DataGrid/utils/checkIsMassActionsOpen/index.js +5 -0
- package/node/components/DataGrid/utils/getRowDisabledState/getRowDisabledState.d.ts +31 -0
- package/node/components/DataGrid/utils/getRowDisabledState/getRowDisabledState.js +24 -0
- package/node/components/DataGrid/utils/getRowDisabledState/index.d.ts +1 -0
- package/node/components/DataGrid/utils/getRowDisabledState/index.js +5 -0
- package/node/components/DataGrid/utils/index.d.ts +4 -0
- package/node/components/DataGrid/utils/index.js +9 -1
- package/node/components/DataGrid/utils/resolveRowDisabled/index.d.ts +1 -0
- package/node/components/DataGrid/utils/resolveRowDisabled/index.js +5 -0
- package/node/components/DataGrid/utils/resolveRowDisabled/resolveRowDisabled.d.ts +5 -0
- package/node/components/DataGrid/utils/resolveRowDisabled/resolveRowDisabled.js +21 -0
- package/node/components/DataGrid/utils/resolveRowsDisabled/index.d.ts +1 -0
- package/node/components/DataGrid/utils/resolveRowsDisabled/index.js +5 -0
- package/node/components/DataGrid/utils/resolveRowsDisabled/resolveRowsDisabled.d.ts +16 -0
- package/node/components/DataGrid/utils/resolveRowsDisabled/resolveRowsDisabled.js +21 -0
- package/node/components/DataGridActionCell/hooks/useBlockingActions/useBlockingActions.js +3 -3
- package/node/components/DataGridCollapsibleRow/useLogic/useLogic.d.ts +3 -2
- package/node/components/DataGridCollapsibleRow/useLogic/useLogic.js +4 -3
- package/node/components/DataGridInfinite/DataGridInfinite.js +19 -15
- package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.d.ts +1 -1
- package/node/components/DataGridInfinite/DataGridInfiniteContext/DataGridInfiniteContext.js +1 -1
- package/node/components/DataGridInfinite/Footer/Footer.d.ts +6 -0
- package/node/components/DataGridInfinite/Footer/Footer.js +29 -0
- package/node/components/DataGridInfinite/Footer/index.d.ts +2 -0
- package/node/components/DataGridInfinite/Footer/index.js +17 -0
- package/node/components/DataGridInfinite/Footer/types.d.ts +26 -0
- package/node/components/DataGridInfinite/Footer/types.js +2 -0
- package/node/components/DataGridInfinite/Row/Row.js +2 -2
- package/node/components/DataGridInfinite/Row/index.d.ts +1 -0
- package/node/components/DataGridInfinite/Row/types.d.ts +17 -2
- package/node/components/DataGridInfinite/Row/useLogic/useLogic.d.ts +4 -2
- package/node/components/DataGridInfinite/Row/useLogic/useLogic.js +12 -4
- package/node/components/DataGridInfinite/constants.d.ts +3 -0
- package/node/components/DataGridInfinite/constants.js +3 -0
- package/node/components/DataGridInfinite/faker.d.ts +1 -5
- package/node/components/DataGridInfinite/faker.js +1 -2
- package/node/components/DataGridInfinite/styles.d.ts +4 -0
- package/node/components/DataGridInfinite/styles.js +27 -3
- package/node/components/DataGridInfinite/useLogic/useLogic.d.ts +7 -3
- package/node/components/DataGridInfinite/useLogic/useLogic.js +52 -16
- package/node/components/DataGridMassActions/DataGridMassActions.d.ts +15 -0
- package/node/components/DataGridMassActions/DataGridMassActions.js +36 -0
- package/node/components/DataGridMassActions/constants.d.ts +4 -0
- package/node/components/DataGridMassActions/constants.js +8 -0
- package/node/components/DataGridMassActions/index.d.ts +2 -0
- package/node/components/DataGridMassActions/index.js +5 -0
- package/node/components/DataGridMassActions/public.d.ts +2 -0
- package/node/components/DataGridMassActions/public.js +5 -0
- package/node/components/DataGridMassActions/styles.d.ts +8 -0
- package/node/components/DataGridMassActions/styles.js +52 -0
- package/node/components/DataGridMassActions/tests/testDataGridMassActions.d.ts +23 -0
- package/node/components/DataGridMassActions/tests/testDataGridMassActions.js +81 -0
- package/node/components/DataGridMassActions/types.d.ts +2 -0
- package/node/components/DataGridMassActions/types.js +2 -0
- package/node/components/DataGridMassActions/useLogic/index.d.ts +1 -0
- package/node/components/DataGridMassActions/useLogic/index.js +17 -0
- package/node/components/DataGridMassActions/useLogic/useLogic.d.ts +6 -0
- package/node/components/DataGridMassActions/useLogic/useLogic.js +25 -0
- package/node/components/IconDropdownButton/IconDropdownButton.d.ts +5 -0
- package/node/components/IconDropdownButton/IconDropdownButton.js +2 -2
- package/node/components/MassActions/MassActions.d.ts +5 -0
- package/node/components/MassActions/MassActions.js +21 -0
- package/node/components/MassActions/constants.d.ts +6 -0
- package/node/components/MassActions/constants.js +15 -0
- package/node/components/MassActions/index.d.ts +2 -0
- package/node/components/MassActions/index.js +5 -0
- package/node/components/MassActions/styles.d.ts +34 -0
- package/node/components/MassActions/styles.js +46 -0
- package/node/components/MassActions/types.d.ts +20 -0
- package/node/components/MassActions/types.js +2 -0
- package/node/components/MassActions/useLogic/index.d.ts +1 -0
- package/node/components/MassActions/useLogic/index.js +17 -0
- package/node/components/MassActions/useLogic/useLogic.d.ts +7 -0
- package/node/components/MassActions/useLogic/useLogic.js +13 -0
- package/node/components/PageHeader/PageActions/SecondaryActions/styles.d.ts +1 -1
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.d.ts +0 -1
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/index.js +0 -1
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/useLogic.js +2 -1
- package/node/components/index.d.ts +1 -1
- package/package.json +1 -1
- /package/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/index.d.ts +0 -0
- /package/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/index.js +0 -0
- /package/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/useDelayedUnmount.d.ts +0 -0
- /package/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/useDelayedUnmount.js +0 -0
- /package/node/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/index.d.ts +0 -0
- /package/node/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/index.js +0 -0
- /package/node/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/useDelayedUnmount.d.ts +0 -0
- /package/node/components/{Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/useLogic/hooks/useDelayedUnmount → useDelayedUnmount}/useDelayedUnmount.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DataGrid } from './DataGrid';
|
|
2
|
-
export type { DataGridProps, DataGridRenderLink, DataGridRenderLinkParams, DataGridColumns, DataGridSingleColumn, DataGridRow, DataGridRowOptions, DataGridSort, DataGridRowWithOptions, DataGridRowOptionColumns, } from './types';
|
|
2
|
+
export type { DataGridProps, DataGridRenderLink, DataGridRenderLinkParams, DataGridColumns, DataGridSingleColumn, DataGridRow, DataGridRowOptions, DataGridRowDisabled, DataGridSort, DataGridRowWithOptions, DataGridRowOptionColumns, } from './types';
|
|
3
3
|
export { dataGridClassnames } from './constants';
|
|
4
4
|
export { MobileSkeleton } from './MobileSkeleton';
|
|
5
5
|
export { RowBase, type RowBaseProps } from './RowBase';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { dataGridClassnames } from './constants';
|
|
2
2
|
export { DataGrid } from './DataGrid';
|
|
3
|
-
export type { DataGridColumns, DataGridProps, DataGridRenderLink, DataGridRenderLinkParams, DataGridRow, DataGridRowOptionColumns, DataGridRowOptions, DataGridRowWithOptions, DataGridSort, } from './types';
|
|
3
|
+
export type { DataGridColumns, DataGridProps, DataGridRenderLink, DataGridRenderLinkParams, DataGridRow, DataGridRowDisabled, DataGridRowOptionColumns, DataGridRowOptions, DataGridRowWithOptions, DataGridSort, } from './types';
|
|
@@ -13,3 +13,7 @@ export declare const DisabledDataGridWrapper: import("@emotion/styled/dist/decla
|
|
|
13
13
|
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
14
14
|
theme?: import("@emotion/react").Theme | undefined;
|
|
15
15
|
}, {}, {}>;
|
|
16
|
+
export declare const MassActionsAnchor: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DisabledDataGridWrapper = exports.DataGridWrapper = exports.Container = void 0;
|
|
3
|
+
exports.MassActionsAnchor = exports.DisabledDataGridWrapper = exports.DataGridWrapper = exports.Container = void 0;
|
|
4
4
|
const styled_1 = require("../styled");
|
|
5
5
|
const constants_1 = require("./Body/constants");
|
|
6
6
|
const constants_2 = require("./Cell/constants");
|
|
@@ -10,6 +10,9 @@ const constants_4 = require("./Row/constants");
|
|
|
10
10
|
exports.Container = styled_1.styled.div `
|
|
11
11
|
--max-height: initial;
|
|
12
12
|
|
|
13
|
+
/* Место под открытой панелью массовых действий: высота панели + отступ */
|
|
14
|
+
--mass-actions-reserved-space: 96px;
|
|
15
|
+
|
|
13
16
|
position: relative;
|
|
14
17
|
|
|
15
18
|
overflow: hidden;
|
|
@@ -155,6 +158,24 @@ exports.Container = styled_1.styled.div `
|
|
|
155
158
|
}
|
|
156
159
|
}
|
|
157
160
|
}
|
|
161
|
+
|
|
162
|
+
&.${constants_3.dataGridClassnames.hasMassActions} {
|
|
163
|
+
/* Резерв места под панель массовых действий убирается одновременно с анимацией её скрытия, чтобы строки не прыгали */
|
|
164
|
+
& .${constants_3.dataGridClassnames.wrapper} .${constants_3.dataGridClassnames.body},
|
|
165
|
+
& .${constants_3.dataGridClassnames.pinnedSections} {
|
|
166
|
+
transition: padding-bottom
|
|
167
|
+
${({ theme }) => theme.transitions.duration.leavingScreen}ms
|
|
168
|
+
${({ theme }) => theme.transitions.easing.easeIn};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Пока панель массовых действий открыта, последние строки не должны перекрываться ею */
|
|
172
|
+
&.${constants_3.dataGridClassnames.massActionsOpen} {
|
|
173
|
+
& .${constants_3.dataGridClassnames.wrapper} .${constants_3.dataGridClassnames.body},
|
|
174
|
+
& .${constants_3.dataGridClassnames.pinnedSections} {
|
|
175
|
+
padding-bottom: var(--mass-actions-reserved-space);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
158
179
|
`;
|
|
159
180
|
exports.DataGridWrapper = styled_1.styled.div `
|
|
160
181
|
position: relative;
|
|
@@ -180,3 +201,8 @@ exports.DisabledDataGridWrapper = (0, styled_1.styled)(exports.DataGridWrapper)
|
|
|
180
201
|
opacity: 0.7;
|
|
181
202
|
}
|
|
182
203
|
`;
|
|
204
|
+
exports.MassActionsAnchor = styled_1.styled.div `
|
|
205
|
+
position: relative;
|
|
206
|
+
|
|
207
|
+
height: 0;
|
|
208
|
+
`;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
-
import { type DataGridColumns, type DataGridRowWithOptions } from '../../types';
|
|
2
|
+
import { type DataGridColumns, type DataGridProps, type DataGridRowDisabled, type DataGridRowWithOptions } from '../../types';
|
|
3
3
|
type RenderRow = (row: Record<string, unknown>, index: number) => ReactNode;
|
|
4
4
|
type GridRenderProps = {
|
|
5
5
|
rows: DataGridRowWithOptions<DataItem>[];
|
|
6
6
|
columns: DataGridColumns<DataItem>[];
|
|
7
7
|
selectedRows?: DataItem[];
|
|
8
8
|
onSelectRow?: (rows: DataItem[]) => void;
|
|
9
|
+
getRowDisabled?: (row: DataItem) => DataGridRowDisabled | undefined;
|
|
10
|
+
tree?: DataGridProps<DataItem>['tree'];
|
|
9
11
|
renderRow?: RenderRow;
|
|
10
12
|
onRetry: () => void;
|
|
11
13
|
};
|
|
@@ -10,6 +10,22 @@ const TEST_ROWS = [
|
|
|
10
10
|
{ id: '2', name: 'Petya' },
|
|
11
11
|
{ id: '3', name: 'Ivan' },
|
|
12
12
|
];
|
|
13
|
+
const TEST_ROWS_WITH_CHILDREN = [
|
|
14
|
+
...TEST_ROWS,
|
|
15
|
+
{
|
|
16
|
+
id: '4',
|
|
17
|
+
name: 'Package',
|
|
18
|
+
children: [{ id: '4-1', name: 'Nested' }],
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
const SELECTION_DISABLED = {
|
|
22
|
+
mode: 'selection',
|
|
23
|
+
reason: 'Документ отправляется',
|
|
24
|
+
};
|
|
25
|
+
const ROW_DISABLED = {
|
|
26
|
+
mode: 'row',
|
|
27
|
+
reason: 'Документ отправляется',
|
|
28
|
+
};
|
|
13
29
|
const testDataGridPerformance = ({ render, renderGrid, }) => {
|
|
14
30
|
const getRenderCountFor = (spy, id) => spy.mock.calls.filter(([row]) => row.id === id).length;
|
|
15
31
|
(0, vitest_1.it)('При клике на чекбокс перерендеривается только выбранная строка', async () => {
|
|
@@ -102,5 +118,221 @@ const testDataGridPerformance = ({ render, renderGrid, }) => {
|
|
|
102
118
|
(0, vitest_1.expect)(getRenderCountFor(renderCellSpy, '2')).toBe(0);
|
|
103
119
|
(0, vitest_1.expect)(getRenderCountFor(renderCellSpy, '3')).toBe(1);
|
|
104
120
|
});
|
|
121
|
+
(0, vitest_1.describe)('getRowDisabled', () => {
|
|
122
|
+
const createColumns = (renderCell) => [
|
|
123
|
+
{ field: 'name', label: 'Наименование', renderCell },
|
|
124
|
+
];
|
|
125
|
+
const getRenderCounts = (spy, ids) => Object.fromEntries(ids.map((id) => [id, getRenderCountFor(spy, id)]));
|
|
126
|
+
const setupSelectableGrid = () => {
|
|
127
|
+
const renderCellSpy = vitest_1.vi.fn((row) => row.name);
|
|
128
|
+
const getRowDisabledSpy = vitest_1.vi.fn(() => undefined);
|
|
129
|
+
const TestComponent = () => {
|
|
130
|
+
const [selectedRows, setSelectedRows] = (0, react_1.useState)([]);
|
|
131
|
+
const columns = (0, react_1.useMemo)(() => createColumns(renderCellSpy), []);
|
|
132
|
+
return renderGrid({
|
|
133
|
+
rows: TEST_ROWS,
|
|
134
|
+
columns,
|
|
135
|
+
selectedRows,
|
|
136
|
+
onSelectRow: setSelectedRows,
|
|
137
|
+
getRowDisabled: getRowDisabledSpy,
|
|
138
|
+
onRetry: () => { },
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
render((0, jsx_runtime_1.jsx)(TestComponent, {}));
|
|
142
|
+
renderCellSpy.mockClear();
|
|
143
|
+
getRowDisabledSpy.mockClear();
|
|
144
|
+
return { renderCellSpy, getRowDisabledSpy };
|
|
145
|
+
};
|
|
146
|
+
const setupParentRerender = () => {
|
|
147
|
+
const renderCellSpy = vitest_1.vi.fn((row) => row.name);
|
|
148
|
+
const getRowDisabledSpy = vitest_1.vi.fn(() => undefined);
|
|
149
|
+
const TestComponent = () => {
|
|
150
|
+
const [, setCounter] = (0, react_1.useState)(0);
|
|
151
|
+
const columns = (0, react_1.useMemo)(() => createColumns(renderCellSpy), []);
|
|
152
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => setCounter((value) => value + 1), children: "Rerender" }), renderGrid({
|
|
153
|
+
rows: TEST_ROWS,
|
|
154
|
+
columns,
|
|
155
|
+
selectedRows: [],
|
|
156
|
+
onSelectRow: () => { },
|
|
157
|
+
getRowDisabled: getRowDisabledSpy,
|
|
158
|
+
onRetry: () => { },
|
|
159
|
+
})] }));
|
|
160
|
+
};
|
|
161
|
+
render((0, jsx_runtime_1.jsx)(TestComponent, {}));
|
|
162
|
+
renderCellSpy.mockClear();
|
|
163
|
+
getRowDisabledSpy.mockClear();
|
|
164
|
+
return { renderCellSpy, getRowDisabledSpy };
|
|
165
|
+
};
|
|
166
|
+
const setupChangedResult = () => {
|
|
167
|
+
const renderCellSpy = vitest_1.vi.fn((row) => row.name);
|
|
168
|
+
const getRowDisabledSpy = vitest_1.vi.fn();
|
|
169
|
+
const TestComponent = () => {
|
|
170
|
+
const [lockedId, setLockedId] = (0, react_1.useState)();
|
|
171
|
+
const columns = (0, react_1.useMemo)(() => createColumns(renderCellSpy), []);
|
|
172
|
+
const getRowDisabled = (0, react_1.useCallback)((row) => {
|
|
173
|
+
getRowDisabledSpy(row);
|
|
174
|
+
return row.id === lockedId ? SELECTION_DISABLED : undefined;
|
|
175
|
+
}, [lockedId]);
|
|
176
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => setLockedId('2'), children: "Lock row 2" }), renderGrid({
|
|
177
|
+
rows: TEST_ROWS,
|
|
178
|
+
columns,
|
|
179
|
+
selectedRows: [],
|
|
180
|
+
onSelectRow: () => { },
|
|
181
|
+
getRowDisabled,
|
|
182
|
+
onRetry: () => { },
|
|
183
|
+
})] }));
|
|
184
|
+
};
|
|
185
|
+
render((0, jsx_runtime_1.jsx)(TestComponent, {}));
|
|
186
|
+
renderCellSpy.mockClear();
|
|
187
|
+
getRowDisabledSpy.mockClear();
|
|
188
|
+
return { renderCellSpy, getRowDisabledSpy };
|
|
189
|
+
};
|
|
190
|
+
const setupSameResult = () => {
|
|
191
|
+
const renderCellSpy = vitest_1.vi.fn((row) => row.name);
|
|
192
|
+
const getRowDisabledSpy = vitest_1.vi.fn();
|
|
193
|
+
const TestComponent = () => {
|
|
194
|
+
const [counter, setCounter] = (0, react_1.useState)(0);
|
|
195
|
+
const columns = (0, react_1.useMemo)(() => createColumns(renderCellSpy), []);
|
|
196
|
+
const getRowDisabled = (0, react_1.useCallback)((row) => {
|
|
197
|
+
getRowDisabledSpy(row);
|
|
198
|
+
return undefined;
|
|
199
|
+
}, [counter]);
|
|
200
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => setCounter((value) => value + 1), children: "New function" }), renderGrid({
|
|
201
|
+
rows: TEST_ROWS_WITH_CHILDREN,
|
|
202
|
+
columns,
|
|
203
|
+
selectedRows: [],
|
|
204
|
+
onSelectRow: () => { },
|
|
205
|
+
getRowDisabled,
|
|
206
|
+
tree: { isInitialExpanded: true },
|
|
207
|
+
onRetry: () => { },
|
|
208
|
+
})] }));
|
|
209
|
+
};
|
|
210
|
+
render((0, jsx_runtime_1.jsx)(TestComponent, {}));
|
|
211
|
+
renderCellSpy.mockClear();
|
|
212
|
+
getRowDisabledSpy.mockClear();
|
|
213
|
+
return { renderCellSpy, getRowDisabledSpy };
|
|
214
|
+
};
|
|
215
|
+
(0, vitest_1.describe)('Клик на чекбокс', () => {
|
|
216
|
+
(0, vitest_1.it)('Перерендеривается только выбранная строка', async () => {
|
|
217
|
+
const { renderCellSpy } = setupSelectableGrid();
|
|
218
|
+
// 0 - "Выбрать все", 1 - первая строка
|
|
219
|
+
await tests_1.userEvents.click(tests_1.screen.getAllByRole('checkbox')[2]);
|
|
220
|
+
(0, vitest_1.expect)(getRenderCounts(renderCellSpy, ['1', '2', '3'])).toEqual({
|
|
221
|
+
'1': 0,
|
|
222
|
+
'2': 1,
|
|
223
|
+
'3': 0,
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
(0, vitest_1.it)('getRowDisabled не вызывается', async () => {
|
|
227
|
+
const { getRowDisabledSpy } = setupSelectableGrid();
|
|
228
|
+
await tests_1.userEvents.click(tests_1.screen.getAllByRole('checkbox')[2]);
|
|
229
|
+
(0, vitest_1.expect)(getRowDisabledSpy).not.toHaveBeenCalled();
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
(0, vitest_1.it)('getRowDisabled не вызывается при «Выбрать все»', async () => {
|
|
233
|
+
const { getRowDisabledSpy } = setupSelectableGrid();
|
|
234
|
+
await tests_1.userEvents.click(tests_1.screen.getAllByRole('checkbox')[0]);
|
|
235
|
+
(0, vitest_1.expect)(getRowDisabledSpy).not.toHaveBeenCalled();
|
|
236
|
+
});
|
|
237
|
+
(0, vitest_1.describe)('Перерисовка родителя со стабильной функцией', () => {
|
|
238
|
+
(0, vitest_1.it)('Строки не перерисовываются', async () => {
|
|
239
|
+
const { renderCellSpy } = setupParentRerender();
|
|
240
|
+
await tests_1.userEvents.click(tests_1.screen.getByText('Rerender'));
|
|
241
|
+
(0, vitest_1.expect)(renderCellSpy).not.toHaveBeenCalled();
|
|
242
|
+
});
|
|
243
|
+
(0, vitest_1.it)('getRowDisabled не вызывается', async () => {
|
|
244
|
+
const { getRowDisabledSpy } = setupParentRerender();
|
|
245
|
+
await tests_1.userEvents.click(tests_1.screen.getByText('Rerender'));
|
|
246
|
+
(0, vitest_1.expect)(getRowDisabledSpy).not.toHaveBeenCalled();
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
(0, vitest_1.describe)('Новая функция с изменившимся результатом', () => {
|
|
250
|
+
(0, vitest_1.it)('Перерендеривается только строка с изменившимся результатом', async () => {
|
|
251
|
+
const { renderCellSpy } = setupChangedResult();
|
|
252
|
+
await tests_1.userEvents.click(tests_1.screen.getByText('Lock row 2'));
|
|
253
|
+
(0, vitest_1.expect)(getRenderCounts(renderCellSpy, ['1', '2', '3'])).toEqual({
|
|
254
|
+
'1': 0,
|
|
255
|
+
'2': 1,
|
|
256
|
+
'3': 0,
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
(0, vitest_1.it)('getRowDisabled вызывается один раз на строку', async () => {
|
|
260
|
+
const { getRowDisabledSpy } = setupChangedResult();
|
|
261
|
+
await tests_1.userEvents.click(tests_1.screen.getByText('Lock row 2'));
|
|
262
|
+
(0, vitest_1.expect)(getRowDisabledSpy).toHaveBeenCalledTimes(TEST_ROWS.length);
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
(0, vitest_1.describe)('Новая функция с тем же результатом', () => {
|
|
266
|
+
(0, vitest_1.it)('Перерисовываются только строки с дочерними элементами', async () => {
|
|
267
|
+
const { renderCellSpy } = setupSameResult();
|
|
268
|
+
await tests_1.userEvents.click(tests_1.screen.getByText('New function'));
|
|
269
|
+
(0, vitest_1.expect)(getRenderCounts(renderCellSpy, ['1', '2', '3', '4', '4-1'])).toEqual({ '1': 0, '2': 0, '3': 0, '4': 1, '4-1': 1 });
|
|
270
|
+
});
|
|
271
|
+
(0, vitest_1.it)('getRowDisabled вызывается один раз на строку, включая вложенную', async () => {
|
|
272
|
+
const { getRowDisabledSpy } = setupSameResult();
|
|
273
|
+
await tests_1.userEvents.click(tests_1.screen.getByText('New function'));
|
|
274
|
+
// 4 строки и 1 вложенная
|
|
275
|
+
(0, vitest_1.expect)(getRowDisabledSpy).toHaveBeenCalledTimes(5);
|
|
276
|
+
});
|
|
277
|
+
});
|
|
278
|
+
// Virtuoso отдаёт строкам новые данные на рендер позже родителя: состояние строки
|
|
279
|
+
// не должно приходить раньше данных и перерисовывать строку дважды
|
|
280
|
+
(0, vitest_1.describe)('Новые rows вместе с изменением состояния строки', () => {
|
|
281
|
+
const createVersionRows = (version) => TEST_ROWS.map((row) => ({ ...row, name: `${row.name} v${version}` }));
|
|
282
|
+
const setupRowsUpdate = () => {
|
|
283
|
+
const renderCellSpy = vitest_1.vi.fn((row) => row.name);
|
|
284
|
+
const TestComponent = () => {
|
|
285
|
+
const [version, setVersion] = (0, react_1.useState)(0);
|
|
286
|
+
const [isOptionsLocked, setOptionsLocked] = (0, react_1.useState)(false);
|
|
287
|
+
const [lockedId, setLockedId] = (0, react_1.useState)();
|
|
288
|
+
const [selectedRows, setSelectedRows] = (0, react_1.useState)([]);
|
|
289
|
+
const columns = (0, react_1.useMemo)(() => createColumns(renderCellSpy), []);
|
|
290
|
+
const versionRows = (0, react_1.useMemo)(() => createVersionRows(version), [version]);
|
|
291
|
+
// Заново создаётся только заблокированная строка, остальные сохраняют ссылки
|
|
292
|
+
const rows = (0, react_1.useMemo)(() => versionRows.map((row) => isOptionsLocked && row.id === '2'
|
|
293
|
+
? { ...row, options: { isDisabled: true } }
|
|
294
|
+
: row), [versionRows, isOptionsLocked]);
|
|
295
|
+
const getRowDisabled = (0, react_1.useCallback)((row) => (row.id === lockedId ? ROW_DISABLED : undefined), [lockedId]);
|
|
296
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { onClick: () => setOptionsLocked(true), children: "Lock via options" }), (0, jsx_runtime_1.jsx)("button", { onClick: () => {
|
|
297
|
+
setVersion(1);
|
|
298
|
+
setSelectedRows([TEST_ROWS[1]]);
|
|
299
|
+
}, children: "Refetch and select" }), (0, jsx_runtime_1.jsx)("button", { onClick: () => {
|
|
300
|
+
setVersion(1);
|
|
301
|
+
setLockedId('2');
|
|
302
|
+
}, children: "Refetch and lock" }), renderGrid({
|
|
303
|
+
rows,
|
|
304
|
+
columns,
|
|
305
|
+
selectedRows,
|
|
306
|
+
onSelectRow: setSelectedRows,
|
|
307
|
+
getRowDisabled,
|
|
308
|
+
onRetry: () => { },
|
|
309
|
+
})] }));
|
|
310
|
+
};
|
|
311
|
+
render((0, jsx_runtime_1.jsx)(TestComponent, {}));
|
|
312
|
+
renderCellSpy.mockClear();
|
|
313
|
+
return { renderCellSpy };
|
|
314
|
+
};
|
|
315
|
+
(0, vitest_1.it)('Строка перерисовывается один раз при блокировке через options', async () => {
|
|
316
|
+
const { renderCellSpy } = setupRowsUpdate();
|
|
317
|
+
await tests_1.userEvents.click(tests_1.screen.getByText('Lock via options'));
|
|
318
|
+
(0, vitest_1.expect)(getRenderCounts(renderCellSpy, ['1', '2', '3'])).toEqual({
|
|
319
|
+
'1': 0,
|
|
320
|
+
'2': 1,
|
|
321
|
+
'3': 0,
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
vitest_1.it.each([
|
|
325
|
+
{ condition: 'изменении выбора', action: 'Refetch and select' },
|
|
326
|
+
{
|
|
327
|
+
condition: 'блокировке через getRowDisabled',
|
|
328
|
+
action: 'Refetch and lock',
|
|
329
|
+
},
|
|
330
|
+
])('Строки перерисовываются один раз и сразу с новыми данными при $condition', async ({ action }) => {
|
|
331
|
+
const { renderCellSpy } = setupRowsUpdate();
|
|
332
|
+
await tests_1.userEvents.click(tests_1.screen.getByText(action));
|
|
333
|
+
(0, vitest_1.expect)(renderCellSpy.mock.calls.map(([row]) => row.name)).toEqual(['Vasya v1', 'Petya v1', 'Ivan v1']);
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
});
|
|
105
337
|
};
|
|
106
338
|
exports.testDataGridPerformance = testDataGridPerformance;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RenderResult } from '@ui/dev/tests';
|
|
2
|
+
import { type ReactElement } from 'react';
|
|
3
|
+
import { type DataGridProps } from '../../types';
|
|
4
|
+
type DataItem = {
|
|
5
|
+
id: string | number;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
type GridRenderProps = Pick<DataGridProps<DataItem>, 'rows' | 'columns' | 'selectedRows' | 'onSelectRow' | 'getRowDisabled' | 'onRowClick' | 'variant' | 'tree' | 'onRetry'>;
|
|
9
|
+
type TestDataGridSelectionParams = {
|
|
10
|
+
render: (ui: ReactElement) => Pick<RenderResult, 'rerender'>;
|
|
11
|
+
renderGrid: (props: GridRenderProps) => ReactElement;
|
|
12
|
+
};
|
|
13
|
+
export declare const testDataGridSelection: ({ render, renderGrid, }: TestDataGridSelectionParams) => void;
|
|
14
|
+
export {};
|