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
27092 lines
1.0 MiB
27092 lines
1.0 MiB
import {
|
||
Autocomplete_default,
|
||
Badge_default,
|
||
Box_default,
|
||
Button_default,
|
||
Checkbox_default,
|
||
Chip_default,
|
||
CircularProgress_default,
|
||
ClickAwayListener,
|
||
Divider_default,
|
||
FocusTrap_default,
|
||
FormControlLabel_default,
|
||
FormControl_default,
|
||
Grow_default,
|
||
IconButton_default,
|
||
InputAdornment_default,
|
||
InputBase_default,
|
||
InputLabel_default,
|
||
ListItemIcon_default,
|
||
ListItemText_default,
|
||
MenuItem_default,
|
||
MenuList_default,
|
||
Paper_default,
|
||
Popper_default,
|
||
Select_default,
|
||
Skeleton_default,
|
||
Switch_default,
|
||
TablePagination_default,
|
||
TextField_default,
|
||
Tooltip_default,
|
||
createFilterOptions,
|
||
switchClasses_default,
|
||
tablePaginationClasses_default
|
||
} from "./chunk-JXKN7L4A.js";
|
||
import "./chunk-WDD75YPL.js";
|
||
import {
|
||
useTheme,
|
||
useThemeProps
|
||
} from "./chunk-Y5IG6O7D.js";
|
||
import {
|
||
alpha,
|
||
darken,
|
||
lighten,
|
||
styled_default,
|
||
toPropertyKey
|
||
} from "./chunk-ZHUI7O2A.js";
|
||
import {
|
||
createSvgIcon,
|
||
useId_default
|
||
} from "./chunk-ANTY7EHM.js";
|
||
import "./chunk-4B2NWW42.js";
|
||
import {
|
||
styled_default as styled_default2
|
||
} from "./chunk-JWRIH3ST.js";
|
||
import {
|
||
HTMLElementType,
|
||
_extends,
|
||
_objectWithoutPropertiesLoose,
|
||
capitalize,
|
||
chainPropTypes,
|
||
clsx_default,
|
||
composeClasses,
|
||
debounce,
|
||
generateUtilityClass,
|
||
generateUtilityClasses,
|
||
init_extends,
|
||
ownerDocument,
|
||
ownerWindow,
|
||
refType_default,
|
||
require_prop_types,
|
||
useEnhancedEffect_default,
|
||
useEventCallback_default,
|
||
useForkRef,
|
||
useId
|
||
} from "./chunk-QLKRFDUE.js";
|
||
import {
|
||
require_react_dom
|
||
} from "./chunk-UPELNCPK.js";
|
||
import {
|
||
require_jsx_runtime
|
||
} from "./chunk-WKPQ4ZTV.js";
|
||
import {
|
||
require_react
|
||
} from "./chunk-BG45W2ER.js";
|
||
import {
|
||
__toESM
|
||
} from "./chunk-HXA6O6EE.js";
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridApiContext.js
|
||
var React2 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridApiContext.js
|
||
var React = __toESM(require_react());
|
||
var GridApiContext = React.createContext(void 0);
|
||
if (true) {
|
||
GridApiContext.displayName = "GridApiContext";
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridApiContext.js
|
||
function useGridApiContext() {
|
||
const apiRef = React2.useContext(GridApiContext);
|
||
if (apiRef === void 0) {
|
||
throw new Error(["MUI: Could not find the data grid context.", "It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.", "This can also happen if you are bundling multiple versions of the data grid."].join("\n"));
|
||
}
|
||
return apiRef;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridApiRef.js
|
||
var React3 = __toESM(require_react());
|
||
var useGridApiRef = () => React3.useRef({});
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridRootProps.js
|
||
var React5 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/context/GridRootPropsContext.js
|
||
var React4 = __toESM(require_react());
|
||
var GridRootPropsContext = React4.createContext(void 0);
|
||
if (true) {
|
||
GridRootPropsContext.displayName = "GridRootPropsContext";
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridRootProps.js
|
||
var useGridRootProps = () => {
|
||
const contextValue = React5.useContext(GridRootPropsContext);
|
||
if (!contextValue) {
|
||
throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");
|
||
}
|
||
return contextValue;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/DataGrid/DataGrid.js
|
||
init_extends();
|
||
var React139 = __toESM(require_react());
|
||
var import_prop_types58 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/base/GridBody.js
|
||
init_extends();
|
||
var React11 = __toESM(require_react());
|
||
var import_prop_types = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridPrivateApiContext.js
|
||
var React6 = __toESM(require_react());
|
||
var GridPrivateApiContext = React6.createContext(void 0);
|
||
if (true) {
|
||
GridPrivateApiContext.displayName = "GridPrivateApiContext";
|
||
}
|
||
function useGridPrivateApiContext() {
|
||
const privateApiRef = React6.useContext(GridPrivateApiContext);
|
||
if (privateApiRef === void 0) {
|
||
throw new Error(["MUI: Could not find the data grid private context.", "It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.", "This can also happen if you are bundling multiple versions of the data grid."].join("\n"));
|
||
}
|
||
return privateApiRef;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridSelector.js
|
||
var React9 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useLazyRef.js
|
||
var React7 = __toESM(require_react());
|
||
var UNINITIALIZED = {};
|
||
function useLazyRef(init, initArg) {
|
||
const ref = React7.useRef(UNINITIALIZED);
|
||
if (ref.current === UNINITIALIZED) {
|
||
ref.current = init(initArg);
|
||
}
|
||
return ref;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useOnMount.js
|
||
var React8 = __toESM(require_react());
|
||
var EMPTY = [];
|
||
function useOnMount(fn) {
|
||
React8.useEffect(fn, EMPTY);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/utils/warning.js
|
||
var buildWarning = (message, gravity = "warning") => {
|
||
let alreadyWarned = false;
|
||
const cleanMessage = Array.isArray(message) ? message.join("\n") : message;
|
||
return () => {
|
||
if (!alreadyWarned) {
|
||
alreadyWarned = true;
|
||
if (gravity === "error") {
|
||
console.error(cleanMessage);
|
||
} else {
|
||
console.warn(cleanMessage);
|
||
}
|
||
}
|
||
};
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/utils/fastObjectShallowCompare.js
|
||
var is = Object.is;
|
||
function fastObjectShallowCompare(a, b) {
|
||
if (a === b) {
|
||
return true;
|
||
}
|
||
if (!(a instanceof Object) || !(b instanceof Object)) {
|
||
return false;
|
||
}
|
||
let aLength = 0;
|
||
let bLength = 0;
|
||
for (const key in a) {
|
||
aLength += 1;
|
||
if (!is(a[key], b[key])) {
|
||
return false;
|
||
}
|
||
if (!(key in b)) {
|
||
return false;
|
||
}
|
||
}
|
||
for (const _ in b) {
|
||
bLength += 1;
|
||
}
|
||
return aLength === bLength;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridSelector.js
|
||
var stateNotInitializedWarning = buildWarning(["MUI: `useGridSelector` has been called before the initialization of the state.", "This hook can only be used inside the context of the grid."]);
|
||
function isOutputSelector(selector) {
|
||
return selector.acceptsApiRef;
|
||
}
|
||
function applySelector(apiRef, selector) {
|
||
if (isOutputSelector(selector)) {
|
||
return selector(apiRef);
|
||
}
|
||
return selector(apiRef.current.state);
|
||
}
|
||
var defaultCompare = Object.is;
|
||
var objectShallowCompare = fastObjectShallowCompare;
|
||
var createRefs = () => ({
|
||
state: null,
|
||
equals: null,
|
||
selector: null
|
||
});
|
||
var useGridSelector = (apiRef, selector, equals = defaultCompare) => {
|
||
if (true) {
|
||
if (!apiRef.current.state) {
|
||
stateNotInitializedWarning();
|
||
}
|
||
}
|
||
const refs = useLazyRef(createRefs);
|
||
const didInit = refs.current.selector !== null;
|
||
const [state, setState] = React9.useState(
|
||
// We don't use an initialization function to avoid allocations
|
||
didInit ? null : applySelector(apiRef, selector)
|
||
);
|
||
refs.current.state = state;
|
||
refs.current.equals = equals;
|
||
refs.current.selector = selector;
|
||
useOnMount(() => {
|
||
return apiRef.current.store.subscribe(() => {
|
||
const newState = applySelector(apiRef, refs.current.selector);
|
||
if (!refs.current.equals(refs.current.state, newState)) {
|
||
refs.current.state = newState;
|
||
setState(newState);
|
||
}
|
||
});
|
||
});
|
||
return state;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/components/containers/GridMainContainer.js
|
||
init_extends();
|
||
var React10 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/constants/gridClasses.js
|
||
function getDataGridUtilityClass(slot) {
|
||
return generateUtilityClass("MuiDataGrid", slot);
|
||
}
|
||
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"]);
|
||
|
||
// node_modules/reselect/es/defaultMemoize.js
|
||
var NOT_FOUND = "NOT_FOUND";
|
||
function createSingletonCache(equals) {
|
||
var entry;
|
||
return {
|
||
get: function get(key) {
|
||
if (entry && equals(entry.key, key)) {
|
||
return entry.value;
|
||
}
|
||
return NOT_FOUND;
|
||
},
|
||
put: function put(key, value) {
|
||
entry = {
|
||
key,
|
||
value
|
||
};
|
||
},
|
||
getEntries: function getEntries() {
|
||
return entry ? [entry] : [];
|
||
},
|
||
clear: function clear() {
|
||
entry = void 0;
|
||
}
|
||
};
|
||
}
|
||
function createLruCache(maxSize, equals) {
|
||
var entries = [];
|
||
function get(key) {
|
||
var cacheIndex = entries.findIndex(function(entry2) {
|
||
return equals(key, entry2.key);
|
||
});
|
||
if (cacheIndex > -1) {
|
||
var entry = entries[cacheIndex];
|
||
if (cacheIndex > 0) {
|
||
entries.splice(cacheIndex, 1);
|
||
entries.unshift(entry);
|
||
}
|
||
return entry.value;
|
||
}
|
||
return NOT_FOUND;
|
||
}
|
||
function put(key, value) {
|
||
if (get(key) === NOT_FOUND) {
|
||
entries.unshift({
|
||
key,
|
||
value
|
||
});
|
||
if (entries.length > maxSize) {
|
||
entries.pop();
|
||
}
|
||
}
|
||
}
|
||
function getEntries() {
|
||
return entries;
|
||
}
|
||
function clear() {
|
||
entries = [];
|
||
}
|
||
return {
|
||
get,
|
||
put,
|
||
getEntries,
|
||
clear
|
||
};
|
||
}
|
||
var defaultEqualityCheck = function defaultEqualityCheck2(a, b) {
|
||
return a === b;
|
||
};
|
||
function createCacheKeyComparator(equalityCheck) {
|
||
return function areArgumentsShallowlyEqual(prev, next) {
|
||
if (prev === null || next === null || prev.length !== next.length) {
|
||
return false;
|
||
}
|
||
var length = prev.length;
|
||
for (var i = 0; i < length; i++) {
|
||
if (!equalityCheck(prev[i], next[i])) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
};
|
||
}
|
||
function defaultMemoize(func, equalityCheckOrOptions) {
|
||
var providedOptions = typeof equalityCheckOrOptions === "object" ? equalityCheckOrOptions : {
|
||
equalityCheck: equalityCheckOrOptions
|
||
};
|
||
var _providedOptions$equa = providedOptions.equalityCheck, equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa, _providedOptions$maxS = providedOptions.maxSize, maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS, resultEqualityCheck = providedOptions.resultEqualityCheck;
|
||
var comparator = createCacheKeyComparator(equalityCheck);
|
||
var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator);
|
||
function memoized() {
|
||
var value = cache.get(arguments);
|
||
if (value === NOT_FOUND) {
|
||
value = func.apply(null, arguments);
|
||
if (resultEqualityCheck) {
|
||
var entries = cache.getEntries();
|
||
var matchingEntry = entries.find(function(entry) {
|
||
return resultEqualityCheck(entry.value, value);
|
||
});
|
||
if (matchingEntry) {
|
||
value = matchingEntry.value;
|
||
}
|
||
}
|
||
cache.put(arguments, value);
|
||
}
|
||
return value;
|
||
}
|
||
memoized.clearCache = function() {
|
||
return cache.clear();
|
||
};
|
||
return memoized;
|
||
}
|
||
|
||
// node_modules/reselect/es/index.js
|
||
function getDependencies(funcs) {
|
||
var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
|
||
if (!dependencies.every(function(dep) {
|
||
return typeof dep === "function";
|
||
})) {
|
||
var dependencyTypes = dependencies.map(function(dep) {
|
||
return typeof dep === "function" ? "function " + (dep.name || "unnamed") + "()" : typeof dep;
|
||
}).join(", ");
|
||
throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]");
|
||
}
|
||
return dependencies;
|
||
}
|
||
function createSelectorCreator(memoize) {
|
||
for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||
memoizeOptionsFromArgs[_key - 1] = arguments[_key];
|
||
}
|
||
var createSelector3 = function createSelector4() {
|
||
for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||
funcs[_key2] = arguments[_key2];
|
||
}
|
||
var _recomputations = 0;
|
||
var _lastResult;
|
||
var directlyPassedOptions = {
|
||
memoizeOptions: void 0
|
||
};
|
||
var resultFunc = funcs.pop();
|
||
if (typeof resultFunc === "object") {
|
||
directlyPassedOptions = resultFunc;
|
||
resultFunc = funcs.pop();
|
||
}
|
||
if (typeof resultFunc !== "function") {
|
||
throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]");
|
||
}
|
||
var _directlyPassedOption = directlyPassedOptions, _directlyPassedOption2 = _directlyPassedOption.memoizeOptions, memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2;
|
||
var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions];
|
||
var dependencies = getDependencies(funcs);
|
||
var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() {
|
||
_recomputations++;
|
||
return resultFunc.apply(null, arguments);
|
||
}].concat(finalMemoizeOptions));
|
||
var selector = memoize(function dependenciesChecker() {
|
||
var params = [];
|
||
var length = dependencies.length;
|
||
for (var i = 0; i < length; i++) {
|
||
params.push(dependencies[i].apply(null, arguments));
|
||
}
|
||
_lastResult = memoizedResultFunc.apply(null, params);
|
||
return _lastResult;
|
||
});
|
||
Object.assign(selector, {
|
||
resultFunc,
|
||
memoizedResultFunc,
|
||
dependencies,
|
||
lastResult: function lastResult() {
|
||
return _lastResult;
|
||
},
|
||
recomputations: function recomputations() {
|
||
return _recomputations;
|
||
},
|
||
resetRecomputations: function resetRecomputations() {
|
||
return _recomputations = 0;
|
||
}
|
||
});
|
||
return selector;
|
||
};
|
||
return createSelector3;
|
||
}
|
||
var createSelector = createSelectorCreator(defaultMemoize);
|
||
|
||
// node_modules/@mui/x-data-grid/utils/createSelector.js
|
||
var cacheContainer = {
|
||
cache: /* @__PURE__ */ new WeakMap()
|
||
};
|
||
var missingInstanceIdWarning = buildWarning(["MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.", "To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`."]);
|
||
function checkIsAPIRef(value) {
|
||
return "current" in value && "instanceId" in value.current;
|
||
}
|
||
var DEFAULT_INSTANCE_ID = {
|
||
id: "default"
|
||
};
|
||
var createSelector2 = (a, b, c, d, e, f, ...rest) => {
|
||
if (rest.length > 0) {
|
||
throw new Error("Unsupported number of selectors");
|
||
}
|
||
let selector;
|
||
if (a && b && c && d && e && f) {
|
||
selector = (stateOrApiRef, instanceIdParam) => {
|
||
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
||
const instanceId = instanceIdParam != null ? instanceIdParam : isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID;
|
||
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
||
const va = a(state, instanceId);
|
||
const vb = b(state, instanceId);
|
||
const vc = c(state, instanceId);
|
||
const vd = d(state, instanceId);
|
||
const ve = e(state, instanceId);
|
||
return f(va, vb, vc, vd, ve);
|
||
};
|
||
} else if (a && b && c && d && e) {
|
||
selector = (stateOrApiRef, instanceIdParam) => {
|
||
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
||
const instanceId = instanceIdParam != null ? instanceIdParam : isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID;
|
||
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
||
const va = a(state, instanceId);
|
||
const vb = b(state, instanceId);
|
||
const vc = c(state, instanceId);
|
||
const vd = d(state, instanceId);
|
||
return e(va, vb, vc, vd);
|
||
};
|
||
} else if (a && b && c && d) {
|
||
selector = (stateOrApiRef, instanceIdParam) => {
|
||
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
||
const instanceId = instanceIdParam != null ? instanceIdParam : isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID;
|
||
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
||
const va = a(state, instanceId);
|
||
const vb = b(state, instanceId);
|
||
const vc = c(state, instanceId);
|
||
return d(va, vb, vc);
|
||
};
|
||
} else if (a && b && c) {
|
||
selector = (stateOrApiRef, instanceIdParam) => {
|
||
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
||
const instanceId = instanceIdParam != null ? instanceIdParam : isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID;
|
||
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
||
const va = a(state, instanceId);
|
||
const vb = b(state, instanceId);
|
||
return c(va, vb);
|
||
};
|
||
} else if (a && b) {
|
||
selector = (stateOrApiRef, instanceIdParam) => {
|
||
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
||
const instanceId = instanceIdParam != null ? instanceIdParam : isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID;
|
||
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
||
const va = a(state, instanceId);
|
||
return b(va);
|
||
};
|
||
} else {
|
||
throw new Error("Missing arguments");
|
||
}
|
||
selector.acceptsApiRef = true;
|
||
return selector;
|
||
};
|
||
var createSelectorMemoized = (...args) => {
|
||
const selector = (...selectorArgs) => {
|
||
var _cache$get, _cache$get3;
|
||
const [stateOrApiRef, instanceId] = selectorArgs;
|
||
const isAPIRef = checkIsAPIRef(stateOrApiRef);
|
||
const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId != null ? instanceId : DEFAULT_INSTANCE_ID;
|
||
const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
|
||
if (true) {
|
||
if (cacheKey.id === "default") {
|
||
missingInstanceIdWarning();
|
||
}
|
||
}
|
||
const {
|
||
cache
|
||
} = cacheContainer;
|
||
if (cache.get(cacheKey) && (_cache$get = cache.get(cacheKey)) != null && _cache$get.get(args)) {
|
||
var _cache$get2;
|
||
return (_cache$get2 = cache.get(cacheKey)) == null ? void 0 : _cache$get2.get(args)(state, cacheKey);
|
||
}
|
||
const newSelector = createSelector(...args);
|
||
if (!cache.get(cacheKey)) {
|
||
cache.set(cacheKey, /* @__PURE__ */ new Map());
|
||
}
|
||
(_cache$get3 = cache.get(cacheKey)) == null || _cache$get3.set(args, newSelector);
|
||
return newSelector(state, cacheKey);
|
||
};
|
||
selector.acceptsApiRef = true;
|
||
return selector;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columns/gridColumnsSelector.js
|
||
var gridColumnsStateSelector = (state) => state.columns;
|
||
var gridColumnFieldsSelector = createSelector2(gridColumnsStateSelector, (columnsState) => columnsState.orderedFields);
|
||
var gridColumnLookupSelector = createSelector2(gridColumnsStateSelector, (columnsState) => columnsState.lookup);
|
||
var gridColumnDefinitionsSelector = createSelectorMemoized(gridColumnFieldsSelector, gridColumnLookupSelector, (allFields, lookup) => allFields.map((field) => lookup[field]));
|
||
var gridColumnVisibilityModelSelector = createSelector2(gridColumnsStateSelector, (columnsState) => columnsState.columnVisibilityModel);
|
||
var gridVisibleColumnDefinitionsSelector = createSelectorMemoized(gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector, (columns, columnVisibilityModel) => columns.filter((column) => columnVisibilityModel[column.field] !== false));
|
||
var gridVisibleColumnFieldsSelector = createSelectorMemoized(gridVisibleColumnDefinitionsSelector, (visibleColumns) => visibleColumns.map((column) => column.field));
|
||
var gridColumnPositionsSelector = createSelectorMemoized(gridVisibleColumnDefinitionsSelector, (visibleColumns) => {
|
||
const positions = [];
|
||
let currentPosition = 0;
|
||
for (let i = 0; i < visibleColumns.length; i += 1) {
|
||
positions.push(currentPosition);
|
||
currentPosition += visibleColumns[i].computedWidth;
|
||
}
|
||
return positions;
|
||
});
|
||
var gridColumnsTotalWidthSelector = createSelector2(gridVisibleColumnDefinitionsSelector, gridColumnPositionsSelector, (visibleColumns, positions) => {
|
||
const colCount = visibleColumns.length;
|
||
if (colCount === 0) {
|
||
return 0;
|
||
}
|
||
return positions[colCount - 1] + visibleColumns[colCount - 1].computedWidth;
|
||
});
|
||
var gridFilterableColumnDefinitionsSelector = createSelectorMemoized(gridColumnDefinitionsSelector, (columns) => columns.filter((col) => col.filterable));
|
||
var gridFilterableColumnLookupSelector = createSelectorMemoized(gridColumnDefinitionsSelector, (columns) => columns.reduce((acc, col) => {
|
||
if (col.filterable) {
|
||
acc[col.field] = col;
|
||
}
|
||
return acc;
|
||
}, {}));
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columnGrouping/gridColumnGroupsSelector.js
|
||
var gridColumnGroupingSelector = (state) => state.columnGrouping;
|
||
var gridColumnGroupsUnwrappedModelSelector = createSelectorMemoized(gridColumnGroupingSelector, (columnGrouping) => {
|
||
var _columnGrouping$unwra;
|
||
return (_columnGrouping$unwra = columnGrouping == null ? void 0 : columnGrouping.unwrappedGroupingModel) != null ? _columnGrouping$unwra : {};
|
||
});
|
||
var gridColumnGroupsLookupSelector = createSelectorMemoized(gridColumnGroupingSelector, (columnGrouping) => {
|
||
var _columnGrouping$looku;
|
||
return (_columnGrouping$looku = columnGrouping == null ? void 0 : columnGrouping.lookup) != null ? _columnGrouping$looku : {};
|
||
});
|
||
var gridColumnGroupsHeaderStructureSelector = createSelectorMemoized(gridColumnGroupingSelector, (columnGrouping) => {
|
||
var _columnGrouping$heade;
|
||
return (_columnGrouping$heade = columnGrouping == null ? void 0 : columnGrouping.headerStructure) != null ? _columnGrouping$heade : [];
|
||
});
|
||
var gridColumnGroupsHeaderMaxDepthSelector = createSelector2(gridColumnGroupingSelector, (columnGrouping) => {
|
||
var _columnGrouping$maxDe;
|
||
return (_columnGrouping$maxDe = columnGrouping == null ? void 0 : columnGrouping.maxDepth) != null ? _columnGrouping$maxDe : 0;
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rows/gridRowsSelector.js
|
||
var gridRowsStateSelector = (state) => state.rows;
|
||
var gridRowCountSelector = createSelector2(gridRowsStateSelector, (rows) => rows.totalRowCount);
|
||
var gridRowsLoadingSelector = createSelector2(gridRowsStateSelector, (rows) => rows.loading);
|
||
var gridTopLevelRowCountSelector = createSelector2(gridRowsStateSelector, (rows) => rows.totalTopLevelRowCount);
|
||
var gridRowsLookupSelector = createSelector2(gridRowsStateSelector, (rows) => rows.dataRowIdToModelLookup);
|
||
var gridRowsDataRowIdToIdLookupSelector = createSelector2(gridRowsStateSelector, (rows) => rows.dataRowIdToIdLookup);
|
||
var gridRowTreeSelector = createSelector2(gridRowsStateSelector, (rows) => rows.tree);
|
||
var gridRowGroupingNameSelector = createSelector2(gridRowsStateSelector, (rows) => rows.groupingName);
|
||
var gridRowTreeDepthsSelector = createSelector2(gridRowsStateSelector, (rows) => rows.treeDepths);
|
||
var gridRowMaximumTreeDepthSelector = createSelectorMemoized(gridRowsStateSelector, (rows) => {
|
||
const entries = Object.entries(rows.treeDepths);
|
||
if (entries.length === 0) {
|
||
return 1;
|
||
}
|
||
return entries.filter(([, nodeCount]) => nodeCount > 0).map(([depth]) => Number(depth)).sort((a, b) => b - a)[0] + 1;
|
||
});
|
||
var gridDataRowIdsSelector = createSelector2(gridRowsStateSelector, (rows) => rows.dataRowIds);
|
||
var gridAdditionalRowGroupsSelector = createSelector2(gridRowsStateSelector, (rows) => rows == null ? void 0 : rows.additionalRowGroups);
|
||
var gridPinnedRowsSelector = createSelectorMemoized(gridAdditionalRowGroupsSelector, (additionalRowGroups) => {
|
||
var _rawPinnedRows$bottom, _rawPinnedRows$top;
|
||
const rawPinnedRows = additionalRowGroups == null ? void 0 : additionalRowGroups.pinnedRows;
|
||
return {
|
||
bottom: rawPinnedRows == null || (_rawPinnedRows$bottom = rawPinnedRows.bottom) == null ? void 0 : _rawPinnedRows$bottom.map((rowEntry) => {
|
||
var _rowEntry$model;
|
||
return {
|
||
id: rowEntry.id,
|
||
model: (_rowEntry$model = rowEntry.model) != null ? _rowEntry$model : {}
|
||
};
|
||
}),
|
||
top: rawPinnedRows == null || (_rawPinnedRows$top = rawPinnedRows.top) == null ? void 0 : _rawPinnedRows$top.map((rowEntry) => {
|
||
var _rowEntry$model2;
|
||
return {
|
||
id: rowEntry.id,
|
||
model: (_rowEntry$model2 = rowEntry.model) != null ? _rowEntry$model2 : {}
|
||
};
|
||
})
|
||
};
|
||
});
|
||
var gridPinnedRowsCountSelector = createSelector2(gridPinnedRowsSelector, (pinnedRows) => {
|
||
var _pinnedRows$top, _pinnedRows$bottom;
|
||
return ((pinnedRows == null || (_pinnedRows$top = pinnedRows.top) == null ? void 0 : _pinnedRows$top.length) || 0) + ((pinnedRows == null || (_pinnedRows$bottom = pinnedRows.bottom) == null ? void 0 : _pinnedRows$bottom.length) || 0);
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridAriaAttributes.js
|
||
var useGridAriaAttributes = () => {
|
||
var _rootProps$experiment;
|
||
const apiRef = useGridPrivateApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
|
||
const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
|
||
const headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);
|
||
const pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);
|
||
let role = "grid";
|
||
if ((_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.ariaV7 && rootProps.treeData) {
|
||
role = "treegrid";
|
||
}
|
||
return {
|
||
role,
|
||
"aria-colcount": visibleColumns.length,
|
||
"aria-rowcount": headerGroupingMaxDepth + 1 + pinnedRowsCount + totalRowCount,
|
||
"aria-multiselectable": !rootProps.disableMultipleRowSelection
|
||
};
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/components/containers/GridMainContainer.js
|
||
var import_jsx_runtime = __toESM(require_jsx_runtime());
|
||
var useUtilityClasses = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["main"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridMainContainerRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "Main",
|
||
overridesResolver: (props, styles) => styles.main
|
||
})(() => ({
|
||
position: "relative",
|
||
flexGrow: 1,
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
overflow: "hidden"
|
||
}));
|
||
var GridMainContainer = React10.forwardRef((props, ref) => {
|
||
var _rootProps$experiment;
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses(rootProps);
|
||
const getAriaAttributes = (_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.ariaV7 ? useGridAriaAttributes : null;
|
||
const ariaAttributes = typeof getAriaAttributes === "function" ? getAriaAttributes() : null;
|
||
return (0, import_jsx_runtime.jsx)(GridMainContainerRoot, _extends({
|
||
ref,
|
||
className: classes.root,
|
||
ownerState: rootProps
|
||
}, ariaAttributes, {
|
||
children: props.children
|
||
}));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/sorting/gridSortingSelector.js
|
||
var gridSortingStateSelector = (state) => state.sorting;
|
||
var gridSortedRowIdsSelector = createSelector2(gridSortingStateSelector, (sortingState) => sortingState.sortedRows);
|
||
var gridSortedRowEntriesSelector = createSelectorMemoized(
|
||
gridSortedRowIdsSelector,
|
||
gridRowsLookupSelector,
|
||
// TODO rows v6: Is this the best approach ?
|
||
(sortedIds, idRowsLookup) => sortedIds.map((id) => {
|
||
var _idRowsLookup$id;
|
||
return {
|
||
id,
|
||
model: (_idRowsLookup$id = idRowsLookup[id]) != null ? _idRowsLookup$id : {}
|
||
};
|
||
})
|
||
);
|
||
var gridSortModelSelector = createSelector2(gridSortingStateSelector, (sorting) => sorting.sortModel);
|
||
var gridSortColumnLookupSelector = createSelectorMemoized(gridSortModelSelector, (sortModel) => {
|
||
const result = sortModel.reduce((res, sortItem, index) => {
|
||
res[sortItem.field] = {
|
||
sortDirection: sortItem.sort,
|
||
sortIndex: sortModel.length > 1 ? index + 1 : void 0
|
||
};
|
||
return res;
|
||
}, {});
|
||
return result;
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterSelector.js
|
||
var gridFilterStateSelector = (state) => state.filter;
|
||
var gridFilterModelSelector = createSelector2(gridFilterStateSelector, (filterState) => filterState.filterModel);
|
||
var gridQuickFilterValuesSelector = createSelector2(gridFilterModelSelector, (filterModel) => filterModel.quickFilterValues);
|
||
var gridVisibleRowsLookupSelector = (state) => state.visibleRowsLookup;
|
||
var gridFilteredRowsLookupSelector = createSelector2(gridFilterStateSelector, (filterState) => filterState.filteredRowsLookup);
|
||
var gridFilteredDescendantCountLookupSelector = createSelector2(gridFilterStateSelector, (filterState) => filterState.filteredDescendantCountLookup);
|
||
var gridExpandedSortedRowEntriesSelector = createSelectorMemoized(gridVisibleRowsLookupSelector, gridSortedRowEntriesSelector, (visibleRowsLookup, sortedRows) => sortedRows.filter((row) => visibleRowsLookup[row.id] !== false));
|
||
var gridExpandedSortedRowIdsSelector = createSelectorMemoized(gridExpandedSortedRowEntriesSelector, (visibleSortedRowEntries) => visibleSortedRowEntries.map((row) => row.id));
|
||
var gridFilteredSortedRowEntriesSelector = createSelectorMemoized(gridFilteredRowsLookupSelector, gridSortedRowEntriesSelector, (filteredRowsLookup, sortedRows) => sortedRows.filter((row) => filteredRowsLookup[row.id] !== false));
|
||
var gridFilteredSortedRowIdsSelector = createSelectorMemoized(gridFilteredSortedRowEntriesSelector, (filteredSortedRowEntries) => filteredSortedRowEntries.map((row) => row.id));
|
||
var gridFilteredSortedTopLevelRowEntriesSelector = createSelectorMemoized(gridExpandedSortedRowEntriesSelector, gridRowTreeSelector, gridRowMaximumTreeDepthSelector, (visibleSortedRows, rowTree, rowTreeDepth) => {
|
||
if (rowTreeDepth < 2) {
|
||
return visibleSortedRows;
|
||
}
|
||
return visibleSortedRows.filter((row) => {
|
||
var _rowTree$row$id;
|
||
return ((_rowTree$row$id = rowTree[row.id]) == null ? void 0 : _rowTree$row$id.depth) === 0;
|
||
});
|
||
});
|
||
var gridExpandedRowCountSelector = createSelector2(gridExpandedSortedRowEntriesSelector, (visibleSortedRows) => visibleSortedRows.length);
|
||
var gridFilteredTopLevelRowCountSelector = createSelector2(gridFilteredSortedTopLevelRowEntriesSelector, (visibleSortedTopLevelRows) => visibleSortedTopLevelRows.length);
|
||
var gridFilterActiveItemsSelector = createSelectorMemoized(gridFilterModelSelector, gridColumnLookupSelector, (filterModel, columnLookup) => {
|
||
var _filterModel$items;
|
||
return (_filterModel$items = filterModel.items) == null ? void 0 : _filterModel$items.filter((item) => {
|
||
var _column$filterOperato, _item$value;
|
||
if (!item.field) {
|
||
return false;
|
||
}
|
||
const column = columnLookup[item.field];
|
||
if (!(column != null && column.filterOperators) || (column == null || (_column$filterOperato = column.filterOperators) == null ? void 0 : _column$filterOperato.length) === 0) {
|
||
return false;
|
||
}
|
||
const filterOperator = column.filterOperators.find((operator) => operator.value === item.operator);
|
||
if (!filterOperator) {
|
||
return false;
|
||
}
|
||
return !filterOperator.InputComponent || item.value != null && ((_item$value = item.value) == null ? void 0 : _item$value.toString()) !== "";
|
||
});
|
||
});
|
||
var gridFilterActiveItemsLookupSelector = createSelectorMemoized(gridFilterActiveItemsSelector, (activeFilters) => {
|
||
const result = activeFilters.reduce((res, filterItem) => {
|
||
if (!res[filterItem.field]) {
|
||
res[filterItem.field] = [filterItem];
|
||
} else {
|
||
res[filterItem.field].push(filterItem);
|
||
}
|
||
return res;
|
||
}, {});
|
||
return result;
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/focus/gridFocusStateSelector.js
|
||
var gridFocusStateSelector = (state) => state.focus;
|
||
var gridFocusCellSelector = createSelector2(gridFocusStateSelector, (focusState) => focusState.cell);
|
||
var gridFocusColumnHeaderSelector = createSelector2(gridFocusStateSelector, (focusState) => focusState.columnHeader);
|
||
var unstable_gridFocusColumnHeaderFilterSelector = createSelector2(gridFocusStateSelector, (focusState) => focusState.columnHeaderFilter);
|
||
var unstable_gridFocusColumnGroupHeaderSelector = createSelector2(gridFocusStateSelector, (focusState) => focusState.columnGroupHeader);
|
||
var gridTabIndexStateSelector = (state) => state.tabIndex;
|
||
var gridTabIndexCellSelector = createSelector2(gridTabIndexStateSelector, (state) => state.cell);
|
||
var gridTabIndexColumnHeaderSelector = createSelector2(gridTabIndexStateSelector, (state) => state.columnHeader);
|
||
var unstable_gridTabIndexColumnHeaderFilterSelector = createSelector2(gridTabIndexStateSelector, (state) => state.columnHeaderFilter);
|
||
var unstable_gridTabIndexColumnGroupHeaderSelector = createSelector2(gridTabIndexStateSelector, (state) => state.columnGroupHeader);
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/density/densitySelector.js
|
||
var gridDensitySelector = (state) => state.density;
|
||
var gridDensityValueSelector = createSelector2(gridDensitySelector, (density) => density.value);
|
||
var gridDensityFactorSelector = createSelector2(gridDensitySelector, (density) => density.factor);
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columnMenu/columnMenuSelector.js
|
||
var gridColumnMenuSelector = (state) => state.columnMenu;
|
||
|
||
// node_modules/@mui/x-data-grid/components/base/GridBody.js
|
||
var import_jsx_runtime2 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime3 = __toESM(require_jsx_runtime());
|
||
function GridBody(props) {
|
||
const {
|
||
VirtualScrollerComponent,
|
||
ColumnHeadersProps,
|
||
children
|
||
} = props;
|
||
const apiRef = useGridPrivateApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const rootRef = React11.useRef(null);
|
||
const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
|
||
const filterColumnLookup = useGridSelector(apiRef, gridFilterActiveItemsLookupSelector);
|
||
const sortColumnLookup = useGridSelector(apiRef, gridSortColumnLookupSelector);
|
||
const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);
|
||
const columnHeaderTabIndexState = useGridSelector(apiRef, gridTabIndexColumnHeaderSelector);
|
||
const cellTabIndexState = useGridSelector(apiRef, gridTabIndexCellSelector);
|
||
const columnGroupHeaderTabIndexState = useGridSelector(apiRef, unstable_gridTabIndexColumnGroupHeaderSelector);
|
||
const columnHeaderFocus = useGridSelector(apiRef, gridFocusColumnHeaderSelector);
|
||
const columnGroupHeaderFocus = useGridSelector(apiRef, unstable_gridFocusColumnGroupHeaderSelector);
|
||
const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);
|
||
const headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);
|
||
const columnMenuState = useGridSelector(apiRef, gridColumnMenuSelector);
|
||
const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
|
||
const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
|
||
const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
|
||
useEnhancedEffect_default(() => {
|
||
apiRef.current.computeSizeAndPublishResizeEvent();
|
||
const elementToObserve = rootRef.current;
|
||
if (typeof ResizeObserver === "undefined") {
|
||
return () => {
|
||
};
|
||
}
|
||
let animationFrame;
|
||
const observer = new ResizeObserver(() => {
|
||
animationFrame = requestAnimationFrame(() => {
|
||
apiRef.current.computeSizeAndPublishResizeEvent();
|
||
});
|
||
});
|
||
if (elementToObserve) {
|
||
observer.observe(elementToObserve);
|
||
}
|
||
return () => {
|
||
if (animationFrame) {
|
||
window.cancelAnimationFrame(animationFrame);
|
||
}
|
||
if (elementToObserve) {
|
||
observer.unobserve(elementToObserve);
|
||
}
|
||
};
|
||
}, [apiRef]);
|
||
const columnHeadersRef = React11.useRef(null);
|
||
const columnsContainerRef = React11.useRef(null);
|
||
const virtualScrollerRef = React11.useRef(null);
|
||
apiRef.current.register("private", {
|
||
columnHeadersContainerElementRef: columnsContainerRef,
|
||
columnHeadersElementRef: columnHeadersRef,
|
||
virtualScrollerRef,
|
||
mainElementRef: rootRef
|
||
});
|
||
const hasDimensions = !!apiRef.current.getRootDimensions();
|
||
return (0, import_jsx_runtime3.jsxs)(GridMainContainer, {
|
||
ref: rootRef,
|
||
children: [(0, import_jsx_runtime2.jsx)(rootProps.slots.columnHeaders, _extends({
|
||
ref: columnsContainerRef,
|
||
innerRef: columnHeadersRef,
|
||
visibleColumns,
|
||
filterColumnLookup,
|
||
sortColumnLookup,
|
||
columnPositions,
|
||
columnHeaderTabIndexState,
|
||
columnGroupHeaderTabIndexState,
|
||
columnHeaderFocus,
|
||
columnGroupHeaderFocus,
|
||
densityFactor,
|
||
headerGroupingMaxDepth,
|
||
columnMenuState,
|
||
columnVisibility,
|
||
columnGroupsHeaderStructure,
|
||
hasOtherElementInTabSequence
|
||
}, ColumnHeadersProps)), hasDimensions && (0, import_jsx_runtime2.jsx)(
|
||
VirtualScrollerComponent,
|
||
{
|
||
ref: virtualScrollerRef
|
||
}
|
||
), children]
|
||
});
|
||
}
|
||
true ? GridBody.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
children: import_prop_types.default.node,
|
||
ColumnHeadersProps: import_prop_types.default.object,
|
||
VirtualScrollerComponent: import_prop_types.default.elementType.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/base/GridFooterPlaceholder.js
|
||
init_extends();
|
||
var React12 = __toESM(require_react());
|
||
var import_jsx_runtime4 = __toESM(require_jsx_runtime());
|
||
function GridFooterPlaceholder() {
|
||
var _rootProps$slotProps;
|
||
const rootProps = useGridRootProps();
|
||
if (rootProps.hideFooter) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime4.jsx)(rootProps.slots.footer, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.footer));
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/components/base/GridOverlays.js
|
||
init_extends();
|
||
var React13 = __toESM(require_react());
|
||
var import_prop_types2 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rows/gridRowsUtils.js
|
||
init_extends();
|
||
var GRID_ROOT_GROUP_ID = `auto-generated-group-node-root`;
|
||
var GRID_ID_AUTOGENERATED = Symbol("mui.id_autogenerated");
|
||
var buildRootGroup = () => ({
|
||
type: "group",
|
||
id: GRID_ROOT_GROUP_ID,
|
||
depth: -1,
|
||
groupingField: null,
|
||
groupingKey: null,
|
||
isAutoGenerated: true,
|
||
children: [],
|
||
childrenFromPath: {},
|
||
childrenExpanded: true,
|
||
parent: null
|
||
});
|
||
function checkGridRowIdIsValid(id, row, detailErrorMessage = "A row was provided without id in the rows prop:") {
|
||
if (id == null) {
|
||
throw new Error(["MUI: The data grid component requires all rows to have a unique `id` property.", "Alternatively, you can use the `getRowId` prop to specify a custom id for each row.", detailErrorMessage, JSON.stringify(row)].join("\n"));
|
||
}
|
||
}
|
||
var getRowIdFromRowModel = (rowModel, getRowId, detailErrorMessage) => {
|
||
const id = getRowId ? getRowId(rowModel) : rowModel.id;
|
||
checkGridRowIdIsValid(id, rowModel, detailErrorMessage);
|
||
return id;
|
||
};
|
||
var createRowsInternalCache = ({
|
||
rows,
|
||
getRowId,
|
||
loading,
|
||
rowCount
|
||
}) => {
|
||
const updates = {
|
||
type: "full",
|
||
rows: []
|
||
};
|
||
const dataRowIdToModelLookup = {};
|
||
const dataRowIdToIdLookup = {};
|
||
for (let i = 0; i < rows.length; i += 1) {
|
||
const model = rows[i];
|
||
const id = getRowIdFromRowModel(model, getRowId);
|
||
dataRowIdToModelLookup[id] = model;
|
||
dataRowIdToIdLookup[id] = id;
|
||
updates.rows.push(id);
|
||
}
|
||
return {
|
||
rowsBeforePartialUpdates: rows,
|
||
loadingPropBeforePartialUpdates: loading,
|
||
rowCountPropBeforePartialUpdates: rowCount,
|
||
updates,
|
||
dataRowIdToIdLookup,
|
||
dataRowIdToModelLookup
|
||
};
|
||
};
|
||
var getTopLevelRowCount = ({
|
||
tree,
|
||
rowCountProp = 0
|
||
}) => {
|
||
const rootGroupNode = tree[GRID_ROOT_GROUP_ID];
|
||
return Math.max(rowCountProp, rootGroupNode.children.length + (rootGroupNode.footerId == null ? 0 : 1));
|
||
};
|
||
var getRowsStateFromCache = ({
|
||
apiRef,
|
||
rowCountProp = 0,
|
||
loadingProp,
|
||
previousTree,
|
||
previousTreeDepths
|
||
}) => {
|
||
const cache = apiRef.current.caches.rows;
|
||
const {
|
||
tree: unProcessedTree,
|
||
treeDepths: unProcessedTreeDepths,
|
||
dataRowIds: unProcessedDataRowIds,
|
||
groupingName
|
||
} = apiRef.current.applyStrategyProcessor("rowTreeCreation", {
|
||
previousTree,
|
||
previousTreeDepths,
|
||
updates: cache.updates,
|
||
dataRowIdToIdLookup: cache.dataRowIdToIdLookup,
|
||
dataRowIdToModelLookup: cache.dataRowIdToModelLookup
|
||
});
|
||
const groupingParamsWithHydrateRows = apiRef.current.unstable_applyPipeProcessors("hydrateRows", {
|
||
tree: unProcessedTree,
|
||
treeDepths: unProcessedTreeDepths,
|
||
dataRowIdToIdLookup: cache.dataRowIdToIdLookup,
|
||
dataRowIds: unProcessedDataRowIds,
|
||
dataRowIdToModelLookup: cache.dataRowIdToModelLookup
|
||
});
|
||
apiRef.current.caches.rows.updates = {
|
||
type: "partial",
|
||
actions: {
|
||
insert: [],
|
||
modify: [],
|
||
remove: []
|
||
},
|
||
idToActionLookup: {}
|
||
};
|
||
return _extends({}, groupingParamsWithHydrateRows, {
|
||
totalRowCount: Math.max(rowCountProp, groupingParamsWithHydrateRows.dataRowIds.length),
|
||
totalTopLevelRowCount: getTopLevelRowCount({
|
||
tree: groupingParamsWithHydrateRows.tree,
|
||
rowCountProp
|
||
}),
|
||
groupingName,
|
||
loading: loadingProp
|
||
});
|
||
};
|
||
var isAutoGeneratedRow = (rowNode) => rowNode.type === "skeletonRow" || rowNode.type === "footer" || rowNode.type === "group" && rowNode.isAutoGenerated || rowNode.type === "pinnedRow" && rowNode.isAutoGenerated;
|
||
var getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows) => {
|
||
const node = tree[parentId];
|
||
if (node.type !== "group") {
|
||
return [];
|
||
}
|
||
const validDescendants = [];
|
||
for (let i = 0; i < node.children.length; i += 1) {
|
||
const child = node.children[i];
|
||
if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[child])) {
|
||
validDescendants.push(child);
|
||
}
|
||
const childDescendants = getTreeNodeDescendants(tree, child, skipAutoGeneratedRows);
|
||
for (let j = 0; j < childDescendants.length; j += 1) {
|
||
validDescendants.push(childDescendants[j]);
|
||
}
|
||
}
|
||
if (!skipAutoGeneratedRows && node.footerId != null) {
|
||
validDescendants.push(node.footerId);
|
||
}
|
||
return validDescendants;
|
||
};
|
||
var updateCacheWithNewRows = ({
|
||
previousCache,
|
||
getRowId,
|
||
updates
|
||
}) => {
|
||
var _previousCache$update, _previousCache$update2, _previousCache$update3;
|
||
if (previousCache.updates.type === "full") {
|
||
throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");
|
||
}
|
||
const uniqueUpdates = /* @__PURE__ */ new Map();
|
||
updates.forEach((update) => {
|
||
const id = getRowIdFromRowModel(update, getRowId, "A row was provided without id when calling updateRows():");
|
||
if (uniqueUpdates.has(id)) {
|
||
uniqueUpdates.set(id, _extends({}, uniqueUpdates.get(id), update));
|
||
} else {
|
||
uniqueUpdates.set(id, update);
|
||
}
|
||
});
|
||
const partialUpdates = {
|
||
type: "partial",
|
||
actions: {
|
||
insert: [...(_previousCache$update = previousCache.updates.actions.insert) != null ? _previousCache$update : []],
|
||
modify: [...(_previousCache$update2 = previousCache.updates.actions.modify) != null ? _previousCache$update2 : []],
|
||
remove: [...(_previousCache$update3 = previousCache.updates.actions.remove) != null ? _previousCache$update3 : []]
|
||
},
|
||
idToActionLookup: _extends({}, previousCache.updates.idToActionLookup)
|
||
};
|
||
const dataRowIdToModelLookup = _extends({}, previousCache.dataRowIdToModelLookup);
|
||
const dataRowIdToIdLookup = _extends({}, previousCache.dataRowIdToIdLookup);
|
||
const alreadyAppliedActionsToRemove = {
|
||
insert: {},
|
||
modify: {},
|
||
remove: {}
|
||
};
|
||
uniqueUpdates.forEach((partialRow, id) => {
|
||
const actionAlreadyAppliedToRow = partialUpdates.idToActionLookup[id];
|
||
if (partialRow._action === "delete") {
|
||
if (actionAlreadyAppliedToRow === "remove" || !dataRowIdToModelLookup[id]) {
|
||
return;
|
||
}
|
||
if (actionAlreadyAppliedToRow != null) {
|
||
alreadyAppliedActionsToRemove[actionAlreadyAppliedToRow][id] = true;
|
||
}
|
||
partialUpdates.actions.remove.push(id);
|
||
delete dataRowIdToModelLookup[id];
|
||
delete dataRowIdToIdLookup[id];
|
||
return;
|
||
}
|
||
const oldRow = dataRowIdToModelLookup[id];
|
||
if (oldRow) {
|
||
if (actionAlreadyAppliedToRow === "remove") {
|
||
alreadyAppliedActionsToRemove.remove[id] = true;
|
||
partialUpdates.actions.modify.push(id);
|
||
} else if (actionAlreadyAppliedToRow == null) {
|
||
partialUpdates.actions.modify.push(id);
|
||
}
|
||
dataRowIdToModelLookup[id] = _extends({}, oldRow, partialRow);
|
||
return;
|
||
}
|
||
if (actionAlreadyAppliedToRow === "remove") {
|
||
alreadyAppliedActionsToRemove.remove[id] = true;
|
||
partialUpdates.actions.insert.push(id);
|
||
} else if (actionAlreadyAppliedToRow == null) {
|
||
partialUpdates.actions.insert.push(id);
|
||
}
|
||
dataRowIdToModelLookup[id] = partialRow;
|
||
dataRowIdToIdLookup[id] = id;
|
||
});
|
||
const actionTypeWithActionsToRemove = Object.keys(alreadyAppliedActionsToRemove);
|
||
for (let i = 0; i < actionTypeWithActionsToRemove.length; i += 1) {
|
||
const actionType = actionTypeWithActionsToRemove[i];
|
||
const idsToRemove = alreadyAppliedActionsToRemove[actionType];
|
||
if (Object.keys(idsToRemove).length > 0) {
|
||
partialUpdates.actions[actionType] = partialUpdates.actions[actionType].filter((id) => !idsToRemove[id]);
|
||
}
|
||
}
|
||
return {
|
||
dataRowIdToModelLookup,
|
||
dataRowIdToIdLookup,
|
||
updates: partialUpdates,
|
||
rowsBeforePartialUpdates: previousCache.rowsBeforePartialUpdates,
|
||
loadingPropBeforePartialUpdates: previousCache.loadingPropBeforePartialUpdates,
|
||
rowCountPropBeforePartialUpdates: previousCache.rowCountPropBeforePartialUpdates
|
||
};
|
||
};
|
||
function calculatePinnedRowsHeight(apiRef) {
|
||
var _pinnedRows$top, _pinnedRows$bottom;
|
||
const pinnedRows = gridPinnedRowsSelector(apiRef);
|
||
const topPinnedRowsHeight = (pinnedRows == null || (_pinnedRows$top = pinnedRows.top) == null ? void 0 : _pinnedRows$top.reduce((acc, value) => {
|
||
acc += apiRef.current.unstable_getRowHeight(value.id);
|
||
return acc;
|
||
}, 0)) || 0;
|
||
const bottomPinnedRowsHeight = (pinnedRows == null || (_pinnedRows$bottom = pinnedRows.bottom) == null ? void 0 : _pinnedRows$bottom.reduce((acc, value) => {
|
||
acc += apiRef.current.unstable_getRowHeight(value.id);
|
||
return acc;
|
||
}, 0)) || 0;
|
||
return {
|
||
top: topPinnedRowsHeight,
|
||
bottom: bottomPinnedRowsHeight
|
||
};
|
||
}
|
||
function getMinimalContentHeight(apiRef, rowHeight) {
|
||
const densityFactor = gridDensityFactorSelector(apiRef);
|
||
return `var(--DataGrid-overlayHeight, ${2 * Math.floor(rowHeight * densityFactor)}px)`;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/components/base/GridOverlays.js
|
||
var import_jsx_runtime5 = __toESM(require_jsx_runtime());
|
||
var GridOverlayWrapperRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "OverlayWrapper",
|
||
shouldForwardProp: (prop) => prop !== "overlayType",
|
||
overridesResolver: (props, styles) => styles.overlayWrapper
|
||
})(({
|
||
overlayType
|
||
}) => ({
|
||
position: "sticky",
|
||
// To stay in place while scrolling
|
||
top: 0,
|
||
left: 0,
|
||
width: 0,
|
||
// To stay above the content instead of shifting it down
|
||
height: 0,
|
||
// To stay above the content instead of shifting it down
|
||
zIndex: overlayType === "loadingOverlay" ? 5 : 4
|
||
// Should be above pinned columns and detail panel
|
||
}));
|
||
var GridOverlayWrapperInner = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "OverlayWrapperInner",
|
||
shouldForwardProp: (prop) => prop !== "overlayType",
|
||
overridesResolver: (props, styles) => styles.overlayWrapperInner
|
||
})({});
|
||
var useUtilityClasses2 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["overlayWrapper"],
|
||
inner: ["overlayWrapperInner"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function GridOverlayWrapper(props) {
|
||
var _viewportInnerSize$he, _viewportInnerSize$wi;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const [viewportInnerSize, setViewportInnerSize] = React13.useState(() => {
|
||
var _apiRef$current$getRo, _apiRef$current$getRo2;
|
||
return (_apiRef$current$getRo = (_apiRef$current$getRo2 = apiRef.current.getRootDimensions()) == null ? void 0 : _apiRef$current$getRo2.viewportInnerSize) != null ? _apiRef$current$getRo : null;
|
||
});
|
||
const handleViewportSizeChange = React13.useCallback(() => {
|
||
var _apiRef$current$getRo3, _apiRef$current$getRo4;
|
||
setViewportInnerSize((_apiRef$current$getRo3 = (_apiRef$current$getRo4 = apiRef.current.getRootDimensions()) == null ? void 0 : _apiRef$current$getRo4.viewportInnerSize) != null ? _apiRef$current$getRo3 : null);
|
||
}, [apiRef]);
|
||
useEnhancedEffect_default(() => {
|
||
return apiRef.current.subscribeEvent("viewportInnerSizeChange", handleViewportSizeChange);
|
||
}, [apiRef, handleViewportSizeChange]);
|
||
let height = (_viewportInnerSize$he = viewportInnerSize == null ? void 0 : viewportInnerSize.height) != null ? _viewportInnerSize$he : 0;
|
||
if (rootProps.autoHeight && height === 0) {
|
||
height = getMinimalContentHeight(apiRef, rootProps.rowHeight);
|
||
}
|
||
const classes = useUtilityClasses2(_extends({}, props, {
|
||
classes: rootProps.classes
|
||
}));
|
||
if (!viewportInnerSize) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime5.jsx)(GridOverlayWrapperRoot, {
|
||
className: clsx_default(classes.root),
|
||
overlayType: props.overlayType,
|
||
children: (0, import_jsx_runtime5.jsx)(GridOverlayWrapperInner, _extends({
|
||
className: clsx_default(classes.inner),
|
||
style: {
|
||
height,
|
||
width: (_viewportInnerSize$wi = viewportInnerSize == null ? void 0 : viewportInnerSize.width) != null ? _viewportInnerSize$wi : 0
|
||
}
|
||
}, props))
|
||
});
|
||
}
|
||
true ? GridOverlayWrapper.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
overlayType: import_prop_types2.default.string.isRequired
|
||
} : void 0;
|
||
function GridOverlays() {
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
|
||
const visibleRowCount = useGridSelector(apiRef, gridExpandedRowCountSelector);
|
||
const loading = useGridSelector(apiRef, gridRowsLoadingSelector);
|
||
const showNoRowsOverlay = !loading && totalRowCount === 0;
|
||
const showNoResultsOverlay = !loading && totalRowCount > 0 && visibleRowCount === 0;
|
||
let overlay = null;
|
||
let overlayType = "";
|
||
if (showNoRowsOverlay) {
|
||
var _rootProps$slotProps;
|
||
overlay = (0, import_jsx_runtime5.jsx)(rootProps.slots.noRowsOverlay, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.noRowsOverlay));
|
||
overlayType = "noRowsOverlay";
|
||
}
|
||
if (showNoResultsOverlay) {
|
||
var _rootProps$slotProps2;
|
||
overlay = (0, import_jsx_runtime5.jsx)(rootProps.slots.noResultsOverlay, _extends({}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.noResultsOverlay));
|
||
overlayType = "noResultsOverlay";
|
||
}
|
||
if (loading) {
|
||
var _rootProps$slotProps3;
|
||
overlay = (0, import_jsx_runtime5.jsx)(rootProps.slots.loadingOverlay, _extends({}, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.loadingOverlay));
|
||
overlayType = "loadingOverlay";
|
||
}
|
||
if (overlay === null) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime5.jsx)(GridOverlayWrapper, {
|
||
overlayType,
|
||
children: overlay
|
||
});
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridCell.js
|
||
init_extends();
|
||
var React17 = __toESM(require_react());
|
||
var import_prop_types3 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/utils/fastMemo.js
|
||
var React14 = __toESM(require_react());
|
||
function fastMemo(component) {
|
||
return React14.memo(component, fastObjectShallowCompare);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/utils/doesSupportPreventScroll.js
|
||
var cachedSupportsPreventScroll;
|
||
function doesSupportPreventScroll() {
|
||
if (cachedSupportsPreventScroll === void 0) {
|
||
document.createElement("div").focus({
|
||
get preventScroll() {
|
||
cachedSupportsPreventScroll = true;
|
||
return false;
|
||
}
|
||
});
|
||
}
|
||
return cachedSupportsPreventScroll;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/models/gridEditRowModel.js
|
||
var GridEditModes = function(GridEditModes2) {
|
||
GridEditModes2["Cell"] = "cell";
|
||
GridEditModes2["Row"] = "row";
|
||
return GridEditModes2;
|
||
}(GridEditModes || {});
|
||
var GridCellModes = function(GridCellModes2) {
|
||
GridCellModes2["Edit"] = "edit";
|
||
GridCellModes2["View"] = "view";
|
||
return GridCellModes2;
|
||
}(GridCellModes || {});
|
||
var GridRowModes = function(GridRowModes2) {
|
||
GridRowModes2["Edit"] = "edit";
|
||
GridRowModes2["View"] = "view";
|
||
return GridRowModes2;
|
||
}(GridRowModes || {});
|
||
|
||
// node_modules/@mui/x-data-grid/models/gridFilterItem.js
|
||
var GridLogicOperator = function(GridLogicOperator2) {
|
||
GridLogicOperator2["And"] = "and";
|
||
GridLogicOperator2["Or"] = "or";
|
||
return GridLogicOperator2;
|
||
}(GridLogicOperator || {});
|
||
|
||
// node_modules/@mui/x-data-grid/models/params/gridEditCellParams.js
|
||
var GridCellEditStartReasons = function(GridCellEditStartReasons2) {
|
||
GridCellEditStartReasons2["enterKeyDown"] = "enterKeyDown";
|
||
GridCellEditStartReasons2["cellDoubleClick"] = "cellDoubleClick";
|
||
GridCellEditStartReasons2["printableKeyDown"] = "printableKeyDown";
|
||
GridCellEditStartReasons2["deleteKeyDown"] = "deleteKeyDown";
|
||
GridCellEditStartReasons2["pasteKeyDown"] = "pasteKeyDown";
|
||
return GridCellEditStartReasons2;
|
||
}(GridCellEditStartReasons || {});
|
||
var GridCellEditStopReasons = function(GridCellEditStopReasons2) {
|
||
GridCellEditStopReasons2["cellFocusOut"] = "cellFocusOut";
|
||
GridCellEditStopReasons2["escapeKeyDown"] = "escapeKeyDown";
|
||
GridCellEditStopReasons2["enterKeyDown"] = "enterKeyDown";
|
||
GridCellEditStopReasons2["tabKeyDown"] = "tabKeyDown";
|
||
GridCellEditStopReasons2["shiftTabKeyDown"] = "shiftTabKeyDown";
|
||
return GridCellEditStopReasons2;
|
||
}(GridCellEditStopReasons || {});
|
||
|
||
// node_modules/@mui/x-data-grid/models/params/gridRowParams.js
|
||
var GridRowEditStartReasons = function(GridRowEditStartReasons2) {
|
||
GridRowEditStartReasons2["enterKeyDown"] = "enterKeyDown";
|
||
GridRowEditStartReasons2["cellDoubleClick"] = "cellDoubleClick";
|
||
GridRowEditStartReasons2["printableKeyDown"] = "printableKeyDown";
|
||
GridRowEditStartReasons2["deleteKeyDown"] = "deleteKeyDown";
|
||
return GridRowEditStartReasons2;
|
||
}(GridRowEditStartReasons || {});
|
||
var GridRowEditStopReasons = function(GridRowEditStopReasons2) {
|
||
GridRowEditStopReasons2["rowFocusOut"] = "rowFocusOut";
|
||
GridRowEditStopReasons2["escapeKeyDown"] = "escapeKeyDown";
|
||
GridRowEditStopReasons2["enterKeyDown"] = "enterKeyDown";
|
||
GridRowEditStopReasons2["tabKeyDown"] = "tabKeyDown";
|
||
GridRowEditStopReasons2["shiftTabKeyDown"] = "shiftTabKeyDown";
|
||
return GridRowEditStopReasons2;
|
||
}(GridRowEditStopReasons || {});
|
||
|
||
// node_modules/@mui/x-data-grid/models/gridColumnGrouping.js
|
||
function isLeaf(node) {
|
||
return node.field !== void 0;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rows/useGridParamsApi.js
|
||
var React16 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/utils/domUtils.js
|
||
function isOverflown(element) {
|
||
return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
|
||
}
|
||
function findParentElementFromClassName(elem, className) {
|
||
return elem.closest(`.${className}`);
|
||
}
|
||
function escapeOperandAttributeSelector(operand) {
|
||
return operand.replace(/["\\]/g, "\\$&");
|
||
}
|
||
function getGridColumnHeaderElement(root, field) {
|
||
return root.querySelector(`[role="columnheader"][data-field="${escapeOperandAttributeSelector(field)}"]`);
|
||
}
|
||
function getGridRowElementSelector(id) {
|
||
return `.${gridClasses.row}[data-id="${escapeOperandAttributeSelector(String(id))}"]`;
|
||
}
|
||
function getGridRowElement(root, id) {
|
||
return root.querySelector(getGridRowElementSelector(id));
|
||
}
|
||
function getGridCellElement(root, {
|
||
id,
|
||
field
|
||
}) {
|
||
const rowSelector = getGridRowElementSelector(id);
|
||
const cellSelector = `.${gridClasses.cell}[data-field="${escapeOperandAttributeSelector(field)}"]`;
|
||
const selector = `${rowSelector} ${cellSelector}`;
|
||
return root.querySelector(selector);
|
||
}
|
||
function isEventTargetInPortal(event) {
|
||
if (
|
||
// The target is not an element when triggered by a Select inside the cell
|
||
// See https://github.com/mui/material-ui/issues/10534
|
||
event.target.nodeType === 1 && !event.currentTarget.contains(event.target)
|
||
) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridApiMethod.js
|
||
var React15 = __toESM(require_react());
|
||
function useGridApiMethod(privateApiRef, apiMethods, visibility) {
|
||
const isFirstRender = React15.useRef(true);
|
||
React15.useEffect(() => {
|
||
isFirstRender.current = false;
|
||
privateApiRef.current.register(visibility, apiMethods);
|
||
}, [privateApiRef, visibility, apiMethods]);
|
||
if (isFirstRender.current) {
|
||
privateApiRef.current.register(visibility, apiMethods);
|
||
}
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rows/useGridParamsApi.js
|
||
var MissingRowIdError = class extends Error {
|
||
};
|
||
function useGridParamsApi(apiRef, props) {
|
||
const {
|
||
getRowId
|
||
} = props;
|
||
const getColumnHeaderParams = React16.useCallback((field) => ({
|
||
field,
|
||
colDef: apiRef.current.getColumn(field)
|
||
}), [apiRef]);
|
||
const getRowParams = React16.useCallback((id) => {
|
||
const row = apiRef.current.getRow(id);
|
||
if (!row) {
|
||
throw new MissingRowIdError(`No row with id #${id} found`);
|
||
}
|
||
const params = {
|
||
id,
|
||
columns: apiRef.current.getAllColumns(),
|
||
row
|
||
};
|
||
return params;
|
||
}, [apiRef]);
|
||
const getBaseCellParams = React16.useCallback((id, field) => {
|
||
const row = apiRef.current.getRow(id);
|
||
const rowNode = apiRef.current.getRowNode(id);
|
||
if (!row || !rowNode) {
|
||
throw new MissingRowIdError(`No row with id #${id} found`);
|
||
}
|
||
const cellFocus = gridFocusCellSelector(apiRef);
|
||
const cellTabIndex = gridTabIndexCellSelector(apiRef);
|
||
const params = {
|
||
id,
|
||
field,
|
||
row,
|
||
rowNode,
|
||
value: row[field],
|
||
colDef: apiRef.current.getColumn(field),
|
||
cellMode: apiRef.current.getCellMode(id, field),
|
||
api: apiRef.current,
|
||
hasFocus: cellFocus !== null && cellFocus.field === field && cellFocus.id === id,
|
||
tabIndex: cellTabIndex && cellTabIndex.field === field && cellTabIndex.id === id ? 0 : -1
|
||
};
|
||
return params;
|
||
}, [apiRef]);
|
||
const getCellParams = React16.useCallback((id, field) => {
|
||
const colDef = apiRef.current.getColumn(field);
|
||
const value = apiRef.current.getCellValue(id, field);
|
||
const row = apiRef.current.getRow(id);
|
||
const rowNode = apiRef.current.getRowNode(id);
|
||
if (!row || !rowNode) {
|
||
throw new MissingRowIdError(`No row with id #${id} found`);
|
||
}
|
||
const cellFocus = gridFocusCellSelector(apiRef);
|
||
const cellTabIndex = gridTabIndexCellSelector(apiRef);
|
||
const params = {
|
||
id,
|
||
field,
|
||
row,
|
||
rowNode,
|
||
colDef,
|
||
cellMode: apiRef.current.getCellMode(id, field),
|
||
hasFocus: cellFocus !== null && cellFocus.field === field && cellFocus.id === id,
|
||
tabIndex: cellTabIndex && cellTabIndex.field === field && cellTabIndex.id === id ? 0 : -1,
|
||
value,
|
||
formattedValue: value,
|
||
isEditable: false
|
||
};
|
||
if (colDef && colDef.valueFormatter) {
|
||
params.formattedValue = colDef.valueFormatter({
|
||
id,
|
||
field: params.field,
|
||
value: params.value,
|
||
api: apiRef.current
|
||
});
|
||
}
|
||
params.isEditable = colDef && apiRef.current.isCellEditable(params);
|
||
return params;
|
||
}, [apiRef]);
|
||
const getCellValue = React16.useCallback((id, field) => {
|
||
const colDef = apiRef.current.getColumn(field);
|
||
if (!colDef || !colDef.valueGetter) {
|
||
const rowModel = apiRef.current.getRow(id);
|
||
if (!rowModel) {
|
||
throw new MissingRowIdError(`No row with id #${id} found`);
|
||
}
|
||
return rowModel[field];
|
||
}
|
||
return colDef.valueGetter(getBaseCellParams(id, field));
|
||
}, [apiRef, getBaseCellParams]);
|
||
const getRowValue = React16.useCallback((row, colDef) => {
|
||
var _getRowId;
|
||
const id = GRID_ID_AUTOGENERATED in row ? row[GRID_ID_AUTOGENERATED] : (_getRowId = getRowId == null ? void 0 : getRowId(row)) != null ? _getRowId : row.id;
|
||
const field = colDef.field;
|
||
if (!colDef || !colDef.valueGetter) {
|
||
return row[field];
|
||
}
|
||
return colDef.valueGetter(getBaseCellParams(id, field));
|
||
}, [getBaseCellParams, getRowId]);
|
||
const getRowFormattedValue = React16.useCallback((row, colDef) => {
|
||
var _ref;
|
||
const value = getRowValue(row, colDef);
|
||
if (!colDef || !colDef.valueFormatter) {
|
||
return value;
|
||
}
|
||
const id = (_ref = getRowId ? getRowId(row) : row.id) != null ? _ref : row[GRID_ID_AUTOGENERATED];
|
||
const field = colDef.field;
|
||
return colDef.valueFormatter({
|
||
id,
|
||
field,
|
||
value,
|
||
api: apiRef.current
|
||
});
|
||
}, [apiRef, getRowId, getRowValue]);
|
||
const getColumnHeaderElement = React16.useCallback((field) => {
|
||
if (!apiRef.current.rootElementRef.current) {
|
||
return null;
|
||
}
|
||
return getGridColumnHeaderElement(apiRef.current.rootElementRef.current, field);
|
||
}, [apiRef]);
|
||
const getRowElement = React16.useCallback((id) => {
|
||
if (!apiRef.current.rootElementRef.current) {
|
||
return null;
|
||
}
|
||
return getGridRowElement(apiRef.current.rootElementRef.current, id);
|
||
}, [apiRef]);
|
||
const getCellElement = React16.useCallback((id, field) => {
|
||
if (!apiRef.current.rootElementRef.current) {
|
||
return null;
|
||
}
|
||
return getGridCellElement(apiRef.current.rootElementRef.current, {
|
||
id,
|
||
field
|
||
});
|
||
}, [apiRef]);
|
||
const paramsApi = {
|
||
getCellValue,
|
||
getCellParams,
|
||
getCellElement,
|
||
getRowValue,
|
||
getRowFormattedValue,
|
||
getRowParams,
|
||
getRowElement,
|
||
getColumnHeaderParams,
|
||
getColumnHeaderElement
|
||
};
|
||
useGridApiMethod(apiRef, paramsApi, "public");
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridCell.js
|
||
var import_jsx_runtime6 = __toESM(require_jsx_runtime());
|
||
var _excluded = ["changeReason", "unstable_updateValueOnRender"];
|
||
var _excluded2 = ["align", "children", "editCellState", "colIndex", "column", "cellMode", "field", "formattedValue", "hasFocus", "height", "isEditable", "isSelected", "rowId", "tabIndex", "style", "value", "width", "className", "showRightBorder", "extendRowFullWidth", "row", "colSpan", "disableDragEvents", "isNotVisible", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"];
|
||
var _excluded3 = ["column", "rowId", "editCellState", "align", "children", "colIndex", "height", "width", "className", "showRightBorder", "extendRowFullWidth", "row", "colSpan", "disableDragEvents", "isNotVisible", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver", "style"];
|
||
var _excluded4 = ["changeReason", "unstable_updateValueOnRender"];
|
||
var EMPTY_CELL_PARAMS = {
|
||
id: -1,
|
||
field: "__unset__",
|
||
row: {},
|
||
rowNode: {
|
||
id: -1,
|
||
depth: 0,
|
||
type: "leaf",
|
||
parent: -1,
|
||
groupingKey: null
|
||
},
|
||
colDef: {
|
||
type: "string",
|
||
field: "__unset__",
|
||
computedWidth: 0
|
||
},
|
||
cellMode: GridCellModes.View,
|
||
hasFocus: false,
|
||
tabIndex: -1,
|
||
value: null,
|
||
formattedValue: "__unset__",
|
||
isEditable: false,
|
||
api: {}
|
||
};
|
||
var useUtilityClasses3 = (ownerState) => {
|
||
const {
|
||
align,
|
||
showRightBorder,
|
||
isEditable,
|
||
isSelected,
|
||
isSelectionMode,
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["cell", `cell--text${capitalize(align)}`, isEditable && "cell--editable", isSelected && "selected", showRightBorder && "cell--withRightBorder", isSelectionMode && !isEditable && "cell--selectionMode", "withBorderColor"],
|
||
content: ["cellContent"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridCellWrapper = React17.forwardRef((props, ref) => {
|
||
const {
|
||
column,
|
||
rowId,
|
||
editCellState
|
||
} = props;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const field = column.field;
|
||
const cellParamsWithAPI = useGridSelector(apiRef, () => {
|
||
try {
|
||
const cellParams = apiRef.current.getCellParams(rowId, field);
|
||
const result = cellParams;
|
||
result.api = apiRef.current;
|
||
return result;
|
||
} catch (e) {
|
||
if (e instanceof MissingRowIdError) {
|
||
return EMPTY_CELL_PARAMS;
|
||
}
|
||
throw e;
|
||
}
|
||
}, objectShallowCompare);
|
||
const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors("isCellSelected", false, {
|
||
id: rowId,
|
||
field
|
||
}));
|
||
if (cellParamsWithAPI === EMPTY_CELL_PARAMS) {
|
||
return null;
|
||
}
|
||
const {
|
||
cellMode,
|
||
hasFocus,
|
||
isEditable,
|
||
value,
|
||
formattedValue
|
||
} = cellParamsWithAPI;
|
||
const managesOwnFocus = column.type === "actions";
|
||
const tabIndex = (cellMode === "view" || !isEditable) && !managesOwnFocus ? cellParamsWithAPI.tabIndex : -1;
|
||
const {
|
||
classes: rootClasses,
|
||
getCellClassName
|
||
} = rootProps;
|
||
const classNames = apiRef.current.unstable_applyPipeProcessors("cellClassName", [], {
|
||
id: rowId,
|
||
field
|
||
});
|
||
if (column.cellClassName) {
|
||
classNames.push(typeof column.cellClassName === "function" ? column.cellClassName(cellParamsWithAPI) : column.cellClassName);
|
||
}
|
||
if (getCellClassName) {
|
||
classNames.push(getCellClassName(cellParamsWithAPI));
|
||
}
|
||
let children;
|
||
if (editCellState == null && column.renderCell) {
|
||
children = column.renderCell(cellParamsWithAPI);
|
||
classNames.push(gridClasses["cell--withRenderer"]);
|
||
classNames.push(rootClasses == null ? void 0 : rootClasses["cell--withRenderer"]);
|
||
}
|
||
if (editCellState != null && column.renderEditCell) {
|
||
const updatedRow = apiRef.current.getRowWithUpdatedValues(rowId, column.field);
|
||
const editCellStateRest = _objectWithoutPropertiesLoose(editCellState, _excluded);
|
||
const params = _extends({}, cellParamsWithAPI, {
|
||
row: updatedRow
|
||
}, editCellStateRest);
|
||
children = column.renderEditCell(params);
|
||
classNames.push(gridClasses["cell--editing"]);
|
||
classNames.push(rootClasses == null ? void 0 : rootClasses["cell--editing"]);
|
||
}
|
||
const {
|
||
slots
|
||
} = rootProps;
|
||
const CellComponent = slots.cell;
|
||
const cellProps = _extends({}, props, {
|
||
ref,
|
||
field,
|
||
formattedValue,
|
||
hasFocus,
|
||
isEditable,
|
||
isSelected,
|
||
value,
|
||
cellMode,
|
||
children,
|
||
tabIndex,
|
||
className: clsx_default(classNames)
|
||
});
|
||
return React17.createElement(CellComponent, cellProps);
|
||
});
|
||
var GridCell = React17.forwardRef((props, ref) => {
|
||
var _rootProps$experiment, _rootProps$experiment2;
|
||
const {
|
||
align,
|
||
children: childrenProp,
|
||
colIndex,
|
||
column,
|
||
cellMode,
|
||
field,
|
||
formattedValue,
|
||
hasFocus,
|
||
height,
|
||
isEditable,
|
||
isSelected,
|
||
rowId,
|
||
tabIndex,
|
||
style: styleProp,
|
||
value,
|
||
width,
|
||
className,
|
||
showRightBorder,
|
||
colSpan,
|
||
disableDragEvents,
|
||
isNotVisible,
|
||
onClick,
|
||
onDoubleClick,
|
||
onMouseDown,
|
||
onMouseUp,
|
||
onMouseOver,
|
||
onKeyDown,
|
||
onKeyUp,
|
||
onDragEnter,
|
||
onDragOver
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded2);
|
||
const valueToRender = formattedValue == null ? value : formattedValue;
|
||
const cellRef = React17.useRef(null);
|
||
const handleRef = useForkRef(ref, cellRef);
|
||
const focusElementRef = React17.useRef(null);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = {
|
||
align,
|
||
showRightBorder,
|
||
isEditable,
|
||
classes: rootProps.classes,
|
||
isSelected
|
||
};
|
||
const classes = useUtilityClasses3(ownerState);
|
||
const publishMouseUp = React17.useCallback((eventName) => (event) => {
|
||
const params = apiRef.current.getCellParams(rowId, field || "");
|
||
apiRef.current.publishEvent(eventName, params, event);
|
||
if (onMouseUp) {
|
||
onMouseUp(event);
|
||
}
|
||
}, [apiRef, field, onMouseUp, rowId]);
|
||
const publishMouseDown = React17.useCallback((eventName) => (event) => {
|
||
const params = apiRef.current.getCellParams(rowId, field || "");
|
||
apiRef.current.publishEvent(eventName, params, event);
|
||
if (onMouseDown) {
|
||
onMouseDown(event);
|
||
}
|
||
}, [apiRef, field, onMouseDown, rowId]);
|
||
const publish = React17.useCallback((eventName, propHandler) => (event) => {
|
||
if (!apiRef.current.getRow(rowId)) {
|
||
return;
|
||
}
|
||
const params = apiRef.current.getCellParams(rowId, field || "");
|
||
apiRef.current.publishEvent(eventName, params, event);
|
||
if (propHandler) {
|
||
propHandler(event);
|
||
}
|
||
}, [apiRef, field, rowId]);
|
||
const style = React17.useMemo(() => {
|
||
if (isNotVisible) {
|
||
return {
|
||
padding: 0,
|
||
opacity: 0,
|
||
width: 0,
|
||
border: 0
|
||
};
|
||
}
|
||
const cellStyle = _extends({
|
||
minWidth: width,
|
||
maxWidth: width,
|
||
minHeight: height,
|
||
maxHeight: height === "auto" ? "none" : height
|
||
}, styleProp);
|
||
return cellStyle;
|
||
}, [width, height, isNotVisible, styleProp]);
|
||
React17.useEffect(() => {
|
||
if (!hasFocus || cellMode === GridCellModes.Edit) {
|
||
return;
|
||
}
|
||
const doc = ownerDocument(apiRef.current.rootElementRef.current);
|
||
if (cellRef.current && !cellRef.current.contains(doc.activeElement)) {
|
||
const focusableElement = cellRef.current.querySelector('[tabindex="0"]');
|
||
const elementToFocus = focusElementRef.current || focusableElement || cellRef.current;
|
||
if (doesSupportPreventScroll()) {
|
||
elementToFocus.focus({
|
||
preventScroll: true
|
||
});
|
||
} else {
|
||
const scrollPosition = apiRef.current.getScrollPosition();
|
||
elementToFocus.focus();
|
||
apiRef.current.scroll(scrollPosition);
|
||
}
|
||
}
|
||
}, [hasFocus, cellMode, apiRef]);
|
||
let handleFocus = other.onFocus;
|
||
if (false) {
|
||
handleFocus = (event) => {
|
||
const focusedCell = gridFocusCellSelector(apiRef);
|
||
if ((focusedCell == null ? void 0 : focusedCell.id) === rowId && focusedCell.field === field) {
|
||
if (typeof other.onFocus === "function") {
|
||
other.onFocus(event);
|
||
}
|
||
return;
|
||
}
|
||
if (!warnedOnce) {
|
||
console.warn([`MUI: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell == null ? void 0 : focusedCell.id}, field=${focusedCell == null ? void 0 : focusedCell.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", "Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state."].join("\n"));
|
||
warnedOnce = true;
|
||
}
|
||
};
|
||
}
|
||
const managesOwnFocus = column.type === "actions";
|
||
let children = childrenProp;
|
||
if (children === void 0) {
|
||
const valueString = valueToRender == null ? void 0 : valueToRender.toString();
|
||
children = (0, import_jsx_runtime6.jsx)("div", {
|
||
className: classes.content,
|
||
title: valueString,
|
||
role: "presentation",
|
||
children: valueString
|
||
});
|
||
}
|
||
if (React17.isValidElement(children) && managesOwnFocus) {
|
||
children = React17.cloneElement(children, {
|
||
focusElementRef
|
||
});
|
||
}
|
||
const draggableEventHandlers = disableDragEvents ? null : {
|
||
onDragEnter: publish("cellDragEnter", onDragEnter),
|
||
onDragOver: publish("cellDragOver", onDragOver)
|
||
};
|
||
const ariaV7 = (_rootProps$experiment2 = rootProps.experimentalFeatures) == null ? void 0 : _rootProps$experiment2.ariaV7;
|
||
return (
|
||
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
||
(0, import_jsx_runtime6.jsx)("div", _extends({
|
||
ref: handleRef,
|
||
className: clsx_default(className, classes.root),
|
||
role: ariaV7 ? "gridcell" : "cell",
|
||
"data-field": field,
|
||
"data-colindex": colIndex,
|
||
"aria-colindex": colIndex + 1,
|
||
"aria-colspan": colSpan,
|
||
style,
|
||
tabIndex,
|
||
onClick: publish("cellClick", onClick),
|
||
onDoubleClick: publish("cellDoubleClick", onDoubleClick),
|
||
onMouseOver: publish("cellMouseOver", onMouseOver),
|
||
onMouseDown: publishMouseDown("cellMouseDown"),
|
||
onMouseUp: publishMouseUp("cellMouseUp"),
|
||
onKeyDown: publish("cellKeyDown", onKeyDown),
|
||
onKeyUp: publish("cellKeyUp", onKeyUp)
|
||
}, draggableEventHandlers, other, {
|
||
onFocus: handleFocus,
|
||
children
|
||
}))
|
||
);
|
||
});
|
||
var MemoizedCellWrapper = fastMemo(GridCellWrapper);
|
||
true ? GridCellWrapper.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
align: import_prop_types3.default.oneOf(["center", "left", "right"]),
|
||
className: import_prop_types3.default.string,
|
||
colIndex: import_prop_types3.default.number,
|
||
colSpan: import_prop_types3.default.number,
|
||
column: import_prop_types3.default.object,
|
||
disableDragEvents: import_prop_types3.default.bool,
|
||
height: import_prop_types3.default.oneOfType([import_prop_types3.default.oneOf(["auto"]), import_prop_types3.default.number]),
|
||
onClick: import_prop_types3.default.func,
|
||
onDoubleClick: import_prop_types3.default.func,
|
||
onDragEnter: import_prop_types3.default.func,
|
||
onDragOver: import_prop_types3.default.func,
|
||
onKeyDown: import_prop_types3.default.func,
|
||
onMouseDown: import_prop_types3.default.func,
|
||
onMouseUp: import_prop_types3.default.func,
|
||
rowId: import_prop_types3.default.oneOfType([import_prop_types3.default.number, import_prop_types3.default.string]),
|
||
showRightBorder: import_prop_types3.default.bool,
|
||
width: import_prop_types3.default.number
|
||
} : void 0;
|
||
true ? GridCell.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
align: import_prop_types3.default.oneOf(["center", "left", "right"]),
|
||
cellMode: import_prop_types3.default.oneOf(["edit", "view"]),
|
||
children: import_prop_types3.default.node,
|
||
className: import_prop_types3.default.string,
|
||
colIndex: import_prop_types3.default.number,
|
||
colSpan: import_prop_types3.default.number,
|
||
column: import_prop_types3.default.object,
|
||
disableDragEvents: import_prop_types3.default.bool,
|
||
editCellState: import_prop_types3.default.shape({
|
||
changeReason: import_prop_types3.default.oneOf(["debouncedSetEditCellValue", "setEditCellValue"]),
|
||
isProcessingProps: import_prop_types3.default.bool,
|
||
isValidating: import_prop_types3.default.bool,
|
||
value: import_prop_types3.default.any
|
||
}),
|
||
isNotVisible: import_prop_types3.default.bool,
|
||
height: import_prop_types3.default.oneOfType([import_prop_types3.default.oneOf(["auto"]), import_prop_types3.default.number]),
|
||
onClick: import_prop_types3.default.func,
|
||
onDoubleClick: import_prop_types3.default.func,
|
||
onDragEnter: import_prop_types3.default.func,
|
||
onDragOver: import_prop_types3.default.func,
|
||
onKeyDown: import_prop_types3.default.func,
|
||
onMouseDown: import_prop_types3.default.func,
|
||
onMouseUp: import_prop_types3.default.func,
|
||
rowId: import_prop_types3.default.oneOfType([import_prop_types3.default.number, import_prop_types3.default.string]),
|
||
showRightBorder: import_prop_types3.default.bool,
|
||
width: import_prop_types3.default.number
|
||
} : void 0;
|
||
var GridCellV7 = React17.forwardRef((props, ref) => {
|
||
var _getActions, _ref, _rootProps$unstable_c, _rootProps$experiment3, _rootProps$experiment4;
|
||
const {
|
||
column,
|
||
rowId,
|
||
editCellState,
|
||
align,
|
||
colIndex,
|
||
height,
|
||
width,
|
||
className,
|
||
showRightBorder,
|
||
colSpan,
|
||
disableDragEvents,
|
||
isNotVisible,
|
||
onClick,
|
||
onDoubleClick,
|
||
onMouseDown,
|
||
onMouseUp,
|
||
onMouseOver,
|
||
onKeyDown,
|
||
onKeyUp,
|
||
onDragEnter,
|
||
onDragOver,
|
||
style: styleProp
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded3);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const field = column.field;
|
||
const cellParamsWithAPI = useGridSelector(apiRef, () => {
|
||
try {
|
||
const cellParams = apiRef.current.getCellParams(rowId, field);
|
||
const result = cellParams;
|
||
result.api = apiRef.current;
|
||
return result;
|
||
} catch (e) {
|
||
if (e instanceof MissingRowIdError) {
|
||
return EMPTY_CELL_PARAMS;
|
||
}
|
||
throw e;
|
||
}
|
||
}, objectShallowCompare);
|
||
const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors("isCellSelected", false, {
|
||
id: rowId,
|
||
field
|
||
}));
|
||
const {
|
||
cellMode,
|
||
hasFocus,
|
||
isEditable,
|
||
value,
|
||
formattedValue
|
||
} = cellParamsWithAPI;
|
||
const canManageOwnFocus = column.type === "actions" && ((_getActions = (_ref = column).getActions) == null ? void 0 : _getActions.call(_ref, apiRef.current.getRowParams(rowId)).some((action) => !action.props.disabled));
|
||
const tabIndex = (cellMode === "view" || !isEditable) && !canManageOwnFocus ? cellParamsWithAPI.tabIndex : -1;
|
||
const {
|
||
classes: rootClasses,
|
||
getCellClassName
|
||
} = rootProps;
|
||
const classNames = apiRef.current.unstable_applyPipeProcessors("cellClassName", [], {
|
||
id: rowId,
|
||
field
|
||
});
|
||
if (column.cellClassName) {
|
||
classNames.push(typeof column.cellClassName === "function" ? column.cellClassName(cellParamsWithAPI) : column.cellClassName);
|
||
}
|
||
if (getCellClassName) {
|
||
classNames.push(getCellClassName(cellParamsWithAPI));
|
||
}
|
||
const valueToRender = formattedValue == null ? value : formattedValue;
|
||
const cellRef = React17.useRef(null);
|
||
const handleRef = useForkRef(ref, cellRef);
|
||
const focusElementRef = React17.useRef(null);
|
||
const isSelectionMode = (_rootProps$unstable_c = rootProps.unstable_cellSelection) != null ? _rootProps$unstable_c : false;
|
||
const ownerState = {
|
||
align,
|
||
showRightBorder,
|
||
isEditable,
|
||
classes: rootProps.classes,
|
||
isSelected,
|
||
isSelectionMode
|
||
};
|
||
const classes = useUtilityClasses3(ownerState);
|
||
const publishMouseUp = React17.useCallback((eventName) => (event) => {
|
||
const params = apiRef.current.getCellParams(rowId, field || "");
|
||
apiRef.current.publishEvent(eventName, params, event);
|
||
if (onMouseUp) {
|
||
onMouseUp(event);
|
||
}
|
||
}, [apiRef, field, onMouseUp, rowId]);
|
||
const publishMouseDown = React17.useCallback((eventName) => (event) => {
|
||
const params = apiRef.current.getCellParams(rowId, field || "");
|
||
apiRef.current.publishEvent(eventName, params, event);
|
||
if (onMouseDown) {
|
||
onMouseDown(event);
|
||
}
|
||
}, [apiRef, field, onMouseDown, rowId]);
|
||
const publish = React17.useCallback((eventName, propHandler) => (event) => {
|
||
if (!apiRef.current.getRow(rowId)) {
|
||
return;
|
||
}
|
||
const params = apiRef.current.getCellParams(rowId, field || "");
|
||
apiRef.current.publishEvent(eventName, params, event);
|
||
if (propHandler) {
|
||
propHandler(event);
|
||
}
|
||
}, [apiRef, field, rowId]);
|
||
const style = React17.useMemo(() => {
|
||
if (isNotVisible) {
|
||
return _extends({
|
||
padding: 0,
|
||
opacity: 0,
|
||
width: 0,
|
||
border: 0
|
||
}, styleProp);
|
||
}
|
||
const cellStyle = _extends({
|
||
minWidth: width,
|
||
maxWidth: width,
|
||
minHeight: height,
|
||
maxHeight: height === "auto" ? "none" : height
|
||
}, styleProp);
|
||
return cellStyle;
|
||
}, [width, height, isNotVisible, styleProp]);
|
||
React17.useEffect(() => {
|
||
if (!hasFocus || cellMode === GridCellModes.Edit) {
|
||
return;
|
||
}
|
||
const doc = ownerDocument(apiRef.current.rootElementRef.current);
|
||
if (cellRef.current && !cellRef.current.contains(doc.activeElement)) {
|
||
const focusableElement = cellRef.current.querySelector('[tabindex="0"]');
|
||
const elementToFocus = focusElementRef.current || focusableElement || cellRef.current;
|
||
if (doesSupportPreventScroll()) {
|
||
elementToFocus.focus({
|
||
preventScroll: true
|
||
});
|
||
} else {
|
||
const scrollPosition = apiRef.current.getScrollPosition();
|
||
elementToFocus.focus();
|
||
apiRef.current.scroll(scrollPosition);
|
||
}
|
||
}
|
||
}, [hasFocus, cellMode, apiRef]);
|
||
if (cellParamsWithAPI === EMPTY_CELL_PARAMS) {
|
||
return null;
|
||
}
|
||
let handleFocus = other.onFocus;
|
||
if (false) {
|
||
handleFocus = (event) => {
|
||
const focusedCell = gridFocusCellSelector(apiRef);
|
||
if ((focusedCell == null ? void 0 : focusedCell.id) === rowId && focusedCell.field === field) {
|
||
if (typeof other.onFocus === "function") {
|
||
other.onFocus(event);
|
||
}
|
||
return;
|
||
}
|
||
if (!warnedOnce) {
|
||
console.warn([`MUI: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell == null ? void 0 : focusedCell.id}, field=${focusedCell == null ? void 0 : focusedCell.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", "Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state."].join("\n"));
|
||
warnedOnce = true;
|
||
}
|
||
};
|
||
}
|
||
let children;
|
||
if (editCellState == null && column.renderCell) {
|
||
children = column.renderCell(cellParamsWithAPI);
|
||
classNames.push(gridClasses["cell--withRenderer"]);
|
||
classNames.push(rootClasses == null ? void 0 : rootClasses["cell--withRenderer"]);
|
||
}
|
||
if (editCellState != null && column.renderEditCell) {
|
||
const updatedRow = apiRef.current.getRowWithUpdatedValues(rowId, column.field);
|
||
const editCellStateRest = _objectWithoutPropertiesLoose(editCellState, _excluded4);
|
||
const params = _extends({}, cellParamsWithAPI, {
|
||
row: updatedRow
|
||
}, editCellStateRest);
|
||
children = column.renderEditCell(params);
|
||
classNames.push(gridClasses["cell--editing"]);
|
||
classNames.push(rootClasses == null ? void 0 : rootClasses["cell--editing"]);
|
||
}
|
||
if (children === void 0) {
|
||
const valueString = valueToRender == null ? void 0 : valueToRender.toString();
|
||
children = (0, import_jsx_runtime6.jsx)("div", {
|
||
className: classes.content,
|
||
title: valueString,
|
||
role: "presentation",
|
||
children: valueString
|
||
});
|
||
}
|
||
if (React17.isValidElement(children) && canManageOwnFocus) {
|
||
children = React17.cloneElement(children, {
|
||
focusElementRef
|
||
});
|
||
}
|
||
const draggableEventHandlers = disableDragEvents ? null : {
|
||
onDragEnter: publish("cellDragEnter", onDragEnter),
|
||
onDragOver: publish("cellDragOver", onDragOver)
|
||
};
|
||
const ariaV7 = (_rootProps$experiment4 = rootProps.experimentalFeatures) == null ? void 0 : _rootProps$experiment4.ariaV7;
|
||
return (
|
||
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
||
(0, import_jsx_runtime6.jsx)("div", _extends({
|
||
ref: handleRef,
|
||
className: clsx_default(className, classNames, classes.root),
|
||
role: ariaV7 ? "gridcell" : "cell",
|
||
"data-field": field,
|
||
"data-colindex": colIndex,
|
||
"aria-colindex": colIndex + 1,
|
||
"aria-colspan": colSpan,
|
||
style,
|
||
tabIndex,
|
||
onClick: publish("cellClick", onClick),
|
||
onDoubleClick: publish("cellDoubleClick", onDoubleClick),
|
||
onMouseOver: publish("cellMouseOver", onMouseOver),
|
||
onMouseDown: publishMouseDown("cellMouseDown"),
|
||
onMouseUp: publishMouseUp("cellMouseUp"),
|
||
onKeyDown: publish("cellKeyDown", onKeyDown),
|
||
onKeyUp: publish("cellKeyUp", onKeyUp)
|
||
}, draggableEventHandlers, other, {
|
||
onFocus: handleFocus,
|
||
children
|
||
}))
|
||
);
|
||
});
|
||
true ? GridCellV7.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
align: import_prop_types3.default.oneOf(["center", "left", "right"]).isRequired,
|
||
className: import_prop_types3.default.string,
|
||
colIndex: import_prop_types3.default.number.isRequired,
|
||
colSpan: import_prop_types3.default.number,
|
||
column: import_prop_types3.default.object.isRequired,
|
||
disableDragEvents: import_prop_types3.default.bool,
|
||
editCellState: import_prop_types3.default.shape({
|
||
changeReason: import_prop_types3.default.oneOf(["debouncedSetEditCellValue", "setEditCellValue"]),
|
||
isProcessingProps: import_prop_types3.default.bool,
|
||
isValidating: import_prop_types3.default.bool,
|
||
value: import_prop_types3.default.any
|
||
}),
|
||
height: import_prop_types3.default.oneOfType([import_prop_types3.default.oneOf(["auto"]), import_prop_types3.default.number]).isRequired,
|
||
isNotVisible: import_prop_types3.default.bool,
|
||
onClick: import_prop_types3.default.func,
|
||
onDoubleClick: import_prop_types3.default.func,
|
||
onDragEnter: import_prop_types3.default.func,
|
||
onDragOver: import_prop_types3.default.func,
|
||
onKeyDown: import_prop_types3.default.func,
|
||
onMouseDown: import_prop_types3.default.func,
|
||
onMouseUp: import_prop_types3.default.func,
|
||
rowId: import_prop_types3.default.oneOfType([import_prop_types3.default.number, import_prop_types3.default.string]).isRequired,
|
||
showRightBorder: import_prop_types3.default.bool,
|
||
width: import_prop_types3.default.number.isRequired
|
||
} : void 0;
|
||
var MemoizedGridCellV7 = fastMemo(GridCellV7);
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridBooleanCell.js
|
||
init_extends();
|
||
var React18 = __toESM(require_react());
|
||
var import_prop_types4 = __toESM(require_prop_types());
|
||
var import_jsx_runtime7 = __toESM(require_jsx_runtime());
|
||
var _excluded5 = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "hasFocus", "tabIndex"];
|
||
var useUtilityClasses4 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["booleanCell"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function GridBooleanCellRaw(props) {
|
||
const {
|
||
value
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded5);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = {
|
||
classes: rootProps.classes
|
||
};
|
||
const classes = useUtilityClasses4(ownerState);
|
||
const Icon = React18.useMemo(() => value ? rootProps.slots.booleanCellTrueIcon : rootProps.slots.booleanCellFalseIcon, [rootProps.slots.booleanCellFalseIcon, rootProps.slots.booleanCellTrueIcon, value]);
|
||
return (0, import_jsx_runtime7.jsx)(Icon, _extends({
|
||
fontSize: "small",
|
||
className: classes.root,
|
||
titleAccess: apiRef.current.getLocaleText(value ? "booleanCellTrueLabel" : "booleanCellFalseLabel"),
|
||
"data-value": Boolean(value)
|
||
}, other));
|
||
}
|
||
true ? GridBooleanCellRaw.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* GridApi that let you manipulate the grid.
|
||
*/
|
||
api: import_prop_types4.default.object.isRequired,
|
||
/**
|
||
* The mode of the cell.
|
||
*/
|
||
cellMode: import_prop_types4.default.oneOf(["edit", "view"]).isRequired,
|
||
/**
|
||
* The column of the row that the current cell belongs to.
|
||
*/
|
||
colDef: import_prop_types4.default.object.isRequired,
|
||
/**
|
||
* The column field of the cell that triggered the event.
|
||
*/
|
||
field: import_prop_types4.default.string.isRequired,
|
||
/**
|
||
* A ref allowing to set imperative focus.
|
||
* It can be passed to the element that should receive focus.
|
||
* @ignore - do not document.
|
||
*/
|
||
focusElementRef: import_prop_types4.default.oneOfType([import_prop_types4.default.func, import_prop_types4.default.shape({
|
||
current: import_prop_types4.default.shape({
|
||
focus: import_prop_types4.default.func.isRequired
|
||
})
|
||
})]),
|
||
/**
|
||
* The cell value formatted with the column valueFormatter.
|
||
*/
|
||
formattedValue: import_prop_types4.default.any,
|
||
/**
|
||
* If true, the cell is the active element.
|
||
*/
|
||
hasFocus: import_prop_types4.default.bool.isRequired,
|
||
/**
|
||
* The grid row id.
|
||
*/
|
||
id: import_prop_types4.default.oneOfType([import_prop_types4.default.number, import_prop_types4.default.string]).isRequired,
|
||
/**
|
||
* If true, the cell is editable.
|
||
*/
|
||
isEditable: import_prop_types4.default.bool,
|
||
/**
|
||
* The row model of the row that the current cell belongs to.
|
||
*/
|
||
row: import_prop_types4.default.any.isRequired,
|
||
/**
|
||
* The node of the row that the current cell belongs to.
|
||
*/
|
||
rowNode: import_prop_types4.default.object.isRequired,
|
||
/**
|
||
* the tabIndex value.
|
||
*/
|
||
tabIndex: import_prop_types4.default.oneOf([-1, 0]).isRequired,
|
||
/**
|
||
* The cell value.
|
||
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
||
*/
|
||
value: import_prop_types4.default.any
|
||
} : void 0;
|
||
var GridBooleanCell = React18.memo(GridBooleanCellRaw);
|
||
var renderBooleanCell = (params) => {
|
||
if (isAutoGeneratedRow(params.rowNode)) {
|
||
return "";
|
||
}
|
||
return (0, import_jsx_runtime7.jsx)(GridBooleanCell, _extends({}, params));
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridEditBooleanCell.js
|
||
init_extends();
|
||
var React19 = __toESM(require_react());
|
||
var import_prop_types5 = __toESM(require_prop_types());
|
||
var import_jsx_runtime8 = __toESM(require_jsx_runtime());
|
||
var _excluded6 = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "className", "hasFocus", "isValidating", "isProcessingProps", "error", "onValueChange"];
|
||
var useUtilityClasses5 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["editBooleanCell"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function GridEditBooleanCell(props) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
id: idProp,
|
||
value,
|
||
field,
|
||
className,
|
||
hasFocus,
|
||
onValueChange
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded6);
|
||
const apiRef = useGridApiContext();
|
||
const inputRef = React19.useRef(null);
|
||
const id = useId();
|
||
const [valueState, setValueState] = React19.useState(value);
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = {
|
||
classes: rootProps.classes
|
||
};
|
||
const classes = useUtilityClasses5(ownerState);
|
||
const handleChange = React19.useCallback(async (event) => {
|
||
const newValue = event.target.checked;
|
||
if (onValueChange) {
|
||
await onValueChange(event, newValue);
|
||
}
|
||
setValueState(newValue);
|
||
await apiRef.current.setEditCellValue({
|
||
id: idProp,
|
||
field,
|
||
value: newValue
|
||
}, event);
|
||
}, [apiRef, field, idProp, onValueChange]);
|
||
React19.useEffect(() => {
|
||
setValueState(value);
|
||
}, [value]);
|
||
useEnhancedEffect_default(() => {
|
||
if (hasFocus) {
|
||
inputRef.current.focus();
|
||
}
|
||
}, [hasFocus]);
|
||
return (0, import_jsx_runtime8.jsx)("label", _extends({
|
||
htmlFor: id,
|
||
className: clsx_default(classes.root, className)
|
||
}, other, {
|
||
children: (0, import_jsx_runtime8.jsx)(rootProps.slots.baseCheckbox, _extends({
|
||
id,
|
||
inputRef,
|
||
checked: Boolean(valueState),
|
||
onChange: handleChange,
|
||
size: "small"
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseCheckbox))
|
||
}));
|
||
}
|
||
true ? GridEditBooleanCell.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* GridApi that let you manipulate the grid.
|
||
*/
|
||
api: import_prop_types5.default.object.isRequired,
|
||
/**
|
||
* The mode of the cell.
|
||
*/
|
||
cellMode: import_prop_types5.default.oneOf(["edit", "view"]).isRequired,
|
||
changeReason: import_prop_types5.default.oneOf(["debouncedSetEditCellValue", "setEditCellValue"]),
|
||
/**
|
||
* The column of the row that the current cell belongs to.
|
||
*/
|
||
colDef: import_prop_types5.default.object.isRequired,
|
||
/**
|
||
* The column field of the cell that triggered the event.
|
||
*/
|
||
field: import_prop_types5.default.string.isRequired,
|
||
/**
|
||
* The cell value formatted with the column valueFormatter.
|
||
*/
|
||
formattedValue: import_prop_types5.default.any,
|
||
/**
|
||
* If true, the cell is the active element.
|
||
*/
|
||
hasFocus: import_prop_types5.default.bool.isRequired,
|
||
/**
|
||
* The grid row id.
|
||
*/
|
||
id: import_prop_types5.default.oneOfType([import_prop_types5.default.number, import_prop_types5.default.string]).isRequired,
|
||
/**
|
||
* If true, the cell is editable.
|
||
*/
|
||
isEditable: import_prop_types5.default.bool,
|
||
isProcessingProps: import_prop_types5.default.bool,
|
||
isValidating: import_prop_types5.default.bool,
|
||
/**
|
||
* Callback called when the value is changed by the user.
|
||
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
||
* @param {boolean} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
|
||
* @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
|
||
*/
|
||
onValueChange: import_prop_types5.default.func,
|
||
/**
|
||
* The row model of the row that the current cell belongs to.
|
||
*/
|
||
row: import_prop_types5.default.any.isRequired,
|
||
/**
|
||
* The node of the row that the current cell belongs to.
|
||
*/
|
||
rowNode: import_prop_types5.default.object.isRequired,
|
||
/**
|
||
* the tabIndex value.
|
||
*/
|
||
tabIndex: import_prop_types5.default.oneOf([-1, 0]).isRequired,
|
||
/**
|
||
* The cell value.
|
||
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
||
*/
|
||
value: import_prop_types5.default.any
|
||
} : void 0;
|
||
var renderEditBooleanCell = (params) => (0, import_jsx_runtime8.jsx)(GridEditBooleanCell, _extends({}, params));
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridEditDateCell.js
|
||
init_extends();
|
||
var React20 = __toESM(require_react());
|
||
var import_prop_types6 = __toESM(require_prop_types());
|
||
var import_jsx_runtime9 = __toESM(require_jsx_runtime());
|
||
var _excluded7 = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "hasFocus", "inputProps", "isValidating", "isProcessingProps", "onValueChange"];
|
||
var StyledInputBase = styled_default2(InputBase_default)({
|
||
fontSize: "inherit"
|
||
});
|
||
var useUtilityClasses6 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["editInputCell"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function GridEditDateCell(props) {
|
||
const {
|
||
id,
|
||
value: valueProp,
|
||
field,
|
||
colDef,
|
||
hasFocus,
|
||
inputProps,
|
||
onValueChange
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded7);
|
||
const isDateTime = colDef.type === "dateTime";
|
||
const apiRef = useGridApiContext();
|
||
const inputRef = React20.useRef();
|
||
const valueTransformed = React20.useMemo(() => {
|
||
let parsedDate;
|
||
if (valueProp == null) {
|
||
parsedDate = null;
|
||
} else if (valueProp instanceof Date) {
|
||
parsedDate = valueProp;
|
||
} else {
|
||
parsedDate = new Date((valueProp != null ? valueProp : "").toString());
|
||
}
|
||
let formattedDate;
|
||
if (parsedDate == null || Number.isNaN(parsedDate.getTime())) {
|
||
formattedDate = "";
|
||
} else {
|
||
const localDate = new Date(parsedDate.getTime() - parsedDate.getTimezoneOffset() * 60 * 1e3);
|
||
formattedDate = localDate.toISOString().substr(0, isDateTime ? 16 : 10);
|
||
}
|
||
return {
|
||
parsed: parsedDate,
|
||
formatted: formattedDate
|
||
};
|
||
}, [valueProp, isDateTime]);
|
||
const [valueState, setValueState] = React20.useState(valueTransformed);
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = {
|
||
classes: rootProps.classes
|
||
};
|
||
const classes = useUtilityClasses6(ownerState);
|
||
const parseValueToDate = React20.useCallback((value) => {
|
||
if (value === "") {
|
||
return null;
|
||
}
|
||
const [date, time] = value.split("T");
|
||
const [year, month, day] = date.split("-");
|
||
const parsedDate = /* @__PURE__ */ new Date();
|
||
parsedDate.setFullYear(Number(year), Number(month) - 1, Number(day));
|
||
parsedDate.setHours(0, 0, 0, 0);
|
||
if (time) {
|
||
const [hours, minutes] = time.split(":");
|
||
parsedDate.setHours(Number(hours), Number(minutes), 0, 0);
|
||
}
|
||
return parsedDate;
|
||
}, []);
|
||
const handleChange = React20.useCallback(async (event) => {
|
||
const newFormattedDate = event.target.value;
|
||
const newParsedDate = parseValueToDate(newFormattedDate);
|
||
if (onValueChange) {
|
||
await onValueChange(event, newParsedDate);
|
||
}
|
||
setValueState({
|
||
parsed: newParsedDate,
|
||
formatted: newFormattedDate
|
||
});
|
||
apiRef.current.setEditCellValue({
|
||
id,
|
||
field,
|
||
value: newParsedDate
|
||
}, event);
|
||
}, [apiRef, field, id, onValueChange, parseValueToDate]);
|
||
React20.useEffect(() => {
|
||
setValueState((state) => {
|
||
var _valueTransformed$par, _state$parsed;
|
||
if (valueTransformed.parsed !== state.parsed && ((_valueTransformed$par = valueTransformed.parsed) == null ? void 0 : _valueTransformed$par.getTime()) !== ((_state$parsed = state.parsed) == null ? void 0 : _state$parsed.getTime())) {
|
||
return valueTransformed;
|
||
}
|
||
return state;
|
||
});
|
||
}, [valueTransformed]);
|
||
useEnhancedEffect_default(() => {
|
||
if (hasFocus) {
|
||
inputRef.current.focus();
|
||
}
|
||
}, [hasFocus]);
|
||
return (0, import_jsx_runtime9.jsx)(StyledInputBase, _extends({
|
||
inputRef,
|
||
fullWidth: true,
|
||
className: classes.root,
|
||
type: isDateTime ? "datetime-local" : "date",
|
||
inputProps: _extends({
|
||
max: isDateTime ? "9999-12-31T23:59" : "9999-12-31"
|
||
}, inputProps),
|
||
value: valueState.formatted,
|
||
onChange: handleChange
|
||
}, other));
|
||
}
|
||
true ? GridEditDateCell.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* GridApi that let you manipulate the grid.
|
||
*/
|
||
api: import_prop_types6.default.object.isRequired,
|
||
/**
|
||
* The mode of the cell.
|
||
*/
|
||
cellMode: import_prop_types6.default.oneOf(["edit", "view"]).isRequired,
|
||
changeReason: import_prop_types6.default.oneOf(["debouncedSetEditCellValue", "setEditCellValue"]),
|
||
/**
|
||
* The column of the row that the current cell belongs to.
|
||
*/
|
||
colDef: import_prop_types6.default.object.isRequired,
|
||
/**
|
||
* The column field of the cell that triggered the event.
|
||
*/
|
||
field: import_prop_types6.default.string.isRequired,
|
||
/**
|
||
* The cell value formatted with the column valueFormatter.
|
||
*/
|
||
formattedValue: import_prop_types6.default.any,
|
||
/**
|
||
* If true, the cell is the active element.
|
||
*/
|
||
hasFocus: import_prop_types6.default.bool.isRequired,
|
||
/**
|
||
* The grid row id.
|
||
*/
|
||
id: import_prop_types6.default.oneOfType([import_prop_types6.default.number, import_prop_types6.default.string]).isRequired,
|
||
/**
|
||
* If true, the cell is editable.
|
||
*/
|
||
isEditable: import_prop_types6.default.bool,
|
||
isProcessingProps: import_prop_types6.default.bool,
|
||
isValidating: import_prop_types6.default.bool,
|
||
/**
|
||
* Callback called when the value is changed by the user.
|
||
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
||
* @param {Date | null} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
|
||
* @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
|
||
*/
|
||
onValueChange: import_prop_types6.default.func,
|
||
/**
|
||
* The row model of the row that the current cell belongs to.
|
||
*/
|
||
row: import_prop_types6.default.any.isRequired,
|
||
/**
|
||
* The node of the row that the current cell belongs to.
|
||
*/
|
||
rowNode: import_prop_types6.default.object.isRequired,
|
||
/**
|
||
* the tabIndex value.
|
||
*/
|
||
tabIndex: import_prop_types6.default.oneOf([-1, 0]).isRequired,
|
||
/**
|
||
* The cell value.
|
||
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
||
*/
|
||
value: import_prop_types6.default.any
|
||
} : void 0;
|
||
var renderEditDateCell = (params) => (0, import_jsx_runtime9.jsx)(GridEditDateCell, _extends({}, params));
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridEditInputCell.js
|
||
init_extends();
|
||
var React21 = __toESM(require_react());
|
||
var import_prop_types7 = __toESM(require_prop_types());
|
||
var import_jsx_runtime10 = __toESM(require_jsx_runtime());
|
||
var _excluded8 = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "hasFocus", "isValidating", "debounceMs", "isProcessingProps", "onValueChange"];
|
||
var useUtilityClasses7 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["editInputCell"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridEditInputCellRoot = styled_default2(InputBase_default, {
|
||
name: "MuiDataGrid",
|
||
slot: "EditInputCell",
|
||
overridesResolver: (props, styles) => styles.editInputCell
|
||
})(({
|
||
theme
|
||
}) => _extends({}, theme.typography.body2, {
|
||
padding: "1px 0",
|
||
"& input": {
|
||
padding: "0 16px",
|
||
height: "100%"
|
||
}
|
||
}));
|
||
var GridEditInputCell = React21.forwardRef((props, ref) => {
|
||
const rootProps = useGridRootProps();
|
||
const {
|
||
id,
|
||
value,
|
||
field,
|
||
colDef,
|
||
hasFocus,
|
||
debounceMs = 200,
|
||
isProcessingProps,
|
||
onValueChange
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded8);
|
||
const apiRef = useGridApiContext();
|
||
const inputRef = React21.useRef();
|
||
const [valueState, setValueState] = React21.useState(value);
|
||
const classes = useUtilityClasses7(rootProps);
|
||
const handleChange = React21.useCallback(async (event) => {
|
||
const newValue = event.target.value;
|
||
if (onValueChange) {
|
||
await onValueChange(event, newValue);
|
||
}
|
||
const column = apiRef.current.getColumn(field);
|
||
let parsedValue = newValue;
|
||
if (column.valueParser) {
|
||
parsedValue = column.valueParser(newValue, apiRef.current.getCellParams(id, field));
|
||
}
|
||
setValueState(parsedValue);
|
||
apiRef.current.setEditCellValue({
|
||
id,
|
||
field,
|
||
value: parsedValue,
|
||
debounceMs,
|
||
unstable_skipValueParser: true
|
||
}, event);
|
||
}, [apiRef, debounceMs, field, id, onValueChange]);
|
||
const meta = apiRef.current.unstable_getEditCellMeta(id, field);
|
||
React21.useEffect(() => {
|
||
if ((meta == null ? void 0 : meta.changeReason) !== "debouncedSetEditCellValue") {
|
||
setValueState(value);
|
||
}
|
||
}, [meta, value]);
|
||
useEnhancedEffect_default(() => {
|
||
if (hasFocus) {
|
||
inputRef.current.focus();
|
||
}
|
||
}, [hasFocus]);
|
||
return (0, import_jsx_runtime10.jsx)(GridEditInputCellRoot, _extends({
|
||
ref,
|
||
inputRef,
|
||
className: classes.root,
|
||
ownerState: rootProps,
|
||
fullWidth: true,
|
||
type: colDef.type === "number" ? colDef.type : "text",
|
||
value: valueState != null ? valueState : "",
|
||
onChange: handleChange,
|
||
endAdornment: isProcessingProps ? (0, import_jsx_runtime10.jsx)(rootProps.slots.loadIcon, {
|
||
fontSize: "small",
|
||
color: "action"
|
||
}) : void 0
|
||
}, other));
|
||
});
|
||
true ? GridEditInputCell.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* GridApi that let you manipulate the grid.
|
||
*/
|
||
api: import_prop_types7.default.object.isRequired,
|
||
/**
|
||
* The mode of the cell.
|
||
*/
|
||
cellMode: import_prop_types7.default.oneOf(["edit", "view"]).isRequired,
|
||
changeReason: import_prop_types7.default.oneOf(["debouncedSetEditCellValue", "setEditCellValue"]),
|
||
/**
|
||
* The column of the row that the current cell belongs to.
|
||
*/
|
||
colDef: import_prop_types7.default.object.isRequired,
|
||
debounceMs: import_prop_types7.default.number,
|
||
/**
|
||
* The column field of the cell that triggered the event.
|
||
*/
|
||
field: import_prop_types7.default.string.isRequired,
|
||
/**
|
||
* The cell value formatted with the column valueFormatter.
|
||
*/
|
||
formattedValue: import_prop_types7.default.any,
|
||
/**
|
||
* If true, the cell is the active element.
|
||
*/
|
||
hasFocus: import_prop_types7.default.bool.isRequired,
|
||
/**
|
||
* The grid row id.
|
||
*/
|
||
id: import_prop_types7.default.oneOfType([import_prop_types7.default.number, import_prop_types7.default.string]).isRequired,
|
||
/**
|
||
* If true, the cell is editable.
|
||
*/
|
||
isEditable: import_prop_types7.default.bool,
|
||
isProcessingProps: import_prop_types7.default.bool,
|
||
isValidating: import_prop_types7.default.bool,
|
||
/**
|
||
* Callback called when the value is changed by the user.
|
||
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
||
* @param {Date | null} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
|
||
* @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
|
||
*/
|
||
onValueChange: import_prop_types7.default.func,
|
||
/**
|
||
* The row model of the row that the current cell belongs to.
|
||
*/
|
||
row: import_prop_types7.default.any.isRequired,
|
||
/**
|
||
* The node of the row that the current cell belongs to.
|
||
*/
|
||
rowNode: import_prop_types7.default.object.isRequired,
|
||
/**
|
||
* the tabIndex value.
|
||
*/
|
||
tabIndex: import_prop_types7.default.oneOf([-1, 0]).isRequired,
|
||
/**
|
||
* The cell value.
|
||
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
||
*/
|
||
value: import_prop_types7.default.any
|
||
} : void 0;
|
||
var renderEditInputCell = (params) => (0, import_jsx_runtime10.jsx)(GridEditInputCell, _extends({}, params));
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridEditSingleSelectCell.js
|
||
init_extends();
|
||
var React22 = __toESM(require_react());
|
||
var import_prop_types8 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/utils/keyboardUtils.js
|
||
var isEscapeKey = (key) => key === "Escape";
|
||
var isEnterKey = (key) => key === "Enter";
|
||
var isTabKey = (key) => key === "Tab";
|
||
var isSpaceKey = (key) => key === " ";
|
||
var isArrowKeys = (key) => key.indexOf("Arrow") === 0;
|
||
var isHomeOrEndKeys = (key) => key === "Home" || key === "End";
|
||
var isPageKeys = (key) => key.indexOf("Page") === 0;
|
||
function isPrintableKey(event) {
|
||
return event.key.length === 1 && !event.ctrlKey && !event.metaKey;
|
||
}
|
||
var isNavigationKey = (key) => isHomeOrEndKeys(key) || isArrowKeys(key) || isPageKeys(key) || isSpaceKey(key);
|
||
var isKeyboardEvent = (event) => !!event.key;
|
||
var isHideMenuKey = (key) => isTabKey(key) || isEscapeKey(key);
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/filterPanelUtils.js
|
||
function isSingleSelectColDef(colDef) {
|
||
return (colDef == null ? void 0 : colDef.type) === "singleSelect";
|
||
}
|
||
function getValueFromValueOptions(value, valueOptions, getOptionValue) {
|
||
if (valueOptions === void 0) {
|
||
return void 0;
|
||
}
|
||
const result = valueOptions.find((option) => {
|
||
const optionValue = getOptionValue(option);
|
||
return String(optionValue) === String(value);
|
||
});
|
||
return getOptionValue(result);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridEditSingleSelectCell.js
|
||
var import_react = __toESM(require_react());
|
||
var import_jsx_runtime11 = __toESM(require_jsx_runtime());
|
||
var _excluded9 = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "className", "hasFocus", "isValidating", "isProcessingProps", "error", "onValueChange", "initialOpen", "getOptionLabel", "getOptionValue"];
|
||
var _excluded22 = ["MenuProps"];
|
||
function isKeyboardEvent2(event) {
|
||
return !!event.key;
|
||
}
|
||
function GridEditSingleSelectCell(props) {
|
||
var _rootProps$slotProps, _baseSelectProps$nati, _rootProps$slotProps2;
|
||
const rootProps = useGridRootProps();
|
||
const {
|
||
id,
|
||
value: valueProp,
|
||
field,
|
||
row,
|
||
colDef,
|
||
hasFocus,
|
||
error,
|
||
onValueChange,
|
||
initialOpen = rootProps.editMode === GridEditModes.Cell,
|
||
getOptionLabel: getOptionLabelProp,
|
||
getOptionValue: getOptionValueProp
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded9);
|
||
const apiRef = useGridApiContext();
|
||
const ref = React22.useRef();
|
||
const inputRef = React22.useRef();
|
||
const [open, setOpen] = React22.useState(initialOpen);
|
||
const baseSelectProps = ((_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseSelect) || {};
|
||
const isSelectNative = (_baseSelectProps$nati = baseSelectProps.native) != null ? _baseSelectProps$nati : false;
|
||
const _ref = ((_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseSelect) || {}, {
|
||
MenuProps
|
||
} = _ref, otherBaseSelectProps = _objectWithoutPropertiesLoose(_ref, _excluded22);
|
||
useEnhancedEffect_default(() => {
|
||
if (hasFocus) {
|
||
var _inputRef$current;
|
||
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
||
}
|
||
}, [hasFocus]);
|
||
if (!isSingleSelectColDef(colDef)) {
|
||
return null;
|
||
}
|
||
let valueOptions;
|
||
if (typeof (colDef == null ? void 0 : colDef.valueOptions) === "function") {
|
||
valueOptions = colDef == null ? void 0 : colDef.valueOptions({
|
||
id,
|
||
row,
|
||
field
|
||
});
|
||
} else {
|
||
valueOptions = colDef == null ? void 0 : colDef.valueOptions;
|
||
}
|
||
if (!valueOptions) {
|
||
return null;
|
||
}
|
||
const getOptionValue = getOptionValueProp || colDef.getOptionValue;
|
||
const getOptionLabel = getOptionLabelProp || colDef.getOptionLabel;
|
||
const handleChange = async (event) => {
|
||
if (!isSingleSelectColDef(colDef) || !valueOptions) {
|
||
return;
|
||
}
|
||
setOpen(false);
|
||
const target = event.target;
|
||
const formattedTargetValue = getValueFromValueOptions(target.value, valueOptions, getOptionValue);
|
||
if (onValueChange) {
|
||
await onValueChange(event, formattedTargetValue);
|
||
}
|
||
await apiRef.current.setEditCellValue({
|
||
id,
|
||
field,
|
||
value: formattedTargetValue
|
||
}, event);
|
||
};
|
||
const handleClose = (event, reason) => {
|
||
if (rootProps.editMode === GridEditModes.Row) {
|
||
setOpen(false);
|
||
return;
|
||
}
|
||
if (reason === "backdropClick" || isEscapeKey(event.key)) {
|
||
const params = apiRef.current.getCellParams(id, field);
|
||
apiRef.current.publishEvent("cellEditStop", _extends({}, params, {
|
||
reason: isEscapeKey(event.key) ? GridCellEditStopReasons.escapeKeyDown : GridCellEditStopReasons.cellFocusOut
|
||
}));
|
||
}
|
||
};
|
||
const handleOpen = (event) => {
|
||
if (isKeyboardEvent2(event) && event.key === "Enter") {
|
||
return;
|
||
}
|
||
setOpen(true);
|
||
};
|
||
if (!valueOptions || !colDef) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime11.jsx)(rootProps.slots.baseSelect, _extends({
|
||
ref,
|
||
inputRef,
|
||
value: valueProp,
|
||
onChange: handleChange,
|
||
open,
|
||
onOpen: handleOpen,
|
||
MenuProps: _extends({
|
||
onClose: handleClose
|
||
}, MenuProps),
|
||
error,
|
||
native: isSelectNative,
|
||
fullWidth: true
|
||
}, other, otherBaseSelectProps, {
|
||
children: valueOptions.map((valueOption) => {
|
||
var _rootProps$slotProps3;
|
||
const value = getOptionValue(valueOption);
|
||
return (0, import_react.createElement)(rootProps.slots.baseSelectOption, _extends({}, ((_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseSelectOption) || {}, {
|
||
native: isSelectNative,
|
||
key: value,
|
||
value
|
||
}), getOptionLabel(valueOption));
|
||
})
|
||
}));
|
||
}
|
||
true ? GridEditSingleSelectCell.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* GridApi that let you manipulate the grid.
|
||
*/
|
||
api: import_prop_types8.default.object.isRequired,
|
||
/**
|
||
* The mode of the cell.
|
||
*/
|
||
cellMode: import_prop_types8.default.oneOf(["edit", "view"]).isRequired,
|
||
changeReason: import_prop_types8.default.oneOf(["debouncedSetEditCellValue", "setEditCellValue"]),
|
||
/**
|
||
* The column of the row that the current cell belongs to.
|
||
*/
|
||
colDef: import_prop_types8.default.object.isRequired,
|
||
/**
|
||
* The column field of the cell that triggered the event.
|
||
*/
|
||
field: import_prop_types8.default.string.isRequired,
|
||
/**
|
||
* The cell value formatted with the column valueFormatter.
|
||
*/
|
||
formattedValue: import_prop_types8.default.any,
|
||
/**
|
||
* Used to determine the label displayed for a given value option.
|
||
* @param {ValueOptions} value The current value option.
|
||
* @returns {string} The text to be displayed.
|
||
*/
|
||
getOptionLabel: import_prop_types8.default.func,
|
||
/**
|
||
* Used to determine the value used for a value option.
|
||
* @param {ValueOptions} value The current value option.
|
||
* @returns {string} The value to be used.
|
||
*/
|
||
getOptionValue: import_prop_types8.default.func,
|
||
/**
|
||
* If true, the cell is the active element.
|
||
*/
|
||
hasFocus: import_prop_types8.default.bool.isRequired,
|
||
/**
|
||
* The grid row id.
|
||
*/
|
||
id: import_prop_types8.default.oneOfType([import_prop_types8.default.number, import_prop_types8.default.string]).isRequired,
|
||
/**
|
||
* If true, the select opens by default.
|
||
*/
|
||
initialOpen: import_prop_types8.default.bool,
|
||
/**
|
||
* If true, the cell is editable.
|
||
*/
|
||
isEditable: import_prop_types8.default.bool,
|
||
isProcessingProps: import_prop_types8.default.bool,
|
||
isValidating: import_prop_types8.default.bool,
|
||
/**
|
||
* Callback called when the value is changed by the user.
|
||
* @param {SelectChangeEvent<any>} event The event source of the callback.
|
||
* @param {any} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
|
||
* @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
|
||
*/
|
||
onValueChange: import_prop_types8.default.func,
|
||
/**
|
||
* The row model of the row that the current cell belongs to.
|
||
*/
|
||
row: import_prop_types8.default.any.isRequired,
|
||
/**
|
||
* The node of the row that the current cell belongs to.
|
||
*/
|
||
rowNode: import_prop_types8.default.object.isRequired,
|
||
/**
|
||
* the tabIndex value.
|
||
*/
|
||
tabIndex: import_prop_types8.default.oneOf([-1, 0]).isRequired,
|
||
/**
|
||
* The cell value.
|
||
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
||
*/
|
||
value: import_prop_types8.default.any
|
||
} : void 0;
|
||
var renderEditSingleSelectCell = (params) => (0, import_jsx_runtime11.jsx)(GridEditSingleSelectCell, _extends({}, params));
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridActionsCell.js
|
||
init_extends();
|
||
var React24 = __toESM(require_react());
|
||
var import_prop_types10 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/GridMenu.js
|
||
init_extends();
|
||
var React23 = __toESM(require_react());
|
||
var import_prop_types9 = __toESM(require_prop_types());
|
||
var import_jsx_runtime12 = __toESM(require_jsx_runtime());
|
||
var _excluded10 = ["open", "target", "onClose", "children", "position", "className", "onExited"];
|
||
var useUtilityClasses8 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["menu"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridMenuRoot = styled_default2(Popper_default, {
|
||
name: "MuiDataGrid",
|
||
slot: "Menu",
|
||
overridesResolver: (_, styles) => styles.menu
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
zIndex: theme.zIndex.modal,
|
||
[`& .${gridClasses.menuList}`]: {
|
||
outline: 0
|
||
}
|
||
}));
|
||
var transformOrigin = {
|
||
"bottom-start": "top left",
|
||
"bottom-end": "top right"
|
||
};
|
||
function GridMenu(props) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
open,
|
||
target,
|
||
onClose,
|
||
children,
|
||
position,
|
||
className,
|
||
onExited
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded10);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses8(rootProps);
|
||
const savedFocusRef = React23.useRef(null);
|
||
useEnhancedEffect_default(() => {
|
||
if (open) {
|
||
savedFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
||
} else {
|
||
var _savedFocusRef$curren, _savedFocusRef$curren2;
|
||
(_savedFocusRef$curren = savedFocusRef.current) == null || (_savedFocusRef$curren2 = _savedFocusRef$curren.focus) == null || _savedFocusRef$curren2.call(_savedFocusRef$curren);
|
||
savedFocusRef.current = null;
|
||
}
|
||
}, [open]);
|
||
React23.useEffect(() => {
|
||
const eventName = open ? "menuOpen" : "menuClose";
|
||
apiRef.current.publishEvent(eventName, {
|
||
target
|
||
});
|
||
}, [apiRef, open, target]);
|
||
const handleExited = (popperOnExited) => (node) => {
|
||
if (popperOnExited) {
|
||
popperOnExited();
|
||
}
|
||
if (onExited) {
|
||
onExited(node);
|
||
}
|
||
};
|
||
const handleClickAway = (event) => {
|
||
if (event.target && (target === event.target || target != null && target.contains(event.target))) {
|
||
return;
|
||
}
|
||
onClose(event);
|
||
};
|
||
return (0, import_jsx_runtime12.jsx)(GridMenuRoot, _extends({
|
||
as: rootProps.slots.basePopper,
|
||
className: clsx_default(className, classes.root),
|
||
ownerState: rootProps,
|
||
open,
|
||
anchorEl: target,
|
||
transition: true,
|
||
placement: position
|
||
}, other, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.basePopper, {
|
||
children: ({
|
||
TransitionProps,
|
||
placement
|
||
}) => (0, import_jsx_runtime12.jsx)(ClickAwayListener, {
|
||
onClickAway: handleClickAway,
|
||
mouseEvent: "onMouseDown",
|
||
children: (0, import_jsx_runtime12.jsx)(Grow_default, _extends({}, TransitionProps, {
|
||
style: {
|
||
transformOrigin: transformOrigin[placement]
|
||
},
|
||
onExited: handleExited(TransitionProps == null ? void 0 : TransitionProps.onExited),
|
||
children: (0, import_jsx_runtime12.jsx)(Paper_default, {
|
||
children
|
||
})
|
||
}))
|
||
})
|
||
}));
|
||
}
|
||
true ? GridMenu.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
children: import_prop_types9.default.node,
|
||
onClose: import_prop_types9.default.func.isRequired,
|
||
onExited: import_prop_types9.default.func,
|
||
/**
|
||
* If `true`, the component is shown.
|
||
*/
|
||
open: import_prop_types9.default.bool.isRequired,
|
||
position: import_prop_types9.default.oneOf(["bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
||
target: HTMLElementType
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridActionsCell.js
|
||
var import_jsx_runtime13 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime14 = __toESM(require_jsx_runtime());
|
||
var _excluded11 = ["api", "colDef", "id", "hasFocus", "isEditable", "field", "value", "formattedValue", "row", "rowNode", "cellMode", "tabIndex", "position", "focusElementRef"];
|
||
var hasActions = (colDef) => typeof colDef.getActions === "function";
|
||
function GridActionsCell(props) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
colDef,
|
||
id,
|
||
hasFocus,
|
||
tabIndex,
|
||
position = "bottom-end",
|
||
focusElementRef
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded11);
|
||
const [focusedButtonIndex, setFocusedButtonIndex] = React24.useState(-1);
|
||
const [open, setOpen] = React24.useState(false);
|
||
const apiRef = useGridApiContext();
|
||
const rootRef = React24.useRef(null);
|
||
const buttonRef = React24.useRef(null);
|
||
const ignoreCallToFocus = React24.useRef(false);
|
||
const touchRippleRefs = React24.useRef({});
|
||
const theme = useTheme();
|
||
const menuId = useId();
|
||
const buttonId = useId();
|
||
const rootProps = useGridRootProps();
|
||
if (!hasActions(colDef)) {
|
||
throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");
|
||
}
|
||
const options = colDef.getActions(apiRef.current.getRowParams(id));
|
||
const iconButtons = options.filter((option) => !option.props.showInMenu);
|
||
const menuButtons = options.filter((option) => option.props.showInMenu);
|
||
const numberOfButtons = iconButtons.length + (menuButtons.length ? 1 : 0);
|
||
React24.useLayoutEffect(() => {
|
||
if (!hasFocus) {
|
||
Object.entries(touchRippleRefs.current).forEach(([index, ref]) => {
|
||
ref == null || ref.stop({}, () => {
|
||
delete touchRippleRefs.current[index];
|
||
});
|
||
});
|
||
}
|
||
}, [hasFocus]);
|
||
React24.useEffect(() => {
|
||
if (focusedButtonIndex < 0 || !rootRef.current) {
|
||
return;
|
||
}
|
||
if (focusedButtonIndex >= rootRef.current.children.length) {
|
||
return;
|
||
}
|
||
const child = rootRef.current.children[focusedButtonIndex];
|
||
child.focus({
|
||
preventScroll: true
|
||
});
|
||
}, [focusedButtonIndex]);
|
||
React24.useEffect(() => {
|
||
if (!hasFocus) {
|
||
setFocusedButtonIndex(-1);
|
||
ignoreCallToFocus.current = false;
|
||
}
|
||
}, [hasFocus]);
|
||
React24.useImperativeHandle(focusElementRef, () => ({
|
||
focus() {
|
||
if (!ignoreCallToFocus.current) {
|
||
const focusableButtonIndex = options.findIndex((o) => !o.props.disabled);
|
||
setFocusedButtonIndex(focusableButtonIndex);
|
||
}
|
||
}
|
||
}), [options]);
|
||
React24.useEffect(() => {
|
||
if (focusedButtonIndex >= numberOfButtons) {
|
||
setFocusedButtonIndex(numberOfButtons - 1);
|
||
}
|
||
}, [focusedButtonIndex, numberOfButtons]);
|
||
const showMenu = () => {
|
||
setOpen(true);
|
||
setFocusedButtonIndex(numberOfButtons - 1);
|
||
ignoreCallToFocus.current = true;
|
||
};
|
||
const hideMenu = () => {
|
||
setOpen(false);
|
||
};
|
||
const handleTouchRippleRef = (index) => (instance) => {
|
||
touchRippleRefs.current[index] = instance;
|
||
};
|
||
const handleButtonClick = (index, onClick) => (event) => {
|
||
setFocusedButtonIndex(index);
|
||
ignoreCallToFocus.current = true;
|
||
if (onClick) {
|
||
onClick(event);
|
||
}
|
||
};
|
||
const handleRootKeyDown = (event) => {
|
||
if (numberOfButtons <= 1) {
|
||
return;
|
||
}
|
||
const getNewIndex = (index, direction) => {
|
||
var _options;
|
||
if (index < 0 || index > options.length) {
|
||
return index;
|
||
}
|
||
const rtlMod = theme.direction === "rtl" ? -1 : 1;
|
||
const indexMod = (direction === "left" ? -1 : 1) * rtlMod;
|
||
return (_options = options[index + indexMod]) != null && _options.props.disabled ? getNewIndex(index + indexMod, direction) : index + indexMod;
|
||
};
|
||
let newIndex = focusedButtonIndex;
|
||
if (event.key === "ArrowRight") {
|
||
newIndex = getNewIndex(focusedButtonIndex, "right");
|
||
} else if (event.key === "ArrowLeft") {
|
||
newIndex = getNewIndex(focusedButtonIndex, "left");
|
||
}
|
||
if (newIndex < 0 || newIndex >= numberOfButtons) {
|
||
return;
|
||
}
|
||
if (newIndex !== focusedButtonIndex) {
|
||
event.preventDefault();
|
||
event.stopPropagation();
|
||
setFocusedButtonIndex(newIndex);
|
||
}
|
||
};
|
||
const handleListKeyDown = (event) => {
|
||
if (event.key === "Tab") {
|
||
event.preventDefault();
|
||
}
|
||
if (["Tab", "Escape"].includes(event.key)) {
|
||
hideMenu();
|
||
}
|
||
};
|
||
return (0, import_jsx_runtime14.jsxs)("div", _extends({
|
||
role: "menu",
|
||
ref: rootRef,
|
||
tabIndex: -1,
|
||
className: gridClasses.actionsCell,
|
||
onKeyDown: handleRootKeyDown
|
||
}, other, {
|
||
children: [iconButtons.map((button, index) => React24.cloneElement(button, {
|
||
key: index,
|
||
touchRippleRef: handleTouchRippleRef(index),
|
||
onClick: handleButtonClick(index, button.props.onClick),
|
||
tabIndex: focusedButtonIndex === index ? tabIndex : -1
|
||
})), menuButtons.length > 0 && buttonId && (0, import_jsx_runtime13.jsx)(rootProps.slots.baseIconButton, _extends({
|
||
ref: buttonRef,
|
||
id: buttonId,
|
||
"aria-label": apiRef.current.getLocaleText("actionsCellMore"),
|
||
"aria-haspopup": "menu",
|
||
"aria-expanded": open,
|
||
"aria-controls": open ? menuId : void 0,
|
||
role: "menuitem",
|
||
size: "small",
|
||
onClick: showMenu,
|
||
touchRippleRef: handleTouchRippleRef(buttonId),
|
||
tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
|
||
children: (0, import_jsx_runtime13.jsx)(rootProps.slots.moreActionsIcon, {
|
||
fontSize: "small"
|
||
})
|
||
})), menuButtons.length > 0 && (0, import_jsx_runtime13.jsx)(GridMenu, {
|
||
open,
|
||
target: buttonRef.current,
|
||
position,
|
||
onClose: hideMenu,
|
||
children: (0, import_jsx_runtime13.jsx)(MenuList_default, {
|
||
id: menuId,
|
||
className: gridClasses.menuList,
|
||
onKeyDown: handleListKeyDown,
|
||
"aria-labelledby": buttonId,
|
||
variant: "menu",
|
||
autoFocusItem: true,
|
||
children: menuButtons.map((button, index) => React24.cloneElement(button, {
|
||
key: index,
|
||
closeMenu: hideMenu
|
||
}))
|
||
})
|
||
})]
|
||
}));
|
||
}
|
||
true ? GridActionsCell.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
api: import_prop_types10.default.object,
|
||
/**
|
||
* The mode of the cell.
|
||
*/
|
||
cellMode: import_prop_types10.default.oneOf(["edit", "view"]).isRequired,
|
||
/**
|
||
* The column of the row that the current cell belongs to.
|
||
*/
|
||
colDef: import_prop_types10.default.object.isRequired,
|
||
/**
|
||
* The column field of the cell that triggered the event.
|
||
*/
|
||
field: import_prop_types10.default.string.isRequired,
|
||
/**
|
||
* A ref allowing to set imperative focus.
|
||
* It can be passed to the element that should receive focus.
|
||
* @ignore - do not document.
|
||
*/
|
||
focusElementRef: import_prop_types10.default.oneOfType([import_prop_types10.default.func, import_prop_types10.default.shape({
|
||
current: import_prop_types10.default.shape({
|
||
focus: import_prop_types10.default.func.isRequired
|
||
})
|
||
})]),
|
||
/**
|
||
* The cell value formatted with the column valueFormatter.
|
||
*/
|
||
formattedValue: import_prop_types10.default.any,
|
||
/**
|
||
* If true, the cell is the active element.
|
||
*/
|
||
hasFocus: import_prop_types10.default.bool.isRequired,
|
||
/**
|
||
* The grid row id.
|
||
*/
|
||
id: import_prop_types10.default.oneOfType([import_prop_types10.default.number, import_prop_types10.default.string]).isRequired,
|
||
/**
|
||
* If true, the cell is editable.
|
||
*/
|
||
isEditable: import_prop_types10.default.bool,
|
||
position: import_prop_types10.default.oneOf(["bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
|
||
/**
|
||
* The row model of the row that the current cell belongs to.
|
||
*/
|
||
row: import_prop_types10.default.any.isRequired,
|
||
/**
|
||
* The node of the row that the current cell belongs to.
|
||
*/
|
||
rowNode: import_prop_types10.default.object.isRequired,
|
||
/**
|
||
* the tabIndex value.
|
||
*/
|
||
tabIndex: import_prop_types10.default.oneOf([-1, 0]).isRequired,
|
||
/**
|
||
* The cell value.
|
||
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
||
*/
|
||
value: import_prop_types10.default.any
|
||
} : void 0;
|
||
var renderActionsCell = (params) => (0, import_jsx_runtime13.jsx)(GridActionsCell, _extends({}, params));
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridActionsCellItem.js
|
||
init_extends();
|
||
var React25 = __toESM(require_react());
|
||
var import_prop_types11 = __toESM(require_prop_types());
|
||
var import_jsx_runtime15 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime16 = __toESM(require_jsx_runtime());
|
||
var _excluded12 = ["label", "icon", "showInMenu", "onClick"];
|
||
var _excluded23 = ["label", "icon", "showInMenu", "onClick", "closeMenuOnClick", "closeMenu"];
|
||
var GridActionsCellItem = React25.forwardRef((props, ref) => {
|
||
const rootProps = useGridRootProps();
|
||
if (!props.showInMenu) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
label: label2,
|
||
icon: icon2,
|
||
onClick: onClick2
|
||
} = props, other2 = _objectWithoutPropertiesLoose(props, _excluded12);
|
||
const handleClick2 = (event) => {
|
||
onClick2 == null || onClick2(event);
|
||
};
|
||
return (0, import_jsx_runtime15.jsx)(rootProps.slots.baseIconButton, _extends({
|
||
ref,
|
||
size: "small",
|
||
role: "menuitem",
|
||
"aria-label": label2
|
||
}, other2, {
|
||
onClick: handleClick2
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
|
||
children: React25.cloneElement(icon2, {
|
||
fontSize: "small"
|
||
})
|
||
}));
|
||
}
|
||
const {
|
||
label,
|
||
icon,
|
||
onClick,
|
||
closeMenuOnClick = true,
|
||
closeMenu
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded23);
|
||
const handleClick = (event) => {
|
||
onClick == null || onClick(event);
|
||
if (closeMenuOnClick) {
|
||
closeMenu == null || closeMenu();
|
||
}
|
||
};
|
||
return (0, import_jsx_runtime16.jsxs)(MenuItem_default, _extends({
|
||
ref
|
||
}, other, {
|
||
onClick: handleClick,
|
||
children: [icon && (0, import_jsx_runtime15.jsx)(ListItemIcon_default, {
|
||
children: icon
|
||
}), label]
|
||
}));
|
||
});
|
||
true ? GridActionsCellItem.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component
|
||
*/
|
||
component: import_prop_types11.default.elementType,
|
||
icon: import_prop_types11.default.element,
|
||
label: import_prop_types11.default.string.isRequired,
|
||
showInMenu: import_prop_types11.default.bool
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/cell/GridSkeletonCell.js
|
||
init_extends();
|
||
var React26 = __toESM(require_react());
|
||
var import_prop_types12 = __toESM(require_prop_types());
|
||
var import_jsx_runtime17 = __toESM(require_jsx_runtime());
|
||
var _excluded13 = ["field", "align", "width", "contentWidth"];
|
||
var useUtilityClasses9 = (ownerState) => {
|
||
const {
|
||
align,
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["cell", "cellSkeleton", `cell--text${capitalize(align)}`, "withBorderColor"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function GridSkeletonCell(props) {
|
||
const {
|
||
align,
|
||
width,
|
||
contentWidth
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded13);
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = {
|
||
classes: rootProps.classes,
|
||
align
|
||
};
|
||
const classes = useUtilityClasses9(ownerState);
|
||
return (0, import_jsx_runtime17.jsx)("div", _extends({
|
||
className: classes.root,
|
||
style: {
|
||
width
|
||
}
|
||
}, other, {
|
||
children: (0, import_jsx_runtime17.jsx)(Skeleton_default, {
|
||
width: `${contentWidth}%`
|
||
})
|
||
}));
|
||
}
|
||
true ? GridSkeletonCell.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
align: import_prop_types12.default.string.isRequired,
|
||
contentWidth: import_prop_types12.default.number.isRequired,
|
||
field: import_prop_types12.default.string.isRequired,
|
||
width: import_prop_types12.default.number.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/containers/GridRoot.js
|
||
init_extends();
|
||
var React27 = __toESM(require_react());
|
||
var import_prop_types13 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/containers/GridRootStyles.js
|
||
init_extends();
|
||
function getBorderColor(theme) {
|
||
if (theme.vars) {
|
||
return theme.vars.palette.TableCell.border;
|
||
}
|
||
if (theme.palette.mode === "light") {
|
||
return lighten(alpha(theme.palette.divider, 1), 0.88);
|
||
}
|
||
return darken(alpha(theme.palette.divider, 1), 0.68);
|
||
}
|
||
var columnHeadersStyles = {
|
||
[`.${gridClasses.columnSeparator}, .${gridClasses["columnSeparator--resizing"]}`]: {
|
||
visibility: "visible",
|
||
width: "auto"
|
||
}
|
||
};
|
||
var columnHeaderStyles = {
|
||
[`& .${gridClasses.iconButtonContainer}`]: {
|
||
visibility: "visible",
|
||
width: "auto"
|
||
},
|
||
[`& .${gridClasses.menuIcon}`]: {
|
||
width: "auto",
|
||
visibility: "visible"
|
||
}
|
||
};
|
||
var GridRootStyles = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "Root",
|
||
overridesResolver: (props, styles) => [
|
||
{
|
||
[`&.${gridClasses.autoHeight}`]: styles.autoHeight
|
||
},
|
||
{
|
||
[`&.${gridClasses.aggregationColumnHeader}`]: styles.aggregationColumnHeader
|
||
},
|
||
{
|
||
[`&.${gridClasses["aggregationColumnHeader--alignLeft"]}`]: styles["aggregationColumnHeader--alignLeft"]
|
||
},
|
||
{
|
||
[`&.${gridClasses["aggregationColumnHeader--alignCenter"]}`]: styles["aggregationColumnHeader--alignCenter"]
|
||
},
|
||
{
|
||
[`&.${gridClasses["aggregationColumnHeader--alignRight"]}`]: styles["aggregationColumnHeader--alignRight"]
|
||
},
|
||
{
|
||
[`&.${gridClasses.aggregationColumnHeaderLabel}`]: styles.aggregationColumnHeaderLabel
|
||
},
|
||
{
|
||
[`&.${gridClasses["root--disableUserSelection"]} .${gridClasses.cell}`]: styles["root--disableUserSelection"]
|
||
},
|
||
{
|
||
[`&.${gridClasses.autosizing}`]: styles.autosizing
|
||
},
|
||
{
|
||
[`& .${gridClasses.editBooleanCell}`]: styles.editBooleanCell
|
||
},
|
||
{
|
||
[`& .${gridClasses["cell--editing"]}`]: styles["cell--editing"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["cell--textCenter"]}`]: styles["cell--textCenter"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["cell--textLeft"]}`]: styles["cell--textLeft"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["cell--textRight"]}`]: styles["cell--textRight"]
|
||
},
|
||
// TODO v6: Remove
|
||
{
|
||
[`& .${gridClasses["cell--withRenderer"]}`]: styles["cell--withRenderer"]
|
||
},
|
||
{
|
||
[`& .${gridClasses.cell}`]: styles.cell
|
||
},
|
||
{
|
||
[`& .${gridClasses["cell--rangeTop"]}`]: styles["cell--rangeTop"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["cell--rangeBottom"]}`]: styles["cell--rangeBottom"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["cell--rangeLeft"]}`]: styles["cell--rangeLeft"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["cell--rangeRight"]}`]: styles["cell--rangeRight"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["cell--withRightBorder"]}`]: styles["cell--withRightBorder"]
|
||
},
|
||
{
|
||
[`& .${gridClasses.cellContent}`]: styles.cellContent
|
||
},
|
||
{
|
||
[`& .${gridClasses.cellCheckbox}`]: styles.cellCheckbox
|
||
},
|
||
{
|
||
[`& .${gridClasses.cellSkeleton}`]: styles.cellSkeleton
|
||
},
|
||
{
|
||
[`& .${gridClasses.checkboxInput}`]: styles.checkboxInput
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnHeader--alignCenter"]}`]: styles["columnHeader--alignCenter"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnHeader--alignLeft"]}`]: styles["columnHeader--alignLeft"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnHeader--alignRight"]}`]: styles["columnHeader--alignRight"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnHeader--dragging"]}`]: styles["columnHeader--dragging"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnHeader--moving"]}`]: styles["columnHeader--moving"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnHeader--numeric"]}`]: styles["columnHeader--numeric"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnHeader--sortable"]}`]: styles["columnHeader--sortable"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnHeader--sorted"]}`]: styles["columnHeader--sorted"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnHeader--withRightBorder"]}`]: styles["columnHeader--withRightBorder"]
|
||
},
|
||
{
|
||
[`& .${gridClasses.columnHeader}`]: styles.columnHeader
|
||
},
|
||
{
|
||
[`& .${gridClasses.headerFilterRow}`]: styles.headerFilterRow
|
||
},
|
||
{
|
||
[`& .${gridClasses.columnHeaderCheckbox}`]: styles.columnHeaderCheckbox
|
||
},
|
||
{
|
||
[`& .${gridClasses.columnHeaderDraggableContainer}`]: styles.columnHeaderDraggableContainer
|
||
},
|
||
{
|
||
[`& .${gridClasses.columnHeaderTitleContainer}`]: styles.columnHeaderTitleContainer
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnSeparator--resizable"]}`]: styles["columnSeparator--resizable"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["columnSeparator--resizing"]}`]: styles["columnSeparator--resizing"]
|
||
},
|
||
{
|
||
[`& .${gridClasses.columnSeparator}`]: styles.columnSeparator
|
||
},
|
||
{
|
||
[`& .${gridClasses.filterIcon}`]: styles.filterIcon
|
||
},
|
||
{
|
||
[`& .${gridClasses.iconSeparator}`]: styles.iconSeparator
|
||
},
|
||
{
|
||
[`& .${gridClasses.menuIcon}`]: styles.menuIcon
|
||
},
|
||
{
|
||
[`& .${gridClasses.menuIconButton}`]: styles.menuIconButton
|
||
},
|
||
{
|
||
[`& .${gridClasses.menuOpen}`]: styles.menuOpen
|
||
},
|
||
{
|
||
[`& .${gridClasses.menuList}`]: styles.menuList
|
||
},
|
||
{
|
||
[`& .${gridClasses["row--editable"]}`]: styles["row--editable"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["row--editing"]}`]: styles["row--editing"]
|
||
},
|
||
{
|
||
[`& .${gridClasses["row--dragging"]}`]: styles["row--dragging"]
|
||
},
|
||
{
|
||
[`& .${gridClasses.row}`]: styles.row
|
||
},
|
||
{
|
||
[`& .${gridClasses.rowReorderCellPlaceholder}`]: styles.rowReorderCellPlaceholder
|
||
},
|
||
{
|
||
[`& .${gridClasses.rowReorderCell}`]: styles.rowReorderCell
|
||
},
|
||
{
|
||
[`& .${gridClasses["rowReorderCell--draggable"]}`]: styles["rowReorderCell--draggable"]
|
||
},
|
||
{
|
||
[`& .${gridClasses.sortIcon}`]: styles.sortIcon
|
||
},
|
||
{
|
||
[`& .${gridClasses.withBorderColor}`]: styles.withBorderColor
|
||
},
|
||
{
|
||
[`& .${gridClasses.treeDataGroupingCell}`]: styles.treeDataGroupingCell
|
||
},
|
||
{
|
||
[`& .${gridClasses.treeDataGroupingCellToggle}`]: styles.treeDataGroupingCellToggle
|
||
},
|
||
{
|
||
[`& .${gridClasses.detailPanelToggleCell}`]: styles.detailPanelToggleCell
|
||
},
|
||
{
|
||
[`& .${gridClasses["detailPanelToggleCell--expanded"]}`]: styles["detailPanelToggleCell--expanded"]
|
||
},
|
||
styles.root
|
||
]
|
||
})(({
|
||
theme
|
||
}) => {
|
||
const borderColor = getBorderColor(theme);
|
||
const radius = theme.shape.borderRadius;
|
||
const gridStyle = _extends({
|
||
"--unstable_DataGrid-radius": typeof radius === "number" ? `${radius}px` : radius,
|
||
"--unstable_DataGrid-headWeight": theme.typography.fontWeightMedium,
|
||
"--unstable_DataGrid-overlayBackground": theme.vars ? `rgba(${theme.vars.palette.background.defaultChannel} / ${theme.vars.palette.action.disabledOpacity})` : alpha(theme.palette.background.default, theme.palette.action.disabledOpacity),
|
||
"--DataGrid-cellOffsetMultiplier": 2,
|
||
flex: 1,
|
||
boxSizing: "border-box",
|
||
position: "relative",
|
||
borderWidth: "1px",
|
||
borderStyle: "solid",
|
||
borderColor,
|
||
borderRadius: "var(--unstable_DataGrid-radius)",
|
||
color: (theme.vars || theme).palette.text.primary
|
||
}, theme.typography.body2, {
|
||
outline: "none",
|
||
height: "100%",
|
||
display: "flex",
|
||
minWidth: 0,
|
||
// See https://github.com/mui/mui-x/issues/8547
|
||
minHeight: 0,
|
||
flexDirection: "column",
|
||
overflowAnchor: "none",
|
||
// Keep the same scrolling position
|
||
[`&.${gridClasses.autoHeight}`]: {
|
||
height: "auto",
|
||
[`& .${gridClasses["row--lastVisible"]} .${gridClasses.cell}`]: {
|
||
borderBottomColor: "transparent"
|
||
}
|
||
},
|
||
[`&.${gridClasses.autosizing}`]: {
|
||
[`& .${gridClasses.columnHeaderTitleContainerContent} > *`]: {
|
||
overflow: "visible !important"
|
||
},
|
||
[`& .${gridClasses.cell} > *`]: {
|
||
overflow: "visible !important",
|
||
whiteSpace: "nowrap"
|
||
},
|
||
[`& .${gridClasses.groupingCriteriaCell}`]: {
|
||
width: "unset"
|
||
},
|
||
[`& .${gridClasses.treeDataGroupingCell}`]: {
|
||
width: "unset"
|
||
}
|
||
},
|
||
[`& .${gridClasses["virtualScrollerContent--overflowed"]} .${gridClasses["row--lastVisible"]} .${gridClasses.cell}`]: {
|
||
borderBottomColor: "transparent"
|
||
},
|
||
[`& .${gridClasses.columnHeader}, & .${gridClasses.cell}`]: {
|
||
WebkitTapHighlightColor: "transparent",
|
||
lineHeight: null,
|
||
padding: "0 10px",
|
||
boxSizing: "border-box"
|
||
},
|
||
[`& .${gridClasses.columnHeader}:focus-within, & .${gridClasses.cell}:focus-within`]: {
|
||
outline: `solid ${theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / 0.5)` : alpha(theme.palette.primary.main, 0.5)} 1px`,
|
||
outlineWidth: 1,
|
||
outlineOffset: -1
|
||
},
|
||
[`& .${gridClasses.columnHeader}:focus, & .${gridClasses.cell}:focus`]: {
|
||
outline: `solid ${theme.palette.primary.main} 1px`
|
||
},
|
||
[`& .${gridClasses.columnHeaderCheckbox}, & .${gridClasses.cellCheckbox}`]: {
|
||
padding: 0,
|
||
justifyContent: "center",
|
||
alignItems: "center"
|
||
},
|
||
[`& .${gridClasses.columnHeader}`]: {
|
||
position: "relative",
|
||
display: "flex",
|
||
alignItems: "center"
|
||
},
|
||
[`& .${gridClasses["columnHeader--sorted"]} .${gridClasses.iconButtonContainer}, & .${gridClasses["columnHeader--filtered"]} .${gridClasses.iconButtonContainer}`]: {
|
||
visibility: "visible",
|
||
width: "auto"
|
||
},
|
||
[`& .${gridClasses.columnHeader}:not(.${gridClasses["columnHeader--sorted"]}) .${gridClasses.sortIcon}`]: {
|
||
opacity: 0,
|
||
transition: theme.transitions.create(["opacity"], {
|
||
duration: theme.transitions.duration.shorter
|
||
})
|
||
},
|
||
[`& .${gridClasses.columnHeaderTitleContainer}`]: {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
minWidth: 0,
|
||
flex: 1,
|
||
whiteSpace: "nowrap",
|
||
overflow: "hidden",
|
||
// to anchor the aggregation label
|
||
position: "relative"
|
||
},
|
||
[`& .${gridClasses.columnHeaderTitleContainerContent}`]: {
|
||
overflow: "hidden",
|
||
display: "flex",
|
||
alignItems: "center"
|
||
},
|
||
[`& .${gridClasses["columnHeader--filledGroup"]} .${gridClasses.columnHeaderTitleContainer}`]: {
|
||
borderBottomWidth: "1px",
|
||
borderBottomStyle: "solid",
|
||
boxSizing: "border-box"
|
||
},
|
||
[`& .${gridClasses["columnHeader--filledGroup"]}.${gridClasses["columnHeader--showColumnBorder"]} .${gridClasses.columnHeaderTitleContainer}`]: {
|
||
borderBottom: `none`
|
||
},
|
||
[`& .${gridClasses["columnHeader--filledGroup"]}.${gridClasses["columnHeader--showColumnBorder"]}`]: {
|
||
borderBottomWidth: "1px",
|
||
borderBottomStyle: "solid",
|
||
boxSizing: "border-box"
|
||
},
|
||
[`& .${gridClasses.headerFilterRow}`]: {
|
||
borderTop: `1px solid ${borderColor}`
|
||
},
|
||
[`& .${gridClasses.sortIcon}, & .${gridClasses.filterIcon}`]: {
|
||
fontSize: "inherit"
|
||
},
|
||
[`& .${gridClasses["columnHeader--sortable"]}`]: {
|
||
cursor: "pointer"
|
||
},
|
||
[`& .${gridClasses["columnHeader--alignCenter"]} .${gridClasses.columnHeaderTitleContainer}`]: {
|
||
justifyContent: "center"
|
||
},
|
||
[`& .${gridClasses["columnHeader--alignRight"]} .${gridClasses.columnHeaderDraggableContainer}, & .${gridClasses["columnHeader--alignRight"]} .${gridClasses.columnHeaderTitleContainer}`]: {
|
||
flexDirection: "row-reverse"
|
||
},
|
||
[`& .${gridClasses["columnHeader--alignCenter"]} .${gridClasses.menuIcon}, & .${gridClasses["columnHeader--alignRight"]} .${gridClasses.menuIcon}`]: {
|
||
marginRight: "auto",
|
||
marginLeft: -6
|
||
},
|
||
[`& .${gridClasses["columnHeader--alignRight"]} .${gridClasses.menuIcon}, & .${gridClasses["columnHeader--alignRight"]} .${gridClasses.menuIcon}`]: {
|
||
marginRight: "auto",
|
||
marginLeft: -10
|
||
},
|
||
[`& .${gridClasses["columnHeader--moving"]}`]: {
|
||
backgroundColor: (theme.vars || theme).palette.action.hover
|
||
},
|
||
[`& .${gridClasses.columnSeparator}`]: {
|
||
visibility: "hidden",
|
||
position: "absolute",
|
||
zIndex: 100,
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
justifyContent: "center",
|
||
color: borderColor
|
||
},
|
||
"@media (hover: hover)": {
|
||
[`& .${gridClasses.columnHeaders}:hover`]: columnHeadersStyles,
|
||
[`& .${gridClasses.columnHeader}:hover`]: columnHeaderStyles,
|
||
[`& .${gridClasses.columnHeader}:not(.${gridClasses["columnHeader--sorted"]}):hover .${gridClasses.sortIcon}`]: {
|
||
opacity: 0.5
|
||
}
|
||
},
|
||
"@media (hover: none)": {
|
||
[`& .${gridClasses.columnHeaders}`]: columnHeadersStyles,
|
||
[`& .${gridClasses.columnHeader}`]: columnHeaderStyles
|
||
},
|
||
[`& .${gridClasses["columnSeparator--sideLeft"]}`]: {
|
||
left: -12
|
||
},
|
||
[`& .${gridClasses["columnSeparator--sideRight"]}`]: {
|
||
right: -12
|
||
},
|
||
[`& .${gridClasses["columnSeparator--resizable"]}`]: {
|
||
cursor: "col-resize",
|
||
touchAction: "none",
|
||
"&:hover": {
|
||
color: (theme.vars || theme).palette.text.primary,
|
||
// Reset on touch devices, it doesn't add specificity
|
||
"@media (hover: none)": {
|
||
color: borderColor
|
||
}
|
||
},
|
||
[`&.${gridClasses["columnSeparator--resizing"]}`]: {
|
||
color: (theme.vars || theme).palette.text.primary
|
||
},
|
||
"& svg": {
|
||
pointerEvents: "none"
|
||
}
|
||
},
|
||
[`& .${gridClasses.iconSeparator}`]: {
|
||
color: "inherit"
|
||
},
|
||
[`& .${gridClasses.menuIcon}`]: {
|
||
width: 0,
|
||
visibility: "hidden",
|
||
fontSize: 20,
|
||
marginRight: -10,
|
||
display: "flex",
|
||
alignItems: "center"
|
||
},
|
||
[`.${gridClasses.menuOpen}`]: {
|
||
visibility: "visible",
|
||
width: "auto"
|
||
},
|
||
[`& .${gridClasses.row}`]: {
|
||
display: "flex",
|
||
width: "fit-content",
|
||
breakInside: "avoid",
|
||
// Avoid the row to be broken in two different print pages.
|
||
"&:hover, &.Mui-hovered": {
|
||
backgroundColor: (theme.vars || theme).palette.action.hover,
|
||
// Reset on touch devices, it doesn't add specificity
|
||
"@media (hover: none)": {
|
||
backgroundColor: "transparent"
|
||
}
|
||
},
|
||
"&.Mui-selected": {
|
||
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
||
"&:hover, &.Mui-hovered": {
|
||
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(
|
||
${theme.vars.palette.action.selectedOpacity} +
|
||
${theme.vars.palette.action.hoverOpacity}
|
||
))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
||
// Reset on touch devices, it doesn't add specificity
|
||
"@media (hover: none)": {
|
||
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
||
}
|
||
}
|
||
}
|
||
},
|
||
[`& .${gridClasses.cell}`]: {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
borderBottom: "1px solid",
|
||
"&.Mui-selected": {
|
||
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
|
||
"&:hover, &.Mui-hovered": {
|
||
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity + theme.palette.action.hoverOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
||
// Reset on touch devices, it doesn't add specificity
|
||
"@media (hover: none)": {
|
||
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
||
}
|
||
}
|
||
}
|
||
},
|
||
[`&.${gridClasses["root--disableUserSelection"]} .${gridClasses.cell}`]: {
|
||
userSelect: "none"
|
||
},
|
||
[`& .${gridClasses.row}:not(.${gridClasses["row--dynamicHeight"]}) > .${gridClasses.cell}`]: {
|
||
overflow: "hidden",
|
||
whiteSpace: "nowrap"
|
||
},
|
||
[`& .${gridClasses.cellContent}`]: {
|
||
overflow: "hidden",
|
||
textOverflow: "ellipsis"
|
||
},
|
||
[`& .${gridClasses.cell}.${gridClasses["cell--selectionMode"]}`]: {
|
||
cursor: "default"
|
||
},
|
||
[`& .${gridClasses.cell}.${gridClasses["cell--editing"]}`]: {
|
||
padding: 1,
|
||
display: "flex",
|
||
boxShadow: theme.shadows[2],
|
||
backgroundColor: (theme.vars || theme).palette.background.paper,
|
||
"&:focus-within": {
|
||
outline: `solid ${(theme.vars || theme).palette.primary.main} 1px`,
|
||
outlineOffset: "-1px"
|
||
}
|
||
},
|
||
[`& .${gridClasses["row--editing"]}`]: {
|
||
boxShadow: theme.shadows[2]
|
||
},
|
||
[`& .${gridClasses["row--editing"]} .${gridClasses.cell}`]: {
|
||
boxShadow: theme.shadows[0],
|
||
backgroundColor: (theme.vars || theme).palette.background.paper
|
||
},
|
||
[`& .${gridClasses.editBooleanCell}`]: {
|
||
display: "flex",
|
||
height: "100%",
|
||
width: "100%",
|
||
alignItems: "center",
|
||
justifyContent: "center"
|
||
},
|
||
[`& .${gridClasses.booleanCell}[data-value="true"]`]: {
|
||
color: (theme.vars || theme).palette.text.secondary
|
||
},
|
||
[`& .${gridClasses.booleanCell}[data-value="false"]`]: {
|
||
color: (theme.vars || theme).palette.text.disabled
|
||
},
|
||
[`& .${gridClasses.actionsCell}`]: {
|
||
display: "inline-flex",
|
||
alignItems: "center",
|
||
gridGap: theme.spacing(1)
|
||
},
|
||
[`& .${gridClasses.rowReorderCell}`]: {
|
||
display: "inline-flex",
|
||
flex: 1,
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
||
},
|
||
[`& .${gridClasses["rowReorderCell--draggable"]}`]: {
|
||
cursor: "move",
|
||
opacity: 1
|
||
},
|
||
[`& .${gridClasses.rowReorderCellContainer}`]: {
|
||
padding: 0,
|
||
alignItems: "stretch"
|
||
},
|
||
[`.${gridClasses.withBorderColor}`]: {
|
||
borderColor
|
||
},
|
||
[`& .${gridClasses["cell--withRightBorder"]}`]: {
|
||
borderRightWidth: "1px",
|
||
borderRightStyle: "solid"
|
||
},
|
||
[`& .${gridClasses["columnHeader--withRightBorder"]}`]: {
|
||
borderRightWidth: "1px",
|
||
borderRightStyle: "solid"
|
||
},
|
||
[`& .${gridClasses["cell--textLeft"]}`]: {
|
||
justifyContent: "flex-start"
|
||
},
|
||
[`& .${gridClasses["cell--textRight"]}`]: {
|
||
justifyContent: "flex-end"
|
||
},
|
||
[`& .${gridClasses["cell--textCenter"]}`]: {
|
||
justifyContent: "center"
|
||
},
|
||
[`& .${gridClasses.columnHeaderDraggableContainer}`]: {
|
||
display: "flex",
|
||
width: "100%",
|
||
height: "100%"
|
||
},
|
||
[`& .${gridClasses.rowReorderCellPlaceholder}`]: {
|
||
display: "none"
|
||
},
|
||
[`& .${gridClasses["columnHeader--dragging"]}, & .${gridClasses["row--dragging"]}`]: {
|
||
background: (theme.vars || theme).palette.background.paper,
|
||
padding: "0 12px",
|
||
borderRadius: "var(--unstable_DataGrid-radius)",
|
||
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
||
},
|
||
[`& .${gridClasses["row--dragging"]}`]: {
|
||
background: (theme.vars || theme).palette.background.paper,
|
||
padding: "0 12px",
|
||
borderRadius: "var(--unstable_DataGrid-radius)",
|
||
opacity: (theme.vars || theme).palette.action.disabledOpacity,
|
||
[`& .${gridClasses.rowReorderCellPlaceholder}`]: {
|
||
display: "flex"
|
||
}
|
||
},
|
||
[`& .${gridClasses.treeDataGroupingCell}`]: {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
width: "100%"
|
||
},
|
||
[`& .${gridClasses.treeDataGroupingCellToggle}`]: {
|
||
flex: "0 0 28px",
|
||
alignSelf: "stretch",
|
||
marginRight: theme.spacing(2)
|
||
},
|
||
[`& .${gridClasses.groupingCriteriaCell}`]: {
|
||
display: "flex",
|
||
alignItems: "center",
|
||
width: "100%"
|
||
},
|
||
[`& .${gridClasses.groupingCriteriaCellToggle}`]: {
|
||
flex: "0 0 28px",
|
||
alignSelf: "stretch",
|
||
marginRight: theme.spacing(2)
|
||
}
|
||
});
|
||
return gridStyle;
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/containers/GridRoot.js
|
||
var import_jsx_runtime18 = __toESM(require_jsx_runtime());
|
||
var _excluded14 = ["children", "className"];
|
||
var useUtilityClasses10 = (ownerState) => {
|
||
const {
|
||
autoHeight,
|
||
density,
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["root", autoHeight && "autoHeight", `root--density${capitalize(density)}`, "withBorderColor"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridRoot = React27.forwardRef(function GridRoot2(props, ref) {
|
||
var _rootProps$experiment;
|
||
const rootProps = useGridRootProps();
|
||
const {
|
||
children,
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded14);
|
||
const apiRef = useGridPrivateApiContext();
|
||
const densityValue = useGridSelector(apiRef, gridDensityValueSelector);
|
||
const rootContainerRef = React27.useRef(null);
|
||
const handleRef = useForkRef(rootContainerRef, ref);
|
||
const getAriaAttributes = (_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.ariaV7 ? null : useGridAriaAttributes;
|
||
const ariaAttributes = typeof getAriaAttributes === "function" ? getAriaAttributes() : null;
|
||
const ownerState = _extends({}, rootProps, {
|
||
density: densityValue
|
||
});
|
||
const classes = useUtilityClasses10(ownerState);
|
||
apiRef.current.register("public", {
|
||
rootElementRef: rootContainerRef
|
||
});
|
||
const [mountedState, setMountedState] = React27.useState(false);
|
||
useEnhancedEffect_default(() => {
|
||
setMountedState(true);
|
||
}, []);
|
||
if (!mountedState) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime18.jsx)(GridRootStyles, _extends({
|
||
ref: handleRef,
|
||
className: clsx_default(className, classes.root),
|
||
ownerState
|
||
}, ariaAttributes, other, {
|
||
children
|
||
}));
|
||
});
|
||
true ? GridRoot.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||
*/
|
||
sx: import_prop_types13.default.oneOfType([import_prop_types13.default.arrayOf(import_prop_types13.default.oneOfType([import_prop_types13.default.func, import_prop_types13.default.object, import_prop_types13.default.bool])), import_prop_types13.default.func, import_prop_types13.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/containers/GridFooterContainer.js
|
||
init_extends();
|
||
var React28 = __toESM(require_react());
|
||
var import_prop_types14 = __toESM(require_prop_types());
|
||
var import_jsx_runtime19 = __toESM(require_jsx_runtime());
|
||
var _excluded15 = ["className"];
|
||
var useUtilityClasses11 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["footerContainer", "withBorderColor"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridFooterContainerRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "FooterContainer",
|
||
overridesResolver: (props, styles) => styles.footerContainer
|
||
})({
|
||
display: "flex",
|
||
justifyContent: "space-between",
|
||
alignItems: "center",
|
||
minHeight: 52,
|
||
borderTop: "1px solid"
|
||
});
|
||
var GridFooterContainer = React28.forwardRef(function GridFooterContainer2(props, ref) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded15);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses11(rootProps);
|
||
return (0, import_jsx_runtime19.jsx)(GridFooterContainerRoot, _extends({
|
||
ref,
|
||
className: clsx_default(classes.root, className),
|
||
ownerState: rootProps
|
||
}, other));
|
||
});
|
||
true ? GridFooterContainer.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
sx: import_prop_types14.default.oneOfType([import_prop_types14.default.arrayOf(import_prop_types14.default.oneOfType([import_prop_types14.default.func, import_prop_types14.default.object, import_prop_types14.default.bool])), import_prop_types14.default.func, import_prop_types14.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/containers/GridOverlay.js
|
||
init_extends();
|
||
var React29 = __toESM(require_react());
|
||
var import_prop_types15 = __toESM(require_prop_types());
|
||
var import_jsx_runtime20 = __toESM(require_jsx_runtime());
|
||
var _excluded16 = ["className"];
|
||
var useUtilityClasses12 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["overlay"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridOverlayRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "Overlay",
|
||
overridesResolver: (_, styles) => styles.overlay
|
||
})({
|
||
width: "100%",
|
||
height: "100%",
|
||
display: "flex",
|
||
alignSelf: "center",
|
||
alignItems: "center",
|
||
justifyContent: "center",
|
||
backgroundColor: "var(--unstable_DataGrid-overlayBackground)"
|
||
});
|
||
var GridOverlay = React29.forwardRef(function GridOverlay2(props, ref) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded16);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses12(rootProps);
|
||
return (0, import_jsx_runtime20.jsx)(GridOverlayRoot, _extends({
|
||
ref,
|
||
className: clsx_default(classes.root, className),
|
||
ownerState: rootProps
|
||
}, other));
|
||
});
|
||
true ? GridOverlay.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
sx: import_prop_types15.default.oneOfType([import_prop_types15.default.arrayOf(import_prop_types15.default.oneOfType([import_prop_types15.default.func, import_prop_types15.default.object, import_prop_types15.default.bool])), import_prop_types15.default.func, import_prop_types15.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/containers/GridToolbarContainer.js
|
||
init_extends();
|
||
var React30 = __toESM(require_react());
|
||
var import_prop_types16 = __toESM(require_prop_types());
|
||
var import_jsx_runtime21 = __toESM(require_jsx_runtime());
|
||
var _excluded17 = ["className", "children"];
|
||
var useUtilityClasses13 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["toolbarContainer"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridToolbarContainerRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "ToolbarContainer",
|
||
overridesResolver: (_, styles) => styles.toolbarContainer
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
display: "flex",
|
||
alignItems: "center",
|
||
flexWrap: "wrap",
|
||
gap: theme.spacing(1),
|
||
padding: theme.spacing(0.5, 0.5, 0)
|
||
}));
|
||
var GridToolbarContainer = React30.forwardRef(function GridToolbarContainer2(props, ref) {
|
||
const {
|
||
className,
|
||
children
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded17);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses13(rootProps);
|
||
if (!children) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime21.jsx)(GridToolbarContainerRoot, _extends({
|
||
ref,
|
||
className: clsx_default(className, classes.root),
|
||
ownerState: rootProps
|
||
}, other, {
|
||
children
|
||
}));
|
||
});
|
||
true ? GridToolbarContainer.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
sx: import_prop_types16.default.oneOfType([import_prop_types16.default.arrayOf(import_prop_types16.default.oneOfType([import_prop_types16.default.func, import_prop_types16.default.object, import_prop_types16.default.bool])), import_prop_types16.default.func, import_prop_types16.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderItem.js
|
||
init_extends();
|
||
var React38 = __toESM(require_react());
|
||
var import_prop_types21 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderSortIcon.js
|
||
init_extends();
|
||
var React32 = __toESM(require_react());
|
||
var import_prop_types17 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridIconButtonContainer.js
|
||
init_extends();
|
||
var React31 = __toESM(require_react());
|
||
var import_jsx_runtime22 = __toESM(require_jsx_runtime());
|
||
var _excluded18 = ["className"];
|
||
var useUtilityClasses14 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["iconButtonContainer"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridIconButtonContainerRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "IconButtonContainer",
|
||
overridesResolver: (props, styles) => styles.iconButtonContainer
|
||
})(() => ({
|
||
display: "flex",
|
||
visibility: "hidden",
|
||
width: 0
|
||
}));
|
||
var GridIconButtonContainer = React31.forwardRef(function GridIconButtonContainer2(props, ref) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded18);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses14(rootProps);
|
||
return (0, import_jsx_runtime22.jsx)(GridIconButtonContainerRoot, _extends({
|
||
ref,
|
||
className: clsx_default(classes.root, className),
|
||
ownerState: rootProps
|
||
}, other));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderSortIcon.js
|
||
var import_jsx_runtime23 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime24 = __toESM(require_jsx_runtime());
|
||
var useUtilityClasses15 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
icon: ["sortIcon"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function getIcon(icons, direction, className, sortingOrder) {
|
||
let Icon;
|
||
const iconProps = {};
|
||
if (direction === "asc") {
|
||
Icon = icons.columnSortedAscendingIcon;
|
||
} else if (direction === "desc") {
|
||
Icon = icons.columnSortedDescendingIcon;
|
||
} else {
|
||
Icon = icons.columnUnsortedIcon;
|
||
iconProps.sortingOrder = sortingOrder;
|
||
}
|
||
return Icon ? (0, import_jsx_runtime23.jsx)(Icon, _extends({
|
||
fontSize: "small",
|
||
className
|
||
}, iconProps)) : null;
|
||
}
|
||
function GridColumnHeaderSortIconRaw(props) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
direction,
|
||
index,
|
||
sortingOrder
|
||
} = props;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = _extends({}, props, {
|
||
classes: rootProps.classes
|
||
});
|
||
const classes = useUtilityClasses15(ownerState);
|
||
const iconElement = getIcon(rootProps.slots, direction, classes.icon, sortingOrder);
|
||
if (!iconElement) {
|
||
return null;
|
||
}
|
||
const iconButton = (0, import_jsx_runtime23.jsx)(rootProps.slots.baseIconButton, _extends({
|
||
tabIndex: -1,
|
||
"aria-label": apiRef.current.getLocaleText("columnHeaderSortIconLabel"),
|
||
title: apiRef.current.getLocaleText("columnHeaderSortIconLabel"),
|
||
size: "small"
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
|
||
children: iconElement
|
||
}));
|
||
return (0, import_jsx_runtime24.jsxs)(GridIconButtonContainer, {
|
||
children: [index != null && (0, import_jsx_runtime23.jsx)(Badge_default, {
|
||
badgeContent: index,
|
||
color: "default",
|
||
children: iconButton
|
||
}), index == null && iconButton]
|
||
});
|
||
}
|
||
var GridColumnHeaderSortIcon = React32.memo(GridColumnHeaderSortIconRaw);
|
||
true ? GridColumnHeaderSortIconRaw.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
direction: import_prop_types17.default.oneOf(["asc", "desc"]),
|
||
index: import_prop_types17.default.number,
|
||
sortingOrder: import_prop_types17.default.arrayOf(import_prop_types17.default.oneOf(["asc", "desc"])).isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/ColumnHeaderMenuIcon.js
|
||
init_extends();
|
||
var React33 = __toESM(require_react());
|
||
var import_jsx_runtime25 = __toESM(require_jsx_runtime());
|
||
var useUtilityClasses16 = (ownerState) => {
|
||
const {
|
||
classes,
|
||
open
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["menuIcon", open && "menuOpen"],
|
||
button: ["menuIconButton"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var ColumnHeaderMenuIcon = React33.memo((props) => {
|
||
var _rootProps$slotProps, _rootProps$slotProps2;
|
||
const {
|
||
colDef,
|
||
open,
|
||
columnMenuId,
|
||
columnMenuButtonId,
|
||
iconButtonRef
|
||
} = props;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = _extends({}, props, {
|
||
classes: rootProps.classes
|
||
});
|
||
const classes = useUtilityClasses16(ownerState);
|
||
const handleMenuIconClick = React33.useCallback((event) => {
|
||
event.preventDefault();
|
||
event.stopPropagation();
|
||
apiRef.current.toggleColumnMenu(colDef.field);
|
||
}, [apiRef, colDef.field]);
|
||
return (0, import_jsx_runtime25.jsx)("div", {
|
||
className: classes.root,
|
||
children: (0, import_jsx_runtime25.jsx)(rootProps.slots.baseTooltip, _extends({
|
||
title: apiRef.current.getLocaleText("columnMenuLabel"),
|
||
enterDelay: 1e3
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTooltip, {
|
||
children: (0, import_jsx_runtime25.jsx)(rootProps.slots.baseIconButton, _extends({
|
||
ref: iconButtonRef,
|
||
tabIndex: -1,
|
||
className: classes.button,
|
||
"aria-label": apiRef.current.getLocaleText("columnMenuLabel"),
|
||
size: "small",
|
||
onClick: handleMenuIconClick,
|
||
"aria-haspopup": "menu",
|
||
"aria-expanded": open,
|
||
"aria-controls": open ? columnMenuId : void 0,
|
||
id: columnMenuButtonId
|
||
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseIconButton, {
|
||
children: (0, import_jsx_runtime25.jsx)(rootProps.slots.columnMenuIcon, {
|
||
fontSize: "small"
|
||
})
|
||
}))
|
||
}))
|
||
});
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/GridColumnHeaderMenu.js
|
||
init_extends();
|
||
var React34 = __toESM(require_react());
|
||
var import_prop_types18 = __toESM(require_prop_types());
|
||
var import_jsx_runtime26 = __toESM(require_jsx_runtime());
|
||
function GridColumnHeaderMenu({
|
||
columnMenuId,
|
||
columnMenuButtonId,
|
||
ContentComponent,
|
||
contentComponentProps,
|
||
field,
|
||
open,
|
||
target,
|
||
onExited
|
||
}) {
|
||
const apiRef = useGridApiContext();
|
||
const colDef = apiRef.current.getColumn(field);
|
||
const hideMenu = useEventCallback_default((event) => {
|
||
if (event) {
|
||
event.stopPropagation();
|
||
if (target != null && target.contains(event.target)) {
|
||
return;
|
||
}
|
||
}
|
||
apiRef.current.hideColumnMenu();
|
||
});
|
||
if (!target || !colDef) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime26.jsx)(GridMenu, {
|
||
placement: `bottom-${colDef.align === "right" ? "start" : "end"}`,
|
||
open,
|
||
target,
|
||
onClose: hideMenu,
|
||
onExited,
|
||
children: (0, import_jsx_runtime26.jsx)(ContentComponent, _extends({
|
||
colDef,
|
||
hideMenu,
|
||
open,
|
||
id: columnMenuId,
|
||
labelledby: columnMenuButtonId
|
||
}, contentComponentProps))
|
||
});
|
||
}
|
||
true ? GridColumnHeaderMenu.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
columnMenuButtonId: import_prop_types18.default.string,
|
||
columnMenuId: import_prop_types18.default.string,
|
||
ContentComponent: import_prop_types18.default.elementType.isRequired,
|
||
contentComponentProps: import_prop_types18.default.any,
|
||
field: import_prop_types18.default.string.isRequired,
|
||
onExited: import_prop_types18.default.func,
|
||
open: import_prop_types18.default.bool.isRequired,
|
||
target: HTMLElementType
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridGenericColumnHeaderItem.js
|
||
init_extends();
|
||
var React37 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderTitle.js
|
||
init_extends();
|
||
var React35 = __toESM(require_react());
|
||
var import_prop_types19 = __toESM(require_prop_types());
|
||
var import_jsx_runtime27 = __toESM(require_jsx_runtime());
|
||
var _excluded19 = ["className"];
|
||
var useUtilityClasses17 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["columnHeaderTitle"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridColumnHeaderTitleRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "ColumnHeaderTitle",
|
||
overridesResolver: (props, styles) => styles.columnHeaderTitle
|
||
})({
|
||
textOverflow: "ellipsis",
|
||
overflow: "hidden",
|
||
whiteSpace: "nowrap",
|
||
fontWeight: "var(--unstable_DataGrid-headWeight)"
|
||
});
|
||
var ColumnHeaderInnerTitle = React35.forwardRef(function ColumnHeaderInnerTitle2(props, ref) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded19);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses17(rootProps);
|
||
return (0, import_jsx_runtime27.jsx)(GridColumnHeaderTitleRoot, _extends({
|
||
ref,
|
||
className: clsx_default(classes.root, className),
|
||
ownerState: rootProps
|
||
}, other));
|
||
});
|
||
function GridColumnHeaderTitle(props) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
label,
|
||
description
|
||
} = props;
|
||
const rootProps = useGridRootProps();
|
||
const titleRef = React35.useRef(null);
|
||
const [tooltip, setTooltip] = React35.useState("");
|
||
const handleMouseOver = React35.useCallback(() => {
|
||
if (!description && titleRef != null && titleRef.current) {
|
||
const isOver = isOverflown(titleRef.current);
|
||
if (isOver) {
|
||
setTooltip(label);
|
||
} else {
|
||
setTooltip("");
|
||
}
|
||
}
|
||
}, [description, label]);
|
||
return (0, import_jsx_runtime27.jsx)(rootProps.slots.baseTooltip, _extends({
|
||
title: description || tooltip
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTooltip, {
|
||
children: (0, import_jsx_runtime27.jsx)(ColumnHeaderInnerTitle, {
|
||
onMouseOver: handleMouseOver,
|
||
ref: titleRef,
|
||
children: label
|
||
})
|
||
}));
|
||
}
|
||
true ? GridColumnHeaderTitle.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
columnWidth: import_prop_types19.default.number.isRequired,
|
||
description: import_prop_types19.default.node,
|
||
label: import_prop_types19.default.string.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderSeparator.js
|
||
init_extends();
|
||
var React36 = __toESM(require_react());
|
||
var import_prop_types20 = __toESM(require_prop_types());
|
||
var import_jsx_runtime28 = __toESM(require_jsx_runtime());
|
||
var _excluded20 = ["resizable", "resizing", "height", "side"];
|
||
var GridColumnHeaderSeparatorSides = function(GridColumnHeaderSeparatorSides2) {
|
||
GridColumnHeaderSeparatorSides2["Left"] = "left";
|
||
GridColumnHeaderSeparatorSides2["Right"] = "right";
|
||
return GridColumnHeaderSeparatorSides2;
|
||
}(GridColumnHeaderSeparatorSides || {});
|
||
var useUtilityClasses18 = (ownerState) => {
|
||
const {
|
||
resizable,
|
||
resizing,
|
||
classes,
|
||
side
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["columnSeparator", resizable && "columnSeparator--resizable", resizing && "columnSeparator--resizing", side && `columnSeparator--side${capitalize(side)}`],
|
||
icon: ["iconSeparator"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function GridColumnHeaderSeparatorRaw(props) {
|
||
const {
|
||
height,
|
||
side = GridColumnHeaderSeparatorSides.Right
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded20);
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = _extends({}, props, {
|
||
side,
|
||
classes: rootProps.classes
|
||
});
|
||
const classes = useUtilityClasses18(ownerState);
|
||
const stopClick = React36.useCallback((event) => {
|
||
event.preventDefault();
|
||
event.stopPropagation();
|
||
}, []);
|
||
return (
|
||
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
||
(0, import_jsx_runtime28.jsx)("div", _extends({
|
||
className: classes.root,
|
||
style: {
|
||
minHeight: height,
|
||
opacity: rootProps.showColumnVerticalBorder ? 0 : 1
|
||
}
|
||
}, other, {
|
||
onClick: stopClick,
|
||
children: (0, import_jsx_runtime28.jsx)(rootProps.slots.columnResizeIcon, {
|
||
className: classes.icon
|
||
})
|
||
}))
|
||
);
|
||
}
|
||
var GridColumnHeaderSeparator = React36.memo(GridColumnHeaderSeparatorRaw);
|
||
true ? GridColumnHeaderSeparatorRaw.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
height: import_prop_types20.default.number.isRequired,
|
||
resizable: import_prop_types20.default.bool.isRequired,
|
||
resizing: import_prop_types20.default.bool.isRequired,
|
||
side: import_prop_types20.default.oneOf(["left", "right"])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridGenericColumnHeaderItem.js
|
||
var import_jsx_runtime29 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime30 = __toESM(require_jsx_runtime());
|
||
var _excluded21 = ["classes", "columnMenuOpen", "colIndex", "height", "isResizing", "sortDirection", "hasFocus", "tabIndex", "separatorSide", "isDraggable", "headerComponent", "description", "elementId", "width", "columnMenuIconButton", "columnMenu", "columnTitleIconButtons", "headerClassName", "label", "resizable", "draggableContainerProps", "columnHeaderSeparatorProps"];
|
||
var GridGenericColumnHeaderItem = React37.forwardRef(function GridGenericColumnHeaderItem2(props, ref) {
|
||
const {
|
||
classes,
|
||
columnMenuOpen,
|
||
colIndex,
|
||
height,
|
||
isResizing,
|
||
sortDirection,
|
||
hasFocus,
|
||
tabIndex,
|
||
separatorSide,
|
||
isDraggable,
|
||
headerComponent,
|
||
description,
|
||
width,
|
||
columnMenuIconButton = null,
|
||
columnMenu = null,
|
||
columnTitleIconButtons = null,
|
||
headerClassName,
|
||
label,
|
||
resizable,
|
||
draggableContainerProps,
|
||
columnHeaderSeparatorProps
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded21);
|
||
const apiRef = useGridPrivateApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const headerCellRef = React37.useRef(null);
|
||
const [showColumnMenuIcon, setShowColumnMenuIcon] = React37.useState(columnMenuOpen);
|
||
const handleRef = useForkRef(headerCellRef, ref);
|
||
let ariaSort = "none";
|
||
if (sortDirection != null) {
|
||
ariaSort = sortDirection === "asc" ? "ascending" : "descending";
|
||
}
|
||
React37.useEffect(() => {
|
||
if (!showColumnMenuIcon) {
|
||
setShowColumnMenuIcon(columnMenuOpen);
|
||
}
|
||
}, [showColumnMenuIcon, columnMenuOpen]);
|
||
React37.useLayoutEffect(() => {
|
||
const columnMenuState = apiRef.current.state.columnMenu;
|
||
if (hasFocus && !columnMenuState.open) {
|
||
const focusableElement = headerCellRef.current.querySelector('[tabindex="0"]');
|
||
const elementToFocus = focusableElement || headerCellRef.current;
|
||
elementToFocus == null || elementToFocus.focus();
|
||
apiRef.current.columnHeadersContainerElementRef.current.scrollLeft = 0;
|
||
}
|
||
}, [apiRef, hasFocus]);
|
||
return (0, import_jsx_runtime30.jsxs)("div", _extends({
|
||
ref: handleRef,
|
||
className: clsx_default(classes.root, headerClassName),
|
||
style: {
|
||
height,
|
||
width,
|
||
minWidth: width,
|
||
maxWidth: width
|
||
},
|
||
role: "columnheader",
|
||
tabIndex,
|
||
"aria-colindex": colIndex + 1,
|
||
"aria-sort": ariaSort,
|
||
"aria-label": headerComponent == null ? label : void 0
|
||
}, other, {
|
||
children: [(0, import_jsx_runtime30.jsxs)("div", _extends({
|
||
className: classes.draggableContainer,
|
||
draggable: isDraggable,
|
||
role: "presentation"
|
||
}, draggableContainerProps, {
|
||
children: [(0, import_jsx_runtime30.jsxs)("div", {
|
||
className: classes.titleContainer,
|
||
role: "presentation",
|
||
children: [(0, import_jsx_runtime29.jsx)("div", {
|
||
className: classes.titleContainerContent,
|
||
children: headerComponent !== void 0 ? headerComponent : (0, import_jsx_runtime29.jsx)(GridColumnHeaderTitle, {
|
||
label,
|
||
description,
|
||
columnWidth: width
|
||
})
|
||
}), columnTitleIconButtons]
|
||
}), columnMenuIconButton]
|
||
})), (0, import_jsx_runtime29.jsx)(GridColumnHeaderSeparator, _extends({
|
||
resizable: !rootProps.disableColumnResize && !!resizable,
|
||
resizing: isResizing,
|
||
height,
|
||
side: separatorSide
|
||
}, columnHeaderSeparatorProps)), columnMenu]
|
||
}));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderItem.js
|
||
var import_jsx_runtime31 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime32 = __toESM(require_jsx_runtime());
|
||
var useUtilityClasses19 = (ownerState) => {
|
||
const {
|
||
colDef,
|
||
classes,
|
||
isDragging,
|
||
sortDirection,
|
||
showRightBorder,
|
||
filterItemsCounter
|
||
} = ownerState;
|
||
const isColumnSorted = sortDirection != null;
|
||
const isColumnFiltered = filterItemsCounter != null && filterItemsCounter > 0;
|
||
const isColumnNumeric = colDef.type === "number";
|
||
const slots = {
|
||
root: ["columnHeader", colDef.headerAlign === "left" && "columnHeader--alignLeft", colDef.headerAlign === "center" && "columnHeader--alignCenter", colDef.headerAlign === "right" && "columnHeader--alignRight", colDef.sortable && "columnHeader--sortable", isDragging && "columnHeader--moving", isColumnSorted && "columnHeader--sorted", isColumnFiltered && "columnHeader--filtered", isColumnNumeric && "columnHeader--numeric", "withBorderColor", showRightBorder && "columnHeader--withRightBorder"],
|
||
draggableContainer: ["columnHeaderDraggableContainer"],
|
||
titleContainer: ["columnHeaderTitleContainer"],
|
||
titleContainerContent: ["columnHeaderTitleContainerContent"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function GridColumnHeaderItem(props) {
|
||
var _rootProps$slotProps, _colDef$sortingOrder, _rootProps$slotProps2, _colDef$headerName;
|
||
const {
|
||
colDef,
|
||
columnMenuOpen,
|
||
colIndex,
|
||
headerHeight,
|
||
isResizing,
|
||
sortDirection,
|
||
sortIndex,
|
||
filterItemsCounter,
|
||
hasFocus,
|
||
tabIndex,
|
||
disableReorder,
|
||
separatorSide
|
||
} = props;
|
||
const apiRef = useGridPrivateApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const headerCellRef = React38.useRef(null);
|
||
const columnMenuId = useId();
|
||
const columnMenuButtonId = useId();
|
||
const iconButtonRef = React38.useRef(null);
|
||
const [showColumnMenuIcon, setShowColumnMenuIcon] = React38.useState(columnMenuOpen);
|
||
const isDraggable = React38.useMemo(() => !rootProps.disableColumnReorder && !disableReorder && !colDef.disableReorder, [rootProps.disableColumnReorder, disableReorder, colDef.disableReorder]);
|
||
let headerComponent;
|
||
if (colDef.renderHeader) {
|
||
headerComponent = colDef.renderHeader(apiRef.current.getColumnHeaderParams(colDef.field));
|
||
}
|
||
const ownerState = _extends({}, props, {
|
||
classes: rootProps.classes,
|
||
showRightBorder: rootProps.showColumnVerticalBorder
|
||
});
|
||
const classes = useUtilityClasses19(ownerState);
|
||
const publish = React38.useCallback((eventName) => (event) => {
|
||
if (isEventTargetInPortal(event)) {
|
||
return;
|
||
}
|
||
apiRef.current.publishEvent(eventName, apiRef.current.getColumnHeaderParams(colDef.field), event);
|
||
}, [apiRef, colDef.field]);
|
||
const mouseEventsHandlers = React38.useMemo(() => ({
|
||
onClick: publish("columnHeaderClick"),
|
||
onDoubleClick: publish("columnHeaderDoubleClick"),
|
||
onMouseOver: publish("columnHeaderOver"),
|
||
// TODO remove as it's not used
|
||
onMouseOut: publish("columnHeaderOut"),
|
||
// TODO remove as it's not used
|
||
onMouseEnter: publish("columnHeaderEnter"),
|
||
// TODO remove as it's not used
|
||
onMouseLeave: publish("columnHeaderLeave"),
|
||
// TODO remove as it's not used
|
||
onKeyDown: publish("columnHeaderKeyDown"),
|
||
onFocus: publish("columnHeaderFocus"),
|
||
onBlur: publish("columnHeaderBlur")
|
||
}), [publish]);
|
||
const draggableEventHandlers = React38.useMemo(() => isDraggable ? {
|
||
onDragStart: publish("columnHeaderDragStart"),
|
||
onDragEnter: publish("columnHeaderDragEnter"),
|
||
onDragOver: publish("columnHeaderDragOver"),
|
||
onDragEnd: publish("columnHeaderDragEnd")
|
||
} : {}, [isDraggable, publish]);
|
||
const columnHeaderSeparatorProps = React38.useMemo(() => ({
|
||
onMouseDown: publish("columnSeparatorMouseDown"),
|
||
onDoubleClick: publish("columnSeparatorDoubleClick")
|
||
}), [publish]);
|
||
React38.useEffect(() => {
|
||
if (!showColumnMenuIcon) {
|
||
setShowColumnMenuIcon(columnMenuOpen);
|
||
}
|
||
}, [showColumnMenuIcon, columnMenuOpen]);
|
||
const handleExited = React38.useCallback(() => {
|
||
setShowColumnMenuIcon(false);
|
||
}, []);
|
||
const columnMenuIconButton = !rootProps.disableColumnMenu && !colDef.disableColumnMenu && (0, import_jsx_runtime31.jsx)(ColumnHeaderMenuIcon, {
|
||
colDef,
|
||
columnMenuId,
|
||
columnMenuButtonId,
|
||
open: showColumnMenuIcon,
|
||
iconButtonRef
|
||
});
|
||
const columnMenu = (0, import_jsx_runtime31.jsx)(GridColumnHeaderMenu, {
|
||
columnMenuId,
|
||
columnMenuButtonId,
|
||
field: colDef.field,
|
||
open: columnMenuOpen,
|
||
target: iconButtonRef.current,
|
||
ContentComponent: rootProps.slots.columnMenu,
|
||
contentComponentProps: (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.columnMenu,
|
||
onExited: handleExited
|
||
});
|
||
const sortingOrder = (_colDef$sortingOrder = colDef.sortingOrder) != null ? _colDef$sortingOrder : rootProps.sortingOrder;
|
||
const columnTitleIconButtons = (0, import_jsx_runtime32.jsxs)(React38.Fragment, {
|
||
children: [!rootProps.disableColumnFilter && (0, import_jsx_runtime31.jsx)(rootProps.slots.columnHeaderFilterIconButton, _extends({
|
||
field: colDef.field,
|
||
counter: filterItemsCounter
|
||
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.columnHeaderFilterIconButton)), colDef.sortable && !colDef.hideSortIcons && (0, import_jsx_runtime31.jsx)(GridColumnHeaderSortIcon, {
|
||
direction: sortDirection,
|
||
index: sortIndex,
|
||
sortingOrder
|
||
})]
|
||
});
|
||
React38.useLayoutEffect(() => {
|
||
const columnMenuState = apiRef.current.state.columnMenu;
|
||
if (hasFocus && !columnMenuState.open) {
|
||
var _apiRef$current$colum;
|
||
const focusableElement = headerCellRef.current.querySelector('[tabindex="0"]');
|
||
const elementToFocus = focusableElement || headerCellRef.current;
|
||
elementToFocus == null || elementToFocus.focus();
|
||
if ((_apiRef$current$colum = apiRef.current.columnHeadersContainerElementRef) != null && _apiRef$current$colum.current) {
|
||
apiRef.current.columnHeadersContainerElementRef.current.scrollLeft = 0;
|
||
}
|
||
}
|
||
}, [apiRef, hasFocus]);
|
||
const headerClassName = typeof colDef.headerClassName === "function" ? colDef.headerClassName({
|
||
field: colDef.field,
|
||
colDef
|
||
}) : colDef.headerClassName;
|
||
const label = (_colDef$headerName = colDef.headerName) != null ? _colDef$headerName : colDef.field;
|
||
return (0, import_jsx_runtime31.jsx)(GridGenericColumnHeaderItem, _extends({
|
||
ref: headerCellRef,
|
||
classes,
|
||
columnMenuOpen,
|
||
colIndex,
|
||
height: headerHeight,
|
||
isResizing,
|
||
sortDirection,
|
||
hasFocus,
|
||
tabIndex,
|
||
separatorSide,
|
||
isDraggable,
|
||
headerComponent,
|
||
description: colDef.description,
|
||
elementId: colDef.field,
|
||
width: colDef.computedWidth,
|
||
columnMenuIconButton,
|
||
columnTitleIconButtons,
|
||
headerClassName,
|
||
label,
|
||
resizable: !rootProps.disableColumnResize && !!colDef.resizable,
|
||
"data-field": colDef.field,
|
||
columnMenu,
|
||
draggableContainerProps: draggableEventHandlers,
|
||
columnHeaderSeparatorProps
|
||
}, mouseEventsHandlers));
|
||
}
|
||
true ? GridColumnHeaderItem.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
colDef: import_prop_types21.default.object.isRequired,
|
||
colIndex: import_prop_types21.default.number.isRequired,
|
||
columnMenuOpen: import_prop_types21.default.bool.isRequired,
|
||
disableReorder: import_prop_types21.default.bool,
|
||
filterItemsCounter: import_prop_types21.default.number,
|
||
hasFocus: import_prop_types21.default.bool,
|
||
headerHeight: import_prop_types21.default.number.isRequired,
|
||
isDragging: import_prop_types21.default.bool.isRequired,
|
||
isResizing: import_prop_types21.default.bool.isRequired,
|
||
separatorSide: import_prop_types21.default.oneOf(["left", "right"]),
|
||
sortDirection: import_prop_types21.default.oneOf(["asc", "desc"]),
|
||
sortIndex: import_prop_types21.default.number,
|
||
tabIndex: import_prop_types21.default.oneOf([-1, 0]).isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderFilterIconButton.js
|
||
init_extends();
|
||
var React44 = __toESM(require_react());
|
||
var import_prop_types22 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterState.js
|
||
var getDefaultGridFilterModel = () => ({
|
||
items: [],
|
||
logicOperator: GridLogicOperator.And,
|
||
quickFilterValues: [],
|
||
quickFilterLogicOperator: GridLogicOperator.And
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridApiEventHandler.js
|
||
var React39 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/utils/cleanupTracking/TimerBasedCleanupTracking.js
|
||
var CLEANUP_TIMER_LOOP_MILLIS = 1e3;
|
||
var TimerBasedCleanupTracking = class {
|
||
constructor(timeout = CLEANUP_TIMER_LOOP_MILLIS) {
|
||
this.timeouts = /* @__PURE__ */ new Map();
|
||
this.cleanupTimeout = CLEANUP_TIMER_LOOP_MILLIS;
|
||
this.cleanupTimeout = timeout;
|
||
}
|
||
register(object, unsubscribe, unregisterToken) {
|
||
if (!this.timeouts) {
|
||
this.timeouts = /* @__PURE__ */ new Map();
|
||
}
|
||
const timeout = setTimeout(() => {
|
||
if (typeof unsubscribe === "function") {
|
||
unsubscribe();
|
||
}
|
||
this.timeouts.delete(unregisterToken.cleanupToken);
|
||
}, this.cleanupTimeout);
|
||
this.timeouts.set(unregisterToken.cleanupToken, timeout);
|
||
}
|
||
unregister(unregisterToken) {
|
||
const timeout = this.timeouts.get(unregisterToken.cleanupToken);
|
||
if (timeout) {
|
||
this.timeouts.delete(unregisterToken.cleanupToken);
|
||
clearTimeout(timeout);
|
||
}
|
||
}
|
||
reset() {
|
||
if (this.timeouts) {
|
||
this.timeouts.forEach((value, key) => {
|
||
this.unregister({
|
||
cleanupToken: key
|
||
});
|
||
});
|
||
this.timeouts = void 0;
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js
|
||
var FinalizationRegistryBasedCleanupTracking = class {
|
||
constructor() {
|
||
this.registry = new FinalizationRegistry((unsubscribe) => {
|
||
if (typeof unsubscribe === "function") {
|
||
unsubscribe();
|
||
}
|
||
});
|
||
}
|
||
register(object, unsubscribe, unregisterToken) {
|
||
this.registry.register(object, unsubscribe, unregisterToken);
|
||
}
|
||
unregister(unregisterToken) {
|
||
this.registry.unregister(unregisterToken);
|
||
}
|
||
// eslint-disable-next-line class-methods-use-this
|
||
reset() {
|
||
}
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridApiEventHandler.js
|
||
var GridSignature = function(GridSignature2) {
|
||
GridSignature2["DataGrid"] = "DataGrid";
|
||
GridSignature2["DataGridPro"] = "DataGridPro";
|
||
return GridSignature2;
|
||
}(GridSignature || {});
|
||
var ObjectToBeRetainedByReact = class {
|
||
};
|
||
function createUseGridApiEventHandler(registryContainer2) {
|
||
let cleanupTokensCounter = 0;
|
||
return function useGridApiEventHandler2(apiRef, eventName, handler, options) {
|
||
if (registryContainer2.registry === null) {
|
||
registryContainer2.registry = typeof FinalizationRegistry !== "undefined" ? new FinalizationRegistryBasedCleanupTracking() : new TimerBasedCleanupTracking();
|
||
}
|
||
const [objectRetainedByReact] = React39.useState(new ObjectToBeRetainedByReact());
|
||
const subscription = React39.useRef(null);
|
||
const handlerRef = React39.useRef();
|
||
handlerRef.current = handler;
|
||
const cleanupTokenRef = React39.useRef(null);
|
||
if (!subscription.current && handlerRef.current) {
|
||
const enhancedHandler = (params, event, details) => {
|
||
if (!event.defaultMuiPrevented) {
|
||
var _handlerRef$current;
|
||
(_handlerRef$current = handlerRef.current) == null || _handlerRef$current.call(handlerRef, params, event, details);
|
||
}
|
||
};
|
||
subscription.current = apiRef.current.subscribeEvent(eventName, enhancedHandler, options);
|
||
cleanupTokensCounter += 1;
|
||
cleanupTokenRef.current = {
|
||
cleanupToken: cleanupTokensCounter
|
||
};
|
||
registryContainer2.registry.register(
|
||
objectRetainedByReact,
|
||
// The callback below will be called once this reference stops being retained
|
||
() => {
|
||
var _subscription$current;
|
||
(_subscription$current = subscription.current) == null || _subscription$current.call(subscription);
|
||
subscription.current = null;
|
||
cleanupTokenRef.current = null;
|
||
},
|
||
cleanupTokenRef.current
|
||
);
|
||
} else if (!handlerRef.current && subscription.current) {
|
||
subscription.current();
|
||
subscription.current = null;
|
||
if (cleanupTokenRef.current) {
|
||
registryContainer2.registry.unregister(cleanupTokenRef.current);
|
||
cleanupTokenRef.current = null;
|
||
}
|
||
}
|
||
React39.useEffect(() => {
|
||
if (!subscription.current && handlerRef.current) {
|
||
const enhancedHandler = (params, event, details) => {
|
||
if (!event.defaultMuiPrevented) {
|
||
var _handlerRef$current2;
|
||
(_handlerRef$current2 = handlerRef.current) == null || _handlerRef$current2.call(handlerRef, params, event, details);
|
||
}
|
||
};
|
||
subscription.current = apiRef.current.subscribeEvent(eventName, enhancedHandler, options);
|
||
}
|
||
if (cleanupTokenRef.current && registryContainer2.registry) {
|
||
registryContainer2.registry.unregister(cleanupTokenRef.current);
|
||
cleanupTokenRef.current = null;
|
||
}
|
||
return () => {
|
||
var _subscription$current2;
|
||
(_subscription$current2 = subscription.current) == null || _subscription$current2.call(subscription);
|
||
subscription.current = null;
|
||
};
|
||
}, [apiRef, eventName, options]);
|
||
};
|
||
}
|
||
var registryContainer = {
|
||
registry: null
|
||
};
|
||
var unstable_resetCleanupTracking = () => {
|
||
var _registryContainer$re;
|
||
(_registryContainer$re = registryContainer.registry) == null || _registryContainer$re.reset();
|
||
registryContainer.registry = null;
|
||
};
|
||
var useGridApiEventHandler = createUseGridApiEventHandler(registryContainer);
|
||
var optionsSubscriberOptions = {
|
||
isFirst: true
|
||
};
|
||
function useGridApiOptionHandler(apiRef, eventName, handler) {
|
||
useGridApiEventHandler(apiRef, eventName, handler, optionsSubscriberOptions);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridLogger.js
|
||
var React40 = __toESM(require_react());
|
||
function useGridLogger(privateApiRef, name) {
|
||
const logger = React40.useRef(null);
|
||
if (logger.current) {
|
||
return logger.current;
|
||
}
|
||
const newLogger = privateApiRef.current.getLogger(name);
|
||
logger.current = newLogger;
|
||
return newLogger;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridNativeEventListener.js
|
||
var React41 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/utils/utils.js
|
||
function isNumber(value) {
|
||
return typeof value === "number" && !Number.isNaN(value);
|
||
}
|
||
function isFunction(value) {
|
||
return typeof value === "function";
|
||
}
|
||
function isObject(value) {
|
||
return typeof value === "object" && value !== null;
|
||
}
|
||
function localStorageAvailable() {
|
||
try {
|
||
const key = "__some_random_key_you_are_not_going_to_use__";
|
||
window.localStorage.setItem(key, key);
|
||
window.localStorage.removeItem(key);
|
||
return true;
|
||
} catch (err) {
|
||
return false;
|
||
}
|
||
}
|
||
function escapeRegExp(value) {
|
||
return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
||
}
|
||
var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
||
function isDeepEqual(a, b) {
|
||
if (a === b) {
|
||
return true;
|
||
}
|
||
if (a && b && typeof a === "object" && typeof b === "object") {
|
||
if (a.constructor !== b.constructor) {
|
||
return false;
|
||
}
|
||
if (Array.isArray(a)) {
|
||
const length2 = a.length;
|
||
if (length2 !== b.length) {
|
||
return false;
|
||
}
|
||
for (let i = 0; i < length2; i += 1) {
|
||
if (!isDeepEqual(a[i], b[i])) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
if (a instanceof Map && b instanceof Map) {
|
||
if (a.size !== b.size) {
|
||
return false;
|
||
}
|
||
const entriesA = Array.from(a.entries());
|
||
for (let i = 0; i < entriesA.length; i += 1) {
|
||
if (!b.has(entriesA[i][0])) {
|
||
return false;
|
||
}
|
||
}
|
||
for (let i = 0; i < entriesA.length; i += 1) {
|
||
const entryA = entriesA[i];
|
||
if (!isDeepEqual(entryA[1], b.get(entryA[0]))) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
if (a instanceof Set && b instanceof Set) {
|
||
if (a.size !== b.size) {
|
||
return false;
|
||
}
|
||
const entries = Array.from(a.entries());
|
||
for (let i = 0; i < entries.length; i += 1) {
|
||
if (!b.has(entries[i][0])) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
||
const length2 = a.length;
|
||
if (length2 !== b.length) {
|
||
return false;
|
||
}
|
||
for (let i = 0; i < length2; i += 1) {
|
||
if (a[i] !== b[i]) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
if (a.constructor === RegExp) {
|
||
return a.source === b.source && a.flags === b.flags;
|
||
}
|
||
if (a.valueOf !== Object.prototype.valueOf) {
|
||
return a.valueOf() === b.valueOf();
|
||
}
|
||
if (a.toString !== Object.prototype.toString) {
|
||
return a.toString() === b.toString();
|
||
}
|
||
const keys = Object.keys(a);
|
||
const length = keys.length;
|
||
if (length !== Object.keys(b).length) {
|
||
return false;
|
||
}
|
||
for (let i = 0; i < length; i += 1) {
|
||
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {
|
||
return false;
|
||
}
|
||
}
|
||
for (let i = 0; i < length; i += 1) {
|
||
const key = keys[i];
|
||
if (!isDeepEqual(a[key], b[key])) {
|
||
return false;
|
||
}
|
||
}
|
||
return true;
|
||
}
|
||
return a !== a && b !== b;
|
||
}
|
||
function mulberry32(a) {
|
||
return () => {
|
||
let t = a += 1831565813;
|
||
t = Math.imul(t ^ t >>> 15, t | 1);
|
||
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
||
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
||
};
|
||
}
|
||
function randomNumberBetween(seed, min, max) {
|
||
const random = mulberry32(seed);
|
||
return () => min + (max - min) * random();
|
||
}
|
||
function deepClone(obj) {
|
||
if (typeof structuredClone === "function") {
|
||
return structuredClone(obj);
|
||
}
|
||
return JSON.parse(JSON.stringify(obj));
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridNativeEventListener.js
|
||
var useGridNativeEventListener = (apiRef, ref, eventName, handler, options) => {
|
||
const logger = useGridLogger(apiRef, "useNativeEventListener");
|
||
const [added, setAdded] = React41.useState(false);
|
||
const handlerRef = React41.useRef(handler);
|
||
const wrapHandler = React41.useCallback((event) => {
|
||
return handlerRef.current && handlerRef.current(event);
|
||
}, []);
|
||
React41.useEffect(() => {
|
||
handlerRef.current = handler;
|
||
}, [handler]);
|
||
React41.useEffect(() => {
|
||
let targetElement;
|
||
if (isFunction(ref)) {
|
||
targetElement = ref();
|
||
} else {
|
||
targetElement = ref && ref.current ? ref.current : null;
|
||
}
|
||
if (targetElement && eventName && !added) {
|
||
logger.debug(`Binding native ${eventName} event`);
|
||
targetElement.addEventListener(eventName, wrapHandler, options);
|
||
const boundElem = targetElement;
|
||
setAdded(true);
|
||
const unsubscribe = () => {
|
||
logger.debug(`Clearing native ${eventName} event`);
|
||
boundElem.removeEventListener(eventName, wrapHandler, options);
|
||
};
|
||
apiRef.current.subscribeEvent("unmount", unsubscribe);
|
||
}
|
||
}, [ref, wrapHandler, eventName, added, logger, options, apiRef]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useFirstRender.js
|
||
var React42 = __toESM(require_react());
|
||
var useFirstRender = (callback) => {
|
||
const isFirstRender = React42.useRef(true);
|
||
if (isFirstRender.current) {
|
||
isFirstRender.current = false;
|
||
callback();
|
||
}
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/pagination/gridPaginationUtils.js
|
||
var MAX_PAGE_SIZE = 100;
|
||
var defaultPageSize = (autoPageSize) => autoPageSize ? 0 : 100;
|
||
var getPageCount = (rowCount, pageSize) => {
|
||
if (pageSize > 0 && rowCount > 0) {
|
||
return Math.ceil(rowCount / pageSize);
|
||
}
|
||
return 0;
|
||
};
|
||
var noRowCountInServerMode = buildWarning(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'", "For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"], "error");
|
||
var getDefaultGridPaginationModel = (autoPageSize) => ({
|
||
page: 0,
|
||
pageSize: autoPageSize ? 0 : 100
|
||
});
|
||
var getValidPage = (page, pageCount = 0) => {
|
||
if (pageCount === 0) {
|
||
return page;
|
||
}
|
||
return Math.max(Math.min(page, pageCount - 1), 0);
|
||
};
|
||
var throwIfPageSizeExceedsTheLimit = (pageSize, signatureProp) => {
|
||
if (signatureProp === GridSignature.DataGrid && pageSize > MAX_PAGE_SIZE) {
|
||
throw new Error(["MUI: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.", "You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));
|
||
}
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/pagination/gridPaginationSelector.js
|
||
var gridPaginationSelector = (state) => state.pagination;
|
||
var gridPaginationModelSelector = createSelector2(gridPaginationSelector, (pagination) => pagination.paginationModel);
|
||
var gridPaginationRowCountSelector = createSelector2(gridPaginationSelector, (pagination) => pagination.rowCount);
|
||
var gridPageSelector = createSelector2(gridPaginationModelSelector, (paginationModel) => paginationModel.page);
|
||
var gridPageSizeSelector = createSelector2(gridPaginationModelSelector, (paginationModel) => paginationModel.pageSize);
|
||
var gridPageCountSelector = createSelector2(gridPageSizeSelector, gridPaginationRowCountSelector, (pageSize, rowCount) => getPageCount(rowCount, pageSize));
|
||
var gridPaginationRowRangeSelector = createSelectorMemoized(gridPaginationModelSelector, gridRowTreeSelector, gridRowMaximumTreeDepthSelector, gridExpandedSortedRowEntriesSelector, gridFilteredSortedTopLevelRowEntriesSelector, (paginationModel, rowTree, rowTreeDepth, visibleSortedRowEntries, visibleSortedTopLevelRowEntries) => {
|
||
const visibleTopLevelRowCount = visibleSortedTopLevelRowEntries.length;
|
||
const topLevelFirstRowIndex = Math.min(paginationModel.pageSize * paginationModel.page, visibleTopLevelRowCount - 1);
|
||
const topLevelLastRowIndex = Math.min(topLevelFirstRowIndex + paginationModel.pageSize - 1, visibleTopLevelRowCount - 1);
|
||
if (topLevelFirstRowIndex === -1 || topLevelLastRowIndex === -1) {
|
||
return null;
|
||
}
|
||
if (rowTreeDepth < 2) {
|
||
return {
|
||
firstRowIndex: topLevelFirstRowIndex,
|
||
lastRowIndex: topLevelLastRowIndex
|
||
};
|
||
}
|
||
const topLevelFirstRow = visibleSortedTopLevelRowEntries[topLevelFirstRowIndex];
|
||
const topLevelRowsInCurrentPageCount = topLevelLastRowIndex - topLevelFirstRowIndex + 1;
|
||
const firstRowIndex = visibleSortedRowEntries.findIndex((row) => row.id === topLevelFirstRow.id);
|
||
let lastRowIndex = firstRowIndex;
|
||
let topLevelRowAdded = 0;
|
||
while (lastRowIndex < visibleSortedRowEntries.length && topLevelRowAdded <= topLevelRowsInCurrentPageCount) {
|
||
var _rowTree$row$id;
|
||
const row = visibleSortedRowEntries[lastRowIndex];
|
||
const depth = (_rowTree$row$id = rowTree[row.id]) == null ? void 0 : _rowTree$row$id.depth;
|
||
if (depth === void 0) {
|
||
lastRowIndex += 1;
|
||
} else {
|
||
if (topLevelRowAdded < topLevelRowsInCurrentPageCount || depth > 0) {
|
||
lastRowIndex += 1;
|
||
}
|
||
if (depth === 0) {
|
||
topLevelRowAdded += 1;
|
||
}
|
||
}
|
||
}
|
||
return {
|
||
firstRowIndex,
|
||
lastRowIndex: lastRowIndex - 1
|
||
};
|
||
});
|
||
var gridPaginatedVisibleSortedGridRowEntriesSelector = createSelectorMemoized(gridExpandedSortedRowEntriesSelector, gridPaginationRowRangeSelector, (visibleSortedRowEntries, paginationRange) => {
|
||
if (!paginationRange) {
|
||
return [];
|
||
}
|
||
return visibleSortedRowEntries.slice(paginationRange.firstRowIndex, paginationRange.lastRowIndex + 1);
|
||
});
|
||
var gridPaginatedVisibleSortedGridRowIdsSelector = createSelectorMemoized(gridExpandedSortedRowIdsSelector, gridPaginationRowRangeSelector, (visibleSortedRowIds, paginationRange) => {
|
||
if (!paginationRange) {
|
||
return [];
|
||
}
|
||
return visibleSortedRowIds.slice(paginationRange.firstRowIndex, paginationRange.lastRowIndex + 1);
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/preferencesPanel/gridPreferencePanelSelector.js
|
||
var gridPreferencePanelStateSelector = (state) => state.preferencePanel;
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/preferencesPanel/gridPreferencePanelsValue.js
|
||
var GridPreferencePanelsValue = function(GridPreferencePanelsValue2) {
|
||
GridPreferencePanelsValue2["filters"] = "filters";
|
||
GridPreferencePanelsValue2["columns"] = "columns";
|
||
return GridPreferencePanelsValue2;
|
||
}(GridPreferencePanelsValue || {});
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rows/gridRowsMetaSelector.js
|
||
var gridRowsMetaSelector = (state) => state.rowsMeta;
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rowSelection/gridRowSelectionSelector.js
|
||
var gridRowSelectionStateSelector = (state) => state.rowSelection;
|
||
var selectedGridRowsCountSelector = createSelector2(gridRowSelectionStateSelector, (selection) => selection.length);
|
||
var selectedGridRowsSelector = createSelectorMemoized(gridRowSelectionStateSelector, gridRowsLookupSelector, (selectedRows, rowsLookup) => new Map(selectedRows.map((id) => [id, rowsLookup[id]])));
|
||
var selectedIdsLookupSelector = createSelectorMemoized(gridRowSelectionStateSelector, (selection) => selection.reduce((lookup, rowId) => {
|
||
lookup[rowId] = rowId;
|
||
return lookup;
|
||
}, {}));
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/sorting/gridSortingUtils.js
|
||
init_extends();
|
||
var sortModelDisableMultiColumnsSortingWarning = buildWarning(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.", "If you are using the community version of the `DataGrid`, this prop is always `true`."], "error");
|
||
var sanitizeSortModel = (model, disableMultipleColumnsSorting) => {
|
||
if (disableMultipleColumnsSorting && model.length > 1) {
|
||
sortModelDisableMultiColumnsSortingWarning();
|
||
return [model[0]];
|
||
}
|
||
return model;
|
||
};
|
||
var mergeStateWithSortModel = (sortModel, disableMultipleColumnsSorting) => (state) => _extends({}, state, {
|
||
sorting: _extends({}, state.sorting, {
|
||
sortModel: sanitizeSortModel(sortModel, disableMultipleColumnsSorting)
|
||
})
|
||
});
|
||
var isDesc = (direction) => direction === "desc";
|
||
var parseSortItem = (sortItem, apiRef) => {
|
||
const column = apiRef.current.getColumn(sortItem.field);
|
||
if (!column) {
|
||
return null;
|
||
}
|
||
const comparator = isDesc(sortItem.sort) ? (...args) => -1 * column.sortComparator(...args) : column.sortComparator;
|
||
const getSortCellParams = (id) => ({
|
||
id,
|
||
field: column.field,
|
||
rowNode: apiRef.current.getRowNode(id),
|
||
value: apiRef.current.getCellValue(id, column.field),
|
||
api: apiRef.current
|
||
});
|
||
return {
|
||
getSortCellParams,
|
||
comparator
|
||
};
|
||
};
|
||
var compareRows = (parsedSortItems, row1, row2) => {
|
||
return parsedSortItems.reduce((res, item, index) => {
|
||
if (res !== 0) {
|
||
return res;
|
||
}
|
||
const sortCellParams1 = row1.params[index];
|
||
const sortCellParams2 = row2.params[index];
|
||
res = item.comparator(sortCellParams1.value, sortCellParams2.value, sortCellParams1, sortCellParams2);
|
||
return res;
|
||
}, 0);
|
||
};
|
||
var buildAggregatedSortingApplier = (sortModel, apiRef) => {
|
||
const comparatorList = sortModel.map((item) => parseSortItem(item, apiRef)).filter((comparator) => !!comparator);
|
||
if (comparatorList.length === 0) {
|
||
return null;
|
||
}
|
||
return (rowList) => rowList.map((node) => ({
|
||
node,
|
||
params: comparatorList.map((el) => el.getSortCellParams(node.id))
|
||
})).sort((a, b) => compareRows(comparatorList, a, b)).map((row) => row.node.id);
|
||
};
|
||
var getNextGridSortDirection = (sortingOrder, current) => {
|
||
const currentIdx = sortingOrder.indexOf(current);
|
||
if (!current || currentIdx === -1 || currentIdx + 1 === sortingOrder.length) {
|
||
return sortingOrder[0];
|
||
}
|
||
return sortingOrder[currentIdx + 1];
|
||
};
|
||
var gridNillComparator = (v1, v2) => {
|
||
if (v1 == null && v2 != null) {
|
||
return -1;
|
||
}
|
||
if (v2 == null && v1 != null) {
|
||
return 1;
|
||
}
|
||
if (v1 == null && v2 == null) {
|
||
return 0;
|
||
}
|
||
return null;
|
||
};
|
||
var collator = new Intl.Collator();
|
||
var gridStringOrNumberComparator = (value1, value2) => {
|
||
const nillResult = gridNillComparator(value1, value2);
|
||
if (nillResult !== null) {
|
||
return nillResult;
|
||
}
|
||
if (typeof value1 === "string") {
|
||
return collator.compare(value1.toString(), value2.toString());
|
||
}
|
||
return value1 - value2;
|
||
};
|
||
var gridNumberComparator = (value1, value2) => {
|
||
const nillResult = gridNillComparator(value1, value2);
|
||
if (nillResult !== null) {
|
||
return nillResult;
|
||
}
|
||
return Number(value1) - Number(value2);
|
||
};
|
||
var gridDateComparator = (value1, value2) => {
|
||
const nillResult = gridNillComparator(value1, value2);
|
||
if (nillResult !== null) {
|
||
return nillResult;
|
||
}
|
||
if (value1 > value2) {
|
||
return 1;
|
||
}
|
||
if (value1 < value2) {
|
||
return -1;
|
||
}
|
||
return 0;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js
|
||
var unstable_gridHeaderFilteringStateSelector = (state) => state.headerFiltering;
|
||
var unstable_gridHeaderFilteringEditFieldSelector = createSelector2(unstable_gridHeaderFilteringStateSelector, (headerFilteringState) => headerFilteringState.editing);
|
||
var unstable_gridHeaderFilteringMenuSelector = createSelector2(unstable_gridHeaderFilteringStateSelector, (headerFilteringState) => headerFilteringState.menuOpen);
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/virtualization/useGridVirtualization.js
|
||
init_extends();
|
||
var React43 = __toESM(require_react());
|
||
var virtualizationStateInitializer = (state, props) => {
|
||
const virtualization = {
|
||
enabled: !props.disableVirtualization,
|
||
enabledForColumns: true
|
||
};
|
||
return _extends({}, state, {
|
||
virtualization
|
||
});
|
||
};
|
||
function useGridVirtualization(apiRef, props) {
|
||
const setVirtualization = (enabled) => {
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
virtualization: _extends({}, state.virtualization, {
|
||
enabled
|
||
})
|
||
}));
|
||
};
|
||
const setColumnVirtualization = (enabled) => {
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
virtualization: _extends({}, state.virtualization, {
|
||
enabledForColumns: enabled
|
||
})
|
||
}));
|
||
};
|
||
const api = {
|
||
unstable_setVirtualization: setVirtualization,
|
||
unstable_setColumnVirtualization: setColumnVirtualization
|
||
};
|
||
useGridApiMethod(apiRef, api, "public");
|
||
React43.useEffect(() => {
|
||
setVirtualization(!props.disableVirtualization);
|
||
}, [props.disableVirtualization]);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/virtualization/gridVirtualizationSelectors.js
|
||
var gridVirtualizationSelector = (state) => state.virtualization;
|
||
var gridVirtualizationEnabledSelector = createSelector2(gridVirtualizationSelector, (state) => state.enabled);
|
||
var gridVirtualizationColumnEnabledSelector = createSelector2(gridVirtualizationSelector, (state) => state.enabledForColumns);
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeaderFilterIconButton.js
|
||
var import_jsx_runtime33 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime34 = __toESM(require_jsx_runtime());
|
||
var useUtilityClasses20 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
icon: ["filterIcon"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function GridColumnHeaderFilterIconButton(props) {
|
||
var _rootProps$slotProps, _rootProps$slotProps2;
|
||
const {
|
||
counter,
|
||
field,
|
||
onClick
|
||
} = props;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = _extends({}, props, {
|
||
classes: rootProps.classes
|
||
});
|
||
const classes = useUtilityClasses20(ownerState);
|
||
const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
||
const labelId = useId();
|
||
const panelId = useId();
|
||
const toggleFilter = React44.useCallback((event) => {
|
||
event.preventDefault();
|
||
event.stopPropagation();
|
||
const {
|
||
open: open2,
|
||
openedPanelValue
|
||
} = gridPreferencePanelStateSelector(apiRef.current.state);
|
||
if (open2 && openedPanelValue === GridPreferencePanelsValue.filters) {
|
||
apiRef.current.hideFilterPanel();
|
||
} else {
|
||
apiRef.current.showFilterPanel(void 0, panelId, labelId);
|
||
}
|
||
if (onClick) {
|
||
onClick(apiRef.current.getColumnHeaderParams(field), event);
|
||
}
|
||
}, [apiRef, field, onClick, panelId, labelId]);
|
||
if (!counter) {
|
||
return null;
|
||
}
|
||
const open = preferencePanel.open && preferencePanel.labelId === labelId;
|
||
const iconButton = (0, import_jsx_runtime33.jsx)(rootProps.slots.baseIconButton, _extends({
|
||
id: labelId,
|
||
onClick: toggleFilter,
|
||
color: "default",
|
||
"aria-label": apiRef.current.getLocaleText("columnHeaderFiltersLabel"),
|
||
size: "small",
|
||
tabIndex: -1,
|
||
"aria-haspopup": "menu",
|
||
"aria-expanded": open,
|
||
"aria-controls": open ? panelId : void 0
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
|
||
children: (0, import_jsx_runtime33.jsx)(rootProps.slots.columnFilteredIcon, {
|
||
className: classes.icon,
|
||
fontSize: "small"
|
||
})
|
||
}));
|
||
return (0, import_jsx_runtime33.jsx)(rootProps.slots.baseTooltip, _extends({
|
||
title: apiRef.current.getLocaleText("columnHeaderFiltersTooltipActive")(counter),
|
||
enterDelay: 1e3
|
||
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseTooltip, {
|
||
children: (0, import_jsx_runtime34.jsxs)(GridIconButtonContainer, {
|
||
children: [counter > 1 && (0, import_jsx_runtime33.jsx)(Badge_default, {
|
||
badgeContent: counter,
|
||
color: "default",
|
||
children: iconButton
|
||
}), counter === 1 && iconButton]
|
||
})
|
||
}));
|
||
}
|
||
true ? GridColumnHeaderFilterIconButton.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
counter: import_prop_types22.default.number,
|
||
field: import_prop_types22.default.string.isRequired,
|
||
onClick: import_prop_types22.default.func
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnSelection/GridCellCheckboxRenderer.js
|
||
init_extends();
|
||
var React45 = __toESM(require_react());
|
||
var import_prop_types23 = __toESM(require_prop_types());
|
||
var import_jsx_runtime35 = __toESM(require_jsx_runtime());
|
||
var _excluded24 = ["field", "id", "value", "formattedValue", "row", "rowNode", "colDef", "isEditable", "cellMode", "hasFocus", "tabIndex", "api"];
|
||
var useUtilityClasses21 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["checkboxInput"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridCellCheckboxForwardRef = React45.forwardRef(function GridCellCheckboxRenderer(props, ref) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
field,
|
||
id,
|
||
value: isChecked,
|
||
rowNode,
|
||
hasFocus,
|
||
tabIndex
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded24);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = {
|
||
classes: rootProps.classes
|
||
};
|
||
const classes = useUtilityClasses21(ownerState);
|
||
const checkboxElement = React45.useRef(null);
|
||
const rippleRef = React45.useRef(null);
|
||
const handleRef = useForkRef(checkboxElement, ref);
|
||
const element = apiRef.current.getCellElement(id, field);
|
||
const handleChange = (event) => {
|
||
const params = {
|
||
value: event.target.checked,
|
||
id
|
||
};
|
||
apiRef.current.publishEvent("rowSelectionCheckboxChange", params, event);
|
||
};
|
||
React45.useLayoutEffect(() => {
|
||
if (tabIndex === 0 && element) {
|
||
element.tabIndex = -1;
|
||
}
|
||
}, [element, tabIndex]);
|
||
React45.useEffect(() => {
|
||
if (hasFocus) {
|
||
var _checkboxElement$curr;
|
||
const input = (_checkboxElement$curr = checkboxElement.current) == null ? void 0 : _checkboxElement$curr.querySelector("input");
|
||
input == null || input.focus({
|
||
preventScroll: true
|
||
});
|
||
} else if (rippleRef.current) {
|
||
rippleRef.current.stop({});
|
||
}
|
||
}, [hasFocus]);
|
||
const handleKeyDown = React45.useCallback((event) => {
|
||
if (isSpaceKey(event.key)) {
|
||
event.stopPropagation();
|
||
}
|
||
}, []);
|
||
if (rowNode.type === "footer" || rowNode.type === "pinnedRow") {
|
||
return null;
|
||
}
|
||
const isSelectable = apiRef.current.isRowSelectable(id);
|
||
const label = apiRef.current.getLocaleText(isChecked ? "checkboxSelectionUnselectRow" : "checkboxSelectionSelectRow");
|
||
return (0, import_jsx_runtime35.jsx)(rootProps.slots.baseCheckbox, _extends({
|
||
ref: handleRef,
|
||
tabIndex,
|
||
checked: isChecked,
|
||
onChange: handleChange,
|
||
className: classes.root,
|
||
inputProps: {
|
||
"aria-label": label
|
||
},
|
||
onKeyDown: handleKeyDown,
|
||
disabled: !isSelectable,
|
||
touchRippleRef: rippleRef
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseCheckbox, other));
|
||
});
|
||
true ? GridCellCheckboxForwardRef.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* GridApi that let you manipulate the grid.
|
||
*/
|
||
api: import_prop_types23.default.object.isRequired,
|
||
/**
|
||
* The mode of the cell.
|
||
*/
|
||
cellMode: import_prop_types23.default.oneOf(["edit", "view"]).isRequired,
|
||
/**
|
||
* The column of the row that the current cell belongs to.
|
||
*/
|
||
colDef: import_prop_types23.default.object.isRequired,
|
||
/**
|
||
* The column field of the cell that triggered the event.
|
||
*/
|
||
field: import_prop_types23.default.string.isRequired,
|
||
/**
|
||
* A ref allowing to set imperative focus.
|
||
* It can be passed to the element that should receive focus.
|
||
* @ignore - do not document.
|
||
*/
|
||
focusElementRef: import_prop_types23.default.oneOfType([import_prop_types23.default.func, import_prop_types23.default.shape({
|
||
current: import_prop_types23.default.shape({
|
||
focus: import_prop_types23.default.func.isRequired
|
||
})
|
||
})]),
|
||
/**
|
||
* The cell value formatted with the column valueFormatter.
|
||
*/
|
||
formattedValue: import_prop_types23.default.any,
|
||
/**
|
||
* If true, the cell is the active element.
|
||
*/
|
||
hasFocus: import_prop_types23.default.bool.isRequired,
|
||
/**
|
||
* The grid row id.
|
||
*/
|
||
id: import_prop_types23.default.oneOfType([import_prop_types23.default.number, import_prop_types23.default.string]).isRequired,
|
||
/**
|
||
* If true, the cell is editable.
|
||
*/
|
||
isEditable: import_prop_types23.default.bool,
|
||
/**
|
||
* The row model of the row that the current cell belongs to.
|
||
*/
|
||
row: import_prop_types23.default.any.isRequired,
|
||
/**
|
||
* The node of the row that the current cell belongs to.
|
||
*/
|
||
rowNode: import_prop_types23.default.object.isRequired,
|
||
/**
|
||
* the tabIndex value.
|
||
*/
|
||
tabIndex: import_prop_types23.default.oneOf([-1, 0]).isRequired,
|
||
/**
|
||
* The cell value.
|
||
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
||
*/
|
||
value: import_prop_types23.default.any
|
||
} : void 0;
|
||
var GridCellCheckboxRenderer2 = GridCellCheckboxForwardRef;
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnSelection/GridHeaderCheckbox.js
|
||
init_extends();
|
||
var React46 = __toESM(require_react());
|
||
var import_prop_types24 = __toESM(require_prop_types());
|
||
var import_jsx_runtime36 = __toESM(require_jsx_runtime());
|
||
var _excluded25 = ["field", "colDef"];
|
||
var useUtilityClasses22 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["checkboxInput"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridHeaderCheckbox = React46.forwardRef(function GridHeaderCheckbox2(props, ref) {
|
||
var _rootProps$slotProps;
|
||
const other = _objectWithoutPropertiesLoose(props, _excluded25);
|
||
const [, forceUpdate] = React46.useState(false);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = {
|
||
classes: rootProps.classes
|
||
};
|
||
const classes = useUtilityClasses22(ownerState);
|
||
const tabIndexState = useGridSelector(apiRef, gridTabIndexColumnHeaderSelector);
|
||
const selection = useGridSelector(apiRef, gridRowSelectionStateSelector);
|
||
const visibleRowIds = useGridSelector(apiRef, gridExpandedSortedRowIdsSelector);
|
||
const paginatedVisibleRowIds = useGridSelector(apiRef, gridPaginatedVisibleSortedGridRowIdsSelector);
|
||
const filteredSelection = React46.useMemo(() => {
|
||
if (typeof rootProps.isRowSelectable !== "function") {
|
||
return selection;
|
||
}
|
||
return selection.filter((id) => {
|
||
if (!apiRef.current.getRow(id)) {
|
||
return false;
|
||
}
|
||
return rootProps.isRowSelectable(apiRef.current.getRowParams(id));
|
||
});
|
||
}, [apiRef, rootProps.isRowSelectable, selection]);
|
||
const selectionCandidates = React46.useMemo(() => {
|
||
const rowIds = !rootProps.pagination || !rootProps.checkboxSelectionVisibleOnly ? visibleRowIds : paginatedVisibleRowIds;
|
||
return rowIds.reduce((acc, id) => {
|
||
acc[id] = true;
|
||
return acc;
|
||
}, {});
|
||
}, [rootProps.pagination, rootProps.checkboxSelectionVisibleOnly, paginatedVisibleRowIds, visibleRowIds]);
|
||
const currentSelectionSize = React46.useMemo(() => filteredSelection.filter((id) => selectionCandidates[id]).length, [filteredSelection, selectionCandidates]);
|
||
const isIndeterminate = currentSelectionSize > 0 && currentSelectionSize < Object.keys(selectionCandidates).length;
|
||
const isChecked = currentSelectionSize > 0;
|
||
const handleChange = (event) => {
|
||
const params = {
|
||
value: event.target.checked
|
||
};
|
||
apiRef.current.publishEvent("headerSelectionCheckboxChange", params);
|
||
};
|
||
const tabIndex = tabIndexState !== null && tabIndexState.field === props.field ? 0 : -1;
|
||
React46.useLayoutEffect(() => {
|
||
const element = apiRef.current.getColumnHeaderElement(props.field);
|
||
if (tabIndex === 0 && element) {
|
||
element.tabIndex = -1;
|
||
}
|
||
}, [tabIndex, apiRef, props.field]);
|
||
const handleKeyDown = React46.useCallback((event) => {
|
||
if (event.key === " ") {
|
||
apiRef.current.publishEvent("headerSelectionCheckboxChange", {
|
||
value: !isChecked
|
||
});
|
||
}
|
||
}, [apiRef, isChecked]);
|
||
const handleSelectionChange = React46.useCallback(() => {
|
||
forceUpdate((p) => !p);
|
||
}, []);
|
||
React46.useEffect(() => {
|
||
return apiRef.current.subscribeEvent("rowSelectionChange", handleSelectionChange);
|
||
}, [apiRef, handleSelectionChange]);
|
||
const label = apiRef.current.getLocaleText(isChecked ? "checkboxSelectionUnselectAllRows" : "checkboxSelectionSelectAllRows");
|
||
return (0, import_jsx_runtime36.jsx)(rootProps.slots.baseCheckbox, _extends({
|
||
ref,
|
||
indeterminate: isIndeterminate,
|
||
checked: isChecked,
|
||
onChange: handleChange,
|
||
className: classes.root,
|
||
inputProps: {
|
||
"aria-label": label
|
||
},
|
||
tabIndex,
|
||
onKeyDown: handleKeyDown
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseCheckbox, other));
|
||
});
|
||
true ? GridHeaderCheckbox.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* The column of the current header component.
|
||
*/
|
||
colDef: import_prop_types24.default.object.isRequired,
|
||
/**
|
||
* The column field of the column that triggered the event
|
||
*/
|
||
field: import_prop_types24.default.string.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/material/icons/index.js
|
||
var React47 = __toESM(require_react());
|
||
var import_jsx_runtime37 = __toESM(require_jsx_runtime());
|
||
var GridArrowUpwardIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"
|
||
}), "ArrowUpward");
|
||
var GridArrowDownwardIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"
|
||
}), "ArrowDownward");
|
||
var GridKeyboardArrowRight = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
|
||
}), "KeyboardArrowRight");
|
||
var GridExpandMoreIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
||
}), "ExpandMore");
|
||
var GridFilterListIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"
|
||
}), "FilterList");
|
||
var GridFilterAltIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"
|
||
}), "FilterAlt");
|
||
var GridSearchIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
||
}), "Search");
|
||
var GridMenuIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"
|
||
}), "Menu");
|
||
var GridCheckCircleIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
||
}), "CheckCircle");
|
||
var GridColumnIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"
|
||
}), "ColumnIcon");
|
||
var GridSeparatorIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M11 19V5h2v14z"
|
||
}), "Separator");
|
||
var GridViewHeadlineIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"
|
||
}), "ViewHeadline");
|
||
var GridTableRowsIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"
|
||
}), "TableRows");
|
||
var GridViewStreamIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M4 18h17v-6H4v6zM4 5v6h17V5H4z"
|
||
}), "ViewStream");
|
||
var GridTripleDotsVerticalIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
|
||
}), "TripleDotsVertical");
|
||
var GridCloseIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
||
}), "Close");
|
||
var GridAddIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"
|
||
}), "Add");
|
||
var GridRemoveIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M19 13H5v-2h14v2z"
|
||
}), "Remove");
|
||
var GridLoadIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"
|
||
}), "Load");
|
||
var GridDragIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
|
||
}), "Drag");
|
||
var GridSaveAltIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"
|
||
}), "SaveAlt");
|
||
var GridCheckIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
||
}), "Check");
|
||
var GridMoreVertIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
|
||
}), "MoreVert");
|
||
var GridVisibilityOffIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"
|
||
}), "VisibilityOff");
|
||
var GridViewColumnIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("g", {
|
||
children: (0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"
|
||
})
|
||
}), "ViewColumn");
|
||
var GridClearIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
||
}), "Clear");
|
||
var GridDeleteIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"
|
||
}), "Delete");
|
||
var GridDeleteForeverIcon = createSvgIcon((0, import_jsx_runtime37.jsx)("path", {
|
||
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"
|
||
}), "Delete");
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/GridColumnMenuContainer.js
|
||
init_extends();
|
||
var import_prop_types25 = __toESM(require_prop_types());
|
||
var React48 = __toESM(require_react());
|
||
var import_jsx_runtime38 = __toESM(require_jsx_runtime());
|
||
var _excluded26 = ["hideMenu", "colDef", "id", "labelledby", "className", "children", "open"];
|
||
var StyledMenuList = styled_default2(MenuList_default)(() => ({
|
||
minWidth: 248
|
||
}));
|
||
var GridColumnMenuContainer = React48.forwardRef(function GridColumnMenuContainer2(props, ref) {
|
||
const {
|
||
hideMenu,
|
||
id,
|
||
labelledby,
|
||
className,
|
||
children,
|
||
open
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded26);
|
||
const handleListKeyDown = React48.useCallback((event) => {
|
||
if (isTabKey(event.key)) {
|
||
event.preventDefault();
|
||
}
|
||
if (isHideMenuKey(event.key)) {
|
||
hideMenu(event);
|
||
}
|
||
}, [hideMenu]);
|
||
return (0, import_jsx_runtime38.jsx)(StyledMenuList, _extends({
|
||
id,
|
||
ref,
|
||
className: clsx_default(gridClasses.menuList, className),
|
||
"aria-labelledby": labelledby,
|
||
onKeyDown: handleListKeyDown,
|
||
autoFocus: open
|
||
}, other, {
|
||
children
|
||
}));
|
||
});
|
||
true ? GridColumnMenuContainer.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
colDef: import_prop_types25.default.object.isRequired,
|
||
hideMenu: import_prop_types25.default.func.isRequired,
|
||
id: import_prop_types25.default.string,
|
||
labelledby: import_prop_types25.default.string,
|
||
open: import_prop_types25.default.bool.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/GridColumnMenu.js
|
||
init_extends();
|
||
var React55 = __toESM(require_react());
|
||
var import_prop_types31 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columnMenu/useGridColumnMenuSlots.js
|
||
init_extends();
|
||
var React49 = __toESM(require_react());
|
||
var _excluded27 = ["displayOrder"];
|
||
var useGridColumnMenuSlots = (props) => {
|
||
const apiRef = useGridPrivateApiContext();
|
||
const {
|
||
defaultSlots: defaultSlots2,
|
||
defaultSlotProps,
|
||
slots = {},
|
||
slotProps = {},
|
||
hideMenu,
|
||
colDef,
|
||
addDividers = true
|
||
} = props;
|
||
const processedComponents = React49.useMemo(() => _extends({}, defaultSlots2, slots), [defaultSlots2, slots]);
|
||
const processedSlotProps = React49.useMemo(() => {
|
||
if (!slotProps || Object.keys(slotProps).length === 0) {
|
||
return defaultSlotProps;
|
||
}
|
||
const mergedProps = _extends({}, slotProps);
|
||
Object.entries(defaultSlotProps).forEach(([key, currentSlotProps]) => {
|
||
mergedProps[key] = _extends({}, currentSlotProps, slotProps[key] || {});
|
||
});
|
||
return mergedProps;
|
||
}, [defaultSlotProps, slotProps]);
|
||
const defaultItems = apiRef.current.unstable_applyPipeProcessors("columnMenu", [], props.colDef);
|
||
const userItems = React49.useMemo(() => {
|
||
const defaultComponentKeys = Object.keys(defaultSlots2);
|
||
return Object.keys(slots).filter((key) => !defaultComponentKeys.includes(key));
|
||
}, [slots, defaultSlots2]);
|
||
return React49.useMemo(() => {
|
||
const uniqueItems = Array.from(/* @__PURE__ */ new Set([...defaultItems, ...userItems]));
|
||
const cleansedItems = uniqueItems.filter((key) => processedComponents[key] != null);
|
||
const sorted = cleansedItems.sort((a, b) => {
|
||
const leftItemProps = processedSlotProps[a];
|
||
const rightItemProps = processedSlotProps[b];
|
||
const leftDisplayOrder = Number.isFinite(leftItemProps == null ? void 0 : leftItemProps.displayOrder) ? leftItemProps.displayOrder : 100;
|
||
const rightDisplayOrder = Number.isFinite(rightItemProps == null ? void 0 : rightItemProps.displayOrder) ? rightItemProps.displayOrder : 100;
|
||
return leftDisplayOrder - rightDisplayOrder;
|
||
});
|
||
return sorted.reduce((acc, key, index) => {
|
||
let itemProps = {
|
||
colDef,
|
||
onClick: hideMenu
|
||
};
|
||
const processedComponentProps = processedSlotProps[key];
|
||
if (processedComponentProps) {
|
||
const customProps = _objectWithoutPropertiesLoose(processedComponentProps, _excluded27);
|
||
itemProps = _extends({}, itemProps, customProps);
|
||
}
|
||
return addDividers && index !== sorted.length - 1 ? [...acc, [processedComponents[key], itemProps], [Divider_default, {}]] : [...acc, [processedComponents[key], itemProps]];
|
||
}, []);
|
||
}, [addDividers, colDef, defaultItems, hideMenu, processedComponents, processedSlotProps, userItems]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js
|
||
init_extends();
|
||
var React52 = __toESM(require_react());
|
||
var import_prop_types28 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js
|
||
var React50 = __toESM(require_react());
|
||
var import_prop_types26 = __toESM(require_prop_types());
|
||
var import_jsx_runtime39 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime40 = __toESM(require_jsx_runtime());
|
||
function GridColumnMenuHideItem(props) {
|
||
const {
|
||
colDef,
|
||
onClick
|
||
} = props;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);
|
||
const columnsWithMenu = visibleColumns.filter((col) => col.disableColumnMenu !== true);
|
||
const disabled = columnsWithMenu.length === 1;
|
||
const toggleColumn = React50.useCallback((event) => {
|
||
if (disabled) {
|
||
return;
|
||
}
|
||
apiRef.current.setColumnVisibility(colDef.field, false);
|
||
onClick(event);
|
||
}, [apiRef, colDef.field, onClick, disabled]);
|
||
if (rootProps.disableColumnSelector) {
|
||
return null;
|
||
}
|
||
if (colDef.hideable === false) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime40.jsxs)(MenuItem_default, {
|
||
onClick: toggleColumn,
|
||
disabled,
|
||
children: [(0, import_jsx_runtime39.jsx)(ListItemIcon_default, {
|
||
children: (0, import_jsx_runtime39.jsx)(rootProps.slots.columnMenuHideIcon, {
|
||
fontSize: "small"
|
||
})
|
||
}), (0, import_jsx_runtime39.jsx)(ListItemText_default, {
|
||
children: apiRef.current.getLocaleText("columnMenuHideColumn")
|
||
})]
|
||
});
|
||
}
|
||
true ? GridColumnMenuHideItem.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
colDef: import_prop_types26.default.object.isRequired,
|
||
onClick: import_prop_types26.default.func.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js
|
||
var React51 = __toESM(require_react());
|
||
var import_prop_types27 = __toESM(require_prop_types());
|
||
var import_jsx_runtime41 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime42 = __toESM(require_jsx_runtime());
|
||
function GridColumnMenuManageItem(props) {
|
||
const {
|
||
onClick
|
||
} = props;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const showColumns = React51.useCallback((event) => {
|
||
onClick(event);
|
||
apiRef.current.showPreferences(GridPreferencePanelsValue.columns);
|
||
}, [apiRef, onClick]);
|
||
if (rootProps.disableColumnSelector) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime42.jsxs)(MenuItem_default, {
|
||
onClick: showColumns,
|
||
children: [(0, import_jsx_runtime41.jsx)(ListItemIcon_default, {
|
||
children: (0, import_jsx_runtime41.jsx)(rootProps.slots.columnMenuManageColumnsIcon, {
|
||
fontSize: "small"
|
||
})
|
||
}), (0, import_jsx_runtime41.jsx)(ListItemText_default, {
|
||
children: apiRef.current.getLocaleText("columnMenuManageColumns")
|
||
})]
|
||
});
|
||
}
|
||
true ? GridColumnMenuManageItem.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
colDef: import_prop_types27.default.object.isRequired,
|
||
onClick: import_prop_types27.default.func.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js
|
||
var import_jsx_runtime43 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime44 = __toESM(require_jsx_runtime());
|
||
function GridColumnMenuColumnsItem(props) {
|
||
return (0, import_jsx_runtime44.jsxs)(React52.Fragment, {
|
||
children: [(0, import_jsx_runtime43.jsx)(GridColumnMenuHideItem, _extends({}, props)), (0, import_jsx_runtime43.jsx)(GridColumnMenuManageItem, _extends({}, props))]
|
||
});
|
||
}
|
||
true ? GridColumnMenuColumnsItem.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
colDef: import_prop_types28.default.object.isRequired,
|
||
onClick: import_prop_types28.default.func.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js
|
||
var React53 = __toESM(require_react());
|
||
var import_prop_types29 = __toESM(require_prop_types());
|
||
var import_jsx_runtime45 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime46 = __toESM(require_jsx_runtime());
|
||
function GridColumnMenuFilterItem(props) {
|
||
const {
|
||
colDef,
|
||
onClick
|
||
} = props;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const showFilter = React53.useCallback((event) => {
|
||
onClick(event);
|
||
apiRef.current.showFilterPanel(colDef.field);
|
||
}, [apiRef, colDef.field, onClick]);
|
||
if (rootProps.disableColumnFilter || !colDef.filterable) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime46.jsxs)(MenuItem_default, {
|
||
onClick: showFilter,
|
||
children: [(0, import_jsx_runtime45.jsx)(ListItemIcon_default, {
|
||
children: (0, import_jsx_runtime45.jsx)(rootProps.slots.columnMenuFilterIcon, {
|
||
fontSize: "small"
|
||
})
|
||
}), (0, import_jsx_runtime45.jsx)(ListItemText_default, {
|
||
children: apiRef.current.getLocaleText("columnMenuFilter")
|
||
})]
|
||
});
|
||
}
|
||
true ? GridColumnMenuFilterItem.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
colDef: import_prop_types29.default.object.isRequired,
|
||
onClick: import_prop_types29.default.func.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js
|
||
var React54 = __toESM(require_react());
|
||
var import_prop_types30 = __toESM(require_prop_types());
|
||
var import_jsx_runtime47 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime48 = __toESM(require_jsx_runtime());
|
||
function GridColumnMenuSortItem(props) {
|
||
var _colDef$sortingOrder;
|
||
const {
|
||
colDef,
|
||
onClick
|
||
} = props;
|
||
const apiRef = useGridApiContext();
|
||
const sortModel = useGridSelector(apiRef, gridSortModelSelector);
|
||
const rootProps = useGridRootProps();
|
||
const sortDirection = React54.useMemo(() => {
|
||
if (!colDef) {
|
||
return null;
|
||
}
|
||
const sortItem = sortModel.find((item) => item.field === colDef.field);
|
||
return sortItem == null ? void 0 : sortItem.sort;
|
||
}, [colDef, sortModel]);
|
||
const sortingOrder = (_colDef$sortingOrder = colDef.sortingOrder) != null ? _colDef$sortingOrder : rootProps.sortingOrder;
|
||
const onSortMenuItemClick = React54.useCallback((event) => {
|
||
onClick(event);
|
||
const direction = event.currentTarget.getAttribute("data-value") || null;
|
||
apiRef.current.sortColumn(colDef, direction === sortDirection ? null : direction);
|
||
}, [apiRef, colDef, onClick, sortDirection]);
|
||
if (!colDef || !colDef.sortable || !sortingOrder.some((item) => !!item)) {
|
||
return null;
|
||
}
|
||
const getLabel = (key) => {
|
||
const label = apiRef.current.getLocaleText(key);
|
||
return typeof label === "function" ? label(colDef) : label;
|
||
};
|
||
return (0, import_jsx_runtime48.jsxs)(React54.Fragment, {
|
||
children: [sortingOrder.includes("asc") && sortDirection !== "asc" ? (0, import_jsx_runtime48.jsxs)(MenuItem_default, {
|
||
onClick: onSortMenuItemClick,
|
||
"data-value": "asc",
|
||
children: [(0, import_jsx_runtime47.jsx)(ListItemIcon_default, {
|
||
children: (0, import_jsx_runtime47.jsx)(rootProps.slots.columnMenuSortAscendingIcon, {
|
||
fontSize: "small"
|
||
})
|
||
}), (0, import_jsx_runtime47.jsx)(ListItemText_default, {
|
||
children: getLabel("columnMenuSortAsc")
|
||
})]
|
||
}) : null, sortingOrder.includes("desc") && sortDirection !== "desc" ? (0, import_jsx_runtime48.jsxs)(MenuItem_default, {
|
||
onClick: onSortMenuItemClick,
|
||
"data-value": "desc",
|
||
children: [(0, import_jsx_runtime47.jsx)(ListItemIcon_default, {
|
||
children: (0, import_jsx_runtime47.jsx)(rootProps.slots.columnMenuSortDescendingIcon, {
|
||
fontSize: "small"
|
||
})
|
||
}), (0, import_jsx_runtime47.jsx)(ListItemText_default, {
|
||
children: getLabel("columnMenuSortDesc")
|
||
})]
|
||
}) : null, sortingOrder.includes(null) && sortDirection != null ? (0, import_jsx_runtime48.jsxs)(MenuItem_default, {
|
||
onClick: onSortMenuItemClick,
|
||
children: [(0, import_jsx_runtime47.jsx)(ListItemIcon_default, {}), (0, import_jsx_runtime47.jsx)(ListItemText_default, {
|
||
children: apiRef.current.getLocaleText("columnMenuUnsort")
|
||
})]
|
||
}) : null]
|
||
});
|
||
}
|
||
true ? GridColumnMenuSortItem.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
colDef: import_prop_types30.default.object.isRequired,
|
||
onClick: import_prop_types30.default.func.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/menu/columnMenu/GridColumnMenu.js
|
||
var import_jsx_runtime49 = __toESM(require_jsx_runtime());
|
||
var _excluded28 = ["defaultSlots", "defaultSlotProps", "slots", "slotProps"];
|
||
var GRID_COLUMN_MENU_SLOTS = {
|
||
columnMenuSortItem: GridColumnMenuSortItem,
|
||
columnMenuFilterItem: GridColumnMenuFilterItem,
|
||
columnMenuColumnsItem: GridColumnMenuColumnsItem
|
||
};
|
||
var GRID_COLUMN_MENU_SLOT_PROPS = {
|
||
columnMenuSortItem: {
|
||
displayOrder: 10
|
||
},
|
||
columnMenuFilterItem: {
|
||
displayOrder: 20
|
||
},
|
||
columnMenuColumnsItem: {
|
||
displayOrder: 30
|
||
}
|
||
};
|
||
var GridGenericColumnMenu = React55.forwardRef(function GridGenericColumnMenu2(props, ref) {
|
||
const {
|
||
defaultSlots: defaultSlots2,
|
||
defaultSlotProps,
|
||
slots,
|
||
slotProps
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded28);
|
||
const orderedSlots = useGridColumnMenuSlots(_extends({}, other, {
|
||
defaultSlots: defaultSlots2,
|
||
defaultSlotProps,
|
||
slots,
|
||
slotProps
|
||
}));
|
||
return (0, import_jsx_runtime49.jsx)(GridColumnMenuContainer, _extends({
|
||
ref
|
||
}, other, {
|
||
children: orderedSlots.map(([Component, otherProps], index) => (0, import_jsx_runtime49.jsx)(Component, _extends({}, otherProps), index))
|
||
}));
|
||
});
|
||
var GridColumnMenu = React55.forwardRef(function GridColumnMenu2(props, ref) {
|
||
return (0, import_jsx_runtime49.jsx)(GridGenericColumnMenu, _extends({}, props, {
|
||
ref,
|
||
defaultSlots: GRID_COLUMN_MENU_SLOTS,
|
||
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS
|
||
}));
|
||
});
|
||
true ? GridColumnMenu.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
colDef: import_prop_types31.default.object.isRequired,
|
||
hideMenu: import_prop_types31.default.func.isRequired,
|
||
id: import_prop_types31.default.string,
|
||
labelledby: import_prop_types31.default.string,
|
||
open: import_prop_types31.default.bool.isRequired,
|
||
/**
|
||
* Could be used to pass new props or override props specific to a column menu component
|
||
* e.g. `displayOrder`
|
||
*/
|
||
slotProps: import_prop_types31.default.object,
|
||
/**
|
||
* `slots` could be used to add new and (or) override default column menu items
|
||
* If you register a nee component you must pass it's `displayOrder` in `slotProps`
|
||
* or it will be placed in the end of the list
|
||
*/
|
||
slots: import_prop_types31.default.object
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/GridColumnsPanel.js
|
||
init_extends();
|
||
var React60 = __toESM(require_react());
|
||
var import_prop_types36 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/GridPanelContent.js
|
||
init_extends();
|
||
var React56 = __toESM(require_react());
|
||
var import_prop_types32 = __toESM(require_prop_types());
|
||
var import_jsx_runtime50 = __toESM(require_jsx_runtime());
|
||
var _excluded29 = ["className"];
|
||
var useUtilityClasses23 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["panelContent"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridPanelContentRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "PanelContent",
|
||
overridesResolver: (props, styles) => styles.panelContent
|
||
})({
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
overflow: "auto",
|
||
flex: "1 1",
|
||
maxHeight: 400
|
||
});
|
||
function GridPanelContent(props) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded29);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses23(rootProps);
|
||
return (0, import_jsx_runtime50.jsx)(GridPanelContentRoot, _extends({
|
||
className: clsx_default(className, classes.root),
|
||
ownerState: rootProps
|
||
}, other));
|
||
}
|
||
true ? GridPanelContent.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
sx: import_prop_types32.default.oneOfType([import_prop_types32.default.arrayOf(import_prop_types32.default.oneOfType([import_prop_types32.default.func, import_prop_types32.default.object, import_prop_types32.default.bool])), import_prop_types32.default.func, import_prop_types32.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/GridPanelFooter.js
|
||
init_extends();
|
||
var React57 = __toESM(require_react());
|
||
var import_prop_types33 = __toESM(require_prop_types());
|
||
var import_jsx_runtime51 = __toESM(require_jsx_runtime());
|
||
var _excluded30 = ["className"];
|
||
var useUtilityClasses24 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["panelFooter"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridPanelFooterRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "PanelFooter",
|
||
overridesResolver: (props, styles) => styles.panelFooter
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
padding: theme.spacing(0.5),
|
||
display: "flex",
|
||
justifyContent: "space-between"
|
||
}));
|
||
function GridPanelFooter(props) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded30);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses24(rootProps);
|
||
return (0, import_jsx_runtime51.jsx)(GridPanelFooterRoot, _extends({
|
||
className: clsx_default(className, classes.root),
|
||
ownerState: rootProps
|
||
}, other));
|
||
}
|
||
true ? GridPanelFooter.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
sx: import_prop_types33.default.oneOfType([import_prop_types33.default.arrayOf(import_prop_types33.default.oneOfType([import_prop_types33.default.func, import_prop_types33.default.object, import_prop_types33.default.bool])), import_prop_types33.default.func, import_prop_types33.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/GridPanelHeader.js
|
||
init_extends();
|
||
var React58 = __toESM(require_react());
|
||
var import_prop_types34 = __toESM(require_prop_types());
|
||
var import_jsx_runtime52 = __toESM(require_jsx_runtime());
|
||
var _excluded31 = ["className"];
|
||
var useUtilityClasses25 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["panelHeader"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridPanelHeaderRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "PanelHeader",
|
||
overridesResolver: (props, styles) => styles.panelHeader
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
padding: theme.spacing(1)
|
||
}));
|
||
function GridPanelHeader(props) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded31);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses25(rootProps);
|
||
return (0, import_jsx_runtime52.jsx)(GridPanelHeaderRoot, _extends({
|
||
className: clsx_default(className, classes.root),
|
||
ownerState: rootProps
|
||
}, other));
|
||
}
|
||
true ? GridPanelHeader.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
sx: import_prop_types34.default.oneOfType([import_prop_types34.default.arrayOf(import_prop_types34.default.oneOfType([import_prop_types34.default.func, import_prop_types34.default.object, import_prop_types34.default.bool])), import_prop_types34.default.func, import_prop_types34.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/GridPanelWrapper.js
|
||
init_extends();
|
||
var React59 = __toESM(require_react());
|
||
var import_prop_types35 = __toESM(require_prop_types());
|
||
var import_jsx_runtime53 = __toESM(require_jsx_runtime());
|
||
var _excluded32 = ["className", "slotProps"];
|
||
var useUtilityClasses26 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["panelWrapper"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridPanelWrapperRoot = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "PanelWrapper",
|
||
overridesResolver: (props, styles) => styles.panelWrapper
|
||
})({
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
flex: 1,
|
||
"&:focus": {
|
||
outline: 0
|
||
}
|
||
});
|
||
var isEnabled = () => true;
|
||
var GridPanelWrapper = React59.forwardRef(function GridPanelWrapper2(props, ref) {
|
||
const {
|
||
className,
|
||
slotProps = {}
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded32);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses26(rootProps);
|
||
return (0, import_jsx_runtime53.jsx)(FocusTrap_default, _extends({
|
||
open: true,
|
||
disableEnforceFocus: true,
|
||
isEnabled
|
||
}, slotProps.TrapFocus, {
|
||
children: (0, import_jsx_runtime53.jsx)(GridPanelWrapperRoot, _extends({
|
||
ref,
|
||
tabIndex: -1,
|
||
className: clsx_default(className, classes.root),
|
||
ownerState: rootProps
|
||
}, other))
|
||
}));
|
||
});
|
||
true ? GridPanelWrapper.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
slotProps: import_prop_types35.default.object
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/constants/envConstants.js
|
||
var GRID_EXPERIMENTAL_ENABLED = false;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/GridColumnsPanel.js
|
||
var import_jsx_runtime54 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime55 = __toESM(require_jsx_runtime());
|
||
var _excluded33 = ["sort", "searchPredicate", "autoFocusSearchField", "disableHideAllButton", "disableShowAllButton", "getTogglableColumns"];
|
||
var useUtilityClasses27 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["columnsPanel"],
|
||
columnsPanelRow: ["columnsPanelRow"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridColumnsPanelRoot = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "ColumnsPanel",
|
||
overridesResolver: (props, styles) => styles.columnsPanel
|
||
})({
|
||
padding: "8px 0px 8px 8px"
|
||
});
|
||
var GridColumnsPanelRowRoot = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "ColumnsPanelRow",
|
||
overridesResolver: (props, styles) => styles.columnsPanelRow
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
display: "flex",
|
||
justifyContent: "space-between",
|
||
padding: "1px 8px 1px 7px",
|
||
[`& .${switchClasses_default.root}`]: {
|
||
marginRight: theme.spacing(0.5)
|
||
}
|
||
}));
|
||
var GridIconButtonRoot = styled_default2(IconButton_default)({
|
||
justifyContent: "flex-end"
|
||
});
|
||
var collator2 = new Intl.Collator();
|
||
var defaultSearchPredicate = (column, searchValue) => {
|
||
return (column.headerName || column.field).toLowerCase().indexOf(searchValue) > -1;
|
||
};
|
||
function GridColumnsPanel(props) {
|
||
var _rootProps$slotProps, _rootProps$slotProps3, _rootProps$slotProps4;
|
||
const apiRef = useGridApiContext();
|
||
const searchInputRef = React60.useRef(null);
|
||
const columns = useGridSelector(apiRef, gridColumnDefinitionsSelector);
|
||
const columnVisibilityModel = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
|
||
const rootProps = useGridRootProps();
|
||
const [searchValue, setSearchValue] = React60.useState("");
|
||
const classes = useUtilityClasses27(rootProps);
|
||
const {
|
||
sort,
|
||
searchPredicate = defaultSearchPredicate,
|
||
autoFocusSearchField = true,
|
||
disableHideAllButton = false,
|
||
disableShowAllButton = false,
|
||
getTogglableColumns
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded33);
|
||
const sortedColumns = React60.useMemo(() => {
|
||
switch (sort) {
|
||
case "asc":
|
||
return [...columns].sort((a, b) => collator2.compare(a.headerName || a.field, b.headerName || b.field));
|
||
case "desc":
|
||
return [...columns].sort((a, b) => -collator2.compare(a.headerName || a.field, b.headerName || b.field));
|
||
default:
|
||
return columns;
|
||
}
|
||
}, [columns, sort]);
|
||
const toggleColumn = (event) => {
|
||
const {
|
||
name: field
|
||
} = event.target;
|
||
apiRef.current.setColumnVisibility(field, columnVisibilityModel[field] === false);
|
||
};
|
||
const toggleAllColumns = React60.useCallback((isVisible) => {
|
||
const currentModel = gridColumnVisibilityModelSelector(apiRef);
|
||
const newModel = _extends({}, currentModel);
|
||
const togglableColumns = getTogglableColumns ? getTogglableColumns(columns) : null;
|
||
columns.forEach((col) => {
|
||
if (col.hideable && (togglableColumns == null || togglableColumns.includes(col.field))) {
|
||
if (isVisible) {
|
||
delete newModel[col.field];
|
||
} else {
|
||
newModel[col.field] = false;
|
||
}
|
||
}
|
||
});
|
||
return apiRef.current.setColumnVisibilityModel(newModel);
|
||
}, [apiRef, columns, getTogglableColumns]);
|
||
const handleSearchValueChange = React60.useCallback((event) => {
|
||
setSearchValue(event.target.value);
|
||
}, []);
|
||
const currentColumns = React60.useMemo(() => {
|
||
const togglableColumns = getTogglableColumns ? getTogglableColumns(sortedColumns) : null;
|
||
const togglableSortedColumns = togglableColumns ? sortedColumns.filter(({
|
||
field
|
||
}) => togglableColumns.includes(field)) : sortedColumns;
|
||
if (!searchValue) {
|
||
return togglableSortedColumns;
|
||
}
|
||
return togglableSortedColumns.filter((column) => searchPredicate(column, searchValue.toLowerCase()));
|
||
}, [sortedColumns, searchValue, searchPredicate, getTogglableColumns]);
|
||
const firstSwitchRef = React60.useRef(null);
|
||
React60.useEffect(() => {
|
||
if (autoFocusSearchField) {
|
||
searchInputRef.current.focus();
|
||
} else if (firstSwitchRef.current && typeof firstSwitchRef.current.focus === "function") {
|
||
firstSwitchRef.current.focus();
|
||
}
|
||
}, [autoFocusSearchField]);
|
||
let firstHideableColumnFound = false;
|
||
const isFirstHideableColumn = (column) => {
|
||
if (firstHideableColumnFound === false && column.hideable !== false) {
|
||
firstHideableColumnFound = true;
|
||
return true;
|
||
}
|
||
return false;
|
||
};
|
||
return (0, import_jsx_runtime55.jsxs)(GridPanelWrapper, _extends({}, other, {
|
||
children: [(0, import_jsx_runtime54.jsx)(GridPanelHeader, {
|
||
children: (0, import_jsx_runtime54.jsx)(rootProps.slots.baseTextField, _extends({
|
||
label: apiRef.current.getLocaleText("columnsPanelTextFieldLabel"),
|
||
placeholder: apiRef.current.getLocaleText("columnsPanelTextFieldPlaceholder"),
|
||
inputRef: searchInputRef,
|
||
value: searchValue,
|
||
onChange: handleSearchValueChange,
|
||
variant: "standard",
|
||
fullWidth: true
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTextField))
|
||
}), (0, import_jsx_runtime54.jsx)(GridPanelContent, {
|
||
children: (0, import_jsx_runtime54.jsx)(GridColumnsPanelRoot, {
|
||
className: classes.root,
|
||
ownerState: rootProps,
|
||
children: currentColumns.map((column) => {
|
||
var _rootProps$slotProps2;
|
||
return (0, import_jsx_runtime55.jsxs)(GridColumnsPanelRowRoot, {
|
||
className: classes.columnsPanelRow,
|
||
ownerState: rootProps,
|
||
children: [(0, import_jsx_runtime54.jsx)(FormControlLabel_default, {
|
||
control: (0, import_jsx_runtime54.jsx)(rootProps.slots.baseSwitch, _extends({
|
||
disabled: column.hideable === false,
|
||
checked: columnVisibilityModel[column.field] !== false,
|
||
onClick: toggleColumn,
|
||
name: column.field,
|
||
size: "small",
|
||
inputRef: isFirstHideableColumn(column) ? firstSwitchRef : void 0
|
||
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseSwitch)),
|
||
label: column.headerName || column.field
|
||
}), !rootProps.disableColumnReorder && GRID_EXPERIMENTAL_ENABLED && (0, import_jsx_runtime54.jsx)(GridIconButtonRoot, {
|
||
draggable: true,
|
||
"aria-label": apiRef.current.getLocaleText("columnsPanelDragIconLabel"),
|
||
title: apiRef.current.getLocaleText("columnsPanelDragIconLabel"),
|
||
size: "small",
|
||
disabled: true,
|
||
children: (0, import_jsx_runtime54.jsx)(rootProps.slots.columnReorderIcon, {})
|
||
})]
|
||
}, column.field);
|
||
})
|
||
})
|
||
}), disableShowAllButton && disableHideAllButton ? null : (0, import_jsx_runtime55.jsxs)(GridPanelFooter, {
|
||
children: [!disableHideAllButton ? (0, import_jsx_runtime54.jsx)(rootProps.slots.baseButton, _extends({
|
||
onClick: () => toggleAllColumns(false)
|
||
}, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseButton, {
|
||
disabled: disableHideAllButton,
|
||
children: apiRef.current.getLocaleText("columnsPanelHideAllButton")
|
||
})) : (0, import_jsx_runtime54.jsx)("span", {}), !disableShowAllButton ? (0, import_jsx_runtime54.jsx)(rootProps.slots.baseButton, _extends({
|
||
onClick: () => toggleAllColumns(true)
|
||
}, (_rootProps$slotProps4 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps4.baseButton, {
|
||
disabled: disableShowAllButton,
|
||
children: apiRef.current.getLocaleText("columnsPanelShowAllButton")
|
||
})) : null]
|
||
})]
|
||
}));
|
||
}
|
||
true ? GridColumnsPanel.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* If `true`, the column search field will be focused automatically.
|
||
* If `false`, the first column switch input will be focused automatically.
|
||
* This helps to avoid input keyboard panel to popup automatically on touch devices.
|
||
* @default true
|
||
*/
|
||
autoFocusSearchField: import_prop_types36.default.bool,
|
||
/**
|
||
* If `true`, the `Hide all` button will not be displayed.
|
||
* @default false
|
||
*/
|
||
disableHideAllButton: import_prop_types36.default.bool,
|
||
/**
|
||
* If `true`, the `Show all` button will be disabled
|
||
* @default false
|
||
*/
|
||
disableShowAllButton: import_prop_types36.default.bool,
|
||
/**
|
||
* Returns the list of togglable columns.
|
||
* If used, only those columns will be displayed in the panel
|
||
* which are passed as the return value of the function.
|
||
* @param {GridColDef[]} columns The `ColDef` list of all columns.
|
||
* @returns {GridColDef['field'][]} The list of togglable columns' field names.
|
||
*/
|
||
getTogglableColumns: import_prop_types36.default.func,
|
||
searchPredicate: import_prop_types36.default.func,
|
||
slotProps: import_prop_types36.default.object,
|
||
sort: import_prop_types36.default.oneOf(["asc", "desc"])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/GridPanel.js
|
||
init_extends();
|
||
var React61 = __toESM(require_react());
|
||
var import_prop_types37 = __toESM(require_prop_types());
|
||
var import_jsx_runtime56 = __toESM(require_jsx_runtime());
|
||
var _excluded34 = ["children", "className", "classes"];
|
||
var gridPanelClasses = generateUtilityClasses("MuiDataGrid", ["panel", "paper"]);
|
||
var GridPanelRoot = styled_default2(Popper_default, {
|
||
name: "MuiDataGrid",
|
||
slot: "Panel",
|
||
overridesResolver: (props, styles) => styles.panel
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
zIndex: theme.zIndex.modal
|
||
}));
|
||
var GridPaperRoot = styled_default2(Paper_default, {
|
||
name: "MuiDataGrid",
|
||
slot: "Paper",
|
||
overridesResolver: (props, styles) => styles.paper
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
backgroundColor: (theme.vars || theme).palette.background.paper,
|
||
minWidth: 300,
|
||
maxHeight: 450,
|
||
display: "flex"
|
||
}));
|
||
var GridPanel = React61.forwardRef((props, ref) => {
|
||
const {
|
||
children,
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded34);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const classes = gridPanelClasses;
|
||
const [isPlaced, setIsPlaced] = React61.useState(false);
|
||
const handleClickAway = React61.useCallback(() => {
|
||
apiRef.current.hidePreferences();
|
||
}, [apiRef]);
|
||
const handleKeyDown = React61.useCallback((event) => {
|
||
if (isEscapeKey(event.key)) {
|
||
apiRef.current.hidePreferences();
|
||
}
|
||
}, [apiRef]);
|
||
const modifiers = React61.useMemo(() => [{
|
||
name: "flip",
|
||
enabled: true,
|
||
options: {
|
||
rootBoundary: "document"
|
||
}
|
||
}, {
|
||
name: "isPlaced",
|
||
enabled: true,
|
||
phase: "main",
|
||
fn: () => {
|
||
setIsPlaced(true);
|
||
},
|
||
effect: () => () => {
|
||
setIsPlaced(false);
|
||
}
|
||
}], []);
|
||
const [anchorEl, setAnchorEl] = React61.useState(null);
|
||
React61.useEffect(() => {
|
||
var _apiRef$current$rootE;
|
||
const columnHeadersElement = (_apiRef$current$rootE = apiRef.current.rootElementRef) == null || (_apiRef$current$rootE = _apiRef$current$rootE.current) == null ? void 0 : _apiRef$current$rootE.querySelector(`.${gridClasses.columnHeaders}`);
|
||
if (columnHeadersElement) {
|
||
setAnchorEl(columnHeadersElement);
|
||
}
|
||
}, [apiRef]);
|
||
if (!anchorEl) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime56.jsx)(GridPanelRoot, _extends({
|
||
ref,
|
||
placement: "bottom-start",
|
||
className: clsx_default(className, classes.panel),
|
||
ownerState: rootProps,
|
||
anchorEl,
|
||
modifiers
|
||
}, other, {
|
||
children: (0, import_jsx_runtime56.jsx)(ClickAwayListener, {
|
||
mouseEvent: "onMouseUp",
|
||
onClickAway: handleClickAway,
|
||
children: (0, import_jsx_runtime56.jsx)(GridPaperRoot, {
|
||
className: classes.paper,
|
||
ownerState: rootProps,
|
||
elevation: 8,
|
||
onKeyDown: handleKeyDown,
|
||
children: isPlaced && children
|
||
})
|
||
})
|
||
}));
|
||
});
|
||
true ? GridPanel.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* Popper render function or node.
|
||
*/
|
||
children: import_prop_types37.default.node,
|
||
/**
|
||
* Override or extend the styles applied to the component.
|
||
*/
|
||
classes: import_prop_types37.default.object,
|
||
/**
|
||
* If `true`, the component is shown.
|
||
*/
|
||
open: import_prop_types37.default.bool.isRequired,
|
||
ownerState: import_prop_types37.default.object
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/GridPreferencesPanel.js
|
||
init_extends();
|
||
var React62 = __toESM(require_react());
|
||
var import_jsx_runtime57 = __toESM(require_jsx_runtime());
|
||
var GridPreferencesPanel = React62.forwardRef(function GridPreferencesPanel2(props, ref) {
|
||
var _preferencePanelState, _rootProps$slotProps, _rootProps$slotProps2;
|
||
const apiRef = useGridApiContext();
|
||
const columns = useGridSelector(apiRef, gridColumnDefinitionsSelector);
|
||
const rootProps = useGridRootProps();
|
||
const preferencePanelState = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
||
const panelContent = apiRef.current.unstable_applyPipeProcessors("preferencePanel", null, (_preferencePanelState = preferencePanelState.openedPanelValue) != null ? _preferencePanelState : GridPreferencePanelsValue.filters);
|
||
return (0, import_jsx_runtime57.jsx)(rootProps.slots.panel, _extends({
|
||
ref,
|
||
as: rootProps.slots.basePopper,
|
||
open: columns.length > 0 && preferencePanelState.open,
|
||
id: preferencePanelState.panelId,
|
||
"aria-labelledby": preferencePanelState.labelId
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.panel, props, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.basePopper, {
|
||
children: panelContent
|
||
}));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterForm.js
|
||
init_extends();
|
||
var React63 = __toESM(require_react());
|
||
var import_prop_types38 = __toESM(require_prop_types());
|
||
var import_jsx_runtime58 = __toESM(require_jsx_runtime());
|
||
var import_react2 = __toESM(require_react());
|
||
var import_jsx_runtime59 = __toESM(require_jsx_runtime());
|
||
var _excluded35 = ["item", "hasMultipleFilters", "deleteFilter", "applyFilterChanges", "multiFilterOperator", "showMultiFilterOperators", "disableMultiFilterOperator", "applyMultiFilterOperatorChanges", "focusElementRef", "logicOperators", "columnsSort", "filterColumns", "deleteIconProps", "logicOperatorInputProps", "operatorInputProps", "columnInputProps", "valueInputProps", "children"];
|
||
var _excluded210 = ["InputComponentProps"];
|
||
var useUtilityClasses28 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["filterForm"],
|
||
deleteIcon: ["filterFormDeleteIcon"],
|
||
logicOperatorInput: ["filterFormLogicOperatorInput"],
|
||
columnInput: ["filterFormColumnInput"],
|
||
operatorInput: ["filterFormOperatorInput"],
|
||
valueInput: ["filterFormValueInput"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridFilterFormRoot = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "FilterForm",
|
||
overridesResolver: (props, styles) => styles.filterForm
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
display: "flex",
|
||
padding: theme.spacing(1)
|
||
}));
|
||
var FilterFormDeleteIcon = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "FilterFormDeleteIcon",
|
||
overridesResolver: (_, styles) => styles.filterFormDeleteIcon
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
flexShrink: 0,
|
||
justifyContent: "flex-end",
|
||
marginRight: theme.spacing(0.5),
|
||
marginBottom: theme.spacing(0.2)
|
||
}));
|
||
var FilterFormLogicOperatorInput = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "FilterFormLogicOperatorInput",
|
||
overridesResolver: (_, styles) => styles.filterFormLogicOperatorInput
|
||
})({
|
||
minWidth: 55,
|
||
marginRight: 5,
|
||
justifyContent: "end"
|
||
});
|
||
var FilterFormColumnInput = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "FilterFormColumnInput",
|
||
overridesResolver: (_, styles) => styles.filterFormColumnInput
|
||
})({
|
||
width: 150
|
||
});
|
||
var FilterFormOperatorInput = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "FilterFormOperatorInput",
|
||
overridesResolver: (_, styles) => styles.filterFormOperatorInput
|
||
})({
|
||
width: 120
|
||
});
|
||
var FilterFormValueInput = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "FilterFormValueInput",
|
||
overridesResolver: (_, styles) => styles.filterFormValueInput
|
||
})({
|
||
width: 190
|
||
});
|
||
var getLogicOperatorLocaleKey = (logicOperator) => {
|
||
switch (logicOperator) {
|
||
case GridLogicOperator.And:
|
||
return "filterPanelOperatorAnd";
|
||
case GridLogicOperator.Or:
|
||
return "filterPanelOperatorOr";
|
||
default:
|
||
throw new Error("MUI: Invalid `logicOperator` property in the `GridFilterPanel`.");
|
||
}
|
||
};
|
||
var getColumnLabel = (col) => col.headerName || col.field;
|
||
var collator3 = new Intl.Collator();
|
||
var GridFilterForm = React63.forwardRef(function GridFilterForm2(props, ref) {
|
||
var _rootProps$slotProps, _rootProps$slotProps2, _baseSelectProps$nati, _rootProps$slotProps3, _rootProps$slotProps4, _rootProps$slotProps5, _rootProps$slotProps6, _rootProps$slotProps7, _rootProps$slotProps8, _currentColumn$filter2;
|
||
const {
|
||
item,
|
||
hasMultipleFilters,
|
||
deleteFilter,
|
||
applyFilterChanges,
|
||
multiFilterOperator,
|
||
showMultiFilterOperators,
|
||
disableMultiFilterOperator,
|
||
applyMultiFilterOperatorChanges,
|
||
focusElementRef,
|
||
logicOperators = [GridLogicOperator.And, GridLogicOperator.Or],
|
||
columnsSort,
|
||
filterColumns,
|
||
deleteIconProps = {},
|
||
logicOperatorInputProps = {},
|
||
operatorInputProps = {},
|
||
columnInputProps = {},
|
||
valueInputProps = {}
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded35);
|
||
const apiRef = useGridApiContext();
|
||
const filterableColumns = useGridSelector(apiRef, gridFilterableColumnDefinitionsSelector);
|
||
const filterModel = useGridSelector(apiRef, gridFilterModelSelector);
|
||
const columnSelectId = useId();
|
||
const columnSelectLabelId = useId();
|
||
const operatorSelectId = useId();
|
||
const operatorSelectLabelId = useId();
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses28(rootProps);
|
||
const valueRef = React63.useRef(null);
|
||
const filterSelectorRef = React63.useRef(null);
|
||
const hasLogicOperatorColumn = hasMultipleFilters && logicOperators.length > 0;
|
||
const baseFormControlProps = ((_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseFormControl) || {};
|
||
const baseSelectProps = ((_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseSelect) || {};
|
||
const isBaseSelectNative = (_baseSelectProps$nati = baseSelectProps.native) != null ? _baseSelectProps$nati : true;
|
||
const baseInputLabelProps = ((_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseInputLabel) || {};
|
||
const baseSelectOptionProps = ((_rootProps$slotProps4 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps4.baseSelectOption) || {};
|
||
const {
|
||
InputComponentProps
|
||
} = valueInputProps, valueInputPropsOther = _objectWithoutPropertiesLoose(valueInputProps, _excluded210);
|
||
const filteredColumns = React63.useMemo(() => {
|
||
if (filterColumns === void 0 || typeof filterColumns !== "function") {
|
||
return filterableColumns;
|
||
}
|
||
const filteredFields = filterColumns({
|
||
field: item.field,
|
||
columns: filterableColumns,
|
||
currentFilters: (filterModel == null ? void 0 : filterModel.items) || []
|
||
});
|
||
return filterableColumns.filter((column) => filteredFields.includes(column.field));
|
||
}, [filterColumns, filterModel == null ? void 0 : filterModel.items, filterableColumns, item.field]);
|
||
const sortedFilteredColumns = React63.useMemo(() => {
|
||
switch (columnsSort) {
|
||
case "asc":
|
||
return filteredColumns.sort((a, b) => collator3.compare(getColumnLabel(a), getColumnLabel(b)));
|
||
case "desc":
|
||
return filteredColumns.sort((a, b) => -collator3.compare(getColumnLabel(a), getColumnLabel(b)));
|
||
default:
|
||
return filteredColumns;
|
||
}
|
||
}, [filteredColumns, columnsSort]);
|
||
const currentColumn = item.field ? apiRef.current.getColumn(item.field) : null;
|
||
const currentOperator = React63.useMemo(() => {
|
||
var _currentColumn$filter;
|
||
if (!item.operator || !currentColumn) {
|
||
return null;
|
||
}
|
||
return (_currentColumn$filter = currentColumn.filterOperators) == null ? void 0 : _currentColumn$filter.find((operator) => operator.value === item.operator);
|
||
}, [item, currentColumn]);
|
||
const changeColumn = React63.useCallback((event) => {
|
||
const field = event.target.value;
|
||
const column = apiRef.current.getColumn(field);
|
||
if (column.field === currentColumn.field) {
|
||
return;
|
||
}
|
||
const newOperator = column.filterOperators.find((operator) => operator.value === item.operator) || column.filterOperators[0];
|
||
const eraseItemValue = !newOperator.InputComponent || newOperator.InputComponent !== (currentOperator == null ? void 0 : currentOperator.InputComponent) || column.type !== currentColumn.type;
|
||
applyFilterChanges(_extends({}, item, {
|
||
field,
|
||
operator: newOperator.value,
|
||
value: eraseItemValue ? void 0 : item.value
|
||
}));
|
||
}, [apiRef, applyFilterChanges, item, currentColumn, currentOperator]);
|
||
const changeOperator = React63.useCallback((event) => {
|
||
const operator = event.target.value;
|
||
const newOperator = currentColumn == null ? void 0 : currentColumn.filterOperators.find((op) => op.value === operator);
|
||
const eraseItemValue = !(newOperator != null && newOperator.InputComponent) || (newOperator == null ? void 0 : newOperator.InputComponent) !== (currentOperator == null ? void 0 : currentOperator.InputComponent);
|
||
applyFilterChanges(_extends({}, item, {
|
||
operator,
|
||
value: eraseItemValue ? void 0 : item.value
|
||
}));
|
||
}, [applyFilterChanges, item, currentColumn, currentOperator]);
|
||
const changeLogicOperator = React63.useCallback((event) => {
|
||
const logicOperator = event.target.value === GridLogicOperator.And.toString() ? GridLogicOperator.And : GridLogicOperator.Or;
|
||
applyMultiFilterOperatorChanges(logicOperator);
|
||
}, [applyMultiFilterOperatorChanges]);
|
||
const handleDeleteFilter = () => {
|
||
if (rootProps.disableMultipleColumnsFiltering) {
|
||
if (item.value === void 0) {
|
||
deleteFilter(item);
|
||
} else {
|
||
applyFilterChanges(_extends({}, item, {
|
||
value: void 0
|
||
}));
|
||
}
|
||
} else {
|
||
deleteFilter(item);
|
||
}
|
||
};
|
||
React63.useImperativeHandle(focusElementRef, () => ({
|
||
focus: () => {
|
||
if (currentOperator != null && currentOperator.InputComponent) {
|
||
var _valueRef$current;
|
||
valueRef == null || (_valueRef$current = valueRef.current) == null || _valueRef$current.focus();
|
||
} else {
|
||
filterSelectorRef.current.focus();
|
||
}
|
||
}
|
||
}), [currentOperator]);
|
||
return (0, import_jsx_runtime59.jsxs)(GridFilterFormRoot, _extends({
|
||
ref,
|
||
className: classes.root,
|
||
"data-id": item.id,
|
||
ownerState: rootProps
|
||
}, other, {
|
||
children: [(0, import_jsx_runtime58.jsx)(FilterFormDeleteIcon, _extends({
|
||
variant: "standard",
|
||
as: rootProps.slots.baseFormControl
|
||
}, baseFormControlProps, deleteIconProps, {
|
||
className: clsx_default(classes.deleteIcon, baseFormControlProps.className, deleteIconProps.className),
|
||
ownerState: rootProps,
|
||
children: (0, import_jsx_runtime58.jsx)(rootProps.slots.baseIconButton, _extends({
|
||
"aria-label": apiRef.current.getLocaleText("filterPanelDeleteIconLabel"),
|
||
title: apiRef.current.getLocaleText("filterPanelDeleteIconLabel"),
|
||
onClick: handleDeleteFilter,
|
||
size: "small"
|
||
}, (_rootProps$slotProps5 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps5.baseIconButton, {
|
||
children: (0, import_jsx_runtime58.jsx)(rootProps.slots.filterPanelDeleteIcon, {
|
||
fontSize: "small"
|
||
})
|
||
}))
|
||
})), (0, import_jsx_runtime58.jsx)(FilterFormLogicOperatorInput, _extends({
|
||
variant: "standard",
|
||
as: rootProps.slots.baseFormControl
|
||
}, baseFormControlProps, logicOperatorInputProps, {
|
||
sx: _extends({
|
||
display: hasLogicOperatorColumn ? "flex" : "none",
|
||
visibility: showMultiFilterOperators ? "visible" : "hidden"
|
||
}, baseFormControlProps.sx || {}, logicOperatorInputProps.sx || {}),
|
||
className: clsx_default(classes.logicOperatorInput, baseFormControlProps.className, logicOperatorInputProps.className),
|
||
ownerState: rootProps,
|
||
children: (0, import_jsx_runtime58.jsx)(rootProps.slots.baseSelect, _extends({
|
||
inputProps: {
|
||
"aria-label": apiRef.current.getLocaleText("filterPanelLogicOperator")
|
||
},
|
||
value: multiFilterOperator,
|
||
onChange: changeLogicOperator,
|
||
disabled: !!disableMultiFilterOperator || logicOperators.length === 1,
|
||
native: isBaseSelectNative
|
||
}, (_rootProps$slotProps6 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps6.baseSelect, {
|
||
children: logicOperators.map((logicOperator) => (0, import_react2.createElement)(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
||
native: isBaseSelectNative,
|
||
key: logicOperator.toString(),
|
||
value: logicOperator.toString()
|
||
}), apiRef.current.getLocaleText(getLogicOperatorLocaleKey(logicOperator))))
|
||
}))
|
||
})), (0, import_jsx_runtime59.jsxs)(FilterFormColumnInput, _extends({
|
||
variant: "standard",
|
||
as: rootProps.slots.baseFormControl
|
||
}, baseFormControlProps, columnInputProps, {
|
||
className: clsx_default(classes.columnInput, baseFormControlProps.className, columnInputProps.className),
|
||
ownerState: rootProps,
|
||
children: [(0, import_jsx_runtime58.jsx)(rootProps.slots.baseInputLabel, _extends({}, baseInputLabelProps, {
|
||
htmlFor: columnSelectId,
|
||
id: columnSelectLabelId,
|
||
children: apiRef.current.getLocaleText("filterPanelColumns")
|
||
})), (0, import_jsx_runtime58.jsx)(rootProps.slots.baseSelect, _extends({
|
||
labelId: columnSelectLabelId,
|
||
id: columnSelectId,
|
||
label: apiRef.current.getLocaleText("filterPanelColumns"),
|
||
value: item.field || "",
|
||
onChange: changeColumn,
|
||
native: isBaseSelectNative
|
||
}, (_rootProps$slotProps7 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps7.baseSelect, {
|
||
children: sortedFilteredColumns.map((col) => (0, import_react2.createElement)(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
||
native: isBaseSelectNative,
|
||
key: col.field,
|
||
value: col.field
|
||
}), getColumnLabel(col)))
|
||
}))]
|
||
})), (0, import_jsx_runtime59.jsxs)(FilterFormOperatorInput, _extends({
|
||
variant: "standard",
|
||
as: rootProps.slots.baseFormControl
|
||
}, baseFormControlProps, operatorInputProps, {
|
||
className: clsx_default(classes.operatorInput, baseFormControlProps.className, operatorInputProps.className),
|
||
ownerState: rootProps,
|
||
children: [(0, import_jsx_runtime58.jsx)(rootProps.slots.baseInputLabel, _extends({}, baseInputLabelProps, {
|
||
htmlFor: operatorSelectId,
|
||
id: operatorSelectLabelId,
|
||
children: apiRef.current.getLocaleText("filterPanelOperator")
|
||
})), (0, import_jsx_runtime58.jsx)(rootProps.slots.baseSelect, _extends({
|
||
labelId: operatorSelectLabelId,
|
||
label: apiRef.current.getLocaleText("filterPanelOperator"),
|
||
id: operatorSelectId,
|
||
value: item.operator,
|
||
onChange: changeOperator,
|
||
native: isBaseSelectNative,
|
||
inputRef: filterSelectorRef
|
||
}, (_rootProps$slotProps8 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps8.baseSelect, {
|
||
children: currentColumn == null || (_currentColumn$filter2 = currentColumn.filterOperators) == null ? void 0 : _currentColumn$filter2.map((operator) => (0, import_react2.createElement)(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
||
native: isBaseSelectNative,
|
||
key: operator.value,
|
||
value: operator.value
|
||
}), operator.label || apiRef.current.getLocaleText(`filterOperator${capitalize(operator.value)}`)))
|
||
}))]
|
||
})), (0, import_jsx_runtime58.jsx)(FilterFormValueInput, _extends({
|
||
variant: "standard",
|
||
as: rootProps.slots.baseFormControl
|
||
}, baseFormControlProps, valueInputPropsOther, {
|
||
className: clsx_default(classes.valueInput, baseFormControlProps.className, valueInputPropsOther.className),
|
||
ownerState: rootProps,
|
||
children: currentOperator != null && currentOperator.InputComponent ? (0, import_jsx_runtime58.jsx)(currentOperator.InputComponent, _extends({
|
||
apiRef,
|
||
item,
|
||
applyValue: applyFilterChanges,
|
||
focusElementRef: valueRef
|
||
}, currentOperator.InputComponentProps, InputComponentProps)) : null
|
||
}))]
|
||
}));
|
||
});
|
||
true ? GridFilterForm.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* Callback called when the operator, column field or value is changed.
|
||
* @param {GridFilterItem} item The updated [[GridFilterItem]].
|
||
*/
|
||
applyFilterChanges: import_prop_types38.default.func.isRequired,
|
||
/**
|
||
* Callback called when the logic operator is changed.
|
||
* @param {GridLogicOperator} operator The new logic operator.
|
||
*/
|
||
applyMultiFilterOperatorChanges: import_prop_types38.default.func.isRequired,
|
||
/**
|
||
* @ignore - do not document.
|
||
*/
|
||
children: import_prop_types38.default.node,
|
||
/**
|
||
* Props passed to the column input component.
|
||
* @default {}
|
||
*/
|
||
columnInputProps: import_prop_types38.default.any,
|
||
/**
|
||
* Changes how the options in the columns selector should be ordered.
|
||
* If not specified, the order is derived from the `columns` prop.
|
||
*/
|
||
columnsSort: import_prop_types38.default.oneOf(["asc", "desc"]),
|
||
/**
|
||
* Callback called when the delete button is clicked.
|
||
* @param {GridFilterItem} item The deleted [[GridFilterItem]].
|
||
*/
|
||
deleteFilter: import_prop_types38.default.func.isRequired,
|
||
/**
|
||
* Props passed to the delete icon.
|
||
* @default {}
|
||
*/
|
||
deleteIconProps: import_prop_types38.default.any,
|
||
/**
|
||
* If `true`, disables the logic operator field but still renders it.
|
||
*/
|
||
disableMultiFilterOperator: import_prop_types38.default.bool,
|
||
/**
|
||
* Allows to filter the columns displayed in the filter form.
|
||
* @param {FilterColumnsArgs} args The columns of the grid and name of field.
|
||
* @returns {GridColDef['field'][]} The filtered fields array.
|
||
*/
|
||
filterColumns: import_prop_types38.default.func,
|
||
/**
|
||
* A ref allowing to set imperative focus.
|
||
* It can be passed to the el
|
||
*/
|
||
focusElementRef: import_prop_types38.default.oneOfType([import_prop_types38.default.func, import_prop_types38.default.object]),
|
||
/**
|
||
* If `true`, the logic operator field is rendered.
|
||
* The field will be invisible if `showMultiFilterOperators` is also `true`.
|
||
*/
|
||
hasMultipleFilters: import_prop_types38.default.bool.isRequired,
|
||
/**
|
||
* The [[GridFilterItem]] representing this form.
|
||
*/
|
||
item: import_prop_types38.default.shape({
|
||
field: import_prop_types38.default.string.isRequired,
|
||
id: import_prop_types38.default.oneOfType([import_prop_types38.default.number, import_prop_types38.default.string]),
|
||
operator: import_prop_types38.default.string.isRequired,
|
||
value: import_prop_types38.default.any
|
||
}).isRequired,
|
||
/**
|
||
* Props passed to the logic operator input component.
|
||
* @default {}
|
||
*/
|
||
logicOperatorInputProps: import_prop_types38.default.any,
|
||
/**
|
||
* Sets the available logic operators.
|
||
* @default [GridLogicOperator.And, GridLogicOperator.Or]
|
||
*/
|
||
logicOperators: import_prop_types38.default.arrayOf(import_prop_types38.default.oneOf(["and", "or"]).isRequired),
|
||
/**
|
||
* The current logic operator applied.
|
||
*/
|
||
multiFilterOperator: import_prop_types38.default.oneOf(["and", "or"]),
|
||
/**
|
||
* Props passed to the operator input component.
|
||
* @default {}
|
||
*/
|
||
operatorInputProps: import_prop_types38.default.any,
|
||
/**
|
||
* If `true`, the logic operator field is visible.
|
||
*/
|
||
showMultiFilterOperators: import_prop_types38.default.bool,
|
||
/**
|
||
* Props passed to the value input component.
|
||
* @default {}
|
||
*/
|
||
valueInputProps: import_prop_types38.default.any
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputValue.js
|
||
init_extends();
|
||
var React64 = __toESM(require_react());
|
||
var import_prop_types39 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useTimeout.js
|
||
var Timeout = class _Timeout {
|
||
constructor() {
|
||
this.currentId = 0;
|
||
this.clear = () => {
|
||
if (this.currentId !== 0) {
|
||
clearTimeout(this.currentId);
|
||
this.currentId = 0;
|
||
}
|
||
};
|
||
this.disposeEffect = () => {
|
||
return this.clear;
|
||
};
|
||
}
|
||
static create() {
|
||
return new _Timeout();
|
||
}
|
||
start(delay, fn) {
|
||
this.clear();
|
||
this.currentId = setTimeout(fn, delay);
|
||
}
|
||
};
|
||
function useTimeout() {
|
||
const timeout = useLazyRef(Timeout.create).current;
|
||
useOnMount(timeout.disposeEffect);
|
||
return timeout;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputValue.js
|
||
var import_jsx_runtime60 = __toESM(require_jsx_runtime());
|
||
var _excluded36 = ["item", "applyValue", "type", "apiRef", "focusElementRef", "tabIndex", "disabled", "isFilterActive", "clearButton", "InputProps", "variant"];
|
||
function GridFilterInputValue(props) {
|
||
var _item$value, _rootProps$slotProps;
|
||
const {
|
||
item,
|
||
applyValue,
|
||
type,
|
||
apiRef,
|
||
focusElementRef,
|
||
tabIndex,
|
||
disabled,
|
||
clearButton,
|
||
InputProps,
|
||
variant = "standard"
|
||
} = props, others = _objectWithoutPropertiesLoose(props, _excluded36);
|
||
const filterTimeout = useTimeout();
|
||
const [filterValueState, setFilterValueState] = React64.useState((_item$value = item.value) != null ? _item$value : "");
|
||
const [applying, setIsApplying] = React64.useState(false);
|
||
const id = useId();
|
||
const rootProps = useGridRootProps();
|
||
const onFilterChange = React64.useCallback((event) => {
|
||
const {
|
||
value
|
||
} = event.target;
|
||
setFilterValueState(String(value));
|
||
setIsApplying(true);
|
||
filterTimeout.start(rootProps.filterDebounceMs, () => {
|
||
const newItem = _extends({}, item, {
|
||
value,
|
||
fromInput: id
|
||
});
|
||
applyValue(newItem);
|
||
setIsApplying(false);
|
||
});
|
||
}, [id, applyValue, item, rootProps.filterDebounceMs, filterTimeout]);
|
||
React64.useEffect(() => {
|
||
const itemPlusTag = item;
|
||
if (itemPlusTag.fromInput !== id || item.value === void 0) {
|
||
var _item$value2;
|
||
setFilterValueState(String((_item$value2 = item.value) != null ? _item$value2 : ""));
|
||
}
|
||
}, [id, item]);
|
||
return (0, import_jsx_runtime60.jsx)(rootProps.slots.baseTextField, _extends({
|
||
id,
|
||
label: apiRef.current.getLocaleText("filterPanelInputLabel"),
|
||
placeholder: apiRef.current.getLocaleText("filterPanelInputPlaceholder"),
|
||
value: filterValueState,
|
||
onChange: onFilterChange,
|
||
variant,
|
||
type: type || "text",
|
||
InputProps: _extends({}, applying || clearButton ? {
|
||
endAdornment: applying ? (0, import_jsx_runtime60.jsx)(rootProps.slots.loadIcon, {
|
||
fontSize: "small",
|
||
color: "action"
|
||
}) : clearButton
|
||
} : {}, {
|
||
disabled
|
||
}, InputProps, {
|
||
inputProps: _extends({
|
||
tabIndex
|
||
}, InputProps == null ? void 0 : InputProps.inputProps)
|
||
}),
|
||
InputLabelProps: {
|
||
shrink: true
|
||
},
|
||
inputRef: focusElementRef
|
||
}, others, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTextField));
|
||
}
|
||
true ? GridFilterInputValue.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
apiRef: import_prop_types39.default.shape({
|
||
current: import_prop_types39.default.object.isRequired
|
||
}).isRequired,
|
||
applyValue: import_prop_types39.default.func.isRequired,
|
||
clearButton: import_prop_types39.default.node,
|
||
focusElementRef: import_prop_types39.default.oneOfType([import_prop_types39.default.func, import_prop_types39.default.object]),
|
||
/**
|
||
* It is `true` if the filter either has a value or an operator with no value
|
||
* required is selected (e.g. `isEmpty`)
|
||
*/
|
||
isFilterActive: import_prop_types39.default.bool,
|
||
item: import_prop_types39.default.shape({
|
||
field: import_prop_types39.default.string.isRequired,
|
||
id: import_prop_types39.default.oneOfType([import_prop_types39.default.number, import_prop_types39.default.string]),
|
||
operator: import_prop_types39.default.string.isRequired,
|
||
value: import_prop_types39.default.any
|
||
}).isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputDate.js
|
||
init_extends();
|
||
var React65 = __toESM(require_react());
|
||
var import_prop_types40 = __toESM(require_prop_types());
|
||
var import_jsx_runtime61 = __toESM(require_jsx_runtime());
|
||
var _excluded37 = ["item", "applyValue", "type", "apiRef", "focusElementRef", "InputProps", "isFilterActive", "clearButton", "tabIndex", "disabled"];
|
||
function GridFilterInputDate(props) {
|
||
var _item$value, _rootProps$slotProps;
|
||
const {
|
||
item,
|
||
applyValue,
|
||
type,
|
||
apiRef,
|
||
focusElementRef,
|
||
InputProps,
|
||
clearButton,
|
||
tabIndex,
|
||
disabled
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded37);
|
||
const filterTimeout = useTimeout();
|
||
const [filterValueState, setFilterValueState] = React65.useState((_item$value = item.value) != null ? _item$value : "");
|
||
const [applying, setIsApplying] = React65.useState(false);
|
||
const id = useId();
|
||
const rootProps = useGridRootProps();
|
||
const onFilterChange = React65.useCallback((event) => {
|
||
const value = event.target.value;
|
||
setFilterValueState(String(value));
|
||
setIsApplying(true);
|
||
filterTimeout.start(rootProps.filterDebounceMs, () => {
|
||
applyValue(_extends({}, item, {
|
||
value
|
||
}));
|
||
setIsApplying(false);
|
||
});
|
||
}, [applyValue, item, rootProps.filterDebounceMs, filterTimeout]);
|
||
React65.useEffect(() => {
|
||
var _item$value2;
|
||
const itemValue = (_item$value2 = item.value) != null ? _item$value2 : "";
|
||
setFilterValueState(String(itemValue));
|
||
}, [item.value]);
|
||
return (0, import_jsx_runtime61.jsx)(rootProps.slots.baseTextField, _extends({
|
||
fullWidth: true,
|
||
id,
|
||
label: apiRef.current.getLocaleText("filterPanelInputLabel"),
|
||
placeholder: apiRef.current.getLocaleText("filterPanelInputPlaceholder"),
|
||
value: filterValueState,
|
||
onChange: onFilterChange,
|
||
variant: "standard",
|
||
type: type || "text",
|
||
InputLabelProps: {
|
||
shrink: true
|
||
},
|
||
inputRef: focusElementRef,
|
||
InputProps: _extends({}, applying || clearButton ? {
|
||
endAdornment: applying ? (0, import_jsx_runtime61.jsx)(rootProps.slots.loadIcon, {
|
||
fontSize: "small",
|
||
color: "action"
|
||
}) : clearButton
|
||
} : {}, {
|
||
disabled
|
||
}, InputProps, {
|
||
inputProps: _extends({
|
||
max: type === "datetime-local" ? "9999-12-31T23:59" : "9999-12-31",
|
||
tabIndex
|
||
}, InputProps == null ? void 0 : InputProps.inputProps)
|
||
})
|
||
}, other, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTextField));
|
||
}
|
||
true ? GridFilterInputDate.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
apiRef: import_prop_types40.default.shape({
|
||
current: import_prop_types40.default.object.isRequired
|
||
}).isRequired,
|
||
applyValue: import_prop_types40.default.func.isRequired,
|
||
clearButton: import_prop_types40.default.node,
|
||
focusElementRef: import_prop_types40.default.oneOfType([import_prop_types40.default.func, import_prop_types40.default.object]),
|
||
/**
|
||
* It is `true` if the filter either has a value or an operator with no value
|
||
* required is selected (e.g. `isEmpty`)
|
||
*/
|
||
isFilterActive: import_prop_types40.default.bool,
|
||
item: import_prop_types40.default.shape({
|
||
field: import_prop_types40.default.string.isRequired,
|
||
id: import_prop_types40.default.oneOfType([import_prop_types40.default.number, import_prop_types40.default.string]),
|
||
operator: import_prop_types40.default.string.isRequired,
|
||
value: import_prop_types40.default.any
|
||
}).isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputSingleSelect.js
|
||
init_extends();
|
||
var React66 = __toESM(require_react());
|
||
var import_prop_types41 = __toESM(require_prop_types());
|
||
var import_react3 = __toESM(require_react());
|
||
var import_jsx_runtime62 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime63 = __toESM(require_jsx_runtime());
|
||
var _excluded38 = ["item", "applyValue", "type", "apiRef", "focusElementRef", "getOptionLabel", "getOptionValue", "placeholder", "tabIndex", "label", "variant", "isFilterActive", "clearButton", "InputLabelProps"];
|
||
var renderSingleSelectOptions = ({
|
||
column: {
|
||
valueOptions,
|
||
field
|
||
},
|
||
OptionComponent,
|
||
getOptionLabel,
|
||
getOptionValue,
|
||
isSelectNative,
|
||
baseSelectOptionProps
|
||
}) => {
|
||
const iterableColumnValues = typeof valueOptions === "function" ? ["", ...valueOptions({
|
||
field
|
||
})] : ["", ...valueOptions || []];
|
||
return iterableColumnValues.map((option) => {
|
||
const value = getOptionValue(option);
|
||
const label = getOptionLabel(option);
|
||
return (0, import_react3.createElement)(OptionComponent, _extends({}, baseSelectOptionProps, {
|
||
native: isSelectNative,
|
||
key: value,
|
||
value
|
||
}), label);
|
||
});
|
||
};
|
||
var SingleSelectOperatorContainer = styled_default2("div")({
|
||
display: "flex",
|
||
alignItems: "flex-end",
|
||
width: "100%",
|
||
[`& button`]: {
|
||
margin: "auto 0px 5px 5px"
|
||
}
|
||
});
|
||
function GridFilterInputSingleSelect(props) {
|
||
var _item$value, _rootProps$slotProps$, _rootProps$slotProps, _resolvedColumn, _resolvedColumn2, _rootProps$slotProps2, _rootProps$slotProps3, _rootProps$slotProps4;
|
||
const {
|
||
item,
|
||
applyValue,
|
||
type,
|
||
apiRef,
|
||
focusElementRef,
|
||
getOptionLabel: getOptionLabelProp,
|
||
getOptionValue: getOptionValueProp,
|
||
placeholder,
|
||
tabIndex,
|
||
label: labelProp,
|
||
variant = "standard",
|
||
clearButton
|
||
} = props, others = _objectWithoutPropertiesLoose(props, _excluded38);
|
||
const [filterValueState, setFilterValueState] = React66.useState((_item$value = item.value) != null ? _item$value : "");
|
||
const id = useId();
|
||
const labelId = useId();
|
||
const rootProps = useGridRootProps();
|
||
const isSelectNative = (_rootProps$slotProps$ = (_rootProps$slotProps = rootProps.slotProps) == null || (_rootProps$slotProps = _rootProps$slotProps.baseSelect) == null ? void 0 : _rootProps$slotProps.native) != null ? _rootProps$slotProps$ : true;
|
||
let resolvedColumn = null;
|
||
if (item.field) {
|
||
const column = apiRef.current.getColumn(item.field);
|
||
if (isSingleSelectColDef(column)) {
|
||
resolvedColumn = column;
|
||
}
|
||
}
|
||
const getOptionValue = getOptionValueProp || ((_resolvedColumn = resolvedColumn) == null ? void 0 : _resolvedColumn.getOptionValue);
|
||
const getOptionLabel = getOptionLabelProp || ((_resolvedColumn2 = resolvedColumn) == null ? void 0 : _resolvedColumn2.getOptionLabel);
|
||
const currentValueOptions = React66.useMemo(() => {
|
||
if (!resolvedColumn) {
|
||
return void 0;
|
||
}
|
||
return typeof resolvedColumn.valueOptions === "function" ? resolvedColumn.valueOptions({
|
||
field: resolvedColumn.field
|
||
}) : resolvedColumn.valueOptions;
|
||
}, [resolvedColumn]);
|
||
const onFilterChange = React66.useCallback((event) => {
|
||
let value = event.target.value;
|
||
value = getValueFromValueOptions(value, currentValueOptions, getOptionValue);
|
||
setFilterValueState(String(value));
|
||
applyValue(_extends({}, item, {
|
||
value
|
||
}));
|
||
}, [currentValueOptions, getOptionValue, applyValue, item]);
|
||
React66.useEffect(() => {
|
||
var _itemValue;
|
||
let itemValue;
|
||
if (currentValueOptions !== void 0) {
|
||
itemValue = getValueFromValueOptions(item.value, currentValueOptions, getOptionValue);
|
||
if (itemValue !== item.value) {
|
||
applyValue(_extends({}, item, {
|
||
value: itemValue
|
||
}));
|
||
return;
|
||
}
|
||
} else {
|
||
itemValue = item.value;
|
||
}
|
||
itemValue = (_itemValue = itemValue) != null ? _itemValue : "";
|
||
setFilterValueState(String(itemValue));
|
||
}, [item, currentValueOptions, applyValue, getOptionValue]);
|
||
if (!isSingleSelectColDef(resolvedColumn)) {
|
||
return null;
|
||
}
|
||
if (!isSingleSelectColDef(resolvedColumn)) {
|
||
return null;
|
||
}
|
||
const label = labelProp != null ? labelProp : apiRef.current.getLocaleText("filterPanelInputLabel");
|
||
return (0, import_jsx_runtime63.jsxs)(SingleSelectOperatorContainer, {
|
||
children: [(0, import_jsx_runtime63.jsxs)(rootProps.slots.baseFormControl, {
|
||
children: [(0, import_jsx_runtime62.jsx)(rootProps.slots.baseInputLabel, _extends({}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseInputLabel, {
|
||
id: labelId,
|
||
htmlFor: id,
|
||
shrink: true,
|
||
variant,
|
||
children: label
|
||
})), (0, import_jsx_runtime62.jsx)(rootProps.slots.baseSelect, _extends({
|
||
id,
|
||
label,
|
||
labelId,
|
||
value: filterValueState,
|
||
onChange: onFilterChange,
|
||
variant,
|
||
type: type || "text",
|
||
inputProps: {
|
||
tabIndex,
|
||
ref: focusElementRef,
|
||
placeholder: placeholder != null ? placeholder : apiRef.current.getLocaleText("filterPanelInputPlaceholder")
|
||
},
|
||
native: isSelectNative,
|
||
notched: variant === "outlined" ? true : void 0
|
||
}, others, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseSelect, {
|
||
children: renderSingleSelectOptions({
|
||
column: resolvedColumn,
|
||
OptionComponent: rootProps.slots.baseSelectOption,
|
||
getOptionLabel,
|
||
getOptionValue,
|
||
isSelectNative,
|
||
baseSelectOptionProps: (_rootProps$slotProps4 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps4.baseSelectOption
|
||
})
|
||
}))]
|
||
}), clearButton]
|
||
});
|
||
}
|
||
true ? GridFilterInputSingleSelect.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
apiRef: import_prop_types41.default.shape({
|
||
current: import_prop_types41.default.object.isRequired
|
||
}).isRequired,
|
||
applyValue: import_prop_types41.default.func.isRequired,
|
||
clearButton: import_prop_types41.default.node,
|
||
focusElementRef: import_prop_types41.default.oneOfType([import_prop_types41.default.func, import_prop_types41.default.object]),
|
||
/**
|
||
* Used to determine the label displayed for a given value option.
|
||
* @param {ValueOptions} value The current value option.
|
||
* @returns {string} The text to be displayed.
|
||
*/
|
||
getOptionLabel: import_prop_types41.default.func,
|
||
/**
|
||
* Used to determine the value used for a value option.
|
||
* @param {ValueOptions} value The current value option.
|
||
* @returns {string} The value to be used.
|
||
*/
|
||
getOptionValue: import_prop_types41.default.func,
|
||
/**
|
||
* It is `true` if the filter either has a value or an operator with no value
|
||
* required is selected (e.g. `isEmpty`)
|
||
*/
|
||
isFilterActive: import_prop_types41.default.bool,
|
||
item: import_prop_types41.default.shape({
|
||
field: import_prop_types41.default.string.isRequired,
|
||
id: import_prop_types41.default.oneOfType([import_prop_types41.default.number, import_prop_types41.default.string]),
|
||
operator: import_prop_types41.default.string.isRequired,
|
||
value: import_prop_types41.default.any
|
||
}).isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputBoolean.js
|
||
init_extends();
|
||
var React67 = __toESM(require_react());
|
||
var import_prop_types42 = __toESM(require_prop_types());
|
||
var import_jsx_runtime64 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime65 = __toESM(require_jsx_runtime());
|
||
var _excluded39 = ["item", "applyValue", "apiRef", "focusElementRef", "isFilterActive", "clearButton", "tabIndex", "label", "variant", "InputLabelProps"];
|
||
var BooleanOperatorContainer = styled_default2("div")({
|
||
display: "flex",
|
||
alignItems: "center",
|
||
width: "100%",
|
||
[`& button`]: {
|
||
margin: "auto 0px 5px 5px"
|
||
}
|
||
});
|
||
function GridFilterInputBoolean(props) {
|
||
var _rootProps$slotProps, _baseSelectProps$nati, _rootProps$slotProps2, _rootProps$slotProps3;
|
||
const {
|
||
item,
|
||
applyValue,
|
||
apiRef,
|
||
focusElementRef,
|
||
clearButton,
|
||
tabIndex,
|
||
label: labelProp,
|
||
variant = "standard"
|
||
} = props, others = _objectWithoutPropertiesLoose(props, _excluded39);
|
||
const [filterValueState, setFilterValueState] = React67.useState(item.value || "");
|
||
const rootProps = useGridRootProps();
|
||
const labelId = useId();
|
||
const selectId = useId();
|
||
const baseSelectProps = ((_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseSelect) || {};
|
||
const isSelectNative = (_baseSelectProps$nati = baseSelectProps.native) != null ? _baseSelectProps$nati : true;
|
||
const baseSelectOptionProps = ((_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseSelectOption) || {};
|
||
const onFilterChange = React67.useCallback((event) => {
|
||
const value = event.target.value;
|
||
setFilterValueState(value);
|
||
applyValue(_extends({}, item, {
|
||
value
|
||
}));
|
||
}, [applyValue, item]);
|
||
React67.useEffect(() => {
|
||
setFilterValueState(item.value || "");
|
||
}, [item.value]);
|
||
const label = labelProp != null ? labelProp : apiRef.current.getLocaleText("filterPanelInputLabel");
|
||
return (0, import_jsx_runtime65.jsxs)(BooleanOperatorContainer, {
|
||
children: [(0, import_jsx_runtime65.jsxs)(rootProps.slots.baseFormControl, {
|
||
fullWidth: true,
|
||
children: [(0, import_jsx_runtime64.jsx)(rootProps.slots.baseInputLabel, _extends({}, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseInputLabel, {
|
||
id: labelId,
|
||
shrink: true,
|
||
variant,
|
||
children: label
|
||
})), (0, import_jsx_runtime65.jsxs)(rootProps.slots.baseSelect, _extends({
|
||
labelId,
|
||
id: selectId,
|
||
label,
|
||
value: filterValueState,
|
||
onChange: onFilterChange,
|
||
variant,
|
||
notched: variant === "outlined" ? true : void 0,
|
||
native: isSelectNative,
|
||
displayEmpty: true,
|
||
inputProps: {
|
||
ref: focusElementRef,
|
||
tabIndex
|
||
}
|
||
}, others, baseSelectProps, {
|
||
children: [(0, import_jsx_runtime64.jsx)(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
||
native: isSelectNative,
|
||
value: "",
|
||
children: apiRef.current.getLocaleText("filterValueAny")
|
||
})), (0, import_jsx_runtime64.jsx)(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
||
native: isSelectNative,
|
||
value: "true",
|
||
children: apiRef.current.getLocaleText("filterValueTrue")
|
||
})), (0, import_jsx_runtime64.jsx)(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
|
||
native: isSelectNative,
|
||
value: "false",
|
||
children: apiRef.current.getLocaleText("filterValueFalse")
|
||
}))]
|
||
}))]
|
||
}), clearButton]
|
||
});
|
||
}
|
||
true ? GridFilterInputBoolean.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
apiRef: import_prop_types42.default.shape({
|
||
current: import_prop_types42.default.object.isRequired
|
||
}).isRequired,
|
||
applyValue: import_prop_types42.default.func.isRequired,
|
||
clearButton: import_prop_types42.default.node,
|
||
focusElementRef: refType_default,
|
||
/**
|
||
* It is `true` if the filter either has a value or an operator with no value
|
||
* required is selected (e.g. `isEmpty`)
|
||
*/
|
||
isFilterActive: import_prop_types42.default.bool,
|
||
item: import_prop_types42.default.shape({
|
||
field: import_prop_types42.default.string.isRequired,
|
||
id: import_prop_types42.default.oneOfType([import_prop_types42.default.number, import_prop_types42.default.string]),
|
||
operator: import_prop_types42.default.string.isRequired,
|
||
value: import_prop_types42.default.any
|
||
}).isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterPanel.js
|
||
init_extends();
|
||
var React68 = __toESM(require_react());
|
||
var import_prop_types43 = __toESM(require_prop_types());
|
||
var import_jsx_runtime66 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime67 = __toESM(require_jsx_runtime());
|
||
var _excluded40 = ["logicOperators", "columnsSort", "filterFormProps", "getColumnForNewFilter", "children", "disableAddFilterButton", "disableRemoveAllButton"];
|
||
var getGridFilter = (col) => ({
|
||
field: col.field,
|
||
operator: col.filterOperators[0].value,
|
||
id: Math.round(Math.random() * 1e5)
|
||
});
|
||
var GridFilterPanel = React68.forwardRef(function GridFilterPanel2(props, ref) {
|
||
var _rootProps$slotProps, _rootProps$slotProps2;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const filterModel = useGridSelector(apiRef, gridFilterModelSelector);
|
||
const filterableColumns = useGridSelector(apiRef, gridFilterableColumnDefinitionsSelector);
|
||
const lastFilterRef = React68.useRef(null);
|
||
const placeholderFilter = React68.useRef(null);
|
||
const {
|
||
logicOperators = [GridLogicOperator.And, GridLogicOperator.Or],
|
||
columnsSort,
|
||
filterFormProps,
|
||
getColumnForNewFilter,
|
||
disableAddFilterButton = false,
|
||
disableRemoveAllButton = false
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded40);
|
||
const applyFilter = apiRef.current.upsertFilterItem;
|
||
const applyFilterLogicOperator = React68.useCallback((operator) => {
|
||
apiRef.current.setFilterLogicOperator(operator);
|
||
}, [apiRef]);
|
||
const getDefaultFilter = React68.useCallback(() => {
|
||
let nextColumnWithOperator;
|
||
if (getColumnForNewFilter && typeof getColumnForNewFilter === "function") {
|
||
const nextFieldName = getColumnForNewFilter({
|
||
currentFilters: (filterModel == null ? void 0 : filterModel.items) || [],
|
||
columns: filterableColumns
|
||
});
|
||
if (nextFieldName === null) {
|
||
return null;
|
||
}
|
||
nextColumnWithOperator = filterableColumns.find(({
|
||
field
|
||
}) => field === nextFieldName);
|
||
} else {
|
||
nextColumnWithOperator = filterableColumns.find((colDef) => {
|
||
var _colDef$filterOperato;
|
||
return (_colDef$filterOperato = colDef.filterOperators) == null ? void 0 : _colDef$filterOperato.length;
|
||
});
|
||
}
|
||
if (!nextColumnWithOperator) {
|
||
return null;
|
||
}
|
||
return getGridFilter(nextColumnWithOperator);
|
||
}, [filterModel == null ? void 0 : filterModel.items, filterableColumns, getColumnForNewFilter]);
|
||
const getNewFilter = React68.useCallback(() => {
|
||
if (getColumnForNewFilter === void 0 || typeof getColumnForNewFilter !== "function") {
|
||
return getDefaultFilter();
|
||
}
|
||
const currentFilters = filterModel.items.length ? filterModel.items : [getDefaultFilter()].filter(Boolean);
|
||
const nextColumnFieldName = getColumnForNewFilter({
|
||
currentFilters,
|
||
columns: filterableColumns
|
||
});
|
||
if (nextColumnFieldName === null) {
|
||
return null;
|
||
}
|
||
const nextColumnWithOperator = filterableColumns.find(({
|
||
field
|
||
}) => field === nextColumnFieldName);
|
||
if (!nextColumnWithOperator) {
|
||
return null;
|
||
}
|
||
return getGridFilter(nextColumnWithOperator);
|
||
}, [filterModel.items, filterableColumns, getColumnForNewFilter, getDefaultFilter]);
|
||
const items = React68.useMemo(() => {
|
||
if (filterModel.items.length) {
|
||
return filterModel.items;
|
||
}
|
||
if (!placeholderFilter.current) {
|
||
placeholderFilter.current = getDefaultFilter();
|
||
}
|
||
return placeholderFilter.current ? [placeholderFilter.current] : [];
|
||
}, [filterModel.items, getDefaultFilter]);
|
||
const hasMultipleFilters = items.length > 1;
|
||
const addNewFilter = () => {
|
||
const newFilter = getNewFilter();
|
||
if (!newFilter) {
|
||
return;
|
||
}
|
||
apiRef.current.upsertFilterItems([...items, newFilter]);
|
||
};
|
||
const deleteFilter = React68.useCallback((item) => {
|
||
const shouldCloseFilterPanel = items.length === 1;
|
||
apiRef.current.deleteFilterItem(item);
|
||
if (shouldCloseFilterPanel) {
|
||
apiRef.current.hideFilterPanel();
|
||
}
|
||
}, [apiRef, items.length]);
|
||
const handleRemoveAll = () => {
|
||
if (items.length === 1 && items[0].value === void 0) {
|
||
apiRef.current.deleteFilterItem(items[0]);
|
||
apiRef.current.hideFilterPanel();
|
||
}
|
||
apiRef.current.setFilterModel(_extends({}, filterModel, {
|
||
items: []
|
||
}));
|
||
};
|
||
React68.useEffect(() => {
|
||
if (logicOperators.length > 0 && filterModel.logicOperator && !logicOperators.includes(filterModel.logicOperator)) {
|
||
applyFilterLogicOperator(logicOperators[0]);
|
||
}
|
||
}, [logicOperators, applyFilterLogicOperator, filterModel.logicOperator]);
|
||
React68.useEffect(() => {
|
||
if (items.length > 0) {
|
||
lastFilterRef.current.focus();
|
||
}
|
||
}, [items.length]);
|
||
return (0, import_jsx_runtime67.jsxs)(GridPanelWrapper, _extends({
|
||
ref
|
||
}, other, {
|
||
children: [(0, import_jsx_runtime66.jsx)(GridPanelContent, {
|
||
children: items.map((item, index) => (0, import_jsx_runtime66.jsx)(GridFilterForm, _extends({
|
||
item,
|
||
applyFilterChanges: applyFilter,
|
||
deleteFilter,
|
||
hasMultipleFilters,
|
||
showMultiFilterOperators: index > 0,
|
||
multiFilterOperator: filterModel.logicOperator,
|
||
disableMultiFilterOperator: index !== 1,
|
||
applyMultiFilterOperatorChanges: applyFilterLogicOperator,
|
||
focusElementRef: index === items.length - 1 ? lastFilterRef : null,
|
||
logicOperators,
|
||
columnsSort
|
||
}, filterFormProps), item.id == null ? index : item.id))
|
||
}), !rootProps.disableMultipleColumnsFiltering && !(disableAddFilterButton && disableRemoveAllButton) ? (0, import_jsx_runtime67.jsxs)(GridPanelFooter, {
|
||
children: [!disableAddFilterButton ? (0, import_jsx_runtime66.jsx)(rootProps.slots.baseButton, _extends({
|
||
onClick: addNewFilter,
|
||
startIcon: (0, import_jsx_runtime66.jsx)(rootProps.slots.filterPanelAddIcon, {})
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseButton, {
|
||
children: apiRef.current.getLocaleText("filterPanelAddFilter")
|
||
})) : (0, import_jsx_runtime66.jsx)("span", {}), !disableRemoveAllButton ? (0, import_jsx_runtime66.jsx)(rootProps.slots.baseButton, _extends({
|
||
onClick: handleRemoveAll,
|
||
startIcon: (0, import_jsx_runtime66.jsx)(rootProps.slots.filterPanelRemoveAllIcon, {})
|
||
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseButton, {
|
||
children: apiRef.current.getLocaleText("filterPanelRemoveAll")
|
||
})) : null]
|
||
}) : null]
|
||
}));
|
||
});
|
||
true ? GridFilterPanel.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* @ignore - do not document.
|
||
*/
|
||
children: import_prop_types43.default.node,
|
||
/**
|
||
* Changes how the options in the columns selector should be ordered.
|
||
* If not specified, the order is derived from the `columns` prop.
|
||
*/
|
||
columnsSort: import_prop_types43.default.oneOf(["asc", "desc"]),
|
||
/**
|
||
* If `true`, the `Add filter` button will not be displayed.
|
||
* @default false
|
||
*/
|
||
disableAddFilterButton: import_prop_types43.default.bool,
|
||
/**
|
||
* If `true`, the `Remove all` button will be disabled
|
||
* @default false
|
||
*/
|
||
disableRemoveAllButton: import_prop_types43.default.bool,
|
||
/**
|
||
* Props passed to each filter form.
|
||
*/
|
||
filterFormProps: import_prop_types43.default.shape({
|
||
columnInputProps: import_prop_types43.default.any,
|
||
columnsSort: import_prop_types43.default.oneOf(["asc", "desc"]),
|
||
deleteIconProps: import_prop_types43.default.any,
|
||
filterColumns: import_prop_types43.default.func,
|
||
logicOperatorInputProps: import_prop_types43.default.any,
|
||
operatorInputProps: import_prop_types43.default.any,
|
||
valueInputProps: import_prop_types43.default.any
|
||
}),
|
||
/**
|
||
* Function that returns the next filter item to be picked as default filter.
|
||
* @param {GetColumnForNewFilterArgs} args Currently configured filters and columns.
|
||
* @returns {GridColDef['field']} The field to be used for the next filter or `null` to prevent adding a filter.
|
||
*/
|
||
getColumnForNewFilter: import_prop_types43.default.func,
|
||
/**
|
||
* Sets the available logic operators.
|
||
* @default [GridLogicOperator.And, GridLogicOperator.Or]
|
||
*/
|
||
logicOperators: import_prop_types43.default.arrayOf(import_prop_types43.default.oneOf(["and", "or"]).isRequired),
|
||
/**
|
||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||
*/
|
||
sx: import_prop_types43.default.oneOfType([import_prop_types43.default.arrayOf(import_prop_types43.default.oneOfType([import_prop_types43.default.func, import_prop_types43.default.object, import_prop_types43.default.bool])), import_prop_types43.default.func, import_prop_types43.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleValue.js
|
||
init_extends();
|
||
var React69 = __toESM(require_react());
|
||
var import_prop_types44 = __toESM(require_prop_types());
|
||
var import_jsx_runtime68 = __toESM(require_jsx_runtime());
|
||
var _excluded41 = ["item", "applyValue", "type", "apiRef", "focusElementRef", "color", "error", "helperText", "size", "variant"];
|
||
function GridFilterInputMultipleValue(props) {
|
||
const {
|
||
item,
|
||
applyValue,
|
||
type,
|
||
apiRef,
|
||
focusElementRef,
|
||
color,
|
||
error,
|
||
helperText,
|
||
size,
|
||
variant
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded41);
|
||
const TextFieldProps = {
|
||
color,
|
||
error,
|
||
helperText,
|
||
size,
|
||
variant
|
||
};
|
||
const [filterValueState, setFilterValueState] = React69.useState(item.value || []);
|
||
const id = useId();
|
||
const rootProps = useGridRootProps();
|
||
React69.useEffect(() => {
|
||
var _item$value;
|
||
const itemValue = (_item$value = item.value) != null ? _item$value : [];
|
||
setFilterValueState(itemValue.map(String));
|
||
}, [item.value]);
|
||
const handleChange = React69.useCallback((event, value) => {
|
||
setFilterValueState(value.map(String));
|
||
applyValue(_extends({}, item, {
|
||
value: [...value]
|
||
}));
|
||
}, [applyValue, item]);
|
||
return (0, import_jsx_runtime68.jsx)(Autocomplete_default, _extends({
|
||
multiple: true,
|
||
freeSolo: true,
|
||
options: [],
|
||
filterOptions: (options, params) => {
|
||
const {
|
||
inputValue
|
||
} = params;
|
||
return inputValue == null || inputValue === "" ? [] : [inputValue];
|
||
},
|
||
id,
|
||
value: filterValueState,
|
||
onChange: handleChange,
|
||
renderTags: (value, getTagProps) => value.map((option, index) => (0, import_jsx_runtime68.jsx)(rootProps.slots.baseChip, _extends({
|
||
variant: "outlined",
|
||
size: "small",
|
||
label: option
|
||
}, getTagProps({
|
||
index
|
||
})))),
|
||
renderInput: (params) => {
|
||
var _rootProps$slotProps;
|
||
return (0, import_jsx_runtime68.jsx)(rootProps.slots.baseTextField, _extends({}, params, {
|
||
label: apiRef.current.getLocaleText("filterPanelInputLabel"),
|
||
placeholder: apiRef.current.getLocaleText("filterPanelInputPlaceholder"),
|
||
InputLabelProps: _extends({}, params.InputLabelProps, {
|
||
shrink: true
|
||
}),
|
||
inputRef: focusElementRef,
|
||
type: type || "text"
|
||
}, TextFieldProps, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTextField));
|
||
}
|
||
}, other));
|
||
}
|
||
true ? GridFilterInputMultipleValue.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
apiRef: import_prop_types44.default.shape({
|
||
current: import_prop_types44.default.object.isRequired
|
||
}).isRequired,
|
||
applyValue: import_prop_types44.default.func.isRequired,
|
||
focusElementRef: import_prop_types44.default.oneOfType([import_prop_types44.default.func, import_prop_types44.default.object]),
|
||
item: import_prop_types44.default.shape({
|
||
field: import_prop_types44.default.string.isRequired,
|
||
id: import_prop_types44.default.oneOfType([import_prop_types44.default.number, import_prop_types44.default.string]),
|
||
operator: import_prop_types44.default.string.isRequired,
|
||
value: import_prop_types44.default.any
|
||
}).isRequired,
|
||
type: import_prop_types44.default.oneOf(["number", "text"])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js
|
||
init_extends();
|
||
var React70 = __toESM(require_react());
|
||
var import_prop_types45 = __toESM(require_prop_types());
|
||
var import_jsx_runtime69 = __toESM(require_jsx_runtime());
|
||
var _excluded42 = ["item", "applyValue", "type", "apiRef", "focusElementRef", "color", "error", "helperText", "size", "variant", "getOptionLabel", "getOptionValue"];
|
||
var filter = createFilterOptions();
|
||
function GridFilterInputMultipleSingleSelect(props) {
|
||
var _resolvedColumn, _resolvedColumn2;
|
||
const {
|
||
item,
|
||
applyValue,
|
||
apiRef,
|
||
focusElementRef,
|
||
color,
|
||
error,
|
||
helperText,
|
||
size,
|
||
variant = "standard",
|
||
getOptionLabel: getOptionLabelProp,
|
||
getOptionValue: getOptionValueProp
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded42);
|
||
const TextFieldProps = {
|
||
color,
|
||
error,
|
||
helperText,
|
||
size,
|
||
variant
|
||
};
|
||
const id = useId();
|
||
const rootProps = useGridRootProps();
|
||
let resolvedColumn = null;
|
||
if (item.field) {
|
||
const column = apiRef.current.getColumn(item.field);
|
||
if (isSingleSelectColDef(column)) {
|
||
resolvedColumn = column;
|
||
}
|
||
}
|
||
const getOptionValue = getOptionValueProp || ((_resolvedColumn = resolvedColumn) == null ? void 0 : _resolvedColumn.getOptionValue);
|
||
const getOptionLabel = getOptionLabelProp || ((_resolvedColumn2 = resolvedColumn) == null ? void 0 : _resolvedColumn2.getOptionLabel);
|
||
const isOptionEqualToValue = React70.useCallback((option, value) => getOptionValue(option) === getOptionValue(value), [getOptionValue]);
|
||
const resolvedValueOptions = React70.useMemo(() => {
|
||
var _resolvedColumn3;
|
||
if (!((_resolvedColumn3 = resolvedColumn) != null && _resolvedColumn3.valueOptions)) {
|
||
return [];
|
||
}
|
||
if (typeof resolvedColumn.valueOptions === "function") {
|
||
return resolvedColumn.valueOptions({
|
||
field: resolvedColumn.field
|
||
});
|
||
}
|
||
return resolvedColumn.valueOptions;
|
||
}, [resolvedColumn]);
|
||
const resolvedFormattedValueOptions = React70.useMemo(() => {
|
||
return resolvedValueOptions == null ? void 0 : resolvedValueOptions.map(getOptionValue);
|
||
}, [resolvedValueOptions, getOptionValue]);
|
||
const filteredValues = React70.useMemo(() => {
|
||
if (!Array.isArray(item.value)) {
|
||
return [];
|
||
}
|
||
if (resolvedValueOptions !== void 0) {
|
||
const itemValueIndexes = item.value.map((element) => {
|
||
return resolvedFormattedValueOptions == null ? void 0 : resolvedFormattedValueOptions.findIndex((formattedOption) => formattedOption === element);
|
||
});
|
||
return itemValueIndexes.filter((index) => index >= 0).map((index) => resolvedValueOptions[index]);
|
||
}
|
||
return item.value;
|
||
}, [item.value, resolvedValueOptions, resolvedFormattedValueOptions]);
|
||
React70.useEffect(() => {
|
||
if (!Array.isArray(item.value) || filteredValues.length !== item.value.length) {
|
||
applyValue(_extends({}, item, {
|
||
value: filteredValues.map(getOptionValue)
|
||
}));
|
||
}
|
||
}, [item, filteredValues, applyValue, getOptionValue]);
|
||
const handleChange = React70.useCallback((event, value) => {
|
||
applyValue(_extends({}, item, {
|
||
value: value.map(getOptionValue)
|
||
}));
|
||
}, [applyValue, item, getOptionValue]);
|
||
return (0, import_jsx_runtime69.jsx)(Autocomplete_default, _extends({
|
||
multiple: true,
|
||
options: resolvedValueOptions,
|
||
isOptionEqualToValue,
|
||
filterOptions: filter,
|
||
id,
|
||
value: filteredValues,
|
||
onChange: handleChange,
|
||
getOptionLabel,
|
||
renderTags: (value, getTagProps) => value.map((option, index) => (0, import_jsx_runtime69.jsx)(rootProps.slots.baseChip, _extends({
|
||
variant: "outlined",
|
||
size: "small",
|
||
label: getOptionLabel(option)
|
||
}, getTagProps({
|
||
index
|
||
})))),
|
||
renderInput: (params) => {
|
||
var _rootProps$slotProps;
|
||
return (0, import_jsx_runtime69.jsx)(rootProps.slots.baseTextField, _extends({}, params, {
|
||
label: apiRef.current.getLocaleText("filterPanelInputLabel"),
|
||
placeholder: apiRef.current.getLocaleText("filterPanelInputPlaceholder"),
|
||
InputLabelProps: _extends({}, params.InputLabelProps, {
|
||
shrink: true
|
||
}),
|
||
inputRef: focusElementRef,
|
||
type: "singleSelect"
|
||
}, TextFieldProps, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTextField));
|
||
}
|
||
}, other));
|
||
}
|
||
true ? GridFilterInputMultipleSingleSelect.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
apiRef: import_prop_types45.default.shape({
|
||
current: import_prop_types45.default.object.isRequired
|
||
}).isRequired,
|
||
applyValue: import_prop_types45.default.func.isRequired,
|
||
focusElementRef: import_prop_types45.default.oneOfType([import_prop_types45.default.func, import_prop_types45.default.object]),
|
||
/**
|
||
* Used to determine the label displayed for a given value option.
|
||
* @param {ValueOptions} value The current value option.
|
||
* @returns {string} The text to be displayed.
|
||
*/
|
||
getOptionLabel: import_prop_types45.default.func,
|
||
/**
|
||
* Used to determine the value used for a value option.
|
||
* @param {ValueOptions} value The current value option.
|
||
* @returns {string} The value to be used.
|
||
*/
|
||
getOptionValue: import_prop_types45.default.func,
|
||
item: import_prop_types45.default.shape({
|
||
field: import_prop_types45.default.string.isRequired,
|
||
id: import_prop_types45.default.oneOfType([import_prop_types45.default.number, import_prop_types45.default.string]),
|
||
operator: import_prop_types45.default.string.isRequired,
|
||
value: import_prop_types45.default.any
|
||
}).isRequired,
|
||
type: import_prop_types45.default.oneOf(["singleSelect"])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/toolbar/GridToolbar.js
|
||
init_extends();
|
||
var React77 = __toESM(require_react());
|
||
var import_prop_types49 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/toolbar/GridToolbarColumnsButton.js
|
||
init_extends();
|
||
var React71 = __toESM(require_react());
|
||
var import_jsx_runtime70 = __toESM(require_jsx_runtime());
|
||
var _excluded43 = ["onClick"];
|
||
var GridToolbarColumnsButton = React71.forwardRef(function GridToolbarColumnsButton2(props, ref) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
onClick
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded43);
|
||
const columnButtonId = useId_default();
|
||
const columnPanelId = useId_default();
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
||
const showColumns = (event) => {
|
||
if (preferencePanel.open && preferencePanel.openedPanelValue === GridPreferencePanelsValue.columns) {
|
||
apiRef.current.hidePreferences();
|
||
} else {
|
||
apiRef.current.showPreferences(GridPreferencePanelsValue.columns, columnPanelId, columnButtonId);
|
||
}
|
||
onClick == null || onClick(event);
|
||
};
|
||
if (rootProps.disableColumnSelector) {
|
||
return null;
|
||
}
|
||
const isOpen = preferencePanel.open && preferencePanel.panelId === columnPanelId;
|
||
return (0, import_jsx_runtime70.jsx)(rootProps.slots.baseButton, _extends({
|
||
ref,
|
||
id: columnButtonId,
|
||
size: "small",
|
||
"aria-label": apiRef.current.getLocaleText("toolbarColumnsLabel"),
|
||
"aria-haspopup": "menu",
|
||
"aria-expanded": isOpen,
|
||
"aria-controls": isOpen ? columnPanelId : void 0,
|
||
startIcon: (0, import_jsx_runtime70.jsx)(rootProps.slots.columnSelectorIcon, {})
|
||
}, other, {
|
||
onClick: showColumns
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseButton, {
|
||
children: apiRef.current.getLocaleText("toolbarColumns")
|
||
}));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/toolbar/GridToolbarDensitySelector.js
|
||
init_extends();
|
||
var React72 = __toESM(require_react());
|
||
var import_jsx_runtime71 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime72 = __toESM(require_jsx_runtime());
|
||
var _excluded44 = ["onClick"];
|
||
var GridToolbarDensitySelector = React72.forwardRef(function GridToolbarDensitySelector2(props, ref) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
onClick
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded44);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const densityValue = useGridSelector(apiRef, gridDensityValueSelector);
|
||
const densityButtonId = useId();
|
||
const densityMenuId = useId();
|
||
const [open, setOpen] = React72.useState(false);
|
||
const buttonRef = React72.useRef(null);
|
||
const handleRef = useForkRef(ref, buttonRef);
|
||
const densityOptions = [{
|
||
icon: (0, import_jsx_runtime71.jsx)(rootProps.slots.densityCompactIcon, {}),
|
||
label: apiRef.current.getLocaleText("toolbarDensityCompact"),
|
||
value: "compact"
|
||
}, {
|
||
icon: (0, import_jsx_runtime71.jsx)(rootProps.slots.densityStandardIcon, {}),
|
||
label: apiRef.current.getLocaleText("toolbarDensityStandard"),
|
||
value: "standard"
|
||
}, {
|
||
icon: (0, import_jsx_runtime71.jsx)(rootProps.slots.densityComfortableIcon, {}),
|
||
label: apiRef.current.getLocaleText("toolbarDensityComfortable"),
|
||
value: "comfortable"
|
||
}];
|
||
const startIcon = React72.useMemo(() => {
|
||
switch (densityValue) {
|
||
case "compact":
|
||
return (0, import_jsx_runtime71.jsx)(rootProps.slots.densityCompactIcon, {});
|
||
case "comfortable":
|
||
return (0, import_jsx_runtime71.jsx)(rootProps.slots.densityComfortableIcon, {});
|
||
default:
|
||
return (0, import_jsx_runtime71.jsx)(rootProps.slots.densityStandardIcon, {});
|
||
}
|
||
}, [densityValue, rootProps]);
|
||
const handleDensitySelectorOpen = (event) => {
|
||
setOpen((prevOpen) => !prevOpen);
|
||
onClick == null || onClick(event);
|
||
};
|
||
const handleDensitySelectorClose = () => {
|
||
setOpen(false);
|
||
};
|
||
const handleDensityUpdate = (newDensity) => {
|
||
apiRef.current.setDensity(newDensity);
|
||
setOpen(false);
|
||
};
|
||
const handleListKeyDown = (event) => {
|
||
if (isTabKey(event.key)) {
|
||
event.preventDefault();
|
||
}
|
||
if (isHideMenuKey(event.key)) {
|
||
setOpen(false);
|
||
}
|
||
};
|
||
if (rootProps.disableDensitySelector) {
|
||
return null;
|
||
}
|
||
const densityElements = densityOptions.map((option, index) => (0, import_jsx_runtime72.jsxs)(MenuItem_default, {
|
||
onClick: () => handleDensityUpdate(option.value),
|
||
selected: option.value === densityValue,
|
||
children: [(0, import_jsx_runtime71.jsx)(ListItemIcon_default, {
|
||
children: option.icon
|
||
}), option.label]
|
||
}, index));
|
||
return (0, import_jsx_runtime72.jsxs)(React72.Fragment, {
|
||
children: [(0, import_jsx_runtime71.jsx)(rootProps.slots.baseButton, _extends({
|
||
ref: handleRef,
|
||
size: "small",
|
||
startIcon,
|
||
"aria-label": apiRef.current.getLocaleText("toolbarDensityLabel"),
|
||
"aria-haspopup": "menu",
|
||
"aria-expanded": open,
|
||
"aria-controls": open ? densityMenuId : void 0,
|
||
id: densityButtonId
|
||
}, other, {
|
||
onClick: handleDensitySelectorOpen
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseButton, {
|
||
children: apiRef.current.getLocaleText("toolbarDensity")
|
||
})), (0, import_jsx_runtime71.jsx)(GridMenu, {
|
||
open,
|
||
target: buttonRef.current,
|
||
onClose: handleDensitySelectorClose,
|
||
position: "bottom-start",
|
||
children: (0, import_jsx_runtime71.jsx)(MenuList_default, {
|
||
id: densityMenuId,
|
||
className: gridClasses.menuList,
|
||
"aria-labelledby": densityButtonId,
|
||
onKeyDown: handleListKeyDown,
|
||
autoFocusItem: open,
|
||
children: densityElements
|
||
})
|
||
})]
|
||
});
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/toolbar/GridToolbarFilterButton.js
|
||
init_extends();
|
||
var React73 = __toESM(require_react());
|
||
var import_prop_types46 = __toESM(require_prop_types());
|
||
var import_jsx_runtime73 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime74 = __toESM(require_jsx_runtime());
|
||
var _excluded45 = ["componentsProps"];
|
||
var useUtilityClasses29 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["toolbarFilterList"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridToolbarFilterListRoot = styled_default2("ul", {
|
||
name: "MuiDataGrid",
|
||
slot: "ToolbarFilterList",
|
||
overridesResolver: (_props, styles) => styles.toolbarFilterList
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
margin: theme.spacing(1, 1, 0.5),
|
||
padding: theme.spacing(0, 1)
|
||
}));
|
||
var GridToolbarFilterButton = React73.forwardRef(function GridToolbarFilterButton2(props, ref) {
|
||
var _rootProps$slotProps, _rootProps$slotProps2;
|
||
const {
|
||
componentsProps = {}
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded45);
|
||
const buttonProps = componentsProps.button || {};
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const activeFilters = useGridSelector(apiRef, gridFilterActiveItemsSelector);
|
||
const lookup = useGridSelector(apiRef, gridColumnLookupSelector);
|
||
const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
||
const classes = useUtilityClasses29(rootProps);
|
||
const filterButtonId = useId();
|
||
const filterPanelId = useId();
|
||
const tooltipContentNode = React73.useMemo(() => {
|
||
if (preferencePanel.open) {
|
||
return apiRef.current.getLocaleText("toolbarFiltersTooltipHide");
|
||
}
|
||
if (activeFilters.length === 0) {
|
||
return apiRef.current.getLocaleText("toolbarFiltersTooltipShow");
|
||
}
|
||
const getOperatorLabel = (item) => lookup[item.field].filterOperators.find((operator) => operator.value === item.operator).label || apiRef.current.getLocaleText(`filterOperator${capitalize(item.operator)}`).toString();
|
||
const getFilterItemValue = (item) => {
|
||
const {
|
||
getValueAsString
|
||
} = lookup[item.field].filterOperators.find((operator) => operator.value === item.operator);
|
||
return getValueAsString ? getValueAsString(item.value) : item.value;
|
||
};
|
||
return (0, import_jsx_runtime74.jsxs)("div", {
|
||
children: [apiRef.current.getLocaleText("toolbarFiltersTooltipActive")(activeFilters.length), (0, import_jsx_runtime73.jsx)(GridToolbarFilterListRoot, {
|
||
className: classes.root,
|
||
ownerState: rootProps,
|
||
children: activeFilters.map((item, index) => _extends({}, lookup[item.field] && (0, import_jsx_runtime73.jsx)("li", {
|
||
children: `${lookup[item.field].headerName || item.field}
|
||
${getOperatorLabel(item)}
|
||
${// implicit check for null and undefined
|
||
item.value != null ? getFilterItemValue(item) : ""}`
|
||
}, index)))
|
||
})]
|
||
});
|
||
}, [apiRef, rootProps, preferencePanel.open, activeFilters, lookup, classes]);
|
||
const toggleFilter = (event) => {
|
||
var _buttonProps$onClick;
|
||
const {
|
||
open,
|
||
openedPanelValue
|
||
} = preferencePanel;
|
||
if (open && openedPanelValue === GridPreferencePanelsValue.filters) {
|
||
apiRef.current.hidePreferences();
|
||
} else {
|
||
apiRef.current.showPreferences(GridPreferencePanelsValue.filters, filterPanelId, filterButtonId);
|
||
}
|
||
(_buttonProps$onClick = buttonProps.onClick) == null || _buttonProps$onClick.call(buttonProps, event);
|
||
};
|
||
if (rootProps.disableColumnFilter) {
|
||
return null;
|
||
}
|
||
const isOpen = preferencePanel.open && preferencePanel.panelId === filterPanelId;
|
||
return (0, import_jsx_runtime73.jsx)(rootProps.slots.baseTooltip, _extends({
|
||
title: tooltipContentNode,
|
||
enterDelay: 1e3
|
||
}, other, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTooltip, {
|
||
children: (0, import_jsx_runtime73.jsx)(rootProps.slots.baseButton, _extends({
|
||
ref,
|
||
id: filterButtonId,
|
||
size: "small",
|
||
"aria-label": apiRef.current.getLocaleText("toolbarFiltersLabel"),
|
||
"aria-controls": isOpen ? filterPanelId : void 0,
|
||
"aria-expanded": isOpen,
|
||
"aria-haspopup": true,
|
||
startIcon: (0, import_jsx_runtime73.jsx)(Badge_default, {
|
||
badgeContent: activeFilters.length,
|
||
color: "primary",
|
||
children: (0, import_jsx_runtime73.jsx)(rootProps.slots.openFilterButtonIcon, {})
|
||
})
|
||
}, buttonProps, {
|
||
onClick: toggleFilter
|
||
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseButton, {
|
||
children: apiRef.current.getLocaleText("toolbarFilters")
|
||
}))
|
||
}));
|
||
});
|
||
true ? GridToolbarFilterButton.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* The props used for each slot inside.
|
||
* @default {}
|
||
*/
|
||
componentsProps: import_prop_types46.default.object
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/toolbar/GridToolbarExport.js
|
||
init_extends();
|
||
var React75 = __toESM(require_react());
|
||
var import_prop_types47 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/toolbar/GridToolbarExportContainer.js
|
||
init_extends();
|
||
var React74 = __toESM(require_react());
|
||
var import_jsx_runtime75 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime76 = __toESM(require_jsx_runtime());
|
||
var _excluded46 = ["children", "onClick"];
|
||
var GridToolbarExportContainer = React74.forwardRef(function GridToolbarExportContainer2(props, ref) {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
children,
|
||
onClick
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded46);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const exportButtonId = useId();
|
||
const exportMenuId = useId();
|
||
const [open, setOpen] = React74.useState(false);
|
||
const buttonRef = React74.useRef(null);
|
||
const handleRef = useForkRef(ref, buttonRef);
|
||
const handleMenuOpen = (event) => {
|
||
setOpen((prevOpen) => !prevOpen);
|
||
onClick == null || onClick(event);
|
||
};
|
||
const handleMenuClose = () => setOpen(false);
|
||
const handleListKeyDown = (event) => {
|
||
if (isTabKey(event.key)) {
|
||
event.preventDefault();
|
||
}
|
||
if (isHideMenuKey(event.key)) {
|
||
handleMenuClose();
|
||
}
|
||
};
|
||
if (children == null) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime76.jsxs)(React74.Fragment, {
|
||
children: [(0, import_jsx_runtime75.jsx)(rootProps.slots.baseButton, _extends({
|
||
ref: handleRef,
|
||
size: "small",
|
||
startIcon: (0, import_jsx_runtime75.jsx)(rootProps.slots.exportIcon, {}),
|
||
"aria-expanded": open,
|
||
"aria-label": apiRef.current.getLocaleText("toolbarExportLabel"),
|
||
"aria-haspopup": "menu",
|
||
"aria-controls": open ? exportMenuId : void 0,
|
||
id: exportButtonId
|
||
}, other, {
|
||
onClick: handleMenuOpen
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseButton, {
|
||
children: apiRef.current.getLocaleText("toolbarExport")
|
||
})), (0, import_jsx_runtime75.jsx)(GridMenu, {
|
||
open,
|
||
target: buttonRef.current,
|
||
onClose: handleMenuClose,
|
||
position: "bottom-start",
|
||
children: (0, import_jsx_runtime75.jsx)(MenuList_default, {
|
||
id: exportMenuId,
|
||
className: gridClasses.menuList,
|
||
"aria-labelledby": exportButtonId,
|
||
onKeyDown: handleListKeyDown,
|
||
autoFocusItem: open,
|
||
children: React74.Children.map(children, (child) => {
|
||
if (!React74.isValidElement(child)) {
|
||
return child;
|
||
}
|
||
return React74.cloneElement(child, {
|
||
hideMenu: handleMenuClose
|
||
});
|
||
})
|
||
})
|
||
})]
|
||
});
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/toolbar/GridToolbarExport.js
|
||
var import_jsx_runtime77 = __toESM(require_jsx_runtime());
|
||
var _excluded47 = ["hideMenu", "options"];
|
||
var _excluded211 = ["hideMenu", "options"];
|
||
var _excluded310 = ["csvOptions", "printOptions", "excelOptions"];
|
||
function GridCsvExportMenuItem(props) {
|
||
const apiRef = useGridApiContext();
|
||
const {
|
||
hideMenu,
|
||
options
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded47);
|
||
return (0, import_jsx_runtime77.jsx)(MenuItem_default, _extends({
|
||
onClick: () => {
|
||
apiRef.current.exportDataAsCsv(options);
|
||
hideMenu == null || hideMenu();
|
||
}
|
||
}, other, {
|
||
children: apiRef.current.getLocaleText("toolbarExportCSV")
|
||
}));
|
||
}
|
||
function GridPrintExportMenuItem(props) {
|
||
const apiRef = useGridApiContext();
|
||
const {
|
||
hideMenu,
|
||
options
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded211);
|
||
return (0, import_jsx_runtime77.jsx)(MenuItem_default, _extends({
|
||
onClick: () => {
|
||
apiRef.current.exportDataAsPrint(options);
|
||
hideMenu == null || hideMenu();
|
||
}
|
||
}, other, {
|
||
children: apiRef.current.getLocaleText("toolbarExportPrint")
|
||
}));
|
||
}
|
||
var GridToolbarExport = React75.forwardRef(function GridToolbarExport2(props, ref) {
|
||
const {
|
||
csvOptions = {},
|
||
printOptions = {},
|
||
excelOptions
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded310);
|
||
const apiRef = useGridApiContext();
|
||
const preProcessedButtons = apiRef.current.unstable_applyPipeProcessors("exportMenu", [], {
|
||
excelOptions,
|
||
csvOptions,
|
||
printOptions
|
||
}).sort((a, b) => a.componentName > b.componentName ? 1 : -1);
|
||
if (preProcessedButtons.length === 0) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime77.jsx)(GridToolbarExportContainer, _extends({}, other, {
|
||
ref,
|
||
children: preProcessedButtons.map((button, index) => React75.cloneElement(button.component, {
|
||
key: index
|
||
}))
|
||
}));
|
||
});
|
||
true ? GridToolbarExport.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
csvOptions: import_prop_types47.default.object,
|
||
printOptions: import_prop_types47.default.object
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/toolbar/GridToolbarQuickFilter.js
|
||
init_extends();
|
||
var React76 = __toESM(require_react());
|
||
var import_prop_types48 = __toESM(require_prop_types());
|
||
var import_jsx_runtime78 = __toESM(require_jsx_runtime());
|
||
var _excluded48 = ["quickFilterParser", "quickFilterFormatter", "debounceMs"];
|
||
var GridToolbarQuickFilterRoot = styled_default2(TextField_default, {
|
||
name: "MuiDataGrid",
|
||
slot: "ToolbarQuickFilter",
|
||
overridesResolver: (props, styles) => styles.toolbarQuickFilter
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
width: "auto",
|
||
paddingBottom: theme.spacing(0.5),
|
||
"& input": {
|
||
marginLeft: theme.spacing(0.5)
|
||
},
|
||
"& .MuiInput-underline:before": {
|
||
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
|
||
},
|
||
[`& input[type=search]::-ms-clear,
|
||
& input[type=search]::-ms-reveal`]: {
|
||
/* clears the 'X' icon from IE */
|
||
display: "none",
|
||
width: 0,
|
||
height: 0
|
||
},
|
||
[`& input[type="search"]::-webkit-search-decoration,
|
||
& input[type="search"]::-webkit-search-cancel-button,
|
||
& input[type="search"]::-webkit-search-results-button,
|
||
& input[type="search"]::-webkit-search-results-decoration`]: {
|
||
/* clears the 'X' icon from Chrome */
|
||
display: "none"
|
||
}
|
||
}));
|
||
var defaultSearchValueParser = (searchText) => searchText.split(" ").filter((word) => word !== "");
|
||
var defaultSearchValueFormatter = (values) => values.join(" ");
|
||
function GridToolbarQuickFilter(props) {
|
||
var _rootProps$slotProps, _rootProps$slotProps2;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const quickFilterValues = useGridSelector(apiRef, gridQuickFilterValuesSelector);
|
||
const {
|
||
quickFilterParser = defaultSearchValueParser,
|
||
quickFilterFormatter = defaultSearchValueFormatter,
|
||
debounceMs = rootProps.filterDebounceMs
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded48);
|
||
const [searchValue, setSearchValue] = React76.useState(() => quickFilterFormatter(quickFilterValues != null ? quickFilterValues : []));
|
||
const prevQuickFilterValuesRef = React76.useRef(quickFilterValues);
|
||
React76.useEffect(() => {
|
||
if (!isDeepEqual(prevQuickFilterValuesRef.current, quickFilterValues)) {
|
||
prevQuickFilterValuesRef.current = quickFilterValues;
|
||
setSearchValue((prevSearchValue) => isDeepEqual(quickFilterParser(prevSearchValue), quickFilterValues) ? prevSearchValue : quickFilterFormatter(quickFilterValues != null ? quickFilterValues : []));
|
||
}
|
||
}, [quickFilterValues, quickFilterFormatter, quickFilterParser]);
|
||
const updateSearchValue = React76.useCallback((newSearchValue) => {
|
||
const newQuickFilterValues = quickFilterParser(newSearchValue);
|
||
prevQuickFilterValuesRef.current = newQuickFilterValues;
|
||
apiRef.current.setQuickFilterValues(newQuickFilterValues);
|
||
}, [apiRef, quickFilterParser]);
|
||
const debouncedUpdateSearchValue = React76.useMemo(() => debounce(updateSearchValue, debounceMs), [updateSearchValue, debounceMs]);
|
||
const handleSearchValueChange = React76.useCallback((event) => {
|
||
const newSearchValue = event.target.value;
|
||
setSearchValue(newSearchValue);
|
||
debouncedUpdateSearchValue(newSearchValue);
|
||
}, [debouncedUpdateSearchValue]);
|
||
const handleSearchReset = React76.useCallback(() => {
|
||
setSearchValue("");
|
||
updateSearchValue("");
|
||
}, [updateSearchValue]);
|
||
return (0, import_jsx_runtime78.jsx)(GridToolbarQuickFilterRoot, _extends({
|
||
as: rootProps.slots.baseTextField,
|
||
ownerState: rootProps,
|
||
variant: "standard",
|
||
value: searchValue,
|
||
onChange: handleSearchValueChange,
|
||
placeholder: apiRef.current.getLocaleText("toolbarQuickFilterPlaceholder"),
|
||
"aria-label": apiRef.current.getLocaleText("toolbarQuickFilterLabel"),
|
||
type: "search"
|
||
}, other, {
|
||
InputProps: _extends({
|
||
startAdornment: (0, import_jsx_runtime78.jsx)(rootProps.slots.quickFilterIcon, {
|
||
fontSize: "small"
|
||
}),
|
||
endAdornment: (0, import_jsx_runtime78.jsx)(rootProps.slots.baseIconButton, _extends({
|
||
"aria-label": apiRef.current.getLocaleText("toolbarQuickFilterDeleteIconLabel"),
|
||
size: "small",
|
||
sx: {
|
||
visibility: searchValue ? "visible" : "hidden"
|
||
},
|
||
onClick: handleSearchReset
|
||
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseIconButton, {
|
||
children: (0, import_jsx_runtime78.jsx)(rootProps.slots.quickFilterClearIcon, {
|
||
fontSize: "small"
|
||
})
|
||
}))
|
||
}, other.InputProps)
|
||
}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseTextField));
|
||
}
|
||
true ? GridToolbarQuickFilter.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* The debounce time in milliseconds.
|
||
* @default 150
|
||
*/
|
||
debounceMs: import_prop_types48.default.number,
|
||
/**
|
||
* Function responsible for formatting values of quick filter in a string when the model is modified
|
||
* @param {any[]} values The new values passed to the quick filter model
|
||
* @returns {string} The string to display in the text field
|
||
* @default (values: string[]) => values.join(' ')
|
||
*/
|
||
quickFilterFormatter: import_prop_types48.default.func,
|
||
/**
|
||
* Function responsible for parsing text input in an array of independent values for quick filtering.
|
||
* @param {string} input The value entered by the user
|
||
* @returns {any[]} The array of value on which quick filter is applied
|
||
* @default (searchText: string) => searchText
|
||
* .split(' ')
|
||
* .filter((word) => word !== '')
|
||
*/
|
||
quickFilterParser: import_prop_types48.default.func
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/toolbar/GridToolbar.js
|
||
var import_jsx_runtime79 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime80 = __toESM(require_jsx_runtime());
|
||
var _excluded49 = ["className", "csvOptions", "printOptions", "excelOptions", "showQuickFilter", "quickFilterProps"];
|
||
var GridToolbar = React77.forwardRef(function GridToolbar2(props, ref) {
|
||
const {
|
||
csvOptions,
|
||
printOptions,
|
||
excelOptions,
|
||
showQuickFilter = false,
|
||
quickFilterProps = {}
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded49);
|
||
const rootProps = useGridRootProps();
|
||
if (rootProps.disableColumnFilter && rootProps.disableColumnSelector && rootProps.disableDensitySelector && !showQuickFilter) {
|
||
return null;
|
||
}
|
||
return (0, import_jsx_runtime80.jsxs)(GridToolbarContainer, _extends({
|
||
ref
|
||
}, other, {
|
||
children: [(0, import_jsx_runtime79.jsx)(GridToolbarColumnsButton, {}), (0, import_jsx_runtime79.jsx)(GridToolbarFilterButton, {}), (0, import_jsx_runtime79.jsx)(GridToolbarDensitySelector, {}), (0, import_jsx_runtime79.jsx)(GridToolbarExport, {
|
||
csvOptions,
|
||
printOptions,
|
||
excelOptions
|
||
}), (0, import_jsx_runtime79.jsx)(Box_default, {
|
||
sx: {
|
||
flex: 1
|
||
}
|
||
}), showQuickFilter && (0, import_jsx_runtime79.jsx)(GridToolbarQuickFilter, _extends({}, quickFilterProps))]
|
||
}));
|
||
});
|
||
true ? GridToolbar.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* Props passed to the quick filter component.
|
||
*/
|
||
quickFilterProps: import_prop_types49.default.object,
|
||
/**
|
||
* Show the quick filter component.
|
||
* @default false
|
||
*/
|
||
showQuickFilter: import_prop_types49.default.bool,
|
||
sx: import_prop_types49.default.oneOfType([import_prop_types49.default.arrayOf(import_prop_types49.default.oneOfType([import_prop_types49.default.func, import_prop_types49.default.object, import_prop_types49.default.bool])), import_prop_types49.default.func, import_prop_types49.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridFooter.js
|
||
init_extends();
|
||
var React79 = __toESM(require_react());
|
||
var import_prop_types51 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridSelectedRowCount.js
|
||
init_extends();
|
||
var React78 = __toESM(require_react());
|
||
var import_prop_types50 = __toESM(require_prop_types());
|
||
var import_jsx_runtime81 = __toESM(require_jsx_runtime());
|
||
var _excluded50 = ["className", "selectedRowCount"];
|
||
var useUtilityClasses30 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["selectedRowCount"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridSelectedRowCountRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "SelectedRowCount",
|
||
overridesResolver: (props, styles) => styles.selectedRowCount
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
alignItems: "center",
|
||
display: "flex",
|
||
margin: theme.spacing(0, 2),
|
||
visibility: "hidden",
|
||
width: 0,
|
||
height: 0,
|
||
[theme.breakpoints.up("sm")]: {
|
||
visibility: "visible",
|
||
width: "auto",
|
||
height: "auto"
|
||
}
|
||
}));
|
||
var GridSelectedRowCount = React78.forwardRef(function GridSelectedRowCount2(props, ref) {
|
||
const {
|
||
className,
|
||
selectedRowCount
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded50);
|
||
const apiRef = useGridApiContext();
|
||
const ownerState = useGridRootProps();
|
||
const classes = useUtilityClasses30(ownerState);
|
||
const rowSelectedText = apiRef.current.getLocaleText("footerRowSelected")(selectedRowCount);
|
||
return (0, import_jsx_runtime81.jsx)(GridSelectedRowCountRoot, _extends({
|
||
ref,
|
||
className: clsx_default(classes.root, className),
|
||
ownerState
|
||
}, other, {
|
||
children: rowSelectedText
|
||
}));
|
||
});
|
||
true ? GridSelectedRowCount.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
selectedRowCount: import_prop_types50.default.number.isRequired,
|
||
sx: import_prop_types50.default.oneOfType([import_prop_types50.default.arrayOf(import_prop_types50.default.oneOfType([import_prop_types50.default.func, import_prop_types50.default.object, import_prop_types50.default.bool])), import_prop_types50.default.func, import_prop_types50.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridFooter.js
|
||
var import_jsx_runtime82 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime83 = __toESM(require_jsx_runtime());
|
||
var GridFooter = React79.forwardRef(function GridFooter2(props, ref) {
|
||
var _rootProps$slotProps, _rootProps$slotProps2;
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const totalTopLevelRowCount = useGridSelector(apiRef, gridTopLevelRowCountSelector);
|
||
const selectedRowCount = useGridSelector(apiRef, selectedGridRowsCountSelector);
|
||
const visibleTopLevelRowCount = useGridSelector(apiRef, gridFilteredTopLevelRowCountSelector);
|
||
const selectedRowCountElement = !rootProps.hideFooterSelectedRowCount && selectedRowCount > 0 ? (0, import_jsx_runtime82.jsx)(GridSelectedRowCount, {
|
||
selectedRowCount
|
||
}) : (0, import_jsx_runtime82.jsx)("div", {});
|
||
const rowCountElement = !rootProps.hideFooterRowCount && !rootProps.pagination ? (0, import_jsx_runtime82.jsx)(rootProps.slots.footerRowCount, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.footerRowCount, {
|
||
rowCount: totalTopLevelRowCount,
|
||
visibleRowCount: visibleTopLevelRowCount
|
||
})) : null;
|
||
const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && (0, import_jsx_runtime82.jsx)(rootProps.slots.pagination, _extends({}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.pagination));
|
||
return (0, import_jsx_runtime83.jsxs)(GridFooterContainer, _extends({
|
||
ref
|
||
}, props, {
|
||
children: [selectedRowCountElement, rowCountElement, paginationElement]
|
||
}));
|
||
});
|
||
true ? GridFooter.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
sx: import_prop_types51.default.oneOfType([import_prop_types51.default.arrayOf(import_prop_types51.default.oneOfType([import_prop_types51.default.func, import_prop_types51.default.object, import_prop_types51.default.bool])), import_prop_types51.default.func, import_prop_types51.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridHeader.js
|
||
init_extends();
|
||
var React80 = __toESM(require_react());
|
||
var import_jsx_runtime84 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime85 = __toESM(require_jsx_runtime());
|
||
function GridHeader() {
|
||
var _rootProps$slotProps, _rootProps$slotProps2;
|
||
const rootProps = useGridRootProps();
|
||
return (0, import_jsx_runtime85.jsxs)(React80.Fragment, {
|
||
children: [(0, import_jsx_runtime84.jsx)(rootProps.slots.preferencesPanel, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.preferencesPanel)), rootProps.slots.toolbar && (0, import_jsx_runtime84.jsx)(rootProps.slots.toolbar, _extends({}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.toolbar))]
|
||
});
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridLoadingOverlay.js
|
||
init_extends();
|
||
var React81 = __toESM(require_react());
|
||
var import_prop_types52 = __toESM(require_prop_types());
|
||
var import_jsx_runtime86 = __toESM(require_jsx_runtime());
|
||
var GridLoadingOverlay = React81.forwardRef(function GridLoadingOverlay2(props, ref) {
|
||
return (0, import_jsx_runtime86.jsx)(GridOverlay, _extends({
|
||
ref
|
||
}, props, {
|
||
children: (0, import_jsx_runtime86.jsx)(CircularProgress_default, {})
|
||
}));
|
||
});
|
||
true ? GridLoadingOverlay.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
sx: import_prop_types52.default.oneOfType([import_prop_types52.default.arrayOf(import_prop_types52.default.oneOfType([import_prop_types52.default.func, import_prop_types52.default.object, import_prop_types52.default.bool])), import_prop_types52.default.func, import_prop_types52.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridNoRowsOverlay.js
|
||
init_extends();
|
||
var React82 = __toESM(require_react());
|
||
var import_prop_types53 = __toESM(require_prop_types());
|
||
var import_jsx_runtime87 = __toESM(require_jsx_runtime());
|
||
var GridNoRowsOverlay = React82.forwardRef(function GridNoRowsOverlay2(props, ref) {
|
||
const apiRef = useGridApiContext();
|
||
const noRowsLabel = apiRef.current.getLocaleText("noRowsLabel");
|
||
return (0, import_jsx_runtime87.jsx)(GridOverlay, _extends({
|
||
ref
|
||
}, props, {
|
||
children: noRowsLabel
|
||
}));
|
||
});
|
||
true ? GridNoRowsOverlay.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
sx: import_prop_types53.default.oneOfType([import_prop_types53.default.arrayOf(import_prop_types53.default.oneOfType([import_prop_types53.default.func, import_prop_types53.default.object, import_prop_types53.default.bool])), import_prop_types53.default.func, import_prop_types53.default.object])
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridPagination.js
|
||
init_extends();
|
||
var React83 = __toESM(require_react());
|
||
var import_prop_types54 = __toESM(require_prop_types());
|
||
var import_jsx_runtime88 = __toESM(require_jsx_runtime());
|
||
var GridPaginationRoot = styled_default2(TablePagination_default)(({
|
||
theme
|
||
}) => ({
|
||
[`& .${tablePaginationClasses_default.selectLabel}`]: {
|
||
display: "none",
|
||
[theme.breakpoints.up("sm")]: {
|
||
display: "block"
|
||
}
|
||
},
|
||
[`& .${tablePaginationClasses_default.input}`]: {
|
||
display: "none",
|
||
[theme.breakpoints.up("sm")]: {
|
||
display: "inline-flex"
|
||
}
|
||
}
|
||
}));
|
||
var GridPagination = React83.forwardRef(function GridPagination2(props, ref) {
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const paginationModel = useGridSelector(apiRef, gridPaginationModelSelector);
|
||
const rowCount = useGridSelector(apiRef, gridPaginationRowCountSelector);
|
||
const lastPage = React83.useMemo(() => Math.floor(rowCount / (paginationModel.pageSize || 1)), [rowCount, paginationModel.pageSize]);
|
||
const handlePageSizeChange = React83.useCallback((event) => {
|
||
const pageSize = Number(event.target.value);
|
||
apiRef.current.setPageSize(pageSize);
|
||
}, [apiRef]);
|
||
const handlePageChange = React83.useCallback((_, page) => {
|
||
apiRef.current.setPage(page);
|
||
}, [apiRef]);
|
||
const isPageSizeIncludedInPageSizeOptions = (pageSize) => {
|
||
for (let i = 0; i < rootProps.pageSizeOptions.length; i += 1) {
|
||
const option = rootProps.pageSizeOptions[i];
|
||
if (typeof option === "number") {
|
||
if (option === pageSize) {
|
||
return true;
|
||
}
|
||
} else if (option.value === pageSize) {
|
||
return true;
|
||
}
|
||
}
|
||
return false;
|
||
};
|
||
if (true) {
|
||
var _rootProps$pagination, _rootProps$pagination2;
|
||
const warnedOnceMissingInPageSizeOptions = React83.useRef(false);
|
||
const pageSize = (_rootProps$pagination = (_rootProps$pagination2 = rootProps.paginationModel) == null ? void 0 : _rootProps$pagination2.pageSize) != null ? _rootProps$pagination : paginationModel.pageSize;
|
||
if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !isPageSizeIncludedInPageSizeOptions(pageSize)) {
|
||
console.warn([`MUI X: The page size \`${paginationModel.pageSize}\` is not preset in the \`pageSizeOptions\`.`, `Add it to show the pagination select.`].join("\n"));
|
||
warnedOnceMissingInPageSizeOptions.current = true;
|
||
}
|
||
}
|
||
const pageSizeOptions = isPageSizeIncludedInPageSizeOptions(paginationModel.pageSize) ? rootProps.pageSizeOptions : [];
|
||
return (0, import_jsx_runtime88.jsx)(GridPaginationRoot, _extends({
|
||
ref,
|
||
component: "div",
|
||
count: rowCount,
|
||
page: paginationModel.page <= lastPage ? paginationModel.page : lastPage,
|
||
rowsPerPageOptions: pageSizeOptions,
|
||
rowsPerPage: paginationModel.pageSize,
|
||
onPageChange: handlePageChange,
|
||
onRowsPerPageChange: handlePageSizeChange
|
||
}, apiRef.current.getLocaleText("MuiTablePagination"), props));
|
||
});
|
||
true ? GridPagination.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
component: import_prop_types54.default.elementType
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridRowCount.js
|
||
init_extends();
|
||
var React84 = __toESM(require_react());
|
||
var import_prop_types55 = __toESM(require_prop_types());
|
||
var import_jsx_runtime89 = __toESM(require_jsx_runtime());
|
||
var _excluded51 = ["className", "rowCount", "visibleRowCount"];
|
||
var useUtilityClasses31 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["rowCount"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridRowCountRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "RowCount",
|
||
overridesResolver: (props, styles) => styles.rowCount
|
||
})(({
|
||
theme
|
||
}) => ({
|
||
alignItems: "center",
|
||
display: "flex",
|
||
margin: theme.spacing(0, 2)
|
||
}));
|
||
var GridRowCount = React84.forwardRef(function GridRowCount2(props, ref) {
|
||
const {
|
||
className,
|
||
rowCount,
|
||
visibleRowCount
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded51);
|
||
const apiRef = useGridApiContext();
|
||
const ownerState = useGridRootProps();
|
||
const classes = useUtilityClasses31(ownerState);
|
||
if (rowCount === 0) {
|
||
return null;
|
||
}
|
||
const text = visibleRowCount < rowCount ? apiRef.current.getLocaleText("footerTotalVisibleRows")(visibleRowCount, rowCount) : rowCount.toLocaleString();
|
||
return (0, import_jsx_runtime89.jsxs)(GridRowCountRoot, _extends({
|
||
ref,
|
||
className: clsx_default(classes.root, className),
|
||
ownerState
|
||
}, other, {
|
||
children: [apiRef.current.getLocaleText("footerTotalRows"), " ", text]
|
||
}));
|
||
});
|
||
true ? GridRowCount.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
rowCount: import_prop_types55.default.number.isRequired,
|
||
sx: import_prop_types55.default.oneOfType([import_prop_types55.default.arrayOf(import_prop_types55.default.oneOfType([import_prop_types55.default.func, import_prop_types55.default.object, import_prop_types55.default.bool])), import_prop_types55.default.func, import_prop_types55.default.object]),
|
||
visibleRowCount: import_prop_types55.default.number.isRequired
|
||
} : void 0;
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridRow.js
|
||
init_extends();
|
||
var React87 = __toESM(require_react());
|
||
var import_prop_types56 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridVisibleRows.js
|
||
var React85 = __toESM(require_react());
|
||
var getVisibleRows = (apiRef, props) => {
|
||
let rows;
|
||
let range;
|
||
if (props.pagination && props.paginationMode === "client") {
|
||
range = gridPaginationRowRangeSelector(apiRef);
|
||
rows = gridPaginatedVisibleSortedGridRowEntriesSelector(apiRef);
|
||
} else {
|
||
rows = gridExpandedSortedRowEntriesSelector(apiRef);
|
||
if (rows.length === 0) {
|
||
range = null;
|
||
} else {
|
||
range = {
|
||
firstRowIndex: 0,
|
||
lastRowIndex: rows.length - 1
|
||
};
|
||
}
|
||
}
|
||
return {
|
||
rows,
|
||
range
|
||
};
|
||
};
|
||
var useGridVisibleRows = (apiRef, props) => {
|
||
const response = getVisibleRows(apiRef, props);
|
||
return React85.useMemo(() => ({
|
||
rows: response.rows,
|
||
range: response.range
|
||
}), [response.rows, response.range]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridCheckboxSelectionColDef.js
|
||
init_extends();
|
||
var React86 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridBooleanColDef.js
|
||
init_extends();
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/utils.js
|
||
init_extends();
|
||
var GLOBAL_API_REF = {
|
||
current: null
|
||
};
|
||
function tagInternalFilter(fn) {
|
||
fn.isInternal = true;
|
||
return fn;
|
||
}
|
||
function isInternalFilter(fn) {
|
||
return fn !== void 0 && fn.isInternal === true;
|
||
}
|
||
function convertFilterV7ToLegacy(fn) {
|
||
return tagInternalFilter((filterItem, column) => {
|
||
const filterFn = fn(filterItem, column);
|
||
if (!filterFn) {
|
||
return filterFn;
|
||
}
|
||
return (cellParams) => {
|
||
return filterFn(cellParams.value, cellParams.row, column, GLOBAL_API_REF.current);
|
||
};
|
||
});
|
||
}
|
||
function convertLegacyOperators(ops) {
|
||
return ops.map((op) => {
|
||
return _extends({}, op, {
|
||
getApplyFilterFn: convertFilterV7ToLegacy(op.getApplyFilterFnV7),
|
||
getApplyFilterFnV7: tagInternalFilter(op.getApplyFilterFnV7)
|
||
});
|
||
});
|
||
}
|
||
function convertQuickFilterV7ToLegacy(fn) {
|
||
return tagInternalFilter((filterItem, column, apiRef) => {
|
||
const filterFn = fn(filterItem, column, apiRef);
|
||
if (!filterFn) {
|
||
return filterFn;
|
||
}
|
||
return (cellParams) => {
|
||
return filterFn(cellParams.value, cellParams.row, column, apiRef);
|
||
};
|
||
});
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js
|
||
init_extends();
|
||
|
||
// node_modules/@mui/x-data-grid/utils/getPublicApiRef.js
|
||
function getPublicApiRef(apiRef) {
|
||
return {
|
||
current: apiRef.current.getPublicApi()
|
||
};
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/filter/gridFilterUtils.js
|
||
var hasEval;
|
||
function getHasEval() {
|
||
if (hasEval !== void 0) {
|
||
return hasEval;
|
||
}
|
||
try {
|
||
hasEval = new Function("return true")();
|
||
} catch (_) {
|
||
hasEval = false;
|
||
}
|
||
return hasEval;
|
||
}
|
||
var cleanFilterItem = (item, apiRef) => {
|
||
const cleanItem = _extends({}, item);
|
||
if (cleanItem.id == null) {
|
||
cleanItem.id = Math.round(Math.random() * 1e5);
|
||
}
|
||
if (cleanItem.operator == null) {
|
||
const column = gridColumnLookupSelector(apiRef)[cleanItem.field];
|
||
cleanItem.operator = column && column.filterOperators[0].value;
|
||
}
|
||
return cleanItem;
|
||
};
|
||
var filterModelDisableMultiColumnsFilteringWarning = buildWarning(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.", "If you are using the community version of the `DataGrid`, this prop is always `true`."], "error");
|
||
var filterModelMissingItemIdWarning = buildWarning("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.", "error");
|
||
var filterModelMissingItemOperatorWarning = buildWarning("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.", "error");
|
||
var sanitizeFilterModel = (model, disableMultipleColumnsFiltering, apiRef) => {
|
||
const hasSeveralItems = model.items.length > 1;
|
||
let items;
|
||
if (hasSeveralItems && disableMultipleColumnsFiltering) {
|
||
filterModelDisableMultiColumnsFilteringWarning();
|
||
items = [model.items[0]];
|
||
} else {
|
||
items = model.items;
|
||
}
|
||
const hasItemsWithoutIds = hasSeveralItems && items.some((item) => item.id == null);
|
||
const hasItemWithoutOperator = items.some((item) => item.operator == null);
|
||
if (hasItemsWithoutIds) {
|
||
filterModelMissingItemIdWarning();
|
||
}
|
||
if (hasItemWithoutOperator) {
|
||
filterModelMissingItemOperatorWarning();
|
||
}
|
||
if (hasItemWithoutOperator || hasItemsWithoutIds) {
|
||
return _extends({}, model, {
|
||
items: items.map((item) => cleanFilterItem(item, apiRef))
|
||
});
|
||
}
|
||
if (model.items !== items) {
|
||
return _extends({}, model, {
|
||
items
|
||
});
|
||
}
|
||
return model;
|
||
};
|
||
var mergeStateWithFilterModel = (filterModel, disableMultipleColumnsFiltering, apiRef) => (filteringState) => _extends({}, filteringState, {
|
||
filterModel: sanitizeFilterModel(filterModel, disableMultipleColumnsFiltering, apiRef)
|
||
});
|
||
var removeDiacritics = (value) => {
|
||
if (typeof value === "string") {
|
||
return value.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||
}
|
||
return value;
|
||
};
|
||
var getFilterCallbackFromItem = (filterItem, apiRef) => {
|
||
if (!filterItem.field || !filterItem.operator) {
|
||
return null;
|
||
}
|
||
const column = apiRef.current.getColumn(filterItem.field);
|
||
if (!column) {
|
||
return null;
|
||
}
|
||
let parsedValue;
|
||
if (column.valueParser) {
|
||
var _filterItem$value;
|
||
const parser = column.valueParser;
|
||
parsedValue = Array.isArray(filterItem.value) ? (_filterItem$value = filterItem.value) == null ? void 0 : _filterItem$value.map((x) => parser(x)) : parser(filterItem.value);
|
||
} else {
|
||
parsedValue = filterItem.value;
|
||
}
|
||
const {
|
||
ignoreDiacritics
|
||
} = apiRef.current.rootProps;
|
||
if (ignoreDiacritics) {
|
||
parsedValue = removeDiacritics(parsedValue);
|
||
}
|
||
const newFilterItem = _extends({}, filterItem, {
|
||
value: parsedValue
|
||
});
|
||
const filterOperators = column.filterOperators;
|
||
if (!(filterOperators != null && filterOperators.length)) {
|
||
throw new Error(`MUI: No filter operators found for column '${column.field}'.`);
|
||
}
|
||
const filterOperator = filterOperators.find((operator) => operator.value === newFilterItem.operator);
|
||
if (!filterOperator) {
|
||
throw new Error(`MUI: No filter operator found for column '${column.field}' and operator value '${newFilterItem.operator}'.`);
|
||
}
|
||
const hasUserFunctionLegacy = !isInternalFilter(filterOperator.getApplyFilterFn);
|
||
const hasUserFunctionV7 = !isInternalFilter(filterOperator.getApplyFilterFnV7);
|
||
const publicApiRef = getPublicApiRef(apiRef);
|
||
if (filterOperator.getApplyFilterFnV7 && !(hasUserFunctionLegacy && !hasUserFunctionV7)) {
|
||
const applyFilterOnRow2 = filterOperator.getApplyFilterFnV7(newFilterItem, column);
|
||
if (typeof applyFilterOnRow2 !== "function") {
|
||
return null;
|
||
}
|
||
return {
|
||
v7: true,
|
||
item: newFilterItem,
|
||
fn: (row) => {
|
||
let value = apiRef.current.getRowValue(row, column);
|
||
if (ignoreDiacritics) {
|
||
value = removeDiacritics(value);
|
||
}
|
||
return applyFilterOnRow2(value, row, column, publicApiRef);
|
||
}
|
||
};
|
||
}
|
||
const applyFilterOnRow = filterOperator.getApplyFilterFn(newFilterItem, column);
|
||
if (typeof applyFilterOnRow !== "function") {
|
||
return null;
|
||
}
|
||
return {
|
||
v7: false,
|
||
item: newFilterItem,
|
||
fn: (rowId) => {
|
||
const params = apiRef.current.getCellParams(rowId, newFilterItem.field);
|
||
GLOBAL_API_REF.current = publicApiRef;
|
||
if (ignoreDiacritics) {
|
||
params.value = removeDiacritics(params.value);
|
||
}
|
||
const result = applyFilterOnRow(params);
|
||
GLOBAL_API_REF.current = null;
|
||
return result;
|
||
}
|
||
};
|
||
};
|
||
var filterItemsApplierId = 1;
|
||
var buildAggregatedFilterItemsApplier = (filterModel, apiRef, disableEval) => {
|
||
const {
|
||
items
|
||
} = filterModel;
|
||
const appliers = items.map((item) => getFilterCallbackFromItem(item, apiRef)).filter((callback) => !!callback);
|
||
if (appliers.length === 0) {
|
||
return null;
|
||
}
|
||
if (disableEval || !getHasEval()) {
|
||
return (row, shouldApplyFilter) => {
|
||
const resultPerItemId = {};
|
||
for (let i = 0; i < appliers.length; i += 1) {
|
||
const applier = appliers[i];
|
||
if (!shouldApplyFilter || shouldApplyFilter(applier.item.field)) {
|
||
resultPerItemId[applier.item.id] = applier.v7 ? applier.fn(row) : applier.fn(apiRef.current.getRowId(row));
|
||
}
|
||
}
|
||
return resultPerItemId;
|
||
};
|
||
}
|
||
const filterItemCore = new Function("getRowId", "appliers", "row", "shouldApplyFilter", `"use strict";
|
||
${appliers.map((applier, i) => `const shouldApply${i} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(applier.item.field)});`).join("\n")}
|
||
|
||
const result$$ = {
|
||
${appliers.map((applier, i) => ` ${JSON.stringify(String(applier.item.id))}: !shouldApply${i}
|
||
? false
|
||
: ${applier.v7 ? `appliers[${i}].fn(row)` : `appliers[${i}].fn(getRowId(row))`},`).join("\n")}
|
||
};
|
||
|
||
return result$$;`.replaceAll("$$", String(filterItemsApplierId)));
|
||
filterItemsApplierId += 1;
|
||
const filterItem = (row, shouldApplyItem) => filterItemCore(apiRef.current.getRowId, appliers, row, shouldApplyItem);
|
||
return filterItem;
|
||
};
|
||
var buildAggregatedQuickFilterApplier = (filterModel, apiRef) => {
|
||
var _filterModel$quickFil, _filterModel$quickFil2, _filterModel$quickFil3;
|
||
const quickFilterValues = (_filterModel$quickFil = (_filterModel$quickFil2 = filterModel.quickFilterValues) == null ? void 0 : _filterModel$quickFil2.filter(Boolean)) != null ? _filterModel$quickFil : [];
|
||
if (quickFilterValues.length === 0) {
|
||
return null;
|
||
}
|
||
const quickFilterExcludeHiddenColumns = (_filterModel$quickFil3 = filterModel.quickFilterExcludeHiddenColumns) != null ? _filterModel$quickFil3 : false;
|
||
const columnFields = quickFilterExcludeHiddenColumns ? gridVisibleColumnFieldsSelector(apiRef) : gridColumnFieldsSelector(apiRef);
|
||
const appliersPerField = [];
|
||
const {
|
||
ignoreDiacritics
|
||
} = apiRef.current.rootProps;
|
||
const publicApiRef = getPublicApiRef(apiRef);
|
||
columnFields.forEach((field) => {
|
||
const column = apiRef.current.getColumn(field);
|
||
const getApplyQuickFilterFn = column == null ? void 0 : column.getApplyQuickFilterFn;
|
||
const getApplyQuickFilterFnV7 = column == null ? void 0 : column.getApplyQuickFilterFnV7;
|
||
const hasUserFunctionLegacy = !isInternalFilter(getApplyQuickFilterFn);
|
||
const hasUserFunctionV7 = !isInternalFilter(getApplyQuickFilterFnV7);
|
||
if (getApplyQuickFilterFnV7 && !(hasUserFunctionLegacy && !hasUserFunctionV7)) {
|
||
appliersPerField.push({
|
||
column,
|
||
appliers: quickFilterValues.map((quickFilterValue) => {
|
||
const value = ignoreDiacritics ? removeDiacritics(quickFilterValue) : quickFilterValue;
|
||
return {
|
||
v7: true,
|
||
fn: getApplyQuickFilterFnV7(value, column, publicApiRef)
|
||
};
|
||
})
|
||
});
|
||
} else if (getApplyQuickFilterFn) {
|
||
appliersPerField.push({
|
||
column,
|
||
appliers: quickFilterValues.map((quickFilterValue) => {
|
||
const value = ignoreDiacritics ? removeDiacritics(quickFilterValue) : quickFilterValue;
|
||
return {
|
||
v7: false,
|
||
fn: getApplyQuickFilterFn(value, column, publicApiRef)
|
||
};
|
||
})
|
||
});
|
||
}
|
||
});
|
||
return function isRowMatchingQuickFilter(row, shouldApplyFilter) {
|
||
const result = {};
|
||
const usedCellParams = {};
|
||
outer: for (let v = 0; v < quickFilterValues.length; v += 1) {
|
||
const filterValue = quickFilterValues[v];
|
||
for (let i = 0; i < appliersPerField.length; i += 1) {
|
||
const {
|
||
column,
|
||
appliers
|
||
} = appliersPerField[i];
|
||
const {
|
||
field
|
||
} = column;
|
||
if (shouldApplyFilter && !shouldApplyFilter(field)) {
|
||
continue;
|
||
}
|
||
const applier = appliers[v];
|
||
let value = apiRef.current.getRowValue(row, column);
|
||
if (applier.fn === null) {
|
||
continue;
|
||
}
|
||
if (applier.v7) {
|
||
if (ignoreDiacritics) {
|
||
value = removeDiacritics(value);
|
||
}
|
||
const isMatching = applier.fn(value, row, column, publicApiRef);
|
||
if (isMatching) {
|
||
result[filterValue] = true;
|
||
continue outer;
|
||
}
|
||
} else {
|
||
var _usedCellParams$field;
|
||
const cellParams = (_usedCellParams$field = usedCellParams[field]) != null ? _usedCellParams$field : apiRef.current.getCellParams(apiRef.current.getRowId(row), field);
|
||
if (ignoreDiacritics) {
|
||
cellParams.value = removeDiacritics(cellParams.value);
|
||
}
|
||
usedCellParams[field] = cellParams;
|
||
const isMatching = applier.fn(cellParams);
|
||
if (isMatching) {
|
||
result[filterValue] = true;
|
||
continue outer;
|
||
}
|
||
}
|
||
}
|
||
result[filterValue] = false;
|
||
}
|
||
return result;
|
||
};
|
||
};
|
||
var buildAggregatedFilterApplier = (filterModel, apiRef, disableEval) => {
|
||
const isRowMatchingFilterItems = buildAggregatedFilterItemsApplier(filterModel, apiRef, disableEval);
|
||
const isRowMatchingQuickFilter = buildAggregatedQuickFilterApplier(filterModel, apiRef);
|
||
return function isRowMatchingFilters(row, shouldApplyFilter, result) {
|
||
var _isRowMatchingFilterI, _isRowMatchingQuickFi;
|
||
result.passingFilterItems = (_isRowMatchingFilterI = isRowMatchingFilterItems == null ? void 0 : isRowMatchingFilterItems(row, shouldApplyFilter)) != null ? _isRowMatchingFilterI : null;
|
||
result.passingQuickFilterValues = (_isRowMatchingQuickFi = isRowMatchingQuickFilter == null ? void 0 : isRowMatchingQuickFilter(row, shouldApplyFilter)) != null ? _isRowMatchingQuickFi : null;
|
||
};
|
||
};
|
||
var isNotNull = (result) => result != null;
|
||
var filterModelItems = (cache, apiRef, items) => {
|
||
if (!cache.cleanedFilterItems) {
|
||
cache.cleanedFilterItems = items.filter((item) => getFilterCallbackFromItem(item, apiRef) !== null);
|
||
}
|
||
return cache.cleanedFilterItems;
|
||
};
|
||
var passFilterLogic = (allFilterItemResults, allQuickFilterResults, filterModel, apiRef, cache) => {
|
||
const cleanedFilterItems = filterModelItems(cache, apiRef, filterModel.items);
|
||
const cleanedFilterItemResults = allFilterItemResults.filter(isNotNull);
|
||
const cleanedQuickFilterResults = allQuickFilterResults.filter(isNotNull);
|
||
if (cleanedFilterItemResults.length > 0) {
|
||
var _filterModel$logicOpe;
|
||
const filterItemPredicate = (item) => {
|
||
return cleanedFilterItemResults.some((filterItemResult) => filterItemResult[item.id]);
|
||
};
|
||
const logicOperator = (_filterModel$logicOpe = filterModel.logicOperator) != null ? _filterModel$logicOpe : getDefaultGridFilterModel().logicOperator;
|
||
if (logicOperator === GridLogicOperator.And) {
|
||
const passesAllFilters = cleanedFilterItems.every(filterItemPredicate);
|
||
if (!passesAllFilters) {
|
||
return false;
|
||
}
|
||
} else {
|
||
const passesSomeFilters = cleanedFilterItems.some(filterItemPredicate);
|
||
if (!passesSomeFilters) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
if (cleanedQuickFilterResults.length > 0 && filterModel.quickFilterValues != null) {
|
||
var _filterModel$quickFil4;
|
||
const quickFilterValuePredicate = (value) => {
|
||
return cleanedQuickFilterResults.some((quickFilterValueResult) => quickFilterValueResult[value]);
|
||
};
|
||
const quickFilterLogicOperator = (_filterModel$quickFil4 = filterModel.quickFilterLogicOperator) != null ? _filterModel$quickFil4 : getDefaultGridFilterModel().quickFilterLogicOperator;
|
||
if (quickFilterLogicOperator === GridLogicOperator.And) {
|
||
const passesAllQuickFilterValues = filterModel.quickFilterValues.every(quickFilterValuePredicate);
|
||
if (!passesAllQuickFilterValues) {
|
||
return false;
|
||
}
|
||
} else {
|
||
const passesSomeQuickFilterValues = filterModel.quickFilterValues.some(quickFilterValuePredicate);
|
||
if (!passesSomeQuickFilterValues) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
return true;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridStringOperators.js
|
||
var getGridStringQuickFilterFn = tagInternalFilter((value) => {
|
||
if (!value) {
|
||
return null;
|
||
}
|
||
const filterRegex = new RegExp(escapeRegExp(value), "i");
|
||
return (_, row, column, apiRef) => {
|
||
let columnValue = apiRef.current.getRowFormattedValue(row, column);
|
||
if (apiRef.current.ignoreDiacritics) {
|
||
columnValue = removeDiacritics(columnValue);
|
||
}
|
||
return columnValue != null ? filterRegex.test(columnValue.toString()) : false;
|
||
};
|
||
});
|
||
var getGridStringOperators = (disableTrim = false) => convertLegacyOperators([{
|
||
value: "contains",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (!filterItem.value) {
|
||
return null;
|
||
}
|
||
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
||
const filterRegex = new RegExp(escapeRegExp(filterItemValue), "i");
|
||
return (value) => {
|
||
return value != null ? filterRegex.test(String(value)) : false;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue
|
||
}, {
|
||
value: "equals",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (!filterItem.value) {
|
||
return null;
|
||
}
|
||
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
||
const collator4 = new Intl.Collator(void 0, {
|
||
sensitivity: "base",
|
||
usage: "search"
|
||
});
|
||
return (value) => {
|
||
return value != null ? collator4.compare(filterItemValue, value.toString()) === 0 : false;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue
|
||
}, {
|
||
value: "startsWith",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (!filterItem.value) {
|
||
return null;
|
||
}
|
||
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
||
const filterRegex = new RegExp(`^${escapeRegExp(filterItemValue)}.*$`, "i");
|
||
return (value) => {
|
||
return value != null ? filterRegex.test(value.toString()) : false;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue
|
||
}, {
|
||
value: "endsWith",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (!filterItem.value) {
|
||
return null;
|
||
}
|
||
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
||
const filterRegex = new RegExp(`.*${escapeRegExp(filterItemValue)}$`, "i");
|
||
return (value) => {
|
||
return value != null ? filterRegex.test(value.toString()) : false;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue
|
||
}, {
|
||
value: "isEmpty",
|
||
getApplyFilterFnV7: () => {
|
||
return (value) => {
|
||
return value === "" || value == null;
|
||
};
|
||
},
|
||
requiresFilterValue: false
|
||
}, {
|
||
value: "isNotEmpty",
|
||
getApplyFilterFnV7: () => {
|
||
return (value) => {
|
||
return value !== "" && value != null;
|
||
};
|
||
},
|
||
requiresFilterValue: false
|
||
}, {
|
||
value: "isAnyOf",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (!Array.isArray(filterItem.value) || filterItem.value.length === 0) {
|
||
return null;
|
||
}
|
||
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.map((val) => val.trim());
|
||
const collator4 = new Intl.Collator(void 0, {
|
||
sensitivity: "base",
|
||
usage: "search"
|
||
});
|
||
return (value) => value != null ? filterItemValue.some((filterValue) => {
|
||
return collator4.compare(filterValue, value.toString() || "") === 0;
|
||
}) : false;
|
||
},
|
||
InputComponent: GridFilterInputMultipleValue
|
||
}]);
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridStringColDef.js
|
||
var GRID_STRING_COL_DEF = {
|
||
width: 100,
|
||
minWidth: 50,
|
||
maxWidth: Infinity,
|
||
hideable: true,
|
||
sortable: true,
|
||
resizable: true,
|
||
filterable: true,
|
||
groupable: true,
|
||
pinnable: true,
|
||
// @ts-ignore
|
||
aggregable: true,
|
||
editable: false,
|
||
sortComparator: gridStringOrNumberComparator,
|
||
type: "string",
|
||
align: "left",
|
||
filterOperators: getGridStringOperators(),
|
||
renderEditCell: renderEditInputCell,
|
||
getApplyQuickFilterFn: convertQuickFilterV7ToLegacy(getGridStringQuickFilterFn),
|
||
getApplyQuickFilterFnV7: getGridStringQuickFilterFn
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridBooleanOperators.js
|
||
var getGridBooleanOperators = () => convertLegacyOperators([{
|
||
value: "is",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (!filterItem.value) {
|
||
return null;
|
||
}
|
||
const valueAsBoolean = filterItem.value === "true";
|
||
return (value) => {
|
||
return Boolean(value) === valueAsBoolean;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputBoolean
|
||
}]);
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridBooleanColDef.js
|
||
function gridBooleanFormatter({
|
||
value,
|
||
api
|
||
}) {
|
||
return value ? api.getLocaleText("booleanCellTrueLabel") : api.getLocaleText("booleanCellFalseLabel");
|
||
}
|
||
var stringToBoolean = (value) => {
|
||
switch (value.toLowerCase().trim()) {
|
||
case "true":
|
||
case "yes":
|
||
case "1":
|
||
return true;
|
||
case "false":
|
||
case "no":
|
||
case "0":
|
||
case "null":
|
||
case "undefined":
|
||
return false;
|
||
default:
|
||
return void 0;
|
||
}
|
||
};
|
||
var GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
||
type: "boolean",
|
||
align: "center",
|
||
headerAlign: "center",
|
||
renderCell: renderBooleanCell,
|
||
renderEditCell: renderEditBooleanCell,
|
||
sortComparator: gridNumberComparator,
|
||
valueFormatter: gridBooleanFormatter,
|
||
filterOperators: getGridBooleanOperators(),
|
||
getApplyQuickFilterFn: void 0,
|
||
getApplyQuickFilterFnV7: void 0,
|
||
// @ts-ignore
|
||
aggregable: false,
|
||
// @ts-ignore
|
||
pastedValueParser: (value) => stringToBoolean(value)
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridCheckboxSelectionColDef.js
|
||
var import_jsx_runtime90 = __toESM(require_jsx_runtime());
|
||
var GRID_CHECKBOX_SELECTION_FIELD = "__check__";
|
||
var GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF, {
|
||
field: GRID_CHECKBOX_SELECTION_FIELD,
|
||
type: "checkboxSelection",
|
||
width: 50,
|
||
resizable: false,
|
||
sortable: false,
|
||
filterable: false,
|
||
// @ts-ignore
|
||
aggregable: false,
|
||
disableColumnMenu: true,
|
||
disableReorder: true,
|
||
disableExport: true,
|
||
getApplyQuickFilterFn: void 0,
|
||
getApplyQuickFilterFnV7: void 0,
|
||
valueGetter: (params) => {
|
||
const selectionLookup = selectedIdsLookupSelector(params.api.state, params.api.instanceId);
|
||
return selectionLookup[params.id] !== void 0;
|
||
},
|
||
renderHeader: (params) => (0, import_jsx_runtime90.jsx)(GridHeaderCheckbox, _extends({}, params)),
|
||
renderCell: (params) => (0, import_jsx_runtime90.jsx)(GridCellCheckboxRenderer2, _extends({}, params))
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridActionsColDef.js
|
||
init_extends();
|
||
var GRID_ACTIONS_COLUMN_TYPE = "actions";
|
||
var GRID_ACTIONS_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
||
sortable: false,
|
||
filterable: false,
|
||
// @ts-ignore
|
||
aggregable: false,
|
||
width: 100,
|
||
align: "center",
|
||
headerAlign: "center",
|
||
headerName: "",
|
||
disableColumnMenu: true,
|
||
disableExport: true,
|
||
renderCell: renderActionsCell,
|
||
getApplyQuickFilterFn: void 0,
|
||
getApplyQuickFilterFnV7: void 0
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/constants/gridDetailPanelToggleField.js
|
||
var GRID_DETAIL_PANEL_TOGGLE_FIELD = "__detail_panel_toggle__";
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/editing/gridEditingSelectors.js
|
||
var gridEditRowsStateSelector = (state) => state.editRows;
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridRow.js
|
||
var import_jsx_runtime91 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime92 = __toESM(require_jsx_runtime());
|
||
var _excluded52 = ["selected", "hovered", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
||
var useUtilityClasses32 = (ownerState) => {
|
||
const {
|
||
editable,
|
||
editing,
|
||
selected,
|
||
isLastVisible,
|
||
rowHeight,
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["row", selected && "selected", editable && "row--editable", editing && "row--editing", isLastVisible && "row--lastVisible", rowHeight === "auto" && "row--dynamicHeight"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function EmptyCell({
|
||
width
|
||
}) {
|
||
if (!width) {
|
||
return null;
|
||
}
|
||
const style = {
|
||
width
|
||
};
|
||
return (0, import_jsx_runtime91.jsx)("div", {
|
||
className: `${gridClasses.cell} ${gridClasses.withBorderColor}`,
|
||
style
|
||
});
|
||
}
|
||
var GridRow = React87.forwardRef(function GridRow2(props, refProp) {
|
||
const {
|
||
selected,
|
||
hovered,
|
||
rowId,
|
||
row,
|
||
index,
|
||
style: styleProp,
|
||
position,
|
||
rowHeight,
|
||
className,
|
||
visibleColumns,
|
||
renderedColumns,
|
||
containerWidth,
|
||
firstColumnToRender,
|
||
isLastVisible = false,
|
||
focusedCellColumnIndexNotInRange,
|
||
isNotVisible,
|
||
focusedCell,
|
||
onClick,
|
||
onDoubleClick,
|
||
onMouseEnter,
|
||
onMouseLeave,
|
||
onMouseOut,
|
||
onMouseOver
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded52);
|
||
const apiRef = useGridApiContext();
|
||
const ref = React87.useRef(null);
|
||
const rootProps = useGridRootProps();
|
||
const currentPage = useGridVisibleRows(apiRef, rootProps);
|
||
const columnsTotalWidth = useGridSelector(apiRef, gridColumnsTotalWidthSelector);
|
||
const sortModel = useGridSelector(apiRef, gridSortModelSelector);
|
||
const treeDepth = useGridSelector(apiRef, gridRowMaximumTreeDepthSelector);
|
||
const headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);
|
||
const editRowsState = useGridSelector(apiRef, gridEditRowsStateSelector);
|
||
const handleRef = useForkRef(ref, refProp);
|
||
const ariaRowIndex = index + headerGroupingMaxDepth + 2;
|
||
const ownerState = {
|
||
selected,
|
||
hovered,
|
||
isLastVisible,
|
||
classes: rootProps.classes,
|
||
editing: apiRef.current.getRowMode(rowId) === GridRowModes.Edit,
|
||
editable: rootProps.editMode === GridEditModes.Row,
|
||
rowHeight
|
||
};
|
||
const classes = useUtilityClasses32(ownerState);
|
||
React87.useLayoutEffect(() => {
|
||
if (rowHeight === "auto" && ref.current && typeof ResizeObserver === "undefined") {
|
||
apiRef.current.unstable_storeRowHeightMeasurement(rowId, ref.current.clientHeight, position);
|
||
}
|
||
}, [apiRef, rowHeight, rowId, position]);
|
||
React87.useLayoutEffect(() => {
|
||
if (currentPage.range) {
|
||
const rowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(rowId);
|
||
if (rowIndex != null) {
|
||
apiRef.current.unstable_setLastMeasuredRowIndex(rowIndex);
|
||
}
|
||
}
|
||
const rootElement = ref.current;
|
||
const hasFixedHeight = rowHeight !== "auto";
|
||
if (!rootElement || hasFixedHeight || typeof ResizeObserver === "undefined") {
|
||
return void 0;
|
||
}
|
||
const resizeObserver = new ResizeObserver((entries) => {
|
||
const [entry] = entries;
|
||
const height = entry.borderBoxSize && entry.borderBoxSize.length > 0 ? entry.borderBoxSize[0].blockSize : entry.contentRect.height;
|
||
apiRef.current.unstable_storeRowHeightMeasurement(rowId, height, position);
|
||
});
|
||
resizeObserver.observe(rootElement);
|
||
return () => resizeObserver.disconnect();
|
||
}, [apiRef, currentPage.range, index, rowHeight, rowId, position]);
|
||
const publish = React87.useCallback((eventName, propHandler) => (event) => {
|
||
if (isEventTargetInPortal(event)) {
|
||
return;
|
||
}
|
||
if (!apiRef.current.getRow(rowId)) {
|
||
return;
|
||
}
|
||
apiRef.current.publishEvent(eventName, apiRef.current.getRowParams(rowId), event);
|
||
if (propHandler) {
|
||
propHandler(event);
|
||
}
|
||
}, [apiRef, rowId]);
|
||
const publishClick = React87.useCallback((event) => {
|
||
const cell = findParentElementFromClassName(event.target, gridClasses.cell);
|
||
const field = cell == null ? void 0 : cell.getAttribute("data-field");
|
||
if (field) {
|
||
if (field === GRID_CHECKBOX_SELECTION_COL_DEF.field) {
|
||
return;
|
||
}
|
||
if (field === GRID_DETAIL_PANEL_TOGGLE_FIELD) {
|
||
return;
|
||
}
|
||
if (field === "__reorder__") {
|
||
return;
|
||
}
|
||
if (apiRef.current.getCellMode(rowId, field) === GridCellModes.Edit) {
|
||
return;
|
||
}
|
||
const column = apiRef.current.getColumn(field);
|
||
if ((column == null ? void 0 : column.type) === GRID_ACTIONS_COLUMN_TYPE) {
|
||
return;
|
||
}
|
||
}
|
||
publish("rowClick", onClick)(event);
|
||
}, [apiRef, onClick, publish, rowId]);
|
||
const {
|
||
slots,
|
||
slotProps,
|
||
disableColumnReorder
|
||
} = rootProps;
|
||
const CellComponent = slots.cell === MemoizedGridCellV7 ? MemoizedGridCellV7 : MemoizedCellWrapper;
|
||
const rowReordering = rootProps.rowReordering;
|
||
const getCell = (column, cellProps) => {
|
||
var _editRowsState$rowId$, _editRowsState$rowId;
|
||
const disableDragEvents = disableColumnReorder && column.disableReorder || !rowReordering && !!sortModel.length && treeDepth > 1 && Object.keys(editRowsState).length > 0;
|
||
const editCellState = (_editRowsState$rowId$ = (_editRowsState$rowId = editRowsState[rowId]) == null ? void 0 : _editRowsState$rowId[column.field]) != null ? _editRowsState$rowId$ : null;
|
||
let cellIsNotVisible = false;
|
||
if (focusedCellColumnIndexNotInRange !== void 0 && visibleColumns[focusedCellColumnIndexNotInRange].field === column.field) {
|
||
cellIsNotVisible = true;
|
||
}
|
||
return (0, import_jsx_runtime91.jsx)(CellComponent, _extends({
|
||
column,
|
||
width: cellProps.width,
|
||
rowId,
|
||
height: rowHeight,
|
||
showRightBorder: cellProps.showRightBorder,
|
||
align: column.align || "left",
|
||
colIndex: cellProps.indexRelativeToAllColumns,
|
||
colSpan: cellProps.colSpan,
|
||
disableDragEvents,
|
||
editCellState,
|
||
isNotVisible: cellIsNotVisible
|
||
}, slotProps == null ? void 0 : slotProps.cell), column.field);
|
||
};
|
||
const sizes = useGridSelector(apiRef, () => _extends({}, apiRef.current.unstable_getRowInternalSizes(rowId)), objectShallowCompare);
|
||
let minHeight = rowHeight;
|
||
if (minHeight === "auto" && sizes) {
|
||
let numberOfBaseSizes = 0;
|
||
const maximumSize = Object.entries(sizes).reduce((acc, [key, size]) => {
|
||
const isBaseHeight = /^base[A-Z]/.test(key);
|
||
if (!isBaseHeight) {
|
||
return acc;
|
||
}
|
||
numberOfBaseSizes += 1;
|
||
if (size > acc) {
|
||
return size;
|
||
}
|
||
return acc;
|
||
}, 0);
|
||
if (maximumSize > 0 && numberOfBaseSizes > 1) {
|
||
minHeight = maximumSize;
|
||
}
|
||
}
|
||
const style = React87.useMemo(() => {
|
||
if (isNotVisible) {
|
||
return {
|
||
opacity: 0,
|
||
width: 0,
|
||
height: 0
|
||
};
|
||
}
|
||
const rowStyle = _extends({}, styleProp, {
|
||
maxHeight: rowHeight === "auto" ? "none" : rowHeight,
|
||
// max-height doesn't support "auto"
|
||
minHeight
|
||
});
|
||
if (sizes != null && sizes.spacingTop) {
|
||
const property = rootProps.rowSpacingType === "border" ? "borderTopWidth" : "marginTop";
|
||
rowStyle[property] = sizes.spacingTop;
|
||
}
|
||
if (sizes != null && sizes.spacingBottom) {
|
||
const property = rootProps.rowSpacingType === "border" ? "borderBottomWidth" : "marginBottom";
|
||
let propertyValue = rowStyle[property];
|
||
if (typeof propertyValue !== "number") {
|
||
propertyValue = parseInt(propertyValue || "0", 10);
|
||
}
|
||
propertyValue += sizes.spacingBottom;
|
||
rowStyle[property] = propertyValue;
|
||
}
|
||
return rowStyle;
|
||
}, [isNotVisible, rowHeight, styleProp, minHeight, sizes, rootProps.rowSpacingType]);
|
||
const rowClassNames = apiRef.current.unstable_applyPipeProcessors("rowClassName", [], rowId);
|
||
if (typeof rootProps.getRowClassName === "function") {
|
||
var _currentPage$range;
|
||
const indexRelativeToCurrentPage = index - (((_currentPage$range = currentPage.range) == null ? void 0 : _currentPage$range.firstRowIndex) || 0);
|
||
const rowParams = _extends({}, apiRef.current.getRowParams(rowId), {
|
||
isFirstVisible: indexRelativeToCurrentPage === 0,
|
||
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
|
||
indexRelativeToCurrentPage
|
||
});
|
||
rowClassNames.push(rootProps.getRowClassName(rowParams));
|
||
}
|
||
const randomNumber = randomNumberBetween(1e4, 20, 80);
|
||
const rowNode = apiRef.current.getRowNode(rowId);
|
||
if (!rowNode) {
|
||
return null;
|
||
}
|
||
const rowType = rowNode.type;
|
||
const cells = [];
|
||
for (let i = 0; i < renderedColumns.length; i += 1) {
|
||
const column = renderedColumns[i];
|
||
let indexRelativeToAllColumns = firstColumnToRender + i;
|
||
if (focusedCellColumnIndexNotInRange !== void 0 && focusedCell) {
|
||
if (visibleColumns[focusedCellColumnIndexNotInRange].field === column.field) {
|
||
indexRelativeToAllColumns = focusedCellColumnIndexNotInRange;
|
||
} else {
|
||
indexRelativeToAllColumns -= 1;
|
||
}
|
||
}
|
||
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
|
||
if (cellColSpanInfo && !cellColSpanInfo.spannedByColSpan) {
|
||
if (rowType !== "skeletonRow") {
|
||
const {
|
||
colSpan,
|
||
width
|
||
} = cellColSpanInfo.cellProps;
|
||
const cellProps = {
|
||
width,
|
||
colSpan,
|
||
showRightBorder: rootProps.showCellVerticalBorder,
|
||
indexRelativeToAllColumns
|
||
};
|
||
cells.push(getCell(column, cellProps));
|
||
} else {
|
||
const {
|
||
width
|
||
} = cellColSpanInfo.cellProps;
|
||
const contentWidth = Math.round(randomNumber());
|
||
cells.push((0, import_jsx_runtime91.jsx)(slots.skeletonCell, {
|
||
width,
|
||
contentWidth,
|
||
field: column.field,
|
||
align: column.align
|
||
}, column.field));
|
||
}
|
||
}
|
||
}
|
||
const emptyCellWidth = containerWidth - columnsTotalWidth;
|
||
const eventHandlers = row ? {
|
||
onClick: publishClick,
|
||
onDoubleClick: publish("rowDoubleClick", onDoubleClick),
|
||
onMouseEnter: publish("rowMouseEnter", onMouseEnter),
|
||
onMouseLeave: publish("rowMouseLeave", onMouseLeave),
|
||
onMouseOut: publish("rowMouseOut", onMouseOut),
|
||
onMouseOver: publish("rowMouseOver", onMouseOver)
|
||
} : null;
|
||
return (0, import_jsx_runtime92.jsxs)("div", _extends({
|
||
ref: handleRef,
|
||
"data-id": rowId,
|
||
"data-rowindex": index,
|
||
role: "row",
|
||
className: clsx_default(...rowClassNames, classes.root, className, hovered && "Mui-hovered"),
|
||
"aria-rowindex": ariaRowIndex,
|
||
"aria-selected": selected,
|
||
style
|
||
}, eventHandlers, other, {
|
||
children: [cells, emptyCellWidth > 0 && (0, import_jsx_runtime91.jsx)(EmptyCell, {
|
||
width: emptyCellWidth
|
||
})]
|
||
}));
|
||
});
|
||
true ? GridRow.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
containerWidth: import_prop_types56.default.number.isRequired,
|
||
firstColumnToRender: import_prop_types56.default.number.isRequired,
|
||
/**
|
||
* Determines which cell has focus.
|
||
* If `null`, no cell in this row has focus.
|
||
*/
|
||
focusedCell: import_prop_types56.default.string,
|
||
focusedCellColumnIndexNotInRange: import_prop_types56.default.number,
|
||
/**
|
||
* Index of the row in the whole sorted and filtered dataset.
|
||
* If some rows above have expanded children, this index also take those children into account.
|
||
*/
|
||
index: import_prop_types56.default.number.isRequired,
|
||
isLastVisible: import_prop_types56.default.bool,
|
||
isNotVisible: import_prop_types56.default.bool,
|
||
lastColumnToRender: import_prop_types56.default.number.isRequired,
|
||
onClick: import_prop_types56.default.func,
|
||
onDoubleClick: import_prop_types56.default.func,
|
||
onMouseEnter: import_prop_types56.default.func,
|
||
onMouseLeave: import_prop_types56.default.func,
|
||
position: import_prop_types56.default.oneOf(["center", "left", "right"]).isRequired,
|
||
renderedColumns: import_prop_types56.default.arrayOf(import_prop_types56.default.object).isRequired,
|
||
row: import_prop_types56.default.object,
|
||
rowHeight: import_prop_types56.default.oneOfType([import_prop_types56.default.oneOf(["auto"]), import_prop_types56.default.number]).isRequired,
|
||
rowId: import_prop_types56.default.oneOfType([import_prop_types56.default.number, import_prop_types56.default.string]).isRequired,
|
||
selected: import_prop_types56.default.bool.isRequired,
|
||
/**
|
||
* Determines which cell should be tabbable by having tabIndex=0.
|
||
* If `null`, no cell in this row is in the tab sequence.
|
||
*/
|
||
tabbableCell: import_prop_types56.default.string,
|
||
visibleColumns: import_prop_types56.default.arrayOf(import_prop_types56.default.object).isRequired
|
||
} : void 0;
|
||
var MemoizedGridRow = fastMemo(GridRow);
|
||
|
||
// node_modules/@mui/x-data-grid/context/GridContextProvider.js
|
||
var React88 = __toESM(require_react());
|
||
var import_jsx_runtime93 = __toESM(require_jsx_runtime());
|
||
function GridContextProvider({
|
||
privateApiRef,
|
||
props,
|
||
children
|
||
}) {
|
||
const apiRef = React88.useRef(privateApiRef.current.getPublicApi());
|
||
return (0, import_jsx_runtime93.jsx)(GridRootPropsContext.Provider, {
|
||
value: props,
|
||
children: (0, import_jsx_runtime93.jsx)(GridPrivateApiContext.Provider, {
|
||
value: privateApiRef,
|
||
children: (0, import_jsx_runtime93.jsx)(GridApiContext.Provider, {
|
||
value: apiRef,
|
||
children
|
||
})
|
||
})
|
||
});
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/useGridLoggerFactory.js
|
||
var React89 = __toESM(require_react());
|
||
var forceDebug = localStorageAvailable() && window.localStorage.getItem("DEBUG") != null;
|
||
var noop = () => {
|
||
};
|
||
var noopLogger = {
|
||
debug: noop,
|
||
info: noop,
|
||
warn: noop,
|
||
error: noop
|
||
};
|
||
var LOG_LEVELS = ["debug", "info", "warn", "error"];
|
||
function getAppender(name, logLevel, appender = console) {
|
||
const minLogLevelIdx = LOG_LEVELS.indexOf(logLevel);
|
||
if (minLogLevelIdx === -1) {
|
||
throw new Error(`MUI: Log level ${logLevel} not recognized.`);
|
||
}
|
||
const logger = LOG_LEVELS.reduce((loggerObj, method, idx) => {
|
||
if (idx >= minLogLevelIdx) {
|
||
loggerObj[method] = (...args) => {
|
||
const [message, ...other] = args;
|
||
appender[method](`MUI: ${name} - ${message}`, ...other);
|
||
};
|
||
} else {
|
||
loggerObj[method] = noop;
|
||
}
|
||
return loggerObj;
|
||
}, {});
|
||
return logger;
|
||
}
|
||
var useGridLoggerFactory = (apiRef, props) => {
|
||
const getLogger = React89.useCallback((name) => {
|
||
if (forceDebug) {
|
||
return getAppender(name, "debug", props.logger);
|
||
}
|
||
if (!props.logLevel) {
|
||
return noopLogger;
|
||
}
|
||
return getAppender(name, props.logLevel.toString(), props.logger);
|
||
}, [props.logLevel, props.logger]);
|
||
useGridApiMethod(apiRef, {
|
||
getLogger
|
||
}, "private");
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/useGridApiInitialization.js
|
||
var React90 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/utils/Store.js
|
||
var Store = class _Store {
|
||
static create(value) {
|
||
return new _Store(value);
|
||
}
|
||
constructor(_value) {
|
||
this.value = void 0;
|
||
this.listeners = void 0;
|
||
this.subscribe = (fn) => {
|
||
this.listeners.add(fn);
|
||
return () => {
|
||
this.listeners.delete(fn);
|
||
};
|
||
};
|
||
this.getSnapshot = () => {
|
||
return this.value;
|
||
};
|
||
this.update = (value) => {
|
||
this.value = value;
|
||
this.listeners.forEach((l) => l(value));
|
||
};
|
||
this.value = _value;
|
||
this.listeners = /* @__PURE__ */ new Set();
|
||
}
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/utils/EventManager.js
|
||
var EventManager = class {
|
||
constructor() {
|
||
this.maxListeners = 20;
|
||
this.warnOnce = false;
|
||
this.events = {};
|
||
}
|
||
on(eventName, listener, options = {}) {
|
||
let collection = this.events[eventName];
|
||
if (!collection) {
|
||
collection = {
|
||
highPriority: /* @__PURE__ */ new Map(),
|
||
regular: /* @__PURE__ */ new Map()
|
||
};
|
||
this.events[eventName] = collection;
|
||
}
|
||
if (options.isFirst) {
|
||
collection.highPriority.set(listener, true);
|
||
} else {
|
||
collection.regular.set(listener, true);
|
||
}
|
||
if (true) {
|
||
const collectionSize = collection.highPriority.size + collection.regular.size;
|
||
if (collectionSize > this.maxListeners && !this.warnOnce) {
|
||
this.warnOnce = true;
|
||
console.warn([`Possible EventEmitter memory leak detected. ${collectionSize} ${eventName} listeners added.`].join("\n"));
|
||
}
|
||
}
|
||
}
|
||
removeListener(eventName, listener) {
|
||
if (this.events[eventName]) {
|
||
this.events[eventName].regular.delete(listener);
|
||
this.events[eventName].highPriority.delete(listener);
|
||
}
|
||
}
|
||
removeAllListeners() {
|
||
this.events = {};
|
||
}
|
||
emit(eventName, ...args) {
|
||
const collection = this.events[eventName];
|
||
if (!collection) {
|
||
return;
|
||
}
|
||
const highPriorityListeners = Array.from(collection.highPriority.keys());
|
||
const regularListeners = Array.from(collection.regular.keys());
|
||
for (let i = highPriorityListeners.length - 1; i >= 0; i -= 1) {
|
||
const listener = highPriorityListeners[i];
|
||
if (collection.highPriority.has(listener)) {
|
||
listener.apply(this, args);
|
||
}
|
||
}
|
||
for (let i = 0; i < regularListeners.length; i += 1) {
|
||
const listener = regularListeners[i];
|
||
if (collection.regular.has(listener)) {
|
||
listener.apply(this, args);
|
||
}
|
||
}
|
||
}
|
||
once(eventName, listener) {
|
||
const that = this;
|
||
this.on(eventName, function oneTimeListener(...args) {
|
||
that.removeListener(eventName, oneTimeListener);
|
||
listener.apply(that, args);
|
||
});
|
||
}
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/useGridApiInitialization.js
|
||
var SYMBOL_API_PRIVATE = Symbol("mui.api_private");
|
||
var isSyntheticEvent = (event) => {
|
||
return event.isPropagationStopped !== void 0;
|
||
};
|
||
var globalId = 0;
|
||
function createPrivateAPI(publicApiRef) {
|
||
var _publicApiRef$current;
|
||
const existingPrivateApi = (_publicApiRef$current = publicApiRef.current) == null ? void 0 : _publicApiRef$current[SYMBOL_API_PRIVATE];
|
||
if (existingPrivateApi) {
|
||
return existingPrivateApi;
|
||
}
|
||
const state = {};
|
||
const privateApi = {
|
||
state,
|
||
store: Store.create(state),
|
||
instanceId: {
|
||
id: globalId
|
||
}
|
||
};
|
||
globalId += 1;
|
||
privateApi.getPublicApi = () => publicApiRef.current;
|
||
privateApi.register = (visibility, methods) => {
|
||
Object.keys(methods).forEach((methodName) => {
|
||
const method = methods[methodName];
|
||
const currentPrivateMethod = privateApi[methodName];
|
||
if ((currentPrivateMethod == null ? void 0 : currentPrivateMethod.spying) === true) {
|
||
currentPrivateMethod.target = method;
|
||
} else {
|
||
privateApi[methodName] = method;
|
||
}
|
||
if (visibility === "public") {
|
||
const publicApi = publicApiRef.current;
|
||
const currentPublicMethod = publicApi[methodName];
|
||
if ((currentPublicMethod == null ? void 0 : currentPublicMethod.spying) === true) {
|
||
currentPublicMethod.target = method;
|
||
} else {
|
||
publicApi[methodName] = method;
|
||
}
|
||
}
|
||
});
|
||
};
|
||
privateApi.register("private", {
|
||
caches: {},
|
||
eventManager: new EventManager()
|
||
});
|
||
return privateApi;
|
||
}
|
||
function createPublicAPI(privateApiRef) {
|
||
const publicApi = {
|
||
get state() {
|
||
return privateApiRef.current.state;
|
||
},
|
||
get store() {
|
||
return privateApiRef.current.store;
|
||
},
|
||
get instanceId() {
|
||
return privateApiRef.current.instanceId;
|
||
},
|
||
[SYMBOL_API_PRIVATE]: privateApiRef.current
|
||
};
|
||
return publicApi;
|
||
}
|
||
function useGridApiInitialization(inputApiRef, props) {
|
||
const publicApiRef = React90.useRef();
|
||
const privateApiRef = React90.useRef();
|
||
if (!privateApiRef.current) {
|
||
privateApiRef.current = createPrivateAPI(publicApiRef);
|
||
}
|
||
if (!publicApiRef.current) {
|
||
publicApiRef.current = createPublicAPI(privateApiRef);
|
||
}
|
||
const publishEvent = React90.useCallback((...args) => {
|
||
const [name, params, event = {}] = args;
|
||
event.defaultMuiPrevented = false;
|
||
if (isSyntheticEvent(event) && event.isPropagationStopped()) {
|
||
return;
|
||
}
|
||
const details = props.signature === GridSignature.DataGridPro ? {
|
||
api: privateApiRef.current.getPublicApi()
|
||
} : {};
|
||
privateApiRef.current.eventManager.emit(name, params, event, details);
|
||
}, [privateApiRef, props.signature]);
|
||
const subscribeEvent = React90.useCallback((event, handler, options) => {
|
||
privateApiRef.current.eventManager.on(event, handler, options);
|
||
const api = privateApiRef.current;
|
||
return () => {
|
||
api.eventManager.removeListener(event, handler);
|
||
};
|
||
}, [privateApiRef]);
|
||
useGridApiMethod(privateApiRef, {
|
||
subscribeEvent,
|
||
publishEvent
|
||
}, "public");
|
||
React90.useImperativeHandle(inputApiRef, () => publicApiRef.current, [publicApiRef]);
|
||
React90.useEffect(() => {
|
||
const api = privateApiRef.current;
|
||
return () => {
|
||
api.publishEvent("unmount");
|
||
};
|
||
}, [privateApiRef]);
|
||
return privateApiRef;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/useGridLocaleText.js
|
||
var React91 = __toESM(require_react());
|
||
var useGridLocaleText = (apiRef, props) => {
|
||
const getLocaleText = React91.useCallback((key) => {
|
||
if (props.localeText[key] == null) {
|
||
throw new Error(`Missing translation for key ${key}.`);
|
||
}
|
||
return props.localeText[key];
|
||
}, [props.localeText]);
|
||
apiRef.current.register("public", {
|
||
getLocaleText
|
||
});
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/pipeProcessing/useGridPipeProcessing.js
|
||
var React92 = __toESM(require_react());
|
||
var useGridPipeProcessing = (apiRef) => {
|
||
const processorsCache = React92.useRef({});
|
||
const isRunning = React92.useRef(false);
|
||
const runAppliers = React92.useCallback((groupCache) => {
|
||
if (isRunning.current || !groupCache) {
|
||
return;
|
||
}
|
||
isRunning.current = true;
|
||
Object.values(groupCache.appliers).forEach((callback) => {
|
||
callback();
|
||
});
|
||
isRunning.current = false;
|
||
}, []);
|
||
const registerPipeProcessor = React92.useCallback((group, id, processor) => {
|
||
if (!processorsCache.current[group]) {
|
||
processorsCache.current[group] = {
|
||
processors: /* @__PURE__ */ new Map(),
|
||
appliers: {}
|
||
};
|
||
}
|
||
const groupCache = processorsCache.current[group];
|
||
const oldProcessor = groupCache.processors.get(id);
|
||
if (oldProcessor !== processor) {
|
||
groupCache.processors.set(id, processor);
|
||
runAppliers(groupCache);
|
||
}
|
||
return () => {
|
||
processorsCache.current[group].processors.set(id, null);
|
||
};
|
||
}, [runAppliers]);
|
||
const registerPipeApplier = React92.useCallback((group, id, applier) => {
|
||
if (!processorsCache.current[group]) {
|
||
processorsCache.current[group] = {
|
||
processors: /* @__PURE__ */ new Map(),
|
||
appliers: {}
|
||
};
|
||
}
|
||
processorsCache.current[group].appliers[id] = applier;
|
||
return () => {
|
||
const _appliers = processorsCache.current[group].appliers, otherAppliers = _objectWithoutPropertiesLoose(_appliers, [id].map(toPropertyKey));
|
||
processorsCache.current[group].appliers = otherAppliers;
|
||
};
|
||
}, []);
|
||
const requestPipeProcessorsApplication = React92.useCallback((group) => {
|
||
const groupCache = processorsCache.current[group];
|
||
runAppliers(groupCache);
|
||
}, [runAppliers]);
|
||
const applyPipeProcessors = React92.useCallback((...args) => {
|
||
const [group, value, context] = args;
|
||
if (!processorsCache.current[group]) {
|
||
return value;
|
||
}
|
||
const preProcessors = Array.from(processorsCache.current[group].processors.values());
|
||
return preProcessors.reduce((acc, preProcessor) => {
|
||
if (!preProcessor) {
|
||
return acc;
|
||
}
|
||
return preProcessor(acc, context);
|
||
}, value);
|
||
}, []);
|
||
const preProcessingPrivateApi = {
|
||
registerPipeProcessor,
|
||
registerPipeApplier,
|
||
requestPipeProcessorsApplication
|
||
};
|
||
const preProcessingPublicApi = {
|
||
unstable_applyPipeProcessors: applyPipeProcessors
|
||
};
|
||
useGridApiMethod(apiRef, preProcessingPrivateApi, "private");
|
||
useGridApiMethod(apiRef, preProcessingPublicApi, "public");
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js
|
||
var React93 = __toESM(require_react());
|
||
var useGridRegisterPipeProcessor = (apiRef, group, callback) => {
|
||
const cleanup = React93.useRef();
|
||
const id = React93.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
|
||
const registerPreProcessor = React93.useCallback(() => {
|
||
cleanup.current = apiRef.current.registerPipeProcessor(group, id.current, callback);
|
||
}, [apiRef, callback, group]);
|
||
useFirstRender(() => {
|
||
registerPreProcessor();
|
||
});
|
||
const isFirstRender = React93.useRef(true);
|
||
React93.useEffect(() => {
|
||
if (isFirstRender.current) {
|
||
isFirstRender.current = false;
|
||
} else {
|
||
registerPreProcessor();
|
||
}
|
||
return () => {
|
||
if (cleanup.current) {
|
||
cleanup.current();
|
||
cleanup.current = null;
|
||
}
|
||
};
|
||
}, [registerPreProcessor]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js
|
||
var React94 = __toESM(require_react());
|
||
var useGridRegisterPipeApplier = (apiRef, group, callback) => {
|
||
const cleanup = React94.useRef();
|
||
const id = React94.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
|
||
const registerPreProcessor = React94.useCallback(() => {
|
||
cleanup.current = apiRef.current.registerPipeApplier(group, id.current, callback);
|
||
}, [apiRef, callback, group]);
|
||
useFirstRender(() => {
|
||
registerPreProcessor();
|
||
});
|
||
const isFirstRender = React94.useRef(true);
|
||
React94.useEffect(() => {
|
||
if (isFirstRender.current) {
|
||
isFirstRender.current = false;
|
||
} else {
|
||
registerPreProcessor();
|
||
}
|
||
return () => {
|
||
if (cleanup.current) {
|
||
cleanup.current();
|
||
cleanup.current = null;
|
||
}
|
||
};
|
||
}, [registerPreProcessor]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js
|
||
var React95 = __toESM(require_react());
|
||
var useGridRegisterStrategyProcessor = (apiRef, strategyName, group, processor) => {
|
||
const registerPreProcessor = React95.useCallback(() => {
|
||
apiRef.current.registerStrategyProcessor(strategyName, group, processor);
|
||
}, [apiRef, processor, group, strategyName]);
|
||
useFirstRender(() => {
|
||
registerPreProcessor();
|
||
});
|
||
const isFirstRender = React95.useRef(true);
|
||
React95.useEffect(() => {
|
||
if (isFirstRender.current) {
|
||
isFirstRender.current = false;
|
||
} else {
|
||
registerPreProcessor();
|
||
}
|
||
}, [registerPreProcessor]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/strategyProcessing/useGridStrategyProcessing.js
|
||
var React96 = __toESM(require_react());
|
||
var GRID_DEFAULT_STRATEGY = "none";
|
||
var GRID_STRATEGIES_PROCESSORS = {
|
||
rowTreeCreation: "rowTree",
|
||
filtering: "rowTree",
|
||
sorting: "rowTree",
|
||
visibleRowsLookupCreation: "rowTree"
|
||
};
|
||
var useGridStrategyProcessing = (apiRef) => {
|
||
const availableStrategies = React96.useRef(/* @__PURE__ */ new Map());
|
||
const strategiesCache = React96.useRef({});
|
||
const registerStrategyProcessor = React96.useCallback((strategyName, processorName, processor) => {
|
||
const cleanup = () => {
|
||
const _ref = strategiesCache.current[processorName], otherProcessors = _objectWithoutPropertiesLoose(_ref, [strategyName].map(toPropertyKey));
|
||
strategiesCache.current[processorName] = otherProcessors;
|
||
};
|
||
if (!strategiesCache.current[processorName]) {
|
||
strategiesCache.current[processorName] = {};
|
||
}
|
||
const groupPreProcessors = strategiesCache.current[processorName];
|
||
const previousProcessor = groupPreProcessors[strategyName];
|
||
groupPreProcessors[strategyName] = processor;
|
||
if (!previousProcessor || previousProcessor === processor) {
|
||
return cleanup;
|
||
}
|
||
if (strategyName === apiRef.current.getActiveStrategy(GRID_STRATEGIES_PROCESSORS[processorName])) {
|
||
apiRef.current.publishEvent("activeStrategyProcessorChange", processorName);
|
||
}
|
||
return cleanup;
|
||
}, [apiRef]);
|
||
const applyStrategyProcessor = React96.useCallback((processorName, params) => {
|
||
const activeStrategy = apiRef.current.getActiveStrategy(GRID_STRATEGIES_PROCESSORS[processorName]);
|
||
if (activeStrategy == null) {
|
||
throw new Error("Can't apply a strategy processor before defining an active strategy");
|
||
}
|
||
const groupCache = strategiesCache.current[processorName];
|
||
if (!groupCache || !groupCache[activeStrategy]) {
|
||
throw new Error(`No processor found for processor "${processorName}" on strategy "${activeStrategy}"`);
|
||
}
|
||
const processor = groupCache[activeStrategy];
|
||
return processor(params);
|
||
}, [apiRef]);
|
||
const getActiveStrategy = React96.useCallback((strategyGroup) => {
|
||
var _availableStrategyEnt;
|
||
const strategyEntries = Array.from(availableStrategies.current.entries());
|
||
const availableStrategyEntry = strategyEntries.find(([, strategy]) => {
|
||
if (strategy.group !== strategyGroup) {
|
||
return false;
|
||
}
|
||
return strategy.isAvailable();
|
||
});
|
||
return (_availableStrategyEnt = availableStrategyEntry == null ? void 0 : availableStrategyEntry[0]) != null ? _availableStrategyEnt : GRID_DEFAULT_STRATEGY;
|
||
}, []);
|
||
const setStrategyAvailability = React96.useCallback((strategyGroup, strategyName, isAvailable) => {
|
||
availableStrategies.current.set(strategyName, {
|
||
group: strategyGroup,
|
||
isAvailable
|
||
});
|
||
apiRef.current.publishEvent("strategyAvailabilityChange");
|
||
}, [apiRef]);
|
||
const strategyProcessingApi = {
|
||
registerStrategyProcessor,
|
||
applyStrategyProcessor,
|
||
getActiveStrategy,
|
||
setStrategyAvailability
|
||
};
|
||
useGridApiMethod(apiRef, strategyProcessingApi, "private");
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/useGridStateInitialization.js
|
||
init_extends();
|
||
var React97 = __toESM(require_react());
|
||
var useGridStateInitialization = (apiRef, props) => {
|
||
const controlStateMapRef = React97.useRef({});
|
||
const [, rawForceUpdate] = React97.useState();
|
||
const registerControlState = React97.useCallback((controlStateItem) => {
|
||
controlStateMapRef.current[controlStateItem.stateId] = controlStateItem;
|
||
}, []);
|
||
const setState = React97.useCallback((state, reason) => {
|
||
let newState;
|
||
if (isFunction(state)) {
|
||
newState = state(apiRef.current.state);
|
||
} else {
|
||
newState = state;
|
||
}
|
||
if (apiRef.current.state === newState) {
|
||
return false;
|
||
}
|
||
let ignoreSetState = false;
|
||
const updatedControlStateIds = [];
|
||
Object.keys(controlStateMapRef.current).forEach((stateId) => {
|
||
const controlState = controlStateMapRef.current[stateId];
|
||
const oldSubState = controlState.stateSelector(apiRef.current.state, apiRef.current.instanceId);
|
||
const newSubState = controlState.stateSelector(newState, apiRef.current.instanceId);
|
||
if (newSubState === oldSubState) {
|
||
return;
|
||
}
|
||
updatedControlStateIds.push({
|
||
stateId: controlState.stateId,
|
||
hasPropChanged: newSubState !== controlState.propModel
|
||
});
|
||
if (controlState.propModel !== void 0 && newSubState !== controlState.propModel) {
|
||
ignoreSetState = true;
|
||
}
|
||
});
|
||
if (updatedControlStateIds.length > 1) {
|
||
throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${updatedControlStateIds[0].stateId}, therefore, you're not allowed to update ${updatedControlStateIds.map((el) => el.stateId).join(", ")} in the same transaction.`);
|
||
}
|
||
if (!ignoreSetState) {
|
||
apiRef.current.state = newState;
|
||
if (apiRef.current.publishEvent) {
|
||
apiRef.current.publishEvent("stateChange", newState);
|
||
}
|
||
apiRef.current.store.update(newState);
|
||
}
|
||
if (updatedControlStateIds.length === 1) {
|
||
const {
|
||
stateId,
|
||
hasPropChanged
|
||
} = updatedControlStateIds[0];
|
||
const controlState = controlStateMapRef.current[stateId];
|
||
const model = controlState.stateSelector(newState, apiRef.current.instanceId);
|
||
if (controlState.propOnChange && hasPropChanged) {
|
||
const details = props.signature === GridSignature.DataGridPro ? {
|
||
api: apiRef.current,
|
||
reason
|
||
} : {
|
||
reason
|
||
};
|
||
controlState.propOnChange(model, details);
|
||
}
|
||
if (!ignoreSetState) {
|
||
apiRef.current.publishEvent(controlState.changeEvent, model, {
|
||
reason
|
||
});
|
||
}
|
||
}
|
||
return !ignoreSetState;
|
||
}, [apiRef, props.signature]);
|
||
const updateControlState = React97.useCallback((key, state, reason) => {
|
||
return apiRef.current.setState((previousState) => {
|
||
return _extends({}, previousState, {
|
||
[key]: state(previousState[key])
|
||
});
|
||
}, reason);
|
||
}, [apiRef]);
|
||
const forceUpdate = React97.useCallback(() => rawForceUpdate(() => apiRef.current.state), [apiRef]);
|
||
const publicStateApi = {
|
||
setState,
|
||
forceUpdate
|
||
};
|
||
const privateStateApi = {
|
||
updateControlState,
|
||
registerControlState
|
||
};
|
||
useGridApiMethod(apiRef, publicStateApi, "public");
|
||
useGridApiMethod(apiRef, privateStateApi, "private");
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/core/useGridInitialization.js
|
||
var useGridInitialization = (inputApiRef, props) => {
|
||
const privateApiRef = useGridApiInitialization(inputApiRef, props);
|
||
useGridLoggerFactory(privateApiRef, props);
|
||
useGridStateInitialization(privateApiRef, props);
|
||
useGridPipeProcessing(privateApiRef);
|
||
useGridStrategyProcessing(privateApiRef);
|
||
useGridLocaleText(privateApiRef, props);
|
||
privateApiRef.current.register("private", {
|
||
rootProps: props
|
||
});
|
||
return privateApiRef;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/utils/useGridInitializeState.js
|
||
var React98 = __toESM(require_react());
|
||
var useGridInitializeState = (initializer, privateApiRef, props) => {
|
||
const isInitialized = React98.useRef(false);
|
||
if (!isInitialized.current) {
|
||
privateApiRef.current.state = initializer(privateApiRef.current.state, props, privateApiRef);
|
||
isInitialized.current = true;
|
||
}
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/clipboard/useGridClipboard.js
|
||
var React99 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridDateColDef.js
|
||
init_extends();
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridDateOperators.js
|
||
var dateRegex = /(\d+)-(\d+)-(\d+)/;
|
||
var dateTimeRegex = /(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;
|
||
function buildApplyFilterFn(filterItem, compareFn, showTime, keepHours) {
|
||
if (!filterItem.value) {
|
||
return null;
|
||
}
|
||
const [year, month, day, hour, minute] = filterItem.value.match(showTime ? dateTimeRegex : dateRegex).slice(1).map(Number);
|
||
const time = new Date(year, month - 1, day, hour || 0, minute || 0).getTime();
|
||
return (value) => {
|
||
if (!value) {
|
||
return false;
|
||
}
|
||
if (keepHours) {
|
||
return compareFn(value.getTime(), time);
|
||
}
|
||
const dateCopy = new Date(value);
|
||
const timeToCompare = dateCopy.setHours(showTime ? value.getHours() : 0, showTime ? value.getMinutes() : 0, 0, 0);
|
||
return compareFn(timeToCompare, time);
|
||
};
|
||
}
|
||
var getGridDateOperators = (showTime) => convertLegacyOperators([{
|
||
value: "is",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
return buildApplyFilterFn(filterItem, (value1, value2) => value1 === value2, showTime);
|
||
},
|
||
InputComponent: GridFilterInputDate,
|
||
InputComponentProps: {
|
||
type: showTime ? "datetime-local" : "date"
|
||
}
|
||
}, {
|
||
value: "not",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
return buildApplyFilterFn(filterItem, (value1, value2) => value1 !== value2, showTime);
|
||
},
|
||
InputComponent: GridFilterInputDate,
|
||
InputComponentProps: {
|
||
type: showTime ? "datetime-local" : "date"
|
||
}
|
||
}, {
|
||
value: "after",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
return buildApplyFilterFn(filterItem, (value1, value2) => value1 > value2, showTime);
|
||
},
|
||
InputComponent: GridFilterInputDate,
|
||
InputComponentProps: {
|
||
type: showTime ? "datetime-local" : "date"
|
||
}
|
||
}, {
|
||
value: "onOrAfter",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
return buildApplyFilterFn(filterItem, (value1, value2) => value1 >= value2, showTime);
|
||
},
|
||
InputComponent: GridFilterInputDate,
|
||
InputComponentProps: {
|
||
type: showTime ? "datetime-local" : "date"
|
||
}
|
||
}, {
|
||
value: "before",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
return buildApplyFilterFn(filterItem, (value1, value2) => value1 < value2, showTime, !showTime);
|
||
},
|
||
InputComponent: GridFilterInputDate,
|
||
InputComponentProps: {
|
||
type: showTime ? "datetime-local" : "date"
|
||
}
|
||
}, {
|
||
value: "onOrBefore",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
return buildApplyFilterFn(filterItem, (value1, value2) => value1 <= value2, showTime);
|
||
},
|
||
InputComponent: GridFilterInputDate,
|
||
InputComponentProps: {
|
||
type: showTime ? "datetime-local" : "date"
|
||
}
|
||
}, {
|
||
value: "isEmpty",
|
||
getApplyFilterFnV7: () => {
|
||
return (value) => {
|
||
return value == null;
|
||
};
|
||
},
|
||
requiresFilterValue: false
|
||
}, {
|
||
value: "isNotEmpty",
|
||
getApplyFilterFnV7: () => {
|
||
return (value) => {
|
||
return value != null;
|
||
};
|
||
},
|
||
requiresFilterValue: false
|
||
}]);
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridDateColDef.js
|
||
function throwIfNotDateObject({
|
||
value,
|
||
columnType,
|
||
rowId,
|
||
field
|
||
}) {
|
||
if (!(value instanceof Date)) {
|
||
throw new Error([`MUI: \`${columnType}\` column type only accepts \`Date\` objects as values.`, "Use `valueGetter` to transform the value into a `Date` object.", `Row ID: ${rowId}, field: "${field}".`].join("\n"));
|
||
}
|
||
}
|
||
function gridDateFormatter({
|
||
value,
|
||
field,
|
||
id
|
||
}) {
|
||
if (!value) {
|
||
return "";
|
||
}
|
||
throwIfNotDateObject({
|
||
value,
|
||
columnType: "date",
|
||
rowId: id,
|
||
field
|
||
});
|
||
return value.toLocaleDateString();
|
||
}
|
||
function gridDateTimeFormatter({
|
||
value,
|
||
field,
|
||
id
|
||
}) {
|
||
if (!value) {
|
||
return "";
|
||
}
|
||
throwIfNotDateObject({
|
||
value,
|
||
columnType: "dateTime",
|
||
rowId: id,
|
||
field
|
||
});
|
||
return value.toLocaleString();
|
||
}
|
||
var GRID_DATE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
||
type: "date",
|
||
sortComparator: gridDateComparator,
|
||
valueFormatter: gridDateFormatter,
|
||
filterOperators: getGridDateOperators(),
|
||
renderEditCell: renderEditDateCell,
|
||
// @ts-ignore
|
||
pastedValueParser: (value) => new Date(value)
|
||
});
|
||
var GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
||
type: "dateTime",
|
||
sortComparator: gridDateComparator,
|
||
valueFormatter: gridDateTimeFormatter,
|
||
filterOperators: getGridDateOperators(true),
|
||
renderEditCell: renderEditDateCell,
|
||
// @ts-ignore
|
||
pastedValueParser: (value) => new Date(value)
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridNumericColDef.js
|
||
init_extends();
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridNumericOperators.js
|
||
var parseNumericValue = (value) => {
|
||
if (value == null) {
|
||
return null;
|
||
}
|
||
return Number(value);
|
||
};
|
||
var getGridNumericQuickFilterFn = tagInternalFilter((value) => {
|
||
if (value == null || Number.isNaN(value) || value === "") {
|
||
return null;
|
||
}
|
||
return (columnValue) => {
|
||
return parseNumericValue(columnValue) === parseNumericValue(value);
|
||
};
|
||
});
|
||
var getGridNumericOperators = () => convertLegacyOperators([{
|
||
value: "=",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
||
return null;
|
||
}
|
||
return (value) => {
|
||
return parseNumericValue(value) === filterItem.value;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue,
|
||
InputComponentProps: {
|
||
type: "number"
|
||
}
|
||
}, {
|
||
value: "!=",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
||
return null;
|
||
}
|
||
return (value) => {
|
||
return parseNumericValue(value) !== filterItem.value;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue,
|
||
InputComponentProps: {
|
||
type: "number"
|
||
}
|
||
}, {
|
||
value: ">",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
||
return null;
|
||
}
|
||
return (value) => {
|
||
if (value == null) {
|
||
return false;
|
||
}
|
||
return parseNumericValue(value) > filterItem.value;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue,
|
||
InputComponentProps: {
|
||
type: "number"
|
||
}
|
||
}, {
|
||
value: ">=",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
||
return null;
|
||
}
|
||
return (value) => {
|
||
if (value == null) {
|
||
return false;
|
||
}
|
||
return parseNumericValue(value) >= filterItem.value;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue,
|
||
InputComponentProps: {
|
||
type: "number"
|
||
}
|
||
}, {
|
||
value: "<",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
||
return null;
|
||
}
|
||
return (value) => {
|
||
if (value == null) {
|
||
return false;
|
||
}
|
||
return parseNumericValue(value) < filterItem.value;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue,
|
||
InputComponentProps: {
|
||
type: "number"
|
||
}
|
||
}, {
|
||
value: "<=",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
||
return null;
|
||
}
|
||
return (value) => {
|
||
if (value == null) {
|
||
return false;
|
||
}
|
||
return parseNumericValue(value) <= filterItem.value;
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputValue,
|
||
InputComponentProps: {
|
||
type: "number"
|
||
}
|
||
}, {
|
||
value: "isEmpty",
|
||
getApplyFilterFnV7: () => {
|
||
return (value) => {
|
||
return value == null;
|
||
};
|
||
},
|
||
requiresFilterValue: false
|
||
}, {
|
||
value: "isNotEmpty",
|
||
getApplyFilterFnV7: () => {
|
||
return (value) => {
|
||
return value != null;
|
||
};
|
||
},
|
||
requiresFilterValue: false
|
||
}, {
|
||
value: "isAnyOf",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (!Array.isArray(filterItem.value) || filterItem.value.length === 0) {
|
||
return null;
|
||
}
|
||
return (value) => {
|
||
return value != null && filterItem.value.includes(Number(value));
|
||
};
|
||
},
|
||
InputComponent: GridFilterInputMultipleValue,
|
||
InputComponentProps: {
|
||
type: "number"
|
||
}
|
||
}]);
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridNumericColDef.js
|
||
var GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
||
type: "number",
|
||
align: "right",
|
||
headerAlign: "right",
|
||
sortComparator: gridNumberComparator,
|
||
valueParser: (value) => value === "" ? null : Number(value),
|
||
valueFormatter: ({
|
||
value
|
||
}) => isNumber(value) ? value.toLocaleString() : value || "",
|
||
filterOperators: getGridNumericOperators(),
|
||
getApplyQuickFilterFn: convertQuickFilterV7ToLegacy(getGridNumericQuickFilterFn),
|
||
getApplyQuickFilterFnV7: getGridNumericQuickFilterFn
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridSingleSelectColDef.js
|
||
init_extends();
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridSingleSelectOperators.js
|
||
var parseObjectValue = (value) => {
|
||
if (value == null || !isObject(value)) {
|
||
return value;
|
||
}
|
||
return value.value;
|
||
};
|
||
var getGridSingleSelectOperators = () => convertLegacyOperators([{
|
||
value: "is",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (filterItem.value == null || filterItem.value === "") {
|
||
return null;
|
||
}
|
||
return (value) => parseObjectValue(value) === parseObjectValue(filterItem.value);
|
||
},
|
||
InputComponent: GridFilterInputSingleSelect
|
||
}, {
|
||
value: "not",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (filterItem.value == null || filterItem.value === "") {
|
||
return null;
|
||
}
|
||
return (value) => parseObjectValue(value) !== parseObjectValue(filterItem.value);
|
||
},
|
||
InputComponent: GridFilterInputSingleSelect
|
||
}, {
|
||
value: "isAnyOf",
|
||
getApplyFilterFnV7: (filterItem) => {
|
||
if (!Array.isArray(filterItem.value) || filterItem.value.length === 0) {
|
||
return null;
|
||
}
|
||
const filterItemValues = filterItem.value.map(parseObjectValue);
|
||
return (value) => filterItemValues.includes(parseObjectValue(value));
|
||
},
|
||
InputComponent: GridFilterInputMultipleSingleSelect
|
||
}]);
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridSingleSelectColDef.js
|
||
var isArrayOfObjects = (options) => {
|
||
return typeof options[0] === "object";
|
||
};
|
||
var defaultGetOptionValue = (value) => {
|
||
return isObject(value) ? value.value : value;
|
||
};
|
||
var defaultGetOptionLabel = (value) => {
|
||
return isObject(value) ? value.label : String(value);
|
||
};
|
||
var GRID_SINGLE_SELECT_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
||
type: "singleSelect",
|
||
getOptionLabel: defaultGetOptionLabel,
|
||
getOptionValue: defaultGetOptionValue,
|
||
valueFormatter(params) {
|
||
const {
|
||
id,
|
||
field,
|
||
value,
|
||
api
|
||
} = params;
|
||
const colDef = params.api.getColumn(field);
|
||
if (!isSingleSelectColDef(colDef)) {
|
||
return "";
|
||
}
|
||
let valueOptions;
|
||
if (typeof colDef.valueOptions === "function") {
|
||
valueOptions = colDef.valueOptions({
|
||
id,
|
||
row: id ? api.getRow(id) : null,
|
||
field
|
||
});
|
||
} else {
|
||
valueOptions = colDef.valueOptions;
|
||
}
|
||
if (value == null) {
|
||
return "";
|
||
}
|
||
if (!valueOptions) {
|
||
return value;
|
||
}
|
||
if (!isArrayOfObjects(valueOptions)) {
|
||
return colDef.getOptionLabel(value);
|
||
}
|
||
const valueOption = valueOptions.find((option) => colDef.getOptionValue(option) === value);
|
||
return valueOption ? colDef.getOptionLabel(valueOption) : "";
|
||
},
|
||
renderEditCell: renderEditSingleSelectCell,
|
||
filterOperators: getGridSingleSelectOperators(),
|
||
// @ts-ignore
|
||
pastedValueParser: (value, params) => {
|
||
const colDef = params.colDef;
|
||
const colDefValueOptions = colDef.valueOptions;
|
||
const valueOptions = typeof colDefValueOptions === "function" ? colDefValueOptions({
|
||
field: colDef.field
|
||
}) : colDefValueOptions || [];
|
||
const getOptionValue = colDef.getOptionValue;
|
||
const valueOption = valueOptions.find((option) => {
|
||
if (getOptionValue(option) === value) {
|
||
return true;
|
||
}
|
||
return false;
|
||
});
|
||
if (valueOption) {
|
||
return value;
|
||
}
|
||
return void 0;
|
||
}
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/colDef/gridDefaultColumnTypes.js
|
||
var DEFAULT_GRID_COL_TYPE_KEY = "__default__";
|
||
var getGridDefaultColumnTypes = () => {
|
||
const nativeColumnTypes = {
|
||
string: GRID_STRING_COL_DEF,
|
||
number: GRID_NUMERIC_COL_DEF,
|
||
date: GRID_DATE_COL_DEF,
|
||
dateTime: GRID_DATETIME_COL_DEF,
|
||
boolean: GRID_BOOLEAN_COL_DEF,
|
||
singleSelect: GRID_SINGLE_SELECT_COL_DEF,
|
||
[GRID_ACTIONS_COLUMN_TYPE]: GRID_ACTIONS_COL_DEF,
|
||
[DEFAULT_GRID_COL_TYPE_KEY]: GRID_STRING_COL_DEF
|
||
};
|
||
return nativeColumnTypes;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/export/serializers/csvSerializer.js
|
||
function sanitizeCellValue(value, csvOptions) {
|
||
if (typeof value === "string") {
|
||
if (csvOptions.shouldAppendQuotes || csvOptions.escapeFormulas) {
|
||
const escapedValue = value.replace(/"/g, '""');
|
||
if ([csvOptions.delimiter, "\n", "\r", '"'].some((delimiter) => value.includes(delimiter))) {
|
||
return `"${escapedValue}"`;
|
||
}
|
||
if (csvOptions.escapeFormulas) {
|
||
if (["=", "+", "-", "@", " ", "\r"].includes(escapedValue[0])) {
|
||
return `'${escapedValue}`;
|
||
}
|
||
}
|
||
return escapedValue;
|
||
}
|
||
return value;
|
||
}
|
||
return value;
|
||
}
|
||
var serializeCellValue = (cellParams, options) => {
|
||
const {
|
||
csvOptions,
|
||
ignoreValueFormatter
|
||
} = options;
|
||
let value;
|
||
if (ignoreValueFormatter) {
|
||
var _cellParams$value2;
|
||
const columnType = cellParams.colDef.type;
|
||
if (columnType === "number") {
|
||
value = String(cellParams.value);
|
||
} else if (columnType === "date" || columnType === "dateTime") {
|
||
var _cellParams$value;
|
||
value = (_cellParams$value = cellParams.value) == null ? void 0 : _cellParams$value.toISOString();
|
||
} else if (typeof ((_cellParams$value2 = cellParams.value) == null ? void 0 : _cellParams$value2.toString) === "function") {
|
||
value = cellParams.value.toString();
|
||
} else {
|
||
value = cellParams.value;
|
||
}
|
||
} else {
|
||
value = cellParams.formattedValue;
|
||
}
|
||
return sanitizeCellValue(value, csvOptions);
|
||
};
|
||
var objectFormattedValueWarning = buildWarning(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.", "You can provide a `valueFormatter` with a string representation to be used."]);
|
||
var CSVRow = class {
|
||
constructor(options) {
|
||
this.options = void 0;
|
||
this.rowString = "";
|
||
this.isEmpty = true;
|
||
this.options = options;
|
||
}
|
||
addValue(value) {
|
||
if (!this.isEmpty) {
|
||
this.rowString += this.options.csvOptions.delimiter;
|
||
}
|
||
if (value === null || value === void 0) {
|
||
this.rowString += "";
|
||
} else if (typeof this.options.sanitizeCellValue === "function") {
|
||
this.rowString += this.options.sanitizeCellValue(value, this.options.csvOptions);
|
||
} else {
|
||
this.rowString += value;
|
||
}
|
||
this.isEmpty = false;
|
||
}
|
||
getRowString() {
|
||
return this.rowString;
|
||
}
|
||
};
|
||
var serializeRow = ({
|
||
id,
|
||
columns,
|
||
getCellParams,
|
||
csvOptions,
|
||
ignoreValueFormatter
|
||
}) => {
|
||
const row = new CSVRow({
|
||
csvOptions
|
||
});
|
||
columns.forEach((column) => {
|
||
const cellParams = getCellParams(id, column.field);
|
||
if (true) {
|
||
if (String(cellParams.formattedValue) === "[object Object]") {
|
||
objectFormattedValueWarning();
|
||
}
|
||
}
|
||
row.addValue(serializeCellValue(cellParams, {
|
||
ignoreValueFormatter,
|
||
csvOptions
|
||
}));
|
||
});
|
||
return row.getRowString();
|
||
};
|
||
function buildCSV(options) {
|
||
const {
|
||
columns,
|
||
rowIds,
|
||
csvOptions,
|
||
ignoreValueFormatter,
|
||
apiRef
|
||
} = options;
|
||
const CSVBody = rowIds.reduce((acc, id) => `${acc}${serializeRow({
|
||
id,
|
||
columns,
|
||
getCellParams: apiRef.current.getCellParams,
|
||
ignoreValueFormatter,
|
||
csvOptions
|
||
})}\r
|
||
`, "").trim();
|
||
if (!csvOptions.includeHeaders) {
|
||
return CSVBody;
|
||
}
|
||
const filteredColumns = columns.filter((column) => column.field !== GRID_CHECKBOX_SELECTION_COL_DEF.field);
|
||
const headerRows = [];
|
||
if (csvOptions.includeColumnGroupsHeaders) {
|
||
const columnGroupLookup = apiRef.current.unstable_getAllGroupDetails();
|
||
let maxColumnGroupsDepth = 0;
|
||
const columnGroupPathsLookup = filteredColumns.reduce((acc, column) => {
|
||
const columnGroupPath = apiRef.current.unstable_getColumnGroupPath(column.field);
|
||
acc[column.field] = columnGroupPath;
|
||
maxColumnGroupsDepth = Math.max(maxColumnGroupsDepth, columnGroupPath.length);
|
||
return acc;
|
||
}, {});
|
||
for (let i = 0; i < maxColumnGroupsDepth; i += 1) {
|
||
const headerGroupRow = new CSVRow({
|
||
csvOptions,
|
||
sanitizeCellValue
|
||
});
|
||
headerRows.push(headerGroupRow);
|
||
filteredColumns.forEach((column) => {
|
||
const columnGroupId = (columnGroupPathsLookup[column.field] || [])[i];
|
||
const columnGroup = columnGroupLookup[columnGroupId];
|
||
headerGroupRow.addValue(columnGroup ? columnGroup.headerName || columnGroup.groupId : "");
|
||
});
|
||
}
|
||
}
|
||
const mainHeaderRow = new CSVRow({
|
||
csvOptions,
|
||
sanitizeCellValue
|
||
});
|
||
filteredColumns.forEach((column) => {
|
||
mainHeaderRow.addValue(column.headerName || column.field);
|
||
});
|
||
headerRows.push(mainHeaderRow);
|
||
const CSVHead = `${headerRows.map((row) => row.getRowString()).join("\r\n")}\r
|
||
`;
|
||
return `${CSVHead}${CSVBody}`.trim();
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/clipboard/useGridClipboard.js
|
||
function writeToClipboardPolyfill(data) {
|
||
const span = document.createElement("span");
|
||
span.style.whiteSpace = "pre";
|
||
span.style.userSelect = "all";
|
||
span.style.opacity = "0px";
|
||
span.textContent = data;
|
||
document.body.appendChild(span);
|
||
const range = document.createRange();
|
||
range.selectNode(span);
|
||
const selection = window.getSelection();
|
||
selection.removeAllRanges();
|
||
selection.addRange(range);
|
||
try {
|
||
document.execCommand("copy");
|
||
} finally {
|
||
document.body.removeChild(span);
|
||
}
|
||
}
|
||
function copyToClipboard(data) {
|
||
if (navigator.clipboard) {
|
||
navigator.clipboard.writeText(data).catch(() => {
|
||
writeToClipboardPolyfill(data);
|
||
});
|
||
} else {
|
||
writeToClipboardPolyfill(data);
|
||
}
|
||
}
|
||
function hasNativeSelection(element) {
|
||
var _window$getSelection;
|
||
if ((_window$getSelection = window.getSelection()) != null && _window$getSelection.toString()) {
|
||
return true;
|
||
}
|
||
if (element && (element.selectionEnd || 0) - (element.selectionStart || 0) > 0) {
|
||
return true;
|
||
}
|
||
return false;
|
||
}
|
||
var useGridClipboard = (apiRef, props) => {
|
||
const ignoreValueFormatterProp = props.unstable_ignoreValueFormatterDuringExport;
|
||
const ignoreValueFormatter = (typeof ignoreValueFormatterProp === "object" ? ignoreValueFormatterProp == null ? void 0 : ignoreValueFormatterProp.clipboardExport : ignoreValueFormatterProp) || false;
|
||
const clipboardCopyCellDelimiter = props.clipboardCopyCellDelimiter;
|
||
const handleCopy = React99.useCallback((event) => {
|
||
if (!((event.ctrlKey || event.metaKey) && event.key === "c")) {
|
||
return;
|
||
}
|
||
if (hasNativeSelection(event.target)) {
|
||
return;
|
||
}
|
||
let textToCopy = "";
|
||
const selectedRows = apiRef.current.getSelectedRows();
|
||
if (selectedRows.size > 0) {
|
||
textToCopy = apiRef.current.getDataAsCsv({
|
||
includeHeaders: false,
|
||
delimiter: clipboardCopyCellDelimiter,
|
||
shouldAppendQuotes: false,
|
||
escapeFormulas: false
|
||
});
|
||
} else {
|
||
const focusedCell = gridFocusCellSelector(apiRef);
|
||
if (focusedCell) {
|
||
const cellParams = apiRef.current.getCellParams(focusedCell.id, focusedCell.field);
|
||
textToCopy = serializeCellValue(cellParams, {
|
||
csvOptions: {
|
||
delimiter: clipboardCopyCellDelimiter,
|
||
shouldAppendQuotes: false,
|
||
escapeFormulas: false
|
||
},
|
||
ignoreValueFormatter
|
||
});
|
||
}
|
||
}
|
||
textToCopy = apiRef.current.unstable_applyPipeProcessors("clipboardCopy", textToCopy);
|
||
if (textToCopy) {
|
||
copyToClipboard(textToCopy);
|
||
apiRef.current.publishEvent("clipboardCopy", textToCopy);
|
||
}
|
||
}, [apiRef, ignoreValueFormatter, clipboardCopyCellDelimiter]);
|
||
useGridNativeEventListener(apiRef, apiRef.current.rootElementRef, "keydown", handleCopy);
|
||
useGridApiOptionHandler(apiRef, "clipboardCopy", props.onClipboardCopy);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columnMenu/useGridColumnMenu.js
|
||
init_extends();
|
||
var React100 = __toESM(require_react());
|
||
var columnMenuStateInitializer = (state) => _extends({}, state, {
|
||
columnMenu: {
|
||
open: false
|
||
}
|
||
});
|
||
var useGridColumnMenu = (apiRef) => {
|
||
const logger = useGridLogger(apiRef, "useGridColumnMenu");
|
||
const showColumnMenu = React100.useCallback((field) => {
|
||
const shouldUpdate = apiRef.current.setState((state) => {
|
||
if (state.columnMenu.open && state.columnMenu.field === field) {
|
||
return state;
|
||
}
|
||
logger.debug("Opening Column Menu");
|
||
return _extends({}, state, {
|
||
columnMenu: {
|
||
open: true,
|
||
field
|
||
}
|
||
});
|
||
});
|
||
if (shouldUpdate) {
|
||
apiRef.current.hidePreferences();
|
||
apiRef.current.forceUpdate();
|
||
}
|
||
}, [apiRef, logger]);
|
||
const hideColumnMenu = React100.useCallback(() => {
|
||
const columnMenuState = gridColumnMenuSelector(apiRef.current.state);
|
||
if (columnMenuState.field) {
|
||
const columnLookup = gridColumnLookupSelector(apiRef);
|
||
const columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef);
|
||
const orderedFields = gridColumnFieldsSelector(apiRef);
|
||
let fieldToFocus = columnMenuState.field;
|
||
if (!columnLookup[fieldToFocus]) {
|
||
fieldToFocus = orderedFields[0];
|
||
}
|
||
if (columnVisibilityModel[fieldToFocus] === false) {
|
||
const visibleOrderedFields = orderedFields.filter((field) => {
|
||
if (field === fieldToFocus) {
|
||
return true;
|
||
}
|
||
return columnVisibilityModel[field] !== false;
|
||
});
|
||
const fieldIndex = visibleOrderedFields.indexOf(fieldToFocus);
|
||
fieldToFocus = visibleOrderedFields[fieldIndex + 1] || visibleOrderedFields[fieldIndex - 1];
|
||
}
|
||
apiRef.current.setColumnHeaderFocus(fieldToFocus);
|
||
}
|
||
const shouldUpdate = apiRef.current.setState((state) => {
|
||
if (!state.columnMenu.open && state.columnMenu.field === void 0) {
|
||
return state;
|
||
}
|
||
logger.debug("Hiding Column Menu");
|
||
return _extends({}, state, {
|
||
columnMenu: _extends({}, state.columnMenu, {
|
||
open: false,
|
||
field: void 0
|
||
})
|
||
});
|
||
});
|
||
if (shouldUpdate) {
|
||
apiRef.current.forceUpdate();
|
||
}
|
||
}, [apiRef, logger]);
|
||
const toggleColumnMenu = React100.useCallback((field) => {
|
||
logger.debug("Toggle Column Menu");
|
||
const columnMenu = gridColumnMenuSelector(apiRef.current.state);
|
||
if (!columnMenu.open || columnMenu.field !== field) {
|
||
showColumnMenu(field);
|
||
} else {
|
||
hideColumnMenu();
|
||
}
|
||
}, [apiRef, logger, showColumnMenu, hideColumnMenu]);
|
||
const columnMenuApi = {
|
||
showColumnMenu,
|
||
hideColumnMenu,
|
||
toggleColumnMenu
|
||
};
|
||
useGridApiMethod(apiRef, columnMenuApi, "public");
|
||
useGridApiEventHandler(apiRef, "columnResizeStart", hideColumnMenu);
|
||
useGridApiEventHandler(apiRef, "virtualScrollerWheel", apiRef.current.hideColumnMenu);
|
||
useGridApiEventHandler(apiRef, "virtualScrollerTouchMove", apiRef.current.hideColumnMenu);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columns/useGridColumns.js
|
||
init_extends();
|
||
var React101 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columns/gridColumnsUtils.js
|
||
init_extends();
|
||
var COLUMNS_DIMENSION_PROPERTIES = ["maxWidth", "minWidth", "width", "flex"];
|
||
function computeFlexColumnsWidth({
|
||
initialFreeSpace,
|
||
totalFlexUnits,
|
||
flexColumns
|
||
}) {
|
||
const uniqueFlexColumns = new Set(flexColumns.map((col) => col.field));
|
||
const flexColumnsLookup = {
|
||
all: {},
|
||
frozenFields: [],
|
||
freeze: (field) => {
|
||
const value = flexColumnsLookup.all[field];
|
||
if (value && value.frozen !== true) {
|
||
flexColumnsLookup.all[field].frozen = true;
|
||
flexColumnsLookup.frozenFields.push(field);
|
||
}
|
||
}
|
||
};
|
||
function loopOverFlexItems() {
|
||
if (flexColumnsLookup.frozenFields.length === uniqueFlexColumns.size) {
|
||
return;
|
||
}
|
||
const violationsLookup = {
|
||
min: {},
|
||
max: {}
|
||
};
|
||
let remainingFreeSpace = initialFreeSpace;
|
||
let flexUnits = totalFlexUnits;
|
||
let totalViolation = 0;
|
||
flexColumnsLookup.frozenFields.forEach((field) => {
|
||
remainingFreeSpace -= flexColumnsLookup.all[field].computedWidth;
|
||
flexUnits -= flexColumnsLookup.all[field].flex;
|
||
});
|
||
for (let i = 0; i < flexColumns.length; i += 1) {
|
||
const column = flexColumns[i];
|
||
if (flexColumnsLookup.all[column.field] && flexColumnsLookup.all[column.field].frozen === true) {
|
||
continue;
|
||
}
|
||
const widthPerFlexUnit = remainingFreeSpace / flexUnits;
|
||
let computedWidth = widthPerFlexUnit * column.flex;
|
||
if (computedWidth < column.minWidth) {
|
||
totalViolation += column.minWidth - computedWidth;
|
||
computedWidth = column.minWidth;
|
||
violationsLookup.min[column.field] = true;
|
||
} else if (computedWidth > column.maxWidth) {
|
||
totalViolation += column.maxWidth - computedWidth;
|
||
computedWidth = column.maxWidth;
|
||
violationsLookup.max[column.field] = true;
|
||
}
|
||
flexColumnsLookup.all[column.field] = {
|
||
frozen: false,
|
||
computedWidth,
|
||
flex: column.flex
|
||
};
|
||
}
|
||
if (totalViolation < 0) {
|
||
Object.keys(violationsLookup.max).forEach((field) => {
|
||
flexColumnsLookup.freeze(field);
|
||
});
|
||
} else if (totalViolation > 0) {
|
||
Object.keys(violationsLookup.min).forEach((field) => {
|
||
flexColumnsLookup.freeze(field);
|
||
});
|
||
} else {
|
||
flexColumns.forEach(({
|
||
field
|
||
}) => {
|
||
flexColumnsLookup.freeze(field);
|
||
});
|
||
}
|
||
loopOverFlexItems();
|
||
}
|
||
loopOverFlexItems();
|
||
return flexColumnsLookup.all;
|
||
}
|
||
var hydrateColumnsWidth = (rawState, viewportInnerWidth) => {
|
||
const columnsLookup = {};
|
||
let totalFlexUnits = 0;
|
||
let widthAllocatedBeforeFlex = 0;
|
||
const flexColumns = [];
|
||
rawState.orderedFields.forEach((columnField) => {
|
||
const newColumn = _extends({}, rawState.lookup[columnField]);
|
||
if (rawState.columnVisibilityModel[columnField] === false) {
|
||
newColumn.computedWidth = 0;
|
||
} else {
|
||
let computedWidth;
|
||
if (newColumn.flex && newColumn.flex > 0) {
|
||
totalFlexUnits += newColumn.flex;
|
||
computedWidth = 0;
|
||
flexColumns.push(newColumn);
|
||
} else {
|
||
computedWidth = clamp(newColumn.width || GRID_STRING_COL_DEF.width, newColumn.minWidth || GRID_STRING_COL_DEF.minWidth, newColumn.maxWidth || GRID_STRING_COL_DEF.maxWidth);
|
||
}
|
||
widthAllocatedBeforeFlex += computedWidth;
|
||
newColumn.computedWidth = computedWidth;
|
||
}
|
||
columnsLookup[columnField] = newColumn;
|
||
});
|
||
const initialFreeSpace = Math.max(viewportInnerWidth - widthAllocatedBeforeFlex, 0);
|
||
if (totalFlexUnits > 0 && viewportInnerWidth > 0) {
|
||
const computedColumnWidths = computeFlexColumnsWidth({
|
||
initialFreeSpace,
|
||
totalFlexUnits,
|
||
flexColumns
|
||
});
|
||
Object.keys(computedColumnWidths).forEach((field) => {
|
||
columnsLookup[field].computedWidth = computedColumnWidths[field].computedWidth;
|
||
});
|
||
}
|
||
return _extends({}, rawState, {
|
||
lookup: columnsLookup
|
||
});
|
||
};
|
||
var applyInitialState = (columnsState, initialState) => {
|
||
if (!initialState) {
|
||
return columnsState;
|
||
}
|
||
const {
|
||
orderedFields = [],
|
||
dimensions = {}
|
||
} = initialState;
|
||
const columnsWithUpdatedDimensions = Object.keys(dimensions);
|
||
if (columnsWithUpdatedDimensions.length === 0 && orderedFields.length === 0) {
|
||
return columnsState;
|
||
}
|
||
const orderedFieldsLookup = {};
|
||
const cleanOrderedFields = [];
|
||
for (let i = 0; i < orderedFields.length; i += 1) {
|
||
const field = orderedFields[i];
|
||
if (columnsState.lookup[field]) {
|
||
orderedFieldsLookup[field] = true;
|
||
cleanOrderedFields.push(field);
|
||
}
|
||
}
|
||
const newOrderedFields = cleanOrderedFields.length === 0 ? columnsState.orderedFields : [...cleanOrderedFields, ...columnsState.orderedFields.filter((field) => !orderedFieldsLookup[field])];
|
||
const newColumnLookup = _extends({}, columnsState.lookup);
|
||
for (let i = 0; i < columnsWithUpdatedDimensions.length; i += 1) {
|
||
const field = columnsWithUpdatedDimensions[i];
|
||
const newColDef = _extends({}, newColumnLookup[field], {
|
||
hasBeenResized: true
|
||
});
|
||
Object.entries(dimensions[field]).forEach(([key, value]) => {
|
||
newColDef[key] = value === -1 ? Infinity : value;
|
||
});
|
||
newColumnLookup[field] = newColDef;
|
||
}
|
||
const newColumnsState = _extends({}, columnsState, {
|
||
orderedFields: newOrderedFields,
|
||
lookup: newColumnLookup
|
||
});
|
||
return newColumnsState;
|
||
};
|
||
function getDefaultColTypeDef(columnTypes, type) {
|
||
let colDef = columnTypes[DEFAULT_GRID_COL_TYPE_KEY];
|
||
if (type && columnTypes[type]) {
|
||
colDef = columnTypes[type];
|
||
}
|
||
return colDef;
|
||
}
|
||
var createColumnsState = ({
|
||
apiRef,
|
||
columnsToUpsert,
|
||
initialState,
|
||
columnTypes,
|
||
columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef),
|
||
keepOnlyColumnsToUpsert = false
|
||
}) => {
|
||
var _apiRef$current$getRo, _apiRef$current$getRo2, _apiRef$current;
|
||
const isInsideStateInitializer = !apiRef.current.state.columns;
|
||
let columnsState;
|
||
if (isInsideStateInitializer) {
|
||
columnsState = {
|
||
orderedFields: [],
|
||
lookup: {},
|
||
columnVisibilityModel
|
||
};
|
||
} else {
|
||
const currentState = gridColumnsStateSelector(apiRef.current.state);
|
||
columnsState = {
|
||
orderedFields: keepOnlyColumnsToUpsert ? [] : [...currentState.orderedFields],
|
||
lookup: _extends({}, currentState.lookup),
|
||
// Will be cleaned later if keepOnlyColumnsToUpsert=true
|
||
columnVisibilityModel
|
||
};
|
||
}
|
||
let columnsToKeep = {};
|
||
if (keepOnlyColumnsToUpsert && !isInsideStateInitializer) {
|
||
columnsToKeep = Object.keys(columnsState.lookup).reduce((acc, key) => _extends({}, acc, {
|
||
[key]: false
|
||
}), {});
|
||
}
|
||
const columnsToUpsertLookup = {};
|
||
columnsToUpsert.forEach((newColumn) => {
|
||
const {
|
||
field
|
||
} = newColumn;
|
||
columnsToUpsertLookup[field] = true;
|
||
columnsToKeep[field] = true;
|
||
let existingState = columnsState.lookup[field];
|
||
if (existingState == null) {
|
||
existingState = _extends({}, getDefaultColTypeDef(columnTypes, newColumn.type), {
|
||
field,
|
||
hasBeenResized: false
|
||
});
|
||
columnsState.orderedFields.push(field);
|
||
} else if (keepOnlyColumnsToUpsert) {
|
||
columnsState.orderedFields.push(field);
|
||
}
|
||
if (existingState && existingState.type !== newColumn.type) {
|
||
existingState = _extends({}, getDefaultColTypeDef(columnTypes, newColumn.type), {
|
||
field
|
||
});
|
||
}
|
||
let hasBeenResized = existingState.hasBeenResized;
|
||
COLUMNS_DIMENSION_PROPERTIES.forEach((key) => {
|
||
if (newColumn[key] !== void 0) {
|
||
hasBeenResized = true;
|
||
if (newColumn[key] === -1) {
|
||
newColumn[key] = Infinity;
|
||
}
|
||
}
|
||
});
|
||
columnsState.lookup[field] = _extends({}, existingState, newColumn, {
|
||
hasBeenResized
|
||
});
|
||
});
|
||
if (keepOnlyColumnsToUpsert && !isInsideStateInitializer) {
|
||
Object.keys(columnsState.lookup).forEach((field) => {
|
||
if (!columnsToKeep[field]) {
|
||
delete columnsState.lookup[field];
|
||
}
|
||
});
|
||
}
|
||
const columnsStateWithPreProcessing = apiRef.current.unstable_applyPipeProcessors("hydrateColumns", columnsState);
|
||
const columnsStateWithPortableColumns = applyInitialState(columnsStateWithPreProcessing, initialState);
|
||
return hydrateColumnsWidth(columnsStateWithPortableColumns, (_apiRef$current$getRo = (_apiRef$current$getRo2 = (_apiRef$current = apiRef.current).getRootDimensions) == null || (_apiRef$current$getRo2 = _apiRef$current$getRo2.call(_apiRef$current)) == null ? void 0 : _apiRef$current$getRo2.viewportInnerSize.width) != null ? _apiRef$current$getRo : 0);
|
||
};
|
||
var mergeColumnsState = (columnsState) => (state) => _extends({}, state, {
|
||
columns: columnsState
|
||
});
|
||
function getFirstNonSpannedColumnToRender({
|
||
firstColumnToRender,
|
||
apiRef,
|
||
firstRowToRender,
|
||
lastRowToRender,
|
||
visibleRows
|
||
}) {
|
||
let firstNonSpannedColumnToRender = firstColumnToRender;
|
||
for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
|
||
const row = visibleRows[i];
|
||
if (row) {
|
||
const rowId = visibleRows[i].id;
|
||
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstColumnToRender);
|
||
if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan) {
|
||
firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;
|
||
}
|
||
}
|
||
}
|
||
return firstNonSpannedColumnToRender;
|
||
}
|
||
function getFirstColumnIndexToRender({
|
||
firstColumnIndex,
|
||
minColumnIndex,
|
||
columnBuffer,
|
||
firstRowToRender,
|
||
lastRowToRender,
|
||
apiRef,
|
||
visibleRows
|
||
}) {
|
||
const initialFirstColumnToRender = Math.max(firstColumnIndex - columnBuffer, minColumnIndex);
|
||
const firstColumnToRender = getFirstNonSpannedColumnToRender({
|
||
firstColumnToRender: initialFirstColumnToRender,
|
||
apiRef,
|
||
firstRowToRender,
|
||
lastRowToRender,
|
||
visibleRows
|
||
});
|
||
return firstColumnToRender;
|
||
}
|
||
function getTotalHeaderHeight(apiRef, headerHeight) {
|
||
const densityFactor = gridDensityFactorSelector(apiRef);
|
||
const maxDepth = gridColumnGroupsHeaderMaxDepthSelector(apiRef);
|
||
return Math.floor(headerHeight * densityFactor) * ((maxDepth != null ? maxDepth : 0) + 1);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columns/useGridColumns.js
|
||
var import_jsx_runtime94 = __toESM(require_jsx_runtime());
|
||
var defaultColumnTypes = getGridDefaultColumnTypes();
|
||
var columnsStateInitializer = (state, props, apiRef) => {
|
||
var _props$initialState, _ref, _props$columnVisibili, _props$initialState2;
|
||
const columnsState = createColumnsState({
|
||
apiRef,
|
||
columnTypes: defaultColumnTypes,
|
||
columnsToUpsert: props.columns,
|
||
initialState: (_props$initialState = props.initialState) == null ? void 0 : _props$initialState.columns,
|
||
columnVisibilityModel: (_ref = (_props$columnVisibili = props.columnVisibilityModel) != null ? _props$columnVisibili : (_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.columns) == null ? void 0 : _props$initialState2.columnVisibilityModel) != null ? _ref : {},
|
||
keepOnlyColumnsToUpsert: true
|
||
});
|
||
return _extends({}, state, {
|
||
columns: columnsState
|
||
});
|
||
};
|
||
function useGridColumns(apiRef, props) {
|
||
var _props$initialState4, _props$slotProps2;
|
||
const logger = useGridLogger(apiRef, "useGridColumns");
|
||
const columnTypes = defaultColumnTypes;
|
||
const previousColumnsProp = React101.useRef(props.columns);
|
||
const previousColumnTypesProp = React101.useRef(columnTypes);
|
||
apiRef.current.registerControlState({
|
||
stateId: "visibleColumns",
|
||
propModel: props.columnVisibilityModel,
|
||
propOnChange: props.onColumnVisibilityModelChange,
|
||
stateSelector: gridColumnVisibilityModelSelector,
|
||
changeEvent: "columnVisibilityModelChange"
|
||
});
|
||
const setGridColumnsState = React101.useCallback((columnsState) => {
|
||
logger.debug("Updating columns state.");
|
||
apiRef.current.setState(mergeColumnsState(columnsState));
|
||
apiRef.current.forceUpdate();
|
||
apiRef.current.publishEvent("columnsChange", columnsState.orderedFields);
|
||
}, [logger, apiRef]);
|
||
const getColumn = React101.useCallback((field) => gridColumnLookupSelector(apiRef)[field], [apiRef]);
|
||
const getAllColumns = React101.useCallback(() => gridColumnDefinitionsSelector(apiRef), [apiRef]);
|
||
const getVisibleColumns = React101.useCallback(() => gridVisibleColumnDefinitionsSelector(apiRef), [apiRef]);
|
||
const getColumnIndex = React101.useCallback((field, useVisibleColumns = true) => {
|
||
const columns = useVisibleColumns ? gridVisibleColumnDefinitionsSelector(apiRef) : gridColumnDefinitionsSelector(apiRef);
|
||
return columns.findIndex((col) => col.field === field);
|
||
}, [apiRef]);
|
||
const getColumnPosition = React101.useCallback((field) => {
|
||
const index = getColumnIndex(field);
|
||
return gridColumnPositionsSelector(apiRef)[index];
|
||
}, [apiRef, getColumnIndex]);
|
||
const setColumnVisibilityModel = React101.useCallback((model) => {
|
||
const currentModel = gridColumnVisibilityModelSelector(apiRef);
|
||
if (currentModel !== model) {
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
columns: createColumnsState({
|
||
apiRef,
|
||
columnTypes,
|
||
columnsToUpsert: [],
|
||
initialState: void 0,
|
||
columnVisibilityModel: model,
|
||
keepOnlyColumnsToUpsert: false
|
||
})
|
||
}));
|
||
apiRef.current.forceUpdate();
|
||
}
|
||
}, [apiRef, columnTypes]);
|
||
const updateColumns = React101.useCallback((columns) => {
|
||
const columnsState = createColumnsState({
|
||
apiRef,
|
||
columnTypes,
|
||
columnsToUpsert: columns,
|
||
initialState: void 0,
|
||
keepOnlyColumnsToUpsert: false
|
||
});
|
||
setGridColumnsState(columnsState);
|
||
}, [apiRef, setGridColumnsState, columnTypes]);
|
||
const setColumnVisibility = React101.useCallback((field, isVisible) => {
|
||
var _columnVisibilityMode;
|
||
const columnVisibilityModel = gridColumnVisibilityModelSelector(apiRef);
|
||
const isCurrentlyVisible = (_columnVisibilityMode = columnVisibilityModel[field]) != null ? _columnVisibilityMode : true;
|
||
if (isVisible !== isCurrentlyVisible) {
|
||
const newModel = _extends({}, columnVisibilityModel, {
|
||
[field]: isVisible
|
||
});
|
||
apiRef.current.setColumnVisibilityModel(newModel);
|
||
}
|
||
}, [apiRef]);
|
||
const getColumnIndexRelativeToVisibleColumns = React101.useCallback((field) => {
|
||
const allColumns = gridColumnFieldsSelector(apiRef);
|
||
return allColumns.findIndex((col) => col === field);
|
||
}, [apiRef]);
|
||
const setColumnIndex = React101.useCallback((field, targetIndexPosition) => {
|
||
const allColumns = gridColumnFieldsSelector(apiRef);
|
||
const oldIndexPosition = getColumnIndexRelativeToVisibleColumns(field);
|
||
if (oldIndexPosition === targetIndexPosition) {
|
||
return;
|
||
}
|
||
logger.debug(`Moving column ${field} to index ${targetIndexPosition}`);
|
||
const updatedColumns = [...allColumns];
|
||
const fieldRemoved = updatedColumns.splice(oldIndexPosition, 1)[0];
|
||
updatedColumns.splice(targetIndexPosition, 0, fieldRemoved);
|
||
setGridColumnsState(_extends({}, gridColumnsStateSelector(apiRef.current.state), {
|
||
orderedFields: updatedColumns
|
||
}));
|
||
const params = {
|
||
column: apiRef.current.getColumn(field),
|
||
targetIndex: apiRef.current.getColumnIndexRelativeToVisibleColumns(field),
|
||
oldIndex: oldIndexPosition
|
||
};
|
||
apiRef.current.publishEvent("columnIndexChange", params);
|
||
}, [apiRef, logger, setGridColumnsState, getColumnIndexRelativeToVisibleColumns]);
|
||
const setColumnWidth = React101.useCallback((field, width) => {
|
||
var _apiRef$current$getRo, _apiRef$current$getRo2;
|
||
logger.debug(`Updating column ${field} width to ${width}`);
|
||
const columnsState = gridColumnsStateSelector(apiRef.current.state);
|
||
const column = columnsState.lookup[field];
|
||
const newColumn = _extends({}, column, {
|
||
width,
|
||
hasBeenResized: true
|
||
});
|
||
setGridColumnsState(hydrateColumnsWidth(_extends({}, columnsState, {
|
||
lookup: _extends({}, columnsState.lookup, {
|
||
[field]: newColumn
|
||
})
|
||
}), (_apiRef$current$getRo = (_apiRef$current$getRo2 = apiRef.current.getRootDimensions()) == null ? void 0 : _apiRef$current$getRo2.viewportInnerSize.width) != null ? _apiRef$current$getRo : 0));
|
||
apiRef.current.publishEvent("columnWidthChange", {
|
||
element: apiRef.current.getColumnHeaderElement(field),
|
||
colDef: newColumn,
|
||
width
|
||
});
|
||
}, [apiRef, logger, setGridColumnsState]);
|
||
const columnApi = {
|
||
getColumn,
|
||
getAllColumns,
|
||
getColumnIndex,
|
||
getColumnPosition,
|
||
getVisibleColumns,
|
||
getColumnIndexRelativeToVisibleColumns,
|
||
updateColumns,
|
||
setColumnVisibilityModel,
|
||
setColumnVisibility,
|
||
setColumnWidth
|
||
};
|
||
const columnReorderApi = {
|
||
setColumnIndex
|
||
};
|
||
useGridApiMethod(apiRef, columnApi, "public");
|
||
useGridApiMethod(apiRef, columnReorderApi, props.signature === GridSignature.DataGrid ? "private" : "public");
|
||
const stateExportPreProcessing = React101.useCallback((prevState, context) => {
|
||
var _props$initialState$c, _props$initialState3;
|
||
const columnsStateToExport = {};
|
||
const columnVisibilityModelToExport = gridColumnVisibilityModelSelector(apiRef);
|
||
const shouldExportColumnVisibilityModel = (
|
||
// Always export if the `exportOnlyDirtyModels` property is not activated
|
||
!context.exportOnlyDirtyModels || // Always export if the model is controlled
|
||
props.columnVisibilityModel != null || // Always export if the model has been initialized
|
||
// TODO v6 Do a nullish check instead to export even if the initial model equals "{}"
|
||
Object.keys((_props$initialState$c = (_props$initialState3 = props.initialState) == null || (_props$initialState3 = _props$initialState3.columns) == null ? void 0 : _props$initialState3.columnVisibilityModel) != null ? _props$initialState$c : {}).length > 0 || // Always export if the model is not empty
|
||
Object.keys(columnVisibilityModelToExport).length > 0
|
||
);
|
||
if (shouldExportColumnVisibilityModel) {
|
||
columnsStateToExport.columnVisibilityModel = columnVisibilityModelToExport;
|
||
}
|
||
columnsStateToExport.orderedFields = gridColumnFieldsSelector(apiRef);
|
||
const columns = gridColumnDefinitionsSelector(apiRef);
|
||
const dimensions = {};
|
||
columns.forEach((colDef) => {
|
||
if (colDef.hasBeenResized) {
|
||
const colDefDimensions = {};
|
||
COLUMNS_DIMENSION_PROPERTIES.forEach((propertyName) => {
|
||
let propertyValue = colDef[propertyName];
|
||
if (propertyValue === Infinity) {
|
||
propertyValue = -1;
|
||
}
|
||
colDefDimensions[propertyName] = propertyValue;
|
||
});
|
||
dimensions[colDef.field] = colDefDimensions;
|
||
}
|
||
});
|
||
if (Object.keys(dimensions).length > 0) {
|
||
columnsStateToExport.dimensions = dimensions;
|
||
}
|
||
return _extends({}, prevState, {
|
||
columns: columnsStateToExport
|
||
});
|
||
}, [apiRef, props.columnVisibilityModel, (_props$initialState4 = props.initialState) == null ? void 0 : _props$initialState4.columns]);
|
||
const stateRestorePreProcessing = React101.useCallback((params, context) => {
|
||
var _context$stateToResto;
|
||
const columnVisibilityModelToImport = (_context$stateToResto = context.stateToRestore.columns) == null ? void 0 : _context$stateToResto.columnVisibilityModel;
|
||
const initialState = context.stateToRestore.columns;
|
||
if (columnVisibilityModelToImport == null && initialState == null) {
|
||
return params;
|
||
}
|
||
const columnsState = createColumnsState({
|
||
apiRef,
|
||
columnTypes,
|
||
columnsToUpsert: [],
|
||
initialState,
|
||
columnVisibilityModel: columnVisibilityModelToImport,
|
||
keepOnlyColumnsToUpsert: false
|
||
});
|
||
apiRef.current.setState(mergeColumnsState(columnsState));
|
||
if (initialState != null) {
|
||
apiRef.current.publishEvent("columnsChange", columnsState.orderedFields);
|
||
}
|
||
return params;
|
||
}, [apiRef, columnTypes]);
|
||
const preferencePanelPreProcessing = React101.useCallback((initialValue, value) => {
|
||
if (value === GridPreferencePanelsValue.columns) {
|
||
var _props$slotProps;
|
||
const ColumnsPanel = props.slots.columnsPanel;
|
||
return (0, import_jsx_runtime94.jsx)(ColumnsPanel, _extends({}, (_props$slotProps = props.slotProps) == null ? void 0 : _props$slotProps.columnsPanel));
|
||
}
|
||
return initialValue;
|
||
}, [props.slots.columnsPanel, (_props$slotProps2 = props.slotProps) == null ? void 0 : _props$slotProps2.columnsPanel]);
|
||
const addColumnMenuItems = React101.useCallback((columnMenuItems) => {
|
||
if (props.disableColumnSelector) {
|
||
return columnMenuItems;
|
||
}
|
||
return [...columnMenuItems, "columnMenuColumnsItem"];
|
||
}, [props.disableColumnSelector]);
|
||
useGridRegisterPipeProcessor(apiRef, "columnMenu", addColumnMenuItems);
|
||
useGridRegisterPipeProcessor(apiRef, "exportState", stateExportPreProcessing);
|
||
useGridRegisterPipeProcessor(apiRef, "restoreState", stateRestorePreProcessing);
|
||
useGridRegisterPipeProcessor(apiRef, "preferencePanel", preferencePanelPreProcessing);
|
||
const prevInnerWidth = React101.useRef(null);
|
||
const handleGridSizeChange = (viewportInnerSize) => {
|
||
if (prevInnerWidth.current !== viewportInnerSize.width) {
|
||
prevInnerWidth.current = viewportInnerSize.width;
|
||
setGridColumnsState(hydrateColumnsWidth(gridColumnsStateSelector(apiRef.current.state), viewportInnerSize.width));
|
||
}
|
||
};
|
||
useGridApiEventHandler(apiRef, "viewportInnerSizeChange", handleGridSizeChange);
|
||
const hydrateColumns = React101.useCallback(() => {
|
||
logger.info(`Columns pipe processing have changed, regenerating the columns`);
|
||
const columnsState = createColumnsState({
|
||
apiRef,
|
||
columnTypes,
|
||
columnsToUpsert: [],
|
||
initialState: void 0,
|
||
keepOnlyColumnsToUpsert: false
|
||
});
|
||
setGridColumnsState(columnsState);
|
||
}, [apiRef, logger, setGridColumnsState, columnTypes]);
|
||
useGridRegisterPipeApplier(apiRef, "hydrateColumns", hydrateColumns);
|
||
const isFirstRender = React101.useRef(true);
|
||
React101.useEffect(() => {
|
||
if (isFirstRender.current) {
|
||
isFirstRender.current = false;
|
||
return;
|
||
}
|
||
logger.info(`GridColumns have changed, new length ${props.columns.length}`);
|
||
if (previousColumnsProp.current === props.columns && previousColumnTypesProp.current === columnTypes) {
|
||
return;
|
||
}
|
||
const columnsState = createColumnsState({
|
||
apiRef,
|
||
columnTypes,
|
||
initialState: void 0,
|
||
// If the user provides a model, we don't want to set it in the state here because it has it's dedicated `useEffect` which calls `setColumnVisibilityModel`
|
||
columnsToUpsert: props.columns,
|
||
keepOnlyColumnsToUpsert: true
|
||
});
|
||
previousColumnsProp.current = props.columns;
|
||
previousColumnTypesProp.current = columnTypes;
|
||
setGridColumnsState(columnsState);
|
||
}, [logger, apiRef, setGridColumnsState, props.columns, columnTypes]);
|
||
React101.useEffect(() => {
|
||
if (props.columnVisibilityModel !== void 0) {
|
||
apiRef.current.setColumnVisibilityModel(props.columnVisibilityModel);
|
||
}
|
||
}, [apiRef, logger, props.columnVisibilityModel]);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/density/useGridDensity.js
|
||
init_extends();
|
||
var React102 = __toESM(require_react());
|
||
var COMPACT_DENSITY_FACTOR = 0.7;
|
||
var COMFORTABLE_DENSITY_FACTOR = 1.3;
|
||
var DENSITY_FACTORS = {
|
||
compact: COMPACT_DENSITY_FACTOR,
|
||
comfortable: COMFORTABLE_DENSITY_FACTOR,
|
||
standard: 1
|
||
};
|
||
var densityStateInitializer = (state, props) => _extends({}, state, {
|
||
density: {
|
||
value: props.density,
|
||
factor: DENSITY_FACTORS[props.density]
|
||
}
|
||
});
|
||
var useGridDensity = (apiRef, props) => {
|
||
const logger = useGridLogger(apiRef, "useDensity");
|
||
const setDensity = React102.useCallback((newDensity) => {
|
||
logger.debug(`Set grid density to ${newDensity}`);
|
||
apiRef.current.setState((state) => {
|
||
const currentDensityState = gridDensitySelector(state);
|
||
const newDensityState = {
|
||
value: newDensity,
|
||
factor: DENSITY_FACTORS[newDensity]
|
||
};
|
||
if (isDeepEqual(currentDensityState, newDensityState)) {
|
||
return state;
|
||
}
|
||
return _extends({}, state, {
|
||
density: newDensityState
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [logger, apiRef]);
|
||
React102.useEffect(() => {
|
||
apiRef.current.setDensity(props.density);
|
||
}, [apiRef, props.density]);
|
||
const densityApi = {
|
||
setDensity
|
||
};
|
||
useGridApiMethod(apiRef, densityApi, "public");
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/export/useGridCsvExport.js
|
||
var React103 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/utils/exportAs.js
|
||
function exportAs(blob, extension = "csv", filename = document.title || "untitled") {
|
||
const fullName = `${filename}.${extension}`;
|
||
if ("download" in HTMLAnchorElement.prototype) {
|
||
const url = URL.createObjectURL(blob);
|
||
const a = document.createElement("a");
|
||
a.href = url;
|
||
a.download = fullName;
|
||
a.click();
|
||
setTimeout(() => {
|
||
URL.revokeObjectURL(url);
|
||
});
|
||
return;
|
||
}
|
||
throw new Error("MUI: exportAs not supported");
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/export/utils.js
|
||
var getColumnsToExport = ({
|
||
apiRef,
|
||
options
|
||
}) => {
|
||
const columns = gridColumnDefinitionsSelector(apiRef);
|
||
if (options.fields) {
|
||
return options.fields.reduce((currentColumns, field) => {
|
||
const column = columns.find((col) => col.field === field);
|
||
if (column) {
|
||
currentColumns.push(column);
|
||
}
|
||
return currentColumns;
|
||
}, []);
|
||
}
|
||
const validColumns = options.allColumns ? columns : gridVisibleColumnDefinitionsSelector(apiRef);
|
||
return validColumns.filter((column) => !column.disableExport);
|
||
};
|
||
var defaultGetRowsToExport = ({
|
||
apiRef
|
||
}) => {
|
||
var _pinnedRows$top, _pinnedRows$bottom;
|
||
const filteredSortedRowIds = gridFilteredSortedRowIdsSelector(apiRef);
|
||
const rowTree = gridRowTreeSelector(apiRef);
|
||
const selectedRows = apiRef.current.getSelectedRows();
|
||
const bodyRows = filteredSortedRowIds.filter((id) => rowTree[id].type !== "footer");
|
||
const pinnedRows = gridPinnedRowsSelector(apiRef);
|
||
const topPinnedRowsIds = (pinnedRows == null || (_pinnedRows$top = pinnedRows.top) == null ? void 0 : _pinnedRows$top.map((row) => row.id)) || [];
|
||
const bottomPinnedRowsIds = (pinnedRows == null || (_pinnedRows$bottom = pinnedRows.bottom) == null ? void 0 : _pinnedRows$bottom.map((row) => row.id)) || [];
|
||
bodyRows.unshift(...topPinnedRowsIds);
|
||
bodyRows.push(...bottomPinnedRowsIds);
|
||
if (selectedRows.size > 0) {
|
||
return bodyRows.filter((id) => selectedRows.has(id));
|
||
}
|
||
return bodyRows;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/export/useGridCsvExport.js
|
||
var import_jsx_runtime95 = __toESM(require_jsx_runtime());
|
||
var useGridCsvExport = (apiRef, props) => {
|
||
const logger = useGridLogger(apiRef, "useGridCsvExport");
|
||
const ignoreValueFormatterProp = props.unstable_ignoreValueFormatterDuringExport;
|
||
const ignoreValueFormatter = (typeof ignoreValueFormatterProp === "object" ? ignoreValueFormatterProp == null ? void 0 : ignoreValueFormatterProp.csvExport : ignoreValueFormatterProp) || false;
|
||
const getDataAsCsv = React103.useCallback((options = {}) => {
|
||
var _options$getRowsToExp, _options$shouldAppend, _options$includeHeade, _options$includeColum, _options$escapeFormul;
|
||
logger.debug(`Get data as CSV`);
|
||
const exportedColumns = getColumnsToExport({
|
||
apiRef,
|
||
options
|
||
});
|
||
const getRowsToExport = (_options$getRowsToExp = options.getRowsToExport) != null ? _options$getRowsToExp : defaultGetRowsToExport;
|
||
const exportedRowIds = getRowsToExport({
|
||
apiRef
|
||
});
|
||
return buildCSV({
|
||
columns: exportedColumns,
|
||
rowIds: exportedRowIds,
|
||
csvOptions: {
|
||
delimiter: options.delimiter || ",",
|
||
shouldAppendQuotes: (_options$shouldAppend = options.shouldAppendQuotes) != null ? _options$shouldAppend : true,
|
||
includeHeaders: (_options$includeHeade = options.includeHeaders) != null ? _options$includeHeade : true,
|
||
includeColumnGroupsHeaders: (_options$includeColum = options.includeColumnGroupsHeaders) != null ? _options$includeColum : true,
|
||
escapeFormulas: (_options$escapeFormul = options.escapeFormulas) != null ? _options$escapeFormul : true
|
||
},
|
||
ignoreValueFormatter,
|
||
apiRef
|
||
});
|
||
}, [logger, apiRef, ignoreValueFormatter]);
|
||
const exportDataAsCsv = React103.useCallback((options) => {
|
||
logger.debug(`Export data as CSV`);
|
||
const csv = getDataAsCsv(options);
|
||
const blob = new Blob([options != null && options.utf8WithBom ? new Uint8Array([239, 187, 191]) : "", csv], {
|
||
type: "text/csv"
|
||
});
|
||
exportAs(blob, "csv", options == null ? void 0 : options.fileName);
|
||
}, [logger, getDataAsCsv]);
|
||
const csvExportApi = {
|
||
getDataAsCsv,
|
||
exportDataAsCsv
|
||
};
|
||
useGridApiMethod(apiRef, csvExportApi, "public");
|
||
const addExportMenuButtons = React103.useCallback((initialValue, options) => {
|
||
var _options$csvOptions;
|
||
if ((_options$csvOptions = options.csvOptions) != null && _options$csvOptions.disableToolbarButton) {
|
||
return initialValue;
|
||
}
|
||
return [...initialValue, {
|
||
component: (0, import_jsx_runtime95.jsx)(GridCsvExportMenuItem, {
|
||
options: options.csvOptions
|
||
}),
|
||
componentName: "csvExport"
|
||
}];
|
||
}, []);
|
||
useGridRegisterPipeProcessor(apiRef, "exportMenu", addExportMenuButtons);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/export/useGridPrintExport.js
|
||
init_extends();
|
||
var React105 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/pagination/useGridPaginationModel.js
|
||
init_extends();
|
||
var React104 = __toESM(require_react());
|
||
var getDerivedPaginationModel = (paginationState, signature, paginationModelProp) => {
|
||
var _paginationModelProp$;
|
||
let paginationModel = paginationState.paginationModel;
|
||
const rowCount = paginationState.rowCount;
|
||
const pageSize = (_paginationModelProp$ = paginationModelProp == null ? void 0 : paginationModelProp.pageSize) != null ? _paginationModelProp$ : paginationModel.pageSize;
|
||
const pageCount = getPageCount(rowCount, pageSize);
|
||
if (paginationModelProp && ((paginationModelProp == null ? void 0 : paginationModelProp.page) !== paginationModel.page || (paginationModelProp == null ? void 0 : paginationModelProp.pageSize) !== paginationModel.pageSize)) {
|
||
paginationModel = paginationModelProp;
|
||
}
|
||
const validPage = getValidPage(paginationModel.page, pageCount);
|
||
if (validPage !== paginationModel.page) {
|
||
paginationModel = _extends({}, paginationModel, {
|
||
page: validPage
|
||
});
|
||
}
|
||
throwIfPageSizeExceedsTheLimit(paginationModel.pageSize, signature);
|
||
return paginationModel;
|
||
};
|
||
var useGridPaginationModel = (apiRef, props) => {
|
||
var _props$initialState2;
|
||
const logger = useGridLogger(apiRef, "useGridPaginationModel");
|
||
const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);
|
||
const rowHeight = Math.floor(props.rowHeight * densityFactor);
|
||
apiRef.current.registerControlState({
|
||
stateId: "paginationModel",
|
||
propModel: props.paginationModel,
|
||
propOnChange: props.onPaginationModelChange,
|
||
stateSelector: gridPaginationModelSelector,
|
||
changeEvent: "paginationModelChange"
|
||
});
|
||
const setPage = React104.useCallback((page) => {
|
||
const currentModel = gridPaginationModelSelector(apiRef);
|
||
if (page === currentModel.page) {
|
||
return;
|
||
}
|
||
logger.debug(`Setting page to ${page}`);
|
||
apiRef.current.setPaginationModel({
|
||
page,
|
||
pageSize: currentModel.pageSize
|
||
});
|
||
}, [apiRef, logger]);
|
||
const setPageSize = React104.useCallback((pageSize) => {
|
||
const currentModel = gridPaginationModelSelector(apiRef);
|
||
if (pageSize === currentModel.pageSize) {
|
||
return;
|
||
}
|
||
logger.debug(`Setting page size to ${pageSize}`);
|
||
apiRef.current.setPaginationModel({
|
||
pageSize,
|
||
page: currentModel.page
|
||
});
|
||
}, [apiRef, logger]);
|
||
const setPaginationModel = React104.useCallback((paginationModel) => {
|
||
const currentModel = gridPaginationModelSelector(apiRef);
|
||
if (paginationModel === currentModel) {
|
||
return;
|
||
}
|
||
logger.debug("Setting 'paginationModel' to", paginationModel);
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
pagination: _extends({}, state.pagination, {
|
||
paginationModel: getDerivedPaginationModel(state.pagination, props.signature, paginationModel)
|
||
})
|
||
}));
|
||
}, [apiRef, logger, props.signature]);
|
||
const paginationModelApi = {
|
||
setPage,
|
||
setPageSize,
|
||
setPaginationModel
|
||
};
|
||
useGridApiMethod(apiRef, paginationModelApi, "public");
|
||
const stateExportPreProcessing = React104.useCallback((prevState, context) => {
|
||
var _props$initialState;
|
||
const paginationModel = gridPaginationModelSelector(apiRef);
|
||
const shouldExportPaginationModel = (
|
||
// Always export if the `exportOnlyDirtyModels` property is not activated
|
||
!context.exportOnlyDirtyModels || // Always export if the `paginationModel` is controlled
|
||
props.paginationModel != null || // Always export if the `paginationModel` has been initialized
|
||
((_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.pagination) == null ? void 0 : _props$initialState.paginationModel) != null || // Export if `page` or `pageSize` is not equal to the default value
|
||
paginationModel.page !== 0 && paginationModel.pageSize !== defaultPageSize(props.autoPageSize)
|
||
);
|
||
if (!shouldExportPaginationModel) {
|
||
return prevState;
|
||
}
|
||
return _extends({}, prevState, {
|
||
pagination: _extends({}, prevState.pagination, {
|
||
paginationModel
|
||
})
|
||
});
|
||
}, [apiRef, props.paginationModel, (_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.pagination) == null ? void 0 : _props$initialState2.paginationModel, props.autoPageSize]);
|
||
const stateRestorePreProcessing = React104.useCallback((params, context) => {
|
||
var _context$stateToResto, _context$stateToResto2;
|
||
const paginationModel = (_context$stateToResto = context.stateToRestore.pagination) != null && _context$stateToResto.paginationModel ? _extends({}, getDefaultGridPaginationModel(props.autoPageSize), (_context$stateToResto2 = context.stateToRestore.pagination) == null ? void 0 : _context$stateToResto2.paginationModel) : gridPaginationModelSelector(apiRef);
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
pagination: _extends({}, state.pagination, {
|
||
paginationModel: getDerivedPaginationModel(state.pagination, props.signature, paginationModel)
|
||
})
|
||
}));
|
||
return params;
|
||
}, [apiRef, props.autoPageSize, props.signature]);
|
||
useGridRegisterPipeProcessor(apiRef, "exportState", stateExportPreProcessing);
|
||
useGridRegisterPipeProcessor(apiRef, "restoreState", stateRestorePreProcessing);
|
||
const handlePaginationModelChange = () => {
|
||
var _apiRef$current$virtu;
|
||
const paginationModel = gridPaginationModelSelector(apiRef);
|
||
if ((_apiRef$current$virtu = apiRef.current.virtualScrollerRef) != null && _apiRef$current$virtu.current) {
|
||
apiRef.current.scrollToIndexes({
|
||
rowIndex: paginationModel.page * paginationModel.pageSize
|
||
});
|
||
}
|
||
};
|
||
const handleUpdateAutoPageSize = React104.useCallback(() => {
|
||
if (!props.autoPageSize) {
|
||
return;
|
||
}
|
||
const dimensions = apiRef.current.getRootDimensions() || {
|
||
viewportInnerSize: {
|
||
height: 0
|
||
}
|
||
};
|
||
const pinnedRowsHeight = calculatePinnedRowsHeight(apiRef);
|
||
const maximumPageSizeWithoutScrollBar = Math.floor((dimensions.viewportInnerSize.height - pinnedRowsHeight.top - pinnedRowsHeight.bottom) / rowHeight);
|
||
apiRef.current.setPageSize(maximumPageSizeWithoutScrollBar);
|
||
}, [apiRef, props.autoPageSize, rowHeight]);
|
||
const handleRowCountChange = React104.useCallback((newRowCount) => {
|
||
if (newRowCount == null) {
|
||
return;
|
||
}
|
||
const paginationModel = gridPaginationModelSelector(apiRef);
|
||
const pageCount = gridPageCountSelector(apiRef);
|
||
if (paginationModel.page > pageCount - 1) {
|
||
apiRef.current.setPage(Math.max(0, pageCount - 1));
|
||
}
|
||
}, [apiRef]);
|
||
useGridApiEventHandler(apiRef, "viewportInnerSizeChange", handleUpdateAutoPageSize);
|
||
useGridApiEventHandler(apiRef, "paginationModelChange", handlePaginationModelChange);
|
||
useGridApiEventHandler(apiRef, "rowCountChange", handleRowCountChange);
|
||
React104.useEffect(() => {
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
pagination: _extends({}, state.pagination, {
|
||
paginationModel: getDerivedPaginationModel(state.pagination, props.signature, props.paginationModel)
|
||
})
|
||
}));
|
||
}, [apiRef, props.paginationModel, props.paginationMode, props.signature]);
|
||
React104.useEffect(handleUpdateAutoPageSize, [handleUpdateAutoPageSize]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/export/useGridPrintExport.js
|
||
var import_jsx_runtime96 = __toESM(require_jsx_runtime());
|
||
function raf() {
|
||
return new Promise((resolve) => {
|
||
requestAnimationFrame(() => {
|
||
resolve();
|
||
});
|
||
});
|
||
}
|
||
function buildPrintWindow(title) {
|
||
const iframeEl = document.createElement("iframe");
|
||
iframeEl.style.position = "absolute";
|
||
iframeEl.style.width = "0px";
|
||
iframeEl.style.height = "0px";
|
||
iframeEl.title = title || document.title;
|
||
return iframeEl;
|
||
}
|
||
var useGridPrintExport = (apiRef, props) => {
|
||
const logger = useGridLogger(apiRef, "useGridPrintExport");
|
||
const doc = React105.useRef(null);
|
||
const previousGridState = React105.useRef(null);
|
||
const previousColumnVisibility = React105.useRef({});
|
||
const previousRows = React105.useRef([]);
|
||
React105.useEffect(() => {
|
||
doc.current = ownerDocument(apiRef.current.rootElementRef.current);
|
||
}, [apiRef]);
|
||
const updateGridColumnsForPrint = React105.useCallback((fields, allColumns, includeCheckboxes) => new Promise((resolve) => {
|
||
const exportedColumnFields = getColumnsToExport({
|
||
apiRef,
|
||
options: {
|
||
fields,
|
||
allColumns
|
||
}
|
||
}).map((column) => column.field);
|
||
const columns = gridColumnDefinitionsSelector(apiRef);
|
||
const newColumnVisibilityModel = {};
|
||
columns.forEach((column) => {
|
||
newColumnVisibilityModel[column.field] = exportedColumnFields.includes(column.field);
|
||
});
|
||
if (includeCheckboxes) {
|
||
newColumnVisibilityModel[GRID_CHECKBOX_SELECTION_COL_DEF.field] = true;
|
||
}
|
||
apiRef.current.setColumnVisibilityModel(newColumnVisibilityModel);
|
||
resolve();
|
||
}), [apiRef]);
|
||
const updateGridRowsForPrint = React105.useCallback((getRowsToExport) => {
|
||
const rowsToExportIds = getRowsToExport({
|
||
apiRef
|
||
});
|
||
const newRows = rowsToExportIds.map((id) => apiRef.current.getRow(id));
|
||
apiRef.current.setRows(newRows);
|
||
}, [apiRef]);
|
||
const handlePrintWindowLoad = React105.useCallback((printWindow, options) => {
|
||
var _querySelector, _querySelector2;
|
||
const normalizeOptions = _extends({
|
||
copyStyles: true,
|
||
hideToolbar: false,
|
||
hideFooter: false,
|
||
includeCheckboxes: false
|
||
}, options);
|
||
const printDoc = printWindow.contentDocument;
|
||
if (!printDoc) {
|
||
return;
|
||
}
|
||
const rowsMeta = gridRowsMetaSelector(apiRef.current.state);
|
||
const gridRootElement = apiRef.current.rootElementRef.current;
|
||
const gridClone = gridRootElement.cloneNode(true);
|
||
const gridMain = gridClone.querySelector(`.${gridClasses.main}`);
|
||
gridMain.style.overflow = "visible";
|
||
gridClone.style.contain = "size";
|
||
const columnHeaders = gridClone.querySelector(`.${gridClasses.columnHeaders}`);
|
||
const columnHeadersInner = columnHeaders.querySelector(`.${gridClasses.columnHeadersInner}`);
|
||
columnHeadersInner.style.width = "100%";
|
||
let gridToolbarElementHeight = ((_querySelector = gridRootElement.querySelector(`.${gridClasses.toolbarContainer}`)) == null ? void 0 : _querySelector.offsetHeight) || 0;
|
||
let gridFooterElementHeight = ((_querySelector2 = gridRootElement.querySelector(`.${gridClasses.footerContainer}`)) == null ? void 0 : _querySelector2.offsetHeight) || 0;
|
||
if (normalizeOptions.hideToolbar) {
|
||
var _gridClone$querySelec;
|
||
(_gridClone$querySelec = gridClone.querySelector(`.${gridClasses.toolbarContainer}`)) == null || _gridClone$querySelec.remove();
|
||
gridToolbarElementHeight = 0;
|
||
}
|
||
if (normalizeOptions.hideFooter) {
|
||
var _gridClone$querySelec2;
|
||
(_gridClone$querySelec2 = gridClone.querySelector(`.${gridClasses.footerContainer}`)) == null || _gridClone$querySelec2.remove();
|
||
gridFooterElementHeight = 0;
|
||
}
|
||
const computedTotalHeight = rowsMeta.currentPageTotalHeight + getTotalHeaderHeight(apiRef, props.columnHeaderHeight) + gridToolbarElementHeight + gridFooterElementHeight;
|
||
gridClone.style.height = `${computedTotalHeight}px`;
|
||
gridClone.style.boxSizing = "content-box";
|
||
if (options != null && options.getRowsToExport) {
|
||
const gridFooterElement = gridClone.querySelector(`.${gridClasses.footerContainer}`);
|
||
gridFooterElement.style.position = "absolute";
|
||
gridFooterElement.style.width = "100%";
|
||
gridFooterElement.style.top = `${computedTotalHeight - gridFooterElementHeight}px`;
|
||
}
|
||
const container = document.createElement("div");
|
||
container.appendChild(gridClone);
|
||
printDoc.body.innerHTML = container.innerHTML;
|
||
const defaultPageStyle = typeof normalizeOptions.pageStyle === "function" ? normalizeOptions.pageStyle() : normalizeOptions.pageStyle;
|
||
if (typeof defaultPageStyle === "string") {
|
||
const styleElement = printDoc.createElement("style");
|
||
styleElement.appendChild(printDoc.createTextNode(defaultPageStyle));
|
||
printDoc.head.appendChild(styleElement);
|
||
}
|
||
if (normalizeOptions.bodyClassName) {
|
||
printDoc.body.classList.add(...normalizeOptions.bodyClassName.split(" "));
|
||
}
|
||
const stylesheetLoadPromises = [];
|
||
if (normalizeOptions.copyStyles) {
|
||
const rootCandidate = gridRootElement.getRootNode();
|
||
const root = rootCandidate.constructor.name === "ShadowRoot" ? rootCandidate : doc.current;
|
||
const headStyleElements = root.querySelectorAll("style, link[rel='stylesheet']");
|
||
for (let i = 0; i < headStyleElements.length; i += 1) {
|
||
const node = headStyleElements[i];
|
||
if (node.tagName === "STYLE") {
|
||
const newHeadStyleElements = printDoc.createElement(node.tagName);
|
||
const sheet = node.sheet;
|
||
if (sheet) {
|
||
let styleCSS = "";
|
||
for (let j = 0; j < sheet.cssRules.length; j += 1) {
|
||
if (typeof sheet.cssRules[j].cssText === "string") {
|
||
styleCSS += `${sheet.cssRules[j].cssText}\r
|
||
`;
|
||
}
|
||
}
|
||
newHeadStyleElements.appendChild(printDoc.createTextNode(styleCSS));
|
||
printDoc.head.appendChild(newHeadStyleElements);
|
||
}
|
||
} else if (node.getAttribute("href")) {
|
||
const newHeadStyleElements = printDoc.createElement(node.tagName);
|
||
for (let j = 0; j < node.attributes.length; j += 1) {
|
||
const attr = node.attributes[j];
|
||
if (attr) {
|
||
newHeadStyleElements.setAttribute(attr.nodeName, attr.nodeValue || "");
|
||
}
|
||
}
|
||
stylesheetLoadPromises.push(new Promise((resolve) => {
|
||
newHeadStyleElements.addEventListener("load", () => resolve());
|
||
}));
|
||
printDoc.head.appendChild(newHeadStyleElements);
|
||
}
|
||
}
|
||
}
|
||
if (true) {
|
||
Promise.all(stylesheetLoadPromises).then(() => {
|
||
printWindow.contentWindow.print();
|
||
});
|
||
}
|
||
}, [apiRef, doc, props.columnHeaderHeight]);
|
||
const handlePrintWindowAfterPrint = React105.useCallback((printWindow) => {
|
||
var _previousGridState$cu;
|
||
doc.current.body.removeChild(printWindow);
|
||
apiRef.current.restoreState(previousGridState.current || {});
|
||
if (!((_previousGridState$cu = previousGridState.current) != null && (_previousGridState$cu = _previousGridState$cu.columns) != null && _previousGridState$cu.columnVisibilityModel)) {
|
||
apiRef.current.setColumnVisibilityModel(previousColumnVisibility.current);
|
||
}
|
||
apiRef.current.unstable_setVirtualization(true);
|
||
apiRef.current.setRows(previousRows.current);
|
||
previousGridState.current = null;
|
||
previousColumnVisibility.current = {};
|
||
previousRows.current = [];
|
||
}, [apiRef]);
|
||
const exportDataAsPrint = React105.useCallback(async (options) => {
|
||
logger.debug(`Export data as Print`);
|
||
if (!apiRef.current.rootElementRef.current) {
|
||
throw new Error("MUI: No grid root element available.");
|
||
}
|
||
previousGridState.current = apiRef.current.exportState();
|
||
previousColumnVisibility.current = gridColumnVisibilityModelSelector(apiRef);
|
||
const gridRowsLookup = gridRowsLookupSelector(apiRef);
|
||
previousRows.current = gridDataRowIdsSelector(apiRef).map((rowId) => gridRowsLookup[rowId]);
|
||
if (props.pagination) {
|
||
const visibleRowCount = gridExpandedRowCountSelector(apiRef);
|
||
const paginationModel = {
|
||
page: 0,
|
||
pageSize: visibleRowCount
|
||
};
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
pagination: _extends({}, state.pagination, {
|
||
paginationModel: getDerivedPaginationModel(
|
||
state.pagination,
|
||
// Using signature `DataGridPro` to allow more than 100 rows in the print export
|
||
"DataGridPro",
|
||
paginationModel
|
||
)
|
||
})
|
||
}));
|
||
apiRef.current.forceUpdate();
|
||
}
|
||
await updateGridColumnsForPrint(options == null ? void 0 : options.fields, options == null ? void 0 : options.allColumns, options == null ? void 0 : options.includeCheckboxes);
|
||
if (options != null && options.getRowsToExport) {
|
||
updateGridRowsForPrint(options.getRowsToExport);
|
||
}
|
||
apiRef.current.unstable_setVirtualization(false);
|
||
await raf();
|
||
const printWindow = buildPrintWindow(options == null ? void 0 : options.fileName);
|
||
if (false) {
|
||
doc.current.body.appendChild(printWindow);
|
||
handlePrintWindowLoad(printWindow, options);
|
||
handlePrintWindowAfterPrint(printWindow);
|
||
} else {
|
||
printWindow.onload = () => {
|
||
handlePrintWindowLoad(printWindow, options);
|
||
const mediaQueryList = printWindow.contentWindow.matchMedia("print");
|
||
mediaQueryList.addEventListener("change", (mql) => {
|
||
const isAfterPrint = mql.matches === false;
|
||
if (isAfterPrint) {
|
||
handlePrintWindowAfterPrint(printWindow);
|
||
}
|
||
});
|
||
};
|
||
doc.current.body.appendChild(printWindow);
|
||
}
|
||
}, [props, logger, apiRef, handlePrintWindowLoad, handlePrintWindowAfterPrint, updateGridColumnsForPrint, updateGridRowsForPrint]);
|
||
const printExportApi = {
|
||
exportDataAsPrint
|
||
};
|
||
useGridApiMethod(apiRef, printExportApi, "public");
|
||
const addExportMenuButtons = React105.useCallback((initialValue, options) => {
|
||
var _options$printOptions;
|
||
if ((_options$printOptions = options.printOptions) != null && _options$printOptions.disableToolbarButton) {
|
||
return initialValue;
|
||
}
|
||
return [...initialValue, {
|
||
component: (0, import_jsx_runtime96.jsx)(GridPrintExportMenuItem, {
|
||
options: options.printOptions
|
||
}),
|
||
componentName: "printExport"
|
||
}];
|
||
}, []);
|
||
useGridRegisterPipeProcessor(apiRef, "exportMenu", addExportMenuButtons);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/filter/useGridFilter.js
|
||
init_extends();
|
||
var React106 = __toESM(require_react());
|
||
var import_jsx_runtime97 = __toESM(require_jsx_runtime());
|
||
var filterStateInitializer = (state, props, apiRef) => {
|
||
var _ref, _props$filterModel, _props$initialState;
|
||
const filterModel = (_ref = (_props$filterModel = props.filterModel) != null ? _props$filterModel : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.filter) == null ? void 0 : _props$initialState.filterModel) != null ? _ref : getDefaultGridFilterModel();
|
||
return _extends({}, state, {
|
||
filter: {
|
||
filterModel: sanitizeFilterModel(filterModel, props.disableMultipleColumnsFiltering, apiRef),
|
||
filteredRowsLookup: {},
|
||
filteredDescendantCountLookup: {}
|
||
},
|
||
visibleRowsLookup: {}
|
||
});
|
||
};
|
||
var getVisibleRowsLookup = (params) => {
|
||
return params.filteredRowsLookup;
|
||
};
|
||
function getVisibleRowsLookupState(apiRef, state) {
|
||
return apiRef.current.applyStrategyProcessor("visibleRowsLookupCreation", {
|
||
tree: state.rows.tree,
|
||
filteredRowsLookup: state.filter.filteredRowsLookup
|
||
});
|
||
}
|
||
function createMemoizedValues() {
|
||
return defaultMemoize(Object.values);
|
||
}
|
||
var useGridFilter = (apiRef, props) => {
|
||
var _props$initialState3, _props$slotProps2;
|
||
const logger = useGridLogger(apiRef, "useGridFilter");
|
||
apiRef.current.registerControlState({
|
||
stateId: "filter",
|
||
propModel: props.filterModel,
|
||
propOnChange: props.onFilterModelChange,
|
||
stateSelector: gridFilterModelSelector,
|
||
changeEvent: "filterModelChange"
|
||
});
|
||
const updateFilteredRows = React106.useCallback(() => {
|
||
apiRef.current.setState((state) => {
|
||
const filterModel = gridFilterModelSelector(state, apiRef.current.instanceId);
|
||
const isRowMatchingFilters = props.filterMode === "client" ? buildAggregatedFilterApplier(filterModel, apiRef, props.disableEval) : null;
|
||
const filteringResult = apiRef.current.applyStrategyProcessor("filtering", {
|
||
isRowMatchingFilters,
|
||
filterModel: filterModel != null ? filterModel : getDefaultGridFilterModel()
|
||
});
|
||
const newState = _extends({}, state, {
|
||
filter: _extends({}, state.filter, filteringResult)
|
||
});
|
||
const visibleRowsLookupState = getVisibleRowsLookupState(apiRef, newState);
|
||
return _extends({}, newState, {
|
||
visibleRowsLookup: visibleRowsLookupState
|
||
});
|
||
});
|
||
apiRef.current.publishEvent("filteredRowsSet");
|
||
}, [apiRef, props.filterMode, props.disableEval]);
|
||
const addColumnMenuItem = React106.useCallback((columnMenuItems, colDef) => {
|
||
if (colDef == null || colDef.filterable === false || props.disableColumnFilter) {
|
||
return columnMenuItems;
|
||
}
|
||
return [...columnMenuItems, "columnMenuFilterItem"];
|
||
}, [props.disableColumnFilter]);
|
||
const applyFilters = React106.useCallback(() => {
|
||
updateFilteredRows();
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef, updateFilteredRows]);
|
||
const upsertFilterItem = React106.useCallback((item) => {
|
||
const filterModel = gridFilterModelSelector(apiRef);
|
||
const items = [...filterModel.items];
|
||
const itemIndex = items.findIndex((filterItem) => filterItem.id === item.id);
|
||
if (itemIndex === -1) {
|
||
items.push(item);
|
||
} else {
|
||
items[itemIndex] = item;
|
||
}
|
||
apiRef.current.setFilterModel(_extends({}, filterModel, {
|
||
items
|
||
}), "upsertFilterItem");
|
||
}, [apiRef]);
|
||
const upsertFilterItems = React106.useCallback((items) => {
|
||
const filterModel = gridFilterModelSelector(apiRef);
|
||
const existingItems = [...filterModel.items];
|
||
items.forEach((item) => {
|
||
const itemIndex = items.findIndex((filterItem) => filterItem.id === item.id);
|
||
if (itemIndex === -1) {
|
||
existingItems.push(item);
|
||
} else {
|
||
existingItems[itemIndex] = item;
|
||
}
|
||
});
|
||
apiRef.current.setFilterModel(_extends({}, filterModel, {
|
||
items
|
||
}), "upsertFilterItems");
|
||
}, [apiRef]);
|
||
const deleteFilterItem = React106.useCallback((itemToDelete) => {
|
||
const filterModel = gridFilterModelSelector(apiRef);
|
||
const items = filterModel.items.filter((item) => item.id !== itemToDelete.id);
|
||
if (items.length === filterModel.items.length) {
|
||
return;
|
||
}
|
||
apiRef.current.setFilterModel(_extends({}, filterModel, {
|
||
items
|
||
}), "deleteFilterItem");
|
||
}, [apiRef]);
|
||
const showFilterPanel = React106.useCallback((targetColumnField, panelId, labelId) => {
|
||
logger.debug("Displaying filter panel");
|
||
if (targetColumnField) {
|
||
const filterModel = gridFilterModelSelector(apiRef);
|
||
const filterItemsWithValue = filterModel.items.filter((item) => {
|
||
var _column$filterOperato;
|
||
if (item.value !== void 0) {
|
||
if (Array.isArray(item.value) && item.value.length === 0) {
|
||
return false;
|
||
}
|
||
return true;
|
||
}
|
||
const column = apiRef.current.getColumn(item.field);
|
||
const filterOperator = (_column$filterOperato = column.filterOperators) == null ? void 0 : _column$filterOperato.find((operator) => operator.value === item.operator);
|
||
const requiresFilterValue = typeof (filterOperator == null ? void 0 : filterOperator.requiresFilterValue) === "undefined" ? true : filterOperator == null ? void 0 : filterOperator.requiresFilterValue;
|
||
if (requiresFilterValue) {
|
||
return false;
|
||
}
|
||
return true;
|
||
});
|
||
let newFilterItems;
|
||
const filterItemOnTarget = filterItemsWithValue.find((item) => item.field === targetColumnField);
|
||
const targetColumn = apiRef.current.getColumn(targetColumnField);
|
||
if (filterItemOnTarget) {
|
||
newFilterItems = filterItemsWithValue;
|
||
} else if (props.disableMultipleColumnsFiltering) {
|
||
newFilterItems = [cleanFilterItem({
|
||
field: targetColumnField,
|
||
operator: targetColumn.filterOperators[0].value
|
||
}, apiRef)];
|
||
} else {
|
||
newFilterItems = [...filterItemsWithValue, cleanFilterItem({
|
||
field: targetColumnField,
|
||
operator: targetColumn.filterOperators[0].value
|
||
}, apiRef)];
|
||
}
|
||
apiRef.current.setFilterModel(_extends({}, filterModel, {
|
||
items: newFilterItems
|
||
}));
|
||
}
|
||
apiRef.current.showPreferences(GridPreferencePanelsValue.filters, panelId, labelId);
|
||
}, [apiRef, logger, props.disableMultipleColumnsFiltering]);
|
||
const hideFilterPanel = React106.useCallback(() => {
|
||
logger.debug("Hiding filter panel");
|
||
apiRef.current.hidePreferences();
|
||
}, [apiRef, logger]);
|
||
const setFilterLogicOperator = React106.useCallback((logicOperator) => {
|
||
const filterModel = gridFilterModelSelector(apiRef);
|
||
if (filterModel.logicOperator === logicOperator) {
|
||
return;
|
||
}
|
||
apiRef.current.setFilterModel(_extends({}, filterModel, {
|
||
logicOperator
|
||
}), "changeLogicOperator");
|
||
}, [apiRef]);
|
||
const setQuickFilterValues = React106.useCallback((values) => {
|
||
const filterModel = gridFilterModelSelector(apiRef);
|
||
if (isDeepEqual(filterModel.quickFilterValues, values)) {
|
||
return;
|
||
}
|
||
apiRef.current.setFilterModel(_extends({}, filterModel, {
|
||
quickFilterValues: [...values]
|
||
}));
|
||
}, [apiRef]);
|
||
const setFilterModel = React106.useCallback((model, reason) => {
|
||
const currentModel = gridFilterModelSelector(apiRef);
|
||
if (currentModel !== model) {
|
||
logger.debug("Setting filter model");
|
||
apiRef.current.updateControlState("filter", mergeStateWithFilterModel(model, props.disableMultipleColumnsFiltering, apiRef), reason);
|
||
apiRef.current.unstable_applyFilters();
|
||
}
|
||
}, [apiRef, logger, props.disableMultipleColumnsFiltering]);
|
||
const filterApi = {
|
||
setFilterLogicOperator,
|
||
unstable_applyFilters: applyFilters,
|
||
deleteFilterItem,
|
||
upsertFilterItem,
|
||
upsertFilterItems,
|
||
setFilterModel,
|
||
showFilterPanel,
|
||
hideFilterPanel,
|
||
setQuickFilterValues,
|
||
ignoreDiacritics: props.ignoreDiacritics
|
||
};
|
||
useGridApiMethod(apiRef, filterApi, "public");
|
||
const stateExportPreProcessing = React106.useCallback((prevState, context) => {
|
||
var _props$initialState2;
|
||
const filterModelToExport = gridFilterModelSelector(apiRef);
|
||
const shouldExportFilterModel = (
|
||
// Always export if the `exportOnlyDirtyModels` property is not activated
|
||
!context.exportOnlyDirtyModels || // Always export if the model is controlled
|
||
props.filterModel != null || // Always export if the model has been initialized
|
||
((_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.filter) == null ? void 0 : _props$initialState2.filterModel) != null || // Export if the model is not equal to the default value
|
||
!isDeepEqual(filterModelToExport, getDefaultGridFilterModel())
|
||
);
|
||
if (!shouldExportFilterModel) {
|
||
return prevState;
|
||
}
|
||
return _extends({}, prevState, {
|
||
filter: {
|
||
filterModel: filterModelToExport
|
||
}
|
||
});
|
||
}, [apiRef, props.filterModel, (_props$initialState3 = props.initialState) == null || (_props$initialState3 = _props$initialState3.filter) == null ? void 0 : _props$initialState3.filterModel]);
|
||
const stateRestorePreProcessing = React106.useCallback((params, context) => {
|
||
var _context$stateToResto;
|
||
const filterModel = (_context$stateToResto = context.stateToRestore.filter) == null ? void 0 : _context$stateToResto.filterModel;
|
||
if (filterModel == null) {
|
||
return params;
|
||
}
|
||
apiRef.current.updateControlState("filter", mergeStateWithFilterModel(filterModel, props.disableMultipleColumnsFiltering, apiRef), "restoreState");
|
||
return _extends({}, params, {
|
||
callbacks: [...params.callbacks, apiRef.current.unstable_applyFilters]
|
||
});
|
||
}, [apiRef, props.disableMultipleColumnsFiltering]);
|
||
const preferencePanelPreProcessing = React106.useCallback((initialValue, value) => {
|
||
if (value === GridPreferencePanelsValue.filters) {
|
||
var _props$slotProps;
|
||
const FilterPanel = props.slots.filterPanel;
|
||
return (0, import_jsx_runtime97.jsx)(FilterPanel, _extends({}, (_props$slotProps = props.slotProps) == null ? void 0 : _props$slotProps.filterPanel));
|
||
}
|
||
return initialValue;
|
||
}, [props.slots.filterPanel, (_props$slotProps2 = props.slotProps) == null ? void 0 : _props$slotProps2.filterPanel]);
|
||
const {
|
||
getRowId
|
||
} = props;
|
||
const getRowsRef = useLazyRef(createMemoizedValues);
|
||
const flatFilteringMethod = React106.useCallback((params) => {
|
||
if (props.filterMode !== "client" || !params.isRowMatchingFilters) {
|
||
return {
|
||
filteredRowsLookup: {},
|
||
filteredDescendantCountLookup: {}
|
||
};
|
||
}
|
||
const dataRowIdToModelLookup = gridRowsLookupSelector(apiRef);
|
||
const filteredRowsLookup = {};
|
||
const {
|
||
isRowMatchingFilters
|
||
} = params;
|
||
const filterCache = {};
|
||
const result = {
|
||
passingFilterItems: null,
|
||
passingQuickFilterValues: null
|
||
};
|
||
const rows = getRowsRef.current(apiRef.current.state.rows.dataRowIdToModelLookup);
|
||
for (let i = 0; i < rows.length; i += 1) {
|
||
const row = rows[i];
|
||
const id = getRowId ? getRowId(row) : row.id;
|
||
isRowMatchingFilters(row, void 0, result);
|
||
const isRowPassing = passFilterLogic([result.passingFilterItems], [result.passingQuickFilterValues], params.filterModel, apiRef, filterCache);
|
||
filteredRowsLookup[id] = isRowPassing;
|
||
}
|
||
const footerId = "auto-generated-group-footer-root";
|
||
const footer = dataRowIdToModelLookup[footerId];
|
||
if (footer) {
|
||
filteredRowsLookup[footerId] = true;
|
||
}
|
||
return {
|
||
filteredRowsLookup,
|
||
filteredDescendantCountLookup: {}
|
||
};
|
||
}, [apiRef, props.filterMode, getRowId, getRowsRef]);
|
||
useGridRegisterPipeProcessor(apiRef, "columnMenu", addColumnMenuItem);
|
||
useGridRegisterPipeProcessor(apiRef, "exportState", stateExportPreProcessing);
|
||
useGridRegisterPipeProcessor(apiRef, "restoreState", stateRestorePreProcessing);
|
||
useGridRegisterPipeProcessor(apiRef, "preferencePanel", preferencePanelPreProcessing);
|
||
useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, "filtering", flatFilteringMethod);
|
||
useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, "visibleRowsLookupCreation", getVisibleRowsLookup);
|
||
const handleColumnsChange = React106.useCallback(() => {
|
||
logger.debug("onColUpdated - GridColumns changed, applying filters");
|
||
const filterModel = gridFilterModelSelector(apiRef);
|
||
const filterableColumnsLookup = gridFilterableColumnLookupSelector(apiRef);
|
||
const newFilterItems = filterModel.items.filter((item) => item.field && filterableColumnsLookup[item.field]);
|
||
if (newFilterItems.length < filterModel.items.length) {
|
||
apiRef.current.setFilterModel(_extends({}, filterModel, {
|
||
items: newFilterItems
|
||
}));
|
||
}
|
||
}, [apiRef, logger]);
|
||
const handleStrategyProcessorChange = React106.useCallback((methodName) => {
|
||
if (methodName === "filtering") {
|
||
apiRef.current.unstable_applyFilters();
|
||
}
|
||
}, [apiRef]);
|
||
const updateVisibleRowsLookupState = React106.useCallback(() => {
|
||
apiRef.current.setState((state) => {
|
||
return _extends({}, state, {
|
||
visibleRowsLookup: getVisibleRowsLookupState(apiRef, state)
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef]);
|
||
useGridApiEventHandler(apiRef, "rowsSet", updateFilteredRows);
|
||
useGridApiEventHandler(apiRef, "columnsChange", handleColumnsChange);
|
||
useGridApiEventHandler(apiRef, "activeStrategyProcessorChange", handleStrategyProcessorChange);
|
||
useGridApiEventHandler(apiRef, "rowExpansionChange", updateVisibleRowsLookupState);
|
||
useGridApiEventHandler(apiRef, "columnVisibilityModelChange", () => {
|
||
const filterModel = gridFilterModelSelector(apiRef);
|
||
if (filterModel.quickFilterValues && filterModel.quickFilterExcludeHiddenColumns) {
|
||
apiRef.current.unstable_applyFilters();
|
||
}
|
||
});
|
||
useFirstRender(() => {
|
||
apiRef.current.unstable_applyFilters();
|
||
});
|
||
useEnhancedEffect_default(() => {
|
||
if (props.filterModel !== void 0) {
|
||
apiRef.current.setFilterModel(props.filterModel);
|
||
}
|
||
}, [apiRef, logger, props.filterModel]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/focus/useGridFocus.js
|
||
init_extends();
|
||
var React107 = __toESM(require_react());
|
||
var focusStateInitializer = (state) => _extends({}, state, {
|
||
focus: {
|
||
cell: null,
|
||
columnHeader: null,
|
||
columnHeaderFilter: null,
|
||
columnGroupHeader: null
|
||
},
|
||
tabIndex: {
|
||
cell: null,
|
||
columnHeader: null,
|
||
columnHeaderFilter: null,
|
||
columnGroupHeader: null
|
||
}
|
||
});
|
||
var useGridFocus = (apiRef, props) => {
|
||
const logger = useGridLogger(apiRef, "useGridFocus");
|
||
const lastClickedCell = React107.useRef(null);
|
||
const publishCellFocusOut = React107.useCallback((cell, event) => {
|
||
if (cell) {
|
||
if (apiRef.current.getRow(cell.id)) {
|
||
apiRef.current.publishEvent("cellFocusOut", apiRef.current.getCellParams(cell.id, cell.field), event);
|
||
}
|
||
}
|
||
}, [apiRef]);
|
||
const setCellFocus = React107.useCallback((id, field) => {
|
||
const focusedCell = gridFocusCellSelector(apiRef);
|
||
if ((focusedCell == null ? void 0 : focusedCell.id) === id && (focusedCell == null ? void 0 : focusedCell.field) === field) {
|
||
return;
|
||
}
|
||
apiRef.current.setState((state) => {
|
||
logger.debug(`Focusing on cell with id=${id} and field=${field}`);
|
||
return _extends({}, state, {
|
||
tabIndex: {
|
||
cell: {
|
||
id,
|
||
field
|
||
},
|
||
columnHeader: null,
|
||
columnHeaderFilter: null,
|
||
columnGroupHeader: null
|
||
},
|
||
focus: {
|
||
cell: {
|
||
id,
|
||
field
|
||
},
|
||
columnHeader: null,
|
||
columnHeaderFilter: null,
|
||
columnGroupHeader: null
|
||
}
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
if (!apiRef.current.getRow(id)) {
|
||
return;
|
||
}
|
||
if (focusedCell) {
|
||
publishCellFocusOut(focusedCell, {});
|
||
}
|
||
apiRef.current.publishEvent("cellFocusIn", apiRef.current.getCellParams(id, field));
|
||
}, [apiRef, logger, publishCellFocusOut]);
|
||
const setColumnHeaderFocus = React107.useCallback((field, event = {}) => {
|
||
const cell = gridFocusCellSelector(apiRef);
|
||
publishCellFocusOut(cell, event);
|
||
apiRef.current.setState((state) => {
|
||
logger.debug(`Focusing on column header with colIndex=${field}`);
|
||
return _extends({}, state, {
|
||
tabIndex: {
|
||
columnHeader: {
|
||
field
|
||
},
|
||
columnHeaderFilter: null,
|
||
cell: null,
|
||
columnGroupHeader: null
|
||
},
|
||
focus: {
|
||
columnHeader: {
|
||
field
|
||
},
|
||
columnHeaderFilter: null,
|
||
cell: null,
|
||
columnGroupHeader: null
|
||
}
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef, logger, publishCellFocusOut]);
|
||
const setColumnHeaderFilterFocus = React107.useCallback((field, event = {}) => {
|
||
const cell = gridFocusCellSelector(apiRef);
|
||
publishCellFocusOut(cell, event);
|
||
apiRef.current.setState((state) => {
|
||
logger.debug(`Focusing on column header filter with colIndex=${field}`);
|
||
return _extends({}, state, {
|
||
tabIndex: {
|
||
columnHeader: null,
|
||
columnHeaderFilter: {
|
||
field
|
||
},
|
||
cell: null,
|
||
columnGroupHeader: null
|
||
},
|
||
focus: {
|
||
columnHeader: null,
|
||
columnHeaderFilter: {
|
||
field
|
||
},
|
||
cell: null,
|
||
columnGroupHeader: null
|
||
}
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef, logger, publishCellFocusOut]);
|
||
const setColumnGroupHeaderFocus = React107.useCallback((field, depth, event = {}) => {
|
||
const cell = gridFocusCellSelector(apiRef);
|
||
if (cell) {
|
||
apiRef.current.publishEvent("cellFocusOut", apiRef.current.getCellParams(cell.id, cell.field), event);
|
||
}
|
||
apiRef.current.setState((state) => {
|
||
return _extends({}, state, {
|
||
tabIndex: {
|
||
columnGroupHeader: {
|
||
field,
|
||
depth
|
||
},
|
||
columnHeader: null,
|
||
columnHeaderFilter: null,
|
||
cell: null
|
||
},
|
||
focus: {
|
||
columnGroupHeader: {
|
||
field,
|
||
depth
|
||
},
|
||
columnHeader: null,
|
||
columnHeaderFilter: null,
|
||
cell: null
|
||
}
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef]);
|
||
const getColumnGroupHeaderFocus = React107.useCallback(() => unstable_gridFocusColumnGroupHeaderSelector(apiRef), [apiRef]);
|
||
const moveFocusToRelativeCell = React107.useCallback((id, field, direction) => {
|
||
let columnIndexToFocus = apiRef.current.getColumnIndex(field);
|
||
const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);
|
||
const currentPage = getVisibleRows(apiRef, {
|
||
pagination: props.pagination,
|
||
paginationMode: props.paginationMode
|
||
});
|
||
const pinnedRows = gridPinnedRowsSelector(apiRef);
|
||
const currentPageRows = [].concat(pinnedRows.top || [], currentPage.rows, pinnedRows.bottom || []);
|
||
let rowIndexToFocus = currentPageRows.findIndex((row) => row.id === id);
|
||
if (direction === "right") {
|
||
columnIndexToFocus += 1;
|
||
} else if (direction === "left") {
|
||
columnIndexToFocus -= 1;
|
||
} else {
|
||
rowIndexToFocus += 1;
|
||
}
|
||
if (columnIndexToFocus >= visibleColumns.length) {
|
||
rowIndexToFocus += 1;
|
||
if (rowIndexToFocus < currentPageRows.length) {
|
||
columnIndexToFocus = 0;
|
||
}
|
||
} else if (columnIndexToFocus < 0) {
|
||
rowIndexToFocus -= 1;
|
||
if (rowIndexToFocus >= 0) {
|
||
columnIndexToFocus = visibleColumns.length - 1;
|
||
}
|
||
}
|
||
rowIndexToFocus = clamp(rowIndexToFocus, 0, currentPageRows.length - 1);
|
||
const rowToFocus = currentPageRows[rowIndexToFocus];
|
||
if (!rowToFocus) {
|
||
return;
|
||
}
|
||
const colSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowToFocus.id, columnIndexToFocus);
|
||
if (colSpanInfo && colSpanInfo.spannedByColSpan) {
|
||
if (direction === "left" || direction === "below") {
|
||
columnIndexToFocus = colSpanInfo.leftVisibleCellIndex;
|
||
} else if (direction === "right") {
|
||
columnIndexToFocus = colSpanInfo.rightVisibleCellIndex;
|
||
}
|
||
}
|
||
columnIndexToFocus = clamp(columnIndexToFocus, 0, visibleColumns.length - 1);
|
||
const columnToFocus = visibleColumns[columnIndexToFocus];
|
||
apiRef.current.setCellFocus(rowToFocus.id, columnToFocus.field);
|
||
}, [apiRef, props.pagination, props.paginationMode]);
|
||
const handleCellDoubleClick = React107.useCallback(({
|
||
id,
|
||
field
|
||
}) => {
|
||
apiRef.current.setCellFocus(id, field);
|
||
}, [apiRef]);
|
||
const handleCellKeyDown = React107.useCallback((params, event) => {
|
||
if (event.key === "Enter" || event.key === "Tab" || event.key === "Shift" || isNavigationKey(event.key)) {
|
||
return;
|
||
}
|
||
apiRef.current.setCellFocus(params.id, params.field);
|
||
}, [apiRef]);
|
||
const handleColumnHeaderFocus = React107.useCallback(({
|
||
field
|
||
}, event) => {
|
||
if (event.target !== event.currentTarget) {
|
||
return;
|
||
}
|
||
apiRef.current.setColumnHeaderFocus(field, event);
|
||
}, [apiRef]);
|
||
const handleColumnGroupHeaderFocus = React107.useCallback(({
|
||
fields,
|
||
depth
|
||
}, event) => {
|
||
if (event.target !== event.currentTarget) {
|
||
return;
|
||
}
|
||
const focusedColumnGroup = unstable_gridFocusColumnGroupHeaderSelector(apiRef);
|
||
if (focusedColumnGroup !== null && focusedColumnGroup.depth === depth && fields.includes(focusedColumnGroup.field)) {
|
||
return;
|
||
}
|
||
apiRef.current.setColumnGroupHeaderFocus(fields[0], depth, event);
|
||
}, [apiRef]);
|
||
const handleBlur = React107.useCallback((_, event) => {
|
||
var _event$relatedTarget;
|
||
if ((_event$relatedTarget = event.relatedTarget) != null && _event$relatedTarget.className.includes(gridClasses.columnHeader)) {
|
||
return;
|
||
}
|
||
logger.debug(`Clearing focus`);
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
focus: {
|
||
cell: null,
|
||
columnHeader: null,
|
||
columnHeaderFilter: null,
|
||
columnGroupHeader: null
|
||
}
|
||
}));
|
||
}, [logger, apiRef]);
|
||
const handleCellMouseDown = React107.useCallback((params) => {
|
||
lastClickedCell.current = params;
|
||
}, []);
|
||
const handleDocumentClick = React107.useCallback((event) => {
|
||
const cellParams = lastClickedCell.current;
|
||
lastClickedCell.current = null;
|
||
const focusedCell = gridFocusCellSelector(apiRef);
|
||
const canUpdateFocus = apiRef.current.unstable_applyPipeProcessors("canUpdateFocus", true, {
|
||
event,
|
||
cell: cellParams
|
||
});
|
||
if (!canUpdateFocus) {
|
||
return;
|
||
}
|
||
if (!focusedCell) {
|
||
if (cellParams) {
|
||
apiRef.current.setCellFocus(cellParams.id, cellParams.field);
|
||
}
|
||
return;
|
||
}
|
||
if ((cellParams == null ? void 0 : cellParams.id) === focusedCell.id && (cellParams == null ? void 0 : cellParams.field) === focusedCell.field) {
|
||
return;
|
||
}
|
||
const cellElement = apiRef.current.getCellElement(focusedCell.id, focusedCell.field);
|
||
if (cellElement != null && cellElement.contains(event.target)) {
|
||
return;
|
||
}
|
||
if (cellParams) {
|
||
apiRef.current.setCellFocus(cellParams.id, cellParams.field);
|
||
} else {
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
focus: {
|
||
cell: null,
|
||
columnHeader: null,
|
||
columnHeaderFilter: null,
|
||
columnGroupHeader: null
|
||
}
|
||
}));
|
||
apiRef.current.forceUpdate();
|
||
publishCellFocusOut(focusedCell, event);
|
||
}
|
||
}, [apiRef, publishCellFocusOut]);
|
||
const handleCellModeChange = React107.useCallback((params) => {
|
||
if (params.cellMode === "view") {
|
||
return;
|
||
}
|
||
const cell = gridFocusCellSelector(apiRef);
|
||
if ((cell == null ? void 0 : cell.id) !== params.id || (cell == null ? void 0 : cell.field) !== params.field) {
|
||
apiRef.current.setCellFocus(params.id, params.field);
|
||
}
|
||
}, [apiRef]);
|
||
const handleRowSet = React107.useCallback(() => {
|
||
const cell = gridFocusCellSelector(apiRef);
|
||
if (cell && !apiRef.current.getRow(cell.id)) {
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
focus: {
|
||
cell: null,
|
||
columnHeader: null,
|
||
columnHeaderFilter: null,
|
||
columnGroupHeader: null
|
||
}
|
||
}));
|
||
}
|
||
}, [apiRef]);
|
||
const handlePaginationModelChange = useEventCallback_default(() => {
|
||
const currentFocusedCell = gridFocusCellSelector(apiRef);
|
||
if (!currentFocusedCell) {
|
||
return;
|
||
}
|
||
const currentPage = getVisibleRows(apiRef, {
|
||
pagination: props.pagination,
|
||
paginationMode: props.paginationMode
|
||
});
|
||
const rowIsInCurrentPage = currentPage.rows.find((row) => row.id === currentFocusedCell.id);
|
||
if (rowIsInCurrentPage) {
|
||
return;
|
||
}
|
||
const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);
|
||
apiRef.current.setState((state) => {
|
||
return _extends({}, state, {
|
||
tabIndex: {
|
||
cell: {
|
||
id: currentPage.rows[0].id,
|
||
field: visibleColumns[0].field
|
||
},
|
||
columnGroupHeader: null,
|
||
columnHeader: null,
|
||
columnHeaderFilter: null
|
||
}
|
||
});
|
||
});
|
||
});
|
||
const focusApi = {
|
||
setCellFocus,
|
||
setColumnHeaderFocus,
|
||
setColumnHeaderFilterFocus
|
||
};
|
||
const focusPrivateApi = {
|
||
moveFocusToRelativeCell,
|
||
setColumnGroupHeaderFocus,
|
||
getColumnGroupHeaderFocus
|
||
};
|
||
useGridApiMethod(apiRef, focusApi, "public");
|
||
useGridApiMethod(apiRef, focusPrivateApi, "private");
|
||
React107.useEffect(() => {
|
||
const doc = ownerDocument(apiRef.current.rootElementRef.current);
|
||
doc.addEventListener("mouseup", handleDocumentClick);
|
||
return () => {
|
||
doc.removeEventListener("mouseup", handleDocumentClick);
|
||
};
|
||
}, [apiRef, handleDocumentClick]);
|
||
useGridApiEventHandler(apiRef, "columnHeaderBlur", handleBlur);
|
||
useGridApiEventHandler(apiRef, "cellDoubleClick", handleCellDoubleClick);
|
||
useGridApiEventHandler(apiRef, "cellMouseDown", handleCellMouseDown);
|
||
useGridApiEventHandler(apiRef, "cellKeyDown", handleCellKeyDown);
|
||
useGridApiEventHandler(apiRef, "cellModeChange", handleCellModeChange);
|
||
useGridApiEventHandler(apiRef, "columnHeaderFocus", handleColumnHeaderFocus);
|
||
useGridApiEventHandler(apiRef, "columnGroupHeaderFocus", handleColumnGroupHeaderFocus);
|
||
useGridApiEventHandler(apiRef, "rowsSet", handleRowSet);
|
||
useGridApiEventHandler(apiRef, "paginationModelChange", handlePaginationModelChange);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js
|
||
var React108 = __toESM(require_react());
|
||
function enrichPageRowsWithPinnedRows(apiRef, rows) {
|
||
const pinnedRows = gridPinnedRowsSelector(apiRef) || {};
|
||
return [...pinnedRows.top || [], ...rows, ...pinnedRows.bottom || []];
|
||
}
|
||
var getLeftColumnIndex = ({
|
||
currentColIndex,
|
||
firstColIndex,
|
||
lastColIndex,
|
||
direction
|
||
}) => {
|
||
if (direction === "rtl") {
|
||
if (currentColIndex < lastColIndex) {
|
||
return currentColIndex + 1;
|
||
}
|
||
} else if (direction === "ltr") {
|
||
if (currentColIndex > firstColIndex) {
|
||
return currentColIndex - 1;
|
||
}
|
||
}
|
||
return null;
|
||
};
|
||
var getRightColumnIndex = ({
|
||
currentColIndex,
|
||
firstColIndex,
|
||
lastColIndex,
|
||
direction
|
||
}) => {
|
||
if (direction === "rtl") {
|
||
if (currentColIndex > firstColIndex) {
|
||
return currentColIndex - 1;
|
||
}
|
||
} else if (direction === "ltr") {
|
||
if (currentColIndex < lastColIndex) {
|
||
return currentColIndex + 1;
|
||
}
|
||
}
|
||
return null;
|
||
};
|
||
var useGridKeyboardNavigation = (apiRef, props) => {
|
||
const logger = useGridLogger(apiRef, "useGridKeyboardNavigation");
|
||
const initialCurrentPageRows = useGridVisibleRows(apiRef, props).rows;
|
||
const theme = useTheme();
|
||
const currentPageRows = React108.useMemo(() => enrichPageRowsWithPinnedRows(apiRef, initialCurrentPageRows), [apiRef, initialCurrentPageRows]);
|
||
const headerFilteringEnabled = (
|
||
// @ts-expect-error // TODO move relevant code to the `DataGridPro`
|
||
props.signature !== "DataGrid" && props.unstable_headerFilters
|
||
);
|
||
const goToCell = React108.useCallback((colIndex, rowId, closestColumnToUse = "left") => {
|
||
const visibleSortedRows = gridExpandedSortedRowEntriesSelector(apiRef);
|
||
const nextCellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, colIndex);
|
||
if (nextCellColSpanInfo && nextCellColSpanInfo.spannedByColSpan) {
|
||
if (closestColumnToUse === "left") {
|
||
colIndex = nextCellColSpanInfo.leftVisibleCellIndex;
|
||
} else if (closestColumnToUse === "right") {
|
||
colIndex = nextCellColSpanInfo.rightVisibleCellIndex;
|
||
}
|
||
}
|
||
const rowIndexRelativeToAllRows = visibleSortedRows.findIndex((row) => row.id === rowId);
|
||
logger.debug(`Navigating to cell row ${rowIndexRelativeToAllRows}, col ${colIndex}`);
|
||
apiRef.current.scrollToIndexes({
|
||
colIndex,
|
||
rowIndex: rowIndexRelativeToAllRows
|
||
});
|
||
const field = apiRef.current.getVisibleColumns()[colIndex].field;
|
||
apiRef.current.setCellFocus(rowId, field);
|
||
}, [apiRef, logger]);
|
||
const goToHeader = React108.useCallback((colIndex, event) => {
|
||
logger.debug(`Navigating to header col ${colIndex}`);
|
||
apiRef.current.scrollToIndexes({
|
||
colIndex
|
||
});
|
||
const field = apiRef.current.getVisibleColumns()[colIndex].field;
|
||
apiRef.current.setColumnHeaderFocus(field, event);
|
||
}, [apiRef, logger]);
|
||
const goToHeaderFilter = React108.useCallback((colIndex, event) => {
|
||
logger.debug(`Navigating to header filter col ${colIndex}`);
|
||
apiRef.current.scrollToIndexes({
|
||
colIndex
|
||
});
|
||
const field = apiRef.current.getVisibleColumns()[colIndex].field;
|
||
apiRef.current.setColumnHeaderFilterFocus(field, event);
|
||
}, [apiRef, logger]);
|
||
const goToGroupHeader = React108.useCallback((colIndex, depth, event) => {
|
||
logger.debug(`Navigating to header col ${colIndex}`);
|
||
apiRef.current.scrollToIndexes({
|
||
colIndex
|
||
});
|
||
const {
|
||
field
|
||
} = apiRef.current.getVisibleColumns()[colIndex];
|
||
apiRef.current.setColumnGroupHeaderFocus(field, depth, event);
|
||
}, [apiRef, logger]);
|
||
const getRowIdFromIndex = React108.useCallback((rowIndex) => {
|
||
var _currentPageRows$rowI;
|
||
return (_currentPageRows$rowI = currentPageRows[rowIndex]) == null ? void 0 : _currentPageRows$rowI.id;
|
||
}, [currentPageRows]);
|
||
const handleColumnHeaderKeyDown = React108.useCallback((params, event) => {
|
||
const headerTitleNode = event.currentTarget.querySelector(`.${gridClasses.columnHeaderTitleContainerContent}`);
|
||
const isFromInsideContent = !!headerTitleNode && headerTitleNode.contains(event.target);
|
||
if (isFromInsideContent && params.field !== GRID_CHECKBOX_SELECTION_COL_DEF.field) {
|
||
return;
|
||
}
|
||
const dimensions = apiRef.current.getRootDimensions();
|
||
if (!dimensions) {
|
||
return;
|
||
}
|
||
const viewportPageSize = apiRef.current.getViewportPageSize();
|
||
const colIndexBefore = params.field ? apiRef.current.getColumnIndex(params.field) : 0;
|
||
const firstRowIndexInPage = currentPageRows.length > 0 ? 0 : null;
|
||
const lastRowIndexInPage = currentPageRows.length - 1;
|
||
const firstColIndex = 0;
|
||
const lastColIndex = gridVisibleColumnDefinitionsSelector(apiRef).length - 1;
|
||
const columnGroupMaxDepth = gridColumnGroupsHeaderMaxDepthSelector(apiRef);
|
||
let shouldPreventDefault = true;
|
||
switch (event.key) {
|
||
case "ArrowDown": {
|
||
if (firstRowIndexInPage !== null) {
|
||
if (headerFilteringEnabled) {
|
||
goToHeaderFilter(colIndexBefore, event);
|
||
} else {
|
||
goToCell(colIndexBefore, getRowIdFromIndex(firstRowIndexInPage));
|
||
}
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowRight": {
|
||
const rightColIndex = getRightColumnIndex({
|
||
currentColIndex: colIndexBefore,
|
||
firstColIndex,
|
||
lastColIndex,
|
||
direction: theme.direction
|
||
});
|
||
if (rightColIndex !== null) {
|
||
goToHeader(rightColIndex, event);
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowLeft": {
|
||
const leftColIndex = getLeftColumnIndex({
|
||
currentColIndex: colIndexBefore,
|
||
firstColIndex,
|
||
lastColIndex,
|
||
direction: theme.direction
|
||
});
|
||
if (leftColIndex !== null) {
|
||
goToHeader(leftColIndex, event);
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowUp": {
|
||
if (columnGroupMaxDepth > 0) {
|
||
goToGroupHeader(colIndexBefore, columnGroupMaxDepth - 1, event);
|
||
}
|
||
break;
|
||
}
|
||
case "PageDown": {
|
||
if (firstRowIndexInPage !== null && lastRowIndexInPage !== null) {
|
||
goToCell(colIndexBefore, getRowIdFromIndex(Math.min(firstRowIndexInPage + viewportPageSize, lastRowIndexInPage)));
|
||
}
|
||
break;
|
||
}
|
||
case "Home": {
|
||
goToHeader(firstColIndex, event);
|
||
break;
|
||
}
|
||
case "End": {
|
||
goToHeader(lastColIndex, event);
|
||
break;
|
||
}
|
||
case "Enter": {
|
||
if (event.ctrlKey || event.metaKey) {
|
||
apiRef.current.toggleColumnMenu(params.field);
|
||
}
|
||
break;
|
||
}
|
||
case " ": {
|
||
break;
|
||
}
|
||
default: {
|
||
shouldPreventDefault = false;
|
||
}
|
||
}
|
||
if (shouldPreventDefault) {
|
||
event.preventDefault();
|
||
}
|
||
}, [apiRef, currentPageRows.length, headerFilteringEnabled, goToHeaderFilter, goToCell, getRowIdFromIndex, theme.direction, goToHeader, goToGroupHeader]);
|
||
const handleHeaderFilterKeyDown = React108.useCallback((params, event) => {
|
||
const dimensions = apiRef.current.getRootDimensions();
|
||
if (!dimensions) {
|
||
return;
|
||
}
|
||
const isEditing = unstable_gridHeaderFilteringEditFieldSelector(apiRef) === params.field;
|
||
const isHeaderMenuOpen = unstable_gridHeaderFilteringMenuSelector(apiRef) === params.field;
|
||
if (isEditing || isHeaderMenuOpen || !isNavigationKey(event.key)) {
|
||
return;
|
||
}
|
||
const viewportPageSize = apiRef.current.getViewportPageSize();
|
||
const colIndexBefore = params.field ? apiRef.current.getColumnIndex(params.field) : 0;
|
||
const firstRowIndexInPage = 0;
|
||
const lastRowIndexInPage = currentPageRows.length - 1;
|
||
const firstColIndex = 0;
|
||
const lastColIndex = gridVisibleColumnDefinitionsSelector(apiRef).length - 1;
|
||
let shouldPreventDefault = true;
|
||
switch (event.key) {
|
||
case "ArrowDown": {
|
||
const rowId = getRowIdFromIndex(firstRowIndexInPage);
|
||
if (firstRowIndexInPage !== null && rowId != null) {
|
||
goToCell(colIndexBefore, rowId);
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowRight": {
|
||
const rightColIndex = getRightColumnIndex({
|
||
currentColIndex: colIndexBefore,
|
||
firstColIndex,
|
||
lastColIndex,
|
||
direction: theme.direction
|
||
});
|
||
if (rightColIndex !== null) {
|
||
goToHeaderFilter(rightColIndex, event);
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowLeft": {
|
||
const leftColIndex = getLeftColumnIndex({
|
||
currentColIndex: colIndexBefore,
|
||
firstColIndex,
|
||
lastColIndex,
|
||
direction: theme.direction
|
||
});
|
||
if (leftColIndex !== null) {
|
||
goToHeaderFilter(leftColIndex, event);
|
||
} else {
|
||
apiRef.current.setColumnHeaderFilterFocus(params.field, event);
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowUp": {
|
||
goToHeader(colIndexBefore, event);
|
||
break;
|
||
}
|
||
case "PageDown": {
|
||
if (firstRowIndexInPage !== null && lastRowIndexInPage !== null) {
|
||
goToCell(colIndexBefore, getRowIdFromIndex(Math.min(firstRowIndexInPage + viewportPageSize, lastRowIndexInPage)));
|
||
}
|
||
break;
|
||
}
|
||
case "Home": {
|
||
goToHeaderFilter(firstColIndex, event);
|
||
break;
|
||
}
|
||
case "End": {
|
||
goToHeaderFilter(lastColIndex, event);
|
||
break;
|
||
}
|
||
case " ": {
|
||
break;
|
||
}
|
||
default: {
|
||
shouldPreventDefault = false;
|
||
}
|
||
}
|
||
if (shouldPreventDefault) {
|
||
event.preventDefault();
|
||
}
|
||
}, [apiRef, currentPageRows.length, goToHeaderFilter, theme.direction, goToHeader, goToCell, getRowIdFromIndex]);
|
||
const handleColumnGroupHeaderKeyDown = React108.useCallback((params, event) => {
|
||
const dimensions = apiRef.current.getRootDimensions();
|
||
if (!dimensions) {
|
||
return;
|
||
}
|
||
const focusedColumnGroup = unstable_gridFocusColumnGroupHeaderSelector(apiRef);
|
||
if (focusedColumnGroup === null) {
|
||
return;
|
||
}
|
||
const {
|
||
field: currentField,
|
||
depth: currentDepth
|
||
} = focusedColumnGroup;
|
||
const {
|
||
fields,
|
||
depth,
|
||
maxDepth
|
||
} = params;
|
||
const viewportPageSize = apiRef.current.getViewportPageSize();
|
||
const currentColIndex = apiRef.current.getColumnIndex(currentField);
|
||
const colIndexBefore = currentField ? apiRef.current.getColumnIndex(currentField) : 0;
|
||
const firstRowIndexInPage = 0;
|
||
const lastRowIndexInPage = currentPageRows.length - 1;
|
||
const firstColIndex = 0;
|
||
const lastColIndex = gridVisibleColumnDefinitionsSelector(apiRef).length - 1;
|
||
let shouldPreventDefault = true;
|
||
switch (event.key) {
|
||
case "ArrowDown": {
|
||
if (depth === maxDepth - 1) {
|
||
goToHeader(currentColIndex, event);
|
||
} else {
|
||
goToGroupHeader(currentColIndex, currentDepth + 1, event);
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowUp": {
|
||
if (depth > 0) {
|
||
goToGroupHeader(currentColIndex, currentDepth - 1, event);
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowRight": {
|
||
const remainingRightColumns = fields.length - fields.indexOf(currentField) - 1;
|
||
if (currentColIndex + remainingRightColumns + 1 <= lastColIndex) {
|
||
goToGroupHeader(currentColIndex + remainingRightColumns + 1, currentDepth, event);
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowLeft": {
|
||
const remainingLeftColumns = fields.indexOf(currentField);
|
||
if (currentColIndex - remainingLeftColumns - 1 >= firstColIndex) {
|
||
goToGroupHeader(currentColIndex - remainingLeftColumns - 1, currentDepth, event);
|
||
}
|
||
break;
|
||
}
|
||
case "PageDown": {
|
||
if (firstRowIndexInPage !== null && lastRowIndexInPage !== null) {
|
||
goToCell(colIndexBefore, getRowIdFromIndex(Math.min(firstRowIndexInPage + viewportPageSize, lastRowIndexInPage)));
|
||
}
|
||
break;
|
||
}
|
||
case "Home": {
|
||
goToGroupHeader(firstColIndex, currentDepth, event);
|
||
break;
|
||
}
|
||
case "End": {
|
||
goToGroupHeader(lastColIndex, currentDepth, event);
|
||
break;
|
||
}
|
||
case " ": {
|
||
break;
|
||
}
|
||
default: {
|
||
shouldPreventDefault = false;
|
||
}
|
||
}
|
||
if (shouldPreventDefault) {
|
||
event.preventDefault();
|
||
}
|
||
}, [apiRef, currentPageRows.length, goToHeader, goToGroupHeader, goToCell, getRowIdFromIndex]);
|
||
const handleCellKeyDown = React108.useCallback((params, event) => {
|
||
if (isEventTargetInPortal(event)) {
|
||
return;
|
||
}
|
||
const cellParams = apiRef.current.getCellParams(params.id, params.field);
|
||
if (cellParams.cellMode === GridCellModes.Edit || !isNavigationKey(event.key)) {
|
||
return;
|
||
}
|
||
const canUpdateFocus = apiRef.current.unstable_applyPipeProcessors("canUpdateFocus", true, {
|
||
event,
|
||
cell: cellParams
|
||
});
|
||
if (!canUpdateFocus) {
|
||
return;
|
||
}
|
||
const dimensions = apiRef.current.getRootDimensions();
|
||
if (currentPageRows.length === 0 || !dimensions) {
|
||
return;
|
||
}
|
||
const direction = theme.direction;
|
||
const viewportPageSize = apiRef.current.getViewportPageSize();
|
||
const colIndexBefore = params.field ? apiRef.current.getColumnIndex(params.field) : 0;
|
||
const rowIndexBefore = currentPageRows.findIndex((row) => row.id === params.id);
|
||
const firstRowIndexInPage = 0;
|
||
const lastRowIndexInPage = currentPageRows.length - 1;
|
||
const firstColIndex = 0;
|
||
const lastColIndex = gridVisibleColumnDefinitionsSelector(apiRef).length - 1;
|
||
let shouldPreventDefault = true;
|
||
switch (event.key) {
|
||
case "ArrowDown": {
|
||
if (rowIndexBefore < lastRowIndexInPage) {
|
||
goToCell(colIndexBefore, getRowIdFromIndex(rowIndexBefore + 1));
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowUp": {
|
||
if (rowIndexBefore > firstRowIndexInPage) {
|
||
goToCell(colIndexBefore, getRowIdFromIndex(rowIndexBefore - 1));
|
||
} else if (headerFilteringEnabled) {
|
||
goToHeaderFilter(colIndexBefore, event);
|
||
} else {
|
||
goToHeader(colIndexBefore, event);
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowRight": {
|
||
const rightColIndex = getRightColumnIndex({
|
||
currentColIndex: colIndexBefore,
|
||
firstColIndex,
|
||
lastColIndex,
|
||
direction
|
||
});
|
||
if (rightColIndex !== null) {
|
||
goToCell(rightColIndex, getRowIdFromIndex(rowIndexBefore), direction === "rtl" ? "left" : "right");
|
||
}
|
||
break;
|
||
}
|
||
case "ArrowLeft": {
|
||
const leftColIndex = getLeftColumnIndex({
|
||
currentColIndex: colIndexBefore,
|
||
firstColIndex,
|
||
lastColIndex,
|
||
direction
|
||
});
|
||
if (leftColIndex !== null) {
|
||
goToCell(leftColIndex, getRowIdFromIndex(rowIndexBefore), direction === "rtl" ? "right" : "left");
|
||
}
|
||
break;
|
||
}
|
||
case "Tab": {
|
||
if (event.shiftKey && colIndexBefore > firstColIndex) {
|
||
goToCell(colIndexBefore - 1, getRowIdFromIndex(rowIndexBefore), "left");
|
||
} else if (!event.shiftKey && colIndexBefore < lastColIndex) {
|
||
goToCell(colIndexBefore + 1, getRowIdFromIndex(rowIndexBefore), "right");
|
||
}
|
||
break;
|
||
}
|
||
case " ": {
|
||
const field = params.field;
|
||
if (field === GRID_DETAIL_PANEL_TOGGLE_FIELD) {
|
||
break;
|
||
}
|
||
const colDef = params.colDef;
|
||
if (colDef && colDef.type === "treeDataGroup") {
|
||
break;
|
||
}
|
||
if (!event.shiftKey && rowIndexBefore < lastRowIndexInPage) {
|
||
goToCell(colIndexBefore, getRowIdFromIndex(Math.min(rowIndexBefore + viewportPageSize, lastRowIndexInPage)));
|
||
}
|
||
break;
|
||
}
|
||
case "PageDown": {
|
||
if (rowIndexBefore < lastRowIndexInPage) {
|
||
goToCell(colIndexBefore, getRowIdFromIndex(Math.min(rowIndexBefore + viewportPageSize, lastRowIndexInPage)));
|
||
}
|
||
break;
|
||
}
|
||
case "PageUp": {
|
||
const nextRowIndex = Math.max(rowIndexBefore - viewportPageSize, firstRowIndexInPage);
|
||
if (nextRowIndex !== rowIndexBefore && nextRowIndex >= firstRowIndexInPage) {
|
||
goToCell(colIndexBefore, getRowIdFromIndex(nextRowIndex));
|
||
} else {
|
||
goToHeader(colIndexBefore, event);
|
||
}
|
||
break;
|
||
}
|
||
case "Home": {
|
||
if (event.ctrlKey || event.metaKey || event.shiftKey) {
|
||
goToCell(firstColIndex, getRowIdFromIndex(firstRowIndexInPage));
|
||
} else {
|
||
goToCell(firstColIndex, getRowIdFromIndex(rowIndexBefore));
|
||
}
|
||
break;
|
||
}
|
||
case "End": {
|
||
if (event.ctrlKey || event.metaKey || event.shiftKey) {
|
||
goToCell(lastColIndex, getRowIdFromIndex(lastRowIndexInPage));
|
||
} else {
|
||
goToCell(lastColIndex, getRowIdFromIndex(rowIndexBefore));
|
||
}
|
||
break;
|
||
}
|
||
default: {
|
||
shouldPreventDefault = false;
|
||
}
|
||
}
|
||
if (shouldPreventDefault) {
|
||
event.preventDefault();
|
||
}
|
||
}, [apiRef, currentPageRows, theme.direction, goToCell, getRowIdFromIndex, headerFilteringEnabled, goToHeaderFilter, goToHeader]);
|
||
const checkIfCanStartEditing = React108.useCallback((initialValue, {
|
||
event
|
||
}) => {
|
||
if (event.key === " ") {
|
||
return false;
|
||
}
|
||
return initialValue;
|
||
}, []);
|
||
useGridRegisterPipeProcessor(apiRef, "canStartEditing", checkIfCanStartEditing);
|
||
useGridApiEventHandler(apiRef, "columnHeaderKeyDown", handleColumnHeaderKeyDown);
|
||
useGridApiEventHandler(apiRef, "headerFilterKeyDown", handleHeaderFilterKeyDown);
|
||
useGridApiEventHandler(apiRef, "columnGroupHeaderKeyDown", handleColumnGroupHeaderKeyDown);
|
||
useGridApiEventHandler(apiRef, "cellKeyDown", handleCellKeyDown);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/pagination/useGridPagination.js
|
||
init_extends();
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/pagination/useGridRowCount.js
|
||
init_extends();
|
||
var React109 = __toESM(require_react());
|
||
var useGridRowCount = (apiRef, props) => {
|
||
var _props$initialState2;
|
||
const logger = useGridLogger(apiRef, "useGridRowCount");
|
||
const visibleTopLevelRowCount = useGridSelector(apiRef, gridFilteredTopLevelRowCountSelector);
|
||
const rowCount = useGridSelector(apiRef, gridPaginationRowCountSelector);
|
||
apiRef.current.registerControlState({
|
||
stateId: "paginationRowCount",
|
||
propModel: props.rowCount,
|
||
propOnChange: props.onRowCountChange,
|
||
stateSelector: gridPaginationRowCountSelector,
|
||
changeEvent: "rowCountChange"
|
||
});
|
||
const setRowCount = React109.useCallback((newRowCount) => {
|
||
if (rowCount === newRowCount) {
|
||
return;
|
||
}
|
||
logger.debug("Setting 'rowCount' to", newRowCount);
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
pagination: _extends({}, state.pagination, {
|
||
rowCount: newRowCount
|
||
})
|
||
}));
|
||
}, [apiRef, logger, rowCount]);
|
||
const paginationRowCountApi = {
|
||
setRowCount
|
||
};
|
||
useGridApiMethod(apiRef, paginationRowCountApi, "public");
|
||
const stateExportPreProcessing = React109.useCallback((prevState, context) => {
|
||
var _props$initialState;
|
||
const exportedRowCount = gridPaginationRowCountSelector(apiRef);
|
||
const shouldExportRowCount = (
|
||
// Always export if the `exportOnlyDirtyModels` property is not activated
|
||
!context.exportOnlyDirtyModels || // Always export if the `rowCount` is controlled
|
||
props.rowCount != null || // Always export if the `rowCount` has been initialized
|
||
((_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.pagination) == null ? void 0 : _props$initialState.rowCount) != null
|
||
);
|
||
if (!shouldExportRowCount) {
|
||
return prevState;
|
||
}
|
||
return _extends({}, prevState, {
|
||
pagination: _extends({}, prevState.pagination, {
|
||
rowCount: exportedRowCount
|
||
})
|
||
});
|
||
}, [apiRef, props.rowCount, (_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.pagination) == null ? void 0 : _props$initialState2.rowCount]);
|
||
const stateRestorePreProcessing = React109.useCallback((params, context) => {
|
||
var _context$stateToResto;
|
||
const restoredRowCount = (_context$stateToResto = context.stateToRestore.pagination) != null && _context$stateToResto.rowCount ? context.stateToRestore.pagination.rowCount : gridPaginationRowCountSelector(apiRef);
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
pagination: _extends({}, state.pagination, {
|
||
rowCount: restoredRowCount
|
||
})
|
||
}));
|
||
return params;
|
||
}, [apiRef]);
|
||
useGridRegisterPipeProcessor(apiRef, "exportState", stateExportPreProcessing);
|
||
useGridRegisterPipeProcessor(apiRef, "restoreState", stateRestorePreProcessing);
|
||
React109.useEffect(() => {
|
||
if (true) {
|
||
if (props.paginationMode === "server" && props.rowCount == null) {
|
||
noRowCountInServerMode();
|
||
}
|
||
}
|
||
}, [props.rowCount, props.paginationMode]);
|
||
React109.useEffect(() => {
|
||
if (props.paginationMode === "client") {
|
||
apiRef.current.setRowCount(visibleTopLevelRowCount);
|
||
} else if (props.rowCount != null) {
|
||
apiRef.current.setRowCount(props.rowCount);
|
||
}
|
||
}, [apiRef, visibleTopLevelRowCount, props.paginationMode, props.rowCount]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/pagination/useGridPagination.js
|
||
var paginationStateInitializer = (state, props) => {
|
||
var _props$paginationMode, _props$initialState, _ref, _props$rowCount, _props$initialState2;
|
||
const paginationModel = _extends({}, getDefaultGridPaginationModel(props.autoPageSize), (_props$paginationMode = props.paginationModel) != null ? _props$paginationMode : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.pagination) == null ? void 0 : _props$initialState.paginationModel);
|
||
throwIfPageSizeExceedsTheLimit(paginationModel.pageSize, props.signature);
|
||
const rowCount = (_ref = (_props$rowCount = props.rowCount) != null ? _props$rowCount : (_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.pagination) == null ? void 0 : _props$initialState2.rowCount) != null ? _ref : 0;
|
||
return _extends({}, state, {
|
||
pagination: {
|
||
paginationModel,
|
||
rowCount
|
||
}
|
||
});
|
||
};
|
||
var useGridPagination = (apiRef, props) => {
|
||
useGridPaginationModel(apiRef, props);
|
||
useGridRowCount(apiRef, props);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/preferencesPanel/useGridPreferencesPanel.js
|
||
init_extends();
|
||
var React110 = __toESM(require_react());
|
||
var preferencePanelStateInitializer = (state, props) => {
|
||
var _props$initialState$p, _props$initialState;
|
||
return _extends({}, state, {
|
||
preferencePanel: (_props$initialState$p = (_props$initialState = props.initialState) == null ? void 0 : _props$initialState.preferencePanel) != null ? _props$initialState$p : {
|
||
open: false
|
||
}
|
||
});
|
||
};
|
||
var useGridPreferencesPanel = (apiRef, props) => {
|
||
var _props$initialState3;
|
||
const logger = useGridLogger(apiRef, "useGridPreferencesPanel");
|
||
const hideTimeout = React110.useRef();
|
||
const immediateTimeout = React110.useRef();
|
||
const hidePreferences = React110.useCallback(() => {
|
||
logger.debug("Hiding Preferences Panel");
|
||
const preferencePanelState = gridPreferencePanelStateSelector(apiRef.current.state);
|
||
if (preferencePanelState.openedPanelValue) {
|
||
apiRef.current.publishEvent("preferencePanelClose", {
|
||
openedPanelValue: preferencePanelState.openedPanelValue
|
||
});
|
||
}
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
preferencePanel: {
|
||
open: false
|
||
}
|
||
}));
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef, logger]);
|
||
const doNotHidePanel = React110.useCallback(() => {
|
||
immediateTimeout.current = setTimeout(() => clearTimeout(hideTimeout.current), 0);
|
||
}, []);
|
||
const hidePreferencesDelayed = React110.useCallback(() => {
|
||
hideTimeout.current = setTimeout(hidePreferences, 100);
|
||
}, [hidePreferences]);
|
||
const showPreferences = React110.useCallback((newValue, panelId, labelId) => {
|
||
logger.debug("Opening Preferences Panel");
|
||
doNotHidePanel();
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
preferencePanel: _extends({}, state.preferencePanel, {
|
||
open: true,
|
||
openedPanelValue: newValue,
|
||
panelId,
|
||
labelId
|
||
})
|
||
}));
|
||
apiRef.current.publishEvent("preferencePanelOpen", {
|
||
openedPanelValue: newValue
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [logger, doNotHidePanel, apiRef]);
|
||
useGridApiMethod(apiRef, {
|
||
showPreferences,
|
||
hidePreferences: hidePreferencesDelayed
|
||
}, "public");
|
||
const stateExportPreProcessing = React110.useCallback((prevState, context) => {
|
||
var _props$initialState2;
|
||
const preferencePanelToExport = gridPreferencePanelStateSelector(apiRef.current.state);
|
||
const shouldExportPreferencePanel = (
|
||
// Always export if the `exportOnlyDirtyModels` property is not activated
|
||
!context.exportOnlyDirtyModels || // Always export if the panel was initialized
|
||
((_props$initialState2 = props.initialState) == null ? void 0 : _props$initialState2.preferencePanel) != null || // Always export if the panel is opened
|
||
preferencePanelToExport.open
|
||
);
|
||
if (!shouldExportPreferencePanel) {
|
||
return prevState;
|
||
}
|
||
return _extends({}, prevState, {
|
||
preferencePanel: preferencePanelToExport
|
||
});
|
||
}, [apiRef, (_props$initialState3 = props.initialState) == null ? void 0 : _props$initialState3.preferencePanel]);
|
||
const stateRestorePreProcessing = React110.useCallback((params, context) => {
|
||
const preferencePanel = context.stateToRestore.preferencePanel;
|
||
if (preferencePanel != null) {
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
preferencePanel
|
||
}));
|
||
}
|
||
return params;
|
||
}, [apiRef]);
|
||
useGridRegisterPipeProcessor(apiRef, "exportState", stateExportPreProcessing);
|
||
useGridRegisterPipeProcessor(apiRef, "restoreState", stateRestorePreProcessing);
|
||
React110.useEffect(() => {
|
||
return () => {
|
||
clearTimeout(hideTimeout.current);
|
||
clearTimeout(immediateTimeout.current);
|
||
};
|
||
}, []);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/editing/useGridEditing.js
|
||
init_extends();
|
||
var React113 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/editing/useGridCellEditing.js
|
||
init_extends();
|
||
var React111 = __toESM(require_react());
|
||
var _excluded53 = ["id", "field"];
|
||
var _excluded212 = ["id", "field"];
|
||
var missingOnProcessRowUpdateErrorWarning = buildWarning(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.", "To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.", "For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."], "error");
|
||
var useGridCellEditing = (apiRef, props) => {
|
||
const [cellModesModel, setCellModesModel] = React111.useState({});
|
||
const cellModesModelRef = React111.useRef(cellModesModel);
|
||
const prevCellModesModel = React111.useRef({});
|
||
const {
|
||
processRowUpdate,
|
||
onProcessRowUpdateError,
|
||
cellModesModel: cellModesModelProp,
|
||
onCellModesModelChange
|
||
} = props;
|
||
const runIfEditModeIsCell = (callback) => (...args) => {
|
||
if (props.editMode === GridEditModes.Cell) {
|
||
callback(...args);
|
||
}
|
||
};
|
||
const throwIfNotEditable = React111.useCallback((id, field) => {
|
||
const params = apiRef.current.getCellParams(id, field);
|
||
if (!apiRef.current.isCellEditable(params)) {
|
||
throw new Error(`MUI: The cell with id=${id} and field=${field} is not editable.`);
|
||
}
|
||
}, [apiRef]);
|
||
const throwIfNotInMode = React111.useCallback((id, field, mode) => {
|
||
if (apiRef.current.getCellMode(id, field) !== mode) {
|
||
throw new Error(`MUI: The cell with id=${id} and field=${field} is not in ${mode} mode.`);
|
||
}
|
||
}, [apiRef]);
|
||
const handleCellDoubleClick = React111.useCallback((params, event) => {
|
||
if (!params.isEditable) {
|
||
return;
|
||
}
|
||
if (params.cellMode === GridCellModes.Edit) {
|
||
return;
|
||
}
|
||
const newParams = _extends({}, params, {
|
||
reason: GridCellEditStartReasons.cellDoubleClick
|
||
});
|
||
apiRef.current.publishEvent("cellEditStart", newParams, event);
|
||
}, [apiRef]);
|
||
const handleCellFocusOut = React111.useCallback((params, event) => {
|
||
if (params.cellMode === GridCellModes.View) {
|
||
return;
|
||
}
|
||
if (apiRef.current.getCellMode(params.id, params.field) === GridCellModes.View) {
|
||
return;
|
||
}
|
||
const newParams = _extends({}, params, {
|
||
reason: GridCellEditStopReasons.cellFocusOut
|
||
});
|
||
apiRef.current.publishEvent("cellEditStop", newParams, event);
|
||
}, [apiRef]);
|
||
const handleCellKeyDown = React111.useCallback((params, event) => {
|
||
if (params.cellMode === GridCellModes.Edit) {
|
||
if (event.which === 229) {
|
||
return;
|
||
}
|
||
let reason;
|
||
if (event.key === "Escape") {
|
||
reason = GridCellEditStopReasons.escapeKeyDown;
|
||
} else if (event.key === "Enter") {
|
||
reason = GridCellEditStopReasons.enterKeyDown;
|
||
} else if (event.key === "Tab") {
|
||
reason = event.shiftKey ? GridCellEditStopReasons.shiftTabKeyDown : GridCellEditStopReasons.tabKeyDown;
|
||
event.preventDefault();
|
||
}
|
||
if (reason) {
|
||
const newParams = _extends({}, params, {
|
||
reason
|
||
});
|
||
apiRef.current.publishEvent("cellEditStop", newParams, event);
|
||
}
|
||
} else if (params.isEditable) {
|
||
let reason;
|
||
const canStartEditing = apiRef.current.unstable_applyPipeProcessors("canStartEditing", true, {
|
||
event,
|
||
cellParams: params,
|
||
editMode: "cell"
|
||
});
|
||
if (!canStartEditing) {
|
||
return;
|
||
}
|
||
if (isPrintableKey(event)) {
|
||
reason = GridCellEditStartReasons.printableKeyDown;
|
||
} else if ((event.ctrlKey || event.metaKey) && event.key === "v") {
|
||
reason = GridCellEditStartReasons.pasteKeyDown;
|
||
} else if (event.key === "Enter") {
|
||
reason = GridCellEditStartReasons.enterKeyDown;
|
||
} else if (event.key === "Delete" || event.key === "Backspace") {
|
||
reason = GridCellEditStartReasons.deleteKeyDown;
|
||
}
|
||
if (reason) {
|
||
const newParams = _extends({}, params, {
|
||
reason,
|
||
key: event.key
|
||
});
|
||
apiRef.current.publishEvent("cellEditStart", newParams, event);
|
||
}
|
||
}
|
||
}, [apiRef]);
|
||
const handleCellEditStart = React111.useCallback((params) => {
|
||
const {
|
||
id,
|
||
field,
|
||
reason
|
||
} = params;
|
||
const startCellEditModeParams = {
|
||
id,
|
||
field
|
||
};
|
||
if (reason === GridCellEditStartReasons.printableKeyDown || reason === GridCellEditStartReasons.deleteKeyDown || reason === GridCellEditStartReasons.pasteKeyDown) {
|
||
startCellEditModeParams.deleteValue = true;
|
||
}
|
||
apiRef.current.startCellEditMode(startCellEditModeParams);
|
||
}, [apiRef]);
|
||
const handleCellEditStop = React111.useCallback((params) => {
|
||
const {
|
||
id,
|
||
field,
|
||
reason
|
||
} = params;
|
||
apiRef.current.runPendingEditCellValueMutation(id, field);
|
||
let cellToFocusAfter;
|
||
if (reason === GridCellEditStopReasons.enterKeyDown) {
|
||
cellToFocusAfter = "below";
|
||
} else if (reason === GridCellEditStopReasons.tabKeyDown) {
|
||
cellToFocusAfter = "right";
|
||
} else if (reason === GridCellEditStopReasons.shiftTabKeyDown) {
|
||
cellToFocusAfter = "left";
|
||
}
|
||
const ignoreModifications = reason === "escapeKeyDown";
|
||
apiRef.current.stopCellEditMode({
|
||
id,
|
||
field,
|
||
ignoreModifications,
|
||
cellToFocusAfter
|
||
});
|
||
}, [apiRef]);
|
||
useGridApiEventHandler(apiRef, "cellDoubleClick", runIfEditModeIsCell(handleCellDoubleClick));
|
||
useGridApiEventHandler(apiRef, "cellFocusOut", runIfEditModeIsCell(handleCellFocusOut));
|
||
useGridApiEventHandler(apiRef, "cellKeyDown", runIfEditModeIsCell(handleCellKeyDown));
|
||
useGridApiEventHandler(apiRef, "cellEditStart", runIfEditModeIsCell(handleCellEditStart));
|
||
useGridApiEventHandler(apiRef, "cellEditStop", runIfEditModeIsCell(handleCellEditStop));
|
||
useGridApiOptionHandler(apiRef, "cellEditStart", props.onCellEditStart);
|
||
useGridApiOptionHandler(apiRef, "cellEditStop", props.onCellEditStop);
|
||
const getCellMode = React111.useCallback((id, field) => {
|
||
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
const isEditing = editingState[id] && editingState[id][field];
|
||
return isEditing ? GridCellModes.Edit : GridCellModes.View;
|
||
}, [apiRef]);
|
||
const updateCellModesModel = useEventCallback_default((newModel) => {
|
||
const isNewModelDifferentFromProp = newModel !== props.cellModesModel;
|
||
if (onCellModesModelChange && isNewModelDifferentFromProp) {
|
||
onCellModesModelChange(newModel, {});
|
||
}
|
||
if (props.cellModesModel && isNewModelDifferentFromProp) {
|
||
return;
|
||
}
|
||
setCellModesModel(newModel);
|
||
cellModesModelRef.current = newModel;
|
||
apiRef.current.publishEvent("cellModesModelChange", newModel);
|
||
});
|
||
const updateFieldInCellModesModel = React111.useCallback((id, field, newProps) => {
|
||
const newModel = _extends({}, cellModesModelRef.current);
|
||
if (newProps !== null) {
|
||
newModel[id] = _extends({}, newModel[id], {
|
||
[field]: _extends({}, newProps)
|
||
});
|
||
} else {
|
||
const _newModel$id = newModel[id], otherFields = _objectWithoutPropertiesLoose(_newModel$id, [field].map(toPropertyKey));
|
||
newModel[id] = otherFields;
|
||
if (Object.keys(newModel[id]).length === 0) {
|
||
delete newModel[id];
|
||
}
|
||
}
|
||
updateCellModesModel(newModel);
|
||
}, [updateCellModesModel]);
|
||
const updateOrDeleteFieldState = React111.useCallback((id, field, newProps) => {
|
||
apiRef.current.setState((state) => {
|
||
const newEditingState = _extends({}, state.editRows);
|
||
if (newProps !== null) {
|
||
newEditingState[id] = _extends({}, newEditingState[id], {
|
||
[field]: _extends({}, newProps)
|
||
});
|
||
} else {
|
||
delete newEditingState[id][field];
|
||
if (Object.keys(newEditingState[id]).length === 0) {
|
||
delete newEditingState[id];
|
||
}
|
||
}
|
||
return _extends({}, state, {
|
||
editRows: newEditingState
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef]);
|
||
const startCellEditMode = React111.useCallback((params) => {
|
||
const {
|
||
id,
|
||
field
|
||
} = params, other = _objectWithoutPropertiesLoose(params, _excluded53);
|
||
throwIfNotEditable(id, field);
|
||
throwIfNotInMode(id, field, GridCellModes.View);
|
||
updateFieldInCellModesModel(id, field, _extends({
|
||
mode: GridCellModes.Edit
|
||
}, other));
|
||
}, [throwIfNotEditable, throwIfNotInMode, updateFieldInCellModesModel]);
|
||
const updateStateToStartCellEditMode = useEventCallback_default((params) => {
|
||
const {
|
||
id,
|
||
field,
|
||
deleteValue,
|
||
initialValue
|
||
} = params;
|
||
let newValue = apiRef.current.getCellValue(id, field);
|
||
if (deleteValue || initialValue) {
|
||
newValue = deleteValue ? "" : initialValue;
|
||
}
|
||
const newProps = {
|
||
value: newValue,
|
||
error: false,
|
||
isProcessingProps: false
|
||
};
|
||
updateOrDeleteFieldState(id, field, newProps);
|
||
apiRef.current.setCellFocus(id, field);
|
||
});
|
||
const stopCellEditMode = React111.useCallback((params) => {
|
||
const {
|
||
id,
|
||
field
|
||
} = params, other = _objectWithoutPropertiesLoose(params, _excluded212);
|
||
throwIfNotInMode(id, field, GridCellModes.Edit);
|
||
updateFieldInCellModesModel(id, field, _extends({
|
||
mode: GridCellModes.View
|
||
}, other));
|
||
}, [throwIfNotInMode, updateFieldInCellModesModel]);
|
||
const updateStateToStopCellEditMode = useEventCallback_default(async (params) => {
|
||
const {
|
||
id,
|
||
field,
|
||
ignoreModifications,
|
||
cellToFocusAfter = "none"
|
||
} = params;
|
||
throwIfNotInMode(id, field, GridCellModes.Edit);
|
||
apiRef.current.runPendingEditCellValueMutation(id, field);
|
||
const finishCellEditMode = () => {
|
||
updateOrDeleteFieldState(id, field, null);
|
||
updateFieldInCellModesModel(id, field, null);
|
||
if (cellToFocusAfter !== "none") {
|
||
apiRef.current.moveFocusToRelativeCell(id, field, cellToFocusAfter);
|
||
}
|
||
};
|
||
if (ignoreModifications) {
|
||
finishCellEditMode();
|
||
return;
|
||
}
|
||
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
const {
|
||
error,
|
||
isProcessingProps
|
||
} = editingState[id][field];
|
||
if (error || isProcessingProps) {
|
||
prevCellModesModel.current[id][field].mode = GridCellModes.Edit;
|
||
updateFieldInCellModesModel(id, field, {
|
||
mode: GridCellModes.Edit
|
||
});
|
||
return;
|
||
}
|
||
const rowUpdate = apiRef.current.getRowWithUpdatedValuesFromCellEditing(id, field);
|
||
if (processRowUpdate) {
|
||
const handleError = (errorThrown) => {
|
||
prevCellModesModel.current[id][field].mode = GridCellModes.Edit;
|
||
updateFieldInCellModesModel(id, field, {
|
||
mode: GridCellModes.Edit
|
||
});
|
||
if (onProcessRowUpdateError) {
|
||
onProcessRowUpdateError(errorThrown);
|
||
} else {
|
||
missingOnProcessRowUpdateErrorWarning();
|
||
}
|
||
};
|
||
try {
|
||
const row = apiRef.current.getRow(id);
|
||
Promise.resolve(processRowUpdate(rowUpdate, row)).then((finalRowUpdate) => {
|
||
apiRef.current.updateRows([finalRowUpdate]);
|
||
finishCellEditMode();
|
||
}).catch(handleError);
|
||
} catch (errorThrown) {
|
||
handleError(errorThrown);
|
||
}
|
||
} else {
|
||
apiRef.current.updateRows([rowUpdate]);
|
||
finishCellEditMode();
|
||
}
|
||
});
|
||
const setCellEditingEditCellValue = React111.useCallback(async (params) => {
|
||
var _editingState$id;
|
||
const {
|
||
id,
|
||
field,
|
||
value,
|
||
debounceMs,
|
||
unstable_skipValueParser: skipValueParser
|
||
} = params;
|
||
throwIfNotEditable(id, field);
|
||
throwIfNotInMode(id, field, GridCellModes.Edit);
|
||
const column = apiRef.current.getColumn(field);
|
||
const row = apiRef.current.getRow(id);
|
||
let parsedValue = value;
|
||
if (column.valueParser && !skipValueParser) {
|
||
parsedValue = column.valueParser(value, apiRef.current.getCellParams(id, field));
|
||
}
|
||
let editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
let newProps = _extends({}, editingState[id][field], {
|
||
value: parsedValue,
|
||
changeReason: debounceMs ? "debouncedSetEditCellValue" : "setEditCellValue"
|
||
});
|
||
if (column.preProcessEditCellProps) {
|
||
const hasChanged = value !== editingState[id][field].value;
|
||
newProps = _extends({}, newProps, {
|
||
isProcessingProps: true
|
||
});
|
||
updateOrDeleteFieldState(id, field, newProps);
|
||
newProps = await Promise.resolve(column.preProcessEditCellProps({
|
||
id,
|
||
row,
|
||
props: newProps,
|
||
hasChanged
|
||
}));
|
||
}
|
||
if (apiRef.current.getCellMode(id, field) === GridCellModes.View) {
|
||
return false;
|
||
}
|
||
editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
newProps = _extends({}, newProps, {
|
||
isProcessingProps: false
|
||
});
|
||
newProps.value = column.preProcessEditCellProps ? editingState[id][field].value : parsedValue;
|
||
updateOrDeleteFieldState(id, field, newProps);
|
||
editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
return !((_editingState$id = editingState[id]) != null && (_editingState$id = _editingState$id[field]) != null && _editingState$id.error);
|
||
}, [apiRef, throwIfNotEditable, throwIfNotInMode, updateOrDeleteFieldState]);
|
||
const getRowWithUpdatedValuesFromCellEditing = React111.useCallback((id, field) => {
|
||
const column = apiRef.current.getColumn(field);
|
||
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
const row = apiRef.current.getRow(id);
|
||
if (!editingState[id] || !editingState[id][field]) {
|
||
return apiRef.current.getRow(id);
|
||
}
|
||
const {
|
||
value
|
||
} = editingState[id][field];
|
||
return column.valueSetter ? column.valueSetter({
|
||
value,
|
||
row
|
||
}) : _extends({}, row, {
|
||
[field]: value
|
||
});
|
||
}, [apiRef]);
|
||
const editingApi = {
|
||
getCellMode,
|
||
startCellEditMode,
|
||
stopCellEditMode
|
||
};
|
||
const editingPrivateApi = {
|
||
setCellEditingEditCellValue,
|
||
getRowWithUpdatedValuesFromCellEditing
|
||
};
|
||
useGridApiMethod(apiRef, editingApi, "public");
|
||
useGridApiMethod(apiRef, editingPrivateApi, "private");
|
||
React111.useEffect(() => {
|
||
if (cellModesModelProp) {
|
||
updateCellModesModel(cellModesModelProp);
|
||
}
|
||
}, [cellModesModelProp, updateCellModesModel]);
|
||
useEnhancedEffect_default(() => {
|
||
const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);
|
||
const copyOfPrevCellModes = prevCellModesModel.current;
|
||
prevCellModesModel.current = deepClone(cellModesModel);
|
||
Object.entries(cellModesModel).forEach(([id, fields]) => {
|
||
Object.entries(fields).forEach(([field, params]) => {
|
||
var _copyOfPrevCellModes$, _idToIdLookup$id;
|
||
const prevMode = ((_copyOfPrevCellModes$ = copyOfPrevCellModes[id]) == null || (_copyOfPrevCellModes$ = _copyOfPrevCellModes$[field]) == null ? void 0 : _copyOfPrevCellModes$.mode) || GridCellModes.View;
|
||
const originalId = (_idToIdLookup$id = idToIdLookup[id]) != null ? _idToIdLookup$id : id;
|
||
if (params.mode === GridCellModes.Edit && prevMode === GridCellModes.View) {
|
||
updateStateToStartCellEditMode(_extends({
|
||
id: originalId,
|
||
field
|
||
}, params));
|
||
} else if (params.mode === GridCellModes.View && prevMode === GridCellModes.Edit) {
|
||
updateStateToStopCellEditMode(_extends({
|
||
id: originalId,
|
||
field
|
||
}, params));
|
||
}
|
||
});
|
||
});
|
||
}, [apiRef, cellModesModel, updateStateToStartCellEditMode, updateStateToStopCellEditMode]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/editing/useGridRowEditing.js
|
||
init_extends();
|
||
var React112 = __toESM(require_react());
|
||
var _excluded54 = ["id"];
|
||
var _excluded213 = ["id"];
|
||
var missingOnProcessRowUpdateErrorWarning2 = buildWarning(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.", "To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.", "For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."], "error");
|
||
var useGridRowEditing = (apiRef, props) => {
|
||
const [rowModesModel, setRowModesModel] = React112.useState({});
|
||
const rowModesModelRef = React112.useRef(rowModesModel);
|
||
const prevRowModesModel = React112.useRef({});
|
||
const focusTimeout = React112.useRef(null);
|
||
const nextFocusedCell = React112.useRef(null);
|
||
const {
|
||
processRowUpdate,
|
||
onProcessRowUpdateError,
|
||
rowModesModel: rowModesModelProp,
|
||
onRowModesModelChange
|
||
} = props;
|
||
const runIfEditModeIsRow = (callback) => (...args) => {
|
||
if (props.editMode === GridEditModes.Row) {
|
||
callback(...args);
|
||
}
|
||
};
|
||
const throwIfNotEditable = React112.useCallback((id, field) => {
|
||
const params = apiRef.current.getCellParams(id, field);
|
||
if (!apiRef.current.isCellEditable(params)) {
|
||
throw new Error(`MUI: The cell with id=${id} and field=${field} is not editable.`);
|
||
}
|
||
}, [apiRef]);
|
||
const throwIfNotInMode = React112.useCallback((id, mode) => {
|
||
if (apiRef.current.getRowMode(id) !== mode) {
|
||
throw new Error(`MUI: The row with id=${id} is not in ${mode} mode.`);
|
||
}
|
||
}, [apiRef]);
|
||
const handleCellDoubleClick = React112.useCallback((params, event) => {
|
||
if (!params.isEditable) {
|
||
return;
|
||
}
|
||
if (apiRef.current.getRowMode(params.id) === GridRowModes.Edit) {
|
||
return;
|
||
}
|
||
const rowParams = apiRef.current.getRowParams(params.id);
|
||
const newParams = _extends({}, rowParams, {
|
||
field: params.field,
|
||
reason: GridRowEditStartReasons.cellDoubleClick
|
||
});
|
||
apiRef.current.publishEvent("rowEditStart", newParams, event);
|
||
}, [apiRef]);
|
||
const handleCellFocusIn = React112.useCallback((params) => {
|
||
nextFocusedCell.current = params;
|
||
}, []);
|
||
const handleCellFocusOut = React112.useCallback((params, event) => {
|
||
if (!params.isEditable) {
|
||
return;
|
||
}
|
||
if (apiRef.current.getRowMode(params.id) === GridRowModes.View) {
|
||
return;
|
||
}
|
||
nextFocusedCell.current = null;
|
||
focusTimeout.current = setTimeout(() => {
|
||
var _nextFocusedCell$curr;
|
||
focusTimeout.current = null;
|
||
if (((_nextFocusedCell$curr = nextFocusedCell.current) == null ? void 0 : _nextFocusedCell$curr.id) !== params.id) {
|
||
if (!apiRef.current.getRow(params.id)) {
|
||
return;
|
||
}
|
||
if (apiRef.current.getRowMode(params.id) === GridRowModes.View) {
|
||
return;
|
||
}
|
||
const rowParams = apiRef.current.getRowParams(params.id);
|
||
const newParams = _extends({}, rowParams, {
|
||
field: params.field,
|
||
reason: GridRowEditStopReasons.rowFocusOut
|
||
});
|
||
apiRef.current.publishEvent("rowEditStop", newParams, event);
|
||
}
|
||
});
|
||
}, [apiRef]);
|
||
React112.useEffect(() => {
|
||
return () => {
|
||
clearTimeout(focusTimeout.current);
|
||
};
|
||
}, []);
|
||
const handleCellKeyDown = React112.useCallback((params, event) => {
|
||
if (params.cellMode === GridRowModes.Edit) {
|
||
if (event.which === 229) {
|
||
return;
|
||
}
|
||
let reason;
|
||
if (event.key === "Escape") {
|
||
reason = GridRowEditStopReasons.escapeKeyDown;
|
||
} else if (event.key === "Enter") {
|
||
reason = GridRowEditStopReasons.enterKeyDown;
|
||
} else if (event.key === "Tab") {
|
||
const columnFields = gridVisibleColumnFieldsSelector(apiRef).filter((field) => {
|
||
const column = apiRef.current.getColumn(field);
|
||
if (column.type === GRID_ACTIONS_COLUMN_TYPE) {
|
||
return true;
|
||
}
|
||
return apiRef.current.isCellEditable(apiRef.current.getCellParams(params.id, field));
|
||
});
|
||
if (event.shiftKey) {
|
||
if (params.field === columnFields[0]) {
|
||
reason = GridRowEditStopReasons.shiftTabKeyDown;
|
||
}
|
||
} else if (params.field === columnFields[columnFields.length - 1]) {
|
||
reason = GridRowEditStopReasons.tabKeyDown;
|
||
}
|
||
event.preventDefault();
|
||
if (!reason) {
|
||
const index = columnFields.findIndex((field) => field === params.field);
|
||
const nextFieldToFocus = columnFields[event.shiftKey ? index - 1 : index + 1];
|
||
apiRef.current.setCellFocus(params.id, nextFieldToFocus);
|
||
}
|
||
}
|
||
if (reason) {
|
||
const newParams = _extends({}, apiRef.current.getRowParams(params.id), {
|
||
reason,
|
||
field: params.field
|
||
});
|
||
apiRef.current.publishEvent("rowEditStop", newParams, event);
|
||
}
|
||
} else if (params.isEditable) {
|
||
let reason;
|
||
const canStartEditing = apiRef.current.unstable_applyPipeProcessors("canStartEditing", true, {
|
||
event,
|
||
cellParams: params,
|
||
editMode: "row"
|
||
});
|
||
if (!canStartEditing) {
|
||
return;
|
||
}
|
||
if (isPrintableKey(event)) {
|
||
reason = GridRowEditStartReasons.printableKeyDown;
|
||
} else if ((event.ctrlKey || event.metaKey) && event.key === "v") {
|
||
reason = GridRowEditStartReasons.printableKeyDown;
|
||
} else if (event.key === "Enter") {
|
||
reason = GridRowEditStartReasons.enterKeyDown;
|
||
} else if (event.key === "Delete" || event.key === "Backspace") {
|
||
reason = GridRowEditStartReasons.deleteKeyDown;
|
||
}
|
||
if (reason) {
|
||
const rowParams = apiRef.current.getRowParams(params.id);
|
||
const newParams = _extends({}, rowParams, {
|
||
field: params.field,
|
||
reason
|
||
});
|
||
apiRef.current.publishEvent("rowEditStart", newParams, event);
|
||
}
|
||
}
|
||
}, [apiRef]);
|
||
const handleRowEditStart = React112.useCallback((params) => {
|
||
const {
|
||
id,
|
||
field,
|
||
reason
|
||
} = params;
|
||
const startRowEditModeParams = {
|
||
id,
|
||
fieldToFocus: field
|
||
};
|
||
if (reason === GridRowEditStartReasons.printableKeyDown || reason === GridRowEditStartReasons.deleteKeyDown) {
|
||
startRowEditModeParams.deleteValue = !!field;
|
||
}
|
||
apiRef.current.startRowEditMode(startRowEditModeParams);
|
||
}, [apiRef]);
|
||
const handleRowEditStop = React112.useCallback((params) => {
|
||
const {
|
||
id,
|
||
reason,
|
||
field
|
||
} = params;
|
||
apiRef.current.runPendingEditCellValueMutation(id);
|
||
let cellToFocusAfter;
|
||
if (reason === GridRowEditStopReasons.enterKeyDown) {
|
||
cellToFocusAfter = "below";
|
||
} else if (reason === GridRowEditStopReasons.tabKeyDown) {
|
||
cellToFocusAfter = "right";
|
||
} else if (reason === GridRowEditStopReasons.shiftTabKeyDown) {
|
||
cellToFocusAfter = "left";
|
||
}
|
||
const ignoreModifications = reason === "escapeKeyDown";
|
||
apiRef.current.stopRowEditMode({
|
||
id,
|
||
ignoreModifications,
|
||
field,
|
||
cellToFocusAfter
|
||
});
|
||
}, [apiRef]);
|
||
useGridApiEventHandler(apiRef, "cellDoubleClick", runIfEditModeIsRow(handleCellDoubleClick));
|
||
useGridApiEventHandler(apiRef, "cellFocusIn", runIfEditModeIsRow(handleCellFocusIn));
|
||
useGridApiEventHandler(apiRef, "cellFocusOut", runIfEditModeIsRow(handleCellFocusOut));
|
||
useGridApiEventHandler(apiRef, "cellKeyDown", runIfEditModeIsRow(handleCellKeyDown));
|
||
useGridApiEventHandler(apiRef, "rowEditStart", runIfEditModeIsRow(handleRowEditStart));
|
||
useGridApiEventHandler(apiRef, "rowEditStop", runIfEditModeIsRow(handleRowEditStop));
|
||
useGridApiOptionHandler(apiRef, "rowEditStart", props.onRowEditStart);
|
||
useGridApiOptionHandler(apiRef, "rowEditStop", props.onRowEditStop);
|
||
const getRowMode = React112.useCallback((id) => {
|
||
if (props.editMode === GridEditModes.Cell) {
|
||
return GridRowModes.View;
|
||
}
|
||
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
const isEditing = editingState[id] && Object.keys(editingState[id]).length > 0;
|
||
return isEditing ? GridRowModes.Edit : GridRowModes.View;
|
||
}, [apiRef, props.editMode]);
|
||
const updateRowModesModel = useEventCallback_default((newModel) => {
|
||
const isNewModelDifferentFromProp = newModel !== props.rowModesModel;
|
||
if (onRowModesModelChange && isNewModelDifferentFromProp) {
|
||
onRowModesModelChange(newModel, {});
|
||
}
|
||
if (props.rowModesModel && isNewModelDifferentFromProp) {
|
||
return;
|
||
}
|
||
setRowModesModel(newModel);
|
||
rowModesModelRef.current = newModel;
|
||
apiRef.current.publishEvent("rowModesModelChange", newModel);
|
||
});
|
||
const updateRowInRowModesModel = React112.useCallback((id, newProps) => {
|
||
const newModel = _extends({}, rowModesModelRef.current);
|
||
if (newProps !== null) {
|
||
newModel[id] = _extends({}, newProps);
|
||
} else {
|
||
delete newModel[id];
|
||
}
|
||
updateRowModesModel(newModel);
|
||
}, [updateRowModesModel]);
|
||
const updateOrDeleteRowState = React112.useCallback((id, newProps) => {
|
||
apiRef.current.setState((state) => {
|
||
const newEditingState = _extends({}, state.editRows);
|
||
if (newProps !== null) {
|
||
newEditingState[id] = newProps;
|
||
} else {
|
||
delete newEditingState[id];
|
||
}
|
||
return _extends({}, state, {
|
||
editRows: newEditingState
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef]);
|
||
const updateOrDeleteFieldState = React112.useCallback((id, field, newProps) => {
|
||
apiRef.current.setState((state) => {
|
||
const newEditingState = _extends({}, state.editRows);
|
||
if (newProps !== null) {
|
||
newEditingState[id] = _extends({}, newEditingState[id], {
|
||
[field]: _extends({}, newProps)
|
||
});
|
||
} else {
|
||
delete newEditingState[id][field];
|
||
if (Object.keys(newEditingState[id]).length === 0) {
|
||
delete newEditingState[id];
|
||
}
|
||
}
|
||
return _extends({}, state, {
|
||
editRows: newEditingState
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef]);
|
||
const startRowEditMode = React112.useCallback((params) => {
|
||
const {
|
||
id
|
||
} = params, other = _objectWithoutPropertiesLoose(params, _excluded54);
|
||
throwIfNotInMode(id, GridRowModes.View);
|
||
updateRowInRowModesModel(id, _extends({
|
||
mode: GridRowModes.Edit
|
||
}, other));
|
||
}, [throwIfNotInMode, updateRowInRowModesModel]);
|
||
const updateStateToStartRowEditMode = useEventCallback_default((params) => {
|
||
const {
|
||
id,
|
||
fieldToFocus,
|
||
deleteValue,
|
||
initialValue
|
||
} = params;
|
||
const columnFields = gridColumnFieldsSelector(apiRef);
|
||
const newProps = columnFields.reduce((acc, field) => {
|
||
const cellParams = apiRef.current.getCellParams(id, field);
|
||
if (!cellParams.isEditable) {
|
||
return acc;
|
||
}
|
||
let newValue = apiRef.current.getCellValue(id, field);
|
||
if (fieldToFocus === field && (deleteValue || initialValue)) {
|
||
newValue = deleteValue ? "" : initialValue;
|
||
}
|
||
acc[field] = {
|
||
value: newValue,
|
||
error: false,
|
||
isProcessingProps: false
|
||
};
|
||
return acc;
|
||
}, {});
|
||
updateOrDeleteRowState(id, newProps);
|
||
if (fieldToFocus) {
|
||
apiRef.current.setCellFocus(id, fieldToFocus);
|
||
}
|
||
});
|
||
const stopRowEditMode = React112.useCallback((params) => {
|
||
const {
|
||
id
|
||
} = params, other = _objectWithoutPropertiesLoose(params, _excluded213);
|
||
throwIfNotInMode(id, GridRowModes.Edit);
|
||
updateRowInRowModesModel(id, _extends({
|
||
mode: GridRowModes.View
|
||
}, other));
|
||
}, [throwIfNotInMode, updateRowInRowModesModel]);
|
||
const updateStateToStopRowEditMode = useEventCallback_default((params) => {
|
||
const {
|
||
id,
|
||
ignoreModifications,
|
||
field: focusedField,
|
||
cellToFocusAfter = "none"
|
||
} = params;
|
||
apiRef.current.runPendingEditCellValueMutation(id);
|
||
const finishRowEditMode = () => {
|
||
if (cellToFocusAfter !== "none" && focusedField) {
|
||
apiRef.current.moveFocusToRelativeCell(id, focusedField, cellToFocusAfter);
|
||
}
|
||
updateOrDeleteRowState(id, null);
|
||
updateRowInRowModesModel(id, null);
|
||
};
|
||
if (ignoreModifications) {
|
||
finishRowEditMode();
|
||
return;
|
||
}
|
||
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
const row = apiRef.current.getRow(id);
|
||
const isSomeFieldProcessingProps = Object.values(editingState[id]).some((fieldProps) => fieldProps.isProcessingProps);
|
||
if (isSomeFieldProcessingProps) {
|
||
prevRowModesModel.current[id].mode = GridRowModes.Edit;
|
||
return;
|
||
}
|
||
const hasSomeFieldWithError = Object.values(editingState[id]).some((fieldProps) => fieldProps.error);
|
||
if (hasSomeFieldWithError) {
|
||
prevRowModesModel.current[id].mode = GridRowModes.Edit;
|
||
updateRowInRowModesModel(id, {
|
||
mode: GridRowModes.Edit
|
||
});
|
||
return;
|
||
}
|
||
const rowUpdate = apiRef.current.getRowWithUpdatedValuesFromRowEditing(id);
|
||
if (processRowUpdate) {
|
||
const handleError = (errorThrown) => {
|
||
prevRowModesModel.current[id].mode = GridRowModes.Edit;
|
||
updateRowInRowModesModel(id, {
|
||
mode: GridRowModes.Edit
|
||
});
|
||
if (onProcessRowUpdateError) {
|
||
onProcessRowUpdateError(errorThrown);
|
||
} else {
|
||
missingOnProcessRowUpdateErrorWarning2();
|
||
}
|
||
};
|
||
try {
|
||
Promise.resolve(processRowUpdate(rowUpdate, row)).then((finalRowUpdate) => {
|
||
apiRef.current.updateRows([finalRowUpdate]);
|
||
finishRowEditMode();
|
||
}).catch(handleError);
|
||
} catch (errorThrown) {
|
||
handleError(errorThrown);
|
||
}
|
||
} else {
|
||
apiRef.current.updateRows([rowUpdate]);
|
||
finishRowEditMode();
|
||
}
|
||
});
|
||
const setRowEditingEditCellValue = React112.useCallback((params) => {
|
||
const {
|
||
id,
|
||
field,
|
||
value,
|
||
debounceMs,
|
||
unstable_skipValueParser: skipValueParser
|
||
} = params;
|
||
throwIfNotEditable(id, field);
|
||
const column = apiRef.current.getColumn(field);
|
||
const row = apiRef.current.getRow(id);
|
||
let parsedValue = value;
|
||
if (column.valueParser && !skipValueParser) {
|
||
parsedValue = column.valueParser(value, apiRef.current.getCellParams(id, field));
|
||
}
|
||
let editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
let newProps = _extends({}, editingState[id][field], {
|
||
value: parsedValue,
|
||
changeReason: debounceMs ? "debouncedSetEditCellValue" : "setEditCellValue"
|
||
});
|
||
if (!column.preProcessEditCellProps) {
|
||
updateOrDeleteFieldState(id, field, newProps);
|
||
}
|
||
return new Promise((resolve) => {
|
||
const promises = [];
|
||
if (column.preProcessEditCellProps) {
|
||
const hasChanged = newProps.value !== editingState[id][field].value;
|
||
newProps = _extends({}, newProps, {
|
||
isProcessingProps: true
|
||
});
|
||
updateOrDeleteFieldState(id, field, newProps);
|
||
const _editingState$id = editingState[id], otherFieldsProps = _objectWithoutPropertiesLoose(_editingState$id, [field].map(toPropertyKey));
|
||
const promise = Promise.resolve(column.preProcessEditCellProps({
|
||
id,
|
||
row,
|
||
props: newProps,
|
||
hasChanged,
|
||
otherFieldsProps
|
||
})).then((processedProps) => {
|
||
if (apiRef.current.getRowMode(id) === GridRowModes.View) {
|
||
resolve(false);
|
||
return;
|
||
}
|
||
editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
processedProps = _extends({}, processedProps, {
|
||
isProcessingProps: false
|
||
});
|
||
processedProps.value = column.preProcessEditCellProps ? editingState[id][field].value : parsedValue;
|
||
updateOrDeleteFieldState(id, field, processedProps);
|
||
});
|
||
promises.push(promise);
|
||
}
|
||
Object.entries(editingState[id]).forEach(([thisField, fieldProps]) => {
|
||
if (thisField === field) {
|
||
return;
|
||
}
|
||
const fieldColumn = apiRef.current.getColumn(thisField);
|
||
if (!fieldColumn.preProcessEditCellProps) {
|
||
return;
|
||
}
|
||
fieldProps = _extends({}, fieldProps, {
|
||
isProcessingProps: true
|
||
});
|
||
updateOrDeleteFieldState(id, thisField, fieldProps);
|
||
editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
const _editingState$id2 = editingState[id], otherFieldsProps = _objectWithoutPropertiesLoose(_editingState$id2, [thisField].map(toPropertyKey));
|
||
const promise = Promise.resolve(fieldColumn.preProcessEditCellProps({
|
||
id,
|
||
row,
|
||
props: fieldProps,
|
||
hasChanged: false,
|
||
otherFieldsProps
|
||
})).then((processedProps) => {
|
||
if (apiRef.current.getRowMode(id) === GridRowModes.View) {
|
||
resolve(false);
|
||
return;
|
||
}
|
||
processedProps = _extends({}, processedProps, {
|
||
isProcessingProps: false
|
||
});
|
||
updateOrDeleteFieldState(id, thisField, processedProps);
|
||
});
|
||
promises.push(promise);
|
||
});
|
||
Promise.all(promises).then(() => {
|
||
if (apiRef.current.getRowMode(id) === GridRowModes.Edit) {
|
||
editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
resolve(!editingState[id][field].error);
|
||
} else {
|
||
resolve(false);
|
||
}
|
||
});
|
||
});
|
||
}, [apiRef, throwIfNotEditable, updateOrDeleteFieldState]);
|
||
const getRowWithUpdatedValuesFromRowEditing = React112.useCallback((id) => {
|
||
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
const row = apiRef.current.getRow(id);
|
||
if (!editingState[id]) {
|
||
return apiRef.current.getRow(id);
|
||
}
|
||
let rowUpdate = _extends({}, row);
|
||
Object.entries(editingState[id]).forEach(([field, fieldProps]) => {
|
||
const column = apiRef.current.getColumn(field);
|
||
if (column.valueSetter) {
|
||
rowUpdate = column.valueSetter({
|
||
value: fieldProps.value,
|
||
row: rowUpdate
|
||
});
|
||
} else {
|
||
rowUpdate[field] = fieldProps.value;
|
||
}
|
||
});
|
||
return rowUpdate;
|
||
}, [apiRef]);
|
||
const editingApi = {
|
||
getRowMode,
|
||
startRowEditMode,
|
||
stopRowEditMode
|
||
};
|
||
const editingPrivateApi = {
|
||
setRowEditingEditCellValue,
|
||
getRowWithUpdatedValuesFromRowEditing
|
||
};
|
||
useGridApiMethod(apiRef, editingApi, "public");
|
||
useGridApiMethod(apiRef, editingPrivateApi, "private");
|
||
React112.useEffect(() => {
|
||
if (rowModesModelProp) {
|
||
updateRowModesModel(rowModesModelProp);
|
||
}
|
||
}, [rowModesModelProp, updateRowModesModel]);
|
||
useEnhancedEffect_default(() => {
|
||
const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);
|
||
const copyOfPrevRowModesModel = prevRowModesModel.current;
|
||
prevRowModesModel.current = deepClone(rowModesModel);
|
||
Object.entries(rowModesModel).forEach(([id, params]) => {
|
||
var _copyOfPrevRowModesMo, _idToIdLookup$id;
|
||
const prevMode = ((_copyOfPrevRowModesMo = copyOfPrevRowModesModel[id]) == null ? void 0 : _copyOfPrevRowModesMo.mode) || GridRowModes.View;
|
||
const originalId = (_idToIdLookup$id = idToIdLookup[id]) != null ? _idToIdLookup$id : id;
|
||
if (params.mode === GridRowModes.Edit && prevMode === GridRowModes.View) {
|
||
updateStateToStartRowEditMode(_extends({
|
||
id: originalId
|
||
}, params));
|
||
} else if (params.mode === GridRowModes.View && prevMode === GridRowModes.Edit) {
|
||
updateStateToStopRowEditMode(_extends({
|
||
id: originalId
|
||
}, params));
|
||
}
|
||
});
|
||
}, [apiRef, rowModesModel, updateStateToStartRowEditMode, updateStateToStopRowEditMode]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/editing/useGridEditing.js
|
||
var editingStateInitializer = (state) => _extends({}, state, {
|
||
editRows: {}
|
||
});
|
||
var useGridEditing = (apiRef, props) => {
|
||
useGridCellEditing(apiRef, props);
|
||
useGridRowEditing(apiRef, props);
|
||
const debounceMap = React113.useRef({});
|
||
const {
|
||
isCellEditable: isCellEditableProp
|
||
} = props;
|
||
const isCellEditable = React113.useCallback((params) => {
|
||
if (isAutoGeneratedRow(params.rowNode)) {
|
||
return false;
|
||
}
|
||
if (!params.colDef.editable) {
|
||
return false;
|
||
}
|
||
if (!params.colDef.renderEditCell) {
|
||
return false;
|
||
}
|
||
if (isCellEditableProp) {
|
||
return isCellEditableProp(params);
|
||
}
|
||
return true;
|
||
}, [isCellEditableProp]);
|
||
const maybeDebounce = (id, field, debounceMs, callback) => {
|
||
if (!debounceMs) {
|
||
callback();
|
||
return;
|
||
}
|
||
if (!debounceMap.current[id]) {
|
||
debounceMap.current[id] = {};
|
||
}
|
||
if (debounceMap.current[id][field]) {
|
||
const [timeout2] = debounceMap.current[id][field];
|
||
clearTimeout(timeout2);
|
||
}
|
||
const runImmediately = () => {
|
||
const [timeout2] = debounceMap.current[id][field];
|
||
clearTimeout(timeout2);
|
||
callback();
|
||
delete debounceMap.current[id][field];
|
||
};
|
||
const timeout = setTimeout(() => {
|
||
callback();
|
||
delete debounceMap.current[id][field];
|
||
}, debounceMs);
|
||
debounceMap.current[id][field] = [timeout, runImmediately];
|
||
};
|
||
React113.useEffect(() => {
|
||
const debounces = debounceMap.current;
|
||
return () => {
|
||
Object.entries(debounces).forEach(([id, fields]) => {
|
||
Object.keys(fields).forEach((field) => {
|
||
const [timeout] = debounces[id][field];
|
||
clearTimeout(timeout);
|
||
delete debounces[id][field];
|
||
});
|
||
});
|
||
};
|
||
}, []);
|
||
const runPendingEditCellValueMutation = React113.useCallback((id, field) => {
|
||
if (!debounceMap.current[id]) {
|
||
return;
|
||
}
|
||
if (!field) {
|
||
Object.keys(debounceMap.current[id]).forEach((debouncedField) => {
|
||
const [, runCallback] = debounceMap.current[id][debouncedField];
|
||
runCallback();
|
||
});
|
||
} else if (debounceMap.current[id][field]) {
|
||
const [, runCallback] = debounceMap.current[id][field];
|
||
runCallback();
|
||
}
|
||
}, []);
|
||
const setEditCellValue = React113.useCallback((params) => {
|
||
const {
|
||
id,
|
||
field,
|
||
debounceMs
|
||
} = params;
|
||
return new Promise((resolve) => {
|
||
maybeDebounce(id, field, debounceMs, async () => {
|
||
const setEditCellValueToCall = props.editMode === GridEditModes.Row ? apiRef.current.setRowEditingEditCellValue : apiRef.current.setCellEditingEditCellValue;
|
||
if (apiRef.current.getCellMode(id, field) === GridCellModes.Edit) {
|
||
const result = await setEditCellValueToCall(params);
|
||
resolve(result);
|
||
}
|
||
});
|
||
});
|
||
}, [apiRef, props.editMode]);
|
||
const getRowWithUpdatedValues = React113.useCallback((id, field) => {
|
||
return props.editMode === GridEditModes.Cell ? apiRef.current.getRowWithUpdatedValuesFromCellEditing(id, field) : apiRef.current.getRowWithUpdatedValuesFromRowEditing(id);
|
||
}, [apiRef, props.editMode]);
|
||
const getEditCellMeta = React113.useCallback((id, field) => {
|
||
var _editingState$id$fiel, _editingState$id;
|
||
const editingState = gridEditRowsStateSelector(apiRef.current.state);
|
||
return (_editingState$id$fiel = (_editingState$id = editingState[id]) == null ? void 0 : _editingState$id[field]) != null ? _editingState$id$fiel : null;
|
||
}, [apiRef]);
|
||
const editingSharedApi = {
|
||
isCellEditable,
|
||
setEditCellValue,
|
||
getRowWithUpdatedValues,
|
||
unstable_getEditCellMeta: getEditCellMeta
|
||
};
|
||
const editingSharedPrivateApi = {
|
||
runPendingEditCellValueMutation
|
||
};
|
||
useGridApiMethod(apiRef, editingSharedApi, "public");
|
||
useGridApiMethod(apiRef, editingSharedPrivateApi, "private");
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rows/useGridRows.js
|
||
init_extends();
|
||
var React114 = __toESM(require_react());
|
||
var rowsStateInitializer = (state, props, apiRef) => {
|
||
apiRef.current.caches.rows = createRowsInternalCache({
|
||
rows: props.rows,
|
||
getRowId: props.getRowId,
|
||
loading: props.loading,
|
||
rowCount: props.rowCount
|
||
});
|
||
return _extends({}, state, {
|
||
rows: getRowsStateFromCache({
|
||
apiRef,
|
||
rowCountProp: props.rowCount,
|
||
loadingProp: props.loading,
|
||
previousTree: null,
|
||
previousTreeDepths: null
|
||
})
|
||
});
|
||
};
|
||
var useGridRows = (apiRef, props) => {
|
||
if (true) {
|
||
try {
|
||
Object.freeze(props.rows);
|
||
} catch (error) {
|
||
}
|
||
}
|
||
const logger = useGridLogger(apiRef, "useGridRows");
|
||
const currentPage = useGridVisibleRows(apiRef, props);
|
||
const lastUpdateMs = React114.useRef(Date.now());
|
||
const timeout = useTimeout();
|
||
const getRow = React114.useCallback((id) => {
|
||
const model = gridRowsLookupSelector(apiRef)[id];
|
||
if (model) {
|
||
return model;
|
||
}
|
||
const node = apiRef.current.getRowNode(id);
|
||
if (node && isAutoGeneratedRow(node)) {
|
||
return {
|
||
[GRID_ID_AUTOGENERATED]: id
|
||
};
|
||
}
|
||
return null;
|
||
}, [apiRef]);
|
||
const getRowIdProp = props.getRowId;
|
||
const getRowId = React114.useCallback((row) => {
|
||
if (GRID_ID_AUTOGENERATED in row) {
|
||
return row[GRID_ID_AUTOGENERATED];
|
||
}
|
||
if (getRowIdProp) {
|
||
return getRowIdProp(row);
|
||
}
|
||
return row.id;
|
||
}, [getRowIdProp]);
|
||
const lookup = React114.useMemo(() => currentPage.rows.reduce((acc, {
|
||
id
|
||
}, index) => {
|
||
acc[id] = index;
|
||
return acc;
|
||
}, {}), [currentPage.rows]);
|
||
const throttledRowsChange = React114.useCallback(({
|
||
cache,
|
||
throttle
|
||
}) => {
|
||
const run = () => {
|
||
lastUpdateMs.current = Date.now();
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
rows: getRowsStateFromCache({
|
||
apiRef,
|
||
rowCountProp: props.rowCount,
|
||
loadingProp: props.loading,
|
||
previousTree: gridRowTreeSelector(apiRef),
|
||
previousTreeDepths: gridRowTreeDepthsSelector(apiRef)
|
||
})
|
||
}));
|
||
apiRef.current.publishEvent("rowsSet");
|
||
apiRef.current.forceUpdate();
|
||
};
|
||
timeout.clear();
|
||
apiRef.current.caches.rows = cache;
|
||
if (!throttle) {
|
||
run();
|
||
return;
|
||
}
|
||
const throttleRemainingTimeMs = props.throttleRowsMs - (Date.now() - lastUpdateMs.current);
|
||
if (throttleRemainingTimeMs > 0) {
|
||
timeout.start(throttleRemainingTimeMs, run);
|
||
return;
|
||
}
|
||
run();
|
||
}, [props.throttleRowsMs, props.rowCount, props.loading, apiRef, timeout]);
|
||
const setRows = React114.useCallback((rows) => {
|
||
logger.debug(`Updating all rows, new length ${rows.length}`);
|
||
const cache = createRowsInternalCache({
|
||
rows,
|
||
getRowId: props.getRowId,
|
||
loading: props.loading,
|
||
rowCount: props.rowCount
|
||
});
|
||
const prevCache = apiRef.current.caches.rows;
|
||
cache.rowsBeforePartialUpdates = prevCache.rowsBeforePartialUpdates;
|
||
throttledRowsChange({
|
||
cache,
|
||
throttle: true
|
||
});
|
||
}, [logger, props.getRowId, props.loading, props.rowCount, throttledRowsChange, apiRef]);
|
||
const updateRows = React114.useCallback((updates) => {
|
||
if (props.signature === GridSignature.DataGrid && updates.length > 1) {
|
||
throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.", "You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));
|
||
}
|
||
const nonPinnedRowsUpdates = [];
|
||
updates.forEach((update) => {
|
||
const id = getRowIdFromRowModel(update, props.getRowId, "A row was provided without id when calling updateRows():");
|
||
const rowNode = apiRef.current.getRowNode(id);
|
||
if ((rowNode == null ? void 0 : rowNode.type) === "pinnedRow") {
|
||
const pinnedRowsCache = apiRef.current.caches.pinnedRows;
|
||
const prevModel = pinnedRowsCache.idLookup[id];
|
||
if (prevModel) {
|
||
pinnedRowsCache.idLookup[id] = _extends({}, prevModel, update);
|
||
}
|
||
} else {
|
||
nonPinnedRowsUpdates.push(update);
|
||
}
|
||
});
|
||
const cache = updateCacheWithNewRows({
|
||
updates: nonPinnedRowsUpdates,
|
||
getRowId: props.getRowId,
|
||
previousCache: apiRef.current.caches.rows
|
||
});
|
||
throttledRowsChange({
|
||
cache,
|
||
throttle: true
|
||
});
|
||
}, [props.signature, props.getRowId, throttledRowsChange, apiRef]);
|
||
const getRowModels = React114.useCallback(() => {
|
||
const dataRows = gridDataRowIdsSelector(apiRef);
|
||
const idRowsLookup = gridRowsLookupSelector(apiRef);
|
||
return new Map(dataRows.map((id) => {
|
||
var _idRowsLookup$id;
|
||
return [id, (_idRowsLookup$id = idRowsLookup[id]) != null ? _idRowsLookup$id : {}];
|
||
}));
|
||
}, [apiRef]);
|
||
const getRowsCount = React114.useCallback(() => gridRowCountSelector(apiRef), [apiRef]);
|
||
const getAllRowIds = React114.useCallback(() => gridDataRowIdsSelector(apiRef), [apiRef]);
|
||
const getRowIndexRelativeToVisibleRows = React114.useCallback((id) => lookup[id], [lookup]);
|
||
const setRowChildrenExpansion = React114.useCallback((id, isExpanded) => {
|
||
const currentNode = apiRef.current.getRowNode(id);
|
||
if (!currentNode) {
|
||
throw new Error(`MUI: No row with id #${id} found`);
|
||
}
|
||
if (currentNode.type !== "group") {
|
||
throw new Error("MUI: Only group nodes can be expanded or collapsed");
|
||
}
|
||
const newNode = _extends({}, currentNode, {
|
||
childrenExpanded: isExpanded
|
||
});
|
||
apiRef.current.setState((state) => {
|
||
return _extends({}, state, {
|
||
rows: _extends({}, state.rows, {
|
||
tree: _extends({}, state.rows.tree, {
|
||
[id]: newNode
|
||
})
|
||
})
|
||
});
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
apiRef.current.publishEvent("rowExpansionChange", newNode);
|
||
}, [apiRef]);
|
||
const getRowNode = React114.useCallback((id) => {
|
||
var _ref;
|
||
return (_ref = gridRowTreeSelector(apiRef)[id]) != null ? _ref : null;
|
||
}, [apiRef]);
|
||
const getRowGroupChildren = React114.useCallback(({
|
||
skipAutoGeneratedRows = true,
|
||
groupId,
|
||
applySorting,
|
||
applyFiltering
|
||
}) => {
|
||
const tree = gridRowTreeSelector(apiRef);
|
||
let children;
|
||
if (applySorting) {
|
||
const groupNode = tree[groupId];
|
||
if (!groupNode) {
|
||
return [];
|
||
}
|
||
const sortedRowIds = gridSortedRowIdsSelector(apiRef);
|
||
children = [];
|
||
const startIndex = sortedRowIds.findIndex((id) => id === groupId) + 1;
|
||
for (let index = startIndex; index < sortedRowIds.length && tree[sortedRowIds[index]].depth > groupNode.depth; index += 1) {
|
||
const id = sortedRowIds[index];
|
||
if (!skipAutoGeneratedRows || !isAutoGeneratedRow(tree[id])) {
|
||
children.push(id);
|
||
}
|
||
}
|
||
} else {
|
||
children = getTreeNodeDescendants(tree, groupId, skipAutoGeneratedRows);
|
||
}
|
||
if (applyFiltering) {
|
||
const filteredRowsLookup = gridFilteredRowsLookupSelector(apiRef);
|
||
children = children.filter((childId) => filteredRowsLookup[childId] !== false);
|
||
}
|
||
return children;
|
||
}, [apiRef]);
|
||
const setRowIndex = React114.useCallback((rowId, targetIndex) => {
|
||
const node = apiRef.current.getRowNode(rowId);
|
||
if (!node) {
|
||
throw new Error(`MUI: No row with id #${rowId} found`);
|
||
}
|
||
if (node.parent !== GRID_ROOT_GROUP_ID) {
|
||
throw new Error(`MUI: The row reordering do not support reordering of grouped rows yet`);
|
||
}
|
||
if (node.type !== "leaf") {
|
||
throw new Error(`MUI: The row reordering do not support reordering of footer or grouping rows`);
|
||
}
|
||
apiRef.current.setState((state) => {
|
||
const group = gridRowTreeSelector(state, apiRef.current.instanceId)[GRID_ROOT_GROUP_ID];
|
||
const allRows = group.children;
|
||
const oldIndex = allRows.findIndex((row) => row === rowId);
|
||
if (oldIndex === -1 || oldIndex === targetIndex) {
|
||
return state;
|
||
}
|
||
logger.debug(`Moving row ${rowId} to index ${targetIndex}`);
|
||
const updatedRows = [...allRows];
|
||
updatedRows.splice(targetIndex, 0, updatedRows.splice(oldIndex, 1)[0]);
|
||
return _extends({}, state, {
|
||
rows: _extends({}, state.rows, {
|
||
tree: _extends({}, state.rows.tree, {
|
||
[GRID_ROOT_GROUP_ID]: _extends({}, group, {
|
||
children: updatedRows
|
||
})
|
||
})
|
||
})
|
||
});
|
||
});
|
||
apiRef.current.publishEvent("rowsSet");
|
||
}, [apiRef, logger]);
|
||
const replaceRows = React114.useCallback((firstRowToRender, newRows) => {
|
||
if (props.signature === GridSignature.DataGrid && newRows.length > 1) {
|
||
throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.", "You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));
|
||
}
|
||
if (newRows.length === 0) {
|
||
return;
|
||
}
|
||
const treeDepth = gridRowMaximumTreeDepthSelector(apiRef);
|
||
if (treeDepth > 1) {
|
||
throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");
|
||
}
|
||
const tree = _extends({}, gridRowTreeSelector(apiRef));
|
||
const dataRowIdToModelLookup = _extends({}, gridRowsLookupSelector(apiRef));
|
||
const dataRowIdToIdLookup = _extends({}, gridRowsDataRowIdToIdLookupSelector(apiRef));
|
||
const rootGroup = tree[GRID_ROOT_GROUP_ID];
|
||
const rootGroupChildren = [...rootGroup.children];
|
||
const seenIds = /* @__PURE__ */ new Set();
|
||
for (let i = 0; i < newRows.length; i += 1) {
|
||
const rowModel = newRows[i];
|
||
const rowId = getRowIdFromRowModel(rowModel, props.getRowId, "A row was provided without id when calling replaceRows().");
|
||
const [removedRowId] = rootGroupChildren.splice(firstRowToRender + i, 1, rowId);
|
||
if (!seenIds.has(removedRowId)) {
|
||
delete dataRowIdToModelLookup[removedRowId];
|
||
delete dataRowIdToIdLookup[removedRowId];
|
||
delete tree[removedRowId];
|
||
}
|
||
const rowTreeNodeConfig = {
|
||
id: rowId,
|
||
depth: 0,
|
||
parent: GRID_ROOT_GROUP_ID,
|
||
type: "leaf",
|
||
groupingKey: null
|
||
};
|
||
dataRowIdToModelLookup[rowId] = rowModel;
|
||
dataRowIdToIdLookup[rowId] = rowId;
|
||
tree[rowId] = rowTreeNodeConfig;
|
||
seenIds.add(rowId);
|
||
}
|
||
tree[GRID_ROOT_GROUP_ID] = _extends({}, rootGroup, {
|
||
children: rootGroupChildren
|
||
});
|
||
const dataRowIds = rootGroupChildren.filter((childId) => tree[childId].type === "leaf");
|
||
apiRef.current.caches.rows.dataRowIdToModelLookup = dataRowIdToModelLookup;
|
||
apiRef.current.caches.rows.dataRowIdToIdLookup = dataRowIdToIdLookup;
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
rows: _extends({}, state.rows, {
|
||
dataRowIdToModelLookup,
|
||
dataRowIdToIdLookup,
|
||
dataRowIds,
|
||
tree
|
||
})
|
||
}));
|
||
apiRef.current.publishEvent("rowsSet");
|
||
}, [apiRef, props.signature, props.getRowId]);
|
||
const rowApi = {
|
||
getRow,
|
||
getRowId,
|
||
getRowModels,
|
||
getRowsCount,
|
||
getAllRowIds,
|
||
setRows,
|
||
updateRows,
|
||
getRowNode,
|
||
getRowIndexRelativeToVisibleRows,
|
||
unstable_replaceRows: replaceRows
|
||
};
|
||
const rowProApi = {
|
||
setRowIndex,
|
||
setRowChildrenExpansion,
|
||
getRowGroupChildren
|
||
};
|
||
const groupRows = React114.useCallback(() => {
|
||
logger.info(`Row grouping pre-processing have changed, regenerating the row tree`);
|
||
let cache;
|
||
if (apiRef.current.caches.rows.rowsBeforePartialUpdates === props.rows) {
|
||
cache = _extends({}, apiRef.current.caches.rows, {
|
||
updates: {
|
||
type: "full",
|
||
rows: gridDataRowIdsSelector(apiRef)
|
||
}
|
||
});
|
||
} else {
|
||
cache = createRowsInternalCache({
|
||
rows: props.rows,
|
||
getRowId: props.getRowId,
|
||
loading: props.loading,
|
||
rowCount: props.rowCount
|
||
});
|
||
}
|
||
throttledRowsChange({
|
||
cache,
|
||
throttle: false
|
||
});
|
||
}, [logger, apiRef, props.rows, props.getRowId, props.loading, props.rowCount, throttledRowsChange]);
|
||
const handleStrategyProcessorChange = React114.useCallback((methodName) => {
|
||
if (methodName === "rowTreeCreation") {
|
||
groupRows();
|
||
}
|
||
}, [groupRows]);
|
||
const handleStrategyActivityChange = React114.useCallback(() => {
|
||
if (apiRef.current.getActiveStrategy("rowTree") !== gridRowGroupingNameSelector(apiRef)) {
|
||
groupRows();
|
||
}
|
||
}, [apiRef, groupRows]);
|
||
useGridApiEventHandler(apiRef, "activeStrategyProcessorChange", handleStrategyProcessorChange);
|
||
useGridApiEventHandler(apiRef, "strategyAvailabilityChange", handleStrategyActivityChange);
|
||
const applyHydrateRowsProcessor = React114.useCallback(() => {
|
||
apiRef.current.setState((state) => {
|
||
const response = apiRef.current.unstable_applyPipeProcessors("hydrateRows", {
|
||
tree: gridRowTreeSelector(state, apiRef.current.instanceId),
|
||
treeDepths: gridRowTreeDepthsSelector(state, apiRef.current.instanceId),
|
||
dataRowIds: gridDataRowIdsSelector(state, apiRef.current.instanceId),
|
||
dataRowIdToModelLookup: gridRowsLookupSelector(state, apiRef.current.instanceId),
|
||
dataRowIdToIdLookup: gridRowsDataRowIdToIdLookupSelector(state, apiRef.current.instanceId)
|
||
});
|
||
return _extends({}, state, {
|
||
rows: _extends({}, state.rows, response, {
|
||
totalTopLevelRowCount: getTopLevelRowCount({
|
||
tree: response.tree,
|
||
rowCountProp: props.rowCount
|
||
})
|
||
})
|
||
});
|
||
});
|
||
apiRef.current.publishEvent("rowsSet");
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef, props.rowCount]);
|
||
useGridRegisterPipeApplier(apiRef, "hydrateRows", applyHydrateRowsProcessor);
|
||
useGridApiMethod(apiRef, rowApi, "public");
|
||
useGridApiMethod(apiRef, rowProApi, props.signature === GridSignature.DataGrid ? "private" : "public");
|
||
const isFirstRender = React114.useRef(true);
|
||
React114.useEffect(() => {
|
||
if (isFirstRender.current) {
|
||
isFirstRender.current = false;
|
||
return;
|
||
}
|
||
const areNewRowsAlreadyInState = apiRef.current.caches.rows.rowsBeforePartialUpdates === props.rows;
|
||
const isNewLoadingAlreadyInState = apiRef.current.caches.rows.loadingPropBeforePartialUpdates === props.loading;
|
||
const isNewRowCountAlreadyInState = apiRef.current.caches.rows.rowCountPropBeforePartialUpdates === props.rowCount;
|
||
if (areNewRowsAlreadyInState) {
|
||
if (!isNewLoadingAlreadyInState) {
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
rows: _extends({}, state.rows, {
|
||
loading: props.loading
|
||
})
|
||
}));
|
||
apiRef.current.caches.rows.loadingPropBeforePartialUpdates = props.loading;
|
||
apiRef.current.forceUpdate();
|
||
}
|
||
if (!isNewRowCountAlreadyInState) {
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
rows: _extends({}, state.rows, {
|
||
totalRowCount: Math.max(props.rowCount || 0, state.rows.totalRowCount),
|
||
totalTopLevelRowCount: Math.max(props.rowCount || 0, state.rows.totalTopLevelRowCount)
|
||
})
|
||
}));
|
||
apiRef.current.caches.rows.rowCountPropBeforePartialUpdates = props.rowCount;
|
||
apiRef.current.forceUpdate();
|
||
}
|
||
return;
|
||
}
|
||
logger.debug(`Updating all rows, new length ${props.rows.length}`);
|
||
throttledRowsChange({
|
||
cache: createRowsInternalCache({
|
||
rows: props.rows,
|
||
getRowId: props.getRowId,
|
||
loading: props.loading,
|
||
rowCount: props.rowCount
|
||
}),
|
||
throttle: false
|
||
});
|
||
}, [props.rows, props.rowCount, props.getRowId, props.loading, logger, throttledRowsChange, apiRef]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rows/useGridRowsPreProcessors.js
|
||
init_extends();
|
||
var createFlatRowTree = (rows) => {
|
||
const tree = {
|
||
[GRID_ROOT_GROUP_ID]: _extends({}, buildRootGroup(), {
|
||
children: rows
|
||
})
|
||
};
|
||
for (let i = 0; i < rows.length; i += 1) {
|
||
const rowId = rows[i];
|
||
tree[rowId] = {
|
||
id: rowId,
|
||
depth: 0,
|
||
parent: GRID_ROOT_GROUP_ID,
|
||
type: "leaf",
|
||
groupingKey: null
|
||
};
|
||
}
|
||
return {
|
||
groupingName: GRID_DEFAULT_STRATEGY,
|
||
tree,
|
||
treeDepths: {
|
||
0: rows.length
|
||
},
|
||
dataRowIds: rows
|
||
};
|
||
};
|
||
var updateFlatRowTree = ({
|
||
previousTree,
|
||
actions
|
||
}) => {
|
||
const tree = _extends({}, previousTree);
|
||
const idsToRemoveFromRootGroup = {};
|
||
for (let i = 0; i < actions.remove.length; i += 1) {
|
||
const idToDelete = actions.remove[i];
|
||
idsToRemoveFromRootGroup[idToDelete] = true;
|
||
delete tree[idToDelete];
|
||
}
|
||
for (let i = 0; i < actions.insert.length; i += 1) {
|
||
const idToInsert = actions.insert[i];
|
||
tree[idToInsert] = {
|
||
id: idToInsert,
|
||
depth: 0,
|
||
parent: GRID_ROOT_GROUP_ID,
|
||
type: "leaf",
|
||
groupingKey: null
|
||
};
|
||
}
|
||
const rootGroup = tree[GRID_ROOT_GROUP_ID];
|
||
let rootGroupChildren = [...rootGroup.children, ...actions.insert];
|
||
if (Object.values(idsToRemoveFromRootGroup).length) {
|
||
rootGroupChildren = rootGroupChildren.filter((id) => !idsToRemoveFromRootGroup[id]);
|
||
}
|
||
tree[GRID_ROOT_GROUP_ID] = _extends({}, rootGroup, {
|
||
children: rootGroupChildren
|
||
});
|
||
return {
|
||
groupingName: GRID_DEFAULT_STRATEGY,
|
||
tree,
|
||
treeDepths: {
|
||
0: rootGroupChildren.length
|
||
},
|
||
dataRowIds: rootGroupChildren
|
||
};
|
||
};
|
||
var flatRowTreeCreationMethod = (params) => {
|
||
if (params.updates.type === "full") {
|
||
return createFlatRowTree(params.updates.rows);
|
||
}
|
||
return updateFlatRowTree({
|
||
previousTree: params.previousTree,
|
||
actions: params.updates.actions
|
||
});
|
||
};
|
||
var useGridRowsPreProcessors = (apiRef) => {
|
||
useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, "rowTreeCreation", flatRowTreeCreationMethod);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rowSelection/useGridRowSelection.js
|
||
init_extends();
|
||
var React115 = __toESM(require_react());
|
||
var getSelectionModelPropValue = (selectionModelProp, prevSelectionModel) => {
|
||
if (selectionModelProp == null) {
|
||
return selectionModelProp;
|
||
}
|
||
if (Array.isArray(selectionModelProp)) {
|
||
return selectionModelProp;
|
||
}
|
||
if (prevSelectionModel && prevSelectionModel[0] === selectionModelProp) {
|
||
return prevSelectionModel;
|
||
}
|
||
return [selectionModelProp];
|
||
};
|
||
var rowSelectionStateInitializer = (state, props) => {
|
||
var _getSelectionModelPro;
|
||
return _extends({}, state, {
|
||
rowSelection: props.rowSelection ? (_getSelectionModelPro = getSelectionModelPropValue(props.rowSelectionModel)) != null ? _getSelectionModelPro : [] : []
|
||
});
|
||
};
|
||
var useGridRowSelection = (apiRef, props) => {
|
||
const logger = useGridLogger(apiRef, "useGridSelection");
|
||
const runIfRowSelectionIsEnabled = (callback) => (...args) => {
|
||
if (props.rowSelection) {
|
||
callback(...args);
|
||
}
|
||
};
|
||
const propRowSelectionModel = React115.useMemo(() => {
|
||
return getSelectionModelPropValue(props.rowSelectionModel, gridRowSelectionStateSelector(apiRef.current.state));
|
||
}, [apiRef, props.rowSelectionModel]);
|
||
const lastRowToggled = React115.useRef(null);
|
||
apiRef.current.registerControlState({
|
||
stateId: "rowSelection",
|
||
propModel: propRowSelectionModel,
|
||
propOnChange: props.onRowSelectionModelChange,
|
||
stateSelector: gridRowSelectionStateSelector,
|
||
changeEvent: "rowSelectionChange"
|
||
});
|
||
const {
|
||
checkboxSelection,
|
||
disableMultipleRowSelection,
|
||
disableRowSelectionOnClick,
|
||
isRowSelectable: propIsRowSelectable
|
||
} = props;
|
||
const canHaveMultipleSelection = !disableMultipleRowSelection || checkboxSelection;
|
||
const visibleRows = useGridVisibleRows(apiRef, props);
|
||
const expandMouseRowRangeSelection = React115.useCallback((id) => {
|
||
var _lastRowToggled$curre;
|
||
let endId = id;
|
||
const startId = (_lastRowToggled$curre = lastRowToggled.current) != null ? _lastRowToggled$curre : id;
|
||
const isSelected = apiRef.current.isRowSelected(id);
|
||
if (isSelected) {
|
||
const visibleRowIds = gridExpandedSortedRowIdsSelector(apiRef);
|
||
const startIndex = visibleRowIds.findIndex((rowId) => rowId === startId);
|
||
const endIndex = visibleRowIds.findIndex((rowId) => rowId === endId);
|
||
if (startIndex === endIndex) {
|
||
return;
|
||
}
|
||
if (startIndex > endIndex) {
|
||
endId = visibleRowIds[endIndex + 1];
|
||
} else {
|
||
endId = visibleRowIds[endIndex - 1];
|
||
}
|
||
}
|
||
lastRowToggled.current = id;
|
||
apiRef.current.selectRowRange({
|
||
startId,
|
||
endId
|
||
}, !isSelected);
|
||
}, [apiRef]);
|
||
const setRowSelectionModel = React115.useCallback((model) => {
|
||
if (props.signature === GridSignature.DataGrid && !props.checkboxSelection && Array.isArray(model) && model.length > 1) {
|
||
throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.", "You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join("\n"));
|
||
}
|
||
const currentModel = gridRowSelectionStateSelector(apiRef.current.state);
|
||
if (currentModel !== model) {
|
||
logger.debug(`Setting selection model`);
|
||
apiRef.current.setState((state) => _extends({}, state, {
|
||
rowSelection: props.rowSelection ? model : []
|
||
}));
|
||
apiRef.current.forceUpdate();
|
||
}
|
||
}, [apiRef, logger, props.rowSelection, props.signature, props.checkboxSelection]);
|
||
const isRowSelected = React115.useCallback((id) => gridRowSelectionStateSelector(apiRef.current.state).includes(id), [apiRef]);
|
||
const isRowSelectable = React115.useCallback((id) => {
|
||
if (propIsRowSelectable && !propIsRowSelectable(apiRef.current.getRowParams(id))) {
|
||
return false;
|
||
}
|
||
const rowNode = apiRef.current.getRowNode(id);
|
||
if ((rowNode == null ? void 0 : rowNode.type) === "footer" || (rowNode == null ? void 0 : rowNode.type) === "pinnedRow") {
|
||
return false;
|
||
}
|
||
return true;
|
||
}, [apiRef, propIsRowSelectable]);
|
||
const getSelectedRows = React115.useCallback(() => selectedGridRowsSelector(apiRef), [apiRef]);
|
||
const selectRow = React115.useCallback((id, isSelected = true, resetSelection = false) => {
|
||
if (!apiRef.current.isRowSelectable(id)) {
|
||
return;
|
||
}
|
||
lastRowToggled.current = id;
|
||
if (resetSelection) {
|
||
logger.debug(`Setting selection for row ${id}`);
|
||
apiRef.current.setRowSelectionModel(isSelected ? [id] : []);
|
||
} else {
|
||
logger.debug(`Toggling selection for row ${id}`);
|
||
const selection = gridRowSelectionStateSelector(apiRef.current.state);
|
||
const newSelection = selection.filter((el) => el !== id);
|
||
if (isSelected) {
|
||
newSelection.push(id);
|
||
}
|
||
const isSelectionValid = newSelection.length < 2 || canHaveMultipleSelection;
|
||
if (isSelectionValid) {
|
||
apiRef.current.setRowSelectionModel(newSelection);
|
||
}
|
||
}
|
||
}, [apiRef, logger, canHaveMultipleSelection]);
|
||
const selectRows = React115.useCallback((ids, isSelected = true, resetSelection = false) => {
|
||
logger.debug(`Setting selection for several rows`);
|
||
const selectableIds = ids.filter((id) => apiRef.current.isRowSelectable(id));
|
||
let newSelection;
|
||
if (resetSelection) {
|
||
newSelection = isSelected ? selectableIds : [];
|
||
} else {
|
||
const selectionLookup = _extends({}, selectedIdsLookupSelector(apiRef));
|
||
selectableIds.forEach((id) => {
|
||
if (isSelected) {
|
||
selectionLookup[id] = id;
|
||
} else {
|
||
delete selectionLookup[id];
|
||
}
|
||
});
|
||
newSelection = Object.values(selectionLookup);
|
||
}
|
||
const isSelectionValid = newSelection.length < 2 || canHaveMultipleSelection;
|
||
if (isSelectionValid) {
|
||
apiRef.current.setRowSelectionModel(newSelection);
|
||
}
|
||
}, [apiRef, logger, canHaveMultipleSelection]);
|
||
const selectRowRange = React115.useCallback(({
|
||
startId,
|
||
endId
|
||
}, isSelected = true, resetSelection = false) => {
|
||
if (!apiRef.current.getRow(startId) || !apiRef.current.getRow(endId)) {
|
||
return;
|
||
}
|
||
logger.debug(`Expanding selection from row ${startId} to row ${endId}`);
|
||
const allPagesRowIds = gridExpandedSortedRowIdsSelector(apiRef);
|
||
const startIndex = allPagesRowIds.indexOf(startId);
|
||
const endIndex = allPagesRowIds.indexOf(endId);
|
||
const [start, end] = startIndex > endIndex ? [endIndex, startIndex] : [startIndex, endIndex];
|
||
const rowsBetweenStartAndEnd = allPagesRowIds.slice(start, end + 1);
|
||
apiRef.current.selectRows(rowsBetweenStartAndEnd, isSelected, resetSelection);
|
||
}, [apiRef, logger]);
|
||
const selectionPublicApi = {
|
||
selectRow,
|
||
setRowSelectionModel,
|
||
getSelectedRows,
|
||
isRowSelected,
|
||
isRowSelectable
|
||
};
|
||
const selectionPrivateApi = {
|
||
selectRows,
|
||
selectRowRange
|
||
};
|
||
useGridApiMethod(apiRef, selectionPublicApi, "public");
|
||
useGridApiMethod(apiRef, selectionPrivateApi, props.signature === GridSignature.DataGrid ? "private" : "public");
|
||
const removeOutdatedSelection = React115.useCallback(() => {
|
||
if (props.keepNonExistentRowsSelected) {
|
||
return;
|
||
}
|
||
const currentSelection = gridRowSelectionStateSelector(apiRef.current.state);
|
||
const rowsLookup = gridRowsLookupSelector(apiRef);
|
||
const selectionLookup = _extends({}, selectedIdsLookupSelector(apiRef));
|
||
let hasChanged = false;
|
||
currentSelection.forEach((id) => {
|
||
if (!rowsLookup[id]) {
|
||
delete selectionLookup[id];
|
||
hasChanged = true;
|
||
}
|
||
});
|
||
if (hasChanged) {
|
||
apiRef.current.setRowSelectionModel(Object.values(selectionLookup));
|
||
}
|
||
}, [apiRef, props.keepNonExistentRowsSelected]);
|
||
const handleSingleRowSelection = React115.useCallback((id, event) => {
|
||
const hasCtrlKey = event.metaKey || event.ctrlKey;
|
||
const isMultipleSelectionDisabled = !checkboxSelection && !hasCtrlKey && !isKeyboardEvent(event);
|
||
const resetSelection = !canHaveMultipleSelection || isMultipleSelectionDisabled;
|
||
const isSelected = apiRef.current.isRowSelected(id);
|
||
if (resetSelection) {
|
||
apiRef.current.selectRow(id, !isMultipleSelectionDisabled ? !isSelected : true, true);
|
||
} else {
|
||
apiRef.current.selectRow(id, !isSelected, false);
|
||
}
|
||
}, [apiRef, canHaveMultipleSelection, checkboxSelection]);
|
||
const handleRowClick = React115.useCallback((params, event) => {
|
||
var _closest;
|
||
if (disableRowSelectionOnClick) {
|
||
return;
|
||
}
|
||
const field = (_closest = event.target.closest(`.${gridClasses.cell}`)) == null ? void 0 : _closest.getAttribute("data-field");
|
||
if (field === GRID_CHECKBOX_SELECTION_COL_DEF.field) {
|
||
return;
|
||
}
|
||
if (field === GRID_DETAIL_PANEL_TOGGLE_FIELD) {
|
||
return;
|
||
}
|
||
if (field) {
|
||
const column = apiRef.current.getColumn(field);
|
||
if ((column == null ? void 0 : column.type) === GRID_ACTIONS_COLUMN_TYPE) {
|
||
return;
|
||
}
|
||
}
|
||
const rowNode = apiRef.current.getRowNode(params.id);
|
||
if (rowNode.type === "pinnedRow") {
|
||
return;
|
||
}
|
||
if (event.shiftKey && (canHaveMultipleSelection || checkboxSelection)) {
|
||
expandMouseRowRangeSelection(params.id);
|
||
} else {
|
||
handleSingleRowSelection(params.id, event);
|
||
}
|
||
}, [disableRowSelectionOnClick, canHaveMultipleSelection, checkboxSelection, apiRef, expandMouseRowRangeSelection, handleSingleRowSelection]);
|
||
const preventSelectionOnShift = React115.useCallback((params, event) => {
|
||
if (canHaveMultipleSelection && event.shiftKey) {
|
||
var _window$getSelection;
|
||
(_window$getSelection = window.getSelection()) == null || _window$getSelection.removeAllRanges();
|
||
}
|
||
}, [canHaveMultipleSelection]);
|
||
const handleRowSelectionCheckboxChange = React115.useCallback((params, event) => {
|
||
if (event.nativeEvent.shiftKey) {
|
||
expandMouseRowRangeSelection(params.id);
|
||
} else {
|
||
apiRef.current.selectRow(params.id, params.value);
|
||
}
|
||
}, [apiRef, expandMouseRowRangeSelection]);
|
||
const handleHeaderSelectionCheckboxChange = React115.useCallback((params) => {
|
||
const shouldLimitSelectionToCurrentPage = props.checkboxSelectionVisibleOnly && props.pagination;
|
||
const rowsToBeSelected = shouldLimitSelectionToCurrentPage ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
|
||
const filterModel = gridFilterModelSelector(apiRef);
|
||
apiRef.current.selectRows(rowsToBeSelected, params.value, (filterModel == null ? void 0 : filterModel.items.length) > 0);
|
||
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination]);
|
||
const handleCellKeyDown = React115.useCallback((params, event) => {
|
||
if (apiRef.current.getCellMode(params.id, params.field) === GridCellModes.Edit) {
|
||
return;
|
||
}
|
||
if (isEventTargetInPortal(event)) {
|
||
return;
|
||
}
|
||
if (isNavigationKey(event.key) && event.shiftKey) {
|
||
const focusCell = gridFocusCellSelector(apiRef);
|
||
if (focusCell && focusCell.id !== params.id) {
|
||
event.preventDefault();
|
||
const isNextRowSelected = apiRef.current.isRowSelected(focusCell.id);
|
||
if (!canHaveMultipleSelection) {
|
||
apiRef.current.selectRow(focusCell.id, !isNextRowSelected, true);
|
||
return;
|
||
}
|
||
const newRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(focusCell.id);
|
||
const previousRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
||
let start;
|
||
let end;
|
||
if (newRowIndex > previousRowIndex) {
|
||
if (isNextRowSelected) {
|
||
start = previousRowIndex;
|
||
end = newRowIndex - 1;
|
||
} else {
|
||
start = previousRowIndex;
|
||
end = newRowIndex;
|
||
}
|
||
} else {
|
||
if (isNextRowSelected) {
|
||
start = newRowIndex + 1;
|
||
end = previousRowIndex;
|
||
} else {
|
||
start = newRowIndex;
|
||
end = previousRowIndex;
|
||
}
|
||
}
|
||
const rowsBetweenStartAndEnd = visibleRows.rows.slice(start, end + 1).map((row) => row.id);
|
||
apiRef.current.selectRows(rowsBetweenStartAndEnd, !isNextRowSelected);
|
||
return;
|
||
}
|
||
}
|
||
if (event.key === " " && event.shiftKey) {
|
||
event.preventDefault();
|
||
handleSingleRowSelection(params.id, event);
|
||
return;
|
||
}
|
||
if (event.key === "a" && (event.ctrlKey || event.metaKey)) {
|
||
event.preventDefault();
|
||
selectRows(apiRef.current.getAllRowIds(), true);
|
||
}
|
||
}, [apiRef, handleSingleRowSelection, selectRows, visibleRows.rows, canHaveMultipleSelection]);
|
||
useGridApiEventHandler(apiRef, "sortedRowsSet", runIfRowSelectionIsEnabled(removeOutdatedSelection));
|
||
useGridApiEventHandler(apiRef, "rowClick", runIfRowSelectionIsEnabled(handleRowClick));
|
||
useGridApiEventHandler(apiRef, "rowSelectionCheckboxChange", runIfRowSelectionIsEnabled(handleRowSelectionCheckboxChange));
|
||
useGridApiEventHandler(apiRef, "headerSelectionCheckboxChange", handleHeaderSelectionCheckboxChange);
|
||
useGridApiEventHandler(apiRef, "cellMouseDown", runIfRowSelectionIsEnabled(preventSelectionOnShift));
|
||
useGridApiEventHandler(apiRef, "cellKeyDown", runIfRowSelectionIsEnabled(handleCellKeyDown));
|
||
React115.useEffect(() => {
|
||
if (propRowSelectionModel !== void 0) {
|
||
apiRef.current.setRowSelectionModel(propRowSelectionModel);
|
||
}
|
||
}, [apiRef, propRowSelectionModel, props.rowSelection]);
|
||
React115.useEffect(() => {
|
||
if (!props.rowSelection) {
|
||
apiRef.current.setRowSelectionModel([]);
|
||
}
|
||
}, [apiRef, props.rowSelection]);
|
||
const isStateControlled = propRowSelectionModel != null;
|
||
React115.useEffect(() => {
|
||
if (isStateControlled || !props.rowSelection) {
|
||
return;
|
||
}
|
||
const currentSelection = gridRowSelectionStateSelector(apiRef.current.state);
|
||
if (isRowSelectable) {
|
||
const newSelection = currentSelection.filter((id) => isRowSelectable(id));
|
||
if (newSelection.length < currentSelection.length) {
|
||
apiRef.current.setRowSelectionModel(newSelection);
|
||
}
|
||
}
|
||
}, [apiRef, isRowSelectable, isStateControlled, props.rowSelection]);
|
||
React115.useEffect(() => {
|
||
if (!props.rowSelection || isStateControlled) {
|
||
return;
|
||
}
|
||
const currentSelection = gridRowSelectionStateSelector(apiRef.current.state);
|
||
if (!canHaveMultipleSelection && currentSelection.length > 1) {
|
||
apiRef.current.setRowSelectionModel([]);
|
||
}
|
||
}, [apiRef, canHaveMultipleSelection, checkboxSelection, isStateControlled, props.rowSelection]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js
|
||
init_extends();
|
||
var React116 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/constants/localeTextConstants.js
|
||
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: (count) => count !== 1 ? `${count} active filters` : `${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: (count) => count !== 1 ? `${count} active filters` : `${count} active filter`,
|
||
columnHeaderFiltersLabel: "Show filters",
|
||
columnHeaderSortIconLabel: "Sort",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} rows selected` : `${count.toLocaleString()} row selected`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Total Rows:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} of ${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: (name) => `Group by ${name}`,
|
||
unGroupColumn: (name) => `Stop grouping by ${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"
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js
|
||
var useUtilityClasses33 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
return React116.useMemo(() => {
|
||
const slots = {
|
||
cellCheckbox: ["cellCheckbox"],
|
||
columnHeaderCheckbox: ["columnHeaderCheckbox"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
}, [classes]);
|
||
};
|
||
var useGridRowSelectionPreProcessors = (apiRef, props) => {
|
||
const ownerState = {
|
||
classes: props.classes
|
||
};
|
||
const classes = useUtilityClasses33(ownerState);
|
||
const updateSelectionColumn = React116.useCallback((columnsState) => {
|
||
const selectionColumn = _extends({}, GRID_CHECKBOX_SELECTION_COL_DEF, {
|
||
cellClassName: classes.cellCheckbox,
|
||
headerClassName: classes.columnHeaderCheckbox,
|
||
headerName: apiRef.current.getLocaleText("checkboxSelectionHeaderName")
|
||
});
|
||
const shouldHaveSelectionColumn = props.checkboxSelection;
|
||
const haveSelectionColumn = columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] != null;
|
||
if (shouldHaveSelectionColumn && !haveSelectionColumn) {
|
||
columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = selectionColumn;
|
||
columnsState.orderedFields = [GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields];
|
||
} else if (!shouldHaveSelectionColumn && haveSelectionColumn) {
|
||
delete columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD];
|
||
columnsState.orderedFields = columnsState.orderedFields.filter((field) => field !== GRID_CHECKBOX_SELECTION_FIELD);
|
||
} else if (shouldHaveSelectionColumn && haveSelectionColumn) {
|
||
columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = _extends({}, selectionColumn, columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD]);
|
||
}
|
||
return columnsState;
|
||
}, [apiRef, classes, props.checkboxSelection]);
|
||
useGridRegisterPipeProcessor(apiRef, "hydrateColumns", updateSelectionColumn);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/sorting/useGridSorting.js
|
||
init_extends();
|
||
var React117 = __toESM(require_react());
|
||
var sortingStateInitializer = (state, props) => {
|
||
var _ref, _props$sortModel, _props$initialState;
|
||
const sortModel = (_ref = (_props$sortModel = props.sortModel) != null ? _props$sortModel : (_props$initialState = props.initialState) == null || (_props$initialState = _props$initialState.sorting) == null ? void 0 : _props$initialState.sortModel) != null ? _ref : [];
|
||
return _extends({}, state, {
|
||
sorting: {
|
||
sortModel: sanitizeSortModel(sortModel, props.disableMultipleColumnsSorting),
|
||
sortedRows: []
|
||
}
|
||
});
|
||
};
|
||
var useGridSorting = (apiRef, props) => {
|
||
var _props$initialState3;
|
||
const logger = useGridLogger(apiRef, "useGridSorting");
|
||
apiRef.current.registerControlState({
|
||
stateId: "sortModel",
|
||
propModel: props.sortModel,
|
||
propOnChange: props.onSortModelChange,
|
||
stateSelector: gridSortModelSelector,
|
||
changeEvent: "sortModelChange"
|
||
});
|
||
const upsertSortModel = React117.useCallback((field, sortItem) => {
|
||
const sortModel = gridSortModelSelector(apiRef);
|
||
const existingIdx = sortModel.findIndex((c) => c.field === field);
|
||
let newSortModel = [...sortModel];
|
||
if (existingIdx > -1) {
|
||
if (!sortItem) {
|
||
newSortModel.splice(existingIdx, 1);
|
||
} else {
|
||
newSortModel.splice(existingIdx, 1, sortItem);
|
||
}
|
||
} else {
|
||
newSortModel = [...sortModel, sortItem];
|
||
}
|
||
return newSortModel;
|
||
}, [apiRef]);
|
||
const createSortItem = React117.useCallback((col, directionOverride) => {
|
||
var _col$sortingOrder2;
|
||
const sortModel = gridSortModelSelector(apiRef);
|
||
const existing = sortModel.find((c) => c.field === col.field);
|
||
if (existing) {
|
||
var _col$sortingOrder;
|
||
const nextSort = directionOverride === void 0 ? getNextGridSortDirection((_col$sortingOrder = col.sortingOrder) != null ? _col$sortingOrder : props.sortingOrder, existing.sort) : directionOverride;
|
||
return nextSort == null ? void 0 : _extends({}, existing, {
|
||
sort: nextSort
|
||
});
|
||
}
|
||
return {
|
||
field: col.field,
|
||
sort: directionOverride === void 0 ? getNextGridSortDirection((_col$sortingOrder2 = col.sortingOrder) != null ? _col$sortingOrder2 : props.sortingOrder) : directionOverride
|
||
};
|
||
}, [apiRef, props.sortingOrder]);
|
||
const addColumnMenuItem = React117.useCallback((columnMenuItems, colDef) => {
|
||
if (colDef == null || colDef.sortable === false) {
|
||
return columnMenuItems;
|
||
}
|
||
const sortingOrder = colDef.sortingOrder || props.sortingOrder;
|
||
if (sortingOrder.some((item) => !!item)) {
|
||
return [...columnMenuItems, "columnMenuSortItem"];
|
||
}
|
||
return columnMenuItems;
|
||
}, [props.sortingOrder]);
|
||
const applySorting = React117.useCallback(() => {
|
||
apiRef.current.setState((state) => {
|
||
if (props.sortingMode === "server") {
|
||
logger.debug("Skipping sorting rows as sortingMode = server");
|
||
return _extends({}, state, {
|
||
sorting: _extends({}, state.sorting, {
|
||
sortedRows: getTreeNodeDescendants(gridRowTreeSelector(apiRef), GRID_ROOT_GROUP_ID, false)
|
||
})
|
||
});
|
||
}
|
||
const sortModel = gridSortModelSelector(state, apiRef.current.instanceId);
|
||
const sortRowList = buildAggregatedSortingApplier(sortModel, apiRef);
|
||
const sortedRows = apiRef.current.applyStrategyProcessor("sorting", {
|
||
sortRowList
|
||
});
|
||
return _extends({}, state, {
|
||
sorting: _extends({}, state.sorting, {
|
||
sortedRows
|
||
})
|
||
});
|
||
});
|
||
apiRef.current.publishEvent("sortedRowsSet");
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef, logger, props.sortingMode]);
|
||
const setSortModel = React117.useCallback((model) => {
|
||
const currentModel = gridSortModelSelector(apiRef);
|
||
if (currentModel !== model) {
|
||
logger.debug(`Setting sort model`);
|
||
apiRef.current.setState(mergeStateWithSortModel(model, props.disableMultipleColumnsSorting));
|
||
apiRef.current.forceUpdate();
|
||
apiRef.current.applySorting();
|
||
}
|
||
}, [apiRef, logger, props.disableMultipleColumnsSorting]);
|
||
const sortColumn = React117.useCallback((column, direction, allowMultipleSorting) => {
|
||
if (!column.sortable) {
|
||
return;
|
||
}
|
||
const sortItem = createSortItem(column, direction);
|
||
let sortModel;
|
||
if (!allowMultipleSorting || props.disableMultipleColumnsSorting) {
|
||
sortModel = !sortItem ? [] : [sortItem];
|
||
} else {
|
||
sortModel = upsertSortModel(column.field, sortItem);
|
||
}
|
||
apiRef.current.setSortModel(sortModel);
|
||
}, [apiRef, upsertSortModel, createSortItem, props.disableMultipleColumnsSorting]);
|
||
const getSortModel = React117.useCallback(() => gridSortModelSelector(apiRef), [apiRef]);
|
||
const getSortedRows = React117.useCallback(() => {
|
||
const sortedRows = gridSortedRowEntriesSelector(apiRef);
|
||
return sortedRows.map((row) => row.model);
|
||
}, [apiRef]);
|
||
const getSortedRowIds = React117.useCallback(() => gridSortedRowIdsSelector(apiRef), [apiRef]);
|
||
const getRowIdFromRowIndex = React117.useCallback((index) => apiRef.current.getSortedRowIds()[index], [apiRef]);
|
||
const sortApi = {
|
||
getSortModel,
|
||
getSortedRows,
|
||
getSortedRowIds,
|
||
getRowIdFromRowIndex,
|
||
setSortModel,
|
||
sortColumn,
|
||
applySorting
|
||
};
|
||
useGridApiMethod(apiRef, sortApi, "public");
|
||
const stateExportPreProcessing = React117.useCallback((prevState, context) => {
|
||
var _props$initialState2;
|
||
const sortModelToExport = gridSortModelSelector(apiRef);
|
||
const shouldExportSortModel = (
|
||
// Always export if the `exportOnlyDirtyModels` property is not activated
|
||
!context.exportOnlyDirtyModels || // Always export if the model is controlled
|
||
props.sortModel != null || // Always export if the model has been initialized
|
||
((_props$initialState2 = props.initialState) == null || (_props$initialState2 = _props$initialState2.sorting) == null ? void 0 : _props$initialState2.sortModel) != null || // Export if the model is not empty
|
||
sortModelToExport.length > 0
|
||
);
|
||
if (!shouldExportSortModel) {
|
||
return prevState;
|
||
}
|
||
return _extends({}, prevState, {
|
||
sorting: {
|
||
sortModel: sortModelToExport
|
||
}
|
||
});
|
||
}, [apiRef, props.sortModel, (_props$initialState3 = props.initialState) == null || (_props$initialState3 = _props$initialState3.sorting) == null ? void 0 : _props$initialState3.sortModel]);
|
||
const stateRestorePreProcessing = React117.useCallback((params, context) => {
|
||
var _context$stateToResto;
|
||
const sortModel = (_context$stateToResto = context.stateToRestore.sorting) == null ? void 0 : _context$stateToResto.sortModel;
|
||
if (sortModel == null) {
|
||
return params;
|
||
}
|
||
apiRef.current.setState(mergeStateWithSortModel(sortModel, props.disableMultipleColumnsSorting));
|
||
return _extends({}, params, {
|
||
callbacks: [...params.callbacks, apiRef.current.applySorting]
|
||
});
|
||
}, [apiRef, props.disableMultipleColumnsSorting]);
|
||
const flatSortingMethod = React117.useCallback((params) => {
|
||
const rowTree = gridRowTreeSelector(apiRef);
|
||
const rootGroupNode = rowTree[GRID_ROOT_GROUP_ID];
|
||
const sortedChildren = params.sortRowList ? params.sortRowList(rootGroupNode.children.map((childId) => rowTree[childId])) : [...rootGroupNode.children];
|
||
if (rootGroupNode.footerId != null) {
|
||
sortedChildren.push(rootGroupNode.footerId);
|
||
}
|
||
return sortedChildren;
|
||
}, [apiRef]);
|
||
useGridRegisterPipeProcessor(apiRef, "exportState", stateExportPreProcessing);
|
||
useGridRegisterPipeProcessor(apiRef, "restoreState", stateRestorePreProcessing);
|
||
useGridRegisterStrategyProcessor(apiRef, GRID_DEFAULT_STRATEGY, "sorting", flatSortingMethod);
|
||
const handleColumnHeaderClick = React117.useCallback(({
|
||
colDef
|
||
}, event) => {
|
||
const allowMultipleSorting = event.shiftKey || event.metaKey || event.ctrlKey;
|
||
sortColumn(colDef, void 0, allowMultipleSorting);
|
||
}, [sortColumn]);
|
||
const handleColumnHeaderKeyDown = React117.useCallback(({
|
||
colDef
|
||
}, event) => {
|
||
if (isEnterKey(event.key) && !event.ctrlKey && !event.metaKey) {
|
||
sortColumn(colDef, void 0, event.shiftKey);
|
||
}
|
||
}, [sortColumn]);
|
||
const handleColumnsChange = React117.useCallback(() => {
|
||
const sortModel = gridSortModelSelector(apiRef);
|
||
const latestColumns = gridColumnLookupSelector(apiRef);
|
||
if (sortModel.length > 0) {
|
||
const newModel = sortModel.filter((sortItem) => latestColumns[sortItem.field]);
|
||
if (newModel.length < sortModel.length) {
|
||
apiRef.current.setSortModel(newModel);
|
||
}
|
||
}
|
||
}, [apiRef]);
|
||
const handleStrategyProcessorChange = React117.useCallback((methodName) => {
|
||
if (methodName === "sorting") {
|
||
apiRef.current.applySorting();
|
||
}
|
||
}, [apiRef]);
|
||
useGridRegisterPipeProcessor(apiRef, "columnMenu", addColumnMenuItem);
|
||
useGridApiEventHandler(apiRef, "columnHeaderClick", handleColumnHeaderClick);
|
||
useGridApiEventHandler(apiRef, "columnHeaderKeyDown", handleColumnHeaderKeyDown);
|
||
useGridApiEventHandler(apiRef, "rowsSet", apiRef.current.applySorting);
|
||
useGridApiEventHandler(apiRef, "columnsChange", handleColumnsChange);
|
||
useGridApiEventHandler(apiRef, "activeStrategyProcessorChange", handleStrategyProcessorChange);
|
||
useFirstRender(() => {
|
||
apiRef.current.applySorting();
|
||
});
|
||
useEnhancedEffect_default(() => {
|
||
if (props.sortModel !== void 0) {
|
||
apiRef.current.setSortModel(props.sortModel);
|
||
}
|
||
}, [apiRef, props.sortModel]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/scroll/useGridScroll.js
|
||
var React118 = __toESM(require_react());
|
||
function scrollIntoView(dimensions) {
|
||
const {
|
||
clientHeight,
|
||
scrollTop,
|
||
offsetHeight,
|
||
offsetTop
|
||
} = dimensions;
|
||
const elementBottom = offsetTop + offsetHeight;
|
||
if (offsetHeight > clientHeight) {
|
||
return offsetTop;
|
||
}
|
||
if (elementBottom - clientHeight > scrollTop) {
|
||
return elementBottom - clientHeight;
|
||
}
|
||
if (offsetTop < scrollTop) {
|
||
return offsetTop;
|
||
}
|
||
return void 0;
|
||
}
|
||
var useGridScroll = (apiRef, props) => {
|
||
const theme = useTheme();
|
||
const logger = useGridLogger(apiRef, "useGridScroll");
|
||
const colRef = apiRef.current.columnHeadersElementRef;
|
||
const virtualScrollerRef = apiRef.current.virtualScrollerRef;
|
||
const visibleSortedRows = useGridSelector(apiRef, gridExpandedSortedRowEntriesSelector);
|
||
const scrollToIndexes = React118.useCallback((params) => {
|
||
const totalRowCount = gridRowCountSelector(apiRef);
|
||
const visibleColumns = gridVisibleColumnDefinitionsSelector(apiRef);
|
||
const scrollToHeader = params.rowIndex == null;
|
||
if (!scrollToHeader && totalRowCount === 0 || visibleColumns.length === 0) {
|
||
return false;
|
||
}
|
||
logger.debug(`Scrolling to cell at row ${params.rowIndex}, col: ${params.colIndex} `);
|
||
let scrollCoordinates = {};
|
||
if (params.colIndex != null) {
|
||
const columnPositions = gridColumnPositionsSelector(apiRef);
|
||
let cellWidth;
|
||
if (typeof params.rowIndex !== "undefined") {
|
||
var _visibleSortedRows$pa;
|
||
const rowId = (_visibleSortedRows$pa = visibleSortedRows[params.rowIndex]) == null ? void 0 : _visibleSortedRows$pa.id;
|
||
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, params.colIndex);
|
||
if (cellColSpanInfo && !cellColSpanInfo.spannedByColSpan) {
|
||
cellWidth = cellColSpanInfo.cellProps.width;
|
||
}
|
||
}
|
||
if (typeof cellWidth === "undefined") {
|
||
cellWidth = visibleColumns[params.colIndex].computedWidth;
|
||
}
|
||
scrollCoordinates.left = scrollIntoView({
|
||
clientHeight: virtualScrollerRef.current.clientWidth,
|
||
scrollTop: Math.abs(virtualScrollerRef.current.scrollLeft),
|
||
offsetHeight: cellWidth,
|
||
offsetTop: columnPositions[params.colIndex]
|
||
});
|
||
}
|
||
if (params.rowIndex != null) {
|
||
var _querySelector, _querySelector2;
|
||
const rowsMeta = gridRowsMetaSelector(apiRef.current.state);
|
||
const page = gridPageSelector(apiRef);
|
||
const pageSize = gridPageSizeSelector(apiRef);
|
||
const elementIndex = !props.pagination ? params.rowIndex : params.rowIndex - page * pageSize;
|
||
const targetOffsetHeight = rowsMeta.positions[elementIndex + 1] ? rowsMeta.positions[elementIndex + 1] - rowsMeta.positions[elementIndex] : rowsMeta.currentPageTotalHeight - rowsMeta.positions[elementIndex];
|
||
const topPinnedRowsHeight = ((_querySelector = virtualScrollerRef.current.querySelector(`.${gridClasses["pinnedRows--top"]}`)) == null ? void 0 : _querySelector.clientHeight) || 0;
|
||
const bottomPinnedRowsHeight = ((_querySelector2 = virtualScrollerRef.current.querySelector(`.${gridClasses["pinnedRows--bottom"]}`)) == null ? void 0 : _querySelector2.clientHeight) || 0;
|
||
scrollCoordinates.top = scrollIntoView({
|
||
clientHeight: virtualScrollerRef.current.clientHeight - topPinnedRowsHeight - bottomPinnedRowsHeight,
|
||
scrollTop: virtualScrollerRef.current.scrollTop,
|
||
offsetHeight: targetOffsetHeight,
|
||
offsetTop: rowsMeta.positions[elementIndex]
|
||
});
|
||
}
|
||
scrollCoordinates = apiRef.current.unstable_applyPipeProcessors("scrollToIndexes", scrollCoordinates, params);
|
||
if (typeof scrollCoordinates.left !== void 0 || typeof scrollCoordinates.top !== void 0) {
|
||
apiRef.current.scroll(scrollCoordinates);
|
||
return true;
|
||
}
|
||
return false;
|
||
}, [logger, apiRef, virtualScrollerRef, props.pagination, visibleSortedRows]);
|
||
const scroll = React118.useCallback((params) => {
|
||
if (virtualScrollerRef.current && params.left != null && colRef.current) {
|
||
const direction = theme.direction === "rtl" ? -1 : 1;
|
||
colRef.current.scrollLeft = params.left;
|
||
virtualScrollerRef.current.scrollLeft = direction * params.left;
|
||
logger.debug(`Scrolling left: ${params.left}`);
|
||
}
|
||
if (virtualScrollerRef.current && params.top != null) {
|
||
virtualScrollerRef.current.scrollTop = params.top;
|
||
logger.debug(`Scrolling top: ${params.top}`);
|
||
}
|
||
logger.debug(`Scrolling, updating container, and viewport`);
|
||
}, [virtualScrollerRef, theme.direction, colRef, logger]);
|
||
const getScrollPosition = React118.useCallback(() => {
|
||
if (!(virtualScrollerRef != null && virtualScrollerRef.current)) {
|
||
return {
|
||
top: 0,
|
||
left: 0
|
||
};
|
||
}
|
||
return {
|
||
top: virtualScrollerRef.current.scrollTop,
|
||
left: virtualScrollerRef.current.scrollLeft
|
||
};
|
||
}, [virtualScrollerRef]);
|
||
const scrollApi = {
|
||
scroll,
|
||
scrollToIndexes,
|
||
getScrollPosition
|
||
};
|
||
useGridApiMethod(apiRef, scrollApi, "public");
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/events/useGridEvents.js
|
||
function useGridEvents(apiRef, props) {
|
||
useGridApiOptionHandler(apiRef, "columnHeaderClick", props.onColumnHeaderClick);
|
||
useGridApiOptionHandler(apiRef, "columnHeaderDoubleClick", props.onColumnHeaderDoubleClick);
|
||
useGridApiOptionHandler(apiRef, "columnHeaderOver", props.onColumnHeaderOver);
|
||
useGridApiOptionHandler(apiRef, "columnHeaderOut", props.onColumnHeaderOut);
|
||
useGridApiOptionHandler(apiRef, "columnHeaderEnter", props.onColumnHeaderEnter);
|
||
useGridApiOptionHandler(apiRef, "columnHeaderLeave", props.onColumnHeaderLeave);
|
||
useGridApiOptionHandler(apiRef, "cellClick", props.onCellClick);
|
||
useGridApiOptionHandler(apiRef, "cellDoubleClick", props.onCellDoubleClick);
|
||
useGridApiOptionHandler(apiRef, "cellKeyDown", props.onCellKeyDown);
|
||
useGridApiOptionHandler(apiRef, "preferencePanelClose", props.onPreferencePanelClose);
|
||
useGridApiOptionHandler(apiRef, "preferencePanelOpen", props.onPreferencePanelOpen);
|
||
useGridApiOptionHandler(apiRef, "menuOpen", props.onMenuOpen);
|
||
useGridApiOptionHandler(apiRef, "menuClose", props.onMenuClose);
|
||
useGridApiOptionHandler(apiRef, "rowDoubleClick", props.onRowDoubleClick);
|
||
useGridApiOptionHandler(apiRef, "rowClick", props.onRowClick);
|
||
useGridApiOptionHandler(apiRef, "stateChange", props.onStateChange);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/dimensions/useGridDimensions.js
|
||
var React119 = __toESM(require_react());
|
||
var isTestEnvironment = false;
|
||
var hasScroll = ({
|
||
content,
|
||
container,
|
||
scrollBarSize
|
||
}) => {
|
||
const hasScrollXIfNoYScrollBar = content.width > container.width;
|
||
const hasScrollYIfNoXScrollBar = content.height > container.height;
|
||
let hasScrollX = false;
|
||
let hasScrollY = false;
|
||
if (hasScrollXIfNoYScrollBar || hasScrollYIfNoXScrollBar) {
|
||
hasScrollX = hasScrollXIfNoYScrollBar;
|
||
hasScrollY = content.height + (hasScrollX ? scrollBarSize : 0) > container.height;
|
||
if (hasScrollY) {
|
||
hasScrollX = content.width + scrollBarSize > container.width;
|
||
}
|
||
}
|
||
return {
|
||
hasScrollX,
|
||
hasScrollY
|
||
};
|
||
};
|
||
function useGridDimensions(apiRef, props) {
|
||
const logger = useGridLogger(apiRef, "useResizeContainer");
|
||
const errorShown = React119.useRef(false);
|
||
const rootDimensionsRef = React119.useRef(null);
|
||
const fullDimensionsRef = React119.useRef(null);
|
||
const rowsMeta = useGridSelector(apiRef, gridRowsMetaSelector);
|
||
const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);
|
||
const rowHeight = Math.floor(props.rowHeight * densityFactor);
|
||
const totalHeaderHeight = getTotalHeaderHeight(apiRef, props.columnHeaderHeight);
|
||
const updateGridDimensionsRef = React119.useCallback(() => {
|
||
var _apiRef$current$rootE;
|
||
const rootElement = (_apiRef$current$rootE = apiRef.current.rootElementRef) == null ? void 0 : _apiRef$current$rootE.current;
|
||
const columnsTotalWidth = gridColumnsTotalWidthSelector(apiRef);
|
||
const pinnedRowsHeight = calculatePinnedRowsHeight(apiRef);
|
||
if (!rootDimensionsRef.current) {
|
||
return;
|
||
}
|
||
let scrollBarSize;
|
||
if (props.scrollbarSize != null) {
|
||
scrollBarSize = props.scrollbarSize;
|
||
} else if (!columnsTotalWidth || !rootElement) {
|
||
scrollBarSize = 0;
|
||
} else {
|
||
const doc = ownerDocument(rootElement);
|
||
const scrollDiv = doc.createElement("div");
|
||
scrollDiv.style.width = "99px";
|
||
scrollDiv.style.height = "99px";
|
||
scrollDiv.style.position = "absolute";
|
||
scrollDiv.style.overflow = "scroll";
|
||
scrollDiv.className = "scrollDiv";
|
||
rootElement.appendChild(scrollDiv);
|
||
scrollBarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
||
rootElement.removeChild(scrollDiv);
|
||
}
|
||
let viewportOuterSize;
|
||
let hasScrollX;
|
||
let hasScrollY;
|
||
if (props.autoHeight) {
|
||
hasScrollY = false;
|
||
hasScrollX = Math.round(columnsTotalWidth) > Math.round(rootDimensionsRef.current.width);
|
||
viewportOuterSize = {
|
||
width: rootDimensionsRef.current.width,
|
||
height: rowsMeta.currentPageTotalHeight + (hasScrollX ? scrollBarSize : 0)
|
||
};
|
||
} else {
|
||
viewportOuterSize = {
|
||
width: rootDimensionsRef.current.width,
|
||
height: Math.max(rootDimensionsRef.current.height - totalHeaderHeight, 0)
|
||
};
|
||
const scrollInformation = hasScroll({
|
||
content: {
|
||
width: Math.round(columnsTotalWidth),
|
||
height: rowsMeta.currentPageTotalHeight
|
||
},
|
||
container: {
|
||
width: Math.round(viewportOuterSize.width),
|
||
height: viewportOuterSize.height - pinnedRowsHeight.top - pinnedRowsHeight.bottom
|
||
},
|
||
scrollBarSize
|
||
});
|
||
hasScrollY = scrollInformation.hasScrollY;
|
||
hasScrollX = scrollInformation.hasScrollX;
|
||
}
|
||
const viewportInnerSize = {
|
||
width: viewportOuterSize.width - (hasScrollY ? scrollBarSize : 0),
|
||
height: viewportOuterSize.height - (hasScrollX ? scrollBarSize : 0)
|
||
};
|
||
const newFullDimensions = {
|
||
viewportOuterSize,
|
||
viewportInnerSize,
|
||
hasScrollX,
|
||
hasScrollY,
|
||
scrollBarSize
|
||
};
|
||
const prevDimensions = fullDimensionsRef.current;
|
||
fullDimensionsRef.current = newFullDimensions;
|
||
if (newFullDimensions.viewportInnerSize.width !== (prevDimensions == null ? void 0 : prevDimensions.viewportInnerSize.width) || newFullDimensions.viewportInnerSize.height !== (prevDimensions == null ? void 0 : prevDimensions.viewportInnerSize.height)) {
|
||
apiRef.current.publishEvent("viewportInnerSizeChange", newFullDimensions.viewportInnerSize);
|
||
}
|
||
}, [apiRef, props.scrollbarSize, props.autoHeight, rowsMeta.currentPageTotalHeight, totalHeaderHeight]);
|
||
const [savedSize, setSavedSize] = React119.useState();
|
||
const debouncedSetSavedSize = React119.useMemo(() => debounce(setSavedSize, 60), []);
|
||
const previousSize = React119.useRef();
|
||
useEnhancedEffect_default(() => {
|
||
if (savedSize) {
|
||
updateGridDimensionsRef();
|
||
apiRef.current.publishEvent("debouncedResize", rootDimensionsRef.current);
|
||
}
|
||
}, [apiRef, savedSize, updateGridDimensionsRef]);
|
||
const resize = React119.useCallback(() => {
|
||
apiRef.current.computeSizeAndPublishResizeEvent();
|
||
}, [apiRef]);
|
||
const getRootDimensions = React119.useCallback(() => fullDimensionsRef.current, []);
|
||
const getViewportPageSize = React119.useCallback(() => {
|
||
const dimensions = apiRef.current.getRootDimensions();
|
||
if (!dimensions) {
|
||
return 0;
|
||
}
|
||
const currentPage = getVisibleRows(apiRef, {
|
||
pagination: props.pagination,
|
||
paginationMode: props.paginationMode
|
||
});
|
||
if (props.getRowHeight) {
|
||
const renderContext = apiRef.current.getRenderContext();
|
||
const viewportPageSize = renderContext.lastRowIndex - renderContext.firstRowIndex;
|
||
return Math.min(viewportPageSize - 1, currentPage.rows.length);
|
||
}
|
||
const maximumPageSizeWithoutScrollBar = Math.floor(dimensions.viewportInnerSize.height / rowHeight);
|
||
return Math.min(maximumPageSizeWithoutScrollBar, currentPage.rows.length);
|
||
}, [apiRef, props.pagination, props.paginationMode, props.getRowHeight, rowHeight]);
|
||
const computeSizeAndPublishResizeEvent = React119.useCallback(() => {
|
||
var _apiRef$current$mainE, _previousSize$current, _previousSize$current2;
|
||
const mainEl = (_apiRef$current$mainE = apiRef.current.mainElementRef) == null ? void 0 : _apiRef$current$mainE.current;
|
||
if (!mainEl) {
|
||
return;
|
||
}
|
||
const win = ownerWindow(mainEl);
|
||
const computedStyle = win.getComputedStyle(mainEl);
|
||
const height = parseFloat(computedStyle.height) || 0;
|
||
const width = parseFloat(computedStyle.width) || 0;
|
||
const hasHeightChanged = height !== ((_previousSize$current = previousSize.current) == null ? void 0 : _previousSize$current.height);
|
||
const hasWidthChanged = width !== ((_previousSize$current2 = previousSize.current) == null ? void 0 : _previousSize$current2.width);
|
||
if (!previousSize.current || hasHeightChanged || hasWidthChanged) {
|
||
const size = {
|
||
width,
|
||
height
|
||
};
|
||
apiRef.current.publishEvent("resize", size);
|
||
previousSize.current = size;
|
||
}
|
||
}, [apiRef]);
|
||
const dimensionsApi = {
|
||
resize,
|
||
getRootDimensions
|
||
};
|
||
const dimensionsPrivateApi = {
|
||
getViewportPageSize,
|
||
updateGridDimensionsRef,
|
||
computeSizeAndPublishResizeEvent
|
||
};
|
||
useGridApiMethod(apiRef, dimensionsApi, "public");
|
||
useGridApiMethod(apiRef, dimensionsPrivateApi, "private");
|
||
const isFirstSizing = React119.useRef(true);
|
||
const handleResize = React119.useCallback((size) => {
|
||
rootDimensionsRef.current = size;
|
||
const isJSDOM = /jsdom/.test(window.navigator.userAgent);
|
||
if (size.height === 0 && !errorShown.current && !props.autoHeight && !isJSDOM) {
|
||
logger.error(["The parent DOM element of the data grid has an empty height.", "Please make sure that this element has an intrinsic height.", "The grid displays with a height of 0px.", "", "More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n"));
|
||
errorShown.current = true;
|
||
}
|
||
if (size.width === 0 && !errorShown.current && !isJSDOM) {
|
||
logger.error(["The parent DOM element of the data grid has an empty width.", "Please make sure that this element has an intrinsic width.", "The grid displays with a width of 0px.", "", "More details: https://mui.com/r/x-data-grid-no-dimensions."].join("\n"));
|
||
errorShown.current = true;
|
||
}
|
||
if (isTestEnvironment) {
|
||
setSavedSize(size);
|
||
isFirstSizing.current = false;
|
||
return;
|
||
}
|
||
if (isFirstSizing.current) {
|
||
setSavedSize(size);
|
||
isFirstSizing.current = false;
|
||
return;
|
||
}
|
||
debouncedSetSavedSize(size);
|
||
}, [props.autoHeight, debouncedSetSavedSize, logger]);
|
||
useEnhancedEffect_default(() => updateGridDimensionsRef(), [updateGridDimensionsRef]);
|
||
useGridApiOptionHandler(apiRef, "sortedRowsSet", updateGridDimensionsRef);
|
||
useGridApiOptionHandler(apiRef, "paginationModelChange", updateGridDimensionsRef);
|
||
useGridApiOptionHandler(apiRef, "columnsChange", updateGridDimensionsRef);
|
||
useGridApiEventHandler(apiRef, "resize", handleResize);
|
||
useGridApiOptionHandler(apiRef, "debouncedResize", props.onResize);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rows/useGridRowsMeta.js
|
||
init_extends();
|
||
var React131 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/DataGrid/useDataGridProps.js
|
||
init_extends();
|
||
var React130 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/constants/defaultGridSlotsComponents.js
|
||
init_extends();
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridColumnHeaders.js
|
||
init_extends();
|
||
var React125 = __toESM(require_react());
|
||
var import_prop_types57 = __toESM(require_prop_types());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columnHeaders/useGridColumnHeaders.js
|
||
init_extends();
|
||
var React122 = __toESM(require_react());
|
||
var ReactDOM2 = __toESM(require_react_dom());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/virtualization/useGridVirtualScroller.js
|
||
init_extends();
|
||
var React120 = __toESM(require_react());
|
||
var ReactDOM = __toESM(require_react_dom());
|
||
var import_jsx_runtime98 = __toESM(require_jsx_runtime());
|
||
var _excluded55 = ["style"];
|
||
var _excluded214 = ["style"];
|
||
function binarySearch(offset, positions, sliceStart = 0, sliceEnd = positions.length) {
|
||
if (positions.length <= 0) {
|
||
return -1;
|
||
}
|
||
if (sliceStart >= sliceEnd) {
|
||
return sliceStart;
|
||
}
|
||
const pivot = sliceStart + Math.floor((sliceEnd - sliceStart) / 2);
|
||
const itemOffset = positions[pivot];
|
||
return offset <= itemOffset ? binarySearch(offset, positions, sliceStart, pivot) : binarySearch(offset, positions, pivot + 1, sliceEnd);
|
||
}
|
||
function exponentialSearch(offset, positions, index) {
|
||
let interval = 1;
|
||
while (index < positions.length && Math.abs(positions[index]) < offset) {
|
||
index += interval;
|
||
interval *= 2;
|
||
}
|
||
return binarySearch(offset, positions, Math.floor(index / 2), Math.min(index, positions.length));
|
||
}
|
||
var getRenderableIndexes = ({
|
||
firstIndex,
|
||
lastIndex,
|
||
buffer,
|
||
minFirstIndex,
|
||
maxLastIndex
|
||
}) => {
|
||
return [clamp(firstIndex - buffer, minFirstIndex, maxLastIndex), clamp(lastIndex + buffer, minFirstIndex, maxLastIndex)];
|
||
};
|
||
var areRenderContextsEqual = (context1, context2) => {
|
||
if (context1 === context2) {
|
||
return true;
|
||
}
|
||
return context1.firstRowIndex === context2.firstRowIndex && context1.lastRowIndex === context2.lastRowIndex && context1.firstColumnIndex === context2.firstColumnIndex && context1.lastColumnIndex === context2.lastColumnIndex;
|
||
};
|
||
var MEMOIZE_OPTIONS = {
|
||
maxSize: 3
|
||
};
|
||
var useGridVirtualScroller = (props) => {
|
||
const apiRef = useGridPrivateApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
|
||
const enabled = useGridSelector(apiRef, gridVirtualizationEnabledSelector);
|
||
const enabledForColumns = useGridSelector(apiRef, gridVirtualizationColumnEnabledSelector);
|
||
const {
|
||
ref,
|
||
onRenderZonePositioning,
|
||
renderZoneMinColumnIndex = 0,
|
||
renderZoneMaxColumnIndex = visibleColumns.length,
|
||
getRowProps
|
||
} = props;
|
||
const theme = useTheme();
|
||
const columnPositions = useGridSelector(apiRef, gridColumnPositionsSelector);
|
||
const columnsTotalWidth = useGridSelector(apiRef, gridColumnsTotalWidthSelector);
|
||
const cellFocus = useGridSelector(apiRef, gridFocusCellSelector);
|
||
const cellTabIndex = useGridSelector(apiRef, gridTabIndexCellSelector);
|
||
const rowsMeta = useGridSelector(apiRef, gridRowsMetaSelector);
|
||
const selectedRowsLookup = useGridSelector(apiRef, selectedIdsLookupSelector);
|
||
const currentPage = useGridVisibleRows(apiRef, rootProps);
|
||
const renderZoneRef = React120.useRef(null);
|
||
const rootRef = React120.useRef(null);
|
||
const handleRef = useForkRef(ref, rootRef);
|
||
const [renderContext, setRenderContextState] = React120.useState(null);
|
||
const prevRenderContext = React120.useRef(renderContext);
|
||
const scrollPosition = React120.useRef({
|
||
top: 0,
|
||
left: 0
|
||
});
|
||
const [containerDimensions, setContainerDimensions] = React120.useState({
|
||
width: null,
|
||
height: null
|
||
});
|
||
const prevTotalWidth = React120.useRef(columnsTotalWidth);
|
||
const [hoveredRowId, setHoveredRowId] = React120.useState(null);
|
||
const rowStyleCache = React120.useRef(/* @__PURE__ */ Object.create(null));
|
||
const prevGetRowProps = React120.useRef();
|
||
const prevRootRowStyle = React120.useRef();
|
||
const getRenderedColumnsRef = React120.useRef(defaultMemoize((columns, firstColumnToRender, lastColumnToRender, minFirstColumn, maxLastColumn, indexOfColumnWithFocusedCell2) => {
|
||
let focusedCellColumnIndexNotInRange;
|
||
const renderedColumns = columns.slice(firstColumnToRender, lastColumnToRender);
|
||
if (indexOfColumnWithFocusedCell2 > -1) {
|
||
if (firstColumnToRender > indexOfColumnWithFocusedCell2 && indexOfColumnWithFocusedCell2 >= minFirstColumn) {
|
||
focusedCellColumnIndexNotInRange = indexOfColumnWithFocusedCell2;
|
||
} else if (lastColumnToRender < indexOfColumnWithFocusedCell2 && indexOfColumnWithFocusedCell2 < maxLastColumn) {
|
||
focusedCellColumnIndexNotInRange = indexOfColumnWithFocusedCell2;
|
||
}
|
||
}
|
||
return {
|
||
focusedCellColumnIndexNotInRange,
|
||
renderedColumns
|
||
};
|
||
}, MEMOIZE_OPTIONS));
|
||
const indexOfColumnWithFocusedCell = React120.useMemo(() => {
|
||
if (cellFocus !== null) {
|
||
return visibleColumns.findIndex((column) => column.field === cellFocus.field);
|
||
}
|
||
return -1;
|
||
}, [cellFocus, visibleColumns]);
|
||
const computeRenderContext = React120.useCallback(() => {
|
||
if (!enabled) {
|
||
return {
|
||
firstRowIndex: 0,
|
||
lastRowIndex: currentPage.rows.length,
|
||
firstColumnIndex: 0,
|
||
lastColumnIndex: visibleColumns.length
|
||
};
|
||
}
|
||
const {
|
||
top,
|
||
left
|
||
} = scrollPosition.current;
|
||
const firstRowIndex = Math.min(getNearestIndexToRender(apiRef, currentPage, rowsMeta, top), rowsMeta.positions.length - 1);
|
||
const lastRowIndex = rootProps.autoHeight ? firstRowIndex + currentPage.rows.length : getNearestIndexToRender(apiRef, currentPage, rowsMeta, top + containerDimensions.height);
|
||
let firstColumnIndex = 0;
|
||
let lastColumnIndex = columnPositions.length;
|
||
if (enabledForColumns) {
|
||
let hasRowWithAutoHeight = false;
|
||
const [firstRowToRender, lastRowToRender] = getRenderableIndexes({
|
||
firstIndex: firstRowIndex,
|
||
lastIndex: lastRowIndex,
|
||
minFirstIndex: 0,
|
||
maxLastIndex: currentPage.rows.length,
|
||
buffer: rootProps.rowBuffer
|
||
});
|
||
for (let i = firstRowToRender; i < lastRowToRender && !hasRowWithAutoHeight; i += 1) {
|
||
const row = currentPage.rows[i];
|
||
hasRowWithAutoHeight = apiRef.current.rowHasAutoHeight(row.id);
|
||
}
|
||
if (!hasRowWithAutoHeight) {
|
||
firstColumnIndex = binarySearch(Math.abs(left), columnPositions);
|
||
lastColumnIndex = binarySearch(Math.abs(left) + containerDimensions.width, columnPositions);
|
||
}
|
||
}
|
||
return {
|
||
firstRowIndex,
|
||
lastRowIndex,
|
||
firstColumnIndex,
|
||
lastColumnIndex
|
||
};
|
||
}, [enabled, enabledForColumns, rowsMeta, rootProps.autoHeight, rootProps.rowBuffer, currentPage, columnPositions, visibleColumns.length, apiRef, containerDimensions]);
|
||
useEnhancedEffect_default(() => {
|
||
if (enabled) {
|
||
rootRef.current.scrollLeft = 0;
|
||
rootRef.current.scrollTop = 0;
|
||
} else {
|
||
renderZoneRef.current.style.transform = `translate3d(0px, 0px, 0px)`;
|
||
}
|
||
}, [enabled]);
|
||
useEnhancedEffect_default(() => {
|
||
setContainerDimensions({
|
||
width: rootRef.current.clientWidth,
|
||
height: rootRef.current.clientHeight
|
||
});
|
||
}, [rowsMeta.currentPageTotalHeight]);
|
||
const handleResize = React120.useCallback(() => {
|
||
if (rootRef.current) {
|
||
setContainerDimensions({
|
||
width: rootRef.current.clientWidth,
|
||
height: rootRef.current.clientHeight
|
||
});
|
||
}
|
||
}, []);
|
||
useGridApiEventHandler(apiRef, "debouncedResize", handleResize);
|
||
const updateRenderZonePosition = React120.useCallback((nextRenderContext) => {
|
||
const [firstRowToRender, lastRowToRender] = getRenderableIndexes({
|
||
firstIndex: nextRenderContext.firstRowIndex,
|
||
lastIndex: nextRenderContext.lastRowIndex,
|
||
minFirstIndex: 0,
|
||
maxLastIndex: currentPage.rows.length,
|
||
buffer: rootProps.rowBuffer
|
||
});
|
||
const [initialFirstColumnToRender] = getRenderableIndexes({
|
||
firstIndex: nextRenderContext.firstColumnIndex,
|
||
lastIndex: nextRenderContext.lastColumnIndex,
|
||
minFirstIndex: renderZoneMinColumnIndex,
|
||
maxLastIndex: renderZoneMaxColumnIndex,
|
||
buffer: rootProps.columnBuffer
|
||
});
|
||
const firstColumnToRender = getFirstNonSpannedColumnToRender({
|
||
firstColumnToRender: initialFirstColumnToRender,
|
||
apiRef,
|
||
firstRowToRender,
|
||
lastRowToRender,
|
||
visibleRows: currentPage.rows
|
||
});
|
||
const direction = theme.direction === "ltr" ? 1 : -1;
|
||
const top = gridRowsMetaSelector(apiRef.current.state).positions[firstRowToRender];
|
||
const left = direction * gridColumnPositionsSelector(apiRef)[firstColumnToRender];
|
||
renderZoneRef.current.style.transform = `translate3d(${left}px, ${top}px, 0px)`;
|
||
if (typeof onRenderZonePositioning === "function") {
|
||
onRenderZonePositioning({
|
||
top,
|
||
left
|
||
});
|
||
}
|
||
}, [apiRef, currentPage.rows, onRenderZonePositioning, renderZoneMinColumnIndex, renderZoneMaxColumnIndex, rootProps.columnBuffer, rootProps.rowBuffer, theme.direction]);
|
||
const getRenderContext = React120.useCallback(() => prevRenderContext.current, []);
|
||
const setRenderContext = React120.useCallback((nextRenderContext) => {
|
||
if (prevRenderContext.current && areRenderContextsEqual(nextRenderContext, prevRenderContext.current)) {
|
||
updateRenderZonePosition(nextRenderContext);
|
||
return;
|
||
}
|
||
setRenderContextState(nextRenderContext);
|
||
updateRenderZonePosition(nextRenderContext);
|
||
const [firstRowToRender, lastRowToRender] = getRenderableIndexes({
|
||
firstIndex: nextRenderContext.firstRowIndex,
|
||
lastIndex: nextRenderContext.lastRowIndex,
|
||
minFirstIndex: 0,
|
||
maxLastIndex: currentPage.rows.length,
|
||
buffer: rootProps.rowBuffer
|
||
});
|
||
apiRef.current.publishEvent("renderedRowsIntervalChange", {
|
||
firstRowToRender,
|
||
lastRowToRender
|
||
});
|
||
prevRenderContext.current = nextRenderContext;
|
||
}, [apiRef, setRenderContextState, prevRenderContext, currentPage.rows.length, rootProps.rowBuffer, updateRenderZonePosition]);
|
||
useEnhancedEffect_default(() => {
|
||
if (containerDimensions.width == null) {
|
||
return;
|
||
}
|
||
const initialRenderContext = computeRenderContext();
|
||
setRenderContext(initialRenderContext);
|
||
const {
|
||
top,
|
||
left
|
||
} = scrollPosition.current;
|
||
const params = {
|
||
top,
|
||
left,
|
||
renderContext: initialRenderContext
|
||
};
|
||
apiRef.current.publishEvent("scrollPositionChange", params);
|
||
}, [apiRef, computeRenderContext, containerDimensions.width, setRenderContext]);
|
||
const handleScroll = useEventCallback_default((event) => {
|
||
const {
|
||
scrollTop,
|
||
scrollLeft
|
||
} = event.currentTarget;
|
||
scrollPosition.current.top = scrollTop;
|
||
scrollPosition.current.left = scrollLeft;
|
||
if (!prevRenderContext.current || scrollTop < 0) {
|
||
return;
|
||
}
|
||
if (theme.direction === "ltr") {
|
||
if (scrollLeft < 0) {
|
||
return;
|
||
}
|
||
}
|
||
if (theme.direction === "rtl") {
|
||
if (scrollLeft > 0) {
|
||
return;
|
||
}
|
||
}
|
||
const nextRenderContext = enabled ? computeRenderContext() : prevRenderContext.current;
|
||
const topRowsScrolledSincePreviousRender = Math.abs(nextRenderContext.firstRowIndex - prevRenderContext.current.firstRowIndex);
|
||
const bottomRowsScrolledSincePreviousRender = Math.abs(nextRenderContext.lastRowIndex - prevRenderContext.current.lastRowIndex);
|
||
const topColumnsScrolledSincePreviousRender = Math.abs(nextRenderContext.firstColumnIndex - prevRenderContext.current.firstColumnIndex);
|
||
const bottomColumnsScrolledSincePreviousRender = Math.abs(nextRenderContext.lastColumnIndex - prevRenderContext.current.lastColumnIndex);
|
||
const shouldSetState = topRowsScrolledSincePreviousRender >= rootProps.rowThreshold || bottomRowsScrolledSincePreviousRender >= rootProps.rowThreshold || topColumnsScrolledSincePreviousRender >= rootProps.columnThreshold || bottomColumnsScrolledSincePreviousRender >= rootProps.columnThreshold || prevTotalWidth.current !== columnsTotalWidth;
|
||
apiRef.current.publishEvent("scrollPositionChange", {
|
||
top: scrollTop,
|
||
left: scrollLeft,
|
||
renderContext: shouldSetState ? nextRenderContext : prevRenderContext.current
|
||
}, event);
|
||
if (shouldSetState) {
|
||
ReactDOM.flushSync(() => {
|
||
setRenderContext(nextRenderContext);
|
||
});
|
||
prevTotalWidth.current = columnsTotalWidth;
|
||
}
|
||
});
|
||
const handleWheel = useEventCallback_default((event) => {
|
||
apiRef.current.publishEvent("virtualScrollerWheel", {}, event);
|
||
});
|
||
const handleTouchMove = useEventCallback_default((event) => {
|
||
apiRef.current.publishEvent("virtualScrollerTouchMove", {}, event);
|
||
});
|
||
const indexOfRowWithFocusedCell = React120.useMemo(() => {
|
||
if (cellFocus !== null) {
|
||
return currentPage.rows.findIndex((row) => row.id === cellFocus.id);
|
||
}
|
||
return -1;
|
||
}, [cellFocus, currentPage.rows]);
|
||
useGridApiEventHandler(apiRef, "rowMouseOver", (params, event) => {
|
||
var _params$id;
|
||
if (event.currentTarget.contains(event.relatedTarget)) {
|
||
return;
|
||
}
|
||
setHoveredRowId((_params$id = params.id) != null ? _params$id : null);
|
||
});
|
||
useGridApiEventHandler(apiRef, "rowMouseOut", (params, event) => {
|
||
if (event.currentTarget.contains(event.relatedTarget)) {
|
||
return;
|
||
}
|
||
setHoveredRowId(null);
|
||
});
|
||
const getRows = (params = {
|
||
renderContext
|
||
}) => {
|
||
var _rootProps$slotProps;
|
||
const {
|
||
onRowRender,
|
||
renderContext: nextRenderContext,
|
||
minFirstColumn = renderZoneMinColumnIndex,
|
||
maxLastColumn = renderZoneMaxColumnIndex,
|
||
availableSpace = containerDimensions.width,
|
||
rowIndexOffset = 0,
|
||
position = "center"
|
||
} = params;
|
||
if (!nextRenderContext || availableSpace == null) {
|
||
return null;
|
||
}
|
||
const rowBuffer = enabled ? rootProps.rowBuffer : 0;
|
||
const columnBuffer = enabled ? rootProps.columnBuffer : 0;
|
||
const [firstRowToRender, lastRowToRender] = getRenderableIndexes({
|
||
firstIndex: nextRenderContext.firstRowIndex,
|
||
lastIndex: nextRenderContext.lastRowIndex,
|
||
minFirstIndex: 0,
|
||
maxLastIndex: currentPage.rows.length,
|
||
buffer: rowBuffer
|
||
});
|
||
const renderedRows = [];
|
||
if (params.rows) {
|
||
params.rows.forEach((row) => {
|
||
renderedRows.push(row);
|
||
apiRef.current.calculateColSpan({
|
||
rowId: row.id,
|
||
minFirstColumn,
|
||
maxLastColumn,
|
||
columns: visibleColumns
|
||
});
|
||
});
|
||
} else {
|
||
if (!currentPage.range) {
|
||
return null;
|
||
}
|
||
for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
|
||
const row = currentPage.rows[i];
|
||
renderedRows.push(row);
|
||
apiRef.current.calculateColSpan({
|
||
rowId: row.id,
|
||
minFirstColumn,
|
||
maxLastColumn,
|
||
columns: visibleColumns
|
||
});
|
||
}
|
||
}
|
||
let isRowWithFocusedCellNotInRange = false;
|
||
if (indexOfRowWithFocusedCell > -1) {
|
||
const rowWithFocusedCell = currentPage.rows[indexOfRowWithFocusedCell];
|
||
if (firstRowToRender > indexOfRowWithFocusedCell || lastRowToRender < indexOfRowWithFocusedCell) {
|
||
isRowWithFocusedCellNotInRange = true;
|
||
if (indexOfRowWithFocusedCell > firstRowToRender) {
|
||
renderedRows.push(rowWithFocusedCell);
|
||
} else {
|
||
renderedRows.unshift(rowWithFocusedCell);
|
||
}
|
||
apiRef.current.calculateColSpan({
|
||
rowId: rowWithFocusedCell.id,
|
||
minFirstColumn,
|
||
maxLastColumn,
|
||
columns: visibleColumns
|
||
});
|
||
}
|
||
}
|
||
const [initialFirstColumnToRender, lastColumnToRender] = getRenderableIndexes({
|
||
firstIndex: nextRenderContext.firstColumnIndex,
|
||
lastIndex: nextRenderContext.lastColumnIndex,
|
||
minFirstIndex: minFirstColumn,
|
||
maxLastIndex: maxLastColumn,
|
||
buffer: columnBuffer
|
||
});
|
||
const firstColumnToRender = getFirstNonSpannedColumnToRender({
|
||
firstColumnToRender: initialFirstColumnToRender,
|
||
apiRef,
|
||
firstRowToRender,
|
||
lastRowToRender,
|
||
visibleRows: currentPage.rows
|
||
});
|
||
let isColumnWihFocusedCellNotInRange = false;
|
||
if (firstColumnToRender > indexOfColumnWithFocusedCell || lastColumnToRender < indexOfColumnWithFocusedCell) {
|
||
isColumnWihFocusedCellNotInRange = true;
|
||
}
|
||
const {
|
||
focusedCellColumnIndexNotInRange,
|
||
renderedColumns
|
||
} = getRenderedColumnsRef.current(visibleColumns, firstColumnToRender, lastColumnToRender, minFirstColumn, maxLastColumn, isColumnWihFocusedCellNotInRange ? indexOfColumnWithFocusedCell : -1);
|
||
const _ref = ((_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.row) || {}, {
|
||
style: rootRowStyle
|
||
} = _ref, rootRowProps = _objectWithoutPropertiesLoose(_ref, _excluded55);
|
||
const invalidatesCachedRowStyle = prevGetRowProps.current !== getRowProps || prevRootRowStyle.current !== rootRowStyle;
|
||
if (invalidatesCachedRowStyle) {
|
||
rowStyleCache.current = /* @__PURE__ */ Object.create(null);
|
||
}
|
||
const rows = [];
|
||
let isRowWithFocusedCellRendered = false;
|
||
for (let i = 0; i < renderedRows.length; i += 1) {
|
||
var _currentPage$range;
|
||
const {
|
||
id,
|
||
model
|
||
} = renderedRows[i];
|
||
const isRowNotVisible = isRowWithFocusedCellNotInRange && cellFocus.id === id;
|
||
const lastVisibleRowIndex = isRowWithFocusedCellNotInRange ? firstRowToRender + i === currentPage.rows.length : firstRowToRender + i === currentPage.rows.length - 1;
|
||
const baseRowHeight = !apiRef.current.rowHasAutoHeight(id) ? apiRef.current.unstable_getRowHeight(id) : "auto";
|
||
let isSelected;
|
||
if (selectedRowsLookup[id] == null) {
|
||
isSelected = false;
|
||
} else {
|
||
isSelected = apiRef.current.isRowSelectable(id);
|
||
}
|
||
if (onRowRender) {
|
||
onRowRender(id);
|
||
}
|
||
const focusedCell = cellFocus !== null && cellFocus.id === id ? cellFocus.field : null;
|
||
const columnWithFocusedCellNotInRange = focusedCellColumnIndexNotInRange !== void 0 && visibleColumns[focusedCellColumnIndexNotInRange];
|
||
const renderedColumnsWithFocusedCell = columnWithFocusedCellNotInRange && focusedCell ? [columnWithFocusedCellNotInRange, ...renderedColumns] : renderedColumns;
|
||
let tabbableCell = null;
|
||
if (cellTabIndex !== null && cellTabIndex.id === id) {
|
||
const cellParams = apiRef.current.getCellParams(id, cellTabIndex.field);
|
||
tabbableCell = cellParams.cellMode === "view" ? cellTabIndex.field : null;
|
||
}
|
||
const _ref2 = typeof getRowProps === "function" && getRowProps(id, model) || {}, {
|
||
style: rowStyle
|
||
} = _ref2, rowProps = _objectWithoutPropertiesLoose(_ref2, _excluded214);
|
||
if (!rowStyleCache.current[id]) {
|
||
const style = _extends({}, rowStyle, rootRowStyle);
|
||
rowStyleCache.current[id] = style;
|
||
}
|
||
let index = rowIndexOffset + ((currentPage == null || (_currentPage$range = currentPage.range) == null ? void 0 : _currentPage$range.firstRowIndex) || 0) + firstRowToRender + i;
|
||
if (isRowWithFocusedCellNotInRange && (cellFocus == null ? void 0 : cellFocus.id) === id) {
|
||
index = indexOfRowWithFocusedCell;
|
||
isRowWithFocusedCellRendered = true;
|
||
} else if (isRowWithFocusedCellRendered) {
|
||
index -= 1;
|
||
}
|
||
rows.push((0, import_jsx_runtime98.jsx)(rootProps.slots.row, _extends({
|
||
row: model,
|
||
rowId: id,
|
||
focusedCellColumnIndexNotInRange,
|
||
isNotVisible: isRowNotVisible,
|
||
rowHeight: baseRowHeight,
|
||
focusedCell,
|
||
tabbableCell,
|
||
renderedColumns: renderedColumnsWithFocusedCell,
|
||
visibleColumns,
|
||
firstColumnToRender,
|
||
lastColumnToRender,
|
||
selected: isSelected,
|
||
index,
|
||
containerWidth: availableSpace,
|
||
isLastVisible: lastVisibleRowIndex,
|
||
position
|
||
}, rowProps, rootRowProps, {
|
||
hovered: hoveredRowId === id,
|
||
style: rowStyleCache.current[id]
|
||
}), id));
|
||
}
|
||
prevGetRowProps.current = getRowProps;
|
||
prevRootRowStyle.current = rootRowStyle;
|
||
return rows;
|
||
};
|
||
const needsHorizontalScrollbar = containerDimensions.width && columnsTotalWidth >= containerDimensions.width;
|
||
const contentSize = React120.useMemo(() => {
|
||
const height = Math.max(rowsMeta.currentPageTotalHeight, 1);
|
||
let shouldExtendContent = false;
|
||
if (rootRef != null && rootRef.current && height <= (rootRef == null ? void 0 : rootRef.current.clientHeight)) {
|
||
shouldExtendContent = true;
|
||
}
|
||
const size = {
|
||
width: needsHorizontalScrollbar ? columnsTotalWidth : "auto",
|
||
height,
|
||
minHeight: shouldExtendContent ? "100%" : "auto"
|
||
};
|
||
if (rootProps.autoHeight && currentPage.rows.length === 0) {
|
||
size.height = getMinimalContentHeight(apiRef, rootProps.rowHeight);
|
||
}
|
||
return size;
|
||
}, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
|
||
React120.useEffect(() => {
|
||
apiRef.current.publishEvent("virtualScrollerContentSizeChange");
|
||
}, [apiRef, contentSize]);
|
||
const rootStyle = React120.useMemo(() => {
|
||
const style = {};
|
||
if (!needsHorizontalScrollbar) {
|
||
style.overflowX = "hidden";
|
||
}
|
||
if (rootProps.autoHeight) {
|
||
style.overflowY = "hidden";
|
||
}
|
||
return style;
|
||
}, [needsHorizontalScrollbar, rootProps.autoHeight]);
|
||
apiRef.current.register("private", {
|
||
getRenderContext
|
||
});
|
||
return {
|
||
renderContext,
|
||
updateRenderZonePosition,
|
||
getRows,
|
||
getRootProps: (inputProps = {}) => _extends({
|
||
ref: handleRef,
|
||
onScroll: handleScroll,
|
||
onWheel: handleWheel,
|
||
onTouchMove: handleTouchMove
|
||
}, inputProps, {
|
||
style: inputProps.style ? _extends({}, inputProps.style, rootStyle) : rootStyle,
|
||
role: "presentation"
|
||
}),
|
||
getContentProps: ({
|
||
style
|
||
} = {}) => ({
|
||
style: style ? _extends({}, style, contentSize) : contentSize,
|
||
role: "presentation"
|
||
}),
|
||
getRenderZoneProps: () => ({
|
||
ref: renderZoneRef,
|
||
role: "rowgroup"
|
||
})
|
||
};
|
||
};
|
||
function getNearestIndexToRender(apiRef, currentPage, rowsMeta, offset) {
|
||
var _currentPage$range2, _currentPage$range3;
|
||
const lastMeasuredIndexRelativeToAllRows = apiRef.current.getLastMeasuredRowIndex();
|
||
let allRowsMeasured = lastMeasuredIndexRelativeToAllRows === Infinity;
|
||
if ((_currentPage$range2 = currentPage.range) != null && _currentPage$range2.lastRowIndex && !allRowsMeasured) {
|
||
allRowsMeasured = lastMeasuredIndexRelativeToAllRows >= currentPage.range.lastRowIndex;
|
||
}
|
||
const lastMeasuredIndexRelativeToCurrentPage = clamp(lastMeasuredIndexRelativeToAllRows - (((_currentPage$range3 = currentPage.range) == null ? void 0 : _currentPage$range3.firstRowIndex) || 0), 0, rowsMeta.positions.length);
|
||
if (allRowsMeasured || rowsMeta.positions[lastMeasuredIndexRelativeToCurrentPage] >= offset) {
|
||
return binarySearch(offset, rowsMeta.positions);
|
||
}
|
||
return exponentialSearch(offset, rowsMeta.positions, lastMeasuredIndexRelativeToCurrentPage);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnGroupHeader.js
|
||
init_extends();
|
||
var React121 = __toESM(require_react());
|
||
var import_jsx_runtime99 = __toESM(require_jsx_runtime());
|
||
var useUtilityClasses34 = (ownerState) => {
|
||
const {
|
||
classes,
|
||
headerAlign,
|
||
isDragging,
|
||
showColumnBorder,
|
||
groupId
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["columnHeader", headerAlign === "left" && "columnHeader--alignLeft", headerAlign === "center" && "columnHeader--alignCenter", headerAlign === "right" && "columnHeader--alignRight", isDragging && "columnHeader--moving", showColumnBorder && "columnHeader--showColumnBorder", showColumnBorder && "columnHeader--withRightBorder", "withBorderColor", groupId === null ? "columnHeader--emptyGroup" : "columnHeader--filledGroup"],
|
||
draggableContainer: ["columnHeaderDraggableContainer"],
|
||
titleContainer: ["columnHeaderTitleContainer", "withBorderColor"],
|
||
titleContainerContent: ["columnHeaderTitleContainerContent"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
function GridColumnGroupHeader(props) {
|
||
var _columnGroupsLookup$g;
|
||
const {
|
||
groupId,
|
||
width,
|
||
depth,
|
||
maxDepth,
|
||
fields,
|
||
height,
|
||
colIndex,
|
||
hasFocus,
|
||
tabIndex,
|
||
isLastColumn
|
||
} = props;
|
||
const rootProps = useGridRootProps();
|
||
const headerCellRef = React121.useRef(null);
|
||
const apiRef = useGridApiContext();
|
||
const columnGroupsLookup = useGridSelector(apiRef, gridColumnGroupsLookupSelector);
|
||
const group = groupId ? columnGroupsLookup[groupId] : {};
|
||
const {
|
||
headerName = groupId != null ? groupId : "",
|
||
description = "",
|
||
headerAlign = void 0
|
||
} = group;
|
||
let headerComponent;
|
||
const render = groupId && ((_columnGroupsLookup$g = columnGroupsLookup[groupId]) == null ? void 0 : _columnGroupsLookup$g.renderHeaderGroup);
|
||
const renderParams = React121.useMemo(() => ({
|
||
groupId,
|
||
headerName,
|
||
description,
|
||
depth,
|
||
maxDepth,
|
||
fields,
|
||
colIndex,
|
||
isLastColumn
|
||
}), [groupId, headerName, description, depth, maxDepth, fields, colIndex, isLastColumn]);
|
||
if (groupId && render) {
|
||
headerComponent = render(renderParams);
|
||
}
|
||
const showColumnBorder = rootProps.showColumnVerticalBorder;
|
||
const ownerState = _extends({}, props, {
|
||
classes: rootProps.classes,
|
||
showColumnBorder,
|
||
headerAlign,
|
||
depth,
|
||
isDragging: false
|
||
});
|
||
const label = headerName != null ? headerName : groupId;
|
||
const id = useId();
|
||
const elementId = groupId === null ? `empty-group-cell-${id}` : groupId;
|
||
const classes = useUtilityClasses34(ownerState);
|
||
React121.useLayoutEffect(() => {
|
||
if (hasFocus) {
|
||
const focusableElement = headerCellRef.current.querySelector('[tabindex="0"]');
|
||
const elementToFocus = focusableElement || headerCellRef.current;
|
||
elementToFocus == null || elementToFocus.focus();
|
||
}
|
||
}, [apiRef, hasFocus]);
|
||
const publish = React121.useCallback(
|
||
(eventName) => (event) => {
|
||
if (isEventTargetInPortal(event)) {
|
||
return;
|
||
}
|
||
apiRef.current.publishEvent(eventName, renderParams, event);
|
||
},
|
||
// For now this is stupid, because renderParams change all the time.
|
||
// Need to move it's computation in the api, such that for a given depth+columnField, I can get the group parameters
|
||
[apiRef, renderParams]
|
||
);
|
||
const mouseEventsHandlers = React121.useMemo(() => ({
|
||
onKeyDown: publish("columnGroupHeaderKeyDown"),
|
||
onFocus: publish("columnGroupHeaderFocus"),
|
||
onBlur: publish("columnGroupHeaderBlur")
|
||
}), [publish]);
|
||
const headerClassName = typeof group.headerClassName === "function" ? group.headerClassName(renderParams) : group.headerClassName;
|
||
return (0, import_jsx_runtime99.jsx)(GridGenericColumnHeaderItem, _extends({
|
||
ref: headerCellRef,
|
||
classes,
|
||
columnMenuOpen: false,
|
||
colIndex,
|
||
height,
|
||
isResizing: false,
|
||
sortDirection: null,
|
||
hasFocus: false,
|
||
tabIndex,
|
||
isDraggable: false,
|
||
headerComponent,
|
||
headerClassName,
|
||
description,
|
||
elementId,
|
||
width,
|
||
columnMenuIconButton: null,
|
||
columnTitleIconButtons: null,
|
||
resizable: false,
|
||
label,
|
||
"aria-colspan": fields.length,
|
||
"data-fields": `|-${fields.join("-|-")}-|`
|
||
}, mouseEventsHandlers));
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columnHeaders/useGridColumnHeaders.js
|
||
var import_jsx_runtime100 = __toESM(require_jsx_runtime());
|
||
var GridColumnHeaderRow = styled_default2("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "ColumnHeaderRow",
|
||
overridesResolver: (props, styles) => styles.columnHeaderRow
|
||
})(() => ({
|
||
display: "flex"
|
||
}));
|
||
function isUIEvent(event) {
|
||
return !!event.target;
|
||
}
|
||
var useGridColumnHeaders = (props) => {
|
||
const {
|
||
innerRef: innerRefProp,
|
||
minColumnIndex = 0,
|
||
visibleColumns,
|
||
sortColumnLookup,
|
||
filterColumnLookup,
|
||
columnPositions,
|
||
columnHeaderTabIndexState,
|
||
columnGroupHeaderTabIndexState,
|
||
columnHeaderFocus,
|
||
columnGroupHeaderFocus,
|
||
densityFactor,
|
||
headerGroupingMaxDepth,
|
||
columnMenuState,
|
||
columnVisibility,
|
||
columnGroupsHeaderStructure,
|
||
hasOtherElementInTabSequence
|
||
} = props;
|
||
const theme = useTheme();
|
||
const [dragCol, setDragCol] = React122.useState("");
|
||
const [resizeCol, setResizeCol] = React122.useState("");
|
||
const apiRef = useGridPrivateApiContext();
|
||
const hasVirtualization = useGridSelector(apiRef, gridVirtualizationColumnEnabledSelector);
|
||
const rootProps = useGridRootProps();
|
||
const innerRef = React122.useRef(null);
|
||
const handleInnerRef = useForkRef(innerRefProp, innerRef);
|
||
const [renderContext, setRenderContextRaw] = React122.useState(null);
|
||
const prevRenderContext = React122.useRef(renderContext);
|
||
const prevScrollLeft = React122.useRef(0);
|
||
const currentPage = useGridVisibleRows(apiRef, rootProps);
|
||
const totalHeaderHeight = getTotalHeaderHeight(apiRef, rootProps.columnHeaderHeight);
|
||
const headerHeight = Math.floor(rootProps.columnHeaderHeight * densityFactor);
|
||
const setRenderContext = React122.useCallback((nextRenderContext) => {
|
||
if (renderContext && nextRenderContext && areRenderContextsEqual(renderContext, nextRenderContext)) {
|
||
return;
|
||
}
|
||
setRenderContextRaw(nextRenderContext);
|
||
}, [renderContext]);
|
||
React122.useEffect(() => {
|
||
var _apiRef$current$colum;
|
||
if ((_apiRef$current$colum = apiRef.current.columnHeadersContainerElementRef) != null && _apiRef$current$colum.current) {
|
||
apiRef.current.columnHeadersContainerElementRef.current.scrollLeft = 0;
|
||
}
|
||
}, [apiRef]);
|
||
const getFirstColumnIndexToRenderRef = React122.useRef(defaultMemoize(getFirstColumnIndexToRender, {
|
||
equalityCheck: (a, b) => ["firstColumnIndex", "minColumnIndex", "columnBuffer"].every((key) => a[key] === b[key])
|
||
}));
|
||
const updateInnerPosition = React122.useCallback((nextRenderContext) => {
|
||
const [firstRowToRender, lastRowToRender] = getRenderableIndexes({
|
||
firstIndex: nextRenderContext.firstRowIndex,
|
||
lastIndex: nextRenderContext.lastRowIndex,
|
||
minFirstIndex: 0,
|
||
maxLastIndex: currentPage.rows.length,
|
||
buffer: rootProps.rowBuffer
|
||
});
|
||
const firstColumnToRender = getFirstColumnIndexToRenderRef.current({
|
||
firstColumnIndex: nextRenderContext.firstColumnIndex,
|
||
minColumnIndex,
|
||
columnBuffer: rootProps.columnBuffer,
|
||
firstRowToRender,
|
||
lastRowToRender,
|
||
apiRef,
|
||
visibleRows: currentPage.rows
|
||
});
|
||
const direction = theme.direction === "ltr" ? 1 : -1;
|
||
const offset = firstColumnToRender > 0 ? prevScrollLeft.current - direction * columnPositions[firstColumnToRender] : prevScrollLeft.current;
|
||
innerRef.current.style.transform = `translate3d(${-offset}px, 0px, 0px)`;
|
||
}, [columnPositions, minColumnIndex, rootProps.columnBuffer, apiRef, currentPage.rows, rootProps.rowBuffer, theme.direction]);
|
||
React122.useLayoutEffect(() => {
|
||
if (renderContext) {
|
||
updateInnerPosition(renderContext);
|
||
}
|
||
}, [renderContext, updateInnerPosition]);
|
||
const handleScroll = React122.useCallback(({
|
||
left,
|
||
renderContext: nextRenderContext = null
|
||
}, event) => {
|
||
var _prevRenderContext$cu, _prevRenderContext$cu2;
|
||
if (!innerRef.current) {
|
||
return;
|
||
}
|
||
if (prevScrollLeft.current === left && ((_prevRenderContext$cu = prevRenderContext.current) == null ? void 0 : _prevRenderContext$cu.firstColumnIndex) === (nextRenderContext == null ? void 0 : nextRenderContext.firstColumnIndex) && ((_prevRenderContext$cu2 = prevRenderContext.current) == null ? void 0 : _prevRenderContext$cu2.lastColumnIndex) === (nextRenderContext == null ? void 0 : nextRenderContext.lastColumnIndex)) {
|
||
return;
|
||
}
|
||
prevScrollLeft.current = left;
|
||
let canUpdateInnerPosition = false;
|
||
if (nextRenderContext !== prevRenderContext.current || !prevRenderContext.current) {
|
||
if (isUIEvent(event)) {
|
||
ReactDOM2.flushSync(() => {
|
||
setRenderContext(nextRenderContext);
|
||
});
|
||
canUpdateInnerPosition = true;
|
||
} else {
|
||
setRenderContext(nextRenderContext);
|
||
}
|
||
prevRenderContext.current = nextRenderContext;
|
||
} else {
|
||
canUpdateInnerPosition = true;
|
||
}
|
||
if (nextRenderContext && canUpdateInnerPosition) {
|
||
updateInnerPosition(nextRenderContext);
|
||
}
|
||
}, [updateInnerPosition, setRenderContext]);
|
||
const handleColumnResizeStart = React122.useCallback((params) => setResizeCol(params.field), []);
|
||
const handleColumnResizeStop = React122.useCallback(() => setResizeCol(""), []);
|
||
const handleColumnReorderStart = React122.useCallback((params) => setDragCol(params.field), []);
|
||
const handleColumnReorderStop = React122.useCallback(() => setDragCol(""), []);
|
||
useGridApiEventHandler(apiRef, "columnResizeStart", handleColumnResizeStart);
|
||
useGridApiEventHandler(apiRef, "columnResizeStop", handleColumnResizeStop);
|
||
useGridApiEventHandler(apiRef, "columnHeaderDragStart", handleColumnReorderStart);
|
||
useGridApiEventHandler(apiRef, "columnHeaderDragEnd", handleColumnReorderStop);
|
||
useGridApiEventHandler(apiRef, "scrollPositionChange", handleScroll);
|
||
const getColumnsToRender = (params) => {
|
||
const {
|
||
renderContext: nextRenderContext = renderContext,
|
||
minFirstColumn = minColumnIndex,
|
||
maxLastColumn = visibleColumns.length
|
||
} = params || {};
|
||
if (!nextRenderContext) {
|
||
return null;
|
||
}
|
||
const [firstRowToRender, lastRowToRender] = getRenderableIndexes({
|
||
firstIndex: nextRenderContext.firstRowIndex,
|
||
lastIndex: nextRenderContext.lastRowIndex,
|
||
minFirstIndex: 0,
|
||
maxLastIndex: currentPage.rows.length,
|
||
buffer: rootProps.rowBuffer
|
||
});
|
||
const firstColumnToRender = !hasVirtualization ? 0 : getFirstColumnIndexToRenderRef.current({
|
||
firstColumnIndex: nextRenderContext.firstColumnIndex,
|
||
minColumnIndex: minFirstColumn,
|
||
columnBuffer: rootProps.columnBuffer,
|
||
apiRef,
|
||
firstRowToRender,
|
||
lastRowToRender,
|
||
visibleRows: currentPage.rows
|
||
});
|
||
const lastColumnToRender = !hasVirtualization ? maxLastColumn : Math.min(nextRenderContext.lastColumnIndex + rootProps.columnBuffer, maxLastColumn);
|
||
const renderedColumns = visibleColumns.slice(firstColumnToRender, lastColumnToRender);
|
||
return {
|
||
renderedColumns,
|
||
firstColumnToRender,
|
||
lastColumnToRender,
|
||
minFirstColumn,
|
||
maxLastColumn
|
||
};
|
||
};
|
||
const getColumnHeaders = (params, other = {}) => {
|
||
const columnsToRender = getColumnsToRender(params);
|
||
if (columnsToRender == null) {
|
||
return null;
|
||
}
|
||
const {
|
||
renderedColumns,
|
||
firstColumnToRender
|
||
} = columnsToRender;
|
||
const columns = [];
|
||
for (let i = 0; i < renderedColumns.length; i += 1) {
|
||
const colDef = renderedColumns[i];
|
||
const columnIndex = firstColumnToRender + i;
|
||
const isFirstColumn = columnIndex === 0;
|
||
const tabIndex = columnHeaderTabIndexState !== null && columnHeaderTabIndexState.field === colDef.field || isFirstColumn && !hasOtherElementInTabSequence ? 0 : -1;
|
||
const hasFocus = columnHeaderFocus !== null && columnHeaderFocus.field === colDef.field;
|
||
const open = columnMenuState.open && columnMenuState.field === colDef.field;
|
||
columns.push((0, import_jsx_runtime100.jsx)(GridColumnHeaderItem, _extends({}, sortColumnLookup[colDef.field], {
|
||
columnMenuOpen: open,
|
||
filterItemsCounter: filterColumnLookup[colDef.field] && filterColumnLookup[colDef.field].length,
|
||
headerHeight,
|
||
isDragging: colDef.field === dragCol,
|
||
colDef,
|
||
colIndex: columnIndex,
|
||
isResizing: resizeCol === colDef.field,
|
||
hasFocus,
|
||
tabIndex
|
||
}, other), colDef.field));
|
||
}
|
||
return (0, import_jsx_runtime100.jsx)(GridColumnHeaderRow, {
|
||
role: "row",
|
||
"aria-rowindex": headerGroupingMaxDepth + 1,
|
||
ownerState: rootProps,
|
||
children: columns
|
||
});
|
||
};
|
||
const getColumnGroupHeaders = (params) => {
|
||
if (headerGroupingMaxDepth === 0) {
|
||
return null;
|
||
}
|
||
const columnsToRender = getColumnsToRender(params);
|
||
if (columnsToRender == null || columnsToRender.renderedColumns.length === 0) {
|
||
return null;
|
||
}
|
||
const {
|
||
firstColumnToRender,
|
||
lastColumnToRender
|
||
} = columnsToRender;
|
||
const columns = [];
|
||
const headerToRender = [];
|
||
for (let depth = 0; depth < headerGroupingMaxDepth; depth += 1) {
|
||
var _apiRef$current$unsta, _apiRef$current$unsta2;
|
||
const rowStructure = columnGroupsHeaderStructure[depth];
|
||
const firstColumnFieldToRender = visibleColumns[firstColumnToRender].field;
|
||
const firstGroupToRender = (_apiRef$current$unsta = apiRef.current.unstable_getColumnGroupPath(firstColumnFieldToRender)[depth]) != null ? _apiRef$current$unsta : null;
|
||
const firstGroupIndex = rowStructure.findIndex(({
|
||
groupId,
|
||
columnFields
|
||
}) => groupId === firstGroupToRender && columnFields.includes(firstColumnFieldToRender));
|
||
const lastColumnFieldToRender = visibleColumns[lastColumnToRender - 1].field;
|
||
const lastGroupToRender = (_apiRef$current$unsta2 = apiRef.current.unstable_getColumnGroupPath(lastColumnFieldToRender)[depth]) != null ? _apiRef$current$unsta2 : null;
|
||
const lastGroupIndex = rowStructure.findIndex(({
|
||
groupId,
|
||
columnFields
|
||
}) => groupId === lastGroupToRender && columnFields.includes(lastColumnFieldToRender));
|
||
const visibleColumnGroupHeader = rowStructure.slice(firstGroupIndex, lastGroupIndex + 1).map((groupStructure) => {
|
||
return _extends({}, groupStructure, {
|
||
columnFields: groupStructure.columnFields.filter((field) => columnVisibility[field] !== false)
|
||
});
|
||
}).filter((groupStructure) => groupStructure.columnFields.length > 0);
|
||
const firstVisibleColumnIndex = visibleColumnGroupHeader[0].columnFields.indexOf(firstColumnFieldToRender);
|
||
const hiddenGroupColumns = visibleColumnGroupHeader[0].columnFields.slice(0, firstVisibleColumnIndex);
|
||
const leftOverflow = hiddenGroupColumns.reduce((acc, field) => {
|
||
var _column$computedWidth;
|
||
const column = apiRef.current.getColumn(field);
|
||
return acc + ((_column$computedWidth = column.computedWidth) != null ? _column$computedWidth : 0);
|
||
}, 0);
|
||
let columnIndex = firstColumnToRender;
|
||
const elements = visibleColumnGroupHeader.map(({
|
||
groupId,
|
||
columnFields
|
||
}) => {
|
||
const hasFocus = columnGroupHeaderFocus !== null && columnGroupHeaderFocus.depth === depth && columnFields.includes(columnGroupHeaderFocus.field);
|
||
const tabIndex = columnGroupHeaderTabIndexState !== null && columnGroupHeaderTabIndexState.depth === depth && columnFields.includes(columnGroupHeaderTabIndexState.field) ? 0 : -1;
|
||
const headerInfo = {
|
||
groupId,
|
||
width: columnFields.reduce((acc, field) => acc + apiRef.current.getColumn(field).computedWidth, 0),
|
||
fields: columnFields,
|
||
colIndex: columnIndex,
|
||
hasFocus,
|
||
tabIndex
|
||
};
|
||
columnIndex += columnFields.length;
|
||
return headerInfo;
|
||
});
|
||
headerToRender.push({
|
||
leftOverflow,
|
||
elements
|
||
});
|
||
}
|
||
headerToRender.forEach((depthInfo, depthIndex) => {
|
||
columns.push((0, import_jsx_runtime100.jsx)(GridColumnHeaderRow, {
|
||
style: {
|
||
height: `${headerHeight}px`,
|
||
transform: `translateX(-${depthInfo.leftOverflow}px)`
|
||
},
|
||
role: "row",
|
||
"aria-rowindex": depthIndex + 1,
|
||
ownerState: rootProps,
|
||
children: depthInfo.elements.map(({
|
||
groupId,
|
||
width,
|
||
fields,
|
||
colIndex,
|
||
hasFocus,
|
||
tabIndex
|
||
}, groupIndex) => {
|
||
return (0, import_jsx_runtime100.jsx)(GridColumnGroupHeader, {
|
||
groupId,
|
||
width,
|
||
fields,
|
||
colIndex,
|
||
depth: depthIndex,
|
||
isLastColumn: colIndex === visibleColumns.length - fields.length,
|
||
maxDepth: headerToRender.length,
|
||
height: headerHeight,
|
||
hasFocus,
|
||
tabIndex
|
||
}, groupIndex);
|
||
})
|
||
}, depthIndex));
|
||
});
|
||
return columns;
|
||
};
|
||
const rootStyle = {
|
||
minHeight: totalHeaderHeight,
|
||
maxHeight: totalHeaderHeight,
|
||
lineHeight: `${headerHeight}px`
|
||
};
|
||
return {
|
||
renderContext,
|
||
getColumnHeaders,
|
||
getColumnsToRender,
|
||
getColumnGroupHeaders,
|
||
isDragging: !!dragCol,
|
||
getRootProps: (other = {}) => _extends({
|
||
style: rootStyle
|
||
}, other),
|
||
getInnerProps: () => ({
|
||
ref: handleInnerRef,
|
||
role: "rowgroup"
|
||
}),
|
||
headerHeight
|
||
};
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridBaseColumnHeaders.js
|
||
init_extends();
|
||
var React123 = __toESM(require_react());
|
||
var import_jsx_runtime101 = __toESM(require_jsx_runtime());
|
||
var _excluded56 = ["className"];
|
||
var useUtilityClasses35 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["columnHeaders", "withBorderColor"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridColumnHeadersRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "ColumnHeaders",
|
||
overridesResolver: (props, styles) => styles.columnHeaders
|
||
})({
|
||
position: "relative",
|
||
overflow: "hidden",
|
||
display: "flex",
|
||
alignItems: "center",
|
||
boxSizing: "border-box",
|
||
borderBottom: "1px solid",
|
||
borderTopLeftRadius: "var(--unstable_DataGrid-radius)",
|
||
borderTopRightRadius: "var(--unstable_DataGrid-radius)"
|
||
});
|
||
var GridBaseColumnHeaders = React123.forwardRef(function GridColumnHeaders(props, ref) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded56);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses35(rootProps);
|
||
return (0, import_jsx_runtime101.jsx)(GridColumnHeadersRoot, _extends({
|
||
ref,
|
||
className: clsx_default(className, classes.root),
|
||
ownerState: rootProps
|
||
}, other, {
|
||
role: "presentation"
|
||
}));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/columnHeaders/GridColumnHeadersInner.js
|
||
init_extends();
|
||
var React124 = __toESM(require_react());
|
||
var import_jsx_runtime102 = __toESM(require_jsx_runtime());
|
||
var _excluded57 = ["isDragging", "className"];
|
||
var useUtilityClasses36 = (ownerState) => {
|
||
const {
|
||
isDragging,
|
||
hasScrollX,
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["columnHeadersInner", isDragging && "columnHeaderDropZone", hasScrollX && "columnHeadersInner--scrollable"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var GridColumnHeadersInnerRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "columnHeadersInner",
|
||
overridesResolver: (props, styles) => [{
|
||
[`&.${gridClasses.columnHeaderDropZone}`]: styles.columnHeaderDropZone
|
||
}, styles.columnHeadersInner]
|
||
})(() => ({
|
||
display: "flex",
|
||
alignItems: "flex-start",
|
||
flexDirection: "column",
|
||
[`&.${gridClasses.columnHeaderDropZone} .${gridClasses.columnHeaderDraggableContainer}`]: {
|
||
cursor: "move"
|
||
},
|
||
[`&.${gridClasses["columnHeadersInner--scrollable"]} .${gridClasses.columnHeader}:last-child`]: {
|
||
borderRight: "none"
|
||
}
|
||
}));
|
||
var GridColumnHeadersInner = React124.forwardRef(function GridColumnHeadersInner2(props, ref) {
|
||
var _apiRef$current$getRo, _apiRef$current$getRo2;
|
||
const {
|
||
isDragging,
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded57);
|
||
const apiRef = useGridApiContext();
|
||
const rootProps = useGridRootProps();
|
||
const ownerState = _extends({}, rootProps, {
|
||
isDragging,
|
||
hasScrollX: (_apiRef$current$getRo = (_apiRef$current$getRo2 = apiRef.current.getRootDimensions()) == null ? void 0 : _apiRef$current$getRo2.hasScrollX) != null ? _apiRef$current$getRo : false
|
||
});
|
||
const classes = useUtilityClasses36(ownerState);
|
||
return (0, import_jsx_runtime102.jsx)(GridColumnHeadersInnerRoot, _extends({
|
||
ref,
|
||
className: clsx_default(className, classes.root),
|
||
ownerState
|
||
}, other));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridColumnHeaders.js
|
||
var import_jsx_runtime103 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime104 = __toESM(require_jsx_runtime());
|
||
var _excluded58 = ["innerRef", "className", "visibleColumns", "sortColumnLookup", "filterColumnLookup", "columnPositions", "columnHeaderTabIndexState", "columnGroupHeaderTabIndexState", "columnHeaderFocus", "columnGroupHeaderFocus", "densityFactor", "headerGroupingMaxDepth", "columnMenuState", "columnVisibility", "columnGroupsHeaderStructure", "hasOtherElementInTabSequence"];
|
||
var GridColumnHeaders2 = React125.forwardRef(function GridColumnsHeaders(props, ref) {
|
||
const {
|
||
innerRef,
|
||
visibleColumns,
|
||
sortColumnLookup,
|
||
filterColumnLookup,
|
||
columnPositions,
|
||
columnHeaderTabIndexState,
|
||
columnGroupHeaderTabIndexState,
|
||
columnHeaderFocus,
|
||
columnGroupHeaderFocus,
|
||
densityFactor,
|
||
headerGroupingMaxDepth,
|
||
columnMenuState,
|
||
columnVisibility,
|
||
columnGroupsHeaderStructure,
|
||
hasOtherElementInTabSequence
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded58);
|
||
const {
|
||
isDragging,
|
||
getRootProps,
|
||
getInnerProps,
|
||
getColumnHeaders,
|
||
getColumnGroupHeaders
|
||
} = useGridColumnHeaders({
|
||
innerRef,
|
||
visibleColumns,
|
||
sortColumnLookup,
|
||
filterColumnLookup,
|
||
columnPositions,
|
||
columnHeaderTabIndexState,
|
||
columnGroupHeaderTabIndexState,
|
||
columnHeaderFocus,
|
||
columnGroupHeaderFocus,
|
||
densityFactor,
|
||
headerGroupingMaxDepth,
|
||
columnMenuState,
|
||
columnVisibility,
|
||
columnGroupsHeaderStructure,
|
||
hasOtherElementInTabSequence
|
||
});
|
||
return (0, import_jsx_runtime104.jsx)(GridBaseColumnHeaders, _extends({
|
||
ref
|
||
}, getRootProps(other), {
|
||
children: (0, import_jsx_runtime103.jsxs)(GridColumnHeadersInner, _extends({
|
||
isDragging
|
||
}, getInnerProps(), {
|
||
children: [getColumnGroupHeaders(), getColumnHeaders()]
|
||
}))
|
||
}));
|
||
});
|
||
true ? GridColumnHeaders2.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
columnGroupHeaderFocus: import_prop_types57.default.shape({
|
||
depth: import_prop_types57.default.number.isRequired,
|
||
field: import_prop_types57.default.string.isRequired
|
||
}),
|
||
columnGroupHeaderTabIndexState: import_prop_types57.default.shape({
|
||
depth: import_prop_types57.default.number.isRequired,
|
||
field: import_prop_types57.default.string.isRequired
|
||
}),
|
||
columnGroupsHeaderStructure: import_prop_types57.default.arrayOf(import_prop_types57.default.arrayOf(import_prop_types57.default.shape({
|
||
columnFields: import_prop_types57.default.arrayOf(import_prop_types57.default.string).isRequired,
|
||
groupId: import_prop_types57.default.string
|
||
}))).isRequired,
|
||
columnHeaderFocus: import_prop_types57.default.shape({
|
||
field: import_prop_types57.default.string.isRequired
|
||
}),
|
||
columnHeaderTabIndexState: import_prop_types57.default.shape({
|
||
field: import_prop_types57.default.string.isRequired
|
||
}),
|
||
columnMenuState: import_prop_types57.default.shape({
|
||
field: import_prop_types57.default.string,
|
||
open: import_prop_types57.default.bool.isRequired
|
||
}).isRequired,
|
||
columnPositions: import_prop_types57.default.arrayOf(import_prop_types57.default.number).isRequired,
|
||
columnVisibility: import_prop_types57.default.object.isRequired,
|
||
densityFactor: import_prop_types57.default.number.isRequired,
|
||
filterColumnLookup: import_prop_types57.default.object.isRequired,
|
||
hasOtherElementInTabSequence: import_prop_types57.default.bool.isRequired,
|
||
headerGroupingMaxDepth: import_prop_types57.default.number.isRequired,
|
||
innerRef: refType_default,
|
||
minColumnIndex: import_prop_types57.default.number,
|
||
sortColumnLookup: import_prop_types57.default.object.isRequired,
|
||
visibleColumns: import_prop_types57.default.arrayOf(import_prop_types57.default.object).isRequired
|
||
} : void 0;
|
||
var MemoizedGridColumnHeaders = fastMemo(GridColumnHeaders2);
|
||
|
||
// node_modules/@mui/x-data-grid/components/GridNoResultsOverlay.js
|
||
init_extends();
|
||
var React126 = __toESM(require_react());
|
||
var import_jsx_runtime105 = __toESM(require_jsx_runtime());
|
||
var GridNoResultsOverlay = React126.forwardRef(function GridNoResultsOverlay2(props, ref) {
|
||
const apiRef = useGridApiContext();
|
||
const noResultsOverlayLabel = apiRef.current.getLocaleText("noResultsOverlayLabel");
|
||
return (0, import_jsx_runtime105.jsx)(GridOverlay, _extends({
|
||
ref
|
||
}, props, {
|
||
children: noResultsOverlayLabel
|
||
}));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/material/index.js
|
||
init_extends();
|
||
|
||
// node_modules/@mui/x-data-grid/material/icons/GridColumnUnsortedIcon.js
|
||
init_extends();
|
||
var React127 = __toESM(require_react());
|
||
var import_jsx_runtime106 = __toESM(require_jsx_runtime());
|
||
var _excluded59 = ["sortingOrder"];
|
||
var GridColumnUnsortedIcon = React127.memo(function GridColumnHeaderSortIcon2(props) {
|
||
const {
|
||
sortingOrder
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded59);
|
||
const rootProps = useGridRootProps();
|
||
const [nextSortDirection] = sortingOrder;
|
||
const Icon = nextSortDirection === "asc" ? rootProps.slots.columnSortedAscendingIcon : rootProps.slots.columnSortedDescendingIcon;
|
||
return Icon ? (0, import_jsx_runtime106.jsx)(Icon, _extends({}, other)) : null;
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/material/components/MUISelectOption.js
|
||
init_extends();
|
||
var React128 = __toESM(require_react());
|
||
var import_jsx_runtime107 = __toESM(require_jsx_runtime());
|
||
var _excluded60 = ["native"];
|
||
function MUISelectOption(_ref) {
|
||
let {
|
||
native
|
||
} = _ref, props = _objectWithoutPropertiesLoose(_ref, _excluded60);
|
||
if (native) {
|
||
return (0, import_jsx_runtime107.jsx)("option", _extends({}, props));
|
||
}
|
||
return (0, import_jsx_runtime107.jsx)(MenuItem_default, _extends({}, props));
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/material/index.js
|
||
var iconSlots = {
|
||
BooleanCellTrueIcon: GridCheckIcon,
|
||
BooleanCellFalseIcon: GridCloseIcon,
|
||
ColumnMenuIcon: GridTripleDotsVerticalIcon,
|
||
OpenFilterButtonIcon: GridFilterListIcon,
|
||
FilterPanelDeleteIcon: GridCloseIcon,
|
||
ColumnFilteredIcon: GridFilterAltIcon,
|
||
ColumnSelectorIcon: GridColumnIcon,
|
||
ColumnUnsortedIcon: GridColumnUnsortedIcon,
|
||
ColumnSortedAscendingIcon: GridArrowUpwardIcon,
|
||
ColumnSortedDescendingIcon: GridArrowDownwardIcon,
|
||
ColumnResizeIcon: GridSeparatorIcon,
|
||
DensityCompactIcon: GridViewHeadlineIcon,
|
||
DensityStandardIcon: GridTableRowsIcon,
|
||
DensityComfortableIcon: GridViewStreamIcon,
|
||
ExportIcon: GridSaveAltIcon,
|
||
MoreActionsIcon: GridMoreVertIcon,
|
||
TreeDataCollapseIcon: GridExpandMoreIcon,
|
||
TreeDataExpandIcon: GridKeyboardArrowRight,
|
||
GroupingCriteriaCollapseIcon: GridExpandMoreIcon,
|
||
GroupingCriteriaExpandIcon: GridKeyboardArrowRight,
|
||
DetailPanelExpandIcon: GridAddIcon,
|
||
DetailPanelCollapseIcon: GridRemoveIcon,
|
||
RowReorderIcon: GridDragIcon,
|
||
QuickFilterIcon: GridSearchIcon,
|
||
QuickFilterClearIcon: GridCloseIcon,
|
||
ColumnMenuHideIcon: GridVisibilityOffIcon,
|
||
ColumnMenuSortAscendingIcon: GridArrowUpwardIcon,
|
||
ColumnMenuSortDescendingIcon: GridArrowDownwardIcon,
|
||
ColumnMenuFilterIcon: GridFilterAltIcon,
|
||
ColumnMenuManageColumnsIcon: GridViewColumnIcon,
|
||
ColumnMenuClearIcon: GridClearIcon,
|
||
LoadIcon: GridLoadIcon,
|
||
FilterPanelAddIcon: GridAddIcon,
|
||
FilterPanelRemoveAllIcon: GridDeleteForeverIcon,
|
||
ColumnReorderIcon: GridDragIcon
|
||
};
|
||
var materialSlots = _extends({}, iconSlots, {
|
||
BaseCheckbox: Checkbox_default,
|
||
BaseTextField: TextField_default,
|
||
BaseFormControl: FormControl_default,
|
||
BaseSelect: Select_default,
|
||
BaseSwitch: Switch_default,
|
||
BaseButton: Button_default,
|
||
BaseIconButton: IconButton_default,
|
||
BaseInputAdornment: InputAdornment_default,
|
||
BaseTooltip: Tooltip_default,
|
||
BasePopper: Popper_default,
|
||
BaseInputLabel: InputLabel_default,
|
||
BaseSelectOption: MUISelectOption,
|
||
BaseChip: Chip_default
|
||
});
|
||
var material_default = materialSlots;
|
||
|
||
// node_modules/@mui/x-data-grid/constants/defaultGridSlotsComponents.js
|
||
var DATA_GRID_DEFAULT_SLOTS_COMPONENTS = _extends({}, material_default, {
|
||
Cell: MemoizedGridCellV7,
|
||
SkeletonCell: GridSkeletonCell,
|
||
ColumnHeaderFilterIconButton: GridColumnHeaderFilterIconButton,
|
||
ColumnMenu: GridColumnMenu,
|
||
ColumnHeaders: MemoizedGridColumnHeaders,
|
||
Footer: GridFooter,
|
||
FooterRowCount: GridRowCount,
|
||
Toolbar: null,
|
||
PreferencesPanel: GridPreferencesPanel,
|
||
LoadingOverlay: GridLoadingOverlay,
|
||
NoResultsOverlay: GridNoResultsOverlay,
|
||
NoRowsOverlay: GridNoRowsOverlay,
|
||
Pagination: GridPagination,
|
||
FilterPanel: GridFilterPanel,
|
||
ColumnsPanel: GridColumnsPanel,
|
||
Panel: GridPanel,
|
||
Row: MemoizedGridRow
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/internals/utils/computeSlots.js
|
||
init_extends();
|
||
|
||
// node_modules/@mui/x-data-grid/internals/utils/slotsMigration.js
|
||
init_extends();
|
||
var uncapitalizeObjectKeys = (capitalizedObject) => {
|
||
if (capitalizedObject === void 0) {
|
||
return void 0;
|
||
}
|
||
return Object.keys(capitalizedObject).reduce((acc, key) => _extends({}, acc, {
|
||
[`${key.charAt(0).toLowerCase()}${key.slice(1)}`]: capitalizedObject[key]
|
||
}), {});
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/internals/utils/computeSlots.js
|
||
function computeSlots({
|
||
defaultSlots: defaultSlots2,
|
||
slots,
|
||
components
|
||
}) {
|
||
const overrides = slots != null ? slots : components ? uncapitalizeObjectKeys(components) : null;
|
||
if (!overrides || Object.keys(overrides).length === 0) {
|
||
return defaultSlots2;
|
||
}
|
||
const result = _extends({}, defaultSlots2);
|
||
Object.keys(overrides).forEach((key) => {
|
||
const k = key;
|
||
if (overrides[k] !== void 0) {
|
||
result[k] = overrides[k];
|
||
}
|
||
});
|
||
return result;
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/internals/utils/useProps.js
|
||
var React129 = __toESM(require_react());
|
||
var _excluded61 = ["components", "componentsProps"];
|
||
function groupForwardedProps(props) {
|
||
var _props$forwardedProps;
|
||
const keys = Object.keys(props);
|
||
if (!keys.some((key) => key.startsWith("aria-") || key.startsWith("data-"))) {
|
||
return props;
|
||
}
|
||
const newProps = {};
|
||
const forwardedProps = (_props$forwardedProps = props.forwardedProps) != null ? _props$forwardedProps : {};
|
||
for (let i = 0; i < keys.length; i += 1) {
|
||
const key = keys[i];
|
||
if (key.startsWith("aria-") || key.startsWith("data-")) {
|
||
forwardedProps[key] = props[key];
|
||
} else {
|
||
newProps[key] = props[key];
|
||
}
|
||
}
|
||
newProps.forwardedProps = forwardedProps;
|
||
return newProps;
|
||
}
|
||
function useProps(allProps) {
|
||
return React129.useMemo(() => {
|
||
const {
|
||
components,
|
||
componentsProps
|
||
} = allProps, themedProps = _objectWithoutPropertiesLoose(allProps, _excluded61);
|
||
return [components, componentsProps, groupForwardedProps(themedProps)];
|
||
}, [allProps]);
|
||
}
|
||
|
||
// node_modules/@mui/x-data-grid/DataGrid/useDataGridProps.js
|
||
var DATA_GRID_FORCED_PROPS = {
|
||
disableMultipleColumnsFiltering: true,
|
||
disableMultipleColumnsSorting: true,
|
||
disableMultipleRowSelection: true,
|
||
throttleRowsMs: void 0,
|
||
hideFooterRowCount: false,
|
||
pagination: true,
|
||
checkboxSelectionVisibleOnly: false,
|
||
disableColumnReorder: true,
|
||
disableColumnResize: true,
|
||
keepColumnPositionIfDraggedOutside: false,
|
||
signature: "DataGrid"
|
||
};
|
||
var DATA_GRID_PROPS_DEFAULT_VALUES = {
|
||
autoHeight: false,
|
||
autoPageSize: false,
|
||
checkboxSelection: false,
|
||
checkboxSelectionVisibleOnly: false,
|
||
columnBuffer: 3,
|
||
rowBuffer: 3,
|
||
columnThreshold: 3,
|
||
rowThreshold: 3,
|
||
rowSelection: true,
|
||
density: "standard",
|
||
disableColumnFilter: false,
|
||
disableColumnMenu: false,
|
||
disableColumnSelector: false,
|
||
disableDensitySelector: false,
|
||
disableEval: false,
|
||
disableMultipleColumnsFiltering: false,
|
||
disableMultipleRowSelection: false,
|
||
disableMultipleColumnsSorting: false,
|
||
disableRowSelectionOnClick: false,
|
||
disableVirtualization: false,
|
||
editMode: GridEditModes.Cell,
|
||
filterMode: "client",
|
||
filterDebounceMs: 150,
|
||
columnHeaderHeight: 56,
|
||
hideFooter: false,
|
||
hideFooterPagination: false,
|
||
hideFooterRowCount: false,
|
||
hideFooterSelectedRowCount: false,
|
||
ignoreDiacritics: false,
|
||
logger: console,
|
||
logLevel: false ? "error" : "warn",
|
||
pagination: false,
|
||
paginationMode: "client",
|
||
rowHeight: 52,
|
||
pageSizeOptions: [25, 50, 100],
|
||
rowSpacingType: "margin",
|
||
showCellVerticalBorder: false,
|
||
showColumnVerticalBorder: false,
|
||
sortingOrder: ["asc", "desc", null],
|
||
sortingMode: "client",
|
||
throttleRowsMs: 0,
|
||
disableColumnReorder: false,
|
||
disableColumnResize: false,
|
||
keepNonExistentRowsSelected: false,
|
||
keepColumnPositionIfDraggedOutside: false,
|
||
unstable_ignoreValueFormatterDuringExport: false,
|
||
clipboardCopyCellDelimiter: " ",
|
||
rowPositionsDebounceMs: 166
|
||
};
|
||
var defaultSlots = uncapitalizeObjectKeys(DATA_GRID_DEFAULT_SLOTS_COMPONENTS);
|
||
var useDataGridProps = (inProps) => {
|
||
const [components, componentsProps, themedProps] = useProps(useThemeProps({
|
||
props: inProps,
|
||
name: "MuiDataGrid"
|
||
}));
|
||
const localeText = React130.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
||
const slots = React130.useMemo(() => computeSlots({
|
||
defaultSlots,
|
||
slots: themedProps.slots,
|
||
components
|
||
}), [components, themedProps.slots]);
|
||
return React130.useMemo(() => {
|
||
var _themedProps$slotProp;
|
||
return _extends({}, DATA_GRID_PROPS_DEFAULT_VALUES, themedProps, {
|
||
localeText,
|
||
slots,
|
||
slotProps: (_themedProps$slotProp = themedProps.slotProps) != null ? _themedProps$slotProp : componentsProps
|
||
}, DATA_GRID_FORCED_PROPS);
|
||
}, [themedProps, localeText, slots, componentsProps]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/rows/useGridRowsMeta.js
|
||
var rowsMetaStateInitializer = (state) => _extends({}, state, {
|
||
rowsMeta: {
|
||
currentPageTotalHeight: 0,
|
||
positions: []
|
||
}
|
||
});
|
||
var warnedOnceInvalidRowHeight = false;
|
||
var getValidRowHeight = (rowHeightProp, defaultRowHeight, warningMessage) => {
|
||
if (typeof rowHeightProp === "number" && rowHeightProp > 0) {
|
||
return rowHeightProp;
|
||
}
|
||
if (!warnedOnceInvalidRowHeight && typeof rowHeightProp !== "undefined" && rowHeightProp !== null) {
|
||
console.warn(warningMessage);
|
||
warnedOnceInvalidRowHeight = true;
|
||
}
|
||
return defaultRowHeight;
|
||
};
|
||
var rowHeightWarning = [`MUI: The \`rowHeight\` prop should be a number greater than 0.`, `The default value will be used instead.`].join("\n");
|
||
var getRowHeightWarning = [`MUI: The \`getRowHeight\` prop should return a number greater than 0 or 'auto'.`, `The default value will be used instead.`].join("\n");
|
||
var useGridRowsMeta = (apiRef, props) => {
|
||
const {
|
||
getRowHeight: getRowHeightProp,
|
||
getRowSpacing,
|
||
getEstimatedRowHeight
|
||
} = props;
|
||
const rowsHeightLookup = React131.useRef(/* @__PURE__ */ Object.create(null));
|
||
const lastMeasuredRowIndex = React131.useRef(-1);
|
||
const hasRowWithAutoHeight = React131.useRef(false);
|
||
const densityFactor = useGridSelector(apiRef, gridDensityFactorSelector);
|
||
const filterModel = useGridSelector(apiRef, gridFilterModelSelector);
|
||
const paginationState = useGridSelector(apiRef, gridPaginationSelector);
|
||
const sortModel = useGridSelector(apiRef, gridSortModelSelector);
|
||
const currentPage = useGridVisibleRows(apiRef, props);
|
||
const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);
|
||
const validRowHeight = getValidRowHeight(props.rowHeight, DATA_GRID_PROPS_DEFAULT_VALUES.rowHeight, rowHeightWarning);
|
||
const rowHeight = Math.floor(validRowHeight * densityFactor);
|
||
const hydrateRowsMeta = React131.useCallback(() => {
|
||
var _pinnedRows$top, _pinnedRows$bottom;
|
||
hasRowWithAutoHeight.current = false;
|
||
const calculateRowProcessedSizes = (row) => {
|
||
if (!rowsHeightLookup.current[row.id]) {
|
||
rowsHeightLookup.current[row.id] = {
|
||
sizes: {
|
||
baseCenter: rowHeight
|
||
},
|
||
isResized: false,
|
||
autoHeight: false,
|
||
needsFirstMeasurement: true
|
||
// Assume all rows will need to be measured by default
|
||
};
|
||
}
|
||
const {
|
||
isResized,
|
||
needsFirstMeasurement,
|
||
sizes
|
||
} = rowsHeightLookup.current[row.id];
|
||
let baseRowHeight = typeof rowHeight === "number" && rowHeight > 0 ? rowHeight : 52;
|
||
const existingBaseRowHeight = sizes.baseCenter;
|
||
if (isResized) {
|
||
baseRowHeight = existingBaseRowHeight;
|
||
} else if (getRowHeightProp) {
|
||
const rowHeightFromUser = getRowHeightProp(_extends({}, row, {
|
||
densityFactor
|
||
}));
|
||
if (rowHeightFromUser === "auto") {
|
||
if (needsFirstMeasurement) {
|
||
const estimatedRowHeight = getEstimatedRowHeight ? getEstimatedRowHeight(_extends({}, row, {
|
||
densityFactor
|
||
})) : rowHeight;
|
||
baseRowHeight = estimatedRowHeight != null ? estimatedRowHeight : rowHeight;
|
||
} else {
|
||
baseRowHeight = existingBaseRowHeight;
|
||
}
|
||
hasRowWithAutoHeight.current = true;
|
||
rowsHeightLookup.current[row.id].autoHeight = true;
|
||
} else {
|
||
baseRowHeight = getValidRowHeight(rowHeightFromUser, rowHeight, getRowHeightWarning);
|
||
rowsHeightLookup.current[row.id].needsFirstMeasurement = false;
|
||
rowsHeightLookup.current[row.id].autoHeight = false;
|
||
}
|
||
} else {
|
||
rowsHeightLookup.current[row.id].needsFirstMeasurement = false;
|
||
}
|
||
const initialHeights = {};
|
||
for (const key in sizes) {
|
||
if (/^base[A-Z]/.test(key)) {
|
||
initialHeights[key] = sizes[key];
|
||
}
|
||
}
|
||
initialHeights.baseCenter = baseRowHeight;
|
||
if (getRowSpacing) {
|
||
var _spacing$top, _spacing$bottom;
|
||
const indexRelativeToCurrentPage = apiRef.current.getRowIndexRelativeToVisibleRows(row.id);
|
||
const spacing = getRowSpacing(_extends({}, row, {
|
||
isFirstVisible: indexRelativeToCurrentPage === 0,
|
||
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
|
||
indexRelativeToCurrentPage
|
||
}));
|
||
initialHeights.spacingTop = (_spacing$top = spacing.top) != null ? _spacing$top : 0;
|
||
initialHeights.spacingBottom = (_spacing$bottom = spacing.bottom) != null ? _spacing$bottom : 0;
|
||
}
|
||
const processedSizes = apiRef.current.unstable_applyPipeProcessors("rowHeight", initialHeights, row);
|
||
rowsHeightLookup.current[row.id].sizes = processedSizes;
|
||
return processedSizes;
|
||
};
|
||
const positions = [];
|
||
const currentPageTotalHeight = currentPage.rows.reduce((acc, row) => {
|
||
positions.push(acc);
|
||
let maximumBaseSize = 0;
|
||
let otherSizes = 0;
|
||
const processedSizes = calculateRowProcessedSizes(row);
|
||
for (const key in processedSizes) {
|
||
const value = processedSizes[key];
|
||
if (/^base[A-Z]/.test(key)) {
|
||
maximumBaseSize = value > maximumBaseSize ? value : maximumBaseSize;
|
||
} else {
|
||
otherSizes += value;
|
||
}
|
||
}
|
||
return acc + maximumBaseSize + otherSizes;
|
||
}, 0);
|
||
pinnedRows == null || (_pinnedRows$top = pinnedRows.top) == null || _pinnedRows$top.forEach((row) => {
|
||
calculateRowProcessedSizes(row);
|
||
});
|
||
pinnedRows == null || (_pinnedRows$bottom = pinnedRows.bottom) == null || _pinnedRows$bottom.forEach((row) => {
|
||
calculateRowProcessedSizes(row);
|
||
});
|
||
apiRef.current.setState((state) => {
|
||
return _extends({}, state, {
|
||
rowsMeta: {
|
||
currentPageTotalHeight,
|
||
positions
|
||
}
|
||
});
|
||
});
|
||
if (!hasRowWithAutoHeight.current) {
|
||
lastMeasuredRowIndex.current = Infinity;
|
||
}
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef, currentPage.rows, rowHeight, getRowHeightProp, getRowSpacing, getEstimatedRowHeight, pinnedRows, densityFactor]);
|
||
const getRowHeight = React131.useCallback((rowId) => {
|
||
const height = rowsHeightLookup.current[rowId];
|
||
return height ? height.sizes.baseCenter : rowHeight;
|
||
}, [rowHeight]);
|
||
const getRowInternalSizes = (rowId) => {
|
||
var _rowsHeightLookup$cur;
|
||
return (_rowsHeightLookup$cur = rowsHeightLookup.current[rowId]) == null ? void 0 : _rowsHeightLookup$cur.sizes;
|
||
};
|
||
const setRowHeight = React131.useCallback((id, height) => {
|
||
rowsHeightLookup.current[id].sizes.baseCenter = height;
|
||
rowsHeightLookup.current[id].isResized = true;
|
||
rowsHeightLookup.current[id].needsFirstMeasurement = false;
|
||
hydrateRowsMeta();
|
||
}, [hydrateRowsMeta]);
|
||
const debouncedHydrateRowsMeta = React131.useMemo(() => debounce(hydrateRowsMeta, props.rowPositionsDebounceMs), [hydrateRowsMeta, props.rowPositionsDebounceMs]);
|
||
const storeMeasuredRowHeight = React131.useCallback((id, height, position) => {
|
||
if (!rowsHeightLookup.current[id] || !rowsHeightLookup.current[id].autoHeight) {
|
||
return;
|
||
}
|
||
const needsHydration = rowsHeightLookup.current[id].sizes[`base${capitalize(position)}`] !== height;
|
||
rowsHeightLookup.current[id].needsFirstMeasurement = false;
|
||
rowsHeightLookup.current[id].sizes[`base${capitalize(position)}`] = height;
|
||
if (needsHydration) {
|
||
debouncedHydrateRowsMeta();
|
||
}
|
||
}, [debouncedHydrateRowsMeta]);
|
||
const rowHasAutoHeight = React131.useCallback((id) => {
|
||
var _rowsHeightLookup$cur2;
|
||
return ((_rowsHeightLookup$cur2 = rowsHeightLookup.current[id]) == null ? void 0 : _rowsHeightLookup$cur2.autoHeight) || false;
|
||
}, []);
|
||
const getLastMeasuredRowIndex = React131.useCallback(() => {
|
||
return lastMeasuredRowIndex.current;
|
||
}, []);
|
||
const setLastMeasuredRowIndex = React131.useCallback((index) => {
|
||
if (hasRowWithAutoHeight.current && index > lastMeasuredRowIndex.current) {
|
||
lastMeasuredRowIndex.current = index;
|
||
}
|
||
}, []);
|
||
const resetRowHeights = React131.useCallback(() => {
|
||
rowsHeightLookup.current = {};
|
||
hydrateRowsMeta();
|
||
}, [hydrateRowsMeta]);
|
||
React131.useEffect(() => {
|
||
hydrateRowsMeta();
|
||
}, [rowHeight, filterModel, paginationState, sortModel, hydrateRowsMeta]);
|
||
useGridRegisterPipeApplier(apiRef, "rowHeight", hydrateRowsMeta);
|
||
const rowsMetaApi = {
|
||
unstable_setLastMeasuredRowIndex: setLastMeasuredRowIndex,
|
||
unstable_getRowHeight: getRowHeight,
|
||
unstable_getRowInternalSizes: getRowInternalSizes,
|
||
unstable_setRowHeight: setRowHeight,
|
||
unstable_storeRowHeightMeasurement: storeMeasuredRowHeight,
|
||
resetRowHeights
|
||
};
|
||
const rowsMetaPrivateApi = {
|
||
getLastMeasuredRowIndex,
|
||
rowHasAutoHeight
|
||
};
|
||
useGridApiMethod(apiRef, rowsMetaApi, "public");
|
||
useGridApiMethod(apiRef, rowsMetaPrivateApi, "private");
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/statePersistence/useGridStatePersistence.js
|
||
var React132 = __toESM(require_react());
|
||
var useGridStatePersistence = (apiRef) => {
|
||
const exportState = React132.useCallback((params = {}) => {
|
||
const stateToExport = apiRef.current.unstable_applyPipeProcessors("exportState", {}, params);
|
||
return stateToExport;
|
||
}, [apiRef]);
|
||
const restoreState = React132.useCallback((stateToRestore) => {
|
||
const response = apiRef.current.unstable_applyPipeProcessors("restoreState", {
|
||
callbacks: []
|
||
}, {
|
||
stateToRestore
|
||
});
|
||
response.callbacks.forEach((callback) => {
|
||
callback();
|
||
});
|
||
apiRef.current.forceUpdate();
|
||
}, [apiRef]);
|
||
const statePersistenceApi = {
|
||
exportState,
|
||
restoreState
|
||
};
|
||
useGridApiMethod(apiRef, statePersistenceApi, "public");
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columns/useGridColumnSpanning.js
|
||
var React133 = __toESM(require_react());
|
||
var useGridColumnSpanning = (apiRef) => {
|
||
const lookup = React133.useRef({});
|
||
const setCellColSpanInfo = React133.useCallback((rowId, columnIndex, cellColSpanInfo) => {
|
||
const sizes = lookup.current;
|
||
if (!sizes[rowId]) {
|
||
sizes[rowId] = {};
|
||
}
|
||
sizes[rowId][columnIndex] = cellColSpanInfo;
|
||
}, []);
|
||
const getCellColSpanInfo = React133.useCallback((rowId, columnIndex) => {
|
||
var _lookup$current$rowId;
|
||
return (_lookup$current$rowId = lookup.current[rowId]) == null ? void 0 : _lookup$current$rowId[columnIndex];
|
||
}, []);
|
||
const calculateCellColSpan = React133.useCallback((params) => {
|
||
const {
|
||
columnIndex,
|
||
rowId,
|
||
minFirstColumnIndex,
|
||
maxLastColumnIndex,
|
||
columns
|
||
} = params;
|
||
const columnsLength = columns.length;
|
||
const column = columns[columnIndex];
|
||
const colSpan = typeof column.colSpan === "function" ? column.colSpan(apiRef.current.getCellParams(rowId, column.field)) : column.colSpan;
|
||
if (!colSpan || colSpan === 1) {
|
||
setCellColSpanInfo(rowId, columnIndex, {
|
||
spannedByColSpan: false,
|
||
cellProps: {
|
||
colSpan: 1,
|
||
width: column.computedWidth
|
||
}
|
||
});
|
||
return {
|
||
colSpan: 1
|
||
};
|
||
}
|
||
let width = column.computedWidth;
|
||
for (let j = 1; j < colSpan; j += 1) {
|
||
const nextColumnIndex = columnIndex + j;
|
||
if (nextColumnIndex >= minFirstColumnIndex && nextColumnIndex < maxLastColumnIndex) {
|
||
const nextColumn = columns[nextColumnIndex];
|
||
width += nextColumn.computedWidth;
|
||
setCellColSpanInfo(rowId, columnIndex + j, {
|
||
spannedByColSpan: true,
|
||
rightVisibleCellIndex: Math.min(columnIndex + colSpan, columnsLength - 1),
|
||
leftVisibleCellIndex: columnIndex
|
||
});
|
||
}
|
||
setCellColSpanInfo(rowId, columnIndex, {
|
||
spannedByColSpan: false,
|
||
cellProps: {
|
||
colSpan,
|
||
width
|
||
}
|
||
});
|
||
}
|
||
return {
|
||
colSpan
|
||
};
|
||
}, [apiRef, setCellColSpanInfo]);
|
||
const calculateColSpan = React133.useCallback(({
|
||
rowId,
|
||
minFirstColumn,
|
||
maxLastColumn,
|
||
columns
|
||
}) => {
|
||
for (let i = minFirstColumn; i < maxLastColumn; i += 1) {
|
||
const cellProps = calculateCellColSpan({
|
||
columnIndex: i,
|
||
rowId,
|
||
minFirstColumnIndex: minFirstColumn,
|
||
maxLastColumnIndex: maxLastColumn,
|
||
columns
|
||
});
|
||
if (cellProps.colSpan > 1) {
|
||
i += cellProps.colSpan - 1;
|
||
}
|
||
}
|
||
}, [calculateCellColSpan]);
|
||
const columnSpanningPublicApi = {
|
||
unstable_getCellColSpanInfo: getCellColSpanInfo
|
||
};
|
||
const columnSpanningPrivateApi = {
|
||
calculateColSpan
|
||
};
|
||
useGridApiMethod(apiRef, columnSpanningPublicApi, "public");
|
||
useGridApiMethod(apiRef, columnSpanningPrivateApi, "private");
|
||
const handleColumnReorderChange = React133.useCallback(() => {
|
||
lookup.current = {};
|
||
}, []);
|
||
useGridApiEventHandler(apiRef, "columnOrderChange", handleColumnReorderChange);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columnGrouping/useGridColumnGrouping.js
|
||
init_extends();
|
||
var React134 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columnGrouping/gridColumnGroupsUtils.js
|
||
var recurrentUnwrapGroupingColumnModel = (columnGroupNode, parents, unwrappedGroupingModelToComplete) => {
|
||
if (isLeaf(columnGroupNode)) {
|
||
if (unwrappedGroupingModelToComplete[columnGroupNode.field] !== void 0) {
|
||
throw new Error([`MUI: columnGroupingModel contains duplicated field`, `column field ${columnGroupNode.field} occurs two times in the grouping model:`, `- ${unwrappedGroupingModelToComplete[columnGroupNode.field].join(" > ")}`, `- ${parents.join(" > ")}`].join("\n"));
|
||
}
|
||
unwrappedGroupingModelToComplete[columnGroupNode.field] = parents;
|
||
return;
|
||
}
|
||
const {
|
||
groupId,
|
||
children
|
||
} = columnGroupNode;
|
||
children.forEach((child) => {
|
||
recurrentUnwrapGroupingColumnModel(child, [...parents, groupId], unwrappedGroupingModelToComplete);
|
||
});
|
||
};
|
||
var unwrapGroupingColumnModel = (columnGroupingModel) => {
|
||
if (!columnGroupingModel) {
|
||
return {};
|
||
}
|
||
const unwrappedSubTree = {};
|
||
columnGroupingModel.forEach((columnGroupNode) => {
|
||
recurrentUnwrapGroupingColumnModel(columnGroupNode, [], unwrappedSubTree);
|
||
});
|
||
return unwrappedSubTree;
|
||
};
|
||
var getColumnGroupsHeaderStructure = (orderedColumns, unwrappedGroupingModel, pinnedFields) => {
|
||
const getParents = (field) => {
|
||
var _unwrappedGroupingMod;
|
||
return (_unwrappedGroupingMod = unwrappedGroupingModel[field]) != null ? _unwrappedGroupingMod : [];
|
||
};
|
||
const groupingHeaderStructure = [];
|
||
const maxDepth = Math.max(...orderedColumns.map((field) => getParents(field).length));
|
||
const haveSameParents = (field1, field2, depth) => isDeepEqual(getParents(field1).slice(0, depth + 1), getParents(field2).slice(0, depth + 1));
|
||
const haveDifferentContainers = (field1, field2) => {
|
||
if (pinnedFields != null && pinnedFields.left && pinnedFields.left.includes(field1) && !pinnedFields.left.includes(field2)) {
|
||
return true;
|
||
}
|
||
if (pinnedFields != null && pinnedFields.right && !pinnedFields.right.includes(field1) && pinnedFields.right.includes(field2)) {
|
||
return true;
|
||
}
|
||
return false;
|
||
};
|
||
for (let depth = 0; depth < maxDepth; depth += 1) {
|
||
const depthStructure = orderedColumns.reduce((structure, newField) => {
|
||
var _getParents$depth;
|
||
const groupId = (_getParents$depth = getParents(newField)[depth]) != null ? _getParents$depth : null;
|
||
if (structure.length === 0) {
|
||
return [{
|
||
columnFields: [newField],
|
||
groupId
|
||
}];
|
||
}
|
||
const lastGroup = structure[structure.length - 1];
|
||
const prevField = lastGroup.columnFields[lastGroup.columnFields.length - 1];
|
||
const prevGroupId = lastGroup.groupId;
|
||
if (prevGroupId !== groupId || !haveSameParents(prevField, newField, depth) || // Fix for https://github.com/mui/mui-x/issues/7041
|
||
haveDifferentContainers(prevField, newField)) {
|
||
return [...structure, {
|
||
columnFields: [newField],
|
||
groupId
|
||
}];
|
||
}
|
||
return [...structure.slice(0, structure.length - 1), {
|
||
columnFields: [...lastGroup.columnFields, newField],
|
||
groupId
|
||
}];
|
||
}, []);
|
||
groupingHeaderStructure.push(depthStructure);
|
||
}
|
||
return groupingHeaderStructure;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/hooks/features/columnGrouping/useGridColumnGrouping.js
|
||
var _excluded62 = ["groupId", "children"];
|
||
var createGroupLookup = (columnGroupingModel) => {
|
||
let groupLookup = {};
|
||
columnGroupingModel.forEach((node) => {
|
||
if (isLeaf(node)) {
|
||
return;
|
||
}
|
||
const {
|
||
groupId,
|
||
children
|
||
} = node, other = _objectWithoutPropertiesLoose(node, _excluded62);
|
||
if (!groupId) {
|
||
throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");
|
||
}
|
||
if (!children) {
|
||
console.warn(`MUI: group groupId=${groupId} has no children.`);
|
||
}
|
||
const groupParam = _extends({}, other, {
|
||
groupId
|
||
});
|
||
const subTreeLookup = createGroupLookup(children);
|
||
if (subTreeLookup[groupId] !== void 0 || groupLookup[groupId] !== void 0) {
|
||
throw new Error(`MUI: The groupId ${groupId} is used multiple times in the columnGroupingModel.`);
|
||
}
|
||
groupLookup = _extends({}, groupLookup, subTreeLookup, {
|
||
[groupId]: groupParam
|
||
});
|
||
});
|
||
return _extends({}, groupLookup);
|
||
};
|
||
var columnGroupsStateInitializer = (state, props, apiRef) => {
|
||
var _props$experimentalFe, _props$columnGrouping, _props$columnGrouping2, _apiRef$current$state;
|
||
if (!((_props$experimentalFe = props.experimentalFeatures) != null && _props$experimentalFe.columnGrouping)) {
|
||
return state;
|
||
}
|
||
const columnFields = gridColumnFieldsSelector(apiRef);
|
||
const visibleColumnFields = gridVisibleColumnFieldsSelector(apiRef);
|
||
const groupLookup = createGroupLookup((_props$columnGrouping = props.columnGroupingModel) != null ? _props$columnGrouping : []);
|
||
const unwrappedGroupingModel = unwrapGroupingColumnModel((_props$columnGrouping2 = props.columnGroupingModel) != null ? _props$columnGrouping2 : []);
|
||
const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(
|
||
columnFields,
|
||
unwrappedGroupingModel,
|
||
// @ts-expect-error Move this part to `Pro` package
|
||
(_apiRef$current$state = apiRef.current.state.pinnedColumns) != null ? _apiRef$current$state : {}
|
||
);
|
||
const maxDepth = visibleColumnFields.length === 0 ? 0 : Math.max(...visibleColumnFields.map((field) => {
|
||
var _unwrappedGroupingMod, _unwrappedGroupingMod2;
|
||
return (_unwrappedGroupingMod = (_unwrappedGroupingMod2 = unwrappedGroupingModel[field]) == null ? void 0 : _unwrappedGroupingMod2.length) != null ? _unwrappedGroupingMod : 0;
|
||
}));
|
||
return _extends({}, state, {
|
||
columnGrouping: {
|
||
lookup: groupLookup,
|
||
unwrappedGroupingModel,
|
||
headerStructure: columnGroupsHeaderStructure,
|
||
maxDepth
|
||
}
|
||
});
|
||
};
|
||
var useGridColumnGrouping = (apiRef, props) => {
|
||
var _props$experimentalFe3;
|
||
const getColumnGroupPath = React134.useCallback((field) => {
|
||
var _unwrappedGroupingMod3;
|
||
const unwrappedGroupingModel = gridColumnGroupsUnwrappedModelSelector(apiRef);
|
||
return (_unwrappedGroupingMod3 = unwrappedGroupingModel[field]) != null ? _unwrappedGroupingMod3 : [];
|
||
}, [apiRef]);
|
||
const getAllGroupDetails = React134.useCallback(() => {
|
||
const columnGroupLookup = gridColumnGroupsLookupSelector(apiRef);
|
||
return columnGroupLookup;
|
||
}, [apiRef]);
|
||
const columnGroupingApi = {
|
||
unstable_getColumnGroupPath: getColumnGroupPath,
|
||
unstable_getAllGroupDetails: getAllGroupDetails
|
||
};
|
||
useGridApiMethod(apiRef, columnGroupingApi, "public");
|
||
const handleColumnIndexChange = React134.useCallback(() => {
|
||
var _props$columnGrouping3;
|
||
const unwrappedGroupingModel = unwrapGroupingColumnModel((_props$columnGrouping3 = props.columnGroupingModel) != null ? _props$columnGrouping3 : []);
|
||
apiRef.current.setState((state) => {
|
||
var _state$columns$ordere, _state$columns, _state$pinnedColumns;
|
||
const orderedFields = (_state$columns$ordere = (_state$columns = state.columns) == null ? void 0 : _state$columns.orderedFields) != null ? _state$columns$ordere : [];
|
||
const pinnedColumns = (_state$pinnedColumns = state.pinnedColumns) != null ? _state$pinnedColumns : {};
|
||
const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(orderedFields, unwrappedGroupingModel, pinnedColumns);
|
||
return _extends({}, state, {
|
||
columnGrouping: _extends({}, state.columnGrouping, {
|
||
headerStructure: columnGroupsHeaderStructure
|
||
})
|
||
});
|
||
});
|
||
}, [apiRef, props.columnGroupingModel]);
|
||
const updateColumnGroupingState = React134.useCallback((columnGroupingModel) => {
|
||
var _props$experimentalFe2, _apiRef$current$getPi, _apiRef$current$getPi2, _apiRef$current;
|
||
if (!((_props$experimentalFe2 = props.experimentalFeatures) != null && _props$experimentalFe2.columnGrouping)) {
|
||
return;
|
||
}
|
||
const pinnedColumns = (_apiRef$current$getPi = (_apiRef$current$getPi2 = (_apiRef$current = apiRef.current).getPinnedColumns) == null ? void 0 : _apiRef$current$getPi2.call(_apiRef$current)) != null ? _apiRef$current$getPi : {};
|
||
const columnFields = gridColumnFieldsSelector(apiRef);
|
||
const visibleColumnFields = gridVisibleColumnFieldsSelector(apiRef);
|
||
const groupLookup = createGroupLookup(columnGroupingModel != null ? columnGroupingModel : []);
|
||
const unwrappedGroupingModel = unwrapGroupingColumnModel(columnGroupingModel != null ? columnGroupingModel : []);
|
||
const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel, pinnedColumns);
|
||
const maxDepth = visibleColumnFields.length === 0 ? 0 : Math.max(...visibleColumnFields.map((field) => {
|
||
var _unwrappedGroupingMod4, _unwrappedGroupingMod5;
|
||
return (_unwrappedGroupingMod4 = (_unwrappedGroupingMod5 = unwrappedGroupingModel[field]) == null ? void 0 : _unwrappedGroupingMod5.length) != null ? _unwrappedGroupingMod4 : 0;
|
||
}));
|
||
apiRef.current.setState((state) => {
|
||
return _extends({}, state, {
|
||
columnGrouping: {
|
||
lookup: groupLookup,
|
||
unwrappedGroupingModel,
|
||
headerStructure: columnGroupsHeaderStructure,
|
||
maxDepth
|
||
}
|
||
});
|
||
});
|
||
}, [apiRef, (_props$experimentalFe3 = props.experimentalFeatures) == null ? void 0 : _props$experimentalFe3.columnGrouping]);
|
||
useGridApiEventHandler(apiRef, "columnIndexChange", handleColumnIndexChange);
|
||
useGridApiEventHandler(apiRef, "columnsChange", () => {
|
||
updateColumnGroupingState(props.columnGroupingModel);
|
||
});
|
||
useGridApiEventHandler(apiRef, "columnVisibilityModelChange", () => {
|
||
updateColumnGroupingState(props.columnGroupingModel);
|
||
});
|
||
React134.useEffect(() => {
|
||
updateColumnGroupingState(props.columnGroupingModel);
|
||
}, [updateColumnGroupingState, props.columnGroupingModel]);
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/DataGrid/useDataGridComponent.js
|
||
var useDataGridComponent = (inputApiRef, props) => {
|
||
const apiRef = useGridInitialization(inputApiRef, props);
|
||
useGridRowSelectionPreProcessors(apiRef, props);
|
||
useGridRowsPreProcessors(apiRef);
|
||
useGridInitializeState(rowSelectionStateInitializer, apiRef, props);
|
||
useGridInitializeState(columnsStateInitializer, apiRef, props);
|
||
useGridInitializeState(rowsStateInitializer, apiRef, props);
|
||
useGridInitializeState(editingStateInitializer, apiRef, props);
|
||
useGridInitializeState(focusStateInitializer, apiRef, props);
|
||
useGridInitializeState(sortingStateInitializer, apiRef, props);
|
||
useGridInitializeState(preferencePanelStateInitializer, apiRef, props);
|
||
useGridInitializeState(filterStateInitializer, apiRef, props);
|
||
useGridInitializeState(densityStateInitializer, apiRef, props);
|
||
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
||
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
||
useGridInitializeState(columnMenuStateInitializer, apiRef, props);
|
||
useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
|
||
useGridInitializeState(virtualizationStateInitializer, apiRef, props);
|
||
useGridKeyboardNavigation(apiRef, props);
|
||
useGridRowSelection(apiRef, props);
|
||
useGridColumns(apiRef, props);
|
||
useGridRows(apiRef, props);
|
||
useGridParamsApi(apiRef, props);
|
||
useGridColumnSpanning(apiRef);
|
||
useGridColumnGrouping(apiRef, props);
|
||
useGridEditing(apiRef, props);
|
||
useGridFocus(apiRef, props);
|
||
useGridPreferencesPanel(apiRef, props);
|
||
useGridFilter(apiRef, props);
|
||
useGridSorting(apiRef, props);
|
||
useGridDensity(apiRef, props);
|
||
useGridPagination(apiRef, props);
|
||
useGridRowsMeta(apiRef, props);
|
||
useGridScroll(apiRef, props);
|
||
useGridColumnMenu(apiRef);
|
||
useGridCsvExport(apiRef, props);
|
||
useGridPrintExport(apiRef, props);
|
||
useGridClipboard(apiRef, props);
|
||
useGridDimensions(apiRef, props);
|
||
useGridEvents(apiRef, props);
|
||
useGridStatePersistence(apiRef);
|
||
useGridVirtualization(apiRef, props);
|
||
return apiRef;
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/components/DataGridVirtualScroller.js
|
||
init_extends();
|
||
var React138 = __toESM(require_react());
|
||
|
||
// node_modules/@mui/x-data-grid/components/virtualization/GridVirtualScroller.js
|
||
init_extends();
|
||
var React135 = __toESM(require_react());
|
||
var import_jsx_runtime108 = __toESM(require_jsx_runtime());
|
||
var useUtilityClasses37 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["virtualScroller"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var VirtualScrollerRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "VirtualScroller",
|
||
overridesResolver: (props, styles) => styles.virtualScroller
|
||
})({
|
||
overflow: "auto",
|
||
height: "100%",
|
||
// See https://github.com/mui/mui-x/issues/4360
|
||
position: "relative",
|
||
"@media print": {
|
||
overflow: "hidden"
|
||
},
|
||
zIndex: 0
|
||
// See https://github.com/mui/mui-x/issues/10547
|
||
});
|
||
var GridVirtualScroller = React135.forwardRef(function GridVirtualScroller2(props, ref) {
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses37(rootProps);
|
||
return (0, import_jsx_runtime108.jsx)(VirtualScrollerRoot, _extends({
|
||
ref
|
||
}, props, {
|
||
className: clsx_default(classes.root, props.className),
|
||
ownerState: rootProps
|
||
}));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/virtualization/GridVirtualScrollerContent.js
|
||
init_extends();
|
||
var React136 = __toESM(require_react());
|
||
var import_jsx_runtime109 = __toESM(require_jsx_runtime());
|
||
var useUtilityClasses38 = (props, overflowedContent) => {
|
||
const {
|
||
classes
|
||
} = props;
|
||
const slots = {
|
||
root: ["virtualScrollerContent", overflowedContent && "virtualScrollerContent--overflowed"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var VirtualScrollerContentRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "VirtualScrollerContent",
|
||
overridesResolver: (props, styles) => styles.virtualScrollerContent
|
||
})({});
|
||
var GridVirtualScrollerContent = React136.forwardRef(function GridVirtualScrollerContent2(props, ref) {
|
||
var _props$style;
|
||
const rootProps = useGridRootProps();
|
||
const overflowedContent = !rootProps.autoHeight && ((_props$style = props.style) == null ? void 0 : _props$style.minHeight) === "auto";
|
||
const classes = useUtilityClasses38(rootProps, overflowedContent);
|
||
return (0, import_jsx_runtime109.jsx)(VirtualScrollerContentRoot, _extends({
|
||
ref
|
||
}, props, {
|
||
ownerState: rootProps,
|
||
className: clsx_default(classes.root, props.className)
|
||
}));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/virtualization/GridVirtualScrollerRenderZone.js
|
||
init_extends();
|
||
var React137 = __toESM(require_react());
|
||
var import_jsx_runtime110 = __toESM(require_jsx_runtime());
|
||
var _excluded63 = ["className"];
|
||
var useUtilityClasses39 = (ownerState) => {
|
||
const {
|
||
classes
|
||
} = ownerState;
|
||
const slots = {
|
||
root: ["virtualScrollerRenderZone"]
|
||
};
|
||
return composeClasses(slots, getDataGridUtilityClass, classes);
|
||
};
|
||
var VirtualScrollerRenderZoneRoot = styled_default("div", {
|
||
name: "MuiDataGrid",
|
||
slot: "VirtualScrollerRenderZone",
|
||
overridesResolver: (props, styles) => styles.virtualScrollerRenderZone
|
||
})({
|
||
position: "absolute",
|
||
display: "flex",
|
||
// Prevents margin collapsing when using `getRowSpacing`
|
||
flexDirection: "column"
|
||
});
|
||
var GridVirtualScrollerRenderZone = React137.forwardRef(function GridVirtualScrollerRenderZone2(props, ref) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded63);
|
||
const rootProps = useGridRootProps();
|
||
const classes = useUtilityClasses39(rootProps);
|
||
return (0, import_jsx_runtime110.jsx)(VirtualScrollerRenderZoneRoot, _extends({
|
||
ref,
|
||
className: clsx_default(classes.root, className),
|
||
ownerState: rootProps
|
||
}, other));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/components/DataGridVirtualScroller.js
|
||
var import_jsx_runtime111 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime112 = __toESM(require_jsx_runtime());
|
||
var _excluded64 = ["className"];
|
||
var DataGridVirtualScroller = React138.forwardRef(function DataGridVirtualScroller2(props, ref) {
|
||
const {
|
||
className
|
||
} = props, other = _objectWithoutPropertiesLoose(props, _excluded64);
|
||
const {
|
||
getRootProps,
|
||
getContentProps,
|
||
getRenderZoneProps,
|
||
getRows
|
||
} = useGridVirtualScroller({
|
||
ref
|
||
});
|
||
return (0, import_jsx_runtime112.jsxs)(GridVirtualScroller, _extends({
|
||
className
|
||
}, getRootProps(other), {
|
||
children: [(0, import_jsx_runtime111.jsx)(GridOverlays, {}), (0, import_jsx_runtime111.jsx)(GridVirtualScrollerContent, _extends({}, getContentProps(), {
|
||
children: (0, import_jsx_runtime111.jsx)(GridVirtualScrollerRenderZone, _extends({}, getRenderZoneProps(), {
|
||
children: getRows()
|
||
}))
|
||
}))]
|
||
}));
|
||
});
|
||
|
||
// node_modules/@mui/x-data-grid/DataGrid/DataGrid.js
|
||
var import_jsx_runtime113 = __toESM(require_jsx_runtime());
|
||
var import_jsx_runtime114 = __toESM(require_jsx_runtime());
|
||
var DataGridRaw = React139.forwardRef(function DataGrid(inProps, ref) {
|
||
const props = useDataGridProps(inProps);
|
||
const privateApiRef = useDataGridComponent(props.apiRef, props);
|
||
return (0, import_jsx_runtime113.jsx)(GridContextProvider, {
|
||
privateApiRef,
|
||
props,
|
||
children: (0, import_jsx_runtime114.jsxs)(GridRoot, _extends({
|
||
className: props.className,
|
||
style: props.style,
|
||
sx: props.sx,
|
||
ref
|
||
}, props.forwardedProps, {
|
||
children: [(0, import_jsx_runtime113.jsx)(GridHeader, {}), (0, import_jsx_runtime113.jsx)(GridBody, {
|
||
VirtualScrollerComponent: DataGridVirtualScroller
|
||
}), (0, import_jsx_runtime113.jsx)(GridFooterPlaceholder, {})]
|
||
}))
|
||
});
|
||
});
|
||
var DataGrid2 = React139.memo(DataGridRaw);
|
||
var SUBMIT_FILTER_STROKE_TIME = DATA_GRID_PROPS_DEFAULT_VALUES.filterDebounceMs;
|
||
var SUBMIT_FILTER_DATE_STROKE_TIME = DATA_GRID_PROPS_DEFAULT_VALUES.filterDebounceMs;
|
||
DataGridRaw.propTypes = {
|
||
// ----------------------------- Warning --------------------------------
|
||
// | These PropTypes are generated from the TypeScript type definitions |
|
||
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
||
// ----------------------------------------------------------------------
|
||
/**
|
||
* The ref object that allows Data Grid manipulation. Can be instantiated with `useGridApiRef()`.
|
||
*/
|
||
apiRef: import_prop_types58.default.shape({
|
||
current: import_prop_types58.default.object.isRequired
|
||
}),
|
||
/**
|
||
* The label of the Data Grid.
|
||
*/
|
||
"aria-label": import_prop_types58.default.string,
|
||
/**
|
||
* The id of the element containing a label for the Data Grid.
|
||
*/
|
||
"aria-labelledby": import_prop_types58.default.string,
|
||
/**
|
||
* If `true`, the Data Grid height is dynamic and follow the number of rows in the Data Grid.
|
||
* @default false
|
||
*/
|
||
autoHeight: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, the pageSize is calculated according to the container size and the max number of rows to avoid rendering a vertical scroll bar.
|
||
* @default false
|
||
*/
|
||
autoPageSize: import_prop_types58.default.bool,
|
||
/**
|
||
* Controls the modes of the cells.
|
||
*/
|
||
cellModesModel: import_prop_types58.default.object,
|
||
/**
|
||
* If `true`, the Data Grid will display an extra column with checkboxes for selecting rows.
|
||
* @default false
|
||
*/
|
||
checkboxSelection: import_prop_types58.default.bool,
|
||
/**
|
||
* Override or extend the styles applied to the component.
|
||
*/
|
||
classes: import_prop_types58.default.object,
|
||
/**
|
||
* The character used to separate cell values when copying to the clipboard.
|
||
* @default '\t'
|
||
*/
|
||
clipboardCopyCellDelimiter: import_prop_types58.default.string,
|
||
/**
|
||
* Number of extra columns to be rendered before/after the visible slice.
|
||
* @default 3
|
||
*/
|
||
columnBuffer: import_prop_types58.default.number,
|
||
columnGroupingModel: import_prop_types58.default.arrayOf(import_prop_types58.default.object),
|
||
/**
|
||
* Sets the height in pixel of the column headers in the Data Grid.
|
||
* @default 56
|
||
*/
|
||
columnHeaderHeight: import_prop_types58.default.number,
|
||
/**
|
||
* Set of columns of type [[GridColDef[]]].
|
||
*/
|
||
columns: chainPropTypes(import_prop_types58.default.array.isRequired, (props) => {
|
||
if (props.columns && props.columns.some((column) => column.resizable)) {
|
||
return new Error([`MUI: \`column.resizable = true\` is not a valid prop.`, "Column resizing is not available in the MIT version.", "", "You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join("\n"));
|
||
}
|
||
return null;
|
||
}),
|
||
/**
|
||
* Number of rows from the `columnBuffer` that can be visible before a new slice is rendered.
|
||
* @default 3
|
||
*/
|
||
columnThreshold: import_prop_types58.default.number,
|
||
/**
|
||
* Set the column visibility model of the Data Grid.
|
||
* If defined, the Data Grid will ignore the `hide` property in [[GridColDef]].
|
||
*/
|
||
columnVisibilityModel: import_prop_types58.default.object,
|
||
/**
|
||
* Overridable components.
|
||
* @deprecated Use `slots` instead.
|
||
*/
|
||
components: import_prop_types58.default.object,
|
||
/**
|
||
* Overridable components props dynamically passed to the component at rendering.
|
||
* @deprecated Use the `slotProps` prop instead.
|
||
*/
|
||
componentsProps: import_prop_types58.default.object,
|
||
/**
|
||
* Set the density of the Data Grid.
|
||
* @default "standard"
|
||
*/
|
||
density: import_prop_types58.default.oneOf(["comfortable", "compact", "standard"]),
|
||
/**
|
||
* If `true`, column filters are disabled.
|
||
* @default false
|
||
*/
|
||
disableColumnFilter: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, the column menu is disabled.
|
||
* @default false
|
||
*/
|
||
disableColumnMenu: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, hiding/showing columns is disabled.
|
||
* @default false
|
||
*/
|
||
disableColumnSelector: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, the density selector is disabled.
|
||
* @default false
|
||
*/
|
||
disableDensitySelector: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, `eval()` is not used for performance optimization.
|
||
* @default false
|
||
*/
|
||
disableEval: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, the selection on click on a row or cell is disabled.
|
||
* @default false
|
||
*/
|
||
disableRowSelectionOnClick: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, the virtualization is disabled.
|
||
* @default false
|
||
*/
|
||
disableVirtualization: import_prop_types58.default.bool,
|
||
/**
|
||
* Controls whether to use the cell or row editing.
|
||
* @default "cell"
|
||
*/
|
||
editMode: import_prop_types58.default.oneOf(["cell", "row"]),
|
||
/**
|
||
* Unstable features, breaking changes might be introduced.
|
||
* For each feature, if the flag is not explicitly set to `true`, the feature will be fully disabled and any property / method call will not have any effect.
|
||
*/
|
||
experimentalFeatures: import_prop_types58.default.shape({
|
||
ariaV7: import_prop_types58.default.bool,
|
||
columnGrouping: import_prop_types58.default.bool,
|
||
warnIfFocusStateIsNotSynced: import_prop_types58.default.bool
|
||
}),
|
||
/**
|
||
* The milliseconds delay to wait after a keystroke before triggering filtering.
|
||
* @default 150
|
||
*/
|
||
filterDebounceMs: import_prop_types58.default.number,
|
||
/**
|
||
* Filtering can be processed on the server or client-side.
|
||
* Set it to 'server' if you would like to handle filtering on the server-side.
|
||
* @default "client"
|
||
*/
|
||
filterMode: import_prop_types58.default.oneOf(["client", "server"]),
|
||
/**
|
||
* Set the filter model of the Data Grid.
|
||
*/
|
||
filterModel: import_prop_types58.default.shape({
|
||
items: import_prop_types58.default.arrayOf(import_prop_types58.default.shape({
|
||
field: import_prop_types58.default.string.isRequired,
|
||
id: import_prop_types58.default.oneOfType([import_prop_types58.default.number, import_prop_types58.default.string]),
|
||
operator: import_prop_types58.default.string.isRequired,
|
||
value: import_prop_types58.default.any
|
||
})).isRequired,
|
||
logicOperator: import_prop_types58.default.oneOf(["and", "or"]),
|
||
quickFilterExcludeHiddenColumns: import_prop_types58.default.bool,
|
||
quickFilterLogicOperator: import_prop_types58.default.oneOf(["and", "or"]),
|
||
quickFilterValues: import_prop_types58.default.array
|
||
}),
|
||
/**
|
||
* Forwarded props for the Data Grid root element.
|
||
* @ignore - do not document.
|
||
*/
|
||
forwardedProps: import_prop_types58.default.object,
|
||
/**
|
||
* Function that applies CSS classes dynamically on cells.
|
||
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
||
* @returns {string} The CSS class to apply to the cell.
|
||
*/
|
||
getCellClassName: import_prop_types58.default.func,
|
||
/**
|
||
* Function that returns the element to render in row detail.
|
||
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
||
* @returns {React.JSX.Element} The row detail element.
|
||
*/
|
||
getDetailPanelContent: import_prop_types58.default.func,
|
||
/**
|
||
* Function that returns the estimated height for a row.
|
||
* Only works if dynamic row height is used.
|
||
* Once the row height is measured this value is discarded.
|
||
* @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].
|
||
* @returns {number | null} The estimated row height value. If `null` or `undefined` then the default row height, based on the density, is applied.
|
||
*/
|
||
getEstimatedRowHeight: import_prop_types58.default.func,
|
||
/**
|
||
* Function that applies CSS classes dynamically on rows.
|
||
* @param {GridRowClassNameParams} params With all properties from [[GridRowClassNameParams]].
|
||
* @returns {string} The CSS class to apply to the row.
|
||
*/
|
||
getRowClassName: import_prop_types58.default.func,
|
||
/**
|
||
* Function that sets the row height per row.
|
||
* @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].
|
||
* @returns {GridRowHeightReturnValue} The row height value. If `null` or `undefined` then the default row height is applied. If "auto" then the row height is calculated based on the content.
|
||
*/
|
||
getRowHeight: import_prop_types58.default.func,
|
||
/**
|
||
* Return the id of a given [[GridRowModel]].
|
||
*/
|
||
getRowId: import_prop_types58.default.func,
|
||
/**
|
||
* Function that allows to specify the spacing between rows.
|
||
* @param {GridRowSpacingParams} params With all properties from [[GridRowSpacingParams]].
|
||
* @returns {GridRowSpacing} The row spacing values.
|
||
*/
|
||
getRowSpacing: import_prop_types58.default.func,
|
||
/**
|
||
* If `true`, the footer component is hidden.
|
||
* @default false
|
||
*/
|
||
hideFooter: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, the pagination component in the footer is hidden.
|
||
* @default false
|
||
*/
|
||
hideFooterPagination: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, the selected row count in the footer is hidden.
|
||
* @default false
|
||
*/
|
||
hideFooterSelectedRowCount: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
|
||
* E.g. when filter value is `cafe`, the rows with `café` will be visible.
|
||
* @default false
|
||
*/
|
||
ignoreDiacritics: import_prop_types58.default.bool,
|
||
/**
|
||
* The initial state of the DataGrid.
|
||
* The data in it will be set in the state on initialization but will not be controlled.
|
||
* If one of the data in `initialState` is also being controlled, then the control state wins.
|
||
*/
|
||
initialState: import_prop_types58.default.object,
|
||
/**
|
||
* Callback fired when a cell is rendered, returns true if the cell is editable.
|
||
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
||
* @returns {boolean} A boolean indicating if the cell is editable.
|
||
*/
|
||
isCellEditable: import_prop_types58.default.func,
|
||
/**
|
||
* Determines if a row can be selected.
|
||
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
||
* @returns {boolean} A boolean indicating if the cell is selectable.
|
||
*/
|
||
isRowSelectable: import_prop_types58.default.func,
|
||
/**
|
||
* If `true`, the selection model will retain selected rows that do not exist.
|
||
* Useful when using server side pagination and row selections need to be retained
|
||
* when changing pages.
|
||
* @default false
|
||
*/
|
||
keepNonExistentRowsSelected: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, a loading overlay is displayed.
|
||
*/
|
||
loading: import_prop_types58.default.bool,
|
||
/**
|
||
* Set the locale text of the Data Grid.
|
||
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/v6.19.4/packages/grid/x-data-grid/src/constants/localeTextConstants.ts) in the GitHub repository.
|
||
*/
|
||
localeText: import_prop_types58.default.object,
|
||
/**
|
||
* Pass a custom logger in the components that implements the [[Logger]] interface.
|
||
* @default console
|
||
*/
|
||
logger: import_prop_types58.default.shape({
|
||
debug: import_prop_types58.default.func.isRequired,
|
||
error: import_prop_types58.default.func.isRequired,
|
||
info: import_prop_types58.default.func.isRequired,
|
||
warn: import_prop_types58.default.func.isRequired
|
||
}),
|
||
/**
|
||
* Allows to pass the logging level or false to turn off logging.
|
||
* @default "error" ("warn" in dev mode)
|
||
*/
|
||
logLevel: import_prop_types58.default.oneOf(["debug", "error", "info", "warn", false]),
|
||
/**
|
||
* Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute).
|
||
*/
|
||
nonce: import_prop_types58.default.string,
|
||
/**
|
||
* Callback fired when any cell is clicked.
|
||
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onCellClick: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a double click event comes from a cell element.
|
||
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onCellDoubleClick: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the cell turns to edit mode.
|
||
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
||
* @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.
|
||
*/
|
||
onCellEditStart: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the cell turns to view mode.
|
||
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
||
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
||
*/
|
||
onCellEditStop: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a keydown event comes from a cell element.
|
||
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
||
* @param {MuiEvent<React.KeyboardEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onCellKeyDown: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the `cellModesModel` prop changes.
|
||
* @param {GridCellModesModel} cellModesModel Object containing which cells are in "edit" mode.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onCellModesModelChange: import_prop_types58.default.func,
|
||
/**
|
||
* Callback called when the data is copied to the clipboard.
|
||
* @param {string} data The data copied to the clipboard.
|
||
*/
|
||
onClipboardCopy: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a click event comes from a column header element.
|
||
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onColumnHeaderClick: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a double click event comes from a column header element.
|
||
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onColumnHeaderDoubleClick: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a mouse enter event comes from a column header element.
|
||
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onColumnHeaderEnter: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a mouse leave event comes from a column header element.
|
||
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onColumnHeaderLeave: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a mouseout event comes from a column header element.
|
||
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onColumnHeaderOut: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a mouseover event comes from a column header element.
|
||
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onColumnHeaderOver: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a column is reordered.
|
||
* @param {GridColumnOrderChangeParams} params With all properties from [[GridColumnOrderChangeParams]].
|
||
* @param {MuiEvent<{}>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onColumnOrderChange: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the column visibility model changes.
|
||
* @param {GridColumnVisibilityModel} model The new model.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onColumnVisibilityModelChange: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the Filter model changes before the filters are applied.
|
||
* @param {GridFilterModel} model With all properties from [[GridFilterModel]].
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onFilterModelChange: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the menu is closed.
|
||
* @param {GridMenuParams} params With all properties from [[GridMenuParams]].
|
||
* @param {MuiEvent<{}>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onMenuClose: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the menu is opened.
|
||
* @param {GridMenuParams} params With all properties from [[GridMenuParams]].
|
||
* @param {MuiEvent<{}>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onMenuOpen: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the pagination model has changed.
|
||
* @param {GridPaginationModel} model Updated pagination model.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onPaginationModelChange: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the preferences panel is closed.
|
||
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
||
* @param {MuiEvent<{}>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onPreferencePanelClose: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the preferences panel is opened.
|
||
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
||
* @param {MuiEvent<{}>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onPreferencePanelOpen: import_prop_types58.default.func,
|
||
/**
|
||
* Callback called when `processRowUpdate` throws an error or rejects.
|
||
* @param {any} error The error thrown.
|
||
*/
|
||
onProcessRowUpdateError: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the Data Grid is resized.
|
||
* @param {ElementSize} containerSize With all properties from [[ElementSize]].
|
||
* @param {MuiEvent<{}>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onResize: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a row is clicked.
|
||
* Not called if the target clicked is an interactive element added by the built-in columns.
|
||
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onRowClick: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the row count has changed.
|
||
* @param {number} count Updated row count.
|
||
*/
|
||
onRowCountChange: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when a double click event comes from a row container element.
|
||
* @param {GridRowParams} params With all properties from [[RowParams]].
|
||
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onRowDoubleClick: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the row turns to edit mode.
|
||
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
||
* @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.
|
||
*/
|
||
onRowEditStart: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the row turns to view mode.
|
||
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
||
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
||
*/
|
||
onRowEditStop: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the `rowModesModel` prop changes.
|
||
* @param {GridRowModesModel} rowModesModel Object containing which rows are in "edit" mode.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onRowModesModelChange: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the selection state of one or multiple rows changes.
|
||
* @param {GridRowSelectionModel} rowSelectionModel With all the row ids [[GridSelectionModel]].
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onRowSelectionModelChange: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the sort model changes before a column is sorted.
|
||
* @param {GridSortModel} model With all properties from [[GridSortModel]].
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
*/
|
||
onSortModelChange: import_prop_types58.default.func,
|
||
/**
|
||
* Callback fired when the state of the Data Grid is updated.
|
||
* @param {GridState} state The new state.
|
||
* @param {MuiEvent<{}>} event The event object.
|
||
* @param {GridCallbackDetails} details Additional details for this callback.
|
||
* @ignore - do not document.
|
||
*/
|
||
onStateChange: import_prop_types58.default.func,
|
||
/**
|
||
* Select the pageSize dynamically using the component UI.
|
||
* @default [25, 50, 100]
|
||
*/
|
||
pageSizeOptions: import_prop_types58.default.arrayOf(import_prop_types58.default.oneOfType([import_prop_types58.default.number, import_prop_types58.default.shape({
|
||
label: import_prop_types58.default.string.isRequired,
|
||
value: import_prop_types58.default.number.isRequired
|
||
})]).isRequired),
|
||
pagination: (props) => {
|
||
if (props.pagination === false) {
|
||
return new Error(["MUI: `<DataGrid pagination={false} />` is not a valid prop.", "Infinite scrolling is not available in the MIT version.", "", "You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination."].join("\n"));
|
||
}
|
||
return null;
|
||
},
|
||
/**
|
||
* Pagination can be processed on the server or client-side.
|
||
* Set it to 'client' if you would like to handle the pagination on the client-side.
|
||
* Set it to 'server' if you would like to handle the pagination on the server-side.
|
||
* @default "client"
|
||
*/
|
||
paginationMode: import_prop_types58.default.oneOf(["client", "server"]),
|
||
/**
|
||
* The pagination model of type [[GridPaginationModel]] which refers to current `page` and `pageSize`.
|
||
*/
|
||
paginationModel: import_prop_types58.default.shape({
|
||
page: import_prop_types58.default.number.isRequired,
|
||
pageSize: import_prop_types58.default.number.isRequired
|
||
}),
|
||
/**
|
||
* Callback called before updating a row with new values in the row and cell editing.
|
||
* @template R
|
||
* @param {R} newRow Row object with the new values.
|
||
* @param {R} oldRow Row object with the old values.
|
||
* @returns {Promise<R> | R} The final values to update the row.
|
||
*/
|
||
processRowUpdate: import_prop_types58.default.func,
|
||
/**
|
||
* Number of extra rows to be rendered before/after the visible slice.
|
||
* @default 3
|
||
*/
|
||
rowBuffer: import_prop_types58.default.number,
|
||
/**
|
||
* Set the total number of rows, if it is different from the length of the value `rows` prop.
|
||
* If some rows have children (for instance in the tree data), this number represents the amount of top level rows.
|
||
*/
|
||
rowCount: import_prop_types58.default.number,
|
||
/**
|
||
* Sets the height in pixel of a row in the Data Grid.
|
||
* @default 52
|
||
*/
|
||
rowHeight: import_prop_types58.default.number,
|
||
/**
|
||
* Controls the modes of the rows.
|
||
*/
|
||
rowModesModel: import_prop_types58.default.object,
|
||
/**
|
||
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
||
* Setting it to a lower value could be useful when using dynamic row height,
|
||
* but might reduce performance when displaying a large number of rows.
|
||
* @default 166
|
||
*/
|
||
rowPositionsDebounceMs: import_prop_types58.default.number,
|
||
/**
|
||
* Set of rows of type [[GridRowsProp]].
|
||
*/
|
||
rows: import_prop_types58.default.arrayOf(import_prop_types58.default.object).isRequired,
|
||
/**
|
||
* If `false`, the row selection mode is disabled.
|
||
* @default true
|
||
*/
|
||
rowSelection: import_prop_types58.default.bool,
|
||
/**
|
||
* Sets the row selection model of the Data Grid.
|
||
*/
|
||
rowSelectionModel: import_prop_types58.default.oneOfType([import_prop_types58.default.arrayOf(import_prop_types58.default.oneOfType([import_prop_types58.default.number, import_prop_types58.default.string]).isRequired), import_prop_types58.default.number, import_prop_types58.default.string]),
|
||
/**
|
||
* Sets the type of space between rows added by `getRowSpacing`.
|
||
* @default "margin"
|
||
*/
|
||
rowSpacingType: import_prop_types58.default.oneOf(["border", "margin"]),
|
||
/**
|
||
* Number of rows from the `rowBuffer` that can be visible before a new slice is rendered.
|
||
* @default 3
|
||
*/
|
||
rowThreshold: import_prop_types58.default.number,
|
||
/**
|
||
* Override the height/width of the Data Grid inner scrollbar.
|
||
*/
|
||
scrollbarSize: import_prop_types58.default.number,
|
||
/**
|
||
* If `true`, the vertical borders of the cells are displayed.
|
||
* @default false
|
||
*/
|
||
showCellVerticalBorder: import_prop_types58.default.bool,
|
||
/**
|
||
* If `true`, the right border of the column headers are displayed.
|
||
* @default false
|
||
*/
|
||
showColumnVerticalBorder: import_prop_types58.default.bool,
|
||
/**
|
||
* Overridable components props dynamically passed to the component at rendering.
|
||
*/
|
||
slotProps: import_prop_types58.default.object,
|
||
/**
|
||
* Overridable components.
|
||
*/
|
||
slots: import_prop_types58.default.object,
|
||
/**
|
||
* Sorting can be processed on the server or client-side.
|
||
* Set it to 'client' if you would like to handle sorting on the client-side.
|
||
* Set it to 'server' if you would like to handle sorting on the server-side.
|
||
* @default "client"
|
||
*/
|
||
sortingMode: import_prop_types58.default.oneOf(["client", "server"]),
|
||
/**
|
||
* The order of the sorting sequence.
|
||
* @default ['asc', 'desc', null]
|
||
*/
|
||
sortingOrder: import_prop_types58.default.arrayOf(import_prop_types58.default.oneOf(["asc", "desc"])),
|
||
/**
|
||
* Set the sort model of the Data Grid.
|
||
*/
|
||
sortModel: import_prop_types58.default.arrayOf(import_prop_types58.default.shape({
|
||
field: import_prop_types58.default.string.isRequired,
|
||
sort: import_prop_types58.default.oneOf(["asc", "desc"])
|
||
})),
|
||
/**
|
||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||
*/
|
||
sx: import_prop_types58.default.oneOfType([import_prop_types58.default.arrayOf(import_prop_types58.default.oneOfType([import_prop_types58.default.func, import_prop_types58.default.object, import_prop_types58.default.bool])), import_prop_types58.default.func, import_prop_types58.default.object]),
|
||
/**
|
||
* If `true`, the Data Grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
||
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
||
* @default false
|
||
*/
|
||
unstable_ignoreValueFormatterDuringExport: import_prop_types58.default.oneOfType([import_prop_types58.default.shape({
|
||
clipboardExport: import_prop_types58.default.bool,
|
||
csvExport: import_prop_types58.default.bool
|
||
}), import_prop_types58.default.bool])
|
||
};
|
||
|
||
// node_modules/@mui/material/locale/index.js
|
||
var arSD = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "إظهار المسار"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "انتقل إلى الصفحة الأولى";
|
||
}
|
||
if (type === "last") {
|
||
return "انتقل إلى الصفحة الأخيرة";
|
||
}
|
||
if (type === "next") {
|
||
return "انتقل إلى الصفحة التالية";
|
||
}
|
||
return "انتقل إلى الصفحة السابقة";
|
||
},
|
||
labelRowsPerPage: "عدد الصفوف في الصفحة:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} من ${count !== -1 ? count : ` أكثر من${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} ${value !== 1 ? "نجوم" : "نجمة"}`,
|
||
emptyLabelText: "فارغ"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "مسح",
|
||
closeText: "إغلاق",
|
||
loadingText: "جار التحميل...",
|
||
noOptionsText: "لا يوجد خيارات",
|
||
openText: "فتح"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "إغلاق"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "التنقل عبر الصفحات",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "انتقل إلى "} صفحة ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "انتقل إلى الصفحة الأولى";
|
||
}
|
||
if (type === "last") {
|
||
return "انتقل الي الصفحة الأخيرة";
|
||
}
|
||
if (type === "next") {
|
||
return "انتقل إلى الصفحة التالية";
|
||
}
|
||
return "انتقل إلى الصفحة السابقة";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var bgBG = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Показване на пътя"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Отиди на първата страница";
|
||
}
|
||
if (type === "last") {
|
||
return "Отиди на последната страница";
|
||
}
|
||
if (type === "next") {
|
||
return "Отиди на следващата страница";
|
||
}
|
||
return "Отиди на предишната страница";
|
||
},
|
||
labelRowsPerPage: "Редове на страница:"
|
||
// labelDisplayedRows: ({ from, to, count }) =>
|
||
// `${from}–${to} от ${count !== -1 ? count : `more than ${to}`}`,
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Звезд${value !== 1 ? "и" : "а"}`,
|
||
emptyLabelText: "Изчисти"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Изчисти",
|
||
closeText: "Затвори",
|
||
loadingText: "Зареждане…",
|
||
noOptionsText: "Няма налични опции",
|
||
openText: "Отвори"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Затвори"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Пагинация",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Към "}страница ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Отиди на първата страница";
|
||
}
|
||
if (type === "last") {
|
||
return "Отиди на последната страница";
|
||
}
|
||
if (type === "next") {
|
||
return "Отиди на следващата страница";
|
||
}
|
||
return "Отиди на предишната страница";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var csCZ = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Ukázat cestu"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Jít na první stránku";
|
||
}
|
||
if (type === "last") {
|
||
return "Jít na poslední stránku";
|
||
}
|
||
if (type === "next") {
|
||
return "Jít na další stránku";
|
||
}
|
||
return "Jít na předchozí stránku";
|
||
},
|
||
labelRowsPerPage: "Řádků na stránce:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} z ${count !== -1 ? count : `více než ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => {
|
||
if (value === 1) {
|
||
return `${value} hvězdička`;
|
||
}
|
||
if (value >= 2 && value <= 4) {
|
||
return `${value} hvězdičky`;
|
||
}
|
||
return `${value} hvězdiček`;
|
||
},
|
||
emptyLabelText: "Prázdné"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Vymazat",
|
||
closeText: "Zavřít",
|
||
loadingText: "Načítání…",
|
||
noOptionsText: "Žádné možnosti",
|
||
openText: "Otevřít"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Zavřít"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Navigace stránkováním",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Jít na "}${page}. stránku`;
|
||
}
|
||
if (type === "first") {
|
||
return "Jít na první stránku";
|
||
}
|
||
if (type === "last") {
|
||
return "Jít na poslední stránku";
|
||
}
|
||
if (type === "next") {
|
||
return "Jít na další stránku";
|
||
}
|
||
return "Jít na předchozí stránku";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var daDK = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Vis sti"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Gå til den første side";
|
||
}
|
||
if (type === "last") {
|
||
return "Gå til den sidste side";
|
||
}
|
||
if (type === "next") {
|
||
return "Gå til den næste side";
|
||
}
|
||
return "Gå til den forrige side";
|
||
},
|
||
labelRowsPerPage: "Rækker pr side:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}-${to} af ${count !== -1 ? count : `mere end ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Stjern${value !== 1 ? "er" : ""}`,
|
||
emptyLabelText: "Tom"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Slet",
|
||
closeText: "Luk",
|
||
loadingText: "Indlæser…",
|
||
noOptionsText: "Ingen muligheder",
|
||
openText: "Åben"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Luk"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Sideinddelings navigation",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Go to "}page ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Gå til den første side";
|
||
}
|
||
if (type === "last") {
|
||
return "Gå til den sidste side";
|
||
}
|
||
if (type === "next") {
|
||
return "Gå til den næste side";
|
||
}
|
||
return "Gå til den forrige side";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var deDE = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Pfad anzeigen"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Zur ersten Seite";
|
||
}
|
||
if (type === "last") {
|
||
return "Zur letzten Seite";
|
||
}
|
||
if (type === "next") {
|
||
return "Zur nächsten Seite";
|
||
}
|
||
return "Zur vorherigen Seite";
|
||
},
|
||
labelRowsPerPage: "Zeilen pro Seite:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} von ${count !== -1 ? count : `mehr als ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} ${value !== 1 ? "Sterne" : "Stern"}`,
|
||
emptyLabelText: "Keine Wertung"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Leeren",
|
||
closeText: "Schließen",
|
||
loadingText: "Wird geladen…",
|
||
noOptionsText: "Keine Optionen",
|
||
openText: "Öffnen"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Schließen"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Navigation via Seitennummerierung",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Gehe zu "}Seite ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Zur ersten Seite";
|
||
}
|
||
if (type === "last") {
|
||
return "Zur letzten Seite";
|
||
}
|
||
if (type === "next") {
|
||
return "Zur nächsten Seite";
|
||
}
|
||
return "Zur vorherigen Seite";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var elGR = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Εμφάνιση διαδρομής"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Πρώτη σελίδα";
|
||
}
|
||
if (type === "last") {
|
||
return "Τελευταία σελίδα";
|
||
}
|
||
if (type === "next") {
|
||
return "Επόμενη σελίδα";
|
||
}
|
||
return "Προηγούμενη σελίδα";
|
||
},
|
||
labelRowsPerPage: "Γραμμές ανα σελίδα:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} από ${count !== -1 ? count : `πάνω από ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Αστέρι${value !== 1 ? "α" : ""}`,
|
||
emptyLabelText: "Χωρίς βαθμολόγηση"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Καθαρισμός",
|
||
closeText: "Κλείσιμο",
|
||
loadingText: "Φόρτωση…",
|
||
noOptionsText: "Δεν υπάρχουν επιλογές",
|
||
openText: "Άνοιγμα"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Κλείσιμο"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Πλοήγηση σε σελίδες",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Μετάβαση "}σελίδα ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Πρώτη σελίδα";
|
||
}
|
||
if (type === "last") {
|
||
return "Τελευταία σελίδα";
|
||
}
|
||
if (type === "next") {
|
||
return "Επόμενη σελίδα";
|
||
}
|
||
return "Προηγούμενη σελίδα";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var enUS = {
|
||
/*
|
||
components: {
|
||
MuiBreadcrumbs: { defaultProps: {
|
||
expandText: 'Show path',
|
||
}},
|
||
MuiTablePagination: { defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === 'first') {
|
||
return 'Go to first page';
|
||
}
|
||
if (type === 'last') {
|
||
return 'Go to last page';
|
||
}
|
||
if (type === 'next') {
|
||
return 'Go to next page';
|
||
}
|
||
// if (type === 'previous') {
|
||
return 'Go to previous page';
|
||
},
|
||
labelRowsPerPage: 'Rows per page:',
|
||
labelDisplayedRows: ({ from, to, count }) =>
|
||
`${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`,
|
||
}},
|
||
MuiRating: { defaultProps: {
|
||
getLabelText: value => `${value} Star${value !== 1 ? 's' : ''}`,
|
||
emptyLabelText: 'Empty',
|
||
}},
|
||
MuiAutocomplete: { defaultProps: {
|
||
clearText: 'Clear',
|
||
closeText: 'Close',
|
||
loadingText: 'Loading…',
|
||
noOptionsText: 'No options',
|
||
openText: 'Open',
|
||
}},
|
||
MuiAlert: { defaultProps: {
|
||
closeText: 'Close',
|
||
}},
|
||
MuiPagination: { defaultProps: {
|
||
'aria-label': 'Pagination navigation',
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === 'page') {
|
||
return `${selected ? '' : 'Go to '}page ${page}`;
|
||
}
|
||
if (type === 'first') {
|
||
return 'Go to first page';
|
||
}
|
||
if (type === 'last') {
|
||
return 'Go to last page';
|
||
}
|
||
if (type === 'next') {
|
||
return 'Go to next page';
|
||
}
|
||
// if (type === 'previous') {
|
||
return 'Go to previous page';
|
||
},
|
||
}},
|
||
},
|
||
*/
|
||
};
|
||
var esES = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Mostrar ruta"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Ir a la primera página";
|
||
}
|
||
if (type === "last") {
|
||
return "Ir a la última página";
|
||
}
|
||
if (type === "next") {
|
||
return "Ir a la página siguiente";
|
||
}
|
||
return "Ir a la página anterior";
|
||
},
|
||
labelRowsPerPage: "Filas por página:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} de ${count !== -1 ? count : `más de ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Estrella${value !== 1 ? "s" : ""}`,
|
||
emptyLabelText: "Vacío"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Limpiar",
|
||
closeText: "Cerrar",
|
||
loadingText: "Cargando…",
|
||
noOptionsText: "Sin opciones",
|
||
openText: "Abierto"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Cerrar"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Paginador",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Ir a la "}página ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Ir a la primera página";
|
||
}
|
||
if (type === "last") {
|
||
return "Ir a la última página";
|
||
}
|
||
if (type === "next") {
|
||
return "Ir a la página siguiente";
|
||
}
|
||
return "Ir a la página anterior";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var faIR = {
|
||
components: {
|
||
// MuiBreadcrumbs: {
|
||
// defaultProps: {
|
||
// expandText: 'Show path',
|
||
// },
|
||
// },
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "نمایش مسیر"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "رفتن به اولین صفحه";
|
||
}
|
||
if (type === "last") {
|
||
return "رفتن به آخرین صفحه";
|
||
}
|
||
if (type === "next") {
|
||
return "رفتن به صفحهی بعدی";
|
||
}
|
||
return "رفتن به صفحهی قبلی";
|
||
},
|
||
labelRowsPerPage: "تعداد سطرهای هر صفحه:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} از ${count !== -1 ? count : `بیشتر از ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} ستاره`,
|
||
emptyLabelText: "خالی"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "پاککردن",
|
||
closeText: "بستن",
|
||
loadingText: "در حال بارگذاری…",
|
||
noOptionsText: "بینتیجه",
|
||
openText: "بازکردن"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "بستن"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "ناوبری صفحه",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "رفتن به "}صفحهٔ ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "رفتن به اولین صفحه";
|
||
}
|
||
if (type === "last") {
|
||
return "رفتن به آخرین صفحه";
|
||
}
|
||
if (type === "next") {
|
||
return "رفتن به صفحهی بعدی";
|
||
}
|
||
return "رفتن به صفحهی قبلی";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var fiFI = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Näytä reitti"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Mene ensimmäiselle sivulle";
|
||
}
|
||
if (type === "last") {
|
||
return "Mene viimeiselle sivulle";
|
||
}
|
||
if (type === "next") {
|
||
return "Mene seuraavalle sivulle";
|
||
}
|
||
return "Mene edelliselle sivulle";
|
||
},
|
||
labelRowsPerPage: "Rivejä per sivu:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} / ${count !== -1 ? count : `enemmän kuin ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Täht${value !== 1 ? "eä" : "i"}`,
|
||
emptyLabelText: "Tyhjä"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Tyhjennä",
|
||
closeText: "Sulje",
|
||
loadingText: "Ladataan…",
|
||
noOptionsText: "Ei valintoja",
|
||
openText: "Avaa"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Sulje"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Sivutus navigaatio",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "sivu" : "Mene sivulle"} ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Mene ensimmäiselle sivulle";
|
||
}
|
||
if (type === "last") {
|
||
return "Mene viimeiselle sivulle";
|
||
}
|
||
if (type === "next") {
|
||
return "Mene seuraavalle sivulle";
|
||
}
|
||
return "Mene edelliselle sivulle";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var frFR = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Montrer le chemin"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Aller à la première page";
|
||
}
|
||
if (type === "last") {
|
||
return "Aller à la dernière page";
|
||
}
|
||
if (type === "next") {
|
||
return "Aller à la page suivante";
|
||
}
|
||
return "Aller à la page précédente";
|
||
},
|
||
labelRowsPerPage: "Lignes par page :",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} sur ${count !== -1 ? count : `plus que ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Etoile${value !== 1 ? "s" : ""}`,
|
||
emptyLabelText: "Vide"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Vider",
|
||
closeText: "Fermer",
|
||
loadingText: "Chargement…",
|
||
noOptionsText: "Pas de résultats",
|
||
openText: "Ouvrir"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Fermer"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "navigation de pagination",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Aller à la "}page ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Aller à la première page";
|
||
}
|
||
if (type === "last") {
|
||
return "Aller à la dernière page";
|
||
}
|
||
if (type === "next") {
|
||
return "Aller à la page suivante";
|
||
}
|
||
return "Aller à la page précédente";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var heIL = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "הצג נתיב"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "לעמוד הראשון";
|
||
}
|
||
if (type === "last") {
|
||
return "לעמוד האחרון";
|
||
}
|
||
if (type === "next") {
|
||
return "לעמוד הבא";
|
||
}
|
||
return "לעמוד הקודם";
|
||
},
|
||
labelRowsPerPage: "שורות בעמוד:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} מתוך ${count !== -1 ? count : `יותר מ ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} כוכב${value !== 1 ? "ים" : ""}`,
|
||
emptyLabelText: "ריק"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "נקה",
|
||
closeText: "סגור",
|
||
loadingText: "טוען…",
|
||
noOptionsText: "אין אופציות",
|
||
openText: "פתח"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "סגור"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "ניווט בעמודים",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "ל "}עמוד ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "לעמוד הראשון";
|
||
}
|
||
if (type === "last") {
|
||
return "לעמוד האחרון";
|
||
}
|
||
if (type === "next") {
|
||
return "לעמוד הבא";
|
||
}
|
||
return "לעמוד הקודם";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var hrHR = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Pokaži putanju"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Idi na prvu stranicu";
|
||
}
|
||
if (type === "last") {
|
||
return "Idi na posljednju stranicu";
|
||
}
|
||
if (type === "next") {
|
||
return "Idi na sljedeću stranicu";
|
||
}
|
||
return "Idi na prethodnu stranicu";
|
||
},
|
||
labelRowsPerPage: "Redova po stranici:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} od ${count !== -1 ? count : `više nego ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => {
|
||
const lastDigit = value % 10;
|
||
const lastTwoDigits = value % 100;
|
||
if ([2, 3, 4].includes(lastDigit) && ![12, 13, 14].includes(lastTwoDigits)) {
|
||
return "Zvijezde";
|
||
}
|
||
return "Zvijezda";
|
||
},
|
||
emptyLabelText: "Prazno"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Briši",
|
||
closeText: "Zatvori",
|
||
loadingText: "Učitavanje…",
|
||
noOptionsText: "Nema opcija",
|
||
openText: "Otvori"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Zatvori"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Navigacija po stranicama",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Idi na "}stranicu ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Idi na prvu stranicu";
|
||
}
|
||
if (type === "last") {
|
||
return "Idi na zadnju stranicu";
|
||
}
|
||
if (type === "next") {
|
||
return "Idi na sljedeću stranicu";
|
||
}
|
||
return "Idi na prethodnu stranicu";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var huHU = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Útvonal"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Első oldalra";
|
||
}
|
||
if (type === "last") {
|
||
return "Utolsó oldalra";
|
||
}
|
||
if (type === "next") {
|
||
return "Következő oldalra";
|
||
}
|
||
return "Előző oldalra";
|
||
},
|
||
labelRowsPerPage: "Sorok száma:"
|
||
// labelDisplayedRows: ({ from, to, count }) =>
|
||
// `${from}–${to} / ${count !== -1 ? count : `more than ${to}`}`,
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Csillag`,
|
||
emptyLabelText: "Üres"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Törlés",
|
||
closeText: "Bezárás",
|
||
loadingText: "Töltés…",
|
||
noOptionsText: "Nincs találat",
|
||
openText: "Megnyitás"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Bezárás"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Lapozás",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${page}. oldal${selected ? "" : "ra"}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Első oldalra";
|
||
}
|
||
if (type === "last") {
|
||
return "Utolsó oldalra";
|
||
}
|
||
if (type === "next") {
|
||
return "Következő oldalra";
|
||
}
|
||
return "Előző oldalra";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var itIT = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Visualizza percorso"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Vai alla prima pagina";
|
||
}
|
||
if (type === "last") {
|
||
return "Vai all'ultima pagina";
|
||
}
|
||
if (type === "next") {
|
||
return "Vai alla pagina successiva";
|
||
}
|
||
return "Vai alla pagina precedente";
|
||
},
|
||
labelRowsPerPage: "Righe per pagina:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} di ${count !== -1 ? count : `più di ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Stell${value !== 1 ? "e" : "a"}`,
|
||
emptyLabelText: "Vuoto"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Svuota",
|
||
closeText: "Chiudi",
|
||
loadingText: "Caricamento in corso…",
|
||
noOptionsText: "Nessuna opzione",
|
||
openText: "Apri"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Chiudi"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Navigazione impaginata",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Vai alla "}pagina ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Vai alla prima pagina";
|
||
}
|
||
if (type === "last") {
|
||
return "Vai all'ultima pagina";
|
||
}
|
||
if (type === "next") {
|
||
return "Vai alla pagina successiva";
|
||
}
|
||
return "Vai alla pagina precedente";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var jaJP = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "すべて表示"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "最初のページへ";
|
||
}
|
||
if (type === "last") {
|
||
return "最後のページへ";
|
||
}
|
||
if (type === "next") {
|
||
return "次のページへ";
|
||
}
|
||
return "前のページへ";
|
||
},
|
||
labelRowsPerPage: "ページあたりの行数:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}~${to} / ${count !== -1 ? count : `${to}以上`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `星${value}`,
|
||
emptyLabelText: "星なし"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "クリア",
|
||
closeText: "閉じる",
|
||
loadingText: "読み込み中…",
|
||
noOptionsText: "データがありません",
|
||
openText: "開く"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "閉じる"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "ページ選択",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `ページ${page}${selected ? "" : "へ"}`;
|
||
}
|
||
if (type === "first") {
|
||
return "最初のページへ";
|
||
}
|
||
if (type === "last") {
|
||
return "最後のページへ";
|
||
}
|
||
if (type === "next") {
|
||
return "次のページへ";
|
||
}
|
||
return "前のページへ";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var koKR = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "경로 보기"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "첫 번째 페이지로 이동";
|
||
}
|
||
if (type === "last") {
|
||
return "마지막 페이지로 이동";
|
||
}
|
||
if (type === "next") {
|
||
return "다음 페이지로 이동";
|
||
}
|
||
return "이전 페이지로 이동";
|
||
},
|
||
labelRowsPerPage: "페이지 당 행:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} / ${count !== -1 ? count : `${to}개 이상`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} 점`,
|
||
emptyLabelText: "빈 텍스트"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "지우기",
|
||
closeText: "닫기",
|
||
loadingText: "불러오는 중…",
|
||
noOptionsText: "옵션 없음",
|
||
openText: "열기"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "닫기"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "페이지네이션 네비게이션",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${page} 번째 페이지${selected ? "" : "로 이동"}`;
|
||
}
|
||
if (type === "first") {
|
||
return "첫 번째 페이지로 이동";
|
||
}
|
||
if (type === "last") {
|
||
return "마지막 페이지로 이동";
|
||
}
|
||
if (type === "next") {
|
||
return "다음 페이지로 이동";
|
||
}
|
||
return "이전 페이지로 이동";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var nbNO = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Vis sti"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Gå til første side";
|
||
}
|
||
if (type === "last") {
|
||
return "Gå til siste side";
|
||
}
|
||
if (type === "next") {
|
||
return "Gå til neste side";
|
||
}
|
||
return "Gå til forrige side";
|
||
},
|
||
labelRowsPerPage: "Rader per side:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} av ${count !== -1 ? count : `mer enn ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Stjerne${value !== 1 ? "r" : ""}`,
|
||
emptyLabelText: "Tom"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Tøm",
|
||
closeText: "Lukk",
|
||
loadingText: "Laster inn…",
|
||
noOptionsText: "Ingen alternativer",
|
||
openText: "Åpne"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Lukk"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Paginering navigasjon",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Gå til "}side ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Gå til første side";
|
||
}
|
||
if (type === "last") {
|
||
return "Gå til siste side";
|
||
}
|
||
if (type === "next") {
|
||
return "Gå til neste side";
|
||
}
|
||
return "Gå til forrige side";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var nlNL = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Pad tonen"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Ga naar eerste pagina";
|
||
}
|
||
if (type === "last") {
|
||
return "Ga naar laatste pagina";
|
||
}
|
||
if (type === "next") {
|
||
return "Ga naar volgende pagina";
|
||
}
|
||
return "Ga naar vorige pagina";
|
||
},
|
||
labelRowsPerPage: "Regels per pagina:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} van ${count !== -1 ? count : `meer dan ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Ster${value !== 1 ? "ren" : ""}`,
|
||
emptyLabelText: "Leeg"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Wissen",
|
||
closeText: "Sluiten",
|
||
loadingText: "Laden…",
|
||
noOptionsText: "Geen opties",
|
||
openText: "Openen"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Sluiten"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Navigatie via paginering",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Ga naar "}pagina ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Ga naar eerste pagina";
|
||
}
|
||
if (type === "last") {
|
||
return "Ga naar laatste pagina";
|
||
}
|
||
if (type === "next") {
|
||
return "Ga naar volgende pagina";
|
||
}
|
||
return "Ga naar vorige pagina";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var plPL = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Pokaż ścieżkę"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Przejdź do pierwszej strony";
|
||
}
|
||
if (type === "last") {
|
||
return "Przejdź do ostatniej strony";
|
||
}
|
||
if (type === "next") {
|
||
return "Przejdź do następnej strony";
|
||
}
|
||
return "Przejdź do poprzedniej strony";
|
||
},
|
||
labelRowsPerPage: "Wierszy na stronę:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} z ${count !== -1 ? count : `ponad ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => {
|
||
let pluralForm = "gwiazdek";
|
||
const lastDigit = value % 10;
|
||
if ((value < 10 || value > 20) && lastDigit > 1 && lastDigit < 5) {
|
||
pluralForm = "gwiazdki";
|
||
} else if (value === 1) {
|
||
pluralForm = "gwiazdka";
|
||
}
|
||
return `${value} ${pluralForm}`;
|
||
},
|
||
emptyLabelText: "Brak gwiazdek"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Wyczyść",
|
||
closeText: "Zamknij",
|
||
loadingText: "Ładowanie…",
|
||
noOptionsText: "Brak opcji",
|
||
openText: "Otwórz"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Zamknij"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Nawigacja podziału na strony",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return selected ? `${page}. strona` : `Przejdź do ${page}. strony`;
|
||
}
|
||
if (type === "first") {
|
||
return "Przejdź do pierwszej strony";
|
||
}
|
||
if (type === "last") {
|
||
return "Przejdź do ostatniej strony";
|
||
}
|
||
if (type === "next") {
|
||
return "Przejdź do następnej strony";
|
||
}
|
||
return "Przejdź do poprzedniej strony";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var ptBR = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Mostrar caminho"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Ir para a primeira página";
|
||
}
|
||
if (type === "last") {
|
||
return "Ir para a última página";
|
||
}
|
||
if (type === "next") {
|
||
return "Ir para a próxima página";
|
||
}
|
||
return "Ir para a página anterior";
|
||
},
|
||
labelRowsPerPage: "Linhas por página:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} de ${count !== -1 ? count : `mais de ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Estrela${value !== 1 ? "s" : ""}`,
|
||
emptyLabelText: "Vazio"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Limpar",
|
||
closeText: "Fechar",
|
||
loadingText: "Carregando…",
|
||
noOptionsText: "Sem opções",
|
||
openText: "Abrir"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Fechar"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Navegar pela paginação",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Ir para a "}página ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Ir para a primeira página";
|
||
}
|
||
if (type === "last") {
|
||
return "Ir para a última página";
|
||
}
|
||
if (type === "next") {
|
||
return "Ir para a próxima página";
|
||
}
|
||
return "Ir para a página anterior";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var ptPT = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Mostrar caminho"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Primeira página";
|
||
}
|
||
if (type === "last") {
|
||
return "Última página";
|
||
}
|
||
if (type === "next") {
|
||
return "Próxima página";
|
||
}
|
||
return "Página anterior";
|
||
},
|
||
labelRowsPerPage: "Linhas por página:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} de ${count !== -1 ? count : `mais de ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Estrela${value !== 1 ? "s" : ""}`,
|
||
emptyLabelText: "Vazio"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Limpar",
|
||
closeText: "Fechar",
|
||
loadingText: "A carregar…",
|
||
noOptionsText: "Sem opções",
|
||
openText: "Abrir"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Fechar"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Navegar por páginas",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Ir para a "}página ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Primeira página";
|
||
}
|
||
if (type === "last") {
|
||
return "Última página";
|
||
}
|
||
if (type === "next") {
|
||
return "Próxima página";
|
||
}
|
||
return "Página anterior";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var roRO = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Arată calea"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Mergi la prima pagină";
|
||
}
|
||
if (type === "last") {
|
||
return "Mergi la ultima pagină";
|
||
}
|
||
if (type === "next") {
|
||
return "Mergi la pagina următoare";
|
||
}
|
||
return "Mergi la pagina precedentă";
|
||
},
|
||
labelRowsPerPage: "Rânduri pe pagină:"
|
||
// labelDisplayedRows: ({ from, to, count }) =>
|
||
// `${from}–${to} din ${count !== -1 ? count : `more than ${to}`}`,
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} St${value !== 1 ? "ele" : "ea"}`,
|
||
emptyLabelText: "Gol"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Șterge",
|
||
closeText: "Închide",
|
||
loadingText: "Se încarcă…",
|
||
noOptionsText: "Nicio opțiune",
|
||
openText: "Deschide"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Închide"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Navigare prin paginare",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Mergi la "}pagina ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Mergi la prima pagină";
|
||
}
|
||
if (type === "last") {
|
||
return "Mergi la ultima pagină";
|
||
}
|
||
if (type === "next") {
|
||
return "Mergi la pagina următoare";
|
||
}
|
||
return "Mergi la pagina precedentă";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var ruRU = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Показать полный путь"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Перейти на первую страницу";
|
||
}
|
||
if (type === "last") {
|
||
return "Перейти на последнюю страницу";
|
||
}
|
||
if (type === "next") {
|
||
return "Перейти на следующую страницу";
|
||
}
|
||
return "Перейти на предыдущую страницу";
|
||
},
|
||
labelRowsPerPage: "Строк на странице:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} из ${count !== -1 ? count : `более чем ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => {
|
||
let pluralForm = "Звёзд";
|
||
const lastDigit = value % 10;
|
||
if (lastDigit > 1 && lastDigit < 5) {
|
||
pluralForm = "Звезды";
|
||
} else if (lastDigit === 1) {
|
||
pluralForm = "Звезда";
|
||
}
|
||
return `${value} ${pluralForm}`;
|
||
},
|
||
emptyLabelText: "Рейтинг отсутствует"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Очистить",
|
||
closeText: "Закрыть",
|
||
loadingText: "Загрузка…",
|
||
noOptionsText: "Нет доступных вариантов",
|
||
openText: "Открыть"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Закрыть"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Навигация по страницам",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
if (selected) {
|
||
return `${page} страница`;
|
||
}
|
||
return `Перейти на ${page} страницу`;
|
||
}
|
||
if (type === "first") {
|
||
return "Перейти на первую страницу";
|
||
}
|
||
if (type === "last") {
|
||
return "Перейти на последнюю страницу";
|
||
}
|
||
if (type === "next") {
|
||
return "Перейти на следующую страницу";
|
||
}
|
||
return "Перейти на предыдущую страницу";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var skSK = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Ukázať cestu "
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Ísť na prvú stránku";
|
||
}
|
||
if (type === "last") {
|
||
return "Ísť na poslednú stránku";
|
||
}
|
||
if (type === "next") {
|
||
return "Ísť na ďaľšiu stránku";
|
||
}
|
||
return "Ísť na predchádzajúcu stránku";
|
||
},
|
||
labelRowsPerPage: "Riadkov na stránke:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} z ${count !== -1 ? count : `viac ako ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => {
|
||
if (value === 1) {
|
||
return `${value} hviezdička`;
|
||
}
|
||
if (value >= 2 && value <= 4) {
|
||
return `${value} hviezdičky`;
|
||
}
|
||
return `${value} hviezdičiek`;
|
||
},
|
||
emptyLabelText: "Prázdne"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Vymazať",
|
||
closeText: "Zavrieť",
|
||
loadingText: "Načítanie…",
|
||
noOptionsText: "Žiadne možnosti",
|
||
openText: "Otvoriť"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Zavrieť"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Navigácia stránkovanim",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Ísť na "}stránku ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Ísť na prvú stránku";
|
||
}
|
||
if (type === "last") {
|
||
return "Ísť na poslednú stránku";
|
||
}
|
||
if (type === "next") {
|
||
return "Ísť na ďaľšiu stránku";
|
||
}
|
||
return "Ísť na predchádzajúcu stránku";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var svSE = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Visa sökväg"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Gå till första sidan";
|
||
}
|
||
if (type === "last") {
|
||
return "Gå till sista sidan";
|
||
}
|
||
if (type === "next") {
|
||
return "Gå till nästa sida";
|
||
}
|
||
return "Gå till föregående sida";
|
||
},
|
||
labelRowsPerPage: "Rader per sida:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} av ${count !== -1 ? count : `fler än ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} ${value !== 1 ? "Stjärnor" : "Stjärna"}`,
|
||
emptyLabelText: "Tom"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Rensa",
|
||
closeText: "Stäng",
|
||
loadingText: "Laddar…",
|
||
noOptionsText: "Inga alternativ",
|
||
openText: "Öppna"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Stäng"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Sidnavigering",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Gå till "}sida ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Gå till första sidan";
|
||
}
|
||
if (type === "last") {
|
||
return "Gå till sista sidan";
|
||
}
|
||
if (type === "next") {
|
||
return "Gå till nästa sida";
|
||
}
|
||
return "Gå till föregående sida";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var trTR = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Yolu göster"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "İlk sayfaya git";
|
||
}
|
||
if (type === "last") {
|
||
return "Son sayfaya git";
|
||
}
|
||
if (type === "next") {
|
||
return "Sonraki sayfaya git";
|
||
}
|
||
return "Önceki sayfaya git";
|
||
},
|
||
labelRowsPerPage: "Sayfa başına satır:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}-${to} / ${count !== -1 ? count : `${to}'den fazla`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} Yıldız`,
|
||
emptyLabelText: "Boş"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Temizle",
|
||
closeText: "Kapat",
|
||
loadingText: "Yükleniyor…",
|
||
noOptionsText: "Seçenek yok",
|
||
openText: "Aç"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Kapat"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Sayfa navigasyonu",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${page}. ${selected ? "sayfa" : "sayfaya git"}`;
|
||
}
|
||
if (type === "first") {
|
||
return "İlk sayfaya git";
|
||
}
|
||
if (type === "last") {
|
||
return "Son sayfaya git";
|
||
}
|
||
if (type === "next") {
|
||
return "Sonraki sayfaya git";
|
||
}
|
||
return "Önceki sayfaya git";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var ukUA = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Показати шлях сторінок"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Перейти на першу сторінку";
|
||
}
|
||
if (type === "last") {
|
||
return "Перейти на останню сторінку";
|
||
}
|
||
if (type === "next") {
|
||
return "Перейти на наступну сторінку";
|
||
}
|
||
return "Перейти на попередню сторінку";
|
||
},
|
||
labelRowsPerPage: "Рядків на сторінці:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} з ${count !== -1 ? count : `понад ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => {
|
||
let pluralForm = "Зірок";
|
||
const lastDigit = value % 10;
|
||
if (lastDigit > 1 && lastDigit < 5) {
|
||
pluralForm = "Зірки";
|
||
} else if (lastDigit === 1) {
|
||
pluralForm = "Зірка";
|
||
}
|
||
return `${value} ${pluralForm}`;
|
||
},
|
||
emptyLabelText: "Рейтинг відсутній"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Очистити",
|
||
closeText: "Згорнути",
|
||
loadingText: "Завантаження…",
|
||
noOptionsText: "Немає варіантів",
|
||
openText: "Розгорнути"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Згорнути"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Навігація сторінками",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Перейти на "}сторінку ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Перейти на першу сторінку";
|
||
}
|
||
if (type === "last") {
|
||
return "Перейти на останню сторінку";
|
||
}
|
||
if (type === "next") {
|
||
return "Перейти на наступну сторінку";
|
||
}
|
||
return "Перейти на попередню сторінку";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var viVN = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "Mở ra"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Tới trang đầu tiên";
|
||
}
|
||
if (type === "last") {
|
||
return "Tới trang cuối cùng";
|
||
}
|
||
if (type === "next") {
|
||
return "Tới trang tiếp theo";
|
||
}
|
||
return "Về trang trước đó";
|
||
},
|
||
labelRowsPerPage: "Số hàng mỗi trang:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} trong ${count !== -1 ? count : `nhiều hơn ${to}`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} sao`,
|
||
emptyLabelText: "Không có dữ liệu"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "Xóa",
|
||
closeText: "Đóng",
|
||
loadingText: "Đang tải…",
|
||
noOptionsText: "Không có lựa chọn nào",
|
||
openText: "Mở"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "Đóng"
|
||
}
|
||
},
|
||
MuiPagination: {
|
||
defaultProps: {
|
||
"aria-label": "Thanh điều khiển trang",
|
||
getItemAriaLabel: (type, page, selected) => {
|
||
if (type === "page") {
|
||
return `${selected ? "" : "Tới "}trang ${page}`;
|
||
}
|
||
if (type === "first") {
|
||
return "Tới trang đầu tiên";
|
||
}
|
||
if (type === "last") {
|
||
return "Tới trang cuối cùng";
|
||
}
|
||
if (type === "next") {
|
||
return "Tới trang tiếp theo";
|
||
}
|
||
return "Về trang trước đó";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var zhCN = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "展开"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "第一页";
|
||
}
|
||
if (type === "last") {
|
||
return "最后一页";
|
||
}
|
||
if (type === "next") {
|
||
return "下一页";
|
||
}
|
||
return "上一页";
|
||
},
|
||
labelRowsPerPage: "每页行数:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `第 ${from} 条到第 ${to} 条,${count !== -1 ? `共 ${count} 条` : `至少 ${to} 条`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} 颗星`,
|
||
emptyLabelText: "无标签"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "清空",
|
||
closeText: "关闭",
|
||
loadingText: "加载中……",
|
||
noOptionsText: "没有可用选项",
|
||
openText: "打开"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "关闭"
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var zhHK = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "展開"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "第一頁";
|
||
}
|
||
if (type === "last") {
|
||
return "最後一頁";
|
||
}
|
||
if (type === "next") {
|
||
return "下一頁";
|
||
}
|
||
return "上一頁";
|
||
},
|
||
labelRowsPerPage: "每頁行數:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `第 ${from} 項至第 ${to} 項,${count !== -1 ? `共 ${count} 項` : `超過 ${to} 項`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} 粒星`,
|
||
emptyLabelText: "無標籤"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "清除",
|
||
closeText: "關閉",
|
||
loadingText: "載入中……",
|
||
noOptionsText: "沒有可用選項",
|
||
openText: "開啟"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "關閉"
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var zhTW = {
|
||
components: {
|
||
MuiBreadcrumbs: {
|
||
defaultProps: {
|
||
expandText: "展開"
|
||
}
|
||
},
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "第一頁";
|
||
}
|
||
if (type === "last") {
|
||
return "最後一頁";
|
||
}
|
||
if (type === "next") {
|
||
return "下一頁";
|
||
}
|
||
return "上一頁";
|
||
},
|
||
labelRowsPerPage: "每頁數量:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from} ~ ${to} / ${count !== -1 ? count : `${to} 以上`}`
|
||
}
|
||
},
|
||
MuiRating: {
|
||
defaultProps: {
|
||
getLabelText: (value) => `${value} 顆星`,
|
||
emptyLabelText: "無標籤"
|
||
}
|
||
},
|
||
MuiAutocomplete: {
|
||
defaultProps: {
|
||
clearText: "清空",
|
||
closeText: "關閉",
|
||
loadingText: "載入中…",
|
||
noOptionsText: "沒有可用選項",
|
||
openText: "打開"
|
||
}
|
||
},
|
||
MuiAlert: {
|
||
defaultProps: {
|
||
closeText: "關閉"
|
||
}
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/utils/getGridLocalization.js
|
||
init_extends();
|
||
var getGridLocalization = (gridTranslations, coreTranslations) => {
|
||
var _coreTranslations$com;
|
||
return {
|
||
components: {
|
||
MuiDataGrid: {
|
||
defaultProps: {
|
||
localeText: _extends({}, gridTranslations, {
|
||
MuiTablePagination: (coreTranslations == null || (_coreTranslations$com = coreTranslations.components) == null || (_coreTranslations$com = _coreTranslations$com.MuiTablePagination) == null ? void 0 : _coreTranslations$com.defaultProps) || {}
|
||
})
|
||
}
|
||
}
|
||
}
|
||
};
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/locales/arSD.js
|
||
var arSDGrid = {
|
||
// Root
|
||
noRowsLabel: "لا توجد صفوف",
|
||
noResultsOverlayLabel: "لم يتم العثور على نتائج.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "الكثافة",
|
||
toolbarDensityLabel: "الكثافة",
|
||
toolbarDensityCompact: "مضغوط",
|
||
toolbarDensityStandard: "قياسي",
|
||
toolbarDensityComfortable: "مريح",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "الأعمدة",
|
||
toolbarColumnsLabel: "حدد أعمدة",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "المُرشِحات",
|
||
toolbarFiltersLabel: "إظهار المرشِحات",
|
||
toolbarFiltersTooltipHide: "إخفاء المرشِحات",
|
||
toolbarFiltersTooltipShow: "اظهر المرشِحات",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} من المرشِحات النشطة` : `مرشِح نشط`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "بحث...",
|
||
toolbarQuickFilterLabel: "بحث",
|
||
toolbarQuickFilterDeleteIconLabel: "أزال",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "تصدير",
|
||
toolbarExportLabel: "تصدير",
|
||
toolbarExportCSV: "تنزيل كملف CSV",
|
||
toolbarExportPrint: "طباعة",
|
||
toolbarExportExcel: "تحميل كملف الإكسل",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "البحث عن العمود",
|
||
columnsPanelTextFieldPlaceholder: "عنوان العمود",
|
||
columnsPanelDragIconLabel: "إعادة ترتيب العمود",
|
||
columnsPanelShowAllButton: "إظهار الكل",
|
||
columnsPanelHideAllButton: "إخفاء الكل",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "إضافة مرشِح",
|
||
filterPanelRemoveAll: "حذف الكل",
|
||
filterPanelDeleteIconLabel: "حذف",
|
||
filterPanelLogicOperator: "عامل منطقي",
|
||
filterPanelOperator: "عامل",
|
||
filterPanelOperatorAnd: "و",
|
||
filterPanelOperatorOr: "أو",
|
||
filterPanelColumns: "الأعمدة",
|
||
filterPanelInputLabel: "القيمة",
|
||
filterPanelInputPlaceholder: "ترشِيح قيمة",
|
||
// Filter operators text
|
||
filterOperatorContains: "يحتوي",
|
||
filterOperatorEquals: "يساوي",
|
||
filterOperatorStartsWith: "يبدأ بـ",
|
||
filterOperatorEndsWith: "ينتهي بـ",
|
||
filterOperatorIs: "يكون",
|
||
filterOperatorNot: "ليس",
|
||
filterOperatorAfter: "بعد",
|
||
filterOperatorOnOrAfter: "عند أو بعد",
|
||
filterOperatorBefore: "قبل",
|
||
filterOperatorOnOrBefore: "عند أو قبل",
|
||
filterOperatorIsEmpty: "خالي",
|
||
filterOperatorIsNotEmpty: "غير خالي",
|
||
filterOperatorIsAnyOf: "أي من",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "يحتوي على",
|
||
headerFilterOperatorEquals: "يساوي",
|
||
headerFilterOperatorStartsWith: "يبدأ ب",
|
||
headerFilterOperatorEndsWith: "ينتهي ب",
|
||
headerFilterOperatorIs: "هو",
|
||
headerFilterOperatorNot: "هو ليس",
|
||
headerFilterOperatorAfter: "يقع بعد",
|
||
headerFilterOperatorOnOrAfter: "هو على او بعد",
|
||
headerFilterOperatorBefore: "يقع قبل",
|
||
headerFilterOperatorOnOrBefore: "هو على او بعد",
|
||
headerFilterOperatorIsEmpty: "هو فارغ",
|
||
headerFilterOperatorIsNotEmpty: "هو ليس فارغ",
|
||
headerFilterOperatorIsAnyOf: "هو أي من",
|
||
"headerFilterOperator=": "يساوي",
|
||
"headerFilterOperator!=": "لا يساوي",
|
||
"headerFilterOperator>": "أكبر من",
|
||
"headerFilterOperator>=": "أكبر من او يساوي",
|
||
"headerFilterOperator<": "اصغر من",
|
||
"headerFilterOperator<=": "اصغر من او يساوي",
|
||
// Filter values text
|
||
filterValueAny: "أي",
|
||
filterValueTrue: "صائب",
|
||
filterValueFalse: "خاطئ",
|
||
// Column menu text
|
||
columnMenuLabel: "القائمة",
|
||
columnMenuShowColumns: "إظهار الأعمدة",
|
||
columnMenuManageColumns: "إدارة الأعمدة",
|
||
columnMenuFilter: "المرشِح",
|
||
columnMenuHideColumn: "إخفاء",
|
||
columnMenuUnsort: "الغاء الفرز",
|
||
columnMenuSortAsc: "الفرز تصاعدياً",
|
||
columnMenuSortDesc: "الفرز تنازلياً",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} من المرشِحات النشطة` : `مرشِح نشط`,
|
||
columnHeaderFiltersLabel: "إظهار المرشحات",
|
||
columnHeaderSortIconLabel: "فرز",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `تم تحديد ${count.toLocaleString()} من الصفوف` : `تم تحديد صف واحد`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "إجمالي الصفوف:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} من ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "تحديد خانة الاختيار",
|
||
checkboxSelectionSelectAllRows: "تحديد كل الصفوف",
|
||
checkboxSelectionUnselectAllRows: "الغاء تحديد كل الصفوف",
|
||
checkboxSelectionSelectRow: "تحديد صف",
|
||
checkboxSelectionUnselectRow: "الغاء تحديد الصف",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "نعم",
|
||
booleanCellFalseLabel: "لا",
|
||
// Actions cell more text
|
||
actionsCellMore: "المزيد",
|
||
// Column pinning text
|
||
pinToLeft: "التدبيس يميناً",
|
||
pinToRight: "التدبيس يساراً",
|
||
unpin: "الغاء التدبيس",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "تجميع",
|
||
treeDataExpand: "رؤية الأبناء",
|
||
treeDataCollapse: "إخفاء الأبناء",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "تجميع",
|
||
groupColumn: (name) => `تجميع حسب ${name}`,
|
||
unGroupColumn: (name) => `إيقاف التجميع حسب ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "اظهار/اخفاء لوحة التفاصيل",
|
||
expandDetailPanel: "توسيع",
|
||
collapseDetailPanel: "طوي",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "أعادة ترتيب الصفوف",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "الدلالات الحسابية",
|
||
aggregationFunctionLabelSum: "مجموع",
|
||
aggregationFunctionLabelAvg: "معدل",
|
||
aggregationFunctionLabelMin: "الحد الادنى",
|
||
aggregationFunctionLabelMax: "الحد الاقصى",
|
||
aggregationFunctionLabelSize: "الحجم"
|
||
};
|
||
var arSD2 = getGridLocalization(arSDGrid, arSD);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/coreLocales.js
|
||
var beBYCore = {
|
||
components: {
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "Перайсці на першую старонку";
|
||
}
|
||
if (type === "last") {
|
||
return "Перайсці на апошнюю старонку";
|
||
}
|
||
if (type === "next") {
|
||
return "Перайсці на наступную старонку";
|
||
}
|
||
return "Перайсці на папярэднюю старонку";
|
||
},
|
||
labelRowsPerPage: "Радкоў на старонцы:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${from}–${to} з ${count !== -1 ? count : `больш чым ${to}`}`
|
||
}
|
||
}
|
||
}
|
||
};
|
||
var urPKCore = {
|
||
components: {
|
||
MuiTablePagination: {
|
||
defaultProps: {
|
||
getItemAriaLabel: (type) => {
|
||
if (type === "first") {
|
||
return "پہلے صفحے پر جائیں";
|
||
}
|
||
if (type === "last") {
|
||
return "آخری صفحے پر جائیں";
|
||
}
|
||
if (type === "next") {
|
||
return "اگلے صفحے پر جائیں";
|
||
}
|
||
return "پچھلے صفحے پر جائیں";
|
||
},
|
||
labelRowsPerPage: "ایک صفحے پر قطاریں:",
|
||
labelDisplayedRows: ({
|
||
from,
|
||
to,
|
||
count
|
||
}) => `${count !== -1 ? `${count} میں سے` : `${to} سے ذیادہ میں سے`} ${from} سے ${to} قطاریں`
|
||
}
|
||
}
|
||
}
|
||
};
|
||
|
||
// node_modules/@mui/x-data-grid/locales/beBY.js
|
||
var getPluralForm = (count, options) => {
|
||
let pluralForm = options.other;
|
||
const lastDigit = count % 10;
|
||
if (lastDigit > 1 && lastDigit < 5 && (count < 10 || count > 20)) {
|
||
pluralForm = options.twoToFour;
|
||
} else if (lastDigit === 1 && count % 100 !== 11) {
|
||
pluralForm = options.one;
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
};
|
||
var beBYGrid = {
|
||
// Root
|
||
noRowsLabel: "Няма радкоў",
|
||
noResultsOverlayLabel: "Дадзеныя не знойдзены.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Вышыня радка",
|
||
toolbarDensityLabel: "Вышыня радка",
|
||
toolbarDensityCompact: "Кампактны",
|
||
toolbarDensityStandard: "Стандартны",
|
||
toolbarDensityComfortable: "Камфортны",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Слупкі",
|
||
toolbarColumnsLabel: "Выберыце слупкі",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Фільтры",
|
||
toolbarFiltersLabel: "Паказаць фільтры",
|
||
toolbarFiltersTooltipHide: "Схаваць фільтры",
|
||
toolbarFiltersTooltipShow: "Паказаць фільтры",
|
||
toolbarFiltersTooltipActive: (count) => getPluralForm(count, {
|
||
one: "актыўны фільтр",
|
||
twoToFour: "актыўных фільтра",
|
||
other: "актыўных фільтраў"
|
||
}),
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Пошук…",
|
||
toolbarQuickFilterLabel: "Пошук",
|
||
toolbarQuickFilterDeleteIconLabel: "Ачысціць",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Экспарт",
|
||
toolbarExportLabel: "Экспарт",
|
||
toolbarExportCSV: "Спампаваць у фармаце CSV",
|
||
toolbarExportPrint: "Друк",
|
||
toolbarExportExcel: "Спампаваць у фармаце Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Знайсці слупок",
|
||
columnsPanelTextFieldPlaceholder: "Загаловак слупка",
|
||
columnsPanelDragIconLabel: "Змяніць чарговасць слупкоў",
|
||
columnsPanelShowAllButton: "Паказаць усе",
|
||
columnsPanelHideAllButton: "Схаваць усе",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Дадаць фільтр",
|
||
// filterPanelRemoveAll: 'Remove all',
|
||
filterPanelDeleteIconLabel: "Выдаліць",
|
||
filterPanelLogicOperator: "Лагічныя аператары",
|
||
filterPanelOperator: "Аператары",
|
||
filterPanelOperatorAnd: "І",
|
||
filterPanelOperatorOr: "Або",
|
||
filterPanelColumns: "Слупкі",
|
||
filterPanelInputLabel: "Значэнне",
|
||
filterPanelInputPlaceholder: "Значэнне фільтра",
|
||
// Filter operators text
|
||
filterOperatorContains: "змяшчае",
|
||
filterOperatorEquals: "роўны",
|
||
filterOperatorStartsWith: "пачынаецца з",
|
||
filterOperatorEndsWith: "скончваецца на",
|
||
filterOperatorIs: "роўны",
|
||
filterOperatorNot: "не роўны",
|
||
filterOperatorAfter: "больш чым",
|
||
filterOperatorOnOrAfter: "больш ці роўны",
|
||
filterOperatorBefore: "меньш чым",
|
||
filterOperatorOnOrBefore: "меньш ці роўны",
|
||
filterOperatorIsEmpty: "пусты",
|
||
filterOperatorIsNotEmpty: "не пусты",
|
||
filterOperatorIsAnyOf: "усякі з",
|
||
// '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: "усякі",
|
||
filterValueTrue: "праўда",
|
||
filterValueFalse: "няпраўда",
|
||
// Column menu text
|
||
columnMenuLabel: "Меню",
|
||
columnMenuShowColumns: "Паказаць слупкі",
|
||
columnMenuManageColumns: "Кіраваць слупкамі",
|
||
columnMenuFilter: "Фільтр",
|
||
columnMenuHideColumn: "Схаваць",
|
||
columnMenuUnsort: "Скасаваць сартыроўку",
|
||
columnMenuSortAsc: "Сартыраваць па нарастанню",
|
||
columnMenuSortDesc: "Сартыраваць па спаданню",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => getPluralForm(count, {
|
||
one: "актыўны фільтр",
|
||
twoToFour: "актыўных фільтра",
|
||
other: "актыўных фільтраў"
|
||
}),
|
||
columnHeaderFiltersLabel: "Паказаць фільтры",
|
||
columnHeaderSortIconLabel: "Сартыраваць",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => getPluralForm(count, {
|
||
one: "абраны радок",
|
||
twoToFour: "абраных радка",
|
||
other: "абраных радкоў"
|
||
}),
|
||
// Total row amount footer text
|
||
footerTotalRows: "Усяго радкоў:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} з ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Выбар сцяжка",
|
||
checkboxSelectionSelectAllRows: "Абраць усе радкі",
|
||
checkboxSelectionUnselectAllRows: "Скасаваць выбар усіх радкоў",
|
||
checkboxSelectionSelectRow: "Абраць радок",
|
||
checkboxSelectionUnselectRow: "Скасаваць выбар радка",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "праўда",
|
||
booleanCellFalseLabel: "няпраўда",
|
||
// Actions cell more text
|
||
actionsCellMore: "больш",
|
||
// Column pinning text
|
||
pinToLeft: "Замацаваць злева",
|
||
pinToRight: "Замацаваць справа",
|
||
unpin: "Адмацаваць",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Група",
|
||
treeDataExpand: "паказаць даччыныя элементы",
|
||
treeDataCollapse: "схаваць даччыныя элементы",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Група",
|
||
groupColumn: (name) => `Групаваць па ${name}`,
|
||
unGroupColumn: (name) => `Разгрупаваць па ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Дэталі",
|
||
expandDetailPanel: "Разгарнуць",
|
||
collapseDetailPanel: "Згарнуць",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Змяненне чарговасці радкоў",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Аб'яднанне дадзеных",
|
||
aggregationFunctionLabelSum: "сума",
|
||
aggregationFunctionLabelAvg: "сярэдняе",
|
||
aggregationFunctionLabelMin: "мінімум",
|
||
aggregationFunctionLabelMax: "максімум",
|
||
aggregationFunctionLabelSize: "памер"
|
||
};
|
||
var beBY = getGridLocalization(beBYGrid, beBYCore);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/bgBG.js
|
||
var bgBGGrid = {
|
||
// Root
|
||
noRowsLabel: "Няма редове",
|
||
noResultsOverlayLabel: "Няма намерени резултати.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Гъстота",
|
||
toolbarDensityLabel: "Гъстота",
|
||
toolbarDensityCompact: "Компактна",
|
||
toolbarDensityStandard: "Стандартна",
|
||
toolbarDensityComfortable: "Комфортна",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Колони",
|
||
toolbarColumnsLabel: "Покажи селектора на колони",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Филтри",
|
||
toolbarFiltersLabel: "Покажи Филтрите",
|
||
toolbarFiltersTooltipHide: "Скрий Филтрите",
|
||
toolbarFiltersTooltipShow: "Покажи Филтрите",
|
||
toolbarFiltersTooltipActive: (count) => `${count} активни филтри`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Търси…",
|
||
toolbarQuickFilterLabel: "Търсене",
|
||
toolbarQuickFilterDeleteIconLabel: "Изчисти",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Изтегли",
|
||
toolbarExportLabel: "Изтегли",
|
||
toolbarExportCSV: "Изтегли като CSV",
|
||
toolbarExportPrint: "Принтиране",
|
||
toolbarExportExcel: "Изтегли като Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Намери колона",
|
||
columnsPanelTextFieldPlaceholder: "Заглавие на колона",
|
||
columnsPanelDragIconLabel: "Пренареди на колона",
|
||
columnsPanelShowAllButton: "Покажи Всички",
|
||
columnsPanelHideAllButton: "Скрий Всички",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Добави Филтър",
|
||
filterPanelRemoveAll: "Премахни всички",
|
||
filterPanelDeleteIconLabel: "Изтрий",
|
||
filterPanelLogicOperator: "Логически оператор",
|
||
filterPanelOperator: "Оператори",
|
||
filterPanelOperatorAnd: "И",
|
||
filterPanelOperatorOr: "Или",
|
||
filterPanelColumns: "Колони",
|
||
filterPanelInputLabel: "Стойност",
|
||
filterPanelInputPlaceholder: "Стойност на филтъра",
|
||
// Filter operators text
|
||
filterOperatorContains: "съдържа",
|
||
filterOperatorEquals: "равно",
|
||
filterOperatorStartsWith: "започва с",
|
||
filterOperatorEndsWith: "завършва с",
|
||
filterOperatorIs: "е",
|
||
filterOperatorNot: "не е",
|
||
filterOperatorAfter: "е след",
|
||
filterOperatorOnOrAfter: "е на или след",
|
||
filterOperatorBefore: "е преди",
|
||
filterOperatorOnOrBefore: "е на или преди",
|
||
filterOperatorIsEmpty: "е празен",
|
||
filterOperatorIsNotEmpty: "не е празен",
|
||
filterOperatorIsAnyOf: "е някой от",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Съдържа",
|
||
headerFilterOperatorEquals: "Равнo",
|
||
headerFilterOperatorStartsWith: "Започва с",
|
||
headerFilterOperatorEndsWith: "Завършва с",
|
||
headerFilterOperatorIs: "Равно е на",
|
||
headerFilterOperatorNot: "Не се равнява на",
|
||
headerFilterOperatorAfter: "След",
|
||
headerFilterOperatorOnOrAfter: "След (включително)",
|
||
headerFilterOperatorBefore: "Преди",
|
||
headerFilterOperatorOnOrBefore: "Преди (включително)",
|
||
headerFilterOperatorIsEmpty: "Празен",
|
||
headerFilterOperatorIsNotEmpty: "Не е празен",
|
||
headerFilterOperatorIsAnyOf: "Всичко от",
|
||
"headerFilterOperator=": "Равно",
|
||
"headerFilterOperator!=": "Различно",
|
||
"headerFilterOperator>": "По-голямо от",
|
||
"headerFilterOperator>=": "По-голямо или равно на",
|
||
"headerFilterOperator<": "По-малко от",
|
||
"headerFilterOperator<=": "По-малко или равно на",
|
||
// Filter values text
|
||
filterValueAny: "всякакви",
|
||
filterValueTrue: "вярно",
|
||
filterValueFalse: "невярно",
|
||
// Column menu text
|
||
columnMenuLabel: "Меню",
|
||
columnMenuShowColumns: "Покажи колоните",
|
||
columnMenuManageColumns: "Управление на колони",
|
||
columnMenuFilter: "Филтри",
|
||
columnMenuHideColumn: "Скрий",
|
||
columnMenuUnsort: "Отмени сортирането",
|
||
columnMenuSortAsc: "Сортирай по възходящ ред",
|
||
columnMenuSortDesc: "Сортирай по низходящ ред",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => `${count} активни филтри`,
|
||
columnHeaderFiltersLabel: "Покажи Филтрите",
|
||
columnHeaderSortIconLabel: "Сортирай",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} избрани редове` : `${count.toLocaleString()} избран ред`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Общо Редове:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} от ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Избор на квадратче",
|
||
checkboxSelectionSelectAllRows: "Избери всички редове",
|
||
checkboxSelectionUnselectAllRows: "Отмени избора на всички редове",
|
||
checkboxSelectionSelectRow: "Избери ред",
|
||
checkboxSelectionUnselectRow: "Отмени избора на ред",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "да",
|
||
booleanCellFalseLabel: "не",
|
||
// Actions cell more text
|
||
actionsCellMore: "още",
|
||
// Column pinning text
|
||
pinToLeft: "Закачи в ляво",
|
||
pinToRight: "Закачи в дясно",
|
||
unpin: "Откачи",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Група",
|
||
treeDataExpand: "виж деца",
|
||
treeDataCollapse: "скрий децата",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Група",
|
||
groupColumn: (name) => `Групирай по ${name}`,
|
||
unGroupColumn: (name) => `Спри групиране по ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Превключване на панела с детайли",
|
||
expandDetailPanel: "Разгъване",
|
||
collapseDetailPanel: "Свиване",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Подредба на редове",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Агрегиране",
|
||
aggregationFunctionLabelSum: "сума",
|
||
aggregationFunctionLabelAvg: "срст",
|
||
aggregationFunctionLabelMin: "мин",
|
||
aggregationFunctionLabelMax: "макс",
|
||
aggregationFunctionLabelSize: "размер"
|
||
};
|
||
var bgBG2 = getGridLocalization(bgBGGrid, bgBG);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/csCZ.js
|
||
var csCZGrid = {
|
||
// Root
|
||
noRowsLabel: "Žádné záznamy",
|
||
noResultsOverlayLabel: "Nenašly se žadné výsledky.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Zobrazení",
|
||
toolbarDensityLabel: "Zobrazení",
|
||
toolbarDensityCompact: "Kompaktní",
|
||
toolbarDensityStandard: "Standartní",
|
||
toolbarDensityComfortable: "Komfortní",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Sloupce",
|
||
toolbarColumnsLabel: "Vybrat sloupec",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtry",
|
||
toolbarFiltersLabel: "Zobrazit filtry",
|
||
toolbarFiltersTooltipHide: "Skrýt filtry",
|
||
toolbarFiltersTooltipShow: "Zobrazit filtry",
|
||
toolbarFiltersTooltipActive: (count) => {
|
||
let pluralForm = "aktivních filtrů";
|
||
if (count > 1 && count < 5) {
|
||
pluralForm = "aktivní filtry";
|
||
} else if (count === 1) {
|
||
pluralForm = "aktivní filtr";
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
},
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Hledat…",
|
||
toolbarQuickFilterLabel: "Hledat",
|
||
toolbarQuickFilterDeleteIconLabel: "Vymazat",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Export",
|
||
toolbarExportLabel: "Export",
|
||
toolbarExportCSV: "Stáhnout jako CSV",
|
||
toolbarExportPrint: "Vytisknout",
|
||
toolbarExportExcel: "Stáhnout jako Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Najít sloupec",
|
||
columnsPanelTextFieldPlaceholder: "Název sloupce",
|
||
columnsPanelDragIconLabel: "Uspořádat sloupce",
|
||
columnsPanelShowAllButton: "Zobrazit vše",
|
||
columnsPanelHideAllButton: "Skrýt vše",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Přidat filtr",
|
||
filterPanelRemoveAll: "Odstranit vše",
|
||
filterPanelDeleteIconLabel: "Odstranit",
|
||
filterPanelLogicOperator: "Logický operátor",
|
||
filterPanelOperator: "Operátory",
|
||
filterPanelOperatorAnd: "A",
|
||
filterPanelOperatorOr: "Nebo",
|
||
filterPanelColumns: "Sloupce",
|
||
filterPanelInputLabel: "Hodnota",
|
||
filterPanelInputPlaceholder: "Hodnota filtru",
|
||
// Filter operators text
|
||
filterOperatorContains: "obsahuje",
|
||
filterOperatorEquals: "rovná se",
|
||
filterOperatorStartsWith: "začíná na",
|
||
filterOperatorEndsWith: "končí na",
|
||
filterOperatorIs: "je",
|
||
filterOperatorNot: "není",
|
||
filterOperatorAfter: "je po",
|
||
filterOperatorOnOrAfter: "je po včetně",
|
||
filterOperatorBefore: "je před",
|
||
filterOperatorOnOrBefore: "je před včetně",
|
||
filterOperatorIsEmpty: "je prázdný",
|
||
filterOperatorIsNotEmpty: "není prázdný",
|
||
filterOperatorIsAnyOf: "je jeden z",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Obsahuje",
|
||
headerFilterOperatorEquals: "Rovná se",
|
||
headerFilterOperatorStartsWith: "Začíná na",
|
||
headerFilterOperatorEndsWith: "Končí na",
|
||
headerFilterOperatorIs: "Je",
|
||
headerFilterOperatorNot: "Není",
|
||
headerFilterOperatorAfter: "Je po",
|
||
headerFilterOperatorOnOrAfter: "Je po včetně",
|
||
headerFilterOperatorBefore: "Je před",
|
||
headerFilterOperatorOnOrBefore: "Je před včetně",
|
||
headerFilterOperatorIsEmpty: "Je prázdný",
|
||
headerFilterOperatorIsNotEmpty: "Není prázdný",
|
||
headerFilterOperatorIsAnyOf: "Je jeden z",
|
||
"headerFilterOperator=": "Rovná se",
|
||
"headerFilterOperator!=": "Nerovná se",
|
||
"headerFilterOperator>": "Větší než",
|
||
"headerFilterOperator>=": "Větší než nebo rovno",
|
||
"headerFilterOperator<": "Menší než",
|
||
"headerFilterOperator<=": "Menší než nebo rovno",
|
||
// Filter values text
|
||
filterValueAny: "jakýkoliv",
|
||
filterValueTrue: "ano",
|
||
filterValueFalse: "ne",
|
||
// Column menu text
|
||
columnMenuLabel: "Menu",
|
||
columnMenuShowColumns: "Zobrazit sloupce",
|
||
columnMenuManageColumns: "Spravovat sloupce",
|
||
columnMenuFilter: "Filtr",
|
||
columnMenuHideColumn: "Skrýt",
|
||
columnMenuUnsort: "Zrušit filtry",
|
||
columnMenuSortAsc: "Seřadit vzestupně",
|
||
columnMenuSortDesc: "Seřadit sestupně",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => {
|
||
let pluralForm = "aktivních filtrů";
|
||
if (count > 1 && count < 5) {
|
||
pluralForm = "aktivní filtry";
|
||
} else if (count === 1) {
|
||
pluralForm = "aktivní filtr";
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
},
|
||
columnHeaderFiltersLabel: "Zobrazit filtry",
|
||
columnHeaderSortIconLabel: "Filtrovat",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => {
|
||
let pluralForm = "vybraných záznamů";
|
||
if (count > 1 && count < 5) {
|
||
pluralForm = "vybrané záznamy";
|
||
} else if (count === 1) {
|
||
pluralForm = "vybraný záznam";
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
},
|
||
// Total row amount footer text
|
||
footerTotalRows: "Celkem řádků:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => {
|
||
const str = totalCount.toString();
|
||
const firstDigit = str[0];
|
||
const op = ["4", "6", "7"].includes(firstDigit) || firstDigit === "1" && str.length % 3 === 0 ? "ze" : "z";
|
||
return `${visibleCount.toLocaleString()} ${op} ${totalCount.toLocaleString()}`;
|
||
},
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Výběr řádku",
|
||
checkboxSelectionSelectAllRows: "Označit všechny řádky",
|
||
checkboxSelectionUnselectAllRows: "Odznačit všechny řádky",
|
||
checkboxSelectionSelectRow: "Označit řádek",
|
||
checkboxSelectionUnselectRow: "Odznačit řádek",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "ano",
|
||
booleanCellFalseLabel: "ne",
|
||
// Actions cell more text
|
||
actionsCellMore: "více",
|
||
// Column pinning text
|
||
pinToLeft: "Připnout vlevo",
|
||
pinToRight: "Připnout vpravo",
|
||
unpin: "Odepnout",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Skupina",
|
||
treeDataExpand: "zobrazit potomky",
|
||
treeDataCollapse: "skrýt potomky",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Skupina",
|
||
groupColumn: (name) => `Seskupit podle ${name}`,
|
||
unGroupColumn: (name) => `Přestat seskupovat podle ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Přepnout detail panelu",
|
||
expandDetailPanel: "Rozbalit",
|
||
collapseDetailPanel: "Sbalit",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Přeuspořádávání řádků",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Seskupování",
|
||
aggregationFunctionLabelSum: "součet",
|
||
aggregationFunctionLabelAvg: "průměr",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "max",
|
||
aggregationFunctionLabelSize: "počet"
|
||
};
|
||
var csCZ2 = getGridLocalization(csCZGrid, csCZ);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/daDK.js
|
||
var daDKGrid = {
|
||
// Root
|
||
noRowsLabel: "Ingen rækker",
|
||
noResultsOverlayLabel: "Ingen resultater",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Tæthed",
|
||
toolbarDensityLabel: "Tæthed",
|
||
toolbarDensityCompact: "Kompakt",
|
||
toolbarDensityStandard: "Standard",
|
||
toolbarDensityComfortable: "Luftig",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Kolonner",
|
||
toolbarColumnsLabel: "Vælg kolonner",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtre",
|
||
toolbarFiltersLabel: "Vis filtre",
|
||
toolbarFiltersTooltipHide: "Skjul filtre",
|
||
toolbarFiltersTooltipShow: "Vis filtre",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} aktive filtre` : `${count} aktivt filter`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Søg…",
|
||
toolbarQuickFilterLabel: "Søg",
|
||
toolbarQuickFilterDeleteIconLabel: "Ryd",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Eksport",
|
||
toolbarExportLabel: "Eksporter",
|
||
toolbarExportCSV: "Download som CSV",
|
||
toolbarExportPrint: "Print",
|
||
toolbarExportExcel: "Download som Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Find kolonne",
|
||
columnsPanelTextFieldPlaceholder: "Kolonne titel",
|
||
columnsPanelDragIconLabel: "Reorder kolonne",
|
||
columnsPanelShowAllButton: "Vis alle",
|
||
columnsPanelHideAllButton: "Skjul alle",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Tilføj filter",
|
||
filterPanelRemoveAll: "Fjern alle",
|
||
filterPanelDeleteIconLabel: "Slet",
|
||
filterPanelLogicOperator: "Logisk operator",
|
||
filterPanelOperator: "Operator",
|
||
filterPanelOperatorAnd: "Og",
|
||
filterPanelOperatorOr: "Eller",
|
||
filterPanelColumns: "Kolonner",
|
||
filterPanelInputLabel: "Værdi",
|
||
filterPanelInputPlaceholder: "Filterværdi",
|
||
// Filter operators text
|
||
filterOperatorContains: "indeholder",
|
||
filterOperatorEquals: "lig med",
|
||
filterOperatorStartsWith: "begynder med",
|
||
filterOperatorEndsWith: "ender med",
|
||
filterOperatorIs: "er lig med",
|
||
filterOperatorNot: "er ikke lig med",
|
||
filterOperatorAfter: "efter",
|
||
filterOperatorOnOrAfter: "på eller efter",
|
||
filterOperatorBefore: "før",
|
||
filterOperatorOnOrBefore: "på eller før",
|
||
filterOperatorIsEmpty: "indeholder ikke data",
|
||
filterOperatorIsNotEmpty: "indeholder data",
|
||
filterOperatorIsAnyOf: "indeholder en af",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Indeholder",
|
||
headerFilterOperatorEquals: "Lig med",
|
||
headerFilterOperatorStartsWith: "Begynder med",
|
||
headerFilterOperatorEndsWith: "Ender med",
|
||
headerFilterOperatorIs: "Er lig med",
|
||
headerFilterOperatorNot: "Er ikke lig med",
|
||
headerFilterOperatorAfter: "Efter",
|
||
headerFilterOperatorOnOrAfter: "På eller efter",
|
||
headerFilterOperatorBefore: "Før",
|
||
headerFilterOperatorOnOrBefore: "På eller før",
|
||
headerFilterOperatorIsEmpty: "Indeholder ikke data",
|
||
headerFilterOperatorIsNotEmpty: "Indeholder data",
|
||
headerFilterOperatorIsAnyOf: "Indeholder en af",
|
||
"headerFilterOperator=": "Lig med",
|
||
"headerFilterOperator!=": "Ikke lig med",
|
||
"headerFilterOperator>": "Større end",
|
||
"headerFilterOperator>=": "Større end eller lig med",
|
||
"headerFilterOperator<": "Mindre end",
|
||
"headerFilterOperator<=": "Mindre end eller lig med",
|
||
// Filter values text
|
||
filterValueAny: "hvilken som helst",
|
||
filterValueTrue: "positiv",
|
||
filterValueFalse: "negativ",
|
||
// Column menu text
|
||
columnMenuLabel: "Menu",
|
||
columnMenuShowColumns: "Vis kolonner",
|
||
columnMenuManageColumns: "Administrer kolonner",
|
||
columnMenuFilter: "Filtrer",
|
||
columnMenuHideColumn: "Skjul kolonne",
|
||
columnMenuUnsort: "Fjern sortering",
|
||
columnMenuSortAsc: "Sorter stigende",
|
||
columnMenuSortDesc: "Sorter faldende",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} aktive filtre` : `Ét aktivt filter`,
|
||
columnHeaderFiltersLabel: "Vis filtre",
|
||
columnHeaderSortIconLabel: "Sorter",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} rækker valgt` : `Én række valgt`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Antal rækker i alt:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} af ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Afkrydsningsvalg",
|
||
checkboxSelectionSelectAllRows: "Vælg alle rækker",
|
||
checkboxSelectionUnselectAllRows: "Fravælg alle rækker",
|
||
checkboxSelectionSelectRow: "Vælg række",
|
||
checkboxSelectionUnselectRow: "Fravælg række",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "ja",
|
||
booleanCellFalseLabel: "nej",
|
||
// Actions cell more text
|
||
actionsCellMore: "mere",
|
||
// Column pinning text
|
||
pinToLeft: "Fastgør til venstre",
|
||
pinToRight: "Fastgør til højre",
|
||
unpin: "Frigiv",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Gruppe",
|
||
treeDataExpand: "Vis underelementer",
|
||
treeDataCollapse: "Skjul underelementer",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Gruppe",
|
||
groupColumn: (name) => `Gruppér efter ${name}`,
|
||
unGroupColumn: (name) => `Fjern gruppering efter ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Udvid/kollaps detaljepanel",
|
||
expandDetailPanel: "Udvid",
|
||
collapseDetailPanel: "Kollaps",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Omarrangering af rækker",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Aggregering",
|
||
aggregationFunctionLabelSum: "sum",
|
||
aggregationFunctionLabelAvg: "gns",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "max",
|
||
aggregationFunctionLabelSize: "størrelse"
|
||
};
|
||
var daDK2 = getGridLocalization(daDKGrid, daDK);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/deDE.js
|
||
var deDEGrid = {
|
||
// Root
|
||
noRowsLabel: "Keine Einträge",
|
||
noResultsOverlayLabel: "Keine Ergebnisse gefunden.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Zeilenhöhe",
|
||
toolbarDensityLabel: "Zeilenhöhe",
|
||
toolbarDensityCompact: "Kompakt",
|
||
toolbarDensityStandard: "Standard",
|
||
toolbarDensityComfortable: "Breit",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Spalten",
|
||
toolbarColumnsLabel: "Zeige Spaltenauswahl",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filter",
|
||
toolbarFiltersLabel: "Zeige Filter",
|
||
toolbarFiltersTooltipHide: "Verberge Filter",
|
||
toolbarFiltersTooltipShow: "Zeige Filter",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} aktive Filter` : `${count} aktiver Filter`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Suchen…",
|
||
toolbarQuickFilterLabel: "Suchen",
|
||
toolbarQuickFilterDeleteIconLabel: "Löschen",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Exportieren",
|
||
toolbarExportLabel: "Exportieren",
|
||
toolbarExportCSV: "Download als CSV",
|
||
toolbarExportPrint: "Drucken",
|
||
toolbarExportExcel: "Download als Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Finde Spalte",
|
||
columnsPanelTextFieldPlaceholder: "Spaltenüberschrift",
|
||
columnsPanelDragIconLabel: "Spalte umsortieren",
|
||
columnsPanelShowAllButton: "Zeige alle",
|
||
columnsPanelHideAllButton: "Verberge alle",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Filter hinzufügen",
|
||
filterPanelRemoveAll: "Alle entfernen",
|
||
filterPanelDeleteIconLabel: "Löschen",
|
||
filterPanelLogicOperator: "Logische Operatoren",
|
||
filterPanelOperator: "Operatoren",
|
||
filterPanelOperatorAnd: "Und",
|
||
filterPanelOperatorOr: "Oder",
|
||
filterPanelColumns: "Spalten",
|
||
filterPanelInputLabel: "Wert",
|
||
filterPanelInputPlaceholder: "Wert filtern",
|
||
// Filter operators text
|
||
filterOperatorContains: "enthält",
|
||
filterOperatorEquals: "ist gleich",
|
||
filterOperatorStartsWith: "beginnt mit",
|
||
filterOperatorEndsWith: "endet mit",
|
||
filterOperatorIs: "ist",
|
||
filterOperatorNot: "ist nicht",
|
||
filterOperatorAfter: "ist nach",
|
||
filterOperatorOnOrAfter: "ist am oder nach",
|
||
filterOperatorBefore: "ist vor",
|
||
filterOperatorOnOrBefore: "ist am oder vor",
|
||
filterOperatorIsEmpty: "ist leer",
|
||
filterOperatorIsNotEmpty: "ist nicht leer",
|
||
filterOperatorIsAnyOf: "ist einer der Werte",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Enthält",
|
||
headerFilterOperatorEquals: "Gleich",
|
||
headerFilterOperatorStartsWith: "Beginnt mit",
|
||
headerFilterOperatorEndsWith: "Endet mit",
|
||
headerFilterOperatorIs: "Ist",
|
||
headerFilterOperatorNot: "Ist nicht",
|
||
headerFilterOperatorAfter: "Ist nach",
|
||
headerFilterOperatorOnOrAfter: "Ist am oder nach",
|
||
headerFilterOperatorBefore: "Ist vor",
|
||
headerFilterOperatorOnOrBefore: "Ist am oder vor",
|
||
headerFilterOperatorIsEmpty: "Ist leer",
|
||
headerFilterOperatorIsNotEmpty: "Ist nicht leer",
|
||
headerFilterOperatorIsAnyOf: "Ist eines von",
|
||
"headerFilterOperator=": "Gleich",
|
||
"headerFilterOperator!=": "Ungleich",
|
||
"headerFilterOperator>": "Größer als",
|
||
"headerFilterOperator>=": "Größer als oder gleich",
|
||
"headerFilterOperator<": "Kleiner als",
|
||
"headerFilterOperator<=": "Kleiner als oder gleich",
|
||
// Filter values text
|
||
filterValueAny: "Beliebig",
|
||
filterValueTrue: "Ja",
|
||
filterValueFalse: "Nein",
|
||
// Column menu text
|
||
columnMenuLabel: "Menü",
|
||
columnMenuShowColumns: "Zeige alle Spalten",
|
||
columnMenuManageColumns: "Spalten verwalten",
|
||
columnMenuFilter: "Filter",
|
||
columnMenuHideColumn: "Verbergen",
|
||
columnMenuUnsort: "Sortierung deaktivieren",
|
||
columnMenuSortAsc: "Sortiere aufsteigend",
|
||
columnMenuSortDesc: "Sortiere absteigend",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} aktive Filter` : `${count} aktiver Filter`,
|
||
columnHeaderFiltersLabel: "Zeige Filter",
|
||
columnHeaderSortIconLabel: "Sortieren",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} Einträge ausgewählt` : `${count.toLocaleString()} Eintrag ausgewählt`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Gesamt:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} von ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Checkbox Auswahl",
|
||
checkboxSelectionSelectAllRows: "Alle Zeilen auswählen",
|
||
checkboxSelectionUnselectAllRows: "Alle Zeilen abwählen",
|
||
checkboxSelectionSelectRow: "Zeile auswählen",
|
||
checkboxSelectionUnselectRow: "Zeile abwählen",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "Ja",
|
||
booleanCellFalseLabel: "Nein",
|
||
// Actions cell more text
|
||
actionsCellMore: "Mehr",
|
||
// Column pinning text
|
||
pinToLeft: "Links anheften",
|
||
pinToRight: "Rechts anheften",
|
||
unpin: "Loslösen",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Gruppe",
|
||
treeDataExpand: "Kinder einblenden",
|
||
treeDataCollapse: "Kinder ausblenden",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Gruppierung",
|
||
groupColumn: (name) => `Gruppieren nach ${name}`,
|
||
unGroupColumn: (name) => `Gruppierung nach ${name} aufheben`,
|
||
// Master/detail
|
||
detailPanelToggle: "Detailansicht Kippschalter",
|
||
expandDetailPanel: "Aufklappen",
|
||
collapseDetailPanel: "Zuklappen",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Reihen neu ordnen",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Aggregation",
|
||
aggregationFunctionLabelSum: "Summe",
|
||
aggregationFunctionLabelAvg: "Mittelwert",
|
||
aggregationFunctionLabelMin: "Minimum",
|
||
aggregationFunctionLabelMax: "Maximum",
|
||
aggregationFunctionLabelSize: "Anzahl"
|
||
};
|
||
var deDE2 = getGridLocalization(deDEGrid, deDE);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/elGR.js
|
||
var elGRGrid = {
|
||
// Root
|
||
noRowsLabel: "Δεν υπάρχουν καταχωρήσεις",
|
||
noResultsOverlayLabel: "Δεν βρέθηκαν αποτελέσματα.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Ύψος σειράς",
|
||
toolbarDensityLabel: "Ύψος σειράς",
|
||
toolbarDensityCompact: "Συμπαγής",
|
||
toolbarDensityStandard: "Προκαθορισμένο",
|
||
toolbarDensityComfortable: "Πλατύ",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Στήλες",
|
||
toolbarColumnsLabel: "Επιλέξτε στήλες",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Φίλτρα",
|
||
toolbarFiltersLabel: "Εμφάνιση φίλτρων",
|
||
toolbarFiltersTooltipHide: "Απόκρυψη φίλτρων",
|
||
toolbarFiltersTooltipShow: "Εμφάνιση φίλτρων",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} ενεργά φίλτρα` : `${count} ενεργό φίλτρο`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Αναζήτηση…",
|
||
toolbarQuickFilterLabel: "Αναζήτηση",
|
||
toolbarQuickFilterDeleteIconLabel: "Καθαρισμός",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Εξαγωγή",
|
||
toolbarExportLabel: "Εξαγωγή",
|
||
toolbarExportCSV: "Λήψη ως CSV",
|
||
toolbarExportPrint: "Εκτύπωση",
|
||
toolbarExportExcel: "Λήψη ως Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Εύρεση στήλης",
|
||
columnsPanelTextFieldPlaceholder: "Επικεφαλίδα στήλης",
|
||
columnsPanelDragIconLabel: "Αναδιάταξη στήλης",
|
||
columnsPanelShowAllButton: "Προβολή όλων",
|
||
columnsPanelHideAllButton: "Απόκρυψη όλων",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Προσθήκη φίλτρου",
|
||
filterPanelRemoveAll: "Αφαίρεση όλων",
|
||
filterPanelDeleteIconLabel: "Διαγραφή",
|
||
filterPanelLogicOperator: "Λογικός τελεστής",
|
||
filterPanelOperator: "Τελεστές",
|
||
filterPanelOperatorAnd: "Καί",
|
||
filterPanelOperatorOr: "Ή",
|
||
filterPanelColumns: "Στήλες",
|
||
filterPanelInputLabel: "Τιμή",
|
||
filterPanelInputPlaceholder: "Τιμή φίλτρου",
|
||
// Filter operators text
|
||
filterOperatorContains: "περιέχει",
|
||
filterOperatorEquals: "ισούται",
|
||
filterOperatorStartsWith: "ξεκινάει με",
|
||
filterOperatorEndsWith: "τελειώνει με",
|
||
filterOperatorIs: "είναι",
|
||
filterOperatorNot: "δεν είναι",
|
||
filterOperatorAfter: "είναι μετά",
|
||
filterOperatorOnOrAfter: "είναι ίσο ή μετά",
|
||
filterOperatorBefore: "είναι πριν",
|
||
filterOperatorOnOrBefore: "είναι ίσο ή πριν",
|
||
filterOperatorIsEmpty: "είναι κενό",
|
||
filterOperatorIsNotEmpty: "δεν είναι κενό",
|
||
filterOperatorIsAnyOf: "είναι οποιοδήποτε από",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Περιέχει",
|
||
headerFilterOperatorEquals: "Ισούται",
|
||
headerFilterOperatorStartsWith: "Ξεκινάει με",
|
||
headerFilterOperatorEndsWith: "Τελειώνει με",
|
||
headerFilterOperatorIs: "Είναι",
|
||
headerFilterOperatorNot: "Δεν είναι",
|
||
headerFilterOperatorAfter: "Είναι μετά",
|
||
headerFilterOperatorOnOrAfter: "Είναι ίσο ή μετά",
|
||
headerFilterOperatorBefore: "Είναι πριν",
|
||
headerFilterOperatorOnOrBefore: "Είναι ίσο ή πριν",
|
||
headerFilterOperatorIsEmpty: "Είναι κενό",
|
||
headerFilterOperatorIsNotEmpty: "Δεν είναι κενό",
|
||
headerFilterOperatorIsAnyOf: "Είναι οποιοδήποτε από",
|
||
"headerFilterOperator=": "Ισούται",
|
||
"headerFilterOperator!=": "Δεν ισούται",
|
||
"headerFilterOperator>": "Μεγαλύτερο από",
|
||
"headerFilterOperator>=": "Μεγαλύτερο ή ίσο με",
|
||
"headerFilterOperator<": "Μικρότερο από",
|
||
"headerFilterOperator<=": "Μικρότερο ή ίσο με",
|
||
// Filter values text
|
||
filterValueAny: "οποιοδήποτε",
|
||
filterValueTrue: "αληθές",
|
||
filterValueFalse: "ψευδές",
|
||
// Column menu text
|
||
columnMenuLabel: "Μενού",
|
||
columnMenuShowColumns: "Εμφάνιση στηλών",
|
||
columnMenuManageColumns: "Διαχείριση στηλών",
|
||
columnMenuFilter: "Φίλτρο",
|
||
columnMenuHideColumn: "Απόκρυψη",
|
||
columnMenuUnsort: "Απενεργοποίηση ταξινόμησης",
|
||
columnMenuSortAsc: "Ταξινόμηση σε αύξουσα σειρά",
|
||
columnMenuSortDesc: "Ταξινόμηση σε φθίνουσα σειρά",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} ενεργά φίλτρα` : `${count} ενεργό φίλτρο`,
|
||
columnHeaderFiltersLabel: "Εμφάνιση φίλτρων",
|
||
columnHeaderSortIconLabel: "Ταξινόμηση",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} επιλεγμένες γραμμές` : `${count.toLocaleString()} επιλεγμένη γραμμή`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Σύνολο Γραμμών:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} από ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Επιλογή πλαισίου ελέγχου",
|
||
checkboxSelectionSelectAllRows: "Επιλέξτε όλες τις σειρές",
|
||
checkboxSelectionUnselectAllRows: "Καταργήση επιλογής όλων των σειρών",
|
||
checkboxSelectionSelectRow: "Επιλογή γραμμής",
|
||
checkboxSelectionUnselectRow: "Καταργήση επιλογής γραμμής",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "ναί",
|
||
booleanCellFalseLabel: "όχι",
|
||
// Actions cell more text
|
||
actionsCellMore: "περισσότερα",
|
||
// Column pinning text
|
||
pinToLeft: "Καρφιτσώμα στα αριστερά",
|
||
pinToRight: "Καρφιτσώμα στα δεξιά",
|
||
unpin: "Ξεκαρφίτσωμα",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Ομαδοποίηση",
|
||
treeDataExpand: "εμφάνιση περιεχομένων",
|
||
treeDataCollapse: "απόκρυψη περιεχομένων",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Ομαδοποίηση",
|
||
groupColumn: (name) => `Ομαδοποίηση κατά ${name}`,
|
||
unGroupColumn: (name) => `Διακοπή ομαδοποίησης κατά ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Εναλλαγή πίνακα λεπτομερειών",
|
||
expandDetailPanel: "Ανάπτυξη",
|
||
collapseDetailPanel: "Σύμπτυξη",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Αναδιάταξη γραμμών",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Συσσωμάτωση",
|
||
aggregationFunctionLabelSum: "άθροισμα",
|
||
aggregationFunctionLabelAvg: "μέση τιμή",
|
||
aggregationFunctionLabelMin: "ελάχιστο",
|
||
aggregationFunctionLabelMax: "μέγιστο",
|
||
aggregationFunctionLabelSize: "μέγεθος"
|
||
};
|
||
var elGR2 = getGridLocalization(elGRGrid, elGR);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/enUS.js
|
||
var enUS2 = getGridLocalization(GRID_DEFAULT_LOCALE_TEXT, enUS);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/esES.js
|
||
var esESGrid = {
|
||
// Root
|
||
noRowsLabel: "Sin filas",
|
||
noResultsOverlayLabel: "Resultados no encontrados",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Densidad",
|
||
toolbarDensityLabel: "Densidad",
|
||
toolbarDensityCompact: "Compacta",
|
||
toolbarDensityStandard: "Estándar",
|
||
toolbarDensityComfortable: "Cómoda",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Columnas",
|
||
toolbarColumnsLabel: "Seleccionar columnas",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtros",
|
||
toolbarFiltersLabel: "Mostrar filtros",
|
||
toolbarFiltersTooltipHide: "Ocultar filtros",
|
||
toolbarFiltersTooltipShow: "Mostrar filtros",
|
||
toolbarFiltersTooltipActive: (count) => count > 1 ? `${count} filtros activos` : `${count} filtro activo`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Buscar…",
|
||
toolbarQuickFilterLabel: "Buscar",
|
||
toolbarQuickFilterDeleteIconLabel: "Limpiar",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Exportar",
|
||
toolbarExportLabel: "Exportar",
|
||
toolbarExportCSV: "Descargar como CSV",
|
||
toolbarExportPrint: "Imprimir",
|
||
toolbarExportExcel: "Descargar como Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Columna de búsqueda",
|
||
columnsPanelTextFieldPlaceholder: "Título de columna",
|
||
columnsPanelDragIconLabel: "Reordenar columna",
|
||
columnsPanelShowAllButton: "Mostrar todo",
|
||
columnsPanelHideAllButton: "Ocultar todo",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Agregar filtro",
|
||
filterPanelRemoveAll: "Remover todos",
|
||
filterPanelDeleteIconLabel: "Borrar",
|
||
filterPanelLogicOperator: "Operador lógico",
|
||
filterPanelOperator: "Operadores",
|
||
filterPanelOperatorAnd: "Y",
|
||
filterPanelOperatorOr: "O",
|
||
filterPanelColumns: "Columnas",
|
||
filterPanelInputLabel: "Valor",
|
||
filterPanelInputPlaceholder: "Valor de filtro",
|
||
// Filter operators text
|
||
filterOperatorContains: "contiene",
|
||
filterOperatorEquals: "es igual",
|
||
filterOperatorStartsWith: "comienza con",
|
||
filterOperatorEndsWith: "termina con",
|
||
filterOperatorIs: "es",
|
||
filterOperatorNot: "no es",
|
||
filterOperatorAfter: "es posterior",
|
||
filterOperatorOnOrAfter: "es en o posterior",
|
||
filterOperatorBefore: "es anterior",
|
||
filterOperatorOnOrBefore: "es en o anterior",
|
||
filterOperatorIsEmpty: "esta vacío",
|
||
filterOperatorIsNotEmpty: "no esta vacío",
|
||
filterOperatorIsAnyOf: "es cualquiera de",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Contiene",
|
||
headerFilterOperatorEquals: "Es igual a",
|
||
headerFilterOperatorStartsWith: "Comienza con",
|
||
headerFilterOperatorEndsWith: "Termina con",
|
||
headerFilterOperatorIs: "Es",
|
||
headerFilterOperatorNot: "No es",
|
||
headerFilterOperatorAfter: "Esta después de",
|
||
headerFilterOperatorOnOrAfter: "Esta en o después de",
|
||
headerFilterOperatorBefore: "Esta antes de",
|
||
headerFilterOperatorOnOrBefore: "Esta en o antes de",
|
||
headerFilterOperatorIsEmpty: "Esta vacío",
|
||
headerFilterOperatorIsNotEmpty: "No esta vacío",
|
||
headerFilterOperatorIsAnyOf: "Es cualquiera de",
|
||
"headerFilterOperator=": "Es igual a",
|
||
"headerFilterOperator!=": "Es diferente a",
|
||
"headerFilterOperator>": "Es mayor que",
|
||
"headerFilterOperator>=": "Es mayor o igual que",
|
||
"headerFilterOperator<": "Es menor que",
|
||
"headerFilterOperator<=": "Es menor o igual que",
|
||
// Filter values text
|
||
filterValueAny: "cualquiera",
|
||
filterValueTrue: "verdadero",
|
||
filterValueFalse: "falso",
|
||
// Column menu text
|
||
columnMenuLabel: "Menú",
|
||
columnMenuShowColumns: "Mostrar columnas",
|
||
columnMenuManageColumns: "Administrar columnas",
|
||
columnMenuFilter: "Filtro",
|
||
columnMenuHideColumn: "Ocultar",
|
||
columnMenuUnsort: "Desordenar",
|
||
columnMenuSortAsc: "Ordenar ASC",
|
||
columnMenuSortDesc: "Ordenar DESC",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count > 1 ? `${count} filtros activos` : `${count} filtro activo`,
|
||
columnHeaderFiltersLabel: "Mostrar filtros",
|
||
columnHeaderSortIconLabel: "Ordenar",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count > 1 ? `${count.toLocaleString()} filas seleccionadas` : `${count.toLocaleString()} fila seleccionada`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Filas Totales:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} de ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Seleccionar casilla",
|
||
checkboxSelectionSelectAllRows: "Seleccionar todas las filas",
|
||
checkboxSelectionUnselectAllRows: "Deseleccionar todas las filas",
|
||
checkboxSelectionSelectRow: "Seleccionar fila",
|
||
checkboxSelectionUnselectRow: "Deseleccionar fila",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "si",
|
||
booleanCellFalseLabel: "no",
|
||
// Actions cell more text
|
||
actionsCellMore: "más",
|
||
// Column pinning text
|
||
pinToLeft: "Anclar a la izquierda",
|
||
pinToRight: "Anclar a la derecha",
|
||
unpin: "Desanclar",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Grupo",
|
||
treeDataExpand: "mostrar hijos",
|
||
treeDataCollapse: "ocultar hijos",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Grupo",
|
||
groupColumn: (name) => `Agrupar por ${name}`,
|
||
unGroupColumn: (name) => `No agrupar por ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Alternar detalle",
|
||
expandDetailPanel: "Expandir",
|
||
collapseDetailPanel: "Contraer",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Reordenar filas",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Agregación",
|
||
aggregationFunctionLabelSum: "sum",
|
||
aggregationFunctionLabelAvg: "avg",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "max",
|
||
aggregationFunctionLabelSize: "tamaño"
|
||
};
|
||
var esES2 = getGridLocalization(esESGrid, esES);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/faIR.js
|
||
var faIRGrid = {
|
||
// Root
|
||
noRowsLabel: "بدون سطر",
|
||
noResultsOverlayLabel: "نتیجه ای پیدا نشد.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "تراکم",
|
||
toolbarDensityLabel: "تراکم",
|
||
toolbarDensityCompact: "فشرده",
|
||
toolbarDensityStandard: "استاندارد",
|
||
toolbarDensityComfortable: "راحت",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "ستونها",
|
||
toolbarColumnsLabel: "ستونها را انتخاب کنید",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "فیلترها",
|
||
toolbarFiltersLabel: "نمایش فیلترها",
|
||
toolbarFiltersTooltipHide: "مخفی کردن فیلترها",
|
||
toolbarFiltersTooltipShow: "نمایش فیلترها",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} فیلترهای فعال` : `${count} فیلتر فعال`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "جستجو...",
|
||
toolbarQuickFilterLabel: "جستجو",
|
||
toolbarQuickFilterDeleteIconLabel: "حذف",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "خروجی",
|
||
toolbarExportLabel: "خروجی",
|
||
toolbarExportCSV: "دانلود به صورت CSV",
|
||
toolbarExportPrint: "چاپ",
|
||
toolbarExportExcel: "دانلود به صورت اکسل",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "پیداکردن ستون",
|
||
columnsPanelTextFieldPlaceholder: "عنوان ستون",
|
||
columnsPanelDragIconLabel: "جابهجایی ستون",
|
||
columnsPanelShowAllButton: "نمایش همه",
|
||
columnsPanelHideAllButton: "مخفی همه",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "افزودن فیلتر",
|
||
filterPanelRemoveAll: "حذف همه",
|
||
filterPanelDeleteIconLabel: "حذف",
|
||
filterPanelLogicOperator: "عملگر منطقی",
|
||
filterPanelOperator: "عملگرها",
|
||
filterPanelOperatorAnd: "و",
|
||
filterPanelOperatorOr: "یا",
|
||
filterPanelColumns: "ستونها",
|
||
filterPanelInputLabel: "مقدار",
|
||
filterPanelInputPlaceholder: "فیلتر مقدار",
|
||
// Filter operators text
|
||
filterOperatorContains: "شامل",
|
||
filterOperatorEquals: "مساوی",
|
||
filterOperatorStartsWith: "شروع با",
|
||
filterOperatorEndsWith: "پایان با",
|
||
filterOperatorIs: "هست",
|
||
filterOperatorNot: "نیست",
|
||
filterOperatorAfter: "بعد از",
|
||
filterOperatorOnOrAfter: "معادل یا بعدش",
|
||
filterOperatorBefore: "قبلش",
|
||
filterOperatorOnOrBefore: "معادل یا قبلش",
|
||
filterOperatorIsEmpty: "خالی است",
|
||
filterOperatorIsNotEmpty: "خالی نیست",
|
||
filterOperatorIsAnyOf: "هر یک از",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "شامل",
|
||
headerFilterOperatorEquals: "مساوی",
|
||
headerFilterOperatorStartsWith: "شروع با",
|
||
headerFilterOperatorEndsWith: "پایان با",
|
||
headerFilterOperatorIs: "هست",
|
||
headerFilterOperatorNot: "نیست",
|
||
headerFilterOperatorAfter: "بعد از",
|
||
headerFilterOperatorOnOrAfter: "معادل یا بعد از",
|
||
headerFilterOperatorBefore: "قبل از",
|
||
headerFilterOperatorOnOrBefore: "معادل یا قبل از",
|
||
headerFilterOperatorIsEmpty: "خالی است",
|
||
headerFilterOperatorIsNotEmpty: "خالی نیست",
|
||
headerFilterOperatorIsAnyOf: "هر یک از",
|
||
"headerFilterOperator=": "مساوی",
|
||
"headerFilterOperator!=": "نامساوی",
|
||
"headerFilterOperator>": "بزرگتر",
|
||
"headerFilterOperator>=": "بزرگتر یا مساوی",
|
||
"headerFilterOperator<": "کوچکتر",
|
||
"headerFilterOperator<=": "کوچکتر یا مساوی",
|
||
// Filter values text
|
||
filterValueAny: "هرچیزی",
|
||
filterValueTrue: "صحیح",
|
||
filterValueFalse: "غلط",
|
||
// Column menu text
|
||
columnMenuLabel: "فهرست",
|
||
columnMenuShowColumns: "نمایش ستونها",
|
||
columnMenuManageColumns: "مدیریت ستونها",
|
||
columnMenuFilter: "فیلتر",
|
||
columnMenuHideColumn: "مخفی",
|
||
columnMenuUnsort: "نامرتبکردن",
|
||
columnMenuSortAsc: "مرتبکردن صعودی",
|
||
columnMenuSortDesc: "مرتبکردن نزولی",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} فیلترهای فعال` : `${count} فیلتر فعال`,
|
||
columnHeaderFiltersLabel: "نمایش فیلترها",
|
||
columnHeaderSortIconLabel: "مرتبکردن",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} سطرهای انتخاب شده` : `${count.toLocaleString()} سطر انتخاب شده`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "مجموع سطرها:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} از ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "چکباکس انتخاب",
|
||
checkboxSelectionSelectAllRows: "انتخاب همهی ردیفها",
|
||
checkboxSelectionUnselectAllRows: "لغو انتخاب همهی ردیفها",
|
||
checkboxSelectionSelectRow: "انتخاب ردیف",
|
||
checkboxSelectionUnselectRow: "لغو انتخاب ردیف",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "صحیح",
|
||
booleanCellFalseLabel: "غلط",
|
||
// Actions cell more text
|
||
actionsCellMore: "بیشتر",
|
||
// Column pinning text
|
||
pinToLeft: "سنجاق کردن به چپ",
|
||
pinToRight: "سنجاق کردن به راست",
|
||
unpin: "برداشتن سنجاق",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "گروهبندی",
|
||
treeDataExpand: "نمایش فرزندان",
|
||
treeDataCollapse: "پنهانسازی فرزندان",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "گروهبندی",
|
||
groupColumn: (name) => `گروهبندی براساس ${name}`,
|
||
unGroupColumn: (name) => `لغو گروهبندی براساس ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "پنل جزئیات",
|
||
expandDetailPanel: "بازکردن پنل جزئیات",
|
||
collapseDetailPanel: "بستن پنل جزئیات",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "ترتیب مجدد سطر",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "تجمیع",
|
||
aggregationFunctionLabelSum: "جمع",
|
||
aggregationFunctionLabelAvg: "میانگین",
|
||
aggregationFunctionLabelMin: "حداقل",
|
||
aggregationFunctionLabelMax: "حداکثر",
|
||
aggregationFunctionLabelSize: "اندازه"
|
||
};
|
||
var faIR2 = getGridLocalization(faIRGrid, faIR);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/fiFI.js
|
||
var fiFIGrid = {
|
||
// Root
|
||
noRowsLabel: "Ei rivejä",
|
||
noResultsOverlayLabel: "Ei tuloksia.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Tiiveys",
|
||
toolbarDensityLabel: "Tiiveys",
|
||
toolbarDensityCompact: "Kompakti",
|
||
toolbarDensityStandard: "Vakio",
|
||
toolbarDensityComfortable: "Mukava",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Sarakkeet",
|
||
toolbarColumnsLabel: "Valitse sarakkeet",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Suodattimet",
|
||
toolbarFiltersLabel: "Näytä suodattimet",
|
||
toolbarFiltersTooltipHide: "Piilota suodattimet",
|
||
toolbarFiltersTooltipShow: "Näytä suodattimet",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} aktiivista suodatinta` : `${count} aktiivinen suodatin`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Hae…",
|
||
toolbarQuickFilterLabel: "Hae",
|
||
toolbarQuickFilterDeleteIconLabel: "Tyhjennä",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Vie",
|
||
toolbarExportLabel: "Vie",
|
||
toolbarExportCSV: "Lataa CSV-muodossa",
|
||
toolbarExportPrint: "Tulosta",
|
||
toolbarExportExcel: "Lataa Excel-muodossa",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Etsi sarake",
|
||
columnsPanelTextFieldPlaceholder: "Sarakkeen otsikko",
|
||
columnsPanelDragIconLabel: "Järjestä sarake uudelleen",
|
||
columnsPanelShowAllButton: "Näytä kaikki",
|
||
columnsPanelHideAllButton: "Piilota kaikki",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Lisää suodatin",
|
||
filterPanelRemoveAll: "Poista kaikki",
|
||
filterPanelDeleteIconLabel: "Poista",
|
||
filterPanelLogicOperator: "Logiikkaoperaattori",
|
||
filterPanelOperator: "Operaattorit",
|
||
filterPanelOperatorAnd: "Ja",
|
||
filterPanelOperatorOr: "Tai",
|
||
filterPanelColumns: "Sarakkeet",
|
||
filterPanelInputLabel: "Arvo",
|
||
filterPanelInputPlaceholder: "Suodattimen arvo",
|
||
// Filter operators text
|
||
filterOperatorContains: "sisältää",
|
||
filterOperatorEquals: "on yhtä suuri kuin",
|
||
filterOperatorStartsWith: "alkaa",
|
||
filterOperatorEndsWith: "päättyy",
|
||
filterOperatorIs: "on",
|
||
filterOperatorNot: "ei ole",
|
||
filterOperatorAfter: "on jälkeen",
|
||
filterOperatorOnOrAfter: "on sama tai jälkeen",
|
||
filterOperatorBefore: "on ennen",
|
||
filterOperatorOnOrBefore: "on sama tai ennen",
|
||
filterOperatorIsEmpty: "on tyhjä",
|
||
filterOperatorIsNotEmpty: "ei ole tyhjä",
|
||
filterOperatorIsAnyOf: "on mikä tahansa seuraavista",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Sisältää",
|
||
headerFilterOperatorEquals: "On yhtä suuri kuin",
|
||
headerFilterOperatorStartsWith: "Alkaa",
|
||
headerFilterOperatorEndsWith: "Päättyy",
|
||
headerFilterOperatorIs: "On",
|
||
headerFilterOperatorNot: "Ei ole",
|
||
headerFilterOperatorAfter: "On jälkeen",
|
||
headerFilterOperatorOnOrAfter: "On sama tai jälkeen",
|
||
headerFilterOperatorBefore: "On ennen",
|
||
headerFilterOperatorOnOrBefore: "On sama tai ennen",
|
||
headerFilterOperatorIsEmpty: "On tyhjä",
|
||
headerFilterOperatorIsNotEmpty: "Ei ole tyhjä",
|
||
headerFilterOperatorIsAnyOf: "On mikä tahansa seuraavista",
|
||
"headerFilterOperator=": "On yhtä suuri kuin",
|
||
"headerFilterOperator!=": "Ei ole yhtä suuri kuin",
|
||
"headerFilterOperator>": "Enemmän kuin",
|
||
"headerFilterOperator>=": "Enemmän tai yhtä paljon kuin",
|
||
"headerFilterOperator<": "Vähemmän kuin",
|
||
"headerFilterOperator<=": "Vähemmän tai yhtä paljon kuin",
|
||
// Filter values text
|
||
filterValueAny: "mikä tahansa",
|
||
filterValueTrue: "tosi",
|
||
filterValueFalse: "epätosi",
|
||
// Column menu text
|
||
columnMenuLabel: "Valikko",
|
||
columnMenuShowColumns: "Näytä sarakkeet",
|
||
columnMenuManageColumns: "Hallitse sarakkeita",
|
||
columnMenuFilter: "Suodata",
|
||
columnMenuHideColumn: "Piilota",
|
||
columnMenuUnsort: "Poista järjestys",
|
||
columnMenuSortAsc: "Järjestä nousevasti",
|
||
columnMenuSortDesc: "Järjestä laskevasti",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} aktiivista suodatinta` : `${count} aktiivinen suodatin`,
|
||
columnHeaderFiltersLabel: "Näytä suodattimet",
|
||
columnHeaderSortIconLabel: "Järjestä",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} riviä valittu` : `${count.toLocaleString()} rivi valittu`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Rivejä yhteensä:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Valintaruutu",
|
||
checkboxSelectionSelectAllRows: "Valitse kaikki rivit",
|
||
checkboxSelectionUnselectAllRows: "Poista kaikkien rivien valinta",
|
||
checkboxSelectionSelectRow: "Valitse rivi",
|
||
checkboxSelectionUnselectRow: "Poista rivin valinta",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "tosi",
|
||
booleanCellFalseLabel: "epätosi",
|
||
// Actions cell more text
|
||
actionsCellMore: "lisää",
|
||
// Column pinning text
|
||
pinToLeft: "Kiinnitä vasemmalle",
|
||
pinToRight: "Kiinnitä oikealle",
|
||
unpin: "Irrota kiinnitys",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Ryhmä",
|
||
treeDataExpand: "Laajenna",
|
||
treeDataCollapse: "Supista",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Ryhmä",
|
||
groupColumn: (name) => `Ryhmittelyperuste ${name}`,
|
||
unGroupColumn: (name) => `Poista ryhmittelyperuste ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Yksityiskohtapaneelin vaihto",
|
||
expandDetailPanel: "Laajenna",
|
||
collapseDetailPanel: "Tiivistä",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Rivien uudelleenjärjestely",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Koostaminen",
|
||
aggregationFunctionLabelSum: "summa",
|
||
aggregationFunctionLabelAvg: "ka.",
|
||
aggregationFunctionLabelMin: "min.",
|
||
aggregationFunctionLabelMax: "maks.",
|
||
aggregationFunctionLabelSize: "koko"
|
||
};
|
||
var fiFI2 = getGridLocalization(fiFIGrid, fiFI);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/frFR.js
|
||
var frFRGrid = {
|
||
// Root
|
||
noRowsLabel: "Pas de résultats",
|
||
noResultsOverlayLabel: "Aucun résultat.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Densité",
|
||
toolbarDensityLabel: "Densité",
|
||
toolbarDensityCompact: "Compacte",
|
||
toolbarDensityStandard: "Standard",
|
||
toolbarDensityComfortable: "Confortable",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Colonnes",
|
||
toolbarColumnsLabel: "Choisir les colonnes",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtres",
|
||
toolbarFiltersLabel: "Afficher les filtres",
|
||
toolbarFiltersTooltipHide: "Cacher les filtres",
|
||
toolbarFiltersTooltipShow: "Afficher les filtres",
|
||
toolbarFiltersTooltipActive: (count) => count > 1 ? `${count} filtres actifs` : `${count} filtre actif`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Rechercher…",
|
||
toolbarQuickFilterLabel: "Recherche",
|
||
toolbarQuickFilterDeleteIconLabel: "Supprimer",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Exporter",
|
||
toolbarExportLabel: "Exporter",
|
||
toolbarExportCSV: "Télécharger en CSV",
|
||
toolbarExportPrint: "Imprimer",
|
||
toolbarExportExcel: "Télécharger pour Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Chercher une colonne",
|
||
columnsPanelTextFieldPlaceholder: "Titre de la colonne",
|
||
columnsPanelDragIconLabel: "Réorganiser la colonne",
|
||
columnsPanelShowAllButton: "Tout afficher",
|
||
columnsPanelHideAllButton: "Tout cacher",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Ajouter un filtre",
|
||
filterPanelRemoveAll: "Tout supprimer",
|
||
filterPanelDeleteIconLabel: "Supprimer",
|
||
filterPanelLogicOperator: "Opérateur logique",
|
||
filterPanelOperator: "Opérateur",
|
||
filterPanelOperatorAnd: "Et",
|
||
filterPanelOperatorOr: "Ou",
|
||
filterPanelColumns: "Colonne",
|
||
filterPanelInputLabel: "Valeur",
|
||
filterPanelInputPlaceholder: "Filtrer la valeur",
|
||
// Filter operators text
|
||
filterOperatorContains: "contient",
|
||
filterOperatorEquals: "est égal à",
|
||
filterOperatorStartsWith: "commence par",
|
||
filterOperatorEndsWith: "se termine par",
|
||
filterOperatorIs: "est",
|
||
filterOperatorNot: "n'est pas",
|
||
filterOperatorAfter: "postérieur",
|
||
filterOperatorOnOrAfter: "égal ou postérieur",
|
||
filterOperatorBefore: "antérieur",
|
||
filterOperatorOnOrBefore: "égal ou antérieur",
|
||
filterOperatorIsEmpty: "est vide",
|
||
filterOperatorIsNotEmpty: "n'est pas vide",
|
||
filterOperatorIsAnyOf: "fait partie de",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Contient",
|
||
headerFilterOperatorEquals: "Est égal à",
|
||
headerFilterOperatorStartsWith: "Commence par",
|
||
headerFilterOperatorEndsWith: "Se termine par",
|
||
headerFilterOperatorIs: "Est",
|
||
headerFilterOperatorNot: "N'est pas",
|
||
headerFilterOperatorAfter: "Postérieur",
|
||
headerFilterOperatorOnOrAfter: "Égal ou postérieur",
|
||
headerFilterOperatorBefore: "Antérieur",
|
||
headerFilterOperatorOnOrBefore: "Égal ou antérieur",
|
||
headerFilterOperatorIsEmpty: "Est vide",
|
||
headerFilterOperatorIsNotEmpty: "N'est pas vide",
|
||
headerFilterOperatorIsAnyOf: "Fait partie de",
|
||
"headerFilterOperator=": "Est égal à",
|
||
"headerFilterOperator!=": "N'est pas égal à",
|
||
"headerFilterOperator>": "Est supérieur à",
|
||
"headerFilterOperator>=": "Est supérieur ou égal à",
|
||
"headerFilterOperator<": "Est inférieur à",
|
||
"headerFilterOperator<=": "Est inférieur ou égal à",
|
||
// Filter values text
|
||
filterValueAny: "tous",
|
||
filterValueTrue: "vrai",
|
||
filterValueFalse: "faux",
|
||
// Column menu text
|
||
columnMenuLabel: "Menu",
|
||
columnMenuShowColumns: "Afficher les colonnes",
|
||
columnMenuManageColumns: "Gérer les colonnes",
|
||
columnMenuFilter: "Filtrer",
|
||
columnMenuHideColumn: "Cacher",
|
||
columnMenuUnsort: "Annuler le tri",
|
||
columnMenuSortAsc: "Tri ascendant",
|
||
columnMenuSortDesc: "Tri descendant",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count > 1 ? `${count} filtres actifs` : `${count} filtre actif`,
|
||
columnHeaderFiltersLabel: "Afficher les filtres",
|
||
columnHeaderSortIconLabel: "Trier",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count > 1 ? `${count.toLocaleString()} lignes sélectionnées` : `${count.toLocaleString()} ligne sélectionnée`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Total de lignes :",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} sur ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Sélection",
|
||
checkboxSelectionSelectAllRows: "Sélectionner toutes les lignes",
|
||
checkboxSelectionUnselectAllRows: "Désélectionner toutes les lignes",
|
||
checkboxSelectionSelectRow: "Sélectionner la ligne",
|
||
checkboxSelectionUnselectRow: "Désélectionner la ligne",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "vrai",
|
||
booleanCellFalseLabel: "faux",
|
||
// Actions cell more text
|
||
actionsCellMore: "Plus",
|
||
// Column pinning text
|
||
pinToLeft: "Épingler à gauche",
|
||
pinToRight: "Épingler à droite",
|
||
unpin: "Désépingler",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Groupe",
|
||
treeDataExpand: "afficher les enfants",
|
||
treeDataCollapse: "masquer les enfants",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Groupe",
|
||
groupColumn: (name) => `Grouper par ${name}`,
|
||
unGroupColumn: (name) => `Arrêter de grouper par ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Afficher/masquer les détails",
|
||
expandDetailPanel: "Afficher",
|
||
collapseDetailPanel: "Masquer",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Positionnement des lignes",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Agrégation",
|
||
aggregationFunctionLabelSum: "Somme",
|
||
aggregationFunctionLabelAvg: "Moyenne",
|
||
aggregationFunctionLabelMin: "Minimum",
|
||
aggregationFunctionLabelMax: "Maximum",
|
||
aggregationFunctionLabelSize: "Nombre d'éléments"
|
||
};
|
||
var frFR2 = getGridLocalization(frFRGrid, frFR);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/heIL.js
|
||
var heILGrid = {
|
||
// Root
|
||
noRowsLabel: "אין שורות",
|
||
noResultsOverlayLabel: "לא נמצאו תוצאות.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "צפיפות",
|
||
toolbarDensityLabel: "צפיפות",
|
||
toolbarDensityCompact: "דחוסה",
|
||
toolbarDensityStandard: "רגילה",
|
||
toolbarDensityComfortable: "אוורירית",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "עמודות",
|
||
toolbarColumnsLabel: "בחר עמודות",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "סינון",
|
||
toolbarFiltersLabel: "הצג מסננים",
|
||
toolbarFiltersTooltipHide: "הסתר מסננים",
|
||
toolbarFiltersTooltipShow: "הצג מסננים",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} מסננים פעילים` : `מסנן אחד פעיל`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "חיפוש…",
|
||
toolbarQuickFilterLabel: "חיפוש",
|
||
toolbarQuickFilterDeleteIconLabel: "ניקוי",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "ייצוא",
|
||
toolbarExportLabel: "ייצוא",
|
||
toolbarExportCSV: "ייצוא ל- CSV",
|
||
toolbarExportPrint: "הדפסה",
|
||
toolbarExportExcel: "ייצוא ל- Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "חפש עמודה",
|
||
columnsPanelTextFieldPlaceholder: "כותרת עמודה",
|
||
columnsPanelDragIconLabel: "סדר עמודות מחדש",
|
||
columnsPanelShowAllButton: "הצג הכל",
|
||
columnsPanelHideAllButton: "הסתר הכל",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "הוסף מסנן",
|
||
filterPanelRemoveAll: "מחק הכל",
|
||
filterPanelDeleteIconLabel: "מחק",
|
||
filterPanelLogicOperator: "אופרטור לוגי",
|
||
filterPanelOperator: "אופרטור",
|
||
filterPanelOperatorAnd: "וגם",
|
||
filterPanelOperatorOr: "או",
|
||
filterPanelColumns: "עמודות",
|
||
filterPanelInputLabel: "ערך",
|
||
filterPanelInputPlaceholder: "ערך מסנן",
|
||
// Filter operators text
|
||
filterOperatorContains: "מכיל",
|
||
filterOperatorEquals: "שווה",
|
||
filterOperatorStartsWith: "מתחיל ב-",
|
||
filterOperatorEndsWith: "נגמר ב-",
|
||
filterOperatorIs: "הינו",
|
||
filterOperatorNot: "אינו",
|
||
filterOperatorAfter: "אחרי",
|
||
filterOperatorOnOrAfter: "ב- או אחרי",
|
||
filterOperatorBefore: "לפני",
|
||
filterOperatorOnOrBefore: "ב- או לפני",
|
||
filterOperatorIsEmpty: "ריק",
|
||
filterOperatorIsNotEmpty: "אינו ריק",
|
||
filterOperatorIsAnyOf: "הוא אחד מ-",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "מכיל",
|
||
headerFilterOperatorEquals: "שווה",
|
||
headerFilterOperatorStartsWith: "מתחיל ב-",
|
||
headerFilterOperatorEndsWith: "נגמר ב-",
|
||
headerFilterOperatorIs: "הינו",
|
||
headerFilterOperatorNot: "אינו",
|
||
headerFilterOperatorAfter: "אחרי",
|
||
headerFilterOperatorOnOrAfter: "ב- או אחרי",
|
||
headerFilterOperatorBefore: "לפני",
|
||
headerFilterOperatorOnOrBefore: "ב- או לפני",
|
||
headerFilterOperatorIsEmpty: "ריק",
|
||
headerFilterOperatorIsNotEmpty: "אינו ריק",
|
||
headerFilterOperatorIsAnyOf: "הוא אחד מ-",
|
||
"headerFilterOperator=": "שווה",
|
||
"headerFilterOperator!=": "אינו שווה",
|
||
"headerFilterOperator>": "גדול מ-",
|
||
"headerFilterOperator>=": "גדול שווה ל-",
|
||
"headerFilterOperator<": "קטן מ-",
|
||
"headerFilterOperator<=": "קטן שווה ל-",
|
||
// Filter values text
|
||
filterValueAny: "כל ערך",
|
||
filterValueTrue: "כן",
|
||
filterValueFalse: "לא",
|
||
// Column menu text
|
||
columnMenuLabel: "תפריט",
|
||
columnMenuShowColumns: "הצג עמודות",
|
||
columnMenuManageColumns: "נהל עמודות",
|
||
columnMenuFilter: "סנן",
|
||
columnMenuHideColumn: "הסתר",
|
||
columnMenuUnsort: "בטל מיון",
|
||
columnMenuSortAsc: "מיין בסדר עולה",
|
||
columnMenuSortDesc: "מיין בסדר יורד",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} מסננים פעילים` : `מסנן אחד פעיל`,
|
||
columnHeaderFiltersLabel: "הצג מסננים",
|
||
columnHeaderSortIconLabel: "מיין",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} שורות נבחרו` : `שורה אחת נבחרה`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "סך הכל:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} מתוך ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "בחירה",
|
||
checkboxSelectionSelectAllRows: "בחר הכל",
|
||
checkboxSelectionUnselectAllRows: "בטל הכל",
|
||
checkboxSelectionSelectRow: "בחר שורה",
|
||
checkboxSelectionUnselectRow: "בטל בחירת שורה",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "כן",
|
||
booleanCellFalseLabel: "לא",
|
||
// Actions cell more text
|
||
actionsCellMore: "עוד",
|
||
// Column pinning text
|
||
pinToLeft: "נעץ משמאל",
|
||
pinToRight: "נעץ מימין",
|
||
unpin: "הסר נעיצה",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "קבוצה",
|
||
treeDataExpand: "הרחב",
|
||
treeDataCollapse: "כווץ",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "קבוצה",
|
||
groupColumn: (name) => `קבץ לפי ${name}`,
|
||
unGroupColumn: (name) => `הפסק לקבץ לפי ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "הצג/הסתר פרטים",
|
||
expandDetailPanel: "הרחב",
|
||
collapseDetailPanel: "כווץ",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "סידור שורות",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "צבירה",
|
||
aggregationFunctionLabelSum: "סכום",
|
||
aggregationFunctionLabelAvg: "ממוצע",
|
||
aggregationFunctionLabelMin: "מינימום",
|
||
aggregationFunctionLabelMax: "מקסימום",
|
||
aggregationFunctionLabelSize: "גודל"
|
||
};
|
||
var heIL2 = getGridLocalization(heILGrid, heIL);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/huHU.js
|
||
var huHUGrid = {
|
||
// Root
|
||
noRowsLabel: "Nincsenek sorok",
|
||
noResultsOverlayLabel: "Nincs találat.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Sormagasság",
|
||
toolbarDensityLabel: "Sormagasság",
|
||
toolbarDensityCompact: "Kompakt",
|
||
toolbarDensityStandard: "Normál",
|
||
toolbarDensityComfortable: "Kényelmes",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Oszlopok",
|
||
toolbarColumnsLabel: "Oszlopok kiválasztása",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Szűrők",
|
||
toolbarFiltersLabel: "Szűrők megjelenítése",
|
||
toolbarFiltersTooltipHide: "Szűrők elrejtése",
|
||
toolbarFiltersTooltipShow: "Szűrők megjelenítése",
|
||
toolbarFiltersTooltipActive: (count) => `${count} aktív szűrő`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Keresés…",
|
||
toolbarQuickFilterLabel: "Keresés",
|
||
toolbarQuickFilterDeleteIconLabel: "Törlés",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Exportálás",
|
||
toolbarExportLabel: "Exportálás",
|
||
toolbarExportCSV: "Mentés CSV fájlként",
|
||
toolbarExportPrint: "Nyomtatás",
|
||
toolbarExportExcel: "Mentés Excel fájlként",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Oszlop keresése",
|
||
columnsPanelTextFieldPlaceholder: "Oszlop neve",
|
||
columnsPanelDragIconLabel: "Oszlop átrendezése",
|
||
columnsPanelShowAllButton: "Összes megjelenítése",
|
||
columnsPanelHideAllButton: "Összes elrejtése",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Szűrő hozzáadása",
|
||
filterPanelRemoveAll: "Összes törlése",
|
||
filterPanelDeleteIconLabel: "Törlés",
|
||
filterPanelLogicOperator: "Logikai operátor",
|
||
filterPanelOperator: "Operátorok",
|
||
filterPanelOperatorAnd: "És",
|
||
filterPanelOperatorOr: "Vagy",
|
||
filterPanelColumns: "Oszlopok",
|
||
filterPanelInputLabel: "Érték",
|
||
filterPanelInputPlaceholder: "Érték szűrése",
|
||
// Filter operators text
|
||
filterOperatorContains: "tartalmazza:",
|
||
filterOperatorEquals: "egyenlő ezzel:",
|
||
filterOperatorStartsWith: "ezzel kezdődik:",
|
||
filterOperatorEndsWith: "ezzel végződik:",
|
||
filterOperatorIs: "a következő:",
|
||
filterOperatorNot: "nem a következő:",
|
||
filterOperatorAfter: "ezutáni:",
|
||
filterOperatorOnOrAfter: "ekkori vagy ezutáni:",
|
||
filterOperatorBefore: "ezelőtti:",
|
||
filterOperatorOnOrBefore: "ekkori vagy ezelőtti:",
|
||
filterOperatorIsEmpty: "üres",
|
||
filterOperatorIsNotEmpty: "nem üres",
|
||
filterOperatorIsAnyOf: "a következők egyike:",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Tartalmazza:",
|
||
headerFilterOperatorEquals: "Egyenlő ezzel:",
|
||
headerFilterOperatorStartsWith: "Ezzel kezdődik:",
|
||
headerFilterOperatorEndsWith: "Ezzel végződik:",
|
||
// headerFilterOperatorIs: 'Is',
|
||
// headerFilterOperatorNot: 'Is not',
|
||
headerFilterOperatorAfter: "Ezutáni:",
|
||
headerFilterOperatorOnOrAfter: "Ekkozori vagy ezutáni:",
|
||
headerFilterOperatorBefore: "Ezelőtti:",
|
||
headerFilterOperatorOnOrBefore: "Ekkori vagy ezelőtti:",
|
||
headerFilterOperatorIsEmpty: "Üres",
|
||
headerFilterOperatorIsNotEmpty: "Nem üres",
|
||
headerFilterOperatorIsAnyOf: "A következők egyike:",
|
||
"headerFilterOperator=": "Egyenlő",
|
||
"headerFilterOperator!=": "Nem egyenlő",
|
||
"headerFilterOperator>": "Nagyobb mint",
|
||
"headerFilterOperator>=": "Nagyobb vagy egyenlő",
|
||
"headerFilterOperator<": "Kissebb mint",
|
||
"headerFilterOperator<=": "Kissebb vagy enygenlő",
|
||
// Filter values text
|
||
filterValueAny: "bármilyen",
|
||
filterValueTrue: "igaz",
|
||
filterValueFalse: "hamis",
|
||
// Column menu text
|
||
columnMenuLabel: "Menü",
|
||
columnMenuShowColumns: "Oszlopok megjelenítése",
|
||
columnMenuManageColumns: "Oszlopok kezelése",
|
||
columnMenuFilter: "Szűrők",
|
||
columnMenuHideColumn: "Elrejtés",
|
||
columnMenuUnsort: "Sorrend visszaállítása",
|
||
columnMenuSortAsc: "Növekvő sorrendbe",
|
||
columnMenuSortDesc: "Csökkenő sorrendbe",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => `${count} aktív szűrő`,
|
||
columnHeaderFiltersLabel: "Szűrők megjelenítése",
|
||
columnHeaderSortIconLabel: "Átrendezés",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => `${count.toLocaleString()} sor kiválasztva`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Összesen:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} (összesen: ${totalCount.toLocaleString()})`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Jelölőnégyzetes kijelölés",
|
||
checkboxSelectionSelectAllRows: "Minden sor kijelölése",
|
||
checkboxSelectionUnselectAllRows: "Minden sor kijelölésének törlése",
|
||
checkboxSelectionSelectRow: "Sor kijelölése",
|
||
checkboxSelectionUnselectRow: "Sor kijelölésének törlése",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "igen",
|
||
booleanCellFalseLabel: "nem",
|
||
// Actions cell more text
|
||
actionsCellMore: "további",
|
||
// Column pinning text
|
||
pinToLeft: "Rögzítés balra",
|
||
pinToRight: "Rögzítés jobbra",
|
||
unpin: "Rögzítés törlése",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Csoport",
|
||
treeDataExpand: "gyermekek megjelenítése",
|
||
treeDataCollapse: "gyermekek elrejtése",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Csoportosítás",
|
||
groupColumn: (name) => `Csoportosítás ${name} szerint`,
|
||
unGroupColumn: (name) => `${name} szerinti csoportosítás törlése`,
|
||
// Master/detail
|
||
detailPanelToggle: "Részletek panel váltása",
|
||
expandDetailPanel: "Kibontás",
|
||
collapseDetailPanel: "Összecsukás",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Sorok újrarendezése",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Összesítés",
|
||
aggregationFunctionLabelSum: "Összeg",
|
||
aggregationFunctionLabelAvg: "Átlag",
|
||
aggregationFunctionLabelMin: "Minimum",
|
||
aggregationFunctionLabelMax: "Maximum",
|
||
aggregationFunctionLabelSize: "Darabszám"
|
||
};
|
||
var huHU2 = getGridLocalization(huHUGrid, huHU);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/itIT.js
|
||
var itITGrid = {
|
||
// Root
|
||
noRowsLabel: "Nessun record",
|
||
noResultsOverlayLabel: "Nessun record trovato.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Densità",
|
||
toolbarDensityLabel: "Densità",
|
||
toolbarDensityCompact: "Compatta",
|
||
toolbarDensityStandard: "Standard",
|
||
toolbarDensityComfortable: "Comoda",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Colonne",
|
||
toolbarColumnsLabel: "Seleziona le colonne",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtri",
|
||
toolbarFiltersLabel: "Mostra i filtri",
|
||
toolbarFiltersTooltipHide: "Nascondi i filtri",
|
||
toolbarFiltersTooltipShow: "Mostra i filtri",
|
||
toolbarFiltersTooltipActive: (count) => count > 1 ? `${count} filtri attivi` : `${count} filtro attivo`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Cerca…",
|
||
toolbarQuickFilterLabel: "Cerca",
|
||
toolbarQuickFilterDeleteIconLabel: "Resetta",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Esporta",
|
||
toolbarExportLabel: "Esporta",
|
||
toolbarExportCSV: "Esporta in CSV",
|
||
toolbarExportPrint: "Stampa",
|
||
toolbarExportExcel: "Scarica come Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Cerca colonna",
|
||
columnsPanelTextFieldPlaceholder: "Titolo della colonna",
|
||
columnsPanelDragIconLabel: "Riordina la colonna",
|
||
columnsPanelShowAllButton: "Mostra tutto",
|
||
columnsPanelHideAllButton: "Nascondi tutto",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Aggiungi un filtro",
|
||
filterPanelRemoveAll: "Rimuovi filtri",
|
||
filterPanelDeleteIconLabel: "Rimuovi",
|
||
filterPanelLogicOperator: "Operatore logico",
|
||
filterPanelOperator: "Operatori",
|
||
filterPanelOperatorAnd: "E (and)",
|
||
filterPanelOperatorOr: "O (or)",
|
||
filterPanelColumns: "Colonne",
|
||
filterPanelInputLabel: "Valore",
|
||
filterPanelInputPlaceholder: "Filtra il valore",
|
||
// Filter operators text
|
||
filterOperatorContains: "contiene",
|
||
filterOperatorEquals: "uguale a",
|
||
filterOperatorStartsWith: "comincia per",
|
||
filterOperatorEndsWith: "termina per",
|
||
filterOperatorIs: "uguale a",
|
||
filterOperatorNot: "diversa da",
|
||
filterOperatorAfter: "dopo il",
|
||
filterOperatorOnOrAfter: "a partire dal",
|
||
filterOperatorBefore: "prima del",
|
||
filterOperatorOnOrBefore: "fino al",
|
||
filterOperatorIsEmpty: "è vuoto",
|
||
filterOperatorIsNotEmpty: "non è vuoto",
|
||
filterOperatorIsAnyOf: "è uno tra",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Contiene",
|
||
headerFilterOperatorEquals: "uguale a",
|
||
headerFilterOperatorStartsWith: "comincia per",
|
||
headerFilterOperatorEndsWith: "termina per",
|
||
headerFilterOperatorIs: "uguale a",
|
||
headerFilterOperatorNot: "diversa da",
|
||
headerFilterOperatorAfter: "dopo il",
|
||
headerFilterOperatorOnOrAfter: "a partire dal",
|
||
headerFilterOperatorBefore: "prima del",
|
||
headerFilterOperatorOnOrBefore: "fino al",
|
||
headerFilterOperatorIsEmpty: "è vuoto",
|
||
headerFilterOperatorIsNotEmpty: "non è vuoto",
|
||
headerFilterOperatorIsAnyOf: "è uno tra",
|
||
"headerFilterOperator=": "uguale a",
|
||
"headerFilterOperator!=": "diverso da",
|
||
"headerFilterOperator>": "maggiore di",
|
||
"headerFilterOperator>=": "maggiore o uguale a",
|
||
"headerFilterOperator<": "minore di",
|
||
"headerFilterOperator<=": "minore o uguale a",
|
||
// Filter values text
|
||
filterValueAny: "qualunque",
|
||
filterValueTrue: "vero",
|
||
filterValueFalse: "falso",
|
||
// Column menu text
|
||
columnMenuLabel: "Menu",
|
||
columnMenuShowColumns: "Mostra le colonne",
|
||
columnMenuManageColumns: "Gestisci colonne",
|
||
columnMenuFilter: "Filtra",
|
||
columnMenuHideColumn: "Nascondi",
|
||
columnMenuUnsort: "Annulla l'ordinamento",
|
||
columnMenuSortAsc: "Ordinamento crescente",
|
||
columnMenuSortDesc: "Ordinamento decrescente",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count > 1 ? `${count} filtri attivi` : `${count} filtro attivo`,
|
||
columnHeaderFiltersLabel: "Mostra i filtri",
|
||
columnHeaderSortIconLabel: "Ordina",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count > 1 ? `${count.toLocaleString()} record selezionati` : `${count.toLocaleString()} record selezionato`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Record totali:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} di ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Seleziona",
|
||
checkboxSelectionSelectAllRows: "Seleziona tutte le righe",
|
||
checkboxSelectionUnselectAllRows: "Deseleziona tutte le righe",
|
||
checkboxSelectionSelectRow: "Seleziona riga",
|
||
checkboxSelectionUnselectRow: "Deseleziona riga",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "vero",
|
||
booleanCellFalseLabel: "falso",
|
||
// Actions cell more text
|
||
actionsCellMore: "più",
|
||
// Column pinning text
|
||
pinToLeft: "Blocca a sinistra",
|
||
pinToRight: "Blocca a destra",
|
||
unpin: "Sblocca",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Gruppo",
|
||
treeDataExpand: "mostra figli",
|
||
treeDataCollapse: "nascondi figli",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Gruppo",
|
||
groupColumn: (name) => `Raggruppa per ${name}`,
|
||
unGroupColumn: (name) => `Annulla raggruppamento per ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Abilita pannello dettagli",
|
||
expandDetailPanel: "Espandi",
|
||
collapseDetailPanel: "Comprimi",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Riordinamento righe",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "aggregazione",
|
||
aggregationFunctionLabelSum: "somma",
|
||
aggregationFunctionLabelAvg: "media",
|
||
aggregationFunctionLabelMin: "minimo",
|
||
aggregationFunctionLabelMax: "massimo",
|
||
aggregationFunctionLabelSize: "numero di elementi"
|
||
};
|
||
var itIT2 = getGridLocalization(itITGrid, itIT);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/jaJP.js
|
||
var jaJPGrid = {
|
||
// Root
|
||
noRowsLabel: "行がありません。",
|
||
noResultsOverlayLabel: "結果がありません。",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "行間隔",
|
||
toolbarDensityLabel: "行間隔",
|
||
toolbarDensityCompact: "コンパクト",
|
||
toolbarDensityStandard: "標準",
|
||
toolbarDensityComfortable: "広め",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "列一覧",
|
||
toolbarColumnsLabel: "列選択",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "フィルター",
|
||
toolbarFiltersLabel: "フィルター表示",
|
||
toolbarFiltersTooltipHide: "フィルター非表示",
|
||
toolbarFiltersTooltipShow: "フィルター表示",
|
||
toolbarFiltersTooltipActive: (count) => `${count}件のフィルターを適用中`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "検索…",
|
||
toolbarQuickFilterLabel: "検索",
|
||
toolbarQuickFilterDeleteIconLabel: "クリア",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "エクスポート",
|
||
toolbarExportLabel: "エクスポート",
|
||
toolbarExportCSV: "CSVダウンロード",
|
||
toolbarExportPrint: "印刷",
|
||
toolbarExportExcel: "Excelダウンロード",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "列検索",
|
||
columnsPanelTextFieldPlaceholder: "検索クエリを入力…",
|
||
columnsPanelDragIconLabel: "列並べ替え",
|
||
columnsPanelShowAllButton: "すべて表示",
|
||
columnsPanelHideAllButton: "すべて非表示",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "フィルター追加",
|
||
filterPanelRemoveAll: "すべて削除",
|
||
filterPanelDeleteIconLabel: "削除",
|
||
filterPanelLogicOperator: "論理演算子",
|
||
filterPanelOperator: "演算子",
|
||
filterPanelOperatorAnd: "And",
|
||
filterPanelOperatorOr: "Or",
|
||
filterPanelColumns: "列",
|
||
filterPanelInputLabel: "値",
|
||
filterPanelInputPlaceholder: "値を入力…",
|
||
// Filter operators text
|
||
filterOperatorContains: "...を含む",
|
||
filterOperatorEquals: "...に等しい",
|
||
filterOperatorStartsWith: "...で始まる",
|
||
filterOperatorEndsWith: "...で終わる",
|
||
filterOperatorIs: "...である",
|
||
filterOperatorNot: "...でない",
|
||
filterOperatorAfter: "...より後ろ",
|
||
filterOperatorOnOrAfter: "...以降",
|
||
filterOperatorBefore: "...より前",
|
||
filterOperatorOnOrBefore: "...以前",
|
||
filterOperatorIsEmpty: "...空である",
|
||
filterOperatorIsNotEmpty: "...空でない",
|
||
filterOperatorIsAnyOf: "...のいずれか",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "含む",
|
||
headerFilterOperatorEquals: "等しい",
|
||
headerFilterOperatorStartsWith: "で始まる",
|
||
headerFilterOperatorEndsWith: "で終わる",
|
||
headerFilterOperatorIs: "である",
|
||
headerFilterOperatorNot: "ではない",
|
||
headerFilterOperatorAfter: "...より後ろ",
|
||
headerFilterOperatorOnOrAfter: "...以降",
|
||
headerFilterOperatorBefore: "...より前",
|
||
headerFilterOperatorOnOrBefore: "...以前",
|
||
headerFilterOperatorIsEmpty: "空白",
|
||
headerFilterOperatorIsNotEmpty: "空白ではない",
|
||
headerFilterOperatorIsAnyOf: "いずれか",
|
||
"headerFilterOperator=": "等しい",
|
||
"headerFilterOperator!=": "等しくない",
|
||
"headerFilterOperator>": "より大きい",
|
||
"headerFilterOperator>=": "以上",
|
||
"headerFilterOperator<": "未満",
|
||
"headerFilterOperator<=": "以下",
|
||
// Filter values text
|
||
filterValueAny: "いずれか",
|
||
filterValueTrue: "真",
|
||
filterValueFalse: "偽",
|
||
// Column menu text
|
||
columnMenuLabel: "メニュー",
|
||
columnMenuShowColumns: "列表示",
|
||
columnMenuManageColumns: "列管理",
|
||
columnMenuFilter: "フィルター",
|
||
columnMenuHideColumn: "列非表示",
|
||
columnMenuUnsort: "ソート解除",
|
||
columnMenuSortAsc: "昇順ソート",
|
||
columnMenuSortDesc: "降順ソート",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => `${count}件のフィルターを適用中`,
|
||
columnHeaderFiltersLabel: "フィルター表示",
|
||
columnHeaderSortIconLabel: "ソート",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => `${count}行を選択中`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "総行数:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "チェックボックス",
|
||
checkboxSelectionSelectAllRows: "すべての行を選択",
|
||
checkboxSelectionUnselectAllRows: "すべての行選択を解除",
|
||
checkboxSelectionSelectRow: "行を選択",
|
||
checkboxSelectionUnselectRow: "行選択を解除",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "真",
|
||
booleanCellFalseLabel: "偽",
|
||
// Actions cell more text
|
||
actionsCellMore: "もっと見る",
|
||
// Column pinning text
|
||
pinToLeft: "左側に固定",
|
||
pinToRight: "右側に固定",
|
||
unpin: "固定解除",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "グループ",
|
||
treeDataExpand: "展開",
|
||
treeDataCollapse: "折りたたみ",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "グループ",
|
||
groupColumn: (name) => `${name}でグループ化`,
|
||
unGroupColumn: (name) => `${name}のグループを解除`,
|
||
// Master/detail
|
||
detailPanelToggle: "詳細パネルの切り替え",
|
||
expandDetailPanel: "展開",
|
||
collapseDetailPanel: "折りたたみ",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "行並び替え",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "合計",
|
||
aggregationFunctionLabelSum: "和",
|
||
aggregationFunctionLabelAvg: "平均",
|
||
aggregationFunctionLabelMin: "最小値",
|
||
aggregationFunctionLabelMax: "最大値",
|
||
aggregationFunctionLabelSize: "サイズ"
|
||
};
|
||
var jaJP2 = getGridLocalization(jaJPGrid, jaJP);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/koKR.js
|
||
var koKRGrid = {
|
||
// Root
|
||
noRowsLabel: "행이 없습니다.",
|
||
noResultsOverlayLabel: "결과값이 없습니다.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "행 간격",
|
||
toolbarDensityLabel: "행 간격",
|
||
toolbarDensityCompact: "좁게",
|
||
toolbarDensityStandard: "기본",
|
||
toolbarDensityComfortable: "넓게",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "열 목록",
|
||
toolbarColumnsLabel: "열 선택",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "필터",
|
||
toolbarFiltersLabel: "필터 표시",
|
||
toolbarFiltersTooltipHide: "필터 숨기기",
|
||
toolbarFiltersTooltipShow: "필터 표시",
|
||
toolbarFiltersTooltipActive: (count) => `${count}건의 필터를 적용중`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "검색…",
|
||
toolbarQuickFilterLabel: "검색",
|
||
toolbarQuickFilterDeleteIconLabel: "초기화",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "내보내기",
|
||
toolbarExportLabel: "내보내기",
|
||
toolbarExportCSV: "CSV로 내보내기",
|
||
toolbarExportPrint: "프린트",
|
||
toolbarExportExcel: "Excel로 내보내기",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "열 검색",
|
||
columnsPanelTextFieldPlaceholder: "열 이름",
|
||
columnsPanelDragIconLabel: "열 정렬",
|
||
columnsPanelShowAllButton: "모두 보기",
|
||
columnsPanelHideAllButton: "모두 숨기기",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "필터 추가",
|
||
// filterPanelRemoveAll: 'Remove all',
|
||
filterPanelDeleteIconLabel: "삭제",
|
||
filterPanelLogicOperator: "논리 연산자",
|
||
filterPanelOperator: "연산자",
|
||
filterPanelOperatorAnd: "그리고",
|
||
filterPanelOperatorOr: "또는",
|
||
filterPanelColumns: "목록",
|
||
filterPanelInputLabel: "값",
|
||
filterPanelInputPlaceholder: "값 입력",
|
||
// Filter operators text
|
||
filterOperatorContains: "포함하는",
|
||
filterOperatorEquals: "값이 같은",
|
||
filterOperatorStartsWith: "시작하는",
|
||
filterOperatorEndsWith: "끝나는",
|
||
filterOperatorIs: "~인",
|
||
filterOperatorNot: "~아닌",
|
||
filterOperatorAfter: "더 이후",
|
||
filterOperatorOnOrAfter: "이후",
|
||
filterOperatorBefore: "더 이전",
|
||
filterOperatorOnOrBefore: "이전",
|
||
filterOperatorIsEmpty: "값이 없는",
|
||
filterOperatorIsNotEmpty: "값이 있는",
|
||
filterOperatorIsAnyOf: "값 중 하나인",
|
||
// '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: "아무값",
|
||
filterValueTrue: "참",
|
||
filterValueFalse: "거짓",
|
||
// Column menu text
|
||
columnMenuLabel: "메뉴",
|
||
columnMenuShowColumns: "열 표시",
|
||
// columnMenuManageColumns: 'Manage columns',
|
||
columnMenuFilter: "필터",
|
||
columnMenuHideColumn: "열 숨기기",
|
||
columnMenuUnsort: "정렬 해제",
|
||
columnMenuSortAsc: "오름차순 정렬",
|
||
columnMenuSortDesc: "내림차순 정렬",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => `${count}건의 필터를 적용중`,
|
||
columnHeaderFiltersLabel: "필터 표시",
|
||
columnHeaderSortIconLabel: "정렬",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => `${count}행 선택중`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "총 행수:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "선택",
|
||
checkboxSelectionSelectAllRows: "모든 행 선택",
|
||
checkboxSelectionUnselectAllRows: "모든 행 선택 해제",
|
||
checkboxSelectionSelectRow: "행 선택",
|
||
checkboxSelectionUnselectRow: "행 선택 해제",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "참",
|
||
booleanCellFalseLabel: "거짓",
|
||
// Actions cell more text
|
||
actionsCellMore: "더보기",
|
||
// Column pinning text
|
||
pinToLeft: "왼쪽에 고정",
|
||
pinToRight: "오른쪽에 고정",
|
||
unpin: "고정 해제",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "그룹",
|
||
treeDataExpand: "하위노드 펼치기",
|
||
treeDataCollapse: "하위노드 접기",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "그룹",
|
||
groupColumn: (name) => `${name} 값으로 그룹 생성`,
|
||
unGroupColumn: (name) => `${name} 값으로 그룹 해제`,
|
||
// Master/detail
|
||
detailPanelToggle: "상세 패널 토글",
|
||
expandDetailPanel: "열기",
|
||
collapseDetailPanel: "접기",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "행 재배치",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "총계",
|
||
aggregationFunctionLabelSum: "합",
|
||
aggregationFunctionLabelAvg: "평균",
|
||
aggregationFunctionLabelMin: "최소값",
|
||
aggregationFunctionLabelMax: "최대값",
|
||
aggregationFunctionLabelSize: "크기"
|
||
};
|
||
var koKR2 = getGridLocalization(koKRGrid, koKR);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/nbNO.js
|
||
var nbNOGrid = {
|
||
// Root
|
||
noRowsLabel: "Ingen rader",
|
||
noResultsOverlayLabel: "Fant ingen resultat.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Tetthet",
|
||
toolbarDensityLabel: "Tetthet",
|
||
toolbarDensityCompact: "Kompakt",
|
||
toolbarDensityStandard: "Standard",
|
||
toolbarDensityComfortable: "Komfortabelt",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Kolonner",
|
||
toolbarColumnsLabel: "Velg kolonner",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filter",
|
||
toolbarFiltersLabel: "Vis filter",
|
||
toolbarFiltersTooltipHide: "Skjul fitler",
|
||
toolbarFiltersTooltipShow: "Vis filter",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Søk…",
|
||
toolbarQuickFilterLabel: "Søk",
|
||
toolbarQuickFilterDeleteIconLabel: "Slett",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Eksporter",
|
||
toolbarExportLabel: "Eksporter",
|
||
toolbarExportCSV: "Last ned som CSV",
|
||
toolbarExportPrint: "Skriv ut",
|
||
toolbarExportExcel: "Last ned som Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Finn kolonne",
|
||
columnsPanelTextFieldPlaceholder: "Kolonne tittel",
|
||
columnsPanelDragIconLabel: "Reorganiser kolonne",
|
||
columnsPanelShowAllButton: "Vis alle",
|
||
columnsPanelHideAllButton: "Skjul alle",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Legg til filter",
|
||
filterPanelRemoveAll: "Fjern alle",
|
||
filterPanelDeleteIconLabel: "Slett",
|
||
filterPanelLogicOperator: "Logisk operator",
|
||
filterPanelOperator: "Operatører",
|
||
filterPanelOperatorAnd: "Og",
|
||
filterPanelOperatorOr: "Eller",
|
||
filterPanelColumns: "Kolonner",
|
||
filterPanelInputLabel: "Verdi",
|
||
filterPanelInputPlaceholder: "Filter verdi",
|
||
// Filter operators text
|
||
filterOperatorContains: "inneholder",
|
||
filterOperatorEquals: "er lik",
|
||
filterOperatorStartsWith: "starter med",
|
||
filterOperatorEndsWith: "slutter med",
|
||
filterOperatorIs: "er",
|
||
filterOperatorNot: "er ikke",
|
||
filterOperatorAfter: "er etter",
|
||
filterOperatorOnOrAfter: "er på eller etter",
|
||
filterOperatorBefore: "er før",
|
||
filterOperatorOnOrBefore: "er på eller før",
|
||
filterOperatorIsEmpty: "er tom",
|
||
filterOperatorIsNotEmpty: "er ikke tom",
|
||
filterOperatorIsAnyOf: "er en av",
|
||
// '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: "noen",
|
||
filterValueTrue: "sant",
|
||
filterValueFalse: "usant",
|
||
// Column menu text
|
||
columnMenuLabel: "Meny",
|
||
columnMenuShowColumns: "Vis kolonner",
|
||
columnMenuManageColumns: "Administrer kolonner",
|
||
columnMenuFilter: "Filter",
|
||
columnMenuHideColumn: "Skjul",
|
||
columnMenuUnsort: "Usorter",
|
||
columnMenuSortAsc: "Sorter ØKENDE",
|
||
columnMenuSortDesc: "Sorter SYNKENDE",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} aktive filter` : `${count} aktivt filter`,
|
||
columnHeaderFiltersLabel: "Vis filter",
|
||
columnHeaderSortIconLabel: "Sorter",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} rader valgt` : `${count.toLocaleString()} rad valgt`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Totalt antall rader:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Avmerkingsboks valgt",
|
||
checkboxSelectionSelectAllRows: "Velg alle rader",
|
||
checkboxSelectionUnselectAllRows: "Velg bort alle rader",
|
||
checkboxSelectionSelectRow: "Velg rad",
|
||
checkboxSelectionUnselectRow: "Velg bort rad",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "sant",
|
||
booleanCellFalseLabel: "usant",
|
||
// Actions cell more text
|
||
actionsCellMore: "mer",
|
||
// Column pinning text
|
||
pinToLeft: "Fest til venstre",
|
||
pinToRight: "Fest til høyre",
|
||
unpin: "Løsne",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Grupper",
|
||
treeDataExpand: "se barn",
|
||
treeDataCollapse: "skjul barn",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Grupper",
|
||
groupColumn: (name) => `Grupper på ${name}`,
|
||
unGroupColumn: (name) => `Stopp å grupper på ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Utvid/kollaps detalj panel",
|
||
expandDetailPanel: "Utvid",
|
||
collapseDetailPanel: "Kollaps",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Rad reorganisering",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Aggregering",
|
||
aggregationFunctionLabelSum: "sum",
|
||
aggregationFunctionLabelAvg: "snitt",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "maks",
|
||
aggregationFunctionLabelSize: "størrelse"
|
||
};
|
||
var nbNO2 = getGridLocalization(nbNOGrid, nbNO);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/nlNL.js
|
||
var nlNLGrid = {
|
||
// Root
|
||
noRowsLabel: "Geen resultaten.",
|
||
noResultsOverlayLabel: "Geen resultaten gevonden.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Grootte",
|
||
toolbarDensityLabel: "Grootte",
|
||
toolbarDensityCompact: "Compact",
|
||
toolbarDensityStandard: "Normaal",
|
||
toolbarDensityComfortable: "Breed",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Kolommen",
|
||
toolbarColumnsLabel: "Kies kolommen",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filters",
|
||
toolbarFiltersLabel: "Toon filters",
|
||
toolbarFiltersTooltipHide: "Verberg filters",
|
||
toolbarFiltersTooltipShow: "Toon filters",
|
||
toolbarFiltersTooltipActive: (count) => count > 1 ? `${count} actieve filters` : `${count} filter actief`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Zoeken…",
|
||
toolbarQuickFilterLabel: "Zoeken",
|
||
toolbarQuickFilterDeleteIconLabel: "Wissen",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Exporteren",
|
||
toolbarExportLabel: "Exporteren",
|
||
toolbarExportCSV: "Exporteer naar CSV",
|
||
toolbarExportPrint: "Print",
|
||
toolbarExportExcel: "Downloaden als Excel-bestand",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Zoek kolom",
|
||
columnsPanelTextFieldPlaceholder: "Kolomtitel",
|
||
columnsPanelDragIconLabel: "Kolom herschikken",
|
||
columnsPanelShowAllButton: "Alles tonen",
|
||
columnsPanelHideAllButton: "Alles verbergen",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Filter toevoegen",
|
||
filterPanelRemoveAll: "Alles verwijderen",
|
||
filterPanelDeleteIconLabel: "Verwijderen",
|
||
filterPanelLogicOperator: "Logische operator",
|
||
filterPanelOperator: "Operatoren",
|
||
filterPanelOperatorAnd: "En",
|
||
filterPanelOperatorOr: "Of",
|
||
filterPanelColumns: "Kolommen",
|
||
filterPanelInputLabel: "Waarde",
|
||
filterPanelInputPlaceholder: "Filter waarde",
|
||
// Filter operators text
|
||
filterOperatorContains: "bevat",
|
||
filterOperatorEquals: "gelijk aan",
|
||
filterOperatorStartsWith: "begint met",
|
||
filterOperatorEndsWith: "eindigt met",
|
||
filterOperatorIs: "is",
|
||
filterOperatorNot: "is niet",
|
||
filterOperatorAfter: "is na",
|
||
filterOperatorOnOrAfter: "is gelijk of er na",
|
||
filterOperatorBefore: "is voor",
|
||
filterOperatorOnOrBefore: "is gelijk of er voor",
|
||
filterOperatorIsEmpty: "is leeg",
|
||
filterOperatorIsNotEmpty: "is niet leeg",
|
||
filterOperatorIsAnyOf: "is een van",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Bevat",
|
||
headerFilterOperatorEquals: "Gelijk aan",
|
||
headerFilterOperatorStartsWith: "Begint met",
|
||
headerFilterOperatorEndsWith: "Eindigt met",
|
||
headerFilterOperatorIs: "Is",
|
||
headerFilterOperatorNot: "Is niet",
|
||
headerFilterOperatorAfter: "Is na",
|
||
headerFilterOperatorOnOrAfter: "Is op of na",
|
||
headerFilterOperatorBefore: "Is voor",
|
||
headerFilterOperatorOnOrBefore: "Is op of voor",
|
||
headerFilterOperatorIsEmpty: "Is leeg",
|
||
headerFilterOperatorIsNotEmpty: "Is niet leeg",
|
||
headerFilterOperatorIsAnyOf: "Is een van",
|
||
"headerFilterOperator=": "Gelijk aan",
|
||
"headerFilterOperator!=": "Niet gelijk aan",
|
||
"headerFilterOperator>": "Is groter dan",
|
||
"headerFilterOperator>=": "Is groter dan of gelijk aan",
|
||
"headerFilterOperator<": "Is kleiner dan",
|
||
"headerFilterOperator<=": "Is kleiner dan of gelijk aan",
|
||
// Filter values text
|
||
filterValueAny: "alles",
|
||
filterValueTrue: "waar",
|
||
filterValueFalse: "onwaar",
|
||
// Column menu text
|
||
columnMenuLabel: "Menu",
|
||
columnMenuShowColumns: "Toon kolommen",
|
||
columnMenuManageColumns: "Kolommen beheren",
|
||
columnMenuFilter: "Filteren",
|
||
columnMenuHideColumn: "Verbergen",
|
||
columnMenuUnsort: "Annuleer sortering",
|
||
columnMenuSortAsc: "Oplopend sorteren",
|
||
columnMenuSortDesc: "Aflopend sorteren",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count > 1 ? `${count} actieve filters` : `${count} filter actief`,
|
||
columnHeaderFiltersLabel: "Toon filters",
|
||
columnHeaderSortIconLabel: "Sorteren",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count > 1 ? `${count.toLocaleString()} rijen geselecteerd` : `${count.toLocaleString()} rij geselecteerd`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Totaal:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} van ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Checkbox selectie",
|
||
checkboxSelectionSelectAllRows: "Alle rijen selecteren",
|
||
checkboxSelectionUnselectAllRows: "Alle rijen de-selecteren",
|
||
checkboxSelectionSelectRow: "Rij selecteren",
|
||
checkboxSelectionUnselectRow: "Rij de-selecteren",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "waar",
|
||
booleanCellFalseLabel: "onwaar",
|
||
// Actions cell more text
|
||
actionsCellMore: "meer",
|
||
// Column pinning text
|
||
pinToLeft: "Links vastzetten",
|
||
pinToRight: "Rechts vastzetten",
|
||
unpin: "Losmaken",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Groep",
|
||
treeDataExpand: "Uitvouwen",
|
||
treeDataCollapse: "Inklappen",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Groep",
|
||
groupColumn: (name) => `Groepeer op ${name}`,
|
||
unGroupColumn: (name) => `Stop groeperen op ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Detailmenu in- of uitklappen",
|
||
expandDetailPanel: "Uitklappen",
|
||
collapseDetailPanel: "Inklappen",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Rijen hersorteren",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Aggregatie",
|
||
aggregationFunctionLabelSum: "som",
|
||
aggregationFunctionLabelAvg: "gem",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "max",
|
||
aggregationFunctionLabelSize: "grootte"
|
||
};
|
||
var nlNL2 = getGridLocalization(nlNLGrid, nlNL);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/plPL.js
|
||
var plPLGrid = {
|
||
// Root
|
||
noRowsLabel: "Brak danych",
|
||
noResultsOverlayLabel: "Nie znaleziono wyników.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Wysokość rzędu",
|
||
toolbarDensityLabel: "Wysokość rzędu",
|
||
toolbarDensityCompact: "Kompakt",
|
||
toolbarDensityStandard: "Standard",
|
||
toolbarDensityComfortable: "Komfort",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Kolumny",
|
||
toolbarColumnsLabel: "Zaznacz kolumny",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtry",
|
||
toolbarFiltersLabel: "Pokaż filtry",
|
||
toolbarFiltersTooltipHide: "Ukryj filtry",
|
||
toolbarFiltersTooltipShow: "Pokaż filtry",
|
||
toolbarFiltersTooltipActive: (count) => `Liczba aktywnych filtrów: ${count}`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Wyszukaj…",
|
||
toolbarQuickFilterLabel: "Szukaj",
|
||
toolbarQuickFilterDeleteIconLabel: "Wyczyść",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Eksportuj",
|
||
toolbarExportLabel: "Eksportuj",
|
||
toolbarExportCSV: "Pobierz jako plik CSV",
|
||
toolbarExportPrint: "Drukuj",
|
||
toolbarExportExcel: "Pobierz jako plik Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Znajdź kolumnę",
|
||
columnsPanelTextFieldPlaceholder: "Tytuł kolumny",
|
||
columnsPanelDragIconLabel: "Zmień kolejność kolumn",
|
||
columnsPanelShowAllButton: "Pokaż wszystko",
|
||
columnsPanelHideAllButton: "Ukryj wszystko",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Dodaj filtr",
|
||
filterPanelRemoveAll: "Usuń wszystkie",
|
||
filterPanelDeleteIconLabel: "Usuń",
|
||
filterPanelLogicOperator: "Operator logiczny",
|
||
filterPanelOperator: "Operator",
|
||
filterPanelOperatorAnd: "I",
|
||
filterPanelOperatorOr: "Lub",
|
||
filterPanelColumns: "Kolumny",
|
||
filterPanelInputLabel: "Wartość",
|
||
filterPanelInputPlaceholder: "Filtrowana wartość",
|
||
// Filter operators text
|
||
filterOperatorContains: "zawiera",
|
||
filterOperatorEquals: "równa się",
|
||
filterOperatorStartsWith: "zaczyna się od",
|
||
filterOperatorEndsWith: "kończy się na",
|
||
filterOperatorIs: "równa się",
|
||
filterOperatorNot: "różne",
|
||
filterOperatorAfter: "większe niż",
|
||
filterOperatorOnOrAfter: "większe lub równe",
|
||
filterOperatorBefore: "mniejsze niż",
|
||
filterOperatorOnOrBefore: "mniejsze lub równe",
|
||
filterOperatorIsEmpty: "jest pusty",
|
||
filterOperatorIsNotEmpty: "nie jest pusty",
|
||
filterOperatorIsAnyOf: "jest jednym z",
|
||
// 'filterOperator=': '=',
|
||
// 'filterOperator!=': '!=',
|
||
// 'filterOperator>': '>',
|
||
// 'filterOperator>=': '>=',
|
||
// 'filterOperator<': '<',
|
||
// 'filterOperator<=': '<=',
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Zawiera",
|
||
headerFilterOperatorEquals: "Równa się",
|
||
headerFilterOperatorStartsWith: "Zaczyna się od",
|
||
headerFilterOperatorEndsWith: "Kończy się na",
|
||
// headerFilterOperatorIs: 'Is',
|
||
headerFilterOperatorNot: "Niepuste",
|
||
// 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: "dowolny",
|
||
filterValueTrue: "prawda",
|
||
filterValueFalse: "fałsz",
|
||
// Column menu text
|
||
columnMenuLabel: "Menu",
|
||
columnMenuShowColumns: "Pokaż wszystkie kolumny",
|
||
columnMenuManageColumns: "Zarządzaj kolumnami",
|
||
columnMenuFilter: "Filtr",
|
||
columnMenuHideColumn: "Ukryj",
|
||
columnMenuUnsort: "Anuluj sortowanie",
|
||
columnMenuSortAsc: "Sortuj rosnąco",
|
||
columnMenuSortDesc: "Sortuj malejąco",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => `Liczba aktywnych filtrów: ${count}`,
|
||
columnHeaderFiltersLabel: "Pokaż filtry",
|
||
columnHeaderSortIconLabel: "Sortuj",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => `Liczba wybranych wierszy: ${count.toLocaleString()}`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Łączna liczba wierszy:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} z ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Pole wyboru",
|
||
checkboxSelectionSelectAllRows: "Zaznacz wszystkie wiersze",
|
||
checkboxSelectionUnselectAllRows: "Odznacz wszystkie wiersze",
|
||
checkboxSelectionSelectRow: "Zaznacz wiersz",
|
||
checkboxSelectionUnselectRow: "Odznacz wiersz",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "tak",
|
||
booleanCellFalseLabel: "nie",
|
||
// Actions cell more text
|
||
actionsCellMore: "więcej",
|
||
// Column pinning text
|
||
pinToLeft: "Przypnij do lewej",
|
||
pinToRight: "Przypnij do prawej",
|
||
unpin: "Odepnij",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Grupa",
|
||
treeDataExpand: "pokaż elementy potomne",
|
||
treeDataCollapse: "ukryj elementy potomne",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Grupa",
|
||
groupColumn: (name) => `Grupuj według ${name}`,
|
||
unGroupColumn: (name) => `Rozgrupuj ${name}`,
|
||
// Master/detail
|
||
// detailPanelToggle: 'Detail panel toggle',
|
||
expandDetailPanel: "Rozwiń",
|
||
collapseDetailPanel: "Zwiń",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Porządkowanie wierszy"
|
||
// Aggregation
|
||
// aggregationMenuItemHeader: 'Aggregation',
|
||
// aggregationFunctionLabelSum: 'sum',
|
||
// aggregationFunctionLabelAvg: 'avg',
|
||
// aggregationFunctionLabelMin: 'min',
|
||
// aggregationFunctionLabelMax: 'max',
|
||
// aggregationFunctionLabelSize: 'size',
|
||
};
|
||
var plPL2 = getGridLocalization(plPLGrid, plPL);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/ptBR.js
|
||
var ptBRGrid = {
|
||
// Root
|
||
noRowsLabel: "Nenhuma linha",
|
||
noResultsOverlayLabel: "Nenhum resultado encontrado.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Densidade",
|
||
toolbarDensityLabel: "Densidade",
|
||
toolbarDensityCompact: "Compacto",
|
||
toolbarDensityStandard: "Padrão",
|
||
toolbarDensityComfortable: "Confortável",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Colunas",
|
||
toolbarColumnsLabel: "Exibir seletor de colunas",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtros",
|
||
toolbarFiltersLabel: "Exibir filtros",
|
||
toolbarFiltersTooltipHide: "Ocultar filtros",
|
||
toolbarFiltersTooltipShow: "Exibir filtros",
|
||
toolbarFiltersTooltipActive: (count) => `${count} ${count !== 1 ? "filtros" : "filtro"} ${count !== 1 ? "ativos" : "ativo"}`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Procurar…",
|
||
toolbarQuickFilterLabel: "Procurar",
|
||
toolbarQuickFilterDeleteIconLabel: "Limpar",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Exportar",
|
||
toolbarExportLabel: "Exportar",
|
||
toolbarExportCSV: "Baixar como CSV",
|
||
toolbarExportPrint: "Imprimir",
|
||
toolbarExportExcel: "Baixar como Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Localizar coluna",
|
||
columnsPanelTextFieldPlaceholder: "Título da coluna",
|
||
columnsPanelDragIconLabel: "Reordenar Coluna",
|
||
columnsPanelShowAllButton: "Mostrar todas",
|
||
columnsPanelHideAllButton: "Ocultar todas",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Adicionar filtro",
|
||
filterPanelRemoveAll: "Remover todos",
|
||
filterPanelDeleteIconLabel: "Excluir",
|
||
filterPanelLogicOperator: "Operador lógico",
|
||
filterPanelOperator: "Operador",
|
||
filterPanelOperatorAnd: "E",
|
||
filterPanelOperatorOr: "Ou",
|
||
filterPanelColumns: "Colunas",
|
||
filterPanelInputLabel: "Valor",
|
||
filterPanelInputPlaceholder: "Filtrar valor",
|
||
// Filter operators text
|
||
filterOperatorContains: "contém",
|
||
filterOperatorEquals: "é igual a",
|
||
filterOperatorStartsWith: "começa com",
|
||
filterOperatorEndsWith: "termina com",
|
||
filterOperatorIs: "é",
|
||
filterOperatorNot: "não é",
|
||
filterOperatorAfter: "após",
|
||
filterOperatorOnOrAfter: "em ou após",
|
||
filterOperatorBefore: "antes de",
|
||
filterOperatorOnOrBefore: "em ou antes de",
|
||
filterOperatorIsEmpty: "está vazio",
|
||
filterOperatorIsNotEmpty: "não está vazio",
|
||
filterOperatorIsAnyOf: "é qualquer um dos",
|
||
"filterOperator=": "igual à",
|
||
"filterOperator!=": "diferente de",
|
||
"filterOperator>": "maior que",
|
||
"filterOperator>=": "maior ou igual que",
|
||
"filterOperator<": "menor que",
|
||
"filterOperator<=": "menor ou igual que",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Contém",
|
||
headerFilterOperatorEquals: "Igual",
|
||
headerFilterOperatorStartsWith: "Começa com",
|
||
headerFilterOperatorEndsWith: "Termina com",
|
||
headerFilterOperatorIs: "É",
|
||
headerFilterOperatorNot: "Não é",
|
||
headerFilterOperatorAfter: "Depois de",
|
||
headerFilterOperatorOnOrAfter: "Está entre ou depois de",
|
||
headerFilterOperatorBefore: "Antes de",
|
||
headerFilterOperatorOnOrBefore: "Está entre ou antes de",
|
||
headerFilterOperatorIsEmpty: "É vazio",
|
||
headerFilterOperatorIsNotEmpty: "Não é vazio",
|
||
headerFilterOperatorIsAnyOf: "É algum",
|
||
"headerFilterOperator=": "Igual",
|
||
"headerFilterOperator!=": "Não igual",
|
||
"headerFilterOperator>": "Maior que",
|
||
"headerFilterOperator>=": "Maior que ou igual a",
|
||
"headerFilterOperator<": "Menor que",
|
||
"headerFilterOperator<=": "Menor que ou igual a",
|
||
// Filter values text
|
||
filterValueAny: "qualquer",
|
||
filterValueTrue: "verdadeiro",
|
||
filterValueFalse: "falso",
|
||
// Column menu text
|
||
columnMenuLabel: "Menu",
|
||
columnMenuShowColumns: "Exibir colunas",
|
||
columnMenuManageColumns: "Gerir colunas",
|
||
columnMenuFilter: "Filtrar",
|
||
columnMenuHideColumn: "Ocultar",
|
||
columnMenuUnsort: "Desfazer ordenação",
|
||
columnMenuSortAsc: "Ordenar do menor para o maior",
|
||
columnMenuSortDesc: "Ordenar do maior para o menor",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => `${count} ${count !== 1 ? "filtros" : "filtro"} ${count !== 1 ? "ativos" : "ativo"}`,
|
||
columnHeaderFiltersLabel: "Exibir Filtros",
|
||
columnHeaderSortIconLabel: "Ordenar",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} linhas selecionadas` : `${count.toLocaleString()} linha selecionada`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Total de linhas:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} de ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Seleção",
|
||
checkboxSelectionSelectAllRows: "Selecionar todas linhas",
|
||
checkboxSelectionUnselectAllRows: "Deselecionar todas linhas",
|
||
checkboxSelectionSelectRow: "Selecionar linha",
|
||
checkboxSelectionUnselectRow: "Deselecionar linha",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "sim",
|
||
booleanCellFalseLabel: "não",
|
||
// Actions cell more text
|
||
actionsCellMore: "mais",
|
||
// Column pinning text
|
||
pinToLeft: "Fixar à esquerda",
|
||
pinToRight: "Fixar à direita",
|
||
unpin: "Desafixar",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Grupo",
|
||
treeDataExpand: "mostrar filhos",
|
||
treeDataCollapse: "esconder filhos",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Grupo",
|
||
groupColumn: (name) => `Agrupar por ${name}`,
|
||
unGroupColumn: (name) => `Parar agrupamento por ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Painel de detalhes",
|
||
expandDetailPanel: "Expandir",
|
||
collapseDetailPanel: "Esconder",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Reorganizar linhas",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Agrupar",
|
||
aggregationFunctionLabelSum: "soma",
|
||
aggregationFunctionLabelAvg: "média",
|
||
aggregationFunctionLabelMin: "mín",
|
||
aggregationFunctionLabelMax: "máx",
|
||
aggregationFunctionLabelSize: "tamanho"
|
||
};
|
||
var ptBR2 = getGridLocalization(ptBRGrid, ptBR);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/roRO.js
|
||
var roROGrid = {
|
||
// Root
|
||
noRowsLabel: "Lipsă date",
|
||
noResultsOverlayLabel: "Nu au fost găsite rezultate.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Înălțime rând",
|
||
toolbarDensityLabel: "Înălțime rând",
|
||
toolbarDensityCompact: "Compact",
|
||
toolbarDensityStandard: "Standard",
|
||
toolbarDensityComfortable: "Lat",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Coloane",
|
||
toolbarColumnsLabel: "Afișează selecție coloane",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtru",
|
||
toolbarFiltersLabel: "Afișează filtru",
|
||
toolbarFiltersTooltipHide: "Ascunde filtru",
|
||
toolbarFiltersTooltipShow: "Afișează filtru",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} filtru activ` : `${count} filtru activ`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Căutare…",
|
||
toolbarQuickFilterLabel: "Căutare",
|
||
toolbarQuickFilterDeleteIconLabel: "Ștergere",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Export",
|
||
toolbarExportLabel: "Export",
|
||
toolbarExportCSV: "Download în format CSV",
|
||
toolbarExportPrint: "Printare",
|
||
toolbarExportExcel: "Download în format Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Găsește coloana",
|
||
columnsPanelTextFieldPlaceholder: "Titlu coloană",
|
||
columnsPanelDragIconLabel: "Resortare coloană",
|
||
columnsPanelShowAllButton: "Afișează tot",
|
||
columnsPanelHideAllButton: "Ascunde tot",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Adăugare filtru",
|
||
filterPanelRemoveAll: "Șterge tot",
|
||
filterPanelDeleteIconLabel: "Ștergere",
|
||
filterPanelLogicOperator: "Operatori logici",
|
||
filterPanelOperator: "Operatori",
|
||
filterPanelOperatorAnd: "Și",
|
||
filterPanelOperatorOr: "Sau",
|
||
filterPanelColumns: "Coloane",
|
||
filterPanelInputLabel: "Valoare",
|
||
filterPanelInputPlaceholder: "Filtrare valoare",
|
||
// Filter operators text
|
||
filterOperatorContains: "conține",
|
||
filterOperatorEquals: "este egal cu",
|
||
filterOperatorStartsWith: "începe cu",
|
||
filterOperatorEndsWith: "se termină cu",
|
||
filterOperatorIs: "este",
|
||
filterOperatorNot: "nu este",
|
||
filterOperatorAfter: "este după",
|
||
filterOperatorOnOrAfter: "este la sau după",
|
||
filterOperatorBefore: "este înainte de",
|
||
filterOperatorOnOrBefore: "este la sau înainte de",
|
||
filterOperatorIsEmpty: "este gol",
|
||
filterOperatorIsNotEmpty: "nu este gol",
|
||
filterOperatorIsAnyOf: "este una din valori",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Conține",
|
||
headerFilterOperatorEquals: "Egal cu",
|
||
headerFilterOperatorStartsWith: "Începe cu",
|
||
headerFilterOperatorEndsWith: "Se termină cu",
|
||
headerFilterOperatorIs: "Este",
|
||
headerFilterOperatorNot: "Nu este",
|
||
headerFilterOperatorAfter: "Este după",
|
||
headerFilterOperatorOnOrAfter: "Este la sau după",
|
||
headerFilterOperatorBefore: "Este înainte de",
|
||
headerFilterOperatorOnOrBefore: "este la sau înainte de",
|
||
headerFilterOperatorIsEmpty: "Este gol",
|
||
headerFilterOperatorIsNotEmpty: "Nu este gol",
|
||
headerFilterOperatorIsAnyOf: "Este una din valori",
|
||
"headerFilterOperator=": "Egal cu",
|
||
"headerFilterOperator!=": "Nu este egal cu",
|
||
"headerFilterOperator>": "Mai mare decât",
|
||
"headerFilterOperator>=": "Mai mare sau egal cu",
|
||
"headerFilterOperator<": "Mai mic decât",
|
||
"headerFilterOperator<=": "Mai mic sau egal cu",
|
||
// Filter values text
|
||
filterValueAny: "Aleatoriu",
|
||
filterValueTrue: "Da",
|
||
filterValueFalse: "Nu",
|
||
// Column menu text
|
||
columnMenuLabel: "Meniu",
|
||
columnMenuShowColumns: "Afișează toate coloanele",
|
||
columnMenuManageColumns: "Gestionează coloane",
|
||
columnMenuFilter: "Filtru",
|
||
columnMenuHideColumn: "Ascunde",
|
||
columnMenuUnsort: "Dezactivare sortare",
|
||
columnMenuSortAsc: "Sortează crescător",
|
||
columnMenuSortDesc: "Sortează descrescător",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} filtru activ` : `${count} filtru activ`,
|
||
columnHeaderFiltersLabel: "Afișează filtru",
|
||
columnHeaderSortIconLabel: "Sortare",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} Înregistrări selectate` : `${count.toLocaleString()} Înregistrare selectată`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Total:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} din ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Checkbox Selecție",
|
||
checkboxSelectionSelectAllRows: "Selectare toate rândurile",
|
||
checkboxSelectionUnselectAllRows: "Deselectare toate rândurile",
|
||
checkboxSelectionSelectRow: "Selectare rând",
|
||
checkboxSelectionUnselectRow: "Deselectare rând",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "Da",
|
||
booleanCellFalseLabel: "Nu",
|
||
// Actions cell more text
|
||
actionsCellMore: "Mai multe",
|
||
// Column pinning text
|
||
pinToLeft: "Fixare în stânga",
|
||
pinToRight: "Fixare în dreapta",
|
||
unpin: "Anulare fixare",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Grup",
|
||
treeDataExpand: "Afișare copii",
|
||
treeDataCollapse: "Ascundere copii",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Grupare",
|
||
groupColumn: (name) => `Grupare după ${name}`,
|
||
unGroupColumn: (name) => `Anulare Grupare după ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Comutare panou detalii",
|
||
expandDetailPanel: "Extindere",
|
||
collapseDetailPanel: "Restrângere",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Reordonare rânduri",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Agregare",
|
||
aggregationFunctionLabelSum: "Sumă",
|
||
aggregationFunctionLabelAvg: "Medie",
|
||
aggregationFunctionLabelMin: "Minim",
|
||
aggregationFunctionLabelMax: "Maxim",
|
||
aggregationFunctionLabelSize: "Numărul elementelor"
|
||
};
|
||
var roRO2 = getGridLocalization(roROGrid, roRO);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/ruRU.js
|
||
var ruRUGrid = {
|
||
// Root
|
||
noRowsLabel: "Нет строк",
|
||
noResultsOverlayLabel: "Данные не найдены.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Высота строки",
|
||
toolbarDensityLabel: "Высота строки",
|
||
toolbarDensityCompact: "Компактная",
|
||
toolbarDensityStandard: "Стандартная",
|
||
toolbarDensityComfortable: "Комфортная",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Столбцы",
|
||
toolbarColumnsLabel: "Выделите столбцы",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Фильтры",
|
||
toolbarFiltersLabel: "Показать фильтры",
|
||
toolbarFiltersTooltipHide: "Скрыть фильтры",
|
||
toolbarFiltersTooltipShow: "Показать фильтры",
|
||
toolbarFiltersTooltipActive: (count) => {
|
||
let pluralForm = "активных фильтров";
|
||
const lastDigit = count % 10;
|
||
if (lastDigit > 1 && lastDigit < 5) {
|
||
pluralForm = "активных фильтра";
|
||
} else if (lastDigit === 1) {
|
||
pluralForm = "активный фильтр";
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
},
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Поиск…",
|
||
toolbarQuickFilterLabel: "Поиск",
|
||
toolbarQuickFilterDeleteIconLabel: "Очистить",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Экспорт",
|
||
toolbarExportLabel: "Экспорт",
|
||
toolbarExportCSV: "Скачать в формате CSV",
|
||
toolbarExportPrint: "Печать",
|
||
toolbarExportExcel: "Скачать в формате Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Найти столбец",
|
||
columnsPanelTextFieldPlaceholder: "Заголовок столбца",
|
||
columnsPanelDragIconLabel: "Изменить порядок столбца",
|
||
columnsPanelShowAllButton: "Показать все",
|
||
columnsPanelHideAllButton: "Скрыть все",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Добавить фильтр",
|
||
filterPanelRemoveAll: "Очистить фильтр",
|
||
filterPanelDeleteIconLabel: "Удалить",
|
||
filterPanelLogicOperator: "Логические операторы",
|
||
filterPanelOperator: "Операторы",
|
||
filterPanelOperatorAnd: "И",
|
||
filterPanelOperatorOr: "Или",
|
||
filterPanelColumns: "Столбцы",
|
||
filterPanelInputLabel: "Значение",
|
||
filterPanelInputPlaceholder: "Значение фильтра",
|
||
// Filter operators text
|
||
filterOperatorContains: "содержит",
|
||
filterOperatorEquals: "равен",
|
||
filterOperatorStartsWith: "начинается с",
|
||
filterOperatorEndsWith: "заканчивается на",
|
||
filterOperatorIs: "равен",
|
||
filterOperatorNot: "не равен",
|
||
filterOperatorAfter: "больше чем",
|
||
filterOperatorOnOrAfter: "больше или равно",
|
||
filterOperatorBefore: "меньше чем",
|
||
filterOperatorOnOrBefore: "меньше или равно",
|
||
filterOperatorIsEmpty: "пустой",
|
||
filterOperatorIsNotEmpty: "не пустой",
|
||
filterOperatorIsAnyOf: "любой из",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "содержит",
|
||
headerFilterOperatorEquals: "равен",
|
||
headerFilterOperatorStartsWith: "начинается с",
|
||
headerFilterOperatorEndsWith: "заканчивается на",
|
||
headerFilterOperatorIs: "равен",
|
||
headerFilterOperatorNot: "не равен",
|
||
headerFilterOperatorAfter: "больше чем",
|
||
headerFilterOperatorOnOrAfter: "больше или равно",
|
||
headerFilterOperatorBefore: "меньше чем",
|
||
headerFilterOperatorOnOrBefore: "меньше или равно",
|
||
headerFilterOperatorIsEmpty: "пустой",
|
||
headerFilterOperatorIsNotEmpty: "не пустой",
|
||
headerFilterOperatorIsAnyOf: "любой из",
|
||
"headerFilterOperator=": "содержит",
|
||
"headerFilterOperator!=": "не содержит",
|
||
"headerFilterOperator>": "больше чем",
|
||
"headerFilterOperator>=": "больше или равно",
|
||
"headerFilterOperator<": "меньше чем",
|
||
"headerFilterOperator<=": "меньше или равно",
|
||
// Filter values text
|
||
filterValueAny: "любой",
|
||
filterValueTrue: "истина",
|
||
filterValueFalse: "ложь",
|
||
// Column menu text
|
||
columnMenuLabel: "Меню",
|
||
columnMenuShowColumns: "Показать столбцы",
|
||
columnMenuManageColumns: "Управление колонками",
|
||
columnMenuFilter: "Фильтр",
|
||
columnMenuHideColumn: "Скрыть",
|
||
columnMenuUnsort: "Отменить сортировку",
|
||
columnMenuSortAsc: "Сортировать по возрастанию",
|
||
columnMenuSortDesc: "Сортировать по убыванию",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => {
|
||
let pluralForm = "активных фильтров";
|
||
const lastDigit = count % 10;
|
||
if (lastDigit > 1 && lastDigit < 5) {
|
||
pluralForm = "активных фильтра";
|
||
} else if (lastDigit === 1) {
|
||
pluralForm = "активный фильтр";
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
},
|
||
columnHeaderFiltersLabel: "Показать фильтры",
|
||
columnHeaderSortIconLabel: "Сортировать",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => {
|
||
let pluralForm = "строк выбрано";
|
||
const lastDigit = count % 10;
|
||
if (lastDigit > 1 && lastDigit < 5) {
|
||
pluralForm = "строки выбраны";
|
||
} else if (lastDigit === 1) {
|
||
pluralForm = "строка выбрана";
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
},
|
||
// Total row amount footer text
|
||
footerTotalRows: "Всего строк:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} из ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Выбор флажка",
|
||
checkboxSelectionSelectAllRows: "Выбрать все строки",
|
||
checkboxSelectionUnselectAllRows: "Отменить выбор всех строк",
|
||
checkboxSelectionSelectRow: "Выбрать строку",
|
||
checkboxSelectionUnselectRow: "Отменить выбор строки",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "истина",
|
||
booleanCellFalseLabel: "ложь",
|
||
// Actions cell more text
|
||
actionsCellMore: "ещё",
|
||
// Column pinning text
|
||
pinToLeft: "Закрепить слева",
|
||
pinToRight: "Закрепить справа",
|
||
unpin: "Открепить",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Группа",
|
||
treeDataExpand: "показать дочерние элементы",
|
||
treeDataCollapse: "скрыть дочерние элементы",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Группа",
|
||
groupColumn: (name) => `Сгруппировать по ${name}`,
|
||
unGroupColumn: (name) => `Разгруппировать по ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Детали",
|
||
expandDetailPanel: "Развернуть",
|
||
collapseDetailPanel: "Свернуть",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Изменение порядка строк",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Объединение данных",
|
||
aggregationFunctionLabelSum: "сумм",
|
||
aggregationFunctionLabelAvg: "срзнач",
|
||
aggregationFunctionLabelMin: "мин",
|
||
aggregationFunctionLabelMax: "макс",
|
||
aggregationFunctionLabelSize: "счет"
|
||
};
|
||
var ruRU2 = getGridLocalization(ruRUGrid, ruRU);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/skSK.js
|
||
var skSKGrid = {
|
||
// Root
|
||
noRowsLabel: "Žiadne záznamy",
|
||
noResultsOverlayLabel: "Nenašli sa žadne výsledky.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Hustota",
|
||
toolbarDensityLabel: "Hustota",
|
||
toolbarDensityCompact: "Kompaktná",
|
||
toolbarDensityStandard: "Štandartná",
|
||
toolbarDensityComfortable: "Komfortná",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Stĺpce",
|
||
toolbarColumnsLabel: "Vybrať stĺpce",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtre",
|
||
toolbarFiltersLabel: "Zobraziť filtre",
|
||
toolbarFiltersTooltipHide: "Skryť filtre ",
|
||
toolbarFiltersTooltipShow: "Zobraziť filtre",
|
||
toolbarFiltersTooltipActive: (count) => {
|
||
let pluralForm = "aktívnych filtrov";
|
||
if (count > 1 && count < 5) {
|
||
pluralForm = "aktívne filtre";
|
||
} else if (count === 1) {
|
||
pluralForm = "aktívny filter";
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
},
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Vyhľadať…",
|
||
toolbarQuickFilterLabel: "Vyhľadať",
|
||
toolbarQuickFilterDeleteIconLabel: "Vymazať",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Export",
|
||
toolbarExportLabel: "Export",
|
||
toolbarExportCSV: "Stiahnuť ako CSV",
|
||
toolbarExportPrint: "Vytlačiť",
|
||
toolbarExportExcel: "Stiahnuť ako Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Nájsť stĺpec",
|
||
columnsPanelTextFieldPlaceholder: "Názov stĺpca",
|
||
columnsPanelDragIconLabel: "Usporiadť stĺpce",
|
||
columnsPanelShowAllButton: "Zobraziť všetko",
|
||
columnsPanelHideAllButton: "Skryť všetko",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Pridať filter",
|
||
filterPanelRemoveAll: "Odstrániť všetky",
|
||
filterPanelDeleteIconLabel: "Odstrániť",
|
||
filterPanelLogicOperator: "Logický operátor",
|
||
filterPanelOperator: "Operátory",
|
||
filterPanelOperatorAnd: "A",
|
||
filterPanelOperatorOr: "Alebo",
|
||
filterPanelColumns: "Stĺpce",
|
||
filterPanelInputLabel: "Hodnota",
|
||
filterPanelInputPlaceholder: "Hodnota filtra",
|
||
// Filter operators text
|
||
filterOperatorContains: "obsahuje",
|
||
filterOperatorEquals: "rovná sa",
|
||
filterOperatorStartsWith: "začína s",
|
||
filterOperatorEndsWith: "končí na",
|
||
filterOperatorIs: "je",
|
||
filterOperatorNot: "nie je",
|
||
filterOperatorAfter: "je po",
|
||
filterOperatorOnOrAfter: "je na alebo po",
|
||
filterOperatorBefore: "je pred",
|
||
filterOperatorOnOrBefore: "je na alebo skôr",
|
||
filterOperatorIsEmpty: "je prázdny",
|
||
filterOperatorIsNotEmpty: "nie je prázdny",
|
||
filterOperatorIsAnyOf: "je jeden z",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Obsahuje",
|
||
headerFilterOperatorEquals: "Rovná sa",
|
||
headerFilterOperatorStartsWith: "Začína s",
|
||
headerFilterOperatorEndsWith: "Končí na",
|
||
headerFilterOperatorIs: "Je",
|
||
headerFilterOperatorNot: "Nie je",
|
||
headerFilterOperatorAfter: "Je po",
|
||
headerFilterOperatorOnOrAfter: "Je na alebo po",
|
||
headerFilterOperatorBefore: "Je pred",
|
||
headerFilterOperatorOnOrBefore: "Je na alebo skôr",
|
||
headerFilterOperatorIsEmpty: "Je prázdny",
|
||
headerFilterOperatorIsNotEmpty: "Nie je prázdny",
|
||
headerFilterOperatorIsAnyOf: "Je jeden z",
|
||
"headerFilterOperator=": "Rovná sa",
|
||
"headerFilterOperator!=": "Nerovná sa",
|
||
"headerFilterOperator>": "Väčší ako",
|
||
"headerFilterOperator>=": "Väčší ako alebo rovný",
|
||
"headerFilterOperator<": "Menší ako",
|
||
"headerFilterOperator<=": "Menší ako alebo rovný",
|
||
// Filter values text
|
||
filterValueAny: "akýkoľvek",
|
||
filterValueTrue: "áno",
|
||
filterValueFalse: "nie",
|
||
// Column menu text
|
||
columnMenuLabel: "Menu",
|
||
columnMenuShowColumns: "Zobraziť stĺpce",
|
||
columnMenuManageColumns: "Spravovať stĺpce",
|
||
columnMenuFilter: "Filter",
|
||
columnMenuHideColumn: "Skryť",
|
||
columnMenuUnsort: "Zrušiť filtre",
|
||
columnMenuSortAsc: "Zoradiť vzostupne",
|
||
columnMenuSortDesc: "Zoradiť zostupne",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => {
|
||
let pluralForm = "aktívnych filtrov";
|
||
if (count > 1 && count < 5) {
|
||
pluralForm = "aktívne filtre";
|
||
} else if (count === 1) {
|
||
pluralForm = "aktívny filter";
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
},
|
||
columnHeaderFiltersLabel: "Zobraziť filtre",
|
||
columnHeaderSortIconLabel: "Filtrovať",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => {
|
||
let pluralForm = "vybraných záznamov";
|
||
if (count > 1 && count < 5) {
|
||
pluralForm = "vybrané záznamy";
|
||
} else if (count === 1) {
|
||
pluralForm = "vybraný záznam";
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
},
|
||
// Total row amount footer text
|
||
footerTotalRows: "Riadkov spolu:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => {
|
||
const str = totalCount.toString();
|
||
const firstDigit = str[0];
|
||
const op = ["4", "6", "7"].includes(firstDigit) || firstDigit === "1" && str.length % 3 === 0 ? "zo" : "z";
|
||
return `${visibleCount.toLocaleString()} ${op} ${totalCount.toLocaleString()}`;
|
||
},
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Výber riadku",
|
||
checkboxSelectionSelectAllRows: "Vybrať všetky riadky",
|
||
checkboxSelectionUnselectAllRows: "Zrušiť výber všetkých riadkov",
|
||
checkboxSelectionSelectRow: "Vyber riadok",
|
||
checkboxSelectionUnselectRow: "Zruš výber riadku",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "áno",
|
||
booleanCellFalseLabel: "nie",
|
||
// Actions cell more text
|
||
actionsCellMore: "viac",
|
||
// Column pinning text
|
||
pinToLeft: "Pripnúť na ľavo",
|
||
pinToRight: "Pripnúť na pravo",
|
||
unpin: "Odopnúť",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Skupina",
|
||
treeDataExpand: "zobraziť potomkov",
|
||
treeDataCollapse: "skryť potomkov",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Skupina",
|
||
groupColumn: (name) => `Zoskupiť podľa ${name}`,
|
||
unGroupColumn: (name) => `Prestať zoskupovať podľa ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Prepnúť detail panelu",
|
||
expandDetailPanel: "Rozbaliť",
|
||
collapseDetailPanel: "Zbaliť",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Preusporiadávanie riadkov",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Agregácia",
|
||
aggregationFunctionLabelSum: "suma",
|
||
aggregationFunctionLabelAvg: "priemer",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "max",
|
||
aggregationFunctionLabelSize: "počet"
|
||
};
|
||
var skSK2 = getGridLocalization(skSKGrid, skSK);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/svSE.js
|
||
var svSEGrid = {
|
||
// Root
|
||
noRowsLabel: "Inga rader",
|
||
noResultsOverlayLabel: "Inga resultat funna.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Densitet",
|
||
toolbarDensityLabel: "Densitet",
|
||
toolbarDensityCompact: "Kompakt",
|
||
toolbarDensityStandard: "Standard",
|
||
toolbarDensityComfortable: "Luftig",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Kolumner",
|
||
toolbarColumnsLabel: "Välj kolumner",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filter",
|
||
toolbarFiltersLabel: "Visa filter",
|
||
toolbarFiltersTooltipHide: "Dölj filter",
|
||
toolbarFiltersTooltipShow: "Visa filter",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} aktiva filter` : `${count} aktivt filter`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Sök…",
|
||
toolbarQuickFilterLabel: "Sök",
|
||
toolbarQuickFilterDeleteIconLabel: "Rensa",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Exportera",
|
||
toolbarExportLabel: "Exportera",
|
||
toolbarExportCSV: "Ladda ner som CSV",
|
||
toolbarExportPrint: "Skriv ut",
|
||
toolbarExportExcel: "Ladda ner som Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Hitta kolumn",
|
||
columnsPanelTextFieldPlaceholder: "Kolumntitel",
|
||
columnsPanelDragIconLabel: "Ordna om kolumnen",
|
||
columnsPanelShowAllButton: "Visa alla",
|
||
columnsPanelHideAllButton: "Dölj alla",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Lägg till filter",
|
||
filterPanelRemoveAll: "Ta bort alla",
|
||
filterPanelDeleteIconLabel: "Ta bort",
|
||
filterPanelLogicOperator: "Logisk operator",
|
||
filterPanelOperator: "Operator",
|
||
filterPanelOperatorAnd: "Och",
|
||
filterPanelOperatorOr: "Eller",
|
||
filterPanelColumns: "Kolumner",
|
||
filterPanelInputLabel: "Värde",
|
||
filterPanelInputPlaceholder: "Filtervärde",
|
||
// Filter operators text
|
||
filterOperatorContains: "innehåller",
|
||
filterOperatorEquals: "lika med",
|
||
filterOperatorStartsWith: "börjar med",
|
||
filterOperatorEndsWith: "slutar med",
|
||
filterOperatorIs: "är",
|
||
filterOperatorNot: "är inte",
|
||
filterOperatorAfter: "är efter",
|
||
filterOperatorOnOrAfter: "är på eller efter",
|
||
filterOperatorBefore: "är innan",
|
||
filterOperatorOnOrBefore: "är på eller innan",
|
||
filterOperatorIsEmpty: "är tom",
|
||
filterOperatorIsNotEmpty: "är inte tom",
|
||
filterOperatorIsAnyOf: "är någon av",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Innehåller",
|
||
headerFilterOperatorEquals: "Lika med",
|
||
headerFilterOperatorStartsWith: "Börjar med",
|
||
headerFilterOperatorEndsWith: "Slutar med",
|
||
headerFilterOperatorIs: "Är",
|
||
headerFilterOperatorNot: "Är inte",
|
||
headerFilterOperatorAfter: "Är efter",
|
||
headerFilterOperatorOnOrAfter: "Är på eller efter",
|
||
headerFilterOperatorBefore: "Är innan",
|
||
headerFilterOperatorOnOrBefore: "Är på eller innan",
|
||
headerFilterOperatorIsEmpty: "Är tom",
|
||
headerFilterOperatorIsNotEmpty: "Är inte tom",
|
||
headerFilterOperatorIsAnyOf: "Innehåller någon av",
|
||
"headerFilterOperator=": "Lika med",
|
||
"headerFilterOperator!=": "Inte lika med",
|
||
"headerFilterOperator>": "Större än",
|
||
"headerFilterOperator>=": "Större eller lika med",
|
||
"headerFilterOperator<": "Mindre än",
|
||
"headerFilterOperator<=": "Mindre eller lika med",
|
||
// Filter values text
|
||
filterValueAny: "något",
|
||
filterValueTrue: "sant",
|
||
filterValueFalse: "falskt",
|
||
// Column menu text
|
||
columnMenuLabel: "Meny",
|
||
columnMenuShowColumns: "Visa kolumner",
|
||
columnMenuManageColumns: "Hantera kolumner",
|
||
columnMenuFilter: "Filtrera",
|
||
columnMenuHideColumn: "Dölj",
|
||
columnMenuUnsort: "Ta bort sortering",
|
||
columnMenuSortAsc: "Sortera stigande",
|
||
columnMenuSortDesc: "Sortera fallande",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} aktiva filter` : `${count} aktivt filter`,
|
||
columnHeaderFiltersLabel: "Visa filter",
|
||
columnHeaderSortIconLabel: "Sortera",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} rader markerade` : `${count.toLocaleString()} rad markerad`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Totalt antal rader:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} av ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Markering med kryssruta",
|
||
checkboxSelectionSelectAllRows: "Markera alla rader",
|
||
checkboxSelectionUnselectAllRows: "Avmarkera alla rader",
|
||
checkboxSelectionSelectRow: "Markera rad",
|
||
checkboxSelectionUnselectRow: "Avmarkera rad",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "ja",
|
||
booleanCellFalseLabel: "nej",
|
||
// Actions cell more text
|
||
actionsCellMore: "mer",
|
||
// Column pinning text
|
||
pinToLeft: "Fäst till vänster",
|
||
pinToRight: "Fäst till höger",
|
||
unpin: "Ta bort fästning",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Grupp",
|
||
treeDataExpand: "visa underordnade",
|
||
treeDataCollapse: "dölj underordnade",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Grupp",
|
||
groupColumn: (name) => `Gruppera efter ${name}`,
|
||
unGroupColumn: (name) => `Sluta gruppera efter ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Växla detaljpanel",
|
||
expandDetailPanel: "Expandera",
|
||
collapseDetailPanel: "Kollapsa",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Ordna om rader",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Aggregering",
|
||
aggregationFunctionLabelSum: "summa",
|
||
aggregationFunctionLabelAvg: "medel",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "max",
|
||
aggregationFunctionLabelSize: "antal"
|
||
};
|
||
var svSE2 = getGridLocalization(svSEGrid, svSE);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/trTR.js
|
||
var trTRGrid = {
|
||
// Root
|
||
noRowsLabel: "Satır yok",
|
||
noResultsOverlayLabel: "Sonuç bulunamadı.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Yoğunluk",
|
||
toolbarDensityLabel: "Yoğunluk",
|
||
toolbarDensityCompact: "Sıkı",
|
||
toolbarDensityStandard: "Standart",
|
||
toolbarDensityComfortable: "Rahat",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Sütunlar",
|
||
toolbarColumnsLabel: "Sütun seç",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtreler",
|
||
toolbarFiltersLabel: "Filtreleri göster",
|
||
toolbarFiltersTooltipHide: "Filtreleri gizle",
|
||
toolbarFiltersTooltipShow: "Filtreleri göster",
|
||
toolbarFiltersTooltipActive: (count) => `${count} aktif filtre`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Ara…",
|
||
toolbarQuickFilterLabel: "Ara",
|
||
toolbarQuickFilterDeleteIconLabel: "Temizle",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Dışa aktar",
|
||
toolbarExportLabel: "Dışa aktar",
|
||
toolbarExportCSV: "CSV olarak aktar",
|
||
toolbarExportPrint: "Yazdır",
|
||
toolbarExportExcel: "Excel olarak aktar",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Sütun ara",
|
||
columnsPanelTextFieldPlaceholder: "Sütun adı",
|
||
columnsPanelDragIconLabel: "Sütunları yeniden sırala",
|
||
columnsPanelShowAllButton: "Hepsini göster",
|
||
columnsPanelHideAllButton: "Hepsini gizle",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Filtre Ekle",
|
||
filterPanelRemoveAll: "Hepsini kaldır",
|
||
filterPanelDeleteIconLabel: "Kaldır",
|
||
filterPanelLogicOperator: "Mantıksal operatörler",
|
||
filterPanelOperator: "Operatör",
|
||
filterPanelOperatorAnd: "Ve",
|
||
filterPanelOperatorOr: "Veya",
|
||
filterPanelColumns: "Sütunlar",
|
||
filterPanelInputLabel: "Değer",
|
||
filterPanelInputPlaceholder: "Filtre değeri",
|
||
// Filter operators text
|
||
filterOperatorContains: "içerir",
|
||
filterOperatorEquals: "eşittir",
|
||
filterOperatorStartsWith: "ile başlar",
|
||
filterOperatorEndsWith: "ile biter",
|
||
filterOperatorIs: "eşittir",
|
||
filterOperatorNot: "eşit değildir",
|
||
filterOperatorAfter: "büyük",
|
||
filterOperatorOnOrAfter: "büyük eşit",
|
||
filterOperatorBefore: "küçük",
|
||
filterOperatorOnOrBefore: "küçük eşit",
|
||
filterOperatorIsEmpty: "boş",
|
||
filterOperatorIsNotEmpty: "dolu",
|
||
filterOperatorIsAnyOf: "herhangi biri",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Şunu içerir",
|
||
headerFilterOperatorEquals: "Şuna eşittir",
|
||
headerFilterOperatorStartsWith: "Şununla başlar",
|
||
headerFilterOperatorEndsWith: "Şununla biter",
|
||
// 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: "herhangi",
|
||
filterValueTrue: "doğru",
|
||
filterValueFalse: "yanlış",
|
||
// Column menu text
|
||
columnMenuLabel: "Menü",
|
||
columnMenuShowColumns: "Sütunları göster",
|
||
columnMenuManageColumns: "Sütunları yönet",
|
||
columnMenuFilter: "Filtre Ekle",
|
||
columnMenuHideColumn: "Gizle",
|
||
columnMenuUnsort: "Varsayılan Sıralama",
|
||
columnMenuSortAsc: "Sırala - Artan",
|
||
columnMenuSortDesc: "Sırala - Azalan",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => `${count} filtre aktif`,
|
||
columnHeaderFiltersLabel: "Filtreleri göster",
|
||
columnHeaderSortIconLabel: "Sırala",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => `${count.toLocaleString()} satır seçildi`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Toplam Satır:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Seçim",
|
||
checkboxSelectionSelectAllRows: "Tüm satırları seç",
|
||
checkboxSelectionUnselectAllRows: "Tüm satırların seçimini kaldır",
|
||
checkboxSelectionSelectRow: "Satırı seç",
|
||
checkboxSelectionUnselectRow: "Satır seçimini bırak",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "Evet",
|
||
booleanCellFalseLabel: "Hayır",
|
||
// Actions cell more text
|
||
actionsCellMore: "daha fazla",
|
||
// Column pinning text
|
||
pinToLeft: "Sola sabitle",
|
||
pinToRight: "Sağa sabitle",
|
||
unpin: "Sabitlemeyi kaldır",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Grup",
|
||
treeDataExpand: "göster",
|
||
treeDataCollapse: "gizle",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Grup",
|
||
groupColumn: (name) => `${name} için grupla`,
|
||
unGroupColumn: (name) => `${name} için gruplamayı kaldır`,
|
||
// Master/detail
|
||
detailPanelToggle: "Detay görünümüne geçiş",
|
||
expandDetailPanel: "Genişlet",
|
||
collapseDetailPanel: "Gizle",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Satırı yeniden sırala",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Toplama",
|
||
aggregationFunctionLabelSum: "top",
|
||
aggregationFunctionLabelAvg: "ort",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "maks",
|
||
aggregationFunctionLabelSize: "boyut"
|
||
};
|
||
var trTR2 = getGridLocalization(trTRGrid, trTR);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/ukUA.js
|
||
var getPluralForm2 = (count, options) => {
|
||
let pluralForm = options.many;
|
||
const lastDigit = count % 10;
|
||
if (lastDigit > 1 && lastDigit < 5) {
|
||
pluralForm = options.few;
|
||
} else if (lastDigit === 1) {
|
||
pluralForm = options.one;
|
||
}
|
||
return `${count} ${pluralForm}`;
|
||
};
|
||
var ukUAGrid = {
|
||
// Root
|
||
noRowsLabel: "Немає рядків",
|
||
noResultsOverlayLabel: "Дані не знайдено.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Висота рядка",
|
||
toolbarDensityLabel: "Висота рядка",
|
||
toolbarDensityCompact: "Компактний",
|
||
toolbarDensityStandard: "Стандартний",
|
||
toolbarDensityComfortable: "Комфортний",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Стовпці",
|
||
toolbarColumnsLabel: "Виділіть стовпці",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Фільтри",
|
||
toolbarFiltersLabel: "Показати фільтри",
|
||
toolbarFiltersTooltipHide: "Приховати фільтри",
|
||
toolbarFiltersTooltipShow: "Показати фільтри",
|
||
toolbarFiltersTooltipActive: (count) => getPluralForm2(count, {
|
||
one: "активний фільтр",
|
||
few: "активні фільтри",
|
||
many: "активних фільтрів"
|
||
}),
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Пошук…",
|
||
toolbarQuickFilterLabel: "Пошук",
|
||
toolbarQuickFilterDeleteIconLabel: "Очистити",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Експорт",
|
||
toolbarExportLabel: "Експорт",
|
||
toolbarExportCSV: "Завантажити у форматі CSV",
|
||
toolbarExportPrint: "Друк",
|
||
toolbarExportExcel: "Завантажити у форматі Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Знайти стовпець",
|
||
columnsPanelTextFieldPlaceholder: "Заголовок стовпця",
|
||
columnsPanelDragIconLabel: "Змінити порядок стовпця",
|
||
columnsPanelShowAllButton: "Показати всі",
|
||
columnsPanelHideAllButton: "Приховати всі",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Додати фільтр",
|
||
filterPanelRemoveAll: "Видалити всі",
|
||
filterPanelDeleteIconLabel: "Видалити",
|
||
filterPanelLogicOperator: "Логічна функція",
|
||
filterPanelOperator: "Оператори",
|
||
filterPanelOperatorAnd: "І",
|
||
filterPanelOperatorOr: "Або",
|
||
filterPanelColumns: "Стовпці",
|
||
filterPanelInputLabel: "Значення",
|
||
filterPanelInputPlaceholder: "Значення фільтра",
|
||
// Filter operators text
|
||
filterOperatorContains: "містить",
|
||
filterOperatorEquals: "дорівнює",
|
||
filterOperatorStartsWith: "починається з",
|
||
filterOperatorEndsWith: "закінчується на",
|
||
filterOperatorIs: "дорівнює",
|
||
filterOperatorNot: "не дорівнює",
|
||
filterOperatorAfter: "більше ніж",
|
||
filterOperatorOnOrAfter: "більше або дорівнює",
|
||
filterOperatorBefore: "менше ніж",
|
||
filterOperatorOnOrBefore: "менше або дорівнює",
|
||
filterOperatorIsEmpty: "порожній",
|
||
filterOperatorIsNotEmpty: "не порожній",
|
||
filterOperatorIsAnyOf: "будь-що із",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Містить",
|
||
headerFilterOperatorEquals: "Дорівнює",
|
||
headerFilterOperatorStartsWith: "Починається з",
|
||
headerFilterOperatorEndsWith: "Закінчується на",
|
||
headerFilterOperatorIs: "Дорівнює",
|
||
headerFilterOperatorNot: "Не дорівнює",
|
||
headerFilterOperatorAfter: "Після",
|
||
headerFilterOperatorOnOrAfter: "Після (включаючи)",
|
||
headerFilterOperatorBefore: "Раніше",
|
||
headerFilterOperatorOnOrBefore: "Раніше (включаючи)",
|
||
headerFilterOperatorIsEmpty: "Порожнє",
|
||
headerFilterOperatorIsNotEmpty: "Не порожнє",
|
||
headerFilterOperatorIsAnyOf: "Будь-що із",
|
||
"headerFilterOperator=": "Дорівнює",
|
||
"headerFilterOperator!=": "Не дорівнює",
|
||
"headerFilterOperator>": "Більше ніж",
|
||
"headerFilterOperator>=": "Більше або дорівнює",
|
||
"headerFilterOperator<": "Менше ніж",
|
||
"headerFilterOperator<=": "Менше або дорівнює",
|
||
// Filter values text
|
||
filterValueAny: "будь-який",
|
||
filterValueTrue: "так",
|
||
filterValueFalse: "ні",
|
||
// Column menu text
|
||
columnMenuLabel: "Меню",
|
||
columnMenuShowColumns: "Показати стовпці",
|
||
columnMenuManageColumns: "Керування стовпцями",
|
||
columnMenuFilter: "Фільтр",
|
||
columnMenuHideColumn: "Приховати",
|
||
columnMenuUnsort: "Скасувати сортування",
|
||
columnMenuSortAsc: "Сортувати за зростанням",
|
||
columnMenuSortDesc: "Сортувати за спаданням",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => getPluralForm2(count, {
|
||
one: "активний фільтр",
|
||
few: "активні фільтри",
|
||
many: "активних фільтрів"
|
||
}),
|
||
columnHeaderFiltersLabel: "Показати фільтри",
|
||
columnHeaderSortIconLabel: "Сортувати",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => getPluralForm2(count, {
|
||
one: "вибраний рядок",
|
||
few: "вибрані рядки",
|
||
many: "вибраних рядків"
|
||
}),
|
||
// Total row amount footer text
|
||
footerTotalRows: "Усього рядків:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} з ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Вибір прапорця",
|
||
checkboxSelectionSelectAllRows: "Вибрати всі рядки",
|
||
checkboxSelectionUnselectAllRows: "Скасувати вибір всіх рядків",
|
||
checkboxSelectionSelectRow: "Вибрати рядок",
|
||
checkboxSelectionUnselectRow: "Скасувати вибір рядка",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "так",
|
||
booleanCellFalseLabel: "ні",
|
||
// Actions cell more text
|
||
actionsCellMore: "більше",
|
||
// Column pinning text
|
||
pinToLeft: "Закріпити ліворуч",
|
||
pinToRight: "Закріпити праворуч",
|
||
unpin: "Відкріпити",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Група",
|
||
treeDataExpand: "показати дочірні елементи",
|
||
treeDataCollapse: "приховати дочірні елементи",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Група",
|
||
groupColumn: (name) => `Групувати за ${name}`,
|
||
unGroupColumn: (name) => `Відмінити групування за ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Перемикач панелі деталей",
|
||
expandDetailPanel: "Показати",
|
||
collapseDetailPanel: "Приховати",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Порядок рядків",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Агрегація",
|
||
aggregationFunctionLabelSum: "сума",
|
||
aggregationFunctionLabelAvg: "сер",
|
||
aggregationFunctionLabelMin: "мін",
|
||
aggregationFunctionLabelMax: "макс",
|
||
aggregationFunctionLabelSize: "кількість"
|
||
};
|
||
var ukUA2 = getGridLocalization(ukUAGrid, ukUA);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/urPK.js
|
||
var urPKGrid = {
|
||
// Root
|
||
noRowsLabel: "کوئی قطاریں نہیں",
|
||
noResultsOverlayLabel: "کوئی نتائج نہیں",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "کثافت",
|
||
toolbarDensityLabel: "کثافت",
|
||
toolbarDensityCompact: "تنگ",
|
||
toolbarDensityStandard: "درمیانہ",
|
||
toolbarDensityComfortable: "مناسب",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "کالمز",
|
||
toolbarColumnsLabel: "کالمز کو منتخب کریں",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "فلٹرز",
|
||
toolbarFiltersLabel: "فلٹرز دکھائیں",
|
||
toolbarFiltersTooltipHide: "فلٹرز چھپائیں",
|
||
toolbarFiltersTooltipShow: "فلٹرز دکھائیں",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} فعال فلٹرز` : `${count} فلٹرز فعال`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "تلاش کریں۔۔۔",
|
||
toolbarQuickFilterLabel: "تلاش کریں",
|
||
toolbarQuickFilterDeleteIconLabel: "کلئیر کریں",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "ایکسپورٹ",
|
||
toolbarExportLabel: "ایکسپورٹ",
|
||
toolbarExportCSV: "CSV کے طور پر ڈاوٴنلوڈ کریں",
|
||
toolbarExportPrint: "پرنٹ کریں",
|
||
toolbarExportExcel: "ایکسل کے طور پر ڈاوٴنلوڈ کریں",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "کالم کو تلاش کریں",
|
||
columnsPanelTextFieldPlaceholder: "کالم کا عنوان",
|
||
columnsPanelDragIconLabel: "کالم کی ترتیب تبدیل کریں",
|
||
columnsPanelShowAllButton: "سارے دکھائیں",
|
||
columnsPanelHideAllButton: "سارے چھپائیں",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "نیا فلٹر",
|
||
filterPanelRemoveAll: "سارے ختم کریں",
|
||
filterPanelDeleteIconLabel: "ختم کریں",
|
||
filterPanelLogicOperator: "لاجک آپریٹر",
|
||
filterPanelOperator: "آپریٹر",
|
||
filterPanelOperatorAnd: "اور",
|
||
filterPanelOperatorOr: "یا",
|
||
filterPanelColumns: "کالمز",
|
||
filterPanelInputLabel: "ویلیو",
|
||
filterPanelInputPlaceholder: "ویلیو کو فلٹر کریں",
|
||
// Filter operators text
|
||
filterOperatorContains: "شامل ہے",
|
||
filterOperatorEquals: "برابر ہے",
|
||
filterOperatorStartsWith: "شروع ہوتا ہے",
|
||
filterOperatorEndsWith: "ختم ہوتا ہے",
|
||
filterOperatorIs: "ہے",
|
||
filterOperatorNot: "نہیں",
|
||
filterOperatorAfter: "بعد میں ہے",
|
||
filterOperatorOnOrAfter: "پر یا بعد میں ہے",
|
||
filterOperatorBefore: "پہلے ہے",
|
||
filterOperatorOnOrBefore: "پر یا پہلے ہے",
|
||
filterOperatorIsEmpty: "خالی ہے",
|
||
filterOperatorIsNotEmpty: "خالی نہیں ہے",
|
||
filterOperatorIsAnyOf: "ان میں سے کوئی ہے",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "شامل ہے",
|
||
headerFilterOperatorEquals: "برابر ہے",
|
||
headerFilterOperatorStartsWith: "شروع ہوتا ہے",
|
||
headerFilterOperatorEndsWith: "ختم ہوتا ہے",
|
||
headerFilterOperatorIs: "ہے",
|
||
headerFilterOperatorNot: "نہیں ہے",
|
||
headerFilterOperatorAfter: "بعد میں ہے",
|
||
headerFilterOperatorOnOrAfter: "پر یا بعد میں ہے",
|
||
headerFilterOperatorBefore: "پہلے ہے",
|
||
headerFilterOperatorOnOrBefore: "پر یا پہلے ہے",
|
||
headerFilterOperatorIsEmpty: "خالی ہے",
|
||
headerFilterOperatorIsNotEmpty: "خالی نہیں ہے",
|
||
headerFilterOperatorIsAnyOf: "ان میں سے کوئی ہے",
|
||
"headerFilterOperator=": "برابر ہے",
|
||
"headerFilterOperator!=": "برابر نہیں ہے",
|
||
"headerFilterOperator>": "ذیادہ ہے",
|
||
"headerFilterOperator>=": "ذیادہ یا برابر ہے",
|
||
"headerFilterOperator<": "کم ہے",
|
||
"headerFilterOperator<=": "کم یا برابر ہے",
|
||
// Filter values text
|
||
filterValueAny: "کوئی بھی",
|
||
filterValueTrue: "صحیح",
|
||
filterValueFalse: "غلط",
|
||
// Column menu text
|
||
columnMenuLabel: "مینیو",
|
||
columnMenuShowColumns: "کالم دکھائیں",
|
||
columnMenuManageColumns: "کالم مینج کریں",
|
||
columnMenuFilter: "فلٹر",
|
||
columnMenuHideColumn: "چھپائیں",
|
||
columnMenuUnsort: "sort ختم کریں",
|
||
columnMenuSortAsc: "ترتیب صعودی",
|
||
columnMenuSortDesc: "ترتیب نزولی",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} فعال فلٹرز` : `${count} فلٹرز فعال`,
|
||
columnHeaderFiltersLabel: "فلٹرز دکھائیں",
|
||
columnHeaderSortIconLabel: "Sort",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} منتخب قطاریں` : `${count.toLocaleString()} منتخب قطار`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "کل قطاریں:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${totalCount.toLocaleString()} میں سے ${visibleCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "چیک باکس منتخب کریں",
|
||
checkboxSelectionSelectAllRows: "تمام قطاریں منتخب کریں",
|
||
checkboxSelectionUnselectAllRows: "تمام قطاریں نامنتخب کریں ",
|
||
checkboxSelectionSelectRow: "قطار منتخب کریں",
|
||
checkboxSelectionUnselectRow: "قطار نامنتخب کریں",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "ہاں",
|
||
booleanCellFalseLabel: "نہیں",
|
||
// Actions cell more text
|
||
actionsCellMore: "ذیادہ",
|
||
// Column pinning text
|
||
pinToLeft: "بائیں جانب pin کریں",
|
||
pinToRight: "دائیں جانب pin کریں",
|
||
unpin: "pin ختم کریں",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "گروپ",
|
||
treeDataExpand: "شاخیں دیکھیں",
|
||
treeDataCollapse: "شاخیں چھپائیں",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "گروپ",
|
||
groupColumn: (name) => `${name} سے گروپ کریں`,
|
||
unGroupColumn: (name) => `${name} سے گروپ ختم کریں`,
|
||
// Master/detail
|
||
detailPanelToggle: "ڈیٹیل پینل کھولیں / بند کریں",
|
||
expandDetailPanel: "پھیلائیں",
|
||
collapseDetailPanel: "تنگ کریں",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "قطاروں کی ترتیب تبدیل کریں",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "ایگریگیشن",
|
||
aggregationFunctionLabelSum: "کل",
|
||
aggregationFunctionLabelAvg: "اوسط",
|
||
aggregationFunctionLabelMin: "کم از کم",
|
||
aggregationFunctionLabelMax: "زیادہ سے زیادہ",
|
||
aggregationFunctionLabelSize: "سائز"
|
||
};
|
||
var urPK = getGridLocalization(urPKGrid, urPKCore);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/viVN.js
|
||
var viVNGrid = {
|
||
// Root
|
||
noRowsLabel: "Không có dữ liệu",
|
||
noResultsOverlayLabel: "Không tìm thấy kết quả.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Độ giãn",
|
||
toolbarDensityLabel: "Độ giãn",
|
||
toolbarDensityCompact: "Trung bình",
|
||
toolbarDensityStandard: "Tiêu chuẩn",
|
||
toolbarDensityComfortable: "Rộng",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Cột",
|
||
toolbarColumnsLabel: "Chọn cột",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Bộ lọc",
|
||
toolbarFiltersLabel: "Hiển thị bộ lọc",
|
||
toolbarFiltersTooltipHide: "Ẩn",
|
||
toolbarFiltersTooltipShow: "Hiện",
|
||
toolbarFiltersTooltipActive: (count) => count > 1 ? `${count} bộ lọc hoạt động` : `${count} bộ lọc hoạt động`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Tìm kiếm…",
|
||
toolbarQuickFilterLabel: "Tìm kiếm",
|
||
toolbarQuickFilterDeleteIconLabel: "Xóa tìm kiếm",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Xuất",
|
||
toolbarExportLabel: "Xuất",
|
||
toolbarExportCSV: "Xuất CSV",
|
||
toolbarExportPrint: "In",
|
||
toolbarExportExcel: "Xuất Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Tìm kiếm",
|
||
columnsPanelTextFieldPlaceholder: "Tiêu đề cột",
|
||
columnsPanelDragIconLabel: "Sắp xếp",
|
||
columnsPanelShowAllButton: "Hiện tất cả",
|
||
columnsPanelHideAllButton: "Ẩn tất cả",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Thêm bộ lọc",
|
||
filterPanelRemoveAll: "Xóa tất cả",
|
||
filterPanelDeleteIconLabel: "Xóa",
|
||
filterPanelLogicOperator: "Toán tử logic",
|
||
filterPanelOperator: "Toán tử",
|
||
filterPanelOperatorAnd: "Và",
|
||
filterPanelOperatorOr: "Hoặc",
|
||
filterPanelColumns: "Cột",
|
||
filterPanelInputLabel: "Giá trị",
|
||
filterPanelInputPlaceholder: "Lọc giá trị",
|
||
// Filter operators text
|
||
filterOperatorContains: "Chứa",
|
||
filterOperatorEquals: "Bằng",
|
||
filterOperatorStartsWith: "Bắt đầu bằng",
|
||
filterOperatorEndsWith: "Kết thúc bằng",
|
||
filterOperatorIs: "Là",
|
||
filterOperatorNot: "Không là",
|
||
filterOperatorAfter: "Trước",
|
||
filterOperatorOnOrAfter: "bằng hoặc sau",
|
||
filterOperatorBefore: "Sau",
|
||
filterOperatorOnOrBefore: "bằng hoặc trước",
|
||
filterOperatorIsEmpty: "Rỗng",
|
||
filterOperatorIsNotEmpty: "Khác rỗng",
|
||
filterOperatorIsAnyOf: "Bất kỳ",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Chứa",
|
||
headerFilterOperatorEquals: "Bằng",
|
||
headerFilterOperatorStartsWith: "Bắt đầu với",
|
||
headerFilterOperatorEndsWith: "Kết thúc với",
|
||
headerFilterOperatorIs: "là",
|
||
headerFilterOperatorNot: "Không là",
|
||
headerFilterOperatorAfter: "Sau",
|
||
headerFilterOperatorOnOrAfter: "Đang hoặc sau",
|
||
headerFilterOperatorBefore: "Trước",
|
||
headerFilterOperatorOnOrBefore: "Đang hoặc trước",
|
||
headerFilterOperatorIsEmpty: "Rỗng",
|
||
headerFilterOperatorIsNotEmpty: "Khác rỗng",
|
||
headerFilterOperatorIsAnyOf: "Bất kỳ",
|
||
"headerFilterOperator=": "Bằng",
|
||
"headerFilterOperator!=": "Khác",
|
||
"headerFilterOperator>": "Lớn hơn",
|
||
"headerFilterOperator>=": "Lớn hơn hoặc bằng",
|
||
"headerFilterOperator<": "Nhỏ hơn",
|
||
"headerFilterOperator<=": "Nhỏ hơn hoặc bằng",
|
||
// Filter values text
|
||
filterValueAny: "bất kỳ giá trị nào",
|
||
filterValueTrue: "Có",
|
||
filterValueFalse: "Không",
|
||
// Column menu text
|
||
columnMenuLabel: "Danh mục",
|
||
columnMenuShowColumns: "Danh sách cột",
|
||
columnMenuManageColumns: "Quản lý cột",
|
||
columnMenuFilter: "Bộ lọc",
|
||
columnMenuHideColumn: "Ẩn cột",
|
||
columnMenuUnsort: "Bỏ sắp xếp",
|
||
columnMenuSortAsc: "Sắp xếp tăng dần",
|
||
columnMenuSortDesc: "Sắp xếp giảm dần",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count > 1 ? `${count} bộ lọc hoạt động` : `${count} bộ lọc hoạt động`,
|
||
columnHeaderFiltersLabel: "Bộ lọc",
|
||
columnHeaderSortIconLabel: "Sắp xếp",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count > 1 ? `${count.toLocaleString()} hàng đã chọn` : `${count.toLocaleString()} hàng đã chọn`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Tổng:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Tích vào ô trống",
|
||
checkboxSelectionSelectAllRows: "Chọn tất cả hàng",
|
||
checkboxSelectionUnselectAllRows: "Bỏ chọn tất cả hàng",
|
||
checkboxSelectionSelectRow: "Chọn hàng",
|
||
checkboxSelectionUnselectRow: "Bỏ chọn hàng",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "Có",
|
||
booleanCellFalseLabel: "Không",
|
||
// Actions cell more text
|
||
actionsCellMore: "Thêm",
|
||
// Column pinning text
|
||
pinToLeft: "Ghim cột bên trái",
|
||
pinToRight: "Ghim cột bên phải",
|
||
unpin: "Bỏ ghim",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Nhóm",
|
||
treeDataExpand: "mở rộng",
|
||
treeDataCollapse: "ẩn đi",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Nhóm",
|
||
groupColumn: (name) => `Nhóm theo ${name}`,
|
||
unGroupColumn: (name) => `Hủy nhóm theo ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Ẩn/hiện chi tiết",
|
||
expandDetailPanel: "Mở rộng",
|
||
collapseDetailPanel: "Thu nhỏ",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Sắp xếp hàng",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Tổng hợp",
|
||
aggregationFunctionLabelSum: "Tổng",
|
||
aggregationFunctionLabelAvg: "Trung bình",
|
||
aggregationFunctionLabelMin: "Tối thiểu",
|
||
aggregationFunctionLabelMax: "Tối đa",
|
||
aggregationFunctionLabelSize: "Kích cỡ"
|
||
};
|
||
var viVN2 = getGridLocalization(viVNGrid, viVN);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/zhCN.js
|
||
var zhCNGrid = {
|
||
// Root
|
||
noRowsLabel: "没有数据。",
|
||
noResultsOverlayLabel: "未找到数据。",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "表格密度",
|
||
toolbarDensityLabel: "表格密度",
|
||
toolbarDensityCompact: "紧密",
|
||
toolbarDensityStandard: "标准",
|
||
toolbarDensityComfortable: "稀疏",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "列",
|
||
toolbarColumnsLabel: "选择列",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "筛选器",
|
||
toolbarFiltersLabel: "显示筛选器",
|
||
toolbarFiltersTooltipHide: "隐藏筛选器",
|
||
toolbarFiltersTooltipShow: "显示筛选器",
|
||
toolbarFiltersTooltipActive: (count) => `${count} 个筛选器`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "搜索…",
|
||
toolbarQuickFilterLabel: "搜索",
|
||
toolbarQuickFilterDeleteIconLabel: "清除",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "导出",
|
||
toolbarExportLabel: "导出",
|
||
toolbarExportCSV: "导出至CSV",
|
||
toolbarExportPrint: "打印",
|
||
toolbarExportExcel: "导出至Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "搜索列",
|
||
columnsPanelTextFieldPlaceholder: "列名",
|
||
columnsPanelDragIconLabel: "重排序列",
|
||
columnsPanelShowAllButton: "显示所有",
|
||
columnsPanelHideAllButton: "隐藏所有",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "添加筛选器",
|
||
filterPanelRemoveAll: "清除全部",
|
||
filterPanelDeleteIconLabel: "删除",
|
||
filterPanelLogicOperator: "逻辑操作器",
|
||
filterPanelOperator: "操作器",
|
||
filterPanelOperatorAnd: "与",
|
||
filterPanelOperatorOr: "或",
|
||
filterPanelColumns: "列",
|
||
filterPanelInputLabel: "值",
|
||
filterPanelInputPlaceholder: "筛选值",
|
||
// Filter operators text
|
||
filterOperatorContains: "包含",
|
||
filterOperatorEquals: "等于",
|
||
filterOperatorStartsWith: "开始于",
|
||
filterOperatorEndsWith: "结束于",
|
||
filterOperatorIs: "是",
|
||
filterOperatorNot: "不是",
|
||
filterOperatorAfter: "在后面",
|
||
filterOperatorOnOrAfter: "正在后面",
|
||
filterOperatorBefore: "在前面",
|
||
filterOperatorOnOrBefore: "正在前面",
|
||
filterOperatorIsEmpty: "为空",
|
||
filterOperatorIsNotEmpty: "不为空",
|
||
filterOperatorIsAnyOf: "属于",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "包含",
|
||
headerFilterOperatorEquals: "等于",
|
||
headerFilterOperatorStartsWith: "开始于",
|
||
headerFilterOperatorEndsWith: "结束于",
|
||
headerFilterOperatorIs: "是",
|
||
headerFilterOperatorNot: "不是",
|
||
headerFilterOperatorAfter: "在后面",
|
||
headerFilterOperatorOnOrAfter: "在当前或后面",
|
||
headerFilterOperatorBefore: "在前面",
|
||
headerFilterOperatorOnOrBefore: "在当前或前面",
|
||
headerFilterOperatorIsEmpty: "为空",
|
||
headerFilterOperatorIsNotEmpty: "不为空",
|
||
headerFilterOperatorIsAnyOf: "属于",
|
||
"headerFilterOperator=": "等于",
|
||
"headerFilterOperator!=": "不等于",
|
||
"headerFilterOperator>": "大于",
|
||
"headerFilterOperator>=": "大于或等于",
|
||
"headerFilterOperator<": "小雨",
|
||
"headerFilterOperator<=": "小于或等于",
|
||
// Filter values text
|
||
filterValueAny: "任何",
|
||
filterValueTrue: "真",
|
||
filterValueFalse: "假",
|
||
// Column menu text
|
||
columnMenuLabel: "菜单",
|
||
columnMenuShowColumns: "显示",
|
||
columnMenuManageColumns: "管理列",
|
||
columnMenuFilter: "筛选器",
|
||
columnMenuHideColumn: "隐藏",
|
||
columnMenuUnsort: "恢复默认",
|
||
columnMenuSortAsc: "升序",
|
||
columnMenuSortDesc: "降序",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} 个筛选器` : `${count} 个筛选器`,
|
||
columnHeaderFiltersLabel: "显示筛选器",
|
||
columnHeaderSortIconLabel: "排序",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => `共选中了${count.toLocaleString()}行`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "所有行:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "多选框",
|
||
checkboxSelectionSelectAllRows: "全选行",
|
||
checkboxSelectionUnselectAllRows: "反选所有行",
|
||
checkboxSelectionSelectRow: "选择行",
|
||
checkboxSelectionUnselectRow: "反选行",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "真",
|
||
booleanCellFalseLabel: "假",
|
||
// Actions cell more text
|
||
actionsCellMore: "更多",
|
||
// Column pinning text
|
||
pinToLeft: "固定到左侧",
|
||
pinToRight: "固定到右侧",
|
||
unpin: "取消固定",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "组",
|
||
treeDataExpand: "查看子项目",
|
||
treeDataCollapse: "隐藏子项目",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "组",
|
||
groupColumn: (name) => `用${name}分组`,
|
||
unGroupColumn: (name) => `不再用${name}分组`,
|
||
// Master/detail
|
||
detailPanelToggle: "详细信息",
|
||
expandDetailPanel: "显示",
|
||
collapseDetailPanel: "折叠",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "重新排列行",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "集合",
|
||
aggregationFunctionLabelSum: "总数",
|
||
aggregationFunctionLabelAvg: "平均",
|
||
aggregationFunctionLabelMin: "最小",
|
||
aggregationFunctionLabelMax: "最大",
|
||
aggregationFunctionLabelSize: "大小"
|
||
};
|
||
var zhCN2 = getGridLocalization(zhCNGrid, zhCN);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/zhTW.js
|
||
var zhTWGrid = {
|
||
// Root
|
||
noRowsLabel: "沒有資料",
|
||
noResultsOverlayLabel: "沒有結果",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "表格密度",
|
||
toolbarDensityLabel: "表格密度",
|
||
toolbarDensityCompact: "緊湊",
|
||
toolbarDensityStandard: "標準",
|
||
toolbarDensityComfortable: "舒適",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "欄位",
|
||
toolbarColumnsLabel: "選擇欄位",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "篩選器",
|
||
toolbarFiltersLabel: "顯示篩選器",
|
||
toolbarFiltersTooltipHide: "隱藏篩選器",
|
||
toolbarFiltersTooltipShow: "顯示篩選器",
|
||
toolbarFiltersTooltipActive: (count) => `${count} 個篩選器`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "搜尋…",
|
||
toolbarQuickFilterLabel: "搜尋",
|
||
toolbarQuickFilterDeleteIconLabel: "清除",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "匯出",
|
||
toolbarExportLabel: "匯出",
|
||
toolbarExportCSV: "匯出 CSV",
|
||
toolbarExportPrint: "列印",
|
||
toolbarExportExcel: "匯出 Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "欄位搜尋",
|
||
columnsPanelTextFieldPlaceholder: "欄位名稱",
|
||
columnsPanelDragIconLabel: "排序欄位",
|
||
columnsPanelShowAllButton: "顯示所有",
|
||
columnsPanelHideAllButton: "隱藏所有",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "增加篩選器",
|
||
filterPanelRemoveAll: "清除所有",
|
||
filterPanelDeleteIconLabel: "刪除",
|
||
filterPanelLogicOperator: "邏輯運算子",
|
||
filterPanelOperator: "運算子",
|
||
filterPanelOperatorAnd: "且",
|
||
filterPanelOperatorOr: "或",
|
||
filterPanelColumns: "欄位",
|
||
filterPanelInputLabel: "值",
|
||
filterPanelInputPlaceholder: "篩選值",
|
||
// Filter operators text
|
||
filterOperatorContains: "包含",
|
||
filterOperatorEquals: "等於",
|
||
filterOperatorStartsWith: "以...開頭",
|
||
filterOperatorEndsWith: "以...結束",
|
||
filterOperatorIs: "為",
|
||
filterOperatorNot: "不為",
|
||
filterOperatorAfter: "...之後",
|
||
filterOperatorOnOrAfter: "...(含)之後",
|
||
filterOperatorBefore: "...之前",
|
||
filterOperatorOnOrBefore: "...(含)之前",
|
||
filterOperatorIsEmpty: "為空",
|
||
filterOperatorIsNotEmpty: "不為空",
|
||
filterOperatorIsAnyOf: "是其中之一",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "包含",
|
||
headerFilterOperatorEquals: "等於",
|
||
headerFilterOperatorStartsWith: "以...開頭",
|
||
headerFilterOperatorEndsWith: "以...結束",
|
||
headerFilterOperatorIs: "為",
|
||
headerFilterOperatorNot: "不為",
|
||
headerFilterOperatorAfter: "...之後",
|
||
headerFilterOperatorOnOrAfter: "...(含)之後",
|
||
headerFilterOperatorBefore: "...之前",
|
||
headerFilterOperatorOnOrBefore: "...(含)之前",
|
||
headerFilterOperatorIsEmpty: "為空",
|
||
headerFilterOperatorIsNotEmpty: "不為空",
|
||
headerFilterOperatorIsAnyOf: "是其中之一",
|
||
"headerFilterOperator=": "等於",
|
||
"headerFilterOperator!=": "不等於",
|
||
"headerFilterOperator>": "大於",
|
||
"headerFilterOperator>=": "大於或等於",
|
||
"headerFilterOperator<": "小於",
|
||
"headerFilterOperator<=": "小於或等於",
|
||
// Filter values text
|
||
filterValueAny: "任何值",
|
||
filterValueTrue: "真",
|
||
filterValueFalse: "假",
|
||
// Column menu text
|
||
columnMenuLabel: "選單",
|
||
columnMenuShowColumns: "顯示欄位",
|
||
columnMenuManageColumns: "管理欄位",
|
||
columnMenuFilter: "篩選器",
|
||
columnMenuHideColumn: "隱藏",
|
||
columnMenuUnsort: "預設排序",
|
||
columnMenuSortAsc: "升序",
|
||
columnMenuSortDesc: "降序",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => `${count} 個篩選器`,
|
||
columnHeaderFiltersLabel: "顯示篩選器",
|
||
columnHeaderSortIconLabel: "排序",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => `已選取 ${count.toLocaleString()} 個`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "總數:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} / ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "核取方塊",
|
||
checkboxSelectionSelectAllRows: "全選",
|
||
checkboxSelectionUnselectAllRows: "取消全選",
|
||
checkboxSelectionSelectRow: "選取",
|
||
checkboxSelectionUnselectRow: "取消選取",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "真",
|
||
booleanCellFalseLabel: "假",
|
||
// Actions cell more text
|
||
actionsCellMore: "查看更多",
|
||
// Column pinning text
|
||
pinToLeft: "釘選在左側",
|
||
pinToRight: "釘選在右側",
|
||
unpin: "取消釘選",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "群組",
|
||
treeDataExpand: "查看子項目",
|
||
treeDataCollapse: "隱藏子項目",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "群組",
|
||
groupColumn: (name) => `以 ${name} 分組`,
|
||
unGroupColumn: (name) => `取消以 ${name} 分組`,
|
||
// Master/detail
|
||
detailPanelToggle: "切換顯示詳細資訊",
|
||
expandDetailPanel: "展開",
|
||
collapseDetailPanel: "摺疊",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "排序",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "集合",
|
||
aggregationFunctionLabelSum: "總數",
|
||
aggregationFunctionLabelAvg: "平均數",
|
||
aggregationFunctionLabelMin: "最小",
|
||
aggregationFunctionLabelMax: "最大",
|
||
aggregationFunctionLabelSize: "尺寸"
|
||
};
|
||
var zhTW2 = getGridLocalization(zhTWGrid, zhTW);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/hrHR.js
|
||
var hrHRGrid = {
|
||
// Root
|
||
noRowsLabel: "Nema redova",
|
||
noResultsOverlayLabel: "Nema rezultata.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Gustoća",
|
||
toolbarDensityLabel: "Gustoća",
|
||
toolbarDensityCompact: "Kompaktan",
|
||
toolbarDensityStandard: "Standard",
|
||
toolbarDensityComfortable: "Udobno",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Stupci",
|
||
toolbarColumnsLabel: "Odaberite stupce",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filteri",
|
||
toolbarFiltersLabel: "Prikaži filtre",
|
||
toolbarFiltersTooltipHide: "Sakrij filtre",
|
||
toolbarFiltersTooltipShow: "Prikaži filtre",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} aktivnih filtara` : `${count} aktivni filter`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Traži…",
|
||
toolbarQuickFilterLabel: "traži",
|
||
toolbarQuickFilterDeleteIconLabel: "Čisto",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Izvoz",
|
||
toolbarExportLabel: "Izvoz",
|
||
toolbarExportCSV: "Preuzmi kao CSV",
|
||
toolbarExportPrint: "Ispis",
|
||
toolbarExportExcel: "Preuzmite kao Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Pronađi stupac",
|
||
columnsPanelTextFieldPlaceholder: "Naslov stupca",
|
||
columnsPanelDragIconLabel: "Promijeni redoslijed stupca",
|
||
columnsPanelShowAllButton: "Pokaži sve",
|
||
columnsPanelHideAllButton: "Sakrij sve",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Dodajte filter",
|
||
filterPanelRemoveAll: "Ukloniti sve",
|
||
filterPanelDeleteIconLabel: "Izbrisati",
|
||
filterPanelLogicOperator: "Logički operator",
|
||
filterPanelOperator: "Operater",
|
||
filterPanelOperatorAnd: "I",
|
||
filterPanelOperatorOr: "Ili",
|
||
filterPanelColumns: "Stupci",
|
||
filterPanelInputLabel: "Vrijednost",
|
||
filterPanelInputPlaceholder: "Vrijednost filtra",
|
||
// Filter operators text
|
||
filterOperatorContains: "sadrži",
|
||
filterOperatorEquals: "jednaki",
|
||
filterOperatorStartsWith: "počinje sa",
|
||
filterOperatorEndsWith: "završava sa",
|
||
filterOperatorIs: "je",
|
||
filterOperatorNot: "nije",
|
||
filterOperatorAfter: "je poslije",
|
||
filterOperatorOnOrAfter: "je na ili poslije",
|
||
filterOperatorBefore: "je prije",
|
||
filterOperatorOnOrBefore: "je na ili prije",
|
||
filterOperatorIsEmpty: "prazno je",
|
||
filterOperatorIsNotEmpty: "nije prazna",
|
||
filterOperatorIsAnyOf: "je bilo koji od",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Sadrži",
|
||
headerFilterOperatorEquals: "Jednako",
|
||
headerFilterOperatorStartsWith: "Počinje sa",
|
||
headerFilterOperatorEndsWith: "Završava s",
|
||
headerFilterOperatorIs: "Je",
|
||
headerFilterOperatorNot: "Nije",
|
||
headerFilterOperatorAfter: "Je poslije",
|
||
headerFilterOperatorOnOrAfter: "Je uključeno ili poslije",
|
||
headerFilterOperatorBefore: "Je li prije",
|
||
headerFilterOperatorOnOrBefore: "Uključeno je ili prije",
|
||
headerFilterOperatorIsEmpty: "Prazno je",
|
||
headerFilterOperatorIsNotEmpty: "Nije prazna",
|
||
headerFilterOperatorIsAnyOf: "Je li bilo koji od",
|
||
"headerFilterOperator=": "Jednako",
|
||
"headerFilterOperator!=": "Nije jednako",
|
||
"headerFilterOperator>": "Veći od",
|
||
"headerFilterOperator>=": "Veće ili jednako",
|
||
"headerFilterOperator<": "Manje od",
|
||
"headerFilterOperator<=": "Manje od ili jednako",
|
||
// Filter values text
|
||
filterValueAny: "bilo koji",
|
||
filterValueTrue: "pravi",
|
||
filterValueFalse: "lažno",
|
||
// Column menu text
|
||
columnMenuLabel: "Jelovnik ",
|
||
columnMenuShowColumns: "Prikaži stupce",
|
||
columnMenuManageColumns: "Upravljanje stupcima",
|
||
columnMenuFilter: "filtar",
|
||
columnMenuHideColumn: "Sakrij stupac",
|
||
columnMenuUnsort: "Poništi sortiranje",
|
||
columnMenuSortAsc: "Poredaj uzlazno",
|
||
columnMenuSortDesc: "Poredaj silaznim redom",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} aktivnih filtara` : `${count} aktivni filter`,
|
||
columnHeaderFiltersLabel: "Prikaži filtre",
|
||
columnHeaderSortIconLabel: "Vrsta",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `Odabrano je ${count.toLocaleString()} redaka` : `${count.toLocaleString()} redak odabran`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Ukupno redaka:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} od ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Odabir potvrdnog okvira",
|
||
checkboxSelectionSelectAllRows: "Odaberite sve retke",
|
||
checkboxSelectionUnselectAllRows: "Poništi odabir svih redaka",
|
||
checkboxSelectionSelectRow: "Odaberite red",
|
||
checkboxSelectionUnselectRow: "Poništi odabir retka",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "Da",
|
||
booleanCellFalseLabel: "Ne",
|
||
// Actions cell more text
|
||
actionsCellMore: "više",
|
||
// Column pinning text
|
||
pinToLeft: "Prikvači lijevo",
|
||
pinToRight: "Prikvači desno",
|
||
unpin: "Otkvači",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Group",
|
||
treeDataExpand: "vidjeti djecu",
|
||
treeDataCollapse: "sakriti djecu",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Skupina",
|
||
groupColumn: (name) => `Grupiraj prema ${name}`,
|
||
unGroupColumn: (name) => `Zaustavi grupiranje prema ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Prebacivanje ploče s detaljima",
|
||
expandDetailPanel: "Proširiti",
|
||
collapseDetailPanel: "Kolaps",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Promjena redoslijeda",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Agregacija",
|
||
aggregationFunctionLabelSum: "iznos",
|
||
aggregationFunctionLabelAvg: "prosj",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "max",
|
||
aggregationFunctionLabelSize: "veličina"
|
||
};
|
||
var hrHR2 = getGridLocalization(hrHRGrid, hrHR);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/ptPT.js
|
||
var ptPTGrid = {
|
||
// Root
|
||
noRowsLabel: "Nenhuma linha",
|
||
noResultsOverlayLabel: "Nenhum resultado encontrado.",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "Densidade",
|
||
toolbarDensityLabel: "Densidade",
|
||
toolbarDensityCompact: "Compactar",
|
||
toolbarDensityStandard: "Padrão",
|
||
toolbarDensityComfortable: "Confortável",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "Colunas",
|
||
toolbarColumnsLabel: "Selecione colunas",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "Filtros",
|
||
toolbarFiltersLabel: "Mostrar filtros",
|
||
toolbarFiltersTooltipHide: "Ocultar filtros",
|
||
toolbarFiltersTooltipShow: "Mostrar filtros",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} filtros ativos` : `${count} filtro ativo`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "Procurar…",
|
||
toolbarQuickFilterLabel: "Procurar",
|
||
toolbarQuickFilterDeleteIconLabel: "Claro",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "Exportar",
|
||
toolbarExportLabel: "Exportar",
|
||
toolbarExportCSV: "Baixar como CSV",
|
||
toolbarExportPrint: "Imprimir",
|
||
toolbarExportExcel: "Baixe como Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "Encontrar coluna",
|
||
columnsPanelTextFieldPlaceholder: "Título da coluna",
|
||
columnsPanelDragIconLabel: "Reordenar coluna",
|
||
columnsPanelShowAllButton: "Mostre tudo",
|
||
columnsPanelHideAllButton: "Esconda tudo",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "Adicionar filtro",
|
||
filterPanelRemoveAll: "Deletar tudo",
|
||
filterPanelDeleteIconLabel: "Excluir",
|
||
filterPanelLogicOperator: "Operador lógico",
|
||
filterPanelOperator: "Operador",
|
||
filterPanelOperatorAnd: "E",
|
||
filterPanelOperatorOr: "Ou",
|
||
filterPanelColumns: "Colunas",
|
||
filterPanelInputLabel: "Valor",
|
||
filterPanelInputPlaceholder: "Valor do filtro",
|
||
// Filter operators text
|
||
filterOperatorContains: "contém",
|
||
filterOperatorEquals: "é igual a",
|
||
filterOperatorStartsWith: "começa com",
|
||
filterOperatorEndsWith: "termina com",
|
||
filterOperatorIs: "é",
|
||
filterOperatorNot: "não é",
|
||
filterOperatorAfter: "está depois",
|
||
filterOperatorOnOrAfter: "está ligado ou depois",
|
||
filterOperatorBefore: "é antes",
|
||
filterOperatorOnOrBefore: "está ligado ou antes",
|
||
filterOperatorIsEmpty: "está vazia",
|
||
filterOperatorIsNotEmpty: "não está vazio",
|
||
filterOperatorIsAnyOf: "é qualquer um",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "Contém",
|
||
headerFilterOperatorEquals: "É igual a",
|
||
headerFilterOperatorStartsWith: "Começa com",
|
||
headerFilterOperatorEndsWith: "Termina com",
|
||
headerFilterOperatorIs: "É",
|
||
headerFilterOperatorNot: "Não é",
|
||
headerFilterOperatorAfter: "Está depois",
|
||
headerFilterOperatorOnOrAfter: "Está ligado ou depois",
|
||
headerFilterOperatorBefore: "É antes",
|
||
headerFilterOperatorOnOrBefore: "Está ligado ou antes",
|
||
headerFilterOperatorIsEmpty: "Está vazia",
|
||
headerFilterOperatorIsNotEmpty: "Não está vazio",
|
||
headerFilterOperatorIsAnyOf: "Algum",
|
||
"headerFilterOperator=": "É igual a",
|
||
"headerFilterOperator!=": "Não é igual",
|
||
"headerFilterOperator>": "Maior que",
|
||
"headerFilterOperator>=": "Melhor que ou igual a",
|
||
"headerFilterOperator<": "Menor que",
|
||
"headerFilterOperator<=": "Menos que ou igual a",
|
||
// Filter values text
|
||
filterValueAny: "qualquer",
|
||
filterValueTrue: "verdadeiro",
|
||
filterValueFalse: "falso",
|
||
// Column menu text
|
||
columnMenuLabel: "Cardápio",
|
||
columnMenuShowColumns: "Mostrar colunas",
|
||
columnMenuManageColumns: "Gerenciar colunas",
|
||
columnMenuFilter: "Filtro",
|
||
columnMenuHideColumn: "Ocultar coluna",
|
||
columnMenuUnsort: "Desclassificar",
|
||
columnMenuSortAsc: "Classificar por ordem crescente",
|
||
columnMenuSortDesc: "Classificar por ordem decrescente",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} filtros ativos` : `${count} filtro ativo`,
|
||
columnHeaderFiltersLabel: "Mostrar filtros",
|
||
columnHeaderSortIconLabel: "Organizar",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `${count.toLocaleString()} linhas selecionadas` : `${count.toLocaleString()} linha selecionada`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "Total de linhas:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} de ${totalCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "Seleção de caixa de seleção",
|
||
checkboxSelectionSelectAllRows: "Selecione todas as linhas",
|
||
checkboxSelectionUnselectAllRows: "Desmarque todas as linhas",
|
||
checkboxSelectionSelectRow: "Selecione a linha",
|
||
checkboxSelectionUnselectRow: "Desmarcar linha",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "sim",
|
||
booleanCellFalseLabel: "não",
|
||
// Actions cell more text
|
||
actionsCellMore: "mais",
|
||
// Column pinning text
|
||
pinToLeft: "Fixar à esquerda",
|
||
pinToRight: "Fixar à direita",
|
||
unpin: "Liberar",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Group",
|
||
treeDataExpand: "veja crianças",
|
||
treeDataCollapse: "esconder crianças",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "Grupo",
|
||
groupColumn: (name) => `Agrupar por ${name}`,
|
||
unGroupColumn: (name) => `Pare de agrupar por ${name}`,
|
||
// Master/detail
|
||
detailPanelToggle: "Alternar painel de detalhes",
|
||
expandDetailPanel: "Expandir",
|
||
collapseDetailPanel: "Colapso",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "Reordenação de linhas",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "Agregação",
|
||
aggregationFunctionLabelSum: "soma",
|
||
aggregationFunctionLabelAvg: "média",
|
||
aggregationFunctionLabelMin: "min",
|
||
aggregationFunctionLabelMax: "máx.",
|
||
aggregationFunctionLabelSize: "tamanho"
|
||
};
|
||
var ptPT2 = getGridLocalization(ptPTGrid, ptPT);
|
||
|
||
// node_modules/@mui/x-data-grid/locales/zhHK.js
|
||
var zhHKGrid = {
|
||
// Root
|
||
noRowsLabel: "沒有行",
|
||
noResultsOverlayLabel: "未找到結果。",
|
||
// Density selector toolbar button text
|
||
toolbarDensity: "密度",
|
||
toolbarDensityLabel: "密度",
|
||
toolbarDensityCompact: "袖珍的",
|
||
toolbarDensityStandard: "標準",
|
||
toolbarDensityComfortable: "舒服的",
|
||
// Columns selector toolbar button text
|
||
toolbarColumns: "列",
|
||
toolbarColumnsLabel: "選擇列",
|
||
// Filters toolbar button text
|
||
toolbarFilters: "過濾器",
|
||
toolbarFiltersLabel: "顯示過濾器",
|
||
toolbarFiltersTooltipHide: "隱藏過濾器",
|
||
toolbarFiltersTooltipShow: "顯示過濾器",
|
||
toolbarFiltersTooltipActive: (count) => count !== 1 ? `${count} 個有效過濾器` : `${count} 個活動過濾器`,
|
||
// Quick filter toolbar field
|
||
toolbarQuickFilterPlaceholder: "搜尋…",
|
||
toolbarQuickFilterLabel: "搜尋",
|
||
toolbarQuickFilterDeleteIconLabel: "清除",
|
||
// Export selector toolbar button text
|
||
toolbarExport: "出口",
|
||
toolbarExportLabel: "出口",
|
||
toolbarExportCSV: "下載為 CSV",
|
||
toolbarExportPrint: "列印",
|
||
toolbarExportExcel: "下載為 Excel",
|
||
// Columns panel text
|
||
columnsPanelTextFieldLabel: "查找欄目",
|
||
columnsPanelTextFieldPlaceholder: "欄目標題",
|
||
columnsPanelDragIconLabel: "重新排序列",
|
||
columnsPanelShowAllButton: "顯示所有",
|
||
columnsPanelHideAllButton: "全部藏起來",
|
||
// Filter panel text
|
||
filterPanelAddFilter: "新增過濾器",
|
||
filterPanelRemoveAll: "移除所有",
|
||
filterPanelDeleteIconLabel: "刪除",
|
||
filterPanelLogicOperator: "邏輯運算符",
|
||
filterPanelOperator: "操作員",
|
||
filterPanelOperatorAnd: "和",
|
||
filterPanelOperatorOr: "或者",
|
||
filterPanelColumns: "列",
|
||
filterPanelInputLabel: "價值",
|
||
filterPanelInputPlaceholder: "過濾值",
|
||
// Filter operators text
|
||
filterOperatorContains: "包含",
|
||
filterOperatorEquals: "等於",
|
||
filterOperatorStartsWith: "以。。開始",
|
||
filterOperatorEndsWith: "以。。結束",
|
||
filterOperatorIs: "是",
|
||
filterOperatorNot: "不是",
|
||
filterOperatorAfter: "是在之後",
|
||
filterOperatorOnOrAfter: "是在或之後",
|
||
filterOperatorBefore: "是在之前",
|
||
filterOperatorOnOrBefore: "是在或之前",
|
||
filterOperatorIsEmpty: "是空的",
|
||
filterOperatorIsNotEmpty: "不為空",
|
||
filterOperatorIsAnyOf: "是以下任一個",
|
||
"filterOperator=": "=",
|
||
"filterOperator!=": "!=",
|
||
"filterOperator>": ">",
|
||
"filterOperator>=": ">=",
|
||
"filterOperator<": "<",
|
||
"filterOperator<=": "<=",
|
||
// Header filter operators text
|
||
headerFilterOperatorContains: "包含",
|
||
headerFilterOperatorEquals: "等於",
|
||
headerFilterOperatorStartsWith: "以。。開始",
|
||
headerFilterOperatorEndsWith: "以。。結束",
|
||
headerFilterOperatorIs: "是",
|
||
headerFilterOperatorNot: "不是",
|
||
headerFilterOperatorAfter: "是在之後",
|
||
headerFilterOperatorOnOrAfter: "是在或之後",
|
||
headerFilterOperatorBefore: "是之前",
|
||
headerFilterOperatorOnOrBefore: "是在或之前",
|
||
headerFilterOperatorIsEmpty: "是空的",
|
||
headerFilterOperatorIsNotEmpty: "不為空",
|
||
headerFilterOperatorIsAnyOf: "是以下任一個",
|
||
"headerFilterOperator=": "等於",
|
||
"headerFilterOperator!=": "不等於",
|
||
"headerFilterOperator>": "比...更棒",
|
||
"headerFilterOperator>=": "大於或等於",
|
||
"headerFilterOperator<": "少於",
|
||
"headerFilterOperator<=": "小於或等於",
|
||
// Filter values text
|
||
filterValueAny: "任何",
|
||
filterValueTrue: "真的",
|
||
filterValueFalse: "錯誤的",
|
||
// Column menu text
|
||
columnMenuLabel: "選單",
|
||
columnMenuShowColumns: "顯示欄目",
|
||
columnMenuManageColumns: "管理欄目",
|
||
columnMenuFilter: "篩選",
|
||
columnMenuHideColumn: "隱藏列",
|
||
columnMenuUnsort: "取消排序",
|
||
columnMenuSortAsc: "按升序排序",
|
||
columnMenuSortDesc: "按降序排序",
|
||
// Column header text
|
||
columnHeaderFiltersTooltipActive: (count) => count !== 1 ? `${count} 個有效過濾器` : `${count} 個活動過濾器`,
|
||
columnHeaderFiltersLabel: "顯示過濾器",
|
||
columnHeaderSortIconLabel: "種類",
|
||
// Rows selected footer text
|
||
footerRowSelected: (count) => count !== 1 ? `已選擇 ${count.toLocaleString()} 行` : `已選擇 ${count.toLocaleString()} 行`,
|
||
// Total row amount footer text
|
||
footerTotalRows: "總行數:",
|
||
// Total visible row amount footer text
|
||
footerTotalVisibleRows: (visibleCount, totalCount) => `${totalCount.toLocaleString()} 的 ${visibleCount.toLocaleString()}`,
|
||
// Checkbox selection text
|
||
checkboxSelectionHeaderName: "複選框選擇",
|
||
checkboxSelectionSelectAllRows: "選擇所有行",
|
||
checkboxSelectionUnselectAllRows: "取消選擇所有行",
|
||
checkboxSelectionSelectRow: "選擇行",
|
||
checkboxSelectionUnselectRow: "取消選擇行",
|
||
// Boolean cell text
|
||
booleanCellTrueLabel: "是的",
|
||
booleanCellFalseLabel: "不",
|
||
// Actions cell more text
|
||
actionsCellMore: "更多的",
|
||
// Column pinning text
|
||
pinToLeft: "固定到左側",
|
||
pinToRight: "固定到右側",
|
||
unpin: "取消固定",
|
||
// Tree Data
|
||
treeDataGroupingHeaderName: "Group",
|
||
treeDataExpand: "看看孩子們",
|
||
treeDataCollapse: "隱藏孩子",
|
||
// Grouping columns
|
||
groupingColumnHeaderName: "團體",
|
||
groupColumn: (name) => `按 ${name} 分組`,
|
||
unGroupColumn: (name) => `停止以 ${name} 分組`,
|
||
// Master/detail
|
||
detailPanelToggle: "詳細資訊面板切換",
|
||
expandDetailPanel: "擴張",
|
||
collapseDetailPanel: "坍塌",
|
||
// Row reordering text
|
||
rowReorderingHeaderName: "行重新排序",
|
||
// Aggregation
|
||
aggregationMenuItemHeader: "聚合",
|
||
aggregationFunctionLabelSum: "和",
|
||
aggregationFunctionLabelAvg: "平均",
|
||
aggregationFunctionLabelMin: "分分鐘",
|
||
aggregationFunctionLabelMax: "最大限度",
|
||
aggregationFunctionLabelSize: "尺寸"
|
||
};
|
||
var zhHK2 = getGridLocalization(zhHKGrid, zhHK);
|
||
export {
|
||
DATA_GRID_PROPS_DEFAULT_VALUES,
|
||
DEFAULT_GRID_COL_TYPE_KEY,
|
||
DataGrid2 as DataGrid,
|
||
GRID_ACTIONS_COLUMN_TYPE,
|
||
GRID_ACTIONS_COL_DEF,
|
||
GRID_BOOLEAN_COL_DEF,
|
||
GRID_CHECKBOX_SELECTION_COL_DEF,
|
||
GRID_CHECKBOX_SELECTION_FIELD,
|
||
GRID_COLUMN_MENU_SLOTS,
|
||
GRID_COLUMN_MENU_SLOT_PROPS,
|
||
GRID_DATETIME_COL_DEF,
|
||
GRID_DATE_COL_DEF,
|
||
GRID_DEFAULT_LOCALE_TEXT,
|
||
GRID_EXPERIMENTAL_ENABLED,
|
||
GRID_NUMERIC_COL_DEF,
|
||
GRID_ROOT_GROUP_ID,
|
||
GRID_SINGLE_SELECT_COL_DEF,
|
||
GRID_STRING_COL_DEF,
|
||
GridActionsCell,
|
||
GridActionsCellItem,
|
||
GridAddIcon,
|
||
GridApiContext,
|
||
GridArrowDownwardIcon,
|
||
GridArrowUpwardIcon,
|
||
GridBody,
|
||
GridBooleanCell,
|
||
GridCell,
|
||
GridCellCheckboxForwardRef,
|
||
GridCellCheckboxRenderer2 as GridCellCheckboxRenderer,
|
||
GridCellEditStartReasons,
|
||
GridCellEditStopReasons,
|
||
GridCellModes,
|
||
GridCheckCircleIcon,
|
||
GridCheckIcon,
|
||
GridClearIcon,
|
||
GridCloseIcon,
|
||
GridColumnHeaderFilterIconButton,
|
||
GridColumnHeaderItem,
|
||
GridColumnHeaderMenu,
|
||
GridColumnHeaderSeparator,
|
||
GridColumnHeaderSeparatorSides,
|
||
GridColumnHeaderSortIcon,
|
||
GridColumnHeaderTitle,
|
||
MemoizedGridColumnHeaders as GridColumnHeaders,
|
||
GridColumnIcon,
|
||
GridColumnMenu,
|
||
GridColumnMenuColumnsItem,
|
||
GridColumnMenuContainer,
|
||
GridColumnMenuFilterItem,
|
||
GridColumnMenuHideItem,
|
||
GridColumnMenuManageItem,
|
||
GridColumnMenuSortItem,
|
||
GridColumnsPanel,
|
||
GridContextProvider,
|
||
GridCsvExportMenuItem,
|
||
GridDeleteForeverIcon,
|
||
GridDeleteIcon,
|
||
GridDragIcon,
|
||
GridEditBooleanCell,
|
||
GridEditDateCell,
|
||
GridEditInputCell,
|
||
GridEditModes,
|
||
GridEditSingleSelectCell,
|
||
GridExpandMoreIcon,
|
||
GridFilterAltIcon,
|
||
GridFilterForm,
|
||
GridFilterInputBoolean,
|
||
GridFilterInputDate,
|
||
GridFilterInputMultipleSingleSelect,
|
||
GridFilterInputMultipleValue,
|
||
GridFilterInputSingleSelect,
|
||
GridFilterInputValue,
|
||
GridFilterListIcon,
|
||
GridFilterPanel,
|
||
GridFooter,
|
||
GridFooterContainer,
|
||
GridFooterPlaceholder,
|
||
GridGenericColumnMenu,
|
||
GridHeader,
|
||
GridHeaderCheckbox,
|
||
GridKeyboardArrowRight,
|
||
GridLoadIcon,
|
||
GridLoadingOverlay,
|
||
GridLogicOperator,
|
||
GridMenu,
|
||
GridMenuIcon,
|
||
GridMoreVertIcon,
|
||
GridNoRowsOverlay,
|
||
GridOverlay,
|
||
GridOverlays,
|
||
GridPagination,
|
||
GridPanel,
|
||
GridPanelContent,
|
||
GridPanelFooter,
|
||
GridPanelHeader,
|
||
GridPanelWrapper,
|
||
GridPreferencePanelsValue,
|
||
GridPreferencesPanel,
|
||
GridPrintExportMenuItem,
|
||
GridRemoveIcon,
|
||
GridRoot,
|
||
MemoizedGridRow as GridRow,
|
||
GridRowCount,
|
||
GridRowEditStartReasons,
|
||
GridRowEditStopReasons,
|
||
GridRowModes,
|
||
GridSaveAltIcon,
|
||
GridSearchIcon,
|
||
GridSelectedRowCount,
|
||
GridSeparatorIcon,
|
||
GridSignature,
|
||
GridSkeletonCell,
|
||
GridTableRowsIcon,
|
||
GridToolbar,
|
||
GridToolbarColumnsButton,
|
||
GridToolbarContainer,
|
||
GridToolbarDensitySelector,
|
||
GridToolbarExport,
|
||
GridToolbarExportContainer,
|
||
GridToolbarFilterButton,
|
||
GridToolbarQuickFilter,
|
||
GridTripleDotsVerticalIcon,
|
||
GridViewColumnIcon,
|
||
GridViewHeadlineIcon,
|
||
GridViewStreamIcon,
|
||
GridVisibilityOffIcon,
|
||
SUBMIT_FILTER_DATE_STROKE_TIME,
|
||
SUBMIT_FILTER_STROKE_TIME,
|
||
arSD2 as arSD,
|
||
beBY,
|
||
bgBG2 as bgBG,
|
||
checkGridRowIdIsValid,
|
||
createUseGridApiEventHandler,
|
||
csCZ2 as csCZ,
|
||
daDK2 as daDK,
|
||
deDE2 as deDE,
|
||
elGR2 as elGR,
|
||
enUS2 as enUS,
|
||
esES2 as esES,
|
||
faIR2 as faIR,
|
||
fiFI2 as fiFI,
|
||
frFR2 as frFR,
|
||
getDataGridUtilityClass,
|
||
getDefaultGridFilterModel,
|
||
getGridBooleanOperators,
|
||
getGridDateOperators,
|
||
getGridDefaultColumnTypes,
|
||
getGridNumericOperators,
|
||
getGridNumericQuickFilterFn,
|
||
getGridSingleSelectOperators,
|
||
getGridStringOperators,
|
||
getGridStringQuickFilterFn,
|
||
gridClasses,
|
||
gridColumnDefinitionsSelector,
|
||
gridColumnFieldsSelector,
|
||
gridColumnGroupingSelector,
|
||
gridColumnGroupsHeaderMaxDepthSelector,
|
||
gridColumnGroupsHeaderStructureSelector,
|
||
gridColumnGroupsLookupSelector,
|
||
gridColumnGroupsUnwrappedModelSelector,
|
||
gridColumnLookupSelector,
|
||
gridColumnMenuSelector,
|
||
gridColumnPositionsSelector,
|
||
gridColumnVisibilityModelSelector,
|
||
gridColumnsTotalWidthSelector,
|
||
gridDataRowIdsSelector,
|
||
gridDateComparator,
|
||
gridDateFormatter,
|
||
gridDateTimeFormatter,
|
||
gridDensityFactorSelector,
|
||
gridDensitySelector,
|
||
gridDensityValueSelector,
|
||
gridExpandedRowCountSelector,
|
||
gridExpandedSortedRowEntriesSelector,
|
||
gridExpandedSortedRowIdsSelector,
|
||
gridFilterActiveItemsLookupSelector,
|
||
gridFilterActiveItemsSelector,
|
||
gridFilterModelSelector,
|
||
gridFilterableColumnDefinitionsSelector,
|
||
gridFilterableColumnLookupSelector,
|
||
gridFilteredDescendantCountLookupSelector,
|
||
gridFilteredRowsLookupSelector,
|
||
gridFilteredSortedRowEntriesSelector,
|
||
gridFilteredSortedRowIdsSelector,
|
||
gridFilteredSortedTopLevelRowEntriesSelector,
|
||
gridFilteredTopLevelRowCountSelector,
|
||
gridFocusCellSelector,
|
||
gridFocusColumnHeaderSelector,
|
||
gridFocusStateSelector,
|
||
gridNumberComparator,
|
||
gridPageCountSelector,
|
||
gridPageSelector,
|
||
gridPageSizeSelector,
|
||
gridPaginatedVisibleSortedGridRowEntriesSelector,
|
||
gridPaginatedVisibleSortedGridRowIdsSelector,
|
||
gridPaginationModelSelector,
|
||
gridPaginationRowCountSelector,
|
||
gridPaginationRowRangeSelector,
|
||
gridPaginationSelector,
|
||
gridPanelClasses,
|
||
gridPreferencePanelStateSelector,
|
||
gridQuickFilterValuesSelector,
|
||
gridRowCountSelector,
|
||
gridRowGroupingNameSelector,
|
||
gridRowMaximumTreeDepthSelector,
|
||
gridRowSelectionStateSelector,
|
||
gridRowTreeDepthsSelector,
|
||
gridRowTreeSelector,
|
||
gridRowsDataRowIdToIdLookupSelector,
|
||
gridRowsLoadingSelector,
|
||
gridRowsLookupSelector,
|
||
gridRowsMetaSelector,
|
||
gridSortColumnLookupSelector,
|
||
gridSortModelSelector,
|
||
gridSortedRowEntriesSelector,
|
||
gridSortedRowIdsSelector,
|
||
gridStringOrNumberComparator,
|
||
gridTabIndexCellSelector,
|
||
gridTabIndexColumnHeaderSelector,
|
||
gridTabIndexStateSelector,
|
||
gridTopLevelRowCountSelector,
|
||
gridVirtualizationColumnEnabledSelector,
|
||
gridVirtualizationEnabledSelector,
|
||
gridVirtualizationSelector,
|
||
gridVisibleColumnDefinitionsSelector,
|
||
gridVisibleColumnFieldsSelector,
|
||
gridVisibleRowsLookupSelector,
|
||
heIL2 as heIL,
|
||
hrHR2 as hrHR,
|
||
huHU2 as huHU,
|
||
isLeaf,
|
||
itIT2 as itIT,
|
||
jaJP2 as jaJP,
|
||
koKR2 as koKR,
|
||
nbNO2 as nbNO,
|
||
nlNL2 as nlNL,
|
||
plPL2 as plPL,
|
||
ptBR2 as ptBR,
|
||
ptPT2 as ptPT,
|
||
renderActionsCell,
|
||
renderBooleanCell,
|
||
renderEditBooleanCell,
|
||
renderEditDateCell,
|
||
renderEditInputCell,
|
||
renderEditSingleSelectCell,
|
||
roRO2 as roRO,
|
||
ruRU2 as ruRU,
|
||
selectedGridRowsCountSelector,
|
||
selectedGridRowsSelector,
|
||
selectedIdsLookupSelector,
|
||
skSK2 as skSK,
|
||
svSE2 as svSE,
|
||
trTR2 as trTR,
|
||
ukUA2 as ukUA,
|
||
unstable_gridFocusColumnGroupHeaderSelector,
|
||
unstable_gridFocusColumnHeaderFilterSelector,
|
||
unstable_gridHeaderFilteringEditFieldSelector,
|
||
unstable_gridHeaderFilteringMenuSelector,
|
||
unstable_gridHeaderFilteringStateSelector,
|
||
unstable_gridTabIndexColumnGroupHeaderSelector,
|
||
unstable_gridTabIndexColumnHeaderFilterSelector,
|
||
unstable_resetCleanupTracking,
|
||
urPK,
|
||
useFirstRender,
|
||
useGridApiContext,
|
||
useGridApiEventHandler,
|
||
useGridApiMethod,
|
||
useGridApiOptionHandler,
|
||
useGridApiRef,
|
||
useGridLogger,
|
||
useGridNativeEventListener,
|
||
useGridRootProps,
|
||
useGridSelector,
|
||
useGridVirtualization,
|
||
viVN2 as viVN,
|
||
virtualizationStateInitializer,
|
||
zhCN2 as zhCN,
|
||
zhHK2 as zhHK,
|
||
zhTW2 as zhTW
|
||
};
|
||
/*! Bundled license information:
|
||
|
||
@mui/x-data-grid/index.js:
|
||
(**
|
||
* @mui/x-data-grid v6.20.4
|
||
*
|
||
* @license MIT
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*)
|
||
*/
|
||
//# sourceMappingURL=@mui_x-data-grid.js.map
|