@unovis/vue 1.5.0 → 1.5.1-exf.10
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/components/axis/index.d.ts +1 -1
- package/components/donut/index.cjs +1 -1
- package/components/donut/index.cjs.map +1 -1
- package/components/donut/index.d.ts +2 -0
- package/components/donut/index.js +16 -14
- package/components/donut/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 +6 -1
- package/components/graph/index.js +14 -10
- package/components/graph/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -57,7 +57,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
57
57
|
domainLine?: boolean;
|
|
58
58
|
minMaxTicksOnly?: boolean;
|
|
59
59
|
minMaxTicksOnlyWhenWidthIsLess?: number;
|
|
60
|
-
tickFormat?: (tick: number
|
|
60
|
+
tickFormat?: ((tick: number, i: number, ticks: number[]) => string) | ((tick: Date, i: number, ticks: Date[]) => string);
|
|
61
61
|
tickValues?: number[];
|
|
62
62
|
numTicks?: number;
|
|
63
63
|
tickTextFitMode?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),i=require("@unovis/ts"),l=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),g={"data-vis-component":""},m=i.Donut.selectors,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),i=require("@unovis/ts"),l=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),g={"data-vis-component":""},m=i.Donut.selectors,f=t.defineComponent({__name:"index",props:{id:{type:Function},value:{},angleRange:{},padAngle:{},sortFunction:{type:Function},cornerRadius:{},color:{},radius:{},arcWidth:{},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},showEmptySegments:{type:Boolean},emptySegmentAngle:{},showBackground:{type:Boolean},backgroundAngleRange:{},centralLabelOffsetX:{},centralLabelOffsetY:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const n=t.inject(v.componentAccessorKey),c=d,a=t.computed(()=>n.data.value??c.data),s=l.useForwardProps(c),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new i.Donut(s.value),(e=o.value)==null||e.setData(a.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(s,(e,r)=>{var u;l.arePropsEqual(e,r)||(u=o.value)==null||u.setConfig(s.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",g))}});exports.VisDonutSelectors=m;exports.default=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/donut/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = DonutConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<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 }\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 VisDonutSelectors = Donut.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisDonutSelectors","Donut","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/donut/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = DonutConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<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 }\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 VisDonutSelectors = Donut.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisDonutSelectors","Donut","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,wdA3CjC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAkB,EAGpCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,QAAaQ,EAAO,KAAK,GACrCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
|
|
@@ -54,6 +54,8 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
54
54
|
emptySegmentAngle?: number;
|
|
55
55
|
showBackground?: boolean;
|
|
56
56
|
backgroundAngleRange?: [number, number];
|
|
57
|
+
centralLabelOffsetX?: number;
|
|
58
|
+
centralLabelOffsetY?: number;
|
|
57
59
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
58
60
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
59
61
|
component: import("vue").Ref<Donut<Datum>, Donut<Datum>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as i, inject as m, computed as
|
|
2
|
-
import { Donut as
|
|
1
|
+
import { defineComponent as i, inject as m, computed as f, ref as v, onMounted as g, nextTick as y, onUnmounted as b, watch as l, openBlock as _, createElementBlock as h } from "vue";
|
|
2
|
+
import { Donut as u } from "@unovis/ts";
|
|
3
3
|
import { useForwardProps as B, arePropsEqual as k } from "../../utils/props.js";
|
|
4
4
|
import { componentAccessorKey as w } from "../../utils/context.js";
|
|
5
|
-
const x = { "data-vis-component": "" },
|
|
5
|
+
const x = { "data-vis-component": "" }, F = u.selectors, E = /* @__PURE__ */ i({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
id: { type: Function },
|
|
@@ -21,34 +21,36 @@ const x = { "data-vis-component": "" }, E = l.selectors, L = /* @__PURE__ */ i({
|
|
|
21
21
|
emptySegmentAngle: {},
|
|
22
22
|
showBackground: { type: Boolean },
|
|
23
23
|
backgroundAngleRange: {},
|
|
24
|
+
centralLabelOffsetX: {},
|
|
25
|
+
centralLabelOffsetY: {},
|
|
24
26
|
duration: {},
|
|
25
27
|
events: {},
|
|
26
28
|
attributes: {},
|
|
27
29
|
data: {}
|
|
28
30
|
},
|
|
29
31
|
setup(p, { expose: d }) {
|
|
30
|
-
const o = m(w), r = p,
|
|
31
|
-
return
|
|
32
|
+
const o = m(w), r = p, a = f(() => o.data.value ?? r.data), n = B(r), t = v();
|
|
33
|
+
return g(() => {
|
|
32
34
|
y(() => {
|
|
33
35
|
var e;
|
|
34
|
-
t.value = new
|
|
36
|
+
t.value = new u(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
|
|
35
37
|
});
|
|
36
|
-
}),
|
|
38
|
+
}), b(() => {
|
|
37
39
|
var e;
|
|
38
40
|
(e = t.value) == null || e.destroy(), o.destroy();
|
|
39
|
-
}),
|
|
41
|
+
}), l(n, (e, c) => {
|
|
40
42
|
var s;
|
|
41
|
-
k(e, c) || (s = t.value) == null || s.setConfig(
|
|
42
|
-
}),
|
|
43
|
+
k(e, c) || (s = t.value) == null || s.setConfig(n.value);
|
|
44
|
+
}), l(a, () => {
|
|
43
45
|
var e;
|
|
44
|
-
(e = t.value) == null || e.setData(
|
|
46
|
+
(e = t.value) == null || e.setData(a.value);
|
|
45
47
|
}), d({
|
|
46
48
|
component: t
|
|
47
|
-
}), (e, c) => (
|
|
49
|
+
}), (e, c) => (_(), h("div", x));
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
52
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
F as VisDonutSelectors,
|
|
54
|
+
E as default
|
|
53
55
|
};
|
|
54
56
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/donut/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = DonutConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<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 }\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 VisDonutSelectors = Donut.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisDonutSelectors","Donut","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAoBC,EAAM
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/donut/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = DonutConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<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 }\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 VisDonutSelectors = Donut.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisDonutSelectors","Donut","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CjC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAkB;AAGpC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAaQ,EAAO,KAAK,IACrCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),c=require("@unovis/ts"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),c=require("@unovis/ts"),d=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),S={"data-vis-component":""},m=c.Graph.selectors,F=o.defineComponent({__name:"index",props:{zoomScaleExtent:{},disableZoom:{type:Boolean},zoomEventFilter:{type:Function},disableDrag:{type:Boolean},disableBrush:{type:Boolean},zoomThrottledUpdateNodeThreshold:{},layoutType:{},layoutAutofit:{type:Boolean},layoutAutofitTolerance:{},layoutNonConnectedAside:{type:Boolean},layoutNodeGroup:{},layoutGroupOrder:{},layoutParallelNodesPerColumn:{},layoutParallelNodeSubGroup:{},layoutParallelSubGroupsPerRow:{},layoutParallelGroupSpacing:{},layoutParallelSortConnectionsByGroup:{},forceLayoutSettings:{},dagreLayoutSettings:{},layoutElkSettings:{},layoutElkNodeGroups:{},linkWidth:{},linkStyle:{},linkBandWidth:{},linkArrow:{},linkStroke:{},linkDisabled:{},linkFlow:{},linkFlowAnimDuration:{},linkFlowParticleSize:{},linkLabel:{},linkLabelShiftFromCenter:{},linkNeighborSpacing:{},linkCurvature:{},linkHighlightOnHover:{type:Boolean},linkSourcePointOffset:{},linkTargetPointOffset:{},selectedLinkId:{},nodeSize:{},nodeStrokeWidth:{},nodeShape:{},nodeGaugeValue:{},nodeGaugeFill:{},nodeGaugeAnimDuration:{},nodeIcon:{},nodeIconSize:{},nodeLabel:{},nodeLabelTrim:{},nodeLabelTrimMode:{},nodeLabelTrimLength:{},nodeSubLabel:{},nodeSubLabelTrim:{},nodeSubLabelTrimMode:{},nodeSubLabelTrimLength:{},nodeSideLabels:{},nodeBottomIcon:{},nodeDisabled:{},nodeFill:{},nodeStroke:{},nodeSort:{type:Function},nodeEnterPosition:{},nodeEnterScale:{},nodeExitPosition:{},nodeExitScale:{},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(s,{expose:p}){const t=o.inject(y.componentAccessorKey),i=s,a=o.computed(()=>t.data.value??i.data),l=d.useForwardProps(i),n=o.ref();return o.onMounted(()=>{o.nextTick(()=>{var e;n.value=new c.Graph(l.value),(e=n.value)==null||e.setData(a.value),t.update(n.value)})}),o.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),t.destroy()}),o.watch(l,(e,u)=>{var r;d.arePropsEqual(e,u)||(r=n.value)==null||r.setConfig(l.value)}),o.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),p({component:n}),(e,u)=>(o.openBlock(),o.createElementBlock("div",S))}});exports.VisGraphSelectors=m;exports.default=F;
|
|
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 { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = GraphConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\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\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 }\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\n\n"],"names":["VisGraphSelectors","Graph","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,
|
|
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 { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = GraphConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\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\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 }\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\n\n"],"names":["VisGraphSelectors","Graph","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,mmEA3CjC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,QAAYQ,EAAO,KAAK,GACpCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
|
|
@@ -11,6 +11,7 @@ export declare const VisGraphSelectors: {
|
|
|
11
11
|
dimmedNode: string;
|
|
12
12
|
link: string;
|
|
13
13
|
linkLine: string;
|
|
14
|
+
linkLabel: string;
|
|
14
15
|
dimmedLink: string;
|
|
15
16
|
panel: string;
|
|
16
17
|
panelRect: string;
|
|
@@ -93,10 +94,13 @@ declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__V
|
|
|
93
94
|
linkFlow?: import("@unovis/ts").BooleanAccessor<L>;
|
|
94
95
|
linkFlowAnimDuration?: number;
|
|
95
96
|
linkFlowParticleSize?: number;
|
|
96
|
-
linkLabel?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphCircleLabel, L>;
|
|
97
|
+
linkLabel?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphCircleLabel | import("@unovis/ts").GraphCircleLabel[], L>;
|
|
97
98
|
linkLabelShiftFromCenter?: import("@unovis/ts").BooleanAccessor<L>;
|
|
98
99
|
linkNeighborSpacing?: number;
|
|
99
100
|
linkCurvature?: import("@unovis/ts").NumericAccessor<L>;
|
|
101
|
+
linkHighlightOnHover?: boolean;
|
|
102
|
+
linkSourcePointOffset?: import("@unovis/ts").GenericAccessor<[number, number], import("@unovis/ts").GraphLink<N, L>>;
|
|
103
|
+
linkTargetPointOffset?: import("@unovis/ts").GenericAccessor<[number, number], import("@unovis/ts").GraphLink<N, L>>;
|
|
100
104
|
selectedLinkId?: string | number;
|
|
101
105
|
nodeSize?: import("@unovis/ts").NumericAccessor<N>;
|
|
102
106
|
nodeStrokeWidth?: import("@unovis/ts").NumericAccessor<N>;
|
|
@@ -142,6 +146,7 @@ declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__V
|
|
|
142
146
|
onNodeSelectionBrush?: (selectedNodes: import("@unovis/ts").GraphNode<N, L>[], event: import("d3-brush").D3BrushEvent<SVGGElement>) => void;
|
|
143
147
|
onNodeSelectionDrag?: (selectedNodes: import("@unovis/ts").GraphNode<N, L>[], event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
|
|
144
148
|
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;
|
|
149
|
+
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;
|
|
145
150
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
146
151
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
147
152
|
component: import("vue").Ref<Graph<N, L>, Graph<N, L>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as p, inject as y, computed as m, ref as S, onMounted as F, nextTick as
|
|
1
|
+
import { defineComponent as p, inject as y, computed as m, ref as S, onMounted as F, nextTick as k, onUnmounted as b, watch as r, openBlock as g, createElementBlock as h } from "vue";
|
|
2
2
|
import { Graph as u } from "@unovis/ts";
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
3
|
+
import { useForwardProps as f, arePropsEqual as v } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as L } from "../../utils/context.js";
|
|
5
|
+
const P = { "data-vis-component": "" }, D = u.selectors, G = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
zoomScaleExtent: {},
|
|
@@ -39,6 +39,9 @@ const C = { "data-vis-component": "" }, G = u.selectors, D = /* @__PURE__ */ p({
|
|
|
39
39
|
linkLabelShiftFromCenter: {},
|
|
40
40
|
linkNeighborSpacing: {},
|
|
41
41
|
linkCurvature: {},
|
|
42
|
+
linkHighlightOnHover: { type: Boolean },
|
|
43
|
+
linkSourcePointOffset: {},
|
|
44
|
+
linkTargetPointOffset: {},
|
|
42
45
|
selectedLinkId: {},
|
|
43
46
|
nodeSize: {},
|
|
44
47
|
nodeStrokeWidth: {},
|
|
@@ -85,19 +88,20 @@ const C = { "data-vis-component": "" }, G = u.selectors, D = /* @__PURE__ */ p({
|
|
|
85
88
|
onNodeSelectionBrush: { type: Function },
|
|
86
89
|
onNodeSelectionDrag: { type: Function },
|
|
87
90
|
onRenderComplete: { type: Function },
|
|
91
|
+
shouldDataUpdate: { type: Function },
|
|
88
92
|
duration: {},
|
|
89
93
|
events: {},
|
|
90
94
|
attributes: {},
|
|
91
95
|
data: {}
|
|
92
96
|
},
|
|
93
97
|
setup(c, { expose: s }) {
|
|
94
|
-
const n = y(
|
|
98
|
+
const n = y(L), l = c, t = m(() => n.data.value ?? l.data), a = f(l), o = S();
|
|
95
99
|
return F(() => {
|
|
96
|
-
|
|
100
|
+
k(() => {
|
|
97
101
|
var e;
|
|
98
102
|
o.value = new u(a.value), (e = o.value) == null || e.setData(t.value), n.update(o.value);
|
|
99
103
|
});
|
|
100
|
-
}),
|
|
104
|
+
}), b(() => {
|
|
101
105
|
var e;
|
|
102
106
|
(e = o.value) == null || e.destroy(), n.destroy();
|
|
103
107
|
}), r(a, (e, i) => {
|
|
@@ -108,11 +112,11 @@ const C = { "data-vis-component": "" }, G = u.selectors, D = /* @__PURE__ */ p({
|
|
|
108
112
|
(e = o.value) == null || e.setData(t.value);
|
|
109
113
|
}), s({
|
|
110
114
|
component: o
|
|
111
|
-
}), (e, i) => (g(), h("div",
|
|
115
|
+
}), (e, i) => (g(), h("div", P));
|
|
112
116
|
}
|
|
113
117
|
});
|
|
114
118
|
export {
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
D as VisGraphSelectors,
|
|
120
|
+
G as default
|
|
117
121
|
};
|
|
118
122
|
//# 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 { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = GraphConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\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\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 }\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\n\n"],"names":["VisGraphSelectors","Graph","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAoBC,EAAM
|
|
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 { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = GraphConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\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\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 }\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\n\n"],"names":["VisGraphSelectors","Graph","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CjC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IACpCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/vue",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, Vue, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.1-exf.10",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/f5/unovis.git",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"gallery": "vite"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@unovis/ts": "1.5.
|
|
54
|
+
"@unovis/ts": "1.5.1-exf.10",
|
|
55
55
|
"vue": "^3"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|