@kingteza/crud-component 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/common/DatePicker/DatePicker.js +42 -42
- package/dist/components/common/DatePicker/TimePicker.cjs +1 -1
- package/dist/components/common/DatePicker/TimePicker.js +39 -39
- package/dist/components/common/appearance/Hider.cjs +1 -1
- package/dist/components/common/appearance/Hider.js +3 -3
- package/dist/components/common/button/Button.cjs +1 -1
- package/dist/components/common/button/Button.js +19 -19
- package/dist/components/common/button/CloneButtonTable.cjs +1 -1
- package/dist/components/common/button/CloneButtonTable.js +11 -11
- package/dist/components/common/button/DeleteButtonTable.cjs +1 -1
- package/dist/components/common/button/DeleteButtonTable.js +29 -29
- package/dist/components/common/button/ExportButton.cjs +1 -1
- package/dist/components/common/button/ExportButton.js +17 -17
- package/dist/components/common/button/HideButtonTable.cjs +1 -1
- package/dist/components/common/button/HideButtonTable.js +35 -35
- package/dist/components/common/button/ImportButton.cjs +1 -1
- package/dist/components/common/button/ImportButton.js +28 -28
- package/dist/components/common/button/NewButton.cjs +1 -1
- package/dist/components/common/button/NewButton.js +14 -14
- package/dist/components/common/button/PrintButton.cjs +1 -1
- package/dist/components/common/button/PrintButton.js +14 -14
- package/dist/components/common/button/RefreshButton.cjs +1 -1
- package/dist/components/common/button/RefreshButton.js +16 -16
- package/dist/components/common/button/UnHideButton.cjs +1 -1
- package/dist/components/common/button/UnHideButton.js +37 -37
- package/dist/components/common/button/UpdateButtonTable.cjs +1 -1
- package/dist/components/common/button/UpdateButtonTable.js +11 -11
- package/dist/components/common/button/ViewButtonTable.cjs +1 -1
- package/dist/components/common/button/ViewButtonTable.js +10 -10
- package/dist/components/common/check-box/CheckBox.cjs +1 -1
- package/dist/components/common/check-box/CheckBox.js +20 -20
- package/dist/components/common/description/DescList.cjs +1 -1
- package/dist/components/common/description/DescList.js +9 -9
- package/dist/components/common/layout/VerticalSpace.cjs +1 -1
- package/dist/components/common/layout/VerticalSpace.js +3 -3
- package/dist/components/common/loading/LoadingIndicator.cjs +1 -1
- package/dist/components/common/loading/LoadingIndicator.js +12 -12
- package/dist/components/common/picker/ImagePicker.cjs +1 -1
- package/dist/components/common/picker/ImagePicker.js +173 -176
- package/dist/components/common/radio/RadioGroupComponent.cjs +1 -1
- package/dist/components/common/radio/RadioGroupComponent.js +6 -6
- package/dist/components/common/report/SelectFieldInReport.cjs +1 -1
- package/dist/components/common/report/SelectFieldInReport.js +11 -11
- package/dist/components/common/select/CustomSelectOption.cjs +1 -1
- package/dist/components/common/select/CustomSelectOption.js +7 -7
- package/dist/components/common/select/SelectComponent.cjs +1 -1
- package/dist/components/common/select/SelectComponent.js +36 -36
- package/dist/components/common/show-more/index.cjs +1 -1
- package/dist/components/common/show-more/index.js +5 -5
- package/dist/components/common/tab/TabViewWithRoute.cjs +1 -1
- package/dist/components/common/tab/TabViewWithRoute.js +23 -22
- package/dist/components/common/table/table.cjs +1 -1
- package/dist/components/common/table/table.js +12 -12
- package/dist/components/common/tag/StatusTag.cjs +1 -1
- package/dist/components/common/tag/StatusTag.js +13 -13
- package/dist/components/common/text-field/NumberField.cjs +1 -1
- package/dist/components/common/text-field/NumberField.js +43 -43
- package/dist/components/common/text-field/PhoneNumberField.cjs +1 -1
- package/dist/components/common/text-field/PhoneNumberField.js +4 -4
- package/dist/components/common/text-field/TextArea.cjs +1 -1
- package/dist/components/common/text-field/TextArea.js +20 -20
- package/dist/components/common/text-field/TextField.cjs +1 -1
- package/dist/components/common/text-field/TextField.js +47 -47
- package/dist/components/common/tooltip/TooltipComponent.cjs +1 -1
- package/dist/components/common/tooltip/TooltipComponent.js +3 -3
- package/dist/components/common/wizard/WizardResult.cjs +1 -1
- package/dist/components/common/wizard/WizardResult.js +37 -38
- package/dist/components/common/wizard/WizardViewForm.cjs +1 -1
- package/dist/components/common/wizard/WizardViewForm.js +43 -43
- package/dist/components/crud/CrudComponent.cjs +1 -1
- package/dist/components/crud/CrudComponent.js +130 -130
- package/dist/components/crud/CrudField.cjs +1 -1
- package/dist/components/crud/CrudField.js +217 -217
- package/dist/components/crud/CrudForm.cjs +1 -1
- package/dist/components/crud/CrudForm.js +55 -55
- package/dist/components/crud/CrudFormWizard.cjs +1 -1
- package/dist/components/crud/CrudFormWizard.js +82 -84
- package/dist/components/crud/CrudReportComponent.cjs +3 -3
- package/dist/components/crud/CrudReportComponent.js +123 -123
- package/dist/components/crud/CrudSearchComponent.cjs +1 -1
- package/dist/components/crud/CrudSearchComponent.js +43 -43
- package/dist/components/crud/FileCrudField.cjs +1 -1
- package/dist/components/crud/FileCrudField.js +118 -125
- package/dist/components/crud/ImageCrudField.cjs +1 -1
- package/dist/components/crud/ImageCrudField.js +56 -56
- package/dist/components/crud/import/CrudImportButton.cjs +1 -1
- package/dist/components/crud/import/CrudImportButton.js +18 -18
- package/dist/components/crud/import/CrudImportComponent.cjs +2 -2
- package/dist/components/crud/import/CrudImportComponent.js +108 -109
- package/dist/components/crud/view/CrudDecListView.cjs +1 -1
- package/dist/components/crud/view/CrudDecListView.js +22 -22
- package/dist/components/crud/view/CrudViewer.cjs +1 -1
- package/dist/components/crud/view/CrudViewer.js +152 -152
- package/dist/components/crud/view/CrudViewerUtil.cjs +1 -1
- package/dist/components/crud/view/CrudViewerUtil.js +33 -34
- package/dist/locale/index.cjs +1 -1
- package/dist/locale/index.js +2 -2
- package/dist/util/DateUtil.cjs +1 -1
- package/dist/util/DateUtil.js +4 -4
- package/dist/util/ImageUtil.cjs +1 -1
- package/dist/util/ImageUtil.js +1 -1
- package/dist/util/ValidationUtil.cjs +1 -1
- package/dist/util/ValidationUtil.js +1 -1
- package/package.json +1 -1
|
@@ -1,352 +1,352 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Form as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
function
|
|
1
|
+
import { jsx as a, Fragment as O, jsxs as U } from "react/jsx-runtime";
|
|
2
|
+
import { Form as S, Radio as q, Select as A, ColorPicker as $ } from "antd";
|
|
3
|
+
import { useEffect as P, useState as D, useCallback as z } from "react";
|
|
4
|
+
import J from "react-highlight-words";
|
|
5
|
+
import { useTranslation as K } from "react-i18next";
|
|
6
|
+
import { TRANSLATION_NAMESPACE as Q } from "../../locale/hooks/translation-constants.js";
|
|
7
|
+
import X from "./FileCrudField.js";
|
|
8
|
+
import Y from "./ImageCrudField.js";
|
|
9
|
+
import Z from "../common/DatePicker/DatePicker.js";
|
|
10
|
+
import V from "../common/DatePicker/TimePicker.js";
|
|
11
|
+
import ee from "../common/check-box/CheckBox.js";
|
|
12
|
+
import M from "../common/select/SelectComponent.js";
|
|
13
|
+
import re from "../common/text-field/NumberField.js";
|
|
14
|
+
import te from "../common/text-field/TextField.js";
|
|
15
|
+
import oe from "../common/text-field/TextArea.js";
|
|
16
|
+
import ae from "../common/tooltip/TooltipComponent.js";
|
|
17
|
+
function Ne(x) {
|
|
18
18
|
const {
|
|
19
19
|
label: i,
|
|
20
|
-
name:
|
|
21
|
-
type:
|
|
20
|
+
name: c,
|
|
21
|
+
type: b,
|
|
22
22
|
required: s,
|
|
23
|
-
hidden:
|
|
23
|
+
hidden: F,
|
|
24
24
|
rules: u = [],
|
|
25
25
|
updatable: h = !0,
|
|
26
|
-
readonly:
|
|
27
|
-
fieldClassName:
|
|
28
|
-
customFormFieldRender:
|
|
29
|
-
fieldTooltip:
|
|
26
|
+
readonly: w = !1,
|
|
27
|
+
fieldClassName: f,
|
|
28
|
+
customFormFieldRender: k,
|
|
29
|
+
fieldTooltip: v,
|
|
30
30
|
...e
|
|
31
|
-
} =
|
|
32
|
-
|
|
33
|
-
if (
|
|
31
|
+
} = x, p = S.useFormInstance();
|
|
32
|
+
P(() => {
|
|
33
|
+
if (b === "select") {
|
|
34
34
|
const {
|
|
35
|
-
items:
|
|
35
|
+
items: t = [],
|
|
36
36
|
onSearch: n,
|
|
37
|
-
searchOnType:
|
|
37
|
+
searchOnType: o
|
|
38
38
|
} = e;
|
|
39
|
-
!(
|
|
39
|
+
!(t != null && t.length) && !o && (n == null || n(void 0, p, e == null ? void 0 : e.updatingValue));
|
|
40
40
|
}
|
|
41
|
-
}, [p, e,
|
|
42
|
-
const { t:
|
|
43
|
-
if (
|
|
44
|
-
if (
|
|
45
|
-
return
|
|
46
|
-
switch (
|
|
41
|
+
}, [p, e, b, e == null ? void 0 : e.updatingValue]);
|
|
42
|
+
const { t: N } = K(Q);
|
|
43
|
+
if (w || F) return /* @__PURE__ */ a(O, {});
|
|
44
|
+
if (k)
|
|
45
|
+
return k(p, x);
|
|
46
|
+
switch (b) {
|
|
47
47
|
case "text":
|
|
48
48
|
case "email":
|
|
49
49
|
case "password": {
|
|
50
|
-
const { onChange:
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
|
|
50
|
+
const { onChange: t, placeholder: n } = e;
|
|
51
|
+
return /* @__PURE__ */ a(
|
|
52
|
+
te,
|
|
53
53
|
{
|
|
54
54
|
placeholder: n,
|
|
55
55
|
disabled: !h,
|
|
56
56
|
rules: u,
|
|
57
57
|
required: s,
|
|
58
|
-
onChange:
|
|
59
|
-
type:
|
|
60
|
-
name:
|
|
61
|
-
tooltip:
|
|
58
|
+
onChange: t ? (o) => t(o, p) : void 0,
|
|
59
|
+
type: b,
|
|
60
|
+
name: c,
|
|
61
|
+
tooltip: v,
|
|
62
62
|
label: i,
|
|
63
|
-
className:
|
|
63
|
+
className: f,
|
|
64
64
|
autoComplete: "new-password"
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
case "number": {
|
|
69
|
-
const { onChange:
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
|
|
69
|
+
const { onChange: t, placeholder: n, allowMinus: o } = e;
|
|
70
|
+
return /* @__PURE__ */ a(
|
|
71
|
+
re,
|
|
72
72
|
{
|
|
73
73
|
placeholder: n,
|
|
74
74
|
disabled: !h,
|
|
75
75
|
moneyField: !!e.formatted,
|
|
76
|
-
type:
|
|
77
|
-
onChange:
|
|
76
|
+
type: b,
|
|
77
|
+
onChange: t ? (g) => t(g, p) : void 0,
|
|
78
78
|
rules: u,
|
|
79
79
|
autoComplete: "false",
|
|
80
80
|
required: s,
|
|
81
|
-
tooltip:
|
|
82
|
-
className:
|
|
83
|
-
min:
|
|
84
|
-
name:
|
|
81
|
+
tooltip: v,
|
|
82
|
+
className: f,
|
|
83
|
+
min: o ? null : void 0,
|
|
84
|
+
name: c,
|
|
85
85
|
label: i
|
|
86
86
|
}
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
case "date": {
|
|
90
90
|
const {
|
|
91
|
-
range:
|
|
91
|
+
range: t,
|
|
92
92
|
disableToday: n,
|
|
93
|
-
disabledFutureDays:
|
|
94
|
-
disabledPastDays:
|
|
93
|
+
disabledFutureDays: o,
|
|
94
|
+
disabledPastDays: g,
|
|
95
95
|
onChange: C,
|
|
96
|
-
placeholder:
|
|
97
|
-
format:
|
|
96
|
+
placeholder: m,
|
|
97
|
+
format: T
|
|
98
98
|
} = e;
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
|
|
99
|
+
return /* @__PURE__ */ a(
|
|
100
|
+
Z,
|
|
101
101
|
{
|
|
102
|
-
placeholder:
|
|
102
|
+
placeholder: m,
|
|
103
103
|
required: s,
|
|
104
104
|
disabled: !h,
|
|
105
|
-
type:
|
|
106
|
-
format:
|
|
107
|
-
tooltip:
|
|
108
|
-
range:
|
|
109
|
-
name:
|
|
105
|
+
type: b,
|
|
106
|
+
format: T,
|
|
107
|
+
tooltip: v,
|
|
108
|
+
range: t,
|
|
109
|
+
name: c,
|
|
110
110
|
label: i,
|
|
111
111
|
onChange: C ? (l) => C(l, p) : void 0,
|
|
112
|
-
className:
|
|
112
|
+
className: f,
|
|
113
113
|
disableToday: n,
|
|
114
|
-
disabledFutureDays:
|
|
115
|
-
disabledPastDays:
|
|
114
|
+
disabledFutureDays: o,
|
|
115
|
+
disabledPastDays: g
|
|
116
116
|
}
|
|
117
117
|
);
|
|
118
118
|
}
|
|
119
119
|
case "time": {
|
|
120
120
|
const {
|
|
121
|
-
range:
|
|
121
|
+
range: t = !1,
|
|
122
122
|
disableCurrent: n,
|
|
123
|
-
disabledFuture:
|
|
124
|
-
disabledPast:
|
|
123
|
+
disabledFuture: o,
|
|
124
|
+
disabledPast: g,
|
|
125
125
|
onChange: C,
|
|
126
|
-
use12Hours:
|
|
127
|
-
format:
|
|
126
|
+
use12Hours: m,
|
|
127
|
+
format: T,
|
|
128
128
|
placeholder: l
|
|
129
129
|
} = e;
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
|
|
130
|
+
return /* @__PURE__ */ a(
|
|
131
|
+
V,
|
|
132
132
|
{
|
|
133
133
|
placeholder: l,
|
|
134
134
|
required: s,
|
|
135
|
-
format:
|
|
135
|
+
format: T,
|
|
136
136
|
disabled: !h,
|
|
137
|
-
type:
|
|
138
|
-
tooltip:
|
|
139
|
-
range:
|
|
140
|
-
use12Hours:
|
|
141
|
-
name:
|
|
137
|
+
type: b,
|
|
138
|
+
tooltip: v,
|
|
139
|
+
range: t,
|
|
140
|
+
use12Hours: m,
|
|
141
|
+
name: c,
|
|
142
142
|
label: i,
|
|
143
|
-
onChange: C ? (
|
|
144
|
-
className:
|
|
143
|
+
onChange: C ? (y) => C(y, p) : void 0,
|
|
144
|
+
className: f,
|
|
145
145
|
disableCurrent: n,
|
|
146
|
-
disabledFuture:
|
|
147
|
-
disabledPast:
|
|
146
|
+
disabledFuture: o,
|
|
147
|
+
disabledPast: g
|
|
148
148
|
}
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
151
|
case "textarea": {
|
|
152
|
-
const { onChange:
|
|
153
|
-
return /* @__PURE__ */
|
|
154
|
-
|
|
152
|
+
const { onChange: t, placeholder: n, rows: o, cols: g } = e;
|
|
153
|
+
return /* @__PURE__ */ a(
|
|
154
|
+
oe,
|
|
155
155
|
{
|
|
156
156
|
rules: u,
|
|
157
157
|
placeholder: n,
|
|
158
|
-
onChange:
|
|
159
|
-
var
|
|
160
|
-
return
|
|
158
|
+
onChange: t ? (C) => {
|
|
159
|
+
var m;
|
|
160
|
+
return t((m = C == null ? void 0 : C.target) == null ? void 0 : m.value, p);
|
|
161
161
|
} : void 0,
|
|
162
|
-
tooltip:
|
|
162
|
+
tooltip: v,
|
|
163
163
|
required: s,
|
|
164
164
|
disabled: !h,
|
|
165
|
-
name:
|
|
165
|
+
name: c,
|
|
166
166
|
label: i,
|
|
167
|
-
className:
|
|
168
|
-
rows:
|
|
169
|
-
cols:
|
|
167
|
+
className: f,
|
|
168
|
+
rows: o,
|
|
169
|
+
cols: g
|
|
170
170
|
}
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
case "image":
|
|
174
|
-
return /* @__PURE__ */
|
|
175
|
-
|
|
174
|
+
return /* @__PURE__ */ a(
|
|
175
|
+
Y,
|
|
176
176
|
{
|
|
177
177
|
...e,
|
|
178
178
|
required: s,
|
|
179
|
-
name:
|
|
179
|
+
name: c,
|
|
180
180
|
label: i,
|
|
181
181
|
rules: u,
|
|
182
|
-
fieldClassName:
|
|
182
|
+
fieldClassName: f,
|
|
183
183
|
onRemoved: e.onRemoved,
|
|
184
184
|
onUploading: e.onUploading,
|
|
185
185
|
provider: e.provider
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
188
|
case "file":
|
|
189
|
-
return /* @__PURE__ */
|
|
190
|
-
|
|
189
|
+
return /* @__PURE__ */ a(
|
|
190
|
+
X,
|
|
191
191
|
{
|
|
192
192
|
...e,
|
|
193
193
|
required: s,
|
|
194
|
-
name:
|
|
194
|
+
name: c,
|
|
195
195
|
label: i,
|
|
196
196
|
rules: u,
|
|
197
|
-
fieldClassName:
|
|
197
|
+
fieldClassName: f,
|
|
198
198
|
onRemoved: e.onRemoved,
|
|
199
199
|
onUploading: e.onUploading,
|
|
200
200
|
provider: e.provider
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
203
|
case "select":
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
|
|
204
|
+
return /* @__PURE__ */ a(
|
|
205
|
+
le,
|
|
206
206
|
{
|
|
207
207
|
...e,
|
|
208
208
|
required: s,
|
|
209
|
-
name:
|
|
209
|
+
name: c,
|
|
210
210
|
label: i,
|
|
211
211
|
rules: u,
|
|
212
|
-
fieldClassName:
|
|
212
|
+
fieldClassName: f,
|
|
213
213
|
form: p,
|
|
214
214
|
updatable: h,
|
|
215
|
-
readonly:
|
|
216
|
-
fieldTooltip:
|
|
215
|
+
readonly: w,
|
|
216
|
+
fieldTooltip: v
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
219
|
case "enum": {
|
|
220
220
|
const {
|
|
221
|
-
enum:
|
|
221
|
+
enum: t,
|
|
222
222
|
radio: n = !1,
|
|
223
|
-
translation:
|
|
224
|
-
onChange:
|
|
223
|
+
translation: o,
|
|
224
|
+
onChange: g,
|
|
225
225
|
onSearch: C,
|
|
226
|
-
multiple:
|
|
227
|
-
} = e,
|
|
228
|
-
return n ? /* @__PURE__ */
|
|
229
|
-
|
|
226
|
+
multiple: m
|
|
227
|
+
} = e, T = Array.isArray(t) ? t : Object.keys(t);
|
|
228
|
+
return n ? /* @__PURE__ */ a(
|
|
229
|
+
S.Item,
|
|
230
230
|
{
|
|
231
231
|
...e,
|
|
232
|
-
name:
|
|
232
|
+
name: c,
|
|
233
233
|
required: s,
|
|
234
|
-
tooltip:
|
|
234
|
+
tooltip: v,
|
|
235
235
|
rules: u,
|
|
236
236
|
label: i,
|
|
237
|
-
className: ["w-100",
|
|
238
|
-
children: /* @__PURE__ */
|
|
239
|
-
|
|
237
|
+
className: ["w-100", f].join(" "),
|
|
238
|
+
children: /* @__PURE__ */ a(
|
|
239
|
+
q.Group,
|
|
240
240
|
{
|
|
241
241
|
...e,
|
|
242
|
-
onChange:
|
|
243
|
-
var
|
|
244
|
-
return
|
|
242
|
+
onChange: g ? (l) => {
|
|
243
|
+
var y;
|
|
244
|
+
return g((y = l == null ? void 0 : l.target) == null ? void 0 : y.value, p);
|
|
245
245
|
} : void 0,
|
|
246
|
-
children:
|
|
246
|
+
children: T.map((l) => /* @__PURE__ */ a(q, { disabled: !h, value: l, children: o ? N(o[l]) : l }, l))
|
|
247
247
|
}
|
|
248
248
|
)
|
|
249
249
|
}
|
|
250
|
-
) : /* @__PURE__ */
|
|
251
|
-
|
|
250
|
+
) : /* @__PURE__ */ a(
|
|
251
|
+
M,
|
|
252
252
|
{
|
|
253
253
|
...e,
|
|
254
|
-
onChange:
|
|
255
|
-
className: ["w-100",
|
|
256
|
-
name:
|
|
257
|
-
items:
|
|
254
|
+
onChange: g ? (l) => g(l, p) : void 0,
|
|
255
|
+
className: ["w-100", f].join(" "),
|
|
256
|
+
name: c,
|
|
257
|
+
items: T,
|
|
258
258
|
required: s,
|
|
259
|
-
tooltip:
|
|
259
|
+
tooltip: v,
|
|
260
260
|
rules: u,
|
|
261
261
|
label: i,
|
|
262
262
|
disabled: !h,
|
|
263
263
|
onSearch: C ? (l) => C(l, p) : void 0,
|
|
264
264
|
allowClear: !0,
|
|
265
|
-
mode:
|
|
266
|
-
itemBuilder: (l) => /* @__PURE__ */
|
|
265
|
+
mode: m ? "multiple" : void 0,
|
|
266
|
+
itemBuilder: (l) => /* @__PURE__ */ a(A.Option, { value: l, children: o ? N(o[l]) : l }, l)
|
|
267
267
|
}
|
|
268
268
|
);
|
|
269
269
|
}
|
|
270
270
|
case "checkbox": {
|
|
271
|
-
const { onChange:
|
|
272
|
-
return /* @__PURE__ */
|
|
273
|
-
|
|
271
|
+
const { onChange: t } = e;
|
|
272
|
+
return /* @__PURE__ */ a(
|
|
273
|
+
ee,
|
|
274
274
|
{
|
|
275
|
-
className:
|
|
275
|
+
className: f,
|
|
276
276
|
rules: u,
|
|
277
|
-
onChange:
|
|
277
|
+
onChange: t ? (n) => t(n, p) : void 0,
|
|
278
278
|
label: i,
|
|
279
|
-
tooltip:
|
|
279
|
+
tooltip: v,
|
|
280
280
|
disabled: !h,
|
|
281
|
-
name:
|
|
281
|
+
name: c
|
|
282
282
|
}
|
|
283
283
|
);
|
|
284
284
|
}
|
|
285
285
|
case "color":
|
|
286
|
-
return /* @__PURE__ */
|
|
287
|
-
|
|
286
|
+
return /* @__PURE__ */ a(
|
|
287
|
+
ne,
|
|
288
288
|
{
|
|
289
289
|
...e,
|
|
290
290
|
type: "color",
|
|
291
291
|
required: s,
|
|
292
|
-
name:
|
|
292
|
+
name: c,
|
|
293
293
|
label: i,
|
|
294
294
|
rules: u,
|
|
295
|
-
fieldClassName:
|
|
295
|
+
fieldClassName: f,
|
|
296
296
|
updatable: h,
|
|
297
|
-
readonly:
|
|
298
|
-
fieldTooltip:
|
|
297
|
+
readonly: w,
|
|
298
|
+
fieldTooltip: v
|
|
299
299
|
}
|
|
300
300
|
);
|
|
301
301
|
default:
|
|
302
|
-
return /* @__PURE__ */
|
|
302
|
+
return /* @__PURE__ */ a(O, { children: `${b} Not Implemented` });
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function le(x) {
|
|
306
306
|
const {
|
|
307
307
|
items: i = [],
|
|
308
|
-
loading:
|
|
309
|
-
searchOnType:
|
|
308
|
+
loading: c,
|
|
309
|
+
searchOnType: b,
|
|
310
310
|
onSearch: s,
|
|
311
|
-
multiple:
|
|
311
|
+
multiple: F,
|
|
312
312
|
onChange: u,
|
|
313
313
|
highlightSearch: h,
|
|
314
|
-
required:
|
|
315
|
-
fieldClassName:
|
|
316
|
-
rules:
|
|
317
|
-
fieldTooltip:
|
|
314
|
+
required: w,
|
|
315
|
+
fieldClassName: f,
|
|
316
|
+
rules: k,
|
|
317
|
+
fieldTooltip: v,
|
|
318
318
|
updatable: e,
|
|
319
319
|
label: p,
|
|
320
|
-
name:
|
|
321
|
-
tagRender:
|
|
320
|
+
name: N,
|
|
321
|
+
tagRender: t,
|
|
322
322
|
updatingValue: n,
|
|
323
|
-
onSet:
|
|
324
|
-
placeholder:
|
|
323
|
+
onSet: o,
|
|
324
|
+
placeholder: g,
|
|
325
325
|
allowClear: C = !0
|
|
326
|
-
} =
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}, [
|
|
330
|
-
|
|
331
|
-
}, [
|
|
332
|
-
const
|
|
326
|
+
} = x, m = x.form, [T, l] = D(""), y = S.useWatch(N, m), [R, j] = D(!0);
|
|
327
|
+
P(() => {
|
|
328
|
+
o && R && y && (o == null || o(y, i, m), j(!1));
|
|
329
|
+
}, [R, m, i, N, o, y]), P(() => {
|
|
330
|
+
y && j(!0);
|
|
331
|
+
}, [y]);
|
|
332
|
+
const W = z(
|
|
333
333
|
async (r) => {
|
|
334
|
-
l(r),
|
|
334
|
+
l(r), b && (s == null || s(r, m, n));
|
|
335
335
|
},
|
|
336
|
-
[
|
|
336
|
+
[m, s, b, n]
|
|
337
337
|
);
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
-
|
|
338
|
+
return /* @__PURE__ */ a(
|
|
339
|
+
M,
|
|
340
340
|
{
|
|
341
|
-
...
|
|
341
|
+
...x,
|
|
342
342
|
maxTagCount: "responsive",
|
|
343
|
-
maxTagPlaceholder: (r) => /* @__PURE__ */
|
|
344
|
-
|
|
343
|
+
maxTagPlaceholder: (r) => /* @__PURE__ */ U(
|
|
344
|
+
ae,
|
|
345
345
|
{
|
|
346
|
-
title: /* @__PURE__ */
|
|
346
|
+
title: /* @__PURE__ */ a(O, { children: r.map((d) => /* @__PURE__ */ U(O, { children: [
|
|
347
347
|
d.label,
|
|
348
348
|
" ",
|
|
349
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ a("br", {})
|
|
350
350
|
] })) }),
|
|
351
351
|
children: [
|
|
352
352
|
"+",
|
|
@@ -354,32 +354,32 @@ function oe(v) {
|
|
|
354
354
|
]
|
|
355
355
|
}
|
|
356
356
|
),
|
|
357
|
-
placeholder:
|
|
357
|
+
placeholder: g,
|
|
358
358
|
onSelect: (r) => {
|
|
359
|
-
|
|
359
|
+
o == null || o(r == null ? void 0 : r.key, i, m);
|
|
360
360
|
},
|
|
361
361
|
onChange: u ? (r) => {
|
|
362
|
-
l(""), u(r,
|
|
362
|
+
l(""), u(r, m);
|
|
363
363
|
} : void 0,
|
|
364
|
-
mode:
|
|
365
|
-
className: ["w-100",
|
|
366
|
-
name:
|
|
364
|
+
mode: F ? "multiple" : void 0,
|
|
365
|
+
className: ["w-100", f].join(" "),
|
|
366
|
+
name: N,
|
|
367
367
|
items: i,
|
|
368
|
-
required:
|
|
369
|
-
tooltip:
|
|
370
|
-
tagRender:
|
|
371
|
-
rules:
|
|
368
|
+
required: w,
|
|
369
|
+
tooltip: v,
|
|
370
|
+
tagRender: t,
|
|
371
|
+
rules: k,
|
|
372
372
|
disabled: !e,
|
|
373
373
|
label: p,
|
|
374
374
|
allowClear: C,
|
|
375
|
-
onSearch:
|
|
376
|
-
loading:
|
|
375
|
+
onSearch: W,
|
|
376
|
+
loading: c,
|
|
377
377
|
filterOption: h ? (r, d) => {
|
|
378
|
-
var
|
|
378
|
+
var I, L, B;
|
|
379
379
|
try {
|
|
380
|
-
const
|
|
381
|
-
return
|
|
382
|
-
(
|
|
380
|
+
const E = r.toLowerCase().split(/\s+/), _ = ((typeof (d == null ? void 0 : d.children) == "string" ? d == null ? void 0 : d.children : (L = (I = d == null ? void 0 : d.children) == null ? void 0 : I.props) == null ? void 0 : L.textToHighlight) ?? "").toLowerCase(), G = (((B = d == null ? void 0 : d.value) == null ? void 0 : B.toString()) ?? "").toLowerCase();
|
|
381
|
+
return E.every(
|
|
382
|
+
(H) => _.indexOf(H) >= 0 || G.indexOf(H) >= 0
|
|
383
383
|
);
|
|
384
384
|
} catch {
|
|
385
385
|
return !0;
|
|
@@ -387,17 +387,17 @@ function oe(v) {
|
|
|
387
387
|
} : void 0,
|
|
388
388
|
itemBuilder: h ? (r) => {
|
|
389
389
|
const d = r.value ? String(r.value) : void 0;
|
|
390
|
-
return /* @__PURE__ */
|
|
391
|
-
|
|
390
|
+
return /* @__PURE__ */ a(
|
|
391
|
+
A.Option,
|
|
392
392
|
{
|
|
393
393
|
value: r.key,
|
|
394
394
|
title: d,
|
|
395
395
|
disabled: r.disabled,
|
|
396
|
-
children: /* @__PURE__ */
|
|
397
|
-
|
|
396
|
+
children: /* @__PURE__ */ a(
|
|
397
|
+
J,
|
|
398
398
|
{
|
|
399
399
|
highlightClassName: "highlight-text",
|
|
400
|
-
searchWords: (
|
|
400
|
+
searchWords: (T ?? "").split(" "),
|
|
401
401
|
autoEscape: !0,
|
|
402
402
|
textToHighlight: d ?? ""
|
|
403
403
|
}
|
|
@@ -405,8 +405,8 @@ function oe(v) {
|
|
|
405
405
|
},
|
|
406
406
|
r.key
|
|
407
407
|
);
|
|
408
|
-
} : (r) => /* @__PURE__ */
|
|
409
|
-
|
|
408
|
+
} : (r) => /* @__PURE__ */ a(
|
|
409
|
+
A.Option,
|
|
410
410
|
{
|
|
411
411
|
value: r.key,
|
|
412
412
|
title: r.value,
|
|
@@ -418,42 +418,42 @@ function oe(v) {
|
|
|
418
418
|
}
|
|
419
419
|
);
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function ne(x) {
|
|
422
422
|
const {
|
|
423
423
|
required: i,
|
|
424
|
-
fieldClassName:
|
|
425
|
-
rules:
|
|
424
|
+
fieldClassName: c,
|
|
425
|
+
rules: b,
|
|
426
426
|
fieldTooltip: s,
|
|
427
|
-
updatable:
|
|
427
|
+
updatable: F,
|
|
428
428
|
label: u,
|
|
429
429
|
name: h
|
|
430
|
-
} =
|
|
431
|
-
return /* @__PURE__ */
|
|
432
|
-
|
|
430
|
+
} = x;
|
|
431
|
+
return /* @__PURE__ */ a(
|
|
432
|
+
S.Item,
|
|
433
433
|
{
|
|
434
434
|
label: u,
|
|
435
435
|
name: h,
|
|
436
436
|
required: i,
|
|
437
|
-
rules:
|
|
437
|
+
rules: b,
|
|
438
438
|
tooltip: s,
|
|
439
|
-
children: /* @__PURE__ */
|
|
440
|
-
|
|
439
|
+
children: /* @__PURE__ */ a(
|
|
440
|
+
$,
|
|
441
441
|
{
|
|
442
442
|
disabledAlpha: !0,
|
|
443
443
|
format: "hex",
|
|
444
444
|
defaultFormat: "hex",
|
|
445
445
|
showText: !0,
|
|
446
446
|
trigger: "click",
|
|
447
|
-
className:
|
|
448
|
-
disabled: !
|
|
449
|
-
...
|
|
447
|
+
className: c,
|
|
448
|
+
disabled: !F,
|
|
449
|
+
...x.innerProps
|
|
450
450
|
}
|
|
451
451
|
)
|
|
452
452
|
}
|
|
453
453
|
);
|
|
454
454
|
}
|
|
455
455
|
export {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
456
|
+
ne as ColorCrudFieldComponent,
|
|
457
|
+
le as SelectCrudFieldComponent,
|
|
458
|
+
Ne as default
|
|
459
459
|
};
|