Skip to content

Commit

Permalink
Merge branch 'master' into remove-tdate
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Nov 4, 2024
2 parents dee0238 + eb2cae5 commit 704c772
Show file tree
Hide file tree
Showing 47 changed files with 276 additions and 187 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/priority-support-validation-prompt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
body: |
You have created a support request under the ["Priority Support"](https://mui.com/legal/technical-support-sla/#priority-support) terms, which is a paid add-on to MUI X Premium ⏰. Please validate your support key using the link below:
https://tools-public.mui.com/prod/pages/jyhs86t?repo=mui-x&issueId=${{ github.event.issue.number }}
https://tools-public.mui.com/prod/pages/validateSupport?repo=mui-x&issueId=${{ github.event.issue.number }}
Do not share your support key in this issue!
Expand Down
4 changes: 2 additions & 2 deletions changelogOld/CHANGELOG.v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos

- [docs] New location for the legal content (#5595) @oliviertassinari
- [docs] Update description of `maxDateTime` prop (#5639) @jurecuhalev
- [docs] Add missing `date-fns` dependency when opening Codesandbox demo (#5692) @cherniavskii
- [docs] Add missing `date-fns` dependency when opening CodeSandbox demo (#5692) @cherniavskii

### Core

Expand Down Expand Up @@ -2819,7 +2819,7 @@ _Nov 4, 2021_
- [core] Group update of MUI Core (#3055) @oliviertassinari
- [core] Ignore `*.tsbuildinfo` files (#3068) @m4theushw
- [core] Implement tree-based row management (#2996) @flaviendelangle
- [core] Invert Codesandbox examples on README (#3073) @flaviendelangle
- [core] Invert CodeSandbox examples on README (#3073) @flaviendelangle
- [core] Prefix selectors from `useGridContainerProps` with `unsafe` (#3002) @flaviendelangle
- [core] Reduce `setGridState` and `applyFilters` call when updating `filterModel` (#3023) @flaviendelangle
- [core] Reduce styles complexity (#3012) @DanailH
Expand Down
4 changes: 2 additions & 2 deletions changelogOld/CHANGELOG.v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Same changes as in `@mui/[email protected]`.

### Docs

- [docs] Use MUI X v6 in Codesandbox and Stackblitz demos (#12838) @cherniavskii
- [docs] Use MUI X v6 in CodeSandbox and StackBlitz demos (#12838) @cherniavskii

## 6.19.11

Expand Down Expand Up @@ -2596,7 +2596,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
- [docs] Fix date pickers typo in the docs (#8939) @richbustos
- [docs] Fix master detail demo (#8894) @m4theushw
- [docs] Fix typo in clipboard docs (#8971) @MBilalShafi
- [docs] Reduce list of dependencies in Codesandbox/Stackblitz demos (#8535) @cherniavskii
- [docs] Reduce list of dependencies in CodeSandbox/StackBlitz demos (#8535) @cherniavskii

### Core

Expand Down
2 changes: 1 addition & 1 deletion docs/data/data-grid/joy-ui/joy-ui.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Data Grid - Joy UI

<p class="description">Using the Data Grid with Joy UI components</p>
<p class="description">Using the Data Grid with Joy UI components.</p>

{{"demo": "GridJoyUISlots.js", "bg": "inline"}}
2 changes: 1 addition & 1 deletion docs/data/data-grid/localization/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
"languageTag": "pl-PL",
"importName": "plPL",
"localeName": "Polish",
"missingKeysCount": 35,
"missingKeysCount": 11,
"totalKeysCount": 122,
"githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/locales/plPL.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data/date-pickers/custom-field/custom-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ components: PickersSectionList, PickersTextField

# Custom field

<p class="description">The Date and Time Pickers let you customize the field by passing props or custom components</p>
<p class="description">The Date and Time Pickers let you customize the field by passing props or custom components.</p>

:::success
See [Common concepts—Custom slots and subcomponents](/x/common-concepts/custom-components/) to learn how to use slots.
Expand Down
2 changes: 1 addition & 1 deletion docs/data/date-pickers/custom-layout/custom-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ packageName: '@mui/x-date-pickers'

# Custom layout

<p class="description">The Date and Time Pickers let you reorganize the layout</p>
<p class="description">The Date and Time Pickers let you reorganize the layout.</p>

:::success
See [Common concepts—Custom slots and subcomponents](/x/common-concepts/custom-components/) to learn how to use slots.
Expand Down
2 changes: 1 addition & 1 deletion docs/data/date-pickers/experimentation/experimentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ productId: x-date-pickers

# Date and Time Pickers experimentation

<p class="description">Demos not accessible through the navbar of the doc</p>
<p class="description">Demos not accessible through the navbar of the doc.</p>
2 changes: 1 addition & 1 deletion docs/data/date-pickers/localization/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"languageTag": "el-GR",
"importName": "elGR",
"localeName": "Greek",
"missingKeysCount": 14,
"missingKeysCount": 6,
"totalKeysCount": 50,
"githubLink": "https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/locales/elGR.ts"
},
Expand Down
4 changes: 1 addition & 3 deletions docs/pages/x/api/charts/bar-series-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
"stackOrder": { "type": { "description": "StackOrderType" }, "default": "'none'" },
"valueFormatter": { "type": { "description": "SeriesValueFormatter&lt;TValue&gt;" } },
"xAxisId": { "type": { "description": "string" } },
"xAxisKey": { "type": { "description": "string" } },
"yAxisId": { "type": { "description": "string" } },
"yAxisKey": { "type": { "description": "string" } }
"yAxisId": { "type": { "description": "string" } }
}
}
4 changes: 1 addition & 3 deletions docs/pages/x/api/charts/line-series-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
"stackOrder": { "type": { "description": "StackOrderType" }, "default": "'none'" },
"valueFormatter": { "type": { "description": "SeriesValueFormatter&lt;TValue&gt;" } },
"xAxisId": { "type": { "description": "string" } },
"xAxisKey": { "type": { "description": "string" } },
"yAxisId": { "type": { "description": "string" } },
"yAxisKey": { "type": { "description": "string" } }
"yAxisId": { "type": { "description": "string" } }
}
}
5 changes: 1 addition & 4 deletions docs/pages/x/api/charts/scatter-series-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
"markerSize": { "type": { "description": "number" } },
"valueFormatter": { "type": { "description": "SeriesValueFormatter&lt;TValue&gt;" } },
"xAxisId": { "type": { "description": "string" } },
"xAxisKey": { "type": { "description": "string" } },
"yAxisId": { "type": { "description": "string" } },
"yAxisKey": { "type": { "description": "string" } },
"zAxisId": { "type": { "description": "string" } },
"zAxisKey": { "type": { "description": "string" } }
"zAxisId": { "type": { "description": "string" } }
}
}
4 changes: 1 addition & 3 deletions docs/translations/api-docs/charts/bar-series-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
"description": "Formatter used to render values in tooltip or other data display."
},
"xAxisId": { "description": "The id of the x-axis used to render the series." },
"xAxisKey": { "description": "The id of the x-axis used to render the series." },
"yAxisId": { "description": "The id of the y-axis used to render the series." },
"yAxisKey": { "description": "The id of the y-axis used to render the series." }
"yAxisId": { "description": "The id of the y-axis used to render the series." }
}
}
4 changes: 1 addition & 3 deletions docs/translations/api-docs/charts/line-series-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
"description": "Formatter used to render values in tooltip or other data display."
},
"xAxisId": { "description": "The id of the x-axis used to render the series." },
"xAxisKey": { "description": "The id of the x-axis used to render the series." },
"yAxisId": { "description": "The id of the y-axis used to render the series." },
"yAxisKey": { "description": "The id of the y-axis used to render the series." }
"yAxisId": { "description": "The id of the y-axis used to render the series." }
}
}
5 changes: 1 addition & 4 deletions docs/translations/api-docs/charts/scatter-series-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
"description": "Formatter used to render values in tooltip or other data display."
},
"xAxisId": { "description": "The id of the x-axis used to render the series." },
"xAxisKey": { "description": "The id of the x-axis used to render the series." },
"yAxisId": { "description": "The id of the y-axis used to render the series." },
"yAxisKey": { "description": "The id of the y-axis used to render the series." },
"zAxisId": { "description": "The id of the z-axis used to render the series." },
"zAxisKey": { "description": "The id of the z-axis used to render the series." }
"zAxisId": { "description": "The id of the z-axis used to render the series." }
}
}
4 changes: 2 additions & 2 deletions packages/x-charts/src/BarChart/BarPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ const useAggregatedData = (): {

const data = stackingGroups.flatMap(({ ids: groupIds }, groupIndex) => {
return groupIds.flatMap((seriesId) => {
const xAxisId = series[seriesId].xAxisId ?? series[seriesId].xAxisKey ?? defaultXAxisId;
const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey ?? defaultYAxisId;
const xAxisId = series[seriesId].xAxisId ?? defaultXAxisId;
const yAxisId = series[seriesId].yAxisId ?? defaultYAxisId;

const xAxisConfig = xAxis[xAxisId];
const yAxisConfig = yAxis[yAxisId];
Expand Down
6 changes: 3 additions & 3 deletions packages/x-charts/src/BarChart/extremums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const getValueExtremum =

return Object.keys(series)
.filter((seriesId) => {
const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey;
const yAxisId = series[seriesId].yAxisId;
return yAxisId === axis.id || (isDefaultAxis && yAxisId === undefined);
})
.reduce(
Expand All @@ -38,8 +38,8 @@ const getValueExtremum =
const filter = getFilters?.({
currentAxisId: axis.id,
isDefaultAxis,
seriesXAxisId: series[seriesId].xAxisId ?? series[seriesId].xAxisKey,
seriesYAxisId: series[seriesId].yAxisId ?? series[seriesId].yAxisKey,
seriesXAxisId: series[seriesId].xAxisId,
seriesYAxisId: series[seriesId].yAxisId,
});

const [seriesMin, seriesMax] = stackedData?.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ function ChartsOnAxisClickHandler(props: ChartsOnAxisClickHandlerProps) {
series[seriesType]?.seriesOrder.forEach((seriesId) => {
const seriesItem = series[seriesType]!.series[seriesId];

const providedXAxisId = seriesItem.xAxisId ?? seriesItem.xAxisKey;
const providedYAxisId = seriesItem.yAxisId ?? seriesItem.yAxisKey;
const providedXAxisId = seriesItem.xAxisId;
const providedYAxisId = seriesItem.yAxisId;

const axisKey = isXaxis ? providedXAxisId : providedYAxisId;
if (axisKey === undefined || axisKey === USED_AXIS_ID) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ function ChartsAxisTooltipContent(props: {
series[seriesType]!.seriesOrder.forEach((seriesId) => {
const item = series[seriesType]!.series[seriesId];

const providedXAxisId = item.xAxisId ?? item.xAxisKey;
const providedYAxisId = item.yAxisId ?? item.yAxisKey;
const providedXAxisId = item.xAxisId;
const providedYAxisId = item.yAxisId;

const axisKey = isXaxis ? providedXAxisId : providedYAxisId;

Expand All @@ -87,8 +87,7 @@ function ChartsAxisTooltipContent(props: {

const xAxisId = providedXAxisId ?? xAxisIds[0];
const yAxisId = providedYAxisId ?? yAxisIds[0];
const zAxisId =
(seriesToAdd as any).zAxisId ?? (seriesToAdd as any).zAxisKey ?? zAxisIds[0];
const zAxisId = (seriesToAdd as any).zAxisId ?? zAxisIds[0];

const getColor =
colorProcessors[seriesType]?.(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ function ChartsItemTooltipContent<T extends ChartSeriesType>(
const { zAxis, zAxisIds } = React.useContext(ZAxisContext);
const colorProcessors = useColorProcessor();

const xAxisId = (series as any).xAxisId ?? (series as any).xAxisKey ?? xAxisIds[0];
const yAxisId = (series as any).yAxisId ?? (series as any).yAxisKey ?? yAxisIds[0];
const zAxisId = (series as any).zAxisId ?? (series as any).zAxisKey ?? zAxisIds[0];
const xAxisId = (series as any).xAxisId ?? xAxisIds[0];
const yAxisId = (series as any).yAxisId ?? yAxisIds[0];
const zAxisId = (series as any).zAxisId ?? zAxisIds[0];

const getColor =
colorProcessors[series.type]?.(
Expand Down
7 changes: 3 additions & 4 deletions packages/x-charts/src/ChartsTooltip/useAxisTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,16 @@ export function useAxisTooltip(): null | UseAxisTooltipReturnValue {
return seriesOfType.seriesOrder.map((seriesId) => {
const seriesToAdd = seriesOfType.series[seriesId]!;

const providedXAxisId = seriesToAdd.xAxisId ?? seriesToAdd.xAxisKey;
const providedYAxisId = seriesToAdd.yAxisId ?? seriesToAdd.yAxisKey;
const providedXAxisId = seriesToAdd.xAxisId;
const providedYAxisId = seriesToAdd.yAxisId;

const axisKey = isXaxis ? providedXAxisId : providedYAxisId;

// Test if the series uses the default axis
if (axisKey === undefined || axisKey === USED_AXIS_ID) {
const xAxisId = providedXAxisId ?? xAxisIds[0];
const yAxisId = providedYAxisId ?? yAxisIds[0];
const zAxisId =
(seriesToAdd as any).zAxisId ?? (seriesToAdd as any).zAxisKey ?? zAxisIds[0];
const zAxisId = (seriesToAdd as any).zAxisId ?? zAxisIds[0];

const color =
colorProcessors[seriesType]?.(
Expand Down
6 changes: 3 additions & 3 deletions packages/x-charts/src/ChartsTooltip/useItemTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export function useItemTooltip<T extends ChartSeriesType>(): null | UseItemToolt
const { zAxis, zAxisIds } = React.useContext(ZAxisContext);
const colorProcessors = useColorProcessor();

const xAxisId = (series as any).xAxisId ?? (series as any).xAxisKey ?? xAxisIds[0];
const yAxisId = (series as any).yAxisId ?? (series as any).yAxisKey ?? yAxisIds[0];
const zAxisId = (series as any).zAxisId ?? (series as any).zAxisKey ?? zAxisIds[0];
const xAxisId = (series as any).xAxisId ?? xAxisIds[0];
const yAxisId = (series as any).yAxisId ?? yAxisIds[0];
const zAxisId = (series as any).zAxisId ?? zAxisIds[0];

if (!item || item.dataIndex === undefined) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ function ChartsVoronoiHandler(props: ChartsVoronoiHandlerProps) {
voronoiRef.current = {};
let points: number[] = [];
seriesOrder.forEach((seriesId) => {
const { data, xAxisId, yAxisId, xAxisKey, yAxisKey } = series[seriesId];
const { data, xAxisId, yAxisId } = series[seriesId];

const xScale = xAxis[xAxisId ?? xAxisKey ?? defaultXAxisId].scale;
const yScale = yAxis[yAxisId ?? yAxisKey ?? defaultYAxisId].scale;
const xScale = xAxis[xAxisId ?? defaultXAxisId].scale;
const yScale = yAxis[yAxisId ?? defaultYAxisId].scale;

const getXPosition = getValueToPositionMapper(xScale);
const getYPosition = getValueToPositionMapper(yScale);
Expand Down
9 changes: 2 additions & 7 deletions packages/x-charts/src/LineChart/AreaPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,14 @@ const useAggregatedData = () => {
.reverse() // Revert stacked area for a more pleasant animation
.map((seriesId) => {
const {
xAxisId: xAxisIdProp,
yAxisId: yAxisIdProp,
xAxisKey = defaultXAxisId,
yAxisKey = defaultYAxisId,
xAxisId = defaultXAxisId,
yAxisId = defaultYAxisId,
stackedData,
data,
connectNulls,
baseline,
} = series[seriesId];

const xAxisId = xAxisIdProp ?? xAxisKey;
const yAxisId = yAxisIdProp ?? yAxisKey;

const xScale = getValueToPositionMapper(xAxis[xAxisId].scale);
const yScale = yAxis[yAxisId].scale;
const xData = xAxis[xAxisId].data;
Expand Down
9 changes: 2 additions & 7 deletions packages/x-charts/src/LineChart/LineHighlightPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,13 @@ function LineHighlightPlot(props: LineHighlightPlotProps) {
{stackingGroups.flatMap(({ ids: groupIds }) => {
return groupIds.flatMap((seriesId) => {
const {
xAxisId: xAxisIdProp,
yAxisId: yAxisIdProp,
xAxisKey = defaultXAxisId,
yAxisKey = defaultYAxisId,
xAxisId = defaultXAxisId,
yAxisId = defaultYAxisId,
stackedData,
data,
disableHighlight,
} = series[seriesId];

const xAxisId = xAxisIdProp ?? xAxisKey;
const yAxisId = yAxisIdProp ?? yAxisKey;

if (disableHighlight || data[highlightedIndex] == null) {
return null;
}
Expand Down
9 changes: 2 additions & 7 deletions packages/x-charts/src/LineChart/LinePlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,13 @@ const useAggregatedData = () => {
return stackingGroups.flatMap(({ ids: groupIds }) => {
return groupIds.flatMap((seriesId) => {
const {
xAxisId: xAxisIdProp,
yAxisId: yAxisIdProp,
xAxisKey = defaultXAxisId,
yAxisKey = defaultYAxisId,
xAxisId = defaultXAxisId,
yAxisId = defaultYAxisId,
stackedData,
data,
connectNulls,
} = series[seriesId];

const xAxisId = xAxisIdProp ?? xAxisKey;
const yAxisId = yAxisIdProp ?? yAxisKey;

const xScale = getValueToPositionMapper(xAxis[xAxisId].scale);
const yScale = yAxis[yAxisId].scale;
const xData = xAxis[xAxisId].data;
Expand Down
9 changes: 2 additions & 7 deletions packages/x-charts/src/LineChart/MarkPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,8 @@ function MarkPlot(props: MarkPlotProps) {
{stackingGroups.flatMap(({ ids: groupIds }) => {
return groupIds.map((seriesId) => {
const {
xAxisId: xAxisIdProp,
yAxisId: yAxisIdProp,
xAxisKey = defaultXAxisId,
yAxisKey = defaultYAxisId,
xAxisId = defaultXAxisId,
yAxisId = defaultYAxisId,
stackedData,
data,
showMark = true,
Expand All @@ -106,9 +104,6 @@ function MarkPlot(props: MarkPlotProps) {
return null;
}

const xAxisId = xAxisIdProp ?? xAxisKey;
const yAxisId = yAxisIdProp ?? yAxisKey;

const xScale = getValueToPositionMapper(xAxis[xAxisId].scale);
const yScale = yAxis[yAxisId].scale;
const xData = xAxis[xAxisId].data;
Expand Down
6 changes: 3 additions & 3 deletions packages/x-charts/src/LineChart/extremums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const getExtremumY: ExtremumGetter<'line'> = (params) => {

return Object.keys(series)
.filter((seriesId) => {
const yAxisId = series[seriesId].yAxisId ?? series[seriesId].yAxisKey;
const yAxisId = series[seriesId].yAxisId;
return yAxisId === axis.id || (isDefaultAxis && yAxisId === undefined);
})
.reduce(
Expand All @@ -47,8 +47,8 @@ export const getExtremumY: ExtremumGetter<'line'> = (params) => {
const filter = getFilters?.({
currentAxisId: axis.id,
isDefaultAxis,
seriesXAxisId: series[seriesId].xAxisId ?? series[seriesId].xAxisKey,
seriesYAxisId: series[seriesId].yAxisId ?? series[seriesId].yAxisKey,
seriesXAxisId: series[seriesId].xAxisId,
seriesYAxisId: series[seriesId].yAxisId,
});

// Since this series is not used to display an area, we do not consider the base (the d[0]).
Expand Down
Loading

0 comments on commit 704c772

Please sign in to comment.