@unovis/vue 1.3.0-alpha.2 → 1.3.0-alpha.4
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/area/index.cjs +1 -1
- package/components/area/index.cjs.map +1 -1
- package/components/area/index.d.ts +54 -5
- package/components/area/index.js +18 -16
- 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 +72 -5
- package/components/axis/index.js +18 -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 +58 -5
- package/components/brush/index.js +17 -15
- 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 +56 -5
- package/components/chord-diagram/index.js +18 -16
- 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 +57 -5
- package/components/crosshair/index.js +18 -16
- 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 +58 -5
- package/components/donut/index.js +17 -15
- 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 +58 -5
- package/components/free-brush/index.js +18 -16
- 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 +107 -5
- package/components/graph/index.js +18 -16
- 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 +58 -5
- package/components/grouped-bar/index.js +18 -16
- 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 +55 -5
- package/components/line/index.js +18 -16
- 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 +60 -5
- package/components/nested-donut/index.js +18 -16
- 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 +91 -5
- package/components/sankey/index.js +18 -16
- 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 +61 -5
- package/components/scatter/index.js +17 -15
- 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 +58 -5
- package/components/stacked-bar/index.js +18 -16
- 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 +56 -12
- package/components/timeline/index.js +18 -16
- 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 +4 -1
- package/components/tooltip/index.js +18 -16
- 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 +74 -5
- package/components/topojson-map/index.js +18 -16
- 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 +62 -5
- package/components/xy-labels/index.js +18 -16
- 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.d.ts +23 -6
- package/containers/single-container/index.js +27 -31
- 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.d.ts +40 -6
- package/containers/xy-container/index.js +33 -41
- 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.d.ts +10 -2
- package/html-components/bullet-legend/index.js +17 -14
- package/html-components/bullet-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.d.ts +108 -5
- package/html-components/leaflet-flow-map/index.js +17 -15
- 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.d.ts +95 -5
- package/html-components/leaflet-map/index.js +17 -15
- package/html-components/leaflet-map/index.js.map +1 -1
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +6 -5
- package/utils/props.cjs +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.js +10 -9
- package/utils/props.js.map +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as v, toRefs as
|
|
2
|
-
import { SingleContainer as
|
|
3
|
-
import { componentAccessorKey as R, tooltipAccessorKey as
|
|
4
|
-
import { parseProps as
|
|
1
|
+
import { defineComponent as v, toRefs as m, getCurrentInstance as f, computed as g, ref as r, watchEffect as h, watch as y, onUnmounted as _, provide as l, openBlock as C, createElementBlock as w, renderSlot as k } from "vue";
|
|
2
|
+
import { SingleContainer as x } from "@unovis/ts";
|
|
3
|
+
import { componentAccessorKey as R, tooltipAccessorKey as A } from "../../utils/context.js";
|
|
4
|
+
import { parseProps as B } from "../../utils/props.js";
|
|
5
5
|
const b = /* @__PURE__ */ v({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
@@ -17,41 +17,37 @@ const b = /* @__PURE__ */ v({
|
|
|
17
17
|
ariaLabel: {},
|
|
18
18
|
data: {}
|
|
19
19
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const i =
|
|
20
|
+
setup(c, { expose: p }) {
|
|
21
|
+
const i = c, { data: n } = m(i), u = f(), d = g(() => B({ ...i }, u)), o = r(), t = r({
|
|
22
22
|
component: void 0,
|
|
23
23
|
tooltip: void 0
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
c(), (e = n.value) == null || e.updateContainer({ ...s.value, ...o });
|
|
27
|
-
}, c = () => {
|
|
28
|
-
n.value || r.value && o.component && t.value && (n.value = new w(r.value, o, t.value));
|
|
24
|
+
}), a = r(), s = () => {
|
|
25
|
+
o.value || a.value && t.value.component && (o.value = new x(a.value, t.value, n.value));
|
|
29
26
|
};
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
return h(() => {
|
|
28
|
+
var e;
|
|
29
|
+
s(), (e = o.value) == null || e.updateContainer({ ...d.value, ...t.value });
|
|
30
|
+
}), y(n, () => {
|
|
31
|
+
o.value ? o.value.setData(n.value, !0) : s();
|
|
32
|
+
}), _(() => {
|
|
35
33
|
var e;
|
|
36
|
-
return (e =
|
|
37
|
-
}),
|
|
38
|
-
data:
|
|
39
|
-
update: (e) =>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
data: t,
|
|
45
|
-
update: (e) => {
|
|
46
|
-
o.tooltip = e, a();
|
|
47
|
-
},
|
|
34
|
+
return (e = o.value) == null ? void 0 : e.destroy();
|
|
35
|
+
}), l(R, {
|
|
36
|
+
data: n,
|
|
37
|
+
update: (e) => t.value.component = e,
|
|
38
|
+
destroy: () => t.value.component = void 0
|
|
39
|
+
}), l(A, {
|
|
40
|
+
data: n,
|
|
41
|
+
update: (e) => t.value.tooltip = e,
|
|
48
42
|
destroy: () => {
|
|
49
|
-
|
|
43
|
+
t.value.tooltip = void 0;
|
|
50
44
|
}
|
|
51
|
-
}), (
|
|
45
|
+
}), p({
|
|
46
|
+
component: o
|
|
47
|
+
}), (e, D) => (C(), w("div", {
|
|
52
48
|
"data-vis-single-container": "",
|
|
53
49
|
ref_key: "elRef",
|
|
54
|
-
ref:
|
|
50
|
+
ref: a,
|
|
55
51
|
class: "unovis-single-container"
|
|
56
52
|
}, [
|
|
57
53
|
k(e.$slots, "default")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, getCurrentInstance, computed } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey } from \"../../utils/context\"\nimport { parseProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n component: {},\n tooltip: {},\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst instance = getCurrentInstance()\nconst parsedProps = computed(() => parseProps(props, instance))\n\nconst chart = ref<SingleContainer<T> | undefined>()\nconst config
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, getCurrentInstance, computed, watchEffect, Ref, onMounted } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey } from \"../../utils/context\"\nimport { parseProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n component: {},\n tooltip: {},\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst instance = getCurrentInstance()\nconst parsedProps = computed(() => parseProps({ ...props }, instance))\n\nconst chart = ref<SingleContainer<T> | undefined>()\nconst config = ref({\n component: undefined,\n tooltip: undefined,\n}) as Ref<SingleContainerConfigInterface<T>>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart.value) return\n if (elRef.value && config.value.component)\n chart.value = new SingleContainer(elRef.value, config.value, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n chart.value?.updateContainer({ ...parsedProps.value, ...config.value })\n})\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.value.component = c,\n destroy: () => config.value.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.value.tooltip = t,\n destroy: () => { config.value.tooltip = undefined },\n})\n\n__expose({\n component: chart\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-single-container\": \"\",\n ref_key: \"elRef\",\n ref: elRef,\n class: \"unovis-single-container\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","toRefs","instance","getCurrentInstance","parsedProps","computed","parseProps","chart","ref","config","elRef","initChart","SingleContainer","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","_ctx","_cache","_openBlock","_createElementBlock","_renderSlot"],"mappings":";;;;AASA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,SAAS,CAAC;AAAA,IACV,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,SAAS,CAAC;AAAA,IACV,QAAQ,CAAC;AAAA,IACT,OAAO,CAAC;AAAA,IACR,QAAQ,CAAC;AAAA,IACT,SAAS,CAAC;AAAA,IACV,WAAW,CAAC;AAAA,IACZ,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGR,EAAE,MAAAG,EAAA,IAASC,EAAOF,CAAK,GACvBG,IAAWC,KACXC,IAAcC,EAAS,MAAMC,EAAW,EAAE,GAAGP,EAAS,GAAAG,CAAQ,CAAC,GAE/DK,IAAQC,KACRC,IAASD,EAAI;AAAA,MACjB,WAAW;AAAA,MACX,SAAS;AAAA,IAAA,CACV,GACKE,IAAQF,KAERG,IAAY,MAAM;AACtB,MAAIJ,EAAM,SACNG,EAAM,SAASD,EAAO,MAAM,cACxBF,EAAA,QAAQ,IAAIK,EAAgBF,EAAM,OAAOD,EAAO,OAAOT,EAAK,KAAK;AAAA,IAAA;AAG3E,WAAAa,EAAY,MAAM;;AACN,MAAAF,MACJG,IAAAP,EAAA,UAAA,QAAAO,EAAO,gBAAgB,EAAE,GAAGV,EAAY,OAAO,GAAGK,EAAO,MAAA;AAAA,IAAO,CACvE,GAEDM,EAAMf,GAAM,MAAM;AAChB,MAAIO,EAAM,QACRA,EAAM,MAAM,QAAQP,EAAK,OAAO,EAAI,IAE1BW;IACZ,CACD,GAEDK,EAAY,MAAA;;AAAM,cAAAF,IAAAP,EAAM,UAAN,gBAAAO,EAAa;AAAA,KAAS,GAExCG,EAAQC,GAAsB;AAAA,MAC5B,MAAAlB;AAAA,MACA,QAAQ,CAACmB,MAAwBV,EAAO,MAAM,YAAYU;AAAA,MAC1D,SAAS,MAAMV,EAAO,MAAM,YAAY;AAAA,IAAA,CACzC,GAEDQ,EAAQG,GAAoB;AAAA,MAC1B,MAAApB;AAAA,MACA,QAAQ,CAACqB,MAAeZ,EAAO,MAAM,UAAUY;AAAA,MAC/C,SAAS,MAAM;AAAE,QAAAZ,EAAO,MAAM,UAAU;AAAA,MAAU;AAAA,IAAA,CACnD,GAEQX,EAAA;AAAA,MACP,WAAWS;AAAA,IAAA,CACZ,GAEM,CAACe,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAO;AAAA,MAC/C,6BAA6B;AAAA,MAC7B,SAAS;AAAA,MACT,KAAKf;AAAA,MACL,OAAO;AAAA,IAAA,GACN;AAAA,MACDgB,EAAYJ,EAAK,QAAQ,SAAS;AAAA,OACjC,GAAG;AAAA,EAER;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const o=require("vue"),
|
|
1
|
+
"use strict";const o=require("vue"),d=require("@unovis/ts"),s=require("../../utils/context.cjs"),y=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},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(u,{expose:p}){const r=u,{data:n}=o.toRefs(r),l=o.getCurrentInstance(),v=o.computed(()=>y.parseProps({...r},l)),a=o.ref(),t=o.ref({components:[],crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),i=o.ref();return o.watch(n,()=>{a.value&&a.value.setData(n.value,!0)}),o.watchEffect(()=>{var e;(e=a.value)==null||e.updateContainer({...v.value,...t.value})}),o.onMounted(()=>{i.value&&(a.value=new d.XYContainer(i.value,t.value,n.value))}),o.onUnmounted(()=>{var e;return(e=a.value)==null?void 0:e.destroy()}),o.provide(s.componentAccessorKey,{data:n,update:e=>t.value.components=[...t.value.components,e],destroy:()=>{var e;return t.value.components=(e=t.value.components)==null?void 0:e.filter(c=>!c.isDestroyed())}}),o.provide(s.axisAccessorKey,{data:n,update:e=>t.value[`${e.config.type}Axis`]=e,destroy:e=>{t.value[`${e}Axis`]=void 0}}),o.provide(s.crosshairAccessorKey,{data:n,update:e=>t.value.crosshair=e,destroy:()=>{t.value.crosshair=void 0}}),o.provide(s.tooltipAccessorKey,{data:n,update:e=>t.value.tooltip=e,destroy:()=>{t.value.tooltip=void 0}}),p({component:a}),(e,c)=>(o.openBlock(),o.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:i,class:"unovis-xy-container"},[o.renderSlot(e.$slots,"default")],512))}});module.exports=m;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, getCurrentInstance, computed } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey } from \"../../utils/context\"\nimport { parseProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n components: {},\n xScale: { type: [Object, Function] },\n xDomain: {},\n xDomainMinConstraint: {},\n xDomainMaxConstraint: {},\n xRange: {},\n yScale: { type: [Object, Function] },\n yDomain: {},\n yDomainMinConstraint: {},\n yDomainMaxConstraint: {},\n yRange: {},\n yDirection: {},\n xAxis: {},\n yAxis: {},\n autoMargin: { type: Boolean },\n tooltip: {},\n crosshair: {},\n preventEmptyDomain: { type: [Boolean, null] },\n scaleByDomain: { type: Boolean },\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst instance = getCurrentInstance()\nconst parsedProps = computed(() => parseProps(props, instance))\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, getCurrentInstance, computed, reactive, watchEffect, shallowRef, Ref } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey } from \"../../utils/context\"\nimport { parseProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n components: {},\n xScale: { type: [Object, Function] },\n xDomain: {},\n xDomainMinConstraint: {},\n xDomainMaxConstraint: {},\n xRange: {},\n yScale: { type: [Object, Function] },\n yDomain: {},\n yDomainMinConstraint: {},\n yDomainMaxConstraint: {},\n yRange: {},\n yDirection: {},\n xAxis: {},\n yAxis: {},\n autoMargin: { type: Boolean },\n tooltip: {},\n crosshair: {},\n preventEmptyDomain: { type: [Boolean, null] },\n scaleByDomain: { type: Boolean },\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst instance = getCurrentInstance()\nconst parsedProps = computed(() => parseProps({ ...props }, instance))\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = ref({\n components: [],\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as Ref<XYContainerConfigInterface<T>>\nconst elRef = ref<HTMLDivElement>()\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n }\n})\n\nwatchEffect(() => {\n chart.value?.updateContainer({ ...parsedProps.value, ...config.value })\n})\n\nonMounted(() => {\n if (elRef.value) chart.value = new XYContainer(elRef.value, config.value, data.value)\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.value.components = [...config.value.components!, c],\n destroy: () => config.value.components = config.value.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config.value[`${c.config.type}Axis`] = c,\n destroy: (c) => { config.value[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.value.crosshair = c,\n destroy: () => { config.value.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.value.tooltip = t,\n destroy: () => { config.value.tooltip = undefined },\n})\n\n__expose({\n component: chart\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-xy-container\": \"\",\n ref_key: \"elRef\",\n ref: elRef,\n class: \"unovis-xy-container\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","toRefs","instance","getCurrentInstance","parsedProps","computed","parseProps","chart","ref","config","elRef","watch","watchEffect","_a","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","_ctx","_cache","_openBlock","_createElementBlock","_renderSlot"],"mappings":"oIAS4BA,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,WAAY,CAAC,EACb,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,QAAS,CAAC,EACV,qBAAsB,CAAC,EACvB,qBAAsB,CAAC,EACvB,OAAQ,CAAC,EACT,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,QAAS,CAAC,EACV,qBAAsB,CAAC,EACvB,qBAAsB,CAAC,EACvB,OAAQ,CAAC,EACT,WAAY,CAAC,EACb,MAAO,CAAC,EACR,MAAO,CAAC,EACR,WAAY,CAAE,KAAM,OAAQ,EAC5B,QAAS,CAAC,EACV,UAAW,CAAC,EACZ,mBAAoB,CAAE,KAAM,CAAC,QAAS,IAAI,CAAE,EAC5C,cAAe,CAAE,KAAM,OAAQ,EAC/B,SAAU,CAAC,EACX,OAAQ,CAAC,EACT,QAAS,CAAC,EACV,OAAQ,CAAC,EACT,MAAO,CAAC,EACR,OAAQ,CAAC,EACT,QAAS,CAAC,EACV,UAAW,CAAC,EACZ,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAGR,CAAE,KAAAG,CAAA,EAASC,EAAA,OAAOF,CAAK,EACvBG,EAAWC,EAAAA,qBACXC,EAAcC,WAAS,IAAMC,EAAA,WAAW,CAAE,GAAGP,CAAS,EAAAG,CAAQ,CAAC,EAE/DK,EAAQC,EAAAA,MACRC,EAASD,EAAAA,IAAI,CACjB,WAAY,CAAC,EACb,UAAW,OACX,QAAS,OACT,MAAO,OACP,MAAO,MAAA,CACR,EACKE,EAAQF,EAAAA,MAEdG,OAAAA,EAAA,MAAMX,EAAM,IAAM,CACZO,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ACRC,EAAA,UAAA,EAAcC,EAAA,mBAAoB,MAAO,CAC/C,wBAAyB,GACzB,QAAS,QACT,IAAKjB,EACL,MAAO,qBAAA,EACN,CACDkB,aAAYJ,EAAK,OAAQ,SAAS,GACjC,GAAG,EAER,CAEA,CAAC"}
|
|
@@ -1,9 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { XYContainer, XYComponentCore, Tooltip, Crosshair, Axis } from '@unovis/ts';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
declare const _default: <T>(__VLS_props: any, __VLS_ctx?: {
|
|
4
|
+
attrs: any;
|
|
5
|
+
emit: any;
|
|
6
|
+
slots: any;
|
|
7
|
+
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
8
|
+
props: {
|
|
9
|
+
xScale?: import("@unovis/ts").ContinuousScale;
|
|
10
|
+
yScale?: import("@unovis/ts").ContinuousScale;
|
|
11
|
+
duration?: number;
|
|
12
|
+
data?: T[];
|
|
13
|
+
tooltip?: Tooltip;
|
|
14
|
+
components?: XYComponentCore<T, import("@unovis/ts/lib/core/xy-component/config").XYComponentConfig<T>, Partial<import("@unovis/ts").XYComponentConfigInterface<T>>>[];
|
|
15
|
+
margin?: import("@unovis/ts").Spacing;
|
|
16
|
+
padding?: import("@unovis/ts").Spacing;
|
|
17
|
+
sizing?: string;
|
|
18
|
+
width?: string | number;
|
|
19
|
+
height?: string | number;
|
|
20
|
+
svgDefs?: string;
|
|
21
|
+
ariaLabel?: string;
|
|
22
|
+
xDomain?: [number, number];
|
|
23
|
+
xDomainMinConstraint?: [number, number];
|
|
24
|
+
xDomainMaxConstraint?: [number, number];
|
|
25
|
+
xRange?: [number, number];
|
|
26
|
+
yDomain?: [number, number];
|
|
27
|
+
yDomainMinConstraint?: [number, number];
|
|
28
|
+
yDomainMaxConstraint?: [number, number];
|
|
29
|
+
yRange?: [number, number];
|
|
30
|
+
yDirection?: string;
|
|
31
|
+
xAxis?: Axis<T>;
|
|
32
|
+
yAxis?: Axis<T>;
|
|
33
|
+
autoMargin?: boolean;
|
|
34
|
+
crosshair?: Crosshair<T>;
|
|
35
|
+
preventEmptyDomain?: boolean;
|
|
36
|
+
scaleByDomain?: boolean;
|
|
37
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
38
|
+
expose(exposed: {
|
|
39
|
+
component: Ref<XYContainer<T>>;
|
|
40
|
+
}): void;
|
|
7
41
|
attrs: any;
|
|
8
42
|
slots: {
|
|
9
43
|
default?(_: {}): any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { XYContainer as
|
|
3
|
-
import { componentAccessorKey as
|
|
1
|
+
import { defineComponent as v, toRefs as m, getCurrentInstance as y, computed as f, ref as i, watch as x, watchEffect as h, onMounted as D, onUnmounted as g, provide as a, openBlock as A, createElementBlock as C, renderSlot as B } from "vue";
|
|
2
|
+
import { XYContainer as M } from "@unovis/ts";
|
|
3
|
+
import { componentAccessorKey as _, axisAccessorKey as R, crosshairAccessorKey as w, tooltipAccessorKey as K } from "../../utils/context.js";
|
|
4
4
|
import { parseProps as b } from "../../utils/props.js";
|
|
5
|
-
const j = /* @__PURE__ */
|
|
5
|
+
const j = /* @__PURE__ */ v({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
components: {},
|
|
@@ -34,66 +34,58 @@ const j = /* @__PURE__ */ y({
|
|
|
34
34
|
ariaLabel: {},
|
|
35
35
|
data: {}
|
|
36
36
|
},
|
|
37
|
-
setup(
|
|
38
|
-
const r =
|
|
37
|
+
setup(l, { expose: p }) {
|
|
38
|
+
const r = l, { data: t } = m(r), u = y(), d = f(() => b({ ...r }, u)), n = i(), o = i({
|
|
39
39
|
components: [],
|
|
40
40
|
crosshair: void 0,
|
|
41
41
|
tooltip: void 0,
|
|
42
42
|
xAxis: void 0,
|
|
43
43
|
yAxis: void 0
|
|
44
|
-
}, s =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}), l(c, () => {
|
|
51
|
-
n();
|
|
44
|
+
}), s = i();
|
|
45
|
+
return x(t, () => {
|
|
46
|
+
n.value && n.value.setData(t.value, !0);
|
|
47
|
+
}), h(() => {
|
|
48
|
+
var e;
|
|
49
|
+
(e = n.value) == null || e.updateContainer({ ...d.value, ...o.value });
|
|
52
50
|
}), D(() => {
|
|
53
|
-
s.value && (
|
|
51
|
+
s.value && (n.value = new M(s.value, o.value, t.value));
|
|
54
52
|
}), g(() => {
|
|
55
|
-
var
|
|
56
|
-
return (
|
|
57
|
-
}),
|
|
53
|
+
var e;
|
|
54
|
+
return (e = n.value) == null ? void 0 : e.destroy();
|
|
55
|
+
}), a(_, {
|
|
58
56
|
data: t,
|
|
59
|
-
update: (
|
|
60
|
-
e.components = [...e.components, o], n();
|
|
61
|
-
},
|
|
57
|
+
update: (e) => o.value.components = [...o.value.components, e],
|
|
62
58
|
destroy: () => {
|
|
63
|
-
var
|
|
64
|
-
return
|
|
59
|
+
var e;
|
|
60
|
+
return o.value.components = (e = o.value.components) == null ? void 0 : e.filter((c) => !c.isDestroyed());
|
|
65
61
|
}
|
|
66
|
-
}),
|
|
62
|
+
}), a(R, {
|
|
67
63
|
data: t,
|
|
68
|
-
update: (
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
destroy: (o) => {
|
|
72
|
-
e[`${o}Axis`] = void 0;
|
|
64
|
+
update: (e) => o.value[`${e.config.type}Axis`] = e,
|
|
65
|
+
destroy: (e) => {
|
|
66
|
+
o.value[`${e}Axis`] = void 0;
|
|
73
67
|
}
|
|
74
|
-
}),
|
|
68
|
+
}), a(w, {
|
|
75
69
|
data: t,
|
|
76
|
-
update: (
|
|
77
|
-
e.crosshair = o, n();
|
|
78
|
-
},
|
|
70
|
+
update: (e) => o.value.crosshair = e,
|
|
79
71
|
destroy: () => {
|
|
80
|
-
|
|
72
|
+
o.value.crosshair = void 0;
|
|
81
73
|
}
|
|
82
|
-
}),
|
|
74
|
+
}), a(K, {
|
|
83
75
|
data: t,
|
|
84
|
-
update: (
|
|
85
|
-
e.tooltip = o, n();
|
|
86
|
-
},
|
|
76
|
+
update: (e) => o.value.tooltip = e,
|
|
87
77
|
destroy: () => {
|
|
88
|
-
|
|
78
|
+
o.value.tooltip = void 0;
|
|
89
79
|
}
|
|
90
|
-
}),
|
|
80
|
+
}), p({
|
|
81
|
+
component: n
|
|
82
|
+
}), (e, c) => (A(), C("div", {
|
|
91
83
|
"data-vis-xy-container": "",
|
|
92
84
|
ref_key: "elRef",
|
|
93
85
|
ref: s,
|
|
94
86
|
class: "unovis-xy-container"
|
|
95
87
|
}, [
|
|
96
|
-
|
|
88
|
+
B(e.$slots, "default")
|
|
97
89
|
], 512));
|
|
98
90
|
}
|
|
99
91
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, getCurrentInstance, computed } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey } from \"../../utils/context\"\nimport { parseProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n components: {},\n xScale: { type: [Object, Function] },\n xDomain: {},\n xDomainMinConstraint: {},\n xDomainMaxConstraint: {},\n xRange: {},\n yScale: { type: [Object, Function] },\n yDomain: {},\n yDomainMinConstraint: {},\n yDomainMaxConstraint: {},\n yRange: {},\n yDirection: {},\n xAxis: {},\n yAxis: {},\n autoMargin: { type: Boolean },\n tooltip: {},\n crosshair: {},\n preventEmptyDomain: { type: [Boolean, null] },\n scaleByDomain: { type: Boolean },\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst instance = getCurrentInstance()\nconst parsedProps = computed(() => parseProps(props, instance))\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, getCurrentInstance, computed, reactive, watchEffect, shallowRef, Ref } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey } from \"../../utils/context\"\nimport { parseProps } from \"../../utils/props\"\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n components: {},\n xScale: { type: [Object, Function] },\n xDomain: {},\n xDomainMinConstraint: {},\n xDomainMaxConstraint: {},\n xRange: {},\n yScale: { type: [Object, Function] },\n yDomain: {},\n yDomainMinConstraint: {},\n yDomainMaxConstraint: {},\n yRange: {},\n yDirection: {},\n xAxis: {},\n yAxis: {},\n autoMargin: { type: Boolean },\n tooltip: {},\n crosshair: {},\n preventEmptyDomain: { type: [Boolean, null] },\n scaleByDomain: { type: Boolean },\n duration: {},\n margin: {},\n padding: {},\n sizing: {},\n width: {},\n height: {},\n svgDefs: {},\n ariaLabel: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n\nconst { data } = toRefs(props)\nconst instance = getCurrentInstance()\nconst parsedProps = computed(() => parseProps({ ...props }, instance))\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = ref({\n components: [],\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as Ref<XYContainerConfigInterface<T>>\nconst elRef = ref<HTMLDivElement>()\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n }\n})\n\nwatchEffect(() => {\n chart.value?.updateContainer({ ...parsedProps.value, ...config.value })\n})\n\nonMounted(() => {\n if (elRef.value) chart.value = new XYContainer(elRef.value, config.value, data.value)\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.value.components = [...config.value.components!, c],\n destroy: () => config.value.components = config.value.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config.value[`${c.config.type}Axis`] = c,\n destroy: (c) => { config.value[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.value.crosshair = c,\n destroy: () => { config.value.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.value.tooltip = t,\n destroy: () => { config.value.tooltip = undefined },\n})\n\n__expose({\n component: chart\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-xy-container\": \"\",\n ref_key: \"elRef\",\n ref: elRef,\n class: \"unovis-xy-container\"\n }, [\n _renderSlot(_ctx.$slots, \"default\")\n ], 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","toRefs","instance","getCurrentInstance","parsedProps","computed","parseProps","chart","ref","config","elRef","watch","watchEffect","_a","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","_ctx","_cache","_openBlock","_createElementBlock","_renderS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Q,CAACuB,MAAed,EAAO,MAAM,UAAUc;AAAA,MAC/C,SAAS,MAAM;AAAE,QAAAd,EAAO,MAAM,UAAU;AAAA,MAAU;AAAA,IAAA,CACnD,GAEQX,EAAA;AAAA,MACP,WAAWS;AAAA,IAAA,CACZ,GAEM,CAACiB,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAO;AAAA,MAC/C,yBAAyB;AAAA,MACzB,SAAS;AAAA,MACT,KAAKjB;AAAA,MACL,OAAO;AAAA,IAAA,GACN;AAAA,MACDkB,EAAYJ,EAAK,QAAQ,SAAS;AAAA,OACjC,GAAG;AAAA,EAER;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),
|
|
1
|
+
"use strict";const e=require("vue"),d=require("@unovis/ts"),c=require("../../utils/props.cjs"),f=e.defineComponent({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletShape:{},data:{}},setup(r,{expose:i}){const a=r;e.computed(()=>a.data);const p=e.getCurrentInstance(),o=e.computed(()=>c.parseProps({...a},p)),n=e.ref(),l=e.ref();return e.onMounted(()=>{e.nextTick(()=>{l.value&&(n.value=new d.BulletLegend(l.value,o.value))})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy()}),e.watch(o,(t,s)=>{var u;c.arePropsEqual(t,s)||(u=n.value)==null||u.update(o.value)}),i({component:n}),(t,s)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:l},null,512))}});module.exports=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/bullet-legend/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\n\n\n// data and required props\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n items: {},\n labelClassName: {},\n onLegendItemClick: { type: Function },\n labelFontSize: {},\n labelMaxWidth: {},\n bulletSize: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\n\nconst data = computed(() => props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps(props, instance))\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)\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?.update(config.value)\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/bullet-legend/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\n\n\n// data and required props\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n items: {},\n labelClassName: {},\n onLegendItemClick: { type: Function },\n labelFontSize: {},\n labelMaxWidth: {},\n bulletSize: {},\n bulletShape: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\n\nconst data = computed(() => props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\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)\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?.update(config.value)\n }\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-bullet-legend\": \"\",\n ref_key: \"elRef\",\n ref: elRef\n }, null, 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","computed","instance","getCurrentInstance","config","parseProps","component","ref","elRef","onMounted","nextTick","BulletLegend","onUnmounted","_a","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"+FAU4BA,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,MAAO,CAAC,EACR,eAAgB,CAAC,EACjB,kBAAmB,CAAE,KAAM,QAAS,EACpC,cAAe,CAAC,EAChB,cAAe,CAAC,EAChB,WAAY,CAAC,EACb,YAAa,CAAC,EACd,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAIDG,WAAS,IAAMD,EAAM,IAAI,EAEtC,MAAME,EAAWC,EAAAA,qBACXC,EAASH,WAAS,IAAMI,EAAA,WAAW,CAAE,GAAGL,CAAS,EAAAE,CAAQ,CAAC,EAG1DI,EAAYC,EAAAA,MACZC,EAAQD,EAAAA,MAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACTF,EAAU,MAAQ,IAAIK,EAAA,aAAaH,EAAM,MAAOJ,EAAO,KAAK,EAAA,CAG7D,CAAA,CACF,EAEDQ,EAAAA,YAAY,IAAM,QAChBC,EAAAP,EAAU,QAAV,MAAAO,EAAiB,SAAQ,CAE1B,EAEKC,EAAAA,MAAAV,EAAQ,CAACW,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAP,EAAA,QAAA,MAAAO,EAAO,OAAOT,EAAO,MACjC,CACD,EAEQL,EAAA,CACP,UAAAO,CAAA,CACD,EAEM,CAACY,EAAUC,KACRC,EAAA,UAAA,EAAcC,EAAA,mBAAoB,MAAO,CAC/C,yBAA0B,GAC1B,QAAS,QACT,IAAKb,CAAA,EACJ,KAAM,GAAG,EAEd,CAEA,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BulletLegendItemInterface } from '@unovis/ts';
|
|
1
|
+
import { BulletLegend, BulletLegendItemInterface } from '@unovis/ts';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
items: {
|
|
4
4
|
type: import("vue").PropType<BulletLegendItemInterface[]>;
|
|
@@ -19,10 +19,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
bulletSize: {
|
|
20
20
|
type: import("vue").PropType<string>;
|
|
21
21
|
};
|
|
22
|
+
bulletShape: {
|
|
23
|
+
type: import("vue").PropType<import("@unovis/ts").BulletShape>;
|
|
24
|
+
};
|
|
22
25
|
data: {
|
|
23
26
|
type: import("vue").PropType<never>;
|
|
24
27
|
};
|
|
25
|
-
}, {
|
|
28
|
+
}, {
|
|
29
|
+
component: import("vue").Ref<BulletLegend>;
|
|
30
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
31
|
items: {
|
|
27
32
|
type: import("vue").PropType<BulletLegendItemInterface[]>;
|
|
28
33
|
required: true;
|
|
@@ -42,6 +47,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
47
|
bulletSize: {
|
|
43
48
|
type: import("vue").PropType<string>;
|
|
44
49
|
};
|
|
50
|
+
bulletShape: {
|
|
51
|
+
type: import("vue").PropType<import("@unovis/ts").BulletShape>;
|
|
52
|
+
};
|
|
45
53
|
data: {
|
|
46
54
|
type: import("vue").PropType<never>;
|
|
47
55
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, computed as u, getCurrentInstance as m, ref as c, onMounted as f, nextTick as v, onUnmounted as _, watch as b, openBlock as x, createElementBlock as g } from "vue";
|
|
2
2
|
import { BulletLegend as k } from "@unovis/ts";
|
|
3
|
-
import { parseProps as
|
|
4
|
-
const w = /* @__PURE__ */
|
|
3
|
+
import { parseProps as h, arePropsEqual as C } from "../../utils/props.js";
|
|
4
|
+
const w = /* @__PURE__ */ d({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
7
|
items: {},
|
|
@@ -10,23 +10,26 @@ const w = /* @__PURE__ */ p({
|
|
|
10
10
|
labelFontSize: {},
|
|
11
11
|
labelMaxWidth: {},
|
|
12
12
|
bulletSize: {},
|
|
13
|
+
bulletShape: {},
|
|
13
14
|
data: {}
|
|
14
15
|
},
|
|
15
|
-
setup(s) {
|
|
16
|
+
setup(s, { expose: p }) {
|
|
16
17
|
const a = s;
|
|
17
|
-
|
|
18
|
-
const i =
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
o.value && (
|
|
18
|
+
u(() => a.data);
|
|
19
|
+
const i = m(), n = u(() => h({ ...a }, i)), t = c(), o = c();
|
|
20
|
+
return f(() => {
|
|
21
|
+
v(() => {
|
|
22
|
+
o.value && (t.value = new k(o.value, n.value));
|
|
22
23
|
});
|
|
23
|
-
}),
|
|
24
|
+
}), _(() => {
|
|
24
25
|
var e;
|
|
25
|
-
(e =
|
|
26
|
-
}),
|
|
26
|
+
(e = t.value) == null || e.destroy();
|
|
27
|
+
}), b(n, (e, l) => {
|
|
27
28
|
var r;
|
|
28
|
-
C(e, l) || (r =
|
|
29
|
-
}), (
|
|
29
|
+
C(e, l) || (r = t.value) == null || r.update(n.value);
|
|
30
|
+
}), p({
|
|
31
|
+
component: t
|
|
32
|
+
}), (e, l) => (x(), g("div", {
|
|
30
33
|
"data-vis-bullet-legend": "",
|
|
31
34
|
ref_key: "elRef",
|
|
32
35
|
ref: o
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/html-components/bullet-legend/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\n\n\n// data and required props\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n items: {},\n labelClassName: {},\n onLegendItemClick: { type: Function },\n labelFontSize: {},\n labelMaxWidth: {},\n bulletSize: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\n\nconst data = computed(() => props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps(props, instance))\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)\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?.update(config.value)\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/html-components/bullet-legend/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\n\n\n// data and required props\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n items: {},\n labelClassName: {},\n onLegendItemClick: { type: Function },\n labelFontSize: {},\n labelMaxWidth: {},\n bulletSize: {},\n bulletShape: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\n\nconst data = computed(() => props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\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)\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?.update(config.value)\n }\n})\n\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-bullet-legend\": \"\",\n ref_key: \"elRef\",\n ref: elRef\n }, null, 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","computed","instance","getCurrentInstance","config","parseProps","component","ref","elRef","onMounted","nextTick","BulletLegend","onUnmounted","_a","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;AAUA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,OAAO,CAAC;AAAA,IACR,gBAAgB,CAAC;AAAA,IACjB,mBAAmB,EAAE,MAAM,SAAS;AAAA,IACpC,eAAe,CAAC;AAAA,IAChB,eAAe,CAAC;AAAA,IAChB,YAAY,CAAC;AAAA,IACb,aAAa,CAAC;AAAA,IACd,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF;AAID,IAAAG,EAAS,MAAMD,EAAM,IAAI;AAEtC,UAAME,IAAWC,KACXC,IAASH,EAAS,MAAMI,EAAW,EAAE,GAAGL,EAAS,GAAAE,CAAQ,CAAC,GAG1DI,IAAYC,KACZC,IAAQD;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIK,EAAaH,EAAM,OAAOJ,EAAO,KAAK;AAAA,MAAA,CAG7D;AAAA,IAAA,CACF,GAEDQ,EAAY,MAAM;;AAChB,OAAAC,IAAAP,EAAU,UAAV,QAAAO,EAAiB;AAAA,IAAQ,CAE1B,GAEKC,EAAAV,GAAQ,CAACW,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAP,EAAA,UAAA,QAAAO,EAAO,OAAOT,EAAO;AAAA,IACjC,CACD,GAEQL,EAAA;AAAA,MACP,WAAAO;AAAA,IAAA,CACD,GAEM,CAACY,GAAUC,OACRC,EAAA,GAAcC,EAAoB,OAAO;AAAA,MAC/C,0BAA0B;AAAA,MAC1B,SAAS;AAAA,MACT,KAAKb;AAAA,IAAA,GACJ,MAAM,GAAG;AAAA,EAEd;AAEA,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),
|
|
1
|
+
"use strict";const t=require("vue"),d=require("@unovis/ts"),c=require("../../utils/props.cjs"),F=t.defineComponent({__name:"index",props:{sourceLongitude:{type:[Function,Number,null]},sourceLatitude:{type:[Function,Number,null]},targetLongitude:{type:[Function,Number,null]},targetLatitude:{type:[Function,Number,null]},sourcePointRadius:{type:[Function,Number,null]},sourcePointColor:{type:[Function,String,Array,null]},flowParticleColor:{type:[Function,String,Array,null]},flowParticleRadius:{type:[Function,Number,null]},flowParticleSpeed:{type:[Function,Number,null]},flowParticleDensity:{type:[Function,Number,null]},onSourcePointClick:{type:Function},onSourcePointMouseEnter:{type:Function},onSourcePointMouseLeave:{type:Function},width:{},height:{},flyToDuration:{},fitViewPadding:{},zoomDuration:{},initialBounds:{},fitBoundsOnUpdate:{},fitViewOnInit:{type:Boolean},fitViewOnUpdate:{type:Boolean},style:{},styleDarkTheme:{},accessToken:{},attribution:{},renderer:{},onMapInitialized:{type:Function},onMapMoveZoom:{type:Function},onMapMoveStart:{type:Function},onMapMoveEnd:{type:Function},onMapZoomStart:{type:Function},onMapZoomEnd:{type:Function},onMapClick:{type:Function},pointLongitude:{type:[Function,Number,null]},pointLatitude:{type:[Function,Number,null]},pointId:{type:[Function,String,null]},pointShape:{type:[Function,null]},pointColor:{type:[Function,String,Array,null]},pointRadius:{type:[Function,Number,null]},pointLabel:{type:[Function,String,null]},pointLabelColor:{type:[Function,String,null]},pointBottomLabel:{type:[Function,String,null]},pointCursor:{type:[Function,String,null]},pointRingWidth:{},selectedPointId:{},clusterColor:{type:[Function,String,Array,null]},clusterRadius:{type:[Function,Number,null]},clusterLabel:{type:[Function,String,null]},clusterLabelColor:{type:[Function,String,null]},clusterBottomLabel:{type:[Function,String,null]},clusterRingWidth:{},clusterBackground:{type:Boolean},clusterExpandOnClick:{type:Boolean},clusteringDistance:{},colorMap:{},topoJSONLayer:{},tooltip:{},ariaLabel:{},duration:{},events:{},attributes:{},data:{}},setup(a,{expose:p}){const i=a,s=t.computed(()=>i.data),y=t.getCurrentInstance(),o=t.computed(()=>c.parseProps({...i},y)),e=t.ref(),u=t.ref();return t.onMounted(()=>{t.nextTick(()=>{u.value&&(e.value=new d.LeafletFlowMap(u.value,o.value,s.value))})}),t.onUnmounted(()=>{var n;(n=e.value)==null||n.destroy()}),t.watch(o,(n,l)=>{var r;c.arePropsEqual(n,l)||(r=e.value)==null||r.setConfig(o.value)}),p({component:e}),(n,l)=>(t.openBlock(),t.createElementBlock("div",{"data-vis-leaflet-flow-map":"",ref_key:"elRef",ref:u},null,512))}});module.exports=F;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/leaflet-flow-map/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { LeafletFlowMap, LeafletFlowMapConfigInterface, GenericDataRecord, MapLibreStyleSpecs } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\n\n\n// data and required props\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n sourceLongitude: { type: [Function, Number, null] },\n sourceLatitude: { type: [Function, Number, null] },\n targetLongitude: { type: [Function, Number, null] },\n targetLatitude: { type: [Function, Number, null] },\n sourcePointRadius: { type: [Function, Number, null] },\n sourcePointColor: { type: [Function, String, Array, null] },\n flowParticleColor: { type: [Function, String, Array, null] },\n flowParticleRadius: { type: [Function, Number, null] },\n flowParticleSpeed: { type: [Function, Number, null] },\n flowParticleDensity: { type: [Function, Number, null] },\n onSourcePointClick: { type: Function },\n onSourcePointMouseEnter: { type: Function },\n onSourcePointMouseLeave: { type: Function },\n width: {},\n height: {},\n flyToDuration: {},\n fitViewPadding: {},\n zoomDuration: {},\n initialBounds: {},\n fitBoundsOnUpdate: {},\n fitViewOnInit: { type: Boolean },\n fitViewOnUpdate: { type: Boolean },\n style: {},\n styleDarkTheme: {},\n accessToken: {},\n attribution: {},\n renderer: {},\n onMapInitialized: { type: Function },\n onMapMoveZoom: { type: Function },\n onMapMoveStart: { type: Function },\n onMapMoveEnd: { type: Function },\n onMapZoomStart: { type: Function },\n onMapZoomEnd: { type: Function },\n onMapClick: { type: Function },\n pointLongitude: { type: [Function, Number, null] },\n pointLatitude: { type: [Function, Number, null] },\n pointId: { type: [Function, String, null] },\n pointShape: { type: [Function, null] },\n pointColor: { type: [Function, String, Array, null] },\n pointRadius: { type: [Function, Number, null] },\n pointLabel: { type: [Function, String, null] },\n pointLabelColor: { type: [Function, String, null] },\n pointBottomLabel: { type: [Function, String, null] },\n pointCursor: { type: [Function, String, null] },\n pointRingWidth: {},\n selectedPointId: {},\n clusterColor: { type: [Function, String, Array, null] },\n clusterRadius: { type: [Function, Number, null] },\n clusterLabel: { type: [Function, String, null] },\n clusterLabelColor: { type: [Function, String, null] },\n clusterBottomLabel: { type: [Function, String, null] },\n clusterRingWidth: {},\n clusterBackground: { type: Boolean },\n clusterExpandOnClick: { type: Boolean },\n clusteringDistance: {},\n colorMap: {},\n topoJSONLayer: {},\n tooltip: {},\n ariaLabel: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\n\nconst data = computed(() => props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps(props, instance))\n\n// component declaration\nconst component = ref<LeafletFlowMap<PointDatum, FlowDatum>>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new LeafletFlowMap<PointDatum, FlowDatum>(elRef.value, config.value, data.value)\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
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/leaflet-flow-map/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nimport { LeafletFlowMap, LeafletFlowMapConfigInterface, GenericDataRecord, MapLibreStyleSpecs } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\n\n\n// data and required props\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n sourceLongitude: { type: [Function, Number, null] },\n sourceLatitude: { type: [Function, Number, null] },\n targetLongitude: { type: [Function, Number, null] },\n targetLatitude: { type: [Function, Number, null] },\n sourcePointRadius: { type: [Function, Number, null] },\n sourcePointColor: { type: [Function, String, Array, null] },\n flowParticleColor: { type: [Function, String, Array, null] },\n flowParticleRadius: { type: [Function, Number, null] },\n flowParticleSpeed: { type: [Function, Number, null] },\n flowParticleDensity: { type: [Function, Number, null] },\n onSourcePointClick: { type: Function },\n onSourcePointMouseEnter: { type: Function },\n onSourcePointMouseLeave: { type: Function },\n width: {},\n height: {},\n flyToDuration: {},\n fitViewPadding: {},\n zoomDuration: {},\n initialBounds: {},\n fitBoundsOnUpdate: {},\n fitViewOnInit: { type: Boolean },\n fitViewOnUpdate: { type: Boolean },\n style: {},\n styleDarkTheme: {},\n accessToken: {},\n attribution: {},\n renderer: {},\n onMapInitialized: { type: Function },\n onMapMoveZoom: { type: Function },\n onMapMoveStart: { type: Function },\n onMapMoveEnd: { type: Function },\n onMapZoomStart: { type: Function },\n onMapZoomEnd: { type: Function },\n onMapClick: { type: Function },\n pointLongitude: { type: [Function, Number, null] },\n pointLatitude: { type: [Function, Number, null] },\n pointId: { type: [Function, String, null] },\n pointShape: { type: [Function, null] },\n pointColor: { type: [Function, String, Array, null] },\n pointRadius: { type: [Function, Number, null] },\n pointLabel: { type: [Function, String, null] },\n pointLabelColor: { type: [Function, String, null] },\n pointBottomLabel: { type: [Function, String, null] },\n pointCursor: { type: [Function, String, null] },\n pointRingWidth: {},\n selectedPointId: {},\n clusterColor: { type: [Function, String, Array, null] },\n clusterRadius: { type: [Function, Number, null] },\n clusterLabel: { type: [Function, String, null] },\n clusterLabelColor: { type: [Function, String, null] },\n clusterBottomLabel: { type: [Function, String, null] },\n clusterRingWidth: {},\n clusterBackground: { type: Boolean },\n clusterExpandOnClick: { type: Boolean },\n clusteringDistance: {},\n colorMap: {},\n topoJSONLayer: {},\n tooltip: {},\n ariaLabel: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\n\nconst data = computed(() => props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<LeafletFlowMap<PointDatum, FlowDatum>>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new LeafletFlowMap<PointDatum, FlowDatum>(elRef.value, config.value, data.value)\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__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n \"data-vis-leaflet-flow-map\": \"\",\n ref_key: \"elRef\",\n ref: elRef\n }, null, 512))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__expose","props","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","elRef","onMounted","nextTick","LeafletFlowMap","onUnmounted","_a","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"+FAU4BA,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,gBAAiB,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAClD,eAAgB,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACjD,gBAAiB,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAClD,eAAgB,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACjD,kBAAmB,CAAE,KAAM,CAAC,SAAU,O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