@unovis/vue 1.3.0-alpha.2 → 1.3.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/components/area/index.cjs +1 -1
  2. package/components/area/index.cjs.map +1 -1
  3. package/components/area/index.d.ts +54 -5
  4. package/components/area/index.js +18 -16
  5. package/components/area/index.js.map +1 -1
  6. package/components/axis/index.cjs +1 -1
  7. package/components/axis/index.cjs.map +1 -1
  8. package/components/axis/index.d.ts +72 -5
  9. package/components/axis/index.js +18 -16
  10. package/components/axis/index.js.map +1 -1
  11. package/components/brush/index.cjs +1 -1
  12. package/components/brush/index.cjs.map +1 -1
  13. package/components/brush/index.d.ts +58 -5
  14. package/components/brush/index.js +17 -15
  15. package/components/brush/index.js.map +1 -1
  16. package/components/chord-diagram/index.cjs +1 -1
  17. package/components/chord-diagram/index.cjs.map +1 -1
  18. package/components/chord-diagram/index.d.ts +56 -5
  19. package/components/chord-diagram/index.js +18 -16
  20. package/components/chord-diagram/index.js.map +1 -1
  21. package/components/crosshair/index.cjs +1 -1
  22. package/components/crosshair/index.cjs.map +1 -1
  23. package/components/crosshair/index.d.ts +57 -5
  24. package/components/crosshair/index.js +18 -16
  25. package/components/crosshair/index.js.map +1 -1
  26. package/components/donut/index.cjs +1 -1
  27. package/components/donut/index.cjs.map +1 -1
  28. package/components/donut/index.d.ts +58 -5
  29. package/components/donut/index.js +17 -15
  30. package/components/donut/index.js.map +1 -1
  31. package/components/free-brush/index.cjs +1 -1
  32. package/components/free-brush/index.cjs.map +1 -1
  33. package/components/free-brush/index.d.ts +58 -5
  34. package/components/free-brush/index.js +18 -16
  35. package/components/free-brush/index.js.map +1 -1
  36. package/components/graph/index.cjs +1 -1
  37. package/components/graph/index.cjs.map +1 -1
  38. package/components/graph/index.d.ts +107 -5
  39. package/components/graph/index.js +18 -16
  40. package/components/graph/index.js.map +1 -1
  41. package/components/grouped-bar/index.cjs +1 -1
  42. package/components/grouped-bar/index.cjs.map +1 -1
  43. package/components/grouped-bar/index.d.ts +58 -5
  44. package/components/grouped-bar/index.js +18 -16
  45. package/components/grouped-bar/index.js.map +1 -1
  46. package/components/line/index.cjs +1 -1
  47. package/components/line/index.cjs.map +1 -1
  48. package/components/line/index.d.ts +55 -5
  49. package/components/line/index.js +18 -16
  50. package/components/line/index.js.map +1 -1
  51. package/components/nested-donut/index.cjs +1 -1
  52. package/components/nested-donut/index.cjs.map +1 -1
  53. package/components/nested-donut/index.d.ts +60 -5
  54. package/components/nested-donut/index.js +18 -16
  55. package/components/nested-donut/index.js.map +1 -1
  56. package/components/sankey/index.cjs +1 -1
  57. package/components/sankey/index.cjs.map +1 -1
  58. package/components/sankey/index.d.ts +91 -5
  59. package/components/sankey/index.js +18 -16
  60. package/components/sankey/index.js.map +1 -1
  61. package/components/scatter/index.cjs +1 -1
  62. package/components/scatter/index.cjs.map +1 -1
  63. package/components/scatter/index.d.ts +61 -5
  64. package/components/scatter/index.js +17 -15
  65. package/components/scatter/index.js.map +1 -1
  66. package/components/stacked-bar/index.cjs +1 -1
  67. package/components/stacked-bar/index.cjs.map +1 -1
  68. package/components/stacked-bar/index.d.ts +58 -5
  69. package/components/stacked-bar/index.js +18 -16
  70. package/components/stacked-bar/index.js.map +1 -1
  71. package/components/timeline/index.cjs +1 -1
  72. package/components/timeline/index.cjs.map +1 -1
  73. package/components/timeline/index.d.ts +56 -12
  74. package/components/timeline/index.js +18 -16
  75. package/components/timeline/index.js.map +1 -1
  76. package/components/tooltip/index.cjs +1 -1
  77. package/components/tooltip/index.cjs.map +1 -1
  78. package/components/tooltip/index.d.ts +4 -1
  79. package/components/tooltip/index.js +18 -16
  80. package/components/tooltip/index.js.map +1 -1
  81. package/components/topojson-map/index.cjs +1 -1
  82. package/components/topojson-map/index.cjs.map +1 -1
  83. package/components/topojson-map/index.d.ts +74 -5
  84. package/components/topojson-map/index.js +18 -16
  85. package/components/topojson-map/index.js.map +1 -1
  86. package/components/xy-labels/index.cjs +1 -1
  87. package/components/xy-labels/index.cjs.map +1 -1
  88. package/components/xy-labels/index.d.ts +62 -5
  89. package/components/xy-labels/index.js +18 -16
  90. package/components/xy-labels/index.js.map +1 -1
  91. package/containers/single-container/index.cjs +1 -1
  92. package/containers/single-container/index.cjs.map +1 -1
  93. package/containers/single-container/index.d.ts +23 -6
  94. package/containers/single-container/index.js +27 -31
  95. package/containers/single-container/index.js.map +1 -1
  96. package/containers/xy-container/index.cjs +1 -1
  97. package/containers/xy-container/index.cjs.map +1 -1
  98. package/containers/xy-container/index.d.ts +40 -6
  99. package/containers/xy-container/index.js +33 -41
  100. package/containers/xy-container/index.js.map +1 -1
  101. package/html-components/bullet-legend/index.cjs +1 -1
  102. package/html-components/bullet-legend/index.cjs.map +1 -1
  103. package/html-components/bullet-legend/index.d.ts +10 -2
  104. package/html-components/bullet-legend/index.js +17 -14
  105. package/html-components/bullet-legend/index.js.map +1 -1
  106. package/html-components/leaflet-flow-map/index.cjs +1 -1
  107. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  108. package/html-components/leaflet-flow-map/index.d.ts +108 -5
  109. package/html-components/leaflet-flow-map/index.js +17 -15
  110. package/html-components/leaflet-flow-map/index.js.map +1 -1
  111. package/html-components/leaflet-map/index.cjs +1 -1
  112. package/html-components/leaflet-map/index.cjs.map +1 -1
  113. package/html-components/leaflet-map/index.d.ts +95 -5
  114. package/html-components/leaflet-map/index.js +17 -15
  115. package/html-components/leaflet-map/index.js.map +1 -1
  116. package/index.cjs +1 -1
  117. package/index.js +1 -1
  118. package/package.json +6 -5
  119. package/utils/props.cjs +1 -1
  120. package/utils/props.cjs.map +1 -1
  121. package/utils/props.js +10 -9
  122. package/utils/props.js.map +1 -1
