@kingteza/crud-component 1.0.66 → 1.1.0

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 (236) hide show
  1. package/package.json +21 -11
  2. package/release.config.cjs +27 -0
  3. package/App.d.ts +0 -151
  4. package/Play.d.ts +0 -2
  5. package/common/appearance/Hider.cjs.js +0 -1
  6. package/common/appearance/Hider.d.ts +0 -6
  7. package/common/appearance/Hider.es.js +0 -5
  8. package/common/appearance/index.d.ts +0 -1
  9. package/common/button/Button.cjs.js +0 -1
  10. package/common/button/Button.d.ts +0 -11
  11. package/common/button/Button.es.js +0 -57
  12. package/common/button/CloneButtonTable.cjs.js +0 -1
  13. package/common/button/CloneButtonTable.d.ts +0 -6
  14. package/common/button/CloneButtonTable.es.js +0 -19
  15. package/common/button/DeleteButtonTable.cjs.js +0 -1
  16. package/common/button/DeleteButtonTable.d.ts +0 -13
  17. package/common/button/DeleteButtonTable.es.js +0 -64
  18. package/common/button/ExportButton.cjs.js +0 -1
  19. package/common/button/ExportButton.d.ts +0 -4
  20. package/common/button/ExportButton.es.js +0 -26
  21. package/common/button/HideButtonTable.cjs.js +0 -1
  22. package/common/button/HideButtonTable.d.ts +0 -13
  23. package/common/button/HideButtonTable.es.js +0 -67
  24. package/common/button/ImportButton.cjs.js +0 -1
  25. package/common/button/ImportButton.d.ts +0 -9
  26. package/common/button/ImportButton.es.js +0 -55
  27. package/common/button/NewButton.cjs.js +0 -1
  28. package/common/button/NewButton.d.ts +0 -12
  29. package/common/button/NewButton.es.js +0 -23
  30. package/common/button/PrintButton.cjs.js +0 -1
  31. package/common/button/PrintButton.d.ts +0 -12
  32. package/common/button/PrintButton.es.js +0 -25
  33. package/common/button/RefreshButton.cjs.js +0 -1
  34. package/common/button/RefreshButton.d.ts +0 -11
  35. package/common/button/RefreshButton.es.js +0 -23
  36. package/common/button/UnHideButton.cjs.js +0 -1
  37. package/common/button/UnHideButton.d.ts +0 -14
  38. package/common/button/UnHideButton.es.js +0 -69
  39. package/common/button/UpdateButtonTable.cjs.js +0 -1
  40. package/common/button/UpdateButtonTable.d.ts +0 -6
  41. package/common/button/UpdateButtonTable.es.js +0 -19
  42. package/common/button/ViewButtonTable.cjs.js +0 -1
  43. package/common/button/ViewButtonTable.d.ts +0 -6
  44. package/common/button/ViewButtonTable.es.js +0 -19
  45. package/common/button/index.d.ts +0 -14
  46. package/common/check-box/CheckBox.cjs.js +0 -1
  47. package/common/check-box/CheckBox.d.ts +0 -9
  48. package/common/check-box/CheckBox.es.js +0 -40
  49. package/common/check-box/index.d.ts +0 -2
  50. package/common/date-picker/DatePicker.cjs.js +0 -1
  51. package/common/date-picker/DatePicker.d.ts +0 -37
  52. package/common/date-picker/DatePicker.es.js +0 -87
  53. package/common/date-picker/TimePicker.cjs.js +0 -1
  54. package/common/date-picker/TimePicker.d.ts +0 -34
  55. package/common/date-picker/TimePicker.es.js +0 -77
  56. package/common/date-picker/index.d.ts +0 -3
  57. package/common/description/DescList.cjs.js +0 -1
  58. package/common/description/DescList.d.ts +0 -18
  59. package/common/description/DescList.es.js +0 -16
  60. package/common/description/DescriptionComponent.d.ts +0 -7
  61. package/common/description/index.d.ts +0 -3
  62. package/common/icon/KIcon.cjs.js +0 -1
  63. package/common/icon/KIcon.d.ts +0 -9
  64. package/common/icon/KIcon.es.js +0 -11
  65. package/common/index.cjs.js +0 -1
  66. package/common/index.d.ts +0 -20
  67. package/common/index.es.js +0 -78
  68. package/common/layout/VerticalSpace.cjs.js +0 -1
  69. package/common/layout/VerticalSpace.d.ts +0 -5
  70. package/common/layout/VerticalSpace.es.js +0 -6
  71. package/common/layout/index.d.ts +0 -2
  72. package/common/loading/LoadingIndicator.cjs.js +0 -1
  73. package/common/loading/LoadingIndicator.d.ts +0 -6
  74. package/common/loading/LoadingIndicator.es.js +0 -23
  75. package/common/loading/index.d.ts +0 -2
  76. package/common/picker/ImagePicker.cjs.js +0 -1
  77. package/common/picker/ImagePicker.d.ts +0 -56
  78. package/common/picker/ImagePicker.es.js +0 -320
  79. package/common/picker/index.d.ts +0 -2
  80. package/common/radio/RadioGroupComponent.cjs.js +0 -1
  81. package/common/radio/RadioGroupComponent.d.ts +0 -18
  82. package/common/radio/RadioGroupComponent.es.js +0 -19
  83. package/common/radio/index.d.ts +0 -2
  84. package/common/report/SelectFieldInReport.cjs.js +0 -1
  85. package/common/report/SelectFieldInReport.d.ts +0 -16
  86. package/common/report/SelectFieldInReport.es.js +0 -30
  87. package/common/report/index.d.ts +0 -3
  88. package/common/rich/index.cjs.js +0 -1
  89. package/common/rich/index.d.ts +0 -10
  90. package/common/rich/index.es.js +0 -66
  91. package/common/select/CustomSelectOption.cjs.js +0 -1
  92. package/common/select/CustomSelectOption.d.ts +0 -7
  93. package/common/select/CustomSelectOption.es.js +0 -13
  94. package/common/select/SelectComponent.cjs.js +0 -1
  95. package/common/select/SelectComponent.d.ts +0 -21
  96. package/common/select/SelectComponent.es.js +0 -85
  97. package/common/select/index.d.ts +0 -3
  98. package/common/show-more/index.cjs.js +0 -1
  99. package/common/show-more/index.d.ts +0 -4
  100. package/common/show-more/index.es.js +0 -8
  101. package/common/tab/TabViewWithRoute.cjs.js +0 -1
  102. package/common/tab/TabViewWithRoute.d.ts +0 -13
  103. package/common/tab/TabViewWithRoute.es.js +0 -38
  104. package/common/tab/index.d.ts +0 -2
  105. package/common/table/index.d.ts +0 -3
  106. package/common/table/table.cjs.js +0 -1
  107. package/common/table/table.d.ts +0 -19
  108. package/common/table/table.es.js +0 -40
  109. package/common/tag/StatusTag.cjs.js +0 -1
  110. package/common/tag/StatusTag.d.ts +0 -14
  111. package/common/tag/StatusTag.es.js +0 -29
  112. package/common/tag/index.d.ts +0 -2
  113. package/common/text/index.cjs.js +0 -1
  114. package/common/text/index.d.ts +0 -3
  115. package/common/text/index.es.js +0 -5
  116. package/common/text/title/TitleWithHeadTitle.d.ts +0 -7
  117. package/common/text/title/index.cjs.js +0 -1
  118. package/common/text/title/index.d.ts +0 -1
  119. package/common/text/title/index.es.js +0 -5
  120. package/common/text-field/NumberField.cjs.js +0 -1
  121. package/common/text-field/NumberField.d.ts +0 -13
  122. package/common/text-field/NumberField.es.js +0 -82
  123. package/common/text-field/PhoneNumberField.cjs.js +0 -1
  124. package/common/text-field/PhoneNumberField.d.ts +0 -4
  125. package/common/text-field/PhoneNumberField.es.js +0 -18
  126. package/common/text-field/TextArea.cjs.js +0 -1
  127. package/common/text-field/TextArea.d.ts +0 -17
  128. package/common/text-field/TextArea.es.js +0 -46
  129. package/common/text-field/TextField.cjs.js +0 -1
  130. package/common/text-field/TextField.d.ts +0 -27
  131. package/common/text-field/TextField.es.js +0 -72
  132. package/common/text-field/index.d.ts +0 -5
  133. package/common/tooltip/TooltipComponent.cjs.js +0 -1
  134. package/common/tooltip/TooltipComponent.d.ts +0 -5
  135. package/common/tooltip/TooltipComponent.es.js +0 -9
  136. package/common/tooltip/index.d.ts +0 -2
  137. package/common/wizard/WizardResult.cjs.js +0 -1
  138. package/common/wizard/WizardResult.d.ts +0 -16
  139. package/common/wizard/WizardResult.es.js +0 -58
  140. package/common/wizard/WizardViewForm.cjs.js +0 -1
  141. package/common/wizard/WizardViewForm.d.ts +0 -24
  142. package/common/wizard/WizardViewForm.es.js +0 -74
  143. package/common/wizard/index.d.ts +0 -3
  144. package/crud/CrudComponent.cjs.js +0 -1
  145. package/crud/CrudComponent.d.ts +0 -244
  146. package/crud/CrudComponent.es.js +0 -123
  147. package/crud/CrudField.cjs.js +0 -1
  148. package/crud/CrudField.d.ts +0 -4
  149. package/crud/CrudField.es.js +0 -449
  150. package/crud/CrudForm.cjs.js +0 -1
  151. package/crud/CrudForm.d.ts +0 -14
  152. package/crud/CrudForm.es.js +0 -103
  153. package/crud/CrudFormWizard.cjs.js +0 -1
  154. package/crud/CrudFormWizard.d.ts +0 -14
  155. package/crud/CrudFormWizard.es.js +0 -140
  156. package/crud/CrudReportComponent.cjs.js +0 -4
  157. package/crud/CrudReportComponent.d.ts +0 -44
  158. package/crud/CrudReportComponent.es.js +0 -255
  159. package/crud/CrudSearchComponent.cjs.js +0 -1
  160. package/crud/CrudSearchComponent.d.ts +0 -21
  161. package/crud/CrudSearchComponent.es.js +0 -96
  162. package/crud/CrudTextAreaComponent.cjs.js +0 -1
  163. package/crud/CrudTextAreaComponent.d.ts +0 -22
  164. package/crud/CrudTextAreaComponent.es.js +0 -52
  165. package/crud/FileCrudField.cjs.js +0 -1
  166. package/crud/FileCrudField.d.ts +0 -25
  167. package/crud/FileCrudField.es.js +0 -219
  168. package/crud/ImageCrudField.cjs.js +0 -1
  169. package/crud/ImageCrudField.d.ts +0 -38
  170. package/crud/ImageCrudField.es.js +0 -113
  171. package/crud/actions/index.cjs.js +0 -1
  172. package/crud/actions/index.d.ts +0 -26
  173. package/crud/actions/index.es.js +0 -88
  174. package/crud/import/CrudImportButton.cjs.js +0 -1
  175. package/crud/import/CrudImportButton.d.ts +0 -3
  176. package/crud/import/CrudImportButton.es.js +0 -30
  177. package/crud/import/CrudImportComponent.cjs.js +0 -2
  178. package/crud/import/CrudImportComponent.d.ts +0 -14
  179. package/crud/import/CrudImportComponent.es.js +0 -222
  180. package/crud/index.d.ts +0 -23
  181. package/crud/modal/index.cjs.js +0 -1
  182. package/crud/modal/index.d.ts +0 -24
  183. package/crud/modal/index.es.js +0 -146
  184. package/crud/view/CrudDecListView.cjs.js +0 -1
  185. package/crud/view/CrudDecListView.d.ts +0 -15
  186. package/crud/view/CrudDecListView.es.js +0 -57
  187. package/crud/view/CrudViewer.cjs.js +0 -1
  188. package/crud/view/CrudViewer.d.ts +0 -43
  189. package/crud/view/CrudViewer.es.js +0 -304
  190. package/crud/view/CrudViewerUtil.cjs.js +0 -1
  191. package/crud/view/CrudViewerUtil.d.ts +0 -2
  192. package/crud/view/CrudViewerUtil.es.js +0 -98
  193. package/crud/view/index.d.ts +0 -5
  194. package/hooks/NavigatorHooks.cjs.js +0 -1
  195. package/hooks/NavigatorHooks.d.ts +0 -1
  196. package/hooks/NavigatorHooks.es.js +0 -9
  197. package/icons/FlipHIcon.cjs.js +0 -1
  198. package/icons/FlipHIcon.d.ts +0 -3
  199. package/icons/FlipHIcon.es.js +0 -28
  200. package/icons/FlipVIcon.cjs.js +0 -1
  201. package/icons/FlipVIcon.d.ts +0 -3
  202. package/icons/FlipVIcon.es.js +0 -28
  203. package/index.cjs.js +0 -1
  204. package/index.d.ts +0 -4
  205. package/index.es.js +0 -46
  206. package/locale/hooks/translation-constants.cjs.js +0 -1
  207. package/locale/hooks/translation-constants.d.ts +0 -1
  208. package/locale/hooks/translation-constants.es.js +0 -4
  209. package/locale/index.cjs.js +0 -1
  210. package/locale/index.d.ts +0 -85
  211. package/locale/index.es.js +0 -57
  212. package/locale/translations/en.cjs.js +0 -1
  213. package/locale/translations/en.d.ts +0 -63
  214. package/locale/translations/en.es.js +0 -65
  215. package/main.d.ts +0 -0
  216. package/types/DialogComponentProp.d.ts +0 -8
  217. package/types/Id.d.ts +0 -10
  218. package/util/CrudUtil.cjs.js +0 -1
  219. package/util/CrudUtil.d.ts +0 -5
  220. package/util/CrudUtil.es.js +0 -8
  221. package/util/DateUtil.cjs.js +0 -1
  222. package/util/DateUtil.d.ts +0 -7
  223. package/util/DateUtil.es.js +0 -18
  224. package/util/ImageUtil.cjs.js +0 -1
  225. package/util/ImageUtil.d.ts +0 -14
  226. package/util/ImageUtil.es.js +0 -63
  227. package/util/NumberUtil.cjs.js +0 -1
  228. package/util/NumberUtil.d.ts +0 -17
  229. package/util/NumberUtil.es.js +0 -60
  230. package/util/ValidationUtil.cjs.js +0 -1
  231. package/util/ValidationUtil.d.ts +0 -14
  232. package/util/ValidationUtil.es.js +0 -63
  233. package/util/index.cjs.js +0 -1
  234. package/util/index.d.ts +0 -4
  235. package/util/index.es.js +0 -10
  236. package/vite-env.d.ts +0 -1
