@m4l/components 0.1.83 → 0.1.85
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/export.d.ts +25 -4
- package/components/AccountPopover/classes/index.d.ts +4 -0
- package/components/AccountPopover/classes/types.d.ts +4 -0
- package/components/AccountPopover/dictionary.d.ts +1 -0
- package/components/AccountPopover/{index.2677fe77.js → index.35c29a55.js} +86 -36
- package/components/AccountPopover/index.d.ts +1 -0
- package/components/AccountPopover/types.d.ts +2 -0
- package/components/AppBar/dictionary.d.ts +1 -0
- package/components/AppBar/{index.ad2a6f0e.js → index.291da9fd.js} +19 -11
- package/components/AppBar/index.d.ts +1 -0
- package/components/CommonActions/components/ActionCancel/{index.b2fc495d.js → index.67b91376.js} +1 -1
- package/components/CommonActions/components/ActionFormCancel/{index.60d8963e.js → index.d4503410.js} +17 -16
- package/components/CommonActions/components/ActionFormIntro/{index.fde4ea51.js → index.01ed67de.js} +1 -1
- package/components/CommonActions/components/ActionIntro/{index.724d8e17.js → index.53e7fe2b.js} +1 -1
- package/components/CommonActions/components/Actions/{index.23a2d6ae.js → index.c91c27f9.js} +15 -14
- package/components/DataGrid/{index.d5d0d62f.js → index.37e14e83.js} +14 -12
- package/components/DataGrid/subcomponents/Actions/{index.201394f5.js → index.155c63af.js} +47 -31
- package/components/DynamicFilter/{index.7d134537.js → index.a8c2609c.js} +29 -28
- package/components/GridLayout/constants.d.ts +1 -1
- package/components/GridLayout/{index.70085b00.js → index.2383aaf9.js} +86 -23
- package/components/GridLayout/index.d.ts +1 -1
- package/components/GridLayout/subcomponents/Griditem/{index.c09681ff.js → index.58168132.js} +1 -6
- package/components/GridLayout/subcomponents/Responsive/{index.eb04fd5e.js → index.a6642437.js} +1 -2
- package/components/GridLayout/types.d.ts +2 -2
- package/components/HelperText/{index.28e9105d.js → index.8b5911d1.js} +9 -8
- package/components/Icon/{index.2414ff25.js → index.c3a579e7.js} +1 -1
- package/components/LanguagePopover/{index.065e0296.js → index.7681b08e.js} +9 -8
- package/components/ModalDialog/{index.fb148f76.js → index.b85ee3cb.js} +4 -6
- package/components/NavLink/{index.2ef07c44.js → index.bb879650.js} +9 -8
- package/components/NoItemSelected/classes/constants.d.ts +1 -0
- package/components/NoItemSelected/classes/index.d.ts +6 -0
- package/components/NoItemSelected/classes/types.d.ts +6 -0
- package/components/NoItemSelected/{index.23dfc897.js → index.a2807715.js} +46 -31
- package/components/NoItemSelected/index.d.ts +2 -1
- package/components/NoItemSelected/types.d.ts +4 -0
- package/components/ObjectLogs/{index.5d74dfe0.js → index.2ed38a84.js} +22 -19
- package/components/PaperForm/{index.f931dc02.js → index.989377a5.js} +1 -1
- package/components/Period/{index.0e6512b2.js → index.061c9b2f.js} +16 -15
- package/components/PropertyValue/{index.a67c9916.js → index.ac46f441.js} +1 -1
- package/components/ScrollBar/{index.d4410cb5.js → index.1247c1c5.js} +38 -9
- package/components/SideBar/classes/index.d.ts +0 -1
- package/components/SideBar/classes/types.d.ts +0 -1
- package/components/SideBar/{index.72564ef2.js → index.e0587639.js} +131 -75
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavItemRoot/type.d.ts +5 -0
- package/components/areas/components/AreasAdmin/classes/index.d.ts +1 -1
- package/components/areas/components/AreasAdmin/classes/types.d.ts +3 -0
- package/components/areas/components/AreasAdmin/index.d.ts +2 -2
- package/components/areas/components/AreasAdmin/index.f505897a.js +767 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/subcomponents/ChipActionsMobile/types.d.ts +2 -1
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/types.d.ts +2 -0
- package/components/areas/components/AreasAdmin/subcomponents/AreaChipMobile/subcomponents/ChipMobile/ChipMobile.d.ts +6 -0
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +1 -0
- package/components/areas/components/AreasViewer/{index.9ed7dfd7.js → index.cacec884.js} +77 -52
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/index.d.ts +2 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/subcomponents/ResizeHandle/index.d.ts +4 -0
- package/components/areas/components/index.6d5dfeec.js +31 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +10 -3
- package/components/areas/contexts/AreasContext/{index.36fe6953.js → index.6f56b1da.js} +103 -80
- package/components/areas/contexts/AreasContext/types.d.ts +28 -8
- package/components/areas/contexts/{index.68c53fc9.js → index.999e8b1e.js} +1 -1
- package/components/areas/hooks/useAreas/{index.a4c03e23.js → index.4baec91c.js} +1 -1
- package/components/areas/index.3088f99e.js +54 -0
- package/components/areas/utils/useOnClickOutside/index.d.ts +4 -0
- package/components/formatters/BooleanFormatter/{index.32de0803.js → index.e7f0b76a.js} +1 -1
- package/components/formatters/{index.d16d2331.js → index.d911949d.js} +2 -2
- package/components/hook-form/RHFAutocomplete/{index.42df8eb4.js → index.aca6984f.js} +11 -9
- package/components/hook-form/RHFAutocompleteAsync/{index.0441524c.js → index.8511bcf8.js} +1 -1
- package/components/hook-form/RHFCheckbox/{index.c66147f7.js → index.0f45e6b0.js} +10 -9
- package/components/hook-form/RHFDateTime/{index.4698ca29.js → index.07412ef0.js} +10 -9
- package/components/hook-form/RHFPeriod/{index.f653934b.js → index.15b8f11e.js} +2 -2
- package/components/hook-form/RHFTextField/{index.1fa07688.js → index.94c8c59b.js} +3 -3
- package/components/hook-form/RHFUpload/{index.93c2dcb5.js → index.7ef1e124.js} +10 -9
- package/components/modal/{WindowBase.92ce9b8f.js → WindowBase.d485315d.js} +17 -12
- package/components/modal/{WindowConfirm.4c3d2cd7.js → WindowConfirm.3d9cd6e1.js} +18 -17
- package/components/modal/{index.1bd35bd5.js → index.c7e4beba.js} +15 -14
- package/components/mui_extended/Accordion/{index.5111314b.js → index.854f4c90.js} +3 -3
- package/components/mui_extended/Badge/classes/constants.d.ts +1 -1
- package/components/mui_extended/Badge/{index.cad260fe.js → index.8c2b8b66.js} +1 -1
- package/components/mui_extended/CheckBox/CheckBox.d.ts +1 -1
- package/components/mui_extended/{CheckBox.5f6c78b0.js → CheckBox.38abccd8.js} +5 -3
- package/components/mui_extended/IconButton/{index.a318316e.js → index.be111a34.js} +2 -12
- package/components/mui_extended/MenuActions/{index.f6bfdd40.js → index.b16e84c1.js} +26 -8
- package/components/mui_extended/MenuActions/types.d.ts +3 -0
- package/components/mui_extended/Pager/{index.da26e9d4.js → index.5b77fa4c.js} +84 -82
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/index.d.ts +5 -0
- package/components/mui_extended/Pager/subcomponents/CustomTablePagination/types.d.ts +1 -4
- package/components/mui_extended/Stack/Stack.d.ts +3 -0
- package/components/mui_extended/Stack/classes/constants.d.ts +1 -0
- package/components/mui_extended/Stack/classes/index.d.ts +6 -0
- package/components/mui_extended/Stack/classes/types.d.ts +6 -0
- package/components/mui_extended/Stack/index.0e53197c.js +39 -0
- package/components/mui_extended/Stack/index.d.ts +2 -0
- package/components/mui_extended/Stack/types.d.ts +2 -0
- package/components/mui_extended/Tab/{index.0989d15d.js → index.c1dc7bbf.js} +42 -9
- package/components/mui_extended/Tabs/Tabs.d.ts +3 -0
- package/components/mui_extended/Tabs/classes/constants.d.ts +1 -0
- package/components/mui_extended/Tabs/classes/index.d.ts +6 -0
- package/components/mui_extended/Tabs/classes/types.d.ts +6 -0
- package/components/mui_extended/Tabs/index.d.ts +1 -0
- package/components/mui_extended/index.d.ts +2 -0
- package/components/mui_extended/{index.813723c5.js → index.d1ee9a6a.js} +9 -8
- package/contexts/ModalContext/{index.577bf36b.js → index.1ea79d7e.js} +1 -1
- package/contexts/RHFormContext/{index.b9266262.js → index.e019f87d.js} +1 -1
- package/hooks/useModal/{index.7a07c208.js → index.c906706c.js} +1 -1
- package/index.js +81 -75
- package/package.json +1 -1
- package/{vendor.5365cc7e.js → vendor.f27b86c9.js} +51 -51
- package/components/GridLayout/subcomponents/SizeProvider/index.9c5e80b2.js +0 -65
- package/components/areas/components/AreasAdmin/index.7bfec13f.js +0 -487
- package/components/areas/components/index.654b08aa.js +0 -30
- package/components/areas/index.ec4f088c.js +0 -32
- /package/components/GridLayout/subcomponents/{SizeProvider → WidthProvider}/index.d.ts +0 -0
- /package/components/areas/components/AreasAdmin/subcomponents/{AreaChipMobile/subcomponents/PanelWindowPopUp → PanelWindowPopUp}/index.d.ts +0 -0
- /package/components/areas/components/AreasAdmin/subcomponents/{AreaChipMobile/subcomponents/PanelWindowPopUp → PanelWindowPopUp}/types.d.ts +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { generateUtilityClasses, generateUtilityClass, styled, Skeleton, Checkbox } from "@mui/material";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
4
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
4
5
|
import { useModuleSkeleton } from "@m4l/core";
|
|
5
6
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { T as Typography } from "./Typography/index.443590d6.js";
|
|
7
|
-
import {
|
|
8
|
+
import { forwardRef } from "react";
|
|
8
9
|
const COMPONENT_CLASS_NAME = "M4LCheckBox";
|
|
9
10
|
generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
10
11
|
"root",
|
|
@@ -55,7 +56,7 @@ const SkeletonCheckBox = (props) => {
|
|
|
55
56
|
})
|
|
56
57
|
});
|
|
57
58
|
};
|
|
58
|
-
const CheckBox = (props) => {
|
|
59
|
+
const CheckBox = forwardRef((props, ref) => {
|
|
59
60
|
const {
|
|
60
61
|
className,
|
|
61
62
|
size = "small",
|
|
@@ -71,6 +72,7 @@ const CheckBox = (props) => {
|
|
|
71
72
|
const classes = useUtilityClasses(ownerState);
|
|
72
73
|
return /* @__PURE__ */ jsxs("div", {
|
|
73
74
|
className: clsx(classes.root, className),
|
|
75
|
+
ref,
|
|
74
76
|
children: [!isSkeleton ? /* @__PURE__ */ jsx(Checkbox, {
|
|
75
77
|
...props
|
|
76
78
|
}) : /* @__PURE__ */ jsx(SkeletonCheckBox, {
|
|
@@ -80,7 +82,7 @@ const CheckBox = (props) => {
|
|
|
80
82
|
children: label
|
|
81
83
|
}) : null]
|
|
82
84
|
});
|
|
83
|
-
};
|
|
85
|
+
});
|
|
84
86
|
export {
|
|
85
87
|
CheckBox as C
|
|
86
88
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo, useState } from "react";
|
|
2
2
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { Skeleton, styled, generateUtilityClasses, generateUtilityClass, Tooltip, IconButton as IconButton$1 } from "@mui/material";
|
|
4
|
-
import { I as Icon } from "../../Icon/index.
|
|
4
|
+
import { I as Icon } from "../../Icon/index.c3a579e7.js";
|
|
5
5
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
@@ -79,13 +79,7 @@ const IconButton = (props) => {
|
|
|
79
79
|
}
|
|
80
80
|
return void 0;
|
|
81
81
|
}, [tooltip, dictionaryTooltipId, getLabel]);
|
|
82
|
-
const [isfocus
|
|
83
|
-
const handlerOnFocus = () => {
|
|
84
|
-
setIsFocus(true);
|
|
85
|
-
};
|
|
86
|
-
const handlerOnBlur = () => {
|
|
87
|
-
setIsFocus(false);
|
|
88
|
-
};
|
|
82
|
+
const [isfocus] = useState(false);
|
|
89
83
|
const ownerState = {
|
|
90
84
|
variant,
|
|
91
85
|
size: isDesktop ? size : "medium",
|
|
@@ -104,8 +98,6 @@ const IconButton = (props) => {
|
|
|
104
98
|
...other,
|
|
105
99
|
onClick,
|
|
106
100
|
disableRipple: true,
|
|
107
|
-
onFocusVisible: handlerOnFocus,
|
|
108
|
-
onBlur: handlerOnBlur,
|
|
109
101
|
disabled,
|
|
110
102
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
111
103
|
src,
|
|
@@ -116,8 +108,6 @@ const IconButton = (props) => {
|
|
|
116
108
|
...other,
|
|
117
109
|
onClick,
|
|
118
110
|
disableRipple: true,
|
|
119
|
-
onFocusVisible: handlerOnFocus,
|
|
120
|
-
onBlur: handlerOnBlur,
|
|
121
111
|
disabled,
|
|
122
112
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
123
113
|
src,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React__default, { useState, useMemo } from "react";
|
|
1
|
+
import React__default, { useState, useEffect, useMemo } from "react";
|
|
2
2
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
3
|
import { IconButton, MenuItem, Badge } from "@mui/material";
|
|
4
4
|
import { P as Popover } from "../Popover/index.9f35d0eb.js";
|
|
5
5
|
import { styled } from "@mui/material/styles";
|
|
6
|
-
import { I as Icon } from "../../Icon/index.
|
|
7
|
-
import { I as IconButton$1 } from "../IconButton/index.
|
|
6
|
+
import { I as Icon } from "../../Icon/index.c3a579e7.js";
|
|
7
|
+
import { I as IconButton$1 } from "../IconButton/index.be111a34.js";
|
|
8
8
|
import clsx from "clsx";
|
|
9
9
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
10
10
|
styled(IconButton)(() => ({}));
|
|
@@ -27,6 +27,7 @@ function MenuActions(props) {
|
|
|
27
27
|
endListElement,
|
|
28
28
|
menuActionSx,
|
|
29
29
|
className,
|
|
30
|
+
iconButtonClassName = "",
|
|
30
31
|
objItem = {},
|
|
31
32
|
urlIcon,
|
|
32
33
|
toolTip = "",
|
|
@@ -38,6 +39,8 @@ function MenuActions(props) {
|
|
|
38
39
|
withBadge = false,
|
|
39
40
|
badgeContent,
|
|
40
41
|
arrowType = "right-top",
|
|
42
|
+
externalOpen = null,
|
|
43
|
+
externalClose,
|
|
41
44
|
...other
|
|
42
45
|
} = props;
|
|
43
46
|
const {
|
|
@@ -49,22 +52,35 @@ function MenuActions(props) {
|
|
|
49
52
|
} = useModuleDictionary();
|
|
50
53
|
const [open, setOpen] = useState(null);
|
|
51
54
|
const handleOpen = (event) => {
|
|
55
|
+
console.log("MenuActions event", event);
|
|
52
56
|
console.log("handleOpen");
|
|
53
57
|
setOpen(event.currentTarget);
|
|
54
|
-
event.stopPropagation();
|
|
55
58
|
};
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
let mounted = true;
|
|
61
|
+
if (mounted) {
|
|
62
|
+
setOpen(externalOpen);
|
|
63
|
+
}
|
|
64
|
+
return function cleanUp() {
|
|
65
|
+
mounted = false;
|
|
66
|
+
};
|
|
67
|
+
}, [externalOpen]);
|
|
56
68
|
const urlFinalIcon = useMemo(() => {
|
|
57
69
|
if (urlIcon)
|
|
58
70
|
return urlIcon;
|
|
59
71
|
return `${host_static_assets}/${environment_assets}/frontend/components/menu_actions/assets/icons/${ICONS.MENU}`;
|
|
60
72
|
}, [urlIcon, host_static_assets, environment_assets]);
|
|
61
|
-
const handleClose = () => {
|
|
73
|
+
const handleClose = (e) => {
|
|
74
|
+
e.stopPropagation();
|
|
62
75
|
setOpen(null);
|
|
76
|
+
externalClose && externalClose(null);
|
|
77
|
+
console.log("Se ejecut\xF3 el handle close");
|
|
78
|
+
console.log("externalClose value", externalClose);
|
|
63
79
|
};
|
|
64
80
|
const handleClick = (e, menuAction) => {
|
|
81
|
+
e.stopPropagation();
|
|
65
82
|
setOpen(null);
|
|
66
83
|
menuAction.onClick();
|
|
67
|
-
e.stopPropagation();
|
|
68
84
|
};
|
|
69
85
|
const finalActions = useMemo(() => {
|
|
70
86
|
let ret;
|
|
@@ -83,12 +99,14 @@ function MenuActions(props) {
|
|
|
83
99
|
children: /* @__PURE__ */ jsx(IconButton$1, {
|
|
84
100
|
src: urlFinalIcon,
|
|
85
101
|
onClick: handleOpen,
|
|
86
|
-
tooltip: toolTip
|
|
102
|
+
tooltip: toolTip,
|
|
103
|
+
className: iconButtonClassName
|
|
87
104
|
})
|
|
88
105
|
}) : /* @__PURE__ */ jsx(IconButton$1, {
|
|
89
106
|
src: urlFinalIcon,
|
|
90
107
|
onClick: handleOpen,
|
|
91
|
-
tooltip: toolTip
|
|
108
|
+
tooltip: toolTip,
|
|
109
|
+
className: iconButtonClassName
|
|
92
110
|
})
|
|
93
111
|
});
|
|
94
112
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
@@ -19,6 +19,7 @@ export declare type MenuAction = {
|
|
|
19
19
|
className?: string;
|
|
20
20
|
};
|
|
21
21
|
export interface MenuActionsProps extends Omit<PopoverProps, 'open'> {
|
|
22
|
+
iconButtonClassName?: string;
|
|
22
23
|
objItem?: any;
|
|
23
24
|
urlIcon?: string;
|
|
24
25
|
menuActions: MenuAction[] | ((row: any) => MenuAction[]);
|
|
@@ -32,4 +33,6 @@ export interface MenuActionsProps extends Omit<PopoverProps, 'open'> {
|
|
|
32
33
|
menuActionSx?: SxProps<Theme> | Partial<OverridesStyleRules<string, ComponentNameToClassKey, Theme>>;
|
|
33
34
|
withBadge?: boolean;
|
|
34
35
|
badgeContent?: string;
|
|
36
|
+
externalOpen?: HTMLDivElement | null;
|
|
37
|
+
externalClose?: (element: null | HTMLDivElement) => void;
|
|
35
38
|
}
|
|
@@ -1,80 +1,12 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { styled } from "@mui/material/styles";
|
|
3
|
-
import { I as IconButton } from "../IconButton/index.a318316e.js";
|
|
4
|
-
import { useEnvironment } from "@m4l/core";
|
|
5
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
6
3
|
import { generateUtilityClasses, generateUtilityClass, useTheme, Select, InputBase, MenuItem } from "@mui/material";
|
|
7
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
5
|
import { T as Typography } from "../Typography/index.443590d6.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
marginLeft: 0,
|
|
14
|
-
[theme.breakpoints.up("sm")]: {
|
|
15
|
-
display: "flex",
|
|
16
|
-
alignItems: "center",
|
|
17
|
-
marginLeft: theme.spacing(3)
|
|
18
|
-
}
|
|
19
|
-
}));
|
|
20
|
-
function PagerActions(props) {
|
|
21
|
-
const {
|
|
22
|
-
count,
|
|
23
|
-
page,
|
|
24
|
-
rowsPerPage,
|
|
25
|
-
onPageChange,
|
|
26
|
-
classes
|
|
27
|
-
} = props;
|
|
28
|
-
const {
|
|
29
|
-
host_static_assets,
|
|
30
|
-
environment_assets
|
|
31
|
-
} = useEnvironment();
|
|
32
|
-
const handleFirstPageButtonClick = (event) => {
|
|
33
|
-
onPageChange(event, 0);
|
|
34
|
-
};
|
|
35
|
-
const handleBackButtonClick = (event) => {
|
|
36
|
-
onPageChange(event, page - 1);
|
|
37
|
-
};
|
|
38
|
-
const handleNextButtonClick = (event) => {
|
|
39
|
-
onPageChange(event, page + 1);
|
|
40
|
-
};
|
|
41
|
-
const handleLastPageButtonClick = (event) => {
|
|
42
|
-
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
|
|
43
|
-
};
|
|
44
|
-
return /* @__PURE__ */ jsxs(WrapperPagerActions, {
|
|
45
|
-
className: classes.pagerActions,
|
|
46
|
-
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
47
|
-
id: "test_bruce",
|
|
48
|
-
dictionaryTooltipId: "pager.first",
|
|
49
|
-
onClick: handleFirstPageButtonClick,
|
|
50
|
-
disabled: page === 0,
|
|
51
|
-
"aria-label": "first page",
|
|
52
|
-
className: classes.actionIconFirstPage,
|
|
53
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/first.svg`
|
|
54
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
55
|
-
dictionaryTooltipId: "pager.previous",
|
|
56
|
-
onClick: handleBackButtonClick,
|
|
57
|
-
disabled: page === 0,
|
|
58
|
-
"aria-label": "first page",
|
|
59
|
-
className: classes.actionIconPrevious,
|
|
60
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/previous.svg`
|
|
61
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
62
|
-
dictionaryTooltipId: "pager.next",
|
|
63
|
-
onClick: handleNextButtonClick,
|
|
64
|
-
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
65
|
-
"aria-label": "next page",
|
|
66
|
-
className: classes.actionIconNextPage,
|
|
67
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/next.svg`
|
|
68
|
-
}), /* @__PURE__ */ jsx(IconButton, {
|
|
69
|
-
dictionaryTooltipId: "pager.last",
|
|
70
|
-
onClick: handleLastPageButtonClick,
|
|
71
|
-
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
72
|
-
"aria-label": "last page",
|
|
73
|
-
className: classes.actionIconLastPage,
|
|
74
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/last.svg`
|
|
75
|
-
})]
|
|
76
|
-
});
|
|
77
|
-
}
|
|
6
|
+
import { I as IconButton } from "../IconButton/index.be111a34.js";
|
|
7
|
+
import { useEnvironment } from "@m4l/core";
|
|
8
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
9
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
78
10
|
const PagerRoot = styled("div")(({ theme }) => ({
|
|
79
11
|
...theme.components?.M4LPager?.styleOverrides
|
|
80
12
|
}));
|
|
@@ -156,6 +88,75 @@ const pagerUtilityClasses = () => {
|
|
|
156
88
|
...composedClasses
|
|
157
89
|
};
|
|
158
90
|
};
|
|
91
|
+
const WrapperPagerActions = styled("div")(({ theme }) => ({
|
|
92
|
+
width: "100%",
|
|
93
|
+
justifyContent: "center",
|
|
94
|
+
display: "flex",
|
|
95
|
+
marginLeft: 0,
|
|
96
|
+
[theme.breakpoints.up("sm")]: {
|
|
97
|
+
display: "flex",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
marginLeft: theme.spacing(3)
|
|
100
|
+
}
|
|
101
|
+
}));
|
|
102
|
+
function PagerActions(props) {
|
|
103
|
+
const {
|
|
104
|
+
count,
|
|
105
|
+
page,
|
|
106
|
+
rowsPerPage,
|
|
107
|
+
onPageChange,
|
|
108
|
+
classes
|
|
109
|
+
} = props;
|
|
110
|
+
const {
|
|
111
|
+
host_static_assets,
|
|
112
|
+
environment_assets
|
|
113
|
+
} = useEnvironment();
|
|
114
|
+
const handleFirstPageButtonClick = (event) => {
|
|
115
|
+
onPageChange(event, 0);
|
|
116
|
+
};
|
|
117
|
+
const handleBackButtonClick = (event) => {
|
|
118
|
+
onPageChange(event, page - 1);
|
|
119
|
+
};
|
|
120
|
+
const handleNextButtonClick = (event) => {
|
|
121
|
+
onPageChange(event, page + 1);
|
|
122
|
+
};
|
|
123
|
+
const handleLastPageButtonClick = (event) => {
|
|
124
|
+
onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
|
|
125
|
+
};
|
|
126
|
+
return /* @__PURE__ */ jsxs(WrapperPagerActions, {
|
|
127
|
+
className: classes.pagerActions,
|
|
128
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
129
|
+
id: "test_bruce",
|
|
130
|
+
dictionaryTooltipId: "pager.first",
|
|
131
|
+
onClick: handleFirstPageButtonClick,
|
|
132
|
+
disabled: page === 0,
|
|
133
|
+
"aria-label": "first page",
|
|
134
|
+
className: classes.actionIconFirstPage,
|
|
135
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/first.svg`
|
|
136
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
137
|
+
dictionaryTooltipId: "pager.previous",
|
|
138
|
+
onClick: handleBackButtonClick,
|
|
139
|
+
disabled: page === 0,
|
|
140
|
+
"aria-label": "first page",
|
|
141
|
+
className: classes.actionIconPrevious,
|
|
142
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/previous.svg`
|
|
143
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
144
|
+
dictionaryTooltipId: "pager.next",
|
|
145
|
+
onClick: handleNextButtonClick,
|
|
146
|
+
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
147
|
+
"aria-label": "next page",
|
|
148
|
+
className: classes.actionIconNextPage,
|
|
149
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/next.svg`
|
|
150
|
+
}), /* @__PURE__ */ jsx(IconButton, {
|
|
151
|
+
dictionaryTooltipId: "pager.last",
|
|
152
|
+
onClick: handleLastPageButtonClick,
|
|
153
|
+
disabled: page >= Math.ceil(count / rowsPerPage) - 1,
|
|
154
|
+
"aria-label": "last page",
|
|
155
|
+
className: classes.actionIconLastPage,
|
|
156
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/pager/assets/icons/last.svg`
|
|
157
|
+
})]
|
|
158
|
+
});
|
|
159
|
+
}
|
|
159
160
|
const CustomTablePagination = (props) => {
|
|
160
161
|
const {
|
|
161
162
|
count,
|
|
@@ -167,9 +168,9 @@ const CustomTablePagination = (props) => {
|
|
|
167
168
|
onRowsPerPageChange,
|
|
168
169
|
onPageChange,
|
|
169
170
|
SelectProps,
|
|
170
|
-
labelDisplayedRows = defaultLabelDisplayedRows
|
|
171
|
-
ActionsComponent
|
|
171
|
+
labelDisplayedRows = defaultLabelDisplayedRows
|
|
172
172
|
} = props;
|
|
173
|
+
const isDesktop = useResponsiveDesktop();
|
|
173
174
|
const theme = useTheme();
|
|
174
175
|
function defaultLabelDisplayedRows({
|
|
175
176
|
from,
|
|
@@ -187,16 +188,18 @@ const CustomTablePagination = (props) => {
|
|
|
187
188
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
188
189
|
children: [rowsPerPageOptions?.length > 1 ? /* @__PURE__ */ jsxs("div", {
|
|
189
190
|
className: classes.labelRowsPerPageContainer,
|
|
190
|
-
children: [/* @__PURE__ */ jsx(Typography, {
|
|
191
|
+
children: [isDesktop ? /* @__PURE__ */ jsx(Typography, {
|
|
191
192
|
variant: "body",
|
|
192
193
|
children: labelRowsPerPage
|
|
193
|
-
}), /* @__PURE__ */ jsx(Select, {
|
|
194
|
+
}) : null, /* @__PURE__ */ jsx(Select, {
|
|
194
195
|
variant: "standard",
|
|
195
196
|
...!SelectProps?.variant && {
|
|
196
197
|
input: /* @__PURE__ */ jsx(InputBase, {})
|
|
197
198
|
},
|
|
198
199
|
value: rowsPerPage,
|
|
199
|
-
onChange:
|
|
200
|
+
onChange: (e) => {
|
|
201
|
+
onRowsPerPageChange(e);
|
|
202
|
+
},
|
|
200
203
|
className: classes.select,
|
|
201
204
|
MenuProps: {
|
|
202
205
|
className: classes.selectMenuPopover,
|
|
@@ -220,11 +223,11 @@ const CustomTablePagination = (props) => {
|
|
|
220
223
|
count: count === -1 ? -1 : count,
|
|
221
224
|
page
|
|
222
225
|
})
|
|
223
|
-
}), /* @__PURE__ */ jsx(
|
|
226
|
+
}), /* @__PURE__ */ jsx(PagerActions, {
|
|
224
227
|
count,
|
|
225
228
|
page,
|
|
226
229
|
rowsPerPage,
|
|
227
|
-
onPageChange
|
|
230
|
+
onPageChange,
|
|
228
231
|
classes
|
|
229
232
|
})]
|
|
230
233
|
});
|
|
@@ -247,7 +250,7 @@ function Pager(props) {
|
|
|
247
250
|
}
|
|
248
251
|
return page;
|
|
249
252
|
}, [page, rowsPerPage, totalRecords]);
|
|
250
|
-
const handleChangeRowsPerPage = (event
|
|
253
|
+
const handleChangeRowsPerPage = (event) => {
|
|
251
254
|
onRowsPerPageChange(parseInt(event.target.value, 10));
|
|
252
255
|
onPageChange(0);
|
|
253
256
|
};
|
|
@@ -270,8 +273,7 @@ function Pager(props) {
|
|
|
270
273
|
from,
|
|
271
274
|
to,
|
|
272
275
|
count
|
|
273
|
-
}) => `${from}-${to} ${labelOf} ${count}` : () =>
|
|
274
|
-
ActionsComponent: PagerActions
|
|
276
|
+
}) => `${from}-${to} ${labelOf} ${count}` : () => ``
|
|
275
277
|
})
|
|
276
278
|
});
|
|
277
279
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CustomTablePaginationProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Todo:
|
|
5
|
+
* 1 Trabajar con el modelo de diccionarios.
|
|
6
|
+
* 2
|
|
7
|
+
*/
|
|
3
8
|
export declare const CustomTablePagination: (props: CustomTablePaginationProps) => import("react").JSX.Element;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { SelectChangeEvent, TablePaginationProps } from "@mui/material";
|
|
2
2
|
import { Classes } from "../../classes/types";
|
|
3
|
-
import { PagerActionsProps } from "../PagerActions/types";
|
|
4
|
-
import { ReactNode } from "react";
|
|
5
3
|
export declare type CustomTablePaginationProps = {
|
|
6
4
|
rowsPerPageOptions: number[];
|
|
7
5
|
onPageChange: (_event: unknown, newPage: number) => void;
|
|
8
6
|
labelRowsPerPage: string;
|
|
9
7
|
classes: Classes;
|
|
10
|
-
onRowsPerPageChange: (event: SelectChangeEvent<unknown
|
|
11
|
-
ActionsComponent: React.ElementType<PagerActionsProps>;
|
|
8
|
+
onRowsPerPageChange: (event: SelectChangeEvent<unknown>) => void;
|
|
12
9
|
} & Omit<TablePaginationProps, 'onPageChange' | 'onRowsPerPageChange' | 'classes' | 'ActionsComponent'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const componentName = "M4LStack";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { generateUtilityClasses, generateUtilityClass, styled, Stack as Stack$1 } from "@mui/material";
|
|
2
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
const componentName = "M4LStack";
|
|
6
|
+
generateUtilityClasses(componentName, [
|
|
7
|
+
"root"
|
|
8
|
+
]);
|
|
9
|
+
function getStackUtilityClass(slot) {
|
|
10
|
+
return generateUtilityClass(componentName, slot);
|
|
11
|
+
}
|
|
12
|
+
const useStackUtilityClasses = () => {
|
|
13
|
+
const slots = {
|
|
14
|
+
root: ["root"]
|
|
15
|
+
};
|
|
16
|
+
const composedClasses = unstable_composeClasses(slots, getStackUtilityClass, {});
|
|
17
|
+
return {
|
|
18
|
+
...composedClasses
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
const MUISTack = styled(Stack$1)(({ theme }) => ({
|
|
22
|
+
...theme.components?.M4LStack?.styleOverrides
|
|
23
|
+
}));
|
|
24
|
+
const classes = useStackUtilityClasses();
|
|
25
|
+
const Stack = (props) => {
|
|
26
|
+
const {
|
|
27
|
+
children,
|
|
28
|
+
className,
|
|
29
|
+
...others
|
|
30
|
+
} = props;
|
|
31
|
+
return /* @__PURE__ */ jsx(MUISTack, {
|
|
32
|
+
...others,
|
|
33
|
+
className: clsx(classes.root, className),
|
|
34
|
+
children
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
Stack as S
|
|
39
|
+
};
|
|
@@ -1,17 +1,49 @@
|
|
|
1
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
2
|
-
import { generateUtilityClasses, generateUtilityClass, Tab as Tab$1, Skeleton } from "@mui/material";
|
|
3
|
-
import { styled } from "@mui/material/styles";
|
|
4
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
5
1
|
import clsx from "clsx";
|
|
6
|
-
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
7
|
-
import { g as getNameDataTestId } from "../../../vendor.5365cc7e.js";
|
|
8
2
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
|
|
3
|
+
import { generateUtilityClasses, generateUtilityClass, styled, Tabs as Tabs$1, Tab as Tab$1, Skeleton } from "@mui/material";
|
|
4
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
+
import { useModuleSkeleton } from "@m4l/core";
|
|
6
|
+
import { styled as styled$1 } from "@mui/material/styles";
|
|
7
|
+
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
8
|
+
import { g as getNameDataTestId } from "../../../vendor.f27b86c9.js";
|
|
9
|
+
const componentName$1 = "M4LTabs";
|
|
10
|
+
generateUtilityClasses(componentName$1, [
|
|
11
|
+
"root"
|
|
12
|
+
]);
|
|
13
|
+
function getTabsUtilityClass(slot) {
|
|
14
|
+
return generateUtilityClass(componentName$1, slot);
|
|
15
|
+
}
|
|
16
|
+
const useTabsUtilityClasses = () => {
|
|
17
|
+
const slots = {
|
|
18
|
+
root: ["root"]
|
|
19
|
+
};
|
|
20
|
+
const composedClasses = unstable_composeClasses(slots, getTabsUtilityClass, {});
|
|
21
|
+
return {
|
|
22
|
+
...composedClasses
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const MUITabs = styled(Tabs$1)(({ theme }) => ({
|
|
26
|
+
...theme.components?.M4LTabs?.styleOverrides
|
|
27
|
+
}));
|
|
28
|
+
const Tabs = (props) => {
|
|
29
|
+
const {
|
|
30
|
+
children,
|
|
31
|
+
className,
|
|
32
|
+
...others
|
|
33
|
+
} = props;
|
|
34
|
+
const classes = useTabsUtilityClasses();
|
|
35
|
+
return /* @__PURE__ */ jsx(MUITabs, {
|
|
36
|
+
className: clsx(classes.root, className),
|
|
37
|
+
...others,
|
|
38
|
+
children
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const TabRoot = styled$1("div")(({
|
|
10
42
|
theme
|
|
11
43
|
}) => ({
|
|
12
44
|
...theme.components?.M4LTab?.styleOverrides
|
|
13
45
|
}));
|
|
14
|
-
const SKTTabWrapper = styled("div")(({
|
|
46
|
+
const SKTTabWrapper = styled$1("div")(({
|
|
15
47
|
theme
|
|
16
48
|
}) => ({
|
|
17
49
|
padding: theme.spacing(1.5, 2)
|
|
@@ -66,5 +98,6 @@ function Tab(props) {
|
|
|
66
98
|
});
|
|
67
99
|
}
|
|
68
100
|
export {
|
|
69
|
-
Tab as T
|
|
101
|
+
Tab as T,
|
|
102
|
+
Tabs as a
|
|
70
103
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const componentName = "M4LTabs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tabs } from './Tabs';
|
|
@@ -16,6 +16,8 @@ export { LoadingButton } from './LoadingButton';
|
|
|
16
16
|
export { MenuActions } from './MenuActions';
|
|
17
17
|
export type { MenuAction, ComponentActionProps } from './MenuActions/types';
|
|
18
18
|
export * from './Popover/Popover';
|
|
19
|
+
export * from './Stack';
|
|
20
|
+
export * from './Tabs';
|
|
19
21
|
export { Pager } from './Pager';
|
|
20
22
|
export type { PagerProps } from './Pager/types';
|
|
21
23
|
export { getPagerComponentsDictionary } from './Pager/dicctionary';
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import "@mui/material";
|
|
2
2
|
import "react";
|
|
3
3
|
import "@m4l/core";
|
|
4
|
-
import "../Icon/index.
|
|
4
|
+
import "../Icon/index.c3a579e7.js";
|
|
5
5
|
import "clsx";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
|
-
import "./IconButton/index.
|
|
7
|
+
import "./IconButton/index.be111a34.js";
|
|
8
8
|
import "@m4l/graphics";
|
|
9
|
-
import "./Accordion/index.
|
|
9
|
+
import "./Accordion/index.854f4c90.js";
|
|
10
10
|
import "./Typography/index.443590d6.js";
|
|
11
11
|
import "./Avatar/index.75e6ed57.js";
|
|
12
12
|
import "react-router-dom";
|
|
13
13
|
import "@mui/material/Button";
|
|
14
14
|
import "./Button/index.40af964e.js";
|
|
15
|
-
import "./CheckBox.
|
|
16
|
-
import "./Badge/index.
|
|
15
|
+
import "./CheckBox.38abccd8.js";
|
|
16
|
+
import "./Badge/index.8c2b8b66.js";
|
|
17
17
|
import "../Image/index.c18ebf5a.js";
|
|
18
18
|
import "@mui/lab";
|
|
19
|
-
import "./MenuActions/index.
|
|
19
|
+
import "./MenuActions/index.b16e84c1.js";
|
|
20
20
|
import "./Popover/index.9f35d0eb.js";
|
|
21
|
-
import "./
|
|
22
|
-
import "./Tab/index.
|
|
21
|
+
import "./Stack/index.0e53197c.js";
|
|
22
|
+
import "./Tab/index.c1dc7bbf.js";
|
|
23
|
+
import "./Pager/index.5b77fa4c.js";
|
|
23
24
|
import "./Tooltip/index.5a795dcd.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useState } from "react";
|
|
2
|
-
import { M as ModalDialog } from "../../components/ModalDialog/index.
|
|
2
|
+
import { M as ModalDialog } from "../../components/ModalDialog/index.b85ee3cb.js";
|
|
3
3
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
4
|
const ModalContext = createContext(null);
|
|
5
5
|
function ModalProvider({
|
|
@@ -2,7 +2,7 @@ import { useEffect } from "react";
|
|
|
2
2
|
import { useForm, FormProvider } from "react-hook-form";
|
|
3
3
|
import { yupResolver } from "@hookform/resolvers/yup";
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
|
-
import { S as ScrollBar } from "../../components/ScrollBar/index.
|
|
5
|
+
import { S as ScrollBar } from "../../components/ScrollBar/index.1247c1c5.js";
|
|
6
6
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { M as ModalContext } from "../../contexts/ModalContext/index.
|
|
2
|
+
import { M as ModalContext } from "../../contexts/ModalContext/index.1ea79d7e.js";
|
|
3
3
|
function useModal() {
|
|
4
4
|
const context = useContext(ModalContext);
|
|
5
5
|
if (!context)
|