@unovis/vue 1.6.2 → 1.7.0-pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/components/annotations/index.cjs +1 -1
  2. package/components/annotations/index.cjs.map +1 -1
  3. package/components/annotations/index.d.ts +6 -0
  4. package/components/annotations/index.js +10 -9
  5. package/components/annotations/index.js.map +1 -1
  6. package/components/area/index.cjs +1 -1
  7. package/components/area/index.cjs.map +1 -1
  8. package/components/area/index.d.ts +5 -0
  9. package/components/area/index.js +21 -16
  10. package/components/area/index.js.map +1 -1
  11. package/components/crosshair/index.d.ts +1 -1
  12. package/components/line/index.d.ts +2 -2
  13. package/components/plotline/index.d.ts +1 -1
  14. package/components/sankey/index.cjs +1 -1
  15. package/components/sankey/index.cjs.map +1 -1
  16. package/components/sankey/index.d.ts +11 -0
  17. package/components/sankey/index.js +27 -16
  18. package/components/sankey/index.js.map +1 -1
  19. package/components/timeline/index.d.ts +1 -1
  20. package/components/topojson-map/index.d.ts +1 -1
  21. package/components.d.ts +1 -0
  22. package/containers/single-container/index.cjs +1 -1
  23. package/containers/single-container/index.cjs.map +1 -1
  24. package/containers/single-container/index.d.ts +1 -0
  25. package/containers/single-container/index.js +9 -8
  26. package/containers/single-container/index.js.map +1 -1
  27. package/containers/xy-container/index.cjs +1 -1
  28. package/containers/xy-container/index.cjs.map +1 -1
  29. package/containers/xy-container/index.d.ts +1 -0
  30. package/containers/xy-container/index.js +7 -6
  31. package/containers/xy-container/index.js.map +1 -1
  32. package/html-components/bullet-legend/index.cjs +1 -1
  33. package/html-components/bullet-legend/index.cjs.map +1 -1
  34. package/html-components/bullet-legend/index.js +10 -10
  35. package/html-components/bullet-legend/index.js.map +1 -1
  36. package/html-components/flow-legend/index.cjs +2 -0
  37. package/html-components/flow-legend/index.cjs.map +1 -0
  38. package/html-components/flow-legend/index.d.ts +86 -0
  39. package/html-components/flow-legend/index.js +48 -0
  40. package/html-components/flow-legend/index.js.map +1 -0
  41. package/html-components/flow-legend/index3.cjs +2 -0
  42. package/html-components/flow-legend/index3.cjs.map +1 -0
  43. package/html-components/flow-legend/index3.js +8 -0
  44. package/html-components/flow-legend/index3.js.map +1 -0
  45. package/index.cjs +2 -2
  46. package/index.js +74 -70
  47. package/index.js.map +1 -1
  48. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),c=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),v={"data-vis-annotations":""},_=i.Annotations.selectors,f=e.defineComponent({__name:"index",props:{items:{},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:l}){const s=e.inject(p.annotationsAccessorKey),d=u,n=c.useForwardProps(d),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Annotations(n.value),s.update(t.value)})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy(),s.destroy()}),e.watch(n,(o,r)=>{var a;c.arePropsEqual(o,r)||(a=t.value)==null||a.setConfig(n.value)}),l({component:t}),(o,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisAnnotationsSelectors=_;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),c=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),v={"data-vis-annotations":""},_=i.Annotations.selectors,f=e.defineComponent({__name:"index",props:{items:{},renderTextBoundingBoxes:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u,{expose:l}){const s=e.inject(p.annotationsAccessorKey),d=u,n=c.useForwardProps(d),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Annotations(n.value),s.update(t.value)})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy(),s.destroy()}),e.watch(n,(o,r)=>{var a;c.arePropsEqual(o,r)||(a=t.value)==null||a.setConfig(n.value)}),l({component:t}),(o,r)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisAnnotationsSelectors=_;exports.default=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \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\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":"iQA+CaA,EAA0BC,EAAAA,YAAY,+HAxC7C,MAAAC,EAAWC,SAAOC,wBAAsB,EAIxCC,EAAQC,EAIRC,EAASC,kBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,cAAYM,EAAO,KAAK,EAErCL,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKa,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAGYY,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \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\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":"iQA+CaA,EAA0BC,EAAAA,YAAY,sKAxC7C,MAAAC,EAAWC,SAAOC,wBAAsB,EAIxCC,EAAQC,EAIRC,EAASC,kBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,cAAYM,EAAO,KAAK,EAErCL,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKa,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAGYY,EAAA,CACX,UAAAV,CAAA,CACD"}
@@ -5,6 +5,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
5
5
  type: import("vue").PropType<AnnotationItem[]>;
6
6
  required: true;
7
7
  };
8
+ renderTextBoundingBoxes: {
9
+ type: import("vue").PropType<boolean>;
10
+ };
8
11
  duration: {
9
12
  type: import("vue").PropType<number>;
10
13
  };
@@ -52,6 +55,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
52
55
  type: import("vue").PropType<AnnotationItem[]>;
53
56
  required: true;
54
57
  };
58
+ renderTextBoundingBoxes: {
59
+ type: import("vue").PropType<boolean>;
60
+ };
55
61
  duration: {
56
62
  type: import("vue").PropType<number>;
57
63
  };
