@unovis/vue 1.3.6-beta.0 → 1.3.6-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),y=require("@unovis/ts"),c=require("../../utils/props.cjs"),s=require("../../utils/context.cjs"),F={"data-vis-component":""},S=e.defineComponent({__name:"index",props:{zoomScaleExtent:{},disableZoom:{type:Boolean},disableDrag:{type:Boolean},zoomThrottledUpdateNodeThreshold:{},
|
|
1
|
+
"use strict";const e=require("vue"),y=require("@unovis/ts"),c=require("../../utils/props.cjs"),s=require("../../utils/context.cjs"),F={"data-vis-component":""},S=e.defineComponent({__name:"index",props:{zoomScaleExtent:{},disableZoom:{type:Boolean},disableDrag:{type:Boolean},zoomThrottledUpdateNodeThreshold:{},layoutType:{},layoutAutofit:{type:Boolean},layoutAutofitTolerance:{},layoutNonConnectedAside:{type:Boolean},layoutNodeGroup:{type:[Function,String,null]},layoutGroupOrder:{},layoutParallelNodesPerColumn:{},layoutParallelNodeSubGroup:{type:[Function,String,null]},layoutParallelSubGroupsPerRow:{},layoutParallelGroupSpacing:{},layoutParallelSortConnectionsByGroup:{},forceLayoutSettings:{},dagreLayoutSettings:{},layoutElkSettings:{type:[Function,null]},layoutElkNodeGroups:{},linkWidth:{type:[Function,Number,null]},linkStyle:{type:[Function,null]},linkBandWidth:{type:[Function,Number,null]},linkArrow:{type:[Function,null]},linkStroke:{type:[Function,String,Array,null]},linkDisabled:{type:[Function,Boolean,null]},linkFlow:{type:[Function,Boolean,null]},linkFlowAnimDuration:{},linkFlowParticleSize:{},linkLabel:{type:[Function,null]},linkLabelShiftFromCenter:{type:[Function,Boolean,null]},linkNeighborSpacing:{},linkCurvature:{type:[Function,Number,null]},selectedLinkId:{},nodeSize:{type:[Function,Number,null]},nodeStrokeWidth:{type:[Function,Number,null]},nodeShape:{type:[Function,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,null]},nodeLabelTrimLength:{type:[Function,Number,null]},nodeSubLabel:{type:[Function,String,null]},nodeSubLabelTrim:{type:[Function,Boolean,null]},nodeSubLabelTrimMode:{type:[Function,null]},nodeSubLabelTrimLength:{type:[Function,Number,null]},nodeSideLabels:{type:[Function,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,null]},nodeEnterScale:{type:[Function,Number,null]},nodeExitPosition:{type:[Function,null]},nodeExitScale:{type:[Function,Number,null]},selectedNodeId:{},panels:{},onNodeDragStart:{type:Function},onNodeDrag:{type:Function},onNodeDragEnd:{type:Function},onZoom:{type:Function},onLayoutCalculated:{type:Function},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const i=p,o=e.inject(s.componentAccessorKey),l=e.computed(()=>o.data.value??i.data),u=c.useForwardProps(i),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var n;t.value=new y.Graph(u.value),(n=t.value)==null||n.setData(l.value),o.update(t.value)})}),e.onUnmounted(()=>{var n;(n=t.value)==null||n.destroy(),o.destroy()}),e.watch(u,(n,a)=>{var r;c.arePropsEqual(n,a)||(r=t.value)==null||r.setConfig(u.value)}),e.watch(l,()=>{var n;(n=t.value)==null||n.setData(l.value)}),d({component:t}),(n,a)=>(e.openBlock(),e.createElementBlock("div",F))}});module.exports=S;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/graph/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\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\ninterface Props extends GraphConfigInterface<N, L> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n zoomScaleExtent: {},\n disableZoom: { type: Boolean },\n disableDrag: { type: Boolean },\n zoomThrottledUpdateNodeThreshold: {},\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/graph/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\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\ninterface Props extends GraphConfigInterface<N, L> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n zoomScaleExtent: {},\n disableZoom: { type: Boolean },\n disableDrag: { type: Boolean },\n zoomThrottledUpdateNodeThreshold: {},\n layoutType: {},\n layoutAutofit: { type: Boolean },\n layoutAutofitTolerance: {},\n layoutNonConnectedAside: { type: Boolean },\n layoutNodeGroup: { type: [Function, String, null] },\n layoutGroupOrder: {},\n layoutParallelNodesPerColumn: {},\n layoutParallelNodeSubGroup: { type: [Function, String, null] },\n layoutParallelSubGroupsPerRow: {},\n layoutParallelGroupSpacing: {},\n layoutParallelSortConnectionsByGroup: {},\n forceLayoutSettings: {},\n dagreLayoutSettings: {},\n layoutElkSettings: { type: [Function, null] },\n layoutElkNodeGroups: {},\n linkWidth: { type: [Function, Number, null] },\n linkStyle: { type: [Function, null] },\n linkBandWidth: { type: [Function, Number, null] },\n linkArrow: { type: [Function, null] },\n linkStroke: { type: [Function, String, Array, null] },\n linkDisabled: { type: [Function, Boolean, null] },\n linkFlow: { type: [Function, Boolean, null] },\n linkFlowAnimDuration: {},\n linkFlowParticleSize: {},\n linkLabel: { type: [Function, null] },\n linkLabelShiftFromCenter: { type: [Function, Boolean, null] },\n linkNeighborSpacing: {},\n linkCurvature: { type: [Function, Number, null] },\n selectedLinkId: {},\n nodeSize: { type: [Function, Number, null] },\n nodeStrokeWidth: { type: [Function, Number, null] },\n nodeShape: { type: [Function, null] },\n nodeGaugeValue: { type: [Function, Number, null] },\n nodeGaugeFill: { type: [Function, String, Array, null] },\n nodeGaugeAnimDuration: {},\n nodeIcon: { type: [Function, String, null] },\n nodeIconSize: { type: [Function, Number, null] },\n nodeLabel: { type: [Function, String, null] },\n nodeLabelTrim: { type: [Function, Boolean, null] },\n nodeLabelTrimMode: { type: [Function, null] },\n nodeLabelTrimLength: { type: [Function, Number, null] },\n nodeSubLabel: { type: [Function, String, null] },\n nodeSubLabelTrim: { type: [Function, Boolean, null] },\n nodeSubLabelTrimMode: { type: [Function, null] },\n nodeSubLabelTrimLength: { type: [Function, Number, null] },\n nodeSideLabels: { type: [Function, null] },\n nodeBottomIcon: { type: [Function, String, null] },\n nodeDisabled: { type: [Function, Boolean, null] },\n nodeFill: { type: [Function, String, Array, null] },\n nodeStroke: { type: [Function, String, Array, null] },\n nodeSort: { type: Function },\n nodeEnterPosition: { type: [Function, null] },\n nodeEnterScale: { type: [Function, Number, null] },\n nodeExitPosition: { type: [Function, null] },\n nodeExitScale: { type: [Function, Number, null] },\n selectedNodeId: {},\n panels: {},\n onNodeDragStart: { type: Function },\n onNodeDrag: { type: Function },\n onNodeDragEnd: { type: Function },\n onZoom: { type: Function },\n onLayoutCalculated: { type: Function },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Graph","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IASfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,gBAAiB,CAAC,EAClB,YAAa,CAAE,KAAM,OAAQ,EAC7B,YAAa,CAAE,KAAM,OAAQ,EAC7B,iCAAkC,CAAC,EACnC,WAAY,CAAC,EACb,cAAe,CAAE,KAAM,OAAQ,EAC/B,uBAAwB,CAAC,EACzB,wBAAyB,CAAE,KAAM,OAAQ,EACzC,gBAAiB,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAClD,iBAAkB,CAAC,EACnB,6BAA8B,CAAC,EAC/B,2BAA4B,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC7D,8BAA+B,CAAC,E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AY,CAE5C,MAAMC,EAAQF,EAGRG,EAAWC,SAAOC,EAAAA,oBAAoB,EAKtCC,EAAOC,EAAS,SAAA,IAAMJ,EAAS,KAAK,OAASD,EAAM,IAAI,EAEvDM,EAASC,kBAAgBP,CAAK,EAG9BQ,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAY,MAAAN,EAAO,KAAK,GACpCO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,OACrBH,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKc,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEDS,EAAA,MAAMX,EAAM,IAAM,QACNS,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQT,EAAK,MAAK,CACpC,EAEQL,EAAA,CACP,UAAAS,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO3B,CAAU,EAE7D,CAEA,CAAC"}
|
|
@@ -45,7 +45,6 @@ declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__V
|
|
|
45
45
|
disableZoom?: boolean;
|
|
46
46
|
disableDrag?: boolean;
|
|
47
47
|
zoomThrottledUpdateNodeThreshold?: number;
|
|
48
|
-
onZoom?: (zoomScale: number, zoomScaleExtent: [number, number]) => void;
|
|
49
48
|
layoutType?: string;
|
|
50
49
|
layoutAutofit?: boolean;
|
|
51
50
|
layoutAutofitTolerance?: number;
|
|
@@ -57,18 +56,14 @@ declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__V
|
|
|
57
56
|
layoutParallelSubGroupsPerRow?: number;
|
|
58
57
|
layoutParallelGroupSpacing?: number;
|
|
59
58
|
layoutParallelSortConnectionsByGroup?: string;
|
|
60
|
-
forceLayoutSettings?: import("@unovis/ts").GraphForceLayoutSettings
|
|
61
|
-
dagreLayoutSettings?:
|
|
62
|
-
[key: string]: any;
|
|
63
|
-
rankdir: string;
|
|
64
|
-
ranker: string;
|
|
65
|
-
};
|
|
59
|
+
forceLayoutSettings?: import("@unovis/ts").GraphForceLayoutSettings<N, L>;
|
|
60
|
+
dagreLayoutSettings?: import("@unovis/ts").GraphDagreLayoutSetting;
|
|
66
61
|
layoutElkSettings?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphElkLayoutSettings, string>;
|
|
67
62
|
layoutElkNodeGroups?: import("@unovis/ts").StringAccessor<N>[];
|
|
68
63
|
linkWidth?: import("@unovis/ts").NumericAccessor<L>;
|
|
69
64
|
linkStyle?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphLinkStyle, L>;
|
|
70
65
|
linkBandWidth?: import("@unovis/ts").NumericAccessor<L>;
|
|
71
|
-
linkArrow?: import("@unovis/ts").GenericAccessor<
|
|
66
|
+
linkArrow?: import("@unovis/ts").GenericAccessor<string | boolean, L>;
|
|
72
67
|
linkStroke?: import("@unovis/ts").ColorAccessor<L>;
|
|
73
68
|
linkDisabled?: import("@unovis/ts").BooleanAccessor<L>;
|
|
74
69
|
linkFlow?: import("@unovis/ts").BooleanAccessor<L>;
|
|
@@ -77,6 +72,7 @@ declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__V
|
|
|
77
72
|
linkLabel?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphCircleLabel, L>;
|
|
78
73
|
linkLabelShiftFromCenter?: import("@unovis/ts").BooleanAccessor<L>;
|
|
79
74
|
linkNeighborSpacing?: number;
|
|
75
|
+
linkCurvature?: import("@unovis/ts").NumericAccessor<L>;
|
|
80
76
|
selectedLinkId?: string | number;
|
|
81
77
|
nodeSize?: import("@unovis/ts").NumericAccessor<N>;
|
|
82
78
|
nodeStrokeWidth?: import("@unovis/ts").NumericAccessor<N>;
|
|
@@ -105,6 +101,11 @@ declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__V
|
|
|
105
101
|
nodeExitScale?: import("@unovis/ts").NumericAccessor<N>;
|
|
106
102
|
selectedNodeId?: string | number;
|
|
107
103
|
panels?: import("@unovis/ts").GraphPanelConfig[];
|
|
104
|
+
onNodeDragStart?: (n: import("@unovis/ts").GraphNode<N, L>, event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
|
|
105
|
+
onNodeDrag?: (n: import("@unovis/ts").GraphNode<N, L>, event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
|
|
106
|
+
onNodeDragEnd?: (n: import("@unovis/ts").GraphNode<N, L>, event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
|
|
107
|
+
onZoom?: (zoomScale: number, zoomScaleExtent: [number, number], event: import("d3-zoom").D3ZoomEvent<SVGGElement, unknown>) => void;
|
|
108
|
+
onLayoutCalculated?: (n: import("@unovis/ts").GraphNode<N, L>[], links: import("@unovis/ts").GraphLink<N, L>[]) => void;
|
|
108
109
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
109
110
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
110
111
|
component: import("vue").Ref<Graph<N, L>>;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { defineComponent as d, inject as y, computed as
|
|
1
|
+
import { defineComponent as d, inject as y, computed as F, ref as s, onMounted as m, nextTick as S, onUnmounted as b, watch as r, openBlock as g, createElementBlock as k } from "vue";
|
|
2
2
|
import { Graph as N } from "@unovis/ts";
|
|
3
3
|
import { useForwardProps as L, arePropsEqual as f } from "../../utils/props.js";
|
|
4
4
|
import { componentAccessorKey as h } from "../../utils/context.js";
|
|
5
|
-
const
|
|
5
|
+
const v = { "data-vis-component": "" }, T = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
zoomScaleExtent: {},
|
|
9
9
|
disableZoom: { type: Boolean },
|
|
10
10
|
disableDrag: { type: Boolean },
|
|
11
11
|
zoomThrottledUpdateNodeThreshold: {},
|
|
12
|
-
onZoom: { type: Function },
|
|
13
12
|
layoutType: {},
|
|
14
13
|
layoutAutofit: { type: Boolean },
|
|
15
14
|
layoutAutofitTolerance: {},
|
|
@@ -37,6 +36,7 @@ const B = { "data-vis-component": "" }, T = /* @__PURE__ */ d({
|
|
|
37
36
|
linkLabel: { type: [Function, null] },
|
|
38
37
|
linkLabelShiftFromCenter: { type: [Function, Boolean, null] },
|
|
39
38
|
linkNeighborSpacing: {},
|
|
39
|
+
linkCurvature: { type: [Function, Number, null] },
|
|
40
40
|
selectedLinkId: {},
|
|
41
41
|
nodeSize: { type: [Function, Number, null] },
|
|
42
42
|
nodeStrokeWidth: { type: [Function, Number, null] },
|
|
@@ -66,13 +66,18 @@ const B = { "data-vis-component": "" }, T = /* @__PURE__ */ d({
|
|
|
66
66
|
nodeExitScale: { type: [Function, Number, null] },
|
|
67
67
|
selectedNodeId: {},
|
|
68
68
|
panels: {},
|
|
69
|
+
onNodeDragStart: { type: Function },
|
|
70
|
+
onNodeDrag: { type: Function },
|
|
71
|
+
onNodeDragEnd: { type: Function },
|
|
72
|
+
onZoom: { type: Function },
|
|
73
|
+
onLayoutCalculated: { type: Function },
|
|
69
74
|
duration: {},
|
|
70
75
|
events: {},
|
|
71
76
|
attributes: {},
|
|
72
77
|
data: {}
|
|
73
78
|
},
|
|
74
79
|
setup(c, { expose: p }) {
|
|
75
|
-
const u = c, o = y(h), t =
|
|
80
|
+
const u = c, o = y(h), t = F(() => o.data.value ?? u.data), l = L(u), e = s();
|
|
76
81
|
return m(() => {
|
|
77
82
|
S(() => {
|
|
78
83
|
var n;
|
|
@@ -89,7 +94,7 @@ const B = { "data-vis-component": "" }, T = /* @__PURE__ */ d({
|
|
|
89
94
|
(n = e.value) == null || n.setData(t.value);
|
|
90
95
|
}), p({
|
|
91
96
|
component: e
|
|
92
|
-
}), (n, i) => (g(), k("div",
|
|
97
|
+
}), (n, i) => (g(), k("div", v));
|
|
93
98
|
}
|
|
94
99
|
});
|
|
95
100
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/graph/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\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\ninterface Props extends GraphConfigInterface<N, L> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n zoomScaleExtent: {},\n disableZoom: { type: Boolean },\n disableDrag: { type: Boolean },\n zoomThrottledUpdateNodeThreshold: {},\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/graph/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\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\ninterface Props extends GraphConfigInterface<N, L> { }\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n zoomScaleExtent: {},\n disableZoom: { type: Boolean },\n disableDrag: { type: Boolean },\n zoomThrottledUpdateNodeThreshold: {},\n layoutType: {},\n layoutAutofit: { type: Boolean },\n layoutAutofitTolerance: {},\n layoutNonConnectedAside: { type: Boolean },\n layoutNodeGroup: { type: [Function, String, null] },\n layoutGroupOrder: {},\n layoutParallelNodesPerColumn: {},\n layoutParallelNodeSubGroup: { type: [Function, String, null] },\n layoutParallelSubGroupsPerRow: {},\n layoutParallelGroupSpacing: {},\n layoutParallelSortConnectionsByGroup: {},\n forceLayoutSettings: {},\n dagreLayoutSettings: {},\n layoutElkSettings: { type: [Function, null] },\n layoutElkNodeGroups: {},\n linkWidth: { type: [Function, Number, null] },\n linkStyle: { type: [Function, null] },\n linkBandWidth: { type: [Function, Number, null] },\n linkArrow: { type: [Function, null] },\n linkStroke: { type: [Function, String, Array, null] },\n linkDisabled: { type: [Function, Boolean, null] },\n linkFlow: { type: [Function, Boolean, null] },\n linkFlowAnimDuration: {},\n linkFlowParticleSize: {},\n linkLabel: { type: [Function, null] },\n linkLabelShiftFromCenter: { type: [Function, Boolean, null] },\n linkNeighborSpacing: {},\n linkCurvature: { type: [Function, Number, null] },\n selectedLinkId: {},\n nodeSize: { type: [Function, Number, null] },\n nodeStrokeWidth: { type: [Function, Number, null] },\n nodeShape: { type: [Function, null] },\n nodeGaugeValue: { type: [Function, Number, null] },\n nodeGaugeFill: { type: [Function, String, Array, null] },\n nodeGaugeAnimDuration: {},\n nodeIcon: { type: [Function, String, null] },\n nodeIconSize: { type: [Function, Number, null] },\n nodeLabel: { type: [Function, String, null] },\n nodeLabelTrim: { type: [Function, Boolean, null] },\n nodeLabelTrimMode: { type: [Function, null] },\n nodeLabelTrimLength: { type: [Function, Number, null] },\n nodeSubLabel: { type: [Function, String, null] },\n nodeSubLabelTrim: { type: [Function, Boolean, null] },\n nodeSubLabelTrimMode: { type: [Function, null] },\n nodeSubLabelTrimLength: { type: [Function, Number, null] },\n nodeSideLabels: { type: [Function, null] },\n nodeBottomIcon: { type: [Function, String, null] },\n nodeDisabled: { type: [Function, Boolean, null] },\n nodeFill: { type: [Function, String, Array, null] },\n nodeStroke: { type: [Function, String, Array, null] },\n nodeSort: { type: Function },\n nodeEnterPosition: { type: [Function, null] },\n nodeEnterScale: { type: [Function, Number, null] },\n nodeExitPosition: { type: [Function, null] },\n nodeExitScale: { type: [Function, Number, null] },\n selectedNodeId: {},\n panels: {},\n onNodeDragStart: { type: Function },\n onNodeDrag: { type: Function },\n onNodeDragEnd: { type: Function },\n onZoom: { type: Function },\n onLayoutCalculated: { type: Function },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \n\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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","Graph","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MASfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QA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,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBZ,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKc,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEDS,EAAMX,GAAM,MAAM;;AACN,OAAAS,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQT,EAAK;AAAA,IAAK,CACpC,GAEQL,EAAA;AAAA,MACP,WAAAS;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO3B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
|
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.3.6-beta.
|
|
4
|
+
"version": "1.3.6-beta.2",
|
|
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.3.6-beta.
|
|
54
|
+
"@unovis/ts": "1.3.6-beta.2",
|
|
55
55
|
"vue": "^3"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|