@hw-component/table 0.0.9-beta-v13 → 0.0.9-beta-v16
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.
- package/package.json +1 -1
- package/src/components/Table.tsx +1 -1
- package/tsconfig.json +2 -2
- package/es/src/components/modal.d.ts +0 -116
- package/lib/src/components/modal.d.ts +0 -116
- /package/es/{src/components/HTableHeader → HTableHeader}/defaultFormRender.d.ts +0 -0
- /package/es/{src/components/HTableHeader → HTableHeader}/defaultSubComponent.d.ts +0 -0
- /package/es/{src/components/HTableHeader → HTableHeader}/hooks.d.ts +0 -0
- /package/es/{src/components/HTableHeader → HTableHeader}/index.d.ts +0 -0
- /package/es/{src/components/HTableHeader → HTableHeader}/modal.d.ts +0 -0
- /package/es/{src/components/Table.d.ts → Table.d.ts} +0 -0
- /package/es/{src/components/context.d.ts → context.d.ts} +0 -0
- /package/es/{src/components/hooks → hooks}/index.d.ts +0 -0
- /package/es/{src/components/index.d.ts → index.d.ts} +0 -0
- /package/lib/{src/components/HTableHeader → HTableHeader}/defaultFormRender.d.ts +0 -0
- /package/lib/{src/components/HTableHeader → HTableHeader}/defaultSubComponent.d.ts +0 -0
- /package/lib/{src/components/HTableHeader → HTableHeader}/hooks.d.ts +0 -0
- /package/lib/{src/components/HTableHeader → HTableHeader}/index.d.ts +0 -0
- /package/lib/{src/components/HTableHeader → HTableHeader}/modal.d.ts +0 -0
- /package/lib/{src/components/Table.d.ts → Table.d.ts} +0 -0
- /package/lib/{src/components/context.d.ts → context.d.ts} +0 -0
- /package/lib/{src/components/hooks → hooks}/index.d.ts +0 -0
- /package/lib/{src/components/index.d.ts → index.d.ts} +0 -0
- /package/src/components/{modal.ts → modal.d.ts} +0 -0
package/package.json
CHANGED
package/src/components/Table.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import useCurrentTable from "./hooks/useCurrentTable";
|
|
|
4
4
|
import useRowObj from "./hooks/useRowObj";
|
|
5
5
|
import { HTableContext } from "./context";
|
|
6
6
|
import { Space } from "antd";
|
|
7
|
-
import type {
|
|
7
|
+
import type { HTableProps } from "./modal";
|
|
8
8
|
import useReq from "./hooks/useReq";
|
|
9
9
|
import useDispatch from "./hooks/useDispatch";
|
|
10
10
|
import { useState } from "react";
|
package/tsconfig.json
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"typeRoots": ["./node_modules/@types/", "./src/typings.d.ts"],
|
|
23
23
|
"paths": {
|
|
24
24
|
"@/*": ["./src/*"]
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
26
|
},
|
|
27
|
-
"include": ["src/**/*"
|
|
27
|
+
"include": ["src/**/*"],
|
|
28
28
|
"exclude": ["node_modules", "**/*.spec.ts", "**/*.css", "**/*.less"]
|
|
29
29
|
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import type { ProColumns } from "@ant-design/pro-table/lib/typing";
|
|
2
|
-
import type { ProTableProps } from "@ant-design/pro-table";
|
|
3
|
-
import type { HItemProps, HFormInstance } from "@hw-component/form/es/Form/modal";
|
|
4
|
-
import type { ColProps, FormInstance } from "antd";
|
|
5
|
-
import type React from "react";
|
|
6
|
-
import type { ModalProps } from "antd";
|
|
7
|
-
import type { TableProps } from "antd/lib/table";
|
|
8
|
-
import type { AffixProps } from "antd/lib/affix";
|
|
9
|
-
export interface RowObj {
|
|
10
|
-
keys?: React.Key[];
|
|
11
|
-
rowData?: any[];
|
|
12
|
-
selectAll?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface ResultModal {
|
|
15
|
-
records: any[];
|
|
16
|
-
current: string;
|
|
17
|
-
size: string;
|
|
18
|
-
total: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ParamsModal extends Record<string, any> {
|
|
21
|
-
size?: number;
|
|
22
|
-
current?: number;
|
|
23
|
-
}
|
|
24
|
-
interface HColumns extends Omit<ProColumns, "render" | "title"> {
|
|
25
|
-
render?: (dom: React.ReactNode, data: any, index: number, tableInstance: HTableInstance) => React.ReactNode;
|
|
26
|
-
showSearch?: boolean;
|
|
27
|
-
searchType?: HItemProps["type"];
|
|
28
|
-
searchRender?: (item: HItemProps, node: React.ReactNode, form: FormInstance, tableInstance: HTableInstance) => React.ReactNode;
|
|
29
|
-
rowSelectionTitle?: boolean;
|
|
30
|
-
title?: string | React.ReactNode;
|
|
31
|
-
}
|
|
32
|
-
interface BcItemModal {
|
|
33
|
-
childrenDataIndex?: ConfigItemModal[] | string[];
|
|
34
|
-
titleStr?: string;
|
|
35
|
-
}
|
|
36
|
-
export type ConfigItemModal = Omit<HItemProps, "render" | "type"> & HColumns & BcItemModal;
|
|
37
|
-
export type ConfigDataModal = ConfigItemModal[];
|
|
38
|
-
export type ActionRenderFn = (selectedRowKeys: RowObj, tableInstance: HTableInstance) => React.ReactNode;
|
|
39
|
-
export type FooterBtnRenderFn = (dom: React.ReactNode, total: string, selectedRowKeys: RowObj, setAllCheck: (row: RowObj) => void) => React.ReactNode;
|
|
40
|
-
export type actionFn = (...arg: any[]) => void;
|
|
41
|
-
export interface RowSelectionOuter {
|
|
42
|
-
allPageCheck?: boolean;
|
|
43
|
-
}
|
|
44
|
-
export type HRowSelection = RowSelectionOuter & (TableProps<any>["rowSelection"] & {
|
|
45
|
-
alwaysShowAlert?: boolean;
|
|
46
|
-
});
|
|
47
|
-
export interface HTableProps extends Omit<ProTableProps<any, any>, "request" | "dataSource" | "rowKey" | "rowSelection"> {
|
|
48
|
-
request?: (params: ParamsModal) => Promise<ResultModal>;
|
|
49
|
-
configData: ConfigDataModal;
|
|
50
|
-
searchSpan?: ColProps;
|
|
51
|
-
table?: HTableInstance;
|
|
52
|
-
actionRender?: ActionRenderFn;
|
|
53
|
-
emptyRender?: (tableInstance: HTableInstance) => React.ReactNode;
|
|
54
|
-
errorRender?: (tableInstance: HTableInstance, error: Error) => React.ReactNode;
|
|
55
|
-
hideHeader?: boolean;
|
|
56
|
-
action?: Record<string, actionFn>;
|
|
57
|
-
headerStyle?: React.CSSProperties;
|
|
58
|
-
tableStyle?: React.CSSProperties;
|
|
59
|
-
spaceSize?: number;
|
|
60
|
-
className?: string;
|
|
61
|
-
error?: Error;
|
|
62
|
-
reload?: (params: any) => Promise<any>;
|
|
63
|
-
manual?: boolean;
|
|
64
|
-
dataSource?: ResultModal;
|
|
65
|
-
paginationStyle?: React.CSSProperties;
|
|
66
|
-
rowKey?: string;
|
|
67
|
-
allPageCheck?: boolean;
|
|
68
|
-
rowSelection?: HRowSelection | false;
|
|
69
|
-
affixProps?: AffixProps | false;
|
|
70
|
-
goTop?: boolean;
|
|
71
|
-
optionsRender?: (node: React.ReactNode) => React.ReactNode;
|
|
72
|
-
onFinish?: (value: any) => Promise<any>;
|
|
73
|
-
paginationActionRender?: (tableInstance: HTableInstance) => React.ReactNode;
|
|
74
|
-
localSorter?: boolean;
|
|
75
|
-
formInitValues?: Record<string, any>;
|
|
76
|
-
}
|
|
77
|
-
export interface TableInstance {
|
|
78
|
-
reload: (params?: ParamsModal) => Promise<any>;
|
|
79
|
-
setSelectedRowData: (keys: React.Key[], data: any) => void;
|
|
80
|
-
dispatch: (key: string, params: any) => void;
|
|
81
|
-
reloadWithParams: (params?: ParamsModal) => Promise<any>;
|
|
82
|
-
getParams: () => any;
|
|
83
|
-
settingKeys: {
|
|
84
|
-
keys?: string[];
|
|
85
|
-
checkCols?: ConfigDataModal;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
export interface HTableInstance {
|
|
89
|
-
form: HFormInstance;
|
|
90
|
-
table: TableInstance;
|
|
91
|
-
}
|
|
92
|
-
export interface DialogParamsModal {
|
|
93
|
-
configData?: HTableProps["configData"];
|
|
94
|
-
request?: HTableProps["request"];
|
|
95
|
-
params?: Record<string, any>;
|
|
96
|
-
title?: string | React.ReactNode;
|
|
97
|
-
}
|
|
98
|
-
export interface HOnDiaLogTableInstance {
|
|
99
|
-
show: (params?: DialogParamsModal) => void;
|
|
100
|
-
hide: () => void;
|
|
101
|
-
}
|
|
102
|
-
export interface HDiaLogTableInstance {
|
|
103
|
-
form: HFormInstance;
|
|
104
|
-
table: TableInstance;
|
|
105
|
-
show: (params?: DialogParamsModal) => void;
|
|
106
|
-
hide: () => void;
|
|
107
|
-
params: any;
|
|
108
|
-
}
|
|
109
|
-
export interface ModalTableProps extends ModalProps {
|
|
110
|
-
tableProps?: Omit<HTableProps, "configData" | "request">;
|
|
111
|
-
dialogTable?: HDiaLogTableInstance;
|
|
112
|
-
params?: Record<string, any>;
|
|
113
|
-
configData?: HTableProps["configData"];
|
|
114
|
-
request?: HTableProps["request"];
|
|
115
|
-
}
|
|
116
|
-
export {};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import type { ProColumns } from "@ant-design/pro-table/lib/typing";
|
|
2
|
-
import type { ProTableProps } from "@ant-design/pro-table";
|
|
3
|
-
import type { HItemProps, HFormInstance } from "@hw-component/form/es/Form/modal";
|
|
4
|
-
import type { ColProps, FormInstance } from "antd";
|
|
5
|
-
import type React from "react";
|
|
6
|
-
import type { ModalProps } from "antd";
|
|
7
|
-
import type { TableProps } from "antd/lib/table";
|
|
8
|
-
import type { AffixProps } from "antd/lib/affix";
|
|
9
|
-
export interface RowObj {
|
|
10
|
-
keys?: React.Key[];
|
|
11
|
-
rowData?: any[];
|
|
12
|
-
selectAll?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface ResultModal {
|
|
15
|
-
records: any[];
|
|
16
|
-
current: string;
|
|
17
|
-
size: string;
|
|
18
|
-
total: string;
|
|
19
|
-
}
|
|
20
|
-
export interface ParamsModal extends Record<string, any> {
|
|
21
|
-
size?: number;
|
|
22
|
-
current?: number;
|
|
23
|
-
}
|
|
24
|
-
interface HColumns extends Omit<ProColumns, "render" | "title"> {
|
|
25
|
-
render?: (dom: React.ReactNode, data: any, index: number, tableInstance: HTableInstance) => React.ReactNode;
|
|
26
|
-
showSearch?: boolean;
|
|
27
|
-
searchType?: HItemProps["type"];
|
|
28
|
-
searchRender?: (item: HItemProps, node: React.ReactNode, form: FormInstance, tableInstance: HTableInstance) => React.ReactNode;
|
|
29
|
-
rowSelectionTitle?: boolean;
|
|
30
|
-
title?: string | React.ReactNode;
|
|
31
|
-
}
|
|
32
|
-
interface BcItemModal {
|
|
33
|
-
childrenDataIndex?: ConfigItemModal[] | string[];
|
|
34
|
-
titleStr?: string;
|
|
35
|
-
}
|
|
36
|
-
export type ConfigItemModal = Omit<HItemProps, "render" | "type"> & HColumns & BcItemModal;
|
|
37
|
-
export type ConfigDataModal = ConfigItemModal[];
|
|
38
|
-
export type ActionRenderFn = (selectedRowKeys: RowObj, tableInstance: HTableInstance) => React.ReactNode;
|
|
39
|
-
export type FooterBtnRenderFn = (dom: React.ReactNode, total: string, selectedRowKeys: RowObj, setAllCheck: (row: RowObj) => void) => React.ReactNode;
|
|
40
|
-
export type actionFn = (...arg: any[]) => void;
|
|
41
|
-
export interface RowSelectionOuter {
|
|
42
|
-
allPageCheck?: boolean;
|
|
43
|
-
}
|
|
44
|
-
export type HRowSelection = RowSelectionOuter & (TableProps<any>["rowSelection"] & {
|
|
45
|
-
alwaysShowAlert?: boolean;
|
|
46
|
-
});
|
|
47
|
-
export interface HTableProps extends Omit<ProTableProps<any, any>, "request" | "dataSource" | "rowKey" | "rowSelection"> {
|
|
48
|
-
request?: (params: ParamsModal) => Promise<ResultModal>;
|
|
49
|
-
configData: ConfigDataModal;
|
|
50
|
-
searchSpan?: ColProps;
|
|
51
|
-
table?: HTableInstance;
|
|
52
|
-
actionRender?: ActionRenderFn;
|
|
53
|
-
emptyRender?: (tableInstance: HTableInstance) => React.ReactNode;
|
|
54
|
-
errorRender?: (tableInstance: HTableInstance, error: Error) => React.ReactNode;
|
|
55
|
-
hideHeader?: boolean;
|
|
56
|
-
action?: Record<string, actionFn>;
|
|
57
|
-
headerStyle?: React.CSSProperties;
|
|
58
|
-
tableStyle?: React.CSSProperties;
|
|
59
|
-
spaceSize?: number;
|
|
60
|
-
className?: string;
|
|
61
|
-
error?: Error;
|
|
62
|
-
reload?: (params: any) => Promise<any>;
|
|
63
|
-
manual?: boolean;
|
|
64
|
-
dataSource?: ResultModal;
|
|
65
|
-
paginationStyle?: React.CSSProperties;
|
|
66
|
-
rowKey?: string;
|
|
67
|
-
allPageCheck?: boolean;
|
|
68
|
-
rowSelection?: HRowSelection | false;
|
|
69
|
-
affixProps?: AffixProps | false;
|
|
70
|
-
goTop?: boolean;
|
|
71
|
-
optionsRender?: (node: React.ReactNode) => React.ReactNode;
|
|
72
|
-
onFinish?: (value: any) => Promise<any>;
|
|
73
|
-
paginationActionRender?: (tableInstance: HTableInstance) => React.ReactNode;
|
|
74
|
-
localSorter?: boolean;
|
|
75
|
-
formInitValues?: Record<string, any>;
|
|
76
|
-
}
|
|
77
|
-
export interface TableInstance {
|
|
78
|
-
reload: (params?: ParamsModal) => Promise<any>;
|
|
79
|
-
setSelectedRowData: (keys: React.Key[], data: any) => void;
|
|
80
|
-
dispatch: (key: string, params: any) => void;
|
|
81
|
-
reloadWithParams: (params?: ParamsModal) => Promise<any>;
|
|
82
|
-
getParams: () => any;
|
|
83
|
-
settingKeys: {
|
|
84
|
-
keys?: string[];
|
|
85
|
-
checkCols?: ConfigDataModal;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
export interface HTableInstance {
|
|
89
|
-
form: HFormInstance;
|
|
90
|
-
table: TableInstance;
|
|
91
|
-
}
|
|
92
|
-
export interface DialogParamsModal {
|
|
93
|
-
configData?: HTableProps["configData"];
|
|
94
|
-
request?: HTableProps["request"];
|
|
95
|
-
params?: Record<string, any>;
|
|
96
|
-
title?: string | React.ReactNode;
|
|
97
|
-
}
|
|
98
|
-
export interface HOnDiaLogTableInstance {
|
|
99
|
-
show: (params?: DialogParamsModal) => void;
|
|
100
|
-
hide: () => void;
|
|
101
|
-
}
|
|
102
|
-
export interface HDiaLogTableInstance {
|
|
103
|
-
form: HFormInstance;
|
|
104
|
-
table: TableInstance;
|
|
105
|
-
show: (params?: DialogParamsModal) => void;
|
|
106
|
-
hide: () => void;
|
|
107
|
-
params: any;
|
|
108
|
-
}
|
|
109
|
-
export interface ModalTableProps extends ModalProps {
|
|
110
|
-
tableProps?: Omit<HTableProps, "configData" | "request">;
|
|
111
|
-
dialogTable?: HDiaLogTableInstance;
|
|
112
|
-
params?: Record<string, any>;
|
|
113
|
-
configData?: HTableProps["configData"];
|
|
114
|
-
request?: HTableProps["request"];
|
|
115
|
-
}
|
|
116
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|