@unovis/vue 1.6.1 → 1.6.2
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.
|
@@ -40,7 +40,7 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
40
40
|
data?: Datum[];
|
|
41
41
|
x?: NumericAccessor<Datum>;
|
|
42
42
|
y?: NumericAccessor<Datum> | NumericAccessor<Datum>[];
|
|
43
|
-
template?: (datum: Datum, x: number | Date, data
|
|
43
|
+
template?: (datum: Datum, x: number | Date, data?: Datum[], leftNearestDatumIndex?: number) => string | HTMLElement;
|
|
44
44
|
color?: import("@unovis/ts").ColorAccessor<Datum>;
|
|
45
45
|
baseline?: NumericAccessor<Datum>;
|
|
46
46
|
id?: (d: Datum, i: number, ...any: any[]) => string;
|
|
@@ -54,9 +54,10 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
54
54
|
hideWhenFarFromPointer?: boolean;
|
|
55
55
|
hideWhenFarFromPointerDistance?: number;
|
|
56
56
|
snapToData?: boolean;
|
|
57
|
-
getCircles?: (x: number | Date, data: Datum[], yScale: import("@unovis/ts").ContinuousScale, leftNearestDatumIndex
|
|
57
|
+
getCircles?: (x: number | Date, data: Datum[], yScale: import("@unovis/ts").ContinuousScale, leftNearestDatumIndex?: number) => import("@unovis/ts").CrosshairCircle[];
|
|
58
58
|
onCrosshairMove?: (x?: number | Date, datum?: Datum, datumIndex?: number, event?: MouseEvent | WheelEvent) => void;
|
|
59
59
|
forceShowAt?: number | Date;
|
|
60
|
+
skipRangeCheck?: boolean;
|
|
60
61
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
61
62
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
62
63
|
component: import("vue").Ref<Crosshair<Datum>, Crosshair<Datum>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),c=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},b=u.Treemap.selectors,f=t.defineComponent({__name:"index",props:{id:{type:Function},value:{},layers:{},numberFormat:{type:Function},tileColor:{},tilePadding:{},tilePaddingTop:{},labelInternalNodes:{type:Boolean},labelOffsetX:{},labelOffsetY:{},tileBorderRadius:{},tileBorderRadiusFactor:{},enableLightnessVariance:{type:Boolean},enableTileLabelFontSizeVariation:{type:Boolean},tileLabelSmallFontSize:{},tileLabelMediumFontSize:{},tileLabelLargeFontSize:{},showTileClickAffordance:{type:Boolean},lightnessVariationAmount:{},minTileSizeForLabel:{},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("@unovis/ts"),c=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},b=u.Treemap.selectors,f=t.defineComponent({__name:"index",props:{id:{type:Function},value:{},layers:{},numberFormat:{type:Function},tileLabel:{type:Function},tileColor:{},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=c.useForwardProps(i),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new u.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;c.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",v))}});exports.VisTreemapSelectors=b;exports.default=f;
|
|
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"],"mappings":"+PAkDaA,EAAsBC,EAAAA,QAAQ,8oBA3CrC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAoB,EAGtCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,GACvCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
|
|
@@ -43,7 +43,10 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
43
43
|
layers: StringAccessor<Datum>[];
|
|
44
44
|
labelOffsetX?: number;
|
|
45
45
|
labelOffsetY?: number;
|
|
46
|
+
labelFit?: import("@unovis/ts").FitMode;
|
|
47
|
+
labelTrimMode?: import("@unovis/ts").TrimMode;
|
|
46
48
|
numberFormat?: (value: number) => string;
|
|
49
|
+
tileLabel?: (node: import("@unovis/ts").TreemapNode<Datum>) => string;
|
|
47
50
|
tileColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").TreemapNode<Datum>>;
|
|
48
51
|
tilePadding?: number;
|
|
49
52
|
tilePaddingTop?: number;
|
|
@@ -58,7 +61,6 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
|
|
|
58
61
|
showTileClickAffordance?: boolean;
|
|
59
62
|
lightnessVariationAmount?: number;
|
|
60
63
|
minTileSizeForLabel?: number;
|
|
61
|
-
tileLabel?: (node: import("@unovis/ts").TreemapNode<Datum>) => string;
|
|
62
64
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
63
65
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
64
66
|
component: import("vue").Ref<Treemap<Datum>, Treemap<Datum>>;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { defineComponent as p, inject as m, computed as f, ref as
|
|
1
|
+
import { defineComponent as p, inject as m, computed as f, ref as b, onMounted as v, nextTick as F, onUnmounted as y, watch as s, createElementBlock as B, openBlock as L } 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 T, arePropsEqual as _ } from "../../utils/props.js";
|
|
4
|
+
import { componentAccessorKey as g } from "../../utils/context.js";
|
|
5
|
+
const S = { "data-vis-component": "" }, w = c.selectors, C = /* @__PURE__ */ p({
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
id: { type: Function },
|
|
9
9
|
value: {},
|
|
10
10
|
layers: {},
|
|
11
11
|
numberFormat: { type: Function },
|
|
12
|
+
tileLabel: { type: Function },
|
|
12
13
|
tileColor: {},
|
|
13
14
|
tilePadding: {},
|
|
14
15
|
tilePaddingTop: {},
|
|
15
16
|
labelInternalNodes: { type: Boolean },
|
|
16
17
|
labelOffsetX: {},
|
|
17
18
|
labelOffsetY: {},
|
|
19
|
+
labelFit: {},
|
|
20
|
+
labelTrimMode: {},
|
|
18
21
|
tileBorderRadius: {},
|
|
19
22
|
tileBorderRadiusFactor: {},
|
|
20
23
|
enableLightnessVariance: { type: Boolean },
|
|
@@ -25,31 +28,30 @@ const T = { "data-vis-component": "" }, w = c.selectors, C = /* @__PURE__ */ p({
|
|
|
25
28
|
showTileClickAffordance: { type: Boolean },
|
|
26
29
|
lightnessVariationAmount: {},
|
|
27
30
|
minTileSizeForLabel: {},
|
|
28
|
-
tileLabel: { type: Function },
|
|
29
31
|
duration: {},
|
|
30
32
|
events: {},
|
|
31
33
|
attributes: {},
|
|
32
34
|
data: {}
|
|
33
35
|
},
|
|
34
36
|
setup(u, { expose: d }) {
|
|
35
|
-
const o = m(
|
|
36
|
-
return
|
|
37
|
-
|
|
37
|
+
const o = m(g), l = u, a = f(() => o.data.value ?? l.data), n = T(l), t = b();
|
|
38
|
+
return v(() => {
|
|
39
|
+
F(() => {
|
|
38
40
|
var e;
|
|
39
41
|
t.value = new c(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
|
|
40
42
|
});
|
|
41
|
-
}),
|
|
43
|
+
}), y(() => {
|
|
42
44
|
var e;
|
|
43
45
|
(e = t.value) == null || e.destroy(), o.destroy();
|
|
44
46
|
}), s(n, (e, i) => {
|
|
45
47
|
var r;
|
|
46
|
-
|
|
48
|
+
_(e, i) || (r = t.value) == null || r.setConfig(n.value);
|
|
47
49
|
}), s(a, () => {
|
|
48
50
|
var e;
|
|
49
51
|
(e = t.value) == null || e.setData(a.value);
|
|
50
52
|
}), d({
|
|
51
53
|
component: t
|
|
52
|
-
}), (e, i) => (L(), B("div",
|
|
54
|
+
}), (e, i) => (L(), B("div", S));
|
|
53
55
|
}
|
|
54
56
|
});
|
|
55
57
|
export {
|
|
@@ -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"],"mappings":";;;;wCAkDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAoB;AAGtC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,IACvCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/vue",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, Vue, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.2",
|
|
5
5
|
"packageManager": "npm@10.9.1",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"gallery": "vite"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@unovis/ts": "1.6.
|
|
56
|
+
"@unovis/ts": "1.6.2",
|
|
57
57
|
"vue": "^3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|