vue-data-ui 2.2.90 → 2.2.91

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 (58) hide show
  1. package/dist/data-table-d-VcuH-r.js +1488 -0
  2. package/dist/{index.es-Cgqo-FBk.js → index.es-Dc9Fd4o6.js} +1 -1
  3. package/dist/legend-DJCYLsl_.js +61 -0
  4. package/dist/style.css +1 -1
  5. package/dist/themes-lgjsYHsH.js +4967 -0
  6. package/dist/title-BF-9Qcni.js +56 -0
  7. package/dist/tooltip-D85WEOKi.js +94 -0
  8. package/dist/user-options-DZgCz8UA.js +415 -0
  9. package/dist/vue-data-ui.js +455 -61
  10. package/dist/vue-ui-3d-bar-DW7kGJSz.js +20360 -0
  11. package/dist/vue-ui-age-pyramid-4hcuKpFY.js +781 -0
  12. package/dist/vue-ui-annotator-C83FVvl8.js +2175 -0
  13. package/dist/vue-ui-candlestick-diclGj95.js +807 -0
  14. package/dist/vue-ui-chestnut-ACetHLdG.js +1049 -0
  15. package/dist/vue-ui-cursor-Rx7UNaYT.js +229 -0
  16. package/dist/vue-ui-dashboard-B3PlN0ks.js +231 -0
  17. package/dist/vue-ui-digits-CxMXID42.js +154 -0
  18. package/dist/vue-ui-donut-DMiwVXNd.js +1534 -0
  19. package/dist/vue-ui-dumbbell-B_X1T8TR.js +621 -0
  20. package/dist/vue-ui-flow-B72wzQ6V.js +451 -0
  21. package/dist/vue-ui-galaxy-DXX5yivT.js +482 -0
  22. package/dist/vue-ui-gauge-Cs9PDurH.js +466 -0
  23. package/dist/vue-ui-heatmap-PcoNSLdN.js +581 -0
  24. package/dist/vue-ui-kpi-DchEmPtB.js +55 -0
  25. package/dist/vue-ui-mini-loader-DltJLkqy.js +131 -0
  26. package/dist/vue-ui-molecule-CWvukBzs.js +746 -0
  27. package/dist/vue-ui-mood-radar-DEfdtIi8.js +544 -0
  28. package/dist/vue-ui-nested-donuts-9URpqgXE.js +768 -0
  29. package/dist/vue-ui-onion-C0eowUT6.js +551 -0
  30. package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +647 -0
  31. package/dist/vue-ui-quadrant-_ddVAm9V.js +1174 -0
  32. package/dist/vue-ui-quick-chart-Cio0hDYO.js +1310 -0
  33. package/dist/vue-ui-radar-Dyg38i33.js +853 -0
  34. package/dist/vue-ui-rating-CE1Lmwd2.js +271 -0
  35. package/dist/vue-ui-relation-circle-BMlB3k3d.js +303 -0
  36. package/dist/vue-ui-rings-BuXeijvb.js +507 -0
  37. package/dist/vue-ui-scatter-B1hZfOua.js +870 -0
  38. package/dist/vue-ui-screenshot-0QXgxzGs.js +160 -0
  39. package/dist/vue-ui-smiley-B7kR7exr.js +763 -0
  40. package/dist/vue-ui-spark-trend-BmL2KiYL.js +245 -0
  41. package/dist/vue-ui-sparkgauge-BMzFv14L.js +158 -0
  42. package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +243 -0
  43. package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +244 -0
  44. package/dist/vue-ui-strip-plot-DyN6P0JO.js +614 -0
  45. package/dist/vue-ui-table-DM3zL89q.js +2180 -0
  46. package/dist/vue-ui-table-heatmap-gWx0Nslu.js +237 -0
  47. package/dist/vue-ui-thermometer-Bcqv5kd_.js +384 -0
  48. package/dist/vue-ui-timer-BIFxjujK.js +451 -0
  49. package/dist/vue-ui-tiremarks-zBwHpED_.js +248 -0
  50. package/dist/vue-ui-treemap-BaplVc_z.js +719 -0
  51. package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +734 -0
  52. package/dist/vue-ui-waffle-COOzH7M3.js +635 -0
  53. package/dist/vue-ui-wheel-BEpuVTBk.js +226 -0
  54. package/dist/vue-ui-word-cloud-DNqxAAiX.js +344 -0
  55. package/dist/vue-ui-xy-_mHq-czW.js +2058 -0
  56. package/dist/vue-ui-xy-canvas-DqX8Gee5.js +1003 -0
  57. package/package.json +1 -1
  58. package/dist/index-DZlxUin4.js +0 -57288
