@m4l/components 9.1.4 → 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/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
- package/components/ControlIncrement/slots/ControltrolIncrementSlots.d.ts +1 -1
- 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/DragResizeWindow/DragResizeWindow.d.ts +9 -5
- package/components/DragResizeWindow/DragResizeWindow.js +6 -5
- package/components/DragResizeWindow/DragResizeWindow.styles.d.ts +4 -0
- package/components/DragResizeWindow/DragResizeWindow.styles.js +20 -3
- package/components/DragResizeWindow/classes/index.js +2 -2
- package/components/DragResizeWindow/constants.d.ts +1 -1
- package/components/DragResizeWindow/constants.js +2 -2
- package/components/DragResizeWindow/helpers/index.d.ts +14 -1
- package/components/DragResizeWindow/helpers/index.js +0 -2
- package/components/DragResizeWindow/hooks/useDimensionEffects.d.ts +4 -0
- package/components/DragResizeWindow/hooks/useDimensionEffects.js +128 -50
- package/components/DragResizeWindow/hooks/useDragOptions.d.ts +3 -3
- package/components/DragResizeWindow/hooks/useResizeOptions.d.ts +20 -1
- package/components/DragResizeWindow/hooks/useResizeOptions.js +1 -1
- package/components/DragResizeWindow/slots/DragResizeWindowSlots.js +3 -3
- package/components/DragResizeWindow/tests/DragResizeWindow.test.d.ts +1 -0
- package/components/DragResizeWindow/types.d.ts +84 -12
- package/components/DragResizeWindow/utils.d.ts +12 -1
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +2 -2
- 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 +2 -2
- package/components/DynamicSort/subcomponents/PopoverSort/PopoverSort.d.ts +4 -0
- package/components/Icon/types.d.ts +1 -1
- package/components/Label/slots/LabelSlots.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/extended/React-Resizable/Resizable/Resizable.d.ts +4 -0
- package/components/extended/React-Resizable/Resizable/Resizable.js +13 -1
- package/components/extended/React-Resizable/Resizable/constants.d.ts +1 -0
- package/components/extended/React-Resizable/Resizable/constants.js +3 -1
- package/components/extended/React-Resizable/ResizableBox/ResizableBox.d.ts +6 -2
- package/components/extended/React-Resizable/ResizableBox/ResizableBox.js +14 -2
- package/components/extended/React-Resizable/ResizableBox/ResizeableBox.styles.d.ts +1 -1
- package/components/extended/React-Resizable/ResizableBox/ResizeableBox.styles.js +7 -3
- package/components/extended/React-Resizable/ResizableBox/tests/ResizableBox.integration.test.d.ts +1 -0
- package/components/extended/React-Resizable/ResizableBox/tests/ResizableBox.test.d.ts +1 -0
- package/components/extended/React-Resizable/ResizableBox/types.d.ts +35 -4
- package/components/extended/React-Resizable/helpers.d.ts +151 -34
- package/components/extended/React-Resizable/helpers.js +106 -85
- package/components/extended/React-Resizable/hooks/useResizable.d.ts +16 -0
- package/components/extended/React-Resizable/hooks/useResizable.js +24 -0
- package/components/hook-form/RHFColorPicker/RFHColorPicker.d.ts +4 -0
- package/components/hook-form/RHFColorPicker/RFHColorPicker.js +1 -1
- package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +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/ModalDialog/index.d.ts +4 -0
- package/components/modal/ModalDialog/index.js +2 -2
- package/components/modal/WindowConfirm/index.d.ts +3 -3
- package/components/modal/WindowConfirm/index.js +2 -2
- package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
- 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/IconButton/slots/IconButtonSlots.d.ts +2 -2
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
- package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
- package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
- package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +2 -2
- package/components/mui_extended/ToggleButton/ToggleButton.js +1 -1
- package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
- package/components/mui_extended/Typography/types.d.ts +5 -1
- package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +63 -2
- package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +1 -1
- package/contexts/ModalContext/index.d.ts +4 -0
- package/contexts/ModalContext/types.d.ts +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
- package/storybook/components/DragResizeWindow/stories/DragResizeWindow.stories.d.ts +7 -0
- package/storybook/components/DragResizeWindow/stories/subcomponents/ContentExample.d.ts +8 -0
- package/{components → storybook/components}/DragResizeWindow/stories/subcomponents/WithExtendedContainer.d.ts +4 -0
- package/{components → storybook/components}/DragResizeWindow/stories/types.d.ts +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/storybook/components/extended/react-resizable/ResizableBox/resizableBox.stories.d.ts +13 -0
- package/components/CommonActions/components/ActionIntro/test/contants.js +0 -4
- package/components/DragResizeWindow/stories/basic.stories.d.ts +0 -13
- package/components/DragResizeWindow/stories/dictionary.d.ts +0 -0
- package/components/DragResizeWindow/stories/subcomponents/ContentExample.d.ts +0 -4
- package/components/extended/React-Resizable/Resizable/stories/basic.stories.d.ts +0 -9
- package/components/extended/React-Resizable/ResizableBox/stories/basic.stories.d.ts +0 -9
- 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
- /package/{components → storybook/components}/DragResizeWindow/stories/constants.d.ts +0 -0
|
@@ -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(
|
|
@@ -6,5 +6,9 @@ import { ResizableProps } from 'react-resizable';
|
|
|
6
6
|
* Resizable es un componente controlado, por lo que se debe pasar el width y height y darle manejo
|
|
7
7
|
* a los handlers de onResizeStart, onResize y onResizeStop. Estos handlers son implementados en el componente
|
|
8
8
|
* DragResizeWindow
|
|
9
|
+
* @author cesar - automatic
|
|
10
|
+
* @createdAt 2024-11-05 13:00:52 - automatic
|
|
11
|
+
* @updatedAt 2024-11-06 10:50:22 - automatic
|
|
12
|
+
* @updatedUser cesar - automatic
|
|
9
13
|
*/
|
|
10
14
|
export declare const Resizable: (props: ResizableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { R as RootStyled } from "./slots/ResizableSlots.js";
|
|
3
|
+
import { u as useResizable } from "../hooks/useResizable.js";
|
|
4
|
+
import { R as RESIZING_CLASS_NAME } from "./constants.js";
|
|
3
5
|
const Resizable = (props) => {
|
|
4
|
-
|
|
6
|
+
const { onResizeStart, onResizeStop, ...other } = props;
|
|
7
|
+
const { isResizing, localHandleResizeStart, localHandleResizeStop } = useResizable(onResizeStart, onResizeStop);
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
RootStyled,
|
|
10
|
+
{
|
|
11
|
+
...other,
|
|
12
|
+
onResizeStart: localHandleResizeStart,
|
|
13
|
+
onResizeStop: localHandleResizeStop,
|
|
14
|
+
className: isResizing ? RESIZING_CLASS_NAME : ""
|
|
15
|
+
}
|
|
16
|
+
);
|
|
5
17
|
};
|
|
6
18
|
export {
|
|
7
19
|
Resizable as R
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResizableProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Redefinicon de react-resizable/ResizableBox incluyendo los estilos en el slot.
|
|
4
4
|
*
|
|
@@ -8,5 +8,9 @@ import { ResizeableProps } from './types';
|
|
|
8
8
|
* del componente lanzan el onResize cuando cambia el tamaño, para que se re-inserten como props.
|
|
9
9
|
*
|
|
10
10
|
* Este componente no tiene implementado la correción del resize a la izquierda o hacia arriba. Usar DragResizeWindow.
|
|
11
|
+
* @author cesar - automatic
|
|
12
|
+
* @createdAt 2024-11-01 12:04:19 - automatic
|
|
13
|
+
* @updatedAt 2024-11-12 13:32:58 - automatic
|
|
14
|
+
* @updatedUser cesar - automatic
|
|
11
15
|
*/
|
|
12
|
-
export declare function ResizableBox(props:
|
|
16
|
+
export declare function ResizableBox(props: ResizableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { R as RootStyled } from "./slots/ResizableBoxSlots.js";
|
|
3
|
+
import { u as useResizable } from "../hooks/useResizable.js";
|
|
4
|
+
import { R as RESIZING_CLASS_NAME } from "../Resizable/constants.js";
|
|
3
5
|
function ResizableBox(props) {
|
|
4
6
|
const {
|
|
5
7
|
children,
|
|
6
8
|
width = 600,
|
|
7
9
|
height = 400,
|
|
8
|
-
|
|
10
|
+
maxHeight,
|
|
9
11
|
onResize,
|
|
12
|
+
onResizeStart,
|
|
13
|
+
onResizeStop,
|
|
10
14
|
maxWidth,
|
|
11
15
|
resizeHandles = ["se", "nw"],
|
|
16
|
+
disabled = false,
|
|
12
17
|
...other
|
|
13
18
|
} = props;
|
|
19
|
+
const { isResizing, localHandleResizeStart, localHandleResizeStop } = useResizable(onResizeStart, onResizeStop);
|
|
14
20
|
return /* @__PURE__ */ jsx(
|
|
15
21
|
RootStyled,
|
|
16
22
|
{
|
|
23
|
+
role: "region",
|
|
24
|
+
"aria-label": "Resizable Box",
|
|
17
25
|
width,
|
|
18
26
|
height,
|
|
19
27
|
onResize,
|
|
20
|
-
maxConstraints:
|
|
28
|
+
maxConstraints: maxHeight && maxWidth ? [maxWidth, maxHeight] : void 0,
|
|
21
29
|
resizeHandles,
|
|
30
|
+
ownerState: { disabled },
|
|
31
|
+
onResizeStart: localHandleResizeStart,
|
|
32
|
+
onResizeStop: localHandleResizeStop,
|
|
33
|
+
className: isResizing ? RESIZING_CLASS_NAME : "",
|
|
22
34
|
...other,
|
|
23
35
|
children
|
|
24
36
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ResizableBoxStyles } from '
|
|
1
|
+
import { ResizableBoxStyles } from '../ResizableBox/types';
|
|
2
2
|
export declare const resizableBoxStyles: ResizableBoxStyles;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { g as getReactResizableStyles } from "../helpers.js";
|
|
2
2
|
const resizableBoxStyles = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Styles for the ResizableBox component.
|
|
5
|
+
* @author cesar - automatic
|
|
6
|
+
* @createdAt 2024-11-01 12:04:19 - automatic
|
|
7
|
+
* @updatedAt 2024-11-01 12:04:20 - automatic
|
|
8
|
+
* @updatedUser cesar - automatic
|
|
5
9
|
*/
|
|
6
|
-
root: ({ theme }) => ({
|
|
7
|
-
...getReactResizableStyles(theme),
|
|
10
|
+
root: ({ theme, ownerState }) => ({
|
|
11
|
+
...getReactResizableStyles(theme, ownerState || {}),
|
|
8
12
|
position: "absolute"
|
|
9
13
|
})
|
|
10
14
|
};
|
package/components/extended/React-Resizable/ResizableBox/tests/ResizableBox.integration.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,13 +3,44 @@ import { ResizableBoxSlots } from './slots/slots';
|
|
|
3
3
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
4
4
|
import { Theme } from '@mui/material/styles';
|
|
5
5
|
import { COMPONET_KEY_COMPONENT } from './constants';
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Internal props for the ResizableBox component.
|
|
8
|
+
* [maxWidth] - Maximum width allowed for the component.
|
|
9
|
+
* [maxHeight] - Maximum height allowed for the component.
|
|
10
|
+
* [onResize] - Callback function called
|
|
11
|
+
* when the component is resized, providing the event and resize data.
|
|
12
|
+
* @author cesar - automatic
|
|
13
|
+
* @createdAt 2024-11-01 16:20:26 - automatic
|
|
14
|
+
* @updatedAt 2024-11-05 10:30:25 - automatic
|
|
15
|
+
* @updatedUser cesar - automatic
|
|
16
|
+
*/
|
|
17
|
+
type InternalResizableProps = {
|
|
7
18
|
maxWidth?: number;
|
|
8
|
-
|
|
19
|
+
maxHeight?: number;
|
|
9
20
|
onResize?: (e: React.SyntheticEvent, data: ResizeCallbackData) => void;
|
|
10
21
|
};
|
|
11
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Public props for the ResizableBox component, extending the props from
|
|
24
|
+
* 'react-resizable' and adding internal properties.
|
|
25
|
+
* [maxWidth] - Maximum width allowed for the component.
|
|
26
|
+
* [maxHeight] - Maximum height allowed for the component.
|
|
27
|
+
* [onResize] - Callback function called
|
|
28
|
+
* when the component is resized, providing the event and resize data.
|
|
29
|
+
* - Additional properties from ResizableBox in 'react-resizable'.
|
|
30
|
+
* - Owner state that includes properties specific to the component.
|
|
31
|
+
*/
|
|
32
|
+
export type ResizableProps = InternalResizableProps & Partial<ResizableBoxProps> & ResizableOwnerState;
|
|
33
|
+
/**
|
|
34
|
+
* Available slots types in the ResizableBox component.
|
|
35
|
+
* - Keys of the slots defined in ResizableBoxSlots.
|
|
36
|
+
*/
|
|
12
37
|
export type ResizableBoxSlotsType = keyof typeof ResizableBoxSlots;
|
|
13
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Owner state of the ResizableBox component.
|
|
40
|
+
* [disabled] - Indicates whether the component is disabled.
|
|
41
|
+
*/
|
|
42
|
+
export type ResizableOwnerState = {
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
};
|
|
14
45
|
export type ResizableBoxStyles = Partial<OverridesStyleRules<ResizableBoxSlotsType, typeof COMPONET_KEY_COMPONENT, Theme> | undefined> | undefined;
|
|
15
46
|
export {};
|
|
@@ -1,80 +1,197 @@
|
|
|
1
1
|
import { Theme } from '@mui/material';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Styles for the react-resizable component, defining handle appearance and position.
|
|
4
|
+
* @param theme - MUI theme object for consistent styling.
|
|
5
|
+
* @param ownerState - Object containing the component's state, particularly the `disabled` state.
|
|
6
|
+
* @returns CSS styles applied to the component based on `disabled` state.
|
|
7
|
+
*
|
|
8
|
+
* - `backgroundColor` and `cursor` change depending on the `disabled` state.
|
|
9
|
+
* - Handles (`.react-resizable-handle`) are displayed or hidden based on `disabled`.
|
|
10
|
+
* - Specific styles are applied for each handle position (`sw`, `se`, `nw`, etc.) with rotational adjustments.
|
|
11
|
+
*
|
|
12
|
+
* Note: If resizing is not enabled, handles are hidden.
|
|
13
|
+
* @author cesar - automatic
|
|
14
|
+
* @createdAt 2024-11-01 08:30:26 - automatic
|
|
15
|
+
* @updatedAt 2024-11-06 10:50:22 - automatic
|
|
16
|
+
* @updatedUser cesar - automatic
|
|
4
17
|
*/
|
|
5
|
-
export declare const getReactResizableStyles: (theme: Theme
|
|
18
|
+
export declare const getReactResizableStyles: (theme: Theme, ownerState: {
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}) => {
|
|
6
21
|
position: string;
|
|
7
22
|
backgroundColor: string;
|
|
8
|
-
cursor: string;
|
|
9
|
-
prop2: number;
|
|
23
|
+
cursor: string | undefined;
|
|
10
24
|
'&.react-resizable': {
|
|
11
25
|
position: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
border: string;
|
|
19
|
-
padding: string;
|
|
20
|
-
margin: string;
|
|
21
|
-
borderBottomRightRadius: string;
|
|
22
|
-
};
|
|
23
|
-
'& .react-resizable-handle.react-resizable-hide': {
|
|
24
|
-
display: string;
|
|
25
|
-
};
|
|
26
|
-
'& .react-resizable-handle-sw, .react-resizable-handle-se, .react-resizable-handle-nw, .react-resizable-handle-ne': {
|
|
27
|
-
borderRight: string;
|
|
28
|
-
borderBottom: string;
|
|
26
|
+
'& .react-resizable-handle': {
|
|
27
|
+
display: string;
|
|
28
|
+
};
|
|
29
|
+
'&:hover .react-resizable-handle, &.M4L-resizing .react-resizable-handle': {
|
|
30
|
+
display: string;
|
|
31
|
+
};
|
|
29
32
|
};
|
|
30
33
|
'& .react-resizable-handle-sw': {
|
|
34
|
+
transform: string;
|
|
31
35
|
bottom: string;
|
|
32
36
|
left: string;
|
|
37
|
+
borderTop: string;
|
|
38
|
+
borderRight: string;
|
|
33
39
|
cursor: string;
|
|
34
|
-
|
|
40
|
+
width: string;
|
|
41
|
+
height: string;
|
|
42
|
+
borderStyle: string;
|
|
43
|
+
borderWidth: string;
|
|
44
|
+
display: string;
|
|
45
|
+
borderColor: string;
|
|
46
|
+
borderRadius: string;
|
|
47
|
+
backgroundImage: string;
|
|
35
48
|
position: string;
|
|
49
|
+
boxSizing: string;
|
|
50
|
+
padding: string;
|
|
51
|
+
margin: string;
|
|
36
52
|
};
|
|
37
53
|
'& .react-resizable-handle-se': {
|
|
54
|
+
transform: string;
|
|
38
55
|
bottom: string;
|
|
39
56
|
right: string;
|
|
57
|
+
borderTop: string;
|
|
58
|
+
borderLeft: string;
|
|
40
59
|
cursor: string;
|
|
60
|
+
width: string;
|
|
61
|
+
height: string;
|
|
62
|
+
borderStyle: string;
|
|
63
|
+
borderWidth: string;
|
|
64
|
+
display: string;
|
|
65
|
+
borderColor: string;
|
|
66
|
+
borderRadius: string;
|
|
67
|
+
backgroundImage: string;
|
|
68
|
+
position: string;
|
|
69
|
+
boxSizing: string;
|
|
70
|
+
padding: string;
|
|
71
|
+
margin: string;
|
|
41
72
|
};
|
|
42
73
|
'& .react-resizable-handle-nw': {
|
|
74
|
+
transform: string;
|
|
43
75
|
top: string;
|
|
44
76
|
left: string;
|
|
77
|
+
borderBottom: string;
|
|
78
|
+
borderRight: string;
|
|
45
79
|
cursor: string;
|
|
46
|
-
|
|
80
|
+
width: string;
|
|
81
|
+
height: string;
|
|
82
|
+
borderStyle: string;
|
|
83
|
+
borderWidth: string;
|
|
84
|
+
display: string;
|
|
85
|
+
borderColor: string;
|
|
86
|
+
borderRadius: string;
|
|
87
|
+
backgroundImage: string;
|
|
88
|
+
position: string;
|
|
89
|
+
boxSizing: string;
|
|
90
|
+
padding: string;
|
|
91
|
+
margin: string;
|
|
47
92
|
};
|
|
48
93
|
'& .react-resizable-handle-ne': {
|
|
49
|
-
top: string;
|
|
50
|
-
right: string;
|
|
51
|
-
cursor: string;
|
|
52
94
|
transform: string;
|
|
53
|
-
};
|
|
54
|
-
'& .react-resizable-handle-w, .react-resizable-handle-e': {
|
|
55
95
|
top: string;
|
|
56
|
-
|
|
96
|
+
right: string;
|
|
97
|
+
borderBottom: string;
|
|
98
|
+
borderLeft: string;
|
|
57
99
|
cursor: string;
|
|
100
|
+
width: string;
|
|
101
|
+
height: string;
|
|
102
|
+
borderStyle: string;
|
|
103
|
+
borderWidth: string;
|
|
104
|
+
display: string;
|
|
105
|
+
borderColor: string;
|
|
106
|
+
borderRadius: string;
|
|
107
|
+
backgroundImage: string;
|
|
108
|
+
position: string;
|
|
109
|
+
boxSizing: string;
|
|
110
|
+
padding: string;
|
|
111
|
+
margin: string;
|
|
58
112
|
};
|
|
59
113
|
'& .react-resizable-handle-w': {
|
|
114
|
+
top: string;
|
|
60
115
|
left: string;
|
|
116
|
+
transform: string;
|
|
117
|
+
borderTop: string;
|
|
61
118
|
borderLeft: string;
|
|
119
|
+
borderRight: string;
|
|
120
|
+
cursor: string;
|
|
121
|
+
width: string;
|
|
122
|
+
height: string;
|
|
123
|
+
borderStyle: string;
|
|
124
|
+
borderWidth: string;
|
|
125
|
+
display: string;
|
|
126
|
+
borderColor: string;
|
|
127
|
+
borderRadius: string;
|
|
128
|
+
backgroundImage: string;
|
|
129
|
+
position: string;
|
|
130
|
+
boxSizing: string;
|
|
131
|
+
padding: string;
|
|
132
|
+
margin: string;
|
|
62
133
|
};
|
|
63
134
|
'& .react-resizable-handle-e': {
|
|
135
|
+
top: string;
|
|
64
136
|
right: string;
|
|
137
|
+
transform: string;
|
|
138
|
+
borderTop: string;
|
|
139
|
+
borderLeft: string;
|
|
65
140
|
borderRight: string;
|
|
66
|
-
};
|
|
67
|
-
'& .react-resizable-handle-n,.react-resizable-handle-s': {
|
|
68
|
-
left: string;
|
|
69
|
-
marginLeft: string;
|
|
70
141
|
cursor: string;
|
|
142
|
+
width: string;
|
|
143
|
+
height: string;
|
|
144
|
+
borderStyle: string;
|
|
145
|
+
borderWidth: string;
|
|
146
|
+
display: string;
|
|
147
|
+
borderColor: string;
|
|
148
|
+
borderRadius: string;
|
|
149
|
+
backgroundImage: string;
|
|
150
|
+
position: string;
|
|
151
|
+
boxSizing: string;
|
|
152
|
+
padding: string;
|
|
153
|
+
margin: string;
|
|
71
154
|
};
|
|
72
155
|
'& .react-resizable-handle-n': {
|
|
73
156
|
top: string;
|
|
157
|
+
left: string;
|
|
158
|
+
transform: string;
|
|
74
159
|
borderTop: string;
|
|
160
|
+
borderLeft: string;
|
|
161
|
+
borderRight: string;
|
|
162
|
+
cursor: string;
|
|
163
|
+
width: string;
|
|
164
|
+
height: string;
|
|
165
|
+
borderStyle: string;
|
|
166
|
+
borderWidth: string;
|
|
167
|
+
display: string;
|
|
168
|
+
borderColor: string;
|
|
169
|
+
borderRadius: string;
|
|
170
|
+
backgroundImage: string;
|
|
171
|
+
position: string;
|
|
172
|
+
boxSizing: string;
|
|
173
|
+
padding: string;
|
|
174
|
+
margin: string;
|
|
75
175
|
};
|
|
76
176
|
'& .react-resizable-handle-s': {
|
|
77
177
|
bottom: string;
|
|
78
|
-
|
|
178
|
+
left: string;
|
|
179
|
+
transform: string;
|
|
180
|
+
borderTop: string;
|
|
181
|
+
borderLeft: string;
|
|
182
|
+
borderRight: string;
|
|
183
|
+
cursor: string;
|
|
184
|
+
width: string;
|
|
185
|
+
height: string;
|
|
186
|
+
borderStyle: string;
|
|
187
|
+
borderWidth: string;
|
|
188
|
+
display: string;
|
|
189
|
+
borderColor: string;
|
|
190
|
+
borderRadius: string;
|
|
191
|
+
backgroundImage: string;
|
|
192
|
+
position: string;
|
|
193
|
+
boxSizing: string;
|
|
194
|
+
padding: string;
|
|
195
|
+
margin: string;
|
|
79
196
|
};
|
|
80
197
|
};
|