@tachybase/plugin-block-charts 0.23.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 (115) hide show
  1. package/.turbo/turbo-build.log +9 -0
  2. package/README.md +88 -0
  3. package/client.d.ts +3 -0
  4. package/client.js +65 -0
  5. package/dist/client/block/ChartBlock.d.ts +2 -0
  6. package/dist/client/block/ChartBlockDesigner.d.ts +2 -0
  7. package/dist/client/block/ChartBlockInitializer.d.ts +4 -0
  8. package/dist/client/block/ChartDataProvider.d.ts +16 -0
  9. package/dist/client/block/formatters.d.ts +15 -0
  10. package/dist/client/block/index.d.ts +3 -0
  11. package/dist/client/block/transformers.d.ts +10 -0
  12. package/dist/client/chart/antd/GroupedTable.d.ts +6 -0
  13. package/dist/client/chart/antd/antd.d.ts +7 -0
  14. package/dist/client/chart/antd/index.d.ts +5 -0
  15. package/dist/client/chart/antd/statistic.d.ts +7 -0
  16. package/dist/client/chart/antd/table.d.ts +6 -0
  17. package/dist/client/chart/chart.d.ts +77 -0
  18. package/dist/client/chart/configs.d.ts +79 -0
  19. package/dist/client/chart/g2plot/AntChart.d.ts +2 -0
  20. package/dist/client/chart/g2plot/bar.d.ts +6 -0
  21. package/dist/client/chart/g2plot/configs.d.ts +40 -0
  22. package/dist/client/chart/g2plot/dualAxes.d.ts +7 -0
  23. package/dist/client/chart/g2plot/g2plot.d.ts +10 -0
  24. package/dist/client/chart/g2plot/index.d.ts +3 -0
  25. package/dist/client/chart/g2plot/pie.d.ts +7 -0
  26. package/dist/client/chart/group.d.ts +32 -0
  27. package/dist/client/configure/ChartConfigProvider.d.ts +18 -0
  28. package/dist/client/configure/ChartConfigure.d.ts +18 -0
  29. package/dist/client/configure/FilterDynamicComponent.d.ts +2 -0
  30. package/dist/client/configure/index.d.ts +2 -0
  31. package/dist/client/configure/schemas/configure.d.ts +4 -0
  32. package/dist/client/filter/CollectionFieldInitializer.d.ts +2 -0
  33. package/dist/client/filter/FilterActionInitializers.d.ts +15 -0
  34. package/dist/client/filter/FilterBlockDesigner.d.ts +2 -0
  35. package/dist/client/filter/FilterBlockInitializer.d.ts +3 -0
  36. package/dist/client/filter/FilterBlockProvider.d.ts +2 -0
  37. package/dist/client/filter/FilterCheckbox.d.ts +2 -0
  38. package/dist/client/filter/FilterForm.d.ts +2 -0
  39. package/dist/client/filter/FilterItemDesigner.d.ts +2 -0
  40. package/dist/client/filter/FilterItemInitializers.d.ts +7 -0
  41. package/dist/client/filter/FilterProvider.d.ts +30 -0
  42. package/dist/client/filter/FilterVariableInput.d.ts +2 -0
  43. package/dist/client/filter/index.d.ts +6 -0
  44. package/dist/client/filter/utils.d.ts +59 -0
  45. package/dist/client/hooks/filter.d.ts +225 -0
  46. package/dist/client/hooks/index.d.ts +4 -0
  47. package/dist/client/hooks/query.d.ts +52 -0
  48. package/dist/client/hooks/transformer.d.ts +12 -0
  49. package/dist/client/hooks/useDateVariable.d.ts +14 -0
  50. package/dist/client/hooks/useUserVariable.d.ts +8 -0
  51. package/dist/client/hooks/useVariableOptions.d.ts +10 -0
  52. package/dist/client/index.d.ts +13 -0
  53. package/dist/client/index.js +234 -0
  54. package/dist/client/locale/index.d.ts +3 -0
  55. package/dist/client/renderer/ChartRenderer.d.ts +4 -0
  56. package/dist/client/renderer/ChartRendererProvider.d.ts +49 -0
  57. package/dist/client/renderer/index.d.ts +2 -0
  58. package/dist/client/utils.d.ts +44 -0
  59. package/dist/externalVersion.js +18 -0
  60. package/dist/index.d.ts +2 -0
  61. package/dist/index.js +39 -0
  62. package/dist/locale/en-US.json +89 -0
  63. package/dist/locale/ko_KR.json +85 -0
  64. package/dist/locale/zh-CN.json +90 -0
  65. package/dist/node_modules/fs-extra/LICENSE +15 -0
  66. package/dist/node_modules/fs-extra/lib/copy/copy-sync.js +161 -0
  67. package/dist/node_modules/fs-extra/lib/copy/copy.js +177 -0
  68. package/dist/node_modules/fs-extra/lib/copy/index.js +7 -0
  69. package/dist/node_modules/fs-extra/lib/empty/index.js +39 -0
  70. package/dist/node_modules/fs-extra/lib/ensure/file.js +66 -0
  71. package/dist/node_modules/fs-extra/lib/ensure/index.js +23 -0
  72. package/dist/node_modules/fs-extra/lib/ensure/link.js +64 -0
  73. package/dist/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
  74. package/dist/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
  75. package/dist/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
  76. package/dist/node_modules/fs-extra/lib/fs/index.js +140 -0
  77. package/dist/node_modules/fs-extra/lib/index.js +1 -0
  78. package/dist/node_modules/fs-extra/lib/json/index.js +16 -0
  79. package/dist/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
  80. package/dist/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
  81. package/dist/node_modules/fs-extra/lib/json/output-json.js +12 -0
  82. package/dist/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
  83. package/dist/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
  84. package/dist/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
  85. package/dist/node_modules/fs-extra/lib/move/index.js +7 -0
  86. package/dist/node_modules/fs-extra/lib/move/move-sync.js +55 -0
  87. package/dist/node_modules/fs-extra/lib/move/move.js +59 -0
  88. package/dist/node_modules/fs-extra/lib/output-file/index.js +31 -0
  89. package/dist/node_modules/fs-extra/lib/path-exists/index.js +12 -0
  90. package/dist/node_modules/fs-extra/lib/remove/index.js +17 -0
  91. package/dist/node_modules/fs-extra/lib/util/stat.js +158 -0
  92. package/dist/node_modules/fs-extra/lib/util/utimes.js +36 -0
  93. package/dist/node_modules/fs-extra/package.json +1 -0
  94. package/dist/node_modules/koa-compose/index.js +1 -0
  95. package/dist/node_modules/koa-compose/package.json +1 -0
  96. package/dist/server/actions/formatter.d.ts +4 -0
  97. package/dist/server/actions/formatter.js +67 -0
  98. package/dist/server/actions/query.d.ts +8 -0
  99. package/dist/server/actions/query.js +320 -0
  100. package/dist/server/index.d.ts +1 -0
  101. package/dist/server/index.js +33 -0
  102. package/dist/server/migrations/20230926211750-rename-charttype.d.ts +5 -0
  103. package/dist/server/migrations/20230926211750-rename-charttype.js +51 -0
  104. package/dist/server/plugin.d.ts +13 -0
  105. package/dist/server/plugin.js +83 -0
  106. package/dist/server/services/sql-loader.d.ts +10 -0
  107. package/dist/server/services/sql-loader.js +134 -0
  108. package/dist/server/sqls/view_load_function.sql +17 -0
  109. package/dist/server/utils/multiprocess.d.ts +2 -0
  110. package/dist/server/utils/multiprocess.js +38 -0
  111. package/dist/swagger/index.d.ts +8 -0
  112. package/dist/swagger/index.js +29 -0
  113. package/package.json +44 -0
  114. package/server.d.ts +3 -0
  115. package/server.js +65 -0
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { SchemaInitializer } from '@tachybase/client';
3
+ export declare const ChartFilterFormItem: React.MemoExoticComponent<import("@tachybase/schema").ReactFC<Omit<any, "ref">>>;
4
+ export declare const ChartFilterCustomItemInitializer: React.FC<{
5
+ insert?: any;
6
+ }>;
7
+ export declare const chartFilterItemInitializers: SchemaInitializer<import("antd").ButtonProps, {}>;
@@ -0,0 +1,30 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ type FilterField = {
3
+ title?: string;
4
+ operator?: {
5
+ value: string;
6
+ noValue?: boolean;
7
+ };
8
+ };
9
+ export declare const ChartFilterContext: React.Context<{
10
+ ready: boolean;
11
+ enabled: boolean;
12
+ setEnabled: (enabled: boolean) => void;
13
+ fields: {
14
+ [name: string]: FilterField;
15
+ };
16
+ setField: (name: string, field: FilterField) => void;
17
+ removeField: (name: string) => void;
18
+ collapse: {
19
+ collapsed: boolean;
20
+ row: number;
21
+ };
22
+ setCollapse: (opts: {
23
+ collapsed?: boolean;
24
+ row?: number;
25
+ }) => void;
26
+ form: any;
27
+ setForm: (form: any) => void;
28
+ }>;
29
+ export declare const ChartFilterProvider: React.FC<PropsWithChildren>;
30
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ChartFilterVariableInput: React.FC<any>;
@@ -0,0 +1,6 @@
1
+ export * from './FilterBlockDesigner';
2
+ export * from './FilterBlockInitializer';
3
+ export * from './FilterItemInitializers';
4
+ export * from './FilterActionInitializers';
5
+ export * from './FilterItemDesigner';
6
+ export * from './FilterBlockProvider';
@@ -0,0 +1,59 @@
1
+ import { Schema } from '@tachybase/schema';
2
+ export declare const getOptionsSchema: () => {
3
+ title: string;
4
+ type: string;
5
+ 'x-decorator': string;
6
+ 'x-component': string;
7
+ items: {
8
+ type: string;
9
+ 'x-decorator': string;
10
+ properties: {
11
+ space: {
12
+ type: string;
13
+ 'x-component': string;
14
+ properties: {
15
+ label: {
16
+ type: string;
17
+ 'x-decorator': string;
18
+ 'x-component': string;
19
+ 'x-component-props': {
20
+ placeholder: string;
21
+ };
22
+ required: boolean;
23
+ };
24
+ value: {
25
+ type: string;
26
+ 'x-decorator': string;
27
+ 'x-component': string;
28
+ 'x-component-props': {
29
+ placeholder: string;
30
+ };
31
+ required: boolean;
32
+ };
33
+ remove: {
34
+ type: string;
35
+ 'x-decorator': string;
36
+ 'x-component': string;
37
+ };
38
+ };
39
+ };
40
+ };
41
+ };
42
+ properties: {
43
+ add: {
44
+ type: string;
45
+ title: string;
46
+ 'x-component': string;
47
+ };
48
+ };
49
+ };
50
+ export declare const getPropsSchemaByComponent: (component: string, allCollection?: any) => any;
51
+ export declare const transformValue: (value: any, props: any) => any;
52
+ export declare const setDefaultValue: (field: any, variables: any) => Promise<void>;
53
+ export declare const FILTER_FIELD_PREFIX_SEPARATOR = "-";
54
+ export declare const getFilterFieldPrefix: (dataSource: string, fieldName: string) => string;
55
+ export declare const parseFilterFieldName: (name: string) => {
56
+ dataSource: string;
57
+ fieldName: string;
58
+ };
59
+ export declare const findSchema: (schema: Schema, key: string, targetName: string) => any;
@@ -0,0 +1,225 @@
1
+ import { Collection, CollectionFieldInterfaceManager, CollectionManager, SchemaInitializerItemType } from '@tachybase/client';
2
+ export declare const useCustomFieldInterface: () => {
3
+ getSchemaByInterface: (fieldInterface: string) => {
4
+ 'x-component-props': any;
5
+ version?: string | (string & {});
6
+ name?: import("@tachybase/schema").SchemaKey | (string & {});
7
+ title?: any;
8
+ description?: any;
9
+ default?: any;
10
+ readOnly?: boolean | (string & {});
11
+ writeOnly?: boolean | (string & {});
12
+ type?: import("@tachybase/schema").SchemaTypes;
13
+ enum?: (string & {}) | import("@tachybase/schema").SchemaEnum<any>;
14
+ const?: any;
15
+ multipleOf?: number | (string & {});
16
+ maximum?: number | (string & {});
17
+ exclusiveMaximum?: number | (string & {});
18
+ minimum?: number | (string & {});
19
+ exclusiveMinimum?: number | (string & {});
20
+ maxLength?: number | (string & {});
21
+ minLength?: number | (string & {});
22
+ pattern?: string | RegExp | (string & {});
23
+ maxItems?: number | (string & {});
24
+ minItems?: number | (string & {});
25
+ uniqueItems?: boolean | (string & {});
26
+ maxProperties?: number | (string & {});
27
+ minProperties?: number | (string & {});
28
+ required?: string | boolean | string[] | (string & {});
29
+ format?: string | (string & {});
30
+ $ref?: string | (string & {});
31
+ $namespace?: string | (string & {});
32
+ definitions?: (string & {}) | import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
33
+ properties?: (string & {}) | import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
34
+ items?: (string & {}) | import("@tachybase/schema").SchemaItems<any, any, any, any, any, any, any, any>;
35
+ additionalItems?: (string & {}) | import("@tachybase/schema").Stringify<{
36
+ [key: symbol]: any;
37
+ [key: `x-${string}`]: any;
38
+ [key: `x-${number}`]: any;
39
+ version?: string;
40
+ name?: import("@tachybase/schema").SchemaKey;
41
+ title?: any;
42
+ description?: any;
43
+ default?: any;
44
+ readOnly?: boolean;
45
+ writeOnly?: boolean;
46
+ type?: import("@tachybase/schema").SchemaTypes;
47
+ enum?: import("@tachybase/schema").SchemaEnum<any>;
48
+ const?: any;
49
+ multipleOf?: number;
50
+ maximum?: number;
51
+ exclusiveMaximum?: number;
52
+ minimum?: number;
53
+ exclusiveMinimum?: number;
54
+ maxLength?: number;
55
+ minLength?: number;
56
+ pattern?: string | RegExp;
57
+ maxItems?: number;
58
+ minItems?: number;
59
+ uniqueItems?: boolean;
60
+ maxProperties?: number;
61
+ minProperties?: number;
62
+ required?: string[] | boolean | string;
63
+ format?: string;
64
+ $ref?: string;
65
+ $namespace?: string;
66
+ definitions?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
67
+ properties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
68
+ items?: import("@tachybase/schema").SchemaItems<any, any, any, any, any, any, any, any>;
69
+ additionalItems?: import("@tachybase/schema").Stringify</*elided*/ any>;
70
+ patternProperties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
71
+ additionalProperties?: import("@tachybase/schema").Stringify</*elided*/ any>;
72
+ "x-value"?: any;
73
+ "x-index"?: number;
74
+ "x-pattern"?: any;
75
+ "x-display"?: any;
76
+ "x-validator"?: any;
77
+ "x-decorator"?: any;
78
+ "x-decorator-props"?: any;
79
+ "x-component"?: any;
80
+ "x-component-props"?: any;
81
+ "x-reactions"?: import("@tachybase/schema").SchemaReactions<any>;
82
+ "x-content"?: any;
83
+ "x-data"?: any;
84
+ "x-visible"?: boolean;
85
+ "x-hidden"?: boolean;
86
+ "x-disabled"?: boolean;
87
+ "x-editable"?: boolean;
88
+ "x-read-only"?: boolean;
89
+ "x-read-pretty"?: boolean;
90
+ "x-compile-omitted"?: string[];
91
+ }>;
92
+ patternProperties?: (string & {}) | import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
93
+ additionalProperties?: (string & {}) | import("@tachybase/schema").Stringify<{
94
+ [key: symbol]: any;
95
+ [key: `x-${string}`]: any;
96
+ [key: `x-${number}`]: any;
97
+ version?: string;
98
+ name?: import("@tachybase/schema").SchemaKey;
99
+ title?: any;
100
+ description?: any;
101
+ default?: any;
102
+ readOnly?: boolean;
103
+ writeOnly?: boolean;
104
+ type?: import("@tachybase/schema").SchemaTypes;
105
+ enum?: import("@tachybase/schema").SchemaEnum<any>;
106
+ const?: any;
107
+ multipleOf?: number;
108
+ maximum?: number;
109
+ exclusiveMaximum?: number;
110
+ minimum?: number;
111
+ exclusiveMinimum?: number;
112
+ maxLength?: number;
113
+ minLength?: number;
114
+ pattern?: string | RegExp;
115
+ maxItems?: number;
116
+ minItems?: number;
117
+ uniqueItems?: boolean;
118
+ maxProperties?: number;
119
+ minProperties?: number;
120
+ required?: string[] | boolean | string;
121
+ format?: string;
122
+ $ref?: string;
123
+ $namespace?: string;
124
+ definitions?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
125
+ properties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
126
+ items?: import("@tachybase/schema").SchemaItems<any, any, any, any, any, any, any, any>;
127
+ additionalItems?: import("@tachybase/schema").Stringify</*elided*/ any>;
128
+ patternProperties?: import("@tachybase/schema").SchemaProperties<any, any, any, any, any, any, any, any>;
129
+ additionalProperties?: import("@tachybase/schema").Stringify</*elided*/ any>;
130
+ "x-value"?: any;
131
+ "x-index"?: number;
132
+ "x-pattern"?: any;
133
+ "x-display"?: any;
134
+ "x-validator"?: any;
135
+ "x-decorator"?: any;
136
+ "x-decorator-props"?: any;
137
+ "x-component"?: any;
138
+ "x-component-props"?: any;
139
+ "x-reactions"?: import("@tachybase/schema").SchemaReactions<any>;
140
+ "x-content"?: any;
141
+ "x-data"?: any;
142
+ "x-visible"?: boolean;
143
+ "x-hidden"?: boolean;
144
+ "x-disabled"?: boolean;
145
+ "x-editable"?: boolean;
146
+ "x-read-only"?: boolean;
147
+ "x-read-pretty"?: boolean;
148
+ "x-compile-omitted"?: string[];
149
+ }>;
150
+ "x-value"?: any;
151
+ "x-index"?: number | (string & {});
152
+ "x-pattern"?: any;
153
+ "x-display"?: any;
154
+ "x-validator"?: any;
155
+ "x-decorator"?: any;
156
+ "x-decorator-props"?: any;
157
+ "x-component"?: any;
158
+ "x-reactions"?: (string & {}) | import("@tachybase/schema").SchemaReactions<any>;
159
+ "x-content"?: any;
160
+ "x-data"?: any;
161
+ "x-visible"?: boolean | (string & {});
162
+ "x-hidden"?: boolean | (string & {});
163
+ "x-disabled"?: boolean | (string & {});
164
+ "x-editable"?: boolean | (string & {});
165
+ "x-read-only"?: boolean | (string & {});
166
+ "x-read-pretty"?: boolean | (string & {});
167
+ "x-compile-omitted"?: string[] | (string & {});
168
+ };
169
+ };
170
+ export declare const useChartData: () => {
171
+ chartCollections: {
172
+ [dataSource: string]: string[];
173
+ };
174
+ showDataSource: boolean;
175
+ getIsChartCollectionExists: (dataSource: string, collection: string) => boolean;
176
+ };
177
+ export declare const useChartFilter: () => {
178
+ filter: () => Promise<any[]>;
179
+ refresh: () => Promise<void>;
180
+ getChartFilterFields: ({ dataSource, collection, cm, fim, }: {
181
+ dataSource: string;
182
+ collection: Collection;
183
+ cm: CollectionManager;
184
+ fim: CollectionFieldInterfaceManager;
185
+ }) => SchemaInitializerItemType[];
186
+ getFilter: () => {};
187
+ hasFilter: (chart: {
188
+ dataSource: string;
189
+ collection: string;
190
+ query: any;
191
+ }, filterValues: any) => any;
192
+ appendFilter: (chart: {
193
+ dataSource: string;
194
+ collection: string;
195
+ query: any;
196
+ }, filterValues: any) => any;
197
+ getTranslatedTitle: (title: string) => string;
198
+ };
199
+ export declare const useFilterVariable: () => {
200
+ label: string;
201
+ value: string;
202
+ key: string;
203
+ children: {
204
+ key: string;
205
+ value: string;
206
+ label: string;
207
+ }[];
208
+ };
209
+ export declare const useChartFilterSourceFields: () => {
210
+ value: string;
211
+ label: any;
212
+ children: {
213
+ value: string;
214
+ label: any;
215
+ children: any[];
216
+ }[];
217
+ }[];
218
+ export declare const useFieldComponents: () => {
219
+ options: {
220
+ label: string;
221
+ value: string;
222
+ }[];
223
+ values: string[];
224
+ };
225
+ export declare const useCollectionJoinFieldTitle: (dataSource: string, name: string) => any;
@@ -0,0 +1,4 @@
1
+ export * from './query';
2
+ export * from './transformer';
3
+ export * from './useVariableOptions';
4
+ export * from './filter';
@@ -0,0 +1,52 @@
1
+ import { CollectionFieldOptions, CollectionManager } from '@tachybase/client';
2
+ import { ArrayField, ISchema } from '@tachybase/schema';
3
+ export type FieldOption = {
4
+ value: string;
5
+ label: string;
6
+ key: string;
7
+ alias?: string;
8
+ name?: string;
9
+ type?: string;
10
+ interface?: string;
11
+ uiSchema?: ISchema;
12
+ target?: string;
13
+ targetFields?: FieldOption[];
14
+ };
15
+ export declare const useChartDataSource: (dataSource?: string) => {
16
+ cm: CollectionManager;
17
+ fim: import("@tachybase/client").CollectionFieldInterfaceManager;
18
+ collection: string;
19
+ };
20
+ export declare const useFields: (collectionFields: CollectionFieldOptions[]) => (CollectionFieldOptions & {
21
+ key: string;
22
+ label: string;
23
+ value: string;
24
+ })[];
25
+ export declare const useFieldsWithAssociation: (dataSource?: string, collection?: string) => ({
26
+ label: any;
27
+ name?: any;
28
+ collectionName?: string;
29
+ sourceKey?: string;
30
+ uiSchema?: any;
31
+ target?: string;
32
+ key: string;
33
+ value: string;
34
+ } | {
35
+ label: any;
36
+ targetFields: any[];
37
+ name?: any;
38
+ collectionName?: string;
39
+ sourceKey?: string;
40
+ uiSchema?: any;
41
+ target?: string;
42
+ key: string;
43
+ value: string;
44
+ })[];
45
+ export declare const useChartFields: (fields: FieldOption[]) => (field: any) => void;
46
+ export declare const useFormatters: (fields: FieldOption[]) => (field: any) => void;
47
+ export declare const useCollectionOptions: () => any;
48
+ export declare const useOrderFieldsOptions: (defaultOptions: any[], fields: FieldOption[]) => (field: any) => void;
49
+ export declare const useOrderReaction: (defaultOptions: any[], fields: FieldOption[]) => (field: ArrayField) => void;
50
+ export declare const useData: (data?: any[], dataSource?: string, collection?: string) => {}[];
51
+ export declare const useCollectionFieldsOptions: (dataSource: string, collectionName: string, maxDepth?: number, excludes?: any[]) => any[];
52
+ export declare const useCollectionFilterOptions: (dataSource: string, collection: string) => any[];
@@ -0,0 +1,12 @@
1
+ import { ChartRendererProps } from '../renderer';
2
+ import { FieldOption } from './query';
3
+ /**
4
+ * useFieldTypes
5
+ * Get field types for using transformers
6
+ * Only supported types will be displayed
7
+ * Some interfaces and types will be mapped to supported types
8
+ */
9
+ export declare const useFieldTypes: (fields: FieldOption[]) => (field: any) => void;
10
+ export declare const useTransformers: (field: any) => void;
11
+ export declare const useTransformersDecimal: (field: any) => void;
12
+ export declare const useFieldTransformer: (transform: ChartRendererProps["transform"], locale?: string) => {};
@@ -0,0 +1,14 @@
1
+ export declare const useDateVariable: ({ schema }: {
2
+ schema: any;
3
+ }) => {
4
+ label: string;
5
+ value: string;
6
+ key: string;
7
+ disabled: boolean;
8
+ children: {
9
+ key: string;
10
+ value: string;
11
+ label: string;
12
+ disabled: boolean;
13
+ }[];
14
+ };
@@ -0,0 +1,8 @@
1
+ export declare const useUserVariable: ({ schema }: {
2
+ schema: any;
3
+ }) => {
4
+ label: string;
5
+ value: string;
6
+ key: string;
7
+ children: any;
8
+ };
@@ -0,0 +1,10 @@
1
+ export declare const useVariableOptions: () => ({
2
+ label: string;
3
+ value: string;
4
+ key: string;
5
+ children: {
6
+ key: string;
7
+ value: string;
8
+ label: string;
9
+ }[];
10
+ } | import("packages/client/es/schema-settings/VariableInput/type").Option)[];
@@ -0,0 +1,13 @@
1
+ import { Plugin } from '@tachybase/client';
2
+ import { ChartGroup } from './chart/group';
3
+ declare class DataVisualizationPlugin extends Plugin {
4
+ charts: ChartGroup;
5
+ load(): Promise<void>;
6
+ }
7
+ export default DataVisualizationPlugin;
8
+ export { Chart } from './chart/chart';
9
+ export type { ChartProps, ChartType, RenderProps } from './chart/chart';
10
+ export { ChartConfigContext } from './configure';
11
+ export type { FieldOption } from './hooks';
12
+ export { useChartFilter } from './hooks';
13
+ export type { QueryProps } from './renderer';