@platox/pivot-table 0.0.27 → 0.0.28
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/index.d.ts +97 -97
- package/lib/index.js +31121 -39238
- package/lib/index.umd.cjs +49 -49
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
export interface ModuleValueType {
|
|
2
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
-
id?: any;
|
|
4
|
-
type?:
|
|
5
|
-
| "text"
|
|
6
|
-
| "statistics"
|
|
7
|
-
| "chart-bar"
|
|
8
|
-
| "chart-bar-pile"
|
|
9
|
-
| "chart-bar-percentage"
|
|
10
|
-
| "chart-line"
|
|
11
|
-
| "chart-line-smooth"
|
|
12
|
-
| "chart-strip-bar"
|
|
13
|
-
| "chart-strip-bar-pile"
|
|
14
|
-
| "chart-strip-bar-percentage"
|
|
15
|
-
| "chart-pie"
|
|
16
|
-
| "chart-pie-circular"
|
|
17
|
-
| "calendar";
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
-
customData?: any;
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
customeStyle?: any;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface ModuleData {
|
|
25
|
-
id?: string;
|
|
26
|
-
i?: string;
|
|
27
|
-
w: number;
|
|
28
|
-
h: number;
|
|
29
|
-
x: number;
|
|
30
|
-
y: number;
|
|
31
|
-
type: ModuleValueType["type"];
|
|
32
|
-
customData?: ModuleValueType["customData"];
|
|
33
|
-
customeStyle?: ModuleValueType["customeStyle"];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface SourceDataFieldsTypes {
|
|
37
|
-
label: string;
|
|
38
|
-
enum: string | number[];
|
|
39
|
-
value: string;
|
|
40
|
-
type: "int" | "timestamp" | "string" | "bool";
|
|
41
|
-
}
|
|
42
|
-
export interface SourceDataTypes {
|
|
43
|
-
fields: SourceDataFieldsTypes[];
|
|
44
|
-
label: string;
|
|
45
|
-
value: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export type ModuleConfigDataTypes = ModuleData[];
|
|
49
|
-
|
|
50
|
-
export type ModuleDataApi = ({
|
|
51
|
-
id,
|
|
52
|
-
query,
|
|
53
|
-
}: {
|
|
54
|
-
id?: string;
|
|
55
|
-
query?: string;
|
|
56
|
-
}) => Promise<unknown>;
|
|
57
|
-
|
|
58
|
-
export type EnumDataApi = (url?: string) => Promise<unknown> | undefined;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
export interface DashboardWorkbenchProps {
|
|
62
|
-
sourceData?: SourceDataTypes[];
|
|
63
|
-
moduleConfigData?: ModuleConfigDataTypes;
|
|
64
|
-
fieldMap?: Record<string, string>;
|
|
65
|
-
lang?: "zh_CN" | "en_US";
|
|
66
|
-
moduleDataApi?: ModuleDataApi;
|
|
67
|
-
enumDataApi?: EnumDataApi;
|
|
68
|
-
onCreateModule?: (val: ModuleData) => Promise<ModuleData>;
|
|
69
|
-
onUpdateModule?: (val: ModuleData) => Promise<ModuleData>;
|
|
70
|
-
onDeleteModule?: (val: string) => Promise<void>;
|
|
71
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
-
onLayoutChange?: (layout: any) => void;
|
|
73
|
-
className?: string;
|
|
74
|
-
cols?: { lg: number; md: number; sm: number; xs: number; xxs: number };
|
|
75
|
-
rowHeight?: number;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
declare module "pivot-table" {
|
|
80
|
-
|
|
81
|
-
interface PivotTableProps {
|
|
82
|
-
sourceData?: SourceDataTypes[];
|
|
83
|
-
moduleConfigData?: ModuleConfigDataTypes;
|
|
84
|
-
fieldMap?: Record<string, string>;
|
|
85
|
-
lang?: "zh_CN" | "en_US";
|
|
86
|
-
moduleDataApi?: ModuleDataApi;
|
|
87
|
-
enumDataApi?: EnumDataApi;
|
|
88
|
-
onCreateModule?: (val: ModuleData) => Promise<ModuleData>;
|
|
89
|
-
onUpdateModule?: (val: ModuleData) => Promise<ModuleData>;
|
|
90
|
-
onDeleteModule?: (val: string) => Promise<void>;
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
92
|
-
onLayoutChange?: (layout: any) => void;
|
|
93
|
-
className?: string;
|
|
94
|
-
cols?: { lg: number; md: number; sm: number; xs: number; xxs: number };
|
|
95
|
-
rowHeight?: number;
|
|
96
|
-
}
|
|
97
|
-
export const PivotTable: React.FC<PivotTableProps>;
|
|
1
|
+
export interface ModuleValueType {
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
id?: any;
|
|
4
|
+
type?:
|
|
5
|
+
| "text"
|
|
6
|
+
| "statistics"
|
|
7
|
+
| "chart-bar"
|
|
8
|
+
| "chart-bar-pile"
|
|
9
|
+
| "chart-bar-percentage"
|
|
10
|
+
| "chart-line"
|
|
11
|
+
| "chart-line-smooth"
|
|
12
|
+
| "chart-strip-bar"
|
|
13
|
+
| "chart-strip-bar-pile"
|
|
14
|
+
| "chart-strip-bar-percentage"
|
|
15
|
+
| "chart-pie"
|
|
16
|
+
| "chart-pie-circular"
|
|
17
|
+
| "calendar";
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
+
customData?: any;
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
customeStyle?: any;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ModuleData {
|
|
25
|
+
id?: string;
|
|
26
|
+
i?: string;
|
|
27
|
+
w: number;
|
|
28
|
+
h: number;
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
type: ModuleValueType["type"];
|
|
32
|
+
customData?: ModuleValueType["customData"];
|
|
33
|
+
customeStyle?: ModuleValueType["customeStyle"];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface SourceDataFieldsTypes {
|
|
37
|
+
label: string;
|
|
38
|
+
enum: string | number[];
|
|
39
|
+
value: string;
|
|
40
|
+
type: "int" | "timestamp" | "string" | "bool";
|
|
41
|
+
}
|
|
42
|
+
export interface SourceDataTypes {
|
|
43
|
+
fields: SourceDataFieldsTypes[];
|
|
44
|
+
label: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type ModuleConfigDataTypes = ModuleData[];
|
|
49
|
+
|
|
50
|
+
export type ModuleDataApi = ({
|
|
51
|
+
id,
|
|
52
|
+
query,
|
|
53
|
+
}: {
|
|
54
|
+
id?: string;
|
|
55
|
+
query?: string;
|
|
56
|
+
}) => Promise<unknown>;
|
|
57
|
+
|
|
58
|
+
export type EnumDataApi = (url?: string) => Promise<unknown> | undefined;
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
export interface DashboardWorkbenchProps {
|
|
62
|
+
sourceData?: SourceDataTypes[];
|
|
63
|
+
moduleConfigData?: ModuleConfigDataTypes;
|
|
64
|
+
fieldMap?: Record<string, string>;
|
|
65
|
+
lang?: "zh_CN" | "en_US";
|
|
66
|
+
moduleDataApi?: ModuleDataApi;
|
|
67
|
+
enumDataApi?: EnumDataApi;
|
|
68
|
+
onCreateModule?: (val: ModuleData) => Promise<ModuleData>;
|
|
69
|
+
onUpdateModule?: (val: ModuleData) => Promise<ModuleData>;
|
|
70
|
+
onDeleteModule?: (val: string) => Promise<void>;
|
|
71
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
+
onLayoutChange?: (layout: any) => void;
|
|
73
|
+
className?: string;
|
|
74
|
+
cols?: { lg: number; md: number; sm: number; xs: number; xxs: number };
|
|
75
|
+
rowHeight?: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
declare module "pivot-table" {
|
|
80
|
+
|
|
81
|
+
interface PivotTableProps {
|
|
82
|
+
sourceData?: SourceDataTypes[];
|
|
83
|
+
moduleConfigData?: ModuleConfigDataTypes;
|
|
84
|
+
fieldMap?: Record<string, string>;
|
|
85
|
+
lang?: "zh_CN" | "en_US";
|
|
86
|
+
moduleDataApi?: ModuleDataApi;
|
|
87
|
+
enumDataApi?: EnumDataApi;
|
|
88
|
+
onCreateModule?: (val: ModuleData) => Promise<ModuleData>;
|
|
89
|
+
onUpdateModule?: (val: ModuleData) => Promise<ModuleData>;
|
|
90
|
+
onDeleteModule?: (val: string) => Promise<void>;
|
|
91
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
92
|
+
onLayoutChange?: (layout: any) => void;
|
|
93
|
+
className?: string;
|
|
94
|
+
cols?: { lg: number; md: number; sm: number; xs: number; xxs: number };
|
|
95
|
+
rowHeight?: number;
|
|
96
|
+
}
|
|
97
|
+
export const PivotTable: React.FC<PivotTableProps>;
|
|
98
98
|
}
|