@kingteza/crud-component 1.0.23 → 1.0.24

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 (203) hide show
  1. package/package.json +19 -19
  2. package/dist/App.d.ts +0 -2
  3. package/dist/components/common/DatePicker/DatePicker.cjs +0 -1
  4. package/dist/components/common/DatePicker/DatePicker.d.ts +0 -37
  5. package/dist/components/common/DatePicker/DatePicker.js +0 -88
  6. package/dist/components/common/DatePicker/TimePicker.cjs +0 -1
  7. package/dist/components/common/DatePicker/TimePicker.d.ts +0 -34
  8. package/dist/components/common/DatePicker/TimePicker.js +0 -78
  9. package/dist/components/common/DatePicker/index.d.ts +0 -3
  10. package/dist/components/common/appearance/Hider.cjs +0 -1
  11. package/dist/components/common/appearance/Hider.d.ts +0 -6
  12. package/dist/components/common/appearance/Hider.js +0 -5
  13. package/dist/components/common/appearance/index.d.ts +0 -0
  14. package/dist/components/common/button/Button.cjs +0 -1
  15. package/dist/components/common/button/Button.d.ts +0 -12
  16. package/dist/components/common/button/Button.js +0 -79
  17. package/dist/components/common/button/CloneButtonTable.cjs +0 -1
  18. package/dist/components/common/button/CloneButtonTable.d.ts +0 -6
  19. package/dist/components/common/button/CloneButtonTable.js +0 -20
  20. package/dist/components/common/button/DeleteButtonTable.cjs +0 -1
  21. package/dist/components/common/button/DeleteButtonTable.d.ts +0 -13
  22. package/dist/components/common/button/DeleteButtonTable.js +0 -68
  23. package/dist/components/common/button/ExportButton.cjs +0 -1
  24. package/dist/components/common/button/ExportButton.d.ts +0 -4
  25. package/dist/components/common/button/ExportButton.js +0 -27
  26. package/dist/components/common/button/HideButtonTable.cjs +0 -1
  27. package/dist/components/common/button/HideButtonTable.d.ts +0 -13
  28. package/dist/components/common/button/HideButtonTable.js +0 -68
  29. package/dist/components/common/button/ImportButton.cjs +0 -1
  30. package/dist/components/common/button/ImportButton.d.ts +0 -9
  31. package/dist/components/common/button/ImportButton.js +0 -56
  32. package/dist/components/common/button/NewButton.cjs +0 -1
  33. package/dist/components/common/button/NewButton.d.ts +0 -12
  34. package/dist/components/common/button/NewButton.js +0 -24
  35. package/dist/components/common/button/PrintButton.cjs +0 -1
  36. package/dist/components/common/button/PrintButton.d.ts +0 -12
  37. package/dist/components/common/button/PrintButton.js +0 -26
  38. package/dist/components/common/button/RefreshButton.cjs +0 -1
  39. package/dist/components/common/button/RefreshButton.d.ts +0 -11
  40. package/dist/components/common/button/RefreshButton.js +0 -24
  41. package/dist/components/common/button/UnHideButton.cjs +0 -1
  42. package/dist/components/common/button/UnHideButton.d.ts +0 -14
  43. package/dist/components/common/button/UnHideButton.js +0 -70
  44. package/dist/components/common/button/UpdateButtonTable.cjs +0 -1
  45. package/dist/components/common/button/UpdateButtonTable.d.ts +0 -6
  46. package/dist/components/common/button/UpdateButtonTable.js +0 -20
  47. package/dist/components/common/button/ViewButtonTable.cjs +0 -1
  48. package/dist/components/common/button/ViewButtonTable.d.ts +0 -6
  49. package/dist/components/common/button/ViewButtonTable.js +0 -20
  50. package/dist/components/common/button/index.d.ts +0 -14
  51. package/dist/components/common/check-box/CheckBox.cjs +0 -1
  52. package/dist/components/common/check-box/CheckBox.d.ts +0 -9
  53. package/dist/components/common/check-box/CheckBox.js +0 -40
  54. package/dist/components/common/check-box/index.d.ts +0 -2
  55. package/dist/components/common/description/DescList.cjs +0 -1
  56. package/dist/components/common/description/DescList.d.ts +0 -18
  57. package/dist/components/common/description/DescList.js +0 -16
  58. package/dist/components/common/description/DescriptionComponent.d.ts +0 -7
  59. package/dist/components/common/description/index.d.ts +0 -3
  60. package/dist/components/common/index.d.ts +0 -22
  61. package/dist/components/common/layout/VerticalSpace.cjs +0 -1
  62. package/dist/components/common/layout/VerticalSpace.d.ts +0 -5
  63. package/dist/components/common/layout/VerticalSpace.js +0 -6
  64. package/dist/components/common/layout/index.d.ts +0 -2
  65. package/dist/components/common/loading/LoadingIndicator.cjs +0 -1
  66. package/dist/components/common/loading/LoadingIndicator.d.ts +0 -6
  67. package/dist/components/common/loading/LoadingIndicator.js +0 -24
  68. package/dist/components/common/loading/index.d.ts +0 -2
  69. package/dist/components/common/picker/ImagePicker.cjs +0 -1
  70. package/dist/components/common/picker/ImagePicker.d.ts +0 -56
  71. package/dist/components/common/picker/ImagePicker.js +0 -282
  72. package/dist/components/common/picker/index.d.ts +0 -2
  73. package/dist/components/common/radio/RadioGroupComponent.cjs +0 -1
  74. package/dist/components/common/radio/RadioGroupComponent.d.ts +0 -18
  75. package/dist/components/common/radio/RadioGroupComponent.js +0 -19
  76. package/dist/components/common/radio/index.d.ts +0 -2
  77. package/dist/components/common/report/SelectFieldInReport.cjs +0 -1
  78. package/dist/components/common/report/SelectFieldInReport.d.ts +0 -16
  79. package/dist/components/common/report/SelectFieldInReport.js +0 -30
  80. package/dist/components/common/report/index.d.ts +0 -3
  81. package/dist/components/common/select/CustomSelectOption.cjs +0 -1
  82. package/dist/components/common/select/CustomSelectOption.d.ts +0 -7
  83. package/dist/components/common/select/CustomSelectOption.js +0 -13
  84. package/dist/components/common/select/SelectComponent.cjs +0 -1
  85. package/dist/components/common/select/SelectComponent.d.ts +0 -21
  86. package/dist/components/common/select/SelectComponent.js +0 -89
  87. package/dist/components/common/select/index.d.ts +0 -3
  88. package/dist/components/common/show-more/index.cjs +0 -1
  89. package/dist/components/common/show-more/index.d.ts +0 -4
  90. package/dist/components/common/show-more/index.js +0 -8
  91. package/dist/components/common/tab/TabViewWithRoute.cjs +0 -1
  92. package/dist/components/common/tab/TabViewWithRoute.d.ts +0 -13
  93. package/dist/components/common/tab/TabViewWithRoute.js +0 -38
  94. package/dist/components/common/tab/index.d.ts +0 -2
  95. package/dist/components/common/table/index.d.ts +0 -3
  96. package/dist/components/common/table/table.cjs +0 -1
  97. package/dist/components/common/table/table.d.ts +0 -19
  98. package/dist/components/common/table/table.js +0 -40
  99. package/dist/components/common/tag/StatusTag.cjs +0 -1
  100. package/dist/components/common/tag/StatusTag.d.ts +0 -14
  101. package/dist/components/common/tag/StatusTag.js +0 -30
  102. package/dist/components/common/tag/index.d.ts +0 -2
  103. package/dist/components/common/text/index.cjs +0 -1
  104. package/dist/components/common/text/index.d.ts +0 -3
  105. package/dist/components/common/text/index.js +0 -5
  106. package/dist/components/common/text/title/TitleWithHeadTitle.d.ts +0 -7
  107. package/dist/components/common/text/title/index.cjs +0 -1
  108. package/dist/components/common/text/title/index.d.ts +0 -1
  109. package/dist/components/common/text/title/index.js +0 -5
  110. package/dist/components/common/text-field/NumberField.cjs +0 -1
  111. package/dist/components/common/text-field/NumberField.d.ts +0 -13
  112. package/dist/components/common/text-field/NumberField.js +0 -83
  113. package/dist/components/common/text-field/PhoneNumberField.cjs +0 -1
  114. package/dist/components/common/text-field/PhoneNumberField.d.ts +0 -4
  115. package/dist/components/common/text-field/PhoneNumberField.js +0 -18
  116. package/dist/components/common/text-field/TextArea.cjs +0 -1
  117. package/dist/components/common/text-field/TextArea.d.ts +0 -17
  118. package/dist/components/common/text-field/TextArea.js +0 -47
  119. package/dist/components/common/text-field/TextField.cjs +0 -1
  120. package/dist/components/common/text-field/TextField.d.ts +0 -27
  121. package/dist/components/common/text-field/TextField.js +0 -73
  122. package/dist/components/common/text-field/index.d.ts +0 -5
  123. package/dist/components/common/tooltip/TooltipComponent.cjs +0 -1
  124. package/dist/components/common/tooltip/TooltipComponent.d.ts +0 -5
  125. package/dist/components/common/tooltip/TooltipComponent.js +0 -9
  126. package/dist/components/common/tooltip/index.d.ts +0 -2
  127. package/dist/components/common/wizard/WizardResult.cjs +0 -1
  128. package/dist/components/common/wizard/WizardResult.d.ts +0 -16
  129. package/dist/components/common/wizard/WizardResult.js +0 -60
  130. package/dist/components/common/wizard/WizardViewForm.cjs +0 -1
  131. package/dist/components/common/wizard/WizardViewForm.d.ts +0 -24
  132. package/dist/components/common/wizard/WizardViewForm.js +0 -74
  133. package/dist/components/common/wizard/index.d.ts +0 -3
  134. package/dist/components/crud/CrudComponent.cjs +0 -1
  135. package/dist/components/crud/CrudComponent.d.ts +0 -237
  136. package/dist/components/crud/CrudComponent.js +0 -210
  137. package/dist/components/crud/CrudField.cjs +0 -1
  138. package/dist/components/crud/CrudField.d.ts +0 -4
  139. package/dist/components/crud/CrudField.js +0 -459
  140. package/dist/components/crud/CrudForm.cjs +0 -1
  141. package/dist/components/crud/CrudForm.d.ts +0 -14
  142. package/dist/components/crud/CrudForm.js +0 -91
  143. package/dist/components/crud/CrudFormWizard.cjs +0 -1
  144. package/dist/components/crud/CrudFormWizard.d.ts +0 -14
  145. package/dist/components/crud/CrudFormWizard.js +0 -140
  146. package/dist/components/crud/CrudReportComponent.cjs +0 -4
  147. package/dist/components/crud/CrudReportComponent.d.ts +0 -44
  148. package/dist/components/crud/CrudReportComponent.js +0 -255
  149. package/dist/components/crud/CrudSearchComponent.cjs +0 -1
  150. package/dist/components/crud/CrudSearchComponent.d.ts +0 -21
  151. package/dist/components/crud/CrudSearchComponent.js +0 -95
  152. package/dist/components/crud/FileCrudField.cjs +0 -1
  153. package/dist/components/crud/FileCrudField.d.ts +0 -25
  154. package/dist/components/crud/FileCrudField.js +0 -220
  155. package/dist/components/crud/ImageCrudField.cjs +0 -1
  156. package/dist/components/crud/ImageCrudField.d.ts +0 -38
  157. package/dist/components/crud/ImageCrudField.js +0 -113
  158. package/dist/components/crud/import/CrudImportButton.cjs +0 -1
  159. package/dist/components/crud/import/CrudImportButton.d.ts +0 -3
  160. package/dist/components/crud/import/CrudImportButton.js +0 -31
  161. package/dist/components/crud/import/CrudImportComponent.cjs +0 -2
  162. package/dist/components/crud/import/CrudImportComponent.d.ts +0 -14
  163. package/dist/components/crud/import/CrudImportComponent.js +0 -223
  164. package/dist/components/crud/index.d.ts +0 -15
  165. package/dist/components/crud/view/CrudDecListView.cjs +0 -1
  166. package/dist/components/crud/view/CrudDecListView.d.ts +0 -14
  167. package/dist/components/crud/view/CrudDecListView.js +0 -42
  168. package/dist/components/crud/view/CrudViewer.cjs +0 -1
  169. package/dist/components/crud/view/CrudViewer.d.ts +0 -43
  170. package/dist/components/crud/view/CrudViewer.js +0 -217
  171. package/dist/components/crud/view/CrudViewerUtil.cjs +0 -1
  172. package/dist/components/crud/view/CrudViewerUtil.d.ts +0 -2
  173. package/dist/components/crud/view/CrudViewerUtil.js +0 -57
  174. package/dist/components/crud/view/index.d.ts +0 -5
  175. package/dist/index.cjs +0 -1
  176. package/dist/index.d.ts +0 -4
  177. package/dist/index.js +0 -32
  178. package/dist/locale/hooks/translation-constants.cjs +0 -1
  179. package/dist/locale/hooks/translation-constants.d.ts +0 -1
  180. package/dist/locale/hooks/translation-constants.js +0 -4
  181. package/dist/locale/index.cjs +0 -1
  182. package/dist/locale/index.d.ts +0 -74
  183. package/dist/locale/index.js +0 -37
  184. package/dist/locale/translations/en.cjs +0 -1
  185. package/dist/locale/translations/en.d.ts +0 -58
  186. package/dist/locale/translations/en.js +0 -60
  187. package/dist/main.d.ts +0 -0
  188. package/dist/util/DateUtil.cjs +0 -1
  189. package/dist/util/DateUtil.d.ts +0 -7
  190. package/dist/util/DateUtil.js +0 -6
  191. package/dist/util/ImageUtil.cjs +0 -1
  192. package/dist/util/ImageUtil.d.ts +0 -14
  193. package/dist/util/ImageUtil.js +0 -63
  194. package/dist/util/NumberUtil.cjs +0 -1
  195. package/dist/util/NumberUtil.d.ts +0 -17
  196. package/dist/util/NumberUtil.js +0 -60
  197. package/dist/util/ValidationUtil.cjs +0 -1
  198. package/dist/util/ValidationUtil.d.ts +0 -14
  199. package/dist/util/ValidationUtil.js +0 -60
  200. package/dist/util/index.cjs +0 -1
  201. package/dist/util/index.d.ts +0 -4
  202. package/dist/util/index.js +0 -10
  203. package/dist/vite-env.d.ts +0 -1
