@burdenoff/microfe-bigconsole 2026.1115.2 → 2026.1115.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/bigconsole/components/builder/inspector/AppearanceSection.js +11 -5
- package/dist/bigconsole/components/widgets/chart/ChartConfig.d.ts +5 -0
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +110 -104
- package/dist/bigconsole/components/widgets/chart/ChartWidget.js +137 -130
- package/dist/bigconsole/components/widgets/chart/charts/funnelData.d.ts +16 -0
- package/dist/bigconsole/components/widgets/chart/charts/funnelData.js +12 -1
- package/dist/bigconsole/components/widgets/heatmap/HeatmapWidget.js +55 -54
- package/dist/bigconsole/components/widgets/heatmap/heatmapData.d.ts +10 -0
- package/dist/bigconsole/components/widgets/heatmap/heatmapData.js +95 -0
- package/dist/bigconsole/pages/DataSinkViewPage.js +234 -238
- package/dist/bigconsole/types/index.d.ts +0 -14
- package/dist/generated/wspace-operations.d.ts +0 -124
- package/dist/generated/wspace-operations.js +69 -1186
- package/package.json +1 -1
- package/dist/bigconsole/hooks/useDataSinkSubscription.d.ts +0 -29
- package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -110
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// src/bigconsole/components/widgets/heatmap/heatmapData.ts
|
|
2
|
+
var e = (e) => typeof e == "object" && !!e && !Array.isArray(e), t = (e) => {
|
|
3
|
+
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
|
|
4
|
+
if (typeof e == "string" && e.trim() !== "") {
|
|
5
|
+
let t = Number(e);
|
|
6
|
+
return Number.isFinite(t) ? t : void 0;
|
|
7
|
+
}
|
|
8
|
+
}, n = (e) => typeof e == "string" && e.trim() !== "" && t(e) === void 0 || typeof e == "boolean";
|
|
9
|
+
function r(t) {
|
|
10
|
+
return e(t) && Array.isArray(t.rows) && Array.isArray(t.columns) && Array.isArray(t.cells);
|
|
11
|
+
}
|
|
12
|
+
function i(e, t, n) {
|
|
13
|
+
if (t) return e.some((e) => n(e[t])) ? t : void 0;
|
|
14
|
+
}
|
|
15
|
+
function a(e, t, n) {
|
|
16
|
+
for (let r of e) for (let [e, i] of Object.entries(r)) if (!n.includes(e) && t(i)) return e;
|
|
17
|
+
}
|
|
18
|
+
function o(e) {
|
|
19
|
+
return [...new Set(e)];
|
|
20
|
+
}
|
|
21
|
+
function s(e) {
|
|
22
|
+
if (e.length === 0) return null;
|
|
23
|
+
let t = /* @__PURE__ */ new Map();
|
|
24
|
+
for (let n of e) {
|
|
25
|
+
let e = `${n.row}\u0000${n.column}`, r = t.get(e);
|
|
26
|
+
t.set(e, r ? {
|
|
27
|
+
...r,
|
|
28
|
+
value: r.value + n.value
|
|
29
|
+
} : n);
|
|
30
|
+
}
|
|
31
|
+
let n = [...t.values()];
|
|
32
|
+
return {
|
|
33
|
+
rows: o(n.map((e) => e.row)),
|
|
34
|
+
columns: o(n.map((e) => e.column)),
|
|
35
|
+
cells: n
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function c(e, r) {
|
|
39
|
+
let o = i(e, r.valueField, (e) => t(e) !== void 0) ?? a(e, (e) => typeof e == "number" && Number.isFinite(e), []);
|
|
40
|
+
if (!o) return null;
|
|
41
|
+
let c = i(e, r.yAxisField, n) ?? a(e, n, [o]);
|
|
42
|
+
if (!c) return null;
|
|
43
|
+
let l = i(e, r.xAxisField, n) ?? a(e, n, [o, c]), u = [];
|
|
44
|
+
for (let r of e) {
|
|
45
|
+
let e = t(r[o]);
|
|
46
|
+
if (e === void 0 || !n(r[c])) continue;
|
|
47
|
+
let i = l && n(r[l]) ? String(r[l]) : o;
|
|
48
|
+
(!l || n(r[l])) && u.push({
|
|
49
|
+
row: String(r[c]),
|
|
50
|
+
column: i,
|
|
51
|
+
value: e
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return s(u);
|
|
55
|
+
}
|
|
56
|
+
function l(n) {
|
|
57
|
+
let r = Object.entries(n);
|
|
58
|
+
if (r.length === 0 || !r.every(([, t]) => e(t))) return null;
|
|
59
|
+
let i = [];
|
|
60
|
+
for (let [e, n] of r) for (let [r, a] of Object.entries(n)) {
|
|
61
|
+
let n = t(a);
|
|
62
|
+
n !== void 0 && i.push({
|
|
63
|
+
row: e,
|
|
64
|
+
column: r,
|
|
65
|
+
value: n
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return s(i);
|
|
69
|
+
}
|
|
70
|
+
function u(t) {
|
|
71
|
+
for (let n of [
|
|
72
|
+
"data",
|
|
73
|
+
"items",
|
|
74
|
+
"records",
|
|
75
|
+
"results",
|
|
76
|
+
"values"
|
|
77
|
+
]) {
|
|
78
|
+
let r = t[n];
|
|
79
|
+
if (Array.isArray(r) && r.length > 0 && r.every(e)) return r;
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
function d(t, n = {}) {
|
|
84
|
+
if (r(t)) return t;
|
|
85
|
+
if (Array.isArray(t)) {
|
|
86
|
+
let r = t.filter(e);
|
|
87
|
+
return r.length > 0 ? c(r, n) : null;
|
|
88
|
+
}
|
|
89
|
+
if (e(t)) {
|
|
90
|
+
let e = u(t);
|
|
91
|
+
return e ? c(e, n) : l(t);
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
export { d as toHeatmapData };
|