@mui/x-data-grid 5.12.3 → 5.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/DataGrid/DataGrid.js +4 -4
  3. package/colDef/gridStringOperators.d.ts +1 -1
  4. package/colDef/gridStringOperators.js +11 -6
  5. package/components/GridRow.js +1 -1
  6. package/components/cell/GridActionsCellItem.d.ts +2 -2
  7. package/components/panel/GridPanel.d.ts +1 -1
  8. package/components/panel/filterPanel/GridFilterForm.js +11 -4
  9. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  10. package/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  11. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -8
  12. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +30 -14
  13. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -7
  14. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +32 -14
  15. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  16. package/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  17. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +6 -3
  18. package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
  19. package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
  20. package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
  21. package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
  22. package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
  23. package/hooks/features/dimensions/useGridDimensions.js +28 -15
  24. package/hooks/features/editRows/useGridCellEditing.new.js +6 -0
  25. package/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  26. package/hooks/features/editRows/useGridRowEditing.new.js +6 -0
  27. package/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  28. package/hooks/features/rows/useGridRows.js +1 -1
  29. package/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  30. package/hooks/utils/useGridApiContext.js +1 -1
  31. package/hooks/utils/useGridRootProps.js +1 -1
  32. package/index.js +1 -1
  33. package/legacy/DataGrid/DataGrid.js +4 -4
  34. package/legacy/colDef/gridStringOperators.js +13 -5
  35. package/legacy/components/GridRow.js +1 -1
  36. package/legacy/components/panel/filterPanel/GridFilterForm.js +9 -4
  37. package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  38. package/legacy/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  39. package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +22 -7
  40. package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +24 -7
  41. package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  42. package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  43. package/legacy/hooks/features/dimensions/useGridDimensions.js +27 -15
  44. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +6 -0
  45. package/legacy/hooks/features/editRows/useGridCellEditing.old.js +16 -8
  46. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +6 -0
  47. package/legacy/hooks/features/editRows/useGridRowEditing.old.js +22 -14
  48. package/legacy/hooks/features/rows/useGridRows.js +1 -1
  49. package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  50. package/legacy/hooks/utils/useGridApiContext.js +1 -1
  51. package/legacy/hooks/utils/useGridRootProps.js +1 -1
  52. package/legacy/index.js +1 -1
  53. package/legacy/locales/index.js +2 -0
  54. package/legacy/locales/roRO.js +128 -0
  55. package/legacy/locales/skSK.js +16 -16
  56. package/legacy/utils/keyboardUtils.js +4 -3
  57. package/locales/index.d.ts +2 -0
  58. package/locales/index.js +2 -0
  59. package/locales/roRO.d.ts +2 -0
  60. package/locales/roRO.js +116 -0
  61. package/locales/skSK.js +16 -16
  62. package/modern/DataGrid/DataGrid.js +4 -4
  63. package/modern/colDef/gridStringOperators.js +11 -6
  64. package/modern/components/GridRow.js +1 -1
  65. package/modern/components/panel/filterPanel/GridFilterForm.js +11 -4
  66. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  67. package/modern/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  68. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +20 -8
  69. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +22 -8
  70. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  71. package/modern/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  72. package/modern/hooks/features/dimensions/useGridDimensions.js +28 -15
  73. package/modern/hooks/features/editRows/useGridCellEditing.new.js +6 -0
  74. package/modern/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  75. package/modern/hooks/features/editRows/useGridRowEditing.new.js +6 -0
  76. package/modern/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  77. package/modern/hooks/features/rows/useGridRows.js +1 -1
  78. package/modern/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  79. package/modern/hooks/utils/useGridApiContext.js +1 -1
  80. package/modern/hooks/utils/useGridRootProps.js +1 -1
  81. package/modern/index.js +1 -1
  82. package/modern/locales/index.js +2 -0
  83. package/modern/locales/roRO.js +116 -0
  84. package/modern/locales/skSK.js +16 -16
  85. package/modern/utils/keyboardUtils.js +4 -3
  86. package/node/DataGrid/DataGrid.js +4 -4
  87. package/node/colDef/gridStringOperators.js +11 -6
  88. package/node/components/GridRow.js +1 -1
  89. package/node/components/panel/filterPanel/GridFilterForm.js +9 -4
  90. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  91. package/node/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  92. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +31 -15
  93. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +33 -15
  94. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  95. package/node/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  96. package/node/hooks/features/dimensions/useGridDimensions.js +28 -15
  97. package/node/hooks/features/editRows/useGridCellEditing.new.js +6 -0
  98. package/node/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  99. package/node/hooks/features/editRows/useGridRowEditing.new.js +6 -0
  100. package/node/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  101. package/node/hooks/features/rows/useGridRows.js +1 -1
  102. package/node/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  103. package/node/hooks/utils/useGridApiContext.js +1 -1
  104. package/node/hooks/utils/useGridRootProps.js +1 -1
  105. package/node/index.js +1 -1
  106. package/node/locales/index.js +26 -0
  107. package/node/locales/roRO.js +126 -0
  108. package/node/locales/skSK.js +16 -16
  109. package/node/utils/keyboardUtils.js +4 -3
  110. package/package.json +2 -2
  111. package/utils/keyboardUtils.js +4 -3
