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
+273
View File
@@ -0,0 +1,273 @@
declare const keys: {
readonly spacingUnit: '--DataGrid-t-spacing-unit';
readonly colors: {
readonly border: {
readonly base: '--DataGrid-t-color-border-base';
};
readonly foreground: {
readonly base: '--DataGrid-t-color-foreground-base';
readonly muted: '--DataGrid-t-color-foreground-muted';
readonly accent: '--DataGrid-t-color-foreground-accent';
readonly disabled: '--DataGrid-t-color-foreground-disabled';
readonly error: '--DataGrid-t-color-foreground-error';
};
readonly background: {
readonly base: '--DataGrid-t-color-background-base';
readonly overlay: '--DataGrid-t-color-background-overlay';
readonly backdrop: '--DataGrid-t-color-background-backdrop';
};
readonly interactive: {
readonly hover: '--DataGrid-t-color-interactive-hover';
readonly hoverOpacity: '--DataGrid-t-color-interactive-hover-opacity';
readonly focus: '--DataGrid-t-color-interactive-focus';
readonly focusOpacity: '--DataGrid-t-color-interactive-focus-opacity';
readonly disabled: '--DataGrid-t-color-interactive-disabled';
readonly disabledOpacity: '--DataGrid-t-color-interactive-disabled-opacity';
readonly selected: '--DataGrid-t-color-interactive-selected';
readonly selectedOpacity: '--DataGrid-t-color-interactive-selected-opacity';
};
};
readonly header: {
readonly background: {
readonly base: '--DataGrid-t-header-background-base';
};
};
readonly cell: {
readonly background: {
readonly pinned: '--DataGrid-t-cell-background-pinned';
};
};
readonly radius: {
readonly base: '--DataGrid-t-radius-base';
};
readonly typography: {
readonly font: {
readonly body: '--DataGrid-t-typography-font-body';
readonly small: '--DataGrid-t-typography-font-small';
readonly large: '--DataGrid-t-typography-font-large';
};
readonly fontFamily: {
readonly base: '--DataGrid-t-typography-font-family-base';
};
readonly fontWeight: {
readonly light: '--DataGrid-t-typography-font-weight-light';
readonly regular: '--DataGrid-t-typography-font-weight-regular';
readonly medium: '--DataGrid-t-typography-font-weight-medium';
readonly bold: '--DataGrid-t-typography-font-weight-bold';
};
};
readonly transitions: {
readonly easing: {
readonly easeIn: '--DataGrid-t-transition-easing-ease-in';
readonly easeOut: '--DataGrid-t-transition-easing-ease-out';
readonly easeInOut: '--DataGrid-t-transition-easing-ease-in-out';
};
readonly duration: {
readonly short: '--DataGrid-t-transition-duration-short';
readonly base: '--DataGrid-t-transition-duration-base';
readonly long: '--DataGrid-t-transition-duration-long';
};
};
readonly shadows: {
readonly base: '--DataGrid-t-shadow-base';
readonly overlay: '--DataGrid-t-shadow-overlay';
};
readonly zIndex: {
readonly panel: '--DataGrid-t-z-index-panel';
readonly menu: '--DataGrid-t-z-index-menu';
readonly modal: '--DataGrid-t-z-index-modal';
};
};
export type GridCSSVariablesInterface = { [E in CreateObjectEntries<typeof keys> as E['value']]: string | number };
type Entry = {
key: string;
value: unknown;
};
type EmptyEntry<TValue> = {
key: '';
value: TValue;
};
type CreateObjectEntries<TValue, TValueInitial = TValue> = TValue extends object ? { [TKey in keyof TValue]-?: TKey extends string ? OmitItself<TValue[TKey], TValueInitial> extends infer TNestedValue ? TNestedValue extends Entry ? {
key: `${TKey}.${TNestedValue['key']}`;
value: TNestedValue['value'];
} : never : never : never }[keyof TValue] : EmptyEntry<TValue>;
type OmitItself<TValue, TValueInitial> = TValue extends TValueInitial ? EmptyEntry<TValue> : CreateObjectEntries<TValue, TValueInitial>;
export declare const vars: {
spacingUnit: '--DataGrid-t-spacing-unit';
colors: {
readonly border: {
readonly base: '--DataGrid-t-color-border-base';
};
readonly foreground: {
readonly base: '--DataGrid-t-color-foreground-base';
readonly muted: '--DataGrid-t-color-foreground-muted';
readonly accent: '--DataGrid-t-color-foreground-accent';
readonly disabled: '--DataGrid-t-color-foreground-disabled';
readonly error: '--DataGrid-t-color-foreground-error';
};
readonly background: {
readonly base: '--DataGrid-t-color-background-base';
readonly overlay: '--DataGrid-t-color-background-overlay';
readonly backdrop: '--DataGrid-t-color-background-backdrop';
};
readonly interactive: {
readonly hover: '--DataGrid-t-color-interactive-hover';
readonly hoverOpacity: '--DataGrid-t-color-interactive-hover-opacity';
readonly focus: '--DataGrid-t-color-interactive-focus';
readonly focusOpacity: '--DataGrid-t-color-interactive-focus-opacity';
readonly disabled: '--DataGrid-t-color-interactive-disabled';
readonly disabledOpacity: '--DataGrid-t-color-interactive-disabled-opacity';
readonly selected: '--DataGrid-t-color-interactive-selected';
readonly selectedOpacity: '--DataGrid-t-color-interactive-selected-opacity';
};
};
header: {
readonly background: {
readonly base: '--DataGrid-t-header-background-base';
};
};
cell: {
readonly background: {
readonly pinned: '--DataGrid-t-cell-background-pinned';
};
};
radius: {
readonly base: '--DataGrid-t-radius-base';
};
typography: {
readonly font: {
readonly body: '--DataGrid-t-typography-font-body';
readonly small: '--DataGrid-t-typography-font-small';
readonly large: '--DataGrid-t-typography-font-large';
};
readonly fontFamily: {
readonly base: '--DataGrid-t-typography-font-family-base';
};
readonly fontWeight: {
readonly light: '--DataGrid-t-typography-font-weight-light';
readonly regular: '--DataGrid-t-typography-font-weight-regular';
readonly medium: '--DataGrid-t-typography-font-weight-medium';
readonly bold: '--DataGrid-t-typography-font-weight-bold';
};
};
transitions: {
readonly easing: {
readonly easeIn: '--DataGrid-t-transition-easing-ease-in';
readonly easeOut: '--DataGrid-t-transition-easing-ease-out';
readonly easeInOut: '--DataGrid-t-transition-easing-ease-in-out';
};
readonly duration: {
readonly short: '--DataGrid-t-transition-duration-short';
readonly base: '--DataGrid-t-transition-duration-base';
readonly long: '--DataGrid-t-transition-duration-long';
};
};
shadows: {
readonly base: '--DataGrid-t-shadow-base';
readonly overlay: '--DataGrid-t-shadow-overlay';
};
zIndex: {
readonly panel: '--DataGrid-t-z-index-panel';
readonly menu: '--DataGrid-t-z-index-menu';
readonly modal: '--DataGrid-t-z-index-modal';
};
breakpoints: {
values: {
xs: number;
sm: number;
md: number;
lg: number;
xl: number;
};
up: (key: any) => string;
};
spacing: typeof spacing;
transition: typeof transition;
keys: {
readonly spacingUnit: '--DataGrid-t-spacing-unit';
readonly colors: {
readonly border: {
readonly base: '--DataGrid-t-color-border-base';
};
readonly foreground: {
readonly base: '--DataGrid-t-color-foreground-base';
readonly muted: '--DataGrid-t-color-foreground-muted';
readonly accent: '--DataGrid-t-color-foreground-accent';
readonly disabled: '--DataGrid-t-color-foreground-disabled';
readonly error: '--DataGrid-t-color-foreground-error';
};
readonly background: {
readonly base: '--DataGrid-t-color-background-base';
readonly overlay: '--DataGrid-t-color-background-overlay';
readonly backdrop: '--DataGrid-t-color-background-backdrop';
};
readonly interactive: {
readonly hover: '--DataGrid-t-color-interactive-hover';
readonly hoverOpacity: '--DataGrid-t-color-interactive-hover-opacity';
readonly focus: '--DataGrid-t-color-interactive-focus';
readonly focusOpacity: '--DataGrid-t-color-interactive-focus-opacity';
readonly disabled: '--DataGrid-t-color-interactive-disabled';
readonly disabledOpacity: '--DataGrid-t-color-interactive-disabled-opacity';
readonly selected: '--DataGrid-t-color-interactive-selected';
readonly selectedOpacity: '--DataGrid-t-color-interactive-selected-opacity';
};
};
readonly header: {
readonly background: {
readonly base: '--DataGrid-t-header-background-base';
};
};
readonly cell: {
readonly background: {
readonly pinned: '--DataGrid-t-cell-background-pinned';
};
};
readonly radius: {
readonly base: '--DataGrid-t-radius-base';
};
readonly typography: {
readonly font: {
readonly body: '--DataGrid-t-typography-font-body';
readonly small: '--DataGrid-t-typography-font-small';
readonly large: '--DataGrid-t-typography-font-large';
};
readonly fontFamily: {
readonly base: '--DataGrid-t-typography-font-family-base';
};
readonly fontWeight: {
readonly light: '--DataGrid-t-typography-font-weight-light';
readonly regular: '--DataGrid-t-typography-font-weight-regular';
readonly medium: '--DataGrid-t-typography-font-weight-medium';
readonly bold: '--DataGrid-t-typography-font-weight-bold';
};
};
readonly transitions: {
readonly easing: {
readonly easeIn: '--DataGrid-t-transition-easing-ease-in';
readonly easeOut: '--DataGrid-t-transition-easing-ease-out';
readonly easeInOut: '--DataGrid-t-transition-easing-ease-in-out';
};
readonly duration: {
readonly short: '--DataGrid-t-transition-duration-short';
readonly base: '--DataGrid-t-transition-duration-base';
readonly long: '--DataGrid-t-transition-duration-long';
};
};
readonly shadows: {
readonly base: '--DataGrid-t-shadow-base';
readonly overlay: '--DataGrid-t-shadow-overlay';
};
readonly zIndex: {
readonly panel: '--DataGrid-t-z-index-panel';
readonly menu: '--DataGrid-t-z-index-menu';
readonly modal: '--DataGrid-t-z-index-modal';
};
};
};
declare function spacing(a?: number, b?: number, c?: number, d?: number): string;
declare function transition(props: string[], options?: {
duration?: string;
easing?: string;
delay?: number;
}): string;
export {};
+273
View File
@@ -0,0 +1,273 @@
declare const keys: {
readonly spacingUnit: '--DataGrid-t-spacing-unit';
readonly colors: {
readonly border: {
readonly base: '--DataGrid-t-color-border-base';
};
readonly foreground: {
readonly base: '--DataGrid-t-color-foreground-base';
readonly muted: '--DataGrid-t-color-foreground-muted';
readonly accent: '--DataGrid-t-color-foreground-accent';
readonly disabled: '--DataGrid-t-color-foreground-disabled';
readonly error: '--DataGrid-t-color-foreground-error';
};
readonly background: {
readonly base: '--DataGrid-t-color-background-base';
readonly overlay: '--DataGrid-t-color-background-overlay';
readonly backdrop: '--DataGrid-t-color-background-backdrop';
};
readonly interactive: {
readonly hover: '--DataGrid-t-color-interactive-hover';
readonly hoverOpacity: '--DataGrid-t-color-interactive-hover-opacity';
readonly focus: '--DataGrid-t-color-interactive-focus';
readonly focusOpacity: '--DataGrid-t-color-interactive-focus-opacity';
readonly disabled: '--DataGrid-t-color-interactive-disabled';
readonly disabledOpacity: '--DataGrid-t-color-interactive-disabled-opacity';
readonly selected: '--DataGrid-t-color-interactive-selected';
readonly selectedOpacity: '--DataGrid-t-color-interactive-selected-opacity';
};
};
readonly header: {
readonly background: {
readonly base: '--DataGrid-t-header-background-base';
};
};
readonly cell: {
readonly background: {
readonly pinned: '--DataGrid-t-cell-background-pinned';
};
};
readonly radius: {
readonly base: '--DataGrid-t-radius-base';
};
readonly typography: {
readonly font: {
readonly body: '--DataGrid-t-typography-font-body';
readonly small: '--DataGrid-t-typography-font-small';
readonly large: '--DataGrid-t-typography-font-large';
};
readonly fontFamily: {
readonly base: '--DataGrid-t-typography-font-family-base';
};
readonly fontWeight: {
readonly light: '--DataGrid-t-typography-font-weight-light';
readonly regular: '--DataGrid-t-typography-font-weight-regular';
readonly medium: '--DataGrid-t-typography-font-weight-medium';
readonly bold: '--DataGrid-t-typography-font-weight-bold';
};
};
readonly transitions: {
readonly easing: {
readonly easeIn: '--DataGrid-t-transition-easing-ease-in';
readonly easeOut: '--DataGrid-t-transition-easing-ease-out';
readonly easeInOut: '--DataGrid-t-transition-easing-ease-in-out';
};
readonly duration: {
readonly short: '--DataGrid-t-transition-duration-short';
readonly base: '--DataGrid-t-transition-duration-base';
readonly long: '--DataGrid-t-transition-duration-long';
};
};
readonly shadows: {
readonly base: '--DataGrid-t-shadow-base';
readonly overlay: '--DataGrid-t-shadow-overlay';
};
readonly zIndex: {
readonly panel: '--DataGrid-t-z-index-panel';
readonly menu: '--DataGrid-t-z-index-menu';
readonly modal: '--DataGrid-t-z-index-modal';
};
};
export type GridCSSVariablesInterface = { [E in CreateObjectEntries<typeof keys> as E['value']]: string | number };
type Entry = {
key: string;
value: unknown;
};
type EmptyEntry<TValue> = {
key: '';
value: TValue;
};
type CreateObjectEntries<TValue, TValueInitial = TValue> = TValue extends object ? { [TKey in keyof TValue]-?: TKey extends string ? OmitItself<TValue[TKey], TValueInitial> extends infer TNestedValue ? TNestedValue extends Entry ? {
key: `${TKey}.${TNestedValue['key']}`;
value: TNestedValue['value'];
} : never : never : never }[keyof TValue] : EmptyEntry<TValue>;
type OmitItself<TValue, TValueInitial> = TValue extends TValueInitial ? EmptyEntry<TValue> : CreateObjectEntries<TValue, TValueInitial>;
export declare const vars: {
spacingUnit: '--DataGrid-t-spacing-unit';
colors: {
readonly border: {
readonly base: '--DataGrid-t-color-border-base';
};
readonly foreground: {
readonly base: '--DataGrid-t-color-foreground-base';
readonly muted: '--DataGrid-t-color-foreground-muted';
readonly accent: '--DataGrid-t-color-foreground-accent';
readonly disabled: '--DataGrid-t-color-foreground-disabled';
readonly error: '--DataGrid-t-color-foreground-error';
};
readonly background: {
readonly base: '--DataGrid-t-color-background-base';
readonly overlay: '--DataGrid-t-color-background-overlay';
readonly backdrop: '--DataGrid-t-color-background-backdrop';
};
readonly interactive: {
readonly hover: '--DataGrid-t-color-interactive-hover';
readonly hoverOpacity: '--DataGrid-t-color-interactive-hover-opacity';
readonly focus: '--DataGrid-t-color-interactive-focus';
readonly focusOpacity: '--DataGrid-t-color-interactive-focus-opacity';
readonly disabled: '--DataGrid-t-color-interactive-disabled';
readonly disabledOpacity: '--DataGrid-t-color-interactive-disabled-opacity';
readonly selected: '--DataGrid-t-color-interactive-selected';
readonly selectedOpacity: '--DataGrid-t-color-interactive-selected-opacity';
};
};
header: {
readonly background: {
readonly base: '--DataGrid-t-header-background-base';
};
};
cell: {
readonly background: {
readonly pinned: '--DataGrid-t-cell-background-pinned';
};
};
radius: {
readonly base: '--DataGrid-t-radius-base';
};
typography: {
readonly font: {
readonly body: '--DataGrid-t-typography-font-body';
readonly small: '--DataGrid-t-typography-font-small';
readonly large: '--DataGrid-t-typography-font-large';
};
readonly fontFamily: {
readonly base: '--DataGrid-t-typography-font-family-base';
};
readonly fontWeight: {
readonly light: '--DataGrid-t-typography-font-weight-light';
readonly regular: '--DataGrid-t-typography-font-weight-regular';
readonly medium: '--DataGrid-t-typography-font-weight-medium';
readonly bold: '--DataGrid-t-typography-font-weight-bold';
};
};
transitions: {
readonly easing: {
readonly easeIn: '--DataGrid-t-transition-easing-ease-in';
readonly easeOut: '--DataGrid-t-transition-easing-ease-out';
readonly easeInOut: '--DataGrid-t-transition-easing-ease-in-out';
};
readonly duration: {
readonly short: '--DataGrid-t-transition-duration-short';
readonly base: '--DataGrid-t-transition-duration-base';
readonly long: '--DataGrid-t-transition-duration-long';
};
};
shadows: {
readonly base: '--DataGrid-t-shadow-base';
readonly overlay: '--DataGrid-t-shadow-overlay';
};
zIndex: {
readonly panel: '--DataGrid-t-z-index-panel';
readonly menu: '--DataGrid-t-z-index-menu';
readonly modal: '--DataGrid-t-z-index-modal';
};
breakpoints: {
values: {
xs: number;
sm: number;
md: number;
lg: number;
xl: number;
};
up: (key: any) => string;
};
spacing: typeof spacing;
transition: typeof transition;
keys: {
readonly spacingUnit: '--DataGrid-t-spacing-unit';
readonly colors: {
readonly border: {
readonly base: '--DataGrid-t-color-border-base';
};
readonly foreground: {
readonly base: '--DataGrid-t-color-foreground-base';
readonly muted: '--DataGrid-t-color-foreground-muted';
readonly accent: '--DataGrid-t-color-foreground-accent';
readonly disabled: '--DataGrid-t-color-foreground-disabled';
readonly error: '--DataGrid-t-color-foreground-error';
};
readonly background: {
readonly base: '--DataGrid-t-color-background-base';
readonly overlay: '--DataGrid-t-color-background-overlay';
readonly backdrop: '--DataGrid-t-color-background-backdrop';
};
readonly interactive: {
readonly hover: '--DataGrid-t-color-interactive-hover';
readonly hoverOpacity: '--DataGrid-t-color-interactive-hover-opacity';
readonly focus: '--DataGrid-t-color-interactive-focus';
readonly focusOpacity: '--DataGrid-t-color-interactive-focus-opacity';
readonly disabled: '--DataGrid-t-color-interactive-disabled';
readonly disabledOpacity: '--DataGrid-t-color-interactive-disabled-opacity';
readonly selected: '--DataGrid-t-color-interactive-selected';
readonly selectedOpacity: '--DataGrid-t-color-interactive-selected-opacity';
};
};
readonly header: {
readonly background: {
readonly base: '--DataGrid-t-header-background-base';
};
};
readonly cell: {
readonly background: {
readonly pinned: '--DataGrid-t-cell-background-pinned';
};
};
readonly radius: {
readonly base: '--DataGrid-t-radius-base';
};
readonly typography: {
readonly font: {
readonly body: '--DataGrid-t-typography-font-body';
readonly small: '--DataGrid-t-typography-font-small';
readonly large: '--DataGrid-t-typography-font-large';
};
readonly fontFamily: {
readonly base: '--DataGrid-t-typography-font-family-base';
};
readonly fontWeight: {
readonly light: '--DataGrid-t-typography-font-weight-light';
readonly regular: '--DataGrid-t-typography-font-weight-regular';
readonly medium: '--DataGrid-t-typography-font-weight-medium';
readonly bold: '--DataGrid-t-typography-font-weight-bold';
};
};
readonly transitions: {
readonly easing: {
readonly easeIn: '--DataGrid-t-transition-easing-ease-in';
readonly easeOut: '--DataGrid-t-transition-easing-ease-out';
readonly easeInOut: '--DataGrid-t-transition-easing-ease-in-out';
};
readonly duration: {
readonly short: '--DataGrid-t-transition-duration-short';
readonly base: '--DataGrid-t-transition-duration-base';
readonly long: '--DataGrid-t-transition-duration-long';
};
};
readonly shadows: {
readonly base: '--DataGrid-t-shadow-base';
readonly overlay: '--DataGrid-t-shadow-overlay';
};
readonly zIndex: {
readonly panel: '--DataGrid-t-z-index-panel';
readonly menu: '--DataGrid-t-z-index-menu';
readonly modal: '--DataGrid-t-z-index-modal';
};
};
};
declare function spacing(a?: number, b?: number, c?: number, d?: number): string;
declare function transition(props: string[], options?: {
duration?: string;
easing?: string;
delay?: number;
}): string;
export {};
+161
View File
@@ -0,0 +1,161 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.vars = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
// NOTE: Breakpoints can't come from the theme because we need access to them at
// initialization time and media-queries can't use CSS variables. For users with
// custom breakpoints, we might want to provide a way to configure them globally
// instead of through the theme.
const breakpoints = {
values: {
xs: 0,
// phone
sm: 600,
// tablet
md: 900,
// small laptop
lg: 1200,
// desktop
xl: 1536 // large screen
},
up: key => {
const values = breakpoints.values;
const value = typeof values[key] === 'number' ? values[key] : key;
return `@media (min-width:${value}px)`;
}
};
const keys = {
spacingUnit: '--DataGrid-t-spacing-unit',
/* Variables */
colors: {
border: {
base: '--DataGrid-t-color-border-base'
},
foreground: {
base: '--DataGrid-t-color-foreground-base',
muted: '--DataGrid-t-color-foreground-muted',
accent: '--DataGrid-t-color-foreground-accent',
disabled: '--DataGrid-t-color-foreground-disabled',
error: '--DataGrid-t-color-foreground-error'
},
background: {
base: '--DataGrid-t-color-background-base',
overlay: '--DataGrid-t-color-background-overlay',
backdrop: '--DataGrid-t-color-background-backdrop'
},
interactive: {
hover: '--DataGrid-t-color-interactive-hover',
hoverOpacity: '--DataGrid-t-color-interactive-hover-opacity',
focus: '--DataGrid-t-color-interactive-focus',
focusOpacity: '--DataGrid-t-color-interactive-focus-opacity',
disabled: '--DataGrid-t-color-interactive-disabled',
disabledOpacity: '--DataGrid-t-color-interactive-disabled-opacity',
selected: '--DataGrid-t-color-interactive-selected',
selectedOpacity: '--DataGrid-t-color-interactive-selected-opacity'
}
},
header: {
background: {
base: '--DataGrid-t-header-background-base'
}
},
cell: {
background: {
pinned: '--DataGrid-t-cell-background-pinned'
}
},
radius: {
base: '--DataGrid-t-radius-base'
},
typography: {
font: {
body: '--DataGrid-t-typography-font-body',
small: '--DataGrid-t-typography-font-small',
large: '--DataGrid-t-typography-font-large'
},
fontFamily: {
base: '--DataGrid-t-typography-font-family-base'
},
fontWeight: {
light: '--DataGrid-t-typography-font-weight-light',
regular: '--DataGrid-t-typography-font-weight-regular',
medium: '--DataGrid-t-typography-font-weight-medium',
bold: '--DataGrid-t-typography-font-weight-bold'
}
},
transitions: {
easing: {
easeIn: '--DataGrid-t-transition-easing-ease-in',
easeOut: '--DataGrid-t-transition-easing-ease-out',
easeInOut: '--DataGrid-t-transition-easing-ease-in-out'
},
duration: {
short: '--DataGrid-t-transition-duration-short',
base: '--DataGrid-t-transition-duration-base',
long: '--DataGrid-t-transition-duration-long'
}
},
shadows: {
base: '--DataGrid-t-shadow-base',
overlay: '--DataGrid-t-shadow-overlay'
},
zIndex: {
panel: '--DataGrid-t-z-index-panel',
menu: '--DataGrid-t-z-index-menu',
modal: '--DataGrid-t-z-index-modal'
}
};
const values = wrap(keys);
const vars = exports.vars = (0, _extends2.default)({
breakpoints,
spacing,
transition,
keys
}, values);
function spacing(a, b, c, d) {
/* eslint-disable prefer-template */
if (a === undefined) {
return spacingString(1);
}
if (b === undefined) {
return spacingString(a);
}
if (c === undefined) {
return spacingString(a) + ' ' + spacingString(b);
}
if (d === undefined) {
return spacingString(a) + ' ' + spacingString(b) + ' ' + spacingString(c);
}
return spacingString(a) + ' ' + spacingString(b) + ' ' + spacingString(c) + ' ' + spacingString(d);
/* eslint-enable prefer-template */
}
function spacingString(value) {
if (value === 0) {
return '0';
}
return `calc(var(--DataGrid-t-spacing-unit) * ${value})`;
}
function transition(props, options) {
const {
duration = vars.transitions.duration.base,
easing = vars.transitions.easing.easeInOut,
delay = 0
} = options ?? {};
return props.map(prop => `${prop} ${duration} ${easing} ${delay}ms`).join(', ');
}
function wrap(input) {
if (typeof input === 'string') {
return `var(${input})`;
}
const result = {};
for (const key in input) {
if (Object.hasOwn(input, key)) {
result[key] = wrap(input[key]);
}
}
return result;
}
+154
View File
@@ -0,0 +1,154 @@
import _extends from "@babel/runtime/helpers/esm/extends";
// NOTE: Breakpoints can't come from the theme because we need access to them at
// initialization time and media-queries can't use CSS variables. For users with
// custom breakpoints, we might want to provide a way to configure them globally
// instead of through the theme.
const breakpoints = {
values: {
xs: 0,
// phone
sm: 600,
// tablet
md: 900,
// small laptop
lg: 1200,
// desktop
xl: 1536 // large screen
},
up: key => {
const values = breakpoints.values;
const value = typeof values[key] === 'number' ? values[key] : key;
return `@media (min-width:${value}px)`;
}
};
const keys = {
spacingUnit: '--DataGrid-t-spacing-unit',
/* Variables */
colors: {
border: {
base: '--DataGrid-t-color-border-base'
},
foreground: {
base: '--DataGrid-t-color-foreground-base',
muted: '--DataGrid-t-color-foreground-muted',
accent: '--DataGrid-t-color-foreground-accent',
disabled: '--DataGrid-t-color-foreground-disabled',
error: '--DataGrid-t-color-foreground-error'
},
background: {
base: '--DataGrid-t-color-background-base',
overlay: '--DataGrid-t-color-background-overlay',
backdrop: '--DataGrid-t-color-background-backdrop'
},
interactive: {
hover: '--DataGrid-t-color-interactive-hover',
hoverOpacity: '--DataGrid-t-color-interactive-hover-opacity',
focus: '--DataGrid-t-color-interactive-focus',
focusOpacity: '--DataGrid-t-color-interactive-focus-opacity',
disabled: '--DataGrid-t-color-interactive-disabled',
disabledOpacity: '--DataGrid-t-color-interactive-disabled-opacity',
selected: '--DataGrid-t-color-interactive-selected',
selectedOpacity: '--DataGrid-t-color-interactive-selected-opacity'
}
},
header: {
background: {
base: '--DataGrid-t-header-background-base'
}
},
cell: {
background: {
pinned: '--DataGrid-t-cell-background-pinned'
}
},
radius: {
base: '--DataGrid-t-radius-base'
},
typography: {
font: {
body: '--DataGrid-t-typography-font-body',
small: '--DataGrid-t-typography-font-small',
large: '--DataGrid-t-typography-font-large'
},
fontFamily: {
base: '--DataGrid-t-typography-font-family-base'
},
fontWeight: {
light: '--DataGrid-t-typography-font-weight-light',
regular: '--DataGrid-t-typography-font-weight-regular',
medium: '--DataGrid-t-typography-font-weight-medium',
bold: '--DataGrid-t-typography-font-weight-bold'
}
},
transitions: {
easing: {
easeIn: '--DataGrid-t-transition-easing-ease-in',
easeOut: '--DataGrid-t-transition-easing-ease-out',
easeInOut: '--DataGrid-t-transition-easing-ease-in-out'
},
duration: {
short: '--DataGrid-t-transition-duration-short',
base: '--DataGrid-t-transition-duration-base',
long: '--DataGrid-t-transition-duration-long'
}
},
shadows: {
base: '--DataGrid-t-shadow-base',
overlay: '--DataGrid-t-shadow-overlay'
},
zIndex: {
panel: '--DataGrid-t-z-index-panel',
menu: '--DataGrid-t-z-index-menu',
modal: '--DataGrid-t-z-index-modal'
}
};
const values = wrap(keys);
export const vars = _extends({
breakpoints,
spacing,
transition,
keys
}, values);
function spacing(a, b, c, d) {
/* eslint-disable prefer-template */
if (a === undefined) {
return spacingString(1);
}
if (b === undefined) {
return spacingString(a);
}
if (c === undefined) {
return spacingString(a) + ' ' + spacingString(b);
}
if (d === undefined) {
return spacingString(a) + ' ' + spacingString(b) + ' ' + spacingString(c);
}
return spacingString(a) + ' ' + spacingString(b) + ' ' + spacingString(c) + ' ' + spacingString(d);
/* eslint-enable prefer-template */
}
function spacingString(value) {
if (value === 0) {
return '0';
}
return `calc(var(--DataGrid-t-spacing-unit) * ${value})`;
}
function transition(props, options) {
const {
duration = vars.transitions.duration.base,
easing = vars.transitions.easing.easeInOut,
delay = 0
} = options ?? {};
return props.map(prop => `${prop} ${duration} ${easing} ${delay}ms`).join(', ');
}
function wrap(input) {
if (typeof input === 'string') {
return `var(${input})`;
}
const result = {};
for (const key in input) {
if (Object.hasOwn(input, key)) {
result[key] = wrap(input[key]);
}
}
return result;
}
@@ -0,0 +1,5 @@
import type { DataGridPropsWithDefaultValues } from "../models/props/DataGridProps.mjs";
/**
* The default values of `DataGridPropsWithDefaultValues` to inject in the props of DataGrid.
*/
export declare const DATA_GRID_PROPS_DEFAULT_VALUES: DataGridPropsWithDefaultValues;
@@ -0,0 +1,5 @@
import type { DataGridPropsWithDefaultValues } from "../models/props/DataGridProps.js";
/**
* The default values of `DataGridPropsWithDefaultValues` to inject in the props of DataGrid.
*/
export declare const DATA_GRID_PROPS_DEFAULT_VALUES: DataGridPropsWithDefaultValues;
@@ -0,0 +1,70 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DATA_GRID_PROPS_DEFAULT_VALUES = void 0;
var _gridEditRowModel = require("../models/gridEditRowModel");
/**
* The default values of `DataGridPropsWithDefaultValues` to inject in the props of DataGrid.
*/
const DATA_GRID_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PROPS_DEFAULT_VALUES = {
autoHeight: false,
autoPageSize: false,
autosizeOnMount: false,
checkboxSelection: false,
checkboxSelectionVisibleOnly: false,
clipboardCopyCellDelimiter: '\t',
columnBufferPx: 150,
columnFilterDebounceMs: 150,
columnHeaderHeight: 56,
disableAutosize: false,
disableColumnFilter: false,
disableColumnMenu: false,
disableColumnReorder: false,
disableColumnResize: false,
disableColumnSelector: false,
disableColumnSorting: false,
disableDensitySelector: false,
disableEval: false,
disableMultipleColumnsFiltering: false,
disableMultipleColumnsSorting: false,
disableMultipleRowSelection: false,
dataSourceKeepPreviousData: false,
dataSourceRevalidateMs: 0,
disableRowSelectionOnClick: false,
disableRowSelectionExcludeModel: false,
disableVirtualization: false,
editMode: _gridEditRowModel.GridEditModes.Cell,
filterDebounceMs: 150,
filterMode: 'client',
hideFooter: false,
hideFooterPagination: false,
hideFooterRowCount: false,
hideFooterSelectedRowCount: false,
ignoreDiacritics: false,
ignoreValueFormatterDuringExport: false,
keepColumnPositionIfDraggedOutside: false,
keepNonExistentRowsSelected: false,
loading: false,
logger: console,
logLevel: process.env.NODE_ENV === 'production' ? 'error' : 'warn',
pageSizeOptions: [25, 50, 100],
pagination: false,
paginationMode: 'client',
resizeThrottleMs: 60,
rowBufferPx: 150,
rowHeight: 52,
rows: [],
rowSelection: true,
rowSpacingType: 'margin',
rowSpanning: false,
showCellVerticalBorder: false,
showColumnVerticalBorder: false,
showToolbar: false,
sortingMode: 'client',
sortingOrder: ['asc', 'desc', null],
throttleRowsMs: 0,
virtualizeColumnsWithAutoRowHeight: false,
tabNavigation: 'none'
};
@@ -0,0 +1,64 @@
import { GridEditModes } from "../models/gridEditRowModel.mjs";
/**
* The default values of `DataGridPropsWithDefaultValues` to inject in the props of DataGrid.
*/
export const DATA_GRID_PROPS_DEFAULT_VALUES = {
autoHeight: false,
autoPageSize: false,
autosizeOnMount: false,
checkboxSelection: false,
checkboxSelectionVisibleOnly: false,
clipboardCopyCellDelimiter: '\t',
columnBufferPx: 150,
columnFilterDebounceMs: 150,
columnHeaderHeight: 56,
disableAutosize: false,
disableColumnFilter: false,
disableColumnMenu: false,
disableColumnReorder: false,
disableColumnResize: false,
disableColumnSelector: false,
disableColumnSorting: false,
disableDensitySelector: false,
disableEval: false,
disableMultipleColumnsFiltering: false,
disableMultipleColumnsSorting: false,
disableMultipleRowSelection: false,
dataSourceKeepPreviousData: false,
dataSourceRevalidateMs: 0,
disableRowSelectionOnClick: false,
disableRowSelectionExcludeModel: false,
disableVirtualization: false,
editMode: GridEditModes.Cell,
filterDebounceMs: 150,
filterMode: 'client',
hideFooter: false,
hideFooterPagination: false,
hideFooterRowCount: false,
hideFooterSelectedRowCount: false,
ignoreDiacritics: false,
ignoreValueFormatterDuringExport: false,
keepColumnPositionIfDraggedOutside: false,
keepNonExistentRowsSelected: false,
loading: false,
logger: console,
logLevel: process.env.NODE_ENV === 'production' ? 'error' : 'warn',
pageSizeOptions: [25, 50, 100],
pagination: false,
paginationMode: 'client',
resizeThrottleMs: 60,
rowBufferPx: 150,
rowHeight: 52,
rows: [],
rowSelection: true,
rowSpacingType: 'margin',
rowSpanning: false,
showCellVerticalBorder: false,
showColumnVerticalBorder: false,
showToolbar: false,
sortingMode: 'client',
sortingOrder: ['asc', 'desc', null],
throttleRowsMs: 0,
virtualizeColumnsWithAutoRowHeight: false,
tabNavigation: 'none'
};
@@ -0,0 +1,2 @@
import type { GridSlotsComponent } from "../models/index.mjs";
export declare const DATA_GRID_DEFAULT_SLOTS_COMPONENTS: GridSlotsComponent;
@@ -0,0 +1,2 @@
import type { GridSlotsComponent } from "../models/index.js";
export declare const DATA_GRID_DEFAULT_SLOTS_COMPONENTS: GridSlotsComponent;
@@ -0,0 +1,45 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DATA_GRID_DEFAULT_SLOTS_COMPONENTS = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _components = require("../components");
var _GridCell = require("../components/cell/GridCell");
var _GridColumnHeaders = require("../components/GridColumnHeaders");
var _GridColumnMenu = require("../components/menu/columnMenu/GridColumnMenu");
var _GridDetailPanels = require("../components/GridDetailPanels");
var _GridPinnedRows = require("../components/GridPinnedRows");
var _GridNoResultsOverlay = require("../components/GridNoResultsOverlay");
var _material = _interopRequireDefault(require("../material"));
var _GridBottomContainer = require("../components/virtualization/GridBottomContainer");
var _GridToolbar = require("../components/toolbarV8/GridToolbar");
// TODO: camelCase these key. It's a private helper now.
// Remove then need to call `uncapitalizeObjectKeys`.
const DATA_GRID_DEFAULT_SLOTS_COMPONENTS = exports.DATA_GRID_DEFAULT_SLOTS_COMPONENTS = (0, _extends2.default)({}, _material.default, {
cell: _GridCell.GridCell,
skeletonCell: _components.GridSkeletonCell,
columnHeaderFilterIconButton: _components.GridColumnHeaderFilterIconButton,
columnHeaderSortIcon: _components.GridColumnHeaderSortIcon,
columnMenu: _GridColumnMenu.GridColumnMenu,
columnHeaders: _GridColumnHeaders.GridColumnHeaders,
detailPanels: _GridDetailPanels.GridDetailPanels,
bottomContainer: _GridBottomContainer.GridBottomContainer,
footer: _components.GridFooter,
footerRowCount: _components.GridRowCount,
toolbar: _GridToolbar.GridToolbar,
pinnedRows: _GridPinnedRows.GridPinnedRows,
loadingOverlay: _components.GridLoadingOverlay,
noResultsOverlay: _GridNoResultsOverlay.GridNoResultsOverlay,
noRowsOverlay: _components.GridNoRowsOverlay,
noColumnsOverlay: _components.GridNoColumnsOverlay,
pagination: _components.GridPagination,
filterPanel: _components.GridFilterPanel,
columnsPanel: _components.GridColumnsPanel,
columnsManagement: _components.GridColumnsManagement,
panel: _components.GridPanel,
row: _components.GridRow,
rowCheckbox: _components.GridRowCheckbox
});
@@ -0,0 +1,39 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import { GridSkeletonCell, GridColumnsPanel, GridFilterPanel, GridFooter, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridRow, GridColumnHeaderFilterIconButton, GridRowCount, GridColumnsManagement, GridColumnHeaderSortIcon, GridNoColumnsOverlay, GridRowCheckbox } from "../components/index.mjs";
import { GridCell } from "../components/cell/GridCell.mjs";
import { GridColumnHeaders } from "../components/GridColumnHeaders.mjs";
import { GridColumnMenu } from "../components/menu/columnMenu/GridColumnMenu.mjs";
import { GridDetailPanels } from "../components/GridDetailPanels.mjs";
import { GridPinnedRows } from "../components/GridPinnedRows.mjs";
import { GridNoResultsOverlay } from "../components/GridNoResultsOverlay.mjs";
import materialSlots from "../material/index.mjs";
import { GridBottomContainer } from "../components/virtualization/GridBottomContainer.mjs";
import { GridToolbar } from "../components/toolbarV8/GridToolbar.mjs";
// TODO: camelCase these key. It's a private helper now.
// Remove then need to call `uncapitalizeObjectKeys`.
export const DATA_GRID_DEFAULT_SLOTS_COMPONENTS = _extends({}, materialSlots, {
cell: GridCell,
skeletonCell: GridSkeletonCell,
columnHeaderFilterIconButton: GridColumnHeaderFilterIconButton,
columnHeaderSortIcon: GridColumnHeaderSortIcon,
columnMenu: GridColumnMenu,
columnHeaders: GridColumnHeaders,
detailPanels: GridDetailPanels,
bottomContainer: GridBottomContainer,
footer: GridFooter,
footerRowCount: GridRowCount,
toolbar: GridToolbar,
pinnedRows: GridPinnedRows,
loadingOverlay: GridLoadingOverlay,
noResultsOverlay: GridNoResultsOverlay,
noRowsOverlay: GridNoRowsOverlay,
noColumnsOverlay: GridNoColumnsOverlay,
pagination: GridPagination,
filterPanel: GridFilterPanel,
columnsPanel: GridColumnsPanel,
columnsManagement: GridColumnsManagement,
panel: GridPanel,
row: GridRow,
rowCheckbox: GridRowCheckbox
});
+1
View File
@@ -0,0 +1 @@
export declare const GRID_EXPERIMENTAL_ENABLED = false;
+1
View File
@@ -0,0 +1 @@
export declare const GRID_EXPERIMENTAL_ENABLED = false;
+25
View File
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GRID_EXPERIMENTAL_ENABLED = void 0;
// A guide to feature toggling (deprecated)
//
// The feature toggle is:
// - independent from the NODE_ENV
// - isn't pruning code in production, as the objective is to eventually ship the code.
// - doesn't allow to cherry-pick which feature to enable
//
// By default, the experimental features are only enabled in:
// - the local environment
// - the pull request previews
//
// Reviewers can force the value with the local storage and the GRID_EXPERIMENTAL_ENABLED key:
// - 'true' => force it to be enabled
// - 'false' => force it to be disabled
//
// Developers (users) are discouraged to enable the experimental feature by setting the GRID_EXPERIMENTAL_ENABLED env.
// Instead, prefer exposing experimental APIs, for instance, a prop or a new `unstable_` module.
const GRID_EXPERIMENTAL_ENABLED = exports.GRID_EXPERIMENTAL_ENABLED = false;
+19
View File
@@ -0,0 +1,19 @@
// A guide to feature toggling (deprecated)
//
// The feature toggle is:
// - independent from the NODE_ENV
// - isn't pruning code in production, as the objective is to eventually ship the code.
// - doesn't allow to cherry-pick which feature to enable
//
// By default, the experimental features are only enabled in:
// - the local environment
// - the pull request previews
//
// Reviewers can force the value with the local storage and the GRID_EXPERIMENTAL_ENABLED key:
// - 'true' => force it to be enabled
// - 'false' => force it to be disabled
//
// Developers (users) are discouraged to enable the experimental feature by setting the GRID_EXPERIMENTAL_ENABLED env.
// Instead, prefer exposing experimental APIs, for instance, a prop or a new `unstable_` module.
export const GRID_EXPERIMENTAL_ENABLED = false;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+33
View File
@@ -0,0 +1,33 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDataGridUtilityClass = getDataGridUtilityClass;
exports.gridClassesOverrides = exports.gridClasses = void 0;
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
function getDataGridUtilityClass(slot) {
return (0, _generateUtilityClass.default)('MuiDataGrid', slot);
}
/**
* Class groups for the MuiDataGrid component used in GridRootStyles overridesResolver.
*
* Splits classes into two groups to support style overrides:
* - `root`: classes applied directly to the root element (use `&.className` selector)
* - `children`: classes applied to child elements (use `& .className` selector)
*
* These are spread into the gridClasses utility object and used for CSS-in-JS overrides.
*
* Only include class names here that are NOT applied via `styled` components.
* For `styled` components, declare overrides directly in the component definition.
*/
const gridClassesOverrides = exports.gridClassesOverrides = {
root: ['autoHeight', 'autosizing', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'withVerticalBorder'],
children: ['actionsCell', 'booleanCell', 'cell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--rangeTop', 'cell--withFillHandle', 'cell--fillPreview', 'cell--fillPreviewTop', 'cell--fillPreviewBottom', 'cell--fillPreviewLeft', 'cell--fillPreviewRight', 'cell--selectionMode', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withLeftBorder', 'cell--withRightBorder', 'cellCheckbox', 'cellEmpty', 'cellOffsetLeft', 'cellSkeleton', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--emptyGroup', 'columnHeader--filledGroup', 'columnHeader--filtered', 'columnHeader--last', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--siblingFocused', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnSeparator', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'container--bottom', 'container--top', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'editBooleanCell', 'filterIcon', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'groupingCriteriaCell', 'groupingCriteriaCellLoadingContainer', 'groupingCriteriaCellToggle', 'headerFilterRow', 'iconSeparator', 'menuIcon', 'menuIconButton', 'menuList', 'menuOpen', 'overlayWrapperInner', 'pinnedRows', 'pinnedRows--bottom', 'pinnedRows--top', 'row', 'row--borderBottom', 'row--detailPanelExpanded',
// TODO v9: Rename to `cell--dragging`
'row--dragging', 'row--dynamicHeight', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderCellContainer', 'rowReorderCellPlaceholder', 'rowSkeleton', 'scrollbar', 'scrollbar--horizontal', 'scrollbar--vertical', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'sortIcon', 'treeDataGroupingCell', 'treeDataGroupingCellLoadingContainer', 'treeDataGroupingCellToggle', 'withBorderColor', 'row--beingDragged']
};
const gridClasses = exports.gridClasses = (0, _generateUtilityClasses.default)('MuiDataGrid', [...gridClassesOverrides.root, ...gridClassesOverrides.children, 'aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'mainContent', 'withSidePanel', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderTitle', 'columnHeaders', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'contentFiller', 'detailPanel', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editInputCell', 'longTextCell', 'longTextCellContent', 'longTextCellExpandButton', 'longTextCellCollapseButton', 'longTextCellPopup', 'longTextCellPopperContent', 'editLongTextCell', 'editLongTextCellValue', 'editLongTextCellPopup', 'editLongTextCellPopperContent', 'editLongTextCellTextarea', 'multiSelectCell', 'multiSelectCellChip', 'multiSelectCellChip--hidden', 'multiSelectCellOverflow', 'multiSelectCellPopup', 'multiSelectCellPopperContent', 'editMultiSelectCell', 'editMultiSelectCellChip', 'editMultiSelectCellChip--hidden', 'editMultiSelectCellOverflow', 'editMultiSelectCellPopup', 'editMultiSelectCellPopperContent', 'filler', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filler--horizontal', 'footerContainer', 'iconButtonContainer', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'overlay', 'overlayWrapper', 'root', 'virtualizer--layoutControlled', 'rowCount', 'rowReorderIcon', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction', 'resizablePanelHandle', 'resizablePanelHandle--horizontal', 'resizablePanelHandle--vertical']);
+25
View File
@@ -0,0 +1,25 @@
import generateUtilityClass from '@mui/utils/generateUtilityClass';
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
export function getDataGridUtilityClass(slot) {
return generateUtilityClass('MuiDataGrid', slot);
}
/**
* Class groups for the MuiDataGrid component used in GridRootStyles overridesResolver.
*
* Splits classes into two groups to support style overrides:
* - `root`: classes applied directly to the root element (use `&.className` selector)
* - `children`: classes applied to child elements (use `& .className` selector)
*
* These are spread into the gridClasses utility object and used for CSS-in-JS overrides.
*
* Only include class names here that are NOT applied via `styled` components.
* For `styled` components, declare overrides directly in the component definition.
*/
export const gridClassesOverrides = {
root: ['autoHeight', 'autosizing', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'withVerticalBorder'],
children: ['actionsCell', 'booleanCell', 'cell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--rangeTop', 'cell--withFillHandle', 'cell--fillPreview', 'cell--fillPreviewTop', 'cell--fillPreviewBottom', 'cell--fillPreviewLeft', 'cell--fillPreviewRight', 'cell--selectionMode', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withLeftBorder', 'cell--withRightBorder', 'cellCheckbox', 'cellEmpty', 'cellOffsetLeft', 'cellSkeleton', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--emptyGroup', 'columnHeader--filledGroup', 'columnHeader--filtered', 'columnHeader--last', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--siblingFocused', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnSeparator', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'container--bottom', 'container--top', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'editBooleanCell', 'filterIcon', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'groupingCriteriaCell', 'groupingCriteriaCellLoadingContainer', 'groupingCriteriaCellToggle', 'headerFilterRow', 'iconSeparator', 'menuIcon', 'menuIconButton', 'menuList', 'menuOpen', 'overlayWrapperInner', 'pinnedRows', 'pinnedRows--bottom', 'pinnedRows--top', 'row', 'row--borderBottom', 'row--detailPanelExpanded',
// TODO v9: Rename to `cell--dragging`
'row--dragging', 'row--dynamicHeight', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderCellContainer', 'rowReorderCellPlaceholder', 'rowSkeleton', 'scrollbar', 'scrollbar--horizontal', 'scrollbar--vertical', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'sortIcon', 'treeDataGroupingCell', 'treeDataGroupingCellLoadingContainer', 'treeDataGroupingCellToggle', 'withBorderColor', 'row--beingDragged']
};
export const gridClasses = generateUtilityClasses('MuiDataGrid', [...gridClassesOverrides.root, ...gridClassesOverrides.children, 'aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'mainContent', 'withSidePanel', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderTitle', 'columnHeaders', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'contentFiller', 'detailPanel', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editInputCell', 'longTextCell', 'longTextCellContent', 'longTextCellExpandButton', 'longTextCellCollapseButton', 'longTextCellPopup', 'longTextCellPopperContent', 'editLongTextCell', 'editLongTextCellValue', 'editLongTextCellPopup', 'editLongTextCellPopperContent', 'editLongTextCellTextarea', 'multiSelectCell', 'multiSelectCellChip', 'multiSelectCellChip--hidden', 'multiSelectCellOverflow', 'multiSelectCellPopup', 'multiSelectCellPopperContent', 'editMultiSelectCell', 'editMultiSelectCellChip', 'editMultiSelectCellChip--hidden', 'editMultiSelectCellOverflow', 'editMultiSelectCellPopup', 'editMultiSelectCellPopperContent', 'filler', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filler--horizontal', 'footerContainer', 'iconButtonContainer', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'overlay', 'overlayWrapper', 'root', 'virtualizer--layoutControlled', 'rowCount', 'rowReorderIcon', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction', 'resizablePanelHandle', 'resizablePanelHandle--horizontal', 'resizablePanelHandle--vertical']);
+4
View File
@@ -0,0 +1,4 @@
export * from "./envConstants.mjs";
export * from "./localeTextConstants.mjs";
export { type GridClassKey, type GridClasses, getDataGridUtilityClass, gridClasses } from "./gridClasses.mjs";
export * from "./signature.mjs";
+4
View File
@@ -0,0 +1,4 @@
export * from "./envConstants.js";
export * from "./localeTextConstants.js";
export { type GridClassKey, type GridClasses, getDataGridUtilityClass, gridClasses } from "./gridClasses.js";
export * from "./signature.js";
+58
View File
@@ -0,0 +1,58 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
getDataGridUtilityClass: true,
gridClasses: true
};
Object.defineProperty(exports, "getDataGridUtilityClass", {
enumerable: true,
get: function () {
return _gridClasses.getDataGridUtilityClass;
}
});
Object.defineProperty(exports, "gridClasses", {
enumerable: true,
get: function () {
return _gridClasses.gridClasses;
}
});
var _envConstants = require("./envConstants");
Object.keys(_envConstants).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _envConstants[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _envConstants[key];
}
});
});
var _localeTextConstants = require("./localeTextConstants");
Object.keys(_localeTextConstants).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _localeTextConstants[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _localeTextConstants[key];
}
});
});
var _gridClasses = require("./gridClasses");
var _signature = require("./signature");
Object.keys(_signature).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _signature[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _signature[key];
}
});
});
+4
View File
@@ -0,0 +1,4 @@
export * from "./envConstants.mjs";
export * from "./localeTextConstants.mjs";
export { getDataGridUtilityClass, gridClasses } from "./gridClasses.mjs";
export * from "./signature.mjs";
@@ -0,0 +1,2 @@
import type { GridLocaleText } from "../models/api/gridLocaleTextApi.mjs";
export declare const GRID_DEFAULT_LOCALE_TEXT: GridLocaleText;
@@ -0,0 +1,2 @@
import type { GridLocaleText } from "../models/api/gridLocaleTextApi.js";
export declare const GRID_DEFAULT_LOCALE_TEXT: GridLocaleText;
+304
View File
@@ -0,0 +1,304 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GRID_DEFAULT_LOCALE_TEXT = void 0;
var _getGridLocalization = require("../utils/getGridLocalization");
const formatNumber = (0, _getGridLocalization.buildLocaleFormat)('en-US');
const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
// Root
noRowsLabel: 'No rows',
noResultsOverlayLabel: 'No results found.',
noColumnsOverlayLabel: 'No columns',
noColumnsOverlayManageColumns: 'Manage columns',
emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
// Density selector toolbar button text
toolbarDensity: 'Density',
toolbarDensityLabel: 'Density',
toolbarDensityCompact: 'Compact',
toolbarDensityStandard: 'Standard',
toolbarDensityComfortable: 'Comfortable',
// Undo/redo toolbar button text
toolbarUndo: 'Undo',
toolbarRedo: 'Redo',
// 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',
// Toolbar pivot button
toolbarPivot: 'Pivot',
// Toolbar charts button
toolbarCharts: 'Charts',
// Toolbar AI Assistant button
toolbarAssistant: 'AI Assistant',
// Columns management text
columnsManagementSearchTitle: 'Search',
columnsManagementNoColumns: 'No columns',
columnsManagementShowHideAllText: 'Show/Hide All',
columnsManagementReset: 'Reset',
columnsManagementDeleteIconLabel: 'Clear',
// Filter panel text
filterPanelAddFilter: 'Add filter',
filterPanelRemoveAll: 'Remove all',
filterPanelDeleteIconLabel: 'Delete',
filterPanelLogicOperator: 'Logic operator',
filterPanelOperator: 'Operator',
filterPanelOperatorAnd: 'And',
filterPanelOperatorOr: 'Or',
filterPanelColumn: 'Column',
filterPanelInputLabel: 'Value',
filterPanelInputPlaceholder: 'Filter value',
// Filter operators text
filterOperatorContains: 'contains',
filterOperatorDoesNotContain: 'does not contain',
filterOperatorEquals: 'equals',
filterOperatorDoesNotEqual: 'does not equal',
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',
headerFilterOperatorDoesNotContain: 'Does not contain',
headerFilterOperatorEquals: 'Equals',
headerFilterOperatorDoesNotEqual: 'Does not equal',
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',
headerFilterClear: 'Clear filter',
// Filter values text
filterValueAny: 'any',
filterValueTrue: 'true',
filterValueFalse: 'false',
// Column menu text
columnMenuLabel: 'Menu',
columnMenuAriaLabel: columnName => `${columnName} column menu`,
columnMenuShowColumns: 'Show columns',
columnMenuManageColumns: 'Manage columns',
columnMenuFilter: 'Filter',
columnMenuHideColumn: 'Hide column',
columnMenuUnsort: 'Unsort',
columnMenuSortAsc: 'Sort by ASC',
columnMenuSortDesc: 'Sort by DESC',
columnMenuManagePivot: 'Manage pivot',
columnMenuManageCharts: 'Manage charts',
// 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',
// Long text cell
longTextCellExpandLabel: 'Expand',
longTextCellCollapseLabel: 'Collapse',
// 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',
// Pagination
paginationRowsPerPage: 'Rows per page:',
paginationDisplayedRows: ({
from,
to,
count,
estimated
}) => {
const unknownRowCount = count == null || count === -1;
if (!estimated) {
return `${formatNumber(from)}–${formatNumber(to)} of ${!unknownRowCount ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
}
const estimatedLabel = estimated && estimated > to ? `around ${formatNumber(estimated)}` : `more than ${formatNumber(to)}`;
return `${formatNumber(from)}–${formatNumber(to)} of ${!unknownRowCount ? formatNumber(count) : estimatedLabel}`;
},
paginationItemAriaLabel: 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';
},
// Row reordering text
rowReorderingHeaderName: 'Row reordering',
// Aggregation
aggregationMenuItemHeader: 'Aggregation',
aggregationFunctionLabelNone: 'none',
aggregationFunctionLabelSum: 'sum',
aggregationFunctionLabelAvg: 'avg',
aggregationFunctionLabelMin: 'min',
aggregationFunctionLabelMax: 'max',
aggregationFunctionLabelSize: 'size',
// Pivot panel
pivotToggleLabel: 'Pivot',
pivotRows: 'Rows',
pivotColumns: 'Columns',
pivotValues: 'Values',
pivotCloseButton: 'Close pivot settings',
pivotSearchButton: 'Search fields',
pivotSearchControlPlaceholder: 'Search fields',
pivotSearchControlLabel: 'Search fields',
pivotSearchControlClear: 'Clear search',
pivotNoFields: 'No fields',
pivotMenuMoveUp: 'Move up',
pivotMenuMoveDown: 'Move down',
pivotMenuMoveToTop: 'Move to top',
pivotMenuMoveToBottom: 'Move to bottom',
pivotMenuRows: 'Rows',
pivotMenuColumns: 'Columns',
pivotMenuValues: 'Values',
pivotMenuOptions: 'Field options',
pivotMenuAddToRows: 'Add to Rows',
pivotMenuAddToColumns: 'Add to Columns',
pivotMenuAddToValues: 'Add to Values',
pivotMenuRemove: 'Remove',
pivotDragToRows: 'Drag here to create rows',
pivotDragToColumns: 'Drag here to create columns',
pivotDragToValues: 'Drag here to create values',
pivotYearColumnHeaderName: '(Year)',
pivotQuarterColumnHeaderName: '(Quarter)',
// Charts configuration panel
chartsNoCharts: 'There are no charts available',
chartsChartNotSelected: 'Select a chart type to configure its options',
chartsTabChart: 'Chart',
chartsTabFields: 'Fields',
chartsTabCustomize: 'Customize',
chartsCloseButton: 'Close charts configuration',
chartsSyncButtonLabel: 'Sync chart',
chartsSearchPlaceholder: 'Search fields',
chartsSearchLabel: 'Search fields',
chartsSearchClear: 'Clear search',
chartsNoFields: 'No fields',
chartsFieldBlocked: 'This field cannot be added to any section',
chartsCategories: 'Categories',
chartsSeries: 'Series',
chartsMenuAddToDimensions: dimensionLabel => `Add to ${dimensionLabel}`,
chartsMenuAddToValues: valuesLabel => `Add to ${valuesLabel}`,
chartsMenuMoveUp: 'Move up',
chartsMenuMoveDown: 'Move down',
chartsMenuMoveToTop: 'Move to top',
chartsMenuMoveToBottom: 'Move to bottom',
chartsMenuOptions: 'Field options',
chartsMenuRemove: 'Remove',
chartsDragToDimensions: dimensionLabel => `Drag here to use column as ${dimensionLabel}`,
chartsDragToValues: valuesLabel => `Drag here to use column as ${valuesLabel}`,
// AI Assistant panel
aiAssistantPanelTitle: 'AI Assistant',
aiAssistantPanelClose: 'Close AI Assistant',
aiAssistantPanelNewConversation: 'New conversation',
aiAssistantPanelConversationHistory: 'Conversation history',
aiAssistantPanelEmptyConversation: 'No prompt history',
aiAssistantSuggestions: 'Suggestions',
// Prompt field
promptFieldLabel: 'Prompt',
promptFieldPlaceholder: 'Type a prompt…',
promptFieldPlaceholderWithRecording: 'Type or record a prompt…',
promptFieldPlaceholderListening: 'Listening for prompt…',
promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
promptFieldSend: 'Send',
promptFieldRecord: 'Record',
promptFieldStopRecording: 'Stop recording',
// Prompt
promptRerun: 'Run again',
promptProcessing: 'Processing…',
promptAppliedChanges: 'Applied changes',
// Prompt changes
promptChangeGroupDescription: column => `Group by ${column}`,
promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
promptChangeAggregationDescription: (column, aggregation) => `Aggregate ${column} (${aggregation})`,
promptChangeFilterLabel: (column, operator, value) => {
if (operator === 'is any of') {
return `${column} is any of: ${value}`;
}
return `${column} ${operator} ${value}`;
},
promptChangeFilterDescription: (column, operator, value) => {
if (operator === 'is any of') {
return `Filter where ${column} is any of: ${value}`;
}
return `Filter where ${column} ${operator} ${value}`;
},
promptChangeSortDescription: (column, direction) => `Sort by ${column} (${direction})`,
promptChangePivotEnableLabel: 'Pivot',
promptChangePivotEnableDescription: 'Enable pivot',
promptChangePivotColumnsLabel: count => `Columns (${count})`,
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
promptChangePivotRowsLabel: count => `Rows (${count})`,
promptChangePivotValuesLabel: count => `Values (${count})`,
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
};
+298
View File
@@ -0,0 +1,298 @@
import { buildLocaleFormat } from "../utils/getGridLocalization.mjs";
const formatNumber = buildLocaleFormat('en-US');
export const GRID_DEFAULT_LOCALE_TEXT = {
// Root
noRowsLabel: 'No rows',
noResultsOverlayLabel: 'No results found.',
noColumnsOverlayLabel: 'No columns',
noColumnsOverlayManageColumns: 'Manage columns',
emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
// Density selector toolbar button text
toolbarDensity: 'Density',
toolbarDensityLabel: 'Density',
toolbarDensityCompact: 'Compact',
toolbarDensityStandard: 'Standard',
toolbarDensityComfortable: 'Comfortable',
// Undo/redo toolbar button text
toolbarUndo: 'Undo',
toolbarRedo: 'Redo',
// 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',
// Toolbar pivot button
toolbarPivot: 'Pivot',
// Toolbar charts button
toolbarCharts: 'Charts',
// Toolbar AI Assistant button
toolbarAssistant: 'AI Assistant',
// Columns management text
columnsManagementSearchTitle: 'Search',
columnsManagementNoColumns: 'No columns',
columnsManagementShowHideAllText: 'Show/Hide All',
columnsManagementReset: 'Reset',
columnsManagementDeleteIconLabel: 'Clear',
// Filter panel text
filterPanelAddFilter: 'Add filter',
filterPanelRemoveAll: 'Remove all',
filterPanelDeleteIconLabel: 'Delete',
filterPanelLogicOperator: 'Logic operator',
filterPanelOperator: 'Operator',
filterPanelOperatorAnd: 'And',
filterPanelOperatorOr: 'Or',
filterPanelColumn: 'Column',
filterPanelInputLabel: 'Value',
filterPanelInputPlaceholder: 'Filter value',
// Filter operators text
filterOperatorContains: 'contains',
filterOperatorDoesNotContain: 'does not contain',
filterOperatorEquals: 'equals',
filterOperatorDoesNotEqual: 'does not equal',
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',
headerFilterOperatorDoesNotContain: 'Does not contain',
headerFilterOperatorEquals: 'Equals',
headerFilterOperatorDoesNotEqual: 'Does not equal',
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',
headerFilterClear: 'Clear filter',
// Filter values text
filterValueAny: 'any',
filterValueTrue: 'true',
filterValueFalse: 'false',
// Column menu text
columnMenuLabel: 'Menu',
columnMenuAriaLabel: columnName => `${columnName} column menu`,
columnMenuShowColumns: 'Show columns',
columnMenuManageColumns: 'Manage columns',
columnMenuFilter: 'Filter',
columnMenuHideColumn: 'Hide column',
columnMenuUnsort: 'Unsort',
columnMenuSortAsc: 'Sort by ASC',
columnMenuSortDesc: 'Sort by DESC',
columnMenuManagePivot: 'Manage pivot',
columnMenuManageCharts: 'Manage charts',
// 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',
// Long text cell
longTextCellExpandLabel: 'Expand',
longTextCellCollapseLabel: 'Collapse',
// 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',
// Pagination
paginationRowsPerPage: 'Rows per page:',
paginationDisplayedRows: ({
from,
to,
count,
estimated
}) => {
const unknownRowCount = count == null || count === -1;
if (!estimated) {
return `${formatNumber(from)}–${formatNumber(to)} of ${!unknownRowCount ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
}
const estimatedLabel = estimated && estimated > to ? `around ${formatNumber(estimated)}` : `more than ${formatNumber(to)}`;
return `${formatNumber(from)}–${formatNumber(to)} of ${!unknownRowCount ? formatNumber(count) : estimatedLabel}`;
},
paginationItemAriaLabel: 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';
},
// Row reordering text
rowReorderingHeaderName: 'Row reordering',
// Aggregation
aggregationMenuItemHeader: 'Aggregation',
aggregationFunctionLabelNone: 'none',
aggregationFunctionLabelSum: 'sum',
aggregationFunctionLabelAvg: 'avg',
aggregationFunctionLabelMin: 'min',
aggregationFunctionLabelMax: 'max',
aggregationFunctionLabelSize: 'size',
// Pivot panel
pivotToggleLabel: 'Pivot',
pivotRows: 'Rows',
pivotColumns: 'Columns',
pivotValues: 'Values',
pivotCloseButton: 'Close pivot settings',
pivotSearchButton: 'Search fields',
pivotSearchControlPlaceholder: 'Search fields',
pivotSearchControlLabel: 'Search fields',
pivotSearchControlClear: 'Clear search',
pivotNoFields: 'No fields',
pivotMenuMoveUp: 'Move up',
pivotMenuMoveDown: 'Move down',
pivotMenuMoveToTop: 'Move to top',
pivotMenuMoveToBottom: 'Move to bottom',
pivotMenuRows: 'Rows',
pivotMenuColumns: 'Columns',
pivotMenuValues: 'Values',
pivotMenuOptions: 'Field options',
pivotMenuAddToRows: 'Add to Rows',
pivotMenuAddToColumns: 'Add to Columns',
pivotMenuAddToValues: 'Add to Values',
pivotMenuRemove: 'Remove',
pivotDragToRows: 'Drag here to create rows',
pivotDragToColumns: 'Drag here to create columns',
pivotDragToValues: 'Drag here to create values',
pivotYearColumnHeaderName: '(Year)',
pivotQuarterColumnHeaderName: '(Quarter)',
// Charts configuration panel
chartsNoCharts: 'There are no charts available',
chartsChartNotSelected: 'Select a chart type to configure its options',
chartsTabChart: 'Chart',
chartsTabFields: 'Fields',
chartsTabCustomize: 'Customize',
chartsCloseButton: 'Close charts configuration',
chartsSyncButtonLabel: 'Sync chart',
chartsSearchPlaceholder: 'Search fields',
chartsSearchLabel: 'Search fields',
chartsSearchClear: 'Clear search',
chartsNoFields: 'No fields',
chartsFieldBlocked: 'This field cannot be added to any section',
chartsCategories: 'Categories',
chartsSeries: 'Series',
chartsMenuAddToDimensions: dimensionLabel => `Add to ${dimensionLabel}`,
chartsMenuAddToValues: valuesLabel => `Add to ${valuesLabel}`,
chartsMenuMoveUp: 'Move up',
chartsMenuMoveDown: 'Move down',
chartsMenuMoveToTop: 'Move to top',
chartsMenuMoveToBottom: 'Move to bottom',
chartsMenuOptions: 'Field options',
chartsMenuRemove: 'Remove',
chartsDragToDimensions: dimensionLabel => `Drag here to use column as ${dimensionLabel}`,
chartsDragToValues: valuesLabel => `Drag here to use column as ${valuesLabel}`,
// AI Assistant panel
aiAssistantPanelTitle: 'AI Assistant',
aiAssistantPanelClose: 'Close AI Assistant',
aiAssistantPanelNewConversation: 'New conversation',
aiAssistantPanelConversationHistory: 'Conversation history',
aiAssistantPanelEmptyConversation: 'No prompt history',
aiAssistantSuggestions: 'Suggestions',
// Prompt field
promptFieldLabel: 'Prompt',
promptFieldPlaceholder: 'Type a prompt…',
promptFieldPlaceholderWithRecording: 'Type or record a prompt…',
promptFieldPlaceholderListening: 'Listening for prompt…',
promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
promptFieldSend: 'Send',
promptFieldRecord: 'Record',
promptFieldStopRecording: 'Stop recording',
// Prompt
promptRerun: 'Run again',
promptProcessing: 'Processing…',
promptAppliedChanges: 'Applied changes',
// Prompt changes
promptChangeGroupDescription: column => `Group by ${column}`,
promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
promptChangeAggregationDescription: (column, aggregation) => `Aggregate ${column} (${aggregation})`,
promptChangeFilterLabel: (column, operator, value) => {
if (operator === 'is any of') {
return `${column} is any of: ${value}`;
}
return `${column} ${operator} ${value}`;
},
promptChangeFilterDescription: (column, operator, value) => {
if (operator === 'is any of') {
return `Filter where ${column} is any of: ${value}`;
}
return `Filter where ${column} ${operator} ${value}`;
},
promptChangeSortDescription: (column, direction) => `Sort by ${column} (${direction})`,
promptChangePivotEnableLabel: 'Pivot',
promptChangePivotEnableDescription: 'Enable pivot',
promptChangePivotColumnsLabel: count => `Columns (${count})`,
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
promptChangePivotRowsLabel: count => `Rows (${count})`,
promptChangePivotValuesLabel: count => `Values (${count})`,
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
};
+9
View File
@@ -0,0 +1,9 @@
/**
* Signal to the underlying logic what version of the public component API
* of the Data Grid is exposed.
*/
export declare enum GridSignature {
DataGrid = "DataGrid",
DataGridPro = "DataGridPro",
DataGridPremium = "DataGridPremium",
}
+9
View File
@@ -0,0 +1,9 @@
/**
* Signal to the underlying logic what version of the public component API
* of the Data Grid is exposed.
*/
export declare enum GridSignature {
DataGrid = "DataGrid",
DataGridPro = "DataGridPro",
DataGridPremium = "DataGridPremium",
}
+16
View File
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.GridSignature = void 0;
/**
* Signal to the underlying logic what version of the public component API
* of the Data Grid is exposed.
*/
let GridSignature = exports.GridSignature = /*#__PURE__*/function (GridSignature) {
GridSignature["DataGrid"] = "DataGrid";
GridSignature["DataGridPro"] = "DataGridPro";
GridSignature["DataGridPremium"] = "DataGridPremium";
return GridSignature;
}({});
+10
View File
@@ -0,0 +1,10 @@
/**
* Signal to the underlying logic what version of the public component API
* of the Data Grid is exposed.
*/
export let GridSignature = /*#__PURE__*/function (GridSignature) {
GridSignature["DataGrid"] = "DataGrid";
GridSignature["DataGridPro"] = "DataGridPro";
GridSignature["DataGridPremium"] = "DataGridPremium";
return GridSignature;
}({});