@burdenoff/microfe-bigconsole 2026.1124.4 → 2026.1124.5
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/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/widgetBinding.js +57 -44
- package/package.json +1 -1
|
@@ -19,15 +19,21 @@ function p(e) {
|
|
|
19
19
|
function m(e) {
|
|
20
20
|
return /* @__PURE__ */ f(r, {
|
|
21
21
|
...e,
|
|
22
|
-
|
|
22
|
+
showFieldMappings: !1
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function h(e) {
|
|
26
|
+
return /* @__PURE__ */ f(m, {
|
|
27
|
+
...e,
|
|
28
|
+
fixedChartType: "funnel"
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function g(e) {
|
|
26
32
|
switch (e) {
|
|
27
33
|
case "metric_card": return p(t);
|
|
28
34
|
case "kpi_card_comparison": return p(n);
|
|
29
|
-
case "chart": return p(
|
|
30
|
-
case "funnel_chart": return p(
|
|
35
|
+
case "chart": return p(m);
|
|
36
|
+
case "funnel_chart": return p(h);
|
|
31
37
|
case "table":
|
|
32
38
|
case "pivot_table": return p(i);
|
|
33
39
|
case "gauge": return p(a);
|
|
@@ -37,8 +43,8 @@ function h(e) {
|
|
|
37
43
|
default: return null;
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
|
-
var
|
|
41
|
-
let { t: i } = d(), a =
|
|
46
|
+
var _ = u(function({ widgetType: t, config: n, onChange: r }) {
|
|
47
|
+
let { t: i } = d(), a = g(t);
|
|
42
48
|
return [
|
|
43
49
|
"map",
|
|
44
50
|
"waterfall",
|
|
@@ -73,4 +79,4 @@ var g = u(function({ widgetType: t, config: n, onChange: r }) {
|
|
|
73
79
|
})
|
|
74
80
|
});
|
|
75
81
|
});
|
|
76
|
-
export {
|
|
82
|
+
export { _ as AppearanceSection };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { WidgetBinding, WidgetBindingStatus, Parser } from '../../../types';
|
|
3
3
|
export interface DataBindingSectionProps {
|
|
4
4
|
consoleId: string;
|
|
@@ -10,6 +10,7 @@ export interface DataBindingSectionProps {
|
|
|
10
10
|
resolving?: boolean;
|
|
11
11
|
missingFields?: string[];
|
|
12
12
|
preview?: unknown;
|
|
13
|
+
fieldMappings?: ReactNode;
|
|
13
14
|
error?: string | null;
|
|
14
15
|
onDataSinkChange: (key: string | null) => void;
|
|
15
16
|
onParserChange: (parserId: string | null) => void;
|
|
@@ -16,59 +16,59 @@ var u = {
|
|
|
16
16
|
parser_required: "warning",
|
|
17
17
|
invalid_sample: "danger",
|
|
18
18
|
shape_mismatch: "warning"
|
|
19
|
-
}, d = ({ consoleId: d, binding: f, resolvedParser: p, dataSinkKey: m, dataPath: h, status: g, resolving: _ = !1, missingFields: v = [], preview: y,
|
|
20
|
-
let { t:
|
|
21
|
-
unbound:
|
|
22
|
-
loading: _ ?
|
|
23
|
-
bound:
|
|
24
|
-
no_data:
|
|
25
|
-
parser_error:
|
|
26
|
-
field_mismatch:
|
|
27
|
-
parser_required:
|
|
28
|
-
invalid_sample:
|
|
29
|
-
shape_mismatch:
|
|
19
|
+
}, d = ({ consoleId: d, binding: f, resolvedParser: p, dataSinkKey: m, dataPath: h, status: g, resolving: _ = !1, missingFields: v = [], preview: y, fieldMappings: b, error: x, onDataSinkChange: S, onParserChange: C, onDataPathChange: w }) => {
|
|
20
|
+
let { t: T } = s(), E = {
|
|
21
|
+
unbound: T("bigconsole.builder.dataBinding.status.unbound", "Select a DataSink to begin"),
|
|
22
|
+
loading: _ ? T("bigconsole.parsers.selector.loading", "Loading parsers...") : T("bigconsole.builder.dataBinding.status.loading", "Testing parser and detecting fields…"),
|
|
23
|
+
bound: T("bigconsole.builder.dataBinding.status.bound", "Binding ready"),
|
|
24
|
+
no_data: T("bigconsole.builder.dataBinding.status.noData", "Parser returned no data"),
|
|
25
|
+
parser_error: T("bigconsole.builder.dataBinding.status.parserError", "Parser test failed"),
|
|
26
|
+
field_mismatch: T("bigconsole.builder.dataBinding.status.fieldMismatch", "Some mapped fields were not found"),
|
|
27
|
+
parser_required: T("bigconsole.builder.dataBinding.status.parserRequired", "Select a parser so this widget can draw data"),
|
|
28
|
+
invalid_sample: T("bigconsole.builder.dataBinding.status.invalidSample", "Sample JSON is not valid JSON"),
|
|
29
|
+
shape_mismatch: T("bigconsole.builder.dataBinding.status.shapeMismatch", "Data does not match this widget's required shape")
|
|
30
30
|
};
|
|
31
31
|
return /* @__PURE__ */ l(t, { children: [
|
|
32
32
|
/* @__PURE__ */ c(e, {
|
|
33
33
|
title: "Data source",
|
|
34
|
-
description:
|
|
34
|
+
description: T("bigconsole.builder.dataBinding.intro", "Connect this widget to a DataSink and Parser to display transformed data."),
|
|
35
35
|
"data-testid": "widget-inspector-data-source",
|
|
36
36
|
children: /* @__PURE__ */ l("div", {
|
|
37
37
|
className: "flex flex-col gap-form-gap",
|
|
38
38
|
children: [/* @__PURE__ */ l("div", {
|
|
39
39
|
className: "space-y-2",
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */ c(a, { children:
|
|
41
|
+
/* @__PURE__ */ c(a, { children: T("bigconsole.builder.dataBinding.dataSinkLabel", "DataSink") }),
|
|
42
42
|
/* @__PURE__ */ c(n, {
|
|
43
43
|
value: m,
|
|
44
|
-
onChange:
|
|
45
|
-
placeholder:
|
|
44
|
+
onChange: S,
|
|
45
|
+
placeholder: T("bigconsole.builder.dataBinding.dataSinkPlaceholder", "Select a DataSink...")
|
|
46
46
|
}),
|
|
47
47
|
m && /* @__PURE__ */ l("p", {
|
|
48
48
|
className: "text-xs text-text-secondary",
|
|
49
|
-
children: [
|
|
49
|
+
children: [T("bigconsole.builder.dataBinding.keyLabel", "Key: {{key}}", { key: m }), f.source.ref && /* @__PURE__ */ c("span", {
|
|
50
50
|
className: "ml-2 text-text-muted",
|
|
51
|
-
children:
|
|
51
|
+
children: T("bigconsole.builder.dataBinding.idLabel", "ID: {{id}}...", { id: f.source.ref.slice(0, 8) })
|
|
52
52
|
})]
|
|
53
53
|
})
|
|
54
54
|
]
|
|
55
55
|
}), /* @__PURE__ */ l("div", {
|
|
56
56
|
className: "space-y-2",
|
|
57
|
-
children: [/* @__PURE__ */ c(a, { children:
|
|
57
|
+
children: [/* @__PURE__ */ c(a, { children: T("bigconsole.builder.dataBinding.parserLabel", "Parser") }), /* @__PURE__ */ c(r, {
|
|
58
58
|
consoleId: d,
|
|
59
59
|
value: f.parserId ?? null,
|
|
60
60
|
resolvedParser: p,
|
|
61
|
-
onChange:
|
|
61
|
+
onChange: C,
|
|
62
62
|
filterInputSinkKey: m ?? void 0,
|
|
63
63
|
filterStatus: void 0,
|
|
64
|
-
placeholder: m ?
|
|
64
|
+
placeholder: m ? T("bigconsole.builder.dataBinding.parserPlaceholder", "Select a parser...") : T("bigconsole.builder.dataBinding.parserPlaceholderNoSink", "Select a DataSink first..."),
|
|
65
65
|
disabled: !m
|
|
66
66
|
})]
|
|
67
67
|
})]
|
|
68
68
|
})
|
|
69
69
|
}),
|
|
70
70
|
/* @__PURE__ */ c(e, {
|
|
71
|
-
title:
|
|
71
|
+
title: E[g],
|
|
72
72
|
tone: u[g],
|
|
73
73
|
padding: "compact",
|
|
74
74
|
headingLevel: 3,
|
|
@@ -84,27 +84,27 @@ var u = {
|
|
|
84
84
|
children: [
|
|
85
85
|
/* @__PURE__ */ c("p", {
|
|
86
86
|
className: "sr-only",
|
|
87
|
-
children:
|
|
87
|
+
children: E[g]
|
|
88
88
|
}),
|
|
89
|
-
|
|
89
|
+
x && /* @__PURE__ */ c("p", {
|
|
90
90
|
className: "break-words text-xs text-[var(--color-status-error-text)]",
|
|
91
|
-
children:
|
|
91
|
+
children: x
|
|
92
92
|
}),
|
|
93
93
|
v.length > 0 && /* @__PURE__ */ c("p", {
|
|
94
94
|
className: "break-words text-xs text-[var(--color-status-warning-text)]",
|
|
95
|
-
children:
|
|
95
|
+
children: T("bigconsole.builder.dataBinding.missingFields", "Missing: {{fields}}", { fields: v.join(", ") })
|
|
96
96
|
}),
|
|
97
|
-
!
|
|
97
|
+
!x && v.length === 0 && g === "bound" && y !== void 0 && /* @__PURE__ */ c("p", {
|
|
98
98
|
className: "text-xs text-text-secondary",
|
|
99
99
|
children: "The parser ran and its output matches the fields this widget expects."
|
|
100
100
|
})
|
|
101
101
|
]
|
|
102
102
|
})
|
|
103
103
|
}),
|
|
104
|
-
f.parserId && Object.keys(f.fields).length > 0 && /* @__PURE__ */ c(e, {
|
|
104
|
+
b ?? (f.parserId && Object.keys(f.fields).length > 0 && /* @__PURE__ */ c(e, {
|
|
105
105
|
emphasis: "muted",
|
|
106
106
|
padding: "compact",
|
|
107
|
-
title:
|
|
107
|
+
title: T("bigconsole.builder.dataBinding.fieldMappingsConfigured", "Field mappings configured"),
|
|
108
108
|
headingLevel: 3,
|
|
109
109
|
children: /* @__PURE__ */ c("div", {
|
|
110
110
|
className: "min-w-0 space-y-1 text-xs text-text-secondary",
|
|
@@ -120,11 +120,11 @@ var u = {
|
|
|
120
120
|
]
|
|
121
121
|
}, e))
|
|
122
122
|
})
|
|
123
|
-
}),
|
|
123
|
+
})),
|
|
124
124
|
y !== void 0 && /* @__PURE__ */ c(e, {
|
|
125
125
|
emphasis: "muted",
|
|
126
126
|
padding: "compact",
|
|
127
|
-
title:
|
|
127
|
+
title: T("bigconsole.builder.dataBinding.livePreviewLabel", "Live Preview"),
|
|
128
128
|
description: "Raw parser output, exactly as the widget receives it.",
|
|
129
129
|
headingLevel: 3,
|
|
130
130
|
children: /* @__PURE__ */ c("pre", {
|
|
@@ -142,17 +142,17 @@ var u = {
|
|
|
142
142
|
children: [
|
|
143
143
|
/* @__PURE__ */ c(a, {
|
|
144
144
|
htmlFor: "widget-inspector-data-path",
|
|
145
|
-
children:
|
|
145
|
+
children: T("bigconsole.builder.dataBinding.dataPathLabel", "Data Path (Optional)")
|
|
146
146
|
}),
|
|
147
147
|
/* @__PURE__ */ c(i, {
|
|
148
148
|
id: "widget-inspector-data-path",
|
|
149
149
|
value: h ?? "",
|
|
150
|
-
onChange: (e) =>
|
|
151
|
-
placeholder:
|
|
150
|
+
onChange: (e) => w(e.target.value || void 0),
|
|
151
|
+
placeholder: T("bigconsole.builder.dataBinding.dataPathPlaceholder", "e.g., summary.totalRevenue")
|
|
152
152
|
}),
|
|
153
153
|
/* @__PURE__ */ c("p", {
|
|
154
154
|
className: "text-xs text-text-secondary",
|
|
155
|
-
children:
|
|
155
|
+
children: T("bigconsole.builder.dataBinding.dataPathHelp", "Path to extract specific data from the parser output (dot notation)")
|
|
156
156
|
})
|
|
157
157
|
]
|
|
158
158
|
})
|