vue-data-ui 2.4.55 → 2.4.57
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-Lu-rJXGl.cjs → Arrow-BhwhLRcU.cjs} +1 -1
- package/dist/{Arrow-D9oPJhO0.js → Arrow-DelnKkT1.js} +1 -1
- package/dist/{BaseIcon-mHeKnX4-.js → BaseIcon-9gdEHMWK.js} +1 -1
- package/dist/{BaseIcon-DxRKjbz1.cjs → BaseIcon-DujPvdJ_.cjs} +1 -1
- package/dist/{DataTable-rMMvio1U.cjs → DataTable-BUflha5V.cjs} +1 -1
- package/dist/{DataTable-D8MTezlM.js → DataTable-DgbrnD__.js} +2 -2
- package/dist/{Legend-wr5XLSfL.js → Legend-HooNAKB_.js} +1 -1
- package/dist/{Legend-Ba34oTdO.cjs → Legend-V3K-4ipN.cjs} +1 -1
- package/dist/{PackageVersion-xnKIqody.js → PackageVersion-S3SzpuwC.js} +1 -1
- package/dist/{PackageVersion-BJi2ywG9.cjs → PackageVersion-dQYEsTLp.cjs} +1 -1
- package/dist/{PenAndPaper-CX6N7FR7.cjs → PenAndPaper-1h87IVla.cjs} +1 -1
- package/dist/{PenAndPaper-iek0aH4r.js → PenAndPaper-v846FwcH.js} +3 -3
- package/dist/{Shape-B_lWjwmP.js → Shape-D7aacHaz.js} +1 -1
- package/dist/{Shape-9v-w5i6N.cjs → Shape-DV5sH0dX.cjs} +1 -1
- package/dist/{Slicer--m1nOwbO.cjs → Slicer-BRxR5OYL.cjs} +1 -1
- package/dist/{Slicer-Bwg4WzZf.js → Slicer-BXCORSCz.js} +2 -2
- package/dist/{Title-BWhYDGb-.cjs → Title-B-EsW0Q2.cjs} +1 -1
- package/dist/{Title-BecmraNn.js → Title-DLjHHdyq.js} +1 -1
- package/dist/{Tooltip-cPxZzSgr.cjs → Tooltip-B7gYRLGN.cjs} +1 -1
- package/dist/{Tooltip-BZYApG0d.js → Tooltip-BDaa-67h.js} +1 -1
- package/dist/{index-Dhlyke5j.js → index-CI-N9klv.js} +5 -1
- package/dist/index-o6tXRhOr.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +3 -0
- package/dist/types/vue-data-ui.d.ts +3 -0
- package/dist/{useNestedProp-C9KmUVBy.cjs → useNestedProp-D-zaZbSR.cjs} +1 -1
- package/dist/{useNestedProp-D9eTQKze.js → useNestedProp-D1eJ0dvv.js} +1 -1
- package/dist/{usePrinter-BnBk8gnl.js → usePrinter-CXc8xCKk.js} +1 -1
- package/dist/{usePrinter-DpEuGyLP.cjs → usePrinter-H2UFIe6n.cjs} +1 -1
- package/dist/{vue-data-ui-CGGZHtx3.cjs → vue-data-ui-CvfX2D1d.cjs} +1 -1
- package/dist/{vue-data-ui-aSR5-7gp.js → vue-data-ui-DuXblXhF.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-D9pXx9fJ.js → vue-ui-3d-bar-fvTVGk8O.js} +9 -9
- package/dist/{vue-ui-3d-bar-Dm2wnS6e.cjs → vue-ui-3d-bar-zKUnnMOY.cjs} +1 -1
- package/dist/{vue-ui-accordion-CGpOsWNN.js → vue-ui-accordion-CYLks1fW.js} +3 -3
- package/dist/{vue-ui-accordion-mtZIFAv9.cjs → vue-ui-accordion-paZXh-GD.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BcMERmA5.cjs → vue-ui-age-pyramid-Bg8Bexac.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-dbX4WaaY.js → vue-ui-age-pyramid-Ch3nY1Dx.js} +10 -10
- package/dist/{vue-ui-annotator-CY-rCEDB.cjs → vue-ui-annotator-BXbLcJ1L.cjs} +1 -1
- package/dist/{vue-ui-annotator-DfRkh1D_.js → vue-ui-annotator-DGupSF-o.js} +1 -1
- package/dist/{vue-ui-bullet-CUoiQcb5.js → vue-ui-bullet-BSRXabBe.js} +8 -8
- package/dist/{vue-ui-bullet-jsXAmYsX.cjs → vue-ui-bullet-DqM9h81O.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BD58hsql.cjs → vue-ui-candlestick-C0PkovyK.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BLIICgdz.js → vue-ui-candlestick-Dww4XHwQ.js} +11 -11
- package/dist/vue-ui-carousel-table-BZs-sxxu.js +396 -0
- package/dist/vue-ui-carousel-table-DbXCpYUm.cjs +1 -0
- package/dist/{vue-ui-chestnut-vivMozHy.cjs → vue-ui-chestnut-Be4Lagdr.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DIPBJ5D2.js → vue-ui-chestnut-CnupXXAM.js} +8 -8
- package/dist/{vue-ui-cursor-CzLtzn7N.js → vue-ui-cursor-oqfOA98Q.js} +2 -2
- package/dist/{vue-ui-cursor-Cgv_2p2T.cjs → vue-ui-cursor-smlBNiGG.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DqZVcLlQ.js → vue-ui-dashboard-BNu7yNYm.js} +2 -2
- package/dist/{vue-ui-dashboard-CtlrjFxl.cjs → vue-ui-dashboard-Dw_90R29.cjs} +1 -1
- package/dist/{vue-ui-digits-e1HQVXb9.cjs → vue-ui-digits-_8FbgFrI.cjs} +1 -1
- package/dist/{vue-ui-digits-CGFznMkY.js → vue-ui-digits-qztPrOEN.js} +2 -2
- package/dist/{vue-ui-donut-z2eOcEI5.cjs → vue-ui-donut-B7orj3vV.cjs} +1 -1
- package/dist/{vue-ui-donut-DmLq2iWK.js → vue-ui-donut-CK9dINFS.js} +11 -11
- package/dist/{vue-ui-donut-evolution-4odFZbUM.cjs → vue-ui-donut-evolution-BmTzjKlH.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DpollzkH.js → vue-ui-donut-evolution-DpDpYw3f.js} +11 -11
- package/dist/{vue-ui-dumbbell-i7E-B6zN.cjs → vue-ui-dumbbell-5yfcA-Of.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DLr4Lh3u.js → vue-ui-dumbbell-Dx1I89N9.js} +10 -10
- package/dist/{vue-ui-flow-BuYhmRed.cjs → vue-ui-flow-Bar7LG9t.cjs} +1 -1
- package/dist/{vue-ui-flow-CosxAYPJ.js → vue-ui-flow-DJNqydD1.js} +9 -9
- package/dist/{vue-ui-funnel-BNPISgC0.cjs → vue-ui-funnel-lxHehCUr.cjs} +1 -1
- package/dist/{vue-ui-funnel-C_2YAtFj.js → vue-ui-funnel-mP8ftcS5.js} +8 -8
- package/dist/{vue-ui-galaxy-D1cWyHG9.js → vue-ui-galaxy-3cOLS6lh.js} +11 -11
- package/dist/{vue-ui-galaxy-DMOx2Le7.cjs → vue-ui-galaxy-B8zbGikp.cjs} +1 -1
- package/dist/{vue-ui-gauge-Dw7QvZei.cjs → vue-ui-gauge-Bz1nzveF.cjs} +1 -1
- package/dist/{vue-ui-gauge-Dnq0t_eH.js → vue-ui-gauge-CN_zo833.js} +7 -7
- package/dist/{vue-ui-gizmo-DcT9tTS-.cjs → vue-ui-gizmo-C9XQ-7Sj.cjs} +1 -1
- package/dist/{vue-ui-gizmo-vHQVGdpR.js → vue-ui-gizmo-akkNcCWf.js} +3 -3
- package/dist/{vue-ui-heatmap-CtxQI5Mq.js → vue-ui-heatmap-B3ClLioV.js} +10 -10
- package/dist/{vue-ui-heatmap-D-r7qdj0.cjs → vue-ui-heatmap-BW6dmp8j.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BjcPvcaK.js → vue-ui-history-plot-C-EqVFW-.js} +11 -11
- package/dist/{vue-ui-history-plot-B8pP20QN.cjs → vue-ui-history-plot-Mp0zDeR-.cjs} +1 -1
- package/dist/{vue-ui-kpi-BjuKXuQM.js → vue-ui-kpi-C-axCKZx.js} +3 -3
- package/dist/{vue-ui-kpi-BPwU5pay.cjs → vue-ui-kpi-D8hh3p8f.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DE2NXywp.cjs → vue-ui-mini-loader-Cal5W_q6.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DZYw7bD6.js → vue-ui-mini-loader-CsZ1zxJz.js} +2 -2
- package/dist/{vue-ui-molecule-A3yHt8cl.js → vue-ui-molecule-BvNh7REY.js} +11 -11
- package/dist/{vue-ui-molecule-B8I4iuBQ.cjs → vue-ui-molecule-RkdIX-iW.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Dh1qbcXz.js → vue-ui-mood-radar-C7v4dBNw.js} +11 -11
- package/dist/{vue-ui-mood-radar-BKtVVOZz.cjs → vue-ui-mood-radar-DLpDoq0G.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-B5ixdGsx.cjs → vue-ui-nested-donuts-BO249_PV.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DPuIU4IX.js → vue-ui-nested-donuts-C08kpvMd.js} +11 -11
- package/dist/{vue-ui-onion-BTMaTU2a.cjs → vue-ui-onion-BjNQgHPX.cjs} +1 -1
- package/dist/{vue-ui-onion-BgcJBzxI.js → vue-ui-onion-CTLBemDj.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-Cye2V8MQ.cjs → vue-ui-parallel-coordinate-plot-CoeVi-98.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Ksh3Tuvx.js → vue-ui-parallel-coordinate-plot-H1FdP6AE.js} +12 -12
- package/dist/{vue-ui-quadrant-DOet5Q47.cjs → vue-ui-quadrant-D701bdNz.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DGBXeeOe.js → vue-ui-quadrant-Dd-LDy4T.js} +12 -12
- package/dist/{vue-ui-quick-chart-DQcck_x6.js → vue-ui-quick-chart-BeNivWrg.js} +9 -9
- package/dist/{vue-ui-quick-chart-DhCA-7B5.cjs → vue-ui-quick-chart-CRNEkxoM.cjs} +1 -1
- package/dist/{vue-ui-radar-qk20LKHr.cjs → vue-ui-radar-3W9NRklj.cjs} +1 -1
- package/dist/{vue-ui-radar-CI5egNer.js → vue-ui-radar-D9U_vOad.js} +12 -12
- package/dist/{vue-ui-rating-Ch2PSMeW.js → vue-ui-rating-B7AlAqCY.js} +2 -2
- package/dist/{vue-ui-rating-CYhvKLSi.cjs → vue-ui-rating-DeuaL_cU.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-t-WDgqtA.cjs → vue-ui-relation-circle-B8JtK-JM.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-G6KC4zs0.js → vue-ui-relation-circle-CT23BNcW.js} +7 -7
- package/dist/{vue-ui-rings-NIIfGve4.js → vue-ui-rings-BZ7FYYxr.js} +11 -11
- package/dist/{vue-ui-rings-DxpkXXwJ.cjs → vue-ui-rings-CZCTLghE.cjs} +1 -1
- package/dist/{vue-ui-scatter-BqxcKjb2.js → vue-ui-scatter-DMr8OrC3.js} +12 -12
- package/dist/{vue-ui-scatter-DynxMn7l.cjs → vue-ui-scatter-DlA0xU5U.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BUP9G_uK.cjs → vue-ui-screenshot-BFV1qEsF.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DreZMmrO.js → vue-ui-screenshot-DHiX35pR.js} +1 -1
- package/dist/{vue-ui-skeleton-D_lU-hWK.cjs → vue-ui-skeleton-BIWgLDDf.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DQqwDUqP.js → vue-ui-skeleton-owIhXtQF.js} +3 -3
- package/dist/{vue-ui-smiley-AGwF1X7u.cjs → vue-ui-smiley-BISneB7t.cjs} +1 -1
- package/dist/{vue-ui-smiley-CdmO39JE.js → vue-ui-smiley-CCOQ6zjo.js} +2 -2
- package/dist/{vue-ui-spark-trend-BUx5YwEZ.js → vue-ui-spark-trend-B56DI3Mc.js} +5 -5
- package/dist/{vue-ui-spark-trend-DD1s6Thz.cjs → vue-ui-spark-trend-lMzod-5S.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-KZd6YQwQ.js → vue-ui-sparkbar-CMkozDkx.js} +4 -4
- package/dist/{vue-ui-sparkbar-mlrF_QEO.cjs → vue-ui-sparkbar-DcdDLl8l.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-B4J8ZYzs.cjs → vue-ui-sparkgauge-BhwNRzrD.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Db-d9x9r.js → vue-ui-sparkgauge-De06LRPj.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-B61JDza9.js → vue-ui-sparkhistogram-CBDd7jIn.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DzJ5NNi9.cjs → vue-ui-sparkhistogram-D00ahrgs.cjs} +1 -1
- package/dist/{vue-ui-sparkline-P6ubVgp0.js → vue-ui-sparkline-BJejWvTN.js} +4 -4
- package/dist/{vue-ui-sparkline-S6HehQ0a.cjs → vue-ui-sparkline-CY92qVz0.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BDBqoeJQ.cjs → vue-ui-sparkstackbar-BjKL_6dq.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DKtOqh-Y.js → vue-ui-sparkstackbar-DlnmPom2.js} +5 -5
- package/dist/{vue-ui-stackbar-WShCS9A1.js → vue-ui-stackbar-19XdLQXB.js} +306 -291
- package/dist/vue-ui-stackbar-T4VBFpDo.cjs +6 -0
- package/dist/{vue-ui-strip-plot-Bq3u8k2l.js → vue-ui-strip-plot-Bly8GoNP.js} +11 -11
- package/dist/{vue-ui-strip-plot-DH4LQTfB.cjs → vue-ui-strip-plot-CtjbMamo.cjs} +1 -1
- package/dist/{vue-ui-table-sJN2rS51.js → vue-ui-table-BUF6Pyfp.js} +1 -1
- package/dist/{vue-ui-table-aV4pHrWD.cjs → vue-ui-table-BisPh85-.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DsdyE14x.js → vue-ui-table-heatmap-By-MmFiq.js} +4 -4
- package/dist/{vue-ui-table-heatmap-CruECEYA.cjs → vue-ui-table-heatmap-CPn-jC0n.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CcsNg6th.cjs → vue-ui-table-sparkline-CIDuWZZs.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BlUe2QFV.js → vue-ui-table-sparkline-DG70UNkU.js} +5 -5
- package/dist/{vue-ui-thermometer-ButIh820.cjs → vue-ui-thermometer-CMvk1D7J.cjs} +1 -1
- package/dist/{vue-ui-thermometer-80aa72_6.js → vue-ui-thermometer-Vr2IP_p0.js} +7 -7
- package/dist/{vue-ui-timer-CuUSpISM.js → vue-ui-timer-CD7gFOjN.js} +5 -5
- package/dist/{vue-ui-timer-Dk4I7cRn.cjs → vue-ui-timer-CUHgN89f.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CQ98xHZ5.js → vue-ui-tiremarks-44pO3jx1.js} +7 -7
- package/dist/{vue-ui-tiremarks-BsYfeNCN.cjs → vue-ui-tiremarks-w_gxHFeB.cjs} +1 -1
- package/dist/{vue-ui-treemap-CHXb8mBG.cjs → vue-ui-treemap-CFhTEaxa.cjs} +1 -1
- package/dist/{vue-ui-treemap-s1nZAhAS.js → vue-ui-treemap-CyOUM3-P.js} +11 -11
- package/dist/{vue-ui-vertical-bar-iZWowEik.cjs → vue-ui-vertical-bar-C51RKLB8.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Dd306Z10.js → vue-ui-vertical-bar-wngOp0Zc.js} +11 -11
- package/dist/{vue-ui-waffle-BJgSuNVY.cjs → vue-ui-waffle-CXZc4t27.cjs} +1 -1
- package/dist/{vue-ui-waffle-CQfOCZjf.js → vue-ui-waffle-CuN7i0ci.js} +11 -11
- package/dist/{vue-ui-wheel-DB-4Rn84.js → vue-ui-wheel-B_gLugLx.js} +7 -7
- package/dist/{vue-ui-wheel-s8UTbo9G.cjs → vue-ui-wheel-u9Vc7ZTZ.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-C-l2Z3Dd.js → vue-ui-word-cloud-DKHGS0my.js} +10 -10
- package/dist/{vue-ui-word-cloud-DvfOJe4M.cjs → vue-ui-word-cloud-tSXyXvd6.cjs} +1 -1
- package/dist/{vue-ui-xy-P_VLOaMg.js → vue-ui-xy-BK9R8MrJ.js} +14 -14
- package/dist/{vue-ui-xy-D1Nkk2Gp.cjs → vue-ui-xy-bX3g4COC.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-BwNEs-cY.js → vue-ui-xy-canvas-DaT4HoWD.js} +11 -11
- package/dist/{vue-ui-xy-canvas-CIKl9AXf.cjs → vue-ui-xy-canvas-gDaRsnBI.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-DGcOW0vL.cjs +0 -9
- package/dist/vue-ui-carousel-table-CCmB_BJ7.cjs +0 -1
- package/dist/vue-ui-carousel-table-NUliqwxA.js +0 -379
- package/dist/vue-ui-stackbar-DCCcEgQZ.cjs +0 -6
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { ref as l, onMounted as F, computed as B, watch as E, onBeforeUnmount as ce, nextTick as fe, openBlock as s, createElementBlock as v, unref as r, createElementVNode as H, normalizeStyle as p, normalizeClass as Oe, createTextVNode as L, toDisplayString as G, renderSlot as f, Fragment as D, renderList as X, normalizeProps as j, guardReactiveProps as J, createCommentVNode as P, createBlock as he, createSlots as Ie, withCtx as R } from "vue";
|
|
2
|
+
import { u as Fe, c as Be, o as K, e as Q, s as Pe, q as Re, r as ze } from "./index-CI-N9klv.js";
|
|
3
|
+
import { u as Se } from "./useNestedProp-D1eJ0dvv.js";
|
|
4
|
+
import { u as Ee, U as He } from "./usePrinter-CXc8xCKk.js";
|
|
5
|
+
import Ne from "./vue-ui-skeleton-owIhXtQF.js";
|
|
6
|
+
import { u as Ue } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { _ as Me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const Ve = ["id"], qe = ["height"], Le = ["data-cell", "height"], Ge = {
|
|
9
|
+
key: 2,
|
|
10
|
+
ref: "source",
|
|
11
|
+
dir: "auto"
|
|
12
|
+
}, De = {
|
|
13
|
+
__name: "vue-ui-carousel-table",
|
|
14
|
+
props: {
|
|
15
|
+
config: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default() {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
dataset: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default() {
|
|
24
|
+
return {};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
setup(T, { expose: ge }) {
|
|
29
|
+
const i = T, { vue_ui_carousel_table: me } = Fe(), N = l(Be()), W = l(!1), k = l(!!i.dataset);
|
|
30
|
+
F(() => {
|
|
31
|
+
Y();
|
|
32
|
+
});
|
|
33
|
+
function Y() {
|
|
34
|
+
K(i.dataset) ? Q({
|
|
35
|
+
componentName: "VueUiCarouselTable",
|
|
36
|
+
type: "dataset"
|
|
37
|
+
}) : ((!i.dataset.head || K(i.dataset.head)) && (Q({
|
|
38
|
+
componentName: "VueUiCarouselTable",
|
|
39
|
+
type: "datasetAttribute",
|
|
40
|
+
property: "head"
|
|
41
|
+
}), k.value = !1), (!i.dataset.body || K(i.dataset.body)) && (Q({
|
|
42
|
+
componentName: "VueUiCarouselTable",
|
|
43
|
+
type: "datasetAttribute",
|
|
44
|
+
property: "body"
|
|
45
|
+
}), k.value = !1));
|
|
46
|
+
}
|
|
47
|
+
const e = B({
|
|
48
|
+
get: () => ee(),
|
|
49
|
+
set: (t) => t
|
|
50
|
+
}), { userOptionsVisible: U, setUserOptionsVisibility: Z, keepUserOptionState: _ } = Ue({ config: e.value });
|
|
51
|
+
function ee() {
|
|
52
|
+
return Se({
|
|
53
|
+
userConfig: i.config,
|
|
54
|
+
defaultConfig: me
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
E(() => i.config, (t) => {
|
|
58
|
+
e.value = ee(), U.value = !e.value.showOnChartHover, Y();
|
|
59
|
+
}, { deep: !0 }), E(() => i.dataset, (t) => {
|
|
60
|
+
M();
|
|
61
|
+
}, { deep: !0 });
|
|
62
|
+
const { isPrinting: te, isImaging: ae, generatePdf: be, generateImage: oe } = Ee({
|
|
63
|
+
elementId: `carousel-table_${N.value}`,
|
|
64
|
+
fileName: e.value.caption.text || "vue-ui-carousel-table"
|
|
65
|
+
}), h = l({
|
|
66
|
+
showAnimation: e.value.animation.use
|
|
67
|
+
}), n = l(null), le = l(null), w = l(null), x = l(null), O = l(0), z = l(0), S = l(!1), I = l(null), b = l(null), A = l(0);
|
|
68
|
+
function M() {
|
|
69
|
+
I.value && (b.value = {
|
|
70
|
+
elements: I.value.getElementsByTagName("tr"),
|
|
71
|
+
heights: Array.from(I.value.getElementsByTagName("tr")).map((t) => t.getBoundingClientRect().height)
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
F(M);
|
|
75
|
+
const ye = B(() => !b.value || !b.value.heights.length ? 0 : Math.max(...b.value.heights) + O.value + z.value), Ce = B(() => i.dataset.body ? e.value.tbody.tr.visible <= i.dataset.body.length ? e.value.tbody.tr.visible : i.dataset.body.length : 0), $e = B(() => (e.value.tbody.tr.height + e.value.tbody.tr.td.padding.top + e.value.tbody.tr.td.padding.bottom + e.value.tbody.tr.border.size * 2) * Ce.value + O.value + z.value), c = l(0), y = l(null), d = l(0), C = l(!1), ne = l(0);
|
|
76
|
+
F(() => {
|
|
77
|
+
w.value && (O.value = w.value.getBoundingClientRect().height), x.value && (z.value = x.value.getBoundingClientRect().height), h.value.showAnimation && b.value && ie();
|
|
78
|
+
}), F(() => {
|
|
79
|
+
if (n.value) {
|
|
80
|
+
let o = function() {
|
|
81
|
+
const u = t.getBoundingClientRect().bottom;
|
|
82
|
+
a.forEach((m) => {
|
|
83
|
+
m.getBoundingClientRect().top < u ? m.style.visibility = "hidden" : m.style.visibility = "visible";
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
const t = n.value.querySelector("thead"), a = Array.from(I.value.querySelectorAll("tr"));
|
|
87
|
+
n.value.addEventListener("scroll", o), o(), ce(() => {
|
|
88
|
+
n.value.removeEventListener("scroll", o);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
function Te(t) {
|
|
93
|
+
W.value = t, ne.value += 1;
|
|
94
|
+
}
|
|
95
|
+
function ie() {
|
|
96
|
+
!y.value && !C.value && (e.value.animation.type === "scroll" ? y.value = requestAnimationFrame(ue) : y.value = requestAnimationFrame(se));
|
|
97
|
+
}
|
|
98
|
+
function Ae() {
|
|
99
|
+
if (!n.value) return !1;
|
|
100
|
+
const { scrollTop: t, scrollHeight: a, clientHeight: o } = n.value;
|
|
101
|
+
return t + o >= a;
|
|
102
|
+
}
|
|
103
|
+
function ue(t) {
|
|
104
|
+
if (C.value) return;
|
|
105
|
+
d.value || (d.value = t), t - d.value >= e.value.animation.speedMs && (c.value += b.value.heights[A.value], (Ae() || A.value >= b.value.heights.length) && (c.value = 0, A.value = -1), A.value += 1, n.value && n.value.scrollTo({
|
|
106
|
+
top: c.value,
|
|
107
|
+
behavior: "smooth"
|
|
108
|
+
}), d.value = t), y.value = requestAnimationFrame(ue);
|
|
109
|
+
}
|
|
110
|
+
function se(t) {
|
|
111
|
+
if (C.value) return;
|
|
112
|
+
d.value || (d.value = t);
|
|
113
|
+
const a = t - d.value, o = e.value.animation.speedMs / 4 / 1e3;
|
|
114
|
+
a >= o && (c.value += o, c.value >= n.value.scrollHeight - n.value.clientHeight && (c.value = 0), n.value && n.value.scrollTo({
|
|
115
|
+
top: c.value,
|
|
116
|
+
behavior: "auto"
|
|
117
|
+
}), d.value = t), y.value = requestAnimationFrame(se);
|
|
118
|
+
}
|
|
119
|
+
function g() {
|
|
120
|
+
C.value = !0, cancelAnimationFrame(y.value), y.value = null;
|
|
121
|
+
}
|
|
122
|
+
ce(g);
|
|
123
|
+
function $() {
|
|
124
|
+
!C.value || !h.value.showAnimation || (C.value = !1, d.value = 0, ie());
|
|
125
|
+
}
|
|
126
|
+
function ke() {
|
|
127
|
+
e.value.animation.pauseOnHover && g();
|
|
128
|
+
}
|
|
129
|
+
const V = l(null);
|
|
130
|
+
function we() {
|
|
131
|
+
g(), clearTimeout(V.value);
|
|
132
|
+
}
|
|
133
|
+
function re() {
|
|
134
|
+
clearTimeout(V.value), V.value = setTimeout($, 1e3);
|
|
135
|
+
}
|
|
136
|
+
E(
|
|
137
|
+
() => e.value.animation.use,
|
|
138
|
+
(t) => {
|
|
139
|
+
t ? (h.value.showAnimation = !0, $()) : (h.value.showAnimation = !1, g());
|
|
140
|
+
}
|
|
141
|
+
), E(
|
|
142
|
+
() => e.value.animation.type,
|
|
143
|
+
(t) => {
|
|
144
|
+
g(), c.value = 0, A.value = 0, n.value.scrollTo({
|
|
145
|
+
top: 0,
|
|
146
|
+
behavior: "auto"
|
|
147
|
+
}), $();
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
const xe = B(() => e.value.responsiveBreakpoint);
|
|
151
|
+
F(() => {
|
|
152
|
+
const t = new ResizeObserver((a) => {
|
|
153
|
+
a.forEach((o) => {
|
|
154
|
+
S.value = o.contentRect.width < xe.value;
|
|
155
|
+
}), O.value = w.value ? w.value.getBoundingClientRect().height : 0, z.value = x.value ? x.value.getBoundingClientRect().height : 0, A.value = 0, fe(() => {
|
|
156
|
+
g(), d.value = 0, c.value = 0, M(), $();
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
n.value && t.observe(n.value);
|
|
160
|
+
});
|
|
161
|
+
function de() {
|
|
162
|
+
be();
|
|
163
|
+
}
|
|
164
|
+
function ve() {
|
|
165
|
+
h.value.showAnimation = !h.value.showAnimation, h.value.showAnimation ? $() : g();
|
|
166
|
+
}
|
|
167
|
+
function pe() {
|
|
168
|
+
fe(() => {
|
|
169
|
+
const t = i.dataset.head.map((u, m) => [
|
|
170
|
+
[i.dataset.body[m]]
|
|
171
|
+
]), a = [
|
|
172
|
+
[e.value.caption.text],
|
|
173
|
+
[i.dataset.head.map((u) => [u])]
|
|
174
|
+
].concat(t), o = Re(a);
|
|
175
|
+
ze({
|
|
176
|
+
csvContent: o,
|
|
177
|
+
title: e.value.caption.text || "vue-ui-carousel-table"
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
return ge({
|
|
182
|
+
pauseAnimation: g,
|
|
183
|
+
resumeAnimation: $,
|
|
184
|
+
toggleAnimation: ve,
|
|
185
|
+
generateCsv: pe,
|
|
186
|
+
generatePdf: de,
|
|
187
|
+
generateImage: oe
|
|
188
|
+
}), (t, a) => (s(), v("div", {
|
|
189
|
+
style: { position: "relative", overflow: "visible" },
|
|
190
|
+
ref_key: "chartContainer",
|
|
191
|
+
ref: le,
|
|
192
|
+
onMouseenter: a[5] || (a[5] = () => r(Z)(!0)),
|
|
193
|
+
onMouseleave: a[6] || (a[6] = () => r(Z)(!1))
|
|
194
|
+
}, [
|
|
195
|
+
H("div", {
|
|
196
|
+
ref_key: "tableContainer",
|
|
197
|
+
ref: n,
|
|
198
|
+
id: `carousel-table_${N.value}`,
|
|
199
|
+
style: p({
|
|
200
|
+
height: r(te) || r(ae) ? "auto" : `${Math.max($e.value, ye.value)}px`,
|
|
201
|
+
containerType: "inline-size",
|
|
202
|
+
position: "relative",
|
|
203
|
+
overflow: "auto",
|
|
204
|
+
fontFamily: e.value.fontFamily
|
|
205
|
+
}),
|
|
206
|
+
class: Oe({ "vue-ui-responsive": S.value, "is-playing": e.value.scrollbar.hide || !C.value && e.value.scrollbar.showOnlyOnHover }),
|
|
207
|
+
onMouseover: a[0] || (a[0] = (o) => ke()),
|
|
208
|
+
onMouseleave: a[1] || (a[1] = (o) => $()),
|
|
209
|
+
onTouchstart: a[2] || (a[2] = (o) => we()),
|
|
210
|
+
onTouchend: a[3] || (a[3] = (o) => re()),
|
|
211
|
+
onTouchcancel: a[4] || (a[4] = (o) => re())
|
|
212
|
+
}, [
|
|
213
|
+
k.value ? (s(), v("table", {
|
|
214
|
+
key: 0,
|
|
215
|
+
class: "vue-data-ui-carousel-table",
|
|
216
|
+
style: p({
|
|
217
|
+
...e.value.style,
|
|
218
|
+
border: `${e.value.border.size}px solid ${e.value.border.color}`,
|
|
219
|
+
width: "100%",
|
|
220
|
+
borderCollapse: "collapse",
|
|
221
|
+
backgroundColor: e.value.tbody.backgroundColor
|
|
222
|
+
})
|
|
223
|
+
}, [
|
|
224
|
+
H("caption", {
|
|
225
|
+
ref_key: "caption",
|
|
226
|
+
ref: w,
|
|
227
|
+
class: "vue-data-ui-carousel-table-caption",
|
|
228
|
+
style: p({
|
|
229
|
+
...e.value.caption.style,
|
|
230
|
+
fontFamily: "inherit",
|
|
231
|
+
position: "sticky",
|
|
232
|
+
top: 0,
|
|
233
|
+
zIndex: 2,
|
|
234
|
+
paddingTop: e.value.caption.padding.top + "px",
|
|
235
|
+
paddingRight: e.value.caption.padding.right + "px",
|
|
236
|
+
paddingBottom: e.value.caption.padding.bottom + "px",
|
|
237
|
+
paddingLeft: e.value.caption.padding.left + "px",
|
|
238
|
+
boxShadow: S.value ? e.value.thead.tr.style.boxShadow : "none",
|
|
239
|
+
minHeight: "36px",
|
|
240
|
+
display: t.$slots.caption || e.value.caption.text || e.value.userOptions.show ? "" : "none"
|
|
241
|
+
})
|
|
242
|
+
}, [
|
|
243
|
+
L(G(e.value.caption.text && !t.$slots.caption ? e.value.caption.text : "") + " ", 1),
|
|
244
|
+
f(t.$slots, "caption", {}, void 0, !0)
|
|
245
|
+
], 4),
|
|
246
|
+
H("thead", {
|
|
247
|
+
style: p({ ...e.value.thead.style, position: "sticky", top: `${t.$slots.caption || e.value.caption.text || e.value.userOptions.show ? O.value : 0}px`, zIndex: 1 })
|
|
248
|
+
}, [
|
|
249
|
+
H("tr", {
|
|
250
|
+
ref_key: "tableRow",
|
|
251
|
+
ref: x,
|
|
252
|
+
role: "row",
|
|
253
|
+
style: p({
|
|
254
|
+
...e.value.thead.tr.style,
|
|
255
|
+
border: e.value.thead.tr.border.size ? `${e.value.thead.tr.border.size}px solid ${e.value.thead.tr.border.color}` : "none",
|
|
256
|
+
boxShadow: S.value ? "none" : e.value.thead.tr.style.boxShadow
|
|
257
|
+
}),
|
|
258
|
+
height: `${e.value.thead.tr.height}px`
|
|
259
|
+
}, [
|
|
260
|
+
(s(!0), v(D, null, X(T.dataset.head, (o, u) => (s(), v("th", {
|
|
261
|
+
role: "cell",
|
|
262
|
+
key: `th_${u}`,
|
|
263
|
+
style: p({
|
|
264
|
+
...e.value.thead.tr.th.style,
|
|
265
|
+
border: e.value.thead.tr.th.border.size ? `${e.value.thead.tr.th.border.size}px solid ${e.value.thead.tr.th.border.color}` : "none",
|
|
266
|
+
paddingTop: e.value.thead.tr.th.padding.top + "px",
|
|
267
|
+
paddingRight: e.value.thead.tr.th.padding.right + "px",
|
|
268
|
+
paddingBottom: e.value.thead.tr.th.padding.bottom + "px",
|
|
269
|
+
paddingLeft: e.value.thead.tr.th.padding.left + "px"
|
|
270
|
+
})
|
|
271
|
+
}, [
|
|
272
|
+
L(G(t.$slots.th ? "" : o) + " ", 1),
|
|
273
|
+
f(t.$slots, "th", j(J({ th: o, colIndex: u })), void 0, !0)
|
|
274
|
+
], 4))), 128))
|
|
275
|
+
], 12, qe)
|
|
276
|
+
], 4),
|
|
277
|
+
T.dataset.body && T.dataset.head ? (s(), v("tbody", {
|
|
278
|
+
key: 0,
|
|
279
|
+
ref_key: "tbody",
|
|
280
|
+
ref: I,
|
|
281
|
+
style: p({
|
|
282
|
+
clipPath: "inset(0,0,0,0)"
|
|
283
|
+
})
|
|
284
|
+
}, [
|
|
285
|
+
(s(!0), v(D, null, X(T.dataset.body, (o, u) => (s(), v("tr", {
|
|
286
|
+
style: p({
|
|
287
|
+
...e.value.tbody.tr.style,
|
|
288
|
+
border: `${e.value.tbody.tr.border.size}px solid ${e.value.tbody.tr.border.color}`,
|
|
289
|
+
verticalAlign: "middle"
|
|
290
|
+
})
|
|
291
|
+
}, [
|
|
292
|
+
(s(!0), v(D, null, X(o, (m, q) => (s(), v("td", {
|
|
293
|
+
role: "cell",
|
|
294
|
+
"data-cell": T.dataset.head[q] || "",
|
|
295
|
+
style: p({
|
|
296
|
+
...e.value.tbody.tr.td.style,
|
|
297
|
+
border: `${e.value.tbody.tr.td.border.size}px solid ${e.value.tbody.tr.td.border.color}`,
|
|
298
|
+
backgroundColor: r(Pe)(e.value.tbody.tr.td.style.backgroundColor, u % 2 === 0 && e.value.tbody.tr.td.alternateColor ? e.value.tbody.tr.td.alternateOpacity * 100 : 100),
|
|
299
|
+
paddingTop: e.value.tbody.tr.td.padding.top + "px",
|
|
300
|
+
paddingRight: e.value.tbody.tr.td.padding.right + "px",
|
|
301
|
+
paddingBottom: e.value.tbody.tr.td.padding.bottom + "px",
|
|
302
|
+
paddingLeft: e.value.tbody.tr.td.padding.left + "px",
|
|
303
|
+
verticalAlign: "middle"
|
|
304
|
+
}),
|
|
305
|
+
height: `${e.value.tbody.tr.height}px`
|
|
306
|
+
}, [
|
|
307
|
+
L(G(t.$slots.td ? "" : m) + " ", 1),
|
|
308
|
+
f(t.$slots, "td", j(J({ td: m, rowIndex: u, colIndex: q })), void 0, !0)
|
|
309
|
+
], 12, Le))), 256))
|
|
310
|
+
], 4))), 256))
|
|
311
|
+
], 4)) : P("", !0)
|
|
312
|
+
], 4)) : P("", !0)
|
|
313
|
+
], 46, Ve),
|
|
314
|
+
k.value ? P("", !0) : (s(), he(Ne, {
|
|
315
|
+
key: 0,
|
|
316
|
+
config: {
|
|
317
|
+
type: "table"
|
|
318
|
+
}
|
|
319
|
+
})),
|
|
320
|
+
e.value.userOptions.show && k.value && (r(_) || r(U)) ? (s(), he(He, {
|
|
321
|
+
ref: "details",
|
|
322
|
+
key: `user_option_${ne.value}`,
|
|
323
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
324
|
+
color: e.value.style.color,
|
|
325
|
+
isPrinting: r(te),
|
|
326
|
+
isImaging: r(ae),
|
|
327
|
+
uid: N.value,
|
|
328
|
+
hasTooltip: !1,
|
|
329
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
330
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
331
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
332
|
+
hasTable: !1,
|
|
333
|
+
hasLabel: !1,
|
|
334
|
+
hasAnimation: e.value.userOptions.buttons.animation,
|
|
335
|
+
isAnimation: !h.value.showAnimation,
|
|
336
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
337
|
+
isFullscreen: W.value,
|
|
338
|
+
chartElement: le.value,
|
|
339
|
+
position: e.value.userOptions.position,
|
|
340
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
341
|
+
zIndex: 3,
|
|
342
|
+
offsetX: 12,
|
|
343
|
+
onGeneratePdf: de,
|
|
344
|
+
onGenerateCsv: pe,
|
|
345
|
+
onGenerateImage: r(oe),
|
|
346
|
+
onToggleAnimation: ve,
|
|
347
|
+
onToggleFullscreen: Te,
|
|
348
|
+
style: p({
|
|
349
|
+
visibility: r(_) ? r(U) ? "visible" : "hidden" : "visible"
|
|
350
|
+
})
|
|
351
|
+
}, Ie({ _: 2 }, [
|
|
352
|
+
t.$slots.optionPdf ? {
|
|
353
|
+
name: "optionPdf",
|
|
354
|
+
fn: R(() => [
|
|
355
|
+
f(t.$slots, "optionPdf", {}, void 0, !0)
|
|
356
|
+
]),
|
|
357
|
+
key: "0"
|
|
358
|
+
} : void 0,
|
|
359
|
+
t.$slots.optionCsv ? {
|
|
360
|
+
name: "optionCsv",
|
|
361
|
+
fn: R(() => [
|
|
362
|
+
f(t.$slots, "optionCsv", {}, void 0, !0)
|
|
363
|
+
]),
|
|
364
|
+
key: "1"
|
|
365
|
+
} : void 0,
|
|
366
|
+
t.$slots.optionImg ? {
|
|
367
|
+
name: "optionImg",
|
|
368
|
+
fn: R(() => [
|
|
369
|
+
f(t.$slots, "optionImg", {}, void 0, !0)
|
|
370
|
+
]),
|
|
371
|
+
key: "2"
|
|
372
|
+
} : void 0,
|
|
373
|
+
t.$slots.optionAnimation ? {
|
|
374
|
+
name: "optionAnimation",
|
|
375
|
+
fn: R(() => [
|
|
376
|
+
f(t.$slots, "optionAnimation", {}, void 0, !0)
|
|
377
|
+
]),
|
|
378
|
+
key: "3"
|
|
379
|
+
} : void 0,
|
|
380
|
+
t.$slots.optionFullscreen ? {
|
|
381
|
+
name: "optionFullscreen",
|
|
382
|
+
fn: R(({ toggleFullscreen: o, isFullscreen: u }) => [
|
|
383
|
+
f(t.$slots, "optionFullscreen", j(J({ toggleFullscreen: o, isFullscreen: u })), void 0, !0)
|
|
384
|
+
]),
|
|
385
|
+
key: "4"
|
|
386
|
+
} : void 0
|
|
387
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasAnimation", "isAnimation", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "onGenerateImage", "style"])) : P("", !0),
|
|
388
|
+
t.$slots.source ? (s(), v("div", Ge, [
|
|
389
|
+
f(t.$slots, "source", {}, void 0, !0)
|
|
390
|
+
], 512)) : P("", !0)
|
|
391
|
+
], 544));
|
|
392
|
+
}
|
|
393
|
+
}, Ze = /* @__PURE__ */ Me(De, [["__scopeId", "data-v-395bb430"]]);
|
|
394
|
+
export {
|
|
395
|
+
Ze as default
|
|
396
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-o6tXRhOr.cjs"),ie=require("./useNestedProp-D-zaZbSR.cjs"),Q=require("./usePrinter-H2UFIe6n.cjs"),ue=require("./vue-ui-skeleton-BIWgLDDf.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],ce=["height"],pe=["data-cell","height"],fe={key:2,ref:"source",dir:"auto"},me={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(b,{expose:W}){const r=b,{vue_ui_carousel_table:Y}=u.useConfig(),S=e.ref(u.createUid()),I=e.ref(!1),k=e.ref(!!r.dataset);e.onMounted(()=>{F()});function F(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!r.dataset.head||u.objectIsEmpty(r.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),k.value=!1),(!r.dataset.body||u.objectIsEmpty(r.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),k.value=!1))}const t=e.computed({get:()=>R(),set:o=>o}),{userOptionsVisible:A,setUserOptionsVisibility:P,keepUserOptionState:N}=se.useUserOptionState({config:t.value});function R(){return ie.useNestedProp({userConfig:r.config,defaultConfig:Y})}e.watch(()=>r.config,o=>{t.value=R(),A.value=!t.value.showOnChartHover,F()},{deep:!0}),e.watch(()=>r.dataset,o=>{O()},{deep:!0});const{isPrinting:V,isImaging:q,generatePdf:Z,generateImage:M}=Q.usePrinter({elementId:`carousel-table_${S.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),v=e.ref({showAnimation:t.value.animation.use}),l=e.ref(null),H=e.ref(null),C=e.ref(null),T=e.ref(null),$=e.ref(0),B=e.ref(0),x=e.ref(!1),w=e.ref(null),f=e.ref(null),y=e.ref(0);function O(){w.value&&(f.value={elements:w.value.getElementsByTagName("tr"),heights:Array.from(w.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(O);const _=e.computed(()=>!f.value||!f.value.heights.length?0:Math.max(...f.value.heights)+$.value+B.value),ee=e.computed(()=>r.dataset.body?t.value.tbody.tr.visible<=r.dataset.body.length?t.value.tbody.tr.visible:r.dataset.body.length:0),te=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*ee.value+$.value+B.value),d=e.ref(0),m=e.ref(null),s=e.ref(0),h=e.ref(!1),U=e.ref(0);e.onMounted(()=>{C.value&&($.value=C.value.getBoundingClientRect().height),T.value&&(B.value=T.value.getBoundingClientRect().height),v.value.showAnimation&&f.value&&L()}),e.onMounted(()=>{if(l.value){let n=function(){const i=o.getBoundingClientRect().bottom;a.forEach(p=>{p.getBoundingClientRect().top<i?p.style.visibility="hidden":p.style.visibility="visible"})};const o=l.value.querySelector("thead"),a=Array.from(w.value.querySelectorAll("tr"));l.value.addEventListener("scroll",n),n(),e.onBeforeUnmount(()=>{l.value.removeEventListener("scroll",n)})}});function oe(o){I.value=o,U.value+=1}function L(){!m.value&&!h.value&&(t.value.animation.type==="scroll"?m.value=requestAnimationFrame(D):m.value=requestAnimationFrame(G))}function ae(){if(!l.value)return!1;const{scrollTop:o,scrollHeight:a,clientHeight:n}=l.value;return o+n>=a}function D(o){if(h.value)return;s.value||(s.value=o),o-s.value>=t.value.animation.speedMs&&(d.value+=f.value.heights[y.value],(ae()||y.value>=f.value.heights.length)&&(d.value=0,y.value=-1),y.value+=1,l.value&&l.value.scrollTo({top:d.value,behavior:"smooth"}),s.value=o),m.value=requestAnimationFrame(D)}function G(o){if(h.value)return;s.value||(s.value=o);const a=o-s.value,n=t.value.animation.speedMs/4/1e3;a>=n&&(d.value+=n,d.value>=l.value.scrollHeight-l.value.clientHeight&&(d.value=0),l.value&&l.value.scrollTo({top:d.value,behavior:"auto"}),s.value=o),m.value=requestAnimationFrame(G)}function c(){h.value=!0,cancelAnimationFrame(m.value),m.value=null}e.onBeforeUnmount(c);function g(){!h.value||!v.value.showAnimation||(h.value=!1,s.value=0,L())}function ne(){t.value.animation.pauseOnHover&&c()}const E=e.ref(null);function le(){c(),clearTimeout(E.value)}function j(){clearTimeout(E.value),E.value=setTimeout(g,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(v.value.showAnimation=!0,g()):(v.value.showAnimation=!1,c())}),e.watch(()=>t.value.animation.type,o=>{c(),d.value=0,y.value=0,l.value.scrollTo({top:0,behavior:"auto"}),g()});const re=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(a=>{a.forEach(n=>{x.value=n.contentRect.width<re.value}),$.value=C.value?C.value.getBoundingClientRect().height:0,B.value=T.value?T.value.getBoundingClientRect().height:0,y.value=0,e.nextTick(()=>{c(),s.value=0,d.value=0,O(),g()})});l.value&&o.observe(l.value)});function X(){Z()}function J(){v.value.showAnimation=!v.value.showAnimation,v.value.showAnimation?g():c()}function K(){e.nextTick(()=>{const o=r.dataset.head.map((i,p)=>[[r.dataset.body[p]]]),a=[[t.value.caption.text],[r.dataset.head.map(i=>[i])]].concat(o),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.caption.text||"vue-ui-carousel-table"})})}return W({pauseAnimation:c,resumeAnimation:g,toggleAnimation:J,generateCsv:K,generatePdf:X,generateImage:M}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:H,onMouseenter:a[5]||(a[5]=()=>e.unref(P)(!0)),onMouseleave:a[6]||(a[6]=()=>e.unref(P)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:l,id:`carousel-table_${S.value}`,style:e.normalizeStyle({height:e.unref(V)||e.unref(q)?"auto":`${Math.max(te.value,_.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":x.value,"is-playing":t.value.scrollbar.hide||!h.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:a[0]||(a[0]=n=>ne()),onMouseleave:a[1]||(a[1]=n=>g()),onTouchstart:a[2]||(a[2]=n=>le()),onTouchend:a[3]||(a[3]=n=>j()),onTouchcancel:a[4]||(a[4]=n=>j())},[k.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:C,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:x.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?$.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:T,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:x.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.head,(n,i)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${i}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":n)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:n,colIndex:i})),void 0,!0)],4))),128))],12,ce)],4),b.dataset.body&&b.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:w,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.body,(n,i)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,(p,z)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":b.dataset.head[z]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,i%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":p)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:p,rowIndex:i,colIndex:z})),void 0,!0)],12,pe))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ve),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&k.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${U.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(V),isImaging:e.unref(q),uid:S.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!v.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:H.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:X,onGenerateCsv:K,onGenerateImage:e.unref(M),onToggleAnimation:J,onToggleFullscreen:oe,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",fe,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},he=de._export_sfc(me,[["__scopeId","data-v-395bb430"]]);exports.default=he;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DGcOW0vL.cjs"),Z=require("./usePrinter-DpEuGyLP.cjs"),me=require("./vue-ui-skeleton-D_lU-hWK.cjs"),be=require("./BaseIcon-DxRKjbz1.cjs"),ge=require("./vue-ui-accordion-mtZIFAv9.cjs"),ee=require("./useNestedProp-C9KmUVBy.cjs"),ke=require("./PackageVersion-BJi2ywG9.cjs"),_e=require("./PenAndPaper-CX6N7FR7.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ee=["id"],Ne={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se=["xmlns","viewBox"],Ce={key:0},ze=["fill","font-weight","font-size","x","y"],we=["fill","font-weight","font-size","x","y"],Ve=["id"],$e=["stop-color"],Te=["stop-color"],Fe=["id"],Le=["stop-color"],De=["stop-color"],Oe=["id"],Pe=["stop-color"],Me=["stop-color"],Ie=["stop-color"],Re=["id"],Xe=["stop-color"],Ae=["stop-color"],je=["stop-color"],Ge=["id"],Ue=["stop-color"],qe=["stop-color"],Ye=["stop-color"],He={key:1},We=["x","y","font-size","font-weight","fill"],Ke=["x","y","font-size","font-weight","fill"],Je=["d","stroke"],Qe=["cx","cy","r","fill"],Ze=["cx","cy","r","fill","stroke","stroke-width","onClick"],et={key:2},tt=["x","y","font-size","fill","onClick"],lt={key:0},at=["x","y","fill","font-size","font-weight"],ot=["x","y","height","width","fill","rx","onClick"],nt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],rt={key:3},st=["x","y","fill","font-size","onClick"],ut=["d","stroke"],ct=["fill","cx","cy","r","onClick"],it={key:4},dt=["x","y","font-size","font-weight","fill"],yt=["x1","x2","y1","y2","stroke","stroke-width"],vt=["y","height","width"],ht={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},pt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},ft={viewBox:"0 0 20 20",height:"16",width:"16"},mt=["fill"],bt={key:6},gt=["y","height","width"],kt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},_t={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},xt={viewBox:"0 0 20 20",height:"16",width:"16"},Bt=["fill"],Et=["cx","cy","fill"],Nt=["d","stroke"],St=["cx","cy","fill"],Ct=["d","stroke"],zt=["cx","cy","fill"],wt=["cx","cy","fill"],Vt=["x","y","fill","font-size","font-weight"],$t=["x","y","fill","font-size","font-weight"],Tt=["x","text-anchor","y","fill","font-size"],Ft=["x","text-anchor","y","fill","font-size"],Lt=["x","text-anchor","y","fill","font-size"],Dt=["x","text-anchor","y","fill","font-size"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","y","font-size","fill"],Mt=["x","y","font-size","fill"],It=["x","y","font-size","fill"],Rt={key:4,class:"vue-data-ui-watermark"},Xt={key:6,ref:"source",dir:"auto"},At={style:{"padding-top":"36px",position:"relative"}},jt={class:"vue-ui-data-table"},Gt={key:0},Ut=["data-cell"],qt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Yt={key:0},Ht={key:1},Wt=["data-cell"],Kt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Jt={key:0},Qt={key:1},Zt=["data-cell"],el={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tl={key:0},ll={key:1},al=["data-cell"],ol={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nl={key:0},rl={key:1},sl=["data-cell"],ul={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},cl={key:0},il={key:1},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl={key:0},hl={key:1},pl=["data-cell"],fl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={key:0},bl={key:1},gl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_l=["data-cell"],xl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Bl=["data-cell"],El={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nl=["data-cell"],Sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Cl=["data-cell"],zl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},wl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(te,{expose:le,emit:S}){const k=te;e.useCssVars(a=>({"3173d692":a.tdo}));const{vue_ui_chestnut:ae}=o.useConfig(),z=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),T=e.ref(null),oe=e.ref(null),I=e.ref(0),t=e.computed({get:()=>A(),set:a=>a}),{userOptionsVisible:F,setUserOptionsVisibility:R,keepUserOptionState:X}=xe.useUserOptionState({config:t.value});function A(){const a=ee.useNestedProp({userConfig:k.config,defaultConfig:ae});return a.theme?{...ee.useNestedProp({userConfig:o.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}e.watch(()=>k.config,a=>{t.value=A(),F.value=!t.value.showOnChartHover,K()},{deep:!0});const{isPrinting:j,isImaging:G,generatePdf:U,generateImage:q}=Z.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),ne=e.computed(()=>t.value.userOptions.show),L=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),w=e.ref({showTable:t.value.table.show}),D=e.ref(null),Y=e.ref(!1),re=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),f=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),_=e.computed(()=>z.value?k.dataset.flatMap(a=>(a.branches||[]).map(s=>s.value||0)).reduce((a,s)=>a+s,0):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${n}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{o.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${n} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=(a.branches||[]).map(n=>n.value||0).reduce((n,d)=>n+d,0);return{...a,color:o.convertColorToHex(a.color)||L.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:(a.branches||[]).map((n,d)=>({...n,rootName:a.name,rootIndex:s,color:o.convertColorToHex(a.color)||L.value[s]||o.palette[s]||o.palette[s%o.palette.length],value:n.value>=0?n.value:0,id:n.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:n.value/l,type:"branch",breakdown:(n.breakdown||[]).map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/_.value,branchName:n.name,branchValue:n.value,branchToTotal:n.value/_.value,branchToRoot:n.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/_.value,nutToRoot:i.value/l,nutToBranch:i.value/n.value},...i,type:"nut",branchName:n.name,rootName:a.name,branchTotal:n.value>=0?n.value:0,proportionToBranch:i.value/n.value,proportionToRoot:i.value/l,proportionToTree:i.value/_.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:o.convertColorToHex(i.color)||L.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function se(){return m.value}const ue=e.computed(()=>m.value.flatMap(a=>a.branches).length),ce=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ie=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),H=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/ce.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),de=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),ye=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>ye.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:H.value,x2:384*a.value/ie.value*de.value+H.value})));function O(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const u=e.ref(null),x=e.ref(null),v=e.ref(null),b=e.ref(null);function p(){u.value=null,v.value=null,b.value=null}function g(a){return b.value?b.value===null?!0:a.type==="root"?a.id===b.value.id:a.rootIndex===b.value.rootIndex:u.value===null&&v.value===null?!0:a.type==="nut"?u.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||u.value&&u.value.rootIndex===a.rootIndex:!1}function ve(a){p(),e.nextTick(()=>{u.value=a,v.value=a,x.value=o.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),S("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,S("selectNut",null)}function P(a){v.value&&v.value.id===a.id?(v.value=null,p(),S("selectBranch",null)):(p(),v.value=a,S("selectBranch",a))}function W(a){b.value&&b.value.id===a.id?(p(),S("selectRoot",null)):(p(),b.value=a,S("selectRoot",a))}function he(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function C(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function pe(){const a=new ResizeObserver(s=>{s.forEach(l=>{Y.value=l.contentRect.width<re.value})});D.value&&a.observe(D.value)}e.onMounted(()=>{K()});function K(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ue.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,pe()}const c=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,n)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,$l)=>y.table)));return{head:a,body:s}});function J(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",_.value],[""]],s=c.value.head,l=c.value.body.map((i,y)=>[c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootName,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootValue,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchName,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchValue,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),n=a.concat([s]).concat(l),d=o.createCsvContent(n);o.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function fe(a){V.value=a,I.value+=1}function Q(){w.value.showTable=!w.value.showTable}const $=e.ref(!1);function M(){$.value=!$.value}return le({getData:se,generatePdf:U,generateCsv:J,generateImage:q,toggleTable:Q,toggleAnnotator:M}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:T,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:s[2]||(s[2]=()=>e.unref(R)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:T.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:M},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",Ne,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value&&(e.unref(X)||e.unref(F))?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:oe,key:`user_options_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(G),isPrinting:e.unref(j),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(q),onToggleTable:Q,onToggleAnnotator:M,style:e.normalizeStyle({visibility:e.unref(X)?e.unref(F)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),r.value.height>0&&z.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",Ce,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,ze)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,we)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.05),100-t.value.style.chart.layout.roots.gradientIntensity)},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Te)],8,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.02),100-t.value.style.chart.layout.branches.gradientIntensity)},null,8,De)],8,Fe))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Pe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ie)],8,Oe),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Xe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,je)],8,Re),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,100)},null,8,Ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,Ye)],8,Ge)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",He,[e.createElementVNode("text",{x:f.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,We),e.createElementVNode("text",{x:f.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.grandTotal.formatter,_.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.grandTotal.prefix,v:_.value,s:t.value.style.chart.layout.grandTotal.suffix,r:t.value.style.chart.layout.grandTotal.roundingValue}))),9,Ke)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(n,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-o6tXRhOr.cjs"),Z=require("./usePrinter-H2UFIe6n.cjs"),me=require("./vue-ui-skeleton-BIWgLDDf.cjs"),be=require("./BaseIcon-DujPvdJ_.cjs"),ge=require("./vue-ui-accordion-paZXh-GD.cjs"),ee=require("./useNestedProp-D-zaZbSR.cjs"),ke=require("./PackageVersion-dQYEsTLp.cjs"),_e=require("./PenAndPaper-1h87IVla.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ee=["id"],Ne={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se=["xmlns","viewBox"],Ce={key:0},ze=["fill","font-weight","font-size","x","y"],we=["fill","font-weight","font-size","x","y"],Ve=["id"],$e=["stop-color"],Te=["stop-color"],Fe=["id"],Le=["stop-color"],De=["stop-color"],Oe=["id"],Pe=["stop-color"],Me=["stop-color"],Ie=["stop-color"],Re=["id"],Xe=["stop-color"],Ae=["stop-color"],je=["stop-color"],Ge=["id"],Ue=["stop-color"],qe=["stop-color"],Ye=["stop-color"],He={key:1},We=["x","y","font-size","font-weight","fill"],Ke=["x","y","font-size","font-weight","fill"],Je=["d","stroke"],Qe=["cx","cy","r","fill"],Ze=["cx","cy","r","fill","stroke","stroke-width","onClick"],et={key:2},tt=["x","y","font-size","fill","onClick"],lt={key:0},at=["x","y","fill","font-size","font-weight"],ot=["x","y","height","width","fill","rx","onClick"],nt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],rt={key:3},st=["x","y","fill","font-size","onClick"],ut=["d","stroke"],ct=["fill","cx","cy","r","onClick"],it={key:4},dt=["x","y","font-size","font-weight","fill"],yt=["x1","x2","y1","y2","stroke","stroke-width"],vt=["y","height","width"],ht={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},pt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},ft={viewBox:"0 0 20 20",height:"16",width:"16"},mt=["fill"],bt={key:6},gt=["y","height","width"],kt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},_t={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},xt={viewBox:"0 0 20 20",height:"16",width:"16"},Bt=["fill"],Et=["cx","cy","fill"],Nt=["d","stroke"],St=["cx","cy","fill"],Ct=["d","stroke"],zt=["cx","cy","fill"],wt=["cx","cy","fill"],Vt=["x","y","fill","font-size","font-weight"],$t=["x","y","fill","font-size","font-weight"],Tt=["x","text-anchor","y","fill","font-size"],Ft=["x","text-anchor","y","fill","font-size"],Lt=["x","text-anchor","y","fill","font-size"],Dt=["x","text-anchor","y","fill","font-size"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","y","font-size","fill"],Mt=["x","y","font-size","fill"],It=["x","y","font-size","fill"],Rt={key:4,class:"vue-data-ui-watermark"},Xt={key:6,ref:"source",dir:"auto"},At={style:{"padding-top":"36px",position:"relative"}},jt={class:"vue-ui-data-table"},Gt={key:0},Ut=["data-cell"],qt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Yt={key:0},Ht={key:1},Wt=["data-cell"],Kt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Jt={key:0},Qt={key:1},Zt=["data-cell"],el={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tl={key:0},ll={key:1},al=["data-cell"],ol={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nl={key:0},rl={key:1},sl=["data-cell"],ul={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},cl={key:0},il={key:1},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl={key:0},hl={key:1},pl=["data-cell"],fl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={key:0},bl={key:1},gl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_l=["data-cell"],xl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Bl=["data-cell"],El={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nl=["data-cell"],Sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Cl=["data-cell"],zl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},wl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(te,{expose:le,emit:S}){const k=te;e.useCssVars(a=>({"3173d692":a.tdo}));const{vue_ui_chestnut:ae}=o.useConfig(),z=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),T=e.ref(null),oe=e.ref(null),I=e.ref(0),t=e.computed({get:()=>A(),set:a=>a}),{userOptionsVisible:F,setUserOptionsVisibility:R,keepUserOptionState:X}=xe.useUserOptionState({config:t.value});function A(){const a=ee.useNestedProp({userConfig:k.config,defaultConfig:ae});return a.theme?{...ee.useNestedProp({userConfig:o.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}e.watch(()=>k.config,a=>{t.value=A(),F.value=!t.value.showOnChartHover,K()},{deep:!0});const{isPrinting:j,isImaging:G,generatePdf:U,generateImage:q}=Z.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),ne=e.computed(()=>t.value.userOptions.show),L=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),w=e.ref({showTable:t.value.table.show}),D=e.ref(null),Y=e.ref(!1),re=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),f=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),_=e.computed(()=>z.value?k.dataset.flatMap(a=>(a.branches||[]).map(s=>s.value||0)).reduce((a,s)=>a+s,0):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${n}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{o.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${n} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=(a.branches||[]).map(n=>n.value||0).reduce((n,d)=>n+d,0);return{...a,color:o.convertColorToHex(a.color)||L.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:(a.branches||[]).map((n,d)=>({...n,rootName:a.name,rootIndex:s,color:o.convertColorToHex(a.color)||L.value[s]||o.palette[s]||o.palette[s%o.palette.length],value:n.value>=0?n.value:0,id:n.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:n.value/l,type:"branch",breakdown:(n.breakdown||[]).map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/_.value,branchName:n.name,branchValue:n.value,branchToTotal:n.value/_.value,branchToRoot:n.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/_.value,nutToRoot:i.value/l,nutToBranch:i.value/n.value},...i,type:"nut",branchName:n.name,rootName:a.name,branchTotal:n.value>=0?n.value:0,proportionToBranch:i.value/n.value,proportionToRoot:i.value/l,proportionToTree:i.value/_.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:o.convertColorToHex(i.color)||L.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function se(){return m.value}const ue=e.computed(()=>m.value.flatMap(a=>a.branches).length),ce=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ie=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),H=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/ce.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),de=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),ye=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>ye.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:H.value,x2:384*a.value/ie.value*de.value+H.value})));function O(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const u=e.ref(null),x=e.ref(null),v=e.ref(null),b=e.ref(null);function p(){u.value=null,v.value=null,b.value=null}function g(a){return b.value?b.value===null?!0:a.type==="root"?a.id===b.value.id:a.rootIndex===b.value.rootIndex:u.value===null&&v.value===null?!0:a.type==="nut"?u.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||u.value&&u.value.rootIndex===a.rootIndex:!1}function ve(a){p(),e.nextTick(()=>{u.value=a,v.value=a,x.value=o.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),S("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,S("selectNut",null)}function P(a){v.value&&v.value.id===a.id?(v.value=null,p(),S("selectBranch",null)):(p(),v.value=a,S("selectBranch",a))}function W(a){b.value&&b.value.id===a.id?(p(),S("selectRoot",null)):(p(),b.value=a,S("selectRoot",a))}function he(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function C(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function pe(){const a=new ResizeObserver(s=>{s.forEach(l=>{Y.value=l.contentRect.width<re.value})});D.value&&a.observe(D.value)}e.onMounted(()=>{K()});function K(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ue.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,pe()}const c=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,n)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,$l)=>y.table)));return{head:a,body:s}});function J(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",_.value],[""]],s=c.value.head,l=c.value.body.map((i,y)=>[c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootName,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootValue,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchName,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchValue,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),n=a.concat([s]).concat(l),d=o.createCsvContent(n);o.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function fe(a){V.value=a,I.value+=1}function Q(){w.value.showTable=!w.value.showTable}const $=e.ref(!1);function M(){$.value=!$.value}return le({getData:se,generatePdf:U,generateCsv:J,generateImage:q,toggleTable:Q,toggleAnnotator:M}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:T,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:s[2]||(s[2]=()=>e.unref(R)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,parent:T.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:M},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",Ne,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value&&(e.unref(X)||e.unref(F))?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:oe,key:`user_options_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(G),isPrinting:e.unref(j),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(q),onToggleTable:Q,onToggleAnnotator:M,style:e.normalizeStyle({visibility:e.unref(X)?e.unref(F)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"4"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),r.value.height>0&&z.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ke._sfc_main),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",Ce,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,ze)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,we)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.05),100-t.value.style.chart.layout.roots.gradientIntensity)},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Te)],8,Ve))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.02),100-t.value.style.chart.layout.branches.gradientIntensity)},null,8,De)],8,Fe))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Pe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ie)],8,Oe),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Xe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,je)],8,Re),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,100)},null,8,Ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,Ye)],8,Ge)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",He,[e.createElementVNode("text",{x:f.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,We),e.createElementVNode("text",{x:f.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:p},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.grandTotal.formatter,_.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.grandTotal.prefix,v:_.value,s:t.value.style.chart.layout.grandTotal.suffix,r:t.value.style.chart.layout.grandTotal.roundingValue}))),9,Ke)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(n,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
|
|
2
2
|
${l.x1},${l.y1+d}
|
|
3
3
|
C${l.x1-20},${l.y1+d}
|
|
4
4
|
${l.x1-80},${l.y1+d}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as Ye, computed as m, ref as T, watch as qe, onMounted as He, openBlock as a, createElementBlock as o, normalizeClass as k, normalizeStyle as h, unref as n, createBlock as K, createCommentVNode as f, createSlots as We, withCtx as X, renderSlot as I, normalizeProps as ue, guardReactiveProps as ne, createVNode as $e, toDisplayString as c, createElementVNode as s, Fragment as g, renderList as _, createTextVNode as J, withKeys as Ke, nextTick as Ce } from "vue";
|
|
2
|
-
import { u as Je, c as Qe, t as Ze, a as et, p as P, b as tt, g as re, e as Q, d as ie, o as lt, X as at, s as S, w as Te, i as G, f as z, G as ze, m as Ne, j as ot, k as V, n as H, q as st, r as ut } from "./index-
|
|
3
|
-
import { u as nt, U as rt } from "./usePrinter-
|
|
4
|
-
import it from "./vue-ui-skeleton-
|
|
5
|
-
import ct from "./BaseIcon-
|
|
6
|
-
import dt from "./vue-ui-accordion-
|
|
7
|
-
import { u as Se } from "./useNestedProp-
|
|
8
|
-
import { _ as vt } from "./PackageVersion-
|
|
9
|
-
import { P as yt } from "./PenAndPaper-
|
|
2
|
+
import { u as Je, c as Qe, t as Ze, a as et, p as P, b as tt, g as re, e as Q, d as ie, o as lt, X as at, s as S, w as Te, i as G, f as z, G as ze, m as Ne, j as ot, k as V, n as H, q as st, r as ut } from "./index-CI-N9klv.js";
|
|
3
|
+
import { u as nt, U as rt } from "./usePrinter-CXc8xCKk.js";
|
|
4
|
+
import it from "./vue-ui-skeleton-owIhXtQF.js";
|
|
5
|
+
import ct from "./BaseIcon-9gdEHMWK.js";
|
|
6
|
+
import dt from "./vue-ui-accordion-CYLks1fW.js";
|
|
7
|
+
import { u as Se } from "./useNestedProp-D1eJ0dvv.js";
|
|
8
|
+
import { _ as vt } from "./PackageVersion-S3SzpuwC.js";
|
|
9
|
+
import { P as yt } from "./PenAndPaper-v846FwcH.js";
|
|
10
10
|
import { u as ht } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const bt = ["id"], pt = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as n, computed as m, onMounted as R, onBeforeUnmount as E, openBlock as o, createElementBlock as l, unref as C, normalizeStyle as b, createElementVNode as r, createCommentVNode as a, normalizeClass as p, toDisplayString as x, nextTick as F, pushScopeId as I, popScopeId as L } from "vue";
|
|
2
|
-
import { u as z } from "./useNestedProp-
|
|
3
|
-
import { u as O, c as B, X as N, s as T } from "./index-
|
|
2
|
+
import { u as z } from "./useNestedProp-D1eJ0dvv.js";
|
|
3
|
+
import { u as O, c as B, X as N, s as T } from "./index-CI-N9klv.js";
|
|
4
4
|
import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const g = (i) => (I("data-v-6a1383ea"), i = i(), L(), i), $ = ["xmlns", "height", "width"], W = {
|
|
6
6
|
id: "follower",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),_=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),_=require("./useNestedProp-D-zaZbSR.cjs"),i=require("./index-o6tXRhOr.cjs"),C=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),m=l=>(t.pushScopeId("data-v-6a1383ea"),l=l(),t.popScopeId(),l),p=["xmlns","height","width"],x={id:"follower",fy:"30%",fx:"30%"},E=["stop-color","stop-opacity"],N=m(()=>t.createElementVNode("stop",{offset:"95%","stop-color":"transparent"},null,-1)),g=["r","fill","stroke","stroke-width","stroke-dasharray"],V=["r","fill"],S={key:2,class:"wave"},w=["id"],B=["id"],R=m(()=>t.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),b=["filter","stroke"],F={key:3,class:"crosshair"},z=["x1","stroke","stroke-width","stroke-dasharray"],I=["x1","stroke","stroke-width","stroke-dasharray"],L=["y1","stroke","stroke-width","stroke-dasharray"],O=["y1","stroke","stroke-width","stroke-dasharray"],T=["cy","r","fill"],D=["cy","r","fill"],$=["cx","r","fill"],W=["cx","r","fill"],G={key:5,class:"coordinates"},P=["x","y","font-size","fill"],q=["transform"],A=["font-size","fill"],M={__name:"vue-ui-cursor",props:{config:{type:Object,default:{}}},setup(l){const k=l,{vue_ui_cursor:y}=i.useConfig(),c=t.ref(i.createUid()),e=t.computed(()=>_.useNestedProp({userConfig:k.config,defaultConfig:y})),o=t.ref({x:-100,y:-100});function u({clientX:r,clientY:f,...j}){o.value.x=r-e.value.centerCircleRadius,o.value.y=f-e.value.centerCircleRadius}function d(r){o.value.x=r.targetTouches[0].clientX-e.value.centerCircleRadius,o.value.y=r.targetTouches[0].clientY-e.value.centerCircleRadius}const v=t.ref(!0);function s(r){v.value=r}const a=t.ref(!1),n=t.ref(null);function h(){a.value=!1,n.value&&clearTimeout(n.value),t.nextTick(()=>{a.value=!0,n.value=setTimeout(()=>{a.value=!1},1e3)})}return t.onMounted(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.addEventListener("mousemove",u),r.addEventListener("touchmove",d),r.addEventListener("mouseleave",()=>s(!1)),r.addEventListener("mouseenter",()=>s(!0)),r.addEventListener("click",h)}),t.onBeforeUnmount(()=>{const r=e.value.parentId?document.getElementById(e.value.parentId):document.getElementsByTagName("div")[0];r.removeEventListener("mousemove",u),r.removeEventListener("touchmove",d),r.removeEventListener("mouseleave",()=>s(!1)),r.removeEventListener("mouseenter",()=>s(!0)),r.removeEventListener("click",h)}),t.computed(()=>e.value.centerCircleRadius/2.5),(r,f)=>v.value?(t.openBlock(),t.createElementBlock("svg",{key:0,"data-html2canvas-ignore":"",xmlns:t.unref(i.XMLNS),style:t.normalizeStyle(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${o.value.y}px; left:${o.value.x}px;`),viewBox:"0 0 100 100",height:e.value.centerCircleRadius*2,width:e.value.centerCircleRadius*2},[t.createElementVNode("defs",null,[t.createElementVNode("radialGradient",x,[t.createElementVNode("stop",{offset:"10%","stop-color":e.value.bubbleEffectColor,"stop-opacity":e.value.bubbleEffectOpacity},null,8,E),N])]),e.value.showCenterCircle?(t.openBlock(),t.createElementBlock("circle",{key:0,cx:50,cy:50,r:e.value.centerCircleRadius,fill:t.unref(i.setOpacity)(e.value.centerCircleColor,e.value.centerCircleOpacity*100),stroke:e.value.centerCircleStroke,"stroke-width":e.value.centerCircleStrokeWidth,"stroke-dasharray":e.value.centerCircleDasharray},null,8,g)):t.createCommentVNode("",!0),e.value.bubbleEffect?(t.openBlock(),t.createElementBlock("circle",{key:1,cx:50,cy:50,r:e.value.centerCircleRadius,fill:"url(#follower)",stroke:"none"},null,8,V)):t.createCommentVNode("",!0),e.value.useWaveOnClick?(t.openBlock(),t.createElementBlock("g",S,[t.createElementVNode("defs",null,[t.createElementVNode("filter",{id:`blur_${c.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[t.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:4,id:`blur_std_${c.value}`},null,8,B),R],8,w)]),a.value?(t.openBlock(),t.createElementBlock("circle",{key:0,class:t.normalizeClass({"circle-wave":a.value}),cx:50,cy:50,r:50,filter:`url(#blur_${c.value})`,stroke:e.value.centerCircleStroke,fill:"none","stroke-width":"3"},null,10,b)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.value.showCrosshair?(t.openBlock(),t.createElementBlock("g",F,[t.createElementVNode("line",{x1:-e.value.centerCircleRadius+50,x2:-5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,z),t.createElementVNode("line",{x1:50+e.value.centerCircleRadius,x2:5e3,y1:50,y2:50,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,I),t.createElementVNode("line",{x1:50,x2:50,y1:-e.value.centerCircleRadius+50,y2:-5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,L),t.createElementVNode("line",{x1:50,x2:50,y1:e.value.centerCircleRadius+50,y2:5e3,stroke:e.value.crosshairStroke,"stroke-width":e.value.crosshairStrokeWidth,"stroke-dasharray":e.value.crosshairDasharray,"stroke-linecap":"round"},null,8,O)])):t.createCommentVNode("",!0),e.value.showIntersectCircles?(t.openBlock(),t.createElementBlock("g",{key:4,class:t.normalizeClass({"rotating-circles":e.value.isLoading})},[t.createElementVNode("circle",{cx:50,cy:e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,T),t.createElementVNode("circle",{cx:50,cy:-e.value.centerCircleRadius+50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,D),t.createElementVNode("circle",{cx:-e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,$),t.createElementVNode("circle",{cx:e.value.centerCircleRadius+50,cy:50,r:e.value.intersectCirclesRadius,fill:e.value.intersectCirclesFill},null,8,W)],2)):t.createCommentVNode("",!0),e.value.showCoordinates?(t.openBlock(),t.createElementBlock("g",G,[t.createElementVNode("text",{"text-anchor":"end",x:-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,y:50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset,"font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},"font-family":"Arial"},t.toDisplayString(o.value.x.toFixed(0)),9,P),t.createElementVNode("g",{transform:`translate(${50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset}, ${-e.value.centerCircleRadius+50-e.value.coordinatesFontSize/2+e.value.coordinatesOffset})`},[t.createElementVNode("text",{"text-anchor":"start","font-size":e.value.coordinatesFontSize,fill:e.value.coordinatesColor,style:{"font-variant-numeric":"tabular-nums"},transform:"rotate(-90)","font-family":"Arial"},t.toDisplayString(o.value.y.toFixed(0)),9,A)],8,q)])):t.createCommentVNode("",!0)],12,p)):t.createCommentVNode("",!0)}},U=C._export_sfc(M,[["__scopeId","data-v-6a1383ea"]]);exports.default=U;
|