@unovis/vue 1.7.0-pre.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/README.md +4 -0
  2. package/components/annotations/index.cjs +1 -1
  3. package/components/annotations/index.cjs.map +1 -1
  4. package/components/annotations/index.d.ts +1 -1
  5. package/components/annotations/index.js +18 -20
  6. package/components/annotations/index.js.map +1 -1
  7. package/components/area/index.cjs +1 -1
  8. package/components/area/index.cjs.map +1 -1
  9. package/components/area/index.d.ts +1 -1
  10. package/components/area/index.js +22 -23
  11. package/components/area/index.js.map +1 -1
  12. package/components/axis/index.cjs +1 -1
  13. package/components/axis/index.cjs.map +1 -1
  14. package/components/axis/index.d.ts +1 -1
  15. package/components/axis/index.js +26 -25
  16. package/components/axis/index.js.map +1 -1
  17. package/components/boxplot/index.cjs +2 -0
  18. package/components/boxplot/index.cjs.map +1 -0
  19. package/components/boxplot/index.d.ts +19 -0
  20. package/components/boxplot/index.js +31 -0
  21. package/components/boxplot/index.js.map +1 -0
  22. package/components/boxplot/index2.cjs +2 -0
  23. package/components/boxplot/index2.cjs.map +1 -0
  24. package/components/boxplot/index2.js +7 -0
  25. package/components/boxplot/index2.js.map +1 -0
  26. package/components/brush/index.cjs +1 -1
  27. package/components/brush/index.cjs.map +1 -1
  28. package/components/brush/index.d.ts +1 -1
  29. package/components/brush/index.js +22 -24
  30. package/components/brush/index.js.map +1 -1
  31. package/components/chord-diagram/index.cjs +1 -1
  32. package/components/chord-diagram/index.cjs.map +1 -1
  33. package/components/chord-diagram/index.d.ts +1 -1
  34. package/components/chord-diagram/index.js +22 -24
  35. package/components/chord-diagram/index.js.map +1 -1
  36. package/components/crosshair/index.cjs +1 -1
  37. package/components/crosshair/index.cjs.map +1 -1
  38. package/components/crosshair/index.d.ts +3 -3
  39. package/components/crosshair/index.js +20 -24
  40. package/components/crosshair/index.js.map +1 -1
  41. package/components/donut/index.cjs +1 -1
  42. package/components/donut/index.cjs.map +1 -1
  43. package/components/donut/index.d.ts +1 -1
  44. package/components/donut/index.js +22 -24
  45. package/components/donut/index.js.map +1 -1
  46. package/components/free-brush/index.cjs +1 -1
  47. package/components/free-brush/index.cjs.map +1 -1
  48. package/components/free-brush/index.d.ts +1 -1
  49. package/components/free-brush/index.js +21 -24
  50. package/components/free-brush/index.js.map +1 -1
  51. package/components/graph/index.cjs +1 -1
  52. package/components/graph/index.cjs.map +1 -1
  53. package/components/graph/index.d.ts +1 -1
  54. package/components/graph/index.js +26 -22
  55. package/components/graph/index.js.map +1 -1
  56. package/components/grouped-bar/index.cjs +1 -1
  57. package/components/grouped-bar/index.cjs.map +1 -1
  58. package/components/grouped-bar/index.d.ts +1 -1
  59. package/components/grouped-bar/index.js +24 -25
  60. package/components/grouped-bar/index.js.map +1 -1
  61. package/components/heatmap/index.cjs +2 -0
  62. package/components/heatmap/index.cjs.map +1 -0
  63. package/components/heatmap/index.d.ts +19 -0
  64. package/components/heatmap/index.js +49 -0
  65. package/components/heatmap/index.js.map +1 -0
  66. package/components/heatmap/index2.cjs +2 -0
  67. package/components/heatmap/index2.cjs.map +1 -0
  68. package/components/heatmap/index2.js +7 -0
  69. package/components/heatmap/index2.js.map +1 -0
  70. package/components/line/index.cjs +1 -1
  71. package/components/line/index.cjs.map +1 -1
  72. package/components/line/index.d.ts +1 -1
  73. package/components/line/index.js +22 -24
  74. package/components/line/index.js.map +1 -1
  75. package/components/nested-donut/index.cjs +1 -1
  76. package/components/nested-donut/index.cjs.map +1 -1
  77. package/components/nested-donut/index.d.ts +1 -1
  78. package/components/nested-donut/index.js +22 -25
  79. package/components/nested-donut/index.js.map +1 -1
  80. package/components/plotband/index.cjs +1 -1
  81. package/components/plotband/index.cjs.map +1 -1
  82. package/components/plotband/index.d.ts +1 -1
  83. package/components/plotband/index.js +16 -17
  84. package/components/plotband/index.js.map +1 -1
  85. package/components/plotline/index.cjs +1 -1
  86. package/components/plotline/index.cjs.map +1 -1
  87. package/components/plotline/index.d.ts +1 -1
  88. package/components/plotline/index.js +16 -17
  89. package/components/plotline/index.js.map +1 -1
  90. package/components/radial-bar/index.cjs +2 -0
  91. package/components/radial-bar/index.cjs.map +1 -0
  92. package/components/radial-bar/index.d.ts +19 -0
  93. package/components/radial-bar/index.js +54 -0
  94. package/components/radial-bar/index.js.map +1 -0
  95. package/components/radial-bar/index2.cjs +2 -0
  96. package/components/radial-bar/index2.cjs.map +1 -0
  97. package/components/radial-bar/index2.js +7 -0
  98. package/components/radial-bar/index2.js.map +1 -0
  99. package/components/sankey/index.cjs +1 -1
  100. package/components/sankey/index.cjs.map +1 -1
  101. package/components/sankey/index.d.ts +1 -1
  102. package/components/sankey/index.js +24 -23
  103. package/components/sankey/index.js.map +1 -1
  104. package/components/scatter/index.cjs +1 -1
  105. package/components/scatter/index.cjs.map +1 -1
  106. package/components/scatter/index.d.ts +1 -1
  107. package/components/scatter/index.js +22 -24
  108. package/components/scatter/index.js.map +1 -1
  109. package/components/stacked-bar/index.cjs +1 -1
  110. package/components/stacked-bar/index.cjs.map +1 -1
  111. package/components/stacked-bar/index.d.ts +1 -1
  112. package/components/stacked-bar/index.js +23 -23
  113. package/components/stacked-bar/index.js.map +1 -1
  114. package/components/timeline/index.cjs +1 -1
  115. package/components/timeline/index.cjs.map +1 -1
  116. package/components/timeline/index.d.ts +3 -3
  117. package/components/timeline/index.js +20 -24
  118. package/components/timeline/index.js.map +1 -1
  119. package/components/tooltip/index.cjs +1 -1
  120. package/components/tooltip/index.cjs.map +1 -1
  121. package/components/tooltip/index.d.ts +1 -1
  122. package/components/tooltip/index.js +15 -17
  123. package/components/tooltip/index.js.map +1 -1
  124. package/components/topojson-map/index.cjs +1 -1
  125. package/components/topojson-map/index.cjs.map +1 -1
  126. package/components/topojson-map/index.d.ts +1 -1
  127. package/components/topojson-map/index.js +52 -25
  128. package/components/topojson-map/index.js.map +1 -1
  129. package/components/treemap/index.cjs +1 -1
  130. package/components/treemap/index.cjs.map +1 -1
  131. package/components/treemap/index.d.ts +1 -1
  132. package/components/treemap/index.js +22 -24
  133. package/components/treemap/index.js.map +1 -1
  134. package/components/xy-labels/index.cjs +1 -1
  135. package/components/xy-labels/index.cjs.map +1 -1
  136. package/components/xy-labels/index.d.ts +1 -1
  137. package/components/xy-labels/index.js +21 -24
  138. package/components/xy-labels/index.js.map +1 -1
  139. package/components.d.ts +3 -0
  140. package/containers/single-container/index.cjs +1 -1
  141. package/containers/single-container/index.cjs.map +1 -1
  142. package/containers/single-container/index.js +26 -26
  143. package/containers/single-container/index.js.map +1 -1
  144. package/containers/xy-container/index.cjs +1 -1
  145. package/containers/xy-container/index.cjs.map +1 -1
  146. package/containers/xy-container/index.js +25 -30
  147. package/containers/xy-container/index.js.map +1 -1
  148. package/html-components/bullet-legend/index.cjs +1 -1
  149. package/html-components/bullet-legend/index.cjs.map +1 -1
  150. package/html-components/bullet-legend/index.d.ts +1 -1
  151. package/html-components/bullet-legend/index.js +23 -24
  152. package/html-components/bullet-legend/index.js.map +1 -1
  153. package/html-components/flow-legend/index.cjs +1 -1
  154. package/html-components/flow-legend/index.cjs.map +1 -1
  155. package/html-components/flow-legend/index.d.ts +1 -1
  156. package/html-components/flow-legend/index.js +21 -23
  157. package/html-components/flow-legend/index.js.map +1 -1
  158. package/html-components/leaflet-flow-map/index.cjs +1 -1
  159. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  160. package/html-components/leaflet-flow-map/index.d.ts +1 -1
  161. package/html-components/leaflet-flow-map/index.js +22 -24
  162. package/html-components/leaflet-flow-map/index.js.map +1 -1
  163. package/html-components/leaflet-map/index.cjs +1 -1
  164. package/html-components/leaflet-map/index.cjs.map +1 -1
  165. package/html-components/leaflet-map/index.d.ts +1 -1
  166. package/html-components/leaflet-map/index.js +22 -24
  167. package/html-components/leaflet-map/index.js.map +1 -1
  168. package/html-components/rolling-pin-legend/index.cjs +1 -1
  169. package/html-components/rolling-pin-legend/index.cjs.map +1 -1
  170. package/html-components/rolling-pin-legend/index.d.ts +1 -1
  171. package/html-components/rolling-pin-legend/index.js +22 -24
  172. package/html-components/rolling-pin-legend/index.js.map +1 -1
  173. package/index.cjs +2 -2
  174. package/index.js +95 -86
  175. package/index.js.map +1 -1
  176. package/package.json +12 -12
  177. package/utils/context.cjs.map +1 -1
  178. package/utils/context.js +1 -1
  179. package/utils/context.js.map +1 -1
  180. package/utils/props.cjs +1 -1
  181. package/utils/props.cjs.map +1 -1
  182. package/utils/props.d.ts +1 -4
  183. package/utils/props.js +9 -9
  184. package/utils/props.js.map +1 -1
