vue-data-ui 2.3.10 → 2.3.12

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 (140) hide show
  1. package/dist/{Arrow-f4c5AEIv.cjs → Arrow-CAMiXnML.cjs} +1 -1
  2. package/dist/{Arrow-BO8QA2_F.js → Arrow-D9RknCbe.js} +1 -1
  3. package/dist/{BaseIcon-BGeIE3vn.cjs → BaseIcon-5MAyZTOz.cjs} +1 -1
  4. package/dist/{BaseIcon-NaAlKaAM.js → BaseIcon-DB1g9sdS.js} +1 -1
  5. package/dist/{DataTable-R7hmQ0wl.js → DataTable-Bza1ed62.js} +2 -2
  6. package/dist/{DataTable-CXkMZ3ja.cjs → DataTable-CGX9xKvm.cjs} +1 -1
  7. package/dist/{Legend-VoYDt_v5.cjs → Legend-BEMGbN0s.cjs} +1 -1
  8. package/dist/{Legend-BKBuWgj8.js → Legend-C4cCpb4z.js} +1 -1
  9. package/dist/{Shape-DH2ovwu7.cjs → Shape-BTzik3V0.cjs} +1 -1
  10. package/dist/{Shape-CCI8C_dI.js → Shape-Bttb-v8s.js} +1 -1
  11. package/dist/{Slicer-CPQW_sm_.cjs → Slicer-CuwuufTu.cjs} +1 -1
  12. package/dist/{Slicer-C1zx1qMy.js → Slicer-WyjxXfiD.js} +1 -1
  13. package/dist/{Title-DJ269q6H.js → Title-BSpLzDC1.js} +1 -1
  14. package/dist/{Title-gCBF7AU7.cjs → Title-XRMcJkna.cjs} +1 -1
  15. package/dist/{Tooltip-Qv4VexrA.cjs → Tooltip-COgv-iii.cjs} +1 -1
  16. package/dist/{Tooltip-CKKSlbSq.js → Tooltip-DI8_Wjjy.js} +1 -1
  17. package/dist/{index-Xau3hcRk.cjs → index-BDKEFvEF.cjs} +1 -1
  18. package/dist/{index-BK818aZo.js → index-ByO3Ywek.js} +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/types/vue-data-ui.d.cts +3 -2
  21. package/dist/types/vue-data-ui.d.ts +3 -2
  22. package/dist/{useNestedProp-hi25rRoY.js → useNestedProp-Da77DnaA.js} +1 -1
  23. package/dist/{useNestedProp-C_EQ-Kxy.cjs → useNestedProp-Dikfncsl.cjs} +1 -1
  24. package/dist/{usePrinter-C-2KAW2f.js → usePrinter-Dda5FBG3.js} +1 -1
  25. package/dist/{usePrinter-Dhvmhwhf.cjs → usePrinter-DedM_6px.cjs} +1 -1
  26. package/dist/{vue-data-ui-ifINAh05.cjs → vue-data-ui-CV6BvTv3.cjs} +1 -1
  27. package/dist/{vue-data-ui-DPu_2hNJ.js → vue-data-ui-Cl7hqjOh.js} +55 -55
  28. package/dist/vue-data-ui.cjs +1 -1
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/{vue-ui-3d-bar-DPqaPUTZ.cjs → vue-ui-3d-bar-DMek7e52.cjs} +1 -1
  31. package/dist/{vue-ui-3d-bar-BaR6gHYb.js → vue-ui-3d-bar-DoFgj58m.js} +7 -7
  32. package/dist/{vue-ui-accordion-BjU8im6m.cjs → vue-ui-accordion-BytUYLYl.cjs} +1 -1
  33. package/dist/{vue-ui-accordion-CH8K6f6J.js → vue-ui-accordion-CbKHVPHh.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-CDotLSiv.js → vue-ui-age-pyramid-CZy4Y3uw.js} +8 -8
  35. package/dist/{vue-ui-age-pyramid-Dt9ILoAz.cjs → vue-ui-age-pyramid-DjlXDjMI.cjs} +1 -1
  36. package/dist/{vue-ui-annotator-C2bmdjLc.cjs → vue-ui-annotator-BJShyHMc.cjs} +1 -1
  37. package/dist/{vue-ui-annotator-CoH_aFJm.js → vue-ui-annotator-BqG8z2Ms.js} +1 -1
  38. package/dist/{vue-ui-candlestick-C5SjZVYs.cjs → vue-ui-candlestick-DJETMuli.cjs} +1 -1
  39. package/dist/{vue-ui-candlestick-G_90YTDo.js → vue-ui-candlestick-DkOQM3qu.js} +9 -9
  40. package/dist/{vue-ui-carousel-table-CptU7uki.cjs → vue-ui-carousel-table-BQipTTWP.cjs} +1 -1
  41. package/dist/{vue-ui-carousel-table-DzxLQOiB.js → vue-ui-carousel-table-C2vcNP0X.js} +4 -4
  42. package/dist/{vue-ui-chestnut-Cj5fJhR5.js → vue-ui-chestnut-D39qozSK.js} +6 -6
  43. package/dist/{vue-ui-chestnut-D8RaQMzo.cjs → vue-ui-chestnut-D3FtT3JK.cjs} +1 -1
  44. package/dist/{vue-ui-cursor-pZEn4NtN.cjs → vue-ui-cursor-CpJO5mEd.cjs} +1 -1
  45. package/dist/{vue-ui-cursor-G8ixOooh.js → vue-ui-cursor-LMFBAzPM.js} +2 -2
  46. package/dist/{vue-ui-dashboard-C46M9Oob.cjs → vue-ui-dashboard-BzOic-SZ.cjs} +1 -1
  47. package/dist/{vue-ui-dashboard-CaMDg3iT.js → vue-ui-dashboard-C-LaI61T.js} +2 -2
  48. package/dist/{vue-ui-digits-CXTC7Ypr.js → vue-ui-digits-BMoM0DwG.js} +2 -2
  49. package/dist/{vue-ui-digits-BnzhiKJT.cjs → vue-ui-digits-D2XilsJW.cjs} +1 -1
  50. package/dist/{vue-ui-donut-De--4Msd.cjs → vue-ui-donut-BYacXuN1.cjs} +1 -1
  51. package/dist/{vue-ui-donut-Caan2HEG.js → vue-ui-donut-DvESP2fh.js} +9 -9
  52. package/dist/{vue-ui-donut-evolution-CUV7vE4C.js → vue-ui-donut-evolution-Dr1MkSB2.js} +9 -9
  53. package/dist/{vue-ui-donut-evolution-DwPXJh13.cjs → vue-ui-donut-evolution-DwhuTpBB.cjs} +1 -1
  54. package/dist/{vue-ui-dumbbell-BzqRvxE9.cjs → vue-ui-dumbbell-CzYf1Etr.cjs} +1 -1
  55. package/dist/{vue-ui-dumbbell-2D7NAlDu.js → vue-ui-dumbbell-kTZ4cbhw.js} +8 -8
  56. package/dist/{vue-ui-flow-CSlnKCEh.cjs → vue-ui-flow-BJbCaSJI.cjs} +1 -1
  57. package/dist/{vue-ui-flow-DsqenwU_.js → vue-ui-flow-BkSTX5_A.js} +7 -7
  58. package/dist/{vue-ui-galaxy-WwvhRAFa.cjs → vue-ui-galaxy-Bb-A8wCU.cjs} +1 -1
  59. package/dist/{vue-ui-galaxy-CLXeRR9E.js → vue-ui-galaxy-DiKAWRBN.js} +9 -9
  60. package/dist/{vue-ui-gauge-zoUBHBL2.js → vue-ui-gauge-Dt6Cuuo0.js} +4 -4
  61. package/dist/{vue-ui-gauge-B_5_uMiG.cjs → vue-ui-gauge-DvYBrZs4.cjs} +1 -1
  62. package/dist/{vue-ui-heatmap-D-oq-QFJ.js → vue-ui-heatmap-B9B0h5N8.js} +8 -8
  63. package/dist/{vue-ui-heatmap-Gv6Y0025.cjs → vue-ui-heatmap-KHa42VW8.cjs} +1 -1
  64. package/dist/{vue-ui-kpi-Bgxu139K.cjs → vue-ui-kpi-BfqVRF0H.cjs} +1 -1
  65. package/dist/{vue-ui-kpi-CE3UnfLM.js → vue-ui-kpi-Bts4qzfH.js} +2 -2
  66. package/dist/{vue-ui-mini-loader-Fap6KDDb.js → vue-ui-mini-loader-CZtaTr-s.js} +2 -2
  67. package/dist/{vue-ui-mini-loader-KFiTgq0Z.cjs → vue-ui-mini-loader-DdlM_ms1.cjs} +1 -1
  68. package/dist/{vue-ui-molecule-CaKXLDG3.cjs → vue-ui-molecule-Cey5Cuqp.cjs} +1 -1
  69. package/dist/{vue-ui-molecule-QMshD0fQ.js → vue-ui-molecule-Y29DXzD8.js} +9 -9
  70. package/dist/{vue-ui-mood-radar-BFKJ6-wI.cjs → vue-ui-mood-radar-BGQYx51N.cjs} +1 -1
  71. package/dist/{vue-ui-mood-radar-woI18vdU.js → vue-ui-mood-radar-CaXsxM2P.js} +9 -9
  72. package/dist/{vue-ui-nested-donuts-BH8pGgVI.js → vue-ui-nested-donuts-8aIjfQHr.js} +9 -9
  73. package/dist/{vue-ui-nested-donuts-Nb5Jg_SG.cjs → vue-ui-nested-donuts-B0OSKK4x.cjs} +1 -1
  74. package/dist/{vue-ui-onion-bofmS_kO.js → vue-ui-onion-BuM5DcbA.js} +9 -9
  75. package/dist/{vue-ui-onion-BBYwZtjh.cjs → vue-ui-onion-D8Ug2z_r.cjs} +1 -1
  76. package/dist/{vue-ui-parallel-coordinate-plot-DVW0LYp7.js → vue-ui-parallel-coordinate-plot-BnylgPQ1.js} +10 -10
  77. package/dist/{vue-ui-parallel-coordinate-plot-C-ZbQgN7.cjs → vue-ui-parallel-coordinate-plot-RAjWALxs.cjs} +1 -1
  78. package/dist/{vue-ui-quadrant-DFMVk5eC.cjs → vue-ui-quadrant-Bd9XzzOJ.cjs} +1 -1
  79. package/dist/{vue-ui-quadrant-fhx9NkrR.js → vue-ui-quadrant-DpUSb39t.js} +10 -10
  80. package/dist/{vue-ui-quick-chart-S6LEQLn7.cjs → vue-ui-quick-chart-7dYq_RGE.cjs} +1 -1
  81. package/dist/{vue-ui-quick-chart-5rggkq9-.js → vue-ui-quick-chart-CMkvhuhW.js} +6 -6
  82. package/dist/{vue-ui-radar-B8RvpBi-.js → vue-ui-radar-BlHTPxa4.js} +10 -10
  83. package/dist/{vue-ui-radar-CsR9V_Sl.cjs → vue-ui-radar-DVFyhzLg.cjs} +1 -1
  84. package/dist/{vue-ui-rating-CgzLPjlb.cjs → vue-ui-rating-DRncGN96.cjs} +1 -1
  85. package/dist/{vue-ui-rating-ClQkygLG.js → vue-ui-rating-cVAVmnzB.js} +2 -2
  86. package/dist/{vue-ui-relation-circle-B2hJDB7v.js → vue-ui-relation-circle-B8iBDo0q.js} +5 -5
  87. package/dist/{vue-ui-relation-circle-D0zllKLp.cjs → vue-ui-relation-circle-C8QjpkXl.cjs} +1 -1
  88. package/dist/{vue-ui-rings-D3nNsoiU.js → vue-ui-rings-CQq3JQNk.js} +9 -9
  89. package/dist/{vue-ui-rings-CLIeS7BN.cjs → vue-ui-rings-m4MWlNsq.cjs} +1 -1
  90. package/dist/{vue-ui-scatter-DitnL-sZ.js → vue-ui-scatter-C-Egs7S_.js} +10 -10
  91. package/dist/{vue-ui-scatter-bPAA5OYI.cjs → vue-ui-scatter-mNEnBtaf.cjs} +1 -1
  92. package/dist/{vue-ui-screenshot-C-uHRqZ7.cjs → vue-ui-screenshot-Bl9jX-C2.cjs} +1 -1
  93. package/dist/{vue-ui-screenshot-DayBW_7b.js → vue-ui-screenshot-DfHSBG7u.js} +1 -1
  94. package/dist/{vue-ui-skeleton-DJtTdfNg.js → vue-ui-skeleton-BxRSQeuo.js} +2 -2
  95. package/dist/{vue-ui-skeleton-CgYrDrh-.cjs → vue-ui-skeleton-rY_nZhMQ.cjs} +1 -1
  96. package/dist/{vue-ui-smiley-CvpPFDBL.cjs → vue-ui-smiley-BWTx88Vc.cjs} +1 -1
  97. package/dist/{vue-ui-smiley-CZTyxQvT.js → vue-ui-smiley-J5ng6jFT.js} +2 -2
  98. package/dist/{vue-ui-spark-trend-DZm9J_ZI.cjs → vue-ui-spark-trend-CKllSCO9.cjs} +1 -1
  99. package/dist/{vue-ui-spark-trend--aNEsQNW.js → vue-ui-spark-trend-CSgSKyhQ.js} +4 -4
  100. package/dist/{vue-ui-sparkbar-uvq7AcMr.js → vue-ui-sparkbar-BDSuCvBs.js} +54 -47
  101. package/dist/{vue-ui-sparkbar-C43IyepC.cjs → vue-ui-sparkbar-wLasc_jU.cjs} +1 -1
  102. package/dist/{vue-ui-sparkgauge-BP11yMVn.cjs → vue-ui-sparkgauge-DLf9qwso.cjs} +1 -1
  103. package/dist/{vue-ui-sparkgauge-V1zC6qrt.js → vue-ui-sparkgauge-DsKCi2rC.js} +3 -3
  104. package/dist/vue-ui-sparkhistogram-BY9WjI96.js +261 -0
  105. package/dist/vue-ui-sparkhistogram-D3xFCR7z.cjs +1 -0
  106. package/dist/{vue-ui-sparkline-C3C9heBc.cjs → vue-ui-sparkline-BhB4gTda.cjs} +1 -1
  107. package/dist/{vue-ui-sparkline-DOAhQCt5.js → vue-ui-sparkline-D8gMceMV.js} +3 -3
  108. package/dist/{vue-ui-sparkstackbar-ObA64D3E.js → vue-ui-sparkstackbar-8ap_HMW0.js} +3 -3
  109. package/dist/{vue-ui-sparkstackbar-Bk7nIBnD.cjs → vue-ui-sparkstackbar-dINlqLlM.cjs} +1 -1
  110. package/dist/{vue-ui-strip-plot-6eenEjje.js → vue-ui-strip-plot-Duu9jsML.js} +9 -9
  111. package/dist/{vue-ui-strip-plot-CffrlZCk.cjs → vue-ui-strip-plot-wUXpoWOD.cjs} +1 -1
  112. package/dist/{vue-ui-table-BbMFv-oU.js → vue-ui-table-Bbjo6d7J.js} +1 -1
  113. package/dist/{vue-ui-table-CzAWebM5.cjs → vue-ui-table-DPBuQHl9.cjs} +1 -1
  114. package/dist/{vue-ui-table-heatmap-CR4Z6gFJ.cjs → vue-ui-table-heatmap-BWUGw4tD.cjs} +1 -1
  115. package/dist/{vue-ui-table-heatmap-B9YVKhvr.js → vue-ui-table-heatmap-CokrixjX.js} +4 -4
  116. package/dist/{vue-ui-table-sparkline-D7b-hkZg.js → vue-ui-table-sparkline-B4f74K6D.js} +5 -5
  117. package/dist/{vue-ui-table-sparkline-BZdfmaoe.cjs → vue-ui-table-sparkline-DwStFsdv.cjs} +1 -1
  118. package/dist/{vue-ui-thermometer-CfGfCzz9.js → vue-ui-thermometer-Bvw08auw.js} +5 -5
  119. package/dist/{vue-ui-thermometer-DJw8iKSK.cjs → vue-ui-thermometer-D4lvsaZQ.cjs} +1 -1
  120. package/dist/{vue-ui-timer-DjSR1opQ.cjs → vue-ui-timer-BSU22BD2.cjs} +1 -1
  121. package/dist/{vue-ui-timer-PdZYURw6.js → vue-ui-timer-C6zSHO_W.js} +4 -4
  122. package/dist/{vue-ui-tiremarks-9o6eS1Mc.js → vue-ui-tiremarks-BY4m2mEn.js} +5 -5
  123. package/dist/{vue-ui-tiremarks-DmQpv3n0.cjs → vue-ui-tiremarks-CH0_xCoD.cjs} +1 -1
  124. package/dist/{vue-ui-treemap-BQlEP4Wi.cjs → vue-ui-treemap-DIxqUkmn.cjs} +1 -1
  125. package/dist/{vue-ui-treemap-hdJRrv6w.js → vue-ui-treemap-DWBXR_CR.js} +9 -9
  126. package/dist/{vue-ui-vertical-bar-BRhV9I7i.js → vue-ui-vertical-bar-BxvhqgWg.js} +9 -9
  127. package/dist/{vue-ui-vertical-bar-CXn4FfOg.cjs → vue-ui-vertical-bar-DnPmmj4p.cjs} +1 -1
  128. package/dist/{vue-ui-waffle-CXyoderQ.js → vue-ui-waffle-BlFjCDDx.js} +9 -9
  129. package/dist/{vue-ui-waffle-CjAIw38i.cjs → vue-ui-waffle-CYpc5Enk.cjs} +1 -1
  130. package/dist/{vue-ui-wheel-BU_90Fhv.js → vue-ui-wheel-CHvx9zQF.js} +5 -5
  131. package/dist/{vue-ui-wheel-DLj-V4jn.cjs → vue-ui-wheel-WxC0_YV_.cjs} +1 -1
  132. package/dist/{vue-ui-word-cloud-DQ72J4Ro.js → vue-ui-word-cloud-BnLAMza-.js} +6 -6
  133. package/dist/{vue-ui-word-cloud-CtBamLvE.cjs → vue-ui-word-cloud-LMl5vudk.cjs} +1 -1
  134. package/dist/{vue-ui-xy-Bz15K-CC.cjs → vue-ui-xy-DHzwqXVf.cjs} +1 -1
  135. package/dist/{vue-ui-xy-DYEsmppC.js → vue-ui-xy-DStN5sP4.js} +12 -12
  136. package/dist/{vue-ui-xy-canvas-BRWp_v0p.js → vue-ui-xy-canvas-D3zCvIfh.js} +10 -10
  137. package/dist/{vue-ui-xy-canvas-DLN-ipCw.cjs → vue-ui-xy-canvas-DTjWEsfN.cjs} +1 -1
  138. package/package.json +1 -1
  139. package/dist/vue-ui-sparkhistogram-BIUsoRQJ.js +0 -244
  140. package/dist/vue-ui-sparkhistogram-Dipd391E.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Xau3hcRk.cjs"),ue=require("./Title-gCBF7AU7.cjs"),U=require("./usePrinter-Dhvmhwhf.cjs"),ie=require("./DataTable-CXkMZ3ja.cjs"),ce=require("./vue-ui-accordion-BjU8im6m.cjs"),de=require("./vue-ui-skeleton-CgYrDrh-.cjs"),j=require("./useNestedProp-C_EQ-Kxy.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],he=["xmlns","viewBox"],me=["id"],ge=["stop-color"],pe=["stop-color"],ye=["d","fill","stroke","stroke-width"],be=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ke=["x","y","font-size","fill"],we=["x","y","font-size","fill"],Ce=["innerHTML"],xe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(A,{expose:W}){const f=A,{vue_ui_flow:X}=i.useConfig(),$=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{i.objectIsEmpty(f.dataset)&&i.error({componentName:"VueUiFlow",type:"dataset"})});const B=e.ref(i.createUid()),T=e.ref(null),P=e.ref(0),b=e.ref(!1);function R(n){b.value=n,P.value+=1}const t=e.computed(()=>{const n=j.useNestedProp({userConfig:f.config,defaultConfig:X});return n.theme?{...j.useNestedProp({userConfig:i.themes.vue_ui_flow[n.theme]||f.config,defaultConfig:n}),customPalette:i.themePalettes[n.theme]||i.palette}:n}),{isPrinting:Z,isImaging:J,generatePdf:F,generateImage:L}=U.usePrinter({elementId:`flow_${B.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),N=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),z=e.computed(()=>t.value.style.chart.nodes.gap),p=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show}),I=e.computed(()=>t.value.style.chart.links.width),H=e.computed(()=>{const n={};function o(r){n[r]||(n[r]={inflow:0,outflow:0})}f.dataset.forEach(([r,a,c])=>{o(r),o(a),n[r].outflow+=c,n[a].inflow+=c});let l=0;for(const r in n){const a=Math.max(n[r].inflow,n[r].outflow);l=Math.max(l,a)}return l});function K(n){return n/H.value*100+t.value.style.chart.nodes.minHeight}function Q(n){const o=t.value.style.chart.nodes.minHeight;return(n-o)/100*H.value}function ee(n){const o={},l={};function r(s,u){o[s]||(o[s]={height:0,level:null,inflow:0,outflow:0}),o[s].level===null&&(o[s].level=u),l[u]||(l[u]=[]),l[u].includes(s)||l[u].push(s)}n.forEach(([s,u,v],y)=>{const g=o[s]?o[s].level:0,x=g+1;r(s,g),r(u,x),o[s].children||(o[s].children=[]),o[s].children.push({target:u,value:v}),o[s].outflow+=v,o[u].inflow+=v}),Object.keys(o).forEach((s,u)=>{o[s].color=N.value[u]||N.value[u%N.value.length]||i.palette[u]||i.palette[u%d.length]});for(const s in o)o[s].height=K(Math.max(o[s].inflow,o[s].outflow)),o[s].name=s;const a={};for(const s in l){let u=0;l[s].forEach((v,y)=>{const g=o[v].height;a[v]={x:parseInt(s,10)*I.value+t.value.style.chart.padding.left,y:u,absoluteY:u,height:g,i:y,color:o[v].color,value:Q(g)},u+=g+z.value})}const c=[];for(const s in o){let u=a[s].absoluteY;o[s].children&&o[s].children.forEach(({target:v,value:y},g)=>{const x=a[v].y,E=a[s],S=a[v],Y=u,D=u+y/o[s].outflow*E.height,q=x,G=x+y/o[v].inflow*S.height,re={id:i.createUid(),source:s,target:v,path:`M ${E.x+p.value} ${Y} L ${E.x+p.value} ${D} L ${S.x} ${G} L ${S.x} ${q} Z`,value:y,sourceColor:o[s].color,targetColor:o[v].color};c.push(re),u+=D-Y,a[v].y+=G-q})}return{nodeCoordinates:a,links:c}}const h=e.computed(()=>{const n=ee(f.dataset);return{nodes:Object.keys(n.nodeCoordinates).map((o,l)=>({...n.nodeCoordinates[o],name:o})),links:n.links}}),te=e.computed(()=>le(h.value.nodes));function le(n){const o={};for(const r in n){const{x:a,height:c}=n[r];o[a]||(o[a]=0),o[a]+=c+z.value}return Math.max(...Object.values(o))}const _=e.computed(()=>{const{top:n,right:o,left:l,bottom:r}=t.value.style.chart.padding,a=f.dataset.length*I.value;return{height:te.value+n+r,width:o+Math.max(...h.value.nodes.map(c=>c.x))+p.value,left:l,top:n,right:a-o,p_top:n,p_bottom:r}});function oe(n){const o={},l={},r=new Set;return f.dataset.forEach(([a,c,s])=>{o[a]||(o[a]=[]),l[c]||(l[c]=[]),o[a].push(c),l[c].push(a)}),o[n]&&o[n].forEach(a=>r.add(a)),l[n]&&l[n].forEach(a=>r.add(a)),Array.from(r).concat(n)}const m=e.ref(null),w=e.ref(null);function ne(n){m.value=oe(n.name),w.value=n.name}function ae(){m.value=null,w.value=null}const O=e.computed(()=>h.value.links.map(({source:n,target:o,sourceColor:l,targetColor:r,value:a})=>({source:n,target:o,sourceColor:l,targetColor:r,value:a})));function M(){e.nextTick(()=>{const n=O.value.map((r,a)=>[[r.source],[r.target],[r.value]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(n),l=i.createCsvContent(o);i.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const n=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],o=O.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},i.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:n,body:o,config:l}});function se(){return h.value}function V(){k.value.showTable=!k.value.showTable}return W({getData:se,generateCsv:M,generateImage:L,generatePdf:F,toggleTable:V}),(n,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:T,class:e.normalizeClass(`vue-ui-flow ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${B.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ue._sfc_main,{config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(J),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,onToggleFullscreen:R,onGeneratePdf:e.unref(F),onGenerateCsv:M,onGenerateImage:e.unref(L),onToggleTable:V},e.createSlots({_:2},[n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,n.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(i.XMLNS),viewBox:`0 0 ${_.value.width} ${_.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,pe)],8,me))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[l.target,l.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,ye))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:l.absoluteY,height:l.height,width:p.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ne(l),onMouseleave:o[0]||(o[0]=a=>ae()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.2:1}`)},null,44,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+p.value/2,y:l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(i.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+p.value/2,y:l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})),13,we))),256)),e.renderSlot(n.$slots,"svg",{svg:_.value},void 0,!0)],14,he)),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:2,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),$.value?(e.openBlock(),e.createBlock(ce.default,{key:3,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ie.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[1]||(o[1]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ce)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},$e=ve._export_sfc(xe,[["__scopeId","data-v-f8a1c2bf"]]);exports.default=$e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BDKEFvEF.cjs"),ue=require("./Title-XRMcJkna.cjs"),U=require("./usePrinter-DedM_6px.cjs"),ie=require("./DataTable-CGX9xKvm.cjs"),ce=require("./vue-ui-accordion-BytUYLYl.cjs"),de=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),j=require("./useNestedProp-Dikfncsl.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],he=["xmlns","viewBox"],me=["id"],ge=["stop-color"],pe=["stop-color"],ye=["d","fill","stroke","stroke-width"],be=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ke=["x","y","font-size","fill"],we=["x","y","font-size","fill"],Ce=["innerHTML"],xe={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(A,{expose:W}){const f=A,{vue_ui_flow:X}=i.useConfig(),$=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{i.objectIsEmpty(f.dataset)&&i.error({componentName:"VueUiFlow",type:"dataset"})});const B=e.ref(i.createUid()),T=e.ref(null),P=e.ref(0),b=e.ref(!1);function R(n){b.value=n,P.value+=1}const t=e.computed(()=>{const n=j.useNestedProp({userConfig:f.config,defaultConfig:X});return n.theme?{...j.useNestedProp({userConfig:i.themes.vue_ui_flow[n.theme]||f.config,defaultConfig:n}),customPalette:i.themePalettes[n.theme]||i.palette}:n}),{isPrinting:Z,isImaging:J,generatePdf:F,generateImage:L}=U.usePrinter({elementId:`flow_${B.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),N=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),z=e.computed(()=>t.value.style.chart.nodes.gap),p=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show}),I=e.computed(()=>t.value.style.chart.links.width),H=e.computed(()=>{const n={};function o(r){n[r]||(n[r]={inflow:0,outflow:0})}f.dataset.forEach(([r,a,c])=>{o(r),o(a),n[r].outflow+=c,n[a].inflow+=c});let l=0;for(const r in n){const a=Math.max(n[r].inflow,n[r].outflow);l=Math.max(l,a)}return l});function K(n){return n/H.value*100+t.value.style.chart.nodes.minHeight}function Q(n){const o=t.value.style.chart.nodes.minHeight;return(n-o)/100*H.value}function ee(n){const o={},l={};function r(s,u){o[s]||(o[s]={height:0,level:null,inflow:0,outflow:0}),o[s].level===null&&(o[s].level=u),l[u]||(l[u]=[]),l[u].includes(s)||l[u].push(s)}n.forEach(([s,u,v],y)=>{const g=o[s]?o[s].level:0,x=g+1;r(s,g),r(u,x),o[s].children||(o[s].children=[]),o[s].children.push({target:u,value:v}),o[s].outflow+=v,o[u].inflow+=v}),Object.keys(o).forEach((s,u)=>{o[s].color=N.value[u]||N.value[u%N.value.length]||i.palette[u]||i.palette[u%d.length]});for(const s in o)o[s].height=K(Math.max(o[s].inflow,o[s].outflow)),o[s].name=s;const a={};for(const s in l){let u=0;l[s].forEach((v,y)=>{const g=o[v].height;a[v]={x:parseInt(s,10)*I.value+t.value.style.chart.padding.left,y:u,absoluteY:u,height:g,i:y,color:o[v].color,value:Q(g)},u+=g+z.value})}const c=[];for(const s in o){let u=a[s].absoluteY;o[s].children&&o[s].children.forEach(({target:v,value:y},g)=>{const x=a[v].y,E=a[s],S=a[v],Y=u,D=u+y/o[s].outflow*E.height,q=x,G=x+y/o[v].inflow*S.height,re={id:i.createUid(),source:s,target:v,path:`M ${E.x+p.value} ${Y} L ${E.x+p.value} ${D} L ${S.x} ${G} L ${S.x} ${q} Z`,value:y,sourceColor:o[s].color,targetColor:o[v].color};c.push(re),u+=D-Y,a[v].y+=G-q})}return{nodeCoordinates:a,links:c}}const h=e.computed(()=>{const n=ee(f.dataset);return{nodes:Object.keys(n.nodeCoordinates).map((o,l)=>({...n.nodeCoordinates[o],name:o})),links:n.links}}),te=e.computed(()=>le(h.value.nodes));function le(n){const o={};for(const r in n){const{x:a,height:c}=n[r];o[a]||(o[a]=0),o[a]+=c+z.value}return Math.max(...Object.values(o))}const _=e.computed(()=>{const{top:n,right:o,left:l,bottom:r}=t.value.style.chart.padding,a=f.dataset.length*I.value;return{height:te.value+n+r,width:o+Math.max(...h.value.nodes.map(c=>c.x))+p.value,left:l,top:n,right:a-o,p_top:n,p_bottom:r}});function oe(n){const o={},l={},r=new Set;return f.dataset.forEach(([a,c,s])=>{o[a]||(o[a]=[]),l[c]||(l[c]=[]),o[a].push(c),l[c].push(a)}),o[n]&&o[n].forEach(a=>r.add(a)),l[n]&&l[n].forEach(a=>r.add(a)),Array.from(r).concat(n)}const m=e.ref(null),w=e.ref(null);function ne(n){m.value=oe(n.name),w.value=n.name}function ae(){m.value=null,w.value=null}const O=e.computed(()=>h.value.links.map(({source:n,target:o,sourceColor:l,targetColor:r,value:a})=>({source:n,target:o,sourceColor:l,targetColor:r,value:a})));function M(){e.nextTick(()=>{const n=O.value.map((r,a)=>[[r.source],[r.target],[r.value]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(n),l=i.createCsvContent(o);i.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const n=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],o=O.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},i.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:n,body:o,config:l}});function se(){return h.value}function V(){k.value.showTable=!k.value.showTable}return W({getData:se,generateCsv:M,generateImage:L,generatePdf:F,toggleTable:V}),(n,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:T,class:e.normalizeClass(`vue-ui-flow ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${B.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ue._sfc_main,{config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Z),isImaging:e.unref(J),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,onToggleFullscreen:R,onGeneratePdf:e.unref(F),onGenerateCsv:M,onGenerateImage:e.unref(L),onToggleTable:V},e.createSlots({_:2},[n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,n.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(i.XMLNS),viewBox:`0 0 ${_.value.width} ${_.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,pe)],8,me))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[l.target,l.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,ye))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:l.absoluteY,height:l.height,width:p.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ne(l),onMouseleave:o[0]||(o[0]=a=>ae()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.2:1}`)},null,44,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+p.value/2,y:l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(i.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+p.value/2,y:l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})),13,we))),256)),e.renderSlot(n.$slots,"svg",{svg:_.value},void 0,!0)],14,he)),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:2,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),$.value?(e.openBlock(),e.createBlock(ce.default,{key:3,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ie.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[1]||(o[1]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ce)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},$e=ve._export_sfc(xe,[["__scopeId","data-v-f8a1c2bf"]]);exports.default=$e;
@@ -1,11 +1,11 @@
1
1
  import { computed as f, onMounted as _e, ref as k, openBlock as r, createElementBlock as v, normalizeClass as oe, normalizeStyle as w, createVNode as ae, createCommentVNode as L, createBlock as G, unref as g, createSlots as Ne, withCtx as b, renderSlot as $, normalizeProps as Te, guardReactiveProps as Pe, createElementVNode as E, Fragment as N, renderList as T, toDisplayString as B, createTextVNode as Fe, nextTick as Ie } from "vue";
2
- import { u as He, o as Le, e as Ee, c as ne, t as Oe, a as Me, p as A, b as Se, f as se, X as ze, C as ue, E as Ye, n as De, q as Ge } from "./index-BK818aZo.js";
3
- import { _ as Be } from "./Title-DJ269q6H.js";
4
- import { u as Ae, U as Ue } from "./usePrinter-C-2KAW2f.js";
5
- import { D as Ve } from "./DataTable-R7hmQ0wl.js";
6
- import je from "./vue-ui-accordion-CH8K6f6J.js";
7
- import Xe from "./vue-ui-skeleton-DJtTdfNg.js";
8
- import { u as re } from "./useNestedProp-hi25rRoY.js";
2
+ import { u as He, o as Le, e as Ee, c as ne, t as Oe, a as Me, p as A, b as Se, f as se, X as ze, C as ue, E as Ye, n as De, q as Ge } from "./index-ByO3Ywek.js";
3
+ import { _ as Be } from "./Title-BSpLzDC1.js";
4
+ import { u as Ae, U as Ue } from "./usePrinter-Dda5FBG3.js";
5
+ import { D as Ve } from "./DataTable-Bza1ed62.js";
6
+ import je from "./vue-ui-accordion-CbKHVPHh.js";
7
+ import Xe from "./vue-ui-skeleton-BxRSQeuo.js";
8
+ import { u as re } from "./useNestedProp-Da77DnaA.js";
9
9
  import { _ as We } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"], Ke = ["stop-color"], Qe = ["d", "fill", "stroke", "stroke-width"], et = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], tt = ["x", "y", "font-size", "fill"], lt = ["x", "y", "font-size", "fill"], ot = ["innerHTML"], at = {
11
11
  __name: "vue-ui-flow",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Xau3hcRk.cjs"),K=require("./Legend-VoYDt_v5.cjs"),Q=require("./Title-gCBF7AU7.cjs"),Z=require("./Tooltip-Qv4VexrA.cjs"),ee=require("./DataTable-CXkMZ3ja.cjs"),O=require("./usePrinter-Dhvmhwhf.cjs"),te=require("./vue-ui-skeleton-CgYrDrh-.cjs"),le=require("./vue-ui-accordion-BjU8im6m.cjs"),z=require("./useNestedProp-C_EQ-Kxy.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],ne=["id"],ue=["stdDeviation"],se=["d","stroke","stroke-width"],ie=["d","stroke","stroke-width"],ce=["filter"],de=["d","stroke","stroke-width"],ve=["d","stroke-width","onMouseenter","onClick"],he=["onClick"],pe={key:0},ge={key:1},ye=["innerHTML"],fe={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(D,{expose:q,emit:B}){const d=D,{vue_ui_galaxy:G}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):d.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})});const y=e.ref(r.createUid()),C=e.ref(null),M=e.ref(null),x=e.ref(!1),w=e.ref(""),i=e.ref(null),S=e.ref(0),t=e.computed(()=>{const l=z.useNestedProp({userConfig:d.config,defaultConfig:G});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:W,isImaging:U,generatePdf:_,generateImage:P}=O.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),A=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),s=e.ref([]);function T(l){s.value.includes(l.id)?s.value=s.value.filter(a=>a!==l.id):s.value.push(l.id),B("selectLegend",f.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>d.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||A.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?l.values.reduce((o,n)=>o+n,0):0,absoluteValues:l.values||[0],id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function H(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const c=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),R=e.ref(190),E=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id))),f=e.computed(()=>{const l=[];for(let a=0;a<E.value.length;a+=1){const o=E.value[a];let n=o.value/c.value*R.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/c.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!s.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function X(l){m.value=l,S.value+=1}const N=e.ref(null);function j({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},x.value=n,i.value=l.id;let u="";const g=t.value.style.chart.tooltip.customFormat;r.isFunction(g)&&r.functionReturnsString(()=>g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?w.value=g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),w.value=`<div>${u}</div>`)}const V=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/d.dataset.map(o=>(o.values||[]).reduce((n,u)=>n+u,0)).reduce((o,n)=>o+n,0),opacity:s.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:s.value.includes(l.id)}))),Y=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=f.value.map(o=>({name:o.name,color:o.color})),a=f.value.map(o=>o.value);return{head:l,body:a}});function F(){e.nextTick(()=>{const l=h.value.head.map((n,u)=>[[n.name],[h.value.body[u]],[isNaN(h.value.body[u]/c.value)?"-":h.value.body[u]/c.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:c.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((u,g)=>{const J=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[g],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},J,isNaN(h.value.body[g]/c.value)?"-":(h.value.body[g]/c.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function L(){v.value.showTable=!v.value.showTable}function I(){v.value.showTooltip=!v.value.showTooltip}return q({getData:H,generatePdf:_,generateCsv:F,generateImage:P,toggleTable:L,toggleTooltip:I}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Q._sfc_main,{config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(O.UserOptions,{ref_key:"details",ref:M,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(W),isImaging:e.unref(U),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:X,onGeneratePdf:e.unref(_),onGenerateCsv:F,onGenerateImage:e.unref(P),onToggleTable:L,onToggleTooltip:I},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,ue)],8,ne)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,se)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ie)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,de)],8,ce)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:u=>j({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,i.value=null}),onClick:u=>B("selectDatapoint",o)},null,40,ve)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:3,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(K.Legend,{key:4,legendSet:V.value,config:Y.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>T(o),style:e.normalizeStyle(`opacity:${s.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),s.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",ge," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",pe," ("+e.toDisplayString(isNaN(o.value/c.value)?"-":(o.value/c.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,he)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:V.value},void 0,!0),e.createVNode(Z._sfc_main,{show:v.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:C.value,content:w.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(le.default,{key:5,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ee.DataTable,{colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ye)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ae))}},me=oe._export_sfc(fe,[["__scopeId","data-v-53c416de"]]);exports.default=me;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BDKEFvEF.cjs"),K=require("./Legend-BEMGbN0s.cjs"),Q=require("./Title-XRMcJkna.cjs"),Z=require("./Tooltip-COgv-iii.cjs"),ee=require("./DataTable-CGX9xKvm.cjs"),O=require("./usePrinter-DedM_6px.cjs"),te=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),le=require("./vue-ui-accordion-BytUYLYl.cjs"),z=require("./useNestedProp-Dikfncsl.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],ne=["id"],ue=["stdDeviation"],se=["d","stroke","stroke-width"],ie=["d","stroke","stroke-width"],ce=["filter"],de=["d","stroke","stroke-width"],ve=["d","stroke-width","onMouseenter","onClick"],he=["onClick"],pe={key:0},ge={key:1},ye=["innerHTML"],fe={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(D,{expose:q,emit:B}){const d=D,{vue_ui_galaxy:G}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):d.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})});const y=e.ref(r.createUid()),C=e.ref(null),M=e.ref(null),x=e.ref(!1),w=e.ref(""),i=e.ref(null),S=e.ref(0),t=e.computed(()=>{const l=z.useNestedProp({userConfig:d.config,defaultConfig:G});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:W,isImaging:U,generatePdf:_,generateImage:P}=O.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),A=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),s=e.ref([]);function T(l){s.value.includes(l.id)?s.value=s.value.filter(a=>a!==l.id):s.value.push(l.id),B("selectLegend",f.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>d.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||A.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?l.values.reduce((o,n)=>o+n,0):0,absoluteValues:l.values||[0],id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function H(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const c=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),R=e.ref(190),E=e.computed(()=>p.value.filter(l=>!s.value.includes(l.id))),f=e.computed(()=>{const l=[];for(let a=0;a<E.value.length;a+=1){const o=E.value[a];let n=o.value/c.value*R.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/c.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!s.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function X(l){m.value=l,S.value+=1}const N=e.ref(null);function j({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){N.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},x.value=n,i.value=l.id;let u="";const g=t.value.style.chart.tooltip.customFormat;r.isFunction(g)&&r.functionReturnsString(()=>g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?w.value=g({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(l.proportion*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),w.value=`<div>${u}</div>`)}const V=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/d.dataset.map(o=>(o.values||[]).reduce((n,u)=>n+u,0)).reduce((o,n)=>o+n,0),opacity:s.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>T(l),isSegregated:s.value.includes(l.id)}))),Y=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=f.value.map(o=>({name:o.name,color:o.color})),a=f.value.map(o=>o.value);return{head:l,body:a}});function F(){e.nextTick(()=>{const l=h.value.head.map((n,u)=>[[n.name],[h.value.body[u]],[isNaN(h.value.body[u]/c.value)?"-":h.value.body[u]/c.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:c.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((u,g)=>{const J=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[g],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},J,isNaN(h.value.body[g]/c.value)?"-":(h.value.body[g]/c.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function L(){v.value.showTable=!v.value.showTable}function I(){v.value.showTooltip=!v.value.showTooltip}return q({getData:H,generatePdf:_,generateCsv:F,generateImage:P,toggleTable:L,toggleTooltip:I}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Q._sfc_main,{config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(O.UserOptions,{ref_key:"details",ref:M,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(W),isImaging:e.unref(U),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:X,onGeneratePdf:e.unref(_),onGenerateCsv:F,onGenerateImage:e.unref(P),onToggleTable:L,onToggleTooltip:I},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,ue)],8,ne)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,se)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ie)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,de)],8,ce)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:u=>j({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=u=>{x.value=!1,i.value=null}),onClick:u=>B("selectDatapoint",o)},null,40,ve)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:3,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(K.Legend,{key:4,legendSet:V.value,config:Y.value,onClickMarker:a[1]||(a[1]=({legend:o})=>T(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:u=>T(o),style:e.normalizeStyle(`opacity:${s.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),s.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",ge," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",pe," ("+e.toDisplayString(isNaN(o.value/c.value)?"-":(o.value/c.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,he)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:V.value},void 0,!0),e.createVNode(Z._sfc_main,{show:v.value.showTooltip&&x.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:C.value,content:w.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(le.default,{key:5,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ee.DataTable,{colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ye)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ae))}},me=oe._export_sfc(fe,[["__scopeId","data-v-53c416de"]]);exports.default=me;
@@ -1,13 +1,13 @@
1
1
  import { computed as v, onMounted as be, ref as u, openBlock as r, createElementBlock as n, normalizeClass as N, normalizeStyle as F, createVNode as W, createCommentVNode as d, createBlock as S, unref as C, createSlots as me, withCtx as i, renderSlot as h, normalizeProps as z, guardReactiveProps as A, createElementVNode as x, Fragment as Q, renderList as Z, createTextVNode as ee, toDisplayString as I, nextTick as ke } from "vue";
2
- import { u as Ce, o as xe, e as te, g as we, c as le, t as $e, a as Te, p as L, b as _e, d as Pe, F as Ne, f as O, X as Fe, v as ae, w as Se, n as Ie, q as Le } from "./index-BK818aZo.js";
3
- import { L as Oe } from "./Legend-BKBuWgj8.js";
4
- import { _ as Ee } from "./Title-DJ269q6H.js";
5
- import { _ as Ve } from "./Tooltip-CKKSlbSq.js";
6
- import { D as Be } from "./DataTable-R7hmQ0wl.js";
7
- import { u as De, U as Ge } from "./usePrinter-C-2KAW2f.js";
8
- import Me from "./vue-ui-skeleton-DJtTdfNg.js";
9
- import We from "./vue-ui-accordion-CH8K6f6J.js";
10
- import { u as oe } from "./useNestedProp-hi25rRoY.js";
2
+ import { u as Ce, o as xe, e as te, g as we, c as le, t as $e, a as Te, p as L, b as _e, d as Pe, F as Ne, f as O, X as Fe, v as ae, w as Se, n as Ie, q as Le } from "./index-ByO3Ywek.js";
3
+ import { L as Oe } from "./Legend-C4cCpb4z.js";
4
+ import { _ as Ee } from "./Title-BSpLzDC1.js";
5
+ import { _ as Ve } from "./Tooltip-DI8_Wjjy.js";
6
+ import { D as Be } from "./DataTable-Bza1ed62.js";
7
+ import { u as De, U as Ge } from "./usePrinter-Dda5FBG3.js";
8
+ import Me from "./vue-ui-skeleton-BxRSQeuo.js";
9
+ import We from "./vue-ui-accordion-CbKHVPHh.js";
10
+ import { u as oe } from "./useNestedProp-Da77DnaA.js";
11
11
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  const Ae = ["id"], He = ["xmlns", "viewBox"], Ue = ["id"], Xe = ["stdDeviation"], Re = ["d", "stroke", "stroke-width"], je = ["d", "stroke", "stroke-width"], qe = ["filter"], Ye = ["d", "stroke", "stroke-width"], Je = ["d", "stroke-width", "onMouseenter", "onClick"], Ke = ["onClick"], Qe = { key: 0 }, Ze = { key: 1 }, et = ["innerHTML"], tt = {
13
13
  __name: "vue-ui-galaxy",
@@ -1,9 +1,9 @@
1
1
  import { computed as p, ref as d, watch as he, onMounted as ye, onBeforeUnmount as fe, openBlock as r, createElementBlock as i, normalizeClass as q, normalizeStyle as F, createElementVNode as v, toDisplayString as m, createCommentVNode as g, createBlock as H, unref as h, createSlots as ge, withCtx as E, renderSlot as $, normalizeProps as pe, guardReactiveProps as me, Fragment as O, renderList as A } from "vue";
2
- import { u as ke, c as be, t as xe, a as we, p as Z, b as _e, o as J, d as Fe, e as N, g as K, m as Q, X as ze, r as j, G as X, B as ee } from "./index-BK818aZo.js";
2
+ import { u as ke, c as be, t as xe, a as we, p as Z, b as _e, o as J, d as Fe, e as N, g as K, m as Q, X as ze, r as j, G as X, B as ee } from "./index-ByO3Ywek.js";
3
3
  import { t as Se, u as $e } from "./useResponsive-NZB-WLRF.js";
4
- import { u as Ce, U as Me } from "./usePrinter-C-2KAW2f.js";
5
- import Pe from "./vue-ui-skeleton-DJtTdfNg.js";
6
- import { u as te } from "./useNestedProp-hi25rRoY.js";
4
+ import { u as Ce, U as Me } from "./usePrinter-Dda5FBG3.js";
5
+ import Pe from "./vue-ui-skeleton-BxRSQeuo.js";
6
+ import { u as te } from "./useNestedProp-Da77DnaA.js";
7
7
  import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const Oe = ["id"], Ne = ["xmlns", "viewBox"], Xe = ["id"], Ye = ["stop-color"], Ge = ["stop-color"], Re = ["stop-color"], Ee = ["id"], Ae = ["stdDeviation"], je = ["d", "fill", "stroke"], Be = ["d", "filter"], Ue = ["y", "width", "height", "fill"], De = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], Ve = ["x", "y", "font-size", "font-weight", "fill"], We = { key: 1 }, Le = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Te = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], qe = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], He = { key: 2 }, Ze = ["d", "fill", "stroke", "stroke-width"], Je = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], Ke = ["x", "y", "font-size", "fill"], Qe = {
9
9
  __name: "vue-ui-gauge",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Xau3hcRk.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),I=require("./usePrinter-Dhvmhwhf.cjs"),T=require("./vue-ui-skeleton-CgYrDrh-.cjs"),O=require("./useNestedProp-C_EQ-Kxy.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z=["id"],J=["xmlns","viewBox"],K=["id"],Q=["stop-color"],ee=["stop-color"],te=["stop-color"],ae=["id"],le=["stdDeviation"],oe=["d","fill","stroke"],re=["d","filter"],ne=["y","width","height","fill"],se=["x","y","text-anchor","font-size","font-weight","fill"],ue=["x","y","font-size","font-weight","fill"],ie={key:1},ce=["x1","y1","x2","y2","stroke","stroke-width"],de=["x1","y1","x2","y2","stroke","stroke-width"],ve=["x1","y1","x2","y2","stroke-width","filter"],he={key:2},ye=["d","fill","stroke","stroke-width"],fe=["cx","cy","fill","r","stroke-width","stroke"],me=["x","y","font-size","fill"],pe={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(_,{expose:X}){const u=_,{vue_ui_gauge:D}=r.useConfig(),b=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),h=e.ref(r.createUid()),Y=e.ref(null),C=e.ref(0),x=e.ref(null),N=e.ref(null),$=e.ref(null),t=e.computed(()=>{const o=O.useNestedProp({userConfig:u.config,defaultConfig:D});return o.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_gauge[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:G,isImaging:R,generatePdf:B,generateImage:E}=I.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),j=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.computed(()=>{if(!b.value||r.objectIsEmpty(u.dataset.series||{}))return{value:0,series:[{from:0,to:1}]};const o=[];(u.dataset.series||[]).forEach(l=>{o.push(l.from||0),o.push(l.to||0)});const n=Math.max(...o);return{...u.dataset,series:(u.dataset.series||[]).map((l,i)=>({...l,color:r.convertColorToHex(l.color)||j.value[i]||r.palette[i],value:((l.to||0)-(l.from||0))/n*100}))}}),d=e.ref(512),a=e.ref({height:358.4,width:d.value,top:0,bottom:358.4,centerX:179.2,centerY:d.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3}),g=e.ref(0),m=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:u.dataset.value);e.watch(()=>u.dataset.value,()=>{v.value=t.value.style.chart.animation.use?0:u.dataset.value,M()});const c=e.computed(()=>{const o=a.value.width/2,n=s.value.base,l=Math.PI*((v.value+0-m.value)/(g.value-m.value))+Math.PI;return{x1:o,y1:n,x2:o+s.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),y2:n+s.value.pointerSize*a.value.pointerSize*.9*Math.sin(l)}}),P=e.computed(()=>{const o=a.value.width/2,n=s.value.base,l=Math.PI*((v.value+0-m.value)/(g.value-m.value))+Math.PI,i=o+s.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),z=n+s.value.pointerSize*a.value.pointerSize*.9*Math.sin(l),y=a.value.pointerRadius,w=o+y*Math.cos(l+Math.PI/2),L=n+y*Math.sin(l+Math.PI/2),U=o+y*Math.cos(l-Math.PI/2),W=n+y*Math.sin(l-Math.PI/2);return isNaN(i)?null:`M ${i},${z} ${w},${L} ${U},${W} Z`}),F=e.computed(()=>{for(let o=0;o<f.value.series.length;o+=1){const{color:n,from:l,to:i}=f.value.series[o];if(v.value>=l&&v.value<=i)return n}return"#2D353C"}),S=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:u.dataset,requiredAttributes:["value","series"]}).forEach(o=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(u.dataset,"series")&&(u.dataset.series.length?u.dataset.series.forEach((o,n)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),M(),t.value.responsive){const o=V.throttle(()=>{const{width:n,height:l}=V.useResponsive({chart:x.value,title:t.value.style.chart.title.text?N.value:null,legend:$.value});a.value.width=n,a.value.height=l,a.value.centerX=n/2,a.value.centerY=d.value/2/358.4*l,a.value.bottom=l,a.value.labelFontSize=18/d.value*Math.min(l,n)<10?10:18/d.value*Math.min(l,n),a.value.legendFontSize=t.value.style.chart.legend.fontSize/d.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/d.value*Math.min(l,n),a.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/d.value*Math.min(l,n),a.value.trackSize=t.value.style.chart.layout.track.size/d.value*Math.min(l,n),a.value.pointerStrokeWidth=r.translateSize({relator:Math.min(n,l),adjuster:d.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),a.value.markerOffset=r.translateSize({relator:Math.max(n,l),adjuster:d.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2})});S.value=new ResizeObserver(o),S.value.observe(x.value.parentNode)}}),e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});function M(){const o=[];(f.value.series||[]).forEach(w=>{o.push(w.from||0),o.push(w.to||0)}),g.value=Math.max(...o),m.value=Math.min(...o);const n=String(g.value).length;let l=0,i=(n>2?.01:.001)*t.value.style.chart.animation.speed,z=(n>2?.05:.005)*t.value.style.chart.animation.acceleration;function y(){v.value+=i+l,l+=z,v.value<u.dataset.value?requestAnimationFrame(y):v.value=u.dataset.value}t.value.style.chart.animation.use&&(v.value=m.value,y())}const s=e.computed(()=>{const o=t.value.responsive?Math.min(a.value.width,a.value.height):a.value.width;return{arcs:o/2.5,gradients:o/2.75,base:t.value.responsive?a.value.height/2:a.value.height*.7,ratingBase:t.value.responsive?a.value.height/2+a.value.height/4:a.value.height*.9,pointerSize:t.value.responsive?Math.min(a.value.width,a.value.height)/3:a.value.width/3.2}}),p=e.computed(()=>r.makeDonut({series:f.value.series},a.value.width/2,s.value.base,s.value.arcs,s.value.arcs,1,1,1,180,109.9495,40*a.value.trackSize)),A=e.computed(()=>r.makeDonut({series:f.value.series},a.value.width/2,s.value.base,s.value.gradients,s.value.gradients,1,1,1,180,109.9495,2*a.value.trackSize)),k=e.ref(!1);function q(o){k.value=o,C.value+=1}return X({generatePdf:B,generateImage:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:x,id:`vue-ui-gauge_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:N,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px;${t.value.userOptions.show?"padding-top:36px":""}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.color};font-size:${t.value.style.chart.title.fontSize}px;font-weight:${t.value.style.chart.title.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.title.text),5),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.subtitle.color};font-size:${t.value.style.chart.title.subtitle.fontSize}px;font-weight:${t.value.style.chart.title.subtitle.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.title.subtitle.text),5)):e.createCommentVNode("",!0),isNaN(_.dataset.base)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.subtitle.color};font-size:${t.value.style.chart.title.subtitle.fontSize}px;font-weight:${t.value.style.chart.title.subtitle.bold?"bold":""}`)},e.toDisplayString(t.value.translations.base)+" : "+e.toDisplayString(_.dataset.base),5))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(I.UserOptions,{ref_key:"details",ref:Y,key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(G),uid:h.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:q,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(E)},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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${h.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,Q),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(r.opacity)[t.value.style.chart.layout.track.gradientIntensity]}`},null,8,ee),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,te)],8,K)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,le)],8,ae)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,oe))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${h.value})`},null,8,re))),128)),e.createElementVNode("rect",{x:0,y:s.value.base,width:a.value.width<=0?1e-4:a.value.width,height:a.value.height*.3<=0?1e-4:a.value.height*.3,fill:t.value.style.chart.backgroundColor},null,8,ne)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).y,"text-anchor":l.center.startX<a.value.width/2-5?"end":l.center.startX>a.value.width/2+5?"start":"middle","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(l.from.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,se))),256)),e.createElementVNode("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).y,"text-anchor":"start","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(g.value.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,ue),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",ie,[isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":a.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,ce)),isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.7},null,8,de)),!isNaN(c.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.3,filter:`url(#blur_${h.value})`},null,8,ve)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",he,[P.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:P.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,ye)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:a.value.width/2,cy:s.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:a.value.pointerRadius<=0?1e-4:a.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,fe),e.createElementVNode("text",{x:a.value.width/2,y:s.value.ratingBase,"text-anchor":"middle","font-size":a.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(t.value.style.chart.legend.prefix)+" "+e.toDisplayString(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":"")+e.toDisplayString(v.value.toFixed(t.value.style.chart.legend.roundingValue))+" "+e.toDisplayString(t.value.style.chart.legend.suffix),9,me),e.renderSlot(o.$slots,"svg",{svg:a.value},void 0,!0)],14,J)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:3,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:$},[e.renderSlot(o.$slots,"legend",{legend:f.value},void 0,!0)],512)],14,Z))}},ge=H._export_sfc(pe,[["__scopeId","data-v-a862b4a9"]]);exports.default=ge;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BDKEFvEF.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),I=require("./usePrinter-DedM_6px.cjs"),T=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),O=require("./useNestedProp-Dikfncsl.cjs"),H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z=["id"],J=["xmlns","viewBox"],K=["id"],Q=["stop-color"],ee=["stop-color"],te=["stop-color"],ae=["id"],le=["stdDeviation"],oe=["d","fill","stroke"],re=["d","filter"],ne=["y","width","height","fill"],se=["x","y","text-anchor","font-size","font-weight","fill"],ue=["x","y","font-size","font-weight","fill"],ie={key:1},ce=["x1","y1","x2","y2","stroke","stroke-width"],de=["x1","y1","x2","y2","stroke","stroke-width"],ve=["x1","y1","x2","y2","stroke-width","filter"],he={key:2},ye=["d","fill","stroke","stroke-width"],fe=["cx","cy","fill","r","stroke-width","stroke"],me=["x","y","font-size","fill"],pe={__name:"vue-ui-gauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(_,{expose:X}){const u=_,{vue_ui_gauge:D}=r.useConfig(),b=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),h=e.ref(r.createUid()),Y=e.ref(null),C=e.ref(0),x=e.ref(null),N=e.ref(null),$=e.ref(null),t=e.computed(()=>{const o=O.useNestedProp({userConfig:u.config,defaultConfig:D});return o.theme?{...O.useNestedProp({userConfig:r.themes.vue_ui_gauge[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:G,isImaging:R,generatePdf:B,generateImage:E}=I.usePrinter({elementId:`vue-ui-gauge_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-gauge"}),j=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),f=e.computed(()=>{if(!b.value||r.objectIsEmpty(u.dataset.series||{}))return{value:0,series:[{from:0,to:1}]};const o=[];(u.dataset.series||[]).forEach(l=>{o.push(l.from||0),o.push(l.to||0)});const n=Math.max(...o);return{...u.dataset,series:(u.dataset.series||[]).map((l,i)=>({...l,color:r.convertColorToHex(l.color)||j.value[i]||r.palette[i],value:((l.to||0)-(l.from||0))/n*100}))}}),d=e.ref(512),a=e.ref({height:358.4,width:d.value,top:0,bottom:358.4,centerX:179.2,centerY:d.value/2,labelFontSize:18,legendFontSize:t.value.style.chart.legend.fontSize,pointerRadius:t.value.style.chart.layout.pointer.circle.radius,trackSize:t.value.style.chart.layout.track.size,pointerSize:t.value.style.chart.layout.pointer.size,pointerStrokeWidth:t.value.style.chart.layout.pointer.strokeWidth,markerOffset:t.value.style.chart.layout.markers.offsetY+3}),g=e.ref(0),m=e.ref(0),v=e.ref(t.value.style.chart.animation.use?0:u.dataset.value);e.watch(()=>u.dataset.value,()=>{v.value=t.value.style.chart.animation.use?0:u.dataset.value,M()});const c=e.computed(()=>{const o=a.value.width/2,n=s.value.base,l=Math.PI*((v.value+0-m.value)/(g.value-m.value))+Math.PI;return{x1:o,y1:n,x2:o+s.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),y2:n+s.value.pointerSize*a.value.pointerSize*.9*Math.sin(l)}}),P=e.computed(()=>{const o=a.value.width/2,n=s.value.base,l=Math.PI*((v.value+0-m.value)/(g.value-m.value))+Math.PI,i=o+s.value.pointerSize*a.value.pointerSize*.9*Math.cos(l),z=n+s.value.pointerSize*a.value.pointerSize*.9*Math.sin(l),y=a.value.pointerRadius,w=o+y*Math.cos(l+Math.PI/2),L=n+y*Math.sin(l+Math.PI/2),U=o+y*Math.cos(l-Math.PI/2),W=n+y*Math.sin(l-Math.PI/2);return isNaN(i)?null:`M ${i},${z} ${w},${L} ${U},${W} Z`}),F=e.computed(()=>{for(let o=0;o<f.value.series.length;o+=1){const{color:n,from:l,to:i}=f.value.series[o];if(v.value>=l&&v.value<=i)return n}return"#2D353C"}),S=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)?r.error({componentName:"VueUiGauge",type:"dataset"}):(r.getMissingDatasetAttributes({datasetObject:u.dataset,requiredAttributes:["value","series"]}).forEach(o=>{r.error({componentName:"VueUiGauge",type:"datasetAttribute",property:o})}),Object.hasOwn(u.dataset,"series")&&(u.dataset.series.length?u.dataset.series.forEach((o,n)=>{r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["from","to"]}).forEach(l=>{r.error({componentName:"VueUiGauge",type:"datasetSerieAttribute",property:l,index:n})})}):r.error({componentName:"VueUiGauge",type:"datasetAttributeEmpty",property:"series"}))),M(),t.value.responsive){const o=V.throttle(()=>{const{width:n,height:l}=V.useResponsive({chart:x.value,title:t.value.style.chart.title.text?N.value:null,legend:$.value});a.value.width=n,a.value.height=l,a.value.centerX=n/2,a.value.centerY=d.value/2/358.4*l,a.value.bottom=l,a.value.labelFontSize=18/d.value*Math.min(l,n)<10?10:18/d.value*Math.min(l,n),a.value.legendFontSize=t.value.style.chart.legend.fontSize/d.value*Math.min(l,n)<14?14:t.value.style.chart.legend.fontSize/d.value*Math.min(l,n),a.value.pointerRadius=t.value.style.chart.layout.pointer.circle.radius/d.value*Math.min(l,n),a.value.trackSize=t.value.style.chart.layout.track.size/d.value*Math.min(l,n),a.value.pointerStrokeWidth=r.translateSize({relator:Math.min(n,l),adjuster:d.value,source:t.value.style.chart.layout.pointer.strokeWidth,threshold:2,fallback:2}),a.value.markerOffset=r.translateSize({relator:Math.max(n,l),adjuster:d.value,source:t.value.style.chart.layout.markers.offsetY+3,threshold:2,fallback:2})});S.value=new ResizeObserver(o),S.value.observe(x.value.parentNode)}}),e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});function M(){const o=[];(f.value.series||[]).forEach(w=>{o.push(w.from||0),o.push(w.to||0)}),g.value=Math.max(...o),m.value=Math.min(...o);const n=String(g.value).length;let l=0,i=(n>2?.01:.001)*t.value.style.chart.animation.speed,z=(n>2?.05:.005)*t.value.style.chart.animation.acceleration;function y(){v.value+=i+l,l+=z,v.value<u.dataset.value?requestAnimationFrame(y):v.value=u.dataset.value}t.value.style.chart.animation.use&&(v.value=m.value,y())}const s=e.computed(()=>{const o=t.value.responsive?Math.min(a.value.width,a.value.height):a.value.width;return{arcs:o/2.5,gradients:o/2.75,base:t.value.responsive?a.value.height/2:a.value.height*.7,ratingBase:t.value.responsive?a.value.height/2+a.value.height/4:a.value.height*.9,pointerSize:t.value.responsive?Math.min(a.value.width,a.value.height)/3:a.value.width/3.2}}),p=e.computed(()=>r.makeDonut({series:f.value.series},a.value.width/2,s.value.base,s.value.arcs,s.value.arcs,1,1,1,180,109.9495,40*a.value.trackSize)),A=e.computed(()=>r.makeDonut({series:f.value.series},a.value.width/2,s.value.base,s.value.gradients,s.value.gradients,1,1,1,180,109.9495,2*a.value.trackSize)),k=e.ref(!1);function q(o){k.value=o,C.value+=1}return X({generatePdf:B,generateImage:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-gauge ${k.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"gaugeChart",ref:x,id:`vue-ui-gauge_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:N,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px;${t.value.userOptions.show?"padding-top:36px":""}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.color};font-size:${t.value.style.chart.title.fontSize}px;font-weight:${t.value.style.chart.title.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.title.text),5),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.subtitle.color};font-size:${t.value.style.chart.title.subtitle.fontSize}px;font-weight:${t.value.style.chart.title.subtitle.bold?"bold":""}`)},e.toDisplayString(t.value.style.chart.title.subtitle.text),5)):e.createCommentVNode("",!0),isNaN(_.dataset.base)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;color:${t.value.style.chart.title.subtitle.color};font-size:${t.value.style.chart.title.subtitle.fontSize}px;font-weight:${t.value.style.chart.title.subtitle.bold?"bold":""}`)},e.toDisplayString(t.value.translations.base)+" : "+e.toDisplayString(_.dataset.base),5))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(I.UserOptions,{ref_key:"details",ref:Y,key:`user_options_${C.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(R),isPrinting:e.unref(G),uid:h.value,hasXls:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:q,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(E)},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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:hidden !important;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{id:`gradient_${h.value}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,Q),e.createElementVNode("stop",{offset:"80%","stop-color":`#FFFFFF${e.unref(r.opacity)[t.value.style.chart.layout.track.gradientIntensity]}`},null,8,ee),e.createElementVNode("stop",{offset:"100%","stop-color":`#FFFFFF${e.unref(r.opacity)[1]}`},null,8,te)],8,K)]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.track.gradientIntensity},null,8,le)],8,ae)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:l.color,stroke:t.value.style.chart.backgroundColor,"stroke-linecap":"round"},null,8,oe))),128)),t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(l,i)=>(e.openBlock(),e.createElementBlock("path",{key:`arc_${i}`,d:l.arcSlice,fill:"#FFFFFF",stroke:"none","stroke-linecap":"round",filter:`url(#blur_${h.value})`},null,8,re))),128)),e.createElementVNode("rect",{x:0,y:s.value.base,width:a.value.width<=0?1e-4:a.value.width,height:a.value.height*.3<=0?1e-4:a.value.height*.3,fill:t.value.style.chart.backgroundColor},null,8,ne)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,i)=>(e.openBlock(),e.createElementBlock("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:l.center.startX,initY:l.center.startY,offset:a.value.markerOffset}).y,"text-anchor":l.center.startX<a.value.width/2-5?"end":l.center.startX>a.value.width/2+5?"start":"middle","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(l.from.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,se))),256)),e.createElementVNode("text",{x:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).x,y:e.unref(r.offsetFromCenterPoint)({centerX:a.value.width/2,centerY:s.value.base,initX:p.value.at(-1).endX,initY:p.value.at(-1).endY,offset:a.value.markerOffset}).y,"text-anchor":"start","font-size":a.value.labelFontSize*t.value.style.chart.layout.markers.fontSizeRatio,"font-weight":`${t.value.style.chart.layout.markers.bold?"bold":"normal"}`,fill:t.value.style.chart.layout.markers.color},e.toDisplayString(g.value.toFixed(t.value.style.chart.layout.markers.roundingValue)),9,ue),t.value.style.chart.layout.pointer.type==="rounded"?(e.openBlock(),e.createElementBlock("g",ie,[isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":a.value.pointerStrokeWidth,"stroke-linecap":"round"},null,8,ce)),isNaN(c.value.x2)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("line",{key:1,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,"stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.7},null,8,de)),!isNaN(c.value.x2)&&t.value.style.chart.layout.track.useGradient?(e.openBlock(),e.createElementBlock("line",{key:2,x1:c.value.x1,y1:c.value.y1,x2:c.value.x2,y2:c.value.y2,stroke:"white","stroke-linecap":"round","stroke-width":a.value.pointerStrokeWidth*.3,filter:`url(#blur_${h.value})`},null,8,ve)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("g",he,[P.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:P.value,fill:t.value.style.chart.layout.pointer.useRatingColor?F.value:t.value.style.chart.layout.pointer.color,stroke:t.value.style.chart.layout.pointer.stroke,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,"stroke-linejoin":"round"},null,8,ye)):e.createCommentVNode("",!0)])),e.createElementVNode("circle",{cx:a.value.width/2,cy:s.value.base,fill:t.value.style.chart.layout.pointer.circle.color,r:a.value.pointerRadius<=0?1e-4:a.value.pointerRadius,"stroke-width":t.value.style.chart.layout.pointer.circle.strokeWidth,stroke:t.value.style.chart.layout.pointer.circle.stroke},null,8,fe),e.createElementVNode("text",{x:a.value.width/2,y:s.value.ratingBase,"text-anchor":"middle","font-size":a.value.legendFontSize,"font-weight":"bold",fill:t.value.style.chart.legend.useRatingColor?F.value:t.value.style.chart.legend.color},e.toDisplayString(t.value.style.chart.legend.prefix)+" "+e.toDisplayString(t.value.style.chart.legend.showPlusSymbol&&v.value>0?"+":"")+e.toDisplayString(v.value.toFixed(t.value.style.chart.legend.roundingValue))+" "+e.toDisplayString(t.value.style.chart.legend.suffix),9,me),e.renderSlot(o.$slots,"svg",{svg:a.value},void 0,!0)],14,J)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:3,config:{type:"gauge",style:{backgroundColor:t.value.style.chart.backgroundColor,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:$},[e.renderSlot(o.$slots,"legend",{legend:f.value},void 0,!0)],512)],14,Z))}},ge=H._export_sfc(pe,[["__scopeId","data-v-a862b4a9"]]);exports.default=ge;
@@ -1,12 +1,12 @@
1
1
  import { useCssVars as $e, computed as c, ref as g, onMounted as Ce, openBlock as s, createElementBlock as n, normalizeClass as H, normalizeStyle as f, createVNode as q, createCommentVNode as y, createBlock as K, unref as w, createSlots as Le, withCtx as _, renderSlot as k, normalizeProps as J, guardReactiveProps as Q, Fragment as T, renderList as S, createElementVNode as u, toDisplayString as p, withKeys as ze, createTextVNode as Te, nextTick as Se } from "vue";
2
- import { u as Ae, o as Ne, e as ve, c as Z, t as Me, g as Fe, H as ee, X as Ve, C as te, f as ce, v as Ie, w as Oe, n as Pe, q as Be } from "./index-BK818aZo.js";
3
- import { _ as Re } from "./Title-DJ269q6H.js";
4
- import { u as Ee, U as Ge } from "./usePrinter-C-2KAW2f.js";
5
- import { _ as He } from "./Tooltip-CKKSlbSq.js";
6
- import Xe from "./vue-ui-skeleton-DJtTdfNg.js";
7
- import Ue from "./BaseIcon-NaAlKaAM.js";
8
- import je from "./vue-ui-accordion-CH8K6f6J.js";
9
- import { u as ye } from "./useNestedProp-hi25rRoY.js";
2
+ import { u as Ae, o as Ne, e as ve, c as Z, t as Me, g as Fe, H as ee, X as Ve, C as te, f as ce, v as Ie, w as Oe, n as Pe, q as Be } from "./index-ByO3Ywek.js";
3
+ import { _ as Re } from "./Title-BSpLzDC1.js";
4
+ import { u as Ee, U as Ge } from "./usePrinter-Dda5FBG3.js";
5
+ import { _ as He } from "./Tooltip-DI8_Wjjy.js";
6
+ import Xe from "./vue-ui-skeleton-BxRSQeuo.js";
7
+ import Ue from "./BaseIcon-DB1g9sdS.js";
8
+ import je from "./vue-ui-accordion-CbKHVPHh.js";
9
+ import { u as ye } from "./useNestedProp-Da77DnaA.js";
10
10
  import { _ as De } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  const We = ["id"], Ye = ["xmlns", "viewBox"], qe = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Ke = ["x", "y", "width", "height", "fill", "stroke", "stroke-width"], Je = ["font-size", "font-weight", "fill", "x", "y"], Qe = ["x", "y", "width", "height", "onMouseover"], Ze = { key: 0 }, et = ["font-size", "fill", "x", "y", "font-weight"], tt = { key: 0 }, lt = ["x", "y", "font-size", "fill", "font-weight"], at = { key: 1 }, ot = ["x", "y", "width", "height", "stroke", "stroke-width"], st = { key: 2 }, ut = ["id"], nt = ["stop-color"], it = ["stop-color"], rt = ["x", "y", "font-size", "fill"], dt = ["x", "y", "height", "rx", "fill"], vt = ["x", "y", "font-size", "fill"], ct = ["stroke", "x1", "x2", "y1", "y2"], yt = ["fill", "d"], ht = { key: 3 }, gt = {
12
12
  id: "colorScaleHorizontal",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Xau3hcRk.cjs"),ae=require("./Title-gCBF7AU7.cjs"),X=require("./usePrinter-Dhvmhwhf.cjs"),se=require("./Tooltip-Qv4VexrA.cjs"),ue=require("./vue-ui-skeleton-CgYrDrh-.cjs"),ne=require("./BaseIcon-BGeIE3vn.cjs"),re=require("./vue-ui-accordion-BjU8im6m.cjs"),j=require("./useNestedProp-C_EQ-Kxy.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],ce=["xmlns","viewBox"],ve=["x","y","width","height","fill","stroke","stroke-width"],ye=["x","y","width","height","fill","stroke","stroke-width"],he=["font-size","font-weight","fill","x","y"],pe=["x","y","width","height","onMouseover"],ge={key:0},me=["font-size","fill","x","y","font-weight"],fe={key:0},be=["x","y","font-size","fill","font-weight"],xe={key:1},ke=["x","y","width","height","stroke","stroke-width"],we={key:2},_e=["id"],Ce=["stop-color"],Ne=["stop-color"],Be=["x","y","font-size","fill"],Se=["x","y","height","rx","fill"],Ve=["x","y","font-size","fill"],$e=["stroke","x1","x2","y1","y2"],Ee=["fill","d"],ze={key:3},Le={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Te=["stop-color"],Fe=["stop-color"],Ae=["x","y","width","height","rx"],Me=["x","y","font-size","fill"],Pe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Oe={class:"vue-ui-data-table"},Re={key:0},qe=["data-cell"],He={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ue=["data-cell"],Ge={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Xe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(S,{expose:W}){const r=S;e.useCssVars(l=>({b32f5c52:l.tdo}));const{vue_ui_heatmap:Y}=i.useConfig(),V=e.computed(()=>!!r.dataset&&r.dataset.length);i.objectIsEmpty(r.dataset)&&i.error({componentName:"VueUiHeatmap",type:"dataset"});const x=e.ref(i.createUid()),z=e.ref(null),K=e.ref(null),L=e.ref(!1),T=e.ref(""),P=e.ref(void 0),k=e.ref(null),D=e.ref(0),I=e.ref(null),O=e.ref(!1),t=e.computed(()=>{const l=j.useNestedProp({userConfig:r.config,defaultConfig:Y});return l.theme?{...j.useNestedProp({userConfig:i.themes.vue_ui_heatmap[l.theme]||r.config,defaultConfig:l})}:l}),{isPrinting:J,isImaging:Q,generatePdf:R,generateImage:q}=X.usePrinter({elementId:`heatmap__${x.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),Z=e.computed(()=>t.value.table.responsiveBreakpoint);function ee(){new ResizeObserver(a=>{a.forEach(s=>{O.value=s.contentRect.width<Z.value})}).observe(I.value)}e.onMounted(ee);const b=e.computed(()=>Math.max(...r.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+r.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(b.value<r.dataset.length?r.dataset.length:b.value)*t.value.style.layout.cells.height,s=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:s,width:a}}),$=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-($.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-($.value==="right"&&t.value.style.legend.show?92:0)})),F=e.computed(()=>u.value.height*r.dataset.length),h=e.computed(()=>Math.max(...r.dataset.flatMap(l=>l.values))),w=e.computed(()=>Math.min(...r.dataset.flatMap(l=>l.values))),f=e.computed(()=>{const l=r.dataset.flatMap(s=>s.values);return l.reduce((s,n)=>s+n,0)/l.length}),u=e.computed(()=>({width:o.value.width/b.value,height:o.value.width/(b.value<r.dataset.length?r.dataset.length:b.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:r.dataset.map(s=>s.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,b.value)}}),E=e.computed(()=>(r.dataset.forEach((l,a)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(s=>{i.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),r.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,s)=>a>=f.value?{side:"up",color:i.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),ratio:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value))>1?1:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value)),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${i.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(f.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(f.value)),color:i.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${i.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function te(l,a,s,n){k.value={x:s,y:n};const{value:d,yAxisName:c,xAxisName:m,id:oe}=l;P.value=oe,g.value=d,_.value={datapoint:l,seriesIndex:a,series:E.value,config:t.value},L.value=!0;let A="";const M=t.value.style.tooltip.customFormat;i.isFunction(M)&&i.functionReturnsString(()=>M({datapoint:l,seriesIndex:a,series:E.value,config:t.value}))?T.value=M({datapoint:l,seriesIndex:a,series:E.value,config:t.value}):(A+=`<div>${c} ${m?`${m}`:""}</div>`,A+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${i.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,d)}">⬤</span><span>${isNaN(d)?"-":i.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${A}</div>`)}const C=e.computed(()=>o.value.top+F.value*(1-g.value/h.value)),N=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(g.value/h.value));e.computed(()=>{const l=r.dataset.map(s=>({name:s.name})),a=r.dataset.map(s=>s.values);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=["",...r.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<p.value.xLabels.length;d+=1){const c=[p.value.xLabels[d]];for(let m=0;m<r.dataset.length;m+=1)c.push([r.dataset[m].values[d]]);a.push(c)}const s=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=i.createCsvContent(s);i.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const B=e.ref(!1);function le(l){B.value=l,D.value+=1}function U(){v.value.showTable=!v.value.showTable}function G(){v.value.showTooltip=!v.value.showTooltip}return W({generatePdf:R,generateCsv:H,generateImage:q,toggleTable:U,toggleTooltip:G}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:z,class:e.normalizeClass(`vue-ui-heatmap ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${x.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(ae._sfc_main,{config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Q),isPrinting:e.unref(J),uid:x.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:B.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:z.value,onToggleFullscreen:le,onGeneratePdf:e.unref(R),onGenerateCsv:H,onGenerateImage:e.unref(q),onToggleTable:U,onToggleTooltip:G},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:s,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:s,isFullscreen:n})),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),V.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${y.value.width} ${y.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(s,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ve),e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ye),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(i.adaptColorToBackground)(d.color),x:o.value.left+u.value.width*c+u.value.width/2,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(t.value.style.layout.dataLabels.prefix)+e.toDisplayString(Number(d.value.toFixed(t.value.style.layout.cells.value.roundingValue)).toLocaleString())+e.toDisplayString(t.value.style.layout.dataLabels.suffix),9,he)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c,y:o.value.top+u.value.height*n,width:u.value.width,height:u.value.height,fill:"transparent",stroke:"none",onMouseover:m=>te(d,n,o.value.left+u.value.width*c,o.value.top+u.value.height*n),onMouseout:a[0]||(a[0]=m=>{L.value=!1,P.value=void 0,g.value=null,k.value=null})},null,40,pe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ge,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(p.value.yLabels[n]),9,me)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+u.value.width/2+o.value.width/p.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX,y:o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(s),9,be))),256))])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("g",xe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:k.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:k.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:u.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="right"?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${x.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ne)],8,_e)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Be),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:F.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${x.value})`},null,8,Se),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+F.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Ve),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(i.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:C.value,y2:C.value},null,8,$e)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${C.value} ${o.value.right+26},${C.value-8} ${o.value.right+26},${C.value+8}z`},null,8,Ee)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Le,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ae),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Me),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Pe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(i.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,De)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${o.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:3,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&L.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,parent:z.value,content:T.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:v.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.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":O.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=s=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(s=>v.value.showTable=!1,["enter"]))},[e.createVNode(ne.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Oe,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Re,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.dataset,(s,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(s.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",He,e.toDisplayString(s),1)],12,qe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":S.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Ge,e.toDisplayString(isNaN(d.values[n])?"-":e.unref(i.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ue))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},je=ie._export_sfc(Xe,[["__scopeId","data-v-222fd4c1"]]);exports.default=je;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BDKEFvEF.cjs"),ae=require("./Title-XRMcJkna.cjs"),X=require("./usePrinter-DedM_6px.cjs"),se=require("./Tooltip-COgv-iii.cjs"),ue=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),ne=require("./BaseIcon-5MAyZTOz.cjs"),re=require("./vue-ui-accordion-BytUYLYl.cjs"),j=require("./useNestedProp-Dikfncsl.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],ce=["xmlns","viewBox"],ve=["x","y","width","height","fill","stroke","stroke-width"],ye=["x","y","width","height","fill","stroke","stroke-width"],he=["font-size","font-weight","fill","x","y"],pe=["x","y","width","height","onMouseover"],ge={key:0},me=["font-size","fill","x","y","font-weight"],fe={key:0},be=["x","y","font-size","fill","font-weight"],xe={key:1},ke=["x","y","width","height","stroke","stroke-width"],we={key:2},_e=["id"],Ce=["stop-color"],Ne=["stop-color"],Be=["x","y","font-size","fill"],Se=["x","y","height","rx","fill"],Ve=["x","y","font-size","fill"],$e=["stroke","x1","x2","y1","y2"],Ee=["fill","d"],ze={key:3},Le={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},Te=["stop-color"],Fe=["stop-color"],Ae=["x","y","width","height","rx"],Me=["x","y","font-size","fill"],Pe=["x","y","font-size","fill"],De=["stroke","x1","x2","y1","y2"],Ie=["fill","d"],Oe={class:"vue-ui-data-table"},Re={key:0},qe=["data-cell"],He={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ue=["data-cell"],Ge={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Xe={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(S,{expose:W}){const r=S;e.useCssVars(l=>({b32f5c52:l.tdo}));const{vue_ui_heatmap:Y}=i.useConfig(),V=e.computed(()=>!!r.dataset&&r.dataset.length);i.objectIsEmpty(r.dataset)&&i.error({componentName:"VueUiHeatmap",type:"dataset"});const x=e.ref(i.createUid()),z=e.ref(null),K=e.ref(null),L=e.ref(!1),T=e.ref(""),P=e.ref(void 0),k=e.ref(null),D=e.ref(0),I=e.ref(null),O=e.ref(!1),t=e.computed(()=>{const l=j.useNestedProp({userConfig:r.config,defaultConfig:Y});return l.theme?{...j.useNestedProp({userConfig:i.themes.vue_ui_heatmap[l.theme]||r.config,defaultConfig:l})}:l}),{isPrinting:J,isImaging:Q,generatePdf:R,generateImage:q}=X.usePrinter({elementId:`heatmap__${x.value}`,fileName:t.value.style.title.text||"vue-ui-heatmap"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),Z=e.computed(()=>t.value.table.responsiveBreakpoint);function ee(){new ResizeObserver(a=>{a.forEach(s=>{O.value=s.contentRect.width<Z.value})}).observe(I.value)}e.onMounted(ee);const b=e.computed(()=>Math.max(...r.dataset.flatMap(l=>(l.values||[]).length))),y=e.computed(()=>{const l=t.value.style.layout.padding.top+t.value.style.layout.padding.bottom+r.dataset.length*t.value.style.layout.cells.height,a=t.value.style.layout.padding.left+t.value.style.layout.padding.right+(b.value<r.dataset.length?r.dataset.length:b.value)*t.value.style.layout.cells.height,s=l+(t.value.style.legend.show?t.value.style.legend.position==="right"?0:t.value.style.layout.cells.height*2:0);return{height:l,heightWithLegend:s,width:a}}),$=e.computed(()=>t.value.style.legend.position),o=e.computed(()=>({top:t.value.style.layout.padding.top,left:t.value.style.layout.padding.left,right:y.value.width-t.value.style.layout.padding.right-($.value==="right"&&t.value.style.legend.show?92:0),bottom:y.value.height-t.value.style.layout.padding.bottom,height:y.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,width:y.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left-($.value==="right"&&t.value.style.legend.show?92:0)})),F=e.computed(()=>u.value.height*r.dataset.length),h=e.computed(()=>Math.max(...r.dataset.flatMap(l=>l.values))),w=e.computed(()=>Math.min(...r.dataset.flatMap(l=>l.values))),f=e.computed(()=>{const l=r.dataset.flatMap(s=>s.values);return l.reduce((s,n)=>s+n,0)/l.length}),u=e.computed(()=>({width:o.value.width/b.value,height:o.value.width/(b.value<r.dataset.length?r.dataset.length:b.value)})),p=e.computed(()=>{const l=t.value.style.layout.dataLabels.yAxis.values.length?t.value.style.layout.dataLabels.yAxis.values:r.dataset.map(s=>s.name),a=t.value.style.layout.dataLabels.xAxis.values;return{yLabels:l,xLabels:a.slice(0,b.value)}}),E=e.computed(()=>(r.dataset.forEach((l,a)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["values"]}).forEach(s=>{i.error({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:a})})}),r.dataset.map(l=>({...l,temperatures:(l.values||[]).map((a,s)=>a>=f.value?{side:"up",color:i.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),ratio:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value))>1?1:Math.abs(Math.abs(a-f.value)/Math.abs(h.value-f.value)),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${i.createUid()}`}:{side:"down",ratio:Math.abs(1-Math.abs(a)/Math.abs(f.value))>1?1:Math.abs(1-Math.abs(a)/Math.abs(f.value)),color:i.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,a),value:a,yAxisName:l.name,xAxisName:p.value.xLabels[s],id:`vue-data-ui-heatmap-cell-${i.createUid()}`})})))),g=e.ref(null),_=e.ref(null);function te(l,a,s,n){k.value={x:s,y:n};const{value:d,yAxisName:c,xAxisName:m,id:oe}=l;P.value=oe,g.value=d,_.value={datapoint:l,seriesIndex:a,series:E.value,config:t.value},L.value=!0;let A="";const M=t.value.style.tooltip.customFormat;i.isFunction(M)&&i.functionReturnsString(()=>M({datapoint:l,seriesIndex:a,series:E.value,config:t.value}))?T.value=M({datapoint:l,seriesIndex:a,series:E.value,config:t.value}):(A+=`<div>${c} ${m?`${m}`:""}</div>`,A+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${i.interpolateColorHex(t.value.style.layout.cells.colors.cold,t.value.style.layout.cells.colors.hot,w.value,h.value,d)}">⬤</span><span>${isNaN(d)?"-":i.dataLabel({p:t.value.style.layout.dataLabels.prefix,v:d,s:t.value.style.layout.dataLabels.suffix,r:t.value.style.tooltip.roundingValue})}</span></div>`,T.value=`<div style="font-size:${t.value.style.tooltip.fontSize}px">${A}</div>`)}const C=e.computed(()=>o.value.top+F.value*(1-g.value/h.value)),N=e.computed(()=>o.value.left+(y.value.width-o.value.left-t.value.style.layout.padding.right)*(g.value/h.value));e.computed(()=>{const l=r.dataset.map(s=>({name:s.name})),a=r.dataset.map(s=>s.values);return{head:l,body:a}});function H(){e.nextTick(()=>{const l=["",...r.dataset.map((d,c)=>d.name)],a=[];for(let d=0;d<p.value.xLabels.length;d+=1){const c=[p.value.xLabels[d]];for(let m=0;m<r.dataset.length;m+=1)c.push([r.dataset[m].values[d]]);a.push(c)}const s=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=i.createCsvContent(s);i.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-heatmap"})})}const B=e.ref(!1);function le(l){B.value=l,D.value+=1}function U(){v.value.showTable=!v.value.showTable}function G(){v.value.showTooltip=!v.value.showTooltip}return W({generatePdf:R,generateCsv:H,generateImage:q,toggleTable:U,toggleTooltip:G}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:z,class:e.normalizeClass(`vue-ui-heatmap ${B.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}`),id:`heatmap__${x.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(ae._sfc_main,{config:{title:{cy:"heatmap-div-title",...t.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&V.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:K,key:`user_options_${D.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(Q),isPrinting:e.unref(J),uid:x.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:B.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:z.value,onToggleFullscreen:le,onGeneratePdf:e.unref(R),onGenerateCsv:H,onGenerateImage:e.unref(q),onToggleTable:U,onToggleTooltip:G},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:s,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:s,isFullscreen:n})),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),V.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),viewBox:`0 0 ${y.value.width} ${y.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(s,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:t.value.style.layout.cells.colors.underlayer,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ve),e.createElementVNode("rect",{x:o.value.left+u.value.width*c+t.value.style.layout.cells.spacing/2,y:o.value.top+u.value.height*n+t.value.style.layout.cells.spacing/2,width:u.value.width-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing,fill:d.color,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.cells.spacing},null,8,ye),t.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":t.value.style.layout.cells.value.fontSize,"font-weight":t.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(i.adaptColorToBackground)(d.color),x:o.value.left+u.value.width*c+u.value.width/2,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.cells.value.fontSize/3},e.toDisplayString(t.value.style.layout.dataLabels.prefix)+e.toDisplayString(Number(d.value.toFixed(t.value.style.layout.cells.value.roundingValue)).toLocaleString())+e.toDisplayString(t.value.style.layout.dataLabels.suffix),9,he)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.temperatures,(d,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.value.left+u.value.width*c,y:o.value.top+u.value.height*n,width:u.value.width,height:u.value.height,fill:"transparent",stroke:"none",onMouseover:m=>te(d,n,o.value.left+u.value.width*c,o.value.top+u.value.height*n),onMouseout:a[0]||(a[0]=m=>{L.value=!1,P.value=void 0,g.value=null,k.value=null})},null,40,pe)]))),256)),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ge,[e.createElementVNode("text",{"font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,x:o.value.left+t.value.style.layout.dataLabels.yAxis.offsetX-6,y:o.value.top+u.value.height*n+u.value.height/2+t.value.style.layout.dataLabels.yAxis.fontSize/3+t.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(p.value.yLabels[n]),9,me)])):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("text",{x:o.value.left+u.value.width/2+o.value.width/p.value.xLabels.length*n+t.value.style.layout.dataLabels.xAxis.offsetX,y:o.value.top+t.value.style.layout.dataLabels.xAxis.offsetY-6,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(s),9,be))),256))])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("g",xe,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:k.value.x-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,y:k.value.y-t.value.style.layout.cells.selected.border/2+t.value.style.layout.cells.spacing,width:u.value.width-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,height:u.value.height-t.value.style.layout.cells.spacing+t.value.style.layout.cells.selected.border-t.value.style.layout.cells.spacing,fill:"transparent",stroke:t.value.style.layout.cells.selected.color,"stroke-width":t.value.style.layout.cells.selected.border,rx:1},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="right"?(e.openBlock(),e.createElementBlock("g",we,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${x.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Ne)],8,_e)]),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top-t.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Be),e.createElementVNode("rect",{x:o.value.right+36,y:o.value.top,width:36,height:F.value,rx:t.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${x.value})`},null,8,Se),e.createElementVNode("text",{x:o.value.right+36+18,y:o.value.top+F.value+t.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Ve),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(i.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:o.value.right+36,x2:o.value.right+72,y1:C.value,y2:C.value},null,8,$e)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${o.value.right+36},${C.value} ${o.value.right+26},${C.value-8} ${o.value.right+26},${C.value+8}z`},null,8,Ee)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.legend.show&&$.value==="bottom"?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",Le,[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.cells.colors.cold},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.cells.colors.hot},null,8,Fe)])]),e.createElementVNode("rect",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height,width:y.value.width-o.value.left-t.value.style.layout.padding.right,height:t.value.style.layout.cells.height,rx:t.value.style.legend.scaleBorderRadius>t.value.style.layout.cells.height/2?t.value.style.layout.cells.height/2:t.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,Ae),e.createElementVNode("text",{x:o.value.left,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"start","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(w.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Me),e.createElementVNode("text",{x:o.value.right,y:o.value.bottom+t.value.style.layout.cells.height*2+t.value.style.legend.fontSize*2,"text-anchor":"end","font-size":t.value.style.legend.fontSize*2,fill:t.value.style.legend.color},e.toDisplayString(Number(h.value.toFixed(t.value.style.legend.roundingValue)).toLocaleString()),9,Pe),g.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:e.unref(i.adaptColorToBackground)(_.value.datapoint.color),"stroke-width":"2",x1:N.value,x2:N.value,y1:o.value.bottom+t.value.style.layout.cells.height,y2:o.value.bottom+t.value.style.layout.cells.height*2},null,8,De)):e.createCommentVNode("",!0),g.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:t.value.style.color,stroke:"none",d:`M ${N.value},${o.value.bottom+t.value.style.layout.cells.height} ${N.value-12},${o.value.bottom+t.value.style.layout.cells.height-20} ${N.value+12},${o.value.bottom+t.value.style.layout.cells.height-20}z`},null,8,Ie)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:y.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:3,config:{type:"heatmap",style:{backgroundColor:t.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&L.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,parent:z.value,content:T.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),V.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:v.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.createElementVNode("div",{ref_key:"tableContainer",ref:I,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":O.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:a[1]||(a[1]=s=>v.value.showTable=!1),onKeypress:a[2]||(a[2]=e.withKeys(s=>v.value.showTable=!1,["enter"]))},[e.createVNode(ne.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",Oe,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Re,e.toDisplayString(t.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.dataset,(s,n)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${t.value.table.th.outline};padding-right:6px`)},e.toDisplayString(s.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value.xLabels,(s,n)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":t.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",He,e.toDisplayString(s),1)],12,qe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.dataset,(d,c)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":S.dataset[c].name,style:e.normalizeStyle(`outline:${t.value.table.td.outline}`)},[e.createElementVNode("div",Ge,e.toDisplayString(isNaN(d.values[n])?"-":e.unref(i.dataLabel)({p:t.value.style.layout.dataLabels.prefix,v:d.values[n],s:t.value.style.layout.dataLabels.suffix,r:t.value.table.td.roundingValue})),1)],12,Ue))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},je=ie._export_sfc(Xe,[["__scopeId","data-v-222fd4c1"]]);exports.default=je;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./useNestedProp-C_EQ-Kxy.cjs"),i=require("./index-Xau3hcRk.cjs"),m={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(o){const a=o,{vue_ui_kpi:r}=i.useConfig(),e=t.computed(()=>d.useNestedProp({userConfig:a.config,defaultConfig:r})),v=t.ref((typeof a.dataset=="number",a.dataset)),u=t.ref(e.value.useAnimation?e.value.animationValueStart:v.value);return t.onMounted(()=>{const l=e.value.animationFrames,n=a.dataset/l;function s(){u.value+=n,u.value<a.dataset?requestAnimationFrame(s):u.value=a.dataset}e.value.useAnimation&&(u.value=0,s())}),(l,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:t.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[t.createElementVNode("div",{class:t.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:t.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[t.renderSlot(l.$slots,"title",{comment:o.dataset}),t.createTextVNode(" "+t.toDisplayString(e.value.title),1)],6),t.renderSlot(l.$slots,"comment-before",{comment:o.dataset}),t.createElementVNode("div",{class:t.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:t.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[t.renderSlot(l.$slots,"value",{comment:o.dataset}),t.createTextVNode(" "+t.toDisplayString(t.unref(i.dataLabel)({p:e.value.prefix,v:u.value,s:e.value.suffix,r:e.value.valueRounding})),1)],6),t.renderSlot(l.$slots,"comment-after",{comment:o.dataset})],6))}};exports.default=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),d=require("./useNestedProp-Dikfncsl.cjs"),i=require("./index-BDKEFvEF.cjs"),m={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(o){const a=o,{vue_ui_kpi:r}=i.useConfig(),e=t.computed(()=>d.useNestedProp({userConfig:a.config,defaultConfig:r})),v=t.ref((typeof a.dataset=="number",a.dataset)),u=t.ref(e.value.useAnimation?e.value.animationValueStart:v.value);return t.onMounted(()=>{const l=e.value.animationFrames,n=a.dataset/l;function s(){u.value+=n,u.value<a.dataset?requestAnimationFrame(s):u.value=a.dataset}e.value.useAnimation&&(u.value=0,s())}),(l,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:t.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[t.createElementVNode("div",{class:t.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:t.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[t.renderSlot(l.$slots,"title",{comment:o.dataset}),t.createTextVNode(" "+t.toDisplayString(e.value.title),1)],6),t.renderSlot(l.$slots,"comment-before",{comment:o.dataset}),t.createElementVNode("div",{class:t.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:t.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[t.renderSlot(l.$slots,"value",{comment:o.dataset}),t.createTextVNode(" "+t.toDisplayString(t.unref(i.dataLabel)({p:e.value.prefix,v:u.value,s:e.value.suffix,r:e.value.valueRounding})),1)],6),t.renderSlot(l.$slots,"comment-after",{comment:o.dataset})],6))}};exports.default=m;
@@ -1,6 +1,6 @@
1
1
  import { computed as p, ref as r, onMounted as y, openBlock as C, createElementBlock as g, normalizeClass as s, normalizeStyle as n, createElementVNode as m, renderSlot as u, createTextVNode as f, toDisplayString as d, unref as k } from "vue";
2
- import { u as F } from "./useNestedProp-hi25rRoY.js";
3
- import { u as b, f as N } from "./index-BK818aZo.js";
2
+ import { u as F } from "./useNestedProp-Da77DnaA.js";
3
+ import { u as b, f as N } from "./index-ByO3Ywek.js";
4
4
  const A = {
5
5
  __name: "vue-ui-kpi",
6
6
  props: {
@@ -1,6 +1,6 @@
1
1
  import { useCssVars as h, computed as r, ref as f, openBlock as n, createElementBlock as u, unref as M, createElementVNode as t, normalizeStyle as l, createCommentVNode as a } from "vue";
2
- import { u as m } from "./useNestedProp-hi25rRoY.js";
3
- import { u as y, X as L } from "./index-BK818aZo.js";
2
+ import { u as m } from "./useNestedProp-Da77DnaA.js";
3
+ import { u as y, X as L } from "./index-ByO3Ywek.js";
4
4
  import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
6
6
  __name: "vue-ui-mini-loader",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-C_EQ-Kxy.cjs"),n=require("./index-Xau3hcRk.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-Dikfncsl.cjs"),n=require("./index-BDKEFvEF.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;