@nocobase/plugin-data-visualization 0.11.1-alpha.5 → 0.12.0-alpha.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 (132) hide show
  1. package/client.d.ts +2 -2
  2. package/client.js +1 -1
  3. package/dist/client/chart/antd/antd.d.ts +7 -0
  4. package/dist/client/chart/antd/index.d.ts +4 -0
  5. package/dist/client/chart/antd/statistic.d.ts +19 -0
  6. package/dist/client/chart/antd/table.d.ts +6 -0
  7. package/dist/client/chart/chart.d.ts +65 -0
  8. package/dist/client/chart/g2plot/bar.d.ts +16 -0
  9. package/dist/client/chart/g2plot/dualAxes.d.ts +20 -0
  10. package/dist/client/chart/g2plot/g2plot.d.ts +19 -0
  11. package/dist/client/chart/g2plot/index.d.ts +6 -0
  12. package/dist/client/chart/g2plot/pie.d.ts +17 -0
  13. package/dist/client/chart/library.d.ts +28 -0
  14. package/{lib → dist}/client/hooks.d.ts +22 -154
  15. package/{lib → dist}/client/index.d.ts +3 -1
  16. package/dist/client/index.js +67448 -0
  17. package/{lib → dist}/client/renderer/ChartRendererProvider.d.ts +1 -8
  18. package/{lib → dist}/client/renderer/index.d.ts +0 -2
  19. package/{lib → dist}/client/utils.d.ts +1 -1
  20. package/{lib → dist}/index.d.ts +1 -0
  21. package/dist/index.js +18 -0
  22. package/dist/locale/en-US.js +26 -0
  23. package/dist/locale/fr-FR.js +5 -0
  24. package/dist/locale/ja-JP.js +5 -0
  25. package/dist/locale/pt-BR.js +26 -0
  26. package/dist/locale/ru-RU.js +5 -0
  27. package/dist/locale/tr-TR.js +5 -0
  28. package/dist/locale/zh-CN.js +74 -0
  29. package/dist/server/actions/formatter.js +41 -0
  30. package/{src/server/actions/query.ts → dist/server/actions/query.js} +75 -133
  31. package/dist/server/index.js +11 -0
  32. package/dist/server/plugin.js +42 -0
  33. package/package.json +23 -22
  34. package/server.d.ts +2 -2
  35. package/server.js +1 -1
  36. package/lib/client/Settings.js +0 -81
  37. package/lib/client/block/ChartBlock.js +0 -74
  38. package/lib/client/block/ChartBlockDesigner.js +0 -35
  39. package/lib/client/block/ChartBlockInitializer.js +0 -114
  40. package/lib/client/block/ChartConfigure.js +0 -499
  41. package/lib/client/block/formatters.js +0 -58
  42. package/lib/client/block/index.js +0 -49
  43. package/lib/client/block/schemas/configure.js +0 -517
  44. package/lib/client/block/transformers.js +0 -68
  45. package/lib/client/hooks.js +0 -275
  46. package/lib/client/index.js +0 -80
  47. package/lib/client/locale/index.js +0 -37
  48. package/lib/client/renderer/ChartLibrary.d.ts +0 -72
  49. package/lib/client/renderer/ChartLibrary.js +0 -146
  50. package/lib/client/renderer/ChartRenderer.js +0 -181
  51. package/lib/client/renderer/ChartRendererProvider.js +0 -105
  52. package/lib/client/renderer/index.js +0 -49
  53. package/lib/client/renderer/library/AntdLibrary.d.ts +0 -2
  54. package/lib/client/renderer/library/AntdLibrary.js +0 -123
  55. package/lib/client/renderer/library/G2PlotLibrary.d.ts +0 -2
  56. package/lib/client/renderer/library/G2PlotLibrary.js +0 -288
  57. package/lib/client/renderer/library/index.d.ts +0 -3
  58. package/lib/client/renderer/library/index.js +0 -15
  59. package/lib/client/utils.js +0 -137
  60. package/lib/index.js +0 -13
  61. package/lib/locale/en-US.js +0 -29
  62. package/lib/locale/fr-FR.js +0 -8
  63. package/lib/locale/ja-JP.js +0 -8
  64. package/lib/locale/pt-BR.js +0 -29
  65. package/lib/locale/ru-RU.js +0 -8
  66. package/lib/locale/tr-TR.js +0 -8
  67. package/lib/locale/zh-CN.js +0 -77
  68. package/lib/server/actions/formatter.js +0 -44
  69. package/lib/server/actions/query.js +0 -331
  70. package/lib/server/index.js +0 -13
  71. package/lib/server/plugin.js +0 -64
  72. package/src/client/Settings.tsx +0 -43
  73. package/src/client/__tests__/chart-configure.test.tsx +0 -14
  74. package/src/client/__tests__/chart-library.test.ts +0 -78
  75. package/src/client/__tests__/chart-renderer.test.tsx +0 -30
  76. package/src/client/__tests__/hooks.test.ts +0 -261
  77. package/src/client/block/ChartBlock.tsx +0 -24
  78. package/src/client/block/ChartBlockDesigner.tsx +0 -19
  79. package/src/client/block/ChartBlockInitializer.tsx +0 -82
  80. package/src/client/block/ChartConfigure.tsx +0 -446
  81. package/src/client/block/formatters.ts +0 -70
  82. package/src/client/block/index.ts +0 -4
  83. package/src/client/block/schemas/configure.ts +0 -504
  84. package/src/client/block/transformers.ts +0 -52
  85. package/src/client/hooks.ts +0 -239
  86. package/src/client/index.tsx +0 -47
  87. package/src/client/locale/index.ts +0 -18
  88. package/src/client/renderer/ChartLibrary.tsx +0 -183
  89. package/src/client/renderer/ChartRenderer.tsx +0 -129
  90. package/src/client/renderer/ChartRendererProvider.tsx +0 -123
  91. package/src/client/renderer/index.ts +0 -4
  92. package/src/client/renderer/library/AntdLibrary.tsx +0 -94
  93. package/src/client/renderer/library/G2PlotLibrary.tsx +0 -236
  94. package/src/client/renderer/library/index.tsx +0 -4
  95. package/src/client/utils.ts +0 -102
  96. package/src/index.ts +0 -1
  97. package/src/locale/en-US.ts +0 -23
  98. package/src/locale/fr-FR.ts +0 -1
  99. package/src/locale/ja-JP.ts +0 -1
  100. package/src/locale/pt-BR.ts +0 -23
  101. package/src/locale/ru-RU.ts +0 -1
  102. package/src/locale/tr-TR.ts +0 -1
  103. package/src/locale/zh-CN.ts +0 -72
  104. package/src/server/__tests__/api.test.ts +0 -102
  105. package/src/server/__tests__/formatter.test.ts +0 -49
  106. package/src/server/__tests__/query.test.ts +0 -220
  107. package/src/server/actions/formatter.ts +0 -49
  108. package/src/server/collections/.gitkeep +0 -0
  109. package/src/server/index.ts +0 -1
  110. package/src/server/plugin.ts +0 -37
  111. /package/{lib → dist}/client/Settings.d.ts +0 -0
  112. /package/{lib → dist}/client/block/ChartBlock.d.ts +0 -0
  113. /package/{lib → dist}/client/block/ChartBlockDesigner.d.ts +0 -0
  114. /package/{lib → dist}/client/block/ChartBlockInitializer.d.ts +0 -0
  115. /package/{lib → dist}/client/block/ChartConfigure.d.ts +0 -0
  116. /package/{lib → dist}/client/block/formatters.d.ts +0 -0
  117. /package/{lib → dist}/client/block/index.d.ts +0 -0
  118. /package/{lib → dist}/client/block/schemas/configure.d.ts +0 -0
  119. /package/{lib → dist}/client/block/transformers.d.ts +0 -0
  120. /package/{lib → dist}/client/locale/index.d.ts +0 -0
  121. /package/{lib → dist}/client/renderer/ChartRenderer.d.ts +0 -0
  122. /package/{lib → dist}/locale/en-US.d.ts +0 -0
  123. /package/{lib → dist}/locale/fr-FR.d.ts +0 -0
  124. /package/{lib → dist}/locale/ja-JP.d.ts +0 -0
  125. /package/{lib → dist}/locale/pt-BR.d.ts +0 -0
  126. /package/{lib → dist}/locale/ru-RU.d.ts +0 -0
  127. /package/{lib → dist}/locale/tr-TR.d.ts +0 -0
  128. /package/{lib → dist}/locale/zh-CN.d.ts +0 -0
  129. /package/{lib → dist}/server/actions/formatter.d.ts +0 -0
  130. /package/{lib → dist}/server/actions/query.d.ts +0 -0
  131. /package/{lib → dist}/server/index.d.ts +0 -0
  132. /package/{lib → dist}/server/plugin.d.ts +0 -0
