vue-data-ui 3.0.0-next.0 → 3.0.0-next.10

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 (104) hide show
  1. package/README.md +109 -68
  2. package/dist/{Arrow-CzFtSJ1v.js → Arrow-8Wnel_lw.js} +1 -1
  3. package/dist/{BaseDraggableDialog-0S5xhs2P.js → BaseDraggableDialog-D-IcFGSE.js} +2 -2
  4. package/dist/{BaseIcon-DoDjTdD5.js → BaseIcon-RLse0qy8.js} +1 -1
  5. package/dist/{ColorPicker-BGRchgqQ.js → ColorPicker-D9dpnizT.js} +2 -2
  6. package/dist/{DataTable-BBbOgI-a.js → DataTable-IzCJ9gby.js} +2 -2
  7. package/dist/{Legend-Q4bOb-Nf.js → Legend-SfJ53F5x.js} +12 -11
  8. package/dist/{NonSvgPenAndPaper-DNKRvsBB.js → NonSvgPenAndPaper-3oZlBiCt.js} +3 -3
  9. package/dist/{PackageVersion-D0VPY8-5.js → PackageVersion-u8Hc4rJi.js} +1 -1
  10. package/dist/{PenAndPaper-DhBJsnob.js → PenAndPaper-6iArlmj7.js} +32 -32
  11. package/dist/{Shape-DbsLJ-SE.js → Shape-vSWSsIaU.js} +1 -1
  12. package/dist/{Slicer-DZEFp2GU.js → Slicer-CPMTQDCj.js} +2 -2
  13. package/dist/{SparkTooltip-CoOJR62O.js → SparkTooltip-sazd7MmK.js} +1 -1
  14. package/dist/{Title-D29apS4l.js → Title-CTsOHFNh.js} +1 -1
  15. package/dist/Tooltip-4cn1szzA.js +157 -0
  16. package/dist/{UserOptions-Bdit7AWO.js → UserOptions-X9Ckvwp-.js} +137 -129
  17. package/dist/{dom-to-png-BdPIrHOF.js → dom-to-png-C3BKllTG.js} +1 -1
  18. package/dist/img-D9CjuW6g.js +33 -0
  19. package/dist/{index-DMqAxz7R.js → index-DBSLpcPM.js} +1515 -1426
  20. package/dist/pdf-V4tIjxUb.js +58 -0
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +1098 -222
  23. package/dist/types/vue-data-ui.d.ts +1098 -222
  24. package/dist/useLoading-Bt5Doa8m.js +28 -0
  25. package/dist/{useNestedProp-YgN3FV_8.js → useNestedProp-BQFkJRtL.js} +1 -1
  26. package/dist/{usePrinter-COkTjv6C.js → usePrinter-CjyE7ii3.js} +2 -2
  27. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DG97x2hL.js} +139 -132
  28. package/dist/vue-data-ui-BgN2CPSV.js +320 -0
  29. package/dist/vue-data-ui.js +53 -52
  30. package/dist/{vue-ui-3d-bar-Ojgjl20n.js → vue-ui-3d-bar-DlnRLAbw.js} +261 -245
  31. package/dist/{vue-ui-accordion-P6eFHGQp.js → vue-ui-accordion-yWXqkLfQ.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-IcMpAhiw.js → vue-ui-age-pyramid-C_4kFlWe.js} +233 -217
  33. package/dist/{vue-ui-annotator-Bk7d86-x.js → vue-ui-annotator-DVXA74Er.js} +2 -2
  34. package/dist/{vue-ui-bullet-DCvWbCPk.js → vue-ui-bullet-DoxSEGR4.js} +172 -156
  35. package/dist/{vue-ui-candlestick-DCf-88Yv.js → vue-ui-candlestick-Bke-ZK92.js} +271 -254
  36. package/dist/{vue-ui-carousel-table-DEsl0XUh.js → vue-ui-carousel-table-CqRuHaU6.js} +17 -16
  37. package/dist/{vue-ui-chestnut-Cg10-3wu.js → vue-ui-chestnut-BYIowBXd.js} +419 -403
  38. package/dist/{vue-ui-chord-BWYzR6vf.js → vue-ui-chord-DyA4jvyD.js} +256 -240
  39. package/dist/{vue-ui-circle-pack-CO2Ra2-5.js → vue-ui-circle-pack-BVT22rGO.js} +230 -214
  40. package/dist/{vue-ui-cursor-BbYHJDbV.js → vue-ui-cursor-B3RyMKwx.js} +2 -2
  41. package/dist/{vue-ui-dashboard-DkCnNuse.js → vue-ui-dashboard-Cgqpnpao.js} +62 -62
  42. package/dist/{vue-ui-digits-DRsphHt2.js → vue-ui-digits-Db9yuqjo.js} +2 -2
  43. package/dist/vue-ui-donut-CdsBUcPD.js +1547 -0
  44. package/dist/{vue-ui-donut-evolution-B5F2-0bh.js → vue-ui-donut-evolution-D5eUZJuU.js} +370 -357
  45. package/dist/{vue-ui-dumbbell-DqqSxoSh.js → vue-ui-dumbbell-CWgs8sB6.js} +216 -200
  46. package/dist/{vue-ui-flow-CTIcUJgV.js → vue-ui-flow-CL5jxEBp.js} +217 -201
  47. package/dist/{vue-ui-funnel-k7KD7Xoc.js → vue-ui-funnel-DT9BzBp3.js} +213 -197
  48. package/dist/{vue-ui-galaxy-C9EHaP4I.js → vue-ui-galaxy-hwr5J-b7.js} +215 -202
  49. package/dist/{vue-ui-gauge-CBiM_1-n.js → vue-ui-gauge-D_fnRyKs.js} +220 -204
  50. package/dist/{vue-ui-gizmo-CAc7b2oK.js → vue-ui-gizmo-CLni95HP.js} +3 -3
  51. package/dist/{vue-ui-heatmap-B3ubrP2v.js → vue-ui-heatmap-Bd8qoV2F.js} +244 -224
  52. package/dist/{vue-ui-history-plot-XCqccO3b.js → vue-ui-history-plot-BJvaJkPO.js} +268 -252
  53. package/dist/{vue-ui-kpi-DTGMDjaZ.js → vue-ui-kpi-B7uO6vRA.js} +3 -3
  54. package/dist/{vue-ui-mini-loader-Cn_7nvVq.js → vue-ui-mini-loader-CTDfGO91.js} +2 -2
  55. package/dist/{vue-ui-molecule-BugMXFAK.js → vue-ui-molecule-BSE6LaGt.js} +204 -188
  56. package/dist/{vue-ui-mood-radar-Cv4dHZPL.js → vue-ui-mood-radar-CN24P-Tk.js} +206 -190
  57. package/dist/vue-ui-nested-donuts-CWL3uP-u.js +1212 -0
  58. package/dist/{vue-ui-onion-Bha2hRAb.js → vue-ui-onion-Bib32nel.js} +196 -180
  59. package/dist/{vue-ui-parallel-coordinate-plot-DWJ2DWx4.js → vue-ui-parallel-coordinate-plot-l0O-i93L.js} +194 -178
  60. package/dist/{vue-ui-quadrant-BKHZoTml.js → vue-ui-quadrant-D0pzeobL.js} +321 -305
  61. package/dist/{vue-ui-quick-chart-D_k3lbU8.js → vue-ui-quick-chart-CaLIrn96.js} +347 -331
  62. package/dist/{vue-ui-radar-Co4EOjSk.js → vue-ui-radar-DXJ1WS7s.js} +193 -177
  63. package/dist/{vue-ui-rating-dtNN0EdX.js → vue-ui-rating-C6qqU59J.js} +2 -2
  64. package/dist/{vue-ui-relation-circle-CR4UpQzM.js → vue-ui-relation-circle-SpPQ2WhH.js} +188 -172
  65. package/dist/{vue-ui-ridgeline-BKX97EnR.js → vue-ui-ridgeline-BMsbiTjU.js} +212 -196
  66. package/dist/{vue-ui-rings-EPTwyt6D.js → vue-ui-rings-ES4LhrT0.js} +223 -210
  67. package/dist/{vue-ui-scatter-BlxzblSR.js → vue-ui-scatter-yV6nLFs6.js} +288 -273
  68. package/dist/{vue-ui-skeleton-CjN2ZdgT.js → vue-ui-skeleton-7gkY0oe-.js} +3 -3
  69. package/dist/{vue-ui-smiley-DdF_ErYG.js → vue-ui-smiley-CYLqgGm1.js} +2 -2
  70. package/dist/{vue-ui-spark-trend-RdOlCuT9.js → vue-ui-spark-trend-kQ3dsaGO.js} +3 -3
  71. package/dist/{vue-ui-sparkbar-DWufRGcN.js → vue-ui-sparkbar-Bfe8SMeM.js} +3 -3
  72. package/dist/{vue-ui-sparkgauge-IP1O3qyT.js → vue-ui-sparkgauge-Dxts3pPS.js} +3 -3
  73. package/dist/{vue-ui-sparkhistogram-Cnv9xZ8H.js → vue-ui-sparkhistogram-CC6-gQ2R.js} +4 -4
  74. package/dist/{vue-ui-sparkline-CYgeD5V3.js → vue-ui-sparkline-Ba6FPyOS.js} +3 -3
  75. package/dist/{vue-ui-sparkstackbar-BCwoK9xd.js → vue-ui-sparkstackbar-CQr6s7Ij.js} +3 -3
  76. package/dist/{vue-ui-stackbar-CqFIvfrK.js → vue-ui-stackbar-cJAK-x5g.js} +497 -474
  77. package/dist/{vue-ui-strip-plot-Dq-kDRai.js → vue-ui-strip-plot-DyU5K6-X.js} +241 -225
  78. package/dist/{vue-ui-table-vaIdQnPl.js → vue-ui-table-B_KeSP8f.js} +3 -3
  79. package/dist/{vue-ui-table-heatmap-U_Td0cdh.js → vue-ui-table-heatmap-CzGGjLl6.js} +26 -25
  80. package/dist/{vue-ui-table-sparkline-DkOaHx5L.js → vue-ui-table-sparkline-BoW1Y5Hh.js} +8 -7
  81. package/dist/{vue-ui-thermometer-CzckBZgs.js → vue-ui-thermometer-ROH_nY6z.js} +170 -154
  82. package/dist/{vue-ui-timer-DSdUshUs.js → vue-ui-timer-DmgpfYIT.js} +5 -5
  83. package/dist/vue-ui-tiremarks-CkmD6BQB.js +358 -0
  84. package/dist/vue-ui-treemap-BOxeG-ql.js +965 -0
  85. package/dist/vue-ui-vertical-bar-BoKi7wHJ.js +1106 -0
  86. package/dist/{vue-ui-waffle-DusUVY6y.js → vue-ui-waffle-BIM_Qg3a.js} +234 -221
  87. package/dist/vue-ui-wheel-CGZgFZax.js +352 -0
  88. package/dist/{vue-ui-word-cloud-_7uYjJ5A.js → vue-ui-word-cloud-Dt-X1dFo.js} +249 -233
  89. package/dist/{vue-ui-world-COIyBHII.js → vue-ui-world-BrPqffT7.js} +239 -223
  90. package/dist/vue-ui-xy-CYko0Jmo.js +2982 -0
  91. package/dist/{vue-ui-xy-canvas-CuYRyub2.js → vue-ui-xy-canvas-DVRWryRe.js} +447 -431
  92. package/package.json +2 -2
  93. package/dist/Tooltip-hVZUY_s5.js +0 -149
  94. package/dist/img-BeMVTwmF.js +0 -20
  95. package/dist/pdf-DPxOdzfi.js +0 -51
  96. package/dist/useMouse-AicQS8Vf.js +0 -13
  97. package/dist/vue-data-ui-nceqWRts.js +0 -301
  98. package/dist/vue-ui-donut-DSE7ubVv.js +0 -1315
  99. package/dist/vue-ui-nested-donuts-CYe0Are_.js +0 -1154
  100. package/dist/vue-ui-tiremarks-B2WWklqG.js +0 -342
  101. package/dist/vue-ui-treemap-D1dgDhjG.js +0 -952
  102. package/dist/vue-ui-vertical-bar-Dd4sYeAC.js +0 -958
  103. package/dist/vue-ui-wheel-ClsKBh52.js +0 -336
  104. package/dist/vue-ui-xy-C_OUyzTC.js +0 -3135
