vue-data-ui 2.3.23 → 2.3.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/{Arrow-BOSHa3Ag.cjs → Arrow-01eXaB81.cjs} +1 -1
  2. package/dist/{Arrow-DxXzMXB1.js → Arrow-zObQ2VxA.js} +1 -1
  3. package/dist/{BaseIcon-C-k_mqXL.cjs → BaseIcon-BkdELEYE.cjs} +1 -1
  4. package/dist/{BaseIcon-DuMfKUDs.js → BaseIcon-CHBghp3_.js} +1 -1
  5. package/dist/{DataTable-CHXdpx94.cjs → DataTable-D_2ZW2eI.cjs} +1 -1
  6. package/dist/{DataTable-DKHF_NH2.js → DataTable-Dytj5HQM.js} +2 -2
  7. package/dist/{Legend-BqqpwXbu.js → Legend-Ct8LnAy4.js} +1 -1
  8. package/dist/{Legend-BwrzHxLy.cjs → Legend-tvvMRnbi.cjs} +1 -1
  9. package/dist/{Shape-DW18-C9f.cjs → Shape-dvRttq7z.cjs} +1 -1
  10. package/dist/{Shape-Ccky9omb.js → Shape-qo5jcJq9.js} +1 -1
  11. package/dist/{Slicer-BDsv196Y.js → Slicer-BNgHaM2_.js} +1 -1
  12. package/dist/{Slicer-xKlzke1v.cjs → Slicer-DcjEg-ZZ.cjs} +1 -1
  13. package/dist/{Title-Bx2ibobQ.js → Title-BcNPXpKX.js} +1 -1
  14. package/dist/{Title-DxNugmhI.cjs → Title-CSQdI1EY.cjs} +1 -1
  15. package/dist/{Tooltip-BC2Wlz7P.cjs → Tooltip-B-laoopT.cjs} +1 -1
  16. package/dist/{Tooltip-DOEMrisX.js → Tooltip-etzDGo1Y.js} +1 -1
  17. package/dist/{index-BvjCO-wv.js → index-BE6fhUyH.js} +1 -1
  18. package/dist/{index-oufiZvaS.cjs → index-BFH7X8WG.cjs} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/{useNestedProp-CmTItGss.cjs → useNestedProp-B_z4-n52.cjs} +1 -1
  21. package/dist/{useNestedProp-2KJaYPfM.js → useNestedProp-BcjRW6BJ.js} +1 -1
  22. package/dist/{usePrinter-CaKXrCiB.js → usePrinter-CdIphKpF.js} +1 -1
  23. package/dist/{usePrinter-Cc8ufBvU.cjs → usePrinter-hyuaFHQj.cjs} +1 -1
  24. package/dist/{vue-data-ui-DnlOZVL-.js → vue-data-ui-DH3---6Y.js} +56 -56
  25. package/dist/{vue-data-ui-D5LrE3dP.cjs → vue-data-ui-dbgbgXfB.cjs} +1 -1
  26. package/dist/vue-data-ui.cjs +1 -1
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-qegO2SzJ.js → vue-ui-3d-bar-CPpeRsrz.js} +7 -7
  29. package/dist/{vue-ui-3d-bar-Cma1NB-u.cjs → vue-ui-3d-bar-ddx9_3_T.cjs} +1 -1
  30. package/dist/{vue-ui-accordion-DiR0dVog.cjs → vue-ui-accordion-CvZhABQM.cjs} +1 -1
  31. package/dist/{vue-ui-accordion-q-bLDiD3.js → vue-ui-accordion-Dmz7RUKz.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-xk6Gt1LJ.cjs → vue-ui-age-pyramid-BieAbkr7.cjs} +1 -1
  33. package/dist/{vue-ui-age-pyramid-vQvy7rWY.js → vue-ui-age-pyramid-DiOdrFIV.js} +8 -8
  34. package/dist/{vue-ui-annotator-LwO1PGoN.cjs → vue-ui-annotator-CugE3IpZ.cjs} +1 -1
  35. package/dist/{vue-ui-annotator-BYT8v1SY.js → vue-ui-annotator-KClMRKPi.js} +1 -1
  36. package/dist/{vue-ui-candlestick-zvv6_kwp.js → vue-ui-candlestick-D9MajMEG.js} +9 -9
  37. package/dist/{vue-ui-candlestick-CmM0kwJR.cjs → vue-ui-candlestick-DErkX5mF.cjs} +1 -1
  38. package/dist/vue-ui-carousel-table-CLwi79Ly.js +346 -0
  39. package/dist/vue-ui-carousel-table-CsCEcaWp.cjs +1 -0
  40. package/dist/{vue-ui-chestnut-4MvRD28_.cjs → vue-ui-chestnut-BTvQSTQi.cjs} +1 -1
  41. package/dist/{vue-ui-chestnut-A9asY_42.js → vue-ui-chestnut-BnmDdakJ.js} +6 -6
  42. package/dist/{vue-ui-cursor-DusWgM7W.cjs → vue-ui-cursor-Dj8pAXbc.cjs} +1 -1
  43. package/dist/{vue-ui-cursor-CPPPIH2W.js → vue-ui-cursor-KjKhIKTP.js} +2 -2
  44. package/dist/{vue-ui-dashboard-ZTzEd521.cjs → vue-ui-dashboard-BTpiCLaT.cjs} +1 -1
  45. package/dist/{vue-ui-dashboard-CuQ81BKN.js → vue-ui-dashboard-Dm-rDSRt.js} +2 -2
  46. package/dist/{vue-ui-digits-DlupvOo-.cjs → vue-ui-digits-BVVOQfoO.cjs} +1 -1
  47. package/dist/{vue-ui-digits-Czkbi2AR.js → vue-ui-digits-WgEKLYdq.js} +2 -2
  48. package/dist/{vue-ui-donut-Cis7kzDB.js → vue-ui-donut-BjHWw_Mw.js} +9 -9
  49. package/dist/{vue-ui-donut-DA5YfWlL.cjs → vue-ui-donut-DvDqj2od.cjs} +1 -1
  50. package/dist/{vue-ui-donut-evolution-BigmUCTm.cjs → vue-ui-donut-evolution-C0TW-uGR.cjs} +1 -1
  51. package/dist/{vue-ui-donut-evolution-D2I4ZD5a.js → vue-ui-donut-evolution-CWBsLGUw.js} +9 -9
  52. package/dist/{vue-ui-dumbbell-fdV94xQB.js → vue-ui-dumbbell-BlsLMdW8.js} +8 -8
  53. package/dist/{vue-ui-dumbbell-D8ZSCX0H.cjs → vue-ui-dumbbell-Uhw6rKrw.cjs} +1 -1
  54. package/dist/{vue-ui-flow-C1PVwgKX.js → vue-ui-flow-KijZNPzD.js} +7 -7
  55. package/dist/{vue-ui-flow-CH6PmIBT.cjs → vue-ui-flow-fnDs0_mH.cjs} +1 -1
  56. package/dist/{vue-ui-galaxy-IFmqHh3R.cjs → vue-ui-galaxy-BBiGsB2G.cjs} +1 -1
  57. package/dist/{vue-ui-galaxy-DzWOfvyj.js → vue-ui-galaxy-_y9H-beS.js} +9 -9
  58. package/dist/{vue-ui-gauge-Bbda2H3b.cjs → vue-ui-gauge-Bv4YKgIj.cjs} +1 -1
  59. package/dist/{vue-ui-gauge-CeGa1oMf.js → vue-ui-gauge-CGgQqTqT.js} +5 -5
  60. package/dist/{vue-ui-gizmo-DyJngE0E.cjs → vue-ui-gizmo-DFWR7qEg.cjs} +1 -1
  61. package/dist/{vue-ui-gizmo-BILyJylm.js → vue-ui-gizmo-DjAFk58g.js} +2 -2
  62. package/dist/{vue-ui-heatmap-Dp68UbGB.cjs → vue-ui-heatmap-B5McL3SD.cjs} +1 -1
  63. package/dist/{vue-ui-heatmap-DRk0VXaJ.js → vue-ui-heatmap-D1AMro3o.js} +8 -8
  64. package/dist/vue-ui-kpi-BW2na3Yu.js +58 -0
  65. package/dist/vue-ui-kpi-Bb7xdAFU.cjs +1 -0
  66. package/dist/{vue-ui-mini-loader-CXiMb5pi.cjs → vue-ui-mini-loader-22dagCEY.cjs} +1 -1
  67. package/dist/{vue-ui-mini-loader-DLXv9Seq.js → vue-ui-mini-loader-CKZ-PEf5.js} +2 -2
  68. package/dist/{vue-ui-molecule-JlPbVJ8I.js → vue-ui-molecule-BK8HPWvg.js} +9 -9
  69. package/dist/{vue-ui-molecule-DOwGWqSR.cjs → vue-ui-molecule-CWpBfXyk.cjs} +1 -1
  70. package/dist/{vue-ui-mood-radar-BF3WqcyN.cjs → vue-ui-mood-radar-BZE6rvtb.cjs} +1 -1
  71. package/dist/{vue-ui-mood-radar-C3Boyr96.js → vue-ui-mood-radar-CXq465Aj.js} +9 -9
  72. package/dist/{vue-ui-nested-donuts-C9CFBzvj.js → vue-ui-nested-donuts-BSYKxbNL.js} +9 -9
  73. package/dist/{vue-ui-nested-donuts-DkGXmwTg.cjs → vue-ui-nested-donuts-Ca-b8_P3.cjs} +1 -1
  74. package/dist/{vue-ui-onion-BqzUINBq.js → vue-ui-onion-CMv38G-g.js} +9 -9
  75. package/dist/{vue-ui-onion-COYhqrEx.cjs → vue-ui-onion-DvRn35KQ.cjs} +1 -1
  76. package/dist/{vue-ui-parallel-coordinate-plot-BE8Bf0MQ.cjs → vue-ui-parallel-coordinate-plot-C50SGcJo.cjs} +1 -1
  77. package/dist/{vue-ui-parallel-coordinate-plot-DtXx6zpM.js → vue-ui-parallel-coordinate-plot-DBZUno5l.js} +10 -10
  78. package/dist/{vue-ui-quadrant-Cr2jm-2w.js → vue-ui-quadrant-C-jh3Grv.js} +10 -10
  79. package/dist/{vue-ui-quadrant-g34Ky2Hq.cjs → vue-ui-quadrant-CJo9jqLm.cjs} +1 -1
  80. package/dist/{vue-ui-quick-chart-BEXF1YLk.cjs → vue-ui-quick-chart-BJ6lIxf6.cjs} +1 -1
  81. package/dist/{vue-ui-quick-chart-gurflOrc.js → vue-ui-quick-chart-BvTLEmD_.js} +6 -6
  82. package/dist/{vue-ui-radar-B77sXFJD.cjs → vue-ui-radar-CWgrIgHA.cjs} +1 -1
  83. package/dist/{vue-ui-radar-DGXj7kOe.js → vue-ui-radar-Kh4Qt05I.js} +10 -10
  84. package/dist/{vue-ui-rating-D2wmEDux.js → vue-ui-rating-D7AkYGtK.js} +2 -2
  85. package/dist/{vue-ui-rating-J4wpjGDw.cjs → vue-ui-rating-DJsfvOxZ.cjs} +1 -1
  86. package/dist/{vue-ui-relation-circle-8hDVUqzX.js → vue-ui-relation-circle-CXQ9FHnG.js} +5 -5
  87. package/dist/{vue-ui-relation-circle-CkO4PvuL.cjs → vue-ui-relation-circle-DRquG6N9.cjs} +1 -1
  88. package/dist/{vue-ui-rings-Bs4I_DFj.js → vue-ui-rings-BuuiGgkQ.js} +9 -9
  89. package/dist/{vue-ui-rings-Bt4lsykR.cjs → vue-ui-rings-DAuDNTak.cjs} +1 -1
  90. package/dist/{vue-ui-scatter-BcuxFe_0.js → vue-ui-scatter-Ba_1vbfG.js} +10 -10
  91. package/dist/{vue-ui-scatter-pnVV0nUg.cjs → vue-ui-scatter-Db1WHHMt.cjs} +1 -1
  92. package/dist/{vue-ui-screenshot-Q4jzniKW.cjs → vue-ui-screenshot-BgvHfkel.cjs} +1 -1
  93. package/dist/{vue-ui-screenshot-CkunIVDh.js → vue-ui-screenshot-rDwd1nNP.js} +1 -1
  94. package/dist/{vue-ui-skeleton-jYHncdu5.js → vue-ui-skeleton-DZk__alb.js} +2 -2
  95. package/dist/{vue-ui-skeleton-Fsru0dbb.cjs → vue-ui-skeleton-Df1qBO2k.cjs} +1 -1
  96. package/dist/{vue-ui-smiley-B3gIeKih.js → vue-ui-smiley-BPebp5hG.js} +2 -2
  97. package/dist/{vue-ui-smiley-Bd3lgUj_.cjs → vue-ui-smiley-KQFOL39h.cjs} +1 -1
  98. package/dist/{vue-ui-spark-trend-CgEi2LBP.js → vue-ui-spark-trend-CSdQHPuY.js} +4 -4
  99. package/dist/{vue-ui-spark-trend-DfD8Q9Zl.cjs → vue-ui-spark-trend-Cr2Coq5M.cjs} +1 -1
  100. package/dist/{vue-ui-sparkbar-BCmLvKvU.cjs → vue-ui-sparkbar-BIdS6UA_.cjs} +1 -1
  101. package/dist/{vue-ui-sparkbar-Bu_TX-tQ.js → vue-ui-sparkbar-EhBZgeio.js} +3 -3
  102. package/dist/{vue-ui-sparkgauge-C_DSQGId.cjs → vue-ui-sparkgauge-DFlQ-olI.cjs} +1 -1
  103. package/dist/{vue-ui-sparkgauge-Cml4o6Bs.js → vue-ui-sparkgauge-DTUDMW-e.js} +3 -3
  104. package/dist/{vue-ui-sparkhistogram-BsyOeGbq.js → vue-ui-sparkhistogram-CJZN2ZKW.js} +4 -4
  105. package/dist/{vue-ui-sparkhistogram-BZDofxtq.cjs → vue-ui-sparkhistogram-_zChXZnF.cjs} +1 -1
  106. package/dist/{vue-ui-sparkline-DOsWIDug.js → vue-ui-sparkline-B0OAXqfq.js} +3 -3
  107. package/dist/{vue-ui-sparkline-twqIgYC3.cjs → vue-ui-sparkline-IWbHN7-r.cjs} +1 -1
  108. package/dist/{vue-ui-sparkstackbar-DTgoeXjb.cjs → vue-ui-sparkstackbar-C6tBsD3M.cjs} +1 -1
  109. package/dist/{vue-ui-sparkstackbar-DeWgfL12.js → vue-ui-sparkstackbar-wPYlidft.js} +3 -3
  110. package/dist/{vue-ui-strip-plot-BV27VHWB.cjs → vue-ui-strip-plot-BAcR2Zug.cjs} +1 -1
  111. package/dist/{vue-ui-strip-plot-Ci-hICkJ.js → vue-ui-strip-plot-Bm0JThi4.js} +9 -9
  112. package/dist/{vue-ui-table-R_KFQoq4.js → vue-ui-table-6ZR-bgMx.js} +1 -1
  113. package/dist/{vue-ui-table-Bd9ddVGy.cjs → vue-ui-table-B0FlP2RX.cjs} +1 -1
  114. package/dist/{vue-ui-table-heatmap-CPOETxT8.cjs → vue-ui-table-heatmap-B2Xe1T4D.cjs} +1 -1
  115. package/dist/{vue-ui-table-heatmap-TYLCpM_Y.js → vue-ui-table-heatmap-bJUl4rY6.js} +4 -4
  116. package/dist/{vue-ui-table-sparkline-H_qcrFc0.cjs → vue-ui-table-sparkline-DgZQmNaq.cjs} +1 -1
  117. package/dist/{vue-ui-table-sparkline-B-qJP3Yr.js → vue-ui-table-sparkline-Dxinc_iR.js} +5 -5
  118. package/dist/{vue-ui-thermometer-CBybvctJ.cjs → vue-ui-thermometer-BN1harXD.cjs} +1 -1
  119. package/dist/{vue-ui-thermometer-fV6P7B8U.js → vue-ui-thermometer-Nb1pgJ04.js} +5 -5
  120. package/dist/{vue-ui-timer-CU-tJV53.js → vue-ui-timer-C17OoYkC.js} +4 -4
  121. package/dist/{vue-ui-timer-CwQteT9E.cjs → vue-ui-timer-_44ECu7b.cjs} +1 -1
  122. package/dist/{vue-ui-tiremarks-Ba1Er97s.cjs → vue-ui-tiremarks-BSMuOb-Z.cjs} +1 -1
  123. package/dist/{vue-ui-tiremarks-Dxy0W8kp.js → vue-ui-tiremarks-lbnWHaOP.js} +5 -5
  124. package/dist/{vue-ui-treemap-CFqf6BUd.js → vue-ui-treemap-CbdnMlBb.js} +9 -9
  125. package/dist/{vue-ui-treemap-CpPqA91r.cjs → vue-ui-treemap-DinP2PhP.cjs} +1 -1
  126. package/dist/{vue-ui-vertical-bar-Px2OPOQp.cjs → vue-ui-vertical-bar-B7cKvp6J.cjs} +1 -1
  127. package/dist/{vue-ui-vertical-bar-CpIgWUoF.js → vue-ui-vertical-bar-B9HnpW6M.js} +9 -9
  128. package/dist/{vue-ui-waffle-DbR7pPaP.js → vue-ui-waffle-70I35yZY.js} +9 -9
  129. package/dist/{vue-ui-waffle-BEOhRYhC.cjs → vue-ui-waffle-BaqQnh1w.cjs} +1 -1
  130. package/dist/{vue-ui-wheel-BkbAV9mu.js → vue-ui-wheel-C8YTOjwd.js} +5 -5
  131. package/dist/{vue-ui-wheel-C4H-fBbx.cjs → vue-ui-wheel-DZbEyD4l.cjs} +1 -1
  132. package/dist/{vue-ui-word-cloud-B8vX27Pz.cjs → vue-ui-word-cloud-DkJyoTg9.cjs} +1 -1
  133. package/dist/{vue-ui-word-cloud-704bFMO3.js → vue-ui-word-cloud-Don3Oz-A.js} +6 -6
  134. package/dist/{vue-ui-xy-B8qzx04X.cjs → vue-ui-xy-DkBLRZ6y.cjs} +1 -1
  135. package/dist/{vue-ui-xy-kFskWWiT.js → vue-ui-xy-XJp90Tih.js} +12 -12
  136. package/dist/{vue-ui-xy-canvas-CJO0hp3z.js → vue-ui-xy-canvas-CsPcJxOA.js} +10 -10
  137. package/dist/{vue-ui-xy-canvas-BVhRHPYN.cjs → vue-ui-xy-canvas-Do2LgfMo.cjs} +1 -1
  138. package/package.json +1 -1
  139. package/dist/vue-ui-carousel-table-FMfXIF7s.cjs +0 -1
  140. package/dist/vue-ui-carousel-table-S3daEHYR.js +0 -330
  141. package/dist/vue-ui-kpi-Mbre-_3M.cjs +0 -1
  142. package/dist/vue-ui-kpi-u5GBFKBR.js +0 -54
