@burdenoff/microfe-bigconsole 2026.1123.7 → 2026.1124.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/bigconsole/asof/AsOfControl.js +2 -2
  2. package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +107 -106
  3. package/dist/bigconsole/components/dashboard/DashboardGalleryCard.d.ts +34 -0
  4. package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +123 -0
  5. package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +1 -1
  6. package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +19 -35
  7. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +119 -116
  8. package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
  9. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.d.ts +0 -1
  10. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +172 -170
  11. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +210 -208
  12. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +97 -97
  13. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
  14. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +92 -92
  15. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +149 -149
  16. package/dist/bigconsole/components/datasink/AnomalyDetectorPanel.js +54 -54
  17. package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -37
  18. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +4 -4
  19. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +130 -129
  20. package/dist/bigconsole/components/datasink/SetupStateBadge.js +24 -33
  21. package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +38 -38
  22. package/dist/bigconsole/components/explore/CreateQueryWidget.js +57 -56
  23. package/dist/bigconsole/components/explore/SqlDraftEditor.js +140 -140
  24. package/dist/bigconsole/components/explore/VisualBuilder.js +85 -84
  25. package/dist/bigconsole/components/explore/queryAccess/GrantsPanel.js +168 -167
  26. package/dist/bigconsole/components/explore/queryAccess/QueryAccessAdmin.js +2 -2
  27. package/dist/bigconsole/components/explore/queryAccess/RelationEditor.js +118 -117
  28. package/dist/bigconsole/components/fleet/FleetChildrenPanel.d.ts +4 -0
  29. package/dist/bigconsole/components/fleet/FleetChildrenPanel.js +174 -184
  30. package/dist/bigconsole/components/fleet/FleetCopySection.d.ts +13 -0
  31. package/dist/bigconsole/components/fleet/FleetCopySection.js +266 -0
  32. package/dist/bigconsole/components/insights/BoardLintPanel.js +2 -2
  33. package/dist/bigconsole/components/insights/OutlierSpottingDialog.js +123 -123
  34. package/dist/bigconsole/components/kpi-change/KpiChangePanel.js +2 -2
  35. package/dist/bigconsole/components/narrative/NarrativePanel.js +1 -1
  36. package/dist/bigconsole/components/overview/DataHealthCard.js +3 -0
  37. package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +3 -0
  38. package/dist/bigconsole/components/parser/ParserStatusBadge.js +25 -28
  39. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +23 -22
  40. package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +15 -26
  41. package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +24 -24
  42. package/dist/bigconsole/components/settings/WidgetCatalogSection.js +1 -1
  43. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +188 -187
  44. package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +1 -1
  45. package/dist/bigconsole/components/widgets/UnsupportedDataSourceNotice.js +1 -1
  46. package/dist/bigconsole/components/widgets/WidgetCompareView.js +3 -1
  47. package/dist/bigconsole/components/widgets/WidgetHeader.js +1 -1
  48. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +45 -44
  49. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +151 -147
  50. package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +48 -47
  51. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
  52. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +139 -138
  53. package/dist/bigconsole/components/widgets/form/FormWidget.js +149 -148
  54. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +80 -77
  55. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +58 -56
  56. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +75 -73
  57. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +86 -85
  58. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +80 -77
  59. package/dist/bigconsole/components/widgets/retention/RetentionView.js +1 -1
  60. package/dist/bigconsole/components/widgets/table/TableConfig.js +214 -211
  61. package/dist/bigconsole/components/widgets/table/TablePagination.js +59 -58
  62. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +140 -138
  63. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +74 -66
  64. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +48 -48
  65. package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +28 -37
  66. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +69 -69
  67. package/dist/bigconsole/hooks/useDashboardListQuery.d.ts +22 -0
  68. package/dist/bigconsole/hooks/useDashboardListQuery.js +39 -0
  69. package/dist/bigconsole/hooks/useFleetBreadcrumb.d.ts +8 -1
  70. package/dist/bigconsole/hooks/useFleetBreadcrumb.js +4 -1
  71. package/dist/bigconsole/hooks/useFleetChildren.d.ts +2 -0
  72. package/dist/bigconsole/hooks/useFleetChildren.js +10 -6
  73. package/dist/bigconsole/hooks/useFleetCopyActions.d.ts +23 -0
  74. package/dist/bigconsole/hooks/useFleetCopyActions.js +74 -0
  75. package/dist/bigconsole/hooks/useFleetFlags.d.ts +16 -0
  76. package/dist/bigconsole/hooks/useFleetFlags.js +79 -0
  77. package/dist/bigconsole/hooks/useOwnerBoundRun.d.ts +33 -0
  78. package/dist/bigconsole/hooks/useOwnerBoundRun.js +41 -0
  79. package/dist/bigconsole/pages/AdminPage.js +147 -146
  80. package/dist/bigconsole/pages/DashboardViewPage.js +292 -287
  81. package/dist/bigconsole/pages/DashboardsPage.js +647 -864
  82. package/dist/bigconsole/pages/DataParsersPage.js +5 -0
  83. package/dist/bigconsole/pages/DataSinkBuilderPage.js +4 -1
  84. package/dist/bigconsole/pages/DataSinkViewPage.js +263 -261
  85. package/dist/bigconsole/pages/DataSinksPage.js +210 -186
  86. package/dist/bigconsole/pages/InsightsPage.js +386 -383
  87. package/dist/bigconsole/pages/ParserBuilderPage.js +413 -413
  88. package/dist/bigconsole/pages/ParserViewPage.js +2 -0
  89. package/dist/bigconsole/pages/PipelineBuilderPage.js +279 -276
  90. package/dist/bigconsole/pages/PipelineViewPage.js +3 -0
  91. package/dist/bigconsole/pages/PipelinesPage.js +198 -165
  92. package/dist/bigconsole/pages/SettingsPage.js +160 -160
  93. package/dist/bigconsole/pages/WidgetDemoPage.js +2 -0
  94. package/dist/bigconsole/pages/WorkflowViewPage.js +5 -0
  95. package/dist/bigconsole/pages/WorkflowsPage.js +144 -123
  96. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +1 -1
  97. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +123 -122
  98. package/dist/bigconsole/utils/dashboardGallery.d.ts +84 -0
  99. package/dist/bigconsole/utils/dashboardGallery.js +93 -0
  100. package/dist/bigconsole/utils/fleetFlags.d.ts +22 -0
  101. package/dist/bigconsole/utils/fleetFlags.js +40 -0
  102. package/dist/bigconsole/utils/fleetTree.d.ts +9 -0
  103. package/dist/bigconsole/utils/fleetTree.js +5 -1
  104. package/dist/bigconsole/utils/statusTone.d.ts +17 -0
  105. package/dist/bigconsole/utils/statusTone.js +44 -0
  106. package/dist/generated/wspace-operations.d.ts +101 -0
  107. package/dist/generated/wspace-operations.js +609 -90
  108. package/dist/generated/wspace-types.js +6 -4
  109. package/package.json +4 -4
