@nocobase/plugin-data-visualization
Advanced tools
Comparing version 0.14.0-alpha.7 to 0.14.0-alpha.8
@@ -0,6 +1,7 @@ | ||
export type Transformer = (val: any, locale?: string) => string | number; | ||
declare const transformers: { | ||
[key: string]: { | ||
[key: string]: (val: any, locale?: string) => string | number; | ||
[key: string]: Transformer; | ||
}; | ||
}; | ||
export default transformers; |
import { AntdChart } from './antd'; | ||
import { FieldOption } from '../../hooks'; | ||
import { QueryProps } from '../../renderer'; | ||
import { RenderProps } from '../chart'; | ||
import { ChartType, RenderProps } from '../chart'; | ||
export declare class Statistic extends AntdChart { | ||
constructor(); | ||
init(fields: FieldOption[], { measures, dimensions, }: { | ||
measures?: QueryProps['measures']; | ||
dimensions?: QueryProps['dimensions']; | ||
}): { | ||
general: { | ||
field: string; | ||
title: string; | ||
}; | ||
}; | ||
init: ChartType['init']; | ||
getProps({ data, fieldProps, general, advanced }: RenderProps): any; | ||
} |
@@ -6,9 +6,11 @@ import React from 'react'; | ||
import { AnySchemaProperties, Config } from './configs'; | ||
import { Transformer } from '../block/transformers'; | ||
export type RenderProps = { | ||
data: any[]; | ||
data: Record<string, any>[]; | ||
general: any; | ||
advanced: any; | ||
fieldProps: { | ||
[field: string]: FieldOption & { | ||
transformer: (val: any) => string; | ||
[field: string]: { | ||
label: string; | ||
transformer: Transformer; | ||
}; | ||
@@ -72,4 +74,4 @@ }; | ||
*/ | ||
getProps(props: RenderProps): RenderProps; | ||
getProps(props: RenderProps): any; | ||
render({ data, general, advanced, fieldProps }: RenderProps): () => React.FunctionComponentElement<any>; | ||
} |
@@ -44,3 +44,36 @@ import { SchemaProperties } from '@formily/react'; | ||
}; | ||
xField: (props: FieldConfigProps) => { | ||
[x: string]: { | ||
title: string; | ||
type: string; | ||
'x-decorator': string; | ||
'x-component': string; | ||
'x-reactions': string; | ||
required: boolean; | ||
default: any; | ||
}; | ||
}; | ||
yField: (props: FieldConfigProps) => { | ||
[x: string]: { | ||
title: string; | ||
type: string; | ||
'x-decorator': string; | ||
'x-component': string; | ||
'x-reactions': string; | ||
required: boolean; | ||
default: any; | ||
}; | ||
}; | ||
seriesField: (props: FieldConfigProps) => { | ||
[x: string]: { | ||
title: string; | ||
type: string; | ||
'x-decorator': string; | ||
'x-component': string; | ||
'x-reactions': string; | ||
required: boolean; | ||
default: any; | ||
}; | ||
}; | ||
}; | ||
export default _default; |
@@ -1,16 +0,6 @@ | ||
import { FieldOption } from '../../hooks'; | ||
import { QueryProps } from '../../renderer'; | ||
import { G2PlotChart } from './g2plot'; | ||
import { ChartType } from '../chart'; | ||
export declare class Bar extends G2PlotChart { | ||
constructor(); | ||
init(fields: FieldOption[], { measures, dimensions, }: { | ||
measures?: QueryProps['measures']; | ||
dimensions?: QueryProps['dimensions']; | ||
}): { | ||
general: { | ||
xField: string; | ||
yField: string; | ||
seriesField: string; | ||
}; | ||
}; | ||
init: ChartType['init']; | ||
} |
import { FieldConfigProps } from '../configs'; | ||
declare const _default: { | ||
xField: (props: FieldConfigProps) => { | ||
[x: string]: { | ||
title: string; | ||
type: string; | ||
'x-decorator': string; | ||
'x-component': string; | ||
'x-reactions': string; | ||
required: boolean; | ||
default: any; | ||
}; | ||
}; | ||
yField: (props: FieldConfigProps) => { | ||
[x: string]: { | ||
title: string; | ||
type: string; | ||
'x-decorator': string; | ||
'x-component': string; | ||
'x-reactions': string; | ||
required: boolean; | ||
default: any; | ||
}; | ||
}; | ||
seriesField: (props: FieldConfigProps) => { | ||
[x: string]: { | ||
title: string; | ||
type: string; | ||
'x-decorator': string; | ||
'x-component': string; | ||
'x-reactions': string; | ||
required: boolean; | ||
default: any; | ||
}; | ||
}; | ||
isStack: (props: FieldConfigProps) => { | ||
@@ -37,0 +4,0 @@ [x: string]: { |
import { G2PlotChart } from './g2plot'; | ||
import { RenderProps } from '../chart'; | ||
import { ChartType, RenderProps } from '../chart'; | ||
import React from 'react'; | ||
import { FieldOption } from '../../hooks'; | ||
import { QueryProps } from '../../renderer'; | ||
export declare class DualAxes extends G2PlotChart { | ||
constructor(); | ||
init(fields: FieldOption[], { measures, dimensions, }: { | ||
measures?: QueryProps['measures']; | ||
dimensions?: QueryProps['dimensions']; | ||
}): { | ||
general: { | ||
xField: string; | ||
yField: string[]; | ||
}; | ||
}; | ||
init: ChartType['init']; | ||
render({ data, general, advanced, fieldProps }: RenderProps): () => React.FunctionComponentElement<any>; | ||
} |
@@ -1,13 +0,5 @@ | ||
import { Chart, ChartProps, RenderProps } from '../chart'; | ||
import { FieldOption } from '../../hooks'; | ||
import { QueryProps } from '../../renderer'; | ||
import { Chart, ChartProps, ChartType, RenderProps } from '../chart'; | ||
export declare class G2PlotChart extends Chart { | ||
constructor({ name, title, component, config }: ChartProps); | ||
init(fields: FieldOption[], { measures, dimensions, }: { | ||
measures?: QueryProps['measures']; | ||
dimensions?: QueryProps['dimensions']; | ||
}): { | ||
general?: any; | ||
advanced?: any; | ||
}; | ||
init: ChartType['init']; | ||
getProps({ data, general, advanced, fieldProps }: RenderProps): any; | ||
@@ -14,0 +6,0 @@ getReference(): { |
@@ -1,6 +0,3 @@ | ||
import { Bar } from './bar'; | ||
import { Pie } from './pie'; | ||
import { DualAxes } from './dualAxes'; | ||
import { G2PlotChart } from './g2plot'; | ||
declare const _default: (G2PlotChart | Bar | Pie | DualAxes)[]; | ||
declare const _default: G2PlotChart[]; | ||
export default _default; |
import { G2PlotChart } from './g2plot'; | ||
import { FieldOption } from '../../hooks'; | ||
import { QueryProps } from '../../renderer'; | ||
import { ChartType } from '../chart'; | ||
export declare class Pie extends G2PlotChart { | ||
constructor(); | ||
init(fields: FieldOption[], { measures, dimensions, }: { | ||
measures?: QueryProps['measures']; | ||
dimensions?: QueryProps['dimensions']; | ||
}): { | ||
general: { | ||
colorField: string; | ||
angleField: string; | ||
}; | ||
}; | ||
init: ChartType['init']; | ||
} |
@@ -9,2 +9,5 @@ import { Plugin } from '@nocobase/client'; | ||
export { Chart } from './chart/chart'; | ||
export type { ChartType } from './chart/chart'; | ||
export type { ChartType, RenderProps, ChartProps } from './chart/chart'; | ||
export type { FieldOption } from './hooks'; | ||
export type { QueryProps } from './renderer'; | ||
export { ChartConfigContext } from './configure/ChartConfigure'; |
module.exports = { | ||
"@nocobase/client": "0.14.0-alpha.7", | ||
"@nocobase/client": "0.14.0-alpha.8", | ||
"react": "18.2.0", | ||
"@formily/react": "2.2.27", | ||
"@formily/shared": "2.2.27", | ||
"@nocobase/cache": "0.14.0-alpha.7", | ||
"@nocobase/server": "0.14.0-alpha.7", | ||
"@nocobase/cache": "0.14.0-alpha.8", | ||
"@nocobase/server": "0.14.0-alpha.8", | ||
"@ant-design/icons": "5.1.4", | ||
"dayjs": "1.11.9", | ||
"@formily/antd-v5": "1.1.0", | ||
"@formily/antd-v5": "1.1.7", | ||
"@formily/core": "2.2.27", | ||
"antd": "5.8.6", | ||
"lodash": "4.17.21", | ||
"@emotion/css": "11.11.2", | ||
"react-i18next": "11.18.6", | ||
"ahooks": "3.7.8", | ||
"@emotion/css": "11.11.2", | ||
"@nocobase/actions": "0.14.0-alpha.7", | ||
"@nocobase/database": "0.14.0-alpha.7", | ||
"@nocobase/utils": "0.14.0-alpha.7" | ||
"@nocobase/actions": "0.14.0-alpha.8", | ||
"@nocobase/database": "0.14.0-alpha.8", | ||
"@nocobase/utils": "0.14.0-alpha.8" | ||
}; |
@@ -1,1 +0,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":"2023-10-07T08:28:55.867Z"} | ||
{"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":"2023-11-01T02:12:00.125Z"} |
@@ -136,3 +136,4 @@ var __create = Object.create; | ||
order, | ||
limit: limit > 2e3 ? 2e3 : limit, | ||
limit: limit || 2e3, | ||
subQuery: false, | ||
raw: true | ||
@@ -276,5 +277,3 @@ }, | ||
if (useCache) { | ||
console.log(uid, ctx.body); | ||
await cache.set(uid, ctx.body, (cacheConfig == null ? void 0 : cacheConfig.ttl) || 30); | ||
console.log(cache.get(uid)); | ||
} | ||
@@ -301,4 +300,3 @@ }; | ||
postProcess | ||
])(ctx, async () => { | ||
}); | ||
])(ctx, next); | ||
} catch (err) { | ||
@@ -308,3 +306,2 @@ ctx.app.logger.error("charts query: ", err); | ||
} | ||
await next(); | ||
}; | ||
@@ -311,0 +308,0 @@ // Annotate the CommonJS export names for ESM import in node: |
{ | ||
"name": "@nocobase/plugin-data-visualization", | ||
"version": "0.14.0-alpha.7", | ||
"version": "0.14.0-alpha.8", | ||
"displayName": "Data Visualization", | ||
@@ -36,3 +36,3 @@ "displayName.zh-CN": "数据可视化", | ||
}, | ||
"gitHead": "dc958417d27ed0753439bcef192be91a03dfc30f" | ||
"gitHead": "59c82fef6e34707802b5841f5ec4d9b3b6b68abb" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1137704
5963