Skip to content

Commit d17f173

Browse files
committed
remove-proptypes
1 parent 1d17108 commit d17f173

File tree

3 files changed

+1
-580
lines changed

3 files changed

+1
-580
lines changed

docs/scripts/generateProptypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
import { fixBabelGeneratorIssues, fixLineEndings } from '@mui/internal-docs-utils';
1111
import { createXTypeScriptProjects, XTypeScriptProject } from './createXTypeScriptProjects';
1212

13-
const COMPONENTS_WITHOUT_PROPTYPES = ['AnimatedBarElement'];
13+
const COMPONENTS_WITHOUT_PROPTYPES = ['AnimatedBarElement', 'ChartContainer', 'ChartContainerPro'];
1414

1515
async function generateProptypes(project: XTypeScriptProject, sourceFile: string) {
1616
const isDateObject = (name: string) => {

packages/x-charts-pro/src/ChartContainerPro/ChartContainerPro.tsx

Lines changed: 0 additions & 309 deletions
Original file line numberDiff line numberDiff line change
@@ -64,313 +64,4 @@ const ChartContainerPro = React.forwardRef(function ChartContainerProInner<
6464
props: ChartContainerProProps<TSeries> & { ref?: React.ForwardedRef<SVGSVGElement> },
6565
) => React.JSX.Element;
6666

67-
ChartContainerPro.propTypes = {
68-
// ----------------------------- Warning --------------------------------
69-
// | These PropTypes are generated from the TypeScript type definitions |
70-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
71-
// ----------------------------------------------------------------------
72-
children: PropTypes.node,
73-
className: PropTypes.string,
74-
/**
75-
* Color palette used to colorize multiple series.
76-
* @default blueberryTwilightPalette
77-
*/
78-
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
79-
/**
80-
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
81-
*/
82-
dataset: PropTypes.arrayOf(PropTypes.object),
83-
desc: PropTypes.string,
84-
/**
85-
* If `true`, the charts will not listen to the mouse move event.
86-
* It might break interactive features, but will improve performance.
87-
* @default false
88-
*/
89-
disableAxisListener: PropTypes.bool,
90-
/**
91-
* The height of the chart in px. If not defined, it takes the height of the parent element.
92-
*/
93-
height: PropTypes.number,
94-
/**
95-
* The item currently highlighted. Turns highlighting into a controlled prop.
96-
*/
97-
highlightedItem: PropTypes.shape({
98-
dataIndex: PropTypes.number,
99-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
100-
}),
101-
/**
102-
* This prop is used to help implement the accessibility logic.
103-
* If you don't provide this prop. It falls back to a randomly generated id.
104-
*/
105-
id: PropTypes.string,
106-
/**
107-
* The margin between the SVG and the drawing area.
108-
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
109-
* Accepts an object with the optional properties: `top`, `bottom`, `left`, and `right`.
110-
*/
111-
margin: PropTypes.shape({
112-
bottom: PropTypes.number,
113-
left: PropTypes.number,
114-
right: PropTypes.number,
115-
top: PropTypes.number,
116-
}),
117-
/**
118-
* The callback fired when the highlighted item changes.
119-
*
120-
* @param {HighlightItemData | null} highlightedItem The newly highlighted item.
121-
*/
122-
onHighlightChange: PropTypes.func,
123-
/**
124-
* Callback fired when the zoom has changed.
125-
*
126-
* @param {ZoomData[]} zoomData Updated zoom data.
127-
*/
128-
onZoomChange: PropTypes.func,
129-
plugins: PropTypes.arrayOf(PropTypes.func.isRequired),
130-
/**
131-
* The array of series to display.
132-
* Each type of series has its own specificity.
133-
* Please refer to the appropriate docs page to learn more about it.
134-
*/
135-
series: PropTypes.arrayOf(PropTypes.object),
136-
seriesConfig: PropTypes.object,
137-
/**
138-
* If `true`, animations are skipped.
139-
* If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
140-
*/
141-
skipAnimation: PropTypes.bool,
142-
sx: PropTypes.oneOfType([
143-
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])),
144-
PropTypes.func,
145-
PropTypes.object,
146-
]),
147-
theme: PropTypes.oneOf(['dark', 'light']),
148-
title: PropTypes.string,
149-
/**
150-
* The width of the chart in px. If not defined, it takes the width of the parent element.
151-
*/
152-
width: PropTypes.number,
153-
/**
154-
* The configuration of the x-axes.
155-
* If not provided, a default axis config is used.
156-
* An array of [[AxisConfig]] objects.
157-
*/
158-
xAxis: PropTypes.arrayOf(
159-
PropTypes.shape({
160-
classes: PropTypes.object,
161-
colorMap: PropTypes.oneOfType([
162-
PropTypes.shape({
163-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
164-
type: PropTypes.oneOf(['ordinal']).isRequired,
165-
unknownColor: PropTypes.string,
166-
values: PropTypes.arrayOf(
167-
PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string])
168-
.isRequired,
169-
),
170-
}),
171-
PropTypes.shape({
172-
color: PropTypes.oneOfType([
173-
PropTypes.arrayOf(PropTypes.string.isRequired),
174-
PropTypes.func,
175-
]).isRequired,
176-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
177-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
178-
type: PropTypes.oneOf(['continuous']).isRequired,
179-
}),
180-
PropTypes.shape({
181-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
182-
thresholds: PropTypes.arrayOf(
183-
PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired,
184-
).isRequired,
185-
type: PropTypes.oneOf(['piecewise']).isRequired,
186-
}),
187-
]),
188-
data: PropTypes.array,
189-
dataKey: PropTypes.string,
190-
disableLine: PropTypes.bool,
191-
disableTicks: PropTypes.bool,
192-
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
193-
fill: PropTypes.string,
194-
hideTooltip: PropTypes.bool,
195-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
196-
label: PropTypes.string,
197-
labelStyle: PropTypes.object,
198-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
199-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
200-
position: PropTypes.oneOf(['bottom', 'top']),
201-
reverse: PropTypes.bool,
202-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
203-
slotProps: PropTypes.object,
204-
slots: PropTypes.object,
205-
stroke: PropTypes.string,
206-
sx: PropTypes.oneOfType([
207-
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])),
208-
PropTypes.func,
209-
PropTypes.object,
210-
]),
211-
tickInterval: PropTypes.oneOfType([
212-
PropTypes.oneOf(['auto']),
213-
PropTypes.array,
214-
PropTypes.func,
215-
]),
216-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
217-
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
218-
tickLabelStyle: PropTypes.object,
219-
tickMaxStep: PropTypes.number,
220-
tickMinStep: PropTypes.number,
221-
tickNumber: PropTypes.number,
222-
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
223-
tickSize: PropTypes.number,
224-
valueFormatter: PropTypes.func,
225-
zoom: PropTypes.oneOfType([
226-
PropTypes.shape({
227-
filterMode: PropTypes.oneOf(['discard', 'keep']).isRequired,
228-
maxEnd: PropTypes.number,
229-
maxSpan: PropTypes.number,
230-
minSpan: PropTypes.number,
231-
minStart: PropTypes.number,
232-
panning: PropTypes.bool,
233-
step: PropTypes.number,
234-
}),
235-
PropTypes.bool,
236-
]),
237-
}),
238-
),
239-
/**
240-
* The configuration of the y-axes.
241-
* If not provided, a default axis config is used.
242-
* An array of [[AxisConfig]] objects.
243-
*/
244-
yAxis: PropTypes.arrayOf(
245-
PropTypes.shape({
246-
classes: PropTypes.object,
247-
colorMap: PropTypes.oneOfType([
248-
PropTypes.shape({
249-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
250-
type: PropTypes.oneOf(['ordinal']).isRequired,
251-
unknownColor: PropTypes.string,
252-
values: PropTypes.arrayOf(
253-
PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string])
254-
.isRequired,
255-
),
256-
}),
257-
PropTypes.shape({
258-
color: PropTypes.oneOfType([
259-
PropTypes.arrayOf(PropTypes.string.isRequired),
260-
PropTypes.func,
261-
]).isRequired,
262-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
263-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
264-
type: PropTypes.oneOf(['continuous']).isRequired,
265-
}),
266-
PropTypes.shape({
267-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
268-
thresholds: PropTypes.arrayOf(
269-
PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired,
270-
).isRequired,
271-
type: PropTypes.oneOf(['piecewise']).isRequired,
272-
}),
273-
]),
274-
data: PropTypes.array,
275-
dataKey: PropTypes.string,
276-
disableLine: PropTypes.bool,
277-
disableTicks: PropTypes.bool,
278-
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
279-
fill: PropTypes.string,
280-
hideTooltip: PropTypes.bool,
281-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
282-
label: PropTypes.string,
283-
labelStyle: PropTypes.object,
284-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
285-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
286-
position: PropTypes.oneOf(['left', 'right']),
287-
reverse: PropTypes.bool,
288-
scaleType: PropTypes.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
289-
slotProps: PropTypes.object,
290-
slots: PropTypes.object,
291-
stroke: PropTypes.string,
292-
sx: PropTypes.oneOfType([
293-
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])),
294-
PropTypes.func,
295-
PropTypes.object,
296-
]),
297-
tickInterval: PropTypes.oneOfType([
298-
PropTypes.oneOf(['auto']),
299-
PropTypes.array,
300-
PropTypes.func,
301-
]),
302-
tickLabelInterval: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.func]),
303-
tickLabelPlacement: PropTypes.oneOf(['middle', 'tick']),
304-
tickLabelStyle: PropTypes.object,
305-
tickMaxStep: PropTypes.number,
306-
tickMinStep: PropTypes.number,
307-
tickNumber: PropTypes.number,
308-
tickPlacement: PropTypes.oneOf(['end', 'extremities', 'middle', 'start']),
309-
tickSize: PropTypes.number,
310-
valueFormatter: PropTypes.func,
311-
zoom: PropTypes.oneOfType([
312-
PropTypes.shape({
313-
filterMode: PropTypes.oneOf(['discard', 'keep']).isRequired,
314-
maxEnd: PropTypes.number,
315-
maxSpan: PropTypes.number,
316-
minSpan: PropTypes.number,
317-
minStart: PropTypes.number,
318-
panning: PropTypes.bool,
319-
step: PropTypes.number,
320-
}),
321-
PropTypes.bool,
322-
]),
323-
}),
324-
),
325-
/**
326-
* The configuration of the z-axes.
327-
*/
328-
zAxis: PropTypes.arrayOf(
329-
PropTypes.shape({
330-
colorMap: PropTypes.oneOfType([
331-
PropTypes.shape({
332-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
333-
type: PropTypes.oneOf(['ordinal']).isRequired,
334-
unknownColor: PropTypes.string,
335-
values: PropTypes.arrayOf(
336-
PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string])
337-
.isRequired,
338-
),
339-
}),
340-
PropTypes.shape({
341-
color: PropTypes.oneOfType([
342-
PropTypes.arrayOf(PropTypes.string.isRequired),
343-
PropTypes.func,
344-
]).isRequired,
345-
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
346-
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
347-
type: PropTypes.oneOf(['continuous']).isRequired,
348-
}),
349-
PropTypes.shape({
350-
colors: PropTypes.arrayOf(PropTypes.string).isRequired,
351-
thresholds: PropTypes.arrayOf(
352-
PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired,
353-
).isRequired,
354-
type: PropTypes.oneOf(['piecewise']).isRequired,
355-
}),
356-
]),
357-
data: PropTypes.array,
358-
dataKey: PropTypes.string,
359-
id: PropTypes.string,
360-
max: PropTypes.number,
361-
min: PropTypes.number,
362-
}),
363-
),
364-
/**
365-
* The list of zoom data related to each axis.
366-
*/
367-
zoom: PropTypes.arrayOf(
368-
PropTypes.shape({
369-
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
370-
end: PropTypes.number.isRequired,
371-
start: PropTypes.number.isRequired,
372-
}),
373-
),
374-
} as any;
375-
37667
export { ChartContainerPro };

0 commit comments

Comments
 (0)