@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
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Dashboard layout baseline (BOFF-8060, N3/N4: the dashboard leave guard).
3
+ *
4
+ * The dashboard builder keeps moved and resized widgets only in the widget store
5
+ * until the toolbar Save runs (`DashboardBuilderPage.handleSave`, step 2). To tell
6
+ * the assistant "this editor holds unsaved work" the builder needs one honest
7
+ * boolean, and the store has none: `widgetStore.dirtyWidgetIds` is never marked and
8
+ * `dashboardStore.hasUnsavedChanges` is never cleared. This module is that boolean,
9
+ * as plain functions with no React, so it can be tested without a DOM.
10
+ *
11
+ * ★★ "A layout event happened" is NOT a dirty signal. Positions reach the store on
12
+ * load (`setWidgets`), when a widget is created or deleted, and when a save writes
13
+ * its own positions back, none of which is the person's work. Only a PERSON'S
14
+ * placement is. So the baseline FLOATS (it is re-taken on every observation)
15
+ * until the first placement by a person, and from then on it is FROZEN: it holds
16
+ * the last layout the server is known to have, and "dirty" means the current
17
+ * layout differs from it BY VALUE:
18
+ *
19
+ * load / refetch / add / delete / save write-back -> baseline follows, clean
20
+ * first drag, resize, or typed placement -> baseline freezes
21
+ * a drag that moves and moves back -> equal again, clean
22
+ * a successful save -> baseline = what was saved
23
+ * a failed save -> nothing happens, still dirty
24
+ *
25
+ * ★★ The "placement by a person" signal is `layoutEditRevision` on the widget
26
+ * store, a counter bumped by `updateWidgetPosition` and by nothing else. It is the
27
+ * ONE writer shared by the canvas (drag stop, resize stop) and the inspector's
28
+ * "Position & size" fields, so a placement typed into the inspector, which never
29
+ * touches the grid, freezes the baseline too. A signal taken from the grid alone
30
+ * would let a floating baseline silently absorb it.
31
+ *
32
+ * Every function here is pure. `useDashboardLayoutBaseline` is the React shell.
33
+ */
34
+ /** One widget's grid cell, in grid units (columns / rows). */
35
+ export interface LayoutRect {
36
+ readonly x: number;
37
+ readonly y: number;
38
+ readonly w: number;
39
+ readonly h: number;
40
+ }
41
+ export interface LayoutItem extends LayoutRect {
42
+ readonly id: string;
43
+ }
44
+ /**
45
+ * Widget id -> cell, keys in sorted order. A `Map` (not a plain object) so an
46
+ * id such as `"1"` or `"__proto__"` is only ever a key.
47
+ */
48
+ export type NormalisedLayout = ReadonlyMap<string, LayoutRect>;
49
+ interface PositionLike {
50
+ readonly x?: number | null;
51
+ readonly y?: number | null;
52
+ readonly width?: number | null;
53
+ readonly height?: number | null;
54
+ }
55
+ /**
56
+ * What a widget must carry for its cell to be read. Structural, so the store's
57
+ * `Widget` satisfies it and a test can pass a plain object.
58
+ */
59
+ export interface LayoutSourceWidget {
60
+ readonly id: string;
61
+ readonly position?: PositionLike | null;
62
+ readonly positionX?: number | null;
63
+ readonly positionY?: number | null;
64
+ readonly positionWidth?: number | null;
65
+ readonly positionHeight?: number | null;
66
+ }
67
+ /**
68
+ * The cell a widget with no stored size falls back to. These mirror
69
+ * `DashboardGrid.widgetToLayout` exactly, so the baseline reads a widget the same
70
+ * way the grid draws it.
71
+ */
72
+ export declare const DEFAULT_LAYOUT_CELL: LayoutRect;
73
+ /**
74
+ * Items -> a sorted `id -> x,y,w,h` map. Order of the input does not matter, a
75
+ * repeated id keeps the last one, and a non-finite number becomes 0 so a stray
76
+ * `NaN` (which is never equal to itself) cannot make a layout permanently dirty.
77
+ */
78
+ export declare function normaliseLayout(items: Iterable<LayoutItem>): NormalisedLayout;
79
+ /** The widget store's widgets -> a normalised layout (every widget in the store, which is what Save sends). */
80
+ export declare function layoutFromWidgets(widgets: Iterable<LayoutSourceWidget>): NormalisedLayout;
81
+ /** The `{ id, position }` list `batchUpdatePositions` sends -> layout items (exactly what reached the server). */
82
+ export declare function layoutItemsFromPositionUpdates(updates: ReadonlyArray<{
83
+ readonly id: string;
84
+ readonly position: PositionLike;
85
+ }>): LayoutItem[];
86
+ /** Same widgets in the same cells (by value; key order and object identity are irrelevant). */
87
+ export declare function layoutEquals(a: NormalisedLayout, b: NormalisedLayout): boolean;
88
+ /**
89
+ * Does `current` differ from `baseline`? Different cells, a widget present on only
90
+ * one side, or both, all count. With no baseline there is nothing to differ from,
91
+ * so the answer is no: this never claims unsaved work it cannot point to.
92
+ */
93
+ export declare function layoutDirty(current: NormalisedLayout, baseline: NormalisedLayout | null): boolean;
94
+ export interface LayoutBaselineState {
95
+ /** The layout the server is known to hold, or the last loaded one while floating. `null` until first observed. */
96
+ readonly baseline: NormalisedLayout | null;
97
+ /** True once a person has placed something since the baseline was taken. Frozen baselines do not follow the store. */
98
+ readonly frozen: boolean;
99
+ /** The last `layoutEditRevision` seen, to notice the next placement. `null` until first observed. */
100
+ readonly seenRevision: number | null;
101
+ }
102
+ export declare const INITIAL_LAYOUT_BASELINE: LayoutBaselineState;
103
+ export type LayoutBaselineAction =
104
+ /** The store changed (or the page mounted): here is the layout and the placement counter now. */
105
+ {
106
+ readonly type: 'observe';
107
+ readonly layout: NormalisedLayout;
108
+ readonly editRevision: number;
109
+ }
110
+ /**
111
+ * The positions reached the server. `layout` is exactly what was sent;
112
+ * `editRevision` is the counter read BEFORE the request started, so a
113
+ * placement made while it was in flight is not mistaken for saved.
114
+ */
115
+ | {
116
+ readonly type: 'saved';
117
+ readonly layout: NormalisedLayout;
118
+ readonly editRevision: number;
119
+ }
120
+ /** A different dashboard: forget everything. */
121
+ | {
122
+ readonly type: 'reset';
123
+ };
124
+ export declare function reduceLayoutBaseline(state: LayoutBaselineState, action: LayoutBaselineAction): LayoutBaselineState;
125
+ /**
126
+ * The one boolean the builder reports. A floating baseline is never dirty by
127
+ * definition: it follows the store, so whatever differs is not the person's work.
128
+ */
129
+ export declare function isLayoutBaselineDirty(state: LayoutBaselineState, current: NormalisedLayout): boolean;
130
+ export {};
@@ -0,0 +1,96 @@
1
+ //#region src/bigconsole/utils/layoutBaseline.ts
2
+ var e = {
3
+ x: 0,
4
+ y: 0,
5
+ w: 4,
6
+ h: 4
7
+ }, t = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, n = (e) => Number.isFinite(e) ? e : 0;
8
+ function r(e, n, r) {
9
+ return t(e) ?? t(n) ?? r;
10
+ }
11
+ var i = (e, t) => e < t ? -1 : +(e > t);
12
+ function a(e) {
13
+ let t = /* @__PURE__ */ new Map();
14
+ for (let r of e) t.set(r.id, {
15
+ x: n(r.x),
16
+ y: n(r.y),
17
+ w: n(r.w),
18
+ h: n(r.h)
19
+ });
20
+ return new Map([...t.entries()].sort(([e], [t]) => i(e, t)));
21
+ }
22
+ function o(t) {
23
+ let n = [];
24
+ for (let i of t) n.push({
25
+ id: i.id,
26
+ x: r(i.position?.x, i.positionX, e.x),
27
+ y: r(i.position?.y, i.positionY, e.y),
28
+ w: r(i.position?.width, i.positionWidth, e.w),
29
+ h: r(i.position?.height, i.positionHeight, e.h)
30
+ });
31
+ return a(n);
32
+ }
33
+ function s(t) {
34
+ return t.map((t) => ({
35
+ id: t.id,
36
+ x: r(t.position.x, void 0, e.x),
37
+ y: r(t.position.y, void 0, e.y),
38
+ w: r(t.position.width, void 0, e.w),
39
+ h: r(t.position.height, void 0, e.h)
40
+ }));
41
+ }
42
+ function c(e, t) {
43
+ if (e.size !== t.size) return !1;
44
+ for (let [n, r] of e) {
45
+ let e = t.get(n);
46
+ if (!e || r.x !== e.x || r.y !== e.y || r.w !== e.w || r.h !== e.h) return !1;
47
+ }
48
+ return !0;
49
+ }
50
+ function l(e, t) {
51
+ return t !== null && !c(e, t);
52
+ }
53
+ var u = {
54
+ baseline: null,
55
+ frozen: !1,
56
+ seenRevision: null
57
+ };
58
+ function d(e, t) {
59
+ switch (t.type) {
60
+ case "reset": return u;
61
+ case "observe": {
62
+ if (e.baseline === null) return {
63
+ baseline: t.layout,
64
+ frozen: !1,
65
+ seenRevision: t.editRevision
66
+ };
67
+ let n = t.editRevision !== e.seenRevision;
68
+ return e.frozen ? n ? {
69
+ ...e,
70
+ seenRevision: t.editRevision
71
+ } : e : n ? {
72
+ baseline: e.baseline,
73
+ frozen: !0,
74
+ seenRevision: t.editRevision
75
+ } : c(t.layout, e.baseline) ? e : {
76
+ baseline: t.layout,
77
+ frozen: !1,
78
+ seenRevision: t.editRevision
79
+ };
80
+ }
81
+ case "saved": return e.baseline === null ? {
82
+ baseline: t.layout,
83
+ frozen: !1,
84
+ seenRevision: t.editRevision
85
+ } : {
86
+ baseline: t.layout,
87
+ frozen: e.seenRevision !== null && e.seenRevision > t.editRevision,
88
+ seenRevision: e.seenRevision
89
+ };
90
+ }
91
+ }
92
+ function f(e, t) {
93
+ return e.frozen && l(t, e.baseline);
94
+ }
95
+ //#endregion
96
+ export { u as INITIAL_LAYOUT_BASELINE, f as isLayoutBaselineDirty, o as layoutFromWidgets, s as layoutItemsFromPositionUpdates, a as normaliseLayout, d as reduceLayoutBaseline };
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Shared "Sort by" model for BigConsole list pages (BOFF-8679).
3
+ *
4
+ * ★ One definition of the sort values, the comparator and the option labels, so
5
+ * the visible `SortBySelect`, the page's own list pipeline and the assistant's
6
+ * page-control adapter (`assistant/pageControls.ts`) cannot disagree: a person
7
+ * who picks "Name Z–A" from the menu and a person who says "sort by name
8
+ * descending" set the SAME state and get the SAME list.
9
+ *
10
+ * Pure: no React, no DOM, no i18n provider (labels come in through `Tr`).
11
+ *
12
+ * Only fields the list data really carries are offered:
13
+ * - Name: every dashboard has `name`; a data sink may have a null `name`, in
14
+ * which case its `key` is what the card and the table show, so that is what
15
+ * sorts.
16
+ * - Last updated: `updatedAt` on both. A row with no parseable date sorts last
17
+ * in both directions (it has no "age" to rank).
18
+ */
19
+ export type ListSortValue = 'default' | 'name-asc' | 'name-desc' | 'updated-desc' | 'updated-asc';
20
+ export type ListSortField = 'name' | 'updated';
21
+ export type SortTr = (key: string, fallback: string) => string;
22
+ export interface ListSortOption {
23
+ value: ListSortValue;
24
+ label: string;
25
+ }
26
+ /** How a list item exposes the two sortable fields. */
27
+ export interface ListSortKeys<T> {
28
+ /** The text the row shows as its name. */
29
+ name: (item: T) => string;
30
+ /** ISO timestamp of the last update, if any. */
31
+ updatedAt: (item: T) => string | null | undefined;
32
+ }
33
+ /** The i18n key and English source of every label used by the control. */
34
+ export declare const LIST_SORT_COPY: {
35
+ readonly label: {
36
+ readonly key: "bigconsole.listSort.label";
37
+ readonly en: "Sort by";
38
+ };
39
+ readonly default: {
40
+ readonly key: "bigconsole.listSort.default";
41
+ readonly en: "Default order";
42
+ };
43
+ readonly nameAsc: {
44
+ readonly key: "bigconsole.listSort.nameAsc";
45
+ readonly en: "Name A–Z";
46
+ };
47
+ readonly nameDesc: {
48
+ readonly key: "bigconsole.listSort.nameDesc";
49
+ readonly en: "Name Z–A";
50
+ };
51
+ readonly updatedDesc: {
52
+ readonly key: "bigconsole.listSort.updatedDesc";
53
+ readonly en: "Last updated: newest";
54
+ };
55
+ readonly updatedAsc: {
56
+ readonly key: "bigconsole.listSort.updatedAsc";
57
+ readonly en: "Last updated: oldest";
58
+ };
59
+ readonly fieldName: {
60
+ readonly key: "bigconsole.listSort.field.name";
61
+ readonly en: "Name";
62
+ };
63
+ readonly fieldUpdated: {
64
+ readonly key: "bigconsole.listSort.field.updated";
65
+ readonly en: "Last updated";
66
+ };
67
+ };
68
+ /**
69
+ * The list ordered by `value`. `default` returns the items in the order given
70
+ * (the page's own default order, untouched). The sort is stable: rows that tie
71
+ * keep their incoming order, so a re-sort never shuffles equal rows.
72
+ */
73
+ export declare function sortList<T>(items: readonly T[], value: ListSortValue, keys: ListSortKeys<T>): T[];
74
+ /**
75
+ * The options the visible control lists, in its words. `withDefault` adds the
76
+ * "Default order" entry for a page whose natural order is not one of the four
77
+ * (Dashboards: the server's order). A page whose default IS one of them
78
+ * (Data Sinks: newest first) omits it and starts on that value.
79
+ */
80
+ export declare function listSortOptions(tr: SortTr, withDefault: boolean): ListSortOption[];
@@ -0,0 +1,85 @@
1
+ //#region src/bigconsole/utils/listSort.ts
2
+ var e = {
3
+ label: {
4
+ key: "bigconsole.listSort.label",
5
+ en: "Sort by"
6
+ },
7
+ default: {
8
+ key: "bigconsole.listSort.default",
9
+ en: "Default order"
10
+ },
11
+ nameAsc: {
12
+ key: "bigconsole.listSort.nameAsc",
13
+ en: "Name A–Z"
14
+ },
15
+ nameDesc: {
16
+ key: "bigconsole.listSort.nameDesc",
17
+ en: "Name Z–A"
18
+ },
19
+ updatedDesc: {
20
+ key: "bigconsole.listSort.updatedDesc",
21
+ en: "Last updated: newest"
22
+ },
23
+ updatedAsc: {
24
+ key: "bigconsole.listSort.updatedAsc",
25
+ en: "Last updated: oldest"
26
+ },
27
+ fieldName: {
28
+ key: "bigconsole.listSort.field.name",
29
+ en: "Name"
30
+ },
31
+ fieldUpdated: {
32
+ key: "bigconsole.listSort.field.updated",
33
+ en: "Last updated"
34
+ }
35
+ }, t = new Intl.Collator(void 0, {
36
+ sensitivity: "base",
37
+ numeric: !0
38
+ });
39
+ function n(e) {
40
+ if (!e) return null;
41
+ let t = new Date(e).getTime();
42
+ return Number.isNaN(t) ? null : t;
43
+ }
44
+ function r(e, r, i) {
45
+ let a = [...e];
46
+ switch (r) {
47
+ case "default": return a;
48
+ case "name-asc": return a.sort((e, n) => t.compare(i.name(e), i.name(n)));
49
+ case "name-desc": return a.sort((e, n) => t.compare(i.name(n), i.name(e)));
50
+ case "updated-desc":
51
+ case "updated-asc": {
52
+ let e = r === "updated-desc" ? -1 : 1;
53
+ return a.sort((t, r) => {
54
+ let a = n(i.updatedAt(t)), o = n(i.updatedAt(r));
55
+ return a === null && o === null ? 0 : a === null ? 1 : o === null ? -1 : (a - o) * e;
56
+ });
57
+ }
58
+ }
59
+ }
60
+ function i(t, n) {
61
+ let r = [
62
+ {
63
+ value: "name-asc",
64
+ label: t(e.nameAsc.key, e.nameAsc.en)
65
+ },
66
+ {
67
+ value: "name-desc",
68
+ label: t(e.nameDesc.key, e.nameDesc.en)
69
+ },
70
+ {
71
+ value: "updated-desc",
72
+ label: t(e.updatedDesc.key, e.updatedDesc.en)
73
+ },
74
+ {
75
+ value: "updated-asc",
76
+ label: t(e.updatedAsc.key, e.updatedAsc.en)
77
+ }
78
+ ];
79
+ return n ? [{
80
+ value: "default",
81
+ label: t(e.default.key, e.default.en)
82
+ }, ...r] : r;
83
+ }
84
+ //#endregion
85
+ export { e as LIST_SORT_COPY, i as listSortOptions, r as sortList };
@@ -0,0 +1,16 @@
1
+ /** True when `form` differs by value from `baseline`. Either side missing is clean. */
2
+ export declare function isWidgetFormEdited<T>(form: T | null | undefined, baseline: T | null | undefined): boolean;
3
+ /**
4
+ * Adds an inferred DataSink binding to a form that is bound to `parserId` and has none.
5
+ *
6
+ * The widget inspector infers an absent `dataSinkId` from the parser's input sink key once the
7
+ * parser resolves (AI-created widgets bind a parser without duplicating its input sink id). That
8
+ * is the panel filling in what the widget already means, not an edit by the person. It is
9
+ * applied to the form AND to the baseline with this one function, so the value compare of
10
+ * `isWidgetFormEdited` reads clean. Returns the same object when nothing applies, so a state
11
+ * updater using it does not trigger a re-render.
12
+ */
13
+ export declare function withInferredDataSink<T extends {
14
+ parserId?: string | null;
15
+ dataSinkId?: string | null;
16
+ }>(form: T | null | undefined, parserId: string, dataSinkId: string): T | null;
@@ -0,0 +1,13 @@
1
+ import { isDirty as e } from "./formDirty.js";
2
+ //#region src/bigconsole/utils/widgetFormDirty.ts
3
+ function t(t, n) {
4
+ return t == null || n == null ? !1 : e(t, n);
5
+ }
6
+ function n(e, t, n) {
7
+ return e == null ? null : e.parserId !== t || e.dataSinkId ? e : {
8
+ ...e,
9
+ dataSinkId: n
10
+ };
11
+ }
12
+ //#endregion
13
+ export { t as isWidgetFormEdited, n as withInferredDataSink };
@@ -1,6 +1,6 @@
1
1
  import { WidgetType as InternalWidgetType } from '../types';
