vue-data-ui 3.1.4 → 3.1.6

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 (92) hide show
  1. package/dist/{Arrow-COJRk3pc.js → Arrow-DtlAIKPQ.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BdAp3qr9.js → BaseDraggableDialog-BVZPPMT9.js} +2 -2
  3. package/dist/{BaseIcon-B5nQNkmd.js → BaseIcon-D_BjQBAR.js} +1 -1
  4. package/dist/{ColorPicker-CPqHwp1V.js → ColorPicker-BeJGNqJl.js} +2 -2
  5. package/dist/{DataTable-CzO3oHys.js → DataTable-IycMkaTU.js} +2 -2
  6. package/dist/{Legend-BQqnf4BN.js → Legend-D7l8BJ7z.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-D_g27Foy.js → NonSvgPenAndPaper-BK5M9Lt9.js} +3 -3
  8. package/dist/{PackageVersion-7CxQB-mx.js → PackageVersion-BtfT0hV9.js} +1 -1
  9. package/dist/{PenAndPaper-C8hICPzL.js → PenAndPaper-BdzDJYnr.js} +3 -3
  10. package/dist/{Shape-BEVQVI0z.js → Shape-DD3SLpa4.js} +1 -1
  11. package/dist/Slicer-DoGlWyq_.js +596 -0
  12. package/dist/{SparkTooltip-BSgzljwP.js → SparkTooltip-DAfofSes.js} +1 -1
  13. package/dist/{Title-nHtPyPd9.js → Title-DbQthJAs.js} +1 -1
  14. package/dist/Tooltip-DvtYLrX2.js +200 -0
  15. package/dist/{UserOptions-D3pVnvAB.js → UserOptions-Dd5XOrwq.js} +2 -2
  16. package/dist/{dom-to-png-CcijTM69.js → dom-to-png-j6qE-sAL.js} +1 -1
  17. package/dist/{img-Bl0o2UAr.js → img-DLgjML7h.js} +1 -1
  18. package/dist/{index-INqbM37s.js → index-C0wrF8hm.js} +6 -2
  19. package/dist/{pdf-BeeAdG2m.js → pdf-Csglybwj.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +4 -0
  22. package/dist/types/vue-data-ui.d.ts +4 -0
  23. package/dist/{useAutoSizeLabelsInsideViewbox-DXkvjSDn.js → useAutoSizeLabelsInsideViewbox-Bj3DhGbZ.js} +1 -1
  24. package/dist/{useNestedProp-BKprMEaB.js → useNestedProp-Bg2FlIgI.js} +1 -1
  25. package/dist/{usePrinter-9WO5mDzj.js → usePrinter-C2jvouU0.js} +2 -2
  26. package/dist/{vue-data-ui-IMHc9Ta4.js → vue-data-ui-DaOijb0V.js} +64 -64
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-D-1TVi2s.js → vue-ui-3d-bar-BbW6NaRc.js} +8 -8
  29. package/dist/{vue-ui-accordion-CQZjxT5U.js → vue-ui-accordion-3JuSLBjV.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-B31NbBxS.js → vue-ui-age-pyramid-D94C1TOK.js} +44 -42
  31. package/dist/{vue-ui-annotator-BmFYtzWW.js → vue-ui-annotator-Jq_yw0h7.js} +2 -2
  32. package/dist/{vue-ui-bullet-BvMlcux3.js → vue-ui-bullet-ajwy7d-R.js} +7 -7
  33. package/dist/{vue-ui-candlestick-CCrNcgjy.js → vue-ui-candlestick-vMGbmNWA.js} +87 -85
  34. package/dist/{vue-ui-carousel-table-DrGj7_CL.js → vue-ui-carousel-table-DydTCm2Z.js} +4 -4
  35. package/dist/{vue-ui-chestnut-Dz0E-AxZ.js → vue-ui-chestnut-D6AP76wU.js} +37 -37
  36. package/dist/{vue-ui-chord-BxOzgPka.js → vue-ui-chord-Du8GJXPN.js} +11 -11
  37. package/dist/{vue-ui-circle-pack-CaWwzEF0.js → vue-ui-circle-pack-C-C3OGW_.js} +232 -228
  38. package/dist/{vue-ui-cursor-CG-oJITu.js → vue-ui-cursor-B70FlDqP.js} +2 -2
  39. package/dist/{vue-ui-dashboard-BFLQYXuo.js → vue-ui-dashboard-DrFCH7LP.js} +67 -67
  40. package/dist/{vue-ui-digits-BlZsS_qz.js → vue-ui-digits-CQy-vOC2.js} +2 -2
  41. package/dist/{vue-ui-donut-COXIRkz4.js → vue-ui-donut-D0RdN18d.js} +53 -51
  42. package/dist/{vue-ui-donut-evolution-DSGLD4z5.js → vue-ui-donut-evolution-naYIvk-b.js} +38 -38
  43. package/dist/{vue-ui-dumbbell-DgUPMy2W.js → vue-ui-dumbbell-D6b7WMTy.js} +84 -84
  44. package/dist/{vue-ui-flow-E8_jp5Qc.js → vue-ui-flow-Dh8_ii-s.js} +82 -80
  45. package/dist/{vue-ui-funnel-NMcBpYTQ.js → vue-ui-funnel-Ct4e9chO.js} +31 -31
  46. package/dist/{vue-ui-galaxy-Cay4NZ6o.js → vue-ui-galaxy-Dqklv14X.js} +49 -47
  47. package/dist/{vue-ui-gauge-DWOH8_Z2.js → vue-ui-gauge-D-vHj5J1.js} +7 -7
  48. package/dist/{vue-ui-gizmo-DtZu2tcU.js → vue-ui-gizmo-Cn0d1lVH.js} +3 -3
  49. package/dist/{vue-ui-heatmap-Dk5515tQ.js → vue-ui-heatmap-BpcoDwpi.js} +69 -67
  50. package/dist/{vue-ui-history-plot-X_jPheWu.js → vue-ui-history-plot-D8tmNUHo.js} +148 -146
  51. package/dist/{vue-ui-kpi-DwNsapLR.js → vue-ui-kpi-88Bguk6S.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-uyATuTz5.js → vue-ui-mini-loader-VDpWxyls.js} +2 -2
  53. package/dist/{vue-ui-molecule-BOeCt8b2.js → vue-ui-molecule-Cn8yeJLZ.js} +63 -61
  54. package/dist/{vue-ui-mood-radar-BeHjc5Ty.js → vue-ui-mood-radar-DidC77_K.js} +9 -9
  55. package/dist/{vue-ui-nested-donuts-CPoaD2py.js → vue-ui-nested-donuts-D1EZ91Wm.js} +71 -69
  56. package/dist/{vue-ui-onion-C8H8i77u.js → vue-ui-onion-B_mir5Ax.js} +40 -37
  57. package/dist/{vue-ui-parallel-coordinate-plot-Cblzs6mf.js → vue-ui-parallel-coordinate-plot-DRbJyqiQ.js} +54 -52
  58. package/dist/{vue-ui-quadrant-BLYsMAey.js → vue-ui-quadrant-D7ihdCkd.js} +204 -202
  59. package/dist/{vue-ui-quick-chart-D-7cooqG.js → vue-ui-quick-chart-Dwc1xJtX.js} +63 -61
  60. package/dist/{vue-ui-radar-BBR8cYGx.js → vue-ui-radar-DhsgkGwF.js} +121 -119
  61. package/dist/{vue-ui-rating-Ccn8aUMA.js → vue-ui-rating-D_sWv7fR.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-SKeIJXHs.js → vue-ui-relation-circle-CAvYwKpm.js} +7 -7
  63. package/dist/{vue-ui-ridgeline-CuHSBPB8.js → vue-ui-ridgeline-DuWQX2OI.js} +10 -10
  64. package/dist/{vue-ui-rings-SusI7pff.js → vue-ui-rings-BrBkOGZk.js} +162 -160
  65. package/dist/{vue-ui-scatter-Do8NoLng.js → vue-ui-scatter--kNBhPeG.js} +158 -156
  66. package/dist/{vue-ui-skeleton-FONviv9G.js → vue-ui-skeleton-B6Y0yxOn.js} +3 -3
  67. package/dist/{vue-ui-smiley-Bbt8bZxB.js → vue-ui-smiley-B7tZsNRS.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-DB7RPBwQ.js → vue-ui-spark-trend-Dy5C9uny.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-B8inUR_m.js → vue-ui-sparkbar-9NN07DOT.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-B4_YoY5M.js → vue-ui-sparkgauge-iV-u83Ie.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-DXSLenC7.js → vue-ui-sparkhistogram-X47TDKC2.js} +4 -4
  72. package/dist/{vue-ui-sparkline-BQ6Voxky.js → vue-ui-sparkline-C67Y3c7l.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-BgFJQKhq.js → vue-ui-sparkstackbar-Bzmq9peq.js} +36 -34
  74. package/dist/{vue-ui-stackbar-CBB-kH1C.js → vue-ui-stackbar-C0cn-5Sz.js} +15 -13
  75. package/dist/{vue-ui-strip-plot-3gWivNhR.js → vue-ui-strip-plot-D3StIxYT.js} +59 -57
  76. package/dist/{vue-ui-table-NJNp95Us.js → vue-ui-table-B-wP544v.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-CRzHSurU.js → vue-ui-table-heatmap-_qJwOiYG.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-DxGr1WNr.js → vue-ui-table-sparkline-C6MoeyKm.js} +4 -4
  79. package/dist/{vue-ui-thermometer-B6NudPzq.js → vue-ui-thermometer-BmYZiNK4.js} +7 -7
  80. package/dist/{vue-ui-timer-DO3oJlhi.js → vue-ui-timer-XeLnI_ia.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-Dv39xDlL.js → vue-ui-tiremarks-CnCSAQiH.js} +6 -6
  82. package/dist/{vue-ui-treemap-D9jbccaW.js → vue-ui-treemap-Nd27H4H5.js} +41 -39
  83. package/dist/{vue-ui-vertical-bar-CxJNWczK.js → vue-ui-vertical-bar-Dd1XUvnp.js} +54 -52
  84. package/dist/{vue-ui-waffle-BMjk9LhH.js → vue-ui-waffle-Czg-z9KF.js} +56 -54
  85. package/dist/{vue-ui-wheel-CMACWJLJ.js → vue-ui-wheel-DfPu-QQM.js} +6 -6
  86. package/dist/{vue-ui-word-cloud-BbwSabN0.js → vue-ui-word-cloud-CB9_bPjO.js} +107 -104
  87. package/dist/{vue-ui-world-DCp2i-uy.js → vue-ui-world-Bo_NzzhJ.js} +12 -10
  88. package/dist/{vue-ui-xy-CRQHfrGQ.js → vue-ui-xy-Dc-o6Q3R.js} +1234 -1231
  89. package/dist/{vue-ui-xy-canvas-D-iziyn0.js → vue-ui-xy-canvas-D1Do33ar.js} +46 -44
  90. package/package.json +4 -2
  91. package/dist/Slicer-Cmc94zkG.js +0 -604
  92. package/dist/Tooltip-RCWHeRDV.js +0 -161
