@kingteza/crud-component 1.0.40 → 1.0.43
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/common/button/Button.cjs.js +1 -1
- package/common/button/Button.es.js +19 -20
- package/common/button/CloneButtonTable.cjs.js +1 -1
- package/common/button/CloneButtonTable.es.js +9 -10
- package/common/button/DeleteButtonTable.cjs.js +1 -1
- package/common/button/DeleteButtonTable.es.js +29 -33
- package/common/button/ExportButton.cjs.js +1 -1
- package/common/button/ExportButton.es.js +10 -11
- package/common/button/HideButtonTable.cjs.js +1 -1
- package/common/button/HideButtonTable.es.js +22 -23
- package/common/button/ImportButton.cjs.js +1 -1
- package/common/button/ImportButton.es.js +19 -20
- package/common/button/NewButton.cjs.js +1 -1
- package/common/button/NewButton.es.js +13 -14
- package/common/button/PrintButton.cjs.js +1 -1
- package/common/button/PrintButton.es.js +11 -12
- package/common/button/RefreshButton.cjs.js +1 -1
- package/common/button/RefreshButton.es.js +10 -11
- package/common/button/UnHideButton.cjs.js +1 -1
- package/common/button/UnHideButton.es.js +37 -38
- package/common/button/UpdateButtonTable.cjs.js +1 -1
- package/common/button/UpdateButtonTable.es.js +8 -9
- package/common/button/ViewButtonTable.cjs.js +1 -1
- package/common/button/ViewButtonTable.es.js +10 -11
- package/common/date-picker/DatePicker.cjs.js +1 -1
- package/common/date-picker/DatePicker.es.js +40 -41
- package/common/date-picker/TimePicker.cjs.js +1 -1
- package/common/date-picker/TimePicker.es.js +47 -48
- package/common/loading/LoadingIndicator.cjs.js +1 -1
- package/common/loading/LoadingIndicator.es.js +6 -7
- package/common/picker/ImagePicker.cjs.js +1 -1
- package/common/picker/ImagePicker.es.js +80 -81
- package/common/select/SelectComponent.cjs.js +1 -1
- package/common/select/SelectComponent.es.js +33 -34
- package/common/tag/StatusTag.cjs.js +1 -1
- package/common/tag/StatusTag.es.js +12 -13
- package/common/text-field/NumberField.cjs.js +1 -1
- package/common/text-field/NumberField.es.js +41 -42
- package/common/text-field/TextArea.cjs.js +1 -1
- package/common/text-field/TextArea.es.js +15 -16
- package/common/text-field/TextField.cjs.js +1 -1
- package/common/text-field/TextField.es.js +50 -51
- package/common/wizard/WizardResult.cjs.js +1 -1
- package/common/wizard/WizardResult.es.js +36 -38
- package/crud/CrudComponent.cjs.js +1 -1
- package/crud/CrudComponent.es.js +77 -78
- package/crud/CrudField.cjs.js +1 -1
- package/crud/CrudField.es.js +126 -127
- package/crud/CrudFormWizard.cjs.js +1 -1
- package/crud/CrudFormWizard.es.js +47 -48
- package/crud/FileCrudField.cjs.js +1 -1
- package/crud/FileCrudField.es.js +72 -73
- package/crud/import/CrudImportButton.cjs.js +1 -1
- package/crud/import/CrudImportButton.es.js +10 -11
- package/crud/import/CrudImportComponent.cjs.js +2 -2
- package/crud/import/CrudImportComponent.es.js +56 -57
- package/crud/view/CrudDecListView.cjs.js +1 -1
- package/crud/view/CrudDecListView.es.js +11 -12
- package/crud/view/CrudViewer.cjs.js +1 -1
- package/crud/view/CrudViewer.es.js +120 -121
- package/crud/view/CrudViewerUtil.cjs.js +1 -1
- package/crud/view/CrudViewerUtil.es.js +15 -17
- package/locale/index.cjs.js +1 -1
- package/locale/index.d.ts +4 -0
- package/locale/index.es.js +36 -24
- package/package.json +1 -1
- package/util/DateUtil.cjs.js +1 -1
- package/util/DateUtil.es.js +16 -4
- package/util/ValidationUtil.cjs.js +1 -1
- package/util/ValidationUtil.es.js +26 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const y=require("react/jsx-runtime"),f=require("antd"),
|
|
1
|
+
"use strict";const y=require("react/jsx-runtime"),f=require("antd"),l=require("react"),q=require("../../locale/index.cjs.js");;/* empty css */const d=require("react-router-dom"),x=({className:s,to:t,onClick:n,tooltip:o,ref:g,...r})=>{var u;const{t:e}=q.useTranslationLib();let i;try{i=(u=d.useNavigate)==null?void 0:u.call(d)}catch(a){console.error(a)}const c=l.useMemo(()=>y.jsx(f.Button,{onClick:n||(t&&i?()=>i(t):void 0),className:s,...r,children:r.children||e(`button.${r.type}`)}),[s,i,n,r,e,t]);return o?y.jsx(f.Tooltip,{title:o,children:c}):c},b=({className:s,to:t,onClick:n,tooltip:o,ref:g,...r})=>{let e;try{e=d.useNavigate()}catch(h){console.error(h)}const[i,c]=l.useState(!1),u=l.useCallback(async h=>{try{return c(!0),await n(h)}finally{c(!1)}},[n]),a=l.useMemo(()=>y.jsx(f.Button,{loading:i||r.loading,onClick:n?u:t?()=>{e?e==null||e(t):window.location.href=t}:void 0,className:s,...r}),[u,s,i,e,n,r,t]);return o?y.jsx(f.Tooltip,{title:o,children:a}):a};x.Async=b;module.exports=x;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import { Button as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useTranslation as v } from "react-i18next";
|
|
2
|
+
import { Button as d, Tooltip as m } from "antd";
|
|
3
|
+
import { useMemo as y, useState as g, useCallback as v } from "react";
|
|
4
|
+
import { useTranslationLib as w } from "../../locale/index.es.js";
|
|
6
5
|
/* empty css */
|
|
7
6
|
import { useNavigate as h } from "react-router-dom";
|
|
8
|
-
const
|
|
7
|
+
const x = ({
|
|
9
8
|
className: i,
|
|
10
9
|
to: r,
|
|
11
10
|
onClick: e,
|
|
12
11
|
tooltip: a,
|
|
13
|
-
ref:
|
|
12
|
+
ref: b,
|
|
14
13
|
...n
|
|
15
14
|
}) => {
|
|
16
15
|
var l;
|
|
17
|
-
const { t } =
|
|
16
|
+
const { t } = w();
|
|
18
17
|
let o;
|
|
19
18
|
try {
|
|
20
19
|
o = (l = h) == null ? void 0 : l();
|
|
@@ -23,7 +22,7 @@ const w = ({
|
|
|
23
22
|
}
|
|
24
23
|
const c = y(
|
|
25
24
|
() => /* @__PURE__ */ f(
|
|
26
|
-
|
|
25
|
+
d,
|
|
27
26
|
{
|
|
28
27
|
onClick: e || (r && o ? () => o(r) : void 0),
|
|
29
28
|
className: i,
|
|
@@ -33,25 +32,25 @@ const w = ({
|
|
|
33
32
|
),
|
|
34
33
|
[i, o, e, n, t, r]
|
|
35
34
|
);
|
|
36
|
-
return a ? /* @__PURE__ */ f(
|
|
37
|
-
},
|
|
35
|
+
return a ? /* @__PURE__ */ f(m, { title: a, children: c }) : c;
|
|
36
|
+
}, A = ({
|
|
38
37
|
className: i,
|
|
39
38
|
to: r,
|
|
40
39
|
onClick: e,
|
|
41
40
|
tooltip: a,
|
|
42
|
-
ref:
|
|
41
|
+
ref: b,
|
|
43
42
|
...n
|
|
44
43
|
}) => {
|
|
45
44
|
let t;
|
|
46
45
|
try {
|
|
47
46
|
t = h();
|
|
48
|
-
} catch (
|
|
49
|
-
console.error(
|
|
47
|
+
} catch (u) {
|
|
48
|
+
console.error(u);
|
|
50
49
|
}
|
|
51
|
-
const [o, c] =
|
|
52
|
-
async (
|
|
50
|
+
const [o, c] = g(!1), l = v(
|
|
51
|
+
async (u) => {
|
|
53
52
|
try {
|
|
54
|
-
return c(!0), await e(
|
|
53
|
+
return c(!0), await e(u);
|
|
55
54
|
} finally {
|
|
56
55
|
c(!1);
|
|
57
56
|
}
|
|
@@ -59,7 +58,7 @@ const w = ({
|
|
|
59
58
|
[e]
|
|
60
59
|
), s = y(
|
|
61
60
|
() => /* @__PURE__ */ f(
|
|
62
|
-
|
|
61
|
+
d,
|
|
63
62
|
{
|
|
64
63
|
loading: o || n.loading,
|
|
65
64
|
onClick: e ? l : r ? () => {
|
|
@@ -71,9 +70,9 @@ const w = ({
|
|
|
71
70
|
),
|
|
72
71
|
[l, i, o, t, e, n, r]
|
|
73
72
|
);
|
|
74
|
-
return a ? /* @__PURE__ */ f(
|
|
73
|
+
return a ? /* @__PURE__ */ f(m, { title: a, children: s }) : s;
|
|
75
74
|
};
|
|
76
|
-
|
|
75
|
+
x.Async = A;
|
|
77
76
|
export {
|
|
78
|
-
|
|
77
|
+
x as default
|
|
79
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),i=require("@ant-design/icons"),s=require("./Button.cjs.js"),r=require("../../locale/index.cjs.js");function u({value:t,onClick:e}){const{t:o}=r.useTranslationLib();return n.jsx(s,{type:"link",onClick:()=>e(t),icon:n.jsx(i.CopyOutlined,{}),tooltip:o("clone")})}module.exports=u;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { CopyOutlined as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const { t: r } = e(p);
|
|
2
|
+
import { CopyOutlined as r } from "@ant-design/icons";
|
|
3
|
+
import e from "./Button.es.js";
|
|
4
|
+
import { useTranslationLib as l } from "../../locale/index.es.js";
|
|
5
|
+
function a({ value: t, onClick: n }) {
|
|
6
|
+
const { t: i } = l();
|
|
8
7
|
return /* @__PURE__ */ o(
|
|
9
|
-
|
|
8
|
+
e,
|
|
10
9
|
{
|
|
11
10
|
type: "link",
|
|
12
11
|
onClick: () => n(t),
|
|
13
|
-
icon: /* @__PURE__ */ o(
|
|
14
|
-
tooltip:
|
|
12
|
+
icon: /* @__PURE__ */ o(r, {}),
|
|
13
|
+
tooltip: i("clone")
|
|
15
14
|
}
|
|
16
15
|
);
|
|
17
16
|
}
|
|
18
17
|
export {
|
|
19
|
-
|
|
18
|
+
a as default
|
|
20
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),p=require("@ant-design/icons"),g=require("antd"),n=require("react"),q=require("./Button.cjs.js"),C=require("../../locale/index.cjs.js");function T({shouldConfirm:j=!0,block:r,value:i,loading:u,onClick:c,text:l,disabled:a,type:d="link"}){const{t}=C.useTranslationLib(),o=n.useMemo(()=>l??t("str.delete"),[l,t]),[f,s]=n.useState(!1);n.useEffect(()=>{s(u??!1)},[u]);const x=n.useCallback(async()=>{try{s(!0),await c(i)}finally{s(!1)}},[c,i]);return j?e.jsx(g.Popconfirm,{title:t("qus.doYouWantToDelete"),okText:o.toUpperCase(),cancelText:t("str.no").toUpperCase(),onConfirm:x,children:e.jsx(q,{tooltip:o,icon:e.jsx(p.DeleteOutlined,{}),disabled:a,loading:f,type:d,danger:!0,block:r})}):e.jsx(q,{tooltip:o,icon:e.jsx(p.DeleteOutlined,{}),disabled:a,loading:f,type:d,danger:!0,block:r,onClick:x})}module.exports=T;
|
|
@@ -1,51 +1,47 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { DeleteOutlined as
|
|
3
|
-
import { Popconfirm as
|
|
4
|
-
import { useMemo as
|
|
2
|
+
import { DeleteOutlined as p } from "@ant-design/icons";
|
|
3
|
+
import { Popconfirm as g } from "antd";
|
|
4
|
+
import { useMemo as T, useState as x, useEffect as k, useCallback as D } from "react";
|
|
5
5
|
import d from "./Button.es.js";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
function P({
|
|
6
|
+
import { useTranslationLib as _ } from "../../locale/index.es.js";
|
|
7
|
+
function q({
|
|
9
8
|
shouldConfirm: C = !0,
|
|
10
|
-
block:
|
|
9
|
+
block: r,
|
|
11
10
|
value: i,
|
|
12
11
|
loading: a,
|
|
13
12
|
onClick: l,
|
|
14
13
|
text: s,
|
|
15
14
|
disabled: f,
|
|
16
|
-
type:
|
|
15
|
+
type: u = "link"
|
|
17
16
|
}) {
|
|
18
|
-
const { t: o } =
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const { t: o } = _(), e = T(() => s ?? o("str.delete"), [s, o]), [m, n] = x(!1);
|
|
18
|
+
k(() => {
|
|
19
|
+
n(a ?? !1);
|
|
21
20
|
}, [a]);
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
[l, i]
|
|
31
|
-
);
|
|
21
|
+
const c = D(async () => {
|
|
22
|
+
try {
|
|
23
|
+
n(!0), await l(i);
|
|
24
|
+
} finally {
|
|
25
|
+
n(!1);
|
|
26
|
+
}
|
|
27
|
+
}, [l, i]);
|
|
32
28
|
return C ? /* @__PURE__ */ t(
|
|
33
|
-
|
|
29
|
+
g,
|
|
34
30
|
{
|
|
35
31
|
title: o("qus.doYouWantToDelete"),
|
|
36
32
|
okText: e.toUpperCase(),
|
|
37
33
|
cancelText: o("str.no").toUpperCase(),
|
|
38
|
-
onConfirm:
|
|
34
|
+
onConfirm: c,
|
|
39
35
|
children: /* @__PURE__ */ t(
|
|
40
36
|
d,
|
|
41
37
|
{
|
|
42
38
|
tooltip: e,
|
|
43
|
-
icon: /* @__PURE__ */ t(
|
|
39
|
+
icon: /* @__PURE__ */ t(p, {}),
|
|
44
40
|
disabled: f,
|
|
45
|
-
loading:
|
|
46
|
-
type:
|
|
41
|
+
loading: m,
|
|
42
|
+
type: u,
|
|
47
43
|
danger: !0,
|
|
48
|
-
block:
|
|
44
|
+
block: r
|
|
49
45
|
}
|
|
50
46
|
)
|
|
51
47
|
}
|
|
@@ -53,16 +49,16 @@ function P({
|
|
|
53
49
|
d,
|
|
54
50
|
{
|
|
55
51
|
tooltip: e,
|
|
56
|
-
icon: /* @__PURE__ */ t(
|
|
52
|
+
icon: /* @__PURE__ */ t(p, {}),
|
|
57
53
|
disabled: f,
|
|
58
|
-
loading:
|
|
59
|
-
type:
|
|
54
|
+
loading: m,
|
|
55
|
+
type: u,
|
|
60
56
|
danger: !0,
|
|
61
|
-
block:
|
|
62
|
-
onClick:
|
|
57
|
+
block: r,
|
|
58
|
+
onClick: c
|
|
63
59
|
}
|
|
64
60
|
);
|
|
65
61
|
}
|
|
66
62
|
export {
|
|
67
|
-
|
|
63
|
+
q as default
|
|
68
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("@ant-design/icons"),r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("@ant-design/icons"),r=require("react"),l=require("../../locale/index.cjs.js"),a=require("./Button.cjs.js");function x({value:t,onClick:e}){const[s,n]=r.useState(!1),{t:i}=l.useTranslationLib(),c=r.useCallback(async()=>{n(!0),e(t).finally(()=>n(!1))},[e,t]);return o.jsx(a,{loading:s,type:"link",onClick:c,icon:o.jsx(u.ExportOutlined,{}),tooltip:i("str.export")})}exports.ExportButton=x;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { ExportOutlined as p } from "@ant-design/icons";
|
|
3
|
-
import { useState as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { TRANSLATION_NAMESPACE as c } from "../../locale/hooks/translation-constants.es.js";
|
|
3
|
+
import { useState as l, useCallback as m } from "react";
|
|
4
|
+
import { useTranslationLib as a } from "../../locale/index.es.js";
|
|
5
|
+
import c from "./Button.es.js";
|
|
7
6
|
function y({
|
|
8
7
|
value: t,
|
|
9
8
|
onClick: o
|
|
10
9
|
}) {
|
|
11
|
-
const [i,
|
|
12
|
-
|
|
10
|
+
const [i, n] = l(!1), { t: e } = a(), s = m(async () => {
|
|
11
|
+
n(!0), o(t).finally(() => n(!1));
|
|
13
12
|
}, [o, t]);
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
13
|
+
return /* @__PURE__ */ r(
|
|
14
|
+
c,
|
|
16
15
|
{
|
|
17
16
|
loading: i,
|
|
18
17
|
type: "link",
|
|
19
|
-
onClick:
|
|
20
|
-
icon: /* @__PURE__ */
|
|
18
|
+
onClick: s,
|
|
19
|
+
icon: /* @__PURE__ */ r(p, {}),
|
|
21
20
|
tooltip: e("str.export")
|
|
22
21
|
}
|
|
23
22
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),p=require("@ant-design/icons"),j=require("antd"),n=require("react"),g=require("../../locale/index.cjs.js"),q=require("./Button.cjs.js");function T({shouldConfirm:C=!0,block:r,value:s,loading:c,onClick:u,text:a,disabled:l,type:d="link"}){const{t}=g.useTranslationLib(),o=n.useMemo(()=>a??t("str.hide"),[a,t]),[f,i]=n.useState(!1);n.useEffect(()=>{i(c??!1)},[c]);const x=n.useCallback(async()=>{try{i(!0),await u(s)}finally{i(!1)}},[u,s]);return C?e.jsx(j.Popconfirm,{title:t("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:t("str.no").toUpperCase(),onConfirm:x,children:e.jsx(q,{tooltip:o,icon:e.jsx(p.DownCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:r})}):e.jsx(q,{tooltip:o,icon:e.jsx(p.DownCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:r,onClick:x})}module.exports=T;
|
|
@@ -1,68 +1,67 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { DownCircleOutlined as p } from "@ant-design/icons";
|
|
3
|
-
import { Popconfirm as
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import {
|
|
6
|
-
import { TRANSLATION_NAMESPACE as E } from "../../locale/hooks/translation-constants.es.js";
|
|
3
|
+
import { Popconfirm as g } from "antd";
|
|
4
|
+
import { useMemo as T, useState as x, useEffect as k, useCallback as _ } from "react";
|
|
5
|
+
import { useTranslationLib as h } from "../../locale/index.es.js";
|
|
7
6
|
import d from "./Button.es.js";
|
|
8
|
-
function
|
|
7
|
+
function j({
|
|
9
8
|
shouldConfirm: C = !0,
|
|
10
|
-
block:
|
|
9
|
+
block: r,
|
|
11
10
|
value: i,
|
|
12
11
|
loading: a,
|
|
13
12
|
onClick: s,
|
|
14
13
|
text: l,
|
|
15
14
|
disabled: f,
|
|
16
|
-
type:
|
|
15
|
+
type: u = "link"
|
|
17
16
|
}) {
|
|
18
|
-
const { t } =
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const { t } = h(), e = T(() => l ?? t("str.hide"), [l, t]), [m, n] = x(!1);
|
|
18
|
+
k(() => {
|
|
19
|
+
n(a ?? !1);
|
|
21
20
|
}, [a]);
|
|
22
21
|
const c = _(
|
|
23
22
|
async () => {
|
|
24
23
|
try {
|
|
25
|
-
|
|
24
|
+
n(!0), await s(i);
|
|
26
25
|
} finally {
|
|
27
|
-
|
|
26
|
+
n(!1);
|
|
28
27
|
}
|
|
29
28
|
},
|
|
30
29
|
[s, i]
|
|
31
30
|
);
|
|
32
31
|
return C ? /* @__PURE__ */ o(
|
|
33
|
-
|
|
32
|
+
g,
|
|
34
33
|
{
|
|
35
34
|
title: t("qus.doYouWantToHide"),
|
|
36
|
-
okText:
|
|
35
|
+
okText: e.toUpperCase(),
|
|
37
36
|
cancelText: t("str.no").toUpperCase(),
|
|
38
37
|
onConfirm: c,
|
|
39
38
|
children: /* @__PURE__ */ o(
|
|
40
39
|
d,
|
|
41
40
|
{
|
|
42
|
-
tooltip:
|
|
41
|
+
tooltip: e,
|
|
43
42
|
icon: /* @__PURE__ */ o(p, {}),
|
|
44
43
|
disabled: f,
|
|
45
|
-
loading:
|
|
46
|
-
type:
|
|
44
|
+
loading: m,
|
|
45
|
+
type: u,
|
|
47
46
|
danger: !0,
|
|
48
|
-
block:
|
|
47
|
+
block: r
|
|
49
48
|
}
|
|
50
49
|
)
|
|
51
50
|
}
|
|
52
51
|
) : /* @__PURE__ */ o(
|
|
53
52
|
d,
|
|
54
53
|
{
|
|
55
|
-
tooltip:
|
|
54
|
+
tooltip: e,
|
|
56
55
|
icon: /* @__PURE__ */ o(p, {}),
|
|
57
56
|
disabled: f,
|
|
58
|
-
loading:
|
|
59
|
-
type:
|
|
57
|
+
loading: m,
|
|
58
|
+
type: u,
|
|
60
59
|
danger: !0,
|
|
61
|
-
block:
|
|
60
|
+
block: r,
|
|
62
61
|
onClick: c
|
|
63
62
|
}
|
|
64
63
|
);
|
|
65
64
|
}
|
|
66
65
|
export {
|
|
67
|
-
|
|
66
|
+
j as default
|
|
68
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("@ant-design/icons"),n=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("@ant-design/icons"),n=require("react"),x=require("../../locale/index.cjs.js"),b=require("./Button.cjs.js");function q({onClick:o,children:c,accept:u,className:l,disabled:a,type:d="link"}){const[f,i]=n.useState(!1),{t:p}=x.useTranslationLib(),e=n.useRef(null),y=n.useCallback(()=>{m(t=>t+1),e.current&&setTimeout(()=>{var t;(t=e==null?void 0:e.current)==null||t.click()},10)},[]),[g,m]=n.useState(0),j=n.useCallback(async t=>{i(!0);const r=t.target.files[0];r&&await o(r),i(!1)},[o]);return s.jsxs("div",{className:l,children:[s.jsx("input",{type:"file",style:{display:"none"},ref:e,onChange:j,accept:u},g),s.jsx(b,{loading:f,type:d,disabled:a,onClick:y,icon:s.jsx(k.ImportOutlined,{}),tooltip:p("str.import"),children:c})]})}exports.ImportButton=q;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ImportOutlined as
|
|
3
|
-
import { useState as s, useRef as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
function _({
|
|
1
|
+
import { jsxs as h, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { ImportOutlined as x } from "@ant-design/icons";
|
|
3
|
+
import { useState as s, useRef as b, useCallback as l } from "react";
|
|
4
|
+
import { useTranslationLib as j } from "../../locale/index.es.js";
|
|
5
|
+
import B from "./Button.es.js";
|
|
6
|
+
function I({
|
|
8
7
|
onClick: e,
|
|
9
8
|
children: c,
|
|
10
|
-
accept:
|
|
11
|
-
className:
|
|
12
|
-
disabled:
|
|
13
|
-
type:
|
|
9
|
+
accept: a,
|
|
10
|
+
className: m,
|
|
11
|
+
disabled: u,
|
|
12
|
+
type: f = "link"
|
|
14
13
|
}) {
|
|
15
|
-
const [
|
|
14
|
+
const [p, i] = s(!1), { t: d } = j(), o = b(null), y = l(() => {
|
|
16
15
|
k((t) => t + 1), o.current && setTimeout(() => {
|
|
17
16
|
var t;
|
|
18
17
|
(t = o == null ? void 0 : o.current) == null || t.click();
|
|
@@ -25,7 +24,7 @@ function _({
|
|
|
25
24
|
},
|
|
26
25
|
[e]
|
|
27
26
|
);
|
|
28
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ h("div", { className: m, children: [
|
|
29
28
|
/* @__PURE__ */ n(
|
|
30
29
|
"input",
|
|
31
30
|
{
|
|
@@ -33,18 +32,18 @@ function _({
|
|
|
33
32
|
style: { display: "none" },
|
|
34
33
|
ref: o,
|
|
35
34
|
onChange: C,
|
|
36
|
-
accept:
|
|
35
|
+
accept: a
|
|
37
36
|
},
|
|
38
37
|
g
|
|
39
38
|
),
|
|
40
39
|
/* @__PURE__ */ n(
|
|
41
|
-
|
|
40
|
+
B,
|
|
42
41
|
{
|
|
43
|
-
loading:
|
|
44
|
-
type:
|
|
45
|
-
disabled:
|
|
42
|
+
loading: p,
|
|
43
|
+
type: f,
|
|
44
|
+
disabled: u,
|
|
46
45
|
onClick: y,
|
|
47
|
-
icon: /* @__PURE__ */ n(
|
|
46
|
+
icon: /* @__PURE__ */ n(x, {}),
|
|
48
47
|
tooltip: d("str.import"),
|
|
49
48
|
children: c
|
|
50
49
|
}
|
|
@@ -52,5 +51,5 @@ function _({
|
|
|
52
51
|
] });
|
|
53
52
|
}
|
|
54
53
|
export {
|
|
55
|
-
|
|
54
|
+
I as ImportButton
|
|
56
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("@ant-design/icons"),a=require("../../locale/index.cjs.js"),d=require("./Button.cjs.js"),j=({size:n,block:r,className:i,type:o="primary",onClick:e,title:s,to:u})=>{const{t:c}=a.useTranslationLib();return t.jsx(d,{type:o,className:i,to:u,block:r,size:n,onClick:e&&(()=>e(!0)),icon:t.jsx(l.PlusOutlined,{}),children:s??c("str.new")})};exports.NewButton=j;
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { PlusOutlined as u } from "@ant-design/icons";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
c,
|
|
3
|
+
import { useTranslationLib as c } from "../../locale/index.es.js";
|
|
4
|
+
import f from "./Button.es.js";
|
|
5
|
+
const x = ({ size: r, block: n, className: i, type: m = "primary", onClick: t, title: e, to: p }) => {
|
|
6
|
+
const { t: s } = c();
|
|
7
|
+
return /* @__PURE__ */ o(
|
|
8
|
+
f,
|
|
10
9
|
{
|
|
11
|
-
type:
|
|
12
|
-
className:
|
|
10
|
+
type: m,
|
|
11
|
+
className: i,
|
|
13
12
|
to: p,
|
|
14
13
|
block: n,
|
|
15
|
-
size:
|
|
16
|
-
onClick:
|
|
17
|
-
icon: /* @__PURE__ */
|
|
14
|
+
size: r,
|
|
15
|
+
onClick: t && (() => t(!0)),
|
|
16
|
+
icon: /* @__PURE__ */ o(u, {}),
|
|
18
17
|
children: e ?? s("str.new")
|
|
19
18
|
}
|
|
20
19
|
);
|
|
21
20
|
};
|
|
22
21
|
export {
|
|
23
|
-
|
|
22
|
+
x as NewButton
|
|
24
23
|
};
|
|
@@ -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("react/jsx-runtime"),d=require("@ant-design/icons"),p=require("../../locale/index.cjs.js"),j=require("./Button.cjs.js"),m=({disabled:i,loading:e,block:o,className:s,type:u="primary",onClick:c,title:l,to:a})=>{const{t:r}=p.useTranslationLib(),t=l??r("str.print");return n.jsx(j,{type:u,className:s,to:a,loading:e,disabled:i,block:o,onClick:c,tooltip:t!=null&&t.trim()?"":r("str.print"),icon:n.jsx(d.PrinterOutlined,{}),children:t})};exports.PrintButton=m;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { PrinterOutlined as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const { t } = A(l), r = c ?? t("str.print");
|
|
2
|
+
import { PrinterOutlined as f } from "@ant-design/icons";
|
|
3
|
+
import { useTranslationLib as a } from "../../locale/index.es.js";
|
|
4
|
+
import l from "./Button.es.js";
|
|
5
|
+
const b = ({ disabled: n, loading: i, block: m, className: p, type: s = "primary", onClick: e, title: c, to: u }) => {
|
|
6
|
+
const { t: r } = a(), t = c ?? r("str.print");
|
|
8
7
|
return /* @__PURE__ */ o(
|
|
9
|
-
|
|
8
|
+
l,
|
|
10
9
|
{
|
|
11
10
|
type: s,
|
|
12
11
|
className: p,
|
|
13
|
-
to:
|
|
12
|
+
to: u,
|
|
14
13
|
loading: i,
|
|
15
14
|
disabled: n,
|
|
16
15
|
block: m,
|
|
17
16
|
onClick: e,
|
|
18
|
-
tooltip:
|
|
19
|
-
icon: /* @__PURE__ */ o(
|
|
20
|
-
children:
|
|
17
|
+
tooltip: t != null && t.trim() ? "" : r("str.print"),
|
|
18
|
+
icon: /* @__PURE__ */ o(f, {}),
|
|
19
|
+
children: t
|
|
21
20
|
}
|
|
22
21
|
);
|
|
23
22
|
};
|
|
24
23
|
export {
|
|
25
|
-
|
|
24
|
+
b as PrintButton
|
|
26
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("@ant-design/icons"),a=require("../../locale/index.cjs.js"),d=require("./Button.cjs.js"),f=({disabled:r,block:n,className:s,type:o="primary",onClick:e,title:i,to:u})=>{const{t:c}=a.useTranslationLib();return t.jsx(d,{type:o,disabled:r,className:s,to:u,block:n,onClick:e&&(()=>e(!0)),icon:t.jsx(l.ReloadOutlined,{}),children:i??c("str.refresh")})};exports.RefreshButton=f;
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { ReloadOutlined as f } from "@ant-design/icons";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const { t: s } = u(a);
|
|
3
|
+
import { useTranslationLib as u } from "../../locale/index.es.js";
|
|
4
|
+
import a from "./Button.es.js";
|
|
5
|
+
const x = ({ disabled: t, block: e, className: n, type: i = "primary", onClick: r, title: m, to: s }) => {
|
|
6
|
+
const { t: p } = u();
|
|
8
7
|
return /* @__PURE__ */ o(
|
|
9
|
-
|
|
8
|
+
a,
|
|
10
9
|
{
|
|
11
|
-
type:
|
|
10
|
+
type: i,
|
|
12
11
|
disabled: t,
|
|
13
|
-
className:
|
|
14
|
-
to:
|
|
12
|
+
className: n,
|
|
13
|
+
to: s,
|
|
15
14
|
block: e,
|
|
16
15
|
onClick: r && (() => r(!0)),
|
|
17
16
|
icon: /* @__PURE__ */ o(f, {}),
|
|
18
|
-
children:
|
|
17
|
+
children: m ?? p("str.refresh")
|
|
19
18
|
}
|
|
20
19
|
);
|
|
21
20
|
};
|
|
22
21
|
export {
|
|
23
|
-
|
|
22
|
+
x as RefreshButton
|
|
24
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),p=require("@ant-design/icons"),g=require("antd"),n=require("react"),U=require("../../locale/index.cjs.js"),q=require("./Button.cjs.js");function m({shouldConfirm:C=!0,block:r,value:s,loading:u,onClick:c,text:a,disabled:l,type:d="link",hidden:j}){const{t}=U.useTranslationLib(),o=n.useMemo(()=>a??t("str.unhide"),[a,t]),[f,i]=n.useState(!1);n.useEffect(()=>{i(u??!1)},[u]);const x=n.useCallback(async()=>{try{i(!0),await c(s)}finally{i(!1)}},[c,s]);return C?e.jsx(g.Popconfirm,{title:t("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:t("str.no").toUpperCase(),onConfirm:x,children:e.jsx(q,{tooltip:o,icon:e.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,hidden:j,block:r})}):e.jsx(q,{tooltip:o,icon:e.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:r,onClick:x})}module.exports=m;
|