wip:milestone 0 fixes
Some checks failed
CI/CD Pipeline / unit-tests (push) Failing after 1m16s
CI/CD Pipeline / integration-tests (push) Failing after 2m32s
CI/CD Pipeline / lint (push) Successful in 5m22s
CI/CD Pipeline / e2e-tests (push) Has been skipped
CI/CD Pipeline / build (push) Has been skipped

This commit is contained in:
2026-03-15 12:35:42 +02:00
parent 6708cf28a7
commit cffdf8af86
61266 changed files with 4511646 additions and 1938 deletions

View File

@@ -0,0 +1,29 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import { GridSkeletonCell, GridColumnsPanel, GridFilterPanel, GridFooter, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridPreferencesPanel, GridRow, GridColumnHeaderFilterIconButton, GridRowCount } from '../components';
import { GridCellV7 } from '../components/cell/GridCell';
import { GridColumnHeaders } from '../components/GridColumnHeaders';
import { GridColumnMenu } from '../components/menu/columnMenu/GridColumnMenu';
import { GridNoResultsOverlay } from '../components/GridNoResultsOverlay';
import materialSlots from '../material';
// TODO: camelCase these key. It's a private helper now.
// Remove then need to call `uncapitalizeObjectKeys`.
export var DATA_GRID_DEFAULT_SLOTS_COMPONENTS = _extends({}, materialSlots, {
Cell: GridCellV7,
SkeletonCell: GridSkeletonCell,
ColumnHeaderFilterIconButton: GridColumnHeaderFilterIconButton,
ColumnMenu: GridColumnMenu,
ColumnHeaders: GridColumnHeaders,
Footer: GridFooter,
FooterRowCount: GridRowCount,
Toolbar: null,
PreferencesPanel: GridPreferencesPanel,
LoadingOverlay: GridLoadingOverlay,
NoResultsOverlay: GridNoResultsOverlay,
NoRowsOverlay: GridNoRowsOverlay,
Pagination: GridPagination,
FilterPanel: GridFilterPanel,
ColumnsPanel: GridColumnsPanel,
Panel: GridPanel,
Row: GridRow
});

View File

@@ -0,0 +1,19 @@
// A guide to feature toggling (deprecated)
//
// The feature toggle is:
// - independent from the NODE_ENV
// - isn't pruning code in production, as the objective is to eventually ship the code.
// - doesn't allow to cherry-pick which feature to enable
//
// By default, the experimental features are only enabled in:
// - the local environment
// - the pull request previews
//
// Reviewers can force the value with the local storage and the GRID_EXPERIMENTAL_ENABLED key:
// - 'true' => force it to be enabled
// - 'false' => force it to be disabled
//
// Developers (users) are discouraged to enable the experimental feature by setting the GRID_EXPERIMENTAL_ENABLED env.
// Instead, prefer exposing experimental APIs, for instance, a prop or a new `unstable_` module.
export var GRID_EXPERIMENTAL_ENABLED = false;

View File

@@ -0,0 +1,5 @@
import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_generateUtilityClass as generateUtilityClass } from '@mui/utils';
export function getDataGridUtilityClass(slot) {
return generateUtilityClass('MuiDataGrid', slot);
}
export var gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--selectionMode', 'cell', 'cellContent', 'cellCheckbox', 'cellSkeleton', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnGroupHeader', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeader--showColumnBorder', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'pinnedColumns--left', 'pinnedColumns--right', 'pinnedColumnHeaders', 'pinnedColumnHeaders--left', 'pinnedColumnHeaders--right', 'withBorderColor', 'cell--withRightBorder', 'columnHeader--withRightBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);

View File

@@ -0,0 +1,2 @@
// Can't import from pro package - hence duplication
export var GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';

View File

@@ -0,0 +1,3 @@
export * from './envConstants';
export * from './localeTextConstants';
export * from './gridClasses';

View File

