@m4l/components 0.1.20 → 0.1.22
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/CommonActions/components/ActionCancel/{index.3775989f.js → index.7b862bd3.js} +1 -1
- package/components/CommonActions/components/ActionFormCancel/{index.d69d9e0f.js → index.b59a0011.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.ca7b6952.js → index.35c8757f.js} +1 -1
- package/components/CommonActions/components/Actions/{index.a908e4b9.js → index.edceed6b.js} +7 -7
- package/components/DataGrid/{index.5cbf0dd8.js → index.cd4fff69.js} +3 -3
- package/components/DynamicFilter/{index.8a571617.js → index.4d3c60b4.js} +19 -18
- package/components/ModalDialog/{index.16024a4e.js → index.e1f31e50.js} +2 -2
- package/components/ObjectLogs/{index.ac2bfa48.js → index.9c43ba69.js} +3 -3
- package/components/Period/{index.497b8df4.js → index.ba6c0e11.js} +2 -2
- package/components/contexts/RHFormContext/{index.f8241292.js → index.33dba822.js} +12 -12
- package/components/hook-form/RHFAutocomplete/index.ee3d9b3c.js +171 -0
- package/components/hook-form/RHFAutocomplete/types.d.ts +3 -1
- package/components/hook-form/RHFAutocompleteAsync/index.3b3da5f6.js +73 -0
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +2 -1
- package/components/hook-form/RHFPeriod/{index.e17b1c72.js → index.fc3af81f.js} +1 -1
- package/components/hook-form/RHFUpload/{index.cbf11b68.js → index.56e2e277.js} +19 -19
- package/components/mui_extended/Button/{index.16591787.js → index.6df3e958.js} +4 -4
- package/components/mui_extended/Pager/{index.80c2f8a0.js → index.b072df6b.js} +1 -1
- package/components/mui_extended/Popover/{index.305f2ea5.js → index.d708b699.js} +3 -3
- package/contexts/ModalContext/index.33dc1be9.js +136 -0
- package/contexts/ModalContext/index.d.ts +1 -1
- package/hooks/useModal/index.34cc1e55.js +11 -0
- package/hooks/useModal/index.d.ts +2 -1
- package/index.js +153 -152
- package/package.json +3 -3
- package/components/hook-form/RHFAutocomplete/index.b7f11146.js +0 -146
- package/components/hook-form/RHFAutocompleteAsync/index.97a5a66e.js +0 -51
- package/contexts/ModalContext/index.699767c7.js +0 -150
- package/hooks/useModal/index.8201ccec.js +0 -6
- package/lodash.e09401f0.js +0 -32
package/index.js
CHANGED
|
@@ -1,181 +1,182 @@
|
|
|
1
|
-
import { I as
|
|
1
|
+
import { I as N, a as h } from "./components/mui_extended/IconButton/index.4b5ce8b5.js";
|
|
2
2
|
import "framer-motion";
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
|
-
import { L as
|
|
5
|
+
import { L as U } from "./components/animate/LoadingScreen/index.f1cec7db.js";
|
|
6
6
|
import "@m4l/core";
|
|
7
7
|
import "react-hook-form";
|
|
8
|
-
import { R as
|
|
8
|
+
import { R as k } from "./components/hook-form/RHFAutocomplete/index.ee3d9b3c.js";
|
|
9
9
|
import "react";
|
|
10
|
-
import { I as
|
|
11
|
-
import
|
|
12
|
-
import { R as
|
|
10
|
+
import { I as z } from "./components/Image/index.c9da2d5a.js";
|
|
11
|
+
import "lodash/debounce";
|
|
12
|
+
import { R as w } from "./components/hook-form/RHFCheckbox/index.6a40e25f.js";
|
|
13
|
+
import { R as q } from "./components/hook-form/RHFDateTime/index.5ed774e3.js";
|
|
13
14
|
import "@mui/x-date-pickers";
|
|
14
|
-
import { R as
|
|
15
|
-
import { I as
|
|
15
|
+
import { R as K, a as Q } from "./components/hook-form/RHFTextField/index.bab2a2cf.js";
|
|
16
|
+
import { I as Y } from "./components/Icon/index.f569765b.js";
|
|
16
17
|
import "@mui/material/styles";
|
|
17
|
-
import { R as
|
|
18
|
-
import { E as
|
|
19
|
-
import { P as
|
|
20
|
-
import { b as
|
|
18
|
+
import { R as _ } from "./components/hook-form/RHFPeriod/index.fc3af81f.js";
|
|
19
|
+
import { E as oo } from "./components/ErrorLabel/index.c8615f16.js";
|
|
20
|
+
import { P as to, g as ao } from "./components/Period/index.ba6c0e11.js";
|
|
21
|
+
import { b as mo, M as so, d as io, g as po } from "./components/CommonActions/components/Actions/index.edceed6b.js";
|
|
21
22
|
import "@mui/material/Button";
|
|
22
23
|
import "react-router-dom";
|
|
23
|
-
import { M as
|
|
24
|
+
import { M as xo, a as fo } from "./contexts/ModalContext/index.33dc1be9.js";
|
|
24
25
|
import "@mui/lab";
|
|
25
|
-
import "
|
|
26
|
+
import "lodash/isString";
|
|
26
27
|
import "react-dropzone";
|
|
27
|
-
import { R as
|
|
28
|
-
import { A as
|
|
29
|
-
import { A as
|
|
30
|
-
import { B as
|
|
31
|
-
import { L as
|
|
32
|
-
import { P as
|
|
33
|
-
import { T as
|
|
34
|
-
import { D as
|
|
28
|
+
import { R as lo } from "./components/hook-form/RHFUpload/index.56e2e277.js";
|
|
29
|
+
import { A as Fo } from "./components/mui_extended/Accordion/index.49f5df8e.js";
|
|
30
|
+
import { A as Do } from "./components/mui_extended/Avatar/index.dadb0528.js";
|
|
31
|
+
import { B as yo, L as Po } from "./components/mui_extended/Button/index.6df3e958.js";
|
|
32
|
+
import { L as Co, P as Lo } from "./components/mui_extended/Popover/index.d708b699.js";
|
|
33
|
+
import { P as Ho, g as Mo } from "./components/mui_extended/Pager/index.b072df6b.js";
|
|
34
|
+
import { T as Bo } from "./components/mui_extended/Tab/index.e0653a0a.js";
|
|
35
|
+
import { D as To, N as So, T as Eo, g as No } from "./components/DataGrid/index.cd4fff69.js";
|
|
35
36
|
import "react-dnd";
|
|
36
37
|
import "react-dnd-html5-backend";
|
|
37
38
|
import "@m4l/graphics";
|
|
38
|
-
import { S as
|
|
39
|
-
import { D as
|
|
39
|
+
import { S as Oo } from "./components/ScrollBar/index.39eeb2de.js";
|
|
40
|
+
import { D as jo, d as ko, g as Go } from "./components/DynamicFilter/index.4d3c60b4.js";
|
|
40
41
|
import "simplebar/dist/simplebar.min.css";
|
|
41
|
-
import { R as
|
|
42
|
+
import { R as Vo } from "./components/contexts/RHFormContext/index.33dba822.js";
|
|
42
43
|
import "yup";
|
|
43
44
|
import "./react-draggable.20e95c61.js";
|
|
44
|
-
import { M as
|
|
45
|
-
import { R as
|
|
46
|
-
import { N as
|
|
47
|
-
import { O as
|
|
45
|
+
import { M as Wo, d as qo, g as Jo } from "./components/ModalDialog/index.e1f31e50.js";
|
|
46
|
+
import { R as Qo } from "./components/Resizeable/index.45995d2b.js";
|
|
47
|
+
import { N as Yo, d as Zo, g as _o } from "./components/NoItemSelected/index.9609a7f7.js";
|
|
48
|
+
import { O as or, d as rr, g as tr } from "./components/ObjectLogs/index.9c43ba69.js";
|
|
48
49
|
import "./react-json-view.f56a7f8e.js";
|
|
49
|
-
import { P as
|
|
50
|
-
import { H as
|
|
51
|
-
import { P as
|
|
50
|
+
import { P as er } from "./components/PaperForm/index.3f8c7ef2.js";
|
|
51
|
+
import { H as sr } from "./components/Page/index.fc660ee5.js";
|
|
52
|
+
import { P as pr } from "./components/PropertyValue/index.ab3dd7e9.js";
|
|
52
53
|
import "./react-splitter-layout.7810ac1b.js";
|
|
53
|
-
import { S as
|
|
54
|
-
import { v as
|
|
55
|
-
import { v as
|
|
56
|
-
import { v as
|
|
57
|
-
import { v as
|
|
58
|
-
import { M as
|
|
59
|
-
import { M as
|
|
60
|
-
import { R as
|
|
61
|
-
import { R as
|
|
62
|
-
import { R as
|
|
63
|
-
import { R as
|
|
64
|
-
import { B as
|
|
65
|
-
import { B as
|
|
66
|
-
import { L as
|
|
67
|
-
import { T as
|
|
68
|
-
import { B as
|
|
69
|
-
import { D as
|
|
70
|
-
import { P as
|
|
71
|
-
import { A as
|
|
72
|
-
import { A as
|
|
73
|
-
import { A as
|
|
74
|
-
import { A as
|
|
75
|
-
import { L as
|
|
76
|
-
import { S as
|
|
77
|
-
import { u as
|
|
78
|
-
import { u as
|
|
79
|
-
import { L as
|
|
54
|
+
import { S as xr } from "./components/SplitLayout/index.4032673d.js";
|
|
55
|
+
import { v as cr } from "./components/animate/variants/fade.b561c0fc.js";
|
|
56
|
+
import { v as dr } from "./components/animate/variants/bounce.784aaaaa.js";
|
|
57
|
+
import { v as Fr } from "./components/animate/variants/container.11f82b76.js";
|
|
58
|
+
import { v as Dr, a as Rr, b as yr } from "./components/animate/variants/transition.bd46b9ce.js";
|
|
59
|
+
import { M as Ar } from "./components/animate/MotionContainer/index.8d9f9d80.js";
|
|
60
|
+
import { M as Lr } from "./components/animate/MotionLazyContainer/index.572dd012.js";
|
|
61
|
+
import { R as Hr } from "./components/hook-form/RHFAutocompleteAsync/index.3b3da5f6.js";
|
|
62
|
+
import { R as br } from "./components/hook-form/RHFMultiCheckbox/index.2680b3b6.js";
|
|
63
|
+
import { R as Ir } from "./components/hook-form/RHFSelect/index.b6ca8bb2.js";
|
|
64
|
+
import { R as Sr } from "./components/hook-form/RHFRadioGroup/index.b3335e13.js";
|
|
65
|
+
import { B as Nr } from "./components/mui_extended/BoxIcon/index.e638ecc8.js";
|
|
66
|
+
import { B as Or } from "./components/mui_extended/Breadcrumbs/index.5e37d903.js";
|
|
67
|
+
import { L as jr } from "./components/mui_extended/LinkWithRoute/index.16436ab8.js";
|
|
68
|
+
import { T as Gr } from "./components/mui_extended/Typography/index.e5494696.js";
|
|
69
|
+
import { B as Vr, c as wr } from "./components/formatters/BooleanFormatter/index.3ec56305.js";
|
|
70
|
+
import { D as qr, c as Jr } from "./components/formatters/DateFormatter/index.08d8823b.js";
|
|
71
|
+
import { P as Qr, a as Xr, U as Yr, e as Zr, b as _r, c as $r, d as ot, g as rt } from "./components/formatters/index.6959c2de.js";
|
|
72
|
+
import { A as at } from "./components/CommonActions/components/ActionCancel/index.7b862bd3.js";
|
|
73
|
+
import { A as mt } from "./components/CommonActions/components/ActionIntro/index.35c8757f.js";
|
|
74
|
+
import { A as it } from "./components/CommonActions/components/ActionFormCancel/index.b59a0011.js";
|
|
75
|
+
import { A as nt } from "./components/CommonActions/components/ActionFormIntro/index.ca4d2674.js";
|
|
76
|
+
import { L as ft } from "./components/Loadable/index.f5518558.js";
|
|
77
|
+
import { S as lt } from "./components/ScrollToTop/index.e06f98f6.js";
|
|
78
|
+
import { u as gt } from "./hooks/useFormAddEdit/index.d4845f1a.js";
|
|
79
|
+
import { u as ut } from "./hooks/useModal/index.34cc1e55.js";
|
|
80
|
+
import { L as Rt } from "./assets/Logo/index.228dcb5a.js";
|
|
80
81
|
import "./utils/index.214d9542.js";
|
|
81
82
|
import "./react-data-grid.d46d625e.js";
|
|
82
83
|
import "clsx";
|
|
83
|
-
import "./commonjs.565e6834.js";
|
|
84
|
-
import "prop-types";
|
|
85
|
-
import "react-dom";
|
|
86
84
|
import "simplebar-react";
|
|
87
85
|
import "./node_modules.168cb897.js";
|
|
86
|
+
import "prop-types";
|
|
87
|
+
import "react-dom";
|
|
88
88
|
import "./react-resizable.5277deaf.js";
|
|
89
|
+
import "./commonjs.565e6834.js";
|
|
89
90
|
import "react-helmet-async";
|
|
90
91
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
92
|
+
Fo as Accordion,
|
|
93
|
+
at as ActionCancel,
|
|
94
|
+
it as ActionFormCancel,
|
|
95
|
+
nt as ActionFormIntro,
|
|
96
|
+
mt as ActionIntro,
|
|
97
|
+
mo as Actions,
|
|
98
|
+
Do as Avatar,
|
|
99
|
+
Vr as BooleanFormatter,
|
|
100
|
+
Nr as BoxIcon,
|
|
101
|
+
Or as Breadcrumbs,
|
|
102
|
+
yo as Button,
|
|
103
|
+
To as DataGrid,
|
|
104
|
+
qr as DateFormatter,
|
|
105
|
+
jo as DynamicFilter,
|
|
106
|
+
oo as ErrorLabel,
|
|
107
|
+
sr as HelmetPage,
|
|
108
|
+
Y as Icon,
|
|
109
|
+
N as IconButton,
|
|
110
|
+
h as IconButtonAnimate,
|
|
111
|
+
z as Image,
|
|
112
|
+
Co as LanguagePopover,
|
|
113
|
+
jr as LinkWithRoute,
|
|
114
|
+
ft as Loadable,
|
|
115
|
+
Po as LoadingButton,
|
|
116
|
+
U as LoadingScreen,
|
|
117
|
+
Rt as Logo,
|
|
118
|
+
so as MenuActions,
|
|
119
|
+
xo as ModalContext,
|
|
120
|
+
Wo as ModalDialog,
|
|
121
|
+
fo as ModalProvider,
|
|
122
|
+
Ar as MotionContainer,
|
|
123
|
+
Lr as MotionLazyContainer,
|
|
124
|
+
Yo as NoItemSelected,
|
|
125
|
+
So as NumberEditor,
|
|
126
|
+
or as ObjectLogs,
|
|
127
|
+
Ho as Pager,
|
|
128
|
+
er as PaperForm,
|
|
129
|
+
to as Period,
|
|
130
|
+
Qr as PointsFormatter,
|
|
131
|
+
Lo as Popover,
|
|
132
|
+
Xr as PriceFormatter,
|
|
133
|
+
pr as PropertyValue,
|
|
134
|
+
k as RHFAutocomplete,
|
|
135
|
+
Hr as RHFAutocompleteAsync,
|
|
136
|
+
w as RHFCheckbox,
|
|
137
|
+
q as RHFDateTime,
|
|
138
|
+
br as RHFMultiCheckbox,
|
|
139
|
+
_ as RHFPeriod,
|
|
140
|
+
Sr as RHFRadioGroup,
|
|
141
|
+
Ir as RHFSelect,
|
|
142
|
+
K as RHFTextField,
|
|
143
|
+
Q as RHFTextFieldPassword,
|
|
144
|
+
lo as RHFUploadImage,
|
|
145
|
+
Vo as RHFormProvider,
|
|
146
|
+
Qo as Resizeable,
|
|
147
|
+
Oo as ScrollBar,
|
|
148
|
+
lt as ScrollToTop,
|
|
149
|
+
xr as SplitLayout,
|
|
150
|
+
Bo as Tab,
|
|
151
|
+
Eo as TextEditor,
|
|
152
|
+
Gr as Typography,
|
|
153
|
+
Yr as UncertaintyFormatter,
|
|
154
|
+
wr as columnBooleanFormatter,
|
|
155
|
+
Jr as columnDateFormatter,
|
|
156
|
+
Zr as columnNestedValueFormatter,
|
|
157
|
+
_r as columnPointsFormatter,
|
|
158
|
+
$r as columnUncertaintyFormatter,
|
|
159
|
+
io as defaultCommonActionsDictionary,
|
|
160
|
+
ko as defaultDynamicFilterDictionary,
|
|
161
|
+
ot as defaultFormattersDictionary,
|
|
162
|
+
qo as defaultModalDialogDictionary,
|
|
163
|
+
Zo as defaultNoItemSelectedDictionary,
|
|
164
|
+
rr as defaultObjectLogDictionary,
|
|
165
|
+
po as getCommonActionsDictionary,
|
|
166
|
+
Go as getDynamicFilterComponentsDictionary,
|
|
167
|
+
rt as getFormattersComponentsDictionary,
|
|
168
|
+
No as getGridComponentsDictionary,
|
|
169
|
+
Jo as getModalDialogComponentsDictionary,
|
|
170
|
+
_o as getNoItemSelectedComponentsDictionary,
|
|
171
|
+
tr as getObjectLogsComponentsDictionary,
|
|
172
|
+
Mo as getPagerComponentsDictionary,
|
|
173
|
+
ao as getPeriodComponetsDictionary,
|
|
174
|
+
gt as useFormAddEdit,
|
|
175
|
+
ut as useModal,
|
|
176
|
+
dr as varBounce,
|
|
177
|
+
Fr as varContainer,
|
|
178
|
+
cr as varFade,
|
|
179
|
+
Dr as varTranEnter,
|
|
180
|
+
Rr as varTranExit,
|
|
181
|
+
yr as varTranHover
|
|
181
182
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@m4l/core": "*",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"lodash.throttle": "^4.1.1",
|
|
10
10
|
"react-helmet-async": "^1.3.0",
|
|
11
11
|
"react-hook-form": "^7.33.1",
|
|
12
|
-
"react-router-dom": "
|
|
12
|
+
"react-router-dom": "6.3.0",
|
|
13
13
|
"simplebar-react": "2.4.1",
|
|
14
14
|
"yup": "^0.32.11"
|
|
15
15
|
},
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"react-helmet-async": "^1.3.0",
|
|
25
25
|
"react-hook-form": "^7.33.1",
|
|
26
26
|
"react-intersection-observer": "^9.4.0",
|
|
27
|
-
"react-router-dom": "
|
|
27
|
+
"react-router-dom": "6.3.0",
|
|
28
28
|
"yup": "^0.32.11"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { useModuleDictionary as F, useModuleSkeleton as H } from "@m4l/core";
|
|
2
|
-
import { useFormContext as M, Controller as $ } from "react-hook-form";
|
|
3
|
-
import { Skeleton as O, Autocomplete as q, TextField as E } from "@mui/material";
|
|
4
|
-
import { styled as l } from "@mui/material/styles";
|
|
5
|
-
import { I as w } from "../../Image/index.c9da2d5a.js";
|
|
6
|
-
import { useMemo as V } from "react";
|
|
7
|
-
import { jsxs as T, jsx as i } from "react/jsx-runtime";
|
|
8
|
-
const j = l("div")(() => ({
|
|
9
|
-
display: "flex",
|
|
10
|
-
width: "100%",
|
|
11
|
-
flexDirection: "column"
|
|
12
|
-
})), D = l("div")(({
|
|
13
|
-
theme: e
|
|
14
|
-
}) => ({
|
|
15
|
-
width: "100%",
|
|
16
|
-
display: "grid",
|
|
17
|
-
gridTemplateColumns: "1fr auto",
|
|
18
|
-
gridGap: e.spacing(2),
|
|
19
|
-
alignItems: "center",
|
|
20
|
-
height: `${e.spacing(4.5)}`,
|
|
21
|
-
border: `1px solid ${e.palette.divider}`,
|
|
22
|
-
borderRadius: `${e.spacing(1)}`,
|
|
23
|
-
padding: `0 ${e.spacing(2)}`,
|
|
24
|
-
[e.breakpoints.down("md")]: {
|
|
25
|
-
width: "100%"
|
|
26
|
-
}
|
|
27
|
-
})), K = l("div")(({
|
|
28
|
-
theme: e
|
|
29
|
-
}) => ({
|
|
30
|
-
display: "flex",
|
|
31
|
-
width: "100%",
|
|
32
|
-
"& .MuiAutocomplete-root": {
|
|
33
|
-
width: "100%"
|
|
34
|
-
},
|
|
35
|
-
"& .m4l_image": {
|
|
36
|
-
marginLeft: e.spacing(1.5)
|
|
37
|
-
}
|
|
38
|
-
})), P = l("li")(({
|
|
39
|
-
theme: e
|
|
40
|
-
}) => ({
|
|
41
|
-
"& .m4l_image": {
|
|
42
|
-
marginRight: e.spacing(1.5)
|
|
43
|
-
}
|
|
44
|
-
}));
|
|
45
|
-
function U(e, a, d) {
|
|
46
|
-
return function(n, s) {
|
|
47
|
-
return /* @__PURE__ */ T(P, {
|
|
48
|
-
...n,
|
|
49
|
-
children: [/* @__PURE__ */ i(w, {
|
|
50
|
-
src: e(s),
|
|
51
|
-
width: a,
|
|
52
|
-
height: d
|
|
53
|
-
}), n.key]
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function Y(e) {
|
|
58
|
-
const {
|
|
59
|
-
name: a,
|
|
60
|
-
getOptionLabel: d,
|
|
61
|
-
isOptionEqualToValue: u,
|
|
62
|
-
label: n,
|
|
63
|
-
skeletonWidth: s = 100,
|
|
64
|
-
skeletonHeight: b = "18px",
|
|
65
|
-
options: I,
|
|
66
|
-
disabled: v,
|
|
67
|
-
getOptionUrlImage: r,
|
|
68
|
-
imageWidth: c = "24px",
|
|
69
|
-
imageHeight: m = "24px",
|
|
70
|
-
onOpen: k,
|
|
71
|
-
onClose: _,
|
|
72
|
-
loading: L,
|
|
73
|
-
...C
|
|
74
|
-
} = e, {
|
|
75
|
-
getLabel: g
|
|
76
|
-
} = F(), R = H(), {
|
|
77
|
-
control: S
|
|
78
|
-
} = M(), h = V(() => r !== void 0, [r]), y = (t) => t == null ? "" : d(t), f = (t) => t == null || r === void 0 ? "" : r(t), A = (t, o) => o == null || t === null ? !1 : u(t, o);
|
|
79
|
-
return R ? /* @__PURE__ */ i(j, {
|
|
80
|
-
children: /* @__PURE__ */ T(D, {
|
|
81
|
-
children: [/* @__PURE__ */ i(O, {
|
|
82
|
-
variant: "text",
|
|
83
|
-
width: s,
|
|
84
|
-
height: b
|
|
85
|
-
}, "sk1"), /* @__PURE__ */ i(O, {
|
|
86
|
-
variant: "circular",
|
|
87
|
-
width: 16,
|
|
88
|
-
height: 16
|
|
89
|
-
}, "sk2")]
|
|
90
|
-
})
|
|
91
|
-
}) : /* @__PURE__ */ i($, {
|
|
92
|
-
name: a,
|
|
93
|
-
control: S,
|
|
94
|
-
render: ({
|
|
95
|
-
field: {
|
|
96
|
-
onChange: t,
|
|
97
|
-
value: o
|
|
98
|
-
},
|
|
99
|
-
fieldState: {
|
|
100
|
-
error: x
|
|
101
|
-
}
|
|
102
|
-
}) => /* @__PURE__ */ i(K, {
|
|
103
|
-
className: "m4l_rhf_autocomplete",
|
|
104
|
-
children: /* @__PURE__ */ i(q, {
|
|
105
|
-
options: I,
|
|
106
|
-
getOptionLabel: y,
|
|
107
|
-
isOptionEqualToValue: A,
|
|
108
|
-
disableClearable: !0,
|
|
109
|
-
value: o || null,
|
|
110
|
-
onOpen: k,
|
|
111
|
-
onClose: _,
|
|
112
|
-
onChange: (p, W) => {
|
|
113
|
-
t(W);
|
|
114
|
-
},
|
|
115
|
-
loading: L,
|
|
116
|
-
loadingText: g("rhf_autocomplete.loading_options"),
|
|
117
|
-
disabled: v,
|
|
118
|
-
noOptionsText: g("rhf_autocomplete.no_options"),
|
|
119
|
-
renderOption: h ? U(f, c, m) : void 0,
|
|
120
|
-
renderInput: (p) => /* @__PURE__ */ i(E, {
|
|
121
|
-
...p,
|
|
122
|
-
label: n,
|
|
123
|
-
fullWidth: !0,
|
|
124
|
-
SelectProps: {
|
|
125
|
-
native: !0
|
|
126
|
-
},
|
|
127
|
-
InputProps: {
|
|
128
|
-
...p.InputProps,
|
|
129
|
-
startAdornment: h && o ? /* @__PURE__ */ i(w, {
|
|
130
|
-
src: f(o),
|
|
131
|
-
width: c,
|
|
132
|
-
height: m
|
|
133
|
-
}, "ImageTextField") : null
|
|
134
|
-
},
|
|
135
|
-
autoComplete: "off",
|
|
136
|
-
error: !!x,
|
|
137
|
-
helperText: x?.message,
|
|
138
|
-
...C
|
|
139
|
-
})
|
|
140
|
-
})
|
|
141
|
-
})
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
export {
|
|
145
|
-
Y as R
|
|
146
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { useState as o, useEffect as p } from "react";
|
|
2
|
-
import { useNetwork as y, getPropertyByString as A } from "@m4l/core";
|
|
3
|
-
import { useFormContext as L } from "react-hook-form";
|
|
4
|
-
import { R as k } from "../RHFAutocomplete/index.b7f11146.js";
|
|
5
|
-
import { jsx as w } from "react/jsx-runtime";
|
|
6
|
-
function j(l) {
|
|
7
|
-
const {
|
|
8
|
-
name: n,
|
|
9
|
-
endPoint: e,
|
|
10
|
-
timeout: f = 5e3,
|
|
11
|
-
parms: s,
|
|
12
|
-
resultField: c = "data",
|
|
13
|
-
isRemote: d = !0,
|
|
14
|
-
...g
|
|
15
|
-
} = l, {
|
|
16
|
-
setValue: O
|
|
17
|
-
} = L(), {
|
|
18
|
-
networkOperation: R
|
|
19
|
-
} = y(), [F, r] = o([]), [h, i] = o(!1), [m, u] = o(!1), t = h && !m && !!e;
|
|
20
|
-
return p(() => {
|
|
21
|
-
m && (u(!1), r([]), O(n, null));
|
|
22
|
-
}, [s, e]), p(() => {
|
|
23
|
-
let a = !0;
|
|
24
|
-
if (!!t)
|
|
25
|
-
return R({
|
|
26
|
-
method: "GET",
|
|
27
|
-
endPoint: e,
|
|
28
|
-
timeout: f,
|
|
29
|
-
parms: s,
|
|
30
|
-
isRemote: d
|
|
31
|
-
}).then((x) => {
|
|
32
|
-
a && (r(A(x, c)), u(!0));
|
|
33
|
-
}), () => {
|
|
34
|
-
a = !1;
|
|
35
|
-
};
|
|
36
|
-
}, [t]), console.log("Loading", t), /* @__PURE__ */ w(k, {
|
|
37
|
-
name: n,
|
|
38
|
-
loading: t,
|
|
39
|
-
options: F,
|
|
40
|
-
onOpen: () => {
|
|
41
|
-
i(!0);
|
|
42
|
-
},
|
|
43
|
-
onClose: () => {
|
|
44
|
-
i(!1);
|
|
45
|
-
},
|
|
46
|
-
...g
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
export {
|
|
50
|
-
j as R
|
|
51
|
-
};
|