@antv/g6 5.0.0-beta.5 → 5.0.0-beta.6
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/g6.min.js +2 -2
- package/esm/index.d.ts +13 -1
- package/esm/index.js +1 -1
- package/esm/item/combo.d.ts +1 -1
- package/esm/item/combo.js +16 -9
- package/esm/item/combo.js.map +1 -1
- package/esm/item/edge.d.ts +1 -1
- package/esm/item/edge.js +15 -7
- package/esm/item/edge.js.map +1 -1
- package/esm/item/node.d.ts +1 -1
- package/esm/item/node.js +16 -9
- package/esm/item/node.js.map +1 -1
- package/esm/runtime/controller/item.d.ts +1 -0
- package/esm/runtime/controller/item.js +19 -3
- package/esm/runtime/controller/item.js.map +1 -1
- package/esm/runtime/graph.d.ts +82 -4
- package/esm/runtime/graph.js +361 -47
- package/esm/runtime/graph.js.map +1 -1
- package/esm/stdlib/behavior/brush-select.js +1 -2
- package/esm/stdlib/behavior/brush-select.js.map +1 -1
- package/esm/stdlib/behavior/create-edge.d.ts +57 -0
- package/esm/stdlib/behavior/create-edge.js +206 -0
- package/esm/stdlib/behavior/create-edge.js.map +1 -0
- package/esm/stdlib/behavior/drag-canvas.d.ts +1 -1
- package/esm/stdlib/behavior/drag-canvas.js +7 -7
- package/esm/stdlib/behavior/drag-canvas.js.map +1 -1
- package/esm/stdlib/behavior/drag-combo.d.ts +2 -2
- package/esm/stdlib/behavior/drag-combo.js +35 -24
- package/esm/stdlib/behavior/drag-combo.js.map +1 -1
- package/esm/stdlib/behavior/drag-node.d.ts +3 -3
- package/esm/stdlib/behavior/drag-node.js +70 -57
- package/esm/stdlib/behavior/drag-node.js.map +1 -1
- package/esm/stdlib/behavior/index.d.ts +2 -0
- package/esm/stdlib/behavior/index.js +2 -0
- package/esm/stdlib/behavior/index.js.map +1 -1
- package/esm/stdlib/behavior/lasso-select.d.ts +1 -1
- package/esm/stdlib/behavior/lasso-select.js +1 -2
- package/esm/stdlib/behavior/lasso-select.js.map +1 -1
- package/esm/stdlib/behavior/scroll-canvas.d.ts +67 -0
- package/esm/stdlib/behavior/scroll-canvas.js +266 -0
- package/esm/stdlib/behavior/scroll-canvas.js.map +1 -0
- package/esm/stdlib/behavior/zoom-canvas.d.ts +1 -1
- package/esm/stdlib/behavior/zoom-canvas.js +7 -7
- package/esm/stdlib/behavior/zoom-canvas.js.map +1 -1
- package/esm/stdlib/index.d.ts +4 -0
- package/esm/stdlib/index.js +5 -1
- package/esm/stdlib/index.js.map +1 -1
- package/esm/stdlib/plugin/hull/hullComponent.d.ts +1 -1
- package/esm/stdlib/plugin/hull/hullComponent.js +3 -6
- package/esm/stdlib/plugin/hull/hullComponent.js.map +1 -1
- package/esm/stdlib/plugin/minimap/index.d.ts +5 -1
- package/esm/stdlib/plugin/minimap/index.js +109 -8
- package/esm/stdlib/plugin/minimap/index.js.map +1 -1
- package/esm/types/graph.d.ts +31 -5
- package/esm/types/hook.d.ts +16 -2
- package/esm/types/spec.d.ts +6 -3
- package/esm/util/item.d.ts +16 -1
- package/esm/util/item.js +31 -8
- package/esm/util/item.js.map +1 -1
- package/esm/util/warn.d.ts +14 -0
- package/esm/util/warn.js +4 -0
- package/esm/util/warn.js.map +1 -0
- package/lib/index.d.ts +13 -1
- package/lib/index.js +1 -1
- package/lib/item/combo.d.ts +1 -1
- package/lib/item/combo.js +16 -9
- package/lib/item/combo.js.map +1 -1
- package/lib/item/edge.d.ts +1 -1
- package/lib/item/edge.js +15 -7
- package/lib/item/edge.js.map +1 -1
- package/lib/item/node.d.ts +1 -1
- package/lib/item/node.js +16 -9
- package/lib/item/node.js.map +1 -1
- package/lib/runtime/controller/item.d.ts +1 -0
- package/lib/runtime/controller/item.js +19 -3
- package/lib/runtime/controller/item.js.map +1 -1
- package/lib/runtime/graph.d.ts +82 -4
- package/lib/runtime/graph.js +361 -47
- package/lib/runtime/graph.js.map +1 -1
- package/lib/stdlib/behavior/brush-select.js +1 -2
- package/lib/stdlib/behavior/brush-select.js.map +1 -1
- package/lib/stdlib/behavior/create-edge.d.ts +57 -0
- package/lib/stdlib/behavior/create-edge.js +210 -0
- package/lib/stdlib/behavior/create-edge.js.map +1 -0
- package/lib/stdlib/behavior/drag-canvas.d.ts +1 -1
- package/lib/stdlib/behavior/drag-canvas.js +7 -7
- package/lib/stdlib/behavior/drag-canvas.js.map +1 -1
- package/lib/stdlib/behavior/drag-combo.d.ts +2 -2
- package/lib/stdlib/behavior/drag-combo.js +35 -24
- package/lib/stdlib/behavior/drag-combo.js.map +1 -1
- package/lib/stdlib/behavior/drag-node.d.ts +3 -3
- package/lib/stdlib/behavior/drag-node.js +70 -57
- package/lib/stdlib/behavior/drag-node.js.map +1 -1
- package/lib/stdlib/behavior/index.d.ts +2 -0
- package/lib/stdlib/behavior/index.js +2 -0
- package/lib/stdlib/behavior/index.js.map +1 -1
- package/lib/stdlib/behavior/lasso-select.d.ts +1 -1
- package/lib/stdlib/behavior/lasso-select.js +1 -2
- package/lib/stdlib/behavior/lasso-select.js.map +1 -1
- package/lib/stdlib/behavior/scroll-canvas.d.ts +67 -0
- package/lib/stdlib/behavior/scroll-canvas.js +270 -0
- package/lib/stdlib/behavior/scroll-canvas.js.map +1 -0
- package/lib/stdlib/behavior/zoom-canvas.d.ts +1 -1
- package/lib/stdlib/behavior/zoom-canvas.js +7 -7
- package/lib/stdlib/behavior/zoom-canvas.js.map +1 -1
- package/lib/stdlib/index.d.ts +4 -0
- package/lib/stdlib/index.js +5 -1
- package/lib/stdlib/index.js.map +1 -1
- package/lib/stdlib/plugin/hull/hullComponent.d.ts +1 -1
- package/lib/stdlib/plugin/hull/hullComponent.js +3 -6
- package/lib/stdlib/plugin/hull/hullComponent.js.map +1 -1
- package/lib/stdlib/plugin/minimap/index.d.ts +5 -1
- package/lib/stdlib/plugin/minimap/index.js +109 -8
- package/lib/stdlib/plugin/minimap/index.js.map +1 -1
- package/lib/types/graph.d.ts +31 -5
- package/lib/types/hook.d.ts +16 -2
- package/lib/types/spec.d.ts +6 -3
- package/lib/util/item.d.ts +16 -1
- package/lib/util/item.js +33 -9
- package/lib/util/item.js.map +1 -1
- package/lib/util/warn.d.ts +14 -0
- package/lib/util/warn.js +8 -0
- package/lib/util/warn.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/item/combo.ts +14 -9
- package/src/item/edge.ts +13 -7
- package/src/item/node.ts +14 -9
- package/src/runtime/controller/item.ts +28 -6
- package/src/runtime/graph.ts +445 -51
- package/src/stdlib/behavior/brush-select.ts +4 -2
- package/src/stdlib/behavior/create-edge.ts +295 -0
- package/src/stdlib/behavior/drag-canvas.ts +8 -8
- package/src/stdlib/behavior/drag-combo.ts +2 -2
- package/src/stdlib/behavior/drag-node.ts +8 -8
- package/src/stdlib/behavior/index.ts +2 -0
- package/src/stdlib/behavior/lasso-select.ts +5 -3
- package/src/stdlib/behavior/scroll-canvas.ts +348 -0
- package/src/stdlib/behavior/zoom-canvas.ts +8 -8
- package/src/stdlib/index.ts +6 -0
- package/src/stdlib/plugin/hull/hullComponent.ts +8 -5
- package/src/stdlib/plugin/minimap/index.ts +113 -9
- package/src/types/graph.ts +31 -5
- package/src/types/hook.ts +16 -2
- package/src/types/spec.ts +9 -3
- package/src/util/item.ts +65 -28
- package/src/util/warn.ts +20 -0
package/src/types/graph.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EventEmitter from '@antv/event-emitter';
|
|
2
|
-
import { AABB, Canvas, DisplayObject, PointLike } from '@antv/g';
|
|
2
|
+
import { AABB, Canvas, Cursor, DisplayObject, PointLike } from '@antv/g';
|
|
3
3
|
import { ID } from '@antv/graphlib';
|
|
4
4
|
import { Command } from '../stdlib/plugin/history/command';
|
|
5
5
|
import { Hooks } from '../types/hook';
|
|
@@ -10,11 +10,11 @@ import { Padding, Point } from './common';
|
|
|
10
10
|
import { GraphData } from './data';
|
|
11
11
|
import { EdgeModel, EdgeUserModel } from './edge';
|
|
12
12
|
import type { StackType } from './history';
|
|
13
|
-
import { ITEM_TYPE, SHAPE_TYPE } from './item';
|
|
13
|
+
import { ITEM_TYPE, SHAPE_TYPE, ShapeStyle } from './item';
|
|
14
14
|
import { LayoutOptions } from './layout';
|
|
15
15
|
import { NodeModel, NodeUserModel } from './node';
|
|
16
16
|
import { RendererName } from './render';
|
|
17
|
-
import { Specification } from './spec';
|
|
17
|
+
import { ComboMapper, EdgeMapper, NodeMapper, Specification } from './spec';
|
|
18
18
|
import { ThemeOptionsOf, ThemeRegistry } from './theme';
|
|
19
19
|
import { FitViewRules, GraphTransformOptions } from './view';
|
|
20
20
|
|
|
@@ -36,7 +36,7 @@ export interface IGraph<
|
|
|
36
36
|
* @returns
|
|
37
37
|
* @group Graph Instance
|
|
38
38
|
*/
|
|
39
|
-
destroy: (callback?:
|
|
39
|
+
destroy: (callback?: () => void) => void;
|
|
40
40
|
/**
|
|
41
41
|
* Update the specs (configurations).
|
|
42
42
|
*/
|
|
@@ -45,6 +45,12 @@ export interface IGraph<
|
|
|
45
45
|
* Update the theme specs (configurations).
|
|
46
46
|
*/
|
|
47
47
|
updateTheme: (theme: ThemeOptionsOf<T>) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Update the item display mapper for a specific item type.
|
|
50
|
+
* @param {ITEM_TYPE} type - The type of item (node, edge, or combo).
|
|
51
|
+
* @param {NodeMapper | EdgeMapper | ComboMapper} mapper - The mapper to be updated.
|
|
52
|
+
* */
|
|
53
|
+
updateMapper(type: ITEM_TYPE, mapper: NodeMapper | EdgeMapper | ComboMapper);
|
|
48
54
|
/**
|
|
49
55
|
* Get the copy of specs(configurations).
|
|
50
56
|
* @returns graph specs
|
|
@@ -595,6 +601,11 @@ export interface IGraph<
|
|
|
595
601
|
* @group Interaction
|
|
596
602
|
*/
|
|
597
603
|
getMode: () => string;
|
|
604
|
+
/**
|
|
605
|
+
* Set the cursor. But the cursor in item's style has higher priority.
|
|
606
|
+
* @param cursor
|
|
607
|
+
*/
|
|
608
|
+
setCursor: (cursor: Cursor) => void;
|
|
598
609
|
/**
|
|
599
610
|
* Add behavior(s) to mode(s).
|
|
600
611
|
* @param behaviors behavior names or configs
|
|
@@ -632,7 +643,22 @@ export interface IGraph<
|
|
|
632
643
|
drawTransient: (
|
|
633
644
|
type: ITEM_TYPE | SHAPE_TYPE,
|
|
634
645
|
id: ID,
|
|
635
|
-
config:
|
|
646
|
+
config: {
|
|
647
|
+
action?: 'remove' | 'add' | 'update' | undefined;
|
|
648
|
+
/** Data to be merged into the transient item. */
|
|
649
|
+
data?: Record<string, any>;
|
|
650
|
+
/** Style to be merged into the transient shape. */
|
|
651
|
+
style?: ShapeStyle;
|
|
652
|
+
/** For type: 'edge' */
|
|
653
|
+
drawSource?: boolean;
|
|
654
|
+
/** For type: 'edge' */
|
|
655
|
+
drawTarget?: boolean;
|
|
656
|
+
/** Only shape with id in shapeIds will be cloned while type is ITEM_TYPE. If shapeIds is not assigned, the whole item will be cloned. */
|
|
657
|
+
shapeIds?: string[];
|
|
658
|
+
/** Whether show the shapes in shapeIds. True by default. */
|
|
659
|
+
visible?: boolean;
|
|
660
|
+
upsertAncestors?: boolean;
|
|
661
|
+
},
|
|
636
662
|
canvas?: Canvas,
|
|
637
663
|
) => DisplayObject;
|
|
638
664
|
|
package/src/types/hook.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { ThemeSpecification } from './theme';
|
|
|
11
11
|
import { GraphTransformOptions } from './view';
|
|
12
12
|
import { ComboModel } from './combo';
|
|
13
13
|
import { Plugin as PluginBase } from './plugin';
|
|
14
|
+
import { ComboMapper, EdgeMapper, NodeMapper } from './spec';
|
|
14
15
|
|
|
15
16
|
export interface IHook<T> {
|
|
16
17
|
name: string;
|
|
@@ -101,8 +102,17 @@ export interface Hooks {
|
|
|
101
102
|
id: ID;
|
|
102
103
|
canvas: Canvas;
|
|
103
104
|
config: {
|
|
104
|
-
style
|
|
105
|
-
action
|
|
105
|
+
style?: ShapeStyle;
|
|
106
|
+
action?: 'remove' | 'add' | 'update';
|
|
107
|
+
/** For type: 'edge' */
|
|
108
|
+
drawSource?: boolean;
|
|
109
|
+
/** For type: 'edge' */
|
|
110
|
+
drawTarget?: boolean;
|
|
111
|
+
/** Only shape with id in shapeIds will be cloned while type is ITEM_TYPE. If shapeIds is not assigned, the whole item will be cloned. */
|
|
112
|
+
shapeIds?: string[];
|
|
113
|
+
/** Whether show the shapes in shapeIds. True by default. */
|
|
114
|
+
visible?: boolean;
|
|
115
|
+
upsertAncestors?: boolean;
|
|
106
116
|
};
|
|
107
117
|
graphCore: GraphCore;
|
|
108
118
|
}>;
|
|
@@ -124,6 +134,10 @@ export interface Hooks {
|
|
|
124
134
|
transient: Canvas;
|
|
125
135
|
};
|
|
126
136
|
}>;
|
|
137
|
+
mapperchange: IHook<{
|
|
138
|
+
type: ITEM_TYPE;
|
|
139
|
+
mapper: NodeMapper | EdgeMapper | ComboMapper;
|
|
140
|
+
}>;
|
|
127
141
|
treecollapseexpand: IHook<{
|
|
128
142
|
ids: ID[];
|
|
129
143
|
action: 'collapse' | 'expand';
|
package/src/types/spec.ts
CHANGED
|
@@ -29,6 +29,12 @@ import { RendererName } from './render';
|
|
|
29
29
|
import { StackCfg } from './history';
|
|
30
30
|
import { Plugin } from './plugin';
|
|
31
31
|
|
|
32
|
+
export type NodeMapper = ((data: NodeModel) => NodeDisplayModel) | NodeEncode;
|
|
33
|
+
export type EdgeMapper = ((data: EdgeModel) => EdgeDisplayModel) | EdgeEncode;
|
|
34
|
+
export type ComboMapper =
|
|
35
|
+
| ((data: ComboModel) => ComboDisplayModel)
|
|
36
|
+
| ComboEncode;
|
|
37
|
+
|
|
32
38
|
export interface Specification<
|
|
33
39
|
B extends BehaviorRegistry,
|
|
34
40
|
T extends ThemeRegistry,
|
|
@@ -92,9 +98,9 @@ export interface Specification<
|
|
|
92
98
|
| TransformerFn[];
|
|
93
99
|
|
|
94
100
|
/** item */
|
|
95
|
-
node?:
|
|
96
|
-
edge?:
|
|
97
|
-
combo?:
|
|
101
|
+
node?: NodeMapper;
|
|
102
|
+
edge?: EdgeMapper;
|
|
103
|
+
combo?: ComboMapper;
|
|
98
104
|
|
|
99
105
|
/** item state styles */
|
|
100
106
|
nodeState?: {
|
package/src/util/item.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ID } from '@antv/graphlib';
|
|
2
2
|
import { Group } from '@antv/g';
|
|
3
|
+
import { uniqueId } from '@antv/util';
|
|
3
4
|
import { IGraph } from '../types';
|
|
4
5
|
import Combo from '../item/combo';
|
|
5
6
|
import Edge from '../item/edge';
|
|
@@ -34,43 +35,62 @@ export const upsertTransientItem = (
|
|
|
34
35
|
transientItemMap: Map<ID, Node | Edge | Combo | Group>,
|
|
35
36
|
itemMap: Map<ID, Node | Edge | Combo>,
|
|
36
37
|
graphCore?: GraphCore,
|
|
37
|
-
|
|
38
|
+
drawOptions: {
|
|
39
|
+
shapeIds?: string[];
|
|
40
|
+
/** For transient edge */
|
|
41
|
+
drawSource?: boolean;
|
|
42
|
+
/** For transient edge */
|
|
43
|
+
drawTarget?: boolean;
|
|
44
|
+
visible?: boolean;
|
|
45
|
+
} = {},
|
|
38
46
|
upsertAncestors = true,
|
|
39
47
|
) => {
|
|
40
48
|
let transientItem = transientItemMap.get(item.model.id);
|
|
41
49
|
if (transientItem) {
|
|
42
50
|
return transientItem;
|
|
43
51
|
}
|
|
52
|
+
const {
|
|
53
|
+
shapeIds,
|
|
54
|
+
drawSource = true,
|
|
55
|
+
drawTarget = true,
|
|
56
|
+
visible = true,
|
|
57
|
+
} = drawOptions;
|
|
44
58
|
if (item.type === 'node') {
|
|
45
|
-
transientItem = item.clone(nodeGroup,
|
|
59
|
+
transientItem = item.clone(nodeGroup, shapeIds, true);
|
|
46
60
|
} else if (item.type === 'edge') {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
let source;
|
|
62
|
+
let target;
|
|
63
|
+
if (drawSource) {
|
|
64
|
+
source = upsertTransientItem(
|
|
65
|
+
item.sourceItem,
|
|
66
|
+
nodeGroup,
|
|
67
|
+
edgeGroup,
|
|
68
|
+
comboGroup,
|
|
69
|
+
transientItemMap,
|
|
70
|
+
itemMap,
|
|
71
|
+
graphCore,
|
|
72
|
+
drawOptions,
|
|
73
|
+
false,
|
|
74
|
+
) as Node | Combo;
|
|
75
|
+
}
|
|
76
|
+
if (drawTarget) {
|
|
77
|
+
target = upsertTransientItem(
|
|
78
|
+
item.targetItem,
|
|
79
|
+
nodeGroup,
|
|
80
|
+
edgeGroup,
|
|
81
|
+
comboGroup,
|
|
82
|
+
transientItemMap,
|
|
83
|
+
itemMap,
|
|
84
|
+
graphCore,
|
|
85
|
+
drawOptions,
|
|
86
|
+
false,
|
|
87
|
+
) as Node | Combo;
|
|
88
|
+
}
|
|
69
89
|
transientItem = item.clone(
|
|
70
90
|
edgeGroup,
|
|
71
91
|
source,
|
|
72
92
|
target,
|
|
73
|
-
|
|
93
|
+
shapeIds,
|
|
74
94
|
true,
|
|
75
95
|
) as Edge;
|
|
76
96
|
} else {
|
|
@@ -89,7 +109,7 @@ export const upsertTransientItem = (
|
|
|
89
109
|
transientItemMap,
|
|
90
110
|
itemMap,
|
|
91
111
|
graphCore,
|
|
92
|
-
|
|
112
|
+
drawOptions,
|
|
93
113
|
false,
|
|
94
114
|
),
|
|
95
115
|
);
|
|
@@ -97,7 +117,7 @@ export const upsertTransientItem = (
|
|
|
97
117
|
});
|
|
98
118
|
transientItem = (item as Combo).clone(
|
|
99
119
|
comboGroup,
|
|
100
|
-
|
|
120
|
+
shapeIds,
|
|
101
121
|
true,
|
|
102
122
|
() => getCombinedBoundsByItem(childItems), // getCombinedBounds
|
|
103
123
|
() => childItems,
|
|
@@ -105,6 +125,7 @@ export const upsertTransientItem = (
|
|
|
105
125
|
transientItem.toBack();
|
|
106
126
|
}
|
|
107
127
|
transientItemMap.set(item.model.id, transientItem);
|
|
128
|
+
// @ts-ignore
|
|
108
129
|
transientItem.transient = true;
|
|
109
130
|
|
|
110
131
|
if (
|
|
@@ -125,12 +146,28 @@ export const upsertTransientItem = (
|
|
|
125
146
|
transientItemMap,
|
|
126
147
|
itemMap,
|
|
127
148
|
graphCore,
|
|
128
|
-
|
|
149
|
+
drawOptions,
|
|
129
150
|
);
|
|
130
151
|
transientAncestor.toBack();
|
|
131
152
|
}
|
|
132
153
|
currentAncestor = graphCore.getParent(currentAncestor.id, 'combo');
|
|
133
154
|
}
|
|
134
155
|
}
|
|
156
|
+
|
|
157
|
+
if (shapeIds?.length && visible) {
|
|
158
|
+
// @ts-ignore
|
|
159
|
+
(transientItem as Group).childNodes.forEach((shape) => shape.show());
|
|
160
|
+
}
|
|
135
161
|
return transientItem;
|
|
136
162
|
};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* generate unique edge id
|
|
166
|
+
* @todo consider edges with same source and target
|
|
167
|
+
* @param source
|
|
168
|
+
* @param target
|
|
169
|
+
* @returns
|
|
170
|
+
*/
|
|
171
|
+
export function generateEdgeID(source: ID, target: ID) {
|
|
172
|
+
return [source, target, uniqueId()].join('->');
|
|
173
|
+
}
|
package/src/util/warn.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* optionName: 选项名
|
|
3
|
+
* shouldBe: 合法的输入参数
|
|
4
|
+
* now: 当前用户输入值
|
|
5
|
+
* scope: 选项所属的模块
|
|
6
|
+
*/
|
|
7
|
+
type WarnOption = {
|
|
8
|
+
optionName: string;
|
|
9
|
+
shouldBe: any;
|
|
10
|
+
now: string | number;
|
|
11
|
+
scope: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export function warn({ optionName, shouldBe, now, scope }: WarnOption) {
|
|
15
|
+
console.warn(
|
|
16
|
+
`G6 [${scope}]: Invalid option, ${optionName} must be one of ${shouldBe.join(
|
|
17
|
+
', ',
|
|
18
|
+
)}, but got ${now}`,
|
|
19
|
+
);
|
|
20
|
+
}
|