vue-data-ui 2.4.46 → 2.4.48
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/dist/{Arrow-iQXl1f2j.cjs → Arrow-CDz_A4X6.cjs} +1 -1
- package/dist/{Arrow-CfjJrWHe.js → Arrow-CMGb5jtB.js} +1 -1
- package/dist/{BaseIcon-Cy5dUKeV.cjs → BaseIcon-CqZOJaZ7.cjs} +1 -1
- package/dist/{BaseIcon-BA9HUUaA.js → BaseIcon-WyM8ZLeS.js} +1 -1
- package/dist/{DataTable-CoZ6Xn0I.js → DataTable-8Bk6Zg9H.js} +2 -2
- package/dist/{DataTable-Cj3bRKxc.cjs → DataTable-UQDVIoTq.cjs} +1 -1
- package/dist/{Legend-DJlRifH8.js → Legend-BqySI7-3.js} +1 -1
- package/dist/{Legend-CEDlovx8.cjs → Legend-DyQhpUa7.cjs} +1 -1
- package/dist/{PackageVersion-TpOTCEFd.js → PackageVersion-C26iHVPd.js} +1 -1
- package/dist/{PackageVersion-DL3c2r_c.cjs → PackageVersion-JL2H1ZNU.cjs} +1 -1
- package/dist/{PenAndPaper-DgVnjC40.cjs → PenAndPaper-Bmfl9PVt.cjs} +1 -1
- package/dist/{PenAndPaper-cjAU-PUf.js → PenAndPaper-XF8fq-Km.js} +3 -3
- package/dist/{Shape-DYtj-lqw.cjs → Shape-CbUYortz.cjs} +1 -1
- package/dist/{Shape--6BralbW.js → Shape-Cmue6aoD.js} +1 -1
- package/dist/{Slicer-dbxY46t5.cjs → Slicer-DJsIXuV_.cjs} +1 -1
- package/dist/{Slicer-6DPtWIL0.js → Slicer-DnI684H6.js} +2 -2
- package/dist/{Title-a1zU7S4D.cjs → Title-CbiI2XAK.cjs} +1 -1
- package/dist/{Title-BavNfnuK.js → Title-D5Wtk97z.js} +1 -1
- package/dist/{Tooltip-BBmtXJ3a.cjs → Tooltip-CXWymtVK.cjs} +1 -1
- package/dist/{Tooltip-CK5rPyXN.js → Tooltip-z6v35GbJ.js} +1 -1
- package/dist/{index-D6Fux0KL.js → index-BepNt4hC.js} +46 -26
- package/dist/index-DOkp6I9s.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +12 -0
- package/dist/types/vue-data-ui.d.ts +12 -0
- package/dist/{useNestedProp-DqEFKuPz.cjs → useNestedProp-BEjpLG7g.cjs} +1 -1
- package/dist/{useNestedProp-CcZBkd4B.js → useNestedProp-DUC6XBU3.js} +1 -1
- package/dist/{usePrinter-BfVNshkJ.js → usePrinter-DPvuzbZK.js} +1 -1
- package/dist/{usePrinter-1s8-9A7g.cjs → usePrinter-Hc-LICQf.cjs} +1 -1
- package/dist/{vue-data-ui-BZHviOU-.js → vue-data-ui-CFmnqYD2.js} +60 -60
- package/dist/{vue-data-ui-nyvnXOBP.cjs → vue-data-ui-TUbEwYZ5.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-Amvwu6fD.cjs → vue-ui-3d-bar-CYl_O7ug.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-BAYRAgaW.js → vue-ui-3d-bar-L6JZrkbq.js} +9 -9
- package/dist/{vue-ui-accordion-CyCBwLDa.js → vue-ui-accordion-C2pYIHIH.js} +3 -3
- package/dist/{vue-ui-accordion-CNQ8JBuy.cjs → vue-ui-accordion-C8xohumC.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Dx-k5K7o.cjs → vue-ui-age-pyramid-CRXWyh5c.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BWg8L30G.js → vue-ui-age-pyramid-CSCtiUKQ.js} +10 -10
- package/dist/{vue-ui-annotator-Drlh2nsy.js → vue-ui-annotator-5Mjqr97s.js} +1 -1
- package/dist/{vue-ui-annotator-Bj3j-VvQ.cjs → vue-ui-annotator-DIETLcfO.cjs} +1 -1
- package/dist/{vue-ui-bullet-KJKcyE57.cjs → vue-ui-bullet-B5MHoDHB.cjs} +1 -1
- package/dist/{vue-ui-bullet-CskzW_No.js → vue-ui-bullet-C6EHD4J1.js} +8 -8
- package/dist/{vue-ui-candlestick-9ARbLuQr.js → vue-ui-candlestick-BrJoYH2t.js} +11 -11
- package/dist/{vue-ui-candlestick-Bcem-LL5.cjs → vue-ui-candlestick-CYMynB3E.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BgabRnN7.js → vue-ui-carousel-table-BtNgnJg3.js} +4 -4
- package/dist/{vue-ui-carousel-table-CCzXqrOD.cjs → vue-ui-carousel-table-ZPuYe12-.cjs} +1 -1
- package/dist/{vue-ui-chestnut-B7q0vmXj.js → vue-ui-chestnut-BGyD7s_L.js} +8 -8
- package/dist/{vue-ui-chestnut-BEKG7vJs.cjs → vue-ui-chestnut-C1en00jI.cjs} +1 -1
- package/dist/{vue-ui-cursor-gRV29a6z.cjs → vue-ui-cursor-BP38xePQ.cjs} +1 -1
- package/dist/{vue-ui-cursor-BW6KFYih.js → vue-ui-cursor-DR2RWF24.js} +2 -2
- package/dist/{vue-ui-dashboard-BU3gco0W.cjs → vue-ui-dashboard-BYygSPuJ.cjs} +1 -1
- package/dist/{vue-ui-dashboard-B1GgQpTW.js → vue-ui-dashboard-BpOAi1fs.js} +2 -2
- package/dist/{vue-ui-digits-B-de-AoF.cjs → vue-ui-digits-C7sdWmoo.cjs} +1 -1
- package/dist/{vue-ui-digits-pTJfyk6w.js → vue-ui-digits-DNrXa7E_.js} +2 -2
- package/dist/{vue-ui-donut-3zJvxMAI.js → vue-ui-donut-95iv1pkT.js} +11 -11
- package/dist/{vue-ui-donut-CV4QfMM6.cjs → vue-ui-donut-BbBw5pWR.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DwWDUev5.js → vue-ui-donut-evolution-BneXLHZF.js} +11 -11
- package/dist/{vue-ui-donut-evolution-CHmMquL3.cjs → vue-ui-donut-evolution-DpECkYLY.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BupMAioY.js → vue-ui-dumbbell-B_T3Hlzb.js} +10 -10
- package/dist/{vue-ui-dumbbell-CwKisd1V.cjs → vue-ui-dumbbell-lnqC1mak.cjs} +1 -1
- package/dist/{vue-ui-flow-DjaSPlMc.cjs → vue-ui-flow-DgsufNuK.cjs} +1 -1
- package/dist/{vue-ui-flow-Gio5LZfS.js → vue-ui-flow-PsQyq54b.js} +9 -9
- package/dist/{vue-ui-funnel-B20LEzYC.js → vue-ui-funnel-CxZYQkNb.js} +8 -8
- package/dist/{vue-ui-funnel-CqcM5pkO.cjs → vue-ui-funnel-Cz5qLXEC.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BlqZ7ul1.js → vue-ui-galaxy-4EZM6VGD.js} +11 -11
- package/dist/{vue-ui-galaxy-B6LzA_6c.cjs → vue-ui-galaxy-C97nWRvH.cjs} +1 -1
- package/dist/vue-ui-gauge-BC0zGvqM.cjs +1 -0
- package/dist/vue-ui-gauge-CFy3oMIA.js +662 -0
- package/dist/{vue-ui-gizmo-CsyW__L-.js → vue-ui-gizmo-BQlJhilX.js} +3 -3
- package/dist/{vue-ui-gizmo-CLNN3Udr.cjs → vue-ui-gizmo-BUfBljdr.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DlyP8IiX.js → vue-ui-heatmap-Dyz8arCQ.js} +10 -10
- package/dist/{vue-ui-heatmap-DLJKnqc8.cjs → vue-ui-heatmap-zi279cjp.cjs} +1 -1
- package/dist/{vue-ui-history-plot-BcxMCSa5.js → vue-ui-history-plot-1KwhLYwx.js} +11 -11
- package/dist/{vue-ui-history-plot-DGFH-CY8.cjs → vue-ui-history-plot-BXZTRkzT.cjs} +1 -1
- package/dist/{vue-ui-kpi-pnZp2CvF.cjs → vue-ui-kpi-BsjkNZZH.cjs} +1 -1
- package/dist/{vue-ui-kpi-BL3vZgx7.js → vue-ui-kpi-DjLKxPTS.js} +3 -3
- package/dist/{vue-ui-mini-loader-BwmbFCFV.js → vue-ui-mini-loader-Be51Zm_Q.js} +2 -2
- package/dist/{vue-ui-mini-loader-BNKPERuk.cjs → vue-ui-mini-loader-UKOzmxaD.cjs} +1 -1
- package/dist/{vue-ui-molecule-BbpCIJe5.js → vue-ui-molecule-DUQo9_oj.js} +11 -11
- package/dist/{vue-ui-molecule-CZ6KhD_5.cjs → vue-ui-molecule-wgNYpLlg.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-9ShpSF_Q.cjs → vue-ui-mood-radar-D-sMgA1m.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DQ-UPdoZ.js → vue-ui-mood-radar-D260gFQ-.js} +11 -11
- package/dist/{vue-ui-nested-donuts-B0RhrWpS.js → vue-ui-nested-donuts-Ccz2llkz.js} +11 -11
- package/dist/{vue-ui-nested-donuts-4-Y7Vn9p.cjs → vue-ui-nested-donuts-DCATiNcn.cjs} +1 -1
- package/dist/{vue-ui-onion-kMrmbJZm.js → vue-ui-onion-4nwZ2Xcq.js} +11 -11
- package/dist/{vue-ui-onion-DzLCbEcB.cjs → vue-ui-onion-jbgqZma_.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BGfy-8GQ.cjs → vue-ui-parallel-coordinate-plot-D8tDqhAC.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CdWo856d.js → vue-ui-parallel-coordinate-plot-b9zBOm3l.js} +12 -12
- package/dist/{vue-ui-quadrant-D8HGb-Gb.cjs → vue-ui-quadrant-BPbKAs_R.cjs} +1 -1
- package/dist/{vue-ui-quadrant-D3OhIIfq.js → vue-ui-quadrant-DyhFsYAn.js} +12 -12
- package/dist/{vue-ui-quick-chart-BqJpkpjf.cjs → vue-ui-quick-chart-BjjeoplC.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BWwbRuD2.js → vue-ui-quick-chart-kBVlNtAe.js} +9 -9
- package/dist/{vue-ui-radar-Ds66K46C.cjs → vue-ui-radar-Cax_LlVW.cjs} +1 -1
- package/dist/{vue-ui-radar-BsAiDMi7.js → vue-ui-radar-WzkdQND3.js} +12 -12
- package/dist/{vue-ui-rating-CcyKPjmP.js → vue-ui-rating-BLj-bxOZ.js} +2 -2
- package/dist/{vue-ui-rating-ClQjIZ78.cjs → vue-ui-rating-W2x5oPbH.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DI24q9Zq.cjs → vue-ui-relation-circle-BC09Wo74.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-eOtVdQOL.js → vue-ui-relation-circle-Cy7KZjJK.js} +7 -7
- package/dist/{vue-ui-rings-9f1E8ktr.js → vue-ui-rings-B2r_HrM3.js} +11 -11
- package/dist/{vue-ui-rings-GJ-RllpC.cjs → vue-ui-rings-BEBxWNzs.cjs} +1 -1
- package/dist/{vue-ui-scatter-DjOO4sai.js → vue-ui-scatter-BzsoN90E.js} +12 -12
- package/dist/{vue-ui-scatter-B7Tm9kTK.cjs → vue-ui-scatter-EbhOyS1b.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DQd-yU3g.cjs → vue-ui-screenshot-BNvphTTn.cjs} +1 -1
- package/dist/{vue-ui-screenshot-k2mC030r.js → vue-ui-screenshot-D-CteYvP.js} +1 -1
- package/dist/{vue-ui-skeleton-wHDgl1XV.js → vue-ui-skeleton-Dm5B1MER.js} +3 -3
- package/dist/{vue-ui-skeleton-DYKuE1ZW.cjs → vue-ui-skeleton-G8jk4hcj.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cds8LoUR.cjs → vue-ui-smiley-DQYXvPr4.cjs} +1 -1
- package/dist/{vue-ui-smiley-C02LWJwt.js → vue-ui-smiley-H4VJmgZj.js} +2 -2
- package/dist/{vue-ui-spark-trend-5uxFq2pM.cjs → vue-ui-spark-trend-DA096qRZ.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-D0shfbAA.js → vue-ui-spark-trend-t_PBPjL2.js} +5 -5
- package/dist/{vue-ui-sparkbar-CGH0sUyT.cjs → vue-ui-sparkbar-Bx-gf5Hz.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DmPdCxF5.js → vue-ui-sparkbar-xh4kHNcW.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BfyVKfCr.cjs → vue-ui-sparkgauge--atMedaJ.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CqJz8p6J.js → vue-ui-sparkgauge-BfVnT-Cl.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-vJBW3am7.js → vue-ui-sparkhistogram-BHE8M9AE.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-B-PxzLAe.cjs → vue-ui-sparkhistogram-zunUFhA0.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BoHbGcLX.js → vue-ui-sparkline-B6SKeGhK.js} +4 -4
- package/dist/{vue-ui-sparkline-D_RzcAKQ.cjs → vue-ui-sparkline-CvxWwt_w.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-C6lyJ3Yf.js → vue-ui-sparkstackbar-B_KMgwOl.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DOqRrV5Q.cjs → vue-ui-sparkstackbar-Bhd7EKGG.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Drzs1Eyl.js → vue-ui-stackbar-C_P0JG4w.js} +12 -12
- package/dist/{vue-ui-stackbar-aGhn0Cot.cjs → vue-ui-stackbar-suSeRgaG.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-D1OnXpSS.js → vue-ui-strip-plot-BUA3moHw.js} +11 -11
- package/dist/{vue-ui-strip-plot-VyISwa5R.cjs → vue-ui-strip-plot-CWMQUeOe.cjs} +1 -1
- package/dist/{vue-ui-table-DLPofj0y.cjs → vue-ui-table-BYmYQISh.cjs} +1 -1
- package/dist/{vue-ui-table-H2AWSu1t.js → vue-ui-table-BcFkS1Cj.js} +1 -1
- package/dist/{vue-ui-table-heatmap-D2Yub14q.js → vue-ui-table-heatmap-Bvt_J2PP.js} +4 -4
- package/dist/{vue-ui-table-heatmap-wvpaD4ir.cjs → vue-ui-table-heatmap-JK93Wb5V.cjs} +1 -1
- package/dist/vue-ui-table-sparkline-B7_CaLRt.cjs +1 -0
- package/dist/vue-ui-table-sparkline-CFqGNvWi.js +573 -0
- package/dist/{vue-ui-thermometer-B-0y1mlR.cjs → vue-ui-thermometer-Dh844EJO.cjs} +1 -1
- package/dist/{vue-ui-thermometer-yoXfkNqw.js → vue-ui-thermometer-Dm0ttenA.js} +7 -7
- package/dist/{vue-ui-timer-CrmRh82y.js → vue-ui-timer-CaFTEmwe.js} +5 -5
- package/dist/{vue-ui-timer-BmdGu2OH.cjs → vue-ui-timer-LypwXXDJ.cjs} +1 -1
- package/dist/{vue-ui-tiremarks--dQqSUAB.js → vue-ui-tiremarks-Bgm_MUY2.js} +7 -7
- package/dist/{vue-ui-tiremarks-BTKsqFx9.cjs → vue-ui-tiremarks-CFgv3kS8.cjs} +1 -1
- package/dist/{vue-ui-treemap-CoHv7WB0.cjs → vue-ui-treemap--2oLnl5Z.cjs} +1 -1
- package/dist/{vue-ui-treemap-xf0R6iJv.js → vue-ui-treemap-CERIO7kA.js} +11 -11
- package/dist/{vue-ui-vertical-bar-DkEKT7jg.cjs → vue-ui-vertical-bar-B6P0pW6h.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CgyxeziQ.js → vue-ui-vertical-bar-BErNHsoK.js} +11 -11
- package/dist/{vue-ui-waffle-CkwF305q.cjs → vue-ui-waffle-BlsD3mo7.cjs} +1 -1
- package/dist/{vue-ui-waffle-BsWXzCto.js → vue-ui-waffle-DwXtzgfk.js} +11 -11
- package/dist/{vue-ui-wheel-OyKC9U09.cjs → vue-ui-wheel-Bnlv4BkN.cjs} +1 -1
- package/dist/{vue-ui-wheel-BDG6vuLJ.js → vue-ui-wheel-C57mnBKi.js} +7 -7
- package/dist/{vue-ui-word-cloud-D-bzY5ks.js → vue-ui-word-cloud-C9dIGLRl.js} +10 -10
- package/dist/{vue-ui-word-cloud-NJ7fgwoa.cjs → vue-ui-word-cloud-MQ4ipLvb.cjs} +1 -1
- package/dist/{vue-ui-xy-ClUJG6UI.cjs → vue-ui-xy-BLxO3c8J.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CvLYBiAC.js → vue-ui-xy-canvas-RNuxMqDq.js} +11 -11
- package/dist/{vue-ui-xy-canvas-CH-U7nNa.cjs → vue-ui-xy-canvas-xlIskwwx.cjs} +1 -1
- package/dist/{vue-ui-xy-BRVzv2LA.js → vue-ui-xy-t9BzKivu.js} +14 -14
- package/package.json +1 -1
- package/dist/index-DQqE9z_u.cjs +0 -9
- package/dist/vue-ui-gauge-C5OATvE7.cjs +0 -1
- package/dist/vue-ui-gauge-C6-5yI2V.js +0 -610
- package/dist/vue-ui-table-sparkline-DUTGELZ3.js +0 -516
- package/dist/vue-ui-table-sparkline-Doj1Qy-g.cjs +0 -1
|
@@ -1,516 +0,0 @@
|
|
|
1
|
-
import { useCssVars as fe, ref as d, computed as h, watch as ee, onMounted as pe, openBlock as u, createElementBlock as i, normalizeClass as V, createElementVNode as c, normalizeStyle as r, toDisplayString as b, createCommentVNode as p, withDirectives as be, Fragment as E, renderList as G, createBlock as R, unref as v, createSlots as ge, withCtx as A, renderSlot as C, normalizeProps as me, guardReactiveProps as he, nextTick as ye } from "vue";
|
|
2
|
-
import { u as ke, c as _e, t as xe, a as Ce, p as $, b as we, o as Ie, e as te, g as Se, d as Ae, $ as $e, i as P, f as z, q as Pe, r as ze } from "./index-D6Fux0KL.js";
|
|
3
|
-
import { u as ae } from "./useNestedProp-CcZBkd4B.js";
|
|
4
|
-
import Oe from "./vue-ui-sparkline-BoHbGcLX.js";
|
|
5
|
-
import Fe from "./BaseIcon-BA9HUUaA.js";
|
|
6
|
-
import { u as Ne, U as De, v as We } from "./usePrinter-BfVNshkJ.js";
|
|
7
|
-
import { _ as Te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
const Me = ["id"], Ve = { style: { "z-index": "1", "padding-right": "24px" } }, Ee = ["onClick"], Ge = ["data-cell"], Re = ["data-cell", "onPointerenter"], Le = ["data-cell"], Be = ["data-cell"], Ue = ["data-cell"], He = ["data-cell"], qe = {
|
|
9
|
-
key: 0,
|
|
10
|
-
ref: "source",
|
|
11
|
-
dir: "auto"
|
|
12
|
-
}, Xe = {
|
|
13
|
-
__name: "vue-ui-table-sparkline",
|
|
14
|
-
props: {
|
|
15
|
-
config: {
|
|
16
|
-
type: Object,
|
|
17
|
-
default() {
|
|
18
|
-
return {};
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
dataset: {
|
|
22
|
-
type: Array,
|
|
23
|
-
default() {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
setup(le, { expose: oe }) {
|
|
29
|
-
const g = le;
|
|
30
|
-
fe((t) => ({
|
|
31
|
-
"1f14fe1a": t.tdo
|
|
32
|
-
}));
|
|
33
|
-
const { vue_ui_table_sparkline: ne } = ke(), O = d(_e()), L = d(0), w = d(0), F = d(null), e = h({
|
|
34
|
-
get: () => B(),
|
|
35
|
-
set: (t) => t
|
|
36
|
-
});
|
|
37
|
-
function B() {
|
|
38
|
-
const t = ae({
|
|
39
|
-
userConfig: g.config,
|
|
40
|
-
defaultConfig: ne
|
|
41
|
-
});
|
|
42
|
-
return t.theme ? {
|
|
43
|
-
...ae({
|
|
44
|
-
userConfig: xe.vue_ui_table_sparkline[t.theme] || g.config,
|
|
45
|
-
defaultConfig: t
|
|
46
|
-
}),
|
|
47
|
-
customPalette: Ce[t.theme] || $
|
|
48
|
-
} : t;
|
|
49
|
-
}
|
|
50
|
-
ee(() => g.config, (t) => {
|
|
51
|
-
e.value = B(), J(), w.value += 1;
|
|
52
|
-
}, { deep: !0 }), ee(() => g.dataset, (t) => {
|
|
53
|
-
_.value = y.value, w.value += 1;
|
|
54
|
-
}, { deep: !0 });
|
|
55
|
-
const { isPrinting: U, isImaging: H, generatePdf: q, generateImage: X } = Ne({
|
|
56
|
-
elementId: `table_${O.value}`,
|
|
57
|
-
fileName: e.value.title.text || "vue-ui-table-sparkline"
|
|
58
|
-
}), se = h(() => we(e.value.customPalette)), I = d(null), N = d(!1), ue = h(() => e.value.responsiveBreakpoint);
|
|
59
|
-
pe(() => {
|
|
60
|
-
J();
|
|
61
|
-
});
|
|
62
|
-
const D = d(e.value.colNames);
|
|
63
|
-
function J() {
|
|
64
|
-
Ie(g.dataset) && te({
|
|
65
|
-
componentName: "VueUiTableSparkline",
|
|
66
|
-
type: "dataset"
|
|
67
|
-
});
|
|
68
|
-
const t = new ResizeObserver((o) => {
|
|
69
|
-
o.forEach((a) => {
|
|
70
|
-
N.value = a.contentRect.width < ue.value;
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
I.value && t.observe(I.value), D.value = [];
|
|
74
|
-
for (let o = 0; o < Y.value; o += 1)
|
|
75
|
-
D.value.push(e.value.colNames[o] || `col ${o}`);
|
|
76
|
-
}
|
|
77
|
-
const K = h(() => (g.dataset.forEach((t, o) => {
|
|
78
|
-
Se({
|
|
79
|
-
datasetObject: t,
|
|
80
|
-
requiredAttributes: ["name", "values"]
|
|
81
|
-
}).forEach((a) => {
|
|
82
|
-
te({
|
|
83
|
-
componentName: "VueUiTableSparkline",
|
|
84
|
-
type: "datasetSerieAttribute",
|
|
85
|
-
property: a,
|
|
86
|
-
index: o
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}), g.dataset.map((t, o) => {
|
|
90
|
-
const a = (t.values || []).map((s) => isNaN(s) ? 0 : s ?? 0), n = a.reduce((s, l) => s + l, 0);
|
|
91
|
-
return {
|
|
92
|
-
...t,
|
|
93
|
-
values: t.values || [],
|
|
94
|
-
color: Ae(t.color) || se.value[o] || $[o] || $[o % $.length],
|
|
95
|
-
sum: n,
|
|
96
|
-
average: n / a.length,
|
|
97
|
-
median: $e(a),
|
|
98
|
-
sparklineDataset: a.map((s, l) => ({
|
|
99
|
-
period: e.value.colNames[l] || `col ${l}`,
|
|
100
|
-
value: s || 0
|
|
101
|
-
}))
|
|
102
|
-
};
|
|
103
|
-
})));
|
|
104
|
-
function re(t) {
|
|
105
|
-
const a = (t[0].values || []).map(
|
|
106
|
-
(s, l) => t.map((f) => f.values[l] || [])
|
|
107
|
-
).map(
|
|
108
|
-
(s) => s.map((l, f) => [l, f]).sort((l, f) => f[0] - l[0]).map((l) => l[1])
|
|
109
|
-
);
|
|
110
|
-
return t.map((s, l) => ({
|
|
111
|
-
...s,
|
|
112
|
-
values: s.values || [],
|
|
113
|
-
orders: a[l]
|
|
114
|
-
}));
|
|
115
|
-
}
|
|
116
|
-
const y = h(() => re(K.value)), _ = d(y.value), ie = h(() => Math.max(..._.value.map((t) => (t.values || []).length))), S = d(void 0), W = d(!1), T = d(void 0), M = d(-1);
|
|
117
|
-
function Q() {
|
|
118
|
-
W.value = !1, T.value = void 0, M.value = -1, _.value = y.value;
|
|
119
|
-
}
|
|
120
|
-
function de(t) {
|
|
121
|
-
W.value = !0, T.value = t;
|
|
122
|
-
const o = y.value.map((l) => l.values[t] || []), a = S.value === t ? 1 : -1;
|
|
123
|
-
M.value = a, t === S.value ? S.value = void 0 : S.value = t;
|
|
124
|
-
const s = o.map((l, f) => [f, l]).sort((l, f) => a * (f[1] - l[1])).map((l) => l[0]).map((l) => y.value[l]);
|
|
125
|
-
_.value = s, w.value += 1;
|
|
126
|
-
}
|
|
127
|
-
const Y = h(() => Math.max(...g.dataset.map((t) => (t.values || []).length))), k = h(() => {
|
|
128
|
-
let t = D.value;
|
|
129
|
-
if (!t.length)
|
|
130
|
-
for (let a = 0; a < Y.value; a += 1)
|
|
131
|
-
t.push(`col ${a + 1}`);
|
|
132
|
-
e.value.showTotal && (t = [...t, e.value.translations.total]);
|
|
133
|
-
let o;
|
|
134
|
-
return e.value.showAverage && e.value.showMedian ? o = [
|
|
135
|
-
...t,
|
|
136
|
-
e.value.translations.average,
|
|
137
|
-
e.value.translations.median
|
|
138
|
-
] : e.value.showAverage && !e.value.showMedian ? o = [...t, e.value.translations.average] : !e.value.showAverage && e.value.showMedian ? o = [...t, e.value.translations.median] : o = t, e.value.showSparklines ? [...o, e.value.translations.chart] : o;
|
|
139
|
-
}), m = d(void 0), x = d(void 0);
|
|
140
|
-
function ve({ dataIndex: t, serieIndex: o }) {
|
|
141
|
-
m.value = t, x.value = o, F.value[t] && !N.value && F.value[t].scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
|
|
142
|
-
}
|
|
143
|
-
const Z = d(!1);
|
|
144
|
-
function ce(t) {
|
|
145
|
-
Z.value = t, L.value += 1;
|
|
146
|
-
}
|
|
147
|
-
function j() {
|
|
148
|
-
ye(() => {
|
|
149
|
-
const t = [e.value.translations.serie].concat(k.value), o = K.value.map((s, l) => [
|
|
150
|
-
[s.name],
|
|
151
|
-
s.values,
|
|
152
|
-
[s.sum],
|
|
153
|
-
[s.average],
|
|
154
|
-
[s.median]
|
|
155
|
-
]), a = [t].concat(o), n = Pe(a);
|
|
156
|
-
ze({
|
|
157
|
-
csvContent: n,
|
|
158
|
-
title: e.value.title.text || "vue-ui-table-sparkline"
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
return oe({
|
|
163
|
-
generatePdf: q,
|
|
164
|
-
generateImage: X,
|
|
165
|
-
generateCsv: j,
|
|
166
|
-
restoreOrder: Q
|
|
167
|
-
}), (t, o) => (u(), i("div", {
|
|
168
|
-
ref_key: "tableContainer",
|
|
169
|
-
ref: I,
|
|
170
|
-
class: V({ "vue-ui-responsive": N.value }),
|
|
171
|
-
style: { overflow: "hidden" },
|
|
172
|
-
id: `table_${O.value}`
|
|
173
|
-
}, [
|
|
174
|
-
c("div", {
|
|
175
|
-
style: { overflow: "auto" },
|
|
176
|
-
onPointerleave: o[0] || (o[0] = (a) => {
|
|
177
|
-
x.value = void 0, m.value = void 0;
|
|
178
|
-
})
|
|
179
|
-
}, [
|
|
180
|
-
c("table", {
|
|
181
|
-
class: "vue-ui-data-table",
|
|
182
|
-
style: r({ fontFamily: e.value.fontFamily, position: "relative" })
|
|
183
|
-
}, [
|
|
184
|
-
e.value.title.text ? (u(), i("caption", {
|
|
185
|
-
key: 0,
|
|
186
|
-
style: r({ backgroundColor: e.value.title.backgroundColor })
|
|
187
|
-
}, [
|
|
188
|
-
c("div", {
|
|
189
|
-
style: r({
|
|
190
|
-
fontSize: `${e.value.title.fontSize}px`,
|
|
191
|
-
fontWeight: e.value.title.bold ? "bold" : "normal",
|
|
192
|
-
color: e.value.title.color,
|
|
193
|
-
textAlign: e.value.title.textAlign
|
|
194
|
-
})
|
|
195
|
-
}, b(e.value.title.text), 5),
|
|
196
|
-
e.value.title.subtitle.text ? (u(), i("div", {
|
|
197
|
-
key: 0,
|
|
198
|
-
style: r({
|
|
199
|
-
fontSize: `${e.value.title.subtitle.fontSize}px`,
|
|
200
|
-
fontWeight: e.value.title.subtitle.bold ? "bold" : "normal",
|
|
201
|
-
color: e.value.title.subtitle.color,
|
|
202
|
-
textAlign: e.value.title.textAlign
|
|
203
|
-
})
|
|
204
|
-
}, b(e.value.title.subtitle.text), 5)) : p("", !0)
|
|
205
|
-
], 4)) : p("", !0),
|
|
206
|
-
c("thead", Ve, [
|
|
207
|
-
be((u(), i("tr", {
|
|
208
|
-
role: "row",
|
|
209
|
-
class: "vue-ui-data-table__thead-row",
|
|
210
|
-
style: r({
|
|
211
|
-
backgroundColor: e.value.thead.backgroundColor,
|
|
212
|
-
color: e.value.thead.color
|
|
213
|
-
})
|
|
214
|
-
}, [
|
|
215
|
-
c("th", {
|
|
216
|
-
role: "cell",
|
|
217
|
-
style: r({
|
|
218
|
-
backgroundColor: e.value.thead.backgroundColor,
|
|
219
|
-
border: e.value.thead.outline,
|
|
220
|
-
textAlign: e.value.thead.textAlign,
|
|
221
|
-
fontWeight: e.value.thead.bold ? "bold" : "normal"
|
|
222
|
-
}),
|
|
223
|
-
class: "sticky-col-first"
|
|
224
|
-
}, b(e.value.translations.serie), 5),
|
|
225
|
-
(u(!0), i(E, null, G(k.value, (a, n) => (u(), i("th", {
|
|
226
|
-
role: "cell",
|
|
227
|
-
style: r({
|
|
228
|
-
background: e.value.thead.backgroundColor,
|
|
229
|
-
border: e.value.thead.outline,
|
|
230
|
-
textAlign: e.value.thead.textAlign,
|
|
231
|
-
fontWeight: e.value.thead.bold ? "bold" : "normal",
|
|
232
|
-
minWidth: n === k.value.length - 1 ? `${e.value.sparkline.dimensions.width}px` : "48px",
|
|
233
|
-
cursor: y.value[0].values[n] !== void 0 ? "pointer" : "default",
|
|
234
|
-
paddingRight: n === k.value.length - 1 && e.value.userOptions.show ? "36px" : ""
|
|
235
|
-
}),
|
|
236
|
-
onClick: () => de(n),
|
|
237
|
-
class: V({ "sticky-col": n === k.value.length - 1 && e.value.showSparklines })
|
|
238
|
-
}, [
|
|
239
|
-
c("div", {
|
|
240
|
-
style: r({
|
|
241
|
-
display: "flex",
|
|
242
|
-
flexDirection: "row",
|
|
243
|
-
alignItems: "center",
|
|
244
|
-
gap: "6px",
|
|
245
|
-
justifyContent: e.value.thead.textAlign
|
|
246
|
-
})
|
|
247
|
-
}, [
|
|
248
|
-
c("span", null, b(a), 1),
|
|
249
|
-
W.value && n === T.value && y.value[0].values[n] !== void 0 ? (u(), R(Fe, {
|
|
250
|
-
key: 0,
|
|
251
|
-
size: 18,
|
|
252
|
-
name: M.value === 1 ? "sort" : "sortReverse",
|
|
253
|
-
stroke: e.value.thead.color
|
|
254
|
-
}, null, 8, ["name", "stroke"])) : p("", !0)
|
|
255
|
-
], 4),
|
|
256
|
-
e.value.userOptions.show && n === k.value.length - 1 ? (u(), R(De, {
|
|
257
|
-
ref_for: !0,
|
|
258
|
-
ref: "details",
|
|
259
|
-
key: `user_option_${L.value}`,
|
|
260
|
-
backgroundColor: e.value.thead.backgroundColor,
|
|
261
|
-
color: e.value.thead.color,
|
|
262
|
-
isPrinting: v(U),
|
|
263
|
-
isImaging: v(H),
|
|
264
|
-
uid: O.value,
|
|
265
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
266
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
267
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
268
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
269
|
-
isFullscreen: Z.value,
|
|
270
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
271
|
-
chartElement: I.value,
|
|
272
|
-
position: e.value.userOptions.position,
|
|
273
|
-
onToggleFullscreen: ce,
|
|
274
|
-
onGeneratePdf: v(q),
|
|
275
|
-
onGenerateImage: v(X),
|
|
276
|
-
onGenerateCsv: j
|
|
277
|
-
}, ge({ _: 2 }, [
|
|
278
|
-
t.$slots.optionPdf ? {
|
|
279
|
-
name: "optionPdf",
|
|
280
|
-
fn: A(() => [
|
|
281
|
-
C(t.$slots, "optionPdf", {}, void 0, !0)
|
|
282
|
-
]),
|
|
283
|
-
key: "0"
|
|
284
|
-
} : void 0,
|
|
285
|
-
t.$slots.optionCsv ? {
|
|
286
|
-
name: "optionCsv",
|
|
287
|
-
fn: A(() => [
|
|
288
|
-
C(t.$slots, "optionCsv", {}, void 0, !0)
|
|
289
|
-
]),
|
|
290
|
-
key: "1"
|
|
291
|
-
} : void 0,
|
|
292
|
-
t.$slots.optionImg ? {
|
|
293
|
-
name: "optionImg",
|
|
294
|
-
fn: A(() => [
|
|
295
|
-
C(t.$slots, "optionImg", {}, void 0, !0)
|
|
296
|
-
]),
|
|
297
|
-
key: "2"
|
|
298
|
-
} : void 0,
|
|
299
|
-
t.$slots.optionFullscreen ? {
|
|
300
|
-
name: "optionFullscreen",
|
|
301
|
-
fn: A(({ toggleFullscreen: s, isFullscreen: l }) => [
|
|
302
|
-
C(t.$slots, "optionFullscreen", me(he({ toggleFullscreen: s, isFullscreen: l })), void 0, !0)
|
|
303
|
-
]),
|
|
304
|
-
key: "3"
|
|
305
|
-
} : void 0
|
|
306
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "onGeneratePdf", "onGenerateImage"])) : p("", !0)
|
|
307
|
-
], 14, Ee))), 256))
|
|
308
|
-
], 4)), [
|
|
309
|
-
[v(We), Q]
|
|
310
|
-
])
|
|
311
|
-
]),
|
|
312
|
-
c("tbody", null, [
|
|
313
|
-
(u(!0), i(E, null, G(_.value, (a, n) => (u(), i("tr", {
|
|
314
|
-
role: "row",
|
|
315
|
-
style: r({
|
|
316
|
-
backgroundColor: e.value.tbody.backgroundColor,
|
|
317
|
-
color: e.value.tbody.color
|
|
318
|
-
}),
|
|
319
|
-
class: V({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": n % 2 === 0, "vue-ui-data-table__tbody__row-odd": n % 2 !== 0 })
|
|
320
|
-
}, [
|
|
321
|
-
c("td", {
|
|
322
|
-
role: "cell",
|
|
323
|
-
style: r({
|
|
324
|
-
backgroundColor: e.value.tbody.backgroundColor,
|
|
325
|
-
border: e.value.tbody.outline,
|
|
326
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
327
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
328
|
-
textAlign: e.value.tbody.textAlign
|
|
329
|
-
}),
|
|
330
|
-
"data-cell": e.value.translations.serie,
|
|
331
|
-
class: "vue-ui-data-table__tbody__td sticky-col-first"
|
|
332
|
-
}, [
|
|
333
|
-
c("div", {
|
|
334
|
-
dir: "auto",
|
|
335
|
-
style: r({
|
|
336
|
-
display: "flex",
|
|
337
|
-
flexDirection: "row",
|
|
338
|
-
alignItems: "center",
|
|
339
|
-
gap: "6px",
|
|
340
|
-
justifyContent: e.value.tbody.textAlign
|
|
341
|
-
})
|
|
342
|
-
}, [
|
|
343
|
-
e.value.tbody.showColorMarker ? (u(), i("span", {
|
|
344
|
-
key: 0,
|
|
345
|
-
style: r({ color: a.color })
|
|
346
|
-
}, "⬤", 4)) : p("", !0),
|
|
347
|
-
c("span", null, b(a.name ?? "-"), 1)
|
|
348
|
-
], 4)
|
|
349
|
-
], 12, Ge),
|
|
350
|
-
(u(!0), i(E, null, G(ie.value, (s, l) => (u(), i("td", {
|
|
351
|
-
dir: "auto",
|
|
352
|
-
role: "cell",
|
|
353
|
-
ref_for: !0,
|
|
354
|
-
ref_key: "TD",
|
|
355
|
-
ref: F,
|
|
356
|
-
style: r({
|
|
357
|
-
border: e.value.tbody.outline,
|
|
358
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
359
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
360
|
-
textAlign: e.value.tbody.textAlign,
|
|
361
|
-
background: m.value !== void 0 && l === m.value ? e.value.tbody.selectedColor.useSerieColor ? `${a.color.length > 7 ? a.color.slice(0, -2) : a.color}33` : e.value.tbody.selectedColor.fallback : "",
|
|
362
|
-
borderRadius: m.value !== void 0 && x.value !== void 0 && l === m.value && x.value === n ? "3px" : ""
|
|
363
|
-
}),
|
|
364
|
-
"data-cell": k.value[l],
|
|
365
|
-
class: "vue-ui-data-table__tbody__td",
|
|
366
|
-
onPointerenter: (f) => {
|
|
367
|
-
x.value = n, m.value = l;
|
|
368
|
-
}
|
|
369
|
-
}, b([null, void 0].includes(a.values[l]) ? "-" : v(P)(
|
|
370
|
-
e.value.formatter,
|
|
371
|
-
Number(a.values[l]),
|
|
372
|
-
v(z)({
|
|
373
|
-
p: e.value.prefix,
|
|
374
|
-
v: Number(a.values[l]),
|
|
375
|
-
s: e.value.suffix,
|
|
376
|
-
r: e.value.roundingValues
|
|
377
|
-
}),
|
|
378
|
-
{ datapoint: a, seriesIndex: n, datapointIndex: l }
|
|
379
|
-
)), 45, Re))), 256)),
|
|
380
|
-
e.value.showTotal ? (u(), i("td", {
|
|
381
|
-
key: 0,
|
|
382
|
-
dir: "auto",
|
|
383
|
-
role: "cell",
|
|
384
|
-
style: r({
|
|
385
|
-
border: e.value.tbody.outline,
|
|
386
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
387
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
388
|
-
textAlign: e.value.tbody.textAlign
|
|
389
|
-
}),
|
|
390
|
-
"data-cell": e.value.translations.total,
|
|
391
|
-
class: "vue-ui-data-table__tbody__td"
|
|
392
|
-
}, b(v(P)(
|
|
393
|
-
e.value.formatter,
|
|
394
|
-
a.sum,
|
|
395
|
-
v(z)({
|
|
396
|
-
p: e.value.prefix,
|
|
397
|
-
v: a.sum,
|
|
398
|
-
s: e.value.suffix,
|
|
399
|
-
r: e.value.roundingTotal
|
|
400
|
-
}),
|
|
401
|
-
{ datapoint: a.sum, seriesIndex: n }
|
|
402
|
-
)), 13, Le)) : p("", !0),
|
|
403
|
-
e.value.showAverage ? (u(), i("td", {
|
|
404
|
-
key: 1,
|
|
405
|
-
dir: "auto",
|
|
406
|
-
role: "cell",
|
|
407
|
-
style: r({
|
|
408
|
-
border: e.value.tbody.outline,
|
|
409
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
410
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
411
|
-
textAlign: e.value.tbody.textAlign
|
|
412
|
-
}),
|
|
413
|
-
"data-cell": e.value.translations.average,
|
|
414
|
-
class: "vue-ui-data-table__tbody__td"
|
|
415
|
-
}, b(v(P)(
|
|
416
|
-
e.value.formatter,
|
|
417
|
-
a.average,
|
|
418
|
-
v(z)({
|
|
419
|
-
p: e.value.prefix,
|
|
420
|
-
v: a.average,
|
|
421
|
-
s: e.value.suffix,
|
|
422
|
-
r: e.value.roundingAverage
|
|
423
|
-
}),
|
|
424
|
-
{ datapoint: a.average, seriesIndex: n }
|
|
425
|
-
)), 13, Be)) : p("", !0),
|
|
426
|
-
e.value.showMedian ? (u(), i("td", {
|
|
427
|
-
key: 2,
|
|
428
|
-
dir: "auto",
|
|
429
|
-
role: "cell",
|
|
430
|
-
style: r({
|
|
431
|
-
border: e.value.tbody.outline,
|
|
432
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
433
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
434
|
-
textAlign: e.value.tbody.textAlign
|
|
435
|
-
}),
|
|
436
|
-
"data-cell": e.value.translations.median,
|
|
437
|
-
class: "vue-ui-data-table__tbody__td"
|
|
438
|
-
}, b(v(P)(
|
|
439
|
-
e.value.formatter,
|
|
440
|
-
a.median,
|
|
441
|
-
v(z)({
|
|
442
|
-
p: e.value.prefix,
|
|
443
|
-
v: a.median,
|
|
444
|
-
s: e.value.suffix,
|
|
445
|
-
r: e.value.roundingMedian
|
|
446
|
-
}),
|
|
447
|
-
{ datapoint: a.median, seriesIndex: n }
|
|
448
|
-
)), 13, Ue)) : p("", !0),
|
|
449
|
-
e.value.showSparklines ? (u(), i("td", {
|
|
450
|
-
key: 3,
|
|
451
|
-
role: "cell",
|
|
452
|
-
"data-cell": e.value.translations.chart,
|
|
453
|
-
style: r({
|
|
454
|
-
border: e.value.tbody.outline,
|
|
455
|
-
fontSize: `${e.value.tbody.fontSize}px`,
|
|
456
|
-
fontWeight: e.value.tbody.bold ? "bold" : "normal",
|
|
457
|
-
textAlign: e.value.tbody.textAlign,
|
|
458
|
-
backgroundColor: e.value.tbody.backgroundColor,
|
|
459
|
-
padding: "0"
|
|
460
|
-
}),
|
|
461
|
-
class: "vue-ui-data-table__tbody__td sticky-col"
|
|
462
|
-
}, [
|
|
463
|
-
(u(), R(Oe, {
|
|
464
|
-
key: `sparkline_${n}_${w.value}`,
|
|
465
|
-
onHoverIndex: ({ index: s }) => ve({ dataIndex: s, serieIndex: n }),
|
|
466
|
-
"height-ratio": e.value.sparkline.dimensions.heightRatio,
|
|
467
|
-
"forced-padding": 30,
|
|
468
|
-
dataset: a.sparklineDataset,
|
|
469
|
-
showInfo: !1,
|
|
470
|
-
selectedIndex: m.value,
|
|
471
|
-
config: {
|
|
472
|
-
type: e.value.sparkline.type,
|
|
473
|
-
style: {
|
|
474
|
-
backgroundColor: "transparent",
|
|
475
|
-
animation: {
|
|
476
|
-
show: e.value.sparkline.animation.show && !v(U) && !v(H),
|
|
477
|
-
animationFrames: e.value.sparkline.animation.animationFrames
|
|
478
|
-
},
|
|
479
|
-
line: {
|
|
480
|
-
color: a.color,
|
|
481
|
-
smooth: e.value.sparkline.smooth,
|
|
482
|
-
strokeWidth: e.value.sparkline.strokeWidth
|
|
483
|
-
},
|
|
484
|
-
bar: {
|
|
485
|
-
color: a.color
|
|
486
|
-
},
|
|
487
|
-
area: {
|
|
488
|
-
color: a.color,
|
|
489
|
-
opacity: e.value.sparkline.showArea ? 16 : 0,
|
|
490
|
-
useGradient: e.value.sparkline.useGradient
|
|
491
|
-
},
|
|
492
|
-
verticalIndicator: {
|
|
493
|
-
color: a.color
|
|
494
|
-
},
|
|
495
|
-
plot: {
|
|
496
|
-
radius: 9,
|
|
497
|
-
stroke: e.value.tbody.backgroundColor,
|
|
498
|
-
strokeWidth: 3
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}, null, 8, ["onHoverIndex", "height-ratio", "dataset", "selectedIndex", "config"]))
|
|
503
|
-
], 12, He)) : p("", !0)
|
|
504
|
-
], 6))), 256))
|
|
505
|
-
])
|
|
506
|
-
], 4)
|
|
507
|
-
], 32),
|
|
508
|
-
t.$slots.source ? (u(), i("div", qe, [
|
|
509
|
-
C(t.$slots, "source", {}, void 0, !0)
|
|
510
|
-
], 512)) : p("", !0)
|
|
511
|
-
], 10, Me));
|
|
512
|
-
}
|
|
513
|
-
}, tt = /* @__PURE__ */ Te(Xe, [["__scopeId", "data-v-df1c4c1d"]]);
|
|
514
|
-
export {
|
|
515
|
-
tt as default
|
|
516
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DQqE9z_u.cjs"),L=require("./useNestedProp-DqEFKuPz.cjs"),Q=require("./vue-ui-sparkline-D_RzcAKQ.cjs"),Y=require("./BaseIcon-Cy5dUKeV.cjs"),B=require("./usePrinter-1s8-9A7g.cjs"),Z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["id"],ee={style:{"z-index":"1","padding-right":"24px"}},te=["onClick"],le=["data-cell"],ae=["data-cell","onPointerenter"],oe=["data-cell"],ne=["data-cell"],re=["data-cell"],ue=["data-cell"],se={key:0,ref:"source",dir:"auto"},ie={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(T,{expose:M}){const d=T;e.useCssVars(l=>({"1f14fe1a":l.tdo}));const{vue_ui_table_sparkline:G}=s.useConfig(),h=e.ref(s.createUid()),z=e.ref(0),b=e.ref(0),k=e.ref(null),t=e.computed({get:()=>I(),set:l=>l});function I(){const l=L.useNestedProp({userConfig:d.config,defaultConfig:G});return l.theme?{...L.useNestedProp({userConfig:s.themes.vue_ui_table_sparkline[l.theme]||d.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>d.config,l=>{t.value=I(),$(),b.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{m.value=v.value,b.value+=1},{deep:!0});const{isPrinting:N,isImaging:A,generatePdf:E,generateImage:V}=B.usePrinter({elementId:`table_${h.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),q=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),g=e.ref(null),_=e.ref(!1),R=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{$()});const x=e.ref(t.value.colNames);function $(){s.objectIsEmpty(d.dataset)&&s.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(n=>{n.forEach(a=>{_.value=a.contentRect.width<R.value})});g.value&&l.observe(g.value),x.value=[];for(let n=0;n<F.value;n+=1)x.value.push(t.value.colNames[n]||`col ${n}`)}const D=e.computed(()=>(d.dataset.forEach((l,n)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:n})})}),d.dataset.map((l,n)=>{const a=(l.values||[]).map(u=>isNaN(u)?0:u??0),r=a.reduce((u,o)=>u+o,0);return{...l,values:l.values||[],color:s.convertColorToHex(l.color)||q.value[n]||s.palette[n]||s.palette[n%s.palette.length],sum:r,average:r/a.length,median:s.calcMedian(a),sparklineDataset:a.map((u,o)=>({period:t.value.colNames[o]||`col ${o}`,value:u||0}))}})));function U(l){const a=(l[0].values||[]).map((u,o)=>l.map(i=>i.values[o]||[])).map(u=>u.map((o,i)=>[o,i]).sort((o,i)=>i[0]-o[0]).map(o=>o[1]));return l.map((u,o)=>({...u,values:u.values||[],orders:a[o]}))}const v=e.computed(()=>U(D.value)),m=e.ref(v.value),H=e.computed(()=>Math.max(...m.value.map(l=>(l.values||[]).length))),y=e.ref(void 0),C=e.ref(!1),S=e.ref(void 0),w=e.ref(-1);function P(){C.value=!1,S.value=void 0,w.value=-1,m.value=v.value}function X(l){C.value=!0,S.value=l;const n=v.value.map(o=>o.values[l]||[]),a=y.value===l?1:-1;w.value=a,l===y.value?y.value=void 0:y.value=l;const u=n.map((o,i)=>[i,o]).sort((o,i)=>a*(i[1]-o[1])).map(o=>o[0]).map(o=>v.value[o]);m.value=u,b.value+=1}const F=e.computed(()=>Math.max(...d.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=x.value;if(!l.length)for(let a=0;a<F.value;a+=1)l.push(`col ${a+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let n;return t.value.showAverage&&t.value.showMedian?n=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?n=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?n=[...l,t.value.translations.median]:n=l,t.value.showSparklines?[...n,t.value.translations.chart]:n}),c=e.ref(void 0),f=e.ref(void 0);function J({dataIndex:l,serieIndex:n}){c.value=l,f.value=n,k.value[l]&&!_.value&&k.value[l].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}const O=e.ref(!1);function K(l){O.value=l,z.value+=1}function W(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),n=D.value.map((u,o)=>[[u.name],u.values,[u.sum],[u.average],[u.median]]),a=[l].concat(n),r=s.createCsvContent(a);s.downloadCsv({csvContent:r,title:t.value.title.text||"vue-ui-table-sparkline"})})}return M({generatePdf:E,generateImage:V,generateCsv:W,restoreOrder:P}),(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:g,class:e.normalizeClass({"vue-ui-responsive":_.value}),style:{overflow:"hidden"},id:`table_${h.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:n[0]||(n[0]=a=>{f.value=void 0,c.value=void 0})},[e.createElementVNode("table",{class:"vue-ui-data-table",style:e.normalizeStyle({fontFamily:t.value.fontFamily,position:"relative"})},[t.value.title.text?(e.openBlock(),e.createElementBlock("caption",{key:0,style:e.normalizeStyle({backgroundColor:t.value.title.backgroundColor})},[e.createElementVNode("div",{style:e.normalizeStyle({fontSize:`${t.value.title.fontSize}px`,fontWeight:t.value.title.bold?"bold":"normal",color:t.value.title.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.text),5),t.value.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({fontSize:`${t.value.title.subtitle.fontSize}px`,fontWeight:t.value.title.subtitle.bold?"bold":"normal",color:t.value.title.subtitle.color,textAlign:t.value.title.textAlign})},e.toDisplayString(t.value.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("thead",ee,[e.withDirectives((e.openBlock(),e.createElementBlock("tr",{role:"row",class:"vue-ui-data-table__thead-row",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color})},[e.createElementVNode("th",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal"}),class:"sticky-col-first"},e.toDisplayString(t.value.translations.serie),5),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(a,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,border:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:r===p.value.length-1?`${t.value.sparkline.dimensions.width}px`:"48px",cursor:v.value[0].values[r]!==void 0?"pointer":"default",paddingRight:r===p.value.length-1&&t.value.userOptions.show?"36px":""}),onClick:()=>X(r),class:e.normalizeClass({"sticky-col":r===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",{style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",justifyContent:t.value.thead.textAlign})},[e.createElementVNode("span",null,e.toDisplayString(a),1),C.value&&r===S.value&&v.value[0].values[r]!==void 0?(e.openBlock(),e.createBlock(Y.default,{key:0,size:18,name:w.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)],4),t.value.userOptions.show&&r===p.value.length-1?(e.openBlock(),e.createBlock(B.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${z.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(N),isImaging:e.unref(A),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:O.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,onToggleFullscreen:K,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(V),onGenerateCsv:W},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:u,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:u,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,te))),256))],4)),[[e.unref(B.vClickOutside),P]])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,color:t.value.tbody.color}),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.serie,class:"vue-ui-data-table__tbody__td sticky-col-first"},[e.createElementVNode("div",{dir:"auto",style:e.normalizeStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",justifyContent:t.value.tbody.textAlign})},[t.value.tbody.showColorMarker?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle({color:a.color})},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)],4)],12,le),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(u,o)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",ref_for:!0,ref_key:"TD",ref:k,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,background:c.value!==void 0&&o===c.value?t.value.tbody.selectedColor.useSerieColor?`${a.color.length>7?a.color.slice(0,-2):a.color}33`:t.value.tbody.selectedColor.fallback:"",borderRadius:c.value!==void 0&&f.value!==void 0&&o===c.value&&f.value===r?"3px":""}),"data-cell":p.value[o],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{f.value=r,c.value=o}},e.toDisplayString([null,void 0].includes(a.values[o])?"-":e.unref(s.applyDataLabel)(t.value.formatter,Number(a.values[o]),e.unref(s.dataLabel)({p:t.value.prefix,v:Number(a.values[o]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:r,datapointIndex:o})),45,ae))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.total,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.sum,e.unref(s.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:r})),13,oe)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.average,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.average,e.unref(s.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:r})),13,ne)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),"data-cell":t.value.translations.median,class:"vue-ui-data-table__tbody__td"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,a.median,e.unref(s.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:r})),13,re)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({border:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:t.value.tbody.backgroundColor,padding:"0"}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(Q.default,{key:`sparkline_${r}_${b.value}`,onHoverIndex:({index:u})=>J({dataIndex:u,serieIndex:r}),"height-ratio":t.value.sparkline.dimensions.heightRatio,"forced-padding":30,dataset:a.sparklineDataset,showInfo:!1,selectedIndex:c.value,config:{type:t.value.sparkline.type,style:{backgroundColor:"transparent",animation:{show:t.value.sparkline.animation.show&&!e.unref(N)&&!e.unref(A),animationFrames:t.value.sparkline.animation.animationFrames},line:{color:a.color,smooth:t.value.sparkline.smooth,strokeWidth:t.value.sparkline.strokeWidth},bar:{color:a.color},area:{color:a.color,opacity:t.value.sparkline.showArea?16:0,useGradient:t.value.sparkline.useGradient},verticalIndicator:{color:a.color},plot:{radius:9,stroke:t.value.tbody.backgroundColor,strokeWidth:3}}}},null,8,["onHoverIndex","height-ratio","dataset","selectedIndex","config"]))],12,ue)):e.createCommentVNode("",!0)],6))),256))])],4)],32),l.$slots.source?(e.openBlock(),e.createElementBlock("div",se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],10,j))}},de=Z._export_sfc(ie,[["__scopeId","data-v-df1c4c1d"]]);exports.default=de;
|