@kingteza/crud-component 1.0.14 → 1.0.16
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 -1
- package/dist/components/common/DatePicker/DatePicker.js +42 -42
- package/dist/components/common/DatePicker/TimePicker.cjs +1 -1
- package/dist/components/common/DatePicker/TimePicker.js +39 -39
- package/dist/components/common/appearance/Hider.cjs +1 -1
- package/dist/components/common/appearance/Hider.js +3 -3
- package/dist/components/common/button/Button.cjs +1 -1
- package/dist/components/common/button/Button.js +19 -19
- package/dist/components/common/button/CloneButtonTable.cjs +1 -1
- package/dist/components/common/button/CloneButtonTable.js +11 -11
- package/dist/components/common/button/DeleteButtonTable.cjs +1 -1
- package/dist/components/common/button/DeleteButtonTable.js +29 -29
- package/dist/components/common/button/ExportButton.cjs +1 -1
- package/dist/components/common/button/ExportButton.js +17 -17
- package/dist/components/common/button/HideButtonTable.cjs +1 -1
- package/dist/components/common/button/HideButtonTable.js +35 -35
- package/dist/components/common/button/ImportButton.cjs +1 -1
- package/dist/components/common/button/ImportButton.js +28 -28
- package/dist/components/common/button/NewButton.cjs +1 -1
- package/dist/components/common/button/NewButton.js +14 -14
- package/dist/components/common/button/PrintButton.cjs +1 -1
- package/dist/components/common/button/PrintButton.js +14 -14
- package/dist/components/common/button/RefreshButton.cjs +1 -1
- package/dist/components/common/button/RefreshButton.js +16 -16
- package/dist/components/common/button/UnHideButton.cjs +1 -1
- package/dist/components/common/button/UnHideButton.js +37 -37
- package/dist/components/common/button/UpdateButtonTable.cjs +1 -1
- package/dist/components/common/button/UpdateButtonTable.js +11 -11
- package/dist/components/common/button/ViewButtonTable.cjs +1 -1
- package/dist/components/common/button/ViewButtonTable.js +10 -10
- package/dist/components/common/check-box/CheckBox.cjs +1 -1
- package/dist/components/common/check-box/CheckBox.js +20 -20
- package/dist/components/common/description/DescList.cjs +1 -1
- package/dist/components/common/description/DescList.js +9 -9
- package/dist/components/common/layout/VerticalSpace.cjs +1 -1
- package/dist/components/common/layout/VerticalSpace.js +3 -3
- package/dist/components/common/loading/LoadingIndicator.cjs +1 -1
- package/dist/components/common/loading/LoadingIndicator.js +12 -12
- package/dist/components/common/picker/ImagePicker.cjs +1 -1
- package/dist/components/common/picker/ImagePicker.js +173 -176
- package/dist/components/common/radio/RadioGroupComponent.cjs +1 -1
- package/dist/components/common/radio/RadioGroupComponent.js +6 -6
- package/dist/components/common/report/SelectFieldInReport.cjs +1 -1
- package/dist/components/common/report/SelectFieldInReport.js +11 -11
- package/dist/components/common/select/CustomSelectOption.cjs +1 -1
- package/dist/components/common/select/CustomSelectOption.js +7 -7
- package/dist/components/common/select/SelectComponent.cjs +1 -1
- package/dist/components/common/select/SelectComponent.js +36 -36
- package/dist/components/common/show-more/index.cjs +1 -1
- package/dist/components/common/show-more/index.js +5 -5
- package/dist/components/common/tab/TabViewWithRoute.cjs +1 -1
- package/dist/components/common/tab/TabViewWithRoute.js +23 -22
- package/dist/components/common/table/table.cjs +1 -1
- package/dist/components/common/table/table.js +12 -12
- package/dist/components/common/tag/StatusTag.cjs +1 -1
- package/dist/components/common/tag/StatusTag.js +13 -13
- package/dist/components/common/text-field/NumberField.cjs +1 -1
- package/dist/components/common/text-field/NumberField.js +43 -43
- package/dist/components/common/text-field/PhoneNumberField.cjs +1 -1
- package/dist/components/common/text-field/PhoneNumberField.js +4 -4
- package/dist/components/common/text-field/TextArea.cjs +1 -1
- package/dist/components/common/text-field/TextArea.js +20 -20
- package/dist/components/common/text-field/TextField.cjs +1 -1
- package/dist/components/common/text-field/TextField.js +47 -47
- package/dist/components/common/tooltip/TooltipComponent.cjs +1 -1
- package/dist/components/common/tooltip/TooltipComponent.js +3 -3
- package/dist/components/common/wizard/WizardResult.cjs +1 -1
- package/dist/components/common/wizard/WizardResult.js +37 -38
- package/dist/components/common/wizard/WizardViewForm.cjs +1 -1
- package/dist/components/common/wizard/WizardViewForm.js +43 -43
- package/dist/components/crud/CrudComponent.cjs +1 -1
- package/dist/components/crud/CrudComponent.js +130 -130
- package/dist/components/crud/CrudField.cjs +1 -1
- package/dist/components/crud/CrudField.js +217 -217
- package/dist/components/crud/CrudForm.cjs +1 -1
- package/dist/components/crud/CrudForm.js +55 -55
- package/dist/components/crud/CrudFormWizard.cjs +1 -1
- package/dist/components/crud/CrudFormWizard.js +82 -84
- package/dist/components/crud/CrudReportComponent.cjs +3 -3
- package/dist/components/crud/CrudReportComponent.js +123 -123
- package/dist/components/crud/CrudSearchComponent.cjs +1 -1
- package/dist/components/crud/CrudSearchComponent.js +43 -43
- package/dist/components/crud/FileCrudField.cjs +1 -1
- package/dist/components/crud/FileCrudField.js +118 -125
- package/dist/components/crud/ImageCrudField.cjs +1 -1
- package/dist/components/crud/ImageCrudField.js +56 -56
- package/dist/components/crud/import/CrudImportButton.cjs +1 -1
- package/dist/components/crud/import/CrudImportButton.js +18 -18
- package/dist/components/crud/import/CrudImportComponent.cjs +2 -2
- package/dist/components/crud/import/CrudImportComponent.js +108 -109
- package/dist/components/crud/view/CrudDecListView.cjs +1 -1
- package/dist/components/crud/view/CrudDecListView.js +22 -22
- package/dist/components/crud/view/CrudViewer.cjs +1 -1
- package/dist/components/crud/view/CrudViewer.js +152 -152
- package/dist/components/crud/view/CrudViewerUtil.cjs +1 -1
- package/dist/components/crud/view/CrudViewerUtil.js +33 -34
- package/dist/locale/index.cjs +1 -1
- package/dist/locale/index.js +2 -2
- package/dist/util/DateUtil.cjs +1 -1
- package/dist/util/DateUtil.js +4 -4
- package/dist/util/ImageUtil.cjs +1 -1
- package/dist/util/ImageUtil.js +1 -1
- package/dist/util/ValidationUtil.cjs +1 -1
- package/dist/util/ValidationUtil.js +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { Form as f, Select as m } from "antd";
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const r = f.useFormInstance(), [
|
|
7
|
-
return
|
|
8
|
-
if (e &&
|
|
3
|
+
import { useState as F, useEffect as S } from "react";
|
|
4
|
+
import b from "../select/SelectComponent.js";
|
|
5
|
+
const k = ({ className: n, onSelect: p, label: u, required: a, name: l, mode: o, items: e }) => {
|
|
6
|
+
const r = f.useFormInstance(), [c, d] = F(!0);
|
|
7
|
+
return S(() => {
|
|
8
|
+
if (e && c) {
|
|
9
9
|
const t = e.filter((i) => i.alreadySelected).map((i) => i.id);
|
|
10
10
|
r == null || r.setFieldsValue({
|
|
11
11
|
[l]: o === "multiple" ? t : t == null ? void 0 : t[0]
|
|
12
12
|
}), d(!1);
|
|
13
13
|
}
|
|
14
|
-
}, [
|
|
15
|
-
|
|
14
|
+
}, [c, r, e, o, l]), /* @__PURE__ */ s(
|
|
15
|
+
b,
|
|
16
16
|
{
|
|
17
17
|
required: a,
|
|
18
18
|
label: u,
|
|
@@ -21,10 +21,10 @@ const R = ({ className: n, onSelect: p, label: u, required: a, name: l, mode: o,
|
|
|
21
21
|
name: l,
|
|
22
22
|
onSelect: p,
|
|
23
23
|
items: e,
|
|
24
|
-
itemBuilder: (t) => /* @__PURE__ */
|
|
24
|
+
itemBuilder: (t) => /* @__PURE__ */ s(m.Option, { value: t.id, disabled: t.lock, children: t.label }, t.id)
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
k as SelectFieldInReport
|
|
30
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("antd"),n=s.List.Item.Meta,r=s.List.Item,o=({title:e,description:i,children:c})=>t.jsxs(r,{className:"",children:[t.jsx("div",{children:t.jsx(n,{title:e,description:i})}),t.jsx("div",{className:"float-right",children:c})]});module.exports=o;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { List as
|
|
3
|
-
const
|
|
4
|
-
title:
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { List as e } from "antd";
|
|
3
|
+
const a = e.Item.Meta, i = e.Item, n = ({
|
|
4
|
+
title: s,
|
|
5
5
|
description: o,
|
|
6
6
|
children: m
|
|
7
|
-
}) => /* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */ t
|
|
9
|
-
/* @__PURE__ */ t
|
|
7
|
+
}) => /* @__PURE__ */ r(i, { className: "", children: [
|
|
8
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(a, { title: s, description: o }) }),
|
|
9
|
+
/* @__PURE__ */ t("div", { className: "float-right", children: m })
|
|
10
10
|
] });
|
|
11
11
|
export {
|
|
12
12
|
n as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),a=require("antd"),k=require("react"),H=require("react-i18next"),P=require("../../../locale/hooks/translation-constants.cjs"),b=require("../tooltip/TooltipComponent.cjs");function B({label:l,rules:j=[],required:w,placeholder:h,notSearch:q,children:x,readOnly:s,items:o,dropdownRender:L,itemBuilder:T,loading:f,showLoadingInEmptyIndicator:N,nameFieldInArray:m="name",innerRef:_,tooltip:I,filterOption:p,tagRender:A,...n}){const{t:E}=H.useTranslation(P.TRANSLATION_NAMESPACE),M=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[m];return r.jsx("option",{value:t,children:r.jsx("div",{dangerouslySetInnerHTML:{__html:c}})},t)},[m]);return r.jsx(a.ConfigProvider,{renderEmpty:N&&f?()=>r.jsx(a.Spin,{}):void 0,children:r.jsx(b,{title:I,children:r.jsx(a.Form.Item,{label:l,name:n.name,help:n.help,className:n.className,rules:[...j,{required:w,message:`${l??h??""} ${E("err.validation.required")}`}],children:r.jsx(a.Select,{ref:_,loading:f,open:s?!1:void 0,onChange:!s&&n.onChange,allowClear:!s&&n.allowClear,showSearch:!q,className:`max-width ${s?"readOnly":""}`,...n,tagRender:A,placeholder:h??l,filterOption:p??((e,t)=>{var c,C,u,g;try{const i=(u=(C=(c=t==null?void 0:t.children)==null?void 0:c.props)==null?void 0:C.dangerouslySetInnerHTML)==null?void 0:u.__html,O=e.toLowerCase().split(/\s+/),S=(t==null?void 0:t.children)??"",y=typeof S=="string"?S.toLowerCase():typeof i=="string"?i.toLowerCase():"",R=(((g=t==null?void 0:t.value)==null?void 0:g.toString())??"").toLowerCase(),$=y.replace(/\s/g,"");return O.every(d=>y.indexOf(d)>=0||R.indexOf(d)>=0||$.indexOf(d)>=0)}catch(i){return console.log(i),!0}}),dropdownRender:L,children:x===null?void 0:x??(o&&(o==null?void 0:o.map(T??M)))})})})})}module.exports=B;
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { ConfigProvider as P, Spin as b, Form as j, Select as q } from "antd";
|
|
3
|
+
import { useCallback as B } from "react";
|
|
4
|
+
import { useTranslation as D } from "react-i18next";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as F } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import R from "../tooltip/TooltipComponent.js";
|
|
7
7
|
function Q({
|
|
8
8
|
label: m,
|
|
9
|
-
rules:
|
|
10
|
-
required:
|
|
9
|
+
rules: w = [],
|
|
10
|
+
required: x,
|
|
11
11
|
placeholder: l,
|
|
12
|
-
notSearch:
|
|
12
|
+
notSearch: L,
|
|
13
13
|
children: a,
|
|
14
14
|
readOnly: o,
|
|
15
15
|
items: s,
|
|
16
|
-
dropdownRender:
|
|
17
|
-
itemBuilder:
|
|
16
|
+
dropdownRender: T,
|
|
17
|
+
itemBuilder: u,
|
|
18
18
|
loading: d,
|
|
19
|
-
showLoadingInEmptyIndicator:
|
|
19
|
+
showLoadingInEmptyIndicator: N,
|
|
20
20
|
nameFieldInArray: h = "name",
|
|
21
|
-
innerRef:
|
|
22
|
-
tooltip:
|
|
21
|
+
innerRef: _,
|
|
22
|
+
tooltip: A,
|
|
23
23
|
filterOption: E,
|
|
24
|
-
tagRender:
|
|
24
|
+
tagRender: I,
|
|
25
25
|
...n
|
|
26
26
|
}) {
|
|
27
|
-
const { t:
|
|
27
|
+
const { t: M } = D(F), O = B(
|
|
28
28
|
(e) => {
|
|
29
29
|
const r = typeof e == "string" || typeof e == "number" ? e : e == null ? void 0 : e.id, c = typeof e == "string" || typeof e == "number" ? e : e == null ? void 0 : e[h];
|
|
30
|
-
return /* @__PURE__ */ t
|
|
30
|
+
return /* @__PURE__ */ t("option", { value: r, children: /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: c } }) }, r);
|
|
31
31
|
},
|
|
32
32
|
[h]
|
|
33
33
|
);
|
|
34
|
-
return /* @__PURE__ */ t
|
|
35
|
-
|
|
34
|
+
return /* @__PURE__ */ t(
|
|
35
|
+
P,
|
|
36
36
|
{
|
|
37
|
-
renderEmpty:
|
|
38
|
-
children: /* @__PURE__ */ t
|
|
39
|
-
|
|
37
|
+
renderEmpty: N && d ? () => /* @__PURE__ */ t(b, {}) : void 0,
|
|
38
|
+
children: /* @__PURE__ */ t(R, { title: A, children: /* @__PURE__ */ t(
|
|
39
|
+
j.Item,
|
|
40
40
|
{
|
|
41
41
|
label: m,
|
|
42
42
|
name: n.name,
|
|
43
43
|
help: n.help,
|
|
44
44
|
className: n.className,
|
|
45
45
|
rules: [
|
|
46
|
-
...
|
|
46
|
+
...w,
|
|
47
47
|
{
|
|
48
|
-
required:
|
|
49
|
-
message: `${m ?? l ?? ""} ${
|
|
48
|
+
required: x,
|
|
49
|
+
message: `${m ?? l ?? ""} ${M(
|
|
50
50
|
"err.validation.required"
|
|
51
51
|
)}`
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
|
-
children: /* @__PURE__ */ t
|
|
55
|
-
|
|
54
|
+
children: /* @__PURE__ */ t(
|
|
55
|
+
q,
|
|
56
56
|
{
|
|
57
|
-
ref:
|
|
57
|
+
ref: _,
|
|
58
58
|
loading: d,
|
|
59
59
|
open: o ? !1 : void 0,
|
|
60
60
|
onChange: !o && n.onChange,
|
|
61
61
|
allowClear: !o && n.allowClear,
|
|
62
|
-
showSearch: !
|
|
62
|
+
showSearch: !L,
|
|
63
63
|
className: `max-width ${o ? "readOnly" : ""}`,
|
|
64
64
|
...n,
|
|
65
|
-
tagRender:
|
|
65
|
+
tagRender: I,
|
|
66
66
|
placeholder: l ?? m,
|
|
67
67
|
filterOption: E ?? ((e, r) => {
|
|
68
|
-
var c,
|
|
68
|
+
var c, C, g, S;
|
|
69
69
|
try {
|
|
70
|
-
const i = (
|
|
71
|
-
return
|
|
72
|
-
(f) =>
|
|
70
|
+
const i = (g = (C = (c = r == null ? void 0 : r.children) == null ? void 0 : c.props) == null ? void 0 : C.dangerouslySetInnerHTML) == null ? void 0 : g.__html, $ = e.toLowerCase().split(/\s+/), p = (r == null ? void 0 : r.children) ?? "", y = typeof p == "string" ? p.toLowerCase() : typeof i == "string" ? i.toLowerCase() : "", k = (((S = r == null ? void 0 : r.value) == null ? void 0 : S.toString()) ?? "").toLowerCase(), H = y.replace(/\s/g, "");
|
|
71
|
+
return $.every(
|
|
72
|
+
(f) => y.indexOf(f) >= 0 || k.indexOf(f) >= 0 || H.indexOf(f) >= 0
|
|
73
73
|
);
|
|
74
74
|
} catch (i) {
|
|
75
75
|
return console.log(i), !0;
|
|
76
76
|
}
|
|
77
77
|
}),
|
|
78
|
-
dropdownRender:
|
|
79
|
-
children: a === null ? void 0 : a ?? (s && (s == null ? void 0 : s.map(
|
|
78
|
+
dropdownRender: T,
|
|
79
|
+
children: a === null ? void 0 : a ?? (s && (s == null ? void 0 : s.map(u ?? O)))
|
|
80
80
|
}
|
|
81
81
|
)
|
|
82
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),o=require("react-show-more-text");;/* empty css */const e=r=>t.jsx(o,{...r});exports.ShowMore=e;exports.default=e;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import t from "
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import t from "react-show-more-text";
|
|
3
3
|
/* empty css */
|
|
4
|
-
const
|
|
4
|
+
const a = (o) => /* @__PURE__ */ r(t, { ...o });
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
a as ShowMore,
|
|
7
|
+
a as default
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("antd"),g=require("../../../context/WindowDimension.cjs"),i=require("react"),u=require("react-router"),q=require("react-router-dom"),{Content:T}=c.Layout,y=({positionOfRoute:n,initialKey:s="*",tabs:l,className:d="",mode:h="default"})=>{const[b,m]=i.useState(s),o=u.useNavigate(),p=e=>{o(e)},r=q.useLocation();i.useEffect(()=>{const e=r.pathname.split("/")[n];m(e??""),e||o(s,{replace:!0})},[s,r.pathname,o,n]);const{isDesktop:x}=g(),a=h==="side"&&x,f=a?"left":"top",j=a?"d-flex h-100":"";return t.jsxs("div",{className:`${d} ${j}`,children:[t.jsx(c.Tabs,{type:"card",tabPosition:f,activeKey:b,onChange:p,children:l.map(({key:e,label:v})=>t.jsx(c.Tabs.TabPane,{tab:v},e))}),t.jsx(T,{className:`max-height ${a?"overflow-auto":""}`,children:t.jsx(u.Outlet,{})})]})};exports.TabViewWithRoute=y;
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Tabs as r, Layout as
|
|
3
|
-
import
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNavigate as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as v, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Tabs as r, Layout as x } from "antd";
|
|
3
|
+
import g from "../../../context/WindowDimension.js";
|
|
4
|
+
import { useState as y, useEffect as S } from "react";
|
|
5
|
+
import { useNavigate as w, Outlet as N } from "react-router";
|
|
6
|
+
import { useLocation as P } from "react-router-dom";
|
|
7
|
+
const { Content: T } = x, A = ({
|
|
8
|
+
positionOfRoute: c,
|
|
9
|
+
initialKey: o = "*",
|
|
9
10
|
tabs: i,
|
|
10
11
|
className: m = "",
|
|
11
12
|
mode: l = "default"
|
|
12
13
|
}) => {
|
|
13
|
-
const [p, u] =
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
const t =
|
|
18
|
-
u(t ?? ""), t || o
|
|
19
|
-
}, [
|
|
20
|
-
const { isDesktop:
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */ e
|
|
14
|
+
const [p, u] = y(o), s = w(), f = (t) => {
|
|
15
|
+
s(t);
|
|
16
|
+
}, n = P();
|
|
17
|
+
S(() => {
|
|
18
|
+
const t = n.pathname.split("/")[c];
|
|
19
|
+
u(t ?? ""), t || s(o, { replace: !0 });
|
|
20
|
+
}, [o, n.pathname, s, c]);
|
|
21
|
+
const { isDesktop: d } = g(), a = l === "side" && d, h = a ? "left" : "top";
|
|
22
|
+
return /* @__PURE__ */ v("div", { className: `${m} ${a ? "d-flex h-100" : ""}`, children: [
|
|
23
|
+
/* @__PURE__ */ e(
|
|
23
24
|
r,
|
|
24
25
|
{
|
|
25
26
|
type: "card",
|
|
26
27
|
tabPosition: h,
|
|
27
28
|
activeKey: p,
|
|
28
|
-
onChange:
|
|
29
|
-
children: i.map(({ key: t, label:
|
|
29
|
+
onChange: f,
|
|
30
|
+
children: i.map(({ key: t, label: b }) => /* @__PURE__ */ e(r.TabPane, { tab: b }, t))
|
|
30
31
|
}
|
|
31
32
|
),
|
|
32
|
-
/* @__PURE__ */ e
|
|
33
|
+
/* @__PURE__ */ e(T, { className: `max-height ${a ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e(N, {}) })
|
|
33
34
|
] });
|
|
34
35
|
};
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
A as TabViewWithRoute
|
|
37
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),c=require("antd"),l=require("react");function d({minusHeight:h,onRow:g,count:m=1,onPageSizeChanged:f,pagination:e=!1,rowKey:s="id",columns:t,className:o,scroll:n,...i}){const r=l.useMemo(()=>t.filter(u=>!u.hidden),[t]);return a.jsx(c.Table,{className:`custom-scroll ${o}`,style:{width:"100%"},columns:r,rowKey:s,...i,scroll:n||{x:!0},pagination:e&&{...e,hideOnSinglePage:!0,showSizeChanger:!1}})}module.exports=d;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { Table as m } from "antd";
|
|
3
3
|
import { useMemo as u } from "react";
|
|
4
|
-
function
|
|
4
|
+
function x({
|
|
5
5
|
minusHeight: f,
|
|
6
6
|
onRow: c,
|
|
7
7
|
count: d = 1,
|
|
8
8
|
onPageSizeChanged: h,
|
|
9
9
|
pagination: e = !1,
|
|
10
|
-
rowKey:
|
|
10
|
+
rowKey: n = "id",
|
|
11
11
|
columns: o,
|
|
12
|
-
className:
|
|
12
|
+
className: i,
|
|
13
13
|
scroll: t,
|
|
14
|
-
...
|
|
14
|
+
...r
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */ l
|
|
16
|
+
const s = u(() => o.filter((a) => !a.hidden), [o]);
|
|
17
|
+
return /* @__PURE__ */ l(
|
|
18
18
|
m,
|
|
19
19
|
{
|
|
20
|
-
className: `custom-scroll ${
|
|
20
|
+
className: `custom-scroll ${i}`,
|
|
21
21
|
style: { width: "100%" },
|
|
22
|
-
columns:
|
|
23
|
-
rowKey:
|
|
24
|
-
...
|
|
22
|
+
columns: s,
|
|
23
|
+
rowKey: n,
|
|
24
|
+
...r,
|
|
25
25
|
scroll: t || {
|
|
26
26
|
// y: `calc(100vh - ${minusHeight ?? 0}px)`,
|
|
27
27
|
x: !0
|
|
@@ -36,5 +36,5 @@ function j({
|
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
x as default
|
|
40
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const p=require("react/jsx-runtime"),u=require("antd"),x=require("../../../locale/hooks/translation-constants.cjs"),T=require("react-i18next"),q=({onClick:n,clickable:o,colorFunction:s,translation:c,value:e})=>{var r;const t=s==null?void 0:s(e),{t:i}=T.useTranslation(x.TRANSLATION_NAMESPACE),a=u.Tag;return p.jsx(a,{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=i(c[e]))==null?void 0:r.toUpperCase()})};module.exports=q;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Tag as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Tag as f } from "antd";
|
|
3
3
|
import { TRANSLATION_NAMESPACE as T } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
-
import { useTranslation as A } from "
|
|
5
|
-
const
|
|
4
|
+
import { useTranslation as A } from "react-i18next";
|
|
5
|
+
const S = ({
|
|
6
6
|
onClick: e,
|
|
7
7
|
clickable: m,
|
|
8
|
-
colorFunction:
|
|
8
|
+
colorFunction: t,
|
|
9
9
|
translation: p,
|
|
10
10
|
value: r
|
|
11
11
|
}) => {
|
|
12
12
|
var s;
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
13
|
+
const o = t == null ? void 0 : t(r), { t: n } = A(T);
|
|
14
|
+
return /* @__PURE__ */ i(
|
|
15
|
+
f,
|
|
16
16
|
{
|
|
17
17
|
onClick: e,
|
|
18
|
-
color:
|
|
19
|
-
icon:
|
|
18
|
+
color: o == null ? void 0 : o.color,
|
|
19
|
+
icon: o == null ? void 0 : o.icon,
|
|
20
20
|
style: {
|
|
21
|
-
color:
|
|
21
|
+
color: o == null ? void 0 : o.text,
|
|
22
22
|
cursor: m ? "pointer" : void 0
|
|
23
23
|
},
|
|
24
|
-
children: (s =
|
|
24
|
+
children: (s = n(p[r])) == null ? void 0 : s.toUpperCase()
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
29
|
+
S as default
|
|
30
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),p=require("antd"),m=require("react"),M=require("react-i18next"),P=require("../../../locale/hooks/translation-constants.cjs"),S=require("../tooltip/TooltipComponent.cjs"),L=require("./TextField.cjs"),O=m.forwardRef(function({type:b,required:i,label:e,rules:c=[],placeholder:r,onEnter:x,form:q,nextFocus:T,min:d,moneyField:n,addonAfter:f,minLength:N,defaultValue:j,pattern:l,disabled:I,readOnly:$,onChange:g,value:A,max:E,addonBefore:R,size:C,isInt:u=!1,tooltip:h,...w},B){const{t:a}=M.useTranslation(P.TRANSLATION_NAMESPACE),F=m.useMemo(()=>[...c,{required:i,message:`${e??r??""} ${a("err.validation.required")}`}],[c,e,r,a,i]);return o.jsx(S,{title:h,children:o.jsx(p.Form.Item,{...w,label:e,rules:F,children:o.jsx(p.InputNumber,{ref:B,disabled:I,defaultValue:j,value:A,readOnly:$,addonBefore:R,minLength:N,addonAfter:f,step:u?1:void 0,pattern:u?"d*":l,onChange:g,onPressEnter:t=>L.onEnterInternalTextField(t,T,q,x),className:"max-width",min:d===null?void 0:d??0,max:E,type:n?void 0:"number",size:C,formatter:n?t=>{if(t.includes(".")){const s=`${t}`.split(".");return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),s.join(".")}else return`${t}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")}:void 0,parser:n?t=>t==null?void 0:t.replace(/\$\s?|(,*)/g,""):void 0,placeholder:r??e})})})});module.exports=O;
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Form as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Form as P, InputNumber as R } from "antd";
|
|
3
3
|
import { forwardRef as S, useMemo as F } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import O from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
4
|
+
import { useTranslation as L } from "react-i18next";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as O } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import _ from "../tooltip/TooltipComponent.js";
|
|
7
|
+
import { onEnterInternalTextField as b } from "./TextField.js";
|
|
8
8
|
const K = S(
|
|
9
9
|
function({
|
|
10
10
|
// eslint-disable-next-line no-unused-vars
|
|
11
11
|
type: q,
|
|
12
|
-
required:
|
|
12
|
+
required: m,
|
|
13
13
|
label: t,
|
|
14
|
-
rules:
|
|
14
|
+
rules: s = [],
|
|
15
15
|
placeholder: o,
|
|
16
|
-
onEnter:
|
|
17
|
-
form:
|
|
16
|
+
onEnter: c,
|
|
17
|
+
form: a,
|
|
18
18
|
nextFocus: u,
|
|
19
19
|
min: p,
|
|
20
20
|
moneyField: e,
|
|
21
|
-
addonAfter:
|
|
22
|
-
minLength:
|
|
23
|
-
defaultValue:
|
|
24
|
-
pattern:
|
|
25
|
-
disabled:
|
|
26
|
-
readOnly:
|
|
27
|
-
onChange:
|
|
28
|
-
value:
|
|
29
|
-
max:
|
|
30
|
-
addonBefore:
|
|
31
|
-
size:
|
|
21
|
+
addonAfter: N,
|
|
22
|
+
minLength: T,
|
|
23
|
+
defaultValue: x,
|
|
24
|
+
pattern: $,
|
|
25
|
+
disabled: g,
|
|
26
|
+
readOnly: l,
|
|
27
|
+
onChange: A,
|
|
28
|
+
value: E,
|
|
29
|
+
max: I,
|
|
30
|
+
addonBefore: h,
|
|
31
|
+
size: j,
|
|
32
32
|
isInt: d = !1,
|
|
33
|
-
tooltip:
|
|
34
|
-
...
|
|
35
|
-
},
|
|
36
|
-
const { t: f } =
|
|
33
|
+
tooltip: w,
|
|
34
|
+
...B
|
|
35
|
+
}, C) {
|
|
36
|
+
const { t: f } = L(O), M = F(
|
|
37
37
|
() => [
|
|
38
|
-
...
|
|
38
|
+
...s,
|
|
39
39
|
{
|
|
40
|
-
required:
|
|
40
|
+
required: m,
|
|
41
41
|
message: `${t ?? o ?? ""} ${f(
|
|
42
42
|
"err.validation.required"
|
|
43
43
|
)}`
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
|
-
[
|
|
46
|
+
[s, t, o, f, m]
|
|
47
47
|
);
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
|
|
48
|
+
return /* @__PURE__ */ i(_, { title: w, children: /* @__PURE__ */ i(P.Item, { ...B, label: t, rules: M, children: /* @__PURE__ */ i(
|
|
49
|
+
R,
|
|
50
50
|
{
|
|
51
|
-
ref:
|
|
52
|
-
disabled:
|
|
53
|
-
defaultValue:
|
|
54
|
-
value:
|
|
55
|
-
readOnly:
|
|
56
|
-
addonBefore:
|
|
57
|
-
minLength:
|
|
58
|
-
addonAfter:
|
|
51
|
+
ref: C,
|
|
52
|
+
disabled: g,
|
|
53
|
+
defaultValue: x,
|
|
54
|
+
value: E,
|
|
55
|
+
readOnly: l,
|
|
56
|
+
addonBefore: h,
|
|
57
|
+
minLength: T,
|
|
58
|
+
addonAfter: N,
|
|
59
59
|
step: d ? 1 : void 0,
|
|
60
|
-
pattern: d ? "d*" :
|
|
61
|
-
onChange:
|
|
62
|
-
onPressEnter: (r) =>
|
|
60
|
+
pattern: d ? "d*" : $,
|
|
61
|
+
onChange: A,
|
|
62
|
+
onPressEnter: (r) => b(r, u, a, c),
|
|
63
63
|
className: "max-width",
|
|
64
64
|
min: p === null ? void 0 : p ?? 0,
|
|
65
|
-
max:
|
|
65
|
+
max: I,
|
|
66
66
|
type: e ? void 0 : "number",
|
|
67
|
-
size:
|
|
67
|
+
size: j,
|
|
68
68
|
formatter: e ? (r) => {
|
|
69
69
|
if (r.includes(".")) {
|
|
70
70
|
const n = `${r}`.split(".");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),i=require("../../../util/ValidationUtil.cjs"),l=require("./TextField.cjs"),r=e=>t.jsx(l.default,{...e,rules:[...e.rules??[],...i.phoneValidation(e.label??e.placeholder??"")]});module.exports=r;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../../util/ValidationUtil.js";
|
|
3
3
|
import i from "./TextField.js";
|
|
4
|
-
const m = (e) => /* @__PURE__ */
|
|
4
|
+
const m = (e) => /* @__PURE__ */ l(
|
|
5
5
|
i,
|
|
6
6
|
{
|
|
7
7
|
...e,
|
|
8
8
|
rules: [
|
|
9
9
|
...e.rules ?? [],
|
|
10
|
-
...
|
|
10
|
+
...t.phoneValidation(
|
|
11
11
|
e.label ?? e.placeholder ?? ""
|
|
12
12
|
)
|
|
13
13
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),i=require("antd"),x=require("react-i18next"),A=require("../../../locale/hooks/translation-constants.cjs"),c=(n,e,t,r)=>{var s;e&&t&&(n.preventDefault(),(s=t==null?void 0:t.getFieldInstance(e))==null||s.focus()),r&&r(n)},q=({required:n,label:e,rules:t=[],placeholder:r,onEnter:s,nextFocus:l,className:o,...u})=>{const{t:d}=x.useTranslation(A.TRANSLATION_NAMESPACE),I=i.Form.useFormInstance();return a.jsx(i.Form.Item,{...u,className:o,label:e,rules:[...t,{required:n,message:`${e} ${d("err.validation.required")}`}],children:a.jsx(i.Input.TextArea,{...u,className:o,onPressEnter:T=>c(T,l,I,s),placeholder:r??e})})};exports.default=q;exports.onEnterInternalTextField=c;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Form as m, Input as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Form as m, Input as l } from "antd";
|
|
3
|
+
import { useTranslation as A } from "react-i18next";
|
|
4
|
+
import { TRANSLATION_NAMESPACE as I } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
const T = (r, e, t, n) => {
|
|
6
6
|
var o;
|
|
7
7
|
e && t && (r.preventDefault(), (o = t == null ? void 0 : t.getFieldInstance(e)) == null || o.focus()), n && n(r);
|
|
8
|
-
},
|
|
8
|
+
}, g = ({
|
|
9
9
|
required: r,
|
|
10
10
|
label: e,
|
|
11
11
|
rules: t = [],
|
|
12
12
|
placeholder: n,
|
|
13
13
|
onEnter: o,
|
|
14
14
|
nextFocus: u,
|
|
15
|
-
className:
|
|
16
|
-
...
|
|
15
|
+
className: i,
|
|
16
|
+
...s
|
|
17
17
|
}) => {
|
|
18
|
-
const { t:
|
|
19
|
-
return /* @__PURE__ */ a
|
|
18
|
+
const { t: c } = A(I), d = m.useFormInstance();
|
|
19
|
+
return /* @__PURE__ */ a(
|
|
20
20
|
m.Item,
|
|
21
21
|
{
|
|
22
|
-
...
|
|
23
|
-
className:
|
|
22
|
+
...s,
|
|
23
|
+
className: i,
|
|
24
24
|
label: e,
|
|
25
25
|
rules: [
|
|
26
26
|
...t,
|
|
27
27
|
{
|
|
28
28
|
required: r,
|
|
29
|
-
message: `${e} ${
|
|
29
|
+
message: `${e} ${c("err.validation.required")}`
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
|
-
children: /* @__PURE__ */ a
|
|
33
|
-
|
|
32
|
+
children: /* @__PURE__ */ a(
|
|
33
|
+
l.TextArea,
|
|
34
34
|
{
|
|
35
|
-
...
|
|
36
|
-
className:
|
|
37
|
-
onPressEnter: (
|
|
35
|
+
...s,
|
|
36
|
+
className: i,
|
|
37
|
+
onPressEnter: (p) => T(p, u, d, o),
|
|
38
38
|
placeholder: n ?? e
|
|
39
39
|
}
|
|
40
40
|
)
|
|
@@ -42,6 +42,6 @@ const I = (r, e, t, n) => {
|
|
|
42
42
|
);
|
|
43
43
|
};
|
|
44
44
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
g as default,
|
|
46
|
+
T as onEnterInternalTextField
|
|
47
47
|
};
|