@nocobase/plugin-data-visualization 0.16.0-alpha.6 → 0.17.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/dist/client/block/ChartBlockInitializer.d.ts +3 -5
- package/dist/client/block/ChartDataProvider.d.ts +15 -0
- package/dist/client/chart/chart.d.ts +1 -0
- package/dist/client/configure/ChartConfigProvider.d.ts +17 -0
- package/dist/client/configure/ChartConfigure.d.ts +0 -14
- package/dist/client/configure/index.d.ts +2 -0
- package/dist/client/filter/FilterActionInitializers.d.ts +15 -0
- package/dist/client/filter/FilterBlockDesigner.d.ts +2 -0
- package/dist/client/filter/FilterBlockInitializer.d.ts +3 -0
- package/dist/client/filter/FilterBlockProvider.d.ts +2 -0
- package/dist/client/filter/FilterCheckbox.d.ts +2 -0
- package/dist/client/filter/FilterForm.d.ts +2 -0
- package/dist/client/filter/FilterItemDesigner.d.ts +2 -0
- package/dist/client/filter/FilterItemInitializers.d.ts +7 -0
- package/dist/client/filter/FilterProvider.d.ts +31 -0
- package/dist/client/filter/FilterVariableInput.d.ts +2 -0
- package/dist/client/filter/index.d.ts +6 -0
- package/dist/client/filter/utils.d.ts +51 -0
- package/dist/client/hooks/filter.d.ts +42 -0
- package/dist/client/hooks/index.d.ts +1 -0
- package/dist/client/hooks/useDateVariable.d.ts +1 -2
- package/dist/client/hooks/useVariableOptions.d.ts +7 -3
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +59 -39
- package/dist/client/utils.d.ts +2 -0
- package/dist/externalVersion.js +11 -11
- package/dist/locale/en-US.d.ts +10 -0
- package/dist/locale/en-US.js +11 -1
- package/dist/locale/zh-CN.d.ts +11 -0
- package/dist/locale/zh-CN.js +12 -1
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/package.json +2 -2
- package/dist/client/DataVisualization.d.ts +0 -2
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SchemaInitializer } from '@nocobase/client';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const ChartV2BlockInitializer: React.FC
|
|
5
|
-
insert: (s: ISchema) => void;
|
|
6
|
-
}>;
|
|
3
|
+
export declare const chartInitializers: SchemaInitializer<import("antd").ButtonProps, {}>;
|
|
4
|
+
export declare const ChartV2BlockInitializer: React.FC;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ChartData = {
|
|
3
|
+
collection: string;
|
|
4
|
+
service: any;
|
|
5
|
+
query: any;
|
|
6
|
+
};
|
|
7
|
+
export declare const ChartDataContext: React.Context<{
|
|
8
|
+
charts: {
|
|
9
|
+
[uid: string]: ChartData;
|
|
10
|
+
};
|
|
11
|
+
addChart: (uid: string, chart: ChartData) => void;
|
|
12
|
+
removeChart: (uid: string) => void;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const ChartDataProvider: React.FC;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ISchema } from '@formily/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type ChartConfigCurrent = {
|
|
4
|
+
schema: ISchema;
|
|
5
|
+
field: any;
|
|
6
|
+
collection: string;
|
|
7
|
+
service: any;
|
|
8
|
+
initialValues?: any;
|
|
9
|
+
data: any[];
|
|
10
|
+
};
|
|
11
|
+
export declare const ChartConfigContext: React.Context<{
|
|
12
|
+
visible: boolean;
|
|
13
|
+
setVisible?: (visible: boolean) => void;
|
|
14
|
+
current?: ChartConfigCurrent;
|
|
15
|
+
setCurrent?: (current: ChartConfigCurrent) => void;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const ChartConfigProvider: React.FC;
|
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import { ISchema } from '@formily/react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export type ChartConfigCurrent = {
|
|
4
|
-
schema: ISchema;
|
|
5
|
-
field: any;
|
|
6
|
-
collection: string;
|
|
7
|
-
service: any;
|
|
8
|
-
initialValues?: any;
|
|
9
|
-
data: any[];
|
|
10
|
-
};
|
|
11
3
|
export type SelectedField = {
|
|
12
4
|
field: string | string[];
|
|
13
5
|
alias?: string;
|
|
14
6
|
};
|
|
15
|
-
export declare const ChartConfigContext: React.Context<{
|
|
16
|
-
visible: boolean;
|
|
17
|
-
setVisible?: (visible: boolean) => void;
|
|
18
|
-
current?: ChartConfigCurrent;
|
|
19
|
-
setCurrent?: (current: ChartConfigCurrent) => void;
|
|
20
|
-
}>;
|
|
21
7
|
export declare const ChartConfigure: React.FC<{
|
|
22
8
|
insert: (s: ISchema, options: {
|
|
23
9
|
onSuccess: () => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SchemaInitializer } from '@nocobase/client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const useChartFilterActionProps: () => {
|
|
4
|
+
onClick: () => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
export declare const useChartFilterResetProps: () => {
|
|
7
|
+
onClick: () => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
export declare const useChartFilterCollapseProps: () => {
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
title: React.JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
export declare const ChartFilterCollapseDesigner: React.FC;
|
|
14
|
+
export declare const ChartFilterActionDesigner: React.FC;
|
|
15
|
+
export declare const chartFilterActionInitializers: SchemaInitializer<import("antd").ButtonProps, {}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SchemaInitializer } from '@nocobase/client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const ChartFilterFormItem: React.MemoExoticComponent<import("@formily/react").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,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ChartFilterContext: React.Context<{
|
|
3
|
+
ready: boolean;
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
setEnabled: (enabled: boolean) => void;
|
|
6
|
+
fields: {
|
|
7
|
+
[name: string]: {
|
|
8
|
+
title: string;
|
|
9
|
+
operator?: {
|
|
10
|
+
value: string;
|
|
11
|
+
noValue?: boolean;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
setField: (name: string, field: {
|
|
16
|
+
title?: string;
|
|
17
|
+
operator?: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
removeField: (name: string) => void;
|
|
20
|
+
collapse: {
|
|
21
|
+
collapsed: boolean;
|
|
22
|
+
row: number;
|
|
23
|
+
};
|
|
24
|
+
setCollapse: (opts: {
|
|
25
|
+
collapsed?: boolean;
|
|
26
|
+
row?: number;
|
|
27
|
+
}) => void;
|
|
28
|
+
form: any;
|
|
29
|
+
setForm: (form: any) => void;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const ChartFilterProvider: React.FC;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare const getOptionsSchema: () => {
|
|
2
|
+
title: string;
|
|
3
|
+
type: string;
|
|
4
|
+
'x-decorator': string;
|
|
5
|
+
'x-component': string;
|
|
6
|
+
items: {
|
|
7
|
+
type: string;
|
|
8
|
+
'x-decorator': string;
|
|
9
|
+
properties: {
|
|
10
|
+
space: {
|
|
11
|
+
type: string;
|
|
12
|
+
'x-component': string;
|
|
13
|
+
properties: {
|
|
14
|
+
label: {
|
|
15
|
+
type: string;
|
|
16
|
+
'x-decorator': string;
|
|
17
|
+
'x-component': string;
|
|
18
|
+
'x-component-props': {
|
|
19
|
+
placeholder: string;
|
|
20
|
+
};
|
|
21
|
+
required: boolean;
|
|
22
|
+
};
|
|
23
|
+
value: {
|
|
24
|
+
type: string;
|
|
25
|
+
'x-decorator': string;
|
|
26
|
+
'x-component': string;
|
|
27
|
+
'x-component-props': {
|
|
28
|
+
placeholder: string;
|
|
29
|
+
};
|
|
30
|
+
required: boolean;
|
|
31
|
+
};
|
|
32
|
+
remove: {
|
|
33
|
+
type: string;
|
|
34
|
+
'x-decorator': string;
|
|
35
|
+
'x-component': string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
properties: {
|
|
42
|
+
add: {
|
|
43
|
+
type: string;
|
|
44
|
+
title: string;
|
|
45
|
+
'x-component': string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const getPropsSchemaByComponent: (component: string) => any;
|
|
50
|
+
export declare const transformValue: (value: any, props: any) => any;
|
|
51
|
+
export declare const setDefaultValue: (field: any, variables: any) => Promise<void>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SchemaInitializerItemType } from '@nocobase/client';
|
|
2
|
+
import { CollectionOptions } from '@nocobase/database';
|
|
3
|
+
export declare const useCustomFieldInterface: () => {
|
|
4
|
+
getSchemaByInterface: (fieldInterface: string) => any;
|
|
5
|
+
};
|
|
6
|
+
export declare const useChartData: () => {
|
|
7
|
+
getChartCollections: () => string[];
|
|
8
|
+
};
|
|
9
|
+
export declare const useChartFilter: () => {
|
|
10
|
+
filter: () => Promise<void>;
|
|
11
|
+
refresh: () => Promise<void>;
|
|
12
|
+
getChartFilterFields: (collection: CollectionOptions) => SchemaInitializerItemType[];
|
|
13
|
+
getFilter: () => {};
|
|
14
|
+
hasFilter: (chart: {
|
|
15
|
+
collection: string;
|
|
16
|
+
query: any;
|
|
17
|
+
}, filterValues: any) => any;
|
|
18
|
+
appendFilter: (chart: {
|
|
19
|
+
collection: string;
|
|
20
|
+
query: any;
|
|
21
|
+
}, filterValues: any) => any;
|
|
22
|
+
getTranslatedTitle: (title: string) => string;
|
|
23
|
+
};
|
|
24
|
+
export declare const useFilterVariable: () => {
|
|
25
|
+
label: string;
|
|
26
|
+
value: string;
|
|
27
|
+
key: string;
|
|
28
|
+
children: {
|
|
29
|
+
key: string;
|
|
30
|
+
value: string;
|
|
31
|
+
label: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
export declare const useChartFilterSourceFields: () => any[];
|
|
35
|
+
export declare const useFieldComponents: () => {
|
|
36
|
+
options: {
|
|
37
|
+
label: string;
|
|
38
|
+
value: string;
|
|
39
|
+
}[];
|
|
40
|
+
values: string[];
|
|
41
|
+
};
|
|
42
|
+
export declare const useCollectionJoinFieldTitle: (name: string) => any;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
export declare const useVariableOptions: () => {
|
|
1
|
+
export declare const useVariableOptions: () => ({
|
|
2
2
|
label: string;
|
|
3
3
|
value: string;
|
|
4
4
|
key: string;
|
|
5
|
-
children:
|
|
6
|
-
|
|
5
|
+
children: {
|
|
6
|
+
key: string;
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
} | import("@nocobase/client/es/schema-settings/VariableInput/type").Option)[];
|
package/dist/client/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare class DataVisualizationPlugin extends Plugin {
|
|
|
6
6
|
}
|
|
7
7
|
export default DataVisualizationPlugin;
|
|
8
8
|
export { Chart } from './chart/chart';
|
|
9
|
-
export type { ChartType, RenderProps
|
|
9
|
+
export type { ChartProps, ChartType, RenderProps } from './chart/chart';
|
|
10
10
|
export type { FieldOption } from './hooks';
|
|
11
11
|
export type { QueryProps } from './renderer';
|
|
12
|
-
export { ChartConfigContext } from './configure
|
|
12
|
+
export { ChartConfigContext } from './configure';
|