@@ -1,19 +1,20 @@
1
- import { defineComponent as p, inject as u, ref as m, onMounted as d, nextTick as l, onUnmounted as f, watch as v, createElementBlock as _, openBlock as x } from "vue";
1
+ import { defineComponent as p, inject as u, ref as d, onMounted as m, nextTick as l, onUnmounted as f, watch as v, createElementBlock as _, openBlock as x } from "vue";
2
2
  import { Annotations as a } from "@unovis/ts";
3
- import { useForwardProps as h, arePropsEqual as k } from "../../utils/props.js";
4
- import { annotationsAccessorKey as w } from "../../utils/context.js";
5
- const y = { "data-vis-annotations": "" }, P = a.selectors, b = /* @__PURE__ */ p({
3
+ import { useForwardProps as B, arePropsEqual as y } from "../../utils/props.js";
4
+ import { annotationsAccessorKey as g } from "../../utils/context.js";
5
+ const h = { "data-vis-annotations": "" }, P = a.selectors, T = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  items: {},
9
+ renderTextBoundingBoxes: { type: Boolean },
9
10
  duration: {},
10
11
  events: {},
11
12
  attributes: {},
12
13
  data: {}
13
14
  },
14
15
  setup(c, { expose: i }) {
15
- const n = u(w), t = h(c), o = m();
16
- return d(() => {
16
+ const n = u(g), t = B(c), o = d();
17
+ return m(() => {
17
18
  l(() => {
18
19
  o.value = new a(t.value), n.update(o.value);
19
20
  });
@@ -22,14 +23,14 @@ const y = { "data-vis-annotations": "" }, P = a.selectors, b = /* @__PURE__ */ p
22
23
  (e = o.value) == null || e.destroy(), n.destroy();
23
24
  }), v(t, (e, s) => {
24
25
  var r;
25
- k(e, s) || (r = o.value) == null || r.setConfig(t.value);
26
+ y(e, s) || (r = o.value) == null || r.setConfig(t.value);
26
27
  }), i({
27
28
  component: o
28
- }), (e, s) => (x(), _("div", y));
29
+ }), (e, s) => (x(), _("div", h));
29
30
  }
30
31
  });
31
32
  export {
32
33
  P as VisAnnotationsSelectors,
33
- b as default
34
+ T as default
34
35
  };
35
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \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\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;0CA+CaA,IAA0BC,EAAY;;;;;;;;;;AAxC7C,UAAAC,IAAWC,EAAOC,CAAsB,GAQxCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAYI,EAAO,KAAK,GAErCH,EAAA,OAAOM,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKY,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUR,EAAO;AAAA,IACpC,CACD,GAGYa,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/annotations/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Annotations, AnnotationsConfigInterface, AnnotationItem } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { annotationsAccessorKey } from '../../utils/context'\n\nconst accessor = inject(annotationsAccessorKey)\n\n// data and required props \ntype Props = AnnotationsConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Annotations>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Annotations(config.value)\n \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\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisAnnotationsSelectors = Annotations.selectors\n</script>\n\n<template>\n <div data-vis-annotations />\n</template>\n\n\n"],"names":["VisAnnotationsSelectors","Annotations","accessor","inject","annotationsAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;0CA+CaA,IAA0BC,EAAY;;;;;;;;;;;AAxC7C,UAAAC,IAAWC,EAAOC,CAAsB,GAQxCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAYI,EAAO,KAAK,GAErCH,EAAA,OAAOM,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKY,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUR,EAAO;AAAA,IACpC,CACD,GAGYa,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),m={"data-vis-component":""},y=l.Area.selectors,_=t.defineComponent({__name:"index",props:{color:{},curveType:{},baseline:{},opacity:{},cursor:{},minHeight1Px:{type:Boolean},minHeight:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const n=t.inject(v.componentAccessorKey),s=p,a=t.computed(()=>n.data.value??s.data),c=i.useForwardProps(s),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.Area(c.value),(e=o.value)==null||e.setData(a.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(c,(e,r)=>{var u;i.arePropsEqual(e,r)||(u=o.value)==null||u.setConfig(c.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),d({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisAreaSelectors=y;exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("@unovis/ts"),u=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),y={"data-vis-component":""},m=l.Area.selectors,_=t.defineComponent({__name:"index",props:{color:{},curveType:{},baseline:{},opacity:{},cursor:{},line:{type:Boolean},lineColor:{},lineWidth:{},lineDashArray:{},minHeight1Px:{type:Boolean},minHeight:{},stackMinHeight:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const n=t.inject(v.componentAccessorKey),s=p,a=t.computed(()=>n.data.value??s.data),c=u.useForwardProps(s),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.Area(c.value),(e=o.value)==null||e.setData(a.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(c,(e,r)=>{var i;u.arePropsEqual(e,r)||(i=o.value)==null||i.setConfig(c.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),d({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",y))}});exports.VisAreaSelectors=m;exports.default=_;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, 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 = AreaConfigInterface<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<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<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 VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAmBC,EAAAA,KAAK,+VA3C/B,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GACpCM,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"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, 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 = AreaConfigInterface<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<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<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 VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAmBC,EAAAA,KAAK,4bA3C/B,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GACpCM,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"}
@@ -40,13 +40,18 @@ 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
+ line?: boolean;
43
44
  color?: import("@unovis/ts").ColorAccessor<Datum[]>;
44
45
  curveType?: string;
45
46
  baseline?: NumericAccessor<Datum>;
46
47
  opacity?: NumericAccessor<Datum[]>;
47
48
  cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