@@ -1,12 +1,63 @@
1
- import { ChordDiagramConfigInterface, ChordInputNode, ChordInputLink } from '@unovis/ts';
2
- declare const _default: <N extends ChordInputNode, L extends ChordInputLink>(__VLS_props: any, __VLS_ctx?: Pick<any, "attrs" | "emit" | "slots">, __VLS_expose?: any, __VLS_setup?: Promise<{
3
- props: ChordDiagramConfigInterface<N, L> & {
1
+ import { ChordDiagram, ChordInputNode, ChordInputLink } from '@unovis/ts';
2
+ declare const _default: <N extends ChordInputNode, L extends ChordInputLink>(__VLS_props: any, __VLS_ctx?: {
3
+ attrs: any;
4
+ emit: any;
5
+ slots: any;
6
+ }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
+ props: {
8
+ duration?: number;
9
+ events?: {
10
+ [selector: string]: {
11
+ touchstart?: import("@unovis/ts").VisEventCallback<any>;
12
+ touchmove?: import("@unovis/ts").VisEventCallback<any>;
13
+ touchend?: import("@unovis/ts").VisEventCallback<any>;
14
+ mouseover?: import("@unovis/ts").VisEventCallback<any>;
15
+ mousemove?: import("@unovis/ts").VisEventCallback<any>;
16
+ mousedown?: import("@unovis/ts").VisEventCallback<any>;
17
+ mouseup?: import("@unovis/ts").VisEventCallback<any>;
18
+ click?: import("@unovis/ts").VisEventCallback<any>;
19
+ auxclick?: import("@unovis/ts").VisEventCallback<any>;
20
+ contextmenu?: import("@unovis/ts").VisEventCallback<any>;
21
+ dblclick?: import("@unovis/ts").VisEventCallback<any>;
22
+ mouseenter?: import("@unovis/ts").VisEventCallback<any>;
23
+ mouseleave?: import("@unovis/ts").VisEventCallback<any>;
24
+ mouseout?: import("@unovis/ts").VisEventCallback<any>;
25
+ scroll?: import("@unovis/ts").VisEventCallback<any>;
26
+ select?: import("@unovis/ts").VisEventCallback<any>;
27
+ wheel?: import("@unovis/ts").VisEventCallback<any>;
28
+ pointerdown?: import("@unovis/ts").VisEventCallback<any>;
29
+ pointerup?: import("@unovis/ts").VisEventCallback<any>;
30
+ pointerout?: import("@unovis/ts").VisEventCallback<any>;
31
+ pointermove?: import("@unovis/ts").VisEventCallback<any>;
32
+ };
33
+ };
34
+ attributes?: {
35
+ [selector: string]: {
36
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
37
+ };
38
+ };
4
39
  data?: {
5
40
  nodes: N[];
6
41
  links?: L[];
7
42
  };
8
- };
9
- expose(exposed: {}): void;
43
+ highlightedNodeId?: string | number;
44
+ highlightedLinkIds?: (string | number)[];
45
+ linkColor?: import("@unovis/ts").ColorAccessor<L>;
46
+ linkValue?: import("@unovis/ts").NumericAccessor<L>;
47
+ nodeLevels?: string[];
48
+ nodeWidth?: number;
49
+ nodeColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").ChordNodeDatum<N>>;
50
+ nodeLabel?: import("@unovis/ts").StringAccessor<import("@unovis/ts").ChordNodeDatum<N>>;
51
+ nodeLabelColor?: import("@unovis/ts").StringAccessor<import("@unovis/ts").ChordNodeDatum<N>>;
52
+ nodeLabelAlignment?: import("@unovis/ts").GenericAccessor<string, import("@unovis/ts").ChordNodeDatum<N>>;
53
+ padAngle?: import("@unovis/ts").NumericAccessor<N>;
54
+ cornerRadius?: import("@unovis/ts").NumericAccessor<N>;
55
+ angleRange?: [number, number];
56
+ radiusScaleExponent?: number;
57
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
58
+ expose(exposed: {
59
+ component: import("vue").Ref<ChordDiagram<N, L>>;
60
+ }): void;
10
61
  attrs: any;
11
62
  slots: {};
12
63
  emit: any;
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as p, computed as l, getCurrentInstance as m, ref as g, onMounted as v, nextTick as y, onUnmounted as f, watch as h, openBlock as F, createElementBlock as _ } from "vue";
2
- import { ChordDiagram as b } from "@unovis/ts";
3
- import { parseProps as C, arePropsEqual as k } from "../../utils/props.js";
4
- import { componentAccessorKey as x } from "../../utils/context.js";
5
- const A = { "data-vis-component": "" }, I = /* @__PURE__ */ d({
1
+ import { defineComponent as p, inject as m, computed as u, getCurrentInstance as g, ref as v, onMounted as y, nextTick as f, onUnmounted as h, watch as F, openBlock as _, createElementBlock as b } from "vue";
2
+ import { ChordDiagram as C } from "@unovis/ts";
3
+ import { parseProps as k, arePropsEqual as x } from "../../utils/props.js";
4
+ import { componentAccessorKey as A } from "../../utils/context.js";
5
+ const L = { "data-vis-component": "" }, w = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  highlightedNodeId: {},
@@ -24,23 +24,25 @@ const A = { "data-vis-component": "" }, I = /* @__PURE__ */ d({
24
24
  attributes: {},
25
25
  data: {}
26
26
  },
27
- setup(u) {
28
- const i = u, t = p(x), c = l(() => t.data.value), s = m(), o = l(() => C(i, s)), n = g();
29
- return v(() => {
30
- y(() => {
27
+ setup(i, { expose: c }) {
28
+ const a = i, t = m(A), s = u(() => t.data.value ?? a.data), d = g(), o = u(() => k({ ...a }, d)), n = v();
29
+ return y(() => {
30
+ f(() => {
31
31
  var e;
32
- n.value = new b(o.value), (e = n.value) == null || e.setData(c.value), t.update(n.value);
32
+ n.value = new C(o.value), (e = n.value) == null || e.setData(s.value), t.update(n.value);
33
33
  });
34
- }), f(() => {
34
+ }), h(() => {
35
35
  var e;
36
36
  (e = n.value) == null || e.destroy(), t.destroy();
37
- }), h(o, (e, a) => {
38
- var r;
39
- k(e, a) || ((r = n.value) == null || r.setConfig(o.value), t.update(n.value));
40
- }), (e, a) => (F(), _("div", A));
37
+ }), F(o, (e, r) => {
38
+ var l;
39
+ x(e, r) || (l = n.value) == null || l.setConfig(o.value);
40
+ }), c({
41
+ component: n
42
+ }), (e, r) => (_(), b("div", L));
41
43
  }
42
44
  });
43
45
  export {
44
- I as default
46
+ w as default
45
47
  };
46
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/chord-diagram/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { ChordDiagram, ChordDiagramConfigInterface, ChordInputNode, ChordInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n highlightedNodeId: {},\n highlightedLinkIds: {},\n linkColor: { type: [Function, String, Array, null] },\n linkValue: { type: [Function, Number, null] },\n nodeLevels: {},\n nodeWidth: {},\n nodeColor: { type: [Function, String, Array, null] },\n nodeLabel: { type: [Function, String, null] },\n nodeLabelColor: { type: [Function, String, null] },\n nodeLabelAlignment: { type: [Function, null] },\n padAngle: { type: [Function, Number, null] },\n cornerRadius: { type: [Function, Number, null] },\n angleRange: {},\n radiusScaleExponent: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps(props, instance))\n\n// component declaration\nconst component = ref<ChordDiagram<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new ChordDiagram<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 accessor.update(component.value)\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","ChordDiagram","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAA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EDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBd,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKgB,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,OACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO,QACzBP,EAAA,OAAOS,EAAU,KAAK;AAAA,IACjC,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO5B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/chord-diagram/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { ChordDiagram, ChordDiagramConfigInterface, ChordInputNode, ChordInputLink } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n highlightedNodeId: {},\n highlightedLinkIds: {},\n linkColor: { type: [Function, String, Array, null] },\n linkValue: { type: [Function, Number, null] },\n nodeLevels: {},\n nodeWidth: {},\n nodeColor: { type: [Function, String, Array, null] },\n nodeLabel: { type: [Function, String, null] },\n nodeLabelColor: { type: [Function, String, null] },\n nodeLabelAlignment: { type: [Function, null] },\n padAngle: { type: [Function, Number, null] },\n cornerRadius: { type: [Function, Number, null] },\n angleRange: {},\n radiusScaleExponent: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<ChordDiagram<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new ChordDiagram<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","ChordDiagram","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,mBAAmB,CAAC;AAAA,IACpB,oBAAoB,CAAC;AAAA,IACrB,WAAW,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IACnD,WAAW,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC5C,YAAY,CAAC;AAAA,IACb,WAAW,CAAC;AAAA,IACZ,WAAW,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IACnD,WAAW,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC5C,gBAAgB,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACjD,oBAAoB,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;AAAA,IAC7C,UAAU,E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vis-crosshair":""},v=e.defineComponent({__name:"index",props:{yStacked:{},baseline:{type:[Function,Number,null]},tooltip:{},template:{type:Function},hideWhenFarFromPointer:{type:Boolean},hideWhenFarFromPointerDistance:{},snapToData:{type:Boolean},getCircles:{type:Function},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(u){const i=u,o=e.inject(y.crosshairAccessorKey),l=e.computed(()=>o.data.value),p=e.getCurrentInstance(),a=e.computed(()=>s.parseProps(i,p)),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new d.Crosshair(a.value),(t=n.value)==null||t.setData(l.value),o.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),o.destroy()}),e.watch(a,(t,c)=>{var r;s.arePropsEqual(t,c)||((r=n.value)==null||r.setConfig(a.value),o.update(n.value))}),(t,c)=>(e.openBlock(),e.createElementBlock("div",m))}});module.exports=v;
1
+ "use strict";const e=require("vue"),y=require("@unovis/ts"),u=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),F={"data-vis-crosshair":""},v=e.defineComponent({__name:"index",props:{yStacked:{},baseline:{type:[Function,Number,null]},tooltip:{},template:{type:Function},hideWhenFarFromPointer:{type:Boolean},hideWhenFarFromPointerDistance:{},snapToData:{type:Boolean},getCircles:{type:Function},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:l}){const c=i,o=e.inject(m.crosshairAccessorKey),p=e.computed(()=>o.data.value??c.data),d=e.getCurrentInstance(),a=e.computed(()=>u.parseProps({...c},d)),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new y.Crosshair(a.value),(t=n.value)==null||t.setData(p.value),o.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),o.destroy()}),e.watch(a,(t,r)=>{var s;u.arePropsEqual(t,r)||(s=n.value)==null||s.setConfig(a.value)}),l({component:n}),(t,r)=>(e.openBlock(),e.createElementBlock("div",F))}});module.exports=v;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/crosshair/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-crosshair\": \"\" }\n\nimport { Crosshair, CrosshairConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { crosshairAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n yStacked: {},\n baseline: { type: [Function, Number, null] },\n tooltip: {},\n template: { type: Function },\n hideWhenFarFromPointer: { type: Boolean },\n hideWhenFarFromPointerDistance: {},\n snapToData: { type: Boolean },\n getCircles: { type: Function },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(crosshairAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps(props, instance))\n\n// component declaration\nconst component = ref<Crosshair<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Crosshair<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 accessor.update(component.value)\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","accessor","inject","crosshairAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Crosshair","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IAQfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,SAAU,CAAC,EACX,SAAU,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC3C,QAAS,CAAC,EACV,SAAU,CAAE,KAAM,QAAS,EAC3B,uBAAwB,CAAE,KAAM,OAAQ,EACxC,+BAAgC,CAAC,EACjC,WAAY,CAAE,KAAM,OAAQ,EAC5B,WAAY,CAAE,KAAM,QAAS,EAC7B,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACpC,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,KAAM,KAAK,CAAE,EAC3C,GAAI,CAAE,KAAM,QAAS,EACrB,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EAC/C,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,6BAA8B,CAAE,KAAM,OAAQ,EAC9C,SAAU,CAAC,EACX,OAAQ,CAAC,EACT,WAAY,CAAC,EACb,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAEtB,MAAMC,EAAQD,EAGRE,EAAWC,SAAOC,EAAAA,oBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,KAAK,EAEzCK,EAAWC,EAAAA,qBACXC,EAASH,EAAAA,SAAS,IAAMI,EAAW,WAAAT,EAAOM,CAAQ,CAAC,EAGnDI,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAiB,UAAAN,EAAO,KAAK,GACzCO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQX,EAAK,OACrBH,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBd,EAAS,QAAQ,CAAA,CAClB,EAEKgB,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,KACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,OACzBP,EAAA,OAAOS,EAAU,KAAK,EACjC,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO5B,CAAU,EAE7D,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/crosshair/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-crosshair\": \"\" }\n\nimport { Crosshair, CrosshairConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { crosshairAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n yStacked: {},\n baseline: { type: [Function, Number, null] },\n tooltip: {},\n template: { type: Function },\n hideWhenFarFromPointer: { type: Boolean },\n hideWhenFarFromPointerDistance: {},\n snapToData: { type: Boolean },\n getCircles: { type: Function },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(crosshairAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<Crosshair<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Crosshair<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","crosshairAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Crosshair","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IAQfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,SAAU,CAAC,EACX,SAAU,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EAC3C,QAAS,CAAC,EACV,SAAU,CAAE,KAAM,QA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I,IACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAEQT,EAAA,CACP,UAAAW,CAAA,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO7B,CAAU,EAE7D,CAEA,CAAC"}
@@ -1,9 +1,61 @@
1
- import { CrosshairConfigInterface } from '@unovis/ts';
2
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: Pick<any, "attrs" | "emit" | "slots">, __VLS_expose?: any, __VLS_setup?: Promise<{
3
- props: CrosshairConfigInterface<Datum> & {
1
+ import { Crosshair } from '@unovis/ts';
2
+ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
3
+ attrs: any;
4
+ emit: any;
5
+ slots: any;
6
+ }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
+ props: {
8
+ baseline?: import("@unovis/ts").NumericAccessor<Datum>;
9
+ x?: import("@unovis/ts").NumericAccessor<Datum>;
10
+ y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
11
+ id?: (d: Datum, i: number, ...any: any[]) => string;
12
+ color?: string | string[] | ((d: Datum, i: number, ...any: any[]) => string) | ((d: Datum[], i: number, ...any: any[]) => string);
13
+ xScale?: import("@unovis/ts").ContinuousScale;
14
+ yScale?: import("@unovis/ts").ContinuousScale;
15
+ excludeFromDomainCalculation?: boolean;
16
+ duration?: number;
17
+ events?: {
18
+ [selector: string]: {
19
+ touchstart?: import("@unovis/ts").VisEventCallback<any>;
20
+ touchmove?: import("@unovis/ts").VisEventCallback<any>;
21
+ touchend?: import("@unovis/ts").VisEventCallback<any>;
22
+ mouseover?: import("@unovis/ts").VisEventCallback<any>;
23
+ mousemove?: import("@unovis/ts").VisEventCallback<any>;
24
+ mousedown?: import("@unovis/ts").VisEventCallback<any>;
25
+ mouseup?: import("@unovis/ts").VisEventCallback<any>;
26
+ click?: import("@unovis/ts").VisEventCallback<any>;
27
+ auxclick?: import("@unovis/ts").VisEventCallback<any>;
28
+ contextmenu?: import("@unovis/ts").VisEventCallback<any>;
29
+ dblclick?: import("@unovis/ts").VisEventCallback<any>;
30
+ mouseenter?: import("@unovis/ts").VisEventCallback<any>;
31
+ mouseleave?: import("@unovis/ts").VisEventCallback<any>;
32
+ mouseout?: import("@unovis/ts").VisEventCallback<any>;
33
+ scroll?: import("@unovis/ts").VisEventCallback<any>;
34
+ select?: import("@unovis/ts").VisEventCallback<any>;
35
+ wheel?: import("@unovis/ts").VisEventCallback<any>;
36
+ pointerdown?: import("@unovis/ts").VisEventCallback<any>;
37
+ pointerup?: import("@unovis/ts").VisEventCallback<any>;
38
+ pointerout?: import("@unovis/ts").VisEventCallback<any>;
39
+ pointermove?: import("@unovis/ts").VisEventCallback<any>;
40
+ };
41
+ };
42
+ attributes?: {
43
+ [selector: string]: {
44
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
45
+ };
46
+ };
4
47
  data?: Datum[];
5
- };
6
- expose(exposed: {}): void;
48
+ template?: (data: Datum, x: number | Date) => string | HTMLElement;
49
+ yStacked?: import("@unovis/ts").NumericAccessor<Datum>[];
50
+ tooltip?: import("@unovis/ts").Tooltip;
51
+ hideWhenFarFromPointer?: boolean;
52
+ hideWhenFarFromPointerDistance?: number;
53
+ snapToData?: boolean;
54
+ getCircles?: (x: number, data: Datum[], yScale: import("@unovis/ts").ContinuousScale) => import("@unovis/ts").CrosshairCircle[];
55
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
56
+ expose(exposed: {
57
+ component: import("vue").Ref<Crosshair<Datum>>;
58
+ }): void;
7
59
  attrs: any;
8
60
  slots: {};
9
61
  emit: any;
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, inject as m, computed as c, getCurrentInstance as d, ref as y, onMounted as F, nextTick as v, onUnmounted as f, watch as h, openBlock as _, createElementBlock as b } from "vue";
2
- import { Crosshair as x } from "@unovis/ts";
3
- import { parseProps as C, arePropsEqual as g } from "../../utils/props.js";
4
- import { crosshairAccessorKey as B } from "../../utils/context.js";
5
- const k = { "data-vis-crosshair": "" }, A = /* @__PURE__ */ p({
1
+ import { defineComponent as m, inject as d, computed as i, getCurrentInstance as y, ref as F, onMounted as v, nextTick as f, onUnmounted as h, watch as x, openBlock as _, createElementBlock as b } from "vue";
2
+ import { Crosshair as C } from "@unovis/ts";
3
+ import { parseProps as g, arePropsEqual as B } from "../../utils/props.js";
4
+ import { crosshairAccessorKey as k } from "../../utils/context.js";
5
+ const D = { "data-vis-crosshair": "" }, N = /* @__PURE__ */ m({
6
6
  __name: "index",
7
7
  props: {
8
8
  yStacked: {},
@@ -25,23 +25,25 @@ const k = { "data-vis-crosshair": "" }, A = /* @__PURE__ */ p({
25
25
  attributes: {},
26
26
  data: {}
27
27
  },
28
- setup(i) {
29
- const u = i, n = m(B), s = c(() => n.data.value), l = d(), o = c(() => C(u, l)), t = y();
30
- return F(() => {
31
- v(() => {
28
+ setup(s, { expose: u }) {
29
+ const a = s, n = d(k), l = i(() => n.data.value ?? a.data), p = y(), o = i(() => g({ ...a }, p)), t = F();
30
+ return v(() => {
31
+ f(() => {
32
32
  var e;
33
- t.value = new x(o.value), (e = t.value) == null || e.setData(s.value), n.update(t.value);
33
+ t.value = new C(o.value), (e = t.value) == null || e.setData(l.value), n.update(t.value);
34
34
  });
35
- }), f(() => {
35
+ }), h(() => {
36
36
  var e;
37
37
  (e = t.value) == null || e.destroy(), n.destroy();
38
- }), h(o, (e, a) => {
39
- var r;
40
- g(e, a) || ((r = t.value) == null || r.setConfig(o.value), n.update(t.value));
41
- }), (e, a) => (_(), b("div", k));
38
+ }), x(o, (e, r) => {
39
+ var c;
40
+ B(e, r) || (c = t.value) == null || c.setConfig(o.value);
41
+ }), u({
42
+ component: t
43
+ }), (e, r) => (_(), b("div", D));
42
44
  }
43
45
  });
44
46
  export {
45
- A as default
47
+ N as default
46
48
  };
47
49
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/crosshair/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-crosshair\": \"\" }\n\nimport { Crosshair, CrosshairConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { crosshairAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n yStacked: {},\n baseline: { type: [Function, Number, null] },\n tooltip: {},\n template: { type: Function },\n hideWhenFarFromPointer: { type: Boolean },\n hideWhenFarFromPointerDistance: {},\n snapToData: { type: Boolean },\n getCircles: { type: Function },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(crosshairAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps(props, instance))\n\n// component declaration\nconst component = ref<Crosshair<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Crosshair<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 accessor.update(component.value)\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","accessor","inject","crosshairAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Crosshair","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,UAAU,CAAC;AAAA,IACX,UAAU,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC3C,SAAS,CAAC;AAAA,IACV,UAAU,EAAE,MAAM,SAAS;AAAA,IAC3B,wBAAwB,EAAE,MAAM,QAAQ;AAAA,IACxC,gCAAgC,CAAC;AAAA,IACjC,YAAY,EAAE,MAAM,QAAQ;AAAA,IAC5B,YAAY,EAAE,MAAM,SAAS;AAAA,IAC7B,GAAG,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACpC,GAAG,EAAE,MAAM,CAAC,UAAU,QAAQ,MAAM,KAAK,EAAE;AAAA,IAC3C,IAAI,EAAE,MAAM,SAAS;AAAA,IACrB,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IAC/C,QAAQ,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAE;AAAA,IACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAE;AAAA,IACnC,8BAA8B,EAAE,MAAM,QAAQ;AAAA,IAC9C,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc;AAEtB,UAAMC,IAAQD,GAGRE,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,KAAK,GAEzCK,IAAWC,KACXC,IAASH,EAAS,MAAMI,EAAWT,GAAOM,CAAQ,CAAC,GAGnDI,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAiBN,EAAO,KAAK,IACzCO,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQX,EAAK,QACrBH,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBd,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKgB,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,OACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO,QACzBP,EAAA,OAAOS,EAAU,KAAK;AAAA,IACjC,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO5B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/crosshair/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-crosshair\": \"\" }\n\nimport { Crosshair, CrosshairConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { crosshairAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n yStacked: {},\n baseline: { type: [Function, Number, null] },\n tooltip: {},\n template: { type: Function },\n hideWhenFarFromPointer: { type: Boolean },\n hideWhenFarFromPointerDistance: {},\n snapToData: { type: Boolean },\n getCircles: { type: Function },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(crosshairAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<Crosshair<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Crosshair<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","crosshairAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Crosshair","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,UAAU,CAAC;AAAA,IACX,UAAU,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IAC3C,SAAS,CAAC;AAAA,IACV,UAAU,EAAE,MAAM,SAAS;AAAA,IAC3B,wBAAwB,EAAE,MAAM,QAAQ;AAAA,IACxC,gCAAgC,CAAC;AAAA,IACjC,YAAY,EAAE,MAAM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,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEQT,EAAA;AAAA,MACP,WAAAW;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO7B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),d=require("@unovis/ts"),u=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},g=e.defineComponent({__name:"index",props:{id:{type:Function},value:{type:[Function,Number,null]},angleRange:{},padAngle:{},sortFunction:{type:Function},cornerRadius:{},color:{type:[Function,String,Array,null]},radius:{},arcWidth:{},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},showEmptySegments:{type:Boolean},emptySegmentAngle:{},showBackground:{type:Boolean},backgroundAngleRange:{},duration:{},events:{},attributes:{},data:{}},setup(s){const l=s,o=e.inject(m.componentAccessorKey),p=e.computed(()=>o.data.value),i=e.getCurrentInstance(),a=e.computed(()=>u.parseProps(l,i)),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new d.Donut(a.value),(t=n.value)==null||t.setData(p.value),o.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),o.destroy()}),e.watch(a,(t,c)=>{var r;u.arePropsEqual(t,c)||((r=n.value)==null||r.setConfig(a.value),o.update(n.value))}),(t,c)=>(e.openBlock(),e.createElementBlock("div",v))}});module.exports=g;
1
+ "use strict";const e=require("vue"),m=require("@unovis/ts"),u=require("../../utils/props.cjs"),g=require("../../utils/context.cjs"),v={"data-vis-component":""},y=e.defineComponent({__name:"index",props:{id:{type:Function},value:{type:[Function,Number,null]},angleRange:{},padAngle:{},sortFunction:{type:Function},cornerRadius:{},color:{type:[Function,String,Array,null]},radius:{},arcWidth:{},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},showEmptySegments:{type:Boolean},emptySegmentAngle:{},showBackground:{type:Boolean},backgroundAngleRange:{},duration:{},events:{},attributes:{},data:{}},setup(l,{expose:p}){const c=l,o=e.inject(g.componentAccessorKey),i=e.computed(()=>o.data.value??c.data),d=e.getCurrentInstance(),a=e.computed(()=>u.parseProps({...c},d)),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new m.Donut(a.value),(t=n.value)==null||t.setData(i.value),o.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),o.destroy()}),e.watch(a,(t,r)=>{var s;u.arePropsEqual(t,r)||(s=n.value)==null||s.setConfig(a.value)}),p({component:n}),(t,r)=>(e.openBlock(),e.createElementBlock("div",v))}});module.exports=y;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/donut/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n id: { type: Function },\n value: { type: [Function, Number, null] },\n angleRange: {},\n padAngle: {},\n sortFunction: { type: Function },\n cornerRadius: {},\n color: { type: [Function, String, Array, null] },\n radius: {},\n arcWidth: {},\n centralLabel: {},\n centralSubLabel: {},\n centralSubLabelWrap: { type: Boolean },\n showEmptySegments: { type: Boolean },\n emptySegmentAngle: {},\n showBackground: { type: Boolean },\n backgroundAngleRange: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps(props, instance))\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<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 accessor.update(component.value)\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Donut","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IAQfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,GAAI,CAAE,KAAM,QAAS,EACrB,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,WAAY,CAAC,EACb,SAAU,CAAC,EACX,aAAc,CAAE,KAAM,QAAS,EAC/B,aAAc,CAAC,EACf,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EAC/C,OAAQ,CAAC,EACT,SAAU,CAAC,EACX,aAAc,CAAC,EACf,gBAAiB,CAAC,EAClB,oBAAqB,CAAE,KAAM,OAAQ,EACrC,kBAAmB,CAAE,KAAM,OAAQ,EACnC,kBAAmB,CAAC,EACpB,eAAgB,CAAE,KAAM,OAAQ,EAChC,qBAAsB,CAAC,EACvB,SAAU,CAAC,EACX,OAAQ,CAAC,EACT,WAAY,CAAC,EACb,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAEtB,MAAMC,EAAQD,EAGRE,EAAWC,SAAOC,EAAAA,oBAAoB,EAItCC,EAAOC,EAAAA,SAAS,IAAMJ,EAAS,KAAK,KAAK,EAEzCK,EAAWC,EAAAA,qBACXC,EAASH,EAAAA,SAAS,IAAMI,EAAW,WAAAT,EAAOM,CAAQ,CAAC,EAGnDI,EAAYC,EAAAA,MAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAII,EAAa,MAAAN,EAAO,KAAK,GACrCO,EAAAL,EAAA,QAAA,MAAAK,EAAO,QAAQX,EAAK,OACrBH,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDM,EAAAA,YAAY,IAAM,QAChBD,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBd,EAAS,QAAQ,CAAA,CAClB,EAEKgB,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,KACjBJ,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,OACzBP,EAAA,OAAOS,EAAU,KAAK,EACjC,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO5B,CAAU,EAE7D,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/donut/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n id: { type: Function },\n value: { type: [Function, Number, null] },\n angleRange: {},\n padAngle: {},\n sortFunction: { type: Function },\n cornerRadius: {},\n color: { type: [Function, String, Array, null] },\n radius: {},\n arcWidth: {},\n centralLabel: {},\n centralSubLabel: {},\n centralSubLabelWrap: { type: Boolean },\n showEmptySegments: { type: Boolean },\n emptySegmentAngle: {},\n showBackground: { type: Boolean },\n backgroundAngleRange: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Donut","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IAQfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,GAAI,CAAE,KAAM,QAAS,EACrB,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACxC,WAAY,CAAC,EACb,SAAU,CAAC,EACX,aAAc,CAAE,KAAM,QAAS,EAC/B,aAAc,CAAC,EACf,MAAO,CAAE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 @@
1
- import { DonutConfigInterface } from '@unovis/ts';
2
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: Pick<any, "attrs" | "emit" | "slots">, __VLS_expose?: any, __VLS_setup?: Promise<{
3
- props: DonutConfigInterface<Datum> & {
1
+ import { Donut, NumericAccessor } from '@unovis/ts';
2
+ declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
3
+ attrs: any;
4
+ emit: any;
5
+ slots: any;
6
+ }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
+ props: {
8
+ value: NumericAccessor<Datum>;
9
+ id?: (d: Datum, i: number, ...any: any[]) => string | number;
10
+ color?: import("@unovis/ts").ColorAccessor<Datum>;
11
+ duration?: number;
12
+ events?: {
13
+ [selector: string]: {
14
+ touchstart?: import("@unovis/ts").VisEventCallback<any>;
15
+ touchmove?: import("@unovis/ts").VisEventCallback<any>;
16
+ touchend?: import("@unovis/ts").VisEventCallback<any>;
17
+ mouseover?: import("@unovis/ts").VisEventCallback<any>;
18
+ mousemove?: import("@unovis/ts").VisEventCallback<any>;
19
+ mousedown?: import("@unovis/ts").VisEventCallback<any>;
20
+ mouseup?: import("@unovis/ts").VisEventCallback<any>;
21
+ click?: import("@unovis/ts").VisEventCallback<any>;
22
+ auxclick?: import("@unovis/ts").VisEventCallback<any>;
23
+ contextmenu?: import("@unovis/ts").VisEventCallback<any>;
24
+ dblclick?: import("@unovis/ts").VisEventCallback<any>;
25
+ mouseenter?: import("@unovis/ts").VisEventCallback<any>;
26
+ mouseleave?: import("@unovis/ts").VisEventCallback<any>;
27
+ mouseout?: import("@unovis/ts").VisEventCallback<any>;
28
+ scroll?: import("@unovis/ts").VisEventCallback<any>;
29
+ select?: import("@unovis/ts").VisEventCallback<any>;
30
+ wheel?: import("@unovis/ts").VisEventCallback<any>;
31
+ pointerdown?: import("@unovis/ts").VisEventCallback<any>;
32
+ pointerup?: import("@unovis/ts").VisEventCallback<any>;
33
+ pointerout?: import("@unovis/ts").VisEventCallback<any>;
34
+ pointermove?: import("@unovis/ts").VisEventCallback<any>;
35
+ };
36
+ };
37
+ attributes?: {
38
+ [selector: string]: {
39
+ [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
40
+ };
41
+ };
4
42
  data?: Datum[];
5
- };
6
- expose(exposed: {}): void;
43
+ padAngle?: number;
44
+ cornerRadius?: number;
45
+ angleRange?: [number, number];
46
+ sortFunction?: (a: Datum, b: Datum) => number;
47
+ radius?: number;
48
+ arcWidth?: number;
49
+ centralLabel?: string;
50
+ centralSubLabel?: string;
51
+ centralSubLabelWrap?: boolean;
52
+ showEmptySegments?: boolean;
53
+ emptySegmentAngle?: number;
54
+ showBackground?: boolean;
55
+ backgroundAngleRange?: [number, number];
56
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
57
+ expose(exposed: {
58
+ component: import("vue").Ref<Donut<Datum>>;
59
+ }): void;
7
60
  attrs: any;
8
61
  slots: {};
9
62
  emit: any;
@@ -1,8 +1,8 @@
1
- import { defineComponent as i, inject as d, computed as c, getCurrentInstance as m, ref as g, onMounted as v, nextTick as y, onUnmounted as f, watch as b, openBlock as _, createElementBlock as h } from "vue";
2
- import { Donut as B } from "@unovis/ts";
3
- import { parseProps as k, arePropsEqual as A } from "../../utils/props.js";
1
+ import { defineComponent as d, inject as m, computed as s, getCurrentInstance as g, ref as v, onMounted as y, nextTick as f, onUnmounted as b, watch as _, openBlock as h, createElementBlock as B } from "vue";
2
+ import { Donut as k } from "@unovis/ts";
3
+ import { parseProps as x, arePropsEqual as A } from "../../utils/props.js";
4
4
  import { componentAccessorKey as F } from "../../utils/context.js";
5
- const S = { "data-vis-component": "" }, L = /* @__PURE__ */ i({
5
+ const S = { "data-vis-component": "" }, R = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
8
  id: { type: Function },
@@ -26,23 +26,25 @@ const S = { "data-vis-component": "" }, L = /* @__PURE__ */ i({
26
26
  attributes: {},
27
27
  data: {}
28
28
  },
29
- setup(u) {
30
- const s = u, n = d(F), l = c(() => n.data.value), p = m(), o = c(() => k(s, p)), t = g();
31
- return v(() => {
32
- y(() => {
29
+ setup(u, { expose: l }) {
30
+ const a = u, n = m(F), p = s(() => n.data.value ?? a.data), i = g(), o = s(() => x({ ...a }, i)), t = v();
31
+ return y(() => {
32
+ f(() => {
33
33
  var e;
34
- t.value = new B(o.value), (e = t.value) == null || e.setData(l.value), n.update(t.value);
34
+ t.value = new k(o.value), (e = t.value) == null || e.setData(p.value), n.update(t.value);
35
35
  });
36
- }), f(() => {
36
+ }), b(() => {
37
37
  var e;
38
38
  (e = t.value) == null || e.destroy(), n.destroy();
39
- }), b(o, (e, a) => {
40
- var r;
41
- A(e, a) || ((r = t.value) == null || r.setConfig(o.value), n.update(t.value));
42
- }), (e, a) => (_(), h("div", S));
39
+ }), _(o, (e, r) => {
40
+ var c;
41
+ A(e, r) || (c = t.value) == null || c.setConfig(o.value);
42
+ }), l({
43
+ component: t
44
+ }), (e, r) => (h(), B("div", S));
43
45
  }
44
46
  });
45
47
  export {
46
- L as default
48
+ R as default
47
49
  };
48
50
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/donut/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n id: { type: Function },\n value: { type: [Function, Number, null] },\n angleRange: {},\n padAngle: {},\n sortFunction: { type: Function },\n cornerRadius: {},\n color: { type: [Function, String, Array, null] },\n radius: {},\n arcWidth: {},\n centralLabel: {},\n centralSubLabel: {},\n centralSubLabelWrap: { type: Boolean },\n showEmptySegments: { type: Boolean },\n emptySegmentAngle: {},\n showBackground: { type: Boolean },\n backgroundAngleRange: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps(props, instance))\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<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 accessor.update(component.value)\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Donut","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,IAAI,EAAE,MAAM,SAAS;AAAA,IACrB,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,YAAY,CAAC;AAAA,IACb,UAAU,CAAC;AAAA,IACX,cAAc,EAAE,MAAM,SAAS;AAAA,IAC/B,cAAc,CAAC;AAAA,IACf,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,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&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { Donut, DonutConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n id: { type: Function },\n value: { type: [Function, Number, null] },\n angleRange: {},\n padAngle: {},\n sortFunction: { type: Function },\n cornerRadius: {},\n color: { type: [Function, String, Array, null] },\n radius: {},\n arcWidth: {},\n centralLabel: {},\n centralSubLabel: {},\n centralSubLabelWrap: { type: Boolean },\n showEmptySegments: { type: Boolean },\n emptySegmentAngle: {},\n showBackground: { type: Boolean },\n backgroundAngleRange: {},\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<Donut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Donut<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","Donut","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,sBAAsB,MAQfC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,IAAI,EAAE,MAAM,SAAS;AAAA,IACrB,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,IAAI,EAAE;AAAA,IACxC,YAAY,CAAC;AAAA,IACb,UAAU,CAAC;AAAA,IACX,cAAc,EAAE,MAAM,SAAS;AAAA,IAC/B,cAAc,CAAC;AAAA,IACf,OAAO,EAAE,MAAM,CAAC,UAAU,QAAQ,OAAO,IAAI,EAAE;AAAA,IAC/C,QAAQ,CAAC;AAAA,IACT,UAAU,CAAC;AAAA,IACX,cAAc,CAAC;AAAA,IACf,iBAAiB,CAAC;AAAA,IAClB,qBAAqB,EAAE,MAAM,QAAQ;AAAA,IACrC,mBAAmB,EAAE,MAAM,QAAQ;AAAA,IACnC,mBAAmB,CAAC;AAAA,IACpB,gBAAgB,EAAE,MAAM,QAAQ;AAAA,IAChC,sBAAsB,CAAC;AAAA,IACvB,UAAU,CAAC;AAAA,IACX,QAAQ,CAAC;AAAA,IACT,YAAY,CAAC;AAAA,IACb,MAAM,CAAC;AAAA,EACT;AAAA,EACA,MAAMC,GAAc,EAAE,QAAQC,KAAY;AAE5C,UAAMC,IAAQF,GAGRG,IAAWC,EAAOC,CAAoB,GAItCC,IAAOC,EAAS,MAAMJ,EAAS,KAAK,SAASD,EAAM,IAAI,GAEvDM,IAAWC,KACXC,IAASH,EAAS,MAAMI,EAAW,EAAE,GAAGT,EAAS,GAAAM,CAAQ,CAAC,GAG1DI,IAAYC;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAII,EAAaN,EAAO,KAAK,IACrCO,IAAAL,EAAA,UAAA,QAAAK,EAAO,QAAQX,EAAK,QACrBH,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDM,EAAY,MAAM;;AAChB,OAAAD,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBd,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKgB,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUP,EAAO;AAAA,IACpC,CACD,GAEQT,EAAA;AAAA,MACP,WAAAW;AAAA,IAAA,CACD,GAEM,CAACW,GAAUC,OACRC,EAAW,GAAGC,EAAoB,OAAO7B,CAAU;AAAA,EAE7D;AAEA,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),d=require("@unovis/ts"),r=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),m={"data-vis-component":""},v=e.defineComponent({__name:"index",props:{mode:{},onBrush:{type:Function},onBrushStart:{type:Function},onBrushMove:{type:Function},onBrushEnd:{type:Function},handleWidth:{},selection:{},selectionMinLength:{},autoHide:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(s){const i=s,o=e.inject(y.componentAccessorKey),p=e.computed(()=>o.data.value),l=e.getCurrentInstance(),c=e.computed(()=>r.parseProps(i,l)),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new d.FreeBrush(c.value),(t=n.value)==null||t.setData(p.value),o.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),o.destroy()}),e.watch(c,(t,u)=>{var a;r.arePropsEqual(t,u)||((a=n.value)==null||a.setConfig(c.value),o.update(n.value))}),(t,u)=>(e.openBlock(),e.createElementBlock("div",m))}});module.exports=v;
1
+ "use strict";const e=require("vue"),y=require("@unovis/ts"),s=require("../../utils/props.cjs"),m=require("../../utils/context.cjs"),v={"data-vis-component":""},F=e.defineComponent({__name:"index",props:{mode:{},onBrush:{type:Function},onBrushStart:{type:Function},onBrushMove:{type:Function},onBrushEnd:{type:Function},handleWidth:{},selection:{},selectionMinLength:{},autoHide:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:p}){const u=i,o=e.inject(m.componentAccessorKey),l=e.computed(()=>o.data.value??u.data),d=e.getCurrentInstance(),c=e.computed(()=>s.parseProps({...u},d)),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{var t;n.value=new y.FreeBrush(c.value),(t=n.value)==null||t.setData(l.value),o.update(n.value)})}),e.onUnmounted(()=>{var t;(t=n.value)==null||t.destroy(),o.destroy()}),e.watch(c,(t,a)=>{var r;s.arePropsEqual(t,a)||(r=n.value)==null||r.setConfig(c.value)}),p({component:n}),(t,a)=>(e.openBlock(),e.createElementBlock("div",v))}});module.exports=F;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/free-brush/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { FreeBrush, FreeBrushConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n mode: {},\n onBrush: { type: Function },\n onBrushStart: { type: Function },\n onBrushMove: { type: Function },\n onBrushEnd: { type: Function },\n handleWidth: {},\n selection: {},\n selectionMinLength: {},\n autoHide: { type: Boolean },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps(props, instance))\n\n// component declaration\nconst component = ref<FreeBrush<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new FreeBrush<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 accessor.update(component.value)\n }\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","FreeBrush","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IAQfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,KAAM,CAAC,EACP,QAAS,CAAE,KAAM,QAAS,EAC1B,aAAc,CAAE,KAAM,QAAS,EAC/B,YAAa,CAAE,KAAM,QAAS,EAC9B,WAAY,CAAE,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,EAAA,OAAOS,EAAU,KAAK,EACjC,CACD,EAEM,CAACW,EAAUC,KACRC,EAAW,UAAA,EAAGC,EAAAA,mBAAoB,MAAO5B,CAAU,EAE7D,CAEA,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/free-brush/index.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { \"data-vis-component\": \"\" }\n\nimport { FreeBrush, FreeBrushConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, getCurrentInstance, nextTick, inject } from 'vue'\nimport { arePropsEqual, parseProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n mode: {},\n onBrush: { type: Function },\n onBrushStart: { type: Function },\n onBrushMove: { type: Function },\n onBrushEnd: { type: Function },\n handleWidth: {},\n selection: {},\n selectionMinLength: {},\n autoHide: { type: Boolean },\n x: { type: [Function, Number, null] },\n y: { type: [Function, Number, null, Array] },\n id: { type: Function },\n color: { type: [Function, String, Array, null] },\n xScale: { type: [Object, Function] },\n yScale: { type: [Object, Function] },\n excludeFromDomainCalculation: { type: Boolean },\n duration: {},\n events: {},\n attributes: {},\n data: {}\n },\n setup(__props: any, { expose: __expose }) {\n\nconst props = __props;\n\n// !!! This code was automatically generated. You should not change it !!!\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst instance = getCurrentInstance()\nconst config = computed(() => parseProps({ ...props }, instance))\n\n// component declaration\nconst component = ref<FreeBrush<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new FreeBrush<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\n__expose({\n component\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1))\n}\n}\n\n})"],"names":["_hoisted_1","_sfc_main","_defineComponent","__props","__expose","props","accessor","inject","componentAccessorKey","data","computed","instance","getCurrentInstance","config","parseProps","component","ref","onMounted","nextTick","FreeBrush","_a","onUnmounted","watch","curr","prev","arePropsEqual","_ctx","_cache","_openBlock","_createElementBlock"],"mappings":"oIAGMA,EAAa,CAAE,qBAAsB,IAQfC,EAAiBC,kBAAA,CAC3C,OAAQ,QACR,MAAO,CACL,KAAM,CAAC,EACP,QAAS,CAAE,KAAM,QAAS,EAC1B,aAAc,CAAE,KAAM,QAAS,EAC/B,YAAa,CAAE,KAAM,QAAS,EAC9B,WAAY,CAAE,KAAM,QAAS,EAC7B,YAAa,CAAC,EACd,UAAW,CAAC,EACZ,mBAAoB,CAAC,EACrB,SAAU,CAAE,KAAM,OAAQ,EAC1B,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,IAAI,CAAE,EACpC,EAAG,CAAE,KAAM,CAAC,SAAU,OAAQ,KAAM,KAAK,CAAE,EAC3C,GAAI,CAAE,KAAM,QAAS,EACrB,MAAO,CAAE,KAAM,CAAC,SAAU,OAAQ,MAAO,IAAI,CAAE,EAC/C,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,OAAQ,CAAE,KAAM,CAAC,OAAQ,QAAQ,CAAE,EACnC,6BAA8B,CAAE,KAAM,OAAQ,EAC9C,SAAU,CAAC,EACX,OAAQ,CAAC,EACT,WAAY,CAAC,EACb,KAAM,CAAC,CACT,EACA,MAAMC,EAAc,CAAE,OAAQC,GAAY,CAE5C,MAAMC,EAAQF,EAGRG,EAAWC,SAAOC,EAAAA,oBAAoB,EAItCC,EAAOC,EAAS,SAAA,IAAMJ,EAAS,KAAK,OAASD,EAAM,I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