@kingteza/crud-component 1.6.0 → 1.6.2
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/common/date-picker/TimePicker.cjs.js +1 -1
- package/dist/common/date-picker/TimePicker.es.js +28 -28
- package/dist/common/select/SelectComponent.cjs.js +1 -1
- package/dist/common/select/SelectComponent.es.js +27 -27
- package/dist/common/text-field/NumberField.cjs.js +1 -1
- package/dist/common/text-field/NumberField.es.js +33 -33
- package/dist/common/text-field/TextField.cjs.js +1 -1
- package/dist/common/text-field/TextField.es.js +30 -30
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),i=require("antd"),E=require("dayjs"),f=require("react"),H=require("../../locale/index.cjs.js"),I=({type:L,required:q,label:o,rules:x=[],placeholder:s,disabledPast:r=!1,disableCurrent:m=!1,onEnter:M,disabled:k,use12Hours:T,nextFocus:N,onChange:c,range:n,disabledFuture:u,defaultValue:j,value:p,format:y,autoComplete:S="off",renderExtraFooter:P,...R})=>{const{t:d}=H.useTranslationLib(),l=f.useMemo(()=>s||(n?["From","To"]:"Select time"),[s,n]),F=n?i.TimePicker.RangePicker:i.TimePicker,$=f.useCallback(e=>{if(!e)return!1;const t=E(),v=r&&e<t,w=u&&e>t,D=m&&e<t&&t<e;return v||w||D},[m,u,r]);return a.jsx(i.Form.Item,{...R,label:o,rules:[{required:q,message:`${o||s||""} ${d("err.validation.required")}`},...x],children:a.jsx(F,{use12Hours:T,renderExtraFooter:P,value:p,defaultValue:j,format:y,onChange:e=>c==null?void 0:c(e),disabledDate:$,disabled:k,className:"w-100",placeholder:l})})};module.exports=I;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { TimePicker as
|
|
2
|
+
import { TimePicker as p, Form as E } from "antd";
|
|
3
3
|
import H from "dayjs";
|
|
4
4
|
import { useMemo as I, useCallback as L } from "react";
|
|
5
5
|
import { useTranslationLib as M } from "../../locale/index.es.js";
|
|
6
6
|
const K = ({
|
|
7
7
|
type: N,
|
|
8
|
-
required:
|
|
9
|
-
label:
|
|
10
|
-
rules:
|
|
8
|
+
required: a,
|
|
9
|
+
label: s,
|
|
10
|
+
rules: k = [],
|
|
11
11
|
placeholder: t,
|
|
12
12
|
disabledPast: r = !1,
|
|
13
13
|
disableCurrent: c = !1,
|
|
14
14
|
onEnter: R,
|
|
15
|
-
disabled:
|
|
16
|
-
use12Hours:
|
|
15
|
+
disabled: u,
|
|
16
|
+
use12Hours: T,
|
|
17
17
|
nextFocus: S,
|
|
18
|
-
onChange:
|
|
19
|
-
range:
|
|
18
|
+
onChange: e,
|
|
19
|
+
range: i,
|
|
20
20
|
disabledFuture: n,
|
|
21
|
-
defaultValue:
|
|
21
|
+
defaultValue: l,
|
|
22
22
|
value: x,
|
|
23
23
|
format: y,
|
|
24
24
|
autoComplete: z = "off",
|
|
25
|
-
renderExtraFooter:
|
|
26
|
-
...
|
|
25
|
+
renderExtraFooter: j,
|
|
26
|
+
...F
|
|
27
27
|
}) => {
|
|
28
|
-
const { t:
|
|
29
|
-
() => t || (
|
|
30
|
-
[t,
|
|
31
|
-
),
|
|
28
|
+
const { t: P } = M(), $ = I(
|
|
29
|
+
() => t || (i ? ["From", "To"] : "Select time"),
|
|
30
|
+
[t, i]
|
|
31
|
+
), d = i ? p.RangePicker : p, q = L(
|
|
32
32
|
(o) => {
|
|
33
33
|
if (!o)
|
|
34
34
|
return !1;
|
|
35
|
-
const
|
|
35
|
+
const m = H(), v = r && o < m, w = n && o > m, D = c && o < m && m < o;
|
|
36
36
|
return v || w || D;
|
|
37
37
|
},
|
|
38
38
|
[c, n, r]
|
|
@@ -41,30 +41,30 @@ const K = ({
|
|
|
41
41
|
return /* @__PURE__ */ f(
|
|
42
42
|
E.Item,
|
|
43
43
|
{
|
|
44
|
-
...
|
|
45
|
-
label:
|
|
44
|
+
...F,
|
|
45
|
+
label: s,
|
|
46
46
|
rules: [
|
|
47
47
|
{
|
|
48
|
-
required:
|
|
49
|
-
message: `${
|
|
48
|
+
required: a,
|
|
49
|
+
message: `${s || t || ""} ${P(
|
|
50
50
|
"err.validation.required"
|
|
51
51
|
)}`
|
|
52
52
|
},
|
|
53
|
-
...
|
|
53
|
+
...k
|
|
54
54
|
],
|
|
55
55
|
children: /* @__PURE__ */ f(
|
|
56
|
-
|
|
56
|
+
d,
|
|
57
57
|
{
|
|
58
|
-
use12Hours:
|
|
59
|
-
renderExtraFooter:
|
|
58
|
+
use12Hours: T,
|
|
59
|
+
renderExtraFooter: j,
|
|
60
60
|
value: x,
|
|
61
|
-
defaultValue:
|
|
61
|
+
defaultValue: l,
|
|
62
62
|
format: y,
|
|
63
|
-
onChange: (o) =>
|
|
63
|
+
onChange: (o) => e == null ? void 0 : e(o),
|
|
64
64
|
disabledDate: q,
|
|
65
|
-
disabled:
|
|
65
|
+
disabled: u,
|
|
66
66
|
className: "w-100",
|
|
67
|
-
placeholder:
|
|
67
|
+
placeholder: $
|
|
68
68
|
}
|
|
69
69
|
)
|
|
70
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),a=require("antd"),V=require("react"),B=require("../../locale/index.cjs.js"),D=require("../tooltip/TooltipComponent.cjs.js"),E=require("../../util/ValidationUtil.cjs.js");function P({label:s,rules:S=[],required:f,placeholder:l,notSearch:L,children:h,readOnly:o,items:c,dropdownRender:q,itemBuilder:p,loading:m,showLoadingInEmptyIndicator:T,nameFieldInArray:u="name",innerRef:_,tooltip:N,filterOption:R,tagRender:b,help:k,...r}){const{t:U}=B.useTranslationLib(),F=V.useCallback(e=>{const t=typeof e=="string"||typeof e=="number"?e:e==null?void 0:e.id,i=typeof e=="string"||typeof e=="number"?e:e==null?void 0:e[u];return n.jsx("option",{value:t,children:n.jsx("div",{dangerouslySetInnerHTML:{__html:i}})},t)},[u]),H=s||l||"";return n.jsx(a.ConfigProvider,{renderEmpty:T&&m?()=>n.jsx(a.Spin,{}):void 0,children:n.jsx(D,{title:N,children:n.jsx(a.Form.Item,{label:s,name:r.name,help:k,className:r.className,required:f,rules:[...S,...f?E.required(H):[]],children:n.jsx(a.Select,{ref:_,loading:m,open:o?!1:void 0,onChange:!o&&r.onChange,allowClear:!o&&r.allowClear,showSearch:!L,className:`max-width ${o?"readOnly":""}`,...r,tagRender:b,placeholder:l??s,filterOption:R??((e,t)=>{var i,g,C,j;try{const d=(C=(g=(i=t==null?void 0:t.children)==null?void 0:i.props)==null?void 0:g.dangerouslySetInnerHTML)==null?void 0:C.__html,I=e.toLowerCase().split(/\s+/),y=(t==null?void 0:t.children)??"",w=typeof y=="string"?y.toLowerCase():typeof d=="string"?d.toLowerCase():"",M=(((j=t==null?void 0:t.value)==null?void 0:j.toString())??"").toLowerCase(),O=w.replace(/\s/g,"");return I.every(x=>w.indexOf(x)>=0||M.indexOf(x)>=0||O.indexOf(x)>=0)}catch(d){return console.log(d),!0}}),popupRender:q,children:h===null?void 0:h??(c?c==null?void 0:c.map(p??F):n.jsx(n.Fragment,{}))})})})})}module.exports=P;
|
|
@@ -5,21 +5,21 @@ import { useTranslationLib as W } from "../../locale/index.es.js";
|
|
|
5
5
|
import $ from "../tooltip/TooltipComponent.es.js";
|
|
6
6
|
import q from "../../util/ValidationUtil.es.js";
|
|
7
7
|
function Z({
|
|
8
|
-
label:
|
|
8
|
+
label: o,
|
|
9
9
|
rules: S = [],
|
|
10
|
-
required:
|
|
11
|
-
placeholder:
|
|
10
|
+
required: d,
|
|
11
|
+
placeholder: f,
|
|
12
12
|
notSearch: L,
|
|
13
|
-
children:
|
|
14
|
-
readOnly:
|
|
15
|
-
items:
|
|
13
|
+
children: l,
|
|
14
|
+
readOnly: s,
|
|
15
|
+
items: c,
|
|
16
16
|
dropdownRender: u,
|
|
17
17
|
itemBuilder: T,
|
|
18
18
|
loading: h,
|
|
19
19
|
showLoadingInEmptyIndicator: _,
|
|
20
20
|
nameFieldInArray: g = "name",
|
|
21
|
-
innerRef:
|
|
22
|
-
tooltip:
|
|
21
|
+
innerRef: N,
|
|
22
|
+
tooltip: b,
|
|
23
23
|
filterOption: k,
|
|
24
24
|
tagRender: F,
|
|
25
25
|
help: H,
|
|
@@ -27,53 +27,53 @@ function Z({
|
|
|
27
27
|
}) {
|
|
28
28
|
const { t: z } = W(), I = U(
|
|
29
29
|
(e) => {
|
|
30
|
-
const r = typeof e == "string" || typeof e == "number" ? e : e == null ? void 0 : e.id,
|
|
31
|
-
return /* @__PURE__ */ t("option", { value: r, children: /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html:
|
|
30
|
+
const r = typeof e == "string" || typeof e == "number" ? e : e == null ? void 0 : e.id, i = typeof e == "string" || typeof e == "number" ? e : e == null ? void 0 : e[g];
|
|
31
|
+
return /* @__PURE__ */ t("option", { value: r, children: /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: i } }) }, r);
|
|
32
32
|
},
|
|
33
33
|
[g]
|
|
34
|
-
), M =
|
|
34
|
+
), M = o || f || "";
|
|
35
35
|
return /* @__PURE__ */ t(
|
|
36
36
|
D,
|
|
37
37
|
{
|
|
38
38
|
renderEmpty: _ && h ? () => /* @__PURE__ */ t(R, {}) : void 0,
|
|
39
|
-
children: /* @__PURE__ */ t($, { title:
|
|
39
|
+
children: /* @__PURE__ */ t($, { title: b, children: /* @__PURE__ */ t(
|
|
40
40
|
E.Item,
|
|
41
41
|
{
|
|
42
|
-
label:
|
|
42
|
+
label: o,
|
|
43
43
|
name: n.name,
|
|
44
44
|
help: H,
|
|
45
45
|
className: n.className,
|
|
46
|
-
required:
|
|
46
|
+
required: d,
|
|
47
47
|
rules: [
|
|
48
48
|
...S,
|
|
49
|
-
...
|
|
49
|
+
...d ? q.required(M) : []
|
|
50
50
|
],
|
|
51
51
|
children: /* @__PURE__ */ t(
|
|
52
52
|
P,
|
|
53
53
|
{
|
|
54
|
-
ref:
|
|
54
|
+
ref: N,
|
|
55
55
|
loading: h,
|
|
56
|
-
open:
|
|
57
|
-
onChange: !
|
|
58
|
-
allowClear: !
|
|
56
|
+
open: s ? !1 : void 0,
|
|
57
|
+
onChange: !s && n.onChange,
|
|
58
|
+
allowClear: !s && n.allowClear,
|
|
59
59
|
showSearch: !L,
|
|
60
|
-
className: `max-width ${
|
|
60
|
+
className: `max-width ${s ? "readOnly" : ""}`,
|
|
61
61
|
...n,
|
|
62
62
|
tagRender: F,
|
|
63
|
-
placeholder:
|
|
63
|
+
placeholder: f ?? o,
|
|
64
64
|
filterOption: k ?? ((e, r) => {
|
|
65
|
-
var
|
|
65
|
+
var i, C, p, y;
|
|
66
66
|
try {
|
|
67
|
-
const
|
|
67
|
+
const m = (p = (C = (i = r == null ? void 0 : r.children) == null ? void 0 : i.props) == null ? void 0 : C.dangerouslySetInnerHTML) == null ? void 0 : p.__html, O = e.toLowerCase().split(/\s+/), w = (r == null ? void 0 : r.children) ?? "", x = typeof w == "string" ? w.toLowerCase() : typeof m == "string" ? m.toLowerCase() : "", V = (((y = r == null ? void 0 : r.value) == null ? void 0 : y.toString()) ?? "").toLowerCase(), j = x.replace(/\s/g, "");
|
|
68
68
|
return O.every(
|
|
69
|
-
(
|
|
69
|
+
(a) => x.indexOf(a) >= 0 || V.indexOf(a) >= 0 || j.indexOf(a) >= 0
|
|
70
70
|
);
|
|
71
|
-
} catch (
|
|
72
|
-
return console.log(
|
|
71
|
+
} catch (m) {
|
|
72
|
+
return console.log(m), !0;
|
|
73
73
|
}
|
|
74
74
|
}),
|
|
75
75
|
popupRender: u,
|
|
76
|
-
children:
|
|
76
|
+
children: l === null ? void 0 : l ?? (c ? c == null ? void 0 : c.map(T ?? I) : /* @__PURE__ */ t(B, {}))
|
|
77
77
|
}
|
|
78
78
|
)
|
|
79
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),m=require("antd"),x=require("react"),M=require("../../locale/index.cjs.js"),P=require("../tooltip/TooltipComponent.cjs.js"),b=require("./TextField.cjs.js"),k=x.forwardRef(function({type:y,required:o,label:t,rules:c=[],placeholder:r,onEnter:a,form:f,nextFocus:q,min:d,moneyField:n,addonAfter:j,minLength:T,defaultValue:$,pattern:g,disabled:I,readOnly:N,onChange:R,value:h,max:w,addonBefore:B,size:E,isInt:u=!1,tooltip:F,help:z,...l},C){const{t:p}=M.useTranslationLib(),L=x.useMemo(()=>[...c,{required:o,message:`${t||r||""} ${p("err.validation.required")}`}],[c,t,r,p,o]);return i.jsx(P,{title:F,children:i.jsx(m.Form.Item,{...l,label:t,rules:L,children:i.jsx(m.InputNumber,{ref:C,disabled:I,defaultValue:$,value:h,readOnly:N,addonBefore:B,minLength:T,addonAfter:j,step:u?1:void 0,pattern:u?"d*":g,onChange:R,onPressEnter:e=>b.onEnterInternalTextField(e,q,f,a),className:"max-width",min:d===null?void 0:d??0,max:w,type:n?void 0:"number",size:E,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})})})});module.exports=k;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Form as
|
|
3
|
-
import { forwardRef as
|
|
2
|
+
import { Form as M, InputNumber as P } from "antd";
|
|
3
|
+
import { forwardRef as R, useMemo as b } from "react";
|
|
4
4
|
import { useTranslationLib as k } from "../../locale/index.es.js";
|
|
5
5
|
import q from "../tooltip/TooltipComponent.es.js";
|
|
6
6
|
import { onEnterInternalTextField as v } from "./TextField.es.js";
|
|
7
|
-
const Q =
|
|
7
|
+
const Q = R(
|
|
8
8
|
function({
|
|
9
9
|
// eslint-disable-next-line no-unused-vars
|
|
10
10
|
type: z,
|
|
@@ -17,54 +17,54 @@ const Q = P(
|
|
|
17
17
|
nextFocus: u,
|
|
18
18
|
min: p,
|
|
19
19
|
moneyField: e,
|
|
20
|
-
addonAfter:
|
|
21
|
-
minLength:
|
|
22
|
-
defaultValue:
|
|
23
|
-
pattern:
|
|
24
|
-
disabled:
|
|
25
|
-
readOnly:
|
|
26
|
-
onChange:
|
|
27
|
-
value:
|
|
28
|
-
max:
|
|
29
|
-
addonBefore:
|
|
30
|
-
size:
|
|
20
|
+
addonAfter: x,
|
|
21
|
+
minLength: $,
|
|
22
|
+
defaultValue: g,
|
|
23
|
+
pattern: T,
|
|
24
|
+
disabled: I,
|
|
25
|
+
readOnly: N,
|
|
26
|
+
onChange: h,
|
|
27
|
+
value: j,
|
|
28
|
+
max: w,
|
|
29
|
+
addonBefore: B,
|
|
30
|
+
size: E,
|
|
31
31
|
isInt: d = !1,
|
|
32
|
-
tooltip:
|
|
32
|
+
tooltip: l,
|
|
33
33
|
help: A,
|
|
34
|
-
...
|
|
35
|
-
},
|
|
36
|
-
const { t: f } = k(),
|
|
34
|
+
...C
|
|
35
|
+
}, F) {
|
|
36
|
+
const { t: f } = k(), L = b(
|
|
37
37
|
() => [
|
|
38
38
|
...m,
|
|
39
39
|
{
|
|
40
40
|
required: s,
|
|
41
|
-
message: `${t
|
|
41
|
+
message: `${t || o || ""} ${f(
|
|
42
42
|
"err.validation.required"
|
|
43
43
|
)}`
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
46
|
[m, t, o, f, s]
|
|
47
47
|
);
|
|
48
|
-
return /* @__PURE__ */ i(q, { title:
|
|
49
|
-
|
|
48
|
+
return /* @__PURE__ */ i(q, { title: l, children: /* @__PURE__ */ i(M.Item, { ...C, label: t, rules: L, children: /* @__PURE__ */ i(
|
|
49
|
+
P,
|
|
50
50
|
{
|
|
51
|
-
ref:
|
|
52
|
-
disabled:
|
|
53
|
-
defaultValue:
|
|
54
|
-
value:
|
|
55
|
-
readOnly:
|
|
56
|
-
addonBefore:
|
|
57
|
-
minLength:
|
|
58
|
-
addonAfter:
|
|
51
|
+
ref: F,
|
|
52
|
+
disabled: I,
|
|
53
|
+
defaultValue: g,
|
|
54
|
+
value: j,
|
|
55
|
+
readOnly: N,
|
|
56
|
+
addonBefore: B,
|
|
57
|
+
minLength: $,
|
|
58
|
+
addonAfter: x,
|
|
59
59
|
step: d ? 1 : void 0,
|
|
60
|
-
pattern: d ? "d*" :
|
|
61
|
-
onChange:
|
|
60
|
+
pattern: d ? "d*" : T,
|
|
61
|
+
onChange: h,
|
|
62
62
|
onPressEnter: (r) => v(r, u, a, c),
|
|
63
63
|
className: "max-width",
|
|
64
64
|
min: p === null ? void 0 : p ?? 0,
|
|
65
|
-
max:
|
|
65
|
+
max: w,
|
|
66
66
|
type: e ? void 0 : "number",
|
|
67
|
-
size:
|
|
67
|
+
size: E,
|
|
68
68
|
formatter: e ? (r) => {
|
|
69
69
|
if (r.includes(".")) {
|
|
70
70
|
const n = `${r}`.split(".");
|
|
@@ -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 u=require("react/jsx-runtime"),R=require("@ant-design/icons"),d=require("antd"),S=require("react"),_=require("../../locale/index.cjs.js"),$=require("../tooltip/TooltipComponent.cjs.js"),c=(n,t,e,i)=>{var s;t&&e&&(n.preventDefault(),(s=e==null?void 0:e.getFieldInstance(t))==null||s.focus()),i&&i(n)},A=({type:n,required:t,label:e,disabled:i,rules:s=[],placeholder:r,onEnter:l,size:x,form:g,addonAfter:m,addonBefore:p,nextFocus:I,autoComplete:f="off",defaultValue:j,readOnly:q,value:v,loading:T,onBlur:F,inputRef:P,status:C,autoFocus:E,onChange:D,tooltip:M,...h})=>{const{t:a}=_.useTranslationLib(),w=S.useMemo(()=>{const o=[...s,{required:t,message:`${e||r||""} ${a("err.validation.required")}`}];return n==="email"&&o.push({type:"email",message:a("err.validation.invalidEmail")}),o},[s,t,e,r,a,n]),L={disabled:i,value:v,readOnly:q,defaultValue:j,autoFocus:E,addonBefore:p,ref:P,onBlur:F,addonAfter:T?u.jsx(R.LoadingOutlined,{}):m,status:C,size:x,autoComplete:f,onPressEnter:o=>c(o,I,g,l),type:n,placeholder:r??e},O=n=="password"?d.Input.Password:d.Input;return u.jsx($,{title:M,children:u.jsx(d.Form.Item,{...h,label:e,rules:w,children:u.jsx(O,{...L})})})};exports.default=A;exports.onEnterInternalTextField=c;
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { LoadingOutlined as D } from "@ant-design/icons";
|
|
3
3
|
import { Input as d, Form as M } from "antd";
|
|
4
4
|
import { useMemo as O } from "react";
|
|
5
5
|
import { useTranslationLib as k } from "../../locale/index.es.js";
|
|
6
6
|
import q from "../tooltip/TooltipComponent.es.js";
|
|
7
|
-
const z = (n, o, t,
|
|
7
|
+
const z = (n, o, t, r) => {
|
|
8
8
|
var i;
|
|
9
|
-
o && t && (n.preventDefault(), (i = t == null ? void 0 : t.getFieldInstance(o)) == null || i.focus()),
|
|
9
|
+
o && t && (n.preventDefault(), (i = t == null ? void 0 : t.getFieldInstance(o)) == null || i.focus()), r && r(n);
|
|
10
10
|
}, R = ({
|
|
11
11
|
type: n,
|
|
12
12
|
required: o,
|
|
13
13
|
label: t,
|
|
14
|
-
disabled:
|
|
14
|
+
disabled: r,
|
|
15
15
|
rules: i = [],
|
|
16
|
-
placeholder:
|
|
16
|
+
placeholder: e,
|
|
17
17
|
onEnter: p,
|
|
18
18
|
size: f,
|
|
19
|
-
form:
|
|
20
|
-
addonAfter:
|
|
21
|
-
addonBefore:
|
|
19
|
+
form: u,
|
|
20
|
+
addonAfter: c,
|
|
21
|
+
addonBefore: l,
|
|
22
22
|
nextFocus: g,
|
|
23
23
|
autoComplete: v = "off",
|
|
24
24
|
defaultValue: I,
|
|
25
25
|
readOnly: T,
|
|
26
|
-
value:
|
|
27
|
-
loading:
|
|
28
|
-
onBlur:
|
|
29
|
-
inputRef:
|
|
30
|
-
status:
|
|
26
|
+
value: x,
|
|
27
|
+
loading: C,
|
|
28
|
+
onBlur: F,
|
|
29
|
+
inputRef: P,
|
|
30
|
+
status: h,
|
|
31
31
|
autoFocus: w,
|
|
32
32
|
onChange: B,
|
|
33
33
|
tooltip: E,
|
|
34
34
|
...L
|
|
35
35
|
}) => {
|
|
36
|
-
const { t:
|
|
37
|
-
const
|
|
36
|
+
const { t: a } = k(), $ = O(() => {
|
|
37
|
+
const s = [
|
|
38
38
|
...i,
|
|
39
39
|
{
|
|
40
40
|
required: o,
|
|
41
|
-
message: `${t
|
|
41
|
+
message: `${t || e || ""} ${a(
|
|
42
42
|
"err.validation.required"
|
|
43
43
|
)}`
|
|
44
44
|
}
|
|
45
45
|
];
|
|
46
|
-
return n === "email" &&
|
|
46
|
+
return n === "email" && s.push({
|
|
47
47
|
type: "email",
|
|
48
|
-
message:
|
|
49
|
-
}),
|
|
50
|
-
}, [i, o, t,
|
|
51
|
-
disabled:
|
|
52
|
-
value:
|
|
48
|
+
message: a("err.validation.invalidEmail")
|
|
49
|
+
}), s;
|
|
50
|
+
}, [i, o, t, e, a, n]), j = {
|
|
51
|
+
disabled: r,
|
|
52
|
+
value: x,
|
|
53
53
|
readOnly: T,
|
|
54
54
|
defaultValue: I,
|
|
55
55
|
autoFocus: w,
|
|
56
|
-
addonBefore:
|
|
57
|
-
ref:
|
|
58
|
-
onBlur:
|
|
59
|
-
addonAfter:
|
|
60
|
-
status:
|
|
56
|
+
addonBefore: l,
|
|
57
|
+
ref: P,
|
|
58
|
+
onBlur: F,
|
|
59
|
+
addonAfter: C ? /* @__PURE__ */ m(D, {}) : c,
|
|
60
|
+
status: h,
|
|
61
61
|
size: f,
|
|
62
62
|
autoComplete: v,
|
|
63
|
-
onPressEnter: (
|
|
63
|
+
onPressEnter: (s) => z(s, g, u, p),
|
|
64
64
|
type: n,
|
|
65
|
-
placeholder:
|
|
65
|
+
placeholder: e ?? t
|
|
66
66
|
}, A = n == "password" ? d.Password : d;
|
|
67
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ m(q, { title: E, children: /* @__PURE__ */ m(M.Item, { ...L, label: t, rules: $, children: /* @__PURE__ */ m(A, { ...j }) }) });
|
|
68
68
|
};
|
|
69
69
|
export {
|
|
70
70
|
R as default,
|