@burdenoff/microfe-bigconsole 2026.1012.3 → 2026.1012.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.
Files changed (158) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.js +149 -140
  2. package/dist/bigconsole/assistant/assistantApi.js +5 -5
  3. package/dist/bigconsole/assistant/assistantProduct.js +4 -1
  4. package/dist/bigconsole/assistant/displayCopy.d.ts +32 -0
  5. package/dist/bigconsole/assistant/pageContext.d.ts +14 -0
  6. package/dist/bigconsole/assistant/pageContext.js +6 -1
  7. package/dist/bigconsole/assistant/pageControls.d.ts +81 -0
  8. package/dist/bigconsole/assistant/pageControls.js +169 -0
  9. package/dist/bigconsole/assistant/previewControl.d.ts +16 -0
  10. package/dist/bigconsole/assistant/previewControl.js +10 -0
  11. package/dist/bigconsole/assistant/recordAdapters.js +27 -26
  12. package/dist/bigconsole/assistant/usePreviewControl.d.ts +2 -0
  13. package/dist/bigconsole/assistant/usePreviewControl.js +20 -0
  14. package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +33 -18
  15. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
  16. package/dist/bigconsole/components/common/SortBySelect.d.ts +11 -0
  17. package/dist/bigconsole/components/common/SortBySelect.js +29 -0
  18. package/dist/bigconsole/components/common/index.d.ts +1 -0
  19. package/dist/bigconsole/components/common/index.js +1 -0
  20. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
  21. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
  22. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
  23. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +15 -15
  24. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
  25. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
  26. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
  27. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
  28. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +153 -153
  29. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
  30. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
  31. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +134 -134
  32. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
  33. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
  34. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
  35. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
  36. package/dist/bigconsole/components/dashboard/WidgetPalette.js +154 -150
  37. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
  38. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
  39. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
  40. package/dist/bigconsole/components/datasink/DataSinkCard.js +51 -50
  41. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
  42. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
  43. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
  44. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
  45. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
  46. package/dist/bigconsole/components/embed/renderer-manifest.js +12 -0
  47. package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
  48. package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
  49. package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
  50. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
  51. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +77 -76
  52. package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
  53. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
  54. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
  55. package/dist/bigconsole/components/widgets/PropertiesPanel.js +507 -499
  56. package/dist/bigconsole/components/widgets/WidgetRegistry.js +122 -1
  57. package/dist/bigconsole/components/widgets/WidgetWrapper.js +227 -224
  58. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.d.ts +10 -0
  59. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +113 -0
  60. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.d.ts +10 -0
  61. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +187 -0
  62. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.d.ts +7 -0
  63. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.js +12 -0
  64. package/dist/bigconsole/components/widgets/advanced/data.d.ts +36 -0
  65. package/dist/bigconsole/components/widgets/advanced/data.js +113 -0
  66. package/dist/bigconsole/components/widgets/advanced/mapData.d.ts +10 -0
  67. package/dist/bigconsole/components/widgets/advanced/mapData.js +22 -0
  68. package/dist/bigconsole/components/widgets/advanced/waterfallData.d.ts +15 -0
  69. package/dist/bigconsole/components/widgets/advanced/waterfallData.js +28 -0
  70. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
  71. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  72. package/dist/bigconsole/components/widgets/chart/charts/WaterfallChart.js +34 -37
  73. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  74. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  75. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  76. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  77. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  78. package/dist/bigconsole/components/widgets/index.js +1 -1
  79. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  80. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  81. package/dist/bigconsole/components/widgets/map-widget/MapWidget.d.ts +2 -0
  82. package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +64 -63
  83. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  84. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  85. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  86. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  87. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  88. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  89. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  90. package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
  91. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
  92. package/dist/bigconsole/constants/backendErrors.js +94 -0
  93. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
  94. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
  95. package/dist/bigconsole/graphql/widgetCapabilities.d.ts +7 -0
  96. package/dist/bigconsole/graphql/widgetCapabilities.js +37 -0
  97. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +14 -0
  98. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +32 -0
  99. package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +23 -0
  100. package/dist/bigconsole/hooks/useDataSinkAlerts.js +138 -113
  101. package/dist/bigconsole/hooks/useDrilldown.js +3 -3
  102. package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
  103. package/dist/bigconsole/hooks/useWidgetCatalog.js +46 -41
  104. package/dist/bigconsole/hooks/useWidgetOperations.js +113 -88
  105. package/dist/bigconsole/pages/AdminPage.js +130 -130
  106. package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
  107. package/dist/bigconsole/pages/DashboardViewPage.js +244 -221
  108. package/dist/bigconsole/pages/DashboardsPage.js +269 -221
  109. package/dist/bigconsole/pages/DataParsersPage.js +180 -157
  110. package/dist/bigconsole/pages/DataSinkAlertsPage.js +62 -55
  111. package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -234
  112. package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
  113. package/dist/bigconsole/pages/DataSinksPage.js +335 -299
  114. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  115. package/dist/bigconsole/pages/InsightsPage.js +279 -265
  116. package/dist/bigconsole/pages/OverviewPage.js +47 -47
  117. package/dist/bigconsole/pages/ParserBuilderPage.js +229 -213
  118. package/dist/bigconsole/pages/ParserViewPage.js +97 -97
  119. package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
  120. package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
  121. package/dist/bigconsole/pages/PipelinesPage.js +107 -88
  122. package/dist/bigconsole/pages/SettingsPage.js +179 -173
  123. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  124. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  125. package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
  126. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
  127. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
  128. package/dist/bigconsole/renderers/adapters/BigConsoleRenderer.js +8 -5
  129. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +69 -69
  130. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  131. package/dist/bigconsole/store/widgetStore.d.ts +12 -0
  132. package/dist/bigconsole/store/widgetStore.js +3 -1
  133. package/dist/bigconsole/types/index.d.ts +1 -1
  134. package/dist/bigconsole/utils/advancedWidgetCapabilities.d.ts +14 -0
  135. package/dist/bigconsole/utils/advancedWidgetCapabilities.js +36 -0
  136. package/dist/bigconsole/utils/backendError.d.ts +18 -0
  137. package/dist/bigconsole/utils/backendError.js +42 -0
  138. package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
  139. package/dist/bigconsole/utils/dashboardList.js +15 -0
  140. package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
  141. package/dist/bigconsole/utils/dataSinkList.js +15 -0
  142. package/dist/bigconsole/utils/formDirty.d.ts +82 -0
  143. package/dist/bigconsole/utils/formDirty.js +21 -0
  144. package/dist/bigconsole/utils/insightsDraft.d.ts +29 -0
  145. package/dist/bigconsole/utils/insightsDraft.js +8 -0
  146. package/dist/bigconsole/utils/layoutBaseline.d.ts +130 -0
  147. package/dist/bigconsole/utils/layoutBaseline.js +96 -0
  148. package/dist/bigconsole/utils/listSort.d.ts +80 -0
  149. package/dist/bigconsole/utils/listSort.js +85 -0
  150. package/dist/bigconsole/utils/widgetFormDirty.d.ts +16 -0
  151. package/dist/bigconsole/utils/widgetFormDirty.js +13 -0
  152. package/dist/bigconsole/utils/widgetTypeMapping.d.ts +1 -1
  153. package/dist/bigconsole/utils/widgetTypeMapping.js +13 -2
  154. package/dist/bigconsole/workflowOpen.js +15 -14
  155. package/dist/generated/wspace-operations.d.ts +61 -2
  156. package/dist/generated/wspace-operations.js +44 -18
  157. package/dist/generated/wspace-types.d.ts +34 -3
  158. package/package.json +3 -3
