@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
package/components.d.ts CHANGED
@@ -1,26 +1,27 @@
1
- export { default as VisArea, VisAreaSelectors } from "./components/area/index";
2
- export { default as VisAxis, VisAxisSelectors } from "./components/axis/index";
3
- export { default as VisBrush, VisBrushSelectors } from "./components/brush/index";
4
- export { default as VisCrosshair, VisCrosshairSelectors } from "./components/crosshair/index";
5
- export { default as VisFreeBrush, VisFreeBrushSelectors } from "./components/free-brush/index";
6
- export { default as VisGroupedBar, VisGroupedBarSelectors } from "./components/grouped-bar/index";
7
- export { default as VisLine, VisLineSelectors } from "./components/line/index";
8
- export { default as VisScatter, VisScatterSelectors } from "./components/scatter/index";
9
- export { default as VisStackedBar, VisStackedBarSelectors } from "./components/stacked-bar/index";
10
- export { default as VisTimeline, VisTimelineSelectors } from "./components/timeline/index";
11
- export { default as VisXYLabels, VisXYLabelsSelectors } from "./components/xy-labels/index";
12
- export { default as VisPlotband, VisPlotbandSelectors } from "./components/plotband/index";
13
- export { default as VisPlotline, VisPlotlineSelectors } from "./components/plotline/index";
14
- export { default as VisChordDiagram, VisChordDiagramSelectors } from "./components/chord-diagram/index";
15
- export { default as VisDonut, VisDonutSelectors } from "./components/donut/index";
16
- export { default as VisGraph, VisGraphSelectors } from "./components/graph/index";
17
- export { default as VisNestedDonut, VisNestedDonutSelectors } from "./components/nested-donut/index";
18
- export { default as VisSankey, VisSankeySelectors } from "./components/sankey/index";
19
- export { default as VisTopoJSONMap, VisTopoJSONMapSelectors } from "./components/topojson-map/index";
20
- export { default as VisTreemap, VisTreemapSelectors } from "./components/treemap/index";
21
- export { default as VisTooltip, VisTooltipSelectors } from "./components/tooltip/index";
22
- export { default as VisAnnotations, VisAnnotationsSelectors } from "./components/annotations/index";
23
- export { default as VisLeafletMap, VisLeafletMapSelectors } from "./html-components/leaflet-map/index";
24
- export { default as VisLeafletFlowMap, VisLeafletFlowMapSelectors } from "./html-components/leaflet-flow-map/index";
25
- export { default as VisBulletLegend, VisBulletLegendSelectors } from "./html-components/bullet-legend/index";
26
- export { default as VisRollingPinLegend, VisRollingPinLegendSelectors } from "./html-components/rolling-pin-legend/index";
1
+ export { default as VisArea, VisAreaSelectors } from './components/area/index';
2
+ export { default as VisAxis, VisAxisSelectors } from './components/axis/index';
3
+ export { default as VisBrush, VisBrushSelectors } from './components/brush/index';
4
+ export { default as VisCrosshair, VisCrosshairSelectors } from './components/crosshair/index';
5
+ export { default as VisFreeBrush, VisFreeBrushSelectors } from './components/free-brush/index';
6
+ export { default as VisGroupedBar, VisGroupedBarSelectors } from './components/grouped-bar/index';
7
+ export { default as VisLine, VisLineSelectors } from './components/line/index';
8
+ export { default as VisScatter, VisScatterSelectors } from './components/scatter/index';
9
+ export { default as VisStackedBar, VisStackedBarSelectors } from './components/stacked-bar/index';
10
+ export { default as VisTimeline, VisTimelineSelectors } from './components/timeline/index';
11
+ export { default as VisXYLabels, VisXYLabelsSelectors } from './components/xy-labels/index';
12
+ export { default as VisPlotband, VisPlotbandSelectors } from './components/plotband/index';
13
+ export { default as VisPlotline, VisPlotlineSelectors } from './components/plotline/index';
14
+ export { default as VisChordDiagram, VisChordDiagramSelectors } from './components/chord-diagram/index';
15
+ export { default as VisDonut, VisDonutSelectors } from './components/donut/index';
16
+ export { default as VisGraph, VisGraphSelectors } from './components/graph/index';
17
+ export { default as VisNestedDonut, VisNestedDonutSelectors } from './components/nested-donut/index';
18
+ export { default as VisSankey, VisSankeySelectors } from './components/sankey/index';
19
+ export { default as VisTopoJSONMap, VisTopoJSONMapSelectors } from './components/topojson-map/index';
20
+ export { default as VisTreemap, VisTreemapSelectors } from './components/treemap/index';
21
+ export { default as VisTooltip, VisTooltipSelectors } from './components/tooltip/index';
22
+ export { default as VisAnnotations, VisAnnotationsSelectors } from './components/annotations/index';
23
+ export { default as VisLeafletMap, VisLeafletMapSelectors } from './html-components/leaflet-map/index';
24
+ export { default as VisLeafletFlowMap, VisLeafletFlowMapSelectors } from './html-components/leaflet-flow-map/index';
25
+ export { default as VisBulletLegend, VisBulletLegendSelectors } from './html-components/bullet-legend/index';
26
+ export { default as VisFlowLegend, VisFlowLegendSelectors } from './html-components/flow-legend/index';
27
+ export { default as VisRollingPinLegend, VisRollingPinLegendSelectors } from './html-components/rolling-pin-legend/index';
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose"],"mappings":"waAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAA,OAAOH,CAAK,EACvBI,EAAcC,kBAAgBL,CAAK,EAErC,IAAAM,EACJ,MAAMC,EAASC,EAAAA,SAAS,CACtB,UAAW,OACX,QAAS,OACT,YAAa,MAAA,CACd,EACKC,EAAQC,EAAAA,IAAoB,EAE5BC,EAAY,IAAM,CAClBL,GACAG,EAAM,OAASF,EAAO,YAChBD,EAAA,IAAIM,EAAAA,gBAAgBH,EAAM,MAAO,CAAE,GAAGI,EAAA,MAAMN,CAAM,CAAA,EAAKL,EAAK,KAAK,EAC7E,EAEAY,OAAAA,EAAAA,YAAY,IAAM,OACNH,EAAA,GAEAI,EAAAR,EAAO,YAAP,MAAAQ,EAAkB,OACrBT,GAAA,MAAAA,EAAA,gBAAgB,CAAE,GAAGO,QAAMT,EAAY,KAAK,EAAG,GAAGS,EAAAA,MAAMN,CAAM,GAAG,CACzE,EAEDS,EAAA,MAAMd,EAAM,IAAM,CACZI,EACIA,EAAA,QAAQJ,EAAK,MAAO,EAAI,EAEpBS,EAAA,CACZ,CACD,EAEWM,cAAA,IAAMX,GAAA,YAAAA,EAAO,SAAS,EAElCY,EAAAA,QAAQC,EAAAA,qBAAsB,CAC5B,KAAAjB,EACA,OAASkB,GAAwBb,EAAO,UAAYa,EACpD,QAAS,IAAMb,EAAO,UAAY,MAAA,CACnC,EAEDW,EAAAA,QAAQG,EAAAA,mBAAoB,CAC1B,KAAAnB,EACA,OAASoB,GAAef,EAAO,QAAUe,EACzC,QAAS,IAAM,CAAEf,EAAO,QAAU,MAAA,CAAU,CAC7C,EAEDW,EAAAA,QAAQK,EAAAA,uBAAwB,CAC9B,KAAArB,EACA,OAASsB,GAAmBjB,EAAO,YAAciB,EACjD,QAAS,IAAM,CAAEjB,EAAO,YAAc,MAAA,CAAU,CACjD,EAGYkB,EAAA,CACX,UAAWnB,CAAA,CACZ"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":"waAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAAA,OAAOH,CAAK,EACvBI,EAAcC,EAAAA,gBAAgBL,CAAK,EAEzC,IAAIM,EACJ,MAAMC,EAASC,EAAAA,SAAS,CACtB,UAAW,OACX,QAAS,OACT,YAAa,MAAA,CACd,EACKC,EAAQC,EAAAA,IAAA,EAERC,EAAY,IAAM,CAClBL,GACAG,EAAM,OAASF,EAAO,YACxBD,EAAQ,IAAIM,EAAAA,gBAAgBH,EAAM,MAAO,CAAE,GAAGI,EAAAA,MAAMN,CAAM,CAAA,EAAKL,EAAK,KAAK,EAC7E,EAEAY,OAAAA,EAAAA,YAAY,IAAM,OAChBH,EAAA,GAEUI,EAAAR,EAAO,YAAP,MAAAQ,EAAkB,OAC5BT,GAAA,MAAAA,EAAO,gBAAgB,CAAE,GAAGO,QAAMT,EAAY,KAAK,EAAG,GAAGS,EAAAA,MAAMN,CAAM,GACvE,CAAC,EAEDS,EAAAA,MAAMd,EAAM,IAAM,CACZI,EACFA,EAAM,QAAQJ,EAAK,MAAO,EAAI,EAE9BS,EAAA,CAEJ,CAAC,EAEDM,cAAY,IAAMX,GAAA,YAAAA,EAAO,SAAS,EAElCY,EAAAA,QAAQC,EAAAA,qBAAsB,CAC5B,KAAAjB,EACA,OAASkB,GAAwBb,EAAO,UAAYa,EACpD,QAAS,IAAMb,EAAO,UAAY,MAAA,CACnC,EAEDW,EAAAA,QAAQG,EAAAA,mBAAoB,CAC1B,KAAAnB,EACA,OAASoB,GAAef,EAAO,QAAUe,EACzC,QAAS,IAAM,CAAEf,EAAO,QAAU,MAAU,CAAA,CAC7C,EAEDW,EAAAA,QAAQK,EAAAA,uBAAwB,CAC9B,KAAArB,EACA,OAASsB,GAAmBjB,EAAO,YAAciB,EACjD,QAAS,IAAM,CAAEjB,EAAO,YAAc,MAAU,CAAA,CACjD,EAGDkB,EAAa,CACX,UAAWnB,CAAA,CACZ,wBAICoB,EAAAA,mBAEM,MAAA,CAFD,4BAAA,WAA8B,QAAJ,IAAIjB,EAAQ,MAAM,yBAAA,GAC/CkB,aAAQC,EAAA,OAAA,SAAA,CAAA"}
@@ -1,34 +1,20 @@
1
- import { SingleContainer, ComponentCore, Tooltip, Annotations } from '@unovis/ts';
2
- declare const _default: <T>(__VLS_props: any, __VLS_ctx?: {
3
- attrs: any;
4
- emit: any;
5
- slots: any;
6
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
- props: {
8
- duration?: number;
1
+ import { SingleContainer, SingleContainerConfigInterface } from '@unovis/ts';
2
+
3
+ declare const _default: <T>(__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<{
4
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (SingleContainerConfigInterface<T> & {
9
5
  data?: T;
10
- width?: string | number;
11
- component?: ComponentCore<T, import("@unovis/ts").ComponentConfigInterface>;
12
- tooltip?: Tooltip;
13
- annotations?: Annotations;
14
- margin?: import("@unovis/ts").Spacing;
15
- padding?: import("@unovis/ts").Spacing;
16
- sizing?: string;
17
- height?: string | number;
18
- svgDefs?: string;
19
- ariaLabel?: string;
20
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
21
- expose(exposed: import("vue").ShallowUnwrapRef<{
6
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
7
+ expose(exposed: import('vue').ShallowUnwrapRef<{
22
8
  component: SingleContainer<T>;
23
9
  }>): void;
24
10
  attrs: any;
25
- slots: {
11
+ slots: ReturnType<() => {
26
12
  default?(_: {}): any;
27
- };
28
- emit: any;
29
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ }>;
14
+ emit: typeof __VLS_emit;
15
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
30
16
  [key: string]: any;
31
17
  }> & {
32
- __ctx?: any;
18
+ __ctx?: Awaited<typeof __VLS_setup>;
33
19
  };
34
20
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","annot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AAc;AAAA,MAAA;AAAA,IAAU,CACjD,GAGYiB,EAAA;AAAA,MACX,WAAWlB;AAAA,IAAA,CACZ;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/containers/single-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { SingleContainer, ComponentCore, SingleContainerConfigInterface, Tooltip, Annotations } from '@unovis/ts'\nimport { onUnmounted, ref, provide, watch, toRefs, watchEffect, reactive, toRaw } from 'vue'\nimport { annotationsAccessorKey, componentAccessorKey, tooltipAccessorKey, } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<SingleContainerConfigInterface<T> & { data?: T }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nlet chart: SingleContainer<T>\nconst config = reactive({\n component: undefined,\n tooltip: undefined,\n annotations: undefined,\n}) as SingleContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nconst initChart = () => {\n if (chart) return\n if (elRef.value && config.component)\n chart = new SingleContainer(elRef.value, { ...toRaw(config) }, data.value)\n}\n\nwatchEffect(() => {\n initChart()\n // watch deep changes in components config\n const t = config.component?.config\n chart?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nwatch(data, () => {\n if (chart) {\n chart.setData(data.value, true)\n } else {\n initChart()\n }\n})\n\nonUnmounted(() => chart?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: ComponentCore<T>) => config.component = c,\n destroy: () => config.component = undefined,\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-single-container ref=\"elRef\" class='unovis-single-container'>\n <slot />\n </div>\n</template>\n\n\n\n<style>\n.unovis-single-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","config","reactive","elRef","ref","initChart","SingleContainer","toRaw","watchEffect","_a","watch","onUnmounted","provide","componentAccessorKey","c","tooltipAccessorKey","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GACR,EAAE,MAAAC,EAAA,IAASC,EAAOH,CAAK,GACvBI,IAAcC,EAAgBL,CAAK;AAEzC,QAAIM;AACJ,UAAMC,IAASC,EAAS;AAAA,MACtB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,aAAa;AAAA,IAAA,CACd,GACKC,IAAQC,EAAA,GAERC,IAAY,MAAM;AACtB,MAAIL,KACAG,EAAM,SAASF,EAAO,cACxBD,IAAQ,IAAIM,EAAgBH,EAAM,OAAO,EAAE,GAAGI,EAAMN,CAAM,EAAA,GAAKL,EAAK,KAAK;AAAA,IAC7E;AAEA,WAAAY,EAAY,MAAM;;AAChB,MAAAH,EAAA,IAEUI,IAAAR,EAAO,cAAP,QAAAQ,EAAkB,QAC5BT,KAAA,QAAAA,EAAO,gBAAgB,EAAE,GAAGO,EAAMT,EAAY,KAAK,GAAG,GAAGS,EAAMN,CAAM;IACvE,CAAC,GAEDS,EAAMd,GAAM,MAAM;AAChB,MAAII,IACFA,EAAM,QAAQJ,EAAK,OAAO,EAAI,IAE9BS,EAAA;AAAA,IAEJ,CAAC,GAEDM,EAAY,MAAMX,KAAA,gBAAAA,EAAO,SAAS,GAElCY,EAAQC,GAAsB;AAAA,MAC5B,MAAAjB;AAAA,MACA,QAAQ,CAACkB,MAAwBb,EAAO,YAAYa;AAAA,MACpD,SAAS,MAAMb,EAAO,YAAY;AAAA,IAAA,CACnC,GAEDW,EAAQG,GAAoB;AAAA,MAC1B,MAAAnB;AAAA,MACA,QAAQ,CAAC,MAAeK,EAAO,UAAU;AAAA,MACzC,SAAS,MAAM;AAAE,QAAAA,EAAO,UAAU;AAAA,MAAU;AAAA,IAAA,CAC7C,GAEDW,EAAQI,GAAwB;AAAA,MAC9B,MAAApB;AAAA,MACA,QAAQ,CAACqB,MAAmBhB,EAAO,cAAcgB;AAAA,MACjD,SAAS,MAAM;AAAE,QAAAhB,EAAO,cAAc;AAAA,MAAU;AAAA,IAAA,CACjD,GAGDiB,EAAa;AAAA,MACX,WAAWlB;AAAA,IAAA,CACZ,mBAICmB,EAEM,OAAA;AAAA,MAFD,6BAAA;AAAA,eAA8B;AAAA,MAAJ,KAAIhB;AAAA,MAAQ,OAAM;AAAA,IAAA;MAC/CiB,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = reactive({\n components: [],\n annotations: undefined,\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as XYContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n }\n})\n\nwatchEffect(() => {\n // watch deep changes in components config\n const t = config.components.map(i => i.config)\n chart.value?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nonMounted(() => {\n if (elRef.value) chart.value = new XYContainer(elRef.value, { ...toRaw(config) }, data.value)\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.components = [...config.components!, c],\n destroy: () => config.components = config.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config[`${c.config.type}Axis`] = c,\n destroy: (c) => { config[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.crosshair = c,\n destroy: () => { config.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","ref","config","reactive","elRef","watch","watchEffect","i","_a","toRaw","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose"],"mappings":"kxBAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAA,OAAOH,CAAK,EACvBI,EAAcC,kBAAgBL,CAAK,EAEnCM,EAAQC,EAAAA,IAAgC,EACxCC,EAASC,EAAAA,SAAS,CACtB,WAAY,CAAC,EACb,YAAa,OACb,UAAW,OACX,QAAS,OACT,MAAO,OACP,MAAO,MAAA,CACR,EACKC,EAAQH,EAAAA,IAAoB,EAElCI,OAAAA,EAAA,MAAMT,EAAM,IAAM,CACZI,EAAM,OACRA,EAAM,MAAM,QAAQJ,E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AwB,CAC9B,KAAAxB,EACA,OAASyB,GAAmBnB,EAAO,YAAcmB,EACjD,QAAS,IAAM,CAAEnB,EAAO,YAAc,MAAA,CAAU,CACjD,EAEYoB,EAAA,CACX,UAAWtB,CAAA,CACZ"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = reactive({\n components: [],\n annotations: undefined,\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as XYContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n }\n})\n\nwatchEffect(() => {\n // watch deep changes in components config\n const t = config.components.map(i => i.config)\n chart.value?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nonMounted(() => {\n if (elRef.value) chart.value = new XYContainer(elRef.value, { ...toRaw(config) }, data.value)\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.components = [...config.components!, c],\n destroy: () => config.components = config.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config[`${c.config.type}Axis`] = c,\n destroy: (c) => { config[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.crosshair = c,\n destroy: () => { config.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","ref","config","reactive","elRef","watch","watchEffect","i","_a","toRaw","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":"kxBAMA,MAAMA,EAAQC,EACR,CAAE,KAAAC,CAAA,EAASC,EAAAA,OAAOH,CAAK,EACvBI,EAAcC,EAAAA,gBAAgBL,CAAK,EAEnCM,EAAQC,EAAAA,IAAA,EACRC,EAASC,EAAAA,SAAS,CACtB,WAAY,CAAA,EACZ,YAAa,OACb,UAAW,OACX,QAAS,OACT,MAAO,OACP,MAAO,MAAA,CACR,EACKC,EAAQH,EAAAA,IAAA,EAEdI,OAAAA,EAAAA,MAAMT,EAAM,IAAM,CACZI,EAAM,OACRA,EAAM,MAAM,QAAQJ,EAAK,MAAO,EAAI,CAExC,CAAC,EAEDU,EAAAA,YAAY,IAAM,OAENJ,EAAO,WAAW,IAAIK,GAAKA,EAAE,MAAM,GAC7CC,EAAAR,EAAM,QAAN,MAAAQ,EAAa,gBAAgB,CAAE,GAAGC,EAAAA,MAAMX,EAAY,KAAK,EAAG,GAAGW,QAAMP,CAAM,CAAA,EAC7E,CAAC,EAEDQ,EAAAA,UAAU,IAAM,CACVN,EAAM,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AAA"}
@@ -1,52 +1,20 @@
1
- import { XYContainer, XYComponentCore, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts';
2
- declare const _default: <T>(__VLS_props: any, __VLS_ctx?: {
3
- attrs: any;
4
- emit: any;
5
- slots: any;
6
- }, __VLS_expose?: any, __VLS_setup?: Promise<{
7
- props: {
8
- duration?: number;
1
+ import { XYContainer, XYContainerConfigInterface } from '@unovis/ts';
2
+
3
+ declare const _default: <T>(__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<{
4
+ props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (XYContainerConfigInterface<T> & {
9
5
  data?: T[];
10
- width?: string | number;
11
- xScale?: import("@unovis/ts").ContinuousScale;
12
- yScale?: import("@unovis/ts").ContinuousScale;
13
- tooltip?: Tooltip;
14
- components?: XYComponentCore<T, Partial<import("@unovis/ts").XYComponentConfigInterface<T>>>[];
15
- annotations?: Annotations;
16
- margin?: import("@unovis/ts").Spacing;
17
- padding?: import("@unovis/ts").Spacing;
18
- sizing?: string;
19
- height?: string | number;
20
- svgDefs?: string;
21
- ariaLabel?: string;
22
- xDomain?: [number, number];
23
- xDomainMinConstraint?: [number, number];
24
- xDomainMaxConstraint?: [number, number];
25
- xRange?: [number, number];
26
- yDomain?: [number, number];
27
- yDomainMinConstraint?: [number, number];
28
- yDomainMaxConstraint?: [number, number];
29
- yRange?: [number, number];
30
- yDirection?: string;
31
- xAxis?: Axis<T>;
32
- yAxis?: Axis<T>;
33
- autoMargin?: boolean;
34
- crosshair?: Crosshair<T>;
35
- preventEmptyDomain?: boolean;
36
- scaleByDomain?: boolean;
37
- clipPathExtend?: number;
38
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
39
- expose(exposed: import("vue").ShallowUnwrapRef<{
40
- component: import("vue").Ref<XYContainer<T>, XYContainer<T>>;
6
+ }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
7
+ expose(exposed: import('vue').ShallowUnwrapRef<{
8
+ component: import('vue').Ref<XYContainer<T>, XYContainer<T>>;
41
9
  }>): void;
42
10
  attrs: any;
43
- slots: {
11
+ slots: ReturnType<() => {
44
12
  default?(_: {}): any;
45
- };
46
- emit: any;
47
- }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ }>;
14
+ emit: typeof __VLS_emit;
15
+ }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
48
16
  [key: string]: any;
49
17
  }> & {
50
- __ctx?: any;
18
+ __ctx?: Awaited<typeof __VLS_setup>;
51
19
  };
52
20
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = reactive({\n components: [],\n annotations: undefined,\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as XYContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n }\n})\n\nwatchEffect(() => {\n // watch deep changes in components config\n const t = config.components.map(i => i.config)\n chart.value?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nonMounted(() => {\n if (elRef.value) chart.value = new XYContainer(elRef.value, { ...toRaw(config) }, data.value)\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.components = [...config.components!, c],\n destroy: () => config.components = config.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config[`${c.config.type}Axis`] = c,\n destroy: (c) => { config[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.crosshair = c,\n destroy: () => { config.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","ref","config","reactive","elRef","watch","watchEffect","_a","toRaw","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GACR,EAAE,MAAAC,EAAA,IAASC,EAAOH,CAAK,GACvBI,IAAcC,EAAgBL,CAAK,GAEnCM,IAAQC,EAAgC,GACxCC,IAAS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;AAAA,MAC5B,MAAApB;AAAA,MACA,QAAQ,CAACkB,MAAoBZ,EAAO,YAAYY;AAAA,MAChD,SAAS,MAAM;AAAE,QAAAZ,EAAO,YAAY;AAAA,MAAA;AAAA,IAAU,CAC/C,GAEDU,EAAQK,GAAoB;AAAA,MAC1B,MAAArB;AAAA,MACA,QAAQ,CAACsB,MAAehB,EAAO,UAAUgB;AAAA,MACzC,SAAS,MAAM;AAAE,QAAAhB,EAAO,UAAU;AAAA,MAAA;AAAA,IAAU,CAC7C,GAEDU,EAAQO,GAAwB;AAAA,MAC9B,MAAAvB;AAAA,MACA,QAAQ,CAACwB,MAAmBlB,EAAO,cAAckB;AAAA,MACjD,SAAS,MAAM;AAAE,QAAAlB,EAAO,cAAc;AAAA,MAAA;AAAA,IAAU,CACjD,GAEYmB,EAAA;AAAA,MACX,WAAWrB;AAAA,IAAA,CACZ;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/containers/xy-container/index.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T\">\nimport { XYContainer, XYComponentCore, XYContainerConfigInterface, Tooltip, Crosshair, Axis, Annotations } from '@unovis/ts'\nimport { onMounted, onUnmounted, ref, provide, watch, toRefs, reactive, watchEffect, toRaw } from 'vue'\nimport { componentAccessorKey, tooltipAccessorKey, axisAccessorKey, crosshairAccessorKey, annotationsAccessorKey } from \"../../utils/context\"\nimport { useForwardProps } from \"../../utils/props\"\n\nconst props = defineProps<XYContainerConfigInterface<T> & { data?: T[] }>()\nconst { data } = toRefs(props)\nconst parsedProps = useForwardProps(props)\n\nconst chart = ref<XYContainer<T> | undefined>()\nconst config = reactive({\n components: [],\n annotations: undefined,\n crosshair: undefined,\n tooltip: undefined,\n xAxis: undefined,\n yAxis: undefined,\n}) as XYContainerConfigInterface<T>\nconst elRef = ref<HTMLDivElement>()\n\nwatch(data, () => {\n if (chart.value) {\n chart.value.setData(data.value, true)\n }\n})\n\nwatchEffect(() => {\n // watch deep changes in components config\n const t = config.components.map(i => i.config)\n chart.value?.updateContainer({ ...toRaw(parsedProps.value), ...toRaw(config) })\n})\n\nonMounted(() => {\n if (elRef.value) chart.value = new XYContainer(elRef.value, { ...toRaw(config) }, data.value)\n})\n\nonUnmounted(() => chart.value?.destroy())\n\nprovide(componentAccessorKey, {\n data,\n update: (c: XYComponentCore<T>) => config.components = [...config.components!, c],\n destroy: () => config.components = config.components?.filter(c => !c.isDestroyed()),\n})\n\nprovide(axisAccessorKey, {\n data,\n update: (c: Axis<T>) => config[`${c.config.type}Axis`] = c,\n destroy: (c) => { config[`${c}Axis`] = undefined },\n})\n\nprovide(crosshairAccessorKey, {\n data,\n update: (c: Crosshair<T>) => config.crosshair = c,\n destroy: () => { config.crosshair = undefined },\n})\n\nprovide(tooltipAccessorKey, {\n data,\n update: (t: Tooltip) => config.tooltip = t,\n destroy: () => { config.tooltip = undefined },\n})\n\nprovide(annotationsAccessorKey, {\n data,\n update: (a: Annotations) => config.annotations = a,\n destroy: () => { config.annotations = undefined },\n})\n\ndefineExpose({\n component: chart\n})\n</script>\n\n<template>\n <div data-vis-xy-container ref=\"elRef\" class='unovis-xy-container'>\n <slot />\n </div>\n</template>\n\n\n<style>\n.unovis-xy-container {\n display: block;\n position: relative;\n width: 100%;\n}\n</style>\n"],"names":["props","__props","data","toRefs","parsedProps","useForwardProps","chart","ref","config","reactive","elRef","watch","watchEffect","_a","toRaw","onMounted","XYContainer","onUnmounted","provide","componentAccessorKey","c","axisAccessorKey","crosshairAccessorKey","tooltipAccessorKey","t","annotationsAccessorKey","a","__expose","_createElementBlock","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,UAAMA,IAAQC,GACR,EAAE,MAAAC,EAAA,IAASC,EAAOH,CAAK,GACvBI,IAAcC,EAAgBL,CAAK,GAEnCM,IAAQC,EAAA,GACRC,IAASC,EAAS;AAAA,MACtB,YAAY,CAAA;AAAA,MACZ,aAAa;AAAA,MACb,W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,YAAYY;AAAA,MAChD,SAAS,MAAM;AAAE,QAAAZ,EAAO,YAAY;AAAA,MAAU;AAAA,IAAA,CAC/C,GAEDU,EAAQK,GAAoB;AAAA,MAC1B,MAAArB;AAAA,MACA,QAAQ,CAACsB,MAAehB,EAAO,UAAUgB;AAAA,MACzC,SAAS,MAAM;AAAE,QAAAhB,EAAO,UAAU;AAAA,MAAU;AAAA,IAAA,CAC7C,GAEDU,EAAQO,GAAwB;AAAA,MAC9B,MAAAvB;AAAA,MACA,QAAQ,CAACwB,MAAmBlB,EAAO,cAAckB;AAAA,MACjD,SAAS,MAAM;AAAE,QAAAlB,EAAO,cAAc;AAAA,MAAU;AAAA,IAAA,CACjD,GAEDmB,EAAa;AAAA,MACX,WAAWrB;AAAA,IAAA,CACZ,mBAICsB,EAEM,OAAA;AAAA,MAFD,yBAAA;AAAA,eAA0B;AAAA,MAAJ,KAAIlB;AAAA,MAAQ,OAAM;AAAA,IAAA;MAC3CmB,EAAQC,EAAA,QAAA,SAAA;AAAA,IAAA;;;"}
package/containers.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { default as VisXYContainer } from "./containers/xy-container/index";
2
- export { default as VisSingleContainer } from "./containers/single-container/index";
1
+ export { default as VisXYContainer } from './containers/xy-container/index';
2
+ export { default as VisSingleContainer } from './containers/single-container/index';
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("@unovis/ts"),s=require("../../utils/props.cjs"),p=d.BulletLegend.selectors,v=e.defineComponent({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletSpacing:{},bulletShape:{},orientation:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(c,{expose:i}){const r=c;e.computed(()=>r.data);const l=s.useForwardProps(r),o=e.ref(),n=e.ref();return e.onMounted(()=>{e.nextTick(()=>{n.value&&(o.value=new d.BulletLegend(n.value,{...l.value,renderIntoProvidedDomNode:!0}))})}),e.onUnmounted(()=>{var t;(t=o.value)==null||t.destroy()}),e.watch(l,(t,u)=>{var a;s.arePropsEqual(t,u)||(a=o.value)==null||a.update(l.value)}),i({component:o}),(t,u)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:n},null,512))}});exports.VisBulletLegendSelectors=p;exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@unovis/ts"),s=require("../../utils/props.cjs"),p=i.BulletLegend.selectors,f=e.defineComponent({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletSpacing:{},bulletShape:{type:[Function,null]},orientation:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(c,{expose:d}){const r=c;e.computed(()=>r.data);const n=s.useForwardProps(r),o=e.ref(),l=e.ref();return e.onMounted(()=>{e.nextTick(()=>{l.value&&(o.value=new i.BulletLegend(l.value,{...n.value,renderIntoProvidedDomNode:!0}))})}),e.onUnmounted(()=>{var t;(t=o.value)==null||t.destroy()}),e.watch(n,(t,u)=>{var a;s.arePropsEqual(t,u)||(a=o.value)==null||a.setConfig(n.value)}),d({component:o}),(t,u)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:l},null,512))}});exports.VisBulletLegendSelectors=p;exports.default=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/html-components/bullet-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = BulletLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<BulletLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new BulletLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.update(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n</script>\n\n<template>\n <div data-vis-bullet-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-bullet-legend] {\n display:block;\n }\n</style>\n"],"names":["VisBulletLegendSelectors","BulletLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":"8LA8CaA,EAA2BC,EAAAA,aAAa,uRArCrD,MAAMC,EAAQC,EAEDC,EAAA,SAAS,IAAMF,EAAM,IAAI,EAEhC,MAAAG,EAASC,kBAAgBJ,CAAK,EAG9BK,EAAYC,EAAAA,IAAkB,EAC9BC,EAAQD,EAAAA,IAAoB,EAElCE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACCF,EAAA,MAAQ,IAAIN,EAAA,aAAaQ,EAAM,MAAO,CAAE,GAAGJ,EAAO,MAAO,0BAA2B,EAAA,CAAM,EAAA,CAGrG,CAAA,CACF,EAEDO,EAAAA,YAAY,IAAM,QAChBC,EAAAN,EAAU,QAAV,MAAAM,EAAiB,SAAQ,CAE1B,EAEKC,EAAAA,MAAAT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAA,cAAcF,EAAMC,CAAI,IACjBH,EAAAN,EAAA,QAAA,MAAAM,EAAO,OAAOR,EAAO,MACjC,CACD,EAGYa,EAAA,CACX,UAAAX,CAAA,CACD"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/html-components/bullet-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = BulletLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<BulletLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new BulletLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n</script>\n\n<template>\n <div data-vis-bullet-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-bullet-legend] {\n display:block;\n }\n</style>\n"],"names":["VisBulletLegendSelectors","BulletLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":"8LA8CaA,EAA2BC,EAAAA,aAAa,2SArCrD,MAAMC,EAAQC,EAEDC,EAAAA,SAAS,IAAMF,EAAM,IAAI,EAEtC,MAAMG,EAASC,EAAAA,gBAAgBJ,CAAK,EAG9BK,EAAYC,EAAAA,IAAA,EACZC,EAAQD,EAAAA,IAAA,EAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACTF,EAAU,MAAQ,IAAIN,EAAAA,aAAaQ,EAAM,MAAO,CAAE,GAAGJ,EAAO,MAAO,0BAA2B,EAAA,CAAM,EAGtG,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,QAChBC,EAAAN,EAAU,QAAV,MAAAM,EAAiB,SAEnB,CAAC,EAEDC,EAAAA,MAAMT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BH,EAAAN,EAAU,QAAV,MAAAM,EAAiB,UAAUR,EAAO,MAEtC,CAAC,EAGDa,EAAa,CACX,UAAAX,CAAA,CACD,wBAQCY,EAAAA,mBAAyC,MAAA,CAApC,yBAAA,WAA2B,QAAJ,IAAIV,CAAA"}
@@ -1,76 +1,20 @@
1
- import { BulletLegend, BulletLegendItemInterface } from '@unovis/ts';
2
- export declare const VisBulletLegendSelectors: typeof import("@unovis/ts/dist/components/bullet-legend/style");
3
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
- items: {
5
- type: import("vue").PropType<BulletLegendItemInterface[]>;
6
- required: true;
7
- };
8
- labelClassName: {
9
- type: import("vue").PropType<string>;
10
- };
11
- onLegendItemClick: {
12
- type: import("vue").PropType<(d: BulletLegendItemInterface, i: number) => void>;
13
- };
14
- labelFontSize: {
15
- type: import("vue").PropType<string>;
16
- };
17
- labelMaxWidth: {
18
- type: import("vue").PropType<string>;
19
- };
20
- bulletSize: {
21
- type: import("vue").PropType<string>;
22
- };
23
- bulletSpacing: {
24
- type: import("vue").PropType<number>;
25
- };
26
- bulletShape: {
27
- type: import("vue").PropType<import("@unovis/ts").GenericAccessor<import("@unovis/ts").BulletShape, BulletLegendItemInterface>>;
28
- };
29
- orientation: {
30
- type: import("vue").PropType<string>;
31
- };
32
- renderIntoProvidedDomNode: {
33
- type: import("vue").PropType<boolean>;
34
- };
35
- data: {
36
- type: import("vue").PropType<never>;
37
- };
38
- }>, {
39
- component: import("vue").Ref<BulletLegend, BulletLegend>;
40
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
41
- items: {
42
- type: import("vue").PropType<BulletLegendItemInterface[]>;
1
+ import { BulletLegend, BulletLegendConfigInterface } from '@unovis/ts';
2
+
3
+ export declare const VisBulletLegendSelectors: typeof import("@unovis/ts/components/bullet-legend/style");
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<BulletLegendConfigInterface & {
5
+ data?: null;
6
+ }>>, {
7
+ component: import('vue').Ref<BulletLegend, BulletLegend>;
8
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<BulletLegendConfigInterface & {
9
+ data?: null;
10
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToRuntimeProps<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: import('vue').PropType<T[K]>;
43
18
  required: true;
44
19
  };
45
- labelClassName: {
46
- type: import("vue").PropType<string>;
47
- };
48
- onLegendItemClick: {
49
- type: import("vue").PropType<(d: BulletLegendItemInterface, i: number) => void>;
50
- };
51
- labelFontSize: {
52
- type: import("vue").PropType<string>;
53
- };
54
- labelMaxWidth: {
55
- type: import("vue").PropType<string>;
56
- };
57
- bulletSize: {
58
- type: import("vue").PropType<string>;
59
- };
60
- bulletSpacing: {
61
- type: import("vue").PropType<number>;
62
- };
63
- bulletShape: {
64
- type: import("vue").PropType<import("@unovis/ts").GenericAccessor<import("@unovis/ts").BulletShape, BulletLegendItemInterface>>;
65
- };
66
- orientation: {
67
- type: import("vue").PropType<string>;
68
- };
69
- renderIntoProvidedDomNode: {
70
- type: import("vue").PropType<boolean>;
71
- };
72
- data: {
73
- type: import("vue").PropType<never>;
74
- };
75
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
76
- export default _default;
20
+ };
@@ -1,7 +1,7 @@
1
- import { defineComponent as c, computed as p, ref as d, onMounted as m, nextTick as f, onUnmounted as v, watch as b, createElementBlock as _, openBlock as g } from "vue";
2
- import { BulletLegend as u } from "@unovis/ts";
1
+ import { defineComponent as c, computed as p, ref as u, onMounted as m, nextTick as f, onUnmounted as v, watch as b, createElementBlock as g, openBlock as _ } from "vue";
2
+ import { BulletLegend as i } from "@unovis/ts";
3
3
  import { useForwardProps as x, arePropsEqual as k } from "../../utils/props.js";
4
- const y = u.selectors, P = /* @__PURE__ */ c({
4
+ const h = i.selectors, C = /* @__PURE__ */ c({
5
5
  __name: "index",
6
6
  props: {
7
7
  items: {},
@@ -11,28 +11,28 @@ const y = u.selectors, P = /* @__PURE__ */ c({
11
11
  labelMaxWidth: {},
12
12
  bulletSize: {},
13
13
  bulletSpacing: {},
14
- bulletShape: {},
14
+ bulletShape: { type: [Function, null] },
15
15
  orientation: {},
16
16
  renderIntoProvidedDomNode: { type: Boolean },
17
17
  data: {}
18
18
  },
19
- setup(i, { expose: s }) {
20
- const l = i;
19
+ setup(d, { expose: s }) {
20
+ const l = d;
21
21
  p(() => l.data);
22
- const t = x(l), o = d(), n = d();
22
+ const t = x(l), o = u(), n = u();
23
23
  return m(() => {
24
24
  f(() => {
25
- n.value && (o.value = new u(n.value, { ...t.value, renderIntoProvidedDomNode: !0 }));
25
+ n.value && (o.value = new i(n.value, { ...t.value, renderIntoProvidedDomNode: !0 }));
26
26
  });
27
27
  }), v(() => {
28
28
  var e;
29
29
  (e = o.value) == null || e.destroy();
30
30
  }), b(t, (e, a) => {
31
31
  var r;
32
- k(e, a) || (r = o.value) == null || r.update(t.value);
32
+ k(e, a) || (r = o.value) == null || r.setConfig(t.value);
33
33
  }), s({
34
34
  component: o
35
- }), (e, a) => (g(), _("div", {
35
+ }), (e, a) => (_(), g("div", {
36
36
  "data-vis-bullet-legend": "",
37
37
  ref_key: "elRef",
38
38
  ref: n
@@ -40,7 +40,7 @@ const y = u.selectors, P = /* @__PURE__ */ c({
40
40
  }
41
41
  });
42
42
  export {
43
- y as VisBulletLegendSelectors,
44
- P as default
43
+ h as VisBulletLegendSelectors,
44
+ C as default
45
45
  };
46
46
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/html-components/bullet-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = BulletLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<BulletLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new BulletLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.update(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n</script>\n\n<template>\n <div data-vis-bullet-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-bullet-legend] {\n display:block;\n }\n</style>\n"],"names":["VisBulletLegendSelectors","BulletLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose"],"mappings":";;;AA8CO,MAAMA,IAA2BC,EAAa;;;;;;;;;;;;;;;;AArCrD,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEhC,UAAAG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAkB,GAC9BC,IAAQD,EAAoB;AAElC,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACCF,EAAA,QAAQ,IAAIN,EAAaQ,EAAM,OAAO,EAAE,GAAGJ,EAAO,OAAO,2BAA2B,GAAA,CAAM;AAAA,MAAA,CAGrG;AAAA,IAAA,CACF,GAEDO,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAU,UAAV,QAAAM,EAAiB;AAAA,IAAQ,CAE1B,GAEKC,EAAAT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MACjBH,IAAAN,EAAA,UAAA,QAAAM,EAAO,OAAOR,EAAO;AAAA,IACjC,CACD,GAGYa,EAAA;AAAA,MACX,WAAAX;AAAA,IAAA,CACD;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/bullet-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { BulletLegend, BulletLegendConfigInterface, BulletLegendItemInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = BulletLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<BulletLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new BulletLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisBulletLegendSelectors = BulletLegend.selectors\n</script>\n\n<template>\n <div data-vis-bullet-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-bullet-legend] {\n display:block;\n }\n</style>\n"],"names":["VisBulletLegendSelectors","BulletLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":";;;AA8CO,MAAMA,IAA2BC,EAAa;;;;;;;;;;;;;;;;AArCrD,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEtC,UAAMG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIN,EAAaQ,EAAM,OAAO,EAAE,GAAGJ,EAAO,OAAO,2BAA2B,GAAA,CAAM;AAAA,MAGtG,CAAC;AAAA,IACH,CAAC,GAEDO,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAU,UAAV,QAAAM,EAAiB;AAAA,IAEnB,CAAC,GAEDC,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BH,IAAAN,EAAU,UAAV,QAAAM,EAAiB,UAAUR,EAAO;AAAA,IAEtC,CAAC,GAGDa,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,mBAQCY,EAAyC,OAAA;AAAA,MAApC,0BAAA;AAAA,eAA2B;AAAA,MAAJ,KAAIV;AAAA,IAAA;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@unovis/ts"),a=require("../../utils/props.cjs"),p=c.FlowLegend.selectors,f=e.defineComponent({__name:"index",props:{customWidth:{},items:{},lineColor:{},labelColor:{},labelFontSize:{},arrowSymbol:{},arrowColor:{},onLegendItemClick:{type:Function},data:{}},setup(d,{expose:i}){const l=d;e.computed(()=>l.data);const n=a.useForwardProps(l),t=e.ref(),r=e.ref();return e.onMounted(()=>{e.nextTick(()=>{r.value&&(t.value=new c.FlowLegend(r.value,{...n.value,renderIntoProvidedDomNode:!0}))})}),e.onUnmounted(()=>{var o;(o=t.value)==null||o.destroy()}),e.watch(n,(o,s)=>{var u;a.arePropsEqual(o,s)||(u=t.value)==null||u.setConfig(n.value)}),i({component:t}),(o,s)=>(e.openBlock(),e.createElementBlock("div",{"data-vis-flow-legend":"",ref_key:"elRef",ref:r},null,512))}});exports.VisFlowLegendSelectors=p;exports.default=f;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { FlowLegend, FlowLegendConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = FlowLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<FlowLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new FlowLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisFlowLegendSelectors = FlowLegend.selectors\n</script>\n\n<template>\n <div data-vis-flow-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-flow-legend] {\n display:block;\n }\n</style>\n"],"names":["VisFlowLegendSelectors","FlowLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":"8LA8CaA,EAAyBC,EAAAA,WAAW,qNArCjD,MAAMC,EAAQC,EAEDC,EAAAA,SAAS,IAAMF,EAAM,IAAI,EAEtC,MAAMG,EAASC,EAAAA,gBAAgBJ,CAAK,EAG9BK,EAAYC,EAAAA,IAAA,EACZC,EAAQD,EAAAA,IAAA,EAEdE,OAAAA,EAAAA,UAAU,IAAM,CACdC,EAAAA,SAAS,IAAM,CACVF,EAAM,QACTF,EAAU,MAAQ,IAAIN,EAAAA,WAAWQ,EAAM,MAAO,CAAE,GAAGJ,EAAO,MAAO,0BAA2B,EAAA,CAAM,EAGpG,CAAC,CACH,CAAC,EAEDO,EAAAA,YAAY,IAAM,QAChBC,EAAAN,EAAU,QAAV,MAAAM,EAAiB,SAEnB,CAAC,EAEDC,EAAAA,MAAMT,EAAQ,CAACU,EAAMC,IAAS,OACvBC,EAAAA,cAAcF,EAAMC,CAAI,IAC3BH,EAAAN,EAAU,QAAV,MAAAM,EAAiB,UAAUR,EAAO,MAEtC,CAAC,EAGDa,EAAa,CACX,UAAAX,CAAA,CACD,wBAQCY,EAAAA,mBAAuC,MAAA,CAAlC,uBAAA,WAAyB,QAAJ,IAAIV,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { FlowLegend, FlowLegendConfigInterface } from '@unovis/ts';
2
+
3
+ export declare const VisFlowLegendSelectors: any;
4
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FlowLegendConfigInterface & {
5
+ data?: null;
6
+ }>>, {
7
+ component: import('vue').Ref<FlowLegend, FlowLegend>;
8
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FlowLegendConfigInterface & {
9
+ data?: null;
10
+ }>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
11
+ export default _default;
12
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+ type __VLS_TypePropsToRuntimeProps<T> = {
14
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
15
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
+ } : {
17
+ type: import('vue').PropType<T[K]>;
18
+ required: true;
19
+ };
20
+ };
@@ -0,0 +1,44 @@
1
+ import { defineComponent as u, computed as m, ref as s, onMounted as p, nextTick as f, onUnmounted as v, watch as w, createElementBlock as _, openBlock as g } from "vue";
2
+ import { FlowLegend as c } from "@unovis/ts";
3
+ import { useForwardProps as C, arePropsEqual as k } from "../../utils/props.js";
4
+ const b = c.selectors, h = /* @__PURE__ */ u({
5
+ __name: "index",
6
+ props: {
7
+ customWidth: {},
8
+ items: {},
9
+ lineColor: {},
10
+ labelColor: {},
11
+ labelFontSize: {},
12
+ arrowSymbol: {},
13
+ arrowColor: {},
14
+ onLegendItemClick: { type: Function },
15
+ data: {}
16
+ },
17
+ setup(d, { expose: i }) {
18
+ const r = d;
19
+ m(() => r.data);
20
+ const t = C(r), o = s(), n = s();
21
+ return p(() => {
22
+ f(() => {
23
+ n.value && (o.value = new c(n.value, { ...t.value, renderIntoProvidedDomNode: !0 }));
24
+ });
25
+ }), v(() => {
26
+ var e;
27
+ (e = o.value) == null || e.destroy();
28
+ }), w(t, (e, l) => {
29
+ var a;
30
+ k(e, l) || (a = o.value) == null || a.setConfig(t.value);
31
+ }), i({
32
+ component: o
33
+ }), (e, l) => (g(), _("div", {
34
+ "data-vis-flow-legend": "",
35
+ ref_key: "elRef",
36
+ ref: n
37
+ }, null, 512));
38
+ }
39
+ });
40
+ export {
41
+ b as VisFlowLegendSelectors,
42
+ h as default
43
+ };
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/html-components/flow-legend/index.vue"],"sourcesContent":["<script setup lang=\"ts\" >\n// !!! This code was automatically generated. You should not change it !!!\nimport { FlowLegend, FlowLegendConfigInterface } from '@unovis/ts'\nimport { onMounted, onUnmounted, computed, ref, watch, nextTick } from 'vue'\nimport { arePropsEqual, useForwardProps } from '../../utils/props'\n\n\n// data and required props \ntype Props = FlowLegendConfigInterface\nconst props = defineProps<Props & { data?: null }>()\n\nconst data = computed(() => props.data)\n// config\nconst config = useForwardProps(props)\n\n// component declaration\nconst component = ref<FlowLegend>()\nconst elRef = ref<HTMLDivElement>()\n\nonMounted(() => {\n nextTick(() => {\n if(elRef.value)\n component.value = new FlowLegend(elRef.value, { ...config.value, renderIntoProvidedDomNode: true })\n \n \n })\n})\n\nonUnmounted(() => {\n component.value?.destroy()\n \n})\n\nwatch(config, (curr, prev) => {\n if (!arePropsEqual(curr, prev)) {\n component.value?.setConfig(config.value)\n }\n})\n\n\ndefineExpose({\n component\n})\n</script>\n\n<script lang=\"ts\">\nexport const VisFlowLegendSelectors = FlowLegend.selectors\n</script>\n\n<template>\n <div data-vis-flow-legend ref=\"elRef\"/>\n</template>\n\n\n<style>\n [data-vis-flow-legend] {\n display:block;\n }\n</style>\n"],"names":["VisFlowLegendSelectors","FlowLegend","props","__props","computed","config","useForwardProps","component","ref","elRef","onMounted","nextTick","onUnmounted","_a","watch","curr","prev","arePropsEqual","__expose","_createElementBlock"],"mappings":";;;AA8CO,MAAMA,IAAyBC,EAAW;;;;;;;;;;;;;;AArCjD,UAAMC,IAAQC;AAED,IAAAC,EAAS,MAAMF,EAAM,IAAI;AAEtC,UAAMG,IAASC,EAAgBJ,CAAK,GAG9BK,IAAYC,EAAA,GACZC,IAAQD,EAAA;AAEd,WAAAE,EAAU,MAAM;AACd,MAAAC,EAAS,MAAM;AACb,QAAGF,EAAM,UACTF,EAAU,QAAQ,IAAIN,EAAWQ,EAAM,OAAO,EAAE,GAAGJ,EAAO,OAAO,2BAA2B,GAAA,CAAM;AAAA,MAGpG,CAAC;AAAA,IACH,CAAC,GAEDO,EAAY,MAAM;;AAChB,OAAAC,IAAAN,EAAU,UAAV,QAAAM,EAAiB;AAAA,IAEnB,CAAC,GAEDC,EAAMT,GAAQ,CAACU,GAAMC,MAAS;;AAC5B,MAAKC,EAAcF,GAAMC,CAAI,MAC3BH,IAAAN,EAAU,UAAV,QAAAM,EAAiB,UAAUR,EAAO;AAAA,IAEtC,CAAC,GAGDa,EAAa;AAAA,MACX,WAAAX;AAAA,IAAA,CACD,mBAQCY,EAAuC,OAAA;AAAA,MAAlC,wBAAA;AAAA,eAAyB;AAAA,MAAJ,KAAIV;AAAA,IAAA;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.cjs");;/* empty css */exports.VisFlowLegendSelectors=e.VisFlowLegendSelectors;exports.default=e.default;
2
+ //# sourceMappingURL=index3.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index3.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import e from "./index.js";
2
+ import { VisFlowLegendSelectors as f } from "./index.js";
3
+ /* empty css */
4
+ export {
5
+ f as VisFlowLegendSelectors,
6
+ e as default
7
+ };
8
+ //# sourceMappingURL=index3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}