@visactor/vchart-types 1.8.0 → 1.8.1
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/package.json +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/types/component/interface/type.d.ts +0 -8
- package/types/model/base-model.d.ts +1 -0
- package/types/model/interface.d.ts +2 -0
- package/types/plugin/chart/media-query/interface/spec.d.ts +4 -4
- package/types/plugin/chart/media-query/media-query.d.ts +4 -4
- package/types/plugin/chart/media-query/util/filter.d.ts +2 -1
- package/types/util/spec/clone-deep.d.ts +1 -1
|
@@ -33,11 +33,3 @@ export declare enum ComponentTypeEnum {
|
|
|
33
33
|
poptip = "poptip",
|
|
34
34
|
customMark = "customMark"
|
|
35
35
|
}
|
|
36
|
-
export declare enum SimplifiedComponentTypeEnum {
|
|
37
|
-
axis = "axis",
|
|
38
|
-
legend = "legend",
|
|
39
|
-
crosshair = "crosshair"
|
|
40
|
-
}
|
|
41
|
-
export declare const axisComponentTypes: ComponentTypeEnum[];
|
|
42
|
-
export declare const legendComponentTypes: ComponentTypeEnum[];
|
|
43
|
-
export declare const crosshairComponentTypes: ComponentTypeEnum[];
|
|
@@ -14,6 +14,7 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
|
|
|
14
14
|
protected _spec: T;
|
|
15
15
|
getSpec(): T;
|
|
16
16
|
getSpecPath(): (string | number)[];
|
|
17
|
+
getSpecInfoPath(): (string | number)[];
|
|
17
18
|
readonly type: string;
|
|
18
19
|
readonly modelType: string;
|
|
19
20
|
readonly id: number;
|
|
@@ -103,6 +103,7 @@ export interface IModelOption extends ICompilableInitOption {
|
|
|
103
103
|
specIndex?: number;
|
|
104
104
|
specKey?: string;
|
|
105
105
|
specPath?: Array<string | number>;
|
|
106
|
+
specInfoPath?: Array<string | number>;
|
|
106
107
|
getTheme?: () => ITheme;
|
|
107
108
|
getSpecInfo?: () => IChartSpecInfo;
|
|
108
109
|
getChartLayoutRect: () => IRect;
|
|
@@ -117,6 +118,7 @@ export interface IModelSpecInfo<T extends Record<string, unknown> = any> {
|
|
|
117
118
|
type: string | ComponentTypeEnum | SeriesTypeEnum;
|
|
118
119
|
spec: T;
|
|
119
120
|
specPath?: Array<string | number>;
|
|
121
|
+
specInfoPath?: Array<string | number>;
|
|
120
122
|
specIndex?: number;
|
|
121
123
|
theme?: any;
|
|
122
124
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentTypeEnum
|
|
2
|
-
import type { IVChart } from '../../../../core';
|
|
1
|
+
import type { ComponentTypeEnum } from '../../../../component/interface';
|
|
2
|
+
import type { IChartSpec, IVChart } from '../../../../core';
|
|
3
3
|
import type { IModelSpecInfo } from '../../../../model/interface';
|
|
4
4
|
import type { SeriesTypeEnum } from '../../../../series';
|
|
5
5
|
import type { IMediaInfo } from './common';
|
|
@@ -18,8 +18,8 @@ export interface IMediaQueryCondition {
|
|
|
18
18
|
export interface IMediaQueryAction<T extends Record<string, unknown> = any> {
|
|
19
19
|
spec: Partial<T> | ((filteredModelInfo: IModelSpecInfo<T>[], action: IMediaQueryAction<T>, query: IMediaQueryCondition) => Partial<T>);
|
|
20
20
|
filterType?: MediaQueryActionFilterType;
|
|
21
|
-
filter?: MediaQueryActionFilter<T
|
|
21
|
+
filter?: MediaQueryActionFilter<T> | Array<MediaQueryActionFilter<T>>;
|
|
22
22
|
forceAppend?: boolean;
|
|
23
23
|
}
|
|
24
|
-
export type MediaQueryActionFilterType = 'region' | 'series' | 'chart' | `${SeriesTypeEnum}` | `${ComponentTypeEnum}` |
|
|
24
|
+
export type MediaQueryActionFilterType = 'region' | 'series' | 'chart' | `${SeriesTypeEnum}` | `${ComponentTypeEnum}` | keyof IChartSpec;
|
|
25
25
|
export type MediaQueryActionFilter<T extends Record<string, unknown> = any> = Partial<T> | ((modelInfo: IModelSpecInfo<T>, action: IMediaQueryAction<T>, query: IMediaQueryCondition) => boolean);
|
|
@@ -18,11 +18,11 @@ export declare class MediaQuery extends BasePlugin implements IChartPlugin {
|
|
|
18
18
|
onBeforeResize(service: IChartPluginService, width: number, height: number): void;
|
|
19
19
|
onAfterChartSpecTransform(service: IChartPluginService, chartSpec: any, actionSource: VChartRenderActionSource): void;
|
|
20
20
|
onBeforeInitChart(service: IChartPluginService, chartSpec: any, actionSource: VChartRenderActionSource): void;
|
|
21
|
-
|
|
21
|
+
protected _changeSize(width: number, height: number, compile?: boolean, render?: boolean): boolean;
|
|
22
22
|
protected _applyQueries(compile?: boolean, render?: boolean): boolean;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
protected _check(item: IMediaQueryItem): IMediaQueryCheckResult;
|
|
24
|
+
protected _apply(item: IMediaQueryItem, chartSpec: any): IMediaQueryActionResult;
|
|
25
|
+
protected _reInit(compile?: boolean, render?: boolean): void;
|
|
26
26
|
dispose(): void;
|
|
27
27
|
}
|
|
28
28
|
export declare const registerMediaQuery: () => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IVChart } from '../../../../core';
|
|
2
2
|
import type { IMediaQueryAction, IMediaQueryActionFilterResult, IMediaQueryCondition, MediaQueryActionFilter, MediaQueryActionFilterType } from '../interface';
|
|
3
|
-
|
|
3
|
+
import type { MaybeArray } from '../../../../typings';
|
|
4
|
+
export declare const executeMediaQueryActionFilter: <T extends Record<string, unknown>>(filterType: MediaQueryActionFilterType, filter: MaybeArray<MediaQueryActionFilter<T>>, action: IMediaQueryAction<T>, query: IMediaQueryCondition, chartSpec: any, globalInstance: IVChart) => IMediaQueryActionFilterResult;
|
|
4
5
|
export declare const executeMediaQueryActionFilterType: <T extends Record<string, unknown>>(filterType: MediaQueryActionFilterType, chartSpec: any, globalInstance: IVChart) => IMediaQueryActionFilterResult<T>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function cloneDeepSpec(spec: any): any;
|
|
1
|
+
export declare function cloneDeepSpec(spec: any, excludeKeys?: string[]): any;
|