@@ -40,15 +40,15 @@ const skSKGrid = {
40
40
  return `${count} ${pluralForm}`;
41
41
  },
42
42
  // Quick filter toolbar field
43
- // toolbarQuickFilterPlaceholder: 'Search...',
44
- // toolbarQuickFilterLabel: 'Search',
45
- // toolbarQuickFilterDeleteIconLabel: 'Clear',
43
+ toolbarQuickFilterPlaceholder: 'Vyhľadať...',
44
+ toolbarQuickFilterLabel: 'Vyhľadať',
45
+ toolbarQuickFilterDeleteIconLabel: 'Vymazať',
46
46
  // Export selector toolbar button text
47
47
  toolbarExport: 'Export',
48
48
  toolbarExportLabel: 'Export',
49
49
  toolbarExportCSV: 'Stiahnuť ako CSV',
50
50
  toolbarExportPrint: 'Vytlačiť',
51
- // toolbarExportExcel: 'Download as Excel',
51
+ toolbarExportExcel: 'Stiahnuť ako Excel',
52
52
  // Columns panel text
53
53
  columnsPanelTextFieldLabel: 'Nájsť stĺpec',
54
54
  columnsPanelTextFieldPlaceholder: 'Názov stĺpca',
@@ -58,7 +58,7 @@ const skSKGrid = {
58
58
  // Filter panel text
59
59
  filterPanelAddFilter: 'Pridať filter',
60
60
  filterPanelDeleteIconLabel: 'Odstrániť',
61
- // filterPanelLinkOperator: 'Logic operator',
61
+ filterPanelLinkOperator: 'Logický operátor',
62
62
  filterPanelOperators: 'Operátory',
63
63
  // TODO v6: rename to filterPanelOperator
64
64
  filterPanelOperatorAnd: 'A',
@@ -79,7 +79,7 @@ const skSKGrid = {
79
79
  filterOperatorOnOrBefore: 'je na alebo skôr',
80
80
  filterOperatorIsEmpty: 'je prázdny',
81
81
  filterOperatorIsNotEmpty: 'nie je prázdny',
82
- // filterOperatorIsAnyOf: 'is any of',
82
+ filterOperatorIsAnyOf: 'je jeden z',
83
83
  // Filter values text
84
84
  filterValueAny: 'akýkoľvek',
85
85
  filterValueTrue: 'áno',
@@ -129,10 +129,10 @@ const skSKGrid = {
129
129
  },
130
130
  // Checkbox selection text
131
131
  checkboxSelectionHeaderName: 'Výber riadku',
132
- // checkboxSelectionSelectAllRows: 'Select all rows',
133
- // checkboxSelectionUnselectAllRows: 'Unselect all rows',
134
- // checkboxSelectionSelectRow: 'Select row',
135
- // checkboxSelectionUnselectRow: 'Unselect row',
132
+ checkboxSelectionSelectAllRows: 'Vybrať všetky riadky',
133
+ checkboxSelectionUnselectAllRows: 'Zrušiť výber všetkých riadkov',
134
+ checkboxSelectionSelectRow: 'Vyber riadok',
135
+ checkboxSelectionUnselectRow: 'Zruš výber riadku',
136
136
  // Boolean cell text
137
137
  booleanCellTrueLabel: 'áno',
138
138
  booleanCellFalseLabel: 'nie',
@@ -149,13 +149,13 @@ const skSKGrid = {
149
149
  // Grouping columns
150
150
  groupingColumnHeaderName: 'Skupina',
151
151
  groupColumn: name => `Zoskupiť podľa ${name}`,
152
- unGroupColumn: name => `Prestať zoskupovať podľa ${name}` // Master/detail
153
- // detailPanelToggle: 'Detail panel toggle',
154
- // expandDetailPanel: 'Expand',
155
- // collapseDetailPanel: 'Collapse',
152
+ unGroupColumn: name => `Prestať zoskupovať podľa ${name}`,
153
+ // Master/detail
154
+ detailPanelToggle: 'Prepnúť detail panelu',
155
+ expandDetailPanel: 'Rozbaliť',
156
+ collapseDetailPanel: 'Zbaliť',
156
157
  // Row reordering text
157
- // rowReorderingHeaderName: 'Row reordering',
158
-
158
+ rowReorderingHeaderName: 'Preusporiadávanie riadkov'
159
159
  };
160
160
  const skSK = (0, _getGridLocalization.getGridLocalization)(skSKGrid, _locale.skSK);
161
161
  exports.skSK = skSK;
@@ -36,12 +36,13 @@ const isPageKeys = key => key.indexOf('Page') === 0;
36
36
 
37
37
  exports.isPageKeys = isPageKeys;
38
38
 
39
- const isDeleteKeys = key => key === 'Delete' || key === 'Backspace';
39
+ const isDeleteKeys = key => key === 'Delete' || key === 'Backspace'; // Non printable keys have a name, e.g. "ArrowRight", see the whole list:
40
+ // https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
41
+
40
42
 
41
43
  exports.isDeleteKeys = isDeleteKeys;
42
- const printableCharRegex = /^(\p{L}|\p{M}\p{L}|\p{M}|\p{N}|\p{Z}|\p{S}|\p{P})$/iu;
43
44
 
44
- const isPrintableKey = key => printableCharRegex.test(key);
45
+ const isPrintableKey = key => key.length === 1;
45
46
 
46
47
  exports.isPrintableKey = isPrintableKey;
47
48
  const GRID_MULTIPLE_SELECTION_KEYS = ['Meta', 'Control', 'Shift'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "5.12.3",
3
+ "version": "5.13.0",
4
4
  "description": "The community edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.17.2",
39
39
  "@mui/utils": "^5.4.1",
40
- "clsx": "^1.1.1",
40
+ "clsx": "^1.2.1",
41
41
  "prop-types": "^15.8.1",
42
42
  "reselect": "^4.1.6"
43
43
  },
@@ -8,9 +8,10 @@ export const isSpaceKey = key => key === ' ';
8
8
  export const isArrowKeys = key => key.indexOf('Arrow') === 0;
9
9
  export const isHomeOrEndKeys = key => key === 'Home' || key === 'End';
10
10
  export const isPageKeys = key => key.indexOf('Page') === 0;
11
- export const isDeleteKeys = key => key === 'Delete' || key === 'Backspace';
12
- const printableCharRegex = /^(\p{L}|\p{M}\p{L}|\p{M}|\p{N}|\p{Z}|\p{S}|\p{P})$/iu;
13
- export const isPrintableKey = key => printableCharRegex.test(key);
11
+ export const isDeleteKeys = key => key === 'Delete' || key === 'Backspace'; // Non printable keys have a name, e.g. "ArrowRight", see the whole list:
12
+ // https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
13
+
14
+ export const isPrintableKey = key => key.length === 1;
14
15
  export const GRID_MULTIPLE_SELECTION_KEYS = ['Meta', 'Control', 'Shift'];
15
16
  export const GRID_CELL_EXIT_EDIT_MODE_KEYS = ['Enter', 'Escape', 'Tab'];
16
17
  export const GRID_CELL_EDIT_COMMIT_KEYS = ['Enter', 'Tab'];