@kingteza/crud-component 1.0.6 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/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/advancedFormat.cjs +1 -1
- package/dist/_virtual/customParseFormat.cjs +1 -1
- package/dist/_virtual/dayjs.min.cjs +1 -1
- package/dist/_virtual/index.cjs +1 -1
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index10.cjs +1 -0
- package/dist/_virtual/index10.js +4 -0
- package/dist/_virtual/index2.cjs +1 -1
- package/dist/_virtual/index2.js +2 -5
- package/dist/_virtual/index3.js +2 -2
- package/dist/_virtual/index4.cjs +1 -1
- package/dist/_virtual/index4.js +2 -4
- package/dist/_virtual/index5.js +2 -2
- package/dist/_virtual/index6.cjs +1 -0
- package/dist/_virtual/index6.js +7 -0
- package/dist/_virtual/index7.cjs +1 -0
- package/dist/_virtual/index7.js +7 -0
- package/dist/_virtual/index8.cjs +1 -0
- package/dist/_virtual/index8.js +7 -0
- package/dist/_virtual/index9.cjs +1 -0
- package/dist/_virtual/index9.js +4 -0
- package/dist/_virtual/localeData.cjs +1 -1
- 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/weekOfYear.cjs +1 -1
- package/dist/_virtual/weekYear.cjs +1 -1
- package/dist/_virtual/weekday.cjs +1 -1
- package/dist/common/index.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/src/components/common/DatePicker/DatePicker.cjs +1 -1
- package/dist/src/components/common/DatePicker/DatePicker.js +1 -1
- package/dist/src/components/common/DatePicker/TimePicker.cjs +1 -1
- package/dist/src/components/common/DatePicker/TimePicker.js +3 -3
- package/dist/src/components/common/appearance/Hider.cjs +1 -1
- package/dist/src/components/common/button/Button.cjs +1 -1
- package/dist/src/components/common/button/Button.js +10 -10
- 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 +17 -17
- package/dist/src/components/common/button/ExportButton.cjs +1 -1
- package/dist/src/components/common/button/ExportButton.js +16 -16
- package/dist/src/components/common/button/HideButtonTable.cjs +1 -1
- package/dist/src/components/common/button/HideButtonTable.js +18 -18
- 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 +16 -16
- 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 +28 -28
- 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 +13 -13
- package/dist/src/components/common/check-box/CheckBox.cjs +1 -1
- package/dist/src/components/common/description/DescList.cjs +1 -1
- package/dist/src/components/common/layout/VerticalSpace.cjs +1 -1
- package/dist/src/components/common/loading/LoadingIndicator.cjs +1 -1
- package/dist/src/components/common/loading/LoadingIndicator.js +5 -5
- package/dist/src/components/common/picker/ImagePicker.cjs +1 -1
- package/dist/src/components/common/picker/ImagePicker.js +76 -73
- package/dist/src/components/common/radio/RadioGroupComponent.cjs +1 -1
- package/dist/src/components/common/report/SelectFieldInReport.cjs +1 -1
- package/dist/src/components/common/select/CustomSelectOption.cjs +1 -1
- package/dist/src/components/common/select/SelectComponent.cjs +1 -1
- package/dist/src/components/common/select/SelectComponent.js +5 -5
- 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 -11
- package/dist/src/components/common/table/table.cjs +1 -1
- package/dist/src/components/common/tag/StatusTag.cjs +1 -1
- package/dist/src/components/common/tag/StatusTag.js +1 -1
- package/dist/src/components/common/text-field/NumberField.cjs +1 -1
- package/dist/src/components/common/text-field/NumberField.js +7 -7
- package/dist/src/components/common/text-field/PhoneNumberField.cjs +1 -1
- package/dist/src/components/common/text-field/TextArea.cjs +1 -1
- package/dist/src/components/common/text-field/TextArea.js +3 -3
- package/dist/src/components/common/text-field/TextField.cjs +1 -1
- package/dist/src/components/common/text-field/TextField.js +34 -34
- package/dist/src/components/common/tooltip/TooltipComponent.cjs +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/crud/CrudComponent.cjs +1 -1
- package/dist/src/components/crud/CrudComponent.js +15 -15
- package/dist/src/components/crud/CrudField.cjs +1 -1
- package/dist/src/components/crud/CrudField.js +22 -22
- package/dist/src/components/crud/CrudForm.js +10 -10
- package/dist/src/components/crud/CrudFormWizard.cjs +1 -1
- package/dist/src/components/crud/CrudFormWizard.js +65 -63
- package/dist/src/components/crud/CrudReportComponent.cjs +3 -3
- package/dist/src/components/crud/CrudReportComponent.js +54 -54
- package/dist/src/components/crud/CrudSearchComponent.cjs +1 -1
- package/dist/src/components/crud/CrudSearchComponent.js +23 -23
- package/dist/src/components/crud/FileCrudField.cjs +1 -1
- package/dist/src/components/crud/FileCrudField.js +101 -94
- package/dist/src/components/crud/ImageCrudField.cjs +1 -1
- package/dist/src/components/crud/ImageCrudField.js +35 -35
- package/dist/src/components/crud/import/CrudImportButton.cjs +1 -1
- package/dist/src/components/crud/import/CrudImportButton.js +12 -12
- package/dist/src/components/crud/import/CrudImportComponent.cjs +2 -2
- package/dist/src/components/crud/import/CrudImportComponent.js +95 -94
- package/dist/src/components/crud/view/CrudDecListView.cjs +1 -1
- package/dist/src/components/crud/view/CrudDecListView.js +5 -5
- package/dist/src/components/crud/view/CrudViewer.cjs +1 -1
- package/dist/src/components/crud/view/CrudViewer.js +7 -7
- package/dist/src/components/crud/view/CrudViewerUtil.cjs +1 -1
- package/dist/src/components/crud/view/CrudViewerUtil.js +32 -31
- package/dist/src/context/WindowDimension.cjs +1 -1
- package/dist/src/locale/index.cjs +1 -1
- package/dist/src/locale/index.js +2 -2
- package/dist/src/locale/translations/en.cjs +1 -1
- package/dist/src/util/DateUtil.cjs +1 -1
- package/dist/src/util/DateUtil.js +4 -4
- package/dist/src/util/ImageUtil.cjs +1 -1
- package/dist/src/util/ImageUtil.js +1 -1
- package/dist/src/util/ValidationUtil.cjs +1 -1
- package/dist/src/util/ValidationUtil.js +1 -1
- package/dist/util/index.cjs +1 -1
- package/package.json +1 -1
- package/dist/common/index.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs");;/* empty css */;/* empty css */const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs");;/* empty css */;/* empty css */const O=require("antd"),s=require("react"),fe=require("../../../../node_modules/react-cropper/dist/react-cropper.es.cjs"),ge=require("../../../locale/hooks/translation-constants.cjs"),P=require("../button/Button.cjs"),Re=require("../../../util/ImageUtil.cjs"),he=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),Ee=require("../../../../node_modules/@ant-design/icons/es/icons/RotateLeftOutlined.cjs"),we=require("../../../../node_modules/@ant-design/icons/es/icons/RotateRightOutlined.cjs"),X=require("../../../../node_modules/@ant-design/icons/es/icons/UploadOutlined.cjs"),Ce=require("../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.cjs"),ve=O.Form.Item;function Q(r){return new Promise((u,x)=>{const n=new FileReader;n.readAsDataURL(r),n.onload=()=>u(n.result),n.onerror=p=>x(p)})}const be=({values:r=[],required:u,buttonType:x,label:n,name:p,onChange:m,aspectRatio:U,buttonTitle:R,hidePreview:h,buttonSize:j="large",showButtonText:f=!0,showOnlyIcon:A=!1,icon:v=t.jsxRuntimeExports.jsx(X,{}),loading:b,maxCount:E=1,onAdd:l,onRemove:S,listType:y,..._})=>{const[Z,ee]=s.useState(""),[te,se]=s.useState(""),[re,D]=s.useState(!1),I=s.useRef(),i=s.useRef(),[a,F]=s.useState([]),[g,N]=s.useState(),ne=s.useRef(),oe=()=>D(!1),ie=async e=>{!e.url&&!e.preview&&(e.preview=await Q(e.originFileObj)),se(e.url||e.preview),D(!0),ee(e.name)},[z,q]=s.useState(!1),ae=()=>{},B=e=>{var o;(o=i==null?void 0:i.current)==null||o.cropper.rotate(e?-90:90)};s.useEffect(()=>{m==null||m(a[0],a)},[a,m]);const ce=()=>{var C;const e=(C=i==null?void 0:i.current)==null?void 0:C.cropper.getCroppedCanvas(),{type:o,size:c,name:d,uid:w}=I.current;q(!0),e==null||e.toBlob(async me=>{const je=Object.assign(new File([me],d,{type:o}),{uid:w}),H=await Re.resizeImage(je),G=await Q(H),K={url:G,name:d,uid:w,type:o,size:c,thumbUrl:G,originFileObj:H};if(l)try{q(!0),await l(K)}finally{q(!1)}F([K,...a]),q(!1)}),N(void 0)},le=()=>{N(void 0),I.current=void 0},T=s.useCallback(e=>{const o=e;if(o){I.current=o;const c=new FileReader;c.addEventListener("load",()=>{var d;if(typeof c.result=="string"){N(c.result);const w=localStorage.getItem("cropper.box"),C=w?JSON.parse(w):void 0;C&&((d=i==null?void 0:i.current)==null||d.cropper.setCropBoxData(C)),setTimeout(()=>{$()},100)}}),c.readAsDataURL(o)}},[]);s.useEffect(()=>{if(r!=null&&r.length||typeof r=="string"){const e=Array.isArray(r)?r.map(o=>[{uid:r,url:o}]):[{uid:r,url:r}];F(e)}},[r]);const{t:M}=he.useTranslation(ge.TRANSLATION_NAMESPACE),ue=s.useMemo(()=>u?{required:u,validator:(e,o,c)=>{g||a!=null&&a.length?c():c(`${n??""} ${M("err.validation.required")}`)}}:void 0,[u,g,a==null?void 0:a.length,n,M]),L=R??M("message.fileUploadMessage2"),J=s.useMemo(()=>t.jsxRuntimeExports.jsx(Y,{showLoadingIndicator:z,_buttonTitle:L,buttonSize:j,buttonType:x,fileList:a,hidePreview:h,icon:v,loading:b,listType:y,maxCount:E,onChangeFile:T,onRemove:S,showButtonText:f,handlePreview:ie,setFileList:F}),[z,L,j,x,a,h,v,b,y,E,T,S,f]);ne.current=J.props.beforeUpload;const[de,V]=s.useState(0),[xe,W]=s.useState(0),[k,pe]=s.useState();s.useEffect(()=>{const e=setTimeout(()=>{k&&localStorage.setItem("cropper.box",JSON.stringify(k))},400);return()=>clearTimeout(e)},[k]),s.useEffect(()=>{g||(V(0),W(0))},[g]);const $=s.useCallback(async()=>{var o;const e=(o=i==null?void 0:i.current)==null?void 0:o.cropper;if(e){const{width:c,height:d}=e.getCroppedCanvas();pe(e.getCropBoxData()),V(c),W(d)}},[]);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(ve,{label:n,..._,name:p,className:"mb-0",rules:[ue,..._.rules??[]],children:J}),t.jsxRuntimeExports.jsxs(O.Modal,{open:!!g,maskClosable:!1,onOk:ce,closable:!1,onCancel:le,children:[t.jsxRuntimeExports.jsx(fe.Cropper,{ref:i,src:g,cropmove:$,viewMode:1,aspectRatio:U,cropend:()=>ae()}),t.jsxRuntimeExports.jsx("p",{className:"text-center",children:[de,xe].join(" ⨉ ")}),t.jsxRuntimeExports.jsxs("div",{className:"mt-2 d-flex justify-content-center",children:[t.jsxRuntimeExports.jsx(P,{size:"large",icon:t.jsxRuntimeExports.jsx(Ee,{}),onClick:()=>B(!0)}),t.jsxRuntimeExports.jsx(P,{size:"large",icon:t.jsxRuntimeExports.jsx(we,{}),onClick:()=>B(!1)})]})]}),t.jsxRuntimeExports.jsx(O.Modal,{open:re,title:Z,footer:null,onCancel:oe,children:t.jsxRuntimeExports.jsx("div",{className:"text-center",children:t.jsxRuntimeExports.jsx("img",{alt:"example",style:{maxWidth:"400px"},src:te})})})]})},Y=({_buttonTitle:r,buttonSize:u,buttonType:x,fileList:n,hidePreview:p,icon:m,loading:U,maxCount:R,onChangeFile:h,onRemove:j,showButtonText:f,handlePreview:A,setFileList:v,showLoadingIndicator:b,listType:E="picture"})=>t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs(O.Upload,{accept:"image/x-png,image/gif,image/jpeg",fileList:n,defaultFileList:n,onChange:()=>{},className:(n.length>=R?" hide-upload ":"")+" mb-0",multiple:!1,onPreview:p?void 0:A,onDrop:l=>(h(l.dataTransfer.files.item(0)),!1),listType:E,showUploadList:!p,onRemove:l=>{const S=n.filter(y=>l.uid!==y.uid);j==null||j(l),v(S)},beforeUpload:async l=>(h(l),!1),maxCount:R,children:[b&&t.jsxRuntimeExports.jsx(Ce,{}),t.jsxRuntimeExports.jsx("div",{className:"d-flex flex-column",children:n.length<R&&(E==="picture-circle"?t.jsxRuntimeExports.jsx(X,{}):t.jsxRuntimeExports.jsx(P,{loading:U,tooltip:f?void 0:r,size:u,icon:m,type:f?x:"text",children:f?r:void 0}))})]},n.length)});exports.UploadComponent=Y;exports.default=be;
|
|
@@ -1,59 +1,62 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
4
|
+
import { Form as Ce, Modal as Z, Upload as ve } from "antd";
|
|
5
|
+
import M, { useRef as _, useState as h, useEffect as U, useCallback as q, useMemo as ee } from "react";
|
|
6
|
+
import { Cropper as Ie } from "../../../../node_modules/react-cropper/dist/react-cropper.es.js";
|
|
7
|
+
import { TRANSLATION_NAMESPACE as be } from "../../../locale/hooks/translation-constants.js";
|
|
8
|
+
import z from "../button/Button.js";
|
|
9
|
+
import ye from "../../../util/ImageUtil.js";
|
|
10
|
+
import { useTranslation as Re } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
11
|
+
import Fe from "../../../../node_modules/@ant-design/icons/es/icons/RotateLeftOutlined.js";
|
|
12
|
+
import Ne from "../../../../node_modules/@ant-design/icons/es/icons/RotateRightOutlined.js";
|
|
13
|
+
import re from "../../../../node_modules/@ant-design/icons/es/icons/UploadOutlined.js";
|
|
14
|
+
import Ue from "../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
15
|
+
const Se = Ce.Item;
|
|
13
16
|
function te(r) {
|
|
14
17
|
return new Promise((l, m) => {
|
|
15
18
|
const o = new FileReader();
|
|
16
19
|
o.readAsDataURL(r), o.onload = () => l(o.result), o.onerror = (p) => m(p);
|
|
17
20
|
});
|
|
18
21
|
}
|
|
19
|
-
const
|
|
22
|
+
const He = ({
|
|
20
23
|
values: r = [],
|
|
21
24
|
required: l,
|
|
22
25
|
buttonType: m,
|
|
23
26
|
label: o,
|
|
24
27
|
name: p,
|
|
25
28
|
onChange: f,
|
|
26
|
-
aspectRatio:
|
|
29
|
+
aspectRatio: S,
|
|
27
30
|
buttonTitle: j,
|
|
28
31
|
hidePreview: w,
|
|
29
32
|
buttonSize: u = "large",
|
|
30
33
|
showButtonText: g = !0,
|
|
31
|
-
showOnlyIcon:
|
|
32
|
-
icon:
|
|
33
|
-
loading:
|
|
34
|
+
showOnlyIcon: B = !1,
|
|
35
|
+
icon: b = /* @__PURE__ */ t.jsx(re, {}),
|
|
36
|
+
loading: y,
|
|
34
37
|
maxCount: C = 1,
|
|
35
38
|
onAdd: c,
|
|
36
|
-
onRemove:
|
|
37
|
-
listType:
|
|
38
|
-
...
|
|
39
|
+
onRemove: R,
|
|
40
|
+
listType: F,
|
|
41
|
+
...E
|
|
39
42
|
}) => {
|
|
40
|
-
const [oe, se] = M.useState(""), [ne, ie] = M.useState(""), [ae,
|
|
41
|
-
!e.url && !e.preview && (e.preview = await te(e.originFileObj)), ie(e.url || e.preview),
|
|
42
|
-
}, [T,
|
|
43
|
+
const [oe, se] = M.useState(""), [ne, ie] = M.useState(""), [ae, $] = M.useState(!1), O = _(), n = _(), [i, k] = h([]), [x, A] = h(), ce = _(), le = () => $(!1), de = async (e) => {
|
|
44
|
+
!e.url && !e.preview && (e.preview = await te(e.originFileObj)), ie(e.url || e.preview), $(!0), se(e.name);
|
|
45
|
+
}, [T, N] = h(!1), me = () => {
|
|
43
46
|
}, J = (e) => {
|
|
44
47
|
var s;
|
|
45
48
|
(s = n == null ? void 0 : n.current) == null || s.cropper.rotate(e ? -90 : 90);
|
|
46
49
|
};
|
|
47
|
-
|
|
50
|
+
U(() => {
|
|
48
51
|
f == null || f(i[0], i);
|
|
49
52
|
}, [i, f]);
|
|
50
53
|
const pe = () => {
|
|
51
|
-
var
|
|
52
|
-
const e = (
|
|
53
|
-
|
|
54
|
+
var I;
|
|
55
|
+
const e = (I = n == null ? void 0 : n.current) == null ? void 0 : I.cropper.getCroppedCanvas(), { type: s, size: a, name: d, uid: v } = O.current;
|
|
56
|
+
N(!0), e == null || e.toBlob(async (je) => {
|
|
54
57
|
const we = Object.assign(new File([je], d, { type: s }), {
|
|
55
58
|
uid: v
|
|
56
|
-
}), Q = await
|
|
59
|
+
}), Q = await ye.resizeImage(we), X = await te(Q), Y = {
|
|
57
60
|
url: X,
|
|
58
61
|
name: d,
|
|
59
62
|
uid: v,
|
|
@@ -64,38 +67,38 @@ const Je = ({
|
|
|
64
67
|
};
|
|
65
68
|
if (c)
|
|
66
69
|
try {
|
|
67
|
-
|
|
70
|
+
N(!0), await c(Y);
|
|
68
71
|
} finally {
|
|
69
|
-
|
|
72
|
+
N(!1);
|
|
70
73
|
}
|
|
71
|
-
k([Y, ...i]),
|
|
74
|
+
k([Y, ...i]), N(!1);
|
|
72
75
|
}), A(void 0);
|
|
73
76
|
}, fe = () => {
|
|
74
|
-
A(void 0),
|
|
77
|
+
A(void 0), O.current = void 0;
|
|
75
78
|
}, V = q((e) => {
|
|
76
79
|
const s = e;
|
|
77
80
|
if (s) {
|
|
78
|
-
|
|
81
|
+
O.current = s;
|
|
79
82
|
const a = new FileReader();
|
|
80
83
|
a.addEventListener("load", () => {
|
|
81
84
|
var d;
|
|
82
85
|
if (typeof a.result == "string") {
|
|
83
86
|
A(a.result);
|
|
84
|
-
const v = localStorage.getItem("cropper.box"),
|
|
85
|
-
|
|
87
|
+
const v = localStorage.getItem("cropper.box"), I = v ? JSON.parse(v) : void 0;
|
|
88
|
+
I && ((d = n == null ? void 0 : n.current) == null || d.cropper.setCropBoxData(I)), setTimeout(() => {
|
|
86
89
|
K();
|
|
87
90
|
}, 100);
|
|
88
91
|
}
|
|
89
92
|
}), a.readAsDataURL(s);
|
|
90
93
|
}
|
|
91
94
|
}, []);
|
|
92
|
-
|
|
95
|
+
U(() => {
|
|
93
96
|
if (r != null && r.length || typeof r == "string") {
|
|
94
97
|
const e = Array.isArray(r) ? r.map((s) => [{ uid: r, url: s }]) : [{ uid: r, url: r }];
|
|
95
98
|
k(e);
|
|
96
99
|
}
|
|
97
100
|
}, [r]);
|
|
98
|
-
const { t: P } =
|
|
101
|
+
const { t: P } = Re(be), ue = ee(
|
|
99
102
|
() => l ? {
|
|
100
103
|
required: l,
|
|
101
104
|
validator: (e, s, a) => {
|
|
@@ -103,9 +106,9 @@ const Je = ({
|
|
|
103
106
|
}
|
|
104
107
|
} : void 0,
|
|
105
108
|
[l, x, i == null ? void 0 : i.length, o, P]
|
|
106
|
-
), W = j ?? P("message.fileUploadMessage2"),
|
|
109
|
+
), W = j ?? P("message.fileUploadMessage2"), H = ee(
|
|
107
110
|
() => /* @__PURE__ */ t.jsx(
|
|
108
|
-
|
|
111
|
+
Oe,
|
|
109
112
|
{
|
|
110
113
|
showLoadingIndicator: T,
|
|
111
114
|
_buttonTitle: W,
|
|
@@ -113,12 +116,12 @@ const Je = ({
|
|
|
113
116
|
buttonType: m,
|
|
114
117
|
fileList: i,
|
|
115
118
|
hidePreview: w,
|
|
116
|
-
icon:
|
|
117
|
-
loading:
|
|
118
|
-
listType:
|
|
119
|
+
icon: b,
|
|
120
|
+
loading: y,
|
|
121
|
+
listType: F,
|
|
119
122
|
maxCount: C,
|
|
120
123
|
onChangeFile: V,
|
|
121
|
-
onRemove:
|
|
124
|
+
onRemove: R,
|
|
122
125
|
showButtonText: g,
|
|
123
126
|
handlePreview: de,
|
|
124
127
|
setFileList: k
|
|
@@ -131,43 +134,43 @@ const Je = ({
|
|
|
131
134
|
m,
|
|
132
135
|
i,
|
|
133
136
|
w,
|
|
137
|
+
b,
|
|
134
138
|
y,
|
|
135
|
-
|
|
136
|
-
U,
|
|
139
|
+
F,
|
|
137
140
|
C,
|
|
138
141
|
V,
|
|
139
|
-
|
|
142
|
+
R,
|
|
140
143
|
g
|
|
141
144
|
]
|
|
142
145
|
);
|
|
143
|
-
ce.current =
|
|
144
|
-
const [ge,
|
|
145
|
-
|
|
146
|
+
ce.current = H.props.beforeUpload;
|
|
147
|
+
const [ge, L] = h(0), [xe, G] = h(0), [D, he] = h();
|
|
148
|
+
U(() => {
|
|
146
149
|
const e = setTimeout(() => {
|
|
147
150
|
D && localStorage.setItem("cropper.box", JSON.stringify(D));
|
|
148
151
|
}, 400);
|
|
149
152
|
return () => clearTimeout(e);
|
|
150
|
-
}, [D]),
|
|
151
|
-
x || (
|
|
153
|
+
}, [D]), U(() => {
|
|
154
|
+
x || (L(0), G(0));
|
|
152
155
|
}, [x]);
|
|
153
156
|
const K = q(async () => {
|
|
154
157
|
var s;
|
|
155
158
|
const e = (s = n == null ? void 0 : n.current) == null ? void 0 : s.cropper;
|
|
156
159
|
if (e) {
|
|
157
160
|
const { width: a, height: d } = e.getCroppedCanvas();
|
|
158
|
-
he(e.getCropBoxData()),
|
|
161
|
+
he(e.getCropBoxData()), L(a), G(d);
|
|
159
162
|
}
|
|
160
163
|
}, []);
|
|
161
164
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
162
165
|
/* @__PURE__ */ t.jsx(
|
|
163
|
-
|
|
166
|
+
Se,
|
|
164
167
|
{
|
|
165
168
|
label: o,
|
|
166
|
-
...
|
|
169
|
+
...E,
|
|
167
170
|
name: p,
|
|
168
171
|
className: "mb-0",
|
|
169
|
-
rules: [ue, ...
|
|
170
|
-
children:
|
|
172
|
+
rules: [ue, ...E.rules ?? []],
|
|
173
|
+
children: H
|
|
171
174
|
}
|
|
172
175
|
),
|
|
173
176
|
/* @__PURE__ */ t.jsxs(
|
|
@@ -180,31 +183,31 @@ const Je = ({
|
|
|
180
183
|
onCancel: fe,
|
|
181
184
|
children: [
|
|
182
185
|
/* @__PURE__ */ t.jsx(
|
|
183
|
-
|
|
186
|
+
Ie,
|
|
184
187
|
{
|
|
185
188
|
ref: n,
|
|
186
189
|
src: x,
|
|
187
190
|
cropmove: K,
|
|
188
191
|
viewMode: 1,
|
|
189
|
-
aspectRatio:
|
|
192
|
+
aspectRatio: S,
|
|
190
193
|
cropend: () => me()
|
|
191
194
|
}
|
|
192
195
|
),
|
|
193
196
|
/* @__PURE__ */ t.jsx("p", { className: "text-center", children: [ge, xe].join(" ⨉ ") }),
|
|
194
197
|
/* @__PURE__ */ t.jsxs("div", { className: "mt-2 d-flex justify-content-center", children: [
|
|
195
198
|
/* @__PURE__ */ t.jsx(
|
|
196
|
-
|
|
199
|
+
z,
|
|
197
200
|
{
|
|
198
201
|
size: "large",
|
|
199
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
202
|
+
icon: /* @__PURE__ */ t.jsx(Fe, {}),
|
|
200
203
|
onClick: () => J(!0)
|
|
201
204
|
}
|
|
202
205
|
),
|
|
203
206
|
/* @__PURE__ */ t.jsx(
|
|
204
|
-
|
|
207
|
+
z,
|
|
205
208
|
{
|
|
206
209
|
size: "large",
|
|
207
|
-
icon: /* @__PURE__ */ t.jsx(
|
|
210
|
+
icon: /* @__PURE__ */ t.jsx(Ne, {}),
|
|
208
211
|
onClick: () => J(!1)
|
|
209
212
|
}
|
|
210
213
|
)
|
|
@@ -223,24 +226,24 @@ const Je = ({
|
|
|
223
226
|
}
|
|
224
227
|
)
|
|
225
228
|
] });
|
|
226
|
-
},
|
|
229
|
+
}, Oe = ({
|
|
227
230
|
_buttonTitle: r,
|
|
228
231
|
buttonSize: l,
|
|
229
232
|
buttonType: m,
|
|
230
233
|
fileList: o,
|
|
231
234
|
hidePreview: p,
|
|
232
235
|
icon: f,
|
|
233
|
-
loading:
|
|
236
|
+
loading: S,
|
|
234
237
|
maxCount: j,
|
|
235
238
|
onChangeFile: w,
|
|
236
239
|
onRemove: u,
|
|
237
240
|
showButtonText: g,
|
|
238
|
-
handlePreview:
|
|
239
|
-
setFileList:
|
|
240
|
-
showLoadingIndicator:
|
|
241
|
+
handlePreview: B,
|
|
242
|
+
setFileList: b,
|
|
243
|
+
showLoadingIndicator: y,
|
|
241
244
|
listType: C = "picture"
|
|
242
245
|
}) => /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs(
|
|
243
|
-
|
|
246
|
+
ve,
|
|
244
247
|
{
|
|
245
248
|
accept: "image/x-png,image/gif,image/jpeg",
|
|
246
249
|
fileList: o,
|
|
@@ -249,22 +252,22 @@ const Je = ({
|
|
|
249
252
|
},
|
|
250
253
|
className: (o.length >= j ? " hide-upload " : "") + " mb-0",
|
|
251
254
|
multiple: !1,
|
|
252
|
-
onPreview: p ? void 0 :
|
|
255
|
+
onPreview: p ? void 0 : B,
|
|
253
256
|
onDrop: (c) => (w(c.dataTransfer.files.item(0)), !1),
|
|
254
257
|
listType: C,
|
|
255
258
|
showUploadList: !p,
|
|
256
259
|
onRemove: (c) => {
|
|
257
|
-
const
|
|
258
|
-
u == null || u(c),
|
|
260
|
+
const R = o.filter((F) => c.uid !== F.uid);
|
|
261
|
+
u == null || u(c), b(R);
|
|
259
262
|
},
|
|
260
263
|
beforeUpload: async (c) => (w(c), !1),
|
|
261
264
|
maxCount: j,
|
|
262
265
|
children: [
|
|
263
|
-
|
|
266
|
+
y && /* @__PURE__ */ t.jsx(Ue, {}),
|
|
264
267
|
/* @__PURE__ */ t.jsx("div", { className: "d-flex flex-column", children: o.length < j && (C === "picture-circle" ? /* @__PURE__ */ t.jsx(re, {}) : /* @__PURE__ */ t.jsx(
|
|
265
|
-
|
|
268
|
+
z,
|
|
266
269
|
{
|
|
267
|
-
loading:
|
|
270
|
+
loading: S,
|
|
268
271
|
tooltip: g ? void 0 : r,
|
|
269
272
|
size: l,
|
|
270
273
|
icon: f,
|
|
@@ -277,6 +280,6 @@ const Je = ({
|
|
|
277
280
|
o.length
|
|
278
281
|
) });
|
|
279
282
|
export {
|
|
280
|
-
|
|
281
|
-
|
|
283
|
+
Oe as UploadComponent,
|
|
284
|
+
He as default
|
|
282
285
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const s=require("../../../../_virtual/jsx-runtime.cjs"),n=require("antd"),i=require("react"),l=({button:m,disabled:c,...t})=>{const a=i.useMemo(()=>{const{enum:e,translations:o}=t;if(e){const r=[];for(const u of e)r.push({key:u,value:(o==null?void 0:o[u])??u.toUpperCase()});return r}else return t.values},[t]),x=m?n.Radio.Button:n.Radio;return s.jsxRuntimeExports.jsx(n.Form.Item,{...t,children:s.jsxRuntimeExports.jsx(n.Radio.Group,{disabled:c,children:a.map(({key:e,value:o})=>s.jsxRuntimeExports.jsx(x,{value:e,children:o},e))})})},R=i.memo(l);module.exports=R;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../../_virtual/jsx-runtime.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../../_virtual/jsx-runtime.cjs"),o=require("antd"),u=require("react"),j=require("../select/SelectComponent.cjs"),F=({className:a,onSelect:d,label:p,required:S,name:s,mode:l,items:t})=>{const r=o.Form.useFormInstance(),[n,x]=u.useState(!0);return u.useEffect(()=>{if(t&&n){const e=t.filter(i=>i.alreadySelected).map(i=>i.id);r==null||r.setFieldsValue({[s]:l==="multiple"?e:e==null?void 0:e[0]}),x(!1)}},[n,r,t,l,s]),c.jsxRuntimeExports.jsx(j,{required:S,label:p,mode:l,className:a,name:s,onSelect:d,items:t,itemBuilder:e=>c.jsxRuntimeExports.jsx(o.Select.Option,{value:e.id,disabled:e.lock,children:e.label},e.id)})};exports.SelectFieldInReport=F;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),s=require("antd"),r=s.List.Item.Meta,x=s.List.Item,o=({title:e,description:i,children:n})=>t.jsxRuntimeExports.jsxs(x,{className:"",children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(r,{title:e,description:i})}),t.jsxRuntimeExports.jsx("div",{className:"float-right",children:n})]});module.exports=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const r=require("../../../../_virtual/jsx-runtime.cjs"),x=require("antd"),k=require("react"),H=require("../../../locale/hooks/translation-constants.cjs"),P=require("../tooltip/TooltipComponent.cjs"),b=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs");function B({label:a,rules:E=[],required:R,placeholder:m,notSearch:S,children:u,readOnly:n,items:o,dropdownRender:y,itemBuilder:w,loading:d,showLoadingInEmptyIndicator:T,nameFieldInArray:h="name",innerRef:q,tooltip:L,filterOption:N,tagRender:_,...s}){const{t:A}=b.useTranslation(H.TRANSLATION_NAMESPACE),I=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[h];return r.jsxRuntimeExports.jsx("option",{value:t,children:r.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:c}})},t)},[h]);return r.jsxRuntimeExports.jsx(x.ConfigProvider,{renderEmpty:T&&d?()=>r.jsxRuntimeExports.jsx(x.Spin,{}):void 0,children:r.jsxRuntimeExports.jsx(P,{title:L,children:r.jsxRuntimeExports.jsx(x.Form.Item,{label:a,name:s.name,help:s.help,className:s.className,rules:[...E,{required:R,message:`${a??m??""} ${A("err.validation.required")}`}],children:r.jsxRuntimeExports.jsx(x.Select,{ref:q,loading:d,open:n?!1:void 0,onChange:!n&&s.onChange,allowClear:!n&&s.allowClear,showSearch:!S,className:`max-width ${n?"readOnly":""}`,...s,tagRender:_,placeholder:m??a,filterOption:N??((e,t)=>{var c,j,f,C;try{const i=(f=(j=(c=t==null?void 0:t.children)==null?void 0:c.props)==null?void 0:j.dangerouslySetInnerHTML)==null?void 0:f.__html,M=e.toLowerCase().split(/\s+/),g=(t==null?void 0:t.children)??"",p=typeof g=="string"?g.toLowerCase():typeof i=="string"?i.toLowerCase():"",O=(((C=t==null?void 0:t.value)==null?void 0:C.toString())??"").toLowerCase(),$=p.replace(/\s/g,"");return M.every(l=>p.indexOf(l)>=0||O.indexOf(l)>=0||$.indexOf(l)>=0)}catch(i){return console.log(i),!0}}),dropdownRender:y,children:u===null?void 0:u??(o&&(o==null?void 0:o.map(w??I)))})})})})}module.exports=B;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { ConfigProvider as H, Spin as P, Form as R, Select as b } from "antd";
|
|
3
3
|
import { useCallback as q } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import F from "
|
|
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
7
|
function Q({
|
|
8
8
|
label: m,
|
|
9
9
|
rules: j = [],
|
|
@@ -24,7 +24,7 @@ function Q({
|
|
|
24
24
|
tagRender: A,
|
|
25
25
|
...n
|
|
26
26
|
}) {
|
|
27
|
-
const { t: I } = B
|
|
27
|
+
const { t: I } = F(B), M = q(
|
|
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
30
|
return /* @__PURE__ */ t.jsx("option", { value: r, children: /* @__PURE__ */ t.jsx("div", { dangerouslySetInnerHTML: { __html: c } }) }, r);
|
|
@@ -35,7 +35,7 @@ function Q({
|
|
|
35
35
|
H,
|
|
36
36
|
{
|
|
37
37
|
renderEmpty: T && d ? () => /* @__PURE__ */ t.jsx(P, {}) : void 0,
|
|
38
|
-
children: /* @__PURE__ */ t.jsx(
|
|
38
|
+
children: /* @__PURE__ */ t.jsx(D, { title: _, children: /* @__PURE__ */ t.jsx(
|
|
39
39
|
R.Item,
|
|
40
40
|
{
|
|
41
41
|
label: m,
|
|
@@ -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,{...r});exports.ShowMore=e;exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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;
|
|
@@ -2,37 +2,36 @@ import { j as e } from "../../../../_virtual/jsx-runtime.js";
|
|
|
2
2
|
import { Tabs as r, Layout as b } from "antd";
|
|
3
3
|
import v from "../../../context/WindowDimension.js";
|
|
4
4
|
import { useState as g, useEffect as w } from "react";
|
|
5
|
-
import { useNavigate as y,
|
|
6
|
-
|
|
7
|
-
const { Content: S } = b, L = ({
|
|
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 = ({
|
|
8
7
|
positionOfRoute: n,
|
|
9
8
|
initialKey: s = "*",
|
|
10
9
|
tabs: i,
|
|
11
10
|
className: m = "",
|
|
12
|
-
mode:
|
|
11
|
+
mode: l = "default"
|
|
13
12
|
}) => {
|
|
14
|
-
const [
|
|
13
|
+
const [p, u] = g(s), o = y(), d = (t) => {
|
|
15
14
|
o(t);
|
|
16
|
-
}, c =
|
|
15
|
+
}, c = N();
|
|
17
16
|
w(() => {
|
|
18
17
|
const t = c.pathname.split("/")[n];
|
|
19
18
|
u(t ?? ""), t || o(s, { replace: !0 });
|
|
20
19
|
}, [s, c.pathname, o, n]);
|
|
21
|
-
const { isDesktop:
|
|
20
|
+
const { isDesktop: f } = v(), a = l === "side" && f, h = a ? "left" : "top", x = a ? "d-flex h-100" : "";
|
|
22
21
|
return /* @__PURE__ */ e.jsxs("div", { className: `${m} ${x}`, children: [
|
|
23
22
|
/* @__PURE__ */ e.jsx(
|
|
24
23
|
r,
|
|
25
24
|
{
|
|
26
25
|
type: "card",
|
|
27
26
|
tabPosition: h,
|
|
28
|
-
activeKey:
|
|
29
|
-
onChange:
|
|
27
|
+
activeKey: p,
|
|
28
|
+
onChange: d,
|
|
30
29
|
children: i.map(({ key: t, label: j }) => /* @__PURE__ */ e.jsx(r.TabPane, { tab: j }, t))
|
|
31
30
|
}
|
|
32
31
|
),
|
|
33
|
-
/* @__PURE__ */ e.jsx(S, { className: `max-height ${a ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e.jsx(
|
|
32
|
+
/* @__PURE__ */ e.jsx(S, { className: `max-height ${a ? "overflow-auto" : ""}`, children: /* @__PURE__ */ e.jsx(P, {}) })
|
|
34
33
|
] });
|
|
35
34
|
};
|
|
36
35
|
export {
|
|
37
|
-
|
|
36
|
+
E as TabViewWithRoute
|
|
38
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as f } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { Tag as x } from "antd";
|
|
3
3
|
import { TRANSLATION_NAMESPACE as T } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
-
import { useTranslation as A } from "react-i18next";
|
|
4
|
+
import { useTranslation as A } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
5
5
|
const C = ({
|
|
6
6
|
onClick: e,
|
|
7
7
|
clickable: m,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const o=require("../../../../_virtual/jsx-runtime.cjs"),a=require("antd"),x=require("react"),M=require("../../../locale/hooks/translation-constants.cjs"),P=require("../tooltip/TooltipComponent.cjs"),S=require("./TextField.cjs"),L=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),O=x.forwardRef(function({type:b,required:i,label:e,rules:c=[],placeholder:r,onEnter:m,form:j,nextFocus:T,min:u,moneyField:s,addonAfter:q,minLength:E,defaultValue:R,pattern:f,disabled:l,readOnly:N,onChange:$,value:g,max:A,addonBefore:I,size:C,isInt:d=!1,tooltip:h,...w},B){const{t:p}=L.useTranslation(M.TRANSLATION_NAMESPACE),F=x.useMemo(()=>[...c,{required:i,message:`${e??r??""} ${p("err.validation.required")}`}],[c,e,r,p,i]);return o.jsxRuntimeExports.jsx(P,{title:h,children:o.jsxRuntimeExports.jsx(a.Form.Item,{...w,label:e,rules:F,children:o.jsxRuntimeExports.jsx(a.InputNumber,{ref:B,disabled:l,defaultValue:R,value:g,readOnly:N,addonBefore:I,minLength:E,addonAfter:q,step:d?1:void 0,pattern:d?"d*":f,onChange:$,onPressEnter:t=>S.onEnterInternalTextField(t,T,j,m),className:"max-width",min:u===null?void 0:u??0,max:A,type:s?void 0:"number",size:C,formatter:s?t=>{if(t.includes(".")){const n=`${t}`.split(".");return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),n.join(".")}else return`${t}`.replace(/\B(?=(\d{3})+(?!\d))/g,",")}:void 0,parser:s?t=>t==null?void 0:t.replace(/\$\s?|(,*)/g,""):void 0,placeholder:r??e})})})});module.exports=O;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as s } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { Form as M, InputNumber as P } from "antd";
|
|
3
3
|
import { forwardRef as S, useMemo as F } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import _ from "
|
|
7
|
-
import {
|
|
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
8
|
const K = S(
|
|
9
9
|
function({
|
|
10
10
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -33,7 +33,7 @@ const K = S(
|
|
|
33
33
|
tooltip: h,
|
|
34
34
|
...w
|
|
35
35
|
}, B) {
|
|
36
|
-
const { t: f } = L
|
|
36
|
+
const { t: f } = b(L), C = F(
|
|
37
37
|
() => [
|
|
38
38
|
...m,
|
|
39
39
|
{
|
|
@@ -45,7 +45,7 @@ const K = S(
|
|
|
45
45
|
],
|
|
46
46
|
[m, t, o, f, i]
|
|
47
47
|
);
|
|
48
|
-
return /* @__PURE__ */ s.jsx(
|
|
48
|
+
return /* @__PURE__ */ s.jsx(O, { title: h, children: /* @__PURE__ */ s.jsx(M.Item, { ...w, label: t, rules: C, children: /* @__PURE__ */ s.jsx(
|
|
49
49
|
P,
|
|
50
50
|
{
|
|
51
51
|
ref: B,
|
|
@@ -59,7 +59,7 @@ const K = S(
|
|
|
59
59
|
step: d ? 1 : void 0,
|
|
60
60
|
pattern: d ? "d*" : T,
|
|
61
61
|
onChange: g,
|
|
62
|
-
onPressEnter: (r) =>
|
|
62
|
+
onPressEnter: (r) => _(r, u, c, a),
|
|
63
63
|
className: "max-width",
|
|
64
64
|
min: p === null ? void 0 : p ?? 0,
|
|
65
65
|
max: A,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),i=require("../../../util/ValidationUtil.cjs"),l=require("./TextField.cjs"),r=e=>t.jsxRuntimeExports.jsx(l.default,{...e,rules:[...e.rules??[],...i.phoneValidation(e.label??e.placeholder??"")]});module.exports=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),i=require("antd"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../_virtual/jsx-runtime.cjs"),i=require("antd"),I=require("../../../locale/hooks/translation-constants.cjs"),j=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),l=(n,e,t,r)=>{var s;e&&t&&(n.preventDefault(),(s=t==null?void 0:t.getFieldInstance(e))==null||s.focus()),r&&r(n)},A=({required:n,label:e,rules:t=[],placeholder:r,onEnter:s,nextFocus:c,className:o,...u})=>{const{t:d}=j.useTranslation(I.TRANSLATION_NAMESPACE),x=i.Form.useFormInstance();return a.jsxRuntimeExports.jsx(i.Form.Item,{...u,className:o,label:e,rules:[...t,{required:n,message:`${e} ${d("err.validation.required")}`}],children:a.jsxRuntimeExports.jsx(i.Input.TextArea,{...u,className:o,onPressEnter:T=>l(T,c,x,s),placeholder:r??e})})};exports.default=A;exports.onEnterInternalTextField=l;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as a } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { Form as m, Input as x } from "antd";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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
5
|
const I = (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);
|
|
@@ -15,7 +15,7 @@ const I = (r, e, t, n) => {
|
|
|
15
15
|
className: s,
|
|
16
16
|
...i
|
|
17
17
|
}) => {
|
|
18
|
-
const { t: p } = l
|
|
18
|
+
const { t: p } = A(l), c = m.useFormInstance();
|
|
19
19
|
return /* @__PURE__ */ a.jsx(
|
|
20
20
|
m.Item,
|
|
21
21
|
{
|