@unovis/vue 1.7.0-pre.1 → 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 (188) 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 +18 -100
  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 +12 -64
  10. package/components/area/index.js +31 -32
  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 +12 -82
  15. package/components/axis/index.js +29 -28
  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 +12 -62
  29. package/components/brush/index.js +26 -28
  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 +12 -60
  34. package/components/chord-diagram/index.js +30 -32
  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 +12 -66
  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 +12 -64
  44. package/components/donut/index.js +24 -26
  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 +12 -62
  49. package/components/free-brush/index.js +25 -28
  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 +11 -135
  54. package/components/graph/index.js +70 -66
  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 +12 -62
  59. package/components/grouped-bar/index.js +27 -28
  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 +12 -60
  73. package/components/line/index.js +28 -30
  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 +12 -65
  78. package/components/nested-donut/index.js +26 -29
  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 +12 -63
  83. package/components/plotband/index.js +17 -18
  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 +12 -64
  88. package/components/plotline/index.js +18 -19
  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 +12 -106
  102. package/components/sankey/index.js +42 -41
  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 +12 -65
  107. package/components/scatter/index.js +33 -35
  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 +12 -62
  112. package/components/stacked-bar/index.js +29 -29
  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 +12 -88
  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 +19 -99
  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 +12 -78
  127. package/components/topojson-map/index.js +66 -39
  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 +12 -69
  132. package/components/treemap/index.js +25 -26
  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 +12 -66
  137. package/components/xy-labels/index.js +36 -39
  138. package/components/xy-labels/index.js.map +1 -1
  139. package/components.d.ts +30 -27
  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.d.ts +11 -26
  143. package/containers/single-container/index.js +26 -26
  144. package/containers/single-container/index.js.map +1 -1
  145. package/containers/xy-container/index.cjs +1 -1
  146. package/containers/xy-container/index.cjs.map +1 -1
  147. package/containers/xy-container/index.d.ts +12 -45
  148. package/containers/xy-container/index.js +25 -30
  149. package/containers/xy-container/index.js.map +1 -1
  150. package/containers.d.ts +2 -2
  151. package/html-components/bullet-legend/index.cjs +1 -1
  152. package/html-components/bullet-legend/index.cjs.map +1 -1
  153. package/html-components/bullet-legend/index.d.ts +18 -74
  154. package/html-components/bullet-legend/index.js +24 -25
  155. package/html-components/bullet-legend/index.js.map +1 -1
  156. package/html-components/flow-legend/index.cjs +1 -1
  157. package/html-components/flow-legend/index.cjs.map +1 -1
  158. package/html-components/flow-legend/index.d.ts +19 -85
  159. package/html-components/flow-legend/index.js +21 -23
  160. package/html-components/flow-legend/index.js.map +1 -1
  161. package/html-components/leaflet-flow-map/index.cjs +1 -1
  162. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  163. package/html-components/leaflet-flow-map/index.d.ts +12 -112
  164. package/html-components/leaflet-flow-map/index.js +46 -48
  165. package/html-components/leaflet-flow-map/index.js.map +1 -1
  166. package/html-components/leaflet-map/index.cjs +1 -1
  167. package/html-components/leaflet-map/index.cjs.map +1 -1
  168. package/html-components/leaflet-map/index.d.ts +12 -99
  169. package/html-components/leaflet-map/index.js +37 -39
  170. package/html-components/leaflet-map/index.js.map +1 -1
  171. package/html-components/rolling-pin-legend/index.cjs +1 -1
  172. package/html-components/rolling-pin-legend/index.cjs.map +1 -1
  173. package/html-components/rolling-pin-legend/index.d.ts +18 -50
  174. package/html-components/rolling-pin-legend/index.js +22 -24
  175. package/html-components/rolling-pin-legend/index.js.map +1 -1
  176. package/index.cjs +2 -2
  177. package/index.js +101 -92
  178. package/index.js.map +1 -1
  179. package/package.json +14 -13
  180. package/utils/context.cjs.map +1 -1
  181. package/utils/context.d.ts +1 -0
  182. package/utils/context.js +1 -1
  183. package/utils/context.js.map +1 -1
  184. package/utils/props.cjs +1 -1
  185. package/utils/props.cjs.map +1 -1
  186. package/utils/props.d.ts +2 -4
  187. package/utils/props.js +9 -9
  188. package/utils/props.js.map +1 -1