@@ -1,8 +1,8 @@
1
- import { defineComponent as i, inject as p, ref as m, onMounted as u, nextTick as d, onUnmounted as f, watch as v, createElementBlock as h, openBlock as _ } from "vue";
2
- import { Tooltip as s } from "@unovis/ts";
3
- import { useForwardProps as y, arePropsEqual as w } from "../../utils/props.js";
4
- import { tooltipAccessorKey as x } from "../../utils/context.js";
5
- const g = { "data-vis-tooltip": "" }, T = s.selectors, z = /* @__PURE__ */ i({
1
+ import { defineComponent as i, inject as p, ref as m, onMounted as u, nextTick as d, onUnmounted as f, watch as v, openBlock as h, createElementBlock as _ } from "vue";
2
+ import { Tooltip as a } from "@unovis/ts";
3
+ import { tooltipAccessorKey as y } from "../../utils/context.js";
4
+ import { useForwardProps as w, arePropsEqual as x } from "../../utils/props.js";
5
+ const g = { "data-vis-tooltip": "" }, S = a.selectors, T = /* @__PURE__ */ i({
6
6
  __name: "index",
7
7
  props: {
8
8
  components: {},
@@ -20,25 +20,23 @@ const g = { "data-vis-tooltip": "" }, T = s.selectors, z = /* @__PURE__ */ i({
20
20
  showDelay: {},
21
21
  data: {}
22
22
  },
23
- setup(c, { expose: l }) {
24
- const r = p(x), t = y(c), o = m();
23
+ setup(s, { expose: l }) {
24
+ const c = s, t = p(y), o = w(c), e = m();
25
25
  return u(() => {
26
26
  d(() => {
27
- o.value = new s(t.value), r.update(o.value);
27
+ e.value = new a(o.value), t.update(e.value);
28
28
  });
29
29
  }), f(() => {
30
- var e;
31
- (e = o.value) == null || e.destroy(), r.destroy();
32
- }), v(t, (e, n) => {
33
- var a;
34
- w(e, n) || (a = o.value) == null || a.setConfig(t.value);
30
+ e.value?.destroy(), t.destroy();
31
+ }), v(o, (r, n) => {
32
+ x(r, n) || (e.value?.setConfig(o.value), e.value?.render());
35
33
  }), l({
36
- component: o
37
- }), (e, n) => (_(), h("div", g));
34
+ component: e
35
+ }), (r, n) => (h(), _("div", g));
38
36
  }
39
37
  });
40
38
  export {
41
- T as VisTooltipSelectors,
42
- z as default
39
+ S as VisTooltipSelectors,
40
+ T as default
43
41
  };
44
42
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/tooltip/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { Tooltip, TooltipConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { tooltipAccessorKey } from '../../utils/context'\n\nconst accessor = inject(tooltipAccessorKey)\n\n// data and required props \ntype Props = TooltipConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Tooltip>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Tooltip(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 VisTooltipSelectors = Tooltip.selectors\n</script>\n\n<template>\n <div data-vis-tooltip />\n</template>\n\n\n"],"names":["VisTooltipSelectors","Tooltip","accessor","inject","tooltipAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;sCA+CaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;AAxC3C,UAAMC,IAAWC,EAAOC,CAAkB,GAQpCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAQI,EAAO,KAAK,GAE1CH,EAAS,OAAOM,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BH,IAAAL,EAAU,UAAV,QAAAK,EAAiB,UAAUR,EAAO;AAAA,IAEtC,CAAC,GAGDa,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAAwB,OAAxBC,CAAwB;AAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/tooltip/index.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { TooltipConfigInterface } from '@unovis/ts'\nimport { Tooltip } from '@unovis/ts'\nimport { inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { tooltipAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: null }>()\n\nconst accessor = inject(tooltipAccessorKey)\n\n// data and required props\ntype Props = TooltipConfigInterface\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Tooltip>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Tooltip(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 component.value?.render()\n }\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTooltipSelectors = Tooltip.selectors\n</script>\n\n<template>\n <div data-vis-tooltip />\n</template>\n"],"names":["VisTooltipSelectors","Tooltip","props","__props","accessor","inject","tooltipAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;sCA8CaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;AAtC3C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAkB,GAKpCC,IAASC,EAAgBN,CAAK,GAG9BO,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIR,EAAQM,EAAO,KAAK,GAE1CH,EAAS,OAAOK,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBL,EAAS,QAAA;AAAA,IACX,CAAC,GAEDU,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDS,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAAwB,OAAxBC,CAAwB;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),p=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),m={"data-vis-component":""},F=c.TopoJSONMap.selectors,S=e.defineComponent({__name:"index",props:{projection:{type:[Function,Object]},topojson:{},mapFeatureName:{},mapFitToPoints:{type:Boolean},zoomFactor:{},disableZoom:{type:Boolean},zoomExtent:{},zoomDuration:{},linkWidth:{type:[Function,Number,null]},linkColor:{type:[Function,String,Array,null]},linkCursor:{type:[Function,String,null]},linkId:{type:[Function,String,null]},linkSource:{type:Function},linkTarget:{type:Function},areaId:{type:[Function,String,null]},areaColor:{type:[Function,String,Array,null]},areaCursor:{type:[Function,String,null]},pointColor:{type:[Function,String,Array,null]},pointRadius:{type:[Function,Number,null]},pointStrokeWidth:{type:[Function,Number,null]},pointCursor:{type:[Function,String,null]},longitude:{type:[Function,Number,null]},latitude:{type:[Function,Number,null]},pointLabel:{type:[Function,String,null]},pointLabelPosition:{},pointLabelTextBrightnessRatio:{},pointId:{type:Function},heatmapMode:{type:Boolean},heatmapModeBlurStdDeviation:{},heatmapModeZoomLevelThreshold:{},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:d}){const n=e.inject(y.componentAccessorKey),a=s,u=e.computed(()=>n.data.value??a.data),i=p.useForwardProps(a),o=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;o.value=new c.TopoJSONMap(i.value),(t=o.value)==null||t.setData(u.value),n.update(o.value)})}),e.onUnmounted(()=>{var t;(t=o.value)==null||t.destroy(),n.destroy()}),e.watch(i,(t,r)=>{var l;p.arePropsEqual(t,r)||(l=o.value)==null||l.setConfig(i.value)}),e.watch(u,()=>{var t;(t=o.value)==null||t.setData(u.value)}),d({component:o}),(t,r)=>(e.openBlock(),e.createElementBlock("div",m))}});exports.VisTopoJSONMapSelectors=F;exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("@unovis/ts"),y=require("../../utils/context.cjs"),a=require("../../utils/props.cjs"),d={"data-vis-component":""},F=c.TopoJSONMap.selectors,m=t.defineComponent({__name:"index",props:{projection:{type:[Function,Object]},topojson:{},mapFeatureName:{},mapFitToPoints:{type:Boolean},zoomFactor:{},zoomToLocation:{},disableZoom:{type:Boolean},zoomExtent:{},zoomDuration:{},linkWidth:{type:[Function,Number,null]},linkColor:{type:[Function,String,Array,null]},linkCursor:{type:[Function,String,null]},linkId:{type:[Function,String,null]},linkSource:{type:Function},linkTarget:{type:Function},sourceLongitude:{type:[Function,Number,null]},sourceLatitude:{type:[Function,Number,null]},targetLongitude:{type:[Function,Number,null]},targetLatitude:{type:[Function,Number,null]},sourcePointRadius:{type:[Function,Number,null]},sourcePointColor:{type:[Function,String,Array,null]},flowParticleColor:{type:[Function,String,Array,null]},flowParticleRadius:{type:[Function,Number,null]},flowParticleSpeed:{type:[Function,Number,null]},flowParticleDensity:{type:[Function,Number,null]},enableFlowAnimation:{type:Boolean},onSourcePointClick:{type:Function},onSourcePointMouseEnter:{type:Function},onSourcePointMouseLeave:{type:Function},areaId:{type:[Function,String,null]},areaColor:{type:[Function,String,Array,null]},areaCursor:{type:[Function,String,null]},areaLabel:{type:[Function,String,null]},pointColor:{type:[Function,String,Array,null]},pointRadius:{type:[Function,Number,null]},pointStrokeWidth:{type:[Function,Number,null]},pointShape:{type:[Function,String,null]},pointRingWidth:{type:[Function,Number,null]},pointCursor:{type:[Function,String,null]},longitude:{type:[Function,Number,null]},latitude:{type:[Function,Number,null]},pointLabel:{type:[Function,String,null]},pointLabelColor:{type:[Function,String,Array,null]},pointLabelPosition:{},pointBottomLabel:{type:[Function,String,null]},pointLabelTextBrightnessRatio:{},pointId:{type:Function},clusterColor:{type:[Function,String,Array,null]},clusterRadius:{type:[Function,Number,null]},clusterLabel:{type:[Function,String,null]},clusterLabelColor:{type:[Function,String,null]},clusterBottomLabel:{type:[Function,String,null]},clusterRingWidth:{},clusterBackground:{type:Boolean},clusterExpandOnClick:{type:Boolean},clusteringDistance:{},clustering:{type:Boolean},heatmapMode:{type:Boolean},heatmapModeBlurStdDeviation:{},heatmapModeZoomLevelThreshold:{},colorMap:{},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:s}){const l=p,e=t.inject(y.componentAccessorKey),o=t.computed(()=>e.data.value??l.data),u=a.useForwardProps(l),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{n.value=new c.TopoJSONMap(u.value),n.value?.setData(o.value),e.update(n.value)})}),t.onUnmounted(()=>{n.value?.destroy(),e.destroy()}),t.watch(u,(i,r)=>{a.arePropsEqual(i,r)||(n.value?.setConfig(u.value),n.value?.render())}),t.watch(o,()=>{n.value?.setData(o.value)}),s({component:n}),(i,r)=>(t.openBlock(),t.createElementBlock("div",d))}});exports.VisTopoJSONMapSelectors=F;exports.default=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","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":"+PAkDaA,EAA0BC,EAAAA,YAAY,ukCA3CnD,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,cAA8CQ,EAAO,KAAK,GAChFM,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
+ {"version":3,"file":"index.cjs","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 type { TopoJSONMapConfigInterface } from '@unovis/ts'\nimport { TopoJSONMap } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: { areas?: AreaDatum[], points?: PointDatum[], links?: LinkDatum[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\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\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 component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTopoJSONMapSelectors = TopoJSONMap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisTopoJSONMapSelectors","TopoJSONMap","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAA0BC,EAAAA,YAAY,kzEA3CnD,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,cAA8CQ,EAAO,KAAK,EAChFE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,4 +1,4 @@
1
- import { TopoJSONMap, TopoJSONMapConfigInterface } from '@unovis/ts';
1
+ import { TopoJSONMapConfigInterface, TopoJSONMap } from '@unovis/ts';
2
2
 
3
3
  export declare const VisTopoJSONMapSelectors: typeof import("@unovis/ts/components/topojson-map/style");
4
4
  declare const _default: <AreaDatum, PointDatum, LinkDatum>(__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<{
@@ -1,8 +1,8 @@
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({
1
+ import { defineComponent as s, inject as y, computed as m, ref as F, onMounted as d, nextTick as g, onUnmounted as S, watch as r, openBlock as b, createElementBlock as v } from "vue";
2
+ import { TopoJSONMap as a } from "@unovis/ts";
3
+ import { componentAccessorKey as N } from "../../utils/context.js";
4
+ import { useForwardProps as L, arePropsEqual as f } from "../../utils/props.js";
5
+ const C = { "data-vis-component": "" }, A = a.selectors, M = /* @__PURE__ */ s({
6
6
  __name: "index",
7
7
  props: {
8
8
  projection: { type: [Function, Object] },
@@ -10,6 +10,7 @@ const N = { "data-vis-component": "" }, M = p.selectors, j = /* @__PURE__ */ m({
10
10
  mapFeatureName: {},
11
11
  mapFitToPoints: { type: Boolean },
12
12
  zoomFactor: {},
13
+ zoomToLocation: {},
13
14
  disableZoom: { type: Boolean },
14
15
  zoomExtent: {},
15
16
  zoomDuration: {},
@@ -19,50 +20,76 @@ const N = { "data-vis-component": "" }, M = p.selectors, j = /* @__PURE__ */ m({
19
20
  linkId: { type: [Function, String, null] },
20
21
  linkSource: { type: Function },
21
22
  linkTarget: { type: Function },
23
+ sourceLongitude: { type: [Function, Number, null] },
24
+ sourceLatitude: { type: [Function, Number, null] },
25
+ targetLongitude: { type: [Function, Number, null] },
26
+ targetLatitude: { type: [Function, Number, null] },
27
+ sourcePointRadius: { type: [Function, Number, null] },
28
+ sourcePointColor: { type: [Function, String, Array, null] },
29
+ flowParticleColor: { type: [Function, String, Array, null] },
30
+ flowParticleRadius: { type: [Function, Number, null] },
31
+ flowParticleSpeed: { type: [Function, Number, null] },
32
+ flowParticleDensity: { type: [Function, Number, null] },
33
+ enableFlowAnimation: { type: Boolean },
34
+ onSourcePointClick: { type: Function },
35
+ onSourcePointMouseEnter: { type: Function },
36
+ onSourcePointMouseLeave: { type: Function },
22
37
  areaId: { type: [Function, String, null] },
23
38
  areaColor: { type: [Function, String, Array, null] },
24
39
  areaCursor: { type: [Function, String, null] },
40
+ areaLabel: { type: [Function, String, null] },
25
41
  pointColor: { type: [Function, String, Array, null] },
26
42
  pointRadius: { type: [Function, Number, null] },
27
43
  pointStrokeWidth: { type: [Function, Number, null] },
44
+ pointShape: { type: [Function, String, null] },
45
+ pointRingWidth: { type: [Function, Number, null] },
28
46
  pointCursor: { type: [Function, String, null] },
29
47
  longitude: { type: [Function, Number, null] },
30
48
  latitude: { type: [Function, Number, null] },
31
49
  pointLabel: { type: [Function, String, null] },
50
+ pointLabelColor: { type: [Function, String, Array, null] },
32
51
  pointLabelPosition: {},
52
+ pointBottomLabel: { type: [Function, String, null] },
33
53
  pointLabelTextBrightnessRatio: {},
34
54
  pointId: { type: Function },
55
+ clusterColor: { type: [Function, String, Array, null] },
56
+ clusterRadius: { type: [Function, Number, null] },
57
+ clusterLabel: { type: [Function, String, null] },
58
+ clusterLabelColor: { type: [Function, String, null] },
59
+ clusterBottomLabel: { type: [Function, String, null] },
60
+ clusterRingWidth: {},
61
+ clusterBackground: { type: Boolean },
62
+ clusterExpandOnClick: { type: Boolean },
63
+ clusteringDistance: {},
64
+ clustering: { type: Boolean },
35
65
  heatmapMode: { type: Boolean },
36
66
  heatmapModeBlurStdDeviation: {},
37
67
  heatmapModeZoomLevelThreshold: {},
68
+ colorMap: {},
38
69
  duration: {},
39
70
  events: {},
40
71
  attributes: {},
41
72
  data: {}
42
73
  },
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);
74
+ setup(c, { expose: p }) {
75
+ const u = c, n = y(N), e = m(() => n.data.value ?? u.data), o = L(u), t = F();
76
+ return d(() => {
77
+ g(() => {
78
+ t.value = new a(o.value), t.value?.setData(e.value), n.update(t.value);
49
79
  });
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));
80
+ }), S(() => {
81
+ t.value?.destroy(), n.destroy();
82
+ }), r(o, (l, i) => {
83
+ f(l, i) || (t.value?.setConfig(o.value), t.value?.render());
84
+ }), r(e, () => {
85
+ t.value?.setData(e.value);
86
+ }), p({
87
+ component: t
88
+ }), (l, i) => (b(), v("div", C));
62
89
  }
63
90
  });
64
91
  export {
65
- M as VisTopoJSONMapSelectors,
66
- j as default
92
+ A as VisTopoJSONMapSelectors,
93
+ M as default
67
94
  };
68
95
  //# 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","_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
+ {"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 type { TopoJSONMapConfigInterface } from '@unovis/ts'\nimport { TopoJSONMap } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: { areas?: AreaDatum[], points?: PointDatum[], links?: LinkDatum[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = TopoJSONMapConfigInterface<AreaDatum, PointDatum, LinkDatum>\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\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 component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTopoJSONMapSelectors = TopoJSONMap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisTopoJSONMapSelectors","TopoJSONMap","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAA0BC,EAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CnD,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAA8CQ,EAAO,KAAK,GAChFE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,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"),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:{},tileShowHtmlTooltip:{type:Boolean},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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@unovis/ts"),d=require("../../utils/context.cjs"),s=require("../../utils/props.cjs"),m={"data-vis-component":""},v=u.Treemap.selectors,b=e.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]},tileFunction:{type:Function},tileSort:{type:[Function,null]},tilePadding:{},tilePaddingTop:{},tileShowHtmlTooltip:{type:Boolean},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(c,{expose:p}){const l=c,o=e.inject(d.componentAccessorKey),n=e.computed(()=>o.data.value??l.data),a=s.useForwardProps(l),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new u.Treemap(a.value),t.value?.setData(n.value),o.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),o.destroy()}),e.watch(a,(i,r)=>{s.arePropsEqual(i,r)||(t.value?.setConfig(a.value),t.value?.render())}),e.watch(n,()=>{t.value?.setData(n.value)}),p({component:t}),(i,r)=>(e.openBlock(),e.createElementBlock("div",m))}});exports.VisTreemapSelectors=v;exports.default=b;
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","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAsBC,EAAAA,QAAQ,6uBA3C3C,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
+ {"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 type { TreemapConfigInterface } from '@unovis/ts'\nimport { Treemap } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = TreemapConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\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 component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisTreemapSelectors","Treemap","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAsBC,EAAAA,QAAQ,0yBA3C3C,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,UAAeQ,EAAO,KAAK,EACjDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,4 +1,4 @@
1
- import { Treemap, TreemapConfigInterface } from '@unovis/ts';
1
+ import { TreemapConfigInterface, Treemap } from '@unovis/ts';
2
2
 
3
3
  export declare const VisTreemapSelectors: typeof import("@unovis/ts/components/treemap/style");
4
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<{
@@ -1,8 +1,8 @@
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 B, openBlock as S } from "vue";
2
- import { Treemap as c } from "@unovis/ts";
1
+ import { defineComponent as p, inject as d, computed as m, ref as f, onMounted as y, nextTick as F, onUnmounted as b, watch as r, openBlock as v, createElementBlock as S } from "vue";
2
+ import { Treemap as s } from "@unovis/ts";
3
+ import { componentAccessorKey as B } from "../../utils/context.js";
3
4
  import { useForwardProps as T, arePropsEqual as g } from "../../utils/props.js";
4
- import { componentAccessorKey as L } from "../../utils/context.js";
5
- const _ = { "data-vis-component": "" }, k = c.selectors, A = /* @__PURE__ */ d({
5
+ const L = { "data-vis-component": "" }, z = s.selectors, k = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  id: { type: Function },
@@ -11,6 +11,8 @@ const _ = { "data-vis-component": "" }, k = c.selectors, A = /* @__PURE__ */ d({
11
11
  numberFormat: { type: Function },
12
12
  tileLabel: { type: Function },
13
13
  tileColor: { type: [Function, String, Array, null] },
14
+ tileFunction: { type: Function },
15
+ tileSort: { type: [Function, null] },
14
16
  tilePadding: {},
15
17
  tilePaddingTop: {},
16
18
  tileShowHtmlTooltip: { type: Boolean },
@@ -34,29 +36,25 @@ const _ = { "data-vis-component": "" }, k = c.selectors, A = /* @__PURE__ */ d({
34
36
  attributes: {},
35
37
  data: {}
36
38
  },
37
- setup(u, { expose: p }) {
38
- const o = m(L), l = u, a = f(() => o.data.value ?? l.data), n = T(l), t = b();
39
- return v(() => {
40
- y(() => {
41
- var e;
42
- t.value = new c(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
39
+ setup(u, { expose: c }) {
40
+ const a = u, t = d(B), o = m(() => t.data.value ?? a.data), n = T(a), e = f();
41
+ return y(() => {
42
+ F(() => {
43
+ e.value = new s(n.value), e.value?.setData(o.value), t.update(e.value);
43
44
  });
44
- }), F(() => {
45
- var e;
46
- (e = t.value) == null || e.destroy(), o.destroy();
47
- }), s(n, (e, i) => {
48
- var r;
49
- g(e, i) || (r = t.value) == null || r.setConfig(n.value);
50
- }), s(a, () => {
51
- var e;
52
- (e = t.value) == null || e.setData(a.value);
53
- }), p({
54
- component: t
55
- }), (e, i) => (S(), B("div", _));
45
+ }), b(() => {
46
+ e.value?.destroy(), t.destroy();
47
+ }), r(n, (l, i) => {
48
+ g(l, i) || (e.value?.setConfig(n.value), e.value?.render());
49
+ }), r(o, () => {
50
+ e.value?.setData(o.value);
51
+ }), c({
52
+ component: e
53
+ }), (l, i) => (v(), S("div", L));
56
54
  }
57
55
  });
58
56
  export {
59
- k as VisTreemapSelectors,
60
- A as default
57
+ z as VisTreemapSelectors,
58
+ k as default
61
59
  };
62
60
  //# 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","_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
+ {"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 type { TreemapConfigInterface } from '@unovis/ts'\nimport { Treemap } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = TreemapConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Treemap<Datum>>()\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 component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisTreemapSelectors = Treemap.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisTreemapSelectors","Treemap","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAsBC,EAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C3C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAeQ,EAAO,KAAK,GACjDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,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"),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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),y=require("../../utils/context.cjs"),a=require("../../utils/props.cjs"),d={"data-vis-component":""},F=i.XYLabels.selectors,g=e.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},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const u=s,n=e.inject(y.componentAccessorKey),o=e.computed(()=>n.data.value??u.data),l=a.useForwardProps(u),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.XYLabels(l.value),t.value?.setData(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(l,(r,c)=>{a.arePropsEqual(r,c)||(t.value?.setConfig(l.value),t.value?.render())}),e.watch(o,()=>{t.value?.setData(o.value)}),p({component:t}),(r,c)=>(e.openBlock(),e.createElementBlock("div",d))}});exports.VisXYLabelsSelectors=F;exports.default=g;
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","_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
+ {"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 type { XYLabelsConfigInterface } from '@unovis/ts'\nimport { XYLabels } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = XYLabelsConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<XYLabels<Datum>>()\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 component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisXYLabelsSelectors","XYLabels","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAmDaA,EAAuBC,EAAAA,SAAS,u5BA3C7C,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,OAASF,EAAM,IAAI,EAEvDO,EAASC,EAAAA,gBAAgBR,CAAK,EAG9BS,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIV,WAAgBQ,EAAO,KAAK,EAClDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,4 +1,4 @@
1
- import { XYLabels, XYLabelsConfigInterface } from '@unovis/ts';
1
+ import { XYLabelsConfigInterface, XYLabels } from '@unovis/ts';
2
2
 
3
3
  export declare const VisXYLabelsSelectors: typeof import("@unovis/ts/components/xy-labels/style");
4
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<{
@@ -1,8 +1,8 @@
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";
1
+ import { defineComponent as p, inject as y, computed as d, ref as m, onMounted as F, nextTick as g, onUnmounted as b, watch as c, openBlock as v, createElementBlock as S } from "vue";
2
+ import { XYLabels as a } from "@unovis/ts";
3
+ import { componentAccessorKey as f } from "../../utils/context.js";
3
4
  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({
5
+ const C = { "data-vis-component": "" }, L = a.selectors, N = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  color: { type: [Function, String, Array, null] },
@@ -22,6 +22,7 @@ const B = { "data-vis-component": "" }, N = i.selectors, P = /* @__PURE__ */ y({
22
22
  clusterLabelColor: { type: [Function, String, Array, null] },
23
23
  x: { type: [Function, Number, null] },
24
24
  id: { type: Function },
25
+ colorKeys: {},
25
26
  xScale: { type: [Object, Function] },
26
27
  yScale: { type: [Object, Function] },
27
28
  excludeFromDomainCalculation: { type: Boolean },
@@ -30,29 +31,25 @@ const B = { "data-vis-component": "" }, N = i.selectors, P = /* @__PURE__ */ y({
30
31
  attributes: {},
31
32
  data: {}
32
33
  },
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);
34
+ setup(i, { expose: s }) {
35
+ const l = i, e = y(f), n = d(() => e.data.value ?? l.data), o = x(l), t = m();
36
+ return F(() => {
37
+ g(() => {
38
+ t.value = new a(o.value), t.value?.setData(n.value), e.update(t.value);
39
39
  });
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
- }), p({
50
- component: n
51
- }), (t, u) => (f(), v("div", B));
40
+ }), b(() => {
41
+ t.value?.destroy(), e.destroy();
42
+ }), c(o, (r, u) => {
43
+ _(r, u) || (t.value?.setConfig(o.value), t.value?.render());
44
+ }), c(n, () => {
45
+ t.value?.setData(n.value);
46
+ }), s({
47
+ component: t
48
+ }), (r, u) => (v(), S("div", C));
52
49
  }
53
50
  });
54
51
  export {
55
- N as VisXYLabelsSelectors,
56
- P as default
52
+ L as VisXYLabelsSelectors,
53
+ N as default
57
54
  };
58
55
  //# 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","_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;;"}
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 type { XYLabelsConfigInterface } from '@unovis/ts'\nimport { XYLabels } from '@unovis/ts'\nimport { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'\nimport { componentAccessorKey } from '../../utils/context'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\nconst props = defineProps<Props & { data?: Datum[] }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = XYLabelsConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<XYLabels<Datum>>()\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 component.value?.render()\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component,\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisXYLabelsSelectors = XYLabels.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisXYLabelsSelectors","XYLabels","props","__props","accessor","inject","componentAccessorKey","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAmDaA,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C7C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASF,EAAM,IAAI,GAEvDO,IAASC,EAAgBR,CAAK,GAG9BS,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAgBQ,EAAO,KAAK,GAClDE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
package/components.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { default as VisArea, VisAreaSelectors } from './components/area/index';
2
2
  export { default as VisAxis, VisAxisSelectors } from './components/axis/index';
3
+ export { default as VisBoxplot, VisBoxplotSelectors } from './components/boxplot/index';
3
4
  export { default as VisBrush, VisBrushSelectors } from './components/brush/index';
4
5
  export { default as VisCrosshair, VisCrosshairSelectors } from './components/crosshair/index';
5
6
  export { default as VisFreeBrush, VisFreeBrushSelectors } from './components/free-brush/index';
@@ -14,7 +15,9 @@ export { default as VisPlotline, VisPlotlineSelectors } from './components/plotl
14
15
  export { default as VisChordDiagram, VisChordDiagramSelectors } from './components/chord-diagram/index';
15
16
  export { default as VisDonut, VisDonutSelectors } from './components/donut/index';
16
17
  export { default as VisGraph, VisGraphSelectors } from './components/graph/index';
18
+ export { default as VisHeatmap, VisHeatmapSelectors } from './components/heatmap/index';
17
19
  export { default as VisNestedDonut, VisNestedDonutSelectors } from './components/nested-donut/index';
20
+ export { default as VisRadialBar, VisRadialBarSelectors } from './components/radial-bar/index';
18
21
  export { default as VisSankey, VisSankeySelectors } from './components/sankey/index';
19
22
  export { default as VisTopoJSONMap, VisTopoJSONMapSelectors } from './components/topojson-map/index';
20
23
  export { default as VisTreemap, VisTreemapSelectors } from './components/treemap/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:{},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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@unovis/ts"),r=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:{},colorFunction:{type:Function},data:{}},setup(p,{expose:d}){const s=p,{data:i}=e.toRefs(s),u=v.useForwardProps(s);let t;const o=e.reactive({component:void 0,tooltip:void 0,annotations:void 0}),a=e.ref(),c=()=>{t||a.value&&o.component&&(t=new l.SingleContainer(a.value,{...e.toRaw(o)},i.value))};return e.watchEffect(()=>{c(),o.component?.config,t?.updateContainer({...e.toRaw(u.value),...e.toRaw(o)})}),e.watch(i,()=>{t?t.setData(i.value,!0):c()}),e.onUnmounted(()=>t?.destroy()),e.provide(r.componentAccessorKey,{data:i,update:n=>o.component=n,destroy:()=>o.component=void 0}),e.provide(r.tooltipAccessorKey,{data:i,update:n=>o.tooltip=n,destroy:()=>{o.tooltip=void 0}}),e.provide(r.annotationsAccessorKey,{data:i,update:n=>o.annotations=n,destroy:()=>{o.annotations=void 0}}),d({component:t}),(n,m)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:a,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","_createElementBlock","_renderSlot","_ctx"],"mappings":"ycAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAAA,OAAOH,CAAK,EACvBI,EAAcC,EAAAA,gBAAgBL,CAAK,EAEzC,IAAIM,EACJ,MAAMC,EAASC,EAAAA,SAAS,CACtB,UAAW,OACX,QAAS,OACT,YAAa,MAAA,CACd,EACKC,EAAQC,EAAAA,IAAA,EAERC,EAAY,IAAM,CAClBL,GACAG,EAAM,OAASF,EAAO,YACxBD,EAAQ,IAAIM,EAAAA,gBAAgBH,EAAM,MAAO,CAAE,GAAGI,EAAAA,MAAMN,CAAM,CAAA,EAAKL,EAAK,KAAK,EAC7E,EAEAY,OAAAA,EAAAA,YAAY,IAAM,OAChBH,EAAA,GAEUI,EAAAR,EAAO,YAAP,MAAAQ,EAAkB,OAC5BT,GAAA,MAAAA,EAAO,gBAAgB,CAAE,GAAGO,QAAMT,EAAY,KAAK,EAAG,GAAGS,EAAAA,MAAMN,CAAM,GACvE,CAAC,EAEDS,EAAAA,MAAMd,EAAM,IAAM,CACZI,EACFA,EAAM,QAAQJ,EAAK,MAAO,EAAI,EAE9BS,EAAA,CAEJ,CAAC,EAEDM,cAAY,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,MAAU,CAAA,CAC7C,EAEDW,EAAAA,QAAQK,EAAAA,uBAAwB,CAC9B,KAAArB,EACA,OAASsB,GAAmBjB,EAAO,YAAciB,EACjD,QAAS,IAAM,CAAEjB,EAAO,YAAc,MAAU,CAAA,CACjD,EAGDkB,EAAa,CACX,UAAWnB,CAAA,CACZ,wBAICoB,EAAAA,mBAEM,MAAA,CAFD,4BAAA,WAA8B,QAAJ,IAAIjB,EAAQ,MAAM,yBAAA,GAC/CkB,aAAQC,EAAA,OAAA,SAAA,CAAA"}
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","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":"ueAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAAA,OAAOH,CAAK,EACvBI,EAAcC,EAAAA,gBAAgBL,CAAK,EAEzC,IAAIM,EACJ,MAAMC,EAASC,EAAAA,SAAS,CACtB,UAAW,OACX,QAAS,OACT,YAAa,MAAA,CACd,EACKC,EAAQC,EAAAA,IAAA,EAERC,EAAY,IAAM,CAClBL,GACAG,EAAM,OAASF,EAAO,YACxBD,EAAQ,IAAIM,EAAAA,gBAAgBH,EAAM,MAAO,CAAE,GAAGI,EAAAA,MAAMN,CAAM,CAAA,EAAKL,EAAK,KAAK,EAC7E,EAEAY,OAAAA,EAAAA,YAAY,IAAM,CAChBH,EAAA,EAEUJ,EAAO,WAAW,OAC5BD,GAAO,gBAAgB,CAAE,GAAGO,QAAMT,EAAY,KAAK,EAAG,GAAGS,EAAAA,MAAMN,CAAM,EAAG,CAC1E,CAAC,EAEDQ,EAAAA,MAAMb,EAAM,IAAM,CACZI,EACFA,EAAM,QAAQJ,EAAK,MAAO,EAAI,EAE9BS,EAAA,CAEJ,CAAC,EAEDK,cAAY,IAAMV,GAAO,SAAS,EAElCW,EAAAA,QAAQC,EAAAA,qBAAsB,CAC5B,KAAAhB,EACA,OAASiB,GAAwBZ,EAAO,UAAYY,EACpD,QAAS,IAAMZ,EAAO,UAAY,MAAA,CACnC,EAEDU,EAAAA,QAAQG,EAAAA,mBAAoB,CAC1B,KAAAlB,EACA,OAASmB,GAAed,EAAO,QAAUc,EACzC,QAAS,IAAM,CAAEd,EAAO,QAAU,MAAU,CAAA,CAC7C,EAEDU,EAAAA,QAAQK,EAAAA,uBAAwB,CAC9B,KAAApB,EACA,OAASqB,GAAmBhB,EAAO,YAAcgB,EACjD,QAAS,IAAM,CAAEhB,EAAO,YAAc,MAAU,CAAA,CACjD,EAGDiB,EAAa,CACX,UAAWlB,CAAA,CACZ,wBAICmB,EAAAA,mBAEM,MAAA,CAFD,4BAAA,WAA8B,QAAJ,IAAIhB,EAAQ,MAAM,yBAAA,GAC/CiB,aAAQC,EAAA,OAAA,SAAA,CAAA"}