vue-data-ui 2.3.3 → 2.3.4
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-B6gJebT9.js +101 -0
- package/dist/Arrow-C5yj6zwY.cjs +1 -0
- package/dist/BaseIcon-7_g11dRj.js +174 -0
- package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
- package/dist/DataTable-CwaOlAsy.js +127 -0
- package/dist/DataTable-Rm9II-m2.cjs +1 -0
- package/dist/Legend-CxvJTjEm.js +62 -0
- package/dist/Legend-D59FIuMs.cjs +1 -0
- package/dist/Shape-CVItL3vh.cjs +1 -0
- package/dist/Shape-CjLV0scA.js +107 -0
- package/dist/Slicer-Bxg5niHl.js +156 -0
- package/dist/Slicer-Cdss5Rus.cjs +1 -0
- package/dist/Title-2iks1ziC.js +46 -0
- package/dist/Title-Bb-A5OSV.cjs +1 -0
- package/dist/Tooltip-C3phqKuU.js +94 -0
- package/dist/Tooltip-C_UE6y-E.cjs +1 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-p5gfZSvB.cjs +4 -0
- package/dist/index-uOtklCCx.js +10268 -0
- package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
- package/dist/jspdf.es.min-C660YX78.js +8038 -0
- package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
- package/dist/pdf-97UbtKC2.js +44 -0
- package/dist/pdf-Cz3729tZ.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useNestedProp-2kIU-7On.cjs +1 -0
- package/dist/useNestedProp-BgWkUab_.js +13 -0
- package/dist/usePrinter-B6xQCyL-.js +464 -0
- package/dist/usePrinter-fZlsJid8.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
- package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +62 -61
- package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
- package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
- package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
- package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
- package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
- package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
- package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
- package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
- package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
- package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
- package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
- package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
- package/dist/vue-ui-cursor-C96IChA3.js +229 -0
- package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
- package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
- package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
- package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
- package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
- package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
- package/dist/vue-ui-donut-B9iXisHK.js +743 -0
- package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
- package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
- package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
- package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
- package/dist/vue-ui-flow-BTivYoGd.js +454 -0
- package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
- package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
- package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
- package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
- package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
- package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
- package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
- package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
- package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
- package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
- package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
- package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
- package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
- package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
- package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
- package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
- package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
- package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
- package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
- package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
- package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
- package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
- package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
- package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
- package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
- package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
- package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
- package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
- package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
- package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
- package/dist/vue-ui-rings-CsUngX_F.js +510 -0
- package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
- package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
- package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
- package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
- package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
- package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
- package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
- package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
- package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
- package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
- package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
- package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
- package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
- package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
- package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
- package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
- package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
- package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
- package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
- package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
- package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
- package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
- package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
- package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
- package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
- package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
- package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
- package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
- package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
- package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
- package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
- package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
- package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
- package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
- package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
- package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
- package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
- package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
- package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
- package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
- package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
- package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
- package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
- package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
- package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
- package/package.json +1 -1
- package/dist/index-BcMihqI4.cjs +0 -843
- package/dist/index-C7FeCQ7K.js +0 -57303
|
@@ -0,0 +1,1430 @@
|
|
|
1
|
+
import { p as D, u as x, x as G, m as M, d as T, y as E, n as z, q as B, R as H } from "./index-uOtklCCx.js";
|
|
2
|
+
import { openBlock as i, createElementBlock as c, normalizeStyle as g, createElementVNode as a, toDisplayString as u, Fragment as b, renderList as _, normalizeClass as f, createTextVNode as I, createCommentVNode as N, withDirectives as k, vModelText as w, withKeys as S, withModifiers as O, vModelSelect as R, createStaticVNode as P, pushScopeId as U, popScopeId as V } from "vue";
|
|
3
|
+
import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const X = {
|
|
5
|
+
name: "vue-ui-table",
|
|
6
|
+
props: {
|
|
7
|
+
config: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default() {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
dataset: {
|
|
14
|
+
type: Object,
|
|
15
|
+
default() {
|
|
16
|
+
return {};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
data() {
|
|
21
|
+
return {
|
|
22
|
+
uid: `vue-ui-table-${Math.random()}`,
|
|
23
|
+
bodyCopy: JSON.parse(JSON.stringify(this.dataset.body)).map((r, l) => ({
|
|
24
|
+
...r,
|
|
25
|
+
absoluteIndex: l
|
|
26
|
+
})),
|
|
27
|
+
buttonTimeout: null,
|
|
28
|
+
canMoveChart: !1,
|
|
29
|
+
chart: {
|
|
30
|
+
height: 316,
|
|
31
|
+
type: "bar",
|
|
32
|
+
width: 512
|
|
33
|
+
},
|
|
34
|
+
constants: {
|
|
35
|
+
ASC: 1,
|
|
36
|
+
BAR: "bar",
|
|
37
|
+
DATE: "date",
|
|
38
|
+
DESC: -1,
|
|
39
|
+
DONUT: "donut",
|
|
40
|
+
LINE: "line",
|
|
41
|
+
NUMERIC: "numeric",
|
|
42
|
+
PERCENTAGE: "percentage",
|
|
43
|
+
TEXT: "text"
|
|
44
|
+
},
|
|
45
|
+
clientX: 100,
|
|
46
|
+
clientY: 100,
|
|
47
|
+
cssClass: {
|
|
48
|
+
CELL: "smart-td-selected",
|
|
49
|
+
FIRST_TD: "smart-td-selected-first",
|
|
50
|
+
LAST_TD: "smart-td-selected-last",
|
|
51
|
+
ROW: "smart-td-selected-neighbor"
|
|
52
|
+
},
|
|
53
|
+
currentDonut: void 0,
|
|
54
|
+
currentFilter: void 0,
|
|
55
|
+
currentSearch: void 0,
|
|
56
|
+
currentSelectionSpan: {
|
|
57
|
+
col: void 0,
|
|
58
|
+
rows: []
|
|
59
|
+
},
|
|
60
|
+
currentPage: 0,
|
|
61
|
+
dates: {},
|
|
62
|
+
filteredDatesIndexes: {},
|
|
63
|
+
hasNaN: {},
|
|
64
|
+
iconColor: "#2D353C",
|
|
65
|
+
iconSize: 20,
|
|
66
|
+
immutableRangeFilters: {},
|
|
67
|
+
isExportRequest: !1,
|
|
68
|
+
isLoading: !1,
|
|
69
|
+
itemsPerPage: this.config.rowsPerPage ? this.config.rowsPerPage : 25,
|
|
70
|
+
multiselects: {},
|
|
71
|
+
paginatorOptions: [.../* @__PURE__ */ new Set([10, 25, 50, 100, 250, 500, this.config.rowsPerPage ? this.config.rowsPerPage : 25, this.dataset.body.length])].sort((r, l) => r - l),
|
|
72
|
+
palette: D,
|
|
73
|
+
percentages: {},
|
|
74
|
+
rafId: null,
|
|
75
|
+
rangeFilters: {},
|
|
76
|
+
searches: {},
|
|
77
|
+
selectedColumn: void 0,
|
|
78
|
+
selectedDonutCategory: void 0,
|
|
79
|
+
selectedPlot: void 0,
|
|
80
|
+
showChart: !1,
|
|
81
|
+
showDonutOptions: !1,
|
|
82
|
+
sorts: {},
|
|
83
|
+
tableBody: JSON.parse(JSON.stringify(this.dataset.body)).map((r, l) => ({
|
|
84
|
+
...r,
|
|
85
|
+
absoluteIndex: l
|
|
86
|
+
})),
|
|
87
|
+
tableHead: JSON.parse(JSON.stringify(this.dataset.header)).map((r) => ({
|
|
88
|
+
average: Object.hasOwn(r, "average") ? r.average : !1,
|
|
89
|
+
decimals: Object.hasOwn(r, "decimals") ? r.decimals : 0,
|
|
90
|
+
isMultiselect: Object.hasOwn(r, "isMultiselect") ? r.isMultiselect : !1,
|
|
91
|
+
isPercentage: Object.hasOwn(r, "isPercentage") ? r.isPercentage : !1,
|
|
92
|
+
isSearch: Object.hasOwn(r, "isSearch") ? r.isSearch : !1,
|
|
93
|
+
isSort: Object.hasOwn(r, "isSort") ? r.isSort : !1,
|
|
94
|
+
name: r.name,
|
|
95
|
+
// this attribute is mandatory
|
|
96
|
+
percentageTo: Object.hasOwn(r, "percentageTo") ? r.percentageTo : void 0,
|
|
97
|
+
prefix: Object.hasOwn(r, "prefix") ? r.prefix : "",
|
|
98
|
+
rangeFilter: Object.hasOwn(r, "rangeFilter") ? r.rangeFilter : !1,
|
|
99
|
+
suffix: Object.hasOwn(r, "suffix") ? r.suffix : "",
|
|
100
|
+
sum: Object.hasOwn(r, "sum") ? r.sum : !1,
|
|
101
|
+
type: r.type
|
|
102
|
+
// this attribute is mandatory
|
|
103
|
+
}))
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
mounted() {
|
|
107
|
+
if (this.dataset.header.length === 0)
|
|
108
|
+
throw new Error(`vue-ui-table error: missing header data.
|
|
109
|
+
Provide an array of objects of type:
|
|
110
|
+
{
|
|
111
|
+
name: string;
|
|
112
|
+
type: string; ('text' | 'numeric' | 'date')
|
|
113
|
+
average: boolean;
|
|
114
|
+
decimals: number | undefined;
|
|
115
|
+
sum: boolean;
|
|
116
|
+
isSort:boolean;
|
|
117
|
+
isSearch: boolean;
|
|
118
|
+
isMultiselect: boolean;
|
|
119
|
+
isPercentage: boolean;
|
|
120
|
+
percentageTo: string; (or '')
|
|
121
|
+
}`);
|
|
122
|
+
if (this.dataset.body.length === 0)
|
|
123
|
+
throw new Error("vue-ui-table error: missing body data");
|
|
124
|
+
this.isLoading = !0, this.promiseWithAsyncFunction(this.prepareBodyCopy, () => {
|
|
125
|
+
this.$forceUpdate(), this.isLoading = !1;
|
|
126
|
+
}), document.addEventListener("keydown", (s) => {
|
|
127
|
+
const r = document.activeElement;
|
|
128
|
+
(r && Array.from(r.classList).includes("td-focusable") && s.key.includes("Arrow") || s.code === "Space") && s.preventDefault();
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
watch: {
|
|
132
|
+
showChart: function(s) {
|
|
133
|
+
s && this.$nextTick(() => {
|
|
134
|
+
this.closeDragElement();
|
|
135
|
+
const r = this.$refs.chartModal;
|
|
136
|
+
r.onmousedown = this.dragMouseDown;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
computed: {
|
|
141
|
+
availableDonutCategories() {
|
|
142
|
+
return Object.keys(this.multiselects).map((s) => ({
|
|
143
|
+
index: s,
|
|
144
|
+
name: this.dataset.header[s].name,
|
|
145
|
+
options: this.multiselects[s]
|
|
146
|
+
}));
|
|
147
|
+
},
|
|
148
|
+
canChart() {
|
|
149
|
+
return this.FINAL_CONFIG.useChart && this.currentSelectionSpan.rows.length > 1;
|
|
150
|
+
},
|
|
151
|
+
chartData() {
|
|
152
|
+
if (!this.canChart) return [];
|
|
153
|
+
const s = 316, r = 512, l = this.currentSelectionSpan.rows.length, h = r / l, t = Math.max(...this.currentSelectionSpan.rows.map((C) => C.value)), e = Math.min(...this.currentSelectionSpan.rows.map((C) => C.value)), n = e >= 0 ? 0 : Math.abs(e), o = t + n, d = t < 0 && e < 0, y = this.dataset.header[this.currentSelectionSpan.col].isPercentage, m = this.currentSelectionSpan.rows.map((C, L) => ({
|
|
154
|
+
x: h * L + h / 2,
|
|
155
|
+
y: (1 - (C.value + n) / o) * s,
|
|
156
|
+
value: y ? C.value * 100 : C.value,
|
|
157
|
+
suffix: y ? "%" : this.dataset.header[this.currentSelectionSpan.col].suffix ? this.dataset.header[this.currentSelectionSpan.col].suffix : "",
|
|
158
|
+
prefix: this.dataset.header[this.currentSelectionSpan.col].prefix ? this.dataset.header[this.currentSelectionSpan.col].prefix : "",
|
|
159
|
+
index: C.index,
|
|
160
|
+
absoluteValue: y ? Math.abs(C.value) * 100 : Math.abs(C.value)
|
|
161
|
+
})), p = s - s * (n / o);
|
|
162
|
+
return { isAllNegative: d, zero: p, plots: m, slot: h, progression: m.length >= 2 ? this.calcLinearProgression(m) : !1 };
|
|
163
|
+
},
|
|
164
|
+
donutHollowLabels() {
|
|
165
|
+
return {
|
|
166
|
+
total: Number((this.currentDonut.map((s) => s.absoluteValue).reduce((s, r) => s + r, 0) * (this.dataset.header[this.currentSelectionSpan.col].isPercentage ? 100 : 1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),
|
|
167
|
+
average: Number((this.currentDonut.map((s) => s.absoluteValue).reduce((s, r) => s + r, 0) / this.currentSelectionSpan.rows.length * (this.dataset.header[this.currentSelectionSpan.col].isPercentage ? 100 : 1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
hasNumericTypes() {
|
|
171
|
+
return this.dataset.header.map((s) => s.type).includes(this.constants.NUMERIC);
|
|
172
|
+
},
|
|
173
|
+
icons() {
|
|
174
|
+
return {
|
|
175
|
+
arrowSort: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 9l4 -4l4 4m-4 -4v14" /><path d="M21 15l-4 4l-4 -4m4 4v-14" /></svg>`,
|
|
176
|
+
bar: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 12m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M9 8m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M15 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z" /><path d="M4 20l14 0" /></svg>`,
|
|
177
|
+
chart: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 19l16 0" /><path d="M4 15l4 -6l4 2l4 -5l4 4" /></svg>`,
|
|
178
|
+
chevronDown: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>`,
|
|
179
|
+
chevronLeft: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize * 1.6}" height="${this.iconSize * 1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>`,
|
|
180
|
+
chevronRight: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize * 1.6}" height="${this.iconSize * 1.6}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>`,
|
|
181
|
+
donut: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize * 0.8}" height="${this.iconSize * 0.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3v5m4 4h5" /><path d="M8.929 14.582l-3.429 2.918" /><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /></svg>`,
|
|
182
|
+
export: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5" /><path d="M3 10h18" /><path d="M10 3v18" /><path d="M16 19h6" /><path d="M19 16l3 3l-3 3" /></svg>`,
|
|
183
|
+
fileDownload: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 3v4a1 1 0 0 0 1 1h4" /><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /><path d="M12 17v-6" /><path d="M9.5 14.5l2.5 2.5l2.5 -2.5" /></svg>`,
|
|
184
|
+
filter: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z" /></svg>`,
|
|
185
|
+
move: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 9l3 3l-3 3" /><path d="M15 12h6" /><path d="M6 9l-3 3l3 3" /><path d="M3 12h6" /><path d="M9 18l3 3l3 -3" /><path d="M12 15v6" /><path d="M15 6l-3 -3l-3 3" /><path d="M12 3v6" /></svg>`,
|
|
186
|
+
sort09: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 3a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 16m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 16v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,
|
|
187
|
+
sort90: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /><path d="M17 14a2 2 0 0 1 2 2v3a2 2 0 1 1 -4 0v-3a2 2 0 0 1 2 -2z" /><path d="M17 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 5v3a2 2 0 0 1 -2 2h-1.5" /></svg>`,
|
|
188
|
+
sortAZ: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 21h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,
|
|
189
|
+
sortZA: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 21v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4" /><path d="M19 10h-4l4 -7h-4" /><path d="M4 15l3 3l3 -3" /><path d="M7 6v12" /></svg>`,
|
|
190
|
+
sum: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>`,
|
|
191
|
+
table: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize}" height="${this.iconSize}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" fill="white" d="M 10 2, 21 2, 21 21, 10 21Z"/><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z" /><path d="M3 10h18" /><path d="M10 3v18" /></svg>`,
|
|
192
|
+
warning: `<svg xmlns="http://www.w3.org/2000/svg" width="${this.iconSize * 0.8}" height="${this.iconSize * 0.8}" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z" /><path d="M12 9v4" /><path d="M12 17h.01" /></svg>`
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
pages() {
|
|
196
|
+
const s = [];
|
|
197
|
+
if (this.bodyCopy.length)
|
|
198
|
+
for (let r = 0; r < this.bodyCopy.length; r += this.itemsPerPage)
|
|
199
|
+
s.push(this.bodyCopy.slice(r, r + this.itemsPerPage));
|
|
200
|
+
return s;
|
|
201
|
+
},
|
|
202
|
+
rows() {
|
|
203
|
+
return this.bodyCopy.map((s) => s.td);
|
|
204
|
+
},
|
|
205
|
+
selectedCellsCalculations() {
|
|
206
|
+
return {
|
|
207
|
+
sumPercentage: Number((this.currentSelectionSpan.rows.map((s) => s.value).reduce((s, r) => s + r, 0) * 100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),
|
|
208
|
+
sumRegular: Number(this.currentSelectionSpan.rows.map((s) => s.value).reduce((s, r) => s + r, 0).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),
|
|
209
|
+
averagePercentage: Number((this.currentSelectionSpan.rows.map((s) => s.value).reduce((s, r) => s + r, 0) / this.currentSelectionSpan.rows.length * 100).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString(),
|
|
210
|
+
averageRegular: Number((this.currentSelectionSpan.rows.map((s) => s.value).reduce((s, r) => s + r, 0) / this.currentSelectionSpan.rows.length).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString()
|
|
211
|
+
};
|
|
212
|
+
},
|
|
213
|
+
FINAL_CONFIG() {
|
|
214
|
+
const { vue_ui_table: s } = x();
|
|
215
|
+
if (!Object.keys(this.config || {}).length)
|
|
216
|
+
return s;
|
|
217
|
+
const r = this.treeShake({
|
|
218
|
+
defaultConfig: s,
|
|
219
|
+
userConfig: this.config
|
|
220
|
+
});
|
|
221
|
+
return this.convertConfigColors(r);
|
|
222
|
+
},
|
|
223
|
+
visibleRows() {
|
|
224
|
+
return this.pages[this.currentPage];
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
methods: {
|
|
228
|
+
// lib
|
|
229
|
+
treeShake: G,
|
|
230
|
+
makeDonut: M,
|
|
231
|
+
convertColorToHex: T,
|
|
232
|
+
convertConfigColors: E,
|
|
233
|
+
createCsvContent: z,
|
|
234
|
+
downloadCsv: B,
|
|
235
|
+
// specific
|
|
236
|
+
applyDonutOption() {
|
|
237
|
+
const s = this.selectedDonutCategory.options.map((r, l) => ({
|
|
238
|
+
name: r,
|
|
239
|
+
color: this.palette[l] || this.palette[l % this.palette.length],
|
|
240
|
+
value: this.visibleRows.filter((h, t) => h.td[this.selectedDonutCategory.index] === r && this.currentSelectionSpan.rows.map((e) => e.index).includes(t)).map((h) => h.td[this.currentSelectionSpan.col]).reduce((h, t) => Math.abs(h) + Math.abs(t), 0),
|
|
241
|
+
absoluteValue: this.visibleRows.filter((h, t) => h.td[this.selectedDonutCategory.index] === r && this.currentSelectionSpan.rows.map((e) => e.index).includes(t)).map((h) => h.td[this.currentSelectionSpan.col]).reduce((h, t) => h + t, 0)
|
|
242
|
+
})).sort((r, l) => l.value - r.value);
|
|
243
|
+
this.currentDonut = this.makeDonut({ series: s }, 50, 50, 30, 30), this.$nextTick(() => {
|
|
244
|
+
this.chart.type = this.constants.DONUT, this.showDonutOptions = !1;
|
|
245
|
+
});
|
|
246
|
+
},
|
|
247
|
+
calcRectY(s, r) {
|
|
248
|
+
return s >= 0 ? r : this.chartData.zero;
|
|
249
|
+
},
|
|
250
|
+
canResetColumn(s, r) {
|
|
251
|
+
return !this.hasNaN[s] && (r.isSort || r.isSearch || r.isMultiselect || r.rangeFilter) && ![this.constants.DATE].includes(r.type);
|
|
252
|
+
},
|
|
253
|
+
createXls(s = "all") {
|
|
254
|
+
const r = this.dataset.header.map((e) => e.name), l = s === "all" ? this.bodyCopy.map((e) => e.td) : this.visibleRows.map((e) => e.td), h = [r].concat(l), t = this.createCsvContent(h);
|
|
255
|
+
this.downloadCsv({ csvContent: t, title: "vue-ui-table" });
|
|
256
|
+
},
|
|
257
|
+
calcLinearProgression: H,
|
|
258
|
+
closeAllDropdowns() {
|
|
259
|
+
const s = document.getElementsByClassName("th-dropdown");
|
|
260
|
+
s.length && Array.from(s).forEach((r) => {
|
|
261
|
+
r.dataset.isOpen = !1;
|
|
262
|
+
});
|
|
263
|
+
},
|
|
264
|
+
debounce(s, r) {
|
|
265
|
+
let l;
|
|
266
|
+
clearTimeout(l), l = setTimeout(s, r);
|
|
267
|
+
},
|
|
268
|
+
filterBody() {
|
|
269
|
+
this.bodyCopy = this.tableBody.filter((s) => {
|
|
270
|
+
for (const r in this.searches)
|
|
271
|
+
if (!s.td[r].toUpperCase().includes(this.searches[r].toUpperCase()))
|
|
272
|
+
return !1;
|
|
273
|
+
for (const r in this.multiselects)
|
|
274
|
+
if (!this.multiselects[r].some((h) => h === s.td[r]))
|
|
275
|
+
return !1;
|
|
276
|
+
for (const r in this.dates) {
|
|
277
|
+
const l = new Date(s.td[r]), h = new Date(this.dates[r].from), t = new Date(this.dates[r].to);
|
|
278
|
+
if (l < h || l > t)
|
|
279
|
+
return !1;
|
|
280
|
+
}
|
|
281
|
+
return !0;
|
|
282
|
+
}), this.sortBody();
|
|
283
|
+
},
|
|
284
|
+
getAverage(s) {
|
|
285
|
+
return this.rows.map((r) => r[s]).map((r) => isNaN(Number(r)) ? 0 : r).reduce((r, l) => r + l, 0) / this.bodyCopy.length;
|
|
286
|
+
},
|
|
287
|
+
getDatesRange(s) {
|
|
288
|
+
const r = this.dataset.body.map((C) => new Date(C.td[s])), l = new Date(Math.min(...r)), h = new Date(Math.max(...r)), t = l.getFullYear(), e = h.getFullYear(), n = String(l.getMonth() + 1).padStart(2, "0"), o = String(h.getMonth() + 1).padStart(2, "0"), d = String(l.getDate()).padStart(2, "0"), y = String(h.getDate()).padStart(2, "0"), m = `${t}-${n}-${d}`, p = `${e}-${o}-${y}`;
|
|
289
|
+
return {
|
|
290
|
+
from: m,
|
|
291
|
+
to: p
|
|
292
|
+
};
|
|
293
|
+
},
|
|
294
|
+
getDonutLegendValue(s) {
|
|
295
|
+
return Number((s * (this.dataset.header[this.currentSelectionSpan.col].isPercentage ? 100 : 1)).toFixed(this.dataset.header[this.currentSelectionSpan.col].decimals)).toLocaleString();
|
|
296
|
+
},
|
|
297
|
+
getDropdownOptions(s) {
|
|
298
|
+
return [...new Set(this.dataset.body.map((r) => r.td[s]))];
|
|
299
|
+
},
|
|
300
|
+
getSum(s) {
|
|
301
|
+
return this.rows.map((r) => r[s]).map((r) => isNaN(Number(r)) ? 0 : r).reduce((r, l) => r + l, 0);
|
|
302
|
+
},
|
|
303
|
+
includesNaN(s) {
|
|
304
|
+
return s.includes(NaN);
|
|
305
|
+
},
|
|
306
|
+
isDropdownOptionSelected(s, r) {
|
|
307
|
+
return this.multiselects[r] ? this.multiselects[r].includes(s) : !0;
|
|
308
|
+
},
|
|
309
|
+
isNumeric(s) {
|
|
310
|
+
return !isNaN(Number(String(s).replaceAll("%", "")));
|
|
311
|
+
},
|
|
312
|
+
isResetDisabled(s, r) {
|
|
313
|
+
const l = r.isSort, h = r.isSearch, t = r.isMultiselect && this.multiselects[s], e = r.rangeFilter, n = (o) => {
|
|
314
|
+
if (e && this.rangeFilters[o])
|
|
315
|
+
return Math.round(this.rangeFilters[o].min) === this.immutableRangeFilters[o].min && Math.round(this.rangeFilters[o].max) === this.immutableRangeFilters[o].max;
|
|
316
|
+
};
|
|
317
|
+
if (l && h && t && e)
|
|
318
|
+
return ["", void 0].includes(this.searches[s]) && [void 0].includes(this.sorts[s]) && this.multiselects[s].length === this.getDropdownOptions(s).length && n(s);
|
|
319
|
+
if (l && h && t)
|
|
320
|
+
return ["", void 0].includes(this.searches[s]) && [void 0].includes(this.sorts[s]) && this.multiselects[s].length === this.getDropdownOptions(s).length;
|
|
321
|
+
if (l && h && e)
|
|
322
|
+
return ["", void 0].includes(this.searches[s]) && [void 0].includes(this.sorts[s]) && n(s);
|
|
323
|
+
if (l && h)
|
|
324
|
+
return ["", void 0].includes(this.searches[s]) && [void 0].includes(this.sorts[s]);
|
|
325
|
+
if (l && t && e)
|
|
326
|
+
return [void 0].includes(this.sorts[s]) && this.multiselects[s].length === this.getDropdownOptions(s).length && n(s);
|
|
327
|
+
if (l && t)
|
|
328
|
+
return [void 0].includes(this.sorts[s]) && this.multiselects[s].length === this.getDropdownOptions(s).length;
|
|
329
|
+
if (h && t && e)
|
|
330
|
+
return ["", void 0].includes(this.searches[s]) && this.multiselects[s].length === this.getDropdownOptions(s).length && n(s);
|
|
331
|
+
if (h && t)
|
|
332
|
+
return ["", void 0].includes(this.searches[s]) && this.multiselects[s].length === this.getDropdownOptions(s).length;
|
|
333
|
+
if (h && e)
|
|
334
|
+
return ["", void 0].includes(this.searches[s]) && n(s);
|
|
335
|
+
if (h)
|
|
336
|
+
return ["", void 0].includes(this.searches[s]);
|
|
337
|
+
if (l && e)
|
|
338
|
+
return [void 0].includes(this.sorts[s]) && n(s);
|
|
339
|
+
if (l)
|
|
340
|
+
return [void 0].includes(this.sorts[s]);
|
|
341
|
+
if (t && e)
|
|
342
|
+
return this.multiselects[s].length === this.getDropdownOptions(s).length && n(s);
|
|
343
|
+
if (t)
|
|
344
|
+
return this.multiselects[s].length === this.getDropdownOptions(s).length;
|
|
345
|
+
},
|
|
346
|
+
navigate(s) {
|
|
347
|
+
this.resetSelection(), s === "next" && this.currentPage < this.pages.length ? this.currentPage += 1 : s === "previous" && this.currentPage >= 1 ? this.currentPage -= 1 : this.currentPage = s - 1, this.$refs.tableWrapper.scrollTo({
|
|
348
|
+
top: 0,
|
|
349
|
+
left: 0,
|
|
350
|
+
behavior: "smooth"
|
|
351
|
+
});
|
|
352
|
+
},
|
|
353
|
+
navigateCell(s) {
|
|
354
|
+
s.preventDefault();
|
|
355
|
+
const r = s.keyCode, l = 38, h = 40, t = 37, e = 39;
|
|
356
|
+
if (![l, h, t, e].includes(r)) return;
|
|
357
|
+
const n = s.target.id, o = /cell_(\d+)_(\d+)_vue-ui-table-(\d+)/, d = n.match(o), y = parseInt(d[1]), m = parseInt(d[2]), p = document.getElementById(`cell_${y}_${m + 1}_${this.uid}`), C = document.getElementById(`cell_${y}_${m - 1}_${this.uid}`), L = document.getElementById(`cell_${y + 1}_${m}_${this.uid}`), A = document.getElementById(`cell_${y - 1}_${m}_${this.uid}`);
|
|
358
|
+
let v;
|
|
359
|
+
switch (!0) {
|
|
360
|
+
case r === e:
|
|
361
|
+
v = p;
|
|
362
|
+
break;
|
|
363
|
+
case r === t:
|
|
364
|
+
v = C;
|
|
365
|
+
break;
|
|
366
|
+
case r === l:
|
|
367
|
+
v = A;
|
|
368
|
+
break;
|
|
369
|
+
case r === h:
|
|
370
|
+
v = L;
|
|
371
|
+
break;
|
|
372
|
+
default:
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
v && (v.focus(), v.scrollIntoView({ behavior: "smooth", block: "center" }));
|
|
376
|
+
},
|
|
377
|
+
openDonutOptions() {
|
|
378
|
+
this.selectedDonutCategory = this.availableDonutCategories[0], this.showDonutOptions = !0;
|
|
379
|
+
},
|
|
380
|
+
placeLabelOnTopOrBottom({ previousPlot: s, currentPlot: r, nextPlot: l }) {
|
|
381
|
+
const h = r.y - 38, t = r.y + 16;
|
|
382
|
+
return s && l ? s.value < r.value && l.value < r.value ? h : s.value > r.value && l.value > r.value ? t : (s.value > r.value && l.value < r.value || s.value < r.value && l.value > r.value, h) : s && !l ? s.value > r.value ? t : h : !s && l && l.value > r.value ? t : h;
|
|
383
|
+
},
|
|
384
|
+
async prepareBodyCopy() {
|
|
385
|
+
return new Promise((s) => {
|
|
386
|
+
const r = [];
|
|
387
|
+
this.tableHead.forEach((l, h) => {
|
|
388
|
+
if (l.isSearch && Object.assign(this.searches, { [h]: "" }), l.isMultiselect && Object.assign(this.multiselects, { [h]: this.getDropdownOptions(h) }), l.type === this.constants.DATE && (Object.assign(this.dates, { [h]: this.getDatesRange(h) }), Object.assign(this.filteredDatesIndexes, { [h]: !1 })), (l.isPercentage || l.percentageTo) && Object.assign(this.percentages, { [h]: {
|
|
389
|
+
reference: l.percentageTo,
|
|
390
|
+
referenceIndex: this.dataset.header.map((t) => t.name).indexOf(l.percentageTo)
|
|
391
|
+
} }), l.rangeFilter && (Object.assign(this.rangeFilters, { [h]: {
|
|
392
|
+
min: Math.round(Math.min(...this.dataset.body.map((t) => t.td).map((t) => t[h]))),
|
|
393
|
+
max: Math.round(Math.max(...this.dataset.body.map((t) => t.td).map((t) => t[h])))
|
|
394
|
+
} }), Object.assign(this.immutableRangeFilters, { [h]: {
|
|
395
|
+
min: Math.round(Math.min(...this.dataset.body.map((t) => t.td).map((t) => t[h]))),
|
|
396
|
+
max: Math.round(Math.max(...this.dataset.body.map((t) => t.td).map((t) => t[h])))
|
|
397
|
+
} })), l.isPercentage) {
|
|
398
|
+
const t = this.dataset.header.map((n) => n.name).indexOf(l.percentageTo), e = this.dataset.body.map((n) => n.td[t]).reduce((n, o) => n + o, 0);
|
|
399
|
+
r.push([h, t, e]);
|
|
400
|
+
}
|
|
401
|
+
l.type === this.constants.NUMERIC && !l.isPercentage && Object.assign(this.hasNaN, { [h]: this.includesNaN(this.dataset.body.map((t) => Number(t.td[h]))) });
|
|
402
|
+
}), this.bodyCopy.forEach((l, h) => {
|
|
403
|
+
r.map((t) => {
|
|
404
|
+
const [e, n, o] = t;
|
|
405
|
+
l.td[e] = l.td[n] / o;
|
|
406
|
+
}), l.td.forEach((t, e) => {
|
|
407
|
+
this.dataset.header[e].type === this.constants.TEXT && this.dataset.header[e].isSearch && (l[e] = this.stringToNumber(t)), this.dataset.header[e].type === this.constants.DATE && (l[e] = new Date(t).getTime()), this.dataset.header[e].type === this.constants.NUMERIC && (l[e] = isNaN(Number(t)) ? e : t), this.tableBody[h][e] = l[e];
|
|
408
|
+
});
|
|
409
|
+
}), s(!0);
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
promiseWithAsyncFunction(s, r) {
|
|
413
|
+
return new Promise((l, h) => {
|
|
414
|
+
s().then((t) => {
|
|
415
|
+
try {
|
|
416
|
+
const e = r(t);
|
|
417
|
+
l(e);
|
|
418
|
+
} catch (e) {
|
|
419
|
+
h(e);
|
|
420
|
+
}
|
|
421
|
+
}).catch((t) => {
|
|
422
|
+
h(t);
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
},
|
|
426
|
+
resetDates(s) {
|
|
427
|
+
this.dates[s] = {
|
|
428
|
+
from: this.getDatesRange(s).from,
|
|
429
|
+
to: this.getDatesRange(s).to
|
|
430
|
+
}, this.filteredDatesIndexes[s] = !1, this.$forceUpdate(), this.filterBody();
|
|
431
|
+
},
|
|
432
|
+
resetFilter(s, r, l) {
|
|
433
|
+
const h = l.currentTarget;
|
|
434
|
+
clearTimeout(this.buttonTimeout), h.classList.add("clicked"), this.buttonTimeout = setTimeout(() => {
|
|
435
|
+
h.classList.remove("clicked");
|
|
436
|
+
}, 200), this.currentFilter = void 0, r.rangeFilter && (this.rangeFilters[s].min = this.immutableRangeFilters[s].min, this.rangeFilters[s].max = this.immutableRangeFilters[s].max), r.isMultiselect ? (this.multiselects[s] = this.getDropdownOptions(s), r.type === this.constants.TEXT && (this.sorts[s] = void 0), r.isSearch && (this.searches[s] = "")) : r.type === this.constants.NUMERIC ? this.sorts[s] = void 0 : r.type === this.constants.TEXT ? (this.sorts[s] = void 0, this.searches[s] = "") : r.type === this.constants.DATE && (this.sorts[s] = void 0), this.filterBody();
|
|
437
|
+
},
|
|
438
|
+
resetSelection() {
|
|
439
|
+
const s = document.getElementsByClassName(`tr_${this.uid}`);
|
|
440
|
+
Array.from(s).forEach((r) => {
|
|
441
|
+
Array.from(r.getElementsByTagName("td")).forEach((l) => {
|
|
442
|
+
l.dataset.row === "even" ? (l.style.background = this.FINAL_CONFIG.style.rows.even.backgroundColor, l.style.color = this.FINAL_CONFIG.style.rows.even.color) : (l.style.background = this.FINAL_CONFIG.style.rows.odd.backgroundColor, l.style.color = this.FINAL_CONFIG.style.rows.odd.color);
|
|
443
|
+
});
|
|
444
|
+
}), Array.from(s).forEach((r) => r.dataset.selected = "false"), this.currentPage > this.pages.length - 1 && (this.currentPage = this.pages.length - 1), this.showChart = !1, this.currentDonut = void 0, this.selectedColumn = void 0, this.chart.type = this.constants.BAR, this.currentSelectionSpan = {
|
|
445
|
+
col: void 0,
|
|
446
|
+
rows: []
|
|
447
|
+
}, this.clientX = 100, this.clientY = 100;
|
|
448
|
+
},
|
|
449
|
+
selectColumn(s) {
|
|
450
|
+
this.currentSelectionSpan.col !== s ? (this.visibleRows.forEach((r, l) => {
|
|
451
|
+
this.selectTd({
|
|
452
|
+
td: r.td[s],
|
|
453
|
+
rowIndex: l,
|
|
454
|
+
colIndex: s,
|
|
455
|
+
headerType: this.constants.NUMERIC,
|
|
456
|
+
event: {
|
|
457
|
+
currentTarget: document.getElementById(`cell_${l}_${s}_${this.uid}`)
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
}), this.selectedColumn = s) : (this.selectedColumn = void 0, this.resetSelection());
|
|
461
|
+
},
|
|
462
|
+
selectDropdownOption(s, r) {
|
|
463
|
+
this.multiselects[r].includes(s) ? this.multiselects[r] = this.multiselects[r].filter((l) => l !== s) : this.multiselects[r].push(s), this.$forceUpdate(), this.filterBody();
|
|
464
|
+
},
|
|
465
|
+
selectTd({ td: s, rowIndex: r, colIndex: l, headerType: h, event: t }) {
|
|
466
|
+
if (h !== this.constants.NUMERIC || isNaN(Number(s))) {
|
|
467
|
+
this.resetSelection();
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
this.currentSelectionSpan.col !== l && this.resetSelection();
|
|
471
|
+
const e = t.currentTarget.parentNode;
|
|
472
|
+
this.currentSelectionSpan.col = l, this.currentSelectionSpan.rows.map((n) => n.index).includes(r) ? (e.dataset.selected = "false", this.currentSelectionSpan.rows = this.currentSelectionSpan.rows.filter((n) => n.index !== r), t.currentTarget.classList.remove(this.cssClass.CELL), Array.from(e.children).forEach((n, o) => {
|
|
473
|
+
n.dataset.row === "even" ? (n.style.background = this.FINAL_CONFIG.style.rows.even.backgroundColor, n.style.color = this.FINAL_CONFIG.style.rows.even.olor) : (n.style.background = this.FINAL_CONFIG.style.rows.odd.backgroundColor, n.style.color = this.FINAL_CONFIG.style.rows.odd.color);
|
|
474
|
+
}), t.currentTarget.dataset.row === "even" ? (t.currentTarget.style.background = this.FINAL_CONFIG.style.rows.even.backgroundColor, t.currentTarget.style.color = this.FINAL_CONFIG.style.rows.even.color) : (t.currentTarget.style.background = this.FINAL_CONFIG.style.rows.odd.backgroundColor, t.currentTarget.style.color = this.FINAL_CONFIG.style.rows.odd.color)) : (e.dataset.selected = "true", this.currentSelectionSpan.rows.push({
|
|
475
|
+
index: r,
|
|
476
|
+
value: s
|
|
477
|
+
}), Array.from(e.children).forEach((n, o) => {
|
|
478
|
+
n.dataset.row === "even" ? (n.style.background = this.FINAL_CONFIG.style.rows.even.selectedNeighbors.backgroundColor, n.style.color = this.FINAL_CONFIG.style.rows.even.selectedNeighbors.color) : (n.style.background = this.FINAL_CONFIG.style.rows.odd.selectedNeighbors.backgroundColor, n.style.color = this.FINAL_CONFIG.style.rows.odd.selectedNeighbors.color);
|
|
479
|
+
}), t.currentTarget.dataset.row === "odd" ? (t.currentTarget.style.background = this.FINAL_CONFIG.style.rows.odd.selectedCell.backgroundColor, t.currentTarget.style.color = this.FINAL_CONFIG.style.rows.odd.selectedCell.color) : (t.currentTarget.style.background = this.FINAL_CONFIG.style.rows.even.selectedCell.backgroundColor, t.currentTarget.style.color = this.FINAL_CONFIG.style.rows.even.selectedCell.color)), this.currentSelectionSpan.rows = this.currentSelectionSpan.rows.sort((n, o) => n.index - o.index), this.chart.type === this.constants.DONUT && this.currentSelectionSpan.rows.length > 0 && this.applyDonutOption();
|
|
480
|
+
},
|
|
481
|
+
setFilterDatesIndexes(s) {
|
|
482
|
+
this.filteredDatesIndexes[s] = !(this.getDatesRange(s).from === this.dates[s].from && this.getDatesRange(s).to === this.dates[s].to);
|
|
483
|
+
},
|
|
484
|
+
sortBody() {
|
|
485
|
+
this.resetSelection(), Object.keys(this.rangeFilters).forEach((s) => {
|
|
486
|
+
this.filterByRange(this.bodyCopy, s);
|
|
487
|
+
}), Object.keys(this.sorts).forEach((s) => {
|
|
488
|
+
this.sortByNumber(this.bodyCopy, s);
|
|
489
|
+
}), this.currentFilter !== void 0 && this.sortByNumber(this.bodyCopy, this.currentFilter), this.dataset.header.forEach((s, r) => {
|
|
490
|
+
if (s.isPercentage) {
|
|
491
|
+
const l = this.percentages[r].referenceIndex, h = this.bodyCopy.map((t) => t.td[l]).reduce((t, e) => t + e, 0);
|
|
492
|
+
this.bodyCopy.forEach((t) => {
|
|
493
|
+
t.td[r] = t.td[l] / h;
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
}), this.currentPage > this.pages.length - 1 && (this.currentPage = this.pages.length - 1), [-1].includes(this.currentPage) && (this.currentPage = 0), this.$forceUpdate();
|
|
497
|
+
},
|
|
498
|
+
filterByRange(s, r) {
|
|
499
|
+
this.bodyCopy = s.filter((l) => l.td[r] >= this.rangeFilters[r].min && l[r] <= this.rangeFilters[r].max);
|
|
500
|
+
},
|
|
501
|
+
sortByNumber(s, r) {
|
|
502
|
+
if (this.sorts[r] === this.constants.ASC && (s = s.sort((l, h) => l[r] - h[r])), this.sorts[r] === this.constants.DESC)
|
|
503
|
+
s = s.sort((l, h) => h[r] - l[r]);
|
|
504
|
+
else
|
|
505
|
+
return 0;
|
|
506
|
+
},
|
|
507
|
+
sortTh(s, r) {
|
|
508
|
+
this.currentFilter = s;
|
|
509
|
+
const l = r.currentTarget;
|
|
510
|
+
clearTimeout(this.buttonTimeout), l.classList.add("clicked"), this.buttonTimeout = setTimeout(() => {
|
|
511
|
+
l.classList.remove("clicked");
|
|
512
|
+
}, 200), this.sorts[s] === 1 ? this.sorts[s] = this.constants.DESC : this.sorts[s] = this.constants.ASC, this.sortBody();
|
|
513
|
+
},
|
|
514
|
+
stringToNumber(s) {
|
|
515
|
+
let r = 0;
|
|
516
|
+
for (let l = 0; l < s.length; l += 1)
|
|
517
|
+
r += s.charCodeAt(l);
|
|
518
|
+
return r;
|
|
519
|
+
},
|
|
520
|
+
toggleMultiselect(s, r, l) {
|
|
521
|
+
const h = l.currentTarget;
|
|
522
|
+
clearTimeout(this.buttonTimeout), h.classList.add("clicked"), this.buttonTimeout = setTimeout(() => {
|
|
523
|
+
h.classList.remove("clicked");
|
|
524
|
+
}, 200);
|
|
525
|
+
const t = document.getElementById(`th_dropdown_${s}`);
|
|
526
|
+
t.dataset.isOpen === "false" ? t.dataset.isOpen = "true" : t.dataset.isOpen = "false";
|
|
527
|
+
},
|
|
528
|
+
updateCurrentPage(s) {
|
|
529
|
+
this.resetSelection(), this.currentPage = Number(s.target.value);
|
|
530
|
+
},
|
|
531
|
+
// DONUTS
|
|
532
|
+
calcDonutMarkerConnectorColor(s) {
|
|
533
|
+
return s.proportion * 100 > 3 ? s.color : "transparent";
|
|
534
|
+
},
|
|
535
|
+
calcDonutMarkerLabelPositionX(s) {
|
|
536
|
+
return s.center.endX + this.calcMarkerOffset(s, 50);
|
|
537
|
+
},
|
|
538
|
+
calcMarkerOffset(s, r) {
|
|
539
|
+
return s.center.endX - r >= 0 ? 3 : -2;
|
|
540
|
+
},
|
|
541
|
+
displayArcPercentage(s, r) {
|
|
542
|
+
return isNaN(s.value / this.sumValues(r)) ? 0 : (s.value / this.sumValues(r) * 100).toFixed(0) + "%";
|
|
543
|
+
},
|
|
544
|
+
isArcBigEnough(s) {
|
|
545
|
+
return s.proportion * 100 > 3;
|
|
546
|
+
},
|
|
547
|
+
sumValues(s) {
|
|
548
|
+
return [...s].map((r) => r.value).reduce((r, l) => r + l, 0);
|
|
549
|
+
},
|
|
550
|
+
// CHART DRAGGING METHODS
|
|
551
|
+
closeDragElement() {
|
|
552
|
+
document.onmouseup = null, document.onmousemove = null;
|
|
553
|
+
},
|
|
554
|
+
dragMouseDown(s) {
|
|
555
|
+
s = s || window.event, s.preventDefault(), document.onmouseup = this.closeDragElement, document.onmousemove = this.elementDrag;
|
|
556
|
+
},
|
|
557
|
+
elementDrag(s) {
|
|
558
|
+
this.rafId || (this.rafId = window.requestAnimationFrame(() => this.onElementDrag(s)));
|
|
559
|
+
},
|
|
560
|
+
onElementDrag(s) {
|
|
561
|
+
s = s || window.event, s.preventDefault();
|
|
562
|
+
const l = this.$refs.chartModal.getBoundingClientRect();
|
|
563
|
+
this.clientX = s.clientX - l.width / 2, this.clientY = s.clientY - l.height / 2, this.rafId = null;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}, F = (s) => (U("data-v-5a108fbd"), s = s(), V(), s), W = { class: "vue-ui-table-export-hub" }, Y = ["innerHTML"], K = ["data-is-open"], Z = /* @__PURE__ */ F(() => /* @__PURE__ */ a("b", { class: "vue-ui-table-export-hub-title" }, " Export ", -1)), q = { class: "vue-ui-table-export-hub-options" }, J = { class: "vue-ui-table-export-hub-option-wrapper" }, Q = { class: "label" }, $ = ["innerHTML"], ee = { class: "vue-ui-table-export-hub-option-wrapper" }, te = { class: "label" }, se = ["innerHTML"], re = { class: "vue-ui-table" }, ne = { id: "tableHead" }, le = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), oe = { key: 0 }, ae = { key: 0 }, ie = { key: 1 }, ce = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), ue = {
|
|
567
|
+
key: 0,
|
|
568
|
+
style: { display: "flex", "align-items": "center", "justify-content": "flex-end" }
|
|
569
|
+
}, he = ["innerHTML"], de = {
|
|
570
|
+
key: 0,
|
|
571
|
+
style: { "margin-left": "3px" }
|
|
572
|
+
}, ge = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), ye = { key: 0 }, Ne = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), be = { class: "th-filter" }, me = {
|
|
573
|
+
key: 0,
|
|
574
|
+
class: "th-date"
|
|
575
|
+
}, fe = { class: "date-wrapper--inputs" }, _e = { class: "date-fieldset" }, Ce = ["for"], Ie = ["id", "onUpdate:modelValue", "onInput"], Fe = { class: "date-fieldset" }, ve = ["for"], ke = ["id", "onUpdate:modelValue", "onInput"], pe = { class: "date-wrapper--button" }, we = ["onClick"], Se = ["innerHTML"], Oe = ["innerHTML"], Le = ["innerHTML"], Ae = ["onClick", "disabled"], De = ["placeholder", "onUpdate:modelValue", "name"], xe = ["onClick"], Ge = ["innerHTML"], Me = ["innerHTML"], Te = ["innerHTML"], Ee = ["onClick", "innerHTML"], ze = ["innerHTML"], Be = {
|
|
576
|
+
key: 5,
|
|
577
|
+
class: "th-range-filter"
|
|
578
|
+
}, He = ["for"], Re = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒥ", -1)), Pe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒣ", -1)), Ue = ["id", "max", "min", "onUpdate:modelValue"], Ve = ["id", "max", "min", "onUpdate:modelValue"], je = ["for"], Xe = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒪ", -1)), We = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", { style: { color: "grey" } }, "ᒧ", -1)), Ye = ["onClick", "disabled"], Ke = ["id"], Ze = ["onClick"], qe = ["onClick", "onKeyup"], Je = /* @__PURE__ */ F(() => /* @__PURE__ */ a("th", { class: "invisible-cell" }, null, -1)), Qe = ["innerHTML", "onClick", "onKeyup"], $e = ["data-row"], et = ["data-row"], tt = ["data-row", "onClick", "onKeyup", "id"], st = ["innerHTML"], rt = { key: 1 }, nt = { key: 2 }, lt = { key: 5 }, ot = ["innerHTML"], at = { key: 0 }, it = { style: { "margin-left": "12px" } }, ct = { class: "format-num" }, ut = { style: { "margin-left": "12px" } }, ht = {
|
|
579
|
+
key: 0,
|
|
580
|
+
class: "format-num"
|
|
581
|
+
}, dt = {
|
|
582
|
+
key: 1,
|
|
583
|
+
class: "format-num"
|
|
584
|
+
}, gt = { key: 2 }, yt = { style: { "margin-left": "12px" } }, Nt = {
|
|
585
|
+
key: 0,
|
|
586
|
+
class: "format-num"
|
|
587
|
+
}, bt = {
|
|
588
|
+
key: 1,
|
|
589
|
+
class: "format-num"
|
|
590
|
+
}, mt = { key: 2 }, ft = {
|
|
591
|
+
key: 0,
|
|
592
|
+
class: "vue-ui-table-paginator format-num"
|
|
593
|
+
}, _t = {
|
|
594
|
+
key: 1,
|
|
595
|
+
class: "vue-ui-table-size-warning"
|
|
596
|
+
}, Ct = ["innerHTML"], It = {
|
|
597
|
+
key: 3,
|
|
598
|
+
class: "vue-ui-table-pagination format-num"
|
|
599
|
+
}, Ft = ["innerHTML", "disabled"], vt = ["disabled"], kt = {
|
|
600
|
+
key: 0,
|
|
601
|
+
class: "vue-ui-table-page-scroller-wrapper"
|
|
602
|
+
}, pt = {
|
|
603
|
+
for: "pageScroller",
|
|
604
|
+
style: { "font-size": "14px" }
|
|
605
|
+
}, wt = ["max", "value"], St = { key: 1 }, Ot = ["disabled"], Lt = ["innerHTML", "disabled"], At = { class: "chart-modal-options" }, Dt = ["innerHTML"], xt = ["innerHTML"], Gt = ["innerHTML"], Mt = { style: { "margin-bottom": "12px" } }, Tt = { key: 0 }, Et = { key: 1 }, zt = {
|
|
606
|
+
style: { width: "100%", height: "fit-content", cursor: "move" },
|
|
607
|
+
ref: "chartModal"
|
|
608
|
+
}, Bt = { class: "vue-ui-table-fieldset" }, Ht = { class: "vue-ui-table-fieldset-wrapper" }, Rt = ["name", "id", "checked", "onInput"], Pt = ["for"], Ut = ["disabled"], Vt = ["innerHTML"], jt = ["viewBox"], Xt = ["markerWidth", "markerHeight", "refY"], Wt = ["points", "fill"], Yt = ["x2", "y1", "y2", "stroke", "stroke-width"], Kt = ["y2", "stroke", "stroke-width"], Zt = ["x", "width", "height", "fill"], qt = /* @__PURE__ */ P('<linearGradient id="barGradientSelected" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DD" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DD80" data-v-5a108fbd></stop></linearGradient><linearGradient id="barGradientSelectedNeg" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DD80" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DD" data-v-5a108fbd></stop></linearGradient><linearGradient id="barGradient" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DDB3" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DD66" data-v-5a108fbd></stop></linearGradient><linearGradient id="barGradientNeg" x2="0%" y2="100%" data-v-5a108fbd><stop offset="0.2" stop-color="#6376DD66" data-v-5a108fbd></stop><stop offset="1" stop-color="#6376DDB3" data-v-5a108fbd></stop></linearGradient>', 4), Jt = ["x", "y", "height", "width", "fill", "stroke"], Qt = ["x", "y", "width"], $t = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], es = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], ts = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ss = ["x", "y", "width"], rs = ["x", "width", "height", "onMouseenter"], ns = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"], ls = /* @__PURE__ */ F(() => /* @__PURE__ */ a("span", null, "---", -1)), os = ["d", "stroke"], as = ["x", "y"], is = { class: "vue-ui-table-donut-label-name" }, cs = ["fill"], us = ["fill"], hs = ["fill"], ds = ["fill"], gs = { class: "vue-ui-table-donut-legend" };
|
|
609
|
+
function ys(s, r, l, h, t, e) {
|
|
610
|
+
return i(), c("div", {
|
|
611
|
+
class: "vue-ui-table-main",
|
|
612
|
+
style: g(`font-family: ${e.FINAL_CONFIG.fontFamily}`)
|
|
613
|
+
}, [
|
|
614
|
+
a("div", W, [
|
|
615
|
+
a("button", {
|
|
616
|
+
onClick: r[0] || (r[0] = (n) => t.isExportRequest = !t.isExportRequest),
|
|
617
|
+
innerHTML: e.icons.export,
|
|
618
|
+
style: g(`background:${e.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${e.FINAL_CONFIG.style.exportMenu.color}`)
|
|
619
|
+
}, null, 12, Y),
|
|
620
|
+
a("div", {
|
|
621
|
+
class: "vue-ui-table-export-hub-dropdown",
|
|
622
|
+
"data-is-open": t.isExportRequest || "false",
|
|
623
|
+
style: g(`background:${e.FINAL_CONFIG.style.exportMenu.backgroundColor};color:${e.FINAL_CONFIG.style.exportMenu.color}`)
|
|
624
|
+
}, [
|
|
625
|
+
Z,
|
|
626
|
+
a("button", {
|
|
627
|
+
class: "close-dropdown",
|
|
628
|
+
onClick: r[1] || (r[1] = (n) => t.isExportRequest = !1),
|
|
629
|
+
style: g(`background:${e.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${e.FINAL_CONFIG.style.closeButtons.color};border-radius:${e.FINAL_CONFIG.style.closeButtons.borderRadius}`)
|
|
630
|
+
}, " ✖ ", 4),
|
|
631
|
+
a("div", q, [
|
|
632
|
+
a("div", J, [
|
|
633
|
+
a("div", Q, u(e.FINAL_CONFIG.translations.exportAllLabel) + " (" + u(t.bodyCopy.length) + ") ", 1),
|
|
634
|
+
a("button", {
|
|
635
|
+
id: "exportAll",
|
|
636
|
+
onClick: r[2] || (r[2] = (n) => e.createXls("all")),
|
|
637
|
+
style: g(`background:${e.FINAL_CONFIG.style.exportMenu.buttons.backgroundColor};color:${e.FINAL_CONFIG.style.exportMenu.buttons.color}`)
|
|
638
|
+
}, [
|
|
639
|
+
a("div", {
|
|
640
|
+
innerHTML: e.icons.fileDownload
|
|
641
|
+
}, null, 8, $),
|
|
642
|
+
a("span", null, u(e.FINAL_CONFIG.translations.exportAllButton), 1)
|
|
643
|
+
], 4)
|
|
644
|
+
]),
|
|
645
|
+
a("div", ee, [
|
|
646
|
+
a("div", te, u(e.FINAL_CONFIG.translations.exportPageLabel), 1),
|
|
647
|
+
a("button", {
|
|
648
|
+
id: "exportPage",
|
|
649
|
+
onClick: r[3] || (r[3] = (n) => e.createXls("page")),
|
|
650
|
+
style: g(`background:${e.FINAL_CONFIG.style.exportMenu.buttons.backgroundColor};color:${e.FINAL_CONFIG.style.exportMenu.buttons.color}`)
|
|
651
|
+
}, [
|
|
652
|
+
a("div", {
|
|
653
|
+
innerHTML: e.icons.fileDownload
|
|
654
|
+
}, null, 8, se),
|
|
655
|
+
a("span", null, u(e.FINAL_CONFIG.translations.exportPageButton), 1)
|
|
656
|
+
], 4)
|
|
657
|
+
])
|
|
658
|
+
])
|
|
659
|
+
], 12, K)
|
|
660
|
+
]),
|
|
661
|
+
a("div", {
|
|
662
|
+
class: "vue-ui-table__wrapper",
|
|
663
|
+
style: g(`max-height:${e.FINAL_CONFIG.maxHeight}px`),
|
|
664
|
+
ref: "tableWrapper"
|
|
665
|
+
}, [
|
|
666
|
+
a("table", re, [
|
|
667
|
+
a("thead", ne, [
|
|
668
|
+
a("tr", null, [
|
|
669
|
+
le,
|
|
670
|
+
(i(!0), c(b, null, _(t.tableHead, (n, o) => (i(), c("th", {
|
|
671
|
+
key: `thead_${o}`,
|
|
672
|
+
style: g(`overflow: visible;background:${e.FINAL_CONFIG.style.th.backgroundColor};color:${e.FINAL_CONFIG.style.th.color};outline:${e.FINAL_CONFIG.style.th.outline}`),
|
|
673
|
+
class: f({ "th-has-nan": t.hasNaN[o] })
|
|
674
|
+
}, [
|
|
675
|
+
e.hasNumericTypes && ([t.constants.TEXT, t.constants.DATE].includes(n.type) || n.isPercentage) ? (i(), c("span", oe, [
|
|
676
|
+
I(u(n.name) + " ", 1),
|
|
677
|
+
n.isPercentage ? (i(), c("span", ae, " / " + u(n.percentageTo), 1)) : N("", !0)
|
|
678
|
+
])) : (i(), c("span", ie, u(n.name), 1))
|
|
679
|
+
], 6))), 128))
|
|
680
|
+
]),
|
|
681
|
+
e.hasNumericTypes ? (i(), c(b, { key: 0 }, [
|
|
682
|
+
a("tr", null, [
|
|
683
|
+
ce,
|
|
684
|
+
(i(!0), c(b, null, _(t.tableHead, (n, o) => (i(), c("th", {
|
|
685
|
+
key: `thead_${o}`,
|
|
686
|
+
class: f({ "th-numeric": !0, "th-has-nan": t.hasNaN[o] }),
|
|
687
|
+
style: g(`background:${e.FINAL_CONFIG.style.th.backgroundColor};color:${e.FINAL_CONFIG.style.th.color};outline:${e.FINAL_CONFIG.style.th.outline}`)
|
|
688
|
+
}, [
|
|
689
|
+
n.sum && !t.hasNaN[o] ? (i(), c("span", ue, [
|
|
690
|
+
a("span", {
|
|
691
|
+
innerHTML: e.icons.sum,
|
|
692
|
+
style: { "margin-bottom": "-4px", "margin-right": "3px" }
|
|
693
|
+
}, null, 8, he),
|
|
694
|
+
I(" " + u(n.prefix) + " " + u(Number(e.getSum(o).toFixed(n.decimals)).toLocaleString()) + " " + u(n.suffix) + " ", 1),
|
|
695
|
+
t.percentages[o] && n.percentageTo && !n.isPercentage ? (i(), c("span", de, " (" + u(isNaN(e.getSum(o) / e.getSum(t.percentages[o].referenceIndex)) ? "-" : (e.getSum(o) / e.getSum(t.percentages[o].referenceIndex) * 100).toFixed(n.decimals)) + "%) ", 1)) : N("", !0)
|
|
696
|
+
])) : N("", !0)
|
|
697
|
+
], 6))), 128))
|
|
698
|
+
]),
|
|
699
|
+
a("tr", null, [
|
|
700
|
+
ge,
|
|
701
|
+
(i(!0), c(b, null, _(t.tableHead, (n, o) => (i(), c("th", {
|
|
702
|
+
key: `thead_${o}`,
|
|
703
|
+
class: f({ "th-numeric": !0, "th-has-nan": t.hasNaN[o] }),
|
|
704
|
+
style: g(`background:${e.FINAL_CONFIG.style.th.backgroundColor};color:${e.FINAL_CONFIG.style.th.color};outline:${e.FINAL_CONFIG.style.th.outline}`)
|
|
705
|
+
}, [
|
|
706
|
+
n.average && !t.hasNaN[o] ? (i(), c("span", ye, " ~ " + u(n.prefix) + " " + u(isNaN(e.getAverage(o)) ? "" : Number(e.getAverage(o).toFixed(n.decimals)).toLocaleString()) + " " + u(n.suffix), 1)) : N("", !0)
|
|
707
|
+
], 6))), 128))
|
|
708
|
+
]),
|
|
709
|
+
a("tr", null, [
|
|
710
|
+
Ne,
|
|
711
|
+
(i(!0), c(b, null, _(t.tableHead, (n, o) => (i(), c("th", {
|
|
712
|
+
key: `thead_${o}`,
|
|
713
|
+
class: f({ "th-has-nan": t.hasNaN[o] }),
|
|
714
|
+
style: g(`background:${e.FINAL_CONFIG.style.th.backgroundColor};color:${e.FINAL_CONFIG.style.th.color};outline:${e.FINAL_CONFIG.style.th.outline}`)
|
|
715
|
+
}, [
|
|
716
|
+
a("div", be, [
|
|
717
|
+
n.type === t.constants.DATE && t.dates[o] ? (i(), c("div", me, [
|
|
718
|
+
a("div", fe, [
|
|
719
|
+
a("div", _e, [
|
|
720
|
+
a("label", {
|
|
721
|
+
for: `from_${o}`
|
|
722
|
+
}, u(e.FINAL_CONFIG.translations.from), 9, Ce),
|
|
723
|
+
k(a("input", {
|
|
724
|
+
id: `from_${o}`,
|
|
725
|
+
type: "date",
|
|
726
|
+
"onUpdate:modelValue": (d) => t.dates[o].from = d,
|
|
727
|
+
onInput: (d) => {
|
|
728
|
+
e.filterBody(), e.setFilterDatesIndexes(o);
|
|
729
|
+
},
|
|
730
|
+
style: g(`background:${e.FINAL_CONFIG.style.inputs.backgroundColor};color:${e.FINAL_CONFIG.style.inputs.color};border:${e.FINAL_CONFIG.style.inputs.border}`)
|
|
731
|
+
}, null, 44, Ie), [
|
|
732
|
+
[w, t.dates[o].from]
|
|
733
|
+
])
|
|
734
|
+
]),
|
|
735
|
+
a("div", Fe, [
|
|
736
|
+
a("label", {
|
|
737
|
+
for: `to_${o}`
|
|
738
|
+
}, u(e.FINAL_CONFIG.translations.to), 9, ve),
|
|
739
|
+
k(a("input", {
|
|
740
|
+
id: `to_${o}`,
|
|
741
|
+
type: "date",
|
|
742
|
+
"onUpdate:modelValue": (d) => t.dates[o].to = d,
|
|
743
|
+
onInput: (d) => {
|
|
744
|
+
e.filterBody(), e.setFilterDatesIndexes(o);
|
|
745
|
+
},
|
|
746
|
+
style: g(`background:${e.FINAL_CONFIG.style.inputs.backgroundColor};color:${e.FINAL_CONFIG.style.inputs.color};border:${e.FINAL_CONFIG.style.inputs.border}`)
|
|
747
|
+
}, null, 44, ke), [
|
|
748
|
+
[w, t.dates[o].to]
|
|
749
|
+
])
|
|
750
|
+
])
|
|
751
|
+
]),
|
|
752
|
+
a("div", pe, [
|
|
753
|
+
n.isSort ? (i(), c("button", {
|
|
754
|
+
key: 0,
|
|
755
|
+
onClick: (d) => e.sortTh(o, d),
|
|
756
|
+
class: f({ "th-button-active": [t.constants.DESC, t.constants.ASC].includes(t.sorts[o]) }),
|
|
757
|
+
style: g(`background:${[t.constants.DESC, t.constants.ASC].includes(t.sorts[o]) ? "" : e.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[t.constants.DESC, t.constants.ASC].includes(t.sorts[o]) ? "" : e.FINAL_CONFIG.style.pagination.buttons.color}`)
|
|
758
|
+
}, [
|
|
759
|
+
t.sorts[o] === t.constants.ASC ? (i(), c("span", {
|
|
760
|
+
key: 0,
|
|
761
|
+
innerHTML: [t.constants.DATE].includes(n.type) ? e.icons.sort09 : e.icons.sortAZ
|
|
762
|
+
}, null, 8, Se)) : t.sorts[o] === t.constants.DESC ? (i(), c("span", {
|
|
763
|
+
key: 1,
|
|
764
|
+
innerHTML: [t.constants.DATE].includes(n.type) ? e.icons.sort90 : e.icons.sortZA
|
|
765
|
+
}, null, 8, Oe)) : (i(), c("span", {
|
|
766
|
+
key: 2,
|
|
767
|
+
innerHTML: e.icons.arrowSort
|
|
768
|
+
}, null, 8, Le))
|
|
769
|
+
], 14, we)) : N("", !0),
|
|
770
|
+
a("button", {
|
|
771
|
+
onClick: (d) => {
|
|
772
|
+
e.resetDates(o), e.resetFilter(o, n, d);
|
|
773
|
+
},
|
|
774
|
+
disabled: !t.filteredDatesIndexes[o] && e.isResetDisabled(o, n),
|
|
775
|
+
class: "th-reset"
|
|
776
|
+
}, " ✖ ", 8, Ae)
|
|
777
|
+
])
|
|
778
|
+
])) : N("", !0),
|
|
779
|
+
n.isSearch ? k((i(), c("input", {
|
|
780
|
+
key: 1,
|
|
781
|
+
placeholder: e.FINAL_CONFIG.translations.inputPlaceholder,
|
|
782
|
+
"onUpdate:modelValue": (d) => t.searches[o] = d,
|
|
783
|
+
onInput: r[4] || (r[4] = (d) => e.debounce(e.filterBody, 400)),
|
|
784
|
+
name: `search_${o}`,
|
|
785
|
+
style: g(`background:${e.FINAL_CONFIG.style.inputs.backgroundColor};color:${e.FINAL_CONFIG.style.inputs.color};border:${e.FINAL_CONFIG.style.inputs.border}`)
|
|
786
|
+
}, null, 44, De)), [
|
|
787
|
+
[w, t.searches[o]]
|
|
788
|
+
]) : N("", !0),
|
|
789
|
+
!t.hasNaN[o] && n.isSort && n.type !== t.constants.DATE ? (i(), c("button", {
|
|
790
|
+
key: 2,
|
|
791
|
+
onClick: (d) => e.sortTh(o, d),
|
|
792
|
+
class: f({ "th-button-active": [t.constants.DESC, t.constants.ASC].includes(t.sorts[o]) }),
|
|
793
|
+
style: g(`background:${[t.constants.DESC, t.constants.ASC].includes(t.sorts[o]) ? "" : e.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${[t.constants.DESC, t.constants.ASC].includes(t.sorts[o]) ? "" : e.FINAL_CONFIG.style.pagination.buttons.color}`)
|
|
794
|
+
}, [
|
|
795
|
+
t.sorts[o] === t.constants.ASC ? (i(), c("span", {
|
|
796
|
+
key: 0,
|
|
797
|
+
innerHTML: [t.constants.NUMERIC].includes(n.type) ? e.icons.sort09 : e.icons.sortZA
|
|
798
|
+
}, null, 8, Ge)) : t.sorts[o] === t.constants.DESC ? (i(), c("span", {
|
|
799
|
+
key: 1,
|
|
800
|
+
innerHTML: [t.constants.NUMERIC].includes(n.type) ? e.icons.sort90 : e.icons.sortAZ
|
|
801
|
+
}, null, 8, Me)) : (i(), c("span", {
|
|
802
|
+
key: 2,
|
|
803
|
+
innerHTML: e.icons.arrowSort
|
|
804
|
+
}, null, 8, Te))
|
|
805
|
+
], 14, xe)) : N("", !0),
|
|
806
|
+
n.isMultiselect ? (i(), c("button", {
|
|
807
|
+
key: 3,
|
|
808
|
+
onClick: (d) => e.toggleMultiselect(o, n, d),
|
|
809
|
+
innerHTML: e.icons.filter,
|
|
810
|
+
class: f({ "th-button-active": t.multiselects[o] && t.multiselects[o].length !== e.getDropdownOptions(o).length }),
|
|
811
|
+
style: g(`background:${t.multiselects[o] && t.multiselects[o].length !== e.getDropdownOptions(o).length ? "" : e.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.multiselects[o] && t.multiselects[o].length !== e.getDropdownOptions(o).length ? "" : e.FINAL_CONFIG.style.pagination.buttons.color}`)
|
|
812
|
+
}, null, 14, Ee)) : N("", !0),
|
|
813
|
+
t.currentSelectionSpan.col === o && e.canChart ? (i(), c("button", {
|
|
814
|
+
key: 4,
|
|
815
|
+
onClick: r[5] || (r[5] = (d) => t.showChart = !t.showChart),
|
|
816
|
+
innerHTML: e.icons.chart,
|
|
817
|
+
class: f({ "th-button-active": t.showChart }),
|
|
818
|
+
style: g(`background:${t.showChart ? "" : e.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${t.showChart ? "" : e.FINAL_CONFIG.style.pagination.buttons.color}`)
|
|
819
|
+
}, null, 14, ze)) : N("", !0),
|
|
820
|
+
n.rangeFilter && t.rangeFilters[o] && !t.hasNaN[o] ? (i(), c("div", Be, [
|
|
821
|
+
a("label", {
|
|
822
|
+
for: `rangeMin${o}`
|
|
823
|
+
}, [
|
|
824
|
+
Re,
|
|
825
|
+
I(" min "),
|
|
826
|
+
Pe
|
|
827
|
+
], 8, He),
|
|
828
|
+
k(a("input", {
|
|
829
|
+
type: "number",
|
|
830
|
+
id: `rangeMin${o}`,
|
|
831
|
+
max: t.immutableRangeFilters[o].max,
|
|
832
|
+
min: t.immutableRangeFilters[o].min,
|
|
833
|
+
"onUpdate:modelValue": (d) => t.rangeFilters[o].min = d,
|
|
834
|
+
onInput: r[6] || (r[6] = (d) => e.debounce(e.filterBody, 400)),
|
|
835
|
+
style: g(`background:${e.FINAL_CONFIG.style.inputs.backgroundColor};color:${e.FINAL_CONFIG.style.inputs.color};border:${e.FINAL_CONFIG.style.inputs.border}`)
|
|
836
|
+
}, null, 44, Ue), [
|
|
837
|
+
[
|
|
838
|
+
w,
|
|
839
|
+
t.rangeFilters[o].min,
|
|
840
|
+
void 0,
|
|
841
|
+
{ number: !0 }
|
|
842
|
+
]
|
|
843
|
+
]),
|
|
844
|
+
k(a("input", {
|
|
845
|
+
type: "number",
|
|
846
|
+
id: `rangeMax${o}`,
|
|
847
|
+
max: t.immutableRangeFilters[o].max,
|
|
848
|
+
min: t.immutableRangeFilters[o].min,
|
|
849
|
+
"onUpdate:modelValue": (d) => t.rangeFilters[o].max = d,
|
|
850
|
+
onInput: r[7] || (r[7] = (d) => e.debounce(e.filterBody, 400)),
|
|
851
|
+
style: g(`background:${e.FINAL_CONFIG.style.inputs.backgroundColor};color:${e.FINAL_CONFIG.style.inputs.color};border:${e.FINAL_CONFIG.style.inputs.border}`)
|
|
852
|
+
}, null, 44, Ve), [
|
|
853
|
+
[
|
|
854
|
+
w,
|
|
855
|
+
t.rangeFilters[o].max,
|
|
856
|
+
void 0,
|
|
857
|
+
{ number: !0 }
|
|
858
|
+
]
|
|
859
|
+
]),
|
|
860
|
+
a("label", {
|
|
861
|
+
for: `rangeMax${o}`
|
|
862
|
+
}, [
|
|
863
|
+
Xe,
|
|
864
|
+
I(" max "),
|
|
865
|
+
We
|
|
866
|
+
], 8, je)
|
|
867
|
+
])) : N("", !0),
|
|
868
|
+
e.canResetColumn(o, n) ? (i(), c("button", {
|
|
869
|
+
key: 6,
|
|
870
|
+
onClick: (d) => e.resetFilter(o, n, d),
|
|
871
|
+
disabled: e.isResetDisabled(o, n),
|
|
872
|
+
class: "th-reset"
|
|
873
|
+
}, " ✖ ", 8, Ye)) : N("", !0),
|
|
874
|
+
n.isMultiselect ? (i(), c("div", {
|
|
875
|
+
key: 7,
|
|
876
|
+
class: "th-dropdown",
|
|
877
|
+
"data-is-open": "false",
|
|
878
|
+
id: `th_dropdown_${o}`,
|
|
879
|
+
style: g(`background:${e.FINAL_CONFIG.style.dropdowns.backgroundColor};color:${e.FINAL_CONFIG.style.dropdowns.color}`)
|
|
880
|
+
}, [
|
|
881
|
+
a("button", {
|
|
882
|
+
class: "close-dropdown",
|
|
883
|
+
onClick: (d) => e.toggleMultiselect(o, n, d),
|
|
884
|
+
style: g(`background:${e.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${e.FINAL_CONFIG.style.closeButtons.color}`)
|
|
885
|
+
}, " ✖ ", 12, Ze),
|
|
886
|
+
(i(!0), c(b, null, _(e.getDropdownOptions(o), (d, y) => (i(), c("span", {
|
|
887
|
+
class: "th-option",
|
|
888
|
+
key: `th_option_${o}_${y}`,
|
|
889
|
+
onClick: (m) => e.selectDropdownOption(d, o),
|
|
890
|
+
onKeyup: [
|
|
891
|
+
S((m) => e.selectDropdownOption(d, o), ["enter"]),
|
|
892
|
+
S((m) => e.selectDropdownOption(d, o), ["space"])
|
|
893
|
+
],
|
|
894
|
+
style: g(`opacity:${e.isDropdownOptionSelected(d, o) ? 1 : 0.5}`),
|
|
895
|
+
tabindex: "0"
|
|
896
|
+
}, [
|
|
897
|
+
e.isDropdownOptionSelected(d, o) ? (i(), c("span", {
|
|
898
|
+
key: 0,
|
|
899
|
+
style: g(`color:${e.FINAL_CONFIG.style.dropdowns.icons.selected.color};margin-right:5px`),
|
|
900
|
+
class: "th-icon-green"
|
|
901
|
+
}, u(e.FINAL_CONFIG.style.dropdowns.icons.selected.unicode), 5)) : (i(), c("span", {
|
|
902
|
+
key: 1,
|
|
903
|
+
style: g(`color:${e.FINAL_CONFIG.style.dropdowns.icons.unselected.color};margin-right:5px`),
|
|
904
|
+
class: "th-icon-red"
|
|
905
|
+
}, u(e.FINAL_CONFIG.style.dropdowns.icons.unselected.unicode), 5)),
|
|
906
|
+
a("span", null, u(d), 1)
|
|
907
|
+
], 44, qe))), 128))
|
|
908
|
+
], 12, Ke)) : N("", !0)
|
|
909
|
+
])
|
|
910
|
+
], 6))), 128))
|
|
911
|
+
])
|
|
912
|
+
], 64)) : N("", !0),
|
|
913
|
+
a("tr", null, [
|
|
914
|
+
Je,
|
|
915
|
+
(i(!0), c(b, null, _(t.tableHead, (n, o) => (i(), c("th", {
|
|
916
|
+
key: `col_selector_${o}`,
|
|
917
|
+
class: f({ "vue-ui-table-col-selector": !t.hasNaN[o], "th-has-nan": t.hasNaN[o] }),
|
|
918
|
+
style: g(`background:${o === t.selectedColumn && !t.hasNaN[o] ? e.FINAL_CONFIG.style.th.selected.backgroundColor : e.FINAL_CONFIG.style.th.backgroundColor};color:${o === t.selectedColumn && !t.hasNaN[o] ? e.FINAL_CONFIG.style.th.selected.color : e.FINAL_CONFIG.style.th.color};outline:${e.FINAL_CONFIG.style.th.outline}`)
|
|
919
|
+
}, [
|
|
920
|
+
t.hasNaN[o] ? N("", !0) : (i(), c("div", {
|
|
921
|
+
key: 0,
|
|
922
|
+
innerHTML: t.tableHead[o].type === t.constants.NUMERIC ? e.icons.chevronDown : "",
|
|
923
|
+
class: f({ "col-selector": t.tableHead[o].type === t.constants.NUMERIC }),
|
|
924
|
+
tabindex: "0",
|
|
925
|
+
onClick: O((d) => e.selectColumn(o), ["stop"]),
|
|
926
|
+
onKeyup: S((d) => e.selectColumn(o), ["enter"])
|
|
927
|
+
}, null, 42, Qe))
|
|
928
|
+
], 6))), 128))
|
|
929
|
+
])
|
|
930
|
+
]),
|
|
931
|
+
a("tbody", {
|
|
932
|
+
onClick: r[8] || (r[8] = (...n) => e.closeAllDropdowns && e.closeAllDropdowns(...n)),
|
|
933
|
+
onKeydown: r[9] || (r[9] = (n) => e.navigateCell(n))
|
|
934
|
+
}, [
|
|
935
|
+
(i(!0), c(b, null, _(e.visibleRows, (n, o) => (i(), c("tr", {
|
|
936
|
+
key: `tbody_${o}`,
|
|
937
|
+
"data-row": o % 2 === 0 ? "odd" : "even",
|
|
938
|
+
class: f(`tr_${t.uid}`),
|
|
939
|
+
style: g(`${o % 2 === 0 ? `background:${e.FINAL_CONFIG.style.rows.odd.backgroundColor};color:${e.FINAL_CONFIG.style.rows.odd.color}` : `background:${e.FINAL_CONFIG.style.rows.even.backgroundColor};color:${e.FINAL_CONFIG.style.rows.even.color}`}`)
|
|
940
|
+
}, [
|
|
941
|
+
a("td", {
|
|
942
|
+
class: "vue-ui-table-td-iteration",
|
|
943
|
+
"data-row": o % 2 === 0 ? "odd" : "even"
|
|
944
|
+
}, u(n.absoluteIndex + 1), 9, et),
|
|
945
|
+
(i(!0), c(b, null, _(n.td, (d, y) => (i(), c("td", {
|
|
946
|
+
"data-row": o % 2 === 0 ? "odd" : "even",
|
|
947
|
+
key: `td_${o}_${y}`,
|
|
948
|
+
style: g(e.isNumeric(d) || l.dataset.header[y].type === t.constants.DATE ? "text-align:right;font-variant-numeric: tabular-nums;" : ""),
|
|
949
|
+
onClick: (m) => e.selectTd({
|
|
950
|
+
td: d,
|
|
951
|
+
rowIndex: o,
|
|
952
|
+
colIndex: y,
|
|
953
|
+
headerType: l.dataset.header[y].type,
|
|
954
|
+
event: m
|
|
955
|
+
}),
|
|
956
|
+
onKeyup: [
|
|
957
|
+
S((m) => e.selectTd({
|
|
958
|
+
td: d,
|
|
959
|
+
rowIndex: o,
|
|
960
|
+
colIndex: y,
|
|
961
|
+
headerType: l.dataset.header[y].type,
|
|
962
|
+
event: m
|
|
963
|
+
}), ["enter"]),
|
|
964
|
+
S((m) => e.selectTd({
|
|
965
|
+
td: d,
|
|
966
|
+
rowIndex: o,
|
|
967
|
+
colIndex: y,
|
|
968
|
+
headerType: l.dataset.header[y].type,
|
|
969
|
+
event: m
|
|
970
|
+
}), ["space"])
|
|
971
|
+
],
|
|
972
|
+
class: f({ "td-numeric": l.dataset.header[y].type === t.constants.NUMERIC, "td-focusable": !0, "td-has-nan": t.hasNaN[y] }),
|
|
973
|
+
id: `cell_${o}_${y}_${t.uid}`,
|
|
974
|
+
tabindex: "0"
|
|
975
|
+
}, [
|
|
976
|
+
n.meta && n.meta.markerIndices.includes(y) && n.meta.unicodeIcon ? (i(), c("span", {
|
|
977
|
+
key: 0,
|
|
978
|
+
style: g(`color:${n.meta.color};margin-right:3px`),
|
|
979
|
+
innerHTML: n.meta.unicodeIcon
|
|
980
|
+
}, null, 12, st)) : N("", !0),
|
|
981
|
+
l.dataset.header[y].type === t.constants.DATE ? (i(), c("span", rt, u(l.dataset.header[y].prefix) + " " + u(new Date(d).toLocaleString().slice(0, 10)) + " " + u(l.dataset.header[y].suffix), 1)) : l.dataset.header[y].isPercentage ? (i(), c("span", nt, u(Number((d * 100).toFixed(l.dataset.header[y].decimals)).toLocaleString()) + "% ", 1)) : t.percentages[y] && l.dataset.header[y].percentageTo && !l.dataset.header[y].isPercentage ? (i(), c("span", {
|
|
982
|
+
key: 3,
|
|
983
|
+
class: f({ "td-nan": isNaN(Number(d)) })
|
|
984
|
+
}, u(l.dataset.header[y].prefix) + " " + u(isNaN(Number(d)) ? `${d} is not ${t.constants.NUMERIC}` : Number(d.toFixed(l.dataset.header[y].decimals)).toLocaleString()) + " " + u(l.dataset.header[y].suffix) + " (" + u(isNaN(Number(d)) ? "" : Number((d / e.getSum(t.percentages[y].referenceIndex) * 100).toFixed(l.dataset.header[y].decimals)).toLocaleString()) + "%) ", 3)) : l.dataset.header[y].type === t.constants.NUMERIC ? (i(), c("span", {
|
|
985
|
+
key: 4,
|
|
986
|
+
class: f({ "td-nan": isNaN(Number(d)) })
|
|
987
|
+
}, u(l.dataset.header[y].prefix) + " " + u(isNaN(Number(d)) ? `${d} is not ${t.constants.NUMERIC}` : Number(d.toFixed(l.dataset.header[y].decimals)).toLocaleString()) + " " + u(l.dataset.header[y].suffix), 3)) : (i(), c("span", lt, u(l.dataset.header[y].prefix) + " " + u(d) + " " + u(l.dataset.header[y].suffix), 1))
|
|
988
|
+
], 46, tt))), 128))
|
|
989
|
+
], 14, $e))), 128))
|
|
990
|
+
], 32)
|
|
991
|
+
])
|
|
992
|
+
], 4),
|
|
993
|
+
a("div", {
|
|
994
|
+
class: f({ "td-selector-info": !0, "td-selector-info--active": t.currentSelectionSpan.col !== void 0 && t.currentSelectionSpan.rows.length }),
|
|
995
|
+
style: g(`background:${e.FINAL_CONFIG.style.infoBar.backgroundColor};color:${e.FINAL_CONFIG.style.infoBar.color}`)
|
|
996
|
+
}, [
|
|
997
|
+
t.currentSelectionSpan.col !== void 0 && t.currentSelectionSpan.rows.length ? (i(), c(b, { key: 0 }, [
|
|
998
|
+
a("div", {
|
|
999
|
+
innerHTML: e.icons.table,
|
|
1000
|
+
class: "td-selector-icon"
|
|
1001
|
+
}, null, 8, ot),
|
|
1002
|
+
a("span", null, [
|
|
1003
|
+
a("b", null, [
|
|
1004
|
+
I(u(l.dataset.header[t.currentSelectionSpan.col].name) + " ", 1),
|
|
1005
|
+
l.dataset.header[t.currentSelectionSpan.col].isPercentage ? (i(), c("span", at, " / " + u(l.dataset.header[t.percentages[t.currentSelectionSpan.col].referenceIndex].name), 1)) : N("", !0)
|
|
1006
|
+
]),
|
|
1007
|
+
a("span", it, [
|
|
1008
|
+
I(u(e.FINAL_CONFIG.translations.nb) + " : ", 1),
|
|
1009
|
+
a("b", ct, u(t.currentSelectionSpan.rows.length), 1)
|
|
1010
|
+
]),
|
|
1011
|
+
a("span", ut, [
|
|
1012
|
+
I(u(e.FINAL_CONFIG.translations.sum) + " : ", 1),
|
|
1013
|
+
l.dataset.header[t.currentSelectionSpan.col].isPercentage ? (i(), c("b", ht, u(e.selectedCellsCalculations.sumPercentage), 1)) : (i(), c("b", dt, u(l.dataset.header[t.currentSelectionSpan.col].prefix) + " " + u(e.selectedCellsCalculations.sumRegular) + " " + u(l.dataset.header[t.currentSelectionSpan.col].suffix), 1)),
|
|
1014
|
+
l.dataset.header[t.currentSelectionSpan.col].isPercentage ? (i(), c("b", gt, "%")) : N("", !0)
|
|
1015
|
+
]),
|
|
1016
|
+
a("span", yt, [
|
|
1017
|
+
I(u(e.FINAL_CONFIG.translations.average) + " : ", 1),
|
|
1018
|
+
l.dataset.header[t.currentSelectionSpan.col].isPercentage ? (i(), c("b", Nt, u(e.selectedCellsCalculations.averagePercentage), 1)) : (i(), c("b", bt, u(l.dataset.header[t.currentSelectionSpan.col].prefix) + " " + u(e.selectedCellsCalculations.averageRegular) + " " + u(l.dataset.header[t.currentSelectionSpan.col].suffix), 1)),
|
|
1019
|
+
l.dataset.header[t.currentSelectionSpan.col].isPercentage ? (i(), c("b", mt, "%")) : N("", !0)
|
|
1020
|
+
])
|
|
1021
|
+
]),
|
|
1022
|
+
a("button", {
|
|
1023
|
+
onClick: r[10] || (r[10] = (...n) => e.resetSelection && e.resetSelection(...n)),
|
|
1024
|
+
class: "td-selector-info-reset",
|
|
1025
|
+
style: g(`background:${e.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${e.FINAL_CONFIG.style.closeButtons.color};border-radius:${e.FINAL_CONFIG.style.closeButtons.borderRadius}`)
|
|
1026
|
+
}, " ✖ ", 4)
|
|
1027
|
+
], 64)) : N("", !0)
|
|
1028
|
+
], 6),
|
|
1029
|
+
t.bodyCopy.length > 10 ? (i(), c("div", ft, [
|
|
1030
|
+
I(u(e.FINAL_CONFIG.translations.totalRows) + " : " + u(l.dataset.body.length) + " | " + u(e.FINAL_CONFIG.translations.paginatorLabel) + " : ", 1),
|
|
1031
|
+
t.bodyCopy.length > 10 ? k((i(), c("select", {
|
|
1032
|
+
key: 0,
|
|
1033
|
+
id: "paginatorSelector",
|
|
1034
|
+
"onUpdate:modelValue": r[11] || (r[11] = (n) => t.itemsPerPage = n),
|
|
1035
|
+
onChange: r[12] || (r[12] = (...n) => e.resetSelection && e.resetSelection(...n)),
|
|
1036
|
+
style: g(`background:${e.FINAL_CONFIG.style.inputs.backgroundColor};color:${e.FINAL_CONFIG.style.inputs.color};border:${e.FINAL_CONFIG.style.inputs.border}`)
|
|
1037
|
+
}, [
|
|
1038
|
+
(i(!0), c(b, null, _(t.paginatorOptions, (n, o) => (i(), c(b, null, [
|
|
1039
|
+
t.bodyCopy.length > n || l.dataset.body.length === n ? (i(), c("option", {
|
|
1040
|
+
key: `paginator_option_${o}`
|
|
1041
|
+
}, u(n), 1)) : N("", !0)
|
|
1042
|
+
], 64))), 256))
|
|
1043
|
+
], 36)), [
|
|
1044
|
+
[
|
|
1045
|
+
R,
|
|
1046
|
+
t.itemsPerPage,
|
|
1047
|
+
void 0,
|
|
1048
|
+
{ number: !0 }
|
|
1049
|
+
]
|
|
1050
|
+
]) : N("", !0)
|
|
1051
|
+
])) : N("", !0),
|
|
1052
|
+
t.itemsPerPage >= 250 ? (i(), c("div", _t, [
|
|
1053
|
+
a("span", {
|
|
1054
|
+
innerHTML: e.icons.warning
|
|
1055
|
+
}, null, 8, Ct),
|
|
1056
|
+
I(u(e.FINAL_CONFIG.translations.sizeWarning), 1)
|
|
1057
|
+
])) : N("", !0),
|
|
1058
|
+
e.pages.length > 1 && e.pages.length <= 10 ? (i(), c("div", {
|
|
1059
|
+
key: 2,
|
|
1060
|
+
class: "vue-ui-table-navigation-indicator",
|
|
1061
|
+
style: g(`background:${e.FINAL_CONFIG.style.pagination.navigationIndicator.backgroundColor};width:calc(${t.currentPage / (e.pages.length - 1) * 100}%)`)
|
|
1062
|
+
}, null, 4)) : N("", !0),
|
|
1063
|
+
e.pages.length > 1 ? (i(), c("div", It, [
|
|
1064
|
+
a("button", {
|
|
1065
|
+
class: "vue-ui-table-navigation",
|
|
1066
|
+
onClick: r[13] || (r[13] = O((n) => e.navigate("previous"), ["stop"])),
|
|
1067
|
+
innerHTML: e.icons.chevronLeft,
|
|
1068
|
+
disabled: t.currentPage === 0,
|
|
1069
|
+
style: g(`background:${e.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${e.FINAL_CONFIG.style.pagination.buttons.color};opacity:${t.currentPage === 0 ? e.FINAL_CONFIG.style.pagination.buttons.opacityDisabled : 1}`)
|
|
1070
|
+
}, null, 12, Ft),
|
|
1071
|
+
e.pages.length > 3 ? (i(), c(b, { key: 0 }, [
|
|
1072
|
+
a("button", {
|
|
1073
|
+
class: "vue-ui-table-navigation",
|
|
1074
|
+
onClick: r[14] || (r[14] = O((n) => e.navigate(1), ["stop"])),
|
|
1075
|
+
disabled: t.currentPage === 0,
|
|
1076
|
+
style: g(`background:${e.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${e.FINAL_CONFIG.style.pagination.buttons.color};opacity:${t.currentPage === 0 ? e.FINAL_CONFIG.style.pagination.buttons.opacityDisabled : 1}`)
|
|
1077
|
+
}, " 1 ", 12, vt),
|
|
1078
|
+
e.pages.length > 10 ? (i(), c("div", kt, [
|
|
1079
|
+
a("label", pt, u(e.FINAL_CONFIG.translations.page) + " " + u(t.currentPage + 1) + " / " + u(e.pages.length), 1),
|
|
1080
|
+
a("input", {
|
|
1081
|
+
class: "vue-ui-table-page-scroller",
|
|
1082
|
+
id: "pageScroller",
|
|
1083
|
+
type: "range",
|
|
1084
|
+
step: "1",
|
|
1085
|
+
min: 0,
|
|
1086
|
+
max: e.pages.length - 1,
|
|
1087
|
+
onInput: r[15] || (r[15] = (n) => e.updateCurrentPage(n)),
|
|
1088
|
+
value: t.currentPage,
|
|
1089
|
+
style: g(`background:${e.FINAL_CONFIG.style.inputs.backgroundColor};color:${e.FINAL_CONFIG.style.inputs.color};border:${e.FINAL_CONFIG.style.inputs.border};accent-color:${e.FINAL_CONFIG.style.inputs.accentColor}`)
|
|
1090
|
+
}, null, 44, wt)
|
|
1091
|
+
])) : (i(), c("span", St, u(e.FINAL_CONFIG.translations.page) + " " + u(t.currentPage + 1) + " / " + u(e.pages.length), 1)),
|
|
1092
|
+
a("button", {
|
|
1093
|
+
class: "vue-ui-table-navigation",
|
|
1094
|
+
onClick: r[16] || (r[16] = O((n) => e.navigate(e.pages.length), ["stop"])),
|
|
1095
|
+
disabled: t.currentPage === e.pages.length - 1,
|
|
1096
|
+
style: g(`background:${e.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${e.FINAL_CONFIG.style.pagination.buttons.color};opacity:${t.currentPage === e.pages.length - 1 ? e.FINAL_CONFIG.style.pagination.buttons.opacityDisabled : 1}`)
|
|
1097
|
+
}, u(e.pages.length), 13, Ot)
|
|
1098
|
+
], 64)) : (i(), c(b, { key: 1 }, [
|
|
1099
|
+
I(u(e.FINAL_CONFIG.translations.page) + " " + u(t.currentPage + 1) + " / " + u(e.pages.length), 1)
|
|
1100
|
+
], 64)),
|
|
1101
|
+
a("button", {
|
|
1102
|
+
class: "vue-ui-table-navigation",
|
|
1103
|
+
onClick: r[17] || (r[17] = O((n) => e.navigate("next"), ["stop"])),
|
|
1104
|
+
innerHTML: e.icons.chevronRight,
|
|
1105
|
+
disabled: t.currentPage === e.pages.length - 1,
|
|
1106
|
+
style: g(`background:${e.FINAL_CONFIG.style.pagination.buttons.backgroundColor};color:${e.FINAL_CONFIG.style.pagination.buttons.color};opacity:${t.currentPage === e.pages.length - 1 ? e.FINAL_CONFIG.style.pagination.buttons.opacityDisabled : 1}`)
|
|
1107
|
+
}, null, 12, Lt)
|
|
1108
|
+
])) : N("", !0),
|
|
1109
|
+
t.showChart && e.canChart ? (i(), c("div", {
|
|
1110
|
+
key: 4,
|
|
1111
|
+
class: "vue-ui-table-chart-modal",
|
|
1112
|
+
style: g(`top:${t.clientY}px; left:${t.clientX}px;background:${e.FINAL_CONFIG.style.chart.modal.backgroundColor};color:${e.FINAL_CONFIG.style.chart.modal.color}`)
|
|
1113
|
+
}, [
|
|
1114
|
+
a("button", {
|
|
1115
|
+
class: "close-chart-modal",
|
|
1116
|
+
onClick: r[18] || (r[18] = (n) => t.showChart = !1),
|
|
1117
|
+
style: g(`background:${e.FINAL_CONFIG.style.closeButtons.backgroundColor};color:${e.FINAL_CONFIG.style.closeButtons.color};border-radius:${e.FINAL_CONFIG.style.closeButtons.borderRadius}`)
|
|
1118
|
+
}, " ✖ ", 4),
|
|
1119
|
+
a("div", At, [
|
|
1120
|
+
e.availableDonutCategories.length ? (i(), c("button", {
|
|
1121
|
+
key: 0,
|
|
1122
|
+
onClick: r[19] || (r[19] = (n) => t.showDonutOptions = !0),
|
|
1123
|
+
innerHTML: e.icons.donut,
|
|
1124
|
+
class: f({ "is-active-chart": t.chart.type === t.constants.DONUT || t.showDonutOptions }),
|
|
1125
|
+
style: g(`background:${t.chart.type === t.constants.DONUT || t.showDonutOptions ? e.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor : e.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${t.chart.type === t.constants.DONUT || t.showDonutOptions ? e.FINAL_CONFIG.style.chart.modal.buttons.selected.color : e.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)
|
|
1126
|
+
}, null, 14, Dt)) : N("", !0),
|
|
1127
|
+
a("button", {
|
|
1128
|
+
onClick: r[20] || (r[20] = (n) => {
|
|
1129
|
+
t.chart.type = t.constants.LINE, t.showDonutOptions = !1;
|
|
1130
|
+
}),
|
|
1131
|
+
innerHTML: e.icons.chart,
|
|
1132
|
+
class: f({ "is-active-chart": t.chart.type === t.constants.LINE && !t.showDonutOptions }),
|
|
1133
|
+
style: g(`background:${t.chart.type === t.constants.LINE && !t.showDonutOptions ? e.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor : e.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${t.chart.type === t.constants.LINE && !t.showDonutOptions ? e.FINAL_CONFIG.style.chart.modal.buttons.selected.color : e.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)
|
|
1134
|
+
}, null, 14, xt),
|
|
1135
|
+
a("button", {
|
|
1136
|
+
onClick: r[21] || (r[21] = (n) => {
|
|
1137
|
+
t.chart.type = t.constants.BAR, t.showDonutOptions = !1;
|
|
1138
|
+
}),
|
|
1139
|
+
innerHTML: e.icons.bar,
|
|
1140
|
+
class: f({ "is-active-chart": t.chart.type === t.constants.BAR && !t.showDonutOptions }),
|
|
1141
|
+
style: g(`background:${t.chart.type === t.constants.BAR && !t.showDonutOptions ? e.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor : e.FINAL_CONFIG.style.chart.modal.buttons.unselected.backgroundColor};color:${t.chart.type === t.constants.BAR && !t.showDonutOptions ? e.FINAL_CONFIG.style.chart.modal.buttons.selected.color : e.FINAL_CONFIG.style.chart.modal.buttons.unselected.color}`)
|
|
1142
|
+
}, null, 14, Gt)
|
|
1143
|
+
]),
|
|
1144
|
+
a("div", Mt, [
|
|
1145
|
+
a("b", null, [
|
|
1146
|
+
I(u(l.dataset.header[t.currentSelectionSpan.col].name) + " ", 1),
|
|
1147
|
+
l.dataset.header[t.currentSelectionSpan.col].isPercentage && l.dataset.header[t.currentSelectionSpan.col].percentageTo ? (i(), c("span", Tt, " / " + u(l.dataset.header[t.percentages[t.currentSelectionSpan.col].referenceIndex].name), 1)) : N("", !0),
|
|
1148
|
+
t.chart.type === t.constants.DONUT && t.selectedDonutCategory && t.selectedDonutCategory.name ? (i(), c("span", Et, u(e.FINAL_CONFIG.translations.by) + " " + u(t.selectedDonutCategory.name), 1)) : N("", !0)
|
|
1149
|
+
])
|
|
1150
|
+
]),
|
|
1151
|
+
a("div", zt, [
|
|
1152
|
+
t.showDonutOptions && e.availableDonutCategories.length ? (i(), c("div", {
|
|
1153
|
+
key: 0,
|
|
1154
|
+
style: g(`background:${e.FINAL_CONFIG.style.chart.modal.backgroundColor};color:${e.FINAL_CONFIG.style.chart.modal.color}`)
|
|
1155
|
+
}, [
|
|
1156
|
+
a("fieldset", Bt, [
|
|
1157
|
+
a("legend", null, u(e.FINAL_CONFIG.translations.chooseCategoryColumn), 1),
|
|
1158
|
+
a("div", Ht, [
|
|
1159
|
+
(i(!0), c(b, null, _(e.availableDonutCategories, (n, o) => (i(), c("div", {
|
|
1160
|
+
key: `donut_radio_${o}`,
|
|
1161
|
+
class: "vue-ui-table-fieldset-option"
|
|
1162
|
+
}, [
|
|
1163
|
+
a("input", {
|
|
1164
|
+
type: "radio",
|
|
1165
|
+
name: n.name,
|
|
1166
|
+
id: n.name,
|
|
1167
|
+
checked: t.selectedDonutCategory && n.name === t.selectedDonutCategory.name,
|
|
1168
|
+
onInput: (d) => t.selectedDonutCategory = e.availableDonutCategories[o],
|
|
1169
|
+
style: g(`background:${e.FINAL_CONFIG.style.inputs.backgroundColor};color:${e.FINAL_CONFIG.style.inputs.color};border:${e.FINAL_CONFIG.style.inputs.border};accent-color:${e.FINAL_CONFIG.style.inputs.accentColor}`)
|
|
1170
|
+
}, null, 44, Rt),
|
|
1171
|
+
a("label", {
|
|
1172
|
+
for: n.name
|
|
1173
|
+
}, u(n.name), 9, Pt)
|
|
1174
|
+
]))), 128))
|
|
1175
|
+
]),
|
|
1176
|
+
a("button", {
|
|
1177
|
+
class: "vue-ui-table-generate-donut",
|
|
1178
|
+
disabled: !t.selectedDonutCategory,
|
|
1179
|
+
onClick: r[22] || (r[22] = (...n) => e.applyDonutOption && e.applyDonutOption(...n)),
|
|
1180
|
+
style: g(`background:${e.FINAL_CONFIG.style.chart.modal.buttons.selected.backgroundColor};color:${e.FINAL_CONFIG.style.chart.modal.buttons.selected.color}`)
|
|
1181
|
+
}, [
|
|
1182
|
+
a("div", {
|
|
1183
|
+
style: { "margin-bottom": "-3px" },
|
|
1184
|
+
innerHTML: e.icons.donut
|
|
1185
|
+
}, null, 8, Vt),
|
|
1186
|
+
I(" " + u(e.FINAL_CONFIG.translations.makeDonut), 1)
|
|
1187
|
+
], 12, Ut)
|
|
1188
|
+
])
|
|
1189
|
+
], 4)) : N("", !0),
|
|
1190
|
+
[t.constants.BAR, t.constants.LINE].includes(t.chart.type) && !t.showDonutOptions ? (i(), c(b, { key: 1 }, [
|
|
1191
|
+
(i(), c("svg", {
|
|
1192
|
+
viewBox: `0 0 ${t.chart.width} ${t.chart.height}`,
|
|
1193
|
+
class: "vue-ui-table-chart-svg",
|
|
1194
|
+
style: g(`background:${e.FINAL_CONFIG.style.chart.layout.backgroundColor}`)
|
|
1195
|
+
}, [
|
|
1196
|
+
a("defs", null, [
|
|
1197
|
+
a("marker", {
|
|
1198
|
+
id: "arrowhead",
|
|
1199
|
+
markerWidth: e.FINAL_CONFIG.style.chart.layout.progression.arrowSize,
|
|
1200
|
+
markerHeight: e.FINAL_CONFIG.style.chart.layout.progression.arrowSize,
|
|
1201
|
+
refX: "0",
|
|
1202
|
+
refY: e.FINAL_CONFIG.style.chart.layout.progression.arrowSize / 2,
|
|
1203
|
+
orient: "auto"
|
|
1204
|
+
}, [
|
|
1205
|
+
a("polygon", {
|
|
1206
|
+
points: `0 0, ${e.FINAL_CONFIG.style.chart.layout.progression.arrowSize} ${e.FINAL_CONFIG.style.chart.layout.progression.arrowSize / 2}, 0 ${e.FINAL_CONFIG.style.chart.layout.progression.arrowSize}`,
|
|
1207
|
+
fill: e.FINAL_CONFIG.style.chart.layout.progression.stroke
|
|
1208
|
+
}, null, 8, Wt)
|
|
1209
|
+
], 8, Xt)
|
|
1210
|
+
]),
|
|
1211
|
+
a("g", null, [
|
|
1212
|
+
a("line", {
|
|
1213
|
+
x1: 0,
|
|
1214
|
+
x2: t.chart.width,
|
|
1215
|
+
y1: e.chartData.zero,
|
|
1216
|
+
y2: e.chartData.zero,
|
|
1217
|
+
stroke: e.FINAL_CONFIG.style.chart.layout.axis.stroke,
|
|
1218
|
+
"stroke-width": e.FINAL_CONFIG.style.chart.layout.axis.strokeWidth,
|
|
1219
|
+
"stroke-linecap": "round"
|
|
1220
|
+
}, null, 8, Yt),
|
|
1221
|
+
a("line", {
|
|
1222
|
+
x1: 0,
|
|
1223
|
+
x2: 0,
|
|
1224
|
+
y1: 0,
|
|
1225
|
+
y2: t.chart.height,
|
|
1226
|
+
stroke: e.FINAL_CONFIG.style.chart.layout.axis.stroke,
|
|
1227
|
+
"stroke-width": e.FINAL_CONFIG.style.chart.layout.axis.strokeWidth,
|
|
1228
|
+
"stroke-linecap": "round"
|
|
1229
|
+
}, null, 8, Kt)
|
|
1230
|
+
]),
|
|
1231
|
+
t.chart.type === t.constants.LINE ? (i(!0), c(b, { key: 0 }, _(e.chartData.plots, (n, o) => (i(), c("g", {
|
|
1232
|
+
key: `trap_fill_${o}`
|
|
1233
|
+
}, [
|
|
1234
|
+
a("rect", {
|
|
1235
|
+
x: o * e.chartData.slot,
|
|
1236
|
+
y: 0,
|
|
1237
|
+
width: e.chartData.slot,
|
|
1238
|
+
height: t.chart.height,
|
|
1239
|
+
fill: t.selectedPlot === o ? "rgba(0,0,0,0.03)" : "transparent"
|
|
1240
|
+
}, null, 8, Zt)
|
|
1241
|
+
]))), 128)) : N("", !0),
|
|
1242
|
+
(i(!0), c(b, null, _(e.chartData.plots, (n, o) => (i(), c("g", {
|
|
1243
|
+
key: `plot_${o}`
|
|
1244
|
+
}, [
|
|
1245
|
+
t.chart.type === t.constants.BAR ? (i(), c(b, { key: 0 }, [
|
|
1246
|
+
qt,
|
|
1247
|
+
a("rect", {
|
|
1248
|
+
x: n.x - e.chartData.slot / 2,
|
|
1249
|
+
y: e.chartData.isAllNegative ? 0 : e.calcRectY(n.value, n.y),
|
|
1250
|
+
height: n.value >= 0 ? e.chartData.zero - n.y : e.chartData.isAllNegative ? n.y : n.y - e.chartData.zero,
|
|
1251
|
+
width: e.chartData.slot,
|
|
1252
|
+
fill: e.FINAL_CONFIG.style.chart.layout.bar.fill ? e.FINAL_CONFIG.style.chart.layout.bar.fill : t.selectedPlot === o ? n.value >= 0 ? "url(#barGradientSelected)" : "url(#barGradientSelectedNeg)" : (n.value >= 0, "url(#barGradient)"),
|
|
1253
|
+
stroke: e.FINAL_CONFIG.style.chart.layout.bar.stroke,
|
|
1254
|
+
"stroke-width": "1"
|
|
1255
|
+
}, null, 8, Jt),
|
|
1256
|
+
t.selectedPlot === o ? (i(), c("foreignObject", {
|
|
1257
|
+
key: 0,
|
|
1258
|
+
x: n.x - (e.chartData.slot < 100 ? 50 : e.chartData.slot / 2),
|
|
1259
|
+
y: n.value >= 0 ? n.y - 32 : n.y + 4,
|
|
1260
|
+
height: "20",
|
|
1261
|
+
width: e.chartData.slot < 100 ? 100 : e.chartData.slot,
|
|
1262
|
+
style: { overflow: "visible" }
|
|
1263
|
+
}, [
|
|
1264
|
+
a("div", {
|
|
1265
|
+
style: g(`width:100%;text-align:center;font-size:20px;color:${e.FINAL_CONFIG.style.chart.layout.labels.color}`)
|
|
1266
|
+
}, u(n.prefix) + " " + u(Number(n.value.toFixed(l.dataset.header[t.currentSelectionSpan.col].decimals)).toLocaleString()) + " " + u(n.suffix), 5)
|
|
1267
|
+
], 8, Qt)) : N("", !0)
|
|
1268
|
+
], 64)) : N("", !0),
|
|
1269
|
+
t.chart.type === t.constants.LINE ? (i(), c(b, { key: 1 }, [
|
|
1270
|
+
o + 1 < e.chartData.plots.length ? (i(), c("line", {
|
|
1271
|
+
key: 0,
|
|
1272
|
+
x1: n.x,
|
|
1273
|
+
y1: n.y,
|
|
1274
|
+
x2: e.chartData.plots[o + 1].x,
|
|
1275
|
+
y2: e.chartData.plots[o + 1].y,
|
|
1276
|
+
"stroke-width": e.FINAL_CONFIG.style.chart.layout.line.strokeWidth,
|
|
1277
|
+
stroke: e.FINAL_CONFIG.style.chart.layout.line.stroke
|
|
1278
|
+
}, null, 8, $t)) : N("", !0),
|
|
1279
|
+
t.selectedPlot === o ? (i(), c("line", {
|
|
1280
|
+
key: 1,
|
|
1281
|
+
x1: n.x,
|
|
1282
|
+
y1: n.y,
|
|
1283
|
+
x2: n.x,
|
|
1284
|
+
y2: t.chart.height,
|
|
1285
|
+
stroke: e.FINAL_CONFIG.style.chart.layout.line.selector.stroke,
|
|
1286
|
+
"stroke-width": e.FINAL_CONFIG.style.chart.layout.line.selector.strokeWidth,
|
|
1287
|
+
"stroke-dasharray": e.FINAL_CONFIG.style.chart.layout.line.selector.strokeDasharray
|
|
1288
|
+
}, null, 8, es)) : N("", !0),
|
|
1289
|
+
a("circle", {
|
|
1290
|
+
cx: n.x,
|
|
1291
|
+
cy: n.y,
|
|
1292
|
+
r: t.selectedPlot === o ? e.FINAL_CONFIG.style.chart.layout.line.plot.radius.selected : e.FINAL_CONFIG.style.chart.layout.line.plot.radius.unselected,
|
|
1293
|
+
fill: e.FINAL_CONFIG.style.chart.layout.line.plot.fill,
|
|
1294
|
+
stroke: e.FINAL_CONFIG.style.chart.layout.line.plot.stroke,
|
|
1295
|
+
"stroke-width": e.FINAL_CONFIG.style.chart.layout.line.plot.strokeWidth
|
|
1296
|
+
}, null, 8, ts),
|
|
1297
|
+
t.selectedPlot === o ? (i(), c("foreignObject", {
|
|
1298
|
+
key: 2,
|
|
1299
|
+
x: n.x - (e.chartData.slot < 100 ? 50 : e.chartData.slot / 2),
|
|
1300
|
+
y: e.placeLabelOnTopOrBottom({
|
|
1301
|
+
previousPlot: e.chartData.plots[o - 1],
|
|
1302
|
+
currentPlot: n,
|
|
1303
|
+
nextPlot: e.chartData.plots[o + 1]
|
|
1304
|
+
}),
|
|
1305
|
+
height: "20",
|
|
1306
|
+
width: e.chartData.slot < 100 ? 100 : e.chartData.slot,
|
|
1307
|
+
style: { overflow: "visible" }
|
|
1308
|
+
}, [
|
|
1309
|
+
a("div", {
|
|
1310
|
+
style: g(`width:100%;text-align:center;font-size:20px;color:${e.FINAL_CONFIG.style.chart.layout.labels.color}`)
|
|
1311
|
+
}, u(n.prefix) + " " + u(Number(n.value.toFixed(l.dataset.header[t.currentSelectionSpan.col].decimals)).toLocaleString()) + " " + u(n.suffix), 5)
|
|
1312
|
+
], 8, ss)) : N("", !0)
|
|
1313
|
+
], 64)) : N("", !0)
|
|
1314
|
+
]))), 128)),
|
|
1315
|
+
(i(!0), c(b, null, _(e.chartData.plots, (n, o) => (i(), c("g", {
|
|
1316
|
+
key: `trap_${o}`
|
|
1317
|
+
}, [
|
|
1318
|
+
a("rect", {
|
|
1319
|
+
x: o * e.chartData.slot,
|
|
1320
|
+
y: 0,
|
|
1321
|
+
width: e.chartData.slot,
|
|
1322
|
+
height: t.chart.height,
|
|
1323
|
+
fill: "transparent",
|
|
1324
|
+
onMouseenter: (d) => t.selectedPlot = o,
|
|
1325
|
+
onMouseleave: r[23] || (r[23] = (d) => t.selectedPlot = void 0)
|
|
1326
|
+
}, null, 40, rs)
|
|
1327
|
+
]))), 128)),
|
|
1328
|
+
e.chartData.progression && e.chartData.plots.length > 2 ? (i(), c("line", {
|
|
1329
|
+
key: 1,
|
|
1330
|
+
x1: e.chartData.progression.x1,
|
|
1331
|
+
y1: e.chartData.progression.y1,
|
|
1332
|
+
x2: e.chartData.progression.x2,
|
|
1333
|
+
y2: e.chartData.progression.y2,
|
|
1334
|
+
stroke: e.FINAL_CONFIG.style.chart.layout.progression.stroke,
|
|
1335
|
+
"stroke-width": e.FINAL_CONFIG.style.chart.layout.progression.strokeWidth,
|
|
1336
|
+
"stroke-dasharray": e.FINAL_CONFIG.style.chart.layout.progression.strokeDasharray,
|
|
1337
|
+
"marker-end": "url(#arrowhead)"
|
|
1338
|
+
}, null, 8, ns)) : N("", !0)
|
|
1339
|
+
], 12, jt)),
|
|
1340
|
+
e.chartData.plots.length >= 2 ? (i(), c("div", {
|
|
1341
|
+
key: 0,
|
|
1342
|
+
class: "chart-trend",
|
|
1343
|
+
style: g(`color:${e.FINAL_CONFIG.style.chart.modal.color}`)
|
|
1344
|
+
}, [
|
|
1345
|
+
ls,
|
|
1346
|
+
I(" Trend: " + u((e.chartData.progression.trend * 100).toFixed(1)) + " % ", 1)
|
|
1347
|
+
], 4)) : N("", !0)
|
|
1348
|
+
], 64)) : N("", !0),
|
|
1349
|
+
[t.constants.DONUT].includes(t.chart.type) && !t.showDonutOptions ? (i(), c(b, { key: 2 }, [
|
|
1350
|
+
(i(), c("svg", {
|
|
1351
|
+
viewBox: "0 0 100 100",
|
|
1352
|
+
style: g(`max-width:100%; overflow: visible; padding: 0 24px;background:${e.FINAL_CONFIG.style.chart.layout.backgroundColor}`),
|
|
1353
|
+
class: "vue-ui-table-donut-chart"
|
|
1354
|
+
}, [
|
|
1355
|
+
(i(!0), c(b, null, _(t.currentDonut, (n, o) => (i(), c("path", {
|
|
1356
|
+
key: `arc_${o}`,
|
|
1357
|
+
d: n.path,
|
|
1358
|
+
stroke: `${n.color}CC`,
|
|
1359
|
+
"stroke-width": 20,
|
|
1360
|
+
fill: "none"
|
|
1361
|
+
}, null, 8, os))), 128)),
|
|
1362
|
+
(i(!0), c(b, null, _(t.currentDonut, (n, o) => (i(), c("foreignObject", {
|
|
1363
|
+
key: `text_marker_${o}`,
|
|
1364
|
+
x: e.calcDonutMarkerLabelPositionX(n) - 15,
|
|
1365
|
+
y: n.center.endY - 15,
|
|
1366
|
+
height: "30",
|
|
1367
|
+
width: "30",
|
|
1368
|
+
style: { overflow: "visible", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
1369
|
+
}, [
|
|
1370
|
+
e.isArcBigEnough(n) ? (i(), c("div", {
|
|
1371
|
+
key: 0,
|
|
1372
|
+
class: "vue-ui-table-donut-label",
|
|
1373
|
+
style: g(`color:${e.FINAL_CONFIG.style.chart.layout.labels.color}`)
|
|
1374
|
+
}, [
|
|
1375
|
+
a("b", null, u(e.displayArcPercentage(n, t.currentDonut)), 1),
|
|
1376
|
+
a("span", is, u(n.name), 1)
|
|
1377
|
+
], 4)) : N("", !0)
|
|
1378
|
+
], 8, as))), 128)),
|
|
1379
|
+
a("text", {
|
|
1380
|
+
x: 50,
|
|
1381
|
+
y: 42,
|
|
1382
|
+
"text-anchor": "middle",
|
|
1383
|
+
"font-size": "6",
|
|
1384
|
+
fill: e.FINAL_CONFIG.style.chart.layout.labels.color
|
|
1385
|
+
}, u(e.FINAL_CONFIG.translations.total), 9, cs),
|
|
1386
|
+
a("text", {
|
|
1387
|
+
x: 50,
|
|
1388
|
+
y: 48,
|
|
1389
|
+
"text-anchor": "middle",
|
|
1390
|
+
"font-size": "4",
|
|
1391
|
+
fill: e.FINAL_CONFIG.style.chart.layout.labels.color
|
|
1392
|
+
}, u(l.dataset.header[t.currentSelectionSpan.col].prefix) + " " + u(e.donutHollowLabels.total) + " " + u(l.dataset.header[t.currentSelectionSpan.col].isPercentage ? "%" : "") + " " + u(l.dataset.header[t.currentSelectionSpan.col].suffix), 9, us),
|
|
1393
|
+
a("text", {
|
|
1394
|
+
x: 50,
|
|
1395
|
+
y: 56,
|
|
1396
|
+
"text-anchor": "middle",
|
|
1397
|
+
"font-size": "6",
|
|
1398
|
+
fill: e.FINAL_CONFIG.style.chart.layout.labels.color
|
|
1399
|
+
}, u(e.FINAL_CONFIG.translations.average), 9, hs),
|
|
1400
|
+
a("text", {
|
|
1401
|
+
x: 50,
|
|
1402
|
+
y: 62,
|
|
1403
|
+
"text-anchor": "middle",
|
|
1404
|
+
"font-size": "4",
|
|
1405
|
+
fill: e.FINAL_CONFIG.style.chart.layout.labels.color
|
|
1406
|
+
}, u(l.dataset.header[t.currentSelectionSpan.col].prefix) + " " + u(e.donutHollowLabels.average) + " " + u(l.dataset.header[t.currentSelectionSpan.col].isPercentage ? "%" : "") + " " + u(l.dataset.header[t.currentSelectionSpan.col].suffix), 9, ds)
|
|
1407
|
+
], 4)),
|
|
1408
|
+
a("div", gs, [
|
|
1409
|
+
(i(!0), c(b, null, _(t.currentDonut.filter((n) => n.value > 0), (n, o) => (i(), c("div", {
|
|
1410
|
+
class: "vue-ui-table-donut-legend-item",
|
|
1411
|
+
key: `donut_legend_${o}`,
|
|
1412
|
+
style: g(`color:${e.FINAL_CONFIG.style.chart.layout.labels.color}`)
|
|
1413
|
+
}, [
|
|
1414
|
+
a("span", {
|
|
1415
|
+
style: g(`color:${n.color}`)
|
|
1416
|
+
}, "●", 4),
|
|
1417
|
+
a("span", null, u(n.name) + " : ", 1),
|
|
1418
|
+
a("b", null, u(l.dataset.header[t.currentSelectionSpan.col].prefix) + " " + u(e.getDonutLegendValue(n.absoluteValue)) + " " + u(l.dataset.header[t.currentSelectionSpan.col].isPercentage ? "%" : "") + " " + u(l.dataset.header[t.currentSelectionSpan.col].suffix), 1),
|
|
1419
|
+
a("span", null, "(" + u((n.proportion * 100).toFixed(1)) + "%)", 1)
|
|
1420
|
+
], 4))), 128))
|
|
1421
|
+
])
|
|
1422
|
+
], 64)) : N("", !0)
|
|
1423
|
+
], 512)
|
|
1424
|
+
], 4)) : N("", !0)
|
|
1425
|
+
], 4);
|
|
1426
|
+
}
|
|
1427
|
+
const fs = /* @__PURE__ */ j(X, [["render", ys], ["__scopeId", "data-v-5a108fbd"]]);
|
|
1428
|
+
export {
|
|
1429
|
+
fs as default
|
|
1430
|
+
};
|