@visactor/vchart 1.8.3 → 1.8.5
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/build/es5/index.js +1 -1
- package/build/index.js +358 -305
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/utils.d.ts +1 -1
- package/cjs/animation/utils.js +15 -14
- package/cjs/animation/utils.js.map +1 -1
- package/cjs/chart/stack.js +1 -2
- package/cjs/compile/grammar-item.js +2 -1
- package/cjs/component/axis/base-axis.js +2 -2
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/util.js +2 -1
- package/cjs/component/axis/util.js.map +1 -1
- package/cjs/component/base/util.js +4 -4
- package/cjs/component/base/util.js.map +1 -1
- package/cjs/component/crosshair/base.js +9 -1
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/interface/theme.d.ts +1 -0
- package/cjs/component/interface/theme.js.map +1 -1
- package/cjs/component/marker/interface.d.ts +3 -4
- package/cjs/component/marker/interface.js.map +1 -1
- package/cjs/component/marker/utils.js +10 -23
- package/cjs/component/marker/utils.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/data/transforms/aggregation.js +25 -21
- package/cjs/data/transforms/aggregation.js.map +1 -1
- package/cjs/interaction/trigger.d.ts +1 -0
- package/cjs/interaction/trigger.js +2 -1
- package/cjs/interaction/trigger.js.map +1 -1
- package/cjs/plugin/chart/media-query/interface/common.d.ts +0 -4
- package/cjs/plugin/chart/media-query/interface/common.js.map +1 -1
- package/cjs/plugin/chart/media-query/interface/index.d.ts +1 -1
- package/cjs/plugin/chart/media-query/interface/index.js +1 -1
- package/cjs/plugin/chart/media-query/interface/index.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +3 -1
- package/cjs/series/base/base-series.js +19 -13
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/funnel/funnel.js +2 -2
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/waterfall/waterfall-transformer.js +1 -1
- package/cjs/series/waterfall/waterfall-transformer.js.map +1 -1
- package/cjs/theme/builtin/common/component/axis/cartesian-axis.d.ts +1 -0
- package/cjs/theme/builtin/common/component/axis/cartesian-axis.js +6 -2
- package/cjs/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
- package/cjs/theme/builtin/common/component/index.js +1 -0
- package/cjs/theme/builtin/common/component/index.js.map +1 -1
- package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +1 -0
- package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.js +6 -2
- package/cjs/theme/builtin/common-mobile/component/axis/cartesian-axis.js.map +1 -1
- package/cjs/theme/builtin/common-mobile/component/index.js +1 -0
- package/cjs/theme/builtin/common-mobile/component/index.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +2 -0
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/typings/spec/index.d.ts +1 -0
- package/cjs/typings/spec/index.js +2 -1
- package/cjs/typings/spec/index.js.map +1 -1
- package/cjs/{plugin/chart/media-query/interface/spec.d.ts → typings/spec/media-query.d.ts} +8 -5
- package/cjs/{plugin/chart/media-query/interface/spec.js → typings/spec/media-query.js} +1 -1
- package/cjs/typings/spec/media-query.js.map +1 -0
- package/esm/animation/utils.d.ts +1 -1
- package/esm/animation/utils.js +15 -14
- package/esm/animation/utils.js.map +1 -1
- package/esm/chart/stack.js +1 -2
- package/esm/compile/grammar-item.js +2 -1
- package/esm/component/axis/base-axis.js +2 -2
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/util.js +2 -2
- package/esm/component/axis/util.js.map +1 -1
- package/esm/component/base/util.js +4 -4
- package/esm/component/base/util.js.map +1 -1
- package/esm/component/crosshair/base.js +9 -1
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/interface/theme.d.ts +1 -0
- package/esm/component/interface/theme.js.map +1 -1
- package/esm/component/marker/interface.d.ts +3 -4
- package/esm/component/marker/interface.js.map +1 -1
- package/esm/component/marker/utils.js +10 -22
- package/esm/component/marker/utils.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/data/transforms/aggregation.js +26 -22
- package/esm/data/transforms/aggregation.js.map +1 -1
- package/esm/interaction/trigger.d.ts +1 -0
- package/esm/interaction/trigger.js +2 -1
- package/esm/interaction/trigger.js.map +1 -1
- package/esm/plugin/chart/media-query/interface/common.d.ts +0 -4
- package/esm/plugin/chart/media-query/interface/common.js.map +1 -1
- package/esm/plugin/chart/media-query/interface/index.d.ts +1 -1
- package/esm/plugin/chart/media-query/interface/index.js +1 -1
- package/esm/plugin/chart/media-query/interface/index.js.map +1 -1
- package/esm/series/base/base-series.d.ts +3 -1
- package/esm/series/base/base-series.js +19 -13
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/funnel/funnel.js +2 -2
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/waterfall/waterfall-transformer.js +1 -1
- package/esm/series/waterfall/waterfall-transformer.js.map +1 -1
- package/esm/theme/builtin/common/component/axis/cartesian-axis.d.ts +1 -0
- package/esm/theme/builtin/common/component/axis/cartesian-axis.js +6 -0
- package/esm/theme/builtin/common/component/axis/cartesian-axis.js.map +1 -1
- package/esm/theme/builtin/common/component/index.js +2 -1
- package/esm/theme/builtin/common/component/index.js.map +1 -1
- package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.d.ts +1 -0
- package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.js +6 -0
- package/esm/theme/builtin/common-mobile/component/axis/cartesian-axis.js.map +1 -1
- package/esm/theme/builtin/common-mobile/component/index.js +2 -1
- package/esm/theme/builtin/common-mobile/component/index.js.map +1 -1
- package/esm/typings/spec/common.d.ts +2 -0
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/typings/spec/index.d.ts +1 -0
- package/esm/typings/spec/index.js +2 -0
- package/esm/typings/spec/index.js.map +1 -1
- package/esm/{plugin/chart/media-query/interface/spec.d.ts → typings/spec/media-query.d.ts} +8 -5
- package/esm/typings/spec/media-query.js +2 -0
- package/esm/typings/spec/media-query.js.map +1 -0
- package/package.json +14 -14
- package/cjs/plugin/chart/media-query/interface/spec.js.map +0 -1
- package/esm/plugin/chart/media-query/interface/spec.js +0 -2
- package/esm/plugin/chart/media-query/interface/spec.js.map +0 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type { ComponentTypeEnum } from '
|
|
2
|
-
import type { IChartSpec, IVChart } from '
|
|
3
|
-
import type { IModelSpecInfo } from '
|
|
4
|
-
import type { SeriesTypeEnum } from '
|
|
5
|
-
|
|
1
|
+
import type { ComponentTypeEnum } from '../../component/interface';
|
|
2
|
+
import type { IChartSpec, IVChart } from '../../core';
|
|
3
|
+
import type { IModelSpecInfo } from '../../model/interface';
|
|
4
|
+
import type { SeriesTypeEnum } from '../../series';
|
|
5
|
+
export interface IMediaInfo {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
6
9
|
export type IMediaQuerySpec = IMediaQueryItem[];
|
|
7
10
|
export interface IMediaQueryItem {
|
|
8
11
|
query: IMediaQueryCondition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/typings/spec/media-query.ts"],"names":[],"mappings":"","file":"media-query.js","sourcesContent":["import type { ComponentTypeEnum } from '../../component/interface';\nimport type { IChartSpec, IVChart } from '../../core';\nimport type { IModelSpecInfo } from '../../model/interface';\nimport type { SeriesTypeEnum } from '../../series';\n\nexport interface IMediaInfo {\n /** 图表宽度 */\n width: number;\n /** 图表高度 */\n height: number;\n}\n\n/**\n * 媒体查询配置(包含多项查询)\n * @since 1.8.0\n */\nexport type IMediaQuerySpec = IMediaQueryItem[];\n\n/** 媒体查询配置(表示一项查询)*/\nexport interface IMediaQueryItem {\n /** 媒体查询条件 */\n query: IMediaQueryCondition;\n /** 命中媒体查询条件之后的动作 */\n action: IMediaQueryAction | IMediaQueryAction[];\n}\n\n/** 媒体查询条件,多个属性之间为“且”关系 */\nexport interface IMediaQueryCondition {\n /** 最小图表宽度 */\n minWidth?: number;\n /** 最大图表宽度 */\n maxWidth?: number;\n /** 最小图表高度 */\n minHeight?: number;\n /** 最大图表高度 */\n maxHeight?: number;\n /** 当图表宽度或高度发生变化时触发的回调,由回调指定是否命中查询条件 */\n onResize?: (info: IMediaInfo, vchart: IVChart) => boolean;\n}\n\n/** 命中媒体查询条件之后的动作 */\nexport interface IMediaQueryAction<T extends Record<string, unknown> = any> {\n /**\n * 需要应用的新 spec\n * - 如果元素过滤器匹配到了某些图表元素,新 spec 将依次合并到这些元素\n * - 如果元素过滤器没有匹配到任何图表元素,新 spec 可能会作为新的图表元素添加到图表(forceAppend 为 true 的情况)。\n *\n * 有两种配置类型:\n * - 直接指定新 spec\n * - 使用回调的方式返回新 spec\n */\n spec:\n | Partial<T>\n | ((\n /** filter 匹配到的图表元素信息 */\n filteredModelInfo: IModelSpecInfo<T>[],\n /** 当前 action 对象 */\n action: IMediaQueryAction<T>,\n /** 当前媒体查询条件 */\n query: IMediaQueryCondition\n ) => Partial<T>);\n /**\n * 元素过滤器类型\n * (规定 filter 需要过滤的元素类型,以及新 spec 对应的元素类型)\n * @default 'chart'\n */\n filterType?: MediaQueryActionFilterType;\n /**\n * 元素过滤器\n * (如果不配置,则匹配 filterType 对应的所有元素)\n *\n * 有两种配置类型:\n * - 配置为元素 spec 的一部分,在过滤图表元素时基于此 spec 进行模糊匹配\n * - 配置为函数回调,依次决定当前 filterType 类型下的每个元素实例是否被匹配\n */\n filter?: MediaQueryActionFilter<T> | Array<MediaQueryActionFilter<T>>;\n /**\n * 元素过滤器匹配不到图表元素时,是否将新 spec 作为新的图表元素添加到图表\n * (filterType 为 'chart' 时该配置失效)\n * @default false\n */\n forceAppend?: boolean;\n}\n\n/**\n * 元素过滤器类型\n */\nexport type MediaQueryActionFilterType =\n | 'region'\n | 'series'\n | 'chart'\n | `${SeriesTypeEnum}` // 具体 series 类型,如 'bar'、'line'\n | `${ComponentTypeEnum}` // 具体 component 类型,如 'cartesianAxis-band'\n | keyof IChartSpec; // 组件 spec key,可视为简化版 component 类型,如 'axes'、'legends'、'crosshair'\n\n/**\n * 元素过滤器\n *\n * 有两种配置类型:\n * - 配置为元素 spec 的一部分,在过滤图表元素时基于此 spec 进行模糊匹配\n * - 配置为函数回调,依次决定当前 filterType 类型下的每个元素实例是否被匹配\n */\nexport type MediaQueryActionFilter<T extends Record<string, unknown> = any> =\n | Partial<T>\n | ((\n /** 当前图表元素信息 */\n modelInfo: IModelSpecInfo<T>,\n /** 当前 action 对象 */\n action: IMediaQueryAction<T>,\n /** 当前媒体查询条件 */\n query: IMediaQueryCondition\n ) => boolean);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vchart",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.5",
|
|
4
4
|
"description": "charts lib based @visactor/VGrammar",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -76,25 +76,25 @@
|
|
|
76
76
|
"size-limit": "9.0.0",
|
|
77
77
|
"@size-limit/file": "9.0.0",
|
|
78
78
|
"@internal/typescript-json-schema": "0.0.1",
|
|
79
|
-
"@internal/bundler": "0.0.1",
|
|
80
79
|
"@internal/eslint-config": "0.0.1",
|
|
81
|
-
"@internal/ts-config": "0.0.1"
|
|
80
|
+
"@internal/ts-config": "0.0.1",
|
|
81
|
+
"@internal/bundler": "0.0.1"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"@visactor/vutils": "~0.17.3",
|
|
85
85
|
"@visactor/vdataset": "~0.17.3",
|
|
86
86
|
"@visactor/vscale": "~0.17.3",
|
|
87
|
-
"@visactor/vrender-core": "~0.17.
|
|
88
|
-
"@visactor/vrender-kits": "~0.17.
|
|
89
|
-
"@visactor/vrender-components": "~0.17.
|
|
90
|
-
"@visactor/vgrammar-core": "~0.10.
|
|
91
|
-
"@visactor/vgrammar-projection": "~0.10.
|
|
92
|
-
"@visactor/vgrammar-wordcloud": "~0.10.
|
|
93
|
-
"@visactor/vgrammar-wordcloud-shape": "~0.10.
|
|
94
|
-
"@visactor/vgrammar-hierarchy": "~0.10.
|
|
95
|
-
"@visactor/vgrammar-sankey": "~0.10.
|
|
96
|
-
"@visactor/vgrammar-util": "~0.10.
|
|
97
|
-
"@visactor/vutils-extension": "1.8.
|
|
87
|
+
"@visactor/vrender-core": "~0.17.10",
|
|
88
|
+
"@visactor/vrender-kits": "~0.17.10",
|
|
89
|
+
"@visactor/vrender-components": "~0.17.10",
|
|
90
|
+
"@visactor/vgrammar-core": "~0.10.6",
|
|
91
|
+
"@visactor/vgrammar-projection": "~0.10.6",
|
|
92
|
+
"@visactor/vgrammar-wordcloud": "~0.10.6",
|
|
93
|
+
"@visactor/vgrammar-wordcloud-shape": "~0.10.6",
|
|
94
|
+
"@visactor/vgrammar-hierarchy": "~0.10.6",
|
|
95
|
+
"@visactor/vgrammar-sankey": "~0.10.6",
|
|
96
|
+
"@visactor/vgrammar-util": "~0.10.6",
|
|
97
|
+
"@visactor/vutils-extension": "1.8.5"
|
|
98
98
|
},
|
|
99
99
|
"publishConfig": {
|
|
100
100
|
"access": "public",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/plugin/chart/media-query/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { ComponentTypeEnum } from '../../../../component/interface';\nimport type { IChartSpec, IVChart } from '../../../../core';\nimport type { IModelSpecInfo } from '../../../../model/interface';\nimport type { SeriesTypeEnum } from '../../../../series';\nimport type { IMediaInfo } from './common';\n\n/**\n * 媒体查询配置(包含多项查询)\n * @since 1.8.0\n */\nexport type IMediaQuerySpec = IMediaQueryItem[];\n\n/** 媒体查询配置(表示一项查询)*/\nexport interface IMediaQueryItem {\n /** 媒体查询条件 */\n query: IMediaQueryCondition;\n /** 命中媒体查询条件之后的动作 */\n action: IMediaQueryAction | IMediaQueryAction[];\n}\n\n/** 媒体查询条件,多个属性之间为“且”关系 */\nexport interface IMediaQueryCondition {\n /** 最小图表宽度 */\n minWidth?: number;\n /** 最大图表宽度 */\n maxWidth?: number;\n /** 最小图表高度 */\n minHeight?: number;\n /** 最大图表高度 */\n maxHeight?: number;\n /** 当图表宽度或高度发生变化时触发的回调,由回调指定是否命中查询条件 */\n onResize?: (info: IMediaInfo, vchart: IVChart) => boolean;\n}\n\n/** 命中媒体查询条件之后的动作 */\nexport interface IMediaQueryAction<T extends Record<string, unknown> = any> {\n /**\n * 需要应用的新 spec\n * - 如果元素过滤器匹配到了某些图表元素,新 spec 将依次合并到这些元素\n * - 如果元素过滤器没有匹配到任何图表元素,新 spec 可能会作为新的图表元素添加到图表(forceAppend 为 true 的情况)。\n *\n * 有两种配置类型:\n * - 直接指定新 spec\n * - 使用回调的方式返回新 spec\n */\n spec:\n | Partial<T>\n | ((\n /** filter 匹配到的图表元素信息 */\n filteredModelInfo: IModelSpecInfo<T>[],\n /** 当前 action 对象 */\n action: IMediaQueryAction<T>,\n /** 当前媒体查询条件 */\n query: IMediaQueryCondition\n ) => Partial<T>);\n /**\n * 元素过滤器类型\n * (规定 filter 需要过滤的元素类型,以及新 spec 对应的元素类型)\n * @default 'chart'\n */\n filterType?: MediaQueryActionFilterType;\n /**\n * 元素过滤器\n * (如果不配置,则匹配 filterType 对应的所有元素)\n *\n * 有两种配置类型:\n * - 配置为元素 spec 的一部分,在过滤图表元素时基于此 spec 进行模糊匹配\n * - 配置为函数回调,依次决定当前 filterType 类型下的每个元素实例是否被匹配\n */\n filter?: MediaQueryActionFilter<T> | Array<MediaQueryActionFilter<T>>;\n /**\n * 元素过滤器匹配不到图表元素时,是否将新 spec 作为新的图表元素添加到图表\n * (filterType 为 'chart' 时该配置失效)\n * @default false\n */\n forceAppend?: boolean;\n}\n\n/**\n * 元素过滤器类型\n */\nexport type MediaQueryActionFilterType =\n | 'region'\n | 'series'\n | 'chart'\n | `${SeriesTypeEnum}` // 具体 series 类型,如 'bar'、'line'\n | `${ComponentTypeEnum}` // 具体 component 类型,如 'cartesianAxis-band'\n | keyof IChartSpec; // 组件 spec key,可视为简化版 component 类型,如 'axes'、'legends'、'crosshair'\n\n/**\n * 元素过滤器\n *\n * 有两种配置类型:\n * - 配置为元素 spec 的一部分,在过滤图表元素时基于此 spec 进行模糊匹配\n * - 配置为函数回调,依次决定当前 filterType 类型下的每个元素实例是否被匹配\n */\nexport type MediaQueryActionFilter<T extends Record<string, unknown> = any> =\n | Partial<T>\n | ((\n /** 当前图表元素信息 */\n modelInfo: IModelSpecInfo<T>,\n /** 当前 action 对象 */\n action: IMediaQueryAction<T>,\n /** 当前媒体查询条件 */\n query: IMediaQueryCondition\n ) => boolean);\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/plugin/chart/media-query/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { ComponentTypeEnum } from '../../../../component/interface';\nimport type { IChartSpec, IVChart } from '../../../../core';\nimport type { IModelSpecInfo } from '../../../../model/interface';\nimport type { SeriesTypeEnum } from '../../../../series';\nimport type { IMediaInfo } from './common';\n\n/**\n * 媒体查询配置(包含多项查询)\n * @since 1.8.0\n */\nexport type IMediaQuerySpec = IMediaQueryItem[];\n\n/** 媒体查询配置(表示一项查询)*/\nexport interface IMediaQueryItem {\n /** 媒体查询条件 */\n query: IMediaQueryCondition;\n /** 命中媒体查询条件之后的动作 */\n action: IMediaQueryAction | IMediaQueryAction[];\n}\n\n/** 媒体查询条件,多个属性之间为“且”关系 */\nexport interface IMediaQueryCondition {\n /** 最小图表宽度 */\n minWidth?: number;\n /** 最大图表宽度 */\n maxWidth?: number;\n /** 最小图表高度 */\n minHeight?: number;\n /** 最大图表高度 */\n maxHeight?: number;\n /** 当图表宽度或高度发生变化时触发的回调,由回调指定是否命中查询条件 */\n onResize?: (info: IMediaInfo, vchart: IVChart) => boolean;\n}\n\n/** 命中媒体查询条件之后的动作 */\nexport interface IMediaQueryAction<T extends Record<string, unknown> = any> {\n /**\n * 需要应用的新 spec\n * - 如果元素过滤器匹配到了某些图表元素,新 spec 将依次合并到这些元素\n * - 如果元素过滤器没有匹配到任何图表元素,新 spec 可能会作为新的图表元素添加到图表(forceAppend 为 true 的情况)。\n *\n * 有两种配置类型:\n * - 直接指定新 spec\n * - 使用回调的方式返回新 spec\n */\n spec:\n | Partial<T>\n | ((\n /** filter 匹配到的图表元素信息 */\n filteredModelInfo: IModelSpecInfo<T>[],\n /** 当前 action 对象 */\n action: IMediaQueryAction<T>,\n /** 当前媒体查询条件 */\n query: IMediaQueryCondition\n ) => Partial<T>);\n /**\n * 元素过滤器类型\n * (规定 filter 需要过滤的元素类型,以及新 spec 对应的元素类型)\n * @default 'chart'\n */\n filterType?: MediaQueryActionFilterType;\n /**\n * 元素过滤器\n * (如果不配置,则匹配 filterType 对应的所有元素)\n *\n * 有两种配置类型:\n * - 配置为元素 spec 的一部分,在过滤图表元素时基于此 spec 进行模糊匹配\n * - 配置为函数回调,依次决定当前 filterType 类型下的每个元素实例是否被匹配\n */\n filter?: MediaQueryActionFilter<T> | Array<MediaQueryActionFilter<T>>;\n /**\n * 元素过滤器匹配不到图表元素时,是否将新 spec 作为新的图表元素添加到图表\n * (filterType 为 'chart' 时该配置失效)\n * @default false\n */\n forceAppend?: boolean;\n}\n\n/**\n * 元素过滤器类型\n */\nexport type MediaQueryActionFilterType =\n | 'region'\n | 'series'\n | 'chart'\n | `${SeriesTypeEnum}` // 具体 series 类型,如 'bar'、'line'\n | `${ComponentTypeEnum}` // 具体 component 类型,如 'cartesianAxis-band'\n | keyof IChartSpec; // 组件 spec key,可视为简化版 component 类型,如 'axes'、'legends'、'crosshair'\n\n/**\n * 元素过滤器\n *\n * 有两种配置类型:\n * - 配置为元素 spec 的一部分,在过滤图表元素时基于此 spec 进行模糊匹配\n * - 配置为函数回调,依次决定当前 filterType 类型下的每个元素实例是否被匹配\n */\nexport type MediaQueryActionFilter<T extends Record<string, unknown> = any> =\n | Partial<T>\n | ((\n /** 当前图表元素信息 */\n modelInfo: IModelSpecInfo<T>,\n /** 当前 action 对象 */\n action: IMediaQueryAction<T>,\n /** 当前媒体查询条件 */\n query: IMediaQueryCondition\n ) => boolean);\n"]}
|