vue-data-ui 3.1.0 → 3.1.2

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 (94) hide show
  1. package/dist/{Arrow-DvG07exK.js → Arrow-BotYLY2I.js} +1 -1
  2. package/dist/{BaseDraggableDialog-O7900pGp.js → BaseDraggableDialog-Dkpr-qUQ.js} +2 -2
  3. package/dist/{BaseIcon-DHtro8us.js → BaseIcon-BLg8FaQ2.js} +5 -3
  4. package/dist/{ColorPicker-CpWzNn4r.js → ColorPicker-C2sMVpbA.js} +2 -2
  5. package/dist/{DataTable-DJjA2_wf.js → DataTable-BRN1-1ob.js} +2 -2
  6. package/dist/{Legend-2-dC7DVb.js → Legend-DLzeDl3-.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DHeE4Yuv.js → NonSvgPenAndPaper-Dp53d2re.js} +3 -3
  8. package/dist/{PackageVersion-DU12WH3O.js → PackageVersion-Jz9FlNXl.js} +1 -1
  9. package/dist/{PenAndPaper-B7QEDgx4.js → PenAndPaper-TgGWddgD.js} +3 -3
  10. package/dist/{Shape-Dj2Hl33H.js → Shape-Bmpx9GRg.js} +1 -1
  11. package/dist/{Slicer-D99HytqX.js → Slicer-DeWHn8zH.js} +2 -2
  12. package/dist/{SparkTooltip-B-wL07rI.js → SparkTooltip-C6fJOQ0j.js} +1 -1
  13. package/dist/{Title-Dq2_Z9kR.js → Title-AGmmsSi_.js} +1 -1
  14. package/dist/{Tooltip-Y219DXZO.js → Tooltip-le0yZk_t.js} +1 -1
  15. package/dist/{UserOptions-BuGfCdAY.js → UserOptions-DEFwuQIo.js} +125 -108
  16. package/dist/{dom-to-png-BhciAKaM.js → dom-to-png-C7V0EktO.js} +1 -1
  17. package/dist/{img-JOqdlnUs.js → img-DvuphHeJ.js} +1 -1
  18. package/dist/{index-CDQbCd41.js → index-BFqW8WA0.js} +97 -74
  19. package/dist/pdf-Bdf65IBz.js +79 -0
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +25 -2
  22. package/dist/types/vue-data-ui.d.ts +25 -2
  23. package/dist/{useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js → useAutoSizeLabelsInsideViewbox-N1I6Rk6M.js} +1 -1
  24. package/dist/{useNestedProp-BPEHGiYX.js → useNestedProp-BSZCnuGl.js} +1 -1
  25. package/dist/{usePrinter-Bnl1YeUU.js → usePrinter-DDIKRiOp.js} +13 -12
  26. package/dist/useTableResponsive-Cbx-ACcP.js +22 -0
  27. package/dist/{vue-data-ui-DcNYz3cZ.js → vue-data-ui-vwh3dolO.js} +64 -64
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/{vue-ui-3d-bar-BNIFAeN-.js → vue-ui-3d-bar-DNw3RWRt.js} +371 -366
  30. package/dist/{vue-ui-accordion-Bf_LHFFX.js → vue-ui-accordion-Cv747Pg6.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-Bz-l1afR.js → vue-ui-age-pyramid-B1Yun-v7.js} +200 -195
  32. package/dist/{vue-ui-annotator-BcfRH2BF.js → vue-ui-annotator-B_5hOApA.js} +2 -2
  33. package/dist/{vue-ui-bullet-DK1aM9fX.js → vue-ui-bullet-C2Aj7Lcx.js} +7 -7
  34. package/dist/{vue-ui-candlestick-D6mMjvtu.js → vue-ui-candlestick-BBYqZVUp.js} +225 -220
  35. package/dist/{vue-ui-carousel-table-Vp5f238W.js → vue-ui-carousel-table-DPIOnp9J.js} +4 -4
  36. package/dist/{vue-ui-chestnut-BKc4v-lf.js → vue-ui-chestnut-C4B0wEFn.js} +484 -487
  37. package/dist/{vue-ui-chord-CquhRjf0.js → vue-ui-chord-B9Zml1V7.js} +272 -266
  38. package/dist/{vue-ui-circle-pack-D6zLgxa3.js → vue-ui-circle-pack-CLn19BHH.js} +6 -6
  39. package/dist/{vue-ui-cursor-DIXb2S93.js → vue-ui-cursor-AVEV-uv3.js} +2 -2
  40. package/dist/vue-ui-dashboard-DwNYa1I4.js +412 -0
  41. package/dist/{vue-ui-digits-CLAIo9gW.js → vue-ui-digits-Dr4OHGU0.js} +2 -2
  42. package/dist/{vue-ui-donut-evolution-C3r0YhKz.js → vue-ui-donut-evolution-hJh-1Z48.js} +310 -304
  43. package/dist/{vue-ui-donut-C8h_tCSO.js → vue-ui-donut-xseR2SnT.js} +348 -343
  44. package/dist/{vue-ui-dumbbell-D-t4M00E.js → vue-ui-dumbbell-FdTx7uAG.js} +293 -287
  45. package/dist/{vue-ui-flow-D7_D_UNm.js → vue-ui-flow-Bh6FqlC1.js} +263 -257
  46. package/dist/{vue-ui-funnel-B0QOfZRz.js → vue-ui-funnel-BlsKhHbk.js} +206 -200
  47. package/dist/{vue-ui-galaxy-Ccw5uNes.js → vue-ui-galaxy-C0B8stYi.js} +243 -238
  48. package/dist/{vue-ui-gauge-DvW7nFmK.js → vue-ui-gauge-B1-UiZwV.js} +7 -7
  49. package/dist/{vue-ui-gizmo-WGQxvGPy.js → vue-ui-gizmo-Df_SCjOI.js} +3 -3
  50. package/dist/{vue-ui-heatmap-BQkLujyp.js → vue-ui-heatmap-NfRSd6fU.js} +370 -375
  51. package/dist/{vue-ui-history-plot-eU33r_Ot.js → vue-ui-history-plot-Ce-DJ8xC.js} +305 -299
  52. package/dist/{vue-ui-kpi-CKg2i71M.js → vue-ui-kpi-CH3rWyiG.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-BmkGQsm_.js → vue-ui-mini-loader-D9EVnpxk.js} +2 -2
  54. package/dist/{vue-ui-molecule-Dlu0hjSg.js → vue-ui-molecule-C973vfYh.js} +188 -183
  55. package/dist/{vue-ui-mood-radar-DQaxfw9R.js → vue-ui-mood-radar-DdLxBhlO.js} +197 -192
  56. package/dist/{vue-ui-nested-donuts-Djj9Aw_i.js → vue-ui-nested-donuts-tARXMYzx.js} +326 -320
  57. package/dist/{vue-ui-onion-ZgsErXis.js → vue-ui-onion-BC9czZGG.js} +8 -8
  58. package/dist/{vue-ui-parallel-coordinate-plot-B5fB22Jc.js → vue-ui-parallel-coordinate-plot-CxDIkZKr.js} +401 -395
  59. package/dist/{vue-ui-quadrant-CMevCtXH.js → vue-ui-quadrant-Bpm5ZoTp.js} +339 -334
  60. package/dist/{vue-ui-quick-chart-DcparKSX.js → vue-ui-quick-chart-Bkc_JBCw.js} +6 -6
  61. package/dist/{vue-ui-radar-DFbxoKCK.js → vue-ui-radar-DVJQYNeL.js} +248 -243
  62. package/dist/{vue-ui-rating-ZUpxCWrk.js → vue-ui-rating-DITnRSiS.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-eNKJY4Sx.js → vue-ui-relation-circle-D_OTYUmS.js} +7 -7
  64. package/dist/{vue-ui-ridgeline-D4shpQZd.js → vue-ui-ridgeline-Gc1c4LXq.js} +267 -263
  65. package/dist/{vue-ui-rings-TdTHMbsa.js → vue-ui-rings-CUT1N_kK.js} +229 -224
  66. package/dist/{vue-ui-scatter-CVuV9ljU.js → vue-ui-scatter-DwnZHy0V.js} +359 -354
  67. package/dist/{vue-ui-skeleton-CFxBU2-p.js → vue-ui-skeleton-CeyaKpZd.js} +3 -3
  68. package/dist/{vue-ui-smiley-Har3B3aQ.js → vue-ui-smiley-B9yNexWr.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-FPk-XEwI.js → vue-ui-spark-trend-DTYVcrHV.js} +3 -3
  70. package/dist/{vue-ui-sparkbar-V3eJ0w0t.js → vue-ui-sparkbar-BzxynYoW.js} +3 -3
  71. package/dist/{vue-ui-sparkgauge-DKTGkWnJ.js → vue-ui-sparkgauge-DoznCX5h.js} +3 -3
  72. package/dist/{vue-ui-sparkhistogram-DJsgFwHs.js → vue-ui-sparkhistogram-DoZpd0H2.js} +4 -4
  73. package/dist/{vue-ui-sparkline-Dmrm5SL5.js → vue-ui-sparkline-ZKit-hgG.js} +3 -3
  74. package/dist/{vue-ui-sparkstackbar-B0Pl7VMI.js → vue-ui-sparkstackbar-DjoqH_Xs.js} +3 -3
  75. package/dist/{vue-ui-stackbar-CNsgBPhj.js → vue-ui-stackbar-J-gxI4Xn.js} +310 -304
  76. package/dist/{vue-ui-strip-plot-CYAWwYOM.js → vue-ui-strip-plot-CO7NVeFi.js} +246 -240
  77. package/dist/{vue-ui-table-heatmap-COI9LRqC.js → vue-ui-table-heatmap-BEFdai_O.js} +5 -5
  78. package/dist/{vue-ui-table-Dn6H98rP.js → vue-ui-table-rmbBw_0d.js} +3 -3
  79. package/dist/{vue-ui-table-sparkline-B7Gg5FfJ.js → vue-ui-table-sparkline-CjgaQXbc.js} +4 -4
  80. package/dist/{vue-ui-thermometer-Bgynq5El.js → vue-ui-thermometer--aqaJwFo.js} +7 -7
  81. package/dist/{vue-ui-timer-CXng51v5.js → vue-ui-timer-qFNHDcU_.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-Cy1U3hO1.js → vue-ui-tiremarks-DA8fzQHo.js} +6 -6
  83. package/dist/{vue-ui-treemap-BsvIvRmE.js → vue-ui-treemap-DGC9zxon.js} +262 -256
  84. package/dist/{vue-ui-vertical-bar-DHqWeDIf.js → vue-ui-vertical-bar-DOCeCCqz.js} +297 -298
  85. package/dist/{vue-ui-waffle-D1Mscj3N.js → vue-ui-waffle-DD9jtkcQ.js} +257 -252
  86. package/dist/{vue-ui-wheel-DpV-N5tF.js → vue-ui-wheel-87VStrfJ.js} +6 -6
  87. package/dist/vue-ui-word-cloud-CCMfa9H1.js +817 -0
  88. package/dist/{vue-ui-world-DYz6zw3x.js → vue-ui-world-Cm3Hn1-2.js} +257 -252
  89. package/dist/{vue-ui-xy-B1nqNbzw.js → vue-ui-xy-C2SnbN6w.js} +1453 -1447
  90. package/dist/{vue-ui-xy-canvas-D4wd-Asd.js → vue-ui-xy-canvas-WxSJqoiF.js} +235 -229
  91. package/package.json +1 -1
  92. package/dist/pdf-Dd-LIJqz.js +0 -61
  93. package/dist/vue-ui-dashboard-DmiriAK7.js +0 -325
  94. package/dist/vue-ui-word-cloud-MaNQ3Kdk.js +0 -811
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "3.1.0",
4
+ "version": "3.1.2",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [
@@ -1,61 +0,0 @@
1
- import { d as r } from "./dom-to-png-BhciAKaM.js";
2
- async function x({
3
- domElement: i,
4
- fileName: y,
5
- scale: a = 2,
6
- orientation: P = "auto",
7
- // 'auto' | 'portrait' | 'landscape'
8
- overflowTolerance: F = 0.2
9
- // up to +n% height overflow gets squeezed onto 1 page
10
- }) {
11
- if (!i) return Promise.reject("No domElement provided");
12
- const W = typeof navigator < "u" && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
13
- let p;
14
- try {
15
- p = (await import("jspdf")).default;
16
- } catch {
17
- return Promise.reject("jspdf is not installed. Run npm install jspdf");
18
- }
19
- const j = { width: 595.28, height: 841.89 }, v = { width: 841.89, height: 595.28 };
20
- if (W)
21
- try {
22
- await r({ container: i, scale: a }), await r({ container: i, scale: a }), await r({ container: i, scale: a }), await r({ container: i, scale: a });
23
- } catch {
24
- }
25
- const c = await r({ container: i, scale: a });
26
- return await new Promise((d, D) => {
27
- const e = new window.Image();
28
- e.onload = function() {
29
- const g = e.naturalWidth, o = e.naturalHeight, A = P === "auto" ? o >= g ? "p" : "l" : P, t = A === "l" ? v : j, s = t.width / g, N = t.height / o, S = o * s;
30
- let H = "single", n;
31
- S <= t.height + 0.5 ? n = s : S <= t.height * (1 + F) ? n = Math.min(s, N) : (H = "multi", n = s);
32
- const f = g * n, l = o * n, T = (t.width - f) / 2, h = new p({
33
- orientation: A,
34
- unit: "pt",
35
- format: "a4"
36
- });
37
- if (H === "single") {
38
- const w = (t.height - l) / 2;
39
- h.addImage(c, "PNG", T, w, f, l, "", "FAST");
40
- } else {
41
- const w = t.height / n;
42
- let u = o, I = 0;
43
- for (; u > 0.5; )
44
- h.addImage(
45
- c,
46
- "PNG",
47
- T,
48
- I,
49
- f,
50
- l,
51
- "",
52
- "FAST"
53
- ), u -= w, I -= t.height, u > 0.5 && h.addPage();
54
- }
55
- h.save(`${y}.pdf`), d();
56
- }, e.onerror = (m) => D("Failed to load image for PDF: " + m), e.src = c;
57
- });
58
- }
59
- export {
60
- x as default
61
- };
@@ -1,325 +0,0 @@
1
- import { useCssVars as ae, computed as V, defineAsyncComponent as o, ref as r, watch as ie, createElementBlock as y, openBlock as g, createCommentVNode as N, createElementVNode as b, normalizeStyle as S, createStaticVNode as ne, Fragment as W, renderList as le, normalizeClass as re, renderSlot as z, createBlock as se, resolveDynamicComponent as de, mergeProps as ce } from "vue";
2
- import he from "./pdf-Dd-LIJqz.js";
3
- import { u as ve } from "./useNestedProp-BPEHGiYX.js";
4
- import { u as pe, c as fe } from "./index-CDQbCd41.js";
5
- import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- const ge = {
7
- key: 0,
8
- "data-dom-to-png-ignore": "",
9
- style: { width: "100%", display: "flex", "justify-content": "end" }
10
- }, be = ["disabled"], Ue = ["stroke"], Ve = { key: 1 }, ye = ["id"], we = ["onMousedown", "onTouchstart"], ke = ["onMousedown", "onTouchstart"], Te = ["onMousedown", "onTouchstart"], Me = ["onMousedown", "onTouchstart"], Ce = ["onMousedown", "onTouchstart"], $ = 1, _e = {
11
- __name: "vue-ui-dashboard",
12
- props: {
13
- dataset: Array,
14
- config: Object
15
- },
16
- emits: ["change"],
17
- setup(R, { expose: B, emit: E }) {
18
- ae((e) => ({
19
- "56f02d00": J.value,
20
- "2fbe8dda": Z.value
21
- }));
22
- const L = {
23
- VueDataUi: o(() => import("./vue-data-ui-DcNYz3cZ.js")),
24
- VueUi3dBar: o(() => import("./vue-ui-3d-bar-BNIFAeN-.js")),
25
- VueUiAccordion: o(() => import("./vue-ui-accordion-Bf_LHFFX.js")),
26
- VueUiAgePyramid: o(() => import("./vue-ui-age-pyramid-Bz-l1afR.js")),
27
- VueUiAnnotator: o(() => import("./vue-ui-annotator-BcfRH2BF.js")),
28
- VueUiCandlestick: o(() => import("./vue-ui-candlestick-D6mMjvtu.js")),
29
- VueUiChestnut: o(() => import("./vue-ui-chestnut-BKc4v-lf.js")),
30
- VueUiDigits: o(() => import("./vue-ui-digits-CLAIo9gW.js")),
31
- VueUiDonut: o(() => import("./vue-ui-donut-C8h_tCSO.js")),
32
- VueUiDonutEvolution: o(() => import("./vue-ui-donut-evolution-C3r0YhKz.js")),
33
- VueUiDumbbell: o(() => import("./vue-ui-dumbbell-D-t4M00E.js")),
34
- VueUiFlow: o(() => import("./vue-ui-flow-D7_D_UNm.js")),
35
- VueUiGalaxy: o(() => import("./vue-ui-galaxy-Ccw5uNes.js")),
36
- VueUiGauge: o(() => import("./vue-ui-gauge-DvW7nFmK.js")),
37
- VueUiHeatmap: o(() => import("./vue-ui-heatmap-BQkLujyp.js")),
38
- VueUiKpi: o(() => import("./vue-ui-kpi-CKg2i71M.js")),
39
- VueUiMiniLoader: o(() => import("./vue-ui-mini-loader-BmkGQsm_.js")),
40
- VueUiMolecule: o(() => import("./vue-ui-molecule-Dlu0hjSg.js")),
41
- VueUiMoodRadar: o(() => import("./vue-ui-mood-radar-DQaxfw9R.js")),
42
- VueUiNestedDonuts: o(() => import("./vue-ui-nested-donuts-Djj9Aw_i.js")),
43
- VueUiOnion: o(() => import("./vue-ui-onion-ZgsErXis.js")),
44
- VueUiParallelCoordinatePlot: o(() => import("./vue-ui-parallel-coordinate-plot-B5fB22Jc.js")),
45
- VueUiQuadrant: o(() => import("./vue-ui-quadrant-CMevCtXH.js")),
46
- VueUiQuickChart: o(() => import("./vue-ui-quick-chart-DcparKSX.js")),
47
- VueUiRadar: o(() => import("./vue-ui-radar-DFbxoKCK.js")),
48
- VueUiRating: o(() => import("./vue-ui-rating-ZUpxCWrk.js")),
49
- VueUiRelationCircle: o(() => import("./vue-ui-relation-circle-eNKJY4Sx.js")),
50
- VueUiRings: o(() => import("./vue-ui-rings-TdTHMbsa.js")),
51
- VueUiScatter: o(() => import("./vue-ui-scatter-CVuV9ljU.js")),
52
- VueUiSkeleton: o(() => import("./vue-ui-skeleton-CFxBU2-p.js")),
53
- VueUiSmiley: o(() => import("./vue-ui-smiley-Har3B3aQ.js")),
54
- VueUiSparkHistogram: o(() => import("./vue-ui-sparkhistogram-DJsgFwHs.js")),
55
- VueUiSparkStackbar: o(() => import("./vue-ui-sparkstackbar-B0Pl7VMI.js")),
56
- VueUiSparkTrend: o(() => import("./vue-ui-spark-trend-FPk-XEwI.js")),
57
- VueUiSparkbar: o(() => import("./vue-ui-sparkbar-V3eJ0w0t.js")),
58
- VueUiSparkgauge: o(() => import("./vue-ui-sparkgauge-DKTGkWnJ.js")),
59
- VueUiSparkline: o(() => import("./vue-ui-sparkline-Dmrm5SL5.js")),
60
- VueUiStripPlot: o(() => import("./vue-ui-strip-plot-CYAWwYOM.js")),
61
- VueUiTable: o(() => import("./vue-ui-table-Dn6H98rP.js")),
62
- VueUiTableHeatmap: o(() => import("./vue-ui-table-heatmap-COI9LRqC.js")),
63
- VueUiTableSparkline: o(() => import("./vue-ui-table-sparkline-B7Gg5FfJ.js")),
64
- VueUiThermometer: o(() => import("./vue-ui-thermometer-Bgynq5El.js")),
65
- VueUiTimer: o(() => import("./vue-ui-timer-CXng51v5.js")),
66
- VueUiTiremarks: o(() => import("./vue-ui-tiremarks-Cy1U3hO1.js")),
67
- VueUiTreemap: o(() => import("./vue-ui-treemap-BsvIvRmE.js")),
68
- VueUiVerticalBar: o(() => import("./vue-ui-vertical-bar-DHqWeDIf.js")),
69
- VueUiWaffle: o(() => import("./vue-ui-waffle-D1Mscj3N.js")),
70
- VueUiWheel: o(() => import("./vue-ui-wheel-DpV-N5tF.js")),
71
- VueUiWordCloud: o(() => import("./vue-ui-word-cloud-MaNQ3Kdk.js")),
72
- VueUiXy: o(() => import("./vue-ui-xy-B1nqNbzw.js")),
73
- VueUiXyCanvas: o(() => import("./vue-ui-xy-canvas-D4wd-Asd.js")),
74
- VueUiCarouselTable: o(() => import("./vue-ui-carousel-table-Vp5f238W.js")),
75
- VueUiGizmo: o(() => import("./vue-ui-gizmo-WGQxvGPy.js")),
76
- VueUiStackbar: o(() => import("./vue-ui-stackbar-CNsgBPhj.js")),
77
- VueUiBullet: o(() => import("./vue-ui-bullet-DK1aM9fX.js")),
78
- VueUiFunnel: o(() => import("./vue-ui-funnel-B0QOfZRz.js")),
79
- VueUiHistoryPlot: o(() => import("./vue-ui-history-plot-eU33r_Ot.js")),
80
- VueUiCirclePack: o(() => import("./vue-ui-circle-pack-D6zLgxa3.js")),
81
- VueUiWorld: o(() => import("./vue-ui-world-DYz6zw3x.js"))
82
- }, { vue_ui_dashboard: F } = pe(), D = R, s = V(() => ve({
83
- userConfig: D.config,
84
- defaultConfig: F
85
- })), P = r(fe()), h = r(s.value.locked);
86
- function A() {
87
- h.value = !h.value;
88
- }
89
- const l = r(D.dataset.map((e, t) => ({
90
- ...e,
91
- index: t
92
- }))), X = V(
93
- () => l.value.map((e) => ({
94
- ...e,
95
- resolvedComponent: typeof e.component == "string" ? L[e.component] : e.component
96
- }))
97
- ), v = r(null), n = r(null), p = r({ x: 0, y: 0 }), f = r({ x: 0, y: 0 }), d = r(null), c = r(!1), m = r(null), T = r(!1), w = r(!1);
98
- function x(e) {
99
- const t = e.target;
100
- (t.tagName === "INPUT" && t.type === "range" || t.classList.contains("range-handle")) && (w.value = !0);
101
- }
102
- function H(e) {
103
- const t = e.target;
104
- t.tagName === "INPUT" && t.type === "range" && (w.value = !1);
105
- }
106
- function I() {
107
- T.value = !0, he({
108
- domElement: document.getElementById(`vue-ui-dashboard_${P.value}`),
109
- fileName: "vue-ui-dashboard"
110
- }).finally(() => {
111
- T.value = !1;
112
- });
113
- }
114
- function G(e) {
115
- if (!h.value && (c.value = !0, m.value = e, n.value === null)) {
116
- v.value = e, p.value = { x: event.clientX, y: event.clientY };
117
- const t = l.value[e], a = 100 - t.width, u = 100 - t.height;
118
- t.left < 0 && (t.left = 0), t.top < 0 && (t.top = 0), t.left > a && (t.left = a), t.top > u && (t.top = u), t.left < 0 && (t.left = 0), t.top < 0 && (t.top = 0), t.left + t.width > 100 && (t.left = 100 - t.width), t.top + t.height > 100 && (t.top = 100 - t.height);
119
- }
120
- }
121
- function M(e, t) {
122
- c.value = !0, m.value = e, n.value = { index: e, direction: t };
123
- const a = l.value[e];
124
- f.value = { x: event.clientX, y: event.clientY, initialWidth: a.width, initialHeight: a.height };
125
- }
126
- function Y(e, t, a) {
127
- if (n.value.direction.includes("top")) {
128
- const u = e.height - a / d.value.offsetHeight * 100;
129
- u >= $ && (e.top += a / d.value.offsetHeight * 100, e.height = u);
130
- }
131
- if (n.value.direction.includes("bottom")) {
132
- const u = e.height + a / d.value.offsetHeight * 100;
133
- u >= $ && (e.height = u);
134
- }
135
- if (n.value.direction.includes("left")) {
136
- const u = e.width - t / d.value.offsetWidth * 100;
137
- u >= $ && (e.left += t / d.value.offsetWidth * 100, e.width = u);
138
- }
139
- if (n.value.direction.includes("right")) {
140
- const u = e.width + t / d.value.offsetWidth * 100;
141
- u >= $ && (e.width = u);
142
- }
143
- }
144
- function O(e) {
145
- if (!(h.value || w.value)) {
146
- if (c.value = !0, v.value !== null) {
147
- const t = l.value[v.value], a = e.clientX - p.value.x, u = e.clientY - p.value.y, i = t.left + a / d.value.offsetWidth * 100, U = t.top + u / d.value.offsetHeight * 100;
148
- i >= 0 && U >= 0 && i + t.width <= 100 && U + t.height <= 100 && (t.left = i, t.top = U), p.value = { x: e.clientX, y: e.clientY };
149
- }
150
- if (n.value !== null) {
151
- const t = l.value[n.value.index], a = e.clientX - f.value.x, u = e.clientY - f.value.y;
152
- Y(t, a, u), f.value = { x: e.clientX, y: e.clientY };
153
- }
154
- }
155
- }
156
- const j = E;
157
- ie(
158
- l,
159
- (e) => {
160
- e && !c.value && j("change", l.value);
161
- },
162
- { deep: !0 }
163
- );
164
- function Q() {
165
- v.value = null, n.value = null, c.value = !1, m.value = null, l.value.forEach((e) => {
166
- e.left = Math.round(e.left / 100 * 100), e.top = Math.round(e.top / 100 * 100), e.width = Math.round(e.width / 100 * 100), e.height = Math.round(e.height / 100 * 100);
167
- });
168
- }
169
- function K(e) {
170
- h.value || w.value || (c.value = !0, m.value = e, n.value === null && (v.value = e, p.value = { x: event.touches[0].clientX, y: event.touches[0].clientY }));
171
- }
172
- function C(e, t, a) {
173
- if (c.value = !0, m.value = e, n.value === null) {
174
- n.value = { index: e, direction: t };
175
- const u = l.value[e];
176
- f.value = { x: a.touches[0].clientX, y: a.touches[0].clientY, initialWidth: u.width, initialHeight: u.height };
177
- }
178
- }
179
- function _(e) {
180
- if (c.value = !0, e.preventDefault(), n.value !== null) {
181
- const t = l.value[n.value.index], a = e.touches[0].clientX - f.value.x, u = e.touches[0].clientY - f.value.y;
182
- Y(t, a, u), f.value = { x: e.touches[0].clientX, y: e.touches[0].clientY };
183
- }
184
- }
185
- function q(e) {
186
- if (!(h.value || w.value) && (c.value = !0, e.preventDefault(), v.value !== null)) {
187
- const t = l.value[v.value], a = e.touches[0].clientX - p.value.x, u = e.touches[0].clientY - p.value.y, i = t.left + a / d.value.offsetWidth * 100, U = t.top + u / d.value.offsetHeight * 100;
188
- i >= 0 && U >= 0 && i + t.width <= 100 && U + t.height <= 100 && (t.left = i, t.top = U), p.value = { x: e.touches[0].clientX, y: e.touches[0].clientY };
189
- }
190
- }
191
- function k() {
192
- c.value = !1, m.value = null, v.value = null, n.value = null, l.value.forEach((e) => {
193
- e.left = Math.round(e.left / 100 * 100), e.top = Math.round(e.top / 100 * 100), e.width = Math.round(e.width / 100 * 100), e.height = Math.round(e.height / 100 * 100);
194
- });
195
- }
196
- const J = V(() => s.value.style.item.borderColor), Z = V(() => s.value.style.resizeHandles.backgroundColor), ee = V(() => s.value.style.board.aspectRatio), te = V(() => s.value.style.board.backgroundColor), oe = V(() => s.value.style.board.border);
197
- function ue() {
198
- return l.value;
199
- }
200
- return B({
201
- generatePdf: I,
202
- getItemsPositions: ue,
203
- toggleLock: A
204
- }), (e, t) => (g(), y("div", {
205
- onMousedown: x,
206
- onMouseup: H,
207
- onTouchstart: x,
208
- onTouchend: H
209
- }, [
210
- s.value.allowPrint ? (g(), y("div", ge, [
211
- b("button", {
212
- class: "vue-ui-dashboard-button",
213
- onClick: I,
214
- disabled: T.value,
215
- style: S([{ "margin-top": "12px" }, `color:${s.value.style.board.color}`])
216
- }, [
217
- T.value ? (g(), y("svg", {
218
- key: 0,
219
- class: "vue-ui-dashboard-print-icon",
220
- xmlns: "http://www.w3.org/2000/svg",
221
- width: "20",
222
- height: "20",
223
- viewBox: "0 0 24 24",
224
- "stroke-width": "1.5",
225
- stroke: s.value.style.board.color,
226
- fill: "none",
227
- "stroke-linecap": "round",
228
- "stroke-linejoin": "round"
229
- }, [...t[4] || (t[4] = [
230
- ne('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-f5946722></path><path d="M18 16v.01" data-v-f5946722></path><path d="M6 16v.01" data-v-f5946722></path><path d="M12 5v.01" data-v-f5946722></path><path d="M12 12v.01" data-v-f5946722></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-f5946722></path>', 6)
231
- ])], 8, Ue)) : (g(), y("span", Ve, "PDF"))
232
- ], 12, be)
233
- ])) : N("", !0),
234
- b("div", {
235
- class: "vue-ui-dashboard-container",
236
- ref_key: "dashboardContainer",
237
- ref: d,
238
- id: `vue-ui-dashboard_${P.value}`,
239
- style: S(`border:${oe.value}; background:${te.value}; aspect-ratio:${ee.value}`)
240
- }, [
241
- b("div", {
242
- class: "vue-ui-dashboard-grid-container",
243
- ref: "container",
244
- onMousemove: O,
245
- onMouseup: Q,
246
- onTouchmove: q,
247
- onTouchend: k,
248
- style: S(`background:${s.value.style.board.backgroundColor}`)
249
- }, [
250
- t[5] || (t[5] = b("div", { class: "vue-ui-dashboard-grid" }, null, -1)),
251
- (g(!0), y(W, null, le(X.value, (a, u) => (g(), y("div", {
252
- key: a.id,
253
- class: re({ "vue-ui-dashboard-grid-item": !0, "vue-ui-dashboard-grid-item--locked": h.value }),
254
- style: S({
255
- width: `${a.width}%`,
256
- height: `${a.height}%`,
257
- left: `${a.left}%`,
258
- top: `${a.top}%`,
259
- cursor: "move",
260
- boxShadow: m.value === u ? "0 6px 12px -3px rgba(0,0,0,0.3)" : "",
261
- zIndex: m.value === u ? X.value.length + 1 : a.index,
262
- backgroundColor: s.value.style.item.backgroundColor
263
- }),
264
- onMousedown: (i) => G(u),
265
- onTouchstart: (i) => K(u)
266
- }, [
267
- h.value ? N("", !0) : (g(), y(W, { key: 0 }, [
268
- b("div", {
269
- class: "vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",
270
- onMousedown: (i) => M(u, "top-left"),
271
- onTouchstart: (i) => C(u, "top-left", i),
272
- onTouchmove: t[0] || (t[0] = (i) => _(i)),
273
- onTouchend: k
274
- }, null, 40, ke),
275
- b("div", {
276
- class: "vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",
277
- onMousedown: (i) => M(u, "top-right"),
278
- onTouchstart: (i) => C(u, "top-right", i),
279
- onTouchmove: t[1] || (t[1] = (i) => _(i)),
280
- onTouchend: k
281
- }, null, 40, Te),
282
- b("div", {
283
- class: "vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",
284
- onMousedown: (i) => M(u, "bottom-left"),
285
- onTouchstart: (i) => C(u, "bottom-left", i),
286
- onTouchmove: t[2] || (t[2] = (i) => _(i)),
287
- onTouchend: k
288
- }, null, 40, Me),
289
- b("div", {
290
- class: "vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",
291
- onMousedown: (i) => M(u, "bottom-right"),
292
- onTouchstart: (i) => C(u, "bottom-right", i),
293
- onTouchmove: t[3] || (t[3] = (i) => _(i)),
294
- onTouchend: k
295
- }, null, 40, Ce)
296
- ], 64)),
297
- z(e.$slots, "top", {
298
- item: a,
299
- index: u
300
- }, void 0, !0),
301
- a.resolvedComponent ? (g(), se(de(a.resolvedComponent), ce({
302
- key: 1,
303
- ref_for: !0
304
- }, a.props), null, 16)) : z(e.$slots, "content", {
305
- key: 2,
306
- item: a,
307
- index: u,
308
- left: a.left,
309
- top: a.top,
310
- height: a.height,
311
- width: a.width
312
- }, void 0, !0),
313
- z(e.$slots, "bottom", {
314
- item: a,
315
- index: u
316
- }, void 0, !0)
317
- ], 46, we))), 128))
318
- ], 36)
319
- ], 12, ye)
320
- ], 32));
321
- }
322
- }, Xe = /* @__PURE__ */ me(_e, [["__scopeId", "data-v-f5946722"]]);
323
- export {
324
- Xe as default
325
- };