@@ -0,0 +1,160 @@
export var GRID_DEFAULT_LOCALE_TEXT = {
// Root
noRowsLabel: 'No rows',
noResultsOverlayLabel: 'No results found.',
// Density selector toolbar button text
toolbarDensity: 'Density',
toolbarDensityLabel: 'Density',
toolbarDensityCompact: 'Compact',
toolbarDensityStandard: 'Standard',
toolbarDensityComfortable: 'Comfortable',
// Columns selector toolbar button text
toolbarColumns: 'Columns',
toolbarColumnsLabel: 'Select columns',
// Filters toolbar button text
toolbarFilters: 'Filters',
toolbarFiltersLabel: 'Show filters',
toolbarFiltersTooltipHide: 'Hide filters',
toolbarFiltersTooltipShow: 'Show filters',
toolbarFiltersTooltipActive: function toolbarFiltersTooltipActive(count) {
return count !== 1 ? "".concat(count, " active filters") : "".concat(count, " active filter");
},
// Quick filter toolbar field
toolbarQuickFilterPlaceholder: 'Search…',
toolbarQuickFilterLabel: 'Search',
toolbarQuickFilterDeleteIconLabel: 'Clear',
// Export selector toolbar button text
toolbarExport: 'Export',
toolbarExportLabel: 'Export',
toolbarExportCSV: 'Download as CSV',
toolbarExportPrint: 'Print',
toolbarExportExcel: 'Download as Excel',
// Columns panel text
columnsPanelTextFieldLabel: 'Find column',
columnsPanelTextFieldPlaceholder: 'Column title',
columnsPanelDragIconLabel: 'Reorder column',
columnsPanelShowAllButton: 'Show all',
columnsPanelHideAllButton: 'Hide all',
// Filter panel text
filterPanelAddFilter: 'Add filter',
filterPanelRemoveAll: 'Remove all',
filterPanelDeleteIconLabel: 'Delete',
filterPanelLogicOperator: 'Logic operator',
filterPanelOperator: 'Operator',
filterPanelOperatorAnd: 'And',
filterPanelOperatorOr: 'Or',
filterPanelColumns: 'Columns',
filterPanelInputLabel: 'Value',
filterPanelInputPlaceholder: 'Filter value',
// Filter operators text
filterOperatorContains: 'contains',
filterOperatorEquals: 'equals',
filterOperatorStartsWith: 'starts with',
filterOperatorEndsWith: 'ends with',
filterOperatorIs: 'is',
filterOperatorNot: 'is not',
filterOperatorAfter: 'is after',
filterOperatorOnOrAfter: 'is on or after',
filterOperatorBefore: 'is before',
filterOperatorOnOrBefore: 'is on or before',
filterOperatorIsEmpty: 'is empty',
filterOperatorIsNotEmpty: 'is not empty',
filterOperatorIsAnyOf: 'is any of',
'filterOperator=': '=',
'filterOperator!=': '!=',
'filterOperator>': '>',
'filterOperator>=': '>=',
'filterOperator<': '<',
'filterOperator<=': '<=',
// Header filter operators text
headerFilterOperatorContains: 'Contains',
headerFilterOperatorEquals: 'Equals',
headerFilterOperatorStartsWith: 'Starts with',
headerFilterOperatorEndsWith: 'Ends with',
headerFilterOperatorIs: 'Is',
headerFilterOperatorNot: 'Is not',
headerFilterOperatorAfter: 'Is after',
headerFilterOperatorOnOrAfter: 'Is on or after',
headerFilterOperatorBefore: 'Is before',
headerFilterOperatorOnOrBefore: 'Is on or before',
headerFilterOperatorIsEmpty: 'Is empty',
headerFilterOperatorIsNotEmpty: 'Is not empty',
headerFilterOperatorIsAnyOf: 'Is any of',
'headerFilterOperator=': 'Equals',
'headerFilterOperator!=': 'Not equals',
'headerFilterOperator>': 'Greater than',
'headerFilterOperator>=': 'Greater than or equal to',
'headerFilterOperator<': 'Less than',
'headerFilterOperator<=': 'Less than or equal to',
// Filter values text
filterValueAny: 'any',
filterValueTrue: 'true',
filterValueFalse: 'false',
// Column menu text
columnMenuLabel: 'Menu',
columnMenuShowColumns: 'Show columns',
columnMenuManageColumns: 'Manage columns',
columnMenuFilter: 'Filter',
columnMenuHideColumn: 'Hide column',
columnMenuUnsort: 'Unsort',
columnMenuSortAsc: 'Sort by ASC',
columnMenuSortDesc: 'Sort by DESC',
// Column header text
columnHeaderFiltersTooltipActive: function columnHeaderFiltersTooltipActive(count) {
return count !== 1 ? "".concat(count, " active filters") : "".concat(count, " active filter");
},
columnHeaderFiltersLabel: 'Show filters',
columnHeaderSortIconLabel: 'Sort',
// Rows selected footer text
footerRowSelected: function footerRowSelected(count) {
return count !== 1 ? "".concat(count.toLocaleString(), " rows selected") : "".concat(count.toLocaleString(), " row selected");
},
// Total row amount footer text
footerTotalRows: 'Total Rows:',
// Total visible row amount footer text
footerTotalVisibleRows: function footerTotalVisibleRows(visibleCount, totalCount) {
return "".concat(visibleCount.toLocaleString(), " of ").concat(totalCount.toLocaleString());
},
// Checkbox selection text
checkboxSelectionHeaderName: 'Checkbox selection',
checkboxSelectionSelectAllRows: 'Select all rows',
checkboxSelectionUnselectAllRows: 'Unselect all rows',
checkboxSelectionSelectRow: 'Select row',
checkboxSelectionUnselectRow: 'Unselect row',
// Boolean cell text
booleanCellTrueLabel: 'yes',
booleanCellFalseLabel: 'no',
// Actions cell more text
actionsCellMore: 'more',
// Column pinning text
pinToLeft: 'Pin to left',
pinToRight: 'Pin to right',
unpin: 'Unpin',
// Tree Data
treeDataGroupingHeaderName: 'Group',
treeDataExpand: 'see children',
treeDataCollapse: 'hide children',
// Grouping columns
groupingColumnHeaderName: 'Group',
groupColumn: function groupColumn(name) {
return "Group by ".concat(name);
},
unGroupColumn: function unGroupColumn(name) {
return "Stop grouping by ".concat(name);
},
// Master/detail
detailPanelToggle: 'Detail panel toggle',
expandDetailPanel: 'Expand',
collapseDetailPanel: 'Collapse',
// Used core components translation keys
MuiTablePagination: {},
// Row reordering text
rowReorderingHeaderName: 'Row reordering',
// Aggregation
aggregationMenuItemHeader: 'Aggregation',
aggregationFunctionLabelSum: 'sum',
aggregationFunctionLabelAvg: 'avg',
aggregationFunctionLabelMin: 'min',
aggregationFunctionLabelMax: 'max',
aggregationFunctionLabelSize: 'size'
};