vccs 1.0.0-beta.1 → 1.0.0-beta.2
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/es/cartesian/bar/components/BarRectangles.mjs +1 -1
- package/dist/es/cartesian/funnel/Funnel.mjs +1 -1
- package/dist/es/cartesian/scatter/Scatter.mjs +1 -1
- package/dist/es/chart/CellGridLayer.mjs +1 -1
- package/dist/es/chart/JourneySankey.mjs +1 -1
- package/dist/es/chart/Sankey.mjs +2 -2
- package/dist/es/chart/Sparkline.mjs +1 -1
- package/dist/es/chart/SunburstChart.mjs +1 -1
- package/dist/es/chart/Treemap.mjs +1 -1
- package/dist/es/events/sync.mjs +1 -2
- package/dist/es/events/usePointEvents.mjs +1 -1
- package/dist/es/model/tooltip.mjs +3 -5
- package/dist/es/polar/pie/Pie.mjs +1 -1
- package/dist/es/polar/radial-bar/RadialBar.mjs +1 -1
- package/dist/model/tooltip.d.ts +4 -18
- package/package.json +1 -1
|
@@ -148,7 +148,7 @@ var BarRectangles = /* @__PURE__ */ defineComponent({
|
|
|
148
148
|
emit("mouseenter", bar, index, event);
|
|
149
149
|
},
|
|
150
150
|
mouseleave: ({ bar, index }, _position, event) => {
|
|
151
|
-
tooltip.clear("hover");
|
|
151
|
+
tooltip.clear("hover", "item");
|
|
152
152
|
emit("mouseleave", bar, index, event);
|
|
153
153
|
}
|
|
154
154
|
});
|
|
@@ -125,7 +125,7 @@ var ScatterView = /* @__PURE__ */ defineComponent({
|
|
|
125
125
|
});
|
|
126
126
|
};
|
|
127
127
|
const onMouseLeaveSymbol = () => {
|
|
128
|
-
tooltip.clear("hover");
|
|
128
|
+
tooltip.clear("hover", "item");
|
|
129
129
|
};
|
|
130
130
|
let symbolData = [];
|
|
131
131
|
const listeners = delegateItemEvents((index) => symbolData[index], {
|
|
@@ -203,7 +203,7 @@ var CellGridLayer = /* @__PURE__ */ defineComponent({
|
|
|
203
203
|
coordinate: void 0,
|
|
204
204
|
active: false
|
|
205
205
|
});
|
|
206
|
-
else tooltip.clear("hover");
|
|
206
|
+
else tooltip.clear("hover", "item");
|
|
207
207
|
}
|
|
208
208
|
function onEnter(cell, index, event) {
|
|
209
209
|
keyboard.value = false;
|
package/dist/es/chart/Sankey.mjs
CHANGED
|
@@ -292,11 +292,11 @@ function useSankey(props, slots, emit) {
|
|
|
292
292
|
emit("link-mouseenter", link, index, e);
|
|
293
293
|
}
|
|
294
294
|
function handleNodeMouseLeave(node, index, e) {
|
|
295
|
-
tooltip.clear("hover");
|
|
295
|
+
tooltip.clear("hover", "item");
|
|
296
296
|
emit("node-mouseleave", node, index, e);
|
|
297
297
|
}
|
|
298
298
|
function handleLinkMouseLeave(link, index, e) {
|
|
299
|
-
tooltip.clear("hover");
|
|
299
|
+
tooltip.clear("hover", "item");
|
|
300
300
|
emit("link-mouseleave", link, index, e);
|
|
301
301
|
}
|
|
302
302
|
function handleNodeClick(node, index, e) {
|
|
@@ -247,7 +247,7 @@ function useSparkline(props, emit) {
|
|
|
247
247
|
function setActive(index, keyboard = false) {
|
|
248
248
|
const point = index === null ? void 0 : points.value[index];
|
|
249
249
|
if (!point && !keyboard) {
|
|
250
|
-
tooltip.clear("hover");
|
|
250
|
+
tooltip.clear("hover", "item");
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
253
|
const action = {
|
|
@@ -201,7 +201,7 @@ function useSunburst(props, slots, emit) {
|
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
function handleMouseLeave(node, e) {
|
|
204
|
-
tooltip.clear("hover");
|
|
204
|
+
tooltip.clear("hover", "item");
|
|
205
205
|
emit("node-mouseleave", node, indexOf(node), e);
|
|
206
206
|
}
|
|
207
207
|
function handleClick(node, e) {
|
|
@@ -278,7 +278,7 @@ function useTreemap(props, slots, emit) {
|
|
|
278
278
|
emit("node-mouseenter", node, index, e);
|
|
279
279
|
}
|
|
280
280
|
function handleNodeMouseLeave(node, index, e) {
|
|
281
|
-
tooltip.clear("hover");
|
|
281
|
+
tooltip.clear("hover", "item");
|
|
282
282
|
emit("node-mouseleave", node, index, e);
|
|
283
283
|
}
|
|
284
284
|
function handleNodeClick(node, index, e) {
|
package/dist/es/events/sync.mjs
CHANGED
|
@@ -10,8 +10,7 @@ function useTooltipChartSynchronisation(source, enabled) {
|
|
|
10
10
|
const activeDataKey = computed(() => tooltip.target.value?.entry?.value?.settings.dataKey);
|
|
11
11
|
const eventEmitterSymbol = presentation.emitter;
|
|
12
12
|
const syncId = presentation.syncId;
|
|
13
|
-
const
|
|
14
|
-
const isReceivingSynchronisation = computed(() => tooltipState.value?.active);
|
|
13
|
+
const isReceivingSynchronisation = computed(() => tooltip.receivingSynchronisation.value);
|
|
15
14
|
watchEffect(() => {
|
|
16
15
|
if (!enabled()) return;
|
|
17
16
|
if (isReceivingSynchronisation.value) return;
|
|
@@ -286,8 +286,9 @@ function createTooltip(inputs) {
|
|
|
286
286
|
coordinate: input.coordinate
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function clear(channel) {
|
|
289
|
+
function clear(channel, scope) {
|
|
290
290
|
if (channel === "hover" && settings.value.trigger !== "hover") return;
|
|
291
|
+
if (scope === "item" && selection.value?.target.entry === void 0) return;
|
|
291
292
|
request(null);
|
|
292
293
|
if (channel === "keyboard") {
|
|
293
294
|
selection.value = null;
|
|
@@ -371,10 +372,7 @@ function createTooltip(inputs) {
|
|
|
371
372
|
index: selection.value.requestedIndex,
|
|
372
373
|
active: selection.value.active
|
|
373
374
|
} : noInteraction),
|
|
374
|
-
|
|
375
|
-
...selection.value?.channel === "sync" ? interaction.value : noInteraction,
|
|
376
|
-
label: label.value
|
|
377
|
-
})),
|
|
375
|
+
receivingSynchronisation: computed(() => selection.value?.channel === "sync"),
|
|
378
376
|
activeIndexFor,
|
|
379
377
|
coordinateFor,
|
|
380
378
|
activate,
|
|
@@ -139,7 +139,7 @@ var PieView = /* @__PURE__ */ defineComponent({
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
function handleSectorLeave() {
|
|
142
|
-
tooltip.clear("hover");
|
|
142
|
+
tooltip.clear("hover", "item");
|
|
143
143
|
}
|
|
144
144
|
let sectorList = items.value;
|
|
145
145
|
const listeners = delegateItemEvents((position) => sectorList[position]?.value, {
|
|
@@ -217,7 +217,7 @@ var RadialBarView = /* @__PURE__ */ defineComponent({
|
|
|
217
217
|
emit("mouseenter", sector, sector.index, event);
|
|
218
218
|
};
|
|
219
219
|
const onMouseleave = (event) => {
|
|
220
|
-
tooltip.clear("hover");
|
|
220
|
+
tooltip.clear("hover", "item");
|
|
221
221
|
emit("mouseleave", sector, sector.index, event);
|
|
222
222
|
};
|
|
223
223
|
if (slots.shape) return createVNode("g", mergeProps({ "key": items.value[i].key }, { [DATA_ITEM_INDEX_ATTRIBUTE_NAME]: sector.index }, {
|
package/dist/model/tooltip.d.ts
CHANGED
|
@@ -228,18 +228,11 @@ export declare function useTooltipController(): {
|
|
|
228
228
|
entries: import('./registry.js').Registry<TooltipPayloadConfiguration>;
|
|
229
229
|
announcement: import('vue').ShallowRef<string, string>;
|
|
230
230
|
keyboardInteraction: ComputedRef<TooltipInteraction>;
|
|
231
|
-
|
|
232
|
-
label: string | undefined;
|
|
233
|
-
configuration?: TooltipPayloadConfiguration;
|
|
234
|
-
active: boolean;
|
|
235
|
-
index: TooltipActiveIndex;
|
|
236
|
-
dataKey: import('../types/base.js').ChartDataKey | undefined;
|
|
237
|
-
coordinate: Coordinate | undefined;
|
|
238
|
-
}>;
|
|
231
|
+
receivingSynchronisation: ComputedRef<boolean>;
|
|
239
232
|
activeIndexFor: (entry: Entry) => ComputedRef<number | null>;
|
|
240
233
|
coordinateFor: (candidate: Target | undefined, fallback?: Coordinate) => Coordinate | undefined;
|
|
241
234
|
activate: (channel: Channel, input: TooltipTargetRequest) => void;
|
|
242
|
-
clear: (channel: Channel) => void;
|
|
235
|
+
clear: (channel: Channel, scope?: "item") => void;
|
|
243
236
|
};
|
|
244
237
|
export declare function useTooltipSource(): TooltipSource;
|
|
245
238
|
export declare function provideTooltipEntry(entry: Entry): void;
|
|
@@ -435,17 +428,10 @@ export declare function createTooltip(inputs: TooltipInputs): {
|
|
|
435
428
|
entries: import('./registry.js').Registry<TooltipPayloadConfiguration>;
|
|
436
429
|
announcement: import('vue').ShallowRef<string, string>;
|
|
437
430
|
keyboardInteraction: ComputedRef<TooltipInteraction>;
|
|
438
|
-
|
|
439
|
-
label: string | undefined;
|
|
440
|
-
configuration?: TooltipPayloadConfiguration;
|
|
441
|
-
active: boolean;
|
|
442
|
-
index: TooltipActiveIndex;
|
|
443
|
-
dataKey: import('../types/base.js').ChartDataKey | undefined;
|
|
444
|
-
coordinate: Coordinate | undefined;
|
|
445
|
-
}>;
|
|
431
|
+
receivingSynchronisation: ComputedRef<boolean>;
|
|
446
432
|
activeIndexFor: (entry: Entry) => ComputedRef<number | null>;
|
|
447
433
|
coordinateFor: (candidate: Target | undefined, fallback?: Coordinate) => Coordinate | undefined;
|
|
448
434
|
activate: (channel: Channel, input: TooltipTargetRequest) => void;
|
|
449
|
-
clear: (channel: Channel) => void;
|
|
435
|
+
clear: (channel: Channel, scope?: "item") => void;
|
|
450
436
|
};
|
|
451
437
|
export {};
|