@nocobase/plugin-data-visualization 1.9.0-beta.9 → 2.0.0-alpha.3

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 (40) hide show
  1. package/dist/client/0c07b8c8a2f69574.js +47 -0
  2. package/dist/client/33f0f13fb9c8b63c.js +10 -0
  3. package/dist/client/ai/tools/index.d.ts +10 -0
  4. package/dist/client/d5982ab2df5b1822.js +10 -0
  5. package/dist/client/e5eee84a69b5014e.js +10 -0
  6. package/dist/client/flow/components/CodeEditor.d.ts +22 -0
  7. package/dist/client/flow/models/Chart.d.ts +16 -0
  8. package/dist/client/flow/models/ChartBlockModel.d.ts +64 -0
  9. package/dist/client/flow/models/ChartEventsEditor.d.ts +10 -0
  10. package/dist/client/flow/models/ChartOptionsBuilder.d.ts +16 -0
  11. package/dist/client/flow/models/ChartOptionsBuilder.service.d.ts +16 -0
  12. package/dist/client/flow/models/ChartOptionsEditor.d.ts +16 -0
  13. package/dist/client/flow/models/ChartOptionsPanel.d.ts +10 -0
  14. package/dist/client/flow/models/ChartPreviewer.d.ts +10 -0
  15. package/dist/client/flow/models/ConfigPanel.d.ts +10 -0
  16. package/dist/client/flow/models/ECharts.d.ts +20 -0
  17. package/dist/client/flow/models/EventsPanel.d.ts +10 -0
  18. package/dist/client/flow/models/FormItemLite.d.ts +13 -0
  19. package/dist/client/flow/models/QueryBuilder.d.ts +10 -0
  20. package/dist/client/flow/models/QueryPanel.d.ts +10 -0
  21. package/dist/client/flow/models/ResultPanel.d.ts +10 -0
  22. package/dist/client/flow/models/SQLEditor.d.ts +10 -0
  23. package/dist/client/flow/models/config-store.d.ts +20 -0
  24. package/dist/client/flow/models/queryBuilder.logic.d.ts +25 -0
  25. package/dist/client/flow/resources/ChartResource.d.ts +39 -0
  26. package/dist/client/flow/utils.d.ts +33 -0
  27. package/dist/client/index.js +1 -1
  28. package/dist/client/{locale/index.d.ts → locale.d.ts} +4 -2
  29. package/dist/client/utils.d.ts +1 -0
  30. package/dist/externalVersion.js +15 -12
  31. package/dist/locale/en-US.json +6 -0
  32. package/dist/locale/zh-CN.json +7 -1
  33. package/dist/node_modules/koa-compose/package.json +1 -1
  34. package/dist/node_modules/moment-timezone/package.json +1 -1
  35. package/dist/server/ai/tools/build-chart-block.d.ts +10 -0
  36. package/dist/server/ai/tools/build-chart-block.js +67 -0
  37. package/dist/server/plugin.js +3 -0
  38. package/dist/server/query-parser/query-parser.js +1 -1
  39. package/package.json +18 -10
  40. package/dist/client/4abed7583f4c3c67.js +0 -47
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const ChartOptionsPanel: React.FC;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const ChartPreviewer: React.FC;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const ConfigPanel: React.FC;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ import * as echarts from 'echarts';
11
+ import type { EChartsType, EChartsOption } from 'echarts';
12
+ interface Props {
13
+ option: EChartsOption;
14
+ style?: React.CSSProperties;
15
+ className?: string;
16
+ theme?: string;
17
+ onRefReady?: (chart: EChartsType) => void;
18
+ }
19
+ declare const ECharts: React.ForwardRefExoticComponent<Props & React.RefAttributes<echarts.ECharts>>;
20
+ export default ECharts;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const EventsPanel: React.FC;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ import { Form } from 'antd';
11
+ export type FormItemLiteProps = React.ComponentProps<typeof Form.Item>;
12
+ export declare const FormItemLite: React.FC<FormItemLiteProps>;
13
+ export default FormItemLite;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const QueryBuilder: React.FC;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const QueryPanel: React.FC;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const ResultPanel: React.FC;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const SQLEditor: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ interface ConfigState {
10
+ results: {
11
+ [uid: string]: {
12
+ result: any;
13
+ error?: string;
14
+ };
15
+ };
16
+ setResult: (uid: string, result: any) => void;
17
+ setError?: (uid: string, error: string) => void;
18
+ }
19
+ export declare const configStore: ConfigState;
20
+ export {};
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const useQueryBuilderLogic: () => {
10
+ token: import("antd").GlobalToken;
11
+ collectionOptions: {
12
+ value: string;
13
+ label: any;
14
+ children: {
15
+ value: string;
16
+ label: any;
17
+ }[];
18
+ }[];
19
+ fieldOptions: any[];
20
+ filterOptions: any[];
21
+ useFormatterOptions: (field: any) => void;
22
+ useOrderOptions: (field: any) => void;
23
+ useOrderReactionHook: (arrayField: any) => void;
24
+ onCollectionChange: (value: string[]) => void;
25
+ };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { BaseRecordResource } from '@nocobase/flow-engine';
10
+ export declare class ChartResource<TData = any> extends BaseRecordResource<TData> {
11
+ resourceName: string;
12
+ private refreshTimer;
13
+ protected request: {
14
+ url: string;
15
+ method: string;
16
+ params: Record<string, any>;
17
+ data: Record<string, any>;
18
+ headers: Record<string, any>;
19
+ };
20
+ setQueryParams(query: Record<string, any>, mark?: string): this;
21
+ setFilter(filter: Record<string, any>): this;
22
+ validateQuery(query: Record<string, any>): {
23
+ success: boolean;
24
+ message: string;
25
+ };
26
+ parseQuery(query: Record<string, any>): {
27
+ mode: any;
28
+ sql: any;
29
+ dataSource: any;
30
+ collection: any;
31
+ measures: any;
32
+ dimensions: any;
33
+ filter: any;
34
+ limit: any;
35
+ offset: any;
36
+ };
37
+ run(): Promise<any>;
38
+ refresh(): Promise<void>;
39
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare function convertDatasetFormats(data: Record<string, any>[]): {
10
+ objects: any[];
11
+ rows: any[];
12
+ columns: any[];
13
+ dimensions?: undefined;
14
+ } | {
15
+ dimensions: string[];
16
+ objects: Record<string, any>[];
17
+ rows: string[][];
18
+ columns: any[][];
19
+ };
20
+ export declare const formatters: {
21
+ datetime: {
22
+ label: string;
23
+ value: string;
24
+ }[];
25
+ date: {
26
+ label: string;
27
+ value: string;
28
+ }[];
29
+ time: {
30
+ label: string;
31
+ value: string;
32
+ }[];
33
+ };