vue-data-ui 3.0.0-next.7 → 3.0.0-next.71

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 (137) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
  11. package/dist/Slicer-DYuvPkEM.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
  19. package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +610 -22
  22. package/dist/types/vue-data-ui.d.ts +610 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-D-8c0o4p.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
  37. package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
  38. package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
  41. package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
  48. package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
  49. package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
  51. package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
  52. package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
  53. package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
  54. package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
  55. package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
  59. package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
  60. package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
  61. package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
  65. package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
  67. package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
  68. package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
  69. package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
  70. package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
  73. package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
  74. package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
  75. package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
  77. package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
  79. package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
  80. package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
  81. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
  82. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
  84. package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
  86. package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
  87. package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
  89. package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
  90. package/dist/vue-ui-wheel-De1spwLh.js +379 -0
  91. package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
  93. package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
  109. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  110. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  111. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  112. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  113. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  114. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  115. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  116. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  117. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  118. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  119. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  120. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  121. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  122. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  123. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  124. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  125. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  126. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  127. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  128. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  129. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  130. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  131. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  132. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  133. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  134. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  135. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  136. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  137. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -1,5 +1,5 @@
1
- import { z as p, A as v, u as w, B as A } from "./index-Cg-RjxqH.js";
2
- import { d as M } from "./dom-to-png-CTrlbKHr.js";
1
+ import { A as p, t as v, u as w, B as A } from "./index-DKpp7RIH.js";
2
+ import { d as M } from "./dom-to-png-PUk0ukSG.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 = {
@@ -0,0 +1,571 @@
1
+ import { defineAsyncComponent as W, ref as c, computed as f, onMounted as Se, toRefs as Ie, watch as ie, onBeforeUnmount as Pe, createElementBlock as n, openBlock as r, unref as o, normalizeStyle as D, normalizeClass as ce, createBlock as C, createCommentVNode as i, createElementVNode as I, createSlots as Fe, withCtx as w, renderSlot as m, normalizeProps as P, guardReactiveProps as F, createVNode as He, Fragment as V, renderList as G, toDisplayString as H } from "vue";
2
+ import { u as Me, c as Te, t as Re, l as ze, D as Ne, e as Ue, k as M, i as T, X as Ee, o as he, f as ve, g as We, b as De } from "./index-DKpp7RIH.js";
3
+ import { u as de } from "./useNestedProp-D-8c0o4p.js";
4
+ import { u as Ve } from "./usePrinter-NUeckmCX.js";
5
+ import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js";
6
+ import { u as je } from "./useChartAccessibility-9icAAmYg.js";
7
+ import qe from "./Legend-DiGLrlzP.js";
8
+ import Xe from "./Title-VLWyIYrj.js";
9
+ import Ye from "./img-DD_2wgY3.js";
10
+ import { t as Je, u as Ke } from "./useResponsive-DfdjqQps.js";
11
+ import { u as Qe, B as Ze } from "./useLoading-D7YHNtLX.js";
12
+ import { _ as et } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ const tt = ["id"], at = {
14
+ key: 1,
15
+ ref: "noTitle",
16
+ class: "vue-data-ui-no-title-space",
17
+ style: "height:36px; width: 100%;background:transparent"
18
+ }, lt = ["xmlns", "viewBox"], st = ["width", "height"], rt = { key: 1 }, ot = ["x", "y", "height", "width", "fill", "stroke"], nt = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], ut = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], it = ["x", "y", "font-size", "font-weight", "fill"], ct = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], ht = { key: 3 }, vt = ["x", "y", "fill", "font-size", "font-weight"], dt = { key: 4 }, gt = ["x1", "x2", "y1", "y2", "stroke"], ft = {
19
+ key: 4,
20
+ class: "vue-data-ui-watermark"
21
+ }, mt = {
22
+ key: 0,
23
+ class: "vue-ui-bullet-legend-item",
24
+ dir: "auto"
25
+ }, yt = { style: { "margin-right": "2px" } }, pt = {
26
+ __name: "vue-ui-bullet",
27
+ props: {
28
+ config: {
29
+ type: Object,
30
+ default() {
31
+ return {};
32
+ }
33
+ },
34
+ dataset: {
35
+ type: Object,
36
+ default() {
37
+ return {};
38
+ }
39
+ }
40
+ },
41
+ setup(ge, { expose: fe }) {
42
+ const me = W(() => import("./PackageVersion-6s4eI8W7.js")), ye = W(() => import("./PenAndPaper-JoUN7Ink.js")), pe = W(() => import("./UserOptions-BV_xM-sB.js")), { vue_ui_bullet: be } = Me(), L = ge, y = c(null), j = c(null), q = c(0), X = c(null), Y = c(null), ke = c(0), x = c(null), O = c(null), p = f({
43
+ get: () => u.value.hasOwnProperty("value"),
44
+ set: (t) => t
45
+ }), A = f(() => u.value.segments ? Array.isArray(u.value.segments) ? u.value.segments.length ? !0 : (console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
46
+
47
+ segments: [
48
+ {
49
+ name: string;
50
+ from: number;
51
+ to: number;
52
+ color?: string;
53
+ },
54
+ {...}
55
+ ]
56
+ `), p.value = !1, !1) : (console.warn(`VueUiBullet: dataset segments must be an array of objects with this datastructure:
57
+
58
+ segments: [
59
+ {
60
+ name: string;
61
+ from: number;
62
+ to: number;
63
+ color?: string;
64
+ },
65
+ {...}
66
+ ]
67
+ `), p.value = !1, !1) : (console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
68
+
69
+ segments: [
70
+ {
71
+ name: string;
72
+ from: number;
73
+ to: number;
74
+ color?: string;
75
+ },
76
+ {...}
77
+ ]
78
+ `), p.value = !1, !1)), J = f(() => !!e.value.debug);
79
+ function K() {
80
+ if (he(u.value) ? (ve({
81
+ componentName: "VueUiBullet",
82
+ type: "dataset",
83
+ debug: J.value
84
+ }), B.value = !0) : A.value ? u.value.segments.forEach((t, s) => {
85
+ We({
86
+ datasetObject: t,
87
+ requiredAttributes: ["name", "from", "to"]
88
+ }).forEach((a) => {
89
+ p.value = !1, ve({
90
+ componentName: "VueUiBullet segment",
91
+ type: "datasetSerieAttribute",
92
+ property: a,
93
+ index: s,
94
+ debug: J.value
95
+ });
96
+ });
97
+ }) : (p.value = !1, B.value = !0), he(u.value) || (B.value = e.value.loading), e.value.responsive) {
98
+ const t = Je(() => {
99
+ const { width: s, height: a } = Ke({
100
+ chart: y.value,
101
+ title: e.value.style.chart.title.text ? j.value : null,
102
+ legend: e.value.style.chart.legend.show ? X.value : null,
103
+ source: Y.value
104
+ });
105
+ requestAnimationFrame(() => {
106
+ $.value.width = s, $.value.height = a - 12;
107
+ });
108
+ });
109
+ x.value && (O.value && x.value.unobserve(O.value), x.value.disconnect()), x.value = new ResizeObserver(t), O.value = y.value.parentNode, x.value.observe(O.value);
110
+ }
111
+ e.value.style.chart.animation.show && !b.value && ae(u.value.value || 0);
112
+ }
113
+ Se(K);
114
+ const R = c(Te());
115
+ function z() {
116
+ const t = de({
117
+ userConfig: L.config,
118
+ defaultConfig: be
119
+ });
120
+ return t.theme ? {
121
+ ...de({
122
+ userConfig: De.vue_ui_bullet[t.theme] || L.config,
123
+ defaultConfig: t
124
+ })
125
+ } : t;
126
+ }
127
+ const e = c(z()), { loading: b, FINAL_DATASET: u, manualLoading: B } = Qe({
128
+ ...Ie(L),
129
+ FINAL_CONFIG: e,
130
+ prepareConfig: z,
131
+ skeletonDataset: {
132
+ value: 100,
133
+ target: 100,
134
+ segments: [
135
+ {
136
+ name: "",
137
+ from: 0,
138
+ to: 33,
139
+ color: "#AAAAAA"
140
+ },
141
+ {
142
+ name: "",
143
+ from: 33,
144
+ to: 66,
145
+ color: "#BABABA"
146
+ },
147
+ {
148
+ name: "",
149
+ from: 66,
150
+ to: 100,
151
+ color: "#CACACA"
152
+ }
153
+ ]
154
+ },
155
+ skeletonConfig: Re({
156
+ defaultConfig: e.value,
157
+ userConfig: {
158
+ userOptions: { show: !1 },
159
+ style: {
160
+ chart: {
161
+ backgroundColor: "#99999930",
162
+ segments: {
163
+ dataLabels: { show: !1 },
164
+ ticks: {
165
+ stroke: "#8A8A8A"
166
+ }
167
+ },
168
+ valueBar: {
169
+ label: { show: !1 }
170
+ }
171
+ }
172
+ }
173
+ }
174
+ })
175
+ }), { userOptionsVisible: N, setUserOptionsVisibility: Q, keepUserOptionState: Z } = Ge({ config: e.value }), { svgRef: ee } = je({ config: e.value.style.chart.title });
176
+ ie(() => L.config, (t) => {
177
+ b.value || (e.value = z()), N.value = !e.value.userOptions.showOnChartHover, K(), q.value += 1;
178
+ }, { deep: !0 });
179
+ const $ = c({
180
+ width: e.value.style.chart.width,
181
+ height: e.value.style.chart.height
182
+ }), we = f(() => $.value.width), xe = f(() => $.value.height), l = f(() => {
183
+ const t = xe.value, s = we.value, a = e.value.style.chart.padding.left, g = s - e.value.style.chart.padding.right, k = e.value.style.chart.padding.top, h = t - e.value.style.chart.padding.bottom;
184
+ return {
185
+ height: Math.max(1e-3, t),
186
+ width: Math.max(1e-3, s),
187
+ left: a,
188
+ right: g,
189
+ top: k,
190
+ bottom: h,
191
+ chartWidth: Math.max(1e-3, g - a),
192
+ chartHeight: Math.max(1e-3, h - k)
193
+ };
194
+ }), Ae = f(() => {
195
+ if (!A.value) return [];
196
+ const t = [];
197
+ for (let s = 0; s < u.value.segments.length; s += 1)
198
+ t.push(ze(e.value.style.chart.segments.baseColor, s / u.value.segments.length));
199
+ return t;
200
+ }), U = f(() => A.value ? {
201
+ min: Math.min(...u.value.segments.map((t) => t.from)),
202
+ max: Math.max(...u.value.segments.map((t) => t.to))
203
+ } : { min: 0, max: 1 }), v = c(_e());
204
+ ie(() => u.value, (t) => {
205
+ t.hasOwnProperty("value") && (B.value = !1), e.value.style.chart.animation.show && !b.value ? ae(t.value || 0) : v.value = t.value || 0;
206
+ }, { deep: !0 });
207
+ function _e() {
208
+ return e.value.style.chart.animation.show && !b.value ? U.value.min : u.value.value || 0;
209
+ }
210
+ const te = c(null);
211
+ function ae(t) {
212
+ const s = Math.abs(t - v.value) / e.value.style.chart.animation.animationFrames;
213
+ function a() {
214
+ v.value < t ? v.value = Math.min(v.value + s, t) : v.value > t && (v.value = Math.max(v.value - s, t)), v.value !== t && (te.value = requestAnimationFrame(a));
215
+ }
216
+ a();
217
+ }
218
+ Pe(() => {
219
+ cancelAnimationFrame(te.value);
220
+ });
221
+ const d = f(() => {
222
+ if (!A.value)
223
+ return [];
224
+ const t = Ne(U.value.min, U.value.max, e.value.style.chart.segments.ticks.divisions), s = t.min >= 0 ? 0 : Math.abs(t.min), a = {
225
+ x: l.value.left + (u.value.target + s) / (t.max + s) * l.value.chartWidth - e.value.style.chart.target.width / 2
226
+ }, g = {
227
+ width: (v.value + s) / (t.max + s) * l.value.chartWidth
228
+ }, k = t.ticks.map((h) => ({
229
+ value: h,
230
+ y: l.value.bottom + e.value.style.chart.segments.dataLabels.fontSize + 3 + e.value.style.chart.segments.dataLabels.offsetY,
231
+ x: l.value.left + (h + s) / (t.max + s) * l.value.chartWidth
232
+ }));
233
+ return {
234
+ scale: t,
235
+ target: a,
236
+ value: g,
237
+ ticks: k,
238
+ chunks: u.value.segments.map((h, $e) => ({
239
+ ...h,
240
+ color: h.color ? Ue(h.color) : Ae.value[$e],
241
+ x: l.value.left + l.value.chartWidth * ((h.from + s) / (t.max + s)),
242
+ y: l.value.top,
243
+ height: l.value.chartHeight,
244
+ width: l.value.chartWidth * (Math.abs(h.to - h.from) / (t.max + s))
245
+ }))
246
+ };
247
+ }), le = f(() => !d.value || !d.value.chunks || !d.value.chunks.length ? [] : d.value.chunks.map((t) => {
248
+ const s = M(
249
+ e.value.style.chart.segments.dataLabels.formatter,
250
+ t.from,
251
+ T({
252
+ p: e.value.style.chart.segments.dataLabels.prefix,
253
+ v: t.from,
254
+ s: e.value.style.chart.segments.dataLabels.suffix,
255
+ r: e.value.style.chart.segments.dataLabels.rounding
256
+ })
257
+ ), a = M(
258
+ e.value.style.chart.segments.dataLabels.formatter,
259
+ t.to,
260
+ T({
261
+ p: e.value.style.chart.segments.dataLabels.prefix,
262
+ v: t.to,
263
+ s: e.value.style.chart.segments.dataLabels.suffix,
264
+ r: e.value.style.chart.segments.dataLabels.rounding
265
+ })
266
+ );
267
+ return {
268
+ ...t,
269
+ shape: "square",
270
+ value: `${s} - ${a}`
271
+ };
272
+ })), Ce = f(() => ({
273
+ cy: "bullet-div-legend",
274
+ backgroundColor: "transparent",
275
+ color: e.value.style.chart.legend.color,
276
+ fontSize: e.value.style.chart.legend.fontSize,
277
+ paddingBottom: 6,
278
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
279
+ })), { isPrinting: se, isImaging: re, generatePdf: oe, generateImage: ne } = Ve({
280
+ elementId: `bullet_${R.value}`,
281
+ fileName: e.value.style.chart.title.text || "vue-ui-bullet",
282
+ options: e.value.userOptions.print
283
+ }), Le = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), _ = c(!1);
284
+ function ue(t) {
285
+ _.value = t, ke.value += 1;
286
+ }
287
+ function Oe() {
288
+ return d.value;
289
+ }
290
+ const S = c(!1);
291
+ function E() {
292
+ S.value = !S.value;
293
+ }
294
+ async function Be({ scale: t = 2 } = {}) {
295
+ if (!y.value) return;
296
+ const { width: s, height: a } = y.value.getBoundingClientRect(), g = s / a, { imageUri: k, base64: h } = await Ye({ domElement: y.value, base64: !0, img: !0, scale: t });
297
+ return {
298
+ imageUri: k,
299
+ base64: h,
300
+ title: e.value.style.chart.title.text,
301
+ width: s,
302
+ height: a,
303
+ aspectRatio: g
304
+ };
305
+ }
306
+ return fe({
307
+ getData: Oe,
308
+ getImage: Be,
309
+ generatePdf: oe,
310
+ generateImage: ne,
311
+ toggleAnnotator: E,
312
+ toggleFullscreen: ue
313
+ }), (t, s) => (r(), n("div", {
314
+ ref_key: "bulletChart",
315
+ ref: y,
316
+ class: ce(`vue-ui-bullet ${_.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
317
+ style: D(`font-family:${e.value.style.fontFamily};width:100%;background:${e.value.style.chart.backgroundColor}`),
318
+ id: `bullet_${R.value}`,
319
+ onMouseenter: s[0] || (s[0] = () => o(Q)(!0)),
320
+ onMouseleave: s[1] || (s[1] = () => o(Q)(!1))
321
+ }, [
322
+ e.value.userOptions.buttons.annotator ? (r(), C(o(ye), {
323
+ key: 0,
324
+ svgRef: o(ee),
325
+ backgroundColor: e.value.style.chart.backgroundColor,
326
+ color: e.value.style.chart.color,
327
+ active: S.value,
328
+ onClose: E
329
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : i("", !0),
330
+ Le.value ? (r(), n("div", at, null, 512)) : i("", !0),
331
+ e.value.style.chart.title.text ? (r(), n("div", {
332
+ key: 2,
333
+ ref_key: "chartTitle",
334
+ ref: j,
335
+ style: "width:100%;background:transparent;"
336
+ }, [
337
+ (r(), C(Xe, {
338
+ lineHeight: "1.3rem",
339
+ key: `title_${q.value}`,
340
+ config: {
341
+ title: {
342
+ cy: "bullet-div-title",
343
+ ...e.value.style.chart.title
344
+ },
345
+ subtitle: {
346
+ cy: "bullet-div-subtitle",
347
+ ...e.value.style.chart.title.subtitle
348
+ }
349
+ }
350
+ }, null, 8, ["config"]))
351
+ ], 512)) : i("", !0),
352
+ e.value.userOptions.show && p.value && (o(Z) || o(N)) ? (r(), C(o(pe), {
353
+ key: 3,
354
+ ref: "details",
355
+ backgroundColor: e.value.style.chart.backgroundColor,
356
+ color: e.value.style.chart.color,
357
+ isPrinting: o(se),
358
+ isImaging: o(re),
359
+ uid: R.value,
360
+ hasTooltip: !1,
361
+ hasPdf: e.value.userOptions.buttons.pdf,
362
+ hasImg: e.value.userOptions.buttons.img,
363
+ hasXls: !1,
364
+ hasTable: !1,
365
+ hasLabel: !1,
366
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
367
+ isFullscreen: _.value,
368
+ chartElement: y.value,
369
+ position: e.value.userOptions.position,
370
+ titles: { ...e.value.userOptions.buttonTitles },
371
+ hasAnnotator: e.value.userOptions.buttons.annotator,
372
+ isAnnotation: S.value,
373
+ callbacks: e.value.userOptions.callbacks,
374
+ printScale: e.value.userOptions.print.scale,
375
+ onToggleFullscreen: ue,
376
+ onGeneratePdf: o(oe),
377
+ onGenerateImage: o(ne),
378
+ onToggleAnnotator: E,
379
+ style: D({
380
+ visibility: o(Z) ? o(N) ? "visible" : "hidden" : "visible"
381
+ })
382
+ }, Fe({ _: 2 }, [
383
+ t.$slots.menuIcon ? {
384
+ name: "menuIcon",
385
+ fn: w(({ isOpen: a, color: g }) => [
386
+ m(t.$slots, "menuIcon", P(F({ isOpen: a, color: g })), void 0, !0)
387
+ ]),
388
+ key: "0"
389
+ } : void 0,
390
+ t.$slots.optionPdf ? {
391
+ name: "optionPdf",
392
+ fn: w(() => [
393
+ m(t.$slots, "optionPdf", {}, void 0, !0)
394
+ ]),
395
+ key: "1"
396
+ } : void 0,
397
+ t.$slots.optionImg ? {
398
+ name: "optionImg",
399
+ fn: w(() => [
400
+ m(t.$slots, "optionImg", {}, void 0, !0)
401
+ ]),
402
+ key: "2"
403
+ } : void 0,
404
+ t.$slots.optionFullscreen ? {
405
+ name: "optionFullscreen",
406
+ fn: w(({ toggleFullscreen: a, isFullscreen: g }) => [
407
+ m(t.$slots, "optionFullscreen", P(F({ toggleFullscreen: a, isFullscreen: g })), void 0, !0)
408
+ ]),
409
+ key: "3"
410
+ } : void 0,
411
+ t.$slots.optionAnnotator ? {
412
+ name: "optionAnnotator",
413
+ fn: w(({ toggleAnnotator: a, isAnnotator: g }) => [
414
+ m(t.$slots, "optionAnnotator", P(F({ toggleAnnotator: a, isAnnotator: g })), void 0, !0)
415
+ ]),
416
+ key: "4"
417
+ } : void 0
418
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : i("", !0),
419
+ (r(), n("svg", {
420
+ ref_key: "svgRef",
421
+ ref: ee,
422
+ xmlns: o(Ee),
423
+ class: ce({ "vue-data-ui-fullscreen--on": _.value, "vue-data-ui-fulscreen--off": !_.value, "vue-ui-bullet-svg": !0 }),
424
+ viewBox: `0 0 ${l.value.width} ${l.value.height}`,
425
+ style: D(`width: 100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
426
+ }, [
427
+ He(o(me)),
428
+ t.$slots["chart-background"] ? (r(), n("foreignObject", {
429
+ key: 0,
430
+ x: 0,
431
+ y: 0,
432
+ width: l.value.width,
433
+ height: l.value.height,
434
+ style: {
435
+ pointerEvents: "none"
436
+ }
437
+ }, [
438
+ m(t.$slots, "chart-background", {}, void 0, !0)
439
+ ], 8, st)) : i("", !0),
440
+ A.value ? (r(), n("g", rt, [
441
+ (r(!0), n(V, null, G(d.value.chunks, (a) => (r(), n("rect", {
442
+ x: a.x,
443
+ y: a.y,
444
+ height: a.height,
445
+ width: a.width,
446
+ fill: a.color,
447
+ "stroke-width": 1,
448
+ stroke: e.value.style.chart.backgroundColor,
449
+ style: { transition: "x 0.3s ease-in-out, width 0.3s ease-in-out" }
450
+ }, null, 8, ot))), 256)),
451
+ !e.value.style.chart.target.onTop && e.value.style.chart.target.show ? (r(), n("rect", {
452
+ key: 0,
453
+ x: d.value.target.x,
454
+ y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.target.heightRatio) / 2,
455
+ height: l.value.chartHeight * e.value.style.chart.target.heightRatio,
456
+ width: e.value.style.chart.target.width,
457
+ rx: e.value.style.chart.target.rounded ? e.value.style.chart.target.width / 2 : 0,
458
+ fill: e.value.style.chart.target.color,
459
+ stroke: e.value.style.chart.target.stroke,
460
+ "stroke-width": e.value.style.chart.target.strokeWidth
461
+ }, null, 8, nt)) : i("", !0),
462
+ I("rect", {
463
+ x: l.value.left,
464
+ y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.valueBar.heightRatio) / 2,
465
+ height: l.value.chartHeight * e.value.style.chart.valueBar.heightRatio,
466
+ width: d.value.value.width,
467
+ fill: e.value.style.chart.valueBar.color,
468
+ stroke: e.value.style.chart.valueBar.stroke,
469
+ "stroke-width": e.value.style.chart.valueBar.strokeWidth
470
+ }, null, 8, ut),
471
+ e.value.style.chart.valueBar.label.show ? (r(), n("text", {
472
+ key: 1,
473
+ x: l.value.left + d.value.value.width,
474
+ y: l.value.top - 6 + e.value.style.chart.valueBar.label.offsetY,
475
+ "font-size": e.value.style.chart.valueBar.label.fontSize,
476
+ "font-weight": e.value.style.chart.valueBar.label.bold ? "bold" : "normal",
477
+ fill: e.value.style.chart.valueBar.label.color,
478
+ "text-anchor": "middle"
479
+ }, H(o(M)(
480
+ e.value.style.chart.segments.dataLabels.formatter,
481
+ v.value,
482
+ o(T)({
483
+ p: e.value.style.chart.segments.dataLabels.prefix,
484
+ v: v.value,
485
+ s: e.value.style.chart.segments.dataLabels.suffix,
486
+ r: e.value.style.chart.segments.dataLabels.rounding
487
+ })
488
+ )), 9, it)) : i("", !0),
489
+ e.value.style.chart.target.onTop && e.value.style.chart.target.show ? (r(), n("rect", {
490
+ key: 2,
491
+ x: d.value.target.x,
492
+ y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.target.heightRatio) / 2,
493
+ height: l.value.chartHeight * e.value.style.chart.target.heightRatio,
494
+ width: e.value.style.chart.target.width,
495
+ rx: e.value.style.chart.target.rounded ? e.value.style.chart.target.width / 2 : 0,
496
+ fill: e.value.style.chart.target.color,
497
+ stroke: e.value.style.chart.target.stroke,
498
+ "stroke-width": e.value.style.chart.target.strokeWidth,
499
+ style: { transition: "x 0.3s ease-in-out" }
500
+ }, null, 8, ct)) : i("", !0),
501
+ e.value.style.chart.segments.dataLabels.show ? (r(), n("g", ht, [
502
+ (r(!0), n(V, null, G(d.value.ticks, (a) => (r(), n("text", {
503
+ x: a.x,
504
+ y: a.y,
505
+ "text-anchor": "middle",
506
+ fill: e.value.style.chart.segments.dataLabels.color,
507
+ "font-size": e.value.style.chart.segments.dataLabels.fontSize + "px",
508
+ "font-weight": e.value.style.chart.segments.dataLabels.bold ? "bold" : "normal"
509
+ }, H(o(M)(
510
+ e.value.style.chart.segments.dataLabels.formatter,
511
+ a.value,
512
+ o(T)({
513
+ p: e.value.style.chart.segments.dataLabels.prefix,
514
+ v: a.value,
515
+ s: e.value.style.chart.segments.dataLabels.suffix,
516
+ r: e.value.style.chart.segments.dataLabels.rounding
517
+ })
518
+ )), 9, vt))), 256))
519
+ ])) : i("", !0),
520
+ e.value.style.chart.segments.dataLabels.show && e.value.style.chart.segments.ticks.show ? (r(), n("g", dt, [
521
+ (r(!0), n(V, null, G(d.value.ticks, (a) => (r(), n("line", {
522
+ x1: a.x,
523
+ x2: a.x,
524
+ y1: l.value.bottom,
525
+ y2: l.value.bottom + 3,
526
+ stroke: e.value.style.chart.segments.ticks.stroke,
527
+ "stroke-width": 1,
528
+ "stroke-linecap": "round"
529
+ }, null, 8, gt))), 256))
530
+ ])) : i("", !0)
531
+ ])) : i("", !0),
532
+ m(t.$slots, "svg", { svg: l.value }, void 0, !0)
533
+ ], 14, lt)),
534
+ t.$slots.watermark ? (r(), n("div", ft, [
535
+ m(t.$slots, "watermark", P(F({ isPrinting: o(se) || o(re) })), void 0, !0)
536
+ ])) : i("", !0),
537
+ I("div", {
538
+ ref_key: "chartLegend",
539
+ ref: X
540
+ }, [
541
+ e.value.style.chart.legend.show ? (r(), C(qe, {
542
+ key: 0,
543
+ clickable: !1,
544
+ legendSet: le.value,
545
+ config: Ce.value
546
+ }, {
547
+ item: w(({ legend: a }) => [
548
+ o(b) ? i("", !0) : (r(), n("div", mt, [
549
+ I("span", yt, H(a.name) + ":", 1),
550
+ I("span", null, H(a.value), 1)
551
+ ]))
552
+ ]),
553
+ _: 1
554
+ }, 8, ["legendSet", "config"])) : i("", !0),
555
+ m(t.$slots, "legend", { legend: le.value }, void 0, !0)
556
+ ], 512),
557
+ t.$slots.source ? (r(), n("div", {
558
+ key: 5,
559
+ ref_key: "source",
560
+ ref: Y,
561
+ dir: "auto"
562
+ }, [
563
+ m(t.$slots, "source", {}, void 0, !0)
564
+ ], 512)) : i("", !0),
565
+ o(b) ? (r(), C(Ze, { key: 6 })) : i("", !0)
566
+ ], 46, tt));
567
+ }
568
+ }, It = /* @__PURE__ */ et(pt, [["__scopeId", "data-v-d5ec7fd2"]]);
569
+ export {
570
+ It as default
571
+ };