@@ -1,68 +0,0 @@
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";
6
- import { TRANSLATION_NAMESPACE as E } from "../../../locale/hooks/translation-constants.js";
7
- import d from "./Button.js";
8
- function M({
9
- shouldConfirm: C = !0,
10
- block: n,
11
- value: i,
12
- loading: a,
13
- onClick: s,
14
- text: l,
15
- disabled: f,
16
- type: m = "link"
17
- }) {
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
- async () => {
24
- try {
25
- e(!0), await s(i);
26
- } finally {
27
- e(!1);
28
- }
29
- },
30
- [s, i]
31
- );
32
- return C ? /* @__PURE__ */ o(
33
- T,
34
- {
35
- title: t("qus.doYouWantToHide"),
36
- okText: r.toUpperCase(),
37
- cancelText: t("str.no").toUpperCase(),
38
- onConfirm: c,
39
- children: /* @__PURE__ */ o(
40
- d,
41
- {
42
- tooltip: r,
43
- icon: /* @__PURE__ */ o(p, {}),
44
- disabled: f,
45
- loading: u,
46
- type: m,
47
- danger: !0,
48
- block: n
49
- }
50
- )
51
- }
52
- ) : /* @__PURE__ */ o(
53
- d,
54
- {
55
- tooltip: r,
56
- icon: /* @__PURE__ */ o(p, {}),
57
- disabled: f,
58
- loading: u,
59
- type: m,
60
- danger: !0,
61
- block: n,
62
- onClick: c
63
- }
64
- );
65
- }
66
- export {
67
- M as default
68
- };
@@ -1 +0,0 @@
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,9 +0,0 @@
1
- import { BaseButtonProps } from 'antd/es/button/button';
2
- import { PropsWithChildren } from 'react';
3
- export declare function ImportButton({ onClick, children, accept, className, disabled, type, }: PropsWithChildren<{
4
- className?: string;
5
- accept?: string;
6
- disabled?: boolean;
7
- onClick: (file: File) => Promise<any>;
8
- type?: BaseButtonProps["type"];
9
- }>): import("react/jsx-runtime").JSX.Element;
@@ -1,56 +0,0 @@
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
- onClick: e,
9
- children: c,
10
- accept: m,
11
- className: a,
12
- disabled: f,
13
- type: p = "link"
14
- }) {
15
- const [u, i] = s(!1), { t: d } = x(N), o = h(null), y = l(() => {
16
- k((t) => t + 1), o.current && setTimeout(() => {
17
- var t;
18
- (t = o == null ? void 0 : o.current) == null || t.click();
19
- }, 10);
20
- }, []), [g, k] = s(0), C = l(
21
- async (t) => {
22
- i(!0);
23
- const r = t.target.files[0];
24
- r && await e(r), i(!1);
25
- },
26
- [e]
27
- );
28
- return /* @__PURE__ */ A("div", { className: a, children: [
29
- /* @__PURE__ */ n(
30
- "input",
31
- {
32
- type: "file",
33
- style: { display: "none" },
34
- ref: o,
35
- onChange: C,
36
- accept: m
37
- },
38
- g
39
- ),
40
- /* @__PURE__ */ n(
41
- S,
42
- {
43
- loading: u,
44
- type: p,
45
- disabled: f,
46
- onClick: y,
47
- icon: /* @__PURE__ */ n(T, {}),
48
- tooltip: d("str.import"),
49
- children: c
50
- }
51
- )
52
- ] });
53
- }
54
- export {
55
- _ as ImportButton
56
- };
@@ -1 +0,0 @@
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,12 +0,0 @@
1
- import { SizeType } from 'antd/es/config-provider/SizeContext';
2
- import { ButtonType } from 'antd/lib/button';
3
- import { FC } from 'react';
4
- export declare const NewButton: FC<{
5
- to?: string;
6
- onClick?: (value: boolean) => void;
7
- title?: string;
8
- type?: ButtonType;
9
- block?: boolean;
10
- className?: string;
11
- size?: SizeType;
12
- }>;
@@ -1,24 +0,0 @@
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
- {
11
- type: i,
12
- className: m,
13
- to: p,
14
- block: n,
15
- size: t,
16
- onClick: o && (() => o(!0)),
17
- icon: /* @__PURE__ */ r(u, {}),
18
- children: e ?? s("str.new")
19
- }
20
- );
21
- };
22
- export {
23
- w as NewButton
24
- };
@@ -1 +0,0 @@
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 +0,0 @@
1
- import { ButtonType } from 'antd/lib/button';
2
- import { FC } from 'react';
3
- export declare const PrintButton: FC<{
4
- to?: string;
5
- loading?: boolean;
6
- onClick?: () => void;
7
- title?: string;
8
- type?: ButtonType;
9
- block?: boolean;
10
- className?: string;
11
- disabled?: boolean;
12
- }>;
@@ -1,26 +0,0 @@
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
- {
11
- type: s,
12
- className: p,
13
- to: f,
14
- loading: i,
15
- disabled: n,
16
- block: m,
17
- onClick: e,
18
- tooltip: r != null && r.trim() ? "" : t("str.print"),
19
- icon: /* @__PURE__ */ o(u, {}),
20
- children: r
21
- }
22
- );
23
- };
24
- export {
25
- B as PrintButton
26
- };
@@ -1 +0,0 @@
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,11 +0,0 @@
1
- import { ButtonType } from 'antd/lib/button';
2
- import { FC } from 'react';
3
- export declare const RefreshButton: FC<{
4
- to?: string;
5
- onClick?: (value: boolean) => void;
6
- title?: string;
7
- type?: ButtonType;
8
- block?: boolean;
9
- className?: string;
10
- disabled?: boolean;
11
- }>;
@@ -1,24 +0,0 @@
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
- {
11
- type: n,
12
- disabled: t,
13
- className: m,
14
- to: p,
15
- block: e,
16
- onClick: r && (() => r(!0)),
17
- icon: /* @__PURE__ */ o(f, {}),
18
- children: i ?? s("str.refresh")
19
- }
20
- );
21
- };
22
- export {
23
- R as RefreshButton
24
- };
@@ -1 +0,0 @@
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,14 +0,0 @@
1
- import { ButtonType } from 'antd/es/button';
2
- interface Props<T> {
3
- value: T;
4
- onClick: (value: T) => Promise<void>;
5
- text?: string;
6
- loading?: boolean;
7
- disabled?: boolean;
8
- type?: ButtonType;
9
- block?: boolean;
10
- shouldConfirm?: boolean;
11
- hidden?: boolean;
12
- }
13
- declare function UnHideButton<T>({ shouldConfirm, block, value, loading, onClick, text, disabled, type, hidden }: Props<T>): import("react/jsx-runtime").JSX.Element;
14
- export default UnHideButton;
@@ -1,70 +0,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
- block: e,
11
- value: i,
12
- loading: a,
13
- onClick: s,
14
- text: f,
15
- disabled: l,
16
- type: m = "link",
17
- hidden: T
18
- }) {
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
- async () => {
25
- try {
26
- r(!0), await s(i);
27
- } finally {
28
- r(!1);
29
- }
30
- },
31
- [s, i]
32
- );
33
- return C ? /* @__PURE__ */ o(
34
- g,
35
- {
36
- title: t("qus.doYouWantToHide"),
37
- okText: n.toUpperCase(),
38
- cancelText: t("str.no").toUpperCase(),
39
- onConfirm: p,
40
- children: /* @__PURE__ */ o(
41
- d,
42
- {
43
- tooltip: n,
44
- icon: /* @__PURE__ */ o(c, {}),
45
- disabled: l,
46
- loading: u,
47
- type: m,
48
- danger: !0,
49
- hidden: T,
50
- block: e
51
- }
52
- )
53
- }
54
- ) : /* @__PURE__ */ o(
55
- d,
56
- {
57
- tooltip: n,
58
- icon: /* @__PURE__ */ o(c, {}),
59
- disabled: l,
60
- loading: u,
61
- type: m,
62
- danger: !0,
63
- block: e,
64
- onClick: p
65
- }
66
- );
67
- }
68
- export {
69
- O as default
70
- };
@@ -1 +0,0 @@
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,6 +0,0 @@
1
- interface Props<T> {
2
- value: T;
3
- onClick: (value: T) => void;
4
- }
5
- declare function UpdateButtonTable<T>({ value, onClick }: Props<T>): import("react/jsx-runtime").JSX.Element;
6
- export default UpdateButtonTable;
@@ -1,20 +0,0 @@
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
- {
11
- tooltip: n("str.update"),
12
- type: "link",
13
- onClick: () => r(o),
14
- icon: /* @__PURE__ */ t(i, {})
15
- }
16
- );
17
- }
18
- export {
19
- d as default
20
- };
@@ -1 +0,0 @@
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,6 +0,0 @@
1
- interface Props<T> {
2
- value: T;
3
- onClick: (value: T) => void;
4
- }
5
- declare function ViewButtonTable<T>({ value, onClick }: Props<T>): import("react/jsx-runtime").JSX.Element;
6
- export default ViewButtonTable;
@@ -1,20 +0,0 @@
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
- function c({ value: t, onClick: r }) {
7
- const { t: i } = e(p);
8
- return /* @__PURE__ */ o(
9
- m,
10
- {
11
- type: "link",
12
- onClick: () => r(t),
13
- icon: /* @__PURE__ */ o(n, {}),
14
- tooltip: i("str.view")
15
- }
16
- );
17
- }
18
- export {
19
- c as default
20
- };
@@ -1,14 +0,0 @@
1
- import { default as ButtonComponent, ButtonComponentProps } from './Button';
2
- import { default as CloneButtonTable } from './CloneButtonTable';
3
- import { default as DeleteButtonTable } from './DeleteButtonTable';
4
- import { ExportButton } from './ExportButton';
5
- import { default as HideButtonTable } from './HideButtonTable';
6
- import { ImportButton } from './ImportButton';
7
- import { NewButton } from './NewButton';
8
- import { PrintButton } from './PrintButton';
9
- import { RefreshButton } from './RefreshButton';
10
- import { default as UnHideButton } from './UnHideButton';
11
- import { default as UpdateButtonTable } from './UpdateButtonTable';
12
- import { default as ViewButtonTable } from './ViewButtonTable';
13
- export { ButtonComponent, CloneButtonTable, DeleteButtonTable, ExportButton, HideButtonTable, ImportButton, NewButton, PrintButton, RefreshButton, UnHideButton, UpdateButtonTable, ViewButtonTable, };
14
- export type { ButtonComponentProps };
@@ -1 +0,0 @@
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,9 +0,0 @@
1
- import { FormItemProps } from 'antd';
2
- import { FC } from 'react';
3
- interface Props extends FormItemProps {
4
- onChange?: (evt: boolean) => void;
5
- disabled?: boolean;
6
- switch?: boolean;
7
- }
8
- declare const CheckBoxComponent: FC<Props>;
9
- export default CheckBoxComponent;
@@ -1,40 +0,0 @@
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
- onChange: e,
5
- label: t,
6
- initialValue: o = !1,
7
- disabled: m,
8
- switch: r = !1,
9
- ...f
10
- }) => /* @__PURE__ */ h(
11
- x,
12
- {
13
- ...f,
14
- valuePropName: "checked",
15
- initialValue: o,
16
- label: r ? t : void 0,
17
- children: [
18
- !!r && /* @__PURE__ */ d(
19
- s,
20
- {
21
- disabled: m,
22
- defaultChecked: o,
23
- onChange: e && ((c) => e(c))
24
- }
25
- ),
26
- !r && /* @__PURE__ */ d(
27
- p,
28
- {
29
- disabled: m,
30
- defaultChecked: o,
31
- onChange: e && ((c) => e(c.target.checked)),
32
- children: t
33
- }
34
- )
35
- ]
36
- }
37
- );
38
- export {
39
- C as default
40
- };
@@ -1,2 +0,0 @@
1
- import { default as CheckBoxComponent } from './CheckBox';
2
- export { CheckBoxComponent };
@@ -1 +0,0 @@
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;
@@ -1,18 +0,0 @@
1
- import { DescriptionsProps } from 'antd/lib/descriptions';
2
- import { default as React, FC } from 'react';
3
- export type DescPropsNullable = {
4
- label?: string | React.ReactElement;
5
- value?: any;
6
- noFormatting?: boolean;
7
- };
8
- export type DescProps = {
9
- label?: string;
10
- value: any;
11
- noFormatting?: boolean;
12
- };
13
- export interface DescListProps extends DescriptionsProps {
14
- list: (DescPropsNullable | null | undefined | boolean)[];
15
- keepEmptyValues?: boolean;
16
- }
17
- declare const DescList: FC<DescListProps>;
18
- export default DescList;
@@ -1,16 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { Descriptions as n } from "antd";
3
- import { useMemo as c } from "react";
4
- import a from "../../../util/NumberUtil.js";
5
- const u = n.Item, h = ({ list: t, keepEmptyValues: e, ...m }) => {
6
- const s = c(() => {
7
- const r = e ? t : t.filter((o) => o && !!o.value);
8
- return r.forEach((o) => {
9
- !o.noFormatting && !isNaN(o.value) && (o.value = a.toMoney(o.value));
10
- }), r;
11
- }, [e, t]);
12
- return /* @__PURE__ */ i(n, { ...m, children: s.map(({ label: r, value: o }) => /* @__PURE__ */ i(u, { label: r, children: o }, r)) });
13
- };
14
- export {
15
- h as default
16
- };
@@ -1,7 +0,0 @@
1
- import { FC } from 'react';
2
- interface DescriptionComponentProps {
3
- title: string;
4
- description: string;
5
- }
6
- declare const DescriptionComponent: FC<DescriptionComponentProps>;
7
- export default DescriptionComponent;
@@ -1,3 +0,0 @@
1
- import { DescPropsNullable, default as DescList } from './DescList';
2
- export { DescList };
3
- export type { DescPropsNullable };
@@ -1,22 +0,0 @@
1
- export { DatePickerComponent, TimePickerComponent } from './DatePicker';
2
- export { ButtonComponent, ButtonComponent as Button, CloneButtonTable, DeleteButtonTable, ExportButton, HideButtonTable, ImportButton, NewButton, PrintButton, RefreshButton, UnHideButton, UpdateButtonTable, ViewButtonTable, } from './button';
3
- export { CheckBoxComponent } from './check-box';
4
- export { DescList } from './description';
5
- export type { DescPropsNullable } from './description';
6
- export { default as VerticalSpace } from './layout/VerticalSpace';
7
- export { LoadingIndicator } from './loading';
8
- export { ImagePicker } from './picker';
9
- export { RadioGroupComponent } from './radio';
10
- export { SelectFieldInReport } from './report';
11
- export type { ReportSelectFieldItems } from './report';
12
- export { SelectComponent, CustomSelectOption } from './select';
13
- export { TabViewWithRoute } from './tab';
14
- export { TableComponent } from './table';
15
- export { StatusTag } from './tag';
16
- export { Title } from './text';
17
- export { Text } from './text';
18
- export { ShowMore } from './show-more';
19
- export { PhoneField, TextField, TextAreaComponent, NumberTextField, } from './text-field';
20
- export { TooltipComponent } from './tooltip';
21
- export { WizardResult } from './wizard';
22
- export { WizardViewForm } from './wizard';
@@ -1 +0,0 @@
1
- "use strict";const r=require("react/jsx-runtime"),c=require("antd"),s=({children:e,className:t=""})=>r.jsx(c.Space,{direction:"vertical",className:[t,"w-100"].join(" "),children:e});module.exports=s;
@@ -1,5 +0,0 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- declare const VerticalSpace: FC<PropsWithChildren & {
3
- className?: string;
4
- }>;
5
- export default VerticalSpace;
@@ -1,6 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { Space as a } from "antd";
3
- const i = ({ children: r, className: e = "" }) => /* @__PURE__ */ t(a, { direction: "vertical", className: [e, "w-100"].join(" "), children: r });
4
- export {
5
- i as default
6
- };
@@ -1,2 +0,0 @@
1
- import { default as VerticalSpace } from './VerticalSpace';
2
- export { VerticalSpace };
@@ -1 +0,0 @@
1
- "use strict";const t=require("react/jsx-runtime"),r=require("antd"),o=require("react-i18next"),i=require("../button/Button.cjs"),c=require("../../../locale/hooks/translation-constants.cjs"),u=({loading:s,children:n,error:a})=>{const{t:e}=o.useTranslation(c.TRANSLATION_NAMESPACE);return t.jsx(r.Skeleton,{loading:s,paragraph:!0,className:"h-100",children:a?t.jsx(r.Result,{status:"404",title:404,subTitle:e("err.notFound"),className:"",extra:t.jsx(i,{to:-1,type:"primary",children:e("str.goBack")})}):n})};module.exports=u;
@@ -1,6 +0,0 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- declare const LoadingIndicator: FC<PropsWithChildren<{
3
- loading: boolean;
4
- error?: any;
5
- }>>;
6
- export default LoadingIndicator;
@@ -1,24 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { Skeleton as n, Result as s } from "antd";
3
- import { useTranslation as m } from "react-i18next";
4
- import i from "../button/Button.js";
5
- import { TRANSLATION_NAMESPACE as p } from "../../../locale/hooks/translation-constants.js";
6
- const N = ({ loading: o, children: e, error: a }) => {
7
- const { t: r } = m(p);
8
- return (
9
- // <Spin spinning={loading} className="h-100">
10
- /* @__PURE__ */ t(n, { loading: o, paragraph: !0, className: "h-100", children: a ? /* @__PURE__ */ t(
11
- s,
12
- {
13
- status: "404",
14
- title: 404,
15
- subTitle: r("err.notFound"),
16
- className: "",
17
- extra: /* @__PURE__ */ t(i, { to: -1, type: "primary", children: r("str.goBack") })
18
- }
19
- ) : e })
20
- );
21
- };
22
- export {
23
- N as default
24
- };
@@ -1,2 +0,0 @@
1
- import { default as LoadingIndicator } from './LoadingIndicator';
2
- export { LoadingIndicator };