vue-data-ui 2.4.3 → 2.4.5
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-Dz6AomGr.cjs → Arrow-BeQLfJqp.cjs} +1 -1
- package/dist/{Arrow-C7lNL7sY.js → Arrow-Dvaq-qLp.js} +1 -1
- package/dist/{BaseIcon-uALK38Ov.cjs → BaseIcon-BQM6PtJu.cjs} +1 -1
- package/dist/{BaseIcon-BbvG1AlW.js → BaseIcon-D9DRVW03.js} +1 -1
- package/dist/{DataTable-DTzynbND.cjs → DataTable-DO2GAcBm.cjs} +1 -1
- package/dist/{DataTable-DYqC2pqu.js → DataTable-rs_YrvMR.js} +2 -2
- package/dist/{Legend-Cgw4lO2O.cjs → Legend-BoBvZGqQ.cjs} +1 -1
- package/dist/{Legend-DNgTCgEK.js → Legend-DrmUpnIK.js} +1 -1
- package/dist/{PackageVersion-VkaUzgmt.js → PackageVersion-D9rYHrFZ.js} +1 -1
- package/dist/{PackageVersion-DwI-KhXH.cjs → PackageVersion-DdLmDkTt.cjs} +1 -1
- package/dist/PenAndPaper-C-KjtyNA.js +308 -0
- package/dist/PenAndPaper-DyMNuRla.cjs +1 -0
- package/dist/{Shape-D2Dpshg1.cjs → Shape-BGqIhzPX.cjs} +1 -1
- package/dist/{Shape-Bwon0l0g.js → Shape-CBrmBvYy.js} +1 -1
- package/dist/{Slicer-TfpN2Cr4.js → Slicer-4R6np1wa.js} +3 -3
- package/dist/{Slicer-uSjfNJjG.cjs → Slicer-BLkkkNUl.cjs} +1 -1
- package/dist/{Title-0Tp4hZ4u.cjs → Title-Dn00hErp.cjs} +1 -1
- package/dist/{Title-C5pIfQAz.js → Title-W7iJGPjg.js} +1 -1
- package/dist/{Tooltip-9Tp2Yrd1.cjs → Tooltip-DJiwKA4y.cjs} +1 -1
- package/dist/{Tooltip-Cz24YLfw.js → Tooltip-Pv3Bhir5.js} +1 -1
- package/dist/{index-Bya_q1J-.js → index-C1GB0E49.js} +1 -1
- package/dist/{index-eFox7weK.cjs → index-C9HllqQA.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-B33hazbH.js → useNestedProp-CNAPgW6E.js} +1 -1
- package/dist/{useNestedProp-BkgEhTQY.cjs → useNestedProp-DOr0hj4s.cjs} +1 -1
- package/dist/{usePrinter-CSRFnDBU.cjs → usePrinter-FSAw5pod.cjs} +1 -1
- package/dist/{usePrinter-CiHd1FwD.js → usePrinter-y5uHyknw.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-Bduq4f2p.js → vue-data-ui-Bg5KOKEX.js} +58 -58
- package/dist/{vue-data-ui-BTtxyUc3.cjs → vue-data-ui-Bnkz3Xmu.cjs} +1 -1
- 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-mUrcbG6J.js} +9 -9
- package/dist/{vue-ui-3d-bar-B-P7PMHs.cjs → vue-ui-3d-bar-sjkBzHFn.cjs} +1 -1
- package/dist/{vue-ui-accordion-TEMpM1hO.cjs → vue-ui-accordion-BkUGNe2H.cjs} +1 -1
- package/dist/{vue-ui-accordion-DfUfL2dI.js → vue-ui-accordion-DWyRC3-h.js} +3 -3
- package/dist/vue-ui-age-pyramid-CKQ8OHuS.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CH72tAMb.js → vue-ui-age-pyramid-CVktvXpY.js} +145 -137
- package/dist/{vue-ui-annotator-DPeJ2its.js → vue-ui-annotator-Cp8KDkuP.js} +1 -1
- package/dist/{vue-ui-annotator-DU_DJKCw.cjs → vue-ui-annotator-DSJ25l4s.cjs} +1 -1
- package/dist/vue-ui-bullet-Bg3TPFgV.cjs +34 -0
- package/dist/{vue-ui-bullet-CtP3MlUT.js → vue-ui-bullet-D4atsFQx.js} +75 -69
- package/dist/vue-ui-candlestick-BhdG9CY1.cjs +2 -0
- package/dist/{vue-ui-candlestick-DDil13a0.js → vue-ui-candlestick-DUNyCQ6Z.js} +240 -232
- package/dist/{vue-ui-carousel-table-BaeIxyc0.js → vue-ui-carousel-table-BRrYpr-2.js} +4 -4
- package/dist/{vue-ui-carousel-table-C7SJIOG-.cjs → vue-ui-carousel-table-DF4FhrBd.cjs} +1 -1
- package/dist/vue-ui-chestnut-BLBS9QO2.cjs +6 -0
- package/dist/{vue-ui-chestnut-BczSJF6S.js → vue-ui-chestnut-CjS4qC_J.js} +262 -256
- package/dist/{vue-ui-cursor-Dg_Dmww-.js → vue-ui-cursor-C3SpabMF.js} +2 -2
- package/dist/{vue-ui-cursor-C2Pj_CI_.cjs → vue-ui-cursor-DzVt5_py.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Bul9dqx1.js → vue-ui-dashboard-BCOKtsyJ.js} +2 -2
- package/dist/{vue-ui-dashboard-Cg020NiT.cjs → vue-ui-dashboard-CIv7W8Yn.cjs} +1 -1
- package/dist/{vue-ui-digits-B8iAa4YZ.js → vue-ui-digits-DaMKAZkt.js} +2 -2
- package/dist/{vue-ui-digits-Ctgd84JR.cjs → vue-ui-digits-yNfQgOLZ.cjs} +1 -1
- package/dist/{vue-ui-donut-DUcp-fat.js → vue-ui-donut-B_-VAqBw.js} +338 -330
- package/dist/vue-ui-donut-Bo4SbdEe.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-C_YMbTwq.js → vue-ui-donut-evolution-C9TXFzCm.js} +163 -156
- package/dist/vue-ui-donut-evolution-DOPY3I3Q.cjs +1 -0
- package/dist/{vue-ui-dumbbell-Buwngz_V.js → vue-ui-dumbbell-BP_Vf_u2.js} +208 -200
- package/dist/vue-ui-dumbbell-Cgwng71s.cjs +9 -0
- package/dist/vue-ui-flow-BiQj4v8i.cjs +1 -0
- package/dist/{vue-ui-flow-Bz3c0K5P.js → vue-ui-flow-DHoxK4t1.js} +130 -124
- package/dist/vue-ui-galaxy-C5ZaT8pw.cjs +1 -0
- package/dist/{vue-ui-galaxy-Cjh0XGTX.js → vue-ui-galaxy-DuLPsC4Q.js} +125 -119
- package/dist/vue-ui-gauge-26eHgOjR.cjs +1 -0
- package/dist/{vue-ui-gauge-B1UvGkQa.js → vue-ui-gauge-BhrXiD4S.js} +167 -159
- package/dist/{vue-ui-gizmo-DFW6HnHp.cjs → vue-ui-gizmo-Bb_SWCsE.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DUQ4t-At.js → vue-ui-gizmo-D3kBYI1G.js} +3 -3
- package/dist/vue-ui-heatmap-Bc4HvgMk.cjs +1 -0
- package/dist/{vue-ui-heatmap-C-poazUw.js → vue-ui-heatmap-wjsvn1_e.js} +156 -149
- package/dist/{vue-ui-kpi-Z4Oi4raz.cjs → vue-ui-kpi-BbvfVZn0.cjs} +1 -1
- package/dist/{vue-ui-kpi-DXe-vxAk.js → vue-ui-kpi-DLJuo47I.js} +3 -3
- package/dist/{vue-ui-mini-loader-MMvpm9pz.cjs → vue-ui-mini-loader-BaxwhF7o.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BVtHTqxS.js → vue-ui-mini-loader-D4aLvv-D.js} +2 -2
- package/dist/{vue-ui-molecule-BaJpDZND.js → vue-ui-molecule-DXpMMgdW.js} +109 -103
- package/dist/vue-ui-molecule-ZqAJHh6x.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BUNDwsEI.js → vue-ui-mood-radar-B_uWY92C.js} +173 -166
- package/dist/vue-ui-mood-radar-BhteAPWH.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-mDy2hXa6.js → vue-ui-nested-donuts-By32x0Y7.js} +311 -303
- package/dist/vue-ui-nested-donuts-ClgkX1-p.cjs +17 -0
- package/dist/vue-ui-onion-BdIxJpfA.cjs +5 -0
- package/dist/{vue-ui-onion-DwFG3HAI.js → vue-ui-onion-dQTXKNju.js} +149 -141
- package/dist/{vue-ui-parallel-coordinate-plot-ImET_zeo.js → vue-ui-parallel-coordinate-plot-CTF9Ujab.js} +186 -178
- package/dist/vue-ui-parallel-coordinate-plot-D6MUp-5W.cjs +8 -0
- package/dist/vue-ui-quadrant-CArA4Vmm.cjs +1 -0
- package/dist/{vue-ui-quadrant-BeveRihK.js → vue-ui-quadrant-Coqh0pYO.js} +225 -217
- package/dist/vue-ui-quick-chart-6Av74TTC.cjs +15 -0
- package/dist/{vue-ui-quick-chart-DAhllTfa.js → vue-ui-quick-chart-Bfdddr_B.js} +386 -378
- package/dist/{vue-ui-radar-BllatzRa.js → vue-ui-radar-BpdGMVHw.js} +172 -164
- package/dist/vue-ui-radar-CLr-gu1X.cjs +1 -0
- package/dist/{vue-ui-rating-D1ykV4xO.js → vue-ui-rating-B-YedcK0.js} +2 -2
- package/dist/{vue-ui-rating-BoZo7caL.cjs → vue-ui-rating-KFJoH-JV.cjs} +1 -1
- package/dist/vue-ui-relation-circle-BLVThOqT.js +366 -0
- package/dist/vue-ui-relation-circle-DuGQKFor.cjs +1 -0
- package/dist/{vue-ui-rings-B-ZcX6y1.js → vue-ui-rings-BGeYkj-O.js} +196 -188
- package/dist/vue-ui-rings-DzgehQZ5.cjs +2 -0
- package/dist/{vue-ui-scatter-DG43ck1g.js → vue-ui-scatter-CsBPCCco.js} +288 -280
- package/dist/vue-ui-scatter-jPnr8qI0.cjs +1 -0
- package/dist/{vue-ui-screenshot-C1JBP_N0.cjs → vue-ui-screenshot-1nXVH-hp.cjs} +1 -1
- package/dist/{vue-ui-screenshot-p3ca8cAl.js → vue-ui-screenshot-B2FTnuxH.js} +1 -1
- package/dist/{vue-ui-skeleton-BYssP0K4.js → vue-ui-skeleton-CE6ibl1T.js} +3 -3
- package/dist/{vue-ui-skeleton-BqKzuhkB.cjs → vue-ui-skeleton-CPwED1As.cjs} +1 -1
- package/dist/{vue-ui-smiley-D7dDCdpq.js → vue-ui-smiley-2H9hMFZ_.js} +2 -2
- package/dist/{vue-ui-smiley-BXKVpHl2.cjs → vue-ui-smiley-DqOZwhT4.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-9V60hM3Z.cjs → vue-ui-spark-trend-CLW85O32.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-GWFrO_0z.js → vue-ui-spark-trend-Dx9xVq9a.js} +5 -5
- package/dist/{vue-ui-sparkbar-Bgn6AY0q.cjs → vue-ui-sparkbar-DJDXrRyp.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CwqlyAyv.js → vue-ui-sparkbar-zafUIv1n.js} +4 -4
- package/dist/{vue-ui-sparkgauge-F2XbiXyA.js → vue-ui-sparkgauge-CFAdhTLk.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Dqntz2Zv.cjs → vue-ui-sparkgauge-CPNAXUyl.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DRIKK6Ym.js → vue-ui-sparkhistogram-B3DIjpaE.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DnY4-Sdn.cjs → vue-ui-sparkhistogram-CHc3_xRE.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Cxtzdlhi.js → vue-ui-sparkline-C-LE7J9H.js} +5 -5
- package/dist/{vue-ui-sparkline-CAEs-gtK.cjs → vue-ui-sparkline-U22Yhwy7.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-0A1klq9s.js → vue-ui-sparkstackbar-BzLoGC-y.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-D37ms1rx.cjs → vue-ui-sparkstackbar-nx-Lt8sX.cjs} +1 -1
- package/dist/{vue-ui-stackbar-wun4S3C0.cjs → vue-ui-stackbar-BwgHLhj2.cjs} +1 -1
- package/dist/{vue-ui-stackbar-ByOuJSdM.js → vue-ui-stackbar-C5xNRXnW.js} +13 -13
- package/dist/{vue-ui-strip-plot-CMD0MSqY.js → vue-ui-strip-plot-6khUDDeA.js} +204 -196
- package/dist/vue-ui-strip-plot-BFUtZW4b.cjs +1 -0
- package/dist/{vue-ui-table-aj0XZ7T5.cjs → vue-ui-table-B3Eng0fH.cjs} +1 -1
- package/dist/{vue-ui-table-B75DJ39t.js → vue-ui-table-DsBM7Osw.js} +1 -1
- package/dist/{vue-ui-table-heatmap-Ce93TyBF.cjs → vue-ui-table-heatmap-DwCdS68z.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BO2ugWqD.js → vue-ui-table-heatmap-ccQKInFD.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CbjfAaj2.js → vue-ui-table-sparkline-BU-hOCZ7.js} +5 -5
- package/dist/{vue-ui-table-sparkline-D6KJjDnU.cjs → vue-ui-table-sparkline-CDmrQFKv.cjs} +1 -1
- package/dist/vue-ui-thermometer-BhHYcxmT.cjs +1 -0
- package/dist/{vue-ui-thermometer-Pq4PvSIP.js → vue-ui-thermometer-DuI3uDCZ.js} +171 -165
- package/dist/{vue-ui-timer-B6IB6yS6.cjs → vue-ui-timer-D7EKaAqa.cjs} +1 -1
- package/dist/{vue-ui-timer-Bk3BvB-B.js → vue-ui-timer-Gk3bl_em.js} +6 -6
- package/dist/{vue-ui-tiremarks-CU9HJIqf.js → vue-ui-tiremarks-AcEjMpJH.js} +119 -112
- package/dist/vue-ui-tiremarks-UX2FbnyG.cjs +1 -0
- package/dist/{vue-ui-treemap-DY-lRAhC.js → vue-ui-treemap-CFTpzgX5.js} +266 -258
- package/dist/vue-ui-treemap-D6CTMfsm.cjs +1 -0
- package/dist/vue-ui-vertical-bar-BzY2H3UC.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CtnIKsM1.js → vue-ui-vertical-bar-CuBJx5l1.js} +245 -237
- package/dist/vue-ui-waffle-CZxR13EG.cjs +1 -0
- package/dist/{vue-ui-waffle-reOsx-gJ.js → vue-ui-waffle-rDfZLxvH.js} +224 -216
- package/dist/{vue-ui-wheel-kYxny3vn.js → vue-ui-wheel-BFt2o4yO.js} +125 -117
- package/dist/vue-ui-wheel-BM-St3xT.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DwLY4QdB.cjs → vue-ui-word-cloud-DjKyKUbA.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DbMqrHAf.js → vue-ui-word-cloud-pNPIrJ-g.js} +11 -11
- package/dist/vue-ui-xy-CBZUMMlP.cjs +3 -0
- package/dist/{vue-ui-xy-rbACig0h.js → vue-ui-xy-DwkEc4Np.js} +302 -291
- package/dist/{vue-ui-xy-canvas-B0HTR7OV.js → vue-ui-xy-canvas-CW90CROL.js} +12 -12
- package/dist/{vue-ui-xy-canvas-CgJd5FiT.cjs → vue-ui-xy-canvas-DWGGLom_.cjs} +1 -1
- package/package.json +1 -1
- package/dist/PenAndPaper-CDFVOo7X.cjs +0 -1
- package/dist/PenAndPaper-DAZYA8Ew.js +0 -269
- 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,16 +1,16 @@
|
|
|
1
1
|
import { ref as v, computed as m, watch as Y, onMounted as xa, onBeforeUnmount as La, openBlock as C, createElementBlock as q, normalizeStyle as J, normalizeClass as ka, createBlock as P, createCommentVNode as _, unref as A, createSlots as Ca, withCtx as b, renderSlot as x, normalizeProps as B, guardReactiveProps as X, createElementVNode as K, createVNode as wa, toDisplayString as Ve, createTextVNode as Sa } from "vue";
|
|
2
|
-
import { u as $a, c as za, t as Ta, a as Ma, p as D, b as Ra, C as ge, i as Q, f as ee, I as Ia, d as je, $ as Oa, o as Pa, e as Fa, x as qe, y as Ea, q as Na, r as _a, s as ae, l as Aa } from "./index-
|
|
3
|
-
import { d as Da, c as Ha, a as Je, t as Wa, l as w, r as pe, b as F, p as Ke, u as Ya } from "./useResponsive-
|
|
4
|
-
import { _ as Ba } from "./Tooltip-
|
|
5
|
-
import { L as Xa } from "./Legend-
|
|
6
|
-
import { _ as Ua } from "./Title-
|
|
7
|
-
import { S as Za } from "./Slicer-
|
|
8
|
-
import { u as Ga, U as Va } from "./usePrinter-
|
|
9
|
-
import ja from "./vue-ui-accordion-
|
|
10
|
-
import { D as qa } from "./DataTable-
|
|
11
|
-
import Ja from "./vue-ui-skeleton-
|
|
12
|
-
import { u as Qe } from "./useNestedProp-
|
|
13
|
-
import { P as Ka } from "./PenAndPaper-
|
|
2
|
+
import { u as $a, c as za, t as Ta, a as Ma, p as D, b as Ra, C as ge, i as Q, f as ee, I as Ia, d as je, $ as Oa, o as Pa, e as Fa, x as qe, y as Ea, q as Na, r as _a, s as ae, l as Aa } from "./index-C1GB0E49.js";
|
|
3
|
+
import { d as Da, c as Ha, a as Je, t as Wa, l as w, r as pe, b as F, p as Ke, u as Ya } from "./useResponsive-CoxXLe23.js";
|
|
4
|
+
import { _ as Ba } from "./Tooltip-Pv3Bhir5.js";
|
|
5
|
+
import { L as Xa } from "./Legend-DrmUpnIK.js";
|
|
6
|
+
import { _ as Ua } from "./Title-W7iJGPjg.js";
|
|
7
|
+
import { S as Za } from "./Slicer-4R6np1wa.js";
|
|
8
|
+
import { u as Ga, U as Va } from "./usePrinter-y5uHyknw.js";
|
|
9
|
+
import ja from "./vue-ui-accordion-DWyRC3-h.js";
|
|
10
|
+
import { D as qa } from "./DataTable-rs_YrvMR.js";
|
|
11
|
+
import Ja from "./vue-ui-skeleton-CE6ibl1T.js";
|
|
12
|
+
import { u as Qe } from "./useNestedProp-CNAPgW6E.js";
|
|
13
|
+
import { P as Ka } from "./PenAndPaper-C-KjtyNA.js";
|
|
14
14
|
import { _ as Qa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const et = ["id"], at = ["onClick"], tt = {
|
|
16
16
|
key: 2,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),n=require("./index-C9HllqQA.cjs"),d=require("./useResponsive-BJ7DTGpm.cjs"),Je=require("./Tooltip-DJiwKA4y.cjs"),Ke=require("./Legend-BoBvZGqQ.cjs"),Qe=require("./Title-Dn00hErp.cjs"),et=require("./Slicer-BLkkkNUl.cjs"),Pe=require("./usePrinter-FSAw5pod.cjs"),tt=require("./vue-ui-accordion-BkUGNe2H.cjs"),at=require("./DataTable-DO2GAcBm.cjs"),lt=require("./vue-ui-skeleton-CPwED1As.cjs"),Me=require("./useNestedProp-DOr0hj4s.cjs"),ot=require("./PenAndPaper-DyMNuRla.cjs"),rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ut=["id"],nt=["onClick"],st={key:2,class:"vue-data-ui-watermark"},it=["innerHTML"],ct={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(Q,{expose:Re,emit:Oe}){const M=Q,{vue_ui_xy_canvas:Ne}=n.useConfig(),U=a.ref(n.createUid()),I=a.ref(null),C=a.ref(null),B=a.ref(null),i=a.ref(null),p=a.ref(1),z=a.ref(1),A=a.ref(!1),f=a.ref(null),_=a.ref(""),ee=a.ref(null),L=a.ref([]),O=a.ref(1),R=a.ref(!0),w=a.ref(!0),X=a.ref(null),te=a.ref(0),ae=a.ref(0),Z=a.ref(!1),le=a.ref(null),oe=a.ref(null),re=a.ref(null),ue=a.ref(null),ne=a.ref(0),se=a.ref(0),ie=a.ref(0),G=a.computed(()=>!!M.dataset&&M.dataset.length),t=a.computed({get:()=>ce(),set:e=>e});function ce(){const e=Me.useNestedProp({userConfig:M.config,defaultConfig:Ne});return e.theme?{...Me.useNestedProp({userConfig:n.themes.vue_ui_xy_canvas[e.theme]||M.config,defaultConfig:e}),customPalette:n.themePalettes[e.theme]||n.palette}:e}a.watch(()=>M.config,e=>{t.value=ce(),xe(),ne.value+=1,se.value+=1,ie.value+=1},{deep:!0});const ve=a.ref(t.value.style.chart.aspectRatio),{isPrinting:de,isImaging:he,generatePdf:fe,generateImage:ye}=Pe.usePrinter({elementId:`xy_canvas_${U.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas"}),s=a.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ie(e){Z.value=e,ae.value+=1}const pe=a.computed(()=>n.convertCustomPalette(t.value.customPalette)),$=a.computed(()=>N.value?Math.max(...N.value.filter((e,o)=>!L.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),l=a.computed(()=>{const e=p.value-p.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:p.value,canvasHeight:z.value,left:p.value*t.value.style.chart.paddingProportions.left,top:z.value*t.value.style.chart.paddingProportions.top,right:p.value-p.value*t.value.style.chart.paddingProportions.right,bottom:z.value-z.value*t.value.style.chart.paddingProportions.bottom,width:e,height:z.value-z.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(u.value.end-u.value.start)}});function ge(e,o){return e/o}function Be({hasAutoScale:e,series:o,min:r,max:v,scale:h,yOffset:g,individualHeight:c,stackIndex:m=null}){return o.map((k,K)=>{const S=h.min<0?Math.abs(h.min):0,T=ge(k+S,S+h.max);let P,E;e&&(P=Math.abs(h.min),E=ge(k+P,h.max+P));let F=0;return m===null?F=l.value.bottom-l.value.height*(e?E:T):F=l.value.bottom-g-c*(e?E:T),{x:l.value.left+l.value.slot*K+l.value.slot/2,y:F,value:k}})}const b=a.computed(()=>{const e=Math.min(...N.value.filter((c,m)=>!L.value.includes(c.absoluteIndex)).flatMap(c=>c.series.slice(u.value.start,u.value.end))),o=Math.max(...N.value.filter((c,m)=>!L.value.includes(c.absoluteIndex)).flatMap(c=>c.series.slice(u.value.start,u.value.end))),r=n.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),v=r.min<0?Math.abs(r.min):0,h=l.value.bottom-l.value.height*(v/(r.max+v)),g=r.ticks.map(c=>({y:l.value.bottom-l.value.height*((c+v)/(r.max+v)),x:l.value.left-8,value:c}));return{absoluteMin:v,max:o,min:e,scale:r,yLabels:g,zero:h}}),Ee=a.computed(()=>y.value.map(e=>`
|
|
2
2
|
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
3
3
|
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
4
4
|
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),y=require("./index-eFox7weK.cjs"),k=require("./BaseIcon-uALK38Ov.cjs"),x=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$=["value"],S={class:"icon"},M={__name:"ColorPicker",props:{value:{type:String,default:"#ffffff"},size:{type:String,default:"50px"}},emits:["update:value"],setup(l,{emit:g}){const a=l,r=e.computed(()=>({backgroundColor:a.value,width:"100%",height:"100%",cursor:"pointer"})),c=e.ref(null),h=()=>{var u;(u=c.value)==null||u.click()},i=u=>{const s=u.target.value;g("update:value",s)},d=e.computed(()=>y.adaptColorToBackground(a.value));return e.watch(()=>a.value,u=>{c.value.value=u}),(u,s)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(r.value),class:"color-picker-wrapper",onClick:h},[e.createElementVNode("input",{ref_key:"colorInput",ref:c,type:"color",value:l.value,class:"hidden-input",onInput:i},null,40,$),e.createElementVNode("div",S,[e.createVNode(k.default,{name:"palette",stroke:d.value,size:22},null,8,["stroke"])])],4))}},_=x._export_sfc(M,[["__scopeId","data-v-d3f01240"]]),F={class:e.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},T=["disabled"],R=["xmlns","viewBox","onTouchstart","onTouchmove"],D=["d","stroke"],I=["d","stroke"],L={__name:"PenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup(l,{emit:g}){const a=l,r=e.ref([]),c=e.ref([]),h=e.ref("0 0 0 0"),i=e.ref(a.color),d=e.computed(()=>y.lightenHexColor(a.color,.6));function u({width:t,height:o}){h.value=`0 0 ${t} ${o}`}const s=e.ref(null);e.onMounted(()=>{e.nextTick(()=>{if(a.parent){s.value=new ResizeObserver(n=>{for(const m of n){const{width:z,height:P}=m.contentRect;u({width:z,height:P})}}),s.value.observe(a.parent);const{width:t,height:o}=a.parent.getBoundingClientRect();u({width:t,height:o})}})}),e.onBeforeUnmount(()=>{s.value&&s.value.disconnect()}),e.watch(()=>a.parent,t=>{if(!t)return;const{width:o,height:n}=a.parent.getBoundingClientRect();u({width:o,height:n})},{immediate:!0});const v=e.ref(!1),p=e.ref(""),f=e.ref(null);function b(t){if(!f.value)return;v.value=!0;const{x:o,y:n}=w(t);p.value=`M ${o} ${n}`}function B(t){if(!v.value||!f.value)return;const{x:o,y:n}=w(t);p.value+=` ${o} ${n}`}function C(){v.value&&(r.value.push(p.value),c.value=[],p.value=""),v.value=!1}function w(t){if(!f.value)return{x:0,y:0};const o=f.value.getBoundingClientRect();let n,m;return t.touches&&t.touches.length?(n=t.touches[0].clientX,m=t.touches[0].clientY):(n=t.clientX,m=t.clientY),{x:n-o.left,y:m-o.top}}e.ref(!1);function E(){if(r.value.length>0){const t=r.value.pop();c.value.push(t)}}function V(){if(c.value.length>0){const t=c.value.pop();r.value.push(t)}}function N(){r.value=[],c.value=[]}return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.active?(e.openBlock(),e.createElementBlock("div",{key:0,"data-html2canvas-ignore":"",class:e.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:l.active})},[e.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:e.normalizeStyle({backgroundColor:l.backgroundColor,border:`1px solid ${d.value}`}),onClick:o[0]||(o[0]=n=>g("close"))},[e.createVNode(k.default,{name:"close",stroke:l.color},null,8,["stroke"])],4),e.createElementVNode("button",F,[e.createVNode(_,{value:i.value,"onUpdate:value":o[1]||(o[1]=n=>i.value=n)},null,8,["value"])]),e.createElementVNode("button",{class:e.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!r.value.length}),disabled:!r.value.length,style:e.normalizeStyle({backgroundColor:l.backgroundColor,border:`1px solid ${d.value}`}),onClick:E},[e.createVNode(k.default,{name:"restart",stroke:l.color},null,8,["stroke"])],14,T),e.createElementVNode("button",{class:e.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!c.value.length}),style:e.normalizeStyle({backgroundColor:l.backgroundColor,border:`1px solid ${d.value}`}),onClick:V},[e.createVNode(k.default,{name:"restart",stroke:l.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),e.createElementVNode("button",{class:e.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!r.value.length},"vue-ui-pen-and-paper-action"]),style:e.normalizeStyle({backgroundColor:l.backgroundColor,border:`1px solid ${d.value}`}),onClick:N},[e.createVNode(k.default,{name:"trash",stroke:l.color},null,8,["stroke"])],6)],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgElement",ref:f,xmlns:e.unref(y.XMLNS),viewBox:h.value,class:e.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!l.active}),onMousedown:b,onMousemove:B,onMouseup:C,onMouseleave:C,onTouchstart:e.withModifiers(b,["prevent"]),onTouchmove:e.withModifiers(B,["prevent"]),onTouchend:C},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,n=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-pen-and-paper-path",key:n,d:n,stroke:i.value,fill:"none"},null,8,D))),128)),v.value?(e.openBlock(),e.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:p.value,stroke:i.value,fill:"none"},null,8,I)):e.createCommentVNode("",!0)],42,R))],64))}},X=x._export_sfc(L,[["__scopeId","data-v-634187a1"]]);exports.PenAndPaper=X;
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { computed as P, ref as s, watch as z, openBlock as i, createElementBlock as d, normalizeStyle as y, createElementVNode as v, createVNode as h, onMounted as V, nextTick as U, onBeforeUnmount as Y, Fragment as T, normalizeClass as g, createCommentVNode as R, unref as A, withModifiers as _, renderList as H } from "vue";
|
|
2
|
-
import { F as O, l as j, X as q } from "./index-Bya_q1J-.js";
|
|
3
|
-
import w from "./BaseIcon-BbvG1AlW.js";
|
|
4
|
-
import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
const G = ["value"], J = { class: "icon" }, K = {
|
|
6
|
-
__name: "ColorPicker",
|
|
7
|
-
props: {
|
|
8
|
-
value: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: "#ffffff"
|
|
11
|
-
},
|
|
12
|
-
size: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: "50px"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
emits: ["update:value"],
|
|
18
|
-
setup(n, { emit: B }) {
|
|
19
|
-
const a = n, l = P(() => ({
|
|
20
|
-
backgroundColor: a.value,
|
|
21
|
-
width: "100%",
|
|
22
|
-
height: "100%",
|
|
23
|
-
cursor: "pointer"
|
|
24
|
-
})), u = s(null), x = () => {
|
|
25
|
-
var r;
|
|
26
|
-
(r = u.value) == null || r.click();
|
|
27
|
-
}, p = (r) => {
|
|
28
|
-
const c = r.target.value;
|
|
29
|
-
B("update:value", c);
|
|
30
|
-
}, f = P(() => O(a.value));
|
|
31
|
-
return z(
|
|
32
|
-
() => a.value,
|
|
33
|
-
(r) => {
|
|
34
|
-
u.value.value = r;
|
|
35
|
-
}
|
|
36
|
-
), (r, c) => (i(), d("div", {
|
|
37
|
-
style: y(l.value),
|
|
38
|
-
class: "color-picker-wrapper",
|
|
39
|
-
onClick: x
|
|
40
|
-
}, [
|
|
41
|
-
v("input", {
|
|
42
|
-
ref_key: "colorInput",
|
|
43
|
-
ref: u,
|
|
44
|
-
type: "color",
|
|
45
|
-
value: n.value,
|
|
46
|
-
class: "hidden-input",
|
|
47
|
-
onInput: p
|
|
48
|
-
}, null, 40, G),
|
|
49
|
-
v("div", J, [
|
|
50
|
-
h(w, {
|
|
51
|
-
name: "palette",
|
|
52
|
-
stroke: f.value,
|
|
53
|
-
size: 22
|
|
54
|
-
}, null, 8, ["stroke"])
|
|
55
|
-
])
|
|
56
|
-
], 4));
|
|
57
|
-
}
|
|
58
|
-
}, Q = /* @__PURE__ */ D(K, [["__scopeId", "data-v-d3f01240"]]), W = {
|
|
59
|
-
class: /* @__PURE__ */ g({
|
|
60
|
-
"vue-ui-pen-and-paper-action": !0
|
|
61
|
-
}),
|
|
62
|
-
style: { padding: "0 !important" }
|
|
63
|
-
}, Z = ["disabled"], ee = ["xmlns", "viewBox", "onTouchstart", "onTouchmove"], te = ["d", "stroke"], oe = ["d", "stroke"], ne = {
|
|
64
|
-
__name: "PenAndPaper",
|
|
65
|
-
props: {
|
|
66
|
-
parent: {
|
|
67
|
-
type: HTMLElement
|
|
68
|
-
},
|
|
69
|
-
backgroundColor: {
|
|
70
|
-
type: String,
|
|
71
|
-
default: "#FFFFFF"
|
|
72
|
-
},
|
|
73
|
-
color: {
|
|
74
|
-
type: String,
|
|
75
|
-
default: "#2D353C"
|
|
76
|
-
},
|
|
77
|
-
active: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: !1
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
emits: ["close"],
|
|
83
|
-
setup(n, { emit: B }) {
|
|
84
|
-
const a = n, l = s([]), u = s([]), x = s("0 0 0 0"), p = s(a.color), f = P(() => j(a.color, 0.6));
|
|
85
|
-
function r({ width: e, height: t }) {
|
|
86
|
-
x.value = `0 0 ${e} ${t}`;
|
|
87
|
-
}
|
|
88
|
-
const c = s(null);
|
|
89
|
-
V(() => {
|
|
90
|
-
U(() => {
|
|
91
|
-
if (a.parent) {
|
|
92
|
-
c.value = new ResizeObserver((o) => {
|
|
93
|
-
for (const b of o) {
|
|
94
|
-
const { width: L, height: N } = b.contentRect;
|
|
95
|
-
r({ width: L, height: N });
|
|
96
|
-
}
|
|
97
|
-
}), c.value.observe(a.parent);
|
|
98
|
-
const { width: e, height: t } = a.parent.getBoundingClientRect();
|
|
99
|
-
r({ width: e, height: t });
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}), Y(() => {
|
|
103
|
-
c.value && c.value.disconnect();
|
|
104
|
-
}), z(
|
|
105
|
-
() => a.parent,
|
|
106
|
-
(e) => {
|
|
107
|
-
if (!e) return;
|
|
108
|
-
const { width: t, height: o } = a.parent.getBoundingClientRect();
|
|
109
|
-
r({ width: t, height: o });
|
|
110
|
-
},
|
|
111
|
-
{ immediate: !0 }
|
|
112
|
-
);
|
|
113
|
-
const k = s(!1), m = s(""), C = s(null);
|
|
114
|
-
function M(e) {
|
|
115
|
-
if (!C.value) return;
|
|
116
|
-
k.value = !0;
|
|
117
|
-
const { x: t, y: o } = S(e);
|
|
118
|
-
m.value = `M ${t} ${o}`;
|
|
119
|
-
}
|
|
120
|
-
function F(e) {
|
|
121
|
-
if (!k.value || !C.value) return;
|
|
122
|
-
const { x: t, y: o } = S(e);
|
|
123
|
-
m.value += ` ${t} ${o}`;
|
|
124
|
-
}
|
|
125
|
-
function $() {
|
|
126
|
-
k.value && (l.value.push(m.value), u.value = [], m.value = ""), k.value = !1;
|
|
127
|
-
}
|
|
128
|
-
function S(e) {
|
|
129
|
-
if (!C.value) return { x: 0, y: 0 };
|
|
130
|
-
const t = C.value.getBoundingClientRect();
|
|
131
|
-
let o, b;
|
|
132
|
-
return e.touches && e.touches.length ? (o = e.touches[0].clientX, b = e.touches[0].clientY) : (o = e.clientX, b = e.clientY), {
|
|
133
|
-
x: o - t.left,
|
|
134
|
-
y: b - t.top
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
s(!1);
|
|
138
|
-
function I() {
|
|
139
|
-
if (l.value.length > 0) {
|
|
140
|
-
const e = l.value.pop();
|
|
141
|
-
u.value.push(e);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function X() {
|
|
145
|
-
if (u.value.length > 0) {
|
|
146
|
-
const e = u.value.pop();
|
|
147
|
-
l.value.push(e);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
function E() {
|
|
151
|
-
l.value = [], u.value = [];
|
|
152
|
-
}
|
|
153
|
-
return (e, t) => (i(), d(T, null, [
|
|
154
|
-
n.active ? (i(), d("div", {
|
|
155
|
-
key: 0,
|
|
156
|
-
"data-html2canvas-ignore": "",
|
|
157
|
-
class: g({
|
|
158
|
-
"vue-ui-pen-and-paper-actions": !0,
|
|
159
|
-
visible: n.active
|
|
160
|
-
})
|
|
161
|
-
}, [
|
|
162
|
-
v("button", {
|
|
163
|
-
class: "vue-ui-pen-and-paper-action",
|
|
164
|
-
style: y({
|
|
165
|
-
backgroundColor: n.backgroundColor,
|
|
166
|
-
border: `1px solid ${f.value}`
|
|
167
|
-
}),
|
|
168
|
-
onClick: t[0] || (t[0] = (o) => B("close"))
|
|
169
|
-
}, [
|
|
170
|
-
h(w, {
|
|
171
|
-
name: "close",
|
|
172
|
-
stroke: n.color
|
|
173
|
-
}, null, 8, ["stroke"])
|
|
174
|
-
], 4),
|
|
175
|
-
v("button", W, [
|
|
176
|
-
h(Q, {
|
|
177
|
-
value: p.value,
|
|
178
|
-
"onUpdate:value": t[1] || (t[1] = (o) => p.value = o)
|
|
179
|
-
}, null, 8, ["value"])
|
|
180
|
-
]),
|
|
181
|
-
v("button", {
|
|
182
|
-
class: g({
|
|
183
|
-
"vue-ui-pen-and-paper-action": !0,
|
|
184
|
-
"vue-ui-pen-and-paper-action-disabled": !l.value.length
|
|
185
|
-
}),
|
|
186
|
-
disabled: !l.value.length,
|
|
187
|
-
style: y({
|
|
188
|
-
backgroundColor: n.backgroundColor,
|
|
189
|
-
border: `1px solid ${f.value}`
|
|
190
|
-
}),
|
|
191
|
-
onClick: I
|
|
192
|
-
}, [
|
|
193
|
-
h(w, {
|
|
194
|
-
name: "restart",
|
|
195
|
-
stroke: n.color
|
|
196
|
-
}, null, 8, ["stroke"])
|
|
197
|
-
], 14, Z),
|
|
198
|
-
v("button", {
|
|
199
|
-
class: g({
|
|
200
|
-
"vue-ui-pen-and-paper-action": !0,
|
|
201
|
-
"vue-ui-pen-and-paper-action-disabled": !u.value.length
|
|
202
|
-
}),
|
|
203
|
-
style: y({
|
|
204
|
-
backgroundColor: n.backgroundColor,
|
|
205
|
-
border: `1px solid ${f.value}`
|
|
206
|
-
}),
|
|
207
|
-
onClick: X
|
|
208
|
-
}, [
|
|
209
|
-
h(w, {
|
|
210
|
-
name: "restart",
|
|
211
|
-
stroke: n.color,
|
|
212
|
-
style: { transform: "scaleX(-1)" }
|
|
213
|
-
}, null, 8, ["stroke"])
|
|
214
|
-
], 6),
|
|
215
|
-
v("button", {
|
|
216
|
-
class: g([{
|
|
217
|
-
"vue-ui-pen-and-paper-action": !0,
|
|
218
|
-
"vue-ui-pen-and-paper-action-disabled": !l.value.length
|
|
219
|
-
}, "vue-ui-pen-and-paper-action"]),
|
|
220
|
-
style: y({
|
|
221
|
-
backgroundColor: n.backgroundColor,
|
|
222
|
-
border: `1px solid ${f.value}`
|
|
223
|
-
}),
|
|
224
|
-
onClick: E
|
|
225
|
-
}, [
|
|
226
|
-
h(w, {
|
|
227
|
-
name: "trash",
|
|
228
|
-
stroke: n.color
|
|
229
|
-
}, null, 8, ["stroke"])
|
|
230
|
-
], 6)
|
|
231
|
-
], 2)) : R("", !0),
|
|
232
|
-
(i(), d("svg", {
|
|
233
|
-
ref_key: "svgElement",
|
|
234
|
-
ref: C,
|
|
235
|
-
xmlns: A(q),
|
|
236
|
-
viewBox: x.value,
|
|
237
|
-
class: g({
|
|
238
|
-
"vue-ui-pen-and-paper": !0,
|
|
239
|
-
inactive: !n.active
|
|
240
|
-
}),
|
|
241
|
-
onMousedown: M,
|
|
242
|
-
onMousemove: F,
|
|
243
|
-
onMouseup: $,
|
|
244
|
-
onMouseleave: $,
|
|
245
|
-
onTouchstart: _(M, ["prevent"]),
|
|
246
|
-
onTouchmove: _(F, ["prevent"]),
|
|
247
|
-
onTouchend: $
|
|
248
|
-
}, [
|
|
249
|
-
(i(!0), d(T, null, H(l.value, (o) => (i(), d("path", {
|
|
250
|
-
class: "vue-ui-pen-and-paper-path",
|
|
251
|
-
key: o,
|
|
252
|
-
d: o,
|
|
253
|
-
stroke: p.value,
|
|
254
|
-
fill: "none"
|
|
255
|
-
}, null, 8, te))), 128)),
|
|
256
|
-
k.value ? (i(), d("path", {
|
|
257
|
-
key: 0,
|
|
258
|
-
class: "vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",
|
|
259
|
-
d: m.value,
|
|
260
|
-
stroke: p.value,
|
|
261
|
-
fill: "none"
|
|
262
|
-
}, null, 8, oe)) : R("", !0)
|
|
263
|
-
], 42, ee))
|
|
264
|
-
], 64));
|
|
265
|
-
}
|
|
266
|
-
}, se = /* @__PURE__ */ D(ne, [["__scopeId", "data-v-634187a1"]]);
|
|
267
|
-
export {
|
|
268
|
-
se as P
|
|
269
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function b(e,i,o,t={}){if(o<=0)return;e.save();const{color:s="black",lineWidth:h=1,lineCap:w="round",lineJoin:f="round",lineDash:g=null,lineDashoffset:u=0,shadowColor:l=null,shadowBlur:r=0,shadowOffsetX:y=0,shadowOffsetY:d=0,fillStyle:N="#FFFFFF"}=t;e.beginPath(),e.arc(i.x,i.y,o,0,2*Math.PI),e.strokeStyle=s,e.lineWidth=h,e.lineCap=w,e.lineJoin=f,g&&(e.setLineDash(g),e.lineDashoffset=u),l&&(e.shadowColor=l,e.shadowOffsetX=y,e.shadowOffsetY=d),r&&(e.shadowBlur=r),N&&(e.fillStyle=N),e.fillStyle&&e.fill(),e.stroke(),e.restore()}function C(e,i,o={}){if(!i.length)return;e.save();const{color:t="black",lineWidth:s=1,lineCap:h="round",lineJoin:w="round",lineDash:f=null,lineDashoffset:g=0,shadowColor:u=null,shadowBlur:l=0,shadowOffsetX:r=0,shadowOffsetY:y=0}=o;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let d=1;d<i.length;d+=1)e.lineTo(i[d].x,i[d].y);e.strokeStyle=t,e.lineWidth=s,e.lineCap=h,e.lineJoin=w,f&&(e.setLineDash(f),e.lineDashoffset=g),u&&(e.shadowColor=u,e.shadowOffsetX=r,e.shadowOffsetY=y),l&&(e.shadowBlur=l),e.stroke(),e.restore()}function m(e,i,o={}){if(!i.length)return;e.save();const{strokeColor:t="black",lineWidth:s=1,lineCap:h="round",lineJoin:w="round",lineDash:f=null,lineDashoffset:g=0,fillColor:u=null,gradient:l=null,shadowColor:r=null,shadowBlur:y=0,shadowOffsetX:d=0,shadowOffsetY:N=0}=o;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let n=1;n<i.length;n+=1)e.lineTo(i[n].x,i[n].y);if(e.closePath(),e.strokeStyle=t,e.lineWidth=s,e.lineCap=h,e.lineJoin=w,f&&(e.setLineDash(f),e.lineDashoffset=g),r&&(e.shadowColor=r,e.shadowBlur=y,e.shadowOffsetX=d,e.shadowOffsetY=N),l){let n;l.type==="linear"?n=e.createLinearGradient(a(l.start.x,Number.MIN_VALUE),a(l.start.y,Number.MIN_VALUE),a(l.end.x,Number.MIN_VALUE*2),a(l.end.y,Number.MIN_VALUE*2)):l.type==="radial"&&(n=e.createRadialGradient(a(l.start.x,Number.MIN_VALUE),a(l.start.y,Number.MIN_VALUE),l.start.r||0,a(l.end.x,Number.MIN_VALUE*2),a(l.end.y,Number.MIN_VALUE*2),l.end.r||0)),n&&l.stops&&(l.stops.forEach(p=>{n.addColorStop(p.offset,p.color)}),e.fillStyle=n)}else u&&(e.fillStyle=u);e.fillStyle&&e.fill(),t&&e.stroke(),e.restore()}function L(e,i,o={}){if(!i.length)return;e.save();const{strokeColor:t="black",lineWidth:s=1,lineCap:h="round",lineJoin:w="round",lineDash:f=null,lineDashoffset:g=0,fillColor:u=null,gradient:l=null,shadowColor:r=null,shadowBlur:y=0,shadowOffsetX:d=0,shadowOffsetY:N=0}=o;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let n=1;n<i.length;n+=1)e.lineTo(i[n].x,i[n].y);if(e.closePath(),e.strokeStyle=t,e.lineWidth=s,e.lineCap=h,e.lineJoin=w,f&&(e.setLineDash(f),e.lineDashoffset=g),r&&(e.shadowColor=r,e.shadowBlur=y,e.shadowOffsetX=d,e.shadowOffsetY=N),l){let n;l.type==="linear"?n=e.createLinearGradient(a(l.start.x,Number.MIN_VALUE),a(l.start.y,Number.MIN_VALUE),a(l.end.x,Number.MIN_VALUE*2),a(l.end.y,Number.MIN_VALUE*2)):l.type==="radial"&&(n=e.createRadialGradient(a(l.start.x,Number.MIN_VALUE),a(l.start.y,Number.MIN_VALUE),l.start.r||0,a(l.end.x,Number.MIN_VALUE*2),a(l.end.y,Number.MIN_VALUE*2),l.end.r||0)),n&&l.stops&&(l.stops.forEach(p=>{n.addColorStop(p.offset,p.color)}),e.fillStyle=n)}else u&&(e.fillStyle=u);e.fillStyle&&e.fill(),t&&e.stroke(),e.restore()}function I(e,i,o,t,s={}){e.save();const{font:h="16px sans-serif",color:w="black",align:f="start",baseline:g="alphabetic",maxWidth:u=void 0,rotation:l=0,shadowColor:r=null,shadowBlur:y=0,shadowOffsetX:d=0,shadowOffsetY:N=0,strokeColor:n=null,lineWidth:p=1}=s;e.font=h,e.fillStyle=w,e.textAlign=f,e.textBaseline=g,r&&(e.shadowColor=r,e.shadowBlur=y,e.shadowOffsetX=d,e.shadowOffsetY=N),n&&(e.strokeStyle=n,e.lineWidth=p),l!==0&&(e.translate(o,t),e.rotate(Math.PI/180*l),e.translate(-o,-t)),e.fillText(i,o,t,u),n&&e.strokeText(i,o,t,u),e.restore()}function O(e,i=20){let o;return function(...t){const s=this;o||(e.apply(s,t),o=!0,setTimeout(()=>o=!1,i))}}function E(e,i,o=!1){let t;return function(...s){const h=this,w=function(){t=null,o||e.apply(h,s)},f=o&&!t;clearTimeout(t),t=setTimeout(w,i),f&&e.apply(h,s)}}function S(e){const i=document.createElement("canvas");return i.width=e.width||1,i.height=e.height||1,e.width||(e.width=1),e.height||(e.height=1),i.getContext("2d").drawImage(e,0,0),i}function a(e,i){return[null,void 0,NaN,1/0,-1/0].includes(e)?i:e}function k({chart:e,title:i=null,slicer:o=null,legend:t=null,source:s=null}){let h=0,w=0;if(e){const f=e.parentNode,{height:g,width:u}=f.getBoundingClientRect();let l=0,r=0,y=0,d=0;i&&(l=i.getBoundingClientRect().height),o&&(r=o.getBoundingClientRect().height),t&&(y=t.getBoundingClientRect().height),s&&(d=s.getBoundingClientRect().height),h=g-l-r-y-d,w=u}return{width:w,height:h}}exports.circle=b;exports.cloneCanvas=S;exports.debounce=E;exports.line=C;exports.polygon=m;exports.rect=L;exports.text=I;exports.throttle=O;exports.useResponsive=k;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-eFox7weK.cjs"),U=require("./useResponsive-CodiGUOE.cjs"),te=require("./Title-0Tp4hZ4u.cjs"),W=require("./usePrinter-CSRFnDBU.cjs"),le=require("./Tooltip-9Tp2Yrd1.cjs"),ae=require("./DataTable-DTzynbND.cjs"),oe=require("./vue-ui-skeleton-BqKzuhkB.cjs"),re=require("./vue-ui-accordion-TEMpM1hO.cjs"),H=require("./useNestedProp-BkgEhTQY.cjs"),se=require("./PackageVersion-DwI-KhXH.cjs"),ie=require("./PenAndPaper-CDFVOo7X.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ne=["id"],de=["xmlns","viewBox"],ce=["id"],ve=["stop-color"],ye=["stop-color"],he=["id"],fe=["stop-color"],pe=["stop-color"],ge=["x","y","width","height","fill","rx"],be=["x","y","width","height","fill","rx"],me=["x","y","width","height","fill","rx"],xe=["x","y","width","height","fill","rx"],ke={key:0},we=["x","y","fill","font-size","font-weight"],Ce=["x","y","fill","font-size","font-weight"],_e={key:1},Ne=["x","y","font-size","fill","font-weight"],Le={key:2},Se={key:0},Te=["x1","x2","y1","y2","stroke","stroke-width"],Be=["x1","x2","y1","y2","stroke","stroke-width"],Ae=["x1","x2","y1","y2","stroke","stroke-width"],$e=["x","y","font-size","fill","font-weight"],Ee=["x1","x2","y1","y2","stroke","stroke-width"],ze=["x","y","font-size","fill","font-weight"],Ve=["x","y","font-size","fill","font-weight"],Pe=["x","y","width","height","fill","onMouseover"],Ie={key:4,class:"vue-data-ui-watermark"},Oe={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(S,{expose:X}){const n=S,{vue_ui_age_pyramid:j}=r.useConfig(),m=e.computed(()=>!!n.dataset&&n.dataset.length),c=e.ref(r.createUid()),Y=e.ref(null),C=e.ref(!1),_=e.ref(""),x=e.ref(null),T=e.ref(0),y=e.ref(null),B=e.ref(null),A=e.ref(null),$=e.ref(0),E=e.ref(0),t=e.computed({get:()=>z(),set:l=>l});function z(){const l=H.useNestedProp({userConfig:n.config,defaultConfig:j});return l.theme?{...H.useNestedProp({userConfig:r.themes.vue_ui_age_pyramid[l.theme]||n.config,defaultConfig:l})}:l}e.watch(()=>n.config,l=>{t.value=z(),P(),$.value+=1,E.value+=1},{deep:!0});const V=e.ref(null);e.onMounted(()=>{P()});function P(){if(r.objectIsEmpty(n.dataset)&&r.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=U.throttle(()=>{const{width:i,height:a}=U.useResponsive({chart:y.value,title:t.value.style.title.text?B.value:null,source:A.value});d.value.width=i,d.value.height=a});V.value=new ResizeObserver(l),V.value.observe(y.value.parentNode)}}const{isPrinting:I,isImaging:O,generatePdf:F,generateImage:D}=W.usePrinter({elementId:`vue-ui-age-pyramid_${c.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),s=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,a=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:a,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),J=e.computed(()=>n.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),h=e.computed(()=>{const l=K(g.value/5),i=[],a=[];for(let o=0;o<=5;o+=1){const u=l*o,G=l*(o-5);i.push({value:u,x:s.value.left+s.value.width/2+t.value.style.layout.centerSlit.width+u/g.value*s.value.leftChart.width}),a.push({value:Math.abs(G),x:s.value.left+s.value.width/2+G/g.value*s.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:a}});function K(l){if(l===0)return 0;const a=10**Math.floor(Math.log10(Math.abs(l)));let o;return l<0,o=Math.round(l/a)*a,o}const g=e.computed(()=>Math.max(...n.dataset.flatMap(l=>l.slice(-2).map(i=>r.checkNaN(i))))),f=e.computed(()=>n.dataset.length),Q=e.computed(()=>n.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/g.value},right:{value:l[3],proportionToMax:l[3]/g.value}}))),p=e.computed(()=>Q.value.map((l,i)=>{const a=s.value.top+s.value.height/f.value*i,o=s.value.height/f.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:a,color:t.value.style.layout.bars.left.color,x:s.value.leftChart.right-l.left.proportionToMax*s.value.leftChart.width,width:r.checkNaN(l.left.proportionToMax*s.value.leftChart.width),height:o},right:{...l.right,y:a,color:t.value.style.layout.bars.right.color,x:s.value.rightChart.left,width:r.checkNaN(l.right.proportionToMax*s.value.rightChart.width),height:o}}})),N=e.ref(null);function Z(l,i){x.value=l,N.value={datapoint:i,seriesIndex:l,series:p.value,config:t.value};const a=t.value.style.tooltip.customFormat;if(r.isFunction(a)&&r.functionReturnsString(()=>a({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value})))_.value=a({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value});else{let o="";const u=p.value[l];o+=`<div><b>${u.segment}</b></div>`,o+=`<div>${t.value.translations.age}: ${r.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,r.checkNaN(u.age),r.dataLabel({v:r.checkNaN(u.age)}),{datapoint:i,seriesIndex:l})}</div>`,o+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,o+='<div style="display:flex; flex-direction:row;gap:12px">',o+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(u.left.value),r.dataLabel({v:r.checkNaN(u.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(u.right.value),r.dataLabel({v:r.checkNaN(u.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+="</div>",o+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(u.right.value)+r.checkNaN(u.left.value),r.dataLabel({v:r.checkNaN(u.right.value)+r.checkNaN(u.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,o+="</div>",_.value=`<div>${o}</div>`}C.value=!0}function M(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=n.dataset.map(u=>[u[0],u[1],u[2],u[3],u[2]+u[3]]),a=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=n.dataset.map(o=>[o[0],o[1],o[2].toLocaleString(),o[3].toLocaleString(),(o[2]+o[3]).toLocaleString()]),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{head:l,body:i,config:a,colNames:l}}),b=e.ref(!1);function ee(l){b.value=l,T.value+=1}function R(){v.value.showTable=!v.value.showTable}function q(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function L(){w.value=!w.value}return X({generatePdf:F,generateCsv:M,generateImage:D,toggleTable:R,toggleTooltip:q,toggleAnnotator:L}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:y,id:`vue-ui-age-pyramid_${c.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ie.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:w.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(te._sfc_main,{key:`title_${$.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:Y,key:`user_options_${T.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(O),isPrinting:e.unref(I),uid:c.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(F),onGenerateCsv:M,onGenerateImage:e.unref(D),onToggleTable:R,onToggleTooltip:q,onToggleAnnotator:L},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(se._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,ve),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,ye)],8,ce),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,fe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,pe)],8,he)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:a.left.x,y:a.left.y,width:e.unref(r.checkNaN)(a.left.width<=0?1e-4:a.left.width),height:a.left.height<=0?1e-4:a.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,ge),e.createElementVNode("rect",{x:a.left.x,y:a.left.y,width:a.left.width<=0?1e-4:a.left.width,height:a.left.height<=0?1e-4:a.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:a.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,be),e.createElementVNode("rect",{x:a.right.x,y:a.right.y,width:a.right.width<=0?1e-4:a.right.width,height:a.right.height<=0?1e-4:a.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,me),e.createElementVNode("rect",{x:a.right.x,y:a.right.y,width:a.right.width<=0?1e-4:a.right.width,height:a.right.height<=0?1e-4:a.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:a.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,xe)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",ke,[e.createElementVNode("text",{x:s.value.left,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,we),e.createElementVNode("text",{x:s.value.right,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,Ce)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.value,(a,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.value.centerX,y:s.value.top+s.value.height/f.value*o+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,a,e.unref(r.dataLabel)({v:a}),{datapoint:a,seriesIndex:o})),9,Ne)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Le,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Se,[e.createElementVNode("line",{x1:h.value.right[0].x,x2:h.value.right.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Te),e.createElementVNode("line",{x1:h.value.left[0].x,x2:h.value.left.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Be)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.right,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ae)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:a.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,a.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:a.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:a,seriesIndex:o})),9,$e)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.left,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:a.x,x2:a.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:a.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,a.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:a.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:a,seriesIndex:o})),9,ze)]))),256)),e.createElementVNode("text",{x:s.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Ve)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.dataset,(a,o)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:s.value.left,y:s.value.top+s.value.height/f.value*o-t.value.style.layout.bars.gap/2,width:s.value.width<=0?1e-4:s.value.width,height:s.value.height/f.value<=0?1e-4:s.value.height/f.value,fill:x.value!==null&&x.value===o?e.unref(r.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:u=>Z(o,a),onMouseleave:i[0]||(i[0]=u=>{x.value=null,C.value=!1})},null,40,Pe)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,de)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:5,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:A,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(le._sfc_main,{show:v.value.showTooltip&&C.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:y.value,content:_.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...N.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),m.value?(e.openBlock(),e.createBlock(re.default,{key:7,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ae.DataTable,{key:`table_${E.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ne))}},Fe=ue._export_sfc(Oe,[["__scopeId","data-v-6bb3bace"]]);exports.default=Fe;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-eFox7weK.cjs"),$=require("./useNestedProp-BkgEhTQY.cjs"),R=require("./Title-0Tp4hZ4u.cjs"),j=require("./Legend-Cgw4lO2O.cjs"),V=require("./usePrinter-CSRFnDBU.cjs"),G=require("./PackageVersion-DwI-KhXH.cjs"),X=require("./PenAndPaper-CDFVOo7X.cjs"),Y=require("./vue-ui-skeleton-BqKzuhkB.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q=["xmlns","viewBox"],Z={key:0},ee=["x","y","height","width","fill","stroke"],te=["x","y","height","width","rx","fill","stroke","stroke-width"],ae=["x","y","height","width","fill","stroke","stroke-width"],le=["x","y","font-size","font-weight","fill"],re=["x","y","height","width","rx","fill","stroke","stroke-width"],oe={key:3},se=["x","y","fill","font-size","font-weight"],ne={key:4},ue=["x1","x2","y1","y2","stroke"],ie={key:4,class:"vue-data-ui-watermark"},ce={class:"vue-ui-bullet-legend-item",dir:"auto"},de={style:{"margin-right":"2px"}},he={key:6,ref:"source",dir:"auto"},ve={__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:I}=s.useConfig(),y=e.ref(null),z=e.ref(null),w=e.ref(0),O=e.ref(null),H=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=$.useNestedProp({userConfig:n.config,defaultConfig:I});return a.theme?{...$.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}}),T=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,W)=>({...c,color:c.color?s.convertColorToHex(c.color):T.value[W],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:P,isImaging:N,generatePdf:S,generateImage:E}=V.usePrinter({elementId:`bullet_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-bullet"}),m=e.ref(!1);function D(a){m.value=a,H.value+=1}function U(){return i.value}const g=e.ref(!1);function b(){g.value=!g.value}return F({getData:U,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(X.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),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;"},[(e.openBlock(),e.createBlock(R._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(V.UserOptions,{key:2,ref:"details",backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(P),isImaging:e.unref(N),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:D,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:3,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(G._sfc_main),v.value?(e.openBlock(),e.createElementBlock("g",Z,[(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,ee))),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,te)),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,ae),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,le)):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,re)):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show?(e.openBlock(),e.createElementBlock("g",oe,[(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,se))),256))])):e.createCommentVNode("",!0),t.value.style.chart.segments.dataLabels.show&&t.value.style.chart.segments.ticks.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("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,ue))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,Q)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ie,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Y.default,{key:5,config:{type:"bullet",style:{backgroundColor:t.value.style.chart.backgroundColor,bullet:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(j.Legend,{key:0,clickable:!1,legendSet:L.value,config:M.value},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",ce,[e.createElementVNode("span",de,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",he,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],14,K))}},me=J._export_sfc(ve,[["__scopeId","data-v-abcb34e3"]]);exports.default=me;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-eFox7weK.cjs"),oe=require("./useResponsive-CodiGUOE.cjs"),be=require("./Title-0Tp4hZ4u.cjs"),ae=require("./usePrinter-CSRFnDBU.cjs"),xe=require("./Tooltip-9Tp2Yrd1.cjs"),we=require("./DataTable-DTzynbND.cjs"),Ce=require("./vue-ui-skeleton-BqKzuhkB.cjs"),Ne=require("./Slicer-uSjfNJjG.cjs"),$e=require("./vue-ui-accordion-TEMpM1hO.cjs"),ne=require("./useNestedProp-BkgEhTQY.cjs"),_e=require("./PackageVersion-DwI-KhXH.cjs"),Be=require("./PenAndPaper-CDFVOo7X.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Ee=["xmlns","viewBox"],ze={key:0},Ae=["id"],Te=["stop-color"],Fe=["stop-color"],Le=["stop-color"],Pe=["id"],Re=["stop-color"],Oe=["stop-color"],Ie=["stop-color"],Me={key:0},Ue=["x1","x2","y1","y2","stroke","stroke-width"],qe=["x1","x2","y1","y2","stroke","stroke-width"],De={key:1},We=["x1","x2","y1","y2","stroke","stroke-width"],Ge=["x","y","font-size","fill","font-weight"],He={key:2},je=["transform","text-anchor","font-size","fill","font-weight"],Xe=["x1","x2","y1","y2","stroke","stroke-width"],Ye={key:0},Je=["cx","cy","r","fill"],Ke=["cx","cy","r","fill"],Qe={key:1},Ze=["x1","x2","y1","y2","stroke","stroke-width"],et=["x1","x2","y1","y2","stroke","stroke-width"],tt=["x","y","height","width","fill","rx"],lt=["x","y","height","width","fill","rx","stroke","stroke-width"],ot=["x","y","height","width","fill","onMouseover"],at={key:4,class:"vue-data-ui-watermark"},nt=["innerHTML"],ut={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:ue}){const h=f,{vue_ui_candlestick:re}=u.useConfig(),k=e.computed(()=>!!h.dataset&&h.dataset.length),y=e.ref(u.createUid()),se=e.ref(null),S=e.ref(!1),V=e.ref(""),E=e.ref(void 0),L=e.ref(0),m=e.ref(null),P=e.ref(null),R=e.ref(null),O=e.ref(null),I=e.ref(null),x=e.ref(0),M=e.ref(0),U=e.ref(0),t=e.computed({get:()=>q(),set:l=>l});function q(){const l=ne.useNestedProp({userConfig:h.config,defaultConfig:re});return l.theme?{...ne.useNestedProp({userConfig:u.themes.vue_ui_candlestick[l.theme]||h.config,defaultConfig:l})}:l}e.watch(()=>h.config,l=>{t.value=q(),D(),x.value+=1,U.value+=1,M.value+=1},{deep:!0}),e.watch(()=>h.dataset,l=>{d.value.start=0,d.value.end=l.length,x.value+=1},{deep:!0});const i=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),w=e.ref(null);e.onMounted(()=>{D()});function D(){if(u.objectIsEmpty(h.dataset)&&u.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=oe.throttle(()=>{const{width:n,height:o}=oe.useResponsive({chart:m.value,title:t.value.style.title.text?P.value:null,slicer:O.value,legend:R.value,source:I.value});i.value.width=n,i.value.height=o,i.value.xAxisFontSize=u.translateSize({relator:Math.min(n,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),i.value.yAxisFontSize=u.translateSize({relator:Math.min(n,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});w.value=new ResizeObserver(l),w.value.observe(m.value.parentNode)}}e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});const{isPrinting:W,isImaging:G,generatePdf:H,generateImage:j}=ae.usePrinter({elementId:`vue-ui-candlestick_${y.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),r=e.computed(()=>{const{top:l,right:n,bottom:o,left:a}=t.value.style.layout.padding;return{top:l,right:i.value.width-n,left:a,bottom:i.value.height-o,width:i.value.width-a-n,height:i.value.height-l-o}}),z=e.computed(()=>h.dataset.length),d=e.ref({start:0,end:z.value}),X=e.computed(()=>h.dataset.slice(d.value.start,d.value.end)),A=e.computed(()=>(h.dataset.forEach((l,n)=>{[null,void 0].includes(l[0])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:n}),[null,void 0].includes(l[1])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:n}),[null,void 0].includes(l[2])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:n}),[null,void 0].includes(l[3])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:n}),[null,void 0].includes(l[4])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:n}),[null,void 0].includes(l[5])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:n})}),X.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),s=e.computed(()=>r.value.width/X.value.length),Y=e.computed(()=>({max:Math.max(...A.value.map(l=>l.high)),min:0})),g=e.computed(()=>u.calculateNiceScale(Y.value.min,Y.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function C(l,n){return{...l,x:u.checkNaN(r.value.left+n*s.value+s.value/2),y:u.checkNaN(r.value.top+(1-l/g.value.max)*r.value.height),value:u.checkNaN(l)}}const c=e.computed(()=>A.value.map((l,n)=>{const o=C(l.open,n),a=C(l.high,n),v=C(l.low,n),_=C(l.last,n),B=l.last>l.open;return{period:l.period,open:o,high:a,low:v,last:_,volume:l.volume,isBullish:B}}));function ie(l){return u.checkNaN(l/g.value.max)}const de=e.computed(()=>g.value.ticks.map(l=>({y:r.value.bottom-r.value.height*ie(l),value:u.checkNaN(l)}))),ce=e.computed(()=>A.value.map(l=>l.period)),T=e.ref(null);function ve(l,n){E.value=l,T.value={datapoint:n,seriesIndex:l,series:c.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:n,series:c.value,config:t.value})))V.value=o({seriesIndex:l,datapoint:n,series:c.value,config:t.value});else if(t.value.style.tooltip.show){let a="";const{period:v,open:_,high:B,low:Z,last:ee,volume:te,isBullish:le}=c.value[l],{period:st,open:pe,high:fe,low:ge,last:me,volume:ke}=t.value.translations;a+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
|
|
2
|
-
fill="${t.value.style.layout.candle.gradient.show?le?`url(#bullish_gradient_${y.value})`:`url(#bearish_gradient_${y.value})`:le?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${v}</div>`,a+=`${ke} : <b>${isNaN(te)?"-":Number(te.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+=`<div>${pe}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${fe}: <b>${t.value.style.tooltip.prefix} ${isNaN(B.value)?"-":Number(B.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${ge}: <b>${t.value.style.tooltip.prefix} ${isNaN(Z.value)?"-":Number(Z.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+=`<div>${me}: <b>${t.value.style.tooltip.prefix} ${isNaN(ee.value)?"-":Number(ee.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,a+="</div>",V.value=`<div style="text-align:right">${a}</div>`}S.value=!0}function ye(){d.value={start:0,end:z.value},x.value+=1}function J(){e.nextTick(()=>{const l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],n=c.value.map(v=>[v.period,v.open.value,v.high.value,v.low.value,v.last.value,v.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(n),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-candlestick"})})}const N=e.computed(()=>{const l=c.value.map(a=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?a.isBullish?`url(#bullish_gradient_${y.value}`:`url(#bearish_gradient_${y.value})`:a.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${a.period}`,`${t.value.table.td.prefix} ${isNaN(a.open.value)?"-":Number(a.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.high.value)?"-":Number(a.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.low.value)?"-":Number(a.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(a.last.value)?"-":Number(a.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(a.volume)?"-":a.volume.toLocaleString()}`]),n={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},o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:o,body:l,config:n,colNames:o}}),b=e.ref(!1);function he(l){b.value=l,L.value+=1}function K(){p.value.showTable=!p.value.showTable}function Q(){p.value.showTooltip=!p.value.showTooltip}const $=e.ref(!1);function F(){$.value=!$.value}return ue({generatePdf:H,generateCsv:J,generateImage:j,toggleTable:K,toggleTooltip:Q,toggleAnnotator:F}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:m,class:e.normalizeClass(`vue-ui-candlestick ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${y.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:$.value,onClose:F},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:P,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${U.value}`,config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(ae.UserOptions,{ref_key:"details",ref:se,key:`user_options_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(G),isPrinting:e.unref(W),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:he,onGeneratePdf:e.unref(H),onGenerateCsv:J,onGenerateImage:e.unref(j),onToggleTable:K,onToggleTooltip:Q,onToggleAnnotator:F},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:a})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(_e._sfc_main),c.value.length>0?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,Te),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,Fe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,Le)],8,Ae),e.createElementVNode("linearGradient",{id:`bullish_gradient_${y.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,Re),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ie)],8,Pe)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Me,[e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ue),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,qe)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(de.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=g.value.min&&o.value<=g.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:r.value.left,x2:r.value.left-5,y1:o.y,y2:o.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,We)):e.createCommentVNode("",!0),o.value>=g.value.min&&o.value<=g.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:o.y+i.value.yAxisFontSize/3,"font-size":i.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(u.canShowValue)(o.value)?o.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,Ge)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${r.value.left+s.value*a+s.value/2}, ${r.value.bottom+i.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":i.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(o),9,je)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:o.open.x,x2:o.open.x,y1:o.high.y,y2:o.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,Xe),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Ye,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?s.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,Je),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?s.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,Ke)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?s.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.high.x+(t.value.style.layout.wick.extremity.size==="auto"?s.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.high.y,y2:o.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,Ze),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?s.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.low.x+(t.value.style.layout.wick.extremity.size==="auto"?s.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.low.y,y2:o.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,et)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-s.value/2+s.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:s.value*t.value.style.layout.candle.widthRatio<=0?1e-4:s.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,tt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-s.value/2+s.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:s.value*t.value.style.layout.candle.widthRatio<=0?1e-4:s.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${y.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${y.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,lt))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,a)=>(e.openBlock(),e.createElementBlock("rect",{x:r.value.left+a*s.value,y:r.value.top,height:r.value.height<=0?1e-4:r.value.height,width:s.value<=0?1e-4:s.value,fill:E.value===a?e.unref(u.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:v=>ve(a,o),onMouseleave:n[0]||(n[0]=v=>{E.value=void 0,S.value=!1})},null,40,ot))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,Ee)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(W)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ce.default,{key:5,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&k.value?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"chartSlicer",ref:O},[(e.openBlock(),e.createBlock(Ne.Slicer,{key:`slicer_${x.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[d.value.start]?f.dataset[d.value.start][0]:f.dataset[0][0],labelRight:f.dataset[d.value.end-1]?f.dataset[d.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:z.value,min:0,valueStart:d.value.start,valueEnd:d.value.end,start:d.value.start,"onUpdate:start":n[1]||(n[1]=o=>d.value.start=o),end:d.value.end,"onUpdate:end":n[2]||(n[2]=o=>d.value.end=o),onReset:ye},{"reset-action":e.withCtx(({reset:o})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:o})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:R},[e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:I,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(xe._sfc_main,{show:p.value.showTooltip&&S.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:m.value,content:V.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock($e.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(we.DataTable,{key:`table_${M.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[3]||(n[3]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o},null,8,nt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ve))}},rt=Se._export_sfc(ut,[["__scopeId","data-v-0ff8d244"]]);exports.default=rt;
|