@kingteza/crud-component 1.0.9 → 1.0.11
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/ShowMoreText.cjs +1 -1
- 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/index10.cjs +1 -1
- package/dist/_virtual/index10.js +2 -5
- package/dist/_virtual/index2.cjs +1 -1
- package/dist/_virtual/index2.js +2 -3
- package/dist/_virtual/index3.cjs +1 -1
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index4.cjs +1 -1
- package/dist/_virtual/index4.js +2 -4
- package/dist/_virtual/index6.cjs +1 -1
- package/dist/_virtual/index6.js +5 -2
- package/dist/_virtual/index7.cjs +1 -1
- package/dist/_virtual/index7.js +5 -2
- package/dist/_virtual/index8.cjs +1 -1
- package/dist/_virtual/index8.js +7 -2
- package/dist/_virtual/index9.cjs +1 -1
- package/dist/_virtual/index9.js +2 -5
- package/dist/_virtual/localeData.cjs +1 -1
- package/dist/_virtual/main.cjs +1 -1
- package/dist/_virtual/papaparse.min.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 +22 -23
- package/dist/src/components/common/DatePicker/TimePicker.cjs +1 -1
- package/dist/src/components/common/DatePicker/TimePicker.js +12 -13
- 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 +27 -28
- package/dist/src/components/common/button/CloneButtonTable.cjs +1 -1
- package/dist/src/components/common/button/CloneButtonTable.js +3 -3
- package/dist/src/components/common/button/DeleteButtonTable.cjs +1 -1
- package/dist/src/components/common/button/DeleteButtonTable.js +7 -7
- package/dist/src/components/common/button/ExportButton.cjs +1 -1
- package/dist/src/components/common/button/ExportButton.js +5 -5
- package/dist/src/components/common/button/HideButtonTable.cjs +1 -1
- package/dist/src/components/common/button/HideButtonTable.js +7 -7
- package/dist/src/components/common/button/ImportButton.cjs +1 -1
- package/dist/src/components/common/button/ImportButton.js +5 -5
- package/dist/src/components/common/button/NewButton.cjs +1 -1
- package/dist/src/components/common/button/NewButton.js +5 -5
- package/dist/src/components/common/button/PrintButton.cjs +1 -1
- package/dist/src/components/common/button/PrintButton.js +5 -5
- package/dist/src/components/common/button/RefreshButton.cjs +1 -1
- package/dist/src/components/common/button/RefreshButton.js +5 -5
- package/dist/src/components/common/button/UnHideButton.cjs +1 -1
- package/dist/src/components/common/button/UnHideButton.js +7 -7
- package/dist/src/components/common/button/UpdateButtonTable.cjs +1 -1
- package/dist/src/components/common/button/UpdateButtonTable.js +5 -5
- package/dist/src/components/common/button/ViewButtonTable.cjs +1 -1
- package/dist/src/components/common/button/ViewButtonTable.js +5 -5
- package/dist/src/components/common/check-box/CheckBox.cjs +1 -1
- package/dist/src/components/common/check-box/CheckBox.js +15 -17
- package/dist/src/components/common/description/DescList.cjs +1 -1
- package/dist/src/components/common/description/DescList.js +1 -1
- package/dist/src/components/common/layout/VerticalSpace.cjs +1 -1
- package/dist/src/components/common/layout/VerticalSpace.js +1 -1
- package/dist/src/components/common/loading/LoadingIndicator.cjs +1 -1
- package/dist/src/components/common/loading/LoadingIndicator.js +8 -9
- package/dist/src/components/common/picker/ImagePicker.cjs +1 -1
- package/dist/src/components/common/picker/ImagePicker.js +40 -42
- package/dist/src/components/common/radio/RadioGroupComponent.cjs +1 -1
- package/dist/src/components/common/radio/RadioGroupComponent.js +16 -17
- package/dist/src/components/common/report/SelectFieldInReport.cjs +1 -1
- package/dist/src/components/common/report/SelectFieldInReport.js +16 -17
- package/dist/src/components/common/select/CustomSelectOption.cjs +1 -1
- package/dist/src/components/common/select/CustomSelectOption.js +1 -1
- package/dist/src/components/common/select/SelectComponent.cjs +1 -1
- package/dist/src/components/common/select/SelectComponent.js +33 -36
- package/dist/src/components/common/show-more/index.cjs +1 -1
- package/dist/src/components/common/tab/TabViewWithRoute.cjs +1 -1
- package/dist/src/components/common/tab/TabViewWithRoute.js +14 -15
- package/dist/src/components/common/table/table.cjs +1 -1
- package/dist/src/components/common/table/table.js +16 -16
- package/dist/src/components/common/tag/StatusTag.cjs +1 -1
- package/dist/src/components/common/tag/StatusTag.js +4 -4
- package/dist/src/components/common/text/index.cjs +1 -1
- package/dist/src/components/common/text/index.js +1 -1
- package/dist/src/components/common/text/title/index.cjs +1 -1
- package/dist/src/components/common/text/title/index.js +1 -1
- package/dist/src/components/common/text-field/NumberField.cjs +1 -1
- package/dist/src/components/common/text-field/NumberField.js +19 -20
- 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 +18 -19
- package/dist/src/components/common/text-field/TextField.cjs +1 -1
- package/dist/src/components/common/text-field/TextField.js +21 -22
- package/dist/src/components/common/tooltip/TooltipComponent.cjs +1 -1
- package/dist/src/components/common/tooltip/TooltipComponent.js +1 -1
- package/dist/src/components/common/wizard/WizardResult.cjs +1 -1
- package/dist/src/components/common/wizard/WizardResult.js +5 -5
- package/dist/src/components/common/wizard/WizardViewForm.cjs +1 -1
- package/dist/src/components/common/wizard/WizardViewForm.js +1 -1
- package/dist/src/components/crud/CrudComponent.cjs +1 -1
- package/dist/src/components/crud/CrudComponent.js +71 -74
- package/dist/src/components/crud/CrudField.cjs +1 -1
- package/dist/src/components/crud/CrudField.js +93 -96
- package/dist/src/components/crud/CrudForm.cjs +1 -1
- package/dist/src/components/crud/CrudForm.js +27 -30
- package/dist/src/components/crud/CrudFormWizard.cjs +1 -1
- package/dist/src/components/crud/CrudFormWizard.js +54 -57
- package/dist/src/components/crud/CrudReportComponent.cjs +3 -3
- package/dist/src/components/crud/CrudReportComponent.js +47 -51
- package/dist/src/components/crud/CrudSearchComponent.cjs +1 -1
- package/dist/src/components/crud/CrudSearchComponent.js +21 -23
- package/dist/src/components/crud/FileCrudField.cjs +1 -1
- package/dist/src/components/crud/FileCrudField.js +29 -31
- package/dist/src/components/crud/ImageCrudField.cjs +1 -1
- package/dist/src/components/crud/ImageCrudField.js +43 -46
- package/dist/src/components/crud/import/CrudImportButton.cjs +1 -1
- package/dist/src/components/crud/import/CrudImportButton.js +7 -7
- package/dist/src/components/crud/import/CrudImportComponent.cjs +2 -2
- package/dist/src/components/crud/import/CrudImportComponent.js +60 -64
- 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 +25 -25
- package/dist/src/components/crud/view/CrudViewerUtil.cjs +1 -1
- package/dist/src/components/crud/view/CrudViewerUtil.js +17 -18
- 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/ValidationUtil.cjs +1 -1
- package/dist/src/util/ValidationUtil.js +1 -1
- package/dist/util/index.cjs +1 -1
- package/package.json +9 -7
- package/dist/_virtual/index11.cjs +0 -1
- package/dist/_virtual/index11.js +0 -7
- package/dist/_virtual/index12.cjs +0 -1
- package/dist/_virtual/index12.js +0 -4
- package/dist/_virtual/index13.cjs +0 -1
- package/dist/_virtual/index13.js +0 -4
- package/dist/_virtual/react-is.development2.cjs +0 -1
- package/dist/_virtual/react-is.development2.js +0 -4
- package/dist/_virtual/react-is.production.min2.cjs +0 -1
- package/dist/_virtual/react-is.production.min2.js +0 -4
- package/dist/common/index.d.ts +0 -2
|
@@ -1,30 +1,28 @@
|
|
|
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 { TRANSLATION_NAMESPACE as
|
|
4
|
+
import { Form as Ce, Modal as Z, Upload as ve } from "antd";
|
|
5
|
+
import M, { useRef as _, useState as h, useEffect as U, useCallback as q, useMemo as ee } from "react";
|
|
6
|
+
import { Cropper as Ie } from "../../../../node_modules/react-cropper/dist/react-cropper.es.js";
|
|
7
|
+
import { TRANSLATION_NAMESPACE as be } from "../../../locale/hooks/translation-constants.js";
|
|
8
8
|
import z from "../button/Button.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import Fe from "../../../../node_modules/@ant-design/icons/es/icons/RotateRightOutlined.js";
|
|
9
|
+
import ye from "../../../util/ImageUtil.js";
|
|
10
|
+
import { useTranslation as Re } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
11
|
+
import Fe from "../../../../node_modules/@ant-design/icons/es/icons/RotateLeftOutlined.js";
|
|
12
|
+
import Ne from "../../../../node_modules/@ant-design/icons/es/icons/RotateRightOutlined.js";
|
|
14
13
|
import re from "../../../../node_modules/@ant-design/icons/es/icons/UploadOutlined.js";
|
|
15
|
-
import Ne from "../../../../node_modules/antd/es/upload/index.js";
|
|
16
14
|
import Ue from "../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
17
|
-
const Se =
|
|
15
|
+
const Se = Ce.Item;
|
|
18
16
|
function te(r) {
|
|
19
|
-
return new Promise((l,
|
|
17
|
+
return new Promise((l, m) => {
|
|
20
18
|
const o = new FileReader();
|
|
21
|
-
o.readAsDataURL(r), o.onload = () => l(o.result), o.onerror = (p) =>
|
|
19
|
+
o.readAsDataURL(r), o.onload = () => l(o.result), o.onerror = (p) => m(p);
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
|
-
const
|
|
22
|
+
const He = ({
|
|
25
23
|
values: r = [],
|
|
26
24
|
required: l,
|
|
27
|
-
buttonType:
|
|
25
|
+
buttonType: m,
|
|
28
26
|
label: o,
|
|
29
27
|
name: p,
|
|
30
28
|
onChange: f,
|
|
@@ -42,9 +40,9 @@ const Ge = ({
|
|
|
42
40
|
listType: F,
|
|
43
41
|
...E
|
|
44
42
|
}) => {
|
|
45
|
-
const [oe, se] = M.useState(""), [ne, ie] = M.useState(""), [ae, $] = M.useState(!1), O = _(), n = _(), [i, k] = h([]), [x, A] = h(), ce = _(), le = () => $(!1),
|
|
43
|
+
const [oe, se] = M.useState(""), [ne, ie] = M.useState(""), [ae, $] = M.useState(!1), O = _(), n = _(), [i, k] = h([]), [x, A] = h(), ce = _(), le = () => $(!1), de = async (e) => {
|
|
46
44
|
!e.url && !e.preview && (e.preview = await te(e.originFileObj)), ie(e.url || e.preview), $(!0), se(e.name);
|
|
47
|
-
}, [T, N] = h(!1),
|
|
45
|
+
}, [T, N] = h(!1), me = () => {
|
|
48
46
|
}, J = (e) => {
|
|
49
47
|
var s;
|
|
50
48
|
(s = n == null ? void 0 : n.current) == null || s.cropper.rotate(e ? -90 : 90);
|
|
@@ -54,13 +52,13 @@ const Ge = ({
|
|
|
54
52
|
}, [i, f]);
|
|
55
53
|
const pe = () => {
|
|
56
54
|
var I;
|
|
57
|
-
const e = (I = n == null ? void 0 : n.current) == null ? void 0 : I.cropper.getCroppedCanvas(), { type: s, size: a, name:
|
|
55
|
+
const e = (I = n == null ? void 0 : n.current) == null ? void 0 : I.cropper.getCroppedCanvas(), { type: s, size: a, name: d, uid: v } = O.current;
|
|
58
56
|
N(!0), e == null || e.toBlob(async (je) => {
|
|
59
|
-
const we = Object.assign(new File([je],
|
|
57
|
+
const we = Object.assign(new File([je], d, { type: s }), {
|
|
60
58
|
uid: v
|
|
61
|
-
}), Q = await
|
|
59
|
+
}), Q = await ye.resizeImage(we), X = await te(Q), Y = {
|
|
62
60
|
url: X,
|
|
63
|
-
name:
|
|
61
|
+
name: d,
|
|
64
62
|
uid: v,
|
|
65
63
|
type: s,
|
|
66
64
|
size: a,
|
|
@@ -77,17 +75,17 @@ const Ge = ({
|
|
|
77
75
|
}), A(void 0);
|
|
78
76
|
}, fe = () => {
|
|
79
77
|
A(void 0), O.current = void 0;
|
|
80
|
-
}, V =
|
|
78
|
+
}, V = q((e) => {
|
|
81
79
|
const s = e;
|
|
82
80
|
if (s) {
|
|
83
81
|
O.current = s;
|
|
84
82
|
const a = new FileReader();
|
|
85
83
|
a.addEventListener("load", () => {
|
|
86
|
-
var
|
|
84
|
+
var d;
|
|
87
85
|
if (typeof a.result == "string") {
|
|
88
86
|
A(a.result);
|
|
89
87
|
const v = localStorage.getItem("cropper.box"), I = v ? JSON.parse(v) : void 0;
|
|
90
|
-
I && ((
|
|
88
|
+
I && ((d = n == null ? void 0 : n.current) == null || d.cropper.setCropBoxData(I)), setTimeout(() => {
|
|
91
89
|
K();
|
|
92
90
|
}, 100);
|
|
93
91
|
}
|
|
@@ -100,7 +98,7 @@ const Ge = ({
|
|
|
100
98
|
k(e);
|
|
101
99
|
}
|
|
102
100
|
}, [r]);
|
|
103
|
-
const { t: P } =
|
|
101
|
+
const { t: P } = Re(be), ue = ee(
|
|
104
102
|
() => l ? {
|
|
105
103
|
required: l,
|
|
106
104
|
validator: (e, s, a) => {
|
|
@@ -108,14 +106,14 @@ const Ge = ({
|
|
|
108
106
|
}
|
|
109
107
|
} : void 0,
|
|
110
108
|
[l, x, i == null ? void 0 : i.length, o, P]
|
|
111
|
-
), W = j ?? P("message.fileUploadMessage2"), H =
|
|
109
|
+
), W = j ?? P("message.fileUploadMessage2"), H = ee(
|
|
112
110
|
() => /* @__PURE__ */ t.jsx(
|
|
113
111
|
Oe,
|
|
114
112
|
{
|
|
115
113
|
showLoadingIndicator: T,
|
|
116
114
|
_buttonTitle: W,
|
|
117
115
|
buttonSize: u,
|
|
118
|
-
buttonType:
|
|
116
|
+
buttonType: m,
|
|
119
117
|
fileList: i,
|
|
120
118
|
hidePreview: w,
|
|
121
119
|
icon: b,
|
|
@@ -125,7 +123,7 @@ const Ge = ({
|
|
|
125
123
|
onChangeFile: V,
|
|
126
124
|
onRemove: R,
|
|
127
125
|
showButtonText: g,
|
|
128
|
-
handlePreview:
|
|
126
|
+
handlePreview: de,
|
|
129
127
|
setFileList: k
|
|
130
128
|
}
|
|
131
129
|
),
|
|
@@ -133,7 +131,7 @@ const Ge = ({
|
|
|
133
131
|
T,
|
|
134
132
|
W,
|
|
135
133
|
u,
|
|
136
|
-
|
|
134
|
+
m,
|
|
137
135
|
i,
|
|
138
136
|
w,
|
|
139
137
|
b,
|
|
@@ -155,12 +153,12 @@ const Ge = ({
|
|
|
155
153
|
}, [D]), U(() => {
|
|
156
154
|
x || (L(0), G(0));
|
|
157
155
|
}, [x]);
|
|
158
|
-
const K =
|
|
156
|
+
const K = q(async () => {
|
|
159
157
|
var s;
|
|
160
158
|
const e = (s = n == null ? void 0 : n.current) == null ? void 0 : s.cropper;
|
|
161
159
|
if (e) {
|
|
162
|
-
const { width: a, height:
|
|
163
|
-
he(e.getCropBoxData()), L(a), G(
|
|
160
|
+
const { width: a, height: d } = e.getCroppedCanvas();
|
|
161
|
+
he(e.getCropBoxData()), L(a), G(d);
|
|
164
162
|
}
|
|
165
163
|
}, []);
|
|
166
164
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -176,7 +174,7 @@ const Ge = ({
|
|
|
176
174
|
}
|
|
177
175
|
),
|
|
178
176
|
/* @__PURE__ */ t.jsxs(
|
|
179
|
-
|
|
177
|
+
Z,
|
|
180
178
|
{
|
|
181
179
|
open: !!x,
|
|
182
180
|
maskClosable: !1,
|
|
@@ -185,14 +183,14 @@ const Ge = ({
|
|
|
185
183
|
onCancel: fe,
|
|
186
184
|
children: [
|
|
187
185
|
/* @__PURE__ */ t.jsx(
|
|
188
|
-
|
|
186
|
+
Ie,
|
|
189
187
|
{
|
|
190
188
|
ref: n,
|
|
191
189
|
src: x,
|
|
192
190
|
cropmove: K,
|
|
193
191
|
viewMode: 1,
|
|
194
192
|
aspectRatio: S,
|
|
195
|
-
cropend: () =>
|
|
193
|
+
cropend: () => me()
|
|
196
194
|
}
|
|
197
195
|
),
|
|
198
196
|
/* @__PURE__ */ t.jsx("p", { className: "text-center", children: [ge, xe].join(" ⨉ ") }),
|
|
@@ -201,7 +199,7 @@ const Ge = ({
|
|
|
201
199
|
z,
|
|
202
200
|
{
|
|
203
201
|
size: "large",
|
|
204
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
202
|
+
icon: /* @__PURE__ */ t.jsx(Fe, {}),
|
|
205
203
|
onClick: () => J(!0)
|
|
206
204
|
}
|
|
207
205
|
),
|
|
@@ -209,7 +207,7 @@ const Ge = ({
|
|
|
209
207
|
z,
|
|
210
208
|
{
|
|
211
209
|
size: "large",
|
|
212
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
210
|
+
icon: /* @__PURE__ */ t.jsx(Ne, {}),
|
|
213
211
|
onClick: () => J(!1)
|
|
214
212
|
}
|
|
215
213
|
)
|
|
@@ -218,7 +216,7 @@ const Ge = ({
|
|
|
218
216
|
}
|
|
219
217
|
),
|
|
220
218
|
/* @__PURE__ */ t.jsx(
|
|
221
|
-
|
|
219
|
+
Z,
|
|
222
220
|
{
|
|
223
221
|
open: ae,
|
|
224
222
|
title: oe,
|
|
@@ -231,7 +229,7 @@ const Ge = ({
|
|
|
231
229
|
}, Oe = ({
|
|
232
230
|
_buttonTitle: r,
|
|
233
231
|
buttonSize: l,
|
|
234
|
-
buttonType:
|
|
232
|
+
buttonType: m,
|
|
235
233
|
fileList: o,
|
|
236
234
|
hidePreview: p,
|
|
237
235
|
icon: f,
|
|
@@ -245,7 +243,7 @@ const Ge = ({
|
|
|
245
243
|
showLoadingIndicator: y,
|
|
246
244
|
listType: C = "picture"
|
|
247
245
|
}) => /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs(
|
|
248
|
-
|
|
246
|
+
ve,
|
|
249
247
|
{
|
|
250
248
|
accept: "image/x-png,image/gif,image/jpeg",
|
|
251
249
|
fileList: o,
|
|
@@ -273,7 +271,7 @@ const Ge = ({
|
|
|
273
271
|
tooltip: g ? void 0 : r,
|
|
274
272
|
size: l,
|
|
275
273
|
icon: f,
|
|
276
|
-
type: g ?
|
|
274
|
+
type: g ? m : "text",
|
|
277
275
|
children: g ? r : void 0
|
|
278
276
|
}
|
|
279
277
|
)) })
|
|
@@ -283,5 +281,5 @@ const Ge = ({
|
|
|
283
281
|
) });
|
|
284
282
|
export {
|
|
285
283
|
Oe as UploadComponent,
|
|
286
|
-
|
|
284
|
+
He as default
|
|
287
285
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const s=require("../../../../_virtual/jsx-runtime.cjs"),n=require("antd"),i=require("react"),l=({button:m,disabled:c,...t})=>{const a=i.useMemo(()=>{const{enum:e,translations:o}=t;if(e){const r=[];for(const u of e)r.push({key:u,value:(o==null?void 0:o[u])??u.toUpperCase()});return r}else return t.values},[t]),x=m?n.Radio.Button:n.Radio;return s.jsxRuntimeExports.jsx(n.Form.Item,{...t,children:s.jsxRuntimeExports.jsx(n.Radio.Group,{disabled:c,children:a.map(({key:e,value:o})=>s.jsxRuntimeExports.jsx(x,{value:e,children:o},e))})})},R=i.memo(l);module.exports=R;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return u;
|
|
1
|
+
import { j as u } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Radio as m, Form as i } from "antd";
|
|
3
|
+
import { memo as p, useMemo as d } from "react";
|
|
4
|
+
const f = ({ button: s, disabled: a, ...n }) => {
|
|
5
|
+
const l = d(() => {
|
|
6
|
+
const { enum: e, translations: o } = n;
|
|
7
|
+
if (e) {
|
|
8
|
+
const r = [];
|
|
9
|
+
for (const t of e)
|
|
10
|
+
r.push({ key: t, value: (o == null ? void 0 : o[t]) ?? t.toUpperCase() });
|
|
11
|
+
return r;
|
|
13
12
|
} else
|
|
14
|
-
return
|
|
15
|
-
}, [
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
},
|
|
13
|
+
return n.values;
|
|
14
|
+
}, [n]), c = s ? m.Button : m;
|
|
15
|
+
return /* @__PURE__ */ u.jsx(i.Item, { ...n, children: /* @__PURE__ */ u.jsx(m.Group, { disabled: a, children: l.map(({ key: e, value: o }) => /* @__PURE__ */ u.jsx(c, { value: e, children: o }, e)) }) });
|
|
16
|
+
}, h = p(f);
|
|
18
17
|
export {
|
|
19
|
-
|
|
18
|
+
h as default
|
|
20
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../../_virtual/jsx-runtime.cjs"),o=require("antd"),u=require("react"),j=require("../select/SelectComponent.cjs"),F=({className:a,onSelect:d,label:p,required:S,name:s,mode:l,items:t})=>{const r=o.Form.useFormInstance(),[n,x]=u.useState(!0);return u.useEffect(()=>{if(t&&n){const e=t.filter(i=>i.alreadySelected).map(i=>i.id);r==null||r.setFieldsValue({[s]:l==="multiple"?e:e==null?void 0:e[0]}),x(!1)}},[n,r,t,l,s]),c.jsxRuntimeExports.jsx(j,{required:S,label:p,mode:l,className:a,name:s,onSelect:d,items:t,itemBuilder:e=>c.jsxRuntimeExports.jsx(o.Select.Option,{value:e.id,disabled:e.lock,children:e.label},e.id)})};exports.SelectFieldInReport=F;
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import { j as c } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import x from "
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
return d(() => {
|
|
2
|
+
import { Form as f, Select as m } from "antd";
|
|
3
|
+
import { useState as x, useEffect as F } from "react";
|
|
4
|
+
import S from "../select/SelectComponent.js";
|
|
5
|
+
const R = ({ className: n, onSelect: p, label: u, required: a, name: l, mode: o, items: e }) => {
|
|
6
|
+
const r = f.useFormInstance(), [s, d] = x(!0);
|
|
7
|
+
return F(() => {
|
|
9
8
|
if (e && s) {
|
|
10
9
|
const t = e.filter((i) => i.alreadySelected).map((i) => i.id);
|
|
11
10
|
r == null || r.setFieldsValue({
|
|
12
|
-
[
|
|
13
|
-
}),
|
|
11
|
+
[l]: o === "multiple" ? t : t == null ? void 0 : t[0]
|
|
12
|
+
}), d(!1);
|
|
14
13
|
}
|
|
15
|
-
}, [s, r, e,
|
|
16
|
-
|
|
14
|
+
}, [s, r, e, o, l]), /* @__PURE__ */ c.jsx(
|
|
15
|
+
S,
|
|
17
16
|
{
|
|
18
17
|
required: a,
|
|
19
18
|
label: u,
|
|
20
|
-
mode:
|
|
21
|
-
className:
|
|
22
|
-
name:
|
|
23
|
-
onSelect:
|
|
19
|
+
mode: o,
|
|
20
|
+
className: n,
|
|
21
|
+
name: l,
|
|
22
|
+
onSelect: p,
|
|
24
23
|
items: e,
|
|
25
|
-
itemBuilder: (t) => /* @__PURE__ */ c.jsx(
|
|
24
|
+
itemBuilder: (t) => /* @__PURE__ */ c.jsx(m.Option, { value: t.id, disabled: t.lock, children: t.label }, t.id)
|
|
26
25
|
}
|
|
27
26
|
);
|
|
28
27
|
};
|
|
29
28
|
export {
|
|
30
|
-
|
|
29
|
+
R as SelectFieldInReport
|
|
31
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),s=require("antd"),r=s.List.Item.Meta,x=s.List.Item,o=({title:e,description:i,children:n})=>t.jsxRuntimeExports.jsxs(x,{className:"",children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(r,{title:e,description:i})}),t.jsxRuntimeExports.jsx("div",{className:"float-right",children:n})]});module.exports=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const r=require("../../../../_virtual/jsx-runtime.cjs"),x=require("antd"),k=require("react"),H=require("../../../locale/hooks/translation-constants.cjs"),P=require("../tooltip/TooltipComponent.cjs"),b=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs");function B({label:a,rules:E=[],required:R,placeholder:m,notSearch:S,children:u,readOnly:n,items:o,dropdownRender:y,itemBuilder:w,loading:d,showLoadingInEmptyIndicator:T,nameFieldInArray:h="name",innerRef:q,tooltip:L,filterOption:N,tagRender:_,...s}){const{t:A}=b.useTranslation(H.TRANSLATION_NAMESPACE),I=k.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[h];return r.jsxRuntimeExports.jsx("option",{value:t,children:r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:c}})},t)},[h]);return r.jsxRuntimeExports.jsx(x.ConfigProvider,{renderEmpty:T&&d?()=>r.jsxRuntimeExports.jsx(x.Spin,{}):void 0,children:r.jsxRuntimeExports.jsx(P,{title:L,children:r.jsxRuntimeExports.jsx(x.Form.Item,{label:a,name:s.name,help:s.help,className:s.className,rules:[...E,{required:R,message:`${a??m??""} ${A("err.validation.required")}`}],children:r.jsxRuntimeExports.jsx(x.Select,{ref:q,loading:d,open:n?!1:void 0,onChange:!n&&s.onChange,allowClear:!n&&s.allowClear,showSearch:!S,className:`max-width ${n?"readOnly":""}`,...s,tagRender:_,placeholder:m??a,filterOption:N??((e,t)=>{var c,j,f,C;try{const i=(f=(j=(c=t==null?void 0:t.children)==null?void 0:c.props)==null?void 0:j.dangerouslySetInnerHTML)==null?void 0:f.__html,M=e.toLowerCase().split(/\s+/),g=(t==null?void 0:t.children)??"",p=typeof g=="string"?g.toLowerCase():typeof i=="string"?i.toLowerCase():"",O=(((C=t==null?void 0:t.value)==null?void 0:C.toString())??"").toLowerCase(),$=p.replace(/\s/g,"");return M.every(l=>p.indexOf(l)>=0||O.indexOf(l)>=0||$.indexOf(l)>=0)}catch(i){return console.log(i),!0}}),dropdownRender:y,children:u===null?void 0:u??(o&&(o==null?void 0:o.map(w??I)))})})})})}module.exports=B;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { TRANSLATION_NAMESPACE as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import F from "../../../../node_modules/antd/es/select/index.js";
|
|
10
|
-
function Y({
|
|
11
|
-
label: c,
|
|
2
|
+
import { ConfigProvider as H, Spin as P, Form as R, Select as b } from "antd";
|
|
3
|
+
import { useCallback as q } from "react";
|
|
4
|
+
import { TRANSLATION_NAMESPACE as B } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
import D from "../tooltip/TooltipComponent.js";
|
|
6
|
+
import { useTranslation as F } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
7
|
+
function Q({
|
|
8
|
+
label: m,
|
|
12
9
|
rules: j = [],
|
|
13
10
|
required: y,
|
|
14
11
|
placeholder: l,
|
|
15
12
|
notSearch: w,
|
|
16
13
|
children: a,
|
|
17
|
-
readOnly:
|
|
14
|
+
readOnly: o,
|
|
18
15
|
items: s,
|
|
19
16
|
dropdownRender: u,
|
|
20
17
|
itemBuilder: L,
|
|
@@ -25,52 +22,52 @@ function Y({
|
|
|
25
22
|
tooltip: _,
|
|
26
23
|
filterOption: E,
|
|
27
24
|
tagRender: A,
|
|
28
|
-
...
|
|
25
|
+
...n
|
|
29
26
|
}) {
|
|
30
|
-
const { t: I } =
|
|
31
|
-
(
|
|
32
|
-
const
|
|
33
|
-
return /* @__PURE__ */ t.jsx("option", { value:
|
|
27
|
+
const { t: I } = F(B), M = q(
|
|
28
|
+
(e) => {
|
|
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
|
+
return /* @__PURE__ */ t.jsx("option", { value: r, children: /* @__PURE__ */ t.jsx("div", { dangerouslySetInnerHTML: { __html: c } }) }, r);
|
|
34
31
|
},
|
|
35
32
|
[h]
|
|
36
33
|
);
|
|
37
34
|
return /* @__PURE__ */ t.jsx(
|
|
38
|
-
|
|
35
|
+
H,
|
|
39
36
|
{
|
|
40
|
-
renderEmpty: T && d ? () => /* @__PURE__ */ t.jsx(
|
|
41
|
-
children: /* @__PURE__ */ t.jsx(
|
|
42
|
-
|
|
37
|
+
renderEmpty: T && d ? () => /* @__PURE__ */ t.jsx(P, {}) : void 0,
|
|
38
|
+
children: /* @__PURE__ */ t.jsx(D, { title: _, children: /* @__PURE__ */ t.jsx(
|
|
39
|
+
R.Item,
|
|
43
40
|
{
|
|
44
|
-
label:
|
|
45
|
-
name:
|
|
46
|
-
help:
|
|
47
|
-
className:
|
|
41
|
+
label: m,
|
|
42
|
+
name: n.name,
|
|
43
|
+
help: n.help,
|
|
44
|
+
className: n.className,
|
|
48
45
|
rules: [
|
|
49
46
|
...j,
|
|
50
47
|
{
|
|
51
48
|
required: y,
|
|
52
|
-
message: `${
|
|
49
|
+
message: `${m ?? l ?? ""} ${I(
|
|
53
50
|
"err.validation.required"
|
|
54
51
|
)}`
|
|
55
52
|
}
|
|
56
53
|
],
|
|
57
54
|
children: /* @__PURE__ */ t.jsx(
|
|
58
|
-
|
|
55
|
+
b,
|
|
59
56
|
{
|
|
60
57
|
ref: N,
|
|
61
58
|
loading: d,
|
|
62
|
-
open:
|
|
63
|
-
onChange: !
|
|
64
|
-
allowClear: !
|
|
59
|
+
open: o ? !1 : void 0,
|
|
60
|
+
onChange: !o && n.onChange,
|
|
61
|
+
allowClear: !o && n.allowClear,
|
|
65
62
|
showSearch: !w,
|
|
66
|
-
className: `max-width ${
|
|
67
|
-
...
|
|
63
|
+
className: `max-width ${o ? "readOnly" : ""}`,
|
|
64
|
+
...n,
|
|
68
65
|
tagRender: A,
|
|
69
|
-
placeholder: l ??
|
|
70
|
-
filterOption: E ?? ((
|
|
71
|
-
var
|
|
66
|
+
placeholder: l ?? m,
|
|
67
|
+
filterOption: E ?? ((e, r) => {
|
|
68
|
+
var c, x, C, g;
|
|
72
69
|
try {
|
|
73
|
-
const i = (
|
|
70
|
+
const i = (C = (x = (c = r == null ? void 0 : r.children) == null ? void 0 : c.props) == null ? void 0 : x.dangerouslySetInnerHTML) == null ? void 0 : C.__html, O = e.toLowerCase().split(/\s+/), p = (r == null ? void 0 : r.children) ?? "", S = typeof p == "string" ? p.toLowerCase() : typeof i == "string" ? i.toLowerCase() : "", $ = (((g = r == null ? void 0 : r.value) == null ? void 0 : g.toString()) ?? "").toLowerCase(), k = S.replace(/\s/g, "");
|
|
74
71
|
return O.every(
|
|
75
72
|
(f) => S.indexOf(f) >= 0 || $.indexOf(f) >= 0 || k.indexOf(f) >= 0
|
|
76
73
|
);
|
|
@@ -88,5 +85,5 @@ function Y({
|
|
|
88
85
|
);
|
|
89
86
|
}
|
|
90
87
|
export {
|
|
91
|
-
|
|
88
|
+
Q as default
|
|
92
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),o=require("../../../../_virtual/ShowMoreText.cjs");;/* empty css */const e=r=>t.jsxRuntimeExports.jsx(o
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),o=require("../../../../_virtual/ShowMoreText.cjs");;/* 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 e=require("../../../../_virtual/jsx-runtime.cjs"),c=require("antd"),f=require("../../../context/WindowDimension.cjs"),u=require("react"),a=require("../../../../node_modules/react-router/dist/development/chunk-K6AXKMTT.cjs"),{Content:v}=c.Layout,g=({positionOfRoute:i,initialKey:s="*",tabs:x,className:l="",mode:d="default"})=>{const[m,p]=u.useState(s),n=a.useNavigate(),h=t=>{n(t)},r=a.useLocation();u.useEffect(()=>{const t=r.pathname.split("/")[i];p(t??""),t||n(s,{replace:!0})},[s,r.pathname,n,i]);const{isDesktop:j}=f(),o=d==="side"&&j,b=o?"left":"top",R=o?"d-flex h-100":"";return e.jsxRuntimeExports.jsxs("div",{className:`${l} ${R}`,children:[e.jsxRuntimeExports.jsx(c.Tabs,{type:"card",tabPosition:b,activeKey:m,onChange:h,children:x.map(({key:t,label:T})=>e.jsxRuntimeExports.jsx(c.Tabs.TabPane,{tab:T},t))}),e.jsxRuntimeExports.jsx(v,{className:`max-height ${o?"overflow-auto":""}`,children:e.jsxRuntimeExports.jsx(a.Outlet,{})})]})};exports.TabViewWithRoute=g;
|
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
import { j as e } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import b from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const { Content: S } = P, L = ({
|
|
2
|
+
import { Tabs as r, Layout as b } from "antd";
|
|
3
|
+
import v from "../../../context/WindowDimension.js";
|
|
4
|
+
import { useState as g, useEffect as w } from "react";
|
|
5
|
+
import { useNavigate as y, useLocation as N, Outlet as P } from "../../../../node_modules/react-router/dist/development/chunk-K6AXKMTT.js";
|
|
6
|
+
const { Content: S } = b, E = ({
|
|
8
7
|
positionOfRoute: n,
|
|
9
8
|
initialKey: s = "*",
|
|
10
9
|
tabs: i,
|
|
11
10
|
className: m = "",
|
|
12
|
-
mode:
|
|
11
|
+
mode: l = "default"
|
|
13
12
|
}) => {
|
|
14
|
-
const [
|
|
13
|
+
const [p, u] = g(s), o = y(), d = (t) => {
|
|
15
14
|
o(t);
|
|
16
|
-
}, c =
|
|
17
|
-
|
|
15
|
+
}, c = N();
|
|
16
|
+
w(() => {
|
|
18
17
|
const t = c.pathname.split("/")[n];
|
|
19
18
|
u(t ?? ""), t || o(s, { replace: !0 });
|
|
20
19
|
}, [s, c.pathname, o, n]);
|
|
21
|
-
const { isDesktop:
|
|
20
|
+
const { isDesktop: f } = v(), a = l === "side" && f, h = a ? "left" : "top", x = a ? "d-flex h-100" : "";
|
|
22
21
|
return /* @__PURE__ */ e.jsxs("div", { className: `${m} ${x}`, children: [
|
|
23
22
|
/* @__PURE__ */ e.jsx(
|
|
24
23
|
r,
|
|
25
24
|
{
|
|
26
25
|
type: "card",
|
|
27
26
|
tabPosition: h,
|
|
28
|
-
activeKey:
|
|
29
|
-
onChange:
|
|
27
|
+
activeKey: p,
|
|
28
|
+
onChange: d,
|
|
30
29
|
children: i.map(({ key: t, label: j }) => /* @__PURE__ */ e.jsx(r.TabPane, { tab: j }, t))
|
|
31
30
|
}
|
|
32
31
|
),
|
|
33
|
-
/* @__PURE__ */ e.jsx(S, { className: `max-height ${a ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e.jsx(
|
|
32
|
+
/* @__PURE__ */ e.jsx(S, { className: `max-height ${a ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e.jsx(P, {}) })
|
|
34
33
|
] });
|
|
35
34
|
};
|
|
36
35
|
export {
|
|
37
|
-
|
|
36
|
+
E as TabViewWithRoute
|
|
38
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const a=require("../../../../_virtual/jsx-runtime.cjs"),c=require("antd"),l=require("react");function d({minusHeight:h,onRow:m,count:g=1,onPageSizeChanged:x,pagination:e=!1,rowKey:n="id",columns:t,className:o,scroll:s,...i}){const r=l.useMemo(()=>t.filter(u=>!u.hidden),[t]);return a.jsxRuntimeExports.jsx(c.Table,{className:`custom-scroll ${o}`,style:{width:"100%"},columns:r,rowKey:n,...i,scroll:s||{x:!0},pagination:e&&{...e,hideOnSinglePage:!0,showSizeChanger:!1}})}module.exports=d;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { j as l } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import u from "
|
|
4
|
-
function
|
|
5
|
-
minusHeight:
|
|
6
|
-
onRow:
|
|
7
|
-
count:
|
|
2
|
+
import { Table as m } from "antd";
|
|
3
|
+
import { useMemo as u } from "react";
|
|
4
|
+
function j({
|
|
5
|
+
minusHeight: f,
|
|
6
|
+
onRow: c,
|
|
7
|
+
count: d = 1,
|
|
8
8
|
onPageSizeChanged: h,
|
|
9
9
|
pagination: e = !1,
|
|
10
|
-
rowKey:
|
|
10
|
+
rowKey: s = "id",
|
|
11
11
|
columns: o,
|
|
12
|
-
className:
|
|
12
|
+
className: n,
|
|
13
13
|
scroll: t,
|
|
14
|
-
...
|
|
14
|
+
...i
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
16
|
+
const r = u(() => o.filter((a) => !a.hidden), [o]);
|
|
17
17
|
return /* @__PURE__ */ l.jsx(
|
|
18
|
-
|
|
18
|
+
m,
|
|
19
19
|
{
|
|
20
|
-
className: `custom-scroll ${
|
|
20
|
+
className: `custom-scroll ${n}`,
|
|
21
21
|
style: { width: "100%" },
|
|
22
|
-
columns:
|
|
23
|
-
rowKey:
|
|
24
|
-
...
|
|
22
|
+
columns: r,
|
|
23
|
+
rowKey: s,
|
|
24
|
+
...i,
|
|
25
25
|
scroll: t || {
|
|
26
26
|
// y: `calc(100vh - ${minusHeight ?? 0}px)`,
|
|
27
27
|
x: !0
|
|
@@ -36,5 +36,5 @@ function w({
|
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
j as default
|
|
40
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const a=require("../../../../_virtual/jsx-runtime.cjs"),p=require("antd"),x=require("../../../locale/hooks/translation-constants.cjs"),T=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),q=({onClick:n,clickable:o,colorFunction:s,translation:i,value:e})=>{var r;const t=s==null?void 0:s(e),{t:c}=T.useTranslation(x.TRANSLATION_NAMESPACE),u=p.Tag;return a.jsxRuntimeExports.jsx(u,{onClick:n,color:t==null?void 0:t.color,icon:t==null?void 0:t.icon,style:{color:t==null?void 0:t.text,cursor:o?"pointer":void 0},children:(r=c(i[e]))==null?void 0:r.toUpperCase()})};module.exports=q;
|