@m4l/components 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/DynamicFilter/index.js +1 -2
- package/components/Icon/index.js +0 -3
- package/components/LanguagePopover/index.js +50 -5
- package/components/Page/index.js +11 -2
- package/components/PaperForm/index.js +1 -2
- package/components/Resizeable/styles.d.ts +1 -1
- package/components/hook-form/FormProvider/index.js +5 -1
- package/components/hook-form/RHFAutocompleteAsync/index.js +1 -1
- package/components/hook-form/RHFUpload.js +3 -7
- package/core-js.js +13 -8
- package/index.js +2 -1
- package/node_modules.js +1 -1307
- package/package.json +11 -4
- package/vendor.js +2 -4
|
@@ -14,6 +14,7 @@ import { R as RHFDateTime } from "../hook-form/RHFDateTime.js";
|
|
|
14
14
|
import "@mui/x-date-pickers";
|
|
15
15
|
import { R as RHFTextField } from "../hook-form/RHFTextField/index.js";
|
|
16
16
|
import "../../lodash.js";
|
|
17
|
+
import "react-dropzone";
|
|
17
18
|
import "../../react-lazy-load-image-component.js";
|
|
18
19
|
import "../Image/index.js";
|
|
19
20
|
import "../hook-form/RHFUpload.js";
|
|
@@ -1107,7 +1108,6 @@ function ApplyedFilter(props) {
|
|
|
1107
1108
|
host_static_assets,
|
|
1108
1109
|
environment_assets
|
|
1109
1110
|
} = useEnvironment();
|
|
1110
|
-
useModuleDictionary();
|
|
1111
1111
|
const field = useMemo(() => {
|
|
1112
1112
|
return getFieldByName(fieldName);
|
|
1113
1113
|
}, [getFieldByName]);
|
|
@@ -1335,7 +1335,6 @@ function InputFilter() {
|
|
|
1335
1335
|
closeMenuFields,
|
|
1336
1336
|
hidePopupEdit
|
|
1337
1337
|
} = useBase();
|
|
1338
|
-
useModuleDictionary();
|
|
1339
1338
|
const [valueFilter, setValueFilter] = useState("");
|
|
1340
1339
|
const finalFields = useMemo(() => {
|
|
1341
1340
|
if (!openAnchorEl) {
|
package/components/Icon/index.js
CHANGED
|
@@ -56,10 +56,8 @@ function Icon(props) {
|
|
|
56
56
|
)?.toString() || "";
|
|
57
57
|
if (mounted) {
|
|
58
58
|
setResource(window.btoa(xml));
|
|
59
|
-
console.log("value icon set resource", resource);
|
|
60
59
|
}
|
|
61
60
|
}).catch((_err) => {
|
|
62
|
-
console.log("error icon", _err);
|
|
63
61
|
});
|
|
64
62
|
})();
|
|
65
63
|
return function clenUp() {
|
|
@@ -67,7 +65,6 @@ function Icon(props) {
|
|
|
67
65
|
};
|
|
68
66
|
}, [src]);
|
|
69
67
|
const placeHolder = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkNhcGFfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgdmlld0JveD0iMCAwIDcwIDcwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA3MCA3MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM2MzczODE7fQo8L3N0eWxlPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00NSw4LjdjMS40LTEuNSwzLjQtMi4zLDUuNC0yLjNzMy45LDAuOCw1LjQsMi4zczIuNCwzLjUsMi41LDUuN2MwLDIuMi0wLjksNC4yLTIuNCw1LjdzLTMuNSwyLjMtNS41LDIuMgoJCWMtMi4xLDAuMS00LTAuNy01LjUtMi4yYy0xLjQtMS41LTIuMy0zLjUtMi40LTUuN0M0Mi42LDEyLjIsNDMuNSwxMC4yLDQ1LDguN3oiLz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik02OC40LDYyLjFjLTAuMywwLjUtMC43LDAuOC0xLjIsMS4xcy0xLDAuNC0xLjYsMC40SDQuM2MtMC42LDAtMS4xLTAuMS0xLjYtMC40cy0wLjktMC42LTEuMi0xLjEKCQljLTAuMi0wLjUtMC40LTEtMC40LTEuNXMwLjEtMS4xLDAuNC0xLjVsMjMtMzYuNGMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNHMwLjksMC42LDEuMiwxLjEKCQlsMTEuNSwxOC4yYzAuMiwwLjMsMC41LDAuNSwwLjgsMC43czAuNiwwLjMsMSwwLjNjMC4zLDAsMC43LTAuMSwxLTAuM3MwLjYtMC40LDAuOC0wLjdsMy4xLTQuOWMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMQoJCXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNGMwLjUsMC4zLDAuOSwwLjYsMS4yLDEuMWwxNC42LDIzLjFjMC4zLDAuNSwwLjMsMSwwLjMsMS41UzY4LjcsNjEuNyw2OC40LDYyLjF6Ii8+CjwvZz4KPC9zdmc+Cg==";
|
|
70
|
-
console.log("value for getColor", getPaletteColor(theme.palette, "error.main"));
|
|
71
68
|
return /* @__PURE__ */ jsx(WrapperPlaceHolder, {
|
|
72
69
|
id: "IconReact",
|
|
73
70
|
children: resource ? /* @__PURE__ */ jsx(DivIcon, {
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
import { Skeleton, IconButton } from "@mui/material";
|
|
2
|
+
import { Skeleton, IconButton, Stack, MenuItem } from "@mui/material";
|
|
3
3
|
import { I as Image } from "../Image/index.js";
|
|
4
4
|
import { useLocales } from "@m4l/graphics";
|
|
5
|
-
import
|
|
5
|
+
import "@m4l/core";
|
|
6
|
+
import "../Icon/index.js";
|
|
7
|
+
import "@mui/material/styles";
|
|
8
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
9
|
+
import "react-router-dom";
|
|
10
|
+
import "@mui/lab";
|
|
11
|
+
import "../mui_extended/LoadingButton/index.js";
|
|
12
|
+
import { M as MenuPopover } from "../mui_extended/MenuPopover/index.js";
|
|
13
|
+
import "../CommonActions/components/Actions/index.js";
|
|
14
|
+
import "../mui_extended/Pager/index.js";
|
|
15
|
+
import "../mui_extended/Tab/index.js";
|
|
6
16
|
function LanguagePopover(props) {
|
|
7
17
|
const {
|
|
8
18
|
isSkeleton
|
|
@@ -16,6 +26,9 @@ function LanguagePopover(props) {
|
|
|
16
26
|
const handleOpen = (event) => {
|
|
17
27
|
setOpen(event.currentTarget);
|
|
18
28
|
};
|
|
29
|
+
const handleClose = () => {
|
|
30
|
+
setOpen(null);
|
|
31
|
+
};
|
|
19
32
|
if (isSkeleton) {
|
|
20
33
|
return /* @__PURE__ */ jsx(Skeleton, {
|
|
21
34
|
variant: "circular",
|
|
@@ -23,8 +36,8 @@ function LanguagePopover(props) {
|
|
|
23
36
|
height: 20
|
|
24
37
|
});
|
|
25
38
|
}
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
children: /* @__PURE__ */ jsx(IconButton, {
|
|
39
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
40
|
+
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
28
41
|
onClick: handleOpen,
|
|
29
42
|
sx: {
|
|
30
43
|
width: 40,
|
|
@@ -37,7 +50,39 @@ function LanguagePopover(props) {
|
|
|
37
50
|
src: currentLang.icon,
|
|
38
51
|
alt: currentLang.label
|
|
39
52
|
})
|
|
40
|
-
})
|
|
53
|
+
}), /* @__PURE__ */ jsx(MenuPopover, {
|
|
54
|
+
open: Boolean(open),
|
|
55
|
+
anchorEl: open,
|
|
56
|
+
onClose: handleClose,
|
|
57
|
+
sx: {
|
|
58
|
+
mt: 1.5,
|
|
59
|
+
ml: 0.75,
|
|
60
|
+
width: 180,
|
|
61
|
+
"& .MuiMenuItem-root": {
|
|
62
|
+
px: 1,
|
|
63
|
+
typography: "body2",
|
|
64
|
+
borderRadius: 0.75
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
children: /* @__PURE__ */ jsx(Stack, {
|
|
68
|
+
spacing: 0.75,
|
|
69
|
+
children: allLang.map((option) => /* @__PURE__ */ jsxs(MenuItem, {
|
|
70
|
+
selected: option.value === currentLang.value,
|
|
71
|
+
onClick: () => {
|
|
72
|
+
onChangeLang(option.value);
|
|
73
|
+
handleClose();
|
|
74
|
+
},
|
|
75
|
+
children: [/* @__PURE__ */ jsx(Image, {
|
|
76
|
+
alt: option.label,
|
|
77
|
+
src: option.icon,
|
|
78
|
+
sx: {
|
|
79
|
+
width: 28,
|
|
80
|
+
mr: 2
|
|
81
|
+
}
|
|
82
|
+
}), option.label]
|
|
83
|
+
}, option.value))
|
|
84
|
+
})
|
|
85
|
+
})]
|
|
41
86
|
});
|
|
42
87
|
}
|
|
43
88
|
export { LanguagePopover as L };
|
package/components/Page/index.js
CHANGED
|
@@ -2,21 +2,30 @@ import { forwardRef } from "react";
|
|
|
2
2
|
import { Helmet } from "react-helmet-async";
|
|
3
3
|
import { Box } from "@mui/material";
|
|
4
4
|
import { useLocales } from "@m4l/graphics";
|
|
5
|
+
import { useDomain, useEnvironment } from "@m4l/core";
|
|
5
6
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
6
7
|
const Page = forwardRef((props, ref) => {
|
|
7
8
|
const {
|
|
8
9
|
children,
|
|
9
|
-
title
|
|
10
|
+
title,
|
|
10
11
|
meta,
|
|
11
12
|
...other
|
|
12
13
|
} = props;
|
|
13
14
|
const {
|
|
14
15
|
currentLang
|
|
15
16
|
} = useLocales();
|
|
17
|
+
const {
|
|
18
|
+
name: domain_name,
|
|
19
|
+
isLoaded
|
|
20
|
+
} = useDomain();
|
|
21
|
+
const {
|
|
22
|
+
domain_token
|
|
23
|
+
} = useEnvironment();
|
|
24
|
+
const finalTitle = title ? `${title} |` : "";
|
|
16
25
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
17
26
|
children: [/* @__PURE__ */ jsxs(Helmet, {
|
|
18
27
|
children: [/* @__PURE__ */ jsx("title", {
|
|
19
|
-
children: `${
|
|
28
|
+
children: `${finalTitle}${isLoaded ? domain_name : domain_token}`
|
|
20
29
|
}), /* @__PURE__ */ jsx("html", {
|
|
21
30
|
lang: currentLang.value
|
|
22
31
|
}), meta]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { styled, useTheme } from "@mui/material/styles";
|
|
2
1
|
import { Skeleton } from "@mui/material";
|
|
2
|
+
import { styled } from "@mui/material/styles";
|
|
3
3
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
4
4
|
import { I as Icon } from "../Icon/index.js";
|
|
5
5
|
const WrapperPaper = styled("div")(({
|
|
@@ -93,7 +93,6 @@ function PaperForm(props) {
|
|
|
93
93
|
children,
|
|
94
94
|
isSkeleton = false
|
|
95
95
|
} = props;
|
|
96
|
-
useTheme();
|
|
97
96
|
return /* @__PURE__ */ jsx(WrapperPaper, {
|
|
98
97
|
id: "ContainerPropertyValue",
|
|
99
98
|
children: !isSkeleton ? /* @__PURE__ */ jsxs(Fragment, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ResizableBox } from 'react-resizable';
|
|
3
|
-
export declare const WrapperResizeable: import("@emotion/styled").StyledComponent<import("react-resizable").
|
|
3
|
+
export declare const WrapperResizeable: import("@emotion/styled").StyledComponent<import("react-resizable").ResizableBoxProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {
|
|
4
4
|
ref?: import("react").Ref<ResizableBox> | undefined;
|
|
5
5
|
}>;
|
|
@@ -3,8 +3,12 @@ import { useForm, FormProvider as FormProvider$1 } from "react-hook-form";
|
|
|
3
3
|
import { o } from "../../../node_modules.js";
|
|
4
4
|
import { styled } from "@mui/material/styles";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
const WrapperFormProvider = styled("form")((
|
|
6
|
+
const WrapperFormProvider = styled("form")(({
|
|
7
|
+
theme
|
|
8
|
+
}) => ({
|
|
7
9
|
display: "flex",
|
|
10
|
+
paddingTop: theme.spacing(1),
|
|
11
|
+
marginBottom: theme.spacing(1),
|
|
8
12
|
flexDirection: "column",
|
|
9
13
|
width: "100%",
|
|
10
14
|
overflow: "scroll"
|
|
@@ -151,7 +151,7 @@ function RHFAutocompleteAsync(props) {
|
|
|
151
151
|
},
|
|
152
152
|
loading,
|
|
153
153
|
loadingText: "",
|
|
154
|
-
noOptionsText: getLabel("component_no_options"),
|
|
154
|
+
noOptionsText: getLabel("rhf_autocomplete.component_no_options"),
|
|
155
155
|
renderInput: (params) => {
|
|
156
156
|
return /* @__PURE__ */ jsx(TextField, {
|
|
157
157
|
...params,
|
|
@@ -2,7 +2,7 @@ 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
|
-
import {
|
|
5
|
+
import { useDropzone } from "react-dropzone";
|
|
6
6
|
import { styled, alpha } from "@mui/material/styles";
|
|
7
7
|
import { I as Image } from "../Image/index.js";
|
|
8
8
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
@@ -104,9 +104,7 @@ const WrapperImage = styled("div")(({
|
|
|
104
104
|
alignItems: "center",
|
|
105
105
|
maxWidth: theme.spacing(20)
|
|
106
106
|
}));
|
|
107
|
-
styled("div")(({
|
|
108
|
-
theme
|
|
109
|
-
}) => ({
|
|
107
|
+
styled("div")(() => ({
|
|
110
108
|
width: "100%",
|
|
111
109
|
height: "100%",
|
|
112
110
|
position: "absolute",
|
|
@@ -204,9 +202,7 @@ function UploadImage({
|
|
|
204
202
|
}), helperText && helperText]
|
|
205
203
|
});
|
|
206
204
|
}
|
|
207
|
-
const WrapperRHFUploadImage = styled$1("div")(({
|
|
208
|
-
theme
|
|
209
|
-
}) => ({
|
|
205
|
+
const WrapperRHFUploadImage = styled$1("div")(() => ({
|
|
210
206
|
width: "inherit",
|
|
211
207
|
height: "inherit",
|
|
212
208
|
padding: "1px"
|
package/core-js.js
CHANGED
|
@@ -207,10 +207,10 @@ var store$2 = sharedStore;
|
|
|
207
207
|
(shared$4.exports = function(key, value) {
|
|
208
208
|
return store$2[key] || (store$2[key] = value !== void 0 ? value : {});
|
|
209
209
|
})("versions", []).push({
|
|
210
|
-
version: "3.25.
|
|
210
|
+
version: "3.25.1",
|
|
211
211
|
mode: "global",
|
|
212
212
|
copyright: "\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",
|
|
213
|
-
license: "https://github.com/zloirock/core-js/blob/v3.25.
|
|
213
|
+
license: "https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE",
|
|
214
214
|
source: "https://github.com/zloirock/core-js"
|
|
215
215
|
});
|
|
216
216
|
var requireObjectCoercible$4 = requireObjectCoercible$6;
|
|
@@ -1381,12 +1381,16 @@ var iteratorDefine = function(Iterable, NAME2, IteratorConstructor, next2, DEFAU
|
|
|
1381
1381
|
Iterators$3[NAME2] = defaultIterator;
|
|
1382
1382
|
return methods;
|
|
1383
1383
|
};
|
|
1384
|
+
var createIterResultObject$2 = function(value, done) {
|
|
1385
|
+
return { value, done };
|
|
1386
|
+
};
|
|
1384
1387
|
var toIndexedObject$1 = toIndexedObject$6;
|
|
1385
1388
|
var addToUnscopables = addToUnscopables$1;
|
|
1386
1389
|
var Iterators$2 = iterators;
|
|
1387
1390
|
var InternalStateModule$2 = internalState;
|
|
1388
1391
|
var defineProperty$2 = objectDefineProperty.f;
|
|
1389
1392
|
var defineIterator$1 = iteratorDefine;
|
|
1393
|
+
var createIterResultObject$1 = createIterResultObject$2;
|
|
1390
1394
|
var DESCRIPTORS$1 = descriptors;
|
|
1391
1395
|
var ARRAY_ITERATOR = "Array Iterator";
|
|
1392
1396
|
var setInternalState$2 = InternalStateModule$2.set;
|
|
@@ -1405,13 +1409,13 @@ var es_array_iterator = defineIterator$1(Array, "Array", function(iterated, kind
|
|
|
1405
1409
|
var index = state.index++;
|
|
1406
1410
|
if (!target || index >= target.length) {
|
|
1407
1411
|
state.target = void 0;
|
|
1408
|
-
return
|
|
1412
|
+
return createIterResultObject$1(void 0, true);
|
|
1409
1413
|
}
|
|
1410
1414
|
if (kind == "keys")
|
|
1411
|
-
return
|
|
1415
|
+
return createIterResultObject$1(index, false);
|
|
1412
1416
|
if (kind == "values")
|
|
1413
|
-
return
|
|
1414
|
-
return
|
|
1417
|
+
return createIterResultObject$1(target[index], false);
|
|
1418
|
+
return createIterResultObject$1([index, target[index]], false);
|
|
1415
1419
|
}, "values");
|
|
1416
1420
|
var values = Iterators$2.Arguments = Iterators$2.Array;
|
|
1417
1421
|
addToUnscopables("keys");
|
|
@@ -1449,6 +1453,7 @@ var charAt$3 = stringMultibyte.charAt;
|
|
|
1449
1453
|
var toString$3 = toString$8;
|
|
1450
1454
|
var InternalStateModule$1 = internalState;
|
|
1451
1455
|
var defineIterator = iteratorDefine;
|
|
1456
|
+
var createIterResultObject = createIterResultObject$2;
|
|
1452
1457
|
var STRING_ITERATOR = "String Iterator";
|
|
1453
1458
|
var setInternalState$1 = InternalStateModule$1.set;
|
|
1454
1459
|
var getInternalState$1 = InternalStateModule$1.getterFor(STRING_ITERATOR);
|
|
@@ -1464,10 +1469,10 @@ defineIterator(String, "String", function(iterated) {
|
|
|
1464
1469
|
var index = state.index;
|
|
1465
1470
|
var point;
|
|
1466
1471
|
if (index >= string.length)
|
|
1467
|
-
return
|
|
1472
|
+
return createIterResultObject(void 0, true);
|
|
1468
1473
|
point = charAt$3(string, index);
|
|
1469
1474
|
state.index += point.length;
|
|
1470
|
-
return
|
|
1475
|
+
return createIterResultObject(point, false);
|
|
1471
1476
|
});
|
|
1472
1477
|
var defineBuiltIn$2 = defineBuiltIn$7;
|
|
1473
1478
|
var defineBuiltIns$2 = function(target, src, options) {
|
package/index.js
CHANGED
|
@@ -57,13 +57,14 @@ import "react/jsx-runtime";
|
|
|
57
57
|
import "@m4l/core";
|
|
58
58
|
import "react-hook-form";
|
|
59
59
|
import "./node_modules.js";
|
|
60
|
-
import "prop-types";
|
|
61
60
|
import "@mui/material/styles";
|
|
62
61
|
import "@mui/x-date-pickers";
|
|
63
62
|
import "./lodash.js";
|
|
64
63
|
import "./commonjs.js";
|
|
65
64
|
import "react-dom";
|
|
65
|
+
import "prop-types";
|
|
66
66
|
import "clsx";
|
|
67
|
+
import "react-dropzone";
|
|
67
68
|
import "./react-lazy-load-image-component.js";
|
|
68
69
|
import "react-router-dom";
|
|
69
70
|
import "@mui/lab";
|