vue-data-ui 2.3.26 → 2.3.28
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 +15 -8
- package/dist/{Arrow-Bkhcj4Ua.js → Arrow-BPoxM_Tq.js} +1 -1
- package/dist/{Arrow-BRk7ox-0.cjs → Arrow-C6lQ94rK.cjs} +1 -1
- package/dist/{BaseIcon-r5Y-jYX5.cjs → BaseIcon-BK5xYOzV.cjs} +1 -1
- package/dist/{BaseIcon-Cr58pV0U.js → BaseIcon-Op8_v5x7.js} +4 -3
- package/dist/{DataTable-BM_PreHp.cjs → DataTable-B4_9ynlY.cjs} +1 -1
- package/dist/{DataTable-DFEpvyNK.js → DataTable-bEXuvNn5.js} +2 -2
- package/dist/{Legend-yNP9uHMI.cjs → Legend-BNfS77GS.cjs} +1 -1
- package/dist/{Legend-C-mWIWYw.js → Legend-DwludSgp.js} +1 -1
- package/dist/{Shape-CN-v5JU3.js → Shape-COYAxpcP.js} +1 -1
- package/dist/{Shape-DBO11ZkD.cjs → Shape-CcWWIf-s.cjs} +1 -1
- package/dist/{Slicer-DK9Yp2l3.js → Slicer-Cv-2s_-r.js} +1 -1
- package/dist/{Slicer-CTw_6ddN.cjs → Slicer-DGkm-5p-.cjs} +1 -1
- package/dist/{Title-BFBOWO3Q.js → Title-CtWGLaoz.js} +1 -1
- package/dist/{Title-R6PrAyfG.cjs → Title-DQz9dO4d.cjs} +1 -1
- package/dist/{Tooltip-DravvC2X.js → Tooltip-D6BUVHr1.js} +1 -1
- package/dist/{Tooltip-DAjRpG7b.cjs → Tooltip-DQgBkgFk.cjs} +1 -1
- package/dist/documentation/installation.md +4 -3
- package/dist/{index-Ck92ROEN.js → index-BhCM2QF1.js} +878 -537
- package/dist/index-Y23HeR26.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +170 -33
- package/dist/types/vue-data-ui.d.ts +170 -33
- package/dist/{useNestedProp-CUrnndD5.cjs → useNestedProp-C2H2jmU6.cjs} +1 -1
- package/dist/{useNestedProp-C0fDv_7c.js → useNestedProp-CH3PVhvc.js} +1 -1
- package/dist/{usePrinter-DBPRZcAN.js → usePrinter-B75HLwzw.js} +1 -1
- package/dist/{usePrinter-c6hW2FYl.cjs → usePrinter-DTF28E03.cjs} +1 -1
- package/dist/{vue-data-ui-BhnYYgwX.js → vue-data-ui-DdhV5Pth.js} +64 -62
- package/dist/vue-data-ui-cqeqQWwY.cjs +9 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +37 -36
- package/dist/{vue-ui-3d-bar-DXLZL0d1.cjs → vue-ui-3d-bar-BB6yidY7.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-B2bAI0Ok.js → vue-ui-3d-bar-gi0fEJUl.js} +7 -7
- package/dist/{vue-ui-accordion-CYyb5N_o.js → vue-ui-accordion-CSZdj7wA.js} +3 -3
- package/dist/{vue-ui-accordion-jSupvtFc.cjs → vue-ui-accordion-CVrj6roI.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DfD0KmQj.js → vue-ui-age-pyramid-CFSWDX3d.js} +8 -8
- package/dist/{vue-ui-age-pyramid-07V7HAUc.cjs → vue-ui-age-pyramid-CrTadT86.cjs} +1 -1
- package/dist/{vue-ui-annotator-DPxczJLi.js → vue-ui-annotator-DqZU11ky.js} +1 -1
- package/dist/{vue-ui-annotator-Cn3IeVBP.cjs → vue-ui-annotator-u5YbenPl.cjs} +1 -1
- package/dist/{vue-ui-candlestick-3oyL2e4C.cjs → vue-ui-candlestick-C3xswSm3.cjs} +1 -1
- package/dist/{vue-ui-candlestick-D5lyf_Oa.js → vue-ui-candlestick-Dph2PhZC.js} +9 -9
- package/dist/{vue-ui-carousel-table-BolCtd-r.cjs → vue-ui-carousel-table-0S6lSZnt.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CMm6zqzo.js → vue-ui-carousel-table-eY08SE2G.js} +4 -4
- package/dist/{vue-ui-chestnut-BaZuTrGs.js → vue-ui-chestnut-BikYCrjQ.js} +6 -6
- package/dist/{vue-ui-chestnut-7EjCEIHL.cjs → vue-ui-chestnut-C3XOHDgw.cjs} +1 -1
- package/dist/{vue-ui-cursor-D_Q1P1gt.cjs → vue-ui-cursor-DUA57VkZ.cjs} +1 -1
- package/dist/{vue-ui-cursor-BNflEMT2.js → vue-ui-cursor-OFgeAFSo.js} +2 -2
- package/dist/{vue-ui-dashboard-D2RbUnMC.cjs → vue-ui-dashboard-BTG0m9YL.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CjPmVfs3.js → vue-ui-dashboard-DA4M1Z0-.js} +2 -2
- package/dist/{vue-ui-digits-DZPhwYe-.js → vue-ui-digits-55Zmunkv.js} +2 -2
- package/dist/{vue-ui-digits-CgrkyBWm.cjs → vue-ui-digits-COxRiMVI.cjs} +1 -1
- package/dist/{vue-ui-donut-CT4WPUa9.js → vue-ui-donut-CG3VWjnG.js} +9 -9
- package/dist/{vue-ui-donut-OZoCX5cL.cjs → vue-ui-donut-JA9hlLlV.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-HBigDBJ1.js → vue-ui-donut-evolution-CA8sDbwX.js} +9 -9
- package/dist/{vue-ui-donut-evolution-B5QxzbPT.cjs → vue-ui-donut-evolution-_E0xUI9Y.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-D3bJRtj_.cjs → vue-ui-dumbbell-BSFT-Bce.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BbsbYS3D.js → vue-ui-dumbbell-BtEXt5Ox.js} +8 -8
- package/dist/{vue-ui-flow-JFuGf_sv.js → vue-ui-flow-BBoXBTkC.js} +7 -7
- package/dist/{vue-ui-flow-CfoQVPzv.cjs → vue-ui-flow-BPEGOFRZ.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CvZ1nzpB.cjs → vue-ui-galaxy-DPrJum3L.cjs} +1 -1
- package/dist/{vue-ui-galaxy-e4ZjPVWn.js → vue-ui-galaxy-ZFEufIyy.js} +9 -9
- package/dist/{vue-ui-gauge-KjRrEYR0.js → vue-ui-gauge-BqZp_V5m.js} +5 -5
- package/dist/{vue-ui-gauge-B_LND1ru.cjs → vue-ui-gauge-CfZ9XJW_.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CBtza3IW.cjs → vue-ui-gizmo-CrSaW32p.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DzUxGQT6.js → vue-ui-gizmo-DitbWAJp.js} +2 -2
- package/dist/{vue-ui-heatmap-CT1YT1xR.cjs → vue-ui-heatmap-CTRjjhmd.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BYrZ7lqp.js → vue-ui-heatmap-zV0pg2Q5.js} +8 -8
- package/dist/{vue-ui-kpi-DViXiLEh.cjs → vue-ui-kpi-B2Bo26hh.cjs} +1 -1
- package/dist/{vue-ui-kpi-C5hCo3ZN.js → vue-ui-kpi-BWuzEkyY.js} +2 -2
- package/dist/{vue-ui-mini-loader-BVSeWn2P.js → vue-ui-mini-loader-BwAWiK3k.js} +2 -2
- package/dist/{vue-ui-mini-loader-DDcjfpGi.cjs → vue-ui-mini-loader-C_Nb-qVd.cjs} +1 -1
- package/dist/{vue-ui-molecule-pOHE_E-U.js → vue-ui-molecule-BD2UW2lJ.js} +9 -9
- package/dist/{vue-ui-molecule--7cCYOj1.cjs → vue-ui-molecule-CSbXNrvu.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Co6cLOze.js → vue-ui-mood-radar-CbMab8pJ.js} +9 -9
- package/dist/{vue-ui-mood-radar-DhmpKZpW.cjs → vue-ui-mood-radar-zpxdsZ4u.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BFyjhjQ_.cjs → vue-ui-nested-donuts-07UI_VlW.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-kZh0P2Zc.js → vue-ui-nested-donuts-SDaiotgC.js} +9 -9
- package/dist/{vue-ui-onion-DSGKwLbh.js → vue-ui-onion-BamHJBdP.js} +9 -9
- package/dist/{vue-ui-onion-BoKPJLJS.cjs → vue-ui-onion-DiychUul.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-B1I7MZP6.js → vue-ui-parallel-coordinate-plot-1R4CyBdQ.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-BLAKE17u.cjs → vue-ui-parallel-coordinate-plot-BaAa3t1h.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CHdlKi32.js → vue-ui-quadrant-CKCLhAS7.js} +10 -10
- package/dist/{vue-ui-quadrant-BIPClpre.cjs → vue-ui-quadrant-DxLYb8Mk.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-ChnLIxWE.js → vue-ui-quick-chart-CAXuRSdm.js} +6 -6
- package/dist/{vue-ui-quick-chart-5GZ03bOo.cjs → vue-ui-quick-chart-DgCRM6WA.cjs} +1 -1
- package/dist/{vue-ui-radar-BIogM1O1.js → vue-ui-radar-BY-y8Mal.js} +10 -10
- package/dist/{vue-ui-radar-BWPQ2p4R.cjs → vue-ui-radar-iETP_3US.cjs} +1 -1
- package/dist/{vue-ui-rating-Y3i8Ogz9.js → vue-ui-rating-Bq1SsByA.js} +2 -2
- package/dist/{vue-ui-rating-BI9eigGC.cjs → vue-ui-rating-DGEgzOaB.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-m1hqaBQ0.js → vue-ui-relation-circle-BPzLP6U6.js} +5 -5
- package/dist/{vue-ui-relation-circle-9tS5nJOC.cjs → vue-ui-relation-circle-pdZ79G9r.cjs} +1 -1
- package/dist/{vue-ui-rings-BGa6d8nO.js → vue-ui-rings-C5ce6pEf.js} +9 -9
- package/dist/{vue-ui-rings-C2f4ARZJ.cjs → vue-ui-rings-DdpKT3DJ.cjs} +1 -1
- package/dist/{vue-ui-scatter-B5aIcdg9.js → vue-ui-scatter-CMetujXJ.js} +10 -10
- package/dist/{vue-ui-scatter-CSAIrCEA.cjs → vue-ui-scatter-Dsc6RABP.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BxURLkX-.js → vue-ui-screenshot--2aeIH_x.js} +1 -1
- package/dist/{vue-ui-screenshot-CHnimNZm.cjs → vue-ui-screenshot-BqzljUT3.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DwEcR_uq.cjs → vue-ui-skeleton-B5Z4craS.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B_c8tnen.js → vue-ui-skeleton-_VMQ594N.js} +2 -2
- package/dist/{vue-ui-smiley-UfNprSwL.cjs → vue-ui-smiley-CL-bubXk.cjs} +1 -1
- package/dist/{vue-ui-smiley-CV3_wGOs.js → vue-ui-smiley-Cty3e_yE.js} +2 -2
- package/dist/{vue-ui-spark-trend-DgqT22Rz.cjs → vue-ui-spark-trend-DT1fMqf_.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-7KqTeaKP.js → vue-ui-spark-trend-pgdWTEqG.js} +4 -4
- package/dist/{vue-ui-sparkbar-ekQGLCse.js → vue-ui-sparkbar-BVQPOz2O.js} +3 -3
- package/dist/{vue-ui-sparkbar-DZoXx0tC.cjs → vue-ui-sparkbar-kfA-BPVJ.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-7hgIimV9.cjs → vue-ui-sparkgauge-DdzlyDsm.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CsU1IpLn.js → vue-ui-sparkgauge-Dx2gFX6H.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CRY_Y5eU.cjs → vue-ui-sparkhistogram-B5xstgQG.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-_S3BGzoc.js → vue-ui-sparkhistogram-Bg_fJsT5.js} +4 -4
- package/dist/{vue-ui-sparkline-DRu2dwsD.js → vue-ui-sparkline-BWl_B6LX.js} +3 -3
- package/dist/{vue-ui-sparkline-BR6TRx3i.cjs → vue-ui-sparkline-WMI-RgkW.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DbxeqSNo.js → vue-ui-sparkstackbar-MMGRG9eS.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-aI73Hnxf.cjs → vue-ui-sparkstackbar-Skcshn6g.cjs} +1 -1
- package/dist/vue-ui-stackbar-DZ0CArmk.cjs +15 -0
- package/dist/vue-ui-stackbar-NZFO3R77.js +750 -0
- package/dist/{vue-ui-strip-plot-B1C5JAka.js → vue-ui-strip-plot-CJmCgC_a.js} +9 -9
- package/dist/{vue-ui-strip-plot-CuhUA0Qj.cjs → vue-ui-strip-plot-Db_dqjd9.cjs} +1 -1
- package/dist/{vue-ui-table-vZxmfkYh.js → vue-ui-table-B-vHHlRw.js} +1 -1
- package/dist/{vue-ui-table-heatmap-B-we4-9Z.js → vue-ui-table-heatmap-BfzDb2H7.js} +4 -4
- package/dist/{vue-ui-table-heatmap-CMASM_wg.cjs → vue-ui-table-heatmap-YCyFyq8J.cjs} +1 -1
- package/dist/{vue-ui-table-BKq6uaQQ.cjs → vue-ui-table-jJ3daLHe.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CXr9vhM1.cjs → vue-ui-table-sparkline-4Qbmxxsy.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DBBEauiC.js → vue-ui-table-sparkline-DZt-bo2D.js} +5 -5
- package/dist/{vue-ui-thermometer-_KBWIP2u.js → vue-ui-thermometer-CdtG1AoI.js} +5 -5
- package/dist/{vue-ui-thermometer-8Nd55_MN.cjs → vue-ui-thermometer-HXWDU2wD.cjs} +1 -1
- package/dist/{vue-ui-timer-CgYqGFuQ.cjs → vue-ui-timer-Cb95XSdn.cjs} +1 -1
- package/dist/{vue-ui-timer-D_UhMYSm.js → vue-ui-timer-DBqMb9iX.js} +4 -4
- package/dist/{vue-ui-tiremarks-7TlDnrfz.cjs → vue-ui-tiremarks-BqXfvQ4t.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Dy1h0ZlT.js → vue-ui-tiremarks-CHKETcHr.js} +5 -5
- package/dist/{vue-ui-treemap-feRelA00.cjs → vue-ui-treemap-CW9JmJ2d.cjs} +1 -1
- package/dist/{vue-ui-treemap-DrXs6PXS.js → vue-ui-treemap-DxKunHfW.js} +9 -9
- package/dist/{vue-ui-vertical-bar-ICikmicE.cjs → vue-ui-vertical-bar-83AMwsHD.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BcIZTywJ.js → vue-ui-vertical-bar-DRLwZjIz.js} +9 -9
- package/dist/{vue-ui-waffle-DtIGHSlB.js → vue-ui-waffle-BRuDxyDU.js} +9 -9
- package/dist/{vue-ui-waffle-CGhfSP2_.cjs → vue-ui-waffle-BwUbvdOE.cjs} +1 -1
- package/dist/{vue-ui-wheel-B6Cya6I_.js → vue-ui-wheel-4HKXl04I.js} +5 -5
- package/dist/{vue-ui-wheel-EdABo6ty.cjs → vue-ui-wheel-kMVi976p.cjs} +1 -1
- package/dist/vue-ui-word-cloud-CrC3iKGd.js +495 -0
- package/dist/vue-ui-word-cloud-WgbYJhMF.cjs +1 -0
- package/dist/{vue-ui-xy-D1yhL28g.js → vue-ui-xy-BN_H7q0X.js} +12 -12
- package/dist/{vue-ui-xy-DOWVG8x2.cjs → vue-ui-xy-BXfP5pz5.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-D2VfaNJf.js → vue-ui-xy-canvas-DAY9Ylzs.js} +10 -10
- package/dist/{vue-ui-xy-canvas-Dp8YKKTs.cjs → vue-ui-xy-canvas-NrhVgFsv.cjs} +1 -1
- package/package.json +2 -1
- package/dist/index-D2z8eN-t.cjs +0 -4
- package/dist/vue-data-ui-B1MbygY4.cjs +0 -9
- package/dist/vue-ui-word-cloud-DQV03srb.cjs +0 -1
- package/dist/vue-ui-word-cloud-narokI2y.js +0 -352
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import { useCssVars as we, computed as f, openBlock as i, createElementBlock as v, createVNode as q, renderSlot as m, createElementVNode as C, normalizeStyle as N, pushScopeId as xe, popScopeId as $e, ref as c, watch as te, onMounted as Se, onBeforeUnmount as Fe, createCommentVNode as F, createBlock as L, unref as p, createSlots as Ne, withCtx as h, normalizeProps as X, guardReactiveProps as j, normalizeClass as ae, Fragment as _e, renderList as Pe, toDisplayString as oe, createTextVNode as Te, nextTick as le } from "vue";
|
|
2
|
+
import { u as ze, S as Ie, c as se, t as Ae, a as Oe, p as E, o as Me, e as ne, g as De, f as We, X as Be, n as Ee, q as Re } from "./index-BhCM2QF1.js";
|
|
3
|
+
import { _ as Ue } from "./Title-CtWGLaoz.js";
|
|
4
|
+
import { u as Ve, U as Ge } from "./usePrinter-B75HLwzw.js";
|
|
5
|
+
import { d as Le, t as Xe, u as je } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
+
import qe from "./vue-ui-accordion-CSZdj7wA.js";
|
|
7
|
+
import { D as He } from "./DataTable-bEXuvNn5.js";
|
|
8
|
+
import Ye from "./BaseIcon-Op8_v5x7.js";
|
|
9
|
+
import { _ as ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
import { u as re } from "./useNestedProp-CH3PVhvc.js";
|
|
11
|
+
const Je = (r) => (xe("data-v-3fd7d274"), r = r(), $e(), r), Ke = { "data-html2canvas-ignore": "" }, Qe = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "reset-wrapper"
|
|
14
|
+
}, Ze = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "reset-wrapper"
|
|
17
|
+
}, et = { class: "mono-slicer" }, tt = /* @__PURE__ */ Je(() => /* @__PURE__ */ C("div", { class: "slider-track" }, null, -1)), at = ["min", "max", "value"], ot = {
|
|
18
|
+
__name: "MonoSlicer",
|
|
19
|
+
props: {
|
|
20
|
+
min: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 0
|
|
23
|
+
},
|
|
24
|
+
max: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0
|
|
27
|
+
},
|
|
28
|
+
inputColor: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "#1A1A1A"
|
|
31
|
+
},
|
|
32
|
+
background: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "#FFFFFF"
|
|
35
|
+
},
|
|
36
|
+
borderColor: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "#FFFFFF"
|
|
39
|
+
},
|
|
40
|
+
selectColor: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "#4A4A4A"
|
|
43
|
+
},
|
|
44
|
+
textColor: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: "#1A1A1A"
|
|
47
|
+
},
|
|
48
|
+
useResetSlot: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !1
|
|
51
|
+
},
|
|
52
|
+
value: {
|
|
53
|
+
type: Number,
|
|
54
|
+
default: 0
|
|
55
|
+
},
|
|
56
|
+
source: {
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 0
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
emits: ["update:value", "reset"],
|
|
62
|
+
setup(r, { emit: I }) {
|
|
63
|
+
const s = r;
|
|
64
|
+
we((b) => ({
|
|
65
|
+
"90ad3208": R.value,
|
|
66
|
+
"4f9eef70": P.value,
|
|
67
|
+
"6e07ae3e": _.value,
|
|
68
|
+
"2fd430a0": r.selectColor,
|
|
69
|
+
"6b8169a4": k.value
|
|
70
|
+
}));
|
|
71
|
+
const R = f(() => s.inputColor), k = f(() => s.background), _ = f(() => `${s.selectColor}33`), P = f(() => s.borderColor);
|
|
72
|
+
function T() {
|
|
73
|
+
I("reset");
|
|
74
|
+
}
|
|
75
|
+
const w = f(() => {
|
|
76
|
+
const b = s.max - s.min, e = 0, x = (s.value - s.min) / b * 100;
|
|
77
|
+
return {
|
|
78
|
+
left: `${e}%`,
|
|
79
|
+
width: `${x - e}%`,
|
|
80
|
+
background: s.selectColor
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
return (b, e) => (i(), v("div", Ke, [
|
|
84
|
+
r.value !== r.source ? (i(), v("div", Qe, [
|
|
85
|
+
r.useResetSlot ? m(b.$slots, "reset-action", {
|
|
86
|
+
key: 1,
|
|
87
|
+
reset: T
|
|
88
|
+
}, void 0, !0) : (i(), v("button", {
|
|
89
|
+
key: 0,
|
|
90
|
+
"data-cy-reset": "",
|
|
91
|
+
tabindex: "0",
|
|
92
|
+
role: "button",
|
|
93
|
+
class: "vue-data-ui-refresh-button",
|
|
94
|
+
onClick: T
|
|
95
|
+
}, [
|
|
96
|
+
q(Ye, {
|
|
97
|
+
name: "refresh",
|
|
98
|
+
stroke: r.textColor
|
|
99
|
+
}, null, 8, ["stroke"])
|
|
100
|
+
]))
|
|
101
|
+
])) : (i(), v("div", Ze)),
|
|
102
|
+
C("div", et, [
|
|
103
|
+
tt,
|
|
104
|
+
C("div", {
|
|
105
|
+
class: "range-highlight",
|
|
106
|
+
style: N(w.value)
|
|
107
|
+
}, null, 4),
|
|
108
|
+
C("input", {
|
|
109
|
+
type: "range",
|
|
110
|
+
min: r.min,
|
|
111
|
+
max: r.max,
|
|
112
|
+
value: Number(r.value),
|
|
113
|
+
onInput: e[0] || (e[0] = (x) => I("update:value", Number(x.target.value)))
|
|
114
|
+
}, null, 40, at)
|
|
115
|
+
])
|
|
116
|
+
]));
|
|
117
|
+
}
|
|
118
|
+
}, lt = /* @__PURE__ */ ue(ot, [["__scopeId", "data-v-3fd7d274"]]), st = ["id"], nt = ["xmlns", "viewBox"], rt = ["transform"], ut = ["fill", "font-weight", "x", "y", "font-size", "transform"], it = {
|
|
119
|
+
key: 3,
|
|
120
|
+
class: "vue-data-ui-watermark"
|
|
121
|
+
}, ct = ["innerHTML"], dt = {
|
|
122
|
+
__name: "vue-ui-word-cloud",
|
|
123
|
+
props: {
|
|
124
|
+
config: {
|
|
125
|
+
type: Object,
|
|
126
|
+
default() {
|
|
127
|
+
return {};
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
dataset: {
|
|
131
|
+
type: [Array, String],
|
|
132
|
+
default() {
|
|
133
|
+
return [];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
setup(r, { expose: I }) {
|
|
138
|
+
const s = r, { vue_ui_word_cloud: R } = ze(), k = f({
|
|
139
|
+
get() {
|
|
140
|
+
return !!s.dataset && s.dataset.length;
|
|
141
|
+
},
|
|
142
|
+
set(t) {
|
|
143
|
+
return t;
|
|
144
|
+
}
|
|
145
|
+
}), _ = c(typeof s.dataset == "string" ? Ie(s.dataset) : s.dataset), P = c(se()), T = c(0), w = c(null), b = c(null), e = f(() => {
|
|
146
|
+
const t = re({
|
|
147
|
+
userConfig: s.config,
|
|
148
|
+
defaultConfig: R
|
|
149
|
+
});
|
|
150
|
+
return t.theme ? {
|
|
151
|
+
...re({
|
|
152
|
+
userConfig: Ae.vue_ui_word_cloud[t.theme] || s.config,
|
|
153
|
+
defaultConfig: t
|
|
154
|
+
}),
|
|
155
|
+
customPalette: Oe[t.theme] || E
|
|
156
|
+
} : t;
|
|
157
|
+
}), x = c(null), g = c(e.value.style.chart.width), n = c({
|
|
158
|
+
width: g.value,
|
|
159
|
+
height: e.value.style.chart.height / e.value.style.chart.height * g.value,
|
|
160
|
+
maxFontSize: e.value.style.chart.words.maxFontSize,
|
|
161
|
+
minFontSize: e.value.style.chart.words.minFontSize
|
|
162
|
+
}), ie = Xe(() => {
|
|
163
|
+
const { width: t, height: o } = je({
|
|
164
|
+
chart: w.value,
|
|
165
|
+
title: e.value.style.chart.title.text ? b.value : null,
|
|
166
|
+
slicer: e.value.style.chart.zoom.show && x.value
|
|
167
|
+
});
|
|
168
|
+
n.value.width = t, n.value.height = o, le(U);
|
|
169
|
+
});
|
|
170
|
+
te(() => g.value, () => {
|
|
171
|
+
ce();
|
|
172
|
+
});
|
|
173
|
+
const ce = Le(() => {
|
|
174
|
+
n.value.width = Number(g.value), n.value.height = e.value.style.chart.height / e.value.style.chart.height * Number(g.value), U();
|
|
175
|
+
}, 10);
|
|
176
|
+
function de() {
|
|
177
|
+
g.value = e.value.style.chart.width;
|
|
178
|
+
}
|
|
179
|
+
const A = c(null);
|
|
180
|
+
Se(() => {
|
|
181
|
+
Me(s.dataset) ? ne({
|
|
182
|
+
componentName: "VueUiWordCloud",
|
|
183
|
+
type: "dataset"
|
|
184
|
+
}) : _.value.forEach((t, o) => {
|
|
185
|
+
De({
|
|
186
|
+
datasetObject: t,
|
|
187
|
+
requiredAttributes: ["name", "value"]
|
|
188
|
+
}).forEach((a) => {
|
|
189
|
+
k.value = !1, ne({
|
|
190
|
+
componentName: "VueUiWordCloud",
|
|
191
|
+
type: "datasetSerieAttribute",
|
|
192
|
+
property: a,
|
|
193
|
+
index: o
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
}), e.value.responsive && (A.value = new ResizeObserver(ie), A.value.observe(w.value.parentNode));
|
|
197
|
+
}), Fe(() => {
|
|
198
|
+
A.value && A.value.disconnect();
|
|
199
|
+
});
|
|
200
|
+
const { isPrinting: H, isImaging: Y, generatePdf: J, generateImage: K } = Ve({
|
|
201
|
+
elementId: `wordCloud_${P.value}`,
|
|
202
|
+
fileName: e.value.style.chart.title.text || "vue-ui-word-cloud"
|
|
203
|
+
}), O = c({
|
|
204
|
+
showTable: e.value.table.show
|
|
205
|
+
});
|
|
206
|
+
function ve(t, o, a = "Arial") {
|
|
207
|
+
const l = document.createElement("canvas").getContext("2d");
|
|
208
|
+
return l.font = `${o}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${a}`, {
|
|
209
|
+
width: l.measureText(t).width + e.value.style.chart.words.proximity,
|
|
210
|
+
height: o
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
function he(t, o) {
|
|
214
|
+
return t.x < o.x + o.width && t.x + t.width > o.x && t.y < o.y + o.height && t.y + t.height > o.y;
|
|
215
|
+
}
|
|
216
|
+
function me(t, o, a) {
|
|
217
|
+
const u = [], l = { x: -o / 2, y: -a / 2, width: o, height: a }, d = 0, $ = 0;
|
|
218
|
+
return t.forEach((S) => {
|
|
219
|
+
let V = !1;
|
|
220
|
+
for (let B = 0; B < Math.max(o, a) / 2 && !V; B += e.value.style.chart.words.packingWeight)
|
|
221
|
+
for (let G = 0; G < 360 && !V; G += e.value.style.chart.words.packingWeight) {
|
|
222
|
+
const ee = G * Math.PI / 180, ye = d + B * Math.cos(ee) - S.width / 2, be = $ + B * Math.sin(ee) - S.height / 2, y = { ...S, x: ye, y: be }, pe = y.x >= l.x && y.y >= l.y && y.x + y.width <= l.x + l.width && y.y + y.height <= l.y + l.height, Ce = u.some((ke) => he(y, ke));
|
|
223
|
+
pe && !Ce && (u.push(y), V = !0);
|
|
224
|
+
}
|
|
225
|
+
}), u;
|
|
226
|
+
}
|
|
227
|
+
const z = c([]);
|
|
228
|
+
te(() => s.dataset, U, { immediate: !0 });
|
|
229
|
+
function U() {
|
|
230
|
+
const t = _.value.map((l) => l.value), o = Math.max(...t), a = Math.min(...t), u = _.value.map((l, d) => {
|
|
231
|
+
const $ = (l.value - a) / (o - a) * (n.value.maxFontSize - n.value.minFontSize) + n.value.minFontSize, S = ve(l.name, $);
|
|
232
|
+
return {
|
|
233
|
+
...l,
|
|
234
|
+
id: se(),
|
|
235
|
+
fontSize: $,
|
|
236
|
+
width: S.width,
|
|
237
|
+
height: S.height,
|
|
238
|
+
color: e.value.style.chart.words.usePalette ? e.value.customPalette[d] || e.value.customPalette[d % e.value.customPalette.length] || E[d] || E[d % E.length] : e.value.style.chart.words.color
|
|
239
|
+
};
|
|
240
|
+
});
|
|
241
|
+
z.value = me(u, n.value.width, n.value.height).sort((l, d) => d.fontSize - l.fontSize);
|
|
242
|
+
}
|
|
243
|
+
const M = f(() => {
|
|
244
|
+
const t = z.value.map((a) => ({
|
|
245
|
+
name: a.name,
|
|
246
|
+
color: a.color
|
|
247
|
+
})), o = z.value.map((a) => a.value);
|
|
248
|
+
return { head: t, body: o };
|
|
249
|
+
});
|
|
250
|
+
function Q() {
|
|
251
|
+
le(() => {
|
|
252
|
+
const t = M.value.head.map((u, l) => [[
|
|
253
|
+
u.name
|
|
254
|
+
], [M.value.body[l]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), a = Ee(o);
|
|
255
|
+
Re({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
const D = f(() => {
|
|
259
|
+
const t = [
|
|
260
|
+
e.value.table.columnNames.series,
|
|
261
|
+
e.value.table.columnNames.value
|
|
262
|
+
], o = M.value.head.map((l, d) => {
|
|
263
|
+
const $ = We({ p: e.value.table.td.prefix, v: M.value.body[d], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
|
|
264
|
+
return [
|
|
265
|
+
{
|
|
266
|
+
color: l.color,
|
|
267
|
+
name: l.name
|
|
268
|
+
},
|
|
269
|
+
$
|
|
270
|
+
];
|
|
271
|
+
}), a = {
|
|
272
|
+
th: {
|
|
273
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
274
|
+
color: e.value.table.th.color,
|
|
275
|
+
outline: e.value.table.th.outline
|
|
276
|
+
},
|
|
277
|
+
td: {
|
|
278
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
279
|
+
color: e.value.table.td.color,
|
|
280
|
+
outline: e.value.table.td.outline
|
|
281
|
+
},
|
|
282
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
283
|
+
};
|
|
284
|
+
return {
|
|
285
|
+
colNames: [
|
|
286
|
+
e.value.table.columnNames.series,
|
|
287
|
+
e.value.table.columnNames.value
|
|
288
|
+
],
|
|
289
|
+
head: t,
|
|
290
|
+
body: o,
|
|
291
|
+
config: a
|
|
292
|
+
};
|
|
293
|
+
}), W = c(!1);
|
|
294
|
+
function fe(t) {
|
|
295
|
+
W.value = t, T.value += 1;
|
|
296
|
+
}
|
|
297
|
+
function ge() {
|
|
298
|
+
return z.value;
|
|
299
|
+
}
|
|
300
|
+
function Z() {
|
|
301
|
+
O.value.showTable = !O.value.showTable;
|
|
302
|
+
}
|
|
303
|
+
return I({
|
|
304
|
+
getData: ge,
|
|
305
|
+
generateCsv: Q,
|
|
306
|
+
generatePdf: J,
|
|
307
|
+
generateImage: K,
|
|
308
|
+
toggleTable: Z
|
|
309
|
+
}), (t, o) => (i(), v("div", {
|
|
310
|
+
class: "vue-ui-word-cloud",
|
|
311
|
+
ref_key: "wordCloudChart",
|
|
312
|
+
ref: w,
|
|
313
|
+
id: `wordCloud_${P.value}`,
|
|
314
|
+
style: N(`width: 100%; font-family:${e.value.style.fontFamily};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`)
|
|
315
|
+
}, [
|
|
316
|
+
e.value.style.chart.title.text ? (i(), v("div", {
|
|
317
|
+
key: 0,
|
|
318
|
+
ref_key: "chartTitle",
|
|
319
|
+
ref: b,
|
|
320
|
+
style: N(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
|
|
321
|
+
}, [
|
|
322
|
+
q(Ue, {
|
|
323
|
+
config: {
|
|
324
|
+
title: {
|
|
325
|
+
...e.value.style.chart.title
|
|
326
|
+
},
|
|
327
|
+
subtitle: {
|
|
328
|
+
...e.value.style.chart.title.subtitle
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}, null, 8, ["config"])
|
|
332
|
+
], 4)) : F("", !0),
|
|
333
|
+
e.value.userOptions.show && k.value ? (i(), L(Ge, {
|
|
334
|
+
ref: "details",
|
|
335
|
+
key: `user_option_${T.value}`,
|
|
336
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
337
|
+
color: e.value.style.chart.color,
|
|
338
|
+
isPrinting: p(H),
|
|
339
|
+
isImaging: p(Y),
|
|
340
|
+
uid: P.value,
|
|
341
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
342
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
343
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
344
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
345
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
346
|
+
isFullscreen: W.value,
|
|
347
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
348
|
+
chartElement: w.value,
|
|
349
|
+
onToggleFullscreen: fe,
|
|
350
|
+
onGeneratePdf: p(J),
|
|
351
|
+
onGenerateCsv: Q,
|
|
352
|
+
onGenerateImage: p(K),
|
|
353
|
+
onToggleTable: Z
|
|
354
|
+
}, Ne({ _: 2 }, [
|
|
355
|
+
t.$slots.optionPdf ? {
|
|
356
|
+
name: "optionPdf",
|
|
357
|
+
fn: h(() => [
|
|
358
|
+
m(t.$slots, "optionPdf", {}, void 0, !0)
|
|
359
|
+
]),
|
|
360
|
+
key: "0"
|
|
361
|
+
} : void 0,
|
|
362
|
+
t.$slots.optionCsv ? {
|
|
363
|
+
name: "optionCsv",
|
|
364
|
+
fn: h(() => [
|
|
365
|
+
m(t.$slots, "optionCsv", {}, void 0, !0)
|
|
366
|
+
]),
|
|
367
|
+
key: "1"
|
|
368
|
+
} : void 0,
|
|
369
|
+
t.$slots.optionImg ? {
|
|
370
|
+
name: "optionImg",
|
|
371
|
+
fn: h(() => [
|
|
372
|
+
m(t.$slots, "optionImg", {}, void 0, !0)
|
|
373
|
+
]),
|
|
374
|
+
key: "2"
|
|
375
|
+
} : void 0,
|
|
376
|
+
t.$slots.optionTable ? {
|
|
377
|
+
name: "optionTable",
|
|
378
|
+
fn: h(() => [
|
|
379
|
+
m(t.$slots, "optionTable", {}, void 0, !0)
|
|
380
|
+
]),
|
|
381
|
+
key: "3"
|
|
382
|
+
} : void 0,
|
|
383
|
+
t.$slots.optionFullscreen ? {
|
|
384
|
+
name: "optionFullscreen",
|
|
385
|
+
fn: h(({ toggleFullscreen: a, isFullscreen: u }) => [
|
|
386
|
+
m(t.$slots, "optionFullscreen", X(j({ toggleFullscreen: a, isFullscreen: u })), void 0, !0)
|
|
387
|
+
]),
|
|
388
|
+
key: "4"
|
|
389
|
+
} : void 0
|
|
390
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : F("", !0),
|
|
391
|
+
k.value ? (i(), v("svg", {
|
|
392
|
+
key: 2,
|
|
393
|
+
class: ae({ "vue-data-ui-fullscreen--on": W.value, "vue-data-ui-fulscreen--off": !W.value }),
|
|
394
|
+
xmlns: p(Be),
|
|
395
|
+
viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
|
|
396
|
+
style: N(`overflow:visible;background:${e.value.style.chart.backgroundColor};`)
|
|
397
|
+
}, [
|
|
398
|
+
C("g", {
|
|
399
|
+
transform: `translate(${(n.value.width <= 0 ? 10 : n.value.width) / 2}, ${(n.value.height <= 0 ? 10 : n.value.height) / 2})`
|
|
400
|
+
}, [
|
|
401
|
+
(i(!0), v(_e, null, Pe(z.value, (a, u) => (i(), v("g", null, [
|
|
402
|
+
(i(), v("text", {
|
|
403
|
+
fill: a.color,
|
|
404
|
+
"font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
|
|
405
|
+
key: u,
|
|
406
|
+
x: a.x,
|
|
407
|
+
y: a.y,
|
|
408
|
+
"font-size": a.fontSize,
|
|
409
|
+
transform: `translate(${a.width / 2}, ${a.height / 2})`,
|
|
410
|
+
style: N(`animation-delay:${u * e.value.animationDelayMs}ms !important`),
|
|
411
|
+
class: ae({ animated: e.value.useCssAnimation }),
|
|
412
|
+
"text-anchor": "middle",
|
|
413
|
+
"dominant-baseline": "middle"
|
|
414
|
+
}, oe(a.name), 15, ut))
|
|
415
|
+
]))), 256))
|
|
416
|
+
], 8, rt),
|
|
417
|
+
m(t.$slots, "svg", {
|
|
418
|
+
svg: { height: n.value.height, width: n.value.width }
|
|
419
|
+
}, void 0, !0)
|
|
420
|
+
], 14, nt)) : F("", !0),
|
|
421
|
+
t.$slots.watermark ? (i(), v("div", it, [
|
|
422
|
+
m(t.$slots, "watermark", X(j({ isPrinting: p(H) || p(Y) })), void 0, !0)
|
|
423
|
+
])) : F("", !0),
|
|
424
|
+
C("div", {
|
|
425
|
+
ref_key: "chartSlicer",
|
|
426
|
+
ref: x,
|
|
427
|
+
style: N(`width:100%;background:${e.value.style.chart.backgroundColor}`),
|
|
428
|
+
"data-html2canvas-ignore": ""
|
|
429
|
+
}, [
|
|
430
|
+
e.value.style.chart.zoom.show ? (i(), L(lt, {
|
|
431
|
+
key: 0,
|
|
432
|
+
value: g.value,
|
|
433
|
+
"onUpdate:value": o[0] || (o[0] = (a) => g.value = a),
|
|
434
|
+
min: 100,
|
|
435
|
+
max: e.value.style.chart.width * 3,
|
|
436
|
+
textColor: e.value.style.chart.color,
|
|
437
|
+
inputColor: e.value.style.chart.zoom.color,
|
|
438
|
+
selectColor: e.value.style.chart.zoom.highlightColor,
|
|
439
|
+
useResetSlot: e.value.style.chart.zoom.useResetSlot,
|
|
440
|
+
background: e.value.style.chart.zoom.color,
|
|
441
|
+
borderColor: e.value.style.chart.backgroundColor,
|
|
442
|
+
source: e.value.style.chart.width,
|
|
443
|
+
onReset: de
|
|
444
|
+
}, {
|
|
445
|
+
"reset-action": h(({ reset: a }) => [
|
|
446
|
+
m(t.$slots, "reset-action", X(j({ reset: a })), void 0, !0)
|
|
447
|
+
]),
|
|
448
|
+
_: 3
|
|
449
|
+
}, 8, ["value", "max", "textColor", "inputColor", "selectColor", "useResetSlot", "background", "borderColor", "source"])) : F("", !0)
|
|
450
|
+
], 4),
|
|
451
|
+
k.value ? (i(), L(qe, {
|
|
452
|
+
key: 4,
|
|
453
|
+
hideDetails: "",
|
|
454
|
+
config: {
|
|
455
|
+
open: O.value.showTable,
|
|
456
|
+
maxHeight: 1e4,
|
|
457
|
+
body: {
|
|
458
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
459
|
+
color: e.value.style.chart.color
|
|
460
|
+
},
|
|
461
|
+
head: {
|
|
462
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
463
|
+
color: e.value.style.chart.color
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}, {
|
|
467
|
+
content: h(() => [
|
|
468
|
+
q(He, {
|
|
469
|
+
colNames: D.value.colNames,
|
|
470
|
+
head: D.value.head,
|
|
471
|
+
body: D.value.body,
|
|
472
|
+
config: D.value.config,
|
|
473
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
474
|
+
onClose: o[1] || (o[1] = (a) => O.value.showTable = !1)
|
|
475
|
+
}, {
|
|
476
|
+
th: h(({ th: a }) => [
|
|
477
|
+
C("div", {
|
|
478
|
+
innerHTML: a,
|
|
479
|
+
style: { display: "flex", "align-items": "center" }
|
|
480
|
+
}, null, 8, ct)
|
|
481
|
+
]),
|
|
482
|
+
td: h(({ td: a }) => [
|
|
483
|
+
Te(oe(a.name || a), 1)
|
|
484
|
+
]),
|
|
485
|
+
_: 1
|
|
486
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
487
|
+
]),
|
|
488
|
+
_: 1
|
|
489
|
+
}, 8, ["config"])) : F("", !0)
|
|
490
|
+
], 12, st));
|
|
491
|
+
}
|
|
492
|
+
}, wt = /* @__PURE__ */ ue(dt, [["__scopeId", "data-v-04df2736"]]);
|
|
493
|
+
export {
|
|
494
|
+
wt as default
|
|
495
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Y23HeR26.cjs"),ne=require("./Title-DQz9dO4d.cjs"),W=require("./usePrinter-DTF28E03.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),re=require("./vue-ui-accordion-CVrj6roI.cjs"),se=require("./DataTable-B4_9ynlY.cjs"),ue=require("./BaseIcon-BK5xYOzV.cjs"),L=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=require("./useNestedProp-C2H2jmU6.cjs"),ie=i=>(e.pushScopeId("data-v-3fd7d274"),i=i(),e.popScopeId(),i),ce={"data-html2canvas-ignore":""},de={key:0,class:"reset-wrapper"},ve={key:1,class:"reset-wrapper"},he={class:"mono-slicer"},me=ie(()=>e.createElementVNode("div",{class:"slider-track"},null,-1)),fe=["min","max","value"],ge={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(i,{emit:S}){const r=i;e.useCssVars(m=>({"90ad3208":_.value,"4f9eef70":k.value,"6e07ae3e":C.value,"2fd430a0":i.selectColor,"6b8169a4":f.value}));const _=e.computed(()=>r.inputColor),f=e.computed(()=>r.background),C=e.computed(()=>`${r.selectColor}33`),k=e.computed(()=>r.borderColor);function w(){S("reset")}const g=e.computed(()=>{const m=r.max-r.min,t=0,p=(r.value-r.min)/m*100;return{left:`${t}%`,width:`${p-t}%`,background:r.selectColor}});return(m,t)=>(e.openBlock(),e.createElementBlock("div",ce,[i.value!==i.source?(e.openBlock(),e.createElementBlock("div",de,[i.useResetSlot?e.renderSlot(m.$slots,"reset-action",{key:1,reset:w},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:w},[e.createVNode(ue.default,{name:"refresh",stroke:i.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",ve)),e.createElementVNode("div",he,[me,e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(g.value)},null,4),e.createElementVNode("input",{type:"range",min:i.min,max:i.max,value:Number(i.value),onInput:t[0]||(t[0]=p=>S("update:value",Number(p.target.value)))},null,40,fe)])]))}},pe=L._export_sfc(ge,[["__scopeId","data-v-3fd7d274"]]),ye=["id"],be=["xmlns","viewBox"],Ce=["transform"],ke=["fill","font-weight","x","y","font-size","transform"],we={key:3,class:"vue-data-ui-watermark"},xe=["innerHTML"],Se={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(i,{expose:S}){const r=i,{vue_ui_word_cloud:_}=u.useConfig(),f=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),C=e.ref(typeof r.dataset=="string"?u.createWordCloudDatasetFromPlainText(r.dataset):r.dataset),k=e.ref(u.createUid()),w=e.ref(0),g=e.ref(null),m=e.ref(null),t=e.computed(()=>{const o=G.useNestedProp({userConfig:r.config,defaultConfig:_});return o.theme?{...G.useNestedProp({userConfig:u.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:u.themePalettes[o.theme]||u.palette}:o}),p=e.ref(null),v=e.ref(t.value.style.chart.width),s=e.ref({width:v.value,height:t.value.style.chart.height/t.value.style.chart.height*v.value,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize}),X=V.throttle(()=>{const{width:o,height:a}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?m.value:null,slicer:t.value.style.chart.zoom.show&&p.value});s.value.width=o,s.value.height=a,e.nextTick(T)});e.watch(()=>v.value,()=>{j()});const j=V.debounce(()=>{s.value.width=Number(v.value),s.value.height=t.value.style.chart.height/t.value.style.chart.height*Number(v.value),T()},10);function H(){v.value=t.value.style.chart.width}const $=e.ref(null);e.onMounted(()=>{u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiWordCloud",type:"dataset"}):C.value.forEach((o,a)=>{u.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,u.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&($.value=new ResizeObserver(X),$.value.observe(g.value.parentNode))}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:A,isImaging:O,generatePdf:M,generateImage:R}=W.usePrinter({elementId:`wordCloud_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),N=e.ref({showTable:t.value.table.show});function Y(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function J(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function K(o,a,l){const c=[],n={x:-a/2,y:-l/2,width:a,height:l},d=0,y=0;return o.forEach(b=>{let E=!1;for(let z=0;z<Math.max(a,l)/2&&!E;z+=t.value.style.chart.words.packingWeight)for(let I=0;I<360&&!E;I+=t.value.style.chart.words.packingWeight){const U=I*Math.PI/180,ee=d+z*Math.cos(U)-b.width/2,te=y+z*Math.sin(U)-b.height/2,h={...b,x:ee,y:te},oe=h.x>=n.x&&h.y>=n.y&&h.x+h.width<=n.x+n.width&&h.y+h.height<=n.y+n.height,le=c.some(ae=>J(h,ae));oe&&!le&&(c.push(h),E=!0)}}),c}const x=e.ref([]);e.watch(()=>r.dataset,T,{immediate:!0});function T(){const o=C.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),c=C.value.map((n,d)=>{const y=(n.value-l)/(a-l)*(s.value.maxFontSize-s.value.minFontSize)+s.value.minFontSize,b=Y(n.name,y);return{...n,id:u.createUid(),fontSize:y,width:b.width,height:b.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[d]||t.value.customPalette[d%t.value.customPalette.length]||u.palette[d]||u.palette[d%u.palette.length]:t.value.style.chart.words.color}});x.value=K(c,s.value.width,s.value.height).sort((n,d)=>d.fontSize-n.fontSize)}const F=e.computed(()=>{const o=x.value.map(l=>({name:l.name,color:l.color})),a=x.value.map(l=>l.value);return{head:o,body:a}});function q(){e.nextTick(()=>{const o=F.value.head.map((c,n)=>[[c.name],[F.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=u.createCsvContent(a);u.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const P=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=F.value.head.map((n,d)=>{const y=u.dataLabel({p:t.value.table.td.prefix,v:F.value.body[d],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},y]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}}),B=e.ref(!1);function Q(o){B.value=o,w.value+=1}function Z(){return x.value}function D(){N.value.showTable=!N.value.showTable}return S({getData:Z,generateCsv:q,generatePdf:M,generateImage:R,toggleTable:D}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,id:`wordCloud_${k.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:m,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ne._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(O),uid:k.value,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,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:Q,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(R),onToggleTable:D},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":B.value,"vue-data-ui-fulscreen--off":!B.value}),xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[e.createElementVNode("g",{transform:`translate(${(s.value.width<=0?10:s.value.width)/2}, ${(s.value.height<=0?10:s.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:c,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,style:e.normalizeStyle(`animation-delay:${c*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,ke))]))),256))],8,Ce),e.renderSlot(o.$slots,"svg",{svg:{height:s.value.height,width:s.value.width}},void 0,!0)],14,be)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",we,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartSlicer",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`),"data-html2canvas-ignore":""},[t.value.style.chart.zoom.show?(e.openBlock(),e.createBlock(pe,{key:0,value:v.value,"onUpdate:value":a[0]||(a[0]=l=>v.value=l),min:100,max:t.value.style.chart.width*3,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:H},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],4),f.value?(e.openBlock(),e.createBlock(re.default,{key:4,hideDetails:"",config:{open:N.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(se.DataTable,{colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[1]||(a[1]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],12,ye))}},$e=L._export_sfc(Se,[["__scopeId","data-v-04df2736"]]);exports.default=$e;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { p as Z } from "./pdf-97UbtKC2.js";
|
|
2
|
-
import { U as J, s as K } from "./usePrinter-
|
|
3
|
-
import { c as U, a as Q, t as j, r as $, p as ee, u as te, O as X, I as M, E as le, T as ae, z as re, U as ie, L as se, V as oe, x as ne, s as ce, d as he, y as ue, b as de, q as ge, n as fe, C as be, R as Ie, W as me, f as Ne, v as _e, w as Fe, e as xe, o as ye, Y as Ae, B as Se } from "./index-
|
|
4
|
-
import { D as Le } from "./DataTable-
|
|
5
|
-
import { _ as Ce } from "./Title-
|
|
6
|
-
import { _ as ke, u as we } from "./Tooltip-
|
|
7
|
-
import { _ as Oe } from "./Shape-
|
|
8
|
-
import ve from "./BaseIcon-
|
|
9
|
-
import Ge from "./vue-ui-table-sparkline-
|
|
10
|
-
import ze from "./vue-ui-skeleton-
|
|
11
|
-
import { S as pe } from "./Slicer-
|
|
12
|
-
import Te from "./vue-ui-accordion-
|
|
13
|
-
import { u as q } from "./useNestedProp-
|
|
2
|
+
import { U as J, s as K } from "./usePrinter-B75HLwzw.js";
|
|
3
|
+
import { c as U, a as Q, t as j, r as $, p as ee, u as te, O as X, I as M, E as le, T as ae, z as re, U as ie, L as se, V as oe, x as ne, s as ce, d as he, y as ue, b as de, q as ge, n as fe, C as be, R as Ie, W as me, f as Ne, v as _e, w as Fe, e as xe, o as ye, Y as Ae, B as Se } from "./index-BhCM2QF1.js";
|
|
4
|
+
import { D as Le } from "./DataTable-bEXuvNn5.js";
|
|
5
|
+
import { _ as Ce } from "./Title-CtWGLaoz.js";
|
|
6
|
+
import { _ as ke, u as we } from "./Tooltip-D6BUVHr1.js";
|
|
7
|
+
import { _ as Oe } from "./Shape-COYAxpcP.js";
|
|
8
|
+
import ve from "./BaseIcon-Op8_v5x7.js";
|
|
9
|
+
import Ge from "./vue-ui-table-sparkline-DZt-bo2D.js";
|
|
10
|
+
import ze from "./vue-ui-skeleton-_VMQ594N.js";
|
|
11
|
+
import { S as pe } from "./Slicer-Cv-2s_-r.js";
|
|
12
|
+
import Te from "./vue-ui-accordion-CSZdj7wA.js";
|
|
13
|
+
import { u as q } from "./useNestedProp-CH3PVhvc.js";
|
|
14
14
|
import { resolveComponent as P, openBlock as r, createElementBlock as i, normalizeClass as T, normalizeStyle as S, createVNode as E, createCommentVNode as c, createBlock as V, createSlots as Me, withCtx as z, renderSlot as v, normalizeProps as Y, guardReactiveProps as W, createElementVNode as d, Fragment as I, renderList as m, toDisplayString as C, withDirectives as Pe, vModelCheckbox as Ve, createTextVNode as Re } from "vue";
|
|
15
15
|
import { _ as De } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const He = U(), Be = {
|