@nocobase/plugin-data-visualization 0.11.1-alpha.5 → 0.12.0-alpha.2
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/client.d.ts +2 -2
- package/client.js +1 -1
- package/dist/client/chart/antd/antd.d.ts +7 -0
- package/dist/client/chart/antd/index.d.ts +4 -0
- package/dist/client/chart/antd/statistic.d.ts +19 -0
- package/dist/client/chart/antd/table.d.ts +6 -0
- package/dist/client/chart/chart.d.ts +65 -0
- package/dist/client/chart/g2plot/bar.d.ts +16 -0
- package/dist/client/chart/g2plot/dualAxes.d.ts +20 -0
- package/dist/client/chart/g2plot/g2plot.d.ts +19 -0
- package/dist/client/chart/g2plot/index.d.ts +6 -0
- package/dist/client/chart/g2plot/pie.d.ts +17 -0
- package/dist/client/chart/library.d.ts +28 -0
- package/{lib → dist}/client/hooks.d.ts +22 -154
- package/{lib → dist}/client/index.d.ts +3 -1
- package/dist/client/index.js +67448 -0
- package/{lib → dist}/client/renderer/ChartRendererProvider.d.ts +1 -8
- package/{lib → dist}/client/renderer/index.d.ts +0 -2
- package/{lib → dist}/client/utils.d.ts +1 -1
- package/{lib → dist}/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/locale/en-US.js +26 -0
- package/dist/locale/fr-FR.js +5 -0
- package/dist/locale/ja-JP.js +5 -0
- package/dist/locale/pt-BR.js +26 -0
- package/dist/locale/ru-RU.js +5 -0
- package/dist/locale/tr-TR.js +5 -0
- package/dist/locale/zh-CN.js +74 -0
- package/dist/server/actions/formatter.js +41 -0
- package/{src/server/actions/query.ts → dist/server/actions/query.js} +75 -133
- package/dist/server/index.js +11 -0
- package/dist/server/plugin.js +42 -0
- package/package.json +23 -22
- package/server.d.ts +2 -2
- package/server.js +1 -1
- package/lib/client/Settings.js +0 -81
- package/lib/client/block/ChartBlock.js +0 -74
- package/lib/client/block/ChartBlockDesigner.js +0 -35
- package/lib/client/block/ChartBlockInitializer.js +0 -114
- package/lib/client/block/ChartConfigure.js +0 -499
- package/lib/client/block/formatters.js +0 -58
- package/lib/client/block/index.js +0 -49
- package/lib/client/block/schemas/configure.js +0 -517
- package/lib/client/block/transformers.js +0 -68
- package/lib/client/hooks.js +0 -275
- package/lib/client/index.js +0 -80
- package/lib/client/locale/index.js +0 -37
- package/lib/client/renderer/ChartLibrary.d.ts +0 -72
- package/lib/client/renderer/ChartLibrary.js +0 -146
- package/lib/client/renderer/ChartRenderer.js +0 -181
- package/lib/client/renderer/ChartRendererProvider.js +0 -105
- package/lib/client/renderer/index.js +0 -49
- package/lib/client/renderer/library/AntdLibrary.d.ts +0 -2
- package/lib/client/renderer/library/AntdLibrary.js +0 -123
- package/lib/client/renderer/library/G2PlotLibrary.d.ts +0 -2
- package/lib/client/renderer/library/G2PlotLibrary.js +0 -288
- package/lib/client/renderer/library/index.d.ts +0 -3
- package/lib/client/renderer/library/index.js +0 -15
- package/lib/client/utils.js +0 -137
- package/lib/index.js +0 -13
- package/lib/locale/en-US.js +0 -29
- package/lib/locale/fr-FR.js +0 -8
- package/lib/locale/ja-JP.js +0 -8
- package/lib/locale/pt-BR.js +0 -29
- package/lib/locale/ru-RU.js +0 -8
- package/lib/locale/tr-TR.js +0 -8
- package/lib/locale/zh-CN.js +0 -77
- package/lib/server/actions/formatter.js +0 -44
- package/lib/server/actions/query.js +0 -331
- package/lib/server/index.js +0 -13
- package/lib/server/plugin.js +0 -64
- package/src/client/Settings.tsx +0 -43
- package/src/client/__tests__/chart-configure.test.tsx +0 -14
- package/src/client/__tests__/chart-library.test.ts +0 -78
- package/src/client/__tests__/chart-renderer.test.tsx +0 -30
- package/src/client/__tests__/hooks.test.ts +0 -261
- package/src/client/block/ChartBlock.tsx +0 -24
- package/src/client/block/ChartBlockDesigner.tsx +0 -19
- package/src/client/block/ChartBlockInitializer.tsx +0 -82
- package/src/client/block/ChartConfigure.tsx +0 -446
- package/src/client/block/formatters.ts +0 -70
- package/src/client/block/index.ts +0 -4
- package/src/client/block/schemas/configure.ts +0 -504
- package/src/client/block/transformers.ts +0 -52
- package/src/client/hooks.ts +0 -239
- package/src/client/index.tsx +0 -47
- package/src/client/locale/index.ts +0 -18
- package/src/client/renderer/ChartLibrary.tsx +0 -183
- package/src/client/renderer/ChartRenderer.tsx +0 -129
- package/src/client/renderer/ChartRendererProvider.tsx +0 -123
- package/src/client/renderer/index.ts +0 -4
- package/src/client/renderer/library/AntdLibrary.tsx +0 -94
- package/src/client/renderer/library/G2PlotLibrary.tsx +0 -236
- package/src/client/renderer/library/index.tsx +0 -4
- package/src/client/utils.ts +0 -102
- package/src/index.ts +0 -1
- package/src/locale/en-US.ts +0 -23
- package/src/locale/fr-FR.ts +0 -1
- package/src/locale/ja-JP.ts +0 -1
- package/src/locale/pt-BR.ts +0 -23
- package/src/locale/ru-RU.ts +0 -1
- package/src/locale/tr-TR.ts +0 -1
- package/src/locale/zh-CN.ts +0 -72
- package/src/server/__tests__/api.test.ts +0 -102
- package/src/server/__tests__/formatter.test.ts +0 -49
- package/src/server/__tests__/query.test.ts +0 -220
- package/src/server/actions/formatter.ts +0 -49
- package/src/server/collections/.gitkeep +0 -0
- package/src/server/index.ts +0 -1
- package/src/server/plugin.ts +0 -37
- /package/{lib → dist}/client/Settings.d.ts +0 -0
- /package/{lib → dist}/client/block/ChartBlock.d.ts +0 -0
- /package/{lib → dist}/client/block/ChartBlockDesigner.d.ts +0 -0
- /package/{lib → dist}/client/block/ChartBlockInitializer.d.ts +0 -0
- /package/{lib → dist}/client/block/ChartConfigure.d.ts +0 -0
- /package/{lib → dist}/client/block/formatters.d.ts +0 -0
- /package/{lib → dist}/client/block/index.d.ts +0 -0
- /package/{lib → dist}/client/block/schemas/configure.d.ts +0 -0
- /package/{lib → dist}/client/block/transformers.d.ts +0 -0
- /package/{lib → dist}/client/locale/index.d.ts +0 -0
- /package/{lib → dist}/client/renderer/ChartRenderer.d.ts +0 -0
- /package/{lib → dist}/locale/en-US.d.ts +0 -0
- /package/{lib → dist}/locale/fr-FR.d.ts +0 -0
- /package/{lib → dist}/locale/ja-JP.d.ts +0 -0
- /package/{lib → dist}/locale/pt-BR.d.ts +0 -0
- /package/{lib → dist}/locale/ru-RU.d.ts +0 -0
- /package/{lib → dist}/locale/tr-TR.d.ts +0 -0
- /package/{lib → dist}/locale/zh-CN.d.ts +0 -0
- /package/{lib → dist}/server/actions/formatter.d.ts +0 -0
- /package/{lib → dist}/server/actions/query.d.ts +0 -0
- /package/{lib → dist}/server/index.d.ts +0 -0
- /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 './
|
|
3
|
-
export { default } from './
|
|
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('./
|
|
42
|
+
var _index = _interopRequireWildcard(require('./dist/client'));
|
|
43
43
|
|
|
44
44
|
Object.defineProperty(exports, '__esModule', {
|
|
45
45
|
value: true,
|
|
@@ -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,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,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:
|
|
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
|
-
|
|
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 './
|
|
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';
|