@m4l/components 9.1.120 → 9.1.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/decorators/WithAppearanceContext/index.d.ts +0 -0
- package/.storybook/utils/getStylesColorsByMode.d.ts +4 -4
- package/components/DataGrid/contexts/DataGridContext/index.js +3 -5
- package/components/DataGrid/contexts/DataGridContext/types.d.ts +1 -3
- package/components/DataGrid/contexts/FilterContext/index.d.ts +1 -1
- package/components/DataGrid/dictionary.d.ts +18 -0
- package/components/DataGrid/dictionary.js +19 -1
- package/components/DataGrid/formatters/ColumnBooleanFormatter/index.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.js +1 -1
- package/components/DataGrid/formatters/ColumnDateFormatter/index.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/index.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/index.js +1 -2
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.js +1 -3
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/index.d.ts +0 -3
- package/components/DataGrid/hooks/useDataGrid.d.ts +2 -1
- package/components/DataGrid/icons.d.ts +15 -0
- package/components/DataGrid/icons.js +18 -0
- package/components/DataGrid/index.d.ts +5 -1
- package/components/DataGrid/index.js +5 -10
- package/components/DataGrid/slots/DataGridEnum.d.ts +30 -0
- package/components/DataGrid/slots/DataGridEnum.js +44 -0
- package/components/DataGrid/slots/DataGridSlot.d.ts +48 -0
- package/components/DataGrid/slots/DataGridSlot.js +97 -0
- package/components/DataGrid/styles.d.ts +2 -1
- package/components/DataGrid/styles.js +479 -12
- package/components/DataGrid/subcomponents/Actions/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/index.js +7 -7
- package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.js +13 -12
- package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/index.js +5 -6
- package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.js +14 -13
- package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/index.js +7 -6
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/index.js +2 -4
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +28 -27
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/types.d.ts +1 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js +11 -11
- package/components/DataGrid/subcomponents/Actions/types.d.ts +1 -1
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +1 -1
- package/components/DataGrid/subcomponents/Table/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Table/index.js +5 -4
- package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -2
- package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +12 -43
- package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +2 -2
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/index.d.ts +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/index.js +2 -4
- package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +0 -1
- package/components/DataGrid/subcomponents/editors/TextEditor/index.js +3 -28
- package/components/DataGrid/tests/DataGrid.test.d.ts +1 -0
- package/components/DataGrid/types.d.ts +6 -0
- package/components/gclick/MyDevice/MyDevice.js +1 -1
- package/package.json +1 -1
- package/components/DataGrid/classes/constants.d.ts +0 -1
- package/components/DataGrid/classes/constants.js +0 -4
- package/components/DataGrid/classes/index.d.ts +0 -33
- package/components/DataGrid/classes/index.js +0 -71
- package/components/DataGrid/classes/types.d.ts +0 -30
- package/components/DataGrid/formatters/ColumnDateFormatter/styles.d.ts +0 -1
- package/components/DataGrid/subcomponents/Actions/styles.d.ts +0 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/types.d.ts +0 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/types.d.ts +0 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +0 -7
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.js +0 -50
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +0 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.js +0 -10
- /package/components/DataGrid/subcomponents/Actions/subcomponents/{Settings/types.d.ts → types.d.ts} +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Maybe } from '@m4l/core';
|
|
2
|
+
import { Theme } from '@mui/material/styles';
|
|
2
3
|
import { Column, RowsChangeData, FormatterProps } from 'react-data-grid';
|
|
3
4
|
import { MenuAction } from '../MenuActions/types';
|
|
4
5
|
import { ActionsProps } from './subcomponents/Actions/types';
|
|
6
|
+
import { ActionsSlots, ColumnsConfigSlots, DataGridSlots, RowsCountSlots, TableSlots, TextEditorSlots } from './slots/DataGridEnum';
|
|
7
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
8
|
+
import { DATAGRID_PREFIX_NAME } from './constants';
|
|
5
9
|
export type GridFormatterPropss<T, SR> = FormatterProps<T, SR>;
|
|
6
10
|
export type { ColumnUncertaintyFormatter, ColumnPointsFormatter, ColumnNestedValueFormatter, } from './formatters';
|
|
7
11
|
export declare type ColumnType = 'string' | 'date' | 'number' | 'boolean' | 'custom';
|
|
@@ -69,3 +73,5 @@ export declare interface DataGridProps<TRow, TSummaryRow, TKey extends RowKey =
|
|
|
69
73
|
export interface OwnerState extends WithActionsProps {
|
|
70
74
|
actionsProps: ActionsProps;
|
|
71
75
|
}
|
|
76
|
+
export type DataGridSlotsType = DataGridSlots | TextEditorSlots | ActionsSlots | RowsCountSlots | ColumnsConfigSlots | TableSlots;
|
|
77
|
+
export type DataGridStyles = OverridesStyleRules<DataGridSlotsType, typeof DATAGRID_PREFIX_NAME, Theme>;
|
|
@@ -10,7 +10,7 @@ const MyDevice = (props) => {
|
|
|
10
10
|
for (const match of matches) {
|
|
11
11
|
const r = getPropertyByString(props.deviceData, match.slice(1, -1));
|
|
12
12
|
if (typeof r === "string" || typeof r === "number" || typeof r === "boolean") {
|
|
13
|
-
label = label.replaceAll(match, r);
|
|
13
|
+
label = label.replaceAll(match, r.toString());
|
|
14
14
|
} else {
|
|
15
15
|
label = label.replaceAll(match, "err");
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const componentName = "M4LDataGrid";
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { DataGridClassesType } from './types';
|
|
2
|
-
import { OwnerState } from '../types';
|
|
3
|
-
export declare const dataGridClasses: DataGridClassesType;
|
|
4
|
-
export declare function getDataGridUtilityClass(slot: string): string;
|
|
5
|
-
/**
|
|
6
|
-
* TODO: Documentar
|
|
7
|
-
*/
|
|
8
|
-
export declare const dataGridUtilityClasses: (ownerState: OwnerState) => {
|
|
9
|
-
root: string;
|
|
10
|
-
actions: string;
|
|
11
|
-
rowsCount: string;
|
|
12
|
-
rowsCountLabel: string;
|
|
13
|
-
rowsCountValue: string;
|
|
14
|
-
densitySkeleton: string;
|
|
15
|
-
densityRoot: string;
|
|
16
|
-
densityPopover: string;
|
|
17
|
-
actionFilter: string;
|
|
18
|
-
actionDensityPopover: string;
|
|
19
|
-
tableContaniner: string;
|
|
20
|
-
wrapperDataGridCss: string;
|
|
21
|
-
columnsConfigContainer: string;
|
|
22
|
-
columnsLabelSetColumns: string;
|
|
23
|
-
columnsConfigContent: string;
|
|
24
|
-
columnsConfigGrid: string;
|
|
25
|
-
columnsConfigActions: string;
|
|
26
|
-
formatterColumn: string;
|
|
27
|
-
skeletonFormatter: string;
|
|
28
|
-
actionsFormatter: string;
|
|
29
|
-
actionsConfigContainer: string;
|
|
30
|
-
booleanFormatter: string;
|
|
31
|
-
iconFormatter: string;
|
|
32
|
-
actionSettings: string;
|
|
33
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
import { c as componentName } from "./constants.js";
|
|
4
|
-
const dataGridClasses = generateUtilityClasses(componentName, [
|
|
5
|
-
/* elements */
|
|
6
|
-
"root",
|
|
7
|
-
"actions",
|
|
8
|
-
"withPager",
|
|
9
|
-
"withNoPager",
|
|
10
|
-
"rowsCount",
|
|
11
|
-
"rowsCountLabel",
|
|
12
|
-
"rowsCountValue",
|
|
13
|
-
"densitySkeleton",
|
|
14
|
-
"actionDensityPopover",
|
|
15
|
-
"actionFilter",
|
|
16
|
-
"actionSettings",
|
|
17
|
-
"tableContaniner",
|
|
18
|
-
"wrapperDataGridCss",
|
|
19
|
-
"columnsConfigContainer",
|
|
20
|
-
"columnsLabelSetColumns",
|
|
21
|
-
"columnsConfigContent",
|
|
22
|
-
"columnsConfigGrid",
|
|
23
|
-
"columnsConfigActions",
|
|
24
|
-
"formatterColumn",
|
|
25
|
-
"skeletonFormatter",
|
|
26
|
-
"actionsFormatter",
|
|
27
|
-
"actionsConfigContainer",
|
|
28
|
-
"booleanFormatter",
|
|
29
|
-
"iconFormatter",
|
|
30
|
-
/* states or variants of elements */
|
|
31
|
-
"withActions"
|
|
32
|
-
]);
|
|
33
|
-
function getDataGridUtilityClass(slot) {
|
|
34
|
-
return generateUtilityClass(componentName, slot);
|
|
35
|
-
}
|
|
36
|
-
const dataGridUtilityClasses = (ownerState) => {
|
|
37
|
-
const slots = {
|
|
38
|
-
root: ["root"],
|
|
39
|
-
actions: ["actions", ownerState.actionsProps.withPager ? "withPager" : "withNoPager"],
|
|
40
|
-
rowsCount: ["rowsCount"],
|
|
41
|
-
rowsCountLabel: ["rowsCountLabel"],
|
|
42
|
-
rowsCountValue: ["rowsCountValue"],
|
|
43
|
-
densitySkeleton: ["densitySkeleton"],
|
|
44
|
-
densityRoot: ["densityRoot"],
|
|
45
|
-
densityPopover: ["densityPopover"],
|
|
46
|
-
actionFilter: ["actionFilter"],
|
|
47
|
-
actionSettings: ["actionSettingsRoot"],
|
|
48
|
-
actionDensityPopover: ["actionDensityPopover"],
|
|
49
|
-
tableContaniner: ["tableContaniner", ownerState.withActions && "withActions"],
|
|
50
|
-
wrapperDataGridCss: ["wrapperDataGridCss"],
|
|
51
|
-
columnsConfigContainer: ["columnsConfigContainer"],
|
|
52
|
-
columnsLabelSetColumns: ["columnsLabelSetColumns"],
|
|
53
|
-
columnsConfigContent: ["columnsConfigContent"],
|
|
54
|
-
columnsConfigGrid: ["columnsConfigGrid"],
|
|
55
|
-
columnsConfigActions: ["columnsConfigActions"],
|
|
56
|
-
formatterColumn: ["formatterColumn"],
|
|
57
|
-
skeletonFormatter: ["skeletonFormatter"],
|
|
58
|
-
actionsFormatter: ["actionsFormatter"],
|
|
59
|
-
actionsConfigContainer: ["actionsConfigContainer"],
|
|
60
|
-
booleanFormatter: ["booleanFormatter"],
|
|
61
|
-
iconFormatter: ["iconFormatter"]
|
|
62
|
-
};
|
|
63
|
-
const composedClasses = unstable_composeClasses(slots, getDataGridUtilityClass, {});
|
|
64
|
-
return {
|
|
65
|
-
...composedClasses
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
export {
|
|
69
|
-
dataGridUtilityClasses as a,
|
|
70
|
-
dataGridClasses as d
|
|
71
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { dataGridUtilityClasses } from '.';
|
|
2
|
-
export interface DataGridClassesType {
|
|
3
|
-
root: string;
|
|
4
|
-
actions: string;
|
|
5
|
-
withPager: string;
|
|
6
|
-
withNoPager: string;
|
|
7
|
-
rowsCount: string;
|
|
8
|
-
rowsCountLabel: string;
|
|
9
|
-
rowsCountValue: string;
|
|
10
|
-
densitySkeleton: string;
|
|
11
|
-
actionDensityPopover: string;
|
|
12
|
-
actionFilter: string;
|
|
13
|
-
actionSettings: string;
|
|
14
|
-
tableContaniner: string;
|
|
15
|
-
wrapperDataGridCss: string;
|
|
16
|
-
columnsConfigContainer: string;
|
|
17
|
-
columnsLabelSetColumns: string;
|
|
18
|
-
columnsConfigContent: string;
|
|
19
|
-
columnsConfigGrid: string;
|
|
20
|
-
columnsConfigActions: string;
|
|
21
|
-
formatterColumn: string;
|
|
22
|
-
skeletonFormatter: string;
|
|
23
|
-
actionsFormatter: string;
|
|
24
|
-
actionsConfigContainer: string;
|
|
25
|
-
booleanFormatter: string;
|
|
26
|
-
iconFormatter: string;
|
|
27
|
-
withActions: string;
|
|
28
|
-
}
|
|
29
|
-
export type BadgeClassesKey = keyof DataGridClassesType;
|
|
30
|
-
export type Classes = ReturnType<typeof dataGridUtilityClasses>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Container: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const WrapperActions: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const WrapperColumnsConfig: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
|
-
export declare const DivAll: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
-
export declare const DivSelColumns: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
|
-
export declare const WrapperDataGrid: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
-
export declare const DivColumn: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const ColumnActions: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
-
export declare const DialogActions: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material/styles";
|
|
2
|
-
const WrapperColumnsConfig = styled("div")(({ theme }) => ({
|
|
3
|
-
color: theme.vars.palette.text.primary,
|
|
4
|
-
position: "relative",
|
|
5
|
-
display: "flex",
|
|
6
|
-
flexDirection: "column",
|
|
7
|
-
height: "100%",
|
|
8
|
-
width: "100%"
|
|
9
|
-
}));
|
|
10
|
-
styled("div")(({ theme }) => ({
|
|
11
|
-
color: theme.vars.palette.text.primary,
|
|
12
|
-
fontSize: theme.typography.h4.fontSize
|
|
13
|
-
}));
|
|
14
|
-
const DivSelColumns = styled("div")(({ theme }) => ({
|
|
15
|
-
...theme.colorSchemes.finalTheme.typography.bodyDens,
|
|
16
|
-
color: theme.vars.palette.text.primary,
|
|
17
|
-
padding: `16px 8px`
|
|
18
|
-
}));
|
|
19
|
-
const WrapperDataGrid = styled("div")(() => ({
|
|
20
|
-
position: "relative",
|
|
21
|
-
display: "flex",
|
|
22
|
-
flexDirection: "column",
|
|
23
|
-
flexGrow: 1,
|
|
24
|
-
overflow: "auto"
|
|
25
|
-
}));
|
|
26
|
-
styled("div")(() => ({
|
|
27
|
-
display: "flex",
|
|
28
|
-
flexDirection: "row"
|
|
29
|
-
}));
|
|
30
|
-
const ColumnActions = styled("div")(() => ({
|
|
31
|
-
paddingTop: "16px",
|
|
32
|
-
paddingBottom: "8px",
|
|
33
|
-
display: "flex",
|
|
34
|
-
flexDirection: "row"
|
|
35
|
-
}));
|
|
36
|
-
styled("div")(({ theme }) => ({
|
|
37
|
-
paddingTop: theme.spacing(3),
|
|
38
|
-
display: "flex",
|
|
39
|
-
flexDirection: "row",
|
|
40
|
-
justifyContent: "flex-end",
|
|
41
|
-
"& > button": {
|
|
42
|
-
marginLeft: "10px"
|
|
43
|
-
}
|
|
44
|
-
}));
|
|
45
|
-
export {
|
|
46
|
-
ColumnActions as C,
|
|
47
|
-
DivSelColumns as D,
|
|
48
|
-
WrapperColumnsConfig as W,
|
|
49
|
-
WrapperDataGrid as a
|
|
50
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const WrapperSkeleton: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
/package/components/DataGrid/subcomponents/Actions/subcomponents/{Settings/types.d.ts → types.d.ts}
RENAMED
|
File without changes
|