@@ -1,72 +1,19 @@
1
- import { NestedDonut, StringAccessor } from '@unovis/ts';
2
- export declare const VisNestedDonutSelectors: typeof import("@unovis/ts/dist/components/nested-donut/style");
3
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
4
- attrs: any;
5
- emit: any;
6
- slots: any;
7
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
8
- props: {
9
- duration?: number;
10
- events?: {
11
- [selector: string]: {
12
- touchstart?: import("@unovis/ts").VisEventCallback<any>;
13
- touchmove?: import("@unovis/ts").VisEventCallback<any>;
14
- touchend?: import("@unovis/ts").VisEventCallback<any>;
15
- mouseover?: import("@unovis/ts").VisEventCallback<any>;
16
- mousemove?: import("@unovis/ts").VisEventCallback<any>;
17
- mousedown?: import("@unovis/ts").VisEventCallback<any>;
18
- mouseup?: import("@unovis/ts").VisEventCallback<any>;
19
- click?: import("@unovis/ts").VisEventCallback<any>;
20
- auxclick?: import("@unovis/ts").VisEventCallback<any>;
21
- contextmenu?: import("@unovis/ts").VisEventCallback<any>;
22
- dblclick?: import("@unovis/ts").VisEventCallback<any>;
23
- mouseenter?: import("@unovis/ts").VisEventCallback<any>;
24
- mouseleave?: import("@unovis/ts").VisEventCallback<any>;
25
- mouseout?: import("@unovis/ts").VisEventCallback<any>;
26
- scroll?: import("@unovis/ts").VisEventCallback<any>;
27
- select?: import("@unovis/ts").VisEventCallback<any>;
28
- wheel?: import("@unovis/ts").VisEventCallback<any>;
29
- pointerdown?: import("@unovis/ts").VisEventCallback<any>;
30
- pointerup?: import("@unovis/ts").VisEventCallback<any>;
31
- pointerout?: import("@unovis/ts").VisEventCallback<any>;
32
- pointermove?: import("@unovis/ts").VisEventCallback<any>;
33
- };
34
- };
35
- attributes?: {
36
- [selector: string]: {
37
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
38
- };
39
- };
1
+ import { NestedDonutConfigInterface, NestedDonut } from '@unovis/ts';
2
+
3
+ export declare const VisNestedDonutSelectors: typeof import("@unovis/ts/components/nested-donut/style");
4
+ declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (NestedDonutConfigInterface<Datum> & {
40
6
  data?: Datum[];
41
- angleRange?: [number, number];
42
- cornerRadius?: number;
43
- value?: import("@unovis/ts").NumericAccessor<Datum>;
44
- centralLabel?: string;
45
- centralSubLabel?: string;
46
- centralSubLabelWrap?: boolean;
47
- showEmptySegments?: boolean;
48
- emptySegmentAngle?: number;
49
- showBackground?: boolean;
50
- direction?: string;
51
- sort?: (a: import("@unovis/ts").NestedDonutSegment<Datum>, b: import("@unovis/ts").NestedDonutSegment<Datum>) => number;
52
- layers: StringAccessor<Datum>[];
53
- layerSettings?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").NestedDonutLayerSettings, number>;
54
- layerPadding?: number;
55
- hideOverflowingSegmentLabels?: boolean;
56
- segmentColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").NestedDonutSegment<Datum>>;
57
- segmentLabel?: StringAccessor<import("@unovis/ts").NestedDonutSegment<Datum>>;
58
- segmentLabelColor?: import("@unovis/ts").ColorAccessor<import("@unovis/ts").NestedDonutSegment<Datum>>;
59
- showSegmentLabels?: boolean;
60
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
61
- expose(exposed: import("vue").ShallowUnwrapRef<{
62
- component: import("vue").Ref<NestedDonut<Datum>, NestedDonut<Datum>>;
7
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{
9
+ component: import('vue').Ref<NestedDonut<Datum>, NestedDonut<Datum>>;
63
10
  }>): void;
64
11
  attrs: any;
65
- slots: {};
66
- emit: any;
67
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ slots: ReturnType<() => {}>;
13
+ emit: typeof __VLS_emit;
14
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
68
15
  [key: string]: any;
69
16
  }> & {
70
- __ctx?: any;
17
+ __ctx?: Awaited<typeof __VLS_setup>;
71
18
  };
72
19
  export default _default;
@@ -1,27 +1,28 @@
1
- import { defineComponent as i, inject as m, computed as g, ref as v, onMounted as y, nextTick as f, onUnmounted as b, watch as c, createElementBlock as B, openBlock as S } from "vue";
1
+ import { defineComponent as p, inject as m, computed as d, ref as y, onMounted as g, nextTick as v, onUnmounted as f, watch as s, openBlock as b, createElementBlock as S } from "vue";
2
2
  import { NestedDonut as u } from "@unovis/ts";
3
- import { useForwardProps as _, arePropsEqual as h } from "../../utils/props.js";
4
- import { componentAccessorKey as w } from "../../utils/context.js";
5
- const L = { "data-vis-component": "" }, E = u.selectors, P = /* @__PURE__ */ i({
3
+ import { componentAccessorKey as B } from "../../utils/context.js";
4
+ import { useForwardProps as F, arePropsEqual as _ } from "../../utils/props.js";
5
+ const h = { "data-vis-component": "" }, A = u.selectors, C = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  angleRange: {},
9
9
  direction: {},
10
- value: {},
10
+ value: { type: [Function, Number, null] },
11
11
  centralLabel: {},
12
12
  centralSubLabel: {},
13
13
  centralSubLabelWrap: { type: Boolean },
14
14
  showBackground: { type: Boolean },
15
15
  sort: { type: Function },
16
16
  layers: {},
17
- layerSettings: {},
17
+ layerSettings: { type: [Function, null] },
18
18
  layerPadding: {},
19
19
  cornerRadius: {},
20
20
  emptySegmentAngle: {},
21
21
  hideOverflowingSegmentLabels: { type: Boolean },
22
- segmentColor: {},
23
- segmentLabel: {},
24
- segmentLabelColor: {},
22
+ segmentColor: { type: [Function, String, Array, null] },
23
+ segmentPattern: { type: [Function, null] },
24
+ segmentLabel: { type: [Function, String, null] },
25
+ segmentLabelColor: { type: [Function, String, Array, null] },
25
26
  showEmptySegments: { type: Boolean },
26
27
  showSegmentLabels: { type: Boolean },
27
28
  duration: {},
@@ -29,29 +30,25 @@ const L = { "data-vis-component": "" }, E = u.selectors, P = /* @__PURE__ */ i({
29
30
  attributes: {},
30
31
  data: {}
31
32
  },
32
- setup(p, { expose: d }) {
33
- const o = m(w), s = p, a = g(() => o.data.value ?? s.data), n = _(s), t = v();
34
- return y(() => {
35
- f(() => {
36
- var e;
37
- t.value = new u(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
33
+ setup(c, { expose: i }) {
34
+ const a = c, t = m(B), n = d(() => t.data.value ?? a.data), o = F(a), e = y();
35
+ return g(() => {
36
+ v(() => {
37
+ e.value = new u(o.value), e.value?.setData(n.value), t.update(e.value);
38
38
  });
39
- }), b(() => {
40
- var e;
41
- (e = t.value) == null || e.destroy(), o.destroy();
42
- }), c(n, (e, r) => {
43
- var l;
44
- h(e, r) || (l = t.value) == null || l.setConfig(n.value);
45
- }), c(a, () => {
46
- var e;
47
- (e = t.value) == null || e.setData(a.value);
48
- }), d({
49
- component: t
50
- }), (e, r) => (S(), B("div", L));
39
+ }), f(() => {
40
+ e.value?.destroy(), t.destroy();
41
+ }), s(o, (r, l) => {
42
+ _(r, l) || (e.value?.setConfig(o.value), e.value?.render());
43
+ }), s(n, () => {
44
+ e.value?.setData(n.value);
45
+ }), i({
46
+ component: e
47
+ }), (r, l) => (b(), S("div", h));
51
48
  }
52
49
  });
53
50
  export {
54
- E as VisNestedDonutSelectors,
55
- P as default
51
+ A as VisNestedDonutSelectors,
52
+ C as default
56
53
  };
57
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/nested-donut/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { NestedDonut, NestedDonutConfigInterface, 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 = NestedDonutConfigInterface<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<NestedDonut<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new NestedDonut<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 VisNestedDonutSelectors = NestedDonut.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisNestedDonutSelectors","NestedDonut","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAA0BC,EAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C7C,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAwB;AAG1C,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAmBQ,EAAO,KAAK,IAC3CM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/nested-donut/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { NestedDonutConfigInterface } from '@unovis/ts'\nimport { NestedDonut } 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 = NestedDonutConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<NestedDonut<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new NestedDonut<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 VisNestedDonutSelectors = NestedDonut.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisNestedDonutSelectors","NestedDonut","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,EAAmBQ,EAAO,KAAK,GACrDE,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 e=require("vue"),r=require("@unovis/ts"),l=require("../../utils/props.cjs"),p=require("../../utils/context.cjs"),b={"data-vis-component":""},f=r.Plotband.selectors,m=e.defineComponent({__name:"index",props:{color:{},axis:{},from:{},to:{},duration:{},labelText:{},labelPosition:{},labelOffsetX:{},labelOffsetY:{},labelOrientation:{},labelColor:{},labelSize:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},events:{},attributes:{},data:{}},setup(i,{expose:u}){const s=e.inject(p.componentAccessorKey),d=i,n=l.useForwardProps(d),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new r.Plotband(n.value),s.update(t.value)})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy(),s.destroy()}),e.watch(n,(o,a)=>{var c;l.arePropsEqual(o,a)||(c=t.value)==null||c.setConfig(n.value)}),u({component:t}),(o,a)=>(e.openBlock(),e.createElementBlock("div",b))}});exports.VisPlotbandSelectors=f;exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("@unovis/ts"),d=require("../../utils/context.cjs"),r=require("../../utils/props.cjs"),p={"data-vis-component":""},b=a.Plotband.selectors,m=e.defineComponent({__name:"index",props:{color:{},axis:{},from:{},to:{},duration:{},labelText:{},labelPosition:{},labelOffsetX:{},labelOffsetY:{},labelOrientation:{},labelColor:{},labelSize:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},events:{},attributes:{},data:{}},setup(s,{expose:u}){const i=s,n=e.inject(d.componentAccessorKey),o=r.useForwardProps(i),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new a.Plotband(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(o,(l,c)=>{r.arePropsEqual(l,c)||(t.value?.setConfig(o.value),t.value?.render())}),u({component:t}),(l,c)=>(e.openBlock(),e.createElementBlock("div",p))}});exports.VisPlotbandSelectors=b;exports.default=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/plotband/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Plotband, PlotbandConfigInterface } 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 = PlotbandConfigInterface<Datum>\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Plotband<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Plotband<Datum>(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 VisPlotbandSelectors = Plotband.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisPlotbandSelectors","Plotband","accessor","inject","componentAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PA+CaA,EAAuBC,EAAAA,SAAS,2YAxCvC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAIRC,EAASC,kBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAqB,EAGvCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,WAAgBM,EAAO,KAAK,EAEzCL,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKa,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAGYY,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/plotband/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { PlotbandConfigInterface } from '@unovis/ts'\nimport { Plotband } from '@unovis/ts'\nimport { 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?: null }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = PlotbandConfigInterface<Datum>\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Plotband<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Plotband<Datum>(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 VisPlotbandSelectors = Plotband.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisPlotbandSelectors","Plotband","props","__props","accessor","inject","componentAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PA8CaA,EAAuBC,EAAAA,SAAS,odAtC7C,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAKtCC,EAASC,EAAAA,gBAAgBN,CAAK,EAG9BO,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,WAAgBM,EAAO,KAAK,EAElDH,EAAS,OAAOK,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBL,EAAS,QAAA,CACX,CAAC,EAEDU,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDS,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,70 +1,19 @@
1
- import { Plotband } from '@unovis/ts';
2
- export declare const VisPlotbandSelectors: typeof import("@unovis/ts/dist/components/plotband/style");
3
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
4
- attrs: any;
5
- emit: any;
6
- slots: any;
7
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
8
- props: {
9
- duration?: number;
10
- events?: {
11
- [selector: string]: {
12
- touchstart?: import("@unovis/ts").VisEventCallback<any>;
13
- touchmove?: import("@unovis/ts").VisEventCallback<any>;
14
- touchend?: import("@unovis/ts").VisEventCallback<any>;
15
- mouseover?: import("@unovis/ts").VisEventCallback<any>;
16
- mousemove?: import("@unovis/ts").VisEventCallback<any>;
17
- mousedown?: import("@unovis/ts").VisEventCallback<any>;
18
- mouseup?: import("@unovis/ts").VisEventCallback<any>;
19
- click?: import("@unovis/ts").VisEventCallback<any>;
20
- auxclick?: import("@unovis/ts").VisEventCallback<any>;
21
- contextmenu?: import("@unovis/ts").VisEventCallback<any>;
22
- dblclick?: import("@unovis/ts").VisEventCallback<any>;
23
- mouseenter?: import("@unovis/ts").VisEventCallback<any>;
24
- mouseleave?: import("@unovis/ts").VisEventCallback<any>;
25
- mouseout?: import("@unovis/ts").VisEventCallback<any>;
26
- scroll?: import("@unovis/ts").VisEventCallback<any>;
27
- select?: import("@unovis/ts").VisEventCallback<any>;
28
- wheel?: import("@unovis/ts").VisEventCallback<any>;
29
- pointerdown?: import("@unovis/ts").VisEventCallback<any>;
30
- pointerup?: import("@unovis/ts").VisEventCallback<any>;
31
- pointerout?: import("@unovis/ts").VisEventCallback<any>;
32
- pointermove?: import("@unovis/ts").VisEventCallback<any>;
33
- };
34
- };
35
- attributes?: {
36
- [selector: string]: {
37
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
38
- };
39
- };
1
+ import { PlotbandConfigInterface, Plotband } from '@unovis/ts';
2
+
3
+ export declare const VisPlotbandSelectors: typeof import("@unovis/ts/components/plotband/style");
4
+ declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (PlotbandConfigInterface<Datum> & {
40
6
  data?: null;
41
- x?: import("@unovis/ts").NumericAccessor<Datum>;
42
- y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
43
- color?: string;
44
- id?: (d: Datum, i: number, ...any: any[]) => string;
45
- xScale?: import("@unovis/ts").ContinuousScale;
46
- yScale?: import("@unovis/ts").ContinuousScale;
47
- excludeFromDomainCalculation?: boolean;
48
- labelColor?: string;
49
- axis?: import("@unovis/ts").AxisType;
50
- from?: number;
51
- to?: number;
52
- labelText?: string;
53
- labelPosition?: import("@unovis/ts").PlotbandLabelPosition;
54
- labelOffsetX?: number;
55
- labelOffsetY?: number;
56
- labelOrientation?: import("@unovis/ts").PlotbandLabelOrientation;
57
- labelSize?: number;
58
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
59
- expose(exposed: import("vue").ShallowUnwrapRef<{
60
- component: import("vue").Ref<Plotband<Datum>, Plotband<Datum>>;
7
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{
9
+ component: import('vue').Ref<Plotband<Datum>, Plotband<Datum>>;
61
10
  }>): void;
62
11
  attrs: any;
63
- slots: {};
64
- emit: any;
65
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ slots: ReturnType<() => {}>;
13
+ emit: typeof __VLS_emit;
14
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
66
15
  [key: string]: any;
67
16
  }> & {
68
- __ctx?: any;
17
+ __ctx?: Awaited<typeof __VLS_setup>;
69
18
  };
70
19
  export default _default;
@@ -1,8 +1,8 @@
1
- import { defineComponent as i, inject as p, ref as u, onMounted as m, nextTick as d, onUnmounted as f, watch as b, createElementBlock as x, openBlock as v } from "vue";
1
+ import { defineComponent as i, inject as u, ref as p, onMounted as m, nextTick as d, onUnmounted as f, watch as b, openBlock as y, createElementBlock as v } from "vue";
2
2
  import { Plotband as l } from "@unovis/ts";
3
- import { useForwardProps as y, arePropsEqual as _ } from "../../utils/props.js";
4
- import { componentAccessorKey as F } from "../../utils/context.js";
5
- const O = { "data-vis-component": "" }, k = l.selectors, w = /* @__PURE__ */ i({
3
+ import { componentAccessorKey as x } from "../../utils/context.js";
4
+ import { useForwardProps as _, arePropsEqual as F } from "../../utils/props.js";
5
+ const O = { "data-vis-component": "" }, j = l.selectors, k = /* @__PURE__ */ i({
6
6
  __name: "index",
7
7
  props: {
8
8
  color: {},
@@ -17,9 +17,10 @@ const O = { "data-vis-component": "" }, k = l.selectors, w = /* @__PURE__ */ i({
17
17
  labelOrientation: {},
18
18
  labelColor: {},
19
19
  labelSize: {},
20
- x: {},
21
- y: {},
20
+ x: { type: [Function, Number, null] },
21
+ y: { type: [Function, Number, null, Array] },
22
22
  id: { type: Function },
23
+ colorKeys: {},
23
24
  xScale: { type: [Object, Function] },
24
25
  yScale: { type: [Object, Function] },
25
26
  excludeFromDomainCalculation: { type: Boolean },
@@ -27,25 +28,23 @@ const O = { "data-vis-component": "" }, k = l.selectors, w = /* @__PURE__ */ i({
27
28
  attributes: {},
28
29
  data: {}
29
30
  },
30
- setup(r, { expose: s }) {
31
- const n = p(F), t = y(r), e = u();
31
+ setup(r, { expose: c }) {
32
+ const s = r, t = u(x), o = _(s), e = p();
32
33
  return m(() => {
33
34
  d(() => {
34
- e.value = new l(t.value), n.update(e.value);
35
+ e.value = new l(o.value), t.update(e.value);
35
36
  });
36
37
  }), f(() => {
37
- var o;
38
- (o = e.value) == null || o.destroy(), n.destroy();
39
- }), b(t, (o, a) => {
40
- var c;
41
- _(o, a) || (c = e.value) == null || c.setConfig(t.value);
42
- }), s({
38
+ e.value?.destroy(), t.destroy();
39
+ }), b(o, (n, a) => {
40
+ F(n, a) || (e.value?.setConfig(o.value), e.value?.render());
41
+ }), c({
43
42
  component: e
44
- }), (o, a) => (v(), x("div", O));
43
+ }), (n, a) => (y(), v("div", O));
45
44
  }
46
45
  });
47
46
  export {
48
- k as VisPlotbandSelectors,
49
- w as default
47
+ j as VisPlotbandSelectors,
48
+ k as default
50
49
  };
51
50
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/plotband/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Plotband, PlotbandConfigInterface } 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 = PlotbandConfigInterface<Datum>\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Plotband<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Plotband<Datum>(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 VisPlotbandSelectors = Plotband.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisPlotbandSelectors","Plotband","accessor","inject","componentAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCA+CaA,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;AAxCvC,UAAAC,IAAWC,EAAOC,CAAoB,GAQtCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAqB;AAGvC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAgBI,EAAO,KAAK,GAEzCH,EAAA,OAAOM,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKY,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUR,EAAO;AAAA,IACpC,CACD,GAGYa,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/plotband/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { PlotbandConfigInterface } from '@unovis/ts'\nimport { Plotband } from '@unovis/ts'\nimport { 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?: null }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = PlotbandConfigInterface<Datum>\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Plotband<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Plotband<Datum>(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 VisPlotbandSelectors = Plotband.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisPlotbandSelectors","Plotband","props","__props","accessor","inject","componentAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCA8CaA,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtC7C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAKtCC,IAASC,EAAgBN,CAAK,GAG9BO,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIR,EAAgBM,EAAO,KAAK,GAElDH,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,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),a=require("../../utils/props.cjs"),d=require("../../utils/context.cjs"),v={"data-vis-component":""},b=i.Plotline.selectors,f=e.defineComponent({__name:"index",props:{color:{},lineWidth:{},axis:{},value:{},duration:{},lineStyle:{},labelText:{},labelPosition:{},labelOffsetX:{},labelOffsetY:{},labelOrientation:{},labelColor:{},labelSize:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},events:{},attributes:{},data:{}},setup(r,{expose:u}){const l=e.inject(d.componentAccessorKey),p=r,n=a.useForwardProps(p),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new i.Plotline(n.value),l.update(t.value)})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy(),l.destroy()}),e.watch(n,(o,s)=>{var c;a.arePropsEqual(o,s)||(c=t.value)==null||c.setConfig(n.value)}),u({component:t}),(o,s)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisPlotlineSelectors=b;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@unovis/ts"),p=require("../../utils/context.cjs"),r=require("../../utils/props.cjs"),d={"data-vis-component":""},y=s.Plotline.selectors,b=e.defineComponent({__name:"index",props:{color:{},lineWidth:{},axis:{},value:{},duration:{},lineStyle:{},labelText:{},labelPosition:{},labelOffsetX:{},labelOffsetY:{},labelOrientation:{},labelColor:{},labelSize:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},events:{},attributes:{},data:{}},setup(a,{expose:i}){const u=a,n=e.inject(p.componentAccessorKey),o=r.useForwardProps(u),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new s.Plotline(o.value),n.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),n.destroy()}),e.watch(o,(l,c)=>{r.arePropsEqual(l,c)||(t.value?.setConfig(o.value),t.value?.render())}),i({component:t}),(l,c)=>(e.openBlock(),e.createElementBlock("div",d))}});exports.VisPlotlineSelectors=y;exports.default=b;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/plotline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Plotline, PlotlineConfigInterface } 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 = PlotlineConfigInterface<Datum>\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Plotline<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Plotline<Datum>(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 VisPlotlineSelectors = Plotline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisPlotlineSelectors","Plotline","accessor","inject","componentAccessorKey","props","__props","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PA+CaA,EAAuBC,EAAAA,SAAS,gaAxCvC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAIRC,EAASC,kBAAgBH,CAAK,EAG9BI,EAAYC,EAAAA,IAAqB,EAGvCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,WAAgBM,EAAO,KAAK,EAEzCL,EAAA,OAAOO,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDI,EAAAA,YAAY,IAAM,QAChBC,EAAAL,EAAU,QAAV,MAAAK,EAAiB,UACjBZ,EAAS,QAAQ,CAAA,CAClB,EAEKa,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAL,EAAA,QAAA,MAAAK,EAAO,UAAUP,EAAO,MACpC,CACD,EAGYY,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/plotline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { PlotlineConfigInterface } from '@unovis/ts'\nimport { Plotline } from '@unovis/ts'\nimport { 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?: null }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = PlotlineConfigInterface<Datum>\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Plotline<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Plotline<Datum>(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 VisPlotlineSelectors = Plotline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisPlotlineSelectors","Plotline","props","__props","accessor","inject","componentAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PA8CaA,EAAuBC,EAAAA,SAAS,yeAtC7C,MAAMC,EAAQC,EAERC,EAAWC,EAAAA,OAAOC,sBAAoB,EAKtCC,EAASC,EAAAA,gBAAgBN,CAAK,EAG9BO,EAAYC,EAAAA,IAAA,EAElBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACbH,EAAU,MAAQ,IAAIR,WAAgBM,EAAO,KAAK,EAElDH,EAAS,OAAOK,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBL,EAAS,QAAA,CACX,CAAC,EAEDU,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDS,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,71 +1,19 @@
1
- import { Plotline } from '@unovis/ts';
2
- export declare const VisPlotlineSelectors: typeof import("@unovis/ts/dist/components/plotline/style");
3
- declare const _default: <Datum>(__VLS_props: any, __VLS_ctx?: {
4
- attrs: any;
5
- emit: any;
6
- slots: any;
7
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
8
- props: {
9
- duration?: number;
10
- events?: {
11
- [selector: string]: {
12
- touchstart?: import("@unovis/ts").VisEventCallback<any>;
13
- touchmove?: import("@unovis/ts").VisEventCallback<any>;
14
- touchend?: import("@unovis/ts").VisEventCallback<any>;
15
- mouseover?: import("@unovis/ts").VisEventCallback<any>;
16
- mousemove?: import("@unovis/ts").VisEventCallback<any>;
17
- mousedown?: import("@unovis/ts").VisEventCallback<any>;
18
- mouseup?: import("@unovis/ts").VisEventCallback<any>;
19
- click?: import("@unovis/ts").VisEventCallback<any>;
20
- auxclick?: import("@unovis/ts").VisEventCallback<any>;
21
- contextmenu?: import("@unovis/ts").VisEventCallback<any>;
22
- dblclick?: import("@unovis/ts").VisEventCallback<any>;
23
- mouseenter?: import("@unovis/ts").VisEventCallback<any>;
24
- mouseleave?: import("@unovis/ts").VisEventCallback<any>;
25
- mouseout?: import("@unovis/ts").VisEventCallback<any>;
26
- scroll?: import("@unovis/ts").VisEventCallback<any>;
27
- select?: import("@unovis/ts").VisEventCallback<any>;
28
- wheel?: import("@unovis/ts").VisEventCallback<any>;
29
- pointerdown?: import("@unovis/ts").VisEventCallback<any>;
30
- pointerup?: import("@unovis/ts").VisEventCallback<any>;
31
- pointerout?: import("@unovis/ts").VisEventCallback<any>;
32
- pointermove?: import("@unovis/ts").VisEventCallback<any>;
33
- };
34
- };
35
- attributes?: {
36
- [selector: string]: {
37
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
38
- };
39
- };
1
+ import { PlotlineConfigInterface, Plotline } from '@unovis/ts';
2
+
3
+ export declare const VisPlotlineSelectors: typeof import("@unovis/ts/components/plotline/style");
4
+ declare const _default: <Datum>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (PlotlineConfigInterface<Datum> & {
40
6
  data?: null;
41
- x?: import("@unovis/ts").NumericAccessor<Datum>;
42
- y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
43
- color?: string;
44
- lineWidth?: number;
45
- id?: (d: Datum, i: number, ...any: any[]) => string;
46
- xScale?: import("@unovis/ts").ContinuousScale;
47
- yScale?: import("@unovis/ts").ContinuousScale;
48
- excludeFromDomainCalculation?: boolean;
49
- labelColor?: string;
50
- value?: number;
51
- axis?: string;
52
- labelText?: string;
53
- labelPosition?: import("@unovis/ts").PlotlineLabelPosition;
54
- labelOffsetX?: number;
55
- labelOffsetY?: number;
56
- labelOrientation?: import("@unovis/ts").PlotlineLabelOrientation;
57
- labelSize?: number;
58
- lineStyle?: number[] | import("@unovis/ts").PlotlineLineStylePresets;
59
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
60
- expose(exposed: import("vue").ShallowUnwrapRef<{
61
- component: import("vue").Ref<Plotline<Datum>, Plotline<Datum>>;
7
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{
9
+ component: import('vue').Ref<Plotline<Datum>, Plotline<Datum>>;
62
10
  }>): void;
63
11
  attrs: any;
64
- slots: {};
65
- emit: any;
66
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ slots: ReturnType<() => {}>;
13
+ emit: typeof __VLS_emit;
14
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
67
15
  [key: string]: any;
68
16
  }> & {
69
- __ctx?: any;
17
+ __ctx?: Awaited<typeof __VLS_setup>;
70
18
  };
71
19
  export default _default;
@@ -1,8 +1,8 @@
1
- import { defineComponent as r, inject as p, ref as u, onMounted as m, nextTick as d, onUnmounted as f, watch as b, createElementBlock as v, openBlock as x } from "vue";
2
- import { Plotline as c } from "@unovis/ts";
3
- import { useForwardProps as y, arePropsEqual as _ } from "../../utils/props.js";
4
- import { componentAccessorKey as F } from "../../utils/context.js";
5
- const O = { "data-vis-component": "" }, k = c.selectors, w = /* @__PURE__ */ r({
1
+ import { defineComponent as s, inject as u, ref as p, onMounted as m, nextTick as d, onUnmounted as f, watch as y, openBlock as b, createElementBlock as v } from "vue";
2
+ import { Plotline as a } from "@unovis/ts";
3
+ import { componentAccessorKey as x } from "../../utils/context.js";
4
+ import { useForwardProps as _, arePropsEqual as F } from "../../utils/props.js";
5
+ const O = { "data-vis-component": "" }, j = a.selectors, k = /* @__PURE__ */ s({
6
6
  __name: "index",
7
7
  props: {
8
8
  color: {},
@@ -18,9 +18,10 @@ const O = { "data-vis-component": "" }, k = c.selectors, w = /* @__PURE__ */ r({
18
18
  labelOrientation: {},
19
19
  labelColor: {},
20
20
  labelSize: {},
21
- x: {},
22
- y: {},
21
+ x: { type: [Function, Number, null] },
22
+ y: { type: [Function, Number, null, Array] },
23
23
  id: { type: Function },
24
+ colorKeys: {},
24
25
  xScale: { type: [Object, Function] },
25
26
  yScale: { type: [Object, Function] },
26
27
  excludeFromDomainCalculation: { type: Boolean },
@@ -28,25 +29,23 @@ const O = { "data-vis-component": "" }, k = c.selectors, w = /* @__PURE__ */ r({
28
29
  attributes: {},
29
30
  data: {}
30
31
  },
31
- setup(s, { expose: i }) {
32
- const n = p(F), t = y(s), e = u();
32
+ setup(r, { expose: c }) {
33
+ const i = r, t = u(x), o = _(i), e = p();
33
34
  return m(() => {
34
35
  d(() => {
35
- e.value = new c(t.value), n.update(e.value);
36
+ e.value = new a(o.value), t.update(e.value);
36
37
  });
37
38
  }), f(() => {
38
- var o;
39
- (o = e.value) == null || o.destroy(), n.destroy();
40
- }), b(t, (o, l) => {
41
- var a;
42
- _(o, l) || (a = e.value) == null || a.setConfig(t.value);
43
- }), i({
39
+ e.value?.destroy(), t.destroy();
40
+ }), y(o, (n, l) => {
41
+ F(n, l) || (e.value?.setConfig(o.value), e.value?.render());
42
+ }), c({
44
43
  component: e
45
- }), (o, l) => (x(), v("div", O));
44
+ }), (n, l) => (b(), v("div", O));
46
45
  }
47
46
  });
48
47
  export {
49
- k as VisPlotlineSelectors,
50
- w as default
48
+ j as VisPlotlineSelectors,
49
+ k as default
51
50
  };
52
51
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/plotline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Plotline, PlotlineConfigInterface } 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 = PlotlineConfigInterface<Datum>\nconst props = defineProps<Props & { data?: null }>()\n\n\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Plotline<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Plotline<Datum>(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 VisPlotlineSelectors = Plotline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisPlotlineSelectors","Plotline","accessor","inject","componentAccessorKey","config","useForwardProps","__props","component","ref","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCA+CaA,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;AAxCvC,UAAAC,IAAWC,EAAOC,CAAoB,GAQtCC,IAASC,EAJDC,CAIsB,GAG9BC,IAAYC,EAAqB;AAGvC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIP,EAAgBI,EAAO,KAAK,GAEzCH,EAAA,OAAOM,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDI,EAAY,MAAM;;AAChB,OAAAC,IAAAL,EAAU,UAAV,QAAAK,EAAiB,WACjBX,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKY,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAL,EAAA,UAAA,QAAAK,EAAO,UAAUR,EAAO;AAAA,IACpC,CACD,GAGYa,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/plotline/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { PlotlineConfigInterface } from '@unovis/ts'\nimport { Plotline } from '@unovis/ts'\nimport { 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?: null }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = PlotlineConfigInterface<Datum>\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Plotline<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Plotline<Datum>(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 VisPlotlineSelectors = Plotline.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisPlotlineSelectors","Plotline","props","__props","accessor","inject","componentAccessorKey","config","useForwardProps","component","ref","onMounted","nextTick","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCA8CaA,IAAuBC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtC7C,UAAMC,IAAQC,GAERC,IAAWC,EAAOC,CAAoB,GAKtCC,IAASC,EAAgBN,CAAK,GAG9BO,IAAYC,EAAA;AAElB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAAH,EAAU,QAAQ,IAAIR,EAAgBM,EAAO,KAAK,GAElDH,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,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@unovis/ts"),p=require("../../utils/context.cjs"),u=require("../../utils/props.cjs"),v={"data-vis-component":""},b=s.RadialBar.selectors,g=e.defineComponent({__name:"index",props:{id:{type:Function},value:{type:[Function,Number,null]},maxValue:{type:[Function,Number,null,Array]},angleRange:{},padAngle:{},barMinAngle:{},sortFunction:{type:Function},cornerRadius:{},color:{type:[Function,String,Array,null]},radius:{},trackWidth:{},trackPadding:{},reverseOrder:{type:Boolean},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},centralLabelOffsetX:{},centralLabelOffsetY:{},showBackground:{type:Boolean},backgroundAngleRange:{},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:d}){const r=i,a=e.inject(p.componentAccessorKey),n=e.computed(()=>a.data.value??r.data),o=u.useForwardProps(r),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new s.RadialBar(o.value),t.value?.setData(n.value),a.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),a.destroy()}),e.watch(o,(c,l)=>{u.arePropsEqual(c,l)||(t.value?.setConfig(o.value),t.value?.render())}),e.watch(n,()=>{t.value?.setData(n.value)}),d({component:t}),(c,l)=>(e.openBlock(),e.createElementBlock("div",v))}});exports.VisRadialBarSelectors=b;exports.default=g;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/radial-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { RadialBarConfigInterface } from '@unovis/ts'\nimport { RadialBar } 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 = RadialBarConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<RadialBar<Datum>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new RadialBar<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 VisRadialBarSelectors = RadialBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisRadialBarSelectors","RadialBar","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,EAAwBC,EAAAA,UAAU,wkBA3C/C,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,YAAiBQ,EAAO,KAAK,EACnDE,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"}