@redsift/ds-mcp-server 12.4.0-muiv6 → 12.4.0
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/data/demos/patterns/_shared/columns.tsx +3 -3
- package/data/demos/patterns/_shared/defaults.ts +1 -1
- package/data/demos/patterns/_shared/filter-helpers.ts +1 -1
- package/data/demos/patterns/_shared/helpers.tsx +1 -1
- package/data/demos/patterns/_shared/server-logic.ts +1 -1
- package/data/demos/patterns/crossfiltered-datagrid-server-side/example.tsx +10 -10
- package/data/demos/patterns/drilldowned-datagrid-client-side/example.tsx +1 -1
- package/data/demos/patterns/drilldowned-datagrid-server-side/example.tsx +1 -1
- package/data/demos/patterns/single-datagrid-client-side/SingleDatagridClientSide.interaction.stories.tsx +1 -1
- package/data/demos/patterns/single-datagrid-client-side/example.tsx +4 -4
- package/data/demos/patterns/single-datagrid-server-side/SingleDatagridServerSide.interaction.stories.tsx +1 -1
- package/data/demos/patterns/single-datagrid-server-side/example.tsx +4 -4
- package/data/demos/patterns/tabbed-datagrid-server-side/example.tsx +1 -1
- package/data/docs/components/dashboard/Dashboard.json +2 -2
- package/data/docs/components/table/DataGrid.json +7 -7
- package/data/docs/components/table/GridToolbarFilterSemanticField.json +1 -1
- package/data/docs/components/table/StatefulDataGrid.json +7 -7
- package/data/docs/components/table/Toolbar.json +8 -2
- package/data/docs/components.json +27 -21
- package/data/docs/llms-full.txt +27 -27
- package/data/docs/llms.txt +4 -4
- package/data/docs/patterns-catalog.md +4 -4
- package/data/docs/patterns.json +4 -4
- package/data/metadata.json +2 -2
- package/data/patterns/crossfiltered-datagrid-server-side.mdx +1 -1
- package/data/patterns/drilldowned-datagrid-client-side.mdx +1 -1
- package/data/patterns/drilldowned-datagrid-server-side.mdx +1 -1
- package/data/patterns/single-datagrid-client-side.mdx +7 -7
- package/data/patterns/single-datagrid-server-side.mdx +7 -7
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { createColumn, TextCell } from '@redsift/table';
|
|
3
3
|
import { Flexbox, Icon, IconButtonLink, Pill } from '@redsift/design-system';
|
|
4
4
|
import { mdiArrowRight, mdiCheck, mdiClose } from '@redsift/icons';
|
|
5
|
-
import { GridColDef, GridRenderCellParams } from '@mui/x-data-grid-
|
|
5
|
+
import { GridColDef, GridRenderCellParams } from '@mui/x-data-grid-premium';
|
|
6
6
|
import { Row } from './data';
|
|
7
7
|
|
|
8
8
|
// -- Option constants -------------------------------------------------------
|
|
@@ -106,7 +106,7 @@ export const columns: GridColDef<Row>[] = [
|
|
|
106
106
|
headerName: 'Date',
|
|
107
107
|
width: 140,
|
|
108
108
|
...createColumn('date'),
|
|
109
|
-
valueGetter: (
|
|
109
|
+
valueGetter: (value: string) => parseDate(value),
|
|
110
110
|
renderCell: ({ value }: GridRenderCellParams) => <TextCell>{value ? formatDate(value as Date) : '—'}</TextCell>,
|
|
111
111
|
},
|
|
112
112
|
// DateTime
|
|
@@ -115,7 +115,7 @@ export const columns: GridColDef<Row>[] = [
|
|
|
115
115
|
headerName: 'Date & Time',
|
|
116
116
|
width: 180,
|
|
117
117
|
...createColumn('dateTime'),
|
|
118
|
-
valueGetter: (
|
|
118
|
+
valueGetter: (value: string) => parseDate(value),
|
|
119
119
|
renderCell: ({ value }: GridRenderCellParams) => <TextCell>{value ? formatDateTime(value as Date) : '—'}</TextCell>,
|
|
120
120
|
},
|
|
121
121
|
// Boolean — in stock
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-
|
|
1
|
+
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
2
2
|
import { Row, allRows } from './data';
|
|
3
3
|
import { Aggregates, computeAggregates, applyFilters } from './filter-helpers';
|
|
4
4
|
|
|
@@ -2,9 +2,9 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
2
2
|
import { DataGrid } from '@redsift/table';
|
|
3
3
|
import { Flexbox } from '@redsift/design-system';
|
|
4
4
|
import { DataCard, DataRow } from '@redsift/dashboard';
|
|
5
|
-
import { BarChart, PieChart } from '@redsift/charts';
|
|
5
|
+
import { BarChart, PieChart, ArcDatum, BarDatum } from '@redsift/charts';
|
|
6
6
|
import { mdiShapeOutline, mdiToggleSwitch, mdiFoodOff } from '@redsift/icons';
|
|
7
|
-
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-
|
|
7
|
+
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
8
8
|
import { Row } from '../_shared/data';
|
|
9
9
|
import { columns, CATEGORY_OPTIONS, ALLERGEN_OPTIONS } from '../_shared/columns';
|
|
10
10
|
import { fetchBakeryData, FetchResult } from '../_shared/api-client';
|
|
@@ -207,8 +207,8 @@ export default () => {
|
|
|
207
207
|
}}
|
|
208
208
|
data={itemsChartData}
|
|
209
209
|
sliceRole="option"
|
|
210
|
-
onSliceClick={(datum:
|
|
211
|
-
const key = datum.data.key
|
|
210
|
+
onSliceClick={(datum: ArcDatum) => {
|
|
211
|
+
const key = datum.data.key;
|
|
212
212
|
setFilterModel((prev) => {
|
|
213
213
|
const selected = getSelectedFromFilterModel(prev, 'Items');
|
|
214
214
|
const next = selected.includes(key) ? selected.filter((v) => v !== key) : [...selected, key];
|
|
@@ -216,8 +216,8 @@ export default () => {
|
|
|
216
216
|
});
|
|
217
217
|
setPage(0);
|
|
218
218
|
}}
|
|
219
|
-
isSliceSelected={(datum:
|
|
220
|
-
itemsSelection.length === 0 || itemsSelection.includes(datum.data.key
|
|
219
|
+
isSliceSelected={(datum: ArcDatum) =>
|
|
220
|
+
itemsSelection.length === 0 || itemsSelection.includes(datum.data.key)
|
|
221
221
|
}
|
|
222
222
|
/>
|
|
223
223
|
|
|
@@ -238,8 +238,8 @@ export default () => {
|
|
|
238
238
|
barProps={{ gap: 20, width: 60 }}
|
|
239
239
|
data={tagsChartData}
|
|
240
240
|
barRole="option"
|
|
241
|
-
onBarClick={(datum:
|
|
242
|
-
const key = datum.data.key
|
|
241
|
+
onBarClick={(datum: BarDatum) => {
|
|
242
|
+
const key = String(datum.data.key);
|
|
243
243
|
setFilterModel((prev) => {
|
|
244
244
|
const selected = getSelectedFromFilterModel(prev, 'Tags');
|
|
245
245
|
const next = selected.includes(key) ? selected.filter((v) => v !== key) : [...selected, key];
|
|
@@ -247,8 +247,8 @@ export default () => {
|
|
|
247
247
|
});
|
|
248
248
|
setPage(0);
|
|
249
249
|
}}
|
|
250
|
-
isBarSelected={(datum:
|
|
251
|
-
tagsSelection.length === 0 || tagsSelection.includes(datum.data.key
|
|
250
|
+
isBarSelected={(datum: BarDatum) =>
|
|
251
|
+
tagsSelection.length === 0 || tagsSelection.includes(String(datum.data.key))
|
|
252
252
|
}
|
|
253
253
|
/>
|
|
254
254
|
</Flexbox>
|
|
@@ -3,7 +3,7 @@ import { DataGrid } from '@redsift/table';
|
|
|
3
3
|
import { Flexbox } from '@redsift/design-system';
|
|
4
4
|
import { DataCard, DataRow } from '@redsift/dashboard';
|
|
5
5
|
import { mdiShapeOutline, mdiToggleSwitch, mdiFoodOff } from '@redsift/icons';
|
|
6
|
-
import { GridFilterModel } from '@mui/x-data-grid-
|
|
6
|
+
import { GridFilterModel } from '@mui/x-data-grid-premium';
|
|
7
7
|
import { rows } from '../_shared/data';
|
|
8
8
|
import { columns, CATEGORY_OPTIONS, ALLERGEN_OPTIONS } from '../_shared/columns';
|
|
9
9
|
import { CustomToolbar } from '../_shared/helpers';
|
|
@@ -3,7 +3,7 @@ import { DataGrid } from '@redsift/table';
|
|
|
3
3
|
import { Flexbox } from '@redsift/design-system';
|
|
4
4
|
import { DataCard, DataRow } from '@redsift/dashboard';
|
|
5
5
|
import { mdiShapeOutline, mdiToggleSwitch, mdiFoodOff } from '@redsift/icons';
|
|
6
|
-
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-
|
|
6
|
+
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
7
7
|
import { Row } from '../_shared/data';
|
|
8
8
|
import { columns, CATEGORY_OPTIONS, ALLERGEN_OPTIONS } from '../_shared/columns';
|
|
9
9
|
import { fetchBakeryData, FetchResult } from '../_shared/api-client';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import { within, userEvent } from '@storybook/testing-library';
|
|
4
4
|
import { expect } from '@storybook/jest';
|
|
5
|
-
import { GridFilterModel } from '@mui/x-data-grid-
|
|
5
|
+
import { GridFilterModel } from '@mui/x-data-grid-premium';
|
|
6
6
|
|
|
7
7
|
import Example from './example';
|
|
8
8
|
import WithLoadingExample from './with-loading';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { DataGrid } from '@redsift/table';
|
|
2
|
+
import { DataGrid, EMPTY_ROW_SELECTION_MODEL, getSelectionCount } from '@redsift/table';
|
|
3
3
|
import { Flexbox } from '@redsift/design-system';
|
|
4
|
-
import { GridFilterModel, GridRowSelectionModel } from '@mui/x-data-grid-
|
|
4
|
+
import { GridFilterModel, GridRowSelectionModel } from '@mui/x-data-grid-premium';
|
|
5
5
|
import { rows } from '../_shared/data';
|
|
6
6
|
import { columns } from '../_shared/columns';
|
|
7
7
|
import { CustomToolbar, BulkActionBar } from '../_shared/helpers';
|
|
8
8
|
import { DEFAULT_FILTER_MODEL, DEFAULT_SORT_MODEL } from '../_shared/defaults';
|
|
9
9
|
|
|
10
10
|
export default ({ initialFilterModel }: { initialFilterModel?: GridFilterModel }) => {
|
|
11
|
-
const [selectionModel, setSelectionModel] = useState<GridRowSelectionModel>(
|
|
11
|
+
const [selectionModel, setSelectionModel] = useState<GridRowSelectionModel>(EMPTY_ROW_SELECTION_MODEL);
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<div style={{ width: '100%' }}>
|
|
15
15
|
<Flexbox flexDirection="column" gap="0px">
|
|
16
16
|
<BulkActionBar
|
|
17
|
-
count={selectionModel
|
|
17
|
+
count={getSelectionCount(selectionModel)}
|
|
18
18
|
onLog={() => console.log('Selected:', selectionModel)}
|
|
19
19
|
onDelete={() => console.log('Delete:', selectionModel)}
|
|
20
20
|
/>
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import { within } from '@storybook/testing-library';
|
|
4
4
|
import { expect } from '@storybook/jest';
|
|
5
|
-
import { GridFilterModel } from '@mui/x-data-grid-
|
|
5
|
+
import { GridFilterModel } from '@mui/x-data-grid-premium';
|
|
6
6
|
|
|
7
7
|
import Example from './example';
|
|
8
8
|
import WithLoadingExample from './with-loading';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { DataGrid } from '@redsift/table';
|
|
2
|
+
import { DataGrid, EMPTY_ROW_SELECTION_MODEL, getSelectionCount } from '@redsift/table';
|
|
3
3
|
import { Flexbox } from '@redsift/design-system';
|
|
4
|
-
import { GridFilterModel, GridRowSelectionModel, GridSortModel } from '@mui/x-data-grid-
|
|
4
|
+
import { GridFilterModel, GridRowSelectionModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
5
5
|
import { Row } from '../_shared/data';
|
|
6
6
|
import { columns } from '../_shared/columns';
|
|
7
7
|
import { fetchBakeryData } from '../_shared/api-client';
|
|
@@ -16,7 +16,7 @@ export default ({ initialFilterModel }: { initialFilterModel?: GridFilterModel }
|
|
|
16
16
|
const [pageSize, setPageSize] = useState(10);
|
|
17
17
|
const [sortModel, setSortModel] = useState<GridSortModel>(DEFAULT_SORT_MODEL);
|
|
18
18
|
const [filterModel, setFilterModel] = useState<GridFilterModel>(initialFilterModel ?? DEFAULT_FILTER_MODEL);
|
|
19
|
-
const [selectionModel, setSelectionModel] = useState<GridRowSelectionModel>(
|
|
19
|
+
const [selectionModel, setSelectionModel] = useState<GridRowSelectionModel>(EMPTY_ROW_SELECTION_MODEL);
|
|
20
20
|
|
|
21
21
|
const quickFilterText = (filterModel as { quickFilterValues?: string[] }).quickFilterValues?.join(' ') || '';
|
|
22
22
|
const debounceRef = useRef<ReturnType<typeof setTimeout>>();
|
|
@@ -54,7 +54,7 @@ export default ({ initialFilterModel }: { initialFilterModel?: GridFilterModel }
|
|
|
54
54
|
<div style={{ width: '100%' }}>
|
|
55
55
|
<Flexbox flexDirection="column" gap="0px">
|
|
56
56
|
<BulkActionBar
|
|
57
|
-
count={selectionModel
|
|
57
|
+
count={getSelectionCount(selectionModel)}
|
|
58
58
|
onLog={() => console.log('Selected:', selectionModel)}
|
|
59
59
|
onDelete={() => console.log('Delete:', selectionModel)}
|
|
60
60
|
/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { DataGrid } from '@redsift/table';
|
|
3
3
|
import { Flexbox, Pill, Number, Text, Tabs, Tab } from '@redsift/design-system';
|
|
4
|
-
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-
|
|
4
|
+
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
5
5
|
import { Row } from '../_shared/data';
|
|
6
6
|
import { columns, CATEGORY_OPTIONS } from '../_shared/columns';
|
|
7
7
|
import { fetchBakeryData } from '../_shared/api-client';
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "dataGridApiRef",
|
|
17
|
-
"description": "Datagrid API Ref.",
|
|
18
|
-
"type": "MutableRefObject<
|
|
17
|
+
"description": "Datagrid API Ref. MUI v8: can be null initially.",
|
|
18
|
+
"type": "MutableRefObject<GridApiPremium | null>",
|
|
19
19
|
"required": false,
|
|
20
20
|
"defaultValue": null,
|
|
21
21
|
"category": "props"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
{
|
|
56
56
|
"name": "paginationProps",
|
|
57
57
|
"description": "Props to forward to the pagination component.",
|
|
58
|
-
"type": "Omit<TablePaginationProps, \"paginationMode\" | \"component\" | \"
|
|
58
|
+
"type": "Omit<TablePaginationProps, \"paginationMode\" | \"component\" | \"count\" | \"onPageChange\" | \"onRowsPerPageChange\" | \"page\" | \"rowsPerPage\" | \"rowsPerPageOptions\">",
|
|
59
59
|
"required": false,
|
|
60
60
|
"defaultValue": null,
|
|
61
61
|
"category": "props"
|
|
@@ -72,17 +72,17 @@
|
|
|
72
72
|
"category": "props"
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
|
-
"name": "
|
|
76
|
-
"description": "",
|
|
77
|
-
"type": "string",
|
|
75
|
+
"name": "getTreeDataPath",
|
|
76
|
+
"description": "Determines the path of a row in the tree data.\nFor instance, a row with the path [\"A\", \"B\"] is the child of the row with the path [\"A\"].\nNote that all paths must contain at least one element.\n@template R\n@param row The row from which we want the path.\n@returns The path to the row.",
|
|
77
|
+
"type": "(row: any) => readonly string[]",
|
|
78
78
|
"required": false,
|
|
79
79
|
"defaultValue": null,
|
|
80
80
|
"category": "props"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
|
-
"name": "
|
|
84
|
-
"description": "",
|
|
85
|
-
"type": "
|
|
83
|
+
"name": "setTreeDataPath",
|
|
84
|
+
"description": "Updates the tree path in a row model.\nUsed when reordering rows across different parents in tree data.\n@template R\n@param path The new path for the row.\n@param row The row model to update.\n@returns The updated row model with the new path.",
|
|
85
|
+
"type": "(path: string[], row: any) => any",
|
|
86
86
|
"required": false,
|
|
87
87
|
"defaultValue": null,
|
|
88
88
|
"category": "props"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
{
|
|
80
80
|
"name": "paginationProps",
|
|
81
81
|
"description": "Props to forward to the pagination component.",
|
|
82
|
-
"type": "Omit<TablePaginationProps, \"paginationMode\" | \"component\" | \"
|
|
82
|
+
"type": "Omit<TablePaginationProps, \"paginationMode\" | \"component\" | \"count\" | \"onPageChange\" | \"onRowsPerPageChange\" | \"page\" | \"rowsPerPage\" | \"rowsPerPageOptions\">",
|
|
83
83
|
"required": false,
|
|
84
84
|
"defaultValue": null,
|
|
85
85
|
"category": "props"
|
|
@@ -96,17 +96,17 @@
|
|
|
96
96
|
"category": "props"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
|
-
"name": "
|
|
100
|
-
"description": "",
|
|
101
|
-
"type": "string",
|
|
99
|
+
"name": "getTreeDataPath",
|
|
100
|
+
"description": "Determines the path of a row in the tree data.\nFor instance, a row with the path [\"A\", \"B\"] is the child of the row with the path [\"A\"].\nNote that all paths must contain at least one element.\n@template R\n@param row The row from which we want the path.\n@returns The path to the row.",
|
|
101
|
+
"type": "(row: any) => readonly string[]",
|
|
102
102
|
"required": false,
|
|
103
103
|
"defaultValue": null,
|
|
104
104
|
"category": "props"
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
"name": "
|
|
108
|
-
"description": "",
|
|
109
|
-
"type": "
|
|
107
|
+
"name": "setTreeDataPath",
|
|
108
|
+
"description": "Updates the tree path in a row model.\nUsed when reordering rows across different parents in tree data.\n@template R\n@param path The new path for the row.\n@param row The row model to update.\n@returns The updated row model with the new path.",
|
|
109
|
+
"type": "(path: string[], row: any) => any",
|
|
110
110
|
"required": false,
|
|
111
111
|
"defaultValue": null,
|
|
112
112
|
"category": "props"
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
{
|
|
8
8
|
"name": "columnsButtonProps",
|
|
9
9
|
"description": "Props to forward to the column button.",
|
|
10
|
-
"type":
|
|
10
|
+
"type": [
|
|
11
|
+
"GridToolbarColumnsButtonProps",
|
|
12
|
+
"GridToolbarColumnsButtonProps & RefAttributes<HTMLButtonElement>"
|
|
13
|
+
],
|
|
11
14
|
"required": false,
|
|
12
15
|
"defaultValue": null,
|
|
13
16
|
"category": "props"
|
|
@@ -23,7 +26,10 @@
|
|
|
23
26
|
{
|
|
24
27
|
"name": "densityButtonProps",
|
|
25
28
|
"description": "Props to forward to the density button.",
|
|
26
|
-
"type":
|
|
29
|
+
"type": [
|
|
30
|
+
"GridToolbarDensitySelectorProps",
|
|
31
|
+
"GridToolbarDensitySelectorProps & RefAttributes<HTMLButtonElement>"
|
|
32
|
+
],
|
|
27
33
|
"required": false,
|
|
28
34
|
"defaultValue": null,
|
|
29
35
|
"category": "props"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"name": "Red Sift Design System",
|
|
4
|
-
"version": "12.3.0
|
|
5
|
-
"generated": "2026-04-
|
|
4
|
+
"version": "12.3.0",
|
|
5
|
+
"generated": "2026-04-01T15:04:59.444Z",
|
|
6
6
|
"repository": "https://github.com/redsift/design-system",
|
|
7
7
|
"documentation": "https://design-system.redsift.io",
|
|
8
8
|
"packages": [
|
|
@@ -55168,7 +55168,7 @@
|
|
|
55168
55168
|
{
|
|
55169
55169
|
"name": "paginationProps",
|
|
55170
55170
|
"description": "Props to forward to the pagination component.",
|
|
55171
|
-
"type": "Omit<TablePaginationProps, \"paginationMode\" | \"component\" | \"
|
|
55171
|
+
"type": "Omit<TablePaginationProps, \"paginationMode\" | \"component\" | \"count\" | \"onPageChange\" | \"onRowsPerPageChange\" | \"page\" | \"rowsPerPage\" | \"rowsPerPageOptions\">",
|
|
55172
55172
|
"required": false,
|
|
55173
55173
|
"defaultValue": null,
|
|
55174
55174
|
"category": "props"
|
|
@@ -55185,17 +55185,17 @@
|
|
|
55185
55185
|
"category": "props"
|
|
55186
55186
|
},
|
|
55187
55187
|
{
|
|
55188
|
-
"name": "
|
|
55189
|
-
"description": "",
|
|
55190
|
-
"type": "string",
|
|
55188
|
+
"name": "getTreeDataPath",
|
|
55189
|
+
"description": "Determines the path of a row in the tree data.\nFor instance, a row with the path [\"A\", \"B\"] is the child of the row with the path [\"A\"].\nNote that all paths must contain at least one element.\n@template R\n@param row The row from which we want the path.\n@returns The path to the row.",
|
|
55190
|
+
"type": "(row: any) => readonly string[]",
|
|
55191
55191
|
"required": false,
|
|
55192
55192
|
"defaultValue": null,
|
|
55193
55193
|
"category": "props"
|
|
55194
55194
|
},
|
|
55195
55195
|
{
|
|
55196
|
-
"name": "
|
|
55197
|
-
"description": "",
|
|
55198
|
-
"type": "
|
|
55196
|
+
"name": "setTreeDataPath",
|
|
55197
|
+
"description": "Updates the tree path in a row model.\nUsed when reordering rows across different parents in tree data.\n@template R\n@param path The new path for the row.\n@param row The row model to update.\n@returns The updated row model with the new path.",
|
|
55198
|
+
"type": "(path: string[], row: any) => any",
|
|
55199
55199
|
"required": false,
|
|
55200
55200
|
"defaultValue": null,
|
|
55201
55201
|
"category": "props"
|
|
@@ -55221,7 +55221,7 @@
|
|
|
55221
55221
|
"name": "onFilterModelChange",
|
|
55222
55222
|
"description": "",
|
|
55223
55223
|
"type": "(filterModel: GridFilterModel) => void",
|
|
55224
|
-
"required":
|
|
55224
|
+
"required": false,
|
|
55225
55225
|
"defaultValue": null,
|
|
55226
55226
|
"category": "props"
|
|
55227
55227
|
},
|
|
@@ -55360,7 +55360,7 @@
|
|
|
55360
55360
|
{
|
|
55361
55361
|
"name": "paginationProps",
|
|
55362
55362
|
"description": "Props to forward to the pagination component.",
|
|
55363
|
-
"type": "Omit<TablePaginationProps, \"paginationMode\" | \"component\" | \"
|
|
55363
|
+
"type": "Omit<TablePaginationProps, \"paginationMode\" | \"component\" | \"count\" | \"onPageChange\" | \"onRowsPerPageChange\" | \"page\" | \"rowsPerPage\" | \"rowsPerPageOptions\">",
|
|
55364
55364
|
"required": false,
|
|
55365
55365
|
"defaultValue": null,
|
|
55366
55366
|
"category": "props"
|
|
@@ -55377,17 +55377,17 @@
|
|
|
55377
55377
|
"category": "props"
|
|
55378
55378
|
},
|
|
55379
55379
|
{
|
|
55380
|
-
"name": "
|
|
55381
|
-
"description": "",
|
|
55382
|
-
"type": "string",
|
|
55380
|
+
"name": "getTreeDataPath",
|
|
55381
|
+
"description": "Determines the path of a row in the tree data.\nFor instance, a row with the path [\"A\", \"B\"] is the child of the row with the path [\"A\"].\nNote that all paths must contain at least one element.\n@template R\n@param row The row from which we want the path.\n@returns The path to the row.",
|
|
55382
|
+
"type": "(row: any) => readonly string[]",
|
|
55383
55383
|
"required": false,
|
|
55384
55384
|
"defaultValue": null,
|
|
55385
55385
|
"category": "props"
|
|
55386
55386
|
},
|
|
55387
55387
|
{
|
|
55388
|
-
"name": "
|
|
55389
|
-
"description": "",
|
|
55390
|
-
"type": "
|
|
55388
|
+
"name": "setTreeDataPath",
|
|
55389
|
+
"description": "Updates the tree path in a row model.\nUsed when reordering rows across different parents in tree data.\n@template R\n@param path The new path for the row.\n@param row The row model to update.\n@returns The updated row model with the new path.",
|
|
55390
|
+
"type": "(path: string[], row: any) => any",
|
|
55391
55391
|
"required": false,
|
|
55392
55392
|
"defaultValue": null,
|
|
55393
55393
|
"category": "props"
|
|
@@ -55521,7 +55521,10 @@
|
|
|
55521
55521
|
{
|
|
55522
55522
|
"name": "columnsButtonProps",
|
|
55523
55523
|
"description": "Props to forward to the column button.",
|
|
55524
|
-
"type":
|
|
55524
|
+
"type": [
|
|
55525
|
+
"GridToolbarColumnsButtonProps",
|
|
55526
|
+
"GridToolbarColumnsButtonProps & RefAttributes<HTMLButtonElement>"
|
|
55527
|
+
],
|
|
55525
55528
|
"required": false,
|
|
55526
55529
|
"defaultValue": null,
|
|
55527
55530
|
"category": "props"
|
|
@@ -55537,7 +55540,10 @@
|
|
|
55537
55540
|
{
|
|
55538
55541
|
"name": "densityButtonProps",
|
|
55539
55542
|
"description": "Props to forward to the density button.",
|
|
55540
|
-
"type":
|
|
55543
|
+
"type": [
|
|
55544
|
+
"GridToolbarDensitySelectorProps",
|
|
55545
|
+
"GridToolbarDensitySelectorProps & RefAttributes<HTMLButtonElement>"
|
|
55546
|
+
],
|
|
55541
55547
|
"required": false,
|
|
55542
55548
|
"defaultValue": null,
|
|
55543
55549
|
"category": "props"
|
|
@@ -55751,8 +55757,8 @@
|
|
|
55751
55757
|
},
|
|
55752
55758
|
{
|
|
55753
55759
|
"name": "dataGridApiRef",
|
|
55754
|
-
"description": "Datagrid API Ref.",
|
|
55755
|
-
"type": "MutableRefObject<
|
|
55760
|
+
"description": "Datagrid API Ref. MUI v8: can be null initially.",
|
|
55761
|
+
"type": "MutableRefObject<GridApiPremium | null>",
|
|
55756
55762
|
"required": false,
|
|
55757
55763
|
"defaultValue": null,
|
|
55758
55764
|
"category": "props"
|
package/data/docs/llms-full.txt
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This file contains comprehensive documentation for all components in the Red Sift Design System.
|
|
4
4
|
It is optimized for LLM consumption and includes props, types, defaults, and usage examples.
|
|
5
5
|
|
|
6
|
-
Generated: 2026-04-
|
|
6
|
+
Generated: 2026-04-01T15:04:59.437Z
|
|
7
7
|
Total Components: 228
|
|
8
8
|
|
|
9
9
|
---
|
|
@@ -6034,10 +6034,10 @@ For `boolean` columns, use `type: 'boolean'` directly (no createColumn wrapper n
|
|
|
6034
6034
|
| toolbar | ReactNode | No | - | Toolbar. A default one is provided but every button from this default Toolbar can be customized and the entire Toolbar can be replaced. |
|
|
6035
6035
|
| hideToolbar | false \| true | No | - | Whether the Toolbar is displayed or not. |
|
|
6036
6036
|
| paginationPlacement | "top" \| "bottom" \| "both" \| "none" | No | 'both' | Indicates how to display pagination. |
|
|
6037
|
-
| paginationProps | Omit<TablePaginationProps, "paginationMode" \| "component" \| "
|
|
6037
|
+
| paginationProps | Omit<TablePaginationProps, "paginationMode" \| "component" \| "count" \| "onPageChange" \| "onRowsPerPageChange" \| "page" \| "rowsPerPage" \| "rowsPerPageOptions"> | No | - | Props to forward to the pagination component. |
|
|
6038
6038
|
| theme | "light" \| "dark" | No | - | Theme. |
|
|
6039
|
-
|
|
|
6040
|
-
|
|
|
6039
|
+
| getTreeDataPath | (row: any) => readonly string[] | No | - | 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. @template R @param row The row from which we want the path. @returns The path to the row. |
|
|
6040
|
+
| setTreeDataPath | (path: string[], row: any) => any | No | - | Updates the tree path in a row model. Used when reordering rows across different parents in tree data. @template R @param path The new path for the row. @param row The row model to update. @returns The updated row model with the new path. |
|
|
6041
6041
|
|
|
6042
6042
|
---
|
|
6043
6043
|
|
|
@@ -6053,7 +6053,7 @@ The GridToolbarFilterSemanticField component.
|
|
|
6053
6053
|
| Prop | Type | Required | Default | Description |
|
|
6054
6054
|
|------|------|----------|---------|-------------|
|
|
6055
6055
|
| nlpFilterConfig | FilterConfig | Yes | - | |
|
|
6056
|
-
| onFilterModelChange | (filterModel: GridFilterModel) => void |
|
|
6056
|
+
| onFilterModelChange | (filterModel: GridFilterModel) => void | No | - | |
|
|
6057
6057
|
| dateFormat | string | No | - | |
|
|
6058
6058
|
| defaultModel | string | No | - | |
|
|
6059
6059
|
| defaultFilter | CompletionResponse | No | - | |
|
|
@@ -6092,10 +6092,10 @@ Use when users need persistent table preferences. Requires unique `localStorageK
|
|
|
6092
6092
|
| toolbar | ReactNode | No | - | Toolbar. A default one is provided but every button from this default Toolbar can be customized and the entire Toolbar can be replaced. |
|
|
6093
6093
|
| hideToolbar | false \| true | No | - | Whether the Toolbar is displayed or not. |
|
|
6094
6094
|
| paginationPlacement | "top" \| "bottom" \| "both" \| "none" | No | 'both' | Indicates how to display pagination. |
|
|
6095
|
-
| paginationProps | Omit<TablePaginationProps, "paginationMode" \| "component" \| "
|
|
6095
|
+
| paginationProps | Omit<TablePaginationProps, "paginationMode" \| "component" \| "count" \| "onPageChange" \| "onRowsPerPageChange" \| "page" \| "rowsPerPage" \| "rowsPerPageOptions"> | No | - | Props to forward to the pagination component. |
|
|
6096
6096
|
| theme | "light" \| "dark" | No | - | Theme. |
|
|
6097
|
-
|
|
|
6098
|
-
|
|
|
6097
|
+
| getTreeDataPath | (row: any) => readonly string[] | No | - | 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. @template R @param row The row from which we want the path. @returns The path to the row. |
|
|
6098
|
+
| setTreeDataPath | (path: string[], row: any) => any | No | - | Updates the tree path in a row model. Used when reordering rows across different parents in tree data. @template R @param path The new path for the row. @param row The row model to update. @returns The updated row model with the new path. |
|
|
6099
6099
|
|
|
6100
6100
|
---
|
|
6101
6101
|
|
|
@@ -6130,9 +6130,9 @@ The Cell component.
|
|
|
6130
6130
|
|
|
6131
6131
|
| Prop | Type | Required | Default | Description |
|
|
6132
6132
|
|------|------|----------|---------|-------------|
|
|
6133
|
-
| columnsButtonProps |
|
|
6133
|
+
| columnsButtonProps | GridToolbarColumnsButtonProps \| GridToolbarColumnsButtonProps & RefAttributes<HTMLButtonElement> | No | - | Props to forward to the column button. |
|
|
6134
6134
|
| columnsButtonRef | RefObject<HTMLButtonElement> | No | - | Column button ref. |
|
|
6135
|
-
| densityButtonProps |
|
|
6135
|
+
| densityButtonProps | GridToolbarDensitySelectorProps \| GridToolbarDensitySelectorProps & RefAttributes<HTMLButtonElement> | No | - | Props to forward to the density button. |
|
|
6136
6136
|
| densityButtonRef | RefObject<HTMLButtonElement> | No | - | Density button ref. |
|
|
6137
6137
|
| exportButtonProps | GridToolbarExportProps | No | - | Props to forward to the export button. |
|
|
6138
6138
|
| exportButtonRef | RefObject<HTMLButtonElement> | No | - | Export button ref. |
|
|
@@ -6205,7 +6205,7 @@ When one chart is filtered, all connected charts update automatically.
|
|
|
6205
6205
|
| Prop | Type | Required | Default | Description |
|
|
6206
6206
|
|------|------|----------|---------|-------------|
|
|
6207
6207
|
| data | JSONArray | Yes | - | Dataset that will be share across every components within the dashboard. |
|
|
6208
|
-
| dataGridApiRef | MutableRefObject<
|
|
6208
|
+
| dataGridApiRef | MutableRefObject<GridApiPremium \| null> | No | - | Datagrid API Ref. MUI v8: can be null initially. |
|
|
6209
6209
|
|
|
6210
6210
|
---
|
|
6211
6211
|
|
|
@@ -7879,7 +7879,7 @@ Each pattern describes a common UI scenario, the components involved, how they a
|
|
|
7879
7879
|
## Datagrid Page
|
|
7880
7880
|
**Description:** Full-page MUI DataGrid with built-in Toolbar (columns, filters, density, export, quick search). Uses GridColDef[] with createColumn() for typed filter operators (string, number, date, singleSelect, multiSelect, tags), renderCell with TextCell and Pill, pagination, and checkboxSelection. All filtering, sorting, and pagination happen client-side — all rows are loaded into the DataGrid at once. Optionally includes bulk selection actions (rowSelectionModel + onRowSelectionModelChange). For server-side data handling, see the Server Datagrid Page pattern. Matches the table pattern used across OnDMARC, Certificates, and Brand Trust.
|
|
7881
7881
|
**Components:** DataGrid, TextCell, StatefulDataGrid, Pill, Button, Flexbox, Text, Badge, Icon, IconButton, IconButtonLink
|
|
7882
|
-
**Packages:** @redsift/table, @redsift/design-system, @mui/x-data-grid-
|
|
7882
|
+
**Packages:** @redsift/table, @redsift/design-system, @mui/x-data-grid-premium
|
|
7883
7883
|
**Layout:** DataGrid with autoHeight, pagination, pageSize, built-in Toolbar via componentsProps.toolbar.showQuickFilter. Optional bulk actions bar when selectionModel.length > 0.
|
|
7884
7884
|
**Tags:** table, datagrid, list, pagination, filter, toolbar, bulk-actions, GridColDef, filterModel, checkboxSelection, client-side
|
|
7885
7885
|
|
|
@@ -7967,7 +7967,7 @@ type Row = {
|
|
|
7967
7967
|
## Server Datagrid Page
|
|
7968
7968
|
**Description:** Full-page MUI DataGrid where filtering, sorting, and pagination are all handled server-side. Uses paginationMode='server', sortingMode='server', filterMode='server' with controlled rowCount and loading props. The same column types and toolbar as the client-side Datagrid Page pattern, but only the current page of data is fetched per request. Filter changes are debounced to avoid excessive requests. Ideal for datasets too large to load entirely in the browser.
|
|
7969
7969
|
**Components:** DataGrid, TextCell, Pill, Button, Flexbox, Text, Badge, Icon, IconButton, IconButtonLink
|
|
7970
|
-
**Packages:** @redsift/table, @redsift/design-system, @mui/x-data-grid-
|
|
7970
|
+
**Packages:** @redsift/table, @redsift/design-system, @mui/x-data-grid-premium
|
|
7971
7971
|
**Layout:** DataGrid with autoHeight, paginationMode='server', sortingMode='server', filterMode='server', rowCount, loading, built-in Toolbar. Optional bulk actions bar when selectionModel.length > 0.
|
|
7972
7972
|
**Tags:** table, datagrid, server-side, pagination, paginationMode, filterMode, sortingMode, loading, rowCount, filter, toolbar, bulk-actions, GridColDef, filterModel, sortModel, debounce
|
|
7973
7973
|
|
|
@@ -8083,7 +8083,7 @@ type FetchResult = {
|
|
|
8083
8083
|
## Drilldown Datagrid Page
|
|
8084
8084
|
**Description:** Extends the Datagrid Page with summary DataCards placed above the grid. Each DataCard contains DataRows showing aggregate counts for a field (status, category, active). Clicking a DataRow adds an isAnyOf filter to the DataGrid — a one-click shortcut. This is a one-way interaction: DataCard counts always reflect the full (unfiltered) dataset. When the user sets an is or isNot filter via the filter panel, the DataCard selection clears and clicking a DataRow overwrites with isAnyOf.
|
|
8085
8085
|
**Components:** DataGrid, TextCell, DataCard, DataCard.Header, DataCard.Body, DataCard.Listbox, DataRow, Pill, Button, Flexbox, Text, Icon, IconButtonLink
|
|
8086
|
-
**Packages:** @redsift/table, @redsift/design-system, @redsift/dashboard, @mui/x-data-grid-
|
|
8086
|
+
**Packages:** @redsift/table, @redsift/design-system, @redsift/dashboard, @mui/x-data-grid-premium
|
|
8087
8087
|
**Layout:** Flexbox column: DataCard row (Flexbox gap=12px flexWrap=wrap with 1-N DataCards), then DataGrid with autoHeight, pagination, controlled filterModel + onFilterModelChange. Optional bulk actions bar when selectionModel.length > 0.
|
|
8088
8088
|
**Tags:** table, datagrid, datacard, drilldown, drilldown-item, filter, isAnyOf, summary-cards, kpi, one-way, filterModel, client-side
|
|
8089
8089
|
|
|
@@ -8178,7 +8178,7 @@ type AggregateCounts = {
|
|
|
8178
8178
|
## Cross-filtered Datagrid Page
|
|
8179
8179
|
**Description:** Extends the Drilldown Datagrid Page with two-way synchronization between DataCards and the DataGrid filter panel. DataRow clicks add isAnyOf filters. Filter panel changes update DataCard selection state. DataCard counts recalculate against the cross-filtered dataset — each card computes counts by applying all filters except its own field, preventing a card from zeroing out its non-selected values. When the user sets is/isNot via the filter panel, the DataCard clears. Clicking a DataRow overwrites with isAnyOf.
|
|
8180
8180
|
**Components:** DataGrid, TextCell, DataCard, DataCard.Header, DataCard.Body, DataCard.Listbox, DataRow, Pill, Button, Flexbox, Text, Icon, IconButtonLink
|
|
8181
|
-
**Packages:** @redsift/table, @redsift/design-system, @redsift/dashboard, @mui/x-data-grid-
|
|
8181
|
+
**Packages:** @redsift/table, @redsift/design-system, @redsift/dashboard, @mui/x-data-grid-premium
|
|
8182
8182
|
**Layout:** Flexbox column: DataCard row (cross-filtered counts), then DataGrid with autoHeight, pagination, controlled filterModel + onFilterModelChange. Rows are pre-filtered client-side via applyFilters. Optional bulk actions bar.
|
|
8183
8183
|
**Tags:** table, datagrid, datacard, drilldown, drilldown-item, cross-filter, crossfilter, two-way, bidirectional, filter, isAnyOf, summary-cards, kpi, dashboard, filterModel, client-side
|
|
8184
8184
|
|
|
@@ -8309,7 +8309,7 @@ import { DataGrid } from '@redsift/table';
|
|
|
8309
8309
|
import { Flexbox } from '@redsift/design-system';
|
|
8310
8310
|
import { DataCard, DataRow } from '@redsift/dashboard';
|
|
8311
8311
|
import { mdiShapeOutline, mdiToggleSwitch, mdiFoodOff } from '@redsift/icons';
|
|
8312
|
-
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-
|
|
8312
|
+
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
8313
8313
|
import { Row } from '../_shared/data';
|
|
8314
8314
|
import { columns, CATEGORY_OPTIONS, ALLERGEN_OPTIONS } from '../_shared/columns';
|
|
8315
8315
|
import { fetchBakeryData, FetchResult } from '../_shared/api-client';
|
|
@@ -8584,9 +8584,9 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
8584
8584
|
import { DataGrid } from '@redsift/table';
|
|
8585
8585
|
import { Flexbox } from '@redsift/design-system';
|
|
8586
8586
|
import { DataCard, DataRow } from '@redsift/dashboard';
|
|
8587
|
-
import { BarChart, PieChart } from '@redsift/charts';
|
|
8587
|
+
import { BarChart, PieChart, ArcDatum, BarDatum } from '@redsift/charts';
|
|
8588
8588
|
import { mdiShapeOutline, mdiToggleSwitch, mdiFoodOff } from '@redsift/icons';
|
|
8589
|
-
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-
|
|
8589
|
+
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
8590
8590
|
import { Row } from '../_shared/data';
|
|
8591
8591
|
import { columns, CATEGORY_OPTIONS, ALLERGEN_OPTIONS } from '../_shared/columns';
|
|
8592
8592
|
import { fetchBakeryData, FetchResult } from '../_shared/api-client';
|
|
@@ -8789,8 +8789,8 @@ export default () => {
|
|
|
8789
8789
|
}}
|
|
8790
8790
|
data={itemsChartData}
|
|
8791
8791
|
sliceRole="option"
|
|
8792
|
-
onSliceClick={(datum:
|
|
8793
|
-
const key = datum.data.key
|
|
8792
|
+
onSliceClick={(datum: ArcDatum) => {
|
|
8793
|
+
const key = datum.data.key;
|
|
8794
8794
|
setFilterModel((prev) => {
|
|
8795
8795
|
const selected = getSelectedFromFilterModel(prev, 'Items');
|
|
8796
8796
|
const next = selected.includes(key) ? selected.filter((v) => v !== key) : [...selected, key];
|
|
@@ -8798,8 +8798,8 @@ export default () => {
|
|
|
8798
8798
|
});
|
|
8799
8799
|
setPage(0);
|
|
8800
8800
|
}}
|
|
8801
|
-
isSliceSelected={(datum:
|
|
8802
|
-
itemsSelection.length === 0 || itemsSelection.includes(datum.data.key
|
|
8801
|
+
isSliceSelected={(datum: ArcDatum) =>
|
|
8802
|
+
itemsSelection.length === 0 || itemsSelection.includes(datum.data.key)
|
|
8803
8803
|
}
|
|
8804
8804
|
/>
|
|
8805
8805
|
|
|
@@ -8820,8 +8820,8 @@ export default () => {
|
|
|
8820
8820
|
barProps={{ gap: 20, width: 60 }}
|
|
8821
8821
|
data={tagsChartData}
|
|
8822
8822
|
barRole="option"
|
|
8823
|
-
onBarClick={(datum:
|
|
8824
|
-
const key = datum.data.key
|
|
8823
|
+
onBarClick={(datum: BarDatum) => {
|
|
8824
|
+
const key = String(datum.data.key);
|
|
8825
8825
|
setFilterModel((prev) => {
|
|
8826
8826
|
const selected = getSelectedFromFilterModel(prev, 'Tags');
|
|
8827
8827
|
const next = selected.includes(key) ? selected.filter((v) => v !== key) : [...selected, key];
|
|
@@ -8829,8 +8829,8 @@ export default () => {
|
|
|
8829
8829
|
});
|
|
8830
8830
|
setPage(0);
|
|
8831
8831
|
}}
|
|
8832
|
-
isBarSelected={(datum:
|
|
8833
|
-
tagsSelection.length === 0 || tagsSelection.includes(datum.data.key
|
|
8832
|
+
isBarSelected={(datum: BarDatum) =>
|
|
8833
|
+
tagsSelection.length === 0 || tagsSelection.includes(String(datum.data.key))
|
|
8834
8834
|
}
|
|
8835
8835
|
/>
|
|
8836
8836
|
</Flexbox>
|
|
@@ -9008,7 +9008,7 @@ export default () => {
|
|
|
9008
9008
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
9009
9009
|
import { DataGrid } from '@redsift/table';
|
|
9010
9010
|
import { Flexbox, Pill, Number, Text, Tabs, Tab } from '@redsift/design-system';
|
|
9011
|
-
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-
|
|
9011
|
+
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
9012
9012
|
import { Row } from '../_shared/data';
|
|
9013
9013
|
import { columns, CATEGORY_OPTIONS } from '../_shared/columns';
|
|
9014
9014
|
import { fetchBakeryData } from '../_shared/api-client';
|
package/data/docs/llms.txt
CHANGED
|
@@ -284,10 +284,10 @@ Proven component groupings for common UI scenarios, extracted from production ap
|
|
|
284
284
|
|
|
285
285
|
| Pattern | Components | Packages |
|
|
286
286
|
|---------|-----------|----------|
|
|
287
|
-
| Datagrid Page | DataGrid, TextCell, StatefulDataGrid, Pill, Button, Flexbox, Text, Badge, Icon, IconButton, IconButtonLink | @redsift/table, @redsift/design-system, @mui/x-data-grid-
|
|
288
|
-
| Server Datagrid Page | DataGrid, TextCell, Pill, Button, Flexbox, Text, Badge, Icon, IconButton, IconButtonLink | @redsift/table, @redsift/design-system, @mui/x-data-grid-
|
|
289
|
-
| Drilldown Datagrid Page | DataGrid, TextCell, DataCard, DataCard.Header, DataCard.Body, DataCard.Listbox, DataRow, Pill, Button, Flexbox, Text, Icon, IconButtonLink | @redsift/table, @redsift/design-system, @redsift/dashboard, @mui/x-data-grid-
|
|
290
|
-
| Cross-filtered Datagrid Page | DataGrid, TextCell, DataCard, DataCard.Header, DataCard.Body, DataCard.Listbox, DataRow, Pill, Button, Flexbox, Text, Icon, IconButtonLink | @redsift/table, @redsift/design-system, @redsift/dashboard, @mui/x-data-grid-
|
|
287
|
+
| Datagrid Page | DataGrid, TextCell, StatefulDataGrid, Pill, Button, Flexbox, Text, Badge, Icon, IconButton, IconButtonLink | @redsift/table, @redsift/design-system, @mui/x-data-grid-premium |
|
|
288
|
+
| Server Datagrid Page | DataGrid, TextCell, Pill, Button, Flexbox, Text, Badge, Icon, IconButton, IconButtonLink | @redsift/table, @redsift/design-system, @mui/x-data-grid-premium |
|
|
289
|
+
| Drilldown Datagrid Page | DataGrid, TextCell, DataCard, DataCard.Header, DataCard.Body, DataCard.Listbox, DataRow, Pill, Button, Flexbox, Text, Icon, IconButtonLink | @redsift/table, @redsift/design-system, @redsift/dashboard, @mui/x-data-grid-premium |
|
|
290
|
+
| Cross-filtered Datagrid Page | DataGrid, TextCell, DataCard, DataCard.Header, DataCard.Body, DataCard.Listbox, DataRow, Pill, Button, Flexbox, Text, Icon, IconButtonLink | @redsift/table, @redsift/design-system, @redsift/dashboard, @mui/x-data-grid-premium |
|
|
291
291
|
| Server Drilldown Datagrid Page | DataGrid, TextCell, DataCard, DataRow, Flexbox, Pill, Icon | @redsift/table, @redsift/dashboard, @redsift/design-system, @mui/x-data-grid-pro |
|
|
292
292
|
| Server Cross-filtered Datagrid Page | DataGrid, TextCell, DataCard, DataRow, Flexbox, Pill, Icon | @redsift/table, @redsift/dashboard, @redsift/design-system, @mui/x-data-grid-pro |
|
|
293
293
|
| Tabbed Datagrid Page | DataGrid, TextCell, Tabs, Tab, Flexbox, Pill, Number | @redsift/table, @redsift/design-system |
|
|
@@ -27,7 +27,7 @@ These patterns serve as implementation specs — they give LLMs and developers e
|
|
|
27
27
|
2. DataGrid — the table itself, configured with autoHeight, pagination, checkboxSelection, and GridColDef[] columns
|
|
28
28
|
3. Bulk Action Bar — Flexbox row shown when selectionModel.length > 0, with Pill (count) and action Buttons
|
|
29
29
|
|
|
30
|
-
**Key imports:** `DataGrid`, `TextCell`, `StatefulDataGrid` from `@redsift/table`; `GridColDef`, `GridFilterModel`, `GridRowSelectionModel` from `@mui/x-data-grid-
|
|
30
|
+
**Key imports:** `DataGrid`, `TextCell`, `StatefulDataGrid` from `@redsift/table`; `GridColDef`, `GridFilterModel`, `GridRowSelectionModel` from `@mui/x-data-grid-premium`; `Pill`, `Button`, `Flexbox` from `@redsift/design-system`
|
|
31
31
|
**Components:** DataGrid, TextCell, StatefulDataGrid (from @redsift/table), Flexbox, Button, Pill, Text, Badge, Icon, IconButton, IconButtonLink (from @redsift/design-system)
|
|
32
32
|
**Layout:** DataGrid with `autoHeight`, `pagination`, `pageSize`, built-in Toolbar (Columns | Filters | Density | Export | Search via `componentsProps.toolbar.showQuickFilter`). Columns use `GridColDef[]` with `createColumn()` for typed filter operators (e.g. `...createColumn('string')`, `...createColumn('number')`, `...createColumn('singleSelect')`), `renderCell` returning `TextCell`, `Pill`, `Badge`. Optional bulk actions bar above grid shown when `selectionModel.length > 0`.
|
|
33
33
|
|
|
@@ -98,7 +98,7 @@ type Row = {
|
|
|
98
98
|
2. DataGrid — the table configured with paginationMode='server', sortingMode='server', filterMode='server', loading, and rowCount
|
|
99
99
|
3. Bulk Action Bar — Flexbox row shown when selectionModel.length > 0, with Pill (count) and action Buttons
|
|
100
100
|
|
|
101
|
-
**Key imports:** `DataGrid`, `TextCell` from `@redsift/table`; `GridColDef`, `GridFilterModel`, `GridSortModel`, `GridSelectionModel` from `@mui/x-data-grid-
|
|
101
|
+
**Key imports:** `DataGrid`, `TextCell` from `@redsift/table`; `GridColDef`, `GridFilterModel`, `GridSortModel`, `GridSelectionModel` from `@mui/x-data-grid-premium`; `Pill`, `Button`, `Flexbox`, `Icon`, `IconButtonLink` from `@redsift/design-system`
|
|
102
102
|
**Components:** DataGrid, TextCell (from @redsift/table), Flexbox, Button, Pill, Text, Badge, Icon, IconButton, IconButtonLink (from @redsift/design-system)
|
|
103
103
|
**Layout:** DataGrid with `autoHeight`, `paginationMode="server"`, `sortingMode="server"`, `filterMode="server"`, `rowCount`, `loading`, built-in Toolbar (Columns | Filters | Density | Export | Search). Same column types as Datagrid Page.
|
|
104
104
|
|
|
@@ -206,7 +206,7 @@ type FetchResult = {
|
|
|
206
206
|
3. DataGrid — the table with controlled filterModel + onFilterModelChange
|
|
207
207
|
4. Bulk Action Bar — Flexbox row shown when selectionModel.length > 0, with Pill (count) and action Buttons
|
|
208
208
|
|
|
209
|
-
**Key imports:** `DataGrid`, `TextCell` from `@redsift/table`; `DataCard`, `DrilldownItem` from `@redsift/dashboard`; `GridColDef`, `GridFilterModel` from `@mui/x-data-grid-
|
|
209
|
+
**Key imports:** `DataGrid`, `TextCell` from `@redsift/table`; `DataCard`, `DrilldownItem` from `@redsift/dashboard`; `GridColDef`, `GridFilterModel` from `@mui/x-data-grid-premium`; `Pill`, `Button`, `Flexbox`, `Icon` from `@redsift/design-system`
|
|
210
210
|
**Components:** DataGrid, TextCell (from @redsift/table), DataCard, DataCard.Header, DataCard.Body, DataCard.Listbox, DrilldownItem (from @redsift/dashboard), Flexbox, Button, Pill, Text, Icon, IconButtonLink (from @redsift/design-system)
|
|
211
211
|
**Layout:** Flexbox column: DataCard row (Flexbox gap=12px flexWrap=wrap with 1-N DataCards), then DataGrid with autoHeight, pagination, controlled filterModel + onFilterModelChange. Optional bulk actions bar.
|
|
212
212
|
|
|
@@ -292,7 +292,7 @@ type AggregateCounts = {
|
|
|
292
292
|
3. DataGrid — the table with controlled filterModel + onFilterModelChange. Rows are pre-filtered client-side
|
|
293
293
|
4. Bulk Action Bar — Flexbox row shown when selectionModel.length > 0, with Pill (count) and action Buttons
|
|
294
294
|
|
|
295
|
-
**Key imports:** `DataGrid`, `TextCell` from `@redsift/table`; `DataCard`, `DrilldownItem` from `@redsift/dashboard`; `GridColDef`, `GridFilterModel` from `@mui/x-data-grid-
|
|
295
|
+
**Key imports:** `DataGrid`, `TextCell` from `@redsift/table`; `DataCard`, `DrilldownItem` from `@redsift/dashboard`; `GridColDef`, `GridFilterModel` from `@mui/x-data-grid-premium`; `Pill`, `Button`, `Flexbox`, `Icon` from `@redsift/design-system`
|
|
296
296
|
**Components:** DataGrid, TextCell (from @redsift/table), DataCard, DataCard.Header, DataCard.Body, DataCard.Listbox, DrilldownItem (from @redsift/dashboard), Flexbox, Button, Pill, Text, Icon, IconButtonLink (from @redsift/design-system)
|
|
297
297
|
**Layout:** Flexbox column: DataCard row (cross-filtered counts), then DataGrid with autoHeight, pagination, controlled filterModel + onFilterModelChange. Rows are pre-filtered client-side via applyFilters. Optional bulk actions bar.
|
|
298
298
|
|
package/data/docs/patterns.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"IconButton",
|
|
17
17
|
"IconButtonLink"
|
|
18
18
|
],
|
|
19
|
-
"packages": ["@redsift/table", "@redsift/design-system", "@mui/x-data-grid-
|
|
19
|
+
"packages": ["@redsift/table", "@redsift/design-system", "@mui/x-data-grid-premium"],
|
|
20
20
|
"layout": "DataGrid with autoHeight, pagination, pageSize, built-in Toolbar via componentsProps.toolbar.showQuickFilter. Optional bulk actions bar when selectionModel.length > 0.",
|
|
21
21
|
"tags": [
|
|
22
22
|
"table",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"IconButton",
|
|
168
168
|
"IconButtonLink"
|
|
169
169
|
],
|
|
170
|
-
"packages": ["@redsift/table", "@redsift/design-system", "@mui/x-data-grid-
|
|
170
|
+
"packages": ["@redsift/table", "@redsift/design-system", "@mui/x-data-grid-premium"],
|
|
171
171
|
"layout": "DataGrid with autoHeight, paginationMode='server', sortingMode='server', filterMode='server', rowCount, loading, built-in Toolbar. Optional bulk actions bar when selectionModel.length > 0.",
|
|
172
172
|
"tags": [
|
|
173
173
|
"table",
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
"Icon",
|
|
375
375
|
"IconButtonLink"
|
|
376
376
|
],
|
|
377
|
-
"packages": ["@redsift/table", "@redsift/design-system", "@redsift/dashboard", "@mui/x-data-grid-
|
|
377
|
+
"packages": ["@redsift/table", "@redsift/design-system", "@redsift/dashboard", "@mui/x-data-grid-premium"],
|
|
378
378
|
"layout": "Flexbox column: DataCard row (Flexbox gap=12px flexWrap=wrap with 1-N DataCards), then DataGrid with autoHeight, pagination, controlled filterModel + onFilterModelChange. Optional bulk actions bar when selectionModel.length > 0.",
|
|
379
379
|
"tags": [
|
|
380
380
|
"table",
|
|
@@ -542,7 +542,7 @@
|
|
|
542
542
|
"Icon",
|
|
543
543
|
"IconButtonLink"
|
|
544
544
|
],
|
|
545
|
-
"packages": ["@redsift/table", "@redsift/design-system", "@redsift/dashboard", "@mui/x-data-grid-
|
|
545
|
+
"packages": ["@redsift/table", "@redsift/design-system", "@redsift/dashboard", "@mui/x-data-grid-premium"],
|
|
546
546
|
"layout": "Flexbox column: DataCard row (cross-filtered counts), then DataGrid with autoHeight, pagination, controlled filterModel + onFilterModelChange. Rows are pre-filtered client-side via applyFilters. Optional bulk actions bar.",
|
|
547
547
|
"tags": [
|
|
548
548
|
"table",
|
package/data/metadata.json
CHANGED
|
@@ -99,7 +99,7 @@ When **not** to use:
|
|
|
99
99
|
## State Management
|
|
100
100
|
|
|
101
101
|
<CodeBlock codeString={`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
102
|
-
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-
|
|
102
|
+
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
103
103
|
|
|
104
104
|
// Server-driven state
|
|
105
105
|
const [rows, setRows] = useState<Row[]>([]);
|
|
@@ -114,7 +114,7 @@ When **not** to use:
|
|
|
114
114
|
## State Management
|
|
115
115
|
|
|
116
116
|
<CodeBlock codeString={`import { useCallback, useMemo, useState } from 'react';
|
|
117
|
-
import { GridFilterModel } from '@mui/x-data-grid-
|
|
117
|
+
import { GridFilterModel } from '@mui/x-data-grid-premium';
|
|
118
118
|
|
|
119
119
|
// Filter state — controlled, shared between DataCards and DataGrid
|
|
120
120
|
const [filterModel, setFilterModel] = useState<GridFilterModel>({ items: [] });
|
|
@@ -91,7 +91,7 @@ When **not** to use:
|
|
|
91
91
|
## State Management
|
|
92
92
|
|
|
93
93
|
<CodeBlock codeString={`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
94
|
-
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-
|
|
94
|
+
import { GridFilterModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
95
95
|
|
|
96
96
|
// Server-driven state
|
|
97
97
|
const [rows, setRows] = useState<Row[]>([]);
|
|
@@ -33,7 +33,7 @@ When **not** to use:
|
|
|
33
33
|
|
|
34
34
|
1. **Toolbar** — `Flexbox` wrapping MUI's `GridToolbarContainer` with `GridToolbarFilterButton`, `GridToolbarColumnsButton`, `GridToolbarDensitySelector`, `GridToolbarExport`, and `GridToolbarQuickFilter`
|
|
35
35
|
2. **DataGrid** — the table itself from `@redsift/table`, configured with `autoHeight`, `pagination`, `checkboxSelection`, and `GridColDef[]` columns
|
|
36
|
-
3. **Bulk Action Bar** — a `Flexbox` row shown when
|
|
36
|
+
3. **Bulk Action Bar** — a `Flexbox` row shown when rows are selected, containing a `Pill` with the selection count and action `Button` components
|
|
37
37
|
|
|
38
38
|
## Features
|
|
39
39
|
|
|
@@ -124,10 +124,10 @@ When **not** to use:
|
|
|
124
124
|
## State Management
|
|
125
125
|
|
|
126
126
|
<CodeBlock codeString={`import { useState } from 'react';
|
|
127
|
-
import {
|
|
127
|
+
import { GridRowSelectionModel } from '@mui/x-data-grid-premium';
|
|
128
128
|
|
|
129
129
|
// Selection state — tracks which rows are checked
|
|
130
|
-
const [selectionModel, setSelectionModel] = useState<
|
|
130
|
+
const [selectionModel, setSelectionModel] = useState<GridRowSelectionModel>([]);
|
|
131
131
|
|
|
132
132
|
// Page size — controlled if you need to persist it
|
|
133
133
|
// (DataGrid manages page/pageSize internally for client-side mode)
|
|
@@ -149,7 +149,7 @@ type Row = {
|
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
// Column definitions — use createColumn() for built-in filter operators
|
|
152
|
-
import { GridColDef } from '@mui/x-data-grid-
|
|
152
|
+
import { GridColDef } from '@mui/x-data-grid-premium';
|
|
153
153
|
import { createColumn } from '@redsift/table';
|
|
154
154
|
|
|
155
155
|
const columns: GridColDef[] = [
|
|
@@ -184,9 +184,9 @@ When data fetching fails, replace the DataGrid area with an error message and a
|
|
|
184
184
|
1. **Define your row type** — Create a TypeScript `type Row` per the Data Contract section. Every row must have a unique `id` field.
|
|
185
185
|
2. **Define column definitions** — Create a `GridColDef[]` array. Use `createColumn()` (e.g. `...createColumn('string')`, `...createColumn('number')`, `...createColumn('singleSelect')`, `...createColumn('multiSelect')`) for built-in filter operators. Add `renderCell` for rich content (pills, icons, links).
|
|
186
186
|
3. **Create the toolbar** — Build a `CustomToolbar` component using `GridToolbarContainer` with `GridToolbarFilterButton`, `GridToolbarColumnsButton`, `GridToolbarDensitySelector`, `GridToolbarExport`, and optionally `GridToolbarQuickFilter`.
|
|
187
|
-
4. **Set up state** — Add `useState<
|
|
188
|
-
5. **Render the DataGrid** — Pass `rows`, `columns`, `autoHeight`, `pagination`, `pageSize`, `rowsPerPageOptions`, `checkboxSelection`, `
|
|
189
|
-
6. **Add bulk action bar** — Conditionally render a `Flexbox` with a `Pill` (selection count) and action `Button` components when
|
|
187
|
+
4. **Set up state** — Add `useState<GridRowSelectionModel>` for checkbox selection (if needed).
|
|
188
|
+
5. **Render the DataGrid** — Pass `rows`, `columns`, `autoHeight`, `pagination`, `pageSize`, `rowsPerPageOptions`, `checkboxSelection`, `slots={{ toolbar: CustomToolbar }}`.
|
|
189
|
+
6. **Add bulk action bar** — Conditionally render a `Flexbox` with a `Pill` (selection count) and action `Button` components when rows are selected.
|
|
190
190
|
7. **Handle edge cases** — Add loading state (`loading` prop), empty state (custom `NoRowsOverlay`), and error state (conditional render with retry).
|
|
191
191
|
8. **Verify** — Test pagination breakpoints, filter operators, column visibility toggle, density switching, and export.
|
|
192
192
|
|
|
@@ -34,7 +34,7 @@ When **not** to use:
|
|
|
34
34
|
|
|
35
35
|
1. **Toolbar** — `Flexbox` wrapping MUI's `GridToolbarContainer` with `GridToolbarFilterButton`, `GridToolbarColumnsButton`, `GridToolbarDensitySelector`, `GridToolbarExport`, and `GridToolbarQuickFilter`
|
|
36
36
|
2. **DataGrid** — the table configured with `paginationMode="server"`, `sortingMode="server"`, `filterMode="server"`, `loading`, and `rowCount`
|
|
37
|
-
3. **Bulk Action Bar** — a `Flexbox` row shown when
|
|
37
|
+
3. **Bulk Action Bar** — a `Flexbox` row shown when rows are selected, containing a `Pill` with the selection count and action `Button` components
|
|
38
38
|
|
|
39
39
|
## Features
|
|
40
40
|
|
|
@@ -101,8 +101,8 @@ When **not** to use:
|
|
|
101
101
|
required: true,
|
|
102
102
|
description: (
|
|
103
103
|
<>
|
|
104
|
-
<code>GridColDef[]</code> with
|
|
105
|
-
<code>
|
|
104
|
+
<code>GridColDef[]</code> with <code>createColumn()</code>: <code>createColumn('string')</code>, <code>createColumn('number')</code>,{' '}
|
|
105
|
+
<code>createColumn('singleSelect')</code>, <code>createColumn('multiSelect')</code>
|
|
106
106
|
</>
|
|
107
107
|
),
|
|
108
108
|
},
|
|
@@ -159,7 +159,7 @@ When **not** to use:
|
|
|
159
159
|
## State Management
|
|
160
160
|
|
|
161
161
|
<CodeBlock codeString={`import { useCallback, useEffect, useRef, useState } from 'react';
|
|
162
|
-
import { GridFilterModel,
|
|
162
|
+
import { GridFilterModel, GridRowSelectionModel, GridSortModel } from '@mui/x-data-grid-premium';
|
|
163
163
|
|
|
164
164
|
// Data state — rows returned from the server for the current page
|
|
165
165
|
const [rows, setRows] = useState<Row[]>([]);
|
|
@@ -175,7 +175,7 @@ const [sortModel, setSortModel] = useState<GridSortModel>([]);
|
|
|
175
175
|
const [filterModel, setFilterModel] = useState<GridFilterModel>({ items: [] });
|
|
176
176
|
|
|
177
177
|
// Selection state
|
|
178
|
-
const [selectionModel, setSelectionModel] = useState<
|
|
178
|
+
const [selectionModel, setSelectionModel] = useState<GridRowSelectionModel>([]);
|
|
179
179
|
|
|
180
180
|
// Quick search
|
|
181
181
|
const [quickFilterText, setQuickFilterText] = useState('');
|
|
@@ -263,13 +263,13 @@ The fetch function rejects with an error. The component shows an error banner ab
|
|
|
263
263
|
|
|
264
264
|
1. **Define your row type** — Create a TypeScript `type Row` per the Data Contract section. Every row must have a unique `id` field.
|
|
265
265
|
2. **Create your fetch function** — Implement an async function matching the `FetchParams → FetchResult` contract. This is where you call your API or ElasticSearch. If using React Query, wrap it in a `useQuery` hook with `[page, pageSize, sortModel, filterModel, quickFilterText]` as the query key.
|
|
266
|
-
3. **Define column definitions** — Create a `GridColDef[]` array. Use
|
|
266
|
+
3. **Define column definitions** — Create a `GridColDef[]` array. Use `createColumn()` (e.g. `...createColumn('string')`, `...createColumn('number')`, `...createColumn('singleSelect')`, `...createColumn('multiSelect')`) for built-in filter operators. Add `renderCell` for rich content.
|
|
267
267
|
4. **Create the toolbar** — Build a `CustomToolbar` component using `GridToolbarContainer` with filter, columns, density, export, and quick search controls.
|
|
268
268
|
5. **Set up state** — Add all hooks from the State Management section: `rows`, `totalRows`, `loading`, `page`, `pageSize`, `sortModel`, `filterModel`, `selectionModel`, `quickFilterText`, and the debounce ref.
|
|
269
269
|
6. **Wire the fetch effect** — Use `useEffect` to call your fetch function whenever `page`, `pageSize`, `sortModel`, `filterModel`, or `quickFilterText` changes.
|
|
270
270
|
7. **Configure the DataGrid** — Pass `paginationMode="server"`, `sortingMode="server"`, `filterMode="server"`, `loading`, `rowCount={totalRows}`, and all controlled state handlers (`onPageChange`, `onPageSizeChange`, `onSortModelChange`, `onFilterModelChange`).
|
|
271
271
|
8. **Debounce filter changes** — Use a 300ms `setTimeout` in `onFilterModelChange` to avoid excessive requests during rapid typing. Reset to page 0 on filter change.
|
|
272
|
-
9. **Add bulk action bar** — Conditionally render when
|
|
272
|
+
9. **Add bulk action bar** — Conditionally render when rows are selected.
|
|
273
273
|
10. **Handle edge cases** — Add loading state (`loading` prop), empty state (custom `NoRowsOverlay`), and error state (conditional render with retry).
|
|
274
274
|
11. **Verify** — Test page navigation, sort toggling, filter operators, debounced quick search, loading overlay, empty results, and error recovery.
|
|
275
275
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redsift/ds-mcp-server",
|
|
3
|
-
"version": "12.4.0
|
|
3
|
+
"version": "12.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "MCP server for the Red Sift Design System — provides component lookup, prop documentation, and code generation tools for AI assistants.",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "restricted"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "01c485a1a597cdec0af3bb199675dcb7577a26e4"
|
|
39
39
|
}
|