@@ -0,0 +1,807 @@
1
+ import { useCssVars as Ie, ref as c, computed as f, watch as he, openBlock as u, createElementBlock as i, createElementVNode as s, normalizeStyle as V, toDisplayString as L, createVNode as Q, renderSlot as C, createCommentVNode as p, withDirectives as fe, vModelText as ge, pushScopeId as Ve, popScopeId as Be, onMounted as Oe, onBeforeUnmount as Pe, normalizeClass as pe, createBlock as q, unref as _, createSlots as Ue, withCtx as $, normalizeProps as Y, guardReactiveProps as J, Fragment as R, renderList as I, createTextVNode as Ee, nextTick as De } from "vue";
2
+ import { _ as xe, B as Me, e as We, i as Ge, j as T, A as je, X as Xe, x as K, C as He, o as qe, D as Ye, y as Je, z as Ke, v as Qe, w as Ze, E as be } from "./data-table-d-VcuH-r.js";
3
+ import { t as et, u as tt } from "./vue-ui-age-pyramid-4hcuKpFY.js";
4
+ import { u as me, _ as lt } from "./title-BF-9Qcni.js";
5
+ import { U as ot } from "./user-options-DZgCz8UA.js";
6
+ import { t as at } from "./themes-lgjsYHsH.js";
7
+ import { _ as ut } from "./tooltip-D85WEOKi.js";
8
+ import { u as st, a as it, S as nt, A as rt } from "./vue-ui-3d-bar-DW7kGJSz.js";
9
+ const dt = (r) => (Ve("data-v-d07947ad"), r = r(), Be(), r), vt = { "data-html2canvas-ignore": "" }, ct = { class: "vue-data-ui-slicer-labels" }, yt = { key: 0 }, ht = { class: "double-range-slider" }, ft = /* @__PURE__ */ dt(() => /* @__PURE__ */ s("div", { class: "slider-track" }, null, -1)), gt = ["min", "max"], pt = ["min", "max"], bt = {
10
+ __name: "Slicer",
11
+ props: {
12
+ background: {
13
+ type: String,
14
+ default: "#FFFFFF"
15
+ },
16
+ borderColor: {
17
+ type: String,
18
+ default: "#FFFFFF"
19
+ },
20
+ fontSize: {
21
+ type: Number,
22
+ default: 14
23
+ },
24
+ labelLeft: {
25
+ type: String,
26
+ default: ""
27
+ },
28
+ labelRight: {
29
+ type: String,
30
+ default: ""
31
+ },
32
+ textColor: {
33
+ type: String,
34
+ default: "#1A1A1A"
35
+ },
36
+ inputColor: {
37
+ type: String,
38
+ default: "#1A1A1A"
39
+ },
40
+ max: {
41
+ type: Number,
42
+ default: 0
43
+ },
44
+ min: {
45
+ type: Number,
46
+ default: 0
47
+ },
48
+ selectColor: {
49
+ type: String,
50
+ default: "#4A4A4A"
51
+ },
52
+ useResetSlot: {
53
+ type: Boolean,
54
+ default: !1
55
+ },
56
+ valueStart: {
57
+ type: [Number, String],
58
+ default: 0
59
+ },
60
+ valueEnd: {
61
+ type: [Number, String],
62
+ default: 0
63
+ }
64
+ },
65
+ emits: ["update:start", "update:end", "reset"],
66
+ setup(r, { emit: B }) {
67
+ const n = r;
68
+ Ie((h) => ({
69
+ "56c736d9": Z.value,
70
+ 22868166: U.value,
71
+ "99f84204": P.value,
72
+ "621bff06": r.selectColor,
73
+ "0407e48b": O.value
74
+ }));
75
+ const b = c(n.min), y = c(n.max), m = f(() => {
76
+ const h = n.max - n.min, S = (b.value - n.min) / h * 100, N = (y.value - n.min) / h * 100;
77
+ return {
78
+ left: `${S}%`,
79
+ width: `${N - S}%`,
80
+ background: n.selectColor
81
+ };
82
+ }), Z = f(() => n.inputColor), O = f(() => n.background), P = f(() => `${n.selectColor}33`), U = f(() => n.borderColor);
83
+ function E() {
84
+ B("reset");
85
+ }
86
+ function M() {
87
+ Number(b.value) > Number(y.value) - 1 && (b.value = Number(y.value) - 1), B("update:start", Number(b.value));
88
+ }
89
+ function F() {
90
+ Number(y.value) < Number(b.value) + 1 && (y.value = Number(b.value) + 1), B("update:end", Number(y.value));
91
+ }
92
+ return he(
93
+ () => n.min,
94
+ (h) => {
95
+ Number(b.value) < Number(h) && (b.value = Number(h)), Number(y.value) < Number(h) && (y.value = Number(h));
96
+ }
97
+ ), he(
98
+ () => n.max,
99
+ (h) => {
100
+ Number(b.value) > Number(h) && (b.value = Number(h)), Number(y.value) > Number(h) && (y.value = Number(h));
101
+ }
102
+ ), (h, S) => (u(), i("div", vt, [
103
+ s("div", ct, [
104
+ s("div", {
105
+ class: "vue-data-ui-slicer-label-left",
106
+ style: V({ fontSize: `${n.fontSize}px`, color: n.textColor })
107
+ }, L(r.labelLeft), 5),
108
+ r.valueStart > 0 || r.valueEnd < r.max ? (u(), i("div", yt, [
109
+ r.useResetSlot ? C(h.$slots, "reset-action", {
110
+ key: 1,
111
+ reset: E
112
+ }, void 0, !0) : (u(), i("button", {
113
+ key: 0,
114
+ "data-cy-reset": "",
115
+ tabindex: "0",
116
+ role: "button",
117
+ class: "vue-data-ui-refresh-button",
118
+ onClick: E
119
+ }, [
120
+ Q(Me, {
121
+ name: "refresh",
122
+ stroke: r.textColor
123
+ }, null, 8, ["stroke"])
124
+ ]))
125
+ ])) : p("", !0),
126
+ s("div", {
127
+ class: "vue-data-ui-slicer-label-right",
128
+ style: V({ fontSize: `${n.fontSize}px`, color: n.textColor })
129
+ }, L(r.labelRight), 5)
130
+ ]),
131
+ s("div", ht, [
132
+ ft,
133
+ s("div", {
134
+ class: "range-highlight",
135
+ style: V(m.value)
136
+ }, null, 4),
137
+ fe(s("input", {
138
+ type: "range",
139
+ min: r.min,
140
+ max: r.max,
141
+ "onUpdate:modelValue": S[0] || (S[0] = (N) => b.value = N),
142
+ onInput: M
143
+ }, null, 40, gt), [
144
+ [ge, b.value]
145
+ ]),
146
+ fe(s("input", {
147
+ type: "range",
148
+ min: r.min,
149
+ max: r.max,
150
+ "onUpdate:modelValue": S[1] || (S[1] = (N) => y.value = N),
151
+ onInput: F
152
+ }, null, 40, pt), [
153
+ [ge, y.value]
154
+ ])
155
+ ])
156
+ ]));
157
+ }
158
+ }, mt = /* @__PURE__ */ xe(bt, [["__scopeId", "data-v-d07947ad"]]), xt = ["id"], kt = ["xmlns", "viewBox"], wt = { key: 0 }, $t = ["id"], Ct = ["stop-color"], _t = ["stop-color"], St = ["stop-color"], Nt = ["id"], zt = ["stop-color"], Ft = ["stop-color"], At = ["stop-color"], Tt = { key: 0 }, Lt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Rt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], It = { key: 1 }, Vt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Bt = ["x", "y", "font-size", "fill", "font-weight"], Ot = { key: 2 }, Pt = ["transform", "text-anchor", "font-size", "fill", "font-weight"], Ut = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Et = { key: 0 }, Dt = ["cx", "cy", "r", "fill"], Mt = ["cx", "cy", "r", "fill"], Wt = { key: 1 }, Gt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Xt = ["x", "y", "height", "width", "fill", "rx"], Ht = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], qt = ["x", "y", "height", "width", "fill", "onMouseover"], Yt = ["innerHTML"], Jt = {
159
+ __name: "vue-ui-candlestick",
160
+ props: {
161
+ config: {
162
+ type: Object,
163
+ default() {
164
+ return {};
165
+ }
166
+ },
167
+ dataset: {
168
+ type: Array,
169
+ default() {
170
+ return [];
171
+ }
172
+ }
173
+ },
174
+ setup(r, { expose: B }) {
175
+ const n = r, { vue_ui_candlestick: b } = st(), y = f(() => !!n.dataset && n.dataset.length), m = c(We()), Z = c(null), O = c(!1), P = c(""), U = c(void 0), E = c(0), M = c(0), F = c(null), h = c(null), S = c(null), N = c(null), e = f(() => {
176
+ const l = me({
177
+ userConfig: n.config,
178
+ defaultConfig: b
179
+ });
180
+ return l.theme ? {
181
+ ...me({
182
+ userConfig: at.vue_ui_candlestick[l.theme] || n.config,
183
+ defaultConfig: l
184
+ })
185
+ } : l;
186
+ }), g = c({
187
+ height: e.value.style.height,
188
+ width: e.value.style.width,
189
+ xAxisFontSize: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
190
+ yAxisFontSize: e.value.style.layout.grid.yAxis.dataLabels.fontSize
191
+ }), W = c(null);
192
+ Oe(() => {
193
+ if (Ge(n.dataset) && T({
194
+ componentName: "VueUiCandlestick",
195
+ type: "dataset"
196
+ }), e.value.responsive) {
197
+ const l = et(() => {
198
+ const { width: a, height: t } = tt({
199
+ chart: F.value,
200
+ title: e.value.style.title.text ? h.value : null,
201
+ slicer: N.value,
202
+ legend: S.value
203
+ });
204
+ g.value.width = a, g.value.height = t, g.value.xAxisFontSize = be({
205
+ relator: Math.min(a, t),
206
+ adjuster: e.value.style.width,
207
+ source: e.value.style.layout.grid.xAxis.dataLabels.fontSize,
208
+ threshold: 6,
209
+ fallback: 6
210
+ }), g.value.yAxisFontSize = be({
211
+ relator: Math.min(a, t),
212
+ adjuster: e.value.style.width,
213
+ source: e.value.style.layout.grid.yAxis.dataLabels.fontSize,
214
+ threshold: 6,
215
+ fallback: 6
216
+ });
217
+ });
218
+ W.value = new ResizeObserver(l), W.value.observe(F.value.parentNode);
219
+ }
220
+ }), Pe(() => {
221
+ W.value && W.value.disconnect();
222
+ });
223
+ const { isPrinting: ke, isImaging: we, generatePdf: oe, generateImage: ae } = it({
224
+ elementId: `vue-ui-candlestick_${m.value}`,
225
+ fileName: e.value.style.title.text || "vue-ui-candlestick"
226
+ }), z = c({
227
+ showTable: e.value.table.show,
228
+ showTooltip: e.value.style.tooltip.show
229
+ }), d = f(() => {
230
+ const { top: l, right: a, bottom: t, left: o } = e.value.style.layout.padding;
231
+ return {
232
+ top: l,
233
+ right: g.value.width - a,
234
+ left: o,
235
+ bottom: g.value.height - t,
236
+ width: g.value.width - o - a,
237
+ height: g.value.height - l - t
238
+ };
239
+ }), ee = f(() => n.dataset.length), x = c({
240
+ start: 0,
241
+ end: ee.value
242
+ }), ue = f(() => n.dataset.slice(x.value.start, x.value.end)), te = f(() => (n.dataset.forEach((l, a) => {
243
+ [null, void 0].includes(l[0]) && T({
244
+ componentName: "VueUiCandlestick",
245
+ type: "datasetAttribute",
246
+ property: "period (index 0)",
247
+ index: a
248
+ }), [null, void 0].includes(l[1]) && T({
249
+ componentName: "VueUiCandlestick",
250
+ type: "datasetAttribute",
251
+ property: "open (index 1)",
252
+ index: a
253
+ }), [null, void 0].includes(l[2]) && T({
254
+ componentName: "VueUiCandlestick",
255
+ type: "datasetAttribute",
256
+ property: "high (index 2)",
257
+ index: a
258
+ }), [null, void 0].includes(l[3]) && T({
259
+ componentName: "VueUiCandlestick",
260
+ type: "datasetAttribute",
261
+ property: "low (index 3)",
262
+ index: a
263
+ }), [null, void 0].includes(l[4]) && T({
264
+ componentName: "VueUiCandlestick",
265
+ type: "datasetAttribute",
266
+ property: "last (index 4)",
267
+ index: a
268
+ }), [null, void 0].includes(l[5]) && T({
269
+ componentName: "VueUiCandlestick",
270
+ type: "datasetAttribute",
271
+ property: "volume (index 5)",
272
+ index: a
273
+ });
274
+ }), ue.value.map((l) => ({
275
+ period: l[0],
276
+ open: l[1],
277
+ high: l[2],
278
+ low: l[3],
279
+ last: l[4],
280
+ volume: l[5]
281
+ })))), v = f(() => d.value.width / ue.value.length), se = f(() => ({
282
+ max: Math.max(...te.value.map((l) => l.high)),
283
+ min: 0
284
+ })), A = f(() => je(se.value.min, se.value.max, e.value.style.layout.grid.yAxis.dataLabels.steps));
285
+ function G(l, a) {
286
+ return {
287
+ ...l,
288
+ x: d.value.left + a * v.value + v.value / 2,
289
+ y: d.value.top + (1 - l / A.value.max) * d.value.height,
290
+ value: l
291
+ };
292
+ }
293
+ const k = f(() => te.value.map((l, a) => {
294
+ const t = G(l.open, a), o = G(l.high, a), w = G(l.low, a), X = G(l.last, a), H = l.last > l.open;
295
+ return {
296
+ period: l.period,
297
+ open: t,
298
+ high: o,
299
+ low: w,
300
+ last: X,
301
+ volume: l.volume,
302
+ isBullish: H
303
+ };
304
+ }));
305
+ function $e(l) {
306
+ return l / A.value.max;
307
+ }
308
+ const Ce = f(() => A.value.ticks.map((l) => ({
309
+ y: d.value.bottom - d.value.height * $e(l),
310
+ value: l
311
+ }))), _e = f(() => te.value.map((l) => l.period)), le = c(null);
312
+ function Se(l, a) {
313
+ U.value = l, le.value = {
314
+ datapoint: a,
315
+ seriesIndex: l,
316
+ series: k.value,
317
+ config: e.value
318
+ };
319
+ const t = e.value.style.tooltip.customFormat;
320
+ if (Je(t) && Ke(() => t({
321
+ seriesIndex: l,
322
+ datapoint: a,
323
+ series: k.value,
324
+ config: e.value
325
+ })))
326
+ P.value = t({
327
+ seriesIndex: l,
328
+ datapoint: a,
329
+ series: k.value,
330
+ config: e.value
331
+ });
332
+ else if (e.value.style.tooltip.show) {
333
+ let o = "";
334
+ const { period: w, open: X, high: H, low: de, last: ve, volume: ce, isBullish: ye } = k.value[l], { period: Qt, open: Fe, high: Ae, low: Te, last: Le, volume: Re } = e.value.translations;
335
+ o += `<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${e.value.style.layout.candle.borderRadius * 3}" stroke="${e.value.style.layout.candle.stroke}" stroke-width="${e.value.style.layout.candle.strokeWidth}"
336
+ fill="${e.value.style.layout.candle.gradient.show ? ye ? `url(#bullish_gradient_${m.value})` : `url(#bearish_gradient_${m.value})` : ye ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg>${w}</div>`, o += `${Re} : <b>${isNaN(ce) ? "-" : Number(ce.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()}</b>`, o += `<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`, o += `<div>${Fe}: <b>${e.value.style.tooltip.prefix} ${isNaN(X.value) ? "-" : Number(X.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, o += `<div>${Ae}: <b>${e.value.style.tooltip.prefix} ${isNaN(H.value) ? "-" : Number(H.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, o += `<div>${Te}: <b>${e.value.style.tooltip.prefix} ${isNaN(de.value) ? "-" : Number(de.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, o += `<div>${Le}: <b>${e.value.style.tooltip.prefix} ${isNaN(ve.value) ? "-" : Number(ve.value.toFixed(e.value.style.tooltip.roundingValue)).toLocaleString()} ${e.value.style.tooltip.suffix}</b></div>`, o += "</div>", P.value = `<div style="text-align:right">${o}</div>`;
337
+ }
338
+ O.value = !0;
339
+ }
340
+ function Ne() {
341
+ x.value = {
342
+ start: 0,
343
+ end: ee.value
344
+ }, M.value += 1;
345
+ }
346
+ function ie() {
347
+ De(() => {
348
+ const l = [e.value.translations.period, e.value.translations.open, e.value.translations.high, e.value.translations.low, e.value.translations.last, e.value.translations.volume], a = k.value.map((w) => [
349
+ w.period,
350
+ w.open.value,
351
+ w.high.value,
352
+ w.low.value,
353
+ w.last.value,
354
+ w.volume
355
+ ]), t = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([l]).concat(a), o = Qe(t);
356
+ Ze({ csvContent: o, title: e.value.style.title.text || "vue-ui-candlestick" });
357
+ });
358
+ }
359
+ const j = f(() => {
360
+ const l = k.value.map((o) => [
361
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${e.value.style.layout.candle.borderRadius * 3}" fill="${e.value.style.layout.candle.gradient.show ? o.isBullish ? `url(#bullish_gradient_${m.value}` : `url(#bearish_gradient_${m.value})` : o.isBullish ? e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.colors.bearish}"/></svg> ${o.period}`,
362
+ `${e.value.table.td.prefix} ${isNaN(o.open.value) ? "-" : Number(o.open.value.toFixed(e.value.table.td.roundingValue)).toLocaleString()} ${e.value.table.td.suffix}`,
363
+ `${e.value.table.td.prefix} ${isNaN(o.high.value) ? "-" : Number(o.high.value.toFixed(e.value.table.td.roundingValue)).toLocaleString()} ${e.value.table.td.suffix}`,
364
+ `${e.value.table.td.prefix} ${isNaN(o.low.value) ? "-" : Number(o.low.value.toFixed(e.value.table.td.roundingValue)).toLocaleString()} ${e.value.table.td.suffix}`,
365
+ `${e.value.table.td.prefix} ${isNaN(o.last.value) ? "-" : Number(o.last.value.toFixed(e.value.table.td.roundingValue)).toLocaleString()} ${e.value.table.td.suffix}`,
366
+ `${isNaN(o.volume) ? "-" : o.volume.toLocaleString()}`
367
+ ]), a = {
368
+ th: {
369
+ backgroundColor: e.value.table.th.backgroundColor,
370
+ color: e.value.table.th.color,
371
+ outline: e.value.table.th.outline
372
+ },
373
+ td: {
374
+ backgroundColor: e.value.table.td.backgroundColor,
375
+ color: e.value.table.td.color,
376
+ outline: e.value.table.td.outline
377
+ },
378
+ breakpoint: e.value.table.responsiveBreakpoint
379
+ }, t = [
380
+ e.value.translations.period,
381
+ e.value.translations.open,
382
+ e.value.translations.high,
383
+ e.value.translations.low,
384
+ e.value.translations.last,
385
+ e.value.translations.volume
386
+ ];
387
+ return { head: t, body: l, config: a, colNames: t };
388
+ }), D = c(!1);
389
+ function ze(l) {
390
+ D.value = l, E.value += 1;
391
+ }
392
+ function ne() {
393
+ z.value.showTable = !z.value.showTable;
394
+ }
395
+ function re() {
396
+ z.value.showTooltip = !z.value.showTooltip;
397
+ }
398
+ return B({
399
+ generatePdf: oe,
400
+ generateCsv: ie,
401
+ generateImage: ae,
402
+ toggleTable: ne,
403
+ toggleTooltip: re
404
+ }), (l, a) => (u(), i("div", {
405
+ ref_key: "candlestickChart",
406
+ ref: F,
407
+ class: pe(`vue-ui-candlestick ${D.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
408
+ style: V(`position:relative;font-family:${e.value.style.fontFamily}; text-align:center;${e.value.style.title.text ? "" : "padding-top:36px"};background:${e.value.style.backgroundColor}; ${e.value.responsive ? "height: 100%" : ""}`),
409
+ id: `vue-ui-candlestick_${m.value}`
410
+ }, [
411
+ e.value.style.title.text ? (u(), i("div", {
412
+ key: 0,
413
+ ref_key: "chartTitle",
414
+ ref: h,
415
+ style: V(`width:100%;background:${e.value.style.backgroundColor}`)
416
+ }, [
417
+ Q(lt, {
418
+ config: {
419
+ title: {
420
+ cy: "candlestick-div-title",
421
+ ...e.value.style.title
422
+ },
423
+ subtitle: {
424
+ cy: "candlestick-div-subtitle",
425
+ ...e.value.style.title.subtitle
426
+ }
427
+ }
428
+ }, null, 8, ["config"])
429
+ ], 4)) : p("", !0),
430
+ e.value.userOptions.show && y.value ? (u(), q(ot, {
431
+ ref_key: "details",
432
+ ref: Z,
433
+ key: `user_options_${E.value}`,
434
+ backgroundColor: e.value.style.backgroundColor,
435
+ color: e.value.style.color,
436
+ isImaging: _(we),
437
+ isPrinting: _(ke),
438
+ uid: m.value,
439
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
440
+ hasPdf: e.value.userOptions.buttons.pdf,
441
+ hasImg: e.value.userOptions.buttons.img,
442
+ hasXls: e.value.userOptions.buttons.csv,
443
+ hasTable: e.value.userOptions.buttons.table,
444
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
445
+ isFullscreen: D.value,
446
+ isTooltip: z.value.showTooltip,
447
+ titles: { ...e.value.userOptions.buttonTitles },
448
+ chartElement: F.value,
449
+ onToggleFullscreen: ze,
450
+ onGeneratePdf: _(oe),
451
+ onGenerateCsv: ie,
452
+ onGenerateImage: _(ae),
453
+ onToggleTable: ne,
454
+ onToggleTooltip: re
455
+ }, Ue({ _: 2 }, [
456
+ l.$slots.optionTooltip ? {
457
+ name: "optionTooltip",
458
+ fn: $(() => [
459
+ C(l.$slots, "optionTooltip", {}, void 0, !0)
460
+ ]),
461
+ key: "0"
462
+ } : void 0,
463
+ l.$slots.optionPdf ? {
464
+ name: "optionPdf",
465
+ fn: $(() => [
466
+ C(l.$slots, "optionPdf", {}, void 0, !0)
467
+ ]),
468
+ key: "1"
469
+ } : void 0,
470
+ l.$slots.optionCsv ? {
471
+ name: "optionCsv",
472
+ fn: $(() => [
473
+ C(l.$slots, "optionCsv", {}, void 0, !0)
474
+ ]),
475
+ key: "2"
476
+ } : void 0,
477
+ l.$slots.optionImg ? {
478
+ name: "optionImg",
479
+ fn: $(() => [
480
+ C(l.$slots, "optionImg", {}, void 0, !0)
481
+ ]),
482
+ key: "3"
483
+ } : void 0,
484
+ l.$slots.optionTable ? {
485
+ name: "optionTable",
486
+ fn: $(() => [
487
+ C(l.$slots, "optionTable", {}, void 0, !0)
488
+ ]),
489
+ key: "4"
490
+ } : void 0,
491
+ l.$slots.optionFullscreen ? {
492
+ name: "optionFullscreen",
493
+ fn: $(({ toggleFullscreen: t, isFullscreen: o }) => [
494
+ C(l.$slots, "optionFullscreen", Y(J({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
495
+ ]),
496
+ key: "5"
497
+ } : void 0
498
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : p("", !0),
499
+ y.value ? (u(), i("svg", {
500
+ key: 2,
501
+ xmlns: _(Xe),
502
+ class: pe({ "vue-data-ui-fullscreen--on": D.value, "vue-data-ui-fulscreen--off": !D.value }),
503
+ viewBox: `0 0 ${g.value.width <= 0 ? 10 : g.value.width} ${g.value.height <= 0 ? 10 : g.value.height}`,
504
+ style: V(`max-width:100%;overflow:visible;background:${e.value.style.backgroundColor};color:${e.value.style.color}`)
505
+ }, [
506
+ k.value.length > 0 ? (u(), i("g", wt, [
507
+ s("defs", null, [
508
+ s("linearGradient", {
509
+ id: `bearish_gradient_${m.value}`,
510
+ x2: "0%",
511
+ y2: "100%"
512
+ }, [
513
+ s("stop", {
514
+ offset: "0%",
515
+ "stop-color": e.value.style.layout.candle.colors.bearish
516
+ }, null, 8, Ct),
517
+ s("stop", {
518
+ offset: "50%",
519
+ "stop-color": `${_(K)(e.value.style.layout.candle.colors.bearish, 0.02)}DE`
520
+ }, null, 8, _t),
521
+ s("stop", {
522
+ offset: "100%",
523
+ "stop-color": `${_(K)(e.value.style.layout.candle.colors.bearish, 0.05)}66`
524
+ }, null, 8, St)
525
+ ], 8, $t),
526
+ s("linearGradient", {
527
+ id: `bullish_gradient_${m.value}`,
528
+ x2: "0%",
529
+ y2: "100%"
530
+ }, [
531
+ s("stop", {
532
+ offset: "0%",
533
+ "stop-color": e.value.style.layout.candle.colors.bullish
534
+ }, null, 8, zt),
535
+ s("stop", {
536
+ offset: "50%",
537
+ "stop-color": `${_(K)(e.value.style.layout.candle.colors.bullish, 0.02)}DE`
538
+ }, null, 8, Ft),
539
+ s("stop", {
540
+ offset: "100%",
541
+ "stop-color": `${_(K)(e.value.style.layout.candle.colors.bullish, 0.05)}66`
542
+ }, null, 8, At)
543
+ ], 8, Nt)
544
+ ]),
545
+ e.value.style.layout.grid.show ? (u(), i("g", Tt, [
546
+ s("line", {
547
+ x1: d.value.left,
548
+ x2: d.value.left,
549
+ y1: d.value.top,
550
+ y2: d.value.bottom,
551
+ stroke: e.value.style.layout.grid.stroke,
552
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
553
+ "stroke-linecap": "round"
554
+ }, null, 8, Lt),
555
+ s("line", {
556
+ x1: d.value.left,
557
+ x2: d.value.right,
558
+ y1: d.value.bottom,
559
+ y2: d.value.bottom,
560
+ stroke: e.value.style.layout.grid.stroke,
561
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
562
+ "stroke-linecap": "round"
563
+ }, null, 8, Rt)
564
+ ])) : p("", !0),
565
+ e.value.style.layout.grid.yAxis.dataLabels.show ? (u(), i("g", It, [
566
+ (u(!0), i(R, null, I(Ce.value, (t, o) => (u(), i("g", null, [
567
+ t.value >= A.value.min && t.value <= A.value.max ? (u(), i("line", {
568
+ key: 0,
569
+ x1: d.value.left,
570
+ x2: d.value.left - 5,
571
+ y1: t.y,
572
+ y2: t.y,
573
+ stroke: e.value.style.layout.grid.stroke,
574
+ "stroke-width": e.value.style.layout.grid.strokeWidth,
575
+ "stroke-linecap": "round"
576
+ }, null, 8, Vt)) : p("", !0),
577
+ t.value >= A.value.min && t.value <= A.value.max ? (u(), i("text", {
578
+ key: 1,
579
+ x: d.value.left - 8 + e.value.style.layout.grid.yAxis.dataLabels.offsetX,
580
+ y: t.y + g.value.yAxisFontSize / 3,
581
+ "font-size": g.value.yAxisFontSize,
582
+ "text-anchor": "end",
583
+ fill: e.value.style.layout.grid.yAxis.dataLabels.color,
584
+ "font-weight": e.value.style.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
585
+ }, L(e.value.style.layout.grid.yAxis.dataLabels.prefix) + " " + L(_(He)(t.value) ? t.value.toFixed(e.value.style.layout.grid.yAxis.dataLabels.roundingValue) : "") + " " + L(e.value.style.layout.grid.yAxis.dataLabels.suffix), 9, Bt)) : p("", !0)
586
+ ]))), 256))
587
+ ])) : p("", !0),
588
+ e.value.style.layout.grid.xAxis.dataLabels.show ? (u(), i("g", Ot, [
589
+ (u(!0), i(R, null, I(_e.value, (t, o) => (u(), i("g", null, [
590
+ s("text", {
591
+ transform: `translate(${d.value.left + v.value * o + v.value / 2}, ${d.value.bottom + g.value.xAxisFontSize * 2 + e.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${e.value.style.layout.grid.xAxis.dataLabels.rotation})`,
592
+ "text-anchor": e.value.style.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
593
+ "font-size": g.value.xAxisFontSize,
594
+ fill: e.value.style.layout.grid.xAxis.dataLabels.color,
595
+ "font-weight": e.value.style.layout.grid.xAxis.dataLabels.bold ? "bold" : "normal"
596
+ }, L(t), 9, Pt)
597
+ ]))), 256))
598
+ ])) : p("", !0),
599
+ s("g", null, [
600
+ (u(!0), i(R, null, I(k.value, (t, o) => (u(), i("g", null, [
601
+ s("line", {
602
+ x1: t.open.x,
603
+ x2: t.open.x,
604
+ y1: t.high.y,
605
+ y2: t.low.y,
606
+ stroke: e.value.style.layout.wick.stroke,
607
+ "stroke-width": e.value.style.layout.wick.strokeWidth,
608
+ "stroke-linecap": "round"
609
+ }, null, 8, Ut),
610
+ e.value.style.layout.wick.extremity.shape === "circle" ? (u(), i("g", Et, [
611
+ s("circle", {
612
+ cx: t.high.x,
613
+ cy: t.high.y,
614
+ r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
615
+ fill: e.value.style.layout.wick.extremity.color
616
+ }, null, 8, Dt),
617
+ s("circle", {
618
+ cx: t.low.x,
619
+ cy: t.low.y,
620
+ r: e.value.style.layout.wick.extremity.size === "auto" ? v.value / 20 : e.value.style.layout.wick.extremity.size,
621
+ fill: e.value.style.layout.wick.extremity.color
622
+ }, null, 8, Mt)
623
+ ])) : p("", !0),
624
+ e.value.style.layout.wick.extremity.shape === "line" ? (u(), i("g", Wt, [
625
+ s("line", {
626
+ x1: t.high.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
627
+ x2: t.high.x + (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
628
+ y1: t.high.y,
629
+ y2: t.high.y,
630
+ stroke: e.value.style.layout.wick.extremity.color,
631
+ "stroke-width": e.value.style.layout.wick.strokeWidth,
632
+ "stroke-linecap": "round"
633
+ }, null, 8, Gt),
634
+ s("line", {
635
+ x1: t.low.x - (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
636
+ x2: t.low.x + (e.value.style.layout.wick.extremity.size === "auto" ? v.value * e.value.style.layout.candle.widthRatio : e.value.style.layout.wick.extremity.size) / 2,
637
+ y1: t.low.y,
638
+ y2: t.low.y,
639
+ stroke: e.value.style.layout.wick.extremity.color,
640
+ "stroke-width": e.value.style.layout.wick.strokeWidth,
641
+ "stroke-linecap": "round"
642
+ }, null, 8, jt)
643
+ ])) : p("", !0)
644
+ ]))), 256))
645
+ ]),
646
+ s("g", null, [
647
+ (u(!0), i(R, null, I(k.value, (t, o) => (u(), i("rect", {
648
+ x: t.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
649
+ y: t.isBullish ? t.last.y : t.open.y,
650
+ height: Math.abs(t.last.y - t.open.y) <= 0 ? 1e-4 : Math.abs(t.last.y - t.open.y),
651
+ width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
652
+ fill: e.value.style.layout.candle.gradient.underlayer,
653
+ rx: e.value.style.layout.candle.borderRadius,
654
+ stroke: "none"
655
+ }, null, 8, Xt))), 256)),
656
+ (u(!0), i(R, null, I(k.value, (t, o) => (u(), i("rect", {
657
+ x: t.open.x - v.value / 2 + v.value * (1 - e.value.style.layout.candle.widthRatio) / 2,
658
+ y: t.isBullish ? t.last.y : t.open.y,
659
+ height: Math.abs(t.last.y - t.open.y) <= 0 ? 1e-4 : Math.abs(t.last.y - t.open.y),
660
+ width: v.value * e.value.style.layout.candle.widthRatio <= 0 ? 1e-4 : v.value * e.value.style.layout.candle.widthRatio,
661
+ fill: t.isBullish ? e.value.style.layout.candle.gradient.show ? `url(#bullish_gradient_${m.value})` : e.value.style.layout.candle.colors.bullish : e.value.style.layout.candle.gradient.show ? `url(#bearish_gradient_${m.value})` : e.value.style.layout.candle.colors.bearish,
662
+ rx: e.value.style.layout.candle.borderRadius,
663
+ stroke: e.value.style.layout.candle.stroke,
664
+ "stroke-width": e.value.style.layout.candle.strokeWidth,
665
+ "stroke-linecap": "round",
666
+ "stroke-linejoin": "round"
667
+ }, null, 8, Ht))), 256))
668
+ ]),
669
+ s("g", null, [
670
+ (u(!0), i(R, null, I(k.value, (t, o) => (u(), i("rect", {
671
+ x: d.value.left + o * v.value,
672
+ y: d.value.top,
673
+ height: d.value.height <= 0 ? 1e-4 : d.value.height,
674
+ width: v.value <= 0 ? 1e-4 : v.value,
675
+ fill: U.value === o ? `${e.value.style.layout.selector.color}${_(qe)[e.value.style.layout.selector.opacity]}` : "transparent",
676
+ onMouseover: (w) => Se(o, t),
677
+ onMouseleave: a[0] || (a[0] = (w) => {
678
+ U.value = void 0, O.value = !1;
679
+ })
680
+ }, null, 40, qt))), 256))
681
+ ])
682
+ ])) : p("", !0),
683
+ C(l.$slots, "svg", { svg: g.value }, void 0, !0)
684
+ ], 14, kt)) : p("", !0),
685
+ y.value ? p("", !0) : (u(), q(nt, {
686
+ key: 3,
687
+ config: {
688
+ type: "candlesticks",
689
+ style: {
690
+ backgroundColor: e.value.style.backgroundColor,
691
+ candlesticks: {
692
+ axis: {
693
+ color: "#CCCCCC"
694
+ },
695
+ candle: {
696
+ color: "#CCCCCC"
697
+ }
698
+ }
699
+ }
700
+ }
701
+ }, null, 8, ["config"])),
702
+ e.value.style.zoom.show && y.value ? (u(), i("div", {
703
+ key: 4,
704
+ ref_key: "chartSlicer",
705
+ ref: N
706
+ }, [
707
+ (u(), q(mt, {
708
+ key: `slicer_${M.value}`,
709
+ background: e.value.style.zoom.color,
710
+ borderColor: e.value.style.backgroundColor,
711
+ fontSize: e.value.style.zoom.fontSize,
712
+ useResetSlot: e.value.style.zoom.useResetSlot,
713
+ labelLeft: r.dataset[x.value.start] ? r.dataset[x.value.start][0] : r.dataset[0][0],
714
+ labelRight: r.dataset[x.value.end - 1] ? r.dataset[x.value.end - 1][0] : r.dataset.at(-1)[0],
715
+ textColor: e.value.style.color,
716
+ inputColor: e.value.style.zoom.color,
717
+ selectColor: e.value.style.zoom.highlightColor,
718
+ max: ee.value,
719
+ min: 0,
720
+ valueStart: x.value.start,
721
+ valueEnd: x.value.end,
722
+ start: x.value.start,
723
+ "onUpdate:start": a[1] || (a[1] = (t) => x.value.start = t),
724
+ end: x.value.end,
725
+ "onUpdate:end": a[2] || (a[2] = (t) => x.value.end = t),
726
+ onReset: Ne
727
+ }, {
728
+ "reset-action": $(({ reset: t }) => [
729
+ C(l.$slots, "reset-action", Y(J({ reset: t })), void 0, !0)
730
+ ]),
731
+ _: 3
732
+ }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end"]))
733
+ ], 512)) : p("", !0),
734
+ s("div", {
735
+ ref_key: "chartLegend",
736
+ ref: S
737
+ }, [
738
+ C(l.$slots, "legend", { legend: k.value }, void 0, !0)
739
+ ], 512),
740
+ Q(ut, {
741
+ show: z.value.showTooltip && O.value,
742
+ backgroundColor: e.value.style.tooltip.backgroundColor,
743
+ color: e.value.style.tooltip.color,
744
+ borderRadius: e.value.style.tooltip.borderRadius,
745
+ borderColor: e.value.style.tooltip.borderColor,
746
+ borderWidth: e.value.style.tooltip.borderWidth,
747
+ fontSize: e.value.style.tooltip.fontSize,
748
+ backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
749
+ parent: F.value,
750
+ content: P.value,
751
+ isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
752
+ }, {
753
+ "tooltip-before": $(() => [
754
+ C(l.$slots, "tooltip-before", Y(J({ ...le.value })), void 0, !0)
755
+ ]),
756
+ "tooltip-after": $(() => [
757
+ C(l.$slots, "tooltip-after", Y(J({ ...le.value })), void 0, !0)
758
+ ]),
759
+ _: 3
760
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
761
+ y.value ? (u(), q(rt, {
762
+ key: 5,
763
+ hideDetails: "",
764
+ config: {
765
+ open: z.value.showTable,
766
+ maxHeight: 1e4,
767
+ body: {
768
+ backgroundColor: e.value.style.backgroundColor,
769
+ color: e.value.style.color
770
+ },
771
+ head: {
772
+ backgroundColor: e.value.style.backgroundColor,
773
+ color: e.value.style.color
774
+ }
775
+ }
776
+ }, {
777
+ content: $(() => [
778
+ Q(Ye, {
779
+ colNames: j.value.colNames,
780
+ head: j.value.head,
781
+ body: j.value.body,
782
+ config: j.value.config,
783
+ title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
784
+ onClose: a[3] || (a[3] = (t) => z.value.showTable = !1)
785
+ }, {
786
+ th: $(({ th: t }) => [
787
+ Ee(L(t), 1)
788
+ ]),
789
+ td: $(({ td: t }) => [
790
+ s("div", { innerHTML: t }, null, 8, Yt)
791
+ ]),
792
+ _: 1
793
+ }, 8, ["colNames", "head", "body", "config", "title"])
794
+ ]),
795
+ _: 1
796
+ }, 8, ["config"])) : p("", !0)
797
+ ], 14, xt));
798
+ }
799
+ }, Kt = /* @__PURE__ */ xe(Jt, [["__scopeId", "data-v-0ed64fca"]]), il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
800
+ __proto__: null,
801
+ default: Kt
802
+ }, Symbol.toStringTag, { value: "Module" }));
803
+ export {
804
+ mt as S,
805
+ il as a,
806
+ Kt as v
807
+ };