@kingteza/crud-component 1.0.14 → 1.0.16

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.
Files changed (105) hide show
  1. package/dist/components/common/DatePicker/DatePicker.cjs +1 -1
  2. package/dist/components/common/DatePicker/DatePicker.js +42 -42
  3. package/dist/components/common/DatePicker/TimePicker.cjs +1 -1
  4. package/dist/components/common/DatePicker/TimePicker.js +39 -39
  5. package/dist/components/common/appearance/Hider.cjs +1 -1
  6. package/dist/components/common/appearance/Hider.js +3 -3
  7. package/dist/components/common/button/Button.cjs +1 -1
  8. package/dist/components/common/button/Button.js +19 -19
  9. package/dist/components/common/button/CloneButtonTable.cjs +1 -1
  10. package/dist/components/common/button/CloneButtonTable.js +11 -11
  11. package/dist/components/common/button/DeleteButtonTable.cjs +1 -1
  12. package/dist/components/common/button/DeleteButtonTable.js +29 -29
  13. package/dist/components/common/button/ExportButton.cjs +1 -1
  14. package/dist/components/common/button/ExportButton.js +17 -17
  15. package/dist/components/common/button/HideButtonTable.cjs +1 -1
  16. package/dist/components/common/button/HideButtonTable.js +35 -35
  17. package/dist/components/common/button/ImportButton.cjs +1 -1
  18. package/dist/components/common/button/ImportButton.js +28 -28
  19. package/dist/components/common/button/NewButton.cjs +1 -1
  20. package/dist/components/common/button/NewButton.js +14 -14
  21. package/dist/components/common/button/PrintButton.cjs +1 -1
  22. package/dist/components/common/button/PrintButton.js +14 -14
  23. package/dist/components/common/button/RefreshButton.cjs +1 -1
  24. package/dist/components/common/button/RefreshButton.js +16 -16
  25. package/dist/components/common/button/UnHideButton.cjs +1 -1
  26. package/dist/components/common/button/UnHideButton.js +37 -37
  27. package/dist/components/common/button/UpdateButtonTable.cjs +1 -1
  28. package/dist/components/common/button/UpdateButtonTable.js +11 -11
  29. package/dist/components/common/button/ViewButtonTable.cjs +1 -1
  30. package/dist/components/common/button/ViewButtonTable.js +10 -10
  31. package/dist/components/common/check-box/CheckBox.cjs +1 -1
  32. package/dist/components/common/check-box/CheckBox.js +20 -20
  33. package/dist/components/common/description/DescList.cjs +1 -1
  34. package/dist/components/common/description/DescList.js +9 -9
  35. package/dist/components/common/layout/VerticalSpace.cjs +1 -1
  36. package/dist/components/common/layout/VerticalSpace.js +3 -3
  37. package/dist/components/common/loading/LoadingIndicator.cjs +1 -1
  38. package/dist/components/common/loading/LoadingIndicator.js +12 -12
  39. package/dist/components/common/picker/ImagePicker.cjs +1 -1
  40. package/dist/components/common/picker/ImagePicker.js +173 -176
  41. package/dist/components/common/radio/RadioGroupComponent.cjs +1 -1
  42. package/dist/components/common/radio/RadioGroupComponent.js +6 -6
  43. package/dist/components/common/report/SelectFieldInReport.cjs +1 -1
  44. package/dist/components/common/report/SelectFieldInReport.js +11 -11
  45. package/dist/components/common/select/CustomSelectOption.cjs +1 -1
  46. package/dist/components/common/select/CustomSelectOption.js +7 -7
  47. package/dist/components/common/select/SelectComponent.cjs +1 -1
  48. package/dist/components/common/select/SelectComponent.js +36 -36
  49. package/dist/components/common/show-more/index.cjs +1 -1
  50. package/dist/components/common/show-more/index.js +5 -5
  51. package/dist/components/common/tab/TabViewWithRoute.cjs +1 -1
  52. package/dist/components/common/tab/TabViewWithRoute.js +23 -22
  53. package/dist/components/common/table/table.cjs +1 -1
  54. package/dist/components/common/table/table.js +12 -12
  55. package/dist/components/common/tag/StatusTag.cjs +1 -1
  56. package/dist/components/common/tag/StatusTag.js +13 -13
  57. package/dist/components/common/text-field/NumberField.cjs +1 -1
  58. package/dist/components/common/text-field/NumberField.js +43 -43
  59. package/dist/components/common/text-field/PhoneNumberField.cjs +1 -1
  60. package/dist/components/common/text-field/PhoneNumberField.js +4 -4
  61. package/dist/components/common/text-field/TextArea.cjs +1 -1
  62. package/dist/components/common/text-field/TextArea.js +20 -20
  63. package/dist/components/common/text-field/TextField.cjs +1 -1
  64. package/dist/components/common/text-field/TextField.js +47 -47
  65. package/dist/components/common/tooltip/TooltipComponent.cjs +1 -1
  66. package/dist/components/common/tooltip/TooltipComponent.js +3 -3
  67. package/dist/components/common/wizard/WizardResult.cjs +1 -1
  68. package/dist/components/common/wizard/WizardResult.js +37 -38
  69. package/dist/components/common/wizard/WizardViewForm.cjs +1 -1
  70. package/dist/components/common/wizard/WizardViewForm.js +43 -43
  71. package/dist/components/crud/CrudComponent.cjs +1 -1
  72. package/dist/components/crud/CrudComponent.js +130 -130
  73. package/dist/components/crud/CrudField.cjs +1 -1
  74. package/dist/components/crud/CrudField.js +217 -217
  75. package/dist/components/crud/CrudForm.cjs +1 -1
  76. package/dist/components/crud/CrudForm.js +55 -55
  77. package/dist/components/crud/CrudFormWizard.cjs +1 -1
  78. package/dist/components/crud/CrudFormWizard.js +82 -84
  79. package/dist/components/crud/CrudReportComponent.cjs +3 -3
  80. package/dist/components/crud/CrudReportComponent.js +123 -123
  81. package/dist/components/crud/CrudSearchComponent.cjs +1 -1
  82. package/dist/components/crud/CrudSearchComponent.js +43 -43
  83. package/dist/components/crud/FileCrudField.cjs +1 -1
  84. package/dist/components/crud/FileCrudField.js +118 -125
  85. package/dist/components/crud/ImageCrudField.cjs +1 -1
  86. package/dist/components/crud/ImageCrudField.js +56 -56
  87. package/dist/components/crud/import/CrudImportButton.cjs +1 -1
  88. package/dist/components/crud/import/CrudImportButton.js +18 -18
  89. package/dist/components/crud/import/CrudImportComponent.cjs +2 -2
  90. package/dist/components/crud/import/CrudImportComponent.js +108 -109
  91. package/dist/components/crud/view/CrudDecListView.cjs +1 -1
  92. package/dist/components/crud/view/CrudDecListView.js +22 -22
  93. package/dist/components/crud/view/CrudViewer.cjs +1 -1
  94. package/dist/components/crud/view/CrudViewer.js +152 -152
  95. package/dist/components/crud/view/CrudViewerUtil.cjs +1 -1
  96. package/dist/components/crud/view/CrudViewerUtil.js +33 -34
  97. package/dist/locale/index.cjs +1 -1
  98. package/dist/locale/index.js +2 -2
  99. package/dist/util/DateUtil.cjs +1 -1
  100. package/dist/util/DateUtil.js +4 -4
  101. package/dist/util/ImageUtil.cjs +1 -1
  102. package/dist/util/ImageUtil.js +1 -1
  103. package/dist/util/ValidationUtil.cjs +1 -1
  104. package/dist/util/ValidationUtil.js +1 -1
  105. package/package.json +1 -1
