UNPKG

vue-data-ui

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

671 lines (670 loc) • 26.7 kB
import { defineAsyncComponent as _, computed as c, onMounted as Oe, ref as h, watch as Te, createElementBlock as f, openBlock as r, unref as a, normalizeStyle as F, normalizeClass as oe, createBlock as g, createCommentVNode as i, renderSlot as v, createVNode as E, createSlots as Ie, withCtx as p, normalizeProps as S, guardReactiveProps as V, createElementVNode as s, Fragment as le, renderList as ae, toDisplayString as T, createTextVNode as se, nextTick as Le } from "vue"; import { u as Fe, o as Se, e as re, c as Ve, a as Re, R as je, X as Be, s as w, w as Ue, S as Ee, i as ne, f as R, q as We, r as ze } from "./index-BLtEpj8j.js"; import { u as ue } from "./useNestedProp-Bw1KcAmj.js"; import { u as De } from "./usePrinter-DnRwTdvS.js"; import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js"; import { u as He } from "./useChartAccessibility-9icAAmYg.js"; import Xe from "./Legend-E7G897sw.js"; import Ke from "./Title-DkG60EPg.js"; import qe from "./img-D-vWHxhM.js"; import { _ as Ye } from "./_plugin-vue_export-helper-CHgC5LLL.js"; const Je = ["id"], Qe = { key: 2, style: "width:100%;background:transparent" }, Ze = ["xmlns", "viewBox"], et = ["width", "height"], tt = ["id"], ot = ["stop-color"], lt = ["stop-color"], at = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], st = ["d", "stroke", "stroke-width"], rt = ["stroke"], nt = ["fill"], ut = ["stroke"], it = ["fill"], dt = ["stroke"], ct = ["fill"], vt = ["stroke"], yt = ["fill"], ht = ["stroke"], ft = ["fill"], pt = ["d", "stroke", "stroke-width", "fill"], mt = ["x1", "y1", "stroke"], gt = ["cx", "cy", "fill", "stroke"], kt = ["fill", "stroke"], bt = ["y", "fill", "font-weight"], Ct = ["y", "fill"], wt = { key: 5, class: "vue-data-ui-watermark" }, xt = ["onClick"], _t = { style: { "font-weight": "bold" } }, $t = { key: 8, ref: "source", dir: "auto" }, Mt = ["innerHTML"], Pt = { __name: "vue-ui-mood-radar", props: { config: { type: Object, default() { return {}; } }, dataset: { type: Object, default() { return {}; } } }, setup(ie, { expose: de }) { const ce = _(() => import("./vue-ui-accordion-B6Svdk-2.js")), $ = _(() => import("./BaseIcon-Ba5t14Aj.js")), ve = _(() => import("./DataTable-CS_V_Adx.js")), ye = _(() => import("./PackageVersion-CnRyWKP-.js")), he = _(() => import("./PenAndPaper-7BWf7zgA.js")), fe = _(() => import("./vue-ui-skeleton-CsMU8DwQ.js")), pe = _(() => import("./UserOptions-DGw0HvSp.js")), { vue_ui_mood_radar: me } = Fe(), d = ie, M = c(() => !!d.dataset && Object.keys(d.dataset).length); Oe(() => { W(); }); function W() { Se(d.dataset) && re({ componentName: "VueUiMoodRadar", type: "dataset" }); } const P = h(Ve()), N = h(null), ge = h(null), n = h(null), ke = h(null), be = h(0), Ce = h(0), z = h(0), e = c({ get: () => X(), set: (o) => o }), { userOptionsVisible: j, setUserOptionsVisibility: D, keepUserOptionState: G } = Ge({ config: e.value }), { svgRef: H } = He({ config: e.value.style.chart.title }); function X() { const o = ue({ userConfig: d.config, defaultConfig: me }); return o.theme ? { ...ue({ userConfig: Re.vue_ui_mood_radar[o.theme] || d.config, defaultConfig: o }) } : o; } Te(() => d.config, (o) => { e.value = X(), j.value = !e.value.userOptions.showOnChartHover, W(), be.value += 1, Ce.value += 1, z.value += 1, A.value.showTable = e.value.table.show; }, { deep: !0 }); const { isPrinting: K, isImaging: q, generatePdf: Y, generateImage: J } = De({ elementId: P.value, fileName: e.value.style.chart.title.text || "vue-ui-mood-radar", options: e.value.userOptions.print }), we = c(() => e.value.userOptions.show && !e.value.style.chart.title.text), A = h({ showTable: e.value.table.show }), m = c(() => ({ height: 256, width: 256 })), B = c(() => je({ plot: { x: 128, y: m.value.height / 2 }, radius: 90, sides: 5, rotation: 11 })); function xe({ centerX: o, centerY: l, apexX: t, apexY: u, proportion: b, key: y, value: Ae }) { return { x: o + (t - o) * b, y: l + (u - l) * b, key: y, value: Ae }; } const _e = c(() => Math.max(...Object.values(d.dataset).map((o) => isNaN(o) ? 0 : o))), x = c(() => Object.values(d.dataset).reduce((o, l) => (isNaN(o) ? 0 : o) + (isNaN(l) ? 0 : l), 0)), k = c(() => Object.keys(d.dataset).map((o, l) => { const t = typeof d.dataset[o] != "number" || isNaN(d.dataset[o]) ? 0 : d.dataset[o]; return { index: l, key: o, value: t, proportion: t / x.value, color: e.value.style.chart.layout.smileys.colors[o] }; }).sort((o, l) => l.key - o.key)), Q = c(() => M.value ? (["1", "2", "3", "4", "5"].forEach((o) => { [null, void 0].includes(d.dataset[o]) && re({ componentName: "VueUiMoodRadar", type: "datasetAttribute", property: o }); }), B.value.coordinates.map((o, l) => { const t = xe({ centerX: m.value.width / 2, centerY: m.value.height / 2, apexX: o.x, apexY: o.y, proportion: k.value[l].value / _e.value, key: k.value[l].key, value: k.value[l].value }); return { ...o, plots: t, key: k.value[l].key }; })) : []), $e = c(() => ({ cy: "mood-radar-legend", backgroundColor: e.value.style.chart.legend.backgroundColor, color: e.value.style.chart.legend.color, fontSize: e.value.style.chart.legend.fontSize, paddingBottom: 12, fontWeight: e.value.style.chart.legend.bold ? "bold" : "" })); function Me(o) { o === n.value ? n.value = null : n.value = o; } const C = c(() => { const o = k.value.map((t) => ({ name: t.key, color: t.color })), l = k.value.map((t) => isNaN(t.value) ? 0 : t.value); return { head: o, body: l }; }); function Z(o = null) { Le(() => { const l = C.value.head.map((b, y) => [[ b.name ], [C.value.body[y]], [isNaN(C.value.body[y] / x.value) ? "-" : C.value.body[y] / x.value * 100]]), t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), u = We(t); o ? o(u) : ze({ csvContent: u, title: e.value.style.chart.title.text || "vue-ui-mood-radar" }); }); } const I = c(() => { const o = [ ' <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>', Number(x.value.toFixed(e.value.table.td.roundingValue)).toLocaleString(), "100%" ], l = C.value.head.map((b, y) => [ { color: b.color, name: b.name }, C.value.body[y].toFixed(e.value.table.td.roundingValue), isNaN(C.value.body[y] / x.value) ? "-" : (C.value.body[y] / x.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%" ]), t = { th: { backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }, td: { backgroundColor: e.value.table.td.backgroundColor, color: e.value.table.td.color, outline: e.value.table.td.outline }, breakpoint: e.value.table.responsiveBreakpoint }, u = [ e.value.table.columnNames.series, e.value.table.columnNames.value, e.value.table.columnNames.percentage ]; return { head: o, body: l, config: t, colNames: u }; }); function Pe() { return k.value; } function ee() { A.value.showTable = !A.value.showTable; } const O = h(!1); function te(o) { O.value = o; } const L = h(!1); function U() { L.value = !L.value; } async function Ne({ scale: o = 2 } = {}) { if (!N.value) return; const { width: l, height: t } = N.value.getBoundingClientRect(), u = l / t, { imageUri: b, base64: y } = await qe({ domElement: N.value, base64: !0, img: !0, scale: o }); return { imageUri: b, base64: y, title: e.value.style.chart.title.text, width: l, height: t, aspectRatio: u }; } return de({ getData: Pe, getImage: Ne, generatePdf: Y, generateCsv: Z, generateImage: J, toggleTable: ee, toggleAnnotator: U, toggleFullscreen: te }), (o, l) => (r(), f("div", { class: oe(`vue-ui-mood-radar ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`), ref_key: "moodRadarChart", ref: N, id: `${P.value}`, style: F(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`), onMouseenter: l[11] || (l[11] = () => a(D)(!0)), onMouseleave: l[12] || (l[12] = () => a(D)(!1)) }, [ e.value.userOptions.buttons.annotator ? (r(), g(a(he), { key: 0, svgRef: a(H), backgroundColor: e.value.style.chart.backgroundColor, color: e.value.style.chart.color, active: L.value, onClose: U }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : i("", !0), we.value ? (r(), f("div", { key: 1, ref_key: "noTitle", ref: ke, class: "vue-data-ui-no-title-space", style: "height:36px; width: 100%;background:transparent" }, null, 512)) : i("", !0), e.value.style.chart.title.text ? (r(), f("div", Qe, [ E(Ke, { config: { title: { cy: "mood-radar-title", ...e.value.style.chart.title }, subtitle: { cy: "mood-radar-subtitle", ...e.value.style.chart.title.subtitle } } }, null, 8, ["config"]) ])) : i("", !0), e.value.userOptions.show && M.value && (a(G) || a(j)) ? (r(), g(a(pe), { key: 3, ref_key: "details", ref: ge, backgroundColor: e.value.style.chart.backgroundColor, color: e.value.style.chart.color, isPrinting: a(K), isImaging: a(q), uid: P.value, hasPdf: e.value.userOptions.buttons.pdf, hasXls: e.value.userOptions.buttons.csv, hasImg: e.value.userOptions.buttons.img, hasTable: e.value.userOptions.buttons.table, hasFullscreen: e.value.userOptions.buttons.fullscreen, isFullscreen: O.value, titles: { ...e.value.userOptions.buttonTitles }, chartElement: N.value, position: e.value.userOptions.position, hasAnnotator: e.value.userOptions.buttons.annotator, isAnnotation: L.value, callbacks: e.value.userOptions.callbacks, printScale: e.value.userOptions.print.scale, onToggleFullscreen: te, onGeneratePdf: a(Y), onGenerateCsv: Z, onGenerateImage: a(J), onToggleTable: ee, onToggleAnnotator: U, style: F({ visibility: a(G) ? a(j) ? "visible" : "hidden" : "visible" }) }, Ie({ _: 2 }, [ o.$slots.menuIcon ? { name: "menuIcon", fn: p(({ isOpen: t, color: u }) => [ v(o.$slots, "menuIcon", S(V({ isOpen: t, color: u })), void 0, !0) ]), key: "0" } : void 0, o.$slots.optionPdf ? { name: "optionPdf", fn: p(() => [ v(o.$slots, "optionPdf", {}, void 0, !0) ]), key: "1" } : void 0, o.$slots.optionCsv ? { name: "optionCsv", fn: p(() => [ v(o.$slots, "optionCsv", {}, void 0, !0) ]), key: "2" } : void 0, o.$slots.optionImg ? { name: "optionImg", fn: p(() => [ v(o.$slots, "optionImg", {}, void 0, !0) ]), key: "3" } : void 0, o.$slots.optionTable ? { name: "optionTable", fn: p(() => [ v(o.$slots, "optionTable", {}, void 0, !0) ]), key: "4" } : void 0, o.$slots.optionFullscreen ? { name: "optionFullscreen", fn: p(({ toggleFullscreen: t, isFullscreen: u }) => [ v(o.$slots, "optionFullscreen", S(V({ toggleFullscreen: t, isFullscreen: u })), void 0, !0) ]), key: "5" } : void 0, o.$slots.optionAnnotator ? { name: "optionAnnotator", fn: p(({ toggleAnnotator: t, isAnnotator: u }) => [ v(o.$slots, "optionAnnotator", S(V({ toggleAnnotator: t, isAnnotator: u })), void 0, !0) ]), key: "6" } : void 0 ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : i("", !0), M.value ? (r(), f("svg", { key: 4, ref_key: "svgRef", ref: H, xmlns: a(Be), viewBox: `0 0 ${m.value.width} ${m.value.height}`, class: oe({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }), style: F(`overflow:visible;background:transparent;color:${e.value.style.chart.color}`) }, [ E(a(ye)), o.$slots["chart-background"] ? (r(), f("foreignObject", { key: 0, x: 0, y: 0, width: m.value.width, height: m.value.height, style: { pointerEvents: "none" } }, [ v(o.$slots, "chart-background", {}, void 0, !0) ], 8, et)) : i("", !0), s("defs", null, [ s("radialGradient", { cx: "50%", cy: "50%", r: "50%", fx: "50%", fy: "50%", id: `mood_radar_gradient_${P.value}` }, [ s("stop", { offset: "0%", "stop-color": a(w)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.opacity) }, null, 8, ot), s("stop", { offset: "100%", "stop-color": a(w)(a(Ue)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.gradient.intensity / 100), e.value.style.chart.layout.dataPolygon.opacity) }, null, 8, lt) ], 8, tt) ]), (r(!0), f(le, null, ae(B.value.coordinates, (t) => (r(), f("line", { x1: m.value.width / 2, y1: m.value.height / 2, x2: t.x, y2: t.y, stroke: e.value.style.chart.layout.grid.stroke, "stroke-width": e.value.style.chart.layout.grid.strokeWidth }, null, 8, at))), 256)), s("path", { d: B.value.path, fill: "none", stroke: e.value.style.chart.layout.outerPolygon.stroke, "stroke-width": e.value.style.chart.layout.outerPolygon.strokeWidth, "stroke-linejoin": "round", "stroke-linecap": "round" }, null, 8, st), s("path", { fill: "none", stroke: e.value.style.chart.layout.smileys.colors[5], "stroke-width": "1", "stroke-linecap": "round", d: "M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22" }, null, 8, rt), s("circle", { class: "vue-ui-mood-radar-trap", onMouseenter: l[0] || (l[0] = (t) => n.value = 5), onMouseleave: l[1] || (l[1] = (t) => n.value = null), cx: "128", cy: "25", r: "20", fill: n.value === 5 ? a(w)(e.value.style.chart.layout.smileys.colors[5], 20) : "transparent" }, null, 40, nt), s("path", { fill: "none", stroke: e.value.style.chart.layout.smileys.colors[4], "stroke-width": "1", "stroke-linecap": "round", d: "M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92" }, null, 8, ut), s("circle", { class: "vue-ui-mood-radar-trap", onMouseenter: l[2] || (l[2] = (t) => n.value = 4), onMouseleave: l[3] || (l[3] = (t) => n.value = null), cx: "227", cy: "95.5", r: "20", fill: n.value === 4 ? a(w)(e.value.style.chart.layout.smileys.colors[4], 20) : "transparent" }, null, 40, it), s("path", { fill: "none", stroke: e.value.style.chart.layout.smileys.colors[3], "stroke-width": "1", "stroke-linecap": "round", d: "M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215" }, null, 8, dt), s("circle", { class: "vue-ui-mood-radar-trap", onMouseenter: l[4] || (l[4] = (t) => n.value = 3), onMouseleave: l[5] || (l[5] = (t) => n.value = null), cx: "190", cy: "213.5", r: "20", fill: n.value === 3 ? a(w)(e.value.style.chart.layout.smileys.colors[3], 20) : "transparent" }, null, 40, ct), s("path", { fill: "none", stroke: e.value.style.chart.layout.smileys.colors[2], "stroke-width": "1", "stroke-linecap": "round", d: "M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210" }, null, 8, vt), s("circle", { class: "vue-ui-mood-radar-trap", onMouseenter: l[6] || (l[6] = (t) => n.value = 2), onMouseleave: l[7] || (l[7] = (t) => n.value = null), cx: "65", cy: "213.5", r: "20", fill: n.value === 2 ? a(w)(e.value.style.chart.layout.smileys.colors[2], 20) : "transparent" }, null, 40, yt), s("path", { fill: "none", stroke: e.value.style.chart.layout.smileys.colors[1], "stroke-width": "1", "stroke-linecap": "round", d: "M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93" }, null, 8, ht), s("circle", { class: "vue-ui-mood-radar-trap", onMouseenter: l[8] || (l[8] = (t) => n.value = 1), onMouseleave: l[9] || (l[9] = (t) => n.value = null), cx: "29", cy: "95.5", r: "20", fill: n.value === 1 ? a(w)(e.value.style.chart.layout.smileys.colors[1], 20) : "transparent" }, null, 40, ft), s("path", { d: a(Ee)(Q.value.map((t) => t.plots)), stroke: e.value.style.chart.layout.dataPolygon.stroke, "stroke-width": e.value.style.chart.layout.dataPolygon.strokeWidth, "stroke-linecap": "round", "stroke-linejoin": "round", fill: e.value.style.chart.layout.dataPolygon.gradient.show ? `url(#mood_radar_gradient_${P.value})` : a(w)(e.value.style.chart.layout.dataPolygon.color, e.value.style.chart.layout.dataPolygon.opacity) }, null, 8, pt), (r(!0), f(le, null, ae(Q.value.map((t) => t.plots), (t, u) => (r(), f("g", { class: "vue-ui-mood-radar-trap", style: F(`opacity:${n.value == t.key ? "1" : "0"}`) }, [ s("line", { x1: t.x, y1: t.y, x2: 128, y2: 128, stroke: e.value.style.chart.layout.smileys.colors[t.key] }, null, 8, mt), s("circle", { cx: t.x, cy: t.y, fill: e.value.style.chart.layout.smileys.colors[t.key], r: "3", stroke: e.value.style.chart.backgroundColor, "stroke-width": 0.5 }, null, 8, gt), s("circle", { cx: 128, cy: 128, fill: e.value.style.chart.layout.smileys.colors[t.key], r: "3", stroke: e.value.style.chart.backgroundColor, "stroke-width": 0.5 }, null, 8, kt), s("text", { x: 128, y: ["5", 5].includes(t.key) ? 145 : 120, fill: e.value.style.chart.layout.dataLabel.color, "font-size": "12", "text-anchor": "middle", "font-weight": e.value.style.chart.layout.dataLabel.bold ? "bold" : "normal" }, T(a(ne)( e.value.style.chart.layout.dataLabel.formatter, t.value, a(R)({ p: e.value.style.chart.layout.dataLabel.prefix, v: t.value, s: e.value.style.chart.layout.dataLabel.suffix, r: e.value.style.chart.layout.dataLabel.roundingValue }), { datapoint: t, seriesIndex: u } )), 9, bt), s("text", { x: 128, y: ["5", 5].includes(t.key) ? 163 : 102, fill: e.value.style.chart.layout.dataLabel.color, "font-size": "12", "text-anchor": "middle" }, " (" + T(a(R)({ v: t.value / x.value * 100, s: "%", r: e.value.style.chart.layout.dataLabel.roundingPercentage })) + ") ", 9, Ct) ], 4))), 256)), v(o.$slots, "svg", { svg: m.value }, void 0, !0) ], 14, Ze)) : i("", !0), o.$slots.watermark ? (r(), f("div", wt, [ v(o.$slots, "watermark", S(V({ isPrinting: a(K) || a(q) })), void 0, !0) ])) : i("", !0), M.value ? i("", !0) : (r(), g(a(fe), { key: 6, config: { type: "radar", style: { backgroundColor: e.value.style.chart.backgroundColor, radar: { grid: { color: "#CCCCCC" }, shapes: { color: "#CCCCCC" } } } } }, null, 8, ["config"])), e.value.style.chart.legend.show ? (r(), g(Xe, { legendSet: k.value, config: $e.value, key: `legend_${z.value}`, style: { display: "flex", "row-gap": "6px" } }, { item: p(({ legend: t, index: u }) => [ s("div", { onClick: () => Me(t.key), style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center", margin: "3px 0" } }, [ t.key == 1 ? (r(), g(a($), { key: 0, strokeWidth: 1, name: "moodSad", stroke: e.value.style.chart.layout.smileys.colors[t.key] }, null, 8, ["stroke"])) : i("", !0), t.key == 2 ? (r(), g(a($), { key: 1, strokeWidth: 1, name: "moodFlat", stroke: e.value.style.chart.layout.smileys.colors[t.key] }, null, 8, ["stroke"])) : i("", !0), t.key == 3 ? (r(), g(a($), { key: 2, strokeWidth: 1, name: "moodNeutral", stroke: e.value.style.chart.layout.smileys.colors[t.key] }, null, 8, ["stroke"])) : i("", !0), t.key == 4 ? (r(), g(a($), { key: 3, strokeWidth: 1, name: "smiley", stroke: e.value.style.chart.layout.smileys.colors[t.key] }, null, 8, ["stroke"])) : i("", !0), t.key == 5 ? (r(), g(a($), { key: 4, strokeWidth: 1, name: "moodHappy", stroke: e.value.style.chart.layout.smileys.colors[t.key] }, null, 8, ["stroke"])) : i("", !0), s("span", _t, T(a(ne)( e.value.style.chart.layout.dataLabel.formatter, t.value, a(R)({ p: e.value.style.chart.layout.dataLabel.prefix, v: t.value, s: e.value.style.chart.layout.dataLabel.suffix, r: e.value.style.chart.layout.dataLabel.roundingValue }), { datapoint: t, seriesIndex: u } )), 1), se(" (" + T(a(R)({ v: t.proportion * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage })) + ") ", 1) ], 8, xt) ]), _: 1 }, 8, ["legendSet", "config"])) : i("", !0), v(o.$slots, "legend", { legend: k.value }, void 0, !0), o.$slots.source ? (r(), f("div", $t, [ v(o.$slots, "source", {}, void 0, !0) ], 512)) : i("", !0), M.value ? (r(), g(a(ce), { key: 9, hideDetails: "", config: { open: A.value.showTable, maxHeight: 1e4, body: { backgroundColor: e.value.style.chart.backgroundColor, color: e.value.style.chart.color }, head: { backgroundColor: e.value.style.chart.backgroundColor, color: e.value.style.chart.color } } }, { content: p(() => [ E(a(ve), { colNames: I.value.colNames, head: I.value.head, body: I.value.body, config: I.value.config, title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`, onClose: l[10] || (l[10] = (t) => A.value.showTable = !1) }, { th: p(({ th: t }) => [ s("div", { innerHTML: t, style: { display: "flex", "align-items": "center" } }, null, 8, Mt) ]), td: p(({ td: t }) => [ se(T(t.name || t), 1) ]), _: 1 }, 8, ["colNames", "head", "body", "config", "title"]) ]), _: 1 }, 8, ["config"])) : i("", !0) ], 46, Je)); } }, jt = /* @__PURE__ */ Ye(Pt, [["__scopeId", "data-v-b1ec6585"]]); export { jt as default };