@m4l/components 9.2.56-beta.3 → 9.2.56-beta.5
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/utils/getStylesColorsByMode.d.ts +48 -0
- package/components/DataGrid/Datagrid.styles.js +33 -6
- package/components/PropertyValue/PropertyValue.styles.js +1 -1
- package/components/WindowBase/WindowBase.js +4 -1
- package/components/WindowBase/WindowBase.styles.js +57 -47
- package/components/WindowBase/subcomponents/Header/HeaderWindowBase.js +2 -0
- package/components/WindowBase/subcomponents/Header/types.d.ts +1 -1
- package/components/WindowBase/types.d.ts +6 -0
- package/components/areas/components/AreasAdmin/AreasAdmin.styles.js +12 -3
- package/components/areas/components/AreasViewer/AreasViewer.js +11 -3
- package/components/areas/components/AreasViewer/AreasViewer.styles.js +6 -3
- package/components/areas/components/AreasViewer/subcomponents/Area/Area.js +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +20 -4
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/types.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/BaseArea.js +7 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/BaseArea/types.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/Window.js +1 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/types.d.ts +2 -0
- package/components/areas/components/AreasViewer/types.d.ts +6 -0
- package/components/areas/contexts/AreasContext/helpers/helper.d.ts +2 -9
- package/components/areas/contexts/AreasContext/helpers/helper.js +14 -16
- package/components/areas/contexts/AreasContext/store.js +3 -3
- package/components/formatters/BooleanFormatter/BooleanFormatter.js +3 -1
- package/components/formatters/BooleanFormatter/BooleanFormatter.styles.js +2 -2
- package/components/mui_extended/Accordion/Accordion.js +1 -1
- package/components/mui_extended/Accordion/styles.js +12 -8
- package/components/mui_extended/Tab/Tab.styles.js +3 -3
- package/components/mui_extended/TabContent/TabContent.js +2 -2
- package/components/mui_extended/TabContent/TabContent.styles.js +8 -3
- package/components/mui_extended/TabContent/types.d.ts +1 -0
- package/components/popups/components/PopupsViewer/PopupsViewer.styles.js +2 -2
- package/hooks/useDynamicFilterAndSort/icons.d.ts +2 -2
- package/hooks/useDynamicFilterAndSort/icons.js +2 -2
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +2 -1
- package/package.json +3 -3
|
@@ -20,6 +20,8 @@ export declare const colorsLight: {
|
|
|
20
20
|
readonly opacity: string;
|
|
21
21
|
readonly toneOpacity: string;
|
|
22
22
|
readonly semanticText: string;
|
|
23
|
+
readonly opacityGradient1: string;
|
|
24
|
+
readonly opacityGradient2: string;
|
|
23
25
|
};
|
|
24
26
|
readonly default: {
|
|
25
27
|
readonly semanticText: string;
|
|
@@ -40,6 +42,8 @@ export declare const colorsLight: {
|
|
|
40
42
|
readonly activeOpacity: string;
|
|
41
43
|
readonly opacity: string;
|
|
42
44
|
readonly toneOpacity: string;
|
|
45
|
+
readonly opacityGradient1: string;
|
|
46
|
+
readonly opacityGradient2: string;
|
|
43
47
|
};
|
|
44
48
|
readonly divider: string;
|
|
45
49
|
readonly text: {
|
|
@@ -129,6 +133,8 @@ export declare const colorsLight: {
|
|
|
129
133
|
readonly opacity: string;
|
|
130
134
|
readonly toneOpacity: string;
|
|
131
135
|
readonly semanticText: string;
|
|
136
|
+
readonly opacityGradient1: string;
|
|
137
|
+
readonly opacityGradient2: string;
|
|
132
138
|
};
|
|
133
139
|
readonly success: {
|
|
134
140
|
readonly focusVisible: string;
|
|
@@ -149,6 +155,8 @@ export declare const colorsLight: {
|
|
|
149
155
|
readonly opacity: string;
|
|
150
156
|
readonly toneOpacity: string;
|
|
151
157
|
readonly semanticText: string;
|
|
158
|
+
readonly opacityGradient1: string;
|
|
159
|
+
readonly opacityGradient2: string;
|
|
152
160
|
};
|
|
153
161
|
readonly warning: {
|
|
154
162
|
readonly focusVisible: string;
|
|
@@ -169,6 +177,8 @@ export declare const colorsLight: {
|
|
|
169
177
|
readonly opacity: string;
|
|
170
178
|
readonly toneOpacity: string;
|
|
171
179
|
readonly semanticText: string;
|
|
180
|
+
readonly opacityGradient1: string;
|
|
181
|
+
readonly opacityGradient2: string;
|
|
172
182
|
};
|
|
173
183
|
readonly error: {
|
|
174
184
|
readonly focusVisible: string;
|
|
@@ -189,6 +199,8 @@ export declare const colorsLight: {
|
|
|
189
199
|
readonly opacity: string;
|
|
190
200
|
readonly toneOpacity: string;
|
|
191
201
|
readonly semanticText: string;
|
|
202
|
+
readonly opacityGradient1: string;
|
|
203
|
+
readonly opacityGradient2: string;
|
|
192
204
|
};
|
|
193
205
|
} | {
|
|
194
206
|
readonly mode: "dark";
|
|
@@ -212,6 +224,8 @@ export declare const colorsLight: {
|
|
|
212
224
|
readonly opacity: string;
|
|
213
225
|
readonly toneOpacity: string;
|
|
214
226
|
readonly semanticText: string;
|
|
227
|
+
readonly opacityGradient1: string;
|
|
228
|
+
readonly opacityGradient2: string;
|
|
215
229
|
};
|
|
216
230
|
readonly default: {
|
|
217
231
|
readonly semanticText: string;
|
|
@@ -232,6 +246,8 @@ export declare const colorsLight: {
|
|
|
232
246
|
readonly activeOpacity: string;
|
|
233
247
|
readonly opacity: string;
|
|
234
248
|
readonly toneOpacity: string;
|
|
249
|
+
readonly opacityGradient1: string;
|
|
250
|
+
readonly opacityGradient2: string;
|
|
235
251
|
};
|
|
236
252
|
readonly text: {
|
|
237
253
|
readonly primary: string;
|
|
@@ -321,6 +337,8 @@ export declare const colorsLight: {
|
|
|
321
337
|
readonly opacity: string;
|
|
322
338
|
readonly toneOpacity: string;
|
|
323
339
|
readonly semanticText: string;
|
|
340
|
+
readonly opacityGradient1: string;
|
|
341
|
+
readonly opacityGradient2: string;
|
|
324
342
|
};
|
|
325
343
|
readonly success: {
|
|
326
344
|
readonly focusVisible: string;
|
|
@@ -341,6 +359,8 @@ export declare const colorsLight: {
|
|
|
341
359
|
readonly opacity: string;
|
|
342
360
|
readonly toneOpacity: string;
|
|
343
361
|
readonly semanticText: string;
|
|
362
|
+
readonly opacityGradient1: string;
|
|
363
|
+
readonly opacityGradient2: string;
|
|
344
364
|
};
|
|
345
365
|
readonly warning: {
|
|
346
366
|
readonly focusVisible: string;
|
|
@@ -361,6 +381,8 @@ export declare const colorsLight: {
|
|
|
361
381
|
readonly opacity: string;
|
|
362
382
|
readonly toneOpacity: string;
|
|
363
383
|
readonly semanticText: string;
|
|
384
|
+
readonly opacityGradient1: string;
|
|
385
|
+
readonly opacityGradient2: string;
|
|
364
386
|
};
|
|
365
387
|
readonly error: {
|
|
366
388
|
readonly focusVisible: string;
|
|
@@ -381,6 +403,8 @@ export declare const colorsLight: {
|
|
|
381
403
|
readonly opacity: string;
|
|
382
404
|
readonly toneOpacity: string;
|
|
383
405
|
readonly semanticText: string;
|
|
406
|
+
readonly opacityGradient1: string;
|
|
407
|
+
readonly opacityGradient2: string;
|
|
384
408
|
};
|
|
385
409
|
};
|
|
386
410
|
export declare const colorsDark: {
|
|
@@ -405,6 +429,8 @@ export declare const colorsDark: {
|
|
|
405
429
|
readonly opacity: string;
|
|
406
430
|
readonly toneOpacity: string;
|
|
407
431
|
readonly semanticText: string;
|
|
432
|
+
readonly opacityGradient1: string;
|
|
433
|
+
readonly opacityGradient2: string;
|
|
408
434
|
};
|
|
409
435
|
readonly default: {
|
|
410
436
|
readonly semanticText: string;
|
|
@@ -425,6 +451,8 @@ export declare const colorsDark: {
|
|
|
425
451
|
readonly activeOpacity: string;
|
|
426
452
|
readonly opacity: string;
|
|
427
453
|
readonly toneOpacity: string;
|
|
454
|
+
readonly opacityGradient1: string;
|
|
455
|
+
readonly opacityGradient2: string;
|
|
428
456
|
};
|
|
429
457
|
readonly divider: string;
|
|
430
458
|
readonly text: {
|
|
@@ -514,6 +542,8 @@ export declare const colorsDark: {
|
|
|
514
542
|
readonly opacity: string;
|
|
515
543
|
readonly toneOpacity: string;
|
|
516
544
|
readonly semanticText: string;
|
|
545
|
+
readonly opacityGradient1: string;
|
|
546
|
+
readonly opacityGradient2: string;
|
|
517
547
|
};
|
|
518
548
|
readonly success: {
|
|
519
549
|
readonly focusVisible: string;
|
|
@@ -534,6 +564,8 @@ export declare const colorsDark: {
|
|
|
534
564
|
readonly opacity: string;
|
|
535
565
|
readonly toneOpacity: string;
|
|
536
566
|
readonly semanticText: string;
|
|
567
|
+
readonly opacityGradient1: string;
|
|
568
|
+
readonly opacityGradient2: string;
|
|
537
569
|
};
|
|
538
570
|
readonly warning: {
|
|
539
571
|
readonly focusVisible: string;
|
|
@@ -554,6 +586,8 @@ export declare const colorsDark: {
|
|
|
554
586
|
readonly opacity: string;
|
|
555
587
|
readonly toneOpacity: string;
|
|
556
588
|
readonly semanticText: string;
|
|
589
|
+
readonly opacityGradient1: string;
|
|
590
|
+
readonly opacityGradient2: string;
|
|
557
591
|
};
|
|
558
592
|
readonly error: {
|
|
559
593
|
readonly focusVisible: string;
|
|
@@ -574,6 +608,8 @@ export declare const colorsDark: {
|
|
|
574
608
|
readonly opacity: string;
|
|
575
609
|
readonly toneOpacity: string;
|
|
576
610
|
readonly semanticText: string;
|
|
611
|
+
readonly opacityGradient1: string;
|
|
612
|
+
readonly opacityGradient2: string;
|
|
577
613
|
};
|
|
578
614
|
} | {
|
|
579
615
|
readonly mode: "dark";
|
|
@@ -597,6 +633,8 @@ export declare const colorsDark: {
|
|
|
597
633
|
readonly opacity: string;
|
|
598
634
|
readonly toneOpacity: string;
|
|
599
635
|
readonly semanticText: string;
|
|
636
|
+
readonly opacityGradient1: string;
|
|
637
|
+
readonly opacityGradient2: string;
|
|
600
638
|
};
|
|
601
639
|
readonly default: {
|
|
602
640
|
readonly semanticText: string;
|
|
@@ -617,6 +655,8 @@ export declare const colorsDark: {
|
|
|
617
655
|
readonly activeOpacity: string;
|
|
618
656
|
readonly opacity: string;
|
|
619
657
|
readonly toneOpacity: string;
|
|
658
|
+
readonly opacityGradient1: string;
|
|
659
|
+
readonly opacityGradient2: string;
|
|
620
660
|
};
|
|
621
661
|
readonly text: {
|
|
622
662
|
readonly primary: string;
|
|
@@ -706,6 +746,8 @@ export declare const colorsDark: {
|
|
|
706
746
|
readonly opacity: string;
|
|
707
747
|
readonly toneOpacity: string;
|
|
708
748
|
readonly semanticText: string;
|
|
749
|
+
readonly opacityGradient1: string;
|
|
750
|
+
readonly opacityGradient2: string;
|
|
709
751
|
};
|
|
710
752
|
readonly success: {
|
|
711
753
|
readonly focusVisible: string;
|
|
@@ -726,6 +768,8 @@ export declare const colorsDark: {
|
|
|
726
768
|
readonly opacity: string;
|
|
727
769
|
readonly toneOpacity: string;
|
|
728
770
|
readonly semanticText: string;
|
|
771
|
+
readonly opacityGradient1: string;
|
|
772
|
+
readonly opacityGradient2: string;
|
|
729
773
|
};
|
|
730
774
|
readonly warning: {
|
|
731
775
|
readonly focusVisible: string;
|
|
@@ -746,6 +790,8 @@ export declare const colorsDark: {
|
|
|
746
790
|
readonly opacity: string;
|
|
747
791
|
readonly toneOpacity: string;
|
|
748
792
|
readonly semanticText: string;
|
|
793
|
+
readonly opacityGradient1: string;
|
|
794
|
+
readonly opacityGradient2: string;
|
|
749
795
|
};
|
|
750
796
|
readonly error: {
|
|
751
797
|
readonly focusVisible: string;
|
|
@@ -766,6 +812,8 @@ export declare const colorsDark: {
|
|
|
766
812
|
readonly opacity: string;
|
|
767
813
|
readonly toneOpacity: string;
|
|
768
814
|
readonly semanticText: string;
|
|
815
|
+
readonly opacityGradient1: string;
|
|
816
|
+
readonly opacityGradient2: string;
|
|
769
817
|
};
|
|
770
818
|
};
|
|
771
819
|
export declare const generalColors: string[];
|
|
@@ -47,6 +47,11 @@ const dataGridStyles = {
|
|
|
47
47
|
"&& .M4lclassCssSpecificity": {
|
|
48
48
|
fontWeight: 400
|
|
49
49
|
//Se utiliza directamente el valor porque no está tokenizado
|
|
50
|
+
},
|
|
51
|
+
'& [role="row"]:last-of-type': {
|
|
52
|
+
"& .rdg-cell": {
|
|
53
|
+
boxShadow: `inset 0 0.5px 0 0 ${theme.vars.palette?.border.secondary}, inset 0 -0.5px 0 0 ${theme.vars.palette?.border.secondary}`
|
|
54
|
+
}
|
|
50
55
|
}
|
|
51
56
|
}),
|
|
52
57
|
customHeader: ({ ownerState }) => ({
|
|
@@ -83,7 +88,11 @@ const dataGridStyles = {
|
|
|
83
88
|
display: "flex",
|
|
84
89
|
flexDirection: "row",
|
|
85
90
|
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
86
|
-
alignItems: "center"
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
93
|
+
border: theme.vars.size.borderStroke.container,
|
|
94
|
+
borderColor: theme.vars.palette?.border.disabled,
|
|
95
|
+
padding: theme.vars.size.baseSpacings.sp1
|
|
87
96
|
}),
|
|
88
97
|
/**
|
|
89
98
|
* Estilos para el contenedor de las acciones derecho
|
|
@@ -247,9 +256,9 @@ const dataGridStyles = {
|
|
|
247
256
|
position: "relative",
|
|
248
257
|
height: "100%",
|
|
249
258
|
overflow: "hidden",
|
|
250
|
-
borderRadius: theme.vars.size.borderRadius.
|
|
259
|
+
borderRadius: theme.vars.size.borderRadius.r2,
|
|
251
260
|
border: theme.vars.size.borderStroke.container,
|
|
252
|
-
borderColor: theme.vars.palette?.border.
|
|
261
|
+
borderColor: theme.vars.palette?.border.secondary,
|
|
253
262
|
"& .rdg ": {
|
|
254
263
|
border: "none",
|
|
255
264
|
background: theme.vars.palette.background.default,
|
|
@@ -431,14 +440,32 @@ const dataGridStyles = {
|
|
|
431
440
|
textAlign: "start",
|
|
432
441
|
display: "inline",
|
|
433
442
|
justifyContent: "center",
|
|
434
|
-
alignItems: "center"
|
|
443
|
+
alignItems: "center",
|
|
444
|
+
"& .M4LBooleanFormatter-root": {
|
|
445
|
+
marginRight: "auto"
|
|
446
|
+
},
|
|
447
|
+
"& .MuiCheckbox-root": {
|
|
448
|
+
marginRight: "auto"
|
|
449
|
+
}
|
|
435
450
|
},
|
|
436
451
|
"& .rdg-cell.rdg-cell-align-center": {
|
|
437
452
|
textAlign: "center",
|
|
438
|
-
alignContent: "center"
|
|
453
|
+
alignContent: "center",
|
|
454
|
+
"& .M4LBooleanFormatter-root": {
|
|
455
|
+
margin: "0 auto"
|
|
456
|
+
},
|
|
457
|
+
"& .MuiCheckbox-root": {
|
|
458
|
+
margin: "auto"
|
|
459
|
+
}
|
|
439
460
|
},
|
|
440
461
|
"& .rdg-cell.rdg-cell-align-right": {
|
|
441
|
-
textAlign: "right"
|
|
462
|
+
textAlign: "right",
|
|
463
|
+
"& .M4LBooleanFormatter-root": {
|
|
464
|
+
marginLeft: "auto"
|
|
465
|
+
},
|
|
466
|
+
"& .MuiCheckbox-root": {
|
|
467
|
+
marginLeft: "auto"
|
|
468
|
+
}
|
|
442
469
|
},
|
|
443
470
|
'& [role="columnheader"].rdg-cell.rdg-cell-align-left .rdg-header-sort-name': {
|
|
444
471
|
textAlign: "start",
|
|
@@ -47,7 +47,7 @@ const propertyValueStyles = {
|
|
|
47
47
|
paddingBottom: !ownerState?.isForm ? theme.vars.size.baseSpacings.sp1 : void 0,
|
|
48
48
|
borderBottom: !ownerState?.isForm ? `${theme.vars.palette.border.disabled} solid 1px` : "none",
|
|
49
49
|
"&:hover": !ownerState?.isForm && {
|
|
50
|
-
background: theme.vars.palette.
|
|
50
|
+
background: theme.vars.palette.default?.hoverOpacity
|
|
51
51
|
},
|
|
52
52
|
...semanticStyle,
|
|
53
53
|
[`@container ${CONTAINER_QUERY_NAME} (min-width: 0px) and (max-width: 400px)`]: {
|
|
@@ -14,6 +14,7 @@ const WindowBase = (props) => {
|
|
|
14
14
|
children,
|
|
15
15
|
size = "medium",
|
|
16
16
|
selected = false,
|
|
17
|
+
maximized,
|
|
17
18
|
variant = "outlined",
|
|
18
19
|
version,
|
|
19
20
|
buildTime,
|
|
@@ -32,7 +33,8 @@ const WindowBase = (props) => {
|
|
|
32
33
|
selected,
|
|
33
34
|
variant,
|
|
34
35
|
size: currentSize,
|
|
35
|
-
type
|
|
36
|
+
type,
|
|
37
|
+
maximized
|
|
36
38
|
};
|
|
37
39
|
return /* @__PURE__ */ jsx(AppearanceComponentProvider, { defaultSize: currentSize, children: /* @__PURE__ */ jsxs(
|
|
38
40
|
WindowBaseStyled,
|
|
@@ -51,6 +53,7 @@ const WindowBase = (props) => {
|
|
|
51
53
|
size,
|
|
52
54
|
variant,
|
|
53
55
|
selected,
|
|
56
|
+
maximized,
|
|
54
57
|
onClose,
|
|
55
58
|
type,
|
|
56
59
|
...other
|
|
@@ -5,32 +5,53 @@ const windowBaseStyles = {
|
|
|
5
5
|
* Styles for the window base wrapper component.
|
|
6
6
|
*/
|
|
7
7
|
wrapperWindowBase: ({ theme, ownerState }) => ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...ownerState?.
|
|
18
|
-
...ownerState?.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
"&": {
|
|
9
|
+
position: "relative",
|
|
10
|
+
height: "100%",
|
|
11
|
+
width: "100%",
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: "column",
|
|
14
|
+
borderRadius: ownerState?.variant === "outlined" ? theme.vars.size.borderRadius.r2 : "unset",
|
|
15
|
+
backgroundColor: theme.vars.palette.background.default,
|
|
16
|
+
overflow: "hidden",
|
|
17
|
+
...ownerState?.variant === "outlined" && {
|
|
18
|
+
...ownerState?.selected ? {
|
|
19
|
+
...ownerState?.type === "layout" ? {
|
|
20
|
+
background: `linear-gradient(to bottom,
|
|
21
|
+
${theme.vars.palette.primary.opacityGradient1},
|
|
22
|
+
${theme.vars.palette.primary.opacityGradient2})`,
|
|
23
|
+
"&::before": {
|
|
24
|
+
content: '""',
|
|
25
|
+
position: "absolute",
|
|
26
|
+
inset: "1px",
|
|
27
|
+
background: theme.vars.palette.background.default,
|
|
28
|
+
borderRadius: "6.7px"
|
|
29
|
+
}
|
|
30
|
+
} : {
|
|
31
|
+
boxShadow: `inset 0px 0px 0 1px ${theme.vars.palette?.border.main}`
|
|
28
32
|
}
|
|
29
33
|
} : {
|
|
30
|
-
boxShadow: `inset 0px 0px 0
|
|
34
|
+
boxShadow: ownerState?.type === "layout" ? `inset 0px 0px 0 1px ${theme.vars.palette?.border.secondary}` : "unset"
|
|
31
35
|
}
|
|
32
|
-
}
|
|
33
|
-
|
|
36
|
+
},
|
|
37
|
+
...ownerState?.type === "popup" && {
|
|
38
|
+
"&&&": {
|
|
39
|
+
boxShadow: theme.vars.customShadows.z1,
|
|
40
|
+
border: `1px solid ${theme.vars.palette?.border.secondary}`,
|
|
41
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
42
|
+
...ownerState?.selected && {
|
|
43
|
+
boxShadow: theme.vars.customShadows.z4,
|
|
44
|
+
border: `1px solid ${theme.vars.palette?.border.main}`
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
...ownerState?.type === "layout" && {
|
|
49
|
+
...ownerState?.selected && !ownerState?.maximized ? {
|
|
50
|
+
boxShadow: theme.vars.customShadows.primary
|
|
51
|
+
} : {}
|
|
52
|
+
},
|
|
53
|
+
...ownerState?.type === "modal" && {
|
|
54
|
+
boxShadow: `${theme.vars.customShadows.z3}!important`
|
|
34
55
|
}
|
|
35
56
|
}
|
|
36
57
|
}),
|
|
@@ -59,17 +80,14 @@ const windowBaseStyles = {
|
|
|
59
80
|
alignSelf: "stretch",
|
|
60
81
|
cursor: "all-scroll",
|
|
61
82
|
position: "relative",
|
|
62
|
-
...ownerState?.type === "
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
})
|
|
71
|
-
)
|
|
72
|
-
} : ownerState?.type === "modal" ? {
|
|
83
|
+
...ownerState?.type === "layout" || ownerState?.type === "modal" ? getSizeStyles(
|
|
84
|
+
theme,
|
|
85
|
+
ownerState?.size,
|
|
86
|
+
"container",
|
|
87
|
+
(size) => ({
|
|
88
|
+
minHeight: size
|
|
89
|
+
})
|
|
90
|
+
) : {
|
|
73
91
|
...getSizeStyles(
|
|
74
92
|
theme,
|
|
75
93
|
ownerState?.size,
|
|
@@ -79,15 +97,7 @@ const windowBaseStyles = {
|
|
|
79
97
|
height: "auto"
|
|
80
98
|
})
|
|
81
99
|
)
|
|
82
|
-
}
|
|
83
|
-
...ownerState?.type === "layout" ? getSizeStyles(
|
|
84
|
-
theme,
|
|
85
|
-
ownerState?.size,
|
|
86
|
-
"container",
|
|
87
|
-
(size) => ({
|
|
88
|
-
minHeight: size
|
|
89
|
-
})
|
|
90
|
-
) : {},
|
|
100
|
+
},
|
|
91
101
|
borderBottom: "1px solid #ffffff00",
|
|
92
102
|
...ownerState?.selected && ownerState?.type === "layout" && ownerState?.variant === "outlined" ? {
|
|
93
103
|
background: `linear-gradient(to right, ${alpha(theme.palette.primary.opacity, 0.04)}, ${alpha(theme.palette.primary.opacity, 0)});`,
|
|
@@ -125,7 +135,7 @@ const windowBaseStyles = {
|
|
|
125
135
|
*/
|
|
126
136
|
headerTitleWindowBase: ({ theme, ownerState }) => ({
|
|
127
137
|
minWidth: "30px",
|
|
128
|
-
...ownerState?.selected && ownerState?.type !== "modal"
|
|
138
|
+
...ownerState?.selected && ownerState?.type !== "modal" ? {
|
|
129
139
|
color: `${theme.vars.palette["primary"].semanticText} !important`
|
|
130
140
|
} : {
|
|
131
141
|
color: `${theme.vars.palette.text.secondary} !important`
|
|
@@ -133,7 +143,7 @@ const windowBaseStyles = {
|
|
|
133
143
|
whiteSpace: "nowrap",
|
|
134
144
|
overflow: "hidden",
|
|
135
145
|
textOverflow: "ellipsis",
|
|
136
|
-
paddingLeft: theme.vars.size.baseSpacings.
|
|
146
|
+
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
137
147
|
userSelect: "none",
|
|
138
148
|
cursor: "all-scroll"
|
|
139
149
|
}),
|
|
@@ -158,7 +168,7 @@ const windowBaseStyles = {
|
|
|
158
168
|
headerSubTitleWindowBase: ({ theme, ownerState }) => ({
|
|
159
169
|
width: "auto !important",
|
|
160
170
|
height: "auto !important",
|
|
161
|
-
...ownerState?.selected && ownerState?.type !== "modal"
|
|
171
|
+
...ownerState?.selected && ownerState?.type !== "modal" ? {
|
|
162
172
|
color: `${theme.vars.palette["primary"].semanticText} !important`
|
|
163
173
|
} : {
|
|
164
174
|
color: `${theme.vars.palette.text.secondary} !important`
|
|
@@ -174,7 +184,7 @@ const windowBaseStyles = {
|
|
|
174
184
|
*/
|
|
175
185
|
headerIconWindowBase: ({ theme, ownerState }) => ({
|
|
176
186
|
"& .M4LIcon-icon": {
|
|
177
|
-
...ownerState?.selected && ownerState?.type !== "modal"
|
|
187
|
+
...ownerState?.selected && ownerState?.type !== "modal" ? {
|
|
178
188
|
backgroundColor: `${theme.vars.palette["primary"].semanticText} !important`
|
|
179
189
|
} : {
|
|
180
190
|
backgroundColor: `${theme.vars.palette.text.secondary} !important`
|
|
@@ -16,6 +16,7 @@ const HeaderWindowBase = (props) => {
|
|
|
16
16
|
iconUrl,
|
|
17
17
|
size,
|
|
18
18
|
selected,
|
|
19
|
+
maximized,
|
|
19
20
|
version,
|
|
20
21
|
buildTime,
|
|
21
22
|
variant,
|
|
@@ -95,6 +96,7 @@ const HeaderWindowBase = (props) => {
|
|
|
95
96
|
}, [insideActions, version, host_static_assets, environment_assets, buildTime, dateFormatter]);
|
|
96
97
|
const ownerState = {
|
|
97
98
|
selected,
|
|
99
|
+
maximized,
|
|
98
100
|
variant,
|
|
99
101
|
size,
|
|
100
102
|
type
|
|
@@ -32,7 +32,7 @@ import { WindowBaseAction, WindowBaseProps } from '../../types';
|
|
|
32
32
|
* - `selected` modifies the visual appearance to indicate the selected state.
|
|
33
33
|
* @see WindowBaseProps - General properties for the window base.
|
|
34
34
|
*/
|
|
35
|
-
export type HeaderProps = Pick<WindowBaseProps, 'title' | 'subTitle' | 'iconUrl' | 'onClose' | 'version' | 'selected' | 'variant' | 'type' | 'buildTime'> & {
|
|
35
|
+
export type HeaderProps = Pick<WindowBaseProps, 'title' | 'subTitle' | 'iconUrl' | 'onClose' | 'version' | 'selected' | 'variant' | 'type' | 'buildTime' | 'maximized'> & {
|
|
36
36
|
actions?: WindowBaseAction[];
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
@@ -122,6 +122,11 @@ export interface WindowBaseProps {
|
|
|
122
122
|
* When `true`, the window may display a visual indicator to denote selection.
|
|
123
123
|
*/
|
|
124
124
|
selected?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Indicates if the window is maximized.
|
|
127
|
+
* When `true`, the window may display a visual indicator to denote maximization.
|
|
128
|
+
*/
|
|
129
|
+
maximized?: boolean;
|
|
125
130
|
/**
|
|
126
131
|
* The version label for the window.
|
|
127
132
|
* Useful for displaying version information (e.g., `1.0.0`) in the header or footer.
|
|
@@ -193,6 +198,7 @@ export type WindowBaseType = keyof typeof WindowBaseSlots;
|
|
|
193
198
|
*/
|
|
194
199
|
export type WindowBaseOwnerState = Pick<WindowBaseProps, 'size'> & {
|
|
195
200
|
selected?: WindowBaseProps['selected'];
|
|
201
|
+
maximized?: WindowBaseProps['maximized'];
|
|
196
202
|
variant?: WindowBaseProps['variant'];
|
|
197
203
|
size?: WindowBaseProps['size'];
|
|
198
204
|
type?: WindowBaseProps['type'];
|
|
@@ -62,9 +62,12 @@ const areasAdminStyles = {
|
|
|
62
62
|
/**
|
|
63
63
|
* Root area container chip edit button
|
|
64
64
|
*/
|
|
65
|
-
areaContainerChipEditButton: () => ({
|
|
65
|
+
areaContainerChipEditButton: ({ theme }) => ({
|
|
66
66
|
display: "flex",
|
|
67
|
-
flexDirection: "row"
|
|
67
|
+
flexDirection: "row",
|
|
68
|
+
"& .M4LIcon-icon": {
|
|
69
|
+
backgroundColor: `${theme.vars.palette.primary.contrastText}!important`
|
|
70
|
+
}
|
|
68
71
|
}),
|
|
69
72
|
/**
|
|
70
73
|
* Chip areas Styles
|
|
@@ -79,6 +82,9 @@ const areasAdminStyles = {
|
|
|
79
82
|
"&:hover > .M4LAreasAdmin-menuActionsChip": {
|
|
80
83
|
opacity: 1,
|
|
81
84
|
pointerEvents: "auto"
|
|
85
|
+
},
|
|
86
|
+
"& .M4LIcon-icon": {
|
|
87
|
+
backgroundColor: ownerState?.isAreaSelected ? `${theme.vars.palette.primary.contrastText}!important` : `${theme.vars.palette.text.secondary}!important`
|
|
82
88
|
}
|
|
83
89
|
}),
|
|
84
90
|
/**
|
|
@@ -90,7 +96,10 @@ const areasAdminStyles = {
|
|
|
90
96
|
theme,
|
|
91
97
|
ownerState?.size || "small",
|
|
92
98
|
"action"
|
|
93
|
-
)
|
|
99
|
+
),
|
|
100
|
+
"& .M4LIcon-icon": {
|
|
101
|
+
backgroundColor: `${theme.vars.palette.text.primary}!important`
|
|
102
|
+
}
|
|
94
103
|
}),
|
|
95
104
|
/**
|
|
96
105
|
* Menu actions Styles
|
|
@@ -13,18 +13,26 @@ import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoo
|
|
|
13
13
|
import { A as AreasViewerSlots } from "./slots/AreasViewerEnum.js";
|
|
14
14
|
import clsx from "clsx";
|
|
15
15
|
import { forwardRef } from "react";
|
|
16
|
+
import { u as useComponentSize } from "../../../../hooks/useComponentSize/useComponentSize.js";
|
|
16
17
|
const AreasViewer = forwardRef((props, ref) => {
|
|
17
18
|
const {
|
|
18
19
|
dataTestId,
|
|
19
|
-
className
|
|
20
|
+
className,
|
|
21
|
+
size
|
|
20
22
|
} = props;
|
|
21
23
|
const areas = useAreasStore((state) => state.areasIds, shallow);
|
|
22
24
|
const windowsModals = useAreasStore((state) => state.windowsModalsIds);
|
|
23
25
|
const currentArea = useAreasStore((state) => state.currentAreaId);
|
|
24
26
|
const status = useAreasStore((state) => state.ownerState?.status);
|
|
25
27
|
const { init } = useAreasStore((state) => state.areasActions);
|
|
28
|
+
const { currentSize } = useComponentSize(size);
|
|
29
|
+
const maximizedId = useAreasStore(
|
|
30
|
+
(state) => currentArea ? state.hashAreas[currentArea]?.maximizedId : void 0,
|
|
31
|
+
shallow
|
|
32
|
+
);
|
|
26
33
|
const ownerState = {
|
|
27
|
-
selected: !!currentArea
|
|
34
|
+
selected: !!currentArea,
|
|
35
|
+
maximized: !!maximizedId
|
|
28
36
|
};
|
|
29
37
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
38
|
/* @__PURE__ */ jsx(
|
|
@@ -42,7 +50,7 @@ const AreasViewer = forwardRef((props, ref) => {
|
|
|
42
50
|
)
|
|
43
51
|
} : {},
|
|
44
52
|
children: status === "loaded" ? areas.map((area) => {
|
|
45
|
-
return /* @__PURE__ */ jsx(Area, { areaId: area, selected: currentArea === area }, area);
|
|
53
|
+
return /* @__PURE__ */ jsx(Area, { areaId: area, selected: currentArea === area, size: currentSize }, area);
|
|
46
54
|
}) : /* @__PURE__ */ jsx(LoadingError, { status, action: () => init() })
|
|
47
55
|
}
|
|
48
56
|
),
|
|
@@ -3,12 +3,12 @@ const areasViewerStyles = {
|
|
|
3
3
|
/**
|
|
4
4
|
* Root areas viewer Styles
|
|
5
5
|
*/
|
|
6
|
-
root: ({ theme }) => ({
|
|
6
|
+
root: ({ theme, ownerState }) => ({
|
|
7
7
|
width: "100%",
|
|
8
8
|
height: "100%",
|
|
9
9
|
overflow: "hidden",
|
|
10
10
|
position: "relative",
|
|
11
|
-
background: theme.vars.palette.background.
|
|
11
|
+
background: theme.vars.palette.background.base,
|
|
12
12
|
// areaGridLayout
|
|
13
13
|
"& .M4LAreasViewer-areaGridLayout": {
|
|
14
14
|
height: "100% !important",
|
|
@@ -19,7 +19,10 @@ const areasViewerStyles = {
|
|
|
19
19
|
userSelect: "none",
|
|
20
20
|
touchAction: "none"
|
|
21
21
|
}
|
|
22
|
-
}
|
|
22
|
+
},
|
|
23
|
+
...ownerState?.maximized ? {
|
|
24
|
+
background: theme.vars.palette.background.default
|
|
25
|
+
} : {}
|
|
23
26
|
}),
|
|
24
27
|
/**
|
|
25
28
|
* Areas root Styles
|
|
@@ -3,12 +3,12 @@ import { B as BaseArea } from "./subcomponents/BaseArea/BaseArea.js";
|
|
|
3
3
|
import { u as useAreasStore } from "../../../../hooks/useAreas/index.js";
|
|
4
4
|
import { a as AreaRootStyled } from "../../slots/AreasViewerSlots.js";
|
|
5
5
|
const Area = (props) => {
|
|
6
|
-
const { selected, areaId } = props;
|
|
6
|
+
const { selected, areaId, size } = props;
|
|
7
7
|
const status = useAreasStore((state) => state.hashAreas[areaId].status);
|
|
8
8
|
if (status === "init") {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
|
-
return /* @__PURE__ */ jsx(AreaRootStyled, { ownerState: { selected }, children: /* @__PURE__ */ jsx(BaseArea, { areaId }) });
|
|
11
|
+
return /* @__PURE__ */ jsx(AreaRootStyled, { ownerState: { selected }, children: /* @__PURE__ */ jsx(BaseArea, { areaId, size }) });
|
|
12
12
|
};
|
|
13
13
|
Area.displayName = "Area";
|
|
14
14
|
export {
|
|
@@ -4,15 +4,17 @@ import { W as Window } from "../Window/Window.js";
|
|
|
4
4
|
import { u as useAreasStore } from "../../../../../../hooks/useAreas/index.js";
|
|
5
5
|
import { a as areasViewerClasses } from "../../../../classes/index.js";
|
|
6
6
|
import clsx from "clsx";
|
|
7
|
-
import { P as PADDING_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, R as RESPONSIVE_ROW_HEIGHTS
|
|
7
|
+
import { P as PADDING_GRIDLAYOUT, M as MARGIN_GRIDLAYOUT, R as RESPONSIVE_ROW_HEIGHTS } from "../../../../../../contexts/AreasContext/helpers/helper.js";
|
|
8
8
|
import { M as MemonizePopupsViewer } from "../../../../../../../popups/components/PopupsViewer/PopupsViewer.js";
|
|
9
|
-
import { useState } from "react";
|
|
9
|
+
import { useState, useMemo } from "react";
|
|
10
10
|
import { d as dragResizeWindowRNDClasses } from "../../../../../../../DragResizeWindowRND/classes/index.js";
|
|
11
|
+
import { useTheme } from "@mui/material";
|
|
12
|
+
import { u as useComponentSize } from "../../../../../../../../hooks/useComponentSize/useComponentSize.js";
|
|
11
13
|
import { w as withSizeProvider } from "../../../../../../../GridLayout/subcomponents/withSizeProvider/index.js";
|
|
12
14
|
import { R as Responsive } from "../../../../../../../GridLayout/subcomponents/Responsive/index.js";
|
|
13
15
|
const ResponsiveGridLayout = withSizeProvider(Responsive);
|
|
14
16
|
const AreaGridLayout = (props) => {
|
|
15
|
-
const { areaId } = props;
|
|
17
|
+
const { areaId, size } = props;
|
|
16
18
|
const hashLayoutItems = useAreasStore((state) => state.hashAreas[areaId].layoutItemsIds, shallow);
|
|
17
19
|
const layouts = useAreasStore((state) => state.hashAreas[areaId].layouts, shallow);
|
|
18
20
|
const breakpoints = useAreasStore((state) => state.hashAreas[areaId].breakpoints, shallow);
|
|
@@ -22,6 +24,8 @@ const AreaGridLayout = (props) => {
|
|
|
22
24
|
(state) => state.areaActions,
|
|
23
25
|
shallow
|
|
24
26
|
);
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
const { currentSize } = useComponentSize(size);
|
|
25
29
|
const [gridLayouContainer, setGridLayouContainer] = useState(void 0);
|
|
26
30
|
const onResizeStart = () => {
|
|
27
31
|
if (gridLayouContainer) {
|
|
@@ -48,6 +52,18 @@ const AreaGridLayout = (props) => {
|
|
|
48
52
|
setGridLayouContainer(nodeElement);
|
|
49
53
|
}
|
|
50
54
|
};
|
|
55
|
+
const RESPONSIVE_HEIGHT_VALUES = useMemo(() => {
|
|
56
|
+
const dynamicHeight = theme?.size?.[theme?.generalSettings?.isMobile ? "mobile" : "desktop"]?.[currentSize]?.container;
|
|
57
|
+
const parsedHeight = parseInt(dynamicHeight);
|
|
58
|
+
const safeHeight = isNaN(parsedHeight) ? 32 : parsedHeight;
|
|
59
|
+
return {
|
|
60
|
+
xxs: safeHeight,
|
|
61
|
+
xs: safeHeight,
|
|
62
|
+
sm: safeHeight,
|
|
63
|
+
md: safeHeight,
|
|
64
|
+
lg: safeHeight
|
|
65
|
+
};
|
|
66
|
+
}, [theme, currentSize]);
|
|
51
67
|
return /* @__PURE__ */ jsx(
|
|
52
68
|
ResponsiveGridLayout,
|
|
53
69
|
{
|
|
@@ -74,7 +90,7 @@ const AreaGridLayout = (props) => {
|
|
|
74
90
|
return /* @__PURE__ */ jsx(Window, { windowId: p.i, areaId });
|
|
75
91
|
},
|
|
76
92
|
breakpoints,
|
|
77
|
-
colapsedHeight:
|
|
93
|
+
colapsedHeight: RESPONSIVE_HEIGHT_VALUES,
|
|
78
94
|
rowHeight: RESPONSIVE_ROW_HEIGHTS,
|
|
79
95
|
cols,
|
|
80
96
|
containerMargin: [MARGIN_GRIDLAYOUT, MARGIN_GRIDLAYOUT],
|
|
@@ -3,10 +3,15 @@ import { A as AreaGridLayout } from "../AreaGridLayout/AreaGridLayout.js";
|
|
|
3
3
|
import { u as useAreasStore } from "../../../../../../hooks/useAreas/index.js";
|
|
4
4
|
import { L as LoadingError } from "../../../../../../../LoadingError/LoadingError.js";
|
|
5
5
|
import { B as BaseAreaStyled } from "../../../../slots/AreasViewerSlots.js";
|
|
6
|
+
import { shallow } from "zustand/shallow";
|
|
6
7
|
const BaseArea = (props) => {
|
|
7
|
-
const { areaId } = props;
|
|
8
|
+
const { areaId, size } = props;
|
|
8
9
|
const status = useAreasStore((state) => state.hashAreas[areaId].status);
|
|
9
|
-
|
|
10
|
+
const maximizedId = useAreasStore(
|
|
11
|
+
(state) => areaId ? state.hashAreas[areaId]?.maximizedId : void 0,
|
|
12
|
+
shallow
|
|
13
|
+
);
|
|
14
|
+
return /* @__PURE__ */ jsx(BaseAreaStyled, { ownerState: { maximizedId }, children: status === "loaded" ? /* @__PURE__ */ jsx(AreaGridLayout, { areaId, size }) : /* @__PURE__ */ jsx(LoadingError, { status, action: () => {
|
|
10
15
|
} }) });
|
|
11
16
|
};
|
|
12
17
|
export {
|
|
@@ -3,6 +3,7 @@ import { AreasViewerSlots } from './slots/AreasViewerEnum';
|
|
|
3
3
|
import { Theme } from '@mui/material';
|
|
4
4
|
import { AREAS_VIEWER_KEY_COMPONENT } from './constants';
|
|
5
5
|
import { AreaProps } from './subcomponents/Area/types';
|
|
6
|
+
import { Sizes } from '@m4l/styles';
|
|
6
7
|
export type AreasViewerType = keyof typeof AreasViewerSlots;
|
|
7
8
|
export interface AreasViewerProps {
|
|
8
9
|
/**
|
|
@@ -13,6 +14,10 @@ export interface AreasViewerProps {
|
|
|
13
14
|
* Clase CSS para sobrescribir los estilos predeterminados.
|
|
14
15
|
*/
|
|
15
16
|
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Tamaño del componente.
|
|
19
|
+
*/
|
|
20
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
16
21
|
/**
|
|
17
22
|
* Props adicionales que se pueden pasar.
|
|
18
23
|
*/
|
|
@@ -20,5 +25,6 @@ export interface AreasViewerProps {
|
|
|
20
25
|
}
|
|
21
26
|
export type AreasViewerOwnerState = Pick<AreaProps, 'selected'> & {
|
|
22
27
|
isDraggingResizingPopup?: boolean;
|
|
28
|
+
maximized?: boolean;
|
|
23
29
|
};
|
|
24
30
|
export type AreasViewerStyles = M4LOverridesStyleRules<AreasViewerType, typeof AREAS_VIEWER_KEY_COMPONENT, Theme>;
|
|
@@ -2,8 +2,8 @@ import { WritableDraft } from 'immer/dist/internal';
|
|
|
2
2
|
import { Area, AreasStoreStateWithActions } from '../types';
|
|
3
3
|
import { WindowState } from '../../../types';
|
|
4
4
|
import { Layouts } from '../../../../GridLayout/types';
|
|
5
|
-
export declare const PADDING_GRIDLAYOUT =
|
|
6
|
-
export declare const MARGIN_GRIDLAYOUT =
|
|
5
|
+
export declare const PADDING_GRIDLAYOUT = 10;
|
|
6
|
+
export declare const MARGIN_GRIDLAYOUT = 10;
|
|
7
7
|
export declare const DEBOUCED_SAVE_TIME = 500;
|
|
8
8
|
export declare const THROTTLE_RESIZE_TIME = 300;
|
|
9
9
|
export declare const COOKIE_AREAS_ADMIN_CONTAINER_ID = "areas";
|
|
@@ -32,13 +32,6 @@ export declare const DEFAULT_LAYOUTS: {
|
|
|
32
32
|
xs: never[];
|
|
33
33
|
xxs: never[];
|
|
34
34
|
};
|
|
35
|
-
export declare const RESPONSIVE_COLAPSED_HEIGHTS: {
|
|
36
|
-
xxs: number;
|
|
37
|
-
xs: number;
|
|
38
|
-
sm: number;
|
|
39
|
-
md: number;
|
|
40
|
-
lg: number;
|
|
41
|
-
};
|
|
42
35
|
export declare const RESPONSIVE_ROW_HEIGHTS: {
|
|
43
36
|
xxs: number;
|
|
44
37
|
xs: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as createDynamicMFStore } from "../../../../WindowBase/contexts/DynamicMFParmsContext/store.js";
|
|
2
2
|
import { g as getAreasDictionary, A as AREAS_DICCTIONARY } from "../../../dictionary.js";
|
|
3
3
|
import { c as addLayoutItemToBreakPointIfNoExists } from "../../../../GridLayout/subcomponents/Responsive/responsiveUtils.js";
|
|
4
|
-
const PADDING_GRIDLAYOUT =
|
|
5
|
-
const MARGIN_GRIDLAYOUT =
|
|
4
|
+
const PADDING_GRIDLAYOUT = 10;
|
|
5
|
+
const MARGIN_GRIDLAYOUT = 10;
|
|
6
6
|
const DEBOUCED_SAVE_TIME = 500;
|
|
7
7
|
const COOKIE_AREAS_ADMIN_CONTAINER_ID = "areas";
|
|
8
8
|
const COOKIE_AREAS_ADMIN_ID = "admin";
|
|
@@ -12,8 +12,7 @@ const COOKIE_WINDOW_SELECTED = "windowSelected";
|
|
|
12
12
|
const BREAKPOINT_SIZES = { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 1 };
|
|
13
13
|
const NORMALIZED_COLS = { lg: 64, md: 48, sm: 32, xs: 24, xxs: 1 };
|
|
14
14
|
const DEFAULT_LAYOUTS = { lg: [], md: [], sm: [], xs: [], xxs: [] };
|
|
15
|
-
const
|
|
16
|
-
const RESPONSIVE_ROW_HEIGHTS = { xxs: 48, xs: 48, sm: 48, md: 40, lg: 40 };
|
|
15
|
+
const RESPONSIVE_ROW_HEIGHTS = { xxs: 32, xs: 32, sm: 32, md: 32, lg: 32 };
|
|
17
16
|
const DEFAULT_WINDOW = {
|
|
18
17
|
status: "init",
|
|
19
18
|
moduleActions: [],
|
|
@@ -197,18 +196,17 @@ export {
|
|
|
197
196
|
NORMALIZED_COLS as N,
|
|
198
197
|
PADDING_GRIDLAYOUT as P,
|
|
199
198
|
RESPONSIVE_ROW_HEIGHTS as R,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
199
|
+
getDataFromResponse as a,
|
|
200
|
+
getParmsFromValue as b,
|
|
201
|
+
COOKIE_BREAKPOINT_LAYOUTS as c,
|
|
202
|
+
DEFAULT_WINDOW as d,
|
|
203
|
+
COOKIE_WINDOWS as e,
|
|
204
|
+
deleteLayoutFromBreakPoints as f,
|
|
206
205
|
getCookiesContainer as g,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
COOKIE_AREAS_ADMIN_ID as m,
|
|
206
|
+
addArea as h,
|
|
207
|
+
DEFAULT_AREA as i,
|
|
208
|
+
getSelectedAreaIdFromCookies as j,
|
|
209
|
+
COOKIE_AREAS_ADMIN_CONTAINER_ID as k,
|
|
210
|
+
COOKIE_AREAS_ADMIN_ID as l,
|
|
213
211
|
setColapsedLayoutBreakPoints as s
|
|
214
212
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createStore } from "zustand";
|
|
2
2
|
import { devtools } from "zustand/middleware";
|
|
3
3
|
import { immer } from "zustand/middleware/immer";
|
|
4
|
-
import { g as getCookiesContainer,
|
|
4
|
+
import { g as getCookiesContainer, a as getDataFromResponse, b as getParmsFromValue, s as setColapsedLayoutBreakPoints, c as COOKIE_BREAKPOINT_LAYOUTS, D as DEBOUCED_SAVE_TIME, d as DEFAULT_WINDOW, M as MARGIN_GRIDLAYOUT, e as COOKIE_WINDOWS, f as deleteLayoutFromBreakPoints, R as RESPONSIVE_ROW_HEIGHTS, P as PADDING_GRIDLAYOUT, N as NORMALIZED_COLS, h as addArea, i as DEFAULT_AREA, j as getSelectedAreaIdFromCookies, C as COOKIE_WINDOW_SELECTED, k as COOKIE_AREAS_ADMIN_CONTAINER_ID, l as COOKIE_AREAS_ADMIN_ID } from "./helpers/helper.js";
|
|
5
5
|
import { c as createDynamicMFStore } from "../../../WindowBase/contexts/DynamicMFParmsContext/store.js";
|
|
6
6
|
import cloneDeep from "lodash-es/cloneDeep";
|
|
7
7
|
import debounce from "lodash-es/debounce";
|
|
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
441
441
|
bounds: {
|
|
442
442
|
left: MARGIN_GRIDLAYOUT,
|
|
443
443
|
top: MARGIN_GRIDLAYOUT,
|
|
444
|
-
right: -
|
|
445
|
-
bottom: -
|
|
444
|
+
right: -10,
|
|
445
|
+
bottom: -10
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
}
|
|
@@ -33,7 +33,8 @@ function BooleanFormatter(props) {
|
|
|
33
33
|
BooleanFormatterIconStyled,
|
|
34
34
|
{
|
|
35
35
|
ownerState,
|
|
36
|
-
src: value ? srcCheckTrue : srcCheckFalse
|
|
36
|
+
src: value ? srcCheckTrue : srcCheckFalse,
|
|
37
|
+
className: clsx(getComponentSlotRoot(BOOLEAN_FORMATTER_KEY_COMPONENT), className)
|
|
37
38
|
}
|
|
38
39
|
);
|
|
39
40
|
}
|
|
@@ -43,6 +44,7 @@ function BooleanFormatter(props) {
|
|
|
43
44
|
{
|
|
44
45
|
label: getFormatBoolean(presentationType, value, getLabel),
|
|
45
46
|
ownerState,
|
|
47
|
+
className: clsx(getComponentSlotRoot(BOOLEAN_FORMATTER_KEY_COMPONENT), className),
|
|
46
48
|
opacity: true,
|
|
47
49
|
color: value ? "primary" : "default",
|
|
48
50
|
variant: "contained"
|
|
@@ -11,9 +11,9 @@ const booleanFormatterStyles = {
|
|
|
11
11
|
/**
|
|
12
12
|
* Styled del icono
|
|
13
13
|
*/
|
|
14
|
-
icon: ({ theme }) => ({
|
|
14
|
+
icon: ({ theme, ownerState }) => ({
|
|
15
15
|
"& .M4LIcon-icon": {
|
|
16
|
-
backgroundColor: theme.vars.palette.text.
|
|
16
|
+
backgroundColor: ownerState?.value ? theme.vars.palette.primary.enabled : theme.vars.palette.text.secondary
|
|
17
17
|
}
|
|
18
18
|
}),
|
|
19
19
|
chip: {}
|
|
@@ -8,8 +8,8 @@ const accordionStyles = {
|
|
|
8
8
|
accordionRoot: ({ theme, ownerState }) => ({
|
|
9
9
|
"&&&": {
|
|
10
10
|
...ownerState?.variant === "outlined" && {
|
|
11
|
-
border: `${theme.size.borderStroke.container} ${theme.vars.palette.border.
|
|
12
|
-
borderRadius: ownerState?.variant === "outlined" ? theme.size.borderRadius
|
|
11
|
+
border: `${theme.size.borderStroke.container} ${theme.vars.palette.border.secondary}`,
|
|
12
|
+
borderRadius: ownerState?.variant === "outlined" ? theme.size.borderRadius.r2 : "unset"
|
|
13
13
|
},
|
|
14
14
|
...ownerState?.variant === "text" && {
|
|
15
15
|
borderBottom: ownerState?.expanded ? `${theme.size.borderStroke.container} ${theme.vars.palette.border.default}` : `${theme.size.borderStroke.container} ${theme.vars.palette.border.default}`,
|
|
@@ -27,22 +27,25 @@ const accordionStyles = {
|
|
|
27
27
|
accordionSummary: ({ theme, ownerState }) => ({
|
|
28
28
|
"&&&": {
|
|
29
29
|
paddingLeft: theme.vars.size.baseSpacings.sp2,
|
|
30
|
-
paddingRight: theme.vars.size.baseSpacings.
|
|
30
|
+
paddingRight: theme.vars.size.baseSpacings.sp2,
|
|
31
31
|
gap: theme.vars.size.baseSpacings.sp2,
|
|
32
32
|
display: "flex",
|
|
33
33
|
flexDirection: "row",
|
|
34
34
|
justifyContent: "flex-start",
|
|
35
35
|
alignItems: "center",
|
|
36
|
-
...getSizeStyles(theme, ownerState?.size ?? "medium", "container")
|
|
36
|
+
...getSizeStyles(theme, ownerState?.size ?? "medium", "container", (size) => ({
|
|
37
|
+
minHeight: size,
|
|
38
|
+
height: size
|
|
39
|
+
})),
|
|
37
40
|
background: theme.vars.palette.background.default,
|
|
38
41
|
overflow: "hidden",
|
|
39
42
|
borderBottom: ownerState?.expanded && ownerState?.variant === "outlined" ? `${theme.size.borderStroke.container} ${theme.vars.palette.border.disabled}` : "unset",
|
|
40
43
|
borderRadius: "unset",
|
|
41
44
|
...ownerState?.variant === "outlined" && {
|
|
42
|
-
borderTopLeftRadius: theme.size.borderRadius
|
|
43
|
-
borderTopRightRadius: theme.size.borderRadius
|
|
44
|
-
borderBottomLeftRadius: !ownerState?.expanded ? theme.size.borderRadius
|
|
45
|
-
borderBottomRightRadius: !ownerState?.expanded ? theme.size.borderRadius
|
|
45
|
+
borderTopLeftRadius: theme.size.borderRadius.r2,
|
|
46
|
+
borderTopRightRadius: theme.size.borderRadius.r2,
|
|
47
|
+
borderBottomLeftRadius: !ownerState?.expanded ? theme.size.borderRadius.r2 : "unset",
|
|
48
|
+
borderBottomRightRadius: !ownerState?.expanded ? theme.size.borderRadius.r2 : "unset"
|
|
46
49
|
},
|
|
47
50
|
"&:hover": {
|
|
48
51
|
background: theme.vars.palette.default.hoverOpacity
|
|
@@ -57,6 +60,7 @@ const accordionStyles = {
|
|
|
57
60
|
"& .MuiAccordionSummary-content": {
|
|
58
61
|
gap: `${theme.vars.size.baseSpacings.sp1}`,
|
|
59
62
|
overflow: "hidden",
|
|
63
|
+
paddingLeft: theme.vars.size.baseSpacings.sp1,
|
|
60
64
|
"& .MuiTypography-root": {
|
|
61
65
|
overflow: "hidden",
|
|
62
66
|
textOverflow: "ellipsis",
|
|
@@ -75,12 +75,12 @@ const tabStyles = {
|
|
|
75
75
|
background: theme.vars.palette.background.default,
|
|
76
76
|
border: "unset",
|
|
77
77
|
".M4LTab-icon div": {
|
|
78
|
-
backgroundColor: ownerState?.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.primary.
|
|
78
|
+
backgroundColor: ownerState?.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.primary.semanticText
|
|
79
79
|
},
|
|
80
80
|
".M4LTab-tipography": {
|
|
81
|
-
color: ownerState?.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.primary.
|
|
81
|
+
color: ownerState?.tabDisabled ? theme.vars.palette.text.disabled : theme.vars.palette.primary.semanticText
|
|
82
82
|
},
|
|
83
|
-
// Efecto ripple en estado seleccionado
|
|
83
|
+
// Efecto ripple en estado seleccionado`
|
|
84
84
|
"& .MuiTouchRipple-root": {
|
|
85
85
|
borderTopLeftRadius: theme.vars.size.baseSpacings["sp0-5"],
|
|
86
86
|
borderTopRightRadius: theme.vars.size.baseSpacings["sp0-5"]
|
|
@@ -3,9 +3,9 @@ import { a as getComponentSlotRoot } from "../../../utils/getComponentSlotRoot.j
|
|
|
3
3
|
import { T as TAB_CONTENT_KEY_COMPONENT } from "./constants.js";
|
|
4
4
|
import { T as TabContentRootStyled } from "./slots/TabContentSlots.js";
|
|
5
5
|
const TabContent = (props) => {
|
|
6
|
-
const { children, className, ...others } = props;
|
|
6
|
+
const { children, className, background = false, ...others } = props;
|
|
7
7
|
const root = getComponentSlotRoot(TAB_CONTENT_KEY_COMPONENT);
|
|
8
|
-
return /* @__PURE__ */ jsx(TabContentRootStyled, { className: root, ...others, children });
|
|
8
|
+
return /* @__PURE__ */ jsx(TabContentRootStyled, { className: root, ownerState: { background }, ...others, children });
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
11
|
TabContent as T
|
|
@@ -2,14 +2,16 @@ const tabContentStyles = {
|
|
|
2
2
|
/**
|
|
3
3
|
* Elemento root referencia a `TabContent`
|
|
4
4
|
*/
|
|
5
|
-
root: ({ theme }) => ({
|
|
6
|
-
|
|
5
|
+
root: ({ theme, ownerState }) => ({
|
|
6
|
+
paddingTop: "11px",
|
|
7
|
+
paddingBottom: 0,
|
|
8
|
+
paddingLeft: 0,
|
|
9
|
+
paddingRight: 0,
|
|
7
10
|
display: "flex",
|
|
8
11
|
overflow: "hidden",
|
|
9
12
|
// height: '100%',
|
|
10
13
|
flexDirection: "column",
|
|
11
14
|
gap: theme.vars.size.baseSpacings.sp2,
|
|
12
|
-
background: theme.vars.palette.background.base,
|
|
13
15
|
position: "relative",
|
|
14
16
|
flex: 1,
|
|
15
17
|
flexGrow: 1,
|
|
@@ -18,6 +20,9 @@ const tabContentStyles = {
|
|
|
18
20
|
boxSizing: "border-box",
|
|
19
21
|
zIndex: "0",
|
|
20
22
|
top: "-1px",
|
|
23
|
+
...ownerState?.background ? {
|
|
24
|
+
backgroundColor: theme.vars.palette.background.default
|
|
25
|
+
} : {},
|
|
21
26
|
"& .M4LStack-root": {
|
|
22
27
|
gap: `${theme.vars.size.baseSpacings.sp2} !important`
|
|
23
28
|
},
|
|
@@ -7,5 +7,6 @@ export interface TabContentProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
key?: Key | null | undefined;
|
|
10
|
+
background?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export type TabContentStyles = M4LOverridesStyleRules<keyof typeof TabContentSlots, typeof TABS_KEY_COMPONENT, Theme>;
|
|
@@ -19,13 +19,13 @@ const popupsViewerStyles = {
|
|
|
19
19
|
* id: 'global',
|
|
20
20
|
* },
|
|
21
21
|
*/
|
|
22
|
-
popupDragWindowRoot: ({
|
|
22
|
+
popupDragWindowRoot: ({ ownerState }) => ({
|
|
23
23
|
display: "flex",
|
|
24
24
|
flexDirection: "column",
|
|
25
25
|
position: "relative",
|
|
26
26
|
width: "100%",
|
|
27
27
|
height: "100%",
|
|
28
|
-
backgroundColor:
|
|
28
|
+
backgroundColor: "transparent",
|
|
29
29
|
zIndex: ownerState?.zIndex || 0,
|
|
30
30
|
"&.fade-enter": {
|
|
31
31
|
opacity: 0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const ICON_PATH_FILTER = "frontend/components/data_grid/assets/icons/filter.svg";
|
|
2
2
|
export declare const ICON_PATH_SORT = "frontend/components/data_grid/assets/icons/sort.svg";
|
|
3
|
-
export declare const ASSETS_URL = "frontend/components/
|
|
3
|
+
export declare const ASSETS_URL = "frontend/components/DynamincFilterAndSort/assets/icons";
|
|
4
4
|
export declare const ASSETS: {
|
|
5
|
-
readonly refresh: "frontend/components/
|
|
5
|
+
readonly refresh: "frontend/components/DynamincFilterAndSort/assets/icons/refresh.svg";
|
|
6
6
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const ICON_PATH_FILTER = "frontend/components/data_grid/assets/icons/filter.svg";
|
|
2
2
|
const ICON_PATH_SORT = "frontend/components/data_grid/assets/icons/sort.svg";
|
|
3
|
-
const ASSETS_URL = "frontend/components/
|
|
3
|
+
const ASSETS_URL = "frontend/components/DynamincFilterAndSort/assets/icons";
|
|
4
4
|
const ASSETS = {
|
|
5
|
-
refresh: `${ASSETS_URL}/
|
|
5
|
+
refresh: `${ASSETS_URL}/refresh.svg`
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
ASSETS as A,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.2.56-beta.
|
|
3
|
+
"version": "9.2.56-beta.5",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "M4L Components",
|
|
6
6
|
"lint-staged": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@googlemaps/js-api-loader": "^1.16.6",
|
|
12
12
|
"@hookform/resolvers": "^2.9.5",
|
|
13
13
|
"@m4l/core": "^2.0.0",
|
|
14
|
-
"@m4l/graphics": "7.1.1-beta.
|
|
15
|
-
"@m4l/styles": "7.1.28-beta.
|
|
14
|
+
"@m4l/graphics": "7.1.1-beta.5",
|
|
15
|
+
"@m4l/styles": "7.1.28-beta.5",
|
|
16
16
|
"@microlink/react-json-view": "^1.23.3",
|
|
17
17
|
"@mui/lab": "5.0.0-alpha.173",
|
|
18
18
|
"@mui/material": "5.16.7",
|