package/client.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // @ts-nocheck
2
- export * from './lib/client';
3
- export { default } from './lib/client';
2
+ export * from './dist/client';
3
+ export { default } from './dist/client';
package/client.js CHANGED
@@ -39,7 +39,7 @@ function _interopRequireWildcard(obj, nodeInterop) {
39
39
  return newObj;
40
40
  }
41
41
 
42
- var _index = _interopRequireWildcard(require('./lib/client'));
42
+ var _index = _interopRequireWildcard(require('./dist/client'));
43
43
 
44
44
  Object.defineProperty(exports, '__esModule', {
45
45
  value: true,
@@ -0,0 +1,7 @@
1
+ import { Chart } from '../chart';
2
+ export declare class AntdChart extends Chart {
3
+ getReference(): {
4
+ title: string;
5
+ link: string;
6
+ };
7
+ }
@@ -0,0 +1,4 @@
1
+ import { Statistic } from './statistic';
2
+ import { Table } from './table';
3
+ declare const _default: (Statistic | Table)[];
4
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { ISchema } from '@formily/react';
2
+ import { AntdChart } from './antd';
3
+ import { FieldOption } from '../../hooks';
4
+ import { QueryProps } from '../../renderer';
5
+ import { RenderProps } from '../chart';
6
+ export declare class Statistic extends AntdChart {
7
+ schema: ISchema;
8
+ constructor();
9
+ init(fields: FieldOption[], { measures, dimensions, }: {
10
+ measures?: QueryProps['measures'];
11
+ dimensions?: QueryProps['dimensions'];
12
+ }): {
13
+ general: {
14
+ field: string;
15
+ title: string;
16
+ };
17
+ };
18
+ getProps({ data, fieldProps, general, advanced }: RenderProps): any;
19
+ }
@@ -0,0 +1,6 @@
1
+ import { RenderProps } from '../chart';
2
+ import { AntdChart } from './antd';
3
+ export declare class Table extends AntdChart {
4
+ constructor();
5
+ getProps({ data, fieldProps, general, advanced }: RenderProps): any;
6
+ }
@@ -0,0 +1,65 @@
1
+ import React from 'react';
2
+ import { FieldOption } from '../hooks';
3
+ import { QueryProps } from '../renderer';
4
+ import { ISchema } from '@formily/react';
5
+ export type RenderProps = {
6
+ data: any[];
7
+ general: any;
8
+ advanced: any;
9
+ fieldProps: {
10
+ [field: string]: FieldOption & {
11
+ transformer: (val: any) => string;
12
+ };
13
+ };
14
+ };
15
+ export interface ChartType {
16
+ name: string;
17
+ title: string;
18
+ component: React.FC<any>;
19
+ schema: ISchema;
20
+ infer: (fields: FieldOption[], { measures, dimensions, }: {
21
+ measures?: QueryProps['measures'];
22
+ dimensions?: QueryProps['dimensions'];
23
+ }) => {
24
+ xField: FieldOption;
25
+ yField: FieldOption;
26
+ seriesField: FieldOption;
27
+ yFields: FieldOption[];
28
+ };
29
+ init?: (fields: FieldOption[], query: {
30
+ measures?: QueryProps['measures'];
31
+ dimensions?: QueryProps['dimensions'];
32
+ }) => {
33
+ general?: any;
34
+ advanced?: any;
35
+ };
36
+ /**
37
+ * getProps
38
+ * Accept the information that the chart component needs to render,
39
+ * process it and return the props of the chart component.
40
+ */
41
+ getProps: (props: RenderProps) => any;
42
+ getReference?: () => {
43
+ title: string;
44
+ link: string;
45
+ };
46
+ render: (props: RenderProps) => React.FC<any>;
47
+ }
48
+ export declare class Chart implements ChartType {
49
+ name: string;
50
+ title: string;
51
+ component: React.FC<any>;
52
+ schema: {};
53
+ constructor(name: string, title: string, component: React.FC<any>);
54
+ infer(fields: FieldOption[], { measures, dimensions, }: {
55
+ measures?: QueryProps['measures'];
56
+ dimensions?: QueryProps['dimensions'];
57
+ }): {
58
+ xField: FieldOption;
59
+ yField: FieldOption;
60
+ seriesField: FieldOption;
61
+ yFields: FieldOption[];
62
+ };
63
+ getProps(props: RenderProps): RenderProps;
64
+ render({ data, general, advanced, fieldProps }: RenderProps): () => React.FunctionComponentElement<any>;
65
+ }
@@ -0,0 +1,16 @@
1
+ import { FieldOption } from '../../hooks';
2
+ import { QueryProps } from '../../renderer';
3
+ import { G2PlotChart } from './g2plot';
4
+ export declare class Bar extends G2PlotChart {
5
+ constructor();
6
+ init(fields: FieldOption[], { measures, dimensions, }: {
7
+ measures?: QueryProps['measures'];
8
+ dimensions?: QueryProps['dimensions'];
9
+ }): {
10
+ general: {
11
+ xField: string;
12
+ yField: string;
13
+ seriesField: string;
14
+ };
15
+ };
16
+ }
@@ -0,0 +1,20 @@
1
+ import { ISchema } from '@formily/react';
2
+ import { G2PlotChart } from './g2plot';
3
+ import { RenderProps } from '../chart';
4
+ import React from 'react';
5
+ import { FieldOption } from '../../hooks';
6
+ import { QueryProps } from '../../renderer';
7
+ export declare class DualAxes extends G2PlotChart {
8
+ schema: ISchema;
9
+ constructor();
10
+ init(fields: FieldOption[], { measures, dimensions, }: {
11
+ measures?: QueryProps['measures'];
12
+ dimensions?: QueryProps['dimensions'];
13
+ }): {
14
+ general: {
15
+ xField: string;
16
+ yField: string[];
17
+ };
18
+ };
19
+ render({ data, general, advanced, fieldProps }: RenderProps): () => React.FunctionComponentElement<any>;
20
+ }
@@ -0,0 +1,19 @@
1
+ import { Chart, RenderProps } from '../chart';
2
+ import { FieldOption } from '../../hooks';
3
+ import { QueryProps } from '../../renderer';
4
+ import { ISchema } from '@formily/react';
5
+ export declare class G2PlotChart extends Chart {
6
+ schema: ISchema;
7
+ init(fields: FieldOption[], { measures, dimensions, }: {
8
+ measures?: QueryProps['measures'];
9
+ dimensions?: QueryProps['dimensions'];
10
+ }): {
11
+ general?: any;
12
+ advanced?: any;
13
+ };
14
+ getProps({ data, general, advanced, fieldProps }: RenderProps): any;
15
+ getReference(): {
16
+ title: string;
17
+ link: string;
18
+ };
19
+ }
@@ -0,0 +1,6 @@
1
+ import { Bar } from './bar';
2
+ import { Pie } from './pie';
3
+ import { DualAxes } from './dualAxes';
4
+ import { G2PlotChart } from './g2plot';
5
+ declare const _default: (G2PlotChart | Bar | Pie | DualAxes)[];
6
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { ISchema } from '@formily/react';
2
+ import { G2PlotChart } from './g2plot';
3
+ import { FieldOption } from '../../hooks';
4
+ import { QueryProps } from '../../renderer';
5
+ export declare class Pie extends G2PlotChart {
6
+ schema: ISchema;
7
+ constructor();
8
+ init(fields: FieldOption[], { measures, dimensions, }: {
9
+ measures?: QueryProps['measures'];
10
+ dimensions?: QueryProps['dimensions'];
11
+ }): {
12
+ general: {
13
+ colorField: string;
14
+ angleField: string;
15
+ };
16
+ };
17
+ }
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { ChartType } from './chart';
3
+ export type ChartLibraries = {
4
+ [library: string]: {
5
+ enabled: boolean;
6
+ charts: ChartType[];
7
+ };
8
+ };
9
+ export declare const ChartLibraryContext: React.Context<ChartLibraries>;
10
+ export declare const useCharts: () => {
11
+ [name: string]: ChartType;
12
+ };
13
+ export declare const useChartTypes: () => {
14
+ label: string;
15
+ children: {
16
+ key: string;
17
+ label: string;
18
+ value: string;
19
+ }[];
20
+ }[];
21
+ export declare const useDefaultChartType: () => string;
22
+ export declare const useToggleChartLibrary: () => {
23
+ toggle: (library: string) => void;
24
+ };
25
+ export declare const ChartLibraryProvider: React.FC<{
26
+ name: string;
27
+ charts: ChartType[];
28
+ }>;
@@ -1,5 +1,6 @@
1
1
  import { ArrayField } from '@formily/core';
2
2
  import { ISchema } from '@formily/react';
3
+ import { CollectionFieldOptions } from '@nocobase/client';
3
4
  import { ChartRendererProps } from './renderer';
4
5
  export type FieldOption = {
5
6
  value: string;
@@ -13,10 +14,13 @@ export type FieldOption = {
13
14
  target?: string;
14
15
  targetFields?: FieldOption[];
15
16
  };
16
- export declare const useFields: (collection?: string) => {
17
- key: any;
17
+ export declare const useFields: (collection?: string) => (CollectionFieldOptions & {
18
+ key: string;
19
+ label: string;
20
+ value: string;
21
+ })[];
22
+ export declare const useFieldsWithAssociation: (collection?: string) => ({
18
23
  label: any;
19
- value: any;
20
24
  name?: any;
21
25
  collectionName?: string;
22
26
  sourceKey?: string;
@@ -50,12 +54,7 @@ export declare const useFields: (collection?: string) => {
50
54
  required?: string | boolean | string[];
51
55
  format?: string;
52
56
  $ref?: string;
53
- $namespace?: string; /**
54
- * useFieldTypes
55
- * Get field types for using transformers
56
- * Only supported types will be displayed
57
- * Some interfaces and types will be mapped to supported types
58
- */
57
+ $namespace?: string;
59
58
  definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
60
59
  properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
61
60
  items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
@@ -64,77 +63,12 @@ export declare const useFields: (collection?: string) => {
64
63
  additionalProperties?: import("@formily/react").Stringify<any>;
65
64
  "x-value"?: any;
66
65
  "x-index"?: number;
67
- "x-pattern"?: any;
68
- "x-display"?: any;
69
- "x-validator"?: any;
70
- "x-decorator"?: any;
71
- "x-decorator-props"?: any;
72
- "x-component"?: any;
73
- "x-component-props"?: any;
74
- "x-reactions"?: import("@formily/react").SchemaReactions<any>;
75
- "x-content"?: any;
76
- "x-data"?: any;
77
- "x-visible"?: boolean;
78
- "x-hidden"?: boolean;
79
- "x-disabled"?: boolean;
80
- "x-editable"?: boolean;
81
- "x-read-only"?: boolean;
82
- "x-read-pretty"?: boolean;
83
- "x-compile-omitted"?: string[];
84
- }>;
85
- target?: string;
86
- }[];
87
- export declare const useFieldsWithAssociation: (collection?: string) => ({
88
- label: any;
89
- key: any;
90
- value: any;
91
- name?: any;
92
- collectionName?: string;
93
- sourceKey?: string;
94
- uiSchema?: import("@formily/react").Stringify<{
95
- [key: symbol]: any;
96
- [key: `x-${string}`]: any;
97
- [key: `x-${number}`]: any;
98
- version?: string;
99
- name?: import("@formily/react").SchemaKey;
100
- title?: any;
101
- description?: any;
102
- default?: any;
103
- readOnly?: boolean;
104
- writeOnly?: boolean;
105
- type?: import("@formily/react").SchemaTypes;
106
- enum?: import("@formily/react").SchemaEnum<any>;
107
- const?: any;
108
- multipleOf?: number;
109
- maximum?: number;
110
- exclusiveMaximum?: number;
111
- minimum?: number;
112
- exclusiveMinimum?: number;
113
- maxLength?: number;
114
- minLength?: number;
115
- pattern?: string | RegExp;
116
- maxItems?: number;
117
- minItems?: number;
118
- uniqueItems?: boolean;
119
- maxProperties?: number;
120
- minProperties?: number;
121
- required?: string | boolean | string[];
122
- format?: string;
123
- $ref?: string;
124
- $namespace?: string; /**
66
+ /**
125
67
  * useFieldTypes
126
68
  * Get field types for using transformers
127
69
  * Only supported types will be displayed
128
70
  * Some interfaces and types will be mapped to supported types
129
71
  */
130
- definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
131
- properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
132
- items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
133
- additionalItems?: import("@formily/react").Stringify<any>;
134
- patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
135
- additionalProperties?: import("@formily/react").Stringify<any>;
136
- "x-value"?: any;
137
- "x-index"?: number;
138
72
  "x-pattern"?: any;
139
73
  "x-display"?: any;
140
74
  "x-validator"?: any;
@@ -154,81 +88,11 @@ export declare const useFieldsWithAssociation: (collection?: string) => ({
154
88
  "x-compile-omitted"?: string[];
155
89
  }>;
156
90
  target?: string;
91
+ key: string;
92
+ value: string;
157
93
  } | {
158
94
  label: any;
159
- targetFields: {
160
- key: string;
161
- label: string;
162
- value: string;
163
- name?: any;
164
- collectionName?: string;
165
- sourceKey?: string;
166
- uiSchema?: import("@formily/react").Stringify<{
167
- [key: symbol]: any;
168
- [key: `x-${string}`]: any;
169
- [key: `x-${number}`]: any;
170
- version?: string;
171
- name?: import("@formily/react").SchemaKey;
172
- title?: any;
173
- description?: any;
174
- default?: any;
175
- readOnly?: boolean;
176
- writeOnly?: boolean;
177
- type?: import("@formily/react").SchemaTypes;
178
- enum?: import("@formily/react").SchemaEnum<any>;
179
- const?: any;
180
- multipleOf?: number;
181
- maximum?: number;
182
- exclusiveMaximum?: number;
183
- minimum?: number;
184
- exclusiveMinimum?: number;
185
- maxLength?: number;
186
- minLength?: number;
187
- pattern?: string | RegExp;
188
- maxItems?: number;
189
- minItems?: number;
190
- uniqueItems?: boolean;
191
- maxProperties?: number;
192
- minProperties?: number;
193
- required?: string | boolean | string[];
194
- format?: string;
195
- $ref?: string;
196
- $namespace?: string; /**
197
- * useFieldTypes
198
- * Get field types for using transformers
199
- * Only supported types will be displayed
200
- * Some interfaces and types will be mapped to supported types
201
- */
202
- definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
203
- properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
204
- items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
205
- additionalItems?: import("@formily/react").Stringify<any>;
206
- patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
207
- additionalProperties?: import("@formily/react").Stringify<any>;
208
- "x-value"?: any;
209
- "x-index"?: number;
210
- "x-pattern"?: any;
211
- "x-display"?: any;
212
- "x-validator"?: any;
213
- "x-decorator"?: any;
214
- "x-decorator-props"?: any;
215
- "x-component"?: any;
216
- "x-component-props"?: any;
217
- "x-reactions"?: import("@formily/react").SchemaReactions<any>;
218
- "x-content"?: any;
219
- "x-data"?: any;
220
- "x-visible"?: boolean;
221
- "x-hidden"?: boolean;
222
- "x-disabled"?: boolean;
223
- "x-editable"?: boolean;
224
- "x-read-only"?: boolean;
225
- "x-read-pretty"?: boolean;
226
- "x-compile-omitted"?: string[];
227
- }>;
228
- target?: string;
229
- }[];
230
- key: any;
231
- value: any;
95
+ targetFields: any[];
232
96
  name?: any;
233
97
  collectionName?: string;
234
98
  sourceKey?: string;
@@ -262,12 +126,7 @@ export declare const useFieldsWithAssociation: (collection?: string) => ({
262
126
  required?: string | boolean | string[];
263
127
  format?: string;
264
128
  $ref?: string;
265
- $namespace?: string; /**
266
- * useFieldTypes
267
- * Get field types for using transformers
268
- * Only supported types will be displayed
269
- * Some interfaces and types will be mapped to supported types
270
- */
129
+ $namespace?: string;
271
130
  definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
272
131
  properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
273
132
  items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
@@ -276,6 +135,12 @@ export declare const useFieldsWithAssociation: (collection?: string) => ({
276
135
  additionalProperties?: import("@formily/react").Stringify<any>;
277
136
  "x-value"?: any;
278
137
  "x-index"?: number;
138
+ /**
139
+ * useFieldTypes
140
+ * Get field types for using transformers
141
+ * Only supported types will be displayed
142
+ * Some interfaces and types will be mapped to supported types
143
+ */
279
144
  "x-pattern"?: any;
280
145
  "x-display"?: any;
281
146
  "x-validator"?: any;
@@ -295,6 +160,8 @@ export declare const useFieldsWithAssociation: (collection?: string) => ({
295
160
  "x-compile-omitted"?: string[];
296
161
  }>;
297
162
  target?: string;
163
+ key: string;
164
+ value: string;
298
165
  })[];
299
166
  export declare const useChartFields: (fields: FieldOption[]) => (field: any) => void;
300
167
  export declare const useFormatters: (fields: FieldOption[]) => (field: any) => void;
@@ -310,3 +177,4 @@ export declare const useTransformers: (field: any) => void;
310
177
  export declare const useFieldTransformer: (transform: ChartRendererProps['transform'], locale?: string) => {};
311
178
  export declare const useOrderFieldsOptions: (defaultOptions: any[], fields: FieldOption[]) => (field: any) => void;
312
179
  export declare const useOrderReaction: (defaultOptions: any[], fields: FieldOption[]) => (field: ArrayField) => void;
180
+ export declare const useData: (data?: any[], collection?: string) => {}[];
@@ -1,7 +1,9 @@
1
1
  import { Plugin } from '@nocobase/client';
2
- import { ChartLibraryProvider } from './renderer/ChartLibrary';
2
+ import { ChartLibraryProvider } from './chart/library';
3
3
  declare class DataVisualizationPlugin extends Plugin {
4
4
  load(): Promise<void>;
5
5
  }
6
6
  export default DataVisualizationPlugin;
7
7
  export { ChartLibraryProvider };
8
+ export { Chart } from './chart/chart';
9
+ export type { ChartType } from './chart/chart';