@m4l/components 0.1.78 → 0.1.80

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.
Files changed (77) hide show
  1. package/@types/export.d.ts +31 -1
  2. package/components/AccountPopover/{index.7e76dbb7.js → index.00d1d15f.js} +10 -6
  3. package/components/AppBar/{index.06858422.js → index.c85b100d.js} +5 -4
  4. package/components/CommonActions/components/ActionCancel/{index.d536ccfa.js → index.1051a117.js} +1 -1
  5. package/components/CommonActions/components/ActionFormCancel/{index.a915b105.js → index.a0d727b2.js} +18 -13
  6. package/components/CommonActions/components/ActionFormIntro/{index.14e65d6c.js → index.a20dc88d.js} +1 -1
  7. package/components/CommonActions/components/ActionIntro/{index.aa1648eb.js → index.bfe3256c.js} +1 -1
  8. package/components/CommonActions/components/Actions/{index.52125041.js → index.19d67bc6.js} +10 -9
  9. package/components/DataGrid/classes/constants.d.ts +1 -0
  10. package/components/DataGrid/classes/index.d.ts +27 -0
  11. package/components/DataGrid/classes/types.d.ts +27 -0
  12. package/components/DataGrid/contexts/DataGridContext/types.d.ts +3 -1
  13. package/components/DataGrid/{index.9fb3e6a1.js → index.2f175eba.js} +173 -316
  14. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/subcomponents/FormatterColumn/index.d.ts +2 -2
  15. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/subcomponents/FormatterColumn/types.d.ts +3 -0
  16. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/types.d.ts +2 -0
  17. package/components/DataGrid/types.d.ts +7 -0
  18. package/components/DynamicFilter/{index.d1a2e2d1.js → index.c1f9d560.js} +23 -22
  19. package/components/GridLayout/Responsive/{index.0905a698.js → index.1671380a.js} +1 -1
  20. package/components/GridLayout/{index.da6fd387.js → index.a792aacb.js} +2 -2
  21. package/components/HelperText/{index.a019742c.js → index.6ef76993.js} +5 -4
  22. package/components/LanguagePopover/{index.98b63dcb.js → index.1564bd08.js} +5 -4
  23. package/components/ModalDialog/{index.d9937d46.js → index.fbc4cd71.js} +3 -3
  24. package/components/NavLink/{index.a5dea6d3.js → index.6c9c2588.js} +5 -4
  25. package/components/ObjectLogs/{index.d9d20b9d.js → index.eab1c15f.js} +14 -13
  26. package/components/Period/{index.7b94c418.js → index.26071a16.js} +16 -15
  27. package/components/PropertyValue/{index.45c73161.js → index.18d3c0fd.js} +1 -1
  28. package/components/areas/components/AreasAdmin/{index.43ecd998.js → index.7a0dabbe.js} +23 -22
  29. package/components/areas/components/AreasViewer/{index.14e62059.js → index.fd49f06c.js} +41 -34
  30. package/components/areas/components/{index.a87653a9.js → index.7756928a.js} +8 -7
  31. package/components/areas/contexts/AreasContext/{index.02c4e7be.js → index.0a08a08b.js} +9 -4
  32. package/components/areas/contexts/AreasContext/types.d.ts +1 -0
  33. package/components/areas/contexts/WindowToolsMFContext/types.d.ts +1 -0
  34. package/components/areas/contexts/{index.1ff9b360.js → index.b303b664.js} +1 -1
  35. package/components/areas/hooks/useAreas/{index.85e4b2e2.js → index.c6eb2569.js} +1 -1
  36. package/components/areas/{index.d1dcccf5.js → index.6e67d89a.js} +8 -7
  37. package/components/areas/types.d.ts +5 -0
  38. package/components/hook-form/RHFAutocomplete/classes/index.d.ts +4 -0
  39. package/components/hook-form/RHFAutocomplete/classes/types.d.ts +6 -0
  40. package/components/hook-form/RHFAutocomplete/{index.6aa51705.js → index.d1bbb015.js} +34 -51
  41. package/components/hook-form/RHFAutocomplete/subcomponents/Skeleton/types.d.ts +2 -1
  42. package/components/hook-form/RHFAutocompleteAsync/{index.1a3dfe5f.js → index.f9a9ef48.js} +1 -1
  43. package/components/hook-form/RHFCheckbox/{index.a08a65b3.js → index.7b4a21d7.js} +42 -67
  44. package/components/hook-form/RHFCheckbox/types.d.ts +2 -1
  45. package/components/hook-form/RHFDateTime/{index.4d671108.js → index.46cf616e.js} +9 -7
  46. package/components/hook-form/RHFPeriod/{index.39b4be49.js → index.ce513149.js} +2 -2
  47. package/components/hook-form/RHFTextField/{index.9004e898.js → index.f7ee202c.js} +4 -3
  48. package/components/hook-form/RHFUpload/{index.bed8573e.js → index.1befd5bb.js} +6 -5
  49. package/components/modal/{WindowBase.a0c0b322.js → WindowBase.7e19843e.js} +8 -6
  50. package/components/modal/{WindowConfirm.6c063f2d.js → WindowConfirm.12a9608a.js} +13 -12
  51. package/components/modal/{index.00efea85.js → index.b0a7236c.js} +10 -9
  52. package/components/mui_extended/Accordion/{index.9877f7bf.js → index.a6447bf8.js} +1 -1
  53. package/components/mui_extended/Badge/classes/constants.d.ts +1 -1
  54. package/components/mui_extended/Badge/{index.8c2b8b66.js → index.cad260fe.js} +1 -1
  55. package/components/mui_extended/CheckBox/CheckBox.d.ts +3 -0
  56. package/components/mui_extended/CheckBox/classes/constants.d.ts +1 -0
  57. package/components/mui_extended/CheckBox/classes/index.d.ts +8 -0
  58. package/components/mui_extended/CheckBox/classes/types.d.ts +10 -0
  59. package/components/mui_extended/CheckBox/index.d.ts +1 -0
  60. package/components/mui_extended/CheckBox/subcomponents/Skeleton/index.d.ts +3 -0
  61. package/components/mui_extended/CheckBox/subcomponents/Skeleton/types.d.ts +4 -0
  62. package/components/mui_extended/CheckBox/types.d.ts +5 -0
  63. package/components/mui_extended/CheckBox.5f6c78b0.js +86 -0
  64. package/components/mui_extended/Pager/classes/constants.d.ts +1 -0
  65. package/components/mui_extended/Pager/classes/index.d.ts +10 -0
  66. package/components/mui_extended/Pager/classes/types.d.ts +10 -0
  67. package/components/mui_extended/Pager/{index.2f6d6d7d.js → index.82e89328.js} +67 -31
  68. package/components/mui_extended/Tab/{index.7c82e43d.js → index.c39a6681.js} +1 -1
  69. package/components/mui_extended/index.d.ts +1 -0
  70. package/components/mui_extended/{index.0e2ff642.js → index.d78bde19.js} +5 -4
  71. package/contexts/ModalContext/{index.e9a7ba4a.js → index.89805978.js} +1 -1
  72. package/hooks/useModal/{index.8e85f7ae.js → index.e1c5c31e.js} +1 -1
  73. package/index.js +46 -44
  74. package/package.json +1 -1
  75. package/{vendor.e353394b.js → vendor.f57d47a7.js} +38 -37
  76. package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/index.d.ts +0 -3
  77. package/components/hook-form/RHFCheckbox/subcomponents/Skeleton/types.d.ts +0 -5