49
+ lineColor?: import("@unovis/ts").ColorAccessor<Datum[]>;
50
+ lineWidth?: number;
51
+ lineDashArray?: import("@unovis/ts").GenericAccessor<number[], Datum[]>;
48
52
  minHeight1Px?: boolean;
49
53
  minHeight?: number;
54
+ stackMinHeight?: boolean;
50
55
  id?: (d: Datum, i: number, ...any: any[]) => string;
51
56
  xScale?: import("@unovis/ts").ContinuousScale;
52
57
  yScale?: import("@unovis/ts").ContinuousScale;
@@ -1,8 +1,8 @@
1
- import { defineComponent as m, inject as d, computed as v, ref as y, onMounted as f, nextTick as x, onUnmounted as _, watch as i, createElementBlock as h, openBlock as F } from "vue";
2
- import { Area as u } from "@unovis/ts";
3
- import { useForwardProps as b, arePropsEqual as g } from "../../utils/props.js";
4
- import { componentAccessorKey as B } from "../../utils/context.js";
5
- const j = { "data-vis-component": "" }, D = u.selectors, P = /* @__PURE__ */ m({
1
+ import { defineComponent as d, inject as m, computed as v, ref as y, onMounted as f, nextTick as x, onUnmounted as h, watch as i, createElementBlock as _, openBlock as B } from "vue";
2
+ import { Area as l } from "@unovis/ts";
3
+ import { useForwardProps as g, arePropsEqual as F } from "../../utils/props.js";
4
+ import { componentAccessorKey as b } from "../../utils/context.js";
5
+ const k = { "data-vis-component": "" }, w = l.selectors, H = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
8
  color: {},
@@ -10,8 +10,13 @@ const j = { "data-vis-component": "" }, D = u.selectors, P = /* @__PURE__ */ m({
10
10
  baseline: {},
11
11
  opacity: {},
12
12
  cursor: {},
13
+ line: { type: Boolean },
14
+ lineColor: {},
15
+ lineWidth: {},
16
+ lineDashArray: {},
13
17
  minHeight1Px: { type: Boolean },
14
18
  minHeight: {},
19
+ stackMinHeight: { type: Boolean },
15
20
  x: {},
16
21
  y: {},
17
22
  id: { type: Function },
@@ -23,29 +28,29 @@ const j = { "data-vis-component": "" }, D = u.selectors, P = /* @__PURE__ */ m({
23
28
  attributes: {},
24
29
  data: {}
25
30
  },
26
- setup(l, { expose: p }) {
27
- const o = d(B), c = l, a = v(() => o.data.value ?? c.data), n = b(c), t = y();
31
+ setup(u, { expose: p }) {
32
+ const o = m(b), c = u, n = v(() => o.data.value ?? c.data), a = g(c), t = y();
28
33
  return f(() => {
29
34
  x(() => {
30
35
  var e;
31
- t.value = new u(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
36
+ t.value = new l(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
32
37
  });
33
- }), _(() => {
38
+ }), h(() => {
34
39
  var e;
35
40
  (e = t.value) == null || e.destroy(), o.destroy();
36
- }), i(n, (e, r) => {
41
+ }), i(a, (e, r) => {
37
42
  var s;
38
- g(e, r) || (s = t.value) == null || s.setConfig(n.value);
39
- }), i(a, () => {
43
+ F(e, r) || (s = t.value) == null || s.setConfig(a.value);
44
+ }), i(n, () => {
40
45
  var e;
41
- (e = t.value) == null || e.setData(a.value);
46
+ (e = t.value) == null || e.setData(n.value);
42
47
  }), p({
43
48
  component: t
44
- }), (e, r) => (F(), h("div", j));
49
+ }), (e, r) => (B(), _("div", k));
45
50
  }
46
51
  });
47
52
  export {
48
- D as VisAreaSelectors,
49
- P as default
53
+ w as VisAreaSelectors,
54
+ H as default
50
55
  };
51
56
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, 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 = AreaConfigInterface<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<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<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 VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;AA3C/B,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IACpCM,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;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/area/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Area, AreaConfigInterface, 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 = AreaConfigInterface<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<Area<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Area<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 VisAreaSelectors = Area.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisAreaSelectors","Area","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C/B,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IACpCM,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;;;"}
@@ -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?: Datum[], leftNearestDatumIndex?: number) => string | HTMLElement;
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;
@@ -43,12 +43,12 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
43
43
  color?: import("@unovis/ts").ColorAccessor<Datum[]>;
44
44
  curveType?: import("@unovis/ts").CurveType;
45
45
  cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
46
+ lineWidth?: number;
47
+ lineDashArray?: import("@unovis/ts").GenericAccessor<number[], Datum[]>;
46
48
  id?: (d: Datum, i: number, ...any: any[]) => string;
47
49
  xScale?: import("@unovis/ts").ContinuousScale;
48
50
  yScale?: import("@unovis/ts").ContinuousScale;
49
51
  excludeFromDomainCalculation?: boolean;
50
- lineWidth?: number;
51
- lineDashArray?: import("@unovis/ts").GenericAccessor<number[], Datum[]>;
52
52
  fallbackValue?: number;
53
53
  highlightOnHover?: boolean;
54
54
  interpolateMissingData?: boolean;
@@ -41,13 +41,13 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
41
41
  x?: import("@unovis/ts").NumericAccessor<Datum>;
42
42
  y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
43
43
  color?: string;
44
+ lineWidth?: number;
44
45
  id?: (d: Datum, i: number, ...any: any[]) => string;
45
46
  xScale?: import("@unovis/ts").ContinuousScale;
46
47
  yScale?: import("@unovis/ts").ContinuousScale;
47
48
  excludeFromDomainCalculation?: boolean;
48
49
  labelColor?: string;
49
50
  value?: number;
50
- lineWidth?: number;
51
51
  axis?: string;
52
52
  labelText?: string;
53
53
  labelPosition?: import("@unovis/ts").PlotlineLabelPosition;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),c=require("@unovis/ts"),u=require("../../utils/props.cjs"),b=require("../../utils/context.cjs"),h={"data-vis-component":""},y=c.Sankey.selectors,g=o.defineComponent({__name:"index",props:{id:{type:Function},heightNormalizationCoeff:{},exitTransitionType:{},enterTransitionType:{},highlightSubtreeOnHover:{type:Boolean},highlightDuration:{},highlightDelay:{},iterations:{},nodeSort:{type:[Function,null]},linkSort:{type:[Function,null]},nodeWidth:{},nodeAlign:{},nodeHorizontalSpacing:{},nodeMinHeight:{},nodeMaxHeight:{},nodePadding:{},showSingleNode:{type:Boolean},nodeCursor:{},nodeIcon:{},nodeColor:{},nodeFixedValue:{},nodeIconColor:{},linkColor:{},linkValue:{},linkCursor:{},label:{},subLabel:{},labelPosition:{},labelVerticalAlign:{},labelBackground:{type:Boolean},labelFit:{},labelMaxWidth:{},labelExpandTrimmedOnHover:{type:Boolean},labelTrimMode:{},labelFontSize:{},labelTextSeparator:{},labelForceWordBreak:{type:Boolean},labelColor:{},labelCursor:{},labelVisibility:{type:Function},subLabelFontSize:{},subLabelColor:{},subLabelPlacement:{},subLabelToLabelInlineWidthRatio:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const n=o.inject(b.componentAccessorKey),i=d,a=o.computed(()=>n.data.value??i.data),l=u.useForwardProps(i),t=o.ref();return o.onMounted(()=>{o.nextTick(()=>{var e;t.value=new c.Sankey(l.value),(e=t.value)==null||e.setData(a.value),n.update(t.value)})}),o.onUnmounted(()=>{var e;(e=t.value)==null||e.destroy(),n.destroy()}),o.watch(l,(e,r)=>{var s;u.arePropsEqual(e,r)||(s=t.value)==null||s.setConfig(l.value)}),o.watch(a,()=>{var e;(e=t.value)==null||e.setData(a.value)}),p({component:t}),(e,r)=>(o.openBlock(),o.createElementBlock("div",h))}});exports.VisSankeySelectors=y;exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),u=require("@unovis/ts"),c=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),y={"data-vis-component":""},h=u.Sankey.selectors,m=o.defineComponent({__name:"index",props:{id:{type:Function},heightNormalizationCoeff:{},zoomScale:{},zoomPan:{},enableZoom:{type:Boolean},zoomExtent:{},zoomMode:{},exitTransitionType:{},enterTransitionType:{},highlightSubtreeOnHover:{type:Boolean},highlightDuration:{},highlightDelay:{},iterations:{},nodeSort:{type:[Function,null]},linkSort:{type:[Function,null]},nodeWidth:{},nodeAlign:{},nodeHorizontalSpacing:{},nodeMinHeight:{},nodeMaxHeight:{},nodePadding:{},showSingleNode:{type:Boolean},nodeCursor:{},nodeIcon:{},nodeColor:{},nodeFixedValue:{},nodeIconColor:{},linkColor:{},linkValue:{},linkCursor:{},label:{},subLabel:{},labelPosition:{},labelVerticalAlign:{},labelBackground:{type:Boolean},labelFit:{},labelMaxWidth:{},labelMaxWidthTakeAvailableSpace:{type:Boolean},labelMaxWidthTakeAvailableSpaceTolerance:{},labelExpandTrimmedOnHover:{type:Boolean},labelTrimMode:{},labelFontSize:{},labelTextSeparator:{},labelTextDecoration:{},labelForceWordBreak:{type:Boolean},labelColor:{},labelCursor:{},labelVisibility:{type:Function},subLabelFontSize:{},subLabelColor:{},subLabelPlacement:{},subLabelTextDecoration:{},subLabelToLabelInlineWidthRatio:{},onZoom:{type:Function},selectedNodeIds:{},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:b}){const n=o.inject(p.componentAccessorKey),i=d,a=o.computed(()=>n.data.value??i.data),l=c.useForwardProps(i),t=o.ref();return o.onMounted(()=>{o.nextTick(()=>{var e;t.value=new u.Sankey(l.value),(e=t.value)==null||e.setData(a.value),n.update(t.value)})}),o.onUnmounted(()=>{var e;(e=t.value)==null||e.destroy(),n.destroy()}),o.watch(l,(e,r)=>{var s;c.arePropsEqual(e,r)||(s=t.value)==null||s.setConfig(l.value)}),o.watch(a,()=>{var e;(e=t.value)==null||e.setData(a.value)}),b({component:t}),(e,r)=>(o.openBlock(),o.createElementBlock("div",y))}});exports.VisSankeySelectors=h;exports.default=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } 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 = SankeyConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<N, L>(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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisSankeySelectors","Sankey","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAqBC,EAAAA,OAAO,w/BA3CnC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAkB,EAGpCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,SAAaQ,EAAO,KAAK,GACrCM,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"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } 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 = SankeyConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<N, L>(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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisSankeySelectors","Sankey","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAqBC,EAAAA,OAAO,0vCA3CnC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAkB,EAGpCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,SAAaQ,EAAO,KAAK,GACrCM,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"}
