@nocobase/plugin-data-visualization 2.0.0-alpha.7 → 2.0.0-alpha.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.
- package/dist/client/9147ee5ec2a6b9da.js +47 -0
- package/dist/client/flow/models/ChartBlockModel.d.ts +16 -18
- package/dist/client/flow/models/ChartOptionsBuilder.d.ts +3 -5
- package/dist/client/flow/models/ChartOptionsBuilder.service.d.ts +35 -3
- package/dist/client/flow/models/{ChartEventsEditor.d.ts → EventsEditor.d.ts} +2 -1
- package/dist/client/flow/utils.d.ts +1 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +9 -9
- package/dist/locale/en-US.json +6 -1
- package/dist/locale/zh-CN.json +6 -1
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/node_modules/moment-timezone/package.json +1 -1
- package/package.json +2 -2
- package/dist/client/3c1a56fe0c67b292.js +0 -47
- package/dist/client/flow/models/ChartPreviewer.d.ts +0 -10
|
@@ -6,32 +6,19 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { ChildPageModel, DataBlockModel } from '@nocobase/client';
|
|
10
10
|
import { SQLResource } from '@nocobase/flow-engine';
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { ChartOptions } from './Chart';
|
|
13
13
|
import { ChartResource } from '../resources/ChartResource';
|
|
14
14
|
type ChartBlockModelStructure = {
|
|
15
15
|
subModels: {
|
|
16
|
-
page:
|
|
16
|
+
page: ChildPageModel;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
type ChartProps = {
|
|
20
|
-
query: {
|
|
21
|
-
mode: 'builder' | 'sql';
|
|
22
|
-
measure?: any;
|
|
23
|
-
dimension?: any;
|
|
24
|
-
filter?: any;
|
|
25
|
-
order?: any;
|
|
26
|
-
limit?: any;
|
|
27
|
-
offset?: any;
|
|
28
|
-
sql?: string;
|
|
29
|
-
};
|
|
30
20
|
chart: ChartOptions & {
|
|
31
21
|
optionRaw?: string;
|
|
32
|
-
mode: 'basic' | 'custom';
|
|
33
|
-
builder?: any;
|
|
34
|
-
raw?: string;
|
|
35
22
|
};
|
|
36
23
|
};
|
|
37
24
|
export declare class ChartBlockModel extends DataBlockModel<ChartBlockModelStructure> {
|
|
@@ -57,8 +44,19 @@ export declare class ChartBlockModel extends DataBlockModel<ChartBlockModelStruc
|
|
|
57
44
|
};
|
|
58
45
|
}[]>;
|
|
59
46
|
checkResource(query: any): void;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
applyQuery(query: any): void;
|
|
48
|
+
setDataResult(): void;
|
|
49
|
+
applyChartOptions(payload: {
|
|
50
|
+
mode: 'basic' | 'custom';
|
|
51
|
+
builder?: any;
|
|
52
|
+
raw?: string;
|
|
53
|
+
}): Promise<void>;
|
|
54
|
+
applyEvents(raw?: string): Promise<void>;
|
|
55
|
+
renderChart(): void;
|
|
56
|
+
onPreview(params: {
|
|
57
|
+
query: any;
|
|
58
|
+
chart: any;
|
|
59
|
+
}, needQueryData?: boolean): Promise<void>;
|
|
60
|
+
cancelPreview(): Promise<void>;
|
|
63
61
|
}
|
|
64
62
|
export {};
|
|
@@ -8,9 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
export declare const ChartOptionsBuilder: React.FC<{
|
|
11
|
-
columns
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
onChange?: (next: any) => void;
|
|
15
|
-
onRawChange?: (raw: string) => void;
|
|
11
|
+
columns?: string[];
|
|
12
|
+
initialValues: any;
|
|
13
|
+
onChange: (next: any) => void;
|
|
16
14
|
}>;
|
|
@@ -6,11 +6,43 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
export type ChartTypeKey = 'line' | 'bar' | 'barHorizontal' | 'pie' | 'scatter';
|
|
10
|
+
export declare function getChartFormSpec(type: ChartTypeKey): ({
|
|
11
|
+
kind: string;
|
|
12
|
+
name: any;
|
|
13
|
+
label: any;
|
|
14
|
+
required: boolean;
|
|
15
|
+
allowClear: boolean;
|
|
16
|
+
placeholderKey: string;
|
|
17
|
+
labelKey?: undefined;
|
|
18
|
+
min?: undefined;
|
|
19
|
+
max?: undefined;
|
|
20
|
+
} | {
|
|
21
|
+
kind: string;
|
|
22
|
+
name: any;
|
|
23
|
+
labelKey: any;
|
|
24
|
+
label?: undefined;
|
|
25
|
+
required?: undefined;
|
|
26
|
+
allowClear?: undefined;
|
|
27
|
+
placeholderKey?: undefined;
|
|
28
|
+
min?: undefined;
|
|
29
|
+
max?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
kind: string;
|
|
32
|
+
name: any;
|
|
33
|
+
labelKey: any;
|
|
34
|
+
min: any;
|
|
35
|
+
max: any;
|
|
36
|
+
label?: undefined;
|
|
37
|
+
required?: undefined;
|
|
38
|
+
allowClear?: undefined;
|
|
39
|
+
placeholderKey?: undefined;
|
|
40
|
+
})[];
|
|
9
41
|
export declare function buildFieldOptions(columns?: string[]): {
|
|
10
42
|
label: string;
|
|
11
43
|
value: string;
|
|
12
44
|
}[];
|
|
13
|
-
export declare function stripInvalidColumns(builder?:
|
|
14
|
-
export declare function normalizeBuilder(builder
|
|
15
|
-
export declare function applyTypeChange(builder:
|
|
45
|
+
export declare function stripInvalidColumns(builder?: {}, columns?: string[]): any;
|
|
46
|
+
export declare function normalizeBuilder(builder: any, columns?: string[]): any;
|
|
47
|
+
export declare function applyTypeChange(builder: {}, nextType: ChartTypeKey, columns?: string[]): any;
|
|
16
48
|
export declare function genRawByBuilder(builder: any): string;
|
|
@@ -7,4 +7,5 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
/// <reference types="react" />
|
|
10
|
-
|
|
10
|
+
declare const EventsEditor: import("react").ForwardRefExoticComponent<Omit<Partial<import("../components/CodeEditor").CodeEditorProps & import("react").RefAttributes<import("../components/CodeEditor").CodeEditorHandle>>, "ref"> & import("react").RefAttributes<unknown>>;
|
|
11
|
+
export default EventsEditor;
|