2
2
 
3
- export type FederationWidgetType = 'AREA_CHART' | 'BAR_CHART' | 'FUNNEL' | 'HEATMAP' | 'KPI' | 'LINE_CHART' | 'PIE_CHART' | 'RETENTION' | 'TABLE';
3
+ export type FederationWidgetType = 'AREA_CHART' | 'BAR_CHART' | 'FUNNEL' | 'HEATMAP' | 'KPI' | 'LINE_CHART' | 'PIE_CHART' | 'RETENTION' | 'TABLE' | 'MAP' | 'WATERFALL' | 'SANKEY' | 'BOX_PLOT';
4
4
  /**
5
5
  * Maps internal UI widget types to federation-accessible GraphQL enum values.
6
6
  *
@@ -4,6 +4,9 @@ function e(e) {
4
4
  kpi_card_comparison: "KPI",
5
5
  metric_card: "KPI",
6
6
  chart: "LINE_CHART",
7
+ waterfall: "WATERFALL",
8
+ sankey: "SANKEY",
9
+ box_plot: "BOX_PLOT",
7
10
  funnel_chart: "FUNNEL",
8
11
  table: "TABLE",
9
12
  pivot_table: "TABLE",
@@ -13,7 +16,7 @@ function e(e) {
13
16
  form: "TABLE",
14
17
  text: "KPI",
15
18
  iframe: "KPI",
16
- map: "HEATMAP",
19
+ map: "MAP",
17
20
  heatmap: "HEATMAP",
18
21
  calendar: "TABLE",
19
22
  kanban: "TABLE",
@@ -32,6 +35,10 @@ function t(e) {
32
35
  TABLE: "table",
33
36
  FUNNEL: "funnel_chart",
34
37
  HEATMAP: "heatmap",
38
+ MAP: "map",
39
+ WATERFALL: "waterfall",
40
+ SANKEY: "sankey",
41
+ BOX_PLOT: "box_plot",
35
42
  RETENTION: "table"
36
43
  }[e.toUpperCase()] || "metric_card";
37
44
  }
@@ -45,7 +52,11 @@ function n(e) {
45
52
  "LINE_CHART",
46
53
  "PIE_CHART",
47
54
  "RETENTION",
48
- "TABLE"
55
+ "TABLE",
56
+ "MAP",
57
+ "WATERFALL",
58
+ "SANKEY",
59
+ "BOX_PLOT"
49
60
  ]).has(e.toUpperCase());
50
61
  }
51
62
  function r(t) {
@@ -1,31 +1,32 @@
1
1
  import { WorkflowDefinitionExistsDocument as e } from "../generated/wspace-operations.js";
2
2
  import { BOOTSTRAP_RETRY_DELAY_MS as t } from "./constants.js";
3
+ import { hasGraphQLErrorCode as n } from "./utils/backendError.js";
3
4
  //#region src/bigconsole/workflowOpen.ts
4
- var n = { createWorkflow: !0 }, r = { state: n };
5
- function i(e) {
5
+ var r = new Set(["NOT_FOUND"]), i = { createWorkflow: !0 }, a = { state: i };
6
+ function o(e) {
6
7
  return typeof e == "object" && !!e && e.createWorkflow === !0;
7
8
  }
8
- function a(e) {
9
+ function s(e) {
9
10
  return { query: (t) => e.query(t) };
10
11
  }
11
- async function o(t, n) {
12
+ async function c(t, i) {
12
13
  try {
13
- let r = await t.query({
14
+ let a = await t.query({
14
15
  query: e,
15
- variables: { workflowKey: n },
16
+ variables: { workflowKey: i },
16
17
  fetchPolicy: "network-only"
17
18
  });
18
- return r.error ? "error" : r.data?.workflowDefinition ? "found" : "absent";
19
- } catch {
20
- return "error";
19
+ return a.error ? n(a.error, r) ? "absent" : "error" : a.data?.workflowDefinition ? "found" : "absent";
20
+ } catch (e) {
21
+ return n(e, r) ? "absent" : "error";
21
22
  }
22
23
  }
23
- var s = (e) => new Promise((t) => setTimeout(t, e));
24
- async function c(e, n, { retryDelayMs: r = t, sleep: i = s } = {}) {
25
- return await o(e, n) === "found" ? "found" : (await i(r), o(e, n));
24
+ var l = (e) => new Promise((t) => setTimeout(t, e));
25
+ async function u(e, n, { retryDelayMs: r = t, sleep: i = l } = {}) {
26
+ return await c(e, n) === "found" ? "found" : (await i(r), c(e, n));
26
27
  }
27
- function l({ key: e, createIntent: t, verifiedKey: n, absentKey: r, failedKey: i }) {
28
+ function d({ key: e, createIntent: t, verifiedKey: n, absentKey: r, failedKey: i }) {
28
29
  return t || n === e ? "builder" : r === e ? "not-found" : i === e ? "failed" : "checking";
29
30
  }
30
31
  //#endregion
31
- export { n as CREATE_WORKFLOW_STATE, r as NEW_WORKFLOW_NAV, l as decideWorkflowOpenView, i as isCreateIntent, a as toLookupClient, c as verifyWorkflowKey };
32
+ export { i as CREATE_WORKFLOW_STATE, a as NEW_WORKFLOW_NAV, d as decideWorkflowOpenView, o as isCreateIntent, s as toLookupClient, u as verifyWorkflowKey };
@@ -5049,7 +5049,9 @@ export type WidgetTranslationFieldsFragment = {
5049
5049
  };
5050
5050
  export type WidgetTypeInfoFieldsFragment = {
5051
5051
  __typename?: 'WidgetTypeInfo';
5052
- type: Types.WidgetType;
5052
+ type: string;
5053
+ federationType?: string | null;
5054
+ source?: string | null;
5053
5055
  label: string;
5054
5056
  description: string;
5055
5057
  icon: string;
@@ -5842,6 +5844,37 @@ export type GetEventWebhookMappingQuery = {
5842
5844
  } | null;
5843
5845
  } | null;
5844
5846
  };
5847
+ export type GetLegacyWidgetTypesQueryVariables = Types.Exact<{
5848
+ [key: string]: never;
5849
+ }>;
5850
+ export type GetLegacyWidgetTypesQuery = {
5851
+ __typename?: 'Query';
5852
+ getWidgetTypes: Array<{
5853
+ __typename?: 'WidgetTypeInfo';
5854
+ type: string;
5855
+ source?: string | null;
5856
+ label: string;
5857
+ description: string;
5858
+ icon: string;
5859
+ category: string;
5860
+ defaultConfig: Record<string, unknown>;
5861
+ defaultSize: {
5862
+ __typename?: 'WidgetSizeInfo';
5863
+ width: number;
5864
+ height: number;
5865
+ };
5866
+ minSize: {
5867
+ __typename?: 'WidgetSizeInfo';
5868
+ width: number;
5869
+ height: number;
5870
+ };
5871
+ maxSize: {
5872
+ __typename?: 'WidgetSizeInfo';
5873
+ width: number;
5874
+ height: number;
5875
+ };
5876
+ }>;
5877
+ };
5845
5878
  export type GetWidgetQueryVariables = Types.Exact<{
5846
5879
  id: Types.Scalars['ID']['input'];
5847
5880
  }>;
@@ -5995,7 +6028,9 @@ export type GetWidgetTypesQuery = {
5995
6028
  __typename?: 'Query';
5996
6029
  getWidgetTypes: Array<{
5997
6030
  __typename?: 'WidgetTypeInfo';
5998
- type: Types.WidgetType;
6031
+ type: string;
6032
+ federationType?: string | null;
6033
+ source?: string | null;
5999
6034
  label: string;
6000
6035
  description: string;
6001
6036
  icon: string;
@@ -10704,6 +10739,30 @@ export type GetEventWebhookMappingQueryHookResult = ReturnType<typeof useGetEven
10704
10739
  export type GetEventWebhookMappingLazyQueryHookResult = ReturnType<typeof useGetEventWebhookMappingLazyQuery>;
10705
10740
  export type GetEventWebhookMappingSuspenseQueryHookResult = ReturnType<typeof useGetEventWebhookMappingSuspenseQuery>;
10706
10741
  export type GetEventWebhookMappingQueryResult = Apollo.QueryResult<Types.GetEventWebhookMappingQuery, Types.GetEventWebhookMappingQueryVariables>;
10742
+ export declare const GetLegacyWidgetTypesDocument: Apollo.DocumentNode;
10743
+ /**
10744
+ * __useGetLegacyWidgetTypesQuery__
10745
+ *
10746
+ * To run a query within a React component, call `useGetLegacyWidgetTypesQuery` and pass it any options that fit your needs.
10747
+ * When your component renders, `useGetLegacyWidgetTypesQuery` returns an object from Apollo Client that contains loading, error, and data properties
10748
+ * you can use to render your UI.
10749
+ *
10750
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
10751
+ *
10752
+ * @example
10753
+ * const { data, loading, error } = useGetLegacyWidgetTypesQuery({
10754
+ * variables: {
10755
+ * },
10756
+ * });
10757
+ */
10758
+ export declare function useGetLegacyWidgetTypesQuery(baseOptions?: ApolloReactHooks.QueryHookOptions<Types.GetLegacyWidgetTypesQuery, Types.GetLegacyWidgetTypesQueryVariables>): ApolloReactHooks.useQuery.Result<Types.GetLegacyWidgetTypesQuery, Types.GetLegacyWidgetTypesQueryVariables, "empty" | "complete" | "streaming", Types.GetLegacyWidgetTypesQueryVariables>;
10759
+ export declare function useGetLegacyWidgetTypesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetLegacyWidgetTypesQuery, Types.GetLegacyWidgetTypesQueryVariables>): ApolloReactHooks.useLazyQuery.ResultTuple<Types.GetLegacyWidgetTypesQuery, Types.GetLegacyWidgetTypesQueryVariables, "empty" | "complete" | "streaming">;
10760
+ export declare function useGetLegacyWidgetTypesSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetLegacyWidgetTypesQuery, Types.GetLegacyWidgetTypesQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetLegacyWidgetTypesQuery, Types.GetLegacyWidgetTypesQueryVariables>;
10761
+ export declare function useGetLegacyWidgetTypesSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetLegacyWidgetTypesQuery, Types.GetLegacyWidgetTypesQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetLegacyWidgetTypesQuery | undefined, Types.GetLegacyWidgetTypesQueryVariables>;
10762
+ export type GetLegacyWidgetTypesQueryHookResult = ReturnType<typeof useGetLegacyWidgetTypesQuery>;
10763
+ export type GetLegacyWidgetTypesLazyQueryHookResult = ReturnType<typeof useGetLegacyWidgetTypesLazyQuery>;
10764
+ export type GetLegacyWidgetTypesSuspenseQueryHookResult = ReturnType<typeof useGetLegacyWidgetTypesSuspenseQuery>;
10765
+ export type GetLegacyWidgetTypesQueryResult = Apollo.QueryResult<Types.GetLegacyWidgetTypesQuery, Types.GetLegacyWidgetTypesQueryVariables>;
10707
10766
  export declare const GetWidgetDocument: Apollo.DocumentNode;
10708
10767
  /**
10709
10768
  * __useGetWidgetQuery__