@mui/x-data-grid-generator 6.16.1 → 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 +104 -0
- package/index.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/services/random-generator.js +7 -5
- package/modern/index.js +1 -1
- package/modern/services/random-generator.js +7 -5
- package/node/index.js +1 -1
- package/node/services/random-generator.js +7 -6
- package/package.json +2 -2
- package/services/random-generator.js +7 -5
- package/services/tree-data-generator.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,110 @@
|
|
|
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
|
+
## 6.16.2
|
|
7
|
+
|
|
8
|
+
_Oct 12, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 📊 Chart's legend text management has been reworked and contains breaking changes (#10138) @alexfauquette
|
|
13
|
+
- 📝 Add [Bulk editing](https://mui.com/x/react-data-grid/recipes-editing/#bulk-editing) demo (#10333) @cherniavskii
|
|
14
|
+
- 🚀 Column grouping now works smoothly with column pinning (#10518) @MBilalShafi
|
|
15
|
+
- 🌍 Improve Arabic (ar-SD) and Spanish (es-ES) locales
|
|
16
|
+
- 🐞 Bugfixes
|
|
17
|
+
- 📚 Documentation improvements
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@6.16.2`
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Fix `LazyLoading` demo crash (#10621) @MBilalShafi
|
|
24
|
+
- [DataGrid] Fix cells overlapping the scrollbar in iOS Safari (#10633) @cherniavskii
|
|
25
|
+
- [DataGrid] Fix `getRowId is not defined` error (#10613) @romgrk
|
|
26
|
+
- [DataGrid] Get quick filter to work OOTB with `date` and `dateTime` fields (#10636) @MBilalShafi
|
|
27
|
+
- [DataGrid] Make cursor for selectable cells to be `default` unless editable (#9997) @gitstart
|
|
28
|
+
- [DataGrid] Remove unnecessary syntax in JSDoc (#10567) @Lev-Shapiro
|
|
29
|
+
- [DataGrid] Update row hover behavior to match native hover (#10623) @cherniavskii
|
|
30
|
+
- [l10n] Improve Arabic (ar-SD) locale (#10625) @alabenyahia
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-pro@6.16.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid@6.16.2`, plus:
|
|
35
|
+
|
|
36
|
+
- [DataGridPro] Improve column grouping and column pinning friendship (#10518) @MBilalShafi
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-premium@6.16.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid-pro@6.16.2`.
|
|
41
|
+
|
|
42
|
+
### Date Pickers
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-date-pickers@6.16.2`
|
|
45
|
+
|
|
46
|
+
- [DateTimePicker] Add support for `DigitalClock` view renderer (#10624) @LukasTy
|
|
47
|
+
- [fields] Bootstrap the multi-HTML input component (#10638) @flaviendelangle
|
|
48
|
+
- [pickers] Fix timezone `UTC` false positive (#10586) @alexfauquette
|
|
49
|
+
- [l10n] Improve Spanish (es-ES) locale (#10588) @eduardodallmann
|
|
50
|
+
|
|
51
|
+
#### `@mui/x-date-pickers-pro@6.16.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
52
|
+
|
|
53
|
+
Same changes as in `@mui/x-date-pickers@6.16.2`.
|
|
54
|
+
|
|
55
|
+
### Charts / `@mui/x-charts@6.0.0-alpha.15`
|
|
56
|
+
|
|
57
|
+
#### Breaking changes
|
|
58
|
+
|
|
59
|
+
The charts have a new text display mechanism.
|
|
60
|
+
It adds line break support and avoids overlapping text in the legend.
|
|
61
|
+
This comes with some breaking changes.
|
|
62
|
+
|
|
63
|
+
- The DOM structure is modified. An intermediary `<tspan />` element has been added. This can impact how your style is applied.
|
|
64
|
+
```diff
|
|
65
|
+
- <text>The label</text>
|
|
66
|
+
+ <text><tspan>The label</tspan></text>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- The top margin has been reduced from 100 to 50 to benefit from the denser legend.
|
|
70
|
+
|
|
71
|
+
- To accurately compute the text size and then place it, styling should be provided as a JS object. For example, to set the legend font size, you should do:
|
|
72
|
+
```jsx
|
|
73
|
+
<PieChart
|
|
74
|
+
{/** ... */}
|
|
75
|
+
slotProps={{
|
|
76
|
+
legend: {
|
|
77
|
+
labelStyle: {
|
|
78
|
+
fontSize: 16,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
}}
|
|
82
|
+
/>
|
|
83
|
+
```
|
|
84
|
+
Support for other text elements (axis labels and tick labels) will be implemented in follow-up PR.
|
|
85
|
+
|
|
86
|
+
#### Changes
|
|
87
|
+
|
|
88
|
+
- [charts] Fix typo between internal/external variable (#10640) @alexfauquette
|
|
89
|
+
- [charts] Improve the management of the text (#10138) @alexfauquette
|
|
90
|
+
|
|
91
|
+
### Docs
|
|
92
|
+
|
|
93
|
+
- [docs] Add bulk editing demo (#10333) @cherniavskii
|
|
94
|
+
- [docs] Add reference links to DateRangePicker components (#10629) @michelengelen
|
|
95
|
+
- [docs] Add reference links to DateTimePicker components (#10628) @michelengelen
|
|
96
|
+
- [docs] Add reference links to picker field components (#10631) @michelengelen
|
|
97
|
+
- [docs] Added reference links to TimePicker components (#10627) @michelengelen
|
|
98
|
+
- [docs] Avoid Pickers playground error due to empty views (#10654) @LukasTy
|
|
99
|
+
- [docs] Fix DataGrid[Pro/Premium] reference links (#10620) @michelengelen
|
|
100
|
+
|
|
101
|
+
### Core
|
|
102
|
+
|
|
103
|
+
- [core] Bump monorepo (#10619) @alexfauquette
|
|
104
|
+
- [core] Update `no-response` workflow (#10491) @MBilalShafi
|
|
105
|
+
- [core] Update the issue templates to reflect the new support workflow (#10651) @MBilalShafi
|
|
106
|
+
- [test] Fix `testEval` not invoking test assertions (#10587) @cherniavskii
|
|
107
|
+
- [test] Fix dev mode warning (#10610) @oliviertassinari
|
|
108
|
+
- [test] Set UUID chance seed in visual tests (#10609) @oliviertassinari
|
|
109
|
+
|
|
6
110
|
## 6.16.1
|
|
7
111
|
|
|
8
112
|
_Oct 6, 2023_
|
package/index.js
CHANGED
package/legacy/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Chance } from 'chance';
|
|
2
2
|
import { COLORS, COMMODITY_OPTIONS, CONTRACT_TYPE_OPTIONS, COUNTRY_ISO_OPTIONS, CURRENCY_OPTIONS, INCOTERM_OPTIONS, RATE_TYPE_OPTIONS, STATUS_OPTIONS, TAXCODE_OPTIONS } from './static-data';
|
|
3
|
-
var chanceId = globalChance();
|
|
4
3
|
var chance;
|
|
4
|
+
var chanceGuid;
|
|
5
5
|
if (typeof DISABLE_CHANCE_RANDOM !== 'undefined' && DISABLE_CHANCE_RANDOM) {
|
|
6
|
-
chance =
|
|
6
|
+
chance = new Chance(function () {
|
|
7
7
|
return 0.5;
|
|
8
8
|
});
|
|
9
|
+
chanceGuid = new Chance(42);
|
|
9
10
|
} else {
|
|
10
|
-
chance =
|
|
11
|
+
chance = new Chance();
|
|
12
|
+
chanceGuid = chance;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Wrap a data generator that returns a string and add a prefix if the value generated has already been given
|
|
@@ -108,7 +110,7 @@ export var randomColor = function randomColor() {
|
|
|
108
110
|
return randomArrayItem(COLORS);
|
|
109
111
|
};
|
|
110
112
|
export var randomId = function randomId() {
|
|
111
|
-
return
|
|
113
|
+
return chanceGuid.guid();
|
|
112
114
|
};
|
|
113
115
|
export var randomDesk = function randomDesk() {
|
|
114
116
|
return "D-".concat(chance.integer({
|
package/modern/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Chance } from 'chance';
|
|
2
2
|
import { COLORS, COMMODITY_OPTIONS, CONTRACT_TYPE_OPTIONS, COUNTRY_ISO_OPTIONS, CURRENCY_OPTIONS, INCOTERM_OPTIONS, RATE_TYPE_OPTIONS, STATUS_OPTIONS, TAXCODE_OPTIONS } from './static-data';
|
|
3
|
-
const chanceId = globalChance();
|
|
4
3
|
let chance;
|
|
4
|
+
let chanceGuid;
|
|
5
5
|
if (typeof DISABLE_CHANCE_RANDOM !== 'undefined' && DISABLE_CHANCE_RANDOM) {
|
|
6
|
-
chance =
|
|
6
|
+
chance = new Chance(() => 0.5);
|
|
7
|
+
chanceGuid = new Chance(42);
|
|
7
8
|
} else {
|
|
8
|
-
chance =
|
|
9
|
+
chance = new Chance();
|
|
10
|
+
chanceGuid = chance;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* Wrap a data generator that returns a string and add a prefix if the value generated has already been given
|
|
@@ -84,7 +86,7 @@ export const randomDate = (start, end) => new Date(start.getTime() + chance.floa
|
|
|
84
86
|
export const randomArrayItem = arr => arr[randomInt(0, arr.length - 1)];
|
|
85
87
|
export const randomBoolean = () => randomArrayItem([true, false]);
|
|
86
88
|
export const randomColor = () => randomArrayItem(COLORS);
|
|
87
|
-
export const randomId = () =>
|
|
89
|
+
export const randomId = () => chanceGuid.guid();
|
|
88
90
|
export const randomDesk = () => `D-${chance.integer({
|
|
89
91
|
min: 0,
|
|
90
92
|
max: 10000
|
package/node/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.randomUserName = exports.randomUrl = exports.randomUpdatedDate = exports.randomUnitPriceCurrency = exports.randomUnitPrice = exports.randomTraderName = exports.randomTradeDate = exports.randomTaxCode = exports.randomStatusOptions = exports.randomRating = exports.randomRateType = exports.randomRate = exports.randomQuantity = exports.randomPrice = exports.randomPnL = exports.randomPhoneNumber = exports.randomName = exports.randomMaturityDate = exports.randomJobTitle = exports.randomInt = exports.randomIncoterm = exports.randomId = exports.randomFeeRate = exports.randomEmail = exports.randomDesk = exports.randomDate = exports.randomCurrency = exports.randomCreatedDate = exports.randomCountry = exports.randomContractType = exports.randomCompanyName = exports.randomCommodity = exports.randomColor = exports.randomCity = exports.randomBrokerId = exports.randomBoolean = exports.randomArrayItem = exports.randomAddress = exports.random = exports.generateIsFilled = exports.generateFilledQuantity = void 0;
|
|
8
|
-
var _chance =
|
|
7
|
+
var _chance = require("chance");
|
|
9
8
|
var _staticData = require("./static-data");
|
|
10
|
-
const chanceId = (0, _chance.default)();
|
|
11
9
|
let chance;
|
|
10
|
+
let chanceGuid;
|
|
12
11
|
if (typeof DISABLE_CHANCE_RANDOM !== 'undefined' && DISABLE_CHANCE_RANDOM) {
|
|
13
|
-
chance =
|
|
12
|
+
chance = new _chance.Chance(() => 0.5);
|
|
13
|
+
chanceGuid = new _chance.Chance(42);
|
|
14
14
|
} else {
|
|
15
|
-
chance =
|
|
15
|
+
chance = new _chance.Chance();
|
|
16
|
+
chanceGuid = chance;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Wrap a data generator that returns a string and add a prefix if the value generated has already been given
|
|
@@ -99,7 +100,7 @@ const randomBoolean = () => randomArrayItem([true, false]);
|
|
|
99
100
|
exports.randomBoolean = randomBoolean;
|
|
100
101
|
const randomColor = () => randomArrayItem(_staticData.COLORS);
|
|
101
102
|
exports.randomColor = randomColor;
|
|
102
|
-
const randomId = () =>
|
|
103
|
+
const randomId = () => chanceGuid.guid();
|
|
103
104
|
exports.randomId = randomId;
|
|
104
105
|
const randomDesk = () => `D-${chance.integer({
|
|
105
106
|
min: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-generator",
|
|
3
|
-
"version": "6.16.
|
|
3
|
+
"version": "6.16.2",
|
|
4
4
|
"description": "Generate fake data for demo purposes only.",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.23.1",
|
|
23
23
|
"@mui/base": "^5.0.0-beta.17",
|
|
24
|
-
"@mui/x-data-grid-premium": "6.16.
|
|
24
|
+
"@mui/x-data-grid-premium": "6.16.2",
|
|
25
25
|
"chance": "^1.1.11",
|
|
26
26
|
"clsx": "^2.0.0",
|
|
27
27
|
"lru-cache": "^7.18.3"
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Chance } from 'chance';
|
|
2
2
|
import { COLORS, COMMODITY_OPTIONS, CONTRACT_TYPE_OPTIONS, COUNTRY_ISO_OPTIONS, CURRENCY_OPTIONS, INCOTERM_OPTIONS, RATE_TYPE_OPTIONS, STATUS_OPTIONS, TAXCODE_OPTIONS } from './static-data';
|
|
3
|
-
const chanceId = globalChance();
|
|
4
3
|
let chance;
|
|
4
|
+
let chanceGuid;
|
|
5
5
|
if (typeof DISABLE_CHANCE_RANDOM !== 'undefined' && DISABLE_CHANCE_RANDOM) {
|
|
6
|
-
chance =
|
|
6
|
+
chance = new Chance(() => 0.5);
|
|
7
|
+
chanceGuid = new Chance(42);
|
|
7
8
|
} else {
|
|
8
|
-
chance =
|
|
9
|
+
chance = new Chance();
|
|
10
|
+
chanceGuid = chance;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* Wrap a data generator that returns a string and add a prefix if the value generated has already been given
|
|
@@ -85,7 +87,7 @@ export const randomDate = (start, end) => new Date(start.getTime() + chance.floa
|
|
|
85
87
|
export const randomArrayItem = arr => arr[randomInt(0, arr.length - 1)];
|
|
86
88
|
export const randomBoolean = () => randomArrayItem([true, false]);
|
|
87
89
|
export const randomColor = () => randomArrayItem(COLORS);
|
|
88
|
-
export const randomId = () =>
|
|
90
|
+
export const randomId = () => chanceGuid.guid();
|
|
89
91
|
export const randomDesk = () => `D-${chance.integer({
|
|
90
92
|
min: 0,
|
|
91
93
|
max: 10000
|
|
@@ -8,12 +8,12 @@ export interface AddPathToDemoDataOptions {
|
|
|
8
8
|
groupingField?: string;
|
|
9
9
|
/**
|
|
10
10
|
* The depth of the tree
|
|
11
|
-
* @default
|
|
11
|
+
* @default 1
|
|
12
12
|
*/
|
|
13
13
|
maxDepth?: number;
|
|
14
14
|
/**
|
|
15
15
|
* The average amount of children in a node
|
|
16
|
-
* @default
|
|
16
|
+
* @default 2
|
|
17
17
|
*/
|
|
18
18
|
averageChildren?: number;
|
|
19
19
|
}
|