@@ -7,8 +7,8 @@ import { localProposalSource as ne } from "./proposalSource.js";
7
7
  import { memo as a, useCallback as o, useEffect as re, useMemo as s, useState as c } from "react";
8
8
  import { AlertTriangle as l, Check as u, Loader2 as d, RefreshCw as ie, Sparkles as ae, X as oe } from "lucide-react";
9
9
  import { Button as f, Input as p, Label as m, Textarea as se } from "@burdenoff/fe-libs/ui";
10
- import { Fragment as ce, jsx as h, jsxs as g } from "react/jsx-runtime";
11
- import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
12
12
  //#region src/bigconsole/customWidget/CustomWidgetProposalPanel.tsx
13
13
  var v = "w-full", y = {
14
14
  loading: "neutral",
@@ -61,7 +61,7 @@ function S(e) {
61
61
  return 0;
62
62
  }
63
63
  var C = a(function({ sinks: a, parsers: C, resolvePreviewData: w, onApprove: T, onClose: E, source: D = ne }) {
64
- let { t: O } = _(), k = s(() => ({
64
+ let { t: O } = ce(), k = s(() => ({
65
65
  loading: {
66
66
  title: O("bigconsole.widget.customWidget.preview.loading.title", "Building preview…"),
67
67
  body: O("bigconsole.widget.customWidget.preview.loading.body", "Reading the selected data binding.")
@@ -162,43 +162,43 @@ var C = a(function({ sinks: a, parsers: C, resolvePreviewData: w, onApprove: T,
162
162
  E,
163
163
  O
164
164
  ]), Q = J.issues.filter((e) => e.severity === "error"), $ = J.issues.filter((e) => e.severity === "warning");
165
- return /* @__PURE__ */ h("section", {
165
+ return /* @__PURE__ */ g("section", {
166
166
  "data-testid": "custom-widget-proposal-panel",
167
167
  "aria-label": O("bigconsole.widget.customWidget.panel.ariaLabel", "AI custom widget builder"),
168
168
  className: "flex h-full w-full min-w-0 flex-col overflow-y-auto p-4",
169
- children: /* @__PURE__ */ g(t, { children: [/* @__PURE__ */ h(e, {
169
+ children: /* @__PURE__ */ _(t, { children: [/* @__PURE__ */ g(e, {
170
170
  title: O("bigconsole.widget.customWidget.prompt.label", "Describe the widget you need"),
171
171
  description: "Plain English. The assistant proposes a typed widget you can edit before anything is saved.",
172
- icon: /* @__PURE__ */ h(ae, {
172
+ icon: /* @__PURE__ */ g(ae, {
173
173
  className: "size-4",
174
174
  "aria-hidden": "true"
175
175
  }),
176
- actions: /* @__PURE__ */ g("div", {
176
+ actions: /* @__PURE__ */ _("div", {
177
177
  className: "flex flex-wrap gap-2",
178
- children: [/* @__PURE__ */ g(f, {
178
+ children: [/* @__PURE__ */ _(f, {
179
179
  "data-testid": "custom-widget-generate",
180
180
  onClick: ue,
181
181
  disabled: !A.trim() || N,
182
- children: [N ? /* @__PURE__ */ h(d, {
182
+ children: [N ? /* @__PURE__ */ g(d, {
183
183
  className: "mr-2 size-4 animate-spin",
184
184
  "aria-hidden": "true"
185
185
  }) : null, j ? O("bigconsole.widget.customWidget.action.regenerate", "Regenerate") : O("bigconsole.widget.customWidget.action.generateProposal", "Generate proposal")]
186
- }), j ? /* @__PURE__ */ g(f, {
186
+ }), j ? /* @__PURE__ */ _(f, {
187
187
  variant: "outline",
188
188
  "data-testid": "custom-widget-reject",
189
189
  onClick: de,
190
- children: [/* @__PURE__ */ h(oe, {
190
+ children: [/* @__PURE__ */ g(oe, {
191
191
  className: "mr-1 size-4",
192
192
  "aria-hidden": "true"
193
193
  }), O("bigconsole.widget.customWidget.action.reject", "Reject")]
194
194
  }) : null]
195
195
  }),
196
- children: /* @__PURE__ */ g("div", {
196
+ children: /* @__PURE__ */ _("div", {
197
197
  className: "flex flex-col gap-2",
198
- children: [/* @__PURE__ */ h(m, {
198
+ children: [/* @__PURE__ */ g(m, {
199
199
  htmlFor: "custom-widget-prompt",
200
200
  children: "What should it show?"
201
- }), /* @__PURE__ */ h(se, {
201
+ }), /* @__PURE__ */ g(se, {
202
202
  id: "custom-widget-prompt",
203
203
  "data-testid": "custom-widget-prompt",
204
204
  value: A,
@@ -207,95 +207,95 @@ var C = a(function({ sinks: a, parsers: C, resolvePreviewData: w, onApprove: T,
207
207
  rows: 3
208
208
  })]
209
209
  })
210
- }), j ? /* @__PURE__ */ g(ce, { children: [
211
- /* @__PURE__ */ g(e, {
210
+ }), j ? /* @__PURE__ */ _(h, { children: [
211
+ /* @__PURE__ */ _(e, {
212
212
  emphasis: "primary",
213
213
  tone: y[Y],
214
214
  title: k[Y].title,
215
215
  description: j.binding.parserId ? O("bigconsole.widget.customWidget.preview.parserDescription", "Rendered using the saved parser output.") : O("bigconsole.widget.customWidget.preview.sourceDescription", "Rendered using up to 50 source rows. Full data may differ."),
216
- meta: /* @__PURE__ */ h("span", {
216
+ meta: /* @__PURE__ */ g("span", {
217
217
  "data-testid": "custom-widget-preview-state",
218
218
  "data-state": Y,
219
219
  className: "rounded-pill bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
220
220
  children: Y
221
221
  }),
222
- children: [/* @__PURE__ */ h("div", {
222
+ children: [/* @__PURE__ */ g("div", {
223
223
  "data-testid": "custom-widget-preview",
224
224
  className: "min-h-[220px] min-w-0 rounded-card border border-[var(--color-border-subtle)] bg-bg-surface p-2",
225
- children: Y === "loading" ? /* @__PURE__ */ g("div", {
225
+ children: Y === "loading" ? /* @__PURE__ */ _("div", {
226
226
  className: "flex h-[200px] items-center justify-center text-text-secondary",
227
- children: [/* @__PURE__ */ h(d, {
227
+ children: [/* @__PURE__ */ g(d, {
228
228
  className: "mr-2 size-4 animate-spin",
229
229
  "aria-hidden": "true"
230
- }), /* @__PURE__ */ h("span", {
230
+ }), /* @__PURE__ */ g("span", {
231
231
  className: "text-sm",
232
232
  children: k.loading.body
233
233
  })]
234
- }) : Y === "valid" ? /* @__PURE__ */ h("div", {
234
+ }) : Y === "valid" ? /* @__PURE__ */ g("div", {
235
235
  className: "h-[200px]",
236
- children: /* @__PURE__ */ h(n, {
236
+ children: /* @__PURE__ */ g(n, {
237
237
  widgetId: `preview-${j.id}`,
238
- children: /* @__PURE__ */ h(ee, {
238
+ children: /* @__PURE__ */ g(ee, {
239
239
  widget: b(j, O("bigconsole.widget.customWidget.untitledWidget", "Untitled widget")),
240
240
  data: z
241
241
  })
242
242
  })
243
- }) : /* @__PURE__ */ g("div", {
243
+ }) : /* @__PURE__ */ _("div", {
244
244
  className: "flex h-[200px] flex-col items-center justify-center gap-2 px-4 text-center",
245
245
  children: [
246
- /* @__PURE__ */ h(l, {
246
+ /* @__PURE__ */ g(l, {
247
247
  className: "size-5 text-[var(--color-status-warning-text)]",
248
248
  "aria-hidden": "true"
249
249
  }),
250
- /* @__PURE__ */ h("p", {
250
+ /* @__PURE__ */ g("p", {
251
251
  className: "text-sm text-text-secondary",
252
252
  children: k[Y].body
253
253
  }),
254
- Y === "access-error" ? /* @__PURE__ */ g(f, {
254
+ Y === "access-error" ? /* @__PURE__ */ _(f, {
255
255
  size: "sm",
256
256
  variant: "outline",
257
257
  onClick: () => X((e) => ({ ...e })),
258
- children: [/* @__PURE__ */ h(ie, {
258
+ children: [/* @__PURE__ */ g(ie, {
259
259
  className: "mr-1 size-3.5",
260
260
  "aria-hidden": "true"
261
261
  }), O("bigconsole.widget.customWidget.action.retry", "Retry")]
262
262
  }) : null
263
263
  ]
264
264
  })
265
- }), j.rationale ? /* @__PURE__ */ h("p", {
265
+ }), j.rationale ? /* @__PURE__ */ g("p", {
266
266
  className: "mt-2 text-xs text-text-secondary",
267
267
  "data-testid": "custom-widget-rationale",
268
268
  children: j.rationale
269
269
  }) : null]
270
270
  }),
271
- Q.length > 0 || $.length > 0 ? /* @__PURE__ */ h(e, {
271
+ Q.length > 0 || $.length > 0 ? /* @__PURE__ */ g(e, {
272
272
  tone: Q.length > 0 ? "danger" : "warning",
273
273
  padding: "compact",
274
274
  headingLevel: 3,
275
275
  title: Q.length > 0 ? `${Q.length} ${Q.length === 1 ? "problem" : "problems"} to fix before approving` : `${$.length} ${$.length === 1 ? "warning" : "warnings"}`,
276
- children: /* @__PURE__ */ h("ul", {
276
+ children: /* @__PURE__ */ g("ul", {
277
277
  "data-testid": "custom-widget-issues",
278
278
  className: "flex min-w-0 flex-col gap-1",
279
- children: [...Q, ...$].map((e) => /* @__PURE__ */ h("li", {
279
+ children: [...Q, ...$].map((e) => /* @__PURE__ */ g("li", {
280
280
  "data-severity": e.severity,
281
281
  className: `break-words text-xs ${e.severity === "error" ? "text-[var(--color-status-error-text)]" : "text-[var(--color-status-warning-text)]"}`,
282
282
  children: e.message
283
283
  }, `${e.code}-${e.path ?? ""}`))
284
284
  })
285
285
  }) : null,
286
- /* @__PURE__ */ h(e, {
286
+ /* @__PURE__ */ g(e, {
287
287
  title: O("bigconsole.widget.customWidget.proposal.heading", "Proposal"),
288
288
  description: "Every field is editable — the assistant proposes, you dispose.",
289
289
  "data-testid": "custom-widget-proposal-fields",
290
- children: /* @__PURE__ */ g("div", {
290
+ children: /* @__PURE__ */ _("div", {
291
291
  className: "flex flex-col gap-3",
292
292
  children: [
293
- /* @__PURE__ */ g("div", {
293
+ /* @__PURE__ */ _("div", {
294
294
  className: "flex flex-col gap-1",
295
- children: [/* @__PURE__ */ h(m, {
295
+ children: [/* @__PURE__ */ g(m, {
296
296
  htmlFor: "custom-widget-title",
297
297
  children: O("bigconsole.widget.customWidget.field.title", "Title")
298
- }), /* @__PURE__ */ h(p, {
298
+ }), /* @__PURE__ */ g(p, {
299
299
  id: "custom-widget-title",
300
300
  "data-testid": "custom-widget-title",
301
301
  className: v,
@@ -309,12 +309,12 @@ var C = a(function({ sinks: a, parsers: C, resolvePreviewData: w, onApprove: T,
309
309
  }))
310
310
  })]
311
311
  }),
312
- /* @__PURE__ */ g("div", {
312
+ /* @__PURE__ */ _("div", {
313
313
  className: "flex flex-col gap-1",
314
- children: [/* @__PURE__ */ h(m, {
314
+ children: [/* @__PURE__ */ g(m, {
315
315
  htmlFor: "custom-widget-type",
316
316
  children: O("bigconsole.widget.customWidget.field.widgetType", "Widget type")
317
- }), /* @__PURE__ */ h("select", {
317
+ }), /* @__PURE__ */ g("select", {
318
318
  id: "custom-widget-type",
319
319
  "data-testid": "custom-widget-type",
320
320
  value: j.widgetType,
@@ -323,18 +323,18 @@ var C = a(function({ sinks: a, parsers: C, resolvePreviewData: w, onApprove: T,
323
323
  widgetType: e.target.value
324
324
  })),
325
325
  className: "w-full rounded-md border border-[var(--color-border-default)] bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
326
- children: te.map((e) => /* @__PURE__ */ h("option", {
326
+ children: te.map((e) => /* @__PURE__ */ g("option", {
327
327
  value: e,
328
328
  children: e
329
329
  }, e))
330
330
  })]
331
331
  }),
332
- /* @__PURE__ */ g("div", {
332
+ /* @__PURE__ */ _("div", {
333
333
  className: "flex flex-col gap-1",
334
- children: [/* @__PURE__ */ h(m, {
334
+ children: [/* @__PURE__ */ g(m, {
335
335
  htmlFor: "custom-widget-sink",
336
336
  children: O("bigconsole.widget.customWidget.field.dataSink", "DataSink")
337
- }), /* @__PURE__ */ g("select", {
337
+ }), /* @__PURE__ */ _("select", {
338
338
  id: "custom-widget-sink",
339
339
  "data-testid": "custom-widget-sink",
340
340
  value: j.binding.dataSinkId,
@@ -350,21 +350,21 @@ var C = a(function({ sinks: a, parsers: C, resolvePreviewData: w, onApprove: T,
350
350
  }));
351
351
  },
352
352
  className: "w-full rounded-md border border-[var(--color-border-default)] bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
353
- children: [/* @__PURE__ */ h("option", {
353
+ children: [/* @__PURE__ */ g("option", {
354
354
  value: "",
355
355
  children: O("bigconsole.widget.customWidget.field.selectDataSink", "Select a DataSink…")
356
- }), a.map((e) => /* @__PURE__ */ h("option", {
356
+ }), a.map((e) => /* @__PURE__ */ g("option", {
357
357
  value: e.id,
358
358
  children: e.name || e.key
359
359
  }, e.id))]
360
360
  })]
361
361
  }),
362
- /* @__PURE__ */ g("div", {
362
+ /* @__PURE__ */ _("div", {
363
363
  className: "flex flex-col gap-1",
364
- children: [/* @__PURE__ */ h(m, {
364
+ children: [/* @__PURE__ */ g(m, {
365
365
  htmlFor: "custom-widget-parser",
366
366
  children: O("bigconsole.widget.customWidget.field.parser", "Parser")
367
- }), /* @__PURE__ */ g("select", {
367
+ }), /* @__PURE__ */ _("select", {
368
368
  id: "custom-widget-parser",
369
369
  "data-testid": "custom-widget-parser",
370
370
  value: j.binding.parserId ?? "",
@@ -380,29 +380,29 @@ var C = a(function({ sinks: a, parsers: C, resolvePreviewData: w, onApprove: T,
380
380
  }));
381
381
  },
382
382
  className: "w-full rounded-md border border-[var(--color-border-default)] bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
383
- children: [/* @__PURE__ */ h("option", {
383
+ children: [/* @__PURE__ */ g("option", {
384
384
  value: "",
385
385
  children: O("bigconsole.widget.customWidget.field.noParser", "No parser")
386
- }), C.map((e) => /* @__PURE__ */ h("option", {
386
+ }), C.map((e) => /* @__PURE__ */ g("option", {
387
387
  value: e.id,
388
388
  children: e.name
389
389
  }, e.id))]
390
390
  })]
391
391
  }),
392
- Object.keys(j.fieldMapping).length > 0 ? /* @__PURE__ */ g("fieldset", {
392
+ Object.keys(j.fieldMapping).length > 0 ? /* @__PURE__ */ _("fieldset", {
393
393
  className: "flex flex-col gap-2",
394
394
  "data-testid": "custom-widget-field-mapping",
395
395
  children: [
396
- /* @__PURE__ */ h("legend", {
396
+ /* @__PURE__ */ g("legend", {
397
397
  className: "text-sm font-medium text-text-primary",
398
398
  children: O("bigconsole.widget.customWidget.fieldMapping.legend", "Field mapping")
399
399
  }),
400
- Object.entries(j.fieldMapping).map(([e, t]) => /* @__PURE__ */ g("div", {
400
+ Object.entries(j.fieldMapping).map(([e, t]) => /* @__PURE__ */ _("div", {
401
401
  className: "flex flex-col gap-1",
402
- children: [/* @__PURE__ */ h(m, {
402
+ children: [/* @__PURE__ */ g(m, {
403
403
  htmlFor: `custom-widget-field-${e}`,
404
404
  children: e
405
- }), /* @__PURE__ */ h(p, {
405
+ }), /* @__PURE__ */ g(p, {
406
406
  id: `custom-widget-field-${e}`,
407
407
  "data-testid": `custom-widget-field-${e}`,
408
408
  value: t,
@@ -415,7 +415,7 @@ var C = a(function({ sinks: a, parsers: C, resolvePreviewData: w, onApprove: T,
415
415
  }))
416
416
  })]
417
417
  }, e)),
418
- q?.length ? /* @__PURE__ */ h("p", {
418
+ q?.length ? /* @__PURE__ */ g("p", {
419
419
  className: "break-words text-xs text-text-secondary",
420
420
  children: O("bigconsole.widget.customWidget.fieldMapping.available", "Available: {{fields}}", { fields: q.join(", ") })
421
421
  }) : null
@@ -424,44 +424,44 @@ var C = a(function({ sinks: a, parsers: C, resolvePreviewData: w, onApprove: T,
424
424
  ]
425
425
  })
426
426
  }),
427
- L ? /* @__PURE__ */ h(e, {
427
+ L ? /* @__PURE__ */ g(e, {
428
428
  tone: "danger",
429
429
  padding: "compact",
430
430
  headingLevel: 3,
431
431
  title: "Could not add the widget",
432
- children: /* @__PURE__ */ h("p", {
432
+ children: /* @__PURE__ */ g("p", {
433
433
  role: "alert",
434
434
  className: "break-words text-xs text-[var(--color-status-error-text)]",
435
435
  "data-testid": "custom-widget-approve-error",
436
436
  children: L
437
437
  })
438
438
  }) : null,
439
- /* @__PURE__ */ g("div", {
439
+ /* @__PURE__ */ _("div", {
440
440
  className: "flex flex-wrap gap-2 border-t border-[var(--color-border-subtle)] pt-3",
441
- children: [/* @__PURE__ */ g(f, {
441
+ children: [/* @__PURE__ */ _(f, {
442
442
  "data-testid": "custom-widget-approve",
443
443
  onClick: Z,
444
444
  disabled: !J.canApprove || V || U || F,
445
- children: [F ? /* @__PURE__ */ h(d, {
445
+ children: [F ? /* @__PURE__ */ g(d, {
446
446
  className: "mr-2 size-4 animate-spin",
447
447
  "aria-hidden": "true"
448
- }) : /* @__PURE__ */ h(u, {
448
+ }) : /* @__PURE__ */ g(u, {
449
449
  className: "mr-1 size-4",
450
450
  "aria-hidden": "true"
451
451
  }), O("bigconsole.widget.customWidget.action.approveAndAdd", "Approve & add to dashboard")]
452
- }), /* @__PURE__ */ h(f, {
452
+ }), /* @__PURE__ */ g(f, {
453
453
  variant: "outline",
454
454
  onClick: E,
455
455
  "data-testid": "custom-widget-cancel",
456
456
  children: O("bigconsole.widget.customWidget.action.cancel", "Cancel")
457
457
  })]
458
458
  })
459
- ] }) : /* @__PURE__ */ h(e, {
459
+ ] }) : /* @__PURE__ */ g(e, {
460
460
  emphasis: "muted",
461
461
  padding: "compact",
462
462
  title: "No proposal yet",
463
463
  headingLevel: 3,
464
- children: /* @__PURE__ */ h("p", {
464
+ children: /* @__PURE__ */ g("p", {
465
465
  className: "text-sm text-text-secondary",
466
466
  "data-testid": "custom-widget-empty",
467
467
  children: O("bigconsole.widget.customWidget.empty", "No proposal yet. Describe a widget and the assistant will propose one for you to review — nothing is added to the dashboard until you approve it.")
@@ -0,0 +1,7 @@
1
+ import { ApolloClient } from '@apollo/client';
2
+ import { GetWidgetTypesQuery } from '../../generated/wspace-operations';
3
+
4
+ /** Only an older catalog schema triggers fallback; auth/network errors remain errors. */
5
+ export declare function isLegacyWidgetCatalogSchema(error: unknown): boolean;
6
+ /** Uses the ordinary scoped catalog: production intentionally disables introspection. */
7
+ export declare function loadNativeWidgetCatalog(client: ApolloClient, workspaceId: string): Promise<GetWidgetTypesQuery>;
@@ -0,0 +1,37 @@
1
+ import { GetLegacyWidgetTypesDocument as e, GetWidgetTypesDocument as t } from "../../generated/wspace-operations.js";
2
+ //#region src/bigconsole/graphql/widgetCapabilities.ts
3
+ function n(e) {
4
+ return e instanceof Error && e.message.includes("Cannot query field \"federationType\" on type \"WidgetTypeInfo\"");
5
+ }
6
+ async function r(r, i) {
7
+ let a = {
8
+ fetchPolicy: "no-cache",
9
+ errorPolicy: "none",
10
+ context: {
11
+ requiredWorkspaceAuth: !0,
12
+ requiredWorkspaceId: i,
13
+ queryDeduplication: !1
14
+ }
15
+ };
16
+ try {
17
+ let e = await r.query({
18
+ query: t,
19
+ ...a
20
+ });
21
+ if (!e.data) throw Error("Widget catalog response is missing.");
22
+ return e.data;
23
+ } catch (t) {
24
+ if (!n(t)) throw t;
25
+ let i = await r.query({
26
+ query: e,
27
+ ...a
28
+ });
29
+ if (!i.data) throw Error("Widget catalog response is missing.", { cause: t });
30
+ return { getWidgetTypes: i.data.getWidgetTypes.map((e) => ({
31
+ ...e,
32
+ federationType: null
33
+ })) };
34
+ }
35
+ }
36
+ //#endregion
37
+ export { r as loadNativeWidgetCatalog };
@@ -0,0 +1,14 @@
1
+ import { LayoutItem } from '../utils/layoutBaseline';
2
+
3
+ export interface DashboardLayoutBaseline {
4
+ /** The board's positions differ from the last loaded or saved ones, because a person placed something. */
5
+ dirty: boolean;
6
+ /**
7
+ * Re-take the baseline after the positions reached the server. `sent` is exactly
8
+ * what was sent; `editRevisionAtSave` is `layoutEditRevision` read BEFORE the
9
+ * request began, so a placement made while it was in flight stays dirty.
10
+ * Call it on success only: a failed save must leave the layout dirty.
11
+ */
12
+ markSaved: (sent: ReadonlyArray<LayoutItem>, editRevisionAtSave: number) => void;
13
+ }
14
+ export declare function useDashboardLayoutBaseline(dashboardId: string | undefined): DashboardLayoutBaseline;
@@ -0,0 +1,32 @@
1
+ import { useWidgetStore as e } from "../store/widgetStore.js";
2
+ import "../store/index.js";
3
+ import { INITIAL_LAYOUT_BASELINE as t, isLayoutBaselineDirty as n, layoutFromWidgets as r, normaliseLayout as i, reduceLayoutBaseline as a } from "../utils/layoutBaseline.js";
4
+ import { useCallback as o, useEffect as s, useMemo as c, useReducer as l, useState as u } from "react";
5
+ //#region src/bigconsole/hooks/useDashboardLayoutBaseline.ts
6
+ function d(d) {
7
+ let f = e((e) => e.widgets), p = e((e) => e.layoutEditRevision), [m, h] = l(a, t), g = c(() => r(f.values()), [f]), [_, v] = u(d);
8
+ _ !== d && (v(d), h({ type: "reset" })), s(() => {
9
+ h({
10
+ type: "observe",
11
+ layout: g,
12
+ editRevision: p
13
+ });
14
+ }, [
15
+ d,
16
+ g,
17
+ p
18
+ ]);
19
+ let y = o((e, t) => {
20
+ h({
21
+ type: "saved",
22
+ layout: i(e),
23
+ editRevision: t
24
+ });
25
+ }, []);
26
+ return {
27
+ dirty: n(m, g),
28
+ markSaved: y
29
+ };
30
+ }
31
+ //#endregion
32
+ export { d as useDashboardLayoutBaseline };
@@ -7,6 +7,25 @@ export type AlertChannel = BigConsoleDataSinkAlertChannelsQuery['dataSinkAlertCh
7
7
  export type AlertExecution = BigConsoleDataSinkAlertExecutionsQuery['dataSinkAlertExecutions'][number];
8
8
  export type AlertPreview = BigConsolePreviewDataSinkAlertQuery['previewDataSinkAlert'];
9
9
  export declare const alertErrorMessage: (error: unknown) => string;
10
+ /**
11
+ * "This data sink is not here": the client's own check (`getDataSink` answers
12
+ * `null`, or a sink from another workspace) and the server's codes for it.
13
+ */
14
+ export declare const ALERT_SINK_NOT_FOUND = "DATASINK_NOT_FOUND";
15
+ type Translate = (key: string, fallback: string) => string;
16
+ /**
17
+ * What the alerts page says when the data sink could not be loaded
18
+ * (BOFF-8060 i18n B3). The server's English never wins over a keyed string:
19
+ *
20
+ * - not found (or nothing recorded) → `bigconsole.alerts.notFound`;
21
+ * - a coded failure → `bigconsole.errors.<CODE>`, the catalog the rest of
22
+ * BigConsole localizes backend errors with;
23
+ * - only an uncoded failure falls back to its raw message, which has no key.
24
+ */
25
+ export declare function describeAlertLoadFailure(t: Translate, failure: {
26
+ error: string | null;
27
+ errorCode: string | null;
28
+ }): string;
10
29
  /** Every read and write uses the selected workspace; late requests cannot populate a new owner. */
11
30
  export declare function useDataSinkAlerts(dataSinkId: string, enabled: boolean): {
12
31
  owner: string;
@@ -43,6 +62,7 @@ export declare function useDataSinkAlerts(dataSinkId: string, enabled: boolean):
43
62
  }> | null;
44
63
  } | null | undefined>;
45
64
  reloadChannels: () => Promise<void>;
65
+ reloadSinkThenChannels: () => Promise<void>;
46
66
  save: (alert: DataSinkAlertInput, expectedVersion: number) => Promise<{
47
67
  __typename?: "DataSink";
48
68
  id: string;
@@ -141,5 +161,8 @@ export declare function useDataSinkAlerts(dataSinkId: string, enabled: boolean):
141
161
  channels: AlertChannel[];
142
162
  loading: boolean;
143
163
  error: string | null;
164
+ /** The first GraphQL `extensions.code` behind `error`, or the client's own not-found marker. */
165
+ errorCode: string | null;
144
166
  channelError: string | null;
145
167
  };
168
+ export {};