vue-data-ui 2.3.3 → 2.3.5

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 (154) hide show
  1. package/README.md +19 -15
  2. package/dist/Arrow-BSOdhAJO.cjs +1 -0
  3. package/dist/Arrow-BjDVSrfA.js +101 -0
  4. package/dist/BaseIcon-BoKtpbrI.cjs +1 -0
  5. package/dist/BaseIcon-vmmfWlyR.js +174 -0
  6. package/dist/DataTable-CaB7GIwQ.js +127 -0
  7. package/dist/DataTable-ssrNbONo.cjs +1 -0
  8. package/dist/Legend-DHpoRTAE.js +62 -0
  9. package/dist/Legend-Dl5IYoxK.cjs +1 -0
  10. package/dist/Shape-CQT4S7N-.js +107 -0
  11. package/dist/Shape-CaF4pvOn.cjs +1 -0
  12. package/dist/Slicer-Bdb1BlrC.js +156 -0
  13. package/dist/Slicer-QC8nTm24.cjs +1 -0
  14. package/dist/Title-BNPZwnkp.js +46 -0
  15. package/dist/Title-Cj_xubjI.cjs +1 -0
  16. package/dist/Tooltip-CdJ5hegk.cjs +1 -0
  17. package/dist/Tooltip-ZnJAz6dl.js +94 -0
  18. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  19. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  20. package/dist/documentation/installation.md +14 -13
  21. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  22. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  23. package/dist/index-BMCvLyab.js +10369 -0
  24. package/dist/index-BkomIE9L.cjs +4 -0
  25. package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
  26. package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
  27. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  28. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  29. package/dist/pdf-97UbtKC2.js +44 -0
  30. package/dist/pdf-Cz3729tZ.cjs +1 -0
  31. package/dist/style.css +1 -1
  32. package/dist/types/vue-data-ui.d.cts +105 -5
  33. package/dist/types/vue-data-ui.d.ts +105 -5
  34. package/dist/useNestedProp-BMxXyPbW.cjs +1 -0
  35. package/dist/useNestedProp-CkP8xhG_.js +13 -0
  36. package/dist/usePrinter-BuuBz5JR.js +513 -0
  37. package/dist/usePrinter-r6uHYEcR.cjs +1 -0
  38. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  39. package/dist/useResponsive-NZB-WLRF.js +187 -0
  40. package/dist/vue-data-ui-Bc5U1cOP.cjs +9 -0
  41. package/dist/vue-data-ui-DxeO0iaC.js +254 -0
  42. package/dist/vue-data-ui.cjs +1 -1
  43. package/dist/vue-data-ui.js +61 -59
  44. package/dist/vue-ui-3d-bar-32wM0tiX.js +1085 -0
  45. package/dist/vue-ui-3d-bar-CgB0fLQT.cjs +19 -0
  46. package/dist/vue-ui-accordion-CLlVxx3Q.js +77 -0
  47. package/dist/vue-ui-accordion-SXsobrUt.cjs +1 -0
  48. package/dist/vue-ui-age-pyramid-D_CY99xF.js +596 -0
  49. package/dist/vue-ui-age-pyramid-DqiwcOIr.cjs +1 -0
  50. package/dist/vue-ui-annotator-DvP-IxDm.js +2177 -0
  51. package/dist/vue-ui-annotator-mntqd3q_.cjs +371 -0
  52. package/dist/vue-ui-candlestick-C-5u3i-1.js +657 -0
  53. package/dist/vue-ui-candlestick-C_TvUQvH.cjs +2 -0
  54. package/dist/vue-ui-carousel-table-BCePqkuz.cjs +1 -0
  55. package/dist/vue-ui-carousel-table-CAqhsLVx.js +304 -0
  56. package/dist/vue-ui-chestnut-DhWlw2MD.cjs +6 -0
  57. package/dist/vue-ui-chestnut-DylSfYMB.js +1051 -0
  58. package/dist/vue-ui-cursor-B04HJQVl.cjs +1 -0
  59. package/dist/vue-ui-cursor-DTYEMgbU.js +229 -0
  60. package/dist/vue-ui-dashboard-Bd0-cmSZ.js +232 -0
  61. package/dist/vue-ui-dashboard-DFIYwP1s.cjs +1 -0
  62. package/dist/vue-ui-digits-CW5qNMIk.js +153 -0
  63. package/dist/vue-ui-digits-Ced5mBJZ.cjs +1 -0
  64. package/dist/vue-ui-donut-DIhhgvWp.cjs +1 -0
  65. package/dist/vue-ui-donut-EeVmrVJs.js +743 -0
  66. package/dist/vue-ui-donut-evolution-BN08Y2hy.js +799 -0
  67. package/dist/vue-ui-donut-evolution-Ct6KAzs-.cjs +1 -0
  68. package/dist/vue-ui-dumbbell-BMlxS1Nq.js +624 -0
  69. package/dist/vue-ui-dumbbell-pextarqH.cjs +9 -0
  70. package/dist/vue-ui-flow-BXVsbmyb.cjs +1 -0
  71. package/dist/vue-ui-flow-CHmkgfyb.js +454 -0
  72. package/dist/vue-ui-galaxy-D4xyd-J1.cjs +1 -0
  73. package/dist/vue-ui-galaxy-kiVOZOBz.js +485 -0
  74. package/dist/vue-ui-gauge-BcO-z97J.js +466 -0
  75. package/dist/vue-ui-gauge-DPFBsbFj.cjs +1 -0
  76. package/dist/vue-ui-heatmap-DBOKYaJz.cjs +1 -0
  77. package/dist/vue-ui-heatmap-DD-Bzddj.js +598 -0
  78. package/dist/vue-ui-kpi-BEgf5yDv.cjs +1 -0
  79. package/dist/vue-ui-kpi-BS0o7zb9.js +54 -0
  80. package/dist/vue-ui-mini-loader-Bm5EJxtG.cjs +1 -0
  81. package/dist/vue-ui-mini-loader-DJEvG6ju.js +131 -0
  82. package/dist/vue-ui-molecule-DdwnFEBJ.js +750 -0
  83. package/dist/vue-ui-molecule-DzUqcaxd.cjs +1 -0
  84. package/dist/vue-ui-mood-radar-B9Gczs_Z.js +548 -0
  85. package/dist/vue-ui-mood-radar-DbB7m4Ku.cjs +1 -0
  86. package/dist/vue-ui-nested-donuts-BSINf8hd.cjs +16 -0
  87. package/dist/vue-ui-nested-donuts-CVQ1CaXo.js +771 -0
  88. package/dist/vue-ui-onion-D3-6Tv4u.cjs +1 -0
  89. package/dist/vue-ui-onion-Ut75t7hB.js +554 -0
  90. package/dist/vue-ui-parallel-coordinate-plot-Bjo09ZTX.js +651 -0
  91. package/dist/vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs +8 -0
  92. package/dist/vue-ui-quadrant-CzCvejGn.cjs +1 -0
  93. package/dist/vue-ui-quadrant-Du9PKvlO.js +1178 -0
  94. package/dist/vue-ui-quick-chart-BsxsPbjz.cjs +13 -0
  95. package/dist/vue-ui-quick-chart-u0cPmD3q.js +1310 -0
  96. package/dist/vue-ui-radar-CBrpuE5r.js +614 -0
  97. package/dist/vue-ui-radar-DIpCrj1h.cjs +1 -0
  98. package/dist/vue-ui-rating-CaeGGlCw.js +271 -0
  99. package/dist/vue-ui-rating-D8fJC8Yt.cjs +1 -0
  100. package/dist/vue-ui-relation-circle-5DNf880s.js +304 -0
  101. package/dist/vue-ui-relation-circle-Ky3nPk6S.cjs +1 -0
  102. package/dist/vue-ui-rings-CffZ4T2S.cjs +1 -0
  103. package/dist/vue-ui-rings-IE3IdNRF.js +510 -0
  104. package/dist/vue-ui-scatter-C4GCZm0V.js +874 -0
  105. package/dist/vue-ui-scatter-TsX5dW9l.cjs +1 -0
  106. package/dist/vue-ui-screenshot-Bl3oooKI.js +160 -0
  107. package/dist/vue-ui-screenshot-Bzpg6yof.cjs +3 -0
  108. package/dist/vue-ui-skeleton-BisWX1sO.js +2064 -0
  109. package/dist/vue-ui-skeleton-JmGp11-u.cjs +41 -0
  110. package/dist/vue-ui-smiley-BhSrt9f-.cjs +2 -0
  111. package/dist/vue-ui-smiley-Sth2pqG1.js +763 -0
  112. package/dist/vue-ui-spark-trend-C8NSz4l8.cjs +1 -0
  113. package/dist/vue-ui-spark-trend-DAqO0TW2.js +246 -0
  114. package/dist/vue-ui-sparkbar-B0zX7NU7.js +242 -0
  115. package/dist/vue-ui-sparkbar-hL1Q6ObK.cjs +1 -0
  116. package/dist/vue-ui-sparkgauge-CWR8zJnU.js +157 -0
  117. package/dist/vue-ui-sparkgauge-tbVqaLCK.cjs +1 -0
  118. package/dist/vue-ui-sparkhistogram-Dv-lml4g.cjs +1 -0
  119. package/dist/vue-ui-sparkhistogram-DxqCtDpw.js +244 -0
  120. package/dist/vue-ui-sparkline-B6pvaBY_.cjs +1 -0
  121. package/dist/vue-ui-sparkline-BpL1jn7F.js +333 -0
  122. package/dist/vue-ui-sparkstackbar-BzbuBNIV.js +244 -0
  123. package/dist/vue-ui-sparkstackbar-CQ2TEi4p.cjs +1 -0
  124. package/dist/vue-ui-strip-plot-DCC6F4VM.cjs +1 -0
  125. package/dist/vue-ui-strip-plot-DCcbD6UE.js +618 -0
  126. package/dist/vue-ui-table-CFqIWfxl.js +1430 -0
  127. package/dist/vue-ui-table-CseaFWgX.cjs +14 -0
  128. package/dist/vue-ui-table-heatmap-Bwut-V1D.cjs +1 -0
  129. package/dist/vue-ui-table-heatmap-Bz8KYDxr.js +237 -0
  130. package/dist/vue-ui-table-sparkline-CJBU3y8-.cjs +1 -0
  131. package/dist/vue-ui-table-sparkline-z29ND2lq.js +420 -0
  132. package/dist/vue-ui-thermometer-BNAITzJa.js +385 -0
  133. package/dist/vue-ui-thermometer-DM2IKhqN.cjs +1 -0
  134. package/dist/vue-ui-timer-DLfXuW8T.cjs +64 -0
  135. package/dist/vue-ui-timer-DV6lQVHU.js +453 -0
  136. package/dist/vue-ui-tiremarks-B1bd1jPf.cjs +1 -0
  137. package/dist/vue-ui-tiremarks-WyQPg7yo.js +249 -0
  138. package/dist/vue-ui-treemap-BZGmoDHb.cjs +1 -0
  139. package/dist/vue-ui-treemap-DKmBhzV-.js +722 -0
  140. package/dist/vue-ui-vertical-bar-Bi-0rRN3.cjs +4 -0
  141. package/dist/vue-ui-vertical-bar-C-ySfrhJ.js +737 -0
  142. package/dist/vue-ui-waffle-CGRWu-da.js +638 -0
  143. package/dist/vue-ui-waffle-VLYkR-YZ.cjs +1 -0
  144. package/dist/vue-ui-wheel-D2q5vy5V.cjs +1 -0
  145. package/dist/vue-ui-wheel-Pj9OPk9f.js +227 -0
  146. package/dist/vue-ui-word-cloud-8Vr-jo1p.js +346 -0
  147. package/dist/vue-ui-word-cloud-Ba4BjatU.cjs +1 -0
  148. package/dist/vue-ui-xy-C4QW5Lfl.cjs +3 -0
  149. package/dist/vue-ui-xy-canvas-Be-Da_0x.cjs +9 -0
  150. package/dist/vue-ui-xy-canvas-DnLWrf0e.js +1006 -0
  151. package/dist/vue-ui-xy-qToggEfh.js +2064 -0
  152. package/package.json +1 -1
  153. package/dist/index-BcMihqI4.cjs +0 -843
  154. package/dist/index-C7FeCQ7K.js +0 -57303
