@m4l/components 9.1.5 → 9.1.6
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 +27 -3
- package/components/CommonActions/components/ActionCancel/ActionCancel.d.ts +11 -0
- package/components/CommonActions/components/ActionCancel/ActionCancel.js +52 -0
- package/components/CommonActions/components/ActionCancel/ActionCancel.test.d.ts +1 -0
- package/components/CommonActions/components/ActionCancel/ActionCancelStyles.d.ts +2 -0
- package/components/CommonActions/components/ActionCancel/ActionCancelStyles.js +6 -0
- package/components/CommonActions/components/ActionCancel/constants.d.ts +8 -0
- package/components/CommonActions/components/ActionCancel/constants.js +4 -0
- package/components/CommonActions/components/ActionCancel/index.d.ts +2 -5
- package/components/CommonActions/components/ActionCancel/index.js +1 -12
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelEnum.d.ts +3 -0
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelEnum.js +7 -0
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +4 -0
- package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.js +12 -0
- package/components/CommonActions/components/ActionCancel/slots/index.d.ts +2 -0
- package/components/CommonActions/components/ActionCancel/slots/index.js +1 -0
- package/components/CommonActions/components/ActionCancel/types.d.ts +33 -0
- package/components/CommonActions/components/ActionCancel/types.js +1 -0
- package/components/CommonActions/components/ActionFormCancel/index.d.ts +4 -0
- package/components/CommonActions/components/ActionFormCancel/index.js +2 -2
- package/components/CommonActions/components/ActionIntro/ActionIntro.d.ts +12 -0
- package/components/CommonActions/components/ActionIntro/ActionIntro.integration.test.d.ts +1 -0
- package/components/CommonActions/components/ActionIntro/ActionIntro.js +51 -0
- package/components/CommonActions/components/ActionIntro/ActionIntro.test.d.ts +1 -0
- package/components/CommonActions/components/ActionIntro/ActionIntroStyles.d.ts +2 -0
- package/components/CommonActions/components/ActionIntro/ActionIntroStyles.js +6 -0
- package/components/CommonActions/components/ActionIntro/constants.d.ts +8 -0
- package/components/CommonActions/components/ActionIntro/constants.js +4 -0
- package/components/CommonActions/components/ActionIntro/index.d.ts +2 -5
- package/components/CommonActions/components/ActionIntro/index.js +1 -25
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroEnum.d.ts +3 -0
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroEnum.js +7 -0
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +4 -0
- package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.js +12 -0
- package/components/CommonActions/components/ActionIntro/slots/index.d.ts +2 -0
- package/components/CommonActions/components/ActionIntro/slots/index.js +1 -0
- package/components/CommonActions/components/ActionIntro/types.d.ts +33 -0
- package/components/CommonActions/components/ActionIntro/types.js +1 -0
- package/components/CommonActions/components/ActionsContainer/index.d.ts +2 -0
- package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.d.ts +2 -2
- package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js +2 -2
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.d.ts +4 -0
- package/components/DynamicFilter/subcomponents/PopoverFilter/PopoverFilter.js +2 -2
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +1 -1
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.d.ts +4 -0
- package/components/Icon/types.d.ts +1 -1
- package/components/LoadingError/LoadingError.d.ts +5 -0
- package/components/LoadingError/LoadingError.js +7 -1
- package/components/PDFViewer/PDFViewer.d.ts +4 -0
- package/components/PDFViewer/PDFViewer.js +1 -1
- package/components/ToastContainer/ToastContainer.stories.d.ts +4 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index.d.ts +43 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index.js +4 -5
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/index.d.ts +4 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/index.js +6 -8
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +27 -3
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.js +4 -5
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.d.ts +4 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.js +7 -6
- package/components/hook-form/RHFColorPicker/RFHColorPicker.d.ts +4 -0
- package/components/hook-form/RHFColorPicker/RFHColorPicker.js +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/index.d.ts +2 -2
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/index.js +1 -1
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MyActions/index.d.ts +2 -2
- package/components/maps/components/Map/subcomponents/Controls/subcomponents/TopRigthTools/subcomponents/MeasureTool/subcomponents/MyActions/index.js +7 -1
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.d.ts +2 -2
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofenceAddEdit/subcomponents/MyActions/index.js +1 -1
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.d.ts +2 -2
- package/components/maps/components/MapGpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/index.js +1 -1
- package/components/modal/WindowConfirm/index.d.ts +3 -3
- package/components/modal/WindowConfirm/index.js +2 -2
- package/components/mui_extended/Button/Button.d.ts +8 -6
- package/components/mui_extended/Button/Button.integration.test.d.ts +1 -0
- package/components/mui_extended/Button/Button.js +70 -34
- package/components/mui_extended/Button/Button.test.d.ts +1 -0
- package/components/mui_extended/Button/ButtonStyles.d.ts +2 -0
- package/components/mui_extended/Button/ButtonStyles.js +223 -0
- package/components/mui_extended/Button/classes/index.d.ts +5 -2
- package/components/mui_extended/Button/classes/index.js +5 -29
- package/components/mui_extended/Button/classes/types.d.ts +10 -0
- package/components/mui_extended/Button/constans.d.ts +8 -0
- package/components/mui_extended/Button/constans.js +4 -0
- package/components/mui_extended/Button/slots/ButtonEnum.d.ts +6 -0
- package/components/mui_extended/Button/slots/ButtonEnum.js +10 -0
- package/components/mui_extended/Button/slots/ButtonSlots.d.ts +15 -0
- package/components/mui_extended/Button/slots/ButtonSlots.js +30 -0
- package/components/mui_extended/Button/slots/index.d.ts +3 -0
- package/components/mui_extended/Button/slots/index.js +1 -0
- package/components/mui_extended/Button/types.d.ts +45 -8
- package/components/mui_extended/ToggleButton/ToggleButton.js +1 -1
- package/components/mui_extended/Typography/types.d.ts +5 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/storybook/components/commonActions/components/ActionCancel/ActionCancel.stories.d.ts +22 -0
- package/storybook/components/commonActions/components/ActionIntro/ActionIntro.stories.d.ts +22 -0
- package/storybook/components/extended/mui/Button/Button.stories.d.ts +26 -0
- package/components/CommonActions/components/ActionIntro/test/contants.js +0 -4
- package/components/mui_extended/Button/styles.d.ts +0 -4
- package/components/mui_extended/Button/styles.js +0 -12
- /package/components/{mui_extended/Button/index.test.d.ts → CommonActions/components/ActionCancel/ActionCancel.integration.test.d.ts} +0 -0
|
@@ -8,7 +8,7 @@ import { TooltipProps } from '../mui_extended';
|
|
|
8
8
|
/**
|
|
9
9
|
* Define la lista de posibles colores que se pueden aplicar al componente icono.
|
|
10
10
|
*/
|
|
11
|
-
export type IconColors = 'primary.main' | 'text.primary' | 'primary.contrastText' | 'info.main' | 'success.main' | 'error.main' | 'warning.main';
|
|
11
|
+
export type IconColors = 'primary.main' | 'text.primary' | 'primary.contrastText' | 'info.main' | 'success.main' | 'error.main' | 'warning.main' | string;
|
|
12
12
|
export interface IconProps extends Pick<TooltipProps, 'placement'> {
|
|
13
13
|
/**
|
|
14
14
|
* URL o ruta de la imagen que se va a mostrar.
|
|
@@ -10,8 +10,13 @@ import { AreasLoadingErrorProps } from './types';
|
|
|
10
10
|
* @param {string} props.introMessage - Es una cadena de texto que proporciona un mensaje introductorio adicional. Este mensaje se mostrará en el componente antes de mostrar el título, la descripción y la recomendación del error.
|
|
11
11
|
* @param {string} props.errorIcon - Es una cadena de texto que representa la ruta o el identificador del ícono que se mostrará junto al mensaje de error.
|
|
12
12
|
* @returns {JSX.Element} Elemento JSX que representa el componente.
|
|
13
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
13
14
|
*/
|
|
14
15
|
/**
|
|
15
16
|
* TODO: Documentar
|
|
17
|
+
* @author SebastianM - automatic
|
|
18
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
19
|
+
* @updatedAt 2024-11-06 09:00:05 - automatic
|
|
20
|
+
* @updatedUser SebastianM - automatic
|
|
16
21
|
*/
|
|
17
22
|
export declare const LoadingError: (props: AreasLoadingErrorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -42,7 +42,13 @@ const LoadingError = (props) => {
|
|
|
42
42
|
children: recommendation ? recommendation : getLabel("loading_error.label_error_recommendation")
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
/* @__PURE__ */ jsx(
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
Button,
|
|
47
|
+
{
|
|
48
|
+
onClick: action,
|
|
49
|
+
label: introMessage ? introMessage : getLabel("loading_error.label_error_intro")
|
|
50
|
+
}
|
|
51
|
+
)
|
|
46
52
|
] }) });
|
|
47
53
|
};
|
|
48
54
|
export {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { PDFViewerPros } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* TODO: Documentar
|
|
4
|
+
* @author SebastianM - automatic
|
|
5
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
6
|
+
* @updatedAt 2024-11-06 09:00:05 - automatic
|
|
7
|
+
* @updatedUser SebastianM - automatic
|
|
4
8
|
*/
|
|
5
9
|
export declare const PDFViewer: (props: PDFViewerPros) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,7 +22,7 @@ const PDFViewer = (props) => {
|
|
|
22
22
|
const classes = pdfviewerUtilityClasses();
|
|
23
23
|
return /* @__PURE__ */ jsxs(PDFVeiwerRoot, { className: classes.root, children: [
|
|
24
24
|
/* @__PURE__ */ jsx("embed", { src: pdfUrl, type: "application/pdf", width: "100%", height: "100%" }),
|
|
25
|
-
/* @__PURE__ */ jsx(Button, { onClick: handleDownload, variant: "contained",
|
|
25
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleDownload, variant: "contained", label: "Descargar PDF" })
|
|
26
26
|
] });
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
@@ -37,6 +37,10 @@ import { ToastContainer } from './ToastContainer';
|
|
|
37
37
|
* }
|
|
38
38
|
*
|
|
39
39
|
* ```
|
|
40
|
+
* @author SebastianM - automatic
|
|
41
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
42
|
+
* @updatedAt 2024-11-06 09:00:05 - automatic
|
|
43
|
+
* @updatedUser SebastianM - automatic
|
|
40
44
|
*/
|
|
41
45
|
declare const meta: Meta<typeof ToastContainer>;
|
|
42
46
|
export default meta;
|
|
@@ -1,13 +1,55 @@
|
|
|
1
1
|
import { AreaChipProps } from './types';
|
|
2
2
|
/**
|
|
3
|
+
* <<<<<<< HEAD
|
|
3
4
|
* Componente de chip de área.
|
|
5
|
+
* <<<<<<< HEAD
|
|
4
6
|
* @createdAt 2024-11-01 12:34:48 - automatic
|
|
7
|
+
* =======
|
|
8
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
9
|
+
* >>>>>>> 2cb88276 (refactor(PGK-552): refactor button)
|
|
10
|
+
* =======
|
|
11
|
+
* AreaChip component for rendering a chip with area details.
|
|
12
|
+
*
|
|
13
|
+
* Props:
|
|
14
|
+
* - areaId: string - The ID of the area.
|
|
15
|
+
* - selected: boolean - Indicates if the chip is selected.
|
|
16
|
+
* - disabled: boolean - Indicates if the chip is disabled.
|
|
17
|
+
* - setAnchorMenuAreas: (element: HTMLElement) => void - Function to set the anchor element for the menu.
|
|
18
|
+
*
|
|
19
|
+
* Constants:
|
|
20
|
+
* - host_static_assets: string - The host for static assets.
|
|
21
|
+
* - environment_assets: string - The environment-specific assets.
|
|
22
|
+
* - deleteArea: (areaId: string) => void - Function to delete an area.
|
|
23
|
+
* - selectArea: (areaId: string) => void - Function to select an area.
|
|
24
|
+
* - editArea: (areaId: string, data: any) => void - Function to edit an area.
|
|
25
|
+
* - setFocus: (focus: boolean) => void - Function to set focus.
|
|
26
|
+
* - areaName: string - The name of the area.
|
|
27
|
+
* - listAreas: string[] - List of area IDs.
|
|
28
|
+
* - open: boolean - State to control the open/close state of the popover.
|
|
29
|
+
* - getLabel: (key: string) => string - Function to get a label from the dictionary.
|
|
30
|
+
* - isDesktop: boolean - Indicates if the current view is desktop.
|
|
31
|
+
* - anchorRef: React.RefObject<null> - Reference to the anchor element.
|
|
32
|
+
* - theme: Theme - The current theme.
|
|
33
|
+
* - initialValues: { inputEditArea: string } - Initial values for the form.
|
|
34
|
+
* - validationSchema: Yup.ObjectSchema - Validation schema for the form.
|
|
35
|
+
* - rippleRef: React.RefObject<any> - Reference to the ripple effect.
|
|
36
|
+
* @createdAt 2024-11-06 11:07:59 - automatic
|
|
37
|
+
* >>>>>>> 32caab70 (refactor(PGK-552): resolve TODO documentar and styles to slots)
|
|
5
38
|
*/
|
|
6
39
|
/**
|
|
7
|
-
*
|
|
40
|
+
* Propiedades del componente de chip de área.
|
|
8
41
|
* @author SebastianM - automatic
|
|
42
|
+
* <<<<<<< HEAD
|
|
43
|
+
* <<<<<<< HEAD
|
|
9
44
|
* @createdAt 2024-11-01 12:34:48 - automatic
|
|
10
45
|
* @updatedAt 2024-11-01 12:34:49 - automatic
|
|
46
|
+
* =======
|
|
47
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
48
|
+
* @updatedAt 2024-11-06 10:39:53 - automatic
|
|
49
|
+
* =======
|
|
50
|
+
* @createdAt 2024-11-06 11:07:59 - automatic
|
|
51
|
+
* @updatedAt 2024-11-06 11:07:59 - automatic
|
|
52
|
+
* >>>>>>> 32caab70 (refactor(PGK-552): resolve TODO documentar and styles to slots)
|
|
11
53
|
* @updatedUser SebastianM - automatic
|
|
12
54
|
*/
|
|
13
55
|
export declare const AreaChip: {
|
|
@@ -17,9 +17,9 @@ import { R as RHFormProvider } from "../../../../../hook-form/RHFormContext/inde
|
|
|
17
17
|
import { T as Typography } from "../../../../../mui_extended/Typography/Typography.js";
|
|
18
18
|
import { R as RHFTextField } from "../../../../../hook-form/RHFTextField/RHFTextField.js";
|
|
19
19
|
import { A as ActionsContainer } from "../../../../../CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
20
|
-
import { A as ActionCancel } from "../../../../../CommonActions/components/ActionCancel/index.js";
|
|
21
|
-
import { A as ActionIntro } from "../../../../../CommonActions/components/ActionIntro/index.js";
|
|
22
20
|
import { P as Popover } from "../../../../../mui_extended/Popover/Popover.js";
|
|
21
|
+
import { A as ActionCancel } from "../../../../../CommonActions/components/ActionCancel/ActionCancel.js";
|
|
22
|
+
import { A as ActionIntro } from "../../../../../CommonActions/components/ActionIntro/ActionIntro.js";
|
|
23
23
|
const AreaChip = (props) => {
|
|
24
24
|
const { areaId, selected, disabled, setAnchorMenuAreas } = props;
|
|
25
25
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
@@ -190,11 +190,10 @@ const AreaChip = (props) => {
|
|
|
190
190
|
setOpen(false);
|
|
191
191
|
setFocus(false);
|
|
192
192
|
},
|
|
193
|
-
variant: "outlined"
|
|
194
|
-
skeletonWidth: "100%"
|
|
193
|
+
variant: "outlined"
|
|
195
194
|
}
|
|
196
195
|
),
|
|
197
|
-
/* @__PURE__ */ jsx(ActionIntro, {
|
|
196
|
+
/* @__PURE__ */ jsx(ActionIntro, {})
|
|
198
197
|
] })
|
|
199
198
|
]
|
|
200
199
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TODO: Documentar
|
|
3
|
+
* @author SebastianM - automatic
|
|
4
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
5
|
+
* @updatedAt 2024-11-06 17:18:27 - automatic
|
|
6
|
+
* @updatedUser SebastianM - automatic
|
|
3
7
|
*/
|
|
4
8
|
export declare const AreaChipMobile: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,6 @@ import { useTheme } from "@mui/material";
|
|
|
10
10
|
import { C as ChipMobile } from "./subcomponents/ChipMobile/ChipMobile.js";
|
|
11
11
|
import { M as MenuActions } from "../../../../../mui_extended/MenuActions/MenuActions.js";
|
|
12
12
|
import { B as Button } from "../../../../../mui_extended/Button/Button.js";
|
|
13
|
-
import { I as Icon } from "../../../../../Icon/Icon.js";
|
|
14
13
|
const AreaChipMobile = () => {
|
|
15
14
|
const areas = useAreasStore(
|
|
16
15
|
(state) => state.areasIds.map((a) => ({ id: a, name: state.hashAreas[a].name })),
|
|
@@ -31,6 +30,10 @@ const AreaChipMobile = () => {
|
|
|
31
30
|
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.LAYERS}`,
|
|
32
31
|
/**
|
|
33
32
|
* OnClick
|
|
33
|
+
* @author SebastianM - automatic
|
|
34
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
35
|
+
* @updatedAt 2024-11-06 17:18:27 - automatic
|
|
36
|
+
* @updatedUser SebastianM - automatic
|
|
34
37
|
*/
|
|
35
38
|
onClick: () => {
|
|
36
39
|
selectArea(area.id);
|
|
@@ -79,13 +82,8 @@ const AreaChipMobile = () => {
|
|
|
79
82
|
setAnchorMenuAreas(null);
|
|
80
83
|
},
|
|
81
84
|
variant: "outlined",
|
|
82
|
-
startIcon:
|
|
83
|
-
|
|
84
|
-
{
|
|
85
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
children: getLabel(getAreasDictionary(AREAS_DICCTIONARY.area_add_new))
|
|
85
|
+
startIcon: `${host_static_assets}/${environment_assets}/frontend/components/areas/assets/icons/${ICONS.ADD_AREA}`,
|
|
86
|
+
label: getLabel(getAreasDictionary(AREAS_DICCTIONARY.area_add_new))
|
|
89
87
|
}
|
|
90
88
|
)
|
|
91
89
|
}
|
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
import { AreaChipProps } from '../../../AreaChip/types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* ChipMobile component for rendering a mobile-friendly chip with area details.
|
|
4
|
+
*
|
|
5
|
+
* Props:
|
|
6
|
+
* - areaId: string - The ID of the area.
|
|
7
|
+
* - selected: boolean - Indicates if the chip is selected.
|
|
8
|
+
* - disabled: boolean - Indicates if the chip is disabled.
|
|
9
|
+
* - setAnchorMenuAreas: (element: HTMLElement) => void - Function to set the anchor element for the menu.
|
|
10
|
+
*
|
|
11
|
+
* Constants:
|
|
12
|
+
* - host_static_assets: string - The host for static assets.
|
|
13
|
+
* - environment_assets: string - The environment-specific assets.
|
|
14
|
+
* - deleteArea: (areaId: string) => void - Function to delete an area.
|
|
15
|
+
* - selectArea: (areaId: string) => void - Function to select an area.
|
|
16
|
+
* - editArea: (areaId: string, data: any) => void - Function to edit an area.
|
|
17
|
+
* - setFocus: (focus: boolean) => void - Function to set focus.
|
|
18
|
+
* - areaName: string - The name of the area.
|
|
19
|
+
* - listAreas: string[] - List of area IDs.
|
|
20
|
+
* - open: boolean - State to control the open/close state of the popover.
|
|
21
|
+
* - getLabel: (key: string) => string - Function to get a label from the dictionary.
|
|
22
|
+
* - isDesktop: boolean - Indicates if the current view is desktop.
|
|
23
|
+
* - anchorRef: React.RefObject<null> - Reference to the anchor element.
|
|
24
|
+
* - theme: Theme - The current theme.
|
|
25
|
+
* - initialValues: { inputEditArea: string } - Initial values for the form.
|
|
26
|
+
* - validationSchema: Yup.ObjectSchema - Validation schema for the form.
|
|
27
|
+
* - rippleRef: React.RefObject<any> - Reference to the ripple effect.
|
|
4
28
|
* @author SebastianM - automatic
|
|
5
|
-
* @createdAt 2024-11-
|
|
6
|
-
* @updatedAt 2024-11-
|
|
29
|
+
* @createdAt 2024-11-06 11:07:59 - automatic
|
|
30
|
+
* @updatedAt 2024-11-06 11:07:59 - automatic
|
|
7
31
|
* @updatedUser SebastianM - automatic
|
|
8
32
|
*/
|
|
9
33
|
export declare const ChipMobile: {
|
|
@@ -17,10 +17,10 @@ import { I as IconButton } from "../../../../../../../mui_extended/IconButton/Ic
|
|
|
17
17
|
import { R as RHFormProvider } from "../../../../../../../hook-form/RHFormContext/index.js";
|
|
18
18
|
import { T as Typography } from "../../../../../../../mui_extended/Typography/Typography.js";
|
|
19
19
|
import { A as ActionsContainer } from "../../../../../../../CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
20
|
-
import { A as ActionCancel } from "../../../../../../../CommonActions/components/ActionCancel/index.js";
|
|
21
|
-
import { A as ActionIntro } from "../../../../../../../CommonActions/components/ActionIntro/index.js";
|
|
22
20
|
import { P as Popover } from "../../../../../../../mui_extended/Popover/Popover.js";
|
|
23
21
|
import { R as RHFTextField } from "../../../../../../../hook-form/RHFTextField/RHFTextField.js";
|
|
22
|
+
import { A as ActionCancel } from "../../../../../../../CommonActions/components/ActionCancel/ActionCancel.js";
|
|
23
|
+
import { A as ActionIntro } from "../../../../../../../CommonActions/components/ActionIntro/ActionIntro.js";
|
|
24
24
|
const ChipMobile = (props) => {
|
|
25
25
|
const { areaId, selected, disabled, setAnchorMenuAreas } = props;
|
|
26
26
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
@@ -190,11 +190,10 @@ const ChipMobile = (props) => {
|
|
|
190
190
|
setOpen(false);
|
|
191
191
|
setFocus(false);
|
|
192
192
|
},
|
|
193
|
-
variant: "outlined"
|
|
194
|
-
skeletonWidth: "100%"
|
|
193
|
+
variant: "outlined"
|
|
195
194
|
}
|
|
196
195
|
),
|
|
197
|
-
/* @__PURE__ */ jsx(ActionIntro, {
|
|
196
|
+
/* @__PURE__ */ jsx(ActionIntro, {})
|
|
198
197
|
] })
|
|
199
198
|
]
|
|
200
199
|
}
|
|
@@ -5,5 +5,9 @@ import { NavItemRootProps } from './types';
|
|
|
5
5
|
* @param {TopBarMenuDataType} props.itemRootData - Array de tipo TopBarMenuDataType
|
|
6
6
|
* @returns Boton con o sin accordion
|
|
7
7
|
* @example <NavItemRoot key={group.id} itemRootData={group} />
|
|
8
|
+
* @author SebastianM - automatic
|
|
9
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
10
|
+
* @updatedAt 2024-11-06 17:18:27 - automatic
|
|
11
|
+
* @updatedUser SebastianM - automatic
|
|
8
12
|
*/
|
|
9
13
|
export declare const NavItemRoot: (props: NavItemRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -36,7 +36,7 @@ const NavItemRoot = (props) => {
|
|
|
36
36
|
item.path === window.location.pathname ? TopBarClasses.IsActive : null
|
|
37
37
|
),
|
|
38
38
|
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId(componentName, "ItemSelect", dataTestId) } : {},
|
|
39
|
-
children: /* @__PURE__ */ jsx(Button, { variant: "text", href: item.path, fullWidth: true,
|
|
39
|
+
children: /* @__PURE__ */ jsx(Button, { variant: "text", href: item.path, fullWidth: true, label: item.title })
|
|
40
40
|
}
|
|
41
41
|
) }, index));
|
|
42
42
|
};
|
|
@@ -77,14 +77,15 @@ const NavItemRoot = (props) => {
|
|
|
77
77
|
)
|
|
78
78
|
} : {},
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */ jsx(Button, { size: "medium", variant: "text", href: itemRootData.path,
|
|
80
|
+
/* @__PURE__ */ jsx(Button, { size: "medium", variant: "text", href: itemRootData.path, label: title }),
|
|
81
81
|
/* @__PURE__ */ jsx(
|
|
82
82
|
Button,
|
|
83
83
|
{
|
|
84
84
|
variant: "text",
|
|
85
85
|
id: module_id,
|
|
86
86
|
onClick: (e) => handleClick(e, module_id),
|
|
87
|
-
endIcon: /* @__PURE__ */ jsx(ArrowIcon, { openState: openedPopoverId === module_id ? true : false })
|
|
87
|
+
endIcon: /* @__PURE__ */ jsx(ArrowIcon, { openState: openedPopoverId === module_id ? true : false }),
|
|
88
|
+
label: ""
|
|
88
89
|
}
|
|
89
90
|
),
|
|
90
91
|
renderPopover()
|
|
@@ -103,11 +104,11 @@ const NavItemRoot = (props) => {
|
|
|
103
104
|
Button,
|
|
104
105
|
{
|
|
105
106
|
"aria-describedby": module_id,
|
|
107
|
+
label: title,
|
|
106
108
|
variant: "text",
|
|
107
109
|
size: "medium",
|
|
108
110
|
onClick: (e) => handleClick(e, itemRootData.module_id),
|
|
109
|
-
endIcon: /* @__PURE__ */ jsx(ArrowIcon, { openState: openedPopoverId === module_id ? true : false })
|
|
110
|
-
children: title
|
|
111
|
+
endIcon: /* @__PURE__ */ jsx(ArrowIcon, { openState: openedPopoverId === module_id ? true : false })
|
|
111
112
|
}
|
|
112
113
|
),
|
|
113
114
|
renderPopover()
|
|
@@ -116,7 +117,7 @@ const NavItemRoot = (props) => {
|
|
|
116
117
|
);
|
|
117
118
|
}
|
|
118
119
|
if (itemRootData.path) {
|
|
119
|
-
return /* @__PURE__ */ jsx(Button, { variant: "text", size: "medium", href: itemRootData.path, "aria-describedby": module_id,
|
|
120
|
+
return /* @__PURE__ */ jsx(Button, { variant: "text", size: "medium", href: itemRootData.path, "aria-describedby": module_id, label: title });
|
|
120
121
|
}
|
|
121
122
|
};
|
|
122
123
|
return /* @__PURE__ */ jsx(
|
|
@@ -3,5 +3,9 @@ import { RHFColorPickerProps } from './types';
|
|
|
3
3
|
* Componente RHFColorPicker para seleccionar colores con React Hook Form.
|
|
4
4
|
* @param {RHFColorPickerProps} props - Propiedades del componente.
|
|
5
5
|
* @returns {JSX.Element} - Elemento JSX que representa el componente.
|
|
6
|
+
* @author SebastianM - automatic
|
|
7
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
8
|
+
* @updatedAt 2024-11-06 09:00:06 - automatic
|
|
9
|
+
* @updatedUser SebastianM - automatic
|
|
6
10
|
*/
|
|
7
11
|
export declare const RHFColorPicker: (props: RHFColorPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -123,7 +123,7 @@ const RHFColorPicker = (props) => {
|
|
|
123
123
|
},
|
|
124
124
|
children: /* @__PURE__ */ jsxs("div", { className: classes.containerPicker, children: [
|
|
125
125
|
/* @__PURE__ */ jsx(SketchPicker, { color: tempColor, onChange: handleColorChange, disableAlpha: true }),
|
|
126
|
-
/* @__PURE__ */ jsx(Button, { variant: "contained", onClick: handleApprove,
|
|
126
|
+
/* @__PURE__ */ jsx(Button, { variant: "contained", onClick: handleApprove, label: getLabel("rhfcolorpicker.accept") })
|
|
127
127
|
] })
|
|
128
128
|
}
|
|
129
129
|
)
|
|
@@ -2,8 +2,8 @@ import { UploadImageProps } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* TODO: Documentar
|
|
4
4
|
* @author Juan Escobar - automatic
|
|
5
|
-
* @updatedAt 2024-
|
|
6
|
-
* @updatedUser
|
|
5
|
+
* @updatedAt 2024-11-06 09:00:06 - automatic
|
|
6
|
+
* @updatedUser SebastianM - automatic
|
|
7
7
|
* @createdAt 2024-10-15 17:33:28 - automatic
|
|
8
8
|
*/
|
|
9
9
|
export default function UploadImage({ error, file, helperText, sx, ...other }: UploadImageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -124,7 +124,7 @@ function UploadImage({ error, file, helperText, sx, ...other }) {
|
|
|
124
124
|
),
|
|
125
125
|
/* @__PURE__ */ jsx(Typography, { className: classes.containerDescription, variant: "body", children: getLabel("upload_image.description") }),
|
|
126
126
|
/* @__PURE__ */ jsx(Typography, { className: classes.containerConditions, variant: "body", children: getLabel("upload_image.conditions") }),
|
|
127
|
-
/* @__PURE__ */ jsx(Button, { onClick: open,
|
|
127
|
+
/* @__PURE__ */ jsx(Button, { onClick: open, label: getLabel("upload_image.label_button") })
|
|
128
128
|
]
|
|
129
129
|
}
|
|
130
130
|
)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TODO: Documentar
|
|
3
3
|
* @author SebastianM - automatic
|
|
4
|
-
* @createdAt 2024-11-
|
|
5
|
-
* @updatedAt 2024-11-
|
|
4
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
5
|
+
* @updatedAt 2024-11-06 09:00:06 - automatic
|
|
6
6
|
* @updatedUser SebastianM - automatic
|
|
7
7
|
*/
|
|
8
8
|
export declare function MyActions(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,7 +19,13 @@ function MyActions() {
|
|
|
19
19
|
setValue("statusEdition", "initial");
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
return /* @__PURE__ */ jsx(ActionsContainer, { children: /* @__PURE__ */ jsx(
|
|
22
|
+
return /* @__PURE__ */ jsx(ActionsContainer, { children: /* @__PURE__ */ jsx(
|
|
23
|
+
Button,
|
|
24
|
+
{
|
|
25
|
+
onClick: initCancelDraw,
|
|
26
|
+
label: statusEdition === "initial" ? getLabel(MAP_DICCTIONARY.LABEL_MEASURE_START) : getLabel(MAP_DICCTIONARY.LABEL_MEASURE_CANCEL)
|
|
27
|
+
}
|
|
28
|
+
) });
|
|
23
29
|
}
|
|
24
30
|
export {
|
|
25
31
|
MyActions as M
|
|
@@ -2,8 +2,8 @@ import { MyActionsProps } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* TODO: Documentar
|
|
4
4
|
* @author SebastianM - automatic
|
|
5
|
-
* @createdAt 2024-11-
|
|
6
|
-
* @updatedAt 2024-11-
|
|
5
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
6
|
+
* @updatedAt 2024-11-06 09:00:06 - automatic
|
|
7
7
|
* @updatedUser SebastianM - automatic
|
|
8
8
|
*/
|
|
9
9
|
export declare function MyActions(props: MyActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -52,7 +52,7 @@ function MyActions(props) {
|
|
|
52
52
|
};
|
|
53
53
|
return /* @__PURE__ */ jsxs(ActionsContainer, { children: [
|
|
54
54
|
/* @__PURE__ */ jsx(RHFHelperError, { name: "geometry" }),
|
|
55
|
-
/* @__PURE__ */ jsx(Button, { onClick: onClickCancelLocal, disabled: inEdition,
|
|
55
|
+
/* @__PURE__ */ jsx(Button, { onClick: onClickCancelLocal, disabled: inEdition, label: getLabel(MAP_GPSTOOLS_DICCTIONARY.ACTION_CANCEL) }),
|
|
56
56
|
/* @__PURE__ */ jsx(ActionFormIntro, { disabled: inEdition })
|
|
57
57
|
] });
|
|
58
58
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TODO: Documentar
|
|
3
3
|
* @author SebastianM - automatic
|
|
4
|
-
* @createdAt 2024-11-
|
|
5
|
-
* @updatedAt 2024-11-
|
|
4
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
5
|
+
* @updatedAt 2024-11-06 09:00:06 - automatic
|
|
6
6
|
* @updatedUser SebastianM - automatic
|
|
7
7
|
*/
|
|
8
8
|
export declare function GeofencesList(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -65,7 +65,7 @@ function GeofencesList() {
|
|
|
65
65
|
},
|
|
66
66
|
"list"
|
|
67
67
|
),
|
|
68
|
-
/* @__PURE__ */ jsx(ActionsContainer, { children: /* @__PURE__ */ jsx(Button, { onClick: () => goToAdd(),
|
|
68
|
+
/* @__PURE__ */ jsx(ActionsContainer, { children: /* @__PURE__ */ jsx(Button, { onClick: () => goToAdd(), label: getLabel(MAP_GPSTOOLS_DICCTIONARY.MODULE_NAME_GEOFENCE_ADD) }) })
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
);
|
|
@@ -4,13 +4,13 @@ import { WindowConfirmProps } from './types';
|
|
|
4
4
|
* Este componente muestra una ventana modal de confirmación con un mensaje y opciones de acción.
|
|
5
5
|
* Utiliza hooks como useModal, useModuleDictionary y useEnvironment de @m4l/core.
|
|
6
6
|
* También importa componentes y clases necesarios de CommonActions, subcomponents y classes.
|
|
7
|
-
* @createdAt 2024-11-
|
|
7
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* TODO: Documentar
|
|
11
11
|
* @author SebastianM - automatic
|
|
12
|
-
* @createdAt 2024-11-
|
|
13
|
-
* @updatedAt 2024-11-
|
|
12
|
+
* @createdAt 2024-11-06 09:00:05 - automatic
|
|
13
|
+
* @updatedAt 2024-11-06 10:39:53 - automatic
|
|
14
14
|
* @updatedUser SebastianM - automatic
|
|
15
15
|
*/
|
|
16
16
|
export declare const WindowConfirm: (props: WindowConfirmProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,8 +5,8 @@ import { M as MessageIlustration } from "./subcomponents/MessageIlustration/inde
|
|
|
5
5
|
import { m as modalUtilityClasses } from "../classes/index.js";
|
|
6
6
|
import { W as WindowBase } from "../WindowBase/index.js";
|
|
7
7
|
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
8
|
-
import { A as ActionCancel } from "../../CommonActions/components/ActionCancel/
|
|
9
|
-
import { A as ActionIntro } from "../../CommonActions/components/ActionIntro/
|
|
8
|
+
import { A as ActionCancel } from "../../CommonActions/components/ActionCancel/ActionCancel.js";
|
|
9
|
+
import { A as ActionIntro } from "../../CommonActions/components/ActionIntro/ActionIntro.js";
|
|
10
10
|
const WindowConfirm = (props) => {
|
|
11
11
|
const { variant, title, onClickCancel, onClickIntro, msg } = props;
|
|
12
12
|
const { closeModal } = useModal();
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ButtonProps } from './types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* The Button component renders a button with an optional icon and label.
|
|
4
|
+
* It supports different sizes, colors, and states such as disabled.
|
|
5
|
+
* If the module is in skeleton mode, it renders a skeleton button instead.
|
|
5
6
|
* @param props
|
|
6
7
|
* @returns
|
|
8
|
+
* @author SebastianM - automatic
|
|
9
|
+
* @createdAt 2024-11-06 07:42:00 - automatic
|
|
10
|
+
* @updatedAt 2024-11-12 11:36:04 - automatic
|
|
11
|
+
* @updatedUser SebastianM - automatic
|
|
7
12
|
*/
|
|
8
|
-
|
|
9
|
-
* TODO: Documentar
|
|
10
|
-
*/
|
|
11
|
-
export declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Button: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,52 +1,88 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
3
|
-
import {
|
|
4
|
-
import MuiButton from "@mui/material/Button";
|
|
5
|
-
import { B as ButtonRoot } from "./styles.js";
|
|
6
|
-
import { u as useUtilityClasses } from "./classes/index.js";
|
|
2
|
+
import { useModuleSkeleton, getPropertyByString } from "@m4l/core";
|
|
3
|
+
import { useTheme } from "@mui/material";
|
|
7
4
|
import clsx from "clsx";
|
|
8
|
-
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { u as useComponentSize } from "../../../hooks/useComponentSize/useComponentSize.js";
|
|
7
|
+
import { S as SkeletonButtonStyled, B as ButtonRootStyled, T as TextButtonStyled, a as ButtonIconStyled } from "./slots/ButtonSlots.js";
|
|
8
|
+
const Button = forwardRef((props, ref) => {
|
|
9
9
|
const {
|
|
10
|
+
className,
|
|
11
|
+
endIcon,
|
|
12
|
+
label,
|
|
13
|
+
startIcon,
|
|
14
|
+
color = "default",
|
|
15
|
+
disabled = false,
|
|
10
16
|
size = "small",
|
|
11
17
|
variant = "contained",
|
|
12
|
-
|
|
13
|
-
disabled,
|
|
14
|
-
skeletonWidth = "100px",
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
|
-
skeletonHeight = "28px",
|
|
17
|
-
colorState,
|
|
18
|
+
skeletonWidth = "100%",
|
|
18
19
|
...others
|
|
19
20
|
} = props;
|
|
21
|
+
const { currentSize } = useComponentSize(size);
|
|
20
22
|
const isSkeleton = useModuleSkeleton();
|
|
23
|
+
const theme = useTheme();
|
|
24
|
+
const adjustedSize = currentSize === "small" || currentSize === "medium" ? currentSize : "medium";
|
|
25
|
+
const paletteColor = getPropertyByString(
|
|
26
|
+
theme.vars.palette,
|
|
27
|
+
disabled ? "default" : color || "default",
|
|
28
|
+
theme.vars.palette.default
|
|
29
|
+
);
|
|
21
30
|
const ownerState = {
|
|
22
31
|
size,
|
|
23
32
|
variant,
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
disabled,
|
|
34
|
+
paletteColor,
|
|
35
|
+
color
|
|
36
|
+
};
|
|
37
|
+
if (isSkeleton) {
|
|
38
|
+
return /* @__PURE__ */ jsx(SkeletonButtonStyled, { "data-testid": "SkeletonButton", width: skeletonWidth, ownerState: { ...ownerState } });
|
|
39
|
+
}
|
|
40
|
+
const getAdjustedColor = (btnColor, btnVariant) => {
|
|
41
|
+
return btnVariant === "contained" ? `${btnColor}.contrastText` : `${btnColor}.main`;
|
|
26
42
|
};
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
la plataforma web. */
|
|
38
|
-
/* @__PURE__ */ jsx(
|
|
39
|
-
Skeleton,
|
|
43
|
+
const adjustedColor = getAdjustedColor(color, variant);
|
|
44
|
+
const renderIcon = (icon, instaceDataTestId) => {
|
|
45
|
+
if (!icon) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
if (typeof icon !== "string") {
|
|
49
|
+
return icon;
|
|
50
|
+
} else {
|
|
51
|
+
return /* @__PURE__ */ jsx(
|
|
52
|
+
ButtonIconStyled,
|
|
40
53
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
54
|
+
color: adjustedColor,
|
|
55
|
+
ownerState: { ...ownerState },
|
|
56
|
+
src: icon,
|
|
57
|
+
alt: "icon",
|
|
58
|
+
size: adjustedSize,
|
|
59
|
+
disabled,
|
|
60
|
+
instaceDataTestId,
|
|
61
|
+
className: clsx(className)
|
|
45
62
|
}
|
|
46
|
-
)
|
|
47
|
-
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
67
|
+
ButtonRootStyled,
|
|
68
|
+
{
|
|
69
|
+
"aria-disabled": disabled,
|
|
70
|
+
role: "button",
|
|
71
|
+
startIcon: renderIcon(startIcon, "ButtonStartIcon"),
|
|
72
|
+
endIcon: renderIcon(endIcon, "ButtonEndIcon"),
|
|
73
|
+
className: clsx(className),
|
|
74
|
+
variant,
|
|
75
|
+
size,
|
|
76
|
+
disabled,
|
|
77
|
+
disableRipple: true,
|
|
78
|
+
ownerState: { ...ownerState },
|
|
79
|
+
ref,
|
|
80
|
+
...others,
|
|
81
|
+
children: /* @__PURE__ */ jsx(TextButtonStyled, { ownerState: { ...ownerState }, color: adjustedColor, children: label })
|
|
82
|
+
}
|
|
48
83
|
);
|
|
49
|
-
};
|
|
84
|
+
});
|
|
85
|
+
Button.displayName = "Button";
|
|
50
86
|
export {
|
|
51
87
|
Button as B
|
|
52
88
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|