@unovis/vue 1.5.1-exf.10 → 1.5.1-ql.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/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 +0 -2
- package/components/donut/index.js +14 -16
- 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 +0 -5
- package/components/graph/index.js +10 -14
- package/components/graph/index.js.map +1 -1
- package/package.json +3 -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?: (
|
|
60
|
+
tickFormat?: (tick: number | Date, i: number, ticks: number[] | 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,y=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:{},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=y;
|
|
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,0aA3CjC,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,8 +54,6 @@ 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;
|
|
59
57
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
60
58
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
61
59
|
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 v, ref as g, onMounted as f, nextTick as y, onUnmounted as _, watch as u, openBlock as b, createElementBlock as h } from "vue";
|
|
2
|
+
import { Donut as l } 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": "" }, E = l.selectors, L = /* @__PURE__ */ i({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
id: { type: Function },
|
|
@@ -21,36 +21,34 @@ const x = { "data-vis-component": "" }, F = u.selectors, E = /* @__PURE__ */ i({
|
|
|
21
21
|
emptySegmentAngle: {},
|
|
22
22
|
showBackground: { type: Boolean },
|
|
23
23
|
backgroundAngleRange: {},
|
|
24
|
-
centralLabelOffsetX: {},
|
|
25
|
-
centralLabelOffsetY: {},
|
|
26
24
|
duration: {},
|
|
27
25
|
events: {},
|
|
28
26
|
attributes: {},
|
|
29
27
|
data: {}
|
|
30
28
|
},
|
|
31
29
|
setup(p, { expose: d }) {
|
|
32
|
-
const o = m(w), r = p,
|
|
33
|
-
return
|
|
30
|
+
const o = m(w), r = p, n = v(() => o.data.value ?? r.data), a = B(r), t = g();
|
|
31
|
+
return f(() => {
|
|
34
32
|
y(() => {
|
|
35
33
|
var e;
|
|
36
|
-
t.value = new
|
|
34
|
+
t.value = new l(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
|
|
37
35
|
});
|
|
38
|
-
}),
|
|
36
|
+
}), _(() => {
|
|
39
37
|
var e;
|
|
40
38
|
(e = t.value) == null || e.destroy(), o.destroy();
|
|
41
|
-
}),
|
|
39
|
+
}), u(a, (e, c) => {
|
|
42
40
|
var s;
|
|
43
|
-
k(e, c) || (s = t.value) == null || s.setConfig(
|
|
44
|
-
}),
|
|
41
|
+
k(e, c) || (s = t.value) == null || s.setConfig(a.value);
|
|
42
|
+
}), u(n, () => {
|
|
45
43
|
var e;
|
|
46
|
-
(e = t.value) == null || e.setData(
|
|
44
|
+
(e = t.value) == null || e.setData(n.value);
|
|
47
45
|
}), d({
|
|
48
46
|
component: t
|
|
49
|
-
}), (e, c) => (
|
|
47
|
+
}), (e, c) => (b(), h("div", x));
|
|
50
48
|
}
|
|
51
49
|
});
|
|
52
50
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
E as VisDonutSelectors,
|
|
52
|
+
L as default
|
|
55
53
|
};
|
|
56
54
|
//# 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"),r=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),m={"data-vis-component":""},S=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:{},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},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=r.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 d;r.arePropsEqual(e,u)||(d=n.value)==null||d.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",m))}});exports.VisGraphSelectors=S;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,4+DA3CjC,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,7 +11,6 @@ export declare const VisGraphSelectors: {
|
|
|
11
11
|
dimmedNode: string;
|
|
12
12
|
link: string;
|
|
13
13
|
linkLine: string;
|
|
14
|
-
linkLabel: string;
|
|
15
14
|
dimmedLink: string;
|
|
16
15
|
panel: string;
|
|
17
16
|
panelRect: string;
|
|
@@ -98,9 +97,6 @@ declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__V
|
|
|
98
97
|
linkLabelShiftFromCenter?: import("@unovis/ts").BooleanAccessor<L>;
|
|
99
98
|
linkNeighborSpacing?: number;
|
|
100
99
|
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>>;
|
|
104
100
|
selectedLinkId?: string | number;
|
|
105
101
|
nodeSize?: import("@unovis/ts").NumericAccessor<N>;
|
|
106
102
|
nodeStrokeWidth?: import("@unovis/ts").NumericAccessor<N>;
|
|
@@ -146,7 +142,6 @@ declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__V
|
|
|
146
142
|
onNodeSelectionBrush?: (selectedNodes: import("@unovis/ts").GraphNode<N, L>[], event: import("d3-brush").D3BrushEvent<SVGGElement>) => void;
|
|
147
143
|
onNodeSelectionDrag?: (selectedNodes: import("@unovis/ts").GraphNode<N, L>[], event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
|
|
148
144
|
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;
|
|
150
145
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
151
146
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
152
147
|
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 b, onUnmounted as k, 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 L, arePropsEqual as v } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as f } from "../../utils/context.js";
|
|
5
|
+
const C = { "data-vis-component": "" }, G = u.selectors, D = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
zoomScaleExtent: {},
|
|
@@ -39,9 +39,6 @@ const P = { "data-vis-component": "" }, D = u.selectors, G = /* @__PURE__ */ p({
|
|
|
39
39
|
linkLabelShiftFromCenter: {},
|
|
40
40
|
linkNeighborSpacing: {},
|
|
41
41
|
linkCurvature: {},
|
|
42
|
-
linkHighlightOnHover: { type: Boolean },
|
|
43
|
-
linkSourcePointOffset: {},
|
|
44
|
-
linkTargetPointOffset: {},
|
|
45
42
|
selectedLinkId: {},
|
|
46
43
|
nodeSize: {},
|
|
47
44
|
nodeStrokeWidth: {},
|
|
@@ -88,20 +85,19 @@ const P = { "data-vis-component": "" }, D = u.selectors, G = /* @__PURE__ */ p({
|
|
|
88
85
|
onNodeSelectionBrush: { type: Function },
|
|
89
86
|
onNodeSelectionDrag: { type: Function },
|
|
90
87
|
onRenderComplete: { type: Function },
|
|
91
|
-
shouldDataUpdate: { type: Function },
|
|
92
88
|
duration: {},
|
|
93
89
|
events: {},
|
|
94
90
|
attributes: {},
|
|
95
91
|
data: {}
|
|
96
92
|
},
|
|
97
93
|
setup(c, { expose: s }) {
|
|
98
|
-
const n = y(
|
|
94
|
+
const n = y(f), l = c, t = m(() => n.data.value ?? l.data), a = L(l), o = S();
|
|
99
95
|
return F(() => {
|
|
100
|
-
|
|
96
|
+
b(() => {
|
|
101
97
|
var e;
|
|
102
98
|
o.value = new u(a.value), (e = o.value) == null || e.setData(t.value), n.update(o.value);
|
|
103
99
|
});
|
|
104
|
-
}),
|
|
100
|
+
}), k(() => {
|
|
105
101
|
var e;
|
|
106
102
|
(e = o.value) == null || e.destroy(), n.destroy();
|
|
107
103
|
}), r(a, (e, i) => {
|
|
@@ -112,11 +108,11 @@ const P = { "data-vis-component": "" }, D = u.selectors, G = /* @__PURE__ */ p({
|
|
|
112
108
|
(e = o.value) == null || e.setData(t.value);
|
|
113
109
|
}), s({
|
|
114
110
|
component: o
|
|
115
|
-
}), (e, i) => (g(), h("div",
|
|
111
|
+
}), (e, i) => (g(), h("div", C));
|
|
116
112
|
}
|
|
117
113
|
});
|
|
118
114
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
G as VisGraphSelectors,
|
|
116
|
+
D as default
|
|
121
117
|
};
|
|
122
118
|
//# 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,8 @@
|
|
|
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.1-
|
|
4
|
+
"version": "1.5.1-ql.2",
|
|
5
|
+
"packageManager": "npm@10.9.1",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "https://github.com/f5/unovis.git",
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"gallery": "vite"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
|
-
"@unovis/ts": "1.5.
|
|
55
|
+
"@unovis/ts": "1.5.0",
|
|
55
56
|
"vue": "^3"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|