@unovis/vue 1.7.0-pre.1 → 1.7.0
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 +4 -0
- package/components/annotations/index.cjs +1 -1
- package/components/annotations/index.cjs.map +1 -1
- package/components/annotations/index.d.ts +18 -100
- package/components/annotations/index.js +18 -20
- package/components/annotations/index.js.map +1 -1
- package/components/area/index.cjs +1 -1
- package/components/area/index.cjs.map +1 -1
- package/components/area/index.d.ts +12 -64
- package/components/area/index.js +31 -32
- package/components/area/index.js.map +1 -1
- package/components/axis/index.cjs +1 -1
- package/components/axis/index.cjs.map +1 -1
- package/components/axis/index.d.ts +12 -82
- package/components/axis/index.js +29 -28
- package/components/axis/index.js.map +1 -1
- package/components/boxplot/index.cjs +2 -0
- package/components/boxplot/index.cjs.map +1 -0
- package/components/boxplot/index.d.ts +19 -0
- package/components/boxplot/index.js +31 -0
- package/components/boxplot/index.js.map +1 -0
- package/components/boxplot/index2.cjs +2 -0
- package/components/boxplot/index2.cjs.map +1 -0
- package/components/boxplot/index2.js +7 -0
- package/components/boxplot/index2.js.map +1 -0
- package/components/brush/index.cjs +1 -1
- package/components/brush/index.cjs.map +1 -1
- package/components/brush/index.d.ts +12 -62
- package/components/brush/index.js +26 -28
- package/components/brush/index.js.map +1 -1
- package/components/chord-diagram/index.cjs +1 -1
- package/components/chord-diagram/index.cjs.map +1 -1
- package/components/chord-diagram/index.d.ts +12 -60
- package/components/chord-diagram/index.js +30 -32
- package/components/chord-diagram/index.js.map +1 -1
- package/components/crosshair/index.cjs +1 -1
- package/components/crosshair/index.cjs.map +1 -1
- package/components/crosshair/index.d.ts +12 -66
- package/components/crosshair/index.js +20 -24
- package/components/crosshair/index.js.map +1 -1
- package/components/donut/index.cjs +1 -1
- package/components/donut/index.cjs.map +1 -1
- package/components/donut/index.d.ts +12 -64
- package/components/donut/index.js +24 -26
- package/components/donut/index.js.map +1 -1
- package/components/free-brush/index.cjs +1 -1
- package/components/free-brush/index.cjs.map +1 -1
- package/components/free-brush/index.d.ts +12 -62
- package/components/free-brush/index.js +25 -28
- package/components/free-brush/index.js.map +1 -1
- package/components/graph/index.cjs +1 -1
- package/components/graph/index.cjs.map +1 -1
- package/components/graph/index.d.ts +11 -135
- package/components/graph/index.js +70 -66
- package/components/graph/index.js.map +1 -1
- package/components/grouped-bar/index.cjs +1 -1
- package/components/grouped-bar/index.cjs.map +1 -1
- package/components/grouped-bar/index.d.ts +12 -62
- package/components/grouped-bar/index.js +27 -28
- package/components/grouped-bar/index.js.map +1 -1
- package/components/heatmap/index.cjs +2 -0
- package/components/heatmap/index.cjs.map +1 -0
- package/components/heatmap/index.d.ts +19 -0
- package/components/heatmap/index.js +49 -0
- package/components/heatmap/index.js.map +1 -0
- package/components/heatmap/index2.cjs +2 -0
- package/components/heatmap/index2.cjs.map +1 -0
- package/components/heatmap/index2.js +7 -0
- package/components/heatmap/index2.js.map +1 -0
- package/components/line/index.cjs +1 -1
- package/components/line/index.cjs.map +1 -1
- package/components/line/index.d.ts +12 -60
- package/components/line/index.js +28 -30
- package/components/line/index.js.map +1 -1
- package/components/nested-donut/index.cjs +1 -1
- package/components/nested-donut/index.cjs.map +1 -1
- package/components/nested-donut/index.d.ts +12 -65
- package/components/nested-donut/index.js +26 -29
- package/components/nested-donut/index.js.map +1 -1
- package/components/plotband/index.cjs +1 -1
- package/components/plotband/index.cjs.map +1 -1
- package/components/plotband/index.d.ts +12 -63
- package/components/plotband/index.js +17 -18
- package/components/plotband/index.js.map +1 -1
- package/components/plotline/index.cjs +1 -1
- package/components/plotline/index.cjs.map +1 -1
- package/components/plotline/index.d.ts +12 -64
- package/components/plotline/index.js +18 -19
- package/components/plotline/index.js.map +1 -1
- package/components/radial-bar/index.cjs +2 -0
- package/components/radial-bar/index.cjs.map +1 -0
- package/components/radial-bar/index.d.ts +19 -0
- package/components/radial-bar/index.js +54 -0
- package/components/radial-bar/index.js.map +1 -0
- package/components/radial-bar/index2.cjs +2 -0
- package/components/radial-bar/index2.cjs.map +1 -0
- package/components/radial-bar/index2.js +7 -0
- package/components/radial-bar/index2.js.map +1 -0
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.d.ts +12 -106
- package/components/sankey/index.js +42 -41
- package/components/sankey/index.js.map +1 -1
- package/components/scatter/index.cjs +1 -1
- package/components/scatter/index.cjs.map +1 -1
- package/components/scatter/index.d.ts +12 -65
- package/components/scatter/index.js +33 -35
- package/components/scatter/index.js.map +1 -1
- package/components/stacked-bar/index.cjs +1 -1
- package/components/stacked-bar/index.cjs.map +1 -1
- package/components/stacked-bar/index.d.ts +12 -62
- package/components/stacked-bar/index.js +29 -29
- package/components/stacked-bar/index.js.map +1 -1
- package/components/timeline/index.cjs +1 -1
- package/components/timeline/index.cjs.map +1 -1
- package/components/timeline/index.d.ts +12 -88
- package/components/timeline/index.js +20 -24
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.cjs +1 -1
- package/components/tooltip/index.cjs.map +1 -1
- package/components/tooltip/index.d.ts +19 -99
- package/components/tooltip/index.js +15 -17
- package/components/tooltip/index.js.map +1 -1
- package/components/topojson-map/index.cjs +1 -1
- package/components/topojson-map/index.cjs.map +1 -1
- package/components/topojson-map/index.d.ts +12 -78
- package/components/topojson-map/index.js +66 -39
- package/components/topojson-map/index.js.map +1 -1
- package/components/treemap/index.cjs +1 -1
- package/components/treemap/index.cjs.map +1 -1
- package/components/treemap/index.d.ts +12 -69
- package/components/treemap/index.js +25 -26
- package/components/treemap/index.js.map +1 -1
- package/components/xy-labels/index.cjs +1 -1
- package/components/xy-labels/index.cjs.map +1 -1
- package/components/xy-labels/index.d.ts +12 -66
- package/components/xy-labels/index.js +36 -39
- package/components/xy-labels/index.js.map +1 -1
- package/components.d.ts +30 -27
- package/containers/single-container/index.cjs +1 -1
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.d.ts +11 -26
- package/containers/single-container/index.js +26 -26
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/index.cjs +1 -1
- package/containers/xy-container/index.cjs.map +1 -1
- package/containers/xy-container/index.d.ts +12 -45
- package/containers/xy-container/index.js +25 -30
- package/containers/xy-container/index.js.map +1 -1
- package/containers.d.ts +2 -2
- package/html-components/bullet-legend/index.cjs +1 -1
- package/html-components/bullet-legend/index.cjs.map +1 -1
- package/html-components/bullet-legend/index.d.ts +18 -74
- package/html-components/bullet-legend/index.js +24 -25
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/flow-legend/index.cjs +1 -1
- package/html-components/flow-legend/index.cjs.map +1 -1
- package/html-components/flow-legend/index.d.ts +19 -85
- package/html-components/flow-legend/index.js +21 -23
- package/html-components/flow-legend/index.js.map +1 -1
- package/html-components/leaflet-flow-map/index.cjs +1 -1
- package/html-components/leaflet-flow-map/index.cjs.map +1 -1
- package/html-components/leaflet-flow-map/index.d.ts +12 -112
- package/html-components/leaflet-flow-map/index.js +46 -48
- package/html-components/leaflet-flow-map/index.js.map +1 -1
- package/html-components/leaflet-map/index.cjs +1 -1
- package/html-components/leaflet-map/index.cjs.map +1 -1
- package/html-components/leaflet-map/index.d.ts +12 -99
- package/html-components/leaflet-map/index.js +37 -39
- package/html-components/leaflet-map/index.js.map +1 -1
- package/html-components/rolling-pin-legend/index.cjs +1 -1
- package/html-components/rolling-pin-legend/index.cjs.map +1 -1
- package/html-components/rolling-pin-legend/index.d.ts +18 -50
- package/html-components/rolling-pin-legend/index.js +22 -24
- package/html-components/rolling-pin-legend/index.js.map +1 -1
- package/index.cjs +2 -2
- package/index.js +101 -92
- package/index.js.map +1 -1
- package/package.json +14 -13
- package/utils/context.cjs.map +1 -1
- package/utils/context.d.ts +1 -0
- package/utils/context.js +1 -1
- package/utils/context.js.map +1 -1
- package/utils/props.cjs +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +2 -4
- package/utils/props.js +9 -9
- package/utils/props.js.map +1 -1
|
@@ -1,69 +1,19 @@
|
|
|
1
|
-
import { FreeBrush } from '@unovis/ts';
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
slots: any;
|
|
7
|
-
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
8
|
-
props: {
|
|
9
|
-
duration?: number;
|
|
10
|
-
events?: {
|
|
11
|
-
[selector: string]: {
|
|
12
|
-
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
13
|
-
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
14
|
-
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
15
|
-
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
16
|
-
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
17
|
-
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
18
|
-
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
19
|
-
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
-
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
-
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
-
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
-
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
-
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
-
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
-
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
-
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
-
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
-
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
-
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
-
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
-
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
attributes?: {
|
|
36
|
-
[selector: string]: {
|
|
37
|
-
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
38
|
-
};
|
|
39
|
-
};
|
|
1
|
+
import { FreeBrushConfigInterface, FreeBrush } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisFreeBrushSelectors: typeof import("@unovis/ts/components/free-brush/style");
|
|
4
|
+
declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (FreeBrushConfigInterface<Datum> & {
|
|
40
6
|
data?: Datum[];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
45
|
-
xScale?: import("@unovis/ts").ContinuousScale;
|
|
46
|
-
yScale?: import("@unovis/ts").ContinuousScale;
|
|
47
|
-
excludeFromDomainCalculation?: boolean;
|
|
48
|
-
onBrush?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
|
|
49
|
-
onBrushStart?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
|
|
50
|
-
onBrushMove?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
|
|
51
|
-
onBrushEnd?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
|
|
52
|
-
handleWidth?: number;
|
|
53
|
-
selection?: import("@unovis/ts").FreeBrushSelection;
|
|
54
|
-
selectionMinLength?: number | [number, number];
|
|
55
|
-
mode?: import("@unovis/ts").FreeBrushMode;
|
|
56
|
-
autoHide?: boolean;
|
|
57
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
58
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
59
|
-
component: import("vue").Ref<FreeBrush<Datum>, FreeBrush<Datum>>;
|
|
7
|
+
}), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
8
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
component: import('vue').Ref<FreeBrush<Datum>, FreeBrush<Datum>>;
|
|
60
10
|
}>): void;
|
|
61
11
|
attrs: any;
|
|
62
|
-
slots: {}
|
|
63
|
-
emit:
|
|
64
|
-
}>) => import(
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
65
15
|
[key: string]: any;
|
|
66
16
|
}> & {
|
|
67
|
-
__ctx?:
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
68
18
|
};
|
|
69
19
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { FreeBrush as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as p, inject as d, computed as m, ref as y, onMounted as v, nextTick as F, onUnmounted as h, watch as u, openBlock as f, createElementBlock as B } from "vue";
|
|
2
|
+
import { FreeBrush as s } from "@unovis/ts";
|
|
3
|
+
import { componentAccessorKey as x } from "../../utils/context.js";
|
|
4
|
+
import { useForwardProps as _, arePropsEqual as b } from "../../utils/props.js";
|
|
5
|
+
const S = { "data-vis-component": "" }, A = s.selectors, C = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
mode: {},
|
|
@@ -14,10 +14,11 @@ const g = { "data-vis-component": "" }, D = i.selectors, E = /* @__PURE__ */ d({
|
|
|
14
14
|
selection: {},
|
|
15
15
|
selectionMinLength: {},
|
|
16
16
|
autoHide: { type: Boolean },
|
|
17
|
-
x: {},
|
|
18
|
-
y: {},
|
|
17
|
+
x: { type: [Function, Number, null] },
|
|
18
|
+
y: { type: [Function, Number, null, Array] },
|
|
19
19
|
id: { type: Function },
|
|
20
|
-
color: {},
|
|
20
|
+
color: { type: [Function, String, Array, null] },
|
|
21
|
+
colorKeys: {},
|
|
21
22
|
xScale: { type: [Object, Function] },
|
|
22
23
|
yScale: { type: [Object, Function] },
|
|
23
24
|
excludeFromDomainCalculation: { type: Boolean },
|
|
@@ -26,29 +27,25 @@ const g = { "data-vis-component": "" }, D = i.selectors, E = /* @__PURE__ */ d({
|
|
|
26
27
|
attributes: {},
|
|
27
28
|
data: {}
|
|
28
29
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
t.value = new i(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
|
|
30
|
+
setup(i, { expose: l }) {
|
|
31
|
+
const a = i, t = d(x), o = m(() => t.data.value ?? a.data), n = _(a), e = y();
|
|
32
|
+
return v(() => {
|
|
33
|
+
F(() => {
|
|
34
|
+
e.value = new s(n.value), e.value?.setData(o.value), t.update(e.value);
|
|
35
35
|
});
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}), p({
|
|
46
|
-
component: t
|
|
47
|
-
}), (e, s) => (x(), B("div", g));
|
|
36
|
+
}), h(() => {
|
|
37
|
+
e.value?.destroy(), t.destroy();
|
|
38
|
+
}), u(n, (r, c) => {
|
|
39
|
+
b(r, c) || (e.value?.setConfig(n.value), e.value?.render());
|
|
40
|
+
}), u(o, () => {
|
|
41
|
+
e.value?.setData(o.value);
|
|
42
|
+
}), l({
|
|
43
|
+
component: e
|
|
44
|
+
}), (r, c) => (f(), B("div", S));
|
|
48
45
|
}
|
|
49
46
|
});
|
|
50
47
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
A as VisFreeBrushSelectors,
|
|
49
|
+
C as default
|
|
53
50
|
};
|
|
54
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/free-brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/free-brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { FreeBrushConfigInterface } from '@unovis/ts'\nimport { FreeBrush } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = FreeBrushConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<FreeBrush<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new FreeBrush<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisFreeBrushSelectors = FreeBrush.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisFreeBrushSelectors","FreeBrush","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAwBC,EAAU;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C/C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAiBQ,EAAO,KAAK,GACnDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),c=require("@unovis/ts"),y=require("../../utils/context.cjs"),r=require("../../utils/props.cjs"),F={"data-vis-component":""},s=c.Graph.selectors,S=n.defineComponent({__name:"index",props:{zoomScaleExtent:{},disableZoom:{type:Boolean},zoomEventFilter:{type:Function},disableDrag:{type:Boolean},disableBrush:{type:Boolean},zoomThrottledUpdateNodeThreshold:{},fitViewPadding:{},fitViewAlign:{},layoutType:{},layoutAutofit:{type:Boolean},layoutAutofitTolerance:{},layoutNonConnectedAside:{type:Boolean},layoutNodeGroup:{type:[Function,String,null]},layoutGroupOrder:{},layoutParallelNodesPerColumn:{},layoutParallelNodeSubGroup:{type:[Function,String,null]},layoutParallelSubGroupsPerRow:{},layoutParallelNodeSpacing:{},layoutParallelSubGroupSpacing:{},layoutParallelGroupSpacing:{},layoutParallelSortConnectionsByGroup:{},forceLayoutSettings:{},dagreLayoutSettings:{},layoutElkSettings:{type:[Function,null]},layoutElkNodeGroups:{},layoutElkGetNodeShape:{type:Function},linkWidth:{type:[Function,Number,null]},linkStyle:{type:[Function,null]},linkBandWidth:{type:[Function,Number,null]},linkArrow:{type:[Function,String,Boolean,null]},linkStroke:{type:[Function,String,Array,null]},linkDisabled:{type:[Function,Boolean,null]},linkFlow:{type:[Function,Boolean,null]},linkFlowAnimDuration:{type:[Function,Number,null]},linkFlowParticleSize:{type:[Function,Number,null]},linkFlowParticleSpeed:{type:[Function,Number,null]},linkLabel:{type:[Function,Array,null]},linkLabelShiftFromCenter:{type:[Function,Boolean,null]},linkNeighborSpacing:{},linkCurvature:{type:[Function,Number,null]},linkHighlightOnHover:{type:Boolean},linkSourcePointOffset:{type:[Function,Array,null]},linkTargetPointOffset:{type:[Function,Array,null]},selectedLinkId:{},nodeSize:{type:[Function,Number,null]},nodeStrokeWidth:{type:[Function,Number,null]},nodeShape:{type:[Function,String,null]},nodeGaugeValue:{type:[Function,Number,null]},nodeGaugeFill:{type:[Function,String,Array,null]},nodeGaugeAnimDuration:{},nodeIcon:{type:[Function,String,null]},nodeIconSize:{type:[Function,Number,null]},nodeLabel:{type:[Function,String,null]},nodeLabelTrim:{type:[Function,Boolean,null]},nodeLabelTrimMode:{type:[Function,String,null]},nodeLabelTrimLength:{type:[Function,Number,null]},nodeLabelFitMode:{type:[Function,String,null]},nodeLabelWidth:{type:[Function,Number,null]},nodeLabelSeparator:{},nodeLabelForceWordBreak:{type:Boolean},nodeSubLabel:{type:[Function,String,null]},nodeSubLabelTrim:{type:[Function,Boolean,null]},nodeSubLabelTrimMode:{type:[Function,String,null]},nodeSubLabelTrimLength:{type:[Function,Number,null]},nodeSubLabelFitMode:{type:[Function,String,null]},nodeSubLabelWidth:{type:[Function,Number,null]},nodeSubLabelSeparator:{},nodeSubLabelForceWordBreak:{type:Boolean},nodeSideLabels:{type:[Function,Array,null]},nodeBottomIcon:{type:[Function,String,null]},nodeDisabled:{type:[Function,Boolean,null]},nodeFill:{type:[Function,String,Array,null]},nodeStroke:{type:[Function,String,Array,null]},nodeSort:{type:Function},nodeEnterPosition:{type:[Function,Array,null]},nodeEnterScale:{type:[Function,Number,null]},nodeExitPosition:{type:[Function,Array,null]},nodeExitScale:{type:[Function,Number,null]},nodeEnterCustomRenderFunction:{type:Function},nodeUpdateCustomRenderFunction:{type:Function},nodePartialUpdateCustomRenderFunction:{type:Function},nodeExitCustomRenderFunction:{type:Function},nodeOnZoomCustomRenderFunction:{type:Function},nodeSelectionHighlightMode:{},selectedNodeId:{},selectedNodeIds:{},panels:{},onNodeDragStart:{type:Function},onNodeDrag:{type:Function},onNodeDragEnd:{type:Function},onZoom:{type:Function},onZoomStart:{type:Function},onZoomEnd:{type:Function},onLayoutCalculated:{type:Function},onNodeSelectionBrush:{type:Function},onNodeSelectionDrag:{type:Function},onRenderComplete:{type:Function},shouldDataUpdate:{type:Function},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const u=d,t=n.inject(y.componentAccessorKey),o=n.computed(()=>t.data.value??u.data),l=r.useForwardProps(u),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{e.value=new c.Graph(l.value),e.value?.setData(o.value),t.update(e.value)})}),n.onUnmounted(()=>{e.value?.destroy(),t.destroy()}),n.watch(l,(i,a)=>{r.arePropsEqual(i,a)||(e.value?.setConfig(l.value),e.value?.render())}),n.watch(o,()=>{e.value?.setData(o.value)}),p({component:e}),(i,a)=>(n.openBlock(),n.createElementBlock("div",F))}});exports.VisGraphSelectors=s;exports.default=S;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode,L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport {
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode, L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { GraphConfigInterface, GraphInputLink, GraphInputNode } from '@unovis/ts'\nimport { Graph } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: { nodes: N[], links?: L[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = GraphConfigInterface<N, L>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Graph<N, L>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Graph<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisGraphSelectors = Graph.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisGraphSelectors","Graph","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAoBC,EAAAA,MAAM,gsHA3CvC,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,QAAYQ,EAAO,KAAK,EAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphConfigInterface, GraphInputLink, GraphInputNode, Graph } from '@unovis/ts';
|
|
2
|
+
|
|
2
3
|
export declare const VisGraphSelectors: {
|
|
3
4
|
root: string;
|
|
4
5
|
graphGroup: string;
|
|
@@ -22,147 +23,22 @@ export declare const VisGraphSelectors: {
|
|
|
22
23
|
panelSideIconShape: string;
|
|
23
24
|
panelSideIconSymbol: string;
|
|
24
25
|
};
|
|
25
|
-
declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__VLS_props:
|
|
26
|
-
|
|
27
|
-
emit: any;
|
|
28
|
-
slots: any;
|
|
29
|
-
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
30
|
-
props: {
|
|
31
|
-
duration?: number;
|
|
32
|
-
events?: {
|
|
33
|
-
[selector: string]: {
|
|
34
|
-
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
35
|
-
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
36
|
-
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
37
|
-
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
38
|
-
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
39
|
-
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
40
|
-
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
41
|
-
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
42
|
-
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
43
|
-
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
44
|
-
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
45
|
-
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
46
|
-
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
47
|
-
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
48
|
-
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
49
|
-
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
50
|
-
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
51
|
-
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
52
|
-
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
53
|
-
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
54
|
-
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
attributes?: {
|
|
58
|
-
[selector: string]: {
|
|
59
|
-
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
60
|
-
};
|
|
61
|
-
};
|
|
26
|
+
declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
27
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (GraphConfigInterface<N, L> & {
|
|
62
28
|
data?: {
|
|
63
29
|
nodes: N[];
|
|
64
30
|
links?: L[];
|
|
65
31
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
zoomEventFilter?: (event: PointerEvent) => boolean;
|
|
70
|
-
disableDrag?: boolean;
|
|
71
|
-
disableBrush?: boolean;
|
|
72
|
-
zoomThrottledUpdateNodeThreshold?: number;
|
|
73
|
-
fitViewPadding?: number | import("@unovis/ts").Spacing;
|
|
74
|
-
fitViewAlign?: import("@unovis/ts").GraphFitViewAlignment;
|
|
75
|
-
layoutType?: string;
|
|
76
|
-
layoutAutofit?: boolean;
|
|
77
|
-
layoutAutofitTolerance?: number;
|
|
78
|
-
layoutNonConnectedAside?: boolean;
|
|
79
|
-
layoutNodeGroup?: import("@unovis/ts").StringAccessor<N>;
|
|
80
|
-
layoutGroupOrder?: string[];
|
|
81
|
-
layoutParallelNodesPerColumn?: number;
|
|
82
|
-
layoutParallelNodeSubGroup?: import("@unovis/ts").StringAccessor<N>;
|
|
83
|
-
layoutParallelSubGroupsPerRow?: number;
|
|
84
|
-
layoutParallelNodeSpacing?: number | [number, number];
|
|
85
|
-
layoutParallelSubGroupSpacing?: number;
|
|
86
|
-
layoutParallelGroupSpacing?: number;
|
|
87
|
-
layoutParallelSortConnectionsByGroup?: string;
|
|
88
|
-
forceLayoutSettings?: import("@unovis/ts").GraphForceLayoutSettings<N, L>;
|
|
89
|
-
dagreLayoutSettings?: import("@unovis/ts").GraphDagreLayoutSetting;
|
|
90
|
-
layoutElkSettings?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphElkLayoutSettings, string>;
|
|
91
|
-
layoutElkNodeGroups?: import("@unovis/ts").StringAccessor<N>[];
|
|
92
|
-
layoutElkGetNodeShape?: (d: import("@unovis/ts").GraphNode<N, L>, i: number) => import("elkjs").ElkShape;
|
|
93
|
-
linkWidth?: import("@unovis/ts").NumericAccessor<L>;
|
|
94
|
-
linkStyle?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphLinkStyle, L>;
|
|
95
|
-
linkBandWidth?: import("@unovis/ts").NumericAccessor<L>;
|
|
96
|
-
linkArrow?: import("@unovis/ts").GenericAccessor<string | boolean, L>;
|
|
97
|
-
linkStroke?: import("@unovis/ts").ColorAccessor<L>;
|
|
98
|
-
linkDisabled?: import("@unovis/ts").BooleanAccessor<L>;
|
|
99
|
-
linkFlow?: import("@unovis/ts").BooleanAccessor<L>;
|
|
100
|
-
linkFlowAnimDuration?: import("@unovis/ts").NumericAccessor<L>;
|
|
101
|
-
linkFlowParticleSize?: import("@unovis/ts").NumericAccessor<L>;
|
|
102
|
-
linkFlowParticleSpeed?: import("@unovis/ts").NumericAccessor<L>;
|
|
103
|
-
linkLabel?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphCircleLabel | import("@unovis/ts").GraphCircleLabel[], L>;
|
|
104
|
-
linkLabelShiftFromCenter?: import("@unovis/ts").BooleanAccessor<L>;
|
|
105
|
-
linkNeighborSpacing?: number;
|
|
106
|
-
linkCurvature?: import("@unovis/ts").NumericAccessor<L>;
|
|
107
|
-
linkHighlightOnHover?: boolean;
|
|
108
|
-
linkSourcePointOffset?: import("@unovis/ts").GenericAccessor<[number, number], import("@unovis/ts").GraphLink<N, L>>;
|
|
109
|
-
linkTargetPointOffset?: import("@unovis/ts").GenericAccessor<[number, number], import("@unovis/ts").GraphLink<N, L>>;
|
|
110
|
-
selectedLinkId?: string | number;
|
|
111
|
-
nodeSize?: import("@unovis/ts").NumericAccessor<N>;
|
|
112
|
-
nodeStrokeWidth?: import("@unovis/ts").NumericAccessor<N>;
|
|
113
|
-
nodeShape?: import("@unovis/ts").GenericAccessor<string, N>;
|
|
114
|
-
nodeGaugeValue?: import("@unovis/ts").NumericAccessor<N>;
|
|
115
|
-
nodeGaugeFill?: import("@unovis/ts").ColorAccessor<N>;
|
|
116
|
-
nodeGaugeAnimDuration?: number;
|
|
117
|
-
nodeIcon?: import("@unovis/ts").StringAccessor<N>;
|
|
118
|
-
nodeIconSize?: import("@unovis/ts").NumericAccessor<N>;
|
|
119
|
-
nodeLabelTrim?: import("@unovis/ts").BooleanAccessor<N>;
|
|
120
|
-
nodeLabelTrimMode?: import("@unovis/ts").GenericAccessor<string, N>;
|
|
121
|
-
nodeLabelTrimLength?: import("@unovis/ts").NumericAccessor<N>;
|
|
122
|
-
nodeSubLabel?: import("@unovis/ts").StringAccessor<N>;
|
|
123
|
-
nodeSubLabelTrim?: import("@unovis/ts").BooleanAccessor<N>;
|
|
124
|
-
nodeSubLabelTrimMode?: import("@unovis/ts").GenericAccessor<string, N>;
|
|
125
|
-
nodeSubLabelTrimLength?: import("@unovis/ts").NumericAccessor<N>;
|
|
126
|
-
nodeSideLabels?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphCircleLabel[], N>;
|
|
127
|
-
nodeBottomIcon?: import("@unovis/ts").StringAccessor<N>;
|
|
128
|
-
nodeDisabled?: import("@unovis/ts").BooleanAccessor<N>;
|
|
129
|
-
nodeFill?: import("@unovis/ts").ColorAccessor<N>;
|
|
130
|
-
nodeStroke?: import("@unovis/ts").ColorAccessor<N>;
|
|
131
|
-
nodeSort?: (a: N, b: N) => number;
|
|
132
|
-
nodeEnterPosition?: import("@unovis/ts").GenericAccessor<[number, number], N>;
|
|
133
|
-
nodeEnterScale?: import("@unovis/ts").NumericAccessor<N>;
|
|
134
|
-
nodeExitPosition?: import("@unovis/ts").GenericAccessor<[number, number], N>;
|
|
135
|
-
nodeExitScale?: import("@unovis/ts").NumericAccessor<N>;
|
|
136
|
-
nodeEnterCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;
|
|
137
|
-
nodeUpdateCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;
|
|
138
|
-
nodePartialUpdateCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;
|
|
139
|
-
nodeExitCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;
|
|
140
|
-
nodeOnZoomCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, zoomLevel: number) => void;
|
|
141
|
-
nodeSelectionHighlightMode?: import("@unovis/ts").GraphNodeSelectionHighlightMode;
|
|
142
|
-
selectedNodeId?: string | number;
|
|
143
|
-
selectedNodeIds?: string[] | number[];
|
|
144
|
-
panels?: import("@unovis/ts").GraphPanelConfig[];
|
|
145
|
-
onNodeDragStart?: (n: import("@unovis/ts").GraphNode<N, L>, event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
|
|
146
|
-
onNodeDrag?: (n: import("@unovis/ts").GraphNode<N, L>, event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
|
|
147
|
-
onNodeDragEnd?: (n: import("@unovis/ts").GraphNode<N, L>, event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
|
|
148
|
-
onZoom?: (zoomScale: number, zoomScaleExtent: [number, number], event: import("d3-zoom").D3ZoomEvent<SVGGElement, unknown>, transform: import("d3-zoom").ZoomTransform) => void;
|
|
149
|
-
onZoomStart?: (zoomScale: number, zoomScaleExtent: [number, number], event: import("d3-zoom").D3ZoomEvent<SVGGElement, unknown>, transform: import("d3-zoom").ZoomTransform) => void;
|
|
150
|
-
onZoomEnd?: (zoomScale: number, zoomScaleExtent: [number, number], event: import("d3-zoom").D3ZoomEvent<SVGGElement, unknown>, transform: import("d3-zoom").ZoomTransform) => void;
|
|
151
|
-
onLayoutCalculated?: (nodes: import("@unovis/ts").GraphNode<N, L>[], links: import("@unovis/ts").GraphLink<N, L>[]) => void;
|
|
152
|
-
onNodeSelectionBrush?: (selectedNodes: import("@unovis/ts").GraphNode<N, L>[], event: import("d3-brush").D3BrushEvent<SVGGElement>) => void;
|
|
153
|
-
onNodeSelectionDrag?: (selectedNodes: import("@unovis/ts").GraphNode<N, L>[], event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
|
|
154
|
-
onRenderComplete?: (g: import("d3-selection").Selection<SVGGElement, unknown, null, undefined>, nodes: import("@unovis/ts").GraphNode<N, L>[], links: import("@unovis/ts").GraphLink<N, L>[], config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number, width: number, height: number) => void;
|
|
155
|
-
shouldDataUpdate?: (prevData: import("@unovis/ts").GraphInputData<N, L>, nextData: import("@unovis/ts").GraphInputData<N, L>, datamodel: import("@unovis/ts").GraphDataModel<N, L, import("@unovis/ts").GraphNode<N, L>, import("@unovis/ts").GraphLink<N, L>>) => boolean;
|
|
156
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
157
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
158
|
-
component: import("vue").Ref<Graph<N, L>, Graph<N, L>>;
|
|
32
|
+
}), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
33
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
34
|
+
component: import('vue').Ref<Graph<N, L>, Graph<N, L>>;
|
|
159
35
|
}>): void;
|
|
160
36
|
attrs: any;
|
|
161
|
-
slots: {}
|
|
162
|
-
emit:
|
|
163
|
-
}>) => import(
|
|
37
|
+
slots: ReturnType<() => {}>;
|
|
38
|
+
emit: typeof __VLS_emit;
|
|
39
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
164
40
|
[key: string]: any;
|
|
165
41
|
}> & {
|
|
166
|
-
__ctx?:
|
|
42
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
167
43
|
};
|
|
168
44
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, inject as y, computed as F, ref as s, onMounted as S, nextTick as m, onUnmounted as b, watch as a, openBlock as g, createElementBlock as N } from "vue";
|
|
2
2
|
import { Graph as r } from "@unovis/ts";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
3
|
+
import { componentAccessorKey as k } from "../../utils/context.js";
|
|
4
|
+
import { useForwardProps as h, arePropsEqual as L } from "../../utils/props.js";
|
|
5
|
+
const B = { "data-vis-component": "" }, E = r.selectors, C = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
zoomScaleExtent: {},
|
|
@@ -17,10 +17,10 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
|
|
|
17
17
|
layoutAutofit: { type: Boolean },
|
|
18
18
|
layoutAutofitTolerance: {},
|
|
19
19
|
layoutNonConnectedAside: { type: Boolean },
|
|
20
|
-
layoutNodeGroup: {},
|
|
20
|
+
layoutNodeGroup: { type: [Function, String, null] },
|
|
21
21
|
layoutGroupOrder: {},
|
|
22
22
|
layoutParallelNodesPerColumn: {},
|
|
23
|
-
layoutParallelNodeSubGroup: {},
|
|
23
|
+
layoutParallelNodeSubGroup: { type: [Function, String, null] },
|
|
24
24
|
layoutParallelSubGroupsPerRow: {},
|
|
25
25
|
layoutParallelNodeSpacing: {},
|
|
26
26
|
layoutParallelSubGroupSpacing: {},
|
|
@@ -28,53 +28,61 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
|
|
|
28
28
|
layoutParallelSortConnectionsByGroup: {},
|
|
29
29
|
forceLayoutSettings: {},
|
|
30
30
|
dagreLayoutSettings: {},
|
|
31
|
-
layoutElkSettings: {},
|
|
31
|
+
layoutElkSettings: { type: [Function, null] },
|
|
32
32
|
layoutElkNodeGroups: {},
|
|
33
33
|
layoutElkGetNodeShape: { type: Function },
|
|
34
|
-
linkWidth: {},
|
|
35
|
-
linkStyle: {},
|
|
36
|
-
linkBandWidth: {},
|
|
37
|
-
linkArrow: {},
|
|
38
|
-
linkStroke: {},
|
|
39
|
-
linkDisabled: {},
|
|
40
|
-
linkFlow: {},
|
|
41
|
-
linkFlowAnimDuration: {},
|
|
42
|
-
linkFlowParticleSize: {},
|
|
43
|
-
linkFlowParticleSpeed: {},
|
|
44
|
-
linkLabel: {},
|
|
45
|
-
linkLabelShiftFromCenter: {},
|
|
34
|
+
linkWidth: { type: [Function, Number, null] },
|
|
35
|
+
linkStyle: { type: [Function, null] },
|
|
36
|
+
linkBandWidth: { type: [Function, Number, null] },
|
|
37
|
+
linkArrow: { type: [Function, String, Boolean, null] },
|
|
38
|
+
linkStroke: { type: [Function, String, Array, null] },
|
|
39
|
+
linkDisabled: { type: [Function, Boolean, null] },
|
|
40
|
+
linkFlow: { type: [Function, Boolean, null] },
|
|
41
|
+
linkFlowAnimDuration: { type: [Function, Number, null] },
|
|
42
|
+
linkFlowParticleSize: { type: [Function, Number, null] },
|
|
43
|
+
linkFlowParticleSpeed: { type: [Function, Number, null] },
|
|
44
|
+
linkLabel: { type: [Function, Array, null] },
|
|
45
|
+
linkLabelShiftFromCenter: { type: [Function, Boolean, null] },
|
|
46
46
|
linkNeighborSpacing: {},
|
|
47
|
-
linkCurvature: {},
|
|
47
|
+
linkCurvature: { type: [Function, Number, null] },
|
|
48
48
|
linkHighlightOnHover: { type: Boolean },
|
|
49
|
-
linkSourcePointOffset: {},
|
|
50
|
-
linkTargetPointOffset: {},
|
|
49
|
+
linkSourcePointOffset: { type: [Function, Array, null] },
|
|
50
|
+
linkTargetPointOffset: { type: [Function, Array, null] },
|
|
51
51
|
selectedLinkId: {},
|
|
52
|
-
nodeSize: {},
|
|
53
|
-
nodeStrokeWidth: {},
|
|
54
|
-
nodeShape: {},
|
|
55
|
-
nodeGaugeValue: {},
|
|
56
|
-
nodeGaugeFill: {},
|
|
52
|
+
nodeSize: { type: [Function, Number, null] },
|
|
53
|
+
nodeStrokeWidth: { type: [Function, Number, null] },
|
|
54
|
+
nodeShape: { type: [Function, String, null] },
|
|
55
|
+
nodeGaugeValue: { type: [Function, Number, null] },
|
|
56
|
+
nodeGaugeFill: { type: [Function, String, Array, null] },
|
|
57
57
|
nodeGaugeAnimDuration: {},
|
|
58
|
-
nodeIcon: {},
|
|
59
|
-
nodeIconSize: {},
|
|
60
|
-
nodeLabel: {},
|
|
61
|
-
nodeLabelTrim: {},
|
|
62
|
-
nodeLabelTrimMode: {},
|
|
63
|
-
nodeLabelTrimLength: {},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
nodeIcon: { type: [Function, String, null] },
|
|
59
|
+
nodeIconSize: { type: [Function, Number, null] },
|
|
60
|
+
nodeLabel: { type: [Function, String, null] },
|
|
61
|
+
nodeLabelTrim: { type: [Function, Boolean, null] },
|
|
62
|
+
nodeLabelTrimMode: { type: [Function, String, null] },
|
|
63
|
+
nodeLabelTrimLength: { type: [Function, Number, null] },
|
|
64
|
+
nodeLabelFitMode: { type: [Function, String, null] },
|
|
65
|
+
nodeLabelWidth: { type: [Function, Number, null] },
|
|
66
|
+
nodeLabelSeparator: {},
|
|
67
|
+
nodeLabelForceWordBreak: { type: Boolean },
|
|
68
|
+
nodeSubLabel: { type: [Function, String, null] },
|
|
69
|
+
nodeSubLabelTrim: { type: [Function, Boolean, null] },
|
|
70
|
+
nodeSubLabelTrimMode: { type: [Function, String, null] },
|
|
71
|
+
nodeSubLabelTrimLength: { type: [Function, Number, null] },
|
|
72
|
+
nodeSubLabelFitMode: { type: [Function, String, null] },
|
|
73
|
+
nodeSubLabelWidth: { type: [Function, Number, null] },
|
|
74
|
+
nodeSubLabelSeparator: {},
|
|
75
|
+
nodeSubLabelForceWordBreak: { type: Boolean },
|
|
76
|
+
nodeSideLabels: { type: [Function, Array, null] },
|
|
77
|
+
nodeBottomIcon: { type: [Function, String, null] },
|
|
78
|
+
nodeDisabled: { type: [Function, Boolean, null] },
|
|
79
|
+
nodeFill: { type: [Function, String, Array, null] },
|
|
80
|
+
nodeStroke: { type: [Function, String, Array, null] },
|
|
73
81
|
nodeSort: { type: Function },
|
|
74
|
-
nodeEnterPosition: {},
|
|
75
|
-
nodeEnterScale: {},
|
|
76
|
-
nodeExitPosition: {},
|
|
77
|
-
nodeExitScale: {},
|
|
82
|
+
nodeEnterPosition: { type: [Function, Array, null] },
|
|
83
|
+
nodeEnterScale: { type: [Function, Number, null] },
|
|
84
|
+
nodeExitPosition: { type: [Function, Array, null] },
|
|
85
|
+
nodeExitScale: { type: [Function, Number, null] },
|
|
78
86
|
nodeEnterCustomRenderFunction: { type: Function },
|
|
79
87
|
nodeUpdateCustomRenderFunction: { type: Function },
|
|
80
88
|
nodePartialUpdateCustomRenderFunction: { type: Function },
|
|
@@ -100,29 +108,25 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
|
|
|
100
108
|
attributes: {},
|
|
101
109
|
data: {}
|
|
102
110
|
},
|
|
103
|
-
setup(c, { expose:
|
|
104
|
-
const
|
|
105
|
-
return
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
o.value = new r(a.value), (e = o.value) == null || e.setData(t.value), n.update(o.value);
|
|
111
|
+
setup(c, { expose: d }) {
|
|
112
|
+
const l = c, e = y(k), o = F(() => e.data.value ?? l.data), t = h(l), n = s();
|
|
113
|
+
return S(() => {
|
|
114
|
+
m(() => {
|
|
115
|
+
n.value = new r(t.value), n.value?.setData(o.value), e.update(n.value);
|
|
109
116
|
});
|
|
110
|
-
}),
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}), p({
|
|
120
|
-
component: o
|
|
121
|
-
}), (e, i) => (h(), b("div", L));
|
|
117
|
+
}), b(() => {
|
|
118
|
+
n.value?.destroy(), e.destroy();
|
|
119
|
+
}), a(t, (u, i) => {
|
|
120
|
+
L(u, i) || (n.value?.setConfig(t.value), n.value?.render());
|
|
121
|
+
}), a(o, () => {
|
|
122
|
+
n.value?.setData(o.value);
|
|
123
|
+
}), d({
|
|
124
|
+
component: n
|
|
125
|
+
}), (u, i) => (g(), N("div", B));
|
|
122
126
|
}
|
|
123
127
|
});
|
|
124
128
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
129
|
+
E as VisGraphSelectors,
|
|
130
|
+
C as default
|
|
127
131
|
};
|
|
128
132
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode,L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode, L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { GraphConfigInterface, GraphInputLink, GraphInputNode } from '@unovis/ts'\nimport { Graph } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: { nodes: N[], links?: L[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = GraphConfigInterface<N, L>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Graph<N, L>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Graph<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisGraphSelectors = Graph.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisGraphSelectors","Graph","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CvC,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,GAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@unovis/ts"),d=require("../../utils/context.cjs"),s=require("../../utils/props.cjs"),y={"data-vis-component":""},v=l.GroupedBar.selectors,m=e.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},barStyle:{type:[Function,null]},groupWidth:{},groupMaxWidth:{},dataStep:{},groupPadding:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},barMinHeight:{},cursor:{type:[Function,String,null]},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:p}){const a=i,o=e.inject(d.componentAccessorKey),n=e.computed(()=>o.data.value??a.data),r=s.useForwardProps(a),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new l.GroupedBar(r.value),t.value?.setData(n.value),o.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),o.destroy()}),e.watch(r,(u,c)=>{s.arePropsEqual(u,c)||(t.value?.setConfig(r.value),t.value?.render())}),e.watch(n,()=>{t.value?.setData(n.value)}),p({component:t}),(u,c)=>(e.openBlock(),e.createElementBlock("div",y))}});exports.VisGroupedBarSelectors=v;exports.default=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|