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.
- package/dist/{Arrow-f4c5AEIv.cjs → Arrow-CAMiXnML.cjs} +1 -1
- package/dist/{Arrow-BO8QA2_F.js → Arrow-D9RknCbe.js} +1 -1
- package/dist/{BaseIcon-BGeIE3vn.cjs → BaseIcon-5MAyZTOz.cjs} +1 -1
- package/dist/{BaseIcon-NaAlKaAM.js → BaseIcon-DB1g9sdS.js} +1 -1
- package/dist/{DataTable-R7hmQ0wl.js → DataTable-Bza1ed62.js} +2 -2
- package/dist/{DataTable-CXkMZ3ja.cjs → DataTable-CGX9xKvm.cjs} +1 -1
- package/dist/{Legend-VoYDt_v5.cjs → Legend-BEMGbN0s.cjs} +1 -1
- package/dist/{Legend-BKBuWgj8.js → Legend-C4cCpb4z.js} +1 -1
- package/dist/{Shape-DH2ovwu7.cjs → Shape-BTzik3V0.cjs} +1 -1
- package/dist/{Shape-CCI8C_dI.js → Shape-Bttb-v8s.js} +1 -1
- package/dist/{Slicer-CPQW_sm_.cjs → Slicer-CuwuufTu.cjs} +1 -1
- package/dist/{Slicer-C1zx1qMy.js → Slicer-WyjxXfiD.js} +1 -1
- package/dist/{Title-DJ269q6H.js → Title-BSpLzDC1.js} +1 -1
- package/dist/{Title-gCBF7AU7.cjs → Title-XRMcJkna.cjs} +1 -1
- package/dist/{Tooltip-Qv4VexrA.cjs → Tooltip-COgv-iii.cjs} +1 -1
- package/dist/{Tooltip-CKKSlbSq.js → Tooltip-DI8_Wjjy.js} +1 -1
- package/dist/{index-Xau3hcRk.cjs → index-BDKEFvEF.cjs} +1 -1
- package/dist/{index-BK818aZo.js → index-ByO3Ywek.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +3 -2
- package/dist/types/vue-data-ui.d.ts +3 -2
- package/dist/{useNestedProp-hi25rRoY.js → useNestedProp-Da77DnaA.js} +1 -1
- package/dist/{useNestedProp-C_EQ-Kxy.cjs → useNestedProp-Dikfncsl.cjs} +1 -1
- package/dist/{usePrinter-C-2KAW2f.js → usePrinter-Dda5FBG3.js} +1 -1
- package/dist/{usePrinter-Dhvmhwhf.cjs → usePrinter-DedM_6px.cjs} +1 -1
- package/dist/{vue-data-ui-ifINAh05.cjs → vue-data-ui-CV6BvTv3.cjs} +1 -1
- package/dist/{vue-data-ui-DPu_2hNJ.js → vue-data-ui-Cl7hqjOh.js} +55 -55
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DPqaPUTZ.cjs → vue-ui-3d-bar-DMek7e52.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-BaR6gHYb.js → vue-ui-3d-bar-DoFgj58m.js} +7 -7
- package/dist/{vue-ui-accordion-BjU8im6m.cjs → vue-ui-accordion-BytUYLYl.cjs} +1 -1
- package/dist/{vue-ui-accordion-CH8K6f6J.js → vue-ui-accordion-CbKHVPHh.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CDotLSiv.js → vue-ui-age-pyramid-CZy4Y3uw.js} +8 -8
- package/dist/{vue-ui-age-pyramid-Dt9ILoAz.cjs → vue-ui-age-pyramid-DjlXDjMI.cjs} +1 -1
- package/dist/{vue-ui-annotator-C2bmdjLc.cjs → vue-ui-annotator-BJShyHMc.cjs} +1 -1
- package/dist/{vue-ui-annotator-CoH_aFJm.js → vue-ui-annotator-BqG8z2Ms.js} +1 -1
- package/dist/{vue-ui-candlestick-C5SjZVYs.cjs → vue-ui-candlestick-DJETMuli.cjs} +1 -1
- package/dist/{vue-ui-candlestick-G_90YTDo.js → vue-ui-candlestick-DkOQM3qu.js} +9 -9
- package/dist/{vue-ui-carousel-table-CptU7uki.cjs → vue-ui-carousel-table-BQipTTWP.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DzxLQOiB.js → vue-ui-carousel-table-C2vcNP0X.js} +4 -4
- package/dist/{vue-ui-chestnut-Cj5fJhR5.js → vue-ui-chestnut-D39qozSK.js} +6 -6
- package/dist/{vue-ui-chestnut-D8RaQMzo.cjs → vue-ui-chestnut-D3FtT3JK.cjs} +1 -1
- package/dist/{vue-ui-cursor-pZEn4NtN.cjs → vue-ui-cursor-CpJO5mEd.cjs} +1 -1
- package/dist/{vue-ui-cursor-G8ixOooh.js → vue-ui-cursor-LMFBAzPM.js} +2 -2
- package/dist/{vue-ui-dashboard-C46M9Oob.cjs → vue-ui-dashboard-BzOic-SZ.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CaMDg3iT.js → vue-ui-dashboard-C-LaI61T.js} +2 -2
- package/dist/{vue-ui-digits-CXTC7Ypr.js → vue-ui-digits-BMoM0DwG.js} +2 -2
- package/dist/{vue-ui-digits-BnzhiKJT.cjs → vue-ui-digits-D2XilsJW.cjs} +1 -1
- package/dist/{vue-ui-donut-De--4Msd.cjs → vue-ui-donut-BYacXuN1.cjs} +1 -1
- package/dist/{vue-ui-donut-Caan2HEG.js → vue-ui-donut-DvESP2fh.js} +9 -9
- package/dist/{vue-ui-donut-evolution-CUV7vE4C.js → vue-ui-donut-evolution-Dr1MkSB2.js} +9 -9
- package/dist/{vue-ui-donut-evolution-DwPXJh13.cjs → vue-ui-donut-evolution-DwhuTpBB.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BzqRvxE9.cjs → vue-ui-dumbbell-CzYf1Etr.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-2D7NAlDu.js → vue-ui-dumbbell-kTZ4cbhw.js} +8 -8
- package/dist/{vue-ui-flow-CSlnKCEh.cjs → vue-ui-flow-BJbCaSJI.cjs} +1 -1
- package/dist/{vue-ui-flow-DsqenwU_.js → vue-ui-flow-BkSTX5_A.js} +7 -7
- package/dist/{vue-ui-galaxy-WwvhRAFa.cjs → vue-ui-galaxy-Bb-A8wCU.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CLXeRR9E.js → vue-ui-galaxy-DiKAWRBN.js} +9 -9
- package/dist/{vue-ui-gauge-zoUBHBL2.js → vue-ui-gauge-Dt6Cuuo0.js} +4 -4
- package/dist/{vue-ui-gauge-B_5_uMiG.cjs → vue-ui-gauge-DvYBrZs4.cjs} +1 -1
- package/dist/{vue-ui-heatmap-D-oq-QFJ.js → vue-ui-heatmap-B9B0h5N8.js} +8 -8
- package/dist/{vue-ui-heatmap-Gv6Y0025.cjs → vue-ui-heatmap-KHa42VW8.cjs} +1 -1
- package/dist/{vue-ui-kpi-Bgxu139K.cjs → vue-ui-kpi-BfqVRF0H.cjs} +1 -1
- package/dist/{vue-ui-kpi-CE3UnfLM.js → vue-ui-kpi-Bts4qzfH.js} +2 -2
- package/dist/{vue-ui-mini-loader-Fap6KDDb.js → vue-ui-mini-loader-CZtaTr-s.js} +2 -2
- package/dist/{vue-ui-mini-loader-KFiTgq0Z.cjs → vue-ui-mini-loader-DdlM_ms1.cjs} +1 -1
- package/dist/{vue-ui-molecule-CaKXLDG3.cjs → vue-ui-molecule-Cey5Cuqp.cjs} +1 -1
- package/dist/{vue-ui-molecule-QMshD0fQ.js → vue-ui-molecule-Y29DXzD8.js} +9 -9
- package/dist/{vue-ui-mood-radar-BFKJ6-wI.cjs → vue-ui-mood-radar-BGQYx51N.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-woI18vdU.js → vue-ui-mood-radar-CaXsxM2P.js} +9 -9
- package/dist/{vue-ui-nested-donuts-BH8pGgVI.js → vue-ui-nested-donuts-8aIjfQHr.js} +9 -9
- package/dist/{vue-ui-nested-donuts-Nb5Jg_SG.cjs → vue-ui-nested-donuts-B0OSKK4x.cjs} +1 -1
- package/dist/{vue-ui-onion-bofmS_kO.js → vue-ui-onion-BuM5DcbA.js} +9 -9
- package/dist/{vue-ui-onion-BBYwZtjh.cjs → vue-ui-onion-D8Ug2z_r.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DVW0LYp7.js → vue-ui-parallel-coordinate-plot-BnylgPQ1.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-C-ZbQgN7.cjs → vue-ui-parallel-coordinate-plot-RAjWALxs.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DFMVk5eC.cjs → vue-ui-quadrant-Bd9XzzOJ.cjs} +1 -1
- package/dist/{vue-ui-quadrant-fhx9NkrR.js → vue-ui-quadrant-DpUSb39t.js} +10 -10
- package/dist/{vue-ui-quick-chart-S6LEQLn7.cjs → vue-ui-quick-chart-7dYq_RGE.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-5rggkq9-.js → vue-ui-quick-chart-CMkvhuhW.js} +6 -6
- package/dist/{vue-ui-radar-B8RvpBi-.js → vue-ui-radar-BlHTPxa4.js} +10 -10
- package/dist/{vue-ui-radar-CsR9V_Sl.cjs → vue-ui-radar-DVFyhzLg.cjs} +1 -1
- package/dist/{vue-ui-rating-CgzLPjlb.cjs → vue-ui-rating-DRncGN96.cjs} +1 -1
- package/dist/{vue-ui-rating-ClQkygLG.js → vue-ui-rating-cVAVmnzB.js} +2 -2
- package/dist/{vue-ui-relation-circle-B2hJDB7v.js → vue-ui-relation-circle-B8iBDo0q.js} +5 -5
- package/dist/{vue-ui-relation-circle-D0zllKLp.cjs → vue-ui-relation-circle-C8QjpkXl.cjs} +1 -1
- package/dist/{vue-ui-rings-D3nNsoiU.js → vue-ui-rings-CQq3JQNk.js} +9 -9
- package/dist/{vue-ui-rings-CLIeS7BN.cjs → vue-ui-rings-m4MWlNsq.cjs} +1 -1
- package/dist/{vue-ui-scatter-DitnL-sZ.js → vue-ui-scatter-C-Egs7S_.js} +10 -10
- package/dist/{vue-ui-scatter-bPAA5OYI.cjs → vue-ui-scatter-mNEnBtaf.cjs} +1 -1
- package/dist/{vue-ui-screenshot-C-uHRqZ7.cjs → vue-ui-screenshot-Bl9jX-C2.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DayBW_7b.js → vue-ui-screenshot-DfHSBG7u.js} +1 -1
- package/dist/{vue-ui-skeleton-DJtTdfNg.js → vue-ui-skeleton-BxRSQeuo.js} +2 -2
- package/dist/{vue-ui-skeleton-CgYrDrh-.cjs → vue-ui-skeleton-rY_nZhMQ.cjs} +1 -1
- package/dist/{vue-ui-smiley-CvpPFDBL.cjs → vue-ui-smiley-BWTx88Vc.cjs} +1 -1
- package/dist/{vue-ui-smiley-CZTyxQvT.js → vue-ui-smiley-J5ng6jFT.js} +2 -2
- package/dist/{vue-ui-spark-trend-DZm9J_ZI.cjs → vue-ui-spark-trend-CKllSCO9.cjs} +1 -1
- package/dist/{vue-ui-spark-trend--aNEsQNW.js → vue-ui-spark-trend-CSgSKyhQ.js} +4 -4
- package/dist/{vue-ui-sparkbar-uvq7AcMr.js → vue-ui-sparkbar-BDSuCvBs.js} +54 -47
- package/dist/{vue-ui-sparkbar-C43IyepC.cjs → vue-ui-sparkbar-wLasc_jU.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BP11yMVn.cjs → vue-ui-sparkgauge-DLf9qwso.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-V1zC6qrt.js → vue-ui-sparkgauge-DsKCi2rC.js} +3 -3
- package/dist/vue-ui-sparkhistogram-BY9WjI96.js +261 -0
- package/dist/vue-ui-sparkhistogram-D3xFCR7z.cjs +1 -0
- package/dist/{vue-ui-sparkline-C3C9heBc.cjs → vue-ui-sparkline-BhB4gTda.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DOAhQCt5.js → vue-ui-sparkline-D8gMceMV.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-ObA64D3E.js → vue-ui-sparkstackbar-8ap_HMW0.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-Bk7nIBnD.cjs → vue-ui-sparkstackbar-dINlqLlM.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-6eenEjje.js → vue-ui-strip-plot-Duu9jsML.js} +9 -9
- package/dist/{vue-ui-strip-plot-CffrlZCk.cjs → vue-ui-strip-plot-wUXpoWOD.cjs} +1 -1
- package/dist/{vue-ui-table-BbMFv-oU.js → vue-ui-table-Bbjo6d7J.js} +1 -1
- package/dist/{vue-ui-table-CzAWebM5.cjs → vue-ui-table-DPBuQHl9.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CR4Z6gFJ.cjs → vue-ui-table-heatmap-BWUGw4tD.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-B9YVKhvr.js → vue-ui-table-heatmap-CokrixjX.js} +4 -4
- package/dist/{vue-ui-table-sparkline-D7b-hkZg.js → vue-ui-table-sparkline-B4f74K6D.js} +5 -5
- package/dist/{vue-ui-table-sparkline-BZdfmaoe.cjs → vue-ui-table-sparkline-DwStFsdv.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CfGfCzz9.js → vue-ui-thermometer-Bvw08auw.js} +5 -5
- package/dist/{vue-ui-thermometer-DJw8iKSK.cjs → vue-ui-thermometer-D4lvsaZQ.cjs} +1 -1
- package/dist/{vue-ui-timer-DjSR1opQ.cjs → vue-ui-timer-BSU22BD2.cjs} +1 -1
- package/dist/{vue-ui-timer-PdZYURw6.js → vue-ui-timer-C6zSHO_W.js} +4 -4
- package/dist/{vue-ui-tiremarks-9o6eS1Mc.js → vue-ui-tiremarks-BY4m2mEn.js} +5 -5
- package/dist/{vue-ui-tiremarks-DmQpv3n0.cjs → vue-ui-tiremarks-CH0_xCoD.cjs} +1 -1
- package/dist/{vue-ui-treemap-BQlEP4Wi.cjs → vue-ui-treemap-DIxqUkmn.cjs} +1 -1
- package/dist/{vue-ui-treemap-hdJRrv6w.js → vue-ui-treemap-DWBXR_CR.js} +9 -9
- package/dist/{vue-ui-vertical-bar-BRhV9I7i.js → vue-ui-vertical-bar-BxvhqgWg.js} +9 -9
- package/dist/{vue-ui-vertical-bar-CXn4FfOg.cjs → vue-ui-vertical-bar-DnPmmj4p.cjs} +1 -1
- package/dist/{vue-ui-waffle-CXyoderQ.js → vue-ui-waffle-BlFjCDDx.js} +9 -9
- package/dist/{vue-ui-waffle-CjAIw38i.cjs → vue-ui-waffle-CYpc5Enk.cjs} +1 -1
- package/dist/{vue-ui-wheel-BU_90Fhv.js → vue-ui-wheel-CHvx9zQF.js} +5 -5
- package/dist/{vue-ui-wheel-DLj-V4jn.cjs → vue-ui-wheel-WxC0_YV_.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DQ72J4Ro.js → vue-ui-word-cloud-BnLAMza-.js} +6 -6
- package/dist/{vue-ui-word-cloud-CtBamLvE.cjs → vue-ui-word-cloud-LMl5vudk.cjs} +1 -1
- package/dist/{vue-ui-xy-Bz15K-CC.cjs → vue-ui-xy-DHzwqXVf.cjs} +1 -1
- package/dist/{vue-ui-xy-DYEsmppC.js → vue-ui-xy-DStN5sP4.js} +12 -12
- package/dist/{vue-ui-xy-canvas-BRWp_v0p.js → vue-ui-xy-canvas-D3zCvIfh.js} +10 -10
- package/dist/{vue-ui-xy-canvas-DLN-ipCw.cjs → vue-ui-xy-canvas-DTjWEsfN.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-sparkhistogram-BIUsoRQJ.js +0 -244
- 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"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BDKEFvEF.cjs"),C=require("./useNestedProp-Dikfncsl.cjs"),P=require("./usePrinter-DedM_6px.cjs"),z=require("./Shape-BTzik3V0.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),O=["id"],T={role:"cell"},M={role:"row"},G=["data-cell"],q={key:0,style:{display:"flex","flex-direction":"row",gap:"2px","align-items":"center"}},U=["height","width"],L={key:0,role:"cell","data-cell":"sum"},A={key:1,role:"cell","data-cell":"average"},D={key:2,role:"cell","data-cell":"median"},H={__name:"vue-ui-table-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(_,{expose:B}){const d=_;e.useCssVars(t=>({bb8dc4a0:V.value,"44bd448b":S.value}));const{vue_ui_table_heatmap:I}=r.useConfig(),p=e.ref(r.createUid()),s=e.ref(!1),c=e.ref(null),m=e.ref(!1),v=e.ref(0),o=e.computed(()=>{const t=C.useNestedProp({userConfig:d.config,defaultConfig:I});return t.theme?{...C.useNestedProp({userConfig:r.themes.vue_ui_table_heatmap[t.theme]||d.config,defaultConfig:t})}:t}),{isPrinting:$,isImaging:N,generatePdf:f,generateImage:g}=P.usePrinter({elementId:`table_heatmap_${p.value}`,fileName:"vue-ui-table-heatmap"}),x=e.computed(()=>o.value.table.responsiveBreakpoint),E=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)&&r.error({componentName:"VueUiTableHeatmap",type:"dataset"});const t=new ResizeObserver(l=>{l.forEach(a=>{s.value=a.contentRect.width<x.value})});c.value&&t.observe(c.value)});const h=e.computed(()=>d.dataset.map(t=>{const l=t.values.map(n=>isNaN(n)?0:n),a=l.reduce((n,i)=>n+i,0);return{...t,values:l,serieExtremes:{max:Math.max(...l),min:Math.min(...l)},sum:a,average:a/l.length,median:r.calcMedian(l),displayValues:[t.name,...t.values],id:r.createUid()}})),b=e.computed(()=>{const t=h.value.flatMap(l=>l.values);return{min:Math.min(...t),max:Math.max(...t)}});function w(t,l){const a=o.value.style.heatmapColors.useIndividualScale;return r.interpolateColorHex(o.value.style.heatmapColors.min,o.value.style.heatmapColors.max,a?l.min:b.value.min,a?l.max:b.value.max,t)}const y=e.computed(()=>h.value.map(t=>({...t,colors:t.displayValues.map(l=>isNaN(l)?o.value.style.backgroundColor:w(l,t.serieExtremes))}))),S=e.computed(()=>o.value.style.backgroundColor),V=e.computed(()=>`${o.value.table.borderWidth}px`);function k(){e.nextTick(()=>{const t=y.value.map(n=>[[n.name],n.displayValues,[n.sum],[n.average],[n.median]]),l=[[[""],o.value.table.head.values,["sum"],["average"],["median"]]].concat(t),a=r.createCsvContent(l);r.downloadCsv({csvContent:a,title:"vue-ui-table-heatmap"})})}function F(t){m.value=t,v.value+=1}return B({generatePdf:f,generateCsv:k,generateImage:g}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:c,style:e.normalizeStyle(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${o.value.userOptions.show?"36px":""}; ${m.value?"vue-data-ui-wrapper-fullscreen":""}; position:relative;`),class:e.normalizeClass({"vue-ui-responsive":s.value}),id:`table_heatmap_${p.value}`},[o.value.userOptions.show&&E.value?(e.openBlock(),e.createBlock(P.UserOptions,{ref:"details",key:`user_option_${v.value}`,backgroundColor:o.value.style.backgroundColor,color:o.value.style.color,isPrinting:e.unref($),isImaging:e.unref(N),uid:p.value,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasFullscreen:o.value.userOptions.buttons.fullscreen,isFullscreen:m.value,titles:{...o.value.userOptions.buttonTitles},chartElement:c.value,onToggleFullscreen:F,onGeneratePdf:e.unref(f),onGenerateCsv:k,onGenerateImage:e.unref(g)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),e.createElementVNode("table",{class:e.normalizeClass({"vue-ui-table-heatmap":!0}),style:e.normalizeStyle(`width:100%;font-family:${o.value.style.fontFamily};background:${o.value.style.backgroundColor};`)},[e.createElementVNode("caption",null,[e.renderSlot(t.$slots,"caption",{},void 0,!0)]),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${o.value.table.head.backgroundColor};color:${o.value.table.head.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.table.head.values,(a,n)=>(e.openBlock(),e.createElementBlock("th",T,[e.renderSlot(t.$slots,"head",e.normalizeProps(e.guardReactiveProps({value:a,rowIndex:n,type:typeof a,isResponsive:s.value})),void 0,!0)]))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,n)=>(e.openBlock(),e.createElementBlock("tr",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.displayValues,(i,u)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":o.value.table.head.values[u]},[a.color&&u===0?(e.openBlock(),e.createElementBlock("div",q,[a.color?(e.openBlock(),e.createElementBlock("svg",{key:0,height:o.value.style.shapeSize,width:o.value.style.shapeSize,viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},[e.createVNode(z._sfc_main,{plot:{x:10,y:10},color:a.color,radius:9,shape:a.shape||"circle"},null,8,["color","shape"])],8,U)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"rowTitle",e.normalizeProps(e.guardReactiveProps({value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value})),void 0,!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u===0?e.renderSlot(t.$slots,"rowTitle",e.normalizeProps(e.mergeProps({key:0},{value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value})),void 0,!0):e.createCommentVNode("",!0),u>0?e.renderSlot(t.$slots,"cell",e.normalizeProps(e.mergeProps({key:1},{value:i,rowIndex:n,colIndex:u,type:typeof i,isResponsive:s.value,color:a.colors[u],textColor:e.unref(r.adaptColorToBackground)(a.colors[u])})),void 0,!0):e.createCommentVNode("",!0)],64))],8,G))),256)),o.value.table.showSum?(e.openBlock(),e.createElementBlock("td",L,[e.renderSlot(t.$slots,"sum",e.normalizeProps(e.guardReactiveProps({value:a.sum,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showAverage?(e.openBlock(),e.createElementBlock("td",A,[e.renderSlot(t.$slots,"average",e.normalizeProps(e.guardReactiveProps({value:a.average,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0),o.value.table.showMedian?(e.openBlock(),e.createElementBlock("td",D,[e.renderSlot(t.$slots,"median",e.normalizeProps(e.guardReactiveProps({value:a.median,rowIndex:n,isResponsive:s.value})),void 0,!0)])):e.createCommentVNode("",!0)]))),256))])],4)],14,O))}},X=R._export_sfc(H,[["__scopeId","data-v-3d431bc6"]]);exports.default=X;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCssVars as Q, ref as h, computed as c, onMounted as J, openBlock as n, createElementBlock as l, normalizeStyle as $, normalizeClass as V, createBlock as K, unref as g, createSlots as Y, withCtx as C, renderSlot as r, normalizeProps as v, guardReactiveProps as f, createCommentVNode as p, createElementVNode as b, Fragment as _, renderList as w, createVNode as Z, mergeProps as z, nextTick as j } from "vue";
|
|
2
|
-
import { u as ee, c as E, t as te, o as ae, e as oe, Q as se, C as ne, H as le, n as re, q as ue } from "./index-
|
|
3
|
-
import { u as M } from "./useNestedProp-
|
|
4
|
-
import { u as ie, U as de } from "./usePrinter-
|
|
5
|
-
import { _ as ce } from "./Shape-
|
|
2
|
+
import { u as ee, c as E, t as te, o as ae, e as oe, Q as se, C as ne, H as le, n as re, q as ue } from "./index-ByO3Ywek.js";
|
|
3
|
+
import { u as M } from "./useNestedProp-Da77DnaA.js";
|
|
4
|
+
import { u as ie, U as de } from "./usePrinter-Dda5FBG3.js";
|
|
5
|
+
import { _ as ce } from "./Shape-Bttb-v8s.js";
|
|
6
6
|
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell"], ge = {
|
|
8
8
|
key: 0,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as se, ref as i, computed as p, onMounted as ue, openBlock as u, createElementBlock as d, normalizeClass as N, createElementVNode as v, normalizeStyle as r, toDisplayString as b, createCommentVNode as m, Fragment as O, renderList as W, createBlock as T, unref as k, createSlots as re, withCtx as A, renderSlot as I, normalizeProps as ie, guardReactiveProps as de, nextTick as ve } from "vue";
|
|
2
|
-
import { u as ce, c as be, t as fe, a as pe, p as w, b as me, o as ge, e as q, g as he, d as ye, Q as _e, n as ke, q as xe } from "./index-
|
|
3
|
-
import { u as X } from "./useNestedProp-
|
|
4
|
-
import Ce from "./vue-ui-sparkline-
|
|
5
|
-
import Se from "./BaseIcon-
|
|
6
|
-
import { u as Ae, U as Ie } from "./usePrinter-
|
|
2
|
+
import { u as ce, c as be, t as fe, a as pe, p as w, b as me, o as ge, e as q, g as he, d as ye, Q as _e, n as ke, q as xe } from "./index-ByO3Ywek.js";
|
|
3
|
+
import { u as X } from "./useNestedProp-Da77DnaA.js";
|
|
4
|
+
import Ce from "./vue-ui-sparkline-D8gMceMV.js";
|
|
5
|
+
import Se from "./BaseIcon-DB1g9sdS.js";
|
|
6
|
+
import { u as Ae, U as Ie } from "./usePrinter-Dda5FBG3.js";
|
|
7
7
|
import { _ as we } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const $e = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } }, Pe = ["onClick"], ze = { style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center" } }, Ne = ["data-cell"], Oe = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "6px" } }, We = ["data-cell", "onPointerenter"], Te = ["data-cell"], De = ["data-cell"], Me = ["data-cell"], Ve = ["data-cell"], Ee = {
|
|
9
9
|
__name: "vue-ui-table-sparkline",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Xau3hcRk.cjs"),V=require("./useNestedProp-C_EQ-Kxy.cjs"),H=require("./vue-ui-sparkline-C3C9heBc.cjs"),X=require("./BaseIcon-BGeIE3vn.cjs"),P=require("./usePrinter-Dhvmhwhf.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q={style:{"z-index":"1","padding-right":"24px"}},Y=["onClick"],Z={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},j=["data-cell"],ee={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},te=["data-cell","onPointerenter"],le=["data-cell"],oe=["data-cell"],ae=["data-cell"],ne=["data-cell"],re={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup($,{expose:F}){const v=$;e.useCssVars(l=>({"2af6bd52":l.tdo}));const{vue_ui_table_sparkline:D}=s.useConfig(),y=e.ref(s.createUid()),S=e.ref(0),x=e.ref(0),t=e.computed(()=>{const l=V.useNestedProp({userConfig:v.config,defaultConfig:D});return l.theme?{...V.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||v.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:C,isImaging:N,generatePdf:z,generateImage:w}=P.usePrinter({elementId:`table_${y.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),O=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),f=e.ref(null),B=e.ref(!1),W=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{s.objectIsEmpty(v.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(r=>{r.forEach(o=>{B.value=o.contentRect.width<W.value})});f.value&&l.observe(f.value)});const A=e.computed(()=>(v.dataset.forEach((l,r)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:o,index:r})})}),v.dataset.map((l,r)=>{const o=(l.values||[]).map(n=>isNaN(n)?0:n??0),u=o.reduce((n,a)=>n+a,0);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||O.value[r]||s.palette[r]||s.palette[r%s.palette.length],sum:u,average:u/o.length,median:s.calcMedian(o),sparklineDataset:o.map((n,a)=>({period:t.value.colNames[a]||`col ${a}`,value:n||0}))}})));function T(l){const o=(l[0].values||[]).map((n,a)=>l.map(i=>i.values[a]||[])).map(n=>n.map((a,i)=>[a,i]).sort((a,i)=>i[0]-a[0]).map(a=>a[1]));return l.map((n,a)=>({...n,values:n.values||[],orders:o[a]}))}const m=e.computed(()=>T(A.value)),g=e.ref(m.value),M=e.computed(()=>Math.max(...g.value.map(l=>(l.values||[]).length))),b=e.ref(void 0),k=e.ref(!1),h=e.ref(void 0),_=e.ref(-1);function L(){k.value=!1,h.value=void 0,_.value=-1,g.value=m.value}function G(l){k.value=!0,h.value=l;const r=m.value.map(a=>a.values[l]||[]),o=b.value===l?1:-1;_.value=o,l===b.value?b.value=void 0:b.value=l;const n=r.map((a,i)=>[i,a]).sort((a,i)=>o*(i[1]-a[1])).map(a=>a[0]).map(a=>m.value[a]);g.value=n,x.value+=1}const q=e.computed(()=>Math.max(...v.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let o=0;o<q.value;o+=1)l.push(`col ${o+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let r;return t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?r=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.median]:r=l,t.value.showSparklines?[...r,t.value.translations.chart]:r}),d=e.ref(void 0),c=e.ref(void 0);function R({dataIndex:l,serieIndex:r}){d.value=l,c.value=r}const E=e.ref(!1);function U(l){E.value=l,S.value+=1}function I(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),r=A.value.map((n,a)=>[[n.name],n.values,[n.sum],[n.average],[n.median]]),o=[l].concat(r),u=s.createCsvContent(o);s.downloadCsv({csvContent:u,title:t.value.title.text||"vue-ui-table-sparkline"})})}return F({generatePdf:z,generateImage:w,generateCsv:I,restoreOrder:L}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:f,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${y.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:r[0]||(r[0]=o=>{c.value=void 0,d.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",Q,[e.createElementVNode("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,u)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:u===p.value.length-1?"150px":"",cursor:m.value[0].values[u]!==void 0?"pointer":"default"}),onClick:()=>G(u),class:e.normalizeClass({"sticky-col":u===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(o),1),k.value&&u===h.value&&m.value[0].values[u]!==void 0?(e.openBlock(),e.createBlock(X.default,{key:0,size:18,name:_.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&u===p.value.length-1?(e.openBlock(),e.createBlock(P.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${S.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(C),isImaging:e.unref(N),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:E.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,onToggleFullscreen:U,onGeneratePdf:e.unref(z),onGenerateImage:e.unref(w),onGenerateCsv:I},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:a})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,Y))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,u)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":u%2===0,"vue-ui-data-table__tbody__row-odd":u%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",ee,[e.createElementVNode("span",{style:e.normalizeStyle({color:o.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(o.name??"-"),1)])],12,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(n,a)=>(e.openBlock(),e.createElementBlock("td",{role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?`${o.color}33`:"",borderRadius:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?"3px":""}),"data-cell":p.value[a],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{c.value=u,d.value=a}},e.toDisplayString([null,void 0].includes(o.values[a])?"-":Number(o.values[a].toFixed(t.value.roundingValues)).toLocaleString()),45,te))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.sum.toFixed(t.value.roundingTotal)).toLocaleString()),13,le)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.average.toFixed(t.value.roundingAverage)).toLocaleString()),13,oe)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.median.toFixed(t.value.roundingMedian)).toLocaleString()),13,ae)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(H.default,{key:`sparkline_${u}_${x.value}`,onHoverIndex:({index:n})=>R({dataIndex:n,serieIndex:u}),dataset:o.sparklineDataset,showInfo:!1,selectedIndex:d.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(C)&&!e.unref(N),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:o.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:o.color},area:{color:o.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:o.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ne)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,K))}},ue=J._export_sfc(re,[["__scopeId","data-v-3af92d54"]]);exports.default=ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BDKEFvEF.cjs"),V=require("./useNestedProp-Dikfncsl.cjs"),H=require("./vue-ui-sparkline-BhB4gTda.cjs"),X=require("./BaseIcon-5MAyZTOz.cjs"),P=require("./usePrinter-DedM_6px.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q={style:{"z-index":"1","padding-right":"24px"}},Y=["onClick"],Z={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},j=["data-cell"],ee={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},te=["data-cell","onPointerenter"],le=["data-cell"],oe=["data-cell"],ae=["data-cell"],ne=["data-cell"],re={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup($,{expose:F}){const v=$;e.useCssVars(l=>({"2af6bd52":l.tdo}));const{vue_ui_table_sparkline:D}=s.useConfig(),y=e.ref(s.createUid()),S=e.ref(0),x=e.ref(0),t=e.computed(()=>{const l=V.useNestedProp({userConfig:v.config,defaultConfig:D});return l.theme?{...V.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||v.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:C,isImaging:N,generatePdf:z,generateImage:w}=P.usePrinter({elementId:`table_${y.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),O=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),f=e.ref(null),B=e.ref(!1),W=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{s.objectIsEmpty(v.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(r=>{r.forEach(o=>{B.value=o.contentRect.width<W.value})});f.value&&l.observe(f.value)});const A=e.computed(()=>(v.dataset.forEach((l,r)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:o,index:r})})}),v.dataset.map((l,r)=>{const o=(l.values||[]).map(n=>isNaN(n)?0:n??0),u=o.reduce((n,a)=>n+a,0);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||O.value[r]||s.palette[r]||s.palette[r%s.palette.length],sum:u,average:u/o.length,median:s.calcMedian(o),sparklineDataset:o.map((n,a)=>({period:t.value.colNames[a]||`col ${a}`,value:n||0}))}})));function T(l){const o=(l[0].values||[]).map((n,a)=>l.map(i=>i.values[a]||[])).map(n=>n.map((a,i)=>[a,i]).sort((a,i)=>i[0]-a[0]).map(a=>a[1]));return l.map((n,a)=>({...n,values:n.values||[],orders:o[a]}))}const m=e.computed(()=>T(A.value)),g=e.ref(m.value),M=e.computed(()=>Math.max(...g.value.map(l=>(l.values||[]).length))),b=e.ref(void 0),k=e.ref(!1),h=e.ref(void 0),_=e.ref(-1);function L(){k.value=!1,h.value=void 0,_.value=-1,g.value=m.value}function G(l){k.value=!0,h.value=l;const r=m.value.map(a=>a.values[l]||[]),o=b.value===l?1:-1;_.value=o,l===b.value?b.value=void 0:b.value=l;const n=r.map((a,i)=>[i,a]).sort((a,i)=>o*(i[1]-a[1])).map(a=>a[0]).map(a=>m.value[a]);g.value=n,x.value+=1}const q=e.computed(()=>Math.max(...v.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let o=0;o<q.value;o+=1)l.push(`col ${o+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let r;return t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?r=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?r=[...l,t.value.translations.median]:r=l,t.value.showSparklines?[...r,t.value.translations.chart]:r}),d=e.ref(void 0),c=e.ref(void 0);function R({dataIndex:l,serieIndex:r}){d.value=l,c.value=r}const E=e.ref(!1);function U(l){E.value=l,S.value+=1}function I(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),r=A.value.map((n,a)=>[[n.name],n.values,[n.sum],[n.average],[n.median]]),o=[l].concat(r),u=s.createCsvContent(o);s.downloadCsv({csvContent:u,title:t.value.title.text||"vue-ui-table-sparkline"})})}return F({generatePdf:z,generateImage:w,generateCsv:I,restoreOrder:L}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:f,class:e.normalizeClass({"vue-ui-responsive":B.value}),style:{overflow:"hidden"},id:`table_${y.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:r[0]||(r[0]=o=>{c.value=void 0,d.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",Q,[e.createElementVNode("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,u)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:u===p.value.length-1?"150px":"",cursor:m.value[0].values[u]!==void 0?"pointer":"default"}),onClick:()=>G(u),class:e.normalizeClass({"sticky-col":u===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(o),1),k.value&&u===h.value&&m.value[0].values[u]!==void 0?(e.openBlock(),e.createBlock(X.default,{key:0,size:18,name:_.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&u===p.value.length-1?(e.openBlock(),e.createBlock(P.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${S.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(C),isImaging:e.unref(N),uid:y.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:E.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,onToggleFullscreen:U,onGeneratePdf:e.unref(z),onGenerateImage:e.unref(w),onGenerateCsv:I},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:a})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,Y))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,u)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":u%2===0,"vue-ui-data-table__tbody__row-odd":u%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",ee,[e.createElementVNode("span",{style:e.normalizeStyle({color:o.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(o.name??"-"),1)])],12,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(n,a)=>(e.openBlock(),e.createElementBlock("td",{role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?`${o.color}33`:"",borderRadius:d.value!==void 0&&c.value!==void 0&&a===d.value&&c.value===u?"3px":""}),"data-cell":p.value[a],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{c.value=u,d.value=a}},e.toDisplayString([null,void 0].includes(o.values[a])?"-":Number(o.values[a].toFixed(t.value.roundingValues)).toLocaleString()),45,te))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.sum.toFixed(t.value.roundingTotal)).toLocaleString()),13,le)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.average.toFixed(t.value.roundingAverage)).toLocaleString()),13,oe)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(Number(o.median.toFixed(t.value.roundingMedian)).toLocaleString()),13,ae)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(H.default,{key:`sparkline_${u}_${x.value}`,onHoverIndex:({index:n})=>R({dataIndex:n,serieIndex:u}),dataset:o.sparklineDataset,showInfo:!1,selectedIndex:d.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(C)&&!e.unref(N),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:o.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:o.color},area:{color:o.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:o.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","dataset","selectedIndex","config"]))],12,ne)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,K))}},ue=J._export_sfc(re,[["__scopeId","data-v-3af92d54"]]);exports.default=ue;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as re, computed as c, onMounted as ue, ref as p, openBlock as r, createElementBlock as n, normalizeClass as b, normalizeStyle as W, createVNode as ne, createCommentVNode as h, createBlock as E, unref as y, createSlots as ie, withCtx as U, renderSlot as w, normalizeProps as he, guardReactiveProps as ce, createElementVNode as d, Fragment as C, renderList as z, toDisplayString as de } from "vue";
|
|
2
|
-
import { u as ve, o as ye, e as B, g as fe, c as ge, t as me, a as pe, p as k, b as ke, d as $, X as xe, r as _e, f as be } from "./index-
|
|
3
|
-
import { _ as we } from "./Title-
|
|
4
|
-
import { u as Ce, U as $e } from "./usePrinter-
|
|
5
|
-
import Fe from "./vue-ui-skeleton-
|
|
6
|
-
import { u as j } from "./useNestedProp-
|
|
2
|
+
import { u as ve, o as ye, e as B, g as fe, c as ge, t as me, a as pe, p as k, b as ke, d as $, X as xe, r as _e, f as be } from "./index-ByO3Ywek.js";
|
|
3
|
+
import { _ as we } from "./Title-BSpLzDC1.js";
|
|
4
|
+
import { u as Ce, U as $e } from "./usePrinter-Dda5FBG3.js";
|
|
5
|
+
import Fe from "./vue-ui-skeleton-BxRSQeuo.js";
|
|
6
|
+
import { u as j } from "./useNestedProp-Da77DnaA.js";
|
|
7
7
|
import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Ie = ["id"], Ye = {
|
|
9
9
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-Xau3hcRk.cjs"),A=require("./Title-gCBF7AU7.cjs"),F=require("./usePrinter-Dhvmhwhf.cjs"),D=require("./vue-ui-skeleton-CgYrDrh-.cjs"),$=require("./useNestedProp-C_EQ-Kxy.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=["id"],J={key:0,style:"width:100%"},K=["xmlns","viewBox"],Q={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},Z=["fill"],ee=["id"],te=["stop-color"],oe=["stop-color"],le=["stop-color"],re={"clip-path":"url(#vueUiPill)"},ae=["x","y","height","width"],se=["x","y","height","width","fill"],ne=["x1","x2","y1","y2","stroke-width","stroke"],ue=["x1","x2","y1","y2","stroke-width","stroke"],ie=["x1","x2","y1","y2","stroke-width","stroke"],ce=["x1","x2","y1","y2","stroke-width","stroke"],de=["x1","x2","y1","y2","stroke-width","stroke"],he=["x1","x2","y1","y2","stroke-width","stroke"],ve=["x1","x2","y1","y2","stroke-width","stroke"],me=["x1","x2","y1","y2","stroke-width","stroke"],ye=["x","y","height","width"],pe=["y","x","fill","font-size","font-weight"],fe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(b,{expose:P}){const a=b;e.useCssVars(l=>({efcaaea8:U.value,"67dbf562":O.value,bd690a62:M.value}));const{vue_ui_thermometer:I}=s.useConfig(),p=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{s.objectIsEmpty(a.dataset)?s.error({componentName:"VueUiThermometer",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{s.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})});const d=e.ref(s.createUid()),C=e.ref(null),w=e.ref(0),t=e.computed(()=>{const l=$.useNestedProp({userConfig:a.config,defaultConfig:I});return l.theme?{...$.useNestedProp({userConfig:s.themes.vue_ui_thermometer[l.theme]||a.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:q,isImaging:S,generatePdf:B,generateImage:N}=F.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),m=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),T=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>a.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(l,n,o){const u=[],x=E(l),_=E(n);for(let v=0;v<o;v++){const G=f(x.red,_.red,v,o),W=f(x.green,_.green,v,o),H=f(x.blue,_.blue,v,o),j=`#${g(G)}${g(W)}${g(H)}`;u.push(j)}return u}function E(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function f(l,n,o,u){return Math.round(l+(n-l)*o/u)}function g(l){return l.toString(16).padStart(2,"0")}const r=e.computed(()=>{const l=T.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),Y=e.computed(()=>r.value),k=e.computed(()=>{const l=a.dataset.from<0?Math.abs(a.dataset.from):a.dataset.from,n=a.dataset.to<0?Math.abs(a.dataset.to):a.dataset.to;let o=0;return a.dataset.to>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.dataset.from)+a.dataset.value)/o)*(r.value.height-i.value.top-i.value.bottom)}),M=e.computed(()=>`${k.value}px`),O=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),U=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),z=e.computed(()=>{if(a.dataset.colors){if(!a.dataset.colors.from)return y(m.value[0]||s.palette[0],s.convertColorToHex(a.dataset.colors.to),c.value||10);if(!a.dataset.colors.to)return y(s.convertColorToHex(a.dataset.colors.from),m.value[1]||s.palette[1],c.value||10)}else return y(m.value[1]||s.palette[1],m.value[0]||s.palette[0],c.value||10);return y(s.convertColorToHex(a.dataset.colors.from),s.convertColorToHex(a.dataset.colors.to),c.value||10)}),V=e.computed(()=>{const l=[];let n=0;const o=r.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:r.value.left,y:r.value.top+u,qYLess:r.value.top+u+o/c.value/4,halfY:r.value.top+u+o/c.value/2,qYMore:r.value.top+u+o/c.value/4*3,color:z.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function L(l){h.value=l,w.value+=1}return P({generatePdf:B,generateImage:N}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:C,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(A._sfc_main,{config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(F.UserOptions,{ref:"details",key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(S),isPrinting:e.unref(q),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:L,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(N)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor}`)},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Q,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,Z)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,te),e.createElementVNode("stop",{offset:"50%","stop-color":`${o.color}${e.unref(s.opacity)[100-t.value.style.chart.graduations.gradient.intensity]}`},null,8,oe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,le)],8,ee))),256))]),e.createElementVNode("g",re,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,height:r.value.height-i.value.top-i.value.bottom,width:r.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ae),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,se),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ie)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.right,x2:r.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:r.value.left,y:r.value.top,height:k.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,ye)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:k.value+r.value.top+t.value.style.chart.label.fontSize/3,x:r.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.label.prefix,v:b.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding})),11,pe),e.renderSlot(l.$slots,"svg",{svg:Y.value},void 0,!0)],14,K)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:3,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,X))}},ge=R._export_sfc(fe,[["__scopeId","data-v-eef95fe3"]]);exports.default=ge;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BDKEFvEF.cjs"),A=require("./Title-XRMcJkna.cjs"),F=require("./usePrinter-DedM_6px.cjs"),D=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),$=require("./useNestedProp-Dikfncsl.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=["id"],J={key:0,style:"width:100%"},K=["xmlns","viewBox"],Q={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},Z=["fill"],ee=["id"],te=["stop-color"],oe=["stop-color"],le=["stop-color"],re={"clip-path":"url(#vueUiPill)"},ae=["x","y","height","width"],se=["x","y","height","width","fill"],ne=["x1","x2","y1","y2","stroke-width","stroke"],ue=["x1","x2","y1","y2","stroke-width","stroke"],ie=["x1","x2","y1","y2","stroke-width","stroke"],ce=["x1","x2","y1","y2","stroke-width","stroke"],de=["x1","x2","y1","y2","stroke-width","stroke"],he=["x1","x2","y1","y2","stroke-width","stroke"],ve=["x1","x2","y1","y2","stroke-width","stroke"],me=["x1","x2","y1","y2","stroke-width","stroke"],ye=["x","y","height","width"],pe=["y","x","fill","font-size","font-weight"],fe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(b,{expose:P}){const a=b;e.useCssVars(l=>({efcaaea8:U.value,"67dbf562":O.value,bd690a62:M.value}));const{vue_ui_thermometer:I}=s.useConfig(),p=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{s.objectIsEmpty(a.dataset)?s.error({componentName:"VueUiThermometer",type:"dataset"}):s.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","from","to"]}).forEach(l=>{s.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:l})})});const d=e.ref(s.createUid()),C=e.ref(null),w=e.ref(0),t=e.computed(()=>{const l=$.useNestedProp({userConfig:a.config,defaultConfig:I});return l.theme?{...$.useNestedProp({userConfig:s.themes.vue_ui_thermometer[l.theme]||a.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),{isPrinting:q,isImaging:S,generatePdf:B,generateImage:N}=F.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),m=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),T=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>a.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(l,n,o){const u=[],x=E(l),_=E(n);for(let v=0;v<o;v++){const G=f(x.red,_.red,v,o),W=f(x.green,_.green,v,o),H=f(x.blue,_.blue,v,o),j=`#${g(G)}${g(W)}${g(H)}`;u.push(j)}return u}function E(l){const n=l.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function f(l,n,o,u){return Math.round(l+(n-l)*o/u)}function g(l){return l.toString(16).padStart(2,"0")}const r=e.computed(()=>{const l=T.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:l,left:i.value.left,right:l-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),Y=e.computed(()=>r.value),k=e.computed(()=>{const l=a.dataset.from<0?Math.abs(a.dataset.from):a.dataset.from,n=a.dataset.to<0?Math.abs(a.dataset.to):a.dataset.to;let o=0;return a.dataset.to>0?o=l+n:l>n?o=l-n:o=n-l,(1-(Math.abs(a.dataset.from)+a.dataset.value)/o)*(r.value.height-i.value.top-i.value.bottom)}),M=e.computed(()=>`${k.value}px`),O=e.computed(()=>`${r.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),U=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),z=e.computed(()=>{if(a.dataset.colors){if(!a.dataset.colors.from)return y(m.value[0]||s.palette[0],s.convertColorToHex(a.dataset.colors.to),c.value||10);if(!a.dataset.colors.to)return y(s.convertColorToHex(a.dataset.colors.from),m.value[1]||s.palette[1],c.value||10)}else return y(m.value[1]||s.palette[1],m.value[0]||s.palette[0],c.value||10);return y(s.convertColorToHex(a.dataset.colors.from),s.convertColorToHex(a.dataset.colors.to),c.value||10)}),V=e.computed(()=>{const l=[];let n=0;const o=r.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)l.push({x:r.value.left,y:r.value.top+u,qYLess:r.value.top+u+o/c.value/4,halfY:r.value.top+u+o/c.value/2,qYMore:r.value.top+u+o/c.value/4*3,color:z.value[n],height:o/c.value}),n+=1;return l}),h=e.ref(!1);function L(l){h.value=l,w.value+=1}return P({generatePdf:B,generateImage:N}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:C,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(A._sfc_main,{config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(F.UserOptions,{ref:"details",key:`user_options_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(S),isPrinting:e.unref(q),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:L,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(N)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`background:${t.value.style.chart.backgroundColor}`)},[e.createElementVNode("defs",null,[e.createElementVNode("clipPath",Q,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,Z)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,te),e.createElementVNode("stop",{offset:"50%","stop-color":`${o.color}${e.unref(s.opacity)[100-t.value.style.chart.graduations.gradient.intensity]}`},null,8,oe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,le)],8,ee))),256))]),e.createElementVNode("g",re,[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,height:r.value.height-i.value.top-i.value.bottom,width:r.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,ae),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,se),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ue)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ie)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ce)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,de)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.right,x2:r.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,he)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:r.value.right,x2:r.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,me)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:r.value.left,y:r.value.top,height:k.value,width:r.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,ye)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:k.value+r.value.top+t.value.style.chart.label.fontSize/3,x:r.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.label.prefix,v:b.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding})),11,pe),e.renderSlot(l.$slots,"svg",{svg:Y.value},void 0,!0)],14,K)):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(D.default,{key:3,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],14,X))}},ge=R._export_sfc(fe,[["__scopeId","data-v-eef95fe3"]]);exports.default=ge;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("./useNestedProp-Dikfncsl.cjs"),w=require("./index-BDKEFvEF.cjs"),z=require("./useResponsive-B3TrDDIG.cjs"),b=require("./BaseIcon-5MAyZTOz.cjs"),H=require("./Title-XRMcJkna.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class L{constructor(N,p,_,T=!0,g=!0){this.interval=p,this.elapsed=0,this.isPaused=!1;const C=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as d, onMounted as q, onBeforeUnmount as J, computed as D, openBlock as r, createElementBlock as u, normalizeStyle as f, createVNode as _, createCommentVNode as p, unref as K, createElementVNode as M, mergeProps as E, renderSlot as N, normalizeProps as B, guardReactiveProps as j, toDisplayString as Q } from "vue";
|
|
2
|
-
import { u as Y } from "./useNestedProp-
|
|
3
|
-
import { u as Z, c as ee, X as te, B as O } from "./index-
|
|
2
|
+
import { u as Y } from "./useNestedProp-Da77DnaA.js";
|
|
3
|
+
import { u as Z, c as ee, X as te, B as O } from "./index-ByO3Ywek.js";
|
|
4
4
|
import { t as ae, u as se } from "./useResponsive-NZB-WLRF.js";
|
|
5
|
-
import x from "./BaseIcon-
|
|
6
|
-
import { _ as le } from "./Title-
|
|
5
|
+
import x from "./BaseIcon-DB1g9sdS.js";
|
|
6
|
+
import { _ as le } from "./Title-BSpLzDC1.js";
|
|
7
7
|
import { _ as oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
class re {
|
|
9
9
|
constructor(F, w, I, z = !0, C = !0) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { computed as v, ref as f, watch as Q, onMounted as W, openBlock as n, createElementBlock as h, normalizeClass as O, normalizeStyle as S, createVNode as Z, createCommentVNode as $, createBlock as L, unref as k, createSlots as ee, withCtx as A, renderSlot as I, normalizeProps as te, guardReactiveProps as ae, Fragment as T, renderList as V, toDisplayString as le } from "vue";
|
|
2
|
-
import { u as X } from "./useNestedProp-
|
|
3
|
-
import { u as oe, c as re, t as se, o as ne, e as ue, s as M, X as ie } from "./index-
|
|
4
|
-
import { _ as ce } from "./Title-
|
|
5
|
-
import { u as ve, U as he } from "./usePrinter-
|
|
6
|
-
import de from "./vue-ui-skeleton-
|
|
2
|
+
import { u as X } from "./useNestedProp-Da77DnaA.js";
|
|
3
|
+
import { u as oe, c as re, t as se, o as ne, e as ue, s as M, X as ie } from "./index-ByO3Ywek.js";
|
|
4
|
+
import { _ as ce } from "./Title-BSpLzDC1.js";
|
|
5
|
+
import { u as ve, U as he } from "./usePrinter-Dda5FBG3.js";
|
|
6
|
+
import de from "./vue-ui-skeleton-BxRSQeuo.js";
|
|
7
7
|
import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const ye = ["id"], me = ["xmlns", "viewBox"], fe = { key: 0 }, pe = ["d", "stroke-width", "stroke"], ke = { key: 1 }, be = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], _e = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], Ce = {
|
|
9
9
|
__name: "vue-ui-tiremarks",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),S=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),S=require("./useNestedProp-Dikfncsl.cjs"),g=require("./index-BDKEFvEF.cjs"),j=require("./Title-XRMcJkna.cjs"),N=require("./usePrinter-DedM_6px.cjs"),L=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H=["id"],M=["xmlns","viewBox"],X={key:0},D=["d","stroke-width","stroke"],R={key:1},Y=["x1","y1","x2","y2","stroke-width","stroke"],J=["x","y","font-size","fill","font-weight","text-anchor"],K={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(E,{expose:O}){const u=E,{vue_ui_tiremarks:A}=g.useConfig(),x=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),$=e.ref(g.createUid()),w=e.ref(null),P=e.ref(0),t=e.computed(()=>{const a=S.useNestedProp({userConfig:u.config,defaultConfig:A});return a.theme?{...S.useNestedProp({userConfig:g.themes.vue_ui_tiremarks[a.theme]||u.config,defaultConfig:a})}:a}),{isPrinting:V,isImaging:q,generatePdf:B,generateImage:z}=N.usePrinter({elementId:$.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),c=e.ref(t.value.style.chart.animation.use?0:u.dataset.percentage);e.watch(()=>u.dataset.percentage,()=>{c.value=e.ref(t.value.style.chart.animation.use?0:u.dataset.percentage),F()}),e.onMounted(()=>{g.objectIsEmpty(u.dataset)&&g.error({componentName:"VueUiTiremarks",type:"dataset"}),F()});function F(){let a=0,s=t.value.style.chart.animation.speed,l=.005*t.value.style.chart.animation.acceleration;function r(){c.value+=s+a,a+=l,c.value<u.dataset.percentage?requestAnimationFrame(r):c.value=u.dataset.percentage}t.value.style.chart.animation.use&&(c.value=0,r())}const y=e.computed(()=>t.value.style.chart.layout.display==="vertical"),n=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return y.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),_=e.computed(()=>Object.values(n.value).reduce((a,s)=>a+s,0)),o=e.computed(()=>({height:y.value?312:56,width:y.value?56:312})),G=e.ref(100);e.computed(()=>u.dataset.percentage/G.value);const i=e.computed(()=>y.value?{mark:(o.value.height-_.value)/100*.5,space:(o.value.height-_.value)/100*.5}:{mark:(o.value.width-_.value)/100*.5,space:(o.value.width-_.value)/100*.5}),I=e.computed(()=>{const a=[];for(let l=0;l<100;l+=1){const r=t.value.style.chart.layout.ticks.gradient.show?g.shiftHue(t.value.style.chart.layout.activeColor,l/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(y.value){const f=t.value.style.chart.layout.crescendo?(100-l)*(o.value.width-n.value.left-n.value.right)/100/3:0,v=n.value.left+4+f,d=o.value.width-n.value.right-4-f,h=o.value.height-n.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,m=o.value.height-n.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,k=(d-v)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+l)/100);a.push({x1:v,x2:d,y1:h,y2:m,curve:`M ${v} ${h} C ${v+k} ${h-b}, ${d-k} ${m-b}, ${d} ${m}`,color:r})}else{const f=t.value.style.chart.layout.crescendo?(100-l)*(o.value.height-n.value.top-n.value.bottom)/100/3:0,v=n.value.left+l*i.value.mark+l*i.value.space-i.value.mark,d=v,h=n.value.top+4+f,m=o.value.height-n.value.bottom-4-f,k=t.value.style.chart.layout.curveAngleY*((1+l)/100),b=(m-h)/t.value.style.chart.layout.curveAngleX;a.push({x1:v,x2:d,y1:h,y2:m,curve:`M ${v} ${h} C ${v+k} ${h+b}, ${d+k} ${m-b}, ${d} ${m}`,color:r})}}return a}),p=e.computed(()=>{let a,s,l;const r=t.value.style.chart.percentage.fontSize/3;return y.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=o.value.width/2,s=n.value.top/2,l="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=o.value.width/2,s=o.value.height-n.value.bottom/2+r,l="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,s=o.value.height/2+r,l="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=o.value.width-n.value.right+8,s=o.value.height/2+r,l="start"),{x:a,y:s,textAnchor:l,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),C=e.ref(!1);function T(a){C.value=a,P.value+=1}return O({generatePdf:B,generateImage:z}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:w,class:e.normalizeClass(`vue-ui-tiremarks ${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:$.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:12px`)},[e.createVNode(j._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(N.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(q),uid:$.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:w.value,onToggleFullscreen:T,onGeneratePdf:e.unref(B),onGenerateImage:e.unref(z)},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(g.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.curve,"stroke-width":i.value.mark,stroke:c.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=c.value})},null,10,D))),256))])):(e.openBlock(),e.createElementBlock("g",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,"stroke-width":i.value.mark,stroke:c.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,Y))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:p.value.x,y:p.value.y,"font-size":p.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(g.shiftHue)(t.value.style.chart.layout.activeColor,c.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":p.value.bold?"bold":"normal","text-anchor":p.value.textAnchor},e.toDisplayString(c.value.toFixed(t.value.style.chart.percentage.rounding)+"%"),9,J)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,M)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(L.default,{key:3,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,H))}},Q=U._export_sfc(K,[["__scopeId","data-v-1bbd1baf"]]);exports.default=Q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Xau3hcRk.cjs"),ke=require("./Title-gCBF7AU7.cjs"),ne=require("./usePrinter-Dhvmhwhf.cjs"),Ce=require("./Tooltip-Qv4VexrA.cjs"),we=require("./Legend-VoYDt_v5.cjs"),xe=require("./vue-ui-skeleton-CgYrDrh-.cjs"),Te=require("./DataTable-CXkMZ3ja.cjs"),$e=require("./vue-ui-accordion-BjU8im6m.cjs"),re=require("./useResponsive-B3TrDDIG.cjs"),ue=require("./useNestedProp-C_EQ-Kxy.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ie(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=se(n,s),v=se(u,s);return i>=v}}function _e(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function Be(n,d){const s={...d,children:n};return de(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function ce(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},S=Object.assign({},k,t);w=x,g.push(S)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},S=Object.assign({},k,t);b=x,g.push(S)}return g}}function Oe(n){const d=W(n),s=d.width,u=d.height;return Math.min(s,u)}function Pe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function W(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=ce(v,h);return f.concat(g)}const C=Oe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let S=0;S<g;S+=1)m+=v[S].normalizedValue;const k=Ee(h,m),x=ce(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function de(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Pe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(de(s[h]));return _e(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ie(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ie(p)}}const Fe=n=>(e.pushScopeId("data-v-7489c985"),n=n(),e.popScopeId(),n),Re=["id"],Ie=["xmlns","viewBox"],Le={key:0},De=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Fe(()=>e.createElementVNode("br",null,null,-1)),Ge=["onClick"],je={key:0},Xe={key:1},Ye=["innerHTML"],Ze={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const o=ue.useNestedProp({userConfig:u.config,defaultConfig:i});return o.theme?{...ue.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:S,isImaging:ve,generatePdf:U,generateImage:G}=ne.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),L=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),N=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function j(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||L.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),j(a.children))})}const O=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),j(O.value),t.value.responsive){const o=re.throttle(()=>{const{width:a,height:l}=re.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=l});D.value=new ResizeObserver(o),D.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!g.value.includes(o.id))),E=e.computed(()=>O.value.filter(o=>!g.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),X=e.computed({get(){let o=[...R.value];return t.value.style.chart.layout.sorted&&(o=[...R.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function Y(o,a){return o.value/a}function he(o,a,l){const c=t.value.style.chart.layout.rects.colorRatio-Y(a,l);return r.lightenHexColor(o,c<0?0:c)}function Z(o,a,l,c){return o.map((y,V)=>{const A=he(r.convertColorToHex(a)||L.value[V]||r.palette[V]||r.palette[V%r.palette.length],y,c),be=Y(y,c);return{...y,color:A,proportion:be,parentName:l,children:y.children?Z(y.children,A,y.name,c):void 0}})}const I=e.computed(()=>Be(X.value.map((o,a)=>{const l=o.children?o.children.reduce((c,y)=>c+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?Z(o.children.sort((c,y)=>y.value-c.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function J({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function K({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function P(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(o){b.value=o,w.value+=1}const F=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),T=e.ref(!1);function Q(o,a=O.value){for(const l of a){if(l.id===o)return l;if(l.children){const c=Q(o,l.children);if(c)return c}}return null}function fe(o){T.value?(s("selectDatapoint",void 0),H.value=O.value):(s("selectDatapoint",o),H.value=[Q(o.parentId)]),T.value=!T.value}const $=e.ref(null),ee=e.computed(()=>O.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/O.value.map(l=>l.value).reduce((l,c)=>l+c,0),opacity:g.value.includes(o.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function te(o){T.value=!1,$.value=null,g.value.includes(o.id)?g.value=g.value.filter(a=>a!==o.id):g.value.length<u.dataset.length-1&&g.value.push(o.id),s("selectLegend",X.value)}const M=e.ref(null);function me({datapoint:o,seriesIndex:a}){$.value=o,M.value={datapoint:o,seriesIndex:a,config:t.value,series:R.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:R.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,c+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,c+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const B=e.computed(()=>{const o=I.value.map(l=>({name:l.name,color:l.color})),a=I.value.map(l=>l.value);return{head:o,body:a}});function oe(){e.nextTick(()=>{const o=B.value.head.map((c,y)=>[[c.name],[B.value.body[y]],[isNaN(B.value.body[y]/E.value)?"-":B.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=B.value.head.map((y,V)=>{const A=r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:B.value.body[V],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name,shape:"square"},A,isNaN(B.value.body[V]/E.value)?"-":(B.value.body[V]/E.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),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.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function ye(){return I.value}function le(){N.value.showTable=!N.value.showTable}function ae(){N.value.showTooltip=!N.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:G,generatePdf:U,toggleTable:le,toggleTooltip:ae}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(ve),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:N.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(U),onGenerateCsv:oe,onGenerateImage:e.unref(G),onToggleTable:le,onToggleTooltip:ae},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!T.value,"vue-data-ui-zoom-minus":T.value}),viewBox:`${F.value.startX} ${F.value.startY} ${F.value.width<=0?10:F.value.width} ${F.value.height<=0?10:F.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Le,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,De)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:J(l),width:K(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(l),onMouseenter:()=>me({datapoint:l,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{$.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${$.value?$.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:J(l),width:K(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${P(l)/1.5}px);text-align:left;line-height:${P(l)<14?14:P(l)}px;padding:${P(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(l.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value,fontSize:P(l),isZoom:T.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:T.value,rect:$.value,config:t.value})),void 0,!0)],14,Ie)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:ee.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>te(l))},{item:e.withCtx(({legend:l,index:c})=>[e.createElementVNode("div",{onClick:y=>te(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",Xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(l.value/E.value)?"-":(l.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,Ge)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ee.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:N.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:4,hideDetails:"",config:{open:N.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ye)]),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,Re))}},Je=Se._export_sfc(Ze,[["__scopeId","data-v-7489c985"]]);exports.default=Je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BDKEFvEF.cjs"),ke=require("./Title-XRMcJkna.cjs"),ne=require("./usePrinter-DedM_6px.cjs"),Ce=require("./Tooltip-COgv-iii.cjs"),we=require("./Legend-BEMGbN0s.cjs"),xe=require("./vue-ui-skeleton-rY_nZhMQ.cjs"),Te=require("./DataTable-CGX9xKvm.cjs"),$e=require("./vue-ui-accordion-BytUYLYl.cjs"),re=require("./useResponsive-B3TrDDIG.cjs"),ue=require("./useNestedProp-Dikfncsl.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ie(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=se(n,s),v=se(u,s);return i>=v}}function _e(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function Be(n,d){const s={...d,children:n};return de(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function ce(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},S=Object.assign({},k,t);w=x,g.push(S)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},S=Object.assign({},k,t);b=x,g.push(S)}return g}}function Oe(n){const d=W(n),s=d.width,u=d.height;return Math.min(s,u)}function Pe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function W(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=ce(v,h);return f.concat(g)}const C=Oe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let S=0;S<g;S+=1)m+=v[S].normalizedValue;const k=Ee(h,m),x=ce(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function de(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Pe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(de(s[h]));return _e(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ie(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ie(p)}}const Fe=n=>(e.pushScopeId("data-v-7489c985"),n=n(),e.popScopeId(),n),Re=["id"],Ie=["xmlns","viewBox"],Le={key:0},De=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Fe(()=>e.createElementVNode("br",null,null,-1)),Ge=["onClick"],je={key:0},Xe={key:1},Ye=["innerHTML"],Ze={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const o=ue.useNestedProp({userConfig:u.config,defaultConfig:i});return o.theme?{...ue.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:S,isImaging:ve,generatePdf:U,generateImage:G}=ne.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),L=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),N=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function j(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||L.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),j(a.children))})}const O=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),j(O.value),t.value.responsive){const o=re.throttle(()=>{const{width:a,height:l}=re.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=l});D.value=new ResizeObserver(o),D.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!g.value.includes(o.id))),E=e.computed(()=>O.value.filter(o=>!g.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),X=e.computed({get(){let o=[...R.value];return t.value.style.chart.layout.sorted&&(o=[...R.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function Y(o,a){return o.value/a}function he(o,a,l){const c=t.value.style.chart.layout.rects.colorRatio-Y(a,l);return r.lightenHexColor(o,c<0?0:c)}function Z(o,a,l,c){return o.map((y,V)=>{const A=he(r.convertColorToHex(a)||L.value[V]||r.palette[V]||r.palette[V%r.palette.length],y,c),be=Y(y,c);return{...y,color:A,proportion:be,parentName:l,children:y.children?Z(y.children,A,y.name,c):void 0}})}const I=e.computed(()=>Be(X.value.map((o,a)=>{const l=o.children?o.children.reduce((c,y)=>c+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?Z(o.children.sort((c,y)=>y.value-c.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function J({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function K({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function P(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(o){b.value=o,w.value+=1}const F=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),T=e.ref(!1);function Q(o,a=O.value){for(const l of a){if(l.id===o)return l;if(l.children){const c=Q(o,l.children);if(c)return c}}return null}function fe(o){T.value?(s("selectDatapoint",void 0),H.value=O.value):(s("selectDatapoint",o),H.value=[Q(o.parentId)]),T.value=!T.value}const $=e.ref(null),ee=e.computed(()=>O.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/O.value.map(l=>l.value).reduce((l,c)=>l+c,0),opacity:g.value.includes(o.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function te(o){T.value=!1,$.value=null,g.value.includes(o.id)?g.value=g.value.filter(a=>a!==o.id):g.value.length<u.dataset.length-1&&g.value.push(o.id),s("selectLegend",X.value)}const M=e.ref(null);function me({datapoint:o,seriesIndex:a}){$.value=o,M.value={datapoint:o,seriesIndex:a,config:t.value,series:R.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:R.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,c+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,c+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const B=e.computed(()=>{const o=I.value.map(l=>({name:l.name,color:l.color})),a=I.value.map(l=>l.value);return{head:o,body:a}});function oe(){e.nextTick(()=>{const o=B.value.head.map((c,y)=>[[c.name],[B.value.body[y]],[isNaN(B.value.body[y]/E.value)?"-":B.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=B.value.head.map((y,V)=>{const A=r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:B.value.body[V],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name,shape:"square"},A,isNaN(B.value.body[V]/E.value)?"-":(B.value.body[V]/E.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),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.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function ye(){return I.value}function le(){N.value.showTable=!N.value.showTable}function ae(){N.value.showTooltip=!N.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:G,generatePdf:U,toggleTable:le,toggleTooltip:ae}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(ve),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:N.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(U),onGenerateCsv:oe,onGenerateImage:e.unref(G),onToggleTable:le,onToggleTooltip:ae},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!T.value,"vue-data-ui-zoom-minus":T.value}),viewBox:`${F.value.startX} ${F.value.startY} ${F.value.width<=0?10:F.value.width} ${F.value.height<=0?10:F.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Le,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,De)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:J(l),width:K(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(l),onMouseenter:()=>me({datapoint:l,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{$.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${$.value?$.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:J(l),width:K(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${P(l)/1.5}px);text-align:left;line-height:${P(l)<14?14:P(l)}px;padding:${P(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(l.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value,fontSize:P(l),isZoom:T.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:T.value,rect:$.value,config:t.value})),void 0,!0)],14,Ie)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:ee.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>te(l))},{item:e.withCtx(({legend:l,index:c})=>[e.createElementVNode("div",{onClick:y=>te(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",Xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(l.value/E.value)?"-":(l.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,Ge)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ee.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:N.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:4,hideDetails:"",config:{open:N.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ye)]),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,Re))}},Je=Se._export_sfc(Ze,[["__scopeId","data-v-7489c985"]]);exports.default=Je;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as w, ref as y, onMounted as He, onBeforeUnmount as Ee, openBlock as m, createElementBlock as x, normalizeClass as Ce, normalizeStyle as D, createVNode as ne, createCommentVNode as H, createBlock as ee, unref as T, createSlots as Ue, withCtx as $, renderSlot as _, normalizeProps as j, guardReactiveProps as Y, Fragment as ke, renderList as xe, createElementVNode as O, toDisplayString as G, createTextVNode as $e, nextTick as Ge, pushScopeId as Xe, popScopeId as qe } from "vue";
|
|
2
|
-
import { u as je, c as Te, t as Ye, a as Ze, p as C, b as Je, o as Ke, e as Qe, d as te, f as le, X as et, l as _e, C as Oe, v as Se, w as tt, n as lt, q as ot } from "./index-
|
|
3
|
-
import { _ as at } from "./Title-
|
|
4
|
-
import { u as nt, U as st } from "./usePrinter-
|
|
5
|
-
import { _ as rt } from "./Tooltip-
|
|
6
|
-
import { L as ut } from "./Legend-
|
|
7
|
-
import it from "./vue-ui-skeleton-
|
|
8
|
-
import { D as ct } from "./DataTable-
|
|
9
|
-
import dt from "./vue-ui-accordion-
|
|
2
|
+
import { u as je, c as Te, t as Ye, a as Ze, p as C, b as Je, o as Ke, e as Qe, d as te, f as le, X as et, l as _e, C as Oe, v as Se, w as tt, n as lt, q as ot } from "./index-ByO3Ywek.js";
|
|
3
|
+
import { _ as at } from "./Title-BSpLzDC1.js";
|
|
4
|
+
import { u as nt, U as st } from "./usePrinter-Dda5FBG3.js";
|
|
5
|
+
import { _ as rt } from "./Tooltip-DI8_Wjjy.js";
|
|
6
|
+
import { L as ut } from "./Legend-C4cCpb4z.js";
|
|
7
|
+
import it from "./vue-ui-skeleton-BxRSQeuo.js";
|
|
8
|
+
import { D as ct } from "./DataTable-Bza1ed62.js";
|
|
9
|
+
import dt from "./vue-ui-accordion-CbKHVPHh.js";
|
|
10
10
|
import { t as vt, u as ht } from "./useResponsive-NZB-WLRF.js";
|
|
11
|
-
import { u as Ne } from "./useNestedProp-
|
|
11
|
+
import { u as Ne } from "./useNestedProp-Da77DnaA.js";
|
|
12
12
|
import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
function ze(a, i) {
|
|
14
14
|
const s = a.length;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as De, computed as f, ref as v, onMounted as Re, onBeforeUnmount as Me, openBlock as d, createElementBlock as h, normalizeClass as S, normalizeStyle as i, createVNode as D, createCommentVNode as b, createBlock as J, unref as T, createSlots as Ue, withCtx as m, renderSlot as x, normalizeProps as Q, guardReactiveProps as Y, createElementVNode as o, toDisplayString as u, Fragment as R, renderList as M, withKeys as Xe, createTextVNode as Ae } from "vue";
|
|
2
|
-
import { u as Ee, c as Ge, t as He, a as We, p as V, b as je, o as be, e as Z, d as ee, X as qe, s as Ke, r as te, v as Je, w as Qe, f as Ye, n as Ze, q as et } from "./index-
|
|
2
|
+
import { u as Ee, c as Ge, t as He, a as We, p as V, b as je, o as be, e as Z, d as ee, X as qe, s as Ke, r as te, v as Je, w as Qe, f as Ye, n as Ze, q as et } from "./index-ByO3Ywek.js";
|
|
3
3
|
import { t as tt, u as lt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as at } from "./Title-
|
|
5
|
-
import { u as ot, U as nt } from "./usePrinter-
|
|
6
|
-
import { _ as ut } from "./Tooltip-
|
|
7
|
-
import { L as me } from "./Legend-
|
|
8
|
-
import rt from "./vue-ui-skeleton-
|
|
9
|
-
import st from "./BaseIcon-
|
|
10
|
-
import it from "./vue-ui-accordion-
|
|
11
|
-
import { u as _e } from "./useNestedProp-
|
|
4
|
+
import { _ as at } from "./Title-BSpLzDC1.js";
|
|
5
|
+
import { u as ot, U as nt } from "./usePrinter-Dda5FBG3.js";
|
|
6
|
+
import { _ as ut } from "./Tooltip-DI8_Wjjy.js";
|
|
7
|
+
import { L as me } from "./Legend-C4cCpb4z.js";
|
|
8
|
+
import rt from "./vue-ui-skeleton-BxRSQeuo.js";
|
|
9
|
+
import st from "./BaseIcon-DB1g9sdS.js";
|
|
10
|
+
import it from "./vue-ui-accordion-CbKHVPHh.js";
|
|
11
|
+
import { u as _e } from "./useNestedProp-Da77DnaA.js";
|
|
12
12
|
import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const ct = ["id"], vt = ["onClick"], ht = ["xmlns", "viewBox"], pt = ["id"], gt = ["stop-color"], yt = ["stop-color"], ft = ["x", "y", "width", "height", "fill", "rx"], bt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], mt = ["x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x", "y", "font-size", "fill", "font-weight"], xt = ["x", "y", "font-size", "fill", "font-weight"], $t = ["x", "y", "font-size", "fill", "font-weight"], kt = ["x", "y", "font-size", "fill", "font-weight"], Ct = ["y", "width", "height", "fill", "onMouseenter"], wt = ["onClick"], Tt = { style: "width:100%;padding-top: 36px;position:relative" }, Nt = { class: "vue-ui-data-table" }, Lt = { key: 0 }, Pt = { style: { width: "100%" } }, Vt = ["data-cell"], St = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ft = ["data-cell"], zt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Bt = ["data-cell"], It = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ot = ["data-cell"], Dt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Rt = ["data-cell"], Mt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ut = ["data-cell"], Xt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, At = ["data-cell"], Et = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Gt = {
|
|
14
14
|
__name: "vue-ui-vertical-bar",
|