@kingteza/crud-component 1.0.14 → 1.0.15
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/components/common/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/common/DatePicker/DatePicker.js +38 -38
- package/dist/components/common/DatePicker/TimePicker.cjs +1 -1
- package/dist/components/common/DatePicker/TimePicker.js +39 -39
- package/dist/components/common/appearance/Hider.cjs +1 -1
- package/dist/components/common/appearance/Hider.js +3 -3
- package/dist/components/common/button/Button.cjs +1 -1
- package/dist/components/common/button/Button.js +19 -19
- package/dist/components/common/button/CloneButtonTable.cjs +1 -1
- package/dist/components/common/button/CloneButtonTable.js +11 -11
- package/dist/components/common/button/DeleteButtonTable.cjs +1 -1
- package/dist/components/common/button/DeleteButtonTable.js +29 -29
- package/dist/components/common/button/ExportButton.cjs +1 -1
- package/dist/components/common/button/ExportButton.js +17 -17
- package/dist/components/common/button/HideButtonTable.cjs +1 -1
- package/dist/components/common/button/HideButtonTable.js +35 -35
- package/dist/components/common/button/ImportButton.cjs +1 -1
- package/dist/components/common/button/ImportButton.js +28 -28
- package/dist/components/common/button/NewButton.cjs +1 -1
- package/dist/components/common/button/NewButton.js +14 -14
- package/dist/components/common/button/PrintButton.cjs +1 -1
- package/dist/components/common/button/PrintButton.js +14 -14
- package/dist/components/common/button/RefreshButton.cjs +1 -1
- package/dist/components/common/button/RefreshButton.js +16 -16
- package/dist/components/common/button/UnHideButton.cjs +1 -1
- package/dist/components/common/button/UnHideButton.js +37 -37
- package/dist/components/common/button/UpdateButtonTable.cjs +1 -1
- package/dist/components/common/button/UpdateButtonTable.js +11 -11
- package/dist/components/common/button/ViewButtonTable.cjs +1 -1
- package/dist/components/common/button/ViewButtonTable.js +10 -10
- package/dist/components/common/check-box/CheckBox.cjs +1 -1
- package/dist/components/common/check-box/CheckBox.js +20 -20
- package/dist/components/common/description/DescList.cjs +1 -1
- package/dist/components/common/description/DescList.js +9 -9
- package/dist/components/common/layout/VerticalSpace.cjs +1 -1
- package/dist/components/common/layout/VerticalSpace.js +3 -3
- package/dist/components/common/loading/LoadingIndicator.cjs +1 -1
- package/dist/components/common/loading/LoadingIndicator.js +12 -12
- package/dist/components/common/picker/ImagePicker.cjs +1 -1
- package/dist/components/common/picker/ImagePicker.js +173 -176
- package/dist/components/common/radio/RadioGroupComponent.cjs +1 -1
- package/dist/components/common/radio/RadioGroupComponent.js +6 -6
- package/dist/components/common/report/SelectFieldInReport.cjs +1 -1
- package/dist/components/common/report/SelectFieldInReport.js +11 -11
- package/dist/components/common/select/CustomSelectOption.cjs +1 -1
- package/dist/components/common/select/CustomSelectOption.js +7 -7
- package/dist/components/common/select/SelectComponent.cjs +1 -1
- package/dist/components/common/select/SelectComponent.js +36 -36
- package/dist/components/common/show-more/index.cjs +1 -1
- package/dist/components/common/show-more/index.js +5 -5
- package/dist/components/common/tab/TabViewWithRoute.cjs +1 -1
- package/dist/components/common/tab/TabViewWithRoute.js +23 -22
- package/dist/components/common/table/table.cjs +1 -1
- package/dist/components/common/table/table.js +12 -12
- package/dist/components/common/tag/StatusTag.cjs +1 -1
- package/dist/components/common/tag/StatusTag.js +13 -13
- package/dist/components/common/text-field/NumberField.cjs +1 -1
- package/dist/components/common/text-field/NumberField.js +43 -43
- package/dist/components/common/text-field/PhoneNumberField.cjs +1 -1
- package/dist/components/common/text-field/PhoneNumberField.js +4 -4
- package/dist/components/common/text-field/TextArea.cjs +1 -1
- package/dist/components/common/text-field/TextArea.js +20 -20
- package/dist/components/common/text-field/TextField.cjs +1 -1
- package/dist/components/common/text-field/TextField.js +47 -47
- package/dist/components/common/tooltip/TooltipComponent.cjs +1 -1
- package/dist/components/common/tooltip/TooltipComponent.js +3 -3
- package/dist/components/common/wizard/WizardResult.cjs +1 -1
- package/dist/components/common/wizard/WizardResult.js +37 -38
- package/dist/components/common/wizard/WizardViewForm.cjs +1 -1
- package/dist/components/common/wizard/WizardViewForm.js +43 -43
- package/dist/components/crud/CrudComponent.cjs +1 -1
- package/dist/components/crud/CrudComponent.js +130 -130
- package/dist/components/crud/CrudField.cjs +1 -1
- package/dist/components/crud/CrudField.js +217 -217
- package/dist/components/crud/CrudForm.cjs +1 -1
- package/dist/components/crud/CrudForm.js +55 -55
- package/dist/components/crud/CrudFormWizard.cjs +1 -1
- package/dist/components/crud/CrudFormWizard.js +82 -84
- package/dist/components/crud/CrudReportComponent.cjs +3 -3
- package/dist/components/crud/CrudReportComponent.js +123 -123
- package/dist/components/crud/CrudSearchComponent.cjs +1 -1
- package/dist/components/crud/CrudSearchComponent.js +43 -43
- package/dist/components/crud/FileCrudField.cjs +1 -1
- package/dist/components/crud/FileCrudField.js +118 -125
- package/dist/components/crud/ImageCrudField.cjs +1 -1
- package/dist/components/crud/ImageCrudField.js +56 -56
- package/dist/components/crud/import/CrudImportButton.cjs +1 -1
- package/dist/components/crud/import/CrudImportButton.js +18 -18
- package/dist/components/crud/import/CrudImportComponent.cjs +2 -2
- package/dist/components/crud/import/CrudImportComponent.js +108 -109
- package/dist/components/crud/view/CrudDecListView.cjs +1 -1
- package/dist/components/crud/view/CrudDecListView.js +22 -22
- package/dist/components/crud/view/CrudViewer.cjs +1 -1
- package/dist/components/crud/view/CrudViewer.js +152 -152
- package/dist/components/crud/view/CrudViewerUtil.cjs +1 -1
- package/dist/components/crud/view/CrudViewerUtil.js +33 -34
- package/dist/locale/index.cjs +1 -1
- package/dist/locale/index.js +2 -2
- package/dist/util/DateUtil.cjs +1 -1
- package/dist/util/DateUtil.js +4 -4
- package/dist/util/ValidationUtil.cjs +1 -1
- package/dist/util/ValidationUtil.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const d=require("
|
|
1
|
+
"use strict";const d=require("react/jsx-runtime"),s=require("antd"),t=require("dayjs"),E=require("../../../_virtual/advancedFormat.cjs"),F=require("../../../_virtual/customParseFormat.cjs"),I=require("../../../_virtual/localeData.cjs"),v=require("../../../_virtual/weekday.cjs"),S=require("../../../_virtual/weekOfYear.cjs"),T=require("../../../_virtual/weekYear.cjs"),Y=require("../../../locale/hooks/translation-constants.cjs"),$=require("react"),L=require("react-i18next");t.extend(F);t.extend(E);t.extend(v);t.extend(I);t.extend(S);t.extend(T);const M=({type:_,required:q,label:o,rules:x=[],placeholder:a,disabledPastDays:c=!1,disableToday:i=!1,onEnter:z,disabled:f,nextFocus:B,onChange:r,range:m,showTime:l,disabledFutureDays:u,picker:k,defaultValue:O,value:y,format:P,autoComplete:G="off",enabledDates:H=[],renderExtraFooter:j,...p})=>{const{t:w}=L.useTranslation(Y.TRANSLATION_NAMESPACE),A=m?s.DatePicker.RangePicker:s.DatePicker,D=$.useCallback(e=>{if(!e)return!1;const n=t(),N=c&&e<n.startOf("day"),R=u&&e>n.endOf("day"),C=i&&e<n.endOf("day")&&n.startOf("day")<e;return N||R||C},[c,u,i]);return d.jsx(s.Form.Item,{...p,label:o,rules:[{required:q,message:`${o??a??""} ${w("err.validation.required")}`},...x],children:d.jsx(A,{renderExtraFooter:j,value:y,picker:k,defaultValue:O,format:P,onChange:e=>r==null?void 0:r(e),disabledDate:D,disabled:f,className:"w-100",placeholder:a,showTime:l})})};module.exports=M;
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DatePicker as d, Form as
|
|
3
|
-
import e from "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { DatePicker as d, Form as C } from "antd";
|
|
3
|
+
import e from "dayjs";
|
|
4
|
+
import I from "../../../_virtual/advancedFormat.js";
|
|
5
|
+
import R from "../../../_virtual/customParseFormat.js";
|
|
6
6
|
import S from "../../../_virtual/localeData.js";
|
|
7
7
|
import T from "../../../_virtual/weekday.js";
|
|
8
8
|
import Y from "../../../_virtual/weekOfYear.js";
|
|
9
9
|
import $ from "../../../_virtual/weekYear.js";
|
|
10
10
|
import { TRANSLATION_NAMESPACE as q } from "../../../locale/hooks/translation-constants.js";
|
|
11
11
|
import { useCallback as L } from "react";
|
|
12
|
-
import { useTranslation as M } from "
|
|
12
|
+
import { useTranslation as M } from "react-i18next";
|
|
13
|
+
e.extend(R);
|
|
13
14
|
e.extend(I);
|
|
14
|
-
e.extend(C);
|
|
15
15
|
e.extend(T);
|
|
16
16
|
e.extend(S);
|
|
17
17
|
e.extend(Y);
|
|
18
18
|
e.extend($);
|
|
19
19
|
const et = ({
|
|
20
20
|
type: _,
|
|
21
|
-
required:
|
|
21
|
+
required: c,
|
|
22
22
|
label: m,
|
|
23
|
-
rules:
|
|
23
|
+
rules: p = [],
|
|
24
24
|
placeholder: a,
|
|
25
25
|
disabledPastDays: n = !1,
|
|
26
|
-
disableToday:
|
|
26
|
+
disableToday: f = !1,
|
|
27
27
|
onEnter: z,
|
|
28
|
-
disabled:
|
|
28
|
+
disabled: l,
|
|
29
29
|
nextFocus: B,
|
|
30
30
|
onChange: r,
|
|
31
|
-
range:
|
|
31
|
+
range: x,
|
|
32
32
|
showTime: k,
|
|
33
|
-
disabledFutureDays:
|
|
34
|
-
picker:
|
|
35
|
-
defaultValue:
|
|
36
|
-
value:
|
|
37
|
-
format:
|
|
33
|
+
disabledFutureDays: s,
|
|
34
|
+
picker: O,
|
|
35
|
+
defaultValue: u,
|
|
36
|
+
value: y,
|
|
37
|
+
format: w,
|
|
38
38
|
autoComplete: G = "off",
|
|
39
39
|
enabledDates: H = [],
|
|
40
|
-
renderExtraFooter:
|
|
41
|
-
...
|
|
40
|
+
renderExtraFooter: A,
|
|
41
|
+
...N
|
|
42
42
|
}) => {
|
|
43
|
-
const { t:
|
|
43
|
+
const { t: P } = M(q), D = x ? d.RangePicker : d, E = L(
|
|
44
44
|
(t) => {
|
|
45
45
|
if (!t)
|
|
46
46
|
return !1;
|
|
47
|
-
const o = e(),
|
|
48
|
-
return
|
|
47
|
+
const o = e(), F = n && t < o.startOf("day"), j = s && t > o.endOf("day"), v = f && t < o.endOf("day") && o.startOf("day") < t;
|
|
48
|
+
return F || j || v;
|
|
49
49
|
},
|
|
50
|
-
[n,
|
|
50
|
+
[n, s, f]
|
|
51
51
|
// Dependencies for useCallback
|
|
52
52
|
);
|
|
53
|
-
return /* @__PURE__ */ i
|
|
54
|
-
|
|
53
|
+
return /* @__PURE__ */ i(
|
|
54
|
+
C.Item,
|
|
55
55
|
{
|
|
56
|
-
...
|
|
56
|
+
...N,
|
|
57
57
|
label: m,
|
|
58
58
|
rules: [
|
|
59
59
|
{
|
|
60
|
-
required:
|
|
61
|
-
message: `${m ?? a ?? ""} ${
|
|
60
|
+
required: c,
|
|
61
|
+
message: `${m ?? a ?? ""} ${P(
|
|
62
62
|
"err.validation.required"
|
|
63
63
|
)}`
|
|
64
64
|
},
|
|
65
|
-
...
|
|
65
|
+
...p
|
|
66
66
|
],
|
|
67
|
-
children: /* @__PURE__ */ i
|
|
68
|
-
|
|
67
|
+
children: /* @__PURE__ */ i(
|
|
68
|
+
D,
|
|
69
69
|
{
|
|
70
|
-
renderExtraFooter:
|
|
71
|
-
value:
|
|
72
|
-
picker:
|
|
73
|
-
defaultValue:
|
|
74
|
-
format:
|
|
70
|
+
renderExtraFooter: A,
|
|
71
|
+
value: y,
|
|
72
|
+
picker: O,
|
|
73
|
+
defaultValue: u,
|
|
74
|
+
format: w,
|
|
75
75
|
onChange: (t) => r == null ? void 0 : r(t),
|
|
76
|
-
disabledDate:
|
|
77
|
-
disabled:
|
|
76
|
+
disabledDate: E,
|
|
77
|
+
disabled: l,
|
|
78
78
|
className: "w-100",
|
|
79
79
|
placeholder: a,
|
|
80
80
|
showTime: k
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("
|
|
1
|
+
"use strict";const l=require("react/jsx-runtime"),c=require("antd"),C=require("dayjs"),q=require("react"),F=require("react-i18next"),M=require("../../../locale/hooks/translation-constants.cjs"),$=({type:v,required:T,label:r,rules:f=[],placeholder:t,disabledPast:i=!1,disableCurrent:m=!1,onEnter:w,disabled:x,use12Hours:k,nextFocus:D,onChange:s,range:n,disabledFuture:a,defaultValue:j,value:p,format:A,autoComplete:H="off",renderExtraFooter:N,...P})=>{const{t:R}=F.useTranslation(M.TRANSLATION_NAMESPACE),u=q.useMemo(()=>t||(n?["From","To"]:"Select time"),[t,n]);console.log(u);const y=n?c.TimePicker.RangePicker:c.TimePicker,E=q.useCallback(e=>{if(!e)return!1;const o=C(),I=i&&e<o,S=a&&e>o,d=m&&e<o&&o<e;return I||S||d},[m,a,i]);return l.jsx(c.Form.Item,{...P,label:r,rules:[{required:T,message:`${r??t??""} ${R("err.validation.required")}`},...f],children:l.jsx(y,{use12Hours:k,renderExtraFooter:N,value:p,defaultValue:j,format:A,onChange:e=>s==null?void 0:s(e),disabledDate:E,disabled:x,className:"w-100",placeholder:u})})};module.exports=$;
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TimePicker as a, Form as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { TimePicker as a, Form as M } from "antd";
|
|
3
|
+
import R from "dayjs";
|
|
4
4
|
import { useMemo as $, useCallback as q } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useTranslation as v } from "react-i18next";
|
|
6
|
+
import { TRANSLATION_NAMESPACE as w } from "../../../locale/hooks/translation-constants.js";
|
|
7
7
|
const K = ({
|
|
8
8
|
type: C,
|
|
9
9
|
required: l,
|
|
10
10
|
label: r,
|
|
11
|
-
rules:
|
|
11
|
+
rules: T = [],
|
|
12
12
|
placeholder: t,
|
|
13
|
-
disabledPast:
|
|
14
|
-
disableCurrent:
|
|
13
|
+
disabledPast: c = !1,
|
|
14
|
+
disableCurrent: i = !1,
|
|
15
15
|
onEnter: D,
|
|
16
|
-
disabled:
|
|
17
|
-
use12Hours:
|
|
16
|
+
disabled: k,
|
|
17
|
+
use12Hours: u,
|
|
18
18
|
nextFocus: H,
|
|
19
|
-
onChange:
|
|
20
|
-
range:
|
|
19
|
+
onChange: e,
|
|
20
|
+
range: s,
|
|
21
21
|
disabledFuture: n,
|
|
22
|
-
defaultValue:
|
|
23
|
-
value:
|
|
24
|
-
format:
|
|
22
|
+
defaultValue: A,
|
|
23
|
+
value: N,
|
|
24
|
+
format: x,
|
|
25
25
|
autoComplete: L = "off",
|
|
26
|
-
renderExtraFooter:
|
|
27
|
-
...
|
|
26
|
+
renderExtraFooter: y,
|
|
27
|
+
...E
|
|
28
28
|
}) => {
|
|
29
|
-
const { t:
|
|
30
|
-
() => t || (
|
|
31
|
-
[t,
|
|
29
|
+
const { t: P } = v(w), f = $(
|
|
30
|
+
() => t || (s ? ["From", "To"] : "Select time"),
|
|
31
|
+
[t, s]
|
|
32
32
|
);
|
|
33
33
|
console.log(f);
|
|
34
|
-
const
|
|
34
|
+
const S = s ? a.RangePicker : a, d = q(
|
|
35
35
|
(o) => {
|
|
36
36
|
if (!o)
|
|
37
37
|
return !1;
|
|
38
|
-
const
|
|
39
|
-
return
|
|
38
|
+
const m = R(), j = c && o < m, F = n && o > m, I = i && o < m && m < o;
|
|
39
|
+
return j || F || I;
|
|
40
40
|
},
|
|
41
|
-
[
|
|
41
|
+
[i, n, c]
|
|
42
42
|
// Dependencies for useCallback
|
|
43
43
|
);
|
|
44
|
-
return /* @__PURE__ */ p
|
|
45
|
-
|
|
44
|
+
return /* @__PURE__ */ p(
|
|
45
|
+
M.Item,
|
|
46
46
|
{
|
|
47
|
-
...
|
|
47
|
+
...E,
|
|
48
48
|
label: r,
|
|
49
49
|
rules: [
|
|
50
50
|
{
|
|
51
51
|
required: l,
|
|
52
|
-
message: `${r ?? t ?? ""} ${
|
|
52
|
+
message: `${r ?? t ?? ""} ${P(
|
|
53
53
|
"err.validation.required"
|
|
54
54
|
)}`
|
|
55
55
|
},
|
|
56
|
-
...
|
|
56
|
+
...T
|
|
57
57
|
],
|
|
58
|
-
children: /* @__PURE__ */ p
|
|
59
|
-
|
|
58
|
+
children: /* @__PURE__ */ p(
|
|
59
|
+
S,
|
|
60
60
|
{
|
|
61
|
-
use12Hours:
|
|
62
|
-
renderExtraFooter:
|
|
63
|
-
value:
|
|
64
|
-
defaultValue:
|
|
65
|
-
format:
|
|
66
|
-
onChange: (o) =>
|
|
67
|
-
disabledDate:
|
|
68
|
-
disabled:
|
|
61
|
+
use12Hours: u,
|
|
62
|
+
renderExtraFooter: y,
|
|
63
|
+
value: N,
|
|
64
|
+
defaultValue: A,
|
|
65
|
+
format: x,
|
|
66
|
+
onChange: (o) => e == null ? void 0 : e(o),
|
|
67
|
+
disabledDate: d,
|
|
68
|
+
disabled: k,
|
|
69
69
|
className: "w-100",
|
|
70
70
|
placeholder: f
|
|
71
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),t=({children:e,hide:s})=>r.jsx("div",{className:s?"d-none":"",children:e});module.exports=t;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
const t = ({ children: e, hide: r }) => /* @__PURE__ */ o("div", { className: r ? "d-none" : "", children: e });
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
t as default
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const d=require("react/jsx-runtime"),g=require("antd"),y=require("../../../locale/hooks/translation-constants.cjs"),l=require("react"),f=require("react-i18next"),c=require("react-router-dom");;/* empty css */const x=({className:s,to:e,onClick:t,tooltip:a,ref:q,...n})=>{var u;const{t:o}=f.useTranslation(y.TRANSLATION_NAMESPACE),i=l.useContext(c.UNSAFE_NavigationContext)?(u=c.useNavigate)==null?void 0:u.call(c):void 0,r=l.useMemo(()=>d.jsx(g.Button,{onClick:t||(e&&i?()=>i(e):void 0),className:s,...n,children:n.children||o(`button.${n.type}`)}),[s,i,t,n,o,e]);return a?d.jsx(g.Tooltip,{title:a,children:r}):r},j=({className:s,to:e,onClick:t,tooltip:a,ref:q,...n})=>{const o=c.useNavigate(),[v,i]=l.useState(!1),r=l.useCallback(async A=>{try{return i(!0),await t(A)}finally{i(!1)}},[t]),u=l.useMemo(()=>d.jsx(g.Button,{loading:v||n.loading,onClick:t?r:e?()=>o(e):void 0,className:s,...n}),[r,s,v,o,t,n,e]);return a?d.jsx(g.Tooltip,{title:a,children:u}):u};x.Async=j;module.exports=x;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { Button as d, Tooltip as f } from "antd";
|
|
3
|
-
import { TRANSLATION_NAMESPACE as
|
|
4
|
-
import { useContext as
|
|
3
|
+
import { TRANSLATION_NAMESPACE as y } from "../../../locale/hooks/translation-constants.js";
|
|
4
|
+
import { useContext as b, useMemo as l, useState as h, useCallback as x } from "react";
|
|
5
|
+
import { useTranslation as N } from "react-i18next";
|
|
6
|
+
import { UNSAFE_NavigationContext as S, useNavigate as g } from "react-router-dom";
|
|
5
7
|
/* empty css */
|
|
6
|
-
|
|
7
|
-
import { NavigationContext as T, useNavigate as g } from "../../../node_modules/react-router/dist/development/chunk-K6AXKMTT.js";
|
|
8
|
-
const C = ({
|
|
8
|
+
const T = ({
|
|
9
9
|
className: i,
|
|
10
10
|
to: e,
|
|
11
11
|
onClick: t,
|
|
@@ -13,9 +13,9 @@ const C = ({
|
|
|
13
13
|
ref: v,
|
|
14
14
|
...n
|
|
15
15
|
}) => {
|
|
16
|
-
var
|
|
17
|
-
const { t: r } =
|
|
18
|
-
() => /* @__PURE__ */
|
|
16
|
+
var c;
|
|
17
|
+
const { t: r } = N(y), o = b(S) ? (c = g) == null ? void 0 : c() : void 0, s = l(
|
|
18
|
+
() => /* @__PURE__ */ u(
|
|
19
19
|
d,
|
|
20
20
|
{
|
|
21
21
|
onClick: t || (e && o ? () => o(e) : void 0),
|
|
@@ -26,8 +26,8 @@ const C = ({
|
|
|
26
26
|
),
|
|
27
27
|
[i, o, t, n, r, e]
|
|
28
28
|
);
|
|
29
|
-
return a ? /* @__PURE__ */
|
|
30
|
-
},
|
|
29
|
+
return a ? /* @__PURE__ */ u(f, { title: a, children: s }) : s;
|
|
30
|
+
}, C = ({
|
|
31
31
|
className: i,
|
|
32
32
|
to: e,
|
|
33
33
|
onClick: t,
|
|
@@ -35,17 +35,17 @@ const C = ({
|
|
|
35
35
|
ref: v,
|
|
36
36
|
...n
|
|
37
37
|
}) => {
|
|
38
|
-
const r = g(), [m, o] =
|
|
39
|
-
async (
|
|
38
|
+
const r = g(), [m, o] = h(!1), s = x(
|
|
39
|
+
async (A) => {
|
|
40
40
|
try {
|
|
41
|
-
return o(!0), await t(
|
|
41
|
+
return o(!0), await t(A);
|
|
42
42
|
} finally {
|
|
43
43
|
o(!1);
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
[t]
|
|
47
|
-
),
|
|
48
|
-
() => /* @__PURE__ */
|
|
47
|
+
), c = l(
|
|
48
|
+
() => /* @__PURE__ */ u(
|
|
49
49
|
d,
|
|
50
50
|
{
|
|
51
51
|
loading: m || n.loading,
|
|
@@ -56,9 +56,9 @@ const C = ({
|
|
|
56
56
|
),
|
|
57
57
|
[s, i, m, r, t, n, e]
|
|
58
58
|
);
|
|
59
|
-
return a ? /* @__PURE__ */
|
|
59
|
+
return a ? /* @__PURE__ */ u(f, { title: a, children: c }) : c;
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
T.Async = C;
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
T as default
|
|
64
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("@ant-design/icons"),r=require("./Button.cjs"),i=require("react-i18next"),c=require("../../../locale/hooks/translation-constants.cjs");function u({value:n,onClick:e}){const{t:o}=i.useTranslation(c.TRANSLATION_NAMESPACE);return t.jsx(r,{type:"link",onClick:()=>e(n),icon:t.jsx(s.CopyOutlined,{}),tooltip:o("clone")})}module.exports=u;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import i from "
|
|
3
|
-
import
|
|
4
|
-
import { useTranslation as e } from "
|
|
5
|
-
import p from "../../../
|
|
6
|
-
function
|
|
7
|
-
const { t: r } = e(
|
|
8
|
-
return /* @__PURE__ */ o
|
|
9
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { CopyOutlined as i } from "@ant-design/icons";
|
|
3
|
+
import m from "./Button.js";
|
|
4
|
+
import { useTranslation as e } from "react-i18next";
|
|
5
|
+
import { TRANSLATION_NAMESPACE as p } from "../../../locale/hooks/translation-constants.js";
|
|
6
|
+
function s({ value: t, onClick: n }) {
|
|
7
|
+
const { t: r } = e(p);
|
|
8
|
+
return /* @__PURE__ */ o(
|
|
9
|
+
m,
|
|
10
10
|
{
|
|
11
11
|
type: "link",
|
|
12
12
|
onClick: () => n(t),
|
|
13
|
-
icon: /* @__PURE__ */ o
|
|
13
|
+
icon: /* @__PURE__ */ o(i, {}),
|
|
14
14
|
tooltip: r("clone")
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
s as default
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),q=require("@ant-design/icons"),T=require("antd"),n=require("react"),p=require("./Button.cjs"),j=require("react-i18next"),g=require("../../../locale/hooks/translation-constants.cjs");function m({shouldConfirm:C=!0,block:r,value:i,loading:a,onClick:u,text:c,disabled:l,type:f="link"}){const{t}=j.useTranslation(g.TRANSLATION_NAMESPACE),o=n.useMemo(()=>c??t("str.delete"),[c,t]),[x,s]=n.useState(!1);n.useEffect(()=>{s(a??!1)},[a]);const d=n.useCallback(async()=>{try{s(!0),await u(i)}finally{s(!1)}},[u,i]);return C?e.jsx(T.Popconfirm,{title:t("qus.doYouWantToDelete"),okText:o.toUpperCase(),cancelText:t("str.no").toUpperCase(),onConfirm:d,children:e.jsx(p,{tooltip:o,icon:e.jsx(q.DeleteOutlined,{}),disabled:l,loading:x,type:f,danger:!0,block:r})}):e.jsx(p,{tooltip:o,icon:e.jsx(q.DeleteOutlined,{}),disabled:l,loading:x,type:f,danger:!0,block:r,onClick:d})}module.exports=m;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import
|
|
8
|
-
function
|
|
9
|
-
shouldConfirm:
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { DeleteOutlined as c } from "@ant-design/icons";
|
|
3
|
+
import { Popconfirm as T } from "antd";
|
|
4
|
+
import { useMemo as g, useState as x, useEffect as A, useCallback as _ } from "react";
|
|
5
|
+
import d from "./Button.js";
|
|
6
|
+
import { useTranslation as k } from "react-i18next";
|
|
7
|
+
import { TRANSLATION_NAMESPACE as D } from "../../../locale/hooks/translation-constants.js";
|
|
8
|
+
function P({
|
|
9
|
+
shouldConfirm: C = !0,
|
|
10
10
|
block: n,
|
|
11
|
-
value:
|
|
12
|
-
loading:
|
|
13
|
-
onClick:
|
|
14
|
-
text:
|
|
11
|
+
value: i,
|
|
12
|
+
loading: a,
|
|
13
|
+
onClick: l,
|
|
14
|
+
text: s,
|
|
15
15
|
disabled: f,
|
|
16
16
|
type: m = "link"
|
|
17
17
|
}) {
|
|
18
|
-
const { t: o } =
|
|
19
|
-
|
|
20
|
-
r(
|
|
21
|
-
}, [
|
|
22
|
-
const p =
|
|
18
|
+
const { t: o } = k(D), e = g(() => s ?? o("str.delete"), [s, o]), [u, r] = x(!1);
|
|
19
|
+
A(() => {
|
|
20
|
+
r(a ?? !1);
|
|
21
|
+
}, [a]);
|
|
22
|
+
const p = _(
|
|
23
23
|
async () => {
|
|
24
24
|
try {
|
|
25
|
-
r(!0), await
|
|
25
|
+
r(!0), await l(i);
|
|
26
26
|
} finally {
|
|
27
27
|
r(!1);
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
[
|
|
30
|
+
[l, i]
|
|
31
31
|
);
|
|
32
|
-
return
|
|
33
|
-
|
|
32
|
+
return C ? /* @__PURE__ */ t(
|
|
33
|
+
T,
|
|
34
34
|
{
|
|
35
35
|
title: o("qus.doYouWantToDelete"),
|
|
36
36
|
okText: e.toUpperCase(),
|
|
37
37
|
cancelText: o("str.no").toUpperCase(),
|
|
38
38
|
onConfirm: p,
|
|
39
|
-
children: /* @__PURE__ */ t
|
|
40
|
-
|
|
39
|
+
children: /* @__PURE__ */ t(
|
|
40
|
+
d,
|
|
41
41
|
{
|
|
42
42
|
tooltip: e,
|
|
43
|
-
icon: /* @__PURE__ */ t
|
|
43
|
+
icon: /* @__PURE__ */ t(c, {}),
|
|
44
44
|
disabled: f,
|
|
45
45
|
loading: u,
|
|
46
46
|
type: m,
|
|
@@ -49,11 +49,11 @@ function I({
|
|
|
49
49
|
}
|
|
50
50
|
)
|
|
51
51
|
}
|
|
52
|
-
) : /* @__PURE__ */ t
|
|
53
|
-
|
|
52
|
+
) : /* @__PURE__ */ t(
|
|
53
|
+
d,
|
|
54
54
|
{
|
|
55
55
|
tooltip: e,
|
|
56
|
-
icon: /* @__PURE__ */ t
|
|
56
|
+
icon: /* @__PURE__ */ t(c, {}),
|
|
57
57
|
disabled: f,
|
|
58
58
|
loading: u,
|
|
59
59
|
type: m,
|
|
@@ -64,5 +64,5 @@ function I({
|
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
export {
|
|
67
|
-
|
|
67
|
+
P as default
|
|
68
68
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("@ant-design/icons"),r=require("react"),a=require("react-i18next"),l=require("./Button.cjs"),x=require("../../../locale/hooks/translation-constants.cjs");function p({value:t,onClick:e}){const[s,n]=r.useState(!1),{t:i}=a.useTranslation(x.TRANSLATION_NAMESPACE),c=r.useCallback(async()=>{n(!0),e(t).finally(()=>n(!1))},[e,t]);return o.jsx(l,{loading:s,type:"link",onClick:c,icon:o.jsx(u.ExportOutlined,{}),tooltip:i("str.export")})}exports.ExportButton=p;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { ExportOutlined as p } from "@ant-design/icons";
|
|
3
|
+
import { useState as s, useCallback as l } from "react";
|
|
4
|
+
import { useTranslation as a } from "react-i18next";
|
|
5
|
+
import f from "./Button.js";
|
|
6
|
+
import { TRANSLATION_NAMESPACE as c } from "../../../locale/hooks/translation-constants.js";
|
|
7
7
|
function y({
|
|
8
|
-
value:
|
|
9
|
-
onClick:
|
|
8
|
+
value: t,
|
|
9
|
+
onClick: o
|
|
10
10
|
}) {
|
|
11
|
-
const [
|
|
12
|
-
r(!0), t
|
|
13
|
-
}, [
|
|
14
|
-
return /* @__PURE__ */ n
|
|
15
|
-
|
|
11
|
+
const [i, r] = s(!1), { t: e } = a(c), m = l(async () => {
|
|
12
|
+
r(!0), o(t).finally(() => r(!1));
|
|
13
|
+
}, [o, t]);
|
|
14
|
+
return /* @__PURE__ */ n(
|
|
15
|
+
f,
|
|
16
16
|
{
|
|
17
|
-
loading:
|
|
17
|
+
loading: i,
|
|
18
18
|
type: "link",
|
|
19
|
-
onClick:
|
|
20
|
-
icon: /* @__PURE__ */ n
|
|
21
|
-
tooltip:
|
|
19
|
+
onClick: m,
|
|
20
|
+
icon: /* @__PURE__ */ n(p, {}),
|
|
21
|
+
tooltip: e("str.export")
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),C=require("@ant-design/icons"),T=require("antd"),n=require("react"),j=require("react-i18next"),g=require("../../../locale/hooks/translation-constants.cjs"),q=require("./Button.cjs");function m({shouldConfirm:p=!0,block:s,value:i,loading:c,onClick:a,text:u,disabled:l,type:d="link"}){const{t:e}=j.useTranslation(g.TRANSLATION_NAMESPACE),o=n.useMemo(()=>u??e("str.hide"),[u,e]),[f,r]=n.useState(!1);n.useEffect(()=>{r(c??!1)},[c]);const x=n.useCallback(async()=>{try{r(!0),await a(i)}finally{r(!1)}},[a,i]);return p?t.jsx(T.Popconfirm,{title:e("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:e("str.no").toUpperCase(),onConfirm:x,children:t.jsx(q,{tooltip:o,icon:t.jsx(C.DownCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:s})}):t.jsx(q,{tooltip:o,icon:t.jsx(C.DownCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:s,onClick:x})}module.exports=m;
|