@m4l/components 9.1.120 → 9.1.122

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 (72) hide show
  1. package/.storybook/decorators/WithAppearanceContext/index.d.ts +0 -0
  2. package/.storybook/utils/getStylesColorsByMode.d.ts +4 -4
  3. package/components/DataGrid/contexts/DataGridContext/index.js +3 -5
  4. package/components/DataGrid/contexts/DataGridContext/types.d.ts +1 -3
  5. package/components/DataGrid/contexts/FilterContext/index.d.ts +1 -1
  6. package/components/DataGrid/dictionary.d.ts +18 -0
  7. package/components/DataGrid/dictionary.js +19 -1
  8. package/components/DataGrid/formatters/ColumnBooleanFormatter/index.d.ts +1 -1
  9. package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.js +1 -1
  10. package/components/DataGrid/formatters/ColumnDateFormatter/index.d.ts +1 -1
  11. package/components/DataGrid/formatters/ColumnIconFormatter/index.d.ts +1 -1
  12. package/components/DataGrid/formatters/ColumnIconFormatter/index.js +1 -2
  13. package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.js +1 -3
  14. package/components/DataGrid/formatters/ColumnSetCheckFormatter/index.d.ts +0 -3
  15. package/components/DataGrid/hooks/useDataGrid.d.ts +2 -1
  16. package/components/DataGrid/icons.d.ts +15 -0
  17. package/components/DataGrid/icons.js +18 -0
  18. package/components/DataGrid/index.d.ts +5 -1
  19. package/components/DataGrid/index.js +5 -10
  20. package/components/DataGrid/slots/DataGridEnum.d.ts +30 -0
  21. package/components/DataGrid/slots/DataGridEnum.js +44 -0
  22. package/components/DataGrid/slots/DataGridSlot.d.ts +48 -0
  23. package/components/DataGrid/slots/DataGridSlot.js +97 -0
  24. package/components/DataGrid/styles.d.ts +2 -1
  25. package/components/DataGrid/styles.js +479 -12
  26. package/components/DataGrid/subcomponents/Actions/index.d.ts +1 -1
  27. package/components/DataGrid/subcomponents/Actions/index.js +7 -7
  28. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.d.ts +1 -1
  29. package/components/DataGrid/subcomponents/Actions/subcomponents/Density/index.js +13 -12
  30. package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/index.d.ts +1 -1
  31. package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/index.js +5 -6
  32. package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.d.ts +1 -1
  33. package/components/DataGrid/subcomponents/Actions/subcomponents/MobileMenuActions/index.js +14 -13
  34. package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/index.js +7 -6
  35. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/index.d.ts +1 -1
  36. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/index.js +2 -4
  37. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +28 -27
  38. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/types.d.ts +1 -2
  39. package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js +11 -11
  40. package/components/DataGrid/subcomponents/Actions/types.d.ts +1 -1
  41. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +1 -1
  42. package/components/DataGrid/subcomponents/Table/index.d.ts +1 -1
  43. package/components/DataGrid/subcomponents/Table/index.js +5 -4
  44. package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +1 -2
  45. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +12 -43
  46. package/components/DataGrid/subcomponents/Table/subcomponents/SelectColumn.js +2 -2
  47. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/index.d.ts +1 -1
  48. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/index.js +2 -4
  49. package/components/DataGrid/subcomponents/editors/TextEditor/index.d.ts +0 -1
  50. package/components/DataGrid/subcomponents/editors/TextEditor/index.js +3 -28
  51. package/components/DataGrid/tests/DataGrid.test.d.ts +1 -0
  52. package/components/DataGrid/types.d.ts +6 -0
  53. package/components/ScrollBar/ScrollBar.d.ts +1 -5
  54. package/components/ScrollBar/ScrollBar.js +3 -2
  55. package/components/ScrollBar/ScrollBar.styles.js +8 -19
  56. package/components/areas/components/AreasViewer/types.d.ts +1 -1
  57. package/components/gclick/MyDevice/MyDevice.js +1 -1
  58. package/package.json +1 -1
  59. package/components/DataGrid/classes/constants.d.ts +0 -1
  60. package/components/DataGrid/classes/constants.js +0 -4
  61. package/components/DataGrid/classes/index.d.ts +0 -33
  62. package/components/DataGrid/classes/index.js +0 -71
  63. package/components/DataGrid/classes/types.d.ts +0 -30
  64. package/components/DataGrid/formatters/ColumnDateFormatter/styles.d.ts +0 -1
  65. package/components/DataGrid/subcomponents/Actions/styles.d.ts +0 -1
  66. package/components/DataGrid/subcomponents/Actions/subcomponents/Filter/types.d.ts +0 -2
  67. package/components/DataGrid/subcomponents/Actions/subcomponents/RowsCount/types.d.ts +0 -2
  68. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +0 -7
  69. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.js +0 -50
  70. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.d.ts +0 -1
  71. package/components/DataGrid/subcomponents/Table/subcomponents/SkeletonFormatter/styles.js +0 -10
  72. /package/components/DataGrid/subcomponents/Actions/subcomponents/{Settings/types.d.ts → types.d.ts} +0 -0
