From be7b21c5574e2a6f20068ea5633b56138a8e0b00 Mon Sep 17 00:00:00 2001 From: Alexandre Fauquette Date: Tue, 7 Jun 2022 18:11:01 +0200 Subject: [PATCH] scripts --- .../x/api/data-grid/data-grid-premium.json | 1 + docs/pages/x/api/data-grid/data-grid-pro.json | 1 + docs/pages/x/api/data-grid/data-grid.json | 1 + docs/pages/x/api/data-grid/grid-api.md | 2 +- docs/pages/x/api/data-grid/selectors.json | 18 ++++++++++++++++++ .../data-grid/data-grid-premium-pt.json | 1 + .../data-grid/data-grid-premium-zh.json | 1 + .../api-docs/data-grid/data-grid-premium.json | 1 + .../api-docs/data-grid/data-grid-pro-pt.json | 1 + .../api-docs/data-grid/data-grid-pro-zh.json | 1 + .../api-docs/data-grid/data-grid-pro.json | 1 + .../api-docs/data-grid/data-grid-pt.json | 1 + .../api-docs/data-grid/data-grid-zh.json | 1 + .../api-docs/data-grid/data-grid.json | 1 + scripts/x-data-grid-premium.exports.json | 3 +++ scripts/x-data-grid-pro.exports.json | 3 +++ scripts/x-data-grid.exports.json | 3 +++ 17 files changed, 40 insertions(+), 1 deletion(-) diff --git a/docs/pages/x/api/data-grid/data-grid-premium.json b/docs/pages/x/api/data-grid/data-grid-premium.json index 94a95fc0e825b..7899a13cb8364 100644 --- a/docs/pages/x/api/data-grid/data-grid-premium.json +++ b/docs/pages/x/api/data-grid/data-grid-premium.json @@ -82,6 +82,7 @@ "getRowSpacing": { "type": { "name": "func" } }, "getTreeDataPath": { "type": { "name": "func" } }, "groupingColDef": { "type": { "name": "union", "description": "func
| object" } }, + "headerGroupingRowHeight": { "type": { "name": "number" }, "default": "32" }, "headerHeight": { "type": { "name": "number" }, "default": "56" }, "hideFooter": { "type": { "name": "bool" } }, "hideFooterPagination": { "type": { "name": "bool" } }, diff --git a/docs/pages/x/api/data-grid/data-grid-pro.json b/docs/pages/x/api/data-grid/data-grid-pro.json index d5e55ad9656f5..2203b816e3206 100644 --- a/docs/pages/x/api/data-grid/data-grid-pro.json +++ b/docs/pages/x/api/data-grid/data-grid-pro.json @@ -81,6 +81,7 @@ "getRowSpacing": { "type": { "name": "func" } }, "getTreeDataPath": { "type": { "name": "func" } }, "groupingColDef": { "type": { "name": "union", "description": "func
| object" } }, + "headerGroupingRowHeight": { "type": { "name": "number" }, "default": "32" }, "headerHeight": { "type": { "name": "number" }, "default": "56" }, "hideFooter": { "type": { "name": "bool" } }, "hideFooterPagination": { "type": { "name": "bool" } }, diff --git a/docs/pages/x/api/data-grid/data-grid.json b/docs/pages/x/api/data-grid/data-grid.json index 9bba07915f164..4714e537c143d 100644 --- a/docs/pages/x/api/data-grid/data-grid.json +++ b/docs/pages/x/api/data-grid/data-grid.json @@ -58,6 +58,7 @@ "getRowHeight": { "type": { "name": "func" } }, "getRowId": { "type": { "name": "func" } }, "getRowSpacing": { "type": { "name": "func" } }, + "headerGroupingRowHeight": { "type": { "name": "number" }, "default": "32" }, "headerHeight": { "type": { "name": "number" }, "default": "56" }, "hideFooter": { "type": { "name": "bool" } }, "hideFooterPagination": { "type": { "name": "bool" } }, diff --git a/docs/pages/x/api/data-grid/grid-api.md b/docs/pages/x/api/data-grid/grid-api.md index 09bd1f97e1d54..54ee48758d156 100644 --- a/docs/pages/x/api/data-grid/grid-api.md +++ b/docs/pages/x/api/data-grid/grid-api.md @@ -84,7 +84,7 @@ import { GridApi } from '@mui/x-data-grid-pro'; | setColumnVisibility | (field: string, isVisible: boolean) => void | Changes the visibility of the column referred by `field`. | | setColumnVisibilityModel | (model: GridColumnVisibilityModel) => void | Sets the column visibility model to the one given by `model`. | | setColumnWidth | (field: string, width: number) => void | Updates the width of a column. | -| setDensity | (density: GridDensity, headerHeight?: number, rowHeight?: number) => void | Sets the density of the grid. | +| setDensity | (density: GridDensity, headerHeight?: number, rowHeight?: number, maxDepth?: number, headerGroupingRowHeight?: number) => void | Sets the density of the grid. | | setEditCellValue | (params: GridEditCellValueParams, event?: MuiBaseEvent) => Promise<boolean> \| void | Sets the value of the edit cell.
Commonly used inside the edit cell component. | | setEditRowsModel | (model: GridEditRowsModel) => void | Set the edit rows model of the grid. | | setExpandedDetailPanels [](https://mui.com/store/items/mui-x-pro/) | (ids: GridRowId[]) => void | Changes which rows to expand the detail panel. | diff --git a/docs/pages/x/api/data-grid/selectors.json b/docs/pages/x/api/data-grid/selectors.json index 43b8d282c3310..136c59138eb8f 100644 --- a/docs/pages/x/api/data-grid/selectors.json +++ b/docs/pages/x/api/data-grid/selectors.json @@ -71,6 +71,18 @@ "description": "", "supportsApiRef": true }, + { + "name": "gridDensityHeaderGroupingMaxDepthSelector", + "returnType": "number", + "description": "", + "supportsApiRef": true + }, + { + "name": "gridDensityHeaderGroupingRowHeightSelector", + "returnType": "number", + "description": "", + "supportsApiRef": true + }, { "name": "gridDensityHeaderHeightSelector", "returnType": "number", @@ -89,6 +101,12 @@ "description": "", "supportsApiRef": false }, + { + "name": "gridDensityTotalHeaderHeightSelector", + "returnType": "number", + "description": "", + "supportsApiRef": true + }, { "name": "gridDensityValueSelector", "returnType": "GridDensity", diff --git a/docs/translations/api-docs/data-grid/data-grid-premium-pt.json b/docs/translations/api-docs/data-grid/data-grid-premium-pt.json index bb3e97ca3b0c9..7c223ff5f179b 100644 --- a/docs/translations/api-docs/data-grid/data-grid-premium-pt.json +++ b/docs/translations/api-docs/data-grid/data-grid-premium-pt.json @@ -52,6 +52,7 @@ "getRowSpacing": "Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.", "getTreeDataPath": "Determines the path of a row in the tree data. For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"]. Note that all paths must contain at least one element.

Signature:
function(row: R) => Array<string>
row: The row from which we want the path.
returns (Array): The path to the row.", "groupingColDef": "The grouping column used by the tree data.", + "headerGroupingRowHeight": "The height of a row of grouping column headers. TODO: choose correctly this value", "headerHeight": "Set the height in pixel of the column headers in the grid.", "hideFooter": "If true, the footer component is hidden.", "hideFooterPagination": "If true, the pagination component in the footer is hidden.", diff --git a/docs/translations/api-docs/data-grid/data-grid-premium-zh.json b/docs/translations/api-docs/data-grid/data-grid-premium-zh.json index bb3e97ca3b0c9..7c223ff5f179b 100644 --- a/docs/translations/api-docs/data-grid/data-grid-premium-zh.json +++ b/docs/translations/api-docs/data-grid/data-grid-premium-zh.json @@ -52,6 +52,7 @@ "getRowSpacing": "Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.", "getTreeDataPath": "Determines the path of a row in the tree data. For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"]. Note that all paths must contain at least one element.

Signature:
function(row: R) => Array<string>
row: The row from which we want the path.
returns (Array): The path to the row.", "groupingColDef": "The grouping column used by the tree data.", + "headerGroupingRowHeight": "The height of a row of grouping column headers. TODO: choose correctly this value", "headerHeight": "Set the height in pixel of the column headers in the grid.", "hideFooter": "If true, the footer component is hidden.", "hideFooterPagination": "If true, the pagination component in the footer is hidden.", diff --git a/docs/translations/api-docs/data-grid/data-grid-premium.json b/docs/translations/api-docs/data-grid/data-grid-premium.json index bb3e97ca3b0c9..7c223ff5f179b 100644 --- a/docs/translations/api-docs/data-grid/data-grid-premium.json +++ b/docs/translations/api-docs/data-grid/data-grid-premium.json @@ -52,6 +52,7 @@ "getRowSpacing": "Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.", "getTreeDataPath": "Determines the path of a row in the tree data. For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"]. Note that all paths must contain at least one element.

Signature:
function(row: R) => Array<string>
row: The row from which we want the path.
returns (Array): The path to the row.", "groupingColDef": "The grouping column used by the tree data.", + "headerGroupingRowHeight": "The height of a row of grouping column headers. TODO: choose correctly this value", "headerHeight": "Set the height in pixel of the column headers in the grid.", "hideFooter": "If true, the footer component is hidden.", "hideFooterPagination": "If true, the pagination component in the footer is hidden.", diff --git a/docs/translations/api-docs/data-grid/data-grid-pro-pt.json b/docs/translations/api-docs/data-grid/data-grid-pro-pt.json index ddbb4f6f9268f..1cbd7a1979373 100644 --- a/docs/translations/api-docs/data-grid/data-grid-pro-pt.json +++ b/docs/translations/api-docs/data-grid/data-grid-pro-pt.json @@ -51,6 +51,7 @@ "getRowSpacing": "Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.", "getTreeDataPath": "Determines the path of a row in the tree data. For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"]. Note that all paths must contain at least one element.

Signature:
function(row: R) => Array<string>
row: The row from which we want the path.
returns (Array): The path to the row.", "groupingColDef": "The grouping column used by the tree data.", + "headerGroupingRowHeight": "The height of a row of grouping column headers. TODO: choose correctly this value", "headerHeight": "Set the height in pixel of the column headers in the grid.", "hideFooter": "If true, the footer component is hidden.", "hideFooterPagination": "If true, the pagination component in the footer is hidden.", diff --git a/docs/translations/api-docs/data-grid/data-grid-pro-zh.json b/docs/translations/api-docs/data-grid/data-grid-pro-zh.json index ddbb4f6f9268f..1cbd7a1979373 100644 --- a/docs/translations/api-docs/data-grid/data-grid-pro-zh.json +++ b/docs/translations/api-docs/data-grid/data-grid-pro-zh.json @@ -51,6 +51,7 @@ "getRowSpacing": "Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.", "getTreeDataPath": "Determines the path of a row in the tree data. For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"]. Note that all paths must contain at least one element.

Signature:
function(row: R) => Array<string>
row: The row from which we want the path.
returns (Array): The path to the row.", "groupingColDef": "The grouping column used by the tree data.", + "headerGroupingRowHeight": "The height of a row of grouping column headers. TODO: choose correctly this value", "headerHeight": "Set the height in pixel of the column headers in the grid.", "hideFooter": "If true, the footer component is hidden.", "hideFooterPagination": "If true, the pagination component in the footer is hidden.", diff --git a/docs/translations/api-docs/data-grid/data-grid-pro.json b/docs/translations/api-docs/data-grid/data-grid-pro.json index ddbb4f6f9268f..1cbd7a1979373 100644 --- a/docs/translations/api-docs/data-grid/data-grid-pro.json +++ b/docs/translations/api-docs/data-grid/data-grid-pro.json @@ -51,6 +51,7 @@ "getRowSpacing": "Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.", "getTreeDataPath": "Determines the path of a row in the tree data. For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"]. Note that all paths must contain at least one element.

Signature:
function(row: R) => Array<string>
row: The row from which we want the path.
returns (Array): The path to the row.", "groupingColDef": "The grouping column used by the tree data.", + "headerGroupingRowHeight": "The height of a row of grouping column headers. TODO: choose correctly this value", "headerHeight": "Set the height in pixel of the column headers in the grid.", "hideFooter": "If true, the footer component is hidden.", "hideFooterPagination": "If true, the pagination component in the footer is hidden.", diff --git a/docs/translations/api-docs/data-grid/data-grid-pt.json b/docs/translations/api-docs/data-grid/data-grid-pt.json index c9eca7e408a5e..c3110a15a5865 100644 --- a/docs/translations/api-docs/data-grid/data-grid-pt.json +++ b/docs/translations/api-docs/data-grid/data-grid-pt.json @@ -36,6 +36,7 @@ "getRowHeight": "Function that sets the row height per row.

Signature:
function(params: GridRowHeightParams) => GridRowHeightReturnValue
params: With all properties from GridRowHeightParams.
returns (GridRowHeightReturnValue): The row height value. If null or undefined then the default row height is applied. If "auto" then the row height is calculated based on the content.", "getRowId": "Return the id of a given GridRowModel.", "getRowSpacing": "Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.", + "headerGroupingRowHeight": "The height of a row of grouping column headers. TODO: choose correctly this value", "headerHeight": "Set the height in pixel of the column headers in the grid.", "hideFooter": "If true, the footer component is hidden.", "hideFooterPagination": "If true, the pagination component in the footer is hidden.", diff --git a/docs/translations/api-docs/data-grid/data-grid-zh.json b/docs/translations/api-docs/data-grid/data-grid-zh.json index c9eca7e408a5e..c3110a15a5865 100644 --- a/docs/translations/api-docs/data-grid/data-grid-zh.json +++ b/docs/translations/api-docs/data-grid/data-grid-zh.json @@ -36,6 +36,7 @@ "getRowHeight": "Function that sets the row height per row.

Signature:
function(params: GridRowHeightParams) => GridRowHeightReturnValue
params: With all properties from GridRowHeightParams.
returns (GridRowHeightReturnValue): The row height value. If null or undefined then the default row height is applied. If "auto" then the row height is calculated based on the content.", "getRowId": "Return the id of a given GridRowModel.", "getRowSpacing": "Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.", + "headerGroupingRowHeight": "The height of a row of grouping column headers. TODO: choose correctly this value", "headerHeight": "Set the height in pixel of the column headers in the grid.", "hideFooter": "If true, the footer component is hidden.", "hideFooterPagination": "If true, the pagination component in the footer is hidden.", diff --git a/docs/translations/api-docs/data-grid/data-grid.json b/docs/translations/api-docs/data-grid/data-grid.json index c9eca7e408a5e..c3110a15a5865 100644 --- a/docs/translations/api-docs/data-grid/data-grid.json +++ b/docs/translations/api-docs/data-grid/data-grid.json @@ -36,6 +36,7 @@ "getRowHeight": "Function that sets the row height per row.

Signature:
function(params: GridRowHeightParams) => GridRowHeightReturnValue
params: With all properties from GridRowHeightParams.
returns (GridRowHeightReturnValue): The row height value. If null or undefined then the default row height is applied. If "auto" then the row height is calculated based on the content.", "getRowId": "Return the id of a given GridRowModel.", "getRowSpacing": "Function that allows to specify the spacing between rows.

Signature:
function(params: GridRowSpacingParams) => GridRowSpacing
params: With all properties from GridRowSpacingParams.
returns (GridRowSpacing): The row spacing values.", + "headerGroupingRowHeight": "The height of a row of grouping column headers. TODO: choose correctly this value", "headerHeight": "Set the height in pixel of the column headers in the grid.", "hideFooter": "If true, the footer component is hidden.", "hideFooterPagination": "If true, the pagination component in the footer is hidden.", diff --git a/scripts/x-data-grid-premium.exports.json b/scripts/x-data-grid-premium.exports.json index c9b3d30b1f9d3..bca77f2ff149e 100644 --- a/scripts/x-data-grid-premium.exports.json +++ b/scripts/x-data-grid-premium.exports.json @@ -174,11 +174,14 @@ { "name": "GridDensity", "kind": "TypeAlias" }, { "name": "GridDensityApi", "kind": "Interface" }, { "name": "gridDensityFactorSelector", "kind": "Variable" }, + { "name": "gridDensityHeaderGroupingMaxDepthSelector", "kind": "Variable" }, + { "name": "gridDensityHeaderGroupingRowHeightSelector", "kind": "Variable" }, { "name": "gridDensityHeaderHeightSelector", "kind": "Variable" }, { "name": "GridDensityOption", "kind": "Interface" }, { "name": "gridDensityRowHeightSelector", "kind": "Variable" }, { "name": "gridDensitySelector", "kind": "Variable" }, { "name": "GridDensityState", "kind": "Interface" }, + { "name": "gridDensityTotalHeaderHeightSelector", "kind": "Variable" }, { "name": "GridDensityTypes", "kind": "Enum" }, { "name": "gridDensityValueSelector", "kind": "Variable" }, { "name": "GridDetailPanelApi", "kind": "Interface" }, diff --git a/scripts/x-data-grid-pro.exports.json b/scripts/x-data-grid-pro.exports.json index a7da26b261a73..6a8c179258a69 100644 --- a/scripts/x-data-grid-pro.exports.json +++ b/scripts/x-data-grid-pro.exports.json @@ -171,11 +171,14 @@ { "name": "GridDensity", "kind": "TypeAlias" }, { "name": "GridDensityApi", "kind": "Interface" }, { "name": "gridDensityFactorSelector", "kind": "Variable" }, + { "name": "gridDensityHeaderGroupingMaxDepthSelector", "kind": "Variable" }, + { "name": "gridDensityHeaderGroupingRowHeightSelector", "kind": "Variable" }, { "name": "gridDensityHeaderHeightSelector", "kind": "Variable" }, { "name": "GridDensityOption", "kind": "Interface" }, { "name": "gridDensityRowHeightSelector", "kind": "Variable" }, { "name": "gridDensitySelector", "kind": "Variable" }, { "name": "GridDensityState", "kind": "Interface" }, + { "name": "gridDensityTotalHeaderHeightSelector", "kind": "Variable" }, { "name": "GridDensityTypes", "kind": "Enum" }, { "name": "gridDensityValueSelector", "kind": "Variable" }, { "name": "GridDetailPanelApi", "kind": "Interface" }, diff --git a/scripts/x-data-grid.exports.json b/scripts/x-data-grid.exports.json index 188f7f56c5f69..5253c3e314af3 100644 --- a/scripts/x-data-grid.exports.json +++ b/scripts/x-data-grid.exports.json @@ -157,11 +157,14 @@ { "name": "GridDensity", "kind": "TypeAlias" }, { "name": "GridDensityApi", "kind": "Interface" }, { "name": "gridDensityFactorSelector", "kind": "Variable" }, + { "name": "gridDensityHeaderGroupingMaxDepthSelector", "kind": "Variable" }, + { "name": "gridDensityHeaderGroupingRowHeightSelector", "kind": "Variable" }, { "name": "gridDensityHeaderHeightSelector", "kind": "Variable" }, { "name": "GridDensityOption", "kind": "Interface" }, { "name": "gridDensityRowHeightSelector", "kind": "Variable" }, { "name": "gridDensitySelector", "kind": "Variable" }, { "name": "GridDensityState", "kind": "Interface" }, + { "name": "gridDensityTotalHeaderHeightSelector", "kind": "Variable" }, { "name": "GridDensityTypes", "kind": "Enum" }, { "name": "gridDensityValueSelector", "kind": "Variable" }, { "name": "GridDimensions", "kind": "Interface" },