@@ -1,5 +1,5 @@
1
- import { z as p, A as v, u as w, B as A } from "./index-DMqAxz7R.js";
2
- import { d as M } from "./dom-to-png-BdPIrHOF.js";
1
+ import { z as p, A as v, u as w, B as A } from "./index-DBSLpcPM.js";
2
+ import { d as M } from "./dom-to-png-C3BKllTG.js";
3
3
  import { createElementBlock as d, openBlock as n, createElementVNode as r, normalizeStyle as c, toDisplayString as u, createCommentVNode as a, normalizeClass as y, createStaticVNode as F, withDirectives as N, vModelCheckbox as g, vModelText as C, renderSlot as O, Fragment as L, renderList as G } from "vue";
4
4
  import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const m = {
@@ -1,28 +1,29 @@
1
- import { defineAsyncComponent as L, ref as g, computed as f, onMounted as be, watch as Q, onBeforeUnmount as ke, createElementBlock as n, openBlock as r, unref as o, normalizeStyle as M, normalizeClass as Z, createBlock as w, createCommentVNode as i, createElementVNode as x, createSlots as we, withCtx as p, renderSlot as m, normalizeProps as $, guardReactiveProps as O, createVNode as xe, Fragment as T, renderList as N, toDisplayString as A } from "vue";
2
- import { u as _e, o as Ce, e as ee, g as Le, c as $e, l as Oe, D as Ae, d as Be, i as B, f as P, X as Pe, a as Fe } from "./index-DMqAxz7R.js";
3
- import { u as te } from "./useNestedProp-YgN3FV_8.js";
4
- import { u as Ie } from "./usePrinter-COkTjv6C.js";
5
- import { u as Se } from "./useUserOptionState-BIvW1Kz7.js";
6
- import { u as He } from "./useChartAccessibility-9icAAmYg.js";
7
- import Me from "./Legend-Q4bOb-Nf.js";
8
- import Te from "./Title-D29apS4l.js";
9
- import { _ as Ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- const Ue = ["id"], ze = {
1
+ import { defineAsyncComponent as $, ref as g, computed as f, onMounted as ke, watch as Z, onBeforeUnmount as we, createElementBlock as n, openBlock as r, unref as o, normalizeStyle as T, normalizeClass as ee, createBlock as C, createCommentVNode as i, createElementVNode as _, createSlots as xe, withCtx as b, renderSlot as m, normalizeProps as O, guardReactiveProps as A, createVNode as Ce, Fragment as U, renderList as N, toDisplayString as B } from "vue";
2
+ import { u as _e, o as Le, e as te, g as $e, c as Oe, l as Ae, D as Be, d as Pe, i as P, f as S, X as Se, a as Ie } from "./index-DBSLpcPM.js";
3
+ import { u as ae } from "./useNestedProp-BQFkJRtL.js";
4
+ import { u as Fe } from "./usePrinter-CjyE7ii3.js";
5
+ import { u as He } from "./useUserOptionState-BIvW1Kz7.js";
6
+ import { u as Me } from "./useChartAccessibility-9icAAmYg.js";
7
+ import Te from "./Legend-SfJ53F5x.js";
8
+ import Ue from "./Title-CTsOHFNh.js";
9
+ import Ne from "./img-D9CjuW6g.js";
10
+ import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ const ze = ["id"], Ee = {
11
12
  key: 1,
12
13
  ref: "noTitle",
13
14
  class: "vue-data-ui-no-title-space",
14
15
  style: "height:36px; width: 100%;background:transparent"
15
- }, Re = ["xmlns", "viewBox"], We = ["width", "height"], Ee = { key: 1 }, Ve = ["x", "y", "height", "width", "fill", "stroke"], De = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], je = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], Ge = ["x", "y", "font-size", "font-weight", "fill"], qe = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Xe = { key: 3 }, Ye = ["x", "y", "fill", "font-size", "font-weight"], Je = { key: 4 }, Ke = ["x1", "x2", "y1", "y2", "stroke"], Qe = {
16
+ }, We = ["xmlns", "viewBox"], Ve = ["width", "height"], De = { key: 1 }, je = ["x", "y", "height", "width", "fill", "stroke"], Ge = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], qe = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], Xe = ["x", "y", "font-size", "font-weight", "fill"], Ye = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], Je = { key: 3 }, Ke = ["x", "y", "fill", "font-size", "font-weight"], Qe = { key: 4 }, Ze = ["x1", "x2", "y1", "y2", "stroke"], et = {
16
17
  key: 5,
17
18
  class: "vue-data-ui-watermark"
18
- }, Ze = {
19
+ }, tt = {
19
20
  class: "vue-ui-bullet-legend-item",
20
21
  dir: "auto"
21
- }, et = { style: { "margin-right": "2px" } }, tt = {
22
+ }, at = { style: { "margin-right": "2px" } }, lt = {
22
23
  key: 7,
23
24
  ref: "source",
24
25
  dir: "auto"
25
- }, at = {
26
+ }, st = {
26
27
  __name: "vue-ui-bullet",
27
28
  props: {
28
29
  config: {
@@ -38,11 +39,11 @@ const Ue = ["id"], ze = {
38
39
  }
39
40
  }
40
41
  },
41
- setup(ae, { expose: le }) {
42
- const se = L(() => import("./PackageVersion-D0VPY8-5.js")), re = L(() => import("./PenAndPaper-DhBJsnob.js")), oe = L(() => import("./vue-ui-skeleton-CjN2ZdgT.js")), ne = L(() => import("./UserOptions-Bdit7AWO.js")), { vue_ui_bullet: ue } = _e(), u = ae, U = g(null), ie = g(null), z = g(0), ce = g(null), he = g(0), y = f({
42
+ setup(le, { expose: se }) {
43
+ const re = $(() => import("./PackageVersion-u8Hc4rJi.js")), oe = $(() => import("./PenAndPaper-6iArlmj7.js")), ne = $(() => import("./vue-ui-skeleton-7gkY0oe-.js")), ue = $(() => import("./UserOptions-X9Ckvwp-.js")), { vue_ui_bullet: ie } = _e(), u = le, k = g(null), ce = g(null), R = g(0), he = g(null), ve = g(0), y = f({
43
44
  get: () => u.dataset.hasOwnProperty("value"),
44
45
  set: (t) => t
45
- }), b = f(() => u.dataset.segments ? Array.isArray(u.dataset.segments) ? u.dataset.segments.length ? !0 : (console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
46
+ }), w = f(() => u.dataset.segments ? Array.isArray(u.dataset.segments) ? u.dataset.segments.length ? !0 : (console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
46
47
 
47
48
  segments: [
48
49
  {
@@ -76,17 +77,17 @@ segments: [
76
77
  {...}
77
78
  ]
78
79
  `), y.value = !1, !1));
79
- be(R);
80
- function R() {
81
- Ce(u.dataset) ? ee({
80
+ ke(z);
81
+ function z() {
82
+ Le(u.dataset) ? te({
82
83
  componentName: "VueUiBullet",
83
84
  type: "dataset"
84
- }) : b.value ? u.dataset.segments.forEach((t, s) => {
85
- Le({
85
+ }) : w.value ? u.dataset.segments.forEach((t, s) => {
86
+ $e({
86
87
  datasetObject: t,
87
88
  requiredAttributes: ["name", "from", "to"]
88
89
  }).forEach((a) => {
89
- y.value = !1, ee({
90
+ y.value = !1, te({
90
91
  componentName: "VueUiBullet segment",
91
92
  type: "datasetSerieAttribute",
92
93
  property: a,
@@ -95,105 +96,105 @@ segments: [
95
96
  });
96
97
  }) : y.value = !1, e.value.style.chart.animation.show && G(u.dataset.value || 0);
97
98
  }
98
- const F = g($e());
99
- function W() {
100
- const t = te({
99
+ const I = g(Oe());
100
+ function E() {
101
+ const t = ae({
101
102
  userConfig: u.config,
102
- defaultConfig: ue
103
+ defaultConfig: ie
103
104
  });
104
105
  return t.theme ? {
105
- ...te({
106
- userConfig: Fe.vue_ui_bullet[t.theme] || u.config,
106
+ ...ae({
107
+ userConfig: Ie.vue_ui_bullet[t.theme] || u.config,
107
108
  defaultConfig: t
108
109
  })
109
110
  } : t;
110
111
  }
111
112
  const e = f({
112
- get: () => W(),
113
+ get: () => E(),
113
114
  set: (t) => t
114
- }), { userOptionsVisible: I, setUserOptionsVisibility: E, keepUserOptionState: V } = Se({ config: e.value }), { svgRef: D } = He({ config: e.value.style.chart.title });
115
- Q(() => u.config, (t) => {
116
- e.value = W(), I.value = !e.value.userOptions.showOnChartHover, R(), z.value += 1;
115
+ }), { userOptionsVisible: F, setUserOptionsVisibility: W, keepUserOptionState: V } = He({ config: e.value }), { svgRef: D } = Me({ config: e.value.style.chart.title });
116
+ Z(() => u.config, (t) => {
117
+ e.value = E(), F.value = !e.value.userOptions.showOnChartHover, z(), R.value += 1;
117
118
  }, { deep: !0 });
118
119
  const l = f(() => {
119
- const t = e.value.style.chart.height, s = e.value.style.chart.width, a = e.value.style.chart.padding.left, d = s - e.value.style.chart.padding.right, C = e.value.style.chart.padding.top, v = t - e.value.style.chart.padding.bottom;
120
+ const t = e.value.style.chart.height, s = e.value.style.chart.width, a = e.value.style.chart.padding.left, d = s - e.value.style.chart.padding.right, p = e.value.style.chart.padding.top, c = t - e.value.style.chart.padding.bottom;
120
121
  return {
121
122
  height: t,
122
123
  width: s,
123
124
  left: a,
124
125
  right: d,
125
- top: C,
126
- bottom: v,
126
+ top: p,
127
+ bottom: c,
127
128
  chartWidth: d - a,
128
- chartHeight: v - C
129
+ chartHeight: c - p
129
130
  };
130
- }), ve = f(() => {
131
- if (!b.value) return [];
131
+ }), de = f(() => {
132
+ if (!w.value) return [];
132
133
  const t = [];
133
134
  for (let s = 0; s < u.dataset.segments.length; s += 1)
134
- t.push(Oe(e.value.style.chart.segments.baseColor, s / u.dataset.segments.length));
135
+ t.push(Ae(e.value.style.chart.segments.baseColor, s / u.dataset.segments.length));
135
136
  return t;
136
- }), S = f(() => b.value ? {
137
+ }), H = f(() => w.value ? {
137
138
  min: Math.min(...u.dataset.segments.map((t) => t.from)),
138
139
  max: Math.max(...u.dataset.segments.map((t) => t.to))
139
- } : { min: 0, max: 1 }), c = g(de());
140
- Q(() => u.dataset, (t) => {
141
- e.value.style.chart.animation.show ? G(t.value || 0) : c.value = t.value || 0;
140
+ } : { min: 0, max: 1 }), h = g(ge());
141
+ Z(() => u.dataset, (t) => {
142
+ e.value.style.chart.animation.show ? G(t.value || 0) : h.value = t.value || 0;
142
143
  }, { deep: !0 });
143
- function de() {
144
- return e.value.style.chart.animation.show ? S.value.min : u.dataset.value || 0;
144
+ function ge() {
145
+ return e.value.style.chart.animation.show ? H.value.min : u.dataset.value || 0;
145
146
  }
146
147
  const j = g(null);
147
148
  function G(t) {
148
- const s = Math.abs(t - c.value) / e.value.style.chart.animation.animationFrames;
149
+ const s = Math.abs(t - h.value) / e.value.style.chart.animation.animationFrames;
149
150
  function a() {
150
- c.value < t ? c.value = Math.min(c.value + s, t) : c.value > t && (c.value = Math.max(c.value - s, t)), c.value !== t && (j.value = requestAnimationFrame(a));
151
+ h.value < t ? h.value = Math.min(h.value + s, t) : h.value > t && (h.value = Math.max(h.value - s, t)), h.value !== t && (j.value = requestAnimationFrame(a));
151
152
  }
152
153
  a();
153
154
  }
154
- ke(() => {
155
+ we(() => {
155
156
  cancelAnimationFrame(j.value);
156
157
  });
157
- const h = f(() => {
158
- if (!b.value)
158
+ const v = f(() => {
159
+ if (!w.value)
159
160
  return [];
160
- const t = Ae(S.value.min, S.value.max, e.value.style.chart.segments.ticks.divisions), s = t.min >= 0 ? 0 : Math.abs(t.min), a = {
161
+ const t = Be(H.value.min, H.value.max, e.value.style.chart.segments.ticks.divisions), s = t.min >= 0 ? 0 : Math.abs(t.min), a = {
161
162
  x: l.value.left + (u.dataset.target + s) / (t.max + s) * l.value.chartWidth - e.value.style.chart.target.width / 2
162
163
  }, d = {
163
- width: (c.value + s) / (t.max + s) * l.value.chartWidth
164
- }, C = t.ticks.map((v) => ({
165
- value: v,
164
+ width: (h.value + s) / (t.max + s) * l.value.chartWidth
165
+ }, p = t.ticks.map((c) => ({
166
+ value: c,
166
167
  y: l.value.bottom + e.value.style.chart.segments.dataLabels.fontSize + 3 + e.value.style.chart.segments.dataLabels.offsetY,
167
- x: l.value.left + (v + s) / (t.max + s) * l.value.chartWidth
168
+ x: l.value.left + (c + s) / (t.max + s) * l.value.chartWidth
168
169
  }));
169
170
  return {
170
171
  scale: t,
171
172
  target: a,
172
173
  value: d,
173
- ticks: C,
174
- chunks: u.dataset.segments.map((v, pe) => ({
175
- ...v,
176
- color: v.color ? Be(v.color) : ve.value[pe],
177
- x: l.value.left + l.value.chartWidth * ((v.from + s) / (t.max + s)),
174
+ ticks: p,
175
+ chunks: u.dataset.segments.map((c, be) => ({
176
+ ...c,
177
+ color: c.color ? Pe(c.color) : de.value[be],
178
+ x: l.value.left + l.value.chartWidth * ((c.from + s) / (t.max + s)),
178
179
  y: l.value.top,
179
180
  height: l.value.chartHeight,
180
- width: l.value.chartWidth * (Math.abs(v.to - v.from) / (t.max + s))
181
+ width: l.value.chartWidth * (Math.abs(c.to - c.from) / (t.max + s))
181
182
  }))
182
183
  };
183
- }), q = f(() => !h.value || !h.value.chunks || !h.value.chunks.length ? [] : h.value.chunks.map((t) => {
184
- const s = B(
184
+ }), q = f(() => !v.value || !v.value.chunks || !v.value.chunks.length ? [] : v.value.chunks.map((t) => {
185
+ const s = P(
185
186
  e.value.style.chart.segments.dataLabels.formatter,
186
187
  t.from,
187
- P({
188
+ S({
188
189
  p: e.value.style.chart.segments.dataLabels.prefix,
189
190
  v: t.from,
190
191
  s: e.value.style.chart.segments.dataLabels.suffix,
191
192
  r: e.value.style.chart.segments.dataLabels.rounding
192
193
  })
193
- ), a = B(
194
+ ), a = P(
194
195
  e.value.style.chart.segments.dataLabels.formatter,
195
196
  t.to,
196
- P({
197
+ S({
197
198
  p: e.value.style.chart.segments.dataLabels.prefix,
198
199
  v: t.to,
199
200
  s: e.value.style.chart.segments.dataLabels.suffix,
@@ -205,60 +206,74 @@ segments: [
205
206
  shape: "square",
206
207
  value: `${s} - ${a}`
207
208
  };
208
- })), ge = f(() => ({
209
+ })), fe = f(() => ({
209
210
  cy: "bullet-div-legend",
210
211
  backgroundColor: "transparent",
211
212
  color: e.value.style.chart.legend.color,
212
213
  fontSize: e.value.style.chart.legend.fontSize,
213
214
  paddingBottom: 6,
214
215
  fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
215
- })), { isPrinting: X, isImaging: Y, generatePdf: J, generateImage: K } = Ie({
216
- elementId: `bullet_${F.value}`,
216
+ })), { isPrinting: X, isImaging: Y, generatePdf: J, generateImage: K } = Fe({
217
+ elementId: `bullet_${I.value}`,
217
218
  fileName: e.value.style.chart.title.text || "vue-ui-bullet",
218
219
  options: e.value.userOptions.print
219
- }), fe = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), k = g(!1);
220
- function me(t) {
221
- k.value = t, he.value += 1;
220
+ }), me = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), x = g(!1);
221
+ function Q(t) {
222
+ x.value = t, ve.value += 1;
222
223
  }
223
224
  function ye() {
224
- return h.value;
225
+ return v.value;
225
226
  }
226
- const _ = g(!1);
227
- function H() {
228
- _.value = !_.value;
227
+ const L = g(!1);
228
+ function M() {
229
+ L.value = !L.value;
229
230
  }
230
- return le({
231
+ async function pe({ scale: t = 2 } = {}) {
232
+ if (!k.value) return;
233
+ const { width: s, height: a } = k.value.getBoundingClientRect(), d = s / a, { imageUri: p, base64: c } = await Ne({ domElement: k.value, base64: !0, img: !0, scale: t });
234
+ return {
235
+ imageUri: p,
236
+ base64: c,
237
+ title: e.value.style.chart.title.text,
238
+ width: s,
239
+ height: a,
240
+ aspectRatio: d
241
+ };
242
+ }
243
+ return se({
231
244
  getData: ye,
245
+ getImage: pe,
232
246
  generatePdf: J,
233
247
  generateImage: K,
234
- toggleAnnotator: H
248
+ toggleAnnotator: M,
249
+ toggleFullscreen: Q
235
250
  }), (t, s) => (r(), n("div", {
236
251
  ref_key: "bulletChart",
237
- ref: U,
238
- class: Z(`vue-ui-bullet ${k.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
239
- style: M(`font-family:${e.value.style.fontFamily};width:100%;background:${e.value.style.chart.backgroundColor}`),
240
- id: `bullet_${F.value}`,
241
- onMouseenter: s[0] || (s[0] = () => o(E)(!0)),
242
- onMouseleave: s[1] || (s[1] = () => o(E)(!1))
252
+ ref: k,
253
+ class: ee(`vue-ui-bullet ${x.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
254
+ style: T(`font-family:${e.value.style.fontFamily};width:100%;background:${e.value.style.chart.backgroundColor}`),
255
+ id: `bullet_${I.value}`,
256
+ onMouseenter: s[0] || (s[0] = () => o(W)(!0)),
257
+ onMouseleave: s[1] || (s[1] = () => o(W)(!1))
243
258
  }, [
244
- e.value.userOptions.buttons.annotator ? (r(), w(o(re), {
259
+ e.value.userOptions.buttons.annotator ? (r(), C(o(oe), {
245
260
  key: 0,
246
261
  svgRef: o(D),
247
262
  backgroundColor: e.value.style.chart.backgroundColor,
248
263
  color: e.value.style.chart.color,
249
- active: _.value,
250
- onClose: H
264
+ active: L.value,
265
+ onClose: M
251
266
  }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : i("", !0),
252
- fe.value ? (r(), n("div", ze, null, 512)) : i("", !0),
267
+ me.value ? (r(), n("div", Ee, null, 512)) : i("", !0),
253
268
  e.value.style.chart.title.text ? (r(), n("div", {
254
269
  key: 2,
255
270
  ref_key: "chartTitle",
256
- ref: ie,
271
+ ref: ce,
257
272
  style: "width:100%;background:transparent;"
258
273
  }, [
259
- (r(), w(Te, {
274
+ (r(), C(Ue, {
260
275
  lineHeight: "1.3rem",
261
- key: `title_${z.value}`,
276
+ key: `title_${R.value}`,
262
277
  config: {
263
278
  title: {
264
279
  cy: "bullet-div-title",
@@ -271,14 +286,14 @@ segments: [
271
286
  }
272
287
  }, null, 8, ["config"]))
273
288
  ], 512)) : i("", !0),
274
- e.value.userOptions.show && y.value && (o(V) || o(I)) ? (r(), w(o(ne), {
289
+ e.value.userOptions.show && y.value && (o(V) || o(F)) ? (r(), C(o(ue), {
275
290
  key: 3,
276
291
  ref: "details",
277
292
  backgroundColor: e.value.style.chart.backgroundColor,
278
293
  color: e.value.style.chart.color,
279
294
  isPrinting: o(X),
280
295
  isImaging: o(Y),
281
- uid: F.value,
296
+ uid: I.value,
282
297
  hasTooltip: !1,
283
298
  hasPdf: e.value.userOptions.buttons.pdf,
284
299
  hasImg: e.value.userOptions.buttons.img,
@@ -286,67 +301,68 @@ segments: [
286
301
  hasTable: !1,
287
302
  hasLabel: !1,
288
303
  hasFullscreen: e.value.userOptions.buttons.fullscreen,
289
- isFullscreen: k.value,
290
- chartElement: U.value,
304
+ isFullscreen: x.value,
305
+ chartElement: k.value,
291
306
  position: e.value.userOptions.position,
292
307
  titles: { ...e.value.userOptions.buttonTitles },
293
308
  hasAnnotator: e.value.userOptions.buttons.annotator,
294
- isAnnotation: _.value,
309
+ isAnnotation: L.value,
295
310
  callbacks: e.value.userOptions.callbacks,
296
- onToggleFullscreen: me,
311
+ printScale: e.value.userOptions.print.scale,
312
+ onToggleFullscreen: Q,
297
313
  onGeneratePdf: o(J),
298
314
  onGenerateImage: o(K),
299
- onToggleAnnotator: H,
300
- style: M({
301
- visibility: o(V) ? o(I) ? "visible" : "hidden" : "visible"
315
+ onToggleAnnotator: M,
316
+ style: T({
317
+ visibility: o(V) ? o(F) ? "visible" : "hidden" : "visible"
302
318
  })
303
- }, we({ _: 2 }, [
319
+ }, xe({ _: 2 }, [
304
320
  t.$slots.menuIcon ? {
305
321
  name: "menuIcon",
306
- fn: p(({ isOpen: a, color: d }) => [
307
- m(t.$slots, "menuIcon", $(O({ isOpen: a, color: d })), void 0, !0)
322
+ fn: b(({ isOpen: a, color: d }) => [
323
+ m(t.$slots, "menuIcon", O(A({ isOpen: a, color: d })), void 0, !0)
308
324
  ]),
309
325
  key: "0"
310
326
  } : void 0,
311
327
  t.$slots.optionPdf ? {
312
328
  name: "optionPdf",
313
- fn: p(() => [
329
+ fn: b(() => [
314
330
  m(t.$slots, "optionPdf", {}, void 0, !0)
315
331
  ]),
316
332
  key: "1"
317
333
  } : void 0,
318
334
  t.$slots.optionImg ? {
319
335
  name: "optionImg",
320
- fn: p(() => [
336
+ fn: b(() => [
321
337
  m(t.$slots, "optionImg", {}, void 0, !0)
322
338
  ]),
323
339
  key: "2"
324
340
  } : void 0,
325
341
  t.$slots.optionFullscreen ? {
326
342
  name: "optionFullscreen",
327
- fn: p(({ toggleFullscreen: a, isFullscreen: d }) => [
328
- m(t.$slots, "optionFullscreen", $(O({ toggleFullscreen: a, isFullscreen: d })), void 0, !0)
343
+ fn: b(({ toggleFullscreen: a, isFullscreen: d }) => [
344
+ m(t.$slots, "optionFullscreen", O(A({ toggleFullscreen: a, isFullscreen: d })), void 0, !0)
329
345
  ]),
330
346
  key: "3"
331
347
  } : void 0,
332
348
  t.$slots.optionAnnotator ? {
333
349
  name: "optionAnnotator",
334
- fn: p(({ toggleAnnotator: a, isAnnotator: d }) => [
335
- m(t.$slots, "optionAnnotator", $(O({ toggleAnnotator: a, isAnnotator: d })), void 0, !0)
350
+ fn: b(({ toggleAnnotator: a, isAnnotator: d }) => [
351
+ m(t.$slots, "optionAnnotator", O(A({ toggleAnnotator: a, isAnnotator: d })), void 0, !0)
336
352
  ]),
337
353
  key: "4"
338
354
  } : void 0
339
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "onGeneratePdf", "onGenerateImage", "style"])) : i("", !0),
355
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : i("", !0),
340
356
  y.value ? (r(), n("svg", {
341
357
  key: 4,
342
358
  ref_key: "svgRef",
343
359
  ref: D,
344
- xmlns: o(Pe),
345
- class: Z({ "vue-data-ui-fullscreen--on": k.value, "vue-data-ui-fulscreen--off": !k.value, "vue-ui-bullet-svg": !0 }),
360
+ xmlns: o(Se),
361
+ class: ee({ "vue-data-ui-fullscreen--on": x.value, "vue-data-ui-fulscreen--off": !x.value, "vue-ui-bullet-svg": !0 }),
346
362
  viewBox: `0 0 ${l.value.width} ${l.value.height}`,
347
- style: M(`width: 100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
363
+ style: T(`width: 100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
348
364
  }, [
349
- xe(o(se)),
365
+ Ce(o(re)),
350
366
  t.$slots["chart-background"] ? (r(), n("foreignObject", {
351
367
  key: 0,
352
368
  x: 0,
@@ -358,9 +374,9 @@ segments: [
358
374
  }
359
375
  }, [
360
376
  m(t.$slots, "chart-background", {}, void 0, !0)
361
- ], 8, We)) : i("", !0),
362
- b.value ? (r(), n("g", Ee, [
363
- (r(!0), n(T, null, N(h.value.chunks, (a) => (r(), n("rect", {
377
+ ], 8, Ve)) : i("", !0),
378
+ w.value ? (r(), n("g", De, [
379
+ (r(!0), n(U, null, N(v.value.chunks, (a) => (r(), n("rect", {
364
380
  x: a.x,
365
381
  y: a.y,
366
382
  height: a.height,
@@ -368,10 +384,10 @@ segments: [
368
384
  fill: a.color,
369
385
  "stroke-width": 1,
370
386
  stroke: e.value.style.chart.backgroundColor
371
- }, null, 8, Ve))), 256)),
387
+ }, null, 8, je))), 256)),
372
388
  e.value.style.chart.target.onTop ? i("", !0) : (r(), n("rect", {
373
389
  key: 0,
374
- x: h.value.target.x,
390
+ x: v.value.target.x,
375
391
  y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.target.heightRatio) / 2,
376
392
  height: l.value.chartHeight * e.value.style.chart.target.heightRatio,
377
393
  width: e.value.style.chart.target.width,
@@ -379,37 +395,37 @@ segments: [
379
395
  fill: e.value.style.chart.target.color,
380
396
  stroke: e.value.style.chart.target.stroke,
381
397
  "stroke-width": e.value.style.chart.target.strokeWidth
382
- }, null, 8, De)),
383
- x("rect", {
398
+ }, null, 8, Ge)),
399
+ _("rect", {
384
400
  x: l.value.left,
385
401
  y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.valueBar.heightRatio) / 2,
386
402
  height: l.value.chartHeight * e.value.style.chart.valueBar.heightRatio,
387
- width: h.value.value.width,
403
+ width: v.value.value.width,
388
404
  fill: e.value.style.chart.valueBar.color,
389
405
  stroke: e.value.style.chart.valueBar.stroke,
390
406
  "stroke-width": e.value.style.chart.valueBar.strokeWidth
391
- }, null, 8, je),
407
+ }, null, 8, qe),
392
408
  e.value.style.chart.valueBar.label.show ? (r(), n("text", {
393
409
  key: 1,
394
- x: l.value.left + h.value.value.width,
410
+ x: l.value.left + v.value.value.width,
395
411
  y: l.value.top - 6 + e.value.style.chart.valueBar.label.offsetY,
396
412
  "font-size": e.value.style.chart.valueBar.label.fontSize,
397
413
  "font-weight": e.value.style.chart.valueBar.label.bold ? "bold" : "normal",
398
414
  fill: e.value.style.chart.valueBar.label.color,
399
415
  "text-anchor": "middle"
400
- }, A(o(B)(
416
+ }, B(o(P)(
401
417
  e.value.style.chart.segments.dataLabels.formatter,
402
- c.value,
403
- o(P)({
418
+ h.value,
419
+ o(S)({
404
420
  p: e.value.style.chart.segments.dataLabels.prefix,
405
- v: c.value,
421
+ v: h.value,
406
422
  s: e.value.style.chart.segments.dataLabels.suffix,
407
423
  r: e.value.style.chart.segments.dataLabels.rounding
408
424
  })
409
- )), 9, Ge)) : i("", !0),
425
+ )), 9, Xe)) : i("", !0),
410
426
  e.value.style.chart.target.onTop ? (r(), n("rect", {
411
427
  key: 2,
412
- x: h.value.target.x,
428
+ x: v.value.target.x,
413
429
  y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.target.heightRatio) / 2,
414
430
  height: l.value.chartHeight * e.value.style.chart.target.heightRatio,
415
431
  width: e.value.style.chart.target.width,
@@ -417,28 +433,28 @@ segments: [
417
433
  fill: e.value.style.chart.target.color,
418
434
  stroke: e.value.style.chart.target.stroke,
419
435
  "stroke-width": e.value.style.chart.target.strokeWidth
420
- }, null, 8, qe)) : i("", !0),
421
- e.value.style.chart.segments.dataLabels.show ? (r(), n("g", Xe, [
422
- (r(!0), n(T, null, N(h.value.ticks, (a) => (r(), n("text", {
436
+ }, null, 8, Ye)) : i("", !0),
437
+ e.value.style.chart.segments.dataLabels.show ? (r(), n("g", Je, [
438
+ (r(!0), n(U, null, N(v.value.ticks, (a) => (r(), n("text", {
423
439
  x: a.x,
424
440
  y: a.y,
425
441
  "text-anchor": "middle",
426
442
  fill: e.value.style.chart.segments.dataLabels.color,
427
443
  "font-size": e.value.style.chart.segments.dataLabels.fontSize + "px",
428
444
  "font-weight": e.value.style.chart.segments.dataLabels.bold ? "bold" : "normal"
429
- }, A(o(B)(
445
+ }, B(o(P)(
430
446
  e.value.style.chart.segments.dataLabels.formatter,
431
447
  a.value,
432
- o(P)({
448
+ o(S)({
433
449
  p: e.value.style.chart.segments.dataLabels.prefix,
434
450
  v: a.value,
435
451
  s: e.value.style.chart.segments.dataLabels.suffix,
436
452
  r: e.value.style.chart.segments.dataLabels.rounding
437
453
  })
438
- )), 9, Ye))), 256))
454
+ )), 9, Ke))), 256))
439
455
  ])) : i("", !0),
440
- e.value.style.chart.segments.dataLabels.show && e.value.style.chart.segments.ticks.show ? (r(), n("g", Je, [
441
- (r(!0), n(T, null, N(h.value.ticks, (a) => (r(), n("line", {
456
+ e.value.style.chart.segments.dataLabels.show && e.value.style.chart.segments.ticks.show ? (r(), n("g", Qe, [
457
+ (r(!0), n(U, null, N(v.value.ticks, (a) => (r(), n("line", {
442
458
  x1: a.x,
443
459
  x2: a.x,
444
460
  y1: l.value.bottom,
@@ -446,15 +462,15 @@ segments: [
446
462
  stroke: e.value.style.chart.segments.ticks.stroke,
447
463
  "stroke-width": 1,
448
464
  "stroke-linecap": "round"
449
- }, null, 8, Ke))), 256))
465
+ }, null, 8, Ze))), 256))
450
466
  ])) : i("", !0)
451
467
  ])) : i("", !0),
452
468
  m(t.$slots, "svg", { svg: l.value }, void 0, !0)
453
- ], 14, Re)) : i("", !0),
454
- t.$slots.watermark ? (r(), n("div", Qe, [
455
- m(t.$slots, "watermark", $(O({ isPrinting: o(X) || o(Y) })), void 0, !0)
469
+ ], 14, We)) : i("", !0),
470
+ t.$slots.watermark ? (r(), n("div", et, [
471
+ m(t.$slots, "watermark", O(A({ isPrinting: o(X) || o(Y) })), void 0, !0)
456
472
  ])) : i("", !0),
457
- y.value ? i("", !0) : (r(), w(o(oe), {
473
+ y.value ? i("", !0) : (r(), C(o(ne), {
458
474
  key: 6,
459
475
  config: {
460
476
  type: "bullet",
@@ -466,32 +482,32 @@ segments: [
466
482
  }
467
483
  }
468
484
  }, null, 8, ["config"])),
469
- x("div", {
485
+ _("div", {
470
486
  ref_key: "chartLegend",
471
- ref: ce
487
+ ref: he
472
488
  }, [
473
- e.value.style.chart.legend.show ? (r(), w(Me, {
489
+ e.value.style.chart.legend.show ? (r(), C(Te, {
474
490
  key: 0,
475
491
  clickable: !1,
476
492
  legendSet: q.value,
477
- config: ge.value
493
+ config: fe.value
478
494
  }, {
479
- item: p(({ legend: a }) => [
480
- x("div", Ze, [
481
- x("span", et, A(a.name) + ":", 1),
482
- x("span", null, A(a.value), 1)
495
+ item: b(({ legend: a }) => [
496
+ _("div", tt, [
497
+ _("span", at, B(a.name) + ":", 1),
498
+ _("span", null, B(a.value), 1)
483
499
  ])
484
500
  ]),
485
501
  _: 1
486
502
  }, 8, ["legendSet", "config"])) : i("", !0),
487
503
  m(t.$slots, "legend", { legend: q.value }, void 0, !0)
488
504
  ], 512),
489
- t.$slots.source ? (r(), n("div", tt, [
505
+ t.$slots.source ? (r(), n("div", lt, [
490
506
  m(t.$slots, "source", {}, void 0, !0)
491
507
  ], 512)) : i("", !0)
492
- ], 46, Ue));
508
+ ], 46, ze));
493
509
  }
494
- }, vt = /* @__PURE__ */ Ne(at, [["__scopeId", "data-v-6c6b173a"]]);
510
+ }, ft = /* @__PURE__ */ Re(st, [["__scopeId", "data-v-42012d4b"]]);
495
511
  export {
496
- vt as default
512
+ ft as default
497
513
  };