@m4l/components 0.0.32 → 0.0.35
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/dist/components/DynamicFilter/components/ApplyedFilters/styles.d.ts +1 -0
- package/dist/components/DynamicFilter/index.js +34 -22
- package/dist/components/Icon/index.js +45 -10
- package/dist/components/Icon/styles.d.ts +2 -0
- package/dist/components/Icon/types.d.ts +3 -2
- package/dist/components/ModalDialog/index.js +3 -3
- package/dist/components/ObjectLogs/index.js +10 -4
- package/dist/components/PaperForm/index.js +4 -7
- package/dist/components/PropertyValue/index.js +32 -5
- package/dist/components/PropertyValue/styles.d.ts +2 -2
- package/dist/components/PropertyValue/types.d.ts +10 -3
- package/dist/components/ScrollBar/index.d.ts +2 -2
- package/dist/components/ScrollBar/index.js +2 -2
- package/dist/components/hook-form/RHFUpload/RHFUploadImage/components/UploadImage/styles.d.ts +7 -0
- package/dist/components/hook-form/RHFUpload/RHFUploadImage/styles.d.ts +2 -0
- package/dist/components/hook-form/RHFUpload.js +110 -32
- package/dist/components/mui_extended/IconButton/index.js +16 -9
- package/dist/components/mui_extended/MenuActions/index.js +5 -7
- package/dist/index.js +1 -1
- package/dist/vendor.js +2 -2
- package/package.json +3 -3
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const WrapperApplyedFilters: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
+
export declare const ContainerApplyedFilters: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as
|
|
1
|
+
import { S as ScrollBar } from "../ScrollBar/index.js";
|
|
2
2
|
import { styled } from "@mui/material/styles";
|
|
3
3
|
import { useRef, useState, useMemo, useCallback, useEffect, createContext, useContext } from "react";
|
|
4
4
|
import { useModuleDictionary, voidFunction, useHostTools, useEnvironment, useFlagsPresent } from "@m4l/core";
|
|
@@ -29,6 +29,12 @@ import { M as MenuPopover } from "../mui_extended/MenuPopover/index.js";
|
|
|
29
29
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
30
30
|
const WrapperApplyedFilters = styled("div")(({
|
|
31
31
|
theme
|
|
32
|
+
}) => ({
|
|
33
|
+
width: "100%",
|
|
34
|
+
marginLeft: theme.spacing(1.5)
|
|
35
|
+
}));
|
|
36
|
+
const ContainerApplyedFilters = styled("div")(({
|
|
37
|
+
theme
|
|
32
38
|
}) => ({
|
|
33
39
|
width: "100%",
|
|
34
40
|
display: "flex",
|
|
@@ -905,7 +911,7 @@ function ApplyedFilter(props) {
|
|
|
905
911
|
return /* @__PURE__ */ jsxs(WrapperApplyedFilter, {
|
|
906
912
|
id: "WrapperApplyedFilter",
|
|
907
913
|
className: !isSetted ? "waf_no_setted" : "",
|
|
908
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
914
|
+
children: [urlIcon && /* @__PURE__ */ jsx(Icon, {
|
|
909
915
|
src: urlIcon,
|
|
910
916
|
onClick
|
|
911
917
|
}), /* @__PURE__ */ jsxs(AplyedFilterStyled, {
|
|
@@ -933,12 +939,9 @@ function ApplyedFilters() {
|
|
|
933
939
|
id: "WrapperApplyedFilters"
|
|
934
940
|
});
|
|
935
941
|
}
|
|
936
|
-
return /* @__PURE__ */ jsx(
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
},
|
|
940
|
-
children: /* @__PURE__ */ jsx(Scrollbar, {
|
|
941
|
-
children: /* @__PURE__ */ jsx(WrapperApplyedFilters, {
|
|
942
|
+
return /* @__PURE__ */ jsx(WrapperApplyedFilters, {
|
|
943
|
+
children: /* @__PURE__ */ jsx(ScrollBar, {
|
|
944
|
+
children: /* @__PURE__ */ jsx(ContainerApplyedFilters, {
|
|
942
945
|
id: "WrapperApplyedFilters",
|
|
943
946
|
children: [...applyedFilters].sort((a, b) => a.isSetted === b.isSetted ? 0 : a.isSetted ? -1 : 1).reverse().map((filter) => /* @__PURE__ */ jsx(ApplyedFilter, {
|
|
944
947
|
...filter
|
|
@@ -972,7 +975,8 @@ const ClearFilters = () => {
|
|
|
972
975
|
} = useEnvironment();
|
|
973
976
|
const {
|
|
974
977
|
clearFilters,
|
|
975
|
-
isSkeleton
|
|
978
|
+
isSkeleton,
|
|
979
|
+
applyedFilters
|
|
976
980
|
} = useBase();
|
|
977
981
|
if (isSkeleton) {
|
|
978
982
|
return /* @__PURE__ */ jsx(SKTClearFilters, {
|
|
@@ -983,12 +987,16 @@ const ClearFilters = () => {
|
|
|
983
987
|
})
|
|
984
988
|
});
|
|
985
989
|
}
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
990
|
+
console.log("Dynamic validation", applyedFilters.findIndex((f) => f.fixed == false) > -1);
|
|
991
|
+
if (applyedFilters.findIndex((f) => f.fixed == false) > -1) {
|
|
992
|
+
return /* @__PURE__ */ jsx(WrapperClearFilters, {
|
|
993
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
994
|
+
src: `${host_static_assets}/${environment}/frontend/components/dynamic_filter/assets/icons/clear.svg`,
|
|
995
|
+
onClick: clearFilters
|
|
996
|
+
})
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
992
1000
|
};
|
|
993
1001
|
const SKTWrapperFilterButton = styled("div")(({
|
|
994
1002
|
theme
|
|
@@ -1072,7 +1080,7 @@ const WrapperInputFilter = styled("div")(({
|
|
|
1072
1080
|
alignItems: "center",
|
|
1073
1081
|
width: "100%",
|
|
1074
1082
|
height: theme.spacing(3.75),
|
|
1075
|
-
|
|
1083
|
+
marginLeft: theme.spacing(1.5),
|
|
1076
1084
|
padding: theme.spacing(0, 1.5),
|
|
1077
1085
|
borderRight: `1px solid ${theme.palette.divider}`,
|
|
1078
1086
|
borderLeft: `1px solid ${theme.palette.divider}`,
|
|
@@ -1165,6 +1173,9 @@ function InputFilter() {
|
|
|
1165
1173
|
}
|
|
1166
1174
|
};
|
|
1167
1175
|
console.log("Render InputFilter");
|
|
1176
|
+
if (!withAllField && availableFields.length == 0) {
|
|
1177
|
+
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1178
|
+
}
|
|
1168
1179
|
return /* @__PURE__ */ jsxs(WrapperInputFilter, {
|
|
1169
1180
|
id: "WrapperInputFilter",
|
|
1170
1181
|
children: [/* @__PURE__ */ jsx(StyledInputFilter, {
|
|
@@ -1301,8 +1312,8 @@ const PopupEditFilter = () => {
|
|
|
1301
1312
|
urlCancel: -1,
|
|
1302
1313
|
children: /* @__PURE__ */ jsxs(WrapperPopupEditFilter, {
|
|
1303
1314
|
children: [/* @__PURE__ */ jsxs(HeaderContainer, {
|
|
1304
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
1305
|
-
src: field
|
|
1315
|
+
children: [field?.urlIcon && /* @__PURE__ */ jsx(Icon, {
|
|
1316
|
+
src: field.urlIcon
|
|
1306
1317
|
}), /* @__PURE__ */ jsx(TitleContainer, {
|
|
1307
1318
|
children: field?.label
|
|
1308
1319
|
})]
|
|
@@ -1336,6 +1347,7 @@ const WrapperFilter = styled("div", {
|
|
|
1336
1347
|
alignItems: "center",
|
|
1337
1348
|
justifyContent: "flex-start",
|
|
1338
1349
|
height: "auto",
|
|
1350
|
+
width: "100%",
|
|
1339
1351
|
padding: theme.spacing(1.5),
|
|
1340
1352
|
borderRadius: theme.spacing(1),
|
|
1341
1353
|
border: inEdition ? `1px solid ${theme.palette.primary.main}` : `1px solid ${theme.palette.divider}`
|
|
@@ -1352,16 +1364,16 @@ const WrapperFilterMobile = styled("div", {
|
|
|
1352
1364
|
justifyContent: "space-between",
|
|
1353
1365
|
minWidth: theme.spacing(25),
|
|
1354
1366
|
height: "auto",
|
|
1367
|
+
width: "100%",
|
|
1355
1368
|
padding: theme.spacing(1.5),
|
|
1356
1369
|
borderRadius: theme.spacing(1),
|
|
1357
1370
|
border: inEdition ? `1px solid ${theme.palette.primary.main}` : `1px solid ${theme.palette.divider}`,
|
|
1358
1371
|
gap: theme.spacing(1.5)
|
|
1359
1372
|
}));
|
|
1360
|
-
const ContainerFistRow = styled("div")(({
|
|
1361
|
-
|
|
1362
|
-
}) => ({
|
|
1373
|
+
const ContainerFistRow = styled("div")(() => ({
|
|
1374
|
+
width: "100%",
|
|
1363
1375
|
display: "flex",
|
|
1364
|
-
|
|
1376
|
+
justifyContent: "space-between"
|
|
1365
1377
|
}));
|
|
1366
1378
|
const DynamicFilter = (props) => {
|
|
1367
1379
|
const isDesktop = useResponsiveDesktop();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { styled } from "@mui/material";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
const MaskIcon = styled("div", {
|
|
4
5
|
shouldForwardProp: (props) => props !== "src" && props !== "width" && props !== "height" && props !== "bgColor"
|
|
@@ -7,22 +8,56 @@ const MaskIcon = styled("div", {
|
|
|
7
8
|
mask: `url(${props.src}) no-repeat`,
|
|
8
9
|
width: props.width === void 0 ? "20px" : props.width,
|
|
9
10
|
height: props.height === void 0 ? "20px" : props.height,
|
|
10
|
-
backgroundColor: props.bgColor === "active" ? props.theme.palette.action.active : props.bgColor === "selected" ? props.theme.palette.primary.main : props.bgColor === "info" ? props.theme.palette.info.main : props.bgColor === "warning" ? props.theme.palette.warning.main : props.bgColor === "error" ? props.theme.palette.
|
|
11
|
+
backgroundColor: props.bgColor === "active" ? props.theme.palette.action.active : props.bgColor === "selected" ? props.theme.palette.primary.main : props.bgColor === "info" ? props.theme.palette.info.main : props.bgColor === "warning" ? props.theme.palette.warning.main : props.bgColor === "error" ? props.theme.palette.warning.main : props.bgColor === "selected" ? props.theme.palette.primary.main : props.bgColor
|
|
12
|
+
}));
|
|
13
|
+
const WrapperPlaceHolder = styled("div", {
|
|
14
|
+
shouldForwardProp: (props) => props !== "widht" && props !== "height"
|
|
15
|
+
})((props) => ({
|
|
16
|
+
display: "flex",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
width: props.width,
|
|
20
|
+
height: props.height
|
|
11
21
|
}));
|
|
12
22
|
function Icon(props) {
|
|
23
|
+
const [resource, setResource] = useState(void 0);
|
|
13
24
|
const {
|
|
14
|
-
src = "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/commons/assets/icons/default.svg",
|
|
15
|
-
width = "20px",
|
|
16
|
-
height = "20px",
|
|
17
|
-
bgColor = "active",
|
|
18
|
-
onClick
|
|
19
|
-
} = props;
|
|
20
|
-
return /* @__PURE__ */ jsx(MaskIcon, {
|
|
21
25
|
src,
|
|
26
|
+
width = "16px",
|
|
27
|
+
height = "16px",
|
|
28
|
+
bgColor = "active"
|
|
29
|
+
} = props;
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
let mounted = true;
|
|
32
|
+
if (resource)
|
|
33
|
+
return;
|
|
34
|
+
(async function networkOperation() {
|
|
35
|
+
await fetch(src).then((response) => {
|
|
36
|
+
if (mounted) {
|
|
37
|
+
setResource(response.url);
|
|
38
|
+
}
|
|
39
|
+
}).catch((err) => {
|
|
40
|
+
});
|
|
41
|
+
})();
|
|
42
|
+
return function clenUp() {
|
|
43
|
+
console.log("CleanUP", "Icon");
|
|
44
|
+
mounted = false;
|
|
45
|
+
};
|
|
46
|
+
}, []);
|
|
47
|
+
const placeHolder = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgdmlld0JveD0iMCAwIDcwIDcwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA3MCA3MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM2MzczODE7fQo8L3N0eWxlPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00NSw4LjdjMS40LTEuNSwzLjQtMi4zLDUuNC0yLjNzMy45LDAuOCw1LjQsMi4zczIuNCwzLjUsMi41LDUuN2MwLDIuMi0wLjksNC4yLTIuNCw1LjdzLTMuNSwyLjMtNS41LDIuMgoJCWMtMi4xLDAuMS00LTAuNy01LjUtMi4yYy0xLjQtMS41LTIuMy0zLjUtMi40LTUuN0M0Mi42LDEyLjIsNDMuNSwxMC4yLDQ1LDguN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02OC40LDYyLjFjLTAuMywwLjUtMC43LDAuOC0xLjIsMS4xcy0xLDAuNC0xLjYsMC40SDQuM2MtMC42LDAtMS4xLTAuMS0xLjYtMC40cy0wLjktMC42LTEuMi0xLjEKCQljLTAuMi0wLjUtMC40LTEtMC40LTEuNXMwLjEtMS4xLDAuNC0xLjVsMjMtMzYuNGMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNHMwLjksMC42LDEuMiwxLjEKCQlsMTEuNSwxOC4yYzAuMiwwLjMsMC41LDAuNSwwLjgsMC43czAuNiwwLjMsMSwwLjNjMC4zLDAsMC43LTAuMSwxLTAuM3MwLjYtMC40LDAuOC0wLjdsMy4xLTQuOWMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMQoJCXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNGMwLjUsMC4zLDAuOSwwLjYsMS4yLDEuMWwxNC42LDIzLjFjMC4zLDAuNSwwLjMsMSwwLjMsMS41UzY4LjcsNjEuNyw2OC40LDYyLjF6Ii8+CjwvZz4KPC9zdmc+Cg==";
|
|
48
|
+
return /* @__PURE__ */ jsx(WrapperPlaceHolder, {
|
|
49
|
+
id: "IconReact",
|
|
22
50
|
width,
|
|
23
51
|
height,
|
|
24
|
-
|
|
25
|
-
|
|
52
|
+
children: resource ? /* @__PURE__ */ jsx(MaskIcon, {
|
|
53
|
+
src,
|
|
54
|
+
width,
|
|
55
|
+
height,
|
|
56
|
+
bgColor
|
|
57
|
+
}) : /* @__PURE__ */ jsx("img", {
|
|
58
|
+
src: placeHolder,
|
|
59
|
+
alt: "icon_svg"
|
|
60
|
+
})
|
|
26
61
|
});
|
|
27
62
|
}
|
|
28
63
|
export { Icon as I };
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { WrapperPlaceHolderProps } from './types';
|
|
2
3
|
export declare const MaskIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & import("./types").OwnProps & import("react").HTMLProps<HTMLDivElement>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
|
+
export declare const WrapperPlaceHolder: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & WrapperPlaceHolderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { HTMLProps } from 'react';
|
|
2
2
|
export interface OwnProps {
|
|
3
|
-
src: string
|
|
3
|
+
src: string;
|
|
4
4
|
width?: number | string;
|
|
5
5
|
height?: number | string;
|
|
6
|
-
bgColor?: string | 'info' | 'warning' | 'error' | 'active' | 'disabled';
|
|
6
|
+
bgColor?: string | 'info' | 'warning' | 'error' | 'active' | 'selected' | 'disabled';
|
|
7
7
|
}
|
|
8
|
+
export declare type WrapperPlaceHolderProps = Pick<OwnProps, 'width' | 'height'>;
|
|
8
9
|
export declare type IconProps = OwnProps & HTMLProps<HTMLDivElement>;
|
|
@@ -6,7 +6,7 @@ import { a as getThemeVariantColor } from "../../vendor.js";
|
|
|
6
6
|
import { R as Resizeable } from "../Resizeable/index.js";
|
|
7
7
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
8
8
|
import { useEnvironment } from "@m4l/core";
|
|
9
|
-
import {
|
|
9
|
+
import { I as Icon } from "../Icon/index.js";
|
|
10
10
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
11
11
|
import { F as FormActions, g as getActionnsComponentsDictionary } from "../FormActions/index.js";
|
|
12
12
|
const WrapperDialog = styled(Dialog)(() => ({}));
|
|
@@ -73,7 +73,7 @@ const Header = (props) => {
|
|
|
73
73
|
className: "draggable-dialog-title",
|
|
74
74
|
children: [/* @__PURE__ */ jsx(IconHeader, {
|
|
75
75
|
variant,
|
|
76
|
-
children: !iconComponent ? /* @__PURE__ */ jsx(
|
|
76
|
+
children: !iconComponent ? /* @__PURE__ */ jsx(Icon, {
|
|
77
77
|
src: variant === "warning" ? iconSrcWarning : variant === "delete" ? iconSrcError : variant === "info" ? iconSrcInfo : iconDefault
|
|
78
78
|
}) : iconComponent
|
|
79
79
|
}), /* @__PURE__ */ jsx(ModalTitle, {
|
|
@@ -83,7 +83,7 @@ const Header = (props) => {
|
|
|
83
83
|
}), withClose && /* @__PURE__ */ jsx(IconButton, {
|
|
84
84
|
onClick: onCloseModal,
|
|
85
85
|
"aria-label": "click",
|
|
86
|
-
children: /* @__PURE__ */ jsx(
|
|
86
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
87
87
|
src: `${host_static_assets}/${environment}/frontend/components/dialog/assets/icons/close.svg`
|
|
88
88
|
})
|
|
89
89
|
})]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback, useMemo } from "react";
|
|
2
|
-
import { useNetwork, useModuleDictionary, usePaginate } from "@m4l/core";
|
|
2
|
+
import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
|
|
3
3
|
import { styled } from "@mui/material/styles";
|
|
4
4
|
import { D as DataGrid } from "../DataGrid/index.js";
|
|
5
5
|
import { D as DateFormatter } from "../DataGrid/formatters/DateFormatter/index.js";
|
|
@@ -7,6 +7,7 @@ import { Tooltip, IconButton } from "@mui/material";
|
|
|
7
7
|
import { R as ReactJson } from "../../react-json-view.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { u as useModal } from "../../hooks/useModal/index.js";
|
|
10
|
+
import { I as Icon } from "../Icon/index.js";
|
|
10
11
|
import { D as DynamicFilter } from "../DynamicFilter/index.js";
|
|
11
12
|
const Container$1 = styled("div")(() => ({
|
|
12
13
|
height: "100%",
|
|
@@ -19,7 +20,7 @@ const Actions = styled("div")(({
|
|
|
19
20
|
theme
|
|
20
21
|
}) => ({
|
|
21
22
|
position: "relative",
|
|
22
|
-
height: "
|
|
23
|
+
height: "auto",
|
|
23
24
|
display: "flex",
|
|
24
25
|
flexDirection: "row",
|
|
25
26
|
justifyContent: "flex-start",
|
|
@@ -93,6 +94,10 @@ function DetailFormatter(props) {
|
|
|
93
94
|
const {
|
|
94
95
|
getLabel
|
|
95
96
|
} = useModuleDictionary();
|
|
97
|
+
const {
|
|
98
|
+
host_static_assets,
|
|
99
|
+
environment
|
|
100
|
+
} = useEnvironment();
|
|
96
101
|
const onClickDetail = () => {
|
|
97
102
|
openModal({
|
|
98
103
|
onQueryClose: () => closeModal(),
|
|
@@ -110,8 +115,8 @@ function DetailFormatter(props) {
|
|
|
110
115
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
111
116
|
onClick: onClickDetail,
|
|
112
117
|
"aria-label": "filter",
|
|
113
|
-
children: /* @__PURE__ */ jsx(
|
|
114
|
-
|
|
118
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
119
|
+
src: `${host_static_assets}/${environment}/frontend/components/object_logs/assets/icons/search.svg`
|
|
115
120
|
})
|
|
116
121
|
})
|
|
117
122
|
});
|
|
@@ -120,6 +125,7 @@ function ObjectLogs(props) {
|
|
|
120
125
|
const {
|
|
121
126
|
getLabel
|
|
122
127
|
} = useModuleDictionary();
|
|
128
|
+
useEnvironment();
|
|
123
129
|
const {
|
|
124
130
|
resource_id,
|
|
125
131
|
object_id
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled, useTheme } from "@mui/material/styles";
|
|
2
2
|
import { Skeleton } from "@mui/material";
|
|
3
3
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { I as Icon } from "../Icon/index.js";
|
|
5
5
|
const WrapperPaper = styled("div")(({
|
|
6
6
|
theme
|
|
7
7
|
}) => ({
|
|
@@ -93,7 +93,7 @@ function PaperForm(props) {
|
|
|
93
93
|
children,
|
|
94
94
|
isSkeleton = false
|
|
95
95
|
} = props;
|
|
96
|
-
|
|
96
|
+
useTheme();
|
|
97
97
|
return /* @__PURE__ */ jsx(WrapperPaper, {
|
|
98
98
|
id: "ContainerPropertyValue",
|
|
99
99
|
children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, {
|
|
@@ -102,11 +102,8 @@ function PaperForm(props) {
|
|
|
102
102
|
children: /* @__PURE__ */ jsxs(IconTitleContainer, {
|
|
103
103
|
className: "draggable-dialog-title",
|
|
104
104
|
children: [/* @__PURE__ */ jsx(IconHeader, {
|
|
105
|
-
children: /* @__PURE__ */ jsx(
|
|
106
|
-
src: urlIcon
|
|
107
|
-
sx: {
|
|
108
|
-
color: theme.palette.action.active
|
|
109
|
-
}
|
|
105
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
106
|
+
src: urlIcon
|
|
110
107
|
})
|
|
111
108
|
}), tittle]
|
|
112
109
|
})
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
2
|
import { Skeleton } from "@mui/material";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
4
5
|
const WrapperPropertyValue = styled("div", {
|
|
5
6
|
shouldForwardProp: (prop) => prop !== "propertyWidth" && prop !== "propertyHeight" && prop !== "isForm"
|
|
6
7
|
})(({
|
|
@@ -12,7 +13,7 @@ const WrapperPropertyValue = styled("div", {
|
|
|
12
13
|
alignItems: "flex-start",
|
|
13
14
|
width: "100%",
|
|
14
15
|
padding: `${theme.spacing(1)} ${theme.spacing(2)}`,
|
|
15
|
-
|
|
16
|
+
maxHeight: propertyHeight || "auto",
|
|
16
17
|
":hover": {
|
|
17
18
|
backgroundColor: isForm ? "unset" : theme.palette.grid?.rowHover
|
|
18
19
|
},
|
|
@@ -44,8 +45,9 @@ const Property = styled("span", {
|
|
|
44
45
|
overflowWrap: "break-word"
|
|
45
46
|
}));
|
|
46
47
|
const Value = styled("div", {
|
|
47
|
-
shouldForwardProp: (prop) => prop !== "propertyWidth" && prop !== "propertyHeight"
|
|
48
|
+
shouldForwardProp: (prop) => prop !== "propertyWidth" && prop !== "propertyHeight" && prop !== "valueWidth"
|
|
48
49
|
})(({
|
|
50
|
+
width,
|
|
49
51
|
propertyHeight,
|
|
50
52
|
theme
|
|
51
53
|
}) => ({
|
|
@@ -54,9 +56,9 @@ const Value = styled("div", {
|
|
|
54
56
|
color: theme.palette.text.secondary,
|
|
55
57
|
position: "relative",
|
|
56
58
|
padding: "1px",
|
|
57
|
-
|
|
59
|
+
width: width ? `${width}%` : "100%",
|
|
60
|
+
height: propertyHeight ? propertyHeight : "auto",
|
|
58
61
|
marginTop: theme.spacing(1),
|
|
59
|
-
width: "100%",
|
|
60
62
|
[theme.breakpoints.up("sm")]: {
|
|
61
63
|
marginLeft: theme.spacing(2),
|
|
62
64
|
marginTop: "0px"
|
|
@@ -83,9 +85,34 @@ function PropertyValue(props) {
|
|
|
83
85
|
value,
|
|
84
86
|
propertyWidth,
|
|
85
87
|
propertyHeight,
|
|
88
|
+
valueWidth = "100",
|
|
86
89
|
isForm,
|
|
87
90
|
isSkeleton = false
|
|
88
91
|
} = props;
|
|
92
|
+
const isDesktop = useResponsiveDesktop();
|
|
93
|
+
console.log("valueWidth", valueWidth);
|
|
94
|
+
const getValueW = () => {
|
|
95
|
+
if (valueWidth === "75" && isDesktop) {
|
|
96
|
+
return "75";
|
|
97
|
+
} else if (valueWidth === "75" && !isDesktop) {
|
|
98
|
+
return "100";
|
|
99
|
+
}
|
|
100
|
+
if (valueWidth === "50" && isDesktop) {
|
|
101
|
+
return "50";
|
|
102
|
+
} else if (valueWidth === "50" && !isDesktop) {
|
|
103
|
+
return "100";
|
|
104
|
+
}
|
|
105
|
+
if (valueWidth === "25" && isDesktop || valueWidth === "12.5" && isDesktop) {
|
|
106
|
+
return parseFloat(valueWidth).toString(10);
|
|
107
|
+
} else if (valueWidth === "25" && !isDesktop || valueWidth === "12.5" && !isDesktop) {
|
|
108
|
+
return (parseFloat(valueWidth) * 2).toString(10);
|
|
109
|
+
}
|
|
110
|
+
console.log("valueWidth in function", valueWidth);
|
|
111
|
+
return "100";
|
|
112
|
+
};
|
|
113
|
+
const valueW = getValueW();
|
|
114
|
+
console.log("valueWidth in function", valueWidth);
|
|
115
|
+
console.log("getValueW", typeof getValueW(), getValueW());
|
|
89
116
|
return /* @__PURE__ */ jsxs(WrapperPropertyValue, {
|
|
90
117
|
id: "ContainerPropertyValue",
|
|
91
118
|
isForm,
|
|
@@ -99,7 +126,7 @@ function PropertyValue(props) {
|
|
|
99
126
|
children: isSkeleton ? /* @__PURE__ */ jsx(SKTProperty, {}) : property
|
|
100
127
|
}), /* @__PURE__ */ jsx(Value, {
|
|
101
128
|
id: "Value",
|
|
102
|
-
|
|
129
|
+
width: valueW,
|
|
103
130
|
propertyHeight,
|
|
104
131
|
children: value
|
|
105
132
|
})]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PropertyProps } from './types';
|
|
2
|
+
import { PropertyProps, ValueProps } from './types';
|
|
3
3
|
export declare const WrapperPropertyValue: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & PropertyProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
4
|
export declare const Property: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & PropertyProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
5
|
-
export declare const Value: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> &
|
|
5
|
+
export declare const Value: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & ValueProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
6
|
export declare const SKTWrapperProperty: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
export interface PropertyProps {
|
|
3
3
|
propertyWidth?: number;
|
|
4
|
-
propertyHeight?: number;
|
|
4
|
+
propertyHeight?: number | string;
|
|
5
5
|
isForm?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
8
|
-
|
|
7
|
+
export interface ValueProps {
|
|
8
|
+
width: string;
|
|
9
|
+
propertyHeight?: number | string;
|
|
10
|
+
}
|
|
11
|
+
export interface PropertyValueProps extends PropertyProps, ValueTypeProps {
|
|
9
12
|
property: string;
|
|
13
|
+
isSkeleton?: boolean;
|
|
10
14
|
value: number | string | ReactNode;
|
|
11
15
|
}
|
|
16
|
+
export interface ValueTypeProps {
|
|
17
|
+
valueWidth?: '100' | '75' | '50' | '25' | '12.5';
|
|
18
|
+
}
|
|
@@ -2,5 +2,5 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
children?: ReactElement;
|
|
4
4
|
}
|
|
5
|
-
export declare function
|
|
6
|
-
export default
|
|
5
|
+
export declare function ScrollBar({ children }: Props): JSX.Element;
|
|
6
|
+
export default ScrollBar;
|
|
@@ -29,7 +29,7 @@ const SimpleBarStyle = styled(SimpleBar)(({
|
|
|
29
29
|
zIndex: "inherit"
|
|
30
30
|
}
|
|
31
31
|
}));
|
|
32
|
-
function
|
|
32
|
+
function ScrollBar({
|
|
33
33
|
children
|
|
34
34
|
}) {
|
|
35
35
|
const userAgent = typeof navigator === "undefined" ? "SSR" : navigator.userAgent;
|
|
@@ -49,4 +49,4 @@ function Scrollbar({
|
|
|
49
49
|
})
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
export {
|
|
52
|
+
export { ScrollBar as S };
|
package/dist/components/hook-form/RHFUpload/RHFUploadImage/components/UploadImage/styles.d.ts
CHANGED
|
@@ -2,3 +2,10 @@
|
|
|
2
2
|
export declare const RootStyle: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
3
|
export declare const DropZoneStyle: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
4
|
export declare const PlaceholderStyle: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const ContainerUploadBody: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const Containermessage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const ContainerTitle: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
8
|
+
export declare const ContainerDescription: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
9
|
+
export declare const ContainerConditions: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
10
|
+
export declare const WrapperImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
+
export declare const ContainerPlaceHolder: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WrapperRHFUploadImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { styled as styled$1, FormHelperText } from "@mui/material";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
3
|
import { useFormContext, Controller } from "react-hook-form";
|
|
4
4
|
import { i as isString_1 } from "../../lodash.js";
|
|
5
5
|
import { u as useDropzone } from "../../node_modules.js";
|
|
6
|
+
import { styled, alpha } from "@mui/material/styles";
|
|
6
7
|
import { I as Image } from "../Image/index.js";
|
|
7
|
-
import { useEnvironment } from "@m4l/core";
|
|
8
|
+
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
8
9
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
9
10
|
import "../../react-lazy-load-image-component.js";
|
|
10
|
-
import { styled } from "@mui/material/styles";
|
|
11
11
|
const RootStyle = styled("div")(({
|
|
12
12
|
theme
|
|
13
13
|
}) => ({
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
14
|
+
width: "inherit",
|
|
15
|
+
height: "100%",
|
|
16
|
+
minWidth: theme.spacing(20),
|
|
16
17
|
margin: "auto",
|
|
17
18
|
borderRadius: theme.spacing(1),
|
|
18
19
|
padding: theme.spacing(1),
|
|
@@ -45,20 +46,74 @@ const DropZoneStyle = styled("div")(({
|
|
|
45
46
|
const PlaceholderStyle = styled("div")(({
|
|
46
47
|
theme
|
|
47
48
|
}) => ({
|
|
49
|
+
"&:hover": {
|
|
50
|
+
opacity: 1
|
|
51
|
+
},
|
|
48
52
|
display: "flex",
|
|
49
|
-
position: "absolute",
|
|
50
|
-
alignItems: "center",
|
|
51
|
-
flexDirection: "column",
|
|
52
53
|
justifyContent: "center",
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
position: "absolute",
|
|
55
|
+
zIndex: "2",
|
|
56
|
+
inset: "0",
|
|
55
57
|
transition: theme.transitions.create("opacity", {
|
|
56
58
|
easing: theme.transitions.easing.easeInOut,
|
|
57
59
|
duration: theme.transitions.duration.shorter
|
|
58
60
|
}),
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
overflow: "auto"
|
|
62
|
+
}));
|
|
63
|
+
const ContainerUploadBody = styled("div")(({
|
|
64
|
+
theme
|
|
65
|
+
}) => ({
|
|
66
|
+
padding: theme.spacing(3, 5),
|
|
67
|
+
display: "flex",
|
|
68
|
+
flexWrap: "wrap",
|
|
69
|
+
justifyContent: "center",
|
|
70
|
+
width: "100%",
|
|
71
|
+
height: "100%",
|
|
72
|
+
gap: theme.spacing(3)
|
|
73
|
+
}));
|
|
74
|
+
const Containermessage = styled("div")(({
|
|
75
|
+
theme
|
|
76
|
+
}) => ({
|
|
77
|
+
display: "flex",
|
|
78
|
+
justifyContent: "center",
|
|
79
|
+
flexDirection: "column",
|
|
80
|
+
gap: theme.spacing(3)
|
|
81
|
+
}));
|
|
82
|
+
const ContainerTitle = styled("span")(({
|
|
83
|
+
theme
|
|
84
|
+
}) => ({
|
|
85
|
+
...theme.typography.subtitle2,
|
|
86
|
+
width: "fit-content"
|
|
87
|
+
}));
|
|
88
|
+
const ContainerDescription = styled("span")(({
|
|
89
|
+
theme
|
|
90
|
+
}) => ({
|
|
91
|
+
...theme.typography.body2,
|
|
92
|
+
minWidth: theme.spacing(20)
|
|
93
|
+
}));
|
|
94
|
+
const ContainerConditions = styled("span")(({
|
|
95
|
+
theme
|
|
96
|
+
}) => ({
|
|
97
|
+
...theme.typography.caption,
|
|
98
|
+
width: "fit-content"
|
|
99
|
+
}));
|
|
100
|
+
const WrapperImage = styled("div")(({
|
|
101
|
+
theme
|
|
102
|
+
}) => ({
|
|
103
|
+
display: "flex",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
maxWidth: theme.spacing(20)
|
|
106
|
+
}));
|
|
107
|
+
styled("div")(({
|
|
108
|
+
theme
|
|
109
|
+
}) => ({
|
|
110
|
+
width: "100%",
|
|
111
|
+
height: "100%",
|
|
112
|
+
position: "absolute",
|
|
113
|
+
inset: "0",
|
|
114
|
+
display: "flex",
|
|
115
|
+
justifyContent: "center",
|
|
116
|
+
alignItems: "center"
|
|
62
117
|
}));
|
|
63
118
|
function UploadImage({
|
|
64
119
|
error,
|
|
@@ -80,8 +135,12 @@ function UploadImage({
|
|
|
80
135
|
host_static_assets,
|
|
81
136
|
environment
|
|
82
137
|
} = useEnvironment();
|
|
138
|
+
const {
|
|
139
|
+
getLabel
|
|
140
|
+
} = useModuleDictionary();
|
|
83
141
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
84
142
|
children: [/* @__PURE__ */ jsx(RootStyle, {
|
|
143
|
+
id: "RootStyle",
|
|
85
144
|
sx: {
|
|
86
145
|
...(isDragReject || error) && {
|
|
87
146
|
borderColor: "error.light"
|
|
@@ -89,6 +148,7 @@ function UploadImage({
|
|
|
89
148
|
...sx
|
|
90
149
|
},
|
|
91
150
|
children: /* @__PURE__ */ jsxs(DropZoneStyle, {
|
|
151
|
+
id: "DropZoneStyle",
|
|
92
152
|
...getRootProps(),
|
|
93
153
|
sx: {
|
|
94
154
|
...isDragActive && {
|
|
@@ -103,36 +163,54 @@ function UploadImage({
|
|
|
103
163
|
sx: {
|
|
104
164
|
zIndex: 8
|
|
105
165
|
}
|
|
106
|
-
}), /* @__PURE__ */
|
|
166
|
+
}), /* @__PURE__ */ jsx(PlaceholderStyle, {
|
|
167
|
+
id: "PlaceholderStyle",
|
|
107
168
|
className: "placeholder",
|
|
108
169
|
sx: {
|
|
109
|
-
...file
|
|
110
|
-
|
|
170
|
+
...file ? {
|
|
171
|
+
bgcolor: alpha("#161C24", 0.72),
|
|
111
172
|
color: "common.white",
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
173
|
+
opacity: 0
|
|
174
|
+
} : {
|
|
175
|
+
opacity: 1
|
|
116
176
|
},
|
|
117
177
|
...(isDragReject || error) && {
|
|
118
|
-
|
|
178
|
+
backgroundColor: alpha("error.main", 0.72),
|
|
179
|
+
color: "common.white"
|
|
119
180
|
}
|
|
120
181
|
},
|
|
121
|
-
children:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
182
|
+
children: /* @__PURE__ */ jsxs(ContainerUploadBody, {
|
|
183
|
+
className: "ContainerUploadBody",
|
|
184
|
+
children: [/* @__PURE__ */ jsx(WrapperImage, {
|
|
185
|
+
children: /* @__PURE__ */ jsx(Image, {
|
|
186
|
+
src: `${host_static_assets}/${environment}/frontend/components/upload_image/assets/img/upload_image_illustration.svg`,
|
|
187
|
+
effect: "opacity",
|
|
188
|
+
width: "100%",
|
|
189
|
+
height: "auto",
|
|
190
|
+
mb: 1
|
|
191
|
+
})
|
|
192
|
+
}), /* @__PURE__ */ jsxs(Containermessage, {
|
|
193
|
+
children: [/* @__PURE__ */ jsx(ContainerTitle, {
|
|
194
|
+
children: file ? getLabel("upload_image.title_update") : getLabel("upload_image.title_upload")
|
|
195
|
+
}), /* @__PURE__ */ jsx(ContainerDescription, {
|
|
196
|
+
children: getLabel("upload_image.description")
|
|
197
|
+
}), /* @__PURE__ */ jsx(ContainerConditions, {
|
|
198
|
+
children: getLabel("upload_image.conditions")
|
|
199
|
+
})]
|
|
200
|
+
})]
|
|
201
|
+
})
|
|
131
202
|
})]
|
|
132
203
|
})
|
|
133
204
|
}), helperText && helperText]
|
|
134
205
|
});
|
|
135
206
|
}
|
|
207
|
+
const WrapperRHFUploadImage = styled$1("div")(({
|
|
208
|
+
theme
|
|
209
|
+
}) => ({
|
|
210
|
+
width: "inherit",
|
|
211
|
+
height: "inherit",
|
|
212
|
+
padding: "1px"
|
|
213
|
+
}));
|
|
136
214
|
function RHFUploadImage({
|
|
137
215
|
name,
|
|
138
216
|
...other
|
|
@@ -161,7 +239,7 @@ function RHFUploadImage({
|
|
|
161
239
|
}
|
|
162
240
|
}) => {
|
|
163
241
|
const checkError = !!error && !field.value;
|
|
164
|
-
return /* @__PURE__ */ jsxs(
|
|
242
|
+
return /* @__PURE__ */ jsxs(WrapperRHFUploadImage, {
|
|
165
243
|
children: [/* @__PURE__ */ jsx(UploadImage, {
|
|
166
244
|
onDrop: handleDrop,
|
|
167
245
|
error: checkError,
|
|
@@ -3,7 +3,7 @@ import { forwardRef, useMemo } from "react";
|
|
|
3
3
|
import { IconButton as IconButton$1, Box, Tooltip } from "@mui/material";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { useModuleDictionary } from "@m4l/core";
|
|
6
|
-
import {
|
|
6
|
+
import { I as Icon } from "../../Icon/index.js";
|
|
7
7
|
const varSmall = {
|
|
8
8
|
hover: {
|
|
9
9
|
scale: 1.1
|
|
@@ -69,13 +69,12 @@ function IconButton({
|
|
|
69
69
|
const {
|
|
70
70
|
getLabel
|
|
71
71
|
} = useModuleDictionary();
|
|
72
|
-
const
|
|
73
|
-
size,
|
|
74
|
-
|
|
75
|
-
children: /* @__PURE__ */ jsx(BoxIcon, {
|
|
72
|
+
const iconMemo = useMemo(() => {
|
|
73
|
+
console.log("IconButton", size, other, src);
|
|
74
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
76
75
|
src
|
|
77
|
-
})
|
|
78
|
-
}
|
|
76
|
+
});
|
|
77
|
+
}, [src]);
|
|
79
78
|
const finalTooltip = useMemo(() => {
|
|
80
79
|
if (dictionaryTooltip && getLabel) {
|
|
81
80
|
return getLabel(dictionaryTooltip);
|
|
@@ -85,9 +84,17 @@ function IconButton({
|
|
|
85
84
|
if (finalTooltip && !other.disabled) {
|
|
86
85
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
87
86
|
title: finalTooltip,
|
|
88
|
-
children:
|
|
87
|
+
children: /* @__PURE__ */ jsx(IconButton$1, {
|
|
88
|
+
size,
|
|
89
|
+
...other,
|
|
90
|
+
children: iconMemo
|
|
91
|
+
})
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
|
-
return
|
|
94
|
+
return /* @__PURE__ */ jsx(IconButton$1, {
|
|
95
|
+
size,
|
|
96
|
+
...other,
|
|
97
|
+
children: iconMemo
|
|
98
|
+
});
|
|
92
99
|
}
|
|
93
100
|
export { IconButton as I, IconButtonAnimate as a };
|
|
@@ -3,7 +3,7 @@ import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
|
3
3
|
import { IconButton, Tooltip, MenuItem } from "@mui/material";
|
|
4
4
|
import { M as MenuPopover } from "../MenuPopover/index.js";
|
|
5
5
|
import { styled } from "@mui/material/styles";
|
|
6
|
-
import {
|
|
6
|
+
import { I as Icon } from "../../Icon/index.js";
|
|
7
7
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
8
8
|
const WrapperMenuActions = styled(IconButton)(() => ({}));
|
|
9
9
|
const LabelMemuItem = styled("div")(({
|
|
@@ -67,12 +67,10 @@ function MenuActions(props) {
|
|
|
67
67
|
id: "WrapperMenuActions",
|
|
68
68
|
size: "small",
|
|
69
69
|
onClick: handleOpen,
|
|
70
|
-
children: /* @__PURE__ */ jsx(
|
|
70
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
71
71
|
src: urlFinalIcon,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
height: 20
|
|
75
|
-
}
|
|
72
|
+
width: 16,
|
|
73
|
+
height: 16
|
|
76
74
|
})
|
|
77
75
|
})
|
|
78
76
|
}), /* @__PURE__ */ jsx(MenuPopover, {
|
|
@@ -101,7 +99,7 @@ function MenuActions(props) {
|
|
|
101
99
|
color: menuAction.color ? menuAction.color : "text.main"
|
|
102
100
|
},
|
|
103
101
|
disabled: menuAction.disabled,
|
|
104
|
-
children: [/* @__PURE__ */ jsx(
|
|
102
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
105
103
|
src: menuAction.urlIcon
|
|
106
104
|
}), /* @__PURE__ */ jsx(LabelMemuItem, {
|
|
107
105
|
children: getLabel(menuAction.dictionaryField)
|
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ export { O as ObjectLogs, d as defaultObjectLogDictionary, g as getObjectLogsCom
|
|
|
41
41
|
export { P as PaperForm } from "./components/PaperForm/index.js";
|
|
42
42
|
export { P as PropertyValue } from "./components/PropertyValue/index.js";
|
|
43
43
|
export { R as Resizeable } from "./components/Resizeable/index.js";
|
|
44
|
-
export { S as
|
|
44
|
+
export { S as ScrollBar } from "./components/ScrollBar/index.js";
|
|
45
45
|
export { S as SplitLayout } from "./components/SplitLayout/index.js";
|
|
46
46
|
export { M as ModalContext, a as ModalProvider } from "./contexts/ModalContext/index.js";
|
|
47
47
|
export { u as useModal } from "./hooks/useModal/index.js";
|
package/dist/vendor.js
CHANGED
|
@@ -15,10 +15,11 @@ import "./components/hook-form/RHFDateTime.js";
|
|
|
15
15
|
import "@mui/x-date-pickers";
|
|
16
16
|
import "./components/hook-form/RHFTextField/index.js";
|
|
17
17
|
import "./lodash.js";
|
|
18
|
-
import "./react-lazy-load-image-component.js";
|
|
19
18
|
import { styled } from "@mui/material/styles";
|
|
19
|
+
import "./react-lazy-load-image-component.js";
|
|
20
20
|
import "./components/Image/index.js";
|
|
21
21
|
import "./components/hook-form/RHFUpload.js";
|
|
22
|
+
import "./components/Icon/index.js";
|
|
22
23
|
import "./components/mui_extended/LoadingButton/index.js";
|
|
23
24
|
import "./components/mui_extended/MenuPopover/index.js";
|
|
24
25
|
import "./components/mui_extended/MenuActions/index.js";
|
|
@@ -32,7 +33,6 @@ import "react-dnd-html5-backend";
|
|
|
32
33
|
import "date-fns";
|
|
33
34
|
import "./components/ScrollBar/index.js";
|
|
34
35
|
import "./components/DynamicFilter/index.js";
|
|
35
|
-
import "./components/Icon/index.js";
|
|
36
36
|
import "./simplebar.js";
|
|
37
37
|
import "yup";
|
|
38
38
|
import "./components/FormActions/index.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.35",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@hookform/resolvers": "^2.9.5",
|
|
23
23
|
"@m4l/core": "^0.0.32",
|
|
24
|
-
"@m4l/graphics": "^0.0.
|
|
24
|
+
"@m4l/graphics": "^0.0.24",
|
|
25
25
|
"@mui/lab": "^5.0.0-alpha.89",
|
|
26
26
|
"@mui/material": "^5.8.7",
|
|
27
27
|
"@mui/x-date-pickers": "^5.0.0-beta.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@emotion/styled": "^11.9.3",
|
|
44
44
|
"@hookform/resolvers": "^2.9.5",
|
|
45
45
|
"@m4l/core": "^0.0.32",
|
|
46
|
-
"@m4l/graphics": "^0.0.
|
|
46
|
+
"@m4l/graphics": "^0.0.24",
|
|
47
47
|
"@mui/lab": "^5.0.0-alpha.89",
|
|
48
48
|
"@mui/material": "^5.8.7",
|
|
49
49
|
"@mui/x-date-pickers": "^5.0.0-beta.0",
|