@@ -51,8 +51,15 @@ declare const _default: <N extends import("@unovis/ts").GraphInputNode, L extend
51
51
  nodeColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
52
52
  nodeIcon?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
53
53
  nodeSort?: (node1: import("@unovis/ts").SankeyNode<N, L>, node2: import("@unovis/ts").SankeyNode<N, L>) => number;
54
+ selectedNodeIds?: string[];
55
+ onZoom?: (horizontalScale: number, verticalScale: number, panX: number, panY: number, zoomExtent: [number, number], event: import("d3-zoom").D3ZoomEvent<SVGGElement, unknown>) => void;
54
56
  labelPosition?: import("@unovis/ts").GenericAccessor<string, import("@unovis/ts").SankeyNode<N, L>>;
55
57
  heightNormalizationCoeff?: number;
58
+ zoomScale?: [number, number];
59
+ zoomPan?: [number, number];
60
+ enableZoom?: boolean;
61
+ zoomExtent?: [number, number];
62
+ zoomMode?: string;
56
63
  exitTransitionType?: import("@unovis/ts").SankeyExitTransitionType;
57
64
  enterTransitionType?: import("@unovis/ts").SankeyEnterTransitionType;
58
65
  highlightSubtreeOnHover?: boolean;
@@ -75,9 +82,12 @@ declare const _default: <N extends import("@unovis/ts").GraphInputNode, L extend
75
82
  labelBackground?: boolean;