@@ -1,6 +1,6 @@
1
1
  import p from "./html2canvas.esm-d2sM-0Wm.js";
2
2
  import { E as _ } from "./jspdf.es.min-C660YX78.js";
3
- import { r as v, u as w, x as A, y as M } from "./index-BvjCO-wv.js";
3
+ import { r as v, u as w, x as A, y as M } from "./index-BE6fhUyH.js";
4
4
  import { openBlock as d, createElementBlock as n, createElementVNode as r, normalizeStyle as c, toDisplayString as u, normalizeClass as y, createCommentVNode as a, withDirectives as f, vModelCheckbox as g, vModelText as C, renderSlot as O, Fragment as L, renderList as G, createStaticVNode as N, pushScopeId as m, popScopeId as T } from "vue";
5
5
  import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  const D = {
@@ -1,14 +1,14 @@
1
1
  import { computed as h, ref as v, onMounted as Ae, onBeforeUnmount as Fe, openBlock as s, createElementBlock as u, normalizeClass as ce, normalizeStyle as H, createVNode as Y, createCommentVNode as y, createBlock as M, unref as p, createSlots as Le, withCtx as b, renderSlot as x, normalizeProps as F, guardReactiveProps as L, createElementVNode as n, Fragment as N, renderList as S, toDisplayString as R, createTextVNode as Re, nextTick as Ve } from "vue";
2
- import { u as Ie, c as Be, t as Oe, o as Pe, e as C, z as Me, X as Ue, s as U, A as Ee, r as We, v as De, w as Ge, n as Xe, q as je, B as he } from "./index-BvjCO-wv.js";
2
+ import { u as Ie, c as Be, t as Oe, o as Pe, e as C, z as Me, X as Ue, s as U, A as Ee, r as We, v as De, w as Ge, n as Xe, q as je, B as he } from "./index-BE6fhUyH.js";
3
3
  import { t as He, u as Ye } from "./useResponsive-NZB-WLRF.js";
4
- import { _ as qe } from "./Title-Bx2ibobQ.js";
5
- import { u as Je, U as Ke } from "./usePrinter-CaKXrCiB.js";
6
- import { _ as Qe } from "./Tooltip-DOEMrisX.js";
7
- import { D as Ze } from "./DataTable-DKHF_NH2.js";
8
- import et from "./vue-ui-skeleton-jYHncdu5.js";
9
- import { S as tt } from "./Slicer-BDsv196Y.js";
10
- import lt from "./vue-ui-accordion-q-bLDiD3.js";
11
- import { u as pe } from "./useNestedProp-2KJaYPfM.js";
4
+ import { _ as qe } from "./Title-BcNPXpKX.js";
5
+ import { u as Je, U as Ke } from "./usePrinter-CdIphKpF.js";
6
+ import { _ as Qe } from "./Tooltip-etzDGo1Y.js";
7
+ import { D as Ze } from "./DataTable-Dytj5HQM.js";
8
+ import et from "./vue-ui-skeleton-DZk__alb.js";
9
+ import { S as tt } from "./Slicer-BNgHaM2_.js";
10
+ import lt from "./vue-ui-accordion-Dmz7RUKz.js";
11
+ import { u as pe } from "./useNestedProp-BcjRW6BJ.js";
12
12
  import { _ as ot } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  const at = ["id"], st = ["xmlns", "viewBox"], ut = { key: 0 }, it = ["id"], nt = ["stop-color"], rt = ["stop-color"], dt = ["stop-color"], vt = ["id"], yt = ["stop-color"], ct = ["stop-color"], ht = ["stop-color"], pt = { key: 0 }, gt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], bt = { key: 1 }, xt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x", "y", "font-size", "fill", "font-weight"], kt = { key: 2 }, wt = ["transform", "text-anchor", "font-size", "fill", "font-weight"], $t = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], _t = { key: 0 }, Ct = ["cx", "cy", "r", "fill"], Nt = ["cx", "cy", "r", "fill"], St = { key: 1 }, zt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Tt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], At = ["x", "y", "height", "width", "fill", "rx"], Ft = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], Lt = ["x", "y", "height", "width", "fill", "onMouseover"], Rt = {