@@ -0,0 +1,596 @@
1
+ import { useCssVars as qe, computed as d, ref as i, onMounted as ge, onBeforeUnmount as Y, watch as P, nextTick as _, onUpdated as Ke, createElementBlock as m, openBlock as f, createElementVNode as v, createCommentVNode as y, renderSlot as Je, normalizeStyle as M, createVNode as Qe, withDirectives as be, unref as U, Fragment as xe, renderList as we, normalizeClass as T, vModelText as ye, toDisplayString as ee } from "vue";
2
+ import { c as Ye, V as pe, U as Se, X as _e, F as te } from "./index-C0wrF8hm.js";
3
+ import { t as Ce, u as et } from "./useResponsive-DfdjqQps.js";
4
+ import tt from "./BaseIcon-D_BjQBAR.js";
5
+ import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const at = {
7
+ class: "vue-data-ui-slicer-labels",
8
+ style: { position: "relative", "z-index": "1", "pointer-events": "none" }
9
+ }, nt = {
10
+ key: 0,
11
+ style: { width: "100%", position: "relative" }
12
+ }, it = {
13
+ key: 0,
14
+ class: "minimap",
15
+ style: { width: "100%" }
16
+ }, ut = ["xmlns", "viewBox"], ot = ["id"], rt = ["stop-color"], st = ["d", "stroke"], dt = ["x", "width", "height", "fill", "rx"], vt = ["d", "fill"], ct = ["x", "width", "height", "rx", "fill"], mt = ["x", "width", "height", "fill", "rx"], ft = ["d", "fill"], ht = ["d", "stroke"], gt = ["cx", "cy", "stroke", "fill"], bt = ["cx", "cy", "stroke", "fill"], xt = ["x1", "x2", "y2", "stroke"], wt = ["x", "height", "width", "onMouseenter"], yt = ["min", "max"], pt = ["min", "max"], St = 48, Ct = {
17
+ __name: "Slicer",
18
+ props: {
19
+ background: {
20
+ type: String,
21
+ default: "#FFFFFF"
22
+ },
23
+ borderColor: {
24
+ type: String,
25
+ default: "#FFFFFF"
26
+ },
27
+ fontSize: {
28
+ type: Number,
29
+ default: 14
30
+ },
31
+ labelLeft: {
32
+ type: [String, Number],
33
+ default: ""
34
+ },
35
+ labelRight: {
36
+ type: [String, Number],
37
+ default: ""
38
+ },
39
+ textColor: {
40
+ type: String,
41
+ default: "#1A1A1A"
42
+ },
43
+ inputColor: {
44
+ type: String,
45
+ default: "#1A1A1A"
46
+ },
47
+ max: {
48
+ type: Number,
49
+ default: 0
50
+ },
51
+ min: {
52
+ type: Number,
53
+ default: 0
54
+ },
55
+ selectColor: {
56
+ type: String,
57
+ default: "#4A4A4A"
58
+ },
59
+ useResetSlot: {
60
+ type: Boolean,
61
+ default: !1
62
+ },
63
+ valueStart: {
64
+ type: [Number, String],
65
+ default: 0
66
+ },
67
+ valueEnd: {
68
+ type: [Number, String],
69
+ default: 0
70
+ },
71
+ minimap: {
72
+ type: Array,
73
+ default: []
74
+ },
75
+ smoothMinimap: {
76
+ type: Boolean,
77
+ default: !1
78
+ },
79
+ minimapSelectedColor: {
80
+ type: String,
81
+ default: "#1f77b4"
82
+ },
83
+ minimapSelectionRadius: {
84
+ type: Number,
85
+ default: 12
86
+ },
87
+ minimapLineColor: {
88
+ type: String,
89
+ default: "#2D353C"
90
+ },
91
+ minimapSelectedColorOpacity: {
92
+ type: Number,
93
+ default: 0.2
94
+ },
95
+ minimapSelectedIndex: {
96
+ type: Number,
97
+ default: null
98
+ },
99
+ minimapIndicatorColor: {
100
+ type: String,
101
+ default: "#2D353C"
102
+ },
103
+ refreshStartPoint: {
104
+ type: Number,
105
+ default: 0
106
+ },
107
+ refreshEndPoint: {
108
+ type: Number,
109
+ default: null
110
+ },
111
+ enableRangeHandles: {
112
+ type: Boolean,
113
+ default: !1
114
+ },
115
+ enableSelectionDrag: {
116
+ type: Boolean,
117
+ default: !0
118
+ },
119
+ verticalHandles: {
120
+ type: Boolean,
121
+ default: !1
122
+ }
123
+ },
124
+ emits: ["update:start", "update:end", "reset", "trapMouse"],
125
+ setup(l, { expose: ke, emit: $e }) {
126
+ qe((t) => ({
127
+ "27c3b9e7": Re.value,
128
+ "808d7b4a": p.value,
129
+ e82d40e8: Ne.value,
130
+ c022f8ea: l.selectColor,
131
+ "2dd03099": Me.value
132
+ }));
133
+ const a = l, g = i(null), r = i(a.min), s = i(a.max), B = d(() => !!a.minimap.length), O = i(Ye()), Z = i(0);
134
+ ge(() => {
135
+ const t = () => {
136
+ g.value && (Z.value = g.value.getBoundingClientRect().width);
137
+ };
138
+ t();
139
+ const e = Ce(t, 50);
140
+ window.addEventListener("resize", e), Y(() => {
141
+ window.removeEventListener("resize", e);
142
+ });
143
+ });
144
+ const Le = d(() => a.refreshEndPoint === null ? a.max : a.refreshEndPoint), L = $e, b = d(() => {
145
+ const t = a.max - a.min, e = (r.value - a.min) / t * 100, n = (s.value - a.min) / t * 100, u = (e + n) / 2, c = G.value ? `calc(${u}% - ${H.value.width}px)` : j.value ? `calc(${u}%)` : `calc(${u}% - ${H.value.width / 2}px)`;
146
+ return {
147
+ left: `${e}%`,
148
+ width: `${n - e}%`,
149
+ background: a.selectColor,
150
+ tooltipLeft: `calc(${e}% - ${j.value ? 0 : Q.value / 2}px)`,
151
+ tooltipRight: `calc(${n}% - ${G.value ? X.value : X.value / 2}px)`,
152
+ tooltipCenter: c,
153
+ arrowLeft: !j.value,
154
+ arrowRight: !G.value
155
+ };
156
+ }), j = d(() => g.value ? g.value.getBoundingClientRect().width * ((r.value - a.min) / (a.max - a.min)) - Q.value / 2 < 0 : !1), G = d(() => g.value ? g.value.getBoundingClientRect().width * ((s.value - a.min) / (a.max - a.min)) + X.value / 2 > g.value.getBoundingClientRect().width : !1), Re = d(() => a.inputColor), Me = d(() => a.background), Ne = d(() => `${a.selectColor}33`), p = d(() => a.borderColor), le = d(() => {
157
+ const t = [];
158
+ for (let e = 0; e < a.minimap.length; e += 1)
159
+ t.push(e);
160
+ return t;
161
+ });
162
+ function ae() {
163
+ L("reset");
164
+ }
165
+ function Ee() {
166
+ Number(r.value) > Number(s.value) - 1 && (r.value = Number(s.value) - 1), L("update:start", Number(r.value));
167
+ }
168
+ function Pe() {
169
+ Number(s.value) < Number(r.value) + 1 && (s.value = Number(r.value) + 1), L("update:end", Number(s.value));
170
+ }
171
+ P(
172
+ () => a.min,
173
+ (t) => {
174
+ Number(r.value) < Number(t) && (r.value = Number(t)), Number(s.value) < Number(t) && (s.value = Number(t));
175
+ }
176
+ ), P(
177
+ () => a.max,
178
+ (t) => {
179
+ Number(r.value) > Number(t) && (r.value = Number(t)), Number(s.value) > Number(t) && (s.value = Number(t));
180
+ }
181
+ );
182
+ const q = i(null), o = i({
183
+ width: 1,
184
+ height: 1
185
+ }), N = i(null);
186
+ ge(() => {
187
+ if (B.value) {
188
+ const t = Ce(() => {
189
+ const { width: e, height: n } = et({
190
+ chart: q.value
191
+ });
192
+ o.value.width = e, o.value.height = n - 47;
193
+ });
194
+ N.value = new ResizeObserver(t), N.value.observe(q.value);
195
+ }
196
+ }), Y(() => {
197
+ N.value && N.value.disconnect();
198
+ });
199
+ const h = d(() => a.minimap.length ? o.value.width / a.minimap.length : 0), x = d(() => {
200
+ if (!a.minimap.length) return [];
201
+ const t = Math.max(...a.minimap), e = Math.min(...a.minimap) - 10, n = t - (e > 0 ? 0 : e), u = a.minimap.map((Ze, je) => {
202
+ const Ge = Ze - e;
203
+ return {
204
+ x: o.value.width / a.minimap.length * je + h.value / 2,
205
+ y: o.value.height - Ge / n * (o.value.height * 0.9)
206
+ };
207
+ }), c = a.smoothMinimap ? pe(u) : Se(u), V = [...u].slice(a.valueStart, a.valueEnd), Oe = a.smoothMinimap ? pe(V) : Se(V);
208
+ return {
209
+ fullSet: c,
210
+ selectionSet: Oe,
211
+ sliced: V,
212
+ firstPlot: u[a.valueStart],
213
+ lastPlot: u[a.valueEnd - 1]
214
+ };
215
+ }), w = d(() => ({
216
+ x: h.value * r.value + h.value / 2,
217
+ width: o.value.width * ((s.value - r.value) / a.max) - h.value
218
+ })), D = i(a.minimapSelectedIndex);
219
+ P(
220
+ () => a.minimapSelectedIndex,
221
+ (t) => {
222
+ D.value = t + a.valueStart;
223
+ },
224
+ { immediate: !0 }
225
+ );
226
+ function Te(t) {
227
+ D.value = t, t >= a.valueStart && t < a.valueEnd && L("trapMouse", t - a.valueStart);
228
+ }
229
+ const Be = i(0), K = i(null), J = i(null);
230
+ function ne(t) {
231
+ r.value = t, K.value && (K.value.value = t), L("update:start", Number(r.value));
232
+ }
233
+ function ie(t) {
234
+ s.value = t, J.value && (J.value.value = t), L("update:end", Number(s.value));
235
+ }
236
+ const W = d(() => a.valueEnd - a.valueStart), z = i(!1);
237
+ let De = i(null);
238
+ const ze = d(() => (Z.value - 48) / (a.max - a.min) * W.value), Ie = d(() => Math.max(1, Z.value - St - ze.value)), Ae = d(() => Math.max(1, a.max - a.min - W.value)), Fe = d(() => Ae.value / Ie.value), ue = i(0), oe = i(0), He = i(0), re = i(0);
239
+ let S = null, C = null, k = null, $ = null;
240
+ const se = (t) => {
241
+ if (R.value = !0, !a.enableSelectionDrag) return;
242
+ const e = t.type === "touchstart";
243
+ e || t.stopPropagation();
244
+ const n = e && t.targetTouches && t.targetTouches[0] ? t.targetTouches[0] : null, u = e ? n ? n.target : null : t.target;
245
+ if (!u || !(u instanceof Element) || u.classList && u.classList.contains("range-handle")) return;
246
+ z.value = !0;
247
+ const c = e ? n ? n.clientX : 0 : t.clientX;
248
+ De.value = c, ue.value = c, oe.value = Number(r.value), He.value = Number(s.value), re.value = Fe.value, S = e ? "touchmove" : "mousemove", C = e ? "touchend" : "mouseup", k = e ? We : Ve, $ = e ? Ue : Xe, window.addEventListener(S, k, { passive: !1 }), window.addEventListener(C, $);
249
+ };
250
+ function Ve(t) {
251
+ z.value && de(t.clientX);
252
+ }
253
+ function We(t) {
254
+ if (!z.value || !g.value) return;
255
+ const e = t.target;
256
+ if (!(e instanceof Element) || !g.value.contains(e) || e.classList && e.classList.contains("range-handle")) return;
257
+ t.preventDefault();
258
+ const n = t.targetTouches && t.targetTouches[0] ? t.targetTouches[0] : null;
259
+ n && de(n.clientX);
260
+ }
261
+ function de(t) {
262
+ if (!z.value) return;
263
+ const n = (t - ue.value) * re.value;
264
+ let u = Math.round(oe.value + n);
265
+ u = Math.max(a.min, Math.min(u, a.max - W.value));
266
+ const c = u + W.value;
267
+ ne(u), ie(c);
268
+ }
269
+ function Xe() {
270
+ ve();
271
+ }
272
+ function Ue() {
273
+ ve();
274
+ }
275
+ function ve() {
276
+ z.value = !1, S && k && window.removeEventListener(S, k), C && $ && window.removeEventListener(C, $), S = C = null, k = $ = null;
277
+ }
278
+ const E = i(!1), I = i(null), A = i(null), Q = i(1), X = i(1), R = i(!1);
279
+ function ce() {
280
+ I.value && (Q.value = I.value.getBoundingClientRect().width);
281
+ }
282
+ function me() {
283
+ A.value && (X.value = A.value.getBoundingClientRect().width);
284
+ }
285
+ const fe = i(0);
286
+ function he(t) {
287
+ fe.value = t === "start" ? 1 : 0;
288
+ }
289
+ const F = i(!1), H = i({
290
+ width: 0,
291
+ left: 0
292
+ });
293
+ return P([r, s], async () => {
294
+ if (await _(), !I.value || !A.value) {
295
+ F.value = !1, H.value = { width: 0, left: 0 };
296
+ return;
297
+ }
298
+ const t = I.value.getBoundingClientRect(), e = A.value.getBoundingClientRect();
299
+ F.value = t.x + t.width > e.x;
300
+ const n = t.x + t.width / 2, u = e.x + e.width / 2, c = t.width + e.width, V = (n + u) / 2;
301
+ H.value = {
302
+ width: c,
303
+ left: V - c / 2
304
+ };
305
+ }), Ke(() => {
306
+ ce(), me();
307
+ }), P(
308
+ () => a.labelLeft,
309
+ () => {
310
+ _(ce);
311
+ },
312
+ { deep: !0 }
313
+ ), P(
314
+ () => a.labelRight,
315
+ () => {
316
+ _(me);
317
+ },
318
+ { deep: !0 }
319
+ ), ke({
320
+ setStartValue: ne,
321
+ setEndValue: ie
322
+ }), Y(() => {
323
+ N.value && N.value.disconnect(), S && k && window.removeEventListener(S, k), C && $ && window.removeEventListener(C, $), S = C = null, k = $ = null;
324
+ }), (t, e) => (f(), m("div", {
325
+ "data-dom-to-png-ignore": "",
326
+ style: { padding: "0 24px" },
327
+ class: "vue-data-ui-zoom",
328
+ ref_key: "zoomWrapper",
329
+ ref: g,
330
+ onMousedown: se,
331
+ onTouchstart: se,
332
+ onTouchend: e[11] || (e[11] = (n) => R.value = !1)
333
+ }, [
334
+ v("div", at, [
335
+ l.valueStart !== l.refreshStartPoint || l.valueEnd !== Le.value ? (f(), m("div", nt, [
336
+ l.useResetSlot ? Je(t.$slots, "reset-action", {
337
+ key: 1,
338
+ reset: ae
339
+ }, void 0, !0) : (f(), m("button", {
340
+ key: 0,
341
+ tabindex: "0",
342
+ role: "button",
343
+ class: "vue-data-ui-refresh-button",
344
+ style: M({
345
+ top: B.value ? "36px" : "-16px",
346
+ pointerEvents: "all !important"
347
+ }),
348
+ onClick: ae
349
+ }, [
350
+ Qe(tt, {
351
+ name: "refresh",
352
+ stroke: l.textColor
353
+ }, null, 8, ["stroke"])
354
+ ], 4))
355
+ ])) : y("", !0)
356
+ ]),
357
+ v("div", {
358
+ class: "double-range-slider",
359
+ ref_key: "minimapWrapper",
360
+ ref: q,
361
+ style: { "z-index": "0" },
362
+ onMouseenter: e[9] || (e[9] = (n) => R.value = !0),
363
+ onMouseleave: e[10] || (e[10] = (n) => R.value = !1)
364
+ }, [
365
+ B.value ? (f(), m("div", it, [
366
+ (f(), m("svg", {
367
+ xmlns: U(_e),
368
+ viewBox: `0 0 ${o.value.width < 0 ? 0 : o.value.width} ${o.value.height < 0 ? 0 : o.value.height}`
369
+ }, [
370
+ v("defs", null, [
371
+ v("linearGradient", {
372
+ id: O.value,
373
+ x1: "0%",
374
+ y1: "0%",
375
+ x2: "0%",
376
+ y2: "100%"
377
+ }, [
378
+ v("stop", {
379
+ offset: "0%",
380
+ "stop-color": `${l.minimapLineColor}50`
381
+ }, null, 8, rt),
382
+ e[12] || (e[12] = v("stop", {
383
+ offset: "100%",
384
+ "stop-color": "transparent"
385
+ }, null, -1))
386
+ ], 8, ot)
387
+ ]),
388
+ v("path", {
389
+ d: `M${x.value.fullSet}`,
390
+ stroke: `${l.minimapLineColor}`,
391
+ fill: "none",
392
+ "stroke-width": "1",
393
+ "stroke-linecap": "round",
394
+ "stroke-linejoin": "round",
395
+ style: { opacity: "1" }
396
+ }, null, 8, st),
397
+ v("rect", {
398
+ x: w.value.x,
399
+ width: w.value.width < 0 ? 0 : w.value.width,
400
+ height: Math.max(o.value.height, 0),
401
+ y: 0,
402
+ fill: p.value,
403
+ rx: l.minimapSelectionRadius,
404
+ stroke: "none"
405
+ }, null, 8, dt),
406
+ v("path", {
407
+ d: `M${h.value / 2},${Math.max(o.value.height, 0)} ${x.value.fullSet} L${o.value.width - h.value / 2},${Math.max(o.value.height, 0)}Z`,
408
+ fill: `url(#${O.value})`,
409
+ stroke: "none",
410
+ style: { opacity: "1" }
411
+ }, null, 8, vt),
412
+ v("rect", {
413
+ x: w.value.x,
414
+ width: w.value.width < 0 ? 0 : w.value.width,
415
+ height: Math.max(o.value.height, 0),
416
+ y: 0,
417
+ rx: l.minimapSelectionRadius,
418
+ fill: p.value
419
+ }, null, 8, ct),
420
+ v("rect", {
421
+ x: w.value.x,
422
+ width: w.value.width < 0 ? 0 : w.value.width,
423
+ height: Math.max(o.value.height, 0),
424
+ y: 0,
425
+ fill: l.minimapSelectedColor,
426
+ rx: l.minimapSelectionRadius,
427
+ style: M({
428
+ opacity: l.minimapSelectedColorOpacity
429
+ })
430
+ }, null, 12, mt),
431
+ v("path", {
432
+ d: `M${x.value.sliced[0].x},${Math.max(o.value.height, 0)} ${x.value.selectionSet} L${x.value.sliced.at(-1).x},${Math.max(o.value.height, 0)}Z`,
433
+ fill: `url(#${O.value})`,
434
+ stroke: "none",
435
+ style: { opacity: "1" }
436
+ }, null, 8, ft),
437
+ v("path", {
438
+ d: `M ${x.value.selectionSet}`,
439
+ stroke: `${l.minimapLineColor}`,
440
+ fill: "transparent",
441
+ "stroke-width": "2",
442
+ "stroke-linecap": "round",
443
+ "stroke-linejoin": "round"
444
+ }, null, 8, ht),
445
+ v("circle", {
446
+ cx: x.value.firstPlot.x,
447
+ cy: x.value.firstPlot.y,
448
+ "stroke-width": "0.5",
449
+ stroke: p.value,
450
+ r: "3",
451
+ fill: l.minimapLineColor
452
+ }, null, 8, gt),
453
+ v("circle", {
454
+ cx: x.value.lastPlot.x,
455
+ cy: x.value.lastPlot.y,
456
+ "stroke-width": "0.5",
457
+ stroke: p.value,
458
+ r: "3",
459
+ fill: l.minimapLineColor
460
+ }, null, 8, bt),
461
+ D.value !== null ? (f(!0), m(xe, { key: 0 }, we(le.value, (n, u) => (f(), m("g", null, [
462
+ D.value === n && n >= l.valueStart && n < l.valueEnd ? (f(), m("line", {
463
+ key: 0,
464
+ x1: h.value * u + h.value / 2,
465
+ x2: h.value * u + h.value / 2,
466
+ y1: 0,
467
+ y2: Math.max(o.value.height, 0),
468
+ stroke: l.minimapIndicatorColor,
469
+ "stroke-linecap": "round",
470
+ "stroke-dasharray": "2",
471
+ "stroke-width": "1"
472
+ }, null, 8, xt)) : y("", !0)
473
+ ]))), 256)) : y("", !0),
474
+ (f(!0), m(xe, null, we(le.value, (n, u) => (f(), m("rect", {
475
+ x: h.value * u,
476
+ y: 0,
477
+ height: Math.max(o.value.height, 0),
478
+ width: h.value < 0 ? 0 : h.value,
479
+ fill: "transparent",
480
+ style: M([{ "pointer-events": "all !important" }, {
481
+ cursor: n >= l.valueStart && n < l.valueEnd && l.enableSelectionDrag ? E.value ? "grabbing" : "grab" : "default"
482
+ }]),
483
+ onMousedown: e[0] || (e[0] = (c) => E.value = !0),
484
+ onMouseup: e[1] || (e[1] = (c) => E.value = !1),
485
+ onMouseenter: (c) => Te(n),
486
+ onMouseleave: e[2] || (e[2] = (c) => {
487
+ D.value = null, L("trapMouse", null);
488
+ })
489
+ }, null, 44, wt))), 256))
490
+ ], 8, ut))
491
+ ])) : y("", !0),
492
+ e[13] || (e[13] = v("div", { class: "slider-track" }, null, -1)),
493
+ v("div", {
494
+ class: T({
495
+ "range-highlight": !0,
496
+ move: l.enableSelectionDrag
497
+ }),
498
+ onMousedown: e[3] || (e[3] = (n) => E.value = !0),
499
+ onMouseup: e[4] || (e[4] = (n) => E.value = !1),
500
+ style: M({
501
+ ...b.value,
502
+ cursor: E.value ? "grabbing" : "grab"
503
+ })
504
+ }, null, 38),
505
+ l.enableRangeHandles ? be((f(), m("input", {
506
+ ref_key: "rangeStart",
507
+ ref: K,
508
+ key: `range-min${Be.value}`,
509
+ type: "range",
510
+ class: T({ "range-left": !0, "range-handle": !0, "range-minimap": B.value && l.verticalHandles }),
511
+ min: l.min,
512
+ max: l.max,
513
+ "onUpdate:modelValue": e[5] || (e[5] = (n) => r.value = n),
514
+ onInput: Ee,
515
+ onMouseenter: e[6] || (e[6] = (n) => he("start"))
516
+ }, null, 42, yt)), [
517
+ [ye, r.value]
518
+ ]) : y("", !0),
519
+ l.enableRangeHandles ? be((f(), m("input", {
520
+ key: 2,
521
+ ref_key: "rangeEnd",
522
+ ref: J,
523
+ type: "range",
524
+ class: T({ "range-right": !0, "range-handle": !0, "range-minimap": B.value && l.verticalHandles }),
525
+ min: l.min,
526
+ max: l.max,
527
+ "onUpdate:modelValue": e[7] || (e[7] = (n) => s.value = n),
528
+ onInput: Pe,
529
+ onMouseenter: e[8] || (e[8] = (n) => he("end"))
530
+ }, null, 42, pt)), [
531
+ [ye, s.value]
532
+ ]) : y("", !0),
533
+ l.labelLeft ? (f(), m("div", {
534
+ key: 3,
535
+ ref_key: "tooltipLeft",
536
+ ref: I,
537
+ class: T({
538
+ "range-tooltip": !0,
539
+ "range-tooltip-visible": R.value,
540
+ "range-tooltip-arrow": b.value.arrowLeft && !l.verticalHandles,
541
+ "range-tooltip-arrow-left": !b.value.arrowLeft && !l.verticalHandles
542
+ }),
543
+ style: M({
544
+ left: b.value.tooltipLeft,
545
+ color: U(te)(l.selectColor),
546
+ backgroundColor: l.selectColor,
547
+ border: `1px solid ${p.value}`,
548
+ zIndex: `${fe.value + 4}`,
549
+ visibility: F.value || l.labelLeft === l.labelRight ? "hidden" : "visible"
550
+ })
551
+ }, ee(l.labelLeft), 7)) : y("", !0),
552
+ (F.value || l.labelLeft === l.labelRight) && (l.labelLeft || l.labelRight) ? (f(), m("div", {
553
+ key: 4,
554
+ ref: "tooltipMerge",
555
+ class: T({
556
+ "range-tooltip": !0,
557
+ "range-tooltip-visible": R.value,
558
+ "range-tooltip-arrow": !0,
559
+ "range-tooltip-arrow-left": !b.value.arrowLeft && !l.verticalHandles,
560
+ "range-tooltip-arrow-right": !b.value.arrowRight && !l.verticalHandles
561
+ }),
562
+ style: M({
563
+ left: b.value.tooltipCenter,
564
+ width: H.value.width + "px",
565
+ color: U(te)(l.selectColor),
566
+ backgroundColor: l.selectColor,
567
+ border: `1px solid ${p.value}`,
568
+ zIndex: "4"
569
+ })
570
+ }, ee(l.labelLeft === l.labelRight ? l.labelLeft : `${l.labelLeft} - ${l.labelRight}`), 7)) : y("", !0),
571
+ l.labelRight ? (f(), m("div", {
572
+ key: 5,
573
+ ref_key: "tooltipRight",
574
+ ref: A,
575
+ class: T({
576
+ "range-tooltip": !0,
577
+ "range-tooltip-visible": R.value,
578
+ "range-tooltip-arrow": b.value.arrowRight && !l.verticalHandles,
579
+ "range-tooltip-arrow-right": !b.value.arrowRight && !l.verticalHandles
580
+ }),
581
+ style: M({
582
+ left: b.value.tooltipRight,
583
+ color: U(te)(l.selectColor),
584
+ backgroundColor: l.selectColor,
585
+ border: `1px solid ${p.value}`,
586
+ zIndex: "4",
587
+ visibility: F.value || l.labelLeft === l.labelRight ? "hidden" : "visible"
588
+ })
589
+ }, ee(l.labelRight), 7)) : y("", !0)
590
+ ], 544)
591
+ ], 544));
592
+ }
593
+ }, Nt = /* @__PURE__ */ lt(Ct, [["__scopeId", "data-v-d86f2c1b"]]);
594
+ export {
595
+ Nt as S
596
+ };
@@ -1,5 +1,5 @@
1
1
  import { toRef as c, ref as a, computed as v, onMounted as m, watch as y, createElementBlock as b, openBlock as g, normalizeStyle as x, renderSlot as k, nextTick as S } from "vue";
2
- import { s as _, aq as i } from "./index-INqbM37s.js";
2
+ import { s as _, aq as i } from "./index-C0wrF8hm.js";
3
3
  import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const R = {
5
5
  __name: "SparkTooltip",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as l, openBlock as n, Fragment as f, createElementVNode as p, createCommentVNode as o, normalizeStyle as d, unref as e, toDisplayString as g, renderSlot as r } from "vue";
2
- import { u as s } from "./useNestedProp-BKprMEaB.js";
2
+ import { u as s } from "./useNestedProp-Bg2FlIgI.js";
3
3
  const b = {
4
4
  __name: "Title",
5
5
  props: {