@unovis/vue 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/components/annotations/index.cjs.map +1 -1
  2. package/components/annotations/index.d.ts +18 -94
  3. package/components/annotations/index.js.map +1 -1
  4. package/components/area/index.cjs +1 -1
  5. package/components/area/index.cjs.map +1 -1
  6. package/components/area/index.d.ts +12 -59
  7. package/components/area/index.js +25 -25
  8. package/components/area/index.js.map +1 -1
  9. package/components/axis/index.cjs +1 -1
  10. package/components/axis/index.cjs.map +1 -1
  11. package/components/axis/index.d.ts +12 -82
  12. package/components/axis/index.js +16 -16
  13. package/components/axis/index.js.map +1 -1
  14. package/components/brush/index.cjs +1 -1
  15. package/components/brush/index.cjs.map +1 -1
  16. package/components/brush/index.d.ts +12 -62
  17. package/components/brush/index.js +17 -17
  18. package/components/brush/index.js.map +1 -1
  19. package/components/chord-diagram/index.cjs +1 -1
  20. package/components/chord-diagram/index.cjs.map +1 -1
  21. package/components/chord-diagram/index.d.ts +12 -60
  22. package/components/chord-diagram/index.js +26 -26
  23. package/components/chord-diagram/index.js.map +1 -1
  24. package/components/crosshair/index.cjs.map +1 -1
  25. package/components/crosshair/index.d.ts +12 -66
  26. package/components/crosshair/index.js.map +1 -1
  27. package/components/donut/index.cjs +1 -1
  28. package/components/donut/index.cjs.map +1 -1
  29. package/components/donut/index.d.ts +12 -64
  30. package/components/donut/index.js +17 -17
  31. package/components/donut/index.js.map +1 -1
  32. package/components/free-brush/index.cjs +1 -1
  33. package/components/free-brush/index.cjs.map +1 -1
  34. package/components/free-brush/index.d.ts +12 -62
  35. package/components/free-brush/index.js +18 -18
  36. package/components/free-brush/index.js.map +1 -1
  37. package/components/graph/index.cjs +1 -1
  38. package/components/graph/index.cjs.map +1 -1
  39. package/components/graph/index.d.ts +10 -134
  40. package/components/graph/index.js +66 -66
  41. package/components/graph/index.js.map +1 -1
  42. package/components/grouped-bar/index.cjs +1 -1
  43. package/components/grouped-bar/index.cjs.map +1 -1
  44. package/components/grouped-bar/index.d.ts +12 -62
  45. package/components/grouped-bar/index.js +25 -25
  46. package/components/grouped-bar/index.js.map +1 -1
  47. package/components/line/index.cjs +1 -1
  48. package/components/line/index.cjs.map +1 -1
  49. package/components/line/index.d.ts +12 -60
  50. package/components/line/index.js +24 -24
  51. package/components/line/index.js.map +1 -1
  52. package/components/nested-donut/index.cjs +1 -1
  53. package/components/nested-donut/index.cjs.map +1 -1
  54. package/components/nested-donut/index.d.ts +12 -65
  55. package/components/nested-donut/index.js +22 -22
  56. package/components/nested-donut/index.js.map +1 -1
  57. package/components/plotband/index.cjs +1 -1
  58. package/components/plotband/index.cjs.map +1 -1
  59. package/components/plotband/index.d.ts +12 -63
  60. package/components/plotband/index.js +12 -12
  61. package/components/plotband/index.js.map +1 -1
  62. package/components/plotline/index.cjs +1 -1
  63. package/components/plotline/index.cjs.map +1 -1
  64. package/components/plotline/index.d.ts +12 -64
  65. package/components/plotline/index.js +9 -9
  66. package/components/plotline/index.js.map +1 -1
  67. package/components/sankey/index.cjs +1 -1
  68. package/components/sankey/index.cjs.map +1 -1
  69. package/components/sankey/index.d.ts +12 -95
  70. package/components/sankey/index.js +35 -35
  71. package/components/sankey/index.js.map +1 -1
  72. package/components/scatter/index.cjs +1 -1
  73. package/components/scatter/index.cjs.map +1 -1
  74. package/components/scatter/index.d.ts +12 -65
  75. package/components/scatter/index.js +27 -27
  76. package/components/scatter/index.js.map +1 -1
  77. package/components/stacked-bar/index.cjs +1 -1
  78. package/components/stacked-bar/index.cjs.map +1 -1
  79. package/components/stacked-bar/index.d.ts +12 -62
  80. package/components/stacked-bar/index.js +22 -22
  81. package/components/stacked-bar/index.js.map +1 -1
  82. package/components/timeline/index.cjs.map +1 -1
  83. package/components/timeline/index.d.ts +12 -88
  84. package/components/timeline/index.js.map +1 -1
  85. package/components/tooltip/index.cjs.map +1 -1
  86. package/components/tooltip/index.d.ts +19 -99
  87. package/components/tooltip/index.js.map +1 -1
  88. package/components/topojson-map/index.cjs +1 -1
  89. package/components/topojson-map/index.cjs.map +1 -1
  90. package/components/topojson-map/index.d.ts +12 -78
  91. package/components/topojson-map/index.js +39 -39
  92. package/components/topojson-map/index.js.map +1 -1
  93. package/components/treemap/index.cjs +1 -1
  94. package/components/treemap/index.cjs.map +1 -1
  95. package/components/treemap/index.d.ts +12 -69
  96. package/components/treemap/index.js +14 -14
  97. package/components/treemap/index.js.map +1 -1
  98. package/components/xy-labels/index.cjs +1 -1
  99. package/components/xy-labels/index.cjs.map +1 -1
  100. package/components/xy-labels/index.d.ts +12 -66
  101. package/components/xy-labels/index.js +38 -38
  102. package/components/xy-labels/index.js.map +1 -1
  103. package/components.d.ts +27 -26
  104. package/containers/single-container/index.cjs.map +1 -1
  105. package/containers/single-container/index.d.ts +11 -25
  106. package/containers/single-container/index.js.map +1 -1
  107. package/containers/xy-container/index.cjs.map +1 -1
  108. package/containers/xy-container/index.d.ts +12 -44
  109. package/containers/xy-container/index.js.map +1 -1
  110. package/containers.d.ts +2 -2
  111. package/html-components/bullet-legend/index.cjs +1 -1
  112. package/html-components/bullet-legend/index.cjs.map +1 -1
  113. package/html-components/bullet-legend/index.d.ts +18 -74
  114. package/html-components/bullet-legend/index.js +12 -12
  115. package/html-components/bullet-legend/index.js.map +1 -1
  116. package/html-components/flow-legend/index.cjs +2 -0
  117. package/html-components/flow-legend/index.cjs.map +1 -0
  118. package/html-components/flow-legend/index.d.ts +20 -0
  119. package/html-components/flow-legend/index.js +44 -0
  120. package/html-components/flow-legend/index.js.map +1 -0
  121. package/html-components/flow-legend/index3.cjs +2 -0
  122. package/html-components/flow-legend/index3.cjs.map +1 -0
  123. package/html-components/flow-legend/index3.js +8 -0
  124. package/html-components/flow-legend/index3.js.map +1 -0
  125. package/html-components/leaflet-flow-map/index.cjs +1 -1
  126. package/html-components/leaflet-flow-map/index.cjs.map +1 -1
  127. package/html-components/leaflet-flow-map/index.d.ts +12 -112
  128. package/html-components/leaflet-flow-map/index.js +47 -47
  129. package/html-components/leaflet-flow-map/index.js.map +1 -1
  130. package/html-components/leaflet-map/index.cjs +1 -1
  131. package/html-components/leaflet-map/index.cjs.map +1 -1
  132. package/html-components/leaflet-map/index.d.ts +12 -99
  133. package/html-components/leaflet-map/index.js +38 -38
  134. package/html-components/leaflet-map/index.js.map +1 -1
  135. package/html-components/rolling-pin-legend/index.cjs.map +1 -1
  136. package/html-components/rolling-pin-legend/index.d.ts +18 -50
  137. package/html-components/rolling-pin-legend/index.js.map +1 -1
  138. package/index.cjs +2 -2
  139. package/index.js +79 -75
  140. package/index.js.map +1 -1
  141. package/package.json +6 -4
  142. package/utils/context.cjs.map +1 -1
  143. package/utils/context.d.ts +1 -0
  144. package/utils/context.js.map +1 -1
  145. package/utils/props.cjs.map +1 -1
  146. package/utils/props.d.ts +2 -1
  147. package/utils/props.js.map +1 -1
