@burdenoff/microfe-bigconsole 2026.1123.7 → 2026.1124.1

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.
Files changed (88) hide show
  1. package/dist/bigconsole/asof/AsOfControl.js +2 -2
  2. package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +107 -106
  3. package/dist/bigconsole/components/dashboard/DashboardGalleryCard.d.ts +34 -0
  4. package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +123 -0
  5. package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +1 -1
  6. package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +19 -35
  7. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +119 -116
  8. package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
  9. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.d.ts +0 -1
  10. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +172 -170
  11. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +210 -208
  12. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +97 -97
  13. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
  14. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +92 -92
  15. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +149 -149
  16. package/dist/bigconsole/components/datasink/AnomalyDetectorPanel.js +54 -54
  17. package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -37
  18. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +4 -4
  19. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +130 -129
  20. package/dist/bigconsole/components/datasink/SetupStateBadge.js +24 -33
  21. package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +38 -38
  22. package/dist/bigconsole/components/explore/CreateQueryWidget.js +57 -56
  23. package/dist/bigconsole/components/explore/SqlDraftEditor.js +140 -140
  24. package/dist/bigconsole/components/explore/VisualBuilder.js +85 -84
  25. package/dist/bigconsole/components/explore/queryAccess/GrantsPanel.js +168 -167
  26. package/dist/bigconsole/components/explore/queryAccess/QueryAccessAdmin.js +2 -2
  27. package/dist/bigconsole/components/explore/queryAccess/RelationEditor.js +118 -117
  28. package/dist/bigconsole/components/insights/BoardLintPanel.js +2 -2
  29. package/dist/bigconsole/components/insights/OutlierSpottingDialog.js +123 -123
  30. package/dist/bigconsole/components/kpi-change/KpiChangePanel.js +2 -2
  31. package/dist/bigconsole/components/narrative/NarrativePanel.js +1 -1
  32. package/dist/bigconsole/components/overview/DataHealthCard.js +3 -0
  33. package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +3 -0
  34. package/dist/bigconsole/components/parser/ParserStatusBadge.js +25 -28
  35. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +23 -22
  36. package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +15 -26
  37. package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +24 -24
  38. package/dist/bigconsole/components/settings/WidgetCatalogSection.js +1 -1
  39. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +188 -187
  40. package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +1 -1
  41. package/dist/bigconsole/components/widgets/UnsupportedDataSourceNotice.js +1 -1
  42. package/dist/bigconsole/components/widgets/WidgetCompareView.js +3 -1
  43. package/dist/bigconsole/components/widgets/WidgetHeader.js +1 -1
  44. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +45 -44
  45. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +151 -147
  46. package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +48 -47
  47. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
  48. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +139 -138
  49. package/dist/bigconsole/components/widgets/form/FormWidget.js +149 -148
  50. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +80 -77
  51. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +58 -56
  52. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +75 -73
  53. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +86 -85
  54. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +80 -77
  55. package/dist/bigconsole/components/widgets/retention/RetentionView.js +1 -1
  56. package/dist/bigconsole/components/widgets/table/TableConfig.js +214 -211
  57. package/dist/bigconsole/components/widgets/table/TablePagination.js +59 -58
  58. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +140 -138
  59. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +74 -66
  60. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +48 -48
  61. package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +28 -37
  62. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +69 -69
  63. package/dist/bigconsole/hooks/useDashboardListQuery.d.ts +22 -0
  64. package/dist/bigconsole/hooks/useDashboardListQuery.js +39 -0
  65. package/dist/bigconsole/pages/AdminPage.js +147 -146
  66. package/dist/bigconsole/pages/DashboardViewPage.js +2 -0
  67. package/dist/bigconsole/pages/DashboardsPage.js +638 -855
  68. package/dist/bigconsole/pages/DataParsersPage.js +5 -0
  69. package/dist/bigconsole/pages/DataSinkBuilderPage.js +4 -1
  70. package/dist/bigconsole/pages/DataSinkViewPage.js +263 -261
  71. package/dist/bigconsole/pages/DataSinksPage.js +210 -186
  72. package/dist/bigconsole/pages/InsightsPage.js +386 -383
  73. package/dist/bigconsole/pages/ParserBuilderPage.js +413 -413
  74. package/dist/bigconsole/pages/ParserViewPage.js +2 -0
  75. package/dist/bigconsole/pages/PipelineBuilderPage.js +279 -276
  76. package/dist/bigconsole/pages/PipelineViewPage.js +3 -0
  77. package/dist/bigconsole/pages/PipelinesPage.js +198 -165
  78. package/dist/bigconsole/pages/SettingsPage.js +160 -160
  79. package/dist/bigconsole/pages/WidgetDemoPage.js +2 -0
  80. package/dist/bigconsole/pages/WorkflowViewPage.js +5 -0
  81. package/dist/bigconsole/pages/WorkflowsPage.js +144 -123
  82. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +1 -1
  83. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +123 -122
  84. package/dist/bigconsole/utils/dashboardGallery.d.ts +84 -0
  85. package/dist/bigconsole/utils/dashboardGallery.js +93 -0
  86. package/dist/bigconsole/utils/statusTone.d.ts +17 -0
  87. package/dist/bigconsole/utils/statusTone.js +44 -0
  88. package/package.json +4 -4
