vue-data-ui 3.0.0-next.43 → 3.0.0-next.44

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 (91) hide show
  1. package/dist/{Arrow-Bd6Ph2ch.js → Arrow-B7lcPzHo.js} +1 -1
  2. package/dist/{BaseDraggableDialog-C--SKjDO.js → BaseDraggableDialog-0A-sqn2c.js} +2 -2
  3. package/dist/{BaseIcon-D7epehwu.js → BaseIcon-DwTx0qD4.js} +1 -1
  4. package/dist/{ColorPicker-BH0rB6ld.js → ColorPicker-DiDJpmDk.js} +2 -2
  5. package/dist/{DataTable-BB8Wz165.js → DataTable-B79H7WT_.js} +2 -2
  6. package/dist/{Legend-vx12pxjd.js → Legend-DGH0Guay.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-BmmU-AcQ.js → NonSvgPenAndPaper-DN7lfPkB.js} +3 -3
  8. package/dist/{PackageVersion-D218wea-.js → PackageVersion-C0F8732S.js} +1 -1
  9. package/dist/{PenAndPaper-dIGZM-jo.js → PenAndPaper-CS-vDQ1a.js} +3 -3
  10. package/dist/{Shape-DWkgkl1v.js → Shape-BAYkwRN0.js} +1 -1
  11. package/dist/Slicer-CmdU7prA.js +602 -0
  12. package/dist/{SparkTooltip-CCmYl6zn.js → SparkTooltip-DJ0snbnQ.js} +1 -1
  13. package/dist/{Title-BYwMvy7Q.js → Title-z6qNn48p.js} +1 -1
  14. package/dist/{Tooltip-CIqkHlwJ.js → Tooltip-CrFy7PhT.js} +1 -1
  15. package/dist/{UserOptions-BSMOmm78.js → UserOptions-BcOzneiO.js} +2 -2
  16. package/dist/{dom-to-png-C56Fv7JN.js → dom-to-png-25f5OI1y.js} +1 -1
  17. package/dist/{img-DdFXJwAG.js → img-CdRTwnmi.js} +1 -1
  18. package/dist/{index-seTAwZa0.js → index-levJbpwA.js} +17 -3
  19. package/dist/{pdf-Dl8ZF3y5.js → pdf-CYf1-FeX.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +8 -0
  22. package/dist/types/vue-data-ui.d.ts +8 -0
  23. package/dist/{useNestedProp-CU8l_fXF.js → useNestedProp-B_mV74HP.js} +1 -1
  24. package/dist/{usePrinter-Dk2fZbxG.js → usePrinter-B8EqXbK9.js} +2 -2
  25. package/dist/{vue-data-ui-DiluSkKR.js → vue-data-ui-DVkjTX4t.js} +64 -64
  26. package/dist/vue-data-ui.js +1 -1
  27. package/dist/{vue-ui-3d-bar-D9JzKCj3.js → vue-ui-3d-bar-BhiJaFdV.js} +6 -6
  28. package/dist/{vue-ui-accordion-BV8sqaEM.js → vue-ui-accordion-EgBlQQ1M.js} +3 -3
  29. package/dist/{vue-ui-age-pyramid-ooNy9i5a.js → vue-ui-age-pyramid-DaUHA1cb.js} +6 -6
  30. package/dist/{vue-ui-annotator-C1isLUoY.js → vue-ui-annotator-C8qPDDui.js} +2 -2
  31. package/dist/{vue-ui-bullet-BJEvtumk.js → vue-ui-bullet-Bun96DTE.js} +7 -7
  32. package/dist/{vue-ui-candlestick-7T6fVigp.js → vue-ui-candlestick-BCf9zu5f.js} +7 -7
  33. package/dist/{vue-ui-carousel-table-CHrwQJKm.js → vue-ui-carousel-table-B7DGWdfx.js} +4 -4
  34. package/dist/{vue-ui-chestnut-1dMZKU8l.js → vue-ui-chestnut-DV1aa8es.js} +5 -5
  35. package/dist/{vue-ui-chord-BDMYLMI6.js → vue-ui-chord-DHa_CAyG.js} +8 -8
  36. package/dist/{vue-ui-circle-pack-DBZ38AiG.js → vue-ui-circle-pack-CH-sdcOH.js} +6 -6
  37. package/dist/{vue-ui-cursor-cymBdQPf.js → vue-ui-cursor-Dz9HmPaw.js} +2 -2
  38. package/dist/{vue-ui-dashboard-p97MvAL1.js → vue-ui-dashboard-DRBjsTvw.js} +62 -62
  39. package/dist/{vue-ui-digits-DVP-mqGl.js → vue-ui-digits-DXUt3_jc.js} +2 -2
  40. package/dist/{vue-ui-donut-DUuJbxDd.js → vue-ui-donut-CDAsbI-H.js} +8 -8
  41. package/dist/{vue-ui-donut-evolution-COL2Q6T8.js → vue-ui-donut-evolution--Vtnj0q6.js} +8 -8
  42. package/dist/{vue-ui-dumbbell-CIjWYz3j.js → vue-ui-dumbbell-DgOFpmKM.js} +7 -7
  43. package/dist/{vue-ui-flow-D0DtQP8s.js → vue-ui-flow-BGVylpSb.js} +7 -7
  44. package/dist/{vue-ui-funnel-DjondOD5.js → vue-ui-funnel-C4vEv79R.js} +6 -6
  45. package/dist/{vue-ui-galaxy-TlGKc0Se.js → vue-ui-galaxy-CDceT0KT.js} +5 -5
  46. package/dist/{vue-ui-gauge-CEKh6wdN.js → vue-ui-gauge-DISTzXI9.js} +6 -6
  47. package/dist/{vue-ui-gizmo-KHlyl1I_.js → vue-ui-gizmo-D4orvr9p.js} +3 -3
  48. package/dist/{vue-ui-heatmap-O-XLCBYP.js → vue-ui-heatmap-B7Vxok0k.js} +7 -7
  49. package/dist/{vue-ui-history-plot-BFRVky6o.js → vue-ui-history-plot-Dt7kRJeF.js} +7 -7
  50. package/dist/{vue-ui-kpi-C4pD97vb.js → vue-ui-kpi-B7tdKdfe.js} +3 -3
  51. package/dist/{vue-ui-mini-loader-CFx2urSq.js → vue-ui-mini-loader-sidNidCE.js} +2 -2
  52. package/dist/{vue-ui-molecule-CzvTkkvk.js → vue-ui-molecule-Bs8Yp4ah.js} +5 -5
  53. package/dist/{vue-ui-mood-radar-Bd1PtwHi.js → vue-ui-mood-radar-Kioqiudr.js} +7 -7
  54. package/dist/{vue-ui-nested-donuts-D81ruw2p.js → vue-ui-nested-donuts-HhAlaFSt.js} +9 -9
  55. package/dist/{vue-ui-onion-_m4Fz3Zv.js → vue-ui-onion-CWZtfGzx.js} +7 -7
  56. package/dist/{vue-ui-parallel-coordinate-plot-BAsS-UhV.js → vue-ui-parallel-coordinate-plot-B-chNjZ9.js} +8 -8
  57. package/dist/{vue-ui-quadrant-EdLEsbQj.js → vue-ui-quadrant-DQhBTYDO.js} +8 -8
  58. package/dist/{vue-ui-quick-chart-CvI_F1vi.js → vue-ui-quick-chart-C1ws6m1Y.js} +6 -6
  59. package/dist/{vue-ui-radar-ChHw9L0L.js → vue-ui-radar-CvohPROX.js} +7 -7
  60. package/dist/{vue-ui-rating-_759UJ0S.js → vue-ui-rating-7J-Rljo8.js} +2 -2
  61. package/dist/{vue-ui-relation-circle-BE7IyKPH.js → vue-ui-relation-circle-B7aP1gS2.js} +6 -6
  62. package/dist/{vue-ui-ridgeline-DDmQ0KEQ.js → vue-ui-ridgeline-BMtrqyYA.js} +8 -8
  63. package/dist/{vue-ui-rings-DYR2Zffo.js → vue-ui-rings-Cs1qF85w.js} +8 -8
  64. package/dist/vue-ui-scatter-CbRehNP-.js +1178 -0
  65. package/dist/{vue-ui-skeleton-NmSoASV8.js → vue-ui-skeleton-Cce0QGED.js} +3 -3
  66. package/dist/{vue-ui-smiley-DD3AcPoa.js → vue-ui-smiley-CL9vmAQw.js} +2 -2
  67. package/dist/{vue-ui-spark-trend-CRFIrsdc.js → vue-ui-spark-trend-CYXaZpLx.js} +3 -3
  68. package/dist/{vue-ui-sparkbar-DYaUzFFQ.js → vue-ui-sparkbar-BTPKahcB.js} +3 -3
  69. package/dist/{vue-ui-sparkgauge-DFFPfZpj.js → vue-ui-sparkgauge-BTG_Za5S.js} +3 -3
  70. package/dist/{vue-ui-sparkhistogram-DAXOYsKU.js → vue-ui-sparkhistogram-BTqBeEpc.js} +4 -4
  71. package/dist/{vue-ui-sparkline-Dq98pgZo.js → vue-ui-sparkline-DL69s6J2.js} +3 -3
  72. package/dist/{vue-ui-sparkstackbar-DHm7zDFw.js → vue-ui-sparkstackbar-B-_fJUz7.js} +3 -3
  73. package/dist/{vue-ui-stackbar-DGcjtz2t.js → vue-ui-stackbar-D4kHNP4g.js} +9 -9
  74. package/dist/{vue-ui-strip-plot-mg7SEjXG.js → vue-ui-strip-plot-BpBS8GhZ.js} +7 -7
  75. package/dist/{vue-ui-table-ClPA8SKE.js → vue-ui-table-MQc8Hp7r.js} +3 -3
  76. package/dist/{vue-ui-table-heatmap-B412nk-m.js → vue-ui-table-heatmap-C_5yIuqJ.js} +5 -5
  77. package/dist/{vue-ui-table-sparkline-L_G0kf0u.js → vue-ui-table-sparkline-C9liqLFv.js} +4 -4
  78. package/dist/{vue-ui-thermometer-CHa-MhGY.js → vue-ui-thermometer-mg0tOxaR.js} +6 -6
  79. package/dist/{vue-ui-timer-wVinu4ky.js → vue-ui-timer-7IwagfFn.js} +5 -5
  80. package/dist/{vue-ui-tiremarks-3Ku4fPPU.js → vue-ui-tiremarks-D-FkzaF8.js} +6 -6
  81. package/dist/{vue-ui-treemap-B8sSc70D.js → vue-ui-treemap-C8COBtcv.js} +8 -8
  82. package/dist/{vue-ui-vertical-bar-DLdtQziT.js → vue-ui-vertical-bar-BPhdeEim.js} +9 -9
  83. package/dist/{vue-ui-waffle-CC71XEn9.js → vue-ui-waffle-DECZft1T.js} +8 -8
  84. package/dist/{vue-ui-wheel-CI_xJP2J.js → vue-ui-wheel-CYPmRh5g.js} +6 -6
  85. package/dist/{vue-ui-word-cloud-76QvSUIu.js → vue-ui-word-cloud-C4MoU1Be.js} +6 -6
  86. package/dist/{vue-ui-world-BhDu6-N4.js → vue-ui-world-CXFzBK_Y.js} +6 -6
  87. package/dist/{vue-ui-xy-BBqz-9hP.js → vue-ui-xy-DLh7Ynhl.js} +1398 -1394
  88. package/dist/{vue-ui-xy-canvas-BEsL3iix.js → vue-ui-xy-canvas-DGNig9UO.js} +8 -8
  89. package/package.json +1 -1
  90. package/dist/Slicer-LE0PTt3i.js +0 -588
  91. package/dist/vue-ui-scatter-ndISiTaO.js +0 -1047
@@ -1,15 +1,15 @@
1
1
  import { defineAsyncComponent as K, ref as d, computed as L, useSlots as Va, onMounted as ua, watch as D, nextTick as sa, shallowRef as ze, onBeforeUnmount as Ga, createElementBlock as se, openBlock as S, unref as p, normalizeClass as Za, normalizeStyle as Q, createCommentVNode as X, createBlock as N, createElementVNode as ne, createSlots as ja, withCtx as x, renderSlot as k, normalizeProps as B, guardReactiveProps as _, createVNode as qa, toDisplayString as na, createTextVNode as Ja } from "vue";
2
- import { u as Ka, c as Qa, t as el, p as V, a as al, C as ge, b as ll, D as $e, i as ee, f as ae, d as ia, a5 as tl, G as ol, ae as rl, o as ul, e as sl, y as va, q as nl, r as il, z as vl, s as ie, l as cl } from "./index-seTAwZa0.js";
2
+ import { u as Ka, c as Qa, t as el, p as V, a as al, C as ge, b as ll, D as $e, i as ee, f as ae, d as ia, a5 as tl, G as ol, ae as rl, o as ul, e as sl, y as va, q as nl, r as il, z as vl, s as ie, l as cl } from "./index-levJbpwA.js";
3
3
  import { d as dl, t as hl, u as yl, c as fl, a as ca, l as C, r as Ie, b as R, p as da } from "./useResponsive-DfdjqQps.js";
4
- import { u as ha } from "./useNestedProp-CU8l_fXF.js";
5
- import { u as gl } from "./usePrinter-Dk2fZbxG.js";
4
+ import { u as ha } from "./useNestedProp-B_mV74HP.js";
5
+ import { u as gl } from "./usePrinter-B8EqXbK9.js";
6
6
  import { u as pl } from "./useUserOptionState-BIvW1Kz7.js";
7
7
  import { u as ml } from "./useChartAccessibility-9icAAmYg.js";
8
- import bl from "./Legend-vx12pxjd.js";
9
- import xl from "./Title-BYwMvy7Q.js";
10
- import { S as Ll } from "./Slicer-LE0PTt3i.js";
8
+ import bl from "./Legend-DGH0Guay.js";
9
+ import xl from "./Title-z6qNn48p.js";
10
+ import { S as Ll } from "./Slicer-CmdU7prA.js";
11
11
  import { u as kl } from "./useTimeLabels-DkzmKfZn.js";
12
- import Cl from "./img-DdFXJwAG.js";
12
+ import Cl from "./img-CdRTwnmi.js";
13
13
  import { _ as wl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const Sl = ["id"], zl = ["onClick"], $l = {
15
15
  key: 2,
@@ -32,7 +32,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
32
32
  },
33
33
  emits: ["selectLegend"],
34
34
  setup(Me, { expose: ya, emit: fa }) {
35
- const ga = K(() => import("./vue-ui-accordion-BV8sqaEM.js")), pa = K(() => import("./DataTable-BB8Wz165.js")), ma = K(() => import("./NonSvgPenAndPaper-BmmU-AcQ.js")), ba = K(() => import("./vue-ui-skeleton-NmSoASV8.js")), xa = K(() => import("./Tooltip-CIqkHlwJ.js")), La = K(() => import("./UserOptions-BSMOmm78.js")), { vue_ui_xy_canvas: ka } = Ka(), g = Me, pe = d(Qa()), P = d(null), le = d(null), n = d(null), y = d(1), F = d(1), ve = d(!1), c = d(null), ce = d(""), Te = d(null), $ = d([]), G = d(1), H = d(!0), Z = d(!0), me = d(null), Oe = d(0), Re = d(0), de = d(!1), Pe = d(null), Fe = d(null), Ee = d(null), Ae = d(null), be = d(0), xe = d(0), Le = d(0), M = d(null), ke = L(() => !!g.dataset && g.dataset.length), Ca = fa, wa = Va();
35
+ const ga = K(() => import("./vue-ui-accordion-EgBlQQ1M.js")), pa = K(() => import("./DataTable-B79H7WT_.js")), ma = K(() => import("./NonSvgPenAndPaper-DN7lfPkB.js")), ba = K(() => import("./vue-ui-skeleton-Cce0QGED.js")), xa = K(() => import("./Tooltip-CrFy7PhT.js")), La = K(() => import("./UserOptions-BcOzneiO.js")), { vue_ui_xy_canvas: ka } = Ka(), g = Me, pe = d(Qa()), P = d(null), le = d(null), n = d(null), y = d(1), F = d(1), ve = d(!1), c = d(null), ce = d(""), Te = d(null), $ = d([]), G = d(1), H = d(!0), Z = d(!0), me = d(null), Oe = d(0), Re = d(0), de = d(!1), Pe = d(null), Fe = d(null), Ee = d(null), Ae = d(null), be = d(0), xe = d(0), Le = d(0), M = d(null), ke = L(() => !!g.dataset && g.dataset.length), Ca = fa, wa = Va();
36
36
  ua(() => {
37
37
  wa["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
38
38
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "3.0.0-next.43",
4
+ "version": "3.0.0-next.44",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [
@@ -1,588 +0,0 @@
1
- import { useCssVars as We, computed as d, ref as i, onMounted as ce, onBeforeUnmount as me, watch as R, nextTick as Q, onUpdated as Ve, createElementBlock as c, openBlock as m, createElementVNode as v, createCommentVNode as y, renderSlot as Xe, normalizeStyle as k, createVNode as Ue, withDirectives as he, unref as F, Fragment as fe, renderList as ge, normalizeClass as L, vModelText as be, toDisplayString as Y } from "vue";
2
- import Oe from "./BaseIcon-D7epehwu.js";
3
- import { t as xe, u as Ze } from "./useResponsive-DfdjqQps.js";
4
- import { c as je, V as ye, U as pe, X as Ge, F as _ } from "./index-seTAwZa0.js";
5
- import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- const Je = {
7
- class: "vue-data-ui-slicer-labels",
8
- style: { position: "relative", "z-index": "1", "pointer-events": "none" }
9
- }, Ke = {
10
- key: 0,
11
- style: { width: "100%", position: "relative" }
12
- }, Qe = {
13
- key: 0,
14
- class: "minimap",
15
- style: { width: "100%" }
16
- }, Ye = ["xmlns", "viewBox"], _e = ["id"], et = ["stop-color"], tt = ["d", "stroke"], lt = ["x", "width", "height", "fill", "rx"], at = ["d", "fill"], nt = ["x", "width", "height", "rx", "fill"], it = ["x", "width", "height", "fill", "rx"], ot = ["d", "fill"], ut = ["d", "stroke"], rt = ["cx", "cy", "stroke", "fill"], st = ["cx", "cy", "stroke", "fill"], dt = ["x1", "x2", "y2", "stroke"], vt = ["x", "height", "width", "onMouseenter"], ct = ["min", "max"], mt = ["min", "max"], ht = {
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: we, emit: Se }) {
126
- We((e) => ({
127
- "5de8f356": ke.value,
128
- "1443086c": w.value,
129
- "055389bb": Re.value,
130
- "53d8860c": l.selectColor,
131
- "1a65caf0": $e.value
132
- }));
133
- const a = l, p = i(null), u = i(a.min), r = i(a.max), N = d(() => !!a.minimap.length), H = i(je()), I = i(0);
134
- ce(() => {
135
- const e = () => {
136
- I.value = p.value.getBoundingClientRect().width;
137
- };
138
- e();
139
- const t = xe(e, 50);
140
- window.addEventListener("resize", t), me(() => {
141
- window.removeEventListener("resize", t);
142
- });
143
- });
144
- const Ce = d(() => a.refreshEndPoint === null ? a.max : a.refreshEndPoint), S = Se, g = d(() => {
145
- const e = a.max - a.min, t = (u.value - a.min) / e * 100, n = (r.value - a.min) / e * 100, s = (t + n) / 2, f = V.value ? `calc(${s}% - ${T.value.width}px)` : W.value ? `calc(${s}%)` : `calc(${s}% - ${T.value.width / 2}px)`;
146
- return {
147
- left: `${t}%`,
148
- width: `${n - t}%`,
149
- background: a.selectColor,
150
- tooltipLeft: `calc(${t}% - ${W.value ? 0 : K.value / 2}px)`,
151
- tooltipRight: `calc(${n}% - ${V.value ? A.value : A.value / 2}px)`,
152
- tooltipCenter: f,
153
- arrowLeft: !W.value,
154
- arrowRight: !V.value
155
- };
156
- }), W = d(() => p.value ? p.value.getBoundingClientRect().width * ((u.value - a.min) / (a.max - a.min)) - K.value / 2 < 0 : !1), V = d(() => p.value ? p.value.getBoundingClientRect().width * ((r.value - a.min) / (a.max - a.min)) + A.value / 2 > p.value.getBoundingClientRect().width : !1), ke = d(() => a.inputColor), $e = d(() => a.background), Re = d(() => `${a.selectColor}33`), w = d(() => a.borderColor), ee = d(() => {
157
- let e = [];
158
- for (let t = 0; t < a.minimap.length; t += 1)
159
- e.push(t);
160
- return e;
161
- });
162
- function te() {
163
- S("reset");
164
- }
165
- function Le() {
166
- Number(u.value) > Number(r.value) - 1 && (u.value = Number(r.value) - 1), S("update:start", Number(u.value));
167
- }
168
- function Ne() {
169
- Number(r.value) < Number(u.value) + 1 && (r.value = Number(u.value) + 1), S("update:end", Number(r.value));
170
- }
171
- R(
172
- () => a.min,
173
- (e) => {
174
- Number(u.value) < Number(e) && (u.value = Number(e)), Number(r.value) < Number(e) && (r.value = Number(e));
175
- }
176
- ), R(
177
- () => a.max,
178
- (e) => {
179
- Number(u.value) > Number(e) && (u.value = Number(e)), Number(r.value) > Number(e) && (r.value = Number(e));
180
- }
181
- );
182
- const X = i(null), o = i({
183
- width: 1,
184
- height: 1
185
- }), P = i(null);
186
- ce(() => {
187
- if (N.value) {
188
- const e = xe(() => {
189
- const { width: t, height: n } = Ze({
190
- chart: X.value
191
- });
192
- o.value.width = t, o.value.height = n - 47;
193
- });
194
- P.value = new ResizeObserver(e), P.value.observe(X.value);
195
- }
196
- }), me(() => {
197
- P.value && P.value.disconnect();
198
- });
199
- const h = d(() => a.minimap.length ? o.value.width / a.minimap.length : 0), b = d(() => {
200
- if (!a.minimap.length) return [];
201
- const e = Math.max(...a.minimap), t = Math.min(...a.minimap) - 10, n = e - (t > 0 ? 0 : t), s = a.minimap.map((Ae, Fe) => {
202
- const He = Ae - t;
203
- return {
204
- x: o.value.width / a.minimap.length * Fe + h.value / 2,
205
- y: o.value.height - He / n * (o.value.height * 0.9)
206
- };
207
- }), f = a.smoothMinimap ? ye(s) : pe(s), z = [...s].slice(a.valueStart, a.valueEnd), Pe = a.smoothMinimap ? ye(z) : pe(z);
208
- return {
209
- fullSet: f,
210
- selectionSet: Pe,
211
- sliced: z,
212
- firstPlot: s[a.valueStart],
213
- lastPlot: s[a.valueEnd - 1]
214
- };
215
- }), x = d(() => ({
216
- x: h.value * u.value + h.value / 2,
217
- width: o.value.width * ((r.value - u.value) / a.max) - h.value
218
- })), M = i(a.minimapSelectedIndex);
219
- R(() => a.minimapSelectedIndex, (e) => {
220
- M.value = e + a.valueStart;
221
- }, { immediate: !0 });
222
- function Me(e) {
223
- M.value = e, e >= a.valueStart && e < a.valueEnd && S("trapMouse", e - a.valueStart);
224
- }
225
- const Ee = i(0), U = i(null), O = i(null);
226
- function Z(e) {
227
- u.value = e, U.value && (U.value.value = e), S("update:start", Number(u.value));
228
- }
229
- function j(e) {
230
- r.value = e, O.value && (O.value.value = e), S("update:end", Number(r.value));
231
- }
232
- const G = d(() => a.valueEnd - a.valueStart), q = i(!1);
233
- let J = i(null);
234
- const Be = d(() => (I.value - 48) / (a.max - a.min)), De = d(() => (I.value - 48) / (a.max - a.min) * G.value), Te = i(2.5), le = d(() => {
235
- const e = I.value - 48;
236
- return Math.ceil(
237
- (a.max - a.min) / ((e - De.value) / Te.value)
238
- );
239
- }), ae = (e) => {
240
- if (C.value = !0, !a.enableSelectionDrag)
241
- return;
242
- const t = e.type === "touchstart";
243
- if ((t ? e.targetTouches[0].target : e.target).classList.contains("range-handle"))
244
- return;
245
- q.value = !0, J.value = t ? e.targetTouches[0].clientX : e.clientX;
246
- const s = t ? ze : ne, f = t ? Ie : oe;
247
- window.addEventListener(t ? "touchmove" : "mousemove", s, { passive: !1 }), window.addEventListener(t ? "touchend" : "mouseup", f);
248
- };
249
- function ne(e) {
250
- ie(e.clientX);
251
- }
252
- function ze(e) {
253
- p.value.contains(e.target) && (e.target.classList.contains("range-handle") || (e.preventDefault(), ie(e.targetTouches[0].clientX)));
254
- }
255
- function ie(e) {
256
- if (!q.value) return;
257
- const t = e - J.value;
258
- if (Math.abs(t) > Be.value) {
259
- if (t > 0) {
260
- if (Number(r.value) + 1 <= a.max) {
261
- const n = Math.min(a.max, Number(r.value) + le.value);
262
- j(n), Z(n - G.value);
263
- }
264
- } else if (Number(u.value) - 1 >= a.min) {
265
- const n = Math.max(0, Number(u.value) - le.value);
266
- Z(n), j(n + G.value);
267
- }
268
- J.value = e;
269
- }
270
- }
271
- function oe() {
272
- ue("mousemove", "mouseup");
273
- }
274
- function Ie() {
275
- ue("touchmove", "touchend");
276
- }
277
- function ue(e, t) {
278
- q.value = !1, window.removeEventListener(e, ne), window.removeEventListener(t, oe);
279
- }
280
- const $ = i(!1), E = i(null), B = i(null), K = i(1), A = i(1), C = i(!1);
281
- function re() {
282
- E.value && (K.value = E.value.getBoundingClientRect().width);
283
- }
284
- function se() {
285
- B.value && (A.value = B.value.getBoundingClientRect().width);
286
- }
287
- const de = i(0);
288
- function ve(e) {
289
- de.value = e === "start" ? 1 : 0;
290
- }
291
- const D = i(!1), T = i({
292
- width: 0,
293
- left: 0
294
- });
295
- return R([u, r], async () => {
296
- if (await Q(), !E.value || !B.value) {
297
- D.value = !1, T.value = { width: 0, left: 0 };
298
- return;
299
- }
300
- const e = E.value.getBoundingClientRect(), t = B.value.getBoundingClientRect();
301
- D.value = e.x + e.width > t.x;
302
- const n = e.x + e.width / 2, s = t.x + t.width / 2, f = e.width + t.width, z = (n + s) / 2;
303
- T.value = {
304
- width: f,
305
- left: z - f / 2
306
- };
307
- }), Ve(() => {
308
- re(), se();
309
- }), R(() => a.labelLeft, () => {
310
- Q(re);
311
- }, { deep: !0 }), R(() => a.labelRight, () => {
312
- Q(se);
313
- }, { deep: !0 }), we({
314
- setStartValue: Z,
315
- setEndValue: j
316
- }), (e, t) => (m(), c("div", {
317
- "data-dom-to-png-ignore": "",
318
- style: { padding: "0 24px" },
319
- class: "vue-data-ui-zoom",
320
- ref_key: "zoomWrapper",
321
- ref: p,
322
- onMousedown: ae,
323
- onTouchstart: ae,
324
- onTouchend: t[11] || (t[11] = (n) => C.value = !1)
325
- }, [
326
- v("div", Je, [
327
- l.valueStart !== l.refreshStartPoint || l.valueEnd !== Ce.value ? (m(), c("div", Ke, [
328
- l.useResetSlot ? Xe(e.$slots, "reset-action", {
329
- key: 1,
330
- reset: te
331
- }, void 0, !0) : (m(), c("button", {
332
- key: 0,
333
- tabindex: "0",
334
- role: "button",
335
- class: "vue-data-ui-refresh-button",
336
- style: k({
337
- top: N.value ? "36px" : "-16px",
338
- pointerEvents: "all !important"
339
- }),
340
- onClick: te
341
- }, [
342
- Ue(Oe, {
343
- name: "refresh",
344
- stroke: l.textColor
345
- }, null, 8, ["stroke"])
346
- ], 4))
347
- ])) : y("", !0)
348
- ]),
349
- v("div", {
350
- class: "double-range-slider",
351
- ref_key: "minimapWrapper",
352
- ref: X,
353
- style: { "z-index": "0" },
354
- onMouseenter: t[9] || (t[9] = (n) => C.value = !0),
355
- onMouseleave: t[10] || (t[10] = (n) => C.value = !1)
356
- }, [
357
- N.value ? (m(), c("div", Qe, [
358
- (m(), c("svg", {
359
- xmlns: F(Ge),
360
- viewBox: `0 0 ${o.value.width < 0 ? 0 : o.value.width} ${o.value.height < 0 ? 0 : o.value.height}`
361
- }, [
362
- v("defs", null, [
363
- v("linearGradient", {
364
- id: H.value,
365
- x1: "0%",
366
- y1: "0%",
367
- x2: "0%",
368
- y2: "100%"
369
- }, [
370
- v("stop", {
371
- offset: "0%",
372
- "stop-color": `${l.minimapLineColor}50`
373
- }, null, 8, et),
374
- t[12] || (t[12] = v("stop", {
375
- offset: "100%",
376
- "stop-color": "transparent"
377
- }, null, -1))
378
- ], 8, _e)
379
- ]),
380
- v("path", {
381
- d: `M${b.value.fullSet}`,
382
- stroke: `${l.minimapLineColor}`,
383
- fill: "none",
384
- "stroke-width": "1",
385
- "stroke-linecap": "round",
386
- "stroke-linejoin": "round",
387
- style: { opacity: "1" }
388
- }, null, 8, tt),
389
- v("rect", {
390
- x: x.value.x,
391
- width: x.value.width < 0 ? 0 : x.value.width,
392
- height: Math.max(o.value.height, 0),
393
- y: 0,
394
- fill: w.value,
395
- rx: l.minimapSelectionRadius,
396
- stroke: "none"
397
- }, null, 8, lt),
398
- v("path", {
399
- d: `M${h.value / 2},${Math.max(o.value.height, 0)} ${b.value.fullSet} L${o.value.width - h.value / 2},${Math.max(o.value.height, 0)}Z`,
400
- fill: `url(#${H.value})`,
401
- stroke: "none",
402
- style: { opacity: "1" }
403
- }, null, 8, at),
404
- v("rect", {
405
- x: x.value.x,
406
- width: x.value.width < 0 ? 0 : x.value.width,
407
- height: Math.max(o.value.height, 0),
408
- y: 0,
409
- rx: l.minimapSelectionRadius,
410
- fill: w.value
411
- }, null, 8, nt),
412
- v("rect", {
413
- x: x.value.x,
414
- width: x.value.width < 0 ? 0 : x.value.width,
415
- height: Math.max(o.value.height, 0),
416
- y: 0,
417
- fill: l.minimapSelectedColor,
418
- rx: l.minimapSelectionRadius,
419
- style: k({
420
- opacity: l.minimapSelectedColorOpacity
421
- })
422
- }, null, 12, it),
423
- v("path", {
424
- d: `M${b.value.sliced[0].x},${Math.max(o.value.height, 0)} ${b.value.selectionSet} L${b.value.sliced.at(-1).x},${Math.max(o.value.height, 0)}Z`,
425
- fill: `url(#${H.value})`,
426
- stroke: "none",
427
- style: { opacity: "1" }
428
- }, null, 8, ot),
429
- v("path", {
430
- d: `M ${b.value.selectionSet}`,
431
- stroke: `${l.minimapLineColor}`,
432
- fill: "transparent",
433
- "stroke-width": "2",
434
- "stroke-linecap": "round",
435
- "stroke-linejoin": "round"
436
- }, null, 8, ut),
437
- v("circle", {
438
- cx: b.value.firstPlot.x,
439
- cy: b.value.firstPlot.y,
440
- "stroke-width": "0.5",
441
- stroke: w.value,
442
- r: "3",
443
- fill: l.minimapLineColor
444
- }, null, 8, rt),
445
- v("circle", {
446
- cx: b.value.lastPlot.x,
447
- cy: b.value.lastPlot.y,
448
- "stroke-width": "0.5",
449
- stroke: w.value,
450
- r: "3",
451
- fill: l.minimapLineColor
452
- }, null, 8, st),
453
- M.value !== null ? (m(!0), c(fe, { key: 0 }, ge(ee.value, (n, s) => (m(), c("g", null, [
454
- M.value === n && n >= l.valueStart && n < l.valueEnd ? (m(), c("line", {
455
- key: 0,
456
- x1: h.value * s + h.value / 2,
457
- x2: h.value * s + h.value / 2,
458
- y1: 0,
459
- y2: Math.max(o.value.height, 0),
460
- stroke: l.minimapIndicatorColor,
461
- "stroke-linecap": "round",
462
- "stroke-dasharray": "2",
463
- "stroke-width": "1"
464
- }, null, 8, dt)) : y("", !0)
465
- ]))), 256)) : y("", !0),
466
- (m(!0), c(fe, null, ge(ee.value, (n, s) => (m(), c("rect", {
467
- x: h.value * s,
468
- y: 0,
469
- height: Math.max(o.value.height, 0),
470
- width: h.value < 0 ? 0 : h.value,
471
- fill: "transparent",
472
- style: k([{ "pointer-events": "all !important" }, {
473
- cursor: n >= l.valueStart && n < l.valueEnd && l.enableSelectionDrag ? $.value ? "grabbing" : "grab" : "default"
474
- }]),
475
- onMousedown: t[0] || (t[0] = (f) => $.value = !0),
476
- onMouseup: t[1] || (t[1] = (f) => $.value = !1),
477
- onMouseenter: (f) => Me(n),
478
- onMouseleave: t[2] || (t[2] = (f) => {
479
- M.value = null, S("trapMouse", null);
480
- })
481
- }, null, 44, vt))), 256))
482
- ], 8, Ye))
483
- ])) : y("", !0),
484
- t[13] || (t[13] = v("div", { class: "slider-track" }, null, -1)),
485
- v("div", {
486
- class: L({
487
- "range-highlight": !0,
488
- move: l.enableSelectionDrag
489
- }),
490
- onMousedown: t[3] || (t[3] = (n) => $.value = !0),
491
- onMouseup: t[4] || (t[4] = (n) => $.value = !1),
492
- style: k({
493
- ...g.value,
494
- cursor: $.value ? "grabbing" : "grab"
495
- })
496
- }, null, 38),
497
- l.enableRangeHandles ? he((m(), c("input", {
498
- ref_key: "rangeStart",
499
- ref: U,
500
- key: `range-min${Ee.value}`,
501
- type: "range",
502
- class: L({ "range-left": !0, "range-handle": !0, "range-minimap": N.value && l.verticalHandles }),
503
- min: l.min,
504
- max: l.max,
505
- "onUpdate:modelValue": t[5] || (t[5] = (n) => u.value = n),
506
- onInput: Le,
507
- onMouseenter: t[6] || (t[6] = (n) => ve("start"))
508
- }, null, 42, ct)), [
509
- [be, u.value]
510
- ]) : y("", !0),
511
- l.enableRangeHandles ? he((m(), c("input", {
512
- key: 2,
513
- ref_key: "rangeEnd",
514
- ref: O,
515
- type: "range",
516
- class: L({ "range-right": !0, "range-handle": !0, "range-minimap": N.value && l.verticalHandles }),
517
- min: l.min,
518
- max: l.max,
519
- "onUpdate:modelValue": t[7] || (t[7] = (n) => r.value = n),
520
- onInput: Ne,
521
- onMouseenter: t[8] || (t[8] = (n) => ve("end"))
522
- }, null, 42, mt)), [
523
- [be, r.value]
524
- ]) : y("", !0),
525
- l.labelLeft ? (m(), c("div", {
526
- key: 3,
527
- ref_key: "tooltipLeft",
528
- ref: E,
529
- class: L({
530
- "range-tooltip": !0,
531
- "range-tooltip-visible": C.value,
532
- "range-tooltip-arrow": g.value.arrowLeft && !l.verticalHandles,
533
- "range-tooltip-arrow-left": !g.value.arrowLeft && !l.verticalHandles
534
- }),
535
- style: k({
536
- left: g.value.tooltipLeft,
537
- color: F(_)(l.selectColor),
538
- backgroundColor: l.selectColor,
539
- border: `1px solid ${w.value}`,
540
- zIndex: `${de.value + 4}`,
541
- visibility: D.value || l.labelLeft === l.labelRight ? "hidden" : "visible"
542
- })
543
- }, Y(l.labelLeft), 7)) : y("", !0),
544
- (D.value || l.labelLeft === l.labelRight) && (l.labelLeft || l.labelRight) ? (m(), c("div", {
545
- key: 4,
546
- ref: "tooltipMerge",
547
- class: L({
548
- "range-tooltip": !0,
549
- "range-tooltip-visible": C.value,
550
- "range-tooltip-arrow": !0,
551
- "range-tooltip-arrow-left": !g.value.arrowLeft && !l.verticalHandles,
552
- "range-tooltip-arrow-right": !g.value.arrowRight && !l.verticalHandles
553
- }),
554
- style: k({
555
- left: g.value.tooltipCenter,
556
- width: T.value.width + "px",
557
- color: F(_)(l.selectColor),
558
- backgroundColor: l.selectColor,
559
- border: `1px solid ${w.value}`,
560
- zIndex: "4"
561
- })
562
- }, Y(l.labelLeft === l.labelRight ? l.labelLeft : `${l.labelLeft} - ${l.labelRight}`), 7)) : y("", !0),
563
- l.labelRight ? (m(), c("div", {
564
- key: 5,
565
- ref_key: "tooltipRight",
566
- ref: B,
567
- class: L({
568
- "range-tooltip": !0,
569
- "range-tooltip-visible": C.value,
570
- "range-tooltip-arrow": g.value.arrowRight && !l.verticalHandles,
571
- "range-tooltip-arrow-right": !g.value.arrowRight && !l.verticalHandles
572
- }),
573
- style: k({
574
- left: g.value.tooltipRight,
575
- color: F(_)(l.selectColor),
576
- backgroundColor: l.selectColor,
577
- border: `1px solid ${w.value}`,
578
- zIndex: "4",
579
- visibility: D.value || l.labelLeft === l.labelRight ? "hidden" : "visible"
580
- })
581
- }, Y(l.labelRight), 7)) : y("", !0)
582
- ], 544)
583
- ], 544));
584
- }
585
- }, pt = /* @__PURE__ */ qe(ht, [["__scopeId", "data-v-3ddef193"]]);
586
- export {
587
- pt as S
588
- };