@mui/x-data-grid 7.11.0 → 7.11.1

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 (75) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/components/panel/GridPreferencesPanel.d.ts +1 -1
  3. package/components/panel/GridPreferencesPanel.js +3 -4
  4. package/hooks/core/useGridApiInitialization.js +1 -1
  5. package/hooks/features/editing/useGridCellEditing.js +2 -3
  6. package/hooks/features/editing/useGridRowEditing.js +2 -3
  7. package/hooks/features/export/serializers/csvSerializer.js +7 -8
  8. package/hooks/features/filter/gridFilterUtils.js +12 -9
  9. package/hooks/features/sorting/gridSortingUtils.js +2 -3
  10. package/hooks/utils/useGridApiEventHandler.d.ts +2 -1
  11. package/hooks/utils/useGridApiEventHandler.js +1 -0
  12. package/hooks/utils/useGridSelector.js +2 -3
  13. package/index.js +1 -1
  14. package/internals/index.d.ts +0 -1
  15. package/internals/index.js +0 -1
  16. package/internals/utils/index.d.ts +1 -0
  17. package/internals/utils/index.js +2 -1
  18. package/internals/utils/propValidation.d.ts +0 -1
  19. package/internals/utils/propValidation.js +4 -13
  20. package/internals/utils/warning.d.ts +2 -0
  21. package/internals/utils/warning.js +21 -0
  22. package/locales/deDE.js +1 -2
  23. package/locales/index.d.ts +2 -0
  24. package/locales/index.js +3 -1
  25. package/locales/isIS.d.ts +2 -0
  26. package/locales/isIS.js +149 -0
  27. package/locales/nbNO.js +30 -32
  28. package/locales/nnNO.d.ts +2 -0
  29. package/locales/nnNO.js +148 -0
  30. package/modern/components/panel/GridPreferencesPanel.js +3 -4
  31. package/modern/hooks/core/useGridApiInitialization.js +1 -1
  32. package/modern/hooks/features/editing/useGridCellEditing.js +2 -3
  33. package/modern/hooks/features/editing/useGridRowEditing.js +2 -3
  34. package/modern/hooks/features/export/serializers/csvSerializer.js +7 -8
  35. package/modern/hooks/features/filter/gridFilterUtils.js +12 -9
  36. package/modern/hooks/features/sorting/gridSortingUtils.js +2 -3
  37. package/modern/hooks/utils/useGridApiEventHandler.js +1 -0
  38. package/modern/hooks/utils/useGridSelector.js +2 -3
  39. package/modern/index.js +1 -1
  40. package/modern/internals/index.js +0 -1
  41. package/modern/internals/utils/index.js +2 -1
  42. package/modern/internals/utils/propValidation.js +4 -13
  43. package/modern/internals/utils/warning.js +21 -0
  44. package/modern/locales/deDE.js +1 -2
  45. package/modern/locales/index.js +3 -1
  46. package/modern/locales/isIS.js +149 -0
  47. package/modern/locales/nbNO.js +30 -32
  48. package/modern/locales/nnNO.js +148 -0
  49. package/modern/utils/createSelector.js +2 -3
  50. package/node/components/panel/GridPreferencesPanel.js +4 -5
  51. package/node/hooks/core/useGridApiInitialization.js +1 -1
  52. package/node/hooks/features/editing/useGridCellEditing.js +2 -3
  53. package/node/hooks/features/editing/useGridRowEditing.js +2 -3
  54. package/node/hooks/features/export/serializers/csvSerializer.js +7 -8
  55. package/node/hooks/features/filter/gridFilterUtils.js +12 -9
  56. package/node/hooks/features/sorting/gridSortingUtils.js +2 -3
  57. package/node/hooks/utils/useGridApiEventHandler.js +1 -0
  58. package/node/hooks/utils/useGridSelector.js +2 -3
  59. package/node/index.js +1 -1
  60. package/node/internals/index.js +0 -8
  61. package/node/internals/utils/index.js +11 -0
  62. package/node/internals/utils/propValidation.js +4 -14
  63. package/node/internals/utils/warning.js +28 -0
  64. package/node/locales/deDE.js +1 -2
  65. package/node/locales/index.js +22 -0
  66. package/node/locales/isIS.js +155 -0
  67. package/node/locales/nbNO.js +30 -32
  68. package/node/locales/nnNO.js +154 -0
  69. package/node/utils/createSelector.js +2 -3
  70. package/package.json +4 -4
  71. package/utils/createSelector.js +2 -3
  72. package/modern/utils/warning.js +0 -24
  73. package/node/utils/warning.js +0 -32
  74. package/utils/warning.d.ts +0 -2
  75. package/utils/warning.js +0 -24
@@ -1,24 +0,0 @@
1
- export const buildWarning = (message, gravity = 'warning') => {
2
- let alreadyWarned = false;
3
- const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
4
- return () => {
5
- if (!alreadyWarned) {
6
- alreadyWarned = true;
7
- if (gravity === 'error') {
8
- console.error(cleanMessage);
9
- } else {
10
- console.warn(cleanMessage);
11
- }
12
- }
13
- };
14
- };
15
- export const wrapWithWarningOnCall = (method, message) => {
16
- if (process.env.NODE_ENV === 'production') {
17
- return method;
18
- }
19
- const warning = buildWarning(message);
20
- return (...args) => {
21
- warning();
22
- return method(...args);
23
- };
24
- };
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.wrapWithWarningOnCall = exports.buildWarning = void 0;
7
- const buildWarning = (message, gravity = 'warning') => {
8
- let alreadyWarned = false;
9
- const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
10
- return () => {
11
- if (!alreadyWarned) {
12
- alreadyWarned = true;
13
- if (gravity === 'error') {
14
- console.error(cleanMessage);
15
- } else {
16
- console.warn(cleanMessage);
17
- }
18
- }
19
- };
20
- };
21
- exports.buildWarning = buildWarning;
22
- const wrapWithWarningOnCall = (method, message) => {
23
- if (process.env.NODE_ENV === 'production') {
24
- return method;
25
- }
26
- const warning = buildWarning(message);
27
- return (...args) => {
28
- warning();
29
- return method(...args);
30
- };
31
- };
32
- exports.wrapWithWarningOnCall = wrapWithWarningOnCall;
@@ -1,2 +0,0 @@
1
- export declare const buildWarning: (message: string | string[], gravity?: "warning" | "error") => () => void;
2
- export declare const wrapWithWarningOnCall: <F extends Function>(method: F, message: string | string[]) => F | ((...args: any[]) => any);
package/utils/warning.js DELETED
@@ -1,24 +0,0 @@
1
- export const buildWarning = (message, gravity = 'warning') => {
2
- let alreadyWarned = false;
3
- const cleanMessage = Array.isArray(message) ? message.join('\n') : message;
4
- return () => {
5
- if (!alreadyWarned) {
6
- alreadyWarned = true;
7
- if (gravity === 'error') {
8
- console.error(cleanMessage);
9
- } else {
10
- console.warn(cleanMessage);
11
- }
12
- }
13
- };
14
- };
15
- export const wrapWithWarningOnCall = (method, message) => {
16
- if (process.env.NODE_ENV === 'production') {
17
- return method;
18
- }
19
- const warning = buildWarning(message);
20
- return (...args) => {
21
- warning();
22
- return method(...args);
23
- };
24
- };