vue-data-ui 2.4.64 → 2.4.65
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 +66 -34
- package/dist/{Arrow-DSkIkWAr.cjs → Arrow-BKPURRQ6.cjs} +1 -1
- package/dist/{Arrow-CRM8J83L.js → Arrow-C7ihyW4O.js} +1 -1
- package/dist/{BaseIcon-D13bKBUN.cjs → BaseIcon-CyTdOpDr.cjs} +1 -1
- package/dist/{BaseIcon-Axko0XAg.js → BaseIcon-DpaRUsHC.js} +1 -1
- package/dist/{DataTable-DnrSae6c.cjs → DataTable-CwzQ-L0W.cjs} +1 -1
- package/dist/{DataTable-B2hVpPSW.js → DataTable-DX_jYNWG.js} +2 -2
- package/dist/Legend-BMTBtkoQ.cjs +1 -0
- package/dist/Legend-DGUxLqhs.js +70 -0
- package/dist/{PackageVersion-B684aQUP.js → PackageVersion-B9_Ed72C.js} +1 -1
- package/dist/{PackageVersion-FzHnQSp-.cjs → PackageVersion-D_9QTWVm.cjs} +1 -1
- package/dist/{PenAndPaper-C6I0ckZw.cjs → PenAndPaper-CfGYucSm.cjs} +1 -1
- package/dist/{PenAndPaper-mC0kh-S8.js → PenAndPaper-CzjoEhsO.js} +3 -3
- package/dist/{Shape-eJUVLesM.cjs → Shape-CZB2KQ0L.cjs} +1 -1
- package/dist/{Shape-DbnYh6z4.js → Shape-aXd72O71.js} +1 -1
- package/dist/{Slicer-C9bF7-B-.cjs → Slicer-ChxjRhai.cjs} +1 -1
- package/dist/{Slicer-BBolqweG.js → Slicer-CopZgIzh.js} +2 -2
- package/dist/{Title-DuMgnso9.cjs → Title-BnRtxxP4.cjs} +1 -1
- package/dist/{Title-DqZErnpZ.js → Title-DyUTj8GI.js} +1 -1
- package/dist/{Tooltip-DddRc8qD.js → Tooltip-B-0uEV3l.js} +1 -1
- package/dist/{Tooltip-Cz3eQmMV.cjs → Tooltip-CUoQNXZK.cjs} +1 -1
- package/dist/documentation/installation.md +34 -34
- package/dist/{index-DjTPIx3R.js → index-BVNcFEqn.js} +398 -393
- package/dist/{index-D-xYtUSL.cjs → index-CKgv8c-A.cjs} +5 -5
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BN-VfUfj.cjs → useNestedProp-0Mn5Z6Ae.cjs} +1 -1
- package/dist/{useNestedProp-BNmCbG1v.js → useNestedProp-D79dWdel.js} +1 -1
- package/dist/{usePrinter-BFF1xn1s.js → usePrinter-Bcfs_I6G.js} +1 -1
- package/dist/{usePrinter-pT-a_sFr.cjs → usePrinter-Gkda9yEJ.cjs} +1 -1
- package/dist/{vue-data-ui-CPMtS74M.js → vue-data-ui-CXxR_hXg.js} +60 -60
- package/dist/{vue-data-ui-rWaUsffe.cjs → vue-data-ui-DAwVdbN1.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +9 -9
- package/dist/{vue-ui-3d-bar-CxcO1rW_.cjs → vue-ui-3d-bar-baVCskbW.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-Cpx0rTUr.js → vue-ui-3d-bar-mxTzin_H.js} +9 -9
- package/dist/{vue-ui-accordion-CDTXGeL0.js → vue-ui-accordion-GNblUy42.js} +3 -3
- package/dist/{vue-ui-accordion-B1MkyNta.cjs → vue-ui-accordion-xV0it5je.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CSwlc2bd.js → vue-ui-age-pyramid-DFBuvQgd.js} +10 -10
- package/dist/{vue-ui-age-pyramid-CEvYSZnY.cjs → vue-ui-age-pyramid-ULh6qSJs.cjs} +1 -1
- package/dist/{vue-ui-annotator-BUoz1Y87.cjs → vue-ui-annotator-C89rtAuX.cjs} +1 -1
- package/dist/{vue-ui-annotator-D5dS0BTP.js → vue-ui-annotator-XbCqxBQ0.js} +1 -1
- package/dist/{vue-ui-bullet-RDyK79l0.js → vue-ui-bullet-D_CS85II.js} +8 -8
- package/dist/{vue-ui-bullet-Bcx-V2GQ.cjs → vue-ui-bullet-DxRqDaiw.cjs} +1 -1
- package/dist/{vue-ui-candlestick-s-Z42Lns.js → vue-ui-candlestick-C8mUQTPF.js} +11 -11
- package/dist/{vue-ui-candlestick-CkjNRVDz.cjs → vue-ui-candlestick-CZxpFMKR.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DJNIAgAU.js → vue-ui-carousel-table-D5iLQe38.js} +4 -4
- package/dist/{vue-ui-carousel-table-CoLBbF34.cjs → vue-ui-carousel-table-DKcc-jNW.cjs} +1 -1
- package/dist/{vue-ui-chestnut-P1hAffNt.cjs → vue-ui-chestnut-BFV6pTfc.cjs} +1 -1
- package/dist/{vue-ui-chestnut-_90914ye.js → vue-ui-chestnut-BqGCLMiu.js} +8 -8
- package/dist/{vue-ui-cursor-BoGnTfem.cjs → vue-ui-cursor-BJjzKpLm.cjs} +1 -1
- package/dist/{vue-ui-cursor-Doo6HM0B.js → vue-ui-cursor-BysQ-bDH.js} +2 -2
- package/dist/{vue-ui-dashboard-mC_BLuIN.cjs → vue-ui-dashboard-C0L_0gyc.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BZKKb8cZ.js → vue-ui-dashboard-zrJGrAmc.js} +2 -2
- package/dist/{vue-ui-digits-Z8AprQhX.js → vue-ui-digits-B5P9UheE.js} +2 -2
- package/dist/{vue-ui-digits-DFwg7Et3.cjs → vue-ui-digits-BG_xts2G.cjs} +1 -1
- package/dist/vue-ui-donut-7tNjrx1E.js +1173 -0
- package/dist/vue-ui-donut-B9M9CW9D.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-CK_0JI6T.js → vue-ui-donut-evolution-C7FpJ59u.js} +11 -11
- package/dist/{vue-ui-donut-evolution-D-6gM9JV.cjs → vue-ui-donut-evolution-CEvGFdxK.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-C4y9e7Gz.js → vue-ui-dumbbell-CdxHbLz6.js} +10 -10
- package/dist/{vue-ui-dumbbell-DS_3Z5cT.cjs → vue-ui-dumbbell-DP27C8NG.cjs} +1 -1
- package/dist/{vue-ui-flow-XrJvcKqr.js → vue-ui-flow-cKQSDKfP.js} +9 -9
- package/dist/{vue-ui-flow-C2sVVaok.cjs → vue-ui-flow-yW5Pa_MJ.cjs} +1 -1
- package/dist/{vue-ui-funnel-DxhsOEbU.cjs → vue-ui-funnel-73aPtRj5.cjs} +1 -1
- package/dist/{vue-ui-funnel-CHhVPjnM.js → vue-ui-funnel-qPYVhQpD.js} +9 -9
- package/dist/{vue-ui-galaxy-Bd8p21nC.js → vue-ui-galaxy-2SRA_RYP.js} +11 -11
- package/dist/{vue-ui-galaxy-CRsan4r5.cjs → vue-ui-galaxy-9E5GUtBD.cjs} +1 -1
- package/dist/vue-ui-gauge-CBbvp9DU.cjs +1 -0
- package/dist/{vue-ui-gauge-B-nOtSwD.js → vue-ui-gauge-Cpvg4BBS.js} +236 -224
- package/dist/{vue-ui-gizmo-tQNlhr2p.js → vue-ui-gizmo-B5v0g_Ly.js} +3 -3
- package/dist/{vue-ui-gizmo-C3GRBcSW.cjs → vue-ui-gizmo-BkNuHnnf.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DwalrFVm.cjs → vue-ui-heatmap-CcUuOqGT.cjs} +1 -1
- package/dist/{vue-ui-heatmap-6MpvCBmt.js → vue-ui-heatmap-dNeKqLC0.js} +10 -10
- package/dist/{vue-ui-history-plot-Hk-UrZtS.js → vue-ui-history-plot-COtfhHw8.js} +11 -11
- package/dist/{vue-ui-history-plot-FgapeA0e.cjs → vue-ui-history-plot-p18wqHFY.cjs} +1 -1
- package/dist/{vue-ui-kpi-CKZQsJnV.cjs → vue-ui-kpi-DCn50wZ8.cjs} +1 -1
- package/dist/{vue-ui-kpi-DrCH9EuP.js → vue-ui-kpi-HyZOfh63.js} +3 -3
- package/dist/{vue-ui-mini-loader-BSKXq7CA.cjs → vue-ui-mini-loader-DaPxFP7e.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BLvcc-fM.js → vue-ui-mini-loader-Dp7zc34Q.js} +2 -2
- package/dist/{vue-ui-molecule-Ch4_SJxL.js → vue-ui-molecule-Oim4-hUn.js} +11 -11
- package/dist/{vue-ui-molecule-D0IHSilQ.cjs → vue-ui-molecule-zkdP7FYM.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DNPseOpJ.cjs → vue-ui-mood-radar-CKdM8iDY.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Gv0k1T46.js → vue-ui-mood-radar-DsSO6gfa.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DY8Hig_-.js → vue-ui-nested-donuts-B5NPJfg6.js} +11 -11
- package/dist/{vue-ui-nested-donuts-QOvJJc30.cjs → vue-ui-nested-donuts-DbTXLan2.cjs} +1 -1
- package/dist/{vue-ui-onion-Ca0Tcbu3.cjs → vue-ui-onion-0Od2Vodu.cjs} +1 -1
- package/dist/{vue-ui-onion-Ct_1j1fA.js → vue-ui-onion-CID0DNSa.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-DkYcNRQk.js → vue-ui-parallel-coordinate-plot-DAfBgYbI.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-C_opo0qJ.cjs → vue-ui-parallel-coordinate-plot-WtcXCTd-.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DwAKm2Yj.js → vue-ui-quadrant-063Cq0di.js} +12 -12
- package/dist/{vue-ui-quadrant-BJuoZ_lv.cjs → vue-ui-quadrant-B6WNmecC.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-5ga8waQS.cjs → vue-ui-quick-chart-CwNFF0R4.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-D5V73GXO.js → vue-ui-quick-chart-DCPwhpbx.js} +9 -9
- package/dist/{vue-ui-radar-CmE4wCWD.js → vue-ui-radar-BmY47r3J.js} +12 -12
- package/dist/{vue-ui-radar-C3kzmi1G.cjs → vue-ui-radar-DcnVyGrM.cjs} +1 -1
- package/dist/{vue-ui-rating-CE7LGiFS.cjs → vue-ui-rating-D_9Fqvd_.cjs} +1 -1
- package/dist/{vue-ui-rating-SAph_BKh.js → vue-ui-rating-b2SThMJw.js} +2 -2
- package/dist/{vue-ui-relation-circle-D1JdWshk.js → vue-ui-relation-circle-B0Q2FdDW.js} +7 -7
- package/dist/{vue-ui-relation-circle-dQQw_mgd.cjs → vue-ui-relation-circle-Cg3QL_aP.cjs} +1 -1
- package/dist/vue-ui-rings-BQdgj7bV.cjs +2 -0
- package/dist/vue-ui-rings-DlsKpDkQ.js +666 -0
- package/dist/{vue-ui-scatter-BrOg2xiN.cjs → vue-ui-scatter-D6Yb6VpP.cjs} +1 -1
- package/dist/{vue-ui-scatter-DE4X0DQI.js → vue-ui-scatter-E_WveJ4p.js} +36 -36
- package/dist/{vue-ui-screenshot-CyWEEkg_.js → vue-ui-screenshot-CbLsOjZv.js} +1 -1
- package/dist/{vue-ui-screenshot-BXq82cfA.cjs → vue-ui-screenshot-DhvqiF7S.cjs} +1 -1
- package/dist/{vue-ui-skeleton-D3zg7qd2.cjs → vue-ui-skeleton-73YO0ovP.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Dt9cA-wa.js → vue-ui-skeleton-Bgf16k10.js} +3 -3
- package/dist/{vue-ui-smiley-FUNmIUpN.cjs → vue-ui-smiley-D-QDQ3Re.cjs} +1 -1
- package/dist/{vue-ui-smiley-uRlPgN-A.js → vue-ui-smiley-ne5pBMum.js} +2 -2
- package/dist/{vue-ui-spark-trend-5KFnHsjs.js → vue-ui-spark-trend-BkiRBoVD.js} +13 -13
- package/dist/{vue-ui-spark-trend-DYXJMJLz.cjs → vue-ui-spark-trend-Dq1hox65.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-D-Yk9z4E.js → vue-ui-sparkbar--Q2alJoW.js} +4 -4
- package/dist/{vue-ui-sparkbar-BUg0DhGI.cjs → vue-ui-sparkbar-DV5CtFQY.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-DVLZofTg.js → vue-ui-sparkgauge-BOcEbdij.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DvDPPyau.cjs → vue-ui-sparkgauge-BVNkRW_m.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Dqgl_5RN.js → vue-ui-sparkhistogram-CIJmWjb4.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-GMZxK2oC.cjs → vue-ui-sparkhistogram-CUiNT8vT.cjs} +1 -1
- package/dist/{vue-ui-sparkline-C96IUWwW.cjs → vue-ui-sparkline-BFlRfhM6.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CPEHgvq0.js → vue-ui-sparkline-lY0wS6kU.js} +92 -92
- package/dist/{vue-ui-sparkstackbar-BroOR6B-.cjs → vue-ui-sparkstackbar-CGeg_k0k.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DCceVnjJ.js → vue-ui-sparkstackbar-GHM4EY7-.js} +5 -5
- package/dist/vue-ui-stackbar-CQur8zP0.cjs +6 -0
- package/dist/vue-ui-stackbar-uR3T6rG4.js +1114 -0
- package/dist/{vue-ui-strip-plot-BYO72loZ.cjs → vue-ui-strip-plot-CBYrZEIt.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CJxPAY9n.js → vue-ui-strip-plot-CNFrYVZ6.js} +11 -11
- package/dist/{vue-ui-table-BTuCiJb7.cjs → vue-ui-table-BbTwHDCo.cjs} +1 -1
- package/dist/{vue-ui-table-DKoRX7gX.js → vue-ui-table-DZV-uDG2.js} +1 -1
- package/dist/{vue-ui-table-heatmap-4RZ4Bo12.js → vue-ui-table-heatmap-DQBm_9Z3.js} +14 -14
- package/dist/{vue-ui-table-heatmap-L3Pg7wC0.cjs → vue-ui-table-heatmap-DSgQpgxG.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-GaHw2cTh.cjs → vue-ui-table-sparkline-AFK2LNsw.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CVWPCRfz.js → vue-ui-table-sparkline-wWAVQ0es.js} +5 -5
- package/dist/{vue-ui-thermometer-VC967j2q.cjs → vue-ui-thermometer-CGFQfRUy.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BFqURwxY.js → vue-ui-thermometer-DRZWIAFj.js} +7 -7
- package/dist/{vue-ui-timer-Bou1Zg22.cjs → vue-ui-timer-C-RRrh5f.cjs} +1 -1
- package/dist/{vue-ui-timer-mPQTAvi1.js → vue-ui-timer-D2_1bbpl.js} +5 -5
- package/dist/{vue-ui-tiremarks-ClzgPlHg.cjs → vue-ui-tiremarks-CIeid_A2.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DyEXFKpK.js → vue-ui-tiremarks-CdX2b-Fq.js} +7 -7
- package/dist/{vue-ui-treemap-pCrT4KlF.js → vue-ui-treemap-CgzgE20q.js} +11 -11
- package/dist/{vue-ui-treemap-DEUSAGw0.cjs → vue-ui-treemap-r8xOrE8F.cjs} +1 -1
- package/dist/vue-ui-vertical-bar-BcxAjcoh.cjs +4 -0
- package/dist/vue-ui-vertical-bar-v9LvL35a.js +936 -0
- package/dist/{vue-ui-waffle-DkHP1plA.js → vue-ui-waffle-0mHE8fud.js} +11 -11
- package/dist/{vue-ui-waffle-DjcwBxNh.cjs → vue-ui-waffle-5h_9tS3C.cjs} +1 -1
- package/dist/{vue-ui-wheel-L8vxpKcv.js → vue-ui-wheel-BWL-td7-.js} +7 -7
- package/dist/{vue-ui-wheel-Y2Sny-6a.cjs → vue-ui-wheel-rL5Shua2.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-B9UJmesc.cjs → vue-ui-word-cloud-2E23n-B8.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DIBB7HIj.js → vue-ui-word-cloud-OkAF9hSC.js} +10 -10
- package/dist/{vue-ui-xy-QmsiPNcv.js → vue-ui-xy-C8E2WzGt.js} +866 -819
- package/dist/vue-ui-xy-DbJNxL5O.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-CeKH8VIR.js → vue-ui-xy-canvas-C_0c8FlA.js} +31 -31
- package/dist/{vue-ui-xy-canvas-2aqG9yv5.cjs → vue-ui-xy-canvas-I7rw1uDf.cjs} +1 -1
- package/package.json +1 -1
- package/dist/Legend-CzY3Yhr8.js +0 -68
- package/dist/Legend-DIfEhYtz.cjs +0 -1
- package/dist/vue-ui-donut-C6i_KVvc.js +0 -1122
- package/dist/vue-ui-donut-uH8SS5Ms.cjs +0 -1
- package/dist/vue-ui-gauge-D0Mk9_aI.cjs +0 -1
- package/dist/vue-ui-rings-C-7vrgjN.js +0 -628
- package/dist/vue-ui-rings-kFhuaBvY.cjs +0 -2
- package/dist/vue-ui-stackbar-Bv7RiRae.cjs +0 -6
- package/dist/vue-ui-stackbar-KznnSCkj.js +0 -1061
- package/dist/vue-ui-vertical-bar-DxkQK0tN.cjs +0 -4
- package/dist/vue-ui-vertical-bar-QF9epdei.js +0 -888
- package/dist/vue-ui-xy-DwidR-Vl.cjs +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as h, useSlots as T, onMounted as R, computed as x, watch as H, openBlock as a, createElementBlock as o, normalizeStyle as i, createElementVNode as r, toDisplayString as g, createCommentVNode as y, unref as s, Fragment as P, renderList as W, withKeys as q } from "vue";
|
|
2
|
-
import { u as J, c as Q, o as Z, e as tt, i as $, f as b, X as k, w as F, V as X } from "./index-
|
|
3
|
-
import { u as et } from "./useNestedProp-
|
|
2
|
+
import { u as J, c as Q, o as Z, e as tt, i as $, f as b, X as k, w as F, V as X } from "./index-BVNcFEqn.js";
|
|
3
|
+
import { u as et } from "./useNestedProp-D79dWdel.js";
|
|
4
4
|
import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const at = {
|
|
6
6
|
key: 0,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as Ge, computed as f, ref as o, watch as Ve, onMounted as We, onBeforeUnmount as De, openBlock as i, createElementBlock as a, normalizeStyle as C, unref as u, createBlock as F, createCommentVNode as v, createSlots as Xe, withCtx as B, renderSlot as h, normalizeProps as A, guardReactiveProps as W, normalizeClass as D, createVNode as Ye, createElementVNode as qe, Fragment as P, renderList as L, mergeProps as ge, toDisplayString as E } from "vue";
|
|
2
|
-
import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as ke, g as tt, X as lt, G as pe, i as X, f as Y, F as q } from "./index-
|
|
2
|
+
import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as ke, g as tt, X as lt, G as pe, i as X, f as Y, F as q } from "./index-BVNcFEqn.js";
|
|
3
3
|
import { t as st, u as it } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as at } from "./Title-
|
|
5
|
-
import { u as nt, U as rt } from "./usePrinter-
|
|
6
|
-
import ut from "./vue-ui-skeleton-
|
|
7
|
-
import { u as we } from "./useNestedProp-
|
|
8
|
-
import { _ as ot } from "./PackageVersion-
|
|
9
|
-
import { P as ct } from "./PenAndPaper-
|
|
4
|
+
import { _ as at } from "./Title-DyUTj8GI.js";
|
|
5
|
+
import { u as nt, U as rt } from "./usePrinter-Bcfs_I6G.js";
|
|
6
|
+
import ut from "./vue-ui-skeleton-Bgf16k10.js";
|
|
7
|
+
import { u as we } from "./useNestedProp-D79dWdel.js";
|
|
8
|
+
import { _ as ot } from "./PackageVersion-B9_Ed72C.js";
|
|
9
|
+
import { P as ct } from "./PenAndPaper-CzjoEhsO.js";
|
|
10
10
|
import { u as dt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const yt = ["id"], ft = ["xmlns", "viewBox"], ht = ["width", "height"], gt = ["cx", "cy", "r", "stroke", "stroke-width"], mt = { key: 1 }, kt = ["stroke", "d", "stroke-width"], pt = { style: { "pointer-events": "none" } }, wt = ["cx", "cy", "fill", "r", "stroke"], xt = ["x", "y", "fill", "font-size"], bt = { key: 2 }, $t = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], _t = { style: { "pointer-events": "none" } }, Ct = ["cx", "cy", "fill", "r", "stroke"], Pt = ["x", "y", "fill", "font-size"], Lt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], Ot = ["cx", "cy", "fill", "stroke", "onClick", "r"], zt = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D-xYtUSL.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-DuMgnso9.cjs"),ee=require("./usePrinter-pT-a_sFr.cjs"),Be=require("./vue-ui-skeleton-D3zg7qd2.cjs"),te=require("./useNestedProp-BN-VfUfj.cjs"),$e=require("./PackageVersion-FzHnQSp-.cjs"),Pe=require("./PenAndPaper-C6I0ckZw.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Oe=["xmlns","viewBox"],Se=["width","height"],Ee=["cx","cy","r","stroke","stroke-width"],Ae={key:1},Ne=["stroke","d","stroke-width"],Ie={style:{"pointer-events":"none"}},Ve=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Fe={key:2},Te=["stroke","stroke-width","x1","x2","y1","y2"],Re={style:{"pointer-events":"none"}},je=["cx","cy","fill","r","stroke"],qe=["x","y","fill","font-size"],De=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Ue=["cx","cy","fill","stroke","onClick","r"],Ge={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(le,{expose:re}){const y=le;e.useCssVars(t=>({"4beec998":ue.value,15467313:ie.value,e556a096:ce.value}));const{vue_ui_relation_circle:ne}=o.useConfig(),$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(o.createUid()),E=e.ref(0),x=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:M,keepUserOptionState:F}=_e.useUserOptionState({config:r.value});function T(){const t=te.useNestedProp({userConfig:y.config,defaultConfig:ne});return t.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),P.value=!r.value.showOnChartHover,Y(),V.value+=1},{deep:!0});const{isPrinting:R,isImaging:j,generatePdf:q,generateImage:D}=ee.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),oe=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),U=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),se=e.ref(0),_=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),G=e.ref(r.value.style.plot.radius),W=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ae=e.computed(()=>r.value.style.links.curved),ie=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ue=e.computed(()=>m.value*2),ce=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{Y(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",X)});function Y(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=Z.throttle(()=>{const{width:n,height:l}=Z.useResponsive({chart:x.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],H(),J(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),G.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),W.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(x.value.parentNode)}else h.value=[],d.value=[],H(),J()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",X),b.value&&b.value.disconnect()});function X(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function H(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((xe,be)=>xe+be,0),S=m.value*Math.cos(l)+a.value.width/2,we=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:we,...c,color:c.color?c.color:U.value[u]?U.value[u]:o.palette[u],regAngle:s,totalWeight:O}),l+=t,s+=n})}function de(t,n){const l=(t.x+n.x)/2,s=(t.y+n.y)/2;return{x:l,y:s}}function J(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:de({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ve({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ve(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},s={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*s.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*s.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const fe=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ye(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function K(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function ge(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function he(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function me(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ke(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Q(t){se.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/fe.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function pe(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return re({generatePdf:q,generateImage:D,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:x,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(M)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(M)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:x.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(F)||e.unref(P))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:x.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode($e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ee),ae.value?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(K(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Ve)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(K(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Te))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Re,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,je)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,qe)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":ge(l),transform:ke(l),x:he(l),y:l.y+5,onClick:c=>Q(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${me(l)}`),"font-size":W.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,De))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(ye(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Q(l),r:G.value},null,12,Ue))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ze))}},Ye=Le._export_sfc(We,[["__scopeId","data-v-d95c92fd"]]);exports.default=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CKgv8c-A.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-BnRtxxP4.cjs"),ee=require("./usePrinter-Gkda9yEJ.cjs"),Be=require("./vue-ui-skeleton-73YO0ovP.cjs"),te=require("./useNestedProp-0Mn5Z6Ae.cjs"),$e=require("./PackageVersion-D_9QTWVm.cjs"),Pe=require("./PenAndPaper-CfGYucSm.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["id"],Oe=["xmlns","viewBox"],Se=["width","height"],Ee=["cx","cy","r","stroke","stroke-width"],Ae={key:1},Ne=["stroke","d","stroke-width"],Ie={style:{"pointer-events":"none"}},Ve=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Fe={key:2},Te=["stroke","stroke-width","x1","x2","y1","y2"],Re={style:{"pointer-events":"none"}},je=["cx","cy","fill","r","stroke"],qe=["x","y","fill","font-size"],De=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Ue=["cx","cy","fill","stroke","onClick","r"],Ge={key:5,class:"vue-data-ui-watermark"},We={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(le,{expose:re}){const y=le;e.useCssVars(t=>({"4beec998":ue.value,15467313:ie.value,e556a096:ce.value}));const{vue_ui_relation_circle:ne}=o.useConfig(),$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(o.createUid()),E=e.ref(0),x=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:P,setUserOptionsVisibility:M,keepUserOptionState:F}=_e.useUserOptionState({config:r.value});function T(){const t=te.useNestedProp({userConfig:y.config,defaultConfig:ne});return t.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),P.value=!r.value.showOnChartHover,Y(),V.value+=1},{deep:!0});const{isPrinting:R,isImaging:j,generatePdf:q,generateImage:D}=ee.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),oe=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),U=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),se=e.ref(0),_=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),G=e.ref(r.value.style.plot.radius),W=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ae=e.computed(()=>r.value.style.links.curved),ie=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ue=e.computed(()=>m.value*2),ce=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{Y(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",X)});function Y(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=Z.throttle(()=>{const{width:n,height:l}=Z.useResponsive({chart:x.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],H(),J(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),G.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),W.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(x.value.parentNode)}else h.value=[],d.value=[],H(),J()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",X),b.value&&b.value.disconnect()});function X(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function H(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,s=0;_.value.forEach((c,u)=>{const O=c.weights.reduce((xe,be)=>xe+be,0),S=m.value*Math.cos(l)+a.value.width/2,we=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:we,...c,color:c.color?c.color:U.value[u]?U.value[u]:o.palette[u],regAngle:s,totalWeight:O}),l+=t,s+=n})}function de(t,n){const l=(t.x+n.x)/2,s=(t.y+n.y)/2;return{x:l,y:s}}function J(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,s)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:de({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ve({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ve(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},s={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*s.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*s.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const fe=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ye(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function K(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function ge(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function he(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function me(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ke(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Q(t){se.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/fe.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function pe(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return re({generatePdf:q,generateImage:D,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:x,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(M)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(M)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:x.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),oe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(F)||e.unref(P))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:x.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(D),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:s})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:s})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode($e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Se)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ee),ae.value?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${s}`,style:e.normalizeStyle(K(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Ve)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${s}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(K(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Te))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",Re,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,je)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,qe)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${s}`,"text-anchor":ge(l),transform:ke(l),x:he(l),y:l.y+5,onClick:c=>Q(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${me(l)}`),"font-size":W.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,De))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,s)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${s}`,style:e.normalizeStyle(ye(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Q(l),r:G.value},null,12,Ue))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Oe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ge,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(R)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ze))}},Ye=Le._export_sfc(We,[["__scopeId","data-v-d95c92fd"]]);exports.default=Ye;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CKgv8c-A.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),be=require("./Title-BnRtxxP4.cjs"),oe=require("./usePrinter-Gkda9yEJ.cjs"),ke=require("./Tooltip-CUoQNXZK.cjs"),Ce=require("./DataTable-CwzQ-L0W.cjs"),we=require("./Legend-BMTBtkoQ.cjs"),$e=require("./vue-ui-skeleton-73YO0ovP.cjs"),xe=require("./vue-ui-accordion-xV0it5je.cjs"),ae=require("./useNestedProp-0Mn5Z6Ae.cjs"),Ne=require("./PackageVersion-D_9QTWVm.cjs"),Te=require("./PenAndPaper-CfGYucSm.cjs"),Se=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./Shape-CZB2KQ0L.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Pe=["id"],Ve=["xmlns","viewBox"],Le=["width","height"],Ee=["id"],Oe=["stop-color"],Ie=["stop-color"],ze={key:1},Ae=["stroke","cx","cy","r","fill"],Fe=["stroke","stroke-width","cx","cy","r","fill"],Re=["stroke","stroke-width","cx","cy","r","fill"],qe=["cx","cy","r","onMouseenter"],Me={key:5,class:"vue-data-ui-watermark"},Ue=["onClick"],De={key:0},We={key:1},He=["innerHTML"],Ge={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:se}){const p=re,{vue_ui_rings:ue}=n.useConfig(),ie=e.useSlots(),b=e.ref(!1),$=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(n.createUid()),ce=e.ref(null),x=e.ref(!1),_=e.ref(""),g=e.ref(null),O=e.ref(0),k=e.ref(null),I=e.ref(null),z=e.ref(null),A=e.ref(null),F=e.ref(null),R=e.ref(0),q=e.ref(0),M=e.ref(0),t=e.computed({get:()=>W(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:D}=Se.useUserOptionState({config:t.value});function W(){const l=ae.useNestedProp({userConfig:p.config,defaultConfig:ue});return l.theme?{...ae.useNestedProp({userConfig:n.themes.vue_ui_rings[l.theme]||p.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}e.watch(()=>p.config,l=>{t.value=W(),P.value=!t.value.showOnChartHover,H(),R.value+=1,q.value+=1,M.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{H()});function H(){if(n.objectIsEmpty(p.dataset)?n.error({componentName:"VueUiRings",type:"dataset"}):p.dataset.forEach((l,a)=>{l.values.length||n.error({componentName:"VueUiRings",type:"dataset"}),n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{n.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:k.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?z.value:null,source:A.value,noTitle:F.value});s.value.width=a,s.value.height=o});N.value=new ResizeObserver(l),N.value.observe(k.value.parentNode)}setTimeout(()=>{b.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:G,isImaging:j,generatePdf:X,generateImage:Y}=oe.usePrinter({elementId:`rings_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),J=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),m=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),ve=e.computed(()=>Math.min(s.value.height,s.value.width)),d=e.ref([]);function V(l){d.value.includes(l)?d.value=d.value.filter(a=>a!==l):d.value.push(l),se("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const pe=e.computed(()=>Math.max(...T.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l)));function K(l){return l/pe.value}const T=e.computed(()=>p.dataset.map(({values:l,name:a,color:o=null},r)=>{const u=n.sanitizeArray(l).reduce((v,w)=>v+w,0);return{name:a,color:o||n.convertColorToHex(o)||J.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:u,proportion:u/p.dataset.map(v=>(v.values||[]).reduce((w,ye)=>w+ye,0)).reduce((v,w)=>v+w,0),uid:n.createUid(),absoluteIndex:r}})),Q=e.computed(()=>T.value.map(l=>({...l,shape:"circle",opacity:d.value.includes(l.uid)?.5:1,segregate:()=>V(l.uid),isSegregated:d.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),he=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>T.value.filter(l=>!d.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>T.value.filter(l=>!d.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:r,absoluteIndex:u},v)=>({absoluteIndex:u,uid:r,name:l,color:o||n.convertColorToHex(o)||J.value[v]||n.palette[v]||n.palette[v%n.palette.length],value:a,proportion:K(a),percentage:a/h.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*K(a)})).toSorted((l,a)=>a.value-l.value));function fe(){return c.value.map(({name:l,color:a,value:o,absoluteValues:r,percentage:u})=>({name:l,color:a,value:o,absoluteValues:r,percentage:u}))}const i=e.computed(()=>ve.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ge(l,a){if(d.value.length===p.dataset.length)return;L.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},g.value=l;const o=c.value[l],r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=r({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}" />${ie.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${f.value}_${a.absoluteIndex})" />`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${n.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
|
|
2
|
+
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${n.dataLabel({v:o.value/h.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${n.dataLabel({v:o.value/h.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}x.value=!0}const y=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=y.value.head.map((u,v)=>[{color:u.color,name:u.name},n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:y.value.body[v],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(y.value.body[v]/h.value)?"-":(y.value.body[v]/h.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:r}});function Z(){e.nextTick(()=>{const l=y.value.head.map((r,u)=>[[r.name],[y.value.body[u]],[isNaN(y.value.body[u]/h.value)?"-":y.value.body[u]/h.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function me(l){C.value=l,O.value+=1}function ee(){m.value.showTable=!m.value.showTable}function te(){m.value.showTooltip=!m.value.showTooltip}const B=e.ref(!1);function E(){B.value=!B.value}return ne({getData:fe,generatePdf:X,generateCsv:Z,generateImage:Y,toggleTable:ee,toggleTooltip:te,toggleAnnotator:E}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${f.value}`,onMouseleave:a[3]||(a[3]=o=>{g.value=null,x.value=!1,e.unref(U)(!1)}),onMouseenter:a[4]||(a[4]=()=>e.unref(U)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Te.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:E},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:I,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(be._sfc_main,{key:`title_${R.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(D)||e.unref(P))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(G),isImaging:e.unref(j),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:m.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:me,onGeneratePdf:e.unref(X),onGenerateCsv:Z,onGenerateImage:e.unref(Y),onToggleTable:ee,onToggleTooltip:te,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(D)?e.unref(P)?"visible":"hidden":"visible"})},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:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ne._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:s.value.width<=0?10:s.value.width,height:s.value.height<=0?10:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Le)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(o.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Ie)],8,Ee))),256))]),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,o=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.normalizeProps(e.guardReactiveProps({seriesIndex:o.absoluteIndex,patternId:`pattern_${f.value}_${o.absoluteIndex}`})),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":g.value!==null&&g.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,Ae),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":g.value!==null&&g.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${f.value}_${r})`:o.color},null,14,Fe),l.$slots.pattern?(e.openBlock(),e.createElementBlock("circle",{key:0,class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":g.value!==null&&g.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:`url(#pattern_${f.value}_${o.absoluteIndex})`},null,14,Re)):e.createCommentVNode("",!0),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+i.value*c.value[0].proportion/2-i.value*o.proportion/2-2*(r+1),r:e.unref(n.checkNaN)(i.value*o.proportion/2*.9<=0?1e-4:i.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>ge(r,o),onMouseleave:a[0]||(a[0]=u=>{g.value=null,x.value=!1})},null,40,qe)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Me,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:`legend_${M.value}`,legendSet:Q.value,config:he.value,onClickMarker:a[1]||(a[1]=({legend:o})=>V(o.uid))},e.createSlots({item:e.withCtx(({legend:o,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>V(o.uid),style:e.normalizeStyle(`opacity:${d.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:r}))+" ",1),d.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",We," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",De," ("+e.toDisplayString(isNaN(o.value/h.value)?"-":e.unref(n.dataLabel)({v:o.value/h.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ue)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:o,index:r})=>[e.createVNode(Be._sfc_main,{shape:o.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Q.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:A,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ke._sfc_main,{show:m.value.showTooltip&&x.value&&d.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:_.value,isFullscreen:C.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),$.value?(e.openBlock(),e.createBlock(xe.default,{key:8,hideDetails:"",config:{open:m.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ce.DataTable,{key:`table_${q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>m.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,He)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Pe))}},je=_e._export_sfc(Ge,[["__scopeId","data-v-966f63d3"]]);exports.default=je;
|