@unovis/vue 1.7.0-pre.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/components/annotations/index.cjs +1 -1
- package/components/annotations/index.cjs.map +1 -1
- package/components/annotations/index.d.ts +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.d.ts +1 -1
- package/components/area/index.js +22 -23
- package/components/area/index.js.map +1 -1
- package/components/axis/index.cjs +1 -1
- package/components/axis/index.cjs.map +1 -1
- package/components/axis/index.d.ts +1 -1
- package/components/axis/index.js +26 -25
- package/components/axis/index.js.map +1 -1
- package/components/boxplot/index.cjs +2 -0
- package/components/boxplot/index.cjs.map +1 -0
- package/components/boxplot/index.d.ts +19 -0
- package/components/boxplot/index.js +31 -0
- package/components/boxplot/index.js.map +1 -0
- package/components/boxplot/index2.cjs +2 -0
- package/components/boxplot/index2.cjs.map +1 -0
- package/components/boxplot/index2.js +7 -0
- package/components/boxplot/index2.js.map +1 -0
- package/components/brush/index.cjs +1 -1
- package/components/brush/index.cjs.map +1 -1
- package/components/brush/index.d.ts +1 -1
- package/components/brush/index.js +22 -24
- package/components/brush/index.js.map +1 -1
- package/components/chord-diagram/index.cjs +1 -1
- package/components/chord-diagram/index.cjs.map +1 -1
- package/components/chord-diagram/index.d.ts +1 -1
- package/components/chord-diagram/index.js +22 -24
- 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 +3 -3
- package/components/crosshair/index.js +20 -24
- 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 +1 -1
- package/components/donut/index.js +22 -24
- package/components/donut/index.js.map +1 -1
- package/components/free-brush/index.cjs +1 -1
- package/components/free-brush/index.cjs.map +1 -1
- package/components/free-brush/index.d.ts +1 -1
- package/components/free-brush/index.js +21 -24
- package/components/free-brush/index.js.map +1 -1
- package/components/graph/index.cjs +1 -1
- package/components/graph/index.cjs.map +1 -1
- package/components/graph/index.d.ts +1 -1
- package/components/graph/index.js +26 -22
- package/components/graph/index.js.map +1 -1
- package/components/grouped-bar/index.cjs +1 -1
- package/components/grouped-bar/index.cjs.map +1 -1
- package/components/grouped-bar/index.d.ts +1 -1
- package/components/grouped-bar/index.js +24 -25
- package/components/grouped-bar/index.js.map +1 -1
- package/components/heatmap/index.cjs +2 -0
- package/components/heatmap/index.cjs.map +1 -0
- package/components/heatmap/index.d.ts +19 -0
- package/components/heatmap/index.js +49 -0
- package/components/heatmap/index.js.map +1 -0
- package/components/heatmap/index2.cjs +2 -0
- package/components/heatmap/index2.cjs.map +1 -0
- package/components/heatmap/index2.js +7 -0
- package/components/heatmap/index2.js.map +1 -0
- package/components/line/index.cjs +1 -1
- package/components/line/index.cjs.map +1 -1
- package/components/line/index.d.ts +1 -1
- package/components/line/index.js +22 -24
- 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 +1 -1
- package/components/nested-donut/index.js +22 -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.d.ts +1 -1
- package/components/plotband/index.js +16 -17
- 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.d.ts +1 -1
- package/components/plotline/index.js +16 -17
- package/components/plotline/index.js.map +1 -1
- package/components/radial-bar/index.cjs +2 -0
- package/components/radial-bar/index.cjs.map +1 -0
- package/components/radial-bar/index.d.ts +19 -0
- package/components/radial-bar/index.js +54 -0
- package/components/radial-bar/index.js.map +1 -0
- package/components/radial-bar/index2.cjs +2 -0
- package/components/radial-bar/index2.cjs.map +1 -0
- package/components/radial-bar/index2.js +7 -0
- package/components/radial-bar/index2.js.map +1 -0
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.d.ts +1 -1
- package/components/sankey/index.js +24 -23
- package/components/sankey/index.js.map +1 -1
- package/components/scatter/index.cjs +1 -1
- package/components/scatter/index.cjs.map +1 -1
- package/components/scatter/index.d.ts +1 -1
- package/components/scatter/index.js +22 -24
- package/components/scatter/index.js.map +1 -1
- package/components/stacked-bar/index.cjs +1 -1
- package/components/stacked-bar/index.cjs.map +1 -1
- package/components/stacked-bar/index.d.ts +1 -1
- package/components/stacked-bar/index.js +23 -23
- 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 +3 -3
- package/components/timeline/index.js +20 -24
- 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 +1 -1
- package/components/tooltip/index.js +15 -17
- package/components/tooltip/index.js.map +1 -1
- package/components/topojson-map/index.cjs +1 -1
- package/components/topojson-map/index.cjs.map +1 -1
- package/components/topojson-map/index.d.ts +1 -1
- package/components/topojson-map/index.js +52 -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.d.ts +1 -1
- package/components/treemap/index.js +22 -24
- 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.d.ts +1 -1
- package/components/xy-labels/index.js +21 -24
- package/components/xy-labels/index.js.map +1 -1
- package/components.d.ts +3 -0
- package/containers/single-container/index.cjs +1 -1
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.js +26 -26
- 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 +25 -30
- 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 +1 -1
- package/html-components/bullet-legend/index.js +23 -24
- 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.d.ts +1 -1
- package/html-components/flow-legend/index.js +21 -23
- 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.d.ts +1 -1
- package/html-components/leaflet-flow-map/index.js +22 -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.d.ts +1 -1
- package/html-components/leaflet-map/index.js +22 -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.d.ts +1 -1
- package/html-components/rolling-pin-legend/index.js +22 -24
- package/html-components/rolling-pin-legend/index.js.map +1 -1
- package/index.cjs +2 -2
- package/index.js +95 -86
- package/index.js.map +1 -1
- package/package.json +12 -12
- 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,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as m, toRefs as
|
|
2
|
-
import { SingleContainer as
|
|
3
|
-
import { componentAccessorKey as
|
|
4
|
-
import { useForwardProps as
|
|
1
|
+
import { defineComponent as m, toRefs as u, reactive as f, 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
|
+
import { componentAccessorKey as F, tooltipAccessorKey as k, annotationsAccessorKey as x } from "../../utils/context.js";
|
|
4
|
+
import { useForwardProps as A } from "../../utils/props.js";
|
|
5
5
|
const S = /* @__PURE__ */ m({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
@@ -17,48 +17,48 @@ const S = /* @__PURE__ */ m({
|
|
|
17
17
|
height: {},
|
|
18
18
|
svgDefs: {},
|
|
19
19
|
ariaLabel: {},
|
|
20
|
+
colorFunction: { type: Function },
|
|
20
21
|
data: {}
|
|
21
22
|
},
|
|
22
|
-
setup(
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
const
|
|
23
|
+
setup(p, { expose: d }) {
|
|
24
|
+
const s = p, { data: n } = u(s), l = A(s);
|
|
25
|
+
let t;
|
|
26
|
+
const o = f({
|
|
26
27
|
component: void 0,
|
|
27
28
|
tooltip: void 0,
|
|
28
29
|
annotations: void 0
|
|
29
|
-
}),
|
|
30
|
-
|
|
30
|
+
}), a = v(), c = () => {
|
|
31
|
+
t || a.value && o.component && (t = new R(a.value, { ...r(o) }, n.value));
|
|
31
32
|
};
|
|
32
33
|
return g(() => {
|
|
33
|
-
|
|
34
|
-
p(), (t = e.component) == null || t.config, o == null || o.updateContainer({ ...s(l.value), ...s(e) });
|
|
34
|
+
c(), o.component?.config, t?.updateContainer({ ...r(l.value), ...r(o) });
|
|
35
35
|
}), y(n, () => {
|
|
36
|
-
|
|
37
|
-
}),
|
|
36
|
+
t ? t.setData(n.value, !0) : c();
|
|
37
|
+
}), h(() => t?.destroy()), i(F, {
|
|
38
38
|
data: n,
|
|
39
|
-
update: (
|
|
40
|
-
destroy: () =>
|
|
41
|
-
}),
|
|
39
|
+
update: (e) => o.component = e,
|
|
40
|
+
destroy: () => o.component = void 0
|
|
41
|
+
}), i(k, {
|
|
42
42
|
data: n,
|
|
43
|
-
update: (
|
|
43
|
+
update: (e) => o.tooltip = e,
|
|
44
44
|
destroy: () => {
|
|
45
|
-
|
|
45
|
+
o.tooltip = void 0;
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
47
|
+
}), i(x, {
|
|
48
48
|
data: n,
|
|
49
|
-
update: (
|
|
49
|
+
update: (e) => o.annotations = e,
|
|
50
50
|
destroy: () => {
|
|
51
|
-
|
|
51
|
+
o.annotations = void 0;
|
|
52
52
|
}
|
|
53
53
|
}), d({
|
|
54
|
-
component:
|
|
55
|
-
}), (
|
|
54
|
+
component: t
|
|
55
|
+
}), (e, K) => (w(), _("div", {
|
|
56
56
|
"data-vis-single-container": "",
|
|
57
57
|
ref_key: "elRef",
|
|
58
|
-
ref:
|
|
58
|
+
ref: a,
|
|
59
59
|
class: "unovis-single-container"
|
|
60
60
|
}, [
|
|
61
|
-
|
|
61
|
+
C(e.$slots, "default")
|
|
62
62
|
], 512));
|
|
63
63
|
}
|
|
64
64
|
});
|
|
@@ -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","t","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,CAACmB,MAAed,EAAO,UAAUc;AAAA,MACzC,SAAS,MAAM;AAAE,QAAAd,EAAO,UAAU;AAAA,MAAU;AAAA,IAAA,CAC7C,GAEDU,EAAQK,GAAwB;AAAA,MAC9B,MAAApB;AAAA,MACA,QAAQ,CAACqB,MAAmBhB,EAAO,cAAcgB;AAAA,MACjD,SAAS,MAAM;AAAE,QAAAhB,EAAO,cAAc;AAAA,MAAU;AAAA,IAAA,CACjD,GAGDiB,EAAa;AAAA,MACX,WAAWlB;AAAA,IAAA,CACZ,mBAICmB,EAEM,OAAA;AAAA,MAFD,6BAAA;AAAA,eAA8B;AAAA,MAAJ,KAAIhB;AAAA,MAAQ,OAAM;AAAA,IAAA;MAC/CiB,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"),i=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:{},bleed:{type:[Object,Function]},onRenderComplete:{type:Function},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},colorFunction:{type:Function},data:{}},setup(d,{expose:u}){const c=d,{data:n}=o.toRefs(c),l=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(s=>Array.isArray(s)?s.length:s)||(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(l.value),...o.toRaw(t)})}),o.watch(n,()=>{a.value?a.value.setData(n.value,!0):p()}),o.onUnmounted(()=>a.value?.destroy()),o.provide(i.componentAccessorKey,{data:n,update:e=>t.components=[...t.components,e],destroy:()=>t.components=t.components?.filter(e=>!e.isDestroyed())}),o.provide(i.axisAccessorKey,{data:n,update:e=>t[`${e.config.type}Axis`]=e,destroy:e=>{t[`${e}Axis`]=void 0}}),o.provide(i.crosshairAccessorKey,{data:n,update:e=>t.crosshair=e,destroy:()=>{t.crosshair=void 0}}),o.provide(i.tooltipAccessorKey,{data:n,update:e=>t.tooltip=e,destroy:()=>{t.tooltip=void 0}}),o.provide(i.annotationsAccessorKey,{data:n,update:e=>t.annotations=e,destroy:()=>{t.annotations=void 0}}),u({component:a}),(e,s)=>(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":"g3BAMA,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
|
|
2
|
-
import { XYContainer as
|
|
3
|
-
import { componentAccessorKey as
|
|
4
|
-
import { useForwardProps as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as m, toRefs as v, ref as l, 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
|
+
import { XYContainer as F } from "@unovis/ts";
|
|
3
|
+
import { componentAccessorKey as R, axisAccessorKey as b, crosshairAccessorKey as w, tooltipAccessorKey as B, annotationsAccessorKey as _ } from "../../utils/context.js";
|
|
4
|
+
import { useForwardProps as K } from "../../utils/props.js";
|
|
5
|
+
const k = /* @__PURE__ */ m({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
components: {},
|
|
@@ -26,6 +26,7 @@ const S = /* @__PURE__ */ u({
|
|
|
26
26
|
scaleByDomain: { type: Boolean },
|
|
27
27
|
annotations: {},
|
|
28
28
|
clipPathExtend: {},
|
|
29
|
+
bleed: { type: [Object, Function] },
|
|
29
30
|
onRenderComplete: { type: Function },
|
|
30
31
|
duration: {},
|
|
31
32
|
margin: {},
|
|
@@ -35,61 +36,55 @@ const S = /* @__PURE__ */ u({
|
|
|
35
36
|
height: {},
|
|
36
37
|
svgDefs: {},
|
|
37
38
|
ariaLabel: {},
|
|
39
|
+
colorFunction: { type: Function },
|
|
38
40
|
data: {}
|
|
39
41
|
},
|
|
40
|
-
setup(d, { expose:
|
|
41
|
-
const c = d, { data: t } =
|
|
42
|
+
setup(d, { expose: u }) {
|
|
43
|
+
const c = d, { data: t } = v(c), y = K(c), n = l(), e = f({
|
|
42
44
|
components: [],
|
|
43
45
|
annotations: void 0,
|
|
44
46
|
crosshair: void 0,
|
|
45
47
|
tooltip: void 0,
|
|
46
48
|
xAxis: void 0,
|
|
47
49
|
yAxis: void 0
|
|
48
|
-
}), s = p()
|
|
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, {
|
|
50
|
+
}), s = l(), p = () => {
|
|
51
|
+
n.value || !s.value || !Object.values(e).some((i) => Array.isArray(i) ? i.length : i) || (n.value = new F(s.value, { ...r(e) }, t.value));
|
|
52
|
+
};
|
|
53
|
+
return x(() => {
|
|
54
|
+
p(), e.components.map((o) => o.config), n.value?.updateContainer({ ...r(y.value), ...r(e) });
|
|
55
|
+
}), h(t, () => {
|
|
56
|
+
n.value ? n.value.setData(t.value, !0) : p();
|
|
57
|
+
}), A(() => n.value?.destroy()), a(R, {
|
|
60
58
|
data: t,
|
|
61
59
|
update: (o) => e.components = [...e.components, o],
|
|
62
|
-
destroy: () =>
|
|
63
|
-
|
|
64
|
-
return e.components = (o = e.components) == null ? void 0 : o.filter((i) => !i.isDestroyed());
|
|
65
|
-
}
|
|
66
|
-
}), a(B, {
|
|
60
|
+
destroy: () => e.components = e.components?.filter((o) => !o.isDestroyed())
|
|
61
|
+
}), a(b, {
|
|
67
62
|
data: t,
|
|
68
63
|
update: (o) => e[`${o.config.type}Axis`] = o,
|
|
69
64
|
destroy: (o) => {
|
|
70
65
|
e[`${o}Axis`] = void 0;
|
|
71
66
|
}
|
|
72
|
-
}), a(
|
|
67
|
+
}), a(w, {
|
|
73
68
|
data: t,
|
|
74
69
|
update: (o) => e.crosshair = o,
|
|
75
70
|
destroy: () => {
|
|
76
71
|
e.crosshair = void 0;
|
|
77
72
|
}
|
|
78
|
-
}), a(
|
|
73
|
+
}), a(B, {
|
|
79
74
|
data: t,
|
|
80
75
|
update: (o) => e.tooltip = o,
|
|
81
76
|
destroy: () => {
|
|
82
77
|
e.tooltip = void 0;
|
|
83
78
|
}
|
|
84
|
-
}), a(
|
|
79
|
+
}), a(_, {
|
|
85
80
|
data: t,
|
|
86
81
|
update: (o) => e.annotations = o,
|
|
87
82
|
destroy: () => {
|
|
88
83
|
e.annotations = void 0;
|
|
89
84
|
}
|
|
90
|
-
}),
|
|
85
|
+
}), u({
|
|
91
86
|
component: n
|
|
92
|
-
}), (o, i) => (
|
|
87
|
+
}), (o, i) => (g(), D("div", {
|
|
93
88
|
"data-vis-xy-container": "",
|
|
94
89
|
ref_key: "elRef",
|
|
95
90
|
ref: s,
|
|
@@ -100,6 +95,6 @@ const S = /* @__PURE__ */ u({
|
|
|
100
95
|
}
|
|
101
96
|
});
|
|
102
97
|
export {
|
|
103
|
-
|
|
98
|
+
k as default
|
|
104
99
|
};
|
|
105
100
|
//# 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"),d=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},colorFunction:{type:Function},data:{}},setup(c,{expose:i}){const l=c;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",{ref_key:"elRef",ref:o,"data-vis-bullet-legend":""},null,512))}});exports.VisBulletLegendSelectors=d;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\"
|
|
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 type { BulletLegendConfigInterface } from '@unovis/ts'\nimport { BulletLegend } from '@unovis/ts'\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\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\nonUnmounted(() => {\n component.value?.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\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n</script>\n\n<template>\n <div ref=\"elRef\" data-vis-bullet-legend />\n</template>\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":"8LA2CaA,EAA2BC,EAAAA,aAAa,yUAlCrD,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,CACTF,EAAM,QACRF,EAAU,MAAQ,IAAIN,EAAAA,aAAaQ,EAAM,MAAO,CAAE,GAAGJ,EAAO,MAAO,0BAA2B,EAAA,CAAM,EACxG,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,CAChBL,EAAU,OAAO,QAAA,CACnB,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,EAEDU,EAAa,CACX,UAAAV,CAAA,CACD,wBAQCW,EAAAA,mBAA0C,MAAA,SAAjC,QAAJ,IAAIT,EAAQ,yBAAA,EAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BulletLegendConfigInterface, BulletLegend } from '@unovis/ts';
|
|
2
2
|
|
|
3
3
|
export declare const VisBulletLegendSelectors: typeof import("@unovis/ts/components/bullet-legend/style");
|
|
4
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<BulletLegendConfigInterface & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { BulletLegend as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as d, computed as s, ref as a, onMounted as p, nextTick as m, onUnmounted as f, watch as v, openBlock as b, createElementBlock as g } from "vue";
|
|
2
|
+
import { BulletLegend as u } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as _, arePropsEqual as x } from "../../utils/props.js";
|
|
4
|
+
const B = u.selectors, S = /* @__PURE__ */ d({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
7
|
items: {},
|
|
@@ -14,33 +14,32 @@ const h = i.selectors, C = /* @__PURE__ */ c({
|
|
|
14
14
|
bulletShape: { type: [Function, null] },
|
|
15
15
|
orientation: {},
|
|
16
16
|
renderIntoProvidedDomNode: { type: Boolean },
|
|
17
|
+
colorFunction: { type: Function },
|
|
17
18
|
data: {}
|
|
18
19
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
setup(i, { expose: c }) {
|
|
21
|
+
const n = i;
|
|
22
|
+
s(() => n.data);
|
|
23
|
+
const o = _(n), e = a(), t = a();
|
|
24
|
+
return p(() => {
|
|
25
|
+
m(() => {
|
|
26
|
+
t.value && (e.value = new u(t.value, { ...o.value, renderIntoProvidedDomNode: !0 }));
|
|
26
27
|
});
|
|
27
|
-
}),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}),
|
|
34
|
-
component: o
|
|
35
|
-
}), (e, a) => (_(), g("div", {
|
|
36
|
-
"data-vis-bullet-legend": "",
|
|
28
|
+
}), f(() => {
|
|
29
|
+
e.value?.destroy();
|
|
30
|
+
}), v(o, (l, r) => {
|
|
31
|
+
x(l, r) || (e.value?.setConfig(o.value), e.value?.render());
|
|
32
|
+
}), c({
|
|
33
|
+
component: e
|
|
34
|
+
}), (l, r) => (b(), g("div", {
|
|
37
35
|
ref_key: "elRef",
|
|
38
|
-
ref:
|
|
36
|
+
ref: t,
|
|
37
|
+
"data-vis-bullet-legend": ""
|
|
39
38
|
}, null, 512));
|
|
40
39
|
}
|
|
41
40
|
});
|
|
42
41
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
B as VisBulletLegendSelectors,
|
|
43
|
+
S as default
|
|
45
44
|
};
|
|
46
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/html-components/bullet-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\"
|
|
1
|
+
{"version":3,"file":"index.js","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 type { BulletLegendConfigInterface } from '@unovis/ts'\nimport { BulletLegend } from '@unovis/ts'\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\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\nonUnmounted(() => {\n component.value?.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\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n</script>\n\n<template>\n <div ref=\"elRef\" data-vis-bullet-legend />\n</template>\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":";;;AA2CO,MAAMA,IAA2BC,EAAa;;;;;;;;;;;;;;;;;AAlCrD,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEtC,UAAMG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAIF,EAAM,UACRF,EAAU,QAAQ,IAAIN,EAAaQ,EAAM,OAAO,EAAE,GAAGJ,EAAO,OAAO,2BAA2B,GAAA,CAAM;AAAA,MACxG,CAAC;AAAA,IACH,CAAC,GAEDO,EAAY,MAAM;AAChB,MAAAL,EAAU,OAAO,QAAA;AAAA,IACnB,CAAC,GAEDM,EAAMR,GAAQ,CAACS,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BR,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDU,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,mBAQCW,EAA0C,OAAA;AAAA,eAAjC;AAAA,MAAJ,KAAIT;AAAA,MAAQ,0BAAA;AAAA,IAAA;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@unovis/ts"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@unovis/ts"),a=require("../../utils/props.cjs"),i=d.FlowLegend.selectors,p=e.defineComponent({__name:"index",props:{margin:{},customWidth:{},items:{},spacing:{},lineColor:{},labelColor:{},labelFontSize:{},arrowSymbol:{},arrowColor:{},arrowSymbolYOffset:{},onLegendItemClick:{type:Function},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(u,{expose:c}){const t=u;e.computed(()=>t.data);const n=a.useForwardProps(t),o=e.ref(),r=e.ref();return e.onMounted(()=>{e.nextTick(()=>{r.value&&(o.value=new d.FlowLegend(r.value,{...n.value,renderIntoProvidedDomNode:!0}))})}),e.onUnmounted(()=>{o.value?.destroy()}),e.watch(n,(l,s)=>{a.arePropsEqual(l,s)||(o.value?.setConfig(n.value),o.value?.render())}),c({component:o}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elRef",ref:r,"data-vis-flow-legend":""},null,512))}});exports.VisFlowLegendSelectors=i;exports.default=p;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { FlowLegendConfigInterface } from '@unovis/ts'\nimport { FlowLegend } from '@unovis/ts'\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n// data and required props\ntype Props = FlowLegendConfigInterface\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<FlowLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if (elRef.value)\n component.value = new FlowLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n })\n})\n\nonUnmounted(() => {\n component.value?.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\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisFlowLegendSelectors = FlowLegend.selectors\n</script>\n\n<template>\n <div ref=\"elRef\" data-vis-flow-legend />\n</template>\n\n<style>\n [data-vis-flow-legend] {\n display:block;\n }\n</style>\n"],"names":["VisFlowLegendSelectors","FlowLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":"8LA2CaA,EAAyBC,EAAAA,WAAW,ySAlCjD,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,CACTF,EAAM,QACRF,EAAU,MAAQ,IAAIN,EAAAA,WAAWQ,EAAM,MAAO,CAAE,GAAGJ,EAAO,MAAO,0BAA2B,EAAA,CAAM,EACtG,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,CAChBL,EAAU,OAAO,QAAA,CACnB,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,EAEDU,EAAa,CACX,UAAAV,CAAA,CACD,wBAQCW,EAAAA,mBAAwC,MAAA,SAA/B,QAAJ,IAAIT,EAAQ,uBAAA,EAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlowLegendConfigInterface, FlowLegend } from '@unovis/ts';
|
|
2
2
|
|
|
3
3
|
export declare const VisFlowLegendSelectors: typeof import("@unovis/ts/components/flow-legend/style");
|
|
4
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FlowLegendConfigInterface & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as i, computed as m, ref as a, onMounted as u, nextTick as p, onUnmounted as f, watch as v, openBlock as w, createElementBlock as g } from "vue";
|
|
2
2
|
import { FlowLegend as d } from "@unovis/ts";
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
const
|
|
3
|
+
import { useForwardProps as _, arePropsEqual as y } from "../../utils/props.js";
|
|
4
|
+
const F = d.selectors, b = /* @__PURE__ */ i({
|
|
5
5
|
__name: "index",
|
|
6
6
|
props: {
|
|
7
7
|
margin: {},
|
|
@@ -18,31 +18,29 @@ const b = d.selectors, P = /* @__PURE__ */ m({
|
|
|
18
18
|
renderIntoProvidedDomNode: { type: Boolean },
|
|
19
19
|
data: {}
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const r =
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
setup(s, { expose: c }) {
|
|
22
|
+
const r = s;
|
|
23
|
+
m(() => r.data);
|
|
24
|
+
const o = _(r), e = a(), n = a();
|
|
25
|
+
return u(() => {
|
|
26
|
+
p(() => {
|
|
27
|
+
n.value && (e.value = new d(n.value, { ...o.value, renderIntoProvidedDomNode: !0 }));
|
|
28
28
|
});
|
|
29
|
-
}),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}),
|
|
36
|
-
component: o
|
|
37
|
-
}), (e, l) => (_(), g("div", {
|
|
38
|
-
"data-vis-flow-legend": "",
|
|
29
|
+
}), f(() => {
|
|
30
|
+
e.value?.destroy();
|
|
31
|
+
}), v(o, (t, l) => {
|
|
32
|
+
y(t, l) || (e.value?.setConfig(o.value), e.value?.render());
|
|
33
|
+
}), c({
|
|
34
|
+
component: e
|
|
35
|
+
}), (t, l) => (w(), g("div", {
|
|
39
36
|
ref_key: "elRef",
|
|
40
|
-
ref:
|
|
37
|
+
ref: n,
|
|
38
|
+
"data-vis-flow-legend": ""
|
|
41
39
|
}, null, 512));
|
|
42
40
|
}
|
|
43
41
|
});
|
|
44
42
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
F as VisFlowLegendSelectors,
|
|
44
|
+
b as default
|
|
47
45
|
};
|
|
48
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { FlowLegendConfigInterface } from '@unovis/ts'\nimport { FlowLegend } from '@unovis/ts'\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n// data and required props\ntype Props = FlowLegendConfigInterface\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<FlowLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if (elRef.value)\n component.value = new FlowLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n })\n})\n\nonUnmounted(() => {\n component.value?.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\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisFlowLegendSelectors = FlowLegend.selectors\n</script>\n\n<template>\n <div ref=\"elRef\" data-vis-flow-legend />\n</template>\n\n<style>\n [data-vis-flow-legend] {\n display:block;\n }\n</style>\n"],"names":["VisFlowLegendSelectors","FlowLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":";;;AA2CO,MAAMA,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;AAlCjD,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEtC,UAAMG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAIF,EAAM,UACRF,EAAU,QAAQ,IAAIN,EAAWQ,EAAM,OAAO,EAAE,GAAGJ,EAAO,OAAO,2BAA2B,GAAA,CAAM;AAAA,MACtG,CAAC;AAAA,IACH,CAAC,GAEDO,EAAY,MAAM;AAChB,MAAAL,EAAU,OAAO,QAAA;AAAA,IACnB,CAAC,GAEDM,EAAMR,GAAQ,CAACS,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BR,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDU,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,mBAQCW,EAAwC,OAAA;AAAA,eAA/B;AAAA,MAAJ,KAAIT;AAAA,MAAQ,wBAAA;AAAA,IAAA;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("@unovis/ts"),a=require("../../utils/props.cjs"),y=c.LeafletFlowMap.selectors,d=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:{},preserveDrawingBuffer:{type:Boolean},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,String,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(p,{expose:s}){const l=p,n=t.computed(()=>l.data),o=a.useForwardProps(l),e=t.ref(),u=t.ref();return t.onMounted(()=>{t.nextTick(()=>{u.value&&(e.value=new c.LeafletFlowMap(u.value,o.value,n.value))})}),t.onUnmounted(()=>{e.value?.destroy()}),t.watch(o,(i,r)=>{a.arePropsEqual(i,r)||(e.value?.setConfig(o.value),e.value?.render())}),t.watch(n,()=>{e.value?.setData(n.value)}),s({component:e}),(i,r)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"elRef",ref:u,"data-vis-leaflet-flow-map":""},null,512))}});exports.VisLeafletFlowMapSelectors=y;exports.default=d;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/leaflet-flow-map/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"PointDatum extends GenericDataRecord,FlowDatum extends GenericDataRecord\">\n// !!! This code was automatically generated. You should not change it !!!\nimport {
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/html-components/leaflet-flow-map/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { GenericDataRecord, LeafletFlowMapConfigInterface } from '@unovis/ts'\nimport { LeafletFlowMap } from '@unovis/ts'\nimport { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n// data and required props\ntype Props = LeafletFlowMapConfigInterface<PointDatum, FlowDatum>\nconst props = defineProps<Props & { data?: { points: PointDatum[], flows?: FlowDatum[] } }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\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\nonUnmounted(() => {\n component.value?.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 VisLeafletFlowMapSelectors = LeafletFlowMap.selectors\n</script>\n\n<template>\n <div ref=\"elRef\" data-vis-leaflet-flow-map />\n</template>\n\n<style>\n [data-vis-leaflet-flow-map] {\n display:block;\n position:relative;\n }\n</style>\n"],"names":["VisLeafletFlowMapSelectors","LeafletFlowMap","props","__props","data","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":"8LA+CaA,EAA6BC,EAAAA,eAAe,ohEAtCzD,MAAMC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMH,EAAM,IAAI,EAEhCI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EACZC,EAAQD,EAAAA,IAAA,EAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACTF,EAAM,QACRF,EAAU,MAAQ,IAAIP,EAAAA,eAAsCS,EAAM,MAAOJ,EAAO,MAAOF,EAAK,KAAK,EACrG,CAAC,CACH,CAAC,EAEDS,EAAAA,YAAY,IAAM,CAChBL,EAAU,OAAO,QAAA,CACnB,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,EAEDM,EAAAA,MAAMV,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,wBAQCW,EAAAA,mBAA6C,MAAA,SAApC,QAAJ,IAAIT,EAAQ,4BAAA,EAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GenericDataRecord, LeafletFlowMapConfigInterface, LeafletFlowMap } from '@unovis/ts';
|
|
2
2
|
|
|
3
3
|
export declare const VisLeafletFlowMapSelectors: typeof import("@unovis/ts/components/leaflet-map/style");
|
|
4
4
|
declare const _default: <PointDatum extends GenericDataRecord, FlowDatum extends GenericDataRecord>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|