@@ -1,68 +1,68 @@
1
- import { j as o } from "../../../_virtual/jsx-runtime.js";
2
- import { Popconfirm as j } from "antd";
3
- import { useMemo as C, useState as T, useEffect as g, useCallback as A } from "react";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { DownCircleOutlined as p } 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 { useTranslation as k } from "react-i18next";
4
6
  import { TRANSLATION_NAMESPACE as E } from "../../../locale/hooks/translation-constants.js";
5
- import c from "./Button.js";
6
- import { useTranslation as _ } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
7
- import x from "../../../node_modules/@ant-design/icons/es/icons/DownCircleOutlined.js";
8
- function H({
9
- shouldConfirm: d = !0,
7
+ import d from "./Button.js";
8
+ function M({
9
+ shouldConfirm: C = !0,
10
10
  block: n,
11
11
  value: i,
12
- loading: s,
13
- onClick: a,
14
- text: f,
15
- disabled: m,
16
- type: l = "link"
12
+ loading: a,
13
+ onClick: s,
14
+ text: l,
15
+ disabled: f,
16
+ type: m = "link"
17
17
  }) {
18
- const { t } = _(E), r = C(() => f ?? t("str.hide"), [f, t]), [u, e] = T(!1);
19
- g(() => {
20
- e(s ?? !1);
21
- }, [s]);
22
- const p = A(
18
+ const { t } = k(E), r = g(() => l ?? t("str.hide"), [l, t]), [u, e] = x(!1);
19
+ A(() => {
20
+ e(a ?? !1);
21
+ }, [a]);
22
+ const c = _(
23
23
  async () => {
24
24
  try {
25
- e(!0), await a(i);
25
+ e(!0), await s(i);
26
26
  } finally {
27
27
  e(!1);
28
28
  }
29
29
  },
30
- [a, i]
30
+ [s, i]
31
31
  );
32
- return d ? /* @__PURE__ */ o.jsx(
33
- j,
32
+ return C ? /* @__PURE__ */ o(
33
+ T,
34
34
  {
35
35
  title: t("qus.doYouWantToHide"),
36
36
  okText: r.toUpperCase(),
37
37
  cancelText: t("str.no").toUpperCase(),
38
- onConfirm: p,
39
- children: /* @__PURE__ */ o.jsx(
40
- c,
38
+ onConfirm: c,
39
+ children: /* @__PURE__ */ o(
40
+ d,
41
41
  {
42
42
  tooltip: r,
43
- icon: /* @__PURE__ */ o.jsx(x, {}),
44
- disabled: m,
43
+ icon: /* @__PURE__ */ o(p, {}),
44
+ disabled: f,
45
45
  loading: u,
46
- type: l,
46
+ type: m,
47
47
  danger: !0,
48
48
  block: n
49
49
  }
50
50
  )
51
51
  }
52
- ) : /* @__PURE__ */ o.jsx(
53
- c,
52
+ ) : /* @__PURE__ */ o(
53
+ d,
54
54
  {
55
55
  tooltip: r,
56
- icon: /* @__PURE__ */ o.jsx(x, {}),
57
- disabled: m,
56
+ icon: /* @__PURE__ */ o(p, {}),
57
+ disabled: f,
58
58
  loading: u,
59
- type: l,
59
+ type: m,
60
60
  danger: !0,
61
61
  block: n,
62
- onClick: p
62
+ onClick: c
63
63
  }
64
64
  );
65
65
  }
66
66
  export {
67
- H as default
67
+ M as default
68
68
  };
@@ -1 +1 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),k=require("@ant-design/icons"),n=require("react"),q=require("react-i18next"),x=require("../../../locale/hooks/translation-constants.cjs"),C=require("./Button.cjs");function S({onClick:o,children:c,accept:u,className:a,disabled:l,type:f="link"}){const[d,i]=n.useState(!1),{t:p}=q.useTranslation(x.TRANSLATION_NAMESPACE),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:a,children:[s.jsx("input",{type:"file",style:{display:"none"},ref:e,onChange:j,accept:u},g),s.jsx(C,{loading:d,type:f,disabled:l,onClick:y,icon:s.jsx(k.ImportOutlined,{}),tooltip:p("str.import"),children:c})]})}exports.ImportButton=S;
@@ -1,56 +1,56 @@
1
- import { j as n } from "../../../_virtual/jsx-runtime.js";
2
- import { useState as r, useRef as k, useCallback as c } from "react";
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
- import h from "../../../node_modules/@ant-design/icons/es/icons/ImportOutlined.js";
7
- function L({
1
+ import { jsxs as A, jsx as n } from "react/jsx-runtime";
2
+ import { ImportOutlined as T } from "@ant-design/icons";
3
+ import { useState as s, useRef as h, useCallback as l } from "react";
4
+ import { useTranslation as x } from "react-i18next";
5
+ import { TRANSLATION_NAMESPACE as N } from "../../../locale/hooks/translation-constants.js";
6
+ import S from "./Button.js";
7
+ function _({
8
8
  onClick: e,
9
- children: l,
10
- accept: a,
11
- className: m,
9
+ children: c,
10
+ accept: m,
11
+ className: a,
12
12
  disabled: f,
13
13
  type: p = "link"
14
14
  }) {
15
- const [u, s] = r(!1), { t: x } = T(C), o = k(null), j = c(() => {
16
- d((t) => t + 1), o.current && setTimeout(() => {
15
+ const [u, i] = s(!1), { t: d } = x(N), o = h(null), y = l(() => {
16
+ k((t) => t + 1), o.current && setTimeout(() => {
17
17
  var t;
18
18
  (t = o == null ? void 0 : o.current) == null || t.click();
19
19
  }, 10);
20
- }, []), [y, d] = r(0), g = c(
20
+ }, []), [g, k] = s(0), C = l(
21
21
  async (t) => {
22
- s(!0);
23
- const i = t.target.files[0];
24
- i && await e(i), s(!1);
22
+ i(!0);
23
+ const r = t.target.files[0];
24
+ r && await e(r), i(!1);
25
25
  },
26
26
  [e]
27
27
  );
28
- return /* @__PURE__ */ n.jsxs("div", { className: m, children: [
29
- /* @__PURE__ */ n.jsx(
28
+ return /* @__PURE__ */ A("div", { className: a, children: [
29
+ /* @__PURE__ */ n(
30
30
  "input",
31
31
  {
32
32
  type: "file",
33
33
  style: { display: "none" },
34
34
  ref: o,
35
- onChange: g,
36
- accept: a
35
+ onChange: C,
36
+ accept: m
37
37
  },
38
- y
38
+ g
39
39
  ),
40
- /* @__PURE__ */ n.jsx(
41
- A,
40
+ /* @__PURE__ */ n(
41
+ S,
42
42
  {
43
43
  loading: u,
44
44
  type: p,
45
45
  disabled: f,
46
- onClick: j,
47
- icon: /* @__PURE__ */ n.jsx(h, {}),
48
- tooltip: x("str.import"),
49
- children: l
46
+ onClick: y,
47
+ icon: /* @__PURE__ */ n(T, {}),
48
+ tooltip: d("str.import"),
49
+ children: c
50
50
  }
51
51
  )
52
52
  ] });
53
53
  }
54
54
  export {
55
- L as ImportButton
55
+ _ as ImportButton
56
56
  };
@@ -1 +1 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("@ant-design/icons"),l=require("react-i18next"),q=require("./Button.cjs"),N=require("../../../locale/hooks/translation-constants.cjs"),d=({size:n,block:r,className:s,type:o="primary",onClick:t,title:u,to:i})=>{const{t:c}=l.useTranslation(N.TRANSLATION_NAMESPACE);return e.jsx(q,{type:o,className:s,to:i,block:r,size:n,onClick:t&&(()=>t(!0)),icon:e.jsx(a.PlusOutlined,{}),children:u??c("str.new")})};exports.NewButton=d;
@@ -1,24 +1,24 @@
1
- import { j as r } from "../../../_virtual/jsx-runtime.js";
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
- import x from "../../../node_modules/@ant-design/icons/es/icons/PlusOutlined.js";
6
- const R = ({ size: t, block: n, className: m, type: e = "primary", onClick: o, title: i, to: s }) => {
7
- const { t: p } = c(u);
8
- return /* @__PURE__ */ r.jsx(
9
- f,
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { PlusOutlined as u } from "@ant-design/icons";
3
+ import { useTranslation as f } from "react-i18next";
4
+ import c from "./Button.js";
5
+ import { TRANSLATION_NAMESPACE as l } from "../../../locale/hooks/translation-constants.js";
6
+ const w = ({ size: t, block: n, className: m, type: i = "primary", onClick: o, title: e, to: p }) => {
7
+ const { t: s } = f(l);
8
+ return /* @__PURE__ */ r(
9
+ c,
10
10
  {
11
- type: e,
11
+ type: i,
12
12
  className: m,
13
- to: s,
13
+ to: p,
14
14
  block: n,
15
15
  size: t,
16
16
  onClick: o && (() => o(!0)),
17
- icon: /* @__PURE__ */ r.jsx(x, {}),
18
- children: i ?? p("str.new")
17
+ icon: /* @__PURE__ */ r(u, {}),
18
+ children: e ?? s("str.new")
19
19
  }
20
20
  );
21
21
  };
22
22
  export {
23
- R as NewButton
23
+ w as NewButton
24
24
  };
@@ -1 +1 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("@ant-design/icons"),q=require("react-i18next"),P=require("./Button.cjs"),d=require("../../../locale/hooks/translation-constants.cjs"),j=({disabled:e,loading:i,block:o,className:s,type:u="primary",onClick:c,title:a,to:l})=>{const{t:n}=q.useTranslation(d.TRANSLATION_NAMESPACE),t=a??n("str.print");return r.jsx(P,{type:u,className:s,to:l,loading:i,disabled:e,block:o,onClick:c,tooltip:t!=null&&t.trim()?"":n("str.print"),icon:r.jsx(p.PrinterOutlined,{}),children:t})};exports.PrintButton=j;
@@ -1,12 +1,12 @@
1
- import { j as r } from "../../../_virtual/jsx-runtime.js";
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
- 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 } = a(x), t = e ?? o("str.print");
8
- return /* @__PURE__ */ r.jsx(
9
- u,
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { PrinterOutlined as u } from "@ant-design/icons";
3
+ import { useTranslation as A } from "react-i18next";
4
+ import a from "./Button.js";
5
+ import { TRANSLATION_NAMESPACE as l } from "../../../locale/hooks/translation-constants.js";
6
+ const B = ({ disabled: n, loading: i, block: m, className: p, type: s = "primary", onClick: e, title: c, to: f }) => {
7
+ const { t } = A(l), r = c ?? t("str.print");
8
+ return /* @__PURE__ */ o(
9
+ a,
10
10
  {
11
11
  type: s,
12
12
  className: p,
@@ -14,13 +14,13 @@ const l = ({ disabled: n, loading: i, block: m, className: p, type: s = "primary
14
14
  loading: i,
15
15
  disabled: n,
16
16
  block: m,
17
- onClick: c,
18
- tooltip: t != null && t.trim() ? "" : o("str.print"),
19
- icon: /* @__PURE__ */ r.jsx(j, {}),
20
- children: t
17
+ onClick: e,
18
+ tooltip: r != null && r.trim() ? "" : t("str.print"),
19
+ icon: /* @__PURE__ */ o(u, {}),
20
+ children: r
21
21
  }
22
22
  );
23
23
  };
24
24
  export {
25
- l as PrintButton
25
+ B as PrintButton
26
26
  };
@@ -1 +1 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("@ant-design/icons"),l=require("react-i18next"),d=require("../../../locale/hooks/translation-constants.cjs"),q=require("./Button.cjs"),R=({disabled:r,block:n,className:s,type:o="primary",onClick:e,title:i,to:u})=>{const{t:c}=l.useTranslation(d.TRANSLATION_NAMESPACE);return t.jsx(q,{type:o,disabled:r,className:s,to:u,block:n,onClick:e&&(()=>e(!0)),icon:t.jsx(a.ReloadOutlined,{}),children:i??c("str.refresh")})};exports.RefreshButton=R;
@@ -1,24 +1,24 @@
1
- import { j as o } from "../../../_virtual/jsx-runtime.js";
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
- 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 } = c(f);
8
- return /* @__PURE__ */ o.jsx(
9
- u,
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { ReloadOutlined as f } from "@ant-design/icons";
3
+ import { useTranslation as u } from "react-i18next";
4
+ import { TRANSLATION_NAMESPACE as a } from "../../../locale/hooks/translation-constants.js";
5
+ import c from "./Button.js";
6
+ const R = ({ disabled: t, block: e, className: m, type: n = "primary", onClick: r, title: i, to: p }) => {
7
+ const { t: s } = u(a);
8
+ return /* @__PURE__ */ o(
9
+ c,
10
10
  {
11
- type: e,
11
+ type: n,
12
12
  disabled: t,
13
- className: n,
14
- to: i,
15
- block: m,
13
+ className: m,
14
+ to: p,
15
+ block: e,
16
16
  onClick: r && (() => r(!0)),
17
- icon: /* @__PURE__ */ o.jsx(x, {}),
18
- children: s ?? p("str.refresh")
17
+ icon: /* @__PURE__ */ o(f, {}),
18
+ children: i ?? s("str.refresh")
19
19
  }
20
20
  );
21
21
  };
22
22
  export {
23
- E as RefreshButton
23
+ R as RefreshButton
24
24
  };
@@ -1 +1 @@
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
+ "use strict";const t=require("react/jsx-runtime"),p=require("@ant-design/icons"),T=require("antd"),n=require("react"),g=require("react-i18next"),C=require("./Button.cjs"),U=require("../../../locale/hooks/translation-constants.cjs");function m({shouldConfirm:q=!0,block:s,value:i,loading:c,onClick:u,text:a,disabled:l,type:d="link",hidden:j}){const{t:e}=g.useTranslation(U.TRANSLATION_NAMESPACE),o=n.useMemo(()=>a??e("str.unhide"),[a,e]),[f,r]=n.useState(!1);n.useEffect(()=>{r(c??!1)},[c]);const x=n.useCallback(async()=>{try{r(!0),await u(i)}finally{r(!1)}},[u,i]);return q?t.jsx(T.Popconfirm,{title:e("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:e("str.no").toUpperCase(),onConfirm:x,children:t.jsx(C,{tooltip:o,icon:t.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,hidden:j,block:s})}):t.jsx(C,{tooltip:o,icon:t.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:s,onClick:x})}module.exports=m;
@@ -1,64 +1,64 @@
1
- import { j as o } from "../../../_virtual/jsx-runtime.js";
2
- import { Popconfirm as C } from "antd";
3
- import { useMemo as T, useState as g, useEffect as A, useCallback as E } from "react";
4
- import c from "./Button.js";
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";
7
- import x from "../../../node_modules/@ant-design/icons/es/icons/UpCircleOutlined.js";
8
- function H({
9
- shouldConfirm: d = !0,
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { UpCircleOutlined as c } from "@ant-design/icons";
3
+ import { Popconfirm as g } from "antd";
4
+ import { useMemo as x, useState as A, useEffect as U, useCallback as _ } from "react";
5
+ import { useTranslation as k } from "react-i18next";
6
+ import d from "./Button.js";
7
+ import { TRANSLATION_NAMESPACE as E } from "../../../locale/hooks/translation-constants.js";
8
+ function O({
9
+ shouldConfirm: C = !0,
10
10
  block: e,
11
11
  value: i,
12
- loading: s,
13
- onClick: a,
12
+ loading: a,
13
+ onClick: s,
14
14
  text: f,
15
- disabled: m,
16
- type: u = "link",
17
- hidden: j
15
+ disabled: l,
16
+ type: m = "link",
17
+ hidden: T
18
18
  }) {
19
- const { t } = k(_), n = T(() => f ?? t("str.unhide"), [f, t]), [l, r] = g(!1);
20
- A(() => {
21
- r(s ?? !1);
22
- }, [s]);
23
- const p = E(
19
+ const { t } = k(E), n = x(() => f ?? t("str.unhide"), [f, t]), [u, r] = A(!1);
20
+ U(() => {
21
+ r(a ?? !1);
22
+ }, [a]);
23
+ const p = _(
24
24
  async () => {
25
25
  try {
26
- r(!0), await a(i);
26
+ r(!0), await s(i);
27
27
  } finally {
28
28
  r(!1);
29
29
  }
30
30
  },
31
- [a, i]
31
+ [s, i]
32
32
  );
33
- return d ? /* @__PURE__ */ o.jsx(
34
- C,
33
+ return C ? /* @__PURE__ */ o(
34
+ g,
35
35
  {
36
36
  title: t("qus.doYouWantToHide"),
37
37
  okText: n.toUpperCase(),
38
38
  cancelText: t("str.no").toUpperCase(),
39
39
  onConfirm: p,
40
- children: /* @__PURE__ */ o.jsx(
41
- c,
40
+ children: /* @__PURE__ */ o(
41
+ d,
42
42
  {
43
43
  tooltip: n,
44
- icon: /* @__PURE__ */ o.jsx(x, {}),
45
- disabled: m,
46
- loading: l,
47
- type: u,
44
+ icon: /* @__PURE__ */ o(c, {}),
45
+ disabled: l,
46
+ loading: u,
47
+ type: m,
48
48
  danger: !0,
49
- hidden: j,
49
+ hidden: T,
50
50
  block: e
51
51
  }
52
52
  )
53
53
  }
54
- ) : /* @__PURE__ */ o.jsx(
55
- c,
54
+ ) : /* @__PURE__ */ o(
55
+ d,
56
56
  {
57
57
  tooltip: n,
58
- icon: /* @__PURE__ */ o.jsx(x, {}),
59
- disabled: m,
60
- loading: l,
61
- type: u,
58
+ icon: /* @__PURE__ */ o(c, {}),
59
+ disabled: l,
60
+ loading: u,
61
+ type: m,
62
62
  danger: !0,
63
63
  block: e,
64
64
  onClick: p
@@ -66,5 +66,5 @@ function H({
66
66
  );
67
67
  }
68
68
  export {
69
- H as default
69
+ O as default
70
70
  };
@@ -1 +1 @@
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
+ "use strict";const t=require("react/jsx-runtime"),o=require("@ant-design/icons"),r=require("react-i18next"),i=require("./Button.cjs"),u=require("../../../locale/hooks/translation-constants.cjs");function c({value:n,onClick:e}){const{t:s}=r.useTranslation(u.TRANSLATION_NAMESPACE);return t.jsx(i,{tooltip:s("str.update"),type:"link",onClick:()=>e(n),icon:t.jsx(o.EditOutlined,{})})}module.exports=c;
@@ -1,20 +1,20 @@
1
- import { j as t } from "../../../_virtual/jsx-runtime.js";
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
- import e from "../../../node_modules/@ant-design/icons/es/icons/EditOutlined.js";
6
- function c({ value: o, onClick: r }) {
7
- const { t: n } = p(m);
8
- return /* @__PURE__ */ t.jsx(
9
- i,
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { EditOutlined as i } from "@ant-design/icons";
3
+ import { useTranslation as m } from "react-i18next";
4
+ import p from "./Button.js";
5
+ import { TRANSLATION_NAMESPACE as e } from "../../../locale/hooks/translation-constants.js";
6
+ function d({ value: o, onClick: r }) {
7
+ const { t: n } = m(e);
8
+ return /* @__PURE__ */ t(
9
+ p,
10
10
  {
11
11
  tooltip: n("str.update"),
12
12
  type: "link",
13
13
  onClick: () => r(o),
14
- icon: /* @__PURE__ */ t.jsx(e, {})
14
+ icon: /* @__PURE__ */ t(i, {})
15
15
  }
16
16
  );
17
17
  }
18
18
  export {
19
- c as default
19
+ d as default
20
20
  };
@@ -1 +1 @@
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
+ "use strict";const t=require("react/jsx-runtime"),i=require("@ant-design/icons"),o=require("react-i18next"),r=require("./Button.cjs"),u=require("../../../locale/hooks/translation-constants.cjs");function c({value:n,onClick:e}){const{t:s}=o.useTranslation(u.TRANSLATION_NAMESPACE);return t.jsx(r,{type:"link",onClick:()=>e(n),icon:t.jsx(i.EyeOutlined,{}),tooltip:s("str.view")})}module.exports=c;
@@ -1,17 +1,17 @@
1
- import { j as o } from "../../../_virtual/jsx-runtime.js";
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
- import p from "../../../node_modules/@ant-design/icons/es/icons/EyeOutlined.js";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { EyeOutlined as n } from "@ant-design/icons";
3
+ import { useTranslation as e } from "react-i18next";
4
+ import m from "./Button.js";
5
+ import { TRANSLATION_NAMESPACE as p } from "../../../locale/hooks/translation-constants.js";
6
6
  function c({ value: t, onClick: r }) {
7
- const { t: n } = e(m);
8
- return /* @__PURE__ */ o.jsx(
9
- i,
7
+ const { t: i } = e(p);
8
+ return /* @__PURE__ */ o(
9
+ m,
10
10
  {
11
11
  type: "link",
12
12
  onClick: () => r(t),
13
- icon: /* @__PURE__ */ o.jsx(p, {}),
14
- tooltip: n("str.view")
13
+ icon: /* @__PURE__ */ o(n, {}),
14
+ tooltip: i("str.view")
15
15
  }
16
16
  );
17
17
  }
@@ -1 +1 @@
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
+ "use strict";const r=require("react/jsx-runtime"),s=require("antd"),m=s.Form.Item,x=({onChange:e,label:d,initialValue:c=!1,disabled:n,switch:t=!1,...h})=>r.jsxs(m,{...h,valuePropName:"checked",initialValue:c,label:t?d:void 0,children:[!!t&&r.jsx(s.Switch,{disabled:n,defaultChecked:c,onChange:e&&(o=>e(o))}),!t&&r.jsx(s.Checkbox,{disabled:n,defaultChecked:c,onChange:e&&(o=>e(o.target.checked)),children:d})]});module.exports=x;
@@ -1,40 +1,40 @@
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 = ({
1
+ import { jsxs as h, jsx as d } from "react/jsx-runtime";
2
+ import { Form as k, Switch as s, Checkbox as p } from "antd";
3
+ const x = k.Item, C = ({
4
4
  onChange: e,
5
- label: m,
5
+ label: t,
6
6
  initialValue: o = !1,
7
- disabled: s,
7
+ disabled: m,
8
8
  switch: r = !1,
9
- ...d
10
- }) => /* @__PURE__ */ c.jsxs(
11
- k,
9
+ ...f
10
+ }) => /* @__PURE__ */ h(
11
+ x,
12
12
  {
13
- ...d,
13
+ ...f,
14
14
  valuePropName: "checked",
15
15
  initialValue: o,
16
- label: r ? m : void 0,
16
+ label: r ? t : void 0,
17
17
  children: [
18
- !!r && /* @__PURE__ */ c.jsx(
19
- f,
18
+ !!r && /* @__PURE__ */ d(
19
+ s,
20
20
  {
21
- disabled: s,
21
+ disabled: m,
22
22
  defaultChecked: o,
23
- onChange: e && ((t) => e(t))
23
+ onChange: e && ((c) => e(c))
24
24
  }
25
25
  ),
26
- !r && /* @__PURE__ */ c.jsx(
27
- h,
26
+ !r && /* @__PURE__ */ d(
27
+ p,
28
28
  {
29
- disabled: s,
29
+ disabled: m,
30
30
  defaultChecked: o,
31
- onChange: e && ((t) => e(t.target.checked)),
32
- children: m
31
+ onChange: e && ((c) => e(c.target.checked)),
32
+ children: t
33
33
  }
34
34
  )
35
35
  ]
36
36
  }
37
37
  );
38
38
  export {
39
- n as default
39
+ C as default
40
40
  };
@@ -1 +1 @@
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
+ "use strict";const n=require("react/jsx-runtime"),o=require("antd"),u=require("react"),a=require("../../../util/NumberUtil.cjs"),l=o.Descriptions.Item,m=({list:r,keepEmptyValues:s,...i})=>{const c=u.useMemo(()=>{const t=s?r:r.filter(e=>e&&!!e.value);return t.forEach(e=>{!e.noFormatting&&!isNaN(e.value)&&(e.value=a.default.toMoney(e.value))}),t},[s,r]);return n.jsx(o.Descriptions,{...i,children:c.map(({label:t,value:e})=>n.jsx(l,{label:t,children:e},t))})};module.exports=m;