@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,69 +1,19 @@
1
- import { FreeBrush } from '@unovis/ts';
2
- export declare const VisFreeBrushSelectors: typeof import("@unovis/ts/dist/components/free-brush/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 { FreeBrushConfigInterface, FreeBrush } from '@unovis/ts';
2
+
3
+ export declare const VisFreeBrushSelectors: typeof import("@unovis/ts/components/free-brush/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>) & (FreeBrushConfigInterface<Datum> & {
40
6
  data?: Datum[];
41
- x?: import("@unovis/ts").NumericAccessor<Datum>;
42
- y?: import("@unovis/ts").NumericAccessor<Datum> | import("@unovis/ts").NumericAccessor<Datum>[];
43
- color?: string | string[] | ((d: Datum, i: number, ...any: unknown[]) => string) | ((d: Datum[], i: number, ...any: unknown[]) => 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
- onBrush?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
49
- onBrushStart?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
50
- onBrushMove?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
51
- onBrushEnd?: (selection: import("@unovis/ts").FreeBrushSelection, event: import("d3-brush").D3BrushEvent<unknown>, userDriven: boolean) => void;
52
- handleWidth?: number;
53
- selection?: import("@unovis/ts").FreeBrushSelection;
54
- selectionMinLength?: number | [number, number];
55
- mode?: import("@unovis/ts").FreeBrushMode;
56
- autoHide?: boolean;
57
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
58
- expose(exposed: import("vue").ShallowUnwrapRef<{
59
- component: import("vue").Ref<FreeBrush<Datum>, FreeBrush<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<FreeBrush<Datum>, FreeBrush<Datum>>;
60
10
  }>): void;
61
11
  attrs: any;
62
- slots: {};
63
- emit: any;
64
- }>) => 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, {
65
15
  [key: string]: any;
66
16
  }> & {
67
- __ctx?: any;
17
+ __ctx?: Awaited<typeof __VLS_setup>;
68
18
  };
69
19
  export default _default;
@@ -1,8 +1,8 @@
1
- import { defineComponent as d, inject as m, computed as v, ref as y, onMounted as h, nextTick as f, onUnmounted as F, watch as u, createElementBlock as B, openBlock as x } from "vue";
2
- import { FreeBrush as i } from "@unovis/ts";
3
- import { useForwardProps as _, arePropsEqual as S } from "../../utils/props.js";
4
- import { componentAccessorKey as b } from "../../utils/context.js";
5
- const g = { "data-vis-component": "" }, D = i.selectors, E = /* @__PURE__ */ d({
1
+ import { defineComponent as p, inject as d, computed as m, ref as y, onMounted as v, nextTick as F, onUnmounted as h, watch as u, openBlock as f, createElementBlock as B } from "vue";
2
+ import { FreeBrush as s } from "@unovis/ts";
3
+ import { componentAccessorKey as x } from "../../utils/context.js";
4
+ import { useForwardProps as _, arePropsEqual as b } from "../../utils/props.js";
5
+ const S = { "data-vis-component": "" }, A = s.selectors, C = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  mode: {},
@@ -14,10 +14,11 @@ const g = { "data-vis-component": "" }, D = i.selectors, E = /* @__PURE__ */ d({
14
14
  selection: {},
15
15
  selectionMinLength: {},
16
16
  autoHide: { type: Boolean },
17
- x: {},
18
- y: {},
17
+ x: { type: [Function, Number, null] },
18
+ y: { type: [Function, Number, null, Array] },
19
19
  id: { type: Function },
20
- color: {},
20
+ color: { type: [Function, String, Array, null] },
21
+ colorKeys: {},
21
22
  xScale: { type: [Object, Function] },
22
23
  yScale: { type: [Object, Function] },
23
24
  excludeFromDomainCalculation: { type: Boolean },
@@ -26,29 +27,25 @@ const g = { "data-vis-component": "" }, D = i.selectors, E = /* @__PURE__ */ d({
26
27
  attributes: {},
27
28
  data: {}
28
29
  },
29
- setup(l, { expose: p }) {
30
- const o = m(b), c = l, n = v(() => o.data.value ?? c.data), a = _(c), t = y();
31
- return h(() => {
32
- f(() => {
33
- var e;
34
- t.value = new i(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
30
+ setup(i, { expose: l }) {
31
+ const a = i, t = d(x), o = m(() => t.data.value ?? a.data), n = _(a), e = y();
32
+ return v(() => {
33
+ F(() => {
34
+ e.value = new s(n.value), e.value?.setData(o.value), t.update(e.value);
35
35
  });
36
- }), F(() => {
37
- var e;
38
- (e = t.value) == null || e.destroy(), o.destroy();
39
- }), u(a, (e, s) => {
40
- var r;
41
- S(e, s) || (r = t.value) == null || r.setConfig(a.value);
42
- }), u(n, () => {
43
- var e;
44
- (e = t.value) == null || e.setData(n.value);
45
- }), p({
46
- component: t
47
- }), (e, s) => (x(), B("div", g));
36
+ }), h(() => {
37
+ e.value?.destroy(), t.destroy();
38
+ }), u(n, (r, c) => {
39
+ b(r, c) || (e.value?.setConfig(n.value), e.value?.render());
40
+ }), u(o, () => {
41
+ e.value?.setData(o.value);
42
+ }), l({
43
+ component: e
44
+ }), (r, c) => (f(), B("div", S));
48
45
  }
49
46
  });
50
47
  export {
51
- D as VisFreeBrushSelectors,
52
- E as default
48
+ A as VisFreeBrushSelectors,
49
+ C as default
53
50
  };
54
51
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/free-brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { FreeBrush, FreeBrushConfigInterface } 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 = FreeBrushConfigInterface<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<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\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisFreeBrushSelectors = FreeBrush.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisFreeBrushSelectors","FreeBrush","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAwBC,EAAU;;;;;;;;;;;;;;;;;;;;;;;;;AA3CzC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAsB;AAGxC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAiBQ,EAAO,KAAK,IACzCM,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/free-brush/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { FreeBrushConfigInterface } from '@unovis/ts'\nimport { FreeBrush } 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 = FreeBrushConfigInterface<Datum>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<FreeBrush<Datum>>()\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 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 VisFreeBrushSelectors = FreeBrush.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisFreeBrushSelectors","FreeBrush","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,IAAwBC,EAAU;;;;;;;;;;;;;;;;;;;;;;;;;;AA3C/C,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,EAAiBQ,EAAO,KAAK,GACnDE,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 o=require("vue"),c=require("@unovis/ts"),r=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),S={"data-vis-component":""},m=c.Graph.selectors,F=o.defineComponent({__name:"index",props:{zoomScaleExtent:{},disableZoom:{type:Boolean},zoomEventFilter:{type:Function},disableDrag:{type:Boolean},disableBrush:{type:Boolean},zoomThrottledUpdateNodeThreshold:{},fitViewPadding:{},fitViewAlign:{},layoutType:{},layoutAutofit:{type:Boolean},layoutAutofitTolerance:{},layoutNonConnectedAside:{type:Boolean},layoutNodeGroup:{},layoutGroupOrder:{},layoutParallelNodesPerColumn:{},layoutParallelNodeSubGroup:{},layoutParallelSubGroupsPerRow:{},layoutParallelNodeSpacing:{},layoutParallelSubGroupSpacing:{},layoutParallelGroupSpacing:{},layoutParallelSortConnectionsByGroup:{},forceLayoutSettings:{},dagreLayoutSettings:{},layoutElkSettings:{},layoutElkNodeGroups:{},layoutElkGetNodeShape:{type:Function},linkWidth:{},linkStyle:{},linkBandWidth:{},linkArrow:{},linkStroke:{},linkDisabled:{},linkFlow:{},linkFlowAnimDuration:{},linkFlowParticleSize:{},linkFlowParticleSpeed:{},linkLabel:{},linkLabelShiftFromCenter:{},linkNeighborSpacing:{},linkCurvature:{},linkHighlightOnHover:{type:Boolean},linkSourcePointOffset:{},linkTargetPointOffset:{},selectedLinkId:{},nodeSize:{},nodeStrokeWidth:{},nodeShape:{},nodeGaugeValue:{},nodeGaugeFill:{},nodeGaugeAnimDuration:{},nodeIcon:{},nodeIconSize:{},nodeLabel:{},nodeLabelTrim:{},nodeLabelTrimMode:{},nodeLabelTrimLength:{},nodeSubLabel:{},nodeSubLabelTrim:{},nodeSubLabelTrimMode:{},nodeSubLabelTrimLength:{},nodeSideLabels:{},nodeBottomIcon:{},nodeDisabled:{},nodeFill:{},nodeStroke:{},nodeSort:{type:Function},nodeEnterPosition:{},nodeEnterScale:{},nodeExitPosition:{},nodeExitScale:{},nodeEnterCustomRenderFunction:{type:Function},nodeUpdateCustomRenderFunction:{type:Function},nodePartialUpdateCustomRenderFunction:{type:Function},nodeExitCustomRenderFunction:{type:Function},nodeOnZoomCustomRenderFunction:{type:Function},nodeSelectionHighlightMode:{},selectedNodeId:{},selectedNodeIds:{},panels:{},onNodeDragStart:{type:Function},onNodeDrag:{type:Function},onNodeDragEnd:{type:Function},onZoom:{type:Function},onZoomStart:{type:Function},onZoomEnd:{type:Function},onLayoutCalculated:{type:Function},onNodeSelectionBrush:{type:Function},onNodeSelectionDrag:{type:Function},onRenderComplete:{type:Function},shouldDataUpdate:{type:Function},duration:{},events:{},attributes:{},data:{}},setup(s,{expose:p}){const n=o.inject(y.componentAccessorKey),i=s,a=o.computed(()=>n.data.value??i.data),l=r.useForwardProps(i),t=o.ref();return o.onMounted(()=>{o.nextTick(()=>{var e;t.value=new c.Graph(l.value),(e=t.value)==null||e.setData(a.value),n.update(t.value)})}),o.onUnmounted(()=>{var e;(e=t.value)==null||e.destroy(),n.destroy()}),o.watch(l,(e,u)=>{var d;r.arePropsEqual(e,u)||(d=t.value)==null||d.setConfig(l.value)}),o.watch(a,()=>{var e;(e=t.value)==null||e.setData(a.value)}),p({component:t}),(e,u)=>(o.openBlock(),o.createElementBlock("div",S))}});exports.VisGraphSelectors=m;exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),c=require("@unovis/ts"),y=require("../../utils/context.cjs"),r=require("../../utils/props.cjs"),F={"data-vis-component":""},s=c.Graph.selectors,S=n.defineComponent({__name:"index",props:{zoomScaleExtent:{},disableZoom:{type:Boolean},zoomEventFilter:{type:Function},disableDrag:{type:Boolean},disableBrush:{type:Boolean},zoomThrottledUpdateNodeThreshold:{},fitViewPadding:{},fitViewAlign:{},layoutType:{},layoutAutofit:{type:Boolean},layoutAutofitTolerance:{},layoutNonConnectedAside:{type:Boolean},layoutNodeGroup:{type:[Function,String,null]},layoutGroupOrder:{},layoutParallelNodesPerColumn:{},layoutParallelNodeSubGroup:{type:[Function,String,null]},layoutParallelSubGroupsPerRow:{},layoutParallelNodeSpacing:{},layoutParallelSubGroupSpacing:{},layoutParallelGroupSpacing:{},layoutParallelSortConnectionsByGroup:{},forceLayoutSettings:{},dagreLayoutSettings:{},layoutElkSettings:{type:[Function,null]},layoutElkNodeGroups:{},layoutElkGetNodeShape:{type:Function},linkWidth:{type:[Function,Number,null]},linkStyle:{type:[Function,null]},linkBandWidth:{type:[Function,Number,null]},linkArrow:{type:[Function,String,Boolean,null]},linkStroke:{type:[Function,String,Array,null]},linkDisabled:{type:[Function,Boolean,null]},linkFlow:{type:[Function,Boolean,null]},linkFlowAnimDuration:{type:[Function,Number,null]},linkFlowParticleSize:{type:[Function,Number,null]},linkFlowParticleSpeed:{type:[Function,Number,null]},linkLabel:{type:[Function,Array,null]},linkLabelShiftFromCenter:{type:[Function,Boolean,null]},linkNeighborSpacing:{},linkCurvature:{type:[Function,Number,null]},linkHighlightOnHover:{type:Boolean},linkSourcePointOffset:{type:[Function,Array,null]},linkTargetPointOffset:{type:[Function,Array,null]},selectedLinkId:{},nodeSize:{type:[Function,Number,null]},nodeStrokeWidth:{type:[Function,Number,null]},nodeShape:{type:[Function,String,null]},nodeGaugeValue:{type:[Function,Number,null]},nodeGaugeFill:{type:[Function,String,Array,null]},nodeGaugeAnimDuration:{},nodeIcon:{type:[Function,String,null]},nodeIconSize:{type:[Function,Number,null]},nodeLabel:{type:[Function,String,null]},nodeLabelTrim:{type:[Function,Boolean,null]},nodeLabelTrimMode:{type:[Function,String,null]},nodeLabelTrimLength:{type:[Function,Number,null]},nodeLabelFitMode:{type:[Function,String,null]},nodeLabelWidth:{type:[Function,Number,null]},nodeLabelSeparator:{},nodeLabelForceWordBreak:{type:Boolean},nodeSubLabel:{type:[Function,String,null]},nodeSubLabelTrim:{type:[Function,Boolean,null]},nodeSubLabelTrimMode:{type:[Function,String,null]},nodeSubLabelTrimLength:{type:[Function,Number,null]},nodeSubLabelFitMode:{type:[Function,String,null]},nodeSubLabelWidth:{type:[Function,Number,null]},nodeSubLabelSeparator:{},nodeSubLabelForceWordBreak:{type:Boolean},nodeSideLabels:{type:[Function,Array,null]},nodeBottomIcon:{type:[Function,String,null]},nodeDisabled:{type:[Function,Boolean,null]},nodeFill:{type:[Function,String,Array,null]},nodeStroke:{type:[Function,String,Array,null]},nodeSort:{type:Function},nodeEnterPosition:{type:[Function,Array,null]},nodeEnterScale:{type:[Function,Number,null]},nodeExitPosition:{type:[Function,Array,null]},nodeExitScale:{type:[Function,Number,null]},nodeEnterCustomRenderFunction:{type:Function},nodeUpdateCustomRenderFunction:{type:Function},nodePartialUpdateCustomRenderFunction:{type:Function},nodeExitCustomRenderFunction:{type:Function},nodeOnZoomCustomRenderFunction:{type:Function},nodeSelectionHighlightMode:{},selectedNodeId:{},selectedNodeIds:{},panels:{},onNodeDragStart:{type:Function},onNodeDrag:{type:Function},onNodeDragEnd:{type:Function},onZoom:{type:Function},onZoomStart:{type:Function},onZoomEnd:{type:Function},onLayoutCalculated:{type:Function},onNodeSelectionBrush:{type:Function},onNodeSelectionDrag:{type:Function},onRenderComplete:{type:Function},shouldDataUpdate:{type:Function},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const u=d,t=n.inject(y.componentAccessorKey),o=n.computed(()=>t.data.value??u.data),l=r.useForwardProps(u),e=n.ref();return n.onMounted(()=>{n.nextTick(()=>{e.value=new c.Graph(l.value),e.value?.setData(o.value),t.update(e.value)})}),n.onUnmounted(()=>{e.value?.destroy(),t.destroy()}),n.watch(l,(i,a)=>{r.arePropsEqual(i,a)||(e.value?.setConfig(l.value),e.value?.render())}),n.watch(o,()=>{e.value?.setData(o.value)}),p({component:e}),(i,a)=>(n.openBlock(),n.createElementBlock("div",F))}});exports.VisGraphSelectors=s;exports.default=S;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode,L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } 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 = GraphConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Graph<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Graph<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisGraphSelectors = Graph.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGraphSelectors","Graph","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAoBC,EAAAA,MAAM,kwEA3CjC,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,QAAYQ,EAAO,KAAK,GACpCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode, L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { GraphConfigInterface, GraphInputLink, GraphInputNode } from '@unovis/ts'\nimport { Graph } 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?: { nodes: N[], links?: L[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = GraphConfigInterface<N, L>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Graph<N, L>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Graph<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 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 VisGraphSelectors = Graph.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisGraphSelectors","Graph","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,EAAoBC,EAAAA,MAAM,gsHA3CvC,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,QAAYQ,EAAO,KAAK,EAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,EACnCH,EAAS,OAAOO,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDI,EAAAA,YAAY,IAAM,CAChBJ,EAAU,OAAO,QAAA,EACjBP,EAAS,QAAA,CACX,CAAC,EAEDY,EAAAA,MAAMP,EAAQ,CAACQ,EAAMC,IAAS,CACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,EACvCE,EAAU,OAAO,OAAA,EAErB,CAAC,EAEDK,EAAAA,MAAMT,EAAM,IAAM,CAChBI,EAAU,OAAO,QAAQJ,EAAK,KAAK,CACrC,CAAC,EAEDa,EAAa,CACX,UAAAT,CAAA,CACD,UAQCU,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,4 +1,5 @@
1
- import { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } from '@unovis/ts';
1
+ import { GraphConfigInterface, GraphInputLink, GraphInputNode, Graph } from '@unovis/ts';
2
+
2
3
  export declare const VisGraphSelectors: {
3
4
  root: string;
4
5
  graphGroup: string;
@@ -22,147 +23,22 @@ export declare const VisGraphSelectors: {
22
23
  panelSideIconShape: string;
23
24
  panelSideIconSymbol: string;
24
25
  };
25
- declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__VLS_props: any, __VLS_ctx?: {
26
- attrs: any;
27
- emit: any;
28
- slots: any;
29
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
30
- props: {
31
- duration?: number;
32
- events?: {
33
- [selector: string]: {
34
- touchstart?: import("@unovis/ts").VisEventCallback<any>;
35
- touchmove?: import("@unovis/ts").VisEventCallback<any>;
36
- touchend?: import("@unovis/ts").VisEventCallback<any>;
37
- mouseover?: import("@unovis/ts").VisEventCallback<any>;
38
- mousemove?: import("@unovis/ts").VisEventCallback<any>;
39
- mousedown?: import("@unovis/ts").VisEventCallback<any>;
40
- mouseup?: import("@unovis/ts").VisEventCallback<any>;
41
- click?: import("@unovis/ts").VisEventCallback<any>;
42
- auxclick?: import("@unovis/ts").VisEventCallback<any>;
43
- contextmenu?: import("@unovis/ts").VisEventCallback<any>;
44
- dblclick?: import("@unovis/ts").VisEventCallback<any>;
45
- mouseenter?: import("@unovis/ts").VisEventCallback<any>;
46
- mouseleave?: import("@unovis/ts").VisEventCallback<any>;
47
- mouseout?: import("@unovis/ts").VisEventCallback<any>;
48
- scroll?: import("@unovis/ts").VisEventCallback<any>;
49
- select?: import("@unovis/ts").VisEventCallback<any>;
50
- wheel?: import("@unovis/ts").VisEventCallback<any>;
51
- pointerdown?: import("@unovis/ts").VisEventCallback<any>;
52
- pointerup?: import("@unovis/ts").VisEventCallback<any>;
53
- pointerout?: import("@unovis/ts").VisEventCallback<any>;
54
- pointermove?: import("@unovis/ts").VisEventCallback<any>;
55
- };
56
- };
57
- attributes?: {
58
- [selector: string]: {
59
- [attr: string]: string | number | boolean | ((datum: any) => string | number | boolean);
60
- };
61
- };
26
+ declare const _default: <N extends GraphInputNode, L extends GraphInputLink>(__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<{
27
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (GraphConfigInterface<N, L> & {
62
28
  data?: {
63
29
  nodes: N[];
64
30
  links?: L[];
65
31
  };
66
- nodeLabel?: import("@unovis/ts").StringAccessor<N>;
67
- zoomScaleExtent?: [number, number];
68
- disableZoom?: boolean;
69
- zoomEventFilter?: (event: PointerEvent) => boolean;
70
- disableDrag?: boolean;
71
- disableBrush?: boolean;
72
- zoomThrottledUpdateNodeThreshold?: number;
73
- fitViewPadding?: number | import("@unovis/ts").Spacing;
74
- fitViewAlign?: import("@unovis/ts").GraphFitViewAlignment;
75
- layoutType?: string;
76
- layoutAutofit?: boolean;
77
- layoutAutofitTolerance?: number;
78
- layoutNonConnectedAside?: boolean;
79
- layoutNodeGroup?: import("@unovis/ts").StringAccessor<N>;
80
- layoutGroupOrder?: string[];
81
- layoutParallelNodesPerColumn?: number;
82
- layoutParallelNodeSubGroup?: import("@unovis/ts").StringAccessor<N>;
83
- layoutParallelSubGroupsPerRow?: number;
84
- layoutParallelNodeSpacing?: number | [number, number];
85
- layoutParallelSubGroupSpacing?: number;
86
- layoutParallelGroupSpacing?: number;
87
- layoutParallelSortConnectionsByGroup?: string;
88
- forceLayoutSettings?: import("@unovis/ts").GraphForceLayoutSettings<N, L>;
89
- dagreLayoutSettings?: import("@unovis/ts").GraphDagreLayoutSetting;
90
- layoutElkSettings?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphElkLayoutSettings, string>;
91
- layoutElkNodeGroups?: import("@unovis/ts").StringAccessor<N>[];
92
- layoutElkGetNodeShape?: (d: import("@unovis/ts").GraphNode<N, L>, i: number) => import("elkjs").ElkShape;
93
- linkWidth?: import("@unovis/ts").NumericAccessor<L>;
94
- linkStyle?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphLinkStyle, L>;
95
- linkBandWidth?: import("@unovis/ts").NumericAccessor<L>;
96
- linkArrow?: import("@unovis/ts").GenericAccessor<string | boolean, L>;
97
- linkStroke?: import("@unovis/ts").ColorAccessor<L>;
98
- linkDisabled?: import("@unovis/ts").BooleanAccessor<L>;
99
- linkFlow?: import("@unovis/ts").BooleanAccessor<L>;
100
- linkFlowAnimDuration?: import("@unovis/ts").NumericAccessor<L>;
101
- linkFlowParticleSize?: import("@unovis/ts").NumericAccessor<L>;
102
- linkFlowParticleSpeed?: import("@unovis/ts").NumericAccessor<L>;
103
- linkLabel?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphCircleLabel | import("@unovis/ts").GraphCircleLabel[], L>;
104
- linkLabelShiftFromCenter?: import("@unovis/ts").BooleanAccessor<L>;
105
- linkNeighborSpacing?: number;
106
- linkCurvature?: import("@unovis/ts").NumericAccessor<L>;
107
- linkHighlightOnHover?: boolean;
108
- linkSourcePointOffset?: import("@unovis/ts").GenericAccessor<[number, number], import("@unovis/ts").GraphLink<N, L>>;
109
- linkTargetPointOffset?: import("@unovis/ts").GenericAccessor<[number, number], import("@unovis/ts").GraphLink<N, L>>;
110
- selectedLinkId?: string | number;
111
- nodeSize?: import("@unovis/ts").NumericAccessor<N>;
112
- nodeStrokeWidth?: import("@unovis/ts").NumericAccessor<N>;
113
- nodeShape?: import("@unovis/ts").GenericAccessor<string, N>;
114
- nodeGaugeValue?: import("@unovis/ts").NumericAccessor<N>;
115
- nodeGaugeFill?: import("@unovis/ts").ColorAccessor<N>;
116
- nodeGaugeAnimDuration?: number;
117
- nodeIcon?: import("@unovis/ts").StringAccessor<N>;
118
- nodeIconSize?: import("@unovis/ts").NumericAccessor<N>;
119
- nodeLabelTrim?: import("@unovis/ts").BooleanAccessor<N>;
120
- nodeLabelTrimMode?: import("@unovis/ts").GenericAccessor<string, N>;
121
- nodeLabelTrimLength?: import("@unovis/ts").NumericAccessor<N>;
122
- nodeSubLabel?: import("@unovis/ts").StringAccessor<N>;
123
- nodeSubLabelTrim?: import("@unovis/ts").BooleanAccessor<N>;
124
- nodeSubLabelTrimMode?: import("@unovis/ts").GenericAccessor<string, N>;
125
- nodeSubLabelTrimLength?: import("@unovis/ts").NumericAccessor<N>;
126
- nodeSideLabels?: import("@unovis/ts").GenericAccessor<import("@unovis/ts").GraphCircleLabel[], N>;
127
- nodeBottomIcon?: import("@unovis/ts").StringAccessor<N>;
128
- nodeDisabled?: import("@unovis/ts").BooleanAccessor<N>;
129
- nodeFill?: import("@unovis/ts").ColorAccessor<N>;
130
- nodeStroke?: import("@unovis/ts").ColorAccessor<N>;
131
- nodeSort?: (a: N, b: N) => number;
132
- nodeEnterPosition?: import("@unovis/ts").GenericAccessor<[number, number], N>;
133
- nodeEnterScale?: import("@unovis/ts").NumericAccessor<N>;
134
- nodeExitPosition?: import("@unovis/ts").GenericAccessor<[number, number], N>;
135
- nodeExitScale?: import("@unovis/ts").NumericAccessor<N>;
136
- nodeEnterCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;
137
- nodeUpdateCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;
138
- nodePartialUpdateCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;
139
- nodeExitCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;
140
- nodeOnZoomCustomRenderFunction?: (datum: import("@unovis/ts").GraphNode<N, L>, nodeGroupElementSelection: import("d3-selection").Selection<SVGGElement, import("@unovis/ts").GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, zoomLevel: number) => void;
141
- nodeSelectionHighlightMode?: import("@unovis/ts").GraphNodeSelectionHighlightMode;
142
- selectedNodeId?: string | number;
143
- selectedNodeIds?: string[] | number[];
144
- panels?: import("@unovis/ts").GraphPanelConfig[];
145
- onNodeDragStart?: (n: import("@unovis/ts").GraphNode<N, L>, event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
146
- onNodeDrag?: (n: import("@unovis/ts").GraphNode<N, L>, event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
147
- onNodeDragEnd?: (n: import("@unovis/ts").GraphNode<N, L>, event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
148
- onZoom?: (zoomScale: number, zoomScaleExtent: [number, number], event: import("d3-zoom").D3ZoomEvent<SVGGElement, unknown>, transform: import("d3-zoom").ZoomTransform) => void;
149
- onZoomStart?: (zoomScale: number, zoomScaleExtent: [number, number], event: import("d3-zoom").D3ZoomEvent<SVGGElement, unknown>, transform: import("d3-zoom").ZoomTransform) => void;
150
- onZoomEnd?: (zoomScale: number, zoomScaleExtent: [number, number], event: import("d3-zoom").D3ZoomEvent<SVGGElement, unknown>, transform: import("d3-zoom").ZoomTransform) => void;
151
- onLayoutCalculated?: (nodes: import("@unovis/ts").GraphNode<N, L>[], links: import("@unovis/ts").GraphLink<N, L>[]) => void;
152
- onNodeSelectionBrush?: (selectedNodes: import("@unovis/ts").GraphNode<N, L>[], event: import("d3-brush").D3BrushEvent<SVGGElement>) => void;
153
- onNodeSelectionDrag?: (selectedNodes: import("@unovis/ts").GraphNode<N, L>[], event: import("d3-drag").D3DragEvent<SVGGElement, import("@unovis/ts").GraphNode<N, L>, unknown>) => void;
154
- onRenderComplete?: (g: import("d3-selection").Selection<SVGGElement, unknown, null, undefined>, nodes: import("@unovis/ts").GraphNode<N, L>[], links: import("@unovis/ts").GraphLink<N, L>[], config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number, width: number, height: number) => void;
155
- shouldDataUpdate?: (prevData: import("@unovis/ts").GraphInputData<N, L>, nextData: import("@unovis/ts").GraphInputData<N, L>, datamodel: import("@unovis/ts").GraphDataModel<N, L, import("@unovis/ts").GraphNode<N, L>, import("@unovis/ts").GraphLink<N, L>>) => boolean;
156
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
157
- expose(exposed: import("vue").ShallowUnwrapRef<{
158
- component: import("vue").Ref<Graph<N, L>, Graph<N, L>>;
32
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
33
+ expose(exposed: import('vue').ShallowUnwrapRef<{
34
+ component: import('vue').Ref<Graph<N, L>, Graph<N, L>>;
159
35
  }>): void;
160
36
  attrs: any;
161
- slots: {};
162
- emit: any;
163
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
37
+ slots: ReturnType<() => {}>;
38
+ emit: typeof __VLS_emit;
39
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
164
40
  [key: string]: any;
165
41
  }> & {
166
- __ctx?: any;
42
+ __ctx?: Awaited<typeof __VLS_setup>;
167
43
  };
168
44
  export default _default;
@@ -1,8 +1,8 @@
1
- import { defineComponent as s, inject as y, computed as m, ref as S, onMounted as F, nextTick as g, onUnmounted as k, watch as u, createElementBlock as b, openBlock as h } from "vue";
1
+ import { defineComponent as p, inject as y, computed as F, ref as s, onMounted as S, nextTick as m, onUnmounted as b, watch as a, openBlock as g, createElementBlock as N } from "vue";
2
2
  import { Graph as r } from "@unovis/ts";
3
- import { useForwardProps as f, arePropsEqual as P } from "../../utils/props.js";
4
- import { componentAccessorKey as v } from "../../utils/context.js";
5
- const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
3
+ import { componentAccessorKey as k } from "../../utils/context.js";
4
+ import { useForwardProps as h, arePropsEqual as L } from "../../utils/props.js";
5
+ const B = { "data-vis-component": "" }, E = r.selectors, C = /* @__PURE__ */ p({
6
6
  __name: "index",
7
7
  props: {
8
8
  zoomScaleExtent: {},
@@ -17,10 +17,10 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
17
17
  layoutAutofit: { type: Boolean },
18
18
  layoutAutofitTolerance: {},
19
19
  layoutNonConnectedAside: { type: Boolean },
20
- layoutNodeGroup: {},
20
+ layoutNodeGroup: { type: [Function, String, null] },
21
21
  layoutGroupOrder: {},
22
22
  layoutParallelNodesPerColumn: {},
23
- layoutParallelNodeSubGroup: {},
23
+ layoutParallelNodeSubGroup: { type: [Function, String, null] },
24
24
  layoutParallelSubGroupsPerRow: {},
25
25
  layoutParallelNodeSpacing: {},
26
26
  layoutParallelSubGroupSpacing: {},
@@ -28,53 +28,61 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
28
28
  layoutParallelSortConnectionsByGroup: {},
29
29
  forceLayoutSettings: {},
30
30
  dagreLayoutSettings: {},
31
- layoutElkSettings: {},
31
+ layoutElkSettings: { type: [Function, null] },
32
32
  layoutElkNodeGroups: {},
33
33
  layoutElkGetNodeShape: { type: Function },
34
- linkWidth: {},
35
- linkStyle: {},
36
- linkBandWidth: {},
37
- linkArrow: {},
38
- linkStroke: {},
39
- linkDisabled: {},
40
- linkFlow: {},
41
- linkFlowAnimDuration: {},
42
- linkFlowParticleSize: {},
43
- linkFlowParticleSpeed: {},
44
- linkLabel: {},
45
- linkLabelShiftFromCenter: {},
34
+ linkWidth: { type: [Function, Number, null] },
35
+ linkStyle: { type: [Function, null] },
36
+ linkBandWidth: { type: [Function, Number, null] },
37
+ linkArrow: { type: [Function, String, Boolean, null] },
38
+ linkStroke: { type: [Function, String, Array, null] },
39
+ linkDisabled: { type: [Function, Boolean, null] },
40
+ linkFlow: { type: [Function, Boolean, null] },
41
+ linkFlowAnimDuration: { type: [Function, Number, null] },
42
+ linkFlowParticleSize: { type: [Function, Number, null] },
43
+ linkFlowParticleSpeed: { type: [Function, Number, null] },
44
+ linkLabel: { type: [Function, Array, null] },
45
+ linkLabelShiftFromCenter: { type: [Function, Boolean, null] },
46
46
  linkNeighborSpacing: {},
47
- linkCurvature: {},
47
+ linkCurvature: { type: [Function, Number, null] },
48
48
  linkHighlightOnHover: { type: Boolean },
49
- linkSourcePointOffset: {},
50
- linkTargetPointOffset: {},
49
+ linkSourcePointOffset: { type: [Function, Array, null] },
50
+ linkTargetPointOffset: { type: [Function, Array, null] },
51
51
  selectedLinkId: {},
52
- nodeSize: {},
53
- nodeStrokeWidth: {},
54
- nodeShape: {},
55
- nodeGaugeValue: {},
56
- nodeGaugeFill: {},
52
+ nodeSize: { type: [Function, Number, null] },
53
+ nodeStrokeWidth: { type: [Function, Number, null] },
54
+ nodeShape: { type: [Function, String, null] },
55
+ nodeGaugeValue: { type: [Function, Number, null] },
56
+ nodeGaugeFill: { type: [Function, String, Array, null] },
57
57
  nodeGaugeAnimDuration: {},
58
- nodeIcon: {},
59
- nodeIconSize: {},
60
- nodeLabel: {},
61
- nodeLabelTrim: {},
62
- nodeLabelTrimMode: {},
63
- nodeLabelTrimLength: {},
64
- nodeSubLabel: {},
65
- nodeSubLabelTrim: {},
66
- nodeSubLabelTrimMode: {},
67
- nodeSubLabelTrimLength: {},
68
- nodeSideLabels: {},
69
- nodeBottomIcon: {},
70
- nodeDisabled: {},
71
- nodeFill: {},
72
- nodeStroke: {},
58
+ nodeIcon: { type: [Function, String, null] },
59
+ nodeIconSize: { type: [Function, Number, null] },
60
+ nodeLabel: { type: [Function, String, null] },
61
+ nodeLabelTrim: { type: [Function, Boolean, null] },
62
+ nodeLabelTrimMode: { type: [Function, String, null] },
63
+ nodeLabelTrimLength: { type: [Function, Number, null] },
64
+ nodeLabelFitMode: { type: [Function, String, null] },
65
+ nodeLabelWidth: { type: [Function, Number, null] },
66
+ nodeLabelSeparator: {},
67
+ nodeLabelForceWordBreak: { type: Boolean },
68
+ nodeSubLabel: { type: [Function, String, null] },
69
+ nodeSubLabelTrim: { type: [Function, Boolean, null] },
70
+ nodeSubLabelTrimMode: { type: [Function, String, null] },
71
+ nodeSubLabelTrimLength: { type: [Function, Number, null] },
72
+ nodeSubLabelFitMode: { type: [Function, String, null] },
73
+ nodeSubLabelWidth: { type: [Function, Number, null] },
74
+ nodeSubLabelSeparator: {},
75
+ nodeSubLabelForceWordBreak: { type: Boolean },
76
+ nodeSideLabels: { type: [Function, Array, null] },
77
+ nodeBottomIcon: { type: [Function, String, null] },
78
+ nodeDisabled: { type: [Function, Boolean, null] },
79
+ nodeFill: { type: [Function, String, Array, null] },
80
+ nodeStroke: { type: [Function, String, Array, null] },
73
81
  nodeSort: { type: Function },
74
- nodeEnterPosition: {},
75
- nodeEnterScale: {},
76
- nodeExitPosition: {},
77
- nodeExitScale: {},
82
+ nodeEnterPosition: { type: [Function, Array, null] },
83
+ nodeEnterScale: { type: [Function, Number, null] },
84
+ nodeExitPosition: { type: [Function, Array, null] },
85
+ nodeExitScale: { type: [Function, Number, null] },
78
86
  nodeEnterCustomRenderFunction: { type: Function },
79
87
  nodeUpdateCustomRenderFunction: { type: Function },
80
88
  nodePartialUpdateCustomRenderFunction: { type: Function },
@@ -100,29 +108,25 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
100
108
  attributes: {},
101
109
  data: {}
102
110
  },
103
- setup(c, { expose: p }) {
104
- const n = y(v), l = c, t = m(() => n.data.value ?? l.data), a = f(l), o = S();
105
- return F(() => {
106
- g(() => {
107
- var e;
108
- o.value = new r(a.value), (e = o.value) == null || e.setData(t.value), n.update(o.value);
111
+ setup(c, { expose: d }) {
112
+ const l = c, e = y(k), o = F(() => e.data.value ?? l.data), t = h(l), n = s();
113
+ return S(() => {
114
+ m(() => {
115
+ n.value = new r(t.value), n.value?.setData(o.value), e.update(n.value);
109
116
  });
110
- }), k(() => {
111
- var e;
112
- (e = o.value) == null || e.destroy(), n.destroy();
113
- }), u(a, (e, i) => {
114
- var d;
115
- P(e, i) || (d = o.value) == null || d.setConfig(a.value);
116
- }), u(t, () => {
117
- var e;
118
- (e = o.value) == null || e.setData(t.value);
119
- }), p({
120
- component: o
121
- }), (e, i) => (h(), b("div", L));
117
+ }), b(() => {
118
+ n.value?.destroy(), e.destroy();
119
+ }), a(t, (u, i) => {
120
+ L(u, i) || (n.value?.setConfig(t.value), n.value?.render());
121
+ }), a(o, () => {
122
+ n.value?.setData(o.value);
123
+ }), d({
124
+ component: n
125
+ }), (u, i) => (g(), N("div", B));
122
126
  }
123
127
  });
124
128
  export {
125
- B as VisGraphSelectors,
126
- D as default
129
+ E as VisGraphSelectors,
130
+ C as default
127
131
  };
128
132
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode,L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Graph, GraphConfigInterface, GraphInputNode, GraphInputLink } 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 = GraphConfigInterface<N, L>\nconst props = defineProps<Props & { data?: { nodes: N[]; links?: L[] } }>()\n\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Graph<N, L>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Graph<N, L>(config.value)\n component.value?.setData(data.value)\n accessor.update(component.value)\n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n accessor.destroy()\n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\nwatch(data, () => {\n component.value?.setData(data.value)\n})\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisGraphSelectors = Graph.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGraphSelectors","Graph","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CjC,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IACpCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/graph/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"N extends GraphInputNode, L extends GraphInputLink\">\n// !!! This code was automatically generated. You should not change it !!!\nimport type { GraphConfigInterface, GraphInputLink, GraphInputNode } from '@unovis/ts'\nimport { Graph } 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?: { nodes: N[], links?: L[] } }>()\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props\ntype Props = GraphConfigInterface<N, L>\nconst data = computed(() => accessor.data.value ?? props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<Graph<N, L>>()\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Graph<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 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 VisGraphSelectors = Graph.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n"],"names":["VisGraphSelectors","Graph","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,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CvC,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,EAAYQ,EAAO,KAAK,GAC9CE,EAAU,OAAO,QAAQJ,EAAK,KAAK,GACnCH,EAAS,OAAOO,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDI,EAAY,MAAM;AAChB,MAAAJ,EAAU,OAAO,QAAA,GACjBP,EAAS,QAAA;AAAA,IACX,CAAC,GAEDY,EAAMP,GAAQ,CAACQ,GAAMC,MAAS;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BP,EAAU,OAAO,UAAUF,EAAO,KAAK,GACvCE,EAAU,OAAO,OAAA;AAAA,IAErB,CAAC,GAEDK,EAAMT,GAAM,MAAM;AAChB,MAAAI,EAAU,OAAO,QAAQJ,EAAK,KAAK;AAAA,IACrC,CAAC,GAEDa,EAAa;AAAA,MACX,WAAAT;AAAA,IAAA,CACD,cAQCU,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),d=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),m={"data-vis-component":""},y=d.GroupedBar.selectors,g=t.defineComponent({__name:"index",props:{color:{},groupWidth:{},groupMaxWidth:{},dataStep:{},groupPadding:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},barMinHeight:{},cursor:{},orientation:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(l,{expose:p}){const a=t.inject(v.componentAccessorKey),c=l,n=t.computed(()=>a.data.value??c.data),r=i.useForwardProps(c),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new d.GroupedBar(r.value),(e=o.value)==null||e.setData(n.value),a.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),a.destroy()}),t.watch(r,(e,u)=>{var s;i.arePropsEqual(e,u)||(s=o.value)==null||s.setConfig(r.value)}),t.watch(n,()=>{var e;(e=o.value)==null||e.setData(n.value)}),p({component:o}),(e,u)=>(t.openBlock(),t.createElementBlock("div",m))}});exports.VisGroupedBarSelectors=y;exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("@unovis/ts"),d=require("../../utils/context.cjs"),s=require("../../utils/props.cjs"),y={"data-vis-component":""},v=l.GroupedBar.selectors,m=e.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},barStyle:{type:[Function,null]},groupWidth:{},groupMaxWidth:{},dataStep:{},groupPadding:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},barMinHeight:{},cursor:{type:[Function,String,null]},orientation:{},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},duration:{},events:{},attributes:{},data:{}},setup(i,{expose:p}){const a=i,o=e.inject(d.componentAccessorKey),n=e.computed(()=>o.data.value??a.data),r=s.useForwardProps(a),t=e.ref();return e.onMounted(()=>{e.nextTick(()=>{t.value=new l.GroupedBar(r.value),t.value?.setData(n.value),o.update(t.value)})}),e.onUnmounted(()=>{t.value?.destroy(),o.destroy()}),e.watch(r,(u,c)=>{s.arePropsEqual(u,c)||(t.value?.setConfig(r.value),t.value?.render())}),e.watch(n,()=>{t.value?.setData(n.value)}),p({component:t}),(u,c)=>(e.openBlock(),e.createElementBlock("div",y))}});exports.VisGroupedBarSelectors=v;exports.default=m;
2
2
  //# sourceMappingURL=index.cjs.map