@kingteza/crud-component 1.0.9 → 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/ShowMoreText.cjs +1 -1
- 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/index10.cjs +1 -1
- package/dist/_virtual/index10.js +2 -5
- package/dist/_virtual/index2.cjs +1 -1
- package/dist/_virtual/index2.js +2 -3
- package/dist/_virtual/index3.cjs +1 -1
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index4.cjs +1 -1
- package/dist/_virtual/index4.js +2 -4
- package/dist/_virtual/index6.cjs +1 -1
- package/dist/_virtual/index6.js +5 -2
- package/dist/_virtual/index7.cjs +1 -1
- package/dist/_virtual/index7.js +5 -2
- package/dist/_virtual/index8.cjs +1 -1
- package/dist/_virtual/index8.js +7 -2
- package/dist/_virtual/index9.cjs +1 -1
- package/dist/_virtual/index9.js +2 -5
- package/dist/_virtual/localeData.cjs +1 -1
- package/dist/_virtual/main.cjs +1 -1
- package/dist/_virtual/papaparse.min.cjs +1 -1
- 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 +22 -23
- package/dist/src/components/common/DatePicker/TimePicker.cjs +1 -1
- package/dist/src/components/common/DatePicker/TimePicker.js +12 -13
- 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 +27 -28
- package/dist/src/components/common/button/CloneButtonTable.cjs +1 -1
- package/dist/src/components/common/button/CloneButtonTable.js +3 -3
- package/dist/src/components/common/button/DeleteButtonTable.cjs +1 -1
- package/dist/src/components/common/button/DeleteButtonTable.js +7 -7
- package/dist/src/components/common/button/ExportButton.cjs +1 -1
- package/dist/src/components/common/button/ExportButton.js +5 -5
- package/dist/src/components/common/button/HideButtonTable.cjs +1 -1
- package/dist/src/components/common/button/HideButtonTable.js +7 -7
- package/dist/src/components/common/button/ImportButton.cjs +1 -1
- package/dist/src/components/common/button/ImportButton.js +5 -5
- package/dist/src/components/common/button/NewButton.cjs +1 -1
- package/dist/src/components/common/button/NewButton.js +5 -5
- package/dist/src/components/common/button/PrintButton.cjs +1 -1
- package/dist/src/components/common/button/PrintButton.js +5 -5
- package/dist/src/components/common/button/RefreshButton.cjs +1 -1
- package/dist/src/components/common/button/RefreshButton.js +5 -5
- package/dist/src/components/common/button/UnHideButton.cjs +1 -1
- package/dist/src/components/common/button/UnHideButton.js +7 -7
- package/dist/src/components/common/button/UpdateButtonTable.cjs +1 -1
- package/dist/src/components/common/button/UpdateButtonTable.js +5 -5
- package/dist/src/components/common/button/ViewButtonTable.cjs +1 -1
- package/dist/src/components/common/button/ViewButtonTable.js +5 -5
- package/dist/src/components/common/check-box/CheckBox.cjs +1 -1
- package/dist/src/components/common/check-box/CheckBox.js +15 -17
- 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 +8 -9
- package/dist/src/components/common/picker/ImagePicker.cjs +1 -1
- package/dist/src/components/common/picker/ImagePicker.js +40 -42
- package/dist/src/components/common/radio/RadioGroupComponent.cjs +1 -1
- package/dist/src/components/common/radio/RadioGroupComponent.js +16 -17
- package/dist/src/components/common/report/SelectFieldInReport.cjs +1 -1
- package/dist/src/components/common/report/SelectFieldInReport.js +16 -17
- 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 +33 -36
- package/dist/src/components/common/show-more/index.cjs +1 -1
- package/dist/src/components/common/tab/TabViewWithRoute.cjs +1 -1
- package/dist/src/components/common/tab/TabViewWithRoute.js +14 -15
- 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 +19 -20
- 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 +18 -19
- package/dist/src/components/common/text-field/TextField.cjs +1 -1
- package/dist/src/components/common/text-field/TextField.js +21 -22
- 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 +5 -5
- 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 +71 -74
- package/dist/src/components/crud/CrudField.cjs +1 -1
- package/dist/src/components/crud/CrudField.js +93 -96
- package/dist/src/components/crud/CrudForm.cjs +1 -1
- package/dist/src/components/crud/CrudForm.js +27 -30
- package/dist/src/components/crud/CrudFormWizard.cjs +1 -1
- package/dist/src/components/crud/CrudFormWizard.js +54 -57
- package/dist/src/components/crud/CrudReportComponent.cjs +3 -3
- package/dist/src/components/crud/CrudReportComponent.js +47 -51
- package/dist/src/components/crud/CrudSearchComponent.cjs +1 -1
- package/dist/src/components/crud/CrudSearchComponent.js +21 -23
- package/dist/src/components/crud/FileCrudField.cjs +1 -1
- package/dist/src/components/crud/FileCrudField.js +29 -31
- package/dist/src/components/crud/ImageCrudField.cjs +1 -1
- package/dist/src/components/crud/ImageCrudField.js +43 -46
- package/dist/src/components/crud/import/CrudImportButton.cjs +1 -1
- package/dist/src/components/crud/import/CrudImportButton.js +7 -7
- package/dist/src/components/crud/import/CrudImportComponent.cjs +2 -2
- package/dist/src/components/crud/import/CrudImportComponent.js +60 -64
- 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 +25 -25
- package/dist/src/components/crud/view/CrudViewerUtil.cjs +1 -1
- package/dist/src/components/crud/view/CrudViewerUtil.js +17 -18
- 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/ValidationUtil.cjs +1 -1
- package/dist/src/util/ValidationUtil.js +1 -1
- package/dist/util/index.cjs +1 -1
- package/package.json +9 -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/react-is.development2.cjs +0 -1
- package/dist/_virtual/react-is.development2.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/common/index.d.ts +0 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { j as n } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { useState as m, useCallback as p } from "react";
|
|
3
|
-
import
|
|
4
|
-
import f from "
|
|
5
|
-
import {
|
|
3
|
+
import a from "./Button.js";
|
|
4
|
+
import { TRANSLATION_NAMESPACE as f } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
import { useTranslation as c } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
6
6
|
import l from "../../../../node_modules/@ant-design/icons/es/icons/ExportOutlined.js";
|
|
7
7
|
function y({
|
|
8
8
|
value: o,
|
|
9
9
|
onClick: t
|
|
10
10
|
}) {
|
|
11
|
-
const [s, r] = m(!1), { t: i } =
|
|
11
|
+
const [s, r] = m(!1), { t: i } = c(f), e = p(async () => {
|
|
12
12
|
r(!0), t(o).finally(() => r(!1));
|
|
13
13
|
}, [t, o]);
|
|
14
14
|
return /* @__PURE__ */ n.jsx(
|
|
15
|
-
|
|
15
|
+
a,
|
|
16
16
|
{
|
|
17
17
|
loading: s,
|
|
18
18
|
type: "link",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),q=require("antd"),n=require("react"),C=require("../../../locale/hooks/translation-constants.cjs"),d=require("./Button.cjs"),E=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),f=require("../../../../node_modules/@ant-design/icons/es/icons/DownCircleOutlined.cjs");function R({shouldConfirm:m=!0,block:r,value:i,loading:u,onClick:a,text:c,disabled:l,type:x="link"}){const{t:e}=E.useTranslation(C.TRANSLATION_NAMESPACE),s=n.useMemo(()=>c??e("str.hide"),[c,e]),[p,o]=n.useState(!1);n.useEffect(()=>{o(u??!1)},[u]);const j=n.useCallback(async()=>{try{o(!0),await a(i)}finally{o(!1)}},[a,i]);return m?t.jsxRuntimeExports.jsx(q.Popconfirm,{title:e("qus.doYouWantToHide"),okText:s.toUpperCase(),cancelText:e("str.no").toUpperCase(),onConfirm:j,children:t.jsxRuntimeExports.jsx(d,{tooltip:s,icon:t.jsxRuntimeExports.jsx(f,{}),disabled:l,loading:p,type:x,danger:!0,block:r})}):t.jsxRuntimeExports.jsx(d,{tooltip:s,icon:t.jsxRuntimeExports.jsx(f,{}),disabled:l,loading:p,type:x,danger:!0,block:r,onClick:j})}module.exports=R;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as o } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Popconfirm as j } from "antd";
|
|
3
|
+
import { useMemo as C, useState as T, useEffect as g, useCallback as A } from "react";
|
|
4
4
|
import { TRANSLATION_NAMESPACE as E } from "../../../locale/hooks/translation-constants.js";
|
|
5
5
|
import c from "./Button.js";
|
|
6
|
+
import { useTranslation as _ } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
6
7
|
import x from "../../../../node_modules/@ant-design/icons/es/icons/DownCircleOutlined.js";
|
|
7
|
-
import _ from "../../../../node_modules/antd/es/popconfirm/index.js";
|
|
8
8
|
function H({
|
|
9
9
|
shouldConfirm: d = !0,
|
|
10
10
|
block: n,
|
|
@@ -15,11 +15,11 @@ function H({
|
|
|
15
15
|
disabled: m,
|
|
16
16
|
type: l = "link"
|
|
17
17
|
}) {
|
|
18
|
-
const { t } =
|
|
19
|
-
|
|
18
|
+
const { t } = _(E), r = C(() => f ?? t("str.hide"), [f, t]), [u, e] = T(!1);
|
|
19
|
+
g(() => {
|
|
20
20
|
e(s ?? !1);
|
|
21
21
|
}, [s]);
|
|
22
|
-
const p =
|
|
22
|
+
const p = A(
|
|
23
23
|
async () => {
|
|
24
24
|
try {
|
|
25
25
|
e(!0), await a(i);
|
|
@@ -30,7 +30,7 @@ function H({
|
|
|
30
30
|
[a, i]
|
|
31
31
|
);
|
|
32
32
|
return d ? /* @__PURE__ */ o.jsx(
|
|
33
|
-
|
|
33
|
+
j,
|
|
34
34
|
{
|
|
35
35
|
title: t("qus.doYouWantToHide"),
|
|
36
36
|
okText: r.toUpperCase(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../../../_virtual/jsx-runtime.cjs"),s=require("react"),g=require("../../../locale/hooks/translation-constants.cjs"),R=require("./Button.cjs"),k=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),q=require("../../../../node_modules/@ant-design/icons/es/icons/ImportOutlined.cjs");function C({onClick:o,children:u,accept:c,className:a,disabled:l,type:x="link"}){const[p,i]=s.useState(!1),{t:m}=k.useTranslation(g.TRANSLATION_NAMESPACE),e=s.useRef(null),j=s.useCallback(()=>{d(t=>t+1),e.current&&setTimeout(()=>{var t;(t=e==null?void 0:e.current)==null||t.click()},10)},[]),[f,d]=s.useState(0),y=s.useCallback(async t=>{i(!0);const r=t.target.files[0];r&&await o(r),i(!1)},[o]);return n.jsxRuntimeExports.jsxs("div",{className:a,children:[n.jsxRuntimeExports.jsx("input",{type:"file",style:{display:"none"},ref:e,onChange:y,accept:c},f),n.jsxRuntimeExports.jsx(R,{loading:p,type:x,disabled:l,onClick:j,icon:n.jsxRuntimeExports.jsx(q,{}),tooltip:m("str.import"),children:u})]})}exports.ImportButton=C;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as n } from "../../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { useState as r, useRef as k, useCallback as c } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import T from "
|
|
3
|
+
import { TRANSLATION_NAMESPACE as C } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import A from "./Button.js";
|
|
5
|
+
import { useTranslation as T } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
6
6
|
import h from "../../../../node_modules/@ant-design/icons/es/icons/ImportOutlined.js";
|
|
7
7
|
function L({
|
|
8
8
|
onClick: e,
|
|
@@ -12,7 +12,7 @@ function L({
|
|
|
12
12
|
disabled: f,
|
|
13
13
|
type: p = "link"
|
|
14
14
|
}) {
|
|
15
|
-
const [u, s] = r(!1), { t: x } = C
|
|
15
|
+
const [u, s] = r(!1), { t: x } = T(C), o = k(null), j = c(() => {
|
|
16
16
|
d((t) => t + 1), o.current && setTimeout(() => {
|
|
17
17
|
var t;
|
|
18
18
|
(t = o == null ? void 0 : o.current) == null || t.click();
|
|
@@ -38,7 +38,7 @@ function L({
|
|
|
38
38
|
y
|
|
39
39
|
),
|
|
40
40
|
/* @__PURE__ */ n.jsx(
|
|
41
|
-
|
|
41
|
+
A,
|
|
42
42
|
{
|
|
43
43
|
loading: u,
|
|
44
44
|
type: p,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.cjs"),a=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.cjs"),a=require("./Button.cjs"),l=require("../../../locale/hooks/translation-constants.cjs"),x=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),j=require("../../../../node_modules/@ant-design/icons/es/icons/PlusOutlined.cjs"),m=({size:n,block:r,className:s,type:o="primary",onClick:t,title:u,to:i})=>{const{t:c}=x.useTranslation(l.TRANSLATION_NAMESPACE);return e.jsxRuntimeExports.jsx(a,{type:o,className:s,to:i,block:r,size:n,onClick:t&&(()=>t(!0)),icon:e.jsxRuntimeExports.jsx(j,{}),children:u??c("str.new")})};exports.NewButton=m;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as r } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import
|
|
3
|
-
import u from "
|
|
4
|
-
import {
|
|
2
|
+
import f from "./Button.js";
|
|
3
|
+
import { TRANSLATION_NAMESPACE as u } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useTranslation as c } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
5
5
|
import x from "../../../../node_modules/@ant-design/icons/es/icons/PlusOutlined.js";
|
|
6
6
|
const R = ({ size: t, block: n, className: m, type: e = "primary", onClick: o, title: i, to: s }) => {
|
|
7
|
-
const { t: p } =
|
|
7
|
+
const { t: p } = c(u);
|
|
8
8
|
return /* @__PURE__ */ r.jsx(
|
|
9
|
-
|
|
9
|
+
f,
|
|
10
10
|
{
|
|
11
11
|
type: e,
|
|
12
12
|
className: m,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../_virtual/jsx-runtime.cjs"),p=require("./Button.cjs"),x=require("../../../locale/hooks/translation-constants.cjs"),j=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),m=require("../../../../node_modules/@ant-design/icons/es/icons/PrinterOutlined.cjs"),q=({disabled:s,loading:e,block:i,className:o,type:u="primary",onClick:c,title:a,to:l})=>{const{t:n}=j.useTranslation(x.TRANSLATION_NAMESPACE),t=a??n("str.print");return r.jsxRuntimeExports.jsx(p,{type:u,className:o,to:l,loading:e,disabled:s,block:i,onClick:c,tooltip:t!=null&&t.trim()?"":n("str.print"),icon:r.jsxRuntimeExports.jsx(m,{}),children:t})};exports.PrintButton=q;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as r } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import
|
|
3
|
-
import x from "
|
|
4
|
-
import {
|
|
2
|
+
import u from "./Button.js";
|
|
3
|
+
import { TRANSLATION_NAMESPACE as x } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useTranslation as a } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
5
5
|
import j from "../../../../node_modules/@ant-design/icons/es/icons/PrinterOutlined.js";
|
|
6
6
|
const l = ({ disabled: n, loading: i, block: m, className: p, type: s = "primary", onClick: c, title: e, to: f }) => {
|
|
7
|
-
const { t: o } =
|
|
7
|
+
const { t: o } = a(x), t = e ?? o("str.print");
|
|
8
8
|
return /* @__PURE__ */ r.jsx(
|
|
9
|
-
|
|
9
|
+
u,
|
|
10
10
|
{
|
|
11
11
|
type: s,
|
|
12
12
|
className: p,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.cjs"),c=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/jsx-runtime.cjs"),c=require("../../../locale/hooks/translation-constants.cjs"),l=require("./Button.cjs"),x=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),R=require("../../../../node_modules/@ant-design/icons/es/icons/ReloadOutlined.cjs"),j=({disabled:r,block:n,className:s,type:o="primary",onClick:t,title:u,to:i})=>{const{t:a}=x.useTranslation(c.TRANSLATION_NAMESPACE);return e.jsxRuntimeExports.jsx(l,{type:o,disabled:r,className:s,to:i,block:n,onClick:t&&(()=>t(!0)),icon:e.jsxRuntimeExports.jsx(R,{}),children:u??a("str.refresh")})};exports.RefreshButton=j;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as o } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import c from "
|
|
2
|
+
import { TRANSLATION_NAMESPACE as f } from "../../../locale/hooks/translation-constants.js";
|
|
3
|
+
import u from "./Button.js";
|
|
4
|
+
import { useTranslation as c } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
5
5
|
import x from "../../../../node_modules/@ant-design/icons/es/icons/ReloadOutlined.js";
|
|
6
6
|
const E = ({ disabled: t, block: m, className: n, type: e = "primary", onClick: r, title: s, to: i }) => {
|
|
7
|
-
const { t: p } = f
|
|
7
|
+
const { t: p } = c(f);
|
|
8
8
|
return /* @__PURE__ */ o.jsx(
|
|
9
|
-
|
|
9
|
+
u,
|
|
10
10
|
{
|
|
11
11
|
type: e,
|
|
12
12
|
disabled: t,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),C=require("antd"),n=require("react"),d=require("./Button.cjs"),E=require("../../../locale/hooks/translation-constants.cjs"),R=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),f=require("../../../../node_modules/@ant-design/icons/es/icons/UpCircleOutlined.cjs");function T({shouldConfirm:m=!0,block:r,value:i,loading:u,onClick:a,text:c,disabled:l,type:x="link",hidden:q}){const{t:e}=R.useTranslation(E.TRANSLATION_NAMESPACE),s=n.useMemo(()=>c??e("str.unhide"),[c,e]),[p,o]=n.useState(!1);n.useEffect(()=>{o(u??!1)},[u]);const j=n.useCallback(async()=>{try{o(!0),await a(i)}finally{o(!1)}},[a,i]);return m?t.jsxRuntimeExports.jsx(C.Popconfirm,{title:e("qus.doYouWantToHide"),okText:s.toUpperCase(),cancelText:e("str.no").toUpperCase(),onConfirm:j,children:t.jsxRuntimeExports.jsx(d,{tooltip:s,icon:t.jsxRuntimeExports.jsx(f,{}),disabled:l,loading:p,type:x,danger:!0,hidden:q,block:r})}):t.jsxRuntimeExports.jsx(d,{tooltip:s,icon:t.jsxRuntimeExports.jsx(f,{}),disabled:l,loading:p,type:x,danger:!0,block:r,onClick:j})}module.exports=T;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as o } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Popconfirm as C } from "antd";
|
|
3
|
+
import { useMemo as T, useState as g, useEffect as A, useCallback as E } from "react";
|
|
4
4
|
import c from "./Button.js";
|
|
5
5
|
import { TRANSLATION_NAMESPACE as _ } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
import { useTranslation as k } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
6
7
|
import x from "../../../../node_modules/@ant-design/icons/es/icons/UpCircleOutlined.js";
|
|
7
|
-
import k from "../../../../node_modules/antd/es/popconfirm/index.js";
|
|
8
8
|
function H({
|
|
9
9
|
shouldConfirm: d = !0,
|
|
10
10
|
block: e,
|
|
@@ -16,11 +16,11 @@ function H({
|
|
|
16
16
|
type: u = "link",
|
|
17
17
|
hidden: j
|
|
18
18
|
}) {
|
|
19
|
-
const { t } =
|
|
20
|
-
|
|
19
|
+
const { t } = k(_), n = T(() => f ?? t("str.unhide"), [f, t]), [l, r] = g(!1);
|
|
20
|
+
A(() => {
|
|
21
21
|
r(s ?? !1);
|
|
22
22
|
}, [s]);
|
|
23
|
-
const p =
|
|
23
|
+
const p = E(
|
|
24
24
|
async () => {
|
|
25
25
|
try {
|
|
26
26
|
r(!0), await a(i);
|
|
@@ -31,7 +31,7 @@ function H({
|
|
|
31
31
|
[a, i]
|
|
32
32
|
);
|
|
33
33
|
return d ? /* @__PURE__ */ o.jsx(
|
|
34
|
-
|
|
34
|
+
C,
|
|
35
35
|
{
|
|
36
36
|
title: t("qus.doYouWantToHide"),
|
|
37
37
|
okText: n.toUpperCase(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),o=require("./Button.cjs"),r=require("../../../locale/hooks/translation-constants.cjs"),i=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),u=require("../../../../node_modules/@ant-design/icons/es/icons/EditOutlined.cjs");function a({value:n,onClick:s}){const{t:e}=i.useTranslation(r.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(o,{tooltip:e("str.update"),type:"link",onClick:()=>s(n),icon:t.jsxRuntimeExports.jsx(u,{})})}module.exports=a;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import
|
|
3
|
-
import m from "
|
|
4
|
-
import {
|
|
2
|
+
import i from "./Button.js";
|
|
3
|
+
import { TRANSLATION_NAMESPACE as m } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useTranslation as p } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
5
5
|
import e from "../../../../node_modules/@ant-design/icons/es/icons/EditOutlined.js";
|
|
6
6
|
function c({ value: o, onClick: r }) {
|
|
7
|
-
const { t: n } =
|
|
7
|
+
const { t: n } = p(m);
|
|
8
8
|
return /* @__PURE__ */ t.jsx(
|
|
9
|
-
|
|
9
|
+
i,
|
|
10
10
|
{
|
|
11
11
|
tooltip: n("str.update"),
|
|
12
12
|
type: "link",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),i=require("./Button.cjs"),o=require("../../../locale/hooks/translation-constants.cjs"),r=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),u=require("../../../../node_modules/@ant-design/icons/es/icons/EyeOutlined.cjs");function c({value:n,onClick:e}){const{t:s}=r.useTranslation(o.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(i,{type:"link",onClick:()=>e(n),icon:t.jsxRuntimeExports.jsx(u,{}),tooltip:s("str.view")})}module.exports=c;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as o } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import
|
|
3
|
-
import m from "
|
|
4
|
-
import {
|
|
2
|
+
import i from "./Button.js";
|
|
3
|
+
import { TRANSLATION_NAMESPACE as m } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useTranslation as e } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
5
5
|
import p from "../../../../node_modules/@ant-design/icons/es/icons/EyeOutlined.js";
|
|
6
6
|
function c({ value: t, onClick: r }) {
|
|
7
|
-
const { t: n } =
|
|
7
|
+
const { t: n } = e(m);
|
|
8
8
|
return /* @__PURE__ */ o.jsx(
|
|
9
|
-
|
|
9
|
+
i,
|
|
10
10
|
{
|
|
11
11
|
type: "link",
|
|
12
12
|
onClick: () => r(t),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const r=require("../../../../_virtual/jsx-runtime.cjs"),c=require("antd"),u=c.Form.Item,d=({onChange:e,label:x,initialValue:t=!1,disabled:n,switch:s=!1,...m})=>r.jsxRuntimeExports.jsxs(u,{...m,valuePropName:"checked",initialValue:t,label:s?x:void 0,children:[!!s&&r.jsxRuntimeExports.jsx(c.Switch,{disabled:n,defaultChecked:t,onChange:e&&(o=>e(o))}),!s&&r.jsxRuntimeExports.jsx(c.Checkbox,{disabled:n,defaultChecked:t,onChange:e&&(o=>e(o.target.checked)),children:x})]});module.exports=d;
|
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import x from "../../../../node_modules/antd/es/checkbox/index.js";
|
|
5
|
-
const h = d.Item, u = ({
|
|
1
|
+
import { j as c } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Form as x, Switch as f, Checkbox as h } from "antd";
|
|
3
|
+
const k = x.Item, n = ({
|
|
6
4
|
onChange: e,
|
|
7
|
-
label:
|
|
5
|
+
label: m,
|
|
8
6
|
initialValue: o = !1,
|
|
9
7
|
disabled: s,
|
|
10
8
|
switch: r = !1,
|
|
11
|
-
...
|
|
12
|
-
}) => /* @__PURE__ */
|
|
13
|
-
|
|
9
|
+
...d
|
|
10
|
+
}) => /* @__PURE__ */ c.jsxs(
|
|
11
|
+
k,
|
|
14
12
|
{
|
|
15
|
-
...
|
|
13
|
+
...d,
|
|
16
14
|
valuePropName: "checked",
|
|
17
15
|
initialValue: o,
|
|
18
|
-
label: r ?
|
|
16
|
+
label: r ? m : void 0,
|
|
19
17
|
children: [
|
|
20
|
-
!!r && /* @__PURE__ */
|
|
21
|
-
|
|
18
|
+
!!r && /* @__PURE__ */ c.jsx(
|
|
19
|
+
f,
|
|
22
20
|
{
|
|
23
21
|
disabled: s,
|
|
24
22
|
defaultChecked: o,
|
|
25
23
|
onChange: e && ((t) => e(t))
|
|
26
24
|
}
|
|
27
25
|
),
|
|
28
|
-
!r && /* @__PURE__ */
|
|
29
|
-
|
|
26
|
+
!r && /* @__PURE__ */ c.jsx(
|
|
27
|
+
h,
|
|
30
28
|
{
|
|
31
29
|
disabled: s,
|
|
32
30
|
defaultChecked: o,
|
|
33
31
|
onChange: e && ((t) => e(t.target.checked)),
|
|
34
|
-
children:
|
|
32
|
+
children: m
|
|
35
33
|
}
|
|
36
34
|
)
|
|
37
35
|
]
|
|
38
36
|
}
|
|
39
37
|
);
|
|
40
38
|
export {
|
|
41
|
-
|
|
39
|
+
n as default
|
|
42
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const n=require("../../../../_virtual/jsx-runtime.cjs"),o=require("antd"),u=require("react"),a=require("../../../util/NumberUtil.cjs"),m=o.Descriptions.Item,x=({list:s,keepEmptyValues:r,...i})=>{const c=u.useMemo(()=>{const t=r?s:s.filter(e=>e&&!!e.value);return t.forEach(e=>{!e.noFormatting&&!isNaN(e.value)&&(e.value=a.default.toMoney(e.value))}),t},[r,s]);return n.jsxRuntimeExports.jsx(o.Descriptions,{...i,children:c.map(({label:t,value:e})=>n.jsxRuntimeExports.jsx(m,{label:t,children:e},t))})};module.exports=x;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as i } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { Descriptions as s } from "antd";
|
|
2
3
|
import { useMemo as a } from "react";
|
|
3
4
|
import c from "../../../util/NumberUtil.js";
|
|
4
|
-
import s from "../../../../node_modules/antd/es/descriptions/index.js";
|
|
5
5
|
const u = s.Item, j = ({ list: t, keepEmptyValues: e, ...n }) => {
|
|
6
6
|
const m = a(() => {
|
|
7
7
|
const r = e ? t : t.filter((o) => o && !!o.value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const r=require("../../../../_virtual/jsx-runtime.cjs"),s=require("antd"),c=({children:e,className:t=""})=>r.jsxRuntimeExports.jsx(s.Space,{direction:"vertical",className:[t,"w-100"].join(" "),children:e});module.exports=c;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import a from "
|
|
2
|
+
import { Space as a } from "antd";
|
|
3
3
|
const s = ({ children: r, className: t = "" }) => /* @__PURE__ */ e.jsx(a, { direction: "vertical", className: [t, "w-100"].join(" "), children: r });
|
|
4
4
|
export {
|
|
5
5
|
s as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const t=require("../../../../_virtual/jsx-runtime.cjs"),e=require("antd"),a=require("../button/Button.cjs"),i=require("../../../locale/hooks/translation-constants.cjs"),u=require("../../../../node_modules/react-i18next/dist/es/useTranslation.cjs"),c=({loading:r,children:n,error:o})=>{const{t:s}=u.useTranslation(i.TRANSLATION_NAMESPACE);return t.jsxRuntimeExports.jsx(e.Skeleton,{loading:r,paragraph:!0,className:"h-100",children:o?t.jsxRuntimeExports.jsx(e.Result,{status:"404",title:404,subTitle:s("err.notFound"),className:"",extra:t.jsxRuntimeExports.jsx(a,{to:-1,type:"primary",children:s("str.goBack")})}):n})};module.exports=c;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { j as t } from "../../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Skeleton as a, Result as n } from "antd";
|
|
3
3
|
import m from "../button/Button.js";
|
|
4
|
-
import { TRANSLATION_NAMESPACE as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const { t: r } = a(n);
|
|
4
|
+
import { TRANSLATION_NAMESPACE as i } from "../../../locale/hooks/translation-constants.js";
|
|
5
|
+
import { useTranslation as p } from "../../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
6
|
+
const f = ({ loading: o, children: s, error: e }) => {
|
|
7
|
+
const { t: r } = p(i);
|
|
9
8
|
return (
|
|
10
9
|
// <Spin spinning={loading} className="h-100">
|
|
11
|
-
/* @__PURE__ */ t.jsx(
|
|
12
|
-
|
|
10
|
+
/* @__PURE__ */ t.jsx(a, { loading: o, paragraph: !0, className: "h-100", children: e ? /* @__PURE__ */ t.jsx(
|
|
11
|
+
n,
|
|
13
12
|
{
|
|
14
13
|
status: "404",
|
|
15
14
|
title: 404,
|
|
@@ -21,5 +20,5 @@ const j = ({ loading: o, children: s, error: e }) => {
|
|
|
21
20
|
);
|
|
22
21
|
};
|
|
23
22
|
export {
|
|
24
|
-
|
|
23
|
+
f as default
|
|
25
24
|
};
|
|
@@ -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 s=require("react"),
|
|
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;
|