@unovis/vue 1.5.0-beta.3 → 1.5.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/components/annotations/index.cjs +1 -1
- package/components/annotations/index.cjs.map +1 -1
- package/components/annotations/index.d.ts +5 -5
- package/components/annotations/index.js +14 -14
- 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 +1 -1
- package/components/area/index.js +23 -23
- 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 +1 -1
- package/components/axis/index.js +16 -16
- package/components/axis/index.js.map +1 -1
- package/components/brush/index.cjs +1 -1
- package/components/brush/index.cjs.map +1 -1
- package/components/brush/index.d.ts +1 -1
- package/components/brush/index.js +17 -17
- 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 +1 -1
- package/components/chord-diagram/index.js +27 -27
- 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 +1 -1
- package/components/crosshair/index.js +1 -1
- 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 +2 -2
- package/components/donut/index.js +14 -14
- 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 +1 -1
- package/components/free-brush/index.js +18 -18
- 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 +1 -1
- package/components/graph/index.js +59 -59
- 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 +1 -1
- package/components/grouped-bar/index.js +25 -25
- package/components/grouped-bar/index.js.map +1 -1
- package/components/line/index.cjs +1 -1
- package/components/line/index.cjs.map +1 -1
- package/components/line/index.d.ts +1 -1
- package/components/line/index.js +23 -23
- 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 +2 -2
- package/components/nested-donut/index.js +22 -22
- package/components/nested-donut/index.js.map +1 -1
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.d.ts +1 -1
- package/components/sankey/index.js +35 -35
- 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 +1 -1
- package/components/scatter/index.js +27 -27
- 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 +1 -1
- package/components/stacked-bar/index.js +22 -22
- 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 +2 -2
- package/components/timeline/index.js +1 -1
- 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 +5 -5
- package/components/tooltip/index.js +15 -15
- 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 +1 -1
- package/components/topojson-map/index.js +39 -39
- package/components/topojson-map/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 +1 -1
- package/components/xy-labels/index.js +38 -38
- package/components/xy-labels/index.js.map +1 -1
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.d.ts +1 -1
- package/containers/single-container/index.js.map +1 -1
- package/containers/single-container/index3.cjs +1 -1
- package/containers/single-container/index3.js +1 -1
- package/containers/xy-container/index.cjs.map +1 -1
- package/containers/xy-container/index.d.ts +1 -1
- package/containers/xy-container/index.js.map +1 -1
- package/containers/xy-container/index3.cjs +1 -1
- package/containers/xy-container/index3.js +1 -1
- 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 +5 -5
- package/html-components/bullet-legend/index.js +11 -11
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/bullet-legend/index3.cjs +1 -1
- package/html-components/bullet-legend/index3.js +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 +1 -1
- package/html-components/leaflet-flow-map/index.js +43 -43
- package/html-components/leaflet-flow-map/index.js.map +1 -1
- package/html-components/leaflet-flow-map/index3.cjs +1 -1
- package/html-components/leaflet-flow-map/index3.js +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 +1 -1
- package/html-components/leaflet-map/index.js +32 -32
- package/html-components/leaflet-map/index.js.map +1 -1
- package/html-components/leaflet-map/index3.cjs +1 -1
- package/html-components/leaflet-map/index3.js +1 -1
- package/index.cjs +2 -2
- package/index.js +6 -6
- package/package.json +6 -6
- package/utils/props.cjs.map +1 -1
- package/utils/props.js.map +1 -1
- package/containers/single-container/index2.cjs +0 -2
- package/containers/single-container/index2.cjs.map +0 -1
- package/containers/single-container/index2.js +0 -5
- package/containers/single-container/index2.js.map +0 -1
- package/containers/xy-container/index2.cjs +0 -2
- package/containers/xy-container/index2.cjs.map +0 -1
- package/containers/xy-container/index2.js +0 -5
- package/containers/xy-container/index2.js.map +0 -1
- package/html-components/bullet-legend/index2.cjs +0 -2
- package/html-components/bullet-legend/index2.cjs.map +0 -1
- package/html-components/bullet-legend/index2.js +0 -5
- package/html-components/bullet-legend/index2.js.map +0 -1
- package/html-components/leaflet-flow-map/index2.cjs +0 -2
- package/html-components/leaflet-flow-map/index2.cjs.map +0 -1
- package/html-components/leaflet-flow-map/index2.js +0 -5
- package/html-components/leaflet-flow-map/index2.js.map +0 -1
- package/html-components/leaflet-map/index2.cjs +0 -2
- package/html-components/leaflet-map/index2.cjs.map +0 -1
- package/html-components/leaflet-map/index2.js +0 -5
- package/html-components/leaflet-map/index2.js.map +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NestedDonut as
|
|
1
|
+
import { defineComponent as i, inject as m, computed as g, ref as v, onMounted as y, nextTick as f, onUnmounted as b, watch as c, openBlock as B, createElementBlock as S } from "vue";
|
|
2
|
+
import { NestedDonut as u } from "@unovis/ts";
|
|
3
3
|
import { useForwardProps as _, arePropsEqual as h } from "../../utils/props.js";
|
|
4
4
|
import { componentAccessorKey as w } from "../../utils/context.js";
|
|
5
|
-
const
|
|
5
|
+
const L = { "data-vis-component": "" }, E = u.selectors, P = /* @__PURE__ */ i({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
angleRange: {},
|
|
9
9
|
direction: {},
|
|
10
|
-
value: {
|
|
10
|
+
value: {},
|
|
11
11
|
centralLabel: {},
|
|
12
12
|
centralSubLabel: {},
|
|
13
13
|
centralSubLabelWrap: { type: Boolean },
|
|
14
14
|
showBackground: { type: Boolean },
|
|
15
15
|
sort: { type: Function },
|
|
16
16
|
layers: {},
|
|
17
|
-
layerSettings: {
|
|
17
|
+
layerSettings: {},
|
|
18
18
|
layerPadding: {},
|
|
19
19
|
cornerRadius: {},
|
|
20
20
|
emptySegmentAngle: {},
|
|
21
21
|
hideOverflowingSegmentLabels: { type: Boolean },
|
|
22
|
-
segmentColor: {
|
|
23
|
-
segmentLabel: {
|
|
24
|
-
segmentLabelColor: {
|
|
22
|
+
segmentColor: {},
|
|
23
|
+
segmentLabel: {},
|
|
24
|
+
segmentLabelColor: {},
|
|
25
25
|
showEmptySegments: { type: Boolean },
|
|
26
26
|
showSegmentLabels: { type: Boolean },
|
|
27
27
|
duration: {},
|
|
@@ -29,29 +29,29 @@ const F = { "data-vis-component": "" }, C = c.selectors, D = /* @__PURE__ */ m({
|
|
|
29
29
|
attributes: {},
|
|
30
30
|
data: {}
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
setup(p, { expose: d }) {
|
|
33
|
+
const o = m(w), s = p, a = g(() => o.data.value ?? s.data), n = _(s), t = v();
|
|
34
|
+
return y(() => {
|
|
35
35
|
f(() => {
|
|
36
36
|
var e;
|
|
37
|
-
t.value = new
|
|
37
|
+
t.value = new u(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
|
|
38
38
|
});
|
|
39
39
|
}), b(() => {
|
|
40
40
|
var e;
|
|
41
|
-
(e = t.value) == null || e.destroy(),
|
|
42
|
-
}),
|
|
43
|
-
var
|
|
44
|
-
h(e,
|
|
45
|
-
}),
|
|
41
|
+
(e = t.value) == null || e.destroy(), o.destroy();
|
|
42
|
+
}), c(n, (e, r) => {
|
|
43
|
+
var l;
|
|
44
|
+
h(e, r) || (l = t.value) == null || l.setConfig(n.value);
|
|
45
|
+
}), c(a, () => {
|
|
46
46
|
var e;
|
|
47
|
-
(e = t.value) == null || e.setData(
|
|
48
|
-
}),
|
|
47
|
+
(e = t.value) == null || e.setData(a.value);
|
|
48
|
+
}), d({
|
|
49
49
|
component: t
|
|
50
|
-
}), (e,
|
|
50
|
+
}), (e, r) => (B(), S("div", L));
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
E as VisNestedDonutSelectors,
|
|
55
|
+
P as default
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/nested-donut/index.vue
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/nested-donut/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { NestedDonut, NestedDonutConfigInterface, StringAccessor } 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 = NestedDonutConfigInterface<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<NestedDonut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new NestedDonut<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 VisNestedDonutSelectors = NestedDonut.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisNestedDonutSelectors","NestedDonut","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAA0BC,EAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C7C,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAwB;AAG1C,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAmBQ,EAAO,KAAK,IAC3CM,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
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),c=require("@unovis/ts"),u=require("../../utils/props.cjs"),b=require("../../utils/context.cjs"),h={"data-vis-component":""},y=c.Sankey.selectors,g=o.defineComponent({__name:"index",props:{id:{type:Function},heightNormalizationCoeff:{},exitTransitionType:{},enterTransitionType:{},highlightSubtreeOnHover:{type:Boolean},highlightDuration:{},highlightDelay:{},iterations:{},nodeSort:{type:[Function,null]},linkSort:{type:[Function,null]},nodeWidth:{},nodeAlign:{},nodeHorizontalSpacing:{},nodeMinHeight:{},nodeMaxHeight:{},nodePadding:{},showSingleNode:{type:Boolean},nodeCursor:{},nodeIcon:{},nodeColor:{},nodeFixedValue:{},nodeIconColor:{},linkColor:{},linkValue:{},linkCursor:{},label:{},subLabel:{},labelPosition:{},labelVerticalAlign:{},labelBackground:{type:Boolean},labelFit:{},labelMaxWidth:{},labelExpandTrimmedOnHover:{type:Boolean},labelTrimMode:{},labelFontSize:{},labelTextSeparator:{},labelForceWordBreak:{type:Boolean},labelColor:{},labelCursor:{},labelVisibility:{type:Function},subLabelFontSize:{},subLabelColor:{},subLabelPlacement:{},subLabelToLabelInlineWidthRatio:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const n=o.inject(b.componentAccessorKey),i=d,a=o.computed(()=>n.data.value??i.data),l=u.useForwardProps(i),t=o.ref();return o.onMounted(()=>{o.nextTick(()=>{var e;t.value=new c.Sankey(l.value),(e=t.value)==null||e.setData(a.value),n.update(t.value)})}),o.onUnmounted(()=>{var e;(e=t.value)==null||e.destroy(),n.destroy()}),o.watch(l,(e,r)=>{var s;u.arePropsEqual(e,r)||(s=t.value)==null||s.setConfig(l.value)}),o.watch(a,()=>{var e;(e=t.value)==null||e.setData(a.value)}),p({component:t}),(e,r)=>(o.openBlock(),o.createElementBlock("div",h))}});exports.VisSankeySelectors=y;exports.default=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } 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 = SankeyConfigInterface<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<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisSankeySelectors","Sankey","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAqBC,EAAAA,OAAO,w/BA3CnC,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,SAAaQ,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"}
|
|
@@ -92,7 +92,7 @@ declare const _default: <N extends import("@unovis/ts").GraphInputNode, L extend
|
|
|
92
92
|
subLabelToLabelInlineWidthRatio?: number;
|
|
93
93
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
94
94
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
95
|
-
component: import("vue").Ref<Sankey<N, L>>;
|
|
95
|
+
component: import("vue").Ref<Sankey<N, L>, Sankey<N, L>>;
|
|
96
96
|
}>): void;
|
|
97
97
|
attrs: any;
|
|
98
98
|
slots: {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Sankey as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as p, inject as b, computed as m, ref as h, onMounted as y, nextTick as g, onUnmounted as v, watch as s, openBlock as f, createElementBlock as k } from "vue";
|
|
2
|
+
import { Sankey as d } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as x, arePropsEqual as C } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as S } from "../../utils/context.js";
|
|
5
|
+
const F = { "data-vis-component": "" }, H = d.selectors, M = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
id: { type: Function },
|
|
@@ -22,17 +22,17 @@ const C = { "data-vis-component": "" }, L = c.selectors, H = /* @__PURE__ */ d({
|
|
|
22
22
|
nodeMaxHeight: {},
|
|
23
23
|
nodePadding: {},
|
|
24
24
|
showSingleNode: { type: Boolean },
|
|
25
|
-
nodeCursor: {
|
|
26
|
-
nodeIcon: {
|
|
27
|
-
nodeColor: {
|
|
28
|
-
nodeFixedValue: {
|
|
29
|
-
nodeIconColor: {
|
|
30
|
-
linkColor: {
|
|
31
|
-
linkValue: {
|
|
32
|
-
linkCursor: {
|
|
33
|
-
label: {
|
|
34
|
-
subLabel: {
|
|
35
|
-
labelPosition: {
|
|
25
|
+
nodeCursor: {},
|
|
26
|
+
nodeIcon: {},
|
|
27
|
+
nodeColor: {},
|
|
28
|
+
nodeFixedValue: {},
|
|
29
|
+
nodeIconColor: {},
|
|
30
|
+
linkColor: {},
|
|
31
|
+
linkValue: {},
|
|
32
|
+
linkCursor: {},
|
|
33
|
+
label: {},
|
|
34
|
+
subLabel: {},
|
|
35
|
+
labelPosition: {},
|
|
36
36
|
labelVerticalAlign: {},
|
|
37
37
|
labelBackground: { type: Boolean },
|
|
38
38
|
labelFit: {},
|
|
@@ -42,11 +42,11 @@ const C = { "data-vis-component": "" }, L = c.selectors, H = /* @__PURE__ */ d({
|
|
|
42
42
|
labelFontSize: {},
|
|
43
43
|
labelTextSeparator: {},
|
|
44
44
|
labelForceWordBreak: { type: Boolean },
|
|
45
|
-
labelColor: {
|
|
46
|
-
labelCursor: {
|
|
45
|
+
labelColor: {},
|
|
46
|
+
labelCursor: {},
|
|
47
47
|
labelVisibility: { type: Function },
|
|
48
48
|
subLabelFontSize: {},
|
|
49
|
-
subLabelColor: {
|
|
49
|
+
subLabelColor: {},
|
|
50
50
|
subLabelPlacement: {},
|
|
51
51
|
subLabelToLabelInlineWidthRatio: {},
|
|
52
52
|
duration: {},
|
|
@@ -54,29 +54,29 @@ const C = { "data-vis-component": "" }, L = c.selectors, H = /* @__PURE__ */ d({
|
|
|
54
54
|
attributes: {},
|
|
55
55
|
data: {}
|
|
56
56
|
},
|
|
57
|
-
setup(
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
|
|
57
|
+
setup(u, { expose: c }) {
|
|
58
|
+
const n = b(S), l = u, t = m(() => n.data.value ?? l.data), a = x(l), o = h();
|
|
59
|
+
return y(() => {
|
|
60
|
+
g(() => {
|
|
61
61
|
var e;
|
|
62
|
-
|
|
62
|
+
o.value = new d(a.value), (e = o.value) == null || e.setData(t.value), n.update(o.value);
|
|
63
63
|
});
|
|
64
|
-
}),
|
|
64
|
+
}), v(() => {
|
|
65
65
|
var e;
|
|
66
|
-
(e =
|
|
67
|
-
}),
|
|
66
|
+
(e = o.value) == null || e.destroy(), n.destroy();
|
|
67
|
+
}), s(a, (e, i) => {
|
|
68
68
|
var r;
|
|
69
|
-
|
|
70
|
-
}),
|
|
69
|
+
C(e, i) || (r = o.value) == null || r.setConfig(a.value);
|
|
70
|
+
}), s(t, () => {
|
|
71
71
|
var e;
|
|
72
|
-
(e =
|
|
73
|
-
}),
|
|
74
|
-
component:
|
|
75
|
-
}), (e,
|
|
72
|
+
(e = o.value) == null || e.setData(t.value);
|
|
73
|
+
}), c({
|
|
74
|
+
component: o
|
|
75
|
+
}), (e, i) => (f(), k("div", F));
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
export {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
H as VisSankeySelectors,
|
|
80
|
+
M as default
|
|
81
81
|
};
|
|
82
82
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } 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 = SankeyConfigInterface<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<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisSankeySelectors","Sankey","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAqBC,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CnC,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 t=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),y={"data-vis-component":""},m=u.Scatter.selectors,S=t.defineComponent({__name:"index",props:{color:{},size:{},sizeScale:{type:[Object,Function]},sizeRange:{},shape:{type:[Function,String]},label:{},labelColor:{},labelHideOverlapping:{type:Boolean},cursor:{},labelTextBrightnessRatio:{},labelPosition:{},strokeColor:{},strokeWidth:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const a=t.inject(v.componentAccessorKey),s=p,n=t.computed(()=>a.data.value??s.data),c=i.useForwardProps(s),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.Scatter(c.value),(e=o.value)==null||e.setData(n.value),a.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),a.destroy()}),t.watch(c,(e,r)=>{var l;i.arePropsEqual(e,r)||(l=o.value)==null||l.setConfig(c.value)}),t.watch(n,()=>{var e;(e=o.value)==null||e.setData(n.value)}),d({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",y))}});exports.VisScatterSelectors=m;exports.default=S;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/scatter/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Scatter, ScatterConfigInterface, 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 = ScatterConfigInterface<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<Scatter<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<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 VisScatterSelectors = Scatter.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisScatterSelectors","Scatter","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAsBC,EAAAA,QAAQ,+eA3CrC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAoB,EAGtCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,GACvCM,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"}
|
|
@@ -59,7 +59,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
59
59
|
labelTextBrightnessRatio?: number;
|
|
60
60
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
61
61
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
62
|
-
component: import("vue").Ref<Scatter<Datum>>;
|
|
62
|
+
component: import("vue").Ref<Scatter<Datum>, Scatter<Datum>>;
|
|
63
63
|
}>): void;
|
|
64
64
|
attrs: any;
|
|
65
65
|
slots: {};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, inject as m, computed as v, ref as y, onMounted as f, nextTick as b, onUnmounted as x, watch as l, openBlock as _, createElementBlock as F } from "vue";
|
|
2
2
|
import { Scatter as i } from "@unovis/ts";
|
|
3
|
-
import { useForwardProps as
|
|
3
|
+
import { useForwardProps as S, arePropsEqual as g } from "../../utils/props.js";
|
|
4
4
|
import { componentAccessorKey as h } from "../../utils/context.js";
|
|
5
|
-
const k = { "data-vis-component": "" },
|
|
5
|
+
const k = { "data-vis-component": "" }, w = i.selectors, z = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
-
color: {
|
|
9
|
-
size: {
|
|
8
|
+
color: {},
|
|
9
|
+
size: {},
|
|
10
10
|
sizeScale: { type: [Object, Function] },
|
|
11
11
|
sizeRange: {},
|
|
12
12
|
shape: { type: [Function, String] },
|
|
13
|
-
label: {
|
|
14
|
-
labelColor: {
|
|
13
|
+
label: {},
|
|
14
|
+
labelColor: {},
|
|
15
15
|
labelHideOverlapping: { type: Boolean },
|
|
16
|
-
cursor: {
|
|
16
|
+
cursor: {},
|
|
17
17
|
labelTextBrightnessRatio: {},
|
|
18
|
-
labelPosition: {
|
|
19
|
-
strokeColor: {
|
|
20
|
-
strokeWidth: {
|
|
21
|
-
x: {
|
|
22
|
-
y: {
|
|
18
|
+
labelPosition: {},
|
|
19
|
+
strokeColor: {},
|
|
20
|
+
strokeWidth: {},
|
|
21
|
+
x: {},
|
|
22
|
+
y: {},
|
|
23
23
|
id: { type: Function },
|
|
24
24
|
xScale: { type: [Object, Function] },
|
|
25
25
|
yScale: { type: [Object, Function] },
|
|
@@ -29,29 +29,29 @@ const k = { "data-vis-component": "" }, N = i.selectors, O = /* @__PURE__ */ y({
|
|
|
29
29
|
attributes: {},
|
|
30
30
|
data: {}
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
setup(u, { expose: p }) {
|
|
33
|
+
const o = m(h), c = u, a = v(() => o.data.value ?? c.data), n = S(c), t = y();
|
|
34
|
+
return f(() => {
|
|
35
35
|
b(() => {
|
|
36
36
|
var e;
|
|
37
|
-
t.value = new i(
|
|
37
|
+
t.value = new i(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
|
|
38
38
|
});
|
|
39
|
-
}),
|
|
39
|
+
}), x(() => {
|
|
40
40
|
var e;
|
|
41
|
-
(e = t.value) == null || e.destroy(),
|
|
42
|
-
}),
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
}),
|
|
41
|
+
(e = t.value) == null || e.destroy(), o.destroy();
|
|
42
|
+
}), l(n, (e, s) => {
|
|
43
|
+
var r;
|
|
44
|
+
g(e, s) || (r = t.value) == null || r.setConfig(n.value);
|
|
45
|
+
}), l(a, () => {
|
|
46
46
|
var e;
|
|
47
|
-
(e = t.value) == null || e.setData(
|
|
47
|
+
(e = t.value) == null || e.setData(a.value);
|
|
48
48
|
}), p({
|
|
49
49
|
component: t
|
|
50
|
-
}), (e,
|
|
50
|
+
}), (e, s) => (_(), F("div", k));
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
w as VisScatterSelectors,
|
|
55
|
+
z as default
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.vue
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/scatter/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Scatter, ScatterConfigInterface, 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 = ScatterConfigInterface<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<Scatter<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Scatter<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 VisScatterSelectors = Scatter.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisScatterSelectors","Scatter","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAoB;AAGtC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,IACvCM,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 t=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),d=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),m={"data-vis-component":""},y=d.StackedBar.selectors,b=t.defineComponent({__name:"index",props:{color:{},barWidth:{},barMaxWidth:{},dataStep:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},cursor:{},barMinHeight1Px:{type:Boolean},barMinHeightZeroValue:{},orientation:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(l,{expose:p}){const a=t.inject(v.componentAccessorKey),c=l,n=t.computed(()=>a.data.value??c.data),r=i.useForwardProps(c),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new d.StackedBar(r.value),(e=o.value)==null||e.setData(n.value),a.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),a.destroy()}),t.watch(r,(e,s)=>{var u;i.arePropsEqual(e,s)||(u=o.value)==null||u.setConfig(r.value)}),t.watch(n,()=>{var e;(e=o.value)==null||e.setData(n.value)}),p({component:o}),(e,s)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisStackedBarSelectors=y;exports.default=b;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/stacked-bar/index.vue
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/stacked-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { StackedBar, StackedBarConfigInterface, 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 = StackedBarConfigInterface<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<StackedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new StackedBar<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 VisStackedBarSelectors = StackedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisStackedBarSelectors","StackedBar","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAyBC,EAAAA,WAAW,qbA3C3C,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAuB,EAGzCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,aAAkBQ,EAAO,KAAK,GAC1CM,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"}
|
|
@@ -56,7 +56,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
56
56
|
barMinHeightZeroValue?: any;
|
|
57
57
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
58
58
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
59
|
-
component: import("vue").Ref<StackedBar<Datum>>;
|
|
59
|
+
component: import("vue").Ref<StackedBar<Datum>, StackedBar<Datum>>;
|
|
60
60
|
}>): void;
|
|
61
61
|
attrs: any;
|
|
62
62
|
slots: {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { StackedBar as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as p, inject as m, computed as v, ref as f, onMounted as y, nextTick as x, onUnmounted as b, watch as i, openBlock as _, createElementBlock as h } from "vue";
|
|
2
|
+
import { StackedBar as u } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as B, arePropsEqual as S } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as g } from "../../utils/context.js";
|
|
5
|
+
const k = { "data-vis-component": "" }, j = u.selectors, w = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
-
color: {
|
|
8
|
+
color: {},
|
|
9
9
|
barWidth: {},
|
|
10
10
|
barMaxWidth: {},
|
|
11
11
|
dataStep: {},
|
|
12
12
|
barPadding: {},
|
|
13
13
|
roundedCorners: { type: [Number, Boolean] },
|
|
14
|
-
cursor: {
|
|
14
|
+
cursor: {},
|
|
15
15
|
barMinHeight1Px: { type: Boolean },
|
|
16
16
|
barMinHeightZeroValue: {},
|
|
17
17
|
orientation: {},
|
|
18
|
-
x: {
|
|
19
|
-
y: {
|
|
18
|
+
x: {},
|
|
19
|
+
y: {},
|
|
20
20
|
id: { type: Function },
|
|
21
21
|
xScale: { type: [Object, Function] },
|
|
22
22
|
yScale: { type: [Object, Function] },
|
|
@@ -26,25 +26,25 @@ const B = { "data-vis-component": "" }, j = l.selectors, w = /* @__PURE__ */ d({
|
|
|
26
26
|
attributes: {},
|
|
27
27
|
data: {}
|
|
28
28
|
},
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
|
|
29
|
+
setup(d, { expose: l }) {
|
|
30
|
+
const o = m(g), r = d, a = v(() => o.data.value ?? r.data), n = B(r), t = f();
|
|
31
|
+
return y(() => {
|
|
32
|
+
x(() => {
|
|
33
33
|
var e;
|
|
34
|
-
t.value = new
|
|
34
|
+
t.value = new u(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
|
|
35
35
|
});
|
|
36
|
-
}),
|
|
36
|
+
}), b(() => {
|
|
37
37
|
var e;
|
|
38
38
|
(e = t.value) == null || e.destroy(), o.destroy();
|
|
39
|
-
}), i(
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
}), i(
|
|
39
|
+
}), i(n, (e, c) => {
|
|
40
|
+
var s;
|
|
41
|
+
S(e, c) || (s = t.value) == null || s.setConfig(n.value);
|
|
42
|
+
}), i(a, () => {
|
|
43
43
|
var e;
|
|
44
|
-
(e = t.value) == null || e.setData(
|
|
45
|
-
}),
|
|
44
|
+
(e = t.value) == null || e.setData(a.value);
|
|
45
|
+
}), l({
|
|
46
46
|
component: t
|
|
47
|
-
}), (e, c) => (
|
|
47
|
+
}), (e, c) => (_(), h("div", k));
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/stacked-bar/index.vue
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/stacked-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { StackedBar, StackedBarConfigInterface, 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 = StackedBarConfigInterface<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<StackedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new StackedBar<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 VisStackedBarSelectors = StackedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisStackedBarSelectors","StackedBar","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;AA3C3C,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAuB;AAGzC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAkBQ,EAAO,KAAK,IAC1CM,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;;;"}
|