@@ -1,199 +1,63 @@
1
- import { styled, alpha } from "@mui/material/styles";
1
+ import { styled } from "@mui/material/styles";
2
2
  import { forwardRef, createContext, useState, useMemo, useEffect, useCallback, useContext, useRef, useLayoutEffect, useImperativeHandle } from "react";
3
3
  import { S as SELECT_COLUMN_KEY, u as useRowSelection, a as SelectCellFormatter, H as HeaderRenderer, D as DataGrid$1 } from "../../react-data-grid.d46d625e.js";
4
4
  import { useDrag, useDrop, DndProvider } from "react-dnd";
5
5
  import { HTML5Backend } from "react-dnd-html5-backend";
6
- import { SvgIcon, Checkbox, InputBase, Skeleton } from "@mui/material";
6
+ import { SvgIcon, Checkbox, InputBase, useTheme, Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
7
7
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
8
8
  import { voidFunction, useModuleDictionary, useModuleSkeleton, getPropertyByString, useEnvironment } from "@m4l/core";
9
9
  import { M as MenuActions } from "../mui_extended/MenuActions/index.43a2e1ae.js";
10
- import { g as getPagerComponentsDictionary, P as Pager } from "../mui_extended/Pager/index.2f6d6d7d.js";
10
+ import { g as getPagerComponentsDictionary, P as Pager } from "../mui_extended/Pager/index.82e89328.js";
11
11
  import { I as IconButton } from "../mui_extended/IconButton/index.12f1a3c3.js";
12
- import { u as useModal } from "../../hooks/useModal/index.8e85f7ae.js";
13
- import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.d536ccfa.js";
14
- import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.aa1648eb.js";
12
+ import { unstable_composeClasses } from "@mui/base";
13
+ import { u as useModal } from "../../hooks/useModal/index.e1c5c31e.js";
14
+ import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.1051a117.js";
15
+ import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.bfe3256c.js";
15
16
  import "../../react-draggable.7abb5d0a.js";
16
17
  import "../Resizeable/index.9a9c79a4.js";
17
18
  import { useResponsiveDesktop } from "@m4l/graphics";
18
19
  import "../Icon/index.9fcd1476.js";
19
20
  import "clsx";
20
- import "../modal/index.00efea85.js";
21
- import { A as Actions$1 } from "../CommonActions/components/Actions/index.52125041.js";
21
+ import "../modal/index.b0a7236c.js";
22
+ import { A as Actions$1 } from "../CommonActions/components/Actions/index.19d67bc6.js";
22
23
  import "react-hook-form";
23
24
  import "@mui/material/Button";
24
25
  import "../mui_extended/Button/index.4288f9fc.js";
25
26
  import "zustand";
26
- import "../areas/contexts/AreasContext/index.02c4e7be.js";
27
- import "../areas/components/AreasAdmin/index.43ecd998.js";
27
+ import "../areas/contexts/AreasContext/index.0a08a08b.js";
28
+ import "../areas/components/AreasAdmin/index.7a0dabbe.js";
28
29
  import "zustand/shallow";
29
30
  import "../ScrollBar/index.bbe48f4d.js";
30
- import "../mui_extended/Accordion/index.9877f7bf.js";
31
+ import "../mui_extended/Accordion/index.a6447bf8.js";
31
32
  import "../mui_extended/Typography/index.443590d6.js";
32
33
  import "../mui_extended/Avatar/index.75e6ed57.js";
33
34
  import "react-router-dom";
34
- import "../mui_extended/Badge/index.8c2b8b66.js";
35
+ import "../mui_extended/CheckBox.5f6c78b0.js";
36
+ import "../mui_extended/Badge/index.cad260fe.js";
35
37
  import "../Image/index.c18ebf5a.js";
36
38
  import "@mui/lab";
37
39
  import "../mui_extended/Popover/index.9f35d0eb.js";
38
- import "../mui_extended/Tab/index.7c82e43d.js";
40
+ import "../mui_extended/Tab/index.c39a6681.js";
39
41
  import "../mui_extended/Tooltip/index.5a795dcd.js";
40
- import "../areas/components/AreasViewer/index.14e62059.js";
42
+ import "../areas/components/AreasViewer/index.fd49f06c.js";
41
43
  import "../LinearProgressIndeterminate/index.60dabc06.js";
42
44
  import "../areas/contexts/WindowToolsMFContext/index.8f3e2a04.js";
43
45
  import "../areas/contexts/DynamicMFParmsContext/index.1607c78e.js";
44
- import { W as WindowBase } from "../modal/WindowBase.a0c0b322.js";
45
- import { g as getModalDialogComponentsDictionary } from "../ModalDialog/index.d9937d46.js";
46
+ import { W as WindowBase } from "../modal/WindowBase.7e19843e.js";
47
+ import { g as getModalDialogComponentsDictionary } from "../ModalDialog/index.fbc4cd71.js";
46
48
  import { B as BooleanFormatter } from "../formatters/BooleanFormatter/index.e8de8e4c.js";
47
49
  import { D as DateFormatter } from "../formatters/DateFormatter/index.578a9f53.js";
48
50
  import { C as ConcatenatedFormatter } from "../formatters/index.67aeb049.js";
49
- const WrapperGrid = styled("div")(() => ({
50
- display: "flex",
51
- flexDirection: "column",
52
- position: "absolute",
53
- padding: "0px",
54
- inset: "0px",
55
- overflow: "hidden"
56
- }));
57
- const OriginalDataGridWrapperStyled = styled("div")(({
58
- theme
59
- }) => ({
60
- position: "absolute",
61
- bottom: "0px",
62
- top: "0px",
63
- left: "0px",
64
- right: "0px",
65
- "& .rdg ": {
66
- userSelect: "initial",
67
- height: "100%",
68
- contentVisibility: "unset",
69
- overflow: "scroll",
70
- borderRadius: "5px",
71
- "--rdg-grid-inline-size": "0px",
72
- "--rdg-header-background-color": theme.palette.grid?.sectionHeader,
73
- "--rdg-row-selected-background-color": theme.palette.mode === "light" ? theme.palette.primary.LightSelected : theme.palette.primary.DarkSelected,
74
- "--rdg-row-hover-background-color": theme.palette.grid?.rowHover,
75
- "--rdg-background-color": theme.palette.background.default,
76
- "--rdg-selection-color": theme.palette.primary.main,
77
- "--row-selected-hover-background-color": theme.palette.mode === "light" ? theme.palette.primary.LightSelectedHover : theme.palette.primary.DarkSelectedHover,
78
- "--rdg-checkbox-color": theme.palette.primary.main,
79
- "--rdg-checkbox-focus-color": alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
80
- "--rdg-border-color": theme.palette.divider
81
- },
82
- "& .rdg::-webkit-scrollbar": {
83
- width: "6px",
84
- height: "6px",
85
- borderRadius: "3px",
86
- backgroundColor: "transparent"
87
- },
88
- "& .rdg::-webkit-scrollbar-track": {
89
- backgroundColor: "transparent",
90
- border: "0px solid transparent"
91
- },
92
- "& .rdg::-webkit-scrollbar-corner": {
93
- backgroundColor: "transparent"
94
- },
95
- "& ::-webkit-scrollbar-thumb": {
96
- borderRadius: "10px",
97
- backgroundColor: theme.palette.divider,
98
- border: "0px solid transparent"
99
- },
100
- '& [role="columnheader"]': {
101
- justifyContent: "center",
102
- alignItems: "center"
103
- },
104
- "& .rdg-cell": {
105
- fontFamily: theme.typography.body2.fontFamily,
106
- fontWeight: theme.typography.body2.fontWeight,
107
- fontSize: theme.typography.body2.fontSize,
108
- color: theme.palette.text.secondary,
109
- borderBottom: `1px solid ${theme.palette.divider}`,
110
- borderRight: `0px solid transparent`,
111
- position: "relative",
112
- "&.rdg-cell-frozen": {
113
- position: "sticky"
114
- },
115
- "&:after": {
116
- content: `""`,
117
- borderRight: `1px solid ${theme.palette.divider}`,
118
- position: "absolute",
119
- right: "0px",
120
- top: "25%",
121
- bottom: "25%"
122
- },
123
- "& .m4l_icon": {
124
- height: "100%"
125
- }
126
- },
127
- "& .rdg-cell.rdg-cell-align-left": {
128
- textAlign: "left"
129
- },
130
- "& .rdg-cell.rdg-cell-align-center": {
131
- textAlign: "center"
132
- },
133
- "& .rdg-cell.rdg-cell-align-right": {
134
- textAlign: "right"
135
- },
136
- "& .rdg-row .rdg-cell-frozen-last:after": {
137
- borderRight: `0px solid transparent`,
138
- boxShadow: "none"
139
- },
140
- "& .rdg-row :last-child:after": {
141
- borderRight: `0px solid transparent`
142
- },
143
- "& .rdg-header-row .rdg-cell": {
144
- fontFamily: theme.typography.subtitle2.fontFamily,
145
- fontWeight: theme.typography.subtitle2.fontWeight,
146
- fontSize: theme.typography.subtitle2.fontSize,
147
- color: theme.palette.text.primary,
148
- borderRight: `0px solid transparent`,
149
- boxShadow: "none",
150
- "&.rdg-cell-frozen-last": {
151
- "&:after": {
152
- borderRight: `0px solid transparent`
153
- },
154
- boxShadow: "var(--rdg-frozen-cell-box-shadow)"
155
- },
156
- "& .rdg-sort-arrow": {
157
- width: theme.spacing(1),
158
- margin: `0 ${theme.spacing(0.5)}`
159
- }
160
- },
161
- "& .rdg-header-row :last-child.rdg-cell": {
162
- borderTopRightRadius: "5px",
163
- "&:after": {
164
- borderRight: `0px solid transparent`
165
- }
166
- },
167
- "& .filter_cell_div": {
168
- paddingLeft: theme.spacing(0.5),
169
- paddingRight: theme.spacing(0.5)
170
- },
171
- "& .rdg-header-sort-cell": {
172
- width: "100%",
173
- flexGrow: "1",
174
- alignItems: "center"
175
- },
176
- '& [aria-columnsort="ASC"]': {
177
- borderTop: `2px solid ${theme.palette.primary.main}`
178
- },
179
- '& [aria-columnsort="DESC"]': {
180
- borderBottom: `2px solid ${theme.palette.primary.main}`
181
- }
182
- }));
183
- const WrapperTable = styled("div", {
184
- shouldForwardProp: (prop) => prop !== "withActions"
185
- })(({
186
- withActions,
51
+ const DataGridRoot = styled("div")(({
187
52
  theme
188
53
  }) => ({
189
54
  display: "flex",
190
55
  flexDirection: "column",
191
56
  position: "absolute",
192
- top: withActions ? theme.spacing(5.5) : "0px",
193
- bottom: "0px",
194
- left: "0px",
195
- right: "0px",
196
- overflow: "hidden"
57
+ padding: "0px",
58
+ inset: "0px",
59
+ overflow: "hidden",
60
+ ...theme.components?.M4LDataGrid?.styleOverrides
197
61
  }));
198
62
  function CheckboxIcon(props) {
199
63
  return /* @__PURE__ */ jsx(SvgIcon, {
@@ -336,7 +200,8 @@ function DataGridProvider(props) {
336
200
  initialRowHeightVariant = "compact",
337
201
  checkedRows,
338
202
  onCheckedRowsChange,
339
- rowKeyGetter
203
+ rowKeyGetter,
204
+ classes
340
205
  } = props;
341
206
  const [columnsWidths, setColumnsWidths] = useState(/* @__PURE__ */ new Map());
342
207
  const [columnsConfig, setColumnsConfigOptions] = useState(() => []);
@@ -426,6 +291,7 @@ function DataGridProvider(props) {
426
291
  onChangeColumnWidth,
427
292
  setRowsCount: setRowFilterCountInternal,
428
293
  rowActionsGetter,
294
+ classes,
429
295
  setRowHeightVariant: setCurrentRowHeightInternal,
430
296
  onCheckedRowsChange,
431
297
  rowKeyGetter
@@ -697,8 +563,10 @@ const getDragHeaderRenderer = (handleColumnsReorder) => {
697
563
  const ACTIONS_COLUMN_KEY = "actions-row";
698
564
  function ActionsFormatter(props) {
699
565
  const {
700
- rowActionsGetter
566
+ rowActionsGetter,
567
+ classes
701
568
  } = useDataGrid();
569
+ const theme = useTheme();
702
570
  if (rowActionsGetter === void 0) {
703
571
  return /* @__PURE__ */ jsx(Fragment, {});
704
572
  }
@@ -706,6 +574,8 @@ function ActionsFormatter(props) {
706
574
  arrowType: "top-left",
707
575
  objItem: props.row,
708
576
  menuActions: rowActionsGetter,
577
+ className: classes.actionsFormatter,
578
+ menuActionSx: theme.components?.M4LDataGridActionsFormatter?.styleOverrides,
709
579
  marginTop: 1,
710
580
  marginLeft: "-11px",
711
581
  anchorOrigin: {
@@ -739,7 +609,11 @@ const WrapperSkeleton = styled("div")(() => ({
739
609
  alignItems: "center"
740
610
  }));
741
611
  function SkeletonFormatter() {
612
+ const {
613
+ classes
614
+ } = useDataGrid();
742
615
  return /* @__PURE__ */ jsx(WrapperSkeleton, {
616
+ className: classes.skeletonFormatter,
743
617
  children: /* @__PURE__ */ jsx(Skeleton, {
744
618
  variant: "text",
745
619
  width: "100%",
@@ -916,7 +790,6 @@ function Table(props) {
916
790
  const {
917
791
  columns,
918
792
  rows,
919
- withActions,
920
793
  onRowsChange,
921
794
  rowKeyGetter,
922
795
  selectedRows,
@@ -935,7 +808,8 @@ function Table(props) {
935
808
  onChangeColumnWidth,
936
809
  setRowsCount,
937
810
  currentRowHeight,
938
- currentRowHeaderHeight
811
+ currentRowHeaderHeight,
812
+ classes
939
813
  } = useDataGrid();
940
814
  const ref_data_grid = useRef(null);
941
815
  const onRowClick = (row) => {
@@ -970,11 +844,10 @@ function Table(props) {
970
844
  const onChangeSort = (newSortColumns) => {
971
845
  setSortColumns(newSortColumns);
972
846
  };
973
- return /* @__PURE__ */ jsx(WrapperTable, {
974
- id: "WrapperTable",
975
- withActions,
976
- children: /* @__PURE__ */ jsx(OriginalDataGridWrapperStyled, {
977
- id: "OriginalGridWrapperStyled",
847
+ return /* @__PURE__ */ jsx("div", {
848
+ className: classes.tableContaniner,
849
+ children: /* @__PURE__ */ jsx("div", {
850
+ className: classes.wrapperDataGridCss,
978
851
  children: /* @__PURE__ */ jsx(DndProvider, {
979
852
  backend: HTML5Backend,
980
853
  context: window,
@@ -1006,17 +879,7 @@ function Table(props) {
1006
879
  })
1007
880
  });
1008
881
  }
1009
- const SKTWrapperFilter = styled("div")(({
1010
- theme
1011
- }) => ({
1012
- display: "flex",
1013
- justifyContent: "center",
1014
- alignItems: "center",
1015
- minWidth: theme.spacing(3.75),
1016
- height: theme.spacing(3.75)
1017
- }));
1018
882
  function Filter() {
1019
- const isSkeleton = useModuleSkeleton();
1020
883
  const {
1021
884
  activeFilters,
1022
885
  setActiveFilters
@@ -1025,20 +888,15 @@ function Filter() {
1025
888
  host_static_assets,
1026
889
  environment_assets
1027
890
  } = useEnvironment();
891
+ const {
892
+ classes
893
+ } = useDataGrid();
1028
894
  const toggleIcon = () => {
1029
895
  setActiveFilters(!activeFilters);
1030
896
  };
1031
- if (isSkeleton) {
1032
- return /* @__PURE__ */ jsx(SKTWrapperFilter, {
1033
- children: /* @__PURE__ */ jsx(Skeleton, {
1034
- variant: "circular",
1035
- width: 20,
1036
- height: 20
1037
- })
1038
- });
1039
- }
1040
897
  return /* @__PURE__ */ jsx(IconButton, {
1041
898
  dictionaryTooltipId: activeFilters ? "data_grid.tooltip_filter_hide" : "data_grid.tooltip_filter_show",
899
+ className: classes.actionFilter,
1042
900
  onClick: toggleIcon,
1043
901
  "aria-label": "filter",
1044
902
  src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/filter.svg`
@@ -1085,11 +943,69 @@ styled("div")(({ theme }) => ({
1085
943
  marginLeft: "10px"
1086
944
  }
1087
945
  }));
1088
- function FormatterColumn({
1089
- row,
1090
- onRowChange,
1091
- column
1092
- }) {
946
+ const componentName = "M4LDataGrid";
947
+ const dataGridClasses = generateUtilityClasses(componentName, [
948
+ "root",
949
+ "actions",
950
+ "withPager",
951
+ "withNoPager",
952
+ "rowsCount",
953
+ "rowsCountLabel",
954
+ "rowsCountValue",
955
+ "densitySkeleton",
956
+ "actionDensityPopover",
957
+ "actionFilter",
958
+ "actionSettings",
959
+ "tableContaniner",
960
+ "wrapperDataGridCss",
961
+ "columnsConfigContainer",
962
+ "columnsLabelSetColumns",
963
+ "columnsConfigContent",
964
+ "columnsConfigGrid",
965
+ "columnsConfigActions",
966
+ "formatterColumn",
967
+ "skeletonFormatter",
968
+ "actionsFormatter",
969
+ "withActions"
970
+ ]);
971
+ function getDataGridUtilityClass(slot) {
972
+ return generateUtilityClass(componentName, slot);
973
+ }
974
+ const dataGridUtilityClasses = (ownerState) => {
975
+ const slots = {
976
+ root: ["root"],
977
+ actions: ["actions", ownerState.actionsProps.withPager ? "withPager" : "withNoPager"],
978
+ rowsCount: ["rowsCount"],
979
+ rowsCountLabel: ["rowsCountLabel"],
980
+ rowsCountValue: ["rowsCountValue"],
981
+ densitySkeleton: ["densitySkeleton"],
982
+ densityRoot: ["densityRoot"],
983
+ densityPopover: ["densityPopover"],
984
+ actionFilter: ["actionFilter"],
985
+ actionSettings: ["actionSettingsRoot"],
986
+ actionDensityPopover: ["actionDensityPopover"],
987
+ tableContaniner: ["tableContaniner", ownerState.withActions && "withActions"],
988
+ wrapperDataGridCss: ["wrapperDataGridCss"],
989
+ columnsConfigContainer: ["columnsConfigContainer"],
990
+ columnsLabelSetColumns: ["columnsLabelSetColumns"],
991
+ columnsConfigContent: ["columnsConfigContent"],
992
+ columnsConfigGrid: ["columnsConfigGrid"],
993
+ columnsConfigActions: ["columnsConfigActions"],
994
+ formatterColumn: ["formatterColumn"],
995
+ skeletonFormatter: ["skeletonFormatter"],
996
+ actionsFormatter: ["actionsFormatter"]
997
+ };
998
+ const composedClasses = unstable_composeClasses(slots, getDataGridUtilityClass, {});
999
+ return {
1000
+ ...composedClasses
1001
+ };
1002
+ };
1003
+ function FormatterColumn(props) {
1004
+ const {
1005
+ row,
1006
+ onRowChange,
1007
+ column
1008
+ } = props;
1093
1009
  const handleChange = () => {
1094
1010
  const newRow = {
1095
1011
  ...row
@@ -1100,7 +1016,8 @@ function FormatterColumn({
1100
1016
  return /* @__PURE__ */ jsx(Checkbox, {
1101
1017
  size: "small",
1102
1018
  checked: row[column.key],
1103
- onChange: handleChange
1019
+ onChange: handleChange,
1020
+ className: dataGridClasses.formatterColumn
1104
1021
  });
1105
1022
  }
1106
1023
  function getRowsFromColumnsConfig(columnsConfig) {
@@ -1119,7 +1036,8 @@ const ColumnsConfig = forwardRef((props, ref) => {
1119
1036
  const {
1120
1037
  onCloseSettings,
1121
1038
  columnsConfig,
1122
- onChangeColumnsConfig
1039
+ onChangeColumnsConfig,
1040
+ classes
1123
1041
  } = props;
1124
1042
  const {
1125
1043
  getLabel
@@ -1281,17 +1199,17 @@ const ColumnsConfig = forwardRef((props, ref) => {
1281
1199
  setSelRows(mySet);
1282
1200
  };
1283
1201
  return /* @__PURE__ */ jsxs(WrapperColumnsConfig, {
1284
- id: "WrapperColumnsConfig",
1285
1202
  ref: divRef,
1203
+ className: classes.columnsConfigContainer,
1286
1204
  children: [/* @__PURE__ */ jsx(DivSelColumns, {
1287
- id: "divInfo",
1205
+ className: classes.columnsLabelSetColumns,
1288
1206
  children: getLabel("data_grid.settings_sel_columns")
1289
1207
  }), /* @__PURE__ */ jsx(WrapperDataGrid, {
1290
- id: "WrapperDataGrid",
1291
- children: /* @__PURE__ */ jsx(OriginalDataGridWrapperStyled, {
1292
- id: "Originaldata_gridWrapperStyled",
1208
+ className: classes.columnsConfigContent,
1209
+ children: /* @__PURE__ */ jsx("div", {
1210
+ className: classes.wrapperDataGridCss,
1293
1211
  children: /* @__PURE__ */ jsx(DataGrid$1, {
1294
- className: "fill-data_grid rdg-light",
1212
+ className: classes.columnsConfigGrid,
1295
1213
  ref: refdata_grid,
1296
1214
  columns: columnsdata_grid,
1297
1215
  rows,
@@ -1308,6 +1226,7 @@ const ColumnsConfig = forwardRef((props, ref) => {
1308
1226
  })
1309
1227
  })
1310
1228
  }), /* @__PURE__ */ jsxs(ColumnActions, {
1229
+ className: classes.columnsConfigActions,
1311
1230
  children: [/* @__PURE__ */ jsx(IconButton, {
1312
1231
  dictionaryTooltipId: "data_grid.settings_move_first",
1313
1232
  onClick: handleMoveFirst,
@@ -1352,13 +1271,6 @@ const ColumnsConfig = forwardRef((props, ref) => {
1352
1271
  });
1353
1272
  });
1354
1273
  ColumnsConfig.displayName = "ColumnsConfig";
1355
- const SKTWrapperColumnsSettings = styled("div")(({ theme }) => ({
1356
- display: "flex",
1357
- justifyContent: "center",
1358
- alignItems: "center",
1359
- minWidth: theme.spacing(3.75),
1360
- height: theme.spacing(3.75)
1361
- }));
1362
1274
  function Settings() {
1363
1275
  const {
1364
1276
  openModal,
@@ -1375,7 +1287,9 @@ function Settings() {
1375
1287
  host_static_assets,
1376
1288
  environment_assets
1377
1289
  } = useEnvironment();
1378
- const isSkeleton = useModuleSkeleton();
1290
+ const {
1291
+ classes
1292
+ } = useDataGrid();
1379
1293
  const ref = useRef(null);
1380
1294
  const onCloseSettings = useCallback(() => {
1381
1295
  closeModal();
@@ -1395,7 +1309,8 @@ function Settings() {
1395
1309
  ref,
1396
1310
  columnsConfig,
1397
1311
  onChangeColumnsConfig,
1398
- onCloseSettings
1312
+ onCloseSettings,
1313
+ classes
1399
1314
  }), /* @__PURE__ */ jsxs(Actions$1, {
1400
1315
  children: [/* @__PURE__ */ jsx(ActionCancel, {
1401
1316
  onClick: closeModal
@@ -1406,83 +1321,52 @@ function Settings() {
1406
1321
  })
1407
1322
  });
1408
1323
  }, [closeModal, columnsConfig, getLabel, onChangeColumnsConfig, onCloseSettings, openModal, onClickIntro]);
1409
- if (isSkeleton) {
1410
- return /* @__PURE__ */ jsx(SKTWrapperColumnsSettings, {
1411
- children: /* @__PURE__ */ jsx(Skeleton, {
1412
- variant: "circular",
1413
- width: 20,
1414
- height: 20
1415
- })
1416
- });
1417
- }
1418
1324
  return /* @__PURE__ */ jsx(IconButton, {
1325
+ className: classes.actionSettings,
1419
1326
  dictionaryTooltipId: "data_grid.tooltip_settings",
1420
1327
  onClick: onClickSettings,
1421
1328
  "aria-label": "settings",
1422
1329
  src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/configuration.svg`
1423
1330
  });
1424
1331
  }
1425
- const Container = styled("div")(() => ({
1426
- display: "flex",
1427
- alignItems: "center"
1428
- }));
1429
- const RowsLabel = styled("span")(() => ({}));
1430
- const InsetLabel = styled("span")(({ theme }) => ({
1431
- marginLeft: theme.spacing(2),
1432
- paddingTop: "2px",
1433
- paddingBottom: "2px",
1434
- paddingLeft: "4px",
1435
- paddingRight: "4px",
1436
- border: `1px solid ${theme.palette.divider}`
1437
- }));
1438
1332
  function RowsCount() {
1439
1333
  const {
1440
- rowsCount
1334
+ rowsCount,
1335
+ classes
1441
1336
  } = useDataGrid();
1442
1337
  const {
1443
1338
  getLabel
1444
1339
  } = useModuleDictionary();
1445
1340
  const isSkeleton = useModuleSkeleton();
1446
- if (isSkeleton) {
1447
- return /* @__PURE__ */ jsxs(Container, {
1448
- children: [/* @__PURE__ */ jsx(RowsLabel, {
1341
+ return /* @__PURE__ */ jsx("div", {
1342
+ className: classes.rowsCount,
1343
+ children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, {
1344
+ children: [/* @__PURE__ */ jsx("div", {
1345
+ className: classes.rowsCountLabel,
1346
+ children: getLabel("data_grid.rows")
1347
+ }), /* @__PURE__ */ jsx("div", {
1348
+ className: classes.rowsCountValue,
1349
+ children: rowsCount
1350
+ })]
1351
+ }) : /* @__PURE__ */ jsxs(Fragment, {
1352
+ children: [/* @__PURE__ */ jsx("div", {
1353
+ className: classes.rowsCountLabel,
1449
1354
  children: /* @__PURE__ */ jsx(Skeleton, {
1450
1355
  variant: "text",
1451
1356
  width: "40px",
1452
1357
  height: "16px"
1453
1358
  })
1454
- }), /* @__PURE__ */ jsx(InsetLabel, {
1359
+ }), /* @__PURE__ */ jsx("div", {
1360
+ className: classes.rowsCountValue,
1455
1361
  children: /* @__PURE__ */ jsx(Skeleton, {
1456
1362
  variant: "text",
1457
1363
  width: "20px",
1458
1364
  height: "16px"
1459
1365
  })
1460
1366
  })]
1461
- });
1462
- }
1463
- return /* @__PURE__ */ jsxs(Container, {
1464
- className: "rows-count",
1465
- id: "RowsCount",
1466
- children: [/* @__PURE__ */ jsx(RowsLabel, {
1467
- children: getLabel("data_grid.rows")
1468
- }), /* @__PURE__ */ jsx(InsetLabel, {
1469
- children: rowsCount
1470
- })]
1367
+ })
1471
1368
  });
1472
1369
  }
1473
- const WrapperDensity = styled("div")(({ theme }) => ({
1474
- marginLeft: 0,
1475
- [theme.breakpoints.up("sm")]: {
1476
- marginLeft: theme.spacing(3)
1477
- }
1478
- }));
1479
- const SKTWrapperDensity = styled("div")(({ theme }) => ({
1480
- display: "flex",
1481
- justifyContent: "center",
1482
- alignItems: "center",
1483
- minWidth: theme.spacing(3.75),
1484
- height: theme.spacing(3.75)
1485
- }));
1486
1370
  function Density() {
1487
1371
  const {
1488
1372
  host_static_assets,
@@ -1491,12 +1375,12 @@ function Density() {
1491
1375
  const {
1492
1376
  rowHeights,
1493
1377
  currentRowHeightVariant,
1494
- setRowHeightVariant
1378
+ setRowHeightVariant,
1379
+ classes
1495
1380
  } = useDataGrid();
1496
1381
  const {
1497
1382
  getLabel
1498
1383
  } = useModuleDictionary();
1499
- const isSkeleton = useModuleSkeleton();
1500
1384
  const menuActions = useMemo(() => {
1501
1385
  if (typeof rowHeights === "number") {
1502
1386
  return [];
@@ -1518,6 +1402,7 @@ function Density() {
1518
1402
  dictionaryField: "data_grid.density_confortable"
1519
1403
  }];
1520
1404
  }, [rowHeights, currentRowHeightVariant, setRowHeightVariant, host_static_assets, environment_assets]);
1405
+ const theme = useTheme();
1521
1406
  const currenViewIcon = useMemo(() => {
1522
1407
  if (currentRowHeightVariant === "compact") {
1523
1408
  return `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/compact.svg`;
@@ -1530,58 +1415,23 @@ function Density() {
1530
1415
  if (menuActions.length === 0) {
1531
1416
  return /* @__PURE__ */ jsx(Fragment, {});
1532
1417
  }
1533
- if (isSkeleton) {
1534
- return /* @__PURE__ */ jsx(SKTWrapperDensity, {
1535
- children: /* @__PURE__ */ jsx(Skeleton, {
1536
- variant: "circular",
1537
- width: "20px",
1538
- height: "20px"
1539
- })
1540
- });
1541
- }
1542
- return /* @__PURE__ */ jsx(WrapperDensity, {
1543
- id: "WrapperDensity",
1544
- children: /* @__PURE__ */ jsx(MenuActions, {
1545
- arrowType: "right-top",
1546
- anchorOrigin: {
1547
- vertical: "top",
1548
- horizontal: "left"
1549
- },
1550
- transformOrigin: {
1551
- vertical: "top",
1552
- horizontal: "right"
1553
- },
1554
- menuActions,
1555
- urlIcon: currenViewIcon,
1556
- toolTip: getLabel("data_grid.tooltip_density")
1557
- })
1418
+ return /* @__PURE__ */ jsx(MenuActions, {
1419
+ arrowType: "right-top",
1420
+ className: classes.actionDensityPopover,
1421
+ menuActionSx: theme.components?.M4LDataGridDensityPopover?.styleOverrides,
1422
+ anchorOrigin: {
1423
+ vertical: "top",
1424
+ horizontal: "left"
1425
+ },
1426
+ transformOrigin: {
1427
+ vertical: "top",
1428
+ horizontal: "right"
1429
+ },
1430
+ menuActions,
1431
+ urlIcon: currenViewIcon,
1432
+ toolTip: getLabel("data_grid.tooltip_density")
1558
1433
  });
1559
1434
  }
1560
- const WrapperActions = styled("div")(({ theme }) => ({
1561
- ...theme.typography.caption,
1562
- position: "absolute",
1563
- left: "0px",
1564
- right: "0px",
1565
- top: "0px",
1566
- height: theme.spacing(5.5),
1567
- padding: 0,
1568
- display: "flex",
1569
- flexDirection: "row",
1570
- alignItems: "center",
1571
- justifyContent: "flex-end",
1572
- [theme.breakpoints.up("sm")]: {
1573
- padding: theme.spacing(0, 1.5)
1574
- },
1575
- "&.with-no-pager .rows-count": {
1576
- flexGrow: 1
1577
- },
1578
- "& .MuiTablePagination-root": {
1579
- flexGrow: 1,
1580
- display: "flex",
1581
- justifyContent: "center",
1582
- overflow: "hidden"
1583
- }
1584
- }));
1585
1435
  function getDataGridComponentsDictionary() {
1586
1436
  return ["data_grid"].concat(getPagerComponentsDictionary()).concat(getModalDialogComponentsDictionary());
1587
1437
  }
@@ -1593,7 +1443,8 @@ const dictionary = {
1593
1443
  function Actions(props) {
1594
1444
  const isDesktop = useResponsiveDesktop();
1595
1445
  const {
1596
- rowHeights
1446
+ rowHeights,
1447
+ classes
1597
1448
  } = useDataGrid();
1598
1449
  const isSkeleton = useModuleSkeleton();
1599
1450
  const {
@@ -1607,9 +1458,8 @@ function Actions(props) {
1607
1458
  settingsProps,
1608
1459
  withLocalFilters
1609
1460
  } = props;
1610
- return /* @__PURE__ */ jsxs(WrapperActions, {
1611
- id: "WrapperActions",
1612
- className: withPager && pagerOptions ? "with-pager" : "with-no-pager",
1461
+ return /* @__PURE__ */ jsxs("div", {
1462
+ className: classes.actions,
1613
1463
  children: [withRowsCount && isDesktop && /* @__PURE__ */ jsx(RowsCount, {}), withPager && pagerOptions && /* @__PURE__ */ jsx(Pager, {
1614
1464
  ...pagerOptions,
1615
1465
  totalRecords: pagerOptions.totalRecords,
@@ -1644,8 +1494,14 @@ function DataGrid(props) {
1644
1494
  onCheckedRowsChange,
1645
1495
  dataTestId
1646
1496
  } = props;
1647
- return /* @__PURE__ */ jsx(WrapperGrid, {
1497
+ const ownerState = {
1498
+ actionsProps,
1499
+ withActions
1500
+ };
1501
+ const classes = dataGridUtilityClasses(ownerState);
1502
+ return /* @__PURE__ */ jsx(DataGridRoot, {
1648
1503
  id: `WrapperGrid_${props.id}`,
1504
+ className: classes.root,
1649
1505
  ...process.env.NODE_ENV !== "production" ? {
1650
1506
  [TEST_PROP_COLUMNS]: JSON.stringify(columns),
1651
1507
  [PREFIX_TEST_ATTRIBUTE]: `m4ldatagrid-${dataTestId}`
@@ -1662,6 +1518,7 @@ function DataGrid(props) {
1662
1518
  onCheckedRowsChange,
1663
1519
  rowKeyGetter,
1664
1520
  rows,
1521
+ classes,
1665
1522
  children: /* @__PURE__ */ jsxs(FilterProvider, {
1666
1523
  initialActiveFilters: false,
1667
1524
  children: [withActions && actionsProps && /* @__PURE__ */ jsx(Actions, {