@@ -4,23 +4,24 @@ import t from "../../../hooks/useWidgetOperations.js";
4
4
  import "../../../hooks/index.js";
5
5
  import { memo as n, useCallback as r, useMemo as i, useState as a } from "react";
6
6
  import { ChevronDown as o, ChevronRight as s, GripVertical as c, Settings as l } from "lucide-react";
7
- import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
+ import { ThemedSelect as u } from "@burdenoff/fe-libs/ui";
8
+ import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
9
10
  // src/bigconsole/components/widgets/pivot-table/PivotTableWidget.tsx
10
- var p = [
11
+ var m = [
11
12
  "sum",
12
13
  "count",
13
14
  "average",
14
15
  "min",
15
16
  "max"
16
- ], m = {
17
+ ], h = {
17
18
  sum: (e) => e.reduce((e, t) => e + t, 0),
18
19
  count: (e) => e.length,
19
20
  average: (e) => e.length ? e.reduce((e, t) => e + t, 0) / e.length : 0,
20
21
  min: (e) => e.length ? Math.min(...e) : 0,
21
22
  max: (e) => e.length ? Math.max(...e) : 0
22
23
  };
23
- function h(e, t, n, r = 0) {
24
+ function g(e, t, n, r = 0) {
24
25
  let i = {
25
26
  key: "root",
26
27
  values: {},
@@ -31,7 +32,7 @@ function h(e, t, n, r = 0) {
31
32
  if (t.length === 0) {
32
33
  for (let t of n) {
33
34
  let n = e.map((e) => Number(e[t.field]) || 0).filter((e) => !isNaN(e));
34
- i.values[t.field] = m[t.aggregation](n);
35
+ i.values[t.field] = h[t.aggregation](n);
35
36
  }
36
37
  return i;
37
38
  }
@@ -41,22 +42,22 @@ function h(e, t, n, r = 0) {
41
42
  s.has(e) || s.set(e, []), s.get(e).push(t);
42
43
  }
43
44
  for (let [e, t] of s) {
44
- let a = h(t, o, n, r + 1);
45
+ let a = g(t, o, n, r + 1);
45
46
  a.key = e, i.children.set(e, a);
46
47
  }
47
48
  for (let t of n) {
48
49
  let n = e.map((e) => Number(e[t.field]) || 0).filter((e) => !isNaN(e));
49
- i.values[t.field] = m[t.aggregation](n);
50
+ i.values[t.field] = h[t.aggregation](n);
50
51
  }
51
52
  return i;
52
53
  }
53
- function g(e, t) {
54
+ function _(e, t) {
54
55
  if (t.length === 0) return ["Total"];
55
56
  let n = t[0], r = /* @__PURE__ */ new Set();
56
57
  for (let t of e) r.add(String(t[n] ?? "Unknown"));
57
58
  return Array.from(r).sort();
58
59
  }
59
- function _(e, t, n, r) {
60
+ function v(e, t, n, r) {
60
61
  let i = e;
61
62
  for (let [e, t] of Object.entries(r)) i = i.filter((n) => String(n[e]) === t);
62
63
  let a = /* @__PURE__ */ new Map();
@@ -64,23 +65,23 @@ function _(e, t, n, r) {
64
65
  let e = {};
65
66
  for (let t of n) {
66
67
  let n = i.map((e) => Number(e[t.field]) || 0).filter((e) => !isNaN(e));
67
- e[t.field] = m[t.aggregation](n);
68
+ e[t.field] = h[t.aggregation](n);
68
69
  }
69
70
  return a.set("Total", e), a;
70
71
  }
71
- let o = t[0], s = g(e, t);
72
+ let o = t[0], s = _(e, t);
72
73
  for (let e of s) {
73
74
  let t = i.filter((t) => String(t[o]) === e), r = {};
74
75
  for (let e of n) {
75
76
  let n = t.map((t) => Number(t[e.field]) || 0).filter((e) => !isNaN(e));
76
- r[e.field] = m[e.aggregation](n);
77
+ r[e.field] = h[e.aggregation](n);
77
78
  }
78
79
  a.set(e, r);
79
80
  }
80
81
  return a;
81
82
  }
82
- var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
83
- let { t: m } = u(), v = i(() => Array.isArray(c) ? c : [], [c]), y = i(() => {
83
+ var y = n(function({ widget: n, data: c = [], onDrilldown: u }) {
84
+ let { t: m } = d(), h = i(() => Array.isArray(c) ? c : [], [c]), y = i(() => {
84
85
  let e = {
85
86
  rows: [],
86
87
  columns: [],
@@ -96,7 +97,7 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
96
97
  ...e,
97
98
  ...n.config
98
99
  } : e;
99
- }, [n.config]), x = e(), { updateWidget: S } = t(void 0, void 0, { skipFetch: !0 }), C = JSON.stringify({
100
+ }, [n.config]), b = e(), { updateWidget: S } = t(void 0, void 0, { skipFetch: !0 }), C = JSON.stringify({
100
101
  rows: y.rows,
101
102
  columns: y.columns,
102
103
  values: y.values
@@ -111,7 +112,7 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
111
112
  values: y.values
112
113
  }));
113
114
  let { rows: O, columns: k, values: A } = w, j = r((e) => {
114
- x && S({
115
+ b && S({
115
116
  id: n.id,
116
117
  config: {
117
118
  ...n.config,
@@ -121,22 +122,22 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
121
122
  }
122
123
  });
123
124
  }, [
124
- x,
125
+ b,
125
126
  S,
126
127
  n.id,
127
128
  n.config
128
129
  ]), M = r((e) => {
129
130
  T(e), j(e);
130
- }, [j]), [N, P] = a(/* @__PURE__ */ new Set(["root"])), F = i(() => h(v, O, A), [
131
- v,
131
+ }, [j]), [N, P] = a(/* @__PURE__ */ new Set(["root"])), F = i(() => g(h, O, A), [
132
+ h,
132
133
  O,
133
134
  A
134
- ]), I = i(() => g(v, k), [v, k]), L = i(() => y.showColumnTotals ? _(v, k, A, {}) : null, [
135
+ ]), I = i(() => _(h, k), [h, k]), L = i(() => y.showColumnTotals ? v(h, k, A, {}) : null, [
135
136
  y.showColumnTotals,
136
- v,
137
+ h,
137
138
  k,
138
139
  A
139
- ]), R = i(() => v.length > 0 ? Object.keys(v[0]) : [], [v]), z = i(() => {
140
+ ]), R = i(() => h.length > 0 ? Object.keys(h[0]) : [], [h]), z = i(() => {
140
141
  let e = /* @__PURE__ */ new Set([
141
142
  ...O,
142
143
  ...k,
@@ -203,44 +204,44 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
203
204
  return n.has(e) ? n.delete(e) : n.add(e), n;
204
205
  });
205
206
  }, []), W = r((e, t) => {
206
- p && p({
207
+ u && u({
207
208
  rowFilter: e,
208
209
  columnValue: t,
209
210
  type: "pivot_cell_click"
210
211
  });
211
- }, [p]), G = r((e, t, n, r) => {
212
+ }, [u]), G = r((e, t, n, r) => {
212
213
  let i = [], a = e.children.size > 0, c = N.has(n), l = O[r - 1];
213
214
  if (r > 0) {
214
- let l = _(v, k, A, t);
215
- i.push(/* @__PURE__ */ f("tr", {
215
+ let l = v(h, k, A, t);
216
+ i.push(/* @__PURE__ */ p("tr", {
216
217
  className: "hover:bg-bg-sunken/50 transition-colors",
217
218
  children: [
218
- /* @__PURE__ */ d("td", {
219
+ /* @__PURE__ */ f("td", {
219
220
  className: "sticky left-0 bg-bg-surface border-r border-border-default px-3 py-2 font-medium text-sm",
220
221
  style: { paddingLeft: `${r * 16 + 8}px` },
221
- children: /* @__PURE__ */ f("div", {
222
+ children: /* @__PURE__ */ p("div", {
222
223
  className: "flex items-center gap-1",
223
224
  children: [
224
- y.expandable && a && /* @__PURE__ */ d("button", {
225
+ y.expandable && a && /* @__PURE__ */ f("button", {
225
226
  type: "button",
226
227
  onClick: () => U(n),
227
228
  className: "p-0.5 hover:bg-bg-sunken rounded",
228
- children: d(c ? o : s, { className: "w-4 h-4 text-text-secondary" })
229
+ children: f(c ? o : s, { className: "w-4 h-4 text-text-secondary" })
229
230
  }),
230
- !a && y.expandable && /* @__PURE__ */ d("span", { className: "w-5" }),
231
- /* @__PURE__ */ d("span", { children: e.key })
231
+ !a && y.expandable && /* @__PURE__ */ f("span", { className: "w-5" }),
232
+ /* @__PURE__ */ f("span", { children: e.key })
232
233
  ]
233
234
  })
234
235
  }),
235
236
  I.map((e) => {
236
237
  let n = l.get(e) || {};
237
- return A.map((r) => /* @__PURE__ */ d("td", {
238
+ return A.map((r) => /* @__PURE__ */ f("td", {
238
239
  className: "px-3 py-2 text-sm text-right tabular-nums cursor-pointer hover:bg-action-primary-bg/10",
239
240
  onClick: () => W(t, e),
240
241
  children: H(n[r.field] || 0)
241
242
  }, `${e}-${r.field}`));
242
243
  }),
243
- y.showRowTotals && A.map((t) => /* @__PURE__ */ d("td", {
244
+ y.showRowTotals && A.map((t) => /* @__PURE__ */ f("td", {
244
245
  className: "px-3 py-2 text-sm text-right tabular-nums font-medium bg-bg-sunken/30",
245
246
  children: H(e.values[t.field] || 0)
246
247
  }, `total-${t.field}`))
@@ -259,7 +260,7 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
259
260
  }
260
261
  return i;
261
262
  }, [
262
- v,
263
+ h,
263
264
  y,
264
265
  O,
265
266
  k,
@@ -270,87 +271,87 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
270
271
  W,
271
272
  U
272
273
  ]), K = O.length > 0 || A.length > 0;
273
- return v.length === 0 ? /* @__PURE__ */ f("div", {
274
+ return h.length === 0 ? /* @__PURE__ */ p("div", {
274
275
  className: "flex flex-col items-center justify-center h-full p-8 text-text-secondary",
275
276
  children: [
276
- /* @__PURE__ */ d(l, { className: "w-12 h-12 mb-4 opacity-50" }),
277
- /* @__PURE__ */ d("p", {
277
+ /* @__PURE__ */ f(l, { className: "w-12 h-12 mb-4 opacity-50" }),
278
+ /* @__PURE__ */ f("p", {
278
279
  className: "text-sm",
279
280
  children: m("bigconsole.widget.pivotTable.noData", "No data available")
280
281
  }),
281
- /* @__PURE__ */ d("p", {
282
+ /* @__PURE__ */ f("p", {
282
283
  className: "text-xs mt-1",
283
284
  children: m("bigconsole.widget.pivotTable.noDataHint", "Configure data source to populate pivot table")
284
285
  })
285
286
  ]
286
- }) : /* @__PURE__ */ f("div", {
287
+ }) : /* @__PURE__ */ p("div", {
287
288
  className: "flex flex-col h-full overflow-hidden",
288
- children: [x && /* @__PURE__ */ d(b, {
289
+ children: [b && /* @__PURE__ */ f(x, {
289
290
  rowFields: O,
290
291
  columnFields: k,
291
292
  valueFields: A,
292
293
  availableFields: z,
293
294
  onMoveField: B,
294
295
  onChangeAggregation: V
295
- }), K ? /* @__PURE__ */ d("div", {
296
+ }), K ? /* @__PURE__ */ f("div", {
296
297
  className: "flex-1 overflow-auto",
297
- children: /* @__PURE__ */ f("table", {
298
+ children: /* @__PURE__ */ p("table", {
298
299
  className: "w-full border-collapse",
299
300
  children: [
300
- /* @__PURE__ */ f("thead", {
301
+ /* @__PURE__ */ p("thead", {
301
302
  className: "sticky top-0 z-10",
302
- children: [/* @__PURE__ */ f("tr", {
303
+ children: [/* @__PURE__ */ p("tr", {
303
304
  className: "bg-bg-sunken",
304
305
  children: [
305
- /* @__PURE__ */ d("th", {
306
+ /* @__PURE__ */ f("th", {
306
307
  className: "sticky left-0 bg-bg-sunken border-r border-b border-border-default px-3 py-2 text-left text-xs font-semibold uppercase tracking-wider text-text-secondary",
307
308
  children: O.length > 0 ? O.map((e) => e.replace(/_/g, " ")).join(" / ") : m("bigconsole.widget.pivotTable.valuesHeader", "Values")
308
309
  }),
309
- I.map((e) => /* @__PURE__ */ d("th", {
310
+ I.map((e) => /* @__PURE__ */ f("th", {
310
311
  colSpan: A.length || 1,
311
312
  className: "border-b border-border-default px-3 py-2 text-center text-xs font-semibold uppercase tracking-wider text-text-secondary",
312
313
  children: e
313
314
  }, e)),
314
- y.showRowTotals && /* @__PURE__ */ d("th", {
315
+ y.showRowTotals && /* @__PURE__ */ f("th", {
315
316
  colSpan: A.length || 1,
316
317
  className: "border-b border-border-default px-3 py-2 text-center text-xs font-semibold uppercase tracking-wider text-text-secondary bg-bg-sunken/50",
317
318
  children: m("bigconsole.widget.pivotTable.total", "Total")
318
319
  })
319
320
  ]
320
- }), A.length > 1 && /* @__PURE__ */ f("tr", {
321
+ }), A.length > 1 && /* @__PURE__ */ p("tr", {
321
322
  className: "bg-bg-surface",
322
323
  children: [
323
- /* @__PURE__ */ d("th", { className: "sticky left-0 bg-bg-surface border-r border-b border-border-default" }),
324
- I.map((e) => A.map((t) => /* @__PURE__ */ d("th", {
324
+ /* @__PURE__ */ f("th", { className: "sticky left-0 bg-bg-surface border-r border-b border-border-default" }),
325
+ I.map((e) => A.map((t) => /* @__PURE__ */ f("th", {
325
326
  className: "border-b border-border-default px-3 py-1 text-center text-xs text-text-secondary",
326
327
  children: t.label || t.field.replace(/_/g, " ")
327
328
  }, `${e}-${t.field}`))),
328
- y.showRowTotals && A.map((e) => /* @__PURE__ */ d("th", {
329
+ y.showRowTotals && A.map((e) => /* @__PURE__ */ f("th", {
329
330
  className: "border-b border-border-default px-3 py-1 text-center text-xs text-text-secondary bg-bg-sunken/30",
330
331
  children: e.label || e.field.replace(/_/g, " ")
331
332
  }, `total-${e.field}`))
332
333
  ]
333
334
  })]
334
335
  }),
335
- /* @__PURE__ */ d("tbody", {
336
+ /* @__PURE__ */ f("tbody", {
336
337
  className: "divide-y divide-border-default",
337
338
  children: G(F, {}, "root", 0)
338
339
  }),
339
- y.showColumnTotals && /* @__PURE__ */ d("tfoot", { children: /* @__PURE__ */ f("tr", {
340
+ y.showColumnTotals && /* @__PURE__ */ f("tfoot", { children: /* @__PURE__ */ p("tr", {
340
341
  className: "bg-bg-sunken/50 font-medium",
341
342
  children: [
342
- /* @__PURE__ */ d("td", {
343
+ /* @__PURE__ */ f("td", {
343
344
  className: "sticky left-0 bg-bg-sunken/50 border-r border-t border-border-default px-3 py-2 text-sm",
344
345
  children: m("bigconsole.widget.pivotTable.total", "Total")
345
346
  }),
346
347
  I.map((e) => {
347
348
  let t = L?.get(e) || {};
348
- return A.map((n) => /* @__PURE__ */ d("td", {
349
+ return A.map((n) => /* @__PURE__ */ f("td", {
349
350
  className: "border-t border-border-default px-3 py-2 text-sm text-right tabular-nums",
350
351
  children: H(t[n.field] || 0)
351
352
  }, `footer-${e}-${n.field}`));
352
353
  }),
353
- y.showRowTotals && y.showGrandTotal && A.map((e) => /* @__PURE__ */ d("td", {
354
+ y.showRowTotals && y.showGrandTotal && A.map((e) => /* @__PURE__ */ f("td", {
354
355
  className: "border-t border-border-default px-3 py-2 text-sm text-right tabular-nums font-bold bg-bg-sunken",
355
356
  children: H(F.values[e.field] || 0)
356
357
  }, `grand-${e.field}`))
@@ -358,83 +359,83 @@ var v = n(function({ widget: n, data: c = [], onDrilldown: p }) {
358
359
  }) })
359
360
  ]
360
361
  })
361
- }) : /* @__PURE__ */ f("div", {
362
+ }) : /* @__PURE__ */ p("div", {
362
363
  className: "flex flex-col items-center justify-center flex-1 p-8 text-text-secondary",
363
364
  children: [
364
- /* @__PURE__ */ d(l, { className: "w-12 h-12 mb-4 opacity-50" }),
365
- /* @__PURE__ */ d("p", {
365
+ /* @__PURE__ */ f(l, { className: "w-12 h-12 mb-4 opacity-50" }),
366
+ /* @__PURE__ */ f("p", {
366
367
  className: "text-sm",
367
368
  children: m("bigconsole.widget.pivotTable.configureTitle", "Configure Pivot Table")
368
369
  }),
369
- /* @__PURE__ */ d("p", {
370
+ /* @__PURE__ */ f("p", {
370
371
  className: "text-xs mt-1",
371
- children: x ? m("bigconsole.widget.pivotTable.configureHintEdit", "Drag fields into the Rows and Values zones above") : m("bigconsole.widget.pivotTable.configureHintView", "Add row fields and value fields in widget settings")
372
+ children: b ? m("bigconsole.widget.pivotTable.configureHintEdit", "Drag fields into the Rows and Values zones above") : m("bigconsole.widget.pivotTable.configureHintView", "Add row fields and value fields in widget settings")
372
373
  })
373
374
  ]
374
375
  })]
375
376
  });
376
- }), y = "application/x-pivot-field", b = ({ rowFields: e, columnFields: t, valueFields: n, availableFields: r, onMoveField: i, onChangeAggregation: o }) => {
377
- let { t: s } = u(), [l, m] = a(null), h = (e) => (t) => {
378
- t.preventDefault(), t.stopPropagation(), m(null);
379
- let n = t.dataTransfer.getData(y) || t.dataTransfer.getData("text/plain");
377
+ }), b = "application/x-pivot-field", x = ({ rowFields: e, columnFields: t, valueFields: n, availableFields: r, onMoveField: i, onChangeAggregation: o }) => {
378
+ let { t: s } = d(), [l, h] = a(null), g = (e) => (t) => {
379
+ t.preventDefault(), t.stopPropagation(), h(null);
380
+ let n = t.dataTransfer.getData(b) || t.dataTransfer.getData("text/plain");
380
381
  if (n) try {
381
382
  let { field: t, from: r } = JSON.parse(n);
382
383
  t && i(t, r, e);
383
384
  } catch {}
384
- }, g = (e, t, n) => /* @__PURE__ */ f("span", {
385
+ }, _ = (e, t, n) => /* @__PURE__ */ p("span", {
385
386
  draggable: !0,
386
387
  onDragStart: (n) => {
387
388
  let r = JSON.stringify({
388
389
  field: e,
389
390
  from: t
390
391
  });
391
- n.dataTransfer.setData(y, r), n.dataTransfer.setData("text/plain", r), n.dataTransfer.effectAllowed = "move";
392
+ n.dataTransfer.setData(b, r), n.dataTransfer.setData("text/plain", r), n.dataTransfer.effectAllowed = "move";
392
393
  },
393
394
  className: "inline-flex items-center gap-1 px-2 py-1 rounded-md bg-bg-surface border border-border-default text-xs text-text-primary cursor-grab",
394
395
  children: [
395
- /* @__PURE__ */ d(c, {
396
+ /* @__PURE__ */ f(c, {
396
397
  className: "w-3 h-3 text-text-muted",
397
398
  "aria-hidden": "true"
398
399
  }),
399
- /* @__PURE__ */ d("span", { children: (n?.label || e).replace(/_/g, " ") }),
400
- n && /* @__PURE__ */ d("select", {
400
+ /* @__PURE__ */ f("span", { children: (n?.label || e).replace(/_/g, " ") }),
401
+ n && /* @__PURE__ */ f(u, {
401
402
  value: n.aggregation,
402
403
  onChange: (t) => o(e, t.target.value),
403
404
  onClick: (e) => e.stopPropagation(),
404
405
  "aria-label": s("bigconsole.widget.pivotTable.aggregationForField", "Aggregation for {{field}}", { field: e }),
405
406
  className: "ml-1 bg-bg-sunken text-text-secondary rounded px-1 py-0.5 text-[10px] uppercase",
406
- children: p.map((e) => /* @__PURE__ */ d("option", {
407
+ children: m.map((e) => /* @__PURE__ */ f("option", {
407
408
  value: e,
408
409
  children: e
409
410
  }, e))
410
411
  })
411
412
  ]
412
- }, e), _ = (e, t, n) => /* @__PURE__ */ f("div", {
413
+ }, e), v = (e, t, n) => /* @__PURE__ */ p("div", {
413
414
  onDragOver: (e) => {
414
- e.preventDefault(), e.stopPropagation(), e.dataTransfer.dropEffect = "move", l !== t && m(t);
415
+ e.preventDefault(), e.stopPropagation(), e.dataTransfer.dropEffect = "move", l !== t && h(t);
415
416
  },
416
- onDragLeave: () => m((e) => e === t ? null : e),
417
- onDrop: h(t),
417
+ onDragLeave: () => h((e) => e === t ? null : e),
418
+ onDrop: g(t),
418
419
  className: `flex-1 min-w-[8rem] rounded-md border p-2 transition-colors ${l === t ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default bg-bg-sunken/30"}`,
419
- children: [/* @__PURE__ */ d("div", {
420
+ children: [/* @__PURE__ */ f("div", {
420
421
  className: "text-[10px] font-semibold uppercase tracking-wider text-text-muted mb-1.5",
421
422
  children: e
422
- }), /* @__PURE__ */ d("div", {
423
+ }), /* @__PURE__ */ f("div", {
423
424
  className: "flex flex-wrap gap-1.5 min-h-[1.75rem]",
424
425
  children: n
425
426
  })]
426
427
  });
427
- return /* @__PURE__ */ f("div", {
428
+ return /* @__PURE__ */ p("div", {
428
429
  className: "flex flex-wrap gap-2 p-2 border-b border-border-default bg-bg-surface",
429
430
  children: [
430
- _(s("bigconsole.widget.pivotTable.zoneRows", "Rows"), "rows", e.map((e) => g(e, "rows"))),
431
- _(s("bigconsole.widget.pivotTable.zoneColumns", "Columns"), "columns", t.map((e) => g(e, "columns"))),
432
- _(s("bigconsole.widget.pivotTable.zoneValues", "Values"), "values", n.map((e) => g(e.field, "values", e))),
433
- _(s("bigconsole.widget.pivotTable.zoneAvailable", "Available"), "available", r.length > 0 ? r.map((e) => g(e, "available")) : /* @__PURE__ */ d("span", {
431
+ v(s("bigconsole.widget.pivotTable.zoneRows", "Rows"), "rows", e.map((e) => _(e, "rows"))),
432
+ v(s("bigconsole.widget.pivotTable.zoneColumns", "Columns"), "columns", t.map((e) => _(e, "columns"))),
433
+ v(s("bigconsole.widget.pivotTable.zoneValues", "Values"), "values", n.map((e) => _(e.field, "values", e))),
434
+ v(s("bigconsole.widget.pivotTable.zoneAvailable", "Available"), "available", r.length > 0 ? r.map((e) => _(e, "available")) : /* @__PURE__ */ f("span", {
434
435
  className: "text-[11px] text-text-muted italic",
435
436
  children: s("bigconsole.widget.pivotTable.allFieldsInUse", "All fields in use")
436
437
  }))
437
438
  ]
438
439
  });
439
440
  };
440
- export { v as PivotTableWidget, v as default };
441
+ export { y as PivotTableWidget, y as default };