@@ -1,14 +1,481 @@
1
- import { styled } from "@mui/material/styles";
2
- const DataGridRoot = styled("div")(({ theme }) => ({
3
- display: "flex",
4
- flexDirection: "column",
5
- position: "absolute",
6
- padding: "0px",
7
- inset: "0px",
8
- overflow: "hidden",
9
- container: "container / inline-size",
10
- ...theme.components?.M4LDataGrid?.styleOverrides || {}
11
- }));
1
+ import { alpha } from "@mui/material";
2
+ import { g as getTypographyStyles } from "../../utils/getTypographyStyles.js";
3
+ import { f as filterHeight } from "./subcomponents/Table/subcomponents/SelectColumn.js";
4
+ const dataGridStyles = {
5
+ /**
6
+ * ***************************************************
7
+ * Estilos para el contenedor principal del DataGrid.
8
+ * ***************************************************
9
+ */
10
+ datagridRoot: ({ theme }) => ({
11
+ display: "flex",
12
+ flexDirection: "column",
13
+ padding: theme.vars.size.baseSpacings.sp0,
14
+ inset: theme.vars.size.baseSpacings.sp0,
15
+ overflow: "hidden",
16
+ container: "container / inline-size",
17
+ background: theme.vars.palette.background.default,
18
+ boxShadow: "unset",
19
+ borderRadius: theme.vars.size.borderRadius.r1,
20
+ border: theme.vars.size.borderStroke.container,
21
+ borderColor: theme.vars.palette?.border.default,
22
+ position: "relative",
23
+ gap: theme.vars.size.baseSpacings.sp1,
24
+ height: "100%",
25
+ width: "100%",
26
+ "& .rdg .MuiCheckbox-root": {
27
+ "& > svg": {
28
+ color: theme.vars.palette.text.secondary
29
+ }
30
+ },
31
+ [`&.M4LDataGrid-xs`]: {
32
+ "& .M4LDataGrid-actions": {
33
+ height: theme.vars.size.baseSpacings.sp11,
34
+ "& .M4LPager-labelRowsPerPageContainer": {
35
+ "& .M4LTypography-root": {
36
+ display: "none"
37
+ }
38
+ },
39
+ "& .M4LPager-labelDisplayRows": {
40
+ display: "none"
41
+ }
42
+ }
43
+ },
44
+ "& .M4LDataGrid-tableContaniner:not(.M4LDataGrid-withActions)": {
45
+ top: `${theme.vars.size.baseSpacings.sp0} !important`
46
+ },
47
+ "&& .M4lclassCssSpecificity": {
48
+ fontWeight: 400
49
+ //Se utiliza directamente el valor porque no está tokenizado
50
+ }
51
+ }),
52
+ /**
53
+ * Estilos del contenedor de las acciones
54
+ */
55
+ actionsRoot: ({ theme }) => ({
56
+ alignItems: "center",
57
+ background: theme.vars.palette.background.default,
58
+ borderRadius: theme.vars.size.borderRadius.r1,
59
+ display: "flex",
60
+ flexDirection: "row",
61
+ fontWeight: 400,
62
+ //Se utiliza directamente el valor porque no está tokenizado
63
+ gap: theme.vars.size.baseSpacings.sp2,
64
+ height: theme.vars.size.baseSpacings.sp8,
65
+ justifyContent: "space-between",
66
+ left: theme.vars.size.baseSpacings.sp0,
67
+ lineHeight: theme.vars.size.baseSpacings.sp4,
68
+ minHeight: theme.vars.size.baseSpacings.sp8,
69
+ padding: `${theme.vars.size.baseSpacings.sp1} ${theme.vars.size.baseSpacings.sp2}`,
70
+ position: "absolute",
71
+ right: theme.vars.size.baseSpacings.sp0,
72
+ top: theme.vars.size.baseSpacings.sp0,
73
+ fontsize: getTypographyStyles(theme.generalSettings.isMobile, "medium", "body").fontSize,
74
+ "@container main (max-width: 600px)": {
75
+ height: theme.vars.size.baseSpacings.sp11
76
+ }
77
+ }),
78
+ /**
79
+ * container de los botones de acciones
80
+ */
81
+ actionsConfigContainer: ({ theme }) => ({
82
+ display: "flex",
83
+ flexDirection: "row",
84
+ gap: theme.vars.size.baseSpacings.sp2,
85
+ marginLeft: theme.vars.size.baseSpacings.sp3,
86
+ "& .M4LIconButton-root": {
87
+ background: theme.vars.palette.background.default
88
+ }
89
+ }),
90
+ /**
91
+ * Estilos para el contenedor principal de RowsCount
92
+ */
93
+ rowsCountRoot: ({ theme }) => ({
94
+ alignItems: "center",
95
+ display: "flex",
96
+ gap: theme.vars.size.baseSpacings.sp2
97
+ }),
98
+ /**
99
+ * Estilos para el label de RowsCount
100
+ */
101
+ rowsCountLabel: ({ theme }) => ({
102
+ color: theme.vars.palette.text.primary,
103
+ fontWeight: 400,
104
+ //Se utiliza directamente el valor porque no está tokenizado
105
+ height: "100%",
106
+ lineHeight: theme.vars.size.baseSpacings.sp4,
107
+ fontSize: getTypographyStyles(theme.generalSettings.isMobile, "medium", "body").fontSize
108
+ }),
109
+ /**
110
+ * Estilos para el valor de RowsCount
111
+ */
112
+ rowsCountValue: ({ theme }) => ({
113
+ background: theme.vars.palette.background.default,
114
+ borderRadius: theme.vars.size.baseSpacings.sp1,
115
+ paddingBottom: theme.vars.size.baseSpacings["sp0-5"],
116
+ paddingLeft: theme.vars.size.baseSpacings.sp1,
117
+ paddingRight: "6px",
118
+ //No hay token para este valor
119
+ paddingTop: theme.vars.size.baseSpacings.sp1,
120
+ fontSize: getTypographyStyles(theme.generalSettings.isMobile, "medium", "body").fontSize
121
+ }),
122
+ /**
123
+ * Estilos para el contenedor de las columnas
124
+ * de la tabla del modal de configuración de columnas.
125
+ */
126
+ columnsConfigWrapper: ({ theme }) => ({
127
+ color: theme.vars.palette.text.primary,
128
+ position: "relative",
129
+ display: "flex",
130
+ flexDirection: "column",
131
+ height: "100%",
132
+ width: "100%"
133
+ }),
134
+ /**
135
+ * Estilos para la configuración
136
+ * de selección de las columnas en
137
+ * el modal de configuración de columnas.
138
+ */
139
+ columnsConfigSelColumns: ({ theme }) => ({
140
+ fontWeight: 600,
141
+ //Se utiliza directamente el valor porque no está tokenizado
142
+ lineHeight: theme.vars.size.typography.lineHeight.lh2,
143
+ color: theme.vars.palette.text.primary,
144
+ padding: `${theme.vars.size.baseSpacings.sp4} ${theme.vars.size.baseSpacings.sp2}`
145
+ }),
146
+ /**
147
+ * Estilos para el contenedor de la tabla
148
+ * en el modal de configuración de columnas.
149
+ */
150
+ columnsConfigDataGrid: () => ({
151
+ position: "relative",
152
+ display: "flex",
153
+ flexDirection: "column",
154
+ flexGrow: 1,
155
+ overflow: "auto"
156
+ }),
157
+ /**
158
+ * Estilos para el contenedor de los botones
159
+ * de acción en el modal de configuración de columnas.
160
+ */
161
+ columnsConfigActios: ({ theme }) => ({
162
+ paddingTop: theme.vars.size.baseSpacings.sp4,
163
+ paddingBottom: theme.vars.size.baseSpacings.sp2,
164
+ display: "flex",
165
+ flexDirection: "row"
166
+ }),
167
+ /**
168
+ * *****************************************
169
+ * Estilos el el input editor del DataGrid.
170
+ * *****************************************
171
+ */
172
+ inputTexEditor: ({ theme }) => ({
173
+ appearance: "none",
174
+ boxSizing: "border-box",
175
+ inlineSize: "100%",
176
+ blockSize: "100%",
177
+ paddingBlock: theme.vars.size.baseSpacings.sp0,
178
+ verticalAlign: "top",
179
+ textAlign: "right",
180
+ fontFamily: "inherit",
181
+ "&:focus": {
182
+ outline: "none"
183
+ },
184
+ "&::placeholder": {
185
+ opacity: "1"
186
+ }
187
+ }),
188
+ /**
189
+ * ****************************************
190
+ * Estilos para los componetes Table
191
+ * ****************************************
192
+ */
193
+ /**
194
+ * Estilos para el contenedor principal
195
+ * del componente Table.
196
+ */
197
+ tableContaniner: ({ theme }) => ({
198
+ display: "flex",
199
+ flexDirection: "column",
200
+ position: "absolute",
201
+ top: theme.vars.size.baseSpacings.sp8,
202
+ bottom: theme.vars.size.baseSpacings.sp0,
203
+ left: theme.vars.size.baseSpacings.sp0,
204
+ right: theme.vars.size.baseSpacings.sp0,
205
+ overflow: "hidden",
206
+ padding: `${theme.vars.size.baseSpacings.sp0} ${theme.vars.size.baseSpacings.sp1}`,
207
+ borderRadius: theme.vars.size.baseSpacings.sp1,
208
+ border: "none",
209
+ boxshadow: theme.customShadows?.z2,
210
+ background: theme.vars.palette.background.default,
211
+ ["@container main (max-width: 600px)"]: {
212
+ top: theme.vars.size.baseSpacings.sp11
213
+ }
214
+ }),
215
+ /**
216
+ * Estilos para el contenedor del dataGrid
217
+ */
218
+ tableWrapperDataGrid: ({ theme }) => ({
219
+ position: "relative",
220
+ height: "100%",
221
+ overflow: "hidden",
222
+ borderRadius: `${theme.vars.size.baseSpacings.sp1} ${theme.vars.size.baseSpacings.sp0}`,
223
+ "& .rdg ": {
224
+ border: "none",
225
+ background: theme.vars.palette.background.default,
226
+ gridColumnGap: theme.vars.size.baseSpacings.sp0,
227
+ gridRowGap: theme.vars.size.baseSpacings.sp0,
228
+ userSelect: "initial",
229
+ height: "100%",
230
+ contentVisibility: "unset",
231
+ overflow: "auto",
232
+ padding: theme.vars.size.baseSpacings.sp0,
233
+ "--rdg-grid-inline-size": theme.vars.size.baseSpacings.sp0,
234
+ "--rdg-header-background-color": theme.vars.palette.primary.opacity,
235
+ "--rdg-row-selected-background-color": theme.vars.palette.primary.opacity,
236
+ "--rdg-row-hover-background-color": theme.vars.palette.primary.opacity,
237
+ "--rdg-background-color": theme.vars.palette.background.default,
238
+ "--rdg-selection-color": theme.vars.palette.primary.focusVisible,
239
+ "--row-selected-hover-background-color": theme.vars.palette.primary.toneOpacity,
240
+ "--rdg-checkbox-color": theme.vars.palette.primary.main,
241
+ "--rdg-checkbox-focus-color": alpha(
242
+ theme.colorSchemes.finalTheme.palette.primary.main,
243
+ theme.colorSchemes.finalTheme.palette.action.selectedOpacity
244
+ ),
245
+ "--rdg-border-color": "none",
246
+ "&:last-child .rdg-cell": {
247
+ borderTop: "0.5px solid",
248
+ borderBottom: theme.vars.size.borderStroke.container,
249
+ borderLeft: "0.5px solid",
250
+ //Se deja el valor directamente porque no está tokenizado
251
+ borderRight: "0.5px solid",
252
+ //Se deja el valor directamente porque no está tokenizado
253
+ borderColor: theme.vars.palette?.border.disabled
254
+ }
255
+ },
256
+ '& [role="columnheader"]': {
257
+ justifyContent: "center",
258
+ alignItems: "center"
259
+ },
260
+ "& .rdg-row": {
261
+ '&[aria-selected="false"] .rdg-cell': {
262
+ backgroundColor: theme.vars.palette.background.default,
263
+ borderLeft: "0.5px solid",
264
+ borderColor: theme.vars.palette?.border.disabled
265
+ },
266
+ "&:nth-of-type(odd)": {
267
+ "& .rdg-cell": {
268
+ backgroundColor: theme.vars.palette.background.default
269
+ }
270
+ },
271
+ '&[aria-selected="true"] .rdg-cell': {
272
+ backgroundColor: theme.vars.palette.primary?.toneOpacity
273
+ },
274
+ "&:hover": {
275
+ "& .rdg-cell": {
276
+ backgroundColor: `${theme.vars.palette.default.enabled} !important`,
277
+ transition: "background-color 0.1s linear"
278
+ }
279
+ },
280
+ backgroundColor: "transparent"
281
+ },
282
+ "& .rdg-cell": {
283
+ transition: "background-color 0.1s linear",
284
+ borderBottom: `${theme.vars.size.baseSpacings.sp0} solid transparent`,
285
+ borderRight: `0.5px solid transparent`,
286
+ //Se deja el valor directamente porque no está tokenizado
287
+ borderColor: theme.vars.palette.background.neutral,
288
+ color: theme.vars.palette.text.secondary,
289
+ display: "inline",
290
+ justifyContent: "center",
291
+ alignItems: "center",
292
+ textOverflow: "inline",
293
+ gridTemplateColumns: "auto",
294
+ "& .rdg-text-editor": {
295
+ textAlign: "inherit",
296
+ color: theme.vars.palette.text.secondary,
297
+ padding: `${theme.vars.size.baseSpacings.sp0} ${theme.vars.size.baseSpacings.sp2}`,
298
+ border: theme.vars.size.baseSpacings.sp0,
299
+ borderTop: "0.5px solid",
300
+ //Se deja el valor directamente porque no está tokenizado
301
+ borderBottom: theme.vars.size.borderStroke.container,
302
+ borderLeft: "0.5px solid",
303
+ //Se deja el valor directamente porque no está tokenizado
304
+ borderRight: "0.5px solid",
305
+ //Se deja el valor directamente porque no está tokenizado
306
+ borderColor: `${theme.vars.palette?.border.disabled} !important`,
307
+ ...theme.colorSchemes.finalTheme.typography.body
308
+ },
309
+ "&.rdg-cell-frozen": {
310
+ display: "flex",
311
+ justifyContent: "center",
312
+ alignItems: "center",
313
+ boxShadow: "unset"
314
+ },
315
+ "&:after": {
316
+ content: `""`,
317
+ borderRight: `${theme.vars.size.baseSpacings.sp0} solid ${theme.vars.palette.divider}`,
318
+ position: "absolute",
319
+ right: theme.vars.size.baseSpacings.sp0,
320
+ // Por desajuste en chrome en el espaciado
321
+ height: "100%"
322
+ },
323
+ "& .m4l_icon": {
324
+ height: "100%"
325
+ }
326
+ },
327
+ '& .rdg-cell[role="gridcell"]': {
328
+ ...theme.colorSchemes.finalTheme.typography.body,
329
+ lineHeight: "var(--rdg-row-height)!important"
330
+ },
331
+ '& .rdg-cell[role="columnheader"] .rdg-header-sort-name': {
332
+ ...theme.colorSchemes.finalTheme.typography.bodyDens,
333
+ //ajuste de contenido filtro del DataGrid
334
+ height: theme.vars.size.baseSpacings.sp7,
335
+ display: "flex",
336
+ justifyContent: "center",
337
+ alignItems: "center"
338
+ },
339
+ // Esta condicion para el flujo de cabecera cuando no tiene utilidad sort
340
+ '& .rdg-cell[role="columnheader"] [draggable="true"]': {
341
+ fontWeight: 600
342
+ //Se utiliza directamente el valor porque no está tokenizado
343
+ },
344
+ "& [aria-selected=true]": {
345
+ backgroundColor: theme.vars.palette.primary?.toneOpacity,
346
+ color: theme.vars.palette.text.primary,
347
+ //cambia el color del contorno de cada celda selecionada
348
+ outline: theme.vars.size.borderStroke.container,
349
+ outlineOffset: "-1px",
350
+ outlineColor: theme.vars.palette.primary.focusVisible
351
+ },
352
+ // Alineaciones
353
+ "& .rdg-cell.rdg-cell-align-left": {
354
+ textAlign: "start",
355
+ display: "inline",
356
+ justifyContent: "center",
357
+ alignItems: "center"
358
+ },
359
+ "& .rdg-cell.rdg-cell-align-center": {
360
+ textAlign: "center",
361
+ display: "flex"
362
+ },
363
+ "& .rdg-cell.rdg-cell-align-right": {
364
+ textAlign: "right"
365
+ },
366
+ // Estilado de la ultima celda congelada
367
+ "& .rdg-row .rdg-cell-frozen-last:after": {
368
+ borderRight: `0px solid transparent`
369
+ },
370
+ // Estilado de la ultima celda (Quitar la linea divisora derecha)
371
+ "& .rdg-row :last-child:after": {
372
+ borderRight: `0px solid`,
373
+ borderColor: theme.vars.palette.background.surface
374
+ },
375
+ "& .rdg-header-row": {
376
+ backgroundColor: theme.vars.palette.primary.toneOpacity
377
+ },
378
+ // Estilado de celdas de la cabecera
379
+ "& .rdg-header-row .rdg-cell": {
380
+ fontFamily: theme.typography.body,
381
+ fontWeight: theme.typography.body,
382
+ fontSize: theme.typography.body,
383
+ color: theme.vars.palette.text.primary,
384
+ borderRight: "0.5px solid !important",
385
+ boxShadow: "none",
386
+ gridTemplateColumns: "auto",
387
+ borderBottom: "0.5px solid !important",
388
+ borderColor: `${theme.vars.palette?.border.disabled} !important`,
389
+ placeContent: "center",
390
+ '& [draggable="true"]': {
391
+ fontSize: theme.typography.body
392
+ },
393
+ // Ultima celda de la cebecera frozen
394
+ "&.rdg-cell-frozen-last": {
395
+ borderColor: theme.vars.palette.background.default,
396
+ boxShadow: "var(--rdg-frozen-cell-box-shadow)"
397
+ },
398
+ "& .rdg-header-sort-cell": {
399
+ "& .rdg-header-sort-name + span": {
400
+ position: "absolute",
401
+ margin: "auto",
402
+ right: "5px",
403
+ //Este valor no está tokenizado
404
+ "& .rdg-sort-arrow": {
405
+ width: theme.vars.size.baseSpacings.sp2
406
+ }
407
+ }
408
+ },
409
+ // Modificar el tamaño de la flecha
410
+ "& .rdg-sort-arrow": {}
411
+ },
412
+ // Estilado de la ultima celda Header
413
+ "& .rdg-header-row :last-child.rdg-cell": {
414
+ borderTopRightRadius: theme.vars.size.baseSpacings.sp0,
415
+ "&:after": {
416
+ borderRight: `${theme.vars.size.baseSpacings.sp0} solid transparent`
417
+ }
418
+ },
419
+ // filter
420
+ "& .filter_cell_div": {
421
+ paddingLeft: theme.vars.size.baseSpacings.sp2,
422
+ paddingRight: theme.vars.size.baseSpacings.sp2
423
+ },
424
+ //
425
+ "& .rdg-header-sort-cell": {
426
+ width: "100%",
427
+ flexGrow: "1",
428
+ alignItems: "center",
429
+ color: theme.vars.palette.text.primary
430
+ }
431
+ }),
432
+ /**
433
+ * Estilos para el header del componente
434
+ */
435
+ draggableHeaderRoot: () => ({
436
+ cursor: "move",
437
+ display: "flex",
438
+ flexDirection: "column",
439
+ lineHeight: "1",
440
+ height: "100%",
441
+ justifyContent: "center",
442
+ textAlign: "center"
443
+ }),
444
+ /**
445
+ * Estilos para el contenedor del input de header
446
+ */
447
+ draggableWrapperInputBase: () => ({
448
+ borderTop: "1px solid var(--rdg-border-color)",
449
+ width: "100%",
450
+ display: "flex",
451
+ alignItems: "center",
452
+ height: `${filterHeight}px`
453
+ }),
454
+ /**
455
+ * Estilos de los inputs del header para el filtro
456
+ */
457
+ headerInputBase: ({ theme }) => ({
458
+ width: "100%",
459
+ paddingBottom: theme.vars.size.baseSpacings["sp0-5"]
460
+ }),
461
+ /**
462
+ * Estilos para el contenedor del skeleton de los formatter
463
+ */
464
+ wrapperSkeleton: () => ({
465
+ display: "flex",
466
+ width: "100%",
467
+ height: "100%",
468
+ alignItems: "center"
469
+ }),
470
+ /**
471
+ * Estilos para el contenedor del cuerpo del modal de configuración
472
+ */
473
+ contentModalSetting: () => ({
474
+ display: "flex",
475
+ flexDirection: "column",
476
+ height: "100%"
477
+ })
478
+ };
12
479
  export {
13
- DataGridRoot as D
480
+ dataGridStyles as d
14
481
  };
