@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
@@ -5,8 +5,8 @@ import { alertErrorMessage as n } from "../../hooks/useDataSinkAlerts.js";
5
5
  import { useCallback as r, useEffect as i, useLayoutEffect as a, useRef as o, useState as s } from "react";
6
6
  import { Loader2 as c, RefreshCw as l } from "lucide-react";
7
7
  import { Button as u } from "@burdenoff/fe-libs/ui";
8
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
9
- import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
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";
10
10
  //#region src/bigconsole/components/datasink/AlertExecutionHistory.tsx
11
11
  var m = {
12
12
  owner: "",
@@ -16,7 +16,7 @@ var m = {
16
16
  error: null
17
17
  };
18
18
  function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
19
- let { t: y } = p(), [b, x] = s(""), [S, C] = s([]), w = S.at(-1), T = `${h}|${b}|${w ?? ""}`, E = o(null), D = o(null);
19
+ let { t: y } = d(), [b, x] = s(""), [S, C] = s([]), w = S.at(-1), T = `${h}|${b}|${w ?? ""}`, E = o(null), D = o(null);
20
20
  a(() => (E.current = T, () => {
21
21
  E.current = null, D.current = null;
22
22
  }), [T]);
@@ -66,25 +66,25 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
66
66
  ...m,
67
67
  loading: !0
68
68
  };
