neue Homepage auf react basis

This commit is contained in:
2026-08-07 21:39:30 +02:00
parent 164bdd19ad
commit ee89442c04
52191 changed files with 1230242 additions and 58 deletions
@@ -0,0 +1,2 @@
import type { PinnedColumnPosition } from "../constants.mjs";
export declare function attachPinnedStyle(style: React.CSSProperties, isRtl: boolean, pinnedPosition: PinnedColumnPosition | undefined, pinnedOffset?: number): import("react").CSSProperties;
@@ -0,0 +1,2 @@
import type { PinnedColumnPosition } from "../constants.js";
export declare function attachPinnedStyle(style: React.CSSProperties, isRtl: boolean, pinnedPosition: PinnedColumnPosition | undefined, pinnedOffset?: number): import("react").CSSProperties;
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.attachPinnedStyle = attachPinnedStyle;
var _rtlFlipSide = require("../../utils/rtlFlipSide");
function attachPinnedStyle(style, isRtl, pinnedPosition, pinnedOffset) {
const side = (0, _rtlFlipSide.rtlFlipSide)(pinnedPosition, isRtl);
if (!side || pinnedOffset === undefined) {
return style;
}
style[side] = pinnedOffset;
return style;
}
@@ -0,0 +1,9 @@
import { rtlFlipSide } from "../../utils/rtlFlipSide.mjs";
export function attachPinnedStyle(style, isRtl, pinnedPosition, pinnedOffset) {
const side = rtlFlipSide(pinnedPosition, isRtl);
if (!side || pinnedOffset === undefined) {
return style;
}
style[side] = pinnedOffset;
return style;
}
+9
View File
@@ -0,0 +1,9 @@
import type { GridGetRowsParams, GridGetRowsResponse } from "../../models/gridDataSource.mjs";
export declare class TestCache {
private cache;
constructor();
set(key: GridGetRowsParams, value: GridGetRowsResponse): void;
get(key: GridGetRowsParams): GridGetRowsResponse | undefined;
size(): number;
clear(): void;
}
+9
View File
@@ -0,0 +1,9 @@
import type { GridGetRowsParams, GridGetRowsResponse } from "../../models/gridDataSource.js";
export declare class TestCache {
private cache;
constructor();
set(key: GridGetRowsParams, value: GridGetRowsResponse): void;
get(key: GridGetRowsParams): GridGetRowsResponse | undefined;
size(): number;
clear(): void;
}
+25
View File
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TestCache = void 0;
var _cache = require("../../hooks/features/dataSource/cache");
class TestCache {
constructor() {
this.cache = new Map();
}
set(key, value) {
this.cache.set((0, _cache.getKeyDefault)(key), value);
}
get(key) {
return this.cache.get((0, _cache.getKeyDefault)(key));
}
size() {
return this.cache.size;
}
clear() {
this.cache.clear();
}
}
exports.TestCache = TestCache;
+18
View File
@@ -0,0 +1,18 @@
import { getKeyDefault } from "../../hooks/features/dataSource/cache.mjs";
export class TestCache {
constructor() {
this.cache = new Map();
}
set(key, value) {
this.cache.set(getKeyDefault(key), value);
}
get(key) {
return this.cache.get(getKeyDefault(key));
}
size() {
return this.cache.size;
}
clear() {
this.cache.clear();
}
}
@@ -0,0 +1,7 @@
export declare function computeSlots<SlotComponents extends object>({
defaultSlots,
slots
}: {
defaultSlots: SlotComponents;
slots?: Partial<SlotComponents>;
}): SlotComponents;
@@ -0,0 +1,7 @@
export declare function computeSlots<SlotComponents extends object>({
defaultSlots,
slots
}: {
defaultSlots: SlotComponents;
slots?: Partial<SlotComponents>;
}): SlotComponents;
+25
View File
@@ -0,0 +1,25 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.computeSlots = computeSlots;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
function computeSlots({
defaultSlots,
slots
}) {
const overrides = slots;
if (!overrides || Object.keys(overrides).length === 0) {
return defaultSlots;
}
const result = (0, _extends2.default)({}, defaultSlots);
Object.keys(overrides).forEach(key => {
const k = key;
if (overrides[k] !== undefined) {
result[k] = overrides[k];
}
});
return result;
}
+18
View File
@@ -0,0 +1,18 @@
import _extends from "@babel/runtime/helpers/esm/extends";
export function computeSlots({
defaultSlots,
slots
}) {
const overrides = slots;
if (!overrides || Object.keys(overrides).length === 0) {
return defaultSlots;
}
const result = _extends({}, defaultSlots);
Object.keys(overrides).forEach(key => {
const k = key;
if (overrides[k] !== undefined) {
result[k] = overrides[k];
}
});
return result;
}
@@ -0,0 +1,3 @@
import { PinnedColumnPosition } from "../constants.mjs";
import type { gridColumnPositionsSelector } from "../../hooks/features/columns/index.mjs";
export declare const getPinnedCellOffset: (pinnedPosition: PinnedColumnPosition | undefined, computedWidth: number, columnIndex: number, columnPositions: ReturnType<typeof gridColumnPositionsSelector>, columnsTotalWidth: number, scrollbarWidth: number) => number | undefined;
@@ -0,0 +1,3 @@
import { PinnedColumnPosition } from "../constants.js";
import type { gridColumnPositionsSelector } from "../../hooks/features/columns/index.js";
export declare const getPinnedCellOffset: (pinnedPosition: PinnedColumnPosition | undefined, computedWidth: number, columnIndex: number, columnPositions: ReturnType<typeof gridColumnPositionsSelector>, columnsTotalWidth: number, scrollbarWidth: number) => number | undefined;
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getPinnedCellOffset = void 0;
var _constants = require("../constants");
const getPinnedCellOffset = (pinnedPosition, computedWidth, columnIndex, columnPositions, columnsTotalWidth, scrollbarWidth) => {
let pinnedOffset;
switch (pinnedPosition) {
case _constants.PinnedColumnPosition.LEFT:
pinnedOffset = columnPositions[columnIndex];
break;
case _constants.PinnedColumnPosition.RIGHT:
pinnedOffset = columnsTotalWidth - columnPositions[columnIndex] - computedWidth + scrollbarWidth;
break;
default:
pinnedOffset = undefined;
break;
}
// XXX: fix this properly
if (Number.isNaN(pinnedOffset)) {
pinnedOffset = undefined;
}
return pinnedOffset;
};
exports.getPinnedCellOffset = getPinnedCellOffset;
@@ -0,0 +1,21 @@
import { PinnedColumnPosition } from "../constants.mjs";
export const getPinnedCellOffset = (pinnedPosition, computedWidth, columnIndex, columnPositions, columnsTotalWidth, scrollbarWidth) => {
let pinnedOffset;
switch (pinnedPosition) {
case PinnedColumnPosition.LEFT:
pinnedOffset = columnPositions[columnIndex];
break;
case PinnedColumnPosition.RIGHT:
pinnedOffset = columnsTotalWidth - columnPositions[columnIndex] - computedWidth + scrollbarWidth;
break;
default:
pinnedOffset = undefined;
break;
}
// XXX: fix this properly
if (Number.isNaN(pinnedOffset)) {
pinnedOffset = undefined;
}
return pinnedOffset;
};
@@ -0,0 +1,2 @@
export declare const getRowGroupingCriteriaFromGroupingField: (groupingColDefField: string) => string | null;
export declare const isGroupingColumn: (field: string) => boolean;
@@ -0,0 +1,2 @@
export declare const getRowGroupingCriteriaFromGroupingField: (groupingColDefField: string) => string | null;
export declare const isGroupingColumn: (field: string) => boolean;
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isGroupingColumn = exports.getRowGroupingCriteriaFromGroupingField = void 0;
var _constants = require("../constants");
const getRowGroupingCriteriaFromGroupingField = groupingColDefField => {
const match = groupingColDefField.match(/^__row_group_by_columns_group_(.*)__$/);
if (!match) {
return null;
}
return match[1];
};
exports.getRowGroupingCriteriaFromGroupingField = getRowGroupingCriteriaFromGroupingField;
const isGroupingColumn = field => field === _constants.GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD || getRowGroupingCriteriaFromGroupingField(field) !== null;
exports.isGroupingColumn = isGroupingColumn;
@@ -0,0 +1,9 @@
import { GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD } from "../constants.mjs";
export const getRowGroupingCriteriaFromGroupingField = groupingColDefField => {
const match = groupingColDefField.match(/^__row_group_by_columns_group_(.*)__$/);
if (!match) {
return null;
}
return match[1];
};
export const isGroupingColumn = field => field === GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD || getRowGroupingCriteriaFromGroupingField(field) !== null;
+5
View File
@@ -0,0 +1,5 @@
export * from "./computeSlots.mjs";
export * from "./propValidation.mjs";
export * from "./gridRowGroupingUtils.mjs";
export * from "./attachPinnedStyle.mjs";
export * from "./cache.mjs";
+5
View File
@@ -0,0 +1,5 @@
export * from "./computeSlots.js";
export * from "./propValidation.js";
export * from "./gridRowGroupingUtils.js";
export * from "./attachPinnedStyle.js";
export * from "./cache.js";
+60
View File
@@ -0,0 +1,60 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _computeSlots = require("./computeSlots");
Object.keys(_computeSlots).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _computeSlots[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _computeSlots[key];
}
});
});
var _propValidation = require("./propValidation");
Object.keys(_propValidation).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _propValidation[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _propValidation[key];
}
});
});
var _gridRowGroupingUtils = require("./gridRowGroupingUtils");
Object.keys(_gridRowGroupingUtils).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _gridRowGroupingUtils[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _gridRowGroupingUtils[key];
}
});
});
var _attachPinnedStyle = require("./attachPinnedStyle");
Object.keys(_attachPinnedStyle).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _attachPinnedStyle[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _attachPinnedStyle[key];
}
});
});
var _cache = require("./cache");
Object.keys(_cache).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _cache[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _cache[key];
}
});
});
+5
View File
@@ -0,0 +1,5 @@
export * from "./computeSlots.mjs";
export * from "./propValidation.mjs";
export * from "./gridRowGroupingUtils.mjs";
export * from "./attachPinnedStyle.mjs";
export * from "./cache.mjs";
@@ -0,0 +1,4 @@
import type { DataGridProcessedProps } from "../../models/props/DataGridProps.mjs";
export type PropValidator<TProps> = (props: TProps) => string | undefined;
export declare const propValidatorsDataGrid: PropValidator<DataGridProcessedProps>[];
export declare function validateProps<TProps>(props: TProps, validators: PropValidator<TProps>[]): void;
@@ -0,0 +1,4 @@
import type { DataGridProcessedProps } from "../../models/props/DataGridProps.js";
export type PropValidator<TProps> = (props: TProps) => string | undefined;
export declare const propValidatorsDataGrid: PropValidator<DataGridProcessedProps>[];
export declare function validateProps<TProps>(props: TProps, validators: PropValidator<TProps>[]): void;
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.propValidatorsDataGrid = void 0;
exports.validateProps = validateProps;
var _warning = require("@mui/x-internals/warning");
var _utils = require("../../utils/utils");
var _signature = require("../../constants/signature");
const propValidatorsDataGrid = exports.propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === _signature.GridSignature.DataGrid && props.paginationMode === 'client' && (0, _utils.isNumber)(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
function validateProps(props, validators) {
if (process.env.NODE_ENV === 'production') {
return;
}
validators.forEach(validator => {
const message = validator(props);
if (message) {
(0, _warning.warnOnce)(message, 'error');
}
});
}
@@ -0,0 +1,15 @@
import { warnOnce } from '@mui/x-internals/warning';
import { isNumber } from "../../utils/utils.mjs";
import { GridSignature } from "../../constants/signature.mjs";
export const propValidatorsDataGrid = [props => props.autoPageSize && props.autoHeight && ['MUI X: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You cannot use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n') || undefined, props => props.paginationMode === 'client' && props.paginationMeta != null && ['MUI X: Usage of the `paginationMeta` prop with client-side pagination (`paginationMode="client"`) has no effect.', '`paginationMeta` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.signature === GridSignature.DataGrid && props.paginationMode === 'client' && isNumber(props.rowCount) && ['MUI X: Usage of the `rowCount` prop with client side pagination (`paginationMode="client"`) has no effect.', '`rowCount` is only meant to be used with `paginationMode="server"`.'].join('\n') || undefined, props => props.paginationMode === 'server' && props.rowCount == null && !props.dataSource && !props.paginationMeta && ["MUI X: The `rowCount` prop must be passed using `paginationMode='server'`", 'For more detail, see http://mui.com/components/data-grid/pagination/#index-based-pagination'].join('\n') || undefined];
export function validateProps(props, validators) {
if (process.env.NODE_ENV === 'production') {
return;
}
validators.forEach(validator => {
const message = validator(props);
if (message) {
warnOnce(message, 'error');
}
});
}