@@ -1,5 +1,5 @@
1
1
  import { InternalActionsProps } from './types';
2
2
  /**
3
- * TODO: Documentar
3
+ * Componente que renderiza las acciones del DataGrid
4
4
  */
5
5
  export declare function Actions(props: InternalActionsProps): import("react/jsx-runtime").JSX.Element;
@@ -5,14 +5,14 @@ import { S as Settings } from "./subcomponents/Settings/index.js";
5
5
  import { R as RowsCount } from "./subcomponents/RowsCount/index.js";
6
6
  import { D as Density } from "./subcomponents/Density/index.js";
7
7
  import { u as useDataGrid } from "../../hooks/useDataGrid.js";
8
- import { useResponsiveContainerStore } from "@m4l/graphics";
8
+ import { useIsMobile } from "@m4l/graphics";
9
9
  import { useModuleDictionary } from "@m4l/core";
10
10
  import { d as dictionary } from "../../dictionary.js";
11
- import { shallow } from "zustand/shallow";
12
11
  import { M as MobileMenuActions } from "./subcomponents/MobileMenuActions/index.js";
12
+ import { A as ActionsRootStyled, a as ActionsConfigContainerStyled } from "../../slots/DataGridSlot.js";
13
13
  function Actions(props) {
14
- const isXs = useResponsiveContainerStore((state) => state.isXs, shallow);
15
- const { rowHeights, classes } = useDataGrid();
14
+ const isMobile = useIsMobile();
15
+ const { rowHeights } = useDataGrid();
16
16
  const { getLabel } = useModuleDictionary();
17
17
  const {
18
18
  withRowsCount = true,
@@ -22,8 +22,8 @@ function Actions(props) {
22
22
  settingsProps,
23
23
  withLocalFilters
24
24
  } = props;
25
- return /* @__PURE__ */ jsxs("div", { className: classes.actions, children: [
26
- withRowsCount && !isXs && /* @__PURE__ */ jsx(RowsCount, {}),
25
+ return /* @__PURE__ */ jsxs(ActionsRootStyled, { children: [
26
+ withRowsCount && !isMobile && /* @__PURE__ */ jsx(RowsCount, {}),
27
27
  withPager && pagerOptions && /* @__PURE__ */ jsx(
28
28
  Pager,
29
29
  {
@@ -33,7 +33,7 @@ function Actions(props) {
33
33
  labelOf: getLabel(dictionary.LABEL_OF)
34
34
  }
35
35
  ),
36
- isXs ? /* @__PURE__ */ jsx(MobileMenuActions, {}) : /* @__PURE__ */ jsxs("div", { className: classes.actionsConfigContainer, children: [
36
+ isMobile ? /* @__PURE__ */ jsx(MobileMenuActions, {}) : /* @__PURE__ */ jsxs(ActionsConfigContainerStyled, { children: [
37
37
  typeof rowHeights !== "number" && /* @__PURE__ */ jsx(Density, {}),
38
38
  withLocalFilters && /* @__PURE__ */ jsx(Filter, {}),
39
39
  withSettings && /* @__PURE__ */ jsx(Settings, { ...settingsProps })
@@ -1,4 +1,4 @@
1
1
  /**
2
- * TODO: Documentar
2
+ * Renderiza el componente de densidad de filas en el DataGrid
3
3
  */
4
4
  export declare function Density(): import("react/jsx-runtime").JSX.Element;
@@ -4,9 +4,11 @@ import { useEnvironment, useModuleDictionary } from "@m4l/core";
4
4
  import { useTheme } from "@mui/material";
5
5
  import { M as MenuActions } from "../../../../../MenuActions/MenuActions.js";
6
6
  import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
7
+ import { p as pathIcons } from "../../../../icons.js";
8
+ import { d as dictionary } from "../../../../dictionary.js";
7
9
  function Density() {
8
10
  const { host_static_assets, environment_assets } = useEnvironment();
9
- const { rowHeights, currentRowHeightVariant, setRowHeightVariant, classes } = useDataGrid();
11
+ const { rowHeights, currentRowHeightVariant, setRowHeightVariant } = useDataGrid();
10
12
  const { getLabel } = useModuleDictionary();
11
13
  const menuActions = useMemo(() => {
12
14
  if (typeof rowHeights === "number") {
@@ -15,24 +17,24 @@ function Density() {
15
17
  return [
16
18
  {
17
19
  type: "menuItem",
18
- startIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/compact.svg`,
20
+ startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.compact}`,
19
21
  onClick: () => setRowHeightVariant("compact"),
20
22
  disabled: currentRowHeightVariant === "compact",
21
- label: "data_grid.density_compact"
23
+ label: getLabel(dictionary.DENSITY_COMPACT)
22
24
  },
23
25
  {
24
26
  type: "menuItem",
25
- startIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/standard.svg`,
27
+ startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.standard}`,
26
28
  onClick: () => setRowHeightVariant("standard"),
27
29
  disabled: currentRowHeightVariant === "standard",
28
- label: "data_grid.density_standard"
30
+ label: getLabel(dictionary.DENSITY_STANDARD)
29
31
  },
30
32
  {
31
33
  type: "menuItem",
32
- startIcon: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/confortable.svg`,
34
+ startIcon: `${host_static_assets}/${environment_assets}/${pathIcons.confortable}`,
33
35
  onClick: () => setRowHeightVariant("confortable"),
34
36
  disabled: currentRowHeightVariant === "confortable",
35
- label: "data_grid.density_confortable"
37
+ label: getLabel(dictionary.DENSITY_CONFORTABLE)
36
38
  }
37
39
  ];
38
40
  }, [
@@ -45,12 +47,12 @@ function Density() {
45
47
  const theme = useTheme();
46
48
  const currenViewIcon = useMemo(() => {
47
49
  if (currentRowHeightVariant === "compact") {
48
- return `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/compact.svg`;
50
+ return `${host_static_assets}/${environment_assets}/${pathIcons.compact}`;
49
51
  }
50
52
  if (currentRowHeightVariant === "standard") {
51
- return `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/standard.svg`;
53
+ return `${host_static_assets}/${environment_assets}/${pathIcons.standard}`;
52
54
  }
53
- return `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/confortable.svg`;
55
+ return `${host_static_assets}/${environment_assets}/${pathIcons.confortable}`;
54
56
  }, [currentRowHeightVariant, host_static_assets, environment_assets]);
55
57
  if (menuActions.length === 0) {
56
58
  return /* @__PURE__ */ jsx(Fragment, {});
@@ -59,13 +61,12 @@ function Density() {
59
61
  MenuActions,
60
62
  {
61
63
  arrowType: "right-top",
62
- className: classes.actionDensityPopover,
63
64
  menuActionSx: theme.components?.M4LDataGridDensityPopover?.styleOverrides,
64
65
  anchorOrigin: { vertical: "top", horizontal: "left" },
65
66
  transformOrigin: { vertical: "top", horizontal: "right" },
66
67
  menuActions,
67
68
  icon: currenViewIcon,
68
- toolTip: getLabel("data_grid.tooltip_density")
69
+ toolTip: getLabel(dictionary.DENSITY_TOOLTIP)
69
70
  }
70
71
  );
71
72
  }
@@ -1,4 +1,4 @@
1
1
  /**
2
- * TODO: Documentar
2
+ * Componente que renderiza el icono de filtro en el DataGrid
3
3
  */
4
4
  export declare function Filter(): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,22 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { useEnvironment } from "@m4l/core";
2
3
  import { u as useFilters } from "../../../../hooks/useFilters.js";
3
4
  import { I as IconButton } from "../../../../../mui_extended/IconButton/IconButton.js";
4
- import { useEnvironment } from "@m4l/core";
5
- import { u as useDataGrid } from "../../../../hooks/useDataGrid.js";
5
+ import { p as pathIcons } from "../../../../icons.js";
6
+ import { d as dictionary } from "../../../../dictionary.js";
6
7
  function Filter() {
7
8
  const { activeFilters, setActiveFilters } = useFilters();
8
9
  const { host_static_assets, environment_assets } = useEnvironment();
9
- const { classes } = useDataGrid();
10
10
  const toggleIcon = () => {
11
11
  setActiveFilters(!activeFilters);
12
12
  };
13
13
  return /* @__PURE__ */ jsx(
14
14
  IconButton,
15
15
  {
16
- dictionaryTooltipId: activeFilters ? "data_grid.tooltip_filter_hide" : "data_grid.tooltip_filter_show",
17
- className: classes.actionFilter,
16
+ dictionaryTooltipId: activeFilters ? dictionary.TOOLTIP_FILTER_HIDE : dictionary.TOOLTIP_FILTER_SHOW,
18
17
  onClick: toggleIcon,
19
18
  "aria-label": "filter",
20
- src: `${host_static_assets}/${environment_assets}/frontend/components/data_grid/assets/icons/filter.svg`
19
+ icon: `${host_static_assets}/${environment_assets}/${pathIcons.filter}`
21
20
  }
22
21
  );
23
22
  }
@@ -1,4 +1,4 @@
1
1
  /**
2
- * TODO: Documentar
2
+ * Renderiza las acciones cuando el dispositivo es un móvil
3
3
  */
4
4
  export declare const MobileMenuActions: () => import("react/jsx-runtime").JSX.Element;