@@ -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";
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({
1
+ import { defineComponent as y, inject as F, computed as s, ref as m, onMounted as S, nextTick as g, onUnmounted as b, watch as r, createElementBlock as N, openBlock as k } from "vue";
2
+ import { Graph as c } from "@unovis/ts";
3
+ import { useForwardProps as h, arePropsEqual as f } from "../../utils/props.js";
4
+ import { componentAccessorKey as B } from "../../utils/context.js";
5
+ const P = { "data-vis-component": "" }, C = c.selectors, G = /* @__PURE__ */ y({
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,53 @@ 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
+ nodeSubLabel: { type: [Function, String, null] },
65
+ nodeSubLabelTrim: { type: [Function, Boolean, null] },
66
+ nodeSubLabelTrimMode: { type: [Function, String, null] },
67
+ nodeSubLabelTrimLength: { type: [Function, Number, null] },
68
+ nodeSideLabels: { type: [Function, Array, null] },
69
+ nodeBottomIcon: { type: [Function, String, null] },
70
+ nodeDisabled: { type: [Function, Boolean, null] },
71
+ nodeFill: { type: [Function, String, Array, null] },
72
+ nodeStroke: { type: [Function, String, Array, null] },
73
73
  nodeSort: { type: Function },
74
- nodeEnterPosition: {},
75
- nodeEnterScale: {},
76
- nodeExitPosition: {},
77
- nodeExitScale: {},
74
+ nodeEnterPosition: { type: [Function, Array, null] },
75
+ nodeEnterScale: { type: [Function, Number, null] },
76
+ nodeExitPosition: { type: [Function, Array, null] },
77
+ nodeExitScale: { type: [Function, Number, null] },
78
78
  nodeEnterCustomRenderFunction: { type: Function },
79
79
  nodeUpdateCustomRenderFunction: { type: Function },
80
80
  nodePartialUpdateCustomRenderFunction: { type: Function },
@@ -100,29 +100,29 @@ const L = { "data-vis-component": "" }, B = r.selectors, D = /* @__PURE__ */ s({
100
100
  attributes: {},
101
101
  data: {}
102
102
  },
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(() => {
103
+ setup(p, { expose: d }) {
104
+ const t = F(B), u = p, o = s(() => t.data.value ?? u.data), l = h(u), e = m();
105
+ return S(() => {
106
106
  g(() => {
107
- var e;
108
- o.value = new r(a.value), (e = o.value) == null || e.setData(t.value), n.update(o.value);
107
+ var n;
108
+ e.value = new c(l.value), (n = e.value) == null || n.setData(o.value), t.update(e.value);
109
109
  });
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));
110
+ }), b(() => {
111
+ var n;
112
+ (n = e.value) == null || n.destroy(), t.destroy();
113
+ }), r(l, (n, i) => {
114
+ var a;
115
+ f(n, i) || (a = e.value) == null || a.setConfig(l.value);
116
+ }), r(o, () => {
117
+ var n;
118
+ (n = e.value) == null || n.setData(o.value);
119
+ }), d({
120
+ component: e
121
+ }), (n, i) => (k(), N("div", P));
122
122
  }
123
123
  });
124
124
  export {
125
- B as VisGraphSelectors,
126
- D as default
125
+ C as VisGraphSelectors,
126
+ G as default
127
127
  };
128
128
  //# 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 { 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","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAoBC,EAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA3CvC,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IAC9CM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,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 t=require("vue"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),y={"data-vis-component":""},m=l.GroupedBar.selectors,g=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,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},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(d,{expose:p}){const n=t.inject(v.componentAccessorKey),u=d,r=t.computed(()=>n.data.value??u.data),a=i.useForwardProps(u),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.GroupedBar(a.value),(e=o.value)==null||e.setData(r.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(a,(e,c)=>{var s;i.arePropsEqual(e,c)||(s=o.value)==null||s.setConfig(a.value)}),t.watch(r,()=>{var e;(e=o.value)==null||e.setData(r.value)}),p({component:o}),(e,c)=>(t.openBlock(),t.createElementBlock("div",y))}});exports.VisGroupedBarSelectors=m;exports.default=g;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/grouped-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { GroupedBar, GroupedBarConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = GroupedBarConfigInterface<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<GroupedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new GroupedBar<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 VisGroupedBarSelectors = GroupedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGroupedBarSelectors","GroupedBar","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAyBC,EAAAA,WAAW,iaA3C3C,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAuB,EAGzCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,aAAkBQ,EAAO,KAAK,GAC1CM,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/grouped-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { GroupedBar, GroupedBarConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = GroupedBarConfigInterface<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<GroupedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new GroupedBar<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 VisGroupedBarSelectors = GroupedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGroupedBarSelectors","GroupedBar","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAyBC,EAAAA,WAAW,yhBA3CjD,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,aAAkBQ,EAAO,KAAK,GACpDM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,69 +1,19 @@
1
- import { GroupedBar, NumericAccessor } from '@unovis/ts';
2
- export declare const VisGroupedBarSelectors: typeof import("@unovis/ts/dist/components/grouped-bar/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 { GroupedBar, GroupedBarConfigInterface } from '@unovis/ts';
2
+
3
+ export declare const VisGroupedBarSelectors: typeof import("@unovis/ts/components/grouped-bar/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>) & (GroupedBarConfigInterface<Datum> & {
40
6
  data?: Datum[];
41
- x: NumericAccessor<Datum>;
42
- y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
43
- color?: import("@unovis/ts").ColorAccessor<Datum>;
44
- cursor?: import("@unovis/ts").StringAccessor<Datum>;
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
- groupWidth?: number;
50
- groupMaxWidth?: number;
51
- dataStep?: number;
52
- groupPadding?: number;
53
- barPadding?: number;
54
- roundedCorners?: number | boolean;
55
- barMinHeight?: number;
56
- orientation?: string;
57
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
58
- expose(exposed: import("vue").ShallowUnwrapRef<{
59
- component: import("vue").Ref<GroupedBar<Datum>, GroupedBar<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<GroupedBar<Datum>, GroupedBar<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,11 +1,11 @@
1
- import { defineComponent as l, inject as m, computed as v, ref as f, onMounted as y, nextTick as x, onUnmounted as g, watch as u, createElementBlock as _, openBlock as b } from "vue";
2
- import { GroupedBar as i } from "@unovis/ts";
3
- import { useForwardProps as h, arePropsEqual as B } from "../../utils/props.js";
4
- import { componentAccessorKey as F } from "../../utils/context.js";
5
- const C = { "data-vis-component": "" }, w = i.selectors, D = /* @__PURE__ */ l({
1
+ import { defineComponent as d, inject as m, computed as y, ref as v, onMounted as f, nextTick as g, onUnmounted as x, watch as i, createElementBlock as F, openBlock as b } from "vue";
2
+ import { GroupedBar as s } from "@unovis/ts";
3
+ import { useForwardProps as _, arePropsEqual as h } from "../../utils/props.js";
4
+ import { componentAccessorKey as B } from "../../utils/context.js";
5
+ const S = { "data-vis-component": "" }, w = s.selectors, A = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
- color: {},
8
+ color: { type: [Function, String, Array, null] },
9
9
  groupWidth: {},
10
10
  groupMaxWidth: {},
11
11
  dataStep: {},
@@ -13,10 +13,10 @@ const C = { "data-vis-component": "" }, w = i.selectors, D = /* @__PURE__ */ l({
13
13
  barPadding: {},
14
14
  roundedCorners: { type: [Number, Boolean] },
15
15
  barMinHeight: {},
16
- cursor: {},
16
+ cursor: { type: [Function, String, null] },
17
17
  orientation: {},
18
- x: {},
19
- y: {},
18
+ x: { type: [Function, Number, null] },
19
+ y: { type: [Function, Number, null, Array] },
20
20
  id: { type: Function },
21
21
  xScale: { type: [Object, Function] },
22
22
  yScale: { type: [Object, Function] },
@@ -26,29 +26,29 @@ const C = { "data-vis-component": "" }, w = i.selectors, D = /* @__PURE__ */ l({
26
26
  attributes: {},
27
27
  data: {}
28
28
  },
29
- setup(d, { expose: p }) {
30
- const t = m(F), r = d, a = v(() => t.data.value ?? r.data), n = h(r), o = f();
31
- return y(() => {
32
- x(() => {
29
+ setup(p, { expose: l }) {
30
+ const o = m(B), r = p, n = y(() => o.data.value ?? r.data), a = _(r), t = v();
31
+ return f(() => {
32
+ g(() => {
33
33
  var e;
34
- o.value = new i(n.value), (e = o.value) == null || e.setData(a.value), t.update(o.value);
34
+ t.value = new s(a.value), (e = t.value) == null || e.setData(n.value), o.update(t.value);
35
35
  });
36
- }), g(() => {
36
+ }), x(() => {
37
37
  var e;
38
- (e = o.value) == null || e.destroy(), t.destroy();
39
- }), u(n, (e, c) => {
40
- var s;
41
- B(e, c) || (s = o.value) == null || s.setConfig(n.value);
42
- }), u(a, () => {
38
+ (e = t.value) == null || e.destroy(), o.destroy();
39
+ }), i(a, (e, u) => {
40
+ var c;
41
+ h(e, u) || (c = t.value) == null || c.setConfig(a.value);
42
+ }), i(n, () => {
43
43
  var e;
44
- (e = o.value) == null || e.setData(a.value);
45
- }), p({
46
- component: o
47
- }), (e, c) => (b(), _("div", C));
44
+ (e = t.value) == null || e.setData(n.value);
45
+ }), l({
46
+ component: t
47
+ }), (e, u) => (b(), F("div", S));
48
48
  }
49
49
  });
50
50
  export {
51
51
  w as VisGroupedBarSelectors,
52
- D as default
52
+ A as default
53
53
  };
54
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/grouped-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { GroupedBar, GroupedBarConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = GroupedBarConfigInterface<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<GroupedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new GroupedBar<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 VisGroupedBarSelectors = GroupedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGroupedBarSelectors","GroupedBar","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;AA3C3C,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAuB;AAGzC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAkBQ,EAAO,KAAK,IAC1CM,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/grouped-bar/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { GroupedBar, GroupedBarConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = GroupedBarConfigInterface<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<GroupedBar<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new GroupedBar<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 VisGroupedBarSelectors = GroupedBar.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisGroupedBarSelectors","GroupedBar","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAyBC,EAAW;;;;;;;;;;;;;;;;;;;;;;;;;AA3CjD,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAkBQ,EAAO,KAAK,IACpDM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),l=require("@unovis/ts"),i=require("../../utils/props.cjs"),v=require("../../utils/context.cjs"),y={"data-vis-component":""},m=l.Line.selectors,_=t.defineComponent({__name:"index",props:{color:{},curveType:{},lineWidth:{},lineDashArray:{},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{},interpolateMissingData:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const n=t.inject(v.componentAccessorKey),s=p,a=t.computed(()=>n.data.value??s.data),c=i.useForwardProps(s),o=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;o.value=new l.Line(c.value),(e=o.value)==null||e.setData(a.value),n.update(o.value)})}),t.onUnmounted(()=>{var e;(e=o.value)==null||e.destroy(),n.destroy()}),t.watch(c,(e,r)=>{var u;i.arePropsEqual(e,r)||(u=o.value)==null||u.setConfig(c.value)}),t.watch(a,()=>{var e;(e=o.value)==null||e.setData(a.value)}),d({component:o}),(e,r)=>(t.openBlock(),t.createElementBlock("div",y))}});exports.VisLineSelectors=m;exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),i=require("@unovis/ts"),s=require("../../utils/props.cjs"),y=require("../../utils/context.cjs"),v={"data-vis-component":""},m=i.Line.selectors,F=t.defineComponent({__name:"index",props:{color:{type:[Function,String,Array,null]},curveType:{},lineWidth:{},lineDashArray:{type:[Function,Array,null]},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{type:[Function,String,null]},interpolateMissingData:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(p,{expose:d}){const o=t.inject(y.componentAccessorKey),r=p,a=t.computed(()=>o.data.value??r.data),c=s.useForwardProps(r),n=t.ref();return t.onMounted(()=>{t.nextTick(()=>{var e;n.value=new i.Line(c.value),(e=n.value)==null||e.setData(a.value),o.update(n.value)})}),t.onUnmounted(()=>{var e;(e=n.value)==null||e.destroy(),o.destroy()}),t.watch(c,(e,u)=>{var l;s.arePropsEqual(e,u)||(l=n.value)==null||l.setConfig(c.value)}),t.watch(a,()=>{var e;(e=n.value)==null||e.setData(a.value)}),d({component:n}),(e,u)=>(t.openBlock(),t.createElementBlock("div",v))}});exports.VisLineSelectors=m;exports.default=F;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/line/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Line, LineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = LineConfigInterface<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<Line<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Line<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 VisLineSelectors = Line.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisLineSelectors","Line","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":"+PAkDaA,EAAmBC,EAAAA,KAAK,oZA3C/B,MAAAC,EAAWC,SAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,kBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAiB,EAGnCC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GACpCM,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,OACrBL,EAAA,OAAOS,EAAU,KAAK,CAAA,CAChC,CAAA,CACF,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAQ,CAAA,CAClB,EAEKe,EAAAA,MAAAR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBJ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,UAAUN,EAAO,MACpC,CACD,EAEDQ,EAAA,MAAMV,EAAM,IAAM,QACNQ,EAAAJ,EAAA,QAAA,MAAAI,EAAO,QAAQR,EAAK,MAAK,CACpC,EAEYc,EAAA,CACX,UAAAV,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/line/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Line, LineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = LineConfigInterface<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<Line<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Line<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 VisLineSelectors = Line.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisLineSelectors","Line","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":"+PAkDaA,EAAmBC,EAAAA,KAAK,siBA3CrC,MAAMC,EAAWC,EAAAA,OAAOC,sBAAoB,EAItCC,EAAQC,EAERC,EAAOC,EAAAA,SAAS,IAAMN,EAAS,KAAK,OAASG,EAAM,IAAI,EAEvDI,EAASC,EAAAA,gBAAgBL,CAAK,EAG9BM,EAAYC,EAAAA,IAAA,EAGlBC,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,OACbH,EAAU,MAAQ,IAAIV,OAAYQ,EAAO,KAAK,GAC9CM,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,OAC9BL,EAAS,OAAOS,EAAU,KAAK,CACjC,CAAC,CACH,CAAC,EAEDK,EAAAA,YAAY,IAAM,QAChBD,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UACjBb,EAAS,QAAA,CACX,CAAC,EAEDe,EAAAA,MAAMR,EAAQ,CAACS,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BJ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,UAAUN,EAAO,MAEtC,CAAC,EAEDQ,EAAAA,MAAMV,EAAM,IAAM,QAChBQ,EAAAJ,EAAU,QAAV,MAAAI,EAAiB,QAAQR,EAAK,MAChC,CAAC,EAEDc,EAAa,CACX,UAAAV,CAAA,CACD,UAQCW,YAAA,EAAAC,qBAA0B,MAA1BC,CAA0B"}
@@ -1,67 +1,19 @@
1
- import { Line, NumericAccessor } from '@unovis/ts';
2
- export declare const VisLineSelectors: typeof import("@unovis/ts/dist/components/line/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 { Line, LineConfigInterface } from '@unovis/ts';
2
+
3
+ export declare const VisLineSelectors: typeof import("@unovis/ts/components/line/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>) & (LineConfigInterface<Datum> & {
40
6
  data?: Datum[];
41
- x: NumericAccessor<Datum>;
42
- y: NumericAccessor<Datum> | NumericAccessor<Datum>[];
43
- color?: import("@unovis/ts").ColorAccessor<Datum[]>;
44
- curveType?: import("@unovis/ts").CurveType;
45
- cursor?: import("@unovis/ts").StringAccessor<Datum[]>;
46
- id?: (d: Datum, i: number, ...any: any[]) => string;
47
- xScale?: import("@unovis/ts").ContinuousScale;
48
- yScale?: import("@unovis/ts").ContinuousScale;
49
- excludeFromDomainCalculation?: boolean;
50
- lineWidth?: number;
51
- lineDashArray?: import("@unovis/ts").GenericAccessor<number[], Datum[]>;
52
- fallbackValue?: number;
53
- highlightOnHover?: boolean;
54
- interpolateMissingData?: boolean;
55
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
56
- expose(exposed: import("vue").ShallowUnwrapRef<{
57
- component: import("vue").Ref<Line<Datum>, Line<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<Line<Datum>, Line<Datum>>;
58
10
  }>): void;
59
11
  attrs: any;
60
- slots: {};
61
- emit: any;
62
- }>) => 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, {
63
15
  [key: string]: any;
64
16
  }> & {
65
- __ctx?: any;
17
+ __ctx?: Awaited<typeof __VLS_setup>;
66
18
  };
67
19
  export default _default;
@@ -1,20 +1,20 @@
1
- import { defineComponent as d, inject as m, computed as v, ref as y, onMounted as f, nextTick as h, onUnmounted as x, watch as i, createElementBlock as _, openBlock as g } from "vue";
2
- import { Line as l } from "@unovis/ts";
3
- import { useForwardProps as B, arePropsEqual as D } from "../../utils/props.js";
4
- import { componentAccessorKey as F } from "../../utils/context.js";
5
- const b = { "data-vis-component": "" }, O = l.selectors, S = /* @__PURE__ */ d({
1
+ import { defineComponent as d, inject as m, computed as y, ref as v, onMounted as f, nextTick as F, onUnmounted as h, watch as u, createElementBlock as x, openBlock as _ } from "vue";
2
+ import { Line as i } from "@unovis/ts";
3
+ import { useForwardProps as g, arePropsEqual as b } from "../../utils/props.js";
4
+ import { componentAccessorKey as A } from "../../utils/context.js";
5
+ const B = { "data-vis-component": "" }, w = i.selectors, C = /* @__PURE__ */ d({
6
6
  __name: "index",
7
7
  props: {
8
- color: {},
8
+ color: { type: [Function, String, Array, null] },
9
9
  curveType: {},
10
10
  lineWidth: {},
11
- lineDashArray: {},
11
+ lineDashArray: { type: [Function, Array, null] },
12
12
  fallbackValue: {},
13
13
  highlightOnHover: { type: Boolean },
14
- cursor: {},
14
+ cursor: { type: [Function, String, null] },
15
15
  interpolateMissingData: { type: Boolean },
16
- x: {},
17
- y: {},
16
+ x: { type: [Function, Number, null] },
17
+ y: { type: [Function, Number, null, Array] },
18
18
  id: { type: Function },
19
19
  xScale: { type: [Object, Function] },
20
20
  yScale: { type: [Object, Function] },
@@ -24,29 +24,29 @@ const b = { "data-vis-component": "" }, O = l.selectors, S = /* @__PURE__ */ d({
24
24
  attributes: {},
25
25
  data: {}
26
26
  },
27
- setup(u, { expose: p }) {
28
- const o = m(F), c = u, a = v(() => o.data.value ?? c.data), n = B(c), t = y();
27
+ setup(s, { expose: p }) {
28
+ const n = m(A), r = s, o = y(() => n.data.value ?? r.data), a = g(r), t = v();
29
29
  return f(() => {
30
- h(() => {
30
+ F(() => {
31
31
  var e;
32
- t.value = new l(n.value), (e = t.value) == null || e.setData(a.value), o.update(t.value);
32
+ t.value = new i(a.value), (e = t.value) == null || e.setData(o.value), n.update(t.value);
33
33
  });
34
- }), x(() => {
34
+ }), h(() => {
35
35
  var e;
36
- (e = t.value) == null || e.destroy(), o.destroy();
37
- }), i(n, (e, r) => {
38
- var s;
39
- D(e, r) || (s = t.value) == null || s.setConfig(n.value);
40
- }), i(a, () => {
36
+ (e = t.value) == null || e.destroy(), n.destroy();
37
+ }), u(a, (e, c) => {
38
+ var l;
39
+ b(e, c) || (l = t.value) == null || l.setConfig(a.value);
40
+ }), u(o, () => {
41
41
  var e;
42
- (e = t.value) == null || e.setData(a.value);
42
+ (e = t.value) == null || e.setData(o.value);
43
43
  }), p({
44
44
  component: t
45
- }), (e, r) => (g(), _("div", b));
45
+ }), (e, c) => (_(), x("div", B));
46
46
  }
47
47
  });
48
48
  export {
49
- O as VisLineSelectors,
50
- S as default
49
+ w as VisLineSelectors,
50
+ C as default
51
51
  };
52
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/line/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Line, LineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = LineConfigInterface<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<Line<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Line<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 VisLineSelectors = Line.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisLineSelectors","Line","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;;wCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;AA3C/B,UAAAC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAiB;AAGnC,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IACpCM,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK,QACrBL,EAAA,OAAOS,EAAU,KAAK;AAAA,MAAA,CAChC;AAAA,IAAA,CACF,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAQ;AAAA,IAAA,CAClB,GAEKe,EAAAR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBJ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,UAAUN,EAAO;AAAA,IACpC,CACD,GAEDQ,EAAMV,GAAM,MAAM;;AACN,OAAAQ,IAAAJ,EAAA,UAAA,QAAAI,EAAO,QAAQR,EAAK;AAAA,IAAK,CACpC,GAEYc,EAAA;AAAA,MACX,WAAAV;AAAA,IAAA,CACD;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/line/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"Datum\">\n// !!! This code was automatically generated. You should not change it !!!\nimport { Line, LineConfigInterface, NumericAccessor } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick, inject } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\nimport { componentAccessorKey } from '../../utils/context'\n\nconst accessor = inject(componentAccessorKey)\n\n// data and required props \ntype Props = LineConfigInterface<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<Line<Datum>>()\n\n\nonMounted(() => {\n nextTick(() => {\n component.value = new Line<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 VisLineSelectors = Line.selectors\n</script>\n\n<template>\n <div data-vis-component />\n</template>\n\n\n"],"names":["VisLineSelectors","Line","accessor","inject","componentAccessorKey","props","__props","data","computed","config","useForwardProps","component","ref","onMounted","nextTick","_a","onUnmounted","watch","curr","prev","arePropsEqual","__expose","_openBlock","_createElementBlock","_hoisted_1"],"mappings":";;;;wCAkDaA,IAAmBC,EAAK;;;;;;;;;;;;;;;;;;;;;;;AA3CrC,UAAMC,IAAWC,EAAOC,CAAoB,GAItCC,IAAQC,GAERC,IAAOC,EAAS,MAAMN,EAAS,KAAK,SAASG,EAAM,IAAI,GAEvDI,IAASC,EAAgBL,CAAK,GAG9BM,IAAYC,EAAA;AAGlB,WAAAC,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;;AACb,QAAAH,EAAU,QAAQ,IAAIV,EAAYQ,EAAO,KAAK,IAC9CM,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK,QAC9BL,EAAS,OAAOS,EAAU,KAAK;AAAA,MACjC,CAAC;AAAA,IACH,CAAC,GAEDK,EAAY,MAAM;;AAChB,OAAAD,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,WACjBb,EAAS,QAAA;AAAA,IACX,CAAC,GAEDe,EAAMR,GAAQ,CAACS,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BJ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,UAAUN,EAAO;AAAA,IAEtC,CAAC,GAEDQ,EAAMV,GAAM,MAAM;;AAChB,OAAAQ,IAAAJ,EAAU,UAAV,QAAAI,EAAiB,QAAQR,EAAK;AAAA,IAChC,CAAC,GAEDc,EAAa;AAAA,MACX,WAAAV;AAAA,IAAA,CACD,cAQCW,EAAA,GAAAC,EAA0B,OAA1BC,CAA0B;AAAA;;"}