@mui/x-internals 7.10.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,175 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.11.1
7
+
8
+ _Jul 25, 2024_
9
+
10
+ We'd like to offer a big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🔎 Allow `Zoom` to be controllable for charts (#13858) @JCQuintas
13
+ - 🌍 Add Icelandic (is-IS) and Norwegian Nynorsk (nn-NO) locales on the Data Grid
14
+ - 🌍 Improve Norwegian Bokmål (nb-NO) and German (de-DE) locales on the Data Grid
15
+ - 🌍 Add Norwegian Nynorsk (nn-NO) locale on the Date and Time Pickers
16
+ - 🐞 Bugfixes
17
+ - 📚 Documentation improvements
18
+
19
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
20
+
21
+ ### Data Grid
22
+
23
+ #### `@mui/x-data-grid@7.11.1`
24
+
25
+ - [DataGrid] Remove dead code in internal `GridPreferencesPanel` (#13934) @k-rajat19
26
+ - [DataGrid] Do not miss to escape formulas in CSV export (#13888) @arminmeh
27
+ - [l10n] Add Icelandic (is-IS) locale (#13283) @magnimarels
28
+ - [l10n] Add Norwegian nynorsk (nn-NO) locale and improve Norwegian bokmål (nb-NO) locale (#13588) @AnderzL7
29
+ - [l10n] Improve German (de-DE) locale (#13910) @lhilgert9
30
+
31
+ #### `@mui/x-data-grid-pro@7.11.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
32
+
33
+ Same changes as in `@mui/x-data-grid@7.11.1`.
34
+
35
+ #### `@mui/x-data-grid-premium@7.11.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
36
+
37
+ Same changes as in `@mui/x-data-grid-pro@7.11.1`, plus:
38
+
39
+ - [DataGridPremium] Pass the `api` object to events (#13893) @pcorpet
40
+ - [DataGridPremium] Fix paste to selected cells (#13967) @romgrk
41
+
42
+ ### Date and Time Pickers
43
+
44
+ #### `@mui/x-date-pickers@7.11.1`
45
+
46
+ - [fields] Prevent keyboard editing when disabled (#13900) @arthurbalduini
47
+ - [l10n] Add Norwegian Nynorsk (nn-NO) locale (#13946) @AnderzL7
48
+
49
+ #### `@mui/x-date-pickers-pro@7.11.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
50
+
51
+ Same changes as in `@mui/x-date-pickers@7.11.1`.
52
+
53
+ ### Charts
54
+
55
+ #### `@mui/x-charts@7.11.1`
56
+
57
+ - [charts] Add `ownerState` function to `slotProps` typing when available (#13965) @alexfauquette
58
+ - [charts] Allow `Zoom` to be controllable (#13858) @JCQuintas
59
+ - [charts] Deprecate `xAxisKey` /`zAxisKey` in favor of `xAxisId`/`zAxisId` (#13940) @alexfauquette
60
+ - [charts] Hide empty arcs in the PieChart (#13897) @alexfauquette
61
+ - [charts] Limit the trigger of exit charts (#13682) @alexfauquette
62
+
63
+ ### Tree View
64
+
65
+ #### `@mui/x-tree-view@7.11.1`
66
+
67
+ - [TreeView] Allow the plugins to enrich the props passed to the item slots (#13953) @flaviendelangle
68
+
69
+ ### Docs
70
+
71
+ - [docs] Bump pnpm priority as a package manager (#13894) @oliviertassinari
72
+ - [docs] Explicitly mark charts pro as not released (#13905) @alexfauquette
73
+ - [docs] Fix dot consistency a11y table @oliviertassinari
74
+ - [docs] Fix some typos in charts docs (#13906) @cratiu222
75
+ - [docs] Fix spelling (#13902) @nnsW3
76
+ - [docs] Improve error message when moving between plans (#13874) @oliviertassinari
77
+ - [docs] Update `SparkLineChart` reference not being correctly capitalised (#13960) @duckboy81
78
+ - [docs] Fix scroll demos disorientation (#13909) @oliviertassinari
79
+
80
+ ### Core
81
+
82
+ - [core] Add `@mui/material-nextjs` to `MUI Core` renovate group (#13966) @LukasTy
83
+ - [core] Remove warning message in production (#13911) @oliviertassinari
84
+ - [code-infra] Reuse `useReactVersion` script from the monorepo (#13710) @cherniavskii
85
+ - [infra] Adds order id validation action (#13957) @michelengelen
86
+ - [infra] Fix order id validator action (#13971) @michelengelen
87
+ - [infra] Fix regex in order id validation (#13976) @michelengelen
88
+ - [infra] Issue template improvement (#13954) @michelengelen
89
+
90
+ ## 7.11.0
91
+
92
+ _Jul 18, 2024_
93
+
94
+ We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
95
+
96
+ - 🎨 Add [color legend](https://mui.com/x/react-charts/legend/#color-legend) for charts (#13700) @alexfauquette
97
+ - 🌍 Improve Korean (ko-KR) locale on the Date and Time Pickers
98
+ - 🌍 Improve Russian (ru-RU) locale on the Date and Time Pickers and Data Grid
99
+ - 🐞 Bugfixes
100
+ - 📚 Documentation improvements
101
+
102
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
103
+
104
+ ### Data Grid
105
+
106
+ #### `@mui/x-data-grid@7.11.0`
107
+
108
+ - [DataGrid] Expose `gridEditRowsStateSelector` (#13877) @romgrk
109
+ - [DataGrid] Fix `columnResizeStop` event not emitted when column is not resized (#13307) @mateuseap
110
+ - [DataGrid] Fix delete filter inconsistent behavior (#13353) @oukunan
111
+ - [DataGrid] Enable flip on preferences panel (#13803) @romgrk
112
+ - [DataGrid] Support `date` and `datetime-local` input types in `GridFilterInputMultipleValue` type (#13411) @karudedios
113
+ - [l10n] Improve Russian (ru-RU) locale (#13735) @diro-atk
114
+
115
+ #### `@mui/x-data-grid-pro@7.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
116
+
117
+ Same changes as in `@mui/x-data-grid@7.11.0`.
118
+
119
+ #### `@mui/x-data-grid-premium@7.11.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
120
+
121
+ Same changes as in `@mui/x-data-grid-pro@7.11.0`.
122
+
123
+ ### Date and Time Pickers
124
+
125
+ #### `@mui/x-date-pickers@7.11.0`
126
+
127
+ - [l10n] Improve Korean (ko-KR) locale (#13651) @100pearlcent
128
+ - [l10n] Improve Russian (ru-RU) locale (#13871) @Inv1x
129
+ - [pickers] Add more conformance tests improving API docs precision (#13800) @LukasTy
130
+ - [TimePicker] Add `Mui-selected` class to `TimeClock` meridiem buttons (#13848) @LukasTy
131
+
132
+ #### `@mui/x-date-pickers-pro@7.11.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
133
+
134
+ Same changes as in `@mui/x-date-pickers@7.11.0`, plus:
135
+
136
+ - [DateRangePicker] Fix `name` prop propagation regression (#13821) @LukasTy
137
+
138
+ ### Charts
139
+
140
+ #### `@mui/x-charts@7.11.0`
141
+
142
+ - [charts] Create color legend (#13700) @alexfauquette
143
+ - [charts] Defaultize axis on top level `useChartContainerProps` (#13817) @JCQuintas
144
+ - [charts] Fix charts not passing `className` to root element (#13647) @JCQuintas
145
+ - [charts] Generate API documentation for pro components (#13822) @alexfauquette
146
+ - [charts] Improve zoomed highlight behaviour (unreleased) (#13868) @JCQuintas
147
+ - [charts] Allow zoom on Y axis and add zoom options to configure zooming behaviour (unreleased) (#13726) @JCQuintas
148
+ - [charts] Disable animations while zooming (unreleased) (#13807) @JCQuintas
149
+
150
+ ### Tree View
151
+
152
+ #### `@mui/x-tree-view@7.11.0`
153
+
154
+ - [TreeView] Extract some logic outside of the `useTreeView` hook (#13845) @flaviendelangle
155
+
156
+ ### Docs
157
+
158
+ - [docs] Add warning about `process.env.NODE_ENV` in production (#13869) @cherniavskii
159
+ - [docs] Allow controlling the demo form from the example (#13796) @JCQuintas
160
+ - [docs] Clarify Pickers clearable behavior not working on mobile (#13786) @lnhrdt
161
+ - [docs] Improve the documentation of the picker's `onChange` and `onAccept` props (#13543) @flaviendelangle
162
+ - [docs] Replace company name with project name @oliviertassinari
163
+ - [docs] Sort Pickers & Charts API slots alphabetically (#13843) @LukasTy
164
+
165
+ ### Core
166
+
167
+ - [core] Add MUI Internal `renovate` group (#13846) @LukasTy
168
+ - [core] Link GitHub issue for `import/prefer-default-export` rule @oliviertassinari
169
+ - [core] Normalize `...other` and test imports in charts (#13844) @JCQuintas
170
+ - [core] Normalize rest / other to match the most common used @oliviertassinari
171
+ - [code-infra] Follow `next` tag for `@mui/docs` package bumps (#13813) @LukasTy
172
+ - [code-infra] Use specific version for `@mui/docs` dependency (#13760) @LukasTy
173
+ - [internals] Move `EventManager` to `@mui/x-internals` package (#13815) @flaviendelangle
174
+
6
175
  ## 7.10.0
7
176
 
8
177
  _Jul 11, 2024_
@@ -0,0 +1,29 @@
1
+ export type EventListener = (...args: any[]) => void;
2
+ export interface EventListenerOptions {
3
+ isFirst?: boolean;
4
+ }
5
+ interface EventListenerCollection {
6
+ /**
7
+ * List of listeners to run before the others
8
+ * They are run in the opposite order of the registration order
9
+ */
10
+ highPriority: Map<EventListener, true>;
11
+ /**
12
+ * List of events to run after the high priority listeners
13
+ * They are run in the registration order
14
+ */
15
+ regular: Map<EventListener, true>;
16
+ }
17
+ export declare class EventManager {
18
+ maxListeners: number;
19
+ warnOnce: boolean;
20
+ events: {
21
+ [eventName: string]: EventListenerCollection;
22
+ };
23
+ on(eventName: string, listener: EventListener, options?: EventListenerOptions): void;
24
+ removeListener(eventName: string, listener: EventListener): void;
25
+ removeAllListeners(): void;
26
+ emit(eventName: string, ...args: any[]): void;
27
+ once(eventName: string, listener: EventListener): void;
28
+ }
29
+ export {};
@@ -0,0 +1,69 @@
1
+ // Used https://gist.github.com/mudge/5830382 as a starting point.
2
+ // See https://github.com/browserify/events/blob/master/events.js for
3
+ // the Node.js (https://nodejs.org/api/events.html) polyfill used by webpack.
4
+ export class EventManager {
5
+ constructor() {
6
+ this.maxListeners = 20;
7
+ this.warnOnce = false;
8
+ this.events = {};
9
+ }
10
+ on(eventName, listener, options = {}) {
11
+ let collection = this.events[eventName];
12
+ if (!collection) {
13
+ collection = {
14
+ highPriority: new Map(),
15
+ regular: new Map()
16
+ };
17
+ this.events[eventName] = collection;
18
+ }
19
+ if (options.isFirst) {
20
+ collection.highPriority.set(listener, true);
21
+ } else {
22
+ collection.regular.set(listener, true);
23
+ }
24
+ if (process.env.NODE_ENV !== 'production') {
25
+ const collectionSize = collection.highPriority.size + collection.regular.size;
26
+ if (collectionSize > this.maxListeners && !this.warnOnce) {
27
+ this.warnOnce = true;
28
+ console.warn([`Possible EventEmitter memory leak detected. ${collectionSize} ${eventName} listeners added.`].join('\n'));
29
+ }
30
+ }
31
+ }
32
+ removeListener(eventName, listener) {
33
+ if (this.events[eventName]) {
34
+ this.events[eventName].regular.delete(listener);
35
+ this.events[eventName].highPriority.delete(listener);
36
+ }
37
+ }
38
+ removeAllListeners() {
39
+ this.events = {};
40
+ }
41
+ emit(eventName, ...args) {
42
+ const collection = this.events[eventName];
43
+ if (!collection) {
44
+ return;
45
+ }
46
+ const highPriorityListeners = Array.from(collection.highPriority.keys());
47
+ const regularListeners = Array.from(collection.regular.keys());
48
+ for (let i = highPriorityListeners.length - 1; i >= 0; i -= 1) {
49
+ const listener = highPriorityListeners[i];
50
+ if (collection.highPriority.has(listener)) {
51
+ listener.apply(this, args);
52
+ }
53
+ }
54
+ for (let i = 0; i < regularListeners.length; i += 1) {
55
+ const listener = regularListeners[i];
56
+ if (collection.regular.has(listener)) {
57
+ listener.apply(this, args);
58
+ }
59
+ }
60
+ }
61
+ once(eventName, listener) {
62
+ // eslint-disable-next-line consistent-this
63
+ const that = this;
64
+ this.on(eventName, function oneTimeListener(...args) {
65
+ that.removeListener(eventName, oneTimeListener);
66
+ listener.apply(that, args);
67
+ });
68
+ }
69
+ }
@@ -0,0 +1,2 @@
1
+ export { EventManager } from './EventManager';
2
+ export type { EventListenerOptions } from './EventManager';
@@ -0,0 +1 @@
1
+ export { EventManager } from './EventManager';
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/EventManager/index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -0,0 +1,69 @@
1
+ // Used https://gist.github.com/mudge/5830382 as a starting point.
2
+ // See https://github.com/browserify/events/blob/master/events.js for
3
+ // the Node.js (https://nodejs.org/api/events.html) polyfill used by webpack.
4
+ export class EventManager {
5
+ constructor() {
6
+ this.maxListeners = 20;
7
+ this.warnOnce = false;
8
+ this.events = {};
9
+ }
10
+ on(eventName, listener, options = {}) {
11
+ let collection = this.events[eventName];
12
+ if (!collection) {
13
+ collection = {
14
+ highPriority: new Map(),
15
+ regular: new Map()
16
+ };
17
+ this.events[eventName] = collection;
18
+ }
19
+ if (options.isFirst) {
20
+ collection.highPriority.set(listener, true);
21
+ } else {
22
+ collection.regular.set(listener, true);
23
+ }
24
+ if (process.env.NODE_ENV !== 'production') {
25
+ const collectionSize = collection.highPriority.size + collection.regular.size;
26
+ if (collectionSize > this.maxListeners && !this.warnOnce) {
27
+ this.warnOnce = true;
28
+ console.warn([`Possible EventEmitter memory leak detected. ${collectionSize} ${eventName} listeners added.`].join('\n'));
29
+ }
30
+ }
31
+ }
32
+ removeListener(eventName, listener) {
33
+ if (this.events[eventName]) {
34
+ this.events[eventName].regular.delete(listener);
35
+ this.events[eventName].highPriority.delete(listener);
36
+ }
37
+ }
38
+ removeAllListeners() {
39
+ this.events = {};
40
+ }
41
+ emit(eventName, ...args) {
42
+ const collection = this.events[eventName];
43
+ if (!collection) {
44
+ return;
45
+ }
46
+ const highPriorityListeners = Array.from(collection.highPriority.keys());
47
+ const regularListeners = Array.from(collection.regular.keys());
48
+ for (let i = highPriorityListeners.length - 1; i >= 0; i -= 1) {
49
+ const listener = highPriorityListeners[i];
50
+ if (collection.highPriority.has(listener)) {
51
+ listener.apply(this, args);
52
+ }
53
+ }
54
+ for (let i = 0; i < regularListeners.length; i += 1) {
55
+ const listener = regularListeners[i];
56
+ if (collection.regular.has(listener)) {
57
+ listener.apply(this, args);
58
+ }
59
+ }
60
+ }
61
+ once(eventName, listener) {
62
+ // eslint-disable-next-line consistent-this
63
+ const that = this;
64
+ this.on(eventName, function oneTimeListener(...args) {
65
+ that.removeListener(eventName, oneTimeListener);
66
+ listener.apply(that, args);
67
+ });
68
+ }
69
+ }
@@ -0,0 +1 @@
1
+ export { EventManager } from './EventManager';
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.EventManager = void 0;
7
+ // Used https://gist.github.com/mudge/5830382 as a starting point.
8
+ // See https://github.com/browserify/events/blob/master/events.js for
9
+ // the Node.js (https://nodejs.org/api/events.html) polyfill used by webpack.
10
+ class EventManager {
11
+ constructor() {
12
+ this.maxListeners = 20;
13
+ this.warnOnce = false;
14
+ this.events = {};
15
+ }
16
+ on(eventName, listener, options = {}) {
17
+ let collection = this.events[eventName];
18
+ if (!collection) {
19
+ collection = {
20
+ highPriority: new Map(),
21
+ regular: new Map()
22
+ };
23
+ this.events[eventName] = collection;
24
+ }
25
+ if (options.isFirst) {
26
+ collection.highPriority.set(listener, true);
27
+ } else {
28
+ collection.regular.set(listener, true);
29
+ }
30
+ if (process.env.NODE_ENV !== 'production') {
31
+ const collectionSize = collection.highPriority.size + collection.regular.size;
32
+ if (collectionSize > this.maxListeners && !this.warnOnce) {
33
+ this.warnOnce = true;
34
+ console.warn([`Possible EventEmitter memory leak detected. ${collectionSize} ${eventName} listeners added.`].join('\n'));
35
+ }
36
+ }
37
+ }
38
+ removeListener(eventName, listener) {
39
+ if (this.events[eventName]) {
40
+ this.events[eventName].regular.delete(listener);
41
+ this.events[eventName].highPriority.delete(listener);
42
+ }
43
+ }
44
+ removeAllListeners() {
45
+ this.events = {};
46
+ }
47
+ emit(eventName, ...args) {
48
+ const collection = this.events[eventName];
49
+ if (!collection) {
50
+ return;
51
+ }
52
+ const highPriorityListeners = Array.from(collection.highPriority.keys());
53
+ const regularListeners = Array.from(collection.regular.keys());
54
+ for (let i = highPriorityListeners.length - 1; i >= 0; i -= 1) {
55
+ const listener = highPriorityListeners[i];
56
+ if (collection.highPriority.has(listener)) {
57
+ listener.apply(this, args);
58
+ }
59
+ }
60
+ for (let i = 0; i < regularListeners.length; i += 1) {
61
+ const listener = regularListeners[i];
62
+ if (collection.regular.has(listener)) {
63
+ listener.apply(this, args);
64
+ }
65
+ }
66
+ }
67
+ once(eventName, listener) {
68
+ // eslint-disable-next-line consistent-this
69
+ const that = this;
70
+ this.on(eventName, function oneTimeListener(...args) {
71
+ that.removeListener(eventName, oneTimeListener);
72
+ listener.apply(that, args);
73
+ });
74
+ }
75
+ }
76
+ exports.EventManager = EventManager;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "EventManager", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _EventManager.EventManager;
10
+ }
11
+ });
12
+ var _EventManager = require("./EventManager");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-internals",
3
- "version": "7.10.0",
3
+ "version": "7.11.1",
4
4
  "description": "Utility functions for the MUI X packages (internal use only).",
5
5
  "author": "MUI Team",
6
6
  "license": "MIT",
@@ -31,8 +31,8 @@
31
31
  "directory": "packages/x-internals"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.24.7",
35
- "@mui/utils": "^5.16.0"
34
+ "@babel/runtime": "^7.24.8",
35
+ "@mui/utils": "^5.16.5"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "react": "^17.0.0 || ^18.0.0"