vue-data-ui 2.3.61 → 2.3.63
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.
- package/dist/{Arrow-B5nYwPUt.js → Arrow-CBx1Hj4I.js} +1 -1
- package/dist/{Arrow-Dv_tprAO.cjs → Arrow-fP0md3L3.cjs} +1 -1
- package/dist/{BaseIcon-DUPLRuLO.js → BaseIcon-CS18qRiy.js} +1 -1
- package/dist/{BaseIcon-aPcCSO_Z.cjs → BaseIcon-O8jJvy48.cjs} +1 -1
- package/dist/{DataTable-NUzEZXWt.js → DataTable-BGJ2mVxG.js} +2 -2
- package/dist/{DataTable-B6xCb-DR.cjs → DataTable-CSEiZDAb.cjs} +1 -1
- package/dist/{Legend-ePmJ_YIA.cjs → Legend-DuuSl2rJ.cjs} +1 -1
- package/dist/{Legend-C3tseguI.js → Legend-UWyvC57K.js} +1 -1
- package/dist/{Shape-DAe5uqIA.cjs → Shape-Dsx4SQVn.cjs} +1 -1
- package/dist/{Shape-BPcWPP9D.js → Shape-HfEpP-Tk.js} +1 -1
- package/dist/{Slicer-CmHwU6if.js → Slicer-Bk3Rt85L.js} +9 -9
- package/dist/{Slicer-BJs52Jle.cjs → Slicer-Cf74aFVz.cjs} +1 -1
- package/dist/{Title-BAQrVaNA.js → Title-CPZstF2C.js} +1 -1
- package/dist/{Title-B_p983os.cjs → Title-PZ6S96pU.cjs} +1 -1
- package/dist/{Tooltip-C2dhDgoh.cjs → Tooltip-BoIYPSX3.cjs} +1 -1
- package/dist/{Tooltip-B73tTE2v.js → Tooltip-CBmmiqKr.js} +5 -5
- package/dist/{index-CwG--L4Z.js → index-C_05i_JG.js} +578 -526
- package/dist/{index-nPEJmXmf.cjs → index-NNZeHOBS.cjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-TbnnNrH2.cjs → useNestedProp-CPsbJAGj.cjs} +1 -1
- package/dist/{useNestedProp-BqwYEJGM.js → useNestedProp-DLnT0Wtg.js} +1 -1
- package/dist/{usePrinter-D012Olnq.cjs → usePrinter-BLbY8qGZ.cjs} +1 -1
- package/dist/{usePrinter-Do9tGYem.js → usePrinter-DOhlzlnx.js} +1 -1
- package/dist/{vue-data-ui-DQAJDvpX.cjs → vue-data-ui-D5aG0WkE.cjs} +1 -1
- package/dist/{vue-data-ui-ORLyt-v3.js → vue-data-ui-vqnxkVKv.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +7 -7
- package/dist/{vue-ui-3d-bar-BRbooRg3.cjs → vue-ui-3d-bar-Cez69HMH.cjs} +1 -1
- package/dist/{vue-ui-3d-bar--ztApFzW.js → vue-ui-3d-bar-b7Pu7sfL.js} +7 -7
- package/dist/{vue-ui-accordion-CHL4xuW4.cjs → vue-ui-accordion-CcdyvXrp.cjs} +1 -1
- package/dist/{vue-ui-accordion-Be_wWB1T.js → vue-ui-accordion-rGJVvi_V.js} +3 -3
- package/dist/vue-ui-age-pyramid-B6LKyKjc.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-DLIladXC.js → vue-ui-age-pyramid-CH1Vj2R6.js} +226 -226
- package/dist/{vue-ui-annotator-CS2d8F8x.cjs → vue-ui-annotator-BfmMNM_X.cjs} +1 -1
- package/dist/{vue-ui-annotator-Bxrjl1nz.js → vue-ui-annotator-CTio5IiK.js} +1 -1
- package/dist/{vue-ui-candlestick-BppLVU6c.js → vue-ui-candlestick-C4kT9W0j.js} +158 -158
- package/dist/{vue-ui-candlestick-tumv-lhv.cjs → vue-ui-candlestick-DvX9Jxoi.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-BsFNypM6.cjs → vue-ui-carousel-table-CMs7scX3.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BnOsmGVc.js → vue-ui-carousel-table-Df2HHk0v.js} +4 -4
- package/dist/{vue-ui-chestnut-DFb7M_SC.js → vue-ui-chestnut-BKTnDElg.js} +65 -64
- package/dist/{vue-ui-chestnut-tK8ebPQM.cjs → vue-ui-chestnut-CCw8h0_m.cjs} +3 -3
- package/dist/{vue-ui-cursor-D-eRMlWI.cjs → vue-ui-cursor-C-8bpiuy.cjs} +1 -1
- package/dist/{vue-ui-cursor-CYk61ZVK.js → vue-ui-cursor-DOOlFN5D.js} +2 -2
- package/dist/{vue-ui-dashboard-Cbk74q7K.cjs → vue-ui-dashboard-B_h8KxOx.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BomFWtsP.js → vue-ui-dashboard-D7U1UkAh.js} +2 -2
- package/dist/{vue-ui-digits-Ch9quA4D.js → vue-ui-digits-DmxQgABv.js} +2 -2
- package/dist/{vue-ui-digits-DWJOvgi2.cjs → vue-ui-digits-DoQoNGGx.cjs} +1 -1
- package/dist/{vue-ui-donut-BIMgi_Qw.cjs → vue-ui-donut-DdnwGXq6.cjs} +1 -1
- package/dist/vue-ui-donut-evolution-DsRAZLMN.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-ClNciLi2.js → vue-ui-donut-evolution-uPCTV6E6.js} +95 -95
- package/dist/{vue-ui-donut-Ctzc7e6_.js → vue-ui-donut-t5zf9Lm5.js} +42 -42
- package/dist/{vue-ui-dumbbell-IBrAHdlc.js → vue-ui-dumbbell-BCdxqHVR.js} +109 -107
- package/dist/vue-ui-dumbbell-D1Ak2pEE.cjs +9 -0
- package/dist/vue-ui-flow-CLqm5nkx.cjs +1 -0
- package/dist/vue-ui-flow-J1SmdKkh.js +469 -0
- package/dist/vue-ui-galaxy-CSXbhXBe.cjs +1 -0
- package/dist/{vue-ui-galaxy-BBKU6WqV.js → vue-ui-galaxy-DNMbyKNg.js} +91 -91
- package/dist/{vue-ui-gauge-CDpN6D_X.js → vue-ui-gauge-CC_9cSwj.js} +84 -84
- package/dist/vue-ui-gauge-O3ntKI31.cjs +1 -0
- package/dist/{vue-ui-gizmo-BS-olrbu.js → vue-ui-gizmo-C5vGMHUU.js} +2 -2
- package/dist/{vue-ui-gizmo-Dyi4DWSA.cjs → vue-ui-gizmo-qrJt0nH6.cjs} +1 -1
- package/dist/vue-ui-heatmap-BjimHnMb.cjs +1 -0
- package/dist/{vue-ui-heatmap-Bonl3GBj.js → vue-ui-heatmap-ByxLZuR5.js} +257 -239
- package/dist/{vue-ui-kpi-MeC195T8.js → vue-ui-kpi-DdNQlVCe.js} +3 -3
- package/dist/{vue-ui-kpi-ChD3Gh4P.cjs → vue-ui-kpi-eyxMedig.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-NiTij5XQ.cjs → vue-ui-mini-loader-B5ykH9BF.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-l2G4D7lJ.js → vue-ui-mini-loader-C05VGcNr.js} +2 -2
- package/dist/{vue-ui-molecule-C1dO-Ony.js → vue-ui-molecule-DI0oHPT5.js} +20 -20
- package/dist/{vue-ui-molecule-pXZ3aWlr.cjs → vue-ui-molecule-LZ1SRkgK.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3Gv4iYr.cjs → vue-ui-mood-radar-BJqk2oK_.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BVpJ3O4m.js → vue-ui-mood-radar-DIDqiVMf.js} +9 -9
- package/dist/{vue-ui-nested-donuts-Dmeqsml8.js → vue-ui-nested-donuts-BkSiryoB.js} +120 -120
- package/dist/{vue-ui-nested-donuts-Cwk0M7SE.cjs → vue-ui-nested-donuts-Nggnu_iK.cjs} +2 -2
- package/dist/{vue-ui-onion-BmJO696O.cjs → vue-ui-onion-B29Cxru2.cjs} +1 -1
- package/dist/{vue-ui-onion-Ogj_rMlX.js → vue-ui-onion-xiubSG3j.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-BBBuJdGN.js → vue-ui-parallel-coordinate-plot-DjmOGHVx.js} +69 -69
- package/dist/{vue-ui-parallel-coordinate-plot-Cqm7uMBs.cjs → vue-ui-parallel-coordinate-plot-DqrkSOo6.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BJtgJ_lu.js → vue-ui-quadrant-Cc79ggIy.js} +36 -36
- package/dist/{vue-ui-quadrant-DcqQwIsD.cjs → vue-ui-quadrant-Df_2X-ca.cjs} +1 -1
- package/dist/vue-ui-quick-chart-BnBGXd4d.cjs +15 -0
- package/dist/{vue-ui-quick-chart-D7dCfDSL.js → vue-ui-quick-chart-t_cPx4OT.js} +549 -515
- package/dist/{vue-ui-radar-BMxzhMFJ.js → vue-ui-radar-C3qEonKT.js} +59 -59
- package/dist/vue-ui-radar-D3W9B9JE.cjs +1 -0
- package/dist/{vue-ui-rating-DSgHml7s.js → vue-ui-rating-DffL7w-I.js} +9 -9
- package/dist/{vue-ui-rating-buop0ul0.cjs → vue-ui-rating-aOa6zIr5.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BACMnvv8.cjs → vue-ui-relation-circle-BZ7r7Unx.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CdHbZK0u.js → vue-ui-relation-circle-D0zUfd3f.js} +5 -5
- package/dist/vue-ui-rings-BjWAtE4x.cjs +2 -0
- package/dist/{vue-ui-rings-BBnzxfo2.js → vue-ui-rings-PHbuqfoT.js} +188 -185
- package/dist/{vue-ui-scatter-sF3c5eqM.cjs → vue-ui-scatter-DMJ77QYr.cjs} +1 -1
- package/dist/{vue-ui-scatter-DYXhTzch.js → vue-ui-scatter-DuCnr2yB.js} +378 -375
- package/dist/{vue-ui-screenshot-D-6YvKkW.cjs → vue-ui-screenshot-DBuA631a.cjs} +1 -1
- package/dist/{vue-ui-screenshot-B4WOalT6.js → vue-ui-screenshot-DbwRrmHv.js} +6 -6
- package/dist/{vue-ui-skeleton-D6wHGzmu.cjs → vue-ui-skeleton-CI4t8LHn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-ClzVF3vm.js → vue-ui-skeleton-CcJR2m18.js} +23 -23
- package/dist/{vue-ui-smiley-B1cqwAN5.js → vue-ui-smiley-2rJFSSZS.js} +2 -2
- package/dist/{vue-ui-smiley-CoVnFdkD.cjs → vue-ui-smiley-C7KBm0fz.cjs} +1 -1
- package/dist/vue-ui-spark-trend-DY_sfo6o.js +251 -0
- package/dist/vue-ui-spark-trend-VH2nwGJf.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BOzSGZak.js → vue-ui-sparkbar-B0O77PcV.js} +3 -3
- package/dist/{vue-ui-sparkbar-CpIfPtyd.cjs → vue-ui-sparkbar-Bs8ZQem1.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-4hk6ZJwJ.js → vue-ui-sparkgauge-B5KqrHQZ.js} +64 -64
- package/dist/vue-ui-sparkgauge-Cd7b4u0z.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-VCAQZfgG.cjs → vue-ui-sparkhistogram-CEWCLohQ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-8degKlMU.js → vue-ui-sparkhistogram-DwRPeG7H.js} +4 -4
- package/dist/{vue-ui-sparkline-DsUwWV4z.cjs → vue-ui-sparkline-CuFtIMpq.cjs} +1 -1
- package/dist/{vue-ui-sparkline-uBkd9kR2.js → vue-ui-sparkline-W5bZnpQo.js} +25 -25
- package/dist/{vue-ui-sparkstackbar-Cpq2lHcl.js → vue-ui-sparkstackbar-9hBQZ0lZ.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DyNfMGkM.cjs → vue-ui-sparkstackbar-TyVFUMtT.cjs} +1 -1
- package/dist/{vue-ui-stackbar-lr_qudpY.js → vue-ui-stackbar-BlkgM0nD.js} +35 -35
- package/dist/{vue-ui-stackbar-jQe7BneA.cjs → vue-ui-stackbar-CwVcupxt.cjs} +1 -1
- package/dist/vue-ui-strip-plot-C1GfRjXJ.cjs +1 -0
- package/dist/{vue-ui-strip-plot-DwvlcnHB.js → vue-ui-strip-plot-CBfqkkY6.js} +76 -75
- package/dist/{vue-ui-table-Dhj4_z9d.js → vue-ui-table-B8cvvLk8.js} +1 -1
- package/dist/{vue-ui-table-D5ybohqp.cjs → vue-ui-table-CmguTt4I.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CChLZdxj.cjs → vue-ui-table-heatmap-DMnh8-b1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BY65DeiH.js → vue-ui-table-heatmap-wVWltZ2x.js} +26 -26
- package/dist/{vue-ui-table-sparkline-CvMETVJ1.js → vue-ui-table-sparkline-_POawNEL.js} +13 -13
- package/dist/{vue-ui-table-sparkline-Cmy6PcPI.cjs → vue-ui-table-sparkline-wtIFAc20.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BIN2ofrh.js → vue-ui-thermometer-CFJqd-VY.js} +116 -116
- package/dist/vue-ui-thermometer-D6SnFJb1.cjs +1 -0
- package/dist/{vue-ui-timer-DBcOT10h.cjs → vue-ui-timer-194y0LUC.cjs} +1 -1
- package/dist/{vue-ui-timer-DoSqphvk.js → vue-ui-timer-D8dgDAfe.js} +4 -4
- package/dist/vue-ui-tiremarks-BM28JsxE.cjs +1 -0
- package/dist/{vue-ui-tiremarks-DRTLsMWt.js → vue-ui-tiremarks-CH1BFqbO.js} +71 -71
- package/dist/vue-ui-treemap-BIpIg3Qa.cjs +1 -0
- package/dist/{vue-ui-treemap-D8-D_wfq.js → vue-ui-treemap-DHsoVY5n.js} +89 -82
- package/dist/{vue-ui-vertical-bar-zUaXmUpB.js → vue-ui-vertical-bar-DNODBoSo.js} +246 -242
- package/dist/vue-ui-vertical-bar-Du8ikoWM.cjs +4 -0
- package/dist/{vue-ui-waffle-CztGir7e.js → vue-ui-waffle-C8hMAeMl.js} +44 -44
- package/dist/{vue-ui-waffle-RCqpPcSF.cjs → vue-ui-waffle-_Bi9MRx8.cjs} +1 -1
- package/dist/{vue-ui-wheel-CBqL8FKG.cjs → vue-ui-wheel-BZxcRGJX.cjs} +1 -1
- package/dist/{vue-ui-wheel-BQ2a-ZyV.js → vue-ui-wheel-CmZKsfKj.js} +5 -5
- package/dist/{vue-ui-word-cloud-CKUGIGnW.js → vue-ui-word-cloud-fLf-x06l.js} +68 -65
- package/dist/vue-ui-word-cloud-nHVG2yid.cjs +1 -0
- package/dist/{vue-ui-xy-Dsa2tfKS.js → vue-ui-xy-CPln5bGQ.js} +82 -82
- package/dist/vue-ui-xy-canvas-Z1tJJV5-.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-JeNqaB_p.js → vue-ui-xy-canvas-k30CEsKi.js} +122 -121
- package/dist/vue-ui-xy-qxQy2sOl.cjs +3 -0
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-BILMRRi1.cjs +0 -1
- package/dist/vue-ui-donut-evolution-K7LUkN6q.cjs +0 -1
- package/dist/vue-ui-dumbbell-HVpK20XO.cjs +0 -9
- package/dist/vue-ui-flow-CiXnGdNb.js +0 -465
- package/dist/vue-ui-flow-ClV2yd8Y.cjs +0 -1
- package/dist/vue-ui-galaxy-CMCXCWDA.cjs +0 -1
- package/dist/vue-ui-gauge-DwCGaX1h.cjs +0 -1
- package/dist/vue-ui-heatmap-WFNo-GFX.cjs +0 -1
- package/dist/vue-ui-quick-chart-D9zFHA0L.cjs +0 -15
- package/dist/vue-ui-radar-D8ik0Fqr.cjs +0 -1
- package/dist/vue-ui-rings-Dn5opKNy.cjs +0 -2
- package/dist/vue-ui-spark-trend-DnO4DW0n.cjs +0 -1
- package/dist/vue-ui-spark-trend-HioE2zeC.js +0 -251
- package/dist/vue-ui-sparkgauge-C2_I0tyO.cjs +0 -1
- package/dist/vue-ui-strip-plot-BMKaWqD4.cjs +0 -1
- package/dist/vue-ui-thermometer-Bfp-FwRE.cjs +0 -1
- package/dist/vue-ui-tiremarks-BeBJHz2R.cjs +0 -1
- package/dist/vue-ui-treemap-DqBukSj6.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BM3aaSuB.cjs +0 -4
- package/dist/vue-ui-word-cloud-BbnU0d3E.cjs +0 -1
- package/dist/vue-ui-xy-BU0fCkSk.cjs +0 -3
- package/dist/vue-ui-xy-canvas-IaIARWWS.cjs +0 -9
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { computed as h, ref as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as
|
|
6
|
-
import
|
|
7
|
-
import { _ as
|
|
8
|
-
const
|
|
1
|
+
import { computed as h, ref as k, watch as ee, onMounted as te, openBlock as s, createElementBlock as v, normalizeClass as O, normalizeStyle as S, createVNode as ae, createCommentVNode as _, createBlock as X, unref as d, createSlots as le, withCtx as A, renderSlot as w, normalizeProps as D, guardReactiveProps as M, Fragment as H, renderList as R, toDisplayString as re } from "vue";
|
|
2
|
+
import { u as Y } from "./useNestedProp-DLnT0Wtg.js";
|
|
3
|
+
import { u as oe, c as se, t as ne, s as N, o as ue, e as ie, v as q, X as ce, i as ve, f as he } from "./index-C_05i_JG.js";
|
|
4
|
+
import { _ as de } from "./Title-CPZstF2C.js";
|
|
5
|
+
import { u as ge, U as ye } from "./usePrinter-DOhlzlnx.js";
|
|
6
|
+
import me from "./vue-ui-skeleton-CcJR2m18.js";
|
|
7
|
+
import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const pe = ["id"], ke = ["xmlns", "viewBox"], _e = { key: 0 }, be = ["d", "stroke-width", "stroke"], Ce = { key: 1 }, $e = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], xe = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], we = {
|
|
9
9
|
key: 3,
|
|
10
10
|
class: "vue-data-ui-watermark"
|
|
11
|
-
},
|
|
11
|
+
}, Pe = {
|
|
12
12
|
__name: "vue-ui-tiremarks",
|
|
13
13
|
props: {
|
|
14
14
|
config: {
|
|
@@ -24,45 +24,45 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const u =
|
|
29
|
-
const t =
|
|
27
|
+
setup(J, { expose: K }) {
|
|
28
|
+
const u = J, { vue_ui_tiremarks: Q } = oe(), F = h(() => !!u.dataset && Object.keys(u.dataset).length), z = k(se()), G = k(null), L = k(0), e = h(() => {
|
|
29
|
+
const t = Y({
|
|
30
30
|
userConfig: u.config,
|
|
31
|
-
defaultConfig:
|
|
31
|
+
defaultConfig: Q
|
|
32
32
|
});
|
|
33
33
|
return t.theme ? {
|
|
34
|
-
...
|
|
35
|
-
userConfig:
|
|
34
|
+
...Y({
|
|
35
|
+
userConfig: ne.vue_ui_tiremarks[t.theme] || u.config,
|
|
36
36
|
defaultConfig: t
|
|
37
37
|
})
|
|
38
38
|
} : t;
|
|
39
|
-
}), { isPrinting:
|
|
39
|
+
}), { isPrinting: U, isImaging: j, generatePdf: B, generateImage: E } = ge({
|
|
40
40
|
elementId: z.value,
|
|
41
41
|
fileName: e.value.style.chart.title.text || "vue-ui-tiremarks"
|
|
42
|
-
}), i =
|
|
43
|
-
|
|
44
|
-
i.value =
|
|
45
|
-
}),
|
|
46
|
-
|
|
42
|
+
}), i = k(e.value.style.chart.animation.use ? 0 : N(u.dataset.percentage));
|
|
43
|
+
ee(() => u.dataset.percentage, () => {
|
|
44
|
+
i.value = e.value.style.chart.animation.use ? 0 : N(u.dataset.percentage), T();
|
|
45
|
+
}), te(() => {
|
|
46
|
+
ue(u.dataset) && ie({
|
|
47
47
|
componentName: "VueUiTiremarks",
|
|
48
48
|
type: "dataset"
|
|
49
|
-
}),
|
|
49
|
+
}), T();
|
|
50
50
|
});
|
|
51
|
-
function
|
|
51
|
+
function T() {
|
|
52
52
|
let t = 0, n = e.value.style.chart.animation.speed, a = 5e-3 * e.value.style.chart.animation.acceleration;
|
|
53
53
|
function r() {
|
|
54
|
-
i.value += n + t, t += a, i.value < u.dataset.percentage ? requestAnimationFrame(r) : i.value = u.dataset.percentage;
|
|
54
|
+
i.value += n + t, t += a, i.value < u.dataset.percentage ? requestAnimationFrame(r) : i.value = N(u.dataset.percentage);
|
|
55
55
|
}
|
|
56
56
|
e.value.style.chart.animation.use && (i.value = 0, r());
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const p = h(() => e.value.style.chart.layout.display === "vertical"), o = h(() => {
|
|
59
59
|
const t = {
|
|
60
60
|
top: 48,
|
|
61
61
|
left: 64,
|
|
62
62
|
right: 64,
|
|
63
63
|
bottom: 48
|
|
64
64
|
};
|
|
65
|
-
return
|
|
65
|
+
return p.value ? {
|
|
66
66
|
top: e.value.style.chart.percentage.verticalPosition === "top" ? t.top : 3,
|
|
67
67
|
left: 3,
|
|
68
68
|
right: 3,
|
|
@@ -74,21 +74,21 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
74
74
|
right: e.value.style.chart.percentage.horizontalPosition === "right" ? t.right : 10
|
|
75
75
|
};
|
|
76
76
|
}), P = h(() => Object.values(o.value).reduce((t, n) => t + n, 0)), l = h(() => ({
|
|
77
|
-
height:
|
|
78
|
-
width:
|
|
79
|
-
})),
|
|
80
|
-
h(() => u.dataset.percentage /
|
|
81
|
-
const c = h(() =>
|
|
77
|
+
height: p.value ? 312 : 56,
|
|
78
|
+
width: p.value ? 56 : 312
|
|
79
|
+
})), W = k(100);
|
|
80
|
+
h(() => u.dataset.percentage / W.value);
|
|
81
|
+
const c = h(() => p.value ? {
|
|
82
82
|
mark: (l.value.height - P.value) / 100 * 0.5,
|
|
83
83
|
space: (l.value.height - P.value) / 100 * 0.5
|
|
84
84
|
} : {
|
|
85
85
|
mark: (l.value.width - P.value) / 100 * 0.5,
|
|
86
86
|
space: (l.value.width - P.value) / 100 * 0.5
|
|
87
|
-
}),
|
|
87
|
+
}), V = h(() => {
|
|
88
88
|
const t = [];
|
|
89
89
|
for (let a = 0; a < 100; a += 1) {
|
|
90
|
-
const r = e.value.style.chart.layout.ticks.gradient.show ?
|
|
91
|
-
if (
|
|
90
|
+
const r = e.value.style.chart.layout.ticks.gradient.show ? q(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
|
|
91
|
+
if (p.value) {
|
|
92
92
|
const C = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.width - o.value.left - o.value.right) / 100 / 3 : 0, g = o.value.left + 4 + C, y = l.value.width - o.value.right - 4 - C, m = l.value.height - o.value.bottom - a * c.value.mark - a * c.value.space - c.value.mark, f = l.value.height - o.value.bottom - a * c.value.mark - a * c.value.space - c.value.mark, $ = (y - g) / e.value.style.chart.layout.curveAngleX, x = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
|
|
93
93
|
t.push({
|
|
94
94
|
x1: g,
|
|
@@ -114,7 +114,7 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
114
114
|
}), b = h(() => {
|
|
115
115
|
let t, n, a;
|
|
116
116
|
const r = e.value.style.chart.percentage.fontSize / 3;
|
|
117
|
-
return
|
|
117
|
+
return p.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t = l.value.width / 2, n = o.value.top / 2, a = "middle") : e.value.style.chart.percentage.verticalPosition === "bottom" && (t = l.value.width / 2, n = l.value.height - o.value.bottom / 2 + r, a = "middle") : e.value.style.chart.percentage.horizontalPosition === "left" ? (t = 4, n = l.value.height / 2 + r, a = "start") : e.value.style.chart.percentage.horizontalPosition === "right" && (t = l.value.width - o.value.right + 8, n = l.value.height / 2 + r, a = "start"), {
|
|
118
118
|
x: t,
|
|
119
119
|
y: n,
|
|
120
120
|
textAnchor: a,
|
|
@@ -122,16 +122,16 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
122
122
|
fontSize: e.value.style.chart.percentage.fontSize,
|
|
123
123
|
fill: e.value.style.chart.percentage.color
|
|
124
124
|
};
|
|
125
|
-
}), I =
|
|
126
|
-
function
|
|
127
|
-
I.value = t,
|
|
125
|
+
}), I = k(!1);
|
|
126
|
+
function Z(t) {
|
|
127
|
+
I.value = t, L.value += 1;
|
|
128
128
|
}
|
|
129
|
-
return
|
|
130
|
-
generatePdf:
|
|
131
|
-
generateImage:
|
|
129
|
+
return K({
|
|
130
|
+
generatePdf: B,
|
|
131
|
+
generateImage: E
|
|
132
132
|
}), (t, n) => (s(), v("div", {
|
|
133
133
|
ref_key: "tiremarksChart",
|
|
134
|
-
ref:
|
|
134
|
+
ref: G,
|
|
135
135
|
class: O(`vue-ui-tiremarks ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
136
136
|
style: S(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
|
|
137
137
|
id: z.value
|
|
@@ -140,7 +140,7 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
140
140
|
key: 0,
|
|
141
141
|
style: S(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
|
|
142
142
|
}, [
|
|
143
|
-
|
|
143
|
+
ae(de, {
|
|
144
144
|
config: {
|
|
145
145
|
title: {
|
|
146
146
|
cy: "wheel-title",
|
|
@@ -153,13 +153,13 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
153
153
|
}
|
|
154
154
|
}, null, 8, ["config"])
|
|
155
155
|
], 4)) : _("", !0),
|
|
156
|
-
e.value.userOptions.show && F.value ? (s(),
|
|
156
|
+
e.value.userOptions.show && F.value ? (s(), X(ye, {
|
|
157
157
|
ref: "details",
|
|
158
|
-
key: `user_options_${
|
|
158
|
+
key: `user_options_${L.value}`,
|
|
159
159
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
160
160
|
color: e.value.style.chart.color,
|
|
161
|
-
isPrinting: d(
|
|
162
|
-
isImaging: d(
|
|
161
|
+
isPrinting: d(U),
|
|
162
|
+
isImaging: d(j),
|
|
163
163
|
uid: z.value,
|
|
164
164
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
165
165
|
hasImg: e.value.userOptions.buttons.img,
|
|
@@ -167,11 +167,11 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
167
167
|
hasXls: !1,
|
|
168
168
|
isFullscreen: I.value,
|
|
169
169
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
170
|
-
chartElement:
|
|
171
|
-
onToggleFullscreen:
|
|
172
|
-
onGeneratePdf: d(
|
|
173
|
-
onGenerateImage: d(
|
|
174
|
-
},
|
|
170
|
+
chartElement: G.value,
|
|
171
|
+
onToggleFullscreen: Z,
|
|
172
|
+
onGeneratePdf: d(B),
|
|
173
|
+
onGenerateImage: d(E)
|
|
174
|
+
}, le({ _: 2 }, [
|
|
175
175
|
t.$slots.optionPdf ? {
|
|
176
176
|
name: "optionPdf",
|
|
177
177
|
fn: A(() => [
|
|
@@ -189,29 +189,29 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
189
189
|
t.$slots.optionFullscreen ? {
|
|
190
190
|
name: "optionFullscreen",
|
|
191
191
|
fn: A(({ toggleFullscreen: a, isFullscreen: r }) => [
|
|
192
|
-
w(t.$slots, "optionFullscreen",
|
|
192
|
+
w(t.$slots, "optionFullscreen", D(M({ toggleFullscreen: a, isFullscreen: r })), void 0, !0)
|
|
193
193
|
]),
|
|
194
194
|
key: "2"
|
|
195
195
|
} : void 0
|
|
196
196
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : _("", !0),
|
|
197
197
|
F.value ? (s(), v("svg", {
|
|
198
198
|
key: 2,
|
|
199
|
-
xmlns: d(
|
|
199
|
+
xmlns: d(ce),
|
|
200
200
|
class: O({ "vue-data-ui-fullscreen--on": I.value, "vue-data-ui-fulscreen--off": !I.value }),
|
|
201
201
|
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
202
202
|
style: S(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
203
203
|
}, [
|
|
204
|
-
e.value.style.chart.layout.curved ? (s(), v("g",
|
|
205
|
-
(s(!0), v(
|
|
204
|
+
e.value.style.chart.layout.curved ? (s(), v("g", _e, [
|
|
205
|
+
(s(!0), v(H, null, R(V.value, (a, r) => (s(), v("path", {
|
|
206
206
|
d: a.curve,
|
|
207
207
|
"stroke-width": c.value.mark,
|
|
208
208
|
stroke: i.value >= r ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
209
209
|
"stroke-linecap": "round",
|
|
210
210
|
fill: "none",
|
|
211
211
|
class: O({ "vue-ui-tick-animated": e.value.style.chart.animation.use && r <= i.value })
|
|
212
|
-
}, null, 10,
|
|
213
|
-
])) : (s(), v("g",
|
|
214
|
-
(s(!0), v(
|
|
212
|
+
}, null, 10, be))), 256))
|
|
213
|
+
])) : (s(), v("g", Ce, [
|
|
214
|
+
(s(!0), v(H, null, R(V.value, (a, r) => (s(), v("line", {
|
|
215
215
|
x1: a.x1,
|
|
216
216
|
y1: a.y1,
|
|
217
217
|
x2: a.x2,
|
|
@@ -219,31 +219,31 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
219
219
|
"stroke-width": c.value.mark,
|
|
220
220
|
stroke: i.value >= r ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
221
221
|
"stroke-linecap": "round"
|
|
222
|
-
}, null, 8,
|
|
222
|
+
}, null, 8, $e))), 256))
|
|
223
223
|
])),
|
|
224
224
|
e.value.style.chart.percentage.show ? (s(), v("text", {
|
|
225
225
|
key: 2,
|
|
226
226
|
x: b.value.x,
|
|
227
227
|
y: b.value.y,
|
|
228
228
|
"font-size": b.value.fontSize,
|
|
229
|
-
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? d(
|
|
229
|
+
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? d(q)(e.value.style.chart.layout.activeColor, i.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
|
|
230
230
|
"font-weight": b.value.bold ? "bold" : "normal",
|
|
231
231
|
"text-anchor": b.value.textAnchor
|
|
232
|
-
},
|
|
232
|
+
}, re(d(ve)(
|
|
233
233
|
e.value.style.chart.percentage.formatter,
|
|
234
234
|
i.value,
|
|
235
|
-
d(
|
|
235
|
+
d(he)({
|
|
236
236
|
v: i.value,
|
|
237
237
|
s: "%",
|
|
238
238
|
r: e.value.style.chart.percentage.rounding
|
|
239
239
|
})
|
|
240
|
-
)), 9,
|
|
240
|
+
)), 9, xe)) : _("", !0),
|
|
241
241
|
w(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
242
|
-
], 14,
|
|
243
|
-
t.$slots.watermark ? (s(), v("div",
|
|
244
|
-
w(t.$slots, "watermark",
|
|
242
|
+
], 14, ke)) : _("", !0),
|
|
243
|
+
t.$slots.watermark ? (s(), v("div", we, [
|
|
244
|
+
w(t.$slots, "watermark", D(M({ isPrinting: d(U) || d(j) })), void 0, !0)
|
|
245
245
|
])) : _("", !0),
|
|
246
|
-
F.value ? _("", !0) : (s(),
|
|
246
|
+
F.value ? _("", !0) : (s(), X(me, {
|
|
247
247
|
key: 4,
|
|
248
248
|
config: {
|
|
249
249
|
type: "tiremarks",
|
|
@@ -255,9 +255,9 @@ const fe = ["id"], pe = ["xmlns", "viewBox"], ke = { key: 0 }, _e = ["d", "strok
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
}, null, 8, ["config"]))
|
|
258
|
-
], 14,
|
|
258
|
+
], 14, pe));
|
|
259
259
|
}
|
|
260
|
-
},
|
|
260
|
+
}, Ge = /* @__PURE__ */ fe(Pe, [["__scopeId", "data-v-51f57492"]]);
|
|
261
261
|
export {
|
|
262
|
-
|
|
262
|
+
Ge as default
|
|
263
263
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-NNZeHOBS.cjs"),ke=require("./Title-PZ6S96pU.cjs"),re=require("./usePrinter-BLbY8qGZ.cjs"),Ce=require("./Tooltip-BoIYPSX3.cjs"),we=require("./Legend-DuuSl2rJ.cjs"),xe=require("./vue-ui-skeleton-CI4t8LHn.cjs"),Te=require("./DataTable-CSEiZDAb.cjs"),$e=require("./vue-ui-accordion-CcdyvXrp.cjs"),ue=require("./useResponsive-B3TrDDIG.cjs"),se=require("./useNestedProp-CPsbJAGj.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function ie(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ce(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=ie(n,s),v=ie(u,s);return i>=v}}function Be(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function _e(n,d){const s={...d,children:n};return ve(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function de(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=U(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},T=Object.assign({},k,t);w=x,g.push(T)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},T=Object.assign({},k,t);b=x,g.push(T)}return g}}function Pe(n){const d=U(n),s=d.width,u=d.height;return Math.min(s,u)}function Oe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function U(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=de(v,h);return f.concat(g)}const C=Pe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let T=0;T<g;T+=1)m+=v[T].normalizedValue;const k=Ee(h,m),x=de(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function ve(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Oe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(ve(s[h]));return Be(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=U(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ce(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ce(p)}}const Le=n=>(e.pushScopeId("data-v-61b57d4b"),n=n(),e.popScopeId(),n),Re=["id"],Fe=["xmlns","viewBox"],Ie={key:0},De=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Le(()=>e.createElementVNode("br",null,null,-1)),Ge={key:3,class:"vue-data-ui-watermark"},je=["onClick"],Xe={key:0},Ye={key:1},Ze=["innerHTML"],Je={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const l=se.useNestedProp({userConfig:u.config,defaultConfig:i});return l.theme?{...se.useNestedProp({userConfig:r.themes.vue_ui_treemap[l.theme]||u.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:T,isImaging:G,generatePdf:j,generateImage:X}=re.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),B=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),P=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function Y(l){l.forEach((a,o)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[o]||r.palette[o]||r.palette[o%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),Y(a.children))})}const O=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),Y(O.value),t.value.responsive){const l=ue.throttle(()=>{const{width:a,height:o}=ue.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=o});D.value=new ResizeObserver(l),D.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(l=>!g.value.includes(l.id))),E=e.computed(()=>O.value.filter(l=>!g.value.includes(l.id)).map(l=>l.value||0).reduce((l,a)=>l+a,0)),Z=e.computed({get(){let l=[...R.value];return t.value.style.chart.layout.sorted&&(l=[...R.value].sort((a,o)=>o.value-a.value)),l.map(a=>({...a}))},set(l){return l}});function J(l,a){return l.value/a}function he(l,a,o){const c=t.value.style.chart.layout.rects.colorRatio-J(a,o);return r.lightenHexColor(l,c<0?0:c)}function K(l,a,o,c){return l.map((y,z)=>{const A=he(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,c),be=J(y,c);return{...y,color:A,proportion:be,parentName:o,children:y.children?K(y.children,A,y.name,c):void 0}})}const F=e.computed(()=>_e(Z.value.map((l,a)=>{const o=l.children?l.children.reduce((c,y)=>c+y.value,0):l.value;return{value:l.value,id:l.id,children:l.children?K(l.children.sort((c,y)=>y.value-c.value),l.color,l.name,o):void 0,color:l.color,name:l.name}}),{x0:P.value.left*2,y0:P.value.top,x1:P.value.width,y1:P.value.height}));function Q({y0:l,y1:a}){return a-l<=0?1e-4:a-l}function ee({x0:l,x1:a}){return a-l<=0?1e-4:a-l}function V(l){const a=t.value.style.chart.layout.labels.fontSize*(l.proportion*2>1?1:l.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(l){b.value=l,w.value+=1}const L=e.computed(()=>({startX:0,startY:0,width:P.value.vbWidth,height:P.value.vbHeight})),$=e.ref(!1);function M(l,a=O.value){for(const o of a){if(o.id===l)return o;if(o.children){const c=M(l,o.children);if(c)return c}}return null}function fe(l){if($.value)s("selectDatapoint",void 0),H.value=O.value;else{if(s("selectDatapoint",l),!M(l.parentId))return;H.value=[M(l.parentId)]}$.value=!$.value}const S=e.ref(null),te=e.computed(()=>O.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((l,a)=>a.value-l.value).map((l,a)=>({...l,proportion:l.value/O.value.map(o=>o.value).reduce((o,c)=>o+c,0),opacity:g.value.includes(l.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function le(l){$.value=!1,S.value=null,g.value.includes(l.id)?g.value=g.value.filter(a=>a!==l.id):g.value.length<u.dataset.length-1&&g.value.push(l.id),s("selectLegend",Z.value)}const W=e.ref(null);function me({datapoint:l,seriesIndex:a}){S.value=l,W.value={datapoint:l,seriesIndex:a,config:t.value,series:R.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:R.value,config:t.value})))C.value=o({seriesIndex:a,datapoint:l,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,c+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${l.color}"/></svg>`,c+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const N=e.computed(()=>{const l=F.value.map(o=>({name:o.name,color:o.color})),a=F.value.map(o=>o.value);return{head:l,body:a}});function oe(){e.nextTick(()=>{const l=N.value.head.map((c,y)=>[[c.name],[N.value.body[y]],[isNaN(N.value.body[y]/E.value)?"-":N.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const A=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},A,isNaN(N.value.body[z]/E.value)?"-":r.dataLabel({v:N.value.body[z]/E.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:a,config:o}});function ye(){return F.value}function ae(){B.value.showTable=!B.value.showTable}function ne(){B.value.showTooltip=!B.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:X,generatePdf:j,toggleTable:ae,toggleTooltip:ne}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(T),isImaging:e.unref(G),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:B.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(j),onGenerateCsv:oe,onGenerateImage:e.unref(X),onToggleTable:ae,onToggleTooltip:ne},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!$.value,"vue-data-ui-zoom-minus":$.value}),viewBox:`${L.value.startX} ${L.value.startY} ${L.value.width<=0?10:L.value.width} ${L.value.height<=0?10:L.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Ie,[e.createElementVNode("radialGradient",{id:`tgrad_${o.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":o.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(o.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,De)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.x0,y:o.y0,height:Q(o),width:ee(o),fill:h.value?o.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${o.id})`:o.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(o),onMouseenter:()=>me({datapoint:o,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===o.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:o.x0,y:o.y0,height:Q(o),width:ee(o),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${V(o)/1.5}px);text-align:left;line-height:${V(o)<14?14:V(o)}px;padding:${V(o)/3}px; color:${e.unref(r.adaptColorToBackground)(o.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(o.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:o})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:o,shouldShow:o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||$.value,fontSize:V(o),isZoom:$.value,textColor:e.unref(r.adaptColorToBackground)(o.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:P.value,isZoom:$.value,rect:S.value,config:t.value})),void 0,!0)],14,Fe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(T)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:4,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:te.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:o})=>le(o))},{item:e.withCtx(({legend:o,index:c})=>[e.createElementVNode("div",{onClick:y=>le(o),style:e.normalizeStyle(`opacity:${g.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o}))+" ",1),g.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",Ye," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Xe," ("+e.toDisplayString(isNaN(o.value/E.value)?"-":(o.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,je)]),_:1},8,["legendSet","config","id"])):e.renderSlot(l.$slots,"legend",{key:1,legend:te.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:B.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:5,hideDetails:"",config:{open:B.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>B.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Ze)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Re))}},Ke=Se._export_sfc(Je,[["__scopeId","data-v-61b57d4b"]]);exports.default=Ke;
|