@m4l/components 0.1.26 → 0.1.28
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/assets/Logo/index.228dcb5a.js +42 -35
- package/commonjs.565e6834.js +5 -5
- package/components/CommonActions/components/ActionCancel/index.e498eeb2.js +17 -0
- package/components/CommonActions/components/ActionFormCancel/index.4ff0ad73.js +64 -0
- package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +28 -22
- package/components/CommonActions/components/ActionIntro/index.60ef7bd7.js +18 -0
- package/components/CommonActions/components/Actions/index.0645e30f.js +867 -0
- package/components/DataGrid/index.76d8fd25.js +1075 -0
- package/components/DynamicFilter/index.342ba5fe.js +1577 -0
- package/components/ErrorLabel/index.c8615f16.js +13 -12
- package/components/Icon/index.619c31c4.js +96 -0
- package/components/Icon/types.d.ts +2 -1
- package/components/Image/index.93d5f37f.js +190 -0
- package/components/Loadable/index.f5518558.js +8 -8
- package/components/ModalDialog/index.9ea10764.js +184 -0
- package/components/NoItemSelected/{index.9609a7f7.js → index.46d2f632.js} +52 -41
- package/components/ObjectLogs/index.f941fb79.js +288 -0
- package/components/Page/index.4237c241.js +22 -20
- package/components/PaperForm/index.ec9cb8c9.js +112 -0
- package/components/Period/index.2941fbda.js +249 -0
- package/components/PropertyValue/index.dfcfe1ba.js +147 -0
- package/components/PropertyValue/styles.d.ts +2 -1
- package/components/PropertyValue/types.d.ts +3 -3
- package/components/Resizeable/index.45995d2b.js +19 -19
- package/components/ScrollBar/index.39eeb2de.js +26 -21
- package/components/ScrollToTop/index.e06f98f6.js +8 -7
- package/components/SplitLayout/index.4032673d.js +35 -33
- package/components/animate/LoadingScreen/index.1d0c4307.js +33 -33
- package/components/animate/MotionContainer/index.8d9f9d80.js +25 -22
- package/components/animate/MotionLazyContainer/index.572dd012.js +10 -10
- package/components/animate/features.0fbf41e1.js +3 -3
- package/components/animate/variants/bounce.784aaaaa.js +16 -13
- package/components/animate/variants/container.11f82b76.js +8 -6
- package/components/animate/variants/fade.b561c0fc.js +32 -28
- package/components/animate/variants/transition.bd46b9ce.js +17 -12
- package/components/formatters/BooleanFormatter/index.8da35c9c.js +55 -0
- package/components/formatters/DateFormatter/index.1b9baacc.js +69 -0
- package/components/formatters/index.689a8086.js +119 -0
- package/components/hook-form/RHFAutocomplete/index.59a68f9f.js +224 -0
- package/components/hook-form/RHFAutocompleteAsync/index.c3083062.js +87 -0
- package/components/hook-form/RHFCheckbox/index.6dcec9e2.js +49 -39
- package/components/hook-form/RHFDateTime/index.9231a7c7.js +69 -56
- package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +23 -23
- package/components/hook-form/RHFPeriod/index.64a228d5.js +55 -0
- package/components/hook-form/RHFRadioGroup/index.b3335e13.js +29 -29
- package/components/hook-form/RHFSelect/index.b6ca8bb2.js +24 -24
- package/components/hook-form/RHFTextField/index.f9aaaa90.js +146 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/index.d.ts +0 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/styles.d.ts +4 -3
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/subcomponents/Skeleton/index.d.ts +0 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/subcomponents/Skeleton/styles.d.ts +0 -0
- package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/types.d.ts +0 -0
- package/components/hook-form/RHFUpload/index.d5cc7c13.js +285 -0
- package/components/mui_extended/Accordion/index.a02ac6ae.js +107 -0
- package/components/mui_extended/Avatar/index.fe06afd7.js +51 -0
- package/components/mui_extended/BoxIcon/index.e638ecc8.js +10 -10
- package/components/mui_extended/Breadcrumbs/index.5e37d903.js +49 -44
- package/components/mui_extended/Button/index.53b56958.js +178 -0
- package/components/mui_extended/CircularProgress/index.ad569afd.js +8 -6
- package/components/mui_extended/IconButton/index.a321e5cb.js +120 -0
- package/components/mui_extended/IconButton/index.d.ts +1 -1
- package/components/mui_extended/LinkWithRoute/index.16436ab8.js +25 -21
- package/components/mui_extended/Pager/index.c0865b70.js +141 -0
- package/components/mui_extended/Popover/index.705275a4.js +278 -0
- package/components/mui_extended/Tab/index.e0653a0a.js +25 -21
- package/components/mui_extended/Typography/index.e5494696.js +25 -21
- package/contexts/ModalContext/index.b92fa565.js +153 -0
- package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/index.d.ts +0 -0
- package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/styles.d.ts +0 -0
- package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/types.d.ts +0 -0
- package/contexts/RHFormContext/index.b142190a.js +63 -0
- package/hooks/useFormAddEdit/index.d4845f1a.js +40 -22
- package/hooks/useModal/index.5fee01a3.js +11 -0
- package/index.js +153 -153
- package/package.json +2 -1
- package/react-data-grid.d46d625e.js +2206 -1663
- package/react-draggable.20e95c61.js +800 -553
- package/react-json-view.f56a7f8e.js +2344 -2340
- package/react-resizable.5277deaf.js +470 -298
- package/react-splitter-layout.7810ac1b.js +130 -128
- package/utils/index.214d9542.js +500 -354
- package/components/CommonActions/components/ActionCancel/index.6736b782.js +0 -17
- package/components/CommonActions/components/ActionFormCancel/index.281ee166.js +0 -49
- package/components/CommonActions/components/ActionIntro/index.4665a611.js +0 -18
- package/components/CommonActions/components/Actions/index.cd7b2671.js +0 -742
- package/components/DataGrid/index.2caf6231.js +0 -894
- package/components/DynamicFilter/index.f2377369.js +0 -1157
- package/components/Icon/index.f569765b.js +0 -82
- package/components/Image/index.c9da2d5a.js +0 -152
- package/components/ModalDialog/index.bee344a5.js +0 -168
- package/components/ObjectLogs/index.6b6f95e6.js +0 -266
- package/components/PaperForm/index.3f8c7ef2.js +0 -105
- package/components/Period/index.a112ce37.js +0 -175
- package/components/PropertyValue/index.ab3dd7e9.js +0 -116
- package/components/contexts/RHFormContext/index.33dba822.js +0 -56
- package/components/formatters/BooleanFormatter/index.3ec56305.js +0 -42
- package/components/formatters/DateFormatter/index.08d8823b.js +0 -57
- package/components/formatters/index.6959c2de.js +0 -106
- package/components/hook-form/RHFAutocomplete/index.5eee9d7c.js +0 -174
- package/components/hook-form/RHFAutocompleteAsync/index.757b5080.js +0 -65
- package/components/hook-form/RHFPeriod/index.979d0898.js +0 -51
- package/components/hook-form/RHFTextField/index.ba2a8f67.js +0 -129
- package/components/hook-form/RHFUpload/index.6347159a.js +0 -258
- package/components/mui_extended/Accordion/index.49f5df8e.js +0 -103
- package/components/mui_extended/Avatar/index.dadb0528.js +0 -37
- package/components/mui_extended/Button/index.52d18aea.js +0 -144
- package/components/mui_extended/IconButton/index.4b5ce8b5.js +0 -103
- package/components/mui_extended/Pager/index.951b6975.js +0 -126
- package/components/mui_extended/Popover/index.4da8587a.js +0 -252
- package/contexts/ModalContext/index.5388dfd5.js +0 -136
- package/hooks/useModal/index.3b1ff084.js +0 -11
- package/node_modules.168cb897.js +0 -55
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { styled
|
|
2
|
-
import { jsx
|
|
3
|
-
const
|
|
4
|
-
theme
|
|
1
|
+
import { styled } from "@mui/material";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
const Wrapper = styled("p")(({
|
|
4
|
+
theme
|
|
5
5
|
}) => ({
|
|
6
|
-
...
|
|
7
|
-
color:
|
|
6
|
+
...theme.typography.caption,
|
|
7
|
+
color: theme.palette.error.main,
|
|
8
8
|
margin: "8px 14px 0 14px"
|
|
9
|
-
}))
|
|
9
|
+
}));
|
|
10
|
+
const ErrorLabel = (props) => {
|
|
10
11
|
const {
|
|
11
|
-
message
|
|
12
|
-
} =
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
children:
|
|
12
|
+
message
|
|
13
|
+
} = props;
|
|
14
|
+
return /* @__PURE__ */ jsx(Wrapper, {
|
|
15
|
+
children: message
|
|
15
16
|
});
|
|
16
17
|
};
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
ErrorLabel as E
|
|
19
20
|
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { styled } from "@mui/material";
|
|
2
|
+
import { useState, useMemo, useEffect } from "react";
|
|
3
|
+
import { useTheme } from "@mui/material/styles";
|
|
4
|
+
import { g as getPaletteColor } from "../../utils/index.214d9542.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
const DivIcon = styled("div", {
|
|
7
|
+
shouldForwardProp: (props) => props !== "src" && props !== "size" && props !== "bgColor" && props !== "rotationAngle" && props !== "angleTransition"
|
|
8
|
+
})(({
|
|
9
|
+
size,
|
|
10
|
+
src,
|
|
11
|
+
bgColor,
|
|
12
|
+
rotationAngle,
|
|
13
|
+
angleTransition
|
|
14
|
+
}) => ({
|
|
15
|
+
maskPosition: "center!important",
|
|
16
|
+
maskRepeat: "no-repeat!important",
|
|
17
|
+
WebkitMaskRepeat: "no-repeat!important",
|
|
18
|
+
width: size,
|
|
19
|
+
height: size,
|
|
20
|
+
backgroundColor: bgColor,
|
|
21
|
+
mask: `url('data:image/svg+xml;base64,${src}')`,
|
|
22
|
+
WebkitMask: `url('data:image/svg+xml;base64,${src}')`,
|
|
23
|
+
...rotationAngle && {
|
|
24
|
+
transform: `rotate(${rotationAngle}deg)`
|
|
25
|
+
},
|
|
26
|
+
...angleTransition && rotationAngle && {
|
|
27
|
+
transition: `transform ${angleTransition}s ease-in-out`
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
const WrapperPlaceHolder = styled("div")(() => ({
|
|
31
|
+
display: "flex",
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
alignItems: "center"
|
|
34
|
+
}));
|
|
35
|
+
function Icon(props) {
|
|
36
|
+
const {
|
|
37
|
+
src,
|
|
38
|
+
size = "small",
|
|
39
|
+
bgColor = "action.active",
|
|
40
|
+
rotationAngle,
|
|
41
|
+
angleTransition
|
|
42
|
+
} = props;
|
|
43
|
+
const [resource, setResource] = useState(void 0);
|
|
44
|
+
const theme = useTheme();
|
|
45
|
+
const finalSize = useMemo(() => {
|
|
46
|
+
switch (size) {
|
|
47
|
+
case "extra-small":
|
|
48
|
+
return "12px";
|
|
49
|
+
case "small":
|
|
50
|
+
return "16px";
|
|
51
|
+
case "medium":
|
|
52
|
+
return "18px";
|
|
53
|
+
case "large":
|
|
54
|
+
return "22px";
|
|
55
|
+
}
|
|
56
|
+
return size;
|
|
57
|
+
}, [size]);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
let mounted = true;
|
|
60
|
+
(async function networkOperation() {
|
|
61
|
+
await fetch(src).then((response) => {
|
|
62
|
+
return response.text() || "";
|
|
63
|
+
}).then((xml) => {
|
|
64
|
+
xml = xml.match(
|
|
65
|
+
/(<svg\b[^>]*\s*(viewBox="(\b[^"]*)").*?>([\s\S]*?)<\/svg>|<svg>([\s\S]*?)<\/svg>)/g
|
|
66
|
+
)?.toString() || "";
|
|
67
|
+
if (mounted) {
|
|
68
|
+
setResource(window.btoa(xml));
|
|
69
|
+
}
|
|
70
|
+
}).catch((_err) => {
|
|
71
|
+
});
|
|
72
|
+
})();
|
|
73
|
+
return function clenUp() {
|
|
74
|
+
mounted = false;
|
|
75
|
+
};
|
|
76
|
+
}, [src]);
|
|
77
|
+
const placeHolder = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgdmlld0JveD0iMCAwIDcwIDcwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA3MCA3MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM2MzczODE7fQo8L3N0eWxlPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00NSw4LjdjMS40LTEuNSwzLjQtMi4zLDUuNC0yLjNzMy45LDAuOCw1LjQsMi4zczIuNCwzLjUsMi41LDUuN2MwLDIuMi0wLjksNC4yLTIuNCw1LjdzLTMuNSwyLjMtNS41LDIuMgoJCWMtMi4xLDAuMS00LTAuNy01LjUtMi4yYy0xLjQtMS41LTIuMy0zLjUtMi40LTUuN0M0Mi42LDEyLjIsNDMuNSwxMC4yLDQ1LDguN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02OC40LDYyLjFjLTAuMywwLjUtMC43LDAuOC0xLjIsMS4xcy0xLDAuNC0xLjYsMC40SDQuM2MtMC42LDAtMS4xLTAuMS0xLjYtMC40cy0wLjktMC42LTEuMi0xLjEKCQljLTAuMi0wLjUtMC40LTEtMC40LTEuNXMwLjEtMS4xLDAuNC0xLjVsMjMtMzYuNGMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNHMwLjksMC42LDEuMiwxLjEKCQlsMTEuNSwxOC4yYzAuMiwwLjMsMC41LDAuNSwwLjgsMC43czAuNiwwLjMsMSwwLjNjMC4zLDAsMC43LTAuMSwxLTAuM3MwLjYtMC40LDAuOC0wLjdsMy4xLTQuOWMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMQoJCXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNGMwLjUsMC4zLDAuOSwwLjYsMS4yLDEuMWwxNC42LDIzLjFjMC4zLDAuNSwwLjMsMSwwLjMsMS41UzY4LjcsNjEuNyw2OC40LDYyLjF6Ii8+CjwvZz4KPC9zdmc+Cg==";
|
|
78
|
+
return /* @__PURE__ */ jsx(WrapperPlaceHolder, {
|
|
79
|
+
className: "m4l_icon",
|
|
80
|
+
children: resource ? /* @__PURE__ */ jsx(DivIcon, {
|
|
81
|
+
src: resource,
|
|
82
|
+
size: finalSize,
|
|
83
|
+
bgColor: getPaletteColor(theme.palette, bgColor),
|
|
84
|
+
rotationAngle,
|
|
85
|
+
angleTransition
|
|
86
|
+
}) : /* @__PURE__ */ jsx("img", {
|
|
87
|
+
src: placeHolder,
|
|
88
|
+
alt: "icon_svg",
|
|
89
|
+
width: finalSize,
|
|
90
|
+
height: finalSize
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
export {
|
|
95
|
+
Icon as I
|
|
96
|
+
};
|
|
@@ -3,7 +3,8 @@ export interface IconProps {
|
|
|
3
3
|
src: string;
|
|
4
4
|
bgColor?: string | 'info' | 'warning' | 'error' | 'active' | 'selected' | 'disabled';
|
|
5
5
|
size?: SizeIcon;
|
|
6
|
-
|
|
6
|
+
rotationAngle?: number;
|
|
7
|
+
angleTransition?: number;
|
|
7
8
|
}
|
|
8
9
|
export declare type WrapperPlaceHolderProps = {
|
|
9
10
|
size: string;
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { useModuleSkeleton } from "@m4l/core";
|
|
2
|
+
import { forwardRef, useState, useRef, useImperativeHandle, useEffect, useMemo } from "react";
|
|
3
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { styled, Skeleton as Skeleton$1 } from "@mui/material";
|
|
5
|
+
function isIntersectionObserverAvailable() {
|
|
6
|
+
return typeof window !== "undefined" && "IntersectionObserver" in window && "isIntersecting" in window.IntersectionObserverEntry.prototype;
|
|
7
|
+
}
|
|
8
|
+
const checkIntersections = (entries) => {
|
|
9
|
+
entries.forEach((entry) => {
|
|
10
|
+
if (entry.isIntersecting) {
|
|
11
|
+
entry.target?.setIsVisible(true);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
const LAZY_LOAD_OBSERVERS = {};
|
|
16
|
+
const getObserver = (threshold) => {
|
|
17
|
+
LAZY_LOAD_OBSERVERS[threshold] = LAZY_LOAD_OBSERVERS[threshold] || new IntersectionObserver(checkIntersections, {
|
|
18
|
+
rootMargin: threshold + "px"
|
|
19
|
+
});
|
|
20
|
+
return LAZY_LOAD_OBSERVERS[threshold];
|
|
21
|
+
};
|
|
22
|
+
const BasicIntersectComponent = forwardRef((props, ref) => {
|
|
23
|
+
const {
|
|
24
|
+
height,
|
|
25
|
+
width,
|
|
26
|
+
setIsVisible,
|
|
27
|
+
threshold
|
|
28
|
+
} = props;
|
|
29
|
+
const [observer] = useState(getObserver(threshold));
|
|
30
|
+
const intersectComponentRef = useRef(null);
|
|
31
|
+
useImperativeHandle(ref, () => intersectComponentRef.current);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (observer && intersectComponentRef.current) {
|
|
34
|
+
intersectComponentRef.current.setIsVisible = setIsVisible;
|
|
35
|
+
observer.observe(intersectComponentRef.current);
|
|
36
|
+
}
|
|
37
|
+
return () => {
|
|
38
|
+
if (observer && intersectComponentRef.current) {
|
|
39
|
+
observer.unobserve(intersectComponentRef.current);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
const styleProp = {
|
|
44
|
+
display: "inline-block"
|
|
45
|
+
};
|
|
46
|
+
if (typeof width !== "undefined") {
|
|
47
|
+
styleProp.width = width;
|
|
48
|
+
}
|
|
49
|
+
if (typeof height !== "undefined") {
|
|
50
|
+
styleProp.height = height;
|
|
51
|
+
styleProp.minHeight = height;
|
|
52
|
+
}
|
|
53
|
+
return /* @__PURE__ */ jsx("span", {
|
|
54
|
+
id: "IntersectComponent",
|
|
55
|
+
ref: intersectComponentRef,
|
|
56
|
+
style: styleProp
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
BasicIntersectComponent.displayName = "IntersectComponent";
|
|
60
|
+
function LazyLoadComponent(props) {
|
|
61
|
+
const {
|
|
62
|
+
children,
|
|
63
|
+
useIntersectionObserver,
|
|
64
|
+
...other
|
|
65
|
+
} = props;
|
|
66
|
+
const [isVisible, setIsVisible] = useState(!(useIntersectionObserver && isIntersectionObserverAvailable()));
|
|
67
|
+
if (isVisible) {
|
|
68
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
69
|
+
children
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return /* @__PURE__ */ jsx(BasicIntersectComponent, {
|
|
73
|
+
useIntersectionObserver,
|
|
74
|
+
setIsVisible,
|
|
75
|
+
...other
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
const WrapperImage = styled("div", {
|
|
79
|
+
shouldForwardProp: (props) => props !== "width" && props !== "height"
|
|
80
|
+
})(({
|
|
81
|
+
height,
|
|
82
|
+
width
|
|
83
|
+
}) => ({
|
|
84
|
+
position: "relative",
|
|
85
|
+
width,
|
|
86
|
+
height,
|
|
87
|
+
minHeight: height,
|
|
88
|
+
minWidth: width,
|
|
89
|
+
"& > img ": {
|
|
90
|
+
opacity: 0,
|
|
91
|
+
position: "absolute",
|
|
92
|
+
inset: "0",
|
|
93
|
+
width: "100%",
|
|
94
|
+
height: "100%"
|
|
95
|
+
},
|
|
96
|
+
"&.loaded > img": {
|
|
97
|
+
opacity: 1,
|
|
98
|
+
transition: "opacity .5s"
|
|
99
|
+
},
|
|
100
|
+
"& .skeleton": {
|
|
101
|
+
opacity: 1,
|
|
102
|
+
width,
|
|
103
|
+
height
|
|
104
|
+
},
|
|
105
|
+
"&.loaded .skeleton": {
|
|
106
|
+
opacity: 0,
|
|
107
|
+
transition: "opacity .3s"
|
|
108
|
+
}
|
|
109
|
+
}));
|
|
110
|
+
const WrapperSkeletonImage = styled("div")(() => ({
|
|
111
|
+
mask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`,
|
|
112
|
+
WebkitMask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`,
|
|
113
|
+
height: "100%",
|
|
114
|
+
width: "100%",
|
|
115
|
+
display: "flex",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
justifyContent: "center"
|
|
118
|
+
}));
|
|
119
|
+
const Skeleton = (props) => {
|
|
120
|
+
const {
|
|
121
|
+
skeletonVariant
|
|
122
|
+
} = props;
|
|
123
|
+
return skeletonVariant === "image" ? /* @__PURE__ */ jsx(WrapperSkeletonImage, {
|
|
124
|
+
className: "skeleton",
|
|
125
|
+
children: /* @__PURE__ */ jsx(Skeleton$1, {
|
|
126
|
+
variant: "rectangular",
|
|
127
|
+
width: "100%",
|
|
128
|
+
height: "100%"
|
|
129
|
+
})
|
|
130
|
+
}) : /* @__PURE__ */ jsx(Skeleton$1, {
|
|
131
|
+
variant: "circular",
|
|
132
|
+
width: "100%",
|
|
133
|
+
height: "100%",
|
|
134
|
+
className: "skeleton"
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
function Image(props) {
|
|
138
|
+
const {
|
|
139
|
+
src,
|
|
140
|
+
alt,
|
|
141
|
+
useIntersectionObserver = true,
|
|
142
|
+
threshold = 100,
|
|
143
|
+
width,
|
|
144
|
+
height,
|
|
145
|
+
skeletonVariant = "image"
|
|
146
|
+
} = props;
|
|
147
|
+
const isSKeleton = useModuleSkeleton();
|
|
148
|
+
const [statusLoad, setStatusLoad] = useState("initial");
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
let timer;
|
|
151
|
+
if (statusLoad === "loaded" && !isSKeleton) {
|
|
152
|
+
timer = setTimeout(() => {
|
|
153
|
+
setStatusLoad("removed");
|
|
154
|
+
}, 3e3);
|
|
155
|
+
}
|
|
156
|
+
return () => {
|
|
157
|
+
if (timer) {
|
|
158
|
+
clearTimeout(timer);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
}, [statusLoad, isSKeleton]);
|
|
162
|
+
const onLoad = () => {
|
|
163
|
+
setStatusLoad("loaded");
|
|
164
|
+
};
|
|
165
|
+
const lazyLoadComponent = useMemo(() => {
|
|
166
|
+
const isImageLoaded = !isSKeleton && statusLoad !== "initial";
|
|
167
|
+
return /* @__PURE__ */ jsx(WrapperImage, {
|
|
168
|
+
width,
|
|
169
|
+
height,
|
|
170
|
+
className: "m4l_image " + (isImageLoaded ? "loaded" : ""),
|
|
171
|
+
children: /* @__PURE__ */ jsxs(LazyLoadComponent, {
|
|
172
|
+
width,
|
|
173
|
+
height,
|
|
174
|
+
useIntersectionObserver,
|
|
175
|
+
threshold,
|
|
176
|
+
children: [statusLoad !== "removed" ? /* @__PURE__ */ jsx(Skeleton, {
|
|
177
|
+
skeletonVariant
|
|
178
|
+
}) : null, /* @__PURE__ */ jsx("img", {
|
|
179
|
+
alt,
|
|
180
|
+
src,
|
|
181
|
+
onLoad
|
|
182
|
+
})]
|
|
183
|
+
})
|
|
184
|
+
});
|
|
185
|
+
}, [statusLoad, isSKeleton, src]);
|
|
186
|
+
return lazyLoadComponent;
|
|
187
|
+
}
|
|
188
|
+
export {
|
|
189
|
+
Image as I
|
|
190
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Suspense
|
|
2
|
-
import { jsx
|
|
3
|
-
const
|
|
4
|
-
return /* @__PURE__ */
|
|
5
|
-
fallback: /* @__PURE__ */
|
|
1
|
+
import { Suspense } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
const Loadable = (Component) => function EmbededLoadable(props) {
|
|
4
|
+
return /* @__PURE__ */ jsx(Suspense, {
|
|
5
|
+
fallback: /* @__PURE__ */ jsx("div", {
|
|
6
6
|
children: "Cargando"
|
|
7
7
|
}),
|
|
8
|
-
children: /* @__PURE__ */
|
|
9
|
-
...
|
|
8
|
+
children: /* @__PURE__ */ jsx(Component, {
|
|
9
|
+
...props
|
|
10
10
|
})
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
Loadable as L
|
|
15
15
|
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { Dialog, IconButton, Paper } from "@mui/material";
|
|
2
|
+
import { c as cjs } from "../../react-draggable.20e95c61.js";
|
|
3
|
+
import { u as useModal } from "../../hooks/useModal/index.5fee01a3.js";
|
|
4
|
+
import { styled } from "@mui/material/styles";
|
|
5
|
+
import { a as getThemeVariantColor } from "../../utils/index.214d9542.js";
|
|
6
|
+
import { R as Resizeable } from "../Resizeable/index.45995d2b.js";
|
|
7
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
8
|
+
import { useEnvironment } from "@m4l/core";
|
|
9
|
+
import { I as Icon } from "../Icon/index.619c31c4.js";
|
|
10
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
11
|
+
import { b as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.0645e30f.js";
|
|
12
|
+
const WrapperDialog = styled(Dialog)(() => ({}));
|
|
13
|
+
const Container = styled("div")(({ theme }) => ({
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column",
|
|
16
|
+
height: "100%",
|
|
17
|
+
overflow: "hidden",
|
|
18
|
+
padding: theme.spacing(3)
|
|
19
|
+
}));
|
|
20
|
+
const Header$1 = styled("div")(({ theme }) => ({
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
justifyContent: "space-between",
|
|
24
|
+
minHeight: theme.spacing(5),
|
|
25
|
+
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
26
|
+
overflow: "hidden"
|
|
27
|
+
}));
|
|
28
|
+
styled("div")(({ theme }) => ({
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "row",
|
|
31
|
+
flexGrow: 1,
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
cursor: "move",
|
|
34
|
+
...theme.typography.subtitle1,
|
|
35
|
+
color: theme.palette.text.primary
|
|
36
|
+
}));
|
|
37
|
+
const IconHeader = styled("div")(({ theme, variant }) => ({
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
justifyContent: "center",
|
|
41
|
+
marginRight: theme.spacing(1.5),
|
|
42
|
+
"& > span": {
|
|
43
|
+
background: getThemeVariantColor(theme, variant)
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
const Content = styled("div")(() => ({
|
|
47
|
+
flexGrow: 1,
|
|
48
|
+
position: "relative",
|
|
49
|
+
overflow: "auto"
|
|
50
|
+
}));
|
|
51
|
+
const ModalTitle = styled("div")(({ theme, variant }) => ({
|
|
52
|
+
...theme.typography.subtitle1,
|
|
53
|
+
color: getThemeVariantColor(theme, variant),
|
|
54
|
+
width: "100%",
|
|
55
|
+
whiteSpace: "nowrap",
|
|
56
|
+
textOverflow: "ellipsis",
|
|
57
|
+
overflow: "hidden"
|
|
58
|
+
}));
|
|
59
|
+
const Header = (props) => {
|
|
60
|
+
const {
|
|
61
|
+
host_static_assets,
|
|
62
|
+
environment_assets
|
|
63
|
+
} = useEnvironment();
|
|
64
|
+
const {
|
|
65
|
+
variant,
|
|
66
|
+
title,
|
|
67
|
+
iconComponent,
|
|
68
|
+
withClose,
|
|
69
|
+
onCloseModal
|
|
70
|
+
} = props;
|
|
71
|
+
const iconSrcWarning = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/warning.svg`;
|
|
72
|
+
const iconSrcError = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/error.svg`;
|
|
73
|
+
const iconSrcInfo = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/info.svg`;
|
|
74
|
+
const iconDefault = `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/icon_bar_title.svg`;
|
|
75
|
+
return /* @__PURE__ */ jsxs(Header$1, {
|
|
76
|
+
id: "Header",
|
|
77
|
+
className: "draggable-dialog-title",
|
|
78
|
+
children: [/* @__PURE__ */ jsx(IconHeader, {
|
|
79
|
+
variant,
|
|
80
|
+
children: !iconComponent ? /* @__PURE__ */ jsx(Icon, {
|
|
81
|
+
src: variant === "warning" ? iconSrcWarning : variant === "delete" ? iconSrcError : variant === "info" ? iconSrcInfo : iconDefault
|
|
82
|
+
}) : iconComponent
|
|
83
|
+
}), /* @__PURE__ */ jsx(ModalTitle, {
|
|
84
|
+
variant,
|
|
85
|
+
children: title
|
|
86
|
+
}), withClose && /* @__PURE__ */ jsx(IconButton, {
|
|
87
|
+
onClick: onCloseModal,
|
|
88
|
+
"aria-label": "click",
|
|
89
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
90
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/dialog/assets/icons/close.svg`
|
|
91
|
+
})
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
const DragabblePaperComponent = (props) => {
|
|
96
|
+
return /* @__PURE__ */ jsx(cjs.exports, {
|
|
97
|
+
handle: ".draggable-dialog-title",
|
|
98
|
+
cancel: '[class*="MuiDialogContent-root"]',
|
|
99
|
+
children: /* @__PURE__ */ jsx(Paper, {
|
|
100
|
+
sx: {
|
|
101
|
+
maxHeight: "unset",
|
|
102
|
+
maxWidth: "unset"
|
|
103
|
+
},
|
|
104
|
+
...props
|
|
105
|
+
})
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
function PaperComponent(props) {
|
|
109
|
+
return /* @__PURE__ */ jsx(Paper, {
|
|
110
|
+
sx: {
|
|
111
|
+
maxHeight: "unset",
|
|
112
|
+
maxWidth: "unset",
|
|
113
|
+
height: "100%"
|
|
114
|
+
},
|
|
115
|
+
...props
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
const ModalDialog = () => {
|
|
119
|
+
const {
|
|
120
|
+
open,
|
|
121
|
+
initialWidth = 600,
|
|
122
|
+
initialHeigth = 400,
|
|
123
|
+
maxWidth,
|
|
124
|
+
maxHeigth,
|
|
125
|
+
withClose = true,
|
|
126
|
+
onQueryClose,
|
|
127
|
+
contentComponent,
|
|
128
|
+
title,
|
|
129
|
+
closeModal,
|
|
130
|
+
iconComponent,
|
|
131
|
+
actions,
|
|
132
|
+
variant
|
|
133
|
+
} = useModal();
|
|
134
|
+
const isDesktop = useResponsiveDesktop();
|
|
135
|
+
const onCloseModal = () => {
|
|
136
|
+
closeModal();
|
|
137
|
+
};
|
|
138
|
+
const contentComnponent = /* @__PURE__ */ jsxs(Container, {
|
|
139
|
+
id: "Container",
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ jsx(Header, {
|
|
142
|
+
variant,
|
|
143
|
+
title,
|
|
144
|
+
iconComponent,
|
|
145
|
+
withClose,
|
|
146
|
+
onCloseModal
|
|
147
|
+
}),
|
|
148
|
+
/* @__PURE__ */ jsx(Content, {
|
|
149
|
+
id: "Content",
|
|
150
|
+
children: typeof contentComponent === "function" ? contentComponent() : contentComponent
|
|
151
|
+
}),
|
|
152
|
+
actions && /* @__PURE__ */ jsx(Actions, {
|
|
153
|
+
children: actions
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
});
|
|
157
|
+
return /* @__PURE__ */ jsxs(WrapperDialog, {
|
|
158
|
+
open,
|
|
159
|
+
onClose: onQueryClose,
|
|
160
|
+
"aria-labelledby": "child-modal-title",
|
|
161
|
+
"aria-describedby": "child-modal-description",
|
|
162
|
+
PaperComponent: isDesktop ? DragabblePaperComponent : PaperComponent,
|
|
163
|
+
maxWidth: false,
|
|
164
|
+
fullWidth: !isDesktop,
|
|
165
|
+
children: [isDesktop && /* @__PURE__ */ jsx(Resizeable, {
|
|
166
|
+
width: initialWidth,
|
|
167
|
+
height: initialHeigth,
|
|
168
|
+
maxWidth,
|
|
169
|
+
maxHeigth,
|
|
170
|
+
children: contentComnponent
|
|
171
|
+
}), !isDesktop && contentComnponent]
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
function getModalDialogComponentsDictionary() {
|
|
175
|
+
return ["modal_dialog"].concat(getCommonActionsDictionary());
|
|
176
|
+
}
|
|
177
|
+
const defaultModalDialogDictionary = {
|
|
178
|
+
modal_dialog: {}
|
|
179
|
+
};
|
|
180
|
+
export {
|
|
181
|
+
ModalDialog as M,
|
|
182
|
+
defaultModalDialogDictionary as d,
|
|
183
|
+
getModalDialogComponentsDictionary as g
|
|
184
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useEnvironment
|
|
2
|
-
import { styled
|
|
3
|
-
import { I as
|
|
4
|
-
import { Skeleton
|
|
5
|
-
import { useMemo
|
|
6
|
-
import { jsx
|
|
7
|
-
const
|
|
8
|
-
theme
|
|
1
|
+
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
2
|
+
import { styled } from "@mui/material/styles";
|
|
3
|
+
import { I as Image } from "../Image/index.93d5f37f.js";
|
|
4
|
+
import { Skeleton } from "@mui/material";
|
|
5
|
+
import { useMemo } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
const WrapperNoItemSelected = styled("div")(({
|
|
8
|
+
theme
|
|
9
9
|
}) => ({
|
|
10
10
|
width: "100%",
|
|
11
11
|
maxWidth: "400px",
|
|
@@ -14,16 +14,19 @@ const s = c("div")(({
|
|
|
14
14
|
flexDirection: "column",
|
|
15
15
|
alignItems: "center",
|
|
16
16
|
justifyContent: "center",
|
|
17
|
-
padding:
|
|
18
|
-
}))
|
|
17
|
+
padding: theme.spacing(3)
|
|
18
|
+
}));
|
|
19
|
+
const Img = styled(Image)(() => ({
|
|
19
20
|
display: "flex"
|
|
20
|
-
}))
|
|
21
|
-
|
|
21
|
+
}));
|
|
22
|
+
const Label = styled("span")(({
|
|
23
|
+
theme
|
|
22
24
|
}) => ({
|
|
23
|
-
...
|
|
24
|
-
padding: `${
|
|
25
|
-
color:
|
|
26
|
-
}))
|
|
25
|
+
...theme.typography.body2,
|
|
26
|
+
padding: `${theme.spacing(1.5)} ${theme.spacing(1)} ${theme.spacing(1)} ${theme.spacing(1)}`,
|
|
27
|
+
color: theme.palette.text.primary
|
|
28
|
+
}));
|
|
29
|
+
const WrapperSKTNoItemSelected = styled("div")(() => ({
|
|
27
30
|
display: "flex",
|
|
28
31
|
width: "100%",
|
|
29
32
|
minWidth: "100%",
|
|
@@ -31,44 +34,52 @@ const s = c("div")(({
|
|
|
31
34
|
mask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`,
|
|
32
35
|
WebkitMask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`
|
|
33
36
|
}));
|
|
34
|
-
function
|
|
37
|
+
function NoItemSelected() {
|
|
35
38
|
const {
|
|
36
|
-
host_static_assets
|
|
37
|
-
environment_assets
|
|
38
|
-
} =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
host_static_assets,
|
|
40
|
+
environment_assets
|
|
41
|
+
} = useEnvironment();
|
|
42
|
+
const {
|
|
43
|
+
getLabel
|
|
44
|
+
} = useModuleDictionary();
|
|
45
|
+
const isSkeleton = useModuleSkeleton();
|
|
46
|
+
const src = useMemo(() => {
|
|
47
|
+
return `${host_static_assets}/${environment_assets}/frontend/components/no_item_selected/assets/icons/no_selected.svg`;
|
|
48
|
+
}, []);
|
|
49
|
+
if (isSkeleton) {
|
|
50
|
+
return /* @__PURE__ */ jsx(WrapperNoItemSelected, {
|
|
51
|
+
id: "WrapperNoItemSelected",
|
|
52
|
+
children: /* @__PURE__ */ jsx(WrapperSKTNoItemSelected, {
|
|
53
|
+
id: "WrapperSKTNoItemSelected",
|
|
54
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
55
|
+
variant: "rectangular",
|
|
56
|
+
width: "100%",
|
|
57
|
+
height: "100%"
|
|
58
|
+
})
|
|
49
59
|
})
|
|
50
|
-
})
|
|
51
|
-
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return /* @__PURE__ */ jsxs(WrapperNoItemSelected, {
|
|
52
63
|
id: "WrapperNoItemSelected",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
54
|
-
src
|
|
64
|
+
children: [/* @__PURE__ */ jsx(Img, {
|
|
65
|
+
src,
|
|
55
66
|
width: "100%",
|
|
56
67
|
height: "100%"
|
|
57
|
-
}), /* @__PURE__ */
|
|
58
|
-
children:
|
|
68
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
69
|
+
children: getLabel("no_item_selected.message")
|
|
59
70
|
})]
|
|
60
71
|
});
|
|
61
72
|
}
|
|
62
|
-
function
|
|
73
|
+
function getNoItemSelectedComponentsDictionary() {
|
|
63
74
|
return ["no_item_selected"];
|
|
64
75
|
}
|
|
65
|
-
const
|
|
76
|
+
const defaultNoItemSelectedDictionary = {
|
|
66
77
|
no_item_selected: {
|
|
67
78
|
message: "Please select a item to show detail"
|
|
68
79
|
}
|
|
69
80
|
};
|
|
70
81
|
export {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
NoItemSelected as N,
|
|
83
|
+
defaultNoItemSelectedDictionary as d,
|
|
84
|
+
getNoItemSelectedComponentsDictionary as g
|
|
74
85
|
};
|