vue-data-ui 2.3.61 → 2.3.63
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-B5nYwPUt.js → Arrow-CBx1Hj4I.js} +1 -1
- package/dist/{Arrow-Dv_tprAO.cjs → Arrow-fP0md3L3.cjs} +1 -1
- package/dist/{BaseIcon-DUPLRuLO.js → BaseIcon-CS18qRiy.js} +1 -1
- package/dist/{BaseIcon-aPcCSO_Z.cjs → BaseIcon-O8jJvy48.cjs} +1 -1
- package/dist/{DataTable-NUzEZXWt.js → DataTable-BGJ2mVxG.js} +2 -2
- package/dist/{DataTable-B6xCb-DR.cjs → DataTable-CSEiZDAb.cjs} +1 -1
- package/dist/{Legend-ePmJ_YIA.cjs → Legend-DuuSl2rJ.cjs} +1 -1
- package/dist/{Legend-C3tseguI.js → Legend-UWyvC57K.js} +1 -1
- package/dist/{Shape-DAe5uqIA.cjs → Shape-Dsx4SQVn.cjs} +1 -1
- package/dist/{Shape-BPcWPP9D.js → Shape-HfEpP-Tk.js} +1 -1
- package/dist/{Slicer-CmHwU6if.js → Slicer-Bk3Rt85L.js} +9 -9
- package/dist/{Slicer-BJs52Jle.cjs → Slicer-Cf74aFVz.cjs} +1 -1
- package/dist/{Title-BAQrVaNA.js → Title-CPZstF2C.js} +1 -1
- package/dist/{Title-B_p983os.cjs → Title-PZ6S96pU.cjs} +1 -1
- package/dist/{Tooltip-C2dhDgoh.cjs → Tooltip-BoIYPSX3.cjs} +1 -1
- package/dist/{Tooltip-B73tTE2v.js → Tooltip-CBmmiqKr.js} +5 -5
- package/dist/{index-CwG--L4Z.js → index-C_05i_JG.js} +578 -526
- package/dist/{index-nPEJmXmf.cjs → index-NNZeHOBS.cjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-TbnnNrH2.cjs → useNestedProp-CPsbJAGj.cjs} +1 -1
- package/dist/{useNestedProp-BqwYEJGM.js → useNestedProp-DLnT0Wtg.js} +1 -1
- package/dist/{usePrinter-D012Olnq.cjs → usePrinter-BLbY8qGZ.cjs} +1 -1
- package/dist/{usePrinter-Do9tGYem.js → usePrinter-DOhlzlnx.js} +1 -1
- package/dist/{vue-data-ui-DQAJDvpX.cjs → vue-data-ui-D5aG0WkE.cjs} +1 -1
- package/dist/{vue-data-ui-ORLyt-v3.js → vue-data-ui-vqnxkVKv.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +7 -7
- package/dist/{vue-ui-3d-bar-BRbooRg3.cjs → vue-ui-3d-bar-Cez69HMH.cjs} +1 -1
- package/dist/{vue-ui-3d-bar--ztApFzW.js → vue-ui-3d-bar-b7Pu7sfL.js} +7 -7
- package/dist/{vue-ui-accordion-CHL4xuW4.cjs → vue-ui-accordion-CcdyvXrp.cjs} +1 -1
- package/dist/{vue-ui-accordion-Be_wWB1T.js → vue-ui-accordion-rGJVvi_V.js} +3 -3
- package/dist/vue-ui-age-pyramid-B6LKyKjc.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-DLIladXC.js → vue-ui-age-pyramid-CH1Vj2R6.js} +226 -226
- package/dist/{vue-ui-annotator-CS2d8F8x.cjs → vue-ui-annotator-BfmMNM_X.cjs} +1 -1
- package/dist/{vue-ui-annotator-Bxrjl1nz.js → vue-ui-annotator-CTio5IiK.js} +1 -1
- package/dist/{vue-ui-candlestick-BppLVU6c.js → vue-ui-candlestick-C4kT9W0j.js} +158 -158
- package/dist/{vue-ui-candlestick-tumv-lhv.cjs → vue-ui-candlestick-DvX9Jxoi.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-BsFNypM6.cjs → vue-ui-carousel-table-CMs7scX3.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BnOsmGVc.js → vue-ui-carousel-table-Df2HHk0v.js} +4 -4
- package/dist/{vue-ui-chestnut-DFb7M_SC.js → vue-ui-chestnut-BKTnDElg.js} +65 -64
- package/dist/{vue-ui-chestnut-tK8ebPQM.cjs → vue-ui-chestnut-CCw8h0_m.cjs} +3 -3
- package/dist/{vue-ui-cursor-D-eRMlWI.cjs → vue-ui-cursor-C-8bpiuy.cjs} +1 -1
- package/dist/{vue-ui-cursor-CYk61ZVK.js → vue-ui-cursor-DOOlFN5D.js} +2 -2
- package/dist/{vue-ui-dashboard-Cbk74q7K.cjs → vue-ui-dashboard-B_h8KxOx.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BomFWtsP.js → vue-ui-dashboard-D7U1UkAh.js} +2 -2
- package/dist/{vue-ui-digits-Ch9quA4D.js → vue-ui-digits-DmxQgABv.js} +2 -2
- package/dist/{vue-ui-digits-DWJOvgi2.cjs → vue-ui-digits-DoQoNGGx.cjs} +1 -1
- package/dist/{vue-ui-donut-BIMgi_Qw.cjs → vue-ui-donut-DdnwGXq6.cjs} +1 -1
- package/dist/vue-ui-donut-evolution-DsRAZLMN.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-ClNciLi2.js → vue-ui-donut-evolution-uPCTV6E6.js} +95 -95
- package/dist/{vue-ui-donut-Ctzc7e6_.js → vue-ui-donut-t5zf9Lm5.js} +42 -42
- package/dist/{vue-ui-dumbbell-IBrAHdlc.js → vue-ui-dumbbell-BCdxqHVR.js} +109 -107
- package/dist/vue-ui-dumbbell-D1Ak2pEE.cjs +9 -0
- package/dist/vue-ui-flow-CLqm5nkx.cjs +1 -0
- package/dist/vue-ui-flow-J1SmdKkh.js +469 -0
- package/dist/vue-ui-galaxy-CSXbhXBe.cjs +1 -0
- package/dist/{vue-ui-galaxy-BBKU6WqV.js → vue-ui-galaxy-DNMbyKNg.js} +91 -91
- package/dist/{vue-ui-gauge-CDpN6D_X.js → vue-ui-gauge-CC_9cSwj.js} +84 -84
- package/dist/vue-ui-gauge-O3ntKI31.cjs +1 -0
- package/dist/{vue-ui-gizmo-BS-olrbu.js → vue-ui-gizmo-C5vGMHUU.js} +2 -2
- package/dist/{vue-ui-gizmo-Dyi4DWSA.cjs → vue-ui-gizmo-qrJt0nH6.cjs} +1 -1
- package/dist/vue-ui-heatmap-BjimHnMb.cjs +1 -0
- package/dist/{vue-ui-heatmap-Bonl3GBj.js → vue-ui-heatmap-ByxLZuR5.js} +257 -239
- package/dist/{vue-ui-kpi-MeC195T8.js → vue-ui-kpi-DdNQlVCe.js} +3 -3
- package/dist/{vue-ui-kpi-ChD3Gh4P.cjs → vue-ui-kpi-eyxMedig.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-NiTij5XQ.cjs → vue-ui-mini-loader-B5ykH9BF.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-l2G4D7lJ.js → vue-ui-mini-loader-C05VGcNr.js} +2 -2
- package/dist/{vue-ui-molecule-C1dO-Ony.js → vue-ui-molecule-DI0oHPT5.js} +20 -20
- package/dist/{vue-ui-molecule-pXZ3aWlr.cjs → vue-ui-molecule-LZ1SRkgK.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3Gv4iYr.cjs → vue-ui-mood-radar-BJqk2oK_.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BVpJ3O4m.js → vue-ui-mood-radar-DIDqiVMf.js} +9 -9
- package/dist/{vue-ui-nested-donuts-Dmeqsml8.js → vue-ui-nested-donuts-BkSiryoB.js} +120 -120
- package/dist/{vue-ui-nested-donuts-Cwk0M7SE.cjs → vue-ui-nested-donuts-Nggnu_iK.cjs} +2 -2
- package/dist/{vue-ui-onion-BmJO696O.cjs → vue-ui-onion-B29Cxru2.cjs} +1 -1
- package/dist/{vue-ui-onion-Ogj_rMlX.js → vue-ui-onion-xiubSG3j.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-BBBuJdGN.js → vue-ui-parallel-coordinate-plot-DjmOGHVx.js} +69 -69
- package/dist/{vue-ui-parallel-coordinate-plot-Cqm7uMBs.cjs → vue-ui-parallel-coordinate-plot-DqrkSOo6.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BJtgJ_lu.js → vue-ui-quadrant-Cc79ggIy.js} +36 -36
- package/dist/{vue-ui-quadrant-DcqQwIsD.cjs → vue-ui-quadrant-Df_2X-ca.cjs} +1 -1
- package/dist/vue-ui-quick-chart-BnBGXd4d.cjs +15 -0
- package/dist/{vue-ui-quick-chart-D7dCfDSL.js → vue-ui-quick-chart-t_cPx4OT.js} +549 -515
- package/dist/{vue-ui-radar-BMxzhMFJ.js → vue-ui-radar-C3qEonKT.js} +59 -59
- package/dist/vue-ui-radar-D3W9B9JE.cjs +1 -0
- package/dist/{vue-ui-rating-DSgHml7s.js → vue-ui-rating-DffL7w-I.js} +9 -9
- package/dist/{vue-ui-rating-buop0ul0.cjs → vue-ui-rating-aOa6zIr5.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BACMnvv8.cjs → vue-ui-relation-circle-BZ7r7Unx.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CdHbZK0u.js → vue-ui-relation-circle-D0zUfd3f.js} +5 -5
- package/dist/vue-ui-rings-BjWAtE4x.cjs +2 -0
- package/dist/{vue-ui-rings-BBnzxfo2.js → vue-ui-rings-PHbuqfoT.js} +188 -185
- package/dist/{vue-ui-scatter-sF3c5eqM.cjs → vue-ui-scatter-DMJ77QYr.cjs} +1 -1
- package/dist/{vue-ui-scatter-DYXhTzch.js → vue-ui-scatter-DuCnr2yB.js} +378 -375
- package/dist/{vue-ui-screenshot-D-6YvKkW.cjs → vue-ui-screenshot-DBuA631a.cjs} +1 -1
- package/dist/{vue-ui-screenshot-B4WOalT6.js → vue-ui-screenshot-DbwRrmHv.js} +6 -6
- package/dist/{vue-ui-skeleton-D6wHGzmu.cjs → vue-ui-skeleton-CI4t8LHn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-ClzVF3vm.js → vue-ui-skeleton-CcJR2m18.js} +23 -23
- package/dist/{vue-ui-smiley-B1cqwAN5.js → vue-ui-smiley-2rJFSSZS.js} +2 -2
- package/dist/{vue-ui-smiley-CoVnFdkD.cjs → vue-ui-smiley-C7KBm0fz.cjs} +1 -1
- package/dist/vue-ui-spark-trend-DY_sfo6o.js +251 -0
- package/dist/vue-ui-spark-trend-VH2nwGJf.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BOzSGZak.js → vue-ui-sparkbar-B0O77PcV.js} +3 -3
- package/dist/{vue-ui-sparkbar-CpIfPtyd.cjs → vue-ui-sparkbar-Bs8ZQem1.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-4hk6ZJwJ.js → vue-ui-sparkgauge-B5KqrHQZ.js} +64 -64
- package/dist/vue-ui-sparkgauge-Cd7b4u0z.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-VCAQZfgG.cjs → vue-ui-sparkhistogram-CEWCLohQ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-8degKlMU.js → vue-ui-sparkhistogram-DwRPeG7H.js} +4 -4
- package/dist/{vue-ui-sparkline-DsUwWV4z.cjs → vue-ui-sparkline-CuFtIMpq.cjs} +1 -1
- package/dist/{vue-ui-sparkline-uBkd9kR2.js → vue-ui-sparkline-W5bZnpQo.js} +25 -25
- package/dist/{vue-ui-sparkstackbar-Cpq2lHcl.js → vue-ui-sparkstackbar-9hBQZ0lZ.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DyNfMGkM.cjs → vue-ui-sparkstackbar-TyVFUMtT.cjs} +1 -1
- package/dist/{vue-ui-stackbar-lr_qudpY.js → vue-ui-stackbar-BlkgM0nD.js} +35 -35
- package/dist/{vue-ui-stackbar-jQe7BneA.cjs → vue-ui-stackbar-CwVcupxt.cjs} +1 -1
- package/dist/vue-ui-strip-plot-C1GfRjXJ.cjs +1 -0
- package/dist/{vue-ui-strip-plot-DwvlcnHB.js → vue-ui-strip-plot-CBfqkkY6.js} +76 -75
- package/dist/{vue-ui-table-Dhj4_z9d.js → vue-ui-table-B8cvvLk8.js} +1 -1
- package/dist/{vue-ui-table-D5ybohqp.cjs → vue-ui-table-CmguTt4I.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CChLZdxj.cjs → vue-ui-table-heatmap-DMnh8-b1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BY65DeiH.js → vue-ui-table-heatmap-wVWltZ2x.js} +26 -26
- package/dist/{vue-ui-table-sparkline-CvMETVJ1.js → vue-ui-table-sparkline-_POawNEL.js} +13 -13
- package/dist/{vue-ui-table-sparkline-Cmy6PcPI.cjs → vue-ui-table-sparkline-wtIFAc20.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BIN2ofrh.js → vue-ui-thermometer-CFJqd-VY.js} +116 -116
- package/dist/vue-ui-thermometer-D6SnFJb1.cjs +1 -0
- package/dist/{vue-ui-timer-DBcOT10h.cjs → vue-ui-timer-194y0LUC.cjs} +1 -1
- package/dist/{vue-ui-timer-DoSqphvk.js → vue-ui-timer-D8dgDAfe.js} +4 -4
- package/dist/vue-ui-tiremarks-BM28JsxE.cjs +1 -0
- package/dist/{vue-ui-tiremarks-DRTLsMWt.js → vue-ui-tiremarks-CH1BFqbO.js} +71 -71
- package/dist/vue-ui-treemap-BIpIg3Qa.cjs +1 -0
- package/dist/{vue-ui-treemap-D8-D_wfq.js → vue-ui-treemap-DHsoVY5n.js} +89 -82
- package/dist/{vue-ui-vertical-bar-zUaXmUpB.js → vue-ui-vertical-bar-DNODBoSo.js} +246 -242
- package/dist/vue-ui-vertical-bar-Du8ikoWM.cjs +4 -0
- package/dist/{vue-ui-waffle-CztGir7e.js → vue-ui-waffle-C8hMAeMl.js} +44 -44
- package/dist/{vue-ui-waffle-RCqpPcSF.cjs → vue-ui-waffle-_Bi9MRx8.cjs} +1 -1
- package/dist/{vue-ui-wheel-CBqL8FKG.cjs → vue-ui-wheel-BZxcRGJX.cjs} +1 -1
- package/dist/{vue-ui-wheel-BQ2a-ZyV.js → vue-ui-wheel-CmZKsfKj.js} +5 -5
- package/dist/{vue-ui-word-cloud-CKUGIGnW.js → vue-ui-word-cloud-fLf-x06l.js} +68 -65
- package/dist/vue-ui-word-cloud-nHVG2yid.cjs +1 -0
- package/dist/{vue-ui-xy-Dsa2tfKS.js → vue-ui-xy-CPln5bGQ.js} +82 -82
- package/dist/vue-ui-xy-canvas-Z1tJJV5-.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-JeNqaB_p.js → vue-ui-xy-canvas-k30CEsKi.js} +122 -121
- package/dist/vue-ui-xy-qxQy2sOl.cjs +3 -0
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-BILMRRi1.cjs +0 -1
- package/dist/vue-ui-donut-evolution-K7LUkN6q.cjs +0 -1
- package/dist/vue-ui-dumbbell-HVpK20XO.cjs +0 -9
- package/dist/vue-ui-flow-CiXnGdNb.js +0 -465
- package/dist/vue-ui-flow-ClV2yd8Y.cjs +0 -1
- package/dist/vue-ui-galaxy-CMCXCWDA.cjs +0 -1
- package/dist/vue-ui-gauge-DwCGaX1h.cjs +0 -1
- package/dist/vue-ui-heatmap-WFNo-GFX.cjs +0 -1
- package/dist/vue-ui-quick-chart-D9zFHA0L.cjs +0 -15
- package/dist/vue-ui-radar-D8ik0Fqr.cjs +0 -1
- package/dist/vue-ui-rings-Dn5opKNy.cjs +0 -2
- package/dist/vue-ui-spark-trend-DnO4DW0n.cjs +0 -1
- package/dist/vue-ui-spark-trend-HioE2zeC.js +0 -251
- package/dist/vue-ui-sparkgauge-C2_I0tyO.cjs +0 -1
- package/dist/vue-ui-strip-plot-BMKaWqD4.cjs +0 -1
- package/dist/vue-ui-thermometer-Bfp-FwRE.cjs +0 -1
- package/dist/vue-ui-tiremarks-BeBJHz2R.cjs +0 -1
- package/dist/vue-ui-treemap-DqBukSj6.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BM3aaSuB.cjs +0 -4
- package/dist/vue-ui-word-cloud-BbnU0d3E.cjs +0 -1
- package/dist/vue-ui-xy-BU0fCkSk.cjs +0 -3
- package/dist/vue-ui-xy-canvas-IaIARWWS.cjs +0 -9
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useCssVars as J, ref as h, computed as c, onMounted as K, openBlock as n, createElementBlock as l, normalizeStyle as $, normalizeClass as
|
|
2
|
-
import { u as ee, c as
|
|
3
|
-
import { u as M } from "./useNestedProp-
|
|
4
|
-
import { u as ie, U as de } from "./usePrinter-
|
|
5
|
-
import { _ as ce } from "./Shape-
|
|
1
|
+
import { useCssVars as J, ref as h, computed as c, onMounted as K, openBlock as n, createElementBlock as l, normalizeStyle as $, normalizeClass as T, createBlock as Q, unref as g, createSlots as Y, withCtx as C, renderSlot as r, normalizeProps as v, guardReactiveProps as f, createCommentVNode as p, createElementVNode as b, Fragment as _, renderList as w, createVNode as Z, mergeProps as V, nextTick as j } from "vue";
|
|
2
|
+
import { u as ee, c as z, t as te, o as ae, e as oe, U as se, E as ne, L as le, q as re, r as ue } from "./index-C_05i_JG.js";
|
|
3
|
+
import { u as M } from "./useNestedProp-DLnT0Wtg.js";
|
|
4
|
+
import { u as ie, U as de } from "./usePrinter-DOhlzlnx.js";
|
|
5
|
+
import { _ as ce } from "./Shape-HfEpP-Tk.js";
|
|
6
6
|
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell"], ge = {
|
|
8
8
|
key: 0,
|
|
@@ -35,16 +35,16 @@ const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
setup(
|
|
39
|
-
const m =
|
|
38
|
+
setup(G, { expose: S }) {
|
|
39
|
+
const m = G;
|
|
40
40
|
J((e) => ({
|
|
41
41
|
bb8dc4a0: W.value,
|
|
42
42
|
"44bd448b": X.value
|
|
43
43
|
}));
|
|
44
|
-
const { vue_ui_table_heatmap:
|
|
44
|
+
const { vue_ui_table_heatmap: U } = ee(), k = h(z()), u = h(!1), y = h(null), I = h(!1), x = h(0), t = c(() => {
|
|
45
45
|
const e = M({
|
|
46
46
|
userConfig: m.config,
|
|
47
|
-
defaultConfig:
|
|
47
|
+
defaultConfig: U
|
|
48
48
|
});
|
|
49
49
|
return e.theme ? {
|
|
50
50
|
...M({
|
|
@@ -52,10 +52,10 @@ const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell
|
|
|
52
52
|
defaultConfig: e
|
|
53
53
|
})
|
|
54
54
|
} : e;
|
|
55
|
-
}), { isPrinting:
|
|
55
|
+
}), { isPrinting: B, isImaging: A, generatePdf: F, generateImage: P } = ie({
|
|
56
56
|
elementId: `table_heatmap_${k.value}`,
|
|
57
57
|
fileName: "vue-ui-table-heatmap"
|
|
58
|
-
}),
|
|
58
|
+
}), D = c(() => t.value.table.responsiveBreakpoint), L = c(() => !!m.dataset && m.dataset.length);
|
|
59
59
|
K(() => {
|
|
60
60
|
ae(m.dataset) && oe({
|
|
61
61
|
componentName: "VueUiTableHeatmap",
|
|
@@ -63,7 +63,7 @@ const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell
|
|
|
63
63
|
});
|
|
64
64
|
const e = new ResizeObserver((s) => {
|
|
65
65
|
s.forEach((a) => {
|
|
66
|
-
u.value = a.contentRect.width <
|
|
66
|
+
u.value = a.contentRect.width < D.value;
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
y.value && e.observe(y.value);
|
|
@@ -81,7 +81,7 @@ const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell
|
|
|
81
81
|
average: a / s.length,
|
|
82
82
|
median: se(s),
|
|
83
83
|
displayValues: [e.name, ...e.values],
|
|
84
|
-
id:
|
|
84
|
+
id: z()
|
|
85
85
|
};
|
|
86
86
|
})), O = c(() => {
|
|
87
87
|
const e = N.value.flatMap((s) => s.values);
|
|
@@ -90,15 +90,15 @@ const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell
|
|
|
90
90
|
max: Math.max(...e)
|
|
91
91
|
};
|
|
92
92
|
});
|
|
93
|
-
function
|
|
93
|
+
function H(e, s) {
|
|
94
94
|
const a = t.value.style.heatmapColors.useIndividualScale;
|
|
95
95
|
return le(t.value.style.heatmapColors.min, t.value.style.heatmapColors.max, a ? s.min : O.value.min, a ? s.max : O.value.max, e);
|
|
96
96
|
}
|
|
97
97
|
const R = c(() => N.value.map((e) => ({
|
|
98
98
|
...e,
|
|
99
|
-
colors: e.displayValues.map((s) => isNaN(s) ? t.value.style.backgroundColor :
|
|
99
|
+
colors: e.displayValues.map((s) => isNaN(s) ? t.value.style.backgroundColor : H(s, e.serieExtremes))
|
|
100
100
|
}))), X = c(() => t.value.style.backgroundColor), W = c(() => `${t.value.table.borderWidth}px`);
|
|
101
|
-
function
|
|
101
|
+
function E() {
|
|
102
102
|
j(() => {
|
|
103
103
|
const e = R.value.map((o) => [
|
|
104
104
|
[o.name],
|
|
@@ -113,24 +113,24 @@ const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell
|
|
|
113
113
|
function q(e) {
|
|
114
114
|
I.value = e, x.value += 1;
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return S({
|
|
117
117
|
generatePdf: F,
|
|
118
|
-
generateCsv:
|
|
118
|
+
generateCsv: E,
|
|
119
119
|
generateImage: P
|
|
120
120
|
}), (e, s) => (n(), l("div", {
|
|
121
121
|
ref_key: "tableContainer",
|
|
122
122
|
ref: y,
|
|
123
123
|
style: $(`width:100%; overflow-x:auto; container-type: inline-size;padding-top:${t.value.userOptions.show ? "36px" : ""}; ${I.value ? "vue-data-ui-wrapper-fullscreen" : ""}; position:relative;`),
|
|
124
|
-
class:
|
|
124
|
+
class: T({ "vue-ui-responsive": u.value }),
|
|
125
125
|
id: `table_heatmap_${k.value}`
|
|
126
126
|
}, [
|
|
127
|
-
t.value.userOptions.show &&
|
|
127
|
+
t.value.userOptions.show && L.value ? (n(), Q(de, {
|
|
128
128
|
ref: "details",
|
|
129
129
|
key: `user_option_${x.value}`,
|
|
130
130
|
backgroundColor: t.value.style.backgroundColor,
|
|
131
131
|
color: t.value.style.color,
|
|
132
|
-
isPrinting: g(
|
|
133
|
-
isImaging: g(
|
|
132
|
+
isPrinting: g(B),
|
|
133
|
+
isImaging: g(A),
|
|
134
134
|
uid: k.value,
|
|
135
135
|
hasPdf: t.value.userOptions.buttons.pdf,
|
|
136
136
|
hasXls: t.value.userOptions.buttons.csv,
|
|
@@ -141,7 +141,7 @@ const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell
|
|
|
141
141
|
chartElement: y.value,
|
|
142
142
|
onToggleFullscreen: q,
|
|
143
143
|
onGeneratePdf: g(F),
|
|
144
|
-
onGenerateCsv:
|
|
144
|
+
onGenerateCsv: E,
|
|
145
145
|
onGenerateImage: g(P)
|
|
146
146
|
}, Y({ _: 2 }, [
|
|
147
147
|
e.$slots.optionPdf ? {
|
|
@@ -174,7 +174,7 @@ const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell
|
|
|
174
174
|
} : void 0
|
|
175
175
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : p("", !0),
|
|
176
176
|
b("table", {
|
|
177
|
-
class:
|
|
177
|
+
class: T({ "vue-ui-table-heatmap": !0 }),
|
|
178
178
|
style: $(`width:100%;font-family:${t.value.style.fontFamily};background:${t.value.style.backgroundColor};`)
|
|
179
179
|
}, [
|
|
180
180
|
b("caption", null, [
|
|
@@ -213,8 +213,8 @@ const pe = ["id"], me = { role: "cell" }, fe = { role: "row" }, he = ["data-cell
|
|
|
213
213
|
], 8, be)) : p("", !0),
|
|
214
214
|
r(e.$slots, "rowTitle", v(f({ value: d, rowIndex: o, colIndex: i, type: typeof d, isResponsive: u.value })), void 0, !0)
|
|
215
215
|
])) : (n(), l(_, { key: 1 }, [
|
|
216
|
-
i === 0 ? r(e.$slots, "rowTitle", v(
|
|
217
|
-
i > 0 ? r(e.$slots, "cell", v(
|
|
216
|
+
i === 0 ? r(e.$slots, "rowTitle", v(V({ key: 0 }, { value: d, rowIndex: o, colIndex: i, type: typeof d, isResponsive: u.value })), void 0, !0) : p("", !0),
|
|
217
|
+
i > 0 ? r(e.$slots, "cell", v(V({ key: 1 }, { value: d, rowIndex: o, colIndex: i, type: typeof d, isResponsive: u.value, color: a.colors[i], textColor: g(ne)(a.colors[i]) })), void 0, !0) : p("", !0)
|
|
218
218
|
], 64))
|
|
219
219
|
], 8, he))), 256)),
|
|
220
220
|
t.value.table.showSum ? (n(), l("td", ye, [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCssVars as re, ref as d, computed as b, onMounted as ie, openBlock as u, createElementBlock as v, normalizeClass as W, createElementVNode as c, normalizeStyle as r, toDisplayString as p, createCommentVNode as g, Fragment as D, renderList as T, createBlock as M, unref as i, createSlots as de, withCtx as S, renderSlot as A, normalizeProps as ve, guardReactiveProps as ce, nextTick as fe } from "vue";
|
|
2
|
-
import { u as pe, c as me, t as be, a as ge, p as w, b as he, o as ye, e as J, g as _e, d as ke,
|
|
3
|
-
import { u as K } from "./useNestedProp-
|
|
4
|
-
import Se from "./vue-ui-sparkline-
|
|
5
|
-
import Ae from "./BaseIcon-
|
|
6
|
-
import { u as we, U as $e } from "./usePrinter-
|
|
2
|
+
import { u as pe, c as me, t as be, a as ge, p as w, b as he, o as ye, e as J, g as _e, d as ke, U as xe, i as $, f as P, q as Ce, r as Ie } from "./index-C_05i_JG.js";
|
|
3
|
+
import { u as K } from "./useNestedProp-DLnT0Wtg.js";
|
|
4
|
+
import Se from "./vue-ui-sparkline-W5bZnpQo.js";
|
|
5
|
+
import Ae from "./BaseIcon-CS18qRiy.js";
|
|
6
|
+
import { u as we, U as $e } from "./usePrinter-DOhlzlnx.js";
|
|
7
7
|
import { _ as Pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const ze = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } }, Oe = ["onClick"], Ne = { style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center" } }, We = ["data-cell"], De = {
|
|
9
9
|
dir: "auto",
|
|
@@ -41,10 +41,10 @@ const ze = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
41
41
|
}),
|
|
42
42
|
customPalette: ge[t.theme] || w
|
|
43
43
|
} : t;
|
|
44
|
-
}), { isPrinting: G, isImaging: L, generatePdf:
|
|
44
|
+
}), { isPrinting: G, isImaging: L, generatePdf: U, generateImage: B } = we({
|
|
45
45
|
elementId: `table_${z.value}`,
|
|
46
46
|
fileName: e.value.title.text || "vue-ui-table-sparkline"
|
|
47
|
-
}), j = b(() => he(e.value.customPalette)), x = d(null),
|
|
47
|
+
}), j = b(() => he(e.value.customPalette)), x = d(null), R = d(!1), ee = b(() => e.value.responsiveBreakpoint);
|
|
48
48
|
ie(() => {
|
|
49
49
|
ye(y.dataset) && J({
|
|
50
50
|
componentName: "VueUiTableSparkline",
|
|
@@ -52,7 +52,7 @@ const ze = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
52
52
|
});
|
|
53
53
|
const t = new ResizeObserver((s) => {
|
|
54
54
|
s.forEach((a) => {
|
|
55
|
-
|
|
55
|
+
R.value = a.contentRect.width < ee.value;
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
x.value && t.observe(x.value);
|
|
@@ -143,14 +143,14 @@ const ze = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
145
|
return Y({
|
|
146
|
-
generatePdf:
|
|
147
|
-
generateImage:
|
|
146
|
+
generatePdf: U,
|
|
147
|
+
generateImage: B,
|
|
148
148
|
generateCsv: X,
|
|
149
149
|
restoreOrder: le
|
|
150
150
|
}), (t, s) => (u(), v("div", {
|
|
151
151
|
ref_key: "tableContainer",
|
|
152
152
|
ref: x,
|
|
153
|
-
class: W({ "vue-ui-responsive":
|
|
153
|
+
class: W({ "vue-ui-responsive": R.value }),
|
|
154
154
|
style: { overflow: "hidden" },
|
|
155
155
|
id: `table_${z.value}`
|
|
156
156
|
}, [
|
|
@@ -244,8 +244,8 @@ const ze = ["id"], Fe = { style: { "z-index": "1", "padding-right": "24px" } },
|
|
|
244
244
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
245
245
|
chartElement: x.value,
|
|
246
246
|
onToggleFullscreen: ue,
|
|
247
|
-
onGeneratePdf: i(
|
|
248
|
-
onGenerateImage: i(
|
|
247
|
+
onGeneratePdf: i(U),
|
|
248
|
+
onGenerateImage: i(B),
|
|
249
249
|
onGenerateCsv: X
|
|
250
250
|
}, de({ _: 2 }, [
|
|
251
251
|
t.$slots.optionPdf ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-nPEJmXmf.cjs"),V=require("./useNestedProp-TbnnNrH2.cjs"),H=require("./vue-ui-sparkline-DsUwWV4z.cjs"),X=require("./BaseIcon-aPcCSO_Z.cjs"),P=require("./usePrinter-D012Olnq.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q={style:{"z-index":"1","padding-right":"24px"}},Y=["onClick"],Z={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},j=["data-cell"],ee={dir:"auto",style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},te=["data-cell","onPointerenter"],le=["data-cell"],ae=["data-cell"],oe=["data-cell"],ne=["data-cell"],re={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup($,{expose:D}){const v=$;e.useCssVars(l=>({"328044aa":l.tdo}));const{vue_ui_table_sparkline:F}=u.useConfig(),y=e.ref(u.createUid()),x=e.ref(0),S=e.ref(0),t=e.computed(()=>{const l=V.useNestedProp({userConfig:v.config,defaultConfig:F});return l.theme?{...V.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||v.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}),{isPrinting:C,isImaging:z,generatePdf:I,generateImage:N}=P.usePrinter({elementId:`table_${y.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),O=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref(null),w=e.ref(!1),W=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{u.objectIsEmpty(v.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(s=>{s.forEach(a=>{w.value=a.contentRect.width<W.value})});f.value&&l.observe(f.value)});const B=e.computed(()=>(v.dataset.forEach((l,s)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:s})})}),v.dataset.map((l,s)=>{const a=(l.values||[]).map(r=>isNaN(r)?0:r??0),n=a.reduce((r,o)=>r+o,0);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||O.value[s]||u.palette[s]||u.palette[s%u.palette.length],sum:n,average:n/a.length,median:u.calcMedian(a),sparklineDataset:a.map((r,o)=>({period:t.value.colNames[o]||`col ${o}`,value:r||0}))}})));function L(l){const a=(l[0].values||[]).map((r,o)=>l.map(i=>i.values[o]||[])).map(r=>r.map((o,i)=>[o,i]).sort((o,i)=>i[0]-o[0]).map(o=>o[1]));return l.map((r,o)=>({...r,values:r.values||[],orders:a[o]}))}const m=e.computed(()=>L(B.value)),b=e.ref(m.value),T=e.computed(()=>Math.max(...b.value.map(l=>(l.values||[]).length))),g=e.ref(void 0),k=e.ref(!1),h=e.ref(void 0),_=e.ref(-1);function M(){k.value=!1,h.value=void 0,_.value=-1,b.value=m.value}function G(l){k.value=!0,h.value=l;const s=m.value.map(o=>o.values[l]||[]),a=g.value===l?1:-1;_.value=a,l===g.value?g.value=void 0:g.value=l;const r=s.map((o,i)=>[i,o]).sort((o,i)=>a*(i[1]-o[1])).map(o=>o[0]).map(o=>m.value[o]);b.value=r,S.value+=1}const q=e.computed(()=>Math.max(...v.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let a=0;a<q.value;a+=1)l.push(`col ${a+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let s;return t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?s=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.median]:s=l,t.value.showSparklines?[...s,t.value.translations.chart]:s}),d=e.ref(void 0),c=e.ref(void 0);function R({dataIndex:l,serieIndex:s}){d.value=l,c.value=s}const A=e.ref(!1);function U(l){A.value=l,x.value+=1}function E(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),s=B.value.map((r,o)=>[[r.name],r.values,[r.sum],[r.average],[r.median]]),a=[l].concat(s),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}return D({generatePdf:I,generateImage:N,generateCsv:E,restoreOrder:M}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:f,class:e.normalizeClass({"vue-ui-responsive":w.value}),style:{overflow:"hidden"},id:`table_${y.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:s[0]||(s[0]=a=>{c.value=void 0,d.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",Q,[e.createElementVNode("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,outline: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,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===p.value.length-1?"150px":"",cursor:m.value[0].values[n]!==void 0?"pointer":"default"}),onClick:()=>G(n),class:e.normalizeClass({"sticky-col":n===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(a),1),k.value&&n===h.value&&m.value[0].values[n]!==void 0?(e.openBlock(),e.createBlock(X.default,{key:0,size:18,name:_.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&n===p.value.length-1?(e.openBlock(),e.createBlock(P.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${x.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(C),isImaging:e.unref(z),uid:y.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:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,onToggleFullscreen:U,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(N),onGenerateCsv:E},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:r,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,Y))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(a,n)=>(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":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline: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",ee,[e.createElementVNode("span",{style:e.normalizeStyle({color:a.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)])],12,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(r,o)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:d.value!==void 0&&c.value!==void 0&&o===d.value&&c.value===n?`${a.color}33`:"",borderRadius:d.value!==void 0&&c.value!==void 0&&o===d.value&&c.value===n?"3px":""}),"data-cell":p.value[o],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{c.value=n,d.value=o}},e.toDisplayString([null,void 0].includes(a.values[o])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[o]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[o]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:o})),45,te))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({outline: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(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,le)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({outline: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(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,ae)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({outline: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(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,oe)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(H.default,{key:`sparkline_${n}_${S.value}`,onHoverIndex:({index:r})=>R({dataIndex:r,serieIndex:n}),dataset:a.sparklineDataset,showInfo:!1,selectedIndex:d.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(C)&&!e.unref(z),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","dataset","selectedIndex","config"]))],12,ne)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,K))}},ue=J._export_sfc(re,[["__scopeId","data-v-d3c784ed"]]);exports.default=ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-NNZeHOBS.cjs"),V=require("./useNestedProp-CPsbJAGj.cjs"),H=require("./vue-ui-sparkline-CuFtIMpq.cjs"),X=require("./BaseIcon-O8jJvy48.cjs"),P=require("./usePrinter-BLbY8qGZ.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Q={style:{"z-index":"1","padding-right":"24px"}},Y=["onClick"],Z={style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center"}},j=["data-cell"],ee={dir:"auto",style:{display:"flex","flex-direction":"row","align-items":"center",gap:"6px"}},te=["data-cell","onPointerenter"],le=["data-cell"],ae=["data-cell"],oe=["data-cell"],ne=["data-cell"],re={__name:"vue-ui-table-sparkline",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup($,{expose:D}){const v=$;e.useCssVars(l=>({"328044aa":l.tdo}));const{vue_ui_table_sparkline:F}=u.useConfig(),y=e.ref(u.createUid()),x=e.ref(0),S=e.ref(0),t=e.computed(()=>{const l=V.useNestedProp({userConfig:v.config,defaultConfig:F});return l.theme?{...V.useNestedProp({userConfig:u.themes.vue_ui_table_sparkline[l.theme]||v.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}),{isPrinting:C,isImaging:z,generatePdf:I,generateImage:N}=P.usePrinter({elementId:`table_${y.value}`,fileName:t.value.title.text||"vue-ui-table-sparkline"}),O=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref(null),w=e.ref(!1),W=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{u.objectIsEmpty(v.dataset)&&u.error({componentName:"VueUiTableSparkline",type:"dataset"});const l=new ResizeObserver(s=>{s.forEach(a=>{w.value=a.contentRect.width<W.value})});f.value&&l.observe(f.value)});const B=e.computed(()=>(v.dataset.forEach((l,s)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiTableSparkline",type:"datasetSerieAttribute",property:a,index:s})})}),v.dataset.map((l,s)=>{const a=(l.values||[]).map(r=>isNaN(r)?0:r??0),n=a.reduce((r,o)=>r+o,0);return{...l,values:l.values||[],color:u.convertColorToHex(l.color)||O.value[s]||u.palette[s]||u.palette[s%u.palette.length],sum:n,average:n/a.length,median:u.calcMedian(a),sparklineDataset:a.map((r,o)=>({period:t.value.colNames[o]||`col ${o}`,value:r||0}))}})));function L(l){const a=(l[0].values||[]).map((r,o)=>l.map(i=>i.values[o]||[])).map(r=>r.map((o,i)=>[o,i]).sort((o,i)=>i[0]-o[0]).map(o=>o[1]));return l.map((r,o)=>({...r,values:r.values||[],orders:a[o]}))}const m=e.computed(()=>L(B.value)),b=e.ref(m.value),T=e.computed(()=>Math.max(...b.value.map(l=>(l.values||[]).length))),g=e.ref(void 0),k=e.ref(!1),h=e.ref(void 0),_=e.ref(-1);function M(){k.value=!1,h.value=void 0,_.value=-1,b.value=m.value}function G(l){k.value=!0,h.value=l;const s=m.value.map(o=>o.values[l]||[]),a=g.value===l?1:-1;_.value=a,l===g.value?g.value=void 0:g.value=l;const r=s.map((o,i)=>[i,o]).sort((o,i)=>a*(i[1]-o[1])).map(o=>o[0]).map(o=>m.value[o]);b.value=r,S.value+=1}const q=e.computed(()=>Math.max(...v.dataset.map(l=>(l.values||[]).length))),p=e.computed(()=>{let l=t.value.colNames;if(!l.length)for(let a=0;a<q.value;a+=1)l.push(`col ${a+1}`);t.value.showTotal&&(l=[...l,t.value.translations.total]);let s;return t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.average,t.value.translations.median]:t.value.showAverage&&!t.value.showMedian?s=[...l,t.value.translations.average]:!t.value.showAverage&&t.value.showMedian?s=[...l,t.value.translations.median]:s=l,t.value.showSparklines?[...s,t.value.translations.chart]:s}),d=e.ref(void 0),c=e.ref(void 0);function R({dataIndex:l,serieIndex:s}){d.value=l,c.value=s}const A=e.ref(!1);function U(l){A.value=l,x.value+=1}function E(){e.nextTick(()=>{const l=[t.value.translations.serie].concat(p.value),s=B.value.map((r,o)=>[[r.name],r.values,[r.sum],[r.average],[r.median]]),a=[l].concat(s),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.title.text||"vue-ui-table-sparkline"})})}return D({generatePdf:I,generateImage:N,generateCsv:E,restoreOrder:M}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:f,class:e.normalizeClass({"vue-ui-responsive":w.value}),style:{overflow:"hidden"},id:`table_${y.value}`},[e.createElementVNode("div",{style:{overflow:"auto"},onPointerleave:s[0]||(s[0]=a=>{c.value=void 0,d.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",Q,[e.createElementVNode("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,outline: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,n)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({background:t.value.thead.backgroundColor,outline:t.value.thead.outline,textAlign:t.value.thead.textAlign,fontWeight:t.value.thead.bold?"bold":"normal",minWidth:n===p.value.length-1?"150px":"",cursor:m.value[0].values[n]!==void 0?"pointer":"default"}),onClick:()=>G(n),class:e.normalizeClass({"sticky-col":n===p.value.length-1&&t.value.showSparklines})},[e.createElementVNode("div",Z,[e.createElementVNode("span",null,e.toDisplayString(a),1),k.value&&n===h.value&&m.value[0].values[n]!==void 0?(e.openBlock(),e.createBlock(X.default,{key:0,size:18,name:_.value===1?"sort":"sortReverse",stroke:t.value.thead.color},null,8,["name","stroke"])):e.createCommentVNode("",!0)]),t.value.userOptions.show&&n===p.value.length-1?(e.openBlock(),e.createBlock(P.UserOptions,{ref_for:!0,ref:"details",key:`user_option_${x.value}`,backgroundColor:t.value.thead.backgroundColor,color:t.value.thead.color,isPrinting:e.unref(C),isImaging:e.unref(z),uid:y.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:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,onToggleFullscreen:U,onGeneratePdf:e.unref(I),onGenerateImage:e.unref(N),onGenerateCsv:E},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:r,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0)],14,Y))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(a,n)=>(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":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0})},[e.createElementVNode("td",{role:"cell",style:e.normalizeStyle({backgroundColor:t.value.tbody.backgroundColor,outline: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",ee,[e.createElementVNode("span",{style:e.normalizeStyle({color:a.color})},"⬤",4),e.createElementVNode("span",null,e.toDisplayString(a.name??"-"),1)])],12,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(r,o)=>(e.openBlock(),e.createElementBlock("td",{dir:"auto",role:"cell",style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign,backgroundColor:d.value!==void 0&&c.value!==void 0&&o===d.value&&c.value===n?`${a.color}33`:"",borderRadius:d.value!==void 0&&c.value!==void 0&&o===d.value&&c.value===n?"3px":""}),"data-cell":p.value[o],class:"vue-ui-data-table__tbody__td",onPointerenter:i=>{c.value=n,d.value=o}},e.toDisplayString([null,void 0].includes(a.values[o])?"-":e.unref(u.applyDataLabel)(t.value.formatter,Number(a.values[o]),e.unref(u.dataLabel)({p:t.value.prefix,v:Number(a.values[o]),s:t.value.suffix,r:t.value.roundingValues}),{datapoint:a,seriesIndex:n,datapointIndex:o})),45,te))),256)),t.value.showTotal?(e.openBlock(),e.createElementBlock("td",{key:0,dir:"auto",role:"cell",style:e.normalizeStyle({outline: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(u.applyDataLabel)(t.value.formatter,a.sum,e.unref(u.dataLabel)({p:t.value.prefix,v:a.sum,s:t.value.suffix,r:t.value.roundingTotal}),{datapoint:a.sum,seriesIndex:n})),13,le)):e.createCommentVNode("",!0),t.value.showAverage?(e.openBlock(),e.createElementBlock("td",{key:1,dir:"auto",role:"cell",style:e.normalizeStyle({outline: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(u.applyDataLabel)(t.value.formatter,a.average,e.unref(u.dataLabel)({p:t.value.prefix,v:a.average,s:t.value.suffix,r:t.value.roundingAverage}),{datapoint:a.average,seriesIndex:n})),13,ae)):e.createCommentVNode("",!0),t.value.showMedian?(e.openBlock(),e.createElementBlock("td",{key:2,dir:"auto",role:"cell",style:e.normalizeStyle({outline: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(u.applyDataLabel)(t.value.formatter,a.median,e.unref(u.dataLabel)({p:t.value.prefix,v:a.median,s:t.value.suffix,r:t.value.roundingMedian}),{datapoint:a.median,seriesIndex:n})),13,oe)):e.createCommentVNode("",!0),t.value.showSparklines?(e.openBlock(),e.createElementBlock("td",{key:3,role:"cell","data-cell":t.value.translations.chart,style:e.normalizeStyle({outline:t.value.tbody.outline,fontSize:`${t.value.tbody.fontSize}px`,fontWeight:t.value.tbody.bold?"bold":"normal",textAlign:t.value.tbody.textAlign}),class:"vue-ui-data-table__tbody__td sticky-col"},[(e.openBlock(),e.createBlock(H.default,{key:`sparkline_${n}_${S.value}`,onHoverIndex:({index:r})=>R({dataIndex:r,serieIndex:n}),dataset:a.sparklineDataset,showInfo:!1,selectedIndex:d.value,config:{type:t.value.sparkline.type,style:{backgroundColor:t.value.tbody.backgroundColor,animation:{show:t.value.sparkline.animation.show&&!e.unref(C)&&!e.unref(z),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","dataset","selectedIndex","config"]))],12,ne)):e.createCommentVNode("",!0)],6))),256))])],4)],32)],10,K))}},ue=J._export_sfc(re,[["__scopeId","data-v-d3c784ed"]]);exports.default=ue;
|