@mui/x-data-grid 6.16.0 → 6.16.2
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 +165 -1
- package/DataGrid/DataGrid.d.ts +7 -0
- package/DataGrid/DataGrid.js +8 -1
- package/colDef/gridDateColDef.js +0 -4
- package/components/GridRow.js +7 -3
- package/components/cell/GridCell.js +7 -3
- package/components/containers/GridRootStyles.js +13 -0
- package/components/panel/filterPanel/GridFilterForm.d.ts +7 -0
- package/components/panel/filterPanel/GridFilterForm.js +8 -0
- package/components/panel/filterPanel/GridFilterPanel.d.ts +7 -0
- package/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/components/toolbar/GridToolbarQuickFilter.d.ts +8 -0
- package/components/toolbar/GridToolbarQuickFilter.js +9 -0
- package/components/virtualization/GridVirtualScroller.js +3 -1
- package/constants/gridClasses.d.ts +8 -0
- package/constants/gridClasses.js +1 -1
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.ts +4 -1
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +13 -2
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +12 -6
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -2
- package/hooks/features/columns/gridColumnsUtils.js +0 -1
- package/hooks/features/filter/gridFilterUtils.js +4 -4
- package/hooks/features/virtualization/useGridVirtualScroller.js +8 -2
- package/index.js +1 -1
- package/legacy/DataGrid/DataGrid.js +8 -1
- package/legacy/colDef/gridDateColDef.js +0 -4
- package/legacy/components/GridRow.js +6 -2
- package/legacy/components/cell/GridCell.js +7 -3
- package/legacy/components/containers/GridRootStyles.js +15 -9
- package/legacy/components/panel/filterPanel/GridFilterForm.js +8 -0
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +9 -0
- package/legacy/components/virtualization/GridVirtualScroller.js +3 -1
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsUtils.js +13 -2
- package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +12 -6
- package/legacy/hooks/features/columns/gridColumnsUtils.js +0 -1
- package/legacy/hooks/features/filter/gridFilterUtils.js +4 -4
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +8 -2
- package/legacy/index.js +1 -1
- package/legacy/locales/arSD.js +26 -28
- package/legacy/locales/roRO.js +1 -1
- package/locales/arSD.js +26 -28
- package/locales/roRO.js +1 -1
- package/models/events/gridEventLookup.d.ts +14 -0
- package/models/props/DataGridProps.d.ts +1 -1
- package/modern/DataGrid/DataGrid.js +8 -1
- package/modern/colDef/gridDateColDef.js +0 -4
- package/modern/components/GridRow.js +7 -3
- package/modern/components/cell/GridCell.js +6 -2
- package/modern/components/containers/GridRootStyles.js +13 -0
- package/modern/components/panel/filterPanel/GridFilterForm.js +8 -0
- package/modern/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/modern/components/toolbar/GridToolbarQuickFilter.js +9 -0
- package/modern/components/virtualization/GridVirtualScroller.js +3 -1
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/columnGrouping/gridColumnGroupsUtils.js +13 -2
- package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +10 -3
- package/modern/hooks/features/columns/gridColumnsUtils.js +0 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +4 -4
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +8 -2
- package/modern/index.js +1 -1
- package/modern/locales/arSD.js +26 -28
- package/modern/locales/roRO.js +1 -1
- package/node/DataGrid/DataGrid.js +11 -7
- package/node/DataGrid/useDataGridProps.js +1 -2
- package/node/colDef/gridActionsColDef.js +3 -5
- package/node/colDef/gridBooleanColDef.js +2 -3
- package/node/colDef/gridCheckboxSelectionColDef.js +3 -5
- package/node/colDef/gridDateColDef.js +3 -9
- package/node/colDef/gridDefaultColumnTypes.js +1 -2
- package/node/colDef/gridNumericColDef.js +2 -3
- package/node/colDef/gridNumericOperators.js +1 -2
- package/node/colDef/gridSingleSelectColDef.js +2 -3
- package/node/colDef/gridStringColDef.js +2 -3
- package/node/colDef/gridStringOperators.js +1 -2
- package/node/colDef/utils.js +1 -2
- package/node/components/DataGridVirtualScroller.js +2 -3
- package/node/components/GridApiContext.js +1 -2
- package/node/components/GridColumnHeaders.js +1 -2
- package/node/components/GridFooter.js +1 -2
- package/node/components/GridLoadingOverlay.js +1 -2
- package/node/components/GridNoResultsOverlay.js +2 -3
- package/node/components/GridNoRowsOverlay.js +1 -2
- package/node/components/GridPagination.js +2 -3
- package/node/components/GridRow.js +8 -5
- package/node/components/GridRowCount.js +1 -2
- package/node/components/GridSelectedRowCount.js +1 -2
- package/node/components/cell/GridActionsCellItem.js +1 -2
- package/node/components/cell/GridBooleanCell.js +1 -2
- package/node/components/cell/GridCell.js +9 -8
- package/node/components/cell/GridEditInputCell.js +1 -2
- package/node/components/cell/GridEditSingleSelectCell.js +3 -2
- package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -3
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +2 -3
- package/node/components/columnHeaders/GridColumnHeaderSeparator.js +2 -4
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
- package/node/components/columnHeaders/GridColumnHeadersInner.js +2 -3
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +2 -3
- package/node/components/columnHeaders/GridIconButtonContainer.js +2 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -4
- package/node/components/columnSelection/GridHeaderCheckbox.js +1 -2
- package/node/components/containers/GridFooterContainer.js +1 -2
- package/node/components/containers/GridMainContainer.js +2 -3
- package/node/components/containers/GridOverlay.js +1 -2
- package/node/components/containers/GridRoot.js +1 -2
- package/node/components/containers/GridRootStyles.js +15 -3
- package/node/components/containers/GridToolbarContainer.js +1 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +4 -8
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +1 -2
- package/node/components/panel/GridPanel.js +2 -4
- package/node/components/panel/GridPanelWrapper.js +1 -2
- package/node/components/panel/GridPreferencesPanel.js +2 -3
- package/node/components/panel/filterPanel/GridFilterForm.js +15 -7
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +3 -2
- package/node/components/panel/filterPanel/GridFilterPanel.js +10 -3
- package/node/components/toolbar/GridToolbar.js +1 -2
- package/node/components/toolbar/GridToolbarColumnsButton.js +2 -3
- package/node/components/toolbar/GridToolbarDensitySelector.js +2 -3
- package/node/components/toolbar/GridToolbarExport.js +1 -2
- package/node/components/toolbar/GridToolbarExportContainer.js +2 -3
- package/node/components/toolbar/GridToolbarFilterButton.js +1 -2
- package/node/components/toolbar/GridToolbarQuickFilter.js +10 -1
- package/node/components/virtualization/GridVirtualScroller.js +5 -4
- package/node/components/virtualization/GridVirtualScrollerContent.js +2 -3
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +2 -3
- package/node/constants/defaultGridSlotsComponents.js +2 -3
- package/node/constants/envConstants.js +1 -2
- package/node/constants/gridClasses.js +1 -2
- package/node/constants/gridDetailPanelToggleField.js +1 -2
- package/node/constants/localeTextConstants.js +2 -3
- package/node/context/GridRootPropsContext.js +1 -2
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -4
- package/node/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -8
- package/node/hooks/features/columnGrouping/gridColumnGroupsUtils.js +13 -2
- package/node/hooks/features/columnGrouping/useGridColumnGrouping.js +10 -3
- package/node/hooks/features/columns/gridColumnsSelector.js +11 -21
- package/node/hooks/features/columns/gridColumnsUtils.js +1 -3
- package/node/hooks/features/density/densitySelector.js +2 -4
- package/node/hooks/features/density/useGridDensity.js +2 -4
- package/node/hooks/features/filter/gridFilterSelector.js +14 -27
- package/node/hooks/features/filter/gridFilterUtils.js +4 -4
- package/node/hooks/features/focus/gridFocusStateSelector.js +8 -16
- package/node/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +2 -4
- package/node/hooks/features/pagination/gridPaginationSelector.js +8 -15
- package/node/hooks/features/pagination/gridPaginationUtils.js +1 -2
- package/node/hooks/features/preferencesPanel/gridPreferencePanelsValue.js +2 -3
- package/node/hooks/features/rowSelection/gridRowSelectionSelector.js +4 -7
- package/node/hooks/features/rows/gridRowsSelector.js +14 -27
- package/node/hooks/features/rows/gridRowsUtils.js +2 -4
- package/node/hooks/features/sorting/gridSortingSelector.js +5 -9
- package/node/hooks/features/virtualization/gridVirtualizationSelectors.js +2 -4
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +8 -2
- package/node/hooks/utils/useGridApiEventHandler.js +2 -4
- package/node/hooks/utils/useGridPrivateApiContext.js +1 -2
- package/node/hooks/utils/useGridSelector.js +1 -2
- package/node/index.js +1 -1
- package/node/joy/icons.js +30 -60
- package/node/joy/joySlots.js +1 -2
- package/node/locales/arSD.js +27 -30
- package/node/locales/beBY.js +1 -2
- package/node/locales/bgBG.js +1 -2
- package/node/locales/coreLocales.js +3 -5
- package/node/locales/csCZ.js +1 -2
- package/node/locales/daDK.js +1 -2
- package/node/locales/deDE.js +1 -2
- package/node/locales/elGR.js +1 -2
- package/node/locales/enUS.js +1 -2
- package/node/locales/esES.js +1 -2
- package/node/locales/faIR.js +1 -2
- package/node/locales/fiFI.js +1 -2
- package/node/locales/frFR.js +1 -2
- package/node/locales/heIL.js +1 -2
- package/node/locales/huHU.js +1 -2
- package/node/locales/itIT.js +1 -2
- package/node/locales/jaJP.js +1 -2
- package/node/locales/koKR.js +1 -2
- package/node/locales/nbNO.js +1 -2
- package/node/locales/nlNL.js +1 -2
- package/node/locales/plPL.js +1 -2
- package/node/locales/ptBR.js +1 -2
- package/node/locales/roRO.js +2 -3
- package/node/locales/ruRU.js +1 -2
- package/node/locales/skSK.js +1 -2
- package/node/locales/svSE.js +1 -2
- package/node/locales/trTR.js +1 -2
- package/node/locales/ukUA.js +1 -2
- package/node/locales/urPK.js +1 -2
- package/node/locales/viVN.js +1 -2
- package/node/locales/zhCN.js +1 -2
- package/node/locales/zhTW.js +1 -2
- package/node/material/icons/GridColumnUnsortedIcon.js +2 -3
- package/node/material/icons/index.js +29 -57
- package/node/material/index.js +1 -2
- package/node/models/gridEditRowModel.js +4 -7
- package/node/models/gridFilterItem.js +2 -3
- package/node/models/params/gridEditCellParams.js +3 -5
- package/node/models/params/gridRowParams.js +3 -5
- package/node/utils/keyboardUtils.js +3 -6
- package/package.json +3 -3
package/locales/roRO.js
CHANGED
|
@@ -74,7 +74,7 @@ const roROGrid = {
|
|
|
74
74
|
headerFilterOperatorIs: 'Este',
|
|
75
75
|
headerFilterOperatorNot: 'Nu este',
|
|
76
76
|
headerFilterOperatorAfter: 'Este după',
|
|
77
|
-
headerFilterOperatorOnOrAfter: 'Este la sau
|
|
77
|
+
headerFilterOperatorOnOrAfter: 'Este la sau după',
|
|
78
78
|
headerFilterOperatorBefore: 'Este înainte de',
|
|
79
79
|
headerFilterOperatorOnOrBefore: 'este la sau înainte de',
|
|
80
80
|
headerFilterOperatorIsEmpty: 'Este gol',
|
|
@@ -43,6 +43,20 @@ export interface GridRowEventLookup {
|
|
|
43
43
|
params: GridRowParams;
|
|
44
44
|
event: React.MouseEvent<HTMLElement>;
|
|
45
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* @ignore - do not document.
|
|
48
|
+
*/
|
|
49
|
+
rowMouseOut: {
|
|
50
|
+
params: GridRowParams;
|
|
51
|
+
event: React.MouseEvent<HTMLElement>;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* @ignore - do not document.
|
|
55
|
+
*/
|
|
56
|
+
rowMouseOver: {
|
|
57
|
+
params: GridRowParams;
|
|
58
|
+
event: React.MouseEvent<HTMLElement>;
|
|
59
|
+
};
|
|
46
60
|
/**
|
|
47
61
|
* Fired when the user starts dragging a row. It's mapped to the `dragstart` DOM event.
|
|
48
62
|
* @ignore - do not document.
|
|
@@ -329,7 +329,7 @@ export interface DataGridPropsWithDefaultValues {
|
|
|
329
329
|
/**
|
|
330
330
|
* If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
|
331
331
|
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
|
332
|
-
* @default
|
|
332
|
+
* @default false
|
|
333
333
|
*/
|
|
334
334
|
unstable_ignoreValueFormatterDuringExport: boolean | {
|
|
335
335
|
csvExport?: boolean;
|
|
@@ -27,6 +27,13 @@ const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref
|
|
|
27
27
|
}))
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
|
+
/**
|
|
31
|
+
* Demos:
|
|
32
|
+
* - [DataGrid](https://mui.com/x/react-data-grid/demo/)
|
|
33
|
+
*
|
|
34
|
+
* API:
|
|
35
|
+
* - [DataGrid API](https://mui.com/x/api/data-grid/data-grid/)
|
|
36
|
+
*/
|
|
30
37
|
export const DataGrid = /*#__PURE__*/React.memo(DataGridRaw);
|
|
31
38
|
|
|
32
39
|
/**
|
|
@@ -660,7 +667,7 @@ DataGridRaw.propTypes = {
|
|
|
660
667
|
/**
|
|
661
668
|
* If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
|
662
669
|
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
|
663
|
-
* @default
|
|
670
|
+
* @default false
|
|
664
671
|
*/
|
|
665
672
|
unstable_ignoreValueFormatterDuringExport: PropTypes.oneOfType([PropTypes.shape({
|
|
666
673
|
clipboardExport: PropTypes.bool,
|
|
@@ -51,8 +51,6 @@ export const GRID_DATE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
51
51
|
valueFormatter: gridDateFormatter,
|
|
52
52
|
filterOperators: getGridDateOperators(),
|
|
53
53
|
renderEditCell: renderEditDateCell,
|
|
54
|
-
getApplyQuickFilterFn: undefined,
|
|
55
|
-
getApplyQuickFilterFnV7: undefined,
|
|
56
54
|
// @ts-ignore
|
|
57
55
|
pastedValueParser: value => new Date(value)
|
|
58
56
|
});
|
|
@@ -62,8 +60,6 @@ export const GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
62
60
|
valueFormatter: gridDateTimeFormatter,
|
|
63
61
|
filterOperators: getGridDateOperators(true),
|
|
64
62
|
renderEditCell: renderEditDateCell,
|
|
65
|
-
getApplyQuickFilterFn: undefined,
|
|
66
|
-
getApplyQuickFilterFnV7: undefined,
|
|
67
63
|
// @ts-ignore
|
|
68
64
|
pastedValueParser: value => new Date(value)
|
|
69
65
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["selected", "hovered", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"];
|
|
3
|
+
const _excluded = ["selected", "hovered", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -76,7 +76,9 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
76
76
|
onClick,
|
|
77
77
|
onDoubleClick,
|
|
78
78
|
onMouseEnter,
|
|
79
|
-
onMouseLeave
|
|
79
|
+
onMouseLeave,
|
|
80
|
+
onMouseOut,
|
|
81
|
+
onMouseOver
|
|
80
82
|
} = props,
|
|
81
83
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
82
84
|
const apiRef = useGridApiContext();
|
|
@@ -321,7 +323,9 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
321
323
|
onClick: publishClick,
|
|
322
324
|
onDoubleClick: publish('rowDoubleClick', onDoubleClick),
|
|
323
325
|
onMouseEnter: publish('rowMouseEnter', onMouseEnter),
|
|
324
|
-
onMouseLeave: publish('rowMouseLeave', onMouseLeave)
|
|
326
|
+
onMouseLeave: publish('rowMouseLeave', onMouseLeave),
|
|
327
|
+
onMouseOut: publish('rowMouseOut', onMouseOut),
|
|
328
|
+
onMouseOver: publish('rowMouseOver', onMouseOver)
|
|
325
329
|
} : null;
|
|
326
330
|
return /*#__PURE__*/_jsxs("div", _extends({
|
|
327
331
|
ref: handleRef,
|
|
@@ -48,10 +48,11 @@ const useUtilityClasses = ownerState => {
|
|
|
48
48
|
showRightBorder,
|
|
49
49
|
isEditable,
|
|
50
50
|
isSelected,
|
|
51
|
+
isSelectionMode,
|
|
51
52
|
classes
|
|
52
53
|
} = ownerState;
|
|
53
54
|
const slots = {
|
|
54
|
-
root: ['cell', `cell--text${capitalize(align)}`, isEditable && 'cell--editable', isSelected && 'selected', showRightBorder && 'cell--withRightBorder', 'withBorderColor'],
|
|
55
|
+
root: ['cell', `cell--text${capitalize(align)}`, isEditable && 'cell--editable', isSelected && 'selected', showRightBorder && 'cell--withRightBorder', isSelectionMode && !isEditable && 'cell--selectionMode', 'withBorderColor'],
|
|
55
56
|
content: ['cellContent']
|
|
56
57
|
};
|
|
57
58
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
@@ -458,12 +459,15 @@ const GridCellV7 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
458
459
|
const cellRef = React.useRef(null);
|
|
459
460
|
const handleRef = useForkRef(ref, cellRef);
|
|
460
461
|
const focusElementRef = React.useRef(null);
|
|
462
|
+
// @ts-expect-error To access `unstable_cellSelection` flag as it's a `premium` feature
|
|
463
|
+
const isSelectionMode = rootProps.unstable_cellSelection ?? false;
|
|
461
464
|
const ownerState = {
|
|
462
465
|
align,
|
|
463
466
|
showRightBorder,
|
|
464
467
|
isEditable,
|
|
465
468
|
classes: rootProps.classes,
|
|
466
|
-
isSelected
|
|
469
|
+
isSelected,
|
|
470
|
+
isSelectionMode
|
|
467
471
|
};
|
|
468
472
|
const classes = useUtilityClasses(ownerState);
|
|
469
473
|
const publishMouseUp = React.useCallback(eventName => event => {
|
|
@@ -43,6 +43,8 @@ export const GridRootStyles = styled('div', {
|
|
|
43
43
|
[`&.${gridClasses.aggregationColumnHeaderLabel}`]: styles.aggregationColumnHeaderLabel
|
|
44
44
|
}, {
|
|
45
45
|
[`&.${gridClasses['root--disableUserSelection']} .${gridClasses.cell}`]: styles['root--disableUserSelection']
|
|
46
|
+
}, {
|
|
47
|
+
[`&.${gridClasses.autosizing}`]: styles.autosizing
|
|
46
48
|
}, {
|
|
47
49
|
[`& .${gridClasses.editBooleanCell}`]: styles.editBooleanCell
|
|
48
50
|
}, {
|
|
@@ -184,6 +186,14 @@ export const GridRootStyles = styled('div', {
|
|
|
184
186
|
borderBottomColor: 'transparent'
|
|
185
187
|
}
|
|
186
188
|
},
|
|
189
|
+
[`&.${gridClasses.autosizing}`]: {
|
|
190
|
+
[`& .${gridClasses.columnHeaderTitleContainerContent} > *`]: {
|
|
191
|
+
overflow: 'visible !important'
|
|
192
|
+
},
|
|
193
|
+
[`& .${gridClasses.cell} > *`]: {
|
|
194
|
+
overflow: 'visible !important'
|
|
195
|
+
}
|
|
196
|
+
},
|
|
187
197
|
[`& .${gridClasses['virtualScrollerContent--overflowed']} .${gridClasses['row--lastVisible']} .${gridClasses.cell}`]: {
|
|
188
198
|
borderBottomColor: 'transparent'
|
|
189
199
|
},
|
|
@@ -385,6 +395,9 @@ export const GridRootStyles = styled('div', {
|
|
|
385
395
|
overflow: 'hidden',
|
|
386
396
|
textOverflow: 'ellipsis'
|
|
387
397
|
},
|
|
398
|
+
[`& .${gridClasses.cell}.${gridClasses['cell--selectionMode']}`]: {
|
|
399
|
+
cursor: 'default'
|
|
400
|
+
},
|
|
388
401
|
[`& .${gridClasses.cell}.${gridClasses['cell--editing']}`]: {
|
|
389
402
|
padding: 1,
|
|
390
403
|
display: 'flex',
|
|
@@ -428,4 +428,12 @@ process.env.NODE_ENV !== "production" ? GridFilterForm.propTypes = {
|
|
|
428
428
|
*/
|
|
429
429
|
valueInputProps: PropTypes.any
|
|
430
430
|
} : void 0;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Demos:
|
|
434
|
+
* - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
|
|
435
|
+
*
|
|
436
|
+
* API:
|
|
437
|
+
* - [GridFilterForm API](https://mui.com/x/api/data-grid/grid-filter-form/)
|
|
438
|
+
*/
|
|
431
439
|
export { GridFilterForm };
|
|
@@ -211,4 +211,12 @@ process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
|
|
|
211
211
|
*/
|
|
212
212
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
213
213
|
} : void 0;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Demos:
|
|
217
|
+
* - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
|
|
218
|
+
*
|
|
219
|
+
* API:
|
|
220
|
+
* - [GridFilterPanel API](https://mui.com/x/api/data-grid/grid-filter-panel/)
|
|
221
|
+
*/
|
|
214
222
|
export { GridFilterPanel, getGridFilter };
|
|
@@ -132,4 +132,13 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
|
|
|
132
132
|
*/
|
|
133
133
|
quickFilterParser: PropTypes.func
|
|
134
134
|
} : void 0;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Demos:
|
|
138
|
+
* - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
|
|
139
|
+
* - [Filtering - quick filter](https://mui.com/x/react-data-grid/filtering/quick-filter/)
|
|
140
|
+
*
|
|
141
|
+
* API:
|
|
142
|
+
* - [GridToolbarQuickFilter API](https://mui.com/x/api/data-grid/grid-toolbar-quick-filter/)
|
|
143
|
+
*/
|
|
135
144
|
export { GridToolbarQuickFilter };
|
|
@@ -26,8 +26,10 @@ const VirtualScrollerRoot = styled('div', {
|
|
|
26
26
|
position: 'relative',
|
|
27
27
|
'@media print': {
|
|
28
28
|
overflow: 'hidden'
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
zIndex: 0 // See https://github.com/mui/mui-x/issues/10547
|
|
30
31
|
});
|
|
32
|
+
|
|
31
33
|
const GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualScroller(props, ref) {
|
|
32
34
|
const rootProps = useGridRootProps();
|
|
33
35
|
const classes = useUtilityClasses(rootProps);
|
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_gen
|
|
|
2
2
|
export function getDataGridUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
4
4
|
}
|
|
5
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell', 'cellContent', 'cellCheckbox', 'cellSkeleton', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnGroupHeader', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeader--showColumnBorder', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'pinnedColumns--left', 'pinnedColumns--right', 'pinnedColumnHeaders', 'pinnedColumnHeaders--left', 'pinnedColumnHeaders--right', 'withBorderColor', 'cell--withRightBorder', 'columnHeader--withRightBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
5
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--selectionMode', 'cell', 'cellContent', 'cellCheckbox', 'cellSkeleton', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnGroupHeader', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeader--showColumnBorder', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'pinnedColumns--left', 'pinnedColumns--right', 'pinnedColumnHeaders', 'pinnedColumnHeaders--left', 'pinnedColumnHeaders--right', 'withBorderColor', 'cell--withRightBorder', 'columnHeader--withRightBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
@@ -34,11 +34,20 @@ export const unwrapGroupingColumnModel = columnGroupingModel => {
|
|
|
34
34
|
});
|
|
35
35
|
return unwrappedSubTree;
|
|
36
36
|
};
|
|
37
|
-
export const getColumnGroupsHeaderStructure = (orderedColumns, unwrappedGroupingModel) => {
|
|
37
|
+
export const getColumnGroupsHeaderStructure = (orderedColumns, unwrappedGroupingModel, pinnedFields) => {
|
|
38
38
|
const getParents = field => unwrappedGroupingModel[field] ?? [];
|
|
39
39
|
const groupingHeaderStructure = [];
|
|
40
40
|
const maxDepth = Math.max(...orderedColumns.map(field => getParents(field).length));
|
|
41
41
|
const haveSameParents = (field1, field2, depth) => isDeepEqual(getParents(field1).slice(0, depth + 1), getParents(field2).slice(0, depth + 1));
|
|
42
|
+
const haveDifferentContainers = (field1, field2) => {
|
|
43
|
+
if (pinnedFields?.left && pinnedFields.left.includes(field1) && !pinnedFields.left.includes(field2)) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
if (pinnedFields?.right && !pinnedFields.right.includes(field1) && pinnedFields.right.includes(field2)) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
};
|
|
42
51
|
for (let depth = 0; depth < maxDepth; depth += 1) {
|
|
43
52
|
const depthStructure = orderedColumns.reduce((structure, newField) => {
|
|
44
53
|
const groupId = getParents(newField)[depth] ?? null;
|
|
@@ -51,7 +60,9 @@ export const getColumnGroupsHeaderStructure = (orderedColumns, unwrappedGrouping
|
|
|
51
60
|
const lastGroup = structure[structure.length - 1];
|
|
52
61
|
const prevField = lastGroup.columnFields[lastGroup.columnFields.length - 1];
|
|
53
62
|
const prevGroupId = lastGroup.groupId;
|
|
54
|
-
if (prevGroupId !== groupId || !haveSameParents(prevField, newField, depth)
|
|
63
|
+
if (prevGroupId !== groupId || !haveSameParents(prevField, newField, depth) ||
|
|
64
|
+
// Fix for https://github.com/mui/mui-x/issues/7041
|
|
65
|
+
haveDifferentContainers(prevField, newField)) {
|
|
55
66
|
// It's a new group
|
|
56
67
|
return [...structure, {
|
|
57
68
|
columnFields: [newField],
|
|
@@ -46,7 +46,9 @@ export const columnGroupsStateInitializer = (state, props, apiRef) => {
|
|
|
46
46
|
const visibleColumnFields = gridVisibleColumnFieldsSelector(apiRef);
|
|
47
47
|
const groupLookup = createGroupLookup(props.columnGroupingModel ?? []);
|
|
48
48
|
const unwrappedGroupingModel = unwrapGroupingColumnModel(props.columnGroupingModel ?? []);
|
|
49
|
-
const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel
|
|
49
|
+
const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel,
|
|
50
|
+
// @ts-expect-error Move this part to `Pro` package
|
|
51
|
+
apiRef.current.state.pinnedColumns ?? {});
|
|
50
52
|
const maxDepth = visibleColumnFields.length === 0 ? 0 : Math.max(...visibleColumnFields.map(field => unwrappedGroupingModel[field]?.length ?? 0));
|
|
51
53
|
return _extends({}, state, {
|
|
52
54
|
columnGrouping: {
|
|
@@ -83,7 +85,10 @@ export const useGridColumnGrouping = (apiRef, props) => {
|
|
|
83
85
|
const unwrappedGroupingModel = unwrapGroupingColumnModel(props.columnGroupingModel ?? []);
|
|
84
86
|
apiRef.current.setState(state => {
|
|
85
87
|
const orderedFields = state.columns?.orderedFields ?? [];
|
|
86
|
-
|
|
88
|
+
|
|
89
|
+
// @ts-expect-error Move this logic to `Pro` package
|
|
90
|
+
const pinnedColumns = state.pinnedColumns ?? {};
|
|
91
|
+
const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(orderedFields, unwrappedGroupingModel, pinnedColumns);
|
|
87
92
|
return _extends({}, state, {
|
|
88
93
|
columnGrouping: _extends({}, state.columnGrouping, {
|
|
89
94
|
headerStructure: columnGroupsHeaderStructure
|
|
@@ -95,11 +100,13 @@ export const useGridColumnGrouping = (apiRef, props) => {
|
|
|
95
100
|
if (!props.experimentalFeatures?.columnGrouping) {
|
|
96
101
|
return;
|
|
97
102
|
}
|
|
103
|
+
// @ts-expect-error Move this logic to `Pro` package
|
|
104
|
+
const pinnedColumns = apiRef.current.getPinnedColumns?.() ?? {};
|
|
98
105
|
const columnFields = gridColumnFieldsSelector(apiRef);
|
|
99
106
|
const visibleColumnFields = gridVisibleColumnFieldsSelector(apiRef);
|
|
100
107
|
const groupLookup = createGroupLookup(columnGroupingModel ?? []);
|
|
101
108
|
const unwrappedGroupingModel = unwrapGroupingColumnModel(columnGroupingModel ?? []);
|
|
102
|
-
const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel);
|
|
109
|
+
const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel, pinnedColumns);
|
|
103
110
|
const maxDepth = visibleColumnFields.length === 0 ? 0 : Math.max(...visibleColumnFields.map(field => unwrappedGroupingModel[field]?.length ?? 0));
|
|
104
111
|
apiRef.current.setState(state => {
|
|
105
112
|
return _extends({}, state, {
|
|
@@ -50,7 +50,6 @@ export function computeFlexColumnsWidth({
|
|
|
50
50
|
for (let i = 0; i < flexColumns.length; i += 1) {
|
|
51
51
|
const column = flexColumns[i];
|
|
52
52
|
if (flexColumnsLookup.all[column.field] && flexColumnsLookup.all[column.field].frozen === true) {
|
|
53
|
-
// eslint-disable-next-line no-continue
|
|
54
53
|
continue;
|
|
55
54
|
}
|
|
56
55
|
|
|
@@ -160,7 +160,7 @@ export const buildAggregatedFilterItemsApplier = (getRowId, filterModel, apiRef,
|
|
|
160
160
|
|
|
161
161
|
// We generate a new function with `eval()` to avoid expensive patterns for JS engines
|
|
162
162
|
// such as a dynamic object assignment, e.g. `{ [dynamicKey]: value }`.
|
|
163
|
-
const filterItemTemplate = `(function filterItem$$(appliers, row, shouldApplyFilter) {
|
|
163
|
+
const filterItemTemplate = `(function filterItem$$(getRowId, appliers, row, shouldApplyFilter) {
|
|
164
164
|
${appliers.map((applier, i) => `const shouldApply${i} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(applier.item.field)});`).join('\n')}
|
|
165
165
|
|
|
166
166
|
const result$$ = {
|
|
@@ -174,7 +174,7 @@ export const buildAggregatedFilterItemsApplier = (getRowId, filterModel, apiRef,
|
|
|
174
174
|
})`;
|
|
175
175
|
const filterItemCore = evalCode(filterItemTemplate.replaceAll('$$', String(filterItemsApplierId)));
|
|
176
176
|
const filterItem = (row, shouldApplyItem) => {
|
|
177
|
-
return filterItemCore(appliers, row, shouldApplyItem);
|
|
177
|
+
return filterItemCore(getRowId, appliers, row, shouldApplyItem);
|
|
178
178
|
};
|
|
179
179
|
filterItemsApplierId += 1;
|
|
180
180
|
return filterItem;
|
|
@@ -223,7 +223,7 @@ export const buildAggregatedQuickFilterApplier = (getRowId, filterModel, apiRef)
|
|
|
223
223
|
const result = {};
|
|
224
224
|
const usedCellParams = {};
|
|
225
225
|
|
|
226
|
-
/* eslint-disable no-restricted-syntax, no-labels
|
|
226
|
+
/* eslint-disable no-restricted-syntax, no-labels */
|
|
227
227
|
outer: for (let v = 0; v < quickFilterValues.length; v += 1) {
|
|
228
228
|
const filterValue = quickFilterValues[v];
|
|
229
229
|
for (let i = 0; i < appliersPerField.length; i += 1) {
|
|
@@ -260,7 +260,7 @@ export const buildAggregatedQuickFilterApplier = (getRowId, filterModel, apiRef)
|
|
|
260
260
|
}
|
|
261
261
|
result[filterValue] = false;
|
|
262
262
|
}
|
|
263
|
-
/* eslint-enable no-restricted-syntax, no-labels
|
|
263
|
+
/* eslint-enable no-restricted-syntax, no-labels */
|
|
264
264
|
|
|
265
265
|
return result;
|
|
266
266
|
};
|
|
@@ -348,10 +348,16 @@ export const useGridVirtualScroller = props => {
|
|
|
348
348
|
}
|
|
349
349
|
return -1;
|
|
350
350
|
}, [cellFocus, currentPage.rows]);
|
|
351
|
-
useGridApiEventHandler(apiRef, '
|
|
351
|
+
useGridApiEventHandler(apiRef, 'rowMouseOver', (params, event) => {
|
|
352
|
+
if (event.currentTarget.contains(event.relatedTarget)) {
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
352
355
|
setHoveredRowId(params.id ?? null);
|
|
353
356
|
});
|
|
354
|
-
useGridApiEventHandler(apiRef, '
|
|
357
|
+
useGridApiEventHandler(apiRef, 'rowMouseOut', (params, event) => {
|
|
358
|
+
if (event.currentTarget.contains(event.relatedTarget)) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
355
361
|
setHoveredRowId(null);
|
|
356
362
|
});
|
|
357
363
|
const getRows = (params = {
|
package/modern/index.js
CHANGED
package/modern/locales/arSD.js
CHANGED
|
@@ -37,7 +37,7 @@ const arSDGrid = {
|
|
|
37
37
|
columnsPanelHideAllButton: 'إخفاء الكل',
|
|
38
38
|
// Filter panel text
|
|
39
39
|
filterPanelAddFilter: 'إضافة مرشِح',
|
|
40
|
-
|
|
40
|
+
filterPanelRemoveAll: 'حذف الكل',
|
|
41
41
|
filterPanelDeleteIconLabel: 'حذف',
|
|
42
42
|
filterPanelLogicOperator: 'عامل منطقي',
|
|
43
43
|
filterPanelOperator: 'عامل',
|
|
@@ -60,34 +60,32 @@ const arSDGrid = {
|
|
|
60
60
|
filterOperatorIsEmpty: 'خالي',
|
|
61
61
|
filterOperatorIsNotEmpty: 'غير خالي',
|
|
62
62
|
filterOperatorIsAnyOf: 'أي من',
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
'filterOperator=': '=',
|
|
64
|
+
'filterOperator!=': '!=',
|
|
65
|
+
'filterOperator>': '>',
|
|
66
|
+
'filterOperator>=': '>=',
|
|
67
|
+
'filterOperator<': '<',
|
|
68
|
+
'filterOperator<=': '<=',
|
|
70
69
|
// Header filter operators text
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
70
|
+
headerFilterOperatorContains: 'يحتوي على',
|
|
71
|
+
headerFilterOperatorEquals: 'يساوي',
|
|
72
|
+
headerFilterOperatorStartsWith: 'يبدأ ب',
|
|
73
|
+
headerFilterOperatorEndsWith: 'ينتهي ب',
|
|
74
|
+
headerFilterOperatorIs: 'هو',
|
|
75
|
+
headerFilterOperatorNot: 'هو ليس',
|
|
76
|
+
headerFilterOperatorAfter: 'يقع بعد',
|
|
77
|
+
headerFilterOperatorOnOrAfter: 'هو على او بعد',
|
|
78
|
+
headerFilterOperatorBefore: 'يقع قبل',
|
|
79
|
+
headerFilterOperatorOnOrBefore: 'هو على او بعد',
|
|
80
|
+
headerFilterOperatorIsEmpty: 'هو فارغ',
|
|
81
|
+
headerFilterOperatorIsNotEmpty: 'هو ليس فارغ',
|
|
82
|
+
headerFilterOperatorIsAnyOf: 'هو أي من',
|
|
83
|
+
'headerFilterOperator=': 'يساوي',
|
|
84
|
+
'headerFilterOperator!=': 'لا يساوي',
|
|
85
|
+
'headerFilterOperator>': 'أكبر من',
|
|
86
|
+
'headerFilterOperator>=': 'أكبر من او يساوي',
|
|
87
|
+
'headerFilterOperator<': 'اصغر من',
|
|
88
|
+
'headerFilterOperator<=': 'اصغر من او يساوي',
|
|
91
89
|
// Filter values text
|
|
92
90
|
filterValueAny: 'أي',
|
|
93
91
|
filterValueTrue: 'صائب',
|
package/modern/locales/roRO.js
CHANGED
|
@@ -74,7 +74,7 @@ const roROGrid = {
|
|
|
74
74
|
headerFilterOperatorIs: 'Este',
|
|
75
75
|
headerFilterOperatorNot: 'Nu este',
|
|
76
76
|
headerFilterOperatorAfter: 'Este după',
|
|
77
|
-
headerFilterOperatorOnOrAfter: 'Este la sau
|
|
77
|
+
headerFilterOperatorOnOrAfter: 'Este la sau după',
|
|
78
78
|
headerFilterOperatorBefore: 'Este înainte de',
|
|
79
79
|
headerFilterOperatorOnOrBefore: 'este la sau înainte de',
|
|
80
80
|
headerFilterOperatorIsEmpty: 'Este gol',
|
|
@@ -35,22 +35,26 @@ const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref
|
|
|
35
35
|
}))
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Demos:
|
|
40
|
+
* - [DataGrid](https://mui.com/x/react-data-grid/demo/)
|
|
41
|
+
*
|
|
42
|
+
* API:
|
|
43
|
+
* - [DataGrid API](https://mui.com/x/api/data-grid/data-grid/)
|
|
44
|
+
*/
|
|
45
|
+
const DataGrid = exports.DataGrid = /*#__PURE__*/React.memo(DataGridRaw);
|
|
39
46
|
|
|
40
47
|
/**
|
|
41
48
|
* Remove at v7
|
|
42
49
|
* @deprecated
|
|
43
50
|
*/
|
|
44
|
-
exports.
|
|
45
|
-
const SUBMIT_FILTER_STROKE_TIME = _useDataGridProps.DATA_GRID_PROPS_DEFAULT_VALUES.filterDebounceMs;
|
|
51
|
+
const SUBMIT_FILTER_STROKE_TIME = exports.SUBMIT_FILTER_STROKE_TIME = _useDataGridProps.DATA_GRID_PROPS_DEFAULT_VALUES.filterDebounceMs;
|
|
46
52
|
|
|
47
53
|
/**
|
|
48
54
|
* Remove at v7
|
|
49
55
|
* @deprecated
|
|
50
56
|
*/
|
|
51
|
-
exports.
|
|
52
|
-
const SUBMIT_FILTER_DATE_STROKE_TIME = _useDataGridProps.DATA_GRID_PROPS_DEFAULT_VALUES.filterDebounceMs;
|
|
53
|
-
exports.SUBMIT_FILTER_DATE_STROKE_TIME = SUBMIT_FILTER_DATE_STROKE_TIME;
|
|
57
|
+
const SUBMIT_FILTER_DATE_STROKE_TIME = exports.SUBMIT_FILTER_DATE_STROKE_TIME = _useDataGridProps.DATA_GRID_PROPS_DEFAULT_VALUES.filterDebounceMs;
|
|
54
58
|
DataGridRaw.propTypes = {
|
|
55
59
|
// ----------------------------- Warning --------------------------------
|
|
56
60
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -671,7 +675,7 @@ DataGridRaw.propTypes = {
|
|
|
671
675
|
/**
|
|
672
676
|
* If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
|
673
677
|
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
|
674
|
-
* @default
|
|
678
|
+
* @default false
|
|
675
679
|
*/
|
|
676
680
|
unstable_ignoreValueFormatterDuringExport: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
677
681
|
clipboardExport: _propTypes.default.bool,
|
|
@@ -31,7 +31,7 @@ const DATA_GRID_FORCED_PROPS = {
|
|
|
31
31
|
/**
|
|
32
32
|
* The default values of `DataGridPropsWithDefaultValues` to inject in the props of DataGrid.
|
|
33
33
|
*/
|
|
34
|
-
const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
34
|
+
const DATA_GRID_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
35
35
|
autoHeight: false,
|
|
36
36
|
autoPageSize: false,
|
|
37
37
|
checkboxSelection: false,
|
|
@@ -79,7 +79,6 @@ const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
79
79
|
unstable_ignoreValueFormatterDuringExport: false,
|
|
80
80
|
clipboardCopyCellDelimiter: '\t'
|
|
81
81
|
};
|
|
82
|
-
exports.DATA_GRID_PROPS_DEFAULT_VALUES = DATA_GRID_PROPS_DEFAULT_VALUES;
|
|
83
82
|
const defaultSlots = (0, _utils.uncapitalizeObjectKeys)(_defaultGridSlotsComponents.DATA_GRID_DEFAULT_SLOTS_COMPONENTS);
|
|
84
83
|
const useDataGridProps = inProps => {
|
|
85
84
|
const [components, componentsProps, themedProps] = (0, _utils.useProps)((0, _styles.useThemeProps)({
|
|
@@ -8,9 +8,8 @@ exports.GRID_ACTIONS_COL_DEF = exports.GRID_ACTIONS_COLUMN_TYPE = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _gridStringColDef = require("./gridStringColDef");
|
|
10
10
|
var _GridActionsCell = require("../components/cell/GridActionsCell");
|
|
11
|
-
const GRID_ACTIONS_COLUMN_TYPE = 'actions';
|
|
12
|
-
exports.
|
|
13
|
-
const GRID_ACTIONS_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
11
|
+
const GRID_ACTIONS_COLUMN_TYPE = exports.GRID_ACTIONS_COLUMN_TYPE = 'actions';
|
|
12
|
+
const GRID_ACTIONS_COL_DEF = exports.GRID_ACTIONS_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
14
13
|
sortable: false,
|
|
15
14
|
filterable: false,
|
|
16
15
|
// @ts-ignore
|
|
@@ -24,5 +23,4 @@ const GRID_ACTIONS_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_S
|
|
|
24
23
|
renderCell: _GridActionsCell.renderActionsCell,
|
|
25
24
|
getApplyQuickFilterFn: undefined,
|
|
26
25
|
getApplyQuickFilterFnV7: undefined
|
|
27
|
-
});
|
|
28
|
-
exports.GRID_ACTIONS_COL_DEF = GRID_ACTIONS_COL_DEF;
|
|
26
|
+
});
|
|
@@ -33,7 +33,7 @@ const stringToBoolean = value => {
|
|
|
33
33
|
return undefined;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const GRID_BOOLEAN_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
36
|
+
const GRID_BOOLEAN_COL_DEF = exports.GRID_BOOLEAN_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
37
37
|
type: 'boolean',
|
|
38
38
|
align: 'center',
|
|
39
39
|
headerAlign: 'center',
|
|
@@ -48,5 +48,4 @@ const GRID_BOOLEAN_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_S
|
|
|
48
48
|
aggregable: false,
|
|
49
49
|
// @ts-ignore
|
|
50
50
|
pastedValueParser: value => stringToBoolean(value)
|
|
51
|
-
});
|
|
52
|
-
exports.GRID_BOOLEAN_COL_DEF = GRID_BOOLEAN_COL_DEF;
|
|
51
|
+
});
|
|
@@ -14,9 +14,8 @@ var _gridBooleanColDef = require("./gridBooleanColDef");
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
const GRID_CHECKBOX_SELECTION_FIELD = '__check__';
|
|
18
|
-
exports.
|
|
19
|
-
const GRID_CHECKBOX_SELECTION_COL_DEF = (0, _extends2.default)({}, _gridBooleanColDef.GRID_BOOLEAN_COL_DEF, {
|
|
17
|
+
const GRID_CHECKBOX_SELECTION_FIELD = exports.GRID_CHECKBOX_SELECTION_FIELD = '__check__';
|
|
18
|
+
const GRID_CHECKBOX_SELECTION_COL_DEF = exports.GRID_CHECKBOX_SELECTION_COL_DEF = (0, _extends2.default)({}, _gridBooleanColDef.GRID_BOOLEAN_COL_DEF, {
|
|
20
19
|
field: GRID_CHECKBOX_SELECTION_FIELD,
|
|
21
20
|
type: 'checkboxSelection',
|
|
22
21
|
width: 50,
|
|
@@ -36,5 +35,4 @@ const GRID_CHECKBOX_SELECTION_COL_DEF = (0, _extends2.default)({}, _gridBooleanC
|
|
|
36
35
|
},
|
|
37
36
|
renderHeader: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHeaderCheckbox.GridHeaderCheckbox, (0, _extends2.default)({}, params)),
|
|
38
37
|
renderCell: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridCellCheckboxRenderer.GridCellCheckboxRenderer, (0, _extends2.default)({}, params))
|
|
39
|
-
});
|
|
40
|
-
exports.GRID_CHECKBOX_SELECTION_COL_DEF = GRID_CHECKBOX_SELECTION_COL_DEF;
|
|
38
|
+
});
|
|
@@ -54,27 +54,21 @@ function gridDateTimeFormatter({
|
|
|
54
54
|
});
|
|
55
55
|
return value.toLocaleString();
|
|
56
56
|
}
|
|
57
|
-
const GRID_DATE_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
57
|
+
const GRID_DATE_COL_DEF = exports.GRID_DATE_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
58
58
|
type: 'date',
|
|
59
59
|
sortComparator: _gridSortingUtils.gridDateComparator,
|
|
60
60
|
valueFormatter: gridDateFormatter,
|
|
61
61
|
filterOperators: (0, _gridDateOperators.getGridDateOperators)(),
|
|
62
62
|
renderEditCell: _GridEditDateCell.renderEditDateCell,
|
|
63
|
-
getApplyQuickFilterFn: undefined,
|
|
64
|
-
getApplyQuickFilterFnV7: undefined,
|
|
65
63
|
// @ts-ignore
|
|
66
64
|
pastedValueParser: value => new Date(value)
|
|
67
65
|
});
|
|
68
|
-
exports.
|
|
69
|
-
const GRID_DATETIME_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
66
|
+
const GRID_DATETIME_COL_DEF = exports.GRID_DATETIME_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
70
67
|
type: 'dateTime',
|
|
71
68
|
sortComparator: _gridSortingUtils.gridDateComparator,
|
|
72
69
|
valueFormatter: gridDateTimeFormatter,
|
|
73
70
|
filterOperators: (0, _gridDateOperators.getGridDateOperators)(true),
|
|
74
71
|
renderEditCell: _GridEditDateCell.renderEditDateCell,
|
|
75
|
-
getApplyQuickFilterFn: undefined,
|
|
76
|
-
getApplyQuickFilterFnV7: undefined,
|
|
77
72
|
// @ts-ignore
|
|
78
73
|
pastedValueParser: value => new Date(value)
|
|
79
|
-
});
|
|
80
|
-
exports.GRID_DATETIME_COL_DEF = GRID_DATETIME_COL_DEF;
|
|
74
|
+
});
|