vue-data-ui 2.4.3 → 2.4.4
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/README.md +3 -1
- package/dist/{Arrow-C7lNL7sY.js → Arrow-AxsI-FAh.js} +1 -1
- package/dist/{Arrow-Dz6AomGr.cjs → Arrow-W6XO2WVI.cjs} +1 -1
- package/dist/{BaseIcon-uALK38Ov.cjs → BaseIcon-BTn_oML7.cjs} +1 -1
- package/dist/{BaseIcon-BbvG1AlW.js → BaseIcon-BX3x6oa7.js} +1 -1
- package/dist/{DataTable-DYqC2pqu.js → DataTable-BI1tjiA_.js} +2 -2
- package/dist/{DataTable-DTzynbND.cjs → DataTable-RUQ1G_6L.cjs} +1 -1
- package/dist/{Legend-Cgw4lO2O.cjs → Legend-B86sMXn7.cjs} +1 -1
- package/dist/{Legend-DNgTCgEK.js → Legend-CRMHjbGw.js} +1 -1
- package/dist/{PackageVersion-VkaUzgmt.js → PackageVersion-Clrfvyd8.js} +1 -1
- package/dist/{PackageVersion-DwI-KhXH.cjs → PackageVersion-CowXQ4IM.cjs} +1 -1
- package/dist/{PenAndPaper-DAZYA8Ew.js → PenAndPaper-BQzgk5kO.js} +2 -2
- package/dist/{PenAndPaper-CDFVOo7X.cjs → PenAndPaper-DBSxk9Xk.cjs} +1 -1
- package/dist/{Shape-Bwon0l0g.js → Shape-DYNtRer6.js} +1 -1
- package/dist/{Shape-D2Dpshg1.cjs → Shape-qK3MNdTg.cjs} +1 -1
- package/dist/{Slicer-TfpN2Cr4.js → Slicer-DFPDip5U.js} +3 -3
- package/dist/{Slicer-uSjfNJjG.cjs → Slicer-NlxLkUso.cjs} +1 -1
- package/dist/{Title-C5pIfQAz.js → Title-710895ks.js} +1 -1
- package/dist/{Title-0Tp4hZ4u.cjs → Title-CUN1T6KC.cjs} +1 -1
- package/dist/{Tooltip-9Tp2Yrd1.cjs → Tooltip-BapDtYOM.cjs} +1 -1
- package/dist/{Tooltip-Cz24YLfw.js → Tooltip-CPlG_yQU.js} +1 -1
- package/dist/{index-eFox7weK.cjs → index-CcykRspI.cjs} +1 -1
- package/dist/{index-Bya_q1J-.js → index-DCsPHn9C.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-B33hazbH.js → useNestedProp-DdSlLeTW.js} +1 -1
- package/dist/{useNestedProp-BkgEhTQY.cjs → useNestedProp-XtPlFP9O.cjs} +1 -1
- package/dist/{usePrinter-CSRFnDBU.cjs → usePrinter-BcE45wW6.cjs} +1 -1
- package/dist/{usePrinter-CiHd1FwD.js → usePrinter-siG3sKWo.js} +1 -1
- package/dist/useResponsive-BJ7DTGpm.cjs +1 -0
- package/dist/{useResponsive-BY8tgM1n.js → useResponsive-CoxXLe23.js} +8 -7
- package/dist/{vue-data-ui-BTtxyUc3.cjs → vue-data-ui-C0o1kZzC.cjs} +1 -1
- package/dist/{vue-data-ui-Bduq4f2p.js → vue-data-ui-D_MTGc8j.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BUEq_VdY.js → vue-ui-3d-bar-BdzWvy4d.js} +9 -9
- package/dist/{vue-ui-3d-bar-B-P7PMHs.cjs → vue-ui-3d-bar-C298Bf3V.cjs} +1 -1
- package/dist/{vue-ui-accordion-TEMpM1hO.cjs → vue-ui-accordion-B7PTyFVk.cjs} +1 -1
- package/dist/{vue-ui-accordion-DfUfL2dI.js → vue-ui-accordion-D4Er5Dy5.js} +3 -3
- package/dist/vue-ui-age-pyramid-BIcB5vtU.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CH72tAMb.js → vue-ui-age-pyramid-CHEdFQb7.js} +145 -137
- package/dist/{vue-ui-annotator-DPeJ2its.js → vue-ui-annotator-CqM_1HlB.js} +1 -1
- package/dist/{vue-ui-annotator-DU_DJKCw.cjs → vue-ui-annotator-eGtZcHeb.cjs} +1 -1
- package/dist/{vue-ui-bullet-CtP3MlUT.js → vue-ui-bullet-DBk50kIe.js} +75 -69
- package/dist/vue-ui-bullet-DURgZGgp.cjs +34 -0
- package/dist/{vue-ui-candlestick-DDil13a0.js → vue-ui-candlestick-Bo41qkGe.js} +240 -232
- package/dist/vue-ui-candlestick-CP4Z-29b.cjs +2 -0
- package/dist/{vue-ui-carousel-table-BaeIxyc0.js → vue-ui-carousel-table-CkNOqa9q.js} +4 -4
- package/dist/{vue-ui-carousel-table-C7SJIOG-.cjs → vue-ui-carousel-table-lMqx64wd.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BczSJF6S.js → vue-ui-chestnut-CNWq-epB.js} +262 -256
- package/dist/vue-ui-chestnut-qxzF2ND7.cjs +6 -0
- package/dist/{vue-ui-cursor-Dg_Dmww-.js → vue-ui-cursor-B4m30Gqz.js} +2 -2
- package/dist/{vue-ui-cursor-C2Pj_CI_.cjs → vue-ui-cursor-BEv39HVY.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Bul9dqx1.js → vue-ui-dashboard-BL9IgDDx.js} +2 -2
- package/dist/{vue-ui-dashboard-Cg020NiT.cjs → vue-ui-dashboard-DnoXstlp.cjs} +1 -1
- package/dist/{vue-ui-digits-B8iAa4YZ.js → vue-ui-digits-CVPDJ6tl.js} +2 -2
- package/dist/{vue-ui-digits-Ctgd84JR.cjs → vue-ui-digits-D1RaU4V-.cjs} +1 -1
- package/dist/{vue-ui-donut-DUcp-fat.js → vue-ui-donut-C65SAJKb.js} +338 -330
- package/dist/vue-ui-donut-CMC92CXL.cjs +1 -0
- package/dist/vue-ui-donut-evolution-7gIM4bVk.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-C_YMbTwq.js → vue-ui-donut-evolution-BFbBlmBx.js} +163 -156
- package/dist/{vue-ui-dumbbell-Buwngz_V.js → vue-ui-dumbbell-BnxRfvv0.js} +208 -200
- package/dist/vue-ui-dumbbell-OCo67ZKp.cjs +9 -0
- package/dist/vue-ui-flow-BPnpYrzb.cjs +1 -0
- package/dist/{vue-ui-flow-Bz3c0K5P.js → vue-ui-flow-Cra_F-tK.js} +130 -124
- package/dist/vue-ui-galaxy-3zTk9Pr1.cjs +1 -0
- package/dist/{vue-ui-galaxy-Cjh0XGTX.js → vue-ui-galaxy-DlJ7v0aD.js} +125 -119
- package/dist/{vue-ui-gauge-B1UvGkQa.js → vue-ui-gauge-CsqVvNxE.js} +167 -159
- package/dist/vue-ui-gauge-DcUNJZI1.cjs +1 -0
- package/dist/{vue-ui-gizmo-DFW6HnHp.cjs → vue-ui-gizmo-BkkLoCyx.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DUQ4t-At.js → vue-ui-gizmo-Peyy8li7.js} +3 -3
- package/dist/vue-ui-heatmap-DYb831An.cjs +1 -0
- package/dist/{vue-ui-heatmap-C-poazUw.js → vue-ui-heatmap-i4HFM04D.js} +156 -149
- package/dist/{vue-ui-kpi-Z4Oi4raz.cjs → vue-ui-kpi-CCrdcv3r.cjs} +1 -1
- package/dist/{vue-ui-kpi-DXe-vxAk.js → vue-ui-kpi-gSKVVqZg.js} +3 -3
- package/dist/{vue-ui-mini-loader-MMvpm9pz.cjs → vue-ui-mini-loader-CqutMcQI.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BVtHTqxS.js → vue-ui-mini-loader-D7Jk1LJb.js} +2 -2
- package/dist/{vue-ui-molecule-BaJpDZND.js → vue-ui-molecule-CgdepnhM.js} +109 -103
- package/dist/vue-ui-molecule-CwUObXAx.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BUNDwsEI.js → vue-ui-mood-radar-Bxro4962.js} +173 -166
- package/dist/vue-ui-mood-radar-RQFKS7Br.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-mDy2hXa6.js → vue-ui-nested-donuts-B7dXBejH.js} +311 -303
- package/dist/vue-ui-nested-donuts-D8ZGqIGC.cjs +17 -0
- package/dist/vue-ui-onion-Dtt0kw8E.cjs +5 -0
- package/dist/{vue-ui-onion-DwFG3HAI.js → vue-ui-onion-i52wztm0.js} +149 -141
- package/dist/vue-ui-parallel-coordinate-plot-DNK0BrBy.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-ImET_zeo.js → vue-ui-parallel-coordinate-plot-DUssrm08.js} +186 -178
- package/dist/{vue-ui-quadrant-BeveRihK.js → vue-ui-quadrant-BORPtgQO.js} +225 -217
- package/dist/vue-ui-quadrant-a_I5E71f.cjs +1 -0
- package/dist/vue-ui-quick-chart-BpPDfK78.cjs +15 -0
- package/dist/{vue-ui-quick-chart-DAhllTfa.js → vue-ui-quick-chart-yb1FzVdt.js} +386 -378
- package/dist/{vue-ui-radar-BllatzRa.js → vue-ui-radar-CoCbl19A.js} +172 -164
- package/dist/vue-ui-radar-DZMngiqq.cjs +1 -0
- package/dist/{vue-ui-rating-D1ykV4xO.js → vue-ui-rating-D-zwuvLK.js} +2 -2
- package/dist/{vue-ui-rating-BoZo7caL.cjs → vue-ui-rating-nTJ8DDhG.cjs} +1 -1
- package/dist/vue-ui-relation-circle-CW9qozhJ.js +366 -0
- package/dist/vue-ui-relation-circle-Wj_yrVJc.cjs +1 -0
- package/dist/vue-ui-rings-BZaZIGEz.cjs +2 -0
- package/dist/{vue-ui-rings-B-ZcX6y1.js → vue-ui-rings-Bx2GEh6d.js} +196 -188
- package/dist/{vue-ui-scatter-DG43ck1g.js → vue-ui-scatter-BARiPzro.js} +288 -280
- package/dist/vue-ui-scatter-C-i1NZgz.cjs +1 -0
- package/dist/{vue-ui-screenshot-p3ca8cAl.js → vue-ui-screenshot-CuiJqlfo.js} +1 -1
- package/dist/{vue-ui-screenshot-C1JBP_N0.cjs → vue-ui-screenshot-CwOoftGV.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BYssP0K4.js → vue-ui-skeleton-DNuwx6_y.js} +3 -3
- package/dist/{vue-ui-skeleton-BqKzuhkB.cjs → vue-ui-skeleton-DpfJbsNA.cjs} +1 -1
- package/dist/{vue-ui-smiley-D7dDCdpq.js → vue-ui-smiley-BnX27B0k.js} +2 -2
- package/dist/{vue-ui-smiley-BXKVpHl2.cjs → vue-ui-smiley-DGE9NFBY.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-GWFrO_0z.js → vue-ui-spark-trend-CgCLrMox.js} +5 -5
- package/dist/{vue-ui-spark-trend-9V60hM3Z.cjs → vue-ui-spark-trend-aW-de-rX.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bgn6AY0q.cjs → vue-ui-sparkbar-BLUXUlTY.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CwqlyAyv.js → vue-ui-sparkbar-BXku33sq.js} +4 -4
- package/dist/{vue-ui-sparkgauge-F2XbiXyA.js → vue-ui-sparkgauge-Doi0iu0L.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Dqntz2Zv.cjs → vue-ui-sparkgauge-RTiKvSMp.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DRIKK6Ym.js → vue-ui-sparkhistogram-BnMvXlAP.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DnY4-Sdn.cjs → vue-ui-sparkhistogram-C6AgJH1C.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Cxtzdlhi.js → vue-ui-sparkline-DI7fq_MR.js} +5 -5
- package/dist/{vue-ui-sparkline-CAEs-gtK.cjs → vue-ui-sparkline-DpVCQ6W9.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-D37ms1rx.cjs → vue-ui-sparkstackbar-Bvuq2sLW.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-0A1klq9s.js → vue-ui-sparkstackbar-oNnE5z1C.js} +4 -4
- package/dist/{vue-ui-stackbar-ByOuJSdM.js → vue-ui-stackbar-6g7b3yyu.js} +13 -13
- package/dist/{vue-ui-stackbar-wun4S3C0.cjs → vue-ui-stackbar-aWJDGIKV.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CMD0MSqY.js → vue-ui-strip-plot-BFM8HIM8.js} +204 -196
- package/dist/vue-ui-strip-plot-GdjjVxMN.cjs +1 -0
- package/dist/{vue-ui-table-B75DJ39t.js → vue-ui-table-Cw4Yz-IE.js} +1 -1
- package/dist/{vue-ui-table-aj0XZ7T5.cjs → vue-ui-table-XOPmDCOB.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Ce93TyBF.cjs → vue-ui-table-heatmap-Bh48bMuU.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BO2ugWqD.js → vue-ui-table-heatmap-DeRCR8l6.js} +4 -4
- package/dist/{vue-ui-table-sparkline-D6KJjDnU.cjs → vue-ui-table-sparkline-C25qj1w_.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CbjfAaj2.js → vue-ui-table-sparkline-w3H-od91.js} +5 -5
- package/dist/{vue-ui-thermometer-Pq4PvSIP.js → vue-ui-thermometer-BySEVhT8.js} +171 -165
- package/dist/vue-ui-thermometer-DZrusaGY.cjs +1 -0
- package/dist/{vue-ui-timer-B6IB6yS6.cjs → vue-ui-timer-1p6J6hTn.cjs} +1 -1
- package/dist/{vue-ui-timer-Bk3BvB-B.js → vue-ui-timer-BN-9a2lj.js} +6 -6
- package/dist/vue-ui-tiremarks-CvIJeWKE.cjs +1 -0
- package/dist/{vue-ui-tiremarks-CU9HJIqf.js → vue-ui-tiremarks-EzYdOMyf.js} +119 -112
- package/dist/vue-ui-treemap-CzNOr1iR.cjs +1 -0
- package/dist/{vue-ui-treemap-DY-lRAhC.js → vue-ui-treemap-Da0f6vaF.js} +266 -258
- package/dist/vue-ui-vertical-bar-B9shdfqo.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CtnIKsM1.js → vue-ui-vertical-bar-D1cBfu5p.js} +245 -237
- package/dist/vue-ui-waffle-Cg-7Fazv.cjs +1 -0
- package/dist/{vue-ui-waffle-reOsx-gJ.js → vue-ui-waffle-DM2LsEP7.js} +224 -216
- package/dist/{vue-ui-wheel-kYxny3vn.js → vue-ui-wheel-B9cmixxi.js} +125 -117
- package/dist/vue-ui-wheel-C-JukdTy.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DwLY4QdB.cjs → vue-ui-word-cloud-BLMWYOPy.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DbMqrHAf.js → vue-ui-word-cloud-Baz7RXN2.js} +11 -11
- package/dist/vue-ui-xy-BHeSkJQ3.cjs +3 -0
- package/dist/{vue-ui-xy-rbACig0h.js → vue-ui-xy-DVnzVSqE.js} +302 -291
- package/dist/{vue-ui-xy-canvas-B0HTR7OV.js → vue-ui-xy-canvas-A7PKnWBs.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CgJd5FiT.cjs → vue-ui-xy-canvas-DAd-B98z.cjs} +1 -1
- package/package.json +1 -1
- package/dist/useResponsive-CodiGUOE.cjs +0 -1
- package/dist/vue-ui-age-pyramid-DsbZ1qcQ.cjs +0 -1
- package/dist/vue-ui-bullet-D8ks_rKr.cjs +0 -34
- package/dist/vue-ui-candlestick-D1jdr0bv.cjs +0 -2
- package/dist/vue-ui-chestnut-ih5r0Bj9.cjs +0 -6
- package/dist/vue-ui-donut-D7KT9EAp.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CHtJ8iOK.cjs +0 -1
- package/dist/vue-ui-dumbbell-B0dikuqO.cjs +0 -9
- package/dist/vue-ui-flow-D6rc8J-8.cjs +0 -1
- package/dist/vue-ui-galaxy-CmTt0vBf.cjs +0 -1
- package/dist/vue-ui-gauge-B_TKuyM7.cjs +0 -1
- package/dist/vue-ui-heatmap-C2HlnqzO.cjs +0 -1
- package/dist/vue-ui-molecule-BiYIcOKN.cjs +0 -1
- package/dist/vue-ui-mood-radar-C6jMyFkb.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DKO2dFKo.cjs +0 -17
- package/dist/vue-ui-onion-GWNoZRhw.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-DODn4Ohf.cjs +0 -8
- package/dist/vue-ui-quadrant-yuFAxV-5.cjs +0 -1
- package/dist/vue-ui-quick-chart-DgFDBzjS.cjs +0 -15
- package/dist/vue-ui-radar-BJH5SE6-.cjs +0 -1
- package/dist/vue-ui-relation-circle-CKmjOle7.cjs +0 -1
- package/dist/vue-ui-relation-circle-xv2l5Be9.js +0 -358
- package/dist/vue-ui-rings-DjH3CK23.cjs +0 -2
- package/dist/vue-ui-scatter-SBCXAl7q.cjs +0 -1
- package/dist/vue-ui-strip-plot-IQrypGvz.cjs +0 -1
- package/dist/vue-ui-thermometer-swmi4FmH.cjs +0 -1
- package/dist/vue-ui-tiremarks-Cn79uQH2.cjs +0 -1
- package/dist/vue-ui-treemap-BEMuKV7x.cjs +0 -1
- package/dist/vue-ui-vertical-bar-B1e2RxTv.cjs +0 -4
- package/dist/vue-ui-waffle-BqP7Okgu.cjs +0 -1
- package/dist/vue-ui-wheel-BuWUGnkC.cjs +0 -1
- package/dist/vue-ui-xy-CGWzriYn.cjs +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./html2canvas.esm-BA_v9SIU.cjs"),I=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./html2canvas.esm-BA_v9SIU.cjs"),I=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-CcykRspI.cjs"),o=require("vue"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),f={props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},data(){return{activeShape:void 0,strokeSize:1,currentPointer:{start:{x:0,y:0},end:{x:0,end:0}},currentTarget:void 0,hoveredShapeId:void 0,isBold:!1,isBulletTextMode:!1,isDash:!1,isDeleteMode:!1,isDrawing:!1,isDrawingNewShape:!0,isDrawMode:!1,isItalic:!1,isMouseDown:!1,isMoveMode:!1,isPrinting:!1,isResizeMode:!1,isSelectMode:!1,isSummaryOpen:!1,isTextMode:!1,isUnderline:!1,isWriting:!1,lastSelectedShape:this.dataset.lastSelectedShape,pointerDownId:-1,pointerPosition:{x:0,y:0},preventEdit:!0,selectedGroup:[],shapes:this.dataset.shapes?this.dataset.shapes:[],shapesOrder:[],step:Math.round(Math.random())*1e5,svgHeight:1e3,svgWidth:1e3,options:{arrow:{color:"grey",filled:!0},circle:{color:"grey",filled:!1,radius:3,strokeWidth:2},rect:{color:"grey",filled:!1,strokeWidth:2,height:12,width:12}},selectedColor:"#000000",showCaret:!1,sizeRatio:1,slottedSvg:void 0,sourceWidth:1,sourceHeight:1,textAlign:"start",textFont:20,transparency:100,transparencyCodes:u.opacity}},watch:{shapes:{handler(e){e.length===0&&(this.lastSelectedShape=void 0)}}},computed:{FINAL_CONFIG(){const e=u.useConfig().vue_ui_annotator;if(!Object.keys(this.config||{}).length)return e;const l=this.treeShake({defaultConfig:e,userConfig:this.config});return this.convertConfigColors(l)},canSelect(){return this.shapes.filter(e=>!["line","group"].includes(e.type)).length>1},colorTransparency(){return this.transparencyCodes[this.transparency>98?98:this.transparency]},cursorClass(){switch(!0){case this.isDeleteMode:return"default";case this.isMoveMode:return"move";case this.isTextMode:return"text";case this.isResizeMode:return"se-resize";default:return""}},records(){return this.shapes},userShapes(){return this.records.map(e=>{switch(!0){case(e&&e.type==="arrow"):const l=e.strokeWidth>3?5:10,s=e.strokeWidth>3?2.5:5;return`
|
|
2
2
|
<defs>
|
|
3
3
|
<marker
|
|
4
4
|
id="${e.id}"
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import { ref as d, computed as g, onMounted as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as J } from "./useNestedProp-
|
|
4
|
-
import { _ as
|
|
5
|
-
import { L as
|
|
6
|
-
import { u as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { P as
|
|
9
|
-
import
|
|
10
|
-
import { _ as
|
|
11
|
-
const
|
|
12
|
-
key:
|
|
1
|
+
import { ref as d, computed as g, onMounted as ce, watch as V, onBeforeUnmount as he, openBlock as r, createElementBlock as n, normalizeClass as q, normalizeStyle as X, createBlock as k, createCommentVNode as u, unref as v, createSlots as ve, withCtx as w, renderSlot as y, normalizeProps as I, guardReactiveProps as O, createVNode as de, Fragment as H, renderList as T, createElementVNode as x, toDisplayString as L } from "vue";
|
|
2
|
+
import { u as ge, o as fe, e as Y, g as me, c as ye, l as pe, C as be, d as ke, i as $, f as B, X as we, t as xe } from "./index-DCsPHn9C.js";
|
|
3
|
+
import { u as J } from "./useNestedProp-DdSlLeTW.js";
|
|
4
|
+
import { _ as _e } from "./Title-710895ks.js";
|
|
5
|
+
import { L as Ce } from "./Legend-CRMHjbGw.js";
|
|
6
|
+
import { u as Le, U as $e } from "./usePrinter-siG3sKWo.js";
|
|
7
|
+
import { _ as Be } from "./PackageVersion-Clrfvyd8.js";
|
|
8
|
+
import { P as Ae } from "./PenAndPaper-BQzgk5kO.js";
|
|
9
|
+
import Pe from "./vue-ui-skeleton-DNuwx6_y.js";
|
|
10
|
+
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const Se = ["id"], Ie = {
|
|
12
|
+
key: 1,
|
|
13
|
+
ref: "noTitle",
|
|
14
|
+
class: "vue-data-ui-no-title-space",
|
|
15
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
16
|
+
}, Oe = ["xmlns", "viewBox"], He = { key: 0 }, Te = ["x", "y", "height", "width", "fill", "stroke"], Ne = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], ze = ["x", "y", "height", "width", "fill", "stroke", "stroke-width"], Me = ["x", "y", "font-size", "font-weight", "fill"], Ue = ["x", "y", "height", "width", "rx", "fill", "stroke", "stroke-width"], We = { key: 3 }, Ee = ["x", "y", "fill", "font-size", "font-weight"], Re = { key: 4 }, De = ["x1", "x2", "y1", "y2", "stroke"], Ge = {
|
|
17
|
+
key: 5,
|
|
13
18
|
class: "vue-data-ui-watermark"
|
|
14
|
-
},
|
|
19
|
+
}, je = {
|
|
15
20
|
class: "vue-ui-bullet-legend-item",
|
|
16
21
|
dir: "auto"
|
|
17
|
-
},
|
|
18
|
-
key:
|
|
22
|
+
}, Ve = { style: { "margin-right": "2px" } }, qe = {
|
|
23
|
+
key: 7,
|
|
19
24
|
ref: "source",
|
|
20
25
|
dir: "auto"
|
|
21
|
-
},
|
|
26
|
+
}, Xe = {
|
|
22
27
|
__name: "vue-ui-bullet",
|
|
23
28
|
props: {
|
|
24
29
|
config: {
|
|
@@ -35,7 +40,7 @@ const Fe = ["id"], Se = ["xmlns", "viewBox"], Ie = { key: 0 }, Oe = ["x", "y", "
|
|
|
35
40
|
}
|
|
36
41
|
},
|
|
37
42
|
setup(K, { expose: Q }) {
|
|
38
|
-
const o = K, { vue_ui_bullet: Z } =
|
|
43
|
+
const o = K, { vue_ui_bullet: Z } = ge(), A = d(null), ee = d(null), N = d(0), te = d(null), ae = d(0), f = g({
|
|
39
44
|
get: () => o.dataset.hasOwnProperty("value"),
|
|
40
45
|
set: (t) => t
|
|
41
46
|
}), p = g(() => o.dataset.segments ? Array.isArray(o.dataset.segments) ? o.dataset.segments.length ? !0 : (console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
@@ -72,13 +77,13 @@ segments: [
|
|
|
72
77
|
{...}
|
|
73
78
|
]
|
|
74
79
|
`), f.value = !1, !1));
|
|
75
|
-
|
|
76
|
-
function
|
|
77
|
-
|
|
80
|
+
ce(z);
|
|
81
|
+
function z() {
|
|
82
|
+
fe(o.dataset) ? Y({
|
|
78
83
|
componentName: "VueUiBullet",
|
|
79
84
|
type: "dataset"
|
|
80
85
|
}) : p.value ? o.dataset.segments.forEach((t, s) => {
|
|
81
|
-
|
|
86
|
+
me({
|
|
82
87
|
datasetObject: t,
|
|
83
88
|
requiredAttributes: ["name", "from", "to"]
|
|
84
89
|
}).forEach((a) => {
|
|
@@ -91,25 +96,25 @@ segments: [
|
|
|
91
96
|
});
|
|
92
97
|
}) : f.value = !1, e.value.style.chart.animation.show && W(o.dataset.value || 0);
|
|
93
98
|
}
|
|
94
|
-
const P = d(
|
|
95
|
-
function
|
|
99
|
+
const P = d(ye());
|
|
100
|
+
function M() {
|
|
96
101
|
const t = J({
|
|
97
102
|
userConfig: o.config,
|
|
98
103
|
defaultConfig: Z
|
|
99
104
|
});
|
|
100
105
|
return t.theme ? {
|
|
101
106
|
...J({
|
|
102
|
-
userConfig:
|
|
107
|
+
userConfig: xe.vue_ui_bullet[t.theme] || o.config,
|
|
103
108
|
defaultConfig: t
|
|
104
109
|
})
|
|
105
110
|
} : t;
|
|
106
111
|
}
|
|
107
112
|
const e = g({
|
|
108
|
-
get: () =>
|
|
113
|
+
get: () => M(),
|
|
109
114
|
set: (t) => t
|
|
110
115
|
});
|
|
111
116
|
V(() => o.config, (t) => {
|
|
112
|
-
e.value =
|
|
117
|
+
e.value = M(), z(), N.value += 1;
|
|
113
118
|
}, { deep: !0 });
|
|
114
119
|
const l = g(() => {
|
|
115
120
|
const t = e.value.style.chart.height, s = e.value.style.chart.width, a = e.value.style.chart.padding.left, m = s - e.value.style.chart.padding.right, C = e.value.style.chart.padding.top, h = t - e.value.style.chart.padding.bottom;
|
|
@@ -127,7 +132,7 @@ segments: [
|
|
|
127
132
|
if (!p.value) return [];
|
|
128
133
|
const t = [];
|
|
129
134
|
for (let s = 0; s < o.dataset.segments.length; s += 1)
|
|
130
|
-
t.push(
|
|
135
|
+
t.push(pe(e.value.style.chart.segments.baseColor, s / o.dataset.segments.length));
|
|
131
136
|
return t;
|
|
132
137
|
}), F = g(() => p.value ? {
|
|
133
138
|
min: Math.min(...o.dataset.segments.map((t) => t.from)),
|
|
@@ -147,13 +152,13 @@ segments: [
|
|
|
147
152
|
}
|
|
148
153
|
a();
|
|
149
154
|
}
|
|
150
|
-
|
|
155
|
+
he(() => {
|
|
151
156
|
cancelAnimationFrame(U.value);
|
|
152
157
|
});
|
|
153
158
|
const c = g(() => {
|
|
154
159
|
if (!p.value)
|
|
155
160
|
return [];
|
|
156
|
-
const t =
|
|
161
|
+
const t = be(F.value.min, F.value.max, e.value.style.chart.segments.ticks.divisions), s = t.min >= 0 ? 0 : Math.abs(t.min), a = {
|
|
157
162
|
x: l.value.left + (o.dataset.target + s) / (t.max + s) * l.value.chartWidth - e.value.style.chart.target.width / 2
|
|
158
163
|
}, m = {
|
|
159
164
|
width: (i.value + s) / (t.max + s) * l.value.chartWidth
|
|
@@ -167,9 +172,9 @@ segments: [
|
|
|
167
172
|
target: a,
|
|
168
173
|
value: m,
|
|
169
174
|
ticks: C,
|
|
170
|
-
chunks: o.dataset.segments.map((h,
|
|
175
|
+
chunks: o.dataset.segments.map((h, ie) => ({
|
|
171
176
|
...h,
|
|
172
|
-
color: h.color ?
|
|
177
|
+
color: h.color ? ke(h.color) : le.value[ie],
|
|
173
178
|
x: l.value.left + l.value.chartWidth * ((h.from + s) / (t.max + s)),
|
|
174
179
|
y: l.value.top,
|
|
175
180
|
height: l.value.chartHeight,
|
|
@@ -208,14 +213,14 @@ segments: [
|
|
|
208
213
|
fontSize: e.value.style.chart.legend.fontSize,
|
|
209
214
|
paddingBottom: 6,
|
|
210
215
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
211
|
-
})), { isPrinting: R, isImaging: D, generatePdf: G, generateImage: j } =
|
|
216
|
+
})), { isPrinting: R, isImaging: D, generatePdf: G, generateImage: j } = Le({
|
|
212
217
|
elementId: `bullet_${P.value}`,
|
|
213
218
|
fileName: e.value.style.chart.title.text || "vue-ui-bullet"
|
|
214
|
-
}), b = d(!1);
|
|
215
|
-
function
|
|
219
|
+
}), oe = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), b = d(!1);
|
|
220
|
+
function ne(t) {
|
|
216
221
|
b.value = t, ae.value += 1;
|
|
217
222
|
}
|
|
218
|
-
function
|
|
223
|
+
function ue() {
|
|
219
224
|
return c.value;
|
|
220
225
|
}
|
|
221
226
|
const _ = d(!1);
|
|
@@ -223,7 +228,7 @@ segments: [
|
|
|
223
228
|
_.value = !_.value;
|
|
224
229
|
}
|
|
225
230
|
return Q({
|
|
226
|
-
getData:
|
|
231
|
+
getData: ue,
|
|
227
232
|
generatePdf: G,
|
|
228
233
|
generateImage: j,
|
|
229
234
|
toggleAnnotator: S
|
|
@@ -234,7 +239,7 @@ segments: [
|
|
|
234
239
|
style: X(`font-family:${e.value.style.fontFamily};width:100%;background:${e.value.style.chart.backgroundColor}`),
|
|
235
240
|
id: `bullet_${P.value}`
|
|
236
241
|
}, [
|
|
237
|
-
e.value.userOptions.buttons.annotator ? (r(), k(
|
|
242
|
+
e.value.userOptions.buttons.annotator ? (r(), k(Ae, {
|
|
238
243
|
key: 0,
|
|
239
244
|
parent: A.value,
|
|
240
245
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -242,15 +247,16 @@ segments: [
|
|
|
242
247
|
active: _.value,
|
|
243
248
|
onClose: S
|
|
244
249
|
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : u("", !0),
|
|
250
|
+
oe.value ? (r(), n("div", Ie, null, 512)) : u("", !0),
|
|
245
251
|
e.value.style.chart.title.text ? (r(), n("div", {
|
|
246
|
-
key:
|
|
252
|
+
key: 2,
|
|
247
253
|
ref_key: "chartTitle",
|
|
248
254
|
ref: ee,
|
|
249
255
|
style: "width:100%;background:transparent;"
|
|
250
256
|
}, [
|
|
251
|
-
(r(), k(
|
|
257
|
+
(r(), k(_e, {
|
|
252
258
|
lineHeight: "1.3rem",
|
|
253
|
-
key: `title_${
|
|
259
|
+
key: `title_${N.value}`,
|
|
254
260
|
config: {
|
|
255
261
|
title: {
|
|
256
262
|
cy: "bullet-div-title",
|
|
@@ -263,8 +269,8 @@ segments: [
|
|
|
263
269
|
}
|
|
264
270
|
}, null, 8, ["config"]))
|
|
265
271
|
], 512)) : u("", !0),
|
|
266
|
-
e.value.userOptions.show && f.value ? (r(), k(
|
|
267
|
-
key:
|
|
272
|
+
e.value.userOptions.show && f.value ? (r(), k($e, {
|
|
273
|
+
key: 3,
|
|
268
274
|
ref: "details",
|
|
269
275
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
270
276
|
color: e.value.style.chart.color,
|
|
@@ -284,11 +290,11 @@ segments: [
|
|
|
284
290
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
285
291
|
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
286
292
|
isAnnotation: _.value,
|
|
287
|
-
onToggleFullscreen:
|
|
293
|
+
onToggleFullscreen: ne,
|
|
288
294
|
onGeneratePdf: v(G),
|
|
289
295
|
onGenerateImage: v(j),
|
|
290
296
|
onToggleAnnotator: S
|
|
291
|
-
},
|
|
297
|
+
}, ve({ _: 2 }, [
|
|
292
298
|
t.$slots.optionPdf ? {
|
|
293
299
|
name: "optionPdf",
|
|
294
300
|
fn: w(() => [
|
|
@@ -319,15 +325,15 @@ segments: [
|
|
|
319
325
|
} : void 0
|
|
320
326
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : u("", !0),
|
|
321
327
|
f.value ? (r(), n("svg", {
|
|
322
|
-
key:
|
|
323
|
-
xmlns: v(
|
|
328
|
+
key: 4,
|
|
329
|
+
xmlns: v(we),
|
|
324
330
|
class: q({ "vue-data-ui-fullscreen--on": b.value, "vue-data-ui-fulscreen--off": !b.value, "vue-ui-bullet-svg": !0 }),
|
|
325
331
|
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
326
332
|
style: X(`width: 100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
327
333
|
}, [
|
|
328
|
-
|
|
329
|
-
p.value ? (r(), n("g",
|
|
330
|
-
(r(!0), n(H, null,
|
|
334
|
+
de(Be),
|
|
335
|
+
p.value ? (r(), n("g", He, [
|
|
336
|
+
(r(!0), n(H, null, T(c.value.chunks, (a) => (r(), n("rect", {
|
|
331
337
|
x: a.x,
|
|
332
338
|
y: a.y,
|
|
333
339
|
height: a.height,
|
|
@@ -335,7 +341,7 @@ segments: [
|
|
|
335
341
|
fill: a.color,
|
|
336
342
|
"stroke-width": 1,
|
|
337
343
|
stroke: e.value.style.chart.backgroundColor
|
|
338
|
-
}, null, 8,
|
|
344
|
+
}, null, 8, Te))), 256)),
|
|
339
345
|
e.value.style.chart.target.onTop ? u("", !0) : (r(), n("rect", {
|
|
340
346
|
key: 0,
|
|
341
347
|
x: c.value.target.x,
|
|
@@ -346,7 +352,7 @@ segments: [
|
|
|
346
352
|
fill: e.value.style.chart.target.color,
|
|
347
353
|
stroke: e.value.style.chart.target.stroke,
|
|
348
354
|
"stroke-width": e.value.style.chart.target.strokeWidth
|
|
349
|
-
}, null, 8,
|
|
355
|
+
}, null, 8, Ne)),
|
|
350
356
|
x("rect", {
|
|
351
357
|
x: l.value.left,
|
|
352
358
|
y: l.value.top + (l.value.chartHeight - l.value.chartHeight * e.value.style.chart.valueBar.heightRatio) / 2,
|
|
@@ -384,9 +390,9 @@ segments: [
|
|
|
384
390
|
fill: e.value.style.chart.target.color,
|
|
385
391
|
stroke: e.value.style.chart.target.stroke,
|
|
386
392
|
"stroke-width": e.value.style.chart.target.strokeWidth
|
|
387
|
-
}, null, 8,
|
|
388
|
-
e.value.style.chart.segments.dataLabels.show ? (r(), n("g",
|
|
389
|
-
(r(!0), n(H, null,
|
|
393
|
+
}, null, 8, Ue)) : u("", !0),
|
|
394
|
+
e.value.style.chart.segments.dataLabels.show ? (r(), n("g", We, [
|
|
395
|
+
(r(!0), n(H, null, T(c.value.ticks, (a) => (r(), n("text", {
|
|
390
396
|
x: a.x,
|
|
391
397
|
y: a.y,
|
|
392
398
|
"text-anchor": "middle",
|
|
@@ -402,10 +408,10 @@ segments: [
|
|
|
402
408
|
s: e.value.style.chart.segments.dataLabels.suffix,
|
|
403
409
|
r: e.value.style.chart.segments.dataLabels.rounding
|
|
404
410
|
})
|
|
405
|
-
)), 9,
|
|
411
|
+
)), 9, Ee))), 256))
|
|
406
412
|
])) : u("", !0),
|
|
407
|
-
e.value.style.chart.segments.dataLabels.show && e.value.style.chart.segments.ticks.show ? (r(), n("g",
|
|
408
|
-
(r(!0), n(H, null,
|
|
413
|
+
e.value.style.chart.segments.dataLabels.show && e.value.style.chart.segments.ticks.show ? (r(), n("g", Re, [
|
|
414
|
+
(r(!0), n(H, null, T(c.value.ticks, (a) => (r(), n("line", {
|
|
409
415
|
x1: a.x,
|
|
410
416
|
x2: a.x,
|
|
411
417
|
y1: l.value.bottom,
|
|
@@ -413,16 +419,16 @@ segments: [
|
|
|
413
419
|
stroke: e.value.style.chart.segments.ticks.stroke,
|
|
414
420
|
"stroke-width": 1,
|
|
415
421
|
"stroke-linecap": "round"
|
|
416
|
-
}, null, 8,
|
|
422
|
+
}, null, 8, De))), 256))
|
|
417
423
|
])) : u("", !0)
|
|
418
424
|
])) : u("", !0),
|
|
419
425
|
y(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
420
|
-
], 14,
|
|
421
|
-
t.$slots.watermark ? (r(), n("div",
|
|
426
|
+
], 14, Oe)) : u("", !0),
|
|
427
|
+
t.$slots.watermark ? (r(), n("div", Ge, [
|
|
422
428
|
y(t.$slots, "watermark", I(O({ isPrinting: v(R) || v(D) })), void 0, !0)
|
|
423
429
|
])) : u("", !0),
|
|
424
|
-
f.value ? u("", !0) : (r(), k(
|
|
425
|
-
key:
|
|
430
|
+
f.value ? u("", !0) : (r(), k(Pe, {
|
|
431
|
+
key: 6,
|
|
426
432
|
config: {
|
|
427
433
|
type: "bullet",
|
|
428
434
|
style: {
|
|
@@ -437,15 +443,15 @@ segments: [
|
|
|
437
443
|
ref_key: "chartLegend",
|
|
438
444
|
ref: te
|
|
439
445
|
}, [
|
|
440
|
-
e.value.style.chart.legend.show ? (r(), k(
|
|
446
|
+
e.value.style.chart.legend.show ? (r(), k(Ce, {
|
|
441
447
|
key: 0,
|
|
442
448
|
clickable: !1,
|
|
443
449
|
legendSet: E.value,
|
|
444
450
|
config: re.value
|
|
445
451
|
}, {
|
|
446
452
|
item: w(({ legend: a }) => [
|
|
447
|
-
x("div",
|
|
448
|
-
x("span",
|
|
453
|
+
x("div", je, [
|
|
454
|
+
x("span", Ve, L(a.name) + ":", 1),
|
|
449
455
|
x("span", null, L(a.value), 1)
|
|
450
456
|
])
|
|
451
457
|
]),
|
|
@@ -453,12 +459,12 @@ segments: [
|
|
|
453
459
|
}, 8, ["legendSet", "config"])) : u("", !0),
|
|
454
460
|
y(t.$slots, "legend", { legend: E.value }, void 0, !0)
|
|
455
461
|
], 512),
|
|
456
|
-
t.$slots.source ? (r(), n("div",
|
|
462
|
+
t.$slots.source ? (r(), n("div", qe, [
|
|
457
463
|
y(t.$slots, "source", {}, void 0, !0)
|
|
458
464
|
], 512)) : u("", !0)
|
|
459
|
-
], 14,
|
|
465
|
+
], 14, Se));
|
|
460
466
|
}
|
|
461
|
-
},
|
|
467
|
+
}, rt = /* @__PURE__ */ Fe(Xe, [["__scopeId", "data-v-cfe188c3"]]);
|
|
462
468
|
export {
|
|
463
|
-
|
|
469
|
+
rt as default
|
|
464
470
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CcykRspI.cjs"),V=require("./useNestedProp-XtPlFP9O.cjs"),j=require("./Title-CUN1T6KC.cjs"),G=require("./Legend-B86sMXn7.cjs"),$=require("./usePrinter-BcE45wW6.cjs"),X=require("./PackageVersion-CowXQ4IM.cjs"),Y=require("./PenAndPaper-DBSxk9Xk.cjs"),J=require("./vue-ui-skeleton-DpfJbsNA.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Q=["id"],Z={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ee=["xmlns","viewBox"],te={key:0},ae=["x","y","height","width","fill","stroke"],le=["x","y","height","width","rx","fill","stroke","stroke-width"],re=["x","y","height","width","fill","stroke","stroke-width"],oe=["x","y","font-size","font-weight","fill"],se=["x","y","height","width","rx","fill","stroke","stroke-width"],ne={key:3},ue=["x","y","fill","font-size","font-weight"],ie={key:4},ce=["x1","x2","y1","y2","stroke"],de={key:5,class:"vue-data-ui-watermark"},he={class:"vue-ui-bullet-legend-item",dir:"auto"},ve={style:{"margin-right":"2px"}},me={key:7,ref:"source",dir:"auto"},ge={__name:"vue-ui-bullet",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(A,{expose:F}){const n=A,{vue_ui_bullet:O}=s.useConfig(),y=e.ref(null),I=e.ref(null),w=e.ref(0),z=e.ref(null),T=e.ref(0),d=e.computed({get:()=>n.dataset.hasOwnProperty("value"),set:a=>a}),v=e.computed(()=>n.dataset.segments?Array.isArray(n.dataset.segments)?n.dataset.segments.length?!0:(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
2
|
+
|
|
3
|
+
segments: [
|
|
4
|
+
{
|
|
5
|
+
name: string;
|
|
6
|
+
from: number;
|
|
7
|
+
to: number;
|
|
8
|
+
color?: string;
|
|
9
|
+
},
|
|
10
|
+
{...}
|
|
11
|
+
]
|
|
12
|
+
`),d.value=!1,!1):(console.warn(`VueUiBullet: dataset segments must be an array of objects with this datastructure:
|
|
13
|
+
|
|
14
|
+
segments: [
|
|
15
|
+
{
|
|
16
|
+
name: string;
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
color?: string;
|
|
20
|
+
},
|
|
21
|
+
{...}
|
|
22
|
+
]
|
|
23
|
+
`),d.value=!1,!1):(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
24
|
+
|
|
25
|
+
segments: [
|
|
26
|
+
{
|
|
27
|
+
name: string;
|
|
28
|
+
from: number;
|
|
29
|
+
to: number;
|
|
30
|
+
color?: string;
|
|
31
|
+
},
|
|
32
|
+
{...}
|
|
33
|
+
]
|
|
34
|
+
`),d.value=!1,!1));e.onMounted(B);function B(){s.objectIsEmpty(n.dataset)?s.error({componentName:"VueUiBullet",type:"dataset"}):v.value?n.dataset.segments.forEach((a,o)=>{s.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","from","to"]}).forEach(l=>{d.value=!1,s.error({componentName:"VueUiBullet segment",type:"datasetSerieAttribute",property:l,index:o})})}):d.value=!1,t.value.style.chart.animation.show&&_(n.dataset.value||0)}const p=e.ref(s.createUid());function x(){const a=V.useNestedProp({userConfig:n.config,defaultConfig:O});return a.theme?{...V.useNestedProp({userConfig:s.themes.vue_ui_bullet[a.theme]||n.config,defaultConfig:a})}:a}const t=e.computed({get:()=>x(),set:a=>a});e.watch(()=>n.config,a=>{t.value=x(),B(),w.value+=1},{deep:!0});const r=e.computed(()=>{const a=t.value.style.chart.height,o=t.value.style.chart.width,l=t.value.style.chart.padding.left,h=o-t.value.style.chart.padding.right,f=t.value.style.chart.padding.top,c=a-t.value.style.chart.padding.bottom;return{height:a,width:o,left:l,right:h,top:f,bottom:c,chartWidth:h-l,chartHeight:c-f}}),H=e.computed(()=>{if(!v.value)return[];const a=[];for(let o=0;o<n.dataset.segments.length;o+=1)a.push(s.lightenHexColor(t.value.style.chart.segments.baseColor,o/n.dataset.segments.length));return a}),k=e.computed(()=>v.value?{min:Math.min(...n.dataset.segments.map(a=>a.from)),max:Math.max(...n.dataset.segments.map(a=>a.to))}:{min:0,max:1}),u=e.ref(q());e.watch(()=>n.dataset,a=>{t.value.style.chart.animation.show?_(a.value||0):u.value=a.value||0},{deep:!0});function q(){return t.value.style.chart.animation.show?k.value.min:n.dataset.value||0}const C=e.ref(null);function _(a){const o=Math.abs(a-u.value)/t.value.style.chart.animation.animationFrames;function l(){u.value<a?u.value=Math.min(u.value+o,a):u.value>a&&(u.value=Math.max(u.value-o,a)),u.value!==a&&(C.value=requestAnimationFrame(l))}l()}e.onBeforeUnmount(()=>{cancelAnimationFrame(C.value)});const i=e.computed(()=>{if(!v.value)return[];const a=s.calculateNiceScale(k.value.min,k.value.max,t.value.style.chart.segments.ticks.divisions),o=a.min>=0?0:Math.abs(a.min),l={x:r.value.left+(n.dataset.target+o)/(a.max+o)*r.value.chartWidth-t.value.style.chart.target.width/2},h={width:(u.value+o)/(a.max+o)*r.value.chartWidth},f=a.ticks.map(c=>({value:c,y:r.value.bottom+t.value.style.chart.segments.dataLabels.fontSize+3+t.value.style.chart.segments.dataLabels.offsetY,x:r.value.left+(c+o)/(a.max+o)*r.value.chartWidth}));return{scale:a,target:l,value:h,ticks:f,chunks:n.dataset.segments.map((c,R)=>({...c,color:c.color?s.convertColorToHex(c.color):H.value[R],x:r.value.left+r.value.chartWidth*((c.from+o)/(a.max+o)),y:r.value.top,height:r.value.chartHeight,width:r.value.chartWidth*(Math.abs(c.to-c.from)/(a.max+o))}))}}),L=e.computed(()=>!i.value||!i.value.chunks||!i.value.chunks.length?[]:i.value.chunks.map(a=>{const o=s.applyDataLabel(t.value.style.chart.segments.dataLabels.formatter,a.from,s.dataLabel({p:t.value.style.chart.segments.dataLabels.prefix,v:a.from,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding})),l=s.applyDataLabel(t.value.style.chart.segments.dataLabels.formatter,a.to,s.dataLabel({p:t.value.style.chart.segments.dataLabels.prefix,v:a.to,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}));return{...a,shape:"square",value:`${o} - ${l}`}})),M=e.computed(()=>({cy:"bullet-div-legend",backgroundColor:"transparent",color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:6,fontWeight:t.value.style.chart.legend.bold?"bold":""})),{isPrinting:N,isImaging:P,generatePdf:S,generateImage:E}=$.usePrinter({elementId:`bullet_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-bullet"}),D=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),m=e.ref(!1);function U(a){m.value=a,T.value+=1}function W(){return i.value}const g=e.ref(!1);function b(){g.value=!g.value}return F({getData:W,generatePdf:S,generateImage:E,toggleAnnotator:b}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"bulletChart",ref:y,class:e.normalizeClass(`vue-ui-bullet ${m.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%;background:${t.value.style.chart.backgroundColor}`),id:`bullet_${p.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Y.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:g.value,onClose:b},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),D.value?(e.openBlock(),e.createElementBlock("div",Z,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:I,style:"width:100%;background:transparent;"},[(e.openBlock(),e.createBlock(j._sfc_main,{lineHeight:"1.3rem",key:`title_${w.value}`,config:{title:{cy:"bullet-div-title",...t.value.style.chart.title},subtitle:{cy:"bullet-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&d.value?(e.openBlock(),e.createBlock($.UserOptions,{key:3,ref:"details",backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(P),uid:p.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:m.value,chartElement:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:g.value,onToggleFullscreen:U,onGeneratePdf:e.unref(S),onGenerateImage:e.unref(E),onToggleAnnotator:b},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:h})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:h})),void 0,!0)]),key:"2"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:h})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:h})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","chartElement","position","titles","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),d.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value,"vue-ui-bullet-svg":!0}),viewBox:`0 0 ${r.value.width} ${r.value.height}`,style:e.normalizeStyle(`width: 100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(X._sfc_main),v.value?(e.openBlock(),e.createElementBlock("g",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.chunks,l=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:l.color,"stroke-width":1,stroke:t.value.style.chart.backgroundColor},null,8,ae))),256)),t.value.style.chart.target.onTop?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,x:i.value.target.x,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.target.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.target.heightRatio,width:t.value.style.chart.target.width,rx:t.value.style.chart.target.rounded?t.value.style.chart.target.width/2:0,fill:t.value.style.chart.target.color,stroke:t.value.style.chart.target.stroke,"stroke-width":t.value.style.chart.target.strokeWidth},null,8,le)),e.createElementVNode("rect",{x:r.value.left,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.valueBar.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.valueBar.heightRatio,width:i.value.value.width,fill:t.value.style.chart.valueBar.color,stroke:t.value.style.chart.valueBar.stroke,"stroke-width":t.value.style.chart.valueBar.strokeWidth},null,8,re),t.value.style.chart.valueBar.label.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.left+i.value.value.width,y:r.value.top-6+t.value.style.chart.valueBar.label.offsetY,"font-size":t.value.style.chart.valueBar.label.fontSize,"font-weight":t.value.style.chart.valueBar.label.bold?"bold":"normal",fill:t.value.style.chart.valueBar.label.color,"text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.segments.dataLabels.formatter,u.value,e.unref(s.dataLabel)({p:t.value.style.chart.segments.dataLabels.prefix,v:u.value,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}))),9,oe)):e.createCommentVNode("",!0),t.value.style.chart.target.onTop?(e.openBlock(),e.createElementBlock("rect",{key:2,x:i.value.target.x,y:r.value.top+(r.value.chartHeight-r.value.chartHeight*t.value.style.chart.target.heightRatio)/2,height:r.value.chartHeight*t.value.style.chart.target.heightRatio,width:t.value.style.chart.target.width,rx:t.value.style.chart.target.rounded?t.value.style.chart.target.width/2:0,fill:t.value.style.chart.target.color,stroke:t.value.style.chart.target.stroke,"stroke-width":t.value.style.chart.target.strokeWidth},null,8,se)):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show?(e.openBlock(),e.createElementBlock("g",ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,l=>(e.openBlock(),e.createElementBlock("text",{x:l.x,y:l.y,"text-anchor":"middle",fill:t.value.style.chart.segments.dataLabels.color,"font-size":t.value.style.chart.segments.dataLabels.fontSize+"px","font-weight":t.value.style.chart.segments.dataLabels.bold?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.segments.dataLabels.formatter,l.value,e.unref(s.dataLabel)({p:t.value.style.chart.segments.dataLabels.prefix,v:l.value,s:t.value.style.chart.segments.dataLabels.suffix,r:t.value.style.chart.segments.dataLabels.rounding}))),9,ue))),256))])):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show&&t.value.style.chart.segments.ticks.show?(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.ticks,l=>(e.openBlock(),e.createElementBlock("line",{x1:l.x,x2:l.x,y1:r.value.bottom,y2:r.value.bottom+3,stroke:t.value.style.chart.segments.ticks.stroke,"stroke-width":1,"stroke-linecap":"round"},null,8,ce))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,ee)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(N)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:6,config:{type:"bullet",style:{backgroundColor:t.value.style.chart.backgroundColor,bullet:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(G.Legend,{key:0,clickable:!1,legendSet:L.value,config:M.value},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",he,[e.createElementVNode("span",ve,e.toDisplayString(l.name)+":",1),e.createElementVNode("span",null,e.toDisplayString(l.value),1)])]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:L.value},void 0,!0)],512),a.$slots.source?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],14,Q))}},fe=K._export_sfc(ge,[["__scopeId","data-v-cfe188c3"]]);exports.default=fe;
|