@mui/x-data-grid 7.0.0-beta.3 → 7.0.0-beta.5
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/CHANGELOG.md +357 -22
- package/DataGrid/DataGrid.js +2 -0
- package/colDef/gridActionsColDef.js +1 -0
- package/colDef/gridBooleanColDef.js +1 -0
- package/colDef/gridBooleanOperators.js +1 -1
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/components/GridRow.d.ts +7 -9
- package/components/GridRow.js +36 -47
- package/components/GridScrollbarFillerCell.js +6 -21
- package/components/cell/GridCell.d.ts +2 -1
- package/components/cell/GridCell.js +17 -15
- package/components/cell/GridSkeletonCell.d.ts +3 -2
- package/components/cell/GridSkeletonCell.js +14 -6
- package/components/columnSelection/GridCellCheckboxRenderer.js +7 -6
- package/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/components/containers/GridRootStyles.js +59 -21
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +8 -2
- package/components/virtualization/GridBottomContainer.js +1 -1
- package/components/virtualization/GridTopContainer.js +1 -1
- package/components/virtualization/GridVirtualScroller.js +2 -2
- package/components/virtualization/GridVirtualScrollerRenderZone.js +9 -3
- package/constants/gridClasses.d.ts +24 -8
- package/constants/gridClasses.js +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -8
- package/hooks/features/columns/gridColumnsSelector.d.ts +6 -0
- package/hooks/features/columns/gridColumnsSelector.js +8 -1
- package/hooks/features/columns/useGridColumns.js +4 -0
- package/hooks/features/editing/useGridCellEditing.js +3 -4
- package/hooks/features/editing/useGridRowEditing.js +4 -6
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/rows/useGridRows.js +8 -4
- package/hooks/features/rows/useGridRowsMeta.js +5 -13
- package/hooks/features/sorting/gridSortingUtils.js +9 -1
- package/hooks/features/sorting/useGridSorting.js +1 -2
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +0 -9
- package/hooks/features/virtualization/gridVirtualizationSelectors.js +0 -7
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +3 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +82 -138
- package/hooks/features/virtualization/useGridVirtualization.d.ts +0 -8
- package/hooks/features/virtualization/useGridVirtualization.js +1 -6
- package/hooks/utils/useTimeout.d.ts +5 -3
- package/hooks/utils/useTimeout.js +13 -5
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/models/colDef/gridColDef.d.ts +13 -0
- package/modern/DataGrid/DataGrid.js +2 -0
- package/modern/colDef/gridActionsColDef.js +1 -0
- package/modern/colDef/gridBooleanColDef.js +1 -0
- package/modern/colDef/gridBooleanOperators.js +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/modern/components/GridRow.js +35 -46
- package/modern/components/GridScrollbarFillerCell.js +6 -21
- package/modern/components/cell/GridCell.js +17 -15
- package/modern/components/cell/GridSkeletonCell.js +14 -6
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +7 -6
- package/modern/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/modern/components/containers/GridRootStyles.js +59 -21
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +8 -2
- package/modern/components/virtualization/GridBottomContainer.js +1 -1
- package/modern/components/virtualization/GridTopContainer.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +2 -2
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +8 -3
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -8
- package/modern/hooks/features/columns/gridColumnsSelector.js +8 -1
- package/modern/hooks/features/columns/useGridColumns.js +2 -0
- package/modern/hooks/features/editing/useGridCellEditing.js +3 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +4 -6
- package/modern/hooks/features/filter/useGridFilter.js +2 -2
- package/modern/hooks/features/rows/useGridRows.js +8 -4
- package/modern/hooks/features/rows/useGridRowsMeta.js +5 -13
- package/modern/hooks/features/sorting/gridSortingUtils.js +9 -1
- package/modern/hooks/features/sorting/useGridSorting.js +1 -2
- package/modern/hooks/features/virtualization/gridVirtualizationSelectors.js +0 -7
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +80 -136
- package/modern/hooks/features/virtualization/useGridVirtualization.js +1 -6
- package/modern/hooks/utils/useTimeout.js +13 -5
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/utils/keyboardUtils.js +20 -11
- package/modern/utils/utils.js +9 -0
- package/node/DataGrid/DataGrid.js +1 -0
- package/node/colDef/gridActionsColDef.js +1 -0
- package/node/colDef/gridBooleanColDef.js +1 -0
- package/node/colDef/gridBooleanOperators.js +1 -1
- package/node/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/node/components/GridRow.js +35 -46
- package/node/components/GridScrollbarFillerCell.js +5 -20
- package/node/components/cell/GridCell.js +17 -15
- package/node/components/cell/GridSkeletonCell.js +15 -7
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +7 -6
- package/node/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/node/components/containers/GridRootStyles.js +59 -21
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +8 -2
- package/node/components/virtualization/GridBottomContainer.js +1 -1
- package/node/components/virtualization/GridTopContainer.js +1 -1
- package/node/components/virtualization/GridVirtualScroller.js +2 -2
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +7 -2
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +8 -5
- package/node/hooks/features/columns/gridColumnsSelector.js +9 -2
- package/node/hooks/features/columns/useGridColumns.js +2 -0
- package/node/hooks/features/editing/useGridCellEditing.js +2 -3
- package/node/hooks/features/editing/useGridRowEditing.js +3 -5
- package/node/hooks/features/filter/useGridFilter.js +2 -2
- package/node/hooks/features/rows/useGridRows.js +8 -4
- package/node/hooks/features/rows/useGridRowsMeta.js +5 -13
- package/node/hooks/features/sorting/gridSortingUtils.js +9 -1
- package/node/hooks/features/sorting/useGridSorting.js +1 -2
- package/node/hooks/features/virtualization/gridVirtualizationSelectors.js +1 -8
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +81 -136
- package/node/hooks/features/virtualization/useGridVirtualization.js +2 -7
- package/node/hooks/utils/useTimeout.js +13 -4
- package/node/index.js +1 -1
- package/node/internals/index.js +7 -0
- package/node/utils/keyboardUtils.js +25 -20
- package/node/utils/utils.js +12 -1
- package/package.json +1 -1
- package/utils/keyboardUtils.d.ts +7 -6
- package/utils/keyboardUtils.js +20 -11
- package/utils/utils.d.ts +4 -0
- package/utils/utils.js +9 -0
- package/legacy/DataGrid/DataGrid.js +0 -664
- package/legacy/DataGrid/index.js +0 -2
- package/legacy/DataGrid/useDataGridComponent.js +0 -81
- package/legacy/DataGrid/useDataGridProps.js +0 -98
- package/legacy/colDef/gridActionsColDef.js +0 -18
- package/legacy/colDef/gridBooleanColDef.js +0 -42
- package/legacy/colDef/gridBooleanOperators.js +0 -16
- package/legacy/colDef/gridCheckboxSelectionColDef.js +0 -33
- package/legacy/colDef/gridDateColDef.js +0 -62
- package/legacy/colDef/gridDateOperators.js +0 -115
- package/legacy/colDef/gridDefaultColumnTypes.js +0 -19
- package/legacy/colDef/gridNumericColDef.js +0 -19
- package/legacy/colDef/gridNumericOperators.js +0 -145
- package/legacy/colDef/gridSingleSelectColDef.js +0 -64
- package/legacy/colDef/gridSingleSelectOperators.js +0 -46
- package/legacy/colDef/gridStringColDef.js +0 -27
- package/legacy/colDef/gridStringOperators.js +0 -112
- package/legacy/colDef/index.js +0 -13
- package/legacy/components/GridApiContext.js +0 -5
- package/legacy/components/GridColumnHeaders.js +0 -94
- package/legacy/components/GridDetailPanels.js +0 -4
- package/legacy/components/GridFooter.js +0 -42
- package/legacy/components/GridHeader.js +0 -13
- package/legacy/components/GridHeaders.js +0 -53
- package/legacy/components/GridLoadingOverlay.js +0 -21
- package/legacy/components/GridNoResultsOverlay.js +0 -14
- package/legacy/components/GridNoRowsOverlay.js +0 -23
- package/legacy/components/GridPagination.js +0 -85
- package/legacy/components/GridPinnedRows.js +0 -4
- package/legacy/components/GridRow.js +0 -465
- package/legacy/components/GridRowCount.js +0 -63
- package/legacy/components/GridScrollbarFillerCell.js +0 -34
- package/legacy/components/GridSelectedRowCount.js +0 -66
- package/legacy/components/base/GridBody.js +0 -2
- package/legacy/components/base/GridFooterPlaceholder.js +0 -12
- package/legacy/components/base/GridOverlays.js +0 -122
- package/legacy/components/base/index.js +0 -3
- package/legacy/components/cell/GridActionsCell.js +0 -294
- package/legacy/components/cell/GridActionsCellItem.js +0 -69
- package/legacy/components/cell/GridBooleanCell.js +0 -121
- package/legacy/components/cell/GridCell.js +0 -350
- package/legacy/components/cell/GridEditBooleanCell.js +0 -174
- package/legacy/components/cell/GridEditDateCell.js +0 -230
- package/legacy/components/cell/GridEditInputCell.js +0 -198
- package/legacy/components/cell/GridEditSingleSelectCell.js +0 -231
- package/legacy/components/cell/GridSkeletonCell.js +0 -52
- package/legacy/components/cell/index.js +0 -9
- package/legacy/components/columnHeaders/ColumnHeaderMenuIcon.js +0 -59
- package/legacy/components/columnHeaders/GridBaseColumnHeaders.js +0 -41
- package/legacy/components/columnHeaders/GridColumnGroupHeader.js +0 -132
- package/legacy/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -93
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +0 -212
- package/legacy/components/columnHeaders/GridColumnHeaderSeparator.js +0 -71
- package/legacy/components/columnHeaders/GridColumnHeaderSortIcon.js +0 -79
- package/legacy/components/columnHeaders/GridColumnHeaderTitle.js +0 -84
- package/legacy/components/columnHeaders/GridColumnHeadersInner.js +0 -55
- package/legacy/components/columnHeaders/GridGenericColumnHeaderItem.js +0 -107
- package/legacy/components/columnHeaders/GridIconButtonContainer.js +0 -41
- package/legacy/components/columnHeaders/index.js +0 -5
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +0 -160
- package/legacy/components/columnSelection/GridHeaderCheckbox.js +0 -134
- package/legacy/components/columnSelection/index.js +0 -2
- package/legacy/components/columnsManagement/GridColumnsManagement.js +0 -307
- package/legacy/components/columnsManagement/index.js +0 -1
- package/legacy/components/columnsManagement/utils.js +0 -22
- package/legacy/components/containers/GridFooterContainer.js +0 -50
- package/legacy/components/containers/GridOverlay.js +0 -52
- package/legacy/components/containers/GridRoot.js +0 -79
- package/legacy/components/containers/GridRootStyles.js +0 -395
- package/legacy/components/containers/GridToolbarContainer.js +0 -59
- package/legacy/components/containers/index.js +0 -4
- package/legacy/components/index.js +0 -19
- package/legacy/components/menu/GridMenu.js +0 -132
- package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +0 -61
- package/legacy/components/menu/columnMenu/GridColumnMenu.js +0 -81
- package/legacy/components/menu/columnMenu/GridColumnMenuContainer.js +0 -56
- package/legacy/components/menu/columnMenu/GridColumnMenuItemProps.js +0 -1
- package/legacy/components/menu/columnMenu/GridColumnMenuProps.js +0 -1
- package/legacy/components/menu/columnMenu/index.js +0 -9
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +0 -21
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +0 -41
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +0 -60
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +0 -41
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +0 -80
- package/legacy/components/menu/columnMenu/menuItems/index.js +0 -5
- package/legacy/components/menu/index.js +0 -2
- package/legacy/components/panel/GridColumnsPanel.js +0 -22
- package/legacy/components/panel/GridPanel.js +0 -137
- package/legacy/components/panel/GridPanelContent.js +0 -49
- package/legacy/components/panel/GridPanelFooter.js +0 -50
- package/legacy/components/panel/GridPanelHeader.js +0 -48
- package/legacy/components/panel/GridPanelWrapper.js +0 -64
- package/legacy/components/panel/GridPreferencesPanel.js +0 -26
- package/legacy/components/panel/filterPanel/GridFilterForm.js +0 -528
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +0 -118
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +0 -121
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -116
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +0 -102
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +0 -149
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +0 -106
- package/legacy/components/panel/filterPanel/GridFilterInputValueProps.js +0 -1
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +0 -264
- package/legacy/components/panel/filterPanel/filterPanelUtils.js +0 -22
- package/legacy/components/panel/filterPanel/index.js +0 -9
- package/legacy/components/panel/index.js +0 -7
- package/legacy/components/reexportable.js +0 -1
- package/legacy/components/toolbar/GridToolbar.js +0 -64
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +0 -68
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +0 -142
- package/legacy/components/toolbar/GridToolbarExport.js +0 -80
- package/legacy/components/toolbar/GridToolbarExportContainer.js +0 -105
- package/legacy/components/toolbar/GridToolbarFilterButton.js +0 -136
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +0 -164
- package/legacy/components/toolbar/index.js +0 -7
- package/legacy/components/virtualization/GridBottomContainer.js +0 -25
- package/legacy/components/virtualization/GridMainContainer.js +0 -20
- package/legacy/components/virtualization/GridTopContainer.js +0 -35
- package/legacy/components/virtualization/GridVirtualScrollbar.js +0 -129
- package/legacy/components/virtualization/GridVirtualScroller.js +0 -93
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +0 -35
- package/legacy/components/virtualization/GridVirtualScrollerFiller.js +0 -70
- package/legacy/components/virtualization/GridVirtualScrollerRenderZone.js +0 -49
- package/legacy/constants/defaultGridSlotsComponents.js +0 -33
- package/legacy/constants/envConstants.js +0 -19
- package/legacy/constants/gridClasses.js +0 -5
- package/legacy/constants/gridDetailPanelToggleField.js +0 -2
- package/legacy/constants/index.js +0 -3
- package/legacy/constants/localeTextConstants.js +0 -158
- package/legacy/context/GridContextProvider.js +0 -21
- package/legacy/context/GridRootPropsContext.js +0 -6
- package/legacy/context/index.js +0 -1
- package/legacy/hooks/core/gridCoreSelector.js +0 -7
- package/legacy/hooks/core/index.js +0 -1
- package/legacy/hooks/core/pipeProcessing/gridPipeProcessingApi.js +0 -1
- package/legacy/hooks/core/pipeProcessing/index.js +0 -4
- package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +0 -114
- package/legacy/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +0 -26
- package/legacy/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +0 -26
- package/legacy/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +0 -1
- package/legacy/hooks/core/strategyProcessing/index.js +0 -3
- package/legacy/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +0 -18
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +0 -116
- package/legacy/hooks/core/useGridApiInitialization.js +0 -124
- package/legacy/hooks/core/useGridInitialization.js +0 -26
- package/legacy/hooks/core/useGridLocaleText.js +0 -12
- package/legacy/hooks/core/useGridLoggerFactory.js +0 -51
- package/legacy/hooks/core/useGridRefs.js +0 -13
- package/legacy/hooks/core/useGridStateInitialization.js +0 -106
- package/legacy/hooks/core/useGridTheme.js +0 -21
- package/legacy/hooks/features/clipboard/useGridClipboard.js +0 -92
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsInterfaces.js +0 -1
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsSelector.js +0 -24
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsUtils.js +0 -92
- package/legacy/hooks/features/columnGrouping/index.js +0 -2
- package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +0 -140
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +0 -272
- package/legacy/hooks/features/columnMenu/columnMenuInterfaces.js +0 -1
- package/legacy/hooks/features/columnMenu/columnMenuSelector.js +0 -3
- package/legacy/hooks/features/columnMenu/index.js +0 -2
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +0 -108
- package/legacy/hooks/features/columnMenu/useGridColumnMenuSlots.js +0 -71
- package/legacy/hooks/features/columns/gridColumnsInterfaces.js +0 -9
- package/legacy/hooks/features/columns/gridColumnsSelector.js +0 -174
- package/legacy/hooks/features/columns/gridColumnsUtils.js +0 -338
- package/legacy/hooks/features/columns/index.js +0 -2
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +0 -105
- package/legacy/hooks/features/columns/useGridColumns.js +0 -319
- package/legacy/hooks/features/density/densitySelector.js +0 -10
- package/legacy/hooks/features/density/densityState.js +0 -1
- package/legacy/hooks/features/density/index.js +0 -2
- package/legacy/hooks/features/density/useGridDensity.js +0 -48
- package/legacy/hooks/features/dimensions/gridDimensionsApi.js +0 -1
- package/legacy/hooks/features/dimensions/gridDimensionsSelectors.js +0 -3
- package/legacy/hooks/features/dimensions/index.js +0 -2
- package/legacy/hooks/features/dimensions/useGridDimensions.js +0 -302
- package/legacy/hooks/features/editing/gridEditingSelectors.js +0 -4
- package/legacy/hooks/features/editing/useGridCellEditing.js +0 -456
- package/legacy/hooks/features/editing/useGridEditing.js +0 -145
- package/legacy/hooks/features/editing/useGridRowEditing.js +0 -567
- package/legacy/hooks/features/events/useGridEvents.js +0 -23
- package/legacy/hooks/features/export/serializers/csvSerializer.js +0 -155
- package/legacy/hooks/features/export/useGridCsvExport.js +0 -75
- package/legacy/hooks/features/export/useGridPrintExport.js +0 -313
- package/legacy/hooks/features/export/utils.js +0 -49
- package/legacy/hooks/features/filter/gridFilterSelector.js +0 -165
- package/legacy/hooks/features/filter/gridFilterState.js +0 -20
- package/legacy/hooks/features/filter/gridFilterUtils.js +0 -330
- package/legacy/hooks/features/filter/index.js +0 -2
- package/legacy/hooks/features/filter/useGridFilter.js +0 -378
- package/legacy/hooks/features/focus/gridFocusState.js +0 -1
- package/legacy/hooks/features/focus/gridFocusStateSelector.js +0 -31
- package/legacy/hooks/features/focus/index.js +0 -2
- package/legacy/hooks/features/focus/useGridFocus.js +0 -408
- package/legacy/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +0 -10
- package/legacy/hooks/features/headerFiltering/index.js +0 -1
- package/legacy/hooks/features/headerFiltering/useGridHeaderFiltering.js +0 -93
- package/legacy/hooks/features/index.js +0 -16
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +0 -565
- package/legacy/hooks/features/pagination/gridPaginationInterfaces.js +0 -1
- package/legacy/hooks/features/pagination/gridPaginationSelector.js +0 -115
- package/legacy/hooks/features/pagination/gridPaginationUtils.js +0 -31
- package/legacy/hooks/features/pagination/index.js +0 -2
- package/legacy/hooks/features/pagination/useGridPagination.js +0 -175
- package/legacy/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +0 -3
- package/legacy/hooks/features/preferencesPanel/gridPreferencePanelState.js +0 -1
- package/legacy/hooks/features/preferencesPanel/gridPreferencePanelsValue.js +0 -6
- package/legacy/hooks/features/preferencesPanel/index.js +0 -3
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +0 -125
- package/legacy/hooks/features/rowSelection/gridRowSelectionSelector.js +0 -19
- package/legacy/hooks/features/rowSelection/index.js +0 -1
- package/legacy/hooks/features/rowSelection/useGridRowSelection.js +0 -419
- package/legacy/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +0 -45
- package/legacy/hooks/features/rowSelection/utils.js +0 -8
- package/legacy/hooks/features/rows/gridRowsInterfaces.js +0 -1
- package/legacy/hooks/features/rows/gridRowsMetaSelector.js +0 -3
- package/legacy/hooks/features/rows/gridRowsMetaState.js +0 -1
- package/legacy/hooks/features/rows/gridRowsSelector.js +0 -90
- package/legacy/hooks/features/rows/gridRowsUtils.js +0 -294
- package/legacy/hooks/features/rows/index.js +0 -4
- package/legacy/hooks/features/rows/useGridParamsApi.js +0 -142
- package/legacy/hooks/features/rows/useGridRows.js +0 -466
- package/legacy/hooks/features/rows/useGridRowsMeta.js +0 -236
- package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +0 -82
- package/legacy/hooks/features/scroll/useGridScroll.js +0 -133
- package/legacy/hooks/features/sorting/gridSortingSelector.js +0 -56
- package/legacy/hooks/features/sorting/gridSortingState.js +0 -1
- package/legacy/hooks/features/sorting/gridSortingUtils.js +0 -154
- package/legacy/hooks/features/sorting/index.js +0 -2
- package/legacy/hooks/features/sorting/useGridSorting.js +0 -276
- package/legacy/hooks/features/statePersistence/gridStatePersistenceInterface.js +0 -1
- package/legacy/hooks/features/statePersistence/index.js +0 -1
- package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +0 -25
- package/legacy/hooks/features/virtualization/gridVirtualizationSelectors.js +0 -61
- package/legacy/hooks/features/virtualization/index.js +0 -2
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +0 -646
- package/legacy/hooks/features/virtualization/useGridVirtualization.js +0 -63
- package/legacy/hooks/index.js +0 -3
- package/legacy/hooks/utils/index.js +0 -9
- package/legacy/hooks/utils/useFirstRender.js +0 -8
- package/legacy/hooks/utils/useGridApiContext.js +0 -9
- package/legacy/hooks/utils/useGridApiEventHandler.js +0 -105
- package/legacy/hooks/utils/useGridApiMethod.js +0 -11
- package/legacy/hooks/utils/useGridApiRef.js +0 -7
- package/legacy/hooks/utils/useGridAriaAttributes.js +0 -25
- package/legacy/hooks/utils/useGridInitializeState.js +0 -8
- package/legacy/hooks/utils/useGridLogger.js +0 -10
- package/legacy/hooks/utils/useGridNativeEventListener.js +0 -32
- package/legacy/hooks/utils/useGridPrivateApiContext.js +0 -12
- package/legacy/hooks/utils/useGridRootProps.js +0 -9
- package/legacy/hooks/utils/useGridSelector.js +0 -54
- package/legacy/hooks/utils/useGridVisibleRows.js +0 -42
- package/legacy/hooks/utils/useLazyRef.js +0 -11
- package/legacy/hooks/utils/useOnMount.js +0 -7
- package/legacy/hooks/utils/useResizeObserver.js +0 -36
- package/legacy/hooks/utils/useRunOnce.js +0 -18
- package/legacy/hooks/utils/useTimeout.js +0 -38
- package/legacy/index.js +0 -38
- package/legacy/internals/index.js +0 -68
- package/legacy/internals/utils/computeSlots.js +0 -17
- package/legacy/internals/utils/index.js +0 -3
- package/legacy/internals/utils/propValidation.js +0 -21
- package/legacy/internals/utils/useProps.js +0 -32
- package/legacy/joy/icons.js +0 -432
- package/legacy/joy/index.js +0 -2
- package/legacy/joy/joySlots.js +0 -420
- package/legacy/locales/arSD.js +0 -160
- package/legacy/locales/beBY.js +0 -184
- package/legacy/locales/bgBG.js +0 -160
- package/legacy/locales/coreLocales.js +0 -62
- package/legacy/locales/csCZ.js +0 -181
- package/legacy/locales/daDK.js +0 -160
- package/legacy/locales/deDE.js +0 -160
- package/legacy/locales/elGR.js +0 -160
- package/legacy/locales/enUS.js +0 -4
- package/legacy/locales/esES.js +0 -160
- package/legacy/locales/faIR.js +0 -160
- package/legacy/locales/fiFI.js +0 -160
- package/legacy/locales/frFR.js +0 -160
- package/legacy/locales/heIL.js +0 -160
- package/legacy/locales/hrHR.js +0 -160
- package/legacy/locales/huHU.js +0 -160
- package/legacy/locales/index.js +0 -35
- package/legacy/locales/itIT.js +0 -160
- package/legacy/locales/jaJP.js +0 -160
- package/legacy/locales/koKR.js +0 -162
- package/legacy/locales/nbNO.js +0 -162
- package/legacy/locales/nlNL.js +0 -160
- package/legacy/locales/plPL.js +0 -163
- package/legacy/locales/ptBR.js +0 -160
- package/legacy/locales/ptPT.js +0 -160
- package/legacy/locales/roRO.js +0 -160
- package/legacy/locales/ruRU.js +0 -181
- package/legacy/locales/skSK.js +0 -181
- package/legacy/locales/svSE.js +0 -160
- package/legacy/locales/trTR.js +0 -161
- package/legacy/locales/ukUA.js +0 -182
- package/legacy/locales/urPK.js +0 -160
- package/legacy/locales/viVN.js +0 -160
- package/legacy/locales/zhCN.js +0 -160
- package/legacy/locales/zhHK.js +0 -160
- package/legacy/locales/zhTW.js +0 -160
- package/legacy/material/components/MUISelectOption.js +0 -14
- package/legacy/material/icons/GridColumnUnsortedIcon.js +0 -16
- package/legacy/material/icons/index.js +0 -89
- package/legacy/material/index.js +0 -69
- package/legacy/models/api/gridApiCommon.js +0 -1
- package/legacy/models/api/gridApiCommunity.js +0 -1
- package/legacy/models/api/gridCallbackDetails.js +0 -1
- package/legacy/models/api/gridColumnApi.js +0 -1
- package/legacy/models/api/gridColumnGroupingApi.js +0 -1
- package/legacy/models/api/gridColumnMenuApi.js +0 -1
- package/legacy/models/api/gridColumnSpanning.js +0 -1
- package/legacy/models/api/gridCoreApi.js +0 -1
- package/legacy/models/api/gridCsvExportApi.js +0 -1
- package/legacy/models/api/gridDensityApi.js +0 -1
- package/legacy/models/api/gridEditingApi.js +0 -1
- package/legacy/models/api/gridFilterApi.js +0 -1
- package/legacy/models/api/gridFocusApi.js +0 -1
- package/legacy/models/api/gridHeaderFilteringApi.js +0 -1
- package/legacy/models/api/gridLocaleTextApi.js +0 -1
- package/legacy/models/api/gridLoggerApi.js +0 -1
- package/legacy/models/api/gridParamsApi.js +0 -1
- package/legacy/models/api/gridPreferencesPanelApi.js +0 -1
- package/legacy/models/api/gridPrintExportApi.js +0 -1
- package/legacy/models/api/gridRowApi.js +0 -1
- package/legacy/models/api/gridRowSelectionApi.js +0 -1
- package/legacy/models/api/gridRowsMetaApi.js +0 -1
- package/legacy/models/api/gridScrollApi.js +0 -1
- package/legacy/models/api/gridSortApi.js +0 -1
- package/legacy/models/api/gridStateApi.js +0 -1
- package/legacy/models/api/gridVirtualizationApi.js +0 -1
- package/legacy/models/api/index.js +0 -16
- package/legacy/models/colDef/gridColDef.js +0 -1
- package/legacy/models/colDef/gridColType.js +0 -1
- package/legacy/models/colDef/gridColumnTypesRecord.js +0 -1
- package/legacy/models/colDef/index.js +0 -6
- package/legacy/models/controlStateItem.js +0 -1
- package/legacy/models/cursorCoordinates.js +0 -1
- package/legacy/models/elementSize.js +0 -1
- package/legacy/models/events/gridEventListener.js +0 -1
- package/legacy/models/events/gridEventLookup.js +0 -1
- package/legacy/models/events/gridEventPublisher.js +0 -1
- package/legacy/models/events/index.js +0 -3
- package/legacy/models/gridApiCaches.js +0 -1
- package/legacy/models/gridCell.js +0 -1
- package/legacy/models/gridCellClass.js +0 -1
- package/legacy/models/gridColumnGrouping.js +0 -11
- package/legacy/models/gridColumnHeaderClass.js +0 -1
- package/legacy/models/gridColumnSpanning.js +0 -1
- package/legacy/models/gridDensity.js +0 -1
- package/legacy/models/gridEditRowModel.js +0 -16
- package/legacy/models/gridExport.js +0 -1
- package/legacy/models/gridFeatureMode.js +0 -1
- package/legacy/models/gridFilterItem.js +0 -11
- package/legacy/models/gridFilterModel.js +0 -1
- package/legacy/models/gridFilterOperator.js +0 -1
- package/legacy/models/gridHeaderFilteringModel.js +0 -1
- package/legacy/models/gridIconSlotsComponent.js +0 -1
- package/legacy/models/gridPaginationProps.js +0 -1
- package/legacy/models/gridRenderContextProps.js +0 -1
- package/legacy/models/gridRowSelectionModel.js +0 -1
- package/legacy/models/gridRows.js +0 -1
- package/legacy/models/gridSlotsComponent.js +0 -1
- package/legacy/models/gridSlotsComponentsProps.js +0 -1
- package/legacy/models/gridSortModel.js +0 -1
- package/legacy/models/gridStateCommunity.js +0 -1
- package/legacy/models/index.js +0 -29
- package/legacy/models/logger.js +0 -1
- package/legacy/models/muiEvent.js +0 -1
- package/legacy/models/params/gridCellParams.js +0 -1
- package/legacy/models/params/gridColumnGroupHeaderParams.js +0 -1
- package/legacy/models/params/gridColumnHeaderParams.js +0 -1
- package/legacy/models/params/gridColumnOrderChangeParams.js +0 -1
- package/legacy/models/params/gridColumnResizeParams.js +0 -1
- package/legacy/models/params/gridEditCellParams.js +0 -27
- package/legacy/models/params/gridHeaderSelectionCheckboxParams.js +0 -1
- package/legacy/models/params/gridMenuParams.js +0 -1
- package/legacy/models/params/gridPreferencePanelParams.js +0 -1
- package/legacy/models/params/gridRowParams.js +0 -44
- package/legacy/models/params/gridRowSelectionCheckboxParams.js +0 -1
- package/legacy/models/params/gridScrollParams.js +0 -1
- package/legacy/models/params/gridValueOptionsParams.js +0 -1
- package/legacy/models/params/index.js +0 -13
- package/legacy/models/props/DataGridProps.js +0 -1
- package/legacy/themeAugmentation/index.js +0 -4
- package/legacy/themeAugmentation/overrides.js +0 -1
- package/legacy/themeAugmentation/props.js +0 -1
- package/legacy/utils/EventManager.js +0 -91
- package/legacy/utils/Store.js +0 -34
- package/legacy/utils/cleanupTracking/CleanupTracking.js +0 -1
- package/legacy/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js +0 -29
- package/legacy/utils/cleanupTracking/TimerBasedCleanupTracking.js +0 -52
- package/legacy/utils/createControllablePromise.js +0 -11
- package/legacy/utils/createSelector.js +0 -120
- package/legacy/utils/doesSupportPreventScroll.js +0 -13
- package/legacy/utils/domUtils.js +0 -49
- package/legacy/utils/exportAs.js +0 -40
- package/legacy/utils/fastMemo.js +0 -5
- package/legacy/utils/fastObjectShallowCompare.js +0 -32
- package/legacy/utils/getGridLocalization.js +0 -15
- package/legacy/utils/getPublicApiRef.js +0 -5
- package/legacy/utils/index.js +0 -1
- package/legacy/utils/keyboardUtils.js +0 -60
- package/legacy/utils/utils.js +0 -189
- package/legacy/utils/warning.js +0 -25
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { useGridInitialization } from '../hooks/core/useGridInitialization';
|
|
2
|
-
import { useGridInitializeState } from '../hooks/utils/useGridInitializeState';
|
|
3
|
-
import { useGridClipboard } from '../hooks/features/clipboard/useGridClipboard';
|
|
4
|
-
import { columnMenuStateInitializer, useGridColumnMenu } from '../hooks/features/columnMenu/useGridColumnMenu';
|
|
5
|
-
import { useGridColumns, columnsStateInitializer } from '../hooks/features/columns/useGridColumns';
|
|
6
|
-
import { densityStateInitializer, useGridDensity } from '../hooks/features/density/useGridDensity';
|
|
7
|
-
import { useGridCsvExport } from '../hooks/features/export/useGridCsvExport';
|
|
8
|
-
import { useGridPrintExport } from '../hooks/features/export/useGridPrintExport';
|
|
9
|
-
import { useGridFilter, filterStateInitializer } from '../hooks/features/filter/useGridFilter';
|
|
10
|
-
import { focusStateInitializer, useGridFocus } from '../hooks/features/focus/useGridFocus';
|
|
11
|
-
import { useGridKeyboardNavigation } from '../hooks/features/keyboardNavigation/useGridKeyboardNavigation';
|
|
12
|
-
import { useGridPagination, paginationStateInitializer } from '../hooks/features/pagination/useGridPagination';
|
|
13
|
-
import { useGridPreferencesPanel, preferencePanelStateInitializer } from '../hooks/features/preferencesPanel/useGridPreferencesPanel';
|
|
14
|
-
import { useGridEditing, editingStateInitializer } from '../hooks/features/editing/useGridEditing';
|
|
15
|
-
import { useGridRows, rowsStateInitializer } from '../hooks/features/rows/useGridRows';
|
|
16
|
-
import { useGridRowsPreProcessors } from '../hooks/features/rows/useGridRowsPreProcessors';
|
|
17
|
-
import { useGridParamsApi } from '../hooks/features/rows/useGridParamsApi';
|
|
18
|
-
import { rowSelectionStateInitializer, useGridRowSelection } from '../hooks/features/rowSelection/useGridRowSelection';
|
|
19
|
-
import { useGridRowSelectionPreProcessors } from '../hooks/features/rowSelection/useGridRowSelectionPreProcessors';
|
|
20
|
-
import { useGridSorting, sortingStateInitializer } from '../hooks/features/sorting/useGridSorting';
|
|
21
|
-
import { useGridScroll } from '../hooks/features/scroll/useGridScroll';
|
|
22
|
-
import { useGridEvents } from '../hooks/features/events/useGridEvents';
|
|
23
|
-
import { dimensionsStateInitializer, useGridDimensions } from '../hooks/features/dimensions/useGridDimensions';
|
|
24
|
-
import { rowsMetaStateInitializer, useGridRowsMeta } from '../hooks/features/rows/useGridRowsMeta';
|
|
25
|
-
import { useGridStatePersistence } from '../hooks/features/statePersistence/useGridStatePersistence';
|
|
26
|
-
import { useGridColumnSpanning } from '../hooks/features/columns/useGridColumnSpanning';
|
|
27
|
-
import { useGridColumnGrouping, columnGroupsStateInitializer } from '../hooks/features/columnGrouping/useGridColumnGrouping';
|
|
28
|
-
import { useGridVirtualization, virtualizationStateInitializer } from '../hooks/features/virtualization';
|
|
29
|
-
export var useDataGridComponent = function useDataGridComponent(inputApiRef, props) {
|
|
30
|
-
var apiRef = useGridInitialization(inputApiRef, props);
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Register all pre-processors called during state initialization here.
|
|
34
|
-
*/
|
|
35
|
-
useGridRowSelectionPreProcessors(apiRef, props);
|
|
36
|
-
useGridRowsPreProcessors(apiRef);
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Register all state initializers here.
|
|
40
|
-
*/
|
|
41
|
-
useGridInitializeState(dimensionsStateInitializer, apiRef, props);
|
|
42
|
-
useGridInitializeState(rowSelectionStateInitializer, apiRef, props);
|
|
43
|
-
useGridInitializeState(columnsStateInitializer, apiRef, props);
|
|
44
|
-
useGridInitializeState(rowsStateInitializer, apiRef, props);
|
|
45
|
-
useGridInitializeState(editingStateInitializer, apiRef, props);
|
|
46
|
-
useGridInitializeState(focusStateInitializer, apiRef, props);
|
|
47
|
-
useGridInitializeState(sortingStateInitializer, apiRef, props);
|
|
48
|
-
useGridInitializeState(preferencePanelStateInitializer, apiRef, props);
|
|
49
|
-
useGridInitializeState(filterStateInitializer, apiRef, props);
|
|
50
|
-
useGridInitializeState(densityStateInitializer, apiRef, props);
|
|
51
|
-
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
52
|
-
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
53
|
-
useGridInitializeState(columnMenuStateInitializer, apiRef, props);
|
|
54
|
-
useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
|
|
55
|
-
useGridInitializeState(virtualizationStateInitializer, apiRef, props);
|
|
56
|
-
useGridKeyboardNavigation(apiRef, props);
|
|
57
|
-
useGridRowSelection(apiRef, props);
|
|
58
|
-
useGridColumns(apiRef, props);
|
|
59
|
-
useGridRows(apiRef, props);
|
|
60
|
-
useGridParamsApi(apiRef);
|
|
61
|
-
useGridColumnSpanning(apiRef);
|
|
62
|
-
useGridColumnGrouping(apiRef, props);
|
|
63
|
-
useGridEditing(apiRef, props);
|
|
64
|
-
useGridFocus(apiRef, props);
|
|
65
|
-
useGridPreferencesPanel(apiRef, props);
|
|
66
|
-
useGridFilter(apiRef, props);
|
|
67
|
-
useGridSorting(apiRef, props);
|
|
68
|
-
useGridDensity(apiRef, props);
|
|
69
|
-
useGridPagination(apiRef, props);
|
|
70
|
-
useGridRowsMeta(apiRef, props);
|
|
71
|
-
useGridScroll(apiRef, props);
|
|
72
|
-
useGridColumnMenu(apiRef);
|
|
73
|
-
useGridCsvExport(apiRef, props);
|
|
74
|
-
useGridPrintExport(apiRef, props);
|
|
75
|
-
useGridClipboard(apiRef, props);
|
|
76
|
-
useGridDimensions(apiRef, props);
|
|
77
|
-
useGridEvents(apiRef, props);
|
|
78
|
-
useGridStatePersistence(apiRef);
|
|
79
|
-
useGridVirtualization(apiRef, props);
|
|
80
|
-
return apiRef;
|
|
81
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { useThemeProps } from '@mui/material/styles';
|
|
4
|
-
import { GRID_DEFAULT_LOCALE_TEXT } from '../constants';
|
|
5
|
-
import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from '../constants/defaultGridSlotsComponents';
|
|
6
|
-
import { GridEditModes } from '../models';
|
|
7
|
-
import { computeSlots, useProps } from '../internals/utils';
|
|
8
|
-
var DATA_GRID_FORCED_PROPS = {
|
|
9
|
-
disableMultipleColumnsFiltering: true,
|
|
10
|
-
disableMultipleColumnsSorting: true,
|
|
11
|
-
throttleRowsMs: undefined,
|
|
12
|
-
hideFooterRowCount: false,
|
|
13
|
-
pagination: true,
|
|
14
|
-
checkboxSelectionVisibleOnly: false,
|
|
15
|
-
disableColumnReorder: true,
|
|
16
|
-
disableColumnResize: true,
|
|
17
|
-
keepColumnPositionIfDraggedOutside: false,
|
|
18
|
-
signature: 'DataGrid'
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* The default values of `DataGridPropsWithDefaultValues` to inject in the props of DataGrid.
|
|
23
|
-
*/
|
|
24
|
-
export var DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
25
|
-
autoHeight: false,
|
|
26
|
-
autoPageSize: false,
|
|
27
|
-
checkboxSelection: false,
|
|
28
|
-
checkboxSelectionVisibleOnly: false,
|
|
29
|
-
columnBuffer: 3,
|
|
30
|
-
rowBuffer: 3,
|
|
31
|
-
columnThreshold: 3,
|
|
32
|
-
rowThreshold: 3,
|
|
33
|
-
rowSelection: true,
|
|
34
|
-
density: 'standard',
|
|
35
|
-
disableColumnFilter: false,
|
|
36
|
-
disableColumnMenu: false,
|
|
37
|
-
disableColumnSelector: false,
|
|
38
|
-
disableDensitySelector: false,
|
|
39
|
-
disableEval: false,
|
|
40
|
-
disableMultipleColumnsFiltering: false,
|
|
41
|
-
disableMultipleRowSelection: false,
|
|
42
|
-
disableColumnSorting: false,
|
|
43
|
-
disableMultipleColumnsSorting: false,
|
|
44
|
-
disableRowSelectionOnClick: false,
|
|
45
|
-
disableVirtualization: false,
|
|
46
|
-
editMode: GridEditModes.Cell,
|
|
47
|
-
filterMode: 'client',
|
|
48
|
-
filterDebounceMs: 150,
|
|
49
|
-
columnHeaderHeight: 56,
|
|
50
|
-
hideFooter: false,
|
|
51
|
-
hideFooterPagination: false,
|
|
52
|
-
hideFooterRowCount: false,
|
|
53
|
-
hideFooterSelectedRowCount: false,
|
|
54
|
-
ignoreDiacritics: false,
|
|
55
|
-
logger: console,
|
|
56
|
-
logLevel: process.env.NODE_ENV === 'production' ? 'error' : 'warn',
|
|
57
|
-
pagination: false,
|
|
58
|
-
paginationMode: 'client',
|
|
59
|
-
rowHeight: 52,
|
|
60
|
-
pageSizeOptions: [25, 50, 100],
|
|
61
|
-
rowSpacingType: 'margin',
|
|
62
|
-
showCellVerticalBorder: false,
|
|
63
|
-
showColumnVerticalBorder: false,
|
|
64
|
-
sortingOrder: ['asc', 'desc', null],
|
|
65
|
-
sortingMode: 'client',
|
|
66
|
-
throttleRowsMs: 0,
|
|
67
|
-
disableColumnReorder: false,
|
|
68
|
-
disableColumnResize: false,
|
|
69
|
-
keepNonExistentRowsSelected: false,
|
|
70
|
-
keepColumnPositionIfDraggedOutside: false,
|
|
71
|
-
ignoreValueFormatterDuringExport: false,
|
|
72
|
-
clipboardCopyCellDelimiter: '\t',
|
|
73
|
-
rowPositionsDebounceMs: 166
|
|
74
|
-
};
|
|
75
|
-
var defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
76
|
-
export var useDataGridProps = function useDataGridProps(inProps) {
|
|
77
|
-
var themedProps = useProps(
|
|
78
|
-
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
79
|
-
useThemeProps({
|
|
80
|
-
props: inProps,
|
|
81
|
-
name: 'MuiDataGrid'
|
|
82
|
-
}));
|
|
83
|
-
var localeText = React.useMemo(function () {
|
|
84
|
-
return _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText);
|
|
85
|
-
}, [themedProps.localeText]);
|
|
86
|
-
var slots = React.useMemo(function () {
|
|
87
|
-
return computeSlots({
|
|
88
|
-
defaultSlots: defaultSlots,
|
|
89
|
-
slots: themedProps.slots
|
|
90
|
-
});
|
|
91
|
-
}, [themedProps.slots]);
|
|
92
|
-
return React.useMemo(function () {
|
|
93
|
-
return _extends({}, DATA_GRID_PROPS_DEFAULT_VALUES, themedProps, {
|
|
94
|
-
localeText: localeText,
|
|
95
|
-
slots: slots
|
|
96
|
-
}, DATA_GRID_FORCED_PROPS);
|
|
97
|
-
}, [themedProps, localeText, slots]);
|
|
98
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { GRID_STRING_COL_DEF } from './gridStringColDef';
|
|
3
|
-
import { renderActionsCell } from '../components/cell/GridActionsCell';
|
|
4
|
-
export var GRID_ACTIONS_COLUMN_TYPE = 'actions';
|
|
5
|
-
export var GRID_ACTIONS_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
6
|
-
sortable: false,
|
|
7
|
-
filterable: false,
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
aggregable: false,
|
|
10
|
-
width: 100,
|
|
11
|
-
align: 'center',
|
|
12
|
-
headerAlign: 'center',
|
|
13
|
-
headerName: '',
|
|
14
|
-
disableColumnMenu: true,
|
|
15
|
-
disableExport: true,
|
|
16
|
-
renderCell: renderActionsCell,
|
|
17
|
-
getApplyQuickFilterFn: undefined
|
|
18
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { GRID_STRING_COL_DEF } from './gridStringColDef';
|
|
3
|
-
import { renderBooleanCell } from '../components/cell/GridBooleanCell';
|
|
4
|
-
import { renderEditBooleanCell } from '../components/cell/GridEditBooleanCell';
|
|
5
|
-
import { gridNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
|
|
6
|
-
import { getGridBooleanOperators } from './gridBooleanOperators';
|
|
7
|
-
var gridBooleanFormatter = function gridBooleanFormatter(value, row, column, apiRef) {
|
|
8
|
-
return value ? apiRef.current.getLocaleText('booleanCellTrueLabel') : apiRef.current.getLocaleText('booleanCellFalseLabel');
|
|
9
|
-
};
|
|
10
|
-
var stringToBoolean = function stringToBoolean(value) {
|
|
11
|
-
switch (value.toLowerCase().trim()) {
|
|
12
|
-
case 'true':
|
|
13
|
-
case 'yes':
|
|
14
|
-
case '1':
|
|
15
|
-
return true;
|
|
16
|
-
case 'false':
|
|
17
|
-
case 'no':
|
|
18
|
-
case '0':
|
|
19
|
-
case 'null':
|
|
20
|
-
case 'undefined':
|
|
21
|
-
return false;
|
|
22
|
-
default:
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
export var GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
27
|
-
type: 'boolean',
|
|
28
|
-
align: 'center',
|
|
29
|
-
headerAlign: 'center',
|
|
30
|
-
renderCell: renderBooleanCell,
|
|
31
|
-
renderEditCell: renderEditBooleanCell,
|
|
32
|
-
sortComparator: gridNumberComparator,
|
|
33
|
-
valueFormatter: gridBooleanFormatter,
|
|
34
|
-
filterOperators: getGridBooleanOperators(),
|
|
35
|
-
getApplyQuickFilterFn: undefined,
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
aggregable: false,
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
pastedValueParser: function pastedValueParser(value) {
|
|
40
|
-
return stringToBoolean(value);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { GridFilterInputBoolean } from '../components/panel/filterPanel/GridFilterInputBoolean';
|
|
2
|
-
export var getGridBooleanOperators = function getGridBooleanOperators() {
|
|
3
|
-
return [{
|
|
4
|
-
value: 'is',
|
|
5
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
6
|
-
if (!filterItem.value) {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
var valueAsBoolean = filterItem.value === 'true';
|
|
10
|
-
return function (value) {
|
|
11
|
-
return Boolean(value) === valueAsBoolean;
|
|
12
|
-
};
|
|
13
|
-
},
|
|
14
|
-
InputComponent: GridFilterInputBoolean
|
|
15
|
-
}];
|
|
16
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { GridCellCheckboxRenderer } from '../components/columnSelection/GridCellCheckboxRenderer';
|
|
4
|
-
import { GridHeaderCheckbox } from '../components/columnSelection/GridHeaderCheckbox';
|
|
5
|
-
import { selectedIdsLookupSelector } from '../hooks/features/rowSelection/gridRowSelectionSelector';
|
|
6
|
-
import { GRID_BOOLEAN_COL_DEF } from './gridBooleanColDef';
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
export var GRID_CHECKBOX_SELECTION_FIELD = '__check__';
|
|
9
|
-
export var GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF, {
|
|
10
|
-
type: 'custom',
|
|
11
|
-
field: GRID_CHECKBOX_SELECTION_FIELD,
|
|
12
|
-
width: 50,
|
|
13
|
-
resizable: false,
|
|
14
|
-
sortable: false,
|
|
15
|
-
filterable: false,
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
aggregable: false,
|
|
18
|
-
disableColumnMenu: true,
|
|
19
|
-
disableReorder: true,
|
|
20
|
-
disableExport: true,
|
|
21
|
-
getApplyQuickFilterFn: undefined,
|
|
22
|
-
valueGetter: function valueGetter(value, row, column, apiRef) {
|
|
23
|
-
var selectionLookup = selectedIdsLookupSelector(apiRef);
|
|
24
|
-
var rowId = apiRef.current.getRowId(row);
|
|
25
|
-
return selectionLookup[rowId] !== undefined;
|
|
26
|
-
},
|
|
27
|
-
renderHeader: function renderHeader(params) {
|
|
28
|
-
return /*#__PURE__*/_jsx(GridHeaderCheckbox, _extends({}, params));
|
|
29
|
-
},
|
|
30
|
-
renderCell: function renderCell(params) {
|
|
31
|
-
return /*#__PURE__*/_jsx(GridCellCheckboxRenderer, _extends({}, params));
|
|
32
|
-
}
|
|
33
|
-
});
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { gridDateComparator } from '../hooks/features/sorting/gridSortingUtils';
|
|
3
|
-
import { getGridDateOperators } from './gridDateOperators';
|
|
4
|
-
import { GRID_STRING_COL_DEF } from './gridStringColDef';
|
|
5
|
-
import { renderEditDateCell } from '../components/cell/GridEditDateCell';
|
|
6
|
-
function throwIfNotDateObject(_ref) {
|
|
7
|
-
var value = _ref.value,
|
|
8
|
-
columnType = _ref.columnType,
|
|
9
|
-
rowId = _ref.rowId,
|
|
10
|
-
field = _ref.field;
|
|
11
|
-
if (!(value instanceof Date)) {
|
|
12
|
-
throw new Error(["MUI X: `".concat(columnType, "` column type only accepts `Date` objects as values."), 'Use `valueGetter` to transform the value into a `Date` object.', "Row ID: ".concat(rowId, ", field: \"").concat(field, "\".")].join('\n'));
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export var gridDateFormatter = function gridDateFormatter(value, row, column, apiRef) {
|
|
16
|
-
if (!value) {
|
|
17
|
-
return '';
|
|
18
|
-
}
|
|
19
|
-
var rowId = apiRef.current.getRowId(row);
|
|
20
|
-
throwIfNotDateObject({
|
|
21
|
-
value: value,
|
|
22
|
-
columnType: 'date',
|
|
23
|
-
rowId: rowId,
|
|
24
|
-
field: column.field
|
|
25
|
-
});
|
|
26
|
-
return value.toLocaleDateString();
|
|
27
|
-
};
|
|
28
|
-
export var gridDateTimeFormatter = function gridDateTimeFormatter(value, row, column, apiRef) {
|
|
29
|
-
if (!value) {
|
|
30
|
-
return '';
|
|
31
|
-
}
|
|
32
|
-
var rowId = apiRef.current.getRowId(row);
|
|
33
|
-
throwIfNotDateObject({
|
|
34
|
-
value: value,
|
|
35
|
-
columnType: 'dateTime',
|
|
36
|
-
rowId: rowId,
|
|
37
|
-
field: column.field
|
|
38
|
-
});
|
|
39
|
-
return value.toLocaleString();
|
|
40
|
-
};
|
|
41
|
-
export var GRID_DATE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
42
|
-
type: 'date',
|
|
43
|
-
sortComparator: gridDateComparator,
|
|
44
|
-
valueFormatter: gridDateFormatter,
|
|
45
|
-
filterOperators: getGridDateOperators(),
|
|
46
|
-
renderEditCell: renderEditDateCell,
|
|
47
|
-
// @ts-ignore
|
|
48
|
-
pastedValueParser: function pastedValueParser(value) {
|
|
49
|
-
return new Date(value);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
export var GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
53
|
-
type: 'dateTime',
|
|
54
|
-
sortComparator: gridDateComparator,
|
|
55
|
-
valueFormatter: gridDateTimeFormatter,
|
|
56
|
-
filterOperators: getGridDateOperators(true),
|
|
57
|
-
renderEditCell: renderEditDateCell,
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
pastedValueParser: function pastedValueParser(value) {
|
|
60
|
-
return new Date(value);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { GridFilterInputDate } from '../components/panel/filterPanel/GridFilterInputDate';
|
|
2
|
-
function buildApplyFilterFn(filterItem, compareFn, showTime, keepHours) {
|
|
3
|
-
if (!filterItem.value) {
|
|
4
|
-
return null;
|
|
5
|
-
}
|
|
6
|
-
var date = new Date(filterItem.value);
|
|
7
|
-
if (showTime) {
|
|
8
|
-
date.setSeconds(0, 0);
|
|
9
|
-
} else {
|
|
10
|
-
date.setHours(0, 0, 0, 0);
|
|
11
|
-
}
|
|
12
|
-
var time = date.getTime();
|
|
13
|
-
return function (value) {
|
|
14
|
-
if (!value) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
if (keepHours) {
|
|
18
|
-
return compareFn(value.getTime(), time);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Make a copy of the date to not reset the hours in the original object
|
|
22
|
-
var dateCopy = new Date(value);
|
|
23
|
-
if (showTime) {
|
|
24
|
-
dateCopy.setSeconds(0, 0);
|
|
25
|
-
} else {
|
|
26
|
-
dateCopy.setHours(0, 0, 0, 0);
|
|
27
|
-
}
|
|
28
|
-
return compareFn(dateCopy.getTime(), time);
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export var getGridDateOperators = function getGridDateOperators(showTime) {
|
|
32
|
-
return [{
|
|
33
|
-
value: 'is',
|
|
34
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
35
|
-
return buildApplyFilterFn(filterItem, function (value1, value2) {
|
|
36
|
-
return value1 === value2;
|
|
37
|
-
}, showTime);
|
|
38
|
-
},
|
|
39
|
-
InputComponent: GridFilterInputDate,
|
|
40
|
-
InputComponentProps: {
|
|
41
|
-
type: showTime ? 'datetime-local' : 'date'
|
|
42
|
-
}
|
|
43
|
-
}, {
|
|
44
|
-
value: 'not',
|
|
45
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
46
|
-
return buildApplyFilterFn(filterItem, function (value1, value2) {
|
|
47
|
-
return value1 !== value2;
|
|
48
|
-
}, showTime);
|
|
49
|
-
},
|
|
50
|
-
InputComponent: GridFilterInputDate,
|
|
51
|
-
InputComponentProps: {
|
|
52
|
-
type: showTime ? 'datetime-local' : 'date'
|
|
53
|
-
}
|
|
54
|
-
}, {
|
|
55
|
-
value: 'after',
|
|
56
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
57
|
-
return buildApplyFilterFn(filterItem, function (value1, value2) {
|
|
58
|
-
return value1 > value2;
|
|
59
|
-
}, showTime);
|
|
60
|
-
},
|
|
61
|
-
InputComponent: GridFilterInputDate,
|
|
62
|
-
InputComponentProps: {
|
|
63
|
-
type: showTime ? 'datetime-local' : 'date'
|
|
64
|
-
}
|
|
65
|
-
}, {
|
|
66
|
-
value: 'onOrAfter',
|
|
67
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
68
|
-
return buildApplyFilterFn(filterItem, function (value1, value2) {
|
|
69
|
-
return value1 >= value2;
|
|
70
|
-
}, showTime);
|
|
71
|
-
},
|
|
72
|
-
InputComponent: GridFilterInputDate,
|
|
73
|
-
InputComponentProps: {
|
|
74
|
-
type: showTime ? 'datetime-local' : 'date'
|
|
75
|
-
}
|
|
76
|
-
}, {
|
|
77
|
-
value: 'before',
|
|
78
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
79
|
-
return buildApplyFilterFn(filterItem, function (value1, value2) {
|
|
80
|
-
return value1 < value2;
|
|
81
|
-
}, showTime, !showTime);
|
|
82
|
-
},
|
|
83
|
-
InputComponent: GridFilterInputDate,
|
|
84
|
-
InputComponentProps: {
|
|
85
|
-
type: showTime ? 'datetime-local' : 'date'
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
value: 'onOrBefore',
|
|
89
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
90
|
-
return buildApplyFilterFn(filterItem, function (value1, value2) {
|
|
91
|
-
return value1 <= value2;
|
|
92
|
-
}, showTime);
|
|
93
|
-
},
|
|
94
|
-
InputComponent: GridFilterInputDate,
|
|
95
|
-
InputComponentProps: {
|
|
96
|
-
type: showTime ? 'datetime-local' : 'date'
|
|
97
|
-
}
|
|
98
|
-
}, {
|
|
99
|
-
value: 'isEmpty',
|
|
100
|
-
getApplyFilterFn: function getApplyFilterFn() {
|
|
101
|
-
return function (value) {
|
|
102
|
-
return value == null;
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
requiresFilterValue: false
|
|
106
|
-
}, {
|
|
107
|
-
value: 'isNotEmpty',
|
|
108
|
-
getApplyFilterFn: function getApplyFilterFn() {
|
|
109
|
-
return function (value) {
|
|
110
|
-
return value != null;
|
|
111
|
-
};
|
|
112
|
-
},
|
|
113
|
-
requiresFilterValue: false
|
|
114
|
-
}];
|
|
115
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import { GRID_STRING_COL_DEF } from './gridStringColDef';
|
|
3
|
-
import { GRID_NUMERIC_COL_DEF } from './gridNumericColDef';
|
|
4
|
-
import { GRID_DATE_COL_DEF, GRID_DATETIME_COL_DEF } from './gridDateColDef';
|
|
5
|
-
import { GRID_BOOLEAN_COL_DEF } from './gridBooleanColDef';
|
|
6
|
-
import { GRID_SINGLE_SELECT_COL_DEF } from './gridSingleSelectColDef';
|
|
7
|
-
import { GRID_ACTIONS_COL_DEF, GRID_ACTIONS_COLUMN_TYPE } from './gridActionsColDef';
|
|
8
|
-
export var DEFAULT_GRID_COL_TYPE_KEY = 'string';
|
|
9
|
-
export var getGridDefaultColumnTypes = function getGridDefaultColumnTypes() {
|
|
10
|
-
var nativeColumnTypes = _defineProperty(_defineProperty({
|
|
11
|
-
string: GRID_STRING_COL_DEF,
|
|
12
|
-
number: GRID_NUMERIC_COL_DEF,
|
|
13
|
-
date: GRID_DATE_COL_DEF,
|
|
14
|
-
dateTime: GRID_DATETIME_COL_DEF,
|
|
15
|
-
boolean: GRID_BOOLEAN_COL_DEF,
|
|
16
|
-
singleSelect: GRID_SINGLE_SELECT_COL_DEF
|
|
17
|
-
}, GRID_ACTIONS_COLUMN_TYPE, GRID_ACTIONS_COL_DEF), "custom", GRID_STRING_COL_DEF);
|
|
18
|
-
return nativeColumnTypes;
|
|
19
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { gridNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
|
|
3
|
-
import { isNumber } from '../utils/utils';
|
|
4
|
-
import { getGridNumericOperators, getGridNumericQuickFilterFn } from './gridNumericOperators';
|
|
5
|
-
import { GRID_STRING_COL_DEF } from './gridStringColDef';
|
|
6
|
-
export var GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
7
|
-
type: 'number',
|
|
8
|
-
align: 'right',
|
|
9
|
-
headerAlign: 'right',
|
|
10
|
-
sortComparator: gridNumberComparator,
|
|
11
|
-
valueParser: function valueParser(value) {
|
|
12
|
-
return value === '' ? null : Number(value);
|
|
13
|
-
},
|
|
14
|
-
valueFormatter: function valueFormatter(value) {
|
|
15
|
-
return isNumber(value) ? value.toLocaleString() : value || '';
|
|
16
|
-
},
|
|
17
|
-
filterOperators: getGridNumericOperators(),
|
|
18
|
-
getApplyQuickFilterFn: getGridNumericQuickFilterFn
|
|
19
|
-
});
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { GridFilterInputValue } from '../components/panel/filterPanel/GridFilterInputValue';
|
|
2
|
-
import { GridFilterInputMultipleValue } from '../components/panel/filterPanel/GridFilterInputMultipleValue';
|
|
3
|
-
var parseNumericValue = function parseNumericValue(value) {
|
|
4
|
-
if (value == null) {
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
7
|
-
return Number(value);
|
|
8
|
-
};
|
|
9
|
-
export var getGridNumericQuickFilterFn = function getGridNumericQuickFilterFn(value) {
|
|
10
|
-
if (value == null || Number.isNaN(value) || value === '') {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
return function (columnValue) {
|
|
14
|
-
return parseNumericValue(columnValue) === parseNumericValue(value);
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export var getGridNumericOperators = function getGridNumericOperators() {
|
|
18
|
-
return [{
|
|
19
|
-
value: '=',
|
|
20
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
21
|
-
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
return function (value) {
|
|
25
|
-
return parseNumericValue(value) === filterItem.value;
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
InputComponent: GridFilterInputValue,
|
|
29
|
-
InputComponentProps: {
|
|
30
|
-
type: 'number'
|
|
31
|
-
}
|
|
32
|
-
}, {
|
|
33
|
-
value: '!=',
|
|
34
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
35
|
-
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
return function (value) {
|
|
39
|
-
return parseNumericValue(value) !== filterItem.value;
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
InputComponent: GridFilterInputValue,
|
|
43
|
-
InputComponentProps: {
|
|
44
|
-
type: 'number'
|
|
45
|
-
}
|
|
46
|
-
}, {
|
|
47
|
-
value: '>',
|
|
48
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
49
|
-
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
return function (value) {
|
|
53
|
-
if (value == null) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
return parseNumericValue(value) > filterItem.value;
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
InputComponent: GridFilterInputValue,
|
|
60
|
-
InputComponentProps: {
|
|
61
|
-
type: 'number'
|
|
62
|
-
}
|
|
63
|
-
}, {
|
|
64
|
-
value: '>=',
|
|
65
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
66
|
-
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
return function (value) {
|
|
70
|
-
if (value == null) {
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
return parseNumericValue(value) >= filterItem.value;
|
|
74
|
-
};
|
|
75
|
-
},
|
|
76
|
-
InputComponent: GridFilterInputValue,
|
|
77
|
-
InputComponentProps: {
|
|
78
|
-
type: 'number'
|
|
79
|
-
}
|
|
80
|
-
}, {
|
|
81
|
-
value: '<',
|
|
82
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
83
|
-
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
return function (value) {
|
|
87
|
-
if (value == null) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
return parseNumericValue(value) < filterItem.value;
|
|
91
|
-
};
|
|
92
|
-
},
|
|
93
|
-
InputComponent: GridFilterInputValue,
|
|
94
|
-
InputComponentProps: {
|
|
95
|
-
type: 'number'
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
value: '<=',
|
|
99
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
100
|
-
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
return function (value) {
|
|
104
|
-
if (value == null) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
return parseNumericValue(value) <= filterItem.value;
|
|
108
|
-
};
|
|
109
|
-
},
|
|
110
|
-
InputComponent: GridFilterInputValue,
|
|
111
|
-
InputComponentProps: {
|
|
112
|
-
type: 'number'
|
|
113
|
-
}
|
|
114
|
-
}, {
|
|
115
|
-
value: 'isEmpty',
|
|
116
|
-
getApplyFilterFn: function getApplyFilterFn() {
|
|
117
|
-
return function (value) {
|
|
118
|
-
return value == null;
|
|
119
|
-
};
|
|
120
|
-
},
|
|
121
|
-
requiresFilterValue: false
|
|
122
|
-
}, {
|
|
123
|
-
value: 'isNotEmpty',
|
|
124
|
-
getApplyFilterFn: function getApplyFilterFn() {
|
|
125
|
-
return function (value) {
|
|
126
|
-
return value != null;
|
|
127
|
-
};
|
|
128
|
-
},
|
|
129
|
-
requiresFilterValue: false
|
|
130
|
-
}, {
|
|
131
|
-
value: 'isAnyOf',
|
|
132
|
-
getApplyFilterFn: function getApplyFilterFn(filterItem) {
|
|
133
|
-
if (!Array.isArray(filterItem.value) || filterItem.value.length === 0) {
|
|
134
|
-
return null;
|
|
135
|
-
}
|
|
136
|
-
return function (value) {
|
|
137
|
-
return value != null && filterItem.value.includes(Number(value));
|
|
138
|
-
};
|
|
139
|
-
},
|
|
140
|
-
InputComponent: GridFilterInputMultipleValue,
|
|
141
|
-
InputComponentProps: {
|
|
142
|
-
type: 'number'
|
|
143
|
-
}
|
|
144
|
-
}];
|
|
145
|
-
};
|