69
- return /* @__PURE__ */ f(t, {
69
+ return /* @__PURE__ */ p(t, {
70
70
  title: y("bigconsole.alerts.history.title", "Execution history"),
71
71
  headingLevel: 2,
72
72
  description: y("bigconsole.alerts.history.description", "Actual evaluations and notification delivery status. Refreshes every 10 seconds while this page is visible."),
73
- actions: /* @__PURE__ */ f(u, {
73
+ actions: /* @__PURE__ */ p(u, {
74
74
  type: "button",
75
75
  variant: "secondary",
76
76
  size: "sm",
77
77
  onClick: () => void A(),
78
78
  disabled: j.loading,
79
- children: [j.loading ? /* @__PURE__ */ d(c, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ d(l, { className: "mr-2 h-4 w-4" }), y("bigconsole.alerts.history.refresh", "Refresh history")]
79
+ children: [j.loading ? /* @__PURE__ */ f(c, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ f(l, { className: "mr-2 h-4 w-4" }), y("bigconsole.alerts.history.refresh", "Refresh history")]
80
80
  }),
81
81
  children: [
82
- /* @__PURE__ */ d("label", {
82
+ /* @__PURE__ */ f("label", {
83
83
  htmlFor: "alert-history-filter",
84
84
  className: "mb-1 block text-xs font-medium text-text-primary",
85
85
  children: y("bigconsole.alerts.history.filter", "Filter by rule")
86
86
  }),
87
- /* @__PURE__ */ f("select", {
87
+ /* @__PURE__ */ p("select", {
88
88
  id: "alert-history-filter",
89
89
  className: `mb-4 w-full min-w-0 rounded-control border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary ${e}`,
90
90
  value: b,
@@ -92,57 +92,57 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
92
92
  x(e.target.value), C([]);
93
93
  },
94
94
  children: [
95
- /* @__PURE__ */ d("option", {
95
+ /* @__PURE__ */ f("option", {
96
96
  value: "",
97
97
  children: y("bigconsole.alerts.history.all", "All rules")
98
98
  }),
99
- b && !g.some((e) => e.id === b) && /* @__PURE__ */ d("option", {
99
+ b && !g.some((e) => e.id === b) && /* @__PURE__ */ f("option", {
100
100
  value: b,
101
101
  children: b
102
102
  }),
103
- g.map((e) => /* @__PURE__ */ d("option", {
103
+ g.map((e) => /* @__PURE__ */ f("option", {
104
104
  value: e.id,
105
105
  children: e.name
106
106
  }, e.id))
107
107
  ]
108
108
  }),
109
- j.error && /* @__PURE__ */ d("p", {
109
+ j.error && /* @__PURE__ */ f("p", {
110
110
  role: "alert",
111
111
  className: "mb-4 break-words text-sm text-status-error-text",
112
112
  children: j.error
113
113
  }),
114
- j.loading && !j.rows.length && /* @__PURE__ */ d("p", {
114
+ j.loading && !j.rows.length && /* @__PURE__ */ f("p", {
115
115
  role: "status",
116
116
  className: "text-sm text-text-secondary",
117
117
  children: y("bigconsole.alerts.history.loading", "Loading execution history…")
118
118
  }),
119
- !j.loading && !j.error && !j.rows.length && /* @__PURE__ */ d("p", {
119
+ !j.loading && !j.error && !j.rows.length && /* @__PURE__ */ f("p", {
120
120
  className: "text-sm text-text-secondary",
121
121
  children: y("bigconsole.alerts.history.empty", "No evaluations recorded yet. Enabled rules evaluate when the sink data is updated or refreshed.")
122
122
  }),
123
- /* @__PURE__ */ d("ol", {
123
+ /* @__PURE__ */ f("ol", {
124
124
  className: "divide-y divide-border-subtle",
125
- children: j.rows.map((e) => /* @__PURE__ */ f("li", {
125
+ children: j.rows.map((e) => /* @__PURE__ */ p("li", {
126
126
  className: "min-w-0 py-4 first:pt-0",
127
127
  children: [
128
- /* @__PURE__ */ f("div", {
128
+ /* @__PURE__ */ p("div", {
129
129
  className: "flex flex-wrap items-start justify-between gap-2",
130
- children: [/* @__PURE__ */ f("div", {
130
+ children: [/* @__PURE__ */ p("div", {
131
131
  className: "min-w-0",
132
- children: [/* @__PURE__ */ d("p", {
132
+ children: [/* @__PURE__ */ f("p", {
133
133
  className: "break-words text-sm font-medium text-text-primary",
134
134
  children: g.find((t) => t.id === e.alertId)?.name ?? e.alertId
135
- }), /* @__PURE__ */ d("time", {
135
+ }), /* @__PURE__ */ f("time", {
136
136
  dateTime: e.createdAt,
137
137
  className: "text-xs text-text-secondary",
138
138
  children: new Date(e.createdAt).toLocaleString()
139
139
  })]
140
- }), /* @__PURE__ */ d("span", {
140
+ }), /* @__PURE__ */ f("span", {
141
141
  className: "rounded-pill border border-border-subtle bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary",
142
142
  children: y(`bigconsole.alerts.history.status.${e.status}`, e.status.replaceAll("_", " "))
143
143
  })]
144
144
  }),
145
- /* @__PURE__ */ f("p", {
145
+ /* @__PURE__ */ p("p", {
146
146
  className: "mt-2 break-words text-xs text-text-secondary",
147
147
  children: [
148
148
  y("bigconsole.alerts.history.dataVersion", "Data version"),
@@ -156,41 +156,41 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
156
156
  " ms"
157
157
  ]
158
158
  }),
159
- e.error && /* @__PURE__ */ d("p", {
159
+ e.error && /* @__PURE__ */ f("p", {
160
160
  className: "mt-2 break-words text-sm text-status-error-text",
161
161
  children: e.error
162
162
  }),
163
- e.deliveries.length > 0 && /* @__PURE__ */ d("ul", {
163
+ e.deliveries.length > 0 && /* @__PURE__ */ f("ul", {
164
164
  className: "mt-3 space-y-2",
165
- children: e.deliveries.map((e, t) => /* @__PURE__ */ f("li", {
165
+ children: e.deliveries.map((e, t) => /* @__PURE__ */ p("li", {
166
166
  className: "min-w-0 rounded-control border border-border-subtle bg-bg-sunken p-3 text-xs",
167
167
  children: [
168
- /* @__PURE__ */ f("div", {
168
+ /* @__PURE__ */ p("div", {
169
169
  className: "flex flex-wrap justify-between gap-2",
170
- children: [/* @__PURE__ */ f("span", {
170
+ children: [/* @__PURE__ */ p("span", {
171
171
  className: "break-all text-text-primary",
172
172
  children: [
173
173
  e.channel,
174
174
  " · ",
175
175
  e.recipient
176
176
  ]
177
- }), /* @__PURE__ */ d("span", {
177
+ }), /* @__PURE__ */ f("span", {
178
178
  className: "font-medium text-text-primary",
179
179
  children: e.status
180
180
  })]
181
181
  }),
182
- e.attemptedAt && /* @__PURE__ */ f("p", {
182
+ e.attemptedAt && /* @__PURE__ */ p("p", {
183
183
  className: "mt-1 text-text-secondary",
184
184
  children: [
185
185
  y("bigconsole.alerts.history.attempted", "Attempted"),
186
186
  " ",
187
- /* @__PURE__ */ d("time", {
187
+ /* @__PURE__ */ f("time", {
188
188
  dateTime: e.attemptedAt,
189
189
  children: new Date(e.attemptedAt).toLocaleString()
190
190
  })
191
191
  ]
192
192
  }),
193
- e.notificationId && /* @__PURE__ */ f("p", {
193
+ e.notificationId && /* @__PURE__ */ p("p", {
194
194
  className: "mt-1 break-all text-text-muted",
195
195
  children: [
196
196
  y("bigconsole.alerts.history.notification", "Notification"),
@@ -198,7 +198,7 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
198
198
  e.notificationId
199
199
  ]
200
200
  }),
201
- e.error && /* @__PURE__ */ d("p", {
201
+ e.error && /* @__PURE__ */ f("p", {
202
202
  className: "mt-1 break-words text-status-error-text",
203
203
  children: e.error
204
204
  })
@@ -208,25 +208,25 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
208
208
  ]
209
209
  }, e.id))
210
210
  }),
211
- /* @__PURE__ */ f("div", {
211
+ /* @__PURE__ */ p("div", {
212
212
  className: "mt-4 flex flex-wrap items-center justify-between gap-control-gap border-t border-border-subtle pt-3",
213
- children: [/* @__PURE__ */ f("span", {
213
+ children: [/* @__PURE__ */ p("span", {
214
214
  className: "text-xs text-text-secondary",
215
215
  children: [
216
216
  j.rows.length,
217
217
  " ",
218
218
  y("bigconsole.alerts.history.count", "executions on this page")
219
219
  ]
220
- }), /* @__PURE__ */ f("div", {
220
+ }), /* @__PURE__ */ p("div", {
221
221
  className: "flex gap-control-gap",
222
- children: [/* @__PURE__ */ d(u, {
222
+ children: [/* @__PURE__ */ f(u, {
223
223
  type: "button",
224
224
  variant: "secondary",
225
225
  size: "sm",
226
226
  onClick: () => C((e) => e.slice(0, -1)),
227
227
  disabled: !S.length || j.loading,
228
228
  children: y("bigconsole.alerts.history.newer", "Newer")
229
- }), /* @__PURE__ */ d(u, {
229
+ }), /* @__PURE__ */ f(u, {
230
230
  type: "button",
231
231
  variant: "secondary",
232
232
  size: "sm",
@@ -4,40 +4,40 @@ import "../common/index.js";
4
4
  import { AlertSeverity as n, DataSinkAlertChannel as r, DataSinkAlertConditionType as i } from "../../../generated/wspace-types.js";
5
5
  import { Loader2 as a, Play as o, Plus as s, Save as c, Trash2 as l } from "lucide-react";
6
6
  import { Button as u } from "@burdenoff/fe-libs/ui";
7
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
- import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
9
9
  //#region src/bigconsole/components/datasink/AlertRuleEditor.tsx
10
10
  var m = `w-full min-w-0 rounded-control border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary ${e}`;
11
11
  function h(h) {
12
- let { t: g } = p(), { draft: _, channels: v, channelError: y, canUpdate: b, pending: x, previewing: S, preview: C, previewError: w, previewStale: T, error: E, onChange: D, onSave: O, onCancel: k, onPreview: A, onReloadChannels: j } = h, M = x || !b, N = v.filter((e) => e.status.toUpperCase() === "ACTIVE"), P = (e) => D({
12
+ let { t: g } = d(), { draft: _, channels: v, channelError: y, canUpdate: b, pending: x, previewing: S, preview: C, previewError: w, previewStale: T, error: E, onChange: D, onSave: O, onCancel: k, onPreview: A, onReloadChannels: j } = h, M = x || !b, N = v.filter((e) => e.status.toUpperCase() === "ACTIVE"), P = (e) => D({
13
13
  ..._,
14
14
  ...e
15
15
  });
16
- return /* @__PURE__ */ d(t, {
16
+ return /* @__PURE__ */ f(t, {
17
17
  title: g("bigconsole.alerts.rule.title", "Alert rule"),
18
18
  headingLevel: 2,
19
19
  emphasis: "primary",
20
- children: /* @__PURE__ */ f("form", {
20
+ children: /* @__PURE__ */ p("form", {
21
21
  onSubmit: (e) => {
22
22
  e.preventDefault(), O();
23
23
  },
24
24
  className: "flex min-w-0 flex-col gap-form-gap",
25
25
  "aria-label": g("bigconsole.alerts.rule.form", "Alert rule editor"),
26
26
  children: [
27
- !b && /* @__PURE__ */ d("p", {
27
+ !b && /* @__PURE__ */ f("p", {
28
28
  className: "text-sm text-text-secondary",
29
29
  children: g("bigconsole.alerts.rule.readOnly", "You have read-only access to these alert rules.")
30
30
  }),
31
- E && /* @__PURE__ */ d("p", {
31
+ E && /* @__PURE__ */ f("p", {
32
32
  role: "alert",
33
33
  className: "break-words text-sm text-status-error-text",
34
34
  children: E
35
35
  }),
36
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
36
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
37
37
  htmlFor: "alert-name",
38
38
  className: "mb-1 block text-sm font-medium text-text-primary",
39
39
  children: g("bigconsole.alerts.rule.name", "Name")
40
- }), /* @__PURE__ */ d("input", {
40
+ }), /* @__PURE__ */ f("input", {
41
41
  id: "alert-name",
42
42
  className: m,
43
43
  value: _.name,
@@ -46,48 +46,48 @@ function h(h) {
46
46
  maxLength: 200,
47
47
  disabled: M
48
48
  })] }),
49
- /* @__PURE__ */ f("div", {
49
+ /* @__PURE__ */ p("div", {
50
50
  className: "grid min-w-0 gap-form-gap sm:grid-cols-2",
51
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
51
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
52
52
  htmlFor: "alert-condition-type",
53
53
  className: "mb-1 block text-sm font-medium text-text-primary",
54
54
  children: g("bigconsole.alerts.rule.language", "Condition language")
55
- }), /* @__PURE__ */ f("select", {
55
+ }), /* @__PURE__ */ p("select", {
56
56
  id: "alert-condition-type",
57
57
  className: m,
58
58
  value: _.conditionType,
59
59
  onChange: (e) => P({ conditionType: e.target.value === i.Jsonata ? i.Jsonata : i.Jq }),
60
60
  disabled: M,
61
- children: [/* @__PURE__ */ d("option", {
61
+ children: [/* @__PURE__ */ f("option", {
62
62
  value: i.Jq,
63
63
  children: "JQ"
64
- }), /* @__PURE__ */ d("option", {
64
+ }), /* @__PURE__ */ f("option", {
65
65
  value: i.Jsonata,
66
66
  children: "JSONata"
67
67
  })]
68
- })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
68
+ })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
69
69
  htmlFor: "alert-severity",
70
70
  className: "mb-1 block text-sm font-medium text-text-primary",
71
71
  children: g("bigconsole.alerts.rule.severity", "Severity")
72
- }), /* @__PURE__ */ d("select", {
72
+ }), /* @__PURE__ */ f("select", {
73
73
  id: "alert-severity",
74
74
  className: m,
75
75
  value: _.severity,
76
76
  onChange: (e) => P({ severity: Object.values(n).find((t) => t === e.target.value) ?? n.Medium }),
77
77
  disabled: M,
78
- children: Object.values(n).map((e) => /* @__PURE__ */ d("option", {
78
+ children: Object.values(n).map((e) => /* @__PURE__ */ f("option", {
79
79
  value: e,
80
80
  children: g(`bigconsole.alerts.severity.${e}`, e.charAt(0).toUpperCase() + e.slice(1))
81
81
  }, e))
82
82
  })] })]
83
83
  }),
84
- /* @__PURE__ */ f("div", { children: [
85
- /* @__PURE__ */ d("label", {
84
+ /* @__PURE__ */ p("div", { children: [
85
+ /* @__PURE__ */ f("label", {
86
86
  htmlFor: "alert-condition",
87
87
  className: "mb-1 block text-sm font-medium text-text-primary",
88
88
  children: g("bigconsole.alerts.rule.condition", "Condition")
89
89
  }),
90
- /* @__PURE__ */ d("textarea", {
90
+ /* @__PURE__ */ f("textarea", {
91
91
  id: "alert-condition",
92
92
  className: `${m} min-h-32 font-mono`,
93
93
  value: _.condition,
@@ -97,44 +97,44 @@ function h(h) {
97
97
  disabled: M,
98
98
  "aria-describedby": "alert-condition-help"
99
99
  }),
100
- /* @__PURE__ */ d("p", {
100
+ /* @__PURE__ */ f("p", {
101
101
  id: "alert-condition-help",
102
102
  className: "mt-2 text-xs text-text-secondary",
103
103
  children: g("bigconsole.alerts.rule.conditionHelp", "Evaluates the entire current sink payload and must return one boolean. Preview does not send notifications.")
104
104
  }),
105
- /* @__PURE__ */ d("p", {
105
+ /* @__PURE__ */ f("p", {
106
106
  className: "mt-1 break-words text-xs text-text-muted",
107
107
  children: _.conditionType === i.Jq ? "JQ: any(.[]; .boarding_minutes > 240)" : "JSONata: $count($[boarding_minutes > 240]) > 0"
108
108
  }),
109
- /* @__PURE__ */ f(u, {
109
+ /* @__PURE__ */ p(u, {
110
110
  type: "button",
111
111
  variant: "secondary",
112
112
  size: "sm",
113
113
  onClick: A,
114
114
  disabled: x || S || !_.condition.trim(),
115
115
  className: "mt-3",
116
- children: [S ? /* @__PURE__ */ d(a, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ d(o, { className: "mr-2 h-4 w-4" }), S ? g("bigconsole.alerts.rule.previewing", "Evaluating…") : g("bigconsole.alerts.rule.preview", "Preview condition")]
116
+ children: [S ? /* @__PURE__ */ f(a, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ f(o, { className: "mr-2 h-4 w-4" }), S ? g("bigconsole.alerts.rule.previewing", "Evaluating…") : g("bigconsole.alerts.rule.preview", "Preview condition")]
117
117
  }),
118
- w && /* @__PURE__ */ d("p", {
118
+ w && /* @__PURE__ */ f("p", {
119
119
  role: "alert",
120
120
  className: "mt-2 break-words text-sm text-status-error-text",
121
121
  children: w
122
122
  }),
123
- T && /* @__PURE__ */ d("p", {
123
+ T && /* @__PURE__ */ f("p", {
124
124
  role: "status",
125
125
  className: "mt-2 text-xs text-text-secondary",
126
126
  children: g("bigconsole.alerts.rule.previewStale", "The condition or data changed. Preview again to see the current result.")
127
127
  }),
128
- C && !T && /* @__PURE__ */ f("div", {
128
+ C && !T && /* @__PURE__ */ p("div", {
129
129
  role: "status",
130
130
  className: "mt-3 rounded-control border border-border-subtle bg-bg-sunken p-3 text-sm",
131
- children: [C.error ? /* @__PURE__ */ d("p", {
131
+ children: [C.error ? /* @__PURE__ */ f("p", {
132
132
  className: "break-words text-status-error-text",
133
133
  children: C.error
134
- }) : /* @__PURE__ */ d("p", {
134
+ }) : /* @__PURE__ */ f("p", {
135
135
  className: "font-medium text-text-primary",
136
136
  children: C.matched ? g("bigconsole.alerts.rule.matched", "Condition matched") : g("bigconsole.alerts.rule.noMatch", "Condition did not match")
137
- }), /* @__PURE__ */ f("p", {
137
+ }), /* @__PURE__ */ p("p", {
138
138
  className: "mt-1 text-xs text-text-secondary",
139
139
  children: [
140
140
  g("bigconsole.alerts.rule.previewMetadata", "Evaluated data version"),
@@ -148,25 +148,25 @@ function h(h) {
148
148
  })]
149
149
  })
150
150
  ] }),
151
- /* @__PURE__ */ f("fieldset", {
151
+ /* @__PURE__ */ p("fieldset", {
152
152
  disabled: M,
153
153
  className: "min-w-0",
154
154
  children: [
155
- /* @__PURE__ */ d("legend", {
155
+ /* @__PURE__ */ f("legend", {
156
156
  className: "mb-2 text-sm font-medium text-text-primary",
157
157
  children: g("bigconsole.alerts.rule.destinations", "Delivery destinations")
158
158
  }),
159
- /* @__PURE__ */ d("p", {
159
+ /* @__PURE__ */ f("p", {
160
160
  className: "mb-3 text-xs text-text-secondary",
161
161
  children: g("bigconsole.alerts.rule.destinationHelp", "Choose an available active delivery channel and its actual recipient.")
162
162
  }),
163
- y && /* @__PURE__ */ f("div", {
163
+ y && /* @__PURE__ */ p("div", {
164
164
  className: "mb-3 text-sm",
165
- children: [/* @__PURE__ */ d("p", {
165
+ children: [/* @__PURE__ */ f("p", {
166
166
  role: "alert",
167
167
  className: "break-words text-status-error-text",
168
168
  children: y
169
- }), /* @__PURE__ */ d(u, {
169
+ }), /* @__PURE__ */ f(u, {
170
170
  type: "button",
171
171
  variant: "secondary",
172
172
  size: "sm",
@@ -174,18 +174,18 @@ function h(h) {
174
174
  children: g("bigconsole.alerts.rule.reloadChannels", "Reload channels")
175
175
  })]
176
176
  }),
177
- !y && N.length === 0 && /* @__PURE__ */ d("p", {
177
+ !y && N.length === 0 && /* @__PURE__ */ f("p", {
178
178
  className: "mb-3 text-sm text-text-secondary",
179
179
  children: g("bigconsole.alerts.rule.noChannels", "No active delivery channels are available to BigConsole in this organization. You can save this rule disabled.")
180
180
  }),
181
- !_.deliveries.length && /* @__PURE__ */ d("p", {
181
+ !_.deliveries.length && /* @__PURE__ */ f("p", {
182
182
  className: "mb-3 text-xs text-text-muted",
183
183
  children: g("bigconsole.alerts.rule.noDestinations", "No delivery destinations selected.")
184
184
  }),
185
- _.deliveries.map((e, t) => /* @__PURE__ */ f("div", {
185
+ _.deliveries.map((e, t) => /* @__PURE__ */ p("div", {
186
186
  className: "mb-3 min-w-0 rounded-control border border-border-subtle p-3",
187
187
  children: [
188
- /* @__PURE__ */ f("label", {
188
+ /* @__PURE__ */ p("label", {
189
189
  htmlFor: `alert-channel-${e.key}`,
190
190
  className: "mb-1 block text-xs font-medium text-text-primary",
191
191
  children: [
@@ -194,7 +194,7 @@ function h(h) {
194
194
  t + 1
195
195
  ]
196
196
  }),
197
- /* @__PURE__ */ f("select", {
197
+ /* @__PURE__ */ p("select", {
198
198
  id: `alert-channel-${e.key}`,
199
199
  className: m,
200
200
  value: e.channelId,
@@ -208,11 +208,11 @@ function h(h) {
208
208
  } : t) });
209
209
  },
210
210
  children: [
211
- /* @__PURE__ */ d("option", {
211
+ /* @__PURE__ */ f("option", {
212
212
  value: "",
213
213
  children: g("bigconsole.alerts.rule.chooseChannel", "Choose a configured channel")
214
214
  }),
215
- e.channelId && !N.some((t) => t.id === e.channelId) && /* @__PURE__ */ f("option", {
215
+ e.channelId && !N.some((t) => t.id === e.channelId) && /* @__PURE__ */ p("option", {
216
216
  value: e.channelId,
217
217
  children: [
218
218
  g("bigconsole.alerts.rule.unavailableChannel", "Unavailable channel"),
@@ -220,7 +220,7 @@ function h(h) {
220
220
  e.channelId
221
221
  ]
222
222
  }),
223
- N.map((e) => /* @__PURE__ */ f("option", {
223
+ N.map((e) => /* @__PURE__ */ p("option", {
224
224
  value: e.id,
225
225
  children: [
226
226
  e.name,
@@ -230,12 +230,12 @@ function h(h) {
230
230
  }, e.id))
231
231
  ]
232
232
  }),
233
- /* @__PURE__ */ d("label", {
233
+ /* @__PURE__ */ f("label", {
234
234
  htmlFor: `alert-recipient-${e.key}`,
235
235
  className: "mb-1 mt-3 block text-xs font-medium text-text-primary",
236
236
  children: e.channel === r.Email ? g("bigconsole.alerts.rule.emailRecipient", "Email address") : e.channel === r.Slack ? g("bigconsole.alerts.rule.slackRecipient", "Slack recipient ID") : g("bigconsole.alerts.rule.webhookRecipient", "HTTPS webhook URL")
237
237
  }),
238
- /* @__PURE__ */ d("input", {
238
+ /* @__PURE__ */ f("input", {
239
239
  id: `alert-recipient-${e.key}`,
240
240
  className: m,
241
241
  type: e.channel === r.Email ? "email" : e.channel === r.Webhook ? "url" : "text",
@@ -246,17 +246,17 @@ function h(h) {
246
246
  } : n) }),
247
247
  required: !0
248
248
  }),
249
- /* @__PURE__ */ f(u, {
249
+ /* @__PURE__ */ p(u, {
250
250
  type: "button",
251
251
  variant: "ghost",
252
252
  size: "sm",
253
253
  onClick: () => P({ deliveries: _.deliveries.filter((t) => t.key !== e.key) }),
254
254
  className: "mt-2",
255
- children: [/* @__PURE__ */ d(l, { className: "mr-2 h-4 w-4" }), g("bigconsole.alerts.rule.removeDestination", "Remove destination")]
255
+ children: [/* @__PURE__ */ f(l, { className: "mr-2 h-4 w-4" }), g("bigconsole.alerts.rule.removeDestination", "Remove destination")]
256
256
  })
257
257
  ]
258
258
  }, e.key)),
259
- /* @__PURE__ */ f(u, {
259
+ /* @__PURE__ */ p(u, {
260
260
  type: "button",
261
261
  variant: "secondary",
262
262
  size: "sm",
@@ -267,34 +267,34 @@ function h(h) {
267
267
  recipient: ""
268
268
  }] }),
269
269
  disabled: N.length === 0,
270
- children: [/* @__PURE__ */ d(s, { className: "mr-2 h-4 w-4" }), g("bigconsole.alerts.rule.addDestination", "Add destination")]
270
+ children: [/* @__PURE__ */ f(s, { className: "mr-2 h-4 w-4" }), g("bigconsole.alerts.rule.addDestination", "Add destination")]
271
271
  })
272
272
  ]
273
273
  }),
274
- /* @__PURE__ */ f("fieldset", {
274
+ /* @__PURE__ */ p("fieldset", {
275
275
  disabled: M,
276
276
  className: "min-w-0",
277
277
  children: [
278
- /* @__PURE__ */ d("legend", {
278
+ /* @__PURE__ */ f("legend", {
279
279
  className: "mb-2 text-sm font-medium text-text-primary",
280
280
  children: g("bigconsole.alerts.rule.throttle", "Throttle")
281
281
  }),
282
- /* @__PURE__ */ f("label", {
282
+ /* @__PURE__ */ p("label", {
283
283
  className: "flex items-center gap-2 text-sm text-text-primary",
284
- children: [/* @__PURE__ */ d("input", {
284
+ children: [/* @__PURE__ */ f("input", {
285
285
  type: "checkbox",
286
286
  checked: _.throttleEnabled,
287
287
  onChange: (e) => P({ throttleEnabled: e.target.checked }),
288
288
  className: e
289
289
  }), g("bigconsole.alerts.rule.limitFrequency", "Limit alert frequency")]
290
290
  }),
291
- _.throttleEnabled && /* @__PURE__ */ f("div", {
291
+ _.throttleEnabled && /* @__PURE__ */ p("div", {
292
292
  className: "mt-3 grid gap-form-gap sm:grid-cols-2",
293
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
293
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
294
294
  htmlFor: "alert-window",
295
295
  className: "mb-1 block text-xs font-medium text-text-primary",
296
296
  children: g("bigconsole.alerts.rule.window", "Time window (minutes)")
297
- }), /* @__PURE__ */ d("input", {
297
+ }), /* @__PURE__ */ f("input", {
298
298
  id: "alert-window",
299
299
  type: "number",
300
300
  min: 1,
@@ -303,11 +303,11 @@ function h(h) {
303
303
  value: _.windowMinutes,
304
304
  onChange: (e) => P({ windowMinutes: e.target.value }),
305
305
  required: !0
306
- })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
306
+ })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
307
307
  htmlFor: "alert-max",
308
308
  className: "mb-1 block text-xs font-medium text-text-primary",
309
309
  children: g("bigconsole.alerts.rule.maxAlerts", "Maximum alerts per window")
310
- }), /* @__PURE__ */ d("input", {
310
+ }), /* @__PURE__ */ f("input", {
311
311
  id: "alert-max",
312
312
  type: "number",
313
313
  min: 1,
@@ -320,31 +320,31 @@ function h(h) {
320
320
  })
321
321
  ]
322
322
  }),
323
- /* @__PURE__ */ f("label", {
323
+ /* @__PURE__ */ p("label", {
324
324
  className: "flex items-start gap-2 text-sm text-text-primary",
325
- children: [/* @__PURE__ */ d("input", {
325
+ children: [/* @__PURE__ */ f("input", {
326
326
  type: "checkbox",
327
327
  checked: _.enabled,
328
328
  onChange: (e) => P({ enabled: e.target.checked }),
329
329
  disabled: M,
330
330
  className: `mt-1 ${e}`
331
- }), /* @__PURE__ */ f("span", { children: [g("bigconsole.alerts.rule.enabled", "Rule enabled"), /* @__PURE__ */ d("span", {
331
+ }), /* @__PURE__ */ p("span", { children: [g("bigconsole.alerts.rule.enabled", "Rule enabled"), /* @__PURE__ */ f("span", {
332
332
  className: "mt-1 block text-xs text-text-secondary",
333
333
  children: g("bigconsole.alerts.rule.enabledHelp", "Enabled rules evaluate when this sink is updated or refreshed. Saving a disabled rule does not send notifications.")
334
334
  })] })]
335
335
  }),
336
- /* @__PURE__ */ f("div", {
336
+ /* @__PURE__ */ p("div", {
337
337
  className: "flex flex-wrap justify-end gap-control-gap border-t border-border-subtle pt-4",
338
- children: [/* @__PURE__ */ d(u, {
338
+ children: [/* @__PURE__ */ f(u, {
339
339
  type: "button",
340
340
  variant: "secondary",
341
341
  onClick: k,
342
342
  disabled: x,
343
343
  children: g("bigconsole.alerts.rule.cancel", "Cancel")
344
- }), /* @__PURE__ */ f(u, {
344
+ }), /* @__PURE__ */ p(u, {
345
345
  type: "submit",
346
346
  disabled: M,
347
- children: [x ? /* @__PURE__ */ d(a, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ d(c, { className: "mr-2 h-4 w-4" }), x ? g("bigconsole.alerts.rule.saving", "Saving…") : g("bigconsole.alerts.rule.save", "Save rule")]
347
+ children: [x ? /* @__PURE__ */ f(a, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ f(c, { className: "mr-2 h-4 w-4" }), x ? g("bigconsole.alerts.rule.saving", "Saving…") : g("bigconsole.alerts.rule.save", "Save rule")]
348
348
  })]
349
349
  })
350
350
  ]