@@ -1,45 +1,45 @@
1
1
  import { BIGCONSOLE_PERMISSIONS as e } from "../../../constants/permissions.js";
2
2
  import { ListDataSinksDocument as t } from "../../../generated/wspace-operations.js";
3
3
  import { useEffect as n, useId as r, useRef as i, useState as a } from "react";
4
- import { Input as o } from "@burdenoff/fe-libs/ui";
5
- import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
- import { useApolloClient as c } from "@apollo/client/react";
7
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
- import { useActiveContext as d } from "@burdenoff/fe-libs/shared/providers/shell/ActiveContextProvider";
9
- import { usePermissions as f } from "@burdenoff/fe-libs/shared/providers/shell/PermissionProvider";
4
+ import { Input as o, ThemedSelect as s } from "@burdenoff/fe-libs/ui";
5
+ import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
+ import { useApolloClient as l } from "@apollo/client/react";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { useActiveContext as f } from "@burdenoff/fe-libs/shared/providers/shell/ActiveContextProvider";
9
+ import { usePermissions as p } from "@burdenoff/fe-libs/shared/providers/shell/PermissionProvider";
10
10
  // src/bigconsole/components/dashboard/TemplateInstallOptions.tsx
11
- function p({ content: p, bindings: m, onBindingChange: h, inputValues: g, onInputChange: _, disabled: v }) {
12
- let y = r(), { t: b } = s(), x = c(), { workspaceId: S } = d(), { hasPermission: C, isLoading: w } = f(), T = !w && C(e.DATASINK_READ), E = p.requiredDataSinks.length > 0, D = `${S}:${T}:${E}`, O = i(D);
13
- O.current = D;
14
- let [k, A] = a(0), [j, M] = a(null), N = j?.owner === D ? j.cursor : void 0, [P, F] = a(null);
11
+ function m({ content: m, bindings: h, onBindingChange: g, inputValues: _, onInputChange: v, disabled: y }) {
12
+ let b = r(), { t: x } = c(), S = l(), { workspaceId: C } = f(), { hasPermission: w, isLoading: T } = p(), E = !T && w(e.DATASINK_READ), D = m.requiredDataSinks.length > 0, O = `${C}:${E}:${D}`, k = i(O);
13
+ k.current = O;
14
+ let [A, j] = a(0), [M, N] = a(null), P = M?.owner === O ? M.cursor : void 0, [F, I] = a(null);
15
15
  n(() => {
16
- M(null), F(null);
17
- }, [D]), n(() => {
16
+ N(null), I(null);
17
+ }, [O]), n(() => {
18
18
  let e = !1;
19
- if (S && E && T) return F((e) => ({
19
+ if (C && D && E) return I((e) => ({
20
20
  ...e,
21
- owner: D,
21
+ owner: O,
22
22
  loading: !0,
23
23
  error: !1
24
- })), x.query({
24
+ })), S.query({
25
25
  query: t,
26
26
  variables: {
27
27
  isActive: !0,
28
28
  first: 100,
29
- ...N ? { after: N } : {}
29
+ ...P ? { after: P } : {}
30
30
  },
31
31
  fetchPolicy: "network-only"
32
32
  }).then((t) => {
33
- e || O.current !== D || F((e) => {
33
+ e || k.current !== O || I((e) => {
34
34
  let n = t.data;
35
35
  if (!n) return {
36
- owner: D,
36
+ owner: O,
37
37
  error: !0,
38
38
  loading: !1
39
39
  };
40
- let r = N && e?.owner === D ? e.data?.listDataSinks.edges ?? [] : [], i = [...new Map([...r, ...n.listDataSinks.edges].map((e) => [e.node.id, e])).values()];
40
+ let r = P && e?.owner === O ? e.data?.listDataSinks.edges ?? [] : [], i = [...new Map([...r, ...n.listDataSinks.edges].map((e) => [e.node.id, e])).values()];
41
41
  return {
42
- owner: D,
42
+ owner: O,
43
43
  data: {
44
44
  ...n,
45
45
  listDataSinks: {
@@ -51,9 +51,9 @@ function p({ content: p, bindings: m, onBindingChange: h, inputValues: g, onInpu
51
51
  };
52
52
  });
53
53
  }).catch(() => {
54
- !e && O.current === D && F((e) => ({
54
+ !e && k.current === O && I((e) => ({
55
55
  ...e,
56
- owner: D,
56
+ owner: O,
57
57
  error: !0,
58
58
  loading: !1
59
59
  }));
@@ -61,15 +61,15 @@ function p({ content: p, bindings: m, onBindingChange: h, inputValues: g, onInpu
61
61
  e = !0;
62
62
  };
63
63
  }, [
64
- x,
65
64
  S,
66
- E,
67
- T,
65
+ C,
68
66
  D,
69
- N,
70
- k
67
+ E,
68
+ O,
69
+ P,
70
+ A
71
71
  ]);
72
- let I = P?.owner === D ? P : null, L = !!(S && T && E && (!I || I.loading)), R = I?.error, z = I?.data?.listDataSinks.edges.map((e) => e.node).filter((e) => e.isActive) ?? [], B = {
72
+ let L = F?.owner === O ? F : null, R = !!(C && E && D && (!L || L.loading)), z = L?.error, B = L?.data?.listDataSinks.edges.map((e) => e.node).filter((e) => e.isActive) ?? [], V = {
73
73
  width: "100%",
74
74
  padding: "var(--space-controlGap)",
75
75
  background: "var(--color-bg-surface)",
@@ -77,129 +77,129 @@ function p({ content: p, bindings: m, onBindingChange: h, inputValues: g, onInpu
77
77
  border: "1px solid var(--color-border-default)",
78
78
  borderRadius: "var(--radius-control)"
79
79
  };
80
- return /* @__PURE__ */ u("section", {
81
- "aria-label": b("bigconsole.dashboards.templateSetup.title", "Template setup"),
80
+ return /* @__PURE__ */ d("section", {
81
+ "aria-label": x("bigconsole.dashboards.templateSetup.title", "Template setup"),
82
82
  className: "space-y-form-gap",
83
- children: [p.requiredDataSinks.length > 0 && /* @__PURE__ */ u("div", { children: [
84
- /* @__PURE__ */ l("h3", {
83
+ children: [m.requiredDataSinks.length > 0 && /* @__PURE__ */ d("div", { children: [
84
+ /* @__PURE__ */ u("h3", {
85
85
  className: "text-sm font-medium",
86
- children: b("bigconsole.dashboards.templateSetup.connect", "Connect your data")
86
+ children: x("bigconsole.dashboards.templateSetup.connect", "Connect your data")
87
87
  }),
88
- /* @__PURE__ */ l("p", {
88
+ /* @__PURE__ */ u("p", {
89
89
  className: "text-xs text-text-muted",
90
- children: b("bigconsole.dashboards.templateSetup.connectHelp", "Choose a source for each group of widgets. You can also connect it later in the dashboard builder.")
90
+ children: x("bigconsole.dashboards.templateSetup.connectHelp", "Choose a source for each group of widgets. You can also connect it later in the dashboard builder.")
91
91
  }),
92
- !w && !T && /* @__PURE__ */ l("p", {
92
+ !T && !E && /* @__PURE__ */ u("p", {
93
93
  role: "status",
94
- children: b("bigconsole.dashboards.templateSetup.noReadPermission", "You do not have access to browse data sources. You can connect a source later with help from your workspace admin.")
94
+ children: x("bigconsole.dashboards.templateSetup.noReadPermission", "You do not have access to browse data sources. You can connect a source later with help from your workspace admin.")
95
95
  }),
96
- R && /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("p", {
96
+ z && /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
97
97
  role: "alert",
98
- children: b("bigconsole.dashboards.templateSetup.loadError", "Could not load data sources.")
99
- }), /* @__PURE__ */ l("button", {
98
+ children: x("bigconsole.dashboards.templateSetup.loadError", "Could not load data sources.")
99
+ }), /* @__PURE__ */ u("button", {
100
100
  type: "button",
101
- disabled: v,
102
- onClick: () => A((e) => e + 1),
103
- children: b("bigconsole.dashboards.templateSetup.retry", "Retry loading sources")
101
+ disabled: y,
102
+ onClick: () => j((e) => e + 1),
103
+ children: x("bigconsole.dashboards.templateSetup.retry", "Retry loading sources")
104
104
  })] }),
105
- p.requiredDataSinks.map((e, t) => /* @__PURE__ */ u("div", {
105
+ m.requiredDataSinks.map((e, t) => /* @__PURE__ */ d("div", {
106
106
  className: "mt-form-gap",
107
107
  children: [
108
- /* @__PURE__ */ l("label", {
109
- htmlFor: `${y}-sink-${t}`,
108
+ /* @__PURE__ */ u("label", {
109
+ htmlFor: `${b}-sink-${t}`,
110
110
  className: "text-sm font-medium",
111
111
  children: e.label
112
112
  }),
113
- e.description && /* @__PURE__ */ l("p", {
113
+ e.description && /* @__PURE__ */ u("p", {
114
114
  className: "text-xs text-text-muted",
115
115
  children: e.description
116
116
  }),
117
- /* @__PURE__ */ u("select", {
118
- id: `${y}-sink-${t}`,
119
- value: m[e.slot] ?? "",
120
- disabled: v || L || !S || !T,
121
- style: B,
122
- onChange: (t) => h(e.slot, t.target.value),
123
- children: [/* @__PURE__ */ l("option", {
117
+ /* @__PURE__ */ d(s, {
118
+ id: `${b}-sink-${t}`,
119
+ value: h[e.slot] ?? "",
120
+ disabled: y || R || !C || !E,
121
+ style: V,
122
+ onChange: (t) => g(e.slot, t.target.value),
123
+ children: [/* @__PURE__ */ u("option", {
124
124
  value: "",
125
- children: b("bigconsole.dashboards.templateSetup.connectLater", "Connect later")
126
- }), z.map((e) => /* @__PURE__ */ l("option", {
125
+ children: x("bigconsole.dashboards.templateSetup.connectLater", "Connect later")
126
+ }), B.map((e) => /* @__PURE__ */ u("option", {
127
127
  value: e.id,
128
128
  children: e.name || e.key
129
129
  }, e.id))]
130
130
  }),
131
- e.expectedFields.length > 0 && /* @__PURE__ */ l("p", {
131
+ e.expectedFields.length > 0 && /* @__PURE__ */ u("p", {
132
132
  className: "text-xs text-text-muted",
133
- children: b("bigconsole.dashboards.templateSetup.expectedFields", "Expected fields: {fields}", { fields: e.expectedFields.map((e) => e.name).join(", ") })
133
+ children: x("bigconsole.dashboards.templateSetup.expectedFields", "Expected fields: {fields}", { fields: e.expectedFields.map((e) => e.name).join(", ") })
134
134
  }),
135
- e.widgetTitles.length > 0 && /* @__PURE__ */ l("p", {
135
+ e.widgetTitles.length > 0 && /* @__PURE__ */ u("p", {
136
136
  className: "text-xs text-text-muted",
137
- children: b("bigconsole.dashboards.templateSetup.usedBy", "Used by: {widgets}", { widgets: e.widgetTitles.join(", ") })
137
+ children: x("bigconsole.dashboards.templateSetup.usedBy", "Used by: {widgets}", { widgets: e.widgetTitles.join(", ") })
138
138
  })
139
139
  ]
140
140
  }, e.slot)),
141
- I?.data?.listDataSinks.pageInfo.hasNextPage && /* @__PURE__ */ l("button", {
141
+ L?.data?.listDataSinks.pageInfo.hasNextPage && /* @__PURE__ */ u("button", {
142
142
  type: "button",
143
- disabled: v || L,
144
- onClick: () => M({
145
- owner: D,
146
- cursor: I.data?.listDataSinks.pageInfo.endCursor ?? void 0
143
+ disabled: y || R,
144
+ onClick: () => N({
145
+ owner: O,
146
+ cursor: L.data?.listDataSinks.pageInfo.endCursor ?? void 0
147
147
  }),
148
- children: b("bigconsole.dashboards.templateSetup.loadMore", "Load more sources")
148
+ children: x("bigconsole.dashboards.templateSetup.loadMore", "Load more sources")
149
149
  })
150
- ] }), p.requiredInputs.map((e, t) => /* @__PURE__ */ u("div", { children: [
151
- /* @__PURE__ */ u("label", {
152
- htmlFor: `${y}-input-${t}`,
150
+ ] }), m.requiredInputs.map((e, t) => /* @__PURE__ */ d("div", { children: [
151
+ /* @__PURE__ */ d("label", {
152
+ htmlFor: `${b}-input-${t}`,
153
153
  className: "text-sm font-medium",
154
154
  children: [e.label, e.required ? " *" : ""]
155
155
  }),
156
- e.type === "boolean" ? /* @__PURE__ */ u("select", {
157
- id: `${y}-input-${t}`,
158
- value: typeof g[e.name] == "boolean" ? String(g[e.name]) : "",
159
- style: B,
160
- disabled: v,
161
- onChange: (t) => _(e.name, t.target.value === "" ? void 0 : t.target.value === "true"),
156
+ e.type === "boolean" ? /* @__PURE__ */ d(s, {
157
+ id: `${b}-input-${t}`,
158
+ value: typeof _[e.name] == "boolean" ? String(_[e.name]) : "",
159
+ style: V,
160
+ disabled: y,
161
+ onChange: (t) => v(e.name, t.target.value === "" ? void 0 : t.target.value === "true"),
162
162
  children: [
163
- /* @__PURE__ */ l("option", {
163
+ /* @__PURE__ */ u("option", {
164
164
  value: "",
165
- children: b("bigconsole.dashboards.templateSetup.chooseValue", "Choose a value")
165
+ children: x("bigconsole.dashboards.templateSetup.chooseValue", "Choose a value")
166
166
  }),
167
- /* @__PURE__ */ l("option", {
167
+ /* @__PURE__ */ u("option", {
168
168
  value: "true",
169
- children: b("bigconsole.dashboards.templateSetup.true", "True")
169
+ children: x("bigconsole.dashboards.templateSetup.true", "True")
170
170
  }),
171
- /* @__PURE__ */ l("option", {
171
+ /* @__PURE__ */ u("option", {
172
172
  value: "false",
173
- children: b("bigconsole.dashboards.templateSetup.false", "False")
173
+ children: x("bigconsole.dashboards.templateSetup.false", "False")
174
174
  })
175
175
  ]
176
- }) : e.type === "select" ? /* @__PURE__ */ u("select", {
177
- id: `${y}-input-${t}`,
178
- value: typeof g[e.name] == "string" ? String(g[e.name]) : "",
179
- style: B,
180
- disabled: v,
181
- onChange: (t) => _(e.name, t.target.value),
182
- children: [/* @__PURE__ */ l("option", {
176
+ }) : e.type === "select" ? /* @__PURE__ */ d(s, {
177
+ id: `${b}-input-${t}`,
178
+ value: typeof _[e.name] == "string" ? String(_[e.name]) : "",
179
+ style: V,
180
+ disabled: y,
181
+ onChange: (t) => v(e.name, t.target.value),
182
+ children: [/* @__PURE__ */ u("option", {
183
183
  value: "",
184
- children: b("bigconsole.dashboards.templateSetup.chooseValue", "Choose a value")
185
- }), e.options?.map((e) => /* @__PURE__ */ l("option", {
184
+ children: x("bigconsole.dashboards.templateSetup.chooseValue", "Choose a value")
185
+ }), e.options?.map((e) => /* @__PURE__ */ u("option", {
186
186
  value: e.value,
187
187
  children: e.label
188
188
  }, e.value))]
189
- }) : /* @__PURE__ */ l(o, {
190
- id: `${y}-input-${t}`,
189
+ }) : /* @__PURE__ */ u(o, {
190
+ id: `${b}-input-${t}`,
191
191
  type: e.type === "secret" ? "password" : e.type === "number" ? "number" : "text",
192
192
  step: e.type === "number" ? "any" : void 0,
193
- value: typeof g[e.name] == "string" || typeof g[e.name] == "number" ? String(g[e.name]) : "",
193
+ value: typeof _[e.name] == "string" || typeof _[e.name] == "number" ? String(_[e.name]) : "",
194
194
  placeholder: e.placeholder,
195
- disabled: v,
196
- onChange: (t) => _(e.name, e.type === "number" ? t.target.value === "" ? void 0 : Number(t.target.value) : t.target.value)
195
+ disabled: y,
196
+ onChange: (t) => v(e.name, e.type === "number" ? t.target.value === "" ? void 0 : Number(t.target.value) : t.target.value)
197
197
  }),
198
- e.helpText && /* @__PURE__ */ l("p", {
198
+ e.helpText && /* @__PURE__ */ u("p", {
199
199
  className: "text-xs text-text-muted",
200
200
  children: e.helpText
201
201
  })
202
202
  ] }, e.name))]
203
203
  });
204
204
  }
205
- export { p as TemplateInstallOptions };
205
+ export { m as TemplateInstallOptions };
@@ -1,4 +1,5 @@
1
1
  import "../../../hooks/index.js";
2
2
  import "react";
3
+ import "@burdenoff/fe-libs/ui";
3
4
  import "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
4
5
  import "react/jsx-runtime";
@@ -4,148 +4,148 @@ import "../common/index.js";
4
4
  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
- import { Button as u } from "@burdenoff/fe-libs/ui";
8
- import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
+ import { Button as u, ThemedSelect as d } from "@burdenoff/fe-libs/ui";
8
+ import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
10
10
  // src/bigconsole/components/datasink/AlertExecutionHistory.tsx
11
- var m = {
11
+ var h = {
12
12
  owner: "",
13
13
  rows: [],
14
14
  loading: !1,
15
15
  hasMore: !1,
16
16
  error: null
17
17
  };
18
- function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
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
- a(() => (E.current = T, () => {
21
- E.current = null, D.current = null;
22
- }), [T]);
23
- let [O, k] = s(m), A = r(async () => {
24
- if (E.current !== T || D.current) return;
18
+ function g({ owner: g, rules: _, load: v, refreshVersion: y }) {
19
+ let { t: b } = f(), [x, S] = s(""), [C, w] = s([]), T = C.at(-1), E = `${g}|${x}|${T ?? ""}`, D = o(null), O = o(null);
20
+ a(() => (D.current = E, () => {
21
+ D.current = null, O.current = null;
22
+ }), [E]);
23
+ let [k, A] = s(h), j = r(async () => {
24
+ if (D.current !== E || O.current) return;
25
25
  let e = {};
26
- D.current = e, k((e) => ({
27
- ...e.owner === T ? e : m,
28
- owner: T,
26
+ O.current = e, A((e) => ({
27
+ ...e.owner === E ? e : h,
28
+ owner: E,
29
29
  loading: !0,
30
30
  error: null
31
31
  }));
32
32
  try {
33
- let t = await _(b || void 0, w);
34
- if (E.current !== T || D.current !== e || !t) return;
35
- k({
36
- owner: T,
33
+ let t = await v(x || void 0, T);
34
+ if (D.current !== E || O.current !== e || !t) return;
35
+ A({
36
+ owner: E,
37
37
  rows: t.slice(0, 20),
38
38
  loading: !1,
39
39
  hasMore: t.length > 20,
40
40
  error: null
41
41
  });
42
42
  } catch (t) {
43
- E.current === T && D.current === e && k((e) => ({
43
+ D.current === E && O.current === e && A((e) => ({
44
44
  ...e,
45
- owner: T,
45
+ owner: E,
46
46
  loading: !1,
47
47
  error: n(t)
48
48
  }));
49
49
  } finally {
50
- D.current === e && (D.current = null);
50
+ O.current === e && (O.current = null);
51
51
  }
52
52
  }, [
53
- _,
54
- b,
55
- w,
56
- T
53
+ v,
54
+ x,
55
+ T,
56
+ E
57
57
  ]);
58
58
  i(() => {
59
- Promise.resolve().then(() => A());
59
+ Promise.resolve().then(() => j());
60
60
  let e = window.setInterval(() => {
61
- document.visibilityState === "visible" && A();
61
+ document.visibilityState === "visible" && j();
62
62
  }, 1e4);
63
63
  return () => window.clearInterval(e);
64
- }, [A, v]);
65
- let j = O.owner === T ? O : {
66
- ...m,
64
+ }, [j, y]);
65
+ let M = k.owner === E ? k : {
66
+ ...h,
67
67
  loading: !0
68
68
  };
69
- return /* @__PURE__ */ p(t, {
70
- title: y("bigconsole.alerts.history.title", "Execution history"),
69
+ return /* @__PURE__ */ m(t, {
70
+ title: b("bigconsole.alerts.history.title", "Execution history"),
71
71
  headingLevel: 2,
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__ */ p(u, {
72
+ description: b("bigconsole.alerts.history.description", "Actual evaluations and notification delivery status. Refreshes every 10 seconds while this page is visible."),
73
+ actions: /* @__PURE__ */ m(u, {
74
74
  type: "button",
75
75
  variant: "secondary",
76
76
  size: "sm",
77
- onClick: () => void A(),
78
- disabled: j.loading,
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")]
77
+ onClick: () => void j(),
78
+ disabled: M.loading,
79
+ children: [M.loading ? /* @__PURE__ */ p(c, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ p(l, { className: "mr-2 h-4 w-4" }), b("bigconsole.alerts.history.refresh", "Refresh history")]
80
80
  }),
81
81
  children: [
82
- /* @__PURE__ */ f("label", {
82
+ /* @__PURE__ */ p("label", {
83
83
  htmlFor: "alert-history-filter",
84
84
  className: "mb-1 block text-xs font-medium text-text-primary",
85
- children: y("bigconsole.alerts.history.filter", "Filter by rule")
85
+ children: b("bigconsole.alerts.history.filter", "Filter by rule")
86
86
  }),
87
- /* @__PURE__ */ p("select", {
87
+ /* @__PURE__ */ m(d, {
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
- value: b,
90
+ value: x,
91
91
  onChange: (e) => {
92
- x(e.target.value), C([]);
92
+ S(e.target.value), w([]);
93
93
  },
94
94
  children: [
95
- /* @__PURE__ */ f("option", {
95
+ /* @__PURE__ */ p("option", {
96
96
  value: "",
97
- children: y("bigconsole.alerts.history.all", "All rules")
97
+ children: b("bigconsole.alerts.history.all", "All rules")
98
98
  }),
99
- b && !g.some((e) => e.id === b) && /* @__PURE__ */ f("option", {
100
- value: b,
101
- children: b
99
+ x && !_.some((e) => e.id === x) && /* @__PURE__ */ p("option", {
100
+ value: x,
101
+ children: x
102
102
  }),
103
- g.map((e) => /* @__PURE__ */ f("option", {
103
+ _.map((e) => /* @__PURE__ */ p("option", {
104
104
  value: e.id,
105
105
  children: e.name
106
106
  }, e.id))
107
107
  ]
108
108
  }),
109
- j.error && /* @__PURE__ */ f("p", {
109
+ M.error && /* @__PURE__ */ p("p", {
110
110
  role: "alert",
111
111
  className: "mb-4 break-words text-sm text-status-error-text",
112
- children: j.error
112
+ children: M.error
113
113
  }),
114
- j.loading && !j.rows.length && /* @__PURE__ */ f("p", {
114
+ M.loading && !M.rows.length && /* @__PURE__ */ p("p", {
115
115
  role: "status",
116
116
  className: "text-sm text-text-secondary",
117
- children: y("bigconsole.alerts.history.loading", "Loading execution history…")
117
+ children: b("bigconsole.alerts.history.loading", "Loading execution history…")
118
118
  }),
119
- !j.loading && !j.error && !j.rows.length && /* @__PURE__ */ f("p", {
119
+ !M.loading && !M.error && !M.rows.length && /* @__PURE__ */ p("p", {
120
120
  className: "text-sm text-text-secondary",
121
- children: y("bigconsole.alerts.history.empty", "No evaluations recorded yet. Enabled rules evaluate when the sink data is updated or refreshed.")
121
+ children: b("bigconsole.alerts.history.empty", "No evaluations recorded yet. Enabled rules evaluate when the sink data is updated or refreshed.")
122
122
  }),
123
- /* @__PURE__ */ f("ol", {
123
+ /* @__PURE__ */ p("ol", {
124
124
  className: "divide-y divide-border-subtle",
125
- children: j.rows.map((e) => /* @__PURE__ */ p("li", {
125
+ children: M.rows.map((e) => /* @__PURE__ */ m("li", {
126
126
  className: "min-w-0 py-4 first:pt-0",
127
127
  children: [
128
- /* @__PURE__ */ p("div", {
128
+ /* @__PURE__ */ m("div", {
129
129
  className: "flex flex-wrap items-start justify-between gap-2",
130
- children: [/* @__PURE__ */ p("div", {
130
+ children: [/* @__PURE__ */ m("div", {
131
131
  className: "min-w-0",
132
- children: [/* @__PURE__ */ f("p", {
132
+ children: [/* @__PURE__ */ p("p", {
133
133
  className: "break-words text-sm font-medium text-text-primary",
134
- children: g.find((t) => t.id === e.alertId)?.name ?? e.alertId
135
- }), /* @__PURE__ */ f("time", {
134
+ children: _.find((t) => t.id === e.alertId)?.name ?? e.alertId
135
+ }), /* @__PURE__ */ p("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__ */ f("span", {
140
+ }), /* @__PURE__ */ p("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
- children: y(`bigconsole.alerts.history.status.${e.status}`, e.status.replaceAll("_", " "))
142
+ children: b(`bigconsole.alerts.history.status.${e.status}`, e.status.replaceAll("_", " "))
143
143
  })]
144
144
  }),
145
- /* @__PURE__ */ p("p", {
145
+ /* @__PURE__ */ m("p", {
146
146
  className: "mt-2 break-words text-xs text-text-secondary",
147
147
  children: [
148
- y("bigconsole.alerts.history.dataVersion", "Data version"),
148
+ b("bigconsole.alerts.history.dataVersion", "Data version"),
149
149
  " ",
150
150
  e.version,
151
151
  " · ",
@@ -156,49 +156,49 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
156
156
  " ms"
157
157
  ]
158
158
  }),
159
- e.error && /* @__PURE__ */ f("p", {
159
+ e.error && /* @__PURE__ */ p("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__ */ f("ul", {
163
+ e.deliveries.length > 0 && /* @__PURE__ */ p("ul", {
164
164
  className: "mt-3 space-y-2",
165
- children: e.deliveries.map((e, t) => /* @__PURE__ */ p("li", {
165
+ children: e.deliveries.map((e, t) => /* @__PURE__ */ m("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__ */ p("div", {
168
+ /* @__PURE__ */ m("div", {
169
169
  className: "flex flex-wrap justify-between gap-2",
170
- children: [/* @__PURE__ */ p("span", {
170
+ children: [/* @__PURE__ */ m("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__ */ f("span", {
177
+ }), /* @__PURE__ */ p("span", {
178
178
  className: "font-medium text-text-primary",
179
179
  children: e.status
180
180
  })]
181
181
  }),
182
- e.attemptedAt && /* @__PURE__ */ p("p", {
182
+ e.attemptedAt && /* @__PURE__ */ m("p", {
183
183
  className: "mt-1 text-text-secondary",
184
184
  children: [
185
- y("bigconsole.alerts.history.attempted", "Attempted"),
185
+ b("bigconsole.alerts.history.attempted", "Attempted"),
186
186
  " ",
187
- /* @__PURE__ */ f("time", {
187
+ /* @__PURE__ */ p("time", {
188
188
  dateTime: e.attemptedAt,
189
189
  children: new Date(e.attemptedAt).toLocaleString()
190
190
  })
191
191
  ]
192
192
  }),
193
- e.notificationId && /* @__PURE__ */ p("p", {
193
+ e.notificationId && /* @__PURE__ */ m("p", {
194
194
  className: "mt-1 break-all text-text-muted",
195
195
  children: [
196
- y("bigconsole.alerts.history.notification", "Notification"),
196
+ b("bigconsole.alerts.history.notification", "Notification"),
197
197
  " · ",
198
198
  e.notificationId
199
199
  ]
200
200
  }),
201
- e.error && /* @__PURE__ */ f("p", {
201
+ e.error && /* @__PURE__ */ p("p", {
202
202
  className: "mt-1 break-words text-status-error-text",
203
203
  children: e.error
204
204
  })
@@ -208,38 +208,38 @@ function h({ owner: h, rules: g, load: _, refreshVersion: v }) {
208
208
  ]
209
209
  }, e.id))
210
210
  }),
211
- /* @__PURE__ */ p("div", {
211
+ /* @__PURE__ */ m("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__ */ p("span", {
213
+ children: [/* @__PURE__ */ m("span", {
214
214
  className: "text-xs text-text-secondary",
215
215
  children: [
216
- j.rows.length,
216
+ M.rows.length,
217
217
  " ",
218
- y("bigconsole.alerts.history.count", "executions on this page")
218
+ b("bigconsole.alerts.history.count", "executions on this page")
219
219
  ]
220
- }), /* @__PURE__ */ p("div", {
220
+ }), /* @__PURE__ */ m("div", {
221
221
  className: "flex gap-control-gap",
222
- children: [/* @__PURE__ */ f(u, {
222
+ children: [/* @__PURE__ */ p(u, {
223
223
  type: "button",
224
224
  variant: "secondary",
225
225
  size: "sm",
226
- onClick: () => C((e) => e.slice(0, -1)),
227
- disabled: !S.length || j.loading,
228
- children: y("bigconsole.alerts.history.newer", "Newer")
229
- }), /* @__PURE__ */ f(u, {
226
+ onClick: () => w((e) => e.slice(0, -1)),
227
+ disabled: !C.length || M.loading,
228
+ children: b("bigconsole.alerts.history.newer", "Newer")
229
+ }), /* @__PURE__ */ p(u, {
230
230
  type: "button",
231
231
  variant: "secondary",
232
232
  size: "sm",
233
233
  onClick: () => {
234
- let e = j.rows.at(-1);
235
- e && C((t) => [...t, e.id]);
234
+ let e = M.rows.at(-1);
235
+ e && w((t) => [...t, e.id]);
236
236
  },
237
- disabled: !j.hasMore || j.loading,
238
- children: y("bigconsole.alerts.history.older", "Older")
237
+ disabled: !M.hasMore || M.loading,
238
+ children: b("bigconsole.alerts.history.older", "Older")
239
239
  })]
240
240
  })]
241
241
  })
242
242
  ]
243
243
  });
244
244
  }
245
- export { h as AlertExecutionHistory };
245
+ export { g as AlertExecutionHistory };