@unovis/vue 1.6.2 → 1.6.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/annotations/index.cjs.map +1 -1
- package/components/annotations/index.d.ts +18 -94
- 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 +12 -59
- package/components/area/index.js +25 -25
- package/components/area/index.js.map +1 -1
- package/components/axis/index.cjs +1 -1
- package/components/axis/index.cjs.map +1 -1
- package/components/axis/index.d.ts +12 -82
- package/components/axis/index.js +16 -16
- package/components/axis/index.js.map +1 -1
- package/components/brush/index.cjs +1 -1
- package/components/brush/index.cjs.map +1 -1
- package/components/brush/index.d.ts +12 -62
- package/components/brush/index.js +17 -17
- package/components/brush/index.js.map +1 -1
- package/components/chord-diagram/index.cjs +1 -1
- package/components/chord-diagram/index.cjs.map +1 -1
- package/components/chord-diagram/index.d.ts +12 -60
- package/components/chord-diagram/index.js +26 -26
- package/components/chord-diagram/index.js.map +1 -1
- package/components/crosshair/index.cjs.map +1 -1
- package/components/crosshair/index.d.ts +12 -66
- 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 +12 -64
- package/components/donut/index.js +17 -17
- 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 +12 -62
- package/components/free-brush/index.js +18 -18
- package/components/free-brush/index.js.map +1 -1
- package/components/graph/index.cjs +1 -1
- package/components/graph/index.cjs.map +1 -1
- package/components/graph/index.d.ts +10 -134
- package/components/graph/index.js +66 -66
- 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 +12 -62
- package/components/grouped-bar/index.js +25 -25
- package/components/grouped-bar/index.js.map +1 -1
- package/components/line/index.cjs +1 -1
- package/components/line/index.cjs.map +1 -1
- package/components/line/index.d.ts +12 -60
- package/components/line/index.js +24 -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 +12 -65
- package/components/nested-donut/index.js +22 -22
- 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 +12 -63
- package/components/plotband/index.js +12 -12
- 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 +12 -64
- package/components/plotline/index.js +9 -9
- package/components/plotline/index.js.map +1 -1
- package/components/sankey/index.cjs +1 -1
- package/components/sankey/index.cjs.map +1 -1
- package/components/sankey/index.d.ts +12 -95
- package/components/sankey/index.js +35 -35
- package/components/sankey/index.js.map +1 -1
- package/components/scatter/index.cjs +1 -1
- package/components/scatter/index.cjs.map +1 -1
- package/components/scatter/index.d.ts +12 -65
- package/components/scatter/index.js +27 -27
- package/components/scatter/index.js.map +1 -1
- package/components/stacked-bar/index.cjs +1 -1
- package/components/stacked-bar/index.cjs.map +1 -1
- package/components/stacked-bar/index.d.ts +12 -62
- package/components/stacked-bar/index.js +22 -22
- package/components/stacked-bar/index.js.map +1 -1
- package/components/timeline/index.cjs.map +1 -1
- package/components/timeline/index.d.ts +12 -88
- package/components/timeline/index.js.map +1 -1
- package/components/tooltip/index.cjs.map +1 -1
- package/components/tooltip/index.d.ts +19 -99
- 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 +12 -78
- package/components/topojson-map/index.js +39 -39
- 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 +12 -69
- package/components/treemap/index.js +14 -14
- 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 +12 -66
- package/components/xy-labels/index.js +38 -38
- package/components/xy-labels/index.js.map +1 -1
- package/components.d.ts +27 -26
- package/containers/single-container/index.cjs.map +1 -1
- package/containers/single-container/index.d.ts +11 -25
- package/containers/single-container/index.js.map +1 -1
- package/containers/xy-container/index.cjs.map +1 -1
- package/containers/xy-container/index.d.ts +12 -44
- package/containers/xy-container/index.js.map +1 -1
- package/containers.d.ts +2 -2
- 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 +18 -74
- package/html-components/bullet-legend/index.js +12 -12
- package/html-components/bullet-legend/index.js.map +1 -1
- package/html-components/flow-legend/index.cjs +2 -0
- package/html-components/flow-legend/index.cjs.map +1 -0
- package/html-components/flow-legend/index.d.ts +20 -0
- package/html-components/flow-legend/index.js +44 -0
- package/html-components/flow-legend/index.js.map +1 -0
- package/html-components/flow-legend/index3.cjs +2 -0
- package/html-components/flow-legend/index3.cjs.map +1 -0
- package/html-components/flow-legend/index3.js +8 -0
- package/html-components/flow-legend/index3.js.map +1 -0
- 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 +12 -112
- package/html-components/leaflet-flow-map/index.js +47 -47
- 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 +12 -99
- package/html-components/leaflet-map/index.js +38 -38
- package/html-components/leaflet-map/index.js.map +1 -1
- package/html-components/rolling-pin-legend/index.cjs.map +1 -1
- package/html-components/rolling-pin-legend/index.d.ts +18 -50
- package/html-components/rolling-pin-legend/index.js.map +1 -1
- package/index.cjs +2 -2
- package/index.js +79 -75
- package/index.js.map +1 -1
- package/package.json +6 -4
- package/utils/context.cjs.map +1 -1
- package/utils/context.d.ts +1 -0
- package/utils/context.js.map +1 -1
- package/utils/props.cjs.map +1 -1
- package/utils/props.d.ts +2 -1
- package/utils/props.js.map +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { TopoJSONMap as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as m, inject as d, computed as y, ref as F, onMounted as v, nextTick as S, onUnmounted as g, watch as l, createElementBlock as b, openBlock as f } from "vue";
|
|
2
|
+
import { TopoJSONMap as p } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as h, arePropsEqual as k } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as C } from "../../utils/context.js";
|
|
5
|
+
const N = { "data-vis-component": "" }, M = p.selectors, j = /* @__PURE__ */ m({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
projection: { type: [Function, Object] },
|
|
@@ -13,22 +13,22 @@ const T = { "data-vis-component": "" }, j = l.selectors, D = /* @__PURE__ */ d({
|
|
|
13
13
|
disableZoom: { type: Boolean },
|
|
14
14
|
zoomExtent: {},
|
|
15
15
|
zoomDuration: {},
|
|
16
|
-
linkWidth: {},
|
|
17
|
-
linkColor: {},
|
|
18
|
-
linkCursor: {},
|
|
19
|
-
linkId: {},
|
|
16
|
+
linkWidth: { type: [Function, Number, null] },
|
|
17
|
+
linkColor: { type: [Function, String, Array, null] },
|
|
18
|
+
linkCursor: { type: [Function, String, null] },
|
|
19
|
+
linkId: { type: [Function, String, null] },
|
|
20
20
|
linkSource: { type: Function },
|
|
21
21
|
linkTarget: { type: Function },
|
|
22
|
-
areaId: {},
|
|
23
|
-
areaColor: {},
|
|
24
|
-
areaCursor: {},
|
|
25
|
-
pointColor: {},
|
|
26
|
-
pointRadius: {},
|
|
27
|
-
pointStrokeWidth: {},
|
|
28
|
-
pointCursor: {},
|
|
29
|
-
longitude: {},
|
|
30
|
-
latitude: {},
|
|
31
|
-
pointLabel: {},
|
|
22
|
+
areaId: { type: [Function, String, null] },
|
|
23
|
+
areaColor: { type: [Function, String, Array, null] },
|
|
24
|
+
areaCursor: { type: [Function, String, null] },
|
|
25
|
+
pointColor: { type: [Function, String, Array, null] },
|
|
26
|
+
pointRadius: { type: [Function, Number, null] },
|
|
27
|
+
pointStrokeWidth: { type: [Function, Number, null] },
|
|
28
|
+
pointCursor: { type: [Function, String, null] },
|
|
29
|
+
longitude: { type: [Function, Number, null] },
|
|
30
|
+
latitude: { type: [Function, Number, null] },
|
|
31
|
+
pointLabel: { type: [Function, String, null] },
|
|
32
32
|
pointLabelPosition: {},
|
|
33
33
|
pointLabelTextBrightnessRatio: {},
|
|
34
34
|
pointId: { type: Function },
|
|
@@ -40,29 +40,29 @@ const T = { "data-vis-component": "" }, j = l.selectors, D = /* @__PURE__ */ d({
|
|
|
40
40
|
attributes: {},
|
|
41
41
|
data: {}
|
|
42
42
|
},
|
|
43
|
-
setup(c, { expose:
|
|
44
|
-
const
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
var
|
|
48
|
-
|
|
43
|
+
setup(c, { expose: s }) {
|
|
44
|
+
const n = d(C), a = c, e = y(() => n.data.value ?? a.data), i = h(a), o = F();
|
|
45
|
+
return v(() => {
|
|
46
|
+
S(() => {
|
|
47
|
+
var t;
|
|
48
|
+
o.value = new p(i.value), (t = o.value) == null || t.setData(e.value), n.update(o.value);
|
|
49
49
|
});
|
|
50
|
-
}),
|
|
51
|
-
var
|
|
52
|
-
(
|
|
53
|
-
}),
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
-
}),
|
|
57
|
-
var
|
|
58
|
-
(
|
|
59
|
-
}),
|
|
60
|
-
component:
|
|
61
|
-
}), (
|
|
50
|
+
}), g(() => {
|
|
51
|
+
var t;
|
|
52
|
+
(t = o.value) == null || t.destroy(), n.destroy();
|
|
53
|
+
}), l(i, (t, r) => {
|
|
54
|
+
var u;
|
|
55
|
+
k(t, r) || (u = o.value) == null || u.setConfig(i.value);
|
|
56
|
+
}), l(e, () => {
|
|
57
|
+
var t;
|
|
58
|
+
(t = o.value) == null || t.setData(e.value);
|
|
59
|
+
}), s({
|
|
60
|
+
component: o
|
|
61
|
+
}), (t, r) => (f(), b("div", N));
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
export {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
M as VisTopoJSONMapSelectors,
|
|
66
|
+
j as default
|
|
67
67
|
};
|
|
68
68
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/topojson-map/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"AreaDatum,PointDatum,LinkDatum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { TopoJSONMap, TopoJSONMapConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\nconst props = defineProps<Props & { data?: {areas?: AreaDatum[]; points?: PointDatum[]; links?: LinkDatum[]} }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new TopoJSONMap<AreaDatum, PointDatum, LinkDatum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTopoJSONMapSelectors = TopoJSONMap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTopoJSONMapSelectors","TopoJSONMap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAA0BC,EAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/topojson-map/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"AreaDatum,PointDatum,LinkDatum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { TopoJSONMap, TopoJSONMapConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\nconst props = defineProps<Props & { data?: {areas?: AreaDatum[]; points?: PointDatum[]; links?: LinkDatum[]} }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<TopoJSONMap<AreaDatum, PointDatum, LinkDatum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new TopoJSONMap<AreaDatum, PointDatum, LinkDatum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTopoJSONMapSelectors = TopoJSONMap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTopoJSONMapSelectors","TopoJSONMap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAA0BC,EAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CnD,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAA8CQ,EAAO,KAAK,IAChFM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -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"),u=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),b={"data-vis-component":""},v=c.Treemap.selectors,y=t.defineComponent({__name:"index",props:{id:{type:Function},value:{type:[Function,Number,null]},layers:{},numberFormat:{type:Function},tileLabel:{type:Function},tileColor:{type:[Function,String,Array,null]},tilePadding:{},tilePaddingTop:{},labelInternalNodes:{type:Boolean},labelOffsetX:{},labelOffsetY:{},labelFit:{},labelTrimMode:{},tileBorderRadius:{},tileBorderRadiusFactor:{},enableLightnessVariance:{type:Boolean},enableTileLabelFontSizeVariation:{type:Boolean},tileLabelSmallFontSize:{},tileLabelMediumFontSize:{},tileLabelLargeFontSize:{},showTileClickAffordance:{type:Boolean},lightnessVariationAmount:{},minTileSizeForLabel:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const a=t.inject(m.componentAccessorKey),i=d,n=t.computed(()=>a.data.value??i.data),l=u.useForwardProps(i),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new c.Treemap(l.value),(e=o.value)==null||e.setData(n.value),a.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),a.destroy()}),t.watch(l,(e,r)=>{var s;u.arePropsEqual(e,r)||(s=o.value)==null||s.setConfig(l.value)}),t.watch(n,()=>{var e;(e=o.value)==null||e.setData(n.value)}),p({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",b))}});exports.VisTreemapSelectors=v;exports.default=y;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAsBC,EAAAA,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAsBC,EAAAA,QAAQ,0sBA3C3C,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,GACjDM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
|
|
@@ -1,76 +1,19 @@
|
|
|
1
|
-
import { Treemap,
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
slots: any;
|
|
7
|
-
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
8
|
-
props: {
|
|
9
|
-
duration?: number;
|
|
10
|
-
events?: {
|
|
11
|
-
[selector: string]: {
|
|
12
|
-
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
13
|
-
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
14
|
-
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
15
|
-
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
16
|
-
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
17
|
-
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
18
|
-
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
19
|
-
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
-
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
-
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
-
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
-
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
-
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
-
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
-
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
-
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
-
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
-
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
-
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
-
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
-
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
attributes?: {
|
|
36
|
-
[selector: string]: {
|
|
37
|
-
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
38
|
-
};
|
|
39
|
-
};
|
|
1
|
+
import { Treemap, TreemapConfigInterface } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisTreemapSelectors: typeof import("@unovis/ts/components/treemap/style");
|
|
4
|
+
declare const _default: <Datum>(__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<{
|
|
5
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (TreemapConfigInterface<Datum> & {
|
|
40
6
|
data?: Datum[];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
labelOffsetX?: number;
|
|
45
|
-
labelOffsetY?: number;
|
|
46
|
-
labelFit?: import("@unovis/ts").FitMode;
|
|
47
|
-
labelTrimMode?: import("@unovis/ts").TrimMode;
|
|
48
|
-
numberFormat?: (value: number) => string;
|
|
49
|
-
tileLabel?: (node: import("@unovis/ts").TreemapNode<Datum>) => string;
|
|
50
|
-
tileColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").TreemapNode<Datum>>;
|
|
51
|
-
tilePadding?: number;
|
|
52
|
-
tilePaddingTop?: number;
|
|
53
|
-
labelInternalNodes?: boolean;
|
|
54
|
-
tileBorderRadius?: number;
|
|
55
|
-
tileBorderRadiusFactor?: number;
|
|
56
|
-
enableLightnessVariance?: boolean;
|
|
57
|
-
enableTileLabelFontSizeVariation?: boolean;
|
|
58
|
-
tileLabelSmallFontSize?: number;
|
|
59
|
-
tileLabelMediumFontSize?: number;
|
|
60
|
-
tileLabelLargeFontSize?: number;
|
|
61
|
-
showTileClickAffordance?: boolean;
|
|
62
|
-
lightnessVariationAmount?: number;
|
|
63
|
-
minTileSizeForLabel?: number;
|
|
64
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
65
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
66
|
-
component: import("vue").Ref<Treemap<Datum>, Treemap<Datum>>;
|
|
7
|
+
}), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
8
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
component: import('vue').Ref<Treemap<Datum>, Treemap<Datum>>;
|
|
67
10
|
}>): void;
|
|
68
11
|
attrs: any;
|
|
69
|
-
slots: {}
|
|
70
|
-
emit:
|
|
71
|
-
}>) => import(
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
72
15
|
[key: string]: any;
|
|
73
16
|
}> & {
|
|
74
|
-
__ctx?:
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
75
18
|
};
|
|
76
19
|
export default _default;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, inject as m, computed as f, ref as b, onMounted as v, nextTick as y, onUnmounted as F, watch as s, createElementBlock as g, openBlock as B } from "vue";
|
|
2
2
|
import { Treemap as c } from "@unovis/ts";
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
3
|
+
import { useForwardProps as L, arePropsEqual as S } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as T } from "../../utils/context.js";
|
|
5
|
+
const _ = { "data-vis-component": "" }, w = c.selectors, A = /* @__PURE__ */ d({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
id: { type: Function },
|
|
9
|
-
value: {},
|
|
9
|
+
value: { type: [Function, Number, null] },
|
|
10
10
|
layers: {},
|
|
11
11
|
numberFormat: { type: Function },
|
|
12
12
|
tileLabel: { type: Function },
|
|
13
|
-
tileColor: {},
|
|
13
|
+
tileColor: { type: [Function, String, Array, null] },
|
|
14
14
|
tilePadding: {},
|
|
15
15
|
tilePaddingTop: {},
|
|
16
16
|
labelInternalNodes: { type: Boolean },
|
|
@@ -33,29 +33,29 @@ const S = { "data-vis-component": "" }, w = c.selectors, C = /* @__PURE__ */ p({
|
|
|
33
33
|
attributes: {},
|
|
34
34
|
data: {}
|
|
35
35
|
},
|
|
36
|
-
setup(u, { expose:
|
|
37
|
-
const o = m(
|
|
36
|
+
setup(u, { expose: p }) {
|
|
37
|
+
const o = m(T), l = u, a = f(() => o.data.value ?? l.data), n = L(l), t = b();
|
|
38
38
|
return v(() => {
|
|
39
|
-
|
|
39
|
+
y(() => {
|
|
40
40
|
var e;
|
|
41
41
|
t.value = new c(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
|
|
42
42
|
});
|
|
43
|
-
}),
|
|
43
|
+
}), F(() => {
|
|
44
44
|
var e;
|
|
45
45
|
(e = t.value) == null || e.destroy(), o.destroy();
|
|
46
46
|
}), s(n, (e, i) => {
|
|
47
47
|
var r;
|
|
48
|
-
|
|
48
|
+
S(e, i) || (r = t.value) == null || r.setConfig(n.value);
|
|
49
49
|
}), s(a, () => {
|
|
50
50
|
var e;
|
|
51
51
|
(e = t.value) == null || e.setData(a.value);
|
|
52
|
-
}),
|
|
52
|
+
}), p({
|
|
53
53
|
component: t
|
|
54
|
-
}), (e, i) => (
|
|
54
|
+
}), (e, i) => (B(), g("div", _));
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
export {
|
|
58
58
|
w as VisTreemapSelectors,
|
|
59
|
-
|
|
59
|
+
A as default
|
|
60
60
|
};
|
|
61
61
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/treemap/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Treemap, TreemapConfigInterface, StringAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = TreemapConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Treemap<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisTreemapSelectors","Treemap","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C3C,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,IACjDM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|
|
@@ -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"),s=require("@unovis/ts"),i=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),F={"data-vis-component":""},g=s.XYLabels.selectors,b=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},y:{type:[Function,Number,null]},xPositioning:{type:[Function,String,null]},yPositioning:{type:[Function,String,null]},labelFontSize:{type:[Function,Number,null]},label:{type:[Function,String,null]},backgroundColor:{type:[Function,String,Array,null]},cursor:{type:[Function,String,null]},labelTextBrightnessRatio:{},clustering:{type:Boolean},clusterLabel:{type:[Function,String,null]},clusterFontSize:{type:[Function,Number,null]},clusterBackgroundColor:{type:[Function,String,Array,null]},clusterCursor:{type:[Function,String,null]},clusterLabelColor:{type:[Function,String,Array,null]},x:{type:[Function,Number,null]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:y}){const o=t.inject(d.componentAccessorKey),r=p,l=t.computed(()=>o.data.value??r.data),u=i.useForwardProps(r),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new s.XYLabels(u.value),(e=n.value)==null||e.setData(l.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(u,(e,c)=>{var a;i.arePropsEqual(e,c)||(a=n.value)==null||a.setConfig(u.value)}),t.watch(l,()=>{var e;(e=n.value)==null||e.setData(l.value)}),y({component:n}),(e,c)=>(t.openBlock(),t.createElementBlock("div",F))}});exports.VisXYLabelsSelectors=g;exports.default=b;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = XYLabelsConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAuBC,EAAAA,SAAS,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = XYLabelsConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAuBC,EAAAA,SAAS,04BA3C7C,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,WAAgBQ,EAAO,KAAK,GAClDM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
|
|
@@ -1,73 +1,19 @@
|
|
|
1
|
-
import { XYLabels,
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
slots: any;
|
|
7
|
-
}, __VLS_expose?: any, __VLS_setup?: Promise<{
|
|
8
|
-
props: {
|
|
9
|
-
duration?: number;
|
|
10
|
-
events?: {
|
|
11
|
-
[selector: string]: {
|
|
12
|
-
touchstart?: import("@unovis/ts").VisEventCallback<any>;
|
|
13
|
-
touchmove?: import("@unovis/ts").VisEventCallback<any>;
|
|
14
|
-
touchend?: import("@unovis/ts").VisEventCallback<any>;
|
|
15
|
-
mouseover?: import("@unovis/ts").VisEventCallback<any>;
|
|
16
|
-
mousemove?: import("@unovis/ts").VisEventCallback<any>;
|
|
17
|
-
mousedown?: import("@unovis/ts").VisEventCallback<any>;
|
|
18
|
-
mouseup?: import("@unovis/ts").VisEventCallback<any>;
|
|
19
|
-
click?: import("@unovis/ts").VisEventCallback<any>;
|
|
20
|
-
auxclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
21
|
-
contextmenu?: import("@unovis/ts").VisEventCallback<any>;
|
|
22
|
-
dblclick?: import("@unovis/ts").VisEventCallback<any>;
|
|
23
|
-
mouseenter?: import("@unovis/ts").VisEventCallback<any>;
|
|
24
|
-
mouseleave?: import("@unovis/ts").VisEventCallback<any>;
|
|
25
|
-
mouseout?: import("@unovis/ts").VisEventCallback<any>;
|
|
26
|
-
scroll?: import("@unovis/ts").VisEventCallback<any>;
|
|
27
|
-
select?: import("@unovis/ts").VisEventCallback<any>;
|
|
28
|
-
wheel?: import("@unovis/ts").VisEventCallback<any>;
|
|
29
|
-
pointerdown?: import("@unovis/ts").VisEventCallback<any>;
|
|
30
|
-
pointerup?: import("@unovis/ts").VisEventCallback<any>;
|
|
31
|
-
pointerout?: import("@unovis/ts").VisEventCallback<any>;
|
|
32
|
-
pointermove?: import("@unovis/ts").VisEventCallback<any>;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
attributes?: {
|
|
36
|
-
[selector: string]: {
|
|
37
|
-
[attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
|
|
38
|
-
};
|
|
39
|
-
};
|
|
1
|
+
import { XYLabels, XYLabelsConfigInterface } from '@unovis/ts';
|
|
2
|
+
|
|
3
|
+
export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/components/xy-labels/style");
|
|
4
|
+
declare const _default: <Datum>(__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<{
|
|
5
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (XYLabelsConfigInterface<Datum> & {
|
|
40
6
|
data?: Datum[];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
color?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
45
|
-
cursor?: import("@unovis/ts").StringAccessor<Datum>;
|
|
46
|
-
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
47
|
-
xScale?: import("@unovis/ts").ContinuousScale;
|
|
48
|
-
yScale?: import("@unovis/ts").ContinuousScale;
|
|
49
|
-
excludeFromDomainCalculation?: boolean;
|
|
50
|
-
labelFontSize?: NumericAccessor<Datum>;
|
|
51
|
-
labelTextBrightnessRatio?: number;
|
|
52
|
-
xPositioning?: import("@unovis/ts").GenericAccessor<string, Datum>;
|
|
53
|
-
yPositioning?: import("@unovis/ts").GenericAccessor<string, Datum>;
|
|
54
|
-
backgroundColor?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
55
|
-
clustering?: boolean;
|
|
56
|
-
clusterLabel?: import("@unovis/ts").StringAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
|
|
57
|
-
clusterFontSize?: NumericAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
|
|
58
|
-
clusterBackgroundColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
|
|
59
|
-
clusterCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
|
|
60
|
-
clusterLabelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").XYLabel<Datum>[]>;
|
|
61
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
62
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
63
|
-
component: import("vue").Ref<XYLabels<Datum>, XYLabels<Datum>>;
|
|
7
|
+
}), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
8
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
component: import('vue').Ref<XYLabels<Datum>, XYLabels<Datum>>;
|
|
64
10
|
}>): void;
|
|
65
11
|
attrs: any;
|
|
66
|
-
slots: {}
|
|
67
|
-
emit:
|
|
68
|
-
}>) => import(
|
|
12
|
+
slots: ReturnType<() => {}>;
|
|
13
|
+
emit: typeof __VLS_emit;
|
|
14
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
69
15
|
[key: string]: any;
|
|
70
16
|
}> & {
|
|
71
|
-
__ctx?:
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
72
18
|
};
|
|
73
19
|
export default _default;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { XYLabels as
|
|
3
|
-
import { useForwardProps as
|
|
4
|
-
import { componentAccessorKey as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as y, inject as m, computed as d, ref as F, onMounted as g, nextTick as b, onUnmounted as S, watch as a, createElementBlock as v, openBlock as f } from "vue";
|
|
2
|
+
import { XYLabels as i } from "@unovis/ts";
|
|
3
|
+
import { useForwardProps as x, arePropsEqual as _ } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as C } from "../../utils/context.js";
|
|
5
|
+
const B = { "data-vis-component": "" }, N = i.selectors, P = /* @__PURE__ */ y({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
|
-
color: {},
|
|
9
|
-
y: {},
|
|
10
|
-
xPositioning: {},
|
|
11
|
-
yPositioning: {},
|
|
12
|
-
labelFontSize: {},
|
|
13
|
-
label: {},
|
|
14
|
-
backgroundColor: {},
|
|
15
|
-
cursor: {},
|
|
8
|
+
color: { type: [Function, String, Array, null] },
|
|
9
|
+
y: { type: [Function, Number, null] },
|
|
10
|
+
xPositioning: { type: [Function, String, null] },
|
|
11
|
+
yPositioning: { type: [Function, String, null] },
|
|
12
|
+
labelFontSize: { type: [Function, Number, null] },
|
|
13
|
+
label: { type: [Function, String, null] },
|
|
14
|
+
backgroundColor: { type: [Function, String, Array, null] },
|
|
15
|
+
cursor: { type: [Function, String, null] },
|
|
16
16
|
labelTextBrightnessRatio: {},
|
|
17
17
|
clustering: { type: Boolean },
|
|
18
|
-
clusterLabel: {},
|
|
19
|
-
clusterFontSize: {},
|
|
20
|
-
clusterBackgroundColor: {},
|
|
21
|
-
clusterCursor: {},
|
|
22
|
-
clusterLabelColor: {},
|
|
23
|
-
x: {},
|
|
18
|
+
clusterLabel: { type: [Function, String, null] },
|
|
19
|
+
clusterFontSize: { type: [Function, Number, null] },
|
|
20
|
+
clusterBackgroundColor: { type: [Function, String, Array, null] },
|
|
21
|
+
clusterCursor: { type: [Function, String, null] },
|
|
22
|
+
clusterLabelColor: { type: [Function, String, Array, null] },
|
|
23
|
+
x: { type: [Function, Number, null] },
|
|
24
24
|
id: { type: Function },
|
|
25
25
|
xScale: { type: [Object, Function] },
|
|
26
26
|
yScale: { type: [Object, Function] },
|
|
@@ -30,29 +30,29 @@ const k = { "data-vis-component": "" }, j = u.selectors, w = /* @__PURE__ */ d({
|
|
|
30
30
|
attributes: {},
|
|
31
31
|
data: {}
|
|
32
32
|
},
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
var
|
|
38
|
-
|
|
33
|
+
setup(s, { expose: p }) {
|
|
34
|
+
const e = m(C), r = s, o = d(() => e.data.value ?? r.data), l = x(r), n = F();
|
|
35
|
+
return g(() => {
|
|
36
|
+
b(() => {
|
|
37
|
+
var t;
|
|
38
|
+
n.value = new i(l.value), (t = n.value) == null || t.setData(o.value), e.update(n.value);
|
|
39
39
|
});
|
|
40
|
-
}),
|
|
41
|
-
var
|
|
42
|
-
(
|
|
43
|
-
}), l
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
}),
|
|
47
|
-
var
|
|
48
|
-
(
|
|
40
|
+
}), S(() => {
|
|
41
|
+
var t;
|
|
42
|
+
(t = n.value) == null || t.destroy(), e.destroy();
|
|
43
|
+
}), a(l, (t, u) => {
|
|
44
|
+
var c;
|
|
45
|
+
_(t, u) || (c = n.value) == null || c.setConfig(l.value);
|
|
46
|
+
}), a(o, () => {
|
|
47
|
+
var t;
|
|
48
|
+
(t = n.value) == null || t.setData(o.value);
|
|
49
49
|
}), p({
|
|
50
|
-
component:
|
|
51
|
-
}), (
|
|
50
|
+
component: n
|
|
51
|
+
}), (t, u) => (f(), v("div", B));
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
N as VisXYLabelsSelectors,
|
|
56
|
+
P as default
|
|
57
57
|
};
|
|
58
58
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = XYLabelsConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/xy-labels/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { XYLabels, XYLabelsConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = XYLabelsConfigInterface<Datum>\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<XYLabels<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new XYLabels<Datum>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisXYLabelsSelectors","XYLabels","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C7C,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAgBQ,EAAO,KAAK,IAClDM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
|