@kingteza/crud-component 1.0.6 → 1.0.9
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/FileSaver.min.cjs +1 -0
- package/dist/_virtual/FileSaver.min.js +5 -0
- package/dist/_virtual/FileSaver.min2.cjs +1 -0
- package/dist/_virtual/FileSaver.min2.js +4 -0
- package/dist/_virtual/ShowMoreText.cjs +1 -0
- package/dist/_virtual/ShowMoreText.js +7 -0
- package/dist/_virtual/ShowMoreText2.cjs +1 -0
- package/dist/_virtual/ShowMoreText2.js +4 -0
- package/dist/_virtual/Truncate.cjs +1 -0
- package/dist/_virtual/Truncate.js +4 -0
- package/dist/_virtual/_commonjsHelpers.cjs +1 -1
- package/dist/_virtual/_commonjsHelpers.js +5 -3
- package/dist/_virtual/index.cjs +1 -1
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index10.cjs +1 -0
- package/dist/_virtual/index10.js +7 -0
- package/dist/_virtual/index11.cjs +1 -0
- package/dist/_virtual/index11.js +7 -0
- package/dist/_virtual/index12.cjs +1 -0
- package/dist/_virtual/index12.js +4 -0
- package/dist/_virtual/index13.cjs +1 -0
- package/dist/_virtual/index13.js +4 -0
- package/dist/_virtual/index2.cjs +1 -1
- package/dist/_virtual/index2.js +3 -5
- package/dist/_virtual/index3.cjs +1 -1
- package/dist/_virtual/index3.js +5 -2
- package/dist/_virtual/index4.cjs +1 -1
- package/dist/_virtual/index4.js +2 -2
- package/dist/_virtual/index5.js +2 -2
- package/dist/_virtual/index6.cjs +1 -0
- package/dist/_virtual/index6.js +4 -0
- package/dist/_virtual/index7.cjs +1 -0
- package/dist/_virtual/index7.js +4 -0
- package/dist/_virtual/index8.cjs +1 -0
- package/dist/_virtual/index8.js +2 -0
- package/dist/_virtual/index9.cjs +1 -0
- package/dist/_virtual/index9.js +7 -0
- package/dist/_virtual/main.cjs +1 -0
- package/dist/_virtual/main.js +7 -0
- package/dist/_virtual/main2.cjs +1 -0
- package/dist/_virtual/main2.js +4 -0
- package/dist/_virtual/papaparse.min.cjs +1 -0
- package/dist/_virtual/papaparse.min.js +7 -0
- package/dist/_virtual/papaparse.min2.cjs +1 -0
- package/dist/_virtual/papaparse.min2.js +4 -0
- package/dist/_virtual/react-is.development2.cjs +1 -0
- package/dist/_virtual/react-is.development2.js +4 -0
- package/dist/_virtual/react-is.production.min2.cjs +1 -0
- package/dist/_virtual/react-is.production.min2.js +4 -0
- package/dist/src/components/common/DatePicker/DatePicker.cjs +1 -1
- package/dist/src/components/common/DatePicker/DatePicker.js +23 -22
- package/dist/src/components/common/DatePicker/TimePicker.cjs +1 -1
- package/dist/src/components/common/DatePicker/TimePicker.js +14 -13
- package/dist/src/components/common/button/Button.cjs +1 -1
- package/dist/src/components/common/button/Button.js +32 -31
- package/dist/src/components/common/button/CloneButtonTable.cjs +1 -1
- package/dist/src/components/common/button/CloneButtonTable.js +7 -7
- package/dist/src/components/common/button/DeleteButtonTable.cjs +1 -1
- package/dist/src/components/common/button/DeleteButtonTable.js +22 -22
- package/dist/src/components/common/button/ExportButton.cjs +1 -1
- package/dist/src/components/common/button/ExportButton.js +13 -13
- package/dist/src/components/common/button/HideButtonTable.cjs +1 -1
- package/dist/src/components/common/button/HideButtonTable.js +20 -20
- package/dist/src/components/common/button/ImportButton.cjs +1 -1
- package/dist/src/components/common/button/ImportButton.js +25 -25
- package/dist/src/components/common/button/NewButton.cjs +1 -1
- package/dist/src/components/common/button/NewButton.js +15 -15
- package/dist/src/components/common/button/PrintButton.cjs +1 -1
- package/dist/src/components/common/button/PrintButton.js +14 -14
- package/dist/src/components/common/button/RefreshButton.cjs +1 -1
- package/dist/src/components/common/button/RefreshButton.js +12 -12
- package/dist/src/components/common/button/UnHideButton.cjs +1 -1
- package/dist/src/components/common/button/UnHideButton.js +31 -31
- package/dist/src/components/common/button/UpdateButtonTable.cjs +1 -1
- package/dist/src/components/common/button/UpdateButtonTable.js +9 -9
- package/dist/src/components/common/button/ViewButtonTable.cjs +1 -1
- package/dist/src/components/common/button/ViewButtonTable.js +11 -11
- package/dist/src/components/common/check-box/CheckBox.cjs +1 -1
- package/dist/src/components/common/check-box/CheckBox.js +17 -15
- 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 +11 -10
- package/dist/src/components/common/picker/ImagePicker.cjs +1 -1
- package/dist/src/components/common/picker/ImagePicker.js +95 -90
- package/dist/src/components/common/radio/RadioGroupComponent.cjs +1 -1
- package/dist/src/components/common/radio/RadioGroupComponent.js +17 -16
- package/dist/src/components/common/report/SelectFieldInReport.cjs +1 -1
- package/dist/src/components/common/report/SelectFieldInReport.js +17 -16
- 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 +36 -33
- package/dist/src/components/common/show-more/index.cjs +1 -1
- package/dist/src/components/common/show-more/index.js +1 -1
- package/dist/src/components/common/tab/TabViewWithRoute.cjs +1 -1
- package/dist/src/components/common/tab/TabViewWithRoute.js +10 -10
- 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 +20 -19
- package/dist/src/components/common/text-field/TextArea.cjs +1 -1
- package/dist/src/components/common/text-field/TextArea.js +19 -18
- package/dist/src/components/common/text-field/TextField.cjs +1 -1
- package/dist/src/components/common/text-field/TextField.js +37 -36
- 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 +37 -36
- 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 +74 -71
- package/dist/src/components/crud/CrudField.cjs +1 -1
- package/dist/src/components/crud/CrudField.js +111 -108
- package/dist/src/components/crud/CrudForm.cjs +1 -1
- package/dist/src/components/crud/CrudForm.js +36 -33
- package/dist/src/components/crud/CrudFormWizard.cjs +1 -1
- package/dist/src/components/crud/CrudFormWizard.js +78 -73
- package/dist/src/components/crud/CrudReportComponent.cjs +3 -3
- package/dist/src/components/crud/CrudReportComponent.js +75 -71
- package/dist/src/components/crud/CrudSearchComponent.cjs +1 -1
- package/dist/src/components/crud/CrudSearchComponent.js +17 -15
- package/dist/src/components/crud/FileCrudField.cjs +1 -1
- package/dist/src/components/crud/FileCrudField.js +103 -94
- package/dist/src/components/crud/ImageCrudField.cjs +1 -1
- package/dist/src/components/crud/ImageCrudField.js +58 -55
- package/dist/src/components/crud/import/CrudImportButton.cjs +1 -1
- package/dist/src/components/crud/import/CrudImportButton.js +10 -10
- package/dist/src/components/crud/import/CrudImportComponent.cjs +2 -2
- package/dist/src/components/crud/import/CrudImportComponent.js +111 -106
- package/dist/src/components/crud/view/CrudViewer.cjs +1 -1
- package/dist/src/components/crud/view/CrudViewer.js +30 -30
- package/dist/src/components/crud/view/CrudViewerUtil.cjs +1 -1
- package/dist/src/components/crud/view/CrudViewerUtil.js +35 -33
- package/dist/src/util/ImageUtil.cjs +1 -1
- package/dist/src/util/ImageUtil.js +1 -1
- package/package.json +7 -9
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { j as c } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { useState as m, useEffect as d } from "react";
|
|
3
|
+
import x from "../select/SelectComponent.js";
|
|
4
|
+
import F from "../../../../node_modules/antd/es/form/index.js";
|
|
5
|
+
import S from "../../../../node_modules/antd/es/select/index.js";
|
|
6
|
+
const h = ({ className: p, onSelect: n, label: u, required: a, name: o, mode: l, items: e }) => {
|
|
7
|
+
const r = F.useFormInstance(), [s, f] = m(!0);
|
|
8
|
+
return d(() => {
|
|
8
9
|
if (e && s) {
|
|
9
10
|
const t = e.filter((i) => i.alreadySelected).map((i) => i.id);
|
|
10
11
|
r == null || r.setFieldsValue({
|
|
11
|
-
[
|
|
12
|
-
}),
|
|
12
|
+
[o]: l === "multiple" ? t : t == null ? void 0 : t[0]
|
|
13
|
+
}), f(!1);
|
|
13
14
|
}
|
|
14
|
-
}, [s, r, e,
|
|
15
|
-
|
|
15
|
+
}, [s, r, e, l, o]), /* @__PURE__ */ c.jsx(
|
|
16
|
+
x,
|
|
16
17
|
{
|
|
17
18
|
required: a,
|
|
18
19
|
label: u,
|
|
19
|
-
mode:
|
|
20
|
-
className:
|
|
21
|
-
name:
|
|
22
|
-
onSelect:
|
|
20
|
+
mode: l,
|
|
21
|
+
className: p,
|
|
22
|
+
name: o,
|
|
23
|
+
onSelect: n,
|
|
23
24
|
items: e,
|
|
24
|
-
itemBuilder: (t) => /* @__PURE__ */ c.jsx(
|
|
25
|
+
itemBuilder: (t) => /* @__PURE__ */ c.jsx(S.Option, { value: t.id, disabled: t.lock, children: t.label }, t.id)
|
|
25
26
|
}
|
|
26
27
|
);
|
|
27
28
|
};
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
h as SelectFieldInReport
|
|
30
31
|
};
|
|
@@ -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 e=require("../../../../_virtual/jsx-runtime.cjs"),t=require("../../../../node_modules/antd/es/list/index.cjs"),u=t.default.Item.Meta,n=t.default.Item,o=({title:s,description:i,children:r})=>e.jsxRuntimeExports.jsxs(n,{className:"",children:[e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx(u,{title:s,description:i})}),e.jsxRuntimeExports.jsx("div",{className:"float-right",children:r})]});exports.default=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../../../_virtual/jsx-runtime.cjs"),b=require("react"),A=require("react-i18next"),k=require("../../../locale/hooks/translation-constants.cjs"),H=require("../tooltip/TooltipComponent.cjs"),P=require("../../../../node_modules/antd/es/config-provider/index.cjs"),B=require("../../../../node_modules/antd/es/spin/index.cjs"),D=require("../../../../node_modules/antd/es/form/index.cjs"),V=require("../../../../node_modules/antd/es/select/index.cjs");function W({label:u,rules:q=[],required:y,placeholder:a,notSearch:E,children:l,readOnly:s,items:o,dropdownRender:R,itemBuilder:S,loading:d,showLoadingInEmptyIndicator:p,nameFieldInArray:m="name",innerRef:w,tooltip:T,filterOption:_,tagRender:L,...n}){const{t:N}=A.useTranslation(k.TRANSLATION_NAMESPACE),$=b.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[m];return r.jsxRuntimeExports.jsx("option",{value:t,children:r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:i}})},t)},[m]);return r.jsxRuntimeExports.jsx(P.default,{renderEmpty:p&&d?()=>r.jsxRuntimeExports.jsx(B.default,{}):void 0,children:r.jsxRuntimeExports.jsx(H.default,{title:T,children:r.jsxRuntimeExports.jsx(D.default.Item,{label:u,name:n.name,help:n.help,className:n.className,rules:[...q,{required:y,message:`${u??a??""} ${N("err.validation.required")}`}],children:r.jsxRuntimeExports.jsx(V.default,{ref:w,loading:d,open:s?!1:void 0,onChange:!s&&n.onChange,allowClear:!s&&n.allowClear,showSearch:!E,className:`max-width ${s?"readOnly":""}`,...n,tagRender:L,placeholder:a??u,filterOption:_??((e,t)=>{var i,f,h,j;try{const c=(h=(f=(i=t==null?void 0:t.children)==null?void 0:i.props)==null?void 0:f.dangerouslySetInnerHTML)==null?void 0:h.__html,M=e.toLowerCase().split(/\s+/),g=(t==null?void 0:t.children)??"",C=typeof g=="string"?g.toLowerCase():typeof c=="string"?c.toLowerCase():"",I=(((j=t==null?void 0:t.value)==null?void 0:j.toString())??"").toLowerCase(),O=C.replace(/\s/g,"");return M.every(x=>C.indexOf(x)>=0||I.indexOf(x)>=0||O.indexOf(x)>=0)}catch(c){return console.log(c),!0}}),dropdownRender:R,children:l===null?void 0:l??(o&&(o==null?void 0:o.map(S??$)))})})})})}exports.default=W;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { useCallback as H } from "react";
|
|
3
|
+
import { useTranslation as P } from "react-i18next";
|
|
4
|
+
import { TRANSLATION_NAMESPACE as R } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
import b from "../tooltip/TooltipComponent.js";
|
|
6
|
+
import q from "../../../../node_modules/antd/es/config-provider/index.js";
|
|
7
|
+
import B from "../../../../node_modules/antd/es/spin/index.js";
|
|
8
|
+
import D from "../../../../node_modules/antd/es/form/index.js";
|
|
9
|
+
import F from "../../../../node_modules/antd/es/select/index.js";
|
|
10
|
+
function Y({
|
|
11
|
+
label: c,
|
|
9
12
|
rules: j = [],
|
|
10
13
|
required: y,
|
|
11
14
|
placeholder: l,
|
|
12
15
|
notSearch: w,
|
|
13
16
|
children: a,
|
|
14
|
-
readOnly:
|
|
17
|
+
readOnly: n,
|
|
15
18
|
items: s,
|
|
16
19
|
dropdownRender: u,
|
|
17
20
|
itemBuilder: L,
|
|
@@ -22,52 +25,52 @@ function Q({
|
|
|
22
25
|
tooltip: _,
|
|
23
26
|
filterOption: E,
|
|
24
27
|
tagRender: A,
|
|
25
|
-
...
|
|
28
|
+
...o
|
|
26
29
|
}) {
|
|
27
|
-
const { t: I } =
|
|
28
|
-
(
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */ t.jsx("option", { value:
|
|
30
|
+
const { t: I } = P(R), M = H(
|
|
31
|
+
(r) => {
|
|
32
|
+
const e = typeof r == "string" || typeof r == "number" ? r : r == null ? void 0 : r.id, m = typeof r == "string" || typeof r == "number" ? r : r == null ? void 0 : r[h];
|
|
33
|
+
return /* @__PURE__ */ t.jsx("option", { value: e, children: /* @__PURE__ */ t.jsx("div", { dangerouslySetInnerHTML: { __html: m } }) }, e);
|
|
31
34
|
},
|
|
32
35
|
[h]
|
|
33
36
|
);
|
|
34
37
|
return /* @__PURE__ */ t.jsx(
|
|
35
|
-
|
|
38
|
+
q,
|
|
36
39
|
{
|
|
37
|
-
renderEmpty: T && d ? () => /* @__PURE__ */ t.jsx(
|
|
38
|
-
children: /* @__PURE__ */ t.jsx(
|
|
39
|
-
|
|
40
|
+
renderEmpty: T && d ? () => /* @__PURE__ */ t.jsx(B, {}) : void 0,
|
|
41
|
+
children: /* @__PURE__ */ t.jsx(b, { title: _, children: /* @__PURE__ */ t.jsx(
|
|
42
|
+
D.Item,
|
|
40
43
|
{
|
|
41
|
-
label:
|
|
42
|
-
name:
|
|
43
|
-
help:
|
|
44
|
-
className:
|
|
44
|
+
label: c,
|
|
45
|
+
name: o.name,
|
|
46
|
+
help: o.help,
|
|
47
|
+
className: o.className,
|
|
45
48
|
rules: [
|
|
46
49
|
...j,
|
|
47
50
|
{
|
|
48
51
|
required: y,
|
|
49
|
-
message: `${
|
|
52
|
+
message: `${c ?? l ?? ""} ${I(
|
|
50
53
|
"err.validation.required"
|
|
51
54
|
)}`
|
|
52
55
|
}
|
|
53
56
|
],
|
|
54
57
|
children: /* @__PURE__ */ t.jsx(
|
|
55
|
-
|
|
58
|
+
F,
|
|
56
59
|
{
|
|
57
60
|
ref: N,
|
|
58
61
|
loading: d,
|
|
59
|
-
open:
|
|
60
|
-
onChange: !
|
|
61
|
-
allowClear: !
|
|
62
|
+
open: n ? !1 : void 0,
|
|
63
|
+
onChange: !n && o.onChange,
|
|
64
|
+
allowClear: !n && o.allowClear,
|
|
62
65
|
showSearch: !w,
|
|
63
|
-
className: `max-width ${
|
|
64
|
-
...
|
|
66
|
+
className: `max-width ${n ? "readOnly" : ""}`,
|
|
67
|
+
...o,
|
|
65
68
|
tagRender: A,
|
|
66
|
-
placeholder: l ??
|
|
67
|
-
filterOption: E ?? ((
|
|
68
|
-
var
|
|
69
|
+
placeholder: l ?? c,
|
|
70
|
+
filterOption: E ?? ((r, e) => {
|
|
71
|
+
var m, x, p, C;
|
|
69
72
|
try {
|
|
70
|
-
const i = (
|
|
73
|
+
const i = (p = (x = (m = e == null ? void 0 : e.children) == null ? void 0 : m.props) == null ? void 0 : x.dangerouslySetInnerHTML) == null ? void 0 : p.__html, O = r.toLowerCase().split(/\s+/), g = (e == null ? void 0 : e.children) ?? "", S = typeof g == "string" ? g.toLowerCase() : typeof i == "string" ? i.toLowerCase() : "", $ = (((C = e == null ? void 0 : e.value) == null ? void 0 : C.toString()) ?? "").toLowerCase(), k = S.replace(/\s/g, "");
|
|
71
74
|
return O.every(
|
|
72
75
|
(f) => S.indexOf(f) >= 0 || $.indexOf(f) >= 0 || k.indexOf(f) >= 0
|
|
73
76
|
);
|
|
@@ -85,5 +88,5 @@ function Q({
|
|
|
85
88
|
);
|
|
86
89
|
}
|
|
87
90
|
export {
|
|
88
|
-
|
|
91
|
+
Y as default
|
|
89
92
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),o=require("
|
|
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.default,{...r});exports.ShowMore=e;exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../_virtual/jsx-runtime.cjs"),v=require("../../../context/WindowDimension.cjs"),r=require("react"),c=require("../../../../node_modules/react-router/dist/development/chunk-K6AXKMTT.cjs"),u=require("../../../../node_modules/antd/es/tabs/index.cjs"),g=require("../../../../node_modules/antd/es/layout/index.cjs"),{Content:q}=g.default,E=({positionOfRoute:a,initialKey:s="*",tabs:l,className:x="",mode:d="default"})=>{const[m,p]=r.useState(s),n=c.useNavigate(),h=e=>{n(e)},i=c.useLocation();r.useEffect(()=>{const e=i.pathname.split("/")[a];p(e??""),e||n(s,{replace:!0})},[s,i.pathname,n,a]);const{isDesktop:j}=v.default(),o=d==="side"&&j,f=o?"left":"top",b=o?"d-flex h-100":"";return t.jsxRuntimeExports.jsxs("div",{className:`${x} ${b}`,children:[t.jsxRuntimeExports.jsx(u.default,{type:"card",tabPosition:f,activeKey:m,onChange:h,children:l.map(({key:e,label:R})=>t.jsxRuntimeExports.jsx(u.default.TabPane,{tab:R},e))}),t.jsxRuntimeExports.jsx(q,{className:`max-height ${o?"overflow-auto":""}`,children:t.jsxRuntimeExports.jsx(c.Outlet,{})})]})};exports.TabViewWithRoute=E;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { j as e } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import
|
|
3
|
-
import v from "
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const { Content: S } =
|
|
2
|
+
import b from "../../../context/WindowDimension.js";
|
|
3
|
+
import { useState as v, useEffect as g } from "react";
|
|
4
|
+
import { useNavigate as w, useLocation as y, Outlet as N } from "../../../../node_modules/react-router/dist/development/chunk-K6AXKMTT.js";
|
|
5
|
+
import r from "../../../../node_modules/antd/es/tabs/index.js";
|
|
6
|
+
import P from "../../../../node_modules/antd/es/layout/index.js";
|
|
7
|
+
const { Content: S } = P, L = ({
|
|
8
8
|
positionOfRoute: n,
|
|
9
9
|
initialKey: s = "*",
|
|
10
10
|
tabs: i,
|
|
11
11
|
className: m = "",
|
|
12
12
|
mode: p = "default"
|
|
13
13
|
}) => {
|
|
14
|
-
const [l, u] =
|
|
14
|
+
const [l, u] = v(s), o = w(), f = (t) => {
|
|
15
15
|
o(t);
|
|
16
|
-
}, c =
|
|
17
|
-
|
|
16
|
+
}, c = y();
|
|
17
|
+
g(() => {
|
|
18
18
|
const t = c.pathname.split("/")[n];
|
|
19
19
|
u(t ?? ""), t || o(s, { replace: !0 });
|
|
20
20
|
}, [s, c.pathname, o, n]);
|
|
21
|
-
const { isDesktop: d } =
|
|
21
|
+
const { isDesktop: d } = b(), a = p === "side" && d, h = a ? "left" : "top", x = a ? "d-flex h-100" : "";
|
|
22
22
|
return /* @__PURE__ */ e.jsxs("div", { className: `${m} ${x}`, children: [
|
|
23
23
|
/* @__PURE__ */ e.jsx(
|
|
24
24
|
r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../../../_virtual/jsx-runtime.cjs"),a=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../../../_virtual/jsx-runtime.cjs"),a=require("react"),c=require("../../../../node_modules/antd/es/table/Table.cjs");function d({minusHeight:g,onRow:m,count:f=1,onPageSizeChanged:h,pagination:e=!1,rowKey:n="id",columns:t,className:o,scroll:s,...u}){const i=a.useMemo(()=>t.filter(r=>!r.hidden),[t]);return l.jsxRuntimeExports.jsx(c.default,{className:`custom-scroll ${o}`,style:{width:"100%"},columns:i,rowKey:n,...u,scroll:s||{x:!0},pagination:e&&{...e,hideOnSinglePage:!0,showSizeChanger:!1}})}exports.default=d;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { j as l } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
minusHeight:
|
|
6
|
-
onRow:
|
|
7
|
-
count:
|
|
2
|
+
import { useMemo as m } from "react";
|
|
3
|
+
import u from "../../../../node_modules/antd/es/table/Table.js";
|
|
4
|
+
function w({
|
|
5
|
+
minusHeight: d,
|
|
6
|
+
onRow: f,
|
|
7
|
+
count: c = 1,
|
|
8
8
|
onPageSizeChanged: h,
|
|
9
9
|
pagination: e = !1,
|
|
10
|
-
rowKey:
|
|
10
|
+
rowKey: r = "id",
|
|
11
11
|
columns: o,
|
|
12
|
-
className:
|
|
12
|
+
className: s,
|
|
13
13
|
scroll: t,
|
|
14
|
-
...
|
|
14
|
+
...n
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
16
|
+
const i = m(() => o.filter((a) => !a.hidden), [o]);
|
|
17
17
|
return /* @__PURE__ */ l.jsx(
|
|
18
|
-
|
|
18
|
+
u,
|
|
19
19
|
{
|
|
20
|
-
className: `custom-scroll ${
|
|
20
|
+
className: `custom-scroll ${s}`,
|
|
21
21
|
style: { width: "100%" },
|
|
22
|
-
columns:
|
|
23
|
-
rowKey:
|
|
24
|
-
...
|
|
22
|
+
columns: i,
|
|
23
|
+
rowKey: r,
|
|
24
|
+
...n,
|
|
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
|
+
w as default
|
|
40
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),d=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),d=require("../../../locale/hooks/translation-constants.cjs"),x=require("react-i18next"),p=require("../../../../node_modules/antd/es/tag/index.cjs"),S=({onClick:n,clickable:o,colorFunction:t,translation:i,value:s})=>{var r;const e=t==null?void 0:t(s),{t:u}=x.useTranslation(d.TRANSLATION_NAMESPACE),c=p.default;return a.jsxRuntimeExports.jsx(c,{onClick:n,color:e==null?void 0:e.color,icon:e==null?void 0:e.icon,style:{color:e==null?void 0:e.text,cursor:o?"pointer":void 0},children:(r=u(i[s]))==null?void 0:r.toUpperCase()})};exports.default=S;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as f } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import { TRANSLATION_NAMESPACE as x } from "../../../locale/hooks/translation-constants.js";
|
|
3
|
+
import { useTranslation as T } from "react-i18next";
|
|
4
|
+
import A from "../../../../node_modules/antd/es/tag/index.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 } =
|
|
13
|
+
const t = o == null ? void 0 : o(r), { t: i } = T(x), n = A;
|
|
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("antd"),{Text:t}=e.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../node_modules/antd/es/typography/index.cjs"),{Text:t}=e.default;exports.Text=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("antd"),{Title:t}=e.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../../node_modules/antd/es/typography/index.cjs"),{Title:t}=e.default;exports.Title=t;
|
|
@@ -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 i=require("../../../../_virtual/jsx-runtime.cjs"),x=require("react"),_=require("react-i18next"),h=require("../../../locale/hooks/translation-constants.cjs"),v=require("../tooltip/TooltipComponent.cjs"),w=require("./TextField.cjs"),B=require("../../../../node_modules/antd/es/form/index.cjs"),O=require("../../../../node_modules/antd/es/input-number/index.cjs"),b=x.forwardRef(function({type:F,required:o,label:t,rules:u=[],placeholder:r,onEnter:p,form:l,nextFocus:m,min:d,moneyField:n,addonAfter:f,minLength:j,defaultValue:q,pattern:T,disabled:E,readOnly:R,onChange:g,value:$,max:N,addonBefore:A,size:I,isInt:c=!1,tooltip:M,...S},C){const{t:a}=_.useTranslation(h.TRANSLATION_NAMESPACE),P=x.useMemo(()=>[...u,{required:o,message:`${t??r??""} ${a("err.validation.required")}`}],[u,t,r,a,o]);return i.jsxRuntimeExports.jsx(v.default,{title:M,children:i.jsxRuntimeExports.jsx(B.default.Item,{...S,label:t,rules:P,children:i.jsxRuntimeExports.jsx(O.default,{ref:C,disabled:E,defaultValue:q,value:$,readOnly:R,addonBefore:A,minLength:j,addonAfter:f,step:c?1:void 0,pattern:c?"d*":T,onChange:g,onPressEnter:e=>w.onEnterInternalTextField(e,m,l,p),className:"max-width",min:d===null?void 0:d??0,max:N,type:n?void 0:"number",size:I,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})})})});exports.default=b;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { j as s } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
2
|
+
import { forwardRef as M, useMemo as P } from "react";
|
|
3
|
+
import { useTranslation as S } from "react-i18next";
|
|
4
|
+
import { TRANSLATION_NAMESPACE as y } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
import F from "../tooltip/TooltipComponent.js";
|
|
6
|
+
import { onEnterInternalTextField as L } from "./TextField.js";
|
|
7
|
+
import O from "../../../../node_modules/antd/es/form/index.js";
|
|
8
|
+
import _ from "../../../../node_modules/antd/es/input-number/index.js";
|
|
9
|
+
const Q = M(
|
|
9
10
|
function({
|
|
10
11
|
// eslint-disable-next-line no-unused-vars
|
|
11
|
-
type:
|
|
12
|
+
type: k,
|
|
12
13
|
required: i,
|
|
13
14
|
label: t,
|
|
14
15
|
rules: m = [],
|
|
@@ -19,9 +20,9 @@ const K = S(
|
|
|
19
20
|
min: p,
|
|
20
21
|
moneyField: e,
|
|
21
22
|
addonAfter: x,
|
|
22
|
-
minLength:
|
|
23
|
-
defaultValue:
|
|
24
|
-
pattern:
|
|
23
|
+
minLength: T,
|
|
24
|
+
defaultValue: j,
|
|
25
|
+
pattern: N,
|
|
25
26
|
disabled: E,
|
|
26
27
|
readOnly: $,
|
|
27
28
|
onChange: g,
|
|
@@ -33,7 +34,7 @@ const K = S(
|
|
|
33
34
|
tooltip: h,
|
|
34
35
|
...w
|
|
35
36
|
}, B) {
|
|
36
|
-
const { t: f } =
|
|
37
|
+
const { t: f } = S(y), C = P(
|
|
37
38
|
() => [
|
|
38
39
|
...m,
|
|
39
40
|
{
|
|
@@ -45,21 +46,21 @@ const K = S(
|
|
|
45
46
|
],
|
|
46
47
|
[m, t, o, f, i]
|
|
47
48
|
);
|
|
48
|
-
return /* @__PURE__ */ s.jsx(
|
|
49
|
-
|
|
49
|
+
return /* @__PURE__ */ s.jsx(F, { title: h, children: /* @__PURE__ */ s.jsx(O.Item, { ...w, label: t, rules: C, children: /* @__PURE__ */ s.jsx(
|
|
50
|
+
_,
|
|
50
51
|
{
|
|
51
52
|
ref: B,
|
|
52
53
|
disabled: E,
|
|
53
|
-
defaultValue:
|
|
54
|
+
defaultValue: j,
|
|
54
55
|
value: l,
|
|
55
56
|
readOnly: $,
|
|
56
57
|
addonBefore: I,
|
|
57
|
-
minLength:
|
|
58
|
+
minLength: T,
|
|
58
59
|
addonAfter: x,
|
|
59
60
|
step: d ? 1 : void 0,
|
|
60
|
-
pattern: d ? "d*" :
|
|
61
|
+
pattern: d ? "d*" : N,
|
|
61
62
|
onChange: g,
|
|
62
|
-
onPressEnter: (r) =>
|
|
63
|
+
onPressEnter: (r) => L(r, u, c, a),
|
|
63
64
|
className: "max-width",
|
|
64
65
|
min: p === null ? void 0 : p ?? 0,
|
|
65
66
|
max: A,
|
|
@@ -79,5 +80,5 @@ const K = S(
|
|
|
79
80
|
}
|
|
80
81
|
);
|
|
81
82
|
export {
|
|
82
|
-
|
|
83
|
+
Q as default
|
|
83
84
|
};
|
|
@@ -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 o=require("../../../../_virtual/jsx-runtime.cjs"),I=require("react-i18next"),j=require("../../../locale/hooks/translation-constants.cjs"),a=require("../../../../node_modules/antd/es/form/index.cjs"),q=require("../../../../node_modules/antd/es/input/index.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:d,className:i,...u})=>{const{t:c}=I.useTranslation(j.TRANSLATION_NAMESPACE),x=a.default.useFormInstance();return o.jsxRuntimeExports.jsx(a.default.Item,{...u,className:i,label:e,rules:[...t,{required:n,message:`${e} ${c("err.validation.required")}`}],children:o.jsxRuntimeExports.jsx(q.default.TextArea,{...u,className:i,onPressEnter:T=>l(T,d,x,s),placeholder:r??e})})};exports.default=A;exports.onEnterInternalTextField=l;
|
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
import { j as a } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
2
|
+
import { useTranslation as x } from "react-i18next";
|
|
3
|
+
import { TRANSLATION_NAMESPACE as f } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import m from "../../../../node_modules/antd/es/form/index.js";
|
|
5
|
+
import l from "../../../../node_modules/antd/es/input/index.js";
|
|
6
|
+
const A = (r, t, e, n) => {
|
|
6
7
|
var o;
|
|
7
|
-
|
|
8
|
-
},
|
|
8
|
+
t && e && (r.preventDefault(), (o = e == null ? void 0 : e.getFieldInstance(t)) == null || o.focus()), n && n(r);
|
|
9
|
+
}, g = ({
|
|
9
10
|
required: r,
|
|
10
|
-
label:
|
|
11
|
-
rules:
|
|
11
|
+
label: t,
|
|
12
|
+
rules: e = [],
|
|
12
13
|
placeholder: n,
|
|
13
14
|
onEnter: o,
|
|
14
|
-
nextFocus:
|
|
15
|
+
nextFocus: p,
|
|
15
16
|
className: s,
|
|
16
17
|
...i
|
|
17
18
|
}) => {
|
|
18
|
-
const { t:
|
|
19
|
+
const { t: u } = x(f), c = m.useFormInstance();
|
|
19
20
|
return /* @__PURE__ */ a.jsx(
|
|
20
21
|
m.Item,
|
|
21
22
|
{
|
|
22
23
|
...i,
|
|
23
24
|
className: s,
|
|
24
|
-
label:
|
|
25
|
+
label: t,
|
|
25
26
|
rules: [
|
|
26
|
-
...
|
|
27
|
+
...e,
|
|
27
28
|
{
|
|
28
29
|
required: r,
|
|
29
|
-
message: `${
|
|
30
|
+
message: `${t} ${u("err.validation.required")}`
|
|
30
31
|
}
|
|
31
32
|
],
|
|
32
33
|
children: /* @__PURE__ */ a.jsx(
|
|
33
|
-
|
|
34
|
+
l.TextArea,
|
|
34
35
|
{
|
|
35
36
|
...i,
|
|
36
37
|
className: s,
|
|
37
|
-
onPressEnter: (d) =>
|
|
38
|
-
placeholder: n ??
|
|
38
|
+
onPressEnter: (d) => A(d, p, c, o),
|
|
39
|
+
placeholder: n ?? t
|
|
39
40
|
}
|
|
40
41
|
)
|
|
41
42
|
}
|
|
42
43
|
);
|
|
43
44
|
};
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
g as default,
|
|
47
|
+
A as onEnterInternalTextField
|
|
47
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),N=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),N=require("react"),O=require("react-i18next"),_=require("../../../locale/hooks/translation-constants.cjs"),$=require("../tooltip/TooltipComponent.cjs"),d=require("../../../../node_modules/antd/es/input/index.cjs"),w=require("../../../../node_modules/antd/es/form/index.cjs"),L=require("../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.cjs"),l=(t,n,e,i)=>{var s;n&&e&&(t.preventDefault(),(s=e==null?void 0:e.getFieldInstance(n))==null||s.focus()),i&&i(t)},D=({type:t,required:n,label:e,disabled:i,rules:s=[],placeholder:u,onEnter:c,size:x,form:f,addonAfter:j,addonBefore:m,nextFocus:p,autoComplete:E="off",defaultValue:q,readOnly:T,value:g,loading:R,onBlur:v,inputRef:I,status:A,autoFocus:C,onChange:k,tooltip:P,...M})=>{const{t:a}=O.useTranslation(_.TRANSLATION_NAMESPACE),S=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]),h={disabled:i,value:g,readOnly:T,defaultValue:q,autoFocus:C,addonBefore:m,ref:I,onBlur:v,addonAfter:R?o.jsxRuntimeExports.jsx(L.default,{}):j,status:A,size:x,autoComplete:E,onPressEnter:r=>l(r,p,f,c),type:t,placeholder:u??e},F=t=="password"?d.default.Password:d.default;return o.jsxRuntimeExports.jsx($.default,{title:P,children:o.jsxRuntimeExports.jsx(w.default.Item,{...M,label:e,rules:S,children:o.jsxRuntimeExports.jsx(F,{...h})})})};exports.default=D;exports.onEnterInternalTextField=l;
|