@mui/x-internals 8.2.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,113 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.3.0
9
+
10
+ _May 8, 2025_
11
+
12
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🎨 Added new styling options and shapes for `<FunnelChart />`, including `variant`, `borderRadius`, `pyramid`, and `step-pyramid` curves.
15
+ - 📚 Documentation improvements
16
+ - 🐞 Bugfixes
17
+
18
+ Special thanks go out to this community member for a valuable contribution:
19
+ @ptuukkan.
20
+ Team members who have contributed to this release:
21
+ @alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @MBilalShafi, @rita-codes, @romgrk.
22
+
23
+ ### Data Grid
24
+
25
+ #### `@mui/x-data-grid@8.3.0`
26
+
27
+ - [DataGrid] Fix cell editing of computed columns with data source (#17684) @ptuukkan
28
+ - [DataGrid] Fix lazy loading crash with `isRowSelectable` prop (#17629) @MBilalShafi
29
+ - [DataGrid] Fix: use CSS nonce (#17726) @romgrk
30
+ - [DataGrid] Ignore `preProcessEditCellProps` for non-editable columns when starting a row update (#17732) @arminmeh
31
+ - [DataGrid] Avoid applying row selection propagation on filtered rows (#17739) @MBilalShafi
32
+
33
+ #### `@mui/x-data-grid-pro@8.3.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
34
+
35
+ Same changes as in `@mui/x-data-grid@8.3.0`.
36
+
37
+ #### `@mui/x-data-grid-premium@8.3.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
38
+
39
+ Same changes as in `@mui/x-data-grid-pro@8.3.0`.
40
+
41
+ ### Date and Time Pickers
42
+
43
+ #### `@mui/x-date-pickers@8.3.0`
44
+
45
+ - [DateTimePicker] Fix focus behavior on desktop variant (#17719) @LukasTy
46
+ - [pickers] Avoid `DigitalClock` stealing focus from a Picker open button on close (#17686) @LukasTy
47
+
48
+ #### `@mui/x-date-pickers-pro@8.3.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
49
+
50
+ Same changes as in `@mui/x-date-pickers@8.3.0`, plus:
51
+
52
+ - [DateRangePicker] Fix to reset range position after closing mobile Picker (#17631) @LukasTy
53
+
54
+ ### Charts
55
+
56
+ - The `<FunnelChart />` series now accepts a `variant='outlined'` prop for a simpler style.
57
+ <img width="398" alt="Screenshot 2025-05-06 at 20 36 12" src="https://github.com/user-attachments/assets/00fef14f-9026-421e-a4b6-7e081adce1e8" />
58
+
59
+ - Add a `borderRadius` property to `<FunnelChart />`. All funnels have `8px` as a default value.
60
+ <img width="386" alt="Screenshot 2025-05-06 at 14 00 20" src="https://github.com/user-attachments/assets/4f4cc0e7-01ce-4ed6-a0e1-a387f78def23" />
61
+
62
+ - Add a `pyramid` curve to `<FunnelChart />`, which allows creation of a pyramid-shaped funnel.
63
+ <img width="344" alt="Screenshot 2025-05-06 at 14 32 59" src="https://github.com/user-attachments/assets/0b2896e0-0478-4766-bb1b-258a4977a751" />
64
+
65
+ - Add a `step-pyramid` curve to `<FunnelChart />`, which creates a stepped-pyramid like shape.
66
+ <img width="344" alt="Screenshot 2025-05-06 at 14 33 03" src="https://github.com/user-attachments/assets/894f0ab3-7898-40fe-b0df-560feea4085a" />
67
+
68
+ #### `@mui/x-charts@8.3.0`
69
+
70
+ - [charts] Add charts toolbar with zoom options (#17615) @bernardobelchior
71
+ - [charts] Add zoom slider (#17496) @bernardobelchior
72
+ - [charts] Cleanup compiler warnings (#17360) @alexfauquette
73
+ - [charts] Fix `<PieArcLabel />` not taking `arcLabelRadius` into account (#17655) @bernardobelchior
74
+ - [charts] Fix spark line not having clip path (#17501) @bernardobelchior
75
+ - [charts] Fix type issue with ESM (#17624) @alexfauquette
76
+ - [charts] Improve `<MarkElement />` performance (#17546) @bernardobelchior
77
+ - [charts] Rename `materialSlots` internal constant (#17710) @bernardobelchior
78
+ - [charts] Update zoom slider design (#17682) @bernardobelchior
79
+ - [charts] Fix zoom being documented as available for heatmap (#17657) @bernardobelchior
80
+
81
+ #### `@mui/x-charts-pro@8.3.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
82
+
83
+ Same changes as in `@mui/x-charts@8.3.0`, plus:
84
+
85
+ - [charts-pro] Add `pyramid` curve to `<FunnelChart />` (#17665) @JCQuintas
86
+ - [charts-pro] Add `variant='outlined'` to `<FunnelChart />` series (#17661) @JCQuintas
87
+ - [charts-pro] Add a `borderRadius` property to `<FunnelChart />` (#17660) @JCQuintas
88
+
89
+ ### Tree View
90
+
91
+ #### `@mui/x-tree-view@8.3.0`
92
+
93
+ - [tree view] Bug fix - Escape does not cancel Drag n Drop (#17735) @rita-codes
94
+ - [tree view] Fix keyboard navigation error (#17685) @rita-codes
95
+ - [tree view] Continue cleaning the plugin system (#17386) @flaviendelangle
96
+
97
+ #### `@mui/x-tree-view-pro@8.3.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
98
+
99
+ Same changes as in `@mui/x-tree-view@8.3.0`.
100
+
101
+ ### Docs
102
+
103
+ - [charts] Add population pyramid demo (#17652) @bernardobelchior
104
+ - [charts] Fix randomised argos test (#17658) @JCQuintas
105
+ - [docs] Make preview messaging consistent in charts @bernardobelchior
106
+
107
+ ### Core
108
+
109
+ - [code-infra] Avoid `node` types in the built packages (#17533) @LukasTy
110
+ - [code-infra] Add `pkg.pr.new` publishing (#17402) @Janpot
111
+ - [code-infra] Normalize author package in org @oliviertassinari
112
+ - [code-infra] Remove required checkout step (#17729) @JCQuintas
113
+ - [docs-infra] Normalize netlify.toml in org @oliviertassinari
114
+
8
115
  ## 8.2.0
9
116
 
10
117
  _May 1, 2025_
@@ -0,0 +1 @@
1
+ export { useAssertModelConsistency } from "./useAssertModelConsistency.js";
@@ -0,0 +1 @@
1
+ export { useAssertModelConsistency } from "./useAssertModelConsistency.js";
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Make sure a controlled prop is used correctly.
3
+ * Logs errors if the prop either:
4
+ *
5
+ * - switch between controlled and uncontrolled
6
+ * - modify it's default value
7
+ * @param parameters
8
+ */
9
+ declare function useAssertModelConsistencyOutsideOfProduction<T>(parameters: {
10
+ /**
11
+ * The warning prefix indicating from which package the warning comes from.
12
+ */
13
+ warningPrefix?: string;
14
+ /**
15
+ * The name of the component used in the warning message.
16
+ */
17
+ componentName: string;
18
+ /**
19
+ * The name of the controlled state.
20
+ */
21
+ propName: string;
22
+ /**
23
+ * The value of the controlled prop.
24
+ */
25
+ controlled: T | undefined;
26
+ /**
27
+ * The default value of the controlled prop.
28
+ */
29
+ defaultValue: T;
30
+ }): void;
31
+ export declare const useAssertModelConsistency: typeof useAssertModelConsistencyOutsideOfProduction;
32
+ export {};
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import { warnOnce } from "../warning/index.js";
5
+
6
+ /**
7
+ * Make sure a controlled prop is used correctly.
8
+ * Logs errors if the prop either:
9
+ *
10
+ * - switch between controlled and uncontrolled
11
+ * - modify it's default value
12
+ * @param parameters
13
+ */
14
+ function useAssertModelConsistencyOutsideOfProduction(parameters) {
15
+ const {
16
+ componentName,
17
+ propName,
18
+ controlled,
19
+ defaultValue,
20
+ warningPrefix = 'MUI X'
21
+ } = parameters;
22
+ const [{
23
+ initialDefaultValue,
24
+ isControlled
25
+ }] = React.useState({
26
+ initialDefaultValue: defaultValue,
27
+ isControlled: controlled !== undefined
28
+ });
29
+ if (isControlled !== (controlled !== undefined)) {
30
+ warnOnce([`${warningPrefix}: A component is changing the ${isControlled ? '' : 'un'}controlled ${propName} state of ${componentName} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${propName} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'], 'error');
31
+ }
32
+ if (JSON.stringify(initialDefaultValue) !== JSON.stringify(defaultValue)) {
33
+ warnOnce([`${warningPrefix}: A component is changing the default ${propName} state of an uncontrolled ${componentName} after being initialized. ` + `To suppress this warning opt to use a controlled ${componentName}.`], 'error');
34
+ }
35
+ }
36
+ export const useAssertModelConsistency = process.env.NODE_ENV === 'production' ? () => {} : useAssertModelConsistencyOutsideOfProduction;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@mui/x-internals",
3
- "version": "8.2.0",
4
- "description": "Utility functions for the MUI X packages (internal use only).",
3
+ "version": "8.3.0",
5
4
  "author": "MUI Team",
5
+ "description": "Utility functions for the MUI X packages (internal use only).",
6
6
  "license": "MIT",
7
7
  "bugs": {
8
8
  "url": "https://github.com/mui/mui-x/issues"
@@ -31,7 +31,7 @@
31
31
  "directory": "packages/x-internals"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.27.0",
34
+ "@babel/runtime": "^7.27.1",
35
35
  "@mui/utils": "^7.0.2"
36
36
  },
37
37
  "peerDependencies": {
@@ -0,0 +1 @@
1
+ export { useAssertModelConsistency } from "./useAssertModelConsistency.js";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "useAssertModelConsistency", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _useAssertModelConsistency.useAssertModelConsistency;
10
+ }
11
+ });
12
+ var _useAssertModelConsistency = require("./useAssertModelConsistency");
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Make sure a controlled prop is used correctly.
3
+ * Logs errors if the prop either:
4
+ *
5
+ * - switch between controlled and uncontrolled
6
+ * - modify it's default value
7
+ * @param parameters
8
+ */
9
+ declare function useAssertModelConsistencyOutsideOfProduction<T>(parameters: {
10
+ /**
11
+ * The warning prefix indicating from which package the warning comes from.
12
+ */
13
+ warningPrefix?: string;
14
+ /**
15
+ * The name of the component used in the warning message.
16
+ */
17
+ componentName: string;
18
+ /**
19
+ * The name of the controlled state.
20
+ */
21
+ propName: string;
22
+ /**
23
+ * The value of the controlled prop.
24
+ */
25
+ controlled: T | undefined;
26
+ /**
27
+ * The default value of the controlled prop.
28
+ */
29
+ defaultValue: T;
30
+ }): void;
31
+ export declare const useAssertModelConsistency: typeof useAssertModelConsistencyOutsideOfProduction;
32
+ export {};
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useAssertModelConsistency = void 0;
9
+ var React = _interopRequireWildcard(require("react"));
10
+ var _warning = require("../warning");
11
+ /**
12
+ * Make sure a controlled prop is used correctly.
13
+ * Logs errors if the prop either:
14
+ *
15
+ * - switch between controlled and uncontrolled
16
+ * - modify it's default value
17
+ * @param parameters
18
+ */
19
+ function useAssertModelConsistencyOutsideOfProduction(parameters) {
20
+ const {
21
+ componentName,
22
+ propName,
23
+ controlled,
24
+ defaultValue,
25
+ warningPrefix = 'MUI X'
26
+ } = parameters;
27
+ const [{
28
+ initialDefaultValue,
29
+ isControlled
30
+ }] = React.useState({
31
+ initialDefaultValue: defaultValue,
32
+ isControlled: controlled !== undefined
33
+ });
34
+ if (isControlled !== (controlled !== undefined)) {
35
+ (0, _warning.warnOnce)([`${warningPrefix}: A component is changing the ${isControlled ? '' : 'un'}controlled ${propName} state of ${componentName} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${propName} ` + 'element for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'], 'error');
36
+ }
37
+ if (JSON.stringify(initialDefaultValue) !== JSON.stringify(defaultValue)) {
38
+ (0, _warning.warnOnce)([`${warningPrefix}: A component is changing the default ${propName} state of an uncontrolled ${componentName} after being initialized. ` + `To suppress this warning opt to use a controlled ${componentName}.`], 'error');
39
+ }
40
+ }
41
+ const useAssertModelConsistency = exports.useAssertModelConsistency = process.env.NODE_ENV === 'production' ? () => {} : useAssertModelConsistencyOutsideOfProduction;