76
83
  labelFit?: import("@unovis/ts").FitMode;
77
84
  labelMaxWidth?: number;
85
+ labelMaxWidthTakeAvailableSpace?: boolean;
86
+ labelMaxWidthTakeAvailableSpaceTolerance?: number;
78
87
  labelExpandTrimmedOnHover?: boolean;
79
88
  labelTrimMode?: import("@unovis/ts").TrimMode;
80
89
  labelTextSeparator?: string[];
90
+ labelTextDecoration?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
81
91
  labelForceWordBreak?: boolean;
82
92
  labelCursor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
83
93
  labelVisibility?: (d: import("@unovis/ts").SankeyNode<N, L>, bbox: {
@@ -89,6 +99,7 @@ declare const _default: <N extends import("@unovis/ts").GraphInputNode, L extend
89
99
  subLabelFontSize?: number;
90
100
  subLabelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").SankeyNode<N, L>>;
91
101
  subLabelPlacement?: string;
102
+ subLabelTextDecoration?: import("@unovis/ts").StringAccessor<import("@unovis/ts").SankeyNode<N, L>>;
92
103
  subLabelToLabelInlineWidthRatio?: number;
93
104
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
94
105
  expose(exposed: import("vue").ShallowUnwrapRef<{
@@ -1,12 +1,17 @@
1
- import { defineComponent as p, inject as b, computed as m, ref as h, onMounted as y, nextTick as g, onUnmounted as v, watch as s, createElementBlock as f, openBlock as k } from "vue";
1
+ import { defineComponent as p, inject as b, computed as m, ref as h, onMounted as y, nextTick as v, onUnmounted as g, watch as s, createElementBlock as x, openBlock as S } from "vue";
2
2
  import { Sankey as d } from "@unovis/ts";
3
- import { useForwardProps as x, arePropsEqual as C } from "../../utils/props.js";
4
- import { componentAccessorKey as S } from "../../utils/context.js";
5
- const F = { "data-vis-component": "" }, H = d.selectors, M = /* @__PURE__ */ p({
3
+ import { useForwardProps as T, arePropsEqual as f } from "../../utils/props.js";
4
+ import { componentAccessorKey as k } from "../../utils/context.js";
5
+ const B = { "data-vis-component": "" }, _ = d.selectors, L = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  id: { type: Function },
9
9
  heightNormalizationCoeff: {},
10
+ zoomScale: {},
11
+ zoomPan: {},
12
+ enableZoom: { type: Boolean },
13
+ zoomExtent: {},
14
+ zoomMode: {},
10
15
  exitTransitionType: {},
11
16
  enterTransitionType: {},
12
17
  highlightSubtreeOnHover: { type: Boolean },
@@ -37,10 +42,13 @@ const F = { "data-vis-component": "" }, H = d.selectors, M = /* @__PURE__ */ p({
37
42
  labelBackground: { type: Boolean },
38
43
  labelFit: {},
39
44
  labelMaxWidth: {},
45
+ labelMaxWidthTakeAvailableSpace: { type: Boolean },
46
+ labelMaxWidthTakeAvailableSpaceTolerance: {},
40
47
  labelExpandTrimmedOnHover: { type: Boolean },
41
48
  labelTrimMode: {},
42
49
  labelFontSize: {},
43
50
  labelTextSeparator: {},
51
+ labelTextDecoration: {},
44
52
  labelForceWordBreak: { type: Boolean },
45
53
  labelColor: {},
46
54
  labelCursor: {},
@@ -48,35 +56,38 @@ const F = { "data-vis-component": "" }, H = d.selectors, M = /* @__PURE__ */ p({
48
56
  subLabelFontSize: {},
49
57
  subLabelColor: {},
50
58
  subLabelPlacement: {},
59
+ subLabelTextDecoration: {},
51
60
  subLabelToLabelInlineWidthRatio: {},
61
+ onZoom: { type: Function },
62
+ selectedNodeIds: {},
52
63
  duration: {},
53
64
  events: {},
54
65
  attributes: {},
55
66
  data: {}
56
67
  },
57
- setup(u, { expose: c }) {
58
- const n = b(S), l = u, t = m(() => n.data.value ?? l.data), a = x(l), o = h();
68
+ setup(c, { expose: u }) {
69
+ const a = b(k), l = c, t = m(() => a.data.value ?? l.data), n = T(l), o = h();
59
70
  return y(() => {
60
- g(() => {
71
+ v(() => {
61
72
  var e;
62
- o.value = new d(a.value), (e = o.value) == null || e.setData(t.value), n.update(o.value);
73
+ o.value = new d(n.value), (e = o.value) == null || e.setData(t.value), a.update(o.value);
63
74
  });
64
- }), v(() => {
75
+ }), g(() => {
65
76
  var e;
66
- (e = o.value) == null || e.destroy(), n.destroy();
67
- }), s(a, (e, i) => {
77
+ (e = o.value) == null || e.destroy(), a.destroy();
78
+ }), s(n, (e, i) => {
68
79
  var r;
69
- C(e, i) || (r = o.value) == null || r.setConfig(a.value);
80
+ f(e, i) || (r = o.value) == null || r.setConfig(n.value);
70
81
  }), s(t, () => {
71
82
  var e;
72
83
  (e = o.value) == null || e.setData(t.value);
73
- }), c({
84
+ }), u({
74
85
  component: o
75
- }), (e, i) => (k(), f("div", F));
86
+ }), (e, i) => (S(), x("div", B));
76
87
  }
77
88
  });
78
89
  export {
79
- H as VisSankeySelectors,
80
- M as default
90
+ _ as VisSankeySelectors,
91
+ L as default
81
92
  };
82
93
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } 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 = SankeyConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<N, L>(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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisSankeySelectors","Sankey","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAqBC,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CnC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAkB;AAGpC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAaQ,EAAO,KAAK,IACrCM,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;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/sankey/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends SankeyInputNode,L extends SankeyInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Sankey, SankeyConfigInterface, SankeyInputNode, SankeyInputLink } 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 = SankeyConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Sankey<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Sankey<N, L>(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 VisSankeySelectors = Sankey.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisSankeySelectors","Sankey","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAqBC,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CnC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAkB;AAGpC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAaQ,EAAO,KAAK,IACrCM,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;;;"}
@@ -45,13 +45,13 @@ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
45
45
  onScroll?: (scrollTop: number) => void;
46
46
  color?: import("@unovis/ts").ColorAccessor<Datum>;
47
47
  cursor?: StringAccessor<Datum>;
48
+ lineWidth?: NumericAccessor<Datum>;
48
49
  id?: (d: Datum, i: number, ...any: any[]) => string;
49
50
  xScale?: import("@unovis/ts").ContinuousScale;
50
51
  yScale?: import("@unovis/ts").ContinuousScale;
51
52
  excludeFromDomainCalculation?: boolean;
52
53
  type?: StringAccessor<Datum>;
53
54
  showEmptySegments?: boolean;
54
- lineWidth?: NumericAccessor<Datum>;
55
55
  lineRow?: StringAccessor<Datum>;
56
56
  lineDuration?: NumericAccessor<Datum>;
57
57
  lineCap?: boolean;
@@ -45,6 +45,7 @@ declare const _default: <AreaDatum, PointDatum, LinkDatum>(__VLS_props: any, __V
45
45
  linkColor?: import("@unovis/ts").ColorAccessor<LinkDatum>;
46
46
  disableZoom?: boolean;
47
47
  linkWidth?: import("@unovis/ts").NumericAccessor<LinkDatum>;
48
+ zoomExtent?: number[];
48
49
  linkCursor?: import("@unovis/ts").StringAccessor<LinkDatum>;
49
50
  projection?: import("d3-geo").GeoProjection;
50
51
  topojson?: import("topojson-specification").Topology<import("topojson-specification").Objects<{
@@ -53,7 +54,6 @@ declare const _default: <AreaDatum, PointDatum, LinkDatum>(__VLS_props: any, __V
53
54
  mapFeatureName?: string;
54
55
  mapFitToPoints?: boolean;
55
56
  zoomFactor?: number;
56
- zoomExtent?: number[];
57
57
  zoomDuration?: number;
58
58
  linkId?: import("@unovis/ts").StringAccessor<LinkDatum>;
59
59
  linkSource?: (l: LinkDatum) => string | number | PointDatum;
package/components.d.ts CHANGED
@@ -23,4 +23,5 @@ export { default as VisAnnotations, VisAnnotationsSelectors } from "./components
23
23
  export { default as VisLeafletMap, VisLeafletMapSelectors } from "./html-components/leaflet-map/index";
24
24
  export { default as VisLeafletFlowMap, VisLeafletFlowMapSelectors } from "./html-components/leaflet-flow-map/index";
25
25
  export { default as VisBulletLegend, VisBulletLegendSelectors } from "./html-components/bullet-legend/index";
26
+ export { default as VisFlowLegend, VisFlowLegendSelectors } from "./html-components/flow-legend/index";
26
27
  export { default as VisRollingPinLegend, VisRollingPinLegendSelectors } from "./html-components/rolling-pin-legend/index";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@unovis/ts"),a=require("../../utils/context.cjs"),v=require("../../utils/props.cjs"),f=e.defineComponent({__name:"index",props:{component:{},tooltip:{},annotations:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(d,{expose:p}){const r=d,{data:i}=e.toRefs(r),l=v.useForwardProps(r);let o;const t=e.reactive({component:void 0,tooltip:void 0,annotations:void 0}),s=e.ref(),c=()=>{o||s.value&&t.component&&(o=new u.SingleContainer(s.value,{...e.toRaw(t)},i.value))};return e.watchEffect(()=>{var n;c(),(n=t.component)==null||n.config,o==null||o.updateContainer({...e.toRaw(l.value),...e.toRaw(t)})}),e.watch(i,()=>{o?o.setData(i.value,!0):c()}),e.onUnmounted(()=>o==null?void 0:o.destroy()),e.provide(a.componentAccessorKey,{data:i,update:n=>t.component=n,destroy:()=>t.component=void 0}),e.provide(a.tooltipAccessorKey,{data:i,update:n=>t.tooltip=n,destroy:()=>{t.tooltip=void 0}}),e.provide(a.annotationsAccessorKey,{data:i,update:n=>t.annotations=n,destroy:()=>{t.annotations=void 0}}),p({component:o}),(n,m)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:s,class:"unovis-single-container"},[e.renderSlot(n.$slots,"default")],512))}});exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@unovis/ts"),a=require("../../utils/context.cjs"),v=require("../../utils/props.cjs"),f=e.defineComponent({__name:"index",props:{component:{},tooltip:{},annotations:{},onRenderComplete:{type:Function},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(d,{expose:p}){const r=d,{data:i}=e.toRefs(r),l=v.useForwardProps(r);let o;const t=e.reactive({component:void 0,tooltip:void 0,annotations:void 0}),s=e.ref(),c=()=>{o||s.value&&t.component&&(o=new u.SingleContainer(s.value,{...e.toRaw(t)},i.value))};return e.watchEffect(()=>{var n;c(),(n=t.component)==null||n.config,o==null||o.updateContainer({...e.toRaw(l.value),...e.toRaw(t)})}),e.watch(i,()=>{o?o.setData(i.value,!0):c()}),e.onUnmounted(()=>o==null?void 0:o.destroy()),e.provide(a.componentAccessorKey,{data:i,update:n=>t.component=n,destroy:()=>t.component=void 0}),e.provide(a.tooltipAccessorKey,{data:i,update:n=>t.tooltip=n,destroy:()=>{t.tooltip=void 0}}),e.provide(a.annotationsAccessorKey,{data:i,update:n=>t.annotations=n,destroy:()=>{t.annotations=void 0}}),p({component:o}),(n,m)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:s,class:"unovis-single-container"},[e.renderSlot(n.$slots,"default")],512))}});exports.default=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose"],"mappings":"waAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAA,OAAOH,CAAK,EACvBI,EAAcC,kBAAgBL,CAAK,EAErC,IAAAM,EACJ,MAAMC,EAASC,EAAAA,SAAS,CACtB,UAAW,OACX,QAAS,OACT,YAAa,MAAA,CACd,EACKC,EAAQC,EAAAA,IAAoB,EAE5BC,EAAY,IAAM,CAClBL,GACAG,EAAM,OAASF,EAAO,YAChBD,EAAA,IAAIM,EAAAA,gBAAgBH,EAAM,MAAO,CAAE,GAAGI,EAAA,MAAMN,CAAM,CAAA,EAAKL,EAAK,KAAK,EAC7E,EAEAY,OAAAA,EAAAA,YAAY,IAAM,OACNH,EAAA,GAEAI,EAAAR,EAAO,YAAP,MAAAQ,EAAkB,OACrBT,GAAA,MAAAA,EAAA,gBAAgB,CAAE,GAAGO,QAAMT,EAAY,KAAK,EAAG,GAAGS,EAAAA,MAAMN,CAAM,GAAG,CACzE,EAEDS,EAAA,MAAMd,EAAM,IAAM,CACZI,EACIA,EAAA,QAAQJ,EAAK,MAAO,EAAI,EAEpBS,EAAA,CACZ,CACD,EAEWM,cAAA,IAAMX,GAAA,YAAAA,EAAO,SAAS,EAElCY,EAAAA,QAAQC,EAAAA,qBAAsB,CAC5B,KAAAjB,EACA,OAASkB,GAAwBb,EAAO,UAAYa,EACpD,QAAS,IAAMb,EAAO,UAAY,MAAA,CACnC,EAEDW,EAAAA,QAAQG,EAAAA,mBAAoB,CAC1B,KAAAnB,EACA,OAASoB,GAAef,EAAO,QAAUe,EACzC,QAAS,IAAM,CAAEf,EAAO,QAAU,MAAA,CAAU,CAC7C,EAEDW,EAAAA,QAAQK,EAAAA,uBAAwB,CAC9B,KAAArB,EACA,OAASsB,GAAmBjB,EAAO,YAAciB,EACjD,QAAS,IAAM,CAAEjB,EAAO,YAAc,MAAA,CAAU,CACjD,EAGYkB,EAAA,CACX,UAAWnB,CAAA,CACZ"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose"],"mappings":"ycAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAA,OAAOH,CAAK,EACvBI,EAAcC,kBAAgBL,CAAK,EAErC,IAAAM,EACJ,MAAMC,EAASC,EAAAA,SAAS,CACtB,UAAW,OACX,QAAS,OACT,YAAa,MAAA,CACd,EACKC,EAAQC,EAAAA,IAAoB,EAE5BC,EAAY,IAAM,CAClBL,GACAG,EAAM,OAASF,EAAO,YAChBD,EAAA,IAAIM,EAAAA,gBAAgBH,EAAM,MAAO,CAAE,GAAGI,EAAA,MAAMN,CAAM,CAAA,EAAKL,EAAK,KAAK,EAC7E,EAEAY,OAAAA,EAAAA,YAAY,IAAM,OACNH,EAAA,GAEAI,EAAAR,EAAO,YAAP,MAAAQ,EAAkB,OACrBT,GAAA,MAAAA,EAAA,gBAAgB,CAAE,GAAGO,QAAMT,EAAY,KAAK,EAAG,GAAGS,EAAAA,MAAMN,CAAM,GAAG,CACzE,EAEDS,EAAA,MAAMd,EAAM,IAAM,CACZI,EACIA,EAAA,QAAQJ,EAAK,MAAO,EAAI,EAEpBS,EAAA,CACZ,CACD,EAEWM,cAAA,IAAMX,GAAA,YAAAA,EAAO,SAAS,EAElCY,EAAAA,QAAQC,EAAAA,qBAAsB,CAC5B,KAAAjB,EACA,OAASkB,GAAwBb,EAAO,UAAYa,EACpD,QAAS,IAAMb,EAAO,UAAY,MAAA,CACnC,EAEDW,EAAAA,QAAQG,EAAAA,mBAAoB,CAC1B,KAAAnB,EACA,OAASoB,GAAef,EAAO,QAAUe,EACzC,QAAS,IAAM,CAAEf,EAAO,QAAU,MAAA,CAAU,CAC7C,EAEDW,EAAAA,QAAQK,EAAAA,uBAAwB,CAC9B,KAAArB,EACA,OAASsB,GAAmBjB,EAAO,YAAciB,EACjD,QAAS,IAAM,CAAEjB,EAAO,YAAc,MAAA,CAAU,CACjD,EAGYkB,EAAA,CACX,UAAWnB,CAAA,CACZ"}
@@ -10,6 +10,7 @@ declare const _default: <T>(__VLS_props: any, __VLS_ctx?: {
10
10
  width?: string | number;
11
11
  component?: ComponentCore<T, import("@unovis/ts").ComponentConfigInterface>;
12
12
  tooltip?: Tooltip;
13
+ onRenderComplete?: (svgNode: SVGSVGElement, margin: import("@unovis/ts").Spacing, containerWidth: number, containerHeight: number, componentWidth: number, componentHeight: number) => void;
13
14
  annotations?: Annotations;
14
15
  margin?: import("@unovis/ts").Spacing;
15
16
  padding?: import("@unovis/ts").Spacing;
@@ -1,13 +1,14 @@
1
- import { defineComponent as f, toRefs as m, reactive as u, ref as v, watchEffect as g, watch as y, onUnmounted as w, provide as a, createElementBlock as _, openBlock as h, renderSlot as C, toRaw as s } from "vue";
2
- import { SingleContainer as R } from "@unovis/ts";
1
+ import { defineComponent as m, toRefs as f, reactive as u, ref as v, watchEffect as g, watch as y, onUnmounted as w, provide as a, createElementBlock as _, openBlock as C, renderSlot as R, toRaw as s } from "vue";
2
+ import { SingleContainer as h } from "@unovis/ts";
3
3
  import { componentAccessorKey as k, tooltipAccessorKey as x, annotationsAccessorKey as A } from "../../utils/context.js";
4
4
  import { useForwardProps as K } from "../../utils/props.js";
5
- const b = /* @__PURE__ */ f({
5
+ const S = /* @__PURE__ */ m({
6
6
  __name: "index",
7
7
  props: {
8
8
  component: {},
9
9
  tooltip: {},
10
10
  annotations: {},
11
+ onRenderComplete: { type: Function },
11
12
  duration: {},
12
13
  margin: {},
13
14
  padding: {},
@@ -19,14 +20,14 @@ const b = /* @__PURE__ */ f({
19
20
  data: {}
20
21
  },
21
22
  setup(c, { expose: d }) {
22
- const r = c, { data: n } = m(r), l = K(r);
23
+ const r = c, { data: n } = f(r), l = K(r);
23
24
  let o;
24
25
  const e = u({
25
26
  component: void 0,
26
27
  tooltip: void 0,
27
28
  annotations: void 0
28
29
  }), i = v(), p = () => {
29
- o || i.value && e.component && (o = new R(i.value, { ...s(e) }, n.value));
30
+ o || i.value && e.component && (o = new h(i.value, { ...s(e) }, n.value));
30
31
  };
31
32
  return g(() => {
32
33
  var t;
@@ -51,17 +52,17 @@ const b = /* @__PURE__ */ f({
51
52
  }
52
53
  }), d({
53
54
  component: o
54
- }), (t, B) => (h(), _("div", {
55
+ }), (t, B) => (C(), _("div", {
55
56
  "data-vis-single-container": "",
56
57
  ref_key: "elRef",
57
58
  ref: i,
58
59
  class: "unovis-single-container"
59
60
  }, [
60
- C(t.$slots, "default")
61
+ R(t.$slots, "default")
61
62
  ], 512));
62
63
  }
63
64
  });
64
65
  export {
65
- b as default
66
+ S as default
66
67
  };
67
68
  //# sourceMappingURL=index.js.map