@kingteza/crud-component 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/DatePicker/DatePicker.cjs +1 -0
- package/dist/components/common/DatePicker/DatePicker.js +88 -0
- package/dist/components/common/DatePicker/TimePicker.cjs +1 -0
- package/dist/components/common/DatePicker/TimePicker.js +78 -0
- package/dist/components/common/appearance/Hider.cjs +1 -0
- package/dist/components/common/appearance/Hider.js +5 -0
- package/dist/components/common/button/Button.cjs +1 -0
- package/dist/components/common/button/Button.js +64 -0
- package/dist/components/common/button/CloneButtonTable.cjs +1 -0
- package/dist/components/common/button/CloneButtonTable.js +20 -0
- package/dist/components/common/button/DeleteButtonTable.cjs +1 -0
- package/dist/components/common/button/DeleteButtonTable.js +68 -0
- package/dist/components/common/button/ExportButton.cjs +1 -0
- package/dist/components/common/button/ExportButton.js +27 -0
- package/dist/components/common/button/HideButtonTable.cjs +1 -0
- package/dist/components/common/button/HideButtonTable.js +68 -0
- package/dist/components/common/button/ImportButton.cjs +1 -0
- package/dist/components/common/button/ImportButton.js +56 -0
- package/dist/components/common/button/NewButton.cjs +1 -0
- package/dist/components/common/button/NewButton.js +24 -0
- package/dist/components/common/button/PrintButton.cjs +1 -0
- package/dist/components/common/button/PrintButton.js +26 -0
- package/dist/components/common/button/RefreshButton.cjs +1 -0
- package/dist/components/common/button/RefreshButton.js +24 -0
- package/dist/components/common/button/UnHideButton.cjs +1 -0
- package/dist/components/common/button/UnHideButton.js +70 -0
- package/dist/components/common/button/UpdateButtonTable.cjs +1 -0
- package/dist/components/common/button/UpdateButtonTable.js +20 -0
- package/dist/components/common/button/ViewButtonTable.cjs +1 -0
- package/dist/components/common/button/ViewButtonTable.js +20 -0
- package/dist/components/common/check-box/CheckBox.cjs +1 -0
- package/dist/components/common/check-box/CheckBox.js +40 -0
- package/dist/components/common/description/DescList.cjs +1 -0
- package/dist/components/common/description/DescList.js +16 -0
- package/dist/components/common/layout/VerticalSpace.cjs +1 -0
- package/dist/components/common/layout/VerticalSpace.js +6 -0
- package/dist/components/common/loading/LoadingIndicator.cjs +1 -0
- package/dist/components/common/loading/LoadingIndicator.js +24 -0
- package/dist/components/common/picker/ImagePicker.cjs +1 -0
- package/dist/components/common/picker/ImagePicker.js +285 -0
- package/dist/components/common/radio/RadioGroupComponent.cjs +1 -0
- package/dist/components/common/radio/RadioGroupComponent.js +19 -0
- package/dist/components/common/report/SelectFieldInReport.cjs +1 -0
- package/dist/components/common/report/SelectFieldInReport.js +30 -0
- package/dist/components/common/select/CustomSelectOption.cjs +1 -0
- package/dist/components/common/select/CustomSelectOption.js +13 -0
- package/dist/components/common/select/SelectComponent.cjs +1 -0
- package/dist/components/common/select/SelectComponent.js +89 -0
- package/dist/components/common/show-more/index.cjs +1 -0
- package/dist/components/common/show-more/index.js +8 -0
- package/dist/components/common/tab/TabViewWithRoute.cjs +1 -0
- package/dist/components/common/tab/TabViewWithRoute.js +37 -0
- package/dist/components/common/table/table.cjs +1 -0
- package/dist/components/common/table/table.js +40 -0
- package/dist/components/common/tag/StatusTag.cjs +1 -0
- package/dist/components/common/tag/StatusTag.js +30 -0
- package/dist/components/common/text/index.cjs +1 -0
- package/dist/components/common/text/index.js +5 -0
- package/dist/components/common/text/title/index.cjs +1 -0
- package/dist/components/common/text/title/index.js +5 -0
- package/dist/components/common/text-field/NumberField.cjs +1 -0
- package/dist/components/common/text-field/NumberField.js +83 -0
- package/dist/components/common/text-field/PhoneNumberField.cjs +1 -0
- package/dist/components/common/text-field/PhoneNumberField.js +18 -0
- package/dist/components/common/text-field/TextArea.cjs +1 -0
- package/dist/components/common/text-field/TextArea.js +47 -0
- package/dist/components/common/text-field/TextField.cjs +1 -0
- package/dist/components/common/text-field/TextField.js +73 -0
- package/dist/components/common/tooltip/TooltipComponent.cjs +1 -0
- package/dist/components/common/tooltip/TooltipComponent.js +9 -0
- package/dist/components/common/wizard/WizardResult.cjs +1 -0
- package/dist/components/common/wizard/WizardResult.js +61 -0
- package/dist/components/common/wizard/WizardViewForm.cjs +1 -0
- package/dist/components/common/wizard/WizardViewForm.js +74 -0
- package/dist/components/crud/CrudComponent.cjs +1 -0
- package/dist/components/crud/CrudComponent.js +210 -0
- package/dist/components/crud/CrudField.cjs +1 -0
- package/dist/components/crud/CrudField.js +459 -0
- package/dist/components/crud/CrudForm.cjs +1 -0
- package/dist/components/crud/CrudForm.js +91 -0
- package/dist/components/crud/CrudFormWizard.cjs +1 -0
- package/dist/components/crud/CrudFormWizard.js +142 -0
- package/dist/components/crud/CrudReportComponent.cjs +4 -0
- package/dist/components/crud/CrudReportComponent.js +255 -0
- package/dist/components/crud/CrudSearchComponent.cjs +1 -0
- package/dist/components/crud/CrudSearchComponent.js +95 -0
- package/dist/components/crud/FileCrudField.cjs +1 -0
- package/dist/components/crud/FileCrudField.js +227 -0
- package/dist/components/crud/ImageCrudField.cjs +1 -0
- package/dist/components/crud/ImageCrudField.js +113 -0
- package/dist/components/crud/import/CrudImportButton.cjs +1 -0
- package/dist/components/crud/import/CrudImportButton.js +31 -0
- package/dist/components/crud/import/CrudImportComponent.cjs +2 -0
- package/dist/components/crud/import/CrudImportComponent.js +222 -0
- package/dist/components/crud/view/CrudDecListView.cjs +1 -0
- package/dist/components/crud/view/CrudDecListView.js +42 -0
- package/dist/components/crud/view/CrudViewer.cjs +1 -0
- package/dist/components/crud/view/CrudViewer.js +217 -0
- package/dist/components/crud/view/CrudViewerUtil.cjs +1 -0
- package/dist/components/crud/view/CrudViewerUtil.js +58 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +10 -10
- package/dist/locale/hooks/translation-constants.cjs +1 -0
- package/dist/locale/hooks/translation-constants.js +4 -0
- package/dist/locale/index.cjs +1 -0
- package/dist/locale/index.js +33 -0
- package/dist/locale/translations/en.cjs +1 -0
- package/dist/locale/translations/en.js +60 -0
- package/dist/util/DateUtil.cjs +1 -0
- package/dist/util/DateUtil.js +6 -0
- package/dist/util/ImageUtil.cjs +1 -0
- package/dist/util/ImageUtil.js +63 -0
- package/dist/util/NumberUtil.cjs +1 -0
- package/dist/util/NumberUtil.js +60 -0
- package/dist/util/ValidationUtil.cjs +1 -0
- package/dist/util/ValidationUtil.js +60 -0
- package/dist/util/index.cjs +1 -1
- package/dist/util/index.js +4 -4
- package/package.json +1 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
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,
|
|
9
|
+
rules: j = [],
|
|
10
|
+
required: y,
|
|
11
|
+
placeholder: l,
|
|
12
|
+
notSearch: w,
|
|
13
|
+
children: a,
|
|
14
|
+
readOnly: o,
|
|
15
|
+
items: s,
|
|
16
|
+
dropdownRender: u,
|
|
17
|
+
itemBuilder: L,
|
|
18
|
+
loading: d,
|
|
19
|
+
showLoadingInEmptyIndicator: T,
|
|
20
|
+
nameFieldInArray: h = "name",
|
|
21
|
+
innerRef: N,
|
|
22
|
+
tooltip: _,
|
|
23
|
+
filterOption: E,
|
|
24
|
+
tagRender: A,
|
|
25
|
+
...n
|
|
26
|
+
}) {
|
|
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);
|
|
31
|
+
},
|
|
32
|
+
[h]
|
|
33
|
+
);
|
|
34
|
+
return /* @__PURE__ */ t.jsx(
|
|
35
|
+
H,
|
|
36
|
+
{
|
|
37
|
+
renderEmpty: T && d ? () => /* @__PURE__ */ t.jsx(P, {}) : void 0,
|
|
38
|
+
children: /* @__PURE__ */ t.jsx(D, { title: _, children: /* @__PURE__ */ t.jsx(
|
|
39
|
+
R.Item,
|
|
40
|
+
{
|
|
41
|
+
label: m,
|
|
42
|
+
name: n.name,
|
|
43
|
+
help: n.help,
|
|
44
|
+
className: n.className,
|
|
45
|
+
rules: [
|
|
46
|
+
...j,
|
|
47
|
+
{
|
|
48
|
+
required: y,
|
|
49
|
+
message: `${m ?? l ?? ""} ${I(
|
|
50
|
+
"err.validation.required"
|
|
51
|
+
)}`
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
children: /* @__PURE__ */ t.jsx(
|
|
55
|
+
b,
|
|
56
|
+
{
|
|
57
|
+
ref: N,
|
|
58
|
+
loading: d,
|
|
59
|
+
open: o ? !1 : void 0,
|
|
60
|
+
onChange: !o && n.onChange,
|
|
61
|
+
allowClear: !o && n.allowClear,
|
|
62
|
+
showSearch: !w,
|
|
63
|
+
className: `max-width ${o ? "readOnly" : ""}`,
|
|
64
|
+
...n,
|
|
65
|
+
tagRender: A,
|
|
66
|
+
placeholder: l ?? m,
|
|
67
|
+
filterOption: E ?? ((e, r) => {
|
|
68
|
+
var c, x, C, g;
|
|
69
|
+
try {
|
|
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, "");
|
|
71
|
+
return O.every(
|
|
72
|
+
(f) => S.indexOf(f) >= 0 || $.indexOf(f) >= 0 || k.indexOf(f) >= 0
|
|
73
|
+
);
|
|
74
|
+
} catch (i) {
|
|
75
|
+
return console.log(i), !0;
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
dropdownRender: u,
|
|
79
|
+
children: a === null ? void 0 : a ?? (s && (s == null ? void 0 : s.map(L ?? M)))
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
) })
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
Q as default
|
|
89
|
+
};
|
|
@@ -0,0 +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,{...r});exports.ShowMore=e;exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
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 = ({
|
|
7
|
+
positionOfRoute: n,
|
|
8
|
+
initialKey: s = "*",
|
|
9
|
+
tabs: i,
|
|
10
|
+
className: m = "",
|
|
11
|
+
mode: l = "default"
|
|
12
|
+
}) => {
|
|
13
|
+
const [p, u] = g(s), o = y(), d = (t) => {
|
|
14
|
+
o(t);
|
|
15
|
+
}, c = N();
|
|
16
|
+
w(() => {
|
|
17
|
+
const t = c.pathname.split("/")[n];
|
|
18
|
+
u(t ?? ""), t || o(s, { replace: !0 });
|
|
19
|
+
}, [s, c.pathname, o, n]);
|
|
20
|
+
const { isDesktop: f } = v(), a = l === "side" && f, h = a ? "left" : "top", x = a ? "d-flex h-100" : "";
|
|
21
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `${m} ${x}`, children: [
|
|
22
|
+
/* @__PURE__ */ e.jsx(
|
|
23
|
+
r,
|
|
24
|
+
{
|
|
25
|
+
type: "card",
|
|
26
|
+
tabPosition: h,
|
|
27
|
+
activeKey: p,
|
|
28
|
+
onChange: d,
|
|
29
|
+
children: i.map(({ key: t, label: j }) => /* @__PURE__ */ e.jsx(r.TabPane, { tab: j }, t))
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ e.jsx(S, { className: `max-height ${a ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e.jsx(P, {}) })
|
|
33
|
+
] });
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
E as TabViewWithRoute
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { j as l } from "../../../_virtual/jsx-runtime.js";
|
|
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
|
+
onPageSizeChanged: h,
|
|
9
|
+
pagination: e = !1,
|
|
10
|
+
rowKey: s = "id",
|
|
11
|
+
columns: o,
|
|
12
|
+
className: n,
|
|
13
|
+
scroll: t,
|
|
14
|
+
...i
|
|
15
|
+
}) {
|
|
16
|
+
const r = u(() => o.filter((a) => !a.hidden), [o]);
|
|
17
|
+
return /* @__PURE__ */ l.jsx(
|
|
18
|
+
m,
|
|
19
|
+
{
|
|
20
|
+
className: `custom-scroll ${n}`,
|
|
21
|
+
style: { width: "100%" },
|
|
22
|
+
columns: r,
|
|
23
|
+
rowKey: s,
|
|
24
|
+
...i,
|
|
25
|
+
scroll: t || {
|
|
26
|
+
// y: `calc(100vh - ${minusHeight ?? 0}px)`,
|
|
27
|
+
x: !0
|
|
28
|
+
// scrollToFirstRowOnChange: true,
|
|
29
|
+
},
|
|
30
|
+
pagination: e && {
|
|
31
|
+
...e,
|
|
32
|
+
hideOnSinglePage: !0,
|
|
33
|
+
showSizeChanger: !1
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
j as default
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { j as f } from "../../../_virtual/jsx-runtime.js";
|
|
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
|
+
const C = ({
|
|
6
|
+
onClick: e,
|
|
7
|
+
clickable: m,
|
|
8
|
+
colorFunction: o,
|
|
9
|
+
translation: p,
|
|
10
|
+
value: r
|
|
11
|
+
}) => {
|
|
12
|
+
var s;
|
|
13
|
+
const t = o == null ? void 0 : o(r), { t: i } = A(T), n = x;
|
|
14
|
+
return /* @__PURE__ */ f.jsx(
|
|
15
|
+
n,
|
|
16
|
+
{
|
|
17
|
+
onClick: e,
|
|
18
|
+
color: t == null ? void 0 : t.color,
|
|
19
|
+
icon: t == null ? void 0 : t.icon,
|
|
20
|
+
style: {
|
|
21
|
+
color: t == null ? void 0 : t.text,
|
|
22
|
+
cursor: m ? "pointer" : void 0
|
|
23
|
+
},
|
|
24
|
+
children: (s = i(p[r])) == null ? void 0 : s.toUpperCase()
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
C as default
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("antd"),{Text:t}=e.Typography;exports.Text=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("antd"),{Title:t}=e.Typography;exports.Title=t;
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { j as s } from "../../../_virtual/jsx-runtime.js";
|
|
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(
|
|
9
|
+
function({
|
|
10
|
+
// eslint-disable-next-line no-unused-vars
|
|
11
|
+
type: q,
|
|
12
|
+
required: i,
|
|
13
|
+
label: t,
|
|
14
|
+
rules: m = [],
|
|
15
|
+
placeholder: o,
|
|
16
|
+
onEnter: a,
|
|
17
|
+
form: c,
|
|
18
|
+
nextFocus: u,
|
|
19
|
+
min: p,
|
|
20
|
+
moneyField: e,
|
|
21
|
+
addonAfter: x,
|
|
22
|
+
minLength: j,
|
|
23
|
+
defaultValue: N,
|
|
24
|
+
pattern: T,
|
|
25
|
+
disabled: E,
|
|
26
|
+
readOnly: $,
|
|
27
|
+
onChange: g,
|
|
28
|
+
value: l,
|
|
29
|
+
max: A,
|
|
30
|
+
addonBefore: I,
|
|
31
|
+
size: R,
|
|
32
|
+
isInt: d = !1,
|
|
33
|
+
tooltip: h,
|
|
34
|
+
...w
|
|
35
|
+
}, B) {
|
|
36
|
+
const { t: f } = b(L), C = F(
|
|
37
|
+
() => [
|
|
38
|
+
...m,
|
|
39
|
+
{
|
|
40
|
+
required: i,
|
|
41
|
+
message: `${t ?? o ?? ""} ${f(
|
|
42
|
+
"err.validation.required"
|
|
43
|
+
)}`
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
[m, t, o, f, i]
|
|
47
|
+
);
|
|
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,
|
|
50
|
+
{
|
|
51
|
+
ref: B,
|
|
52
|
+
disabled: E,
|
|
53
|
+
defaultValue: N,
|
|
54
|
+
value: l,
|
|
55
|
+
readOnly: $,
|
|
56
|
+
addonBefore: I,
|
|
57
|
+
minLength: j,
|
|
58
|
+
addonAfter: x,
|
|
59
|
+
step: d ? 1 : void 0,
|
|
60
|
+
pattern: d ? "d*" : T,
|
|
61
|
+
onChange: g,
|
|
62
|
+
onPressEnter: (r) => _(r, u, c, a),
|
|
63
|
+
className: "max-width",
|
|
64
|
+
min: p === null ? void 0 : p ?? 0,
|
|
65
|
+
max: A,
|
|
66
|
+
type: e ? void 0 : "number",
|
|
67
|
+
size: R,
|
|
68
|
+
formatter: e ? (r) => {
|
|
69
|
+
if (r.includes(".")) {
|
|
70
|
+
const n = `${r}`.split(".");
|
|
71
|
+
return n[0] = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), n.join(".");
|
|
72
|
+
} else
|
|
73
|
+
return `${r}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
74
|
+
} : void 0,
|
|
75
|
+
parser: e ? (r) => r == null ? void 0 : r.replace(/\$\s?|(,*)/g, "") : void 0,
|
|
76
|
+
placeholder: o ?? t
|
|
77
|
+
}
|
|
78
|
+
) }) });
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
export {
|
|
82
|
+
K as default
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import l from "../../../util/ValidationUtil.js";
|
|
3
|
+
import i from "./TextField.js";
|
|
4
|
+
const m = (e) => /* @__PURE__ */ t.jsx(
|
|
5
|
+
i,
|
|
6
|
+
{
|
|
7
|
+
...e,
|
|
8
|
+
rules: [
|
|
9
|
+
...e.rules ?? [],
|
|
10
|
+
...l.phoneValidation(
|
|
11
|
+
e.label ?? e.placeholder ?? ""
|
|
12
|
+
)
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
m as default
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { j as a } from "../../../_virtual/jsx-runtime.js";
|
|
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) => {
|
|
6
|
+
var o;
|
|
7
|
+
e && t && (r.preventDefault(), (o = t == null ? void 0 : t.getFieldInstance(e)) == null || o.focus()), n && n(r);
|
|
8
|
+
}, F = ({
|
|
9
|
+
required: r,
|
|
10
|
+
label: e,
|
|
11
|
+
rules: t = [],
|
|
12
|
+
placeholder: n,
|
|
13
|
+
onEnter: o,
|
|
14
|
+
nextFocus: u,
|
|
15
|
+
className: s,
|
|
16
|
+
...i
|
|
17
|
+
}) => {
|
|
18
|
+
const { t: p } = A(l), c = m.useFormInstance();
|
|
19
|
+
return /* @__PURE__ */ a.jsx(
|
|
20
|
+
m.Item,
|
|
21
|
+
{
|
|
22
|
+
...i,
|
|
23
|
+
className: s,
|
|
24
|
+
label: e,
|
|
25
|
+
rules: [
|
|
26
|
+
...t,
|
|
27
|
+
{
|
|
28
|
+
required: r,
|
|
29
|
+
message: `${e} ${p("err.validation.required")}`
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
children: /* @__PURE__ */ a.jsx(
|
|
33
|
+
x.TextArea,
|
|
34
|
+
{
|
|
35
|
+
...i,
|
|
36
|
+
className: s,
|
|
37
|
+
onPressEnter: (d) => I(d, u, c, o),
|
|
38
|
+
placeholder: n ?? e
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
F as default,
|
|
46
|
+
I as onEnterInternalTextField
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
import { TRANSLATION_NAMESPACE as $ } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
import D from "../tooltip/TooltipComponent.js";
|
|
6
|
+
import { useTranslation as L } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
7
|
+
import O from "../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
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 = ({
|
|
12
|
+
type: o,
|
|
13
|
+
required: n,
|
|
14
|
+
label: t,
|
|
15
|
+
disabled: s,
|
|
16
|
+
rules: r = [],
|
|
17
|
+
placeholder: m,
|
|
18
|
+
onEnter: f,
|
|
19
|
+
size: d,
|
|
20
|
+
form: c,
|
|
21
|
+
addonAfter: l,
|
|
22
|
+
addonBefore: u,
|
|
23
|
+
nextFocus: x,
|
|
24
|
+
autoComplete: j = "off",
|
|
25
|
+
defaultValue: I,
|
|
26
|
+
readOnly: T,
|
|
27
|
+
value: A,
|
|
28
|
+
loading: E,
|
|
29
|
+
onBlur: g,
|
|
30
|
+
inputRef: v,
|
|
31
|
+
status: C,
|
|
32
|
+
autoFocus: P,
|
|
33
|
+
onChange: k,
|
|
34
|
+
tooltip: h,
|
|
35
|
+
...F
|
|
36
|
+
}) => {
|
|
37
|
+
const { t: a } = L($), N = S(() => {
|
|
38
|
+
const e = [
|
|
39
|
+
...r,
|
|
40
|
+
{
|
|
41
|
+
required: n,
|
|
42
|
+
message: `${t ?? m ?? ""} ${a(
|
|
43
|
+
"err.validation.required"
|
|
44
|
+
)}`
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
return o === "email" && e.push({
|
|
48
|
+
type: "email",
|
|
49
|
+
message: a("err.validation.invalidEmail")
|
|
50
|
+
}), e;
|
|
51
|
+
}, [r, n, t, m, a, o]), R = {
|
|
52
|
+
disabled: s,
|
|
53
|
+
value: A,
|
|
54
|
+
readOnly: T,
|
|
55
|
+
defaultValue: I,
|
|
56
|
+
autoFocus: P,
|
|
57
|
+
addonBefore: u,
|
|
58
|
+
ref: v,
|
|
59
|
+
onBlur: g,
|
|
60
|
+
addonAfter: E ? /* @__PURE__ */ i.jsx(O, {}) : l,
|
|
61
|
+
status: C,
|
|
62
|
+
size: d,
|
|
63
|
+
autoComplete: j,
|
|
64
|
+
onPressEnter: (e) => _(e, x, c, f),
|
|
65
|
+
type: o,
|
|
66
|
+
placeholder: m ?? t
|
|
67
|
+
}, w = o == "password" ? p.Password : p;
|
|
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 }) }) });
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
Q as default,
|
|
72
|
+
_ as onEnterInternalTextField
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { j as t } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Result as j } from "antd";
|
|
3
|
+
import { t as e } from "../../../node_modules/i18next/dist/esm/i18next.js";
|
|
4
|
+
import a from "../button/Button.js";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as y } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import { useTranslation as R } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
7
|
+
import T from "../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
8
|
+
import h from "../../../node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js";
|
|
9
|
+
const S = ({
|
|
10
|
+
errorChildren: d,
|
|
11
|
+
children: f,
|
|
12
|
+
onRetry: p,
|
|
13
|
+
onClickBack: r,
|
|
14
|
+
success: i,
|
|
15
|
+
loading: s,
|
|
16
|
+
error: o,
|
|
17
|
+
successTitle: u = e("str.success"),
|
|
18
|
+
successMessage: v,
|
|
19
|
+
errorMessage: n = e("err.save"),
|
|
20
|
+
errorTitle: l = e("str.error"),
|
|
21
|
+
loadingTitle: x = e("message.loading.saving"),
|
|
22
|
+
loadingMessage: c
|
|
23
|
+
}) => {
|
|
24
|
+
const { t: m } = R(y);
|
|
25
|
+
return /* @__PURE__ */ t.jsx(
|
|
26
|
+
j,
|
|
27
|
+
{
|
|
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
|
+
title: s ? x : i ? u : o ? l : void 0,
|
|
30
|
+
icon: s ? /* @__PURE__ */ t.jsx(T, {}) : void 0,
|
|
31
|
+
subTitle: s ? c : i ? v : o ? typeof n == "function" ? n() ?? m("err.save") : n ?? m("err.save") : void 0,
|
|
32
|
+
extra: [
|
|
33
|
+
i ? /* @__PURE__ */ t.jsx(t.Fragment, { children: f }) : o ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
34
|
+
!!r && /* @__PURE__ */ t.jsx(
|
|
35
|
+
a,
|
|
36
|
+
{
|
|
37
|
+
onClick: r,
|
|
38
|
+
htmlType: "button",
|
|
39
|
+
type: "primary",
|
|
40
|
+
icon: /* @__PURE__ */ t.jsx(h, {}),
|
|
41
|
+
children: m("str.previous")
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
!!p && /* @__PURE__ */ t.jsx(
|
|
45
|
+
a,
|
|
46
|
+
{
|
|
47
|
+
type: "primary",
|
|
48
|
+
onClick: () => p(void 0, void 0, !0),
|
|
49
|
+
children: m("str.retry")
|
|
50
|
+
},
|
|
51
|
+
"retry"
|
|
52
|
+
),
|
|
53
|
+
d
|
|
54
|
+
] }) : /* @__PURE__ */ t.jsx(t.Fragment, {})
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
S as default
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { j as n } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Steps as S } from "antd";
|
|
3
|
+
import { forwardRef as E, useState as w, useEffect as H, useImperativeHandle as R, useCallback as v, useMemo as _ } from "react";
|
|
4
|
+
import $ from "../appearance/Hider.js";
|
|
5
|
+
const { Step: z } = S, V = E(
|
|
6
|
+
({
|
|
7
|
+
pages: a,
|
|
8
|
+
onSubmit: l,
|
|
9
|
+
initPosition: m = 0,
|
|
10
|
+
progressDot: g,
|
|
11
|
+
type: b,
|
|
12
|
+
labelPlacement: k,
|
|
13
|
+
className: F,
|
|
14
|
+
pageStyle: y
|
|
15
|
+
}, C) => {
|
|
16
|
+
const [e, i] = w(0), [r, p] = w(
|
|
17
|
+
[]
|
|
18
|
+
);
|
|
19
|
+
H(() => {
|
|
20
|
+
i(m);
|
|
21
|
+
}, [m]), R(
|
|
22
|
+
C,
|
|
23
|
+
() => ({
|
|
24
|
+
gotTo: (t) => i(t)
|
|
25
|
+
}),
|
|
26
|
+
[]
|
|
27
|
+
);
|
|
28
|
+
const d = v(
|
|
29
|
+
(t, c = !1, f = !1) => {
|
|
30
|
+
const s = [...r];
|
|
31
|
+
if (t !== void 0 && (s[e] = t, p(s)), f || i(e + 1), c && l) {
|
|
32
|
+
const o = {};
|
|
33
|
+
for (const j of s)
|
|
34
|
+
for (const x in j)
|
|
35
|
+
o[x] = j[x];
|
|
36
|
+
l(s, o);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
[e, r, l]
|
|
40
|
+
), u = v(() => {
|
|
41
|
+
const t = [...r];
|
|
42
|
+
t[e] = void 0, p(t), i(e - 1);
|
|
43
|
+
}, [e, r]), h = _(() => {
|
|
44
|
+
const t = [], c = [], f = a.filter((s) => !s.hidden);
|
|
45
|
+
for (let s = 0; s < f.length; s++) {
|
|
46
|
+
const o = f[s];
|
|
47
|
+
c.push(
|
|
48
|
+
/* @__PURE__ */ n.jsx($, { hide: e !== s, children: o.component({ forward: d, backward: u }, r, e === s) }, `${o.title}${s}`)
|
|
49
|
+
), t.push(/* @__PURE__ */ n.jsx(z, { icon: o.icon, title: o.title }, o.title));
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
_pages: c,
|
|
53
|
+
steps: t
|
|
54
|
+
};
|
|
55
|
+
}, [u, e, r, d, a]);
|
|
56
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
57
|
+
/* @__PURE__ */ n.jsx(
|
|
58
|
+
S,
|
|
59
|
+
{
|
|
60
|
+
labelPlacement: k,
|
|
61
|
+
progressDot: g,
|
|
62
|
+
className: [F, "pb-3"].join(" "),
|
|
63
|
+
current: e,
|
|
64
|
+
type: b,
|
|
65
|
+
children: h.steps
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ n.jsx("div", { style: y, children: h._pages })
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
export {
|
|
73
|
+
V as default
|
|
74
|
+
};
|