@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,252 +0,0 @@
|
|
|
1
|
-
import { useState as d, useEffect as I } from "react";
|
|
2
|
-
import { Popover as x, styled as h, Stack as O, MenuItem as S } from "@mui/material";
|
|
3
|
-
import { I as P } from "../../Image/index.c9da2d5a.js";
|
|
4
|
-
import { useLocales as v } from "@m4l/graphics";
|
|
5
|
-
import { useEnvironment as L, useNetwork as k } from "@m4l/core";
|
|
6
|
-
import "../../Icon/index.f569765b.js";
|
|
7
|
-
import { styled as C } from "@mui/material/styles";
|
|
8
|
-
import { jsxs as m, jsx as i, Fragment as R } from "react/jsx-runtime";
|
|
9
|
-
import "../Accordion/index.49f5df8e.js";
|
|
10
|
-
import "../Avatar/index.dadb0528.js";
|
|
11
|
-
import "react-router-dom";
|
|
12
|
-
import "@mui/material/Button";
|
|
13
|
-
import { C as E } from "../CircularProgress/index.ad569afd.js";
|
|
14
|
-
import "@mui/lab";
|
|
15
|
-
import { I as N } from "../Button/index.52d18aea.js";
|
|
16
|
-
import "../../CommonActions/components/Actions/index.cd7b2671.js";
|
|
17
|
-
import "../Pager/index.951b6975.js";
|
|
18
|
-
import "../Tab/index.e0653a0a.js";
|
|
19
|
-
const y = C("span")(({
|
|
20
|
-
arrowType: t,
|
|
21
|
-
theme: n
|
|
22
|
-
}) => {
|
|
23
|
-
const o = `solid 1px ${n.palette.grey[50012]}`, a = {
|
|
24
|
-
borderRadius: "0 0 3px 0",
|
|
25
|
-
top: -6,
|
|
26
|
-
borderBottom: o,
|
|
27
|
-
borderRight: o
|
|
28
|
-
}, l = {
|
|
29
|
-
borderRadius: "3px 0 0 0",
|
|
30
|
-
bottom: -6,
|
|
31
|
-
borderTop: o,
|
|
32
|
-
borderLeft: o
|
|
33
|
-
}, s = {
|
|
34
|
-
borderRadius: "0 3px 0 0",
|
|
35
|
-
left: -6,
|
|
36
|
-
borderTop: o,
|
|
37
|
-
borderRight: o
|
|
38
|
-
}, r = {
|
|
39
|
-
borderRadius: "0 0 0 3px",
|
|
40
|
-
right: -6,
|
|
41
|
-
borderBottom: o,
|
|
42
|
-
borderLeft: o
|
|
43
|
-
};
|
|
44
|
-
return {
|
|
45
|
-
display: "none",
|
|
46
|
-
[n.breakpoints.up("sm")]: {
|
|
47
|
-
zIndex: 1,
|
|
48
|
-
width: 12,
|
|
49
|
-
height: 12,
|
|
50
|
-
content: "''",
|
|
51
|
-
position: "absolute",
|
|
52
|
-
display: "block",
|
|
53
|
-
transform: "rotate(-135deg)",
|
|
54
|
-
background: n.palette.background.paper
|
|
55
|
-
},
|
|
56
|
-
...t === "top-left" && {
|
|
57
|
-
...a,
|
|
58
|
-
left: 20
|
|
59
|
-
},
|
|
60
|
-
...t === "top-center" && {
|
|
61
|
-
...a,
|
|
62
|
-
left: 0,
|
|
63
|
-
right: 0,
|
|
64
|
-
margin: "auto"
|
|
65
|
-
},
|
|
66
|
-
...t === "top-right" && {
|
|
67
|
-
...a,
|
|
68
|
-
right: 20
|
|
69
|
-
},
|
|
70
|
-
...t === "bottom-left" && {
|
|
71
|
-
...l,
|
|
72
|
-
left: 20
|
|
73
|
-
},
|
|
74
|
-
...t === "bottom-center" && {
|
|
75
|
-
...l,
|
|
76
|
-
left: 0,
|
|
77
|
-
right: 0,
|
|
78
|
-
margin: "auto"
|
|
79
|
-
},
|
|
80
|
-
...t === "bottom-right" && {
|
|
81
|
-
...l,
|
|
82
|
-
right: 20
|
|
83
|
-
},
|
|
84
|
-
...t === "left-top" && {
|
|
85
|
-
...s,
|
|
86
|
-
top: 20
|
|
87
|
-
},
|
|
88
|
-
...t === "left-center" && {
|
|
89
|
-
...s,
|
|
90
|
-
top: 0,
|
|
91
|
-
bottom: 0,
|
|
92
|
-
margin: "auto"
|
|
93
|
-
},
|
|
94
|
-
...t === "left-bottom" && {
|
|
95
|
-
...s,
|
|
96
|
-
bottom: 20
|
|
97
|
-
},
|
|
98
|
-
...t === "right-top" && {
|
|
99
|
-
...r,
|
|
100
|
-
top: 20
|
|
101
|
-
},
|
|
102
|
-
...t === "right-center" && {
|
|
103
|
-
...r,
|
|
104
|
-
top: 0,
|
|
105
|
-
bottom: 0,
|
|
106
|
-
margin: "auto"
|
|
107
|
-
},
|
|
108
|
-
...t === "right-bottom" && {
|
|
109
|
-
...r,
|
|
110
|
-
bottom: 20
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
});
|
|
114
|
-
function _({
|
|
115
|
-
children: t,
|
|
116
|
-
arrowType: n = "top-right",
|
|
117
|
-
sx: p,
|
|
118
|
-
className: c,
|
|
119
|
-
...o
|
|
120
|
-
}) {
|
|
121
|
-
return /* @__PURE__ */ m(x, {
|
|
122
|
-
className: `m4l_popover ${c || ""}`,
|
|
123
|
-
anchorOrigin: {
|
|
124
|
-
vertical: "bottom",
|
|
125
|
-
horizontal: "right"
|
|
126
|
-
},
|
|
127
|
-
transformOrigin: {
|
|
128
|
-
vertical: "top",
|
|
129
|
-
horizontal: "right"
|
|
130
|
-
},
|
|
131
|
-
PaperProps: {
|
|
132
|
-
sx: {
|
|
133
|
-
p: 1,
|
|
134
|
-
overflow: "inherit",
|
|
135
|
-
...p
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
...o,
|
|
139
|
-
children: [n !== "no-arrow" && /* @__PURE__ */ i(y, {
|
|
140
|
-
arrowType: n
|
|
141
|
-
}), t]
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
const z = h("span")(({
|
|
145
|
-
theme: t
|
|
146
|
-
}) => ({
|
|
147
|
-
marginLeft: t.spacing(1)
|
|
148
|
-
})), B = h("div")(({
|
|
149
|
-
theme: t
|
|
150
|
-
}) => ({
|
|
151
|
-
padding: t.spacing(0.75, 0),
|
|
152
|
-
margin: t.spacing(0, 1.25)
|
|
153
|
-
})), M = h("div")(() => ({
|
|
154
|
-
display: "flex",
|
|
155
|
-
flexDirection: "column"
|
|
156
|
-
}));
|
|
157
|
-
function T() {
|
|
158
|
-
const {
|
|
159
|
-
currentLocale: t,
|
|
160
|
-
onChangeLocale: n
|
|
161
|
-
} = v(), {
|
|
162
|
-
domain_token: p
|
|
163
|
-
} = L(), {
|
|
164
|
-
networkOperation: c
|
|
165
|
-
} = k(), [o, a] = d(null), [l, s] = d(!1), [r, f] = d([]), b = (e) => {
|
|
166
|
-
console.log("handleOpen", r, l), a(e.currentTarget);
|
|
167
|
-
}, u = () => {
|
|
168
|
-
a(null);
|
|
169
|
-
};
|
|
170
|
-
return I(() => {
|
|
171
|
-
let e = !0;
|
|
172
|
-
if (!(o === null || l || r.length > 0))
|
|
173
|
-
return s(!0), c({
|
|
174
|
-
method: "GET",
|
|
175
|
-
endPoint: "na/locales",
|
|
176
|
-
parms: {
|
|
177
|
-
domain_token: p
|
|
178
|
-
}
|
|
179
|
-
}).then((g) => {
|
|
180
|
-
console.log("Response", g.data), e && f(g.data);
|
|
181
|
-
}).finally(() => {
|
|
182
|
-
s(!1);
|
|
183
|
-
}), function() {
|
|
184
|
-
e = !1;
|
|
185
|
-
};
|
|
186
|
-
}, [o]), console.log("Render lang", r, l), /* @__PURE__ */ m(R, {
|
|
187
|
-
children: [/* @__PURE__ */ i(N, {
|
|
188
|
-
className: "m4l_language_popover",
|
|
189
|
-
onClick: b,
|
|
190
|
-
sx: {
|
|
191
|
-
width: 40,
|
|
192
|
-
height: 40,
|
|
193
|
-
...o && {
|
|
194
|
-
bgcolor: "action.selected"
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
src: t?.url_icon || "",
|
|
198
|
-
alt: t?.name,
|
|
199
|
-
width: "24px",
|
|
200
|
-
height: "24px",
|
|
201
|
-
skeletonVariant: "circle",
|
|
202
|
-
tooltip: "dddd"
|
|
203
|
-
}), /* @__PURE__ */ i(_, {
|
|
204
|
-
arrowType: "top-right",
|
|
205
|
-
open: Boolean(o),
|
|
206
|
-
anchorEl: o,
|
|
207
|
-
anchorOrigin: {
|
|
208
|
-
vertical: "bottom",
|
|
209
|
-
horizontal: "right"
|
|
210
|
-
},
|
|
211
|
-
onClose: u,
|
|
212
|
-
sx: {
|
|
213
|
-
mt: 1.5,
|
|
214
|
-
ml: 0.75,
|
|
215
|
-
width: 180,
|
|
216
|
-
rowGap: "100px",
|
|
217
|
-
"& .MuiMenuItem-root": {
|
|
218
|
-
px: 1,
|
|
219
|
-
typography: "body2",
|
|
220
|
-
borderRadius: 0.75
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
children: /* @__PURE__ */ m(M, {
|
|
224
|
-
children: [r.length === 0 && /* @__PURE__ */ i(B, {
|
|
225
|
-
children: /* @__PURE__ */ i(E, {
|
|
226
|
-
size: "20px"
|
|
227
|
-
})
|
|
228
|
-
}), r.length > 0 && /* @__PURE__ */ i(O, {
|
|
229
|
-
spacing: 0.75,
|
|
230
|
-
children: r.map((e) => /* @__PURE__ */ m(S, {
|
|
231
|
-
selected: e.lang === t?.lang && e?.script === t?.script && e?.region === t?.region,
|
|
232
|
-
onClick: () => {
|
|
233
|
-
n(e), u();
|
|
234
|
-
},
|
|
235
|
-
children: [/* @__PURE__ */ i(P, {
|
|
236
|
-
alt: e.name,
|
|
237
|
-
src: e.url_icon,
|
|
238
|
-
width: "24px",
|
|
239
|
-
height: "24px"
|
|
240
|
-
}), /* @__PURE__ */ i(z, {
|
|
241
|
-
children: e.name
|
|
242
|
-
})]
|
|
243
|
-
}, e.lang || e.script || e.region))
|
|
244
|
-
})]
|
|
245
|
-
})
|
|
246
|
-
})]
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
export {
|
|
250
|
-
T as L,
|
|
251
|
-
_ as P
|
|
252
|
-
};
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { createContext as x, useState as g } from "react";
|
|
2
|
-
import { useEnvironment as y, voidFunction as w } from "@m4l/core";
|
|
3
|
-
import { Typography as M } from "@mui/material";
|
|
4
|
-
import { styled as l } from "@mui/material/styles";
|
|
5
|
-
import { B as I } from "../../components/mui_extended/BoxIcon/index.e638ecc8.js";
|
|
6
|
-
import { jsx as t, jsxs as p, Fragment as _ } from "react/jsx-runtime";
|
|
7
|
-
import { M as k } from "../../components/ModalDialog/index.bee344a5.js";
|
|
8
|
-
import { A as $ } from "../../components/CommonActions/components/ActionIntro/index.4665a611.js";
|
|
9
|
-
import { A as b } from "../../components/CommonActions/components/ActionCancel/index.6736b782.js";
|
|
10
|
-
import { b as A } from "../../utils/index.214d9542.js";
|
|
11
|
-
const j = l("div")(() => ({
|
|
12
|
-
display: "flex",
|
|
13
|
-
flexDirection: "column",
|
|
14
|
-
height: "100%"
|
|
15
|
-
})), D = l("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
|
-
})), O = l("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 = l("div")(() => ({
|
|
40
|
-
display: "flex",
|
|
41
|
-
alignItems: "center"
|
|
42
|
-
})), E = (n) => {
|
|
43
|
-
const {
|
|
44
|
-
variant: o = "info",
|
|
45
|
-
msg: i = "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
|
-
} = y(), c = `${r}/${e}/frontend/components/dialog/assets/icons/illustration_confirm_warning.svg`, m = `${r}/${e}/frontend/components/dialog/assets/icons/illustration_confirm_danger.svg`, s = `${r}/${e}/frontend/components/dialog/assets/icons/illustration_confirm_info.svg`;
|
|
50
|
-
return /* @__PURE__ */ t(j, {
|
|
51
|
-
children: /* @__PURE__ */ p(D, {
|
|
52
|
-
children: [/* @__PURE__ */ t(O, {
|
|
53
|
-
variant: o,
|
|
54
|
-
children: /* @__PURE__ */ t(I, {
|
|
55
|
-
src: o === "warning" ? c : o === "delete" ? m : s,
|
|
56
|
-
sx: {
|
|
57
|
-
width: "230px",
|
|
58
|
-
height: "194px"
|
|
59
|
-
}
|
|
60
|
-
})
|
|
61
|
-
}), /* @__PURE__ */ t(B, {
|
|
62
|
-
children: /* @__PURE__ */ t(M, {
|
|
63
|
-
variant: "body1",
|
|
64
|
-
children: i
|
|
65
|
-
})
|
|
66
|
-
})]
|
|
67
|
-
})
|
|
68
|
-
});
|
|
69
|
-
}, F = x(null);
|
|
70
|
-
function K({
|
|
71
|
-
children: n
|
|
72
|
-
}) {
|
|
73
|
-
const [o, i] = g({
|
|
74
|
-
open: !1,
|
|
75
|
-
withClose: !0,
|
|
76
|
-
onQueryClose: w,
|
|
77
|
-
title: "",
|
|
78
|
-
iconComponent: void 0,
|
|
79
|
-
contentComponent: void 0,
|
|
80
|
-
variant: void 0
|
|
81
|
-
}), [r, e] = g(!1), c = (a) => {
|
|
82
|
-
i({
|
|
83
|
-
open: !0,
|
|
84
|
-
...a
|
|
85
|
-
});
|
|
86
|
-
}, m = (a) => {
|
|
87
|
-
const {
|
|
88
|
-
variant: d = "warning",
|
|
89
|
-
title: u,
|
|
90
|
-
msg: h,
|
|
91
|
-
onClickIntro: f,
|
|
92
|
-
onClickCancel: v = s
|
|
93
|
-
} = a;
|
|
94
|
-
i({
|
|
95
|
-
open: !0,
|
|
96
|
-
title: u,
|
|
97
|
-
variant: d,
|
|
98
|
-
contentComponent: /* @__PURE__ */ t(E, {
|
|
99
|
-
variant: d,
|
|
100
|
-
msg: h
|
|
101
|
-
}),
|
|
102
|
-
actions: /* @__PURE__ */ p(_, {
|
|
103
|
-
children: [/* @__PURE__ */ t(b, {
|
|
104
|
-
onClick: v
|
|
105
|
-
}), " ", /* @__PURE__ */ t($, {
|
|
106
|
-
onClick: () => {
|
|
107
|
-
f && f(), s();
|
|
108
|
-
},
|
|
109
|
-
color: A(d)
|
|
110
|
-
})]
|
|
111
|
-
})
|
|
112
|
-
});
|
|
113
|
-
}, s = () => {
|
|
114
|
-
i((a) => ({
|
|
115
|
-
...a,
|
|
116
|
-
open: !1
|
|
117
|
-
})), e(!1);
|
|
118
|
-
}, C = () => {
|
|
119
|
-
e(!0);
|
|
120
|
-
};
|
|
121
|
-
return /* @__PURE__ */ p(F.Provider, {
|
|
122
|
-
value: {
|
|
123
|
-
...o,
|
|
124
|
-
openModal: c,
|
|
125
|
-
openModalConfirm: m,
|
|
126
|
-
closeModal: s,
|
|
127
|
-
hasChanges: r,
|
|
128
|
-
setChanges: C
|
|
129
|
-
},
|
|
130
|
-
children: [n, /* @__PURE__ */ t(k, {})]
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
export {
|
|
134
|
-
F as M,
|
|
135
|
-
K as a
|
|
136
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { useContext as t } from "react";
|
|
2
|
-
import { M as e } from "../../contexts/ModalContext/index.5388dfd5.js";
|
|
3
|
-
function s() {
|
|
4
|
-
const o = t(e);
|
|
5
|
-
if (!o)
|
|
6
|
-
throw new Error("useModal context must be use inside ModalContext");
|
|
7
|
-
return o;
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
s as u
|
|
11
|
-
};
|
package/node_modules.168cb897.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { get as p, set as y, appendErrors as m } from "react-hook-form";
|
|
2
|
-
var v = function(e, r, n) {
|
|
3
|
-
if (e && "reportValidity" in e) {
|
|
4
|
-
var o = p(n, r);
|
|
5
|
-
e.setCustomValidity(o && o.message || ""), e.reportValidity();
|
|
6
|
-
}
|
|
7
|
-
}, h = function(e, r) {
|
|
8
|
-
var n = function(s) {
|
|
9
|
-
var t = r.fields[s];
|
|
10
|
-
t && t.ref && "reportValidity" in t.ref ? v(t.ref, s, e) : t.refs && t.refs.forEach(function(u) {
|
|
11
|
-
return v(u, s, e);
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
for (var o in r.fields)
|
|
15
|
-
n(o);
|
|
16
|
-
}, V = function(e, r) {
|
|
17
|
-
r.shouldUseNativeValidation && h(e, r);
|
|
18
|
-
var n = {};
|
|
19
|
-
for (var o in e) {
|
|
20
|
-
var s = p(r.fields, o);
|
|
21
|
-
y(n, o, Object.assign(e[o], { ref: s && s.ref }));
|
|
22
|
-
}
|
|
23
|
-
return n;
|
|
24
|
-
}, x = function(e, r, n) {
|
|
25
|
-
return r === void 0 && (r = {}), n === void 0 && (n = {}), function(o, s, t) {
|
|
26
|
-
try {
|
|
27
|
-
return Promise.resolve(function(u, f) {
|
|
28
|
-
try {
|
|
29
|
-
var c = (r.context && process.env.NODE_ENV === "development" && console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"), Promise.resolve(e[n.mode === "sync" ? "validateSync" : "validate"](o, Object.assign({ abortEarly: !1 }, r, { context: s }))).then(function(i) {
|
|
30
|
-
return t.shouldUseNativeValidation && h({}, t), { values: n.rawValues ? o : i, errors: {} };
|
|
31
|
-
}));
|
|
32
|
-
} catch (i) {
|
|
33
|
-
return f(i);
|
|
34
|
-
}
|
|
35
|
-
return c && c.then ? c.then(void 0, f) : c;
|
|
36
|
-
}(0, function(u) {
|
|
37
|
-
if (!u.inner)
|
|
38
|
-
throw u;
|
|
39
|
-
return { values: {}, errors: V((f = u, c = !t.shouldUseNativeValidation && t.criteriaMode === "all", (f.inner || []).reduce(function(i, a) {
|
|
40
|
-
if (i[a.path] || (i[a.path] = { message: a.message, type: a.type }), c) {
|
|
41
|
-
var l = i[a.path].types, d = l && l[a.type];
|
|
42
|
-
i[a.path] = m(a.path, c, i, a.type, d ? [].concat(d, a.message) : a.message);
|
|
43
|
-
}
|
|
44
|
-
return i;
|
|
45
|
-
}, {})), t) };
|
|
46
|
-
var f, c;
|
|
47
|
-
}));
|
|
48
|
-
} catch (u) {
|
|
49
|
-
return Promise.reject(u);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
export {
|
|
54
|
-
x as o
|
|
55
|
-
};
|