@m4l/components 0.2.25 → 0.2.27
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 +3 -0
- package/components/AccountPopover/{index.505e278a.js → index.3994a80b.js} +2 -2
- package/components/AppBar/{index.7106417d.js → index.23323f96.js} +3 -4
- package/components/CommonActions/components/ActionCancel/{index.de862adf.js → index.bd767c14.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.3fd5c858.js → index.d737bddc.js} +4 -4
- package/components/CommonActions/components/ActionFormIntro/{index.07394f62.js → index.d5b80747.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.79fc2386.js → index.9bd56cd0.js} +2 -2
- package/components/CommonActions/components/Actions/{index.2f6286eb.js → index.16946bfd.js} +12 -13
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.36270dd1.js → index.29cf6542.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.8b008692.js → index.2c4fd22e.js} +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.cb308086.js → index.e30c976f.js} +1 -1
- package/components/DataGrid/formatters/ColumnPointsFormatter/{index.f3d6036f.js → index.4335c26b.js} +1 -1
- package/components/DataGrid/{index.b1eafce1.js → index.a3792770.js} +4 -5
- package/components/DataGrid/subcomponents/Actions/{index.9af87fa1.js → index.a317b384.js} +11 -12
- package/components/DataGrid/subcomponents/editors/TextEditor/{index.91380a55.js → index.eac1749c.js} +12 -1
- package/components/DragResizeWindow/{index.051c743d.js → index.bf1a4a47.js} +2 -3
- package/components/DynamicFilter/{index.b93e5649.js → index.cce92677.js} +19 -17
- package/components/FieldLabel/FieldLabel.d.ts +2 -0
- package/components/FieldLabel/classes/constants.d.ts +1 -0
- package/components/FieldLabel/classes/index.d.ts +10 -0
- package/components/FieldLabel/classes/types.d.ts +11 -0
- package/components/FieldLabel/index.8d3d6bb4.js +82 -0
- package/components/FieldLabel/index.d.ts +1 -0
- package/components/FieldLabel/types.d.ts +8 -0
- package/components/GridLayout/subcomponents/Responsive/{index.0fd1b7f8.js → index.d2ec9ddb.js} +1 -0
- package/components/GridLayout/subcomponents/SizeProvider/{index.7669a2cd.js → index.06986ab4.js} +9 -5
- package/components/HamburgerMenu/{index.25029e23.js → index.06905db3.js} +2 -2
- package/components/Icon/{index.b920baf8.js → index.58eaf354.js} +8 -48
- package/components/Icon/types.d.ts +0 -5
- package/components/Image/classes/index.d.ts +7 -0
- package/components/Image/{utils/classes → classes}/types.d.ts +0 -5
- package/components/Image/index.fa98eb78.js +203 -0
- package/components/Image/tests/utils.d.ts +1 -1
- package/components/Image/types.d.ts +3 -43
- package/components/LanguagePopover/{index.e54c5cc7.js → index.2740fb8e.js} +3 -4
- package/components/LoadingError/{index.123e16f8.js → index.4f4724c4.js} +2 -2
- package/components/MFLoader/{index.52096ea5.js → index.f6a46c70.js} +1 -1
- package/components/ModalDialog/{index.2e931b5f.js → index.86de725b.js} +3 -3
- package/components/NoItemSelected/{index.1024b856.js → index.aa3679f1.js} +2 -3
- package/components/ObjectLogs/{index.d10f4a2f.js → index.0e365006.js} +7 -8
- package/components/PDFViewer/{index.98852f91.js → index.85d4e010.js} +1 -1
- package/components/Page/{index.def863f2.js → index.aa33f20b.js} +1 -1
- package/components/PaperForm/{index.8a617a66.js → index.b6811634.js} +2 -3
- package/components/Period/classes/index.d.ts +3 -1
- package/components/Period/classes/types.d.ts +6 -1
- package/components/Period/{index.d80dff10.js → index.ba79014c.js} +76 -61
- package/components/Period/subcomponents/SkeletonPeriod/index.d.ts +2 -0
- package/components/Period/subcomponents/SkeletonPeriod/types.d.ts +4 -0
- package/components/Period/types.d.ts +4 -1
- package/components/PrintingSystem/{index.2e17cae5.js → index.b3ed9375.js} +14 -14
- package/components/PrintingSystem/subcomponents/BodyNode/{index.c5ffe20a.js → index.7a5c7bdd.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.020c037c.js → index.85914c4b.js} +1 -1
- package/components/PrintingSystem/subcomponents/DividerNode/{index.78b023bb.js → index.45284722.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.b29fc1e9.js → index.a83e65dc.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.11626284.js → index.cb7d0af9.js} +1 -1
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.ef44c8ab.js → index.d67484e5.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.d72d224b.js → index.ab17815a.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.8e53440c.js → index.8a2617ae.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.0b66458e.js → index.2c52ee12.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.b4c72fef.js → index.f0ac0243.js} +1 -1
- package/components/PropertyValue/{index.3b6670d4.js → index.a3527d10.js} +2 -3
- package/components/Resizeable/{index.0eb66c37.js → index.8db8f77d.js} +1 -1
- package/components/ScrollBar/{index.010f1b9d.js → index.7dfc2f29.js} +4 -3
- package/components/ScrollBar/index.d.ts +2 -2
- package/components/SideBar/classes/index.d.ts +7 -2
- package/components/SideBar/classes/types.d.ts +6 -1
- package/components/SideBar/constants.d.ts +2 -0
- package/components/SideBar/context/sideBarContext/types.d.ts +3 -1
- package/components/SideBar/{index.cdb70977.js → index.0d49daff.js} +255 -427
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/index.d.ts +1 -1
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/ContentComponent/index.d.ts +1 -0
- package/components/SideBar/types.d.ts +1 -4
- package/components/SplitLayout/{index.30fd5861.js → index.3856385c.js} +1 -2
- package/components/ToastContainer/{index.97fdba82.js → index.b42aca02.js} +2 -2
- package/components/areas/components/AreasAdmin/{index.e4f0ccc1.js → index.6d902d47.js} +17 -18
- package/components/areas/components/AreasViewer/{index.f87c63ca.js → index.2a286dfa.js} +120 -221
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowHeaderSkeleton/index.d.ts +2 -0
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowHeaderSkeleton/types.d.ts +3 -0
- package/components/areas/contexts/AreasContext/helper.d.ts +2 -2
- package/components/areas/contexts/AreasContext/{index.3e3d8c62.js → index.3eb6b2a4.js} +5 -5
- package/components/areas/hooks/useAreas/{index.b18fe111.js → index.febe901b.js} +1 -1
- package/components/commercial/TopBar/{index.8e2163f7.js → index.08853566.js} +5 -18
- package/components/formatters/BooleanFormatter/{index.b3052107.js → index.4bb3d2f9.js} +2 -2
- package/components/formatters/PointsFormatter/{index.5c94c5e8.js → index.8a4fa393.js} +4 -4
- package/components/formatters/{index.95cc337e.js → index.3e9e2305.js} +1 -1
- package/components/hook-form/RHFAutocomplete/classes/types.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/{index.cf399b24.js → index.f9be5465.js} +41 -23
- package/components/hook-form/RHFAutocomplete/types.d.ts +7 -7
- package/components/hook-form/RHFAutocompleteAsync/{index.b2b75475.js → index.c01fd38a.js} +2 -3
- package/components/hook-form/RHFCheckbox/classes/types.d.ts +2 -0
- package/components/hook-form/RHFCheckbox/{index.a38715e3.js → index.4f650b78.js} +37 -10
- package/components/hook-form/RHFCheckbox/types.d.ts +4 -1
- package/components/hook-form/RHFColorPicker/RFHColorPicker.d.ts +8 -0
- package/components/hook-form/RHFColorPicker/classes/index.d.ts +2 -1
- package/components/hook-form/RHFColorPicker/classes/types.d.ts +4 -0
- package/components/hook-form/RHFColorPicker/dictionary.d.ts +1 -0
- package/components/hook-form/RHFColorPicker/index.5be9e237.js +206 -0
- package/components/hook-form/RHFColorPicker/index.d.ts +2 -8
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/indext.d.ts +2 -1
- package/components/hook-form/RHFColorPicker/subcomponents/Skeleton/types.d.ts +3 -0
- package/components/hook-form/RHFColorPicker/types.d.ts +13 -2
- package/components/hook-form/RHFDateTime/classes/types.d.ts +3 -0
- package/components/hook-form/RHFDateTime/{index.5a673a96.js → index.ace3f52e.js} +52 -47
- package/components/hook-form/RHFDateTime/subcomponents/Skeleton/types.d.ts +3 -2
- package/components/hook-form/RHFDateTime/types.d.ts +4 -2
- package/components/hook-form/RHFPeriod/classes/index.d.ts +2 -1
- package/components/hook-form/RHFPeriod/classes/types.d.ts +2 -0
- package/components/hook-form/RHFPeriod/index.88812636.js +112 -0
- package/components/hook-form/RHFPeriod/types.d.ts +7 -1
- package/components/hook-form/RHFTextField/classes/types.d.ts +1 -0
- package/components/hook-form/RHFTextField/{index.fbb29ee1.js → index.d4192912.js} +40 -25
- package/components/hook-form/RHFTextField/types.d.ts +4 -3
- package/components/hook-form/RHFTextFieldPassword/types.d.ts +0 -1
- package/components/hook-form/RHFUpload/{index.05d7e2a7.js → index.f7efd0e2.js} +4 -5
- package/components/hook-form/index.d.ts +1 -1
- package/components/index.d.ts +1 -0
- package/components/modal/{WindowBase.998b8a38.js → WindowBase.4881da1f.js} +3 -3
- package/components/modal/{WindowConfirm.55ac3c8f.js → WindowConfirm.3b0e842b.js} +6 -6
- package/components/mui_extended/Accordion/{index.fb4eb664.js → index.a32a5761.js} +2 -2
- package/components/mui_extended/Button/{index.e520bd15.js → index.81367a73.js} +3 -7
- package/components/mui_extended/CheckBox/types.d.ts +2 -1
- package/components/mui_extended/{CheckBox.e662d20c.js → CheckBox.b3c0f2ad.js} +21 -23
- package/components/mui_extended/IconButton/classes/types.d.ts +0 -1
- package/components/mui_extended/IconButton/{index.9ea23f87.js → index.32fc9419.js} +2 -5
- package/components/mui_extended/IconButton/types.d.ts +1 -1
- package/components/mui_extended/ImageButton/ImageButton.d.ts +1 -1
- package/components/mui_extended/MenuActions/{index.fa7c26a5.js → index.fdea20e7.js} +4 -5
- package/components/mui_extended/Pager/{index.0c703574.js → index.c843dde3.js} +2 -3
- package/components/mui_extended/Popover/{index.b3eca6b1.js → index.d85de73b.js} +1 -2
- package/components/mui_extended/Tab/{index.409b9c74.js → index.2068925d.js} +2 -3
- package/components/mui_extended/ToggleButton/{index.bcaea74b.js → index.3d71f374.js} +1 -1
- package/components/mui_extended/ToggleIconButton/{index.131772d7.js → index.1cff26af.js} +1 -1
- package/contexts/ModalContext/{index.978a412d.js → index.e748f329.js} +1 -1
- package/contexts/RHFormContext/{index.7769076a.js → index.7b2a8723.js} +1 -2
- package/hooks/index.d.ts +1 -0
- package/hooks/useFormAddEdit/{index.4caddd24.js → index.5c3d8e48.js} +2 -2
- package/hooks/useFormFocus/index.d.ts +7 -0
- package/hooks/useFormFocus/types.d.ts +8 -0
- package/hooks/useModal/{index.786a4439.js → index.66a0c82e.js} +1 -1
- package/hooks/useTab/{index.eee18a49.js → index.c0564138.js} +1 -1
- package/index.js +124 -120
- package/{node_modules.71622512.js → node_modules.47f7709b.js} +1 -1
- package/package.json +1 -1
- package/{vendor.a735310a.js → vendor.47f1f3d4.js} +90 -70
- package/components/Image/index.d034ca68.js +0 -388
- package/components/Image/subcomponents/BasicIntersectComponent/index.d.ts +0 -3
- package/components/Image/subcomponents/LazyLoadComponent/index.d.ts +0 -7
- package/components/Image/subcomponents/Skeleton/index.d.ts +0 -2
- package/components/Image/subcomponents/Skeleton/types.d.ts +0 -6
- package/components/Image/utils/classes/index.d.ts +0 -12
- package/components/Image/utils/isIntersectionObserverAvailable.d.ts +0 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/index.d.ts +0 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/Skeleton/types.d.ts +0 -3
- package/components/SideBar/subcomponents/ContentGroups/type.d.ts +0 -7
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/skeleton.d.ts +0 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/index.d.ts +0 -2
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Header/subcomponents/WindowPopUpsList/types.d.ts +0 -2
- package/components/hook-form/RHFColorPicker/index.48a1ee1b.js +0 -153
- package/components/hook-form/RHFPeriod/index.4205c8ab.js +0 -76
- package/components/mui_extended/Popover/index.d.ts +0 -2
- /package/components/Image/{utils/classes → classes}/constant.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React__default
|
|
1
|
+
import React__default from "react";
|
|
2
2
|
import { useEnvironment } from "@m4l/core";
|
|
3
|
-
import { styled, generateUtilityClasses, generateUtilityClass
|
|
4
|
-
import { u as useSideBar, g as getNameDataTestId$1 } from "../SideBar/index.
|
|
3
|
+
import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
4
|
+
import { u as useSideBar, g as getNameDataTestId$1 } from "../SideBar/index.0d49daff.js";
|
|
5
5
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
@@ -22,8 +22,8 @@ const DivIcon = styled("div", {
|
|
|
22
22
|
maskRepeat: "no-repeat",
|
|
23
23
|
maskSize: "cover",
|
|
24
24
|
WebkitMaskRepeat: "no-repeat",
|
|
25
|
-
mask: `url(
|
|
26
|
-
WebkitMask: `url(
|
|
25
|
+
mask: `url(${src})`,
|
|
26
|
+
WebkitMask: `url(${src})`,
|
|
27
27
|
WebkitMaskSize: "cover",
|
|
28
28
|
...rotationAngle && {
|
|
29
29
|
transform: `rotate(${rotationAngle}deg)`
|
|
@@ -64,66 +64,26 @@ function Icon(props) {
|
|
|
64
64
|
src,
|
|
65
65
|
size = "small",
|
|
66
66
|
rotationAngle,
|
|
67
|
-
|
|
68
|
-
className,
|
|
69
|
-
memorizeResource = true
|
|
67
|
+
className
|
|
70
68
|
} = props;
|
|
71
|
-
const [resource, setResource] = useState(testingProps?.resource || void 0);
|
|
72
69
|
const isDesktop = useResponsiveDesktop();
|
|
73
|
-
if (memorizeResource) {
|
|
74
|
-
useEffect(() => {
|
|
75
|
-
let mounted = true;
|
|
76
|
-
(async function networkOperation() {
|
|
77
|
-
await fetch(src).then((response) => {
|
|
78
|
-
return response.text() || "";
|
|
79
|
-
}).then((xml) => {
|
|
80
|
-
xml = xml.match(
|
|
81
|
-
/(<svg\b[^>]*\s*(viewBox="(\b[^"]*)").*?>([\s\S]*?)<\/svg>|<svg>([\s\S]*?)<\/svg>)/g
|
|
82
|
-
)?.toString() || "";
|
|
83
|
-
if (mounted) {
|
|
84
|
-
setResource(window.btoa(xml));
|
|
85
|
-
}
|
|
86
|
-
}).catch((_err) => {
|
|
87
|
-
});
|
|
88
|
-
})();
|
|
89
|
-
return function clenUp() {
|
|
90
|
-
mounted = false;
|
|
91
|
-
};
|
|
92
|
-
}, [src]);
|
|
93
|
-
}
|
|
94
70
|
const ownerState = {
|
|
95
71
|
size: isDesktop ? size : "medium",
|
|
96
72
|
rotationAngle
|
|
97
73
|
};
|
|
98
74
|
const classes = useUtilityClasses(ownerState);
|
|
99
|
-
if (!memorizeResource) {
|
|
100
|
-
return /* @__PURE__ */ jsx(IconRoot, {
|
|
101
|
-
className: clsx(classes.root, className),
|
|
102
|
-
children: /* @__PURE__ */ jsx("img", {
|
|
103
|
-
src,
|
|
104
|
-
alt: src,
|
|
105
|
-
className: ""
|
|
106
|
-
})
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
75
|
return /* @__PURE__ */ jsx(IconRoot, {
|
|
110
76
|
className: clsx(classes.root, className),
|
|
111
77
|
...process.env.NODE_ENV !== "production" ? {
|
|
112
78
|
[TEST_PROP_ID]: getNameDataTestId("root")
|
|
113
79
|
} : {},
|
|
114
|
-
children:
|
|
80
|
+
children: /* @__PURE__ */ jsx(DivIcon, {
|
|
115
81
|
className: classes.icon,
|
|
116
|
-
src
|
|
82
|
+
src,
|
|
117
83
|
rotationAngle,
|
|
118
84
|
...process.env.NODE_ENV !== "production" ? {
|
|
119
85
|
[TEST_PROP_ID]: getNameDataTestId("icon")
|
|
120
86
|
} : {}
|
|
121
|
-
}) : /* @__PURE__ */ jsx(Skeleton, {
|
|
122
|
-
variant: "rectangular",
|
|
123
|
-
className: classes.variantSkeleton,
|
|
124
|
-
...process.env.NODE_ENV !== "production" ? {
|
|
125
|
-
[TEST_PROP_ID]: getNameDataTestId("variantSkeleton")
|
|
126
|
-
} : {}
|
|
127
87
|
})
|
|
128
88
|
});
|
|
129
89
|
}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
export declare type SizeIcon = 'small' | 'extraSmall' | 'medium' | 'large' | 'extraLarge';
|
|
2
|
-
export interface TestingProps {
|
|
3
|
-
resource: any;
|
|
4
|
-
}
|
|
5
2
|
export interface IconProps {
|
|
6
3
|
src: string;
|
|
7
4
|
size?: SizeIcon;
|
|
8
5
|
rotationAngle?: number;
|
|
9
|
-
testingProps?: TestingProps;
|
|
10
6
|
className?: string;
|
|
11
|
-
memorizeResource?: boolean;
|
|
12
7
|
}
|
|
13
8
|
export declare type DivIconProps = Pick<IconProps, 'src' | 'rotationAngle'>;
|
|
14
9
|
export declare type WrapperPlaceHolderProps = {
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { useBase, useEnvironment, evaluateWithContext } from "@m4l/core";
|
|
7
|
+
import { c as classes, g as getSize } from "../PrintingSystem/index.b3ed9375.js";
|
|
8
|
+
import { Q as QRCode } from "../../node_modules.47f7709b.js";
|
|
9
|
+
const ImageRoot = styled("div")(({
|
|
10
|
+
theme
|
|
11
|
+
}) => ({
|
|
12
|
+
...theme.components?.M4LImage?.styleOverrides
|
|
13
|
+
}));
|
|
14
|
+
const ratioOptions = {
|
|
15
|
+
"1.168:1": {
|
|
16
|
+
width: 1.168,
|
|
17
|
+
height: 1
|
|
18
|
+
},
|
|
19
|
+
"16:9": {
|
|
20
|
+
width: 16,
|
|
21
|
+
height: 9
|
|
22
|
+
},
|
|
23
|
+
"1:1": {
|
|
24
|
+
width: 1,
|
|
25
|
+
height: 1
|
|
26
|
+
},
|
|
27
|
+
"1:1.168": {
|
|
28
|
+
width: 1,
|
|
29
|
+
height: 1.168
|
|
30
|
+
},
|
|
31
|
+
"2:1": {
|
|
32
|
+
width: 2,
|
|
33
|
+
height: 1
|
|
34
|
+
},
|
|
35
|
+
"2:3": {
|
|
36
|
+
width: 2,
|
|
37
|
+
height: 3
|
|
38
|
+
},
|
|
39
|
+
"3:1": {
|
|
40
|
+
width: 3,
|
|
41
|
+
height: 1
|
|
42
|
+
},
|
|
43
|
+
"3:2": {
|
|
44
|
+
width: 3,
|
|
45
|
+
height: 2
|
|
46
|
+
},
|
|
47
|
+
"3:4": {
|
|
48
|
+
width: 3,
|
|
49
|
+
height: 4
|
|
50
|
+
},
|
|
51
|
+
"4:3": {
|
|
52
|
+
width: 4,
|
|
53
|
+
height: 3
|
|
54
|
+
},
|
|
55
|
+
"5:2": {
|
|
56
|
+
width: 5,
|
|
57
|
+
height: 2
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const getRatioValues = (ratio) => {
|
|
61
|
+
const numType = ratioOptions[ratio];
|
|
62
|
+
const numRef = numType.width / numType.height;
|
|
63
|
+
if (numRef >= 1) {
|
|
64
|
+
return {
|
|
65
|
+
width: "100%",
|
|
66
|
+
height: `${Math.trunc(numRef * 100)}%`
|
|
67
|
+
};
|
|
68
|
+
} else {
|
|
69
|
+
return {
|
|
70
|
+
width: `${Math.trunc(numRef * 100)}%`,
|
|
71
|
+
height: "100%"
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const IMAGE_PREFIX = "Image";
|
|
76
|
+
const getNameDataTestId = (KEY) => {
|
|
77
|
+
return `${IMAGE_PREFIX}-${KEY}`;
|
|
78
|
+
};
|
|
79
|
+
const componentName = "M4LImage";
|
|
80
|
+
generateUtilityClasses(componentName, [
|
|
81
|
+
"root",
|
|
82
|
+
"img"
|
|
83
|
+
]);
|
|
84
|
+
function getImagenClassesUtilityClass(slot) {
|
|
85
|
+
return generateUtilityClass(componentName, slot);
|
|
86
|
+
}
|
|
87
|
+
const useUtilityClasses = () => {
|
|
88
|
+
const slots = {
|
|
89
|
+
root: ["root"],
|
|
90
|
+
img: ["img"]
|
|
91
|
+
};
|
|
92
|
+
const composedClasses = unstable_composeClasses(slots, getImagenClassesUtilityClass, {});
|
|
93
|
+
return {
|
|
94
|
+
...composedClasses
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
function Image(props) {
|
|
98
|
+
const {
|
|
99
|
+
src,
|
|
100
|
+
alt,
|
|
101
|
+
width,
|
|
102
|
+
height,
|
|
103
|
+
ratio = "1:1",
|
|
104
|
+
className
|
|
105
|
+
} = props;
|
|
106
|
+
const ratioImage = getRatioValues(ratio);
|
|
107
|
+
const classes2 = useUtilityClasses();
|
|
108
|
+
return /* @__PURE__ */ jsx(ImageRoot, {
|
|
109
|
+
className: clsx(classes2.root, className),
|
|
110
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
111
|
+
[TEST_PROP_ID]: getNameDataTestId("root")
|
|
112
|
+
} : {},
|
|
113
|
+
style: width && height ? {
|
|
114
|
+
minWidth: width,
|
|
115
|
+
minHeight: height,
|
|
116
|
+
width,
|
|
117
|
+
height
|
|
118
|
+
} : {
|
|
119
|
+
width: "100%",
|
|
120
|
+
height: "100%"
|
|
121
|
+
},
|
|
122
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
123
|
+
alt,
|
|
124
|
+
src,
|
|
125
|
+
className: classes2.img,
|
|
126
|
+
width: !width ? "100%" : ratioImage.width,
|
|
127
|
+
height: !height ? "100%" : ratioImage.height,
|
|
128
|
+
...process.env.NODE_ENV !== "production" ? {
|
|
129
|
+
[TEST_PROP_ID]: getNameDataTestId("img")
|
|
130
|
+
} : {}
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
const ImageNode = (props) => {
|
|
135
|
+
const {
|
|
136
|
+
className,
|
|
137
|
+
style,
|
|
138
|
+
src,
|
|
139
|
+
width = "100%",
|
|
140
|
+
height = "100%"
|
|
141
|
+
} = props;
|
|
142
|
+
const {
|
|
143
|
+
unitSize,
|
|
144
|
+
sourceData
|
|
145
|
+
} = useBase();
|
|
146
|
+
const {
|
|
147
|
+
host_static_assets,
|
|
148
|
+
environment_assets
|
|
149
|
+
} = useEnvironment();
|
|
150
|
+
const resourceImg = evaluateWithContext(sourceData, src);
|
|
151
|
+
return /* @__PURE__ */ jsx("img", {
|
|
152
|
+
src: `${host_static_assets}/${environment_assets}/${resourceImg}`,
|
|
153
|
+
className: clsx(classes.imageNodeRoot, className),
|
|
154
|
+
style: {
|
|
155
|
+
width: getSize(width, unitSize),
|
|
156
|
+
height: getSize(height, unitSize),
|
|
157
|
+
...style
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
const convertToPx = (size, magnitud) => {
|
|
162
|
+
if (isNaN(size)) {
|
|
163
|
+
return 0;
|
|
164
|
+
}
|
|
165
|
+
if (magnitud === "px") {
|
|
166
|
+
return size;
|
|
167
|
+
}
|
|
168
|
+
switch (magnitud) {
|
|
169
|
+
case "cm":
|
|
170
|
+
return size * 37.8;
|
|
171
|
+
case "mm":
|
|
172
|
+
return size * 3.78;
|
|
173
|
+
case "in":
|
|
174
|
+
return size * 96;
|
|
175
|
+
case "pt":
|
|
176
|
+
return size * 1.33;
|
|
177
|
+
case "pc":
|
|
178
|
+
return size * 16;
|
|
179
|
+
default:
|
|
180
|
+
return 100;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
const QRImageNode = (props) => {
|
|
184
|
+
const {
|
|
185
|
+
url,
|
|
186
|
+
size = 8,
|
|
187
|
+
color
|
|
188
|
+
} = props;
|
|
189
|
+
const {
|
|
190
|
+
unitSize
|
|
191
|
+
} = useBase();
|
|
192
|
+
return /* @__PURE__ */ jsx(QRCode, {
|
|
193
|
+
value: url,
|
|
194
|
+
size: convertToPx(size, unitSize),
|
|
195
|
+
fgColor: color,
|
|
196
|
+
renderAs: "canvas"
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
export {
|
|
200
|
+
Image as I,
|
|
201
|
+
QRImageNode as Q,
|
|
202
|
+
ImageNode as a
|
|
203
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ImageClassesKey } from "../
|
|
1
|
+
import { ImageClassesKey } from "../classes/types";
|
|
2
2
|
export declare const getNameDataTestId: (KEY: ImageClassesKey) => string;
|
|
@@ -1,54 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export declare type Effect = 'blur' | 'black-and-white' | 'opacity';
|
|
3
|
-
export declare type ScrollPosition = {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
};
|
|
7
|
-
export declare type IntersectComponentRef = HTMLSpanElement & {
|
|
8
|
-
setIsVisible?: (visible: boolean) => void;
|
|
9
|
-
};
|
|
10
|
-
export interface TestingProps {
|
|
11
|
-
statusLoad?: any;
|
|
12
|
-
isVisible?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface BaseImageProps {
|
|
15
|
-
width?: string | number;
|
|
16
|
-
height?: string | number;
|
|
17
|
-
}
|
|
18
|
-
export interface IntersectComponentProps extends BaseImageProps {
|
|
19
|
-
setIsVisible: (visible: boolean) => void;
|
|
20
|
-
threshold: number;
|
|
21
|
-
useIntersectionObserver: boolean;
|
|
22
|
-
scrollPosition?: ScrollPosition;
|
|
23
|
-
}
|
|
24
|
-
export interface IntersectComponentScrollProps extends IntersectComponentProps {
|
|
25
|
-
delayMethod?: 'debounce' | 'throttle';
|
|
26
|
-
delayTime?: number;
|
|
27
|
-
}
|
|
28
|
-
export interface LazyLoadComponentProps extends Pick<ImageProps, 'testingProps'>, Omit<IntersectComponentProps, 'setIsVisible'> {
|
|
29
|
-
children: ReactNode;
|
|
30
|
-
}
|
|
31
|
-
export declare type SkeletonVariant = 'image' | 'circle';
|
|
32
1
|
export declare type RatioOptions = '1.168:1' | '16:9' | '1:1' | '1:1.168' | '2:1' | '2:3' | '3:1' | '3:2' | '3:4' | '4:3' | '5:2';
|
|
33
2
|
export interface ratioValues {
|
|
34
3
|
width: number;
|
|
35
4
|
height: number;
|
|
36
5
|
}
|
|
37
|
-
export interface ImageProps
|
|
6
|
+
export interface ImageProps {
|
|
38
7
|
src: string;
|
|
39
8
|
alt?: string;
|
|
40
|
-
threshold?: number;
|
|
41
|
-
useIntersectionObserver?: boolean;
|
|
42
|
-
skeletonVariant?: SkeletonVariant;
|
|
43
|
-
testingProps?: TestingProps;
|
|
44
9
|
ratio?: RatioOptions;
|
|
45
10
|
className?: string;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export interface OwnerState {
|
|
49
|
-
isImageLoaded: boolean;
|
|
50
|
-
}
|
|
51
|
-
export interface BaseProviderIamgeType {
|
|
52
|
-
classes: any;
|
|
11
|
+
width?: number | string;
|
|
12
|
+
height?: number | string;
|
|
53
13
|
}
|
|
54
14
|
export declare const ratioOptions: Record<RatioOptions, ratioValues>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useState, useEffect } from "react";
|
|
2
2
|
import { styled, generateUtilityClasses, generateUtilityClass, Stack, MenuItem } from "@mui/material";
|
|
3
|
-
import { I as Image } from "../Image/index.
|
|
3
|
+
import { I as Image } from "../Image/index.fa98eb78.js";
|
|
4
4
|
import { useLocales } from "@m4l/graphics";
|
|
5
|
-
import { I as ImageButton } from "../mui_extended/Button/index.
|
|
5
|
+
import { I as ImageButton } from "../mui_extended/Button/index.81367a73.js";
|
|
6
6
|
import { useEnvironment, useNetwork } from "@m4l/core";
|
|
7
7
|
import { unstable_composeClasses } from "@mui/base";
|
|
8
8
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
9
9
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
10
10
|
import { C as CircularProgress } from "../mui_extended/CircularProgress/index.ad569afd.js";
|
|
11
|
-
import { P as Popover } from "../mui_extended/Popover/index.
|
|
11
|
+
import { P as Popover } from "../mui_extended/Popover/index.d85de73b.js";
|
|
12
12
|
const LanguagePopoverRoot = styled("div")(({
|
|
13
13
|
theme
|
|
14
14
|
}) => ({
|
|
@@ -128,7 +128,6 @@ function LanguagePopover(props) {
|
|
|
128
128
|
alt: currentLocale?.name,
|
|
129
129
|
width: "24px",
|
|
130
130
|
height: "24px",
|
|
131
|
-
skeletonVariant: "circle",
|
|
132
131
|
...process.env.NODE_ENV !== "production" ? {
|
|
133
132
|
[TEST_PROP_ID]: getNameDataTestId("imageButton")
|
|
134
133
|
} : {}
|
|
@@ -4,9 +4,9 @@ import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/mater
|
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index.a0ad2d9e.js";
|
|
7
|
-
import { I as Icon } from "../Icon/index.
|
|
7
|
+
import { I as Icon } from "../Icon/index.58eaf354.js";
|
|
8
8
|
import { T as Typography } from "../mui_extended/Typography/index.379dd374.js";
|
|
9
|
-
import { B as Button } from "../mui_extended/Button/index.
|
|
9
|
+
import { B as Button } from "../mui_extended/Button/index.81367a73.js";
|
|
10
10
|
const componentName = "M4LoadingError";
|
|
11
11
|
generateUtilityClasses(componentName, [
|
|
12
12
|
"root",
|
|
@@ -12,7 +12,7 @@ import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/mater
|
|
|
12
12
|
import { unstable_composeClasses } from "@mui/base";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { L as LinearProgress } from "../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
15
|
-
import { L as LoadingError } from "../LoadingError/index.
|
|
15
|
+
import { L as LoadingError } from "../LoadingError/index.4f4724c4.js";
|
|
16
16
|
const componentName = "M4LMFLoader";
|
|
17
17
|
const mfLoaderClasses = generateUtilityClasses(componentName, [
|
|
18
18
|
"root",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useTheme, Dialog, Paper } from "@mui/material";
|
|
2
2
|
import { c as cjs } from "../../react-draggable.ee21cb7e.js";
|
|
3
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
4
|
-
import { R as ResizeableWindow } from "../Resizeable/index.
|
|
3
|
+
import { u as useModal } from "../../hooks/useModal/index.66a0c82e.js";
|
|
4
|
+
import { R as ResizeableWindow } from "../Resizeable/index.8db8f77d.js";
|
|
5
5
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
6
6
|
import { m as modalUtilityClasses } from "../modal/index.61389369.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.
|
|
8
|
+
import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.16946bfd.js";
|
|
9
9
|
const DragabblePaperComponent = (props) => {
|
|
10
10
|
return /* @__PURE__ */ jsx(cjs.exports, {
|
|
11
11
|
handle: ".m4l_draggable_handle",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
2
|
-
import { styled } from "@mui/material
|
|
3
|
-
import { I as Image } from "../Image/index.
|
|
4
|
-
import { generateUtilityClasses, generateUtilityClass, Skeleton } from "@mui/material";
|
|
2
|
+
import { styled, generateUtilityClasses, generateUtilityClass, Skeleton } from "@mui/material";
|
|
3
|
+
import { I as Image } from "../Image/index.fa98eb78.js";
|
|
5
4
|
import { useMemo } from "react";
|
|
6
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
6
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback, useMemo } from "react";
|
|
2
2
|
import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
|
|
3
|
-
import { styled } from "@mui/material
|
|
4
|
-
import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.
|
|
3
|
+
import { styled, Tooltip, IconButton } from "@mui/material";
|
|
4
|
+
import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.a3792770.js";
|
|
5
5
|
import { D as DateFormatter } from "../formatters/DateFormatter/index.578a9f53.js";
|
|
6
|
-
import { Tooltip, IconButton } from "@mui/material";
|
|
7
6
|
import { useHostTheme, useResponsiveDesktop } from "@m4l/graphics";
|
|
8
7
|
import { R as ReactJson } from "../../react-json-view.5636414a.js";
|
|
9
|
-
import { S as ScrollBar } from "../ScrollBar/index.
|
|
8
|
+
import { S as ScrollBar } from "../ScrollBar/index.7dfc2f29.js";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
12
|
-
import { I as Icon } from "../Icon/index.
|
|
10
|
+
import { u as useModal } from "../../hooks/useModal/index.66a0c82e.js";
|
|
11
|
+
import { I as Icon } from "../Icon/index.58eaf354.js";
|
|
13
12
|
import { S as Stack } from "../mui_extended/Stack/index.0e53197c.js";
|
|
14
|
-
import { W as WindowBase } from "../modal/WindowBase.
|
|
15
|
-
import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.
|
|
13
|
+
import { W as WindowBase } from "../modal/WindowBase.4881da1f.js";
|
|
14
|
+
import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.cce92677.js";
|
|
16
15
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
17
16
|
const Container = styled("div")(() => ({
|
|
18
17
|
height: "100%",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
2
|
import { unstable_composeClasses } from "@mui/base";
|
|
3
3
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
-
import { B as Button } from "../mui_extended/Button/index.
|
|
4
|
+
import { B as Button } from "../mui_extended/Button/index.81367a73.js";
|
|
5
5
|
const PDFVeiwerRoot = styled("div")(({ theme }) => ({
|
|
6
6
|
...theme.components?.M4LPDFViewer?.styleOverrides
|
|
7
7
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase, BaseProvider, useModuleSkeleton } from "@m4l/core";
|
|
2
|
-
import { c as classes, g as getSize, F as FactoryRender } from "../PrintingSystem/index.
|
|
2
|
+
import { c as classes, g as getSize, F as FactoryRender } from "../PrintingSystem/index.b3ed9375.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
5
5
|
import React__default from "react";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { styled } from "@mui/material
|
|
1
|
+
import { styled, Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
2
|
import { useModuleSkeleton } from "@m4l/core";
|
|
3
|
-
import {
|
|
4
|
-
import { I as Icon } from "../Icon/index.b920baf8.js";
|
|
3
|
+
import { I as Icon } from "../Icon/index.58eaf354.js";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
6
|
const PaperFormRoot = styled("div")(({
|
|
@@ -4,7 +4,9 @@ export declare const periodClasses: PeriodClassesType;
|
|
|
4
4
|
export declare function getPeriodUtilityClass(slot: string): string;
|
|
5
5
|
export declare const periodUtilityClasses: (ownerState: OwnerState) => {
|
|
6
6
|
root: string;
|
|
7
|
-
gap: string;
|
|
8
7
|
containerDateLabel: string;
|
|
9
8
|
containerDateValue: string;
|
|
9
|
+
skeleton: string;
|
|
10
|
+
skeletonFieldPrimary: string;
|
|
11
|
+
skeletonFieldSecondary: string;
|
|
10
12
|
};
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { periodUtilityClasses } from ".";
|
|
2
2
|
export interface PeriodClassesType {
|
|
3
3
|
root: string;
|
|
4
|
-
gap: string;
|
|
5
4
|
containerDateLabel: string;
|
|
6
5
|
containerDateValue: string;
|
|
6
|
+
skeleton: string;
|
|
7
|
+
skeletonFieldPrimary: string;
|
|
8
|
+
skeletonFieldSecondary: string;
|
|
7
9
|
stateError: string;
|
|
8
10
|
stateReadOnly: string;
|
|
9
11
|
variantMonoperiod: string;
|
|
10
12
|
variantMultiperiod: string;
|
|
13
|
+
sizeSmall: string;
|
|
14
|
+
sizeMedium: string;
|
|
15
|
+
isFocus: string;
|
|
11
16
|
}
|
|
12
17
|
export declare type PeriodClassesKey = keyof PeriodClassesType;
|
|
13
18
|
export declare type Classes = ReturnType<typeof periodUtilityClasses>;
|