xph-crud 0.0.1

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 (78) hide show
  1. package/README.md +64 -0
  2. package/dist/index.js +3246 -0
  3. package/dist/index.umd.cjs +25 -0
  4. package/dist/style.css +1 -0
  5. package/dist/types/common/index.d.ts +3 -0
  6. package/dist/types/common/src/componnets/actions/actions.d.ts +4 -0
  7. package/dist/types/common/src/componnets/actions/components/button.d.ts +4 -0
  8. package/dist/types/common/src/componnets/actions/components/dropdown.d.ts +4 -0
  9. package/dist/types/common/src/componnets/actions/components/index.d.ts +5 -0
  10. package/dist/types/common/src/componnets/actions/components/more.d.ts +7 -0
  11. package/dist/types/common/src/componnets/actions/hooks/index.d.ts +8 -0
  12. package/dist/types/common/src/componnets/actions/hooks/useActionItems.d.ts +6 -0
  13. package/dist/types/common/src/componnets/actions/hooks/useActionsProps.d.ts +5 -0
  14. package/dist/types/common/src/componnets/actions/hooks/useExtendActions.d.ts +5 -0
  15. package/dist/types/common/src/componnets/actions/hooks/useRenderContent.d.ts +6 -0
  16. package/dist/types/common/src/componnets/actions/types/actionItem.d.ts +67 -0
  17. package/dist/types/common/src/componnets/actions/types/actions.d.ts +15 -0
  18. package/dist/types/common/src/componnets/actions/types/index.d.ts +2 -0
  19. package/dist/types/common/src/componnets/dialog/dialog.d.ts +2 -0
  20. package/dist/types/common/src/componnets/dialog/types/dialog.d.ts +9 -0
  21. package/dist/types/common/src/componnets/index.d.ts +5 -0
  22. package/dist/types/common/src/hooks/index.d.ts +3 -0
  23. package/dist/types/common/src/hooks/useExtendCompProps.d.ts +45 -0
  24. package/dist/types/common/src/utils/index.d.ts +1 -0
  25. package/dist/types/form/index.d.ts +5 -0
  26. package/dist/types/form/src/components/ActionGroup/index.d.ts +6 -0
  27. package/dist/types/form/src/components/ApiAutoComplete/index.d.ts +15 -0
  28. package/dist/types/form/src/components/ApiSelect/index.d.ts +15 -0
  29. package/dist/types/form/src/components/ApiTransfer/index.d.ts +13 -0
  30. package/dist/types/form/src/components/ApiTreeSelect/index.d.ts +15 -0
  31. package/dist/types/form/src/components/AutoUpload/index.d.ts +28 -0
  32. package/dist/types/form/src/components/Collapse/index.d.ts +7 -0
  33. package/dist/types/form/src/components/FormItem/index.d.ts +11 -0
  34. package/dist/types/form/src/components/index.d.ts +5 -0
  35. package/dist/types/form/src/form.d.ts +8 -0
  36. package/dist/types/form/src/helper.d.ts +14 -0
  37. package/dist/types/form/src/hooks/index.d.ts +16 -0
  38. package/dist/types/form/src/hooks/useApiComonentCache.d.ts +24 -0
  39. package/dist/types/form/src/hooks/useExtendForm.d.ts +5 -0
  40. package/dist/types/form/src/hooks/useForm.d.ts +20 -0
  41. package/dist/types/form/src/hooks/useFormAction.d.ts +12 -0
  42. package/dist/types/form/src/hooks/useFormCollapse.d.ts +11 -0
  43. package/dist/types/form/src/hooks/useFormItem.d.ts +40 -0
  44. package/dist/types/form/src/hooks/useFormProps.d.ts +6 -0
  45. package/dist/types/form/src/hooks/useFormValues.d.ts +11 -0
  46. package/dist/types/form/src/types/component.d.ts +35 -0
  47. package/dist/types/form/src/types/form.d.ts +86 -0
  48. package/dist/types/form/src/types/formItem.d.ts +54 -0
  49. package/dist/types/form/src/types/index.d.ts +3 -0
  50. package/dist/types/index.d.ts +3 -0
  51. package/dist/types/table/index.d.ts +4 -0
  52. package/dist/types/table/src/components/searchForm/components/cacheForm/index.d.ts +6 -0
  53. package/dist/types/table/src/components/searchForm/index.d.ts +9 -0
  54. package/dist/types/table/src/components/table/components/cellFunc/cellFunc.d.ts +5 -0
  55. package/dist/types/table/src/components/table/components/cellFunc/components/actions.d.ts +5 -0
  56. package/dist/types/table/src/components/table/components/cellFunc/components/index.d.ts +12 -0
  57. package/dist/types/table/src/components/table/components/cellFunc/components/link.d.ts +5 -0
  58. package/dist/types/table/src/components/table/components/cellFunc/types/cellFunc.d.ts +43 -0
  59. package/dist/types/table/src/components/table/components/cellFunc/types/index.d.ts +1 -0
  60. package/dist/types/table/src/components/table/index.d.ts +9 -0
  61. package/dist/types/table/src/hooks/index.d.ts +18 -0
  62. package/dist/types/table/src/hooks/useExtendTable.d.ts +7 -0
  63. package/dist/types/table/src/hooks/usePagination.d.ts +18 -0
  64. package/dist/types/table/src/hooks/useRowSelection.d.ts +9 -0
  65. package/dist/types/table/src/hooks/useSearchForm.d.ts +6 -0
  66. package/dist/types/table/src/hooks/useTable.d.ts +24 -0
  67. package/dist/types/table/src/hooks/useTableColumns.d.ts +6 -0
  68. package/dist/types/table/src/hooks/useTableProps.d.ts +6 -0
  69. package/dist/types/table/src/hooks/useTableScroll.d.ts +10 -0
  70. package/dist/types/table/src/hooks/useTopToolbar.d.ts +7 -0
  71. package/dist/types/table/src/table.d.ts +8 -0
  72. package/dist/types/table/src/types/apiTable.d.ts +35 -0
  73. package/dist/types/table/src/types/column.d.ts +32 -0
  74. package/dist/types/table/src/types/crudForm.d.ts +3 -0
  75. package/dist/types/table/src/types/index.d.ts +5 -0
  76. package/dist/types/table/src/types/searchForm.d.ts +9 -0
  77. package/dist/types/table/src/types/table.d.ts +25 -0
  78. package/package.json +63 -0
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ ## 引入
2
+
3
+ ```bash
4
+ npm install xph-crud --save
5
+ ```
6
+
7
+ ```bash
8
+ yarn add xph-crud
9
+ ```
10
+
11
+ ```bash
12
+ pnpm install xph-crud --save
13
+ ```
14
+
15
+ ## 用法
16
+
17
+ 引入 xph-crud 全局样式
18
+
19
+ ```tsx
20
+ /** main.tsx */
21
+
22
+ import React from "react";
23
+ import ReactDOM from "react-dom/client";
24
+ import App from "./App.tsx";
25
+ /** 引入 xph-crud 全局样式 */
26
+ import "xph-crud/dist/style.css";
27
+
28
+ ReactDOM.createRoot(document.getElementById("root")!).render(
29
+ <React.StrictMode>
30
+ <App />
31
+ </React.StrictMode>
32
+ );
33
+ ```
34
+
35
+ 组件使用
36
+
37
+ ```tsx
38
+ /** App.tsx */
39
+
40
+ import { XphForm, IXphFormProps } from "xph-crud";
41
+
42
+ function App() {
43
+ const formProps: IXphFormProps = {
44
+ items: [
45
+ {
46
+ name: "name",
47
+ label: "姓名",
48
+ component: "Input",
49
+ },
50
+ ],
51
+ };
52
+ return (
53
+ <>
54
+ <XphForm {...formProps}></XphForm>
55
+ </>
56
+ );
57
+ }
58
+
59
+ export default App;
60
+ ```
61
+
62
+ ## 注意事项
63
+
64
+ xph-crud 是基于 ant-design、ant-design-icons 开发的组件库,所以使用时需同时引入 [antd](https://github.com/ant-design/ant-design)、[@ant-design/icons](https://github.com/ant-design/ant-design-icons/tree/master)