@mui/x-data-grid-premium 7.22.3 → 8.0.0-alpha.1
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/CHANGELOG.md +348 -12
- package/README.md +4 -4
- package/components/GridColumnMenuAggregationItem.js +4 -6
- package/components/GridColumnMenuRowGroupItem.js +1 -2
- package/components/GridColumnMenuRowUngroupItem.js +2 -3
- package/components/GridExcelExportMenuItem.js +3 -2
- package/components/index.d.ts +1 -0
- package/components/index.js +12 -0
- package/components/promptControl/GridToolbarPromptControl.d.ts +26 -0
- package/components/promptControl/GridToolbarPromptControl.js +209 -0
- package/components/promptControl/RecordButton.d.ts +16 -0
- package/components/promptControl/RecordButton.js +119 -0
- package/components/promptControl/index.d.ts +1 -0
- package/components/promptControl/index.js +12 -0
- package/esm/components/GridColumnMenuAggregationItem.js +4 -6
- package/esm/components/GridColumnMenuRowGroupItem.js +1 -2
- package/esm/components/GridColumnMenuRowUngroupItem.js +2 -3
- package/esm/components/GridExcelExportMenuItem.js +3 -2
- package/esm/components/index.js +1 -0
- package/esm/components/promptControl/GridToolbarPromptControl.js +202 -0
- package/esm/components/promptControl/RecordButton.js +111 -0
- package/esm/components/promptControl/index.js +1 -0
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +2 -1
- package/esm/hooks/features/index.js +2 -1
- package/esm/hooks/features/promptControl/api.js +22 -0
- package/esm/hooks/features/promptControl/index.js +1 -0
- package/esm/hooks/features/promptControl/types.js +1 -0
- package/esm/material/icons.js +7 -1
- package/esm/material/index.js +4 -2
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +1 -0
- package/hooks/features/cellSelection/useGridCellSelection.js +7 -6
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +11 -0
- package/hooks/features/promptControl/api.d.ts +2 -0
- package/hooks/features/promptControl/api.js +28 -0
- package/hooks/features/promptControl/index.d.ts +2 -0
- package/hooks/features/promptControl/index.js +12 -0
- package/hooks/features/promptControl/types.d.ts +25 -0
- package/hooks/features/promptControl/types.js +5 -0
- package/index.js +1 -1
- package/material/icons.d.ts +6 -0
- package/material/icons.js +8 -2
- package/material/index.d.ts +2 -0
- package/material/index.js +3 -1
- package/models/gridPremiumIconSlotsComponent.d.ts +10 -0
- package/modern/components/GridColumnMenuAggregationItem.js +4 -6
- package/modern/components/GridColumnMenuRowGroupItem.js +1 -2
- package/modern/components/GridColumnMenuRowUngroupItem.js +2 -3
- package/modern/components/GridExcelExportMenuItem.js +3 -2
- package/modern/components/index.js +1 -0
- package/modern/components/promptControl/GridToolbarPromptControl.js +202 -0
- package/modern/components/promptControl/RecordButton.js +111 -0
- package/modern/components/promptControl/index.js +1 -0
- package/modern/hooks/features/cellSelection/useGridCellSelection.js +2 -1
- package/modern/hooks/features/index.js +2 -1
- package/modern/hooks/features/promptControl/api.js +22 -0
- package/modern/hooks/features/promptControl/index.js +1 -0
- package/modern/hooks/features/promptControl/types.js +1 -0
- package/modern/index.js +1 -1
- package/modern/material/icons.js +7 -1
- package/modern/material/index.js +4 -2
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +8 -8
- package/utils/releaseInfo.js +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
5
|
+
import useEventCallback from '@mui/utils/useEventCallback';
|
|
6
|
+
import { getDataGridUtilityClass, GRID_CHECKBOX_SELECTION_FIELD, gridColumnDefinitionsSelector, gridColumnLookupSelector, GridLogicOperator, gridRowsLookupSelector } from '@mui/x-data-grid';
|
|
7
|
+
import { getValueOptions, getVisibleRows } from '@mui/x-data-grid/internals';
|
|
8
|
+
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
9
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
|
+
import { RecordButton, BrowserSpeechRecognition } from "./RecordButton.js";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
const supportsSpeechRecognition = !!BrowserSpeechRecognition;
|
|
13
|
+
const useUtilityClasses = (ownerState, recording) => {
|
|
14
|
+
const {
|
|
15
|
+
classes
|
|
16
|
+
} = ownerState;
|
|
17
|
+
const slots = {
|
|
18
|
+
root: ['toolbarPromptControl', recording && 'toolbarPromptControl--recording'],
|
|
19
|
+
recordingIndicator: ['toolbarPromptControlRecordingIndicator'],
|
|
20
|
+
recordButton: ['toolbarPromptControlRecordButton'],
|
|
21
|
+
sendButton: ['toolbarPromptControlSendButton']
|
|
22
|
+
};
|
|
23
|
+
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
24
|
+
};
|
|
25
|
+
const GridToolbarPromptControlRoot = styled('div', {
|
|
26
|
+
name: 'MuiDataGrid',
|
|
27
|
+
slot: 'ToolbarPromptControl',
|
|
28
|
+
overridesResolver: (_, styles) => styles.toolbarPromptControl
|
|
29
|
+
})({
|
|
30
|
+
flex: 1,
|
|
31
|
+
display: 'flex',
|
|
32
|
+
flexDirection: 'row'
|
|
33
|
+
});
|
|
34
|
+
function sampleData(apiRef) {
|
|
35
|
+
const columns = gridColumnDefinitionsSelector(apiRef);
|
|
36
|
+
const rows = Object.values(gridRowsLookupSelector(apiRef));
|
|
37
|
+
const columnExamples = {};
|
|
38
|
+
columns.forEach(column => {
|
|
39
|
+
columnExamples[column.field] = Array.from({
|
|
40
|
+
length: Math.min(5, rows.length)
|
|
41
|
+
}).map(() => {
|
|
42
|
+
const row = rows[Math.floor(Math.random() * rows.length)];
|
|
43
|
+
if (column.valueGetter) {
|
|
44
|
+
return column.valueGetter(row[column.field], row, column, apiRef);
|
|
45
|
+
}
|
|
46
|
+
return row[column.field];
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
return columnExamples;
|
|
50
|
+
}
|
|
51
|
+
function generateContext(apiRef, examples) {
|
|
52
|
+
const columns = gridColumnDefinitionsSelector(apiRef);
|
|
53
|
+
const columnsContext = columns.map(column => ({
|
|
54
|
+
field: column.field,
|
|
55
|
+
description: column.description ?? null,
|
|
56
|
+
examples: examples?.[column.field] ?? column.unstable_examples ?? [],
|
|
57
|
+
type: column.type ?? 'string',
|
|
58
|
+
allowedOperators: column.filterOperators?.map(operator => operator.value) ?? []
|
|
59
|
+
}));
|
|
60
|
+
return `The columns are described by the following JSON:\n${JSON.stringify(columnsContext)}`;
|
|
61
|
+
}
|
|
62
|
+
function GridToolbarPromptControl(props) {
|
|
63
|
+
const apiRef = useGridApiContext();
|
|
64
|
+
const rootProps = useGridRootProps();
|
|
65
|
+
const {
|
|
66
|
+
onPrompt,
|
|
67
|
+
lang,
|
|
68
|
+
allowDataSampling = false
|
|
69
|
+
} = props;
|
|
70
|
+
const [isLoading, setLoading] = React.useState(false);
|
|
71
|
+
const [error, setError] = React.useState(null);
|
|
72
|
+
const [isRecording, setRecording] = React.useState(false);
|
|
73
|
+
const [query, setQuery] = React.useState('');
|
|
74
|
+
const classes = useUtilityClasses(rootProps, isRecording);
|
|
75
|
+
const examplesFromData = React.useMemo(() => allowDataSampling ? sampleData(apiRef) : undefined, [apiRef, allowDataSampling]);
|
|
76
|
+
const processPrompt = React.useCallback(() => {
|
|
77
|
+
const context = generateContext(apiRef, examplesFromData);
|
|
78
|
+
const columnsByField = gridColumnLookupSelector(apiRef);
|
|
79
|
+
setLoading(true);
|
|
80
|
+
setError(null);
|
|
81
|
+
apiRef.current.setLoading(true);
|
|
82
|
+
onPrompt(context, query).then(result => {
|
|
83
|
+
const interestColumns = [];
|
|
84
|
+
apiRef.current.setFilterModel({
|
|
85
|
+
items: result.filters.map((filter, index) => {
|
|
86
|
+
const item = {
|
|
87
|
+
id: index,
|
|
88
|
+
field: filter.column,
|
|
89
|
+
operator: filter.operator,
|
|
90
|
+
value: filter.value
|
|
91
|
+
};
|
|
92
|
+
const column = columnsByField[filter.column];
|
|
93
|
+
if (column.type === 'singleSelect') {
|
|
94
|
+
const options = getValueOptions(column) ?? [];
|
|
95
|
+
const found = options.find(option => typeof option === 'object' && option.label === filter.value);
|
|
96
|
+
if (found) {
|
|
97
|
+
item.value = found.value;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return item;
|
|
101
|
+
}),
|
|
102
|
+
logicOperator: result.filterOperator ?? GridLogicOperator.And,
|
|
103
|
+
quickFilterValues: []
|
|
104
|
+
});
|
|
105
|
+
apiRef.current.setRowGroupingModel(result.grouping.map(g => g.column));
|
|
106
|
+
apiRef.current.setAggregationModel(result.aggregation);
|
|
107
|
+
apiRef.current.setSortModel(result.sorting.map(s => ({
|
|
108
|
+
field: s.column,
|
|
109
|
+
sort: s.direction
|
|
110
|
+
})));
|
|
111
|
+
const rows = getVisibleRows(apiRef, rootProps);
|
|
112
|
+
const selectedRowIds = result.select === -1 ? [] : rows.rows.slice(0, result.select).map(r => {
|
|
113
|
+
return apiRef.current.getRowId(r);
|
|
114
|
+
});
|
|
115
|
+
apiRef.current.setRowSelectionModel(selectedRowIds);
|
|
116
|
+
const columns = apiRef.current.getAllColumns();
|
|
117
|
+
const targetIndex = Number(columns.find(c => c.field === GRID_CHECKBOX_SELECTION_FIELD) !== undefined) + Number(result.grouping.length);
|
|
118
|
+
interestColumns.push(...Object.keys(result.aggregation));
|
|
119
|
+
interestColumns.push(...result.filters.map(f => f.column));
|
|
120
|
+
interestColumns.reverse().forEach(c => apiRef.current.setColumnIndex(c, targetIndex));
|
|
121
|
+
}).catch(_ => {
|
|
122
|
+
setError(apiRef.current.getLocaleText('toolbarPromptControlErrorMessage'));
|
|
123
|
+
}).finally(() => {
|
|
124
|
+
setLoading(false);
|
|
125
|
+
apiRef.current.setState(state => _extends({}, state, {
|
|
126
|
+
rows: _extends({}, state.rows, {
|
|
127
|
+
loading: false
|
|
128
|
+
})
|
|
129
|
+
}));
|
|
130
|
+
});
|
|
131
|
+
}, [apiRef, rootProps, onPrompt, examplesFromData, query]);
|
|
132
|
+
const handleChange = useEventCallback(event => {
|
|
133
|
+
setQuery(event.target.value);
|
|
134
|
+
});
|
|
135
|
+
const handleKeyDown = useEventCallback(event => {
|
|
136
|
+
if (event.code === 'Enter') {
|
|
137
|
+
processPrompt();
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
const handleDone = useEventCallback(value => {
|
|
141
|
+
setQuery(value);
|
|
142
|
+
if (value) {
|
|
143
|
+
processPrompt();
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
const placeholder = supportsSpeechRecognition ? apiRef.current.getLocaleText('toolbarPromptControlWithRecordingPlaceholder') : apiRef.current.getLocaleText('toolbarPromptControlPlaceholder');
|
|
147
|
+
return /*#__PURE__*/_jsx(GridToolbarPromptControlRoot, {
|
|
148
|
+
ownerState: rootProps,
|
|
149
|
+
className: classes.root,
|
|
150
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.baseTextField, {
|
|
151
|
+
variant: "outlined",
|
|
152
|
+
placeholder: isRecording ? apiRef.current.getLocaleText('toolbarPromptControlRecordingPlaceholder') : placeholder,
|
|
153
|
+
"aria-label": apiRef.current.getLocaleText('toolbarPromptControlLabel'),
|
|
154
|
+
disabled: isLoading,
|
|
155
|
+
value: query,
|
|
156
|
+
style: {
|
|
157
|
+
flex: 1
|
|
158
|
+
},
|
|
159
|
+
onChange: handleChange,
|
|
160
|
+
size: "small",
|
|
161
|
+
onKeyDown: handleKeyDown,
|
|
162
|
+
error: !!error,
|
|
163
|
+
helperText: error,
|
|
164
|
+
InputProps: {
|
|
165
|
+
startAdornment: supportsSpeechRecognition && /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {
|
|
166
|
+
position: "start",
|
|
167
|
+
children: /*#__PURE__*/_jsx(RecordButton, {
|
|
168
|
+
className: classes.recordButton,
|
|
169
|
+
lang: lang,
|
|
170
|
+
recording: isRecording,
|
|
171
|
+
setRecording: setRecording,
|
|
172
|
+
disabled: isLoading,
|
|
173
|
+
onUpdate: setQuery,
|
|
174
|
+
onDone: handleDone,
|
|
175
|
+
onError: setError
|
|
176
|
+
})
|
|
177
|
+
}),
|
|
178
|
+
endAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {
|
|
179
|
+
position: "end",
|
|
180
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {
|
|
181
|
+
title: apiRef.current.getLocaleText('toolbarPromptControlSendActionLabel'),
|
|
182
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
183
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, {
|
|
184
|
+
className: classes.sendButton,
|
|
185
|
+
disabled: isLoading || isRecording || query === '',
|
|
186
|
+
color: "primary",
|
|
187
|
+
onClick: processPrompt,
|
|
188
|
+
size: "small",
|
|
189
|
+
"aria-label": apiRef.current.getLocaleText('toolbarPromptControlSendActionAriaLabel'),
|
|
190
|
+
edge: "end",
|
|
191
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.toolbarPromptSendIcon, {
|
|
192
|
+
fontSize: "small"
|
|
193
|
+
})
|
|
194
|
+
})
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
})
|
|
198
|
+
}
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
export { GridToolbarPromptControl };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Timeout } from '@mui/utils/useTimeout';
|
|
3
|
+
import useLazyRef from '@mui/utils/useLazyRef';
|
|
4
|
+
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
5
|
+
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const BrowserSpeechRecognition = globalThis.SpeechRecognition || globalThis.webkitSpeechRecognition;
|
|
8
|
+
function RecordButton(props) {
|
|
9
|
+
const apiRef = useGridApiContext();
|
|
10
|
+
const rootProps = useGridRootProps();
|
|
11
|
+
const {
|
|
12
|
+
lang,
|
|
13
|
+
recording,
|
|
14
|
+
setRecording,
|
|
15
|
+
disabled,
|
|
16
|
+
className,
|
|
17
|
+
onDone,
|
|
18
|
+
onUpdate,
|
|
19
|
+
onError
|
|
20
|
+
} = props;
|
|
21
|
+
const buttonRef = React.useRef(null);
|
|
22
|
+
const recognition = useLazyRef(() => {
|
|
23
|
+
if (!BrowserSpeechRecognition) {
|
|
24
|
+
return {
|
|
25
|
+
start: () => {},
|
|
26
|
+
abort: () => {}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const timeout = new Timeout();
|
|
30
|
+
const instance = new BrowserSpeechRecognition();
|
|
31
|
+
instance.continuous = true;
|
|
32
|
+
instance.interimResults = true;
|
|
33
|
+
instance.lang = lang;
|
|
34
|
+
let finalResult = '';
|
|
35
|
+
let interimResult = '';
|
|
36
|
+
function start(options) {
|
|
37
|
+
if (recording) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
setRecording(true);
|
|
41
|
+
instance.onresult = event => {
|
|
42
|
+
finalResult = '';
|
|
43
|
+
interimResult = '';
|
|
44
|
+
if (typeof event.results === 'undefined') {
|
|
45
|
+
instance.stop();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
for (let i = event.resultIndex; i < event.results.length; i += 1) {
|
|
49
|
+
if (event.results[i].isFinal) {
|
|
50
|
+
finalResult += event.results[i][0].transcript;
|
|
51
|
+
} else {
|
|
52
|
+
interimResult += event.results[i][0].transcript;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (finalResult === '') {
|
|
56
|
+
options.onUpdate(interimResult);
|
|
57
|
+
}
|
|
58
|
+
timeout.start(1000, () => instance.stop());
|
|
59
|
+
};
|
|
60
|
+
instance.onsoundend = () => {
|
|
61
|
+
instance.stop();
|
|
62
|
+
};
|
|
63
|
+
instance.onend = () => {
|
|
64
|
+
options.onDone(finalResult);
|
|
65
|
+
setRecording(false);
|
|
66
|
+
};
|
|
67
|
+
instance.onerror = error => {
|
|
68
|
+
options.onError(error.message);
|
|
69
|
+
instance.stop();
|
|
70
|
+
setRecording(false);
|
|
71
|
+
};
|
|
72
|
+
instance.start();
|
|
73
|
+
}
|
|
74
|
+
function abort() {
|
|
75
|
+
instance.abort();
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
start,
|
|
79
|
+
abort
|
|
80
|
+
};
|
|
81
|
+
}).current;
|
|
82
|
+
const handleClick = () => {
|
|
83
|
+
if (!recording) {
|
|
84
|
+
recognition.start({
|
|
85
|
+
onDone,
|
|
86
|
+
onUpdate,
|
|
87
|
+
onError
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
recognition.abort();
|
|
92
|
+
};
|
|
93
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {
|
|
94
|
+
title: recording ? apiRef.current.getLocaleText('toolbarPromptControlRecordButtonActiveLabel') : apiRef.current.getLocaleText('toolbarPromptControlRecordButtonDefaultLabel'),
|
|
95
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
96
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, {
|
|
97
|
+
color: recording ? 'primary' : 'default',
|
|
98
|
+
className: className,
|
|
99
|
+
disabled: disabled,
|
|
100
|
+
onClick: handleClick,
|
|
101
|
+
ref: buttonRef,
|
|
102
|
+
size: "small",
|
|
103
|
+
edge: "start",
|
|
104
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.toolbarPromptRecordIcon, {
|
|
105
|
+
fontSize: "small"
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
export { RecordButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GridToolbarPromptControl as Unstable_GridToolbarPromptControl } from "./GridToolbarPromptControl.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import ownerDocument from '@mui/utils/ownerDocument';
|
|
4
|
+
import useEventCallback from '@mui/utils/useEventCallback';
|
|
4
5
|
import { getTotalHeaderHeight, getVisibleRows, isNavigationKey, serializeCellValue, useGridRegisterPipeProcessor, useGridVisibleRows } from '@mui/x-data-grid-pro/internals';
|
|
5
6
|
import { useGridApiEventHandler, useGridApiMethod, GRID_ACTIONS_COLUMN_TYPE, GRID_CHECKBOX_SELECTION_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD, gridRowsDataRowIdToIdLookupSelector, gridClasses, gridFocusCellSelector, GRID_REORDER_COL_DEF, useGridSelector, gridSortedRowIdsSelector, gridDimensionsSelector } from '@mui/x-data-grid-pro';
|
|
6
7
|
import { gridCellSelectionStateSelector } from "./gridCellSelectionSelector.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function gridDefaultPromptResolver(url, context, query) {
|
|
2
|
+
return fetch(url, {
|
|
3
|
+
mode: 'cors',
|
|
4
|
+
method: 'POST',
|
|
5
|
+
headers: {
|
|
6
|
+
'content-type': 'application/json'
|
|
7
|
+
},
|
|
8
|
+
credentials: 'include',
|
|
9
|
+
body: JSON.stringify({
|
|
10
|
+
context,
|
|
11
|
+
query
|
|
12
|
+
})
|
|
13
|
+
}).then(result => result.json()).then(result => {
|
|
14
|
+
if (result.ok === false) {
|
|
15
|
+
return Promise.reject(new Error(result.message));
|
|
16
|
+
}
|
|
17
|
+
if (result.data.error) {
|
|
18
|
+
return Promise.reject(new Error(result.data.error));
|
|
19
|
+
}
|
|
20
|
+
return result.data;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { gridDefaultPromptResolver as unstable_gridDefaultPromptResolver } from "./api.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/modern/index.js
CHANGED
package/modern/material/icons.js
CHANGED
|
@@ -11,4 +11,10 @@ export const GridGroupWorkIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
|
11
11
|
}), 'GroupWork');
|
|
12
12
|
export const GridFunctionsIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
13
13
|
d: "M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z"
|
|
14
|
-
}), 'Functions');
|
|
14
|
+
}), 'Functions');
|
|
15
|
+
export const GridSendPromptIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
16
|
+
d: "M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"
|
|
17
|
+
}), 'SendPrompt');
|
|
18
|
+
export const GridRecordPromptIcon = createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
19
|
+
d: "M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3m5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72z"
|
|
20
|
+
}), 'RecordPrompt');
|
package/modern/material/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { GridWorkspacesIcon, GridGroupWorkIcon, GridFunctionsIcon } from "./icons.js";
|
|
2
|
+
import { GridWorkspacesIcon, GridGroupWorkIcon, GridFunctionsIcon, GridSendPromptIcon, GridRecordPromptIcon } from "./icons.js";
|
|
3
3
|
const iconsSlots = {
|
|
4
4
|
columnMenuUngroupIcon: GridWorkspacesIcon,
|
|
5
5
|
columnMenuGroupIcon: GridGroupWorkIcon,
|
|
6
|
-
columnMenuAggregationIcon: GridFunctionsIcon
|
|
6
|
+
columnMenuAggregationIcon: GridFunctionsIcon,
|
|
7
|
+
toolbarPromptSendIcon: GridSendPromptIcon,
|
|
8
|
+
toolbarPromptRecordIcon: GridRecordPromptIcon
|
|
7
9
|
};
|
|
8
10
|
const materialSlots = _extends({}, iconsSlots);
|
|
9
11
|
export default materialSlots;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTczMjIzMDAwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-alpha.1",
|
|
4
4
|
"description": "The Premium plan edition of the Data Grid Components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -33,25 +33,25 @@
|
|
|
33
33
|
"directory": "packages/x-data-grid-premium"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@babel/runtime": "^7.
|
|
36
|
+
"@babel/runtime": "^7.26.0",
|
|
37
37
|
"@mui/utils": "^5.16.6 || ^6.0.0",
|
|
38
38
|
"@types/format-util": "^1.0.4",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"exceljs": "^4.4.0",
|
|
41
41
|
"prop-types": "^15.8.1",
|
|
42
42
|
"reselect": "^5.1.1",
|
|
43
|
-
"@mui/x-
|
|
44
|
-
"@mui/x-
|
|
45
|
-
"@mui/x-
|
|
46
|
-
"@mui/x-data-grid-pro": "
|
|
43
|
+
"@mui/x-internals": "8.0.0-alpha.1",
|
|
44
|
+
"@mui/x-data-grid": "8.0.0-alpha.1",
|
|
45
|
+
"@mui/x-license": "8.0.0-alpha.1",
|
|
46
|
+
"@mui/x-data-grid-pro": "8.0.0-alpha.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|
|
50
50
|
"@emotion/styled": "^11.8.1",
|
|
51
51
|
"@mui/material": "^5.15.14 || ^6.0.0",
|
|
52
52
|
"@mui/system": "^5.15.14 || ^6.0.0",
|
|
53
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
54
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
53
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
54
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
57
57
|
"@emotion/react": {
|
package/utils/releaseInfo.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getReleaseInfo = void 0;
|
|
7
7
|
var _utils = require("@mui/utils");
|
|
8
8
|
const getReleaseInfo = () => {
|
|
9
|
-
const releaseInfo = "
|
|
9
|
+
const releaseInfo = "MTczMjIzMDAwMDAwMA==";
|
|
10
10
|
if (process.env.NODE_ENV !== 'production') {
|
|
11
11
|
// A simple hack to set the value in the test environment (has no build step).
|
|
12
12
|
// eslint-disable-next-line no-useless-concat
|