@kingteza/crud-component 1.0.65 → 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 -25
  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 -83
  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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kingteza/crud-component",
3
3
  "private": false,
4
- "version": "1.0.65",
4
+ "version": "1.1.0",
5
5
  "description": "React CRUD component library with Ant Design",
6
6
  "keywords": [
7
7
  "react",
@@ -33,15 +33,6 @@
33
33
  ],
34
34
  "type": "module",
35
35
  "sideEffects": false,
36
- "scripts": {
37
- "dev": "vite",
38
- "clean": "rm -rf dist",
39
- "build": "npm run clean && tsc && vite build && cp package.json README.md .npmignore dist/",
40
- "publish-npm": "yarn build && cd dist && npm whoami >/dev/null 2>&1 || npm login && npm publish",
41
- "lint": "eslint .",
42
- "tsc": "tsc",
43
- "preview": "vite preview"
44
- },
45
36
  "exports": {
46
37
  ".": {
47
38
  "types": "./index.d.ts",
@@ -62,6 +53,9 @@
62
53
  "publishConfig": {
63
54
  "access": "public"
64
55
  },
56
+ "engines": {
57
+ "node": ">=22.14.0"
58
+ },
65
59
  "dependencies": {
66
60
  "@ant-design/icons": "^5.5.2",
67
61
  "@dnd-kit/core": "^6.3.1",
@@ -86,7 +80,12 @@
86
80
  "uuid": "^11.0.3"
87
81
  },
88
82
  "devDependencies": {
83
+ "@anolilab/semantic-release-pnpm": "^2.0.4",
89
84
  "@eslint/js": "^9.17.0",
85
+ "@semantic-release/changelog": "^6.0.3",
86
+ "@semantic-release/commit-analyzer": "^13.0.1",
87
+ "@semantic-release/git": "^10.0.1",
88
+ "@semantic-release/release-notes-generator": "^14.1.0",
90
89
  "@types/file-saver": "^2.0.7",
91
90
  "@types/papaparse": "^5.3.15",
92
91
  "@types/path-browserify": "^1.0.3",
@@ -103,6 +102,7 @@
103
102
  "react": "^18.3.1",
104
103
  "react-dom": "^18.3.1",
105
104
  "react-router-dom": "^7.0.2",
105
+ "semantic-release": "^25.0.1",
106
106
  "tsup": "^8.3.5",
107
107
  "typescript": "~5.6.2",
108
108
  "typescript-eslint": "^8.18.2",
@@ -115,5 +115,15 @@
115
115
  "react": ">=18.3.1",
116
116
  "react-dom": ">=18.3.1",
117
117
  "react-router-dom": ">=6.3.0"
118
+ },
119
+ "scripts": {
120
+ "dev": "vite",
121
+ "clean": "rm -rf dist",
122
+ "build": "npm run clean && tsc && vite build && cp package.json README.md .npmignore dist/",
123
+ "release": "semantic-release",
124
+ "release:dry-run": "semantic-release --dry-run",
125
+ "lint": "eslint .",
126
+ "tsc": "tsc",
127
+ "preview": "vite preview"
118
128
  }
119
- }
129
+ }
@@ -0,0 +1,27 @@
1
+ module.exports = {
2
+ branches: ['main'],
3
+ plugins: [
4
+ '@semantic-release/commit-analyzer',
5
+ '@semantic-release/release-notes-generator',
6
+ [
7
+ '@semantic-release/changelog',
8
+ {
9
+ changelogFile: 'CHANGELOG.md',
10
+ },
11
+ ],
12
+ [
13
+ '@semantic-release/git',
14
+ {
15
+ assets: ['CHANGELOG.md', 'package.json'],
16
+ message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
17
+ },
18
+ ],
19
+ [
20
+ '@anolilab/semantic-release-pnpm',
21
+ {
22
+ pnpmPublish: true,
23
+ pnpmPublishArgs: ['--access', 'public'],
24
+ },
25
+ ],
26
+ ],
27
+ };
package/App.d.ts DELETED
@@ -1,25 +0,0 @@
1
- export declare enum PurchaseStatus {
2
- PENDING = "PENDING",
3
- COMPLETED = "COMPLETED",
4
- CANCELLED = "CANCELLED"
5
- }
6
- export declare enum TestEnum {
7
- TEST = "TEST",
8
- TEST2 = "TEST2",
9
- TEST3 = "TEST3"
10
- }
11
- export type Purchase = {
12
- status: PurchaseStatus;
13
- test: TestEnum;
14
- value: string;
15
- id: string | number;
16
- name: string;
17
- image: string;
18
- helloId: string;
19
- hello?: {
20
- id: string;
21
- name: string;
22
- };
23
- };
24
- declare function App(): import("react/jsx-runtime").JSX.Element;
25
- export default App;
package/Play.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const BuildingAndFloorScreen: () => import("react/jsx-runtime").JSX.Element;
2
- export default BuildingAndFloorScreen;
@@ -1 +0,0 @@
1
- "use strict";const r=require("react/jsx-runtime"),t=({children:e,hide:s})=>r.jsx("div",{className:s?"d-none":"",children:e});module.exports=t;
@@ -1,6 +0,0 @@
1
- import { FC } from 'react';
2
- declare const Hider: FC<{
3
- children: any;
4
- hide: boolean;
5
- }>;
6
- export default Hider;
@@ -1,5 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- const t = ({ children: e, hide: r }) => /* @__PURE__ */ o("div", { className: r ? "d-none" : "", children: e });
3
- export {
4
- t as default
5
- };
@@ -1 +0,0 @@
1
- export { default as Hider } from './Hider';
@@ -1 +0,0 @@
1
- "use strict";const l=require("react/jsx-runtime"),d=require("antd"),s=require("react"),j=require("../../locale/index.cjs.js");;/* empty css */const x=require("../../hooks/NavigatorHooks.cjs.js"),y=s.forwardRef(({className:r,to:n,onClick:e,tooltip:a,...t},u)=>{const{t:i}=j.useTranslationLib(),o=x.useNavigateOptional(),c=s.useMemo(()=>l.jsx(d.Button,{ref:u,onClick:e??(n&&o?()=>o(n):void 0),className:r,...t,children:t.children}),[r,o,e,t,i,n]);return a?l.jsx(d.Tooltip,{title:a,children:c}):c}),q=s.forwardRef(({className:r,to:n,onClick:e,tooltip:a,...t},u)=>{const i=x.useNavigateOptional(),[o,c]=s.useState(!1),f=s.useCallback(async h=>{try{return c(!0),await e(h)}finally{c(!1)}},[e]),g=s.useMemo(()=>l.jsx(d.Button,{ref:u,loading:o||t.loading,onClick:e?f:n?()=>{i?i==null||i(n):window.location.href=n}:void 0,className:r,...t}),[f,r,o,i,e,t,n,u]);return a?l.jsx(d.Tooltip,{title:a,children:g}):g});q.displayName="ButtonComponent.Async";y.Async=q;module.exports=y;
@@ -1,11 +0,0 @@
1
- import { ButtonProps } from 'antd';
2
- import { default as React } from 'react';
3
- export interface ButtonComponentProps extends ButtonProps {
4
- to?: string | number;
5
- tooltip?: string | undefined;
6
- }
7
- type ComponentType = React.ForwardRefExoticComponent<ButtonComponentProps & React.RefAttributes<HTMLElement>> & {
8
- Async: React.ForwardRefExoticComponent<ButtonComponentProps & React.RefAttributes<HTMLElement>>;
9
- };
10
- declare const _default: ComponentType;
11
- export default _default;
@@ -1,57 +0,0 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { Button as u, Tooltip as f } from "antd";
3
- import { forwardRef as y, useMemo as g, useState as v, useCallback as A } from "react";
4
- import { useTranslationLib as B } from "../../locale/index.es.js";
5
- /* empty css */
6
- import { useNavigateOptional as h } from "../../hooks/NavigatorHooks.es.js";
7
- const p = y(
8
- ({ className: r, to: n, onClick: t, tooltip: a, ...o }, l) => {
9
- const { t: e } = B(), i = h(), s = g(
10
- () => /* @__PURE__ */ c(
11
- u,
12
- {
13
- ref: l,
14
- onClick: t ?? (n && i ? () => i(n) : void 0),
15
- className: r,
16
- ...o,
17
- children: o.children
18
- }
19
- ),
20
- [r, i, t, o, e, n]
21
- );
22
- return a ? /* @__PURE__ */ c(f, { title: a, children: s }) : s;
23
- }
24
- ), b = y(
25
- ({ className: r, to: n, onClick: t, tooltip: a, ...o }, l) => {
26
- const e = h(), [i, s] = v(!1), d = A(
27
- async (w) => {
28
- try {
29
- return s(!0), await t(w);
30
- } finally {
31
- s(!1);
32
- }
33
- },
34
- [t]
35
- ), m = g(
36
- () => /* @__PURE__ */ c(
37
- u,
38
- {
39
- ref: l,
40
- loading: i || o.loading,
41
- onClick: t ? d : n ? () => {
42
- e ? e == null || e(n) : window.location.href = n;
43
- } : void 0,
44
- className: r,
45
- ...o
46
- }
47
- ),
48
- [d, r, i, e, t, o, n, l]
49
- );
50
- return a ? /* @__PURE__ */ c(f, { title: a, children: m }) : m;
51
- }
52
- );
53
- b.displayName = "ButtonComponent.Async";
54
- p.Async = b;
55
- export {
56
- p as default
57
- };
@@ -1 +0,0 @@
1
- "use strict";const n=require("react/jsx-runtime"),i=require("@ant-design/icons"),r=require("./Button.cjs.js"),s=require("../../locale/index.cjs.js");function u({value:t,onClick:e}){const{t:o}=s.useTranslationLib();return n.jsx(r,{type:"link",onClick:()=>e(t),icon:n.jsx(i.CopyOutlined,{}),tooltip:o("clone")})}module.exports=u;
@@ -1,6 +0,0 @@
1
- interface Props<T> {
2
- value: T;
3
- onClick: (value: T) => void;
4
- }
5
- declare function CloneButtonTable<T>({ value, onClick }: Props<T>): import("react/jsx-runtime").JSX.Element;
6
- export default CloneButtonTable;
@@ -1,19 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { CopyOutlined as r } from "@ant-design/icons";
3
- import e from "./Button.es.js";
4
- import { useTranslationLib as l } from "../../locale/index.es.js";
5
- function a({ value: t, onClick: n }) {
6
- const { t: i } = l();
7
- return /* @__PURE__ */ o(
8
- e,
9
- {
10
- type: "link",
11
- onClick: () => n(t),
12
- icon: /* @__PURE__ */ o(r, {}),
13
- tooltip: i("clone")
14
- }
15
- );
16
- }
17
- export {
18
- a as default
19
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),p=require("@ant-design/icons"),g=require("antd"),n=require("react"),q=require("./Button.cjs.js"),C=require("../../locale/index.cjs.js");function T({shouldConfirm:j=!0,block:r,value:i,loading:u,onClick:c,text:l,disabled:a,type:d="link"}){const{t}=C.useTranslationLib(),o=n.useMemo(()=>l??t("str.delete"),[l,t]),[f,s]=n.useState(!1);n.useEffect(()=>{s(u??!1)},[u]);const x=n.useCallback(async()=>{try{s(!0),await c(i)}finally{s(!1)}},[c,i]);return j?e.jsx(g.Popconfirm,{title:t("qus.doYouWantToDelete"),okText:o.toUpperCase(),cancelText:t("str.no").toUpperCase(),onConfirm:x,children:e.jsx(q,{tooltip:o,icon:e.jsx(p.DeleteOutlined,{}),disabled:a,loading:f,type:d,danger:!0,block:r})}):e.jsx(q,{tooltip:o,icon:e.jsx(p.DeleteOutlined,{}),disabled:a,loading:f,type:d,danger:!0,block:r,onClick:x})}module.exports=T;
@@ -1,13 +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
- }
12
- declare function DeleteButtonTable<T>({ shouldConfirm, block, value, loading, onClick, text, disabled, type, }: Props<T>): import("react/jsx-runtime").JSX.Element;
13
- export default DeleteButtonTable;
@@ -1,64 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { DeleteOutlined as p } from "@ant-design/icons";
3
- import { Popconfirm as g } from "antd";
4
- import { useMemo as T, useState as x, useEffect as k, useCallback as D } from "react";
5
- import d from "./Button.es.js";
6
- import { useTranslationLib as _ } from "../../locale/index.es.js";
7
- function q({
8
- shouldConfirm: C = !0,
9
- block: r,
10
- value: i,
11
- loading: a,
12
- onClick: l,
13
- text: s,
14
- disabled: f,
15
- type: u = "link"
16
- }) {
17
- const { t: o } = _(), e = T(() => s ?? o("str.delete"), [s, o]), [m, n] = x(!1);
18
- k(() => {
19
- n(a ?? !1);
20
- }, [a]);
21
- const c = D(async () => {
22
- try {
23
- n(!0), await l(i);
24
- } finally {
25
- n(!1);
26
- }
27
- }, [l, i]);
28
- return C ? /* @__PURE__ */ t(
29
- g,
30
- {
31
- title: o("qus.doYouWantToDelete"),
32
- okText: e.toUpperCase(),
33
- cancelText: o("str.no").toUpperCase(),
34
- onConfirm: c,
35
- children: /* @__PURE__ */ t(
36
- d,
37
- {
38
- tooltip: e,
39
- icon: /* @__PURE__ */ t(p, {}),
40
- disabled: f,
41
- loading: m,
42
- type: u,
43
- danger: !0,
44
- block: r
45
- }
46
- )
47
- }
48
- ) : /* @__PURE__ */ t(
49
- d,
50
- {
51
- tooltip: e,
52
- icon: /* @__PURE__ */ t(p, {}),
53
- disabled: f,
54
- loading: m,
55
- type: u,
56
- danger: !0,
57
- block: r,
58
- onClick: c
59
- }
60
- );
61
- }
62
- export {
63
- q as default
64
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("@ant-design/icons"),r=require("react"),l=require("../../locale/index.cjs.js"),a=require("./Button.cjs.js");function x({value:t,onClick:e}){const[s,n]=r.useState(!1),{t:i}=l.useTranslationLib(),c=r.useCallback(async()=>{n(!0),e(t).finally(()=>n(!1))},[e,t]);return o.jsx(a,{loading:s,type:"link",onClick:c,icon:o.jsx(u.ExportOutlined,{}),tooltip:i("str.export")})}exports.ExportButton=x;
@@ -1,4 +0,0 @@
1
- export declare function ExportButton<T>({ value, onClick, }: {
2
- value: T;
3
- onClick: (value: T) => Promise<any>;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,26 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { ExportOutlined as p } from "@ant-design/icons";
3
- import { useState as l, useCallback as m } from "react";
4
- import { useTranslationLib as a } from "../../locale/index.es.js";
5
- import c from "./Button.es.js";
6
- function y({
7
- value: t,
8
- onClick: o
9
- }) {
10
- const [i, n] = l(!1), { t: e } = a(), s = m(async () => {
11
- n(!0), o(t).finally(() => n(!1));
12
- }, [o, t]);
13
- return /* @__PURE__ */ r(
14
- c,
15
- {
16
- loading: i,
17
- type: "link",
18
- onClick: s,
19
- icon: /* @__PURE__ */ r(p, {}),
20
- tooltip: e("str.export")
21
- }
22
- );
23
- }
24
- export {
25
- y as ExportButton
26
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),p=require("@ant-design/icons"),j=require("antd"),n=require("react"),g=require("../../locale/index.cjs.js"),q=require("./Button.cjs.js");function T({shouldConfirm:C=!0,block:i,value:s,loading:c,onClick:u,text:a,disabled:l,type:d="link"}){const{t}=g.useTranslationLib(),o=n.useMemo(()=>a??t("str.hide"),[a,t]),[f,r]=n.useState(!1);n.useEffect(()=>{r(c??!1)},[c]);const x=n.useCallback(async()=>{try{r(!0),await u(s)}finally{r(!1)}},[u,s]);return C?e.jsx(j.Popconfirm,{title:t("qus.doYouWantToHide"),okText:o.toUpperCase(),cancelText:t("str.no").toUpperCase(),onConfirm:x,children:e.jsx(q,{tooltip:o,icon:e.jsx(p.DownCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:i})}):e.jsx(q,{tooltip:o,icon:e.jsx(p.DownCircleOutlined,{}),disabled:l,loading:f,type:d,danger:!0,block:i,onClick:x})}module.exports=T;
@@ -1,13 +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
- }
12
- declare function HideButtonTable<T>({ shouldConfirm, block, value, loading, onClick, text, disabled, type, }: Props<T>): import("react/jsx-runtime").JSX.Element;
13
- export default HideButtonTable;
@@ -1,67 +0,0 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { DownCircleOutlined as p } from "@ant-design/icons";
3
- import { Popconfirm as g } from "antd";
4
- import { useMemo as T, useState as x, useEffect as k, useCallback as _ } from "react";
5
- import { useTranslationLib as h } from "../../locale/index.es.js";
6
- import d from "./Button.es.js";
7
- function j({
8
- shouldConfirm: C = !0,
9
- block: r,
10
- value: i,
11
- loading: a,
12
- onClick: s,
13
- text: l,
14
- disabled: f,
15
- type: u = "link"
16
- }) {
17
- const { t } = h(), e = T(() => l ?? t("str.hide"), [l, t]), [m, n] = x(!1);
18
- k(() => {
19
- n(a ?? !1);
20
- }, [a]);
21
- const c = _(
22
- async () => {
23
- try {
24
- n(!0), await s(i);
25
- } finally {
26
- n(!1);
27
- }
28
- },
29
- [s, i]
30
- );
31
- return C ? /* @__PURE__ */ o(
32
- g,
33
- {
34
- title: t("qus.doYouWantToHide"),
35
- okText: e.toUpperCase(),
36
- cancelText: t("str.no").toUpperCase(),
37
- onConfirm: c,
38
- children: /* @__PURE__ */ o(
39
- d,
40
- {
41
- tooltip: e,
42
- icon: /* @__PURE__ */ o(p, {}),
43
- disabled: f,
44
- loading: m,
45
- type: u,
46
- danger: !0,
47
- block: r
48
- }
49
- )
50
- }
51
- ) : /* @__PURE__ */ o(
52
- d,
53
- {
54
- tooltip: e,
55
- icon: /* @__PURE__ */ o(p, {}),
56
- disabled: f,
57
- loading: m,
58
- type: u,
59
- danger: !0,
60
- block: r,
61
- onClick: c
62
- }
63
- );
64
- }
65
- export {
66
- j as default
67
- };
@@ -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"),x=require("../../locale/index.cjs.js"),b=require("./Button.cjs.js");function q({onClick:o,children:c,accept:u,className:l,disabled:a,type:d="link"}){const[f,i]=n.useState(!1),{t:p}=x.useTranslationLib(),e=n.useRef(null),y=n.useCallback(()=>{m(t=>t+1),e.current&&setTimeout(()=>{var t;(t=e==null?void 0:e.current)==null||t.click()},10)},[]),[g,m]=n.useState(0),j=n.useCallback(async t=>{i(!0);const r=t.target.files[0];r&&await o(r),i(!1)},[o]);return s.jsxs("div",{className:l,children:[s.jsx("input",{type:"file",style:{display:"none"},ref:e,onChange:j,accept:u},g),s.jsx(b,{loading:f,type:d,disabled:a,onClick:y,icon:s.jsx(k.ImportOutlined,{}),tooltip:p("str.import"),children:c})]})}exports.ImportButton=q;
@@ -1,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,55 +0,0 @@
1
- import { jsxs as h, jsx as n } from "react/jsx-runtime";
2
- import { ImportOutlined as x } from "@ant-design/icons";
3
- import { useState as s, useRef as b, useCallback as l } from "react";
4
- import { useTranslationLib as j } from "../../locale/index.es.js";
5
- import B from "./Button.es.js";
6
- function I({
7
- onClick: e,
8
- children: c,
9
- accept: a,
10
- className: m,
11
- disabled: u,
12
- type: f = "link"
13
- }) {
14
- const [p, i] = s(!1), { t: d } = j(), o = b(null), y = l(() => {
15
- k((t) => t + 1), o.current && setTimeout(() => {
16
- var t;
17
- (t = o == null ? void 0 : o.current) == null || t.click();
18
- }, 10);
19
- }, []), [g, k] = s(0), C = l(
20
- async (t) => {
21
- i(!0);
22
- const r = t.target.files[0];
23
- r && await e(r), i(!1);
24
- },
25
- [e]
26
- );
27
- return /* @__PURE__ */ h("div", { className: m, children: [
28
- /* @__PURE__ */ n(
29
- "input",
30
- {
31
- type: "file",
32
- style: { display: "none" },
33
- ref: o,
34
- onChange: C,
35
- accept: a
36
- },
37
- g
38
- ),
39
- /* @__PURE__ */ n(
40
- B,
41
- {
42
- loading: p,
43
- type: f,
44
- disabled: u,
45
- onClick: y,
46
- icon: /* @__PURE__ */ n(x, {}),
47
- tooltip: d("str.import"),
48
- children: c
49
- }
50
- )
51
- ] });
52
- }
53
- export {
54
- I as ImportButton
55
- };
@@ -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"),j=({size:n,block:r,className:o,type:u="primary",onClick:e,title:i,to:s})=>{const{t:c}=a.useTranslationLib();return t.jsx(d,{type:u,className:o,to:s,block:r,size:n,onClick:e&&(()=>e(!0)),icon:t.jsx(l.PlusOutlined,{}),children:i??c("str.new")})};exports.NewButton=j;
@@ -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,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
- };