@m4l/components 9.5.13 → 9.5.14-beta-pkg-670-dynamicfilter-mejoras.0
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/@types/types.d.ts +6 -0
- package/components/Chip/types.d.ts +4 -2
- package/components/Chip/types.d.ts.map +1 -1
- package/components/DynamicFilter/DynamicFilter.styles.d.ts.map +1 -1
- package/components/DynamicFilter/DynamicFilter.styles.js +274 -108
- package/components/DynamicFilter/dictionary.d.ts +2 -0
- package/components/DynamicFilter/dictionary.d.ts.map +1 -1
- package/components/DynamicFilter/dictionary.js +2 -0
- package/components/DynamicFilter/helpers/calculateVisibleChipsCount.d.ts +12 -0
- package/components/DynamicFilter/helpers/calculateVisibleChipsCount.d.ts.map +1 -0
- package/components/DynamicFilter/helpers/calculateVisibleChipsCount.js +16 -0
- package/components/DynamicFilter/hooks/useChipsOverflow.d.ts +30 -0
- package/components/DynamicFilter/hooks/useChipsOverflow.d.ts.map +1 -0
- package/components/DynamicFilter/hooks/useChipsOverflow.js +77 -0
- package/components/DynamicFilter/slots/SlotsEnum.d.ts +10 -1
- package/components/DynamicFilter/slots/SlotsEnum.d.ts.map +1 -1
- package/components/DynamicFilter/slots/SlotsEnum.js +2 -2
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +27 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts.map +1 -1
- package/components/DynamicFilter/slots/dynamicFilterSlots.js +101 -63
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.d.ts +4 -1
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.js +18 -14
- package/components/DynamicFilter/subcomponents/AppliedFilters/AppliedFilters.d.ts +3 -1
- package/components/DynamicFilter/subcomponents/AppliedFilters/AppliedFilters.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilters/AppliedFilters.js +58 -8
- package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.d.ts +9 -1
- package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.js +22 -14
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +10 -12
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.js +1 -1
- package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers.js +10 -10
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.d.ts +4 -2
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +34 -31
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +2 -7
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +15 -22
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.d.ts +3 -1
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/InputFilter/InputFilter.js +47 -45
- package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.d.ts +4 -4
- package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.js +46 -43
- package/components/DynamicFilter/subcomponents/OverflowPopover/OverflowPopover.d.ts +9 -0
- package/components/DynamicFilter/subcomponents/OverflowPopover/OverflowPopover.d.ts.map +1 -0
- package/components/DynamicFilter/subcomponents/OverflowPopover/OverflowPopover.js +87 -0
- package/components/DynamicFilter/subcomponents/OverflowPopover/index.d.ts +2 -0
- package/components/DynamicFilter/subcomponents/OverflowPopover/index.d.ts.map +1 -0
- package/components/DynamicFilter/subcomponents/OverflowPopover/types.d.ts +13 -0
- package/components/DynamicFilter/subcomponents/OverflowPopover/types.d.ts.map +1 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +50 -46
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.d.ts +25 -1
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.d.ts.map +1 -1
- package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +50 -27
- package/components/DynamicFilter/types.d.ts +21 -2
- package/components/DynamicFilter/types.d.ts.map +1 -1
- package/components/datagrids/Datagrid.styles.js +1 -1
- package/hooks/useDynamicFilterAndSort/styles.d.ts.map +1 -1
- package/hooks/useDynamicFilterAndSort/styles.js +11 -4
- package/package.json +5 -5
- package/test/mocks/dictionary-mock.d.ts +1 -0
- package/test/mocks/dictionary-mock.d.ts.map +1 -1
package/@types/types.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
PopupViewerSlotsType,
|
|
20
20
|
PopupsViewerOwnerState,
|
|
21
21
|
} from '../components/popups/components/PopupsViewer/types';
|
|
22
|
+
import { IconOwnerState, IconSlotsType } from '../components/Icon';
|
|
23
|
+
|
|
22
24
|
import {
|
|
23
25
|
DragResizeWindowOwnerState,
|
|
24
26
|
DragResizeWindowRNDSlotsType,
|
|
@@ -53,6 +55,10 @@ import {
|
|
|
53
55
|
SkeletonOwnerState,
|
|
54
56
|
SkeletonSlotsType,
|
|
55
57
|
} from '../components/extended/mui/Skeleton/types';
|
|
58
|
+
import {
|
|
59
|
+
TypographyOwnerState,
|
|
60
|
+
TypographySlotsType,
|
|
61
|
+
} from '../components/extended/mui/Typography';
|
|
56
62
|
import { ColorOwnerState, ColorSlotsType } from '../components/Color/types';
|
|
57
63
|
import {
|
|
58
64
|
RHFColorPickerOwnerState,
|
|
@@ -24,9 +24,11 @@ export interface ChipProps {
|
|
|
24
24
|
*/
|
|
25
25
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
26
26
|
/**
|
|
27
|
-
* Text describing the `Chip`.
|
|
27
|
+
* Text describing the `Chip`. Accepts a plain string or a React node
|
|
28
|
+
* (for example a `Typography` element) when callers need to style parts
|
|
29
|
+
* of the label independently while keeping the chip's layout intact.
|
|
28
30
|
*/
|
|
29
|
-
label?: Maybe<string
|
|
31
|
+
label?: Maybe<string> | ReactNode;
|
|
30
32
|
/**
|
|
31
33
|
* Secondary text shown below the chip label.
|
|
32
34
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Chip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAG,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,eAAe,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,MAAM,MAAM,YAAY,GAAI,WAAW,GAAG,UAAU,CAAC;AACrD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/Chip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAG,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,eAAe,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,MAAM,MAAM,YAAY,GAAI,WAAW,GAAG,UAAU,CAAC;AACrD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;IAC1C;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAE;QAAC,eAAe,EAAE,MAAM,CAAA;KAAC,CAAC;IAC3D;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;IAC/C;;OAEG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,CAAC,CAAC;IAClF;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,eAAe,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACjH,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AACD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,SAAS,CAAC;AACnD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC,aAAa,EAAE,OAAO,kBAAkB,EAAE,KAAK,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicFilter.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DynamicFilter/DynamicFilter.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAInD,eAAO,MAAM,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"DynamicFilter.styles.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DynamicFilter/DynamicFilter.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAInD,eAAO,MAAM,mBAAmB,EAAE,mBAmdjC,CAAC"}
|
|
@@ -4,245 +4,276 @@ const n = "dynamic", d = {
|
|
|
4
4
|
/**
|
|
5
5
|
* root: Estilos del contenedor principal del componente.
|
|
6
6
|
*/
|
|
7
|
-
root: ({ theme:
|
|
7
|
+
root: ({ theme: r, ownerState: a }) => ({
|
|
8
8
|
containerName: n,
|
|
9
9
|
containerType: "inline-size",
|
|
10
10
|
width: "100%",
|
|
11
11
|
height: "auto",
|
|
12
12
|
padding: 0,
|
|
13
13
|
...o(
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
r,
|
|
15
|
+
a?.size || "medium",
|
|
16
16
|
"container",
|
|
17
|
-
(
|
|
18
|
-
height:
|
|
19
|
-
maxHeight:
|
|
20
|
-
minHeight:
|
|
17
|
+
(i) => ({
|
|
18
|
+
height: i,
|
|
19
|
+
maxHeight: i,
|
|
20
|
+
minHeight: i
|
|
21
21
|
})
|
|
22
22
|
)
|
|
23
23
|
}),
|
|
24
24
|
/**
|
|
25
25
|
* innerContainer: Estilos del contenedor interno del componente.
|
|
26
26
|
*/
|
|
27
|
-
innerContainer: ({ theme:
|
|
27
|
+
innerContainer: ({ theme: r }) => ({
|
|
28
28
|
display: "flex",
|
|
29
29
|
alignItems: "center",
|
|
30
30
|
justifyContent: "flex-start",
|
|
31
|
+
gap: r.vars.size.baseSpacings["sp1-5"],
|
|
31
32
|
width: "100%",
|
|
32
33
|
height: "fit-content",
|
|
33
|
-
borderRadius:
|
|
34
|
-
background:
|
|
35
|
-
|
|
36
|
-
overflow: "hidden",
|
|
37
|
-
'&:has([aria-expanded="true"])': {
|
|
38
|
-
boxShadow: r?.isValid ? `inset 0px 0px 0px 1.3px ${i.vars.palette.border.main}` : `inset 0px 0px 0px 1px ${i.vars.palette.error.enabled}`
|
|
39
|
-
}
|
|
34
|
+
borderRadius: r.vars.size.borderRadius.r2,
|
|
35
|
+
background: r.vars.palette.background.default,
|
|
36
|
+
overflow: "hidden"
|
|
40
37
|
}),
|
|
41
38
|
/**
|
|
42
39
|
* inputFilter: Estilos del contenedor del campo de entrada de filtrado.
|
|
40
|
+
* Ahora se usa como header dentro del `PopoverMenuFields`, donde el icono
|
|
41
|
+
* queda a la izquierda y el input "Filtrar por" se alinea a continuación.
|
|
43
42
|
*/
|
|
44
|
-
inputFilter: ({ theme:
|
|
43
|
+
inputFilter: ({ theme: r, ownerState: a }) => ({
|
|
45
44
|
display: "flex",
|
|
46
45
|
flexDirection: "row",
|
|
47
|
-
paddingLeft:
|
|
48
|
-
paddingRight:
|
|
49
|
-
height: "100%",
|
|
46
|
+
paddingLeft: r.vars.size.baseSpacings.sp2,
|
|
47
|
+
paddingRight: r.vars.size.baseSpacings.sp1,
|
|
50
48
|
overflow: "hidden",
|
|
51
|
-
maxWidth: "120px",
|
|
52
49
|
width: "100%",
|
|
53
50
|
alignItems: "center",
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
background: "#ffffff00",
|
|
51
|
+
borderRadius: r.vars.size.borderRadius["r1-5"],
|
|
52
|
+
backgroundColor: r.vars.palette.default.enabledOpacity,
|
|
57
53
|
...o(
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
r,
|
|
55
|
+
a?.size || "medium",
|
|
60
56
|
"container",
|
|
61
|
-
(
|
|
62
|
-
height:
|
|
57
|
+
(i) => ({
|
|
58
|
+
height: i
|
|
63
59
|
})
|
|
64
60
|
)
|
|
65
61
|
}),
|
|
62
|
+
/**
|
|
63
|
+
* inputFilterTriggerButton: IconButton que sustituye al input en el header
|
|
64
|
+
* principal. Al hacerle clic abre el `PopoverMenuFields`. Cuando el popover
|
|
65
|
+
* está abierto (`ownerState.selected`) se pinta con los mismos tokens que
|
|
66
|
+
* el chip "Más" activo — fondo `info.contained.backgroundColor` y border
|
|
67
|
+
* `info.semanticText` — para mantener consistencia visual.
|
|
68
|
+
*/
|
|
69
|
+
inputFilterTriggerButton: ({ theme: r, ownerState: a }) => ({
|
|
70
|
+
flexShrink: 0,
|
|
71
|
+
cursor: "pointer",
|
|
72
|
+
borderRadius: r.vars.size.borderRadius.r1,
|
|
73
|
+
...a?.selected && {
|
|
74
|
+
backgroundColor: `${r.vars.palette.chips.info.contained.backgroundColor} !important`,
|
|
75
|
+
border: `${r.vars.size.borderStroke.container} ${r.vars.palette.info.semanticText}`,
|
|
76
|
+
outline: "none !important",
|
|
77
|
+
"&:hover, &:focus, &:focus-visible": {
|
|
78
|
+
backgroundColor: `${r.vars.palette.chips.info.contained.backgroundColor} !important`,
|
|
79
|
+
border: `${r.vars.size.borderStroke.container} ${r.vars.palette.info.semanticText}`,
|
|
80
|
+
outline: "none !important"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}),
|
|
66
84
|
/**
|
|
67
85
|
* inputFilterInput: Estilos del campo de entrada de filtrado.
|
|
68
86
|
*/
|
|
69
|
-
inputFilterInput: ({ theme:
|
|
87
|
+
inputFilterInput: ({ theme: r, ownerState: a }) => ({
|
|
70
88
|
width: "100%",
|
|
71
89
|
background: "#ffffff00",
|
|
72
90
|
...o(
|
|
73
|
-
|
|
74
|
-
|
|
91
|
+
r,
|
|
92
|
+
a?.size || "medium",
|
|
75
93
|
"action",
|
|
76
|
-
(
|
|
77
|
-
height:
|
|
78
|
-
minHeight:
|
|
79
|
-
maxHeight:
|
|
94
|
+
(i) => ({
|
|
95
|
+
height: i,
|
|
96
|
+
minHeight: i,
|
|
97
|
+
maxHeight: i
|
|
80
98
|
})
|
|
81
99
|
),
|
|
82
100
|
fontFamily: "inherit",
|
|
83
101
|
...e(
|
|
84
|
-
|
|
85
|
-
|
|
102
|
+
r.generalSettings.isMobile,
|
|
103
|
+
a?.size || "medium",
|
|
86
104
|
"bodyStandard"
|
|
87
105
|
),
|
|
88
|
-
color:
|
|
106
|
+
color: r.vars.palette.text.secondary,
|
|
89
107
|
border: 0,
|
|
90
108
|
borderColor: "transparent",
|
|
91
|
-
paddingLeft:
|
|
92
|
-
paddingRight:
|
|
109
|
+
paddingLeft: r.vars.size.baseSpacings.sp1,
|
|
110
|
+
paddingRight: r.vars.size.baseSpacings.sp1,
|
|
93
111
|
height: "100%",
|
|
94
112
|
"&::placeholder": {
|
|
95
|
-
color:
|
|
113
|
+
color: r.vars.palette.text.secondary
|
|
96
114
|
},
|
|
97
115
|
"&:focus-visible": {
|
|
98
|
-
color:
|
|
116
|
+
color: r.vars.palette.text.secondary,
|
|
99
117
|
border: "unset",
|
|
100
|
-
borderColor:
|
|
101
|
-
BorderRadius:
|
|
118
|
+
borderColor: r.vars.palette.primary.opacity,
|
|
119
|
+
BorderRadius: r.vars.size.borderRadius["r0-5"],
|
|
102
120
|
outline: "none!important"
|
|
103
121
|
}
|
|
104
122
|
}),
|
|
105
123
|
/**
|
|
106
124
|
* appliedFilters: Estilos del contenedor de los filtros aplicados.
|
|
107
125
|
*/
|
|
108
|
-
appliedFilters: ({ theme:
|
|
126
|
+
appliedFilters: ({ theme: r, ownerState: a }) => ({
|
|
109
127
|
width: "100%",
|
|
110
128
|
height: "fit-content",
|
|
111
129
|
display: "flex",
|
|
112
130
|
alignItems: "center",
|
|
113
131
|
borderLeft: "none",
|
|
114
132
|
margin: "0px",
|
|
115
|
-
padding:
|
|
133
|
+
padding: "0px",
|
|
116
134
|
flex: 1,
|
|
117
135
|
overflow: "hidden",
|
|
118
136
|
...o(
|
|
119
|
-
|
|
120
|
-
|
|
137
|
+
r,
|
|
138
|
+
a?.size || "medium",
|
|
121
139
|
"container",
|
|
122
|
-
(
|
|
123
|
-
height:
|
|
124
|
-
maxHeight:
|
|
125
|
-
minHeight:
|
|
140
|
+
(i) => ({
|
|
141
|
+
height: i,
|
|
142
|
+
maxHeight: i,
|
|
143
|
+
minHeight: i
|
|
126
144
|
})
|
|
127
145
|
)
|
|
128
146
|
}),
|
|
129
147
|
/**
|
|
130
148
|
* appliedFilterInnerContainer: Estilos del contenedor interno de los filtros aplicados.
|
|
131
149
|
*/
|
|
132
|
-
appliedFilterInnerContainer: ({ theme:
|
|
133
|
-
padding:
|
|
134
|
-
gap:
|
|
150
|
+
appliedFilterInnerContainer: ({ theme: r, ownerState: a }) => ({
|
|
151
|
+
padding: r.vars.size.baseSpacings["sp0-5"],
|
|
152
|
+
gap: r.vars.size.baseSpacings.sp1,
|
|
135
153
|
height: "fit-content",
|
|
136
154
|
display: "flex",
|
|
137
155
|
flexWrap: "nowrap",
|
|
138
|
-
|
|
156
|
+
// Only take the space the visible chips need (do not grow). Shrinks
|
|
157
|
+
// when content overflows to leave room for the sibling "More" chip.
|
|
158
|
+
// The "More" chip then sits flush against the last visible chip with
|
|
159
|
+
// any leftover space appearing AFTER it.
|
|
160
|
+
flex: "0 1 auto",
|
|
161
|
+
minWidth: 0,
|
|
139
162
|
justifyContent: "flex-start",
|
|
140
163
|
alignItems: "center",
|
|
141
|
-
overflow: "
|
|
164
|
+
overflow: "hidden",
|
|
142
165
|
position: "relative",
|
|
143
166
|
"& .M4LChip-root": {
|
|
144
|
-
borderRadius:
|
|
167
|
+
borderRadius: r.vars.size.borderRadius.r1,
|
|
145
168
|
...o(
|
|
146
|
-
|
|
147
|
-
|
|
169
|
+
r,
|
|
170
|
+
a?.size || "medium",
|
|
148
171
|
"action",
|
|
149
|
-
(
|
|
150
|
-
height:
|
|
172
|
+
(i) => ({
|
|
173
|
+
height: i
|
|
151
174
|
})
|
|
152
175
|
),
|
|
153
176
|
"& .M4LIconButton-styledMUIIconButton:hover": {
|
|
154
|
-
backgroundColor: `${
|
|
177
|
+
backgroundColor: `${r.vars.palette.chips.error.contained.backgroundHover} !important`,
|
|
155
178
|
"& .M4LIcon-icon": {
|
|
156
|
-
backgroundColor: `${
|
|
179
|
+
backgroundColor: `${r.vars.palette.chips.error.contained.backgroundColorTone} !important`
|
|
157
180
|
}
|
|
158
181
|
}
|
|
159
182
|
}
|
|
160
183
|
}),
|
|
184
|
+
/**
|
|
185
|
+
* emptyStateLabel: Texto mostrado dentro de `AppliedFilters` cuando no
|
|
186
|
+
* hay filtros aplicados ("Sin filtros aplicados"). Usa `text.secondary`
|
|
187
|
+
* para desaturar el mensaje y no competir visualmente con los chips.
|
|
188
|
+
*/
|
|
189
|
+
emptyStateLabel: ({ theme: r }) => ({
|
|
190
|
+
display: "inline-flex",
|
|
191
|
+
alignItems: "center",
|
|
192
|
+
color: r.vars.palette.text.secondary
|
|
193
|
+
}),
|
|
161
194
|
/**
|
|
162
195
|
* actions: Estilos del contenedor de los botones de acción.
|
|
163
196
|
*/
|
|
164
|
-
actions: ({ theme:
|
|
197
|
+
actions: ({ theme: r, ownerState: a }) => ({
|
|
165
198
|
gridArea: "actions-filter",
|
|
166
199
|
overflow: "hidden",
|
|
167
200
|
display: "flex",
|
|
168
201
|
flexDirection: "row",
|
|
169
|
-
gap:
|
|
170
|
-
padding:
|
|
202
|
+
gap: r.vars.size.baseSpacings["sp0-5"],
|
|
203
|
+
padding: r.vars.size.baseSpacings.sp1,
|
|
171
204
|
height: "100%",
|
|
172
205
|
alignItems: "center",
|
|
173
|
-
borderTopRightRadius:
|
|
174
|
-
borderBottomRightRadius:
|
|
175
|
-
|
|
176
|
-
...!r?.visibleRefresh && !r?.isDirty && {
|
|
206
|
+
borderTopRightRadius: r.vars.size.borderRadius.r1,
|
|
207
|
+
borderBottomRightRadius: r.vars.size.borderRadius.r1,
|
|
208
|
+
...!a?.visibleRefresh && !a?.isDirty && {
|
|
177
209
|
display: "none"
|
|
178
|
-
},
|
|
179
|
-
...r?.inEdition && r?.isValid && {
|
|
180
|
-
boxShadow: `inset 1px 0px 0px 0px ${i.vars.palette.border.main}`
|
|
181
|
-
},
|
|
182
|
-
...!r?.isValid && {
|
|
183
|
-
boxShadow: `inset 1px 0px 0px 0px ${i.vars.palette.error.enabled}`
|
|
184
210
|
}
|
|
185
211
|
}),
|
|
186
212
|
/**
|
|
187
213
|
* actionsClearButton: Estilos del botón de acción de limpiar.
|
|
188
214
|
*/
|
|
189
|
-
actionsClearButton: ({ theme:
|
|
215
|
+
actionsClearButton: ({ theme: r }) => ({
|
|
190
216
|
"&:hover": {
|
|
191
|
-
backgroundColor: `${
|
|
217
|
+
backgroundColor: `${r.vars.palette.chips.error.contained.backgroundHover} !important`,
|
|
218
|
+
// mask strategy icons: color via backgroundColor
|
|
192
219
|
"& .M4LIcon-icon": {
|
|
193
|
-
backgroundColor: `${
|
|
220
|
+
backgroundColor: `${r.vars.palette.error.semanticText} !important`
|
|
221
|
+
},
|
|
222
|
+
// component strategy icons (createSvgIcon): color via fill on SVG paths
|
|
223
|
+
"& .MuiSvgIcon-root svg path, & .MuiSvgIcon-root path": {
|
|
224
|
+
fill: `${r.vars.palette.error.semanticText} !important`
|
|
194
225
|
}
|
|
195
226
|
}
|
|
196
227
|
}),
|
|
197
228
|
/**
|
|
198
229
|
* actionsSubmitButton: Estilos del botón de acción de filtrado.
|
|
199
230
|
*/
|
|
200
|
-
actionsSubmitButton: ({ theme:
|
|
201
|
-
...
|
|
231
|
+
actionsSubmitButton: ({ theme: r, ownerState: a }) => ({
|
|
232
|
+
...a?.isDirty ? {
|
|
202
233
|
animation: "changeBgColor 0.9s ease infinite",
|
|
203
234
|
"& .M4LIcon-icon": {
|
|
204
|
-
background: `${
|
|
235
|
+
background: `${r.vars.palette.primary.main} !important`
|
|
205
236
|
}
|
|
206
237
|
} : null,
|
|
207
238
|
//Create and apply animation with change background color red and green
|
|
208
239
|
"@keyframes changeBgColor": {
|
|
209
240
|
"0%": {
|
|
210
|
-
background:
|
|
241
|
+
background: r.vars.palette.primary.hoverOpacity
|
|
211
242
|
},
|
|
212
243
|
"50%": {
|
|
213
|
-
background:
|
|
244
|
+
background: r.vars.palette.primary.activeOpacity
|
|
214
245
|
},
|
|
215
246
|
"100%": {
|
|
216
|
-
background:
|
|
247
|
+
background: r.vars.palette.primary.hoverOpacity
|
|
217
248
|
}
|
|
218
249
|
}
|
|
219
250
|
}),
|
|
220
251
|
/**
|
|
221
252
|
* popoverMenu: Estilos del menú emergente.
|
|
222
253
|
*/
|
|
223
|
-
popoverMenu: ({ theme:
|
|
254
|
+
popoverMenu: ({ theme: r }) => ({
|
|
224
255
|
"& .MuiPaper-root": {
|
|
225
256
|
display: "flex",
|
|
226
257
|
flexDirection: "column",
|
|
227
|
-
padding:
|
|
228
|
-
gap:
|
|
229
|
-
borderRadius:
|
|
230
|
-
backgroundColor:
|
|
258
|
+
padding: r.vars.size.baseSpacings.sp3,
|
|
259
|
+
gap: r.vars.size.baseSpacings.sp1,
|
|
260
|
+
borderRadius: r.vars.size.borderRadius.r1,
|
|
261
|
+
backgroundColor: r.vars.palette.background.default
|
|
231
262
|
}
|
|
232
263
|
}),
|
|
233
264
|
/**
|
|
234
265
|
* popoverFilter: Estilos del menú emergente de filtro.
|
|
235
266
|
*/
|
|
236
|
-
popoverFilter: ({ theme:
|
|
267
|
+
popoverFilter: ({ theme: r }) => ({
|
|
237
268
|
width: "auto",
|
|
238
269
|
"& .MuiPaper-root": {
|
|
239
|
-
borderRadius: `${
|
|
270
|
+
borderRadius: `${r.vars.size.borderRadius.r3}!important`,
|
|
240
271
|
padding: "0 !important",
|
|
241
272
|
minWidth: "220px",
|
|
242
273
|
maxWidth: "100%",
|
|
243
274
|
minHeight: "auto",
|
|
244
|
-
backgroundColor:
|
|
245
|
-
boxShadow:
|
|
275
|
+
backgroundColor: r.vars.palette.background.default,
|
|
276
|
+
boxShadow: r.customShadows?.z3,
|
|
246
277
|
"& .M4LPopover-arrowStyle": {
|
|
247
278
|
display: "none"
|
|
248
279
|
},
|
|
@@ -255,7 +286,7 @@ const n = "dynamic", d = {
|
|
|
255
286
|
overflow: "visible"
|
|
256
287
|
},
|
|
257
288
|
"& .M4LWindowBase-root": {
|
|
258
|
-
borderRadius: `${
|
|
289
|
+
borderRadius: `${r.vars.size.borderRadius.r3}!important`,
|
|
259
290
|
border: "unset!important",
|
|
260
291
|
"& .M4LWindowBase-headerWindowComponent": {
|
|
261
292
|
cursor: "unset"
|
|
@@ -266,35 +297,170 @@ const n = "dynamic", d = {
|
|
|
266
297
|
/**
|
|
267
298
|
* popoverFilterActions: Estilos del contenedor de acciones del menú emergente de filtro.
|
|
268
299
|
*/
|
|
269
|
-
popoverFilterActions: ({ theme:
|
|
270
|
-
paddingTop:
|
|
300
|
+
popoverFilterActions: ({ theme: r }) => ({
|
|
301
|
+
paddingTop: r.vars.size.baseSpacings.sp6
|
|
271
302
|
}),
|
|
272
303
|
/**
|
|
273
304
|
* inputSortInputSkeleton: Estilos del esqueleto del campo de entrada de ordenamiento.
|
|
274
305
|
*/
|
|
275
|
-
inputFilterInputSkeleton: ({ theme:
|
|
306
|
+
inputFilterInputSkeleton: ({ theme: r, ownerState: a }) => ({
|
|
276
307
|
width: "100%",
|
|
277
308
|
minWidth: "80px",
|
|
278
|
-
marginLeft:
|
|
279
|
-
marginRight:
|
|
309
|
+
marginLeft: r.vars.size.baseSpacings.sp2,
|
|
310
|
+
marginRight: r.vars.size.baseSpacings.sp2,
|
|
280
311
|
...o(
|
|
281
|
-
|
|
282
|
-
|
|
312
|
+
r,
|
|
313
|
+
a?.size || "medium",
|
|
283
314
|
"base",
|
|
284
|
-
(
|
|
285
|
-
height:
|
|
286
|
-
minHeight:
|
|
287
|
-
maxHeight:
|
|
315
|
+
(i) => ({
|
|
316
|
+
height: i,
|
|
317
|
+
minHeight: i,
|
|
318
|
+
maxHeight: i
|
|
288
319
|
})
|
|
289
320
|
)
|
|
290
321
|
}),
|
|
291
322
|
/**
|
|
292
323
|
* popoverFilterContainerFields: Estilos del contenedor de los campos del menú emergente de filtro.
|
|
293
324
|
*/
|
|
294
|
-
popoverFilterContainerFields: ({ theme:
|
|
325
|
+
popoverFilterContainerFields: ({ theme: r }) => ({
|
|
295
326
|
display: "flex",
|
|
296
327
|
flexDirection: "column",
|
|
297
|
-
gap:
|
|
328
|
+
gap: r.vars.size.baseSpacings.sp3
|
|
329
|
+
}),
|
|
330
|
+
/**
|
|
331
|
+
* chipWrapper: Wrapper for each chip used for overflow measurement.
|
|
332
|
+
*/
|
|
333
|
+
chipWrapper: ({ theme: r, ownerState: a }) => ({
|
|
334
|
+
display: "inline-flex",
|
|
335
|
+
flexShrink: 0,
|
|
336
|
+
...a?.isWarning && {
|
|
337
|
+
"@keyframes m4lDynamicFilterWarningPulse": {
|
|
338
|
+
"0%, 100%": {
|
|
339
|
+
backgroundColor: r.vars.palette.chips.warning.contained.backgroundColor
|
|
340
|
+
},
|
|
341
|
+
"50%": {
|
|
342
|
+
backgroundColor: r.vars.palette.chips.warning.contained.backgroundHover
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
'& .MuiChip-root, & [class*="M4LChip-root"]': {
|
|
346
|
+
animation: "m4lDynamicFilterWarningPulse 1.6s ease-in-out infinite"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}),
|
|
350
|
+
/**
|
|
351
|
+
* overflowMoreChip: Styles for the "More (N)..." chip button that appears when filters overflow.
|
|
352
|
+
*/
|
|
353
|
+
overflowMoreChip: ({ theme: r, ownerState: a }) => ({
|
|
354
|
+
flexShrink: 0,
|
|
355
|
+
cursor: "pointer",
|
|
356
|
+
borderRadius: r.vars.size.borderRadius.r1,
|
|
357
|
+
...o(
|
|
358
|
+
r,
|
|
359
|
+
a?.size || "medium",
|
|
360
|
+
"action",
|
|
361
|
+
(i) => ({
|
|
362
|
+
height: i
|
|
363
|
+
})
|
|
364
|
+
),
|
|
365
|
+
// While the overflow popover is open, lock the chip to the info palette's
|
|
366
|
+
// background and add the container border in `info.semanticText` so the
|
|
367
|
+
// chip visually stays active regardless of hover/focus transitions.
|
|
368
|
+
...a?.selected && {
|
|
369
|
+
backgroundColor: `${r.vars.palette.chips.info.contained.backgroundColor} !important`,
|
|
370
|
+
border: `${r.vars.size.borderStroke.container} ${r.vars.palette.info.semanticText}`,
|
|
371
|
+
outline: "none !important",
|
|
372
|
+
"&:hover, &:focus, &:focus-visible": {
|
|
373
|
+
backgroundColor: `${r.vars.palette.chips.info.contained.backgroundColor} !important`,
|
|
374
|
+
border: `${r.vars.size.borderStroke.container} ${r.vars.palette.info.semanticText}`,
|
|
375
|
+
outline: "none !important"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}),
|
|
379
|
+
/**
|
|
380
|
+
* overflowPopover: Styles for the popover that shows hidden overflow filters.
|
|
381
|
+
*/
|
|
382
|
+
overflowPopover: ({ theme: r }) => ({
|
|
383
|
+
"& .MuiPaper-root": {
|
|
384
|
+
display: "flex",
|
|
385
|
+
flexDirection: "column",
|
|
386
|
+
padding: `${r.vars.size.baseSpacings.sp3} ${r.vars.size.baseSpacings.sp2}`,
|
|
387
|
+
gap: r.vars.size.baseSpacings.sp1,
|
|
388
|
+
borderRadius: r.vars.size.borderRadius.r2,
|
|
389
|
+
backgroundColor: r.vars.palette.background.default,
|
|
390
|
+
boxShadow: r.customShadows?.z3,
|
|
391
|
+
width: "280px"
|
|
392
|
+
}
|
|
393
|
+
}),
|
|
394
|
+
/**
|
|
395
|
+
* overflowPopoverList: Styles for the list container inside the overflow popover.
|
|
396
|
+
*/
|
|
397
|
+
overflowPopoverList: ({ theme: r }) => ({
|
|
398
|
+
display: "flex",
|
|
399
|
+
flexDirection: "column",
|
|
400
|
+
gap: r.vars.size.baseSpacings.sp2
|
|
401
|
+
}),
|
|
402
|
+
/**
|
|
403
|
+
* overflowPopoverItem: Styles for each filter item inside the overflow popover.
|
|
404
|
+
* Row layout: icon | text column | close button, all vertically centered.
|
|
405
|
+
*/
|
|
406
|
+
overflowPopoverItem: ({ theme: r, ownerState: a }) => ({
|
|
407
|
+
display: "flex",
|
|
408
|
+
alignItems: "center",
|
|
409
|
+
alignSelf: "stretch",
|
|
410
|
+
gap: r.vars.size.baseSpacings.sp2,
|
|
411
|
+
padding: r.vars.size.baseSpacings.sp2,
|
|
412
|
+
borderBottom: `1px solid ${r.vars.palette.border.disabled}`,
|
|
413
|
+
background: r.vars.palette.background.default,
|
|
414
|
+
borderRadius: r.vars.size.borderRadius["r1-5"],
|
|
415
|
+
cursor: "pointer",
|
|
416
|
+
transition: "background-color 0.3s ease",
|
|
417
|
+
"&:hover": {
|
|
418
|
+
backgroundColor: `${r.vars.palette.default.hoverOpacity} !important`
|
|
419
|
+
},
|
|
420
|
+
...a?.selected && {
|
|
421
|
+
backgroundColor: `${r.vars.palette.default.hoverOpacity} !important`
|
|
422
|
+
},
|
|
423
|
+
"&:last-child": {
|
|
424
|
+
borderBottom: "none"
|
|
425
|
+
}
|
|
426
|
+
}),
|
|
427
|
+
/**
|
|
428
|
+
* overflowPopoverItemHeader: Column container for label and value text.
|
|
429
|
+
*/
|
|
430
|
+
overflowPopoverItemHeader: ({ theme: r }) => ({
|
|
431
|
+
display: "flex",
|
|
432
|
+
flexDirection: "row",
|
|
433
|
+
flexWrap: "wrap",
|
|
434
|
+
alignItems: "center",
|
|
435
|
+
flex: 1,
|
|
436
|
+
minWidth: 0,
|
|
437
|
+
rowGap: r.vars.size.baseSpacings["sp0-5"],
|
|
438
|
+
columnGap: r.vars.size.baseSpacings.sp1,
|
|
439
|
+
// The label occupies the full first row so the value chips wrap below it.
|
|
440
|
+
"& > span:first-of-type": {
|
|
441
|
+
flexBasis: "100%"
|
|
442
|
+
},
|
|
443
|
+
"& .M4LChip-root": {
|
|
444
|
+
height: "auto",
|
|
445
|
+
minHeight: "auto",
|
|
446
|
+
maxWidth: "100%"
|
|
447
|
+
},
|
|
448
|
+
"& .M4LChip-root .M4LTypography-root": {
|
|
449
|
+
whiteSpace: "normal",
|
|
450
|
+
wordBreak: "break-word",
|
|
451
|
+
overflow: "visible",
|
|
452
|
+
textOverflow: "clip"
|
|
453
|
+
}
|
|
454
|
+
}),
|
|
455
|
+
/**
|
|
456
|
+
* overflowPopoverItemLabel: Label text for the filter field name inside the overflow item.
|
|
457
|
+
*/
|
|
458
|
+
overflowPopoverItemLabel: ({ theme: r }) => ({
|
|
459
|
+
...e(!1, "medium", "body"),
|
|
460
|
+
color: r.vars.palette.text.primary,
|
|
461
|
+
flex: 1,
|
|
462
|
+
whiteSpace: "normal",
|
|
463
|
+
wordBreak: "break-word"
|
|
298
464
|
})
|
|
299
465
|
};
|
|
300
466
|
export {
|
|
@@ -40,6 +40,8 @@ export declare const DICCTIONARY: {
|
|
|
40
40
|
readonly label_select_async_operand1: "dynamic_filter.label_select_async_operand1";
|
|
41
41
|
readonly label_select_async_operands_array: "dynamic_filter.label_select_async_operands_array";
|
|
42
42
|
readonly label_no_fields_available: "dynamic_filter.label_no_fields_available";
|
|
43
|
+
readonly label_no_filters_applied: "dynamic_filter.label_no_filters_applied";
|
|
44
|
+
readonly label_more: "dynamic_filter.label_more";
|
|
43
45
|
readonly error_operand_required: "dynamic_filter.error_operand_required";
|
|
44
46
|
readonly error_operator_required: "dynamic_filter.error_operator_required";
|
|
45
47
|
readonly error_invalid_date: "dynamic_filter.error_invalid_date";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DynamicFilter/dictionary.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAC7D;;;GAGG;AACH,wBAAgB,oCAAoC,aAInD;AACD,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../../packages/components/src/components/DynamicFilter/dictionary.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAC7D;;;GAGG;AACH,wBAAgB,oCAAoC,aAInD;AACD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2Dd,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,OAAO,WAAW,CAAC"}
|
|
@@ -31,6 +31,8 @@ const t = {
|
|
|
31
31
|
label_select_async_operand1: `${e}.label_select_async_operand1`,
|
|
32
32
|
label_select_async_operands_array: `${e}.label_select_async_operands_array`,
|
|
33
33
|
label_no_fields_available: `${e}.label_no_fields_available`,
|
|
34
|
+
label_no_filters_applied: `${e}.label_no_filters_applied`,
|
|
35
|
+
label_more: `${e}.label_more`,
|
|
34
36
|
//Validations
|
|
35
37
|
error_operand_required: `${e}.error_operand_required`,
|
|
36
38
|
error_operator_required: `${e}.error_operator_required`,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates how many chips fit within a given available width.
|
|
3
|
+
* Pure function — all measurements are passed in by the caller.
|
|
4
|
+
* @param availableWidth - Total width available for the chips (already
|
|
5
|
+
* excluding any sibling element such as the
|
|
6
|
+
* "More" chip and any padding).
|
|
7
|
+
* @param gap - Gap between chips in pixels.
|
|
8
|
+
* @param chipWidths - Natural width of each chip in display order.
|
|
9
|
+
* @returns The number of chips that fit within the available width.
|
|
10
|
+
*/
|
|
11
|
+
export declare function calculateVisibleChipsCount(availableWidth: number, gap: number, chipWidths: number[]): number;
|
|
12
|
+
//# sourceMappingURL=calculateVisibleChipsCount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateVisibleChipsCount.d.ts","sourceRoot":"","sources":["../../../../../../../packages/components/src/components/DynamicFilter/helpers/calculateVisibleChipsCount.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAAE,GACnB,MAAM,CAsBR"}
|