@m4l/components 0.2.36 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AccountPopover/{index.a9dc9f92.js → index.efc74d5c.js} +3 -5
- package/components/AppBar/{index.7dee7427.js → index.fc126a22.js} +6 -5
- package/components/AppBar/styles.d.ts +1 -1
- package/components/CommonActions/components/Actions/styles.d.ts +1 -1
- package/components/DataGrid/styles.d.ts +1 -1
- package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/styles.d.ts +7 -7
- package/components/DragResizeWindow/{index.a9f25040.js → index.46b380e1.js} +3 -6
- package/components/DynamicFilter/dynamicFilterSlots.d.ts +76 -101
- package/components/DynamicFilter/{index.48d809e2.js → index.d9168c12.js} +22 -96
- package/components/FieldLabel/{index.2622ee40.js → index.f9cdcc27.js} +4 -4
- package/components/GridLayout/{index.b9c47a4c.js → index.bb3b7769.js} +23 -46
- package/components/GridLayout/subcomponents/Griditem/{index.69bc14e5.js → index.bb23f651.js} +4 -3
- package/components/GridLayout/subcomponents/Responsive/{index.094c1d09.js → index.b8a2a121.js} +2 -1
- package/components/GridLayout/subcomponents/SizeProvider/{index.e1d2df80.js → index.094bc6b5.js} +1 -1
- package/components/{commercial/index.b90488db.js → HamburgerMenu/index.5997af31.js} +4 -6
- package/components/HelperText/{index.81c5d349.js → index.be949cdf.js} +3 -2
- package/components/HelperText/styles.d.ts +1 -1
- package/components/Icon/index.d5fed418.js +420 -0
- package/components/Icon/styles.d.ts +2 -2
- package/components/{hook-form/RHFUpload/index.c5e5c61c.js → Image/index.36a3d440.js} +233 -32
- package/components/Image/styles.d.ts +1 -1
- package/components/LanguagePopover/{index.72f316fc.js → index.e6fa2336.js} +5 -8
- package/components/LanguagePopover/styles.d.ts +5 -5
- package/components/LinearProgressIndeterminate/{index.2ecd571e.js → index.de9d447c.js} +2 -4
- package/components/Loadable/{index.97fe63f9.js → index.e83cdb4e.js} +1 -1
- package/components/LoadingError/{index.7aaba1cf.js → index.9f00c83c.js} +8 -12
- package/components/LoadingError/styles.d.ts +1 -1
- package/components/MFLoader/{index.40c419c0.js → index.402c1acc.js} +4 -8
- package/components/ModalDialog/{index.42349189.js → index.ea9189c3.js} +5 -14
- package/components/NavLink/{index.9e847eb5.js → index.4e548cee.js} +4 -4
- package/components/NavLink/styles.d.ts +1 -1
- package/components/NoItemSelected/{index.5a8160fd.js → index.418c8316.js} +6 -15
- package/components/NoItemSelected/styles.d.ts +4 -4
- package/components/ObjectLogs/{index.6955149e.js → index.bfa7dad3.js} +10 -27
- package/components/ObjectLogs/styles.d.ts +3 -3
- package/components/PDFViewer/{index.47bb0928.js → index.bb2eca5a.js} +2 -2
- package/components/{mui_extended/Pager/index.1ba2d52b.js → Page/index.fdf04592.js} +134 -26
- package/components/PaperForm/{index.9f6fd02d.js → index.8121e3da.js} +8 -7
- package/components/PaperForm/styles.d.ts +6 -6
- package/components/Period/{index.c6d1a95a.js → index.5233694b.js} +157 -22
- package/components/Period/styles.d.ts +5 -5
- package/components/PrintingSystem/{index.f51a00f8.js → index.fb176a93.js} +14 -14
- package/components/PrintingSystem/subcomponents/BodyNode/{index.6792c353.js → index.c1d61038.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.eec6b4cd.js → index.18bd9bad.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.e58467c9.js → index.67d9f1b4.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.920b75c9.js → index.eaee152a.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.6c1ad53c.js → index.f5f63a2a.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.e8b151ad.js → index.7de4e411.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.bf199422.js → index.f9ccf22b.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.44d436b9.js → index.f2f2e903.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.879cf13d.js → index.540a4b19.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.eb6af0ca.js → index.41e7fcb0.js} +1 -1
- package/components/PropertyValue/{index.5e59580c.js → index.9572c347.js} +4 -7
- package/components/Resizeable/{index.5e8e48b1.js → index.1f0c1359.js} +7 -7
- package/components/ResizeableWindow/styles.d.ts +1 -1
- package/components/ScrollBar/{index.4b965665.js → index.adf0eade.js} +2 -4
- package/components/SideBar/classes/index.d.ts +1 -1
- package/components/SideBar/{index.5d1f4a23.js → index.629ba840.js} +24 -26
- package/components/SideBar/styles.d.ts +2 -2
- package/components/SideBar/subcomponents/ContentGroups/styles.d.ts +3 -3
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/styles.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +2 -18
- package/components/SplitLayout/{index.15756f0f.js → index.74091a81.js} +1 -3
- package/components/ToastContainer/{index.dbd78941.js → index.f9b507b9.js} +3 -3
- package/components/animate/LoadingScreen/{index.1a83615a.js → index.779690a7.js} +3 -5
- package/components/animate/PropagateLoader/{index.76d7ea70.js → index.a9da8d00.js} +3 -2
- package/components/animate/PropagateLoader/syles.d.ts +1 -1
- package/components/animate/{index.87296638.js → index.b8497385.js} +3 -2
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/styles.d.ts +3 -3
- package/components/areas/constants.5387d83e.js +412 -0
- package/components/areas/contexts/AreasContext/{index.19c7b906.js → index.bb316000.js} +5 -6
- package/components/areas/contexts/DynamicMFParmsContext/{index.3d9ad0ad.js → index.37d1d444.js} +2 -2
- package/components/areas/contexts/WindowToolsMFContext/{index.992ae7a3.js → index.69d95c15.js} +2 -2
- package/components/areas/dictionary.7e74022a.js +286 -0
- package/components/areas/hooks/useAreas/{index.cedd30ee.js → index.e24bd74d.js} +1 -1
- package/components/areas/hooks/useDynamicMFParameters/{index.9e09e1e3.js → index.03ce6078.js} +1 -1
- package/components/areas/hooks/useWindowToolsMF/{index.2fbae9dc.js → index.09801b66.js} +1 -1
- package/components/areas/icons.504ec098.js +83 -0
- package/components/commercial/HamburgerMenu/styles.d.ts +1 -1
- package/components/commercial/SectionCommercial/styles.d.ts +4 -9
- package/components/hook-form/RHFAutocomplete/classes/index.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/styles.d.ts +1 -1
- package/components/hook-form/RHFAutocomplete/subcomponents/RenderOption/styles.d.ts +1 -1
- package/components/hook-form/RHFAutocompleteAsync/styles.d.ts +4 -4
- package/components/hook-form/RHFCheckbox/styles.d.ts +2 -10
- package/components/hook-form/RHFPeriod/styles.d.ts +1 -1
- package/components/hook-form/RHFTextField/styles.d.ts +2 -2
- package/components/hook-form/RHFTextField/subcomponents/Skeleton/styles.d.ts +2 -2
- package/components/hook-form/RHFTextFieldPassword/styles.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/styles.d.ts +1 -1
- package/components/maps/components/GpsTools/{index.4ea69dd1.js → index.75880ce0.js} +14 -136
- package/components/maps/components/GpsTools/subcomponents/TabsGpsTools/subcomponents/GeofencesList/styles.d.ts +4 -9
- package/components/maps/{components/Map/index.62b7d09b.js → index.8ec46ce4.js} +19 -194
- package/components/modal/{WindowBase.2414cd02.js → WindowBase.a3ac7adc.js} +3 -4
- package/components/modal/{WindowConfirm.48140481.js → WindowConfirm.e35da619.js} +6 -10
- package/components/modal/{index.81eb6def.js → index.a0e30c8b.js} +1 -5
- package/components/mui_extended/Accordion/styles.d.ts +3 -3
- package/components/mui_extended/Badge/styles.d.ts +1 -1
- package/components/mui_extended/Button/styles.d.ts +2 -10
- package/components/mui_extended/IconButton/styles.d.ts +1 -1
- package/components/mui_extended/ImageButton/styles.d.ts +1 -1
- package/components/mui_extended/MenuActions/styles.d.ts +2 -27
- package/components/mui_extended/Pager/styles.d.ts +1 -1
- package/components/mui_extended/Stack/styles.d.ts +2 -9
- package/components/mui_extended/Tab/styles.d.ts +2 -2
- package/components/mui_extended/Tabs/styles.d.ts +3 -58
- package/components/mui_extended/Typography/styles.d.ts +1 -1
- package/components/popups/PopupsProvider/{index.8fb6232a.js → index.18669fb4.js} +1 -1
- package/components/popups/PopupsViewer/{index.813854e4.js → index.ba354267.js} +5 -10
- package/contexts/ModalContext/{index.45c275cd.js → index.cf02e6bd.js} +1 -1
- package/contexts/RHFormContext/{index.bf3a2812.js → index.dc955a09.js} +2 -6
- package/hooks/useFormAddEdit/{index.9b27ca02.js → index.f156a2cd.js} +4 -8
- package/hooks/useModal/index.ef54bcf2.js +66 -0
- package/hooks/useTab/{index.f7973779.js → index.bce8b99e.js} +1 -1
- package/index.d.ts +0 -1
- package/index.js +276 -360
- package/package.json +3 -2
- package/{react-draggable.79b4c69a.js → react-draggable.5331add7.js} +1 -1
- package/{react-resizable.af1f31c1.js → react-resizable.37bfb965.js} +3 -5
- package/test/{getNameDataTestId.0faeade8.js → getNameDataTestId.aee44365.js} +2 -2
- package/test/index.6d4b98b9.js +4 -0
- package/utils/{index.0718eeac.js → index.9ee4c99a.js} +113 -3
- package/vendor.a1ce6777.js +6352 -0
- package/assets/Logo/index.109a182d.js +0 -38
- package/assets/Logo.d.ts +0 -6
- package/components/CommonActions/components/ActionCancel/index.46f636e9.js +0 -12
- package/components/CommonActions/components/ActionFormCancel/index.2b0bd50d.js +0 -56
- package/components/CommonActions/components/ActionFormIntro/index.4f212c39.js +0 -33
- package/components/CommonActions/components/ActionIntro/index.7406bd47.js +0 -25
- package/components/CommonActions/components/Actions/index.273645af.js +0 -70
- package/components/DataGrid/constants.e334cd50.js +0 -10
- package/components/DataGrid/formatters/ColumnBooleanFormatter/index.cee6b676.js +0 -26
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/index.708f3fb5.js +0 -22
- package/components/DataGrid/formatters/ColumnDateFormatter/index.e00d0cf2.js +0 -19
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/index.c064bb07.js +0 -23
- package/components/DataGrid/formatters/ColumnNestedValueFormatter/index.880e743b.js +0 -14
- package/components/DataGrid/formatters/ColumnPointsFormatter/index.226cc583.js +0 -10
- package/components/DataGrid/formatters/ColumnPriceFormatter/index.bf9d9e60.js +0 -10
- package/components/DataGrid/formatters/ColumnSetCheckFormatter/index.4045b2f2.js +0 -36
- package/components/DataGrid/formatters/ColumnUncertaintyFormatter/index.a87302d1.js +0 -10
- package/components/DataGrid/formatters/index.2c2f0ae4.js +0 -1
- package/components/DataGrid/index.304437ee.js +0 -917
- package/components/DataGrid/subcomponents/Actions/index.f14590d2.js +0 -595
- package/components/DataGrid/subcomponents/editors/TextEditor/index.3f0d9e28.js +0 -76
- package/components/Icon/index.ee7b85c9.js +0 -192
- package/components/Image/index.8cc036b1.js +0 -168
- package/components/Page/index.c1d4a319.js +0 -114
- package/components/animate/variants/index.7a912140.js +0 -1
- package/components/areas/components/AreasAdmin/index.f239c717.js +0 -733
- package/components/areas/components/AreasViewer/index.61e0538b.js +0 -1071
- package/components/areas/components/index.558684b3.js +0 -1
- package/components/areas/constants.66529246.js +0 -6
- package/components/areas/contexts/index.24025b97.js +0 -1
- package/components/areas/dictionary.08cfc4c9.js +0 -36
- package/components/areas/hooks/index.d9dc1e21.js +0 -1
- package/components/areas/icons.8266ccc8.js +0 -26
- package/components/areas/index.4cc6a221.js +0 -22
- package/components/commercial/AppBarCommercial/index.9f654f8e.js +0 -28
- package/components/commercial/SectionCommercial/index.3df4685b.js +0 -57
- package/components/commercial/TopBar/index.7aeb6ec0.js +0 -234
- package/components/formatters/BooleanFormatter/index.0c2d8e35.js +0 -44
- package/components/formatters/DateFormatter/index.2ef6f261.js +0 -43
- package/components/formatters/PointsFormatter/index.d8a4ee54.js +0 -25
- package/components/formatters/PriceFormatter/index.97f75b4b.js +0 -35
- package/components/formatters/UncertaintyFormatter/index.c3ffdebc.js +0 -29
- package/components/formatters/index.b816c6b6.js +0 -117
- package/components/hook-form/HelperError/index.c8b046b7.js +0 -19
- package/components/hook-form/RHFAutocomplete/index.ea2ac2b1.js +0 -408
- package/components/hook-form/RHFAutocompleteAsync/index.98dcf0de.js +0 -158
- package/components/hook-form/RHFCheckbox/index.c32278fa.js +0 -142
- package/components/hook-form/RHFColorPicker/index.8c939bfd.js +0 -191
- package/components/hook-form/RHFDateTime/index.ac27deab.js +0 -190
- package/components/hook-form/RHFMultiCheckbox/index.437e6ba3.js +0 -34
- package/components/hook-form/RHFPeriod/index.70cfc422.js +0 -104
- package/components/hook-form/RHFRadioGroup/index.11c0add8.js +0 -35
- package/components/hook-form/RHFSelect/index.c6c60ecc.js +0 -29
- package/components/hook-form/RHFTextField/index.fa97889a.js +0 -325
- package/components/maps/index.13bb982c.js +0 -7
- package/components/mui_extended/Accordion/index.d08a0361.js +0 -142
- package/components/mui_extended/Avatar/index.fb9ad158.js +0 -63
- package/components/mui_extended/Badge/index.2a3aef2c.js +0 -30
- package/components/mui_extended/BoxIcon/index.d61e7ac5.js +0 -22
- package/components/mui_extended/Breadcrumbs/index.4a44883c.js +0 -87
- package/components/mui_extended/Button/index.5395d101.js +0 -213
- package/components/mui_extended/CheckBox.256169f0.js +0 -76
- package/components/mui_extended/CircularProgress/index.967e70b7.js +0 -8
- package/components/mui_extended/IconButton/index.b0ee4965.js +0 -119
- package/components/mui_extended/LinearProgress/index.4092bb69.js +0 -9
- package/components/mui_extended/LinkWithRoute/index.288c51f3.js +0 -15
- package/components/mui_extended/MenuActions/index.d92ed0d6.js +0 -175
- package/components/mui_extended/Popover/index.4e7340b4.js +0 -142
- package/components/mui_extended/Stack/index.fe363ca5.js +0 -31
- package/components/mui_extended/Tab/index.c5ad86e2.js +0 -134
- package/components/mui_extended/ToggleButton/index.7fbc8614.js +0 -18
- package/components/mui_extended/ToggleIconButton/index.0cd347b4.js +0 -24
- package/components/mui_extended/Tooltip/index.49bb5ee1.js +0 -40
- package/components/mui_extended/Typography/index.a1e774a2.js +0 -54
- package/components/mui_extended/index.b606cd9d.js +0 -1
- package/hooks/useModal/index.30674bb7.js +0 -11
- package/style.css +0 -65
- package/test/constants_no_mock.86c553a9.js +0 -4
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import { useModuleDictionary } from "@m4l/core";
|
|
4
|
-
import { Link, Box, Typography, Breadcrumbs as Breadcrumbs$1 } from "@mui/material";
|
|
5
|
-
import { Link as Link$1 } from "react-router-dom";
|
|
6
|
-
function LinkItem({ link }) {
|
|
7
|
-
const { href, name, icon, dictionaryField: dictionaryDescription } = link;
|
|
8
|
-
const { getLabel } = useModuleDictionary();
|
|
9
|
-
return /* @__PURE__ */ jsxs(
|
|
10
|
-
Link,
|
|
11
|
-
{
|
|
12
|
-
variant: "body2",
|
|
13
|
-
component: Link$1,
|
|
14
|
-
to: href || "#",
|
|
15
|
-
sx: {
|
|
16
|
-
lineHeight: 2,
|
|
17
|
-
display: "flex",
|
|
18
|
-
alignItems: "center",
|
|
19
|
-
color: "text.primary",
|
|
20
|
-
"& > div": { display: "inherit" }
|
|
21
|
-
},
|
|
22
|
-
children: [
|
|
23
|
-
icon && /* @__PURE__ */ jsx(Box, { sx: { mr: 1, "& svg": { width: 20, height: 20 } }, children: icon }),
|
|
24
|
-
dictionaryDescription !== void 0 && getLabel ? getLabel(dictionaryDescription) : name
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
name
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
function Breadcrumbs(props) {
|
|
31
|
-
const { links, activeLast = false, ...other } = props;
|
|
32
|
-
const { getLabel } = useModuleDictionary();
|
|
33
|
-
const currentLink = useMemo(() => {
|
|
34
|
-
if (links.length === 0)
|
|
35
|
-
return "";
|
|
36
|
-
const { dictionaryField } = links[links.length - 1];
|
|
37
|
-
return getLabel(dictionaryField);
|
|
38
|
-
}, [getLabel, links]);
|
|
39
|
-
const listDefault = useMemo(
|
|
40
|
-
() => links.map((link) => /* @__PURE__ */ jsx(LinkItem, { link }, link.name)),
|
|
41
|
-
[links]
|
|
42
|
-
);
|
|
43
|
-
const listActiveLast = useMemo(
|
|
44
|
-
() => links.map(
|
|
45
|
-
(link) => link.name !== currentLink ? /* @__PURE__ */ jsx(LinkItem, { link }, link.name) : /* @__PURE__ */ jsx(
|
|
46
|
-
Typography,
|
|
47
|
-
{
|
|
48
|
-
variant: "body2",
|
|
49
|
-
sx: {
|
|
50
|
-
maxWidth: 260,
|
|
51
|
-
overflow: "hidden",
|
|
52
|
-
whiteSpace: "nowrap",
|
|
53
|
-
color: "text.disabled",
|
|
54
|
-
textOverflow: "ellipsis"
|
|
55
|
-
},
|
|
56
|
-
children: currentLink
|
|
57
|
-
},
|
|
58
|
-
link.name
|
|
59
|
-
)
|
|
60
|
-
),
|
|
61
|
-
[currentLink, links]
|
|
62
|
-
);
|
|
63
|
-
return /* @__PURE__ */ jsx(
|
|
64
|
-
Breadcrumbs$1,
|
|
65
|
-
{
|
|
66
|
-
id: "MUIBreadcrumbs",
|
|
67
|
-
separator: /* @__PURE__ */ jsx(
|
|
68
|
-
Box,
|
|
69
|
-
{
|
|
70
|
-
component: "span",
|
|
71
|
-
sx: {
|
|
72
|
-
width: 4,
|
|
73
|
-
height: 4,
|
|
74
|
-
mx: 0.5,
|
|
75
|
-
borderRadius: "50%",
|
|
76
|
-
bgcolor: "text.disabled"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
),
|
|
80
|
-
...other,
|
|
81
|
-
children: activeLast ? listDefault : listActiveLast
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
export {
|
|
86
|
-
Breadcrumbs as B
|
|
87
|
-
};
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
3
|
-
import { styled, Skeleton, generateUtilityClasses, generateUtilityClass, IconButton, Tooltip } from "@mui/material";
|
|
4
|
-
import MuiButton from "@mui/material/Button";
|
|
5
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
6
|
-
import clsx from "clsx";
|
|
7
|
-
import { useMemo } from "react";
|
|
8
|
-
import { I as Image } from "../../Image/index.8cc036b1.js";
|
|
9
|
-
import { T as TEST_PROP_ID } from "../../../test/constants_no_mock.86c553a9.js";
|
|
10
|
-
import { LoadingButton as LoadingButton$1 } from "@mui/lab";
|
|
11
|
-
import { T as Typography } from "../Typography/index.a1e774a2.js";
|
|
12
|
-
const ButtonRoot = styled("div")(({ theme }) => ({
|
|
13
|
-
...theme.components?.M4LButton?.styleOverrides
|
|
14
|
-
}));
|
|
15
|
-
styled(Skeleton)(({ theme }) => ({
|
|
16
|
-
borderRadius: theme.spacing(0.5)
|
|
17
|
-
}));
|
|
18
|
-
const componentName$2 = "M4LButton";
|
|
19
|
-
const buttonClasses = generateUtilityClasses(componentName$2, [
|
|
20
|
-
"root",
|
|
21
|
-
"skeleton",
|
|
22
|
-
"sizeSmall",
|
|
23
|
-
"sizeMedium",
|
|
24
|
-
"variantOutlined",
|
|
25
|
-
"variantContained",
|
|
26
|
-
"variantText",
|
|
27
|
-
"isDisabled",
|
|
28
|
-
"colorError",
|
|
29
|
-
"colorSuccess",
|
|
30
|
-
"colorWarning",
|
|
31
|
-
"togglePressed",
|
|
32
|
-
"toggleNotPressed"
|
|
33
|
-
]);
|
|
34
|
-
function getButtonUtilityClass(slot) {
|
|
35
|
-
return generateUtilityClass(componentName$2, slot);
|
|
36
|
-
}
|
|
37
|
-
const useUtilityClasses$2 = (onwerState) => {
|
|
38
|
-
const slots = {
|
|
39
|
-
root: [
|
|
40
|
-
"root",
|
|
41
|
-
onwerState.size === "small" && "sizeSmall",
|
|
42
|
-
onwerState.size === "medium" && "sizeMedium",
|
|
43
|
-
onwerState.variant === "outlined" && "variantOutlined",
|
|
44
|
-
onwerState.variant === "contained" && "variantContained",
|
|
45
|
-
onwerState.variant === "text" && "variantText",
|
|
46
|
-
onwerState.isDisabled && "isDisabled",
|
|
47
|
-
onwerState.colorState === "error" && "colorError",
|
|
48
|
-
onwerState.colorState === "success" && "colorSuccess",
|
|
49
|
-
onwerState.colorState === "warning" && "colorWarning"
|
|
50
|
-
],
|
|
51
|
-
skeleton: ["skeleton"]
|
|
52
|
-
};
|
|
53
|
-
const composedClasses = unstable_composeClasses(slots, getButtonUtilityClass, {});
|
|
54
|
-
return {
|
|
55
|
-
...composedClasses
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
const Button = (props) => {
|
|
59
|
-
const {
|
|
60
|
-
size = "small",
|
|
61
|
-
variant = "contained",
|
|
62
|
-
className,
|
|
63
|
-
disabled,
|
|
64
|
-
skeletonWidth = "100px",
|
|
65
|
-
skeletonHeight = "28px",
|
|
66
|
-
colorState,
|
|
67
|
-
...others
|
|
68
|
-
} = props;
|
|
69
|
-
const isSkeleton = useModuleSkeleton();
|
|
70
|
-
const ownerState = {
|
|
71
|
-
size,
|
|
72
|
-
variant,
|
|
73
|
-
isDisabled: disabled,
|
|
74
|
-
colorState
|
|
75
|
-
};
|
|
76
|
-
const classes = useUtilityClasses$2(ownerState);
|
|
77
|
-
return /* @__PURE__ */ jsx(ButtonRoot, { className: clsx(classes.root, className), "data-testid": "ButtonRoot", children: !isSkeleton ? /* @__PURE__ */ jsx(MuiButton, { ...others, variant, size, disableRipple: true, disabled }) : /* @__PURE__ */ jsx(
|
|
78
|
-
Skeleton,
|
|
79
|
-
{
|
|
80
|
-
className: classes.skeleton,
|
|
81
|
-
"data-testid": "MuiSkeleton",
|
|
82
|
-
variant: "rectangular",
|
|
83
|
-
width: skeletonWidth
|
|
84
|
-
}
|
|
85
|
-
) });
|
|
86
|
-
};
|
|
87
|
-
const WrapperImageButton = styled("div")(({ theme }) => ({
|
|
88
|
-
...theme.components?.M4LImageButton?.styleOverrides
|
|
89
|
-
}));
|
|
90
|
-
const componentName$1 = "M4LImageButton";
|
|
91
|
-
generateUtilityClasses(componentName$1, [
|
|
92
|
-
"root"
|
|
93
|
-
]);
|
|
94
|
-
function getImageButtonUtilityClass(slot) {
|
|
95
|
-
return generateUtilityClass(componentName$1, slot);
|
|
96
|
-
}
|
|
97
|
-
const useUtilityClasses$1 = () => {
|
|
98
|
-
const slots = {
|
|
99
|
-
root: ["root"]
|
|
100
|
-
};
|
|
101
|
-
const composedClasses = unstable_composeClasses(slots, getImageButtonUtilityClass, {});
|
|
102
|
-
return {
|
|
103
|
-
...composedClasses
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
const IMAGEBUTTON_PREFIX = "ImageButton";
|
|
107
|
-
const getNameDataTestId$1 = (KEY) => {
|
|
108
|
-
return `${IMAGEBUTTON_PREFIX}-${KEY}`;
|
|
109
|
-
};
|
|
110
|
-
function ImageButton({
|
|
111
|
-
src,
|
|
112
|
-
width,
|
|
113
|
-
height,
|
|
114
|
-
tooltip,
|
|
115
|
-
sx = { width, height },
|
|
116
|
-
...other
|
|
117
|
-
}) {
|
|
118
|
-
const finalTooltip = tooltip;
|
|
119
|
-
const classes = useUtilityClasses$1();
|
|
120
|
-
const imageButton = useMemo(() => {
|
|
121
|
-
return /* @__PURE__ */ jsx(IconButton, { sx, ...other, children: /* @__PURE__ */ jsx(Image, { src }) });
|
|
122
|
-
}, [src, width, height, sx]);
|
|
123
|
-
return /* @__PURE__ */ jsx(
|
|
124
|
-
WrapperImageButton,
|
|
125
|
-
{
|
|
126
|
-
className: classes.root,
|
|
127
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId$1("root") } : {},
|
|
128
|
-
children: finalTooltip ? /* @__PURE__ */ jsx(Tooltip, { title: finalTooltip || "", children: imageButton }) : imageButton
|
|
129
|
-
}
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
const componentName = "M4LLoadingButton";
|
|
133
|
-
generateUtilityClasses(
|
|
134
|
-
componentName,
|
|
135
|
-
[
|
|
136
|
-
"root",
|
|
137
|
-
"skeleton",
|
|
138
|
-
"sizeSmall",
|
|
139
|
-
"sizeMedium",
|
|
140
|
-
"variantOutlined",
|
|
141
|
-
"variantContained",
|
|
142
|
-
"variantText",
|
|
143
|
-
"isDisabled"
|
|
144
|
-
]
|
|
145
|
-
);
|
|
146
|
-
function getLoadingButtonUtilityClass(slot) {
|
|
147
|
-
return generateUtilityClass(componentName, slot);
|
|
148
|
-
}
|
|
149
|
-
const useUtilityClasses = (onwerState) => {
|
|
150
|
-
const slots = {
|
|
151
|
-
root: [
|
|
152
|
-
"root",
|
|
153
|
-
onwerState.size === "small" && "sizeSmall",
|
|
154
|
-
onwerState.size === "medium" && "sizeMedium",
|
|
155
|
-
onwerState.variant === "outlined" && "variantOutlined",
|
|
156
|
-
onwerState.variant === "contained" && "variantContained",
|
|
157
|
-
onwerState.variant === "text" && "variantText",
|
|
158
|
-
onwerState.isDisabled && "isDisabled"
|
|
159
|
-
],
|
|
160
|
-
skeleton: ["skeleton"]
|
|
161
|
-
};
|
|
162
|
-
const composedClasses = unstable_composeClasses(slots, getLoadingButtonUtilityClass, {});
|
|
163
|
-
return {
|
|
164
|
-
...composedClasses
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
const LoadingButtonRoot = styled("div")(({ theme }) => ({
|
|
168
|
-
...theme.components?.M4LLoadingButton?.styleOverrides
|
|
169
|
-
}));
|
|
170
|
-
const LOADINGBUTTON_PREFIX = "M4LoadingButton";
|
|
171
|
-
const getNameDataTestId = (KEY) => {
|
|
172
|
-
return `${LOADINGBUTTON_PREFIX}-${KEY}`;
|
|
173
|
-
};
|
|
174
|
-
const LoadingButton = (props) => {
|
|
175
|
-
const {
|
|
176
|
-
children,
|
|
177
|
-
skeletonWidth = "100%",
|
|
178
|
-
size = "small",
|
|
179
|
-
variant = "contained",
|
|
180
|
-
disabled,
|
|
181
|
-
className,
|
|
182
|
-
...other
|
|
183
|
-
} = props;
|
|
184
|
-
const isSkeleton = useModuleSkeleton();
|
|
185
|
-
const ownerState = {
|
|
186
|
-
size,
|
|
187
|
-
variant,
|
|
188
|
-
isDisabled: disabled
|
|
189
|
-
};
|
|
190
|
-
const classes = useUtilityClasses(ownerState);
|
|
191
|
-
return /* @__PURE__ */ jsx(
|
|
192
|
-
LoadingButtonRoot,
|
|
193
|
-
{
|
|
194
|
-
className: clsx(classes.root, className),
|
|
195
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("root") } : {},
|
|
196
|
-
children: !isSkeleton ? /* @__PURE__ */ jsx(LoadingButton$1, { ...other, variant, size, children: /* @__PURE__ */ jsx(Typography, { variant: "action", children }) }) : /* @__PURE__ */ jsx(
|
|
197
|
-
Skeleton,
|
|
198
|
-
{
|
|
199
|
-
className: classes.skeleton,
|
|
200
|
-
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: getNameDataTestId("skeleton") } : {},
|
|
201
|
-
variant: "rectangular",
|
|
202
|
-
width: skeletonWidth
|
|
203
|
-
}
|
|
204
|
-
)
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
};
|
|
208
|
-
export {
|
|
209
|
-
Button as B,
|
|
210
|
-
ImageButton as I,
|
|
211
|
-
LoadingButton as L,
|
|
212
|
-
buttonClasses as b
|
|
213
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { generateUtilityClasses, generateUtilityClass, Skeleton, styled, Checkbox } from "@mui/material";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
5
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
6
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
7
|
-
import { forwardRef } from "react";
|
|
8
|
-
import { F as FieldLabel } from "../FieldLabel/index.2622ee40.js";
|
|
9
|
-
const COMPONENT_CLASS_NAME = "M4LCheckBox";
|
|
10
|
-
generateUtilityClasses(COMPONENT_CLASS_NAME, [
|
|
11
|
-
"root",
|
|
12
|
-
"skeleton",
|
|
13
|
-
"small",
|
|
14
|
-
"medium",
|
|
15
|
-
"stateDisabled"
|
|
16
|
-
]);
|
|
17
|
-
function getRHFCheckboxUtilityClass(slot) {
|
|
18
|
-
return generateUtilityClass(COMPONENT_CLASS_NAME, slot);
|
|
19
|
-
}
|
|
20
|
-
const useUtilityClasses = (ownerState) => {
|
|
21
|
-
const slots = {
|
|
22
|
-
root: [
|
|
23
|
-
"root",
|
|
24
|
-
ownerState.size === "small" && "small",
|
|
25
|
-
ownerState.size === "medium" && "medium",
|
|
26
|
-
ownerState.disabled && "stateDisabled"
|
|
27
|
-
],
|
|
28
|
-
skeleton: ["skeleton"]
|
|
29
|
-
};
|
|
30
|
-
const composedClasses = unstable_composeClasses(slots, getRHFCheckboxUtilityClass, {});
|
|
31
|
-
return {
|
|
32
|
-
...composedClasses
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
const SkeletonCheckBox = (props) => {
|
|
36
|
-
const { classes } = props;
|
|
37
|
-
return /* @__PURE__ */ jsx("div", { className: classes.skeleton, children: /* @__PURE__ */ jsx(Skeleton, { variant: "rounded", width: "18px", height: "18px" }) });
|
|
38
|
-
};
|
|
39
|
-
const CheckBoxRoot = styled("div")(({ theme }) => ({
|
|
40
|
-
...theme.components?.M4LCheckBox?.styleOverrides
|
|
41
|
-
}));
|
|
42
|
-
const CheckBox = forwardRef((props, ref) => {
|
|
43
|
-
const {
|
|
44
|
-
className,
|
|
45
|
-
size = "small",
|
|
46
|
-
disabled,
|
|
47
|
-
label,
|
|
48
|
-
mandatory,
|
|
49
|
-
mandatoryMessage,
|
|
50
|
-
helperMessage,
|
|
51
|
-
htmlFor
|
|
52
|
-
} = props;
|
|
53
|
-
const isDesktop = useResponsiveDesktop();
|
|
54
|
-
const isSkeleton = useModuleSkeleton();
|
|
55
|
-
const ownerState = {
|
|
56
|
-
size: !isDesktop ? "medium" : size,
|
|
57
|
-
disabled
|
|
58
|
-
};
|
|
59
|
-
const classes = useUtilityClasses(ownerState);
|
|
60
|
-
return /* @__PURE__ */ jsxs(CheckBoxRoot, { className: clsx(classes.root, className), ref, children: [
|
|
61
|
-
!isSkeleton ? /* @__PURE__ */ jsx(Checkbox, { id: htmlFor, ...props }) : /* @__PURE__ */ jsx(SkeletonCheckBox, { classes }),
|
|
62
|
-
label && /* @__PURE__ */ jsx(
|
|
63
|
-
FieldLabel,
|
|
64
|
-
{
|
|
65
|
-
label,
|
|
66
|
-
mandatory,
|
|
67
|
-
mandatoryMessage,
|
|
68
|
-
helperMessage,
|
|
69
|
-
htmlFor
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
] });
|
|
73
|
-
});
|
|
74
|
-
export {
|
|
75
|
-
CheckBox as C
|
|
76
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo, useState } from "react";
|
|
3
|
-
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
4
|
-
import { Skeleton, styled, generateUtilityClasses, generateUtilityClass, Tooltip, IconButton as IconButton$1 } from "@mui/material";
|
|
5
|
-
import { I as Icon } from "../../Icon/index.ee7b85c9.js";
|
|
6
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
7
|
-
import clsx from "clsx";
|
|
8
|
-
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
9
|
-
const SkeletonIconButton = (props) => {
|
|
10
|
-
const { classes } = props;
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
-
Skeleton,
|
|
13
|
-
{
|
|
14
|
-
variant: "rectangular",
|
|
15
|
-
className: classes.skeleton,
|
|
16
|
-
"data-testid": "SkeletonIconButton"
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
};
|
|
20
|
-
const IconButtonRoot = styled("div")(({ theme }) => ({
|
|
21
|
-
...theme.components?.M4LIconButton?.styleOverrides
|
|
22
|
-
}));
|
|
23
|
-
const componentName = "M4LIconButton";
|
|
24
|
-
const iconButtonClasses = generateUtilityClasses(componentName, [
|
|
25
|
-
"root",
|
|
26
|
-
"skeleton",
|
|
27
|
-
"sizemSall",
|
|
28
|
-
"sizeMedium",
|
|
29
|
-
"variantPrimary",
|
|
30
|
-
"variantSecondary",
|
|
31
|
-
"variantLine",
|
|
32
|
-
"isFocus",
|
|
33
|
-
"isDisabled",
|
|
34
|
-
"togglePressed",
|
|
35
|
-
"toggleNotPressed"
|
|
36
|
-
]);
|
|
37
|
-
function getIconButtonUtilityClass(slot) {
|
|
38
|
-
return generateUtilityClass(componentName, slot);
|
|
39
|
-
}
|
|
40
|
-
const useUtilityClasses = (ownerState) => {
|
|
41
|
-
const slots = {
|
|
42
|
-
root: [
|
|
43
|
-
"root",
|
|
44
|
-
ownerState.size === "small" && "sizeSmall",
|
|
45
|
-
ownerState.size === "medium" && "sizeMedium",
|
|
46
|
-
ownerState.variant === "primary" && ownerState.isSkeleton !== true && "variantPrimary",
|
|
47
|
-
ownerState.variant === "secondary" && ownerState.isSkeleton !== true && "variantSecondary",
|
|
48
|
-
ownerState.variant === "line" && ownerState.isSkeleton !== true && "variantLine",
|
|
49
|
-
ownerState.isFocus && !ownerState.isDisabled && "isFocus",
|
|
50
|
-
ownerState.isDisabled && "isDisabled"
|
|
51
|
-
],
|
|
52
|
-
skeleton: ["skeleton"]
|
|
53
|
-
};
|
|
54
|
-
const composedClasses = unstable_composeClasses(slots, getIconButtonUtilityClass, {});
|
|
55
|
-
return {
|
|
56
|
-
...composedClasses
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
const IconButton = (props) => {
|
|
60
|
-
const {
|
|
61
|
-
src,
|
|
62
|
-
tooltip,
|
|
63
|
-
size = "small",
|
|
64
|
-
dictionaryTooltipId,
|
|
65
|
-
rotationAngle,
|
|
66
|
-
variant = "line",
|
|
67
|
-
disabled,
|
|
68
|
-
className,
|
|
69
|
-
onClick,
|
|
70
|
-
...other
|
|
71
|
-
} = props;
|
|
72
|
-
const { getLabel } = useModuleDictionary();
|
|
73
|
-
const isDesktop = useResponsiveDesktop();
|
|
74
|
-
const isSkeleton = useModuleSkeleton();
|
|
75
|
-
const finalTooltip = useMemo(() => {
|
|
76
|
-
if (disabled) {
|
|
77
|
-
return void 0;
|
|
78
|
-
}
|
|
79
|
-
if (tooltip && tooltip !== "") {
|
|
80
|
-
return tooltip;
|
|
81
|
-
}
|
|
82
|
-
if (dictionaryTooltipId && getLabel) {
|
|
83
|
-
return getLabel(dictionaryTooltipId);
|
|
84
|
-
}
|
|
85
|
-
return void 0;
|
|
86
|
-
}, [tooltip, dictionaryTooltipId, getLabel, disabled]);
|
|
87
|
-
const [isfocus] = useState(false);
|
|
88
|
-
const ownerState = {
|
|
89
|
-
variant,
|
|
90
|
-
size: isDesktop ? size : "medium",
|
|
91
|
-
isSkeleton,
|
|
92
|
-
isFocus: disabled ? false : isfocus,
|
|
93
|
-
isDisabled: disabled
|
|
94
|
-
};
|
|
95
|
-
const classes = useUtilityClasses(ownerState);
|
|
96
|
-
return /* @__PURE__ */ jsx(IconButtonRoot, { className: clsx(classes.root, className), "data-testid": "IconButtonRoot", children: !isSkeleton ? /* @__PURE__ */ jsx(Fragment, { children: finalTooltip ? /* @__PURE__ */ jsx(Tooltip, { title: finalTooltip || "", children: /* @__PURE__ */ jsx(
|
|
97
|
-
IconButton$1,
|
|
98
|
-
{
|
|
99
|
-
...other,
|
|
100
|
-
onClick,
|
|
101
|
-
disableRipple: true,
|
|
102
|
-
disabled,
|
|
103
|
-
children: /* @__PURE__ */ jsx(Icon, { src, size })
|
|
104
|
-
}
|
|
105
|
-
) }) : /* @__PURE__ */ jsx(
|
|
106
|
-
IconButton$1,
|
|
107
|
-
{
|
|
108
|
-
...other,
|
|
109
|
-
onClick,
|
|
110
|
-
disableRipple: true,
|
|
111
|
-
disabled,
|
|
112
|
-
children: /* @__PURE__ */ jsx(Icon, { src, size: isDesktop ? size : "medium", rotationAngle })
|
|
113
|
-
}
|
|
114
|
-
) }) : /* @__PURE__ */ jsx(SkeletonIconButton, { classes }) });
|
|
115
|
-
};
|
|
116
|
-
export {
|
|
117
|
-
IconButton as I,
|
|
118
|
-
iconButtonClasses as i
|
|
119
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { LinearProgress as LinearProgress$1 } from "@mui/material";
|
|
3
|
-
const LinearProgress = (props) => {
|
|
4
|
-
const { ...other } = props;
|
|
5
|
-
return /* @__PURE__ */ jsx(LinearProgress$1, { ...other });
|
|
6
|
-
};
|
|
7
|
-
export {
|
|
8
|
-
LinearProgress as L
|
|
9
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Link as Link$1 } from "react-router-dom";
|
|
3
|
-
import { Skeleton, Link } from "@mui/material";
|
|
4
|
-
import { useModuleSkeleton } from "@m4l/core";
|
|
5
|
-
const LinkWithRoute = (props) => {
|
|
6
|
-
const { to, children, skeletonWidth = "100%", skeletonHeight = "14px", ...other } = props;
|
|
7
|
-
const isSkeleton = useModuleSkeleton();
|
|
8
|
-
if (isSkeleton) {
|
|
9
|
-
return /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: skeletonWidth, height: skeletonHeight });
|
|
10
|
-
}
|
|
11
|
-
return /* @__PURE__ */ jsx(Link, { component: Link$1, to, ...other, children });
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
LinkWithRoute as L
|
|
15
|
-
};
|