@@ -1,23 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { PlusOutlined as u } from "@ant-design/icons";
3
- import { useTranslationLib as c } from "../../locale/index.es.js";
4
- import f from "./Button.es.js";
5
- const x = ({ size: r, block: n, className: i, type: m = "primary", onClick: t, title: e, to: p }) => {
6
- const { t: s } = c();
7
- return /* @__PURE__ */ o(
8
- f,
9
- {
10
- type: m,
11
- className: i,
12
- to: p,
13
- block: n,
14
- size: r,
15
- onClick: t && (() => t(!0)),
16
- icon: /* @__PURE__ */ o(u, {}),
17
- children: e ?? s("str.new")
18
- }
19
- );
20
- };
21
- export {
22
- x as NewButton
23
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),d=require("@ant-design/icons"),p=require("../../locale/index.cjs.js"),j=require("./Button.cjs.js"),m=({disabled:e,loading:i,block:o,className:s,type:u="primary",onClick:c,title:l,to:a})=>{const{t:r}=p.useTranslationLib(),t=l??r("str.print");return n.jsx(j,{type:u,className:s,to:a,loading:i,disabled:e,block:o,onClick:c,tooltip:t!=null&&t.trim()?"":r("str.print"),icon:n.jsx(d.PrinterOutlined,{}),children:t})};exports.PrintButton=m;
@@ -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,25 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { PrinterOutlined as f } from "@ant-design/icons";
3
- import { useTranslationLib as a } from "../../locale/index.es.js";
4
- import l from "./Button.es.js";
5
- const b = ({ disabled: n, loading: i, block: m, className: p, type: s = "primary", onClick: e, title: c, to: u }) => {
6
- const { t: r } = a(), t = c ?? r("str.print");
7
- return /* @__PURE__ */ o(
8
- l,
9
- {
10
- type: s,
11
- className: p,
12
- to: u,
13
- loading: i,
14
- disabled: n,
15
- block: m,
16
- onClick: e,
17
- tooltip: t != null && t.trim() ? "" : r("str.print"),
18
- icon: /* @__PURE__ */ o(f, {}),
19
- children: t
20
- }
21
- );
22
- };
23
- export {
24
- b as PrintButton
25
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("@ant-design/icons"),a=require("../../locale/index.cjs.js"),d=require("./Button.cjs.js"),f=({disabled:r,block:n,className:o,type:s="primary",onClick:e,title:i,to:u})=>{const{t:c}=a.useTranslationLib();return t.jsx(d,{type:s,disabled:r,className:o,to:u,block:n,onClick:e&&(()=>e(!0)),icon:t.jsx(l.ReloadOutlined,{}),children:i??c("str.refresh")})};exports.RefreshButton=f;
@@ -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,23 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { ReloadOutlined as f } from "@ant-design/icons";
3
- import { useTranslationLib as u } from "../../locale/index.es.js";
4
- import a from "./Button.es.js";
5
- const x = ({ disabled: t, block: e, className: n, type: i = "primary", onClick: r, title: m, to: s }) => {
6
- const { t: p } = u();
7
- return /* @__PURE__ */ o(
8
- a,
9
- {
10
- type: i,
11
- disabled: t,
12
- className: n,
13
- to: s,
14
- block: e,
15
- onClick: r && (() => r(!0)),
16
- icon: /* @__PURE__ */ o(f, {}),
17
- children: m ?? p("str.refresh")
18
- }
19
- );
20
- };
21
- export {
22
- x as RefreshButton
23
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),p=require("@ant-design/icons"),g=require("antd"),n=require("react"),U=require("../../locale/index.cjs.js"),q=require("./Button.cjs.js");function m({shouldConfirm:C=!0,block:i,value:s,loading:u,onClick:c,text:a,disabled:l,type:d="link",hidden:j}){const{t}=U.useTranslationLib(),o=n.useMemo(()=>a??t("str.unhide"),[a,t]),[f,r]=n.useState(!1);n.useEffect(()=>{r(u??!1)},[u]);const x=n.useCallback(async()=>{try{r(!0),await c(s)}finally{r(!1)}},[c,s]);return C?e.jsx(g.Popconfirm,{title:t("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:t("str.no").toUpperCase(),onConfirm:x,children:e.jsx(q,{tooltip:o,icon:e.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,hidden:j,block:i})}):e.jsx(q,{tooltip:o,icon:e.jsx(p.UpCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:i,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,69 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { UpCircleOutlined as p } from "@ant-design/icons";
3
- import { Popconfirm as x } from "antd";
4
- import { useMemo as T, useState as U, useEffect as k, useCallback as _ } from "react";
5
- import { useTranslationLib as h } from "../../locale/index.es.js";
6
- import d from "./Button.es.js";
7
- function E({
8
- shouldConfirm: C = !0,
9
- block: r,
10
- value: i,
11
- loading: a,
12
- onClick: s,
13
- text: l,
14
- disabled: u,
15
- type: f = "link",
16
- hidden: g
17
- }) {
18
- const { t: o } = h(), n = T(() => l ?? o("str.unhide"), [l, o]), [m, e] = U(!1);
19
- k(() => {
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__ */ t(
33
- x,
34
- {
35
- title: o("qus.doYouWantToHide"),
36
- okText: n.toUpperCase(),
37
- cancelText: o("str.no").toUpperCase(),
38
- onConfirm: c,
39
- children: /* @__PURE__ */ t(
40
- d,
41
- {
42
- tooltip: n,
43
- icon: /* @__PURE__ */ t(p, {}),
44
- disabled: u,
45
- loading: m,
46
- type: f,
47
- danger: !0,
48
- hidden: g,
49
- block: r
50
- }
51
- )
52
- }
53
- ) : /* @__PURE__ */ t(
54
- d,
55
- {
56
- tooltip: n,
57
- icon: /* @__PURE__ */ t(p, {}),
58
- disabled: u,
59
- loading: m,
60
- type: f,
61
- danger: !0,
62
- block: r,
63
- onClick: c
64
- }
65
- );
66
- }
67
- export {
68
- E as default
69
- };
@@ -1 +0,0 @@
1
- "use strict";const t=require("react/jsx-runtime"),o=require("@ant-design/icons"),r=require("../../locale/index.cjs.js"),s=require("./Button.cjs.js");function u({value:e,onClick:n}){const{t:i}=r.useTranslationLib();return t.jsx(s,{tooltip:i("str.update"),type:"link",onClick:()=>n(e),icon:t.jsx(o.EditOutlined,{})})}module.exports=u;
@@ -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,19 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { EditOutlined as r } from "@ant-design/icons";
3
- import { useTranslationLib as e } from "../../locale/index.es.js";
4
- import p from "./Button.es.js";
5
- function f({ value: o, onClick: n }) {
6
- const { t: i } = e();
7
- return /* @__PURE__ */ t(
8
- p,
9
- {
10
- tooltip: i("str.update"),
11
- type: "link",
12
- onClick: () => n(o),
13
- icon: /* @__PURE__ */ t(r, {})
14
- }
15
- );
16
- }
17
- export {
18
- f as default
19
- };
@@ -1 +0,0 @@
1
- "use strict";const t=require("react/jsx-runtime"),o=require("@ant-design/icons"),r=require("../../locale/index.cjs.js"),s=require("./Button.cjs.js");function u({value:e,onClick:n}){const{t:i}=r.useTranslationLib();return t.jsx(s,{type:"link",onClick:()=>n(e),icon:t.jsx(o.EyeOutlined,{}),tooltip:i("str.view")})}module.exports=u;
@@ -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,19 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { EyeOutlined as r } from "@ant-design/icons";
3
- import { useTranslationLib as e } from "../../locale/index.es.js";
4
- import m from "./Button.es.js";
5
- function s({ value: o, onClick: i }) {
6
- const { t: n } = e();
7
- return /* @__PURE__ */ t(
8
- m,
9
- {
10
- type: "link",
11
- onClick: () => i(o),
12
- icon: /* @__PURE__ */ t(r, {}),
13
- tooltip: n("str.view")
14
- }
15
- );
16
- }
17
- export {
18
- s as default
19
- };
@@ -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 u=require("react/jsx-runtime"),s=require("antd"),t=require("dayjs"),$=require("dayjs/plugin/advancedFormat"),C=require("dayjs/plugin/customParseFormat"),E=require("dayjs/plugin/localeData"),I=require("dayjs/plugin/weekday"),L=require("dayjs/plugin/weekOfYear"),N=require("dayjs/plugin/weekYear"),b=require("../../locale/index.cjs.js"),z=require("react");t.extend(C);t.extend($);t.extend(I);t.extend(E);t.extend(L);t.extend(N);const A=({type:B,required:q,label:o,rules:x=[],placeholder:a,disabledPastDays:c=!1,disableToday:i=!1,onEnter:G,disabled:f,nextFocus:H,onChange:r,range:m,showTime:k,disabledFutureDays:d,picker:l,defaultValue:y,value:O,format:j,autoComplete:J="off",enabledDates:K=[],renderExtraFooter:p,...w})=>{const{t:D}=b.useTranslationLib(),P=m?s.DatePicker.RangePicker:s.DatePicker,F=z.useCallback(e=>{if(!e)return!1;const n=t(),R=c&&e<n.startOf("day"),v=d&&e>n.endOf("day"),Y=i&&e<n.endOf("day")&&n.startOf("day")<e;return R||v||Y},[c,d,i]);return u.jsx(s.Form.Item,{...w,label:o,rules:[{required:q,message:`${o??a??""} ${D("err.validation.required")}`},...x],children:u.jsx(P,{renderExtraFooter:p,value:O,picker:l,defaultValue:y,format:j,onChange:e=>r==null?void 0:r(e),disabledDate:F,disabled:f,className:"w-100",placeholder:a,showTime:k})})};module.exports=A;
@@ -1,37 +0,0 @@
1
- import { FormItemProps } from 'antd/lib/form';
2
- import { Dayjs } from 'dayjs';
3
- import { default as React, FC } from 'react';
4
- export type DateRange = [Dayjs | null, Dayjs | null];
5
- export interface DatePickerComponentProps extends FormItemProps<any> {
6
- type?: any;
7
- placeholder?: string;
8
- onEnter?: React.KeyboardEventHandler<HTMLInputElement>;
9
- nextFocus?: string;
10
- disableToday?: boolean;
11
- autoComplete?: string;
12
- disabled?: boolean;
13
- enabledDates?: Date[];
14
- disabledPastDays?: boolean;
15
- disabledFutureDays?: boolean;
16
- renderExtraFooter?: () => React.ReactElement;
17
- }
18
- export interface DateRangePickerProps extends DatePickerComponentProps {
19
- onChange?: (date: DateRange) => void;
20
- range: true;
21
- defaultValue?: DateRange | boolean;
22
- value?: DateRange;
23
- format?: string;
24
- picker?: string;
25
- showTime?: boolean;
26
- }
27
- export interface DatePickerProps extends DatePickerComponentProps {
28
- onChange?: (date: Dayjs | null) => void;
29
- defaultValue?: Dayjs;
30
- value?: Dayjs;
31
- range?: false;
32
- format?: string;
33
- picker?: string;
34
- showTime?: never;
35
- }
36
- declare const DatePickerComponent: FC<DateRangePickerProps | DatePickerProps>;
37
- export default DatePickerComponent;
@@ -1,87 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { DatePicker as d, Form as C } from "antd";
3
- import t from "dayjs";
4
- import E from "dayjs/plugin/advancedFormat";
5
- import I from "dayjs/plugin/customParseFormat";
6
- import L from "dayjs/plugin/localeData";
7
- import N from "dayjs/plugin/weekday";
8
- import R from "dayjs/plugin/weekOfYear";
9
- import b from "dayjs/plugin/weekYear";
10
- import { useTranslationLib as z } from "../../locale/index.es.js";
11
- import { useCallback as A } from "react";
12
- t.extend(I);
13
- t.extend(E);
14
- t.extend(N);
15
- t.extend(L);
16
- t.extend(R);
17
- t.extend(b);
18
- const h = ({
19
- type: B,
20
- required: c,
21
- label: m,
22
- rules: p = [],
23
- placeholder: a,
24
- disabledPastDays: n = !1,
25
- disableToday: f = !1,
26
- onEnter: G,
27
- disabled: l,
28
- nextFocus: H,
29
- onChange: r,
30
- range: x,
31
- showTime: k,
32
- disabledFutureDays: s,
33
- picker: u,
34
- defaultValue: y,
35
- value: O,
36
- format: w,
37
- autoComplete: J = "off",
38
- enabledDates: K = [],
39
- renderExtraFooter: D,
40
- ...F
41
- }) => {
42
- const { t: P } = z(), j = x ? d.RangePicker : d, v = A(
43
- (e) => {
44
- if (!e)
45
- return !1;
46
- const o = t(), Y = n && e < o.startOf("day"), $ = s && e > o.endOf("day"), q = f && e < o.endOf("day") && o.startOf("day") < e;
47
- return Y || $ || q;
48
- },
49
- [n, s, f]
50
- // Dependencies for useCallback
51
- );
52
- return /* @__PURE__ */ i(
53
- C.Item,
54
- {
55
- ...F,
56
- label: m,
57
- rules: [
58
- {
59
- required: c,
60
- message: `${m ?? a ?? ""} ${P(
61
- "err.validation.required"
62
- )}`
63
- },
64
- ...p
65
- ],
66
- children: /* @__PURE__ */ i(
67
- j,
68
- {
69
- renderExtraFooter: D,
70
- value: O,
71
- picker: u,
72
- defaultValue: y,
73
- format: w,
74
- onChange: (e) => r == null ? void 0 : r(e),
75
- disabledDate: v,
76
- disabled: l,
77
- className: "w-100",
78
- placeholder: a,
79
- showTime: k
80
- }
81
- )
82
- }
83
- );
84
- };
85
- export {
86
- h as default
87
- };
@@ -1 +0,0 @@
1
- "use strict";const l=require("react/jsx-runtime"),n=require("antd"),E=require("dayjs"),f=require("react"),H=require("../../locale/index.cjs.js"),I=({type:L,required:q,label:i,rules:x=[],placeholder:o,disabledPast:r=!1,disableCurrent:m=!1,onEnter:M,disabled:k,use12Hours:T,nextFocus:N,onChange:t,range:c,disabledFuture:u,defaultValue:j,value:p,format:d,autoComplete:S="off",renderExtraFooter:y,...P})=>{const{t:R}=H.useTranslationLib(),a=f.useMemo(()=>o||(c?["From","To"]:"Select time"),[o,c]);console.log(a);const F=c?n.TimePicker.RangePicker:n.TimePicker,$=f.useCallback(e=>{if(!e)return!1;const s=E(),v=r&&e<s,w=u&&e>s,D=m&&e<s&&s<e;return v||w||D},[m,u,r]);return l.jsx(n.Form.Item,{...P,label:i,rules:[{required:q,message:`${i??o??""} ${R("err.validation.required")}`},...x],children:l.jsx(F,{use12Hours:T,renderExtraFooter:y,value:p,defaultValue:j,format:d,onChange:e=>t==null?void 0:t(e),disabledDate:$,disabled:k,className:"w-100",placeholder:a})})};module.exports=I;
@@ -1,34 +0,0 @@
1
- import { FormItemProps } from 'antd/lib/form';
2
- import { Dayjs } from 'dayjs';
3
- import { default as React, FC } from 'react';
4
- export type DateRange = [Dayjs | null, Dayjs | null];
5
- export interface TimePickerComponentProps extends FormItemProps<any> {
6
- type?: any;
7
- onEnter?: React.KeyboardEventHandler<HTMLInputElement>;
8
- nextFocus?: string;
9
- disableCurrent?: boolean;
10
- use12Hours?: boolean;
11
- autoComplete?: string;
12
- disabled?: boolean;
13
- disabledPast?: boolean;
14
- disabledFuture?: boolean;
15
- renderExtraFooter?: () => React.ReactElement;
16
- }
17
- export interface TimeRangePickerProps extends TimePickerComponentProps {
18
- onChange?: (date: DateRange) => void;
19
- range: true;
20
- defaultValue?: DateRange;
21
- value?: DateRange;
22
- format?: string;
23
- placeholder?: [string, string];
24
- }
25
- export interface TimePickerProps extends TimePickerComponentProps {
26
- onChange?: (date: Dayjs | null) => void;
27
- range: false;
28
- defaultValue?: Dayjs;
29
- value?: Dayjs;
30
- format?: string;
31
- placeholder?: string;
32
- }
33
- declare const TimePickerComponent: FC<TimeRangePickerProps | TimePickerProps>;
34
- export default TimePickerComponent;
@@ -1,77 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { TimePicker as l, Form as E } from "antd";
3
- import H from "dayjs";
4
- import { useMemo as I, useCallback as L } from "react";
5
- import { useTranslationLib as M } from "../../locale/index.es.js";
6
- const K = ({
7
- type: N,
8
- required: p,
9
- label: c,
10
- rules: k = [],
11
- placeholder: t,
12
- disabledPast: i = !1,
13
- disableCurrent: r = !1,
14
- onEnter: R,
15
- disabled: u,
16
- use12Hours: T,
17
- nextFocus: S,
18
- onChange: s,
19
- range: m,
20
- disabledFuture: n,
21
- defaultValue: x,
22
- value: y,
23
- format: d,
24
- autoComplete: z = "off",
25
- renderExtraFooter: j,
26
- ...F
27
- }) => {
28
- const { t: P } = M(), f = I(
29
- () => t || (m ? ["From", "To"] : "Select time"),
30
- [t, m]
31
- );
32
- console.log(f);
33
- const $ = m ? l.RangePicker : l, q = L(
34
- (o) => {
35
- if (!o)
36
- return !1;
37
- const e = H(), v = i && o < e, w = n && o > e, D = r && o < e && e < o;
38
- return v || w || D;
39
- },
40
- [r, n, i]
41
- // Dependencies for useCallback
42
- );
43
- return /* @__PURE__ */ a(
44
- E.Item,
45
- {
46
- ...F,
47
- label: c,
48
- rules: [
49
- {
50
- required: p,
51
- message: `${c ?? t ?? ""} ${P(
52
- "err.validation.required"
53
- )}`
54
- },
55
- ...k
56
- ],
57
- children: /* @__PURE__ */ a(
58
- $,
59
- {
60
- use12Hours: T,
61
- renderExtraFooter: j,
62
- value: y,
63
- defaultValue: x,
64
- format: d,
65
- onChange: (o) => s == null ? void 0 : s(o),
66
- disabledDate: q,
67
- disabled: u,
68
- className: "w-100",
69
- placeholder: f
70
- }
71
- )
72
- }
73
- );
74
- };
75
- export {
76
- K as default
77
- };
@@ -1,3 +0,0 @@
1
- import { default as DatePickerComponent } from './DatePicker';
2
- import { default as TimePickerComponent } from './TimePicker';
3
- export { DatePickerComponent, TimePickerComponent };
@@ -1 +0,0 @@
1
- "use strict";const n=require("react/jsx-runtime"),o=require("antd"),u=require("react"),a=require("../../util/NumberUtil.cjs.js"),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.es.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 +0,0 @@
1
- "use strict";const n=require("react/jsx-runtime"),s=require("@ant-design/icons"),o=require("@iconify/react"),u=require("react"),i=e=>t=>n.jsx(o.Icon,{...t,icon:e}),I=({icon:e,component:t,...r})=>{const c=u.useMemo(()=>t??i(e),[e,t]);return n.jsx(s,{...r,component:c})};module.exports=I;
@@ -1,9 +0,0 @@
1
- import { CustomIconComponentProps } from '@ant-design/icons/lib/components/Icon';
2
- import { IconifyIcon } from '@iconify/react';
3
- import { FC } from 'react';
4
- declare const KIcon: FC<Partial<CustomIconComponentProps> & ({
5
- icon: IconifyIcon | string;
6
- } | {
7
- component: any;
8
- })>;
9
- export default KIcon;