@opendata-ai/openchart-vue 8.9.1 → 9.0.0-rc.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/README.md +1 -1
- package/dist/index.d.ts +122 -50
- package/dist/index.js +117 -71
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
} from "@opendata-ai/openchart-engine";
|
|
26
26
|
|
|
27
27
|
// src/BarList.ts
|
|
28
|
+
import { mergeThemeConfig } from "@opendata-ai/openchart-core";
|
|
28
29
|
import {
|
|
29
30
|
createBarList
|
|
30
31
|
} from "@opendata-ai/openchart-vanilla";
|
|
@@ -87,7 +88,7 @@ var BarList = defineComponent({
|
|
|
87
88
|
const contextTheme = inject2(VizThemeKey, void 0);
|
|
88
89
|
const contextDarkMode = inject2(VizDarkModeKey, void 0);
|
|
89
90
|
function resolveTheme() {
|
|
90
|
-
return props.theme
|
|
91
|
+
return mergeThemeConfig(contextTheme?.value, props.theme);
|
|
91
92
|
}
|
|
92
93
|
function resolveDarkMode() {
|
|
93
94
|
return props.darkMode ?? contextDarkMode?.value;
|
|
@@ -100,7 +101,7 @@ var BarList = defineComponent({
|
|
|
100
101
|
darkMode: resolveDarkMode(),
|
|
101
102
|
onRowClick: (row) => emit("row-click", row),
|
|
102
103
|
onRowHover: (row) => emit("row-hover", row),
|
|
103
|
-
|
|
104
|
+
autoResize: true
|
|
104
105
|
};
|
|
105
106
|
instance = createBarList(container, props.spec, options);
|
|
106
107
|
prevSpec = JSON.stringify(props.spec);
|
|
@@ -157,10 +158,13 @@ var BarList = defineComponent({
|
|
|
157
158
|
});
|
|
158
159
|
|
|
159
160
|
// src/Chart.ts
|
|
160
|
-
import {
|
|
161
|
+
import { mergeThemeConfig as mergeThemeConfig2 } from "@opendata-ai/openchart-core";
|
|
162
|
+
import {
|
|
163
|
+
createChart,
|
|
164
|
+
createChartReaderBinding
|
|
165
|
+
} from "@opendata-ai/openchart-vanilla";
|
|
161
166
|
import {
|
|
162
167
|
defineComponent as defineComponent2,
|
|
163
|
-
getCurrentInstance,
|
|
164
168
|
h as h2,
|
|
165
169
|
inject as inject3,
|
|
166
170
|
onMounted as onMounted2,
|
|
@@ -171,6 +175,11 @@ import {
|
|
|
171
175
|
var Chart = defineComponent2({
|
|
172
176
|
name: "Chart",
|
|
173
177
|
props: {
|
|
178
|
+
reader: {
|
|
179
|
+
type: [Boolean, Object],
|
|
180
|
+
default: void 0
|
|
181
|
+
},
|
|
182
|
+
readerSelection: { type: Object, default: void 0 },
|
|
174
183
|
spec: {
|
|
175
184
|
type: Object,
|
|
176
185
|
required: true
|
|
@@ -187,15 +196,24 @@ var Chart = defineComponent2({
|
|
|
187
196
|
type: String,
|
|
188
197
|
default: void 0
|
|
189
198
|
},
|
|
190
|
-
//
|
|
191
|
-
// emits listeners from update checks, which would leave
|
|
192
|
-
// when a parent removes
|
|
193
|
-
|
|
199
|
+
// Declared listener props make presence reactive. Vue excludes declared
|
|
200
|
+
// emits listeners from update checks, which would leave the inferred
|
|
201
|
+
// interaction mode stale when a parent adds or removes a listener.
|
|
202
|
+
// `@edit`, `@select`, and `@deselect` bind to these props.
|
|
203
|
+
onEdit: {
|
|
204
|
+
type: Function,
|
|
205
|
+
default: void 0
|
|
206
|
+
},
|
|
207
|
+
onSelect: {
|
|
194
208
|
type: Function,
|
|
195
209
|
default: void 0
|
|
196
210
|
},
|
|
211
|
+
onDeselect: {
|
|
212
|
+
type: Function,
|
|
213
|
+
default: void 0
|
|
214
|
+
},
|
|
215
|
+
rowHover: { type: Boolean, default: void 0 },
|
|
197
216
|
autoResize: { type: Boolean, default: void 0 },
|
|
198
|
-
responsive: { type: Boolean, default: void 0 },
|
|
199
217
|
revision: { type: [String, Number], default: void 0 },
|
|
200
218
|
class: {
|
|
201
219
|
type: String,
|
|
@@ -213,42 +231,41 @@ var Chart = defineComponent2({
|
|
|
213
231
|
type: [Array, null],
|
|
214
232
|
default: void 0
|
|
215
233
|
},
|
|
216
|
-
|
|
217
|
-
type:
|
|
234
|
+
interaction: {
|
|
235
|
+
type: String,
|
|
218
236
|
default: void 0
|
|
219
237
|
}
|
|
220
238
|
},
|
|
221
239
|
emits: {
|
|
240
|
+
"reader-change": (_selection, _meta) => true,
|
|
222
241
|
"mark-click": (_event) => true,
|
|
223
242
|
"mark-hover": (_event) => true,
|
|
224
243
|
"mark-leave": () => true,
|
|
225
244
|
"legend-toggle": (_series, _visible) => true,
|
|
226
245
|
"annotation-click": (_annotation, _event, _element) => true,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
edit: (_edit) => true,
|
|
230
|
-
select: (_element) => true,
|
|
231
|
-
deselect: (_element) => true,
|
|
232
|
-
/** @deprecated Use edit-transaction. */
|
|
233
|
-
"text-edit": (_element, _oldText, _newText) => true,
|
|
234
|
-
/** @deprecated Has no effect; use mark-click. */
|
|
235
|
-
"data-point-click": (_data) => true
|
|
246
|
+
"highlight-change": (_values) => true,
|
|
247
|
+
reveal: (_guess) => true
|
|
236
248
|
},
|
|
237
249
|
setup(props, { emit, expose }) {
|
|
238
250
|
const containerRef = ref2(null);
|
|
239
251
|
let instance = null;
|
|
240
252
|
let prevSpec = "";
|
|
253
|
+
const readerBinding = createChartReaderBinding();
|
|
254
|
+
function syncReader() {
|
|
255
|
+
if (containerRef.value && instance)
|
|
256
|
+
readerBinding.sync(
|
|
257
|
+
containerRef.value,
|
|
258
|
+
instance,
|
|
259
|
+
props.spec,
|
|
260
|
+
props.reader,
|
|
261
|
+
props.readerSelection,
|
|
262
|
+
(state, meta) => emit("reader-change", state, meta)
|
|
263
|
+
);
|
|
264
|
+
}
|
|
241
265
|
const contextTheme = inject3(VizThemeKey, void 0);
|
|
242
266
|
const contextDarkMode = inject3(VizDarkModeKey, void 0);
|
|
243
|
-
const vm = getCurrentInstance();
|
|
244
|
-
const vnodeProps = vm?.vnode.props ?? {};
|
|
245
|
-
const hasAnnotationEditListener = "onAnnotation-edit" in vnodeProps || "onAnnotationEdit" in vnodeProps;
|
|
246
|
-
const hasEditListener = "onEdit" in vnodeProps;
|
|
247
|
-
const hasSelectListener = "onSelect" in vnodeProps;
|
|
248
|
-
const hasDeselectListener = "onDeselect" in vnodeProps;
|
|
249
|
-
const hasTextEditListener = "onText-edit" in vnodeProps || "onTextEdit" in vnodeProps;
|
|
250
267
|
function resolveTheme() {
|
|
251
|
-
return props.theme
|
|
268
|
+
return mergeThemeConfig2(contextTheme?.value, props.theme);
|
|
252
269
|
}
|
|
253
270
|
function resolveDarkMode() {
|
|
254
271
|
return props.darkMode ?? contextDarkMode?.value;
|
|
@@ -260,37 +277,33 @@ var Chart = defineComponent2({
|
|
|
260
277
|
theme: resolveTheme(),
|
|
261
278
|
darkMode: resolveDarkMode(),
|
|
262
279
|
renderer: props.renderer,
|
|
263
|
-
..."onDataPointClick" in vnodeProps || "onData-point-click" in vnodeProps ? { onDataPointClick: (data) => emit("data-point-click", data) } : {},
|
|
264
280
|
onMarkClick: (event) => emit("mark-click", event),
|
|
265
281
|
onMarkHover: (event) => emit("mark-hover", event),
|
|
266
282
|
onMarkLeave: () => emit("mark-leave"),
|
|
267
283
|
onLegendToggle: (series, visible) => emit("legend-toggle", series, visible),
|
|
268
284
|
onAnnotationClick: (annotation, event, element) => emit("annotation-click", annotation, event, element),
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
} : {},
|
|
274
|
-
...
|
|
275
|
-
...
|
|
276
|
-
...hasDeselectListener ? { onDeselect: (element) => emit("deselect", element) } : {},
|
|
277
|
-
...hasTextEditListener ? {
|
|
278
|
-
onTextEdit: (element, oldText, newText) => emit("text-edit", element, oldText, newText)
|
|
279
|
-
} : {},
|
|
280
|
-
...props.editable != null ? { editable: props.editable } : {},
|
|
285
|
+
onHighlightChange: (values) => emit("highlight-change", values),
|
|
286
|
+
onReveal: (guess) => emit("reveal", guess),
|
|
287
|
+
// Only include selection/edit callbacks when the parent binds a listener:
|
|
288
|
+
// their presence infers the interaction mode when `interaction` is omitted.
|
|
289
|
+
...props.onSelect ? { onSelect: (element) => props.onSelect?.(element) } : {},
|
|
290
|
+
...props.onDeselect ? { onDeselect: (element) => props.onDeselect?.(element) } : {},
|
|
291
|
+
...props.interaction != null ? { interaction: props.interaction } : {},
|
|
281
292
|
...props.selectedElement ? { selectedElement: props.selectedElement } : {},
|
|
293
|
+
rowHover: props.rowHover,
|
|
282
294
|
autoResize: props.autoResize,
|
|
283
|
-
responsive: props.responsive,
|
|
284
295
|
revision: props.revision,
|
|
285
|
-
...props.
|
|
296
|
+
...props.onEdit ? { onEdit: (tx) => props.onEdit?.(tx) } : {}
|
|
286
297
|
};
|
|
287
298
|
instance = createChart(container, props.spec, options);
|
|
288
299
|
prevSpec = JSON.stringify(props.spec);
|
|
300
|
+
syncReader();
|
|
289
301
|
if (props.highlight !== void 0) {
|
|
290
302
|
instance.setHighlight(props.highlight ?? null);
|
|
291
303
|
}
|
|
292
304
|
}
|
|
293
305
|
function destroyChart() {
|
|
306
|
+
readerBinding.detach();
|
|
294
307
|
instance?.destroy();
|
|
295
308
|
instance = null;
|
|
296
309
|
prevSpec = "";
|
|
@@ -316,22 +329,19 @@ var Chart = defineComponent2({
|
|
|
316
329
|
destroyChart();
|
|
317
330
|
});
|
|
318
331
|
watch2(
|
|
319
|
-
() => JSON.stringify(props.spec),
|
|
320
|
-
(
|
|
332
|
+
() => [JSON.stringify(props.spec), props.revision],
|
|
333
|
+
([newSpec, newRevision], [, oldRevision]) => {
|
|
321
334
|
if (!instance) return;
|
|
322
|
-
if (
|
|
323
|
-
prevSpec =
|
|
335
|
+
if (newSpec !== prevSpec || newRevision !== oldRevision) {
|
|
336
|
+
prevSpec = newSpec;
|
|
324
337
|
instance.update(props.spec, {
|
|
325
338
|
selectedElement: props.selectedElement,
|
|
326
339
|
revision: props.revision
|
|
327
340
|
});
|
|
341
|
+
syncReader();
|
|
328
342
|
}
|
|
329
343
|
}
|
|
330
344
|
);
|
|
331
|
-
watch2(
|
|
332
|
-
() => props.revision,
|
|
333
|
-
() => instance?.update(props.spec, { revision: props.revision })
|
|
334
|
-
);
|
|
335
345
|
watch2(
|
|
336
346
|
() => props.selectedElement,
|
|
337
347
|
(newVal) => {
|
|
@@ -350,15 +360,18 @@ var Chart = defineComponent2({
|
|
|
350
360
|
instance.setHighlight(newVal ?? null);
|
|
351
361
|
}
|
|
352
362
|
);
|
|
363
|
+
watch2([() => props.reader, () => props.readerSelection], () => syncReader(), { deep: false });
|
|
353
364
|
watch2(
|
|
354
365
|
[
|
|
355
|
-
() => Boolean(props.
|
|
366
|
+
() => Boolean(props.onEdit),
|
|
367
|
+
() => Boolean(props.onSelect),
|
|
368
|
+
() => Boolean(props.onDeselect),
|
|
369
|
+
() => props.rowHover,
|
|
356
370
|
() => props.autoResize,
|
|
357
|
-
() => props.responsive,
|
|
358
371
|
() => props.theme,
|
|
359
372
|
() => props.darkMode,
|
|
360
373
|
() => props.renderer,
|
|
361
|
-
() => props.
|
|
374
|
+
() => props.interaction,
|
|
362
375
|
() => contextTheme?.value,
|
|
363
376
|
() => contextDarkMode?.value
|
|
364
377
|
],
|
|
@@ -536,8 +549,7 @@ function useChart(spec, options) {
|
|
|
536
549
|
const mountOpts = {
|
|
537
550
|
theme: options?.theme,
|
|
538
551
|
darkMode: options?.darkMode,
|
|
539
|
-
|
|
540
|
-
responsive: options?.responsive,
|
|
552
|
+
autoResize: options?.autoResize,
|
|
541
553
|
renderer: options?.renderer
|
|
542
554
|
};
|
|
543
555
|
const instance = createChart2(container, spec.value, mountOpts);
|
|
@@ -768,6 +780,7 @@ function useTableState(initialState) {
|
|
|
768
780
|
}
|
|
769
781
|
|
|
770
782
|
// src/DataTable.ts
|
|
783
|
+
import { mergeThemeConfig as mergeThemeConfig3 } from "@opendata-ai/openchart-core";
|
|
771
784
|
import {
|
|
772
785
|
createTable as createTable2
|
|
773
786
|
} from "@opendata-ai/openchart-vanilla";
|
|
@@ -828,7 +841,7 @@ var DataTable = defineComponent4({
|
|
|
828
841
|
const contextTheme = inject4(VizThemeKey, void 0);
|
|
829
842
|
const contextDarkMode = inject4(VizDarkModeKey, void 0);
|
|
830
843
|
function resolveTheme() {
|
|
831
|
-
return props.theme
|
|
844
|
+
return mergeThemeConfig3(contextTheme?.value, props.theme);
|
|
832
845
|
}
|
|
833
846
|
function resolveDarkMode() {
|
|
834
847
|
return props.darkMode ?? contextDarkMode?.value;
|
|
@@ -844,7 +857,7 @@ var DataTable = defineComponent4({
|
|
|
844
857
|
theme: resolveTheme(),
|
|
845
858
|
darkMode: resolveDarkMode(),
|
|
846
859
|
onRowClick: (row) => emit("row-click", row),
|
|
847
|
-
|
|
860
|
+
autoResize: true,
|
|
848
861
|
onStateChange: (state) => {
|
|
849
862
|
if (state.sort !== void 0) emit("update:sort", state.sort);
|
|
850
863
|
if (state.search !== void 0) emit("update:search", state.search);
|
|
@@ -916,8 +929,10 @@ var DataTable = defineComponent4({
|
|
|
916
929
|
});
|
|
917
930
|
|
|
918
931
|
// src/GeoMap.ts
|
|
932
|
+
import { mergeThemeConfig as mergeThemeConfig4 } from "@opendata-ai/openchart-core";
|
|
919
933
|
import {
|
|
920
|
-
createGeoMap
|
|
934
|
+
createGeoMap,
|
|
935
|
+
createGeoReaderBinding
|
|
921
936
|
} from "@opendata-ai/openchart-vanilla";
|
|
922
937
|
import {
|
|
923
938
|
defineComponent as defineComponent5,
|
|
@@ -931,6 +946,12 @@ import {
|
|
|
931
946
|
var GeoMap = defineComponent5({
|
|
932
947
|
name: "GeoMap",
|
|
933
948
|
props: {
|
|
949
|
+
reader: { type: [Boolean, Object], default: void 0 },
|
|
950
|
+
readerSelection: { type: Object, default: void 0 },
|
|
951
|
+
labelInventory: {
|
|
952
|
+
type: [Boolean, Object],
|
|
953
|
+
default: void 0
|
|
954
|
+
},
|
|
934
955
|
spec: {
|
|
935
956
|
type: Object,
|
|
936
957
|
required: true
|
|
@@ -953,18 +974,31 @@ var GeoMap = defineComponent5({
|
|
|
953
974
|
}
|
|
954
975
|
},
|
|
955
976
|
emits: {
|
|
977
|
+
"reader-change": (_selection, _meta) => true,
|
|
956
978
|
"mark-click": (_event) => true,
|
|
957
979
|
"mark-hover": (_event) => true,
|
|
958
|
-
"camera-change": (_camera) => true
|
|
980
|
+
"camera-change": (_camera, _meta) => true
|
|
959
981
|
},
|
|
960
982
|
setup(props, { emit, expose }) {
|
|
961
983
|
const containerRef = ref10(null);
|
|
962
984
|
let instance = null;
|
|
963
985
|
let prevSpec = "";
|
|
986
|
+
const readerBinding = createGeoReaderBinding();
|
|
987
|
+
function syncReader() {
|
|
988
|
+
if (containerRef.value && instance)
|
|
989
|
+
readerBinding.sync(
|
|
990
|
+
containerRef.value,
|
|
991
|
+
instance,
|
|
992
|
+
props.spec,
|
|
993
|
+
props.reader,
|
|
994
|
+
props.readerSelection,
|
|
995
|
+
(state, meta) => emit("reader-change", state, meta)
|
|
996
|
+
);
|
|
997
|
+
}
|
|
964
998
|
const contextTheme = inject5(VizThemeKey, void 0);
|
|
965
999
|
const contextDarkMode = inject5(VizDarkModeKey, void 0);
|
|
966
1000
|
function resolveTheme() {
|
|
967
|
-
return props.theme
|
|
1001
|
+
return mergeThemeConfig4(contextTheme?.value, props.theme);
|
|
968
1002
|
}
|
|
969
1003
|
function resolveDarkMode() {
|
|
970
1004
|
return props.darkMode ?? contextDarkMode?.value;
|
|
@@ -977,13 +1011,16 @@ var GeoMap = defineComponent5({
|
|
|
977
1011
|
darkMode: resolveDarkMode(),
|
|
978
1012
|
onMarkClick: (feature) => emit("mark-click", feature),
|
|
979
1013
|
onMarkHover: (feature) => emit("mark-hover", feature),
|
|
980
|
-
onCameraChange: (camera) => emit("camera-change", camera),
|
|
981
|
-
|
|
1014
|
+
onCameraChange: (camera, meta) => meta ? emit("camera-change", camera, meta) : emit("camera-change", camera),
|
|
1015
|
+
autoResize: true,
|
|
1016
|
+
labelInventory: props.labelInventory
|
|
982
1017
|
};
|
|
983
1018
|
instance = createGeoMap(container, props.spec, options);
|
|
984
1019
|
prevSpec = JSON.stringify(props.spec);
|
|
1020
|
+
syncReader();
|
|
985
1021
|
}
|
|
986
1022
|
function destroyMap() {
|
|
1023
|
+
readerBinding.detach();
|
|
987
1024
|
instance?.destroy();
|
|
988
1025
|
instance = null;
|
|
989
1026
|
prevSpec = "";
|
|
@@ -1006,9 +1043,15 @@ var GeoMap = defineComponent5({
|
|
|
1006
1043
|
if (newVal !== prevSpec) {
|
|
1007
1044
|
prevSpec = newVal;
|
|
1008
1045
|
instance.update(props.spec);
|
|
1046
|
+
syncReader();
|
|
1009
1047
|
}
|
|
1010
1048
|
}
|
|
1011
1049
|
);
|
|
1050
|
+
watch8(
|
|
1051
|
+
() => props.labelInventory,
|
|
1052
|
+
(value) => instance?.setLabelInventory(value)
|
|
1053
|
+
);
|
|
1054
|
+
watch8([() => props.reader, () => props.readerSelection], () => syncReader(), { deep: false });
|
|
1012
1055
|
watch8(
|
|
1013
1056
|
[
|
|
1014
1057
|
() => props.theme,
|
|
@@ -1035,6 +1078,7 @@ var GeoMap = defineComponent5({
|
|
|
1035
1078
|
});
|
|
1036
1079
|
|
|
1037
1080
|
// src/Graph.ts
|
|
1081
|
+
import { mergeThemeConfig as mergeThemeConfig5 } from "@opendata-ai/openchart-core";
|
|
1038
1082
|
import {
|
|
1039
1083
|
createGraph
|
|
1040
1084
|
} from "@opendata-ai/openchart-vanilla";
|
|
@@ -1109,7 +1153,7 @@ var Graph = defineComponent6({
|
|
|
1109
1153
|
const contextTheme = inject6(VizThemeKey, void 0);
|
|
1110
1154
|
const contextDarkMode = inject6(VizDarkModeKey, void 0);
|
|
1111
1155
|
function resolveTheme() {
|
|
1112
|
-
return props.theme
|
|
1156
|
+
return mergeThemeConfig5(contextTheme?.value, props.theme);
|
|
1113
1157
|
}
|
|
1114
1158
|
function resolveDarkMode() {
|
|
1115
1159
|
return props.darkMode ?? contextDarkMode?.value;
|
|
@@ -1139,7 +1183,7 @@ var Graph = defineComponent6({
|
|
|
1139
1183
|
onLegendToggle: (activeValues) => emit("legend-toggle", activeValues),
|
|
1140
1184
|
onHighlightChange: (nodeIds) => emit("highlight-change", nodeIds),
|
|
1141
1185
|
onCameraChange: (camera) => emit("camera-change", camera),
|
|
1142
|
-
|
|
1186
|
+
autoResize: true,
|
|
1143
1187
|
suppressEntrance: mountedOnce && !playEntrance
|
|
1144
1188
|
};
|
|
1145
1189
|
instance = createGraph(container, props.spec, options);
|
|
@@ -1200,8 +1244,8 @@ var Graph = defineComponent6({
|
|
|
1200
1244
|
getActiveCategories() {
|
|
1201
1245
|
return instance?.getActiveCategories() ?? [];
|
|
1202
1246
|
},
|
|
1203
|
-
|
|
1204
|
-
instance?.
|
|
1247
|
+
update(spec) {
|
|
1248
|
+
instance?.update(spec);
|
|
1205
1249
|
},
|
|
1206
1250
|
get instance() {
|
|
1207
1251
|
return instance;
|
|
@@ -1257,6 +1301,7 @@ var Graph = defineComponent6({
|
|
|
1257
1301
|
});
|
|
1258
1302
|
|
|
1259
1303
|
// src/Sankey.ts
|
|
1304
|
+
import { mergeThemeConfig as mergeThemeConfig6 } from "@opendata-ai/openchart-core";
|
|
1260
1305
|
import {
|
|
1261
1306
|
createSankey
|
|
1262
1307
|
} from "@opendata-ai/openchart-vanilla";
|
|
@@ -1306,7 +1351,7 @@ var Sankey = defineComponent7({
|
|
|
1306
1351
|
const contextTheme = inject7(VizThemeKey, void 0);
|
|
1307
1352
|
const contextDarkMode = inject7(VizDarkModeKey, void 0);
|
|
1308
1353
|
function resolveTheme() {
|
|
1309
|
-
return props.theme
|
|
1354
|
+
return mergeThemeConfig6(contextTheme?.value, props.theme);
|
|
1310
1355
|
}
|
|
1311
1356
|
function resolveDarkMode() {
|
|
1312
1357
|
return props.darkMode ?? contextDarkMode?.value;
|
|
@@ -1321,7 +1366,7 @@ var Sankey = defineComponent7({
|
|
|
1321
1366
|
onLinkClick: (link) => emit("link-click", link),
|
|
1322
1367
|
onNodeHover: (node) => emit("node-hover", node),
|
|
1323
1368
|
onLinkHover: (link) => emit("link-hover", link),
|
|
1324
|
-
|
|
1369
|
+
autoResize: true
|
|
1325
1370
|
};
|
|
1326
1371
|
instance = createSankey(container, props.spec, options);
|
|
1327
1372
|
prevSpec = JSON.stringify(props.spec);
|
|
@@ -1401,6 +1446,7 @@ var VizThemeProvider = defineComponent8({
|
|
|
1401
1446
|
});
|
|
1402
1447
|
|
|
1403
1448
|
// src/TileMap.ts
|
|
1449
|
+
import { mergeThemeConfig as mergeThemeConfig7 } from "@opendata-ai/openchart-core";
|
|
1404
1450
|
import {
|
|
1405
1451
|
createTileMap
|
|
1406
1452
|
} from "@opendata-ai/openchart-vanilla";
|
|
@@ -1448,7 +1494,7 @@ var TileMap = defineComponent9({
|
|
|
1448
1494
|
const contextTheme = inject8(VizThemeKey, void 0);
|
|
1449
1495
|
const contextDarkMode = inject8(VizDarkModeKey, void 0);
|
|
1450
1496
|
function resolveTheme() {
|
|
1451
|
-
return props.theme
|
|
1497
|
+
return mergeThemeConfig7(contextTheme?.value, props.theme);
|
|
1452
1498
|
}
|
|
1453
1499
|
function resolveDarkMode() {
|
|
1454
1500
|
return props.darkMode ?? contextDarkMode?.value;
|
|
@@ -1461,7 +1507,7 @@ var TileMap = defineComponent9({
|
|
|
1461
1507
|
darkMode: resolveDarkMode(),
|
|
1462
1508
|
onTileClick: (tile) => emit("tile-click", tile),
|
|
1463
1509
|
onTileHover: (tile) => emit("tile-hover", tile),
|
|
1464
|
-
|
|
1510
|
+
autoResize: true
|
|
1465
1511
|
};
|
|
1466
1512
|
instance = createTileMap(container, props.spec, options);
|
|
1467
1513
|
prevSpec = JSON.stringify(props.spec);
|