@burdenoff/microfe-bigconsole 2026.1113.2 → 2026.1115.2

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.
@@ -1,4 +1,8 @@
1
1
  import { Component, ErrorInfo, ReactNode } from 'react';
2
+ /** Reload the page. A seam so tests can observe it without a browser. */
3
+ export declare const widgetErrorBoundaryReload: {
4
+ reload: () => void;
5
+ };
2
6
  export interface WidgetErrorBoundaryProps {
3
7
  widgetId: string;
4
8
  widgetType?: string;
@@ -16,6 +20,7 @@ export declare class WidgetErrorBoundary extends Component<WidgetErrorBoundaryPr
16
20
  componentDidCatch(error: Error, info: ErrorInfo): void;
17
21
  componentDidUpdate(prevProps: WidgetErrorBoundaryProps): void;
18
22
  private handleRetry;
23
+ private handleReload;
19
24
  render(): ReactNode;
20
25
  }
21
26
  export default WidgetErrorBoundary;
@@ -1,7 +1,33 @@
1
1
  import { Component as e } from "react";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ import { useOptionalI18n as t } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
3
+ import { isChunkLoadError as n } from "@burdenoff/fe-libs/shared/utils";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
5
  // src/bigconsole/components/widgets/WidgetErrorBoundary.tsx
