vue-data-ui 2.3.92 → 2.3.94
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-CdJD01md.cjs → Arrow-Dqk-HgBj.cjs} +1 -1
- package/dist/{Arrow-16rQhq4i.js → Arrow-FQNwuQt_.js} +1 -1
- package/dist/{BaseIcon-CAmYNoaf.js → BaseIcon-CcOdzI48.js} +1 -1
- package/dist/{BaseIcon-dYWMubrH.cjs → BaseIcon-DhAyJ2rW.cjs} +1 -1
- package/dist/{DataTable-BXnbua0J.js → DataTable-D1vDu_2B.js} +2 -2
- package/dist/{DataTable-oa0Srfuc.cjs → DataTable-kOScyzFF.cjs} +1 -1
- package/dist/{Legend-Dhm9_peB.cjs → Legend-BJdr5n-o.cjs} +1 -1
- package/dist/{Legend-Cr1hulgT.js → Legend-CZk6McMv.js} +1 -1
- package/dist/{PackageVersion-BVZfgDqm.js → PackageVersion-DDKechCD.js} +1 -1
- package/dist/{PackageVersion-BkgJVmj1.cjs → PackageVersion-Tm6EPIDH.cjs} +1 -1
- package/dist/{Shape-hGbEoQOv.cjs → Shape-CHWOgbhq.cjs} +1 -1
- package/dist/{Shape-D75m5xWM.js → Shape-CY3Tsyaq.js} +1 -1
- package/dist/{Slicer-B7ya0m2Q.cjs → Slicer-C0R4JA2q.cjs} +1 -1
- package/dist/{Slicer-Bx8AozB8.js → Slicer-DBVND1TR.js} +15 -15
- package/dist/{Title-1Sw6EmHy.js → Title-B6kWQmNb.js} +1 -1
- package/dist/{Title-Bjrh7khe.cjs → Title-DAEaaXFr.cjs} +1 -1
- package/dist/{Tooltip-CPATjuur.cjs → Tooltip-Cb9jWppv.cjs} +1 -1
- package/dist/{Tooltip-EJf3VBPR.js → Tooltip-Cwp4dS4t.js} +1 -1
- package/dist/{index-DhJby8wL.js → index-Bu852AzK.js} +725 -705
- package/dist/index-jAZxyteD.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-CrHvyupb.js → useNestedProp-1sCLAHuR.js} +1 -1
- package/dist/{useNestedProp-Bwd7mK1Z.cjs → useNestedProp-DksYpyh6.cjs} +1 -1
- package/dist/{usePrinter-Bwm8J3RQ.js → usePrinter-CaNEdNUc.js} +1 -1
- package/dist/{usePrinter-DdsPm5a4.cjs → usePrinter-Cx-xmAjb.cjs} +1 -1
- package/dist/{vue-data-ui-CLxne31S.js → vue-data-ui-DRT0INR_.js} +57 -57
- package/dist/{vue-data-ui-ZitCqVgG.cjs → vue-data-ui-DVWQuwQb.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +5 -5
- package/dist/{vue-ui-3d-bar-Dg87_AAm.js → vue-ui-3d-bar-CwTmIafL.js} +8 -8
- package/dist/{vue-ui-3d-bar-DAv5cYGJ.cjs → vue-ui-3d-bar-fPokAY4t.cjs} +1 -1
- package/dist/{vue-ui-accordion-Cn5Jbplg.js → vue-ui-accordion-CBwmD_zS.js} +3 -3
- package/dist/{vue-ui-accordion-BAHX7KzB.cjs → vue-ui-accordion-WXKee19V.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-PlamQWqC.js → vue-ui-age-pyramid-BuJ384HP.js} +9 -9
- package/dist/{vue-ui-age-pyramid-GzHwQzsH.cjs → vue-ui-age-pyramid-CSlbHHIq.cjs} +1 -1
- package/dist/{vue-ui-annotator-Dd5KF_cy.js → vue-ui-annotator-CQQfgcyq.js} +1 -1
- package/dist/{vue-ui-annotator-DGgQwl-K.cjs → vue-ui-annotator-DqCVD1IT.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BIEB2J1w.cjs → vue-ui-candlestick-2uxcI-Xb.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DTzwPhV5.js → vue-ui-candlestick-O0pBnymd.js} +10 -10
- package/dist/{vue-ui-carousel-table-YEfvPESA.js → vue-ui-carousel-table-CpaHwBTF.js} +4 -4
- package/dist/{vue-ui-carousel-table-HNTf5AYY.cjs → vue-ui-carousel-table-DJelccvO.cjs} +1 -1
- package/dist/{vue-ui-chestnut-DzjdAYsT.cjs → vue-ui-chestnut-DoS0ZkSz.cjs} +1 -1
- package/dist/{vue-ui-chestnut-PzMOM7mp.js → vue-ui-chestnut-bP29gPF2.js} +7 -7
- package/dist/{vue-ui-cursor-DWea2yXV.js → vue-ui-cursor-BXsEO1jQ.js} +2 -2
- package/dist/{vue-ui-cursor-C5rsiCdn.cjs → vue-ui-cursor-DvrLmTy2.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BqXhoS8m.cjs → vue-ui-dashboard-CtAtCuEu.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CVespiTo.js → vue-ui-dashboard-VQiRxgUe.js} +2 -2
- package/dist/{vue-ui-digits-gNKgZqYU.js → vue-ui-digits-2h-uYg5M.js} +2 -2
- package/dist/{vue-ui-digits-wmDN7Vkf.cjs → vue-ui-digits-DxwUUK2a.cjs} +1 -1
- package/dist/vue-ui-donut-CVkNiaR7.js +999 -0
- package/dist/vue-ui-donut-ClCDBTXq.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DhDxLZ1J.cjs → vue-ui-donut-evolution-CVy-DhHk.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Ch6HH0ja.js → vue-ui-donut-evolution-D0HDE6fN.js} +53 -53
- package/dist/{vue-ui-dumbbell-B9Z_pjnG.cjs → vue-ui-dumbbell-CblIThyd.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-lFlZX8Yi.js → vue-ui-dumbbell-DIVxIXgO.js} +9 -9
- package/dist/{vue-ui-flow-CSIOC-JR.js → vue-ui-flow-Cy5HKKbs.js} +20 -20
- package/dist/{vue-ui-flow-BaFpUJg-.cjs → vue-ui-flow-Dbw0yzSb.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DL2mnel_.js → vue-ui-galaxy-CBR86BVE.js} +23 -23
- package/dist/{vue-ui-galaxy-BIR5GxIc.cjs → vue-ui-galaxy-Z5-e5hHG.cjs} +1 -1
- package/dist/{vue-ui-gauge-BMq7KT3t.js → vue-ui-gauge-BwC9HPyF.js} +19 -19
- package/dist/{vue-ui-gauge-r_qvpwE7.cjs → vue-ui-gauge-DAgx6nds.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DBas_Sw_.cjs → vue-ui-gizmo-5FygVg05.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Dj7zvNI1.js → vue-ui-gizmo-D6U5riWt.js} +3 -3
- package/dist/{vue-ui-heatmap-pqBYIrxm.js → vue-ui-heatmap-PVlvCw_B.js} +9 -9
- package/dist/{vue-ui-heatmap-qPgEhAzc.cjs → vue-ui-heatmap-XVVbgtw6.cjs} +1 -1
- package/dist/{vue-ui-kpi-Cmo9J7wp.cjs → vue-ui-kpi-2eoTT0Hv.cjs} +1 -1
- package/dist/{vue-ui-kpi-ZPBinMiF.js → vue-ui-kpi-DiG34MXd.js} +3 -3
- package/dist/{vue-ui-mini-loader-DOTWhLi9.js → vue-ui-mini-loader-CVOfsZ-d.js} +2 -2
- package/dist/{vue-ui-mini-loader-Ce-jbgMT.cjs → vue-ui-mini-loader-DpoTiQhx.cjs} +1 -1
- package/dist/{vue-ui-molecule-RDpgNrHQ.js → vue-ui-molecule-85QzZoSm.js} +29 -29
- package/dist/{vue-ui-molecule-D429iwPP.cjs → vue-ui-molecule-Mt0YXGcP.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CdLJxrkT.cjs → vue-ui-mood-radar-B3xF0_xt.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CD5L8WCU.js → vue-ui-mood-radar-Ds21V6oP.js} +21 -21
- package/dist/{vue-ui-nested-donuts-A-tid5cQ.js → vue-ui-nested-donuts-BrMouz8T.js} +46 -46
- package/dist/{vue-ui-nested-donuts-DyM3uc7x.cjs → vue-ui-nested-donuts-DFrY4v-O.cjs} +1 -1
- package/dist/{vue-ui-onion-BKql8oal.cjs → vue-ui-onion-CQu0-ZlV.cjs} +1 -1
- package/dist/{vue-ui-onion-Cap01Ehu.js → vue-ui-onion-ZWa0bPAG.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-B0zMgtnq.cjs → vue-ui-parallel-coordinate-plot-Cet-vJ3E.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CcDKe4L0.js → vue-ui-parallel-coordinate-plot-SpCkXomG.js} +11 -11
- package/dist/{vue-ui-quadrant-CZzdpeQ2.cjs → vue-ui-quadrant-B1fnSqPf.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BDEfAeyJ.js → vue-ui-quadrant-DwxUTnpH.js} +11 -11
- package/dist/{vue-ui-quick-chart-DlAUYg5u.js → vue-ui-quick-chart-DDSDdZMZ.js} +8 -8
- package/dist/{vue-ui-quick-chart-DpGYUyhq.cjs → vue-ui-quick-chart-DSOONkrO.cjs} +1 -1
- package/dist/{vue-ui-radar-oBeaHlpT.cjs → vue-ui-radar-CQJzxB9Y.cjs} +1 -1
- package/dist/{vue-ui-radar-CbTln7gs.js → vue-ui-radar-Cc4hxNkF.js} +11 -11
- package/dist/{vue-ui-rating-BkDncqow.js → vue-ui-rating-CRs01ao2.js} +7 -7
- package/dist/{vue-ui-rating-BU7-F3_e.cjs → vue-ui-rating-DRLfSg4n.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-IWiJWgcB.cjs → vue-ui-relation-circle-BZcoHhTb.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-C5B6UNGd.js → vue-ui-relation-circle-mlXpg86O.js} +6 -6
- package/dist/{vue-ui-rings-BujVUJ90.js → vue-ui-rings-DHlbwWrt.js} +37 -37
- package/dist/{vue-ui-rings-Df2cRgD8.cjs → vue-ui-rings-OeMdVo_s.cjs} +1 -1
- package/dist/{vue-ui-scatter-jFTeM2hW.cjs → vue-ui-scatter-D65sxQAb.cjs} +1 -1
- package/dist/{vue-ui-scatter-D6yqZJ7s.js → vue-ui-scatter-DtX5NOb_.js} +34 -34
- package/dist/{vue-ui-screenshot-CVu8IM33.cjs → vue-ui-screenshot-B1pv3wKU.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CHAySwpv.js → vue-ui-screenshot-BwgdW92q.js} +1 -1
- package/dist/{vue-ui-skeleton-ASX40MGk.js → vue-ui-skeleton-B-obKEDg.js} +49 -49
- package/dist/{vue-ui-skeleton-CAlTn_Cg.cjs → vue-ui-skeleton-C14g9G-o.cjs} +1 -1
- package/dist/{vue-ui-smiley-dwCqhB0r.cjs → vue-ui-smiley-CHY-BKbe.cjs} +1 -1
- package/dist/{vue-ui-smiley-DGVzhza2.js → vue-ui-smiley-i8xqKjND.js} +2 -2
- package/dist/{vue-ui-spark-trend-B7XhDvTj.js → vue-ui-spark-trend-DzZsfML2.js} +20 -20
- package/dist/{vue-ui-spark-trend-A1EHFK_r.cjs → vue-ui-spark-trend-i3VmY_gx.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BuNcvi66.js → vue-ui-sparkbar-7rOXvOgH.js} +4 -4
- package/dist/{vue-ui-sparkbar-CwNjHOjD.cjs → vue-ui-sparkbar-BnYKNJWQ.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-ISu154lS.cjs → vue-ui-sparkgauge-BuOMrzYW.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-JY2kB9WX.js → vue-ui-sparkgauge-DnphjNVE.js} +11 -11
- package/dist/{vue-ui-sparkhistogram-C8zyC-ii.cjs → vue-ui-sparkhistogram-DZaNR3tu.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DyEPWxkP.js → vue-ui-sparkhistogram-DvLl4E_s.js} +5 -5
- package/dist/{vue-ui-sparkline-DL3Thtc4.cjs → vue-ui-sparkline-BpmqNCQy.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DYC3sdvQ.js → vue-ui-sparkline-CPjnG7wg.js} +21 -21
- package/dist/{vue-ui-sparkstackbar-7TmtP3WR.js → vue-ui-sparkstackbar-BGgNBuJz.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-ChIM9bn2.cjs → vue-ui-sparkstackbar-CJ17fiW5.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DrtiSaNc.cjs → vue-ui-stackbar-CFoe4XwZ.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CP5C6Gb_.js → vue-ui-stackbar-SFKe9f6_.js} +11 -11
- package/dist/{vue-ui-strip-plot-BMYMIHGu.cjs → vue-ui-strip-plot-B8utOfmZ.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-DJQCq_KE.js → vue-ui-strip-plot-CGgheJ1-.js} +10 -10
- package/dist/{vue-ui-table-D6hvgMif.cjs → vue-ui-table-BpSsgihB.cjs} +1 -1
- package/dist/{vue-ui-table-IJi0xaVg.js → vue-ui-table-JOi6x-Kt.js} +10 -10
- package/dist/{vue-ui-table-heatmap-Ls8_xq0D.js → vue-ui-table-heatmap-EeR8_0fs.js} +23 -23
- package/dist/{vue-ui-table-heatmap-BZNKXZNs.cjs → vue-ui-table-heatmap-fNf5Hgfn.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BeuvdssX.js → vue-ui-table-sparkline-of9ZervK.js} +15 -15
- package/dist/{vue-ui-table-sparkline-BQFK30H1.cjs → vue-ui-table-sparkline-yjChfsNj.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DKm8SXlE.cjs → vue-ui-thermometer-Ct59Zrkd.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DPWIvG92.js → vue-ui-thermometer-Hb5jQa3y.js} +6 -6
- package/dist/{vue-ui-timer-CEzDvZf7.js → vue-ui-timer-Duo6PjNq.js} +5 -5
- package/dist/{vue-ui-timer-n6lv7oTx.cjs → vue-ui-timer-nIKem40S.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-B33mHXZN.cjs → vue-ui-tiremarks-D5vYyYcq.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BUGoY22W.js → vue-ui-tiremarks-rxEA2WzL.js} +6 -6
- package/dist/{vue-ui-treemap-DPxBZUUr.cjs → vue-ui-treemap-DK5klTWq.cjs} +1 -1
- package/dist/{vue-ui-treemap-DmOYjJ_F.js → vue-ui-treemap-DWDrLYPR.js} +10 -10
- package/dist/{vue-ui-vertical-bar-BpVKdSY5.js → vue-ui-vertical-bar-3TzyIQBn.js} +10 -10
- package/dist/{vue-ui-vertical-bar-BJMYX8t4.cjs → vue-ui-vertical-bar-CCOjOr9t.cjs} +1 -1
- package/dist/{vue-ui-waffle-ULg6SwPx.js → vue-ui-waffle-CUiQJf4B.js} +23 -23
- package/dist/{vue-ui-waffle-DGcueccy.cjs → vue-ui-waffle-CzbWP2YI.cjs} +1 -1
- package/dist/{vue-ui-wheel-CWKq-CFW.cjs → vue-ui-wheel-BgLqSlSe.cjs} +1 -1
- package/dist/{vue-ui-wheel-DlmgZd-_.js → vue-ui-wheel-DJe1aYWh.js} +6 -6
- package/dist/vue-ui-word-cloud-CS4EPwJc.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DWyboczt.js → vue-ui-word-cloud-ouNY0ixo.js} +75 -75
- package/dist/{vue-ui-xy-Cz81fw_E.cjs → vue-ui-xy-DkHIDMtO.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-B9cRe5gT.js → vue-ui-xy-canvas-CGG7Levw.js} +34 -34
- package/dist/{vue-ui-xy-canvas-GiuHOyj5.cjs → vue-ui-xy-canvas-iMF1sItL.cjs} +1 -1
- package/dist/{vue-ui-xy-V13Ns1gv.js → vue-ui-xy-iQJGfaFk.js} +28 -28
- package/package.json +1 -1
- package/dist/index-D09qCApg.cjs +0 -4
- package/dist/vue-ui-donut-n37BZPxr.cjs +0 -1
- package/dist/vue-ui-donut-sQunZI1L.js +0 -871
- package/dist/vue-ui-word-cloud-BhHWdmqP.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed as f, ref as k, watch as I, onMounted as X, openBlock as n, createElementBlock as r, normalizeStyle as g, createElementVNode as d, toDisplayString as _, createCommentVNode as y, unref as b, createVNode as W, Fragment as D, renderList as N, normalizeClass as P, createBlock as J } from "vue";
|
|
2
|
-
import { u as K, c as U, t as Q, a as R, p as i, d as C, b as Y, o as Z, e as V, g as ee, f as O, X as te, s as le, w as ae, i as oe } from "./index-
|
|
3
|
-
import { u as G } from "./useNestedProp-
|
|
4
|
-
import se from "./vue-ui-skeleton-
|
|
5
|
-
import { _ as ne } from "./PackageVersion-
|
|
2
|
+
import { u as K, c as U, t as Q, a as R, p as i, d as C, b as Y, o as Z, e as V, g as ee, f as O, X as te, s as le, w as ae, i as oe } from "./index-Bu852AzK.js";
|
|
3
|
+
import { u as G } from "./useNestedProp-1sCLAHuR.js";
|
|
4
|
+
import se from "./vue-ui-skeleton-B-obKEDg.js";
|
|
5
|
+
import { _ as ne } from "./PackageVersion-DDKechCD.js";
|
|
6
6
|
import { _ as re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const ue = ["xmlns", "viewBox"], ie = ["id"], ce = ["stop-color"], de = ["stop-color"], ve = ["stop-color"], ge = {
|
|
8
8
|
id: "stackPill",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-jAZxyteD.cjs"),B=require("./useNestedProp-DksYpyh6.cjs"),V=require("./vue-ui-skeleton-C14g9G-o.cjs"),z=require("./PackageVersion-Tm6EPIDH.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),P=["xmlns","viewBox"],L=["id"],A=["stop-color"],F=["stop-color"],q=["stop-color"],U={id:"stackPill",clipPathUnits:"objectBoundingBox"},j=["fill"],T={key:0,"clip-path":"url(#stackPill)"},H=["height","width","fill"],I=["onClick","x","width","height","fill","stroke"],O=["width","height","rx"],M=["onClick"],G={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},W=["height","width"],X=["fill"],J={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(S,{emit:E}){const u=S,{vue_ui_sparkstackbar:N}=o.useConfig(),f=e.computed(()=>!!u.dataset&&u.dataset.length),k=e.ref(o.createUid()),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=B.useNestedProp({userConfig:u.config,defaultConfig:N});return l.theme?{...B.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>u.config,l=>{t.value=_(),b()},{deep:!0}),e.watch(()=>u.dataset,l=>{v.value=u.dataset.map((n,a)=>({...n,color:n.color?o.convertColorToHex(n.color):g.value[a]||o.palette[a]||o.palette[a%o.palette.length]}))},{deep:!0});const g=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),v=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):g.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),m=e.ref(!0);e.onMounted(()=>{if(b(),t.value.style.animation.show){let p=function(){r+=a/l,r<a?(v.value=v.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):g.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(p)):(m.value=!1,v.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):g.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;m.value=!0,p()}});function b(){o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})})}const d=e.ref({width:500,height:16}),c=e.ref([]),C=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),x=e.computed(()=>v.value.map((l,n)=>{const a=l.value||0,r=a/C.value,p=isNaN(r)?0:r,s=p*d.value.width;return{...l,value:a,proportion:p,width:s,proportionLabel:o.dataLabel({v:p*100,s:"%",r:t.value.style.legend.percentage.rounding})}})),h=e.computed(()=>x.value.filter((l,n)=>!c.value.includes(n)));function $(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<v.value.length-1&&c.value.push(l)}const y=e.computed(()=>{let l=0;const n=[];for(let a=0;a<h.value.length;a+=1)n.push({...h.value[a],start:l}),l+=h.value[a].width;return n});function w(l,n){E("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${d.value.width} ${d.value.height}`},[e.createVNode(z._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${k.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,A),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.05),100-t.value.style.bar.gradient.intensity)},null,8,F),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,q)],8,L))),128)),e.createElementVNode("clipPath",U,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,j)])]),C.value>0?(e.openBlock(),e.createElementBlock("g",T,[e.createElementVNode("rect",{x:0,y:0,height:d.value.height,width:y.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!m.value})},null,10,H),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>w(a,r),x:a.start,y:0,width:a.width,height:d.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${k.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!m.value})},null,10,I))),128))])):(e.openBlock(),e.createElementBlock("rect",{key:1,x:2,y:1,width:d.value.width-4,height:d.value.height-2,stroke:"#CCCCCC","stroke-width":"2",fill:"transparent",rx:(d.value.height-4)/2},null,8,O))],8,P)):e.createCommentVNode("",!0),f.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:transparent;margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:p=>{$(r),w(a,r)}},[e.createElementVNode("div",G,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,X)],8,W)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.legend.value.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:a,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,M))),256))],4)):e.createCommentVNode("",!0)],4))}},K=D._export_sfc(J,[["__scopeId","data-v-cd0ed8a9"]]);exports.default=K;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-D09qCApg.cjs"),we=require("./useNestedProp-Bwd7mK1Z.cjs"),Ce=require("./useResponsive-B3TrDDIG.cjs"),Be=require("./usePrinter-DdsPm5a4.cjs"),We=require("./Slicer-B7ya0m2Q.cjs"),Ue=require("./Tooltip-CPATjuur.cjs"),Xe=require("./Title-Bjrh7khe.cjs"),Ye=require("./Legend-Dhm9_peB.cjs"),Ge=require("./vue-ui-accordion-BAHX7KzB.cjs"),Je=require("./DataTable-oa0Srfuc.cjs"),Ze=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),Ke=require("./PackageVersion-BkgJVmj1.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),je=["id"],et=["xmlns","viewBox"],tt={key:0},at=["id"],lt=["stop-color"],ot=["stop-color"],rt=["stop-color"],st=["x1","x2","y1","y2","stroke"],nt=["x1","x2","y1","y2","stroke"],it=["x1","x2","y1","y2","stroke"],ut=["x1","x2","y1","y2","stroke"],ct=["x","y","height","rx","width","fill","stroke","stroke-width"],dt=["x","y","width","rx","height","fill","stroke","stroke-width"],vt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x1","x2","y1","y2","stroke","stroke-width"],gt=["x","y","font-size","fill","font-weight"],yt=["transform","font-size","fill","font-weight"],mt=["x","y","font-size","fill","font-weight"],bt={key:0},pt=["x","y","font-size","font-weight","fill"],ft=["x","y","font-size","fill","font-weight"],kt={key:0},xt=["x","y","font-size","font-weight","fill"],wt=["x1","x2","y1","y2","stroke"],Ct=["x","y","font-size","font-weight","fill"],Bt=["x1","x2","y1","y2","stroke"],Lt=["font-size","font-weight","fill","text-anchor","transform"],St=["text-anchor","font-size","font-weight","fill","transform"],zt=["font-size","font-weight","fill","x","y"],_t=["x","y","width","height","onClick","onMouseenter","fill"],Nt=["x","y","width","height","onClick","onMouseenter","fill"],Et={key:3,class:"vue-data-ui-watermark"},Mt=["onClick"],$t=["innerHTML"],Tt={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(G,{expose:Le,emit:J}){const y=G,{vue_ui_stackbar:Se}=c.useConfig(),E=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),M=e.ref(null),W=e.ref(c.createUid()),O=e.ref(!1),Z=e.ref(null),U=e.ref(""),p=e.ref([]),K=e.ref(0),Q=e.ref(null),j=e.ref(null),ee=e.ref(null),te=e.ref(0),X=e.ref(!1),$=e.ref(null),T=e.ref(!1),ze=e.ref(0),_e=e.ref(0),Ne=e.ref(0);e.onMounted(()=>{Y()});const t=e.computed({get:()=>ae(),set:l=>l});function ae(){const l=we.useNestedProp({userConfig:y.config,defaultConfig:Se});let r={};return l.theme?r={...we.useNestedProp({userConfig:c.themes.vue_ui_stackbar[l.theme]||y.config,defaultConfig:l}),customPalette:c.themePalettes[l.theme]||c.palette}:r=l,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMin")?r.style.chart.grid.scale.scaleMin=y.config.style.chart.grid.scale.scaleMin:r.style.chart.grid.scale.scaleMin=null,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMax")?r.style.chart.grid.scale.scaleMax=y.config.style.chart.grid.scale.scaleMax:r.style.chart.grid.scale.scaleMax=null,r}e.watch(()=>y.config,l=>{t.value=ae(),Y(),ze.value+=1,_e.value+=1,Ne.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{ue()},{deep:!0});const b=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:le,isImaging:oe,generatePdf:re,generateImage:se}=Be.usePrinter({elementId:`stackbar_${W.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),D=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),Ee=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),ie=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(c.objectIsEmpty(y.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):y.dataset.forEach((l,r)=>{c.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{E.value=!1,c.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:r})})}),setTimeout(()=>{T.value=!0},10),t.value.responsive){const l=Ce.throttle(()=>{T.value=!1;const{width:r,height:a}=Ce.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Q.value:null,legend:t.value.style.chart.legend.show?j.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?ee.value:null});D.value.width=r,D.value.height=a,clearTimeout(ie.value),ie.value=setTimeout(()=>{T.value=!0},10)});ne.value=new ResizeObserver(l),ne.value.observe(M.value.parentNode)}}const s=e.computed(()=>{const{height:l,width:r}=D.value,{right:a}=D.value.paddingRatio,o=t.value.style.chart.padding.top,n=r-r*a,i=l-t.value.style.chart.padding.bottom,m=t.value.style.chart.padding.left,S=r-m-r*a,z=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:n,bottom:i,left:m,width:S,height:z<0?0:z}}),B=e.computed(()=>y.dataset.map((l,r)=>{const a=c.convertColorToHex(l.color)||Ee.value[r]||c.palette[r]||c.palette[r%c.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(o=>t.value.style.chart.bars.distributed?Math.abs(o):o),signedSeries:l.series.map(o=>o>=0?1:-1),absoluteIndex:r,id:c.createUid(),color:a}})),L=e.computed(()=>Math.max(...B.value.filter(l=>!p.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...y.dataset.map(l=>l.series.length))});function ue(){u.value={start:0,end:Math.max(...y.dataset.map(l=>l.series.length))},te.value+=1}const d=e.computed(()=>{let l;return t.value.orientation==="vertical"?l=s.value.width/(u.value.end-u.value.start):l=s.value.height/(u.value.end-u.value.start),l<=0?0:l}),V=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id))).slice(u.value.start,u.value.end)),Me=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id)).map(l=>({...l,series:l.series.map((r,a)=>l.signedSeries[a]===-1&&r>=0?-r:r)}))).slice(u.value.start,u.value.end)),I=e.computed(()=>{const l=B.value.filter(r=>!p.value.includes(r.id));return{positive:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a>=0?a:0)}))),negative:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a<0?a:0)})))}}),w=e.computed(()=>{const l=t.value.style.chart.grid.scale.scaleMax!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMax:Math.max(...I.value.positive),r=Math.min(...I.value.negative),a=t.value.style.chart.grid.scale.scaleMin!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMin:[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(n=>({zero:s.value.bottom-s.value.height*(Math.abs(o.min)/(o.max+Math.abs(o.min))),y:s.value.bottom-s.value.height*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),x:s.value.left-8,horizontal_zero:s.value.left+s.value.width*(Math.abs(o.min)/(o.max+Math.abs(o.min))),horizontal_x:s.value.left+s.value.width*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),horizontal_y:s.value.bottom-8,value:n}))}),F=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),g=e.computed(()=>{if(!E.value)return[];let l=Array(L.value).fill(0),r=Array(L.value).fill(0),a=Array(L.value).fill(0),o=Array(L.value).fill(0);const n=Math.max(...I.value.positive)||0,i=Math.min(...I.value.negative),m=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,S=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks),{min:z,max:P}=S,_=P+(z>=0?0:Math.abs(z))||1,f=s.value.height,q=s.value.width,ke=w.value[0]?w.value[0].zero:s.value.bottom,xe=w.value[0]?w.value[0].horizontal_zero:s.value.left;return B.value.filter(R=>!p.value.includes(R.id)).map(R=>{const C=R.series.slice(u.value.start,u.value.end),Pe=R.signedSeries.slice(u.value.start,u.value.end),Re=C.map((v,h)=>s.value.left+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Oe=C.map((v,h)=>s.value.top+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),De=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=f*k,N=ke-x-l[h],l[h]+=x):(x=f*k,N=ke+a[h],a[h]+=Math.abs(x)),N}),Ie=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=q*k,N=xe+r[h],r[h]+=x):(x=q*k,N=xe-Math.abs(x)-o[h],o[h]+=Math.abs(x)),N}),Ae=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?f*k:f*Math.abs(k)}),He=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?q*k:q*Math.abs(k)}),qe=C.map(v=>Math.abs(v)).reduce((v,h)=>v+h,0);return{...R,proportions:C.map((v,h)=>t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/qe),series:C,signedSeries:Pe,x:Re,y:De,height:Ae,horizontal_width:He,horizontal_y:Oe,horizontal_x:Ie}})}),ce=e.computed(()=>Me.value.map((l,r)=>({value:l,sign:l>=0?1:-1})));function A(l,r,a,o,n){const i=n===-1&&l>=0?-l:l;return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,i,c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:i,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function de(l,r,a,o){return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,c.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ve(l){const r=JSON.parse(JSON.stringify(g.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));J("selectDatapoint",{datapoint:r,period:F.value[l]})}function he(l){$.value=l,O.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(g.value)).map(n=>({name:n.name,value:n.series[l]===0?0:(n.signedSeries[l]===-1&&n.series[l]>=0?-n.series[l]:n.series[l])||null,proportion:n.proportions[l]||null,color:n.color,id:n.id})),o=a.map(n=>Math.abs(n.value)).reduce((n,i)=>n+i,0);if(c.isFunction(r)&&c.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:g.value,config:t.value})))U.value=r({seriesIndex:l,datapoint:a,series:g.value,config:t.value});else{const{showValue:n,showPercentage:i,borderColor:m,roundingValue:S,roundingPercentage:z}=t.value.style.chart.tooltip;let P="";F.value[l]&&(P+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${m};padding-bottom:6px;margin-bottom:3px;">${F.value[l]}</div>`);const _=[n&&i?"(":"",n&&i?")":""];a.reverse().forEach(f=>{P+=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-jAZxyteD.cjs"),we=require("./useNestedProp-DksYpyh6.cjs"),Ce=require("./useResponsive-B3TrDDIG.cjs"),Be=require("./usePrinter-Cx-xmAjb.cjs"),We=require("./Slicer-C0R4JA2q.cjs"),Ue=require("./Tooltip-Cb9jWppv.cjs"),Xe=require("./Title-DAEaaXFr.cjs"),Ye=require("./Legend-BJdr5n-o.cjs"),Ge=require("./vue-ui-accordion-WXKee19V.cjs"),Je=require("./DataTable-kOScyzFF.cjs"),Ze=require("./vue-ui-skeleton-C14g9G-o.cjs"),Ke=require("./PackageVersion-Tm6EPIDH.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),je=["id"],et=["xmlns","viewBox"],tt={key:0},at=["id"],lt=["stop-color"],ot=["stop-color"],rt=["stop-color"],st=["x1","x2","y1","y2","stroke"],nt=["x1","x2","y1","y2","stroke"],it=["x1","x2","y1","y2","stroke"],ut=["x1","x2","y1","y2","stroke"],ct=["x","y","height","rx","width","fill","stroke","stroke-width"],dt=["x","y","width","rx","height","fill","stroke","stroke-width"],vt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x1","x2","y1","y2","stroke","stroke-width"],gt=["x","y","font-size","fill","font-weight"],yt=["transform","font-size","fill","font-weight"],mt=["x","y","font-size","fill","font-weight"],bt={key:0},pt=["x","y","font-size","font-weight","fill"],ft=["x","y","font-size","fill","font-weight"],kt={key:0},xt=["x","y","font-size","font-weight","fill"],wt=["x1","x2","y1","y2","stroke"],Ct=["x","y","font-size","font-weight","fill"],Bt=["x1","x2","y1","y2","stroke"],Lt=["font-size","font-weight","fill","text-anchor","transform"],St=["text-anchor","font-size","font-weight","fill","transform"],zt=["font-size","font-weight","fill","x","y"],_t=["x","y","width","height","onClick","onMouseenter","fill"],Nt=["x","y","width","height","onClick","onMouseenter","fill"],Et={key:3,class:"vue-data-ui-watermark"},Mt=["onClick"],$t=["innerHTML"],Tt={__name:"vue-ui-stackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint","selectLegend"],setup(G,{expose:Le,emit:J}){const y=G,{vue_ui_stackbar:Se}=c.useConfig(),E=e.computed({get(){return!!y.dataset&&y.dataset.length},set(l){return l}}),M=e.ref(null),W=e.ref(c.createUid()),O=e.ref(!1),Z=e.ref(null),U=e.ref(""),p=e.ref([]),K=e.ref(0),Q=e.ref(null),j=e.ref(null),ee=e.ref(null),te=e.ref(0),X=e.ref(!1),$=e.ref(null),T=e.ref(!1),ze=e.ref(0),_e=e.ref(0),Ne=e.ref(0);e.onMounted(()=>{Y()});const t=e.computed({get:()=>ae(),set:l=>l});function ae(){const l=we.useNestedProp({userConfig:y.config,defaultConfig:Se});let r={};return l.theme?r={...we.useNestedProp({userConfig:c.themes.vue_ui_stackbar[l.theme]||y.config,defaultConfig:l}),customPalette:c.themePalettes[l.theme]||c.palette}:r=l,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMin")?r.style.chart.grid.scale.scaleMin=y.config.style.chart.grid.scale.scaleMin:r.style.chart.grid.scale.scaleMin=null,y.config&&c.hasDeepProperty(y.config,"style.chart.grid.scale.scaleMax")?r.style.chart.grid.scale.scaleMax=y.config.style.chart.grid.scale.scaleMax:r.style.chart.grid.scale.scaleMax=null,r}e.watch(()=>y.config,l=>{t.value=ae(),Y(),ze.value+=1,_e.value+=1,Ne.value+=1},{deep:!0}),e.watch(()=>y.dataset,l=>{ue()},{deep:!0});const b=e.ref({dataLabels:{show:t.value.style.chart.bars.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),{isPrinting:le,isImaging:oe,generatePdf:re,generateImage:se}=Be.usePrinter({elementId:`stackbar_${W.value}`,fileName:t.value.style.chart.title.text||"vue-ui-stackbar"}),D=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,paddingRatio:{top:t.value.style.chart.padding.top/t.value.style.chart.height,right:t.value.style.chart.padding.right/t.value.style.chart.width,bottom:t.value.style.chart.padding.bottom/t.value.style.chart.height,left:t.value.style.chart.padding.left/t.value.style.chart.width}}),Ee=e.computed(()=>c.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),ie=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(c.objectIsEmpty(y.dataset)?c.error({componentName:"VueUiStackbar",type:"dataset"}):y.dataset.forEach((l,r)=>{c.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{E.value=!1,c.error({componentName:"VueUiStackbar",type:"datasetSerieAttribute",property:a,index:r})})}),setTimeout(()=>{T.value=!0},10),t.value.responsive){const l=Ce.throttle(()=>{T.value=!1;const{width:r,height:a}=Ce.useResponsive({chart:M.value,title:t.value.style.chart.title.text?Q.value:null,legend:t.value.style.chart.legend.show?j.value:null,slicer:t.value.style.chart.zoom.show&&L.value>1?ee.value:null});D.value.width=r,D.value.height=a,clearTimeout(ie.value),ie.value=setTimeout(()=>{T.value=!0},10)});ne.value=new ResizeObserver(l),ne.value.observe(M.value.parentNode)}}const s=e.computed(()=>{const{height:l,width:r}=D.value,{right:a}=D.value.paddingRatio,o=t.value.style.chart.padding.top,n=r-r*a,i=l-t.value.style.chart.padding.bottom,m=t.value.style.chart.padding.left,S=r-m-r*a,z=l-o-t.value.style.chart.padding.bottom;return{chartHeight:l,chartWidth:r,top:o,right:n,bottom:i,left:m,width:S,height:z<0?0:z}}),B=e.computed(()=>y.dataset.map((l,r)=>{const a=c.convertColorToHex(l.color)||Ee.value[r]||c.palette[r]||c.palette[r%c.palette.length];return{...l,series:JSON.parse(JSON.stringify(l.series)).map(o=>t.value.style.chart.bars.distributed?Math.abs(o):o),signedSeries:l.series.map(o=>o>=0?1:-1),absoluteIndex:r,id:c.createUid(),color:a}})),L=e.computed(()=>Math.max(...B.value.filter(l=>!p.value.includes(l.id)).map(l=>l.series.length))),u=e.ref({start:0,end:Math.max(...y.dataset.map(l=>l.series.length))});function ue(){u.value={start:0,end:Math.max(...y.dataset.map(l=>l.series.length))},te.value+=1}const d=e.computed(()=>{let l;return t.value.orientation==="vertical"?l=s.value.width/(u.value.end-u.value.start):l=s.value.height/(u.value.end-u.value.start),l<=0?0:l}),V=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id))).slice(u.value.start,u.value.end)),Me=e.computed(()=>c.sumSeries(B.value.filter(l=>!p.value.includes(l.id)).map(l=>({...l,series:l.series.map((r,a)=>l.signedSeries[a]===-1&&r>=0?-r:r)}))).slice(u.value.start,u.value.end)),I=e.computed(()=>{const l=B.value.filter(r=>!p.value.includes(r.id));return{positive:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a>=0?a:0)}))),negative:c.sumSeries(l.map(r=>({...r,series:r.series.slice(u.value.start,u.value.end).map(a=>a<0?a:0)})))}}),w=e.computed(()=>{const l=t.value.style.chart.grid.scale.scaleMax!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMax:Math.max(...I.value.positive),r=Math.min(...I.value.negative),a=t.value.style.chart.grid.scale.scaleMin!==null&&!t.value.style.chart.bars.distributed?t.value.style.chart.grid.scale.scaleMin:[-1/0,1/0,NaN,void 0,null].includes(r)?0:r,o=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(a>0?0:a,l<0?0:l,t.value.style.chart.grid.scale.ticks);return o.ticks.map(n=>({zero:s.value.bottom-s.value.height*(Math.abs(o.min)/(o.max+Math.abs(o.min))),y:s.value.bottom-s.value.height*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),x:s.value.left-8,horizontal_zero:s.value.left+s.value.width*(Math.abs(o.min)/(o.max+Math.abs(o.min))),horizontal_x:s.value.left+s.value.width*((n+Math.abs(o.min))/(o.max+Math.abs(o.min))),horizontal_y:s.value.bottom-8,value:n}))}),F=e.computed(()=>t.value.style.chart.grid.x.timeLabels.values.slice(u.value.start,u.value.end)),g=e.computed(()=>{if(!E.value)return[];let l=Array(L.value).fill(0),r=Array(L.value).fill(0),a=Array(L.value).fill(0),o=Array(L.value).fill(0);const n=Math.max(...I.value.positive)||0,i=Math.min(...I.value.negative),m=[-1/0,1/0,NaN,void 0,null].includes(i)?0:i,S=!t.value.style.chart.bars.distributed&&(t.value.style.chart.grid.scale.scaleMax!==null||t.value.style.chart.grid.scale.scaleMin!==null)?c.calculateNiceScaleWithExactExtremes(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks):c.calculateNiceScale(t.value.style.chart.grid.scale.scaleMin!==null?t.value.style.chart.grid.scale.scaleMin:m>0?0:m,t.value.style.chart.grid.scale.scaleMax!==null?t.value.style.chart.grid.scale.scaleMax:n<0?0:n,t.value.style.chart.grid.scale.ticks),{min:z,max:P}=S,_=P+(z>=0?0:Math.abs(z))||1,f=s.value.height,q=s.value.width,ke=w.value[0]?w.value[0].zero:s.value.bottom,xe=w.value[0]?w.value[0].horizontal_zero:s.value.left;return B.value.filter(R=>!p.value.includes(R.id)).map(R=>{const C=R.series.slice(u.value.start,u.value.end),Pe=R.signedSeries.slice(u.value.start,u.value.end),Re=C.map((v,h)=>s.value.left+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),Oe=C.map((v,h)=>s.value.top+d.value*h+d.value*t.value.style.chart.bars.gapRatio/4),De=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=f*k,N=ke-x-l[h],l[h]+=x):(x=f*k,N=ke+a[h],a[h]+=Math.abs(x)),N}),Ie=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;let N,x;return v>0?(x=q*k,N=xe+r[h],r[h]+=x):(x=q*k,N=xe-Math.abs(x)-o[h],o[h]+=Math.abs(x)),N}),Ae=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?f*k:f*Math.abs(k)}),He=C.map((v,h)=>{const k=t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/_;return v>0?q*k:q*Math.abs(k)}),qe=C.map(v=>Math.abs(v)).reduce((v,h)=>v+h,0);return{...R,proportions:C.map((v,h)=>t.value.style.chart.bars.distributed?(v||0)/V.value[h]:(v||0)/qe),series:C,signedSeries:Pe,x:Re,y:De,height:Ae,horizontal_width:He,horizontal_y:Oe,horizontal_x:Ie}})}),ce=e.computed(()=>Me.value.map((l,r)=>({value:l,sign:l>=0?1:-1})));function A(l,r,a,o,n){const i=n===-1&&l>=0?-l:l;return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,i,c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:i,s:t.value.style.chart.bars.dataLabels.suffix,r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function de(l,r,a,o){return c.applyDataLabel(t.value.style.chart.bars.dataLabels.formatter,l,c.dataLabel({v:l,s:"%",r:t.value.style.chart.bars.dataLabels.rounding}),{datapoint:r,seriesIndex:a,datapointIndex:o})}function ve(l){const r=JSON.parse(JSON.stringify(g.value)).map(a=>({name:a.name,value:a.series[l]===0?0:a.series[l]||null,proportion:a.proportions[l]||null,color:a.color,id:a.id}));J("selectDatapoint",{datapoint:r,period:F.value[l]})}function he(l){$.value=l,O.value=!0;const r=t.value.style.chart.tooltip.customFormat,a=JSON.parse(JSON.stringify(g.value)).map(n=>({name:n.name,value:n.series[l]===0?0:(n.signedSeries[l]===-1&&n.series[l]>=0?-n.series[l]:n.series[l])||null,proportion:n.proportions[l]||null,color:n.color,id:n.id})),o=a.map(n=>Math.abs(n.value)).reduce((n,i)=>n+i,0);if(c.isFunction(r)&&c.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:g.value,config:t.value})))U.value=r({seriesIndex:l,datapoint:a,series:g.value,config:t.value});else{const{showValue:n,showPercentage:i,borderColor:m,roundingValue:S,roundingPercentage:z}=t.value.style.chart.tooltip;let P="";F.value[l]&&(P+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${m};padding-bottom:6px;margin-bottom:3px;">${F.value[l]}</div>`);const _=[n&&i?"(":"",n&&i?")":""];a.reverse().forEach(f=>{P+=`
|
|
2
2
|
<div style="display:flex;flex-direction:row;align-items:center;gap:4px">
|
|
3
3
|
<svg viewBox="0 0 12 12" height="14" width="14"><rect rx="1" x="0" y="0" height="12" width="12" stroke="none" fill="${t.value.style.chart.bars.gradient.show?`url(#gradient_${f.id})`:f.color}"/></svg>
|
|
4
4
|
${f.name}${n||i?":":""} ${n?c.dataLabel({p:t.value.style.chart.bars.dataLabels.prefix,v:f.value,s:t.value.style.chart.bars.dataLabels.suffix,r:S}):""} ${_[0]}${i?c.dataLabel({v:isNaN(f.value/o)?0:Math.abs(f.value)/o*100,s:"%",r:z}):""}${_[1]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as p, ref as b, onMounted as He, watch as Be, openBlock as s, createElementBlock as u, normalizeClass as he, normalizeStyle as B, renderSlot as _, createVNode as oe, createCommentVNode as v, createBlock as Q, unref as C, createSlots as ft, withCtx as z, normalizeProps as W, guardReactiveProps as X, Fragment as h, renderList as f, createElementVNode as D, toDisplayString as S, createTextVNode as mt } from "vue";
|
|
2
|
-
import { u as pt, c as We, t as xt, a as kt, p as se,
|
|
3
|
-
import { u as Ke } from "./useNestedProp-
|
|
2
|
+
import { u as pt, c as We, t as xt, a as kt, p as se, M as Xe, b as wt, o as _t, e as Ue, g as Ct, d as zt, a3 as ie, $ as Ye, C as Ge, X as Lt, l as St, F as Je, f as E, x as qe, i as Ze, y as $t, q as Mt, r as Tt } from "./index-Bu852AzK.js";
|
|
3
|
+
import { u as Ke } from "./useNestedProp-1sCLAHuR.js";
|
|
4
4
|
import { t as Nt, u as Ot } from "./useResponsive-NZB-WLRF.js";
|
|
5
|
-
import { u as Pt, U as Rt } from "./usePrinter-
|
|
6
|
-
import { S as It } from "./Slicer-
|
|
7
|
-
import { _ as Ft } from "./Tooltip-
|
|
8
|
-
import { _ as Vt } from "./Title-
|
|
9
|
-
import { L as At } from "./Legend-
|
|
10
|
-
import Dt from "./vue-ui-accordion-
|
|
11
|
-
import { D as Et } from "./DataTable-
|
|
12
|
-
import Ht from "./vue-ui-skeleton-
|
|
13
|
-
import { _ as Bt } from "./PackageVersion-
|
|
5
|
+
import { u as Pt, U as Rt } from "./usePrinter-CaNEdNUc.js";
|
|
6
|
+
import { S as It } from "./Slicer-DBVND1TR.js";
|
|
7
|
+
import { _ as Ft } from "./Tooltip-Cwp4dS4t.js";
|
|
8
|
+
import { _ as Vt } from "./Title-B6kWQmNb.js";
|
|
9
|
+
import { L as At } from "./Legend-CZk6McMv.js";
|
|
10
|
+
import Dt from "./vue-ui-accordion-CBwmD_zS.js";
|
|
11
|
+
import { D as Et } from "./DataTable-D1vDu_2B.js";
|
|
12
|
+
import Ht from "./vue-ui-skeleton-B-obKEDg.js";
|
|
13
|
+
import { _ as Bt } from "./PackageVersion-DDKechCD.js";
|
|
14
14
|
import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const Xt = ["id"], Ut = ["xmlns", "viewBox"], Yt = { key: 0 }, Gt = ["id"], Jt = ["stop-color"], qt = ["stop-color"], Zt = ["stop-color"], Kt = ["x1", "x2", "y1", "y2", "stroke"], Qt = ["x1", "x2", "y1", "y2", "stroke"], jt = ["x1", "x2", "y1", "y2", "stroke"], ea = ["x1", "x2", "y1", "y2", "stroke"], ta = ["x", "y", "height", "rx", "width", "fill", "stroke", "stroke-width"], aa = ["x", "y", "width", "rx", "height", "fill", "stroke", "stroke-width"], la = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ra = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], oa = ["x", "y", "font-size", "fill", "font-weight"], sa = ["transform", "font-size", "fill", "font-weight"], ia = ["x", "y", "font-size", "fill", "font-weight"], ua = { key: 0 }, na = ["x", "y", "font-size", "font-weight", "fill"], ca = ["x", "y", "font-size", "fill", "font-weight"], va = { key: 0 }, ha = ["x", "y", "font-size", "font-weight", "fill"], da = ["x1", "x2", "y1", "y2", "stroke"], ya = ["x", "y", "font-size", "font-weight", "fill"], ga = ["x1", "x2", "y1", "y2", "stroke"], ba = ["font-size", "font-weight", "fill", "text-anchor", "transform"], fa = ["text-anchor", "font-size", "font-weight", "fill", "transform"], ma = ["font-size", "font-weight", "fill", "x", "y"], pa = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], xa = ["x", "y", "width", "height", "onClick", "onMouseenter", "fill"], ka = {
|
|
16
16
|
key: 3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D09qCApg.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-Bjrh7khe.cjs"),Q=require("./usePrinter-DdsPm5a4.cjs"),ce=require("./Tooltip-CPATjuur.cjs"),ve=require("./DataTable-oa0Srfuc.cjs"),de=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),he=require("./Shape-hGbEoQOv.cjs"),pe=require("./vue-ui-accordion-BAHX7KzB.cjs"),Z=require("./useNestedProp-Bwd7mK1Z.cjs"),me=require("./PackageVersion-BkgJVmj1.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],be=["xmlns","viewBox"],ge={key:0},ke={key:0},xe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ce={key:1},we=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Be=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x1","x2","y1","y2","stroke","stroke-width"],Ne=["x","y","fill","font-size"],Se=["x","y","font-size","fill"],$e=["fill","font-size","transform"],Le=["fill","font-size","x","y"],Te=["x1","x2","y1","y2","stroke"],Pe=["cx","cy","fill"],Ee=["cx","cy","fill"],ze=["id"],Ve=["stop-color"],Ae=["stop-color"],Fe=["stop-color"],Oe={key:0},De=["x","y","font-size","fill"],Me={key:3,class:"vue-data-ui-watermark"},We=["innerHTML"],Ie={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(ee,{expose:te,emit:le}){const v=ee,{vue_ui_strip_plot:ae}=o.useConfig(),p=e.computed({get(){return!!v.dataset&&v.dataset.length},set(l){return l}}),L=e.ref(o.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>M(),set:l=>l});function M(){const l=Z.useNestedProp({userConfig:v.config,defaultConfig:ae});return l.theme?{...Z.useNestedProp({userConfig:o.themes.vue_ui_strip_plot[l.theme]||v.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>v.config,l=>{t.value=M(),W(),O.value+=1,D.value+=1},{deep:!0});const C=e.ref(null);e.onMounted(()=>{W()});function W(){if(o.objectIsEmpty(v.dataset)?o.error({componentName:"VueUiStripPlot",type:"dataset"}):v.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=K.throttle(()=>{const{width:s,height:a}=K.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,y.value.width=s,y.value.height=a,k.value=(s-d.value.left-d.value.right)/v.dataset.length,B.value=o.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},oe.value*50)}e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:I,isImaging:G,generatePdf:q,generateImage:R}=Q.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),U=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),y=e.ref({width:k.value*v.dataset.length+d.value.left+d.value.right,height:t.value.style.chart.height}),r=e.computed(()=>{const l=k.value*v.dataset.length+d.value.left+d.value.right;return{left:d.value.left,right:l-d.value.right,top:d.value.top,bottom:w.value-d.value.bottom,width:k.value*v.dataset.length,height:w.value-d.value.top-d.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?v.dataset.map((l,s)=>{const a=o.createUid();return{...l,id:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],plots:l.plots.map(n=>({...n,value:o.checkNaN(n.value),parentId:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:o.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:r.value.left+(s+1)*r.value.stripWidth-r.value.stripWidth/2}))}))),oe=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),E=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>o.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),re=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:r.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*r.value.height}))}))),H=e.computed(()=>m.value.ticks.map(l=>({y:r.value.bottom-r.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:r.value.left,x2:r.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function se({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(o.isFunction(a)&&o.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))P.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${o.applyDataLabel(t.value.style.chart.labels.formatter,l.value,o.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</div>`,P.value=`<div>${n}</div>`}}const N=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function j(){e.nextTick(()=>{const l=N.value.head.map((n,u)=>[[n.name],[N.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=o.createCsvContent(s);o.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=N.value.head.map((u,f)=>{const $=o.dataLabel({p:t.value.style.chart.labels.prefix,v:N.value.body[f],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},$]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:a}}),x=e.ref(!1);function ne(l){x.value=l,V.value+=1}function ue(){return h.value}function X(){c.value.showTable=!c.value.showTable}function Y(){c.value.dataLabels.show=!c.value.dataLabels.show}function J(){c.value.showTooltip=!c.value.showTooltip}return te({getData:ue,generatePdf:q,generateCsv:j,generateImage:R,toggleTable:X,toggleLabels:Y,toggleTooltip:J}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(G),uid:L.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,onToggleFullscreen:ne,onGeneratePdf:e.unref(q),onGenerateCsv:j,onGenerateImage:e.unref(R),onToggleTable:X,onToggleLabels:Y,onToggleTooltip:J},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};`)},[e.createVNode(me._sfc_main),t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",ge,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,xe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+(n+1)*r.value.stripWidth,x2:r.value.left+(n+1)*r.value.stripWidth,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,we))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,Be),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,_e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(H.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding}),{datapoint:a,seriesIndex:n})),9,Ne))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+(n+1)*r.value.stripWidth-r.value.stripWidth/2,y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Se))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${r.value.top+r.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,$e)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:r.value.left+r.value.width/2,y:r.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Le)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Te),e.createElementVNode("circle",{cx:r.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Pe),e.createElementVNode("circle",{cx:r.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ee)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(o.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ve),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(o.darkenHexColor)(a.color,.1)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Fe)],8,ze))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createBlock(he._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:r.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:$=>se({datapoint:u,seriesIndex:f}),onMouseleave:s[0]||(s[0]=$=>{T.value=!1,i.value=null}),onClick:$=>le("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${f*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,u.value,e.unref(o.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}),{datapoint:u,seriesIndex:f}):""),13,De)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:r.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ce._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:P.value,isCustom:e.unref(o.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(pe.default,{key:5,hideDetails:"",config:{open:c.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.openBlock(),e.createBlock(ve.DataTable,{key:`table_${D.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ye))}},Ge=fe._export_sfc(Ie,[["__scopeId","data-v-85774736"]]);exports.default=Ge;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-jAZxyteD.cjs"),K=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-DAEaaXFr.cjs"),Q=require("./usePrinter-Cx-xmAjb.cjs"),ce=require("./Tooltip-Cb9jWppv.cjs"),ve=require("./DataTable-kOScyzFF.cjs"),de=require("./vue-ui-skeleton-C14g9G-o.cjs"),he=require("./Shape-CHWOgbhq.cjs"),pe=require("./vue-ui-accordion-WXKee19V.cjs"),Z=require("./useNestedProp-DksYpyh6.cjs"),me=require("./PackageVersion-Tm6EPIDH.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],be=["xmlns","viewBox"],ge={key:0},ke={key:0},xe=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Ce={key:1},we=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],Be=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x1","x2","y1","y2","stroke","stroke-width"],Ne=["x","y","fill","font-size"],Se=["x","y","font-size","fill"],$e=["fill","font-size","transform"],Le=["fill","font-size","x","y"],Te=["x1","x2","y1","y2","stroke"],Pe=["cx","cy","fill"],Ee=["cx","cy","fill"],ze=["id"],Ve=["stop-color"],Ae=["stop-color"],Fe=["stop-color"],Oe={key:0},De=["x","y","font-size","fill"],Me={key:3,class:"vue-data-ui-watermark"},We=["innerHTML"],Ie={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(ee,{expose:te,emit:le}){const v=ee,{vue_ui_strip_plot:ae}=o.useConfig(),p=e.computed({get(){return!!v.dataset&&v.dataset.length},set(l){return l}}),L=e.ref(o.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),O=e.ref(0),D=e.ref(0),t=e.computed({get:()=>M(),set:l=>l});function M(){const l=Z.useNestedProp({userConfig:v.config,defaultConfig:ae});return l.theme?{...Z.useNestedProp({userConfig:o.themes.vue_ui_strip_plot[l.theme]||v.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>v.config,l=>{t.value=M(),W(),O.value+=1,D.value+=1},{deep:!0});const C=e.ref(null);e.onMounted(()=>{W()});function W(){if(o.objectIsEmpty(v.dataset)?o.error({componentName:"VueUiStripPlot",type:"dataset"}):v.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=K.throttle(()=>{const{width:s,height:a}=K.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,y.value.width=s,y.value.height=a,k.value=(s-d.value.left-d.value.right)/v.dataset.length,B.value=o.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},oe.value*50)}e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:I,isImaging:G,generatePdf:q,generateImage:R}=Q.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),U=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),y=e.ref({width:k.value*v.dataset.length+d.value.left+d.value.right,height:t.value.style.chart.height}),r=e.computed(()=>{const l=k.value*v.dataset.length+d.value.left+d.value.right;return{left:d.value.left,right:l-d.value.right,top:d.value.top,bottom:w.value-d.value.bottom,width:k.value*v.dataset.length,height:w.value-d.value.top-d.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?v.dataset.map((l,s)=>{const a=o.createUid();return{...l,id:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],plots:l.plots.map(n=>({...n,value:o.checkNaN(n.value),parentId:a,color:l.color?o.convertColorToHex(l.color):U.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:o.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:r.value.left+(s+1)*r.value.stripWidth-r.value.stripWidth/2}))}))),oe=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),E=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>o.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),re=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:r.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*r.value.height}))}))),H=e.computed(()=>m.value.ticks.map(l=>({y:r.value.bottom-r.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:r.value.left,x2:r.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function se({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(o.isFunction(a)&&o.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))P.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${o.applyDataLabel(t.value.style.chart.labels.formatter,l.value,o.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</div>`,P.value=`<div>${n}</div>`}}const N=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function j(){e.nextTick(()=>{const l=N.value.head.map((n,u)=>[[n.name],[N.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=o.createCsvContent(s);o.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const S=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=N.value.head.map((u,f)=>{const $=o.dataLabel({p:t.value.style.chart.labels.prefix,v:N.value.body[f],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},$]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:a}}),x=e.ref(!1);function ne(l){x.value=l,V.value+=1}function ue(){return h.value}function X(){c.value.showTable=!c.value.showTable}function Y(){c.value.dataLabels.show=!c.value.dataLabels.show}function J(){c.value.showTooltip=!c.value.showTooltip}return te({getData:ue,generatePdf:q,generateCsv:j,generateImage:R,toggleTable:X,toggleLabels:Y,toggleTooltip:J}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(ie._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(G),uid:L.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,onToggleFullscreen:ne,onGeneratePdf:e.unref(q),onGenerateCsv:j,onGenerateImage:e.unref(R),onToggleTable:X,onToggleLabels:Y,onToggleTooltip:J},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};`)},[e.createVNode(me._sfc_main),t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",ge,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,xe))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+(n+1)*r.value.stripWidth,x2:r.value.left+(n+1)*r.value.stripWidth,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,we))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,Be),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,_e)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(H.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding}),{datapoint:a,seriesIndex:n})),9,Ne))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+(n+1)*r.value.stripWidth-r.value.stripWidth/2,y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Se))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${r.value.top+r.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,$e)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:r.value.left+r.value.width/2,y:r.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Le)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Te),e.createElementVNode("circle",{cx:r.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Pe),e.createElementVNode("circle",{cx:r.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ee)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(o.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Ve),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(o.darkenHexColor)(a.color,.1)},null,8,Ae),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Fe)],8,ze))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(re.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createBlock(he._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:r.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:$=>se({datapoint:u,seriesIndex:f}),onMouseleave:s[0]||(s[0]=$=>{T.value=!1,i.value=null}),onClick:$=>le("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${f*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[f===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,u.value,e.unref(o.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}),{datapoint:u,seriesIndex:f}):""),13,De)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:r.value},void 0,!0)],14,be)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(ce._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:P.value,isCustom:e.unref(o.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(pe.default,{key:5,hideDetails:"",config:{open:c.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.openBlock(),e.createBlock(ve.DataTable,{key:`table_${D.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,We)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ye))}},Ge=fe._export_sfc(Ie,[["__scopeId","data-v-85774736"]]);exports.default=Ge;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as p, ref as n, watch as Ne, onMounted as Ae, onBeforeUnmount as Oe, openBlock as s, createElementBlock as i, normalizeClass as F, normalizeStyle as q, createBlock as P, createCommentVNode as c, unref as h, createSlots as Fe, withCtx as b, renderSlot as m, normalizeProps as H, guardReactiveProps as R, createVNode as be, Fragment as g, renderList as C, createElementVNode as x, toDisplayString as T, mergeProps as We, createTextVNode as Ie, nextTick as Me } from "vue";
|
|
2
|
-
import { u as De, c as K, t as Ge, a as Ee, p as L, o as Ve, e as Q, g as me, b as He, d as ge, v as Re, C as Ue, f as U, X as Be, i as Z, l as Xe, h as je, x as xe, y as Ye, q as Je, r as qe, E as Ke } from "./index-
|
|
2
|
+
import { u as De, c as K, t as Ge, a as Ee, p as L, o as Ve, e as Q, g as me, b as He, d as ge, v as Re, C as Ue, f as U, X as Be, i as Z, l as Xe, h as je, x as xe, y as Ye, q as Je, r as qe, E as Ke } from "./index-Bu852AzK.js";
|
|
3
3
|
import { t as Qe, u as Ze } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as et } from "./Title-
|
|
5
|
-
import { u as tt, U as lt } from "./usePrinter-
|
|
6
|
-
import { _ as at } from "./Tooltip-
|
|
7
|
-
import { D as ot } from "./DataTable-
|
|
8
|
-
import st from "./vue-ui-skeleton-
|
|
9
|
-
import { _ as rt } from "./Shape-
|
|
10
|
-
import ut from "./vue-ui-accordion-
|
|
11
|
-
import { u as ke } from "./useNestedProp-
|
|
12
|
-
import { _ as it } from "./PackageVersion-
|
|
4
|
+
import { _ as et } from "./Title-B6kWQmNb.js";
|
|
5
|
+
import { u as tt, U as lt } from "./usePrinter-CaNEdNUc.js";
|
|
6
|
+
import { _ as at } from "./Tooltip-Cwp4dS4t.js";
|
|
7
|
+
import { D as ot } from "./DataTable-D1vDu_2B.js";
|
|
8
|
+
import st from "./vue-ui-skeleton-B-obKEDg.js";
|
|
9
|
+
import { _ as rt } from "./Shape-CY3Tsyaq.js";
|
|
10
|
+
import ut from "./vue-ui-accordion-CBwmD_zS.js";
|
|
11
|
+
import { u as ke } from "./useNestedProp-1sCLAHuR.js";
|
|
12
|
+
import { _ as it } from "./PackageVersion-DDKechCD.js";
|
|
13
13
|
import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const vt = ["id"], ct = ["xmlns", "viewBox"], ht = { key: 0 }, dt = { key: 0 }, pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], yt = { key: 1 }, ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], gt = ["x", "y", "fill", "font-size"], xt = ["x", "y", "font-size", "fill"], kt = ["fill", "font-size", "transform"], Ct = ["fill", "font-size", "x", "y"], _t = ["x1", "x2", "y1", "y2", "stroke"], wt = ["cx", "cy", "fill"], $t = ["cx", "cy", "fill"], Tt = ["id"], Lt = ["stop-color"], St = ["stop-color"], Pt = ["stop-color"], zt = { key: 0 }, Nt = ["x", "y", "font-size", "fill"], At = {
|
|
15
15
|
key: 3,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-jAZxyteD.cjs"),e=require("vue"),b=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C={name:"vue-ui-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},data(){return{uid:`vue-ui-table-${Math.random()}`,bodyCopy:JSON.parse(JSON.stringify(this.dataset.body)).map((l,o)=>({...l,absoluteIndex:o})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.config.rowsPerPage?this.config.rowsPerPage:25,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.config.rowsPerPage?this.config.rowsPerPage:25,this.dataset.body.length])].sort((l,o)=>l-o),palette:g.palette,percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.dataset.body)).map((l,o)=>({...l,absoluteIndex:o})),tableHead:JSON.parse(JSON.stringify(this.dataset.header)).map(l=>({average:Object.hasOwn(l,"average")?l.average:!1,decimals:Object.hasOwn(l,"decimals")?l.decimals:0,isMultiselect:Object.hasOwn(l,"isMultiselect")?l.isMultiselect:!1,isPercentage:Object.hasOwn(l,"isPercentage")?l.isPercentage:!1,isSearch:Object.hasOwn(l,"isSearch")?l.isSearch:!1,isSort:Object.hasOwn(l,"isSort")?l.isSort:!1,name:l.name,percentageTo:Object.hasOwn(l,"percentageTo")?l.percentageTo:void 0,prefix:Object.hasOwn(l,"prefix")?l.prefix:"",rangeFilter:Object.hasOwn(l,"rangeFilter")?l.rangeFilter:!1,suffix:Object.hasOwn(l,"suffix")?l.suffix:"",sum:Object.hasOwn(l,"sum")?l.sum:!1,type:l.type}))}},mounted(){if(this.dataset.header.length===0)throw new Error(`vue-ui-table error: missing header data.
|
|
2
2
|
Provide an array of objects of type:
|
|
3
3
|
{
|
|
4
4
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as D, u as x, A as G, m as M, d as T, B as E, q as z, r as B,
|
|
1
|
+
import { p as D, u as x, A as G, m as M, d as T, B as E, q as z, r as B, Y as H } from "./index-Bu852AzK.js";
|
|
2
2
|
import { openBlock as i, createElementBlock as c, normalizeStyle as g, createElementVNode as a, toDisplayString as u, Fragment as b, renderList as _, normalizeClass as f, createTextVNode as I, createCommentVNode as N, withDirectives as k, vModelText as w, withKeys as S, withModifiers as O, vModelSelect as P, createStaticVNode as R, pushScopeId as U, popScopeId as V } from "vue";
|
|
3
3
|
import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const X = {
|
|
@@ -563,7 +563,7 @@ Provide an array of objects of type:
|
|
|
563
563
|
this.clientX = s.clientX - l.width / 2, this.clientY = s.clientY - l.height / 2, this.rafId = null;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
}, F = (s) => (U("data-v-5a108fbd"), s = s(), V(), s),
|
|
566
|
+
}, F = (s) => (U("data-v-5a108fbd"), s = s(), V(), s), Y = { class: "vue-ui-table-export-hub" }, W = ["innerHTML"], K = ["data-is-open"], Z = /* @__PURE__ */ F(() => /* @__PURE__ */ a("b", { class: "vue-ui-table-export-hub-title" }, " Export ", -1)), q = { class: "vue-ui-table-export-hub-options" }, J = { class: "vue-ui-table-export-hub-option-wrapper" }, Q = { class: "label" }, $ = ["innerHTML"], ee = { class: "vue-ui-table-export-hub-option-wrapper" }, te = { class: "label" }, se = ["innerHTML"], re = { class: "vue-ui-table" }, ne = { id: "tableHead" }, le = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), oe = { key: 0 }, ae = { key: 0 }, ie = { key: 1 }, ce = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), ue = {
|
|
567
567
|
key: 0,
|
|
568
568
|
style: { display: "flex", "align-items": "center", "justify-content": "flex-end" }
|
|
569
569
|
}, he = ["innerHTML"], de = {
|
|
@@ -575,7 +575,7 @@ Provide an array of objects of type:
|
|
|
575
575
|
}, fe = { class: "date-wrapper--inputs" }, _e = { class: "date-fieldset" }, Ce = ["for"], Ie = ["id", "onUpdate:modelValue", "onInput"], Fe = { class: "date-fieldset" }, ve = ["for"], ke = ["id", "onUpdate:modelValue", "onInput"], pe = { class: "date-wrapper--button" }, we = ["onClick"], Se = ["innerHTML"], Oe = ["innerHTML"], Le = ["innerHTML"], Ae = ["onClick", "disabled"], De = ["placeholder", "onUpdate:modelValue", "name"], xe = ["onClick"], Ge = ["innerHTML"], Me = ["innerHTML"], Te = ["innerHTML"], Ee = ["onClick", "innerHTML"], ze = ["innerHTML"], Be = {
|
|
576
576
|
key: 5,
|
|
577
577
|
class: "th-range-filter"
|
|
578
|
-
}, He = ["for"], Pe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒥ", -1)), Re = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒣ", -1)), Ue = ["id", "max", "min", "onUpdate:modelValue"], Ve = ["id", "max", "min", "onUpdate:modelValue"], je = ["for"], Xe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒪ", -1)),
|
|
578
|
+
}, He = ["for"], Pe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒥ", -1)), Re = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒣ", -1)), Ue = ["id", "max", "min", "onUpdate:modelValue"], Ve = ["id", "max", "min", "onUpdate:modelValue"], je = ["for"], Xe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒪ", -1)), Ye = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒧ", -1)), We = ["onClick", "disabled"], Ke = ["id"], Ze = ["onClick"], qe = ["onClick", "onKeyup"], Je = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), Qe = ["innerHTML", "onClick", "onKeyup"], $e = ["data-row"], et = ["data-row"], tt = ["data-row", "onClick", "onKeyup", "id"], st = ["innerHTML"], rt = { key: 1 }, nt = { key: 2 }, lt = { key: 5 }, ot = ["innerHTML"], at = { key: 0 }, it = { style: { "margin-left": "12px" } }, ct = { class: "format-num" }, ut = { style: { "margin-left": "12px" } }, ht = {
|
|
579
579
|
key: 0,
|
|
580
580
|
class: "format-num"
|
|
581
581
|
}, dt = {
|
|
@@ -605,18 +605,18 @@ Provide an array of objects of type:
|
|
|
605
605
|
}, wt = ["max", "value"], St = { key: 1 }, Ot = ["disabled"], Lt = ["innerHTML", "disabled"], At = { class: "chart-modal-options" }, Dt = ["innerHTML"], xt = ["innerHTML"], Gt = ["innerHTML"], Mt = { style: { "margin-bottom": "12px" } }, Tt = { key: 0 }, Et = { key: 1 }, zt = {
|
|
606
606
|
style: { width: "100%", height: "fit-content", cursor: "move" },
|
|
607
607
|
ref: "chartModal"
|
|
608
|
-
}, Bt = { class: "vue-ui-table-fieldset" }, Ht = { class: "vue-ui-table-fieldset-wrapper" }, Pt = ["name", "id", "checked", "onInput"], Rt = ["for"], Ut = ["disabled"], Vt = ["innerHTML"], jt = ["viewBox"], Xt = ["markerWidth", "markerHeight", "refY"],
|
|
608
|
+
}, Bt = { class: "vue-ui-table-fieldset" }, Ht = { class: "vue-ui-table-fieldset-wrapper" }, Pt = ["name", "id", "checked", "onInput"], Rt = ["for"], Ut = ["disabled"], Vt = ["innerHTML"], jt = ["viewBox"], Xt = ["markerWidth", "markerHeight", "refY"], Yt = ["points", "fill"], Wt = ["x2", "y1", "y2", "stroke", "stroke-width"], Kt = ["y2", "stroke", "stroke-width"], Zt = ["x", "width", "height", "fill"], qt = /* @__PURE__ */ R('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DD" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DD80" data-v-5a108fbd></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DD80" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DD" data-v-5a108fbd></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DDB3" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DD66" data-v-5a108fbd></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DD66" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DDB3" data-v-5a108fbd></stop></linearGradient>', 4), Jt = ["x", "y", "height", "width", "fill", "stroke"], Qt = ["x", "y", "width"], $t = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], es = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], ts = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ss = ["x", "y", "width"], rs = ["x", "width", "height", "onMouseenter"], ns = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], ls = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", null, "---", -1)), os = ["d", "stroke"], as = ["x", "y"], is = { class: "vue-ui-table-donut-label-name" }, cs = ["fill"], us = ["fill"], hs = ["fill"], ds = ["fill"], gs = { class: "vue-ui-table-donut-legend" };
|
|
609
609
|
function ys(s, r, l, h, t, e) {
|
|
610
610
|
return i(), c("div", {
|
|
611
611
|
class: "vue-ui-table-main",
|
|
612
612
|
style: g(`font-family: ${e.FINAL_CONFIG.fontFamily}`)
|
|
613
613
|
}, [
|
|
614
|
-
a("div",
|
|
614
|
+
a("div", Y, [
|
|
615
615
|
a("button", {
|
|
616
616
|
onClick: r[0] || (r[0] = (n) => t.isExportRequest = !t.isExportRequest),
|
|
617
617
|
innerHTML: e.icons.export,
|
|
618
618
|
style: g(`background:${e.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${e.FINAL_CONFIG.style.exportMenu.color}`)
|
|
619
|
-
}, null, 12,
|
|
619
|
+
}, null, 12, W),
|
|
620
620
|
a("div", {
|
|
621
621
|
class: "vue-ui-table-export-hub-dropdown",
|
|
622
622
|
"data-is-open": t.isExportRequest || "false",
|
|
@@ -862,7 +862,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
862
862
|
}, [
|
|
863
863
|
Xe,
|
|
864
864
|
I(" max "),
|
|
865
|
-
|
|
865
|
+
Ye
|
|
866
866
|
], 8, je)
|
|
867
867
|
])) : N("", !0),
|
|
868
868
|
e.canResetColumn(o, n) ? (i(), c("button", {
|
|
@@ -870,7 +870,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
870
870
|
onClick: (d) => e.resetFilter(o, n, d),
|
|
871
871
|
disabled: e.isResetDisabled(o, n),
|
|
872
872
|
class: "th-reset"
|
|
873
|
-
}, " ✖ ", 8,
|
|
873
|
+
}, " ✖ ", 8, We)) : N("", !0),
|
|
874
874
|
n.isMultiselect ? (i(), c("div", {
|
|
875
875
|
key: 7,
|
|
876
876
|
class: "th-dropdown",
|
|
@@ -1205,7 +1205,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
1205
1205
|
a("polygon", {
|
|
1206
1206
|
points: `0 0, ${e.FINAL_CONFIG.style.chart.layout.progression.arrowSize} ${e.FINAL_CONFIG.style.chart.layout.progression.arrowSize / 2}, 0 ${e.FINAL_CONFIG.style.chart.layout.progression.arrowSize}`,
|
|
1207
1207
|
fill: e.FINAL_CONFIG.style.chart.layout.progression.stroke
|
|
1208
|
-
}, null, 8,
|
|
1208
|
+
}, null, 8, Yt)
|
|
1209
1209
|
], 8, Xt)
|
|
1210
1210
|
]),
|
|
1211
1211
|
a("g", null, [
|
|
@@ -1217,7 +1217,7 @@ function ys(s, r, l, h, t, e) {
|
|
|
1217
1217
|
stroke: e.FINAL_CONFIG.style.chart.layout.axis.stroke,
|
|
1218
1218
|
"stroke-width": e.FINAL_CONFIG.style.chart.layout.axis.strokeWidth,
|
|
1219
1219
|
"stroke-linecap": "round"
|
|
1220
|
-
}, null, 8,
|
|
1220
|
+
}, null, 8, Wt),
|
|
1221
1221
|
a("line", {
|
|
1222
1222
|
x1: 0,
|
|
1223
1223
|
x2: 0,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useCssVars as Q, ref as h, computed as c, watch as Y, onMounted as Z, openBlock as s, createElementBlock as l, normalizeStyle as $, normalizeClass as
|
|
2
|
-
import { u as oe, c as G, t as ne, o as se, e as le,
|
|
3
|
-
import { u as S } from "./useNestedProp-
|
|
4
|
-
import { u as pe, U as ve } from "./usePrinter-
|
|
5
|
-
import { _ as me } from "./Shape-
|
|
1
|
+
import { useCssVars as Q, ref as h, computed as c, watch as Y, onMounted as Z, openBlock as s, createElementBlock as l, normalizeStyle as $, normalizeClass as E, createBlock as j, unref as g, createSlots as ee, withCtx as C, renderSlot as r, normalizeProps as p, guardReactiveProps as f, createCommentVNode as m, createElementVNode as y, Fragment as _, renderList as w, createVNode as te, mergeProps as M, nextTick as ae } from "vue";
|
|
2
|
+
import { u as oe, c as G, t as ne, o as se, e as le, W as re, F as ue, N as ie, q as de, r as ce } from "./index-Bu852AzK.js";
|
|
3
|
+
import { u as S } from "./useNestedProp-1sCLAHuR.js";
|
|
4
|
+
import { u as pe, U as ve } from "./usePrinter-CaNEdNUc.js";
|
|
5
|
+
import { _ as me } from "./Shape-CY3Tsyaq.js";
|
|
6
6
|
import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell"], Ce = {
|
|
8
8
|
key: 0,
|
|
@@ -63,7 +63,7 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
63
63
|
const { isPrinting: D, isImaging: H, generatePdf: P, generateImage: N } = pe({
|
|
64
64
|
elementId: `table_heatmap_${k.value}`,
|
|
65
65
|
fileName: "vue-ui-table-heatmap"
|
|
66
|
-
}), L = c(() => t.value.table.responsiveBreakpoint),
|
|
66
|
+
}), L = c(() => t.value.table.responsiveBreakpoint), W = c(() => !!v.dataset && v.dataset.length);
|
|
67
67
|
Z(() => {
|
|
68
68
|
O();
|
|
69
69
|
});
|
|
@@ -94,24 +94,24 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
94
94
|
displayValues: [e.name, ...e.values],
|
|
95
95
|
id: G()
|
|
96
96
|
};
|
|
97
|
-
})),
|
|
97
|
+
})), T = c(() => {
|
|
98
98
|
const e = R.value.flatMap((n) => n.values);
|
|
99
99
|
return {
|
|
100
100
|
min: Math.min(...e),
|
|
101
101
|
max: Math.max(...e)
|
|
102
102
|
};
|
|
103
103
|
});
|
|
104
|
-
function
|
|
104
|
+
function X(e, n) {
|
|
105
105
|
const a = t.value.style.heatmapColors.useIndividualScale;
|
|
106
|
-
return ie(t.value.style.heatmapColors.min, t.value.style.heatmapColors.max, a ? n.min :
|
|
106
|
+
return ie(t.value.style.heatmapColors.min, t.value.style.heatmapColors.max, a ? n.min : T.value.min, a ? n.max : T.value.max, e);
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const V = c(() => R.value.map((e) => ({
|
|
109
109
|
...e,
|
|
110
|
-
colors: e.displayValues.map((n) => isNaN(n) ? t.value.style.backgroundColor :
|
|
110
|
+
colors: e.displayValues.map((n) => isNaN(n) ? t.value.style.backgroundColor : X(n, e.serieExtremes))
|
|
111
111
|
}))), q = c(() => t.value.style.backgroundColor), J = c(() => `${t.value.table.borderWidth}px`);
|
|
112
|
-
function
|
|
112
|
+
function z() {
|
|
113
113
|
ae(() => {
|
|
114
|
-
const e =
|
|
114
|
+
const e = V.value.map((o) => [
|
|
115
115
|
[o.name],
|
|
116
116
|
o.displayValues,
|
|
117
117
|
[o.sum],
|
|
@@ -126,16 +126,16 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
126
126
|
}
|
|
127
127
|
return U({
|
|
128
128
|
generatePdf: P,
|
|
129
|
-
generateCsv:
|
|
129
|
+
generateCsv: z,
|
|
130
130
|
generateImage: N
|
|
131
131
|
}), (e, n) => (s(), l("div", {
|
|
132
132
|
ref_key: "tableContainer",
|
|
133
133
|
ref: b,
|
|
134
134
|
style: $(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${t.value.userOptions.show ? "36px" : ""}; ${I.value ? "vue-data-ui-wrapper-fullscreen" : ""}; position:relative;`),
|
|
135
|
-
class:
|
|
135
|
+
class: E({ "vue-ui-responsive": u.value }),
|
|
136
136
|
id: `table_heatmap_${k.value}`
|
|
137
137
|
}, [
|
|
138
|
-
t.value.userOptions.show &&
|
|
138
|
+
t.value.userOptions.show && W.value ? (s(), j(ve, {
|
|
139
139
|
ref: "details",
|
|
140
140
|
key: `user_option_${x.value}`,
|
|
141
141
|
backgroundColor: t.value.style.backgroundColor,
|
|
@@ -153,7 +153,7 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
153
153
|
position: t.value.userOptions.position,
|
|
154
154
|
onToggleFullscreen: K,
|
|
155
155
|
onGeneratePdf: g(P),
|
|
156
|
-
onGenerateCsv:
|
|
156
|
+
onGenerateCsv: z,
|
|
157
157
|
onGenerateImage: g(N)
|
|
158
158
|
}, ee({ _: 2 }, [
|
|
159
159
|
e.$slots.optionPdf ? {
|
|
@@ -186,7 +186,7 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
186
186
|
} : void 0
|
|
187
187
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : m("", !0),
|
|
188
188
|
y("table", {
|
|
189
|
-
class:
|
|
189
|
+
class: E({ "vue-ui-table-heatmap": !0 }),
|
|
190
190
|
style: $(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor};`)
|
|
191
191
|
}, [
|
|
192
192
|
y("caption", null, [
|
|
@@ -203,7 +203,7 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
203
203
|
], 4)
|
|
204
204
|
]),
|
|
205
205
|
y("tbody", null, [
|
|
206
|
-
(s(!0), l(_, null, w(
|
|
206
|
+
(s(!0), l(_, null, w(V.value, (a, o) => (s(), l("tr", ye, [
|
|
207
207
|
(s(!0), l(_, null, w(a.displayValues, (d, i) => (s(), l("td", {
|
|
208
208
|
role: "cell",
|
|
209
209
|
"data-cell": t.value.table.head.values[i]
|
|
@@ -225,8 +225,8 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
225
225
|
], 8, _e)) : m("", !0),
|
|
226
226
|
r(e.$slots, "rowTitle", p(f({ value: d, rowIndex: o, colIndex: i, type: typeof d, isResponsive: u.value })), void 0, !0)
|
|
227
227
|
])) : (s(), l(_, { key: 1 }, [
|
|
228
|
-
i === 0 ? r(e.$slots, "rowTitle", p(
|
|
229
|
-
i > 0 ? r(e.$slots, "cell", p(
|
|
228
|
+
i === 0 ? r(e.$slots, "rowTitle", p(M({ key: 0 }, { value: d, rowIndex: o, colIndex: i, type: typeof d, isResponsive: u.value })), void 0, !0) : m("", !0),
|
|
229
|
+
i > 0 ? r(e.$slots, "cell", p(M({ key: 1 }, { value: d, rowIndex: o, colIndex: i, type: typeof d, isResponsive: u.value, color: a.colors[i], textColor: g(ue)(a.colors[i]) })), void 0, !0) : m("", !0)
|
|
230
230
|
], 64))
|
|
231
231
|
], 8, be))), 256)),
|
|
232
232
|
t.value.table.showSum ? (s(), l("td", ke, [
|
|
@@ -243,7 +243,7 @@ const he = ["id"], ge = { role: "cell" }, ye = { role: "row" }, be = ["data-cell
|
|
|
243
243
|
], 4)
|
|
244
244
|
], 14, he));
|
|
245
245
|
}
|
|
246
|
-
},
|
|
246
|
+
}, Te = /* @__PURE__ */ fe(we, [["__scopeId", "data-v-2bd72dde"]]);
|
|
247
247
|
export {
|
|
248
|
-
|
|
248
|
+
Te as default
|
|
249
249
|
};
|