@m4l/components 9.1.58 → 9.1.60
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/components/AccountPopover/AccountPopover.d.ts +1 -1
- package/components/AccountPopover/AccountPopover.styles.js +16 -16
- package/components/AccountPopover/subcomponents/MenuPopover/MenuPopover.d.ts +1 -1
- package/components/AccountPopover/types.d.ts +2 -2
- package/components/AppBar/AppBar.d.ts +1 -1
- package/components/AppBar/styles.js +8 -8
- package/components/AppBar/types.d.ts +1 -1
- package/components/BaseModule/BaseModule.d.ts +1 -1
- package/components/Chip/Chip.d.ts +2 -2
- package/components/Chip/ChipStyles.js +10 -10
- package/components/Chip/types.d.ts +13 -0
- package/components/Color/Color.d.ts +4 -0
- package/components/Color/Color.styles.d.ts +1 -0
- package/components/Color/Color.styles.js +11 -0
- package/components/CommonActions/components/ActionFormIntro/index.d.ts +1 -1
- package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.d.ts +4 -0
- package/components/DynamicFilter/types.d.ts +18 -0
- package/components/HelperError/HelperError.d.ts +2 -2
- package/components/HelperError/HelperError.styles.js +4 -4
- package/components/Label/Label.d.ts +4 -4
- package/components/Label/Label.styles.js +10 -10
- package/components/MFIsolationApp/MFIsolationApp.d.ts +1 -1
- package/components/MenuActions/MenuActions.d.ts +1 -1
- package/components/MenuActions/types.d.ts +4 -4
- package/components/PaperForm/PaperForm.d.ts +2 -2
- package/components/PaperForm/PaperForm.js +33 -5
- package/components/PaperForm/styles.js +15 -14
- package/components/PaperForm/types.d.ts +2 -1
- package/components/PrintingSystem/types.d.ts +23 -0
- package/components/PropertyValue/PropertyValue.d.ts +1 -1
- package/components/PropertyValue/PropertyValue.js +24 -10
- package/components/PropertyValue/PropertyValue.styles.js +6 -6
- package/components/PropertyValue/types.d.ts +5 -0
- package/components/SideBar/SideBar.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentComponent/index.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +2 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +2 -2
- package/components/SideBar/subcomponents/SideBarDesktop/index.d.ts +1 -1
- package/components/SideBar/subcomponents/SideBarDesktop/index.js +1 -0
- package/components/SideBar/tests/SideBar.integration.test.d.ts +1 -0
- package/components/WindowConfirm/WindowConfirm.styles.js +16 -16
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index.d.ts +4 -4
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +2 -2
- package/components/hook-form/RHFAutocomplete/RFHAutocompleteStyles.js +8 -0
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.d.ts +4 -0
- package/components/hook-form/RHFAutocomplete/types.d.ts +2 -0
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.d.ts +4 -0
- package/components/hook-form/RHFColorPicker/RFHColorPicker.d.ts +2 -2
- package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.d.ts +1 -0
- package/components/hook-form/RHFColorPicker/RHFColorPicker.styles.js +12 -0
- package/components/hook-form/RHFPeriod/RHFPeriod.d.ts +2 -2
- package/components/hook-form/RHFPeriod/RHFPeriod.styles.js +10 -10
- package/components/hook-form/RHFPeriod/subcomponents/Period/Period.d.ts +2 -2
- package/components/hook-form/RHFTextField/RHFTextField.d.ts +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.styles.js +1 -1
- package/components/hook-form/RHFTextFieldPassword/RHFTextFieldPassword.d.ts +1 -0
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MeasureData/index.d.ts +4 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/GeneralData/index.d.ts +4 -0
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.d.ts +1 -1
- package/components/mui_extended/Autocomplete/Autocomplete.styles.js +19 -14
- package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +2 -2
- package/components/mui_extended/Button/Button.d.ts +1 -1
- package/components/mui_extended/Button/ButtonStyles.js +3 -3
- package/components/mui_extended/CircularProgress/CircularProgress.d.ts +4 -0
- package/components/mui_extended/Dialog/Dialog.d.ts +2 -2
- package/components/mui_extended/IconButton/IconButton.styles.js +4 -4
- package/components/mui_extended/LoadingButton/LoadingButton.d.ts +1 -1
- package/components/mui_extended/LoadingButton/LoadingButton.styles.js +3 -3
- package/components/mui_extended/MenuItem/MenuItem.d.ts +1 -1
- package/components/mui_extended/MenuItem/MenuItem.styles.js +15 -7
- package/components/mui_extended/Popover/Popover.d.ts +1 -1
- package/components/mui_extended/Select/Select.d.ts +1 -1
- package/components/mui_extended/Select/Select.js +1 -1
- package/components/mui_extended/Select/Select.styles.js +8 -8
- package/components/mui_extended/Select/types.d.ts +1 -1
- package/components/mui_extended/TextField/TextField.d.ts +1 -1
- package/components/mui_extended/TextField/TextField.styles.js +2 -2
- package/components/mui_extended/Typography/Typography.d.ts +2 -2
- package/components/mui_extended/Typography/typography.styles.js +1 -1
- package/hooks/useFormFocus/index.d.ts +5 -1
- package/package.json +1 -1
- package/test/HostThemeProviderMock.d.ts +1 -1
- package/test/TestAppWrapper.d.ts +1 -1
- package/test/TestFormAutoValidation.d.ts +4 -0
- package/utils/getHeightSizeStyles.d.ts +4 -0
- package/utils/getTypographyStyles.d.ts +4 -0
|
@@ -3,8 +3,8 @@ const labelStyles = {
|
|
|
3
3
|
* Estilos para el contenedor raíz del Label.
|
|
4
4
|
* @author Bruce Escobar - automatic
|
|
5
5
|
* @createdAt 2024-10-22 09:34:39 - automatic
|
|
6
|
-
* @updatedAt
|
|
7
|
-
* @updatedUser
|
|
6
|
+
* @updatedAt 2025-01-08 10:36:40 - automatic
|
|
7
|
+
* @updatedUser Andrés Quintero - automatic
|
|
8
8
|
*/
|
|
9
9
|
root: ({ ownerState, theme }) => ({
|
|
10
10
|
display: "flex",
|
|
@@ -38,8 +38,8 @@ const labelStyles = {
|
|
|
38
38
|
* Estilos para el slot Typography.
|
|
39
39
|
* @author Bruce Escobar - automatic
|
|
40
40
|
* @createdAt 2024-10-22 09:34:39 - automatic
|
|
41
|
-
* @updatedAt
|
|
42
|
-
* @updatedUser
|
|
41
|
+
* @updatedAt 2025-01-08 10:36:40 - automatic
|
|
42
|
+
* @updatedUser Andrés Quintero - automatic
|
|
43
43
|
*/
|
|
44
44
|
typographyStyled: ({ theme, ownerState }) => ({
|
|
45
45
|
"& .MuiTypography-root": {
|
|
@@ -60,8 +60,8 @@ const labelStyles = {
|
|
|
60
60
|
* Estilos para el mensaje obligatorio.
|
|
61
61
|
* @author Bruce Escobar - automatic
|
|
62
62
|
* @createdAt 2024-10-22 09:34:39 - automatic
|
|
63
|
-
* @updatedAt
|
|
64
|
-
* @updatedUser
|
|
63
|
+
* @updatedAt 2025-01-08 10:36:40 - automatic
|
|
64
|
+
* @updatedUser Andrés Quintero - automatic
|
|
65
65
|
*/
|
|
66
66
|
typographyMandatoryMessageStyled: ({ theme, ownerState }) => ({
|
|
67
67
|
"& .MuiTypography-root": {
|
|
@@ -78,8 +78,8 @@ const labelStyles = {
|
|
|
78
78
|
* Estilos para el icono del mensaje de ayuda.
|
|
79
79
|
* @author Bruce Escobar - automatic
|
|
80
80
|
* @createdAt 2024-10-22 09:34:39 - automatic
|
|
81
|
-
* @updatedAt
|
|
82
|
-
* @updatedUser
|
|
81
|
+
* @updatedAt 2025-01-08 10:36:40 - automatic
|
|
82
|
+
* @updatedUser Andrés Quintero - automatic
|
|
83
83
|
*/
|
|
84
84
|
iconHelperMessageStyled: ({ theme }) => ({
|
|
85
85
|
height: "24px",
|
|
@@ -97,8 +97,8 @@ const labelStyles = {
|
|
|
97
97
|
* Estilos para el componente Skeleton.
|
|
98
98
|
* @author Bruce Escobar - automatic
|
|
99
99
|
* @createdAt 2024-10-22 09:34:39 - automatic
|
|
100
|
-
* @updatedAt
|
|
101
|
-
* @updatedUser
|
|
100
|
+
* @updatedAt 2025-01-08 10:36:40 - automatic
|
|
101
|
+
* @updatedUser Andrés Quintero - automatic
|
|
102
102
|
*/
|
|
103
103
|
skeletonStyled: ({ ownerState, theme }) => ({
|
|
104
104
|
width: "100%",
|
|
@@ -3,7 +3,7 @@ import { MFIsolationAppProps } from './types';
|
|
|
3
3
|
* TODO: Documentar
|
|
4
4
|
* @author Andrés Quintero - automatic
|
|
5
5
|
* @createdAt 2024-12-31 11:23:50 - automatic
|
|
6
|
-
* @updatedAt
|
|
6
|
+
* @updatedAt 2025-01-03 11:42:14 - automatic
|
|
7
7
|
* @updatedUser Andrés Quintero - automatic
|
|
8
8
|
*/
|
|
9
9
|
export declare function MFIsolationApp(props: MFIsolationAppProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ import { MenuActionsProps } from './types';
|
|
|
7
7
|
* y estilos configurables.
|
|
8
8
|
* @author cesar - automatic
|
|
9
9
|
* @createdAt 2024-12-17 15:41:39 - automatic
|
|
10
|
-
* @updatedAt
|
|
10
|
+
* @updatedAt 2025-01-03 11:42:14 - automatic
|
|
11
11
|
* @updatedUser Andrés Quintero - automatic
|
|
12
12
|
*/
|
|
13
13
|
export declare function MenuActions(props: MenuActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,7 +13,7 @@ import { MENU_ACTIONS_KEY_COMPONENT } from './constants';
|
|
|
13
13
|
* onClick - Función a ejecutar al hacer clic en la acción.
|
|
14
14
|
* @author Andrés Quintero - automatic
|
|
15
15
|
* @createdAt 2024-12-27 08:27:30 - automatic
|
|
16
|
-
* @updatedAt
|
|
16
|
+
* @updatedAt 2025-01-03 11:42:14 - automatic
|
|
17
17
|
* @updatedUser Andrés Quintero - automatic
|
|
18
18
|
*/
|
|
19
19
|
export interface ComponentActionProps {
|
|
@@ -26,7 +26,7 @@ export interface ComponentActionProps {
|
|
|
26
26
|
* [error] - Indicador de error en la acción del menú.
|
|
27
27
|
* @author Andrés Quintero - automatic
|
|
28
28
|
* @createdAt 2024-12-27 08:27:30 - automatic
|
|
29
|
-
* @updatedAt
|
|
29
|
+
* @updatedAt 2025-01-03 11:42:14 - automatic
|
|
30
30
|
* @updatedUser Andrés Quintero - automatic
|
|
31
31
|
*/
|
|
32
32
|
export interface MenuAction extends Pick<MenuItemProps, 'startIcon' | 'endIcon' | 'label' | 'selected' | 'componentPaletteColor' | 'color' | 'disabled'> {
|
|
@@ -68,7 +68,7 @@ export interface MenuActionsProps extends Omit<PopoverProps, 'open' | 'anchorEl'
|
|
|
68
68
|
* Acciones del menú, puede ser un array o una función que genere acciones.
|
|
69
69
|
* @author Andrés Quintero - automatic
|
|
70
70
|
* @createdAt 2024-12-27 08:27:30 - automatic
|
|
71
|
-
* @updatedAt
|
|
71
|
+
* @updatedAt 2025-01-03 11:42:14 - automatic
|
|
72
72
|
* @updatedUser Andrés Quintero - automatic
|
|
73
73
|
*/
|
|
74
74
|
menuActions: MenuAction[] | ((row: any) => MenuAction[]);
|
|
@@ -131,7 +131,7 @@ export interface MenuActionsProps extends Omit<PopoverProps, 'open' | 'anchorEl'
|
|
|
131
131
|
* Función externa para cerrar el menú.
|
|
132
132
|
* @author Andrés Quintero - automatic
|
|
133
133
|
* @createdAt 2024-12-27 08:27:30 - automatic
|
|
134
|
-
* @updatedAt
|
|
134
|
+
* @updatedAt 2025-01-03 11:42:14 - automatic
|
|
135
135
|
* @updatedUser Andrés Quintero - automatic
|
|
136
136
|
*/
|
|
137
137
|
externalClose?: (element: null | HTMLDivElement) => void;
|
|
@@ -7,7 +7,7 @@ import { PaperFormProps } from './types';
|
|
|
7
7
|
* **********************************************************************
|
|
8
8
|
* @author Andrés Quintero - automatic
|
|
9
9
|
* @createdAt 2024-11-20 14:00:24 - automatic
|
|
10
|
-
* @updatedAt
|
|
11
|
-
* @updatedUser
|
|
10
|
+
* @updatedAt 2025-01-08 15:43:10 - automatic
|
|
11
|
+
* @updatedUser cesar - automatic
|
|
12
12
|
*/
|
|
13
13
|
export declare function PaperForm(props: PaperFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,14 +4,42 @@ import { P as PaperFormRootStyled, C as ContentStyled } from "./slots/PaperFormS
|
|
|
4
4
|
import { useRef } from "react";
|
|
5
5
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
6
6
|
import { P as PAPER_FORM_KEY } from "./constants.js";
|
|
7
|
+
import { P as PropertyValue } from "../PropertyValue/PropertyValue.js";
|
|
8
|
+
const isPropertyValue = (child) => typeof child === "object" && child !== null && "property" in child && "value" in child;
|
|
9
|
+
const renderChildren = (children) => {
|
|
10
|
+
if (Array.isArray(children)) {
|
|
11
|
+
return children.map(
|
|
12
|
+
(child) => isPropertyValue(child) ? /* @__PURE__ */ jsx(PropertyValue, { ...child }, child.property) : child
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
return children;
|
|
16
|
+
};
|
|
7
17
|
function PaperForm(props) {
|
|
8
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
urlIcon,
|
|
20
|
+
title,
|
|
21
|
+
children,
|
|
22
|
+
dataTestId,
|
|
23
|
+
color = "default",
|
|
24
|
+
size = "medium",
|
|
25
|
+
isForm = false,
|
|
26
|
+
variant = "standard"
|
|
27
|
+
} = props;
|
|
9
28
|
const paperFormRef = useRef(null);
|
|
10
29
|
const rootClass = getComponentSlotRoot(PAPER_FORM_KEY);
|
|
11
|
-
return /* @__PURE__ */ jsxs(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
30
|
+
return /* @__PURE__ */ jsxs(
|
|
31
|
+
PaperFormRootStyled,
|
|
32
|
+
{
|
|
33
|
+
className: rootClass,
|
|
34
|
+
ref: paperFormRef,
|
|
35
|
+
ownerState: { isForm, color, variant },
|
|
36
|
+
...process.env.NODE_ENV !== "production" ? { "data-testid": dataTestId } : {},
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Header, { urlIcon, title, color, size }),
|
|
39
|
+
/* @__PURE__ */ jsx(ContentStyled, { ownerState: { isForm }, children: renderChildren(children) })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
15
43
|
}
|
|
16
44
|
export {
|
|
17
45
|
PaperForm as P
|
|
@@ -6,8 +6,8 @@ const paperFormStyles = {
|
|
|
6
6
|
***********************************************************
|
|
7
7
|
* @author Andrés Quintero - automatic
|
|
8
8
|
* @createdAt 2024-11-20 14:00:24 - automatic
|
|
9
|
-
* @updatedAt
|
|
10
|
-
* @updatedUser
|
|
9
|
+
* @updatedAt 2025-01-08 10:46:48 - automatic
|
|
10
|
+
* @updatedUser cesar - automatic
|
|
11
11
|
*/
|
|
12
12
|
paperFormRoot: ({ theme }) => ({
|
|
13
13
|
borderRadius: theme.size.borderRadius.r1,
|
|
@@ -25,8 +25,8 @@ const paperFormStyles = {
|
|
|
25
25
|
***********************************************************
|
|
26
26
|
* @author Andrés Quintero - automatic
|
|
27
27
|
* @createdAt 2024-11-20 14:00:24 - automatic
|
|
28
|
-
* @updatedAt
|
|
29
|
-
* @updatedUser
|
|
28
|
+
* @updatedAt 2025-01-08 10:46:48 - automatic
|
|
29
|
+
* @updatedUser cesar - automatic
|
|
30
30
|
*/
|
|
31
31
|
containerHeader: ({ theme, ownerState }) => ({
|
|
32
32
|
display: "flex",
|
|
@@ -46,8 +46,8 @@ const paperFormStyles = {
|
|
|
46
46
|
***********************************************************
|
|
47
47
|
* @author Andrés Quintero - automatic
|
|
48
48
|
* @createdAt 2024-11-20 14:00:24 - automatic
|
|
49
|
-
* @updatedAt
|
|
50
|
-
* @updatedUser
|
|
49
|
+
* @updatedAt 2025-01-08 10:46:48 - automatic
|
|
50
|
+
* @updatedUser cesar - automatic
|
|
51
51
|
*/
|
|
52
52
|
containerTitle: ({ theme }) => ({
|
|
53
53
|
color: theme.vars.palette.text.primary,
|
|
@@ -65,8 +65,8 @@ const paperFormStyles = {
|
|
|
65
65
|
***********************************************************
|
|
66
66
|
* @author Andrés Quintero - automatic
|
|
67
67
|
* @createdAt 2024-11-20 14:00:24 - automatic
|
|
68
|
-
* @updatedAt
|
|
69
|
-
* @updatedUser
|
|
68
|
+
* @updatedAt 2025-01-08 10:46:48 - automatic
|
|
69
|
+
* @updatedUser cesar - automatic
|
|
70
70
|
*/
|
|
71
71
|
containerIcon: () => ({
|
|
72
72
|
display: "grid",
|
|
@@ -79,17 +79,18 @@ const paperFormStyles = {
|
|
|
79
79
|
***********************************************************
|
|
80
80
|
* @author Andrés Quintero - automatic
|
|
81
81
|
* @createdAt 2024-11-20 14:00:24 - automatic
|
|
82
|
-
* @updatedAt
|
|
83
|
-
* @updatedUser
|
|
82
|
+
* @updatedAt 2025-01-08 10:46:48 - automatic
|
|
83
|
+
* @updatedUser cesar - automatic
|
|
84
84
|
*/
|
|
85
85
|
containerContent: ({ theme, ownerState }) => ({
|
|
86
86
|
width: "100%",
|
|
87
87
|
height: "auto",
|
|
88
88
|
display: "flex",
|
|
89
|
-
flexDirection: "column",
|
|
90
|
-
alignItems: "center",
|
|
91
|
-
justifyContent: "center",
|
|
92
|
-
gap: ownerState.isForm ? theme.vars.size.baseSpacings.
|
|
89
|
+
flexDirection: ownerState.isForm ? "row" : "column",
|
|
90
|
+
alignItems: ownerState.isForm ? "flex-start" : "center",
|
|
91
|
+
justifyContent: ownerState.isForm ? "flex-start" : "center",
|
|
92
|
+
gap: ownerState.isForm ? theme.vars.size.baseSpacings.sp3 : theme.vars.size.baseSpacings.sp0,
|
|
93
|
+
flexWrap: ownerState.isForm ? "wrap" : "nowrap",
|
|
93
94
|
padding: theme.vars.size.baseSpacings.sp3,
|
|
94
95
|
background: theme.vars.palette.background.default
|
|
95
96
|
})
|
|
@@ -4,10 +4,11 @@ import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
|
4
4
|
import { PAPER_FORM_KEY } from './constants';
|
|
5
5
|
import { Theme } from '@mui/material/styles';
|
|
6
6
|
import { ComponentPalletColor, Sizes } from '@m4l/styles';
|
|
7
|
+
import { PropertyValueProps } from '../PropertyValue/types';
|
|
7
8
|
export interface PaperFormProps {
|
|
8
9
|
urlIcon?: string;
|
|
9
10
|
title: string;
|
|
10
|
-
children
|
|
11
|
+
children?: ReactNode | PropertyValueProps[];
|
|
11
12
|
variant?: 'standard';
|
|
12
13
|
color?: Extract<ComponentPalletColor, 'default'>;
|
|
13
14
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
@@ -21,10 +21,15 @@ export interface BaseProviderPrintSystem {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Direction: Propiedad para la dirección de contenidos
|
|
24
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
24
25
|
*/
|
|
25
26
|
type Direction = 'column' | 'row';
|
|
26
27
|
/**
|
|
27
28
|
* Align: Propiedades de alineación de contenidos
|
|
29
|
+
* @author Andrés Quintero - automatic
|
|
30
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
31
|
+
* @updatedAt 2025-01-08 10:36:40 - automatic
|
|
32
|
+
* @updatedUser Andrés Quintero - automatic
|
|
28
33
|
*/
|
|
29
34
|
type Align = 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
30
35
|
export interface NodeTypeCollection {
|
|
@@ -43,6 +48,7 @@ export interface NodeTypeCollection {
|
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
45
50
|
* BaseNode: Se encarga de contener las propiedades comunes entre la lista de componentes.
|
|
51
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
46
52
|
*/
|
|
47
53
|
export interface BaseNode {
|
|
48
54
|
key: string;
|
|
@@ -52,6 +58,8 @@ export interface BaseNode {
|
|
|
52
58
|
}
|
|
53
59
|
/**
|
|
54
60
|
* PaddingProperties: propiedades de espaciado interno.
|
|
61
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
62
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
55
63
|
*/
|
|
56
64
|
export interface PaddingProperties {
|
|
57
65
|
paddingTop?: number;
|
|
@@ -68,6 +76,7 @@ export interface SizeProperty {
|
|
|
68
76
|
}
|
|
69
77
|
/**
|
|
70
78
|
* RootNode: Componente que agrupa todas las posibles paginas
|
|
79
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
71
80
|
*/
|
|
72
81
|
export interface RootNode {
|
|
73
82
|
unitSizes: string;
|
|
@@ -78,6 +87,7 @@ export interface RootNode {
|
|
|
78
87
|
}
|
|
79
88
|
/**
|
|
80
89
|
* PageNode: Componente de página, es el primer componente que se carga en las estructuras NodeType y se encarga de definir el formato de tamaño
|
|
90
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
81
91
|
*/
|
|
82
92
|
export interface PageNode extends BaseNode, PaddingProperties, SizeProperty {
|
|
83
93
|
type: 'page';
|
|
@@ -85,6 +95,7 @@ export interface PageNode extends BaseNode, PaddingProperties, SizeProperty {
|
|
|
85
95
|
}
|
|
86
96
|
/**
|
|
87
97
|
* SectionNode: Componente para distrubir elementos de NodeType en fila.
|
|
98
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
88
99
|
*/
|
|
89
100
|
export interface SectionNode extends BaseNode, PaddingProperties, SizeProperty {
|
|
90
101
|
type: 'section';
|
|
@@ -96,6 +107,7 @@ export interface SectionNode extends BaseNode, PaddingProperties, SizeProperty {
|
|
|
96
107
|
}
|
|
97
108
|
/**
|
|
98
109
|
* TextBox: Componente para visualizar estructuras de texto.
|
|
110
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
99
111
|
*/
|
|
100
112
|
export interface TextBoxNode extends Omit<BaseNode, 'children'> {
|
|
101
113
|
type: 'textBox';
|
|
@@ -105,6 +117,7 @@ export interface TextBoxNode extends Omit<BaseNode, 'children'> {
|
|
|
105
117
|
}
|
|
106
118
|
/**
|
|
107
119
|
* ImageNode: Componente para visualizar imagenes.
|
|
120
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
108
121
|
*/
|
|
109
122
|
export interface ImageNode extends BaseNode {
|
|
110
123
|
type: 'image';
|
|
@@ -114,6 +127,7 @@ export interface ImageNode extends BaseNode {
|
|
|
114
127
|
}
|
|
115
128
|
/**
|
|
116
129
|
* QReNode: Componente para visualizar una imagen qr.
|
|
130
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
117
131
|
*/
|
|
118
132
|
export interface QRImageNode extends BaseNode {
|
|
119
133
|
type: 'qrImage';
|
|
@@ -123,24 +137,28 @@ export interface QRImageNode extends BaseNode {
|
|
|
123
137
|
}
|
|
124
138
|
/**
|
|
125
139
|
* HeaderNode: Componente para visualizar la cabecera del documento.
|
|
140
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
126
141
|
*/
|
|
127
142
|
export interface HeaderNode extends Omit<SectionNode, 'type'> {
|
|
128
143
|
type: 'header';
|
|
129
144
|
}
|
|
130
145
|
/**
|
|
131
146
|
* BodyNode: Componente para visualizar el cuerpo del documento.
|
|
147
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
132
148
|
*/
|
|
133
149
|
export interface BodyNode extends Omit<SectionNode, 'type'> {
|
|
134
150
|
type: 'body';
|
|
135
151
|
}
|
|
136
152
|
/**
|
|
137
153
|
* FooterNode: Componente para visualizar el pie de página del documento.
|
|
154
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
138
155
|
*/
|
|
139
156
|
export interface FooterNode extends Omit<SectionNode, 'type'> {
|
|
140
157
|
type: 'footer';
|
|
141
158
|
}
|
|
142
159
|
/**
|
|
143
160
|
* PaperNode: Componente que contiene una lista de campos de valor.
|
|
161
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
144
162
|
*/
|
|
145
163
|
export interface PaperNode extends BaseNode {
|
|
146
164
|
type: 'paper';
|
|
@@ -149,6 +167,8 @@ export interface PaperNode extends BaseNode {
|
|
|
149
167
|
}
|
|
150
168
|
/**
|
|
151
169
|
* PropertyValue: Componente que organiza un campo con una etiqueta y valor.
|
|
170
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
171
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
152
172
|
*/
|
|
153
173
|
export interface PagerNode extends BaseNode {
|
|
154
174
|
type: 'pager';
|
|
@@ -166,6 +186,7 @@ export interface PropertyValue extends Omit<BaseNode, 'children'> {
|
|
|
166
186
|
export type NodePrintPropertyValue = SectionNode | TextBoxNode | ImageNode | FooterNode | PaperNode | DividerNode | GridNode | ChartNode | PagerNode | QRImageNode;
|
|
167
187
|
/**
|
|
168
188
|
* DividerNode: Componente que aporta una división gráfica.
|
|
189
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
169
190
|
*/
|
|
170
191
|
export interface DividerNode extends Omit<BaseNode, 'children'> {
|
|
171
192
|
type: 'divider';
|
|
@@ -182,6 +203,7 @@ export interface Columns {
|
|
|
182
203
|
}
|
|
183
204
|
/**
|
|
184
205
|
* GridNode: Componente dibuja una tabla de información con n canditad de registros y columnas.
|
|
206
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
185
207
|
*/
|
|
186
208
|
export interface GridNode extends Omit<BaseNode, 'children'> {
|
|
187
209
|
type: 'grid';
|
|
@@ -191,6 +213,7 @@ export interface GridNode extends Omit<BaseNode, 'children'> {
|
|
|
191
213
|
}
|
|
192
214
|
/**
|
|
193
215
|
* ChartNode: Componente dibuja una grafica de información.
|
|
216
|
+
* @createdAt 2025-01-08 10:36:40 - automatic
|
|
194
217
|
*/
|
|
195
218
|
export interface UncertaintyType {
|
|
196
219
|
x: number;
|
|
@@ -3,7 +3,7 @@ import { PropertyValueProps } from './types';
|
|
|
3
3
|
* PropertyValue component is used to display a property and its value in a form or not.
|
|
4
4
|
* @author cesar - automatic
|
|
5
5
|
* @createdAt 2024-12-19 14:44:17 - automatic
|
|
6
|
-
* @updatedAt
|
|
6
|
+
* @updatedAt 2025-01-08 11:15:49 - automatic
|
|
7
7
|
* @updatedUser cesar - automatic
|
|
8
8
|
*/
|
|
9
9
|
export declare function PropertyValue(props: PropertyValueProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,7 +5,9 @@ import { T as TEST_PROPS_DATA, P as PROPERTY_VALUE_KEY_COMPONENT, C as COMPONENT
|
|
|
5
5
|
import { a as getPropDataTestId, g as getNameDataTestId } from "../../test/getNameDataTestId.js";
|
|
6
6
|
import { P as PropertyValueRootStyled, a as PropertyStyled, V as ValueStyled } from "./slots/PropertyValueSlots.js";
|
|
7
7
|
import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
|
|
8
|
+
import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
|
|
8
9
|
import { L as Label } from "../Label/Label.js";
|
|
10
|
+
import { T as TextField } from "../mui_extended/TextField/TextField.js";
|
|
9
11
|
import { T as Typography } from "../mui_extended/Typography/Typography.js";
|
|
10
12
|
import { I as Icon } from "../Icon/Icon.js";
|
|
11
13
|
function PropertyValue(props) {
|
|
@@ -20,8 +22,11 @@ function PropertyValue(props) {
|
|
|
20
22
|
mandatory,
|
|
21
23
|
mandatoryMessage,
|
|
22
24
|
helperMessage,
|
|
23
|
-
semanticWidth = "fullWidth"
|
|
25
|
+
semanticWidth = "fullWidth",
|
|
26
|
+
size = "medium"
|
|
24
27
|
} = props;
|
|
28
|
+
const { currentSize } = useComponentSize(size);
|
|
29
|
+
const normalizedSize = currentSize === "large" ? "medium" : currentSize;
|
|
25
30
|
const ownerState = {
|
|
26
31
|
disabled: isForm && disabled ? disabled : false,
|
|
27
32
|
isForm: isForm ? true : false,
|
|
@@ -42,8 +47,23 @@ function PropertyValue(props) {
|
|
|
42
47
|
return startAdornment;
|
|
43
48
|
};
|
|
44
49
|
const renderValue = () => {
|
|
50
|
+
if (isForm) {
|
|
51
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
TextField,
|
|
54
|
+
{
|
|
55
|
+
size: normalizedSize,
|
|
56
|
+
defaultValue: value,
|
|
57
|
+
disabled,
|
|
58
|
+
helperText: helperMessage,
|
|
59
|
+
fullWidth: true
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
45
65
|
if (typeof value === "string") {
|
|
46
|
-
return /* @__PURE__ */ jsx(Typography, { variant: "bodyDens", children: value });
|
|
66
|
+
return /* @__PURE__ */ jsx(Typography, { size: normalizedSize, variant: "bodyDens", children: value });
|
|
47
67
|
}
|
|
48
68
|
return value;
|
|
49
69
|
};
|
|
@@ -64,6 +84,7 @@ function PropertyValue(props) {
|
|
|
64
84
|
/* @__PURE__ */ jsx(
|
|
65
85
|
Label,
|
|
66
86
|
{
|
|
87
|
+
size: normalizedSize,
|
|
67
88
|
label: property,
|
|
68
89
|
mandatory,
|
|
69
90
|
mandatoryMessage,
|
|
@@ -71,14 +92,7 @@ function PropertyValue(props) {
|
|
|
71
92
|
}
|
|
72
93
|
)
|
|
73
94
|
] }),
|
|
74
|
-
/* @__PURE__ */ jsx(
|
|
75
|
-
ValueStyled,
|
|
76
|
-
{
|
|
77
|
-
role: "property-value-value-role",
|
|
78
|
-
ownerState,
|
|
79
|
-
children: renderValue()
|
|
80
|
-
}
|
|
81
|
-
)
|
|
95
|
+
/* @__PURE__ */ jsx(ValueStyled, { role: "property-value-value-role", ownerState, children: renderValue() })
|
|
82
96
|
]
|
|
83
97
|
}
|
|
84
98
|
);
|
|
@@ -4,8 +4,8 @@ const propertyValueStyles = {
|
|
|
4
4
|
* Property Value Root Styles
|
|
5
5
|
* @author cesar - automatic
|
|
6
6
|
* @createdAt 2024-12-19 14:44:17 - automatic
|
|
7
|
-
* @updatedAt 2025-01-
|
|
8
|
-
* @updatedUser
|
|
7
|
+
* @updatedAt 2025-01-08 10:36:40 - automatic
|
|
8
|
+
* @updatedUser Andrés Quintero - automatic
|
|
9
9
|
*/
|
|
10
10
|
Root: ({ theme, ownerState }) => {
|
|
11
11
|
const createSemanticStyle = (minWidth, maxWidth) => ({
|
|
@@ -67,8 +67,8 @@ const propertyValueStyles = {
|
|
|
67
67
|
* Property Styles
|
|
68
68
|
* @author cesar - automatic
|
|
69
69
|
* @createdAt 2024-12-26 11:44:46 - automatic
|
|
70
|
-
* @updatedAt 2025-01-
|
|
71
|
-
* @updatedUser
|
|
70
|
+
* @updatedAt 2025-01-08 10:36:40 - automatic
|
|
71
|
+
* @updatedUser Andrés Quintero - automatic
|
|
72
72
|
*/
|
|
73
73
|
property: ({ theme, ownerState }) => ({
|
|
74
74
|
display: "flex",
|
|
@@ -82,8 +82,8 @@ const propertyValueStyles = {
|
|
|
82
82
|
* Value Styles (Form and No Form Combined)
|
|
83
83
|
* @author cesar - automatic
|
|
84
84
|
* @createdAt 2024-12-26 11:44:46 - automatic
|
|
85
|
-
* @updatedAt 2025-01-
|
|
86
|
-
* @updatedUser
|
|
85
|
+
* @updatedAt 2025-01-08 10:36:40 - automatic
|
|
86
|
+
* @updatedUser Andrés Quintero - automatic
|
|
87
87
|
*/
|
|
88
88
|
value: ({ theme, ownerState }) => ({
|
|
89
89
|
width: "100%",
|
|
@@ -4,6 +4,7 @@ import { PROPERTY_VALUE_KEY_COMPONENT } from './constants';
|
|
|
4
4
|
import { Theme } from '@mui/material';
|
|
5
5
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
6
6
|
import { PropertyValueSlots } from './slots/PropertyValueEnum';
|
|
7
|
+
import { Sizes } from '@m4l/styles';
|
|
7
8
|
/**
|
|
8
9
|
* Tipos de valores posibles para los componentes dentro de `PropertyValue`.
|
|
9
10
|
*/
|
|
@@ -77,6 +78,10 @@ export interface PropertyValueProps extends PropertyProps, ValueProps, Omit<Labe
|
|
|
77
78
|
* Define el ancho semántico del componente según el contenido.
|
|
78
79
|
*/
|
|
79
80
|
semanticWidth?: SemanticWidthOptions;
|
|
81
|
+
/**
|
|
82
|
+
* Propiedad de tamaño para el componente `PropertyValue`.
|
|
83
|
+
*/
|
|
84
|
+
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
80
85
|
}
|
|
81
86
|
/**
|
|
82
87
|
* Estado del propietario para el componente `PropertyValue`, utilizado para personalizar estilos y comportamientos.
|
|
@@ -9,7 +9,7 @@ import { SideBarProps } from './types';
|
|
|
9
9
|
* - **`useFirstRender:`** Hook que devuelve un valor booleano indicando si el componente se está renderizando por primera vez.
|
|
10
10
|
* @author Andrés Quintero - automatic
|
|
11
11
|
* @createdAt 2024-12-23 07:24:16 - automatic
|
|
12
|
-
* @updatedAt
|
|
12
|
+
* @updatedAt 2025-01-03 11:04:54 - automatic
|
|
13
13
|
* @updatedUser Andrés Quintero - automatic
|
|
14
14
|
*/
|
|
15
15
|
export declare const SideBar: import('react').MemoExoticComponent<(props: SideBarProps) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Contiene el header, body y footer
|
|
4
4
|
* @author Andrés Quintero - automatic
|
|
5
5
|
* @createdAt 2024-11-15 21:43:42 - automatic
|
|
6
|
-
* @updatedAt
|
|
6
|
+
* @updatedAt 2025-01-03 11:42:14 - automatic
|
|
7
7
|
* @updatedUser Andrés Quintero - automatic
|
|
8
8
|
*/
|
|
9
9
|
declare const ContentComponent: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,7 @@ import { ContentGroupsProps } from './types';
|
|
|
3
3
|
* Renderiza el contenido de los grupos
|
|
4
4
|
* @author Andrés Quintero - automatic
|
|
5
5
|
* @createdAt 2024-11-05 17:43:01 - automatic
|
|
6
|
+
* @updatedAt 2025-01-03 11:42:14 - automatic
|
|
7
|
+
* @updatedUser Andrés Quintero - automatic
|
|
6
8
|
*/
|
|
7
9
|
export declare const ContentGroups: (contentGroupsProps: ContentGroupsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,7 +5,7 @@ const containerMenuItemsMainStyles = {
|
|
|
5
5
|
* Style aplicado al contenedor de los items del menú
|
|
6
6
|
* @author Andrés Quintero - automatic
|
|
7
7
|
* @createdAt 2024-11-19 20:54:12 - automatic
|
|
8
|
-
* @updatedAt
|
|
8
|
+
* @updatedAt 2025-01-08 10:36:41 - automatic
|
|
9
9
|
* @updatedUser Andrés Quintero - automatic
|
|
10
10
|
*/
|
|
11
11
|
containerMenuItems: ({ theme, ownerState }) => ({
|
|
@@ -49,7 +49,7 @@ const containerMenuItemsMainStyles = {
|
|
|
49
49
|
*Style para el contenedor del icono de flecha que indica si el item está colapsado o descolapsado para los items padres
|
|
50
50
|
* @author Andrés Quintero - automatic
|
|
51
51
|
* @createdAt 2024-11-19 20:54:12 - automatic
|
|
52
|
-
* @updatedAt
|
|
52
|
+
* @updatedAt 2025-01-08 10:36:41 - automatic
|
|
53
53
|
* @updatedUser Andrés Quintero - automatic
|
|
54
54
|
*/
|
|
55
55
|
containerArrowIconRoot: () => ({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Renderiza el contenido que debe de tener los dispositipos desktop
|
|
3
3
|
* @author Andrés Quintero - automatic
|
|
4
4
|
* @createdAt 2024-11-05 18:16:45 - automatic
|
|
5
|
-
* @updatedAt
|
|
5
|
+
* @updatedAt 2025-01-03 11:04:54 - automatic
|
|
6
6
|
* @updatedUser Andrés Quintero - automatic
|
|
7
7
|
*/
|
|
8
8
|
export declare const SideBarDesktop: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|