@kingteza/crud-component 1.0.5 → 1.0.6
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/_virtual/_commonjsHelpers.cjs +1 -1
- package/dist/_virtual/_commonjsHelpers.js +3 -5
- package/dist/_virtual/advancedFormat.cjs +1 -1
- package/dist/_virtual/customParseFormat.cjs +1 -1
- package/dist/_virtual/dayjs.min.cjs +1 -1
- package/dist/_virtual/index.cjs +1 -1
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index2.cjs +1 -1
- package/dist/_virtual/index2.js +5 -2
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/index4.cjs +1 -1
- package/dist/_virtual/index4.js +2 -2
- package/dist/_virtual/index5.cjs +1 -1
- package/dist/_virtual/index5.js +2 -5
- package/dist/_virtual/localeData.cjs +1 -1
- package/dist/_virtual/weekOfYear.cjs +1 -1
- package/dist/_virtual/weekYear.cjs +1 -1
- package/dist/_virtual/weekday.cjs +1 -1
- package/dist/common/index.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/src/components/common/DatePicker/DatePicker.cjs +1 -1
- package/dist/src/components/common/DatePicker/DatePicker.js +1 -1
- package/dist/src/components/common/DatePicker/TimePicker.cjs +1 -1
- package/dist/src/components/common/DatePicker/TimePicker.js +3 -3
- package/dist/src/components/common/appearance/Hider.cjs +1 -1
- package/dist/src/components/common/button/Button.cjs +1 -1
- package/dist/src/components/common/button/Button.js +10 -10
- package/dist/src/components/common/button/CloneButtonTable.cjs +1 -1
- package/dist/src/components/common/button/CloneButtonTable.js +7 -7
- package/dist/src/components/common/button/DeleteButtonTable.cjs +1 -1
- package/dist/src/components/common/button/DeleteButtonTable.js +17 -17
- package/dist/src/components/common/button/ExportButton.cjs +1 -1
- package/dist/src/components/common/button/ExportButton.js +16 -16
- package/dist/src/components/common/button/HideButtonTable.cjs +1 -1
- package/dist/src/components/common/button/HideButtonTable.js +18 -18
- package/dist/src/components/common/button/ImportButton.cjs +1 -1
- package/dist/src/components/common/button/ImportButton.js +25 -25
- package/dist/src/components/common/button/NewButton.cjs +1 -1
- package/dist/src/components/common/button/NewButton.js +16 -16
- package/dist/src/components/common/button/PrintButton.cjs +1 -1
- package/dist/src/components/common/button/PrintButton.js +14 -14
- package/dist/src/components/common/button/RefreshButton.cjs +1 -1
- package/dist/src/components/common/button/RefreshButton.js +12 -12
- package/dist/src/components/common/button/UnHideButton.cjs +1 -1
- package/dist/src/components/common/button/UnHideButton.js +28 -28
- package/dist/src/components/common/button/UpdateButtonTable.cjs +1 -1
- package/dist/src/components/common/button/UpdateButtonTable.js +9 -9
- package/dist/src/components/common/button/ViewButtonTable.cjs +1 -1
- package/dist/src/components/common/button/ViewButtonTable.js +13 -13
- package/dist/src/components/common/check-box/CheckBox.cjs +1 -1
- package/dist/src/components/common/description/DescList.cjs +1 -1
- package/dist/src/components/common/layout/VerticalSpace.cjs +1 -1
- package/dist/src/components/common/loading/LoadingIndicator.cjs +1 -1
- package/dist/src/components/common/loading/LoadingIndicator.js +5 -5
- package/dist/src/components/common/picker/ImagePicker.cjs +1 -1
- package/dist/src/components/common/picker/ImagePicker.js +73 -76
- package/dist/src/components/common/radio/RadioGroupComponent.cjs +1 -1
- package/dist/src/components/common/report/SelectFieldInReport.cjs +1 -1
- package/dist/src/components/common/select/CustomSelectOption.cjs +1 -1
- package/dist/src/components/common/select/SelectComponent.cjs +1 -1
- package/dist/src/components/common/select/SelectComponent.js +5 -5
- package/dist/src/components/common/show-more/index.cjs +1 -1
- package/dist/src/components/common/show-more/index.js +1 -1
- package/dist/src/components/common/tab/TabViewWithRoute.cjs +1 -1
- package/dist/src/components/common/tab/TabViewWithRoute.js +11 -10
- package/dist/src/components/common/table/table.cjs +1 -1
- package/dist/src/components/common/tag/StatusTag.cjs +1 -1
- package/dist/src/components/common/tag/StatusTag.js +1 -1
- package/dist/src/components/common/text-field/NumberField.cjs +1 -1
- package/dist/src/components/common/text-field/NumberField.js +7 -7
- package/dist/src/components/common/text-field/PhoneNumberField.cjs +1 -1
- package/dist/src/components/common/text-field/TextArea.cjs +1 -1
- package/dist/src/components/common/text-field/TextArea.js +3 -3
- package/dist/src/components/common/text-field/TextField.cjs +1 -1
- package/dist/src/components/common/text-field/TextField.js +34 -34
- package/dist/src/components/common/tooltip/TooltipComponent.cjs +1 -1
- package/dist/src/components/common/wizard/WizardResult.cjs +1 -1
- package/dist/src/components/common/wizard/WizardResult.js +36 -37
- package/dist/src/components/common/wizard/WizardViewForm.cjs +1 -1
- package/dist/src/components/crud/CrudComponent.cjs +1 -1
- package/dist/src/components/crud/CrudComponent.js +15 -15
- package/dist/src/components/crud/CrudField.cjs +1 -1
- package/dist/src/components/crud/CrudField.js +22 -22
- package/dist/src/components/crud/CrudForm.js +10 -10
- package/dist/src/components/crud/CrudFormWizard.cjs +1 -1
- package/dist/src/components/crud/CrudFormWizard.js +63 -65
- package/dist/src/components/crud/CrudReportComponent.cjs +3 -3
- package/dist/src/components/crud/CrudReportComponent.js +54 -54
- package/dist/src/components/crud/CrudSearchComponent.cjs +1 -1
- package/dist/src/components/crud/CrudSearchComponent.js +23 -23
- package/dist/src/components/crud/FileCrudField.cjs +1 -1
- package/dist/src/components/crud/FileCrudField.js +94 -101
- package/dist/src/components/crud/ImageCrudField.cjs +1 -1
- package/dist/src/components/crud/ImageCrudField.js +35 -35
- package/dist/src/components/crud/import/CrudImportButton.cjs +1 -1
- package/dist/src/components/crud/import/CrudImportButton.js +12 -12
- package/dist/src/components/crud/import/CrudImportComponent.cjs +2 -2
- package/dist/src/components/crud/import/CrudImportComponent.js +94 -95
- package/dist/src/components/crud/view/CrudDecListView.cjs +1 -1
- package/dist/src/components/crud/view/CrudDecListView.js +5 -5
- package/dist/src/components/crud/view/CrudViewer.cjs +1 -1
- package/dist/src/components/crud/view/CrudViewer.js +7 -7
- package/dist/src/components/crud/view/CrudViewerUtil.cjs +1 -1
- package/dist/src/components/crud/view/CrudViewerUtil.js +31 -32
- package/dist/src/context/WindowDimension.cjs +1 -1
- package/dist/src/locale/index.cjs +1 -1
- package/dist/src/locale/index.js +2 -2
- package/dist/src/locale/translations/en.cjs +1 -1
- package/dist/src/util/DateUtil.cjs +1 -1
- package/dist/src/util/DateUtil.js +4 -4
- package/dist/src/util/ImageUtil.cjs +1 -1
- package/dist/src/util/ImageUtil.js +1 -1
- package/dist/src/util/ValidationUtil.cjs +1 -1
- package/dist/src/util/ValidationUtil.js +1 -1
- package/dist/util/index.cjs +1 -1
- package/package.json +1 -1
- package/dist/_virtual/FileSaver.min.cjs +0 -1
- package/dist/_virtual/FileSaver.min.js +0 -5
- package/dist/_virtual/FileSaver.min2.cjs +0 -1
- package/dist/_virtual/FileSaver.min2.js +0 -4
- package/dist/_virtual/ShowMoreText.cjs +0 -1
- package/dist/_virtual/ShowMoreText.js +0 -7
- package/dist/_virtual/ShowMoreText2.cjs +0 -1
- package/dist/_virtual/ShowMoreText2.js +0 -4
- package/dist/_virtual/Truncate.cjs +0 -1
- package/dist/_virtual/Truncate.js +0 -4
- package/dist/_virtual/index10.cjs +0 -1
- package/dist/_virtual/index10.js +0 -4
- package/dist/_virtual/index6.cjs +0 -1
- package/dist/_virtual/index6.js +0 -2
- package/dist/_virtual/index7.cjs +0 -1
- package/dist/_virtual/index7.js +0 -7
- package/dist/_virtual/index8.cjs +0 -1
- package/dist/_virtual/index8.js +0 -7
- package/dist/_virtual/index9.cjs +0 -1
- package/dist/_virtual/index9.js +0 -4
- package/dist/_virtual/main.cjs +0 -1
- package/dist/_virtual/main.js +0 -7
- package/dist/_virtual/main2.cjs +0 -1
- package/dist/_virtual/main2.js +0 -4
- package/dist/_virtual/papaparse.min.cjs +0 -1
- package/dist/_virtual/papaparse.min.js +0 -7
- package/dist/_virtual/papaparse.min2.cjs +0 -1
- package/dist/_virtual/papaparse.min2.js +0 -4
|
@@ -1,62 +1,59 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import re from "../../../../node_modules/@ant-design/icons/es/icons/UploadOutlined.js";
|
|
14
|
-
import Ue from "../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
15
|
-
const Se = Ce.Item;
|
|
4
|
+
import { RotateLeftOutlined as Ce, RotateRightOutlined as ve, UploadOutlined as re, LoadingOutlined as be } from "@ant-design/icons";
|
|
5
|
+
import { Form as ye, Modal as Z, Upload as Ie } from "antd";
|
|
6
|
+
import M, { useRef as z, useState as h, useEffect as N, useCallback as q, useMemo as ee } from "react";
|
|
7
|
+
import { Cropper as Oe } from "react-cropper";
|
|
8
|
+
import { useTranslation as Ue } from "react-i18next";
|
|
9
|
+
import { TRANSLATION_NAMESPACE as Fe } from "../../../locale/hooks/translation-constants.js";
|
|
10
|
+
import B from "../button/Button.js";
|
|
11
|
+
import Ne from "../../../util/ImageUtil.js";
|
|
12
|
+
const Re = ye.Item;
|
|
16
13
|
function te(r) {
|
|
17
14
|
return new Promise((l, m) => {
|
|
18
15
|
const o = new FileReader();
|
|
19
16
|
o.readAsDataURL(r), o.onload = () => l(o.result), o.onerror = (p) => m(p);
|
|
20
17
|
});
|
|
21
18
|
}
|
|
22
|
-
const
|
|
19
|
+
const Je = ({
|
|
23
20
|
values: r = [],
|
|
24
21
|
required: l,
|
|
25
22
|
buttonType: m,
|
|
26
23
|
label: o,
|
|
27
24
|
name: p,
|
|
28
25
|
onChange: f,
|
|
29
|
-
aspectRatio:
|
|
26
|
+
aspectRatio: R,
|
|
30
27
|
buttonTitle: j,
|
|
31
28
|
hidePreview: w,
|
|
32
29
|
buttonSize: u = "large",
|
|
33
30
|
showButtonText: g = !0,
|
|
34
|
-
showOnlyIcon:
|
|
35
|
-
icon:
|
|
36
|
-
loading:
|
|
31
|
+
showOnlyIcon: E = !1,
|
|
32
|
+
icon: y = /* @__PURE__ */ t.jsx(re, {}),
|
|
33
|
+
loading: I,
|
|
37
34
|
maxCount: C = 1,
|
|
38
35
|
onAdd: c,
|
|
39
|
-
onRemove:
|
|
40
|
-
listType:
|
|
41
|
-
...
|
|
36
|
+
onRemove: O,
|
|
37
|
+
listType: U,
|
|
38
|
+
..._
|
|
42
39
|
}) => {
|
|
43
|
-
const [oe, se] = M.useState(""), [ne, ie] = M.useState(""), [ae,
|
|
44
|
-
!e.url && !e.preview && (e.preview = await te(e.originFileObj)), ie(e.url || e.preview),
|
|
45
|
-
}, [T,
|
|
40
|
+
const [oe, se] = M.useState(""), [ne, ie] = M.useState(""), [ae, L] = M.useState(!1), S = z(), n = z(), [i, k] = h([]), [x, A] = h(), ce = z(), le = () => L(!1), de = async (e) => {
|
|
41
|
+
!e.url && !e.preview && (e.preview = await te(e.originFileObj)), ie(e.url || e.preview), L(!0), se(e.name);
|
|
42
|
+
}, [T, F] = h(!1), me = () => {
|
|
46
43
|
}, J = (e) => {
|
|
47
44
|
var s;
|
|
48
45
|
(s = n == null ? void 0 : n.current) == null || s.cropper.rotate(e ? -90 : 90);
|
|
49
46
|
};
|
|
50
|
-
|
|
47
|
+
N(() => {
|
|
51
48
|
f == null || f(i[0], i);
|
|
52
49
|
}, [i, f]);
|
|
53
50
|
const pe = () => {
|
|
54
|
-
var
|
|
55
|
-
const e = (
|
|
56
|
-
|
|
51
|
+
var b;
|
|
52
|
+
const e = (b = n == null ? void 0 : n.current) == null ? void 0 : b.cropper.getCroppedCanvas(), { type: s, size: a, name: d, uid: v } = S.current;
|
|
53
|
+
F(!0), e == null || e.toBlob(async (je) => {
|
|
57
54
|
const we = Object.assign(new File([je], d, { type: s }), {
|
|
58
55
|
uid: v
|
|
59
|
-
}), Q = await
|
|
56
|
+
}), Q = await Ne.resizeImage(we), X = await te(Q), Y = {
|
|
60
57
|
url: X,
|
|
61
58
|
name: d,
|
|
62
59
|
uid: v,
|
|
@@ -67,38 +64,38 @@ const He = ({
|
|
|
67
64
|
};
|
|
68
65
|
if (c)
|
|
69
66
|
try {
|
|
70
|
-
|
|
67
|
+
F(!0), await c(Y);
|
|
71
68
|
} finally {
|
|
72
|
-
|
|
69
|
+
F(!1);
|
|
73
70
|
}
|
|
74
|
-
k([Y, ...i]),
|
|
71
|
+
k([Y, ...i]), F(!1);
|
|
75
72
|
}), A(void 0);
|
|
76
73
|
}, fe = () => {
|
|
77
|
-
A(void 0),
|
|
74
|
+
A(void 0), S.current = void 0;
|
|
78
75
|
}, V = q((e) => {
|
|
79
76
|
const s = e;
|
|
80
77
|
if (s) {
|
|
81
|
-
|
|
78
|
+
S.current = s;
|
|
82
79
|
const a = new FileReader();
|
|
83
80
|
a.addEventListener("load", () => {
|
|
84
81
|
var d;
|
|
85
82
|
if (typeof a.result == "string") {
|
|
86
83
|
A(a.result);
|
|
87
|
-
const v = localStorage.getItem("cropper.box"),
|
|
88
|
-
|
|
84
|
+
const v = localStorage.getItem("cropper.box"), b = v ? JSON.parse(v) : void 0;
|
|
85
|
+
b && ((d = n == null ? void 0 : n.current) == null || d.cropper.setCropBoxData(b)), setTimeout(() => {
|
|
89
86
|
K();
|
|
90
87
|
}, 100);
|
|
91
88
|
}
|
|
92
89
|
}), a.readAsDataURL(s);
|
|
93
90
|
}
|
|
94
91
|
}, []);
|
|
95
|
-
|
|
92
|
+
N(() => {
|
|
96
93
|
if (r != null && r.length || typeof r == "string") {
|
|
97
94
|
const e = Array.isArray(r) ? r.map((s) => [{ uid: r, url: s }]) : [{ uid: r, url: r }];
|
|
98
95
|
k(e);
|
|
99
96
|
}
|
|
100
97
|
}, [r]);
|
|
101
|
-
const { t: P } =
|
|
98
|
+
const { t: P } = Ue(Fe), ue = ee(
|
|
102
99
|
() => l ? {
|
|
103
100
|
required: l,
|
|
104
101
|
validator: (e, s, a) => {
|
|
@@ -106,9 +103,9 @@ const He = ({
|
|
|
106
103
|
}
|
|
107
104
|
} : void 0,
|
|
108
105
|
[l, x, i == null ? void 0 : i.length, o, P]
|
|
109
|
-
), W = j ?? P("message.fileUploadMessage2"),
|
|
106
|
+
), W = j ?? P("message.fileUploadMessage2"), $ = ee(
|
|
110
107
|
() => /* @__PURE__ */ t.jsx(
|
|
111
|
-
|
|
108
|
+
Se,
|
|
112
109
|
{
|
|
113
110
|
showLoadingIndicator: T,
|
|
114
111
|
_buttonTitle: W,
|
|
@@ -116,12 +113,12 @@ const He = ({
|
|
|
116
113
|
buttonType: m,
|
|
117
114
|
fileList: i,
|
|
118
115
|
hidePreview: w,
|
|
119
|
-
icon:
|
|
120
|
-
loading:
|
|
121
|
-
listType:
|
|
116
|
+
icon: y,
|
|
117
|
+
loading: I,
|
|
118
|
+
listType: U,
|
|
122
119
|
maxCount: C,
|
|
123
120
|
onChangeFile: V,
|
|
124
|
-
onRemove:
|
|
121
|
+
onRemove: O,
|
|
125
122
|
showButtonText: g,
|
|
126
123
|
handlePreview: de,
|
|
127
124
|
setFileList: k
|
|
@@ -134,43 +131,43 @@ const He = ({
|
|
|
134
131
|
m,
|
|
135
132
|
i,
|
|
136
133
|
w,
|
|
137
|
-
b,
|
|
138
134
|
y,
|
|
139
|
-
|
|
135
|
+
I,
|
|
136
|
+
U,
|
|
140
137
|
C,
|
|
141
138
|
V,
|
|
142
|
-
|
|
139
|
+
O,
|
|
143
140
|
g
|
|
144
141
|
]
|
|
145
142
|
);
|
|
146
|
-
ce.current =
|
|
147
|
-
const [ge,
|
|
148
|
-
|
|
143
|
+
ce.current = $.props.beforeUpload;
|
|
144
|
+
const [ge, H] = h(0), [xe, G] = h(0), [D, he] = h();
|
|
145
|
+
N(() => {
|
|
149
146
|
const e = setTimeout(() => {
|
|
150
147
|
D && localStorage.setItem("cropper.box", JSON.stringify(D));
|
|
151
148
|
}, 400);
|
|
152
149
|
return () => clearTimeout(e);
|
|
153
|
-
}, [D]),
|
|
154
|
-
x || (
|
|
150
|
+
}, [D]), N(() => {
|
|
151
|
+
x || (H(0), G(0));
|
|
155
152
|
}, [x]);
|
|
156
153
|
const K = q(async () => {
|
|
157
154
|
var s;
|
|
158
155
|
const e = (s = n == null ? void 0 : n.current) == null ? void 0 : s.cropper;
|
|
159
156
|
if (e) {
|
|
160
157
|
const { width: a, height: d } = e.getCroppedCanvas();
|
|
161
|
-
he(e.getCropBoxData()),
|
|
158
|
+
he(e.getCropBoxData()), H(a), G(d);
|
|
162
159
|
}
|
|
163
160
|
}, []);
|
|
164
161
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
165
162
|
/* @__PURE__ */ t.jsx(
|
|
166
|
-
|
|
163
|
+
Re,
|
|
167
164
|
{
|
|
168
165
|
label: o,
|
|
169
|
-
...
|
|
166
|
+
..._,
|
|
170
167
|
name: p,
|
|
171
168
|
className: "mb-0",
|
|
172
|
-
rules: [ue, ...
|
|
173
|
-
children:
|
|
169
|
+
rules: [ue, ..._.rules ?? []],
|
|
170
|
+
children: $
|
|
174
171
|
}
|
|
175
172
|
),
|
|
176
173
|
/* @__PURE__ */ t.jsxs(
|
|
@@ -183,31 +180,31 @@ const He = ({
|
|
|
183
180
|
onCancel: fe,
|
|
184
181
|
children: [
|
|
185
182
|
/* @__PURE__ */ t.jsx(
|
|
186
|
-
|
|
183
|
+
Oe,
|
|
187
184
|
{
|
|
188
185
|
ref: n,
|
|
189
186
|
src: x,
|
|
190
187
|
cropmove: K,
|
|
191
188
|
viewMode: 1,
|
|
192
|
-
aspectRatio:
|
|
189
|
+
aspectRatio: R,
|
|
193
190
|
cropend: () => me()
|
|
194
191
|
}
|
|
195
192
|
),
|
|
196
193
|
/* @__PURE__ */ t.jsx("p", { className: "text-center", children: [ge, xe].join(" ⨉ ") }),
|
|
197
194
|
/* @__PURE__ */ t.jsxs("div", { className: "mt-2 d-flex justify-content-center", children: [
|
|
198
195
|
/* @__PURE__ */ t.jsx(
|
|
199
|
-
|
|
196
|
+
B,
|
|
200
197
|
{
|
|
201
198
|
size: "large",
|
|
202
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
199
|
+
icon: /* @__PURE__ */ t.jsx(Ce, {}),
|
|
203
200
|
onClick: () => J(!0)
|
|
204
201
|
}
|
|
205
202
|
),
|
|
206
203
|
/* @__PURE__ */ t.jsx(
|
|
207
|
-
|
|
204
|
+
B,
|
|
208
205
|
{
|
|
209
206
|
size: "large",
|
|
210
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
207
|
+
icon: /* @__PURE__ */ t.jsx(ve, {}),
|
|
211
208
|
onClick: () => J(!1)
|
|
212
209
|
}
|
|
213
210
|
)
|
|
@@ -226,24 +223,24 @@ const He = ({
|
|
|
226
223
|
}
|
|
227
224
|
)
|
|
228
225
|
] });
|
|
229
|
-
},
|
|
226
|
+
}, Se = ({
|
|
230
227
|
_buttonTitle: r,
|
|
231
228
|
buttonSize: l,
|
|
232
229
|
buttonType: m,
|
|
233
230
|
fileList: o,
|
|
234
231
|
hidePreview: p,
|
|
235
232
|
icon: f,
|
|
236
|
-
loading:
|
|
233
|
+
loading: R,
|
|
237
234
|
maxCount: j,
|
|
238
235
|
onChangeFile: w,
|
|
239
236
|
onRemove: u,
|
|
240
237
|
showButtonText: g,
|
|
241
|
-
handlePreview:
|
|
242
|
-
setFileList:
|
|
243
|
-
showLoadingIndicator:
|
|
238
|
+
handlePreview: E,
|
|
239
|
+
setFileList: y,
|
|
240
|
+
showLoadingIndicator: I,
|
|
244
241
|
listType: C = "picture"
|
|
245
242
|
}) => /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs(
|
|
246
|
-
|
|
243
|
+
Ie,
|
|
247
244
|
{
|
|
248
245
|
accept: "image/x-png,image/gif,image/jpeg",
|
|
249
246
|
fileList: o,
|
|
@@ -252,22 +249,22 @@ const He = ({
|
|
|
252
249
|
},
|
|
253
250
|
className: (o.length >= j ? " hide-upload " : "") + " mb-0",
|
|
254
251
|
multiple: !1,
|
|
255
|
-
onPreview: p ? void 0 :
|
|
252
|
+
onPreview: p ? void 0 : E,
|
|
256
253
|
onDrop: (c) => (w(c.dataTransfer.files.item(0)), !1),
|
|
257
254
|
listType: C,
|
|
258
255
|
showUploadList: !p,
|
|
259
256
|
onRemove: (c) => {
|
|
260
|
-
const
|
|
261
|
-
u == null || u(c),
|
|
257
|
+
const O = o.filter((U) => c.uid !== U.uid);
|
|
258
|
+
u == null || u(c), y(O);
|
|
262
259
|
},
|
|
263
260
|
beforeUpload: async (c) => (w(c), !1),
|
|
264
261
|
maxCount: j,
|
|
265
262
|
children: [
|
|
266
|
-
|
|
263
|
+
I && /* @__PURE__ */ t.jsx(be, {}),
|
|
267
264
|
/* @__PURE__ */ t.jsx("div", { className: "d-flex flex-column", children: o.length < j && (C === "picture-circle" ? /* @__PURE__ */ t.jsx(re, {}) : /* @__PURE__ */ t.jsx(
|
|
268
|
-
|
|
265
|
+
B,
|
|
269
266
|
{
|
|
270
|
-
loading:
|
|
267
|
+
loading: R,
|
|
271
268
|
tooltip: g ? void 0 : r,
|
|
272
269
|
size: l,
|
|
273
270
|
icon: f,
|
|
@@ -280,6 +277,6 @@ const He = ({
|
|
|
280
277
|
o.length
|
|
281
278
|
) });
|
|
282
279
|
export {
|
|
283
|
-
|
|
284
|
-
|
|
280
|
+
Se as UploadComponent,
|
|
281
|
+
Je as default
|
|
285
282
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../../../../_virtual/jsx-runtime.cjs"),u=require("antd"),i=require("react"),d=({button:a,disabled:m,...t})=>{const c=i.useMemo(()=>{const{enum:e,translations:o}=t;if(e){const r=[];for(const n of e)r.push({key:n,value:(o==null?void 0:o[n])??n.toUpperCase()});return r}else return t.values},[t]),l=a?u.Radio.Button:u.Radio;return s.jsxRuntimeExports.jsx(u.Form.Item,{...t,children:s.jsxRuntimeExports.jsx(u.Radio.Group,{disabled:m,children:c.map(({key:e,value:o})=>s.jsxRuntimeExports.jsx(l,{value:e,children:o},e))})})},x=i.memo(d);exports.default=x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../../_virtual/jsx-runtime.cjs"),u=require("antd"),o=require("react"),f=require("../select/SelectComponent.cjs"),j=({className:a,onSelect:d,label:p,required:S,name:l,mode:s,items:t})=>{const r=u.Form.useFormInstance(),[n,x]=o.useState(!0);return o.useEffect(()=>{if(t&&n){const e=t.filter(i=>i.alreadySelected).map(i=>i.id);r==null||r.setFieldsValue({[l]:s==="multiple"?e:e==null?void 0:e[0]}),x(!1)}},[n,r,t,s,l]),c.jsxRuntimeExports.jsx(f.default,{required:S,label:p,mode:s,className:a,name:l,onSelect:d,items:t,itemBuilder:e=>c.jsxRuntimeExports.jsx(u.Select.Option,{value:e.id,disabled:e.lock,children:e.label},e.id)})};exports.SelectFieldInReport=j;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),e=require("antd"),n=e.List.Item.Meta,o=e.List.Item,u=({title:s,description:i,children:r})=>t.jsxRuntimeExports.jsxs(o,{className:"",children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(n,{title:s,description:i})}),t.jsxRuntimeExports.jsx("div",{className:"float-right",children:r})]});exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("../../../../_virtual/jsx-runtime.cjs"),x=require("antd"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../../../_virtual/jsx-runtime.cjs"),x=require("antd"),P=require("react"),$=require("react-i18next"),k=require("../../../locale/hooks/translation-constants.cjs"),H=require("../tooltip/TooltipComponent.cjs");function B({label:a,rules:p=[],required:y,placeholder:u,notSearch:E,children:d,readOnly:s,items:o,dropdownRender:R,itemBuilder:w,loading:m,showLoadingInEmptyIndicator:T,nameFieldInArray:f="name",innerRef:_,tooltip:q,filterOption:L,tagRender:N,...n}){const{t:M}=$.useTranslation(k.TRANSLATION_NAMESPACE),I=P.useCallback(e=>{const t=typeof e=="string"||typeof e=="number"?e:e==null?void 0:e.id,c=typeof e=="string"||typeof e=="number"?e:e==null?void 0:e[f];return r.jsxRuntimeExports.jsx("option",{value:t,children:r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:c}})},t)},[f]);return r.jsxRuntimeExports.jsx(x.ConfigProvider,{renderEmpty:T&&m?()=>r.jsxRuntimeExports.jsx(x.Spin,{}):void 0,children:r.jsxRuntimeExports.jsx(H.default,{title:q,children:r.jsxRuntimeExports.jsx(x.Form.Item,{label:a,name:n.name,help:n.help,className:n.className,rules:[...p,{required:y,message:`${a??u??""} ${M("err.validation.required")}`}],children:r.jsxRuntimeExports.jsx(x.Select,{ref:_,loading:m,open:s?!1:void 0,onChange:!s&&n.onChange,allowClear:!s&&n.allowClear,showSearch:!E,className:`max-width ${s?"readOnly":""}`,...n,tagRender:N,placeholder:u??a,filterOption:L??((e,t)=>{var c,h,j,g;try{const i=(j=(h=(c=t==null?void 0:t.children)==null?void 0:c.props)==null?void 0:h.dangerouslySetInnerHTML)==null?void 0:j.__html,O=e.toLowerCase().split(/\s+/),C=(t==null?void 0:t.children)??"",S=typeof C=="string"?C.toLowerCase():typeof i=="string"?i.toLowerCase():"",b=(((g=t==null?void 0:t.value)==null?void 0:g.toString())??"").toLowerCase(),A=S.replace(/\s/g,"");return O.every(l=>S.indexOf(l)>=0||b.indexOf(l)>=0||A.indexOf(l)>=0)}catch(i){return console.log(i),!0}}),dropdownRender:R,children:d===null?void 0:d??(o&&(o==null?void 0:o.map(w??I)))})})})})}exports.default=B;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { ConfigProvider as H, Spin as P, Form as R, Select as b } from "antd";
|
|
3
3
|
import { useCallback as q } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import D from "
|
|
6
|
-
import
|
|
4
|
+
import { useTranslation as B } from "react-i18next";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as D } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import F from "../tooltip/TooltipComponent.js";
|
|
7
7
|
function Q({
|
|
8
8
|
label: m,
|
|
9
9
|
rules: j = [],
|
|
@@ -24,7 +24,7 @@ function Q({
|
|
|
24
24
|
tagRender: A,
|
|
25
25
|
...n
|
|
26
26
|
}) {
|
|
27
|
-
const { t: I } =
|
|
27
|
+
const { t: I } = B(D), M = q(
|
|
28
28
|
(e) => {
|
|
29
29
|
const r = typeof e == "string" || typeof e == "number" ? e : e == null ? void 0 : e.id, c = typeof e == "string" || typeof e == "number" ? e : e == null ? void 0 : e[h];
|
|
30
30
|
return /* @__PURE__ */ t.jsx("option", { value: r, children: /* @__PURE__ */ t.jsx("div", { dangerouslySetInnerHTML: { __html: c } }) }, r);
|
|
@@ -35,7 +35,7 @@ function Q({
|
|
|
35
35
|
H,
|
|
36
36
|
{
|
|
37
37
|
renderEmpty: T && d ? () => /* @__PURE__ */ t.jsx(P, {}) : void 0,
|
|
38
|
-
children: /* @__PURE__ */ t.jsx(
|
|
38
|
+
children: /* @__PURE__ */ t.jsx(F, { title: _, children: /* @__PURE__ */ t.jsx(
|
|
39
39
|
R.Item,
|
|
40
40
|
{
|
|
41
41
|
label: m,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),o=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),o=require("react-show-more-text");;/* empty css */const e=r=>t.jsxRuntimeExports.jsx(o,{...r});exports.ShowMore=e;exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../_virtual/jsx-runtime.cjs"),a=require("antd"),v=require("../../../context/WindowDimension.cjs"),i=require("react"),u=require("react-router"),g=require("react-router-dom"),{Content:q}=a.Layout,E=({positionOfRoute:c,initialKey:s="*",tabs:l,className:x="",mode:d="default"})=>{const[m,p]=i.useState(s),o=u.useNavigate(),j=e=>{o(e)},r=g.useLocation();i.useEffect(()=>{const e=r.pathname.split("/")[c];p(e??""),e||o(s,{replace:!0})},[s,r.pathname,o,c]);const{isDesktop:h}=v.default(),n=d==="side"&&h,b=n?"left":"top",R=n?"d-flex h-100":"";return t.jsxRuntimeExports.jsxs("div",{className:`${x} ${R}`,children:[t.jsxRuntimeExports.jsx(a.Tabs,{type:"card",tabPosition:b,activeKey:m,onChange:j,children:l.map(({key:e,label:f})=>t.jsxRuntimeExports.jsx(a.Tabs.TabPane,{tab:f},e))}),t.jsxRuntimeExports.jsx(q,{className:`max-height ${n?"overflow-auto":""}`,children:t.jsxRuntimeExports.jsx(u.Outlet,{})})]})};exports.TabViewWithRoute=E;
|
|
@@ -2,36 +2,37 @@ import { j as e } from "../../../../_virtual/jsx-runtime.js";
|
|
|
2
2
|
import { Tabs as r, Layout as b } from "antd";
|
|
3
3
|
import v from "../../../context/WindowDimension.js";
|
|
4
4
|
import { useState as g, useEffect as w } from "react";
|
|
5
|
-
import { useNavigate as y,
|
|
6
|
-
|
|
5
|
+
import { useNavigate as y, Outlet as N } from "react-router";
|
|
6
|
+
import { useLocation as P } from "react-router-dom";
|
|
7
|
+
const { Content: S } = b, L = ({
|
|
7
8
|
positionOfRoute: n,
|
|
8
9
|
initialKey: s = "*",
|
|
9
10
|
tabs: i,
|
|
10
11
|
className: m = "",
|
|
11
|
-
mode:
|
|
12
|
+
mode: p = "default"
|
|
12
13
|
}) => {
|
|
13
|
-
const [
|
|
14
|
+
const [l, u] = g(s), o = y(), f = (t) => {
|
|
14
15
|
o(t);
|
|
15
|
-
}, c =
|
|
16
|
+
}, c = P();
|
|
16
17
|
w(() => {
|
|
17
18
|
const t = c.pathname.split("/")[n];
|
|
18
19
|
u(t ?? ""), t || o(s, { replace: !0 });
|
|
19
20
|
}, [s, c.pathname, o, n]);
|
|
20
|
-
const { isDesktop:
|
|
21
|
+
const { isDesktop: d } = v(), a = p === "side" && d, h = a ? "left" : "top", x = a ? "d-flex h-100" : "";
|
|
21
22
|
return /* @__PURE__ */ e.jsxs("div", { className: `${m} ${x}`, children: [
|
|
22
23
|
/* @__PURE__ */ e.jsx(
|
|
23
24
|
r,
|
|
24
25
|
{
|
|
25
26
|
type: "card",
|
|
26
27
|
tabPosition: h,
|
|
27
|
-
activeKey:
|
|
28
|
-
onChange:
|
|
28
|
+
activeKey: l,
|
|
29
|
+
onChange: f,
|
|
29
30
|
children: i.map(({ key: t, label: j }) => /* @__PURE__ */ e.jsx(r.TabPane, { tab: j }, t))
|
|
30
31
|
}
|
|
31
32
|
),
|
|
32
|
-
/* @__PURE__ */ e.jsx(S, { className: `max-height ${a ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e.jsx(
|
|
33
|
+
/* @__PURE__ */ e.jsx(S, { className: `max-height ${a ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e.jsx(N, {}) })
|
|
33
34
|
] });
|
|
34
35
|
};
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
L as TabViewWithRoute
|
|
37
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../../../_virtual/jsx-runtime.cjs"),a=require("antd"),c=require("react");function d({minusHeight:g,onRow:m,count:h=1,onPageSizeChanged:f,pagination:e=!1,rowKey:s="id",columns:t,className:o,scroll:n,...i}){const u=c.useMemo(()=>t.filter(r=>!r.hidden),[t]);return l.jsxRuntimeExports.jsx(a.Table,{className:`custom-scroll ${o}`,style:{width:"100%"},columns:u,rowKey:s,...i,scroll:n||{x:!0},pagination:e&&{...e,hideOnSinglePage:!0,showSizeChanger:!1}})}exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),d=require("antd"),p=require("../../../locale/hooks/translation-constants.cjs"),x=require("react-i18next"),T=({onClick:n,clickable:o,colorFunction:t,translation:i,value:s})=>{var r;const e=t==null?void 0:t(s),{t:u}=x.useTranslation(p.TRANSLATION_NAMESPACE),c=d.Tag;return a.jsxRuntimeExports.jsx(c,{onClick:n,color:e==null?void 0:e.color,icon:e==null?void 0:e.icon,style:{color:e==null?void 0:e.text,cursor:o?"pointer":void 0},children:(r=u(i[s]))==null?void 0:r.toUpperCase()})};exports.default=T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as f } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { Tag as x } from "antd";
|
|
3
3
|
import { TRANSLATION_NAMESPACE as T } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
-
import { useTranslation as A } from "
|
|
4
|
+
import { useTranslation as A } from "react-i18next";
|
|
5
5
|
const C = ({
|
|
6
6
|
onClick: e,
|
|
7
7
|
clickable: m,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),p=require("antd"),x=require("react"),b=require("react-i18next"),h=require("../../../locale/hooks/translation-constants.cjs"),v=require("../tooltip/TooltipComponent.cjs"),w=require("./TextField.cjs"),B=x.forwardRef(function({type:O,required:i,label:t,rules:u=[],placeholder:r,onEnter:m,form:l,nextFocus:f,min:c,moneyField:n,addonAfter:j,minLength:T,defaultValue:q,pattern:E,disabled:R,readOnly:g,onChange:N,value:I,max:$,addonBefore:A,size:M,isInt:d=!1,tooltip:S,...C},P){const{t:a}=b.useTranslation(h.TRANSLATION_NAMESPACE),_=x.useMemo(()=>[...u,{required:i,message:`${t??r??""} ${a("err.validation.required")}`}],[u,t,r,a,i]);return o.jsxRuntimeExports.jsx(v.default,{title:S,children:o.jsxRuntimeExports.jsx(p.Form.Item,{...C,label:t,rules:_,children:o.jsxRuntimeExports.jsx(p.InputNumber,{ref:P,disabled:R,defaultValue:q,value:I,readOnly:g,addonBefore:A,minLength:T,addonAfter:j,step:d?1:void 0,pattern:d?"d*":E,onChange:N,onPressEnter:e=>w.onEnterInternalTextField(e,f,l,m),className:"max-width",min:c===null?void 0:c??0,max:$,type:n?void 0:"number",size:M,formatter:n?e=>{if(e.includes(".")){const s=`${e}`.split(".");return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),s.join(".")}else return`${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")}:void 0,parser:n?e=>e==null?void 0:e.replace(/\$\s?|(,*)/g,""):void 0,placeholder:r??t})})})});exports.default=B;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as s } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { Form as M, InputNumber as P } from "antd";
|
|
3
3
|
import { forwardRef as S, useMemo as F } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import O from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
4
|
+
import { useTranslation as L } from "react-i18next";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as O } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import _ from "../tooltip/TooltipComponent.js";
|
|
7
|
+
import { onEnterInternalTextField as b } from "./TextField.js";
|
|
8
8
|
const K = S(
|
|
9
9
|
function({
|
|
10
10
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -33,7 +33,7 @@ const K = S(
|
|
|
33
33
|
tooltip: h,
|
|
34
34
|
...w
|
|
35
35
|
}, B) {
|
|
36
|
-
const { t: f } =
|
|
36
|
+
const { t: f } = L(O), C = F(
|
|
37
37
|
() => [
|
|
38
38
|
...m,
|
|
39
39
|
{
|
|
@@ -45,7 +45,7 @@ const K = S(
|
|
|
45
45
|
],
|
|
46
46
|
[m, t, o, f, i]
|
|
47
47
|
);
|
|
48
|
-
return /* @__PURE__ */ s.jsx(
|
|
48
|
+
return /* @__PURE__ */ s.jsx(_, { title: h, children: /* @__PURE__ */ s.jsx(M.Item, { ...w, label: t, rules: C, children: /* @__PURE__ */ s.jsx(
|
|
49
49
|
P,
|
|
50
50
|
{
|
|
51
51
|
ref: B,
|
|
@@ -59,7 +59,7 @@ const K = S(
|
|
|
59
59
|
step: d ? 1 : void 0,
|
|
60
60
|
pattern: d ? "d*" : T,
|
|
61
61
|
onChange: g,
|
|
62
|
-
onPressEnter: (r) =>
|
|
62
|
+
onPressEnter: (r) => b(r, u, c, a),
|
|
63
63
|
className: "max-width",
|
|
64
64
|
min: p === null ? void 0 : p ?? 0,
|
|
65
65
|
max: A,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),l=require("../../../util/ValidationUtil.cjs"),u=require("./TextField.cjs"),i=e=>t.jsxRuntimeExports.jsx(u.default,{...e,rules:[...e.rules??[],...l.default.phoneValidation(e.label??e.placeholder??"")]});exports.default=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),i=require("antd"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),i=require("antd"),T=require("react-i18next"),j=require("../../../locale/hooks/translation-constants.cjs"),c=(n,e,t,r)=>{var s;e&&t&&(n.preventDefault(),(s=t==null?void 0:t.getFieldInstance(e))==null||s.focus()),r&&r(n)},A=({required:n,label:e,rules:t=[],placeholder:r,onEnter:s,nextFocus:l,className:o,...u})=>{const{t:d}=T.useTranslation(j.TRANSLATION_NAMESPACE),x=i.Form.useFormInstance();return a.jsxRuntimeExports.jsx(i.Form.Item,{...u,className:o,label:e,rules:[...t,{required:n,message:`${e} ${d("err.validation.required")}`}],children:a.jsxRuntimeExports.jsx(i.Input.TextArea,{...u,className:o,onPressEnter:I=>c(I,l,x,s),placeholder:r??e})})};exports.default=A;exports.onEnterInternalTextField=c;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as a } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { Form as m, Input as x } from "antd";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useTranslation as l } from "react-i18next";
|
|
4
|
+
import { TRANSLATION_NAMESPACE as A } from "../../../locale/hooks/translation-constants.js";
|
|
5
5
|
const I = (r, e, t, n) => {
|
|
6
6
|
var o;
|
|
7
7
|
e && t && (r.preventDefault(), (o = t == null ? void 0 : t.getFieldInstance(e)) == null || o.focus()), n && n(r);
|
|
@@ -15,7 +15,7 @@ const I = (r, e, t, n) => {
|
|
|
15
15
|
className: s,
|
|
16
16
|
...i
|
|
17
17
|
}) => {
|
|
18
|
-
const { t: p } = A
|
|
18
|
+
const { t: p } = l(A), c = m.useFormInstance();
|
|
19
19
|
return /* @__PURE__ */ a.jsx(
|
|
20
20
|
m.Item,
|
|
21
21
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),N=require("@ant-design/icons"),c=require("antd"),O=require("react"),_=require("react-i18next"),w=require("../../../locale/hooks/translation-constants.cjs"),L=require("../tooltip/TooltipComponent.cjs"),d=(t,n,e,i)=>{var s;n&&e&&(t.preventDefault(),(s=e==null?void 0:e.getFieldInstance(n))==null||s.focus()),i&&i(t)},$=({type:t,required:n,label:e,disabled:i,rules:s=[],placeholder:u,onEnter:l,size:x,form:p,addonAfter:m,addonBefore:j,nextFocus:E,autoComplete:I="off",defaultValue:T,readOnly:f,value:g,loading:q,onBlur:R,inputRef:v,status:A,autoFocus:C,onChange:D,tooltip:P,...F})=>{const{t:a}=_.useTranslation(w.TRANSLATION_NAMESPACE),M=O.useMemo(()=>{const r=[...s,{required:n,message:`${e??u??""} ${a("err.validation.required")}`}];return t==="email"&&r.push({type:"email",message:a("err.validation.invalidEmail")}),r},[s,n,e,u,a,t]),S={disabled:i,value:g,readOnly:f,defaultValue:T,autoFocus:C,addonBefore:j,ref:v,onBlur:R,addonAfter:q?o.jsxRuntimeExports.jsx(N.LoadingOutlined,{}):m,status:A,size:x,autoComplete:I,onPressEnter:r=>d(r,E,p,l),type:t,placeholder:u??e},h=t=="password"?c.Input.Password:c.Input;return o.jsxRuntimeExports.jsx(L.default,{title:P,children:o.jsxRuntimeExports.jsx(c.Form.Item,{...F,label:e,rules:M,children:o.jsxRuntimeExports.jsx(h,{...S})})})};exports.default=$;exports.onEnterInternalTextField=d;
|