@@ -0,0 +1,127 @@
1
+ import { useCssVars as S, unref as e, computed as V, ref as k, onMounted as A, openBlock as l, createElementBlock as n, normalizeClass as w, createElementVNode as r, normalizeStyle as i, withKeys as E, createVNode as C, toDisplayString as R, Fragment as p, renderList as v, createCommentVNode as N, renderSlot as $ } from "vue";
2
+ import { _ as I } from "./Shape-CQT4S7N-.js";
3
+ import K from "./BaseIcon-vmmfWlyR.js";
4
+ import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const T = { class: "vue-ui-data-table" }, j = { style: { display: "flex", "align-items": "center", "justify-content": "flex-end", "padding-right": "3px", gap: "3px" } }, F = {
6
+ key: 0,
7
+ height: "12",
8
+ width: "12",
9
+ viewBox: "0 0 20 20",
10
+ style: { background: "none" }
11
+ }, L = ["fill"], M = ["data-cell"], q = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, G = {
12
+ key: 0,
13
+ height: "12",
14
+ width: "12",
15
+ viewBox: "0 0 20 20",
16
+ style: { background: "none", overflow: "visible" }
17
+ }, H = {
18
+ __name: "DataTable",
19
+ props: {
20
+ colNames: {
21
+ type: Array,
22
+ default() {
23
+ return [];
24
+ }
25
+ },
26
+ head: Array,
27
+ body: Array,
28
+ title: String,
29
+ config: Object
30
+ },
31
+ emits: ["close"],
32
+ setup(t, { emit: g }) {
33
+ const b = t;
34
+ S((s) => ({
35
+ "32d68130": e(_)
36
+ }));
37
+ const { backgroundColor: y, color: h, outline: m } = b.config.th, { backgroundColor: B, color: z, outline: _ } = b.config.td, D = V(() => b.config.breakpoint), f = k(null), x = k(!1);
38
+ return A(() => {
39
+ const s = new ResizeObserver((a) => {
40
+ a.forEach((o) => {
41
+ x.value = o.contentRect.width < D.value;
42
+ });
43
+ });
44
+ f.value && s.observe(f.value);
45
+ }), (s, a) => (l(), n("div", {
46
+ ref_key: "tableContainer",
47
+ ref: f,
48
+ style: { width: "100%", "container-type": "inline-size", position: "relative", "padding-top": "36px", overflow: "auto" },
49
+ class: w({ "vue-ui-responsive": x.value })
50
+ }, [
51
+ r("div", {
52
+ "data-html2canvas-ignore": "",
53
+ role: "button",
54
+ tabindex: "0",
55
+ style: i(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e(y)};`),
56
+ onClick: a[0] || (a[0] = (o) => g("close")),
57
+ onKeypress: a[1] || (a[1] = E((o) => g("close"), ["enter"]))
58
+ }, [
59
+ C(K, {
60
+ name: "close",
61
+ stroke: e(h),
62
+ "stroke-width": 2
63
+ }, null, 8, ["stroke"])
64
+ ], 36),
65
+ r("table", T, [
66
+ r("caption", {
67
+ style: i({ backgroundColor: e(y), color: e(h), outline: e(m) }),
68
+ class: "vue-ui-data-table__caption"
69
+ }, R(t.title), 5),
70
+ r("thead", null, [
71
+ r("tr", {
72
+ role: "row",
73
+ style: i([{ "font-variant-numeric": "tabular-nums" }, { backgroundColor: e(y), color: e(h) }]),
74
+ class: "vue-ui-data-table__thead-row"
75
+ }, [
76
+ (l(!0), n(p, null, v(t.head, (o, c) => (l(), n("th", {
77
+ role: "cell",
78
+ style: i({ outline: e(m) }),
79
+ key: `th_${c}`
80
+ }, [
81
+ r("div", j, [
82
+ o.color ? (l(), n("svg", F, [
83
+ r("circle", {
84
+ cx: "10",
85
+ cy: "10",
86
+ r: "10",
87
+ fill: o.color
88
+ }, null, 8, L)
89
+ ])) : N("", !0),
90
+ $(s.$slots, "th", { th: o }, void 0, !0)
91
+ ])
92
+ ], 4))), 128))
93
+ ], 4)
94
+ ]),
95
+ r("tbody", null, [
96
+ (l(!0), n(p, null, v(t.body, (o, c) => (l(), n("tr", {
97
+ role: "row",
98
+ style: i([{ "font-variant-numeric": "tabular-nums" }, { backgroundColor: e(B), color: e(z) }]),
99
+ class: w({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": c % 2 === 0, "vue-ui-data-table__tbody__row-odd": c % 2 !== 0 })
100
+ }, [
101
+ (l(!0), n(p, null, v(o, (d, u) => (l(), n("td", {
102
+ role: "cell",
103
+ "data-cell": (t.colNames[u] && t.colNames[u].name ? t.colNames[u].name : "") || t.colNames[u] || "",
104
+ style: i({ outline: e(_) }),
105
+ class: "vue-ui-data-table__tbody__td"
106
+ }, [
107
+ r("div", q, [
108
+ d.color ? (l(), n("svg", G, [
109
+ C(I, {
110
+ plot: { x: 10, y: 10 },
111
+ color: d.color,
112
+ radius: 9,
113
+ shape: t.config.shape || d.shape || "circle"
114
+ }, null, 8, ["color", "shape"])
115
+ ])) : N("", !0),
116
+ $(s.$slots, "td", { td: d }, void 0, !0)
117
+ ])
118
+ ], 12, M))), 256))
119
+ ], 6))), 256))
120
+ ])
121
+ ])
122
+ ], 2));
123
+ }
124
+ }, W = /* @__PURE__ */ O(H, [["__scopeId", "data-v-4f23609e"]]);
125
+ export {
126
+ W as D
127
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),v=require("./Shape-CaF4pvOn.cjs"),k=require("./BaseIcon-BoKtpbrI.cjs"),_=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),x={class:"vue-ui-data-table"},B={style:{display:"flex","align-items":"center","justify-content":"flex-end","padding-right":"3px",gap:"3px"}},w={key:0,height:"12",width:"12",viewBox:"0 0 20 20",style:{background:"none"}},E=["fill"],N=["data-cell"],V={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},C={key:0,height:"12",width:"12",viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},S={__name:"DataTable",props:{colNames:{type:Array,default(){return[]}},head:Array,body:Array,title:String,config:Object},emits:["close"],setup(t,{emit:m}){const i=t;e.useCssVars(n=>({"32d68130":e.unref(p)}));const{backgroundColor:s,color:u,outline:f}=i.config.th,{backgroundColor:b,color:g,outline:p}=i.config.td,h=e.computed(()=>i.config.breakpoint),d=e.ref(null),y=e.ref(!1);return e.onMounted(()=>{const n=new ResizeObserver(l=>{l.forEach(o=>{y.value=o.contentRect.width<h.value})});d.value&&n.observe(d.value)}),(n,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:d,style:{width:"100%","container-type":"inline-size",position:"relative","padding-top":"36px",overflow:"auto"},class:e.normalizeClass({"vue-ui-responsive":y.value})},[e.createElementVNode("div",{"data-html2canvas-ignore":"",role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.unref(s)};`),onClick:l[0]||(l[0]=o=>m("close")),onKeypress:l[1]||(l[1]=e.withKeys(o=>m("close"),["enter"]))},[e.createVNode(k.default,{name:"close",stroke:e.unref(u),"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",x,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:e.unref(s),color:e.unref(u),outline:e.unref(f)}),class:"vue-ui-data-table__caption"},e.toDisplayString(t.title),5),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle([{"font-variant-numeric":"tabular-nums"},{backgroundColor:e.unref(s),color:e.unref(u)}]),class:"vue-ui-data-table__thead-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.head,(o,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({outline:e.unref(f)}),key:`th_${r}`},[e.createElementVNode("div",B,[o.color?(e.openBlock(),e.createElementBlock("svg",w,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:o.color},null,8,E)])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"th",{th:o},void 0,!0)])],4))),128))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.body,(o,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle([{"font-variant-numeric":"tabular-nums"},{backgroundColor:e.unref(b),color:e.unref(g)}]),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(a,c)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":(t.colNames[c]&&t.colNames[c].name?t.colNames[c].name:"")||t.colNames[c]||"",style:e.normalizeStyle({outline:e.unref(p)}),class:"vue-ui-data-table__tbody__td"},[e.createElementVNode("div",V,[a.color?(e.openBlock(),e.createElementBlock("svg",C,[e.createVNode(v._sfc_main,{plot:{x:10,y:10},color:a.color,radius:9,shape:t.config.shape||a.shape||"circle"},null,8,["color","shape"])])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"td",{td:a},void 0,!0)])],12,N))),256))],6))),256))])])],2))}},z=_._export_sfc(S,[["__scopeId","data-v-4f23609e"]]);exports.DataTable=z;
@@ -0,0 +1,62 @@
1
+ import { openBlock as n, createElementBlock as o, normalizeStyle as c, renderSlot as l, Fragment as s, renderList as g, createVNode as u, createCommentVNode as m } from "vue";
2
+ import { _ as h } from "./Shape-CQT4S7N-.js";
3
+ import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const y = ["id"], $ = { class: "vue-data-ui-legend-item" }, v = ["onClick", "height", "width"], S = {
5
+ __name: "Legend",
6
+ props: {
7
+ legendSet: {
8
+ type: Array,
9
+ default() {
10
+ return [];
11
+ }
12
+ },
13
+ config: {
14
+ type: Object,
15
+ default() {
16
+ return {};
17
+ }
18
+ },
19
+ id: {
20
+ type: String,
21
+ default: ""
22
+ }
23
+ },
24
+ emits: ["clickMarker"],
25
+ setup(e, { emit: r }) {
26
+ function f(i, d) {
27
+ r("clickMarker", { legend: i, i: d });
28
+ }
29
+ return (i, d) => (n(), o("div", {
30
+ id: e.id,
31
+ class: "vue-data-ui-legend",
32
+ style: c(`background:${e.config.backgroundColor};font-size:${e.config.fontSize}px;color:${e.config.color};padding-bottom:${e.config.paddingBottom}px;padding-top:${e.config.paddingTop || 12}px;font-weight:${e.config.fontWeight}`)
33
+ }, [
34
+ l(i.$slots, "legendTitle", { titleSet: e.legendSet }, void 0, !0),
35
+ (n(!0), o(s, null, g(e.legendSet, (t, a) => (n(), o("div", $, [
36
+ t.shape ? (n(), o("svg", {
37
+ key: 0,
38
+ onClick: (p) => f(t, a),
39
+ height: e.config.fontSize,
40
+ width: e.config.fontSize,
41
+ viewBox: "0 0 20 20",
42
+ style: c(`overflow: visible;opacity:${t.opacity}`)
43
+ }, [
44
+ u(h, {
45
+ shape: t.shape,
46
+ radius: 9,
47
+ stroke: "none",
48
+ plot: { x: 10, y: 10 },
49
+ fill: t.color
50
+ }, null, 8, ["shape", "fill"])
51
+ ], 12, v)) : m("", !0),
52
+ l(i.$slots, "item", {
53
+ legend: t,
54
+ index: a
55
+ }, void 0, !0)
56
+ ]))), 256))
57
+ ], 12, y));
58
+ }
59
+ }, z = /* @__PURE__ */ k(S, [["__scopeId", "data-v-a5a45422"]]);
60
+ export {
61
+ z as L
62
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),d=require("./Shape-CaF4pvOn.cjs"),a=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),u=["id"],s={class:"vue-data-ui-legend-item"},g=["onClick","height","width"],f={__name:"Legend",props:{legendSet:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}},id:{type:String,default:""}},emits:["clickMarker"],setup(t,{emit:l}){function r(o,i){l("clickMarker",{legend:o,i})}return(o,i)=>(e.openBlock(),e.createElementBlock("div",{id:t.id,class:"vue-data-ui-legend",style:e.normalizeStyle(`background:${t.config.backgroundColor};font-size:${t.config.fontSize}px;color:${t.config.color};padding-bottom:${t.config.paddingBottom}px;padding-top:${t.config.paddingTop||12}px;font-weight:${t.config.fontWeight}`)},[e.renderSlot(o.$slots,"legendTitle",{titleSet:t.legendSet},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.legendSet,(n,c)=>(e.openBlock(),e.createElementBlock("div",s,[n.shape?(e.openBlock(),e.createElementBlock("svg",{key:0,onClick:h=>r(n,c),height:t.config.fontSize,width:t.config.fontSize,viewBox:"0 0 20 20",style:e.normalizeStyle(`overflow: visible;opacity:${n.opacity}`)},[e.createVNode(d._sfc_main,{shape:n.shape,radius:9,stroke:"none",plot:{x:10,y:10},fill:n.color},null,8,["shape","fill"])],12,g)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"item",{legend:n,index:c},void 0,!0)]))),256))],12,u))}},k=a._export_sfc(f,[["__scopeId","data-v-a5a45422"]]);exports.Legend=k;
@@ -0,0 +1,107 @@
1
+ import { computed as u, openBlock as l, createElementBlock as i, createCommentVNode as a } from "vue";
2
+ import { O as p, I as f } from "./index-BMCvLyab.js";
3
+ const y = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], c = ["d", "fill", "stroke", "stroke-width"], g = ["points", "fill", "stroke", "stroke-width"], $ = {
4
+ __name: "Shape",
5
+ props: {
6
+ color: String,
7
+ isSelected: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ limit: {
12
+ type: Number,
13
+ default: 3
14
+ },
15
+ plot: Object,
16
+ radius: Number,
17
+ shape: String,
18
+ stroke: String,
19
+ strokeWidth: Number,
20
+ zoom: {
21
+ type: Number,
22
+ default: 1.3
23
+ }
24
+ },
25
+ emits: ["mouseover", "mouseout", "click"],
26
+ setup(e, { emit: n }) {
27
+ const t = e;
28
+ function v(k) {
29
+ return {
30
+ circle: {
31
+ points: 1,
32
+ rotation: 0
33
+ },
34
+ line: {
35
+ points: 2,
36
+ rotation: 0
37
+ },
38
+ triangle: {
39
+ points: 3,
40
+ rotation: 0.52
41
+ },
42
+ square: {
43
+ points: 4,
44
+ rotation: 0.783
45
+ },
46
+ diamond: {
47
+ points: 4,
48
+ rotation: 0
49
+ },
50
+ pentagon: {
51
+ points: 5,
52
+ rotation: 0.95
53
+ },
54
+ hexagon: {
55
+ points: 6,
56
+ rotation: 0
57
+ }
58
+ }[k];
59
+ }
60
+ const s = u(() => v(t.shape)), d = u(() => t.shape !== "star" ? null : p({
61
+ plot: { x: t.plot.x, y: t.plot.y },
62
+ radius: t.radius * (t.isSelected ? t.zoom : 1)
63
+ })), m = u(() => f({
64
+ plot: { x: t.plot.x, y: t.plot.y },
65
+ radius: t.radius * (t.isSelected ? t.zoom : 1),
66
+ sides: s.value.points,
67
+ rotation: s.value.rotation
68
+ }).path);
69
+ return (k, o) => (l(), i("g", null, [
70
+ s.value && s.value.points === 1 ? (l(), i("circle", {
71
+ key: 0,
72
+ cx: e.plot.x,
73
+ cy: e.plot.y,
74
+ r: t.radius * (t.isSelected ? t.zoom : 1),
75
+ fill: e.color,
76
+ stroke: e.stroke,
77
+ "stroke-width": e.strokeWidth,
78
+ onMouseover: o[0] || (o[0] = (r) => n("mouseover")),
79
+ onMouseout: o[1] || (o[1] = (r) => n("mouseout")),
80
+ onClick: o[2] || (o[2] = (r) => n("click"))
81
+ }, null, 40, y)) : a("", !0),
82
+ s.value && s.value.points >= e.limit ? (l(), i("path", {
83
+ key: 1,
84
+ d: m.value,
85
+ fill: e.color,
86
+ stroke: e.stroke,
87
+ "stroke-width": e.strokeWidth,
88
+ onMouseover: o[3] || (o[3] = (r) => n("mouseover")),
89
+ onMouseout: o[4] || (o[4] = (r) => n("mouseout")),
90
+ onClick: o[5] || (o[5] = (r) => n("click"))
91
+ }, null, 40, c)) : a("", !0),
92
+ d.value ? (l(), i("polygon", {
93
+ key: 2,
94
+ points: d.value,
95
+ fill: e.color,
96
+ stroke: e.stroke,
97
+ "stroke-width": e.strokeWidth,
98
+ onMouseover: o[6] || (o[6] = (r) => n("mouseover")),
99
+ onMouseout: o[7] || (o[7] = (r) => n("mouseout")),
100
+ onClick: o[8] || (o[8] = (r) => n("click"))
101
+ }, null, 40, g)) : a("", !0)
102
+ ]));
103
+ }
104
+ };
105
+ export {
106
+ $ as _
107
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),a=require("./index-BkomIE9L.cjs"),c=["cx","cy","r","fill","stroke","stroke-width"],m=["d","fill","stroke","stroke-width"],v=["points","fill","stroke","stroke-width"],p={__name:"Shape",props:{color:String,isSelected:{type:Boolean,default:!1},limit:{type:Number,default:3},plot:Object,radius:Number,shape:String,stroke:String,strokeWidth:Number,zoom:{type:Number,default:1.3}},emits:["mouseover","mouseout","click"],setup(n,{emit:r}){const t=n;function d(u){return{circle:{points:1,rotation:0},line:{points:2,rotation:0},triangle:{points:3,rotation:.52},square:{points:4,rotation:.783},diamond:{points:4,rotation:0},pentagon:{points:5,rotation:.95},hexagon:{points:6,rotation:0}}[u]}const s=e.computed(()=>d(t.shape)),i=e.computed(()=>t.shape!=="star"?null:a.createStar({plot:{x:t.plot.x,y:t.plot.y},radius:t.radius*(t.isSelected?t.zoom:1)})),k=e.computed(()=>a.createPolygonPath({plot:{x:t.plot.x,y:t.plot.y},radius:t.radius*(t.isSelected?t.zoom:1),sides:s.value.points,rotation:s.value.rotation}).path);return(u,o)=>(e.openBlock(),e.createElementBlock("g",null,[s.value&&s.value.points===1?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:n.plot.x,cy:n.plot.y,r:t.radius*(t.isSelected?t.zoom:1),fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:o[0]||(o[0]=l=>r("mouseover")),onMouseout:o[1]||(o[1]=l=>r("mouseout")),onClick:o[2]||(o[2]=l=>r("click"))},null,40,c)):e.createCommentVNode("",!0),s.value&&s.value.points>=n.limit?(e.openBlock(),e.createElementBlock("path",{key:1,d:k.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:o[3]||(o[3]=l=>r("mouseover")),onMouseout:o[4]||(o[4]=l=>r("mouseout")),onClick:o[5]||(o[5]=l=>r("click"))},null,40,m)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("polygon",{key:2,points:i.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:o[6]||(o[6]=l=>r("mouseover")),onMouseout:o[7]||(o[7]=l=>r("mouseout")),onClick:o[8]||(o[8]=l=>r("click"))},null,40,v)):e.createCommentVNode("",!0)]))}};exports._sfc_main=p;
@@ -0,0 +1,156 @@
1
+ import { useCssVars as A, ref as b, computed as i, watch as f, openBlock as d, createElementBlock as c, createElementVNode as o, normalizeStyle as m, toDisplayString as S, createVNode as I, renderSlot as V, createCommentVNode as z, withDirectives as p, vModelText as N, pushScopeId as $, popScopeId as E } from "vue";
2
+ import B from "./BaseIcon-vmmfWlyR.js";
3
+ import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const D = (e) => ($("data-v-d07947ad"), e = e(), E(), e), L = { "data-html2canvas-ignore": "" }, P = { class: "vue-data-ui-slicer-labels" }, U = { key: 0 }, q = { class: "double-range-slider" }, O = /* @__PURE__ */ D(() => /* @__PURE__ */ o("div", { class: "slider-track" }, null, -1)), T = ["min", "max"], j = ["min", "max"], G = {
5
+ __name: "Slicer",
6
+ props: {
7
+ background: {
8
+ type: String,
9
+ default: "#FFFFFF"
10
+ },
11
+ borderColor: {
12
+ type: String,
13
+ default: "#FFFFFF"
14
+ },
15
+ fontSize: {
16
+ type: Number,
17
+ default: 14
18
+ },
19
+ labelLeft: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ labelRight: {
24
+ type: String,
25
+ default: ""
26
+ },
27
+ textColor: {
28
+ type: String,
29
+ default: "#1A1A1A"
30
+ },
31
+ inputColor: {
32
+ type: String,
33
+ default: "#1A1A1A"
34
+ },
35
+ max: {
36
+ type: Number,
37
+ default: 0
38
+ },
39
+ min: {
40
+ type: Number,
41
+ default: 0
42
+ },
43
+ selectColor: {
44
+ type: String,
45
+ default: "#4A4A4A"
46
+ },
47
+ useResetSlot: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ valueStart: {
52
+ type: [Number, String],
53
+ default: 0
54
+ },
55
+ valueEnd: {
56
+ type: [Number, String],
57
+ default: 0
58
+ }
59
+ },
60
+ emits: ["update:start", "update:end", "reset"],
61
+ setup(e, { emit: s }) {
62
+ const t = e;
63
+ A((l) => ({
64
+ "56c736d9": y.value,
65
+ 22868166: C.value,
66
+ "99f84204": x.value,
67
+ "621bff06": e.selectColor,
68
+ "0407e48b": h.value
69
+ }));
70
+ const a = b(t.min), u = b(t.max), g = i(() => {
71
+ const l = t.max - t.min, r = (a.value - t.min) / l * 100, n = (u.value - t.min) / l * 100;
72
+ return {
73
+ left: `${r}%`,
74
+ width: `${n - r}%`,
75
+ background: t.selectColor
76
+ };
77
+ }), y = i(() => t.inputColor), h = i(() => t.background), x = i(() => `${t.selectColor}33`), C = i(() => t.borderColor);
78
+ function v() {
79
+ s("reset");
80
+ }
81
+ function k() {
82
+ Number(a.value) > Number(u.value) - 1 && (a.value = Number(u.value) - 1), s("update:start", Number(a.value));
83
+ }
84
+ function F() {
85
+ Number(u.value) < Number(a.value) + 1 && (u.value = Number(a.value) + 1), s("update:end", Number(u.value));
86
+ }
87
+ return f(
88
+ () => t.min,
89
+ (l) => {
90
+ Number(a.value) < Number(l) && (a.value = Number(l)), Number(u.value) < Number(l) && (u.value = Number(l));
91
+ }
92
+ ), f(
93
+ () => t.max,
94
+ (l) => {
95
+ Number(a.value) > Number(l) && (a.value = Number(l)), Number(u.value) > Number(l) && (u.value = Number(l));
96
+ }
97
+ ), (l, r) => (d(), c("div", L, [
98
+ o("div", P, [
99
+ o("div", {
100
+ class: "vue-data-ui-slicer-label-left",
101
+ style: m({ fontSize: `${t.fontSize}px`, color: t.textColor })
102
+ }, S(e.labelLeft), 5),
103
+ e.valueStart > 0 || e.valueEnd < e.max ? (d(), c("div", U, [
104
+ e.useResetSlot ? V(l.$slots, "reset-action", {
105
+ key: 1,
106
+ reset: v
107
+ }, void 0, !0) : (d(), c("button", {
108
+ key: 0,
109
+ "data-cy-reset": "",
110
+ tabindex: "0",
111
+ role: "button",
112
+ class: "vue-data-ui-refresh-button",
113
+ onClick: v
114
+ }, [
115
+ I(B, {
116
+ name: "refresh",
117
+ stroke: e.textColor
118
+ }, null, 8, ["stroke"])
119
+ ]))
120
+ ])) : z("", !0),
121
+ o("div", {
122
+ class: "vue-data-ui-slicer-label-right",
123
+ style: m({ fontSize: `${t.fontSize}px`, color: t.textColor })
124
+ }, S(e.labelRight), 5)
125
+ ]),
126
+ o("div", q, [
127
+ O,
128
+ o("div", {
129
+ class: "range-highlight",
130
+ style: m(g.value)
131
+ }, null, 4),
132
+ p(o("input", {
133
+ type: "range",
134
+ min: e.min,
135
+ max: e.max,
136
+ "onUpdate:modelValue": r[0] || (r[0] = (n) => a.value = n),
137
+ onInput: k
138
+ }, null, 40, T), [
139
+ [N, a.value]
140
+ ]),
141
+ p(o("input", {
142
+ type: "range",
143
+ min: e.min,
144
+ max: e.max,
145
+ "onUpdate:modelValue": r[1] || (r[1] = (n) => u.value = n),
146
+ onInput: F
147
+ }, null, 40, j), [
148
+ [N, u.value]
149
+ ])
150
+ ])
151
+ ]));
152
+ }
153
+ }, Q = /* @__PURE__ */ R(G, [["__scopeId", "data-v-d07947ad"]]);
154
+ export {
155
+ Q as S
156
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),p=require("./BaseIcon-BoKtpbrI.cjs"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=t=>(e.pushScopeId("data-v-d07947ad"),t=t(),e.popScopeId(),t),y={"data-html2canvas-ignore":""},h={class:"vue-data-ui-slicer-labels"},x={key:0},C={class:"double-range-slider"},k=g(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),V=["min","max"],E=["min","max"],F={__name:"Slicer",props:{background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:Number,default:14},labelLeft:{type:String,default:""},labelRight:{type:String,default:""},textColor:{type:String,default:"#1A1A1A"},inputColor:{type:String,default:"#1A1A1A"},max:{type:Number,default:0},min:{type:Number,default:0},selectColor:{type:String,default:"#4A4A4A"},useResetSlot:{type:Boolean,default:!1},valueStart:{type:[Number,String],default:0},valueEnd:{type:[Number,String],default:0}},emits:["update:start","update:end","reset"],setup(t,{emit:i}){const l=t;e.useCssVars(a=>({"56c736d9":s.value,22868166:b.value,"99f84204":v.value,"621bff06":t.selectColor,"0407e48b":m.value}));const o=e.ref(l.min),u=e.ref(l.max),c=e.computed(()=>{const a=l.max-l.min,r=(o.value-l.min)/a*100,n=(u.value-l.min)/a*100;return{left:`${r}%`,width:`${n-r}%`,background:l.selectColor}}),s=e.computed(()=>l.inputColor),m=e.computed(()=>l.background),v=e.computed(()=>`${l.selectColor}33`),b=e.computed(()=>l.borderColor);function d(){i("reset")}function f(){Number(o.value)>Number(u.value)-1&&(o.value=Number(u.value)-1),i("update:start",Number(o.value))}function N(){Number(u.value)<Number(o.value)+1&&(u.value=Number(o.value)+1),i("update:end",Number(u.value))}return e.watch(()=>l.min,a=>{Number(o.value)<Number(a)&&(o.value=Number(a)),Number(u.value)<Number(a)&&(u.value=Number(a))}),e.watch(()=>l.max,a=>{Number(o.value)>Number(a)&&(o.value=Number(a)),Number(u.value)>Number(a)&&(u.value=Number(a))}),(a,r)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",h,[e.createElementVNode("div",{class:"vue-data-ui-slicer-label-left",style:e.normalizeStyle({fontSize:`${l.fontSize}px`,color:l.textColor})},e.toDisplayString(t.labelLeft),5),t.valueStart>0||t.valueEnd<t.max?(e.openBlock(),e.createElementBlock("div",x,[t.useResetSlot?e.renderSlot(a.$slots,"reset-action",{key:1,reset:d},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:d},[e.createVNode(p.default,{name:"refresh",stroke:t.textColor},null,8,["stroke"])]))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-data-ui-slicer-label-right",style:e.normalizeStyle({fontSize:`${l.fontSize}px`,color:l.textColor})},e.toDisplayString(t.labelRight),5)]),e.createElementVNode("div",C,[k,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(c.value)},null,4),e.withDirectives(e.createElementVNode("input",{type:"range",min:t.min,max:t.max,"onUpdate:modelValue":r[0]||(r[0]=n=>o.value=n),onInput:f},null,40,V),[[e.vModelText,o.value]]),e.withDirectives(e.createElementVNode("input",{type:"range",min:t.min,max:t.max,"onUpdate:modelValue":r[1]||(r[1]=n=>u.value=n),onInput:N},null,40,E),[[e.vModelText,u.value]])])]))}},A=S._export_sfc(F,[["__scopeId","data-v-d07947ad"]]);exports.Slicer=A;
@@ -0,0 +1,46 @@
1
+ import { openBlock as o, createElementBlock as l, Fragment as c, createElementVNode as s, normalizeStyle as i, unref as e, toDisplayString as n, createCommentVNode as f } from "vue";
2
+ import { u } from "./useNestedProp-CkP8xhG_.js";
3
+ const x = {
4
+ __name: "Title",
5
+ props: {
6
+ config: {
7
+ type: Object,
8
+ default() {
9
+ return {};
10
+ }
11
+ }
12
+ },
13
+ setup(r) {
14
+ const t = u({
15
+ userConfig: r.config,
16
+ defaultConfig: {
17
+ title: {
18
+ cy: "",
19
+ text: "",
20
+ color: "",
21
+ fontSize: 20,
22
+ bold: !0
23
+ },
24
+ subtitle: {
25
+ cy: "",
26
+ text: "",
27
+ color: "",
28
+ fontSize: 14,
29
+ bold: !1
30
+ }
31
+ }
32
+ });
33
+ return (p, d) => (o(), l(c, null, [
34
+ s("div", {
35
+ style: i(`width: 100%; text-align:center;color:${e(t).title.color};font-size:${e(t).title.fontSize}px;font-weight:${e(t).title.bold ? "bold" : ""}`)
36
+ }, n(e(t).title.text), 5),
37
+ e(t).subtitle.text ? (o(), l("div", {
38
+ key: 0,
39
+ style: i(`width: 100%; text-align:center;color:${e(t).subtitle.color};font-size:${e(t).subtitle.fontSize}px;font-weight:${e(t).subtitle.bold ? "bold" : ""}`)
40
+ }, n(e(t).subtitle.text), 5)) : f("", !0)
41
+ ], 64));
42
+ }
43
+ };
44
+ export {
45
+ x as _
46
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),l=require("./useNestedProp-BMxXyPbW.cjs"),r={__name:"Title",props:{config:{type:Object,default(){return{}}}},setup(o){const n=o,t=l.useNestedProp({userConfig:n.config,defaultConfig:{title:{cy:"",text:"",color:"",fontSize:20,bold:!0},subtitle:{cy:"",text:"",color:"",fontSize:14,bold:!1}}});return(i,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{style:e.normalizeStyle(`width: 100%; text-align:center;color:${e.unref(t).title.color};font-size:${e.unref(t).title.fontSize}px;font-weight:${e.unref(t).title.bold?"bold":""}`)},e.toDisplayString(e.unref(t).title.text),5),e.unref(t).subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width: 100%; text-align:center;color:${e.unref(t).subtitle.color};font-size:${e.unref(t).subtitle.fontSize}px;font-weight:${e.unref(t).subtitle.bold?"bold":""}`)},e.toDisplayString(e.unref(t).subtitle.text),5)):e.createCommentVNode("",!0)],64))}};exports._sfc_main=r;
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),f=require("./index-BkomIE9L.cjs");function m({tooltip:e,chart:n,clientPosition:o}){const u=t.ref(0),l=t.ref(48);if(e&&n){const{width:r,height:i}=e.getBoundingClientRect(),{right:d,left:s,bottom:c}=n.getBoundingClientRect();o.x+r/2>d?u.value=-r:o.x-r/2<s?u.value=0:u.value=-r/2,o.y+i>c&&(l.value=-i-48)}return{top:o.y+l.value,left:o.x+u.value}}function y(e,n,o){t.onMounted(()=>e.addEventListener(n,o)),t.onUnmounted(()=>e.removeEventListener(n,o))}function a(){const e=t.ref(0),n=t.ref(0);return y(window,"mousemove",o=>{e.value=o.clientX,n.value=o.clientY}),{x:e,y:n}}const v=["innerHTML"],b={__name:"Tooltip",props:{backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#000000"},content:String,maxWidth:{type:String,default:"300px"},parent:{type:Object},show:{type:Boolean,default:!1},isCustom:{type:Boolean,default:!1},fontSize:{type:[Number,String],default:14},borderRadius:{type:Number,default:4},borderColor:{type:String,default:"#e1e5e8"},borderWidth:{type:Number,default:1},backgroundOpacity:{type:Number,default:100}},setup(e){const n=e,o=t.ref(null),u=t.ref(a()),l=t.computed(()=>m({tooltip:o.value,chart:n.parent,clientPosition:u.value}));return(r,i)=>e.show?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"tooltip",ref:o,class:t.normalizeClass({"vue-data-ui-custom-tooltip":e.isCustom,"vue-data-ui-tooltip":!e.isCustom}),style:t.normalizeStyle(`top:${l.value.top}px;left:${l.value.left}px;${e.isCustom?"":`background:${e.backgroundColor}${t.unref(f.opacity)[e.backgroundOpacity]};color:${e.color};max-width:${e.maxWidth};font-size:${e.fontSize}px`};border-radius:${e.borderRadius}px;border:${e.borderWidth}px solid ${e.borderColor};`)},[t.renderSlot(r.$slots,"tooltip-before"),t.renderSlot(r.$slots,"default"),t.createElementVNode("div",{innerHTML:e.content},null,8,v),t.renderSlot(r.$slots,"tooltip-after")],6)):t.createCommentVNode("",!0)}};exports._sfc_main=b;exports.useMouse=a;
@@ -0,0 +1,94 @@
1
+ import { ref as u, onMounted as f, onUnmounted as m, computed as y, openBlock as b, createElementBlock as v, normalizeClass as p, normalizeStyle as g, unref as $, renderSlot as a, createElementVNode as h, createCommentVNode as x } from "vue";
2
+ import { r as C } from "./index-BMCvLyab.js";
3
+ function S({ tooltip: e, chart: o, clientPosition: t }) {
4
+ const l = u(0), r = u(48);
5
+ if (e && o) {
6
+ const { width: n, height: i } = e.getBoundingClientRect(), { right: d, left: s, bottom: c } = o.getBoundingClientRect();
7
+ t.x + n / 2 > d ? l.value = -n : t.x - n / 2 < s ? l.value = 0 : l.value = -n / 2, t.y + i > c && (r.value = -i - 48);
8
+ }
9
+ return {
10
+ top: t.y + r.value,
11
+ left: t.x + l.value
12
+ };
13
+ }
14
+ function k(e, o, t) {
15
+ f(() => e.addEventListener(o, t)), m(() => e.removeEventListener(o, t));
16
+ }
17
+ function w() {
18
+ const e = u(0), o = u(0);
19
+ return k(window, "mousemove", (t) => {
20
+ e.value = t.clientX, o.value = t.clientY;
21
+ }), { x: e, y: o };
22
+ }
23
+ const B = ["innerHTML"], z = {
24
+ __name: "Tooltip",
25
+ props: {
26
+ backgroundColor: {
27
+ type: String,
28
+ default: "#FFFFFF"
29
+ },
30
+ color: {
31
+ type: String,
32
+ default: "#000000"
33
+ },
34
+ content: String,
35
+ maxWidth: {
36
+ type: String,
37
+ default: "300px"
38
+ },
39
+ parent: {
40
+ type: Object
41
+ },
42
+ show: {
43
+ type: Boolean,
44
+ default: !1
45
+ },
46
+ isCustom: {
47
+ type: Boolean,
48
+ default: !1
49
+ },
50
+ fontSize: {
51
+ type: [Number, String],
52
+ default: 14
53
+ },
54
+ borderRadius: {
55
+ type: Number,
56
+ default: 4
57
+ },
58
+ borderColor: {
59
+ type: String,
60
+ default: "#e1e5e8"
61
+ },
62
+ borderWidth: {
63
+ type: Number,
64
+ default: 1
65
+ },
66
+ backgroundOpacity: {
67
+ type: Number,
68
+ default: 100
69
+ }
70
+ },
71
+ setup(e) {
72
+ const o = e, t = u(null), l = u(w()), r = y(() => S({
73
+ tooltip: t.value,
74
+ chart: o.parent,
75
+ clientPosition: l.value
76
+ }));
77
+ return (n, i) => e.show ? (b(), v("div", {
78
+ key: 0,
79
+ ref_key: "tooltip",
80
+ ref: t,
81
+ class: p({ "vue-data-ui-custom-tooltip": e.isCustom, "vue-data-ui-tooltip": !e.isCustom }),
82
+ style: g(`top:${r.value.top}px;left:${r.value.left}px;${e.isCustom ? "" : `background:${e.backgroundColor}${$(C)[e.backgroundOpacity]};color:${e.color};max-width:${e.maxWidth};font-size:${e.fontSize}px`};border-radius:${e.borderRadius}px;border:${e.borderWidth}px solid ${e.borderColor};`)
83
+ }, [
84
+ a(n.$slots, "tooltip-before"),
85
+ a(n.$slots, "default"),
86
+ h("div", { innerHTML: e.content }, null, 8, B),
87
+ a(n.$slots, "tooltip-after")
88
+ ], 6)) : x("", !0);
89
+ }
90
+ };
91
+ export {
92
+ z as _,
93
+ w as u
94
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=(t,o)=>{const c=t.__vccOpts||t;for(const[r,s]of o)c[r]=s;return c};exports._export_sfc=e;
@@ -0,0 +1,9 @@
1
+ const s = (t, r) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [c, e] of r)
4
+ o[c] = e;
5
+ return o;
6
+ };
7
+ export {
8
+ s as _
9
+ };