@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,7 +1,7 @@
|
|
|
1
1
|
import { j as f } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import A from "../../../../node_modules/
|
|
2
|
+
import { Tag as x } from "antd";
|
|
3
|
+
import { TRANSLATION_NAMESPACE as T } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useTranslation as A } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
5
5
|
const C = ({
|
|
6
6
|
onClick: e,
|
|
7
7
|
clickable: m,
|
|
@@ -10,7 +10,7 @@ const C = ({
|
|
|
10
10
|
value: r
|
|
11
11
|
}) => {
|
|
12
12
|
var s;
|
|
13
|
-
const t = o == null ? void 0 : o(r), { t: i } = T
|
|
13
|
+
const t = o == null ? void 0 : o(r), { t: i } = A(T), n = x;
|
|
14
14
|
return /* @__PURE__ */ f.jsx(
|
|
15
15
|
n,
|
|
16
16
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("antd"),{Text:t}=e.Typography;exports.Text=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("antd"),{Title:t}=e.Typography;exports.Title=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const o=require("../../../../_virtual/jsx-runtime.cjs"),a=require("antd"),x=require("react"),M=require("../../../locale/hooks/translation-constants.cjs"),P=require("../tooltip/TooltipComponent.cjs"),S=require("./TextField.cjs"),L=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),O=x.forwardRef(function({type:b,required:i,label:e,rules:c=[],placeholder:r,onEnter:m,form:j,nextFocus:T,min:u,moneyField:s,addonAfter:q,minLength:E,defaultValue:R,pattern:f,disabled:l,readOnly:N,onChange:$,value:g,max:A,addonBefore:I,size:C,isInt:d=!1,tooltip:h,...w},B){const{t:p}=L.useTranslation(M.TRANSLATION_NAMESPACE),F=x.useMemo(()=>[...c,{required:i,message:`${e??r??""} ${p("err.validation.required")}`}],[c,e,r,p,i]);return o.jsxRuntimeExports.jsx(P,{title:h,children:o.jsxRuntimeExports.jsx(a.Form.Item,{...w,label:e,rules:F,children:o.jsxRuntimeExports.jsx(a.InputNumber,{ref:B,disabled:l,defaultValue:R,value:g,readOnly:N,addonBefore:I,minLength:E,addonAfter:q,step:d?1:void 0,pattern:d?"d*":f,onChange:$,onPressEnter:t=>S.onEnterInternalTextField(t,T,j,m),className:"max-width",min:u===null?void 0:u??0,max:A,type:s?void 0:"number",size:C,formatter:s?t=>{if(t.includes(".")){const n=`${t}`.split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),n.join(".")}else return`${t}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")}:void 0,parser:s?t=>t==null?void 0:t.replace(/\$\s?|(,*)/g,""):void 0,placeholder:r??e})})})});module.exports=O;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { j as s } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { TRANSLATION_NAMESPACE as
|
|
5
|
-
import
|
|
6
|
-
import { onEnterInternalTextField as
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
const Q = M(
|
|
2
|
+
import { Form as M, InputNumber as P } from "antd";
|
|
3
|
+
import { forwardRef as S, useMemo as F } from "react";
|
|
4
|
+
import { TRANSLATION_NAMESPACE as L } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
import O from "../tooltip/TooltipComponent.js";
|
|
6
|
+
import { onEnterInternalTextField as _ } from "./TextField.js";
|
|
7
|
+
import { useTranslation as b } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
8
|
+
const K = S(
|
|
10
9
|
function({
|
|
11
10
|
// eslint-disable-next-line no-unused-vars
|
|
12
|
-
type:
|
|
11
|
+
type: q,
|
|
13
12
|
required: i,
|
|
14
13
|
label: t,
|
|
15
14
|
rules: m = [],
|
|
@@ -20,9 +19,9 @@ const Q = M(
|
|
|
20
19
|
min: p,
|
|
21
20
|
moneyField: e,
|
|
22
21
|
addonAfter: x,
|
|
23
|
-
minLength:
|
|
24
|
-
defaultValue:
|
|
25
|
-
pattern:
|
|
22
|
+
minLength: j,
|
|
23
|
+
defaultValue: N,
|
|
24
|
+
pattern: T,
|
|
26
25
|
disabled: E,
|
|
27
26
|
readOnly: $,
|
|
28
27
|
onChange: g,
|
|
@@ -34,7 +33,7 @@ const Q = M(
|
|
|
34
33
|
tooltip: h,
|
|
35
34
|
...w
|
|
36
35
|
}, B) {
|
|
37
|
-
const { t: f } =
|
|
36
|
+
const { t: f } = b(L), C = F(
|
|
38
37
|
() => [
|
|
39
38
|
...m,
|
|
40
39
|
{
|
|
@@ -46,21 +45,21 @@ const Q = M(
|
|
|
46
45
|
],
|
|
47
46
|
[m, t, o, f, i]
|
|
48
47
|
);
|
|
49
|
-
return /* @__PURE__ */ s.jsx(
|
|
50
|
-
|
|
48
|
+
return /* @__PURE__ */ s.jsx(O, { title: h, children: /* @__PURE__ */ s.jsx(M.Item, { ...w, label: t, rules: C, children: /* @__PURE__ */ s.jsx(
|
|
49
|
+
P,
|
|
51
50
|
{
|
|
52
51
|
ref: B,
|
|
53
52
|
disabled: E,
|
|
54
|
-
defaultValue:
|
|
53
|
+
defaultValue: N,
|
|
55
54
|
value: l,
|
|
56
55
|
readOnly: $,
|
|
57
56
|
addonBefore: I,
|
|
58
|
-
minLength:
|
|
57
|
+
minLength: j,
|
|
59
58
|
addonAfter: x,
|
|
60
59
|
step: d ? 1 : void 0,
|
|
61
|
-
pattern: d ? "d*" :
|
|
60
|
+
pattern: d ? "d*" : T,
|
|
62
61
|
onChange: g,
|
|
63
|
-
onPressEnter: (r) =>
|
|
62
|
+
onPressEnter: (r) => _(r, u, c, a),
|
|
64
63
|
className: "max-width",
|
|
65
64
|
min: p === null ? void 0 : p ?? 0,
|
|
66
65
|
max: A,
|
|
@@ -80,5 +79,5 @@ const Q = M(
|
|
|
80
79
|
}
|
|
81
80
|
);
|
|
82
81
|
export {
|
|
83
|
-
|
|
82
|
+
K as default
|
|
84
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),i=require("../../../util/ValidationUtil.cjs"),l=require("./TextField.cjs"),r=e=>t.jsxRuntimeExports.jsx(l.default,{...e,rules:[...e.rules??[],...i.phoneValidation(e.label??e.placeholder??"")]});module.exports=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),i=require("antd"),I=require("../../../locale/hooks/translation-constants.cjs"),j=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),l=(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:c,className:o,...u})=>{const{t:d}=j.useTranslation(I.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:T=>l(T,c,x,s),placeholder:r??e})})};exports.default=A;exports.onEnterInternalTextField=l;
|
|
@@ -1,48 +1,47 @@
|
|
|
1
1
|
import { j as a } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import { TRANSLATION_NAMESPACE as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const A = (r, t, e, n) => {
|
|
2
|
+
import { Form as m, Input as x } from "antd";
|
|
3
|
+
import { TRANSLATION_NAMESPACE as l } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useTranslation as A } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
5
|
+
const I = (r, e, t, n) => {
|
|
7
6
|
var o;
|
|
8
|
-
|
|
9
|
-
},
|
|
7
|
+
e && t && (r.preventDefault(), (o = t == null ? void 0 : t.getFieldInstance(e)) == null || o.focus()), n && n(r);
|
|
8
|
+
}, F = ({
|
|
10
9
|
required: r,
|
|
11
|
-
label:
|
|
12
|
-
rules:
|
|
10
|
+
label: e,
|
|
11
|
+
rules: t = [],
|
|
13
12
|
placeholder: n,
|
|
14
13
|
onEnter: o,
|
|
15
|
-
nextFocus:
|
|
14
|
+
nextFocus: u,
|
|
16
15
|
className: s,
|
|
17
16
|
...i
|
|
18
17
|
}) => {
|
|
19
|
-
const { t:
|
|
18
|
+
const { t: p } = A(l), c = m.useFormInstance();
|
|
20
19
|
return /* @__PURE__ */ a.jsx(
|
|
21
20
|
m.Item,
|
|
22
21
|
{
|
|
23
22
|
...i,
|
|
24
23
|
className: s,
|
|
25
|
-
label:
|
|
24
|
+
label: e,
|
|
26
25
|
rules: [
|
|
27
|
-
...
|
|
26
|
+
...t,
|
|
28
27
|
{
|
|
29
28
|
required: r,
|
|
30
|
-
message: `${
|
|
29
|
+
message: `${e} ${p("err.validation.required")}`
|
|
31
30
|
}
|
|
32
31
|
],
|
|
33
32
|
children: /* @__PURE__ */ a.jsx(
|
|
34
|
-
|
|
33
|
+
x.TextArea,
|
|
35
34
|
{
|
|
36
35
|
...i,
|
|
37
36
|
className: s,
|
|
38
|
-
onPressEnter: (d) =>
|
|
39
|
-
placeholder: n ??
|
|
37
|
+
onPressEnter: (d) => I(d, u, c, o),
|
|
38
|
+
placeholder: n ?? e
|
|
40
39
|
}
|
|
41
40
|
)
|
|
42
41
|
}
|
|
43
42
|
);
|
|
44
43
|
};
|
|
45
44
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
F as default,
|
|
46
|
+
I as onEnterInternalTextField
|
|
48
47
|
};
|
|
@@ -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"),l=require("antd"),N=require("react"),O=require("../../../locale/hooks/translation-constants.cjs"),_=require("../tooltip/TooltipComponent.cjs"),w=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),L=require("../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.cjs"),c=(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:d,size:x,form:p,addonAfter:m,addonBefore:j,nextFocus:E,autoComplete:T="off",defaultValue:g,readOnly:q,value:I,loading:R,onBlur:f,inputRef:v,status:A,autoFocus:C,onChange:D,tooltip:P,...F})=>{const{t:a}=w.useTranslation(O.TRANSLATION_NAMESPACE),M=N.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:I,readOnly:q,defaultValue:g,autoFocus:C,addonBefore:j,ref:v,onBlur:f,addonAfter:R?o.jsxRuntimeExports.jsx(L,{}):m,status:A,size:x,autoComplete:T,onPressEnter:r=>c(r,E,p,d),type:t,placeholder:u??e},h=t=="password"?l.Input.Password:l.Input;return o.jsxRuntimeExports.jsx(_,{title:P,children:o.jsxRuntimeExports.jsx(l.Form.Item,{...F,label:e,rules:M,children:o.jsxRuntimeExports.jsx(h,{...S})})})};exports.default=$;exports.onEnterInternalTextField=c;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { j as i } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Input as p, Form as M } from "antd";
|
|
3
|
+
import { useMemo as S } from "react";
|
|
4
4
|
import { TRANSLATION_NAMESPACE as $ } from "../../../locale/hooks/translation-constants.js";
|
|
5
5
|
import D from "../tooltip/TooltipComponent.js";
|
|
6
|
-
import
|
|
7
|
-
import L from "../../../../node_modules/antd/es/form/index.js";
|
|
6
|
+
import { useTranslation as L } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
8
7
|
import O from "../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
9
|
-
const _ = (o,
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
},
|
|
8
|
+
const _ = (o, n, t, s) => {
|
|
9
|
+
var r;
|
|
10
|
+
n && t && (o.preventDefault(), (r = t == null ? void 0 : t.getFieldInstance(n)) == null || r.focus()), s && s(o);
|
|
11
|
+
}, Q = ({
|
|
13
12
|
type: o,
|
|
14
|
-
required:
|
|
13
|
+
required: n,
|
|
15
14
|
label: t,
|
|
16
15
|
disabled: s,
|
|
17
|
-
rules:
|
|
16
|
+
rules: r = [],
|
|
18
17
|
placeholder: m,
|
|
19
18
|
onEnter: f,
|
|
20
19
|
size: d,
|
|
@@ -35,21 +34,21 @@ const _ = (o, r, t, s) => {
|
|
|
35
34
|
tooltip: h,
|
|
36
35
|
...F
|
|
37
36
|
}) => {
|
|
38
|
-
const { t: a } =
|
|
39
|
-
const
|
|
40
|
-
...
|
|
37
|
+
const { t: a } = L($), N = S(() => {
|
|
38
|
+
const e = [
|
|
39
|
+
...r,
|
|
41
40
|
{
|
|
42
|
-
required:
|
|
41
|
+
required: n,
|
|
43
42
|
message: `${t ?? m ?? ""} ${a(
|
|
44
43
|
"err.validation.required"
|
|
45
44
|
)}`
|
|
46
45
|
}
|
|
47
46
|
];
|
|
48
|
-
return o === "email" &&
|
|
47
|
+
return o === "email" && e.push({
|
|
49
48
|
type: "email",
|
|
50
49
|
message: a("err.validation.invalidEmail")
|
|
51
|
-
}),
|
|
52
|
-
}, [
|
|
50
|
+
}), e;
|
|
51
|
+
}, [r, n, t, m, a, o]), R = {
|
|
53
52
|
disabled: s,
|
|
54
53
|
value: A,
|
|
55
54
|
readOnly: T,
|
|
@@ -58,17 +57,17 @@ const _ = (o, r, t, s) => {
|
|
|
58
57
|
addonBefore: u,
|
|
59
58
|
ref: v,
|
|
60
59
|
onBlur: g,
|
|
61
|
-
addonAfter: E ? /* @__PURE__ */
|
|
60
|
+
addonAfter: E ? /* @__PURE__ */ i.jsx(O, {}) : l,
|
|
62
61
|
status: C,
|
|
63
62
|
size: d,
|
|
64
63
|
autoComplete: j,
|
|
65
|
-
onPressEnter: (
|
|
64
|
+
onPressEnter: (e) => _(e, x, c, f),
|
|
66
65
|
type: o,
|
|
67
66
|
placeholder: m ?? t
|
|
68
67
|
}, w = o == "password" ? p.Password : p;
|
|
69
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ i.jsx(D, { title: h, children: /* @__PURE__ */ i.jsx(M.Item, { ...F, label: t, rules: N, children: /* @__PURE__ */ i.jsx(w, { ...R }) }) });
|
|
70
69
|
};
|
|
71
70
|
export {
|
|
72
|
-
|
|
71
|
+
Q as default,
|
|
73
72
|
_ as onEnterInternalTextField
|
|
74
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const r=require("../../../../_virtual/jsx-runtime.cjs"),s=require("antd"),e=({children:t,title:o})=>o?r.jsxRuntimeExports.jsx(s.Tooltip,{title:o,children:t}):t;module.exports=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),v=require("antd"),o=require("../../../../node_modules/i18next/dist/esm/i18next.cjs"),j=require("../button/Button.cjs"),E=require("../../../locale/hooks/translation-constants.cjs"),q=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),y=require("../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.cjs"),T=require("../../../../node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.cjs"),A=({errorChildren:a,children:m,onRetry:x,onClickBack:r,success:e,loading:n,error:s,successTitle:p=o.t("str.success"),successMessage:c,errorMessage:u=o.t("err.save"),errorTitle:d=o.t("str.error"),loadingTitle:l=o.t("message.loading.saving"),loadingMessage:R})=>{const{t:i}=q.useTranslation(E.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(v.Result,{status:n?void 0:e?"success":s?["403","404","500"].includes(s==null?void 0:s.code)?s.code:s?"error":void 0:void 0,title:n?l:e?p:s?d:void 0,icon:n?t.jsxRuntimeExports.jsx(y,{}):void 0,subTitle:n?R:e?c:s?typeof u=="function"?u()??i("err.save"):u??i("err.save"):void 0,extra:[e?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:m}):s?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[!!r&&t.jsxRuntimeExports.jsx(j,{onClick:r,htmlType:"button",type:"primary",icon:t.jsxRuntimeExports.jsx(T,{}),children:i("str.previous")}),!!x&&t.jsxRuntimeExports.jsx(j,{type:"primary",onClick:()=>x(void 0,void 0,!0),children:i("str.retry")},"retry"),a]}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{})]})};module.exports=A;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Result as j } from "antd";
|
|
3
|
+
import { t as e } from "../../../../node_modules/i18next/dist/esm/i18next.js";
|
|
4
4
|
import a from "../button/Button.js";
|
|
5
5
|
import { TRANSLATION_NAMESPACE as y } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
-
import R from "../../../../node_modules/
|
|
6
|
+
import { useTranslation as R } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
7
7
|
import T from "../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
8
8
|
import h from "../../../../node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js";
|
|
9
9
|
const S = ({
|
|
@@ -21,9 +21,9 @@ const S = ({
|
|
|
21
21
|
loadingTitle: x = e("message.loading.saving"),
|
|
22
22
|
loadingMessage: c
|
|
23
23
|
}) => {
|
|
24
|
-
const { t: m } =
|
|
24
|
+
const { t: m } = R(y);
|
|
25
25
|
return /* @__PURE__ */ t.jsx(
|
|
26
|
-
|
|
26
|
+
j,
|
|
27
27
|
{
|
|
28
28
|
status: s ? void 0 : i ? "success" : o ? ["403", "404", "500"].includes(o == null ? void 0 : o.code) ? o.code : o ? "error" : void 0 : void 0,
|
|
29
29
|
title: s ? x : i ? u : o ? l : void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const i=require("../../../../_virtual/jsx-runtime.cjs"),E=require("antd"),o=require("react"),q=require("../appearance/Hider.cjs"),{Step:C}=E.Steps,F=o.forwardRef(({pages:p,onSubmit:l,initPosition:x=0,progressDot:S,type:w,labelPlacement:v,className:b,pageStyle:g},k)=>{const[e,c]=o.useState(0),[r,d]=o.useState([]);o.useEffect(()=>{c(x)},[x]),o.useImperativeHandle(k,()=>({gotTo:t=>c(t)}),[]);const f=o.useCallback((t,u=!1,a=!1)=>{const s=[...r];if(t!==void 0&&(s[e]=t,d(s)),a||c(e+1),u&&l){const n={};for(const h of s)for(const R in h)n[R]=h[R];l(s,n)}},[e,r,l]),m=o.useCallback(()=>{const t=[...r];t[e]=void 0,d(t),c(e-1)},[e,r]),j=o.useMemo(()=>{const t=[],u=[],a=p.filter(s=>!s.hidden);for(let s=0;s<a.length;s++){const n=a[s];u.push(i.jsxRuntimeExports.jsx(q,{hide:e!==s,children:n.component({forward:f,backward:m},r,e===s)},`${n.title}${s}`)),t.push(i.jsxRuntimeExports.jsx(C,{icon:n.icon,title:n.title},n.title))}return{_pages:u,steps:t}},[m,e,r,f,p]);return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(E.Steps,{labelPlacement:v,progressDot:S,className:[b,"pb-3"].join(" "),current:e,type:w,children:j.steps}),i.jsxRuntimeExports.jsx("div",{style:g,children:j._pages})]})});module.exports=F;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as n } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Steps as S } from "antd";
|
|
2
3
|
import { forwardRef as E, useState as w, useEffect as H, useImperativeHandle as R, useCallback as v, useMemo as _ } from "react";
|
|
3
4
|
import $ from "../appearance/Hider.js";
|
|
4
|
-
import S from "../../../../node_modules/antd/es/steps/index.js";
|
|
5
5
|
const { Step: z } = S, V = E(
|
|
6
6
|
({
|
|
7
7
|
pages: a,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const s=require("../../../_virtual/jsx-runtime.cjs"),f=require("antd"),ae=require("../../../_virtual/dayjs.min.cjs"),o=require("react"),ie=require("../../locale/hooks/translation-constants.cjs"),le=require("./CrudForm.cjs"),re=require("./CrudFormWizard.cjs"),ce=require("./import/CrudImportButton.cjs"),ue=require("./view/CrudViewer.cjs"),de=require("../common/button/NewButton.cjs"),pe=require("../common/button/PrintButton.cjs"),me=require("../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),{useForm:xe}=f.Form;function fe({idField:j="id",onCreate:F,onDelete:_,onHide:I,onUpdate:p,fields:i,data:M,grid:w,isHiding:D,isCreating:S,isDeleting:U,isUpdating:b,paginateProps:W,onPrint:h,printing:L,viewable:H,loadingData:G,formBuilder:J,extraAction:K,minusHeight:Q,cloneable:X,fullWidthModal:Y=!0,wizard:l,extraView:Z,importable:q,onClickNew:N,...$}){const{t:g}=me.useTranslation(ie.TRANSLATION_NAMESPACE),[v,y]=o.useState(!1),[m,E]=o.useState(),[z,k]=o.useState(),[r]=xe(),P=o.useCallback(async n=>{const u=l?n:await r.validateFields(),c=i.filter(e=>e.type==="color"),a={};c.forEach(e=>{var d;const t=r.getFieldValue(e.name);a[e.name]=typeof t=="string"?t:(d=t==null?void 0:t.toHexString())==null?void 0:d.toUpperCase()}),Object.assign(u,a),m&&p?(await p({...u,[j]:m[j]}),E(void 0)):!m&&F&&await F(u),k(void 0),r.resetFields(),y(!1)},[i,r,j,F,p,m,l]),[ee,V]=o.useState(!1),[te,B]=o.useState(!1);o.useEffect(()=>{v?(V(!1),B(!1)):C(void 0)},[v]);const A=o.useCallback(async n=>{V(n),B(!0)},[]),T=o.useCallback(async()=>{B(!0)},[]),[se,O]=o.useState(!1),R=o.useCallback(async(n,u=!0,c=!1)=>{try{O(!0),y(!0),u&&C("update");const a={};for(const e of i){const t=n[e.name];if(c&&e.type==="image"){const d=t;try{const oe=await e.provider.clone(d);a[e.name]=oe;continue}catch{continue}}e.type==="date"?t&&(a[e.name]=ae(t)):e.type==="select"?e.multiple&&Array.isArray(t)?a[e.name]=t.map(d=>d[e.innerFieldId??"id"]):t&&typeof t=="object"?a[e.name]=t[e.innerFieldId??"id"]:(t&&typeof t=="string"||typeof t=="number")&&(a[e.name]=t):a[e.name]=t}r.setFieldsValue(a),k(a),u&&E(n)}finally{O(!1)}},[i,r]),[x,C]=o.useState(),ne=o.useCallback(async n=>{C("clone"),R(n,!1,!0)},[R]);return s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsxs(f.Space,{direction:"vertical",className:"w-100",children:[s.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex",children:[s.jsxRuntimeExports.jsx("div",{style:{flex:1},children:s.jsxRuntimeExports.jsx(de.NewButton,{onClick:()=>{N?N():(y(n=>!n),C("new"))},className:"flex-1"})}),s.jsxRuntimeExports.jsxs(f.Space,{children:[!!h&&s.jsxRuntimeExports.jsx(pe.PrintButton,{className:"float-right",loading:L,onClick:h}),!!q&&s.jsxRuntimeExports.jsx(ce,{fields:i,importProps:q})]})]}),s.jsxRuntimeExports.jsx(ue,{...$,minusHeight:Q,data:M,fields:i,extraAction:K,idField:j,isDeleting:U,loadingData:G,onClickUpdate:p?R:void 0,onHide:I,isHiding:D,onDelete:_,onUpdate:p,onClickClone:X?ne:void 0,paginateProps:W,viewable:H,extraView:Z})]}),s.jsxRuntimeExports.jsx(f.Modal,{width:Y?"100%":void 0,title:g(x??"new"),open:v,confirmLoading:S||b,okText:g("str."+(x==="update"?"update":"save")),cancelText:g("str.cancel"),cancelButtonProps:{disabled:te,hidden:!!l},okButtonProps:{disabled:ee,hidden:!!l},onCancel:async()=>{try{if(x==="clone"){const n=l?m:r.getFieldsValue(),u=i.filter(c=>c.type==="image");for(const c of u)n[c.name]&&c.provider.delete(n[c.name])}}finally{}l||r.resetFields(),k(void 0),E(void 0),y(!1)},onOk:()=>P(),destroyOnClose:!0,children:s.jsxRuntimeExports.jsxs(f.Spin,{spinning:se,children:[!l&&s.jsxRuntimeExports.jsx(le.CrudForm,{purpose:x,fields:i,form:r,formBuilder:J,grid:w,onDeleteFile:T,onUploadFile:A}),l&&s.jsxRuntimeExports.jsx(re,{submitting:S||b,className:"mt-2",onSave:P,updatingValue:z,fields:i,onDeleteFile:T,onUploadFile:A,purpose:x,wizard:l})]})})]})}module.exports=fe;
|