@platox/pivot-table 0.0.7 → 0.0.8

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 (4) hide show
  1. package/index.d.ts +92 -86
  2. package/lib/index.js +12376 -11570
  3. package/lib/index.umd.cjs +48 -49
  4. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,87 +1,93 @@
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 = (id: unknown) => Promise<unknown>;
51
-
52
- export interface DashboardWorkbenchProps {
53
- sourceData?: SourceDataTypes[];
54
- moduleConfigData?: ModuleConfigDataTypes;
55
- fieldMap?: Record<string, string>;
56
- lang?: "zh_CN" | "en_US";
57
- moduleDataApi?: ModuleDataApi;
58
- onCreateModule?: (val: ModuleData) => Promise<ModuleData>;
59
- onUpdateModule?: (val: ModuleData) => Promise<ModuleData>;
60
- onDeleteModule?: (val: string) => Promise<void>;
61
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
62
- onLayoutChange?: (layout: any) => void;
63
- className?: string;
64
- cols?: { lg: number; md: number; sm: number; xs: number; xxs: number };
65
- rowHeight?: number;
66
- }
67
-
68
-
69
- declare module "pivot-table" {
70
-
71
- interface PivotTableProps {
72
- sourceData?: SourceDataTypes[];
73
- moduleConfigData?: ModuleConfigDataTypes;
74
- fieldMap?: Record<string, string>;
75
- lang?: "zh_CN" | "en_US";
76
- moduleDataApi?: ModuleDataApi;
77
- onCreateModule?: (val: ModuleData) => Promise<ModuleData>;
78
- onUpdateModule?: (val: ModuleData) => Promise<ModuleData>;
79
- onDeleteModule?: (val: string) => Promise<void>;
80
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
81
- onLayoutChange?: (layout: any) => void;
82
- className?: string;
83
- cols?: { lg: number; md: number; sm: number; xs: number; xxs: number };
84
- rowHeight?: number;
85
- }
86
- 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 interface DashboardWorkbenchProps {
59
+ sourceData?: SourceDataTypes[];
60
+ moduleConfigData?: ModuleConfigDataTypes;
61
+ fieldMap?: Record<string, string>;
62
+ lang?: "zh_CN" | "en_US";
63
+ moduleDataApi?: ModuleDataApi;
64
+ onCreateModule?: (val: ModuleData) => Promise<ModuleData>;
65
+ onUpdateModule?: (val: ModuleData) => Promise<ModuleData>;
66
+ onDeleteModule?: (val: string) => Promise<void>;
67
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
68
+ onLayoutChange?: (layout: any) => void;
69
+ className?: string;
70
+ cols?: { lg: number; md: number; sm: number; xs: number; xxs: number };
71
+ rowHeight?: number;
72
+ }
73
+
74
+
75
+ declare module "pivot-table" {
76
+
77
+ interface PivotTableProps {
78
+ sourceData?: SourceDataTypes[];
79
+ moduleConfigData?: ModuleConfigDataTypes;
80
+ fieldMap?: Record<string, string>;
81
+ lang?: "zh_CN" | "en_US";
82
+ moduleDataApi?: ModuleDataApi;
83
+ onCreateModule?: (val: ModuleData) => Promise<ModuleData>;
84
+ onUpdateModule?: (val: ModuleData) => Promise<ModuleData>;
85
+ onDeleteModule?: (val: string) => Promise<void>;
86
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
87
+ onLayoutChange?: (layout: any) => void;
88
+ className?: string;
89
+ cols?: { lg: number; md: number; sm: number; xs: number; xxs: number };
90
+ rowHeight?: number;
91
+ }
92
+ export const PivotTable: React.FC<PivotTableProps>;
87
93
  }