Skip to content

Commit

Permalink
[docs] Remove ` around @default values (#12158)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette authored Apr 3, 2024
1 parent cfd228d commit 3d86411
Show file tree
Hide file tree
Showing 67 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/data-grid-premium.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
},
"getAggregationPosition": {
"type": { "name": "func" },
"default": "`(groupNode) => groupNode == null ? 'footer' : 'inline'`",
"default": "(groupNode) => groupNode == null ? 'footer' : 'inline'",
"signature": {
"type": "function(groupNode: GridGroupNode) => GridAggregationPosition | null",
"describedArgs": ["groupNode"],
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/data-grid/grid-aggregation-function.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
},
"hasCellUnit": {
"type": { "description": "boolean" },
"default": "`true`",
"default": "true",
"isPremiumPlan": true
},
"label": {
"type": { "description": "string" },
"default": "`apiRef.current.getLocaleText('aggregationFunctionLabel{capitalize(name)})`",
"default": "apiRef.current.getLocaleText('aggregationFunctionLabel{capitalize(name)})",
"isPremiumPlan": true
},
"valueFormatter": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/grid-csv-export-options.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"allColumns": { "type": { "description": "boolean" }, "default": "false" },
"delimiter": { "type": { "description": "string" }, "default": "','" },
"fields": { "type": { "description": "string[]" } },
"fileName": { "type": { "description": "string" }, "default": "`document.title`" },
"fileName": { "type": { "description": "string" }, "default": "document.title" },
"getRowsToExport": {
"type": { "description": "(params: GridCsvGetRowsToExportParams) => GridRowId[]" }
},
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/data-grid/grid-excel-export-options.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"fields": { "type": { "description": "string[]" }, "isPremiumPlan": true },
"fileName": {
"type": { "description": "string" },
"default": "`document.title`",
"default": "document.title",
"isPremiumPlan": true
},
"getRowsToExport": {
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/x/api/data-grid/grid-filter-model.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"items": { "type": { "description": "GridFilterItem[]" }, "default": "[]", "required": true },
"logicOperator": {
"type": { "description": "GridLogicOperator" },
"default": "`GridLogicOperator.And`"
"default": "GridLogicOperator.And"
},
"quickFilterExcludeHiddenColumns": { "type": { "description": "boolean" }, "default": "true" },
"quickFilterLogicOperator": {
"type": { "description": "GridLogicOperator" },
"default": "`GridLogicOperator.And`"
"default": "GridLogicOperator.And"
},
"quickFilterValues": { "type": { "description": "any[]" }, "default": "`[]`" }
"quickFilterValues": { "type": { "description": "any[]" }, "default": "[]" }
}
}
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/date-field.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"returned": "boolean"
}
},
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "`false`" },
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "false" },
"size": { "type": { "name": "enum", "description": "'medium'<br>&#124;&nbsp;'small'" } },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/date-time-field.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" }, "default": "false" },
"clearable": { "type": { "name": "bool" }, "default": "false" },
"color": {
Expand Down Expand Up @@ -112,7 +112,7 @@
"returned": "boolean"
}
},
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "`false`" },
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "false" },
"size": { "type": { "name": "enum", "description": "'medium'<br>&#124;&nbsp;'small'" } },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/date-time-picker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"ampmInClock": { "type": { "name": "bool" }, "default": "true on desktop, false on mobile" },
"autoFocus": { "type": { "name": "bool" } },
"closeOnSelect": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/date-time-range-picker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" } },
"calendars": {
"type": { "name": "enum", "description": "1<br>&#124;&nbsp;2<br>&#124;&nbsp;3" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"ampmInClock": { "type": { "name": "bool" }, "default": "true on desktop, false on mobile" },
"autoFocus": { "type": { "name": "bool" } },
"closeOnSelect": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" } },
"calendars": {
"type": { "name": "enum", "description": "1<br>&#124;&nbsp;2<br>&#124;&nbsp;3" },
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/desktop-time-picker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"ampmInClock": { "type": { "name": "bool" }, "default": "true on desktop, false on mobile" },
"autoFocus": { "type": { "name": "bool" } },
"closeOnSelect": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/digital-clock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" } },
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"defaultValue": { "type": { "name": "object" } },
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/mobile-date-time-picker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"ampmInClock": { "type": { "name": "bool" }, "default": "true on desktop, false on mobile" },
"autoFocus": { "type": { "name": "bool" } },
"closeOnSelect": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" } },
"closeOnSelect": {
"type": { "name": "bool" },
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/mobile-time-picker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"ampmInClock": { "type": { "name": "bool" }, "default": "true on desktop, false on mobile" },
"autoFocus": { "type": { "name": "bool" } },
"closeOnSelect": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"returned": "boolean"
}
},
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "`false`" },
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "false" },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
"type": { "name": "object" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" } },
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"dateSeparator": { "type": { "name": "string" }, "default": "\"\"" },
Expand Down Expand Up @@ -77,7 +77,7 @@
"returned": "boolean"
}
},
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "`false`" },
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "false" },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
"type": { "name": "object" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" } },
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"dateSeparator": { "type": { "name": "string" }, "default": "\"\"" },
Expand Down Expand Up @@ -65,7 +65,7 @@
"returned": "boolean"
}
},
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "`false`" },
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "false" },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
"type": { "name": "object" },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" } },
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"defaultValue": { "type": { "name": "object" } },
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/pickers-shortcuts.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "arrayOf",
"description": "Array&lt;{ getValue: func, label: string }&gt;"
},
"default": "`[]`"
"default": "[]"
},
"subheader": { "type": { "name": "node" } },
"sx": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"returned": "boolean"
}
},
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "`false`" },
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "false" },
"size": { "type": { "name": "enum", "description": "'medium'<br>&#124;&nbsp;'small'" } },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" }, "default": "false" },
"clearable": { "type": { "name": "bool" }, "default": "false" },
"color": {
Expand Down Expand Up @@ -97,7 +97,7 @@
"returned": "boolean"
}
},
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "`false`" },
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "false" },
"size": { "type": { "name": "enum", "description": "'medium'<br>&#124;&nbsp;'small'" } },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" }, "default": "false" },
"clearable": { "type": { "name": "bool" }, "default": "false" },
"color": {
Expand Down Expand Up @@ -85,7 +85,7 @@
"returned": "boolean"
}
},
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "`false`" },
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "false" },
"size": { "type": { "name": "enum", "description": "'medium'<br>&#124;&nbsp;'small'" } },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/static-date-time-picker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"ampmInClock": { "type": { "name": "bool" }, "default": "true on desktop, false on mobile" },
"autoFocus": { "type": { "name": "bool" } },
"dayOfWeekFormatter": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/static-time-picker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"ampmInClock": { "type": { "name": "bool" }, "default": "true on desktop, false on mobile" },
"autoFocus": { "type": { "name": "bool" } },
"defaultValue": { "type": { "name": "object" } },
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/time-clock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"ampmInClock": { "type": { "name": "bool" }, "default": "false" },
"autoFocus": { "type": { "name": "bool" } },
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/time-field.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"autoFocus": { "type": { "name": "bool" }, "default": "false" },
"clearable": { "type": { "name": "bool" }, "default": "false" },
"color": {
Expand Down Expand Up @@ -84,7 +84,7 @@
"returned": "boolean"
}
},
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "`false`" },
"shouldRespectLeadingZeros": { "type": { "name": "bool" }, "default": "false" },
"size": { "type": { "name": "enum", "description": "'medium'<br>&#124;&nbsp;'small'" } },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/x/api/date-pickers/time-picker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"props": {
"ampm": { "type": { "name": "bool" }, "default": "`utils.is12HourCycleInCurrentLocale()`" },
"ampm": { "type": { "name": "bool" }, "default": "utils.is12HourCycleInCurrentLocale()" },
"ampmInClock": { "type": { "name": "bool" }, "default": "true on desktop, false on mobile" },
"autoFocus": { "type": { "name": "bool" } },
"closeOnSelect": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/tree-view/rich-tree-view.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"expandedItems": { "type": { "name": "arrayOf", "description": "Array&lt;string&gt;" } },
"getItemId": {
"type": { "name": "func" },
"default": "`(item) => item.id`",
"default": "(item) => item.id",
"signature": {
"type": "function(item: R) => string",
"describedArgs": ["item"],
Expand All @@ -23,7 +23,7 @@
},
"getItemLabel": {
"type": { "name": "func" },
"default": "`(item) => item.label`",
"default": "(item) => item.label",
"signature": {
"type": "function(item: R) => string",
"describedArgs": ["item"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ DataGridPremiumRaw.propTypes = {
* Determines the position of an aggregated value.
* @param {GridGroupNode} groupNode The current group.
* @returns {GridAggregationPosition | null} Position of the aggregated value (if `null`, the group isn't aggregated).
* @default `(groupNode) => groupNode == null ? 'footer' : 'inline'`
* @default (groupNode) => groupNode == null ? 'footer' : 'inline'
*/
getAggregationPosition: PropTypes.func,
/**
Expand Down Expand Up @@ -1011,7 +1011,7 @@ DataGridPremiumRaw.propTypes = {
* The function is used to split the pasted text into rows and cells.
* @param {string} text The text pasted from the clipboard.
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
* @default `(pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }`
* @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }
*/
splitClipboardPastedText: PropTypes.func,
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface GridAggregationFunction<V = any, AV = V, FAV = AV> {
/**
* Label of the aggregation function.
* Will be used to add a label on the footer of the grouping column when this aggregation function is the only one being used.
* @default `apiRef.current.getLocaleText('aggregationFunctionLabel{capitalize(name)})`
* @default apiRef.current.getLocaleText('aggregationFunctionLabel{capitalize(name)})
*/
label?: string;
/**
Expand All @@ -69,7 +69,7 @@ export interface GridAggregationFunction<V = any, AV = V, FAV = AV> {
/**
* Indicates if the aggregated value have the same unit as the cells used to generate it.
* It can be used to apply a custom cell renderer only if the aggregated value has the same unit.
* @default `true`
* @default true
*/
hasCellUnit?: boolean;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export interface DataGridPremiumPropsWithDefaultValue<R extends GridValidRowMode
* Determines the position of an aggregated value.
* @param {GridGroupNode} groupNode The current group.
* @returns {GridAggregationPosition | null} Position of the aggregated value (if `null`, the group isn't aggregated).
* @default `(groupNode) => groupNode == null ? 'footer' : 'inline'`
* @default (groupNode) => groupNode == null ? 'footer' : 'inline'
*/
getAggregationPosition: (groupNode: GridGroupNode) => GridAggregationPosition | null;
/**
Expand All @@ -115,7 +115,7 @@ export interface DataGridPremiumPropsWithDefaultValue<R extends GridValidRowMode
* The function is used to split the pasted text into rows and cells.
* @param {string} text The text pasted from the clipboard.
* @returns {string[][] | null} A 2D array of strings. The first dimension is the rows, the second dimension is the columns.
* @default `(pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }`
* @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }
*/
splitClipboardPastedText: (text: string) => string[][] | null;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/x-data-grid/src/models/gridExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface GridFileExportOptions<Api extends GridApiCommon = GridApiCommun
extends GridExportOptions {
/**
* The string used as the file name.
* @default `document.title`
* @default document.title
*/
fileName?: string;
/**
Expand Down Expand Up @@ -68,7 +68,7 @@ export interface GridCsvExportOptions extends GridFileExportOptions {
delimiter?: string;
/**
* The string used as the file name.
* @default `document.title`
* @default document.title
*/
fileName?: string;
/**
Expand Down
Loading

0 comments on commit 3d86411

Please sign in to comment.