@burdenoff/microfe-bigconsole 2026.1124.4 → 2026.1124.6
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 +12 -6
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts +2 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +34 -34
- package/dist/bigconsole/components/fleet/FleetBindingsDialog.js +113 -115
- package/dist/bigconsole/components/fleet/FleetCopySection.js +2 -2
- package/dist/bigconsole/components/fleet/FleetWidgetActions.js +62 -57
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +489 -474
- package/dist/bigconsole/components/widgets/chart/ChartConfig.d.ts +1 -0
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +111 -107
- package/dist/bigconsole/components/widgets/chart/ChartFieldMappings.d.ts +8 -0
- package/dist/bigconsole/components/widgets/chart/ChartFieldMappings.js +85 -0
- package/dist/bigconsole/components/widgets/chart/chartMappingFields.d.ts +9 -0
- package/dist/bigconsole/components/widgets/chart/chartMappingFields.js +30 -0
- package/dist/bigconsole/components/widgets/chart/charts/funnelData.d.ts +2 -0
- package/dist/bigconsole/components/widgets/chart/charts/funnelData.js +11 -13
- package/dist/bigconsole/utils/fleetPlural.d.ts +7 -0
- package/dist/bigconsole/utils/fleetPlural.js +11 -0
- package/dist/bigconsole/utils/widgetBinding.js +57 -44
- package/package.json +1 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { resolveWidgetDataPath as e } from "./widgetDisplayData.js";
|
|
2
|
+
import { isHeatmapShape as t, validateWidgetShape as n } from "./widgetSampleShapes.js";
|
|
3
|
+
import { isShapedRetentionData as r, retentionFieldsFromConfig as i, retentionRows as a, tryNormalizeRetention as o } from "../components/widgets/retention/normalizeRetention.js";
|
|
3
4
|
// src/bigconsole/utils/widgetBinding.ts
|
|
4
|
-
var
|
|
5
|
+
var s = /* @__PURE__ */ new Set([
|
|
5
6
|
"DATASINK",
|
|
6
7
|
"REST_API",
|
|
7
8
|
"GRAPHQL",
|
|
8
9
|
"SQL",
|
|
9
10
|
"WEBSOCKET",
|
|
10
11
|
"MOCK"
|
|
11
|
-
]),
|
|
12
|
+
]), c = [
|
|
12
13
|
"labelField",
|
|
13
14
|
"valueField",
|
|
14
15
|
"xAxisField",
|
|
@@ -16,15 +17,15 @@ var o = /* @__PURE__ */ new Set([
|
|
|
16
17
|
"categoryField",
|
|
17
18
|
"seriesField"
|
|
18
19
|
];
|
|
19
|
-
function c(e) {
|
|
20
|
-
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
21
|
-
}
|
|
22
20
|
function l(e) {
|
|
23
|
-
return typeof e == "
|
|
21
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
24
22
|
}
|
|
25
23
|
function u(e) {
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
return typeof e == "string" && s.has(e);
|
|
25
|
+
}
|
|
26
|
+
function d(e) {
|
|
27
|
+
if (!l(e) || !l(e.source) || !u(e.source.kind)) return null;
|
|
28
|
+
let t = l(e.fields) ? Object.fromEntries(Object.entries(e.fields).filter((e) => typeof e[1] == "string")) : {};
|
|
28
29
|
return {
|
|
29
30
|
source: {
|
|
30
31
|
kind: e.source.kind,
|
|
@@ -34,11 +35,11 @@ function u(e) {
|
|
|
34
35
|
fields: t
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
let t = e.config ?? {}, n =
|
|
38
|
+
function f(e) {
|
|
39
|
+
let t = e.config ?? {}, n = d(t.binding);
|
|
39
40
|
if (n) return n;
|
|
40
|
-
let r =
|
|
41
|
-
for (let e of
|
|
41
|
+
let r = u(t.dataSourceType) ? t.dataSourceType : void 0, i = e.dataSinkId ? "DATASINK" : r ?? "DATASINK", a = {};
|
|
42
|
+
for (let e of c) {
|
|
42
43
|
let n = t[e];
|
|
43
44
|
typeof n == "string" && n.length > 0 && (a[e] = n);
|
|
44
45
|
}
|
|
@@ -51,20 +52,20 @@ function d(e) {
|
|
|
51
52
|
fields: a
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
55
|
+
function p(e) {
|
|
56
|
+
return f({
|
|
56
57
|
dataSinkId: e.dataSinkId ?? void 0,
|
|
57
58
|
parserId: e.parserId ?? void 0,
|
|
58
59
|
config: e.config ?? {}
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
+
function m(e, t, n) {
|
|
62
63
|
let r = { ...e }, i = (e, t) => JSON.stringify(e) === JSON.stringify(t);
|
|
63
64
|
for (let e of Object.keys(n)) i(n[e], t[e]) || (r[e] = n[e]);
|
|
64
65
|
for (let e of Object.keys(t)) e in n || delete r[e];
|
|
65
66
|
return r;
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
+
function h(e, t) {
|
|
68
69
|
let n = {
|
|
69
70
|
source: {
|
|
70
71
|
kind: e.source.kind,
|
|
@@ -84,10 +85,10 @@ function m(e, t) {
|
|
|
84
85
|
parserId: n.parserId
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
|
-
function h(e, t) {
|
|
88
|
-
return t.replace(/^\$?\.?/, "").split(".").filter(Boolean).reduce((e, t) => c(e) ? e[t] : void 0, e);
|
|
89
|
-
}
|
|
90
88
|
function g(e, t) {
|
|
89
|
+
return t.replace(/^\$?\.?/, "").split(".").filter(Boolean).reduce((e, t) => l(e) ? e[t] : void 0, e);
|
|
90
|
+
}
|
|
91
|
+
function _(e, t) {
|
|
91
92
|
if (e.source.kind === "DATASINK" && !e.source.ref) return {
|
|
92
93
|
status: "unbound",
|
|
93
94
|
missingFields: []
|
|
@@ -96,28 +97,28 @@ function g(e, t) {
|
|
|
96
97
|
status: "bound",
|
|
97
98
|
missingFields: []
|
|
98
99
|
};
|
|
99
|
-
let n = Object.entries(e.fields).filter(([, e]) =>
|
|
100
|
+
let n = Object.entries(e.fields).filter(([, e]) => g(t, e) === void 0).map(([e]) => e);
|
|
100
101
|
return {
|
|
101
102
|
status: n.length > 0 ? "field_mismatch" : "bound",
|
|
102
103
|
missingFields: n
|
|
103
104
|
};
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
-
if (
|
|
106
|
+
function v(e, t, s) {
|
|
107
|
+
if (r(e)) return {
|
|
107
108
|
status: "bound",
|
|
108
109
|
missingFields: []
|
|
109
110
|
};
|
|
110
|
-
let c =
|
|
111
|
+
let c = a(e);
|
|
111
112
|
if (!c) {
|
|
112
|
-
let
|
|
113
|
+
let t = n("retention", e);
|
|
113
114
|
return {
|
|
114
|
-
status:
|
|
115
|
-
missingFields:
|
|
115
|
+
status: t.length > 0 ? "shape_mismatch" : "bound",
|
|
116
|
+
missingFields: t
|
|
116
117
|
};
|
|
117
118
|
}
|
|
118
|
-
let l =
|
|
119
|
+
let l = i(s), u = o(c, {
|
|
119
120
|
...l,
|
|
120
|
-
valueField:
|
|
121
|
+
valueField: t.fields.valueField ?? l.valueField
|
|
121
122
|
});
|
|
122
123
|
return u.error ? u.error.code === "missing_fields" ? {
|
|
123
124
|
status: "field_mismatch",
|
|
@@ -130,14 +131,26 @@ function _(e, o, s) {
|
|
|
130
131
|
missingFields: []
|
|
131
132
|
};
|
|
132
133
|
}
|
|
133
|
-
function
|
|
134
|
-
|
|
134
|
+
function y(n, r, i, a) {
|
|
135
|
+
if (i === "retention") return v(r, n, a);
|
|
136
|
+
if (i === "heatmap" && t(r)) return {
|
|
135
137
|
status: "bound",
|
|
136
138
|
missingFields: []
|
|
137
|
-
}
|
|
139
|
+
};
|
|
140
|
+
if (i === "chart" || i === "funnel_chart") {
|
|
141
|
+
let t = e(r, a);
|
|
142
|
+
if (Array.isArray(t) && t.length > 0) {
|
|
143
|
+
let e = Object.entries(n.fields).filter(([, e]) => !t.some((t) => l(t) && (Object.hasOwn(t, e) || g(t, e) !== void 0))).map(([e]) => e);
|
|
144
|
+
return {
|
|
145
|
+
status: e.length > 0 ? "field_mismatch" : "bound",
|
|
146
|
+
missingFields: e
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return _(n, Array.isArray(r) ? r[0] : r);
|
|
138
151
|
}
|
|
139
|
-
function
|
|
140
|
-
if (
|
|
152
|
+
function b({ binding: e, loading: t = !1, error: r, preview: i, previewComplete: a = !1, widgetType: o, mockData: s, hasParser: c, config: l }) {
|
|
153
|
+
if (t) return {
|
|
141
154
|
status: "loading",
|
|
142
155
|
missingFields: []
|
|
143
156
|
};
|
|
@@ -145,12 +158,12 @@ function y({ binding: e, loading: n = !1, error: r, preview: i, previewComplete:
|
|
|
145
158
|
status: "parser_error",
|
|
146
159
|
missingFields: []
|
|
147
160
|
};
|
|
148
|
-
let u =
|
|
161
|
+
let u = _(e);
|
|
149
162
|
if (u.status === "unbound") return u;
|
|
150
163
|
if (e.source.kind === "MOCK" && s !== void 0 && s !== "") {
|
|
151
|
-
let
|
|
164
|
+
let t = s;
|
|
152
165
|
if (typeof s == "string") try {
|
|
153
|
-
|
|
166
|
+
t = JSON.parse(s);
|
|
154
167
|
} catch {
|
|
155
168
|
return {
|
|
156
169
|
status: "invalid_sample",
|
|
@@ -158,10 +171,10 @@ function y({ binding: e, loading: n = !1, error: r, preview: i, previewComplete:
|
|
|
158
171
|
};
|
|
159
172
|
}
|
|
160
173
|
if (o === "retention") {
|
|
161
|
-
let
|
|
162
|
-
if (
|
|
174
|
+
let n = v(t, e, l);
|
|
175
|
+
if (n.status !== "bound") return n;
|
|
163
176
|
} else {
|
|
164
|
-
let e =
|
|
177
|
+
let e = n(o, t);
|
|
165
178
|
if (e.length > 0) return {
|
|
166
179
|
status: "shape_mismatch",
|
|
167
180
|
missingFields: e
|
|
@@ -174,12 +187,12 @@ function y({ binding: e, loading: n = !1, error: r, preview: i, previewComplete:
|
|
|
174
187
|
} : a ? i == null || Array.isArray(i) && i.length === 0 ? {
|
|
175
188
|
status: "no_data",
|
|
176
189
|
missingFields: []
|
|
177
|
-
} :
|
|
190
|
+
} : y(e, i, o, l) : u;
|
|
178
191
|
}
|
|
179
|
-
function
|
|
192
|
+
function x(e, t) {
|
|
180
193
|
return e?.success ? {
|
|
181
194
|
preview: e.output,
|
|
182
195
|
error: null
|
|
183
196
|
} : { error: e?.error || t };
|
|
184
197
|
}
|
|
185
|
-
export {
|
|
198
|
+
export { p as getBindingForWidget, f as getWidgetBinding, b as getWidgetBindingStatus, x as parserTestOutcome, m as reconcilePanelConfig, g as resolveBindingPath, h as serializeWidgetBinding, _ as validateWidgetBinding };
|