@m4l/components 9.3.6 → 9.3.8
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 +16 -0
- package/components/DataGrid/Datagrid.styles.js +2 -2
- package/components/DragResizeWindowRND/constants.d.ts +44 -0
- package/components/DragResizeWindowRND/constants.js +46 -1
- package/components/DragResizeWindowRND/index.d.ts +1 -0
- package/components/DynamicFilter/DynamicFilter.styles.js +8 -4
- package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +3 -0
- package/components/DynamicSort/DynamicSort.styles.js +8 -4
- package/components/ImageText/ImageText.d.ts +7 -0
- package/components/ImageText/ImageText.js +62 -0
- package/components/ImageText/ImageText.styles.d.ts +2 -0
- package/components/ImageText/ImageText.styles.js +79 -0
- package/components/ImageText/constants.d.ts +16 -0
- package/components/ImageText/constants.js +10 -0
- package/components/ImageText/index.d.ts +1 -0
- package/components/ImageText/index.js +1 -0
- package/components/ImageText/slots/ImageTextEnum.d.ts +8 -0
- package/components/ImageText/slots/ImageTextEnum.js +12 -0
- package/components/ImageText/slots/ImageTextSlots.d.ts +18 -0
- package/components/ImageText/slots/ImageTextSlots.js +38 -0
- package/components/ImageText/types.d.ts +40 -0
- package/components/NoItemPrivileges/NoItemPrivileges.d.ts +7 -0
- package/components/NoItemPrivileges/NoItemPrivileges.js +33 -0
- package/components/NoItemPrivileges/NoItemPrivilegesStyles.d.ts +5 -0
- package/components/NoItemPrivileges/NoItemPrivilegesStyles.js +6 -0
- package/components/NoItemPrivileges/constants.d.ts +3 -0
- package/components/NoItemPrivileges/constants.js +10 -0
- package/components/NoItemPrivileges/dictionary.d.ts +5 -0
- package/components/NoItemPrivileges/dictionary.js +12 -0
- package/components/NoItemPrivileges/index.d.ts +3 -0
- package/components/NoItemPrivileges/index.js +1 -0
- package/components/NoItemPrivileges/slots/NoItemPrivilegesEnum.d.ts +3 -0
- package/components/NoItemPrivileges/slots/NoItemPrivilegesEnum.js +7 -0
- package/components/NoItemPrivileges/slots/NoItemPrivilegesSlots.d.ts +3 -0
- package/components/NoItemPrivileges/slots/NoItemPrivilegesSlots.js +12 -0
- package/components/NoItemPrivileges/test/NoItemPrivileges.test.d.ts +1 -0
- package/components/NoItemPrivileges/types.d.ts +36 -0
- package/components/NoItemSelected/NoItemSelected.js +16 -59
- package/components/NoItemSelected/NoItemSelected.styles.js +1 -100
- package/components/NoItemSelected/constant.d.ts +2 -2
- package/components/NoItemSelected/constant.js +4 -4
- package/components/NoItemSelected/dictionary.d.ts +0 -2
- package/components/NoItemSelected/dictionary.js +4 -3
- package/components/NoItemSelected/slots/NoItemSelectedEnum.d.ts +1 -7
- package/components/NoItemSelected/slots/NoItemSelectedEnum.js +0 -6
- package/components/NoItemSelected/slots/NoItemSelectedSlots.d.ts +1 -19
- package/components/NoItemSelected/slots/NoItemSelectedSlots.js +5 -37
- package/components/NoItemSelected/test/NoItemSelected.test.d.ts +1 -0
- package/components/NoItemSelected/types.d.ts +5 -6
- package/components/ObjectLogs/helpers/Fields/filterFields.d.ts +5 -0
- package/components/ObjectLogs/helpers/Fields/filterFields.js +81 -0
- package/components/ObjectLogs/hooks/useDetailFormatter.js +2 -2
- package/components/ObjectLogs/hooks/useFilterAndSort.d.ts +15 -0
- package/components/ObjectLogs/hooks/useFilterAndSort.js +52 -0
- package/components/ObjectLogs/slots/ObjectLogsSlots.js +1 -2
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +39 -88
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +30 -104
- package/components/PropertyValue/PropertyValue.styles.js +1 -1
- package/components/SideBar/subcomponents/ContentComponent/style.js +3 -0
- package/components/SideBar/subcomponents/TreeGroupItems/styles.js +1 -1
- package/components/SideBar/subcomponents/TreeGroupItems/subcomponents/NodeMenuItem/index.js +1 -1
- package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -0
- package/components/hook-form/RHFTextField/RHFTextField.js +5 -3
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.js +63 -55
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +1 -1
- package/components/index.d.ts +2 -0
- package/components/mui_extended/Autocomplete/Autocomplete.js +2 -1
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.d.ts +1 -0
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.js +4 -2
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.js +1 -1
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +1 -1
- package/components/mui_extended/Tab/Tab.styles.js +7 -7
- package/components/mui_extended/TabContent/TabContent.styles.js +1 -1
- package/components/mui_extended/TextField/TextField.js +13 -2
- package/components/mui_extended/TextField/TextField.styles.js +40 -3
- package/components/mui_extended/TextField/constants.d.ts +4 -0
- package/components/mui_extended/TextField/index.d.ts +1 -0
- package/components/mui_extended/TextField/slots/TextFieldEnum.d.ts +5 -1
- package/components/mui_extended/TextField/slots/TextFieldEnum.js +4 -0
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +18 -0
- package/components/mui_extended/TextField/slots/TextFieldSlots.js +22 -2
- package/components/mui_extended/TextField/types.d.ts +9 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/useDynamicFilterAndSort/types.d.ts +2 -0
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +5 -3
- package/hooks/useIsVisible/constants.d.ts +1 -0
- package/hooks/useIsVisible/constants.js +4 -0
- package/hooks/useIsVisible/index.d.ts +1 -0
- package/hooks/useIsVisible/index.js +1 -0
- package/hooks/useIsVisible/useIsVisible.d.ts +28 -0
- package/hooks/useIsVisible/useIsVisible.js +25 -0
- package/index.js +40 -30
- package/package.json +1 -1
- package/storybook/components/NoItemPrivileges/NoItemPrivileges.stories.d.ts +12 -0
- package/storybook/components/NoItemSelect/NoItemSelect.stories.d.ts +1 -1
- package/storybook/components/extended/mui/TextField/TextFieldText.stories.d.ts +7 -0
- package/storybook/hook-form/RHFTextField/RHFTextField.stories.d.ts +4 -0
- package/storybook/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.stories.d.ts +19 -0
- package/utils/getLimitCharacters/getLimitCharacters.d.ts +7 -0
- package/utils/getLimitCharacters/getLimitCharacters.js +11 -0
- package/utils/getLimitCharacters/index.d.ts +1 -0
- package/utils/getLimitCharacters/index.js +1 -0
- package/utils/getLimitCharacters/test/getLimitCharacters.test.d.ts +1 -0
- package/utils/getLimitCharacters/types.d.ts +11 -0
package/@types/types.d.ts
CHANGED
|
@@ -151,6 +151,8 @@ import { ObjectLogsOwnerState, ObjectLogsSlotsType } from '../components/ObjectL
|
|
|
151
151
|
import { LanguagePopoverOwnerState, LanguagePopoverSlotsType } from '../components/LanguagePopover/types';
|
|
152
152
|
import { CardOwnerState, CardSlotsType } from '../components/Card/types';
|
|
153
153
|
import { ContainerFlowOwnerState, ContainerFlowSlotsType } from '../components/ContainerFlow/types';
|
|
154
|
+
import { NoItemPrivilegesOwnerState, NoItemPrivilegesSlotsType } from '../components/NoItemPrivileges/types';
|
|
155
|
+
import { ImageTextOwnerState, ImageTextSlotsType } from '../components/ImageText/types';
|
|
154
156
|
declare module '@mui/material/styles' {
|
|
155
157
|
// Define the slots in the theme
|
|
156
158
|
interface ComponentNameToClassKey {
|
|
@@ -233,7 +235,9 @@ declare module '@mui/material/styles' {
|
|
|
233
235
|
M4LLanguagePopover: LanguagePopoverSlotsType;
|
|
234
236
|
M4LCard: CardSlotsType;
|
|
235
237
|
M4LContainerFlow: ContainerFlowSlotsType;
|
|
238
|
+
M4LNoItemPrivileges: NoItemPrivilegesSlotsType;
|
|
236
239
|
M4LSettingsLayoutBase: SettingsLayoutSlotsType;
|
|
240
|
+
M4LImageText: ImageTextSlotsType;
|
|
237
241
|
}
|
|
238
242
|
interface ComponentsPropsList {
|
|
239
243
|
// Extend ComponentsProps or ComponentsOwnerState(this extend ComponentProps)
|
|
@@ -316,7 +320,9 @@ declare module '@mui/material/styles' {
|
|
|
316
320
|
M4LLanguagePopover: Partial<LanguagePopoverOwnerState>;
|
|
317
321
|
M4LCard: Partial<CardOwnerState>;
|
|
318
322
|
M4LContainerFlow: Partial<ContainerFlowOwnerState>;
|
|
323
|
+
M4LNoItemPrivileges: Partial<NoItemPrivilegesOwnerState>;
|
|
319
324
|
M4LSettingsLayoutBase: Partial<SettingsLayoutOwnerState>;
|
|
325
|
+
M4LImageText: Partial<ImageTextOwnerState>;
|
|
320
326
|
}
|
|
321
327
|
interface Components {
|
|
322
328
|
M4LDynamicFilter?: {
|
|
@@ -724,10 +730,20 @@ declare module '@mui/material/styles' {
|
|
|
724
730
|
styleOverrides?: ComponentsOverrides<Theme>['M4LContainerFlow'];
|
|
725
731
|
variants?: ComponentsVariants['M4LContainerFlow'];
|
|
726
732
|
};
|
|
733
|
+
M4LNoItemPrivileges?: {
|
|
734
|
+
defaultProps?: ComponentsPropsList['M4LNoItemPrivileges'];
|
|
735
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LNoItemPrivileges'];
|
|
736
|
+
variants?: ComponentsVariants['M4LNoItemPrivileges'];
|
|
737
|
+
};
|
|
727
738
|
M4LSettingsLayoutBase?: {
|
|
728
739
|
defaultProps?: ComponentsPropsList['M4LSettingsLayoutBase'];
|
|
729
740
|
styleOverrides?: ComponentsOverrides<Theme>['M4LSettingsLayoutBase'];
|
|
730
741
|
variants?: ComponentsVariants['M4LSettingsLayoutBase'];
|
|
731
742
|
};
|
|
743
|
+
M4LImageText?: {
|
|
744
|
+
defaultProps?: ComponentsPropsList['M4LImageText'];
|
|
745
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LImageText'];
|
|
746
|
+
variants?: ComponentsVariants['M4LImageText'];
|
|
747
|
+
};
|
|
732
748
|
}
|
|
733
749
|
}
|
|
@@ -14,7 +14,7 @@ const dataGridStyles = {
|
|
|
14
14
|
//inset: theme.vars.size.baseSpacings.sp0,
|
|
15
15
|
//overflow: 'hidden',
|
|
16
16
|
container: "container / inline-size",
|
|
17
|
-
background:
|
|
17
|
+
background: "transparent",
|
|
18
18
|
//boxShadow: 'unset',
|
|
19
19
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
20
20
|
position: "relative",
|
|
@@ -64,7 +64,7 @@ const dataGridStyles = {
|
|
|
64
64
|
display: "flex",
|
|
65
65
|
alignItems: "center",
|
|
66
66
|
justifyContent: "space-between",
|
|
67
|
-
background:
|
|
67
|
+
background: "transparent",
|
|
68
68
|
borderRadius: theme.vars.size.borderRadius.r1,
|
|
69
69
|
gap: theme.vars.size.baseSpacings.sp1,
|
|
70
70
|
height: "fit-content",
|
|
@@ -1,3 +1,47 @@
|
|
|
1
1
|
export declare const COMPONENT_TEST_ID = "M4LDragResizeWindowRND";
|
|
2
2
|
export declare const COMPONENT_KEY_COMPONENT = "M4LDragResizeWindowRND";
|
|
3
3
|
export declare const DEFAULT_TRANSFORM_SCALE = 1;
|
|
4
|
+
export declare const WINDOW_SIZES: {
|
|
5
|
+
horizontal: {
|
|
6
|
+
large: {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
};
|
|
10
|
+
medium: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
small: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
vertical: {
|
|
20
|
+
large: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
medium: {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
small: {
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
square: {
|
|
34
|
+
large: {
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
};
|
|
38
|
+
medium: {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
};
|
|
42
|
+
small: {
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
const COMPONENT_KEY_COMPONENT = "M4LDragResizeWindowRND";
|
|
2
2
|
const DEFAULT_TRANSFORM_SCALE = 1;
|
|
3
|
+
const WINDOW_SIZES = {
|
|
4
|
+
horizontal: {
|
|
5
|
+
large: {
|
|
6
|
+
width: 1e3,
|
|
7
|
+
height: 600
|
|
8
|
+
},
|
|
9
|
+
medium: {
|
|
10
|
+
width: 900,
|
|
11
|
+
height: 480
|
|
12
|
+
},
|
|
13
|
+
small: {
|
|
14
|
+
width: 750,
|
|
15
|
+
height: 380
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
vertical: {
|
|
19
|
+
large: {
|
|
20
|
+
width: 400,
|
|
21
|
+
height: 900
|
|
22
|
+
},
|
|
23
|
+
medium: {
|
|
24
|
+
width: 400,
|
|
25
|
+
height: 700
|
|
26
|
+
},
|
|
27
|
+
small: {
|
|
28
|
+
width: 400,
|
|
29
|
+
height: 500
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
square: {
|
|
33
|
+
large: {
|
|
34
|
+
width: 800,
|
|
35
|
+
height: 800
|
|
36
|
+
},
|
|
37
|
+
medium: {
|
|
38
|
+
width: 600,
|
|
39
|
+
height: 600
|
|
40
|
+
},
|
|
41
|
+
small: {
|
|
42
|
+
width: 400,
|
|
43
|
+
height: 400
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
3
47
|
export {
|
|
4
48
|
COMPONENT_KEY_COMPONENT as C,
|
|
5
|
-
DEFAULT_TRANSFORM_SCALE as D
|
|
49
|
+
DEFAULT_TRANSFORM_SCALE as D,
|
|
50
|
+
WINDOW_SIZES as W
|
|
6
51
|
};
|
|
@@ -33,7 +33,7 @@ const dynamicFilterStyles = {
|
|
|
33
33
|
height: "fit-content",
|
|
34
34
|
borderRadius: theme.vars.size.borderRadius.r2,
|
|
35
35
|
background: theme.vars.palette.background.default,
|
|
36
|
-
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1px ${theme.vars.palette.border.
|
|
36
|
+
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1px ${theme.vars.palette.border.secondary}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`,
|
|
37
37
|
overflow: "hidden",
|
|
38
38
|
'&:has([aria-expanded="true"])': {
|
|
39
39
|
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1.3px ${theme.vars.palette.border.main}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`
|
|
@@ -173,7 +173,7 @@ const dynamicFilterStyles = {
|
|
|
173
173
|
alignItems: "center",
|
|
174
174
|
borderTopRightRadius: theme.vars.size.borderRadius.r1,
|
|
175
175
|
borderBottomRightRadius: theme.vars.size.borderRadius.r1,
|
|
176
|
-
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.
|
|
176
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.secondary}`,
|
|
177
177
|
...!ownerState?.visibleRefresh && !ownerState?.isDirty && {
|
|
178
178
|
display: "none"
|
|
179
179
|
},
|
|
@@ -236,6 +236,7 @@ const dynamicFilterStyles = {
|
|
|
236
236
|
popoverFilter: ({ theme }) => ({
|
|
237
237
|
width: "auto",
|
|
238
238
|
"& .MuiPaper-root": {
|
|
239
|
+
borderRadius: `${theme.vars.size.borderRadius.r3}!important`,
|
|
239
240
|
padding: "0 !important",
|
|
240
241
|
minWidth: "220px",
|
|
241
242
|
maxWidth: "100%",
|
|
@@ -252,6 +253,7 @@ const dynamicFilterStyles = {
|
|
|
252
253
|
height: "fit-content"
|
|
253
254
|
},
|
|
254
255
|
"& .M4LWindowBase-root": {
|
|
256
|
+
borderRadius: `${theme.vars.size.borderRadius.r3}!important`,
|
|
255
257
|
border: "unset!important",
|
|
256
258
|
"& .M4LWindowBase-headerWindowComponent": {
|
|
257
259
|
cursor: "unset"
|
|
@@ -262,7 +264,9 @@ const dynamicFilterStyles = {
|
|
|
262
264
|
/**
|
|
263
265
|
* popoverFilterActions: Estilos del contenedor de acciones del menú emergente de filtro.
|
|
264
266
|
*/
|
|
265
|
-
popoverFilterActions: {}
|
|
267
|
+
popoverFilterActions: ({ theme }) => ({
|
|
268
|
+
paddingTop: theme.vars.size.baseSpacings.sp6
|
|
269
|
+
}),
|
|
266
270
|
/**
|
|
267
271
|
* inputSortInputSkeleton: Estilos del esqueleto del campo de entrada de ordenamiento.
|
|
268
272
|
*/
|
|
@@ -288,7 +292,7 @@ const dynamicFilterStyles = {
|
|
|
288
292
|
popoverFilterContainerFields: ({ theme }) => ({
|
|
289
293
|
display: "flex",
|
|
290
294
|
flexDirection: "column",
|
|
291
|
-
gap: theme.vars.size.baseSpacings.
|
|
295
|
+
gap: theme.vars.size.baseSpacings.sp3
|
|
292
296
|
})
|
|
293
297
|
};
|
|
294
298
|
export {
|
|
@@ -20,6 +20,8 @@ function FilterActions() {
|
|
|
20
20
|
canShowRemoveAction && /* @__PURE__ */ jsx(
|
|
21
21
|
ActionsClearButtonStyled,
|
|
22
22
|
{
|
|
23
|
+
role: "button",
|
|
24
|
+
"aria-label": "clear-filters",
|
|
23
25
|
icon: clearIconUrl,
|
|
24
26
|
size,
|
|
25
27
|
onClick: onClickClearFilters,
|
|
@@ -31,6 +33,7 @@ function FilterActions() {
|
|
|
31
33
|
{
|
|
32
34
|
icon: filterIconUrl,
|
|
33
35
|
size,
|
|
36
|
+
role: "button",
|
|
34
37
|
"aria-label": "refresh",
|
|
35
38
|
tooltip: getLabel(filterButtonDictionaryTooltip),
|
|
36
39
|
onClick: onClickFilter,
|
|
@@ -33,7 +33,7 @@ const dynamicSortStyles = {
|
|
|
33
33
|
height: "fit-content",
|
|
34
34
|
borderRadius: theme.vars.size.borderRadius.r2,
|
|
35
35
|
background: theme.vars.palette.background.default,
|
|
36
|
-
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1px ${theme.vars.palette.border.
|
|
36
|
+
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1px ${theme.vars.palette.border.secondary}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`,
|
|
37
37
|
overflow: "hidden",
|
|
38
38
|
'&:has([aria-expanded="true"])': {
|
|
39
39
|
boxShadow: ownerState?.isValid ? `inset 0px 0px 0px 1.3px ${theme.vars.palette.border.main}` : `inset 0px 0px 0px 1px ${theme.vars.palette.error.enabled}`
|
|
@@ -172,7 +172,7 @@ const dynamicSortStyles = {
|
|
|
172
172
|
alignItems: "center",
|
|
173
173
|
borderTopRightRadius: theme.vars.size.borderRadius.r1,
|
|
174
174
|
borderBottomRightRadius: theme.vars.size.borderRadius.r1,
|
|
175
|
-
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.
|
|
175
|
+
boxShadow: `inset 1px 0px 0px 0px ${theme.vars.palette.border.secondary}`,
|
|
176
176
|
...!ownerState?.visibleRefresh && !ownerState?.isDirty && {
|
|
177
177
|
display: "none"
|
|
178
178
|
},
|
|
@@ -240,6 +240,7 @@ const dynamicSortStyles = {
|
|
|
240
240
|
minWidth: "220px",
|
|
241
241
|
maxWidth: "100%",
|
|
242
242
|
minHeight: "auto",
|
|
243
|
+
borderRadius: `${theme.vars.size.borderRadius.r3}!important`,
|
|
243
244
|
boxShadow: theme.customShadows?.z3,
|
|
244
245
|
"& .M4LPopover-arrowStyle": {
|
|
245
246
|
display: "none"
|
|
@@ -252,6 +253,7 @@ const dynamicSortStyles = {
|
|
|
252
253
|
height: "fit-content"
|
|
253
254
|
},
|
|
254
255
|
"& .M4LWindowBase-root": {
|
|
256
|
+
borderRadius: `${theme.vars.size.borderRadius.r3} !important`,
|
|
255
257
|
border: "unset!important",
|
|
256
258
|
"& .M4LWindowBase-headerWindowComponent": {
|
|
257
259
|
cursor: "unset"
|
|
@@ -265,12 +267,14 @@ const dynamicSortStyles = {
|
|
|
265
267
|
popoverSortContainerFields: ({ theme }) => ({
|
|
266
268
|
display: "flex",
|
|
267
269
|
flexDirection: "column",
|
|
268
|
-
gap: theme.vars.size.baseSpacings.
|
|
270
|
+
gap: theme.vars.size.baseSpacings.sp3
|
|
269
271
|
}),
|
|
270
272
|
/**
|
|
271
273
|
* popoverSortActions: Estilos del contenedor de acciones del menú emergente de ordenamiento.
|
|
272
274
|
*/
|
|
273
|
-
popoverSortActions: {}
|
|
275
|
+
popoverSortActions: ({ theme }) => ({
|
|
276
|
+
paddingTop: theme.vars.size.baseSpacings.sp6
|
|
277
|
+
}),
|
|
274
278
|
/**
|
|
275
279
|
* inputSortSkeleton: Estilos del esqueleto del campo de entrada de ordenamiento.
|
|
276
280
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ImageTextProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente que representa un contenedor que agrupa mensajes con imagen y texto.
|
|
4
|
+
* @param props - Propiedades del componente.
|
|
5
|
+
* @returns Un componente de tipo ReactNode.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ImageText: (props: ImageTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { I as ImageTextSlots } from "./slots/ImageTextEnum.js";
|
|
3
|
+
import { I as ImageTextContainerRoot, a as ImageContainerStyled, b as ImgStyled, W as WrapperTitleMessageStyled, T as TypographyTitleStyled, c as TypographyMessageStyled } from "./slots/ImageTextSlots.js";
|
|
4
|
+
import { I as IMG_ALT, a as IMAGE_TEXT_CLASSES, b as IMAGE_TEXT_KEY_COMPONENT } from "./constants.js";
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { useRef } from "react";
|
|
7
|
+
import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
|
|
8
|
+
import { u as useIsVisible } from "../../hooks/useIsVisible/useIsVisible.js";
|
|
9
|
+
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
10
|
+
const ImageText = (props) => {
|
|
11
|
+
const { className, dataTestId, imageUrl, title, message, size, imageAriaLabel, ...others } = props;
|
|
12
|
+
const containerRef = useRef(null);
|
|
13
|
+
const isVisible = useIsVisible(containerRef);
|
|
14
|
+
const { currentSize } = useComponentSize(size);
|
|
15
|
+
return /* @__PURE__ */ jsxs(
|
|
16
|
+
ImageTextContainerRoot,
|
|
17
|
+
{
|
|
18
|
+
...others,
|
|
19
|
+
...getPropDataTestId(
|
|
20
|
+
IMAGE_TEXT_KEY_COMPONENT,
|
|
21
|
+
ImageTextSlots.root,
|
|
22
|
+
dataTestId
|
|
23
|
+
),
|
|
24
|
+
className: clsx(IMAGE_TEXT_CLASSES.root, className),
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(ImageContainerStyled, { ref: containerRef, ownerState: { isVisible }, children: /* @__PURE__ */ jsx(
|
|
27
|
+
ImgStyled,
|
|
28
|
+
{
|
|
29
|
+
src: imageUrl,
|
|
30
|
+
alt: IMG_ALT,
|
|
31
|
+
role: "presentation",
|
|
32
|
+
"aria-label": imageAriaLabel,
|
|
33
|
+
ownerState: { isVisible }
|
|
34
|
+
}
|
|
35
|
+
) }),
|
|
36
|
+
/* @__PURE__ */ jsxs(WrapperTitleMessageStyled, { children: [
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
TypographyTitleStyled,
|
|
39
|
+
{
|
|
40
|
+
size: currentSize,
|
|
41
|
+
skeletonWidth: 100,
|
|
42
|
+
variant: "bodyDens",
|
|
43
|
+
children: title
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
TypographyMessageStyled,
|
|
48
|
+
{
|
|
49
|
+
size: currentSize,
|
|
50
|
+
skeletonWidth: 200,
|
|
51
|
+
variant: "body",
|
|
52
|
+
children: message
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
ImageText as I
|
|
62
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const imageTextContainerStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Estilos para el contenedor principal del componente ImageTextContainer.
|
|
4
|
+
*/
|
|
5
|
+
root: ({ theme }) => ({
|
|
6
|
+
display: "flex",
|
|
7
|
+
flexDirection: "column",
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
height: "80%",
|
|
11
|
+
width: "100%",
|
|
12
|
+
maxWidth: "600px",
|
|
13
|
+
minWidth: "200px",
|
|
14
|
+
padding: "10px",
|
|
15
|
+
gap: theme.vars.size.baseSpacings.sp2,
|
|
16
|
+
minHeight: "60px",
|
|
17
|
+
backgroundColor: theme.palette.background.default
|
|
18
|
+
}),
|
|
19
|
+
/**
|
|
20
|
+
* Estilos para el contenedor de la imagen.
|
|
21
|
+
*/
|
|
22
|
+
imageContainer: ({ ownerState }) => ({
|
|
23
|
+
visibility: ownerState?.isVisible ? "visible" : "hidden",
|
|
24
|
+
display: "flex",
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
height: "100%",
|
|
27
|
+
width: "100%",
|
|
28
|
+
maxWidth: "150px",
|
|
29
|
+
maxHeight: "106px",
|
|
30
|
+
minWidth: "70px",
|
|
31
|
+
'& [class*="M4LImage-imgSkeleton"]': {
|
|
32
|
+
opacity: 0
|
|
33
|
+
},
|
|
34
|
+
'& [class*="M4LImage"]': {
|
|
35
|
+
width: "100%",
|
|
36
|
+
height: "auto ",
|
|
37
|
+
maxWidth: "150px",
|
|
38
|
+
maxHeight: "106px",
|
|
39
|
+
minWidth: "70px",
|
|
40
|
+
minHeight: "50px"
|
|
41
|
+
}
|
|
42
|
+
}),
|
|
43
|
+
/**
|
|
44
|
+
* Estilos para la imagen.
|
|
45
|
+
*/
|
|
46
|
+
img: {},
|
|
47
|
+
/**
|
|
48
|
+
* Estilos para el wrapper de la typography de NoItemPrivileges.
|
|
49
|
+
*/
|
|
50
|
+
wrapperTitleMessage: ({ theme }) => ({
|
|
51
|
+
display: "flex",
|
|
52
|
+
justifyContent: "center",
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
flexDirection: "column",
|
|
55
|
+
gap: theme.vars.size.baseSpacings["sp0-5"],
|
|
56
|
+
"& .MuiTypography-root": {
|
|
57
|
+
width: "auto"
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
/**
|
|
61
|
+
* Estilos para la typography de NoItemPrivileges.
|
|
62
|
+
*/
|
|
63
|
+
title: ({ theme }) => ({
|
|
64
|
+
"&&&": {
|
|
65
|
+
color: theme.vars.palette.primary.semanticText
|
|
66
|
+
}
|
|
67
|
+
}),
|
|
68
|
+
/**
|
|
69
|
+
* Estilos para la typography del mensaje de NoItemPrivileges.
|
|
70
|
+
*/
|
|
71
|
+
message: ({ theme }) => ({
|
|
72
|
+
"&&&": {
|
|
73
|
+
color: theme.vars.palette.text.secondary
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
imageTextContainerStyles as i
|
|
79
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clave del componente ImageTextContainer.
|
|
3
|
+
*/
|
|
4
|
+
export declare const IMAGE_TEXT_KEY_COMPONENT = "M4LImageText";
|
|
5
|
+
/**
|
|
6
|
+
* Clases del componente ImageTextContainer.
|
|
7
|
+
*/
|
|
8
|
+
export declare const IMAGE_TEXT_CLASSES: Record<string, string>;
|
|
9
|
+
/**
|
|
10
|
+
* URL de la imagen por defecto.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_IMAGE_URL = "frontend/components/no_item_privileges/assets/img/ImageTextDefault.svg";
|
|
13
|
+
/**
|
|
14
|
+
* Alt de la imagen.
|
|
15
|
+
*/
|
|
16
|
+
export declare const IMG_ALT = "illustration";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
+
import { I as ImageTextSlots } from "./slots/ImageTextEnum.js";
|
|
3
|
+
const IMAGE_TEXT_KEY_COMPONENT = "M4LImageText";
|
|
4
|
+
const IMAGE_TEXT_CLASSES = getComponentClasses(IMAGE_TEXT_KEY_COMPONENT, ImageTextSlots);
|
|
5
|
+
const IMG_ALT = "illustration";
|
|
6
|
+
export {
|
|
7
|
+
IMG_ALT as I,
|
|
8
|
+
IMAGE_TEXT_CLASSES as a,
|
|
9
|
+
IMAGE_TEXT_KEY_COMPONENT as b
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ImageText } from './ImageText';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var ImageTextSlots = /* @__PURE__ */ ((ImageTextSlots2) => {
|
|
2
|
+
ImageTextSlots2["root"] = "root";
|
|
3
|
+
ImageTextSlots2["imageContainer"] = "imageContainer";
|
|
4
|
+
ImageTextSlots2["img"] = "img";
|
|
5
|
+
ImageTextSlots2["wrapperTitleMessage"] = "wrapperTitleMessage";
|
|
6
|
+
ImageTextSlots2["title"] = "title";
|
|
7
|
+
ImageTextSlots2["message"] = "message";
|
|
8
|
+
return ImageTextSlots2;
|
|
9
|
+
})(ImageTextSlots || {});
|
|
10
|
+
export {
|
|
11
|
+
ImageTextSlots as I
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const ImageTextContainerRoot: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('../types').ImageTextOwnerState> & Record<string, unknown>) | undefined;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
+
export declare const ImageContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
5
|
+
ownerState?: (Partial<import('../types').ImageTextOwnerState> & Record<string, unknown>) | undefined;
|
|
6
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
|
+
export declare const ImgStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Image').ImageProps, keyof import('../../Image').ImageProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
8
|
+
ownerState?: (Partial<import('../types').ImageTextOwnerState> & Record<string, unknown>) | undefined;
|
|
9
|
+
}, {}, {}>;
|
|
10
|
+
export declare const WrapperTitleMessageStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
11
|
+
ownerState?: (Partial<import('../types').ImageTextOwnerState> & Record<string, unknown>) | undefined;
|
|
12
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
13
|
+
export declare const TypographyTitleStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Typography/types').TypographyProps, keyof import('../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
14
|
+
ownerState?: (Partial<import('../types').ImageTextOwnerState> & Record<string, unknown>) | undefined;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export declare const TypographyMessageStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Typography/types').TypographyProps, keyof import('../../mui_extended/Typography/types').TypographyProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
17
|
+
ownerState?: (Partial<import('../types').ImageTextOwnerState> & Record<string, unknown>) | undefined;
|
|
18
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { b as IMAGE_TEXT_KEY_COMPONENT } from "../constants.js";
|
|
3
|
+
import { I as ImageTextSlots } from "./ImageTextEnum.js";
|
|
4
|
+
import { i as imageTextContainerStyles } from "../ImageText.styles.js";
|
|
5
|
+
import { I as Image } from "../../Image/Image.js";
|
|
6
|
+
import { T as Typography } from "../../mui_extended/Typography/Typography.js";
|
|
7
|
+
const ImageTextContainerRoot = styled("div", {
|
|
8
|
+
name: IMAGE_TEXT_KEY_COMPONENT,
|
|
9
|
+
slot: ImageTextSlots.root
|
|
10
|
+
})(imageTextContainerStyles?.root);
|
|
11
|
+
const ImageContainerStyled = styled("div", {
|
|
12
|
+
name: IMAGE_TEXT_KEY_COMPONENT,
|
|
13
|
+
slot: ImageTextSlots.imageContainer
|
|
14
|
+
})(imageTextContainerStyles?.imageContainer);
|
|
15
|
+
const ImgStyled = styled(Image, {
|
|
16
|
+
name: IMAGE_TEXT_KEY_COMPONENT,
|
|
17
|
+
slot: ImageTextSlots.img
|
|
18
|
+
})(imageTextContainerStyles?.img);
|
|
19
|
+
const WrapperTitleMessageStyled = styled("div", {
|
|
20
|
+
name: IMAGE_TEXT_KEY_COMPONENT,
|
|
21
|
+
slot: ImageTextSlots.wrapperTitleMessage
|
|
22
|
+
})(imageTextContainerStyles?.wrapperTitleMessage);
|
|
23
|
+
const TypographyTitleStyled = styled(Typography, {
|
|
24
|
+
name: IMAGE_TEXT_KEY_COMPONENT,
|
|
25
|
+
slot: ImageTextSlots.title
|
|
26
|
+
})(imageTextContainerStyles?.title);
|
|
27
|
+
const TypographyMessageStyled = styled(Typography, {
|
|
28
|
+
name: IMAGE_TEXT_KEY_COMPONENT,
|
|
29
|
+
slot: ImageTextSlots.message
|
|
30
|
+
})(imageTextContainerStyles?.message);
|
|
31
|
+
export {
|
|
32
|
+
ImageTextContainerRoot as I,
|
|
33
|
+
TypographyTitleStyled as T,
|
|
34
|
+
WrapperTitleMessageStyled as W,
|
|
35
|
+
ImageContainerStyled as a,
|
|
36
|
+
ImgStyled as b,
|
|
37
|
+
TypographyMessageStyled as c
|
|
38
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ImageTextSlots } from './slots/ImageTextEnum';
|
|
2
|
+
import { M4LOverridesStyleRules } from '../../@types/augmentations';
|
|
3
|
+
import { IMAGE_TEXT_KEY_COMPONENT } from './constants';
|
|
4
|
+
import { Theme } from '@mui/material';
|
|
5
|
+
import { Sizes } from '@m4l/styles';
|
|
6
|
+
export interface ImageTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/**
|
|
8
|
+
* Clase del componente.
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* ID de prueba.
|
|
13
|
+
*/
|
|
14
|
+
dataTestId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* URL de la imagen.
|
|
17
|
+
*/
|
|
18
|
+
imageUrl: string;
|
|
19
|
+
/**
|
|
20
|
+
* Título del componente.
|
|
21
|
+
*/
|
|
22
|
+
title: string;
|
|
23
|
+
/**
|
|
24
|
+
* Mensaje del componente.
|
|
25
|
+
*/
|
|
26
|
+
message: string;
|
|
27
|
+
/**
|
|
28
|
+
* Aria-label de la imagen.
|
|
29
|
+
*/
|
|
30
|
+
imageAriaLabel?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Tamaño del componente.
|
|
33
|
+
*/
|
|
34
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
35
|
+
}
|
|
36
|
+
export type ImageTextOwnerState = {
|
|
37
|
+
isVisible: boolean;
|
|
38
|
+
};
|
|
39
|
+
export type ImageTextSlotsType = keyof typeof ImageTextSlots;
|
|
40
|
+
export type ImageTextStyles = M4LOverridesStyleRules<ImageTextSlotsType, typeof IMAGE_TEXT_KEY_COMPONENT, Theme>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NoItemPrivilegesProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente que muestra un mensaje de que no hay privilegios para el item seleccionado.
|
|
4
|
+
* @param props - Propiedades del componente.
|
|
5
|
+
* @returns Componente NoItemPrivileges.
|
|
6
|
+
*/
|
|
7
|
+
export declare const NoItemPrivileges: (props: NoItemPrivilegesProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
3
|
+
import { D as DICTIONARY } from "./dictionary.js";
|
|
4
|
+
import { D as DEFAULT_IMAGE_URL, N as NO_ITEM_PRIVILEGES_CLASSES } from "./constants.js";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
import { N as NoItemPrivilegesRootStyled } from "./slots/NoItemPrivilegesSlots.js";
|
|
7
|
+
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
8
|
+
const NoItemPrivileges = (props) => {
|
|
9
|
+
const { image, title, message, className, dataTestId, size } = props;
|
|
10
|
+
const { getLabel } = useModuleDictionary();
|
|
11
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
12
|
+
const imageUrl = image || `${host_static_assets}/${environment_assets}/${DEFAULT_IMAGE_URL}`;
|
|
13
|
+
const titleText = title || getLabel(DICTIONARY.LABEL_TITLE);
|
|
14
|
+
const messageText = message || getLabel(DICTIONARY.LABEL_MESSAGE);
|
|
15
|
+
const { currentSize } = useComponentSize(size);
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
NoItemPrivilegesRootStyled,
|
|
18
|
+
{
|
|
19
|
+
imageUrl,
|
|
20
|
+
title: titleText,
|
|
21
|
+
message: messageText,
|
|
22
|
+
size: currentSize,
|
|
23
|
+
className: clsx(NO_ITEM_PRIVILEGES_CLASSES.root, className),
|
|
24
|
+
dataTestId,
|
|
25
|
+
role: "alert",
|
|
26
|
+
"aria-label": "NoItemPrivileges",
|
|
27
|
+
imageAriaLabel: "illustration no item privileges"
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
NoItemPrivileges as N
|
|
33
|
+
};
|