14
14
  key: 3,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-oufiZvaS.cjs"),J=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-DxNugmhI.cjs"),K=require("./usePrinter-Cc8ufBvU.cjs"),he=require("./Tooltip-BC2Wlz7P.cjs"),pe=require("./DataTable-CHXdpx94.cjs"),fe=require("./vue-ui-skeleton-Fsru0dbb.cjs"),ge=require("./Slicer-xKlzke1v.cjs"),me=require("./vue-ui-accordion-DiR0dVog.cjs"),Q=require("./useNestedProp-CmTItGss.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=["id"],be=["xmlns","viewBox"],we={key:0},Ce=["id"],$e=["stop-color"],Ne=["stop-color"],_e=["stop-color"],Be=["id"],Se=["stop-color"],Ve=["stop-color"],Ee=["stop-color"],ze={key:0},Te=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:1},Le=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x","y","font-size","fill","font-weight"],Pe={key:2},Ie=["transform","text-anchor","font-size","fill","font-weight"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Me={key:0},Ue=["cx","cy","r","fill"],De=["cx","cy","r","fill"],qe={key:1},We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],He=["x","y","height","width","fill","rx"],je=["x","y","height","width","fill","rx","stroke","stroke-width"],Xe=["x","y","height","width","fill","onMouseover"],Ye={key:3,class:"vue-data-ui-watermark"},Je=["innerHTML"],Ke={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:Z}){const h=f,{vue_ui_candlestick:ee}=i.useConfig(),m=e.computed(()=>!!h.dataset&&h.dataset.length),y=e.ref(i.createUid()),te=e.ref(null),_=e.ref(!1),B=e.ref(""),S=e.ref(void 0),T=e.ref(0),F=e.ref(0),k=e.ref(null),A=e.ref(null),L=e.ref(null),R=e.ref(null),t=e.computed(()=>{const o=Q.useNestedProp({userConfig:h.config,defaultConfig:ee});return o.theme?{...Q.useNestedProp({userConfig:i.themes.vue_ui_candlestick[o.theme]||h.config,defaultConfig:o})}:o}),n=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),b=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(h.dataset)&&i.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const o=J.throttle(()=>{const{width:u,height:l}=J.useResponsive({chart:k.value,title:t.value.style.title.text?A.value:null,slicer:R.value,legend:L.value});n.value.width=u,n.value.height=l,n.value.xAxisFontSize=i.translateSize({relator:Math.min(u,l),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),n.value.yAxisFontSize=i.translateSize({relator:Math.min(u,l),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(o),b.value.observe(k.value.parentNode)}}),e.onBeforeUnmount(()=>{b.value&&b.value.disconnect()});const{isPrinting:P,isImaging:I,generatePdf:O,generateImage:M}=K.usePrinter({elementId:`vue-ui-candlestick_${y.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),s=e.computed(()=>{const{top:o,right:u,bottom:l,left:a}=t.value.style.layout.padding;return{top:o,right:n.value.width-u,left:a,bottom:n.value.height-l,width:n.value.width-a-u,height:n.value.height-o-l}}),V=e.computed(()=>h.dataset.length),d=e.ref({start:0,end:V.value}),U=e.computed(()=>h.dataset.slice(d.value.start,d.value.end)),E=e.computed(()=>(h.dataset.forEach((o,u)=>{[null,void 0].includes(o[0])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:u}),[null,void 0].includes(o[1])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:u}),[null,void 0].includes(o[2])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:u}),[null,void 0].includes(o[3])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:u}),[null,void 0].includes(o[4])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:u}),[null,void 0].includes(o[5])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:u})}),U.value.map(o=>({period:o[0],open:o[1],high:o[2],low:o[3],last:o[4],volume:o[5]})))),r=e.computed(()=>s.value.width/U.value.length),D=e.computed(()=>({max:Math.max(...E.value.map(o=>o.high)),min:0})),g=e.computed(()=>i.calculateNiceScale(D.value.min,D.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function w(o,u){return{...o,x:s.value.left+u*r.value+r.value/2,y:s.value.top+(1-o/g.value.max)*s.value.height,value:o}}const c=e.computed(()=>E.value.map((o,u)=>{const l=w(o.open,u),a=w(o.high,u),v=w(o.low,u),$=w(o.last,u),N=o.last>o.open;return{period:o.period,open:l,high:a,low:v,last:$,volume:o.volume,isBullish:N}}));function le(o){return o/g.value.max}const oe=e.computed(()=>g.value.ticks.map(o=>({y:s.value.bottom-s.value.height*le(o),value:o}))),ae=e.computed(()=>E.value.map(o=>o.period)),z=e.ref(null);function ue(o,u){S.value=o,z.value={datapoint:u,seriesIndex:o,series:c.value,config:t.value};const l=t.value.style.tooltip.customFormat;if(i.isFunction(l)&&i.functionReturnsString(()=>l({seriesIndex:o,datapoint:u,series:c.value,config:t.value})))B.value=l({seriesIndex:o,datapoint:u,series:c.value,config:t.value});else if(t.value.style.tooltip.show){let a="";const{period:v,open:$,high:N,low:H,last:j,volume:X,isBullish:Y}=c.value[o],{period:Ze,open:re,high:ne,low:de,last:ce,volume:ve}=t.value.translations;a+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BFH7X8WG.cjs"),J=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-CSQdI1EY.cjs"),K=require("./usePrinter-hyuaFHQj.cjs"),he=require("./Tooltip-B-laoopT.cjs"),pe=require("./DataTable-D_2ZW2eI.cjs"),fe=require("./vue-ui-skeleton-Df1qBO2k.cjs"),ge=require("./Slicer-DcjEg-ZZ.cjs"),me=require("./vue-ui-accordion-CvZhABQM.cjs"),Q=require("./useNestedProp-B_z4-n52.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=["id"],be=["xmlns","viewBox"],we={key:0},Ce=["id"],$e=["stop-color"],Ne=["stop-color"],_e=["stop-color"],Be=["id"],Se=["stop-color"],Ve=["stop-color"],Ee=["stop-color"],ze={key:0},Te=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:1},Le=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x","y","font-size","fill","font-weight"],Pe={key:2},Ie=["transform","text-anchor","font-size","fill","font-weight"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Me={key:0},Ue=["cx","cy","r","fill"],De=["cx","cy","r","fill"],qe={key:1},We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["x1","x2","y1","y2","stroke","stroke-width"],He=["x","y","height","width","fill","rx"],je=["x","y","height","width","fill","rx","stroke","stroke-width"],Xe=["x","y","height","width","fill","onMouseover"],Ye={key:3,class:"vue-data-ui-watermark"},Je=["innerHTML"],Ke={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:Z}){const h=f,{vue_ui_candlestick:ee}=i.useConfig(),m=e.computed(()=>!!h.dataset&&h.dataset.length),y=e.ref(i.createUid()),te=e.ref(null),_=e.ref(!1),B=e.ref(""),S=e.ref(void 0),T=e.ref(0),F=e.ref(0),k=e.ref(null),A=e.ref(null),L=e.ref(null),R=e.ref(null),t=e.computed(()=>{const o=Q.useNestedProp({userConfig:h.config,defaultConfig:ee});return o.theme?{...Q.useNestedProp({userConfig:i.themes.vue_ui_candlestick[o.theme]||h.config,defaultConfig:o})}:o}),n=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),b=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(h.dataset)&&i.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const o=J.throttle(()=>{const{width:u,height:l}=J.useResponsive({chart:k.value,title:t.value.style.title.text?A.value:null,slicer:R.value,legend:L.value});n.value.width=u,n.value.height=l,n.value.xAxisFontSize=i.translateSize({relator:Math.min(u,l),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),n.value.yAxisFontSize=i.translateSize({relator:Math.min(u,l),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(o),b.value.observe(k.value.parentNode)}}),e.onBeforeUnmount(()=>{b.value&&b.value.disconnect()});const{isPrinting:P,isImaging:I,generatePdf:O,generateImage:M}=K.usePrinter({elementId:`vue-ui-candlestick_${y.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),s=e.computed(()=>{const{top:o,right:u,bottom:l,left:a}=t.value.style.layout.padding;return{top:o,right:n.value.width-u,left:a,bottom:n.value.height-l,width:n.value.width-a-u,height:n.value.height-o-l}}),V=e.computed(()=>h.dataset.length),d=e.ref({start:0,end:V.value}),U=e.computed(()=>h.dataset.slice(d.value.start,d.value.end)),E=e.computed(()=>(h.dataset.forEach((o,u)=>{[null,void 0].includes(o[0])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:u}),[null,void 0].includes(o[1])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:u}),[null,void 0].includes(o[2])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:u}),[null,void 0].includes(o[3])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:u}),[null,void 0].includes(o[4])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:u}),[null,void 0].includes(o[5])&&i.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:u})}),U.value.map(o=>({period:o[0],open:o[1],high:o[2],low:o[3],last:o[4],volume:o[5]})))),r=e.computed(()=>s.value.width/U.value.length),D=e.computed(()=>({max:Math.max(...E.value.map(o=>o.high)),min:0})),g=e.computed(()=>i.calculateNiceScale(D.value.min,D.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function w(o,u){return{...o,x:s.value.left+u*r.value+r.value/2,y:s.value.top+(1-o/g.value.max)*s.value.height,value:o}}const c=e.computed(()=>E.value.map((o,u)=>{const l=w(o.open,u),a=w(o.high,u),v=w(o.low,u),$=w(o.last,u),N=o.last>o.open;return{period:o.period,open:l,high:a,low:v,last:$,volume:o.volume,isBullish:N}}));function le(o){return o/g.value.max}const oe=e.computed(()=>g.value.ticks.map(o=>({y:s.value.bottom-s.value.height*le(o),value:o}))),ae=e.computed(()=>E.value.map(o=>o.period)),z=e.ref(null);function ue(o,u){S.value=o,z.value={datapoint:u,seriesIndex:o,series:c.value,config:t.value};const l=t.value.style.tooltip.customFormat;if(i.isFunction(l)&&i.functionReturnsString(()=>l({seriesIndex:o,datapoint:u,series:c.value,config:t.value})))B.value=l({seriesIndex:o,datapoint:u,series:c.value,config:t.value});else if(t.value.style.tooltip.show){let a="";const{period:v,open:$,high:N,low:H,last:j,volume:X,isBullish:Y}=c.value[o],{period:Ze,open:re,high:ne,low:de,last:ce,volume:ve}=t.value.translations;a+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
2
2
  fill="${t.value.style.layout.candle.gradient.show?Y?`url(#bullish_gradient_${y.value})`:`url(#bearish_gradient_${y.value})`:Y?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${v}</div>`,a+=`${ve} : <b>${isNaN(X)?"-":Number(X.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${re}: <b>${t.value.style.tooltip.prefix} ${isNaN($.value)?"-":Number($.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${ne}: <b>${t.value.style.tooltip.prefix} ${isNaN(N.value)?"-":Number(N.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${de}: <b>${t.value.style.tooltip.prefix} ${isNaN(H.value)?"-":Number(H.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${ce}: <b>${t.value.style.tooltip.prefix} ${isNaN(j.value)?"-":Number(j.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+="</div>",B.value=`<div style="text-align:right">${a}</div>`}_.value=!0}function ie(){d.value={start:0,end:V.value},F.value+=1}function q(){e.nextTick(()=>{const o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],u=c.value.map(v=>[v.period,v.open.value,v.high.value,v.low.value,v.last.value,v.volume]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([o]).concat(u),a=i.createCsvContent(l);i.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-candlestick"})})}const C=e.computed(()=>{const o=c.value.map(a=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?a.isBullish?`url(#bullish_gradient_${y.value}`:`url(#bearish_gradient_${y.value})`:a.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${a.period}`,`${t.value.table.td.prefix} ${isNaN(a.open.value)?"-":Number(a.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.high.value)?"-":Number(a.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.low.value)?"-":Number(a.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.last.value)?"-":Number(a.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(a.volume)?"-":a.volume.toLocaleString()}`]),u={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:l,body:o,config:u,colNames:l}}),x=e.ref(!1);function se(o){x.value=o,T.value+=1}function W(){p.value.showTable=!p.value.showTable}function G(){p.value.showTooltip=!p.value.showTooltip}return Z({generatePdf:O,generateCsv:q,generateImage:M,toggleTable:W,toggleTooltip:G}),(o,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:k,class:e.normalizeClass(`vue-ui-candlestick ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${y.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(ye._sfc_main,{config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(K.UserOptions,{ref_key:"details",ref:te,key:`user_options_${T.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(I),isPrinting:e.unref(P),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,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:x.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:se,onGeneratePdf:e.unref(O),onGenerateCsv:q,onGenerateImage:e.unref(M),onToggleTable:W,onToggleTooltip:G},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[c.value.length>0?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,$e),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,_e)],8,Ce),e.createElementVNode("linearGradient",{id:`bullish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,Se),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(i.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ee)],8,Be)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("line",{x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Te),e.createElementVNode("line",{x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[l.value>=g.value.min&&l.value<=g.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value.left,x2:s.value.left-5,y1:l.y,y2:l.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Le)):e.createCommentVNode("",!0),l.value>=g.value.min&&l.value<=g.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:l.y+n.value.yAxisFontSize/3,"font-size":n.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(i.canShowValue)(l.value)?l.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,Re)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ae.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${s.value.left+r.value*a+r.value/2}, ${s.value.bottom+n.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":n.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(l),9,Ie)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:l.open.x,x2:l.open.x,y1:l.high.y,y2:l.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,Oe),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Me,[e.createElementVNode("circle",{cx:l.high.x,cy:l.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,Ue),e.createElementVNode("circle",{cx:l.low.x,cy:l.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,De)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",qe,[e.createElementVNode("line",{x1:l.high.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:l.high.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:l.high.y,y2:l.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,We),e.createElementVNode("line",{x1:l.low.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:l.low.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:l.low.y,y2:l.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,Ge)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{x:l.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:l.isBullish?l.last.y:l.open.y,height:Math.abs(l.last.y-l.open.y)<=0?1e-4:Math.abs(l.last.y-l.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,He))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{x:l.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:l.isBullish?l.last.y:l.open.y,height:Math.abs(l.last.y-l.open.y)<=0?1e-4:Math.abs(l.last.y-l.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:l.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${y.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${y.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,je))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,a)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+a*r.value,y:s.value.top,height:s.value.height<=0?1e-4:s.value.height,width:r.value<=0?1e-4:r.value,fill:S.value===a?`${t.value.style.layout.selector.color}${e.unref(i.opacity)[t.value.style.layout.selector.opacity]}`:"transparent",onMouseover:v=>ue(a,l),onMouseleave:u[0]||(u[0]=v=>{S.value=void 0,_.value=!1})},null,40,Xe))),256))])])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:n.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fe.default,{key:4,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&m.value?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartSlicer",ref:R},[(e.openBlock(),e.createBlock(ge.Slicer,{key:`slicer_${F.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[d.value.start]?f.dataset[d.value.start][0]:f.dataset[0][0],labelRight:f.dataset[d.value.end-1]?f.dataset[d.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:V.value,min:0,valueStart:d.value.start,valueEnd:d.value.end,start:d.value.start,"onUpdate:start":u[1]||(u[1]=l=>d.value.start=l),end:d.value.end,"onUpdate:end":u[2]||(u[2]=l=>d.value.end=l),onReset:ie},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:L},[e.renderSlot(o.$slots,"legend",{legend:c.value},void 0,!0)],512),e.createVNode(he._sfc_main,{show:p.value.showTooltip&&_.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:k.value,content:B.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),m.value?(e.openBlock(),e.createBlock(me.default,{key:6,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(pe.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:u[3]||(u[3]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[e.createElementVNode("div",{innerHTML:l},null,8,Je)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,xe))}},Qe=ke._export_sfc(Ke,[["__scopeId","data-v-6b386f48"]]);exports.default=Qe;
@@ -0,0 +1,346 @@
1
+ import { ref as o, onMounted as F, computed as B, onBeforeUnmount as ie, watch as ye, openBlock as u, createElementBlock as r, createElementVNode as z, normalizeStyle as d, unref as b, normalizeClass as Ce, createTextVNode as U, toDisplayString as V, renderSlot as p, Fragment as G, renderList as M, normalizeProps as q, guardReactiveProps as D, createCommentVNode as E, createBlock as se, createSlots as $e, withCtx as O, nextTick as Te } from "vue";
2
+ import { u as Ae, c as xe, o as X, e as j, r as ke, n as we, q as Ie } from "./index-BE6fhUyH.js";
3
+ import { u as Fe } from "./useNestedProp-BcjRW6BJ.js";
4
+ import { u as Be, U as Oe } from "./usePrinter-CdIphKpF.js";
5
+ import Pe from "./vue-ui-skeleton-DZk__alb.js";
6
+ import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ const ze = ["id"], Ee = ["height"], Ne = ["data-cell", "height"], Se = {
8
+ __name: "vue-ui-carousel-table",
9
+ props: {
10
+ config: {
11
+ type: Object,
12
+ default() {
13
+ return {};
14
+ }
15
+ },
16
+ dataset: {
17
+ type: Object,
18
+ default() {
19
+ return {};
20
+ }
21
+ }
22
+ },
23
+ setup(f, { expose: ue }) {
24
+ const l = f, { vue_ui_carousel_table: re } = Ae(), N = o(xe()), J = o(!1), y = o(!!l.dataset);
25
+ F(() => {
26
+ X(l.dataset) ? j({
27
+ componentName: "VueUiCarouselTable",
28
+ type: "dataset"
29
+ }) : ((!l.dataset.head || X(l.dataset.head)) && (j({
30
+ componentName: "VueUiCarouselTable",
31
+ type: "datasetAttribute",
32
+ property: "head"
33
+ }), y.value = !1), (!l.dataset.body || X(l.dataset.body)) && (j({
34
+ componentName: "VueUiCarouselTable",
35
+ type: "datasetAttribute",
36
+ property: "body"
37
+ }), y.value = !1));
38
+ });
39
+ const e = B(() => Fe({
40
+ userConfig: l.config,
41
+ defaultConfig: re
42
+ })), { isPrinting: K, isImaging: Q, generatePdf: de, generateImage: W } = Be({
43
+ elementId: `carousel-table_${N.value}`,
44
+ fileName: e.value.caption.text || "vue-ui-carousel-table"
45
+ }), v = o({
46
+ showAnimation: e.value.animation.use
47
+ }), s = o(null), Y = o(null), C = o(null), $ = o(null), T = o(0), P = o(0), R = o(!1), A = o(null), h = o(null), x = o(0);
48
+ function Z() {
49
+ A.value && (h.value = {
50
+ elements: A.value.getElementsByTagName("tr"),
51
+ heights: Array.from(A.value.getElementsByTagName("tr")).map((t) => t.getBoundingClientRect().height)
52
+ });
53
+ }
54
+ F(Z);
55
+ const ve = B(() => !h.value || !h.value.heights.length ? 0 : Math.max(...h.value.heights) + T.value + P.value), ce = B(() => l.dataset.body ? e.value.tbody.tr.visible <= l.dataset.body.length ? e.value.tbody.tr.visible : l.dataset.body.length : 0), pe = 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 + T.value + P.value), S = o(0), k = o(null), w = o(0), g = o(!1), _ = o(0);
56
+ F(() => {
57
+ C.value && (T.value = C.value.getBoundingClientRect().height), $.value && (P.value = $.value.getBoundingClientRect().height), v.value.showAnimation && h.value && ee();
58
+ }), F(() => {
59
+ if (s.value) {
60
+ let a = function() {
61
+ const i = t.getBoundingClientRect().bottom;
62
+ n.forEach((c) => {
63
+ c.getBoundingClientRect().top < i ? c.style.visibility = "hidden" : c.style.visibility = "visible";
64
+ });
65
+ };
66
+ const t = s.value.querySelector("thead"), n = Array.from(A.value.querySelectorAll("tr"));
67
+ s.value.addEventListener("scroll", a), a(), ie(() => {
68
+ s.value.removeEventListener("scroll", a);
69
+ });
70
+ }
71
+ });
72
+ function he(t) {
73
+ J.value = t, _.value += 1;
74
+ }
75
+ function ee() {
76
+ !k.value && !g.value && (k.value = requestAnimationFrame(te));
77
+ }
78
+ function fe() {
79
+ if (!s.value) return !1;
80
+ const { scrollTop: t, scrollHeight: n, clientHeight: a } = s.value;
81
+ return t + a >= n;
82
+ }
83
+ function te(t) {
84
+ if (g.value) return;
85
+ w.value || (w.value = t), t - w.value >= e.value.animation.speedMs && (S.value += h.value.heights[x.value], (fe() || x.value >= h.value.heights.length) && (S.value = 0, x.value = -1), x.value += 1, s.value && s.value.scrollTo({
86
+ top: S.value,
87
+ behavior: "smooth"
88
+ }), w.value = t), k.value = requestAnimationFrame(te);
89
+ }
90
+ function m() {
91
+ g.value = !0, cancelAnimationFrame(k.value), k.value = null;
92
+ }
93
+ ie(m);
94
+ function I() {
95
+ !g.value || !v.value.showAnimation || (g.value = !1, w.value = 0, ee());
96
+ }
97
+ function ge() {
98
+ e.value.animation.pauseOnHover && m();
99
+ }
100
+ const H = o(null);
101
+ function me() {
102
+ m(), clearTimeout(H.value);
103
+ }
104
+ function ae() {
105
+ clearTimeout(H.value), H.value = setTimeout(I, 1e3);
106
+ }
107
+ ye(
108
+ () => e.value.animation.use,
109
+ (t) => {
110
+ t ? (v.value.showAnimation = !0, I()) : (v.value.showAnimation = !1, m());
111
+ }
112
+ );
113
+ const be = B(() => e.value.responsiveBreakpoint);
114
+ F(() => {
115
+ const t = new ResizeObserver((n) => {
116
+ n.forEach((a) => {
117
+ R.value = a.contentRect.width < be.value;
118
+ }), T.value = C.value ? C.value.getBoundingClientRect().height : 0, P.value = $.value ? $.value.getBoundingClientRect().height : 0, x.value = 0, Z();
119
+ });
120
+ s.value && t.observe(s.value);
121
+ });
122
+ function oe() {
123
+ de();
124
+ }
125
+ function ne() {
126
+ v.value.showAnimation = !v.value.showAnimation, v.value.showAnimation ? I() : m();
127
+ }
128
+ function le() {
129
+ Te(() => {
130
+ const t = l.dataset.head.map((i, c) => [
131
+ [l.dataset.body[c]]
132
+ ]), n = [
133
+ [e.value.caption.text],
134
+ [l.dataset.head.map((i) => [i])]
135
+ ].concat(t), a = we(n);
136
+ Ie({
137
+ csvContent: a,
138
+ title: e.value.caption.text || "vue-ui-carousel-table"
139
+ });
140
+ });
141
+ }
142
+ return ue({
143
+ pauseAnimation: m,
144
+ resumeAnimation: I,
145
+ toggleAnimation: ne,
146
+ generateCsv: le,
147
+ generatePdf: oe,
148
+ generateImage: W
149
+ }), (t, n) => (u(), r("div", {
150
+ style: { position: "relative", overflow: "visible" },
151
+ ref_key: "chartContainer",
152
+ ref: Y
153
+ }, [
154
+ z("div", {
155
+ ref_key: "tableContainer",
156
+ ref: s,
157
+ id: `carousel-table_${N.value}`,
158
+ style: d({
159
+ height: b(K) || b(Q) ? "auto" : `${Math.max(pe.value, ve.value)}px`,
160
+ containerType: "inline-size",
161
+ position: "relative",
162
+ overflow: "auto",
163
+ fontFamily: e.value.fontFamily
164
+ }),
165
+ class: Ce({ "vue-ui-responsive": R.value, "is-playing": !g.value }),
166
+ onMouseenter: n[0] || (n[0] = (a) => ge()),
167
+ onMouseleave: n[1] || (n[1] = (a) => I()),
168
+ onTouchstart: n[2] || (n[2] = (a) => me()),
169
+ onTouchend: n[3] || (n[3] = (a) => ae()),
170
+ onTouchcancel: n[4] || (n[4] = (a) => ae())
171
+ }, [
172
+ y.value ? (u(), r("table", {
173
+ key: 0,
174
+ class: "vue-data-ui-carousel-table",
175
+ style: d({
176
+ ...e.value.style,
177
+ border: `${e.value.border.size}px solid ${e.value.border.color}`,
178
+ width: "100%",
179
+ borderCollapse: "collapse"
180
+ })
181
+ }, [
182
+ z("caption", {
183
+ ref_key: "caption",
184
+ ref: C,
185
+ class: "vue-data-ui-carousel-table-caption",
186
+ style: d({
187
+ ...e.value.caption.style,
188
+ fontFamily: "inherit",
189
+ position: "sticky",
190
+ top: 0,
191
+ zIndex: 2,
192
+ paddingTop: e.value.caption.padding.top + "px",
193
+ paddingRight: e.value.caption.padding.right + "px",
194
+ paddingBottom: e.value.caption.padding.bottom + "px",
195
+ paddingLeft: e.value.caption.padding.left + "px",
196
+ boxShadow: R.value ? e.value.thead.tr.style.boxShadow : "none",
197
+ minHeight: "36px"
198
+ })
199
+ }, [
200
+ U(V(e.value.caption.text && !t.$slots.caption ? e.value.caption.text : "") + " ", 1),
201
+ p(t.$slots, "caption", {}, void 0, !0)
202
+ ], 4),
203
+ z("thead", {
204
+ style: d({ ...e.value.thead.style, position: "sticky", top: `${T.value}px`, zIndex: 1 })
205
+ }, [
206
+ z("tr", {
207
+ ref_key: "tableRow",
208
+ ref: $,
209
+ role: "row",
210
+ style: d({
211
+ ...e.value.thead.tr.style,
212
+ border: e.value.thead.tr.border.size ? `${e.value.thead.tr.border.size}px solid ${e.value.thead.tr.border.color}` : "none",
213
+ boxShadow: R.value ? "none" : e.value.thead.tr.style.boxShadow
214
+ }),
215
+ height: `${e.value.thead.tr.height}px`
216
+ }, [
217
+ (u(!0), r(G, null, M(f.dataset.head, (a, i) => (u(), r("th", {
218
+ role: "cell",
219
+ key: `th_${i}`,
220
+ style: d({
221
+ ...e.value.thead.tr.th.style,
222
+ 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",
223
+ paddingTop: e.value.thead.tr.th.padding.top + "px",
224
+ paddingRight: e.value.thead.tr.th.padding.right + "px",
225
+ paddingBottom: e.value.thead.tr.th.padding.bottom + "px",
226
+ paddingLeft: e.value.thead.tr.th.padding.left + "px"
227
+ })
228
+ }, [
229
+ U(V(t.$slots.th ? "" : a) + " ", 1),
230
+ p(t.$slots, "th", q(D({ th: a, colIndex: i })), void 0, !0)
231
+ ], 4))), 128))
232
+ ], 12, Ee)
233
+ ], 4),
234
+ f.dataset.body && f.dataset.head ? (u(), r("tbody", {
235
+ key: 0,
236
+ ref_key: "tbody",
237
+ ref: A,
238
+ style: d({
239
+ clipPath: "inset(0,0,0,0)"
240
+ })
241
+ }, [
242
+ (u(!0), r(G, null, M(f.dataset.body, (a, i) => (u(), r("tr", {
243
+ style: d({
244
+ ...e.value.tbody.tr.style,
245
+ border: `${e.value.tbody.tr.border.size}px solid ${e.value.tbody.tr.border.color}`,
246
+ verticalAlign: "middle"
247
+ })
248
+ }, [
249
+ (u(!0), r(G, null, M(a, (c, L) => (u(), r("td", {
250
+ role: "cell",
251
+ "data-cell": f.dataset.head[L] || "",
252
+ style: d({
253
+ ...e.value.tbody.tr.td.style,
254
+ border: `${e.value.tbody.tr.td.border.size}px solid ${e.value.tbody.tr.td.border.color}`,
255
+ backgroundColor: e.value.tbody.tr.td.style.backgroundColor + b(ke)[i % 2 === 0 && e.value.tbody.tr.td.alternateColor ? e.value.tbody.tr.td.alternateOpacity * 100 : 100],
256
+ paddingTop: e.value.tbody.tr.td.padding.top + "px",
257
+ paddingRight: e.value.tbody.tr.td.padding.right + "px",
258
+ paddingBottom: e.value.tbody.tr.td.padding.bottom + "px",
259
+ paddingLeft: e.value.tbody.tr.td.padding.left + "px",
260
+ verticalAlign: "middle"
261
+ }),
262
+ height: `${e.value.tbody.tr.height}px`
263
+ }, [
264
+ U(V(t.$slots.td ? "" : c) + " ", 1),
265
+ p(t.$slots, "td", q(D({ td: c, rowIndex: i, colIndex: L })), void 0, !0)
266
+ ], 12, Ne))), 256))
267
+ ], 4))), 256))
268
+ ], 4)) : E("", !0)
269
+ ], 4)) : E("", !0)
270
+ ], 46, ze),
271
+ y.value ? E("", !0) : (u(), se(Pe, {
272
+ key: 0,
273
+ config: {
274
+ type: "table"
275
+ }
276
+ })),
277
+ e.value.userOptions.show && y.value ? (u(), se(Oe, {
278
+ ref: "details",
279
+ key: `user_option_${_.value}`,
280
+ backgroundColor: e.value.style.backgroundColor,
281
+ color: e.value.style.color,
282
+ isPrinting: b(K),
283
+ isImaging: b(Q),
284
+ uid: N.value,
285
+ hasTooltip: !1,
286
+ hasPdf: e.value.userOptions.buttons.pdf,
287
+ hasImg: e.value.userOptions.buttons.img,
288
+ hasXls: e.value.userOptions.buttons.csv,
289
+ hasTable: !1,
290
+ hasLabel: !1,
291
+ hasAnimation: e.value.userOptions.buttons.animation,
292
+ isAnimation: !v.value.showAnimation,
293
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
294
+ isFullscreen: J.value,
295
+ chartElement: Y.value,
296
+ titles: { ...e.value.userOptions.buttonTitles },
297
+ zIndex: 3,
298
+ noOffset: "",
299
+ onGeneratePdf: oe,
300
+ onGenerateCsv: le,
301
+ onGenerateImage: b(W),
302
+ onToggleAnimation: ne,
303
+ onToggleFullscreen: he
304
+ }, $e({ _: 2 }, [
305
+ t.$slots.optionPdf ? {
306
+ name: "optionPdf",
307
+ fn: O(() => [
308
+ p(t.$slots, "optionPdf", {}, void 0, !0)
309
+ ]),
310
+ key: "0"
311
+ } : void 0,
312
+ t.$slots.optionCsv ? {
313
+ name: "optionCsv",
314
+ fn: O(() => [
315
+ p(t.$slots, "optionCsv", {}, void 0, !0)
316
+ ]),
317
+ key: "1"
318
+ } : void 0,
319
+ t.$slots.optionImg ? {
320
+ name: "optionImg",
321
+ fn: O(() => [
322
+ p(t.$slots, "optionImg", {}, void 0, !0)
323
+ ]),
324
+ key: "2"
325
+ } : void 0,
326
+ t.$slots.optionAnimation ? {
327
+ name: "optionAnimation",
328
+ fn: O(() => [
329
+ p(t.$slots, "optionAnimation", {}, void 0, !0)
330
+ ]),
331
+ key: "3"
332
+ } : void 0,
333
+ t.$slots.optionFullscreen ? {
334
+ name: "optionFullscreen",
335
+ fn: O(({ toggleFullscreen: a, isFullscreen: i }) => [
336
+ p(t.$slots, "optionFullscreen", q(D({ toggleFullscreen: a, isFullscreen: i })), void 0, !0)
337
+ ]),
338
+ key: "4"
339
+ } : void 0
340
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasAnimation", "isAnimation", "hasFullscreen", "isFullscreen", "chartElement", "titles", "onGenerateImage"])) : E("", !0)
341
+ ], 512));
342
+ }
343
+ }, qe = /* @__PURE__ */ Re(Se, [["__scopeId", "data-v-f722c10b"]]);
344
+ export {
345
+ qe as default
346
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BFH7X8WG.cjs"),te=require("./useNestedProp-B_z4-n52.cjs"),D=require("./usePrinter-hyuaFHQj.cjs"),oe=require("./vue-ui-skeleton-Df1qBO2k.cjs"),ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],le=["height"],re=["data-cell","height"],ie={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(c,{expose:G}){const l=c,{vue_ui_carousel_table:j}=u.useConfig(),A=e.ref(u.createUid()),z=e.ref(!1),m=e.ref(!!l.dataset);e.onMounted(()=>{u.objectIsEmpty(l.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!l.dataset.head||u.objectIsEmpty(l.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),m.value=!1),(!l.dataset.body||u.objectIsEmpty(l.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),m.value=!1))});const t=e.computed(()=>te.useNestedProp({userConfig:l.config,defaultConfig:j})),{isPrinting:I,isImaging:P,generatePdf:X,generateImage:F}=D.usePrinter({elementId:`carousel-table_${A.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),s=e.ref({showAnimation:t.value.animation.use}),i=e.ref(null),N=e.ref(null),h=e.ref(null),g=e.ref(null),b=e.ref(0),B=e.ref(0),$=e.ref(!1),y=e.ref(null),v=e.ref(null),k=e.ref(0);function R(){y.value&&(v.value={elements:y.value.getElementsByTagName("tr"),heights:Array.from(y.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(R);const J=e.computed(()=>!v.value||!v.value.heights.length?0:Math.max(...v.value.heights)+b.value+B.value),K=e.computed(()=>l.dataset.body?t.value.tbody.tr.visible<=l.dataset.body.length?t.value.tbody.tr.visible:l.dataset.body.length:0),Q=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)*K.value+b.value+B.value),w=e.ref(0),C=e.ref(null),T=e.ref(0),p=e.ref(!1),O=e.ref(0);e.onMounted(()=>{h.value&&(b.value=h.value.getBoundingClientRect().height),g.value&&(B.value=g.value.getBoundingClientRect().height),s.value.showAnimation&&v.value&&V()}),e.onMounted(()=>{if(i.value){let a=function(){const r=o.getBoundingClientRect().bottom;n.forEach(d=>{d.getBoundingClientRect().top<r?d.style.visibility="hidden":d.style.visibility="visible"})};const o=i.value.querySelector("thead"),n=Array.from(y.value.querySelectorAll("tr"));i.value.addEventListener("scroll",a),a(),e.onBeforeUnmount(()=>{i.value.removeEventListener("scroll",a)})}});function W(o){z.value=o,O.value+=1}function V(){!C.value&&!p.value&&(C.value=requestAnimationFrame(L))}function Y(){if(!i.value)return!1;const{scrollTop:o,scrollHeight:n,clientHeight:a}=i.value;return o+a>=n}function L(o){if(p.value)return;T.value||(T.value=o),o-T.value>=t.value.animation.speedMs&&(w.value+=v.value.heights[k.value],(Y()||k.value>=v.value.heights.length)&&(w.value=0,k.value=-1),k.value+=1,i.value&&i.value.scrollTo({top:w.value,behavior:"smooth"}),T.value=o),C.value=requestAnimationFrame(L)}function f(){p.value=!0,cancelAnimationFrame(C.value),C.value=null}e.onBeforeUnmount(f);function x(){!p.value||!s.value.showAnimation||(p.value=!1,T.value=0,V())}function Z(){t.value.animation.pauseOnHover&&f()}const S=e.ref(null);function _(){f(),clearTimeout(S.value)}function M(){clearTimeout(S.value),S.value=setTimeout(x,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(s.value.showAnimation=!0,x()):(s.value.showAnimation=!1,f())});const ee=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(n=>{n.forEach(a=>{$.value=a.contentRect.width<ee.value}),b.value=h.value?h.value.getBoundingClientRect().height:0,B.value=g.value?g.value.getBoundingClientRect().height:0,k.value=0,R()});i.value&&o.observe(i.value)});function q(){X()}function H(){s.value.showAnimation=!s.value.showAnimation,s.value.showAnimation?x():f()}function U(){e.nextTick(()=>{const o=l.dataset.head.map((r,d)=>[[l.dataset.body[d]]]),n=[[t.value.caption.text],[l.dataset.head.map(r=>[r])]].concat(o),a=u.createCsvContent(n);u.downloadCsv({csvContent:a,title:t.value.caption.text||"vue-ui-carousel-table"})})}return G({pauseAnimation:f,resumeAnimation:x,toggleAnimation:H,generateCsv:U,generatePdf:q,generateImage:F}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:N},[e.createElementVNode("div",{ref_key:"tableContainer",ref:i,id:`carousel-table_${A.value}`,style:e.normalizeStyle({height:e.unref(I)||e.unref(P)?"auto":`${Math.max(Q.value,J.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":$.value,"is-playing":!p.value}),onMouseenter:n[0]||(n[0]=a=>Z()),onMouseleave:n[1]||(n[1]=a=>x()),onTouchstart:n[2]||(n[2]=a=>_()),onTouchend:n[3]||(n[3]=a=>M()),onTouchcancel:n[4]||(n[4]=a=>M())},[m.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"})},[e.createElementVNode("caption",{ref_key:"caption",ref:h,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:$.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px"})},[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:`${b.value}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:g,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:$.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(c.dataset.head,(a,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${r}`,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?"":a)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:a,colIndex:r})),void 0,!0)],4))),128))],12,le)],4),c.dataset.body&&c.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:y,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.dataset.body,(a,r)=>(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(a,(d,E)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":c.dataset.head[E]||"",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:t.value.tbody.tr.td.style.backgroundColor+e.unref(u.opacity)[r%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?"":d)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:d,rowIndex:r,colIndex:E})),void 0,!0)],12,re))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ne),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref:"details",key:`user_option_${O.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(I),isImaging:e.unref(P),uid:A.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:!s.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:z.value,chartElement:N.value,titles:{...t.value.userOptions.buttonTitles},zIndex:3,noOffset:"",onGeneratePdf:q,onGenerateCsv:U,onGenerateImage:e.unref(F),onToggleAnimation:H,onToggleFullscreen:W},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:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","titles","onGenerateImage"])):e.createCommentVNode("",!0)],512))}},ue=ae._export_sfc(ie,[["__scopeId","data-v-f722c10b"]]);exports.default=ue;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-oufiZvaS.cjs"),Y=require("./usePrinter-Cc8ufBvU.cjs"),ce=require("./vue-ui-skeleton-Fsru0dbb.cjs"),ie=require("./BaseIcon-C-k_mqXL.cjs"),de=require("./vue-ui-accordion-DiR0dVog.cjs"),H=require("./useNestedProp-CmTItGss.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],he=["xmlns","viewBox"],pe={key:0},fe=["fill","font-weight","font-size","x","y"],me=["fill","font-weight","font-size","x","y"],ge=["id"],be=["stop-color"],ke=["stop-color"],xe=["id"],_e=["stop-color"],Be=["stop-color"],Ee=["id"],Se=["stop-color"],Ne=["stop-color"],ze=["stop-color"],Ce=["id"],we=["stop-color"],Ve=["stop-color"],$e=["stop-color"],Te=["id"],Fe=["stop-color"],De=["stop-color"],Le=["stop-color"],Me={key:1},Ie=["x","y","font-size","font-weight","fill"],Pe=["x","y","font-size","font-weight","fill"],Oe=["d","stroke"],Re=["cx","cy","r","fill"],Xe=["cx","cy","r","fill","stroke","stroke-width","onClick"],je={key:2},Ae=["x","y","font-size","fill","onClick"],Ge={key:0},Ue=["x","y","fill","font-size","font-weight"],qe=["x","y","height","width","fill","rx","onClick"],Ye=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],He={key:3},We=["x","y","fill","font-size","onClick"],Ke=["d","stroke"],Je=["cx","cy","fill","onClick"],Qe=["fill","cx","cy","r","onClick"],Ze={key:4},et=["x","y","font-size","font-weight","fill"],tt=["x1","x2","y1","y2","stroke","stroke-width"],lt=["y","height","width"],at={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},ot={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},nt={viewBox:"0 0 20 20",height:"16",width:"16"},rt=["fill"],st={key:6},ut=["y","height","width"],ct={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},it={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},dt={viewBox:"0 0 20 20",height:"16",width:"16"},yt=["fill"],vt=["d","stroke"],ht=["cx","cy","fill"],pt=["cx","cy","fill"],ft=["d","stroke"],mt=["cx","cy","fill"],gt=["cx","cy","fill"],bt=["x","y","fill","font-size","font-weight"],kt=["x","y","fill","font-size","font-weight"],xt=["x","text-anchor","y","fill","font-size"],_t=["x","text-anchor","y","fill","font-size"],Bt=["x","text-anchor","y","fill","font-size"],Et=["x","text-anchor","y","fill","font-size"],St=["x","text-anchor","y","fill","font-size"],Nt=["x","y","font-size","fill"],zt=["x","y","font-size","fill"],Ct=["x","y","font-size","fill"],wt={key:2,class:"vue-data-ui-watermark"},Vt={style:{"padding-top":"36px",position:"relative"}},$t={class:"vue-ui-data-table"},Tt={key:0},Ft=["data-cell"],Dt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Lt={key:0},Mt={key:1},It=["data-cell"],Pt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ot={key:0},Rt={key:1},Xt=["data-cell"],jt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},At={key:0},Gt={key:1},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=["data-cell"],il={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl=["data-cell"],hl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},pl=["data-cell"],fl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(W,{expose:K,emit:N}){const k=W;e.useCssVars(a=>({"3f25f622":a.tdo}));const{vue_ui_chestnut:J}=n.useConfig(),C=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(n.createUid()),D=e.ref(null),Q=e.ref(null),L=e.ref(0),t=e.computed(()=>{const a=H.useNestedProp({userConfig:k.config,defaultConfig:J});return a.theme?{...H.useNestedProp({userConfig:n.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}),{isPrinting:M,isImaging:I,generatePdf:P,generateImage:O}=Y.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),$=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),w=e.ref({showTable:t.value.table.show}),R=e.ref(null),X=e.ref(!1),Z=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})),x=e.computed(()=>C.value?k.dataset.flatMap(a=>a.branches.map(s=>s.value)).reduce((a,s)=>a+s):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{n.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${o}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{n.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${o} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=a.branches.map(o=>o.value).reduce((o,d)=>o+d);return{...a,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:a.branches.map((o,d)=>({...o,rootName:a.name,rootIndex:s,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],value:o.value>=0?o.value:0,id:o.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:o.value/l,type:"branch",breakdown:o.breakdown.map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/x.value,branchName:o.name,branchValue:o.value,branchToTotal:o.value/x.value,branchToRoot:o.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/x.value,nutToRoot:i.value/l,nutToBranch:i.value/o.value},...i,type:"nut",branchName:o.name,rootName:a.name,branchTotal:o.value>=0?o.value:0,proportionToBranch:i.value/o.value,proportionToRoot:i.value/l,proportionToTree:i.value/x.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:n.convertColorToHex(i.color)||$.value[y]||n.palette[y]||n.palette[y%n.palette.length],value:i.value>=0?i.value:0}))}))}})));function ee(){return m.value}const te=e.computed(()=>m.value.flatMap(a=>a.branches).length),le=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ae=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),j=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,o=a.total/le.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:o<r.value.branchSize/2?r.value.branchSize/2:o}})),oe=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),ne=e.computed(()=>B.value.flatMap(a=>a.branches)),_=e.computed(()=>ne.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:j.value,x2:384*a.value/ae.value*oe.value+j.value})));function T(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const c=e.ref(null),E=e.ref(null),v=e.ref(null),g=e.ref(null);function p(){c.value=null,v.value=null,g.value=null}function b(a){return g.value?g.value===null?!0:a.type==="root"?a.id===g.value.id:a.rootIndex===g.value.rootIndex:c.value===null&&v.value===null?!0:a.type==="nut"?c.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||c.value&&c.value.rootIndex===a.rootIndex:!1}function A(a){p(),e.nextTick(()=>{c.value=a,v.value=a,E.value=n.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),N("selectNut",a.breakdown)})}function S(){c.value=null,E.value=null,N("selectNut",null)}function F(a){v.value&&v.value.id===a.id?(v.value=null,p(),N("selectBranch",null)):(p(),v.value=a,N("selectBranch",a))}function G(a){g.value&&g.value.id===a.id?(p(),N("selectRoot",null)):(p(),g.value=a,N("selectRoot",a))}function re(){return f.value.bottom-(c.value.y1+180)<0?0:f.value.bottom}function z(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function se(){new ResizeObserver(s=>{s.forEach(l=>{X.value=l.contentRect.width<Z.value})}).observe(R.value)}e.onMounted(()=>{n.objectIsEmpty(k.dataset)&&n.error({componentName:"VueUiChestnut",type:"dataset"});const a=te.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,se()});const u=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,o)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,bl)=>y.table)));return{head:a,body:s}});function U(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",x.value],[""]],s=u.value.head,l=u.value.body.map((i,y)=>[u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootName,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootValue,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchName,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchValue,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),o=a.concat([s]).concat(l),d=n.createCsvContent(o);n.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function ue(a){V.value=a,L.value+=1}function q(){w.value.showTable=!w.value.showTable}return K({getData:ee,generatePdf:P,generateCsv:U,generateImage:O,toggleTable:q}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:D,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;padding-top:36px;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(M),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:D.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(P),onGenerateCsv:U,onGenerateImage:e.unref(O),onToggleTable:q},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:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value.height>0&&C.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.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(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",pe,[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,fe)):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,me)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,o)=>(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(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.roots.gradientIntensity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,ke)],8,ge))),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,_e),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(l.color,.02)}${e.unref(n.opacity)[100-t.value.style.chart.layout.branches.gradientIntensity]}`},null,8,Be)],8,xe))),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":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,Se),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.selected.gradientIntensity]}`},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,ze)],8,Ee),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,we),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.gradientIntensity]}`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,$e)],8,Ce),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":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[100]}`},null,8,Fe),e.createElementVNode("stop",{offset:"80%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[60]}`},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[0]}`},null,8,Le)],8,Te)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Me,[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,Ie),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(t.value.style.chart.layout.grandTotal.prefix)+" "+e.toDisplayString(x.value.toFixed(t.value.style.chart.layout.grandTotal.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.grandTotal.suffix),9,Pe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(o,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BFH7X8WG.cjs"),Y=require("./usePrinter-hyuaFHQj.cjs"),ce=require("./vue-ui-skeleton-Df1qBO2k.cjs"),ie=require("./BaseIcon-BkdELEYE.cjs"),de=require("./vue-ui-accordion-CvZhABQM.cjs"),H=require("./useNestedProp-B_z4-n52.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],he=["xmlns","viewBox"],pe={key:0},fe=["fill","font-weight","font-size","x","y"],me=["fill","font-weight","font-size","x","y"],ge=["id"],be=["stop-color"],ke=["stop-color"],xe=["id"],_e=["stop-color"],Be=["stop-color"],Ee=["id"],Se=["stop-color"],Ne=["stop-color"],ze=["stop-color"],Ce=["id"],we=["stop-color"],Ve=["stop-color"],$e=["stop-color"],Te=["id"],Fe=["stop-color"],De=["stop-color"],Le=["stop-color"],Me={key:1},Ie=["x","y","font-size","font-weight","fill"],Pe=["x","y","font-size","font-weight","fill"],Oe=["d","stroke"],Re=["cx","cy","r","fill"],Xe=["cx","cy","r","fill","stroke","stroke-width","onClick"],je={key:2},Ae=["x","y","font-size","fill","onClick"],Ge={key:0},Ue=["x","y","fill","font-size","font-weight"],qe=["x","y","height","width","fill","rx","onClick"],Ye=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],He={key:3},We=["x","y","fill","font-size","onClick"],Ke=["d","stroke"],Je=["cx","cy","fill","onClick"],Qe=["fill","cx","cy","r","onClick"],Ze={key:4},et=["x","y","font-size","font-weight","fill"],tt=["x1","x2","y1","y2","stroke","stroke-width"],lt=["y","height","width"],at={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},ot={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},nt={viewBox:"0 0 20 20",height:"16",width:"16"},rt=["fill"],st={key:6},ut=["y","height","width"],ct={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},it={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},dt={viewBox:"0 0 20 20",height:"16",width:"16"},yt=["fill"],vt=["d","stroke"],ht=["cx","cy","fill"],pt=["cx","cy","fill"],ft=["d","stroke"],mt=["cx","cy","fill"],gt=["cx","cy","fill"],bt=["x","y","fill","font-size","font-weight"],kt=["x","y","fill","font-size","font-weight"],xt=["x","text-anchor","y","fill","font-size"],_t=["x","text-anchor","y","fill","font-size"],Bt=["x","text-anchor","y","fill","font-size"],Et=["x","text-anchor","y","fill","font-size"],St=["x","text-anchor","y","fill","font-size"],Nt=["x","y","font-size","fill"],zt=["x","y","font-size","fill"],Ct=["x","y","font-size","fill"],wt={key:2,class:"vue-data-ui-watermark"},Vt={style:{"padding-top":"36px",position:"relative"}},$t={class:"vue-ui-data-table"},Tt={key:0},Ft=["data-cell"],Dt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Lt={key:0},Mt={key:1},It=["data-cell"],Pt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ot={key:0},Rt={key:1},Xt=["data-cell"],jt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},At={key:0},Gt={key:1},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=["data-cell"],il={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl=["data-cell"],hl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},pl=["data-cell"],fl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(W,{expose:K,emit:N}){const k=W;e.useCssVars(a=>({"3f25f622":a.tdo}));const{vue_ui_chestnut:J}=n.useConfig(),C=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(n.createUid()),D=e.ref(null),Q=e.ref(null),L=e.ref(0),t=e.computed(()=>{const a=H.useNestedProp({userConfig:k.config,defaultConfig:J});return a.theme?{...H.useNestedProp({userConfig:n.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}),{isPrinting:M,isImaging:I,generatePdf:P,generateImage:O}=Y.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),$=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),w=e.ref({showTable:t.value.table.show}),R=e.ref(null),X=e.ref(!1),Z=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})),x=e.computed(()=>C.value?k.dataset.flatMap(a=>a.branches.map(s=>s.value)).reduce((a,s)=>a+s):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{n.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,o)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${o}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{n.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{n.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${o} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=a.branches.map(o=>o.value).reduce((o,d)=>o+d);return{...a,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:a.branches.map((o,d)=>({...o,rootName:a.name,rootIndex:s,color:n.convertColorToHex(a.color)||$.value[s]||n.palette[s]||n.palette[s%n.palette.length],value:o.value>=0?o.value:0,id:o.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:o.value/l,type:"branch",breakdown:o.breakdown.map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/x.value,branchName:o.name,branchValue:o.value,branchToTotal:o.value/x.value,branchToRoot:o.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/x.value,nutToRoot:i.value/l,nutToBranch:i.value/o.value},...i,type:"nut",branchName:o.name,rootName:a.name,branchTotal:o.value>=0?o.value:0,proportionToBranch:i.value/o.value,proportionToRoot:i.value/l,proportionToTree:i.value/x.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:n.convertColorToHex(i.color)||$.value[y]||n.palette[y]||n.palette[y%n.palette.length],value:i.value>=0?i.value:0}))}))}})));function ee(){return m.value}const te=e.computed(()=>m.value.flatMap(a=>a.branches).length),le=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ae=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),j=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,o=a.total/le.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:o<r.value.branchSize/2?r.value.branchSize/2:o}})),oe=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),ne=e.computed(()=>B.value.flatMap(a=>a.branches)),_=e.computed(()=>ne.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:j.value,x2:384*a.value/ae.value*oe.value+j.value})));function T(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const c=e.ref(null),E=e.ref(null),v=e.ref(null),g=e.ref(null);function p(){c.value=null,v.value=null,g.value=null}function b(a){return g.value?g.value===null?!0:a.type==="root"?a.id===g.value.id:a.rootIndex===g.value.rootIndex:c.value===null&&v.value===null?!0:a.type==="nut"?c.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||c.value&&c.value.rootIndex===a.rootIndex:!1}function A(a){p(),e.nextTick(()=>{c.value=a,v.value=a,E.value=n.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),N("selectNut",a.breakdown)})}function S(){c.value=null,E.value=null,N("selectNut",null)}function F(a){v.value&&v.value.id===a.id?(v.value=null,p(),N("selectBranch",null)):(p(),v.value=a,N("selectBranch",a))}function G(a){g.value&&g.value.id===a.id?(p(),N("selectRoot",null)):(p(),g.value=a,N("selectRoot",a))}function re(){return f.value.bottom-(c.value.y1+180)<0?0:f.value.bottom}function z(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function se(){new ResizeObserver(s=>{s.forEach(l=>{X.value=l.contentRect.width<Z.value})}).observe(R.value)}e.onMounted(()=>{n.objectIsEmpty(k.dataset)&&n.error({componentName:"VueUiChestnut",type:"dataset"});const a=te.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,se()});const u=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,o)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,bl)=>y.table)));return{head:a,body:s}});function U(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",x.value],[""]],s=u.value.head,l=u.value.body.map((i,y)=>[u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootName,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootValue,u.value.body[y-1]&&u.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchName,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchValue,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,u.value.body[y-1]&&u.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),o=a.concat([s]).concat(l),d=n.createCsvContent(o);n.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function ue(a){V.value=a,L.value+=1}function q(){w.value.showTable=!w.value.showTable}return K({getData:ee,generatePdf:P,generateCsv:U,generateImage:O,toggleTable:q}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:D,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;padding-top:36px;background:${t.value.style.chart.backgroundColor}`)},[t.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:Q,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(I),isPrinting:e.unref(M),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:D.value,onToggleFullscreen:ue,onGeneratePdf:e.unref(P),onGenerateCsv:U,onGenerateImage:e.unref(O),onToggleTable:q},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:o})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value.height>0&&C.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.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(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",pe,[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,fe)):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,me)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,o)=>(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(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.roots.gradientIntensity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,ke)],8,ge))),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,_e),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(n.shiftHue)(l.color,.02)}${e.unref(n.opacity)[100-t.value.style.chart.layout.branches.gradientIntensity]}`},null,8,Be)],8,xe))),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":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,Se),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.selected.gradientIntensity]}`},null,8,Ne),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,ze)],8,Ee),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,we),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(n.opacity)[t.value.style.chart.layout.nuts.gradientIntensity]}`},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(n.opacity)[0]}`},null,8,$e)],8,Ce),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":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[100]}`},null,8,Fe),e.createElementVNode("stop",{offset:"80%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[60]}`},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":`${t.value.style.chart.backgroundColor}${e.unref(n.opacity)[0]}`},null,8,Le)],8,Te)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Me,[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,Ie),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(t.value.style.chart.layout.grandTotal.prefix)+" "+e.toDisplayString(x.value.toFixed(t.value.style.chart.layout.grandTotal.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.grandTotal.suffix),9,Pe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(o,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}