4
- var r = class extends e {
6
+ function a({ onReload: e }) {
7
+ let n = t(), a = (e, t) => n?.t(e, t) ?? t;
8
+ return /* @__PURE__ */ i("div", {
9
+ className: "flex h-full w-full min-w-0 min-h-[120px] flex-col items-center justify-center px-3 text-center",
10
+ role: "alert",
11
+ "data-widget-error": "stale-code",
12
+ children: [
13
+ /* @__PURE__ */ r("p", {
14
+ className: "mb-1 text-sm font-semibold text-text-primary",
15
+ children: a("bigconsole.widget.error.staleCode.title", "This widget needs a page reload")
16
+ }),
17
+ /* @__PURE__ */ r("p", {
18
+ className: "mb-3 max-w-[32ch] text-xs text-text-secondary",
19
+ children: a("bigconsole.widget.error.staleCode.body", "BigConsole was updated after this page opened, so this widget could not load. Reload the page to fix it.")
20
+ }),
21
+ /* @__PURE__ */ r("button", {
22
+ type: "button",
23
+ onClick: e,
24
+ className: "inline-flex min-h-control-md items-center gap-1.5 rounded-button bg-action-primary-bg px-3 text-sm font-medium text-action-primary-text hover:bg-action-primary-bgHover motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
25
+ children: a("bigconsole.widget.error.staleCode.reload", "Reload page")
26
+ })
27
+ ]
28
+ });
29
+ }
30
+ var o = { reload: () => window.location.reload() }, s = class extends e {
5
31
  state = { error: null };
6
32
  static getDerivedStateFromError(e) {
7
33
  return { error: e };
@@ -16,24 +42,28 @@ var r = class extends e {
16
42
  handleRetry = () => {
17
43
  this.setState({ error: null });
18
44
  };
45
+ handleReload = () => {
46
+ o.reload();
47
+ };
19
48
  render() {
20
49
  let { error: e } = this.state;
21
50
  if (!e) return this.props.children;
22
- let { widgetType: r, widgetTitle: i } = this.props;
23
- return /* @__PURE__ */ n("div", {
51
+ if (n(e)) return /* @__PURE__ */ r(a, { onReload: this.handleReload });
52
+ let { widgetType: t, widgetTitle: o } = this.props;
53
+ return /* @__PURE__ */ i("div", {
24
54
  className: "flex h-full w-full min-w-0 min-h-[120px] flex-col items-center justify-center px-3 text-center",
25
55
  role: "alert",
26
56
  "data-widget-error": "true",
27
57
  children: [
28
- /* @__PURE__ */ t("div", {
58
+ /* @__PURE__ */ r("div", {
29
59
  className: "mb-3 flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-status-error-bg-subtle text-[var(--color-status-error-text)]",
30
- children: /* @__PURE__ */ t("svg", {
60
+ children: /* @__PURE__ */ r("svg", {
31
61
  "aria-hidden": "true",
32
62
  className: "w-6 h-6",
33
63
  fill: "none",
34
64
  stroke: "currentColor",
35
65
  viewBox: "0 0 24 24",
36
- children: /* @__PURE__ */ t("path", {
66
+ children: /* @__PURE__ */ r("path", {
37
67
  strokeLinecap: "round",
38
68
  strokeLinejoin: "round",
39
69
  strokeWidth: 2,
@@ -41,25 +71,25 @@ var r = class extends e {
41
71
  })
42
72
  })
43
73
  }),
44
- /* @__PURE__ */ t("p", {
74
+ /* @__PURE__ */ r("p", {
45
75
  className: "mb-1 text-sm font-semibold text-[var(--color-status-error-text)]",
46
76
  children: "Widget failed to render"
47
77
  }),
48
- /* @__PURE__ */ n("p", {
78
+ /* @__PURE__ */ i("p", {
49
79
  className: "mb-3 max-w-[32ch] text-xs text-text-secondary",
50
- children: [i || r || "This widget", " hit an unexpected error. Check the console for details or retry."]
80
+ children: [o || t || "This widget", " hit an unexpected error. Check the console for details or retry."]
51
81
  }),
52
- /* @__PURE__ */ n("button", {
82
+ /* @__PURE__ */ i("button", {
53
83
  type: "button",
54
84
  onClick: this.handleRetry,
55
85
  className: "inline-flex min-h-control-md items-center gap-1.5 rounded-button bg-action-primary-bg px-3 text-sm font-medium text-action-primary-text hover:bg-action-primary-bgHover motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
56
- children: [/* @__PURE__ */ t("svg", {
86
+ children: [/* @__PURE__ */ r("svg", {
57
87
  "aria-hidden": "true",
58
88
  className: "w-4 h-4",
59
89
  fill: "none",
60
90
  stroke: "currentColor",
61
91
  viewBox: "0 0 24 24",
62
- children: /* @__PURE__ */ t("path", {
92
+ children: /* @__PURE__ */ r("path", {
63
93
  strokeLinecap: "round",
64
94
  strokeLinejoin: "round",
65
95
  strokeWidth: 2,
@@ -71,4 +101,4 @@ var r = class extends e {
71
101
  });
72
102
  }
73
103
  };
74
- export { r as WidgetErrorBoundary, r as default };
104
+ export { s as WidgetErrorBoundary, s as default, o as widgetErrorBoundaryReload };
@@ -4,7 +4,10 @@ import { ChartData } from './charts/types';
4
4
  export interface ChartWidgetProps {
5
5
  /** Widget configuration */
6
6
  widget: Widget;
7
- /** Chart data */
7
+ /**
8
+ * Chart data: a list of rows. Parser output reaches this prop unchecked, so anything
9
+ * else (a single number, text, one object) is caught and explained (BOFF-9925).
10
+ */
8
11
  data?: ChartData[];
9
12
  /** Click handler for drilldown */
10
13
  onClick?: (dataPoint: ChartData, index: number) => void;
@@ -10,96 +10,179 @@ import { WaterfallChart as u } from "./charts/WaterfallChart.js";
10
10
  import { ScatterChart as d } from "./charts/ScatterChart.js";
11
11
  import { ChartLegend as f } from "./ChartLegend.js";
12
12
  import "../../../contexts/index.js";
13
- import { memo as p, useCallback as m, useMemo as h, useState as g } from "react";
14
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
13
+ import { WidgetEmptyState as p } from "../states/EmptyState.js";
14
+ import { classifyChartData as m } from "./chartRows.js";
15
+ import { memo as h, useCallback as g, useMemo as _, useState as v } from "react";
16
+ import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
17
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
15
18
  // src/bigconsole/components/widgets/chart/ChartWidget.tsx
16
- var y = [
19
+ var S = [], C = {
20
+ number: {
21
+ key: "bigconsole.widget.chart.unsupported.number",
22
+ fallback: "This data is a single value."
23
+ },
24
+ text: {
25
+ key: "bigconsole.widget.chart.unsupported.text",
26
+ fallback: "This data is text."
27
+ },
28
+ object: {
29
+ key: "bigconsole.widget.chart.unsupported.object",
30
+ fallback: "This data is one record, not a list of rows."
31
+ },
32
+ values: {
33
+ key: "bigconsole.widget.chart.unsupported.values",
34
+ fallback: "This data is a list of values without field names."
35
+ }
36
+ }, w = [
17
37
  "var(--color-chart-1)",
18
38
  "var(--color-chart-2)",
19
39
  "var(--color-chart-3)",
20
40
  "var(--color-chart-4)",
21
41
  "var(--color-chart-5)"
22
- ], b = p(function({ widget: p, data: b = [], onClick: x, onDrilldown: S }) {
23
- let C = p.config, [w, T] = g([]), { handleDataClick: E, enabled: D } = t(p.id, C?.crossFilterMappings || [{
24
- sourceField: C?.labelField || "name",
42
+ ], T = h(function({ widget: h, data: T = [], onClick: E, onDrilldown: D }) {
43
+ let { t: O } = y(), k = h.config, [A, j] = v([]), M = _(() => m(T), [T]), N = M.kind === "rows" ? M.rows : S, { handleDataClick: P, enabled: F } = t(h.id, k?.crossFilterMappings || [{
44
+ sourceField: k?.labelField || "name",
25
45
  targetFilterId: "category"
26
- }]), { clearAllCrossFilters: O, hasCrossFilters: k } = e(), A = h(() => ({
27
- type: C?.chartType?.toLowerCase() || "line",
28
- xAxisKey: C?.xAxisField || C?.labelField || "name",
29
- xAxisLabel: C?.xAxisLabel,
30
- yAxisLabel: C?.yAxisLabel,
31
- showGrid: C?.showGrid,
32
- showLegend: C?.showLegend,
33
- legendPosition: C?.legendPosition,
34
- showDots: C?.showDataPoints,
35
- curveType: C?.curveType,
36
- colors: C?.colors,
37
- seriesNames: C?.seriesLabels,
38
- stacked: C?.stacked,
39
- isDonut: C?.showAsDonut,
40
- innerRadius: C?.innerRadius,
41
- outerRadius: C?.outerRadius,
42
- referenceLines: C?.referenceLines,
43
- series: C?.series,
44
- selectedFields: C?.selectedFields,
45
- dualAxis: C?.dualAxis,
46
- yAxisRightLabel: C?.yAxisRightLabel,
47
- logScale: C?.logScale,
48
- startAtZero: C?.startAtZero,
49
- yMin: C?.yMin,
50
- yMax: C?.yMax,
51
- valueField: C?.valueField,
52
- labelField: C?.labelField,
53
- showTotal: C?.showTotal,
54
- totalLabel: C?.totalLabel,
55
- xField: C?.xField,
56
- yField: C?.yField,
57
- sizeField: C?.sizeField,
58
- colorField: C?.colorField
59
- }), [C]), j = A.type === "combo" || A.dualAxis === !0 || A.series?.some((e) => e.axis === "right" || e.type === "bar") && A.series?.some((e) => e.type === "line") || !1, M = h(() => !b.length || A.type === "pie" || A.type === "funnel" || A.type === "scatter" || A.type === "waterfall" ? [] : (j && A.selectedFields !== void 0 ? n(b, A).map((e) => e.field) : r(b, A.xAxisKey, A.selectedFields)).map((e, t) => ({
46
+ }]), { clearAllCrossFilters: I, hasCrossFilters: L } = e(), R = _(() => ({
47
+ type: k?.chartType?.toLowerCase() || "line",
48
+ xAxisKey: k?.xAxisField || k?.labelField || "name",
49
+ xAxisLabel: k?.xAxisLabel,
50
+ yAxisLabel: k?.yAxisLabel,
51
+ showGrid: k?.showGrid,
52
+ showLegend: k?.showLegend,
53
+ legendPosition: k?.legendPosition,
54
+ showDots: k?.showDataPoints,
55
+ curveType: k?.curveType,
56
+ colors: k?.colors,
57
+ seriesNames: k?.seriesLabels,
58
+ stacked: k?.stacked,
59
+ isDonut: k?.showAsDonut,
60
+ innerRadius: k?.innerRadius,
61
+ outerRadius: k?.outerRadius,
62
+ referenceLines: k?.referenceLines,
63
+ series: k?.series,
64
+ selectedFields: k?.selectedFields,
65
+ dualAxis: k?.dualAxis,
66
+ yAxisRightLabel: k?.yAxisRightLabel,
67
+ logScale: k?.logScale,
68
+ startAtZero: k?.startAtZero,
69
+ yMin: k?.yMin,
70
+ yMax: k?.yMax,
71
+ valueField: k?.valueField,
72
+ labelField: k?.labelField,
73
+ showTotal: k?.showTotal,
74
+ totalLabel: k?.totalLabel,
75
+ xField: k?.xField,
76
+ yField: k?.yField,
77
+ sizeField: k?.sizeField,
78
+ colorField: k?.colorField
79
+ }), [k]), z = R.type === "combo" || R.dualAxis === !0 || R.series?.some((e) => e.axis === "right" || e.type === "bar") && R.series?.some((e) => e.type === "line") || !1, B = _(() => !N.length || R.type === "pie" || R.type === "funnel" || R.type === "scatter" || R.type === "waterfall" ? [] : (z && R.selectedFields !== void 0 ? n(N, R).map((e) => e.field) : r(N, R.xAxisKey, R.selectedFields)).map((e, t) => ({
60
80
  dataKey: e,
61
- name: A.seriesNames?.[e] || e,
62
- color: A.colors?.[t] || y[t % y.length],
63
- hidden: w.includes(e)
81
+ name: R.seriesNames?.[e] || e,
82
+ color: R.colors?.[t] || w[t % w.length],
83
+ hidden: A.includes(e)
64
84
  })), [
65
- b,
85
+ N,
86
+ R,
66
87
  A,
67
- w,
68
- C?.selectedFields,
69
- j
70
- ]), N = m((e) => {
71
- T((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
72
- }, []), P = m((e, t) => {
73
- if (D) {
74
- let t = e[C?.labelField || "name"];
75
- E(e, t);
88
+ k?.selectedFields,
89
+ z
90
+ ]), V = g((e) => {
91
+ j((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
92
+ }, []), H = g((e, t) => {
93
+ if (F) {
94
+ let t = e[k?.labelField || "name"];
95
+ P(e, t);
76
96
  }
77
- S ? S(e) : x && p.drilldowns?.length && x(e, t);
97
+ D ? D(e) : E && h.drilldowns?.length && E(e, t);
78
98
  }, [
79
- x,
80
- S,
81
- p.drilldowns,
82
- D,
83
99
  E,
84
- C?.labelField
85
- ]);
86
- return /* @__PURE__ */ v("div", {
100
+ D,
101
+ h.drilldowns,
102
+ F,
103
+ P,
104
+ k?.labelField
105
+ ]), U = () => {
106
+ if (z) return /* @__PURE__ */ b(l, {
107
+ data: N,
108
+ config: R,
109
+ hiddenSeries: A,
110
+ onDataClick: H
111
+ });
112
+ switch (R.type) {
113
+ case "waterfall": return /* @__PURE__ */ b(u, {
114
+ data: N,
115
+ config: R,
116
+ onDataClick: H
117
+ });
118
+ case "scatter": return /* @__PURE__ */ b(d, {
119
+ data: N,
120
+ config: R,
121
+ onDataClick: H
122
+ });
123
+ case "bar": return /* @__PURE__ */ b(a, {
124
+ data: N,
125
+ config: R,
126
+ hiddenSeries: A,
127
+ onDataClick: H
128
+ });
129
+ case "area": return /* @__PURE__ */ b(o, {
130
+ data: N,
131
+ config: R,
132
+ hiddenSeries: A,
133
+ onDataClick: H
134
+ });
135
+ case "pie": return /* @__PURE__ */ b(s, {
136
+ data: N,
137
+ config: R,
138
+ dataKey: k?.valueField || "value",
139
+ nameKey: k?.labelField || "name",
140
+ onDataClick: H
141
+ });
142
+ case "funnel": return /* @__PURE__ */ b(c, {
143
+ data: N,
144
+ config: R,
145
+ dataKey: k?.valueField || "value",
146
+ nameKey: k?.labelField || "name",
147
+ onDataClick: H
148
+ });
149
+ default: return /* @__PURE__ */ b(i, {
150
+ data: N,
151
+ config: R,
152
+ hiddenSeries: A,
153
+ onDataClick: H
154
+ });
155
+ }
156
+ };
157
+ if (M.kind === "empty") return /* @__PURE__ */ b(p, {
158
+ widgetType: "chart",
159
+ hasDataSource: !0
160
+ });
161
+ if (M.kind === "unsupported") {
162
+ let e = C[M.shape];
163
+ return /* @__PURE__ */ b(p, {
164
+ widgetType: "chart",
165
+ hasDataSource: !0,
166
+ message: `${O(e.key, e.fallback)} ${O("bigconsole.widget.chart.unsupported.hint", "A chart needs a list of rows. Pick a parser that returns rows, or use a Metric Card for one number.")}`
167
+ });
168
+ }
169
+ return /* @__PURE__ */ x("div", {
87
170
  className: "flex flex-col h-full p-4",
88
171
  children: [
89
- k && /* @__PURE__ */ _("div", {
172
+ L && /* @__PURE__ */ b("div", {
90
173
  className: "flex items-center gap-2 mb-2 -mt-1",
91
- children: /* @__PURE__ */ v("button", {
174
+ children: /* @__PURE__ */ x("button", {
92
175
  type: "button",
93
176
  onClick: (e) => {
94
- e.stopPropagation(), O();
177
+ e.stopPropagation(), I();
95
178
  },
96
179
  className: "\n inline-flex items-center gap-1.5\n px-2.5 py-1 rounded-md\n text-xs font-medium\n bg-action-primary-bg/10 text-action-primary-text\n hover:bg-action-primary-bg/20\n transition-colors\n ",
97
- children: [/* @__PURE__ */ _("svg", {
180
+ children: [/* @__PURE__ */ b("svg", {
98
181
  className: "w-3.5 h-3.5",
99
182
  fill: "none",
100
183
  stroke: "currentColor",
101
184
  viewBox: "0 0 24 24",
102
- children: /* @__PURE__ */ _("path", {
185
+ children: /* @__PURE__ */ b("path", {
103
186
  strokeLinecap: "round",
104
187
  strokeLinejoin: "round",
105
188
  strokeWidth: 2,
@@ -108,72 +191,21 @@ var y = [
108
191
  }), "Clear Filter"]
109
192
  })
110
193
  }),
111
- A.legendPosition === "top" && M.length > 0 && /* @__PURE__ */ _(f, {
112
- items: M,
194
+ R.legendPosition === "top" && B.length > 0 && /* @__PURE__ */ b(f, {
195
+ items: B,
113
196
  position: "top",
114
- onItemClick: N
197
+ onItemClick: V
115
198
  }),
116
- /* @__PURE__ */ _("div", {
199
+ /* @__PURE__ */ b("div", {
117
200
  className: "flex-1 min-h-0",
118
- children: (() => {
119
- if (j) return /* @__PURE__ */ _(l, {
120
- data: b,
121
- config: A,
122
- hiddenSeries: w,
123
- onDataClick: P
124
- });
125
- switch (A.type) {
126
- case "waterfall": return /* @__PURE__ */ _(u, {
127
- data: b,
128
- config: A,
129
- onDataClick: P
130
- });
131
- case "scatter": return /* @__PURE__ */ _(d, {
132
- data: b,
133
- config: A,
134
- onDataClick: P
135
- });
136
- case "bar": return /* @__PURE__ */ _(a, {
137
- data: b,
138
- config: A,
139
- hiddenSeries: w,
140
- onDataClick: P
141
- });
142
- case "area": return /* @__PURE__ */ _(o, {
143
- data: b,
144
- config: A,
145
- hiddenSeries: w,
146
- onDataClick: P
147
- });
148
- case "pie": return /* @__PURE__ */ _(s, {
149
- data: b,
150
- config: A,
151
- dataKey: C?.valueField || "value",
152
- nameKey: C?.labelField || "name",
153
- onDataClick: P
154
- });
155
- case "funnel": return /* @__PURE__ */ _(c, {
156
- data: b,
157
- config: A,
158
- dataKey: C?.valueField || "value",
159
- nameKey: C?.labelField || "name",
160
- onDataClick: P
161
- });
162
- default: return /* @__PURE__ */ _(i, {
163
- data: b,
164
- config: A,
165
- hiddenSeries: w,
166
- onDataClick: P
167
- });
168
- }
169
- })()
201
+ children: U()
170
202
  }),
171
- A.legendPosition === "bottom" && M.length > 0 && /* @__PURE__ */ _(f, {
172
- items: M,
203
+ R.legendPosition === "bottom" && B.length > 0 && /* @__PURE__ */ b(f, {
204
+ items: B,
173
205
  position: "bottom",
174
- onItemClick: N
206
+ onItemClick: V
175
207
  })
176
208
  ]
177
209
  });
178
210
  });
179
- export { b as ChartWidget, b as default };
211
+ export { T as ChartWidget, T as default };
@@ -0,0 +1,13 @@
1
+ import { ChartData } from './charts/types';
2
+ /** Why the data cannot be drawn. Drives the message, not the logic. */
3
+ export type UnsupportedChartShape = 'number' | 'text' | 'object' | 'values';
4
+ export type ChartRowsResult = {
5
+ readonly kind: 'rows';
6
+ readonly rows: ChartData[];
7
+ } | {
8
+ readonly kind: 'empty';
9
+ } | {
10
+ readonly kind: 'unsupported';
11
+ readonly shape: UnsupportedChartShape;
12
+ };
13
+ export declare function classifyChartData(data: unknown): ChartRowsResult;
@@ -0,0 +1,27 @@
1
+ // src/bigconsole/components/widgets/chart/chartRows.ts
2
+ var e = (e) => typeof e == "object" && !!e && !Array.isArray(e);
3
+ function t(t) {
4
+ if (t == null) return { kind: "empty" };
5
+ if (Array.isArray(t)) {
6
+ if (t.length === 0) return { kind: "empty" };
7
+ let n = t.filter(e);
8
+ return n.length === 0 ? {
9
+ kind: "unsupported",
10
+ shape: "values"
11
+ } : {
12
+ kind: "rows",
13
+ rows: n
14
+ };
15
+ }
16
+ return typeof t == "number" || typeof t == "bigint" || typeof t == "boolean" ? {
17
+ kind: "unsupported",
18
+ shape: "number"
19
+ } : typeof t == "string" ? {
20
+ kind: "unsupported",
21
+ shape: "text"
22
+ } : {
23
+ kind: "unsupported",
24
+ shape: "object"
25
+ };
26
+ }
27
+ export { t as classifyChartData };
@@ -0,0 +1,24 @@
1
+ import { WidgetPosition } from './widgetPositioning';
2
+ /** The parts of a widget that hold its placement. Structural, so a test can pass a plain object. */
3
+ export interface PositionedWidget {
4
+ readonly position?: Partial<WidgetPosition> | null;
5
+ readonly positionX?: number | null;
6
+ readonly positionY?: number | null;
7
+ readonly positionWidth?: number | null;
8
+ readonly positionHeight?: number | null;
9
+ }
10
+ /** The cell a widget with no stored placement falls back to; matches the grid and `layoutBaseline`. */
11
+ export declare const DEFAULT_WIDGET_POSITION: Readonly<WidgetPosition>;
12
+ /** `position` is canonical; the flat `positionX|Y|Width|Height` mirrors are the fallback. */
13
+ export declare function readWidgetPosition(widget: PositionedWidget): WidgetPosition;
14
+ /** Same cell, by value. */
15
+ export declare function positionsEqual(a: WidgetPosition, b: WidgetPosition): boolean;
16
+ /**
17
+ * The placement the panel's save must send, or `undefined` when it must not send one.
18
+ *
19
+ * `current` is the widget as the store holds it at save time: it carries the panel's
20
+ * typed placement and any drag made on the canvas meanwhile, whichever came last.
21
+ * `seeded` is the placement the panel was opened (or last saved) with. Only a
22
+ * difference is sent, so a save of the title alone never rewrites the placement.
23
+ */
24
+ export declare function positionToSave(current: PositionedWidget | undefined, seeded: WidgetPosition | null): WidgetPosition | undefined;
@@ -0,0 +1,24 @@
1
+ // src/bigconsole/utils/widgetPanelPosition.ts
2
+ var e = {
3
+ x: 0,
4
+ y: 0,
5
+ width: 4,
6
+ height: 4
7
+ }, t = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0;
8
+ function n(n) {
9
+ return {
10
+ x: t(n.position?.x) ?? t(n.positionX) ?? e.x,
11
+ y: t(n.position?.y) ?? t(n.positionY) ?? e.y,
12
+ width: t(n.position?.width) ?? t(n.positionWidth) ?? e.width,
13
+ height: t(n.position?.height) ?? t(n.positionHeight) ?? e.height
14
+ };
15
+ }
16
+ function r(e, t) {
17
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
18
+ }
19
+ function i(e, t) {
20
+ if (!e) return;
21
+ let i = n(e);
22
+ if (!(t && r(i, t))) return i;
23
+ }
24
+ export { e as DEFAULT_WIDGET_POSITION, i as positionToSave, r as positionsEqual, n as readWidgetPosition };
@@ -22,7 +22,7 @@
22
22
  * workflows/settings list+view pages, plus the pre-wired home/admin/dashboards
23
23
  * lists. Builders and deep components are tracked as follow-up on BOFF-6004.
24
24
  *
25
- * Generated + hand-maintained. 2056 keys.
25
+ * Generated + hand-maintained. 2064 keys.
26
26
  */
27
27
  export declare const enTranslations: Record<string, string>;
28
28
  export default enTranslations;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-bigconsole",
3
- "version": "2026.1113.2",
3
+ "version": "2026.1115.2",
4
4
  "description": "BigConsole - AI-powered analytics and dashboard platform",
5
5
  "repository": {
6
6
  "type": "git",