@kingteza/crud-component 1.0.9 → 1.0.12
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/index.cjs +1 -1
- package/dist/util/index.cjs +1 -1
- package/package.json +18 -9
- package/dist/_virtual/FileSaver.min.cjs +0 -1
- package/dist/_virtual/FileSaver.min.js +0 -5
- package/dist/_virtual/FileSaver.min2.cjs +0 -1
- package/dist/_virtual/FileSaver.min2.js +0 -4
- package/dist/_virtual/ShowMoreText.cjs +0 -1
- package/dist/_virtual/ShowMoreText.js +0 -7
- package/dist/_virtual/ShowMoreText2.cjs +0 -1
- package/dist/_virtual/ShowMoreText2.js +0 -4
- package/dist/_virtual/Truncate.cjs +0 -1
- package/dist/_virtual/Truncate.js +0 -4
- package/dist/_virtual/_commonjsHelpers.cjs +0 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -8
- package/dist/_virtual/advancedFormat.cjs +0 -1
- package/dist/_virtual/advancedFormat.js +0 -7
- package/dist/_virtual/advancedFormat2.cjs +0 -1
- package/dist/_virtual/advancedFormat2.js +0 -4
- package/dist/_virtual/customParseFormat.cjs +0 -1
- package/dist/_virtual/customParseFormat.js +0 -7
- package/dist/_virtual/customParseFormat2.cjs +0 -1
- package/dist/_virtual/customParseFormat2.js +0 -4
- package/dist/_virtual/dayjs.min.cjs +0 -1
- package/dist/_virtual/dayjs.min.js +0 -7
- package/dist/_virtual/dayjs.min2.cjs +0 -1
- package/dist/_virtual/dayjs.min2.js +0 -4
- package/dist/_virtual/index.cjs +0 -1
- package/dist/_virtual/index.js +0 -7
- package/dist/_virtual/index10.cjs +0 -1
- package/dist/_virtual/index10.js +0 -7
- package/dist/_virtual/index11.cjs +0 -1
- package/dist/_virtual/index11.js +0 -7
- package/dist/_virtual/index12.cjs +0 -1
- package/dist/_virtual/index12.js +0 -4
- package/dist/_virtual/index13.cjs +0 -1
- package/dist/_virtual/index13.js +0 -4
- package/dist/_virtual/index2.cjs +0 -1
- package/dist/_virtual/index2.js +0 -5
- package/dist/_virtual/index3.cjs +0 -1
- package/dist/_virtual/index3.js +0 -7
- package/dist/_virtual/index4.cjs +0 -1
- package/dist/_virtual/index4.js +0 -4
- package/dist/_virtual/index5.cjs +0 -1
- package/dist/_virtual/index5.js +0 -4
- package/dist/_virtual/index6.cjs +0 -1
- package/dist/_virtual/index6.js +0 -4
- package/dist/_virtual/index7.cjs +0 -1
- package/dist/_virtual/index7.js +0 -4
- package/dist/_virtual/index8.cjs +0 -1
- package/dist/_virtual/index8.js +0 -2
- package/dist/_virtual/index9.cjs +0 -1
- package/dist/_virtual/index9.js +0 -7
- package/dist/_virtual/jsx-runtime.cjs +0 -1
- package/dist/_virtual/jsx-runtime.js +0 -5
- package/dist/_virtual/jsx-runtime2.cjs +0 -1
- package/dist/_virtual/jsx-runtime2.js +0 -4
- package/dist/_virtual/localeData.cjs +0 -1
- package/dist/_virtual/localeData.js +0 -7
- package/dist/_virtual/localeData2.cjs +0 -1
- package/dist/_virtual/localeData2.js +0 -4
- package/dist/_virtual/main.cjs +0 -1
- package/dist/_virtual/main.js +0 -7
- package/dist/_virtual/main2.cjs +0 -1
- package/dist/_virtual/main2.js +0 -4
- package/dist/_virtual/papaparse.min.cjs +0 -1
- package/dist/_virtual/papaparse.min.js +0 -7
- package/dist/_virtual/papaparse.min2.cjs +0 -1
- package/dist/_virtual/papaparse.min2.js +0 -4
- package/dist/_virtual/react-is.development.cjs +0 -1
- package/dist/_virtual/react-is.development.js +0 -4
- package/dist/_virtual/react-is.development2.cjs +0 -1
- package/dist/_virtual/react-is.development2.js +0 -4
- package/dist/_virtual/react-is.production.min.cjs +0 -1
- package/dist/_virtual/react-is.production.min.js +0 -4
- package/dist/_virtual/react-is.production.min2.cjs +0 -1
- package/dist/_virtual/react-is.production.min2.js +0 -4
- package/dist/_virtual/react-jsx-runtime.development.cjs +0 -1
- package/dist/_virtual/react-jsx-runtime.development.js +0 -4
- package/dist/_virtual/react-jsx-runtime.production.min.cjs +0 -1
- package/dist/_virtual/react-jsx-runtime.production.min.js +0 -4
- package/dist/_virtual/weekOfYear.cjs +0 -1
- package/dist/_virtual/weekOfYear.js +0 -7
- package/dist/_virtual/weekOfYear2.cjs +0 -1
- package/dist/_virtual/weekOfYear2.js +0 -4
- package/dist/_virtual/weekYear.cjs +0 -1
- package/dist/_virtual/weekYear.js +0 -7
- package/dist/_virtual/weekYear2.cjs +0 -1
- package/dist/_virtual/weekYear2.js +0 -4
- package/dist/_virtual/weekday.cjs +0 -1
- package/dist/_virtual/weekday.js +0 -7
- package/dist/_virtual/weekday2.cjs +0 -1
- package/dist/_virtual/weekday2.js +0 -4
- package/dist/common/index.cjs +0 -1
- package/dist/common/index.d.ts +0 -2
- package/dist/common/index.js +0 -75
- package/dist/context/WindowDimension.d.ts +0 -4
- package/dist/crud-component.css +0 -9
- package/dist/src/components/common/DatePicker/DatePicker.cjs +0 -1
- package/dist/src/components/common/DatePicker/DatePicker.js +0 -89
- package/dist/src/components/common/DatePicker/TimePicker.cjs +0 -1
- package/dist/src/components/common/DatePicker/TimePicker.js +0 -79
- package/dist/src/components/common/appearance/Hider.cjs +0 -1
- package/dist/src/components/common/appearance/Hider.js +0 -5
- package/dist/src/components/common/button/Button.cjs +0 -1
- package/dist/src/components/common/button/Button.js +0 -65
- package/dist/src/components/common/button/CloneButtonTable.cjs +0 -1
- package/dist/src/components/common/button/CloneButtonTable.js +0 -20
- package/dist/src/components/common/button/DeleteButtonTable.cjs +0 -1
- package/dist/src/components/common/button/DeleteButtonTable.js +0 -68
- package/dist/src/components/common/button/ExportButton.cjs +0 -1
- package/dist/src/components/common/button/ExportButton.js +0 -27
- package/dist/src/components/common/button/HideButtonTable.cjs +0 -1
- package/dist/src/components/common/button/HideButtonTable.js +0 -68
- package/dist/src/components/common/button/ImportButton.cjs +0 -1
- package/dist/src/components/common/button/ImportButton.js +0 -56
- package/dist/src/components/common/button/NewButton.cjs +0 -1
- package/dist/src/components/common/button/NewButton.js +0 -24
- package/dist/src/components/common/button/PrintButton.cjs +0 -1
- package/dist/src/components/common/button/PrintButton.js +0 -26
- package/dist/src/components/common/button/RefreshButton.cjs +0 -1
- package/dist/src/components/common/button/RefreshButton.js +0 -24
- package/dist/src/components/common/button/UnHideButton.cjs +0 -1
- package/dist/src/components/common/button/UnHideButton.js +0 -70
- package/dist/src/components/common/button/UpdateButtonTable.cjs +0 -1
- package/dist/src/components/common/button/UpdateButtonTable.js +0 -20
- package/dist/src/components/common/button/ViewButtonTable.cjs +0 -1
- package/dist/src/components/common/button/ViewButtonTable.js +0 -20
- package/dist/src/components/common/check-box/CheckBox.cjs +0 -1
- package/dist/src/components/common/check-box/CheckBox.js +0 -42
- package/dist/src/components/common/description/DescList.cjs +0 -1
- package/dist/src/components/common/description/DescList.js +0 -16
- package/dist/src/components/common/layout/VerticalSpace.cjs +0 -1
- package/dist/src/components/common/layout/VerticalSpace.js +0 -6
- package/dist/src/components/common/loading/LoadingIndicator.cjs +0 -1
- package/dist/src/components/common/loading/LoadingIndicator.js +0 -25
- package/dist/src/components/common/picker/ImagePicker.cjs +0 -1
- package/dist/src/components/common/picker/ImagePicker.js +0 -287
- package/dist/src/components/common/radio/RadioGroupComponent.cjs +0 -1
- package/dist/src/components/common/radio/RadioGroupComponent.js +0 -20
- package/dist/src/components/common/report/SelectFieldInReport.cjs +0 -1
- package/dist/src/components/common/report/SelectFieldInReport.js +0 -31
- package/dist/src/components/common/select/CustomSelectOption.cjs +0 -1
- package/dist/src/components/common/select/CustomSelectOption.js +0 -13
- package/dist/src/components/common/select/SelectComponent.cjs +0 -1
- package/dist/src/components/common/select/SelectComponent.js +0 -92
- package/dist/src/components/common/show-more/index.cjs +0 -1
- package/dist/src/components/common/show-more/index.js +0 -8
- package/dist/src/components/common/tab/TabViewWithRoute.cjs +0 -1
- package/dist/src/components/common/tab/TabViewWithRoute.js +0 -38
- package/dist/src/components/common/table/table.cjs +0 -1
- package/dist/src/components/common/table/table.js +0 -40
- package/dist/src/components/common/tag/StatusTag.cjs +0 -1
- package/dist/src/components/common/tag/StatusTag.js +0 -30
- package/dist/src/components/common/text/index.cjs +0 -1
- package/dist/src/components/common/text/index.js +0 -5
- package/dist/src/components/common/text/title/index.cjs +0 -1
- package/dist/src/components/common/text/title/index.js +0 -5
- package/dist/src/components/common/text-field/NumberField.cjs +0 -1
- package/dist/src/components/common/text-field/NumberField.js +0 -84
- package/dist/src/components/common/text-field/PhoneNumberField.cjs +0 -1
- package/dist/src/components/common/text-field/PhoneNumberField.js +0 -18
- package/dist/src/components/common/text-field/TextArea.cjs +0 -1
- package/dist/src/components/common/text-field/TextArea.js +0 -48
- package/dist/src/components/common/text-field/TextField.cjs +0 -1
- package/dist/src/components/common/text-field/TextField.js +0 -74
- package/dist/src/components/common/tooltip/TooltipComponent.cjs +0 -1
- package/dist/src/components/common/tooltip/TooltipComponent.js +0 -9
- package/dist/src/components/common/wizard/WizardResult.cjs +0 -1
- package/dist/src/components/common/wizard/WizardResult.js +0 -61
- package/dist/src/components/common/wizard/WizardViewForm.cjs +0 -1
- package/dist/src/components/common/wizard/WizardViewForm.js +0 -74
- package/dist/src/components/crud/CrudComponent.cjs +0 -1
- package/dist/src/components/crud/CrudComponent.js +0 -213
- package/dist/src/components/crud/CrudField.cjs +0 -1
- package/dist/src/components/crud/CrudField.js +0 -462
- package/dist/src/components/crud/CrudForm.cjs +0 -1
- package/dist/src/components/crud/CrudForm.js +0 -94
- package/dist/src/components/crud/CrudFormWizard.cjs +0 -1
- package/dist/src/components/crud/CrudFormWizard.js +0 -145
- package/dist/src/components/crud/CrudReportComponent.cjs +0 -4
- package/dist/src/components/crud/CrudReportComponent.js +0 -259
- package/dist/src/components/crud/CrudSearchComponent.cjs +0 -1
- package/dist/src/components/crud/CrudSearchComponent.js +0 -97
- package/dist/src/components/crud/FileCrudField.cjs +0 -1
- package/dist/src/components/crud/FileCrudField.js +0 -229
- package/dist/src/components/crud/ImageCrudField.cjs +0 -1
- package/dist/src/components/crud/ImageCrudField.js +0 -116
- package/dist/src/components/crud/import/CrudImportButton.cjs +0 -1
- package/dist/src/components/crud/import/CrudImportButton.js +0 -31
- package/dist/src/components/crud/import/CrudImportComponent.cjs +0 -2
- package/dist/src/components/crud/import/CrudImportComponent.js +0 -226
- package/dist/src/components/crud/view/CrudDecListView.cjs +0 -1
- package/dist/src/components/crud/view/CrudDecListView.js +0 -42
- package/dist/src/components/crud/view/CrudViewer.cjs +0 -1
- package/dist/src/components/crud/view/CrudViewer.js +0 -217
- package/dist/src/components/crud/view/CrudViewerUtil.cjs +0 -1
- package/dist/src/components/crud/view/CrudViewerUtil.js +0 -59
- package/dist/src/context/WindowDimension.cjs +0 -1
- package/dist/src/context/WindowDimension.js +0 -8
- package/dist/src/locale/hooks/translation-constants.cjs +0 -1
- package/dist/src/locale/hooks/translation-constants.js +0 -4
- package/dist/src/locale/index.cjs +0 -1
- package/dist/src/locale/index.js +0 -33
- package/dist/src/locale/translations/en.cjs +0 -1
- package/dist/src/locale/translations/en.js +0 -60
- package/dist/src/util/DateUtil.cjs +0 -1
- package/dist/src/util/DateUtil.js +0 -6
- package/dist/src/util/ImageUtil.cjs +0 -1
- package/dist/src/util/ImageUtil.js +0 -63
- package/dist/src/util/NumberUtil.cjs +0 -1
- package/dist/src/util/NumberUtil.js +0 -60
- package/dist/src/util/ValidationUtil.cjs +0 -1
- package/dist/src/util/ValidationUtil.js +0 -60
- package/dist/types/DialogComponentProp.d.ts +0 -8
- package/dist/types/Id.d.ts +0 -10
- package/dist/vite.svg +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../../../_virtual/jsx-runtime.cjs"),x=require("react-i18next"),p=require("./Button.cjs"),d=require("../../../locale/hooks/translation-constants.cjs"),j=require("../../../../node_modules/@ant-design/icons/es/icons/PrinterOutlined.cjs"),m=({disabled:e,loading:s,block:i,className:o,type:u="primary",onClick:c,title:a,to:l})=>{const{t:r}=x.useTranslation(d.TRANSLATION_NAMESPACE),t=a??r("str.print");return n.jsxRuntimeExports.jsx(p.default,{type:u,className:o,to:l,loading:s,disabled:e,block:i,onClick:c,tooltip:t!=null&&t.trim()?"":r("str.print"),icon:n.jsxRuntimeExports.jsx(j.default,{}),children:t})};exports.PrintButton=m;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { j as r } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useTranslation as u } from "react-i18next";
|
|
3
|
-
import x from "./Button.js";
|
|
4
|
-
import { TRANSLATION_NAMESPACE as a } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
-
import j from "../../../../node_modules/@ant-design/icons/es/icons/PrinterOutlined.js";
|
|
6
|
-
const l = ({ disabled: n, loading: i, block: m, className: p, type: s = "primary", onClick: c, title: e, to: f }) => {
|
|
7
|
-
const { t: o } = u(a), t = e ?? o("str.print");
|
|
8
|
-
return /* @__PURE__ */ r.jsx(
|
|
9
|
-
x,
|
|
10
|
-
{
|
|
11
|
-
type: s,
|
|
12
|
-
className: p,
|
|
13
|
-
to: f,
|
|
14
|
-
loading: i,
|
|
15
|
-
disabled: n,
|
|
16
|
-
block: m,
|
|
17
|
-
onClick: c,
|
|
18
|
-
tooltip: t != null && t.trim() ? "" : o("str.print"),
|
|
19
|
-
icon: /* @__PURE__ */ r.jsx(j, {}),
|
|
20
|
-
children: t
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
l as PrintButton
|
|
26
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.cjs"),c=require("react-i18next"),l=require("../../../locale/hooks/translation-constants.cjs"),x=require("./Button.cjs"),d=require("../../../../node_modules/@ant-design/icons/es/icons/ReloadOutlined.cjs"),R=({disabled:r,block:n,className:s,type:o="primary",onClick:t,title:u,to:i})=>{const{t:a}=c.useTranslation(l.TRANSLATION_NAMESPACE);return e.jsxRuntimeExports.jsx(x.default,{type:o,disabled:r,className:s,to:i,block:n,onClick:t&&(()=>t(!0)),icon:e.jsxRuntimeExports.jsx(d.default,{}),children:u??a("str.refresh")})};exports.RefreshButton=R;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { j as o } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useTranslation as f } from "react-i18next";
|
|
3
|
-
import { TRANSLATION_NAMESPACE as u } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
-
import c from "./Button.js";
|
|
5
|
-
import x from "../../../../node_modules/@ant-design/icons/es/icons/ReloadOutlined.js";
|
|
6
|
-
const E = ({ disabled: t, block: m, className: n, type: e = "primary", onClick: r, title: s, to: i }) => {
|
|
7
|
-
const { t: p } = f(u);
|
|
8
|
-
return /* @__PURE__ */ o.jsx(
|
|
9
|
-
c,
|
|
10
|
-
{
|
|
11
|
-
type: e,
|
|
12
|
-
disabled: t,
|
|
13
|
-
className: n,
|
|
14
|
-
to: i,
|
|
15
|
-
block: m,
|
|
16
|
-
onClick: r && (() => r(!0)),
|
|
17
|
-
icon: /* @__PURE__ */ o.jsx(x, {}),
|
|
18
|
-
children: s ?? p("str.refresh")
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
E as RefreshButton
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),n=require("react"),C=require("react-i18next"),j=require("./Button.cjs"),E=require("../../../locale/hooks/translation-constants.cjs"),p=require("../../../../node_modules/@ant-design/icons/es/icons/UpCircleOutlined.cjs"),R=require("../../../../node_modules/antd/es/popconfirm/index.cjs");function g({shouldConfirm:m=!0,block:r,value:u,loading:i,onClick:a,text:l,disabled:c,type:x="link",hidden:q}){const{t:e}=C.useTranslation(E.TRANSLATION_NAMESPACE),s=n.useMemo(()=>l??e("str.unhide"),[l,e]),[d,o]=n.useState(!1);n.useEffect(()=>{o(i??!1)},[i]);const f=n.useCallback(async()=>{try{o(!0),await a(u)}finally{o(!1)}},[a,u]);return m?t.jsxRuntimeExports.jsx(R.default,{title:e("qus.doYouWantToHide"),okText:s.toUpperCase(),cancelText:e("str.no").toUpperCase(),onConfirm:f,children:t.jsxRuntimeExports.jsx(j.default,{tooltip:s,icon:t.jsxRuntimeExports.jsx(p.default,{}),disabled:c,loading:d,type:x,danger:!0,hidden:q,block:r})}):t.jsxRuntimeExports.jsx(j.default,{tooltip:s,icon:t.jsxRuntimeExports.jsx(p.default,{}),disabled:c,loading:d,type:x,danger:!0,block:r,onClick:f})}exports.default=g;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { j as o } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useMemo as C, useState as T, useEffect as g, useCallback as A } from "react";
|
|
3
|
-
import { useTranslation as E } from "react-i18next";
|
|
4
|
-
import c from "./Button.js";
|
|
5
|
-
import { TRANSLATION_NAMESPACE as _ } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
-
import x from "../../../../node_modules/@ant-design/icons/es/icons/UpCircleOutlined.js";
|
|
7
|
-
import k from "../../../../node_modules/antd/es/popconfirm/index.js";
|
|
8
|
-
function H({
|
|
9
|
-
shouldConfirm: d = !0,
|
|
10
|
-
block: e,
|
|
11
|
-
value: i,
|
|
12
|
-
loading: s,
|
|
13
|
-
onClick: a,
|
|
14
|
-
text: f,
|
|
15
|
-
disabled: m,
|
|
16
|
-
type: u = "link",
|
|
17
|
-
hidden: j
|
|
18
|
-
}) {
|
|
19
|
-
const { t } = E(_), n = C(() => f ?? t("str.unhide"), [f, t]), [l, r] = T(!1);
|
|
20
|
-
g(() => {
|
|
21
|
-
r(s ?? !1);
|
|
22
|
-
}, [s]);
|
|
23
|
-
const p = A(
|
|
24
|
-
async () => {
|
|
25
|
-
try {
|
|
26
|
-
r(!0), await a(i);
|
|
27
|
-
} finally {
|
|
28
|
-
r(!1);
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
[a, i]
|
|
32
|
-
);
|
|
33
|
-
return d ? /* @__PURE__ */ o.jsx(
|
|
34
|
-
k,
|
|
35
|
-
{
|
|
36
|
-
title: t("qus.doYouWantToHide"),
|
|
37
|
-
okText: n.toUpperCase(),
|
|
38
|
-
cancelText: t("str.no").toUpperCase(),
|
|
39
|
-
onConfirm: p,
|
|
40
|
-
children: /* @__PURE__ */ o.jsx(
|
|
41
|
-
c,
|
|
42
|
-
{
|
|
43
|
-
tooltip: n,
|
|
44
|
-
icon: /* @__PURE__ */ o.jsx(x, {}),
|
|
45
|
-
disabled: m,
|
|
46
|
-
loading: l,
|
|
47
|
-
type: u,
|
|
48
|
-
danger: !0,
|
|
49
|
-
hidden: j,
|
|
50
|
-
block: e
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
) : /* @__PURE__ */ o.jsx(
|
|
55
|
-
c,
|
|
56
|
-
{
|
|
57
|
-
tooltip: n,
|
|
58
|
-
icon: /* @__PURE__ */ o.jsx(x, {}),
|
|
59
|
-
disabled: m,
|
|
60
|
-
loading: l,
|
|
61
|
-
type: u,
|
|
62
|
-
danger: !0,
|
|
63
|
-
block: e,
|
|
64
|
-
onClick: p
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
export {
|
|
69
|
-
H as default
|
|
70
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),o=require("react-i18next"),r=require("./Button.cjs"),s=require("../../../locale/hooks/translation-constants.cjs"),i=require("../../../../node_modules/@ant-design/icons/es/icons/EditOutlined.cjs");function a({value:e,onClick:n}){const{t:u}=o.useTranslation(s.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(r.default,{tooltip:u("str.update"),type:"link",onClick:()=>n(e),icon:t.jsxRuntimeExports.jsx(i.default,{})})}exports.default=a;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useTranslation as i } from "react-i18next";
|
|
3
|
-
import m from "./Button.js";
|
|
4
|
-
import { TRANSLATION_NAMESPACE as p } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
-
import e from "../../../../node_modules/@ant-design/icons/es/icons/EditOutlined.js";
|
|
6
|
-
function c({ value: o, onClick: r }) {
|
|
7
|
-
const { t: n } = i(p);
|
|
8
|
-
return /* @__PURE__ */ t.jsx(
|
|
9
|
-
m,
|
|
10
|
-
{
|
|
11
|
-
tooltip: n("str.update"),
|
|
12
|
-
type: "link",
|
|
13
|
-
onClick: () => r(o),
|
|
14
|
-
icon: /* @__PURE__ */ t.jsx(e, {})
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
c as default
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),r=require("react-i18next"),s=require("./Button.cjs"),u=require("../../../locale/hooks/translation-constants.cjs"),i=require("../../../../node_modules/@ant-design/icons/es/icons/EyeOutlined.cjs");function l({value:e,onClick:n}){const{t:o}=r.useTranslation(u.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(s.default,{type:"link",onClick:()=>n(e),icon:t.jsxRuntimeExports.jsx(i.default,{}),tooltip:o("str.view")})}exports.default=l;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { j as o } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useTranslation as i } from "react-i18next";
|
|
3
|
-
import m from "./Button.js";
|
|
4
|
-
import { TRANSLATION_NAMESPACE as e } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
-
import p from "../../../../node_modules/@ant-design/icons/es/icons/EyeOutlined.js";
|
|
6
|
-
function c({ value: t, onClick: r }) {
|
|
7
|
-
const { t: n } = i(e);
|
|
8
|
-
return /* @__PURE__ */ o.jsx(
|
|
9
|
-
m,
|
|
10
|
-
{
|
|
11
|
-
type: "link",
|
|
12
|
-
onClick: () => r(t),
|
|
13
|
-
icon: /* @__PURE__ */ o.jsx(p, {}),
|
|
14
|
-
tooltip: n("str.view")
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
c as default
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../../../../_virtual/jsx-runtime.cjs"),c=require("../../../../node_modules/antd/es/form/index.cjs"),x=require("../../../../node_modules/antd/es/switch/index.cjs"),l=require("../../../../node_modules/antd/es/checkbox/index.cjs"),i=c.default.Item,m=({onChange:e,label:u,initialValue:t=!1,disabled:d,switch:r=!1,...n})=>s.jsxRuntimeExports.jsxs(i,{...n,valuePropName:"checked",initialValue:t,label:r?u:void 0,children:[!!r&&s.jsxRuntimeExports.jsx(x.default,{disabled:d,defaultChecked:t,onChange:e&&(o=>e(o))}),!r&&s.jsxRuntimeExports.jsx(l.default,{disabled:d,defaultChecked:t,onChange:e&&(o=>e(o.target.checked)),children:u})]});exports.default=m;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { j as m } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import d from "../../../../node_modules/antd/es/form/index.js";
|
|
3
|
-
import p from "../../../../node_modules/antd/es/switch/index.js";
|
|
4
|
-
import x from "../../../../node_modules/antd/es/checkbox/index.js";
|
|
5
|
-
const h = d.Item, u = ({
|
|
6
|
-
onChange: e,
|
|
7
|
-
label: c,
|
|
8
|
-
initialValue: o = !1,
|
|
9
|
-
disabled: s,
|
|
10
|
-
switch: r = !1,
|
|
11
|
-
...f
|
|
12
|
-
}) => /* @__PURE__ */ m.jsxs(
|
|
13
|
-
h,
|
|
14
|
-
{
|
|
15
|
-
...f,
|
|
16
|
-
valuePropName: "checked",
|
|
17
|
-
initialValue: o,
|
|
18
|
-
label: r ? c : void 0,
|
|
19
|
-
children: [
|
|
20
|
-
!!r && /* @__PURE__ */ m.jsx(
|
|
21
|
-
p,
|
|
22
|
-
{
|
|
23
|
-
disabled: s,
|
|
24
|
-
defaultChecked: o,
|
|
25
|
-
onChange: e && ((t) => e(t))
|
|
26
|
-
}
|
|
27
|
-
),
|
|
28
|
-
!r && /* @__PURE__ */ m.jsx(
|
|
29
|
-
x,
|
|
30
|
-
{
|
|
31
|
-
disabled: s,
|
|
32
|
-
defaultChecked: o,
|
|
33
|
-
onChange: e && ((t) => e(t.target.checked)),
|
|
34
|
-
children: c
|
|
35
|
-
}
|
|
36
|
-
)
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
export {
|
|
41
|
-
u as default
|
|
42
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),c=require("react"),a=require("../../../util/NumberUtil.cjs"),n=require("../../../../node_modules/antd/es/descriptions/index.cjs"),l=n.default.Item,d=({list:r,keepEmptyValues:u,...s})=>{const i=c.useMemo(()=>{const t=u?r:r.filter(e=>e&&!!e.value);return t.forEach(e=>{!e.noFormatting&&!isNaN(e.value)&&(e.value=a.default.toMoney(e.value))}),t},[u,r]);return o.jsxRuntimeExports.jsx(n.default,{...s,children:i.map(({label:t,value:e})=>o.jsxRuntimeExports.jsx(l,{label:t,children:e},t))})};exports.default=d;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { j as i } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useMemo as a } from "react";
|
|
3
|
-
import c from "../../../util/NumberUtil.js";
|
|
4
|
-
import s from "../../../../node_modules/antd/es/descriptions/index.js";
|
|
5
|
-
const u = s.Item, j = ({ list: t, keepEmptyValues: e, ...n }) => {
|
|
6
|
-
const m = a(() => {
|
|
7
|
-
const r = e ? t : t.filter((o) => o && !!o.value);
|
|
8
|
-
return r.forEach((o) => {
|
|
9
|
-
!o.noFormatting && !isNaN(o.value) && (o.value = c.toMoney(o.value));
|
|
10
|
-
}), r;
|
|
11
|
-
}, [e, t]);
|
|
12
|
-
return /* @__PURE__ */ i.jsx(s, { ...n, children: m.map(({ label: r, value: o }) => /* @__PURE__ */ i.jsx(u, { label: r, children: o }, r)) });
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
j as default
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../../../_virtual/jsx-runtime.cjs"),i=require("../../../../node_modules/antd/es/space/index.cjs"),s=({children:e,className:t=""})=>r.jsxRuntimeExports.jsx(i.default,{direction:"vertical",className:[t,"w-100"].join(" "),children:e});exports.default=s;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { j as e } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import a from "../../../../node_modules/antd/es/space/index.js";
|
|
3
|
-
const s = ({ children: r, className: t = "" }) => /* @__PURE__ */ e.jsx(a, { direction: "vertical", className: [t, "w-100"].join(" "), children: r });
|
|
4
|
-
export {
|
|
5
|
-
s as default
|
|
6
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../_virtual/jsx-runtime.cjs"),o=require("react-i18next"),u=require("../button/Button.cjs"),a=require("../../../locale/hooks/translation-constants.cjs"),i=require("../../../../node_modules/antd/es/skeleton/Skeleton.cjs"),l=require("../../../../node_modules/antd/es/result/index.cjs"),c=({loading:r,children:s,error:n})=>{const{t:e}=o.useTranslation(a.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(i.default,{loading:r,paragraph:!0,className:"h-100",children:n?t.jsxRuntimeExports.jsx(l.default,{status:"404",title:404,subTitle:e("err.notFound"),className:"",extra:t.jsxRuntimeExports.jsx(u.default,{to:-1,type:"primary",children:e("str.goBack")})}):s})};exports.default=c;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useTranslation as a } from "react-i18next";
|
|
3
|
-
import m from "../button/Button.js";
|
|
4
|
-
import { TRANSLATION_NAMESPACE as n } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
-
import i from "../../../../node_modules/antd/es/skeleton/Skeleton.js";
|
|
6
|
-
import p from "../../../../node_modules/antd/es/result/index.js";
|
|
7
|
-
const j = ({ loading: o, children: s, error: e }) => {
|
|
8
|
-
const { t: r } = a(n);
|
|
9
|
-
return (
|
|
10
|
-
// <Spin spinning={loading} className="h-100">
|
|
11
|
-
/* @__PURE__ */ t.jsx(i, { loading: o, paragraph: !0, className: "h-100", children: e ? /* @__PURE__ */ t.jsx(
|
|
12
|
-
p,
|
|
13
|
-
{
|
|
14
|
-
status: "404",
|
|
15
|
-
title: 404,
|
|
16
|
-
subTitle: r("err.notFound"),
|
|
17
|
-
className: "",
|
|
18
|
-
extra: /* @__PURE__ */ t.jsx(m, { to: -1, type: "primary", children: r("str.goBack") })
|
|
19
|
-
}
|
|
20
|
-
) : s })
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
j as default
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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 s=require("react"),je=require("../../../../node_modules/react-cropper/dist/react-cropper.es.cjs"),ge=require("react-i18next"),Re=require("../../../locale/hooks/translation-constants.cjs"),M=require("../button/Button.cjs"),he=require("../../../util/ImageUtil.cjs"),Ee=require("../../../../node_modules/antd/es/form/index.cjs"),K=require("../../../../node_modules/antd/es/modal/index.cjs"),we=require("../../../../node_modules/@ant-design/icons/es/icons/RotateLeftOutlined.cjs"),Ce=require("../../../../node_modules/@ant-design/icons/es/icons/RotateRightOutlined.cjs"),X=require("../../../../node_modules/@ant-design/icons/es/icons/UploadOutlined.cjs"),ve=require("../../../../node_modules/antd/es/upload/index.cjs"),be=require("../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.cjs"),Se=Ee.default.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 qe=({values:r=[],required:u,buttonType:x,label:n,name:p,onChange:m,aspectRatio:I,buttonTitle:R,hidePreview:h,buttonSize:f="large",showButtonText:j=!0,showOnlyIcon:P=!1,icon:v=t.jsxRuntimeExports.jsx(X.default,{}),loading:b,maxCount:E=1,onAdd:l,onRemove:S,listType:q,...A})=>{const[Z,ee]=s.useState(""),[te,se]=s.useState(""),[re,_]=s.useState(!1),O=s.useRef(),i=s.useRef(),[a,U]=s.useState([]),[g,N]=s.useState(),ne=s.useRef(),oe=()=>_(!1),ie=async e=>{!e.url&&!e.preview&&(e.preview=await Q(e.originFileObj)),se(e.url||e.preview),_(!0),ee(e.name)},[D,y]=s.useState(!1),ae=()=>{},z=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}=O.current;y(!0),e==null||e.toBlob(async me=>{const fe=Object.assign(new File([me],d,{type:o}),{uid:w}),W=await he.default.resizeImage(fe),H=await Q(W),G={url:H,name:d,uid:w,type:o,size:c,thumbUrl:H,originFileObj:W};if(l)try{y(!0),await l(G)}finally{y(!1)}U([G,...a]),y(!1)}),N(void 0)},le=()=>{N(void 0),O.current=void 0},B=s.useCallback(e=>{const o=e;if(o){O.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(()=>{V()},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}];U(e)}},[r]);const{t:F}=ge.useTranslation(Re.TRANSLATION_NAMESPACE),ue=s.useMemo(()=>u?{required:u,validator:(e,o,c)=>{g||a!=null&&a.length?c():c(`${n??""} ${F("err.validation.required")}`)}}:void 0,[u,g,a==null?void 0:a.length,n,F]),T=R??F("message.fileUploadMessage2"),$=s.useMemo(()=>t.jsxRuntimeExports.jsx(Y,{showLoadingIndicator:D,_buttonTitle:T,buttonSize:f,buttonType:x,fileList:a,hidePreview:h,icon:v,loading:b,listType:q,maxCount:E,onChangeFile:B,onRemove:S,showButtonText:j,handlePreview:ie,setFileList:U}),[D,T,f,x,a,h,v,b,q,E,B,S,j]);ne.current=$.props.beforeUpload;const[de,L]=s.useState(0),[xe,J]=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||(L(0),J(0))},[g]);const V=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()),L(c),J(d)}},[]);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(Se,{label:n,...A,name:p,className:"mb-0",rules:[ue,...A.rules??[]],children:$}),t.jsxRuntimeExports.jsxs(K.default,{open:!!g,maskClosable:!1,onOk:ce,closable:!1,onCancel:le,children:[t.jsxRuntimeExports.jsx(je.Cropper,{ref:i,src:g,cropmove:V,viewMode:1,aspectRatio:I,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(M.default,{size:"large",icon:t.jsxRuntimeExports.jsx(we.default,{}),onClick:()=>z(!0)}),t.jsxRuntimeExports.jsx(M.default,{size:"large",icon:t.jsxRuntimeExports.jsx(Ce.default,{}),onClick:()=>z(!1)})]})]}),t.jsxRuntimeExports.jsx(K.default,{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:I,maxCount:R,onChangeFile:h,onRemove:f,showButtonText:j,handlePreview:P,setFileList:v,showLoadingIndicator:b,listType:E="picture"})=>t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs(ve.default,{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:P,onDrop:l=>(h(l.dataTransfer.files.item(0)),!1),listType:E,showUploadList:!p,onRemove:l=>{const S=n.filter(q=>l.uid!==q.uid);f==null||f(l),v(S)},beforeUpload:async l=>(h(l),!1),maxCount:R,children:[b&&t.jsxRuntimeExports.jsx(be.default,{}),t.jsxRuntimeExports.jsx("div",{className:"d-flex flex-column",children:n.length<R&&(E==="picture-circle"?t.jsxRuntimeExports.jsx(X.default,{}):t.jsxRuntimeExports.jsx(M.default,{loading:I,tooltip:j?void 0:r,size:u,icon:m,type:j?x:"text",children:j?r:void 0}))})]},n.length)});exports.UploadComponent=Y;exports.default=qe;
|
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
/* empty css */
|
|
4
|
-
import M, { useRef as _, useState as h, useEffect as U, useCallback as Z, useMemo as q } from "react";
|
|
5
|
-
import { Cropper as Ce } from "../../../../node_modules/react-cropper/dist/react-cropper.es.js";
|
|
6
|
-
import { useTranslation as ve } from "react-i18next";
|
|
7
|
-
import { TRANSLATION_NAMESPACE as Ie } from "../../../locale/hooks/translation-constants.js";
|
|
8
|
-
import z from "../button/Button.js";
|
|
9
|
-
import be from "../../../util/ImageUtil.js";
|
|
10
|
-
import ye from "../../../../node_modules/antd/es/form/index.js";
|
|
11
|
-
import ee from "../../../../node_modules/antd/es/modal/index.js";
|
|
12
|
-
import Re from "../../../../node_modules/@ant-design/icons/es/icons/RotateLeftOutlined.js";
|
|
13
|
-
import Fe from "../../../../node_modules/@ant-design/icons/es/icons/RotateRightOutlined.js";
|
|
14
|
-
import re from "../../../../node_modules/@ant-design/icons/es/icons/UploadOutlined.js";
|
|
15
|
-
import Ne from "../../../../node_modules/antd/es/upload/index.js";
|
|
16
|
-
import Ue from "../../../../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js";
|
|
17
|
-
const Se = ye.Item;
|
|
18
|
-
function te(r) {
|
|
19
|
-
return new Promise((l, d) => {
|
|
20
|
-
const o = new FileReader();
|
|
21
|
-
o.readAsDataURL(r), o.onload = () => l(o.result), o.onerror = (p) => d(p);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
const Ge = ({
|
|
25
|
-
values: r = [],
|
|
26
|
-
required: l,
|
|
27
|
-
buttonType: d,
|
|
28
|
-
label: o,
|
|
29
|
-
name: p,
|
|
30
|
-
onChange: f,
|
|
31
|
-
aspectRatio: S,
|
|
32
|
-
buttonTitle: j,
|
|
33
|
-
hidePreview: w,
|
|
34
|
-
buttonSize: u = "large",
|
|
35
|
-
showButtonText: g = !0,
|
|
36
|
-
showOnlyIcon: B = !1,
|
|
37
|
-
icon: b = /* @__PURE__ */ t.jsx(re, {}),
|
|
38
|
-
loading: y,
|
|
39
|
-
maxCount: C = 1,
|
|
40
|
-
onAdd: c,
|
|
41
|
-
onRemove: R,
|
|
42
|
-
listType: F,
|
|
43
|
-
...E
|
|
44
|
-
}) => {
|
|
45
|
-
const [oe, se] = M.useState(""), [ne, ie] = M.useState(""), [ae, $] = M.useState(!1), O = _(), n = _(), [i, k] = h([]), [x, A] = h(), ce = _(), le = () => $(!1), me = async (e) => {
|
|
46
|
-
!e.url && !e.preview && (e.preview = await te(e.originFileObj)), ie(e.url || e.preview), $(!0), se(e.name);
|
|
47
|
-
}, [T, N] = h(!1), de = () => {
|
|
48
|
-
}, J = (e) => {
|
|
49
|
-
var s;
|
|
50
|
-
(s = n == null ? void 0 : n.current) == null || s.cropper.rotate(e ? -90 : 90);
|
|
51
|
-
};
|
|
52
|
-
U(() => {
|
|
53
|
-
f == null || f(i[0], i);
|
|
54
|
-
}, [i, f]);
|
|
55
|
-
const pe = () => {
|
|
56
|
-
var I;
|
|
57
|
-
const e = (I = n == null ? void 0 : n.current) == null ? void 0 : I.cropper.getCroppedCanvas(), { type: s, size: a, name: m, uid: v } = O.current;
|
|
58
|
-
N(!0), e == null || e.toBlob(async (je) => {
|
|
59
|
-
const we = Object.assign(new File([je], m, { type: s }), {
|
|
60
|
-
uid: v
|
|
61
|
-
}), Q = await be.resizeImage(we), X = await te(Q), Y = {
|
|
62
|
-
url: X,
|
|
63
|
-
name: m,
|
|
64
|
-
uid: v,
|
|
65
|
-
type: s,
|
|
66
|
-
size: a,
|
|
67
|
-
thumbUrl: X,
|
|
68
|
-
originFileObj: Q
|
|
69
|
-
};
|
|
70
|
-
if (c)
|
|
71
|
-
try {
|
|
72
|
-
N(!0), await c(Y);
|
|
73
|
-
} finally {
|
|
74
|
-
N(!1);
|
|
75
|
-
}
|
|
76
|
-
k([Y, ...i]), N(!1);
|
|
77
|
-
}), A(void 0);
|
|
78
|
-
}, fe = () => {
|
|
79
|
-
A(void 0), O.current = void 0;
|
|
80
|
-
}, V = Z((e) => {
|
|
81
|
-
const s = e;
|
|
82
|
-
if (s) {
|
|
83
|
-
O.current = s;
|
|
84
|
-
const a = new FileReader();
|
|
85
|
-
a.addEventListener("load", () => {
|
|
86
|
-
var m;
|
|
87
|
-
if (typeof a.result == "string") {
|
|
88
|
-
A(a.result);
|
|
89
|
-
const v = localStorage.getItem("cropper.box"), I = v ? JSON.parse(v) : void 0;
|
|
90
|
-
I && ((m = n == null ? void 0 : n.current) == null || m.cropper.setCropBoxData(I)), setTimeout(() => {
|
|
91
|
-
K();
|
|
92
|
-
}, 100);
|
|
93
|
-
}
|
|
94
|
-
}), a.readAsDataURL(s);
|
|
95
|
-
}
|
|
96
|
-
}, []);
|
|
97
|
-
U(() => {
|
|
98
|
-
if (r != null && r.length || typeof r == "string") {
|
|
99
|
-
const e = Array.isArray(r) ? r.map((s) => [{ uid: r, url: s }]) : [{ uid: r, url: r }];
|
|
100
|
-
k(e);
|
|
101
|
-
}
|
|
102
|
-
}, [r]);
|
|
103
|
-
const { t: P } = ve(Ie), ue = q(
|
|
104
|
-
() => l ? {
|
|
105
|
-
required: l,
|
|
106
|
-
validator: (e, s, a) => {
|
|
107
|
-
x || i != null && i.length ? a() : a(`${o ?? ""} ${P("err.validation.required")}`);
|
|
108
|
-
}
|
|
109
|
-
} : void 0,
|
|
110
|
-
[l, x, i == null ? void 0 : i.length, o, P]
|
|
111
|
-
), W = j ?? P("message.fileUploadMessage2"), H = q(
|
|
112
|
-
() => /* @__PURE__ */ t.jsx(
|
|
113
|
-
Oe,
|
|
114
|
-
{
|
|
115
|
-
showLoadingIndicator: T,
|
|
116
|
-
_buttonTitle: W,
|
|
117
|
-
buttonSize: u,
|
|
118
|
-
buttonType: d,
|
|
119
|
-
fileList: i,
|
|
120
|
-
hidePreview: w,
|
|
121
|
-
icon: b,
|
|
122
|
-
loading: y,
|
|
123
|
-
listType: F,
|
|
124
|
-
maxCount: C,
|
|
125
|
-
onChangeFile: V,
|
|
126
|
-
onRemove: R,
|
|
127
|
-
showButtonText: g,
|
|
128
|
-
handlePreview: me,
|
|
129
|
-
setFileList: k
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
[
|
|
133
|
-
T,
|
|
134
|
-
W,
|
|
135
|
-
u,
|
|
136
|
-
d,
|
|
137
|
-
i,
|
|
138
|
-
w,
|
|
139
|
-
b,
|
|
140
|
-
y,
|
|
141
|
-
F,
|
|
142
|
-
C,
|
|
143
|
-
V,
|
|
144
|
-
R,
|
|
145
|
-
g
|
|
146
|
-
]
|
|
147
|
-
);
|
|
148
|
-
ce.current = H.props.beforeUpload;
|
|
149
|
-
const [ge, L] = h(0), [xe, G] = h(0), [D, he] = h();
|
|
150
|
-
U(() => {
|
|
151
|
-
const e = setTimeout(() => {
|
|
152
|
-
D && localStorage.setItem("cropper.box", JSON.stringify(D));
|
|
153
|
-
}, 400);
|
|
154
|
-
return () => clearTimeout(e);
|
|
155
|
-
}, [D]), U(() => {
|
|
156
|
-
x || (L(0), G(0));
|
|
157
|
-
}, [x]);
|
|
158
|
-
const K = Z(async () => {
|
|
159
|
-
var s;
|
|
160
|
-
const e = (s = n == null ? void 0 : n.current) == null ? void 0 : s.cropper;
|
|
161
|
-
if (e) {
|
|
162
|
-
const { width: a, height: m } = e.getCroppedCanvas();
|
|
163
|
-
he(e.getCropBoxData()), L(a), G(m);
|
|
164
|
-
}
|
|
165
|
-
}, []);
|
|
166
|
-
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
167
|
-
/* @__PURE__ */ t.jsx(
|
|
168
|
-
Se,
|
|
169
|
-
{
|
|
170
|
-
label: o,
|
|
171
|
-
...E,
|
|
172
|
-
name: p,
|
|
173
|
-
className: "mb-0",
|
|
174
|
-
rules: [ue, ...E.rules ?? []],
|
|
175
|
-
children: H
|
|
176
|
-
}
|
|
177
|
-
),
|
|
178
|
-
/* @__PURE__ */ t.jsxs(
|
|
179
|
-
ee,
|
|
180
|
-
{
|
|
181
|
-
open: !!x,
|
|
182
|
-
maskClosable: !1,
|
|
183
|
-
onOk: pe,
|
|
184
|
-
closable: !1,
|
|
185
|
-
onCancel: fe,
|
|
186
|
-
children: [
|
|
187
|
-
/* @__PURE__ */ t.jsx(
|
|
188
|
-
Ce,
|
|
189
|
-
{
|
|
190
|
-
ref: n,
|
|
191
|
-
src: x,
|
|
192
|
-
cropmove: K,
|
|
193
|
-
viewMode: 1,
|
|
194
|
-
aspectRatio: S,
|
|
195
|
-
cropend: () => de()
|
|
196
|
-
}
|
|
197
|
-
),
|
|
198
|
-
/* @__PURE__ */ t.jsx("p", { className: "text-center", children: [ge, xe].join(" ⨉ ") }),
|
|
199
|
-
/* @__PURE__ */ t.jsxs("div", { className: "mt-2 d-flex justify-content-center", children: [
|
|
200
|
-
/* @__PURE__ */ t.jsx(
|
|
201
|
-
z,
|
|
202
|
-
{
|
|
203
|
-
size: "large",
|
|
204
|
-
icon: /* @__PURE__ */ t.jsx(Re, {}),
|
|
205
|
-
onClick: () => J(!0)
|
|
206
|
-
}
|
|
207
|
-
),
|
|
208
|
-
/* @__PURE__ */ t.jsx(
|
|
209
|
-
z,
|
|
210
|
-
{
|
|
211
|
-
size: "large",
|
|
212
|
-
icon: /* @__PURE__ */ t.jsx(Fe, {}),
|
|
213
|
-
onClick: () => J(!1)
|
|
214
|
-
}
|
|
215
|
-
)
|
|
216
|
-
] })
|
|
217
|
-
]
|
|
218
|
-
}
|
|
219
|
-
),
|
|
220
|
-
/* @__PURE__ */ t.jsx(
|
|
221
|
-
ee,
|
|
222
|
-
{
|
|
223
|
-
open: ae,
|
|
224
|
-
title: oe,
|
|
225
|
-
footer: null,
|
|
226
|
-
onCancel: le,
|
|
227
|
-
children: /* @__PURE__ */ t.jsx("div", { className: "text-center", children: /* @__PURE__ */ t.jsx("img", { alt: "example", style: { maxWidth: "400px" }, src: ne }) })
|
|
228
|
-
}
|
|
229
|
-
)
|
|
230
|
-
] });
|
|
231
|
-
}, Oe = ({
|
|
232
|
-
_buttonTitle: r,
|
|
233
|
-
buttonSize: l,
|
|
234
|
-
buttonType: d,
|
|
235
|
-
fileList: o,
|
|
236
|
-
hidePreview: p,
|
|
237
|
-
icon: f,
|
|
238
|
-
loading: S,
|
|
239
|
-
maxCount: j,
|
|
240
|
-
onChangeFile: w,
|
|
241
|
-
onRemove: u,
|
|
242
|
-
showButtonText: g,
|
|
243
|
-
handlePreview: B,
|
|
244
|
-
setFileList: b,
|
|
245
|
-
showLoadingIndicator: y,
|
|
246
|
-
listType: C = "picture"
|
|
247
|
-
}) => /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs(
|
|
248
|
-
Ne,
|
|
249
|
-
{
|
|
250
|
-
accept: "image/x-png,image/gif,image/jpeg",
|
|
251
|
-
fileList: o,
|
|
252
|
-
defaultFileList: o,
|
|
253
|
-
onChange: () => {
|
|
254
|
-
},
|
|
255
|
-
className: (o.length >= j ? " hide-upload " : "") + " mb-0",
|
|
256
|
-
multiple: !1,
|
|
257
|
-
onPreview: p ? void 0 : B,
|
|
258
|
-
onDrop: (c) => (w(c.dataTransfer.files.item(0)), !1),
|
|
259
|
-
listType: C,
|
|
260
|
-
showUploadList: !p,
|
|
261
|
-
onRemove: (c) => {
|
|
262
|
-
const R = o.filter((F) => c.uid !== F.uid);
|
|
263
|
-
u == null || u(c), b(R);
|
|
264
|
-
},
|
|
265
|
-
beforeUpload: async (c) => (w(c), !1),
|
|
266
|
-
maxCount: j,
|
|
267
|
-
children: [
|
|
268
|
-
y && /* @__PURE__ */ t.jsx(Ue, {}),
|
|
269
|
-
/* @__PURE__ */ t.jsx("div", { className: "d-flex flex-column", children: o.length < j && (C === "picture-circle" ? /* @__PURE__ */ t.jsx(re, {}) : /* @__PURE__ */ t.jsx(
|
|
270
|
-
z,
|
|
271
|
-
{
|
|
272
|
-
loading: S,
|
|
273
|
-
tooltip: g ? void 0 : r,
|
|
274
|
-
size: l,
|
|
275
|
-
icon: f,
|
|
276
|
-
type: g ? d : "text",
|
|
277
|
-
children: g ? r : void 0
|
|
278
|
-
}
|
|
279
|
-
)) })
|
|
280
|
-
]
|
|
281
|
-
},
|
|
282
|
-
o.length
|
|
283
|
-
) });
|
|
284
|
-
export {
|
|
285
|
-
Oe as UploadComponent,
|
|
286
|
-
Ge as default
|
|
287
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../../../_virtual/jsx-runtime.cjs"),l=require("react"),s=require("../../../../node_modules/antd/es/radio/index.cjs"),d=require("../../../../node_modules/antd/es/form/index.cjs"),x=({button:i,disabled:a,...u})=>{const c=l.useMemo(()=>{const{enum:e,translations:t}=u;if(e){const r=[];for(const n of e)r.push({key:n,value:(t==null?void 0:t[n])??n.toUpperCase()});return r}else return u.values},[u]),m=i?s.default.Button:s.default;return o.jsxRuntimeExports.jsx(d.default.Item,{...u,children:o.jsxRuntimeExports.jsx(s.default.Group,{disabled:a,children:c.map(({key:e,value:t})=>o.jsxRuntimeExports.jsx(m,{value:e,children:t},e))})})},f=l.memo(x);exports.default=f;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { j as m } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { memo as c, useMemo as p } from "react";
|
|
3
|
-
import r from "../../../../node_modules/antd/es/radio/index.js";
|
|
4
|
-
import f from "../../../../node_modules/antd/es/form/index.js";
|
|
5
|
-
const d = ({ button: s, disabled: a, ...t }) => {
|
|
6
|
-
const i = p(() => {
|
|
7
|
-
const { enum: o, translations: e } = t;
|
|
8
|
-
if (o) {
|
|
9
|
-
const u = [];
|
|
10
|
-
for (const n of o)
|
|
11
|
-
u.push({ key: n, value: (e == null ? void 0 : e[n]) ?? n.toUpperCase() });
|
|
12
|
-
return u;
|
|
13
|
-
} else
|
|
14
|
-
return t.values;
|
|
15
|
-
}, [t]), l = s ? r.Button : r;
|
|
16
|
-
return /* @__PURE__ */ m.jsx(f.Item, { ...t, children: /* @__PURE__ */ m.jsx(r.Group, { disabled: a, children: i.map(({ key: o, value: e }) => /* @__PURE__ */ m.jsx(l, { value: o, children: e }, o)) }) });
|
|
17
|
-
}, C = c(d);
|
|
18
|
-
export {
|
|
19
|
-
C as default
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../../../_virtual/jsx-runtime.cjs"),c=require("react"),f=require("../select/SelectComponent.cjs"),S=require("../../../../node_modules/antd/es/form/index.cjs"),j=require("../../../../node_modules/antd/es/select/index.cjs"),R=({className:o,onSelect:d,label:a,required:p,name:i,mode:l,items:t})=>{const r=S.default.useFormInstance(),[n,x]=c.useState(!0);return c.useEffect(()=>{if(t&&n){const e=t.filter(s=>s.alreadySelected).map(s=>s.id);r==null||r.setFieldsValue({[i]:l==="multiple"?e:e==null?void 0:e[0]}),x(!1)}},[n,r,t,l,i]),u.jsxRuntimeExports.jsx(f.default,{required:p,label:a,mode:l,className:o,name:i,onSelect:d,items:t,itemBuilder:e=>u.jsxRuntimeExports.jsx(j.default.Option,{value:e.id,disabled:e.lock,children:e.label},e.id)})};exports.SelectFieldInReport=R;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { j as c } from "../../../../_virtual/jsx-runtime.js";
|
|
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(() => {
|
|
9
|
-
if (e && s) {
|
|
10
|
-
const t = e.filter((i) => i.alreadySelected).map((i) => i.id);
|
|
11
|
-
r == null || r.setFieldsValue({
|
|
12
|
-
[o]: l === "multiple" ? t : t == null ? void 0 : t[0]
|
|
13
|
-
}), f(!1);
|
|
14
|
-
}
|
|
15
|
-
}, [s, r, e, l, o]), /* @__PURE__ */ c.jsx(
|
|
16
|
-
x,
|
|
17
|
-
{
|
|
18
|
-
required: a,
|
|
19
|
-
label: u,
|
|
20
|
-
mode: l,
|
|
21
|
-
className: p,
|
|
22
|
-
name: o,
|
|
23
|
-
onSelect: n,
|
|
24
|
-
items: e,
|
|
25
|
-
itemBuilder: (t) => /* @__PURE__ */ c.jsx(S.Option, { value: t.id, disabled: t.lock, children: t.label }, t.id)
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
h as SelectFieldInReport
|
|
31
|
-
};
|