@m4l/components 0.1.12 → 0.1.13
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 +86 -0
- package/commonjs.565e6834.js +12 -0
- package/components/CommonActions/components/ActionCancel/index.cba1b460.js +17 -0
- package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +49 -0
- package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +31 -0
- package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +18 -0
- package/components/CommonActions/components/Actions/index.e8148d98.js +743 -0
- package/components/CompanyLogo/{index.js → index.f81c179c.js} +42 -48
- package/components/DataGrid/index.b688877d.js +894 -0
- package/components/DynamicFilter/index.82ce857e.js +1158 -0
- package/components/ErrorLabel/index.c8615f16.js +19 -0
- package/components/Icon/index.cbca79b0.js +70 -0
- package/components/Image/index.e790b50b.js +122 -0
- package/components/LanguagePopover/index.3d9611cb.js +87 -0
- package/components/Loadable/index.f5518558.js +15 -0
- package/components/ModalDialog/index.3850c053.js +168 -0
- package/components/NoItemSelected/{index.js → index.12f0ca67.js} +43 -50
- package/components/ObjectLogs/index.27ef875d.js +266 -0
- package/components/Page/index.6d69977e.js +35 -0
- package/components/Page/index.d.ts +1 -1
- package/components/PaperForm/index.d7c74064.js +105 -0
- package/components/Period/index.5e68286a.js +160 -0
- package/components/PropertyValue/index.ab3dd7e9.js +116 -0
- package/components/Resizeable/{index.js → index.45995d2b.js} +21 -19
- package/components/ScrollBar/index.39eeb2de.js +49 -0
- package/components/ScrollToTop/index.e06f98f6.js +11 -0
- package/components/SplitLayout/{index.js → index.4032673d.js} +35 -35
- package/components/animate/IconButtonAnimate/index.d.ts +1 -1
- package/components/animate/LoadingScreen/{index.js → index.f1cec7db.js} +29 -27
- package/components/animate/MotionContainer/index.8d9f9d80.js +30 -0
- package/components/animate/MotionLazyContainer/index.572dd012.js +15 -0
- package/components/animate/features.0fbf41e1.js +5 -0
- package/components/animate/variants/{bounce.js → bounce.784aaaaa.js} +15 -16
- package/components/animate/variants/container.11f82b76.js +20 -0
- package/components/animate/variants/fade.b561c0fc.js +59 -0
- package/components/animate/variants/{index.js → index.7a912140.js} +0 -0
- package/components/animate/variants/transition.bd46b9ce.js +15 -0
- package/components/formatters/BooleanFormatter/index.cca53b7f.js +42 -0
- package/components/formatters/DateFormatter/index.ad8d9b8e.js +57 -0
- package/components/formatters/index.55856d65.js +106 -0
- package/components/hook-form/FormProvider/index.257acd9f.js +55 -0
- package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +122 -0
- package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +153 -0
- package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +59 -0
- package/components/hook-form/RHFDateTime/index.fc5cbafe.js +68 -0
- package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +34 -0
- package/components/hook-form/RHFPeriod/index.23c254e9.js +45 -0
- package/components/hook-form/RHFRadioGroup/index.b3335e13.js +43 -0
- package/components/hook-form/RHFSelect/index.b6ca8bb2.js +36 -0
- package/components/hook-form/RHFTextField/index.4c455f75.js +77 -0
- package/components/hook-form/RHFTextField/index.d.ts +1 -1
- package/components/hook-form/RHFUpload/index.ed3d739f.js +244 -0
- package/components/mui_extended/Accordion/index.2116e423.js +103 -0
- package/components/mui_extended/Avatar/index.0a2a4523.js +32 -0
- package/components/mui_extended/Avatar/index.d.ts +1 -1
- package/components/mui_extended/BoxIcon/index.e638ecc8.js +22 -0
- package/components/mui_extended/Breadcrumbs/index.5e37d903.js +89 -0
- package/components/mui_extended/Button/index.84d8898c.js +110 -0
- package/components/mui_extended/IconButton/index.88f3aadb.js +98 -0
- package/components/mui_extended/LinkWithRoute/index.d4b263de.js +28 -0
- package/components/mui_extended/MenuPopover/index.488fc536.js +131 -0
- package/components/mui_extended/Pager/index.0576814f.js +126 -0
- package/components/mui_extended/Tab/index.e0653a0a.js +28 -0
- package/components/mui_extended/Typography/index.0c4604b3.js +22 -0
- package/contexts/ModalContext/index.2188b69e.js +150 -0
- package/hooks/useFormAddEdit/index.d4845f1a.js +26 -0
- package/hooks/useModal/index.6571d2d9.js +6 -0
- package/index.js +162 -70
- package/lodash.e09401f0.js +32 -0
- package/node_modules.168cb897.js +55 -0
- package/package.json +1 -1
- package/react-data-grid.d46d625e.js +2115 -0
- package/react-draggable.20e95c61.js +714 -0
- package/react-json-view.f56a7f8e.js +2762 -0
- package/react-lazy-load-image-component.45b56650.js +784 -0
- package/react-resizable.5277deaf.js +371 -0
- package/react-splitter-layout.7810ac1b.js +165 -0
- package/utils/index.214d9542.js +435 -0
- package/assets/Logo/index.js +0 -91
- package/commonjs.js +0 -9
- package/components/CommonActions/components/ActionCancel/index.js +0 -15
- package/components/CommonActions/components/ActionFormCancel/index.js +0 -62
- package/components/CommonActions/components/ActionFormIntro/index.js +0 -35
- package/components/CommonActions/components/ActionIntro/index.js +0 -16
- package/components/CommonActions/components/Actions/index.js +0 -859
- package/components/DataGrid/index.js +0 -1067
- package/components/DynamicFilter/index.js +0 -1573
- package/components/ErrorLabel/index.js +0 -18
- package/components/Icon/index.js +0 -80
- package/components/Image/index.js +0 -128
- package/components/LanguagePopover/index.js +0 -93
- package/components/Loadable/index.js +0 -13
- package/components/ModalDialog/index.js +0 -180
- package/components/ObjectLogs/index.js +0 -284
- package/components/Page/index.js +0 -36
- package/components/PaperForm/index.js +0 -110
- package/components/Period/index.js +0 -230
- package/components/PropertyValue/index.js +0 -142
- package/components/ScrollBar/index.js +0 -52
- package/components/ScrollToTop/index.js +0 -10
- package/components/animate/MotionContainer/index.js +0 -31
- package/components/animate/MotionLazyContainer/index.js +0 -13
- package/components/animate/features.js +0 -2
- package/components/animate/variants/container.js +0 -20
- package/components/animate/variants/fade.js +0 -61
- package/components/animate/variants/transition.js +0 -16
- package/components/formatters/BooleanFormatter/index.js +0 -52
- package/components/formatters/DateFormatter/index.js +0 -66
- package/components/formatters/index.js +0 -112
- package/components/hook-form/FormProvider/index.js +0 -61
- package/components/hook-form/RHFAutocomplete/index.js +0 -144
- package/components/hook-form/RHFAutocompleteAsync/index.js +0 -191
- package/components/hook-form/RHFCheckbox/index.js +0 -65
- package/components/hook-form/RHFDateTime/index.js +0 -79
- package/components/hook-form/RHFMultiCheckbox/index.js +0 -32
- package/components/hook-form/RHFPeriod/index.js +0 -47
- package/components/hook-form/RHFRadioGroup/index.js +0 -41
- package/components/hook-form/RHFSelect/index.js +0 -34
- package/components/hook-form/RHFTextField/index.js +0 -87
- package/components/hook-form/RHFUpload/index.js +0 -255
- package/components/mui_extended/Accordion/index.js +0 -105
- package/components/mui_extended/Avatar/index.js +0 -33
- package/components/mui_extended/BoxIcon/index.js +0 -20
- package/components/mui_extended/Breadcrumbs/index.js +0 -92
- package/components/mui_extended/Button/index.js +0 -131
- package/components/mui_extended/IconButton/index.js +0 -108
- package/components/mui_extended/LinkWithRoute/index.js +0 -30
- package/components/mui_extended/MenuPopover/index.js +0 -135
- package/components/mui_extended/Pager/index.js +0 -137
- package/components/mui_extended/Tab/index.js +0 -30
- package/components/mui_extended/Typography/index.js +0 -21
- package/contexts/ModalContext/index.js +0 -165
- package/hooks/useFormAddEdit/index.js +0 -42
- package/hooks/useModal/index.js +0 -4
- package/lodash.js +0 -62
- package/node_modules.js +0 -54
- package/react-data-grid.js +0 -2652
- package/react-draggable.js +0 -960
- package/react-json-view.js +0 -2764
- package/react-lazy-load-image-component.js +0 -792
- package/react-resizable.js +0 -541
- package/react-splitter-layout.js +0 -165
- package/utils/index.js +0 -572
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { useMemo as y } from "react";
|
|
2
|
+
import { Skeleton as i, TablePagination as R } from "@mui/material";
|
|
3
|
+
import { P as S } from "../../CommonActions/components/Actions/index.e8148d98.js";
|
|
4
|
+
import { styled as a } from "@mui/material/styles";
|
|
5
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
6
|
+
a("div")(() => ({
|
|
7
|
+
display: "flex",
|
|
8
|
+
flexDirection: "column",
|
|
9
|
+
height: "100%",
|
|
10
|
+
overflow: "hidden"
|
|
11
|
+
}));
|
|
12
|
+
const b = a("div")(({ theme: t }) => ({
|
|
13
|
+
width: "100%",
|
|
14
|
+
display: "flex",
|
|
15
|
+
justifyContent: "center",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
marginLeft: t.spacing(3)
|
|
18
|
+
})), T = a("div")(({ theme: t }) => ({
|
|
19
|
+
display: "flex",
|
|
20
|
+
marginLeft: t.spacing(3)
|
|
21
|
+
})), s = a("div")(({ theme: t }) => ({
|
|
22
|
+
display: "flex",
|
|
23
|
+
justifyContent: "center",
|
|
24
|
+
alignItems: "center",
|
|
25
|
+
width: t.spacing(3.75),
|
|
26
|
+
height: t.spacing(3.75)
|
|
27
|
+
})), D = a("div")(({ theme: t }) => ({
|
|
28
|
+
display: "grid",
|
|
29
|
+
gridTemplateColumns: "auto auto",
|
|
30
|
+
gridGap: t.spacing(1),
|
|
31
|
+
marginRight: t.spacing(3)
|
|
32
|
+
}));
|
|
33
|
+
function A(t) {
|
|
34
|
+
const {
|
|
35
|
+
totalRecords: n,
|
|
36
|
+
rowsPerPageOptions: d = [5, 10, 2],
|
|
37
|
+
rowsPerPage: r = 25,
|
|
38
|
+
page: g,
|
|
39
|
+
onPageChange: h,
|
|
40
|
+
onRowsPerPageChange: f,
|
|
41
|
+
labelRows: P = "Rows per page",
|
|
42
|
+
labelOf: u = "Of",
|
|
43
|
+
isSkeleton: m = "false",
|
|
44
|
+
isDesktop: p
|
|
45
|
+
} = t, v = y(() => r * g > n ? Math.floor(n / r) : g, [g, r, n]), w = (o) => {
|
|
46
|
+
f(parseInt(o.target.value, 10)), h(0);
|
|
47
|
+
}, x = (o, c) => {
|
|
48
|
+
h(c);
|
|
49
|
+
};
|
|
50
|
+
return m ? /* @__PURE__ */ l(b, {
|
|
51
|
+
children: [/* @__PURE__ */ l(D, {
|
|
52
|
+
children: [/* @__PURE__ */ e(i, {
|
|
53
|
+
variant: "text",
|
|
54
|
+
width: "40px",
|
|
55
|
+
height: "16px"
|
|
56
|
+
}), /* @__PURE__ */ e(i, {
|
|
57
|
+
variant: "text",
|
|
58
|
+
width: "20px",
|
|
59
|
+
height: "16px"
|
|
60
|
+
})]
|
|
61
|
+
}), /* @__PURE__ */ e(i, {
|
|
62
|
+
variant: "text",
|
|
63
|
+
width: "50px",
|
|
64
|
+
height: "16px"
|
|
65
|
+
}), /* @__PURE__ */ l(T, {
|
|
66
|
+
children: [/* @__PURE__ */ e(s, {
|
|
67
|
+
children: /* @__PURE__ */ e(i, {
|
|
68
|
+
variant: "circular",
|
|
69
|
+
width: 20,
|
|
70
|
+
height: 20
|
|
71
|
+
})
|
|
72
|
+
}), /* @__PURE__ */ e(s, {
|
|
73
|
+
children: /* @__PURE__ */ e(i, {
|
|
74
|
+
variant: "circular",
|
|
75
|
+
width: 20,
|
|
76
|
+
height: 20
|
|
77
|
+
})
|
|
78
|
+
}), /* @__PURE__ */ e(s, {
|
|
79
|
+
children: /* @__PURE__ */ e(i, {
|
|
80
|
+
variant: "circular",
|
|
81
|
+
width: 20,
|
|
82
|
+
height: 20
|
|
83
|
+
})
|
|
84
|
+
}), /* @__PURE__ */ e(s, {
|
|
85
|
+
children: /* @__PURE__ */ e(i, {
|
|
86
|
+
variant: "circular",
|
|
87
|
+
width: 20,
|
|
88
|
+
height: 20
|
|
89
|
+
})
|
|
90
|
+
})]
|
|
91
|
+
})]
|
|
92
|
+
}) : /* @__PURE__ */ e(R, {
|
|
93
|
+
id: "TablePagination",
|
|
94
|
+
rowsPerPageOptions: d,
|
|
95
|
+
component: "div",
|
|
96
|
+
count: n,
|
|
97
|
+
rowsPerPage: r,
|
|
98
|
+
page: v,
|
|
99
|
+
onPageChange: x,
|
|
100
|
+
onRowsPerPageChange: w,
|
|
101
|
+
labelDisplayedRows: p ? ({
|
|
102
|
+
from: o,
|
|
103
|
+
to: c,
|
|
104
|
+
count: C
|
|
105
|
+
}) => `${o}-${c} ${u} ${C}` : () => "",
|
|
106
|
+
labelRowsPerPage: p ? P : "",
|
|
107
|
+
ActionsComponent: S
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function B() {
|
|
111
|
+
return ["pager"];
|
|
112
|
+
}
|
|
113
|
+
const L = {
|
|
114
|
+
pager: {
|
|
115
|
+
first: "First",
|
|
116
|
+
previous: "Previous",
|
|
117
|
+
before: "Before",
|
|
118
|
+
last: "Last",
|
|
119
|
+
of: "of"
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
export {
|
|
123
|
+
A as P,
|
|
124
|
+
L as d,
|
|
125
|
+
B as g
|
|
126
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useModuleSkeleton as n } from "@m4l/core";
|
|
2
|
+
import { Skeleton as a, Tab as s } from "@mui/material";
|
|
3
|
+
import { styled as p } from "@mui/material/styles";
|
|
4
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
5
|
+
const d = p("div")(({
|
|
6
|
+
theme: t
|
|
7
|
+
}) => ({
|
|
8
|
+
padding: t.spacing(1.5, 2)
|
|
9
|
+
}));
|
|
10
|
+
function c(t) {
|
|
11
|
+
const {
|
|
12
|
+
SKTWidth: o,
|
|
13
|
+
SKTHeight: r,
|
|
14
|
+
...i
|
|
15
|
+
} = t;
|
|
16
|
+
return n() ? /* @__PURE__ */ e(d, {
|
|
17
|
+
children: /* @__PURE__ */ e(a, {
|
|
18
|
+
variant: "text",
|
|
19
|
+
width: o,
|
|
20
|
+
height: r
|
|
21
|
+
})
|
|
22
|
+
}) : /* @__PURE__ */ e(s, {
|
|
23
|
+
...i
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
c as T
|
|
28
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Skeleton as a, Typography as h } from "@mui/material";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
function f(t) {
|
|
4
|
+
const {
|
|
5
|
+
skeletonProps: r = {},
|
|
6
|
+
...e
|
|
7
|
+
} = t, {
|
|
8
|
+
isSkeleton: p = "false",
|
|
9
|
+
width: n = "100%",
|
|
10
|
+
height: s = "14px"
|
|
11
|
+
} = r;
|
|
12
|
+
return p ? /* @__PURE__ */ o(a, {
|
|
13
|
+
variant: "text",
|
|
14
|
+
width: n,
|
|
15
|
+
height: s
|
|
16
|
+
}) : /* @__PURE__ */ o(h, {
|
|
17
|
+
...e
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
f as T
|
|
22
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { createContext as M, useState as g } from "react";
|
|
2
|
+
import { useEnvironment as w, voidFunction as i } from "@m4l/core";
|
|
3
|
+
import { Typography as I } from "@mui/material";
|
|
4
|
+
import { styled as c } from "@mui/material/styles";
|
|
5
|
+
import { B as _ } from "../../components/mui_extended/BoxIcon/index.e638ecc8.js";
|
|
6
|
+
import { jsx as t, jsxs as f, Fragment as k } from "react/jsx-runtime";
|
|
7
|
+
import { M as $ } from "../../components/ModalDialog/index.3850c053.js";
|
|
8
|
+
import { A as b } from "../../components/CommonActions/components/ActionIntro/index.cc4b1e0e.js";
|
|
9
|
+
import { A } from "../../components/CommonActions/components/ActionCancel/index.cba1b460.js";
|
|
10
|
+
import { b as j } from "../../utils/index.214d9542.js";
|
|
11
|
+
const D = c("div")(() => ({
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: "column",
|
|
14
|
+
height: "100%"
|
|
15
|
+
})), O = c("div")(({
|
|
16
|
+
theme: n
|
|
17
|
+
}) => ({
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
gridGap: n.spacing(5),
|
|
23
|
+
flexGrow: 1,
|
|
24
|
+
[n.breakpoints.up("sm")]: {
|
|
25
|
+
display: "grid",
|
|
26
|
+
flexDirection: "row",
|
|
27
|
+
gridTemplateColumns: "1fr 1fr"
|
|
28
|
+
}
|
|
29
|
+
})), W = c("div")(({
|
|
30
|
+
theme: n,
|
|
31
|
+
variant: o
|
|
32
|
+
}) => ({
|
|
33
|
+
display: "flex",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
"& > span": {
|
|
37
|
+
background: o === "warning" ? n.palette.warning.main : o === "delete" ? n.palette.error.main : o === "info" ? n.palette.info.main : "theme.palette.text.primary"
|
|
38
|
+
}
|
|
39
|
+
})), B = c("div")(() => ({
|
|
40
|
+
display: "flex",
|
|
41
|
+
alignItems: "center"
|
|
42
|
+
})), E = (n) => {
|
|
43
|
+
const {
|
|
44
|
+
variant: o = "info",
|
|
45
|
+
msg: s = "Are you sure you want to perform this action? Once complete, the information will be deleted."
|
|
46
|
+
} = n, {
|
|
47
|
+
host_static_assets: r,
|
|
48
|
+
environment_assets: e
|
|
49
|
+
} = w(), d = `${r}/${e}/frontend/components/dialog/assets/icons/illustration_confirm_warning.svg`, p = `${r}/${e}/frontend/components/dialog/assets/icons/illustration_confirm_danger.svg`, a = `${r}/${e}/frontend/components/dialog/assets/icons/illustration_confirm_info.svg`;
|
|
50
|
+
return /* @__PURE__ */ t(D, {
|
|
51
|
+
children: /* @__PURE__ */ f(O, {
|
|
52
|
+
children: [/* @__PURE__ */ t(W, {
|
|
53
|
+
variant: o,
|
|
54
|
+
children: /* @__PURE__ */ t(_, {
|
|
55
|
+
src: o === "warning" ? d : o === "delete" ? p : a,
|
|
56
|
+
sx: {
|
|
57
|
+
width: "230px",
|
|
58
|
+
height: "194px"
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
}), /* @__PURE__ */ t(B, {
|
|
62
|
+
children: /* @__PURE__ */ t(I, {
|
|
63
|
+
variant: "body1",
|
|
64
|
+
children: s
|
|
65
|
+
})
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
}, u = {
|
|
70
|
+
initialWidth: 600,
|
|
71
|
+
initialHeigth: 400,
|
|
72
|
+
open: !1,
|
|
73
|
+
withClose: !0,
|
|
74
|
+
onQueryClose: i,
|
|
75
|
+
iconComponent: void 0,
|
|
76
|
+
contentComponent: void 0,
|
|
77
|
+
openModal: i,
|
|
78
|
+
openModalConfirm: i,
|
|
79
|
+
closeModal: i,
|
|
80
|
+
hasChanges: !1,
|
|
81
|
+
setChanges: i,
|
|
82
|
+
title: ""
|
|
83
|
+
}, F = M(u);
|
|
84
|
+
function L({
|
|
85
|
+
children: n
|
|
86
|
+
}) {
|
|
87
|
+
const [o, s] = g({
|
|
88
|
+
open: u.open,
|
|
89
|
+
withClose: !0,
|
|
90
|
+
onQueryClose: i,
|
|
91
|
+
title: "",
|
|
92
|
+
iconComponent: void 0,
|
|
93
|
+
contentComponent: void 0,
|
|
94
|
+
variant: void 0
|
|
95
|
+
}), [r, e] = g(!1), d = (l) => {
|
|
96
|
+
s({
|
|
97
|
+
open: !0,
|
|
98
|
+
...l
|
|
99
|
+
});
|
|
100
|
+
}, p = (l) => {
|
|
101
|
+
const {
|
|
102
|
+
variant: m = "warning",
|
|
103
|
+
title: v,
|
|
104
|
+
msg: x,
|
|
105
|
+
onClickIntro: C,
|
|
106
|
+
onClickCancel: y = a
|
|
107
|
+
} = l;
|
|
108
|
+
s({
|
|
109
|
+
open: !0,
|
|
110
|
+
title: v,
|
|
111
|
+
variant: m,
|
|
112
|
+
contentComponent: /* @__PURE__ */ t(E, {
|
|
113
|
+
variant: m,
|
|
114
|
+
msg: x
|
|
115
|
+
}),
|
|
116
|
+
actions: /* @__PURE__ */ f(k, {
|
|
117
|
+
children: [/* @__PURE__ */ t(A, {
|
|
118
|
+
onClick: y
|
|
119
|
+
}), " ", /* @__PURE__ */ t(b, {
|
|
120
|
+
onClick: () => {
|
|
121
|
+
C && C(), a();
|
|
122
|
+
},
|
|
123
|
+
color: j(m)
|
|
124
|
+
})]
|
|
125
|
+
})
|
|
126
|
+
});
|
|
127
|
+
}, a = () => {
|
|
128
|
+
s((l) => ({
|
|
129
|
+
...l,
|
|
130
|
+
open: !1
|
|
131
|
+
})), e(!1);
|
|
132
|
+
}, h = () => {
|
|
133
|
+
e(!0);
|
|
134
|
+
};
|
|
135
|
+
return /* @__PURE__ */ f(F.Provider, {
|
|
136
|
+
value: {
|
|
137
|
+
...o,
|
|
138
|
+
openModal: d,
|
|
139
|
+
openModalConfirm: p,
|
|
140
|
+
closeModal: a,
|
|
141
|
+
hasChanges: r,
|
|
142
|
+
setChanges: h
|
|
143
|
+
},
|
|
144
|
+
children: [n, /* @__PURE__ */ t($, {})]
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
F as M,
|
|
149
|
+
L as a
|
|
150
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useNetwork as p, useFlags as v } from "@m4l/core";
|
|
2
|
+
import { useState as n, useEffect as _ } from "react";
|
|
3
|
+
const F = (i) => {
|
|
4
|
+
const { initialValues: u, objectId: o, endPoint: l, formatDataEnpoint: r } = i, [f, a] = n(u), [e, t] = n(
|
|
5
|
+
o === void 0 ? "new" : "edit"
|
|
6
|
+
), { networkOperation: m } = p(), { addFlag: c } = v();
|
|
7
|
+
return _(() => {
|
|
8
|
+
let s = !0;
|
|
9
|
+
return e === "edit" ? m({
|
|
10
|
+
method: "GET",
|
|
11
|
+
endPoint: `${l}/${o}`
|
|
12
|
+
}).then(
|
|
13
|
+
(d) => {
|
|
14
|
+
s && (a(r ? r(d) : d), t("reload_values_provider"));
|
|
15
|
+
},
|
|
16
|
+
() => {
|
|
17
|
+
t("error");
|
|
18
|
+
}
|
|
19
|
+
) : (e === "new" || e === "reload_values_provider") && (c("form_loaded"), t("ready")), () => {
|
|
20
|
+
s = !1;
|
|
21
|
+
};
|
|
22
|
+
}, [e]), { formValues: f, statusLoad: e };
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
F as u
|
|
26
|
+
};
|
package/index.js
CHANGED
|
@@ -1,92 +1,184 @@
|
|
|
1
|
-
|
|
1
|
+
import { I as N, a as h } from "./components/mui_extended/IconButton/index.88f3aadb.js";
|
|
2
2
|
import "framer-motion";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
import { L as U } from "./components/animate/LoadingScreen/index.f1cec7db.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import "react-hook-form";
|
|
8
|
-
|
|
8
|
+
import { F as k } from "./components/hook-form/FormProvider/index.257acd9f.js";
|
|
9
9
|
import "@m4l/core";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
import { R as z } from "./components/hook-form/RHFAutocomplete/index.6ed76d4c.js";
|
|
11
|
+
import { R as W } from "./components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js";
|
|
12
|
+
import { R as w } from "./components/hook-form/RHFCheckbox/index.f9ce6c39.js";
|
|
13
|
+
import { R as K } from "./components/hook-form/RHFDateTime/index.fc5cbafe.js";
|
|
14
14
|
import "@mui/x-date-pickers";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
import { R as X } from "./components/hook-form/RHFTextField/index.4c455f75.js";
|
|
16
|
+
import { R as Z } from "./components/hook-form/RHFPeriod/index.23c254e9.js";
|
|
17
|
+
import { E as $ } from "./components/ErrorLabel/index.c8615f16.js";
|
|
18
|
+
import { P as ro, g as to } from "./components/Period/index.5e68286a.js";
|
|
19
|
+
import { I as eo } from "./components/Icon/index.cbca79b0.js";
|
|
20
20
|
import "@mui/material/styles";
|
|
21
|
-
|
|
21
|
+
import { b as so, M as po, d as io, g as no } from "./components/CommonActions/components/Actions/index.e8148d98.js";
|
|
22
22
|
import "@mui/material/Button";
|
|
23
|
-
|
|
23
|
+
import { B as fo, L as co } from "./components/mui_extended/Button/index.84d8898c.js";
|
|
24
24
|
import "react-router-dom";
|
|
25
|
-
|
|
25
|
+
import { M as go, a as uo } from "./contexts/ModalContext/index.2188b69e.js";
|
|
26
26
|
import "@mui/lab";
|
|
27
|
-
import "./lodash.js";
|
|
27
|
+
import "./lodash.e09401f0.js";
|
|
28
28
|
import "react-dropzone";
|
|
29
|
-
import "./react-lazy-load-image-component.js";
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
import "./react-lazy-load-image-component.45b56650.js";
|
|
30
|
+
import { I as Do } from "./components/Image/index.e790b50b.js";
|
|
31
|
+
import { R as Ro } from "./components/hook-form/RHFUpload/index.ed3d739f.js";
|
|
32
|
+
import { A as Po } from "./components/mui_extended/Accordion/index.2116e423.js";
|
|
33
|
+
import { A as Lo } from "./components/mui_extended/Avatar/index.0a2a4523.js";
|
|
34
|
+
import { M as vo } from "./components/mui_extended/MenuPopover/index.488fc536.js";
|
|
35
|
+
import { P as Bo, g as Io } from "./components/mui_extended/Pager/index.0576814f.js";
|
|
36
|
+
import { T as Ho } from "./components/mui_extended/Tab/index.e0653a0a.js";
|
|
37
37
|
import "@m4l/graphics";
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
import { C as Eo } from "./components/CompanyLogo/index.f81c179c.js";
|
|
39
|
+
import { D as ho, N as Oo, T as Uo, g as jo } from "./components/DataGrid/index.b688877d.js";
|
|
40
40
|
import "react-dnd";
|
|
41
41
|
import "react-dnd-html5-backend";
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
import { S as Go } from "./components/ScrollBar/index.39eeb2de.js";
|
|
43
|
+
import { D as Vo, d as Wo, g as qo } from "./components/DynamicFilter/index.82ce857e.js";
|
|
44
44
|
import "simplebar/dist/simplebar.min.css";
|
|
45
|
-
|
|
46
|
-
import "./react-draggable.js";
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
import "./react-json-view.js";
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
import "./react-splitter-layout.js";
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
import "./node_modules.js";
|
|
83
|
-
import "./utils/index.js";
|
|
84
|
-
import "./react-data-grid.js";
|
|
45
|
+
import { L as Jo } from "./components/LanguagePopover/index.3d9611cb.js";
|
|
46
|
+
import "./react-draggable.20e95c61.js";
|
|
47
|
+
import { M as Qo, d as Xo, g as Yo } from "./components/ModalDialog/index.3850c053.js";
|
|
48
|
+
import { R as _o } from "./components/Resizeable/index.45995d2b.js";
|
|
49
|
+
import { N as or, d as rr, g as tr } from "./components/NoItemSelected/index.12f0ca67.js";
|
|
50
|
+
import { O as er, d as mr, g as sr } from "./components/ObjectLogs/index.27ef875d.js";
|
|
51
|
+
import "./react-json-view.f56a7f8e.js";
|
|
52
|
+
import { P as ir } from "./components/PaperForm/index.d7c74064.js";
|
|
53
|
+
import { P as xr } from "./components/Page/index.6d69977e.js";
|
|
54
|
+
import { P as cr } from "./components/PropertyValue/index.ab3dd7e9.js";
|
|
55
|
+
import "./react-splitter-layout.7810ac1b.js";
|
|
56
|
+
import { S as dr } from "./components/SplitLayout/index.4032673d.js";
|
|
57
|
+
import { v as ur } from "./components/animate/variants/fade.b561c0fc.js";
|
|
58
|
+
import { v as Dr } from "./components/animate/variants/bounce.784aaaaa.js";
|
|
59
|
+
import { v as Rr } from "./components/animate/variants/container.11f82b76.js";
|
|
60
|
+
import { v as Pr, a as Cr, b as Lr } from "./components/animate/variants/transition.bd46b9ce.js";
|
|
61
|
+
import { M as vr } from "./components/animate/MotionContainer/index.8d9f9d80.js";
|
|
62
|
+
import { M as Br } from "./components/animate/MotionLazyContainer/index.572dd012.js";
|
|
63
|
+
import { R as Tr } from "./components/hook-form/RHFMultiCheckbox/index.2680b3b6.js";
|
|
64
|
+
import { R as Sr } from "./components/hook-form/RHFSelect/index.b6ca8bb2.js";
|
|
65
|
+
import { R as Nr } from "./components/hook-form/RHFRadioGroup/index.b3335e13.js";
|
|
66
|
+
import { B as Or } from "./components/mui_extended/BoxIcon/index.e638ecc8.js";
|
|
67
|
+
import { B as jr } from "./components/mui_extended/Breadcrumbs/index.5e37d903.js";
|
|
68
|
+
import { L as Gr } from "./components/mui_extended/LinkWithRoute/index.d4b263de.js";
|
|
69
|
+
import { T as Vr } from "./components/mui_extended/Typography/index.0c4604b3.js";
|
|
70
|
+
import { B as qr, c as wr } from "./components/formatters/BooleanFormatter/index.cca53b7f.js";
|
|
71
|
+
import { D as Kr, c as Qr } from "./components/formatters/DateFormatter/index.ad8d9b8e.js";
|
|
72
|
+
import { P as Yr, a as Zr, U as _r, e as $r, b as ot, c as rt, d as tt, g as at } from "./components/formatters/index.55856d65.js";
|
|
73
|
+
import { A as mt } from "./components/CommonActions/components/ActionCancel/index.cba1b460.js";
|
|
74
|
+
import { A as pt } from "./components/CommonActions/components/ActionIntro/index.cc4b1e0e.js";
|
|
75
|
+
import { A as nt } from "./components/CommonActions/components/ActionFormCancel/index.be2fe891.js";
|
|
76
|
+
import { A as ft } from "./components/CommonActions/components/ActionFormIntro/index.ca4d2674.js";
|
|
77
|
+
import { L as lt } from "./components/Loadable/index.f5518558.js";
|
|
78
|
+
import { S as gt } from "./components/ScrollToTop/index.e06f98f6.js";
|
|
79
|
+
import { u as Ft } from "./hooks/useFormAddEdit/index.d4845f1a.js";
|
|
80
|
+
import { u as yt } from "./hooks/useModal/index.6571d2d9.js";
|
|
81
|
+
import { L as At } from "./assets/Logo/index.228dcb5a.js";
|
|
82
|
+
import "./node_modules.168cb897.js";
|
|
83
|
+
import "./utils/index.214d9542.js";
|
|
84
|
+
import "./react-data-grid.d46d625e.js";
|
|
85
85
|
import "clsx";
|
|
86
|
-
import "./commonjs.js";
|
|
86
|
+
import "./commonjs.565e6834.js";
|
|
87
87
|
import "prop-types";
|
|
88
88
|
import "react-dom";
|
|
89
89
|
import "simplebar-react";
|
|
90
90
|
import "yup";
|
|
91
|
-
import "./react-resizable.js";
|
|
91
|
+
import "./react-resizable.5277deaf.js";
|
|
92
92
|
import "react-helmet-async";
|
|
93
|
+
export {
|
|
94
|
+
Po as Accordion,
|
|
95
|
+
mt as ActionCancel,
|
|
96
|
+
nt as ActionFormCancel,
|
|
97
|
+
ft as ActionFormIntro,
|
|
98
|
+
pt as ActionIntro,
|
|
99
|
+
so as Actions,
|
|
100
|
+
Lo as Avatar,
|
|
101
|
+
qr as BooleanFormatter,
|
|
102
|
+
Or as BoxIcon,
|
|
103
|
+
jr as Breadcrumbs,
|
|
104
|
+
fo as Button,
|
|
105
|
+
Eo as CompanyLogo,
|
|
106
|
+
ho as DataGrid,
|
|
107
|
+
Kr as DateFormatter,
|
|
108
|
+
Vo as DynamicFilter,
|
|
109
|
+
$ as ErrorLabel,
|
|
110
|
+
k as FormProvider,
|
|
111
|
+
eo as Icon,
|
|
112
|
+
N as IconButton,
|
|
113
|
+
h as IconButtonAnimate,
|
|
114
|
+
Do as Image,
|
|
115
|
+
Jo as LanguagePopover,
|
|
116
|
+
Gr as LinkWithRoute,
|
|
117
|
+
lt as Loadable,
|
|
118
|
+
co as LoadingButton,
|
|
119
|
+
U as LoadingScreen,
|
|
120
|
+
At as Logo,
|
|
121
|
+
po as MenuActions,
|
|
122
|
+
vo as MenuPopover,
|
|
123
|
+
go as ModalContext,
|
|
124
|
+
Qo as ModalDialog,
|
|
125
|
+
uo as ModalProvider,
|
|
126
|
+
vr as MotionContainer,
|
|
127
|
+
Br as MotionLazyContainer,
|
|
128
|
+
or as NoItemSelected,
|
|
129
|
+
Oo as NumberEditor,
|
|
130
|
+
er as ObjectLogs,
|
|
131
|
+
xr as Page,
|
|
132
|
+
Bo as Pager,
|
|
133
|
+
ir as PaperForm,
|
|
134
|
+
ro as Period,
|
|
135
|
+
Yr as PointsFormatter,
|
|
136
|
+
Zr as PriceFormatter,
|
|
137
|
+
cr as PropertyValue,
|
|
138
|
+
z as RHFAutocomplete,
|
|
139
|
+
W as RHFAutocompleteAsync,
|
|
140
|
+
w as RHFCheckbox,
|
|
141
|
+
K as RHFDateTime,
|
|
142
|
+
Tr as RHFMultiCheckbox,
|
|
143
|
+
Z as RHFPeriod,
|
|
144
|
+
Nr as RHFRadioGroup,
|
|
145
|
+
Sr as RHFSelect,
|
|
146
|
+
X as RHFTextField,
|
|
147
|
+
Ro as RHFUploadImage,
|
|
148
|
+
_o as Resizeable,
|
|
149
|
+
Go as ScrollBar,
|
|
150
|
+
gt as ScrollToTop,
|
|
151
|
+
dr as SplitLayout,
|
|
152
|
+
Ho as Tab,
|
|
153
|
+
Uo as TextEditor,
|
|
154
|
+
Vr as Typography,
|
|
155
|
+
_r as UncertaintyFormatter,
|
|
156
|
+
wr as columnBooleanFormatter,
|
|
157
|
+
Qr as columnDateFormatter,
|
|
158
|
+
$r as columnNestedValueFormatter,
|
|
159
|
+
ot as columnPointsFormatter,
|
|
160
|
+
rt as columnUncertaintyFormatter,
|
|
161
|
+
io as defaultCommonActionsDictionary,
|
|
162
|
+
Wo as defaultDynamicFilterDictionary,
|
|
163
|
+
tt as defaultFormattersDictionary,
|
|
164
|
+
Xo as defaultModalDialogDictionary,
|
|
165
|
+
rr as defaultNoItemSelectedDictionary,
|
|
166
|
+
mr as defaultObjectLogDictionary,
|
|
167
|
+
no as getCommonActionsDictionary,
|
|
168
|
+
qo as getDynamicFilterComponentsDictionary,
|
|
169
|
+
at as getFormattersComponentsDictionary,
|
|
170
|
+
jo as getGridComponentsDictionary,
|
|
171
|
+
Yo as getModalDialogComponentsDictionary,
|
|
172
|
+
tr as getNoItemSelectedComponentsDictionary,
|
|
173
|
+
sr as getObjectLogsComponentsDictionary,
|
|
174
|
+
Io as getPagerComponentsDictionary,
|
|
175
|
+
to as getPeriodComponetsDictionary,
|
|
176
|
+
Ft as useFormAddEdit,
|
|
177
|
+
yt as useModal,
|
|
178
|
+
Dr as varBounce,
|
|
179
|
+
Rr as varContainer,
|
|
180
|
+
ur as varFade,
|
|
181
|
+
Pr as varTranEnter,
|
|
182
|
+
Cr as varTranExit,
|
|
183
|
+
Lr as varTranHover
|
|
184
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { c as e } from "./commonjs.565e6834.js";
|
|
2
|
+
var j = typeof e == "object" && e && e.Object === Object && e, l = j, y = l, v = typeof self == "object" && self && self.Object === Object && self, S = y || v || Function("return this")(), T = S, O = T, d = O.Symbol, i = d, o = i, c = Object.prototype, $ = c.hasOwnProperty, p = c.toString, t = o ? o.toStringTag : void 0;
|
|
3
|
+
function m(r) {
|
|
4
|
+
var b = $.call(r, t), g = r[t];
|
|
5
|
+
try {
|
|
6
|
+
r[t] = void 0;
|
|
7
|
+
var s = !0;
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
var f = p.call(r);
|
|
11
|
+
return s && (b ? r[t] = g : delete r[t]), f;
|
|
12
|
+
}
|
|
13
|
+
var u = m, _ = Object.prototype, G = _.toString;
|
|
14
|
+
function w(r) {
|
|
15
|
+
return G.call(r);
|
|
16
|
+
}
|
|
17
|
+
var A = w, a = i, h = u, P = A, k = "[object Null]", L = "[object Undefined]", n = a ? a.toStringTag : void 0;
|
|
18
|
+
function R(r) {
|
|
19
|
+
return r == null ? r === void 0 ? L : k : n && n in Object(r) ? h(r) : P(r);
|
|
20
|
+
}
|
|
21
|
+
var x = R, F = Array.isArray, N = F;
|
|
22
|
+
function U(r) {
|
|
23
|
+
return r != null && typeof r == "object";
|
|
24
|
+
}
|
|
25
|
+
var q = U, z = x, B = N, C = q, D = "[object String]";
|
|
26
|
+
function E(r) {
|
|
27
|
+
return typeof r == "string" || !B(r) && C(r) && z(r) == D;
|
|
28
|
+
}
|
|
29
|
+
var J = E;
|
|
30
|
+
export {
|
|
31
|
+
J as i
|
|
32
|
+
};
|