@nocobase/plugin-data-visualization 1.0.0-alpha.2 → 1.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.
- package/dist/client/block/ChartBlock.d.ts +8 -0
- package/dist/client/block/ChartBlockDesigner.d.ts +8 -0
- package/dist/client/block/ChartBlockInitializer.d.ts +8 -0
- package/dist/client/block/ChartDataProvider.d.ts +8 -0
- package/dist/client/block/index.d.ts +8 -0
- package/dist/client/chart/antd/antd.d.ts +8 -0
- package/dist/client/chart/antd/index.d.ts +8 -0
- package/dist/client/chart/antd/statistic.d.ts +8 -0
- package/dist/client/chart/antd/table.d.ts +8 -0
- package/dist/client/chart/chart.d.ts +8 -0
- package/dist/client/chart/configs.d.ts +8 -0
- package/dist/client/chart/g2plot/AntChart.d.ts +8 -0
- package/dist/client/chart/g2plot/bar.d.ts +8 -0
- package/dist/client/chart/g2plot/configs.d.ts +8 -0
- package/dist/client/chart/g2plot/dualAxes.d.ts +8 -0
- package/dist/client/chart/g2plot/g2plot.d.ts +8 -0
- package/dist/client/chart/g2plot/index.d.ts +8 -0
- package/dist/client/chart/g2plot/pie.d.ts +8 -0
- package/dist/client/chart/group.d.ts +8 -0
- package/dist/client/configure/ChartConfigProvider.d.ts +8 -0
- package/dist/client/configure/ChartConfigure.d.ts +8 -0
- package/dist/client/configure/FilterDynamicComponent.d.ts +8 -0
- package/dist/client/configure/TransformerDynamicComponent.d.ts +8 -0
- package/dist/client/configure/formatters.d.ts +8 -0
- package/dist/client/configure/index.d.ts +8 -0
- package/dist/client/configure/schemas/configure.d.ts +8 -0
- package/dist/client/filter/CollectionFieldInitializer.d.ts +8 -0
- package/dist/client/filter/FilterActionInitializers.d.ts +8 -0
- package/dist/client/filter/FilterBlockDesigner.d.ts +8 -0
- package/dist/client/filter/FilterBlockInitializer.d.ts +8 -0
- package/dist/client/filter/FilterBlockProvider.d.ts +8 -0
- package/dist/client/filter/FilterCheckbox.d.ts +8 -0
- package/dist/client/filter/FilterForm.d.ts +8 -0
- package/dist/client/filter/FilterItemDesigner.d.ts +8 -0
- package/dist/client/filter/FilterItemInitializers.d.ts +8 -0
- package/dist/client/filter/FilterProvider.d.ts +8 -0
- package/dist/client/filter/FilterVariableInput.d.ts +8 -0
- package/dist/client/filter/index.d.ts +8 -0
- package/dist/client/filter/utils.d.ts +8 -0
- package/dist/client/hooks/filter.d.ts +8 -0
- package/dist/client/hooks/index.d.ts +8 -0
- package/dist/client/hooks/query.d.ts +8 -0
- package/dist/client/hooks/transformer.d.ts +8 -0
- package/dist/client/hooks/useDateVariable.d.ts +8 -0
- package/dist/client/hooks/useUserVariable.d.ts +8 -0
- package/dist/client/hooks/useVariableOptions.d.ts +8 -0
- package/dist/client/index.d.ts +8 -0
- package/dist/client/index.js +9 -0
- package/dist/client/locale/index.d.ts +8 -0
- package/dist/client/renderer/ChartRenderer.d.ts +8 -0
- package/dist/client/renderer/ChartRendererProvider.d.ts +8 -0
- package/dist/client/renderer/index.d.ts +8 -0
- package/dist/client/transformers.d.ts +8 -0
- package/dist/client/utils.d.ts +8 -0
- package/dist/externalVersion.js +15 -6
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/server/actions/formatter.d.ts +8 -0
- package/dist/server/actions/formatter.js +9 -0
- package/dist/server/actions/query.d.ts +8 -0
- package/dist/server/actions/query.js +9 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.js +9 -0
- package/dist/server/migrations/20230926211750-rename-charttype.d.ts +8 -0
- package/dist/server/migrations/20230926211750-rename-charttype.js +9 -0
- package/dist/server/plugin.d.ts +8 -0
- package/dist/server/plugin.js +9 -0
- package/dist/swagger/index.d.ts +8 -0
- package/dist/swagger/index.js +9 -0
- package/package.json +2 -2
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartV2Block: React.FC;
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartV2BlockDesigner: React.FC;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { CompatibleSchemaInitializer } from '@nocobase/client';
|
|
2
10
|
import React from 'react';
|
|
3
11
|
/**
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
type ChartData = {
|
|
3
11
|
dataSource: string;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export * from './ChartBlock';
|
|
2
10
|
export * from './ChartBlockDesigner';
|
|
3
11
|
export * from './ChartBlockInitializer';
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Chart } from '../chart';
|
|
2
10
|
export declare class AntdChart extends Chart {
|
|
3
11
|
getReference(): {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Statistic } from './statistic';
|
|
2
10
|
import { Table } from './table';
|
|
3
11
|
declare const _default: (Statistic | Table)[];
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { AntdChart } from './antd';
|
|
2
10
|
import { ChartType, RenderProps } from '../chart';
|
|
3
11
|
export declare class Statistic extends AntdChart {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { RenderProps } from '../chart';
|
|
2
10
|
import { AntdChart } from './antd';
|
|
3
11
|
export declare class Table extends AntdChart {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
import { FieldOption } from '../hooks';
|
|
3
11
|
import { DimensionProps, MeasureProps } from '../renderer';
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { SchemaProperties } from '@formily/react';
|
|
2
10
|
export type FieldConfigProps = Partial<{
|
|
3
11
|
name: string;
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const getAntChart: (Component: React.FC<any>) => (props: any) => React.JSX.Element;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { G2PlotChart } from './g2plot';
|
|
2
10
|
import { ChartType } from '../chart';
|
|
3
11
|
export declare class Bar extends G2PlotChart {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { FieldConfigProps } from '../configs';
|
|
2
10
|
declare const _default: {
|
|
3
11
|
isStack: (props: FieldConfigProps) => {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { G2PlotChart } from './g2plot';
|
|
2
10
|
import { ChartType, RenderProps } from '../chart';
|
|
3
11
|
export declare class DualAxes extends G2PlotChart {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Chart, ChartProps, ChartType, RenderProps } from '../chart';
|
|
2
10
|
export declare class G2PlotChart extends Chart {
|
|
3
11
|
constructor({ name, title, Component, config }: ChartProps);
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { G2PlotChart } from './g2plot';
|
|
2
10
|
declare const _default: G2PlotChart[];
|
|
3
11
|
export default _default;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { G2PlotChart } from './g2plot';
|
|
2
10
|
import { ChartType, RenderProps } from '../chart';
|
|
3
11
|
export declare class Pie extends G2PlotChart {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { ChartType } from './chart';
|
|
2
10
|
export declare class ChartGroup {
|
|
3
11
|
/**
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { ISchema } from '@formily/react';
|
|
2
10
|
import React from 'react';
|
|
3
11
|
export type ChartConfigCurrent = {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { ISchema } from '@formily/react';
|
|
2
10
|
import React from 'react';
|
|
3
11
|
export type SelectedField = {
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare function FilterDynamicComponent(props: any): React.JSX.Element;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const TransformerDynamicComponent: React.FC<{
|
|
3
11
|
schema: any;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
declare const _default: {
|
|
2
10
|
datetime: {
|
|
3
11
|
label: string;
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
export * from './ChartConfigure';
|
|
2
10
|
export * from './ChartConfigProvider';
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { ISchema } from '@formily/react';
|
|
2
10
|
export declare const getConfigSchema: (general: any) => ISchema;
|
|
3
11
|
export declare const querySchema: ISchema;
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const CollectionFieldInitializer: () => React.JSX.Element;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { CompatibleSchemaInitializer } from '@nocobase/client';
|
|
2
10
|
import React from 'react';
|
|
3
11
|
export declare const useChartFilterActionProps: () => {
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartFilterBlockDesigner: React.FC;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartFilterGrid: React.FC;
|
|
3
11
|
export declare const FilterBlockInitializer: React.FC;
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartFilterBlockProvider: React.FC;
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartFilterCheckbox: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartFilterForm: React.FC;
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartFilterItemDesigner: React.FC;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { CompatibleSchemaInitializer } from '@nocobase/client';
|
|
2
10
|
import React from 'react';
|
|
3
11
|
export declare const ChartFilterFormItem: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
type FilterField = {
|
|
3
11
|
title?: string;
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartFilterVariableInput: React.FC<any>;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export * from './FilterBlockDesigner';
|
|
2
10
|
export * from './FilterBlockInitializer';
|
|
3
11
|
export * from './FilterItemInitializers';
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Schema } from '@formily/react';
|
|
2
10
|
export declare const getOptionsSchema: () => {
|
|
3
11
|
title: string;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Collection, CollectionFieldInterfaceManager, CollectionManager, SchemaInitializerItemType } from '@nocobase/client';
|
|
2
10
|
export declare const useCustomFieldInterface: () => {
|
|
3
11
|
getSchemaByInterface: (fieldInterface: string) => any;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export * from './query';
|
|
2
10
|
export * from './transformer';
|
|
3
11
|
export * from './useVariableOptions';
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { ArrayField } from '@formily/core';
|
|
2
10
|
import { ISchema } from '@formily/react';
|
|
3
11
|
import { CollectionFieldOptions, CollectionManager } from '@nocobase/client';
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { ChartRendererProps } from '../renderer';
|
|
2
10
|
import { FieldOption } from './query';
|
|
3
11
|
export declare const useFieldSelectProps: (fields: FieldOption[]) => () => {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare const useDateVariable: ({ schema }: {
|
|
2
10
|
schema: any;
|
|
3
11
|
}) => {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare const useUserVariable: ({ schema }: {
|
|
2
10
|
schema: any;
|
|
3
11
|
}) => {
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare const useVariableOptions: () => ({
|
|
2
10
|
label: string;
|
|
3
11
|
value: string;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Plugin } from '@nocobase/client';
|
|
2
10
|
import { ChartGroup } from './chart/group';
|
|
3
11
|
declare class PluginDataVisualiztionClient extends Plugin {
|
package/dist/client/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
(function(ct,z){typeof exports=="object"&&typeof module!="undefined"?z(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@formily/core"),require("@formily/react"),require("antd"),require("lodash"),require("react-i18next"),require("dayjs"),require("@formily/shared"),require("ahooks"),require("@nocobase/utils/client"),require("@emotion/css")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","react","@ant-design/icons","@formily/antd-v5","@formily/core","@formily/react","antd","lodash","react-i18next","dayjs","@formily/shared","ahooks","@nocobase/utils/client","@emotion/css"],z):(ct=typeof globalThis!="undefined"?globalThis:ct||self,z(ct["@nocobase/plugin-data-visualization"]={},ct["@nocobase/client"],ct.jsxRuntime,ct.react,ct["@ant-design/icons"],ct["@formily/antd-v5"],ct["@formily/core"],ct["@formily/react"],ct.antd,ct.lodash,ct["react-i18next"],ct.dayjs,ct["@formily/shared"],ct.ahooks,ct["@nocobase/utils"],ct["@emotion/css"]))})(this,function(ct,z,Y,q,Nn,ae,wn,dt,wt,rn,Ey,Ve,Fo,Ei,My,Ga){"use strict";var TMt=Object.defineProperty,kMt=Object.defineProperties;var LMt=Object.getOwnPropertyDescriptors;var Sy=Object.getOwnPropertySymbols;var eB=Object.prototype.hasOwnProperty,nB=Object.prototype.propertyIsEnumerable;var CS=(ct,z)=>(z=Symbol[ct])?z:Symbol.for("Symbol."+ct),Ce=Math.pow,TS=(ct,z,Y)=>z in ct?TMt(ct,z,{enumerable:!0,configurable:!0,writable:!0,value:Y}):ct[z]=Y,tt=(ct,z)=>{for(var Y in z||(z={}))eB.call(z,Y)&&TS(ct,Y,z[Y]);if(Sy)for(var Y of Sy(z))nB.call(z,Y)&&TS(ct,Y,z[Y]);return ct},pt=(ct,z)=>kMt(ct,LMt(z));var rB=(ct,z)=>{var Y={};for(var q in ct)eB.call(ct,q)&&z.indexOf(q)<0&&(Y[q]=ct[q]);if(ct!=null&&Sy)for(var q of Sy(ct))z.indexOf(q)<0&&nB.call(ct,q)&&(Y[q]=ct[q]);return Y};var ni=(ct,z,Y)=>(TS(ct,typeof z!="symbol"?z+"":z,Y),Y);var Cr=(ct,z,Y)=>new Promise((q,Nn)=>{var ae=wt=>{try{dt(Y.next(wt))}catch(rn){Nn(rn)}},wn=wt=>{try{dt(Y.throw(wt))}catch(rn){Nn(rn)}},dt=wt=>wt.done?q(wt.value):Promise.resolve(wt.value).then(ae,wn);dt((Y=Y.apply(ct,z)).next())}),NMt=function(ct,z){this[0]=ct,this[1]=z};var iB=ct=>{var z=ct[CS("asyncIterator")],Y=!1,q,Nn={};return z==null?(z=ct[CS("iterator")](),q=ae=>Nn[ae]=wn=>z[ae](wn)):(z=z.call(ct),q=ae=>Nn[ae]=wn=>{if(Y){if(Y=!1,ae==="throw")throw wn;return wn}return Y=!0,{done:!1,value:new NMt(new Promise(dt=>{var wt=z[ae](wn);if(!(wt instanceof Object))throw TypeError("Object expected");dt(wt)}),1)}}),Nn[CS("iterator")]=()=>Nn,q("next"),"throw"in z?q("throw"):Nn.throw=ae=>{throw ae},"return"in z&&q("return"),Nn};function wB(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const kS="data-visualization";function At(t){return z.i18n.t(t,{ns:[kS,"client"]})}function se(){return Ey.useTranslation([kS,"client"],{nsMode:"fallback"})}const Py={datetime:[{label:At("YYYY"),value:"YYYY"},{label:At("MM"),value:"MM"},{label:At("DD"),value:"DD"},{label:At("YYYY-MM"),value:"YYYY-MM"},{label:At("YYYY-MM-DD"),value:"YYYY-MM-DD"},{label:At("YYYY-MM-DD hh:mm"),value:"YYYY-MM-DD hh:mm"},{label:At("YYYY-MM-DD hh:mm:ss"),value:"YYYY-MM-DD hh:mm:ss"}],date:[{label:At("YYYY"),value:"YYYY"},{label:At("MM"),value:"MM"},{label:At("DD"),value:"DD"},{label:At("YYYY-MM"),value:"YYYY-MM"},{label:At("YYYY-MM-DD"),value:"YYYY-MM-DD"}],time:[{label:At("hh:mm:ss"),value:"hh:mm:ss"},{label:At("hh:mm"),value:"hh:mm"},{label:At("hh"),value:"hh"}]},OB=q.createContext(null),Ay={didCatch:!1,error:null};let LS=class extends q.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ay}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(Ay)}}componentDidCatch(e,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,e,n)}componentDidUpdate(e,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&_B(e.resetKeys,i)){var o,a;(o=(a=this.props).onReset)===null||o===void 0||o.call(a,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState(Ay)}}render(){const{children:e,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:a}=this.state;let s=e;if(o){const l={error:a,resetErrorBoundary:this.resetErrorBoundary};if(q.isValidElement(i))s=i;else if(typeof n=="function")s=n(l);else if(r)s=q.createElement(r,l);else throw a}return q.createElement(OB.Provider,{value:{didCatch:o,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}};function _B(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t.length!==e.length||t.some((n,r)=>!Object.is(n,e[r]))}const NS=(t,e={})=>{const{collection:n,config:r}=t,{title:i,bordered:o}=r||{};return{type:"void","x-decorator":"ChartRendererProvider","x-decorator-props":t,"x-acl-action":`${n}:list`,"x-designer":"ChartRenderer.Designer","x-component":"CardItem","x-component-props":{size:"small",title:i,bordered:o},"x-initializer":"charts:addBlock",properties:{[Fo.uid()]:{type:"void","x-component":"ChartRenderer","x-component-props":e}}}},au=t=>{let e,n;return Array.isArray(t)?t.length===1?n=t[0]:t.length>1&&([e,n]=t):n=t,{target:e,name:n,alias:e?`${e}.${n}`:n}},dh=(t,e)=>{var o,a;const{target:n,name:r}=au(e);return n?(a=(o=t.find(s=>s.name===n))==null?void 0:o.targetFields)==null?void 0:a.find(s=>s.name===r):t.find(s=>s.name===r)},il=(t,e)=>{const n=s=>s.map(l=>{const c=dh(t,l.field);return pt(tt({},c),{key:l.alias||(c==null?void 0:c.key),label:l.alias||(c==null?void 0:c.label),value:l.alias||(c==null?void 0:c.value)})}),r=e.measures||[],i=e.dimensions||[];return[...new Map([...n(r),...n(i)].map(s=>[s.value,s])).values()]},SB=(t,e,n)=>{const r=(i,o)=>{var l;const a=(l=i.uiSchema)==null?void 0:l.enum;if(!a||!Array.isArray(a))return o;const s=a.find(c=>c.value===o);return dt.Schema.compile((s==null?void 0:s.label)||o,n)};return e.map(i=>{const o={};return Object.entries(i).forEach(([a,s])=>{const l=t.find(c=>c.value===a);if(!l){o[a]=s;return}switch(l.interface){case"select":case"radioGroup":o[a]=r(l,s);break;default:o[a]=s}}),o})},Cy=t=>{if(typeof t=="object"&&t!==null)if(Array.isArray(t)){const e=t.map(n=>Cy(n)).filter(Boolean);return e.length>0?e:null}else{const e={};for(const n in t){const r=Cy(t[n]);r!=null&&!(typeof r=="object"&&Object.keys(r).length===0)&&(e[n]=r)}return Object.keys(e).length>0?e:null}else if(typeof t=="string"&&t.startsWith("{{$nFilter.")&&t.endsWith("}}"))return null;return t},EB=(t,e)=>{const n=e.split(".");let r=rn.get(t,n.slice(0,-1).join("."));return Array.isArray(r)?r=r.map(i=>rn.get(i,n.slice(-1)[0])):r=rn.get(r,n.slice(-1)[0]),r},MB=t=>({boolean:"Checkbox",integer:"InputNumber",bigInt:"InputNumber",double:"InputNumber",decimal:"InputNumber",date:"DatePicker",string:"Input"})[t],PB=t=>({boolean:"boolean",integer:"integer",bigInt:"integer",double:"number",decimal:"number",date:"datetime",string:"input"})[t],ol=q.createContext({});ol.displayName="ChartDataContext";const AB=t=>{const[e,n]=q.useState({}),r=Ei.useMemoizedFn((o,{dataSource:a,collection:s,service:l,query:c})=>{n(u=>pt(tt({},u),{[o]:{dataSource:a,collection:s,service:l,query:c}}))}),i=Ei.useMemoizedFn(o=>{n(a=>pt(tt({},a),{[o]:void 0}))});return Y.jsx(ol.Provider,{value:{charts:e,addChart:r,removeChart:i},children:t.children})},Tr=q.createContext({});Tr.displayName="ChartFilterContext";const CB=t=>{const[e,n]=q.useState(!1),[r,i]=q.useState(!1),[o,a]=q.useState({}),[s,l]=q.useState({collapsed:!1,row:1}),[c,u]=q.useState(),f=Ei.useMemoizedFn((g,y)=>{a(m=>pt(tt({},m),{[g]:tt(tt({},m[g]||{}),y)}))}),d=Ei.useMemoizedFn(g=>{a(y=>{const m=tt({},y);return m[g]=void 0,m})}),h=Ei.useMemoizedFn(u),p=Ei.useMemoizedFn(i),v=({collapsed:g,row:y})=>{l(m=>({collapsed:g!==void 0?g:m.collapsed,row:y!==void 0?y:m.row}))};return q.useEffect(()=>n(!0),[]),Y.jsx(Tr.Provider,{value:{ready:e,enabled:r,setEnabled:p,fields:o,setField:f,removeField:d,collapse:s,setCollapse:v,form:c,setForm:h},children:t.children})},ri=q.createContext({});ri.displayName="ChartRendererContext";const IS=t=>{const{query:e,config:n,collection:r,transform:i,dataSource:o=z.DEFAULT_DATA_SOURCE_KEY}=t,{addChart:a}=q.useContext(ol),{ready:s,form:l,enabled:c}=q.useContext(Tr),{getFilter:u,hasFilter:f,appendFilter:d}=sl(),h=dt.useFieldSchema(),p=z.useAPIClient(),v=z.useRequest((g,y,m,b)=>new Promise((x,w)=>{var S;if(!(y&&((S=m==null?void 0:m.measures)!=null&&S.length))||c&&!l)return x(void 0);const O=u(),_=!b&&f({dataSource:g,collection:y,query:m},O)?d({dataSource:g,collection:y,query:m},O):m;p.request({url:"charts:query",method:"POST",data:pt(tt({uid:h==null?void 0:h["x-uid"],dataSource:g,collection:y},_),{filter:Cy(_.filter),dimensions:((m==null?void 0:m.dimensions)||[]).map(E=>{const M=tt({},E);if(E.format&&!E.alias){const{alias:P}=au(E.field);M.alias=P}return M}),measures:((m==null?void 0:m.measures)||[]).map(E=>{const M=tt({},E);if(E.aggregation&&!E.alias){const{alias:P}=au(E.field);M.alias=P}return M})})}).then(E=>{var M;x((M=E==null?void 0:E.data)==null?void 0:M.data)}).finally(()=>{!b&&(h!=null&&h["x-uid"])&&a(h==null?void 0:h["x-uid"],{dataSource:g,collection:y,service:v,query:m})}).catch(w)}),{defaultParams:[o,r,e],ready:s&&(!c||!!l)});return Y.jsx(z.CollectionManagerProvider,{dataSource:o,children:Y.jsx(z.MaybeCollectionProvider,{collection:r,children:Y.jsx(wt.ConfigProvider,{card:{style:{boxShadow:"none"}},children:Y.jsx(ri.Provider,{value:{dataSource:o,collection:r,config:n,transform:i,service:v,query:e},children:t.children})})})})};class TB{constructor(){ni(this,"charts",new Map)}setGroup(e,n){this.charts.set(e,n)}addGroup(e,n){if(this.charts.has(e))throw new Error(`[data-visualization] Chart group "${e}" already exists`);this.setGroup(e,n)}add(e,n){var r;this.charts.has(e)||this.setGroup(e,[]),(r=this.charts.get(e))==null||r.push(n)}getChartTypes(){const e=[];this.charts.forEach((r,i)=>{const o=r.map(a=>({key:`${i}.${a.name}`,label:At(a.title),value:`${i}.${a.name}`}));e.push({label:At(i),children:o})});const n=e.findIndex(r=>r.label===At("Built-in"));if(n>-1){const[r]=e.splice(n,1);e.unshift(r)}return e}getCharts(){const e={};return this.charts.forEach((n,r)=>{n.forEach(i=>{e[`${r}.${i.name}`]=i})}),e}getChart(e){return this.getCharts()[e]}}const jS=()=>z.usePlugin(_y).charts.getChartTypes(),kB=()=>{var e,n,r;return(r=(n=(e=jS()[0])==null?void 0:e.children)==null?void 0:n[0])==null?void 0:r.value},DS=()=>z.usePlugin(_y).charts.getCharts(),LB=t=>z.usePlugin(_y).charts.getChart(t),{Paragraph:NB,Text:IB}=wt.Typography,Ty=t=>{const{t:e}=se(),n=q.useContext(ri),{config:r,transform:i,dataSource:o,collection:a,service:s,data:l}=n,c=Ha(o,a),u=FS(l,o,a),f=(r==null?void 0:r.general)||{},d=(r==null?void 0:r.advanced)||{},h=z.useAPIClient(),p=LB(r==null?void 0:r.chartType),v=h.auth.getLocale(),g=XB(i,v),y=p==null?void 0:p.getProps({data:u,general:f,advanced:d,fieldProps:Object.keys(u[0]||{}).reduce((x,w)=>{if(!x[w]){const O=dh(c,w.split(".")),_=g[w];x[w]={label:(O==null?void 0:O.label)||w,transformer:_,interface:O==null?void 0:O.interface}}return x},{})}),m=dt.Schema.compile(y),b=p==null?void 0:p.Component;return p?!(u&&u.length)&&!s.loading?Y.jsx(wt.Empty,{image:wt.Empty.PRESENTED_IMAGE_SIMPLE,description:e("No data")}):Y.jsx(wt.Spin,{spinning:s.loading,children:Y.jsx(LS,{onError:x=>{console.error(x)},FallbackComponent:jB,children:Y.jsx(b,tt({},m))})}):Y.jsx(wt.Empty,{image:wt.Empty.PRESENTED_IMAGE_SIMPLE,description:e("Please configure chart")})};Ty.Designer=function(){const{t:e}=se(),{setVisible:n,setCurrent:r}=q.useContext(Mi),{removeChart:i}=q.useContext(ol),{service:o}=q.useContext(ri),a=dt.useField(),s=dt.useFieldSchema(),{insertAdjacent:l}=z.useDesignable(),c=z.useDataSource(),{name:u,title:f}=z.useCollection_deprecated();return Y.jsxs(z.GeneralSchemaDesigner,{disableInitializer:!0,title:f||u,children:[Y.jsx(z.SchemaSettingsItem,{title:"Configure",onClick:()=>Cr(this,null,function*(){r({schema:s,field:a,dataSource:c.key,collection:u,service:o,data:o.data}),n(!0)}),children:e("Configure")},"configure"),Y.jsx(z.SchemaSettingsItem,{title:"Duplicate",onClick:()=>l("afterEnd",z.gridRowColWrap(NS(s==null?void 0:s["x-decorator-props"]))),children:e("Duplicate")},"duplicate"),Y.jsx(z.SchemaSettingsDivider,{}),Y.jsx(z.SchemaSettingsRemove,{breakRemoveOn:{"x-component":"ChartV2Block"},confirm:{onOk:()=>{i(s["x-uid"])}}})]})};const jB=({error:t})=>{const{t:e}=se();return Y.jsx("div",{style:{backgroundColor:"white"},children:Y.jsx(wt.Result,{status:"error",title:e("Render Failed"),subTitle:e("Please check the configuration."),children:Y.jsx(NB,{copyable:!0,children:Y.jsx(IB,{type:"danger",style:{whiteSpace:"pre-line",textAlign:"center"},children:t.message})})})})},su=t=>{const{current:e}=q.useContext(Mi),{dataSource:n=t||z.DEFAULT_DATA_SOURCE_KEY,collection:r}=e||{},i=z.useDataSourceManager(),o=i.getDataSource(n),a=i.collectionFieldInterfaceManager;return{cm:o==null?void 0:o.collectionManager,fim:a,collection:r}},DB=t=>(t||[]).filter(n=>n.interface).map(n=>{var r;return pt(tt({},n),{key:n.name,label:((r=n.uiSchema)==null?void 0:r.title)||n.name,value:n.name})}),Ha=(t,e)=>{const{t:n}=Ey.useTranslation(),{cm:r,fim:i,collection:o}=su(t),a=r.getCollectionFields(e||o),s=DB(a);return q.useMemo(()=>s.map(l=>{var d,h,p,v;const c=(d=i.getFieldInterface(l.interface))==null?void 0:d.filterable,u=dt.Schema.compile(((h=l.uiSchema)==null?void 0:h.title)||l.name,{t:n});if(!(c&&(c!=null&&c.nested||(p=c==null?void 0:c.children)!=null&&p.length)))return pt(tt({},l),{label:u});let f=[];if(c!=null&&c.nested){const g=(r.getCollectionFields(l.target)||[]).filter(y=>y.interface).map(y=>{var m;return pt(tt({},y),{key:`${l.name}.${y.name}`,label:`${u} / ${dt.Schema.compile(((m=y.uiSchema)==null?void 0:m.title)||y.name,{t:n})}`,value:`${l.name}.${y.name}`})});f=[...f,...g]}if((v=c==null?void 0:c.children)!=null&&v.length){const g=c.children.map(y=>{var m;return pt(tt({},y),{key:`${l.name}.${y.name}`,label:`${u} / ${dt.Schema.compile(((m=y.schema)==null?void 0:m.title)||y.title||y.name,{t:n})}`,value:`${l.name}.${y.name}`})});f=[...f,...g]}return pt(tt({},l),{label:u,targetFields:f})}),[s])},$S=t=>e=>{const n=e.query("query").get("value")||{},r=il(t,n);e.dataSource=r},$B=t=>e=>{var o;const n=e.query(".field").get("value");if(!n){e.dataSource=[];return}let r=[];switch((o=dh(t,n))==null?void 0:o.interface){case"datetime":case"createdAt":case"updatedAt":r=Py.datetime;break;case"date":r=Py.date;break;case"time":r=Py.time;break;default:r=[]}e.dataSource=r},FB=()=>{const{t}=Ey.useTranslation(),e=z.useDataSourceManager(),{parseAction:n}=z.useACLRoleContext(),i=e.getAllCollections({filterCollection:o=>n(`${o.name}:list`)}).filter(({key:o,isDBInstance:a})=>o===z.DEFAULT_DATA_SOURCE_KEY||a).map(({key:o,displayName:a,collections:s})=>({value:o,label:a,children:s.map(l=>({value:l.name,label:l.title}))}));return q.useMemo(()=>dt.Schema.compile(i,{t}),[i])},RB=(t,e)=>n=>{const r=n.query("query").get("value")||{},{measures:i=[]}=r;if(!i.some(s=>s.aggregation)){n.componentProps.fieldNames={label:"title",value:"name",children:"children"},n.dataSource=t;return}const a=il(e,r);n.componentProps.fieldNames={},n.dataSource=a},BB=(t,e)=>n=>{const r=n.query("query").get("value")||{},{measures:i=[]}=r,o=i.some(u=>u.aggregation);let a=t;const s=[];o?(a=il(e,r),a.forEach(u=>{s.push(u.value)})):a.forEach(u=>{const f=u.children||[];f.length||s.push(u.value||u.name),f.forEach(d=>{s.push(`${u.name}.${d.name}`)})});const c=(n.value||[]).reduce((u,f)=>{const{alias:d}=au(f.field);return(!f.field||s.includes(d))&&u.push(f),u},[]);n.setValue(c)},FS=(t,e,n)=>{var c;const{t:r}=se(),{service:i,query:o}=q.useContext(ri),a=Ha(e,n),s=dt.useForm(),l=il(a,((c=s==null?void 0:s.values)==null?void 0:c.query)||o);return SB(l,(i==null?void 0:i.data)||t||[],{t:r})},zB=(t,e,n=2,r=[])=>{const{cm:i,fim:o,collection:a}=su(t),l=i.getCollectionFields(e||a).filter(d=>!r.includes(d.interface)),c=(d,h,p)=>{var x;if(!d.interface||d.isForeignKey)return;const v=o.getFieldInterface(d.interface);if(!(v!=null&&v.filterable))return;const{nested:g,children:y}=v.filterable,m=p?`${p}.${d.name}`:d.name,b=pt(tt({},d),{name:d.name,title:((x=d==null?void 0:d.uiSchema)==null?void 0:x.title)||d.name,schema:d==null?void 0:d.uiSchema,key:m});if(!(d.target&&h>n)){if(h>n)return b;if(y!=null&&y.length&&(b.children=y.map(w=>pt(tt({},w),{key:`${d.name}.${w.name}`}))),g){const w=i.getCollectionFields(d.target).filter(_=>!r.includes(_.interface)),O=u(w,h+1,d.name).filter(Boolean);b.children=b.children||[],b.children.push(...O)}return b}},u=(d,h,p)=>{const v=[];return d.forEach(g=>{const y=c(g,h,p);y&&v.push(y)}),v};return u(l,1)},YB=(t,e)=>{const{cm:n,fim:r,collection:i}=su(t);return q.useMemo(()=>{const o=n.getCollectionFields(e||i),a=(c,u)=>{var g,y;if(!c.interface||c.isForeignKey)return;const f=r.getFieldInterface(c.interface);if(!(f!=null&&f.filterable))return;const{nested:d,children:h,operators:p}=f.filterable,v={name:c.name,title:((g=c==null?void 0:c.uiSchema)==null?void 0:g.title)||c.name,schema:c==null?void 0:c.uiSchema,operators:((y=p==null?void 0:p.filter)==null?void 0:y.call(p,m=>!(m!=null&&m.visible)||m.visible(c)))||[],interface:c.interface};if(!(c.target&&u>2)){if(u>2)return v;if(h!=null&&h.length&&(v.children=h),d){const m=n.getCollectionFields(c.target),b=s(m,u+1).filter(Boolean);v.children=v.children||[],v.children.push(...b)}return v}},s=(c,u)=>{const f=[];return c.forEach(d=>{const h=a(d,u);h&&f.push(h)}),f};return s(o,1)},[e,n,r])},Ro={general:{Prefix:{schema:{"x-component":"Input"},fn:(t,e)=>e?`${e}${t}`:t},Suffix:{schema:{"x-component":"Input"},fn:(t,e)=>e?`${t}${e}`:t}},datetime:{Format:{schema:{"x-component":"AutoComplete","x-component-props":{allowClear:!0,style:{minWidth:200}},enum:[{label:"YYYY",value:"YYYY"},{label:"YYYY-MM",value:"YYYY-MM"},{label:"YYYY-MM-DD",value:"YYYY-MM-DD"},{label:"YYYY-MM-DD hh:mm",value:"YYYY-MM-DD hh:mm"},{label:"YYYY-MM-DD hh:mm:ss",value:"YYYY-MM-DD hh:mm:ss"}]},fn:(t,e)=>Ve(t).format(e)},YYYY:{label:"YYYY (Deprecated, use Format instead)",fn:t=>Ve(t).format("YYYY")},MM:{label:"MM (Deprecated, use Format instead)",fn:t=>Ve(t).format("MM")},DD:{label:"DD (Deprecated, use Format instead)",fn:t=>Ve(t).format("DD")},"YYYY-MM":{label:"YYYY-MM (Deprecated, use Format instead)",fn:t=>Ve(t).format("YYYY-MM")},"YYYY-MM-DD":{label:"YYYY-MM-DD (Deprecated, use Format instead)",fn:t=>Ve(t).format("YYYY-MM-DD")},"YYYY-MM-DD hh:mm":{label:"YYYY-MM-DD hh:mm (Deprecated, use Format instead)",fn:t=>Ve(t).format("YYYY-MM-DD hh:mm")},"YYYY-MM-DD hh:mm:ss":{label:"YYYY-MM-DD hh:mm:ss (Deprecated, use Format instead)",fn:t=>Ve(t).format("YYYY-MM-DD hh:mm:ss")}},date:{Format:{schema:{"x-component":"AutoComplete","x-component-props":{allowClear:!0,style:{minWidth:200}},enum:[{label:"YYYY",value:"YYYY"},{label:"MM",value:"MM"},{label:"DD",value:"DD"},{label:"YYYY-MM",value:"YYYY-MM"},{label:"YYYY-MM-DD",value:"YYYY-MM-DD"}]},fn:(t,e)=>Ve(t).format(e)},YYYY:{label:"YYYY (Deprecated, use Format instead)",fn:t=>Ve(t).format("YYYY")},MM:{label:"MM (Deprecated, use Format instead)",fn:t=>Ve(t).format("MM")},DD:{label:"DD (Deprecated, use Format instead)",fn:t=>Ve(t).format("DD")},"YYYY-MM":{label:"YYYY-MM (Deprecated, use Format instead)",fn:t=>Ve(t).format("YYYY-MM")},"YYYY-MM-DD":{label:"YYYY-MM-DD (Deprecated, use Format instead)",fn:t=>Ve(t).format("YYYY-MM-DD")}},time:{Format:{schema:{"x-component":"AutoComplete","x-component-props":{allowClear:!0,style:{minWidth:200}},enum:[{label:"hh:mm:ss",value:"hh:mm:ss"},{label:"hh:mm",value:"hh:mm"},{label:"hh",value:"hh"}]},fn:(t,e)=>Ve(t).format(e)},"hh:mm:ss":{label:"hh:mm:ss (Deprecated, use Format instead)",fn:t=>Ve(t).format("hh:mm:ss")},"hh:mm":{label:"hh:mm (Deprecated, use Format instead)",fn:t=>Ve(t).format("hh:mm")},hh:{label:"hh (Deprecated, use Format instead)",fn:t=>Ve(t).format("hh")}},number:{Precision:{schema:{"x-component":"Select",enum:[{label:"1",value:0},{label:"1.0",value:1},{label:"1.00",value:2},{label:"1.000",value:3}]},fn:(t,e)=>Number(t.toFixed(e))},Separator:{schema:{"x-component":"Select",enum:[{label:"100,000.00",value:"en-US"},{label:"100.000,00",value:"de-DE"},{label:"100 000.00",value:"ru-RU"}]},fn:(t,e)=>{switch(e){case"en-US":return t.toLocaleString("en-US",{minimumFractionDigits:2});case"de-DE":return t.toLocaleString("de-DE",{minimumFractionDigits:2});case"ru-RU":return t.toLocaleString("ru-RU",{minimumFractionDigits:2});default:return t}}},Percent:t=>new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(t),Currency:{label:"Currency (Deprecated, use Separator & Prefix instead)",fn:(t,e="en-US")=>{const n={"zh-CN":"CNY","en-US":"USD","ja-JP":"JPY","ko-KR":"KRW","pt-BR":"BRL","ru-RU":"RUB","tr-TR":"TRY","es-ES":"EUR"}[e]||"USD";return new Intl.NumberFormat(e,{style:"currency",currency:n}).format(t)}},Exponential:t=>(+t).toExponential(),Abbreviation:{schema:{"x-component":"Select",enum:[{label:"en-US",value:"en-US"},{label:"zh-CN",value:"zh-CN"}]},fn:(t,e="en-US")=>new Intl.NumberFormat(e,{notation:"compact"}).format(t)}},string:{"Type conversion":{schema:{"x-component":"Select",enum:[{label:"Number",value:"Number"},{label:"Date",value:"Date"}]},fn:(t,e)=>{try{return new Function(`return ${e}(${t})`)()}catch(n){return console.log(n),t}}}}},WB=t=>function(){const n=dt.useField(),r=n.query("query").get("value")||{},i=il(t,r),o=Object.keys(Ro).filter(a=>a!=="general");return{onChange:a=>{n.value=a;const s=n.query(".type").take();a||s.setState({value:null});const l=i.find(h=>h.value===a);s.dataSource=o.map(h=>({label:At(h),value:h}));const c={createdAt:"datetime",updatedAt:"datetime",double:"number",integer:"number",percent:"number"},u=l==null?void 0:l.interface,f=l==null?void 0:l.type,d=c[u]||c[f]||f;if(o.includes(d)){s.setState({value:d});return}s.setState({value:null})}}},GB=()=>{const t=dt.useField();return{options:Object.keys(Ro).filter(r=>r!=="general").map(r=>({label:At(r),value:r})),onChange:r=>{t.value=r,t.query(".format").take().setValue(null)}}},HB=()=>{const t=dt.useField();return{onChange:e=>{t.value=e,t.query(".argument").take().setValue(null)}}},UB=t=>{const e=t.query(".type").get("value");if(!e){t.dataSource=[];return}const n=Object.entries(tt(tt({},Ro.general),Ro[e]||{})).map(([r,i])=>{const o=typeof i=="function"?r:i.label||r;return{label:At(o),value:r}});t.dataSource=n},VB=t=>{const e=t.query(".type").get("value"),n=t.query(".format").get("value");if(!n||!e){t.setComponentProps({schema:null});return}const r=Ro[e][n]||Ro.general[n];if(!r||typeof r=="function"){t.setComponentProps({schema:null});return}const i=Fo.uid();t.setComponentProps({schema:tt({name:i},r.schema)})},XB=(t,e="en-US")=>{const n=(t||[]).filter(i=>i.field&&i.type&&i.format).reduce((i,o)=>{const a=Ro[o.type][o.format]||Ro.general[o.format];return a&&(i[o.field]=[...i[o.field]||[],{transformer:a,argument:o.argument}]),i},{}),r={};return Object.entries(n).forEach(([i,o])=>{r[i]=o.reduce((a,s)=>{const{transformer:l}=s;let{argument:c}=s;return u=>{try{return typeof l=="function"?l(a(u),c):(!c&&!l.schema&&(c=e),l.fn(a(u),c))}catch(f){return console.log(f),u}}},a=>a)}),r};function lu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qB=function(e){return KB(e)&&!ZB(e)};function KB(t){return!!t&&typeof t=="object"}function ZB(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||t7(t)}var QB=typeof Symbol=="function"&&Symbol.for,JB=QB?Symbol.for("react.element"):60103;function t7(t){return t.$$typeof===JB}function e7(t){return Array.isArray(t)?[]:{}}function cu(t,e){return e.clone!==!1&&e.isMergeableObject(t)?al(e7(t),t,e):t}function n7(t,e,n){return t.concat(e).map(function(r){return cu(r,n)})}function r7(t,e){if(!e.customMerge)return al;var n=e.customMerge(t);return typeof n=="function"?n:al}function i7(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function RS(t){return Object.keys(t).concat(i7(t))}function BS(t,e){try{return e in t}catch(n){return!1}}function o7(t,e){return BS(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function a7(t,e,n){var r={};return n.isMergeableObject(t)&&RS(t).forEach(function(i){r[i]=cu(t[i],n)}),RS(e).forEach(function(i){o7(t,i)||(BS(t,i)&&n.isMergeableObject(e[i])?r[i]=r7(i,n)(t[i],e[i],n):r[i]=cu(e[i],n))}),r}function al(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||n7,n.isMergeableObject=n.isMergeableObject||qB,n.cloneUnlessOtherwiseSpecified=cu;var r=Array.isArray(e),i=Array.isArray(t),o=r===i;return o?r?n.arrayMerge(t,e,n):a7(t,e,n):cu(e,n)}al.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,i){return al(r,i,n)},{})};var s7=al,l7=s7;const c7=lu(l7),u7=()=>({title:'{{t("Options")}}',type:"array","x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"object","x-decorator":"ArrayItems.Item",properties:{space:{type:"void","x-component":"Space",properties:{label:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Option label")}}'},required:!0},value:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Option value")}}'},required:!0},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:"Add","x-component":"ArrayItems.Addition"}}}),ky=t=>{const e={type:"boolean","x-content":'{{ t("Show time") }}',"x-decorator":"FormItem","x-component":"Checkbox"},n={type:"string",title:'{{t("Date format")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"YYYY-MM-DD",enum:[{label:'{{t("Year/Month/Day")}}',value:"YYYY/MM/DD"},{label:'{{t("Year-Month-Day")}}',value:"YYYY-MM-DD"},{label:'{{t("Day/Month/Year")}}',value:"DD/MM/YYYY"}]},r=u7();return{DatePicker:{type:"object",properties:{dateFormat:n,showTime:e}},"DatePicker.RangePicker":{type:"object",properties:{dateFormat:n,showTime:e}},Select:{type:"object",properties:{mode:{type:"string",enum:[{label:'{{ t("Single select") }}',value:""},{label:'{{ t("Multiple select") }}',value:"multiple"}],"x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{defaultValue:""}},options:r}},"Checkbox.Group":{type:"object",properties:{options:r}},"Radio.Group":{type:"object",properties:{options:r}}}[t]},f7=(t,e)=>{if(!t)return t;if(Ve.isDayjs(t))return e.showTime||(t=t.startOf("day")),My.moment2str(t,e);if(Array.isArray(t)&&t.length&&Ve.isDayjs(t[0])){let n=t[0],r=t[1];return e.showTime&&(n=n.startOf("day"),r=r.endOf("day")),[n.toISOString(),r.toISOString()]}return t},zS=(t,e)=>Cr(this,null,function*(){const n=t.initialValue;if(!(typeof n=="string"&&(n==null?void 0:n.startsWith("{{$"))&&(n==null?void 0:n.endsWith("}}")))||!e)t.setValue(n),t.setInitialValue(n);else{t.loading=!0;const i=yield e.parseVariable(n),o=f7(i,t.componentProps);t.setValue(o),t.setInitialValue(o),t.loading=!1}}),hh="-",uu=(t,e)=>t?`${t}${hh}${e}`:e,YS=t=>{const[e,n]=t.split(hh);return n?{dataSource:e,fieldName:n}:{dataSource:z.DEFAULT_DATA_SOURCE_KEY,fieldName:e}},Ly=(t,e,n)=>dt.Schema.isSchemaInstance(t)?t.reduceProperties((r,i)=>{let o=i[e];if(o.includes(hh)||(o=`${z.DEFAULT_DATA_SOURCE_KEY}${hh}${o}`),o===n)return i;if(i["x-component"]!=="Action.Container"&&i["x-component"]!=="AssociationField.Viewer"){const a=Ly(i,e,n);if(a)return a}return r}):null,Ny=()=>{const{charts:t}=q.useContext(ol),e=q.useMemo(()=>Object.values(t).filter(i=>i).reduce((i,o)=>{var l;const{dataSource:a,collection:s}=o;return(l=i[a])!=null&&l.includes(s)||(i[a]=[...i[a]||[],s]),i},{}),[t]),n=q.useMemo(()=>Object.keys(e).length>1,[e]),r=q.useCallback((i,o)=>{var a;return((a=e[i])==null?void 0:a.includes(o))||!1},[e]);return{chartCollections:e,showDataSource:n,getIsChartCollectionExists:r}},sl=()=>{const t=z.useDataSourceManager(),{charts:e}=q.useContext(ol),{fieldSchema:n}=z.useActionContext(),r=n==null?void 0:n["x-action"],{fields:i,form:o}=q.useContext(Tr),a=({dataSource:h,collection:p,cm:v,fim:g})=>{const y=v.getCollectionFields(p.name),m=(_,S,E,M)=>{var j,L,I,$,F;const P=((j=_.uiSchema)==null?void 0:j.title)||_.name,C=g.getFieldInterface(_.interface),A=(I=(L=C==null?void 0:C.filterable)==null?void 0:L.operators)==null?void 0:I[0],T=v.getCollection(_.target);S=S?`${S} / ${P}`:P;let k={type:"string",title:S,name:`${E}.${_.name}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-component":"CollectionField","x-decorator":"ChartFilterFormItem","x-data-source":h,"x-collection-field":`${M}.${_.name}`,"x-component-props":pt(tt({},($=_.uiSchema)==null?void 0:$["x-component-props"]),{"filter-operator":A})};if(_.interface==="formula"){const R=MB(_.dataType)||"Input";k=pt(tt({},k),{"x-component":R})}return["oho","o2m"].includes(_.interface)&&rn.set(k,"x-component-props.useOriginalFilter",!0),{key:`${E}.${_.name}`,name:_.name,type:"item",title:((F=_==null?void 0:_.uiSchema)==null?void 0:F.title)||_.name,Component:"CollectionFieldInitializer",find:Ly,remove:(R,B)=>{B(R,{breakRemoveOn:{"x-component":"Grid"}})},schemaInitialize:R=>{var B;(B=C==null?void 0:C.schemaInitialize)==null||B.call(C,R,{field:_,block:"FilterForm",readPretty:o.readPretty,action:r,targetCollection:T})},schema:k}},b=(_,S,E,M)=>{var k;const P=((k=_.uiSchema)==null?void 0:k.title)||_.name;S=S?`${S} / ${P}`:P;const C=_.operators[0];let A=pt(tt({type:"string",name:`${E}.${_.name}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-decorator":"ChartFilterFormItem","x-data-source":h,"x-collection-field":`${M}.${_.name}`},_.schema),{title:S,"x-component-props":{"filter-operator":C}});return C!=null&&C.noValue&&(A=pt(tt({},A),{"x-component":"ChartFilterCheckbox","x-component-props":pt(tt({},A["x-component-props"]),{content:dt.Schema.compile(C.label,{t:z.i18n.t})})})),{key:`${E}.${_.name}`,name:_.name,type:"item",title:_.title||_.name,Component:"CollectionFieldInitializer",find:Ly,remove:(N,j)=>{j(N,{breakRemoveOn:{"x-component":"Grid"}})},schema:A}},x=(_,S,E,M,P)=>{var j,L,I;if(!_.interface||_.isForeignKey)return;const C=g.getFieldInterface(_.interface);if(!(C!=null&&C.filterable))return;const{nested:A,children:T}=C.filterable,k=((j=_.uiSchema)==null?void 0:j.title)||_.name,N=m(_,E,M,P);if(!(_.target&&S>2)){if(E=E?`${E} / ${k}`:k,T!=null&&T.length&&!["chinaRegion","createdBy","updatedBy","attachment"].includes(_.interface)){const $=T.map(F=>b(F,E,`${M}.${_.name}`,`${P}.${_.name}`));return{key:`${M}.${_.name}`,name:_.name,type:"subMenu",title:((L=_==null?void 0:_.uiSchema)==null?void 0:L.title)||_.name,children:$}}if(!S||S>2)return N;if(A){const F=v.getCollectionFields(_.target).map(R=>x(R,S+1,"",`${M}.${_.name}`,`${P}.${_.name}`));return{key:`${M}.${_.name}`,name:_.name,type:"subMenu",title:((I=_==null?void 0:_.uiSchema)==null?void 0:I.title)||_.name,children:F.filter(Boolean)}}return N}},w=[],O=[];return y.forEach(_=>{const S=_.interface,E=x(_,0,"",uu(h,p.name),p.name);if(E&&w.push(E),["m2o"].includes(S)){const M=x(_,1,"",uu(h,p.name),p.name);M&&O.push(M)}}),O.length&&w.push({name:"divider",type:"divider"},{name:"displayAssociationFields",type:"itemGroup",title:z.i18n.t("Display association fields"),children:O}),w},s=()=>{const h=(o==null?void 0:o.values)||{},p={};return Object.entries(i).filter(([v,g])=>g).forEach(([v,g])=>{const{operator:y}=g||{},{dataSource:m,fieldName:b}=YS(v);let x=b;const _=t.getDataSource(m).collectionManager.getCollectionField(x);if(_!=null&&_.target){const C=_.targetKey||"id";x=`${x}.${C}`,v=`${v}.${C}`}const[S,...E]=x.split("."),M=EB(h,v),P=(y==null?void 0:y.value)||"$eq";if(S!=="custom"){const C=uu(m,S);p[C]=p[C]||{$and:[]};const A={};rn.set(A,E.join("."),{[P]:M}),p[C].$and.push(A)}else p[S]=p[S]||{},p[S][`$nFilter.${E.join(".")}`]=M}),p},l=(h,p)=>{if(!h)return!1;const{dataSource:v,collection:g,query:y}=h,{parameters:m}=My.parse(y.filter||"");return p[uu(v,g)]||p.custom&&(m==null?void 0:m.find(({key:b})=>rn.has(p.custom,b)))},c=(h,p)=>{const{dataSource:v,collection:g,query:y}=h;let m=tt({},y);const b=tt({},m.filter||{});let x={};const w=My.parse(b),{parameters:O}=w;return p.custom&&(O!=null&&O.find(_=>p.custom[_.key]))&&(x=w(p.custom)),x=c7(b,x),m=pt(tt({},m),{filter:{$and:[x,p[uu(v,g)]]}}),m},u=()=>Cr(this,null,function*(){const h=s(),p=Object.values(e).filter(v=>l(v,h)).map(v=>()=>Cr(this,null,function*(){const{dataSource:g,service:y,collection:m}=v;yield y.runAsync(g,m,c(v,h),!0)}));yield Promise.all(p.map(v=>v()))}),f=()=>Cr(this,null,function*(){const h=Object.values(e).filter(p=>p).map(p=>()=>Cr(this,null,function*(){const{service:v,dataSource:g,collection:y,query:m}=p;yield v.runAsync(g,y,m,!0)}));yield Promise.all(h.map(p=>p()))}),d=Ei.useMemoizedFn(h=>h.split(" / ").map(p=>z.i18n.t(dt.Schema.compile(p,{t:z.i18n.t}))).join(" / "));return{filter:u,refresh:f,getChartFilterFields:a,getFilter:s,hasFilter:l,appendFilter:c,getTranslatedTitle:d}},d7=()=>{const{t}=se(),e=Ei.useMemoizedFn(t),{enabled:n,fields:r}=q.useContext(Tr),i=Object.entries(r).filter(([a,s])=>a.startsWith("custom.")&&s).map(([a,{title:s}])=>{const l=a.replace(/^custom\./,"");return{key:l,value:l,label:s}}),o=q.useMemo(()=>({label:e("Current filter"),value:"$nFilter",key:"$nFilter",children:i}),[i,e]);return!n||!i.length?null:o},WS=()=>{const{t}=se(),{chartCollections:e}=Ny(),n=z.useDataSourceManager(),r=n.collectionFieldInterfaceManager,{values:i}=GS(),o=(a,s,l)=>{var d,h,p;if(!s.interface)return;const c=r.getFieldInterface(s.interface);if(!(c!=null&&c.filterable))return;const{nested:u}=c.filterable,f={value:s.name,label:t(((d=s==null?void 0:s.uiSchema)==null?void 0:d.title)||s.name)};if(!(s.target&&l>2)){if(l>2)return f;if(u){const g=a.getCollectionFields(s.target).map(y=>o(a,y,l+1));return{value:s.name,label:t(((h=s==null?void 0:s.uiSchema)==null?void 0:h.title)||s.name),children:g.filter(y=>y)}}if(!(!i.includes((p=s.uiSchema)==null?void 0:p["x-component"])&&!i.includes(s.interface)))return f}};return q.useMemo(()=>Object.entries(e).map(([s,l])=>{const c=n.getDataSource(s);return{value:s,label:dt.Schema.compile(c.displayName,{t}),children:l.map(u=>{const f=c.collectionManager,d=f.getCollection(u),p=f.getCollectionFields(u).map(v=>o(f,v,1)).filter(v=>v);return{value:u,label:dt.Schema.compile(d.title,{t}),children:p}})}}),[e])},GS=()=>{const{t}=se(),e=[{label:t("Input"),value:"Input"},{label:t("Number"),value:"InputNumber"},{label:t("Date"),value:"DatePicker"},{label:t("Date range"),value:"DatePicker.RangePicker"},{label:t("Time"),value:"TimePicker"},{label:t("Time range"),value:"TimePicker.RangePicker"},{label:t("Select"),value:"Select"},{label:t("Radio group"),value:"Radio.Group"},{label:t("Checkbox group"),value:"Checkbox.Group"}];return{options:e,values:e.map(n=>n.value)}},h7=(t,e)=>{const{t:n}=se(),r=z.useDataSourceManager(),{showDataSource:i}=Ny();return q.useMemo(()=>{var p;const o=r.getDataSource(t);if(!o)return;const a=o.collectionManager;if(!e)return;const{fieldName:s}=YS(e),[l,...c]=s.split(".");if(!(c!=null&&c.length))return;const u=a.getCollection(l);let f=l,d,h=dt.Schema.compile(u==null?void 0:u.title,{t:n});for(;f&&c.length>0;){const v=c.shift();d=a.getCollectionField(`${f}.${v}`);const g=((p=d==null?void 0:d.uiSchema)==null?void 0:p.title)||(d==null?void 0:d.name);g&&(h+=` / ${dt.Schema.compile(g,{t:n})}`),d!=null&&d.target?f=d.target:f=null}return i?`${dt.Schema.compile(o.displayName,{t:n})} > ${h}`:h},[e,t,i])},p7=()=>{const t=dt.useField(),{operator:e,schema:n}=t.data||{},{currentUserSettings:r}=z.useCurrentUserVariable({collectionField:{uiSchema:n},uiSchema:n}),{datetimeSettings:i}=z.useDatetimeVariable({operator:e,schema:n}),o=d7(),a=q.useMemo(()=>[r,i,o].filter(Boolean),[i,r,o]);return!e||!n?[]:a},Iy=(t={},e={})=>pt(tt({type:"array","x-decorator":"FormItem","x-component":"ArrayItems"},e),{items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:pt(tt({sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"}},t),{remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}})}}},properties:{add:{type:"void",title:'{{t("Add field")}}',"x-component":"ArrayItems.Addition"}}}),v7=t=>({type:"void",properties:{config:{type:"object",properties:{collapse:{type:"void","x-component":"FormCollapse","x-component-props":{formCollapse:"{{formCollapse}}",size:"small",style:{border:"none",boxShadow:"none"}},properties:{pane1:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:At("Container"),key:"card"},properties:{title:{type:"string",title:'{{t("Title")}}',"x-decorator":"FormItem","x-component":"Input"},bordered:{type:"boolean","x-content":At("Show border"),"x-decorator":"FormItem","x-component":"Checkbox",default:!1}}},pane2:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:At("Chart"),key:"basic",style:{border:"none"}},properties:{chartType:{type:"string",title:'{{t("Chart type")}}',"x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Please select a chart type.")}}'},enum:"{{ chartTypes }}"},[Fo.uid()]:{type:"void",properties:{general:t}},[Fo.uid()]:{type:"void",properties:{advanced:{type:"json",title:'{{t("JSON config")}}',"x-decorator":"FormItem","x-decorator-props":{extra:At("Same properties set in the form above will be overwritten by this JSON config.")},"x-component":"Input.JSON","x-component-props":{autoSize:{minRows:3}}}}},reference:{type:"string","x-reactions":{dependencies:[".chartType"],fulfill:{schema:{"x-content":"{{ getReference($deps[0]) }}"}}}}}}}}}}}}),g7={type:"void",properties:{settings:{type:"void",properties:{collection:{title:'{{t("Collection")}}',type:"string","x-decorator":"FormItem","x-component":"Cascader",enum:"{{ collectionOptions }}","x-component-props":{onChange:"{{ onCollectionChange }}",placeholder:'{{t("Collection")}}'}}}},query:{type:"object",properties:{builder:{type:"void",properties:{collapse:{type:"void","x-decorator":"FormItem","x-component":"FormCollapse","x-component-props":{formCollapse:"{{formCollapse}}",size:"small",style:{border:"none",boxShadow:"none"}},properties:{pane1:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:At("Measures"),key:"measures"},properties:{measures:Iy({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}',fieldNames:{label:"title",value:"name",children:"children"}},enum:"{{ fieldOptions }}",required:!0},aggregation:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Aggregation")}}'},enum:[{label:'{{t("Sum")}}',value:"sum"},{label:'{{t("Count")}}',value:"count"},{label:'{{t("Avg")}}',value:"avg"},{label:'{{t("Max")}}',value:"max"},{label:'{{t("Min")}}',value:"min"}]},alias:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Alias")}}',style:{minWidth:"100px"}}}},{required:!0,"x-component-props":{style:{overflow:"auto"}}})}},pane2:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:At("Dimensions"),key:"dimensions"},properties:{dimensions:Iy({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}',fieldNames:{label:"title",value:"name",children:"children"}},enum:"{{ fieldOptions }}",required:!0},format:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Format")}}',style:{maxWidth:"120px"}},"x-reactions":"{{ useFormatterOptions }}","x-visible":"{{ $self.dataSource && $self.dataSource.length }}"},alias:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Alias")}}',style:{minWidth:"100px"}}}},{"x-component-props":{style:{overflow:"auto"}}})}},pane3:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:At("Filter"),key:"filter"},properties:{filter:{type:"object","x-decorator":"FormItem","x-decorator-props":{style:{overflow:"auto"}},enum:"{{ filterOptions }}","x-component":"Filter","x-component-props":{dynamicComponent:"FilterDynamicComponent"}}}},pane4:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:At("Sort"),key:"sort",style:{border:"none"}},properties:{orders:Iy({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}'},"x-reactions":"{{ useOrderOptions }}",required:!0},order:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{defaultValue:"ASC",optionType:"button",style:{width:"128px"}},enum:["ASC","DESC"]}},{"x-reactions":"{{ useOrderReaction }}","x-component-props":{style:{overflow:"auto"}}})}}}},limit:{title:'{{t("Limit")}}',type:"number","x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{defaultValue:2e3,min:1,style:{width:"100px"}}}}},cache:{type:"object",properties:{enabled:{type:"boolean",title:'{{t("Enable cache")}}',"x-decorator":"FormItem","x-component":"Switch"},ttl:{type:"number",title:'{{t("TTL (second)")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{defaultValue:60,min:1,style:{width:"100px"}}}}}}}}},y7={type:"void",properties:{transform:{type:"array","x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"object",properties:{space:{type:"void","x-component":"Space","x-component-props":{wrap:!0},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},field:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Field")}}'},"x-use-component-props":"useFieldSelectProps","x-reactions":"{{ useChartFields }}"},type:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Type")}}'},"x-use-component-props":"useFieldTypeSelectProps"},format:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Transformer")}}',style:{maxWidth:"200px"}},"x-use-component-props":"useTransformerSelectProps","x-reactions":"{{ useTransformers }}","x-visible":"{{ $self.dataSource && $self.dataSource.length }}"},argument:{type:"string","x-decorator":"FormItem","x-component":"TransformerDynamicComponent","x-reactions":"{{ useArgument }}"},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:'{{t("Add transformation")}}',"x-component":"ArrayItems.Addition"}}}}};function m7(t){const{value:e,onChange:n,renderSchemaComponent:r}=t,i=p7();return Y.jsx(z.Variable.Input,{value:e,onChange:n,scope:i,children:r()})}const Mi=q.createContext({visible:!0});Mi.displayName="ChartConfigContext";const b7=t=>{var a;const{insertAdjacent:e}=z.useDesignable(),[n,r]=q.useState(!1),[i,o]=q.useState({});return Y.jsxs(Mi.Provider,{value:{visible:n,setVisible:r,current:i,setCurrent:o},children:[t.children,Y.jsx(IS,pt(tt({},(a=i.field)==null?void 0:a.decoratorProps),{children:Y.jsx(ii,{insert:(s,l)=>e("beforeEnd",s,l)})}))]})},x7=t=>{const{schema:e}=t,n=dt.useField();return e?Y.jsx(z.SchemaComponent,{schema:{type:"void",properties:{[e.name]:pt(tt({type:"void"},e),{value:n.value,"x-component-props":pt(tt({},e["x-component-props"]),{defaultValue:n.value,onChange:r=>{if(typeof r=="object"&&(r!=null&&r.target)){n.value=r.target.value;return}n.value=r}})})}}}):null},{Paragraph:IMt,Text:w7}=wt.Typography,ii=t=>{const{t:e}=se(),{service:n}=q.useContext(ri),{visible:r,setVisible:i,current:o}=q.useContext(Mi),{schema:a,field:s,dataSource:l,collection:c,initialValues:u}=o||{},{dn:f}=z.useDesignable(),{modal:d}=wt.App.useApp(),{insert:h}=t,p=DS(),v=Ha(l,c),g=(P=!1)=>{var I;if(!_.modified)return;const C=(I=_.values.config)==null?void 0:I.chartType;if(!C)return;const A=p[C];if(!(A==null?void 0:A.init)){P&&(_.values.config.general={},_.values.config.advanced={});return}const k=_.values.query,N=il(v,k),{general:j,advanced:L}=A.init(N,k);(j||P)&&(_.values.config.general=j),(L||P)&&(_.values.config.advanced=L||{})},[y,m]=q.useState([]),[b,x]=q.useState([]),w=(P,C)=>{var k,N;const A=((k=P.values.query)==null?void 0:k.measures.filter(j=>j.field))||[],T=((N=P.values.query)==null?void 0:N.dimensions.filter(j=>j.field))||[];rn.isEqual(A,y)&&rn.isEqual(T,b)||(C==null||C(),m(rn.cloneDeep(A)),x(rn.cloneDeep(T)))},O=kB(),_=q.useMemo(()=>{var A;const P=u||(s==null?void 0:s.decoratorProps),C=(P==null?void 0:P.config)||{};return wn.createForm({values:pt(tt({},P),{config:pt(tt({chartType:O},C),{title:C.title||((A=s==null?void 0:s.componentProps)==null?void 0:A.title)}),collection:[l,c]}),effects:T=>{wn.onFieldChange("config.chartType",()=>g(!0)),wn.onFormInit(()=>w(T))}})},[s,r,l,c]),S=()=>Y.jsx(wt.Button,{type:"link",loading:n==null?void 0:n.loading,icon:Y.jsx(Nn.RightSquareOutlined,{}),onClick:()=>Cr(this,null,function*(){const P=_.query("query").take();try{yield P==null?void 0:P.validate()}catch(C){return}try{yield n.runAsync(l,c,_.values.query,!0)}catch(C){console.log(C)}w(_,g)}),children:e("Run query")}),E=q.useRef(null),M=q.useRef(null);return q.useEffect(()=>{var P;r&&n.run(c,(P=s==null?void 0:s.decoratorProps)==null?void 0:P.query,"configure")},[r]),Y.jsx(wt.Modal,{title:e("Configure chart"),open:r,onOk:()=>{const{query:P,config:C,transform:A,mode:T}=_.values,{title:k,bordered:N}=C||{},j=()=>{var I;i(!1),(I=o.service)==null||I.run(l,c,P),E.current.scrollTop=0,M.current.scrollTop=0,n.mutate(void 0)},L={query:P,config:C,dataSource:l,collection:c,transform:A,mode:T||"builder"};if(a&&a["x-uid"]){a["x-component-props"]=pt(tt({},a["x-component-props"]),{title:k,bordered:N}),a["x-decorator-props"]=L,s.decoratorProps=L,s.componentProps=pt(tt({},s.componentProps),{title:k,bordered:N}),s["x-acl-action"]=`${c}:list`,f.emit("patch",{schema:a}),j();return}h(z.gridRowColWrap(NS(L)),{onSuccess:j})},onCancel:()=>{d.confirm({title:e("Are you sure to cancel?"),content:e("You changes are not saved. If you click OK, your changes will be lost."),okButtonProps:{danger:!0},onOk:()=>{i(!1),E.current.scrollTop=0,M.current.scrollTop=0,n.mutate(void 0)}})},width:"95%",className:Ga.css`
|
|
2
11
|
.ant-modal-content {
|
|
3
12
|
padding: 0;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare const NAMESPACE = "data-visualization";
|
|
2
10
|
export declare function lang(key: string): string;
|
|
3
11
|
export declare function useChartsTranslation(): import("react-i18next").UseTranslationResponse<("data-visualization" | "client")[], undefined>;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export declare const ChartRenderer: React.FC & {
|
|
3
11
|
Designer: React.FC;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import React from 'react';
|
|
2
10
|
export type MeasureProps = {
|
|
3
11
|
field: string | string[];
|
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
export * from './ChartRenderer';
|
|
2
10
|
export * from './ChartRendererProvider';
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export type Transformer = (val: any, ...args: any[]) => string | number;
|
|
2
10
|
export type TransformerConfig = Transformer | {
|
|
3
11
|
label?: string;
|
package/dist/client/utils.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { FieldOption } from './hooks';
|
|
2
10
|
import { QueryProps } from './renderer';
|
|
3
11
|
export declare const createRendererSchema: (decoratorProps: any, componentProps?: {}) => {
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,11 +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
|
+
|
|
1
10
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "1.0.0-alpha.
|
|
11
|
+
"@nocobase/client": "1.0.0-alpha.3",
|
|
3
12
|
"dayjs": "1.11.10",
|
|
4
13
|
"@formily/react": "2.3.0",
|
|
5
14
|
"@formily/shared": "2.3.0",
|
|
6
15
|
"lodash": "4.17.21",
|
|
7
|
-
"@nocobase/cache": "1.0.0-alpha.
|
|
8
|
-
"@nocobase/server": "1.0.0-alpha.
|
|
16
|
+
"@nocobase/cache": "1.0.0-alpha.3",
|
|
17
|
+
"@nocobase/server": "1.0.0-alpha.3",
|
|
9
18
|
"react": "18.2.0",
|
|
10
19
|
"@ant-design/icons": "5.2.6",
|
|
11
20
|
"ahooks": "3.7.8",
|
|
@@ -13,8 +22,8 @@ module.exports = {
|
|
|
13
22
|
"antd": "5.12.8",
|
|
14
23
|
"@formily/antd-v5": "1.1.9",
|
|
15
24
|
"@formily/core": "2.3.0",
|
|
16
|
-
"@nocobase/utils": "1.0.0-alpha.
|
|
25
|
+
"@nocobase/utils": "1.0.0-alpha.3",
|
|
17
26
|
"react-i18next": "11.18.6",
|
|
18
|
-
"@nocobase/actions": "1.0.0-alpha.
|
|
19
|
-
"@nocobase/database": "1.0.0-alpha.
|
|
27
|
+
"@nocobase/actions": "1.0.0-alpha.3",
|
|
28
|
+
"@nocobase/database": "1.0.0-alpha.3"
|
|
20
29
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +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
|
+
*/
|
|
1
9
|
export * from './server';
|
|
2
10
|
export { default } from './server';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2024-04-
|
|
1
|
+
{"name":"koa-compose","description":"compose Koa middleware","repository":"koajs/compose","version":"4.1.0","keywords":["koa","middleware","compose"],"files":["index.js"],"dependencies":{},"devDependencies":{"codecov":"^3.0.0","jest":"^21.0.0","matcha":"^0.7.0","standard":"^10.0.3"},"scripts":{"bench":"matcha bench/bench.js","lint":"standard --fix .","test":"jest --forceExit --coverage"},"jest":{"testEnvironment":"node"},"license":"MIT","_lastModified":"2024-04-30T08:27:52.312Z"}
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export declare const dateFormatFn: (sequelize: any, dialect: string, field: string, format: string) => any;
|
|
2
10
|
export declare const formatFn: (sequelize: any, dialect: string, field: string, format: string) => any;
|
|
3
11
|
export declare const formatter: (sequelize: any, type: string, field: string, format: string) => any;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Context, Next } from '@nocobase/actions';
|
|
2
10
|
export declare const postProcess: (ctx: Context, next: Next) => Promise<void>;
|
|
3
11
|
export declare const queryData: (ctx: Context, next: Next) => Promise<void>;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
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
|
+
*/
|
|
1
9
|
export { default } from './plugin';
|
package/dist/server/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __create = Object.create;
|
|
2
11
|
var __defProp = Object.defineProperty;
|
|
3
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Migration } from '@nocobase/server';
|
|
2
10
|
export default class RenameChartTypeMigration extends Migration {
|
|
3
11
|
appVersion: string;
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
package/dist/server/plugin.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
import { Cache } from '@nocobase/cache';
|
|
2
10
|
import { InstallOptions, Plugin } from '@nocobase/server';
|
|
3
11
|
export declare class PluginDataVisualizationServer extends Plugin {
|
package/dist/server/plugin.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
package/dist/swagger/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
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
|
+
*/
|
|
1
9
|
declare const _default: {
|
|
2
10
|
info: {
|
|
3
11
|
title: string;
|
package/dist/swagger/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
|
|
1
10
|
var __defProp = Object.defineProperty;
|
|
2
11
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-visualization",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.3",
|
|
4
4
|
"displayName": "Data visualization",
|
|
5
5
|
"displayName.zh-CN": "数据可视化",
|
|
6
6
|
"description": "Provides data visualization feature, including chart block and chart filter block, support line charts, area charts, bar charts and more than a dozen kinds of charts, you can also extend more chart types.",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@nocobase/test": "1.x",
|
|
34
34
|
"@nocobase/utils": "1.x"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "7ccb137c7616cba5d238f87368239640e1d9ace1",
|
|
37
37
|
"keywords": [
|
|
38
38
|
"Blocks"
|
|
39
39
|
]
|