@unovis/vue 1.6.5 → 1.6.6-beta.1
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.js +18 -20
- package/components/annotations/index.js.map +1 -1
- package/components/area/index.cjs +1 -1
- package/components/area/index.cjs.map +1 -1
- package/components/area/index.js +21 -25
- 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.js +23 -26
- 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.js +22 -25
- 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.js +21 -25
- 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.js +21 -25
- 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.js +21 -25
- 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.js +21 -25
- 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.js +21 -25
- 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.js +20 -24
- 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.js +21 -25
- 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.js +21 -25
- package/components/nested-donut/index.js.map +1 -1
- package/components/plotband/index.cjs +1 -1
- package/components/plotband/index.cjs.map +1 -1
- package/components/plotband/index.js +18 -20
- package/components/plotband/index.js.map +1 -1
- package/components/plotline/index.cjs +1 -1
- package/components/plotline/index.cjs.map +1 -1
- package/components/plotline/index.js +18 -20
- package/components/plotline/index.js.map +1 -1
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.js +21 -24
- 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.js +21 -25
- 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.js +21 -25
- 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.js +21 -25
- 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.js +17 -19
- 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.js +21 -25
- package/components/topojson-map/index.js.map +1 -1
- package/components/treemap/index.cjs +1 -1
- package/components/treemap/index.cjs.map +1 -1
- package/components/treemap/index.js +21 -25
- package/components/treemap/index.js.map +1 -1
- package/components/xy-labels/index.cjs +1 -1
- package/components/xy-labels/index.cjs.map +1 -1
- package/components/xy-labels/index.js +21 -25
- package/components/xy-labels/index.js.map +1 -1
- package/containers/single-container/index.cjs +1 -1
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.js +23 -24
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/index.cjs +1 -1
- package/containers/xy-container/index.cjs.map +1 -1
- package/containers/xy-container/index.js +22 -29
- package/containers/xy-container/index.js.map +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.js +21 -23
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/flow-legend/index.cjs +1 -1
- package/html-components/flow-legend/index.cjs.map +1 -1
- package/html-components/flow-legend/index.js +20 -22
- package/html-components/flow-legend/index.js.map +1 -1
- package/html-components/leaflet-flow-map/index.cjs +1 -1
- package/html-components/leaflet-flow-map/index.cjs.map +1 -1
- package/html-components/leaflet-flow-map/index.js +21 -24
- package/html-components/leaflet-flow-map/index.js.map +1 -1
- package/html-components/leaflet-map/index.cjs +1 -1
- package/html-components/leaflet-map/index.cjs.map +1 -1
- package/html-components/leaflet-map/index.js +21 -24
- package/html-components/leaflet-map/index.js.map +1 -1
- package/html-components/rolling-pin-legend/index.cjs +1 -1
- package/html-components/rolling-pin-legend/index.cjs.map +1 -1
- package/html-components/rolling-pin-legend/index.js +21 -23
- package/html-components/rolling-pin-legend/index.js.map +1 -1
- package/package.json +5 -4
- package/utils/context.cjs.map +1 -1
- package/utils/context.js +1 -1
- package/utils/context.js.map +1 -1
- package/utils/props.cjs +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +1 -4
- package/utils/props.js +9 -9
- package/utils/props.js.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Treemap as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as p, inject as d, computed as m, ref as f, onMounted as y, nextTick as F, onUnmounted as b, watch as r, openBlock as v, createElementBlock as S } from "vue";
|
|
2
|
+
import { Treemap as s } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as B, arePropsEqual as T } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as g } from "../../utils/context.js";
|
|
5
|
+
const L = { "data-vis-component": "" }, z = s.selectors, k = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
id: { type: Function },
|
|
@@ -36,29 +36,25 @@ const _ = { "data-vis-component": "" }, k = c.selectors, A = /* @__PURE__ */ d({
|
|
|
36
36
|
attributes: {},
|
|
37
37
|
data: {}
|
|
38
38
|
},
|
|
39
|
-
setup(u, { expose:
|
|
40
|
-
const
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
t.value = new c(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
|
|
39
|
+
setup(u, { expose: c }) {
|
|
40
|
+
const t = d(g), a = u, o = m(() => t.data.value ?? a.data), n = B(a), e = f();
|
|
41
|
+
return y(() => {
|
|
42
|
+
F(() => {
|
|
43
|
+
e.value = new s(n.value), e.value?.setData(o.value), t.update(e.value);
|
|
45
44
|
});
|
|
46
|
-
}),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}), p({
|
|
56
|
-
component: t
|
|
57
|
-
}), (e, i) => (S(), B("div", _));
|
|
45
|
+
}), b(() => {
|
|
46
|
+
e.value?.destroy(), t.destroy();
|
|
47
|
+
}), r(n, (l, i) => {
|
|
48
|
+
T(l, i) || (e.value?.setConfig(n.value), e.value?.render());
|
|
49
|
+
}), r(o, () => {
|
|
50
|
+
e.value?.setData(o.value);
|
|
51
|
+
}), c({
|
|
52
|
+
component: e
|
|
53
|
+
}), (l, i) => (v(), S("div", L));
|
|
58
54
|
}
|
|
59
55
|
});
|
|
60
56
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
z as VisTreemapSelectors,
|
|
58
|
+
k as default
|
|
63
59
|
};
|
|
64
60
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, 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 = TreemapConfigInterface<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<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<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 VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, 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 = TreemapConfigInterface<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<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5C3C,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,GACjDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBT,EAAS,QAAA;AAAA,IACX,CAAC,GAEDc,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),a=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),d={"data-vis-component":""},F=i.XYLabels.selectors,g=e.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},y:{type:[Function,Number,null]},xPositioning:{type:[Function,String,null]},yPositioning:{type:[Function,String,null]},labelFontSize:{type:[Function,Number,null]},label:{type:[Function,String,null]},backgroundColor:{type:[Function,String,Array,null]},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},clustering:{type:Boolean},clusterLabel:{type:[Function,String,null]},clusterFontSize:{type:[Function,Number,null]},clusterBackgroundColor:{type:[Function,String,Array,null]},clusterCursor:{type:[Function,String,null]},clusterLabelColor:{type:[Function,String,Array,null]},x:{type:[Function,Number,null]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const n=e.inject(y.componentAccessorKey),u=s,o=e.computed(()=>n.data.value??u.data),l=a.useForwardProps(u),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.XYLabels(l.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(l,(r,c)=>{a.arePropsEqual(r,c)||(t.value?.setConfig(l.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),p({component:t}),(r,c)=>(e.openBlock(),e.createElementBlock("div",d))}});exports.VisXYLabelsSelectors=F;exports.default=g;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, 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 = XYLabelsConfigInterface<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<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<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 VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, 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 = XYLabelsConfigInterface<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<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAuBC,EAAAA,SAAS,04BA5C7C,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,WAAgBQ,EAAO,KAAK,EAClDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBT,EAAS,QAAA,CACX,CAAC,EAEDc,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { XYLabels as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as p, inject as y, computed as d, ref as m, onMounted as F, nextTick as g, onUnmounted as b, watch as c, openBlock as v, createElementBlock as S } from "vue";
|
|
2
|
+
import { XYLabels as a } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as f, arePropsEqual as x } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as _ } from "../../utils/context.js";
|
|
5
|
+
const C = { "data-vis-component": "" }, L = a.selectors, N = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
color: { type: [Function, String, Array, null] },
|
|
@@ -30,29 +30,25 @@ const B = { "data-vis-component": "" }, N = i.selectors, P = /* @__PURE__ */ y({
|
|
|
30
30
|
attributes: {},
|
|
31
31
|
data: {}
|
|
32
32
|
},
|
|
33
|
-
setup(
|
|
34
|
-
const e =
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
n.value = new i(l.value), (t = n.value) == null || t.setData(o.value), e.update(n.value);
|
|
33
|
+
setup(i, { expose: s }) {
|
|
34
|
+
const e = y(_), l = i, n = d(() => e.data.value ?? l.data), o = f(l), t = m();
|
|
35
|
+
return F(() => {
|
|
36
|
+
g(() => {
|
|
37
|
+
t.value = new a(o.value), t.value?.setData(n.value), e.update(t.value);
|
|
39
38
|
});
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}), p({
|
|
50
|
-
component: n
|
|
51
|
-
}), (t, u) => (v(), f("div", B));
|
|
39
|
+
}), b(() => {
|
|
40
|
+
t.value?.destroy(), e.destroy();
|
|
41
|
+
}), c(o, (r, u) => {
|
|
42
|
+
x(r, u) || (t.value?.setConfig(o.value), t.value?.render());
|
|
43
|
+
}), c(n, () => {
|
|
44
|
+
t.value?.setData(n.value);
|
|
45
|
+
}), s({
|
|
46
|
+
component: t
|
|
47
|
+
}), (r, u) => (v(), S("div", C));
|
|
52
48
|
}
|
|
53
49
|
});
|
|
54
50
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
L as VisXYLabelsSelectors,
|
|
52
|
+
N as default
|
|
57
53
|
};
|
|
58
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, 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 = XYLabelsConfigInterface<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<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<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 VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, 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 = XYLabelsConfigInterface<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<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5C7C,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAgBQ,EAAO,KAAK,GAClDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBT,EAAS,QAAA;AAAA,IACX,CAAC,GAEDc,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@unovis/ts"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@unovis/ts"),r=require("../../utils/context.cjs"),v=require("../../utils/props.cjs"),f=e.defineComponent({__name:"index",props:{component:{},tooltip:{},annotations:{},onRenderComplete:{type:Function},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(d,{expose:p}){const s=d,{data:a}=e.toRefs(s),l=v.useForwardProps(s);let t;const o=e.reactive({component:void 0,tooltip:void 0,annotations:void 0}),i=e.ref(),c=()=>{t||i.value&&o.component&&(t=new u.SingleContainer(i.value,{...e.toRaw(o)},a.value))};return e.watchEffect(()=>{c(),o.component?.config,t?.updateContainer({...e.toRaw(l.value),...e.toRaw(o)})}),e.watch(a,()=>{t?t.setData(a.value,!0):c()}),e.onUnmounted(()=>t?.destroy()),e.provide(r.componentAccessorKey,{data:a,update:n=>o.component=n,destroy:()=>o.component=void 0}),e.provide(r.tooltipAccessorKey,{data:a,update:n=>o.tooltip=n,destroy:()=>{o.tooltip=void 0}}),e.provide(r.annotationsAccessorKey,{data:a,update:n=>o.annotations=n,destroy:()=>{o.annotations=void 0}}),p({component:t}),(n,m)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:i,class:"unovis-single-container"},[e.renderSlot(n.$slots,"default")],512))}});exports.default=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":"ycAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAAA,OAAOH,CAAK,EACvBI,EAAcC,EAAAA,gBAAgBL,CAAK,EAEzC,IAAIM,EACJ,MAAMC,EAASC,EAAAA,SAAS,CACtB,UAAW,OACX,QAAS,OACT,YAAa,MAAA,CACd,EACKC,EAAQC,EAAAA,IAAA,EAERC,EAAY,IAAM,CAClBL,GACAG,EAAM,OAASF,EAAO,YACxBD,EAAQ,IAAIM,EAAAA,gBAAgBH,EAAM,MAAO,CAAE,GAAGI,EAAAA,MAAMN,CAAM,CAAA,EAAKL,EAAK,KAAK,EAC7E,EAEAY,OAAAA,EAAAA,YAAY,IAAM,CAChBH,EAAA,EAEUJ,EAAO,WAAW,OAC5BD,GAAO,gBAAgB,CAAE,GAAGO,QAAMT,EAAY,KAAK,EAAG,GAAGS,EAAAA,MAAMN,CAAM,EAAG,CAC1E,CAAC,EAEDQ,EAAAA,MAAMb,EAAM,IAAM,CACZI,EACFA,EAAM,QAAQJ,EAAK,MAAO,EAAI,EAE9BS,EAAA,CAEJ,CAAC,EAEDK,cAAY,IAAMV,GAAO,SAAS,EAElCW,EAAAA,QAAQC,EAAAA,qBAAsB,CAC5B,KAAAhB,EACA,OAASiB,GAAwBZ,EAAO,UAAYY,EACpD,QAAS,IAAMZ,EAAO,UAAY,MAAA,CACnC,EAEDU,EAAAA,QAAQG,EAAAA,mBAAoB,CAC1B,KAAAlB,EACA,OAASmB,GAAed,EAAO,QAAUc,EACzC,QAAS,IAAM,CAAEd,EAAO,QAAU,MAAU,CAAA,CAC7C,EAEDU,EAAAA,QAAQK,EAAAA,uBAAwB,CAC9B,KAAApB,EACA,OAASqB,GAAmBhB,EAAO,YAAcgB,EACjD,QAAS,IAAM,CAAEhB,EAAO,YAAc,MAAU,CAAA,CACjD,EAGDiB,EAAa,CACX,UAAWlB,CAAA,CACZ,wBAICmB,EAAAA,mBAEM,MAAA,CAFD,4BAAA,WAA8B,QAAJ,IAAIhB,EAAQ,MAAM,yBAAA,GAC/CiB,aAAQC,EAAA,OAAA,SAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as m, toRefs as f, reactive as u, ref as v, watchEffect as g, watch as y, onUnmounted as
|
|
2
|
-
import { SingleContainer as
|
|
1
|
+
import { defineComponent as m, toRefs as f, reactive as u, ref as v, watchEffect as g, watch as y, onUnmounted as h, provide as i, openBlock as w, createElementBlock as _, renderSlot as C, toRaw as r } from "vue";
|
|
2
|
+
import { SingleContainer as R } from "@unovis/ts";
|
|
3
3
|
import { componentAccessorKey as k, tooltipAccessorKey as x, annotationsAccessorKey as A } from "../../utils/context.js";
|
|
4
4
|
import { useForwardProps as K } from "../../utils/props.js";
|
|
5
5
|
const S = /* @__PURE__ */ m({
|
|
@@ -19,46 +19,45 @@ const S = /* @__PURE__ */ m({
|
|
|
19
19
|
ariaLabel: {},
|
|
20
20
|
data: {}
|
|
21
21
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
const
|
|
22
|
+
setup(p, { expose: d }) {
|
|
23
|
+
const s = p, { data: n } = f(s), l = K(s);
|
|
24
|
+
let e;
|
|
25
|
+
const o = u({
|
|
26
26
|
component: void 0,
|
|
27
27
|
tooltip: void 0,
|
|
28
28
|
annotations: void 0
|
|
29
|
-
}),
|
|
30
|
-
|
|
29
|
+
}), a = v(), c = () => {
|
|
30
|
+
e || a.value && o.component && (e = new R(a.value, { ...r(o) }, n.value));
|
|
31
31
|
};
|
|
32
32
|
return g(() => {
|
|
33
|
-
|
|
34
|
-
p(), (t = e.component) == null || t.config, o == null || o.updateContainer({ ...s(l.value), ...s(e) });
|
|
33
|
+
c(), o.component?.config, e?.updateContainer({ ...r(l.value), ...r(o) });
|
|
35
34
|
}), y(n, () => {
|
|
36
|
-
|
|
37
|
-
}),
|
|
35
|
+
e ? e.setData(n.value, !0) : c();
|
|
36
|
+
}), h(() => e?.destroy()), i(k, {
|
|
38
37
|
data: n,
|
|
39
|
-
update: (t) =>
|
|
40
|
-
destroy: () =>
|
|
41
|
-
}),
|
|
38
|
+
update: (t) => o.component = t,
|
|
39
|
+
destroy: () => o.component = void 0
|
|
40
|
+
}), i(x, {
|
|
42
41
|
data: n,
|
|
43
|
-
update: (t) =>
|
|
42
|
+
update: (t) => o.tooltip = t,
|
|
44
43
|
destroy: () => {
|
|
45
|
-
|
|
44
|
+
o.tooltip = void 0;
|
|
46
45
|
}
|
|
47
|
-
}),
|
|
46
|
+
}), i(A, {
|
|
48
47
|
data: n,
|
|
49
|
-
update: (t) =>
|
|
48
|
+
update: (t) => o.annotations = t,
|
|
50
49
|
destroy: () => {
|
|
51
|
-
|
|
50
|
+
o.annotations = void 0;
|
|
52
51
|
}
|
|
53
52
|
}), d({
|
|
54
|
-
component:
|
|
55
|
-
}), (t, B) => (
|
|
53
|
+
component: e
|
|
54
|
+
}), (t, B) => (w(), _("div", {
|
|
56
55
|
"data-vis-single-container": "",
|
|
57
56
|
ref_key: "elRef",
|
|
58
|
-
ref:
|
|
57
|
+
ref: a,
|
|
59
58
|
class: "unovis-single-container"
|
|
60
59
|
}, [
|
|
61
|
-
|
|
60
|
+
C(t.$slots, "default")
|
|
62
61
|
], 512));
|
|
63
62
|
}
|
|
64
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GACR,EAAE,MAAAC,EAAA,IAASC,EAAOH,CAAK,GACvBI,IAAcC,EAAgBL,CAAK;AAEzC,QAAIM;AACJ,UAAMC,IAASC,EAAS;AAAA,MACtB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,aAAa;AAAA,IAAA,CACd,GACKC,IAAQC,EAAA,GAERC,IAAY,MAAM;AACtB,MAAIL,KACAG,EAAM,SAASF,EAAO,cACxBD,IAAQ,IAAIM,EAAgBH,EAAM,OAAO,EAAE,GAAGI,EAAMN,CAAM,EAAA,GAAKL,EAAK,KAAK;AAAA,IAC7E;AAEA,WAAAY,EAAY,MAAM;AAChB,MAAAH,EAAA,GAEUJ,EAAO,WAAW,QAC5BD,GAAO,gBAAgB,EAAE,GAAGO,EAAMT,EAAY,KAAK,GAAG,GAAGS,EAAMN,CAAM,GAAG;AAAA,IAC1E,CAAC,GAEDQ,EAAMb,GAAM,MAAM;AAChB,MAAII,IACFA,EAAM,QAAQJ,EAAK,OAAO,EAAI,IAE9BS,EAAA;AAAA,IAEJ,CAAC,GAEDK,EAAY,MAAMV,GAAO,SAAS,GAElCW,EAAQC,GAAsB;AAAA,MAC5B,MAAAhB;AAAA,MACA,QAAQ,CAACiB,MAAwBZ,EAAO,YAAYY;AAAA,MACpD,SAAS,MAAMZ,EAAO,YAAY;AAAA,IAAA,CACnC,GAEDU,EAAQG,GAAoB;AAAA,MAC1B,MAAAlB;AAAA,MACA,QAAQ,CAAC,MAAeK,EAAO,UAAU;AAAA,MACzC,SAAS,MAAM;AAAE,QAAAA,EAAO,UAAU;AAAA,MAAU;AAAA,IAAA,CAC7C,GAEDU,EAAQI,GAAwB;AAAA,MAC9B,MAAAnB;AAAA,MACA,QAAQ,CAACoB,MAAmBf,EAAO,cAAce;AAAA,MACjD,SAAS,MAAM;AAAE,QAAAf,EAAO,cAAc;AAAA,MAAU;AAAA,IAAA,CACjD,GAGDgB,EAAa;AAAA,MACX,WAAWjB;AAAA,IAAA,CACZ,mBAICkB,EAEM,OAAA;AAAA,MAFD,6BAAA;AAAA,eAA8B;AAAA,MAAJ,KAAIf;AAAA,MAAQ,OAAM;AAAA,IAAA;MAC/CgB,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),y=require("@unovis/ts"),s=require("../../utils/context.cjs"),v=require("../../utils/props.cjs"),m=o.defineComponent({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},clipPathExtend:{},onRenderComplete:{type:Function},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(d,{expose:l}){const c=d,{data:n}=o.toRefs(c),u=v.useForwardProps(c),a=o.ref(),t=o.reactive({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),r=o.ref(),p=()=>{a.value||!r.value||!Object.values(t).some(i=>Array.isArray(i)?i.length:i)||(a.value=new y.XYContainer(r.value,{...o.toRaw(t)},n.value))};return o.watchEffect(()=>{p(),t.components.map(e=>e.config),a.value?.updateContainer({...o.toRaw(u.value),...o.toRaw(t)})}),o.watch(n,()=>{a.value?a.value.setData(n.value,!0):p()}),o.onUnmounted(()=>a.value?.destroy()),o.provide(s.componentAccessorKey,{data:n,update:e=>t.components=[...t.components,e],destroy:()=>t.components=t.components?.filter(e=>!e.isDestroyed())}),o.provide(s.axisAccessorKey,{data:n,update:e=>t[`${e.config.type}Axis`]=e,destroy:e=>{t[`${e}Axis`]=void 0}}),o.provide(s.crosshairAccessorKey,{data:n,update:e=>t.crosshair=e,destroy:()=>{t.crosshair=void 0}}),o.provide(s.tooltipAccessorKey,{data:n,update:e=>t.tooltip=e,destroy:()=>{t.tooltip=void 0}}),o.provide(s.annotationsAccessorKey,{data:n,update:e=>t.annotations=e,destroy:()=>{t.annotations=void 0}}),l({component:a}),(e,i)=>(o.openBlock(),o.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:r,class:"unovis-xy-container"},[o.renderSlot(e.$slots,"default")],512))}});exports.default=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport {
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T>>()\nconst config = reactive({\n components: [],\n annotations: undefined,\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as XYContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart.value || !elRef.value) return\n // config holds only child-registration slots — if all are empty, no slot has registered yet\n const hasContent = Object.values(config).some(v => Array.isArray(v) ? v.length : v)\n if (!hasContent) return\n chart.value = new XYContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // touch deep changes in components config to track them\n const t = config.components.map(i => i.config)\n chart.value?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart.value) chart.value.setData(data.value, true)\n else initChart()\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.components = [...config.components!, c],\n destroy: () => config.components = config.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config[`${c.config.type}Axis`] = c,\n destroy: (c) => { config[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.crosshair = c,\n destroy: () => { config.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","ref","config","reactive","elRef","initChart","v","XYContainer","toRaw","watchEffect","i","watch","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":"mzBAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAAA,OAAOH,CAAK,EACvBI,EAAcC,EAAAA,gBAAgBL,CAAK,EAEnCM,EAAQC,EAAAA,IAAA,EACRC,EAASC,EAAAA,SAAS,CACtB,WAAY,CAAA,EACZ,YAAa,OACb,UAAW,OACX,QAAS,OACT,MAAO,OACP,MAAO,MAAA,CACR,EACKC,EAAQH,EAAAA,IAAA,EAERI,EAAY,IAAM,CAClBL,EAAM,OAAS,CAACI,EAAM,OAGtB,CADe,OAAO,OAAOF,CAAM,EAAE,KAAKI,GAAK,MAAM,QAAQA,CAAC,EAAIA,EAAE,OAASA,CAAC,IAElFN,EAAM,MAAQ,IAAIO,EAAAA,YAAYH,EAAM,MAAO,CAAE,GAAGI,EAAAA,MAAMN,CAAM,GAAKN,EAAK,KAAK,EAC7E,EAEAa,OAAAA,EAAAA,YAAY,IAAM,CAChBJ,EAAA,EAEUH,EAAO,WAAW,IAAIQ,GAAKA,EAAE,MAAM,EAC7CV,EAAM,OAAO,gBAAgB,CAAE,GAAGQ,EAAAA,MAAMV,EAAY,KAAK,EAAG,GAAGU,QAAMN,CAAM,CAAA,CAAG,CAChF,CAAC,EAEDS,EAAAA,MAAMf,EAAM,IAAM,CACZI,EAAM,MAAOA,EAAM,MAAM,QAAQJ,EAAK,MAAO,EAAI,EAChDS,EAAA,CACP,CAAC,EAEDO,EAAAA,YAAY,IAAMZ,EAAM,OAAO,QAAA,CAAS,EAExCa,EAAAA,QAAQC,EAAAA,qBAAsB,CAC5B,KAAAlB,EACA,OAASmB,GAA0Bb,EAAO,WAAa,CAAC,GAAGA,EAAO,WAAaa,CAAC,EAChF,QAAS,IAAMb,EAAO,WAAaA,EAAO,YAAY,OAAOa,GAAK,CAACA,EAAE,YAAA,CAAa,CAAA,CACnF,EAEDF,EAAAA,QAAQG,EAAAA,gBAAiB,CACvB,KAAApB,EACA,OAASmB,GAAeb,EAAO,GAAGa,EAAE,OAAO,IAAI,MAAM,EAAIA,EACzD,QAAUA,GAAM,CAAEb,EAAO,GAAGa,CAAC,MAAM,EAAI,MAAU,CAAA,CAClD,EAEDF,EAAAA,QAAQI,EAAAA,qBAAsB,CAC5B,KAAArB,EACA,OAASmB,GAAoBb,EAAO,UAAYa,EAChD,QAAS,IAAM,CAAEb,EAAO,UAAY,MAAU,CAAA,CAC/C,EAEDW,EAAAA,QAAQK,EAAAA,mBAAoB,CAC1B,KAAAtB,EACA,OAASuB,GAAejB,EAAO,QAAUiB,EACzC,QAAS,IAAM,CAAEjB,EAAO,QAAU,MAAU,CAAA,CAC7C,EAEDW,EAAAA,QAAQO,EAAAA,uBAAwB,CAC9B,KAAAxB,EACA,OAASyB,GAAmBnB,EAAO,YAAcmB,EACjD,QAAS,IAAM,CAAEnB,EAAO,YAAc,MAAU,CAAA,CACjD,EAEDoB,EAAa,CACX,UAAWtB,CAAA,CACZ,wBAICuB,EAAAA,mBAEM,MAAA,CAFD,wBAAA,WAA0B,QAAJ,IAAInB,EAAQ,MAAM,qBAAA,GAC3CoB,aAAQC,EAAA,OAAA,SAAA,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, toRefs as v, ref as d, reactive as f, watchEffect as x, toRaw as r, watch as h, onUnmounted as A, provide as a, openBlock as g, createElementBlock as D, renderSlot as C } from "vue";
|
|
2
2
|
import { XYContainer as R } from "@unovis/ts";
|
|
3
|
-
import { componentAccessorKey as w, axisAccessorKey as B, crosshairAccessorKey as
|
|
4
|
-
import { useForwardProps as
|
|
5
|
-
const
|
|
3
|
+
import { componentAccessorKey as w, axisAccessorKey as B, crosshairAccessorKey as _, tooltipAccessorKey as K, annotationsAccessorKey as M } from "../../utils/context.js";
|
|
4
|
+
import { useForwardProps as b } from "../../utils/props.js";
|
|
5
|
+
const O = /* @__PURE__ */ y({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
components: {},
|
|
@@ -37,62 +37,55 @@ const S = /* @__PURE__ */ u({
|
|
|
37
37
|
ariaLabel: {},
|
|
38
38
|
data: {}
|
|
39
39
|
},
|
|
40
|
-
setup(
|
|
41
|
-
const c =
|
|
40
|
+
setup(l, { expose: m }) {
|
|
41
|
+
const c = l, { data: t } = v(c), u = b(c), n = d(), e = f({
|
|
42
42
|
components: [],
|
|
43
43
|
annotations: void 0,
|
|
44
44
|
crosshair: void 0,
|
|
45
45
|
tooltip: void 0,
|
|
46
46
|
xAxis: void 0,
|
|
47
47
|
yAxis: void 0
|
|
48
|
-
}),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}), D(() => {
|
|
57
|
-
var o;
|
|
58
|
-
return (o = n.value) == null ? void 0 : o.destroy();
|
|
59
|
-
}), a(w, {
|
|
48
|
+
}), i = d(), p = () => {
|
|
49
|
+
n.value || !i.value || !Object.values(e).some((s) => Array.isArray(s) ? s.length : s) || (n.value = new R(i.value, { ...r(e) }, t.value));
|
|
50
|
+
};
|
|
51
|
+
return x(() => {
|
|
52
|
+
p(), e.components.map((o) => o.config), n.value?.updateContainer({ ...r(u.value), ...r(e) });
|
|
53
|
+
}), h(t, () => {
|
|
54
|
+
n.value ? n.value.setData(t.value, !0) : p();
|
|
55
|
+
}), A(() => n.value?.destroy()), a(w, {
|
|
60
56
|
data: t,
|
|
61
57
|
update: (o) => e.components = [...e.components, o],
|
|
62
|
-
destroy: () =>
|
|
63
|
-
var o;
|
|
64
|
-
return e.components = (o = e.components) == null ? void 0 : o.filter((i) => !i.isDestroyed());
|
|
65
|
-
}
|
|
58
|
+
destroy: () => e.components = e.components?.filter((o) => !o.isDestroyed())
|
|
66
59
|
}), a(B, {
|
|
67
60
|
data: t,
|
|
68
61
|
update: (o) => e[`${o.config.type}Axis`] = o,
|
|
69
62
|
destroy: (o) => {
|
|
70
63
|
e[`${o}Axis`] = void 0;
|
|
71
64
|
}
|
|
72
|
-
}), a(
|
|
65
|
+
}), a(_, {
|
|
73
66
|
data: t,
|
|
74
67
|
update: (o) => e.crosshair = o,
|
|
75
68
|
destroy: () => {
|
|
76
69
|
e.crosshair = void 0;
|
|
77
70
|
}
|
|
78
|
-
}), a(
|
|
71
|
+
}), a(K, {
|
|
79
72
|
data: t,
|
|
80
73
|
update: (o) => e.tooltip = o,
|
|
81
74
|
destroy: () => {
|
|
82
75
|
e.tooltip = void 0;
|
|
83
76
|
}
|
|
84
|
-
}), a(
|
|
77
|
+
}), a(M, {
|
|
85
78
|
data: t,
|
|
86
79
|
update: (o) => e.annotations = o,
|
|
87
80
|
destroy: () => {
|
|
88
81
|
e.annotations = void 0;
|
|
89
82
|
}
|
|
90
|
-
}),
|
|
83
|
+
}), m({
|
|
91
84
|
component: n
|
|
92
|
-
}), (o,
|
|
85
|
+
}), (o, s) => (g(), D("div", {
|
|
93
86
|
"data-vis-xy-container": "",
|
|
94
87
|
ref_key: "elRef",
|
|
95
|
-
ref:
|
|
88
|
+
ref: i,
|
|
96
89
|
class: "unovis-xy-container"
|
|
97
90
|
}, [
|
|
98
91
|
C(o.$slots, "default")
|
|
@@ -100,6 +93,6 @@ const S = /* @__PURE__ */ u({
|
|
|
100
93
|
}
|
|
101
94
|
});
|
|
102
95
|
export {
|
|
103
|
-
|
|
96
|
+
O as default
|
|
104
97
|
};
|
|
105
98
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T>>()\nconst config = reactive({\n components: [],\n annotations: undefined,\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as XYContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart.value || !elRef.value) return\n // config holds only child-registration slots — if all are empty, no slot has registered yet\n const hasContent = Object.values(config).some(v => Array.isArray(v) ? v.length : v)\n if (!hasContent) return\n chart.value = new XYContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // touch deep changes in components config to track them\n const t = config.components.map(i => i.config)\n chart.value?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart.value) chart.value.setData(data.value, true)\n else initChart()\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.components = [...config.components!, c],\n destroy: () => config.components = config.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config[`${c.config.type}Axis`] = c,\n destroy: (c) => { config[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.crosshair = c,\n destroy: () => { config.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","ref","config","reactive","elRef","initChart","v","XYContainer","toRaw","watchEffect","i","watch","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GACR,EAAE,MAAAC,EAAA,IAASC,EAAOH,CAAK,GACvBI,IAAcC,EAAgBL,CAAK,GAEnCM,IAAQC,EAAA,GACRC,IAASC,EAAS;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,aAAa;AAAA,MACb,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,MACP,OAAO;AAAA,IAAA,CACR,GACKC,IAAQH,EAAA,GAERI,IAAY,MAAM;AAItB,MAHIL,EAAM,SAAS,CAACI,EAAM,SAGtB,CADe,OAAO,OAAOF,CAAM,EAAE,KAAK,CAAAI,MAAK,MAAM,QAAQA,CAAC,IAAIA,EAAE,SAASA,CAAC,MAElFN,EAAM,QAAQ,IAAIO,EAAYH,EAAM,OAAO,EAAE,GAAGI,EAAMN,CAAM,KAAKN,EAAK,KAAK;AAAA,IAC7E;AAEA,WAAAa,EAAY,MAAM;AAChB,MAAAJ,EAAA,GAEUH,EAAO,WAAW,IAAI,CAAAQ,MAAKA,EAAE,MAAM,GAC7CV,EAAM,OAAO,gBAAgB,EAAE,GAAGQ,EAAMV,EAAY,KAAK,GAAG,GAAGU,EAAMN,CAAM,EAAA,CAAG;AAAA,IAChF,CAAC,GAEDS,EAAMf,GAAM,MAAM;AAChB,MAAII,EAAM,QAAOA,EAAM,MAAM,QAAQJ,EAAK,OAAO,EAAI,IAChDS,EAAA;AAAA,IACP,CAAC,GAEDO,EAAY,MAAMZ,EAAM,OAAO,QAAA,CAAS,GAExCa,EAAQC,GAAsB;AAAA,MAC5B,MAAAlB;AAAA,MACA,QAAQ,CAACmB,MAA0Bb,EAAO,aAAa,CAAC,GAAGA,EAAO,YAAaa,CAAC;AAAA,MAChF,SAAS,MAAMb,EAAO,aAAaA,EAAO,YAAY,OAAO,CAAAa,MAAK,CAACA,EAAE,YAAA,CAAa;AAAA,IAAA,CACnF,GAEDF,EAAQG,GAAiB;AAAA,MACvB,MAAApB;AAAA,MACA,QAAQ,CAACmB,MAAeb,EAAO,GAAGa,EAAE,OAAO,IAAI,MAAM,IAAIA;AAAA,MACzD,SAAS,CAACA,MAAM;AAAE,QAAAb,EAAO,GAAGa,CAAC,MAAM,IAAI;AAAA,MAAU;AAAA,IAAA,CAClD,GAEDF,EAAQI,GAAsB;AAAA,MAC5B,MAAArB;AAAA,MACA,QAAQ,CAACmB,MAAoBb,EAAO,YAAYa;AAAA,MAChD,SAAS,MAAM;AAAE,QAAAb,EAAO,YAAY;AAAA,MAAU;AAAA,IAAA,CAC/C,GAEDW,EAAQK,GAAoB;AAAA,MAC1B,MAAAtB;AAAA,MACA,QAAQ,CAACuB,MAAejB,EAAO,UAAUiB;AAAA,MACzC,SAAS,MAAM;AAAE,QAAAjB,EAAO,UAAU;AAAA,MAAU;AAAA,IAAA,CAC7C,GAEDW,EAAQO,GAAwB;AAAA,MAC9B,MAAAxB;AAAA,MACA,QAAQ,CAACyB,MAAmBnB,EAAO,cAAcmB;AAAA,MACjD,SAAS,MAAM;AAAE,QAAAnB,EAAO,cAAc;AAAA,MAAU;AAAA,IAAA,CACjD,GAEDoB,EAAa;AAAA,MACX,WAAWtB;AAAA,IAAA,CACZ,mBAICuB,EAEM,OAAA;AAAA,MAFD,yBAAA;AAAA,eAA0B;AAAA,MAAJ,KAAInB;AAAA,MAAQ,OAAM;AAAA,IAAA;MAC3CoB,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@unovis/ts"),a=require("../../utils/props.cjs"),c=s.BulletLegend.selectors,p=e.defineComponent({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletSpacing:{},bulletShape:{type:[Function,null]},orientation:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(d,{expose:i}){const l=d;e.computed(()=>l.data);const n=a.useForwardProps(l),t=e.ref(),o=e.ref();return e.onMounted(()=>{e.nextTick(()=>{o.value&&(t.value=new s.BulletLegend(o.value,{...n.value,renderIntoProvidedDomNode:!0}))})}),e.onUnmounted(()=>{t.value?.destroy()}),e.watch(n,(r,u)=>{a.arePropsEqual(r,u)||(t.value?.setConfig(n.value),t.value?.render())}),i({component:t}),(r,u)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:o},null,512))}});exports.VisBulletLegendSelectors=c;exports.default=p;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/bullet-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = BulletLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<BulletLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new BulletLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n</script>\n\n<template>\n <div data-vis-bullet-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-bullet-legend] {\n display:block;\n }\n</style>\n"],"names":["VisBulletLegendSelectors","BulletLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/bullet-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = BulletLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<BulletLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new BulletLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n component.value?.render()\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n</script>\n\n<template>\n <div data-vis-bullet-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-bullet-legend] {\n display:block;\n }\n</style>\n"],"names":["VisBulletLegendSelectors","BulletLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":"8LA+CaA,EAA2BC,EAAAA,aAAa,2SAtCrD,MAAMC,EAAQC,EAEDC,EAAAA,SAAS,IAAMF,EAAM,IAAI,EAEtC,MAAMG,EAASC,EAAAA,gBAAgBJ,CAAK,EAG9BK,EAAYC,EAAAA,IAAA,EACZC,EAAQD,EAAAA,IAAA,EAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACTF,EAAU,MAAQ,IAAIN,EAAAA,aAAaQ,EAAM,MAAO,CAAE,GAAGJ,EAAO,MAAO,0BAA2B,EAAA,CAAM,EAGtG,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,CAChBL,EAAU,OAAO,QAAA,CAEnB,CAAC,EAEDM,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BR,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAGDU,EAAa,CACX,UAAAV,CAAA,CACD,wBAQCW,EAAAA,mBAAyC,MAAA,CAApC,yBAAA,WAA2B,QAAJ,IAAIT,CAAA"}
|