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,451 @@
1
+ import { ref as d, onMounted as q, onBeforeUnmount as J, computed as D, openBlock as r, createElementBlock as u, normalizeStyle as w, createVNode as _, createCommentVNode as p, unref as K, createElementVNode as M, mergeProps as U, renderSlot as N, normalizeProps as B, guardReactiveProps as j, toDisplayString as Q } from "vue";
2
+ import { u as Y, _ as Z } from "./title-BF-9Qcni.js";
3
+ import { _ as ee, e as te, X as ae, B as x, E } from "./data-table-d-VcuH-r.js";
4
+ import { t as se, u as le } from "./vue-ui-age-pyramid-4hcuKpFY.js";
5
+ import { u as oe } from "./vue-ui-3d-bar-DW7kGJSz.js";
6
+ class re {
7
+ constructor(F, f, I, z = !0, C = !0) {
8
+ this.interval = f, this.elapsed = 0, this.isPaused = !1;
9
+ const $ = `
10
+ let interval;
11
+ let elapsed = 0;
12
+ let paused = false;
13
+ let startTime;
14
+ let tickInterval;
15
+
16
+ onmessage = function(e) {
17
+ const { action, data } = e.data;
18
+
19
+ switch(action) {
20
+ case 'start':
21
+ startTime = Date.now();
22
+ tickInterval = data.interval;
23
+ elapsed = 0;
24
+ paused = false;
25
+ interval = setInterval(() => {
26
+ elapsed += tickInterval;
27
+ postMessage({ elapsed, timestamp: Date.now() });
28
+ }, tickInterval);
29
+ break;
30
+
31
+ case 'pause':
32
+ paused = true;
33
+ clearInterval(interval);
34
+ elapsed = Date.now() - startTime;
35
+ break;
36
+
37
+ case 'resume':
38
+ if (paused) {
39
+ startTime = Date.now() - elapsed;
40
+ interval = setInterval(() => {
41
+ elapsed += tickInterval;
42
+ postMessage({ elapsed, timestamp: Date.now() });
43
+ }, tickInterval);
44
+ }
45
+ paused = false;
46
+ break;
47
+
48
+ case 'stop':
49
+ clearInterval(interval);
50
+ elapsed = 0;
51
+ postMessage({ elapsed });
52
+ break;
53
+
54
+ case 'reset':
55
+ elapsed = 0;
56
+ clearInterval(interval);
57
+ postMessage({ elapsed });
58
+ break;
59
+
60
+ case 'lap':
61
+ postMessage({
62
+ elapsed,
63
+ timestamp: Date.now(),
64
+ action: 'lap'
65
+ });
66
+ break;
67
+
68
+ default:
69
+ break;
70
+ }
71
+ };
72
+ `, P = new Blob([$], { type: "application/javascript" }), m = URL.createObjectURL(P), n = new Worker(m);
73
+ function e(h) {
74
+ let t = Math.floor(h / 1e3), i = Math.floor(h % 1e3 / 10), v = Math.floor(t / 3600), k = Math.floor(t % 3600 / 60), a = t % 60, l = "";
75
+ return C && (l += String(v).padStart(2, "0") + ":"), l += String(k).padStart(2, "0") + ":", l += String(a).padStart(2, "0"), z && (l += "." + String(i).padStart(2, "0")), l;
76
+ }
77
+ this.start = () => {
78
+ this.isPaused = !1, n.postMessage({ action: "start", data: { interval: this.interval } });
79
+ }, this.pause = () => {
80
+ this.isPaused ? this.resume() : (this.isPaused = !0, n.postMessage({ action: "pause" }));
81
+ }, this.resume = () => {
82
+ this.isPaused && (n.postMessage({ action: "resume" }), this.isPaused = !1);
83
+ }, this.stop = () => {
84
+ n.postMessage({ action: "stop" }), this.isPaused = !1;
85
+ }, this.reset = () => {
86
+ n.postMessage({ action: "reset" }), this.elapsed = 0, this.isPaused = !1;
87
+ }, this.restart = () => {
88
+ this.stop(), this.start();
89
+ }, this.lap = () => new Promise((h) => {
90
+ n.postMessage({ action: "lap" });
91
+ const t = (i) => {
92
+ const { elapsed: v, timestamp: k, action: a } = i.data;
93
+ if (a === "lap") {
94
+ const l = e(v);
95
+ h({
96
+ timestamp: k || 0,
97
+ elapsed: v,
98
+ formatted: l
99
+ });
100
+ }
101
+ };
102
+ n.addEventListener("message", t, { once: !0 });
103
+ }), n.onmessage = (h) => {
104
+ const { elapsed: t, timestamp: i } = h.data;
105
+ this.elapsed = t, F({
106
+ timestamp: i || 0,
107
+ elapsed: this.elapsed,
108
+ formatted: e(this.elapsed)
109
+ });
110
+ }, n.onerror = (h) => {
111
+ I && I(h);
112
+ };
113
+ }
114
+ }
115
+ const ue = ["xmlns", "viewBox"], ie = { key: 0 }, ne = ["id"], ce = ["stop-color"], de = ["stop-color"], he = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ve = ["d", "stroke", "stroke-width"], pe = ["r", "fill", "stroke", "stroke-width"], we = ["r", "fill", "stroke", "stroke-width"], fe = ["x", "y"], ke = ["x", "y", "font-size", "fill", "font-weight"], ge = {
116
+ key: 0,
117
+ class: "vue-ui-timer-controls"
118
+ }, me = ["title"], ye = ["title"], be = ["title"], _e = ["title"], Me = ["title"], Ce = {
119
+ __name: "vue-ui-timer",
120
+ props: {
121
+ config: {
122
+ type: Object,
123
+ default() {
124
+ return {};
125
+ }
126
+ }
127
+ },
128
+ emits: ["start", "pause", "reset", "restart", "lap"],
129
+ setup(O, { expose: F, emit: f }) {
130
+ const I = O, { vue_ui_timer: z } = oe(), C = d(null), $ = d(null), P = d(null), m = d(null), n = d(te());
131
+ q(() => {
132
+ if (e.value.responsive) {
133
+ const s = se(() => {
134
+ const { width: o, height: c } = le({
135
+ chart: C.value,
136
+ title: e.value.style.title.text ? $.value : null,
137
+ legend: P.value
138
+ });
139
+ t.value.width = o, t.value.height = c, t.value.tracker.core = E({
140
+ relator: Math.min(o, c),
141
+ adjuster: e.value.style.width,
142
+ source: 6 * e.value.stopwatch.tracker.radiusRatio,
143
+ threshold: 1,
144
+ fallback: 1
145
+ }), t.value.tracker.aura = E({
146
+ relator: Math.min(o, c),
147
+ adjuster: e.value.style.width,
148
+ source: 12 * e.value.stopwatch.tracker.aura.radiusRatio,
149
+ threshold: 1,
150
+ fallback: 1
151
+ }), t.value.label = E({
152
+ relator: Math.min(o, c),
153
+ adjuster: e.value.style.width,
154
+ source: e.value.stopwatch.label.fontSize,
155
+ threshold: 10,
156
+ fallback: 10
157
+ });
158
+ });
159
+ m.value = new ResizeObserver(s), m.value.observe(C.value.parentNode);
160
+ }
161
+ }), J(() => {
162
+ m.value && m.value.disconnect();
163
+ });
164
+ const e = D(() => Y({
165
+ userConfig: I.config,
166
+ defaultConfig: z
167
+ })), h = D(() => {
168
+ if (e.value.stopwatch.showHours && e.value.stopwatch.showHundredth)
169
+ return "00:00:00.00";
170
+ if (e.value.stopwatch.showHours && !e.value.stopwatch.showHundredth)
171
+ return "00:00:00";
172
+ if (!e.value.stopwatch.showHours && e.value.stopwatch.showHundredth)
173
+ return "00:00.00";
174
+ if (!e.value.stopwatch.showHours && !e.value.stopwatch.showHundredth)
175
+ return "00:00";
176
+ }), t = d({
177
+ height: e.value.style.height,
178
+ width: e.value.style.width,
179
+ tracker: {
180
+ core: 6 * e.value.stopwatch.tracker.radiusRatio,
181
+ aura: 12 * e.value.stopwatch.tracker.aura.radiusRatio
182
+ },
183
+ label: e.value.stopwatch.label.fontSize
184
+ }), i = d(0), v = new re(
185
+ (s) => W(s),
186
+ 10,
187
+ "",
188
+ e.value.stopwatch.showHundredth,
189
+ e.value.stopwatch.showHours
190
+ ), k = d(!0), a = d(!1), l = d(!1);
191
+ function R() {
192
+ f("start"), k.value && v.start(), k.value = !1, a.value = !0;
193
+ }
194
+ function A() {
195
+ a.value && (f("reset"), v.stop(), y.value = [], k.value = !0, a.value = !1);
196
+ }
197
+ function H() {
198
+ l.value = !l.value, f("pause", i.value), v.pause();
199
+ }
200
+ function L() {
201
+ a.value && (l.value = !1, f("restart"), y.value = [], v.restart());
202
+ }
203
+ const y = d([]);
204
+ async function S() {
205
+ if (!a.value || l.value) return;
206
+ const s = await v.lap();
207
+ s && (y.value.push(s), f("lap", y.value));
208
+ }
209
+ function W({ timestamp: s, elapsed: o, formatted: c }) {
210
+ i.value = { timestamp: s, elapsed: o, formatted: c };
211
+ }
212
+ const g = D(() => Math.min(t.value.width, t.value.height) / 2.5 * e.value.stopwatch.track.radiusRatio);
213
+ function G(s, o) {
214
+ const T = 360 / (o * 1e3);
215
+ return s * T % 360;
216
+ }
217
+ function V(s) {
218
+ let o = s * (Math.PI / 180), c = t.value.width / 2 + g.value * Math.cos(o), T = t.value.height / 2 + g.value * Math.sin(o);
219
+ return { cx: c, cy: T };
220
+ }
221
+ const b = D(() => {
222
+ const s = G(i.value.elapsed, e.value.stopwatch.cycleSeconds), { cx: o, cy: c } = V(s - 90), T = s > 180 ? 1 : 0;
223
+ return {
224
+ cx: o || t.value.width / 2,
225
+ cy: c || t.value.height / 2 - g.value,
226
+ largeArcFlag: T,
227
+ sweepFlag: 1
228
+ };
229
+ });
230
+ return F({
231
+ start: R,
232
+ pause: H,
233
+ reset: A,
234
+ restart: L,
235
+ lap: S
236
+ }), (s, o) => (r(), u("div", {
237
+ ref_key: "timerChart",
238
+ ref: C,
239
+ class: "vue-ui-timer",
240
+ style: w({
241
+ fontFamily: e.value.style.fontFamily,
242
+ width: "100%",
243
+ height: e.value.responsive ? "100%" : "auto",
244
+ textAlign: "center"
245
+ })
246
+ }, [
247
+ e.value.style.title.text ? (r(), u("div", {
248
+ key: 0,
249
+ ref_key: "chartTitle",
250
+ ref: $,
251
+ style: w({
252
+ width: "100%",
253
+ background: e.value.style.backgroundColor
254
+ })
255
+ }, [
256
+ _(Z, {
257
+ config: {
258
+ title: {
259
+ cy: "title",
260
+ ...e.value.style.title
261
+ },
262
+ subtitle: {
263
+ cy: "subtitle",
264
+ ...e.value.style.title.subtitle
265
+ }
266
+ }
267
+ }, null, 8, ["config"])
268
+ ], 4)) : p("", !0),
269
+ (r(), u("svg", {
270
+ xmlns: K(ae),
271
+ viewBox: `0 0 ${t.value.width <= 0 ? 10 : t.value.width} ${t.value.height <= 0 ? 10 : t.value.height}`,
272
+ style: w({
273
+ maxWidth: "100%",
274
+ overflow: "visible",
275
+ background: e.value.style.backgroundColor
276
+ })
277
+ }, [
278
+ e.value.stopwatch.tracker.gradient.show ? (r(), u("defs", ie, [
279
+ M("radialGradient", {
280
+ id: `tracker_gradient_${n.value}`,
281
+ cx: "50%",
282
+ cy: "50%",
283
+ r: "50%",
284
+ fx: "50%",
285
+ fy: "50%"
286
+ }, [
287
+ M("stop", {
288
+ offset: "0%",
289
+ "stop-color": e.value.stopwatch.tracker.gradient.color
290
+ }, null, 8, ce),
291
+ M("stop", {
292
+ offset: "100%",
293
+ "stop-color": e.value.stopwatch.tracker.fill
294
+ }, null, 8, de)
295
+ ], 8, ne)
296
+ ])) : p("", !0),
297
+ M("circle", {
298
+ cx: t.value.width / 2,
299
+ cy: t.value.height / 2,
300
+ r: g.value,
301
+ fill: e.value.stopwatch.track.fill,
302
+ stroke: e.value.stopwatch.track.stroke,
303
+ "stroke-width": e.value.stopwatch.track.strokeWidth
304
+ }, null, 8, he),
305
+ e.value.stopwatch.cycleTrack.show ? (r(), u("path", {
306
+ key: 1,
307
+ d: `M ${t.value.width / 2},${t.value.height / 2 - g.value} A ${g.value},${g.value} 0 ${b.value.largeArcFlag},${b.value.sweepFlag} ${b.value.cx},${b.value.cy}`,
308
+ stroke: e.value.stopwatch.cycleTrack.stroke,
309
+ "stroke-width": e.value.stopwatch.cycleTrack.strokeWidth,
310
+ "stroke-linecap": "round",
311
+ fill: "none"
312
+ }, null, 8, ve)) : p("", !0),
313
+ M("circle", U(b.value, {
314
+ r: t.value.tracker.core,
315
+ fill: e.value.stopwatch.tracker.gradient.show ? `url(#tracker_gradient_${n.value})` : e.value.stopwatch.tracker.fill,
316
+ stroke: e.value.stopwatch.tracker.stroke,
317
+ "stroke-width": e.value.stopwatch.tracker.strokeWidth
318
+ }), null, 16, pe),
319
+ e.value.stopwatch.tracker.aura.show ? (r(), u("circle", U({ key: 2 }, b.value, {
320
+ r: t.value.tracker.aura,
321
+ fill: `${e.value.stopwatch.tracker.aura.fill}20`,
322
+ stroke: e.value.stopwatch.tracker.aura.stroke,
323
+ "stroke-width": e.value.stopwatch.tracker.aura.strokeWidth
324
+ }), null, 16, we)) : p("", !0),
325
+ s.$slots.time ? (r(), u("foreignObject", {
326
+ key: 3,
327
+ x: t.value.width / 2,
328
+ y: t.value.height / 2,
329
+ height: "0.1",
330
+ width: "0.1",
331
+ style: { overflow: "visible" }
332
+ }, [
333
+ N(s.$slots, "time", B(j({ ...i.value })), void 0, !0)
334
+ ], 8, fe)) : (r(), u("text", {
335
+ key: 4,
336
+ x: t.value.width / 2,
337
+ y: t.value.height / 2 + t.value.label / 4,
338
+ "font-size": t.value.label,
339
+ "text-anchor": "middle",
340
+ fill: e.value.stopwatch.label.color,
341
+ "font-weight": e.value.stopwatch.label.bold ? "bold" : "normal",
342
+ style: { "font-variant-numeric": "tabular-nums !important" }
343
+ }, Q(i.value.formatted || h.value), 9, ke))
344
+ ], 12, ue)),
345
+ M("div", {
346
+ ref_key: "chartLegend",
347
+ ref: P,
348
+ style: w({ width: "100%", backgroundColor: e.value.stopwatch.legend.backgroundColor })
349
+ }, [
350
+ s.$slots.controls ? p("", !0) : (r(), u("div", ge, [
351
+ e.value.stopwatch.legend.buttons.start ? (r(), u("button", {
352
+ key: 0,
353
+ title: e.value.stopwatch.legend.buttonTitles.start,
354
+ onClick: R,
355
+ class: "vue-ui-timer-button",
356
+ style: w({
357
+ opacity: a.value ? 0.2 : 1,
358
+ cursor: a.value ? "default" : "pointer"
359
+ })
360
+ }, [
361
+ _(x, {
362
+ name: "play",
363
+ stroke: e.value.stopwatch.legend.buttons.iconColor
364
+ }, null, 8, ["stroke"])
365
+ ], 12, me)) : p("", !0),
366
+ e.value.stopwatch.legend.buttons.pause ? (r(), u("button", {
367
+ key: 1,
368
+ title: l.value ? e.value.stopwatch.legend.buttonTitles.resume : e.value.stopwatch.legend.buttonTitles.pause,
369
+ onClick: H,
370
+ class: "vue-ui-timer-button",
371
+ style: w({
372
+ opacity: a.value ? 1 : 0.2,
373
+ cursor: a.value ? "pointer" : "default"
374
+ })
375
+ }, [
376
+ _(x, {
377
+ name: "pause",
378
+ stroke: e.value.stopwatch.legend.buttons.iconColor
379
+ }, null, 8, ["stroke"])
380
+ ], 12, ye)) : p("", !0),
381
+ e.value.stopwatch.legend.buttons.reset ? (r(), u("button", {
382
+ key: 2,
383
+ title: e.value.stopwatch.legend.buttonTitles.reset,
384
+ onClick: A,
385
+ class: "vue-ui-timer-button",
386
+ style: w({
387
+ opacity: a.value ? 1 : 0.2,
388
+ cursor: a.value ? "pointer" : "default"
389
+ })
390
+ }, [
391
+ _(x, {
392
+ name: "stop",
393
+ stroke: e.value.stopwatch.legend.buttons.iconColor
394
+ }, null, 8, ["stroke"])
395
+ ], 12, be)) : p("", !0),
396
+ e.value.stopwatch.legend.buttons.restart ? (r(), u("button", {
397
+ key: 3,
398
+ title: e.value.stopwatch.legend.buttonTitles.restart,
399
+ onClick: L,
400
+ class: "vue-ui-timer-button",
401
+ style: w({
402
+ opacity: a.value ? 1 : 0.2,
403
+ cursor: a.value ? "pointer" : "default"
404
+ })
405
+ }, [
406
+ _(x, {
407
+ name: "restart",
408
+ stroke: e.value.stopwatch.legend.buttons.iconColor
409
+ }, null, 8, ["stroke"])
410
+ ], 12, _e)) : p("", !0),
411
+ e.value.stopwatch.legend.buttons.lap ? (r(), u("button", {
412
+ key: 4,
413
+ title: e.value.stopwatch.legend.buttonTitles.lap,
414
+ onClick: S,
415
+ class: "vue-ui-timer-button",
416
+ style: w({
417
+ opacity: a.value && !l.value ? 1 : 0.2,
418
+ cursor: a.value && !l.value ? "pointer" : "default"
419
+ })
420
+ }, [
421
+ _(x, {
422
+ name: "lap",
423
+ stroke: e.value.stopwatch.legend.buttons.iconColor
424
+ }, null, 8, ["stroke"])
425
+ ], 12, Me)) : p("", !0)
426
+ ])),
427
+ N(s.$slots, "controls", B(j({
428
+ start: R,
429
+ pause: H,
430
+ reset: A,
431
+ restart: L,
432
+ lap: S,
433
+ laps: y.value,
434
+ isRunning: a.value,
435
+ isPaused: l.value,
436
+ ...i.value
437
+ })), void 0, !0),
438
+ N(s.$slots, "laps", B(j({
439
+ laps: y.value,
440
+ lap: S,
441
+ isRunning: a.value,
442
+ isPaused: l.value,
443
+ ...i.value
444
+ })), void 0, !0)
445
+ ], 4)
446
+ ], 4));
447
+ }
448
+ }, Re = /* @__PURE__ */ ee(Ce, [["__scopeId", "data-v-1e579c02"]]);
449
+ export {
450
+ Re as default
451
+ };