@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,19 +1,19 @@
1
1
  import { useTr as e } from "../../../shared/hooks/useTr.js";
2
2
  import { ExpressionEditor as t } from "../parser/ExpressionEditor.js";
3
3
  import { ExploreHistoryDocument as n, ExploreSavedQueriesDocument as r, ExploreSavedQueryDocument as i, ExploreSourcesDocument as a, SaveExploreDocument as o } from "../../../generated/wspace-operations.js";
4
- import { Control as s, VisualBuilder as ee, controlClass as c } from "./VisualBuilder.js";
5
- import { emptyVisual as te, visualSql as ne } from "./visualSql.js";
6
- import { useExploreRun as re, workspaceRequest as ie } from "./useExploreRun.js";
4
+ import { Control as s, VisualBuilder as ee, controlClass as te } from "./VisualBuilder.js";
5
+ import { emptyVisual as ne, visualSql as re } from "./visualSql.js";
6
+ import { useExploreRun as ie, workspaceRequest as c } from "./useExploreRun.js";
7
7
  import { exploreErrorMessage as l, withoutError as u } from "./exploreErrors.js";
8
8
  import { QueryResults as ae } from "./QueryResults.js";
9
9
  import { CreateQueryWidget as oe } from "./CreateQueryWidget.js";
10
- import { useCallback as se, useEffect as d, useRef as f, useState as p } from "react";
11
- import { Button as m } from "@burdenoff/fe-libs/ui";
12
- import { useUnsavedChanges as ce } from "@burdenoff/fe-libs/shared/hooks";
13
- import { useApolloClient as le } from "@apollo/client/react";
14
- import { Fragment as ue, jsx as h, jsxs as g } from "react/jsx-runtime";
10
+ import { useCallback as se, useEffect as d, useRef as ce, useState as f } from "react";
11
+ import { Button as p, ThemedSelect as le } from "@burdenoff/fe-libs/ui";
12
+ import { useUnsavedChanges as ue } from "@burdenoff/fe-libs/shared/hooks";
13
+ import { useApolloClient as de } from "@apollo/client/react";
14
+ import { Fragment as fe, jsx as m, jsxs as h } from "react/jsx-runtime";
15
15
  // src/bigconsole/components/explore/SqlDraftEditor.tsx
16
- var _ = [
16
+ var g = [
17
17
  "SELECT",
18
18
  "FROM",
19
19
  "WHERE",
@@ -35,35 +35,35 @@ var _ = [
35
35
  "MAX",
36
36
  "LIMIT"
37
37
  ];
38
- function v({ workspaceId: v }) {
39
- let y = e(), b = le(), [x, S] = p("sql"), [C, w] = p(""), [T, de] = p(te), [E, D] = p([]), [O, k] = p([]), [fe, A] = p([]), [j, M] = p(0), [pe, me] = p(-1), N = j !== pe, [P, F] = p(""), [I, L] = p(""), [he, R] = p(""), z = x === "sql" ? I : he, [B, V] = p(""), [H, U] = p(!1), [W, G] = p(""), [K, q] = p(""), [ge, _e] = p(!1), [ve, ye] = p(!1), be = !I && !!C.length || ve, J = f(null), { run: xe, cancel: Se, result: Ce, error: we, running: Y, cancelling: Te, clearResult: X } = re(v), Z = ne(T, E), Q = x === "sql" ? C : Z, Ee = y("bigconsole.assistant.unsaved.sqlDraft", "the query draft");
40
- ce({
38
+ function _({ workspaceId: _ }) {
39
+ let v = e(), y = de(), [b, x] = f("sql"), [S, pe] = f(""), [C, me] = f(ne), [w, T] = f([]), [E, D] = f([]), [he, O] = f([]), [k, A] = f(0), [ge, _e] = f(-1), j = k !== ge, [M, N] = f(""), [P, F] = f(""), [ve, I] = f(""), L = b === "sql" ? P : ve, [R, z] = f(""), [B, V] = f(!1), [H, U] = f(""), [W, G] = f(""), [K, ye] = f(!1), [be, xe] = f(!1), Se = !P && !!S.length || be, q = ce(null), { run: Ce, cancel: we, result: Te, error: Ee, running: J, cancelling: De, clearResult: Y } = ie(_), X = re(C, w), Z = b === "sql" ? S : X, Oe = v("bigconsole.assistant.unsaved.sqlDraft", "the query draft");
40
+ ue({
41
41
  id: "bigconsole-sql-draft",
42
- label: Ee,
43
- dirty: be
42
+ label: Oe,
43
+ dirty: Se
44
44
  });
45
- let De = f(E);
45
+ let Q = ce(w);
46
46
  d(() => {
47
- De.current = E;
48
- }, [E]), d(() => {
47
+ Q.current = w;
48
+ }, [w]), d(() => {
49
49
  let e = new AbortController();
50
- return J.current = e, () => {
51
- e.abort(), J.current = null;
50
+ return q.current = e, () => {
51
+ e.abort(), q.current = null;
52
52
  };
53
53
  }, []), d(() => {
54
- let e = new AbortController(), t = ie(v, e.signal);
54
+ let e = new AbortController(), t = c(_, e.signal);
55
55
  return Promise.all([
56
- b.query({
56
+ y.query({
57
57
  query: a,
58
58
  fetchPolicy: "no-cache",
59
59
  context: t
60
60
  }),
61
- b.query({
61
+ y.query({
62
62
  query: r,
63
63
  fetchPolicy: "no-cache",
64
64
  context: t
65
65
  }),
66
- b.query({
66
+ y.query({
67
67
  query: n,
68
68
  fetchPolicy: "no-cache",
69
69
  context: t
@@ -72,110 +72,110 @@ function v({ workspaceId: v }) {
72
72
  if (e.signal.aborted) return;
73
73
  let i = u(t), a = u(n), o = u(r);
74
74
  if (!i.data || !a.data || !o.data) throw Error("Incomplete catalog");
75
- F(""), D(i.data.bigconsoleExploreSources), A(a.data.bigconsoleSavedQueries), k(o.data.bigconsoleExploreHistory);
75
+ N(""), T(i.data.bigconsoleExploreSources), O(a.data.bigconsoleSavedQueries), D(o.data.bigconsoleExploreHistory);
76
76
  }).catch((t) => {
77
- e.signal.aborted || (D([]), A([]), k([]), F(l(t, y)));
77
+ e.signal.aborted || (T([]), O([]), D([]), N(l(t, v)));
78
78
  }).finally(() => {
79
- e.signal.aborted || me(j);
79
+ e.signal.aborted || _e(k);
80
80
  }), () => e.abort();
81
81
  }, [
82
- b,
83
- v,
84
- j,
85
- y
82
+ y,
83
+ _,
84
+ k,
85
+ v
86
86
  ]);
87
- let Oe = se((e, t) => {
87
+ let ke = se((e, t) => {
88
88
  let n = e.getModel();
89
89
  if (!n) return;
90
90
  let r = t.languages.registerCompletionItemProvider("sql", {
91
91
  triggerCharacters: ["."],
92
92
  provideCompletionItems(e, r) {
93
93
  if (e !== n) return { suggestions: [] };
94
- let i = n.getWordUntilPosition(r), a = new t.Range(r.lineNumber, i.startColumn, r.lineNumber, i.endColumn), o = n.getLineContent(r.lineNumber).slice(0, i.startColumn - 1).match(/"?([a-z_][a-z0-9_]*)"?\.$/i)?.[1].toLowerCase(), s = De.current;
94
+ let i = n.getWordUntilPosition(r), a = new t.Range(r.lineNumber, i.startColumn, r.lineNumber, i.endColumn), o = n.getLineContent(r.lineNumber).slice(0, i.startColumn - 1).match(/"?([a-z_][a-z0-9_]*)"?\.$/i)?.[1].toLowerCase(), s = Q.current;
95
95
  return { suggestions: (o ? s.find((e) => e.name === o)?.fields.map((e) => e.name) ?? [] : [
96
- ..._,
96
+ ...g,
97
97
  ...s.map((e) => e.name),
98
98
  ...s.flatMap((e) => e.fields.map((t) => e.name + "." + t.name))
99
99
  ]).map((e) => ({
100
100
  label: e,
101
- insertText: _.includes(e) ? e : e.split(".").map((e) => "\"" + e.replaceAll("\"", "\"\"") + "\"").join("."),
102
- kind: _.includes(e) ? t.languages.CompletionItemKind.Keyword : t.languages.CompletionItemKind.Field,
101
+ insertText: g.includes(e) ? e : e.split(".").map((e) => "\"" + e.replaceAll("\"", "\"\"") + "\"").join("."),
102
+ kind: g.includes(e) ? t.languages.CompletionItemKind.Keyword : t.languages.CompletionItemKind.Field,
103
103
  range: a
104
104
  })) };
105
105
  }
106
106
  });
107
107
  e.onDidDispose(() => r.dispose());
108
108
  }, []);
109
- function ke(e) {
110
- w(e), L(""), U(!1), G(""), q(""), X();
109
+ function Ae(e) {
110
+ pe(e), F(""), V(!1), U(""), G(""), Y();
111
111
  }
112
- async function Ae() {
113
- q(""), G(""), await xe(z ? { savedQueryId: z } : { sql: Q }), J.current && !J.current.signal.aborted && M((e) => e + 1);
112
+ async function je() {
113
+ G(""), U(""), await Ce(L ? { savedQueryId: L } : { sql: Z }), q.current && !q.current.signal.aborted && A((e) => e + 1);
114
114
  }
115
- async function je(e, t) {
116
- let n = J.current?.signal;
117
- if (!(!n || n.aborted || ge)) {
118
- _e(!0), q(""), G(""), U(!1), X();
115
+ async function Me(e, t) {
116
+ let n = q.current?.signal;
117
+ if (!(!n || n.aborted || K)) {
118
+ ye(!0), G(""), U(""), V(!1), Y();
119
119
  try {
120
- let r = ie(v, n), a = e === "open" && t ? u(await b.query({
120
+ let r = c(_, n), a = e === "open" && t ? u(await y.query({
121
121
  query: i,
122
122
  variables: { id: t },
123
123
  fetchPolicy: "no-cache",
124
124
  context: r
125
- })).data?.bigconsoleSavedQuery : u(await b.mutate({
125
+ })).data?.bigconsoleSavedQuery : u(await y.mutate({
126
126
  mutation: o,
127
127
  variables: {
128
- name: B.trim(),
129
- sql: Q
128
+ name: R.trim(),
129
+ sql: Z
130
130
  },
131
131
  fetchPolicy: "no-cache",
132
132
  context: r
133
133
  })).data?.bigconsoleSaveExplore;
134
134
  if (n.aborted) return;
135
135
  if (!a) throw Error("Missing saved definition");
136
- V(a.name), e === "save" && x === "visual" ? (R(a.id), ye(!1)) : (L(a.id), S("sql"), w(a.sql)), G(e === "open" ? "Saved query opened." : "Query saved."), M((e) => e + 1);
136
+ z(a.name), e === "save" && b === "visual" ? (I(a.id), xe(!1)) : (F(a.id), x("sql"), pe(a.sql)), U(e === "open" ? "Saved query opened." : "Query saved."), A((e) => e + 1);
137
137
  } catch (e) {
138
- n.aborted || (q(l(e, y)), M((e) => e + 1));
138
+ n.aborted || (G(l(e, v)), A((e) => e + 1));
139
139
  } finally {
140
- n.aborted || _e(!1);
140
+ n.aborted || ye(!1);
141
141
  }
142
142
  }
143
143
  }
144
- async function Me() {
144
+ async function Ne() {
145
145
  try {
146
- await navigator.clipboard.writeText(Q), G(y("bigconsole.explore.copied", "Draft copied."));
146
+ await navigator.clipboard.writeText(Z), U(v("bigconsole.explore.copied", "Draft copied."));
147
147
  } catch {
148
- G(y("bigconsole.explore.copyFailed", "Select and copy the draft in the editor."));
148
+ U(v("bigconsole.explore.copyFailed", "Select and copy the draft in the editor."));
149
149
  }
150
150
  }
151
- let $ = Y || ge;
152
- return /* @__PURE__ */ g("div", {
151
+ let $ = J || K;
152
+ return /* @__PURE__ */ h("div", {
153
153
  className: "mt-3 space-y-4",
154
154
  children: [
155
- /* @__PURE__ */ g("section", {
155
+ /* @__PURE__ */ h("section", {
156
156
  "aria-label": "Authorized schema",
157
157
  children: [
158
- /* @__PURE__ */ h("h3", {
158
+ /* @__PURE__ */ m("h3", {
159
159
  className: "font-medium",
160
160
  children: "Available sources"
161
161
  }),
162
- N && /* @__PURE__ */ h("span", {
162
+ j && /* @__PURE__ */ m("span", {
163
163
  role: "status",
164
164
  children: "Loading schema…"
165
165
  }),
166
- P && /* @__PURE__ */ h("p", {
166
+ M && /* @__PURE__ */ m("p", {
167
167
  role: "alert",
168
- children: P
168
+ children: M
169
169
  }),
170
- !N && !P && !E.length && /* @__PURE__ */ h("p", { children: "No sources are authorized for this workspace." }),
171
- /* @__PURE__ */ h("div", {
170
+ !j && !M && !w.length && /* @__PURE__ */ m("p", { children: "No sources are authorized for this workspace." }),
171
+ /* @__PURE__ */ m("div", {
172
172
  className: "flex flex-wrap gap-3",
173
- children: E.map((e) => /* @__PURE__ */ g("details", { children: [/* @__PURE__ */ h("summary", {
173
+ children: w.map((e) => /* @__PURE__ */ h("details", { children: [/* @__PURE__ */ m("summary", {
174
174
  className: "cursor-pointer",
175
175
  children: e.name
176
- }), /* @__PURE__ */ h("ul", {
176
+ }), /* @__PURE__ */ m("ul", {
177
177
  className: "ml-4 text-sm",
178
- children: e.fields.map((e) => /* @__PURE__ */ g("li", { children: [
178
+ children: e.fields.map((e) => /* @__PURE__ */ h("li", { children: [
179
179
  e.name,
180
180
  " · ",
181
181
  e.type,
@@ -184,188 +184,188 @@ function v({ workspaceId: v }) {
184
184
  ] }, e.id))
185
185
  })] }, e.id))
186
186
  }),
187
- /* @__PURE__ */ h("button", {
187
+ /* @__PURE__ */ m("button", {
188
188
  className: "mt-1 text-sm underline",
189
189
  type: "button",
190
- disabled: $ || N,
190
+ disabled: $ || j,
191
191
  onClick: () => {
192
- X(), M((e) => e + 1);
192
+ Y(), A((e) => e + 1);
193
193
  },
194
194
  children: "Refresh schema"
195
195
  })
196
196
  ]
197
197
  }),
198
- /* @__PURE__ */ g("div", {
198
+ /* @__PURE__ */ h("div", {
199
199
  "aria-label": "Query mode",
200
200
  className: "flex gap-2",
201
- children: [/* @__PURE__ */ h(m, {
201
+ children: [/* @__PURE__ */ m(p, {
202
202
  size: "sm",
203
203
  type: "button",
204
- "aria-pressed": x === "sql",
204
+ "aria-pressed": b === "sql",
205
205
  disabled: $,
206
206
  onClick: () => {
207
- S("sql"), U(!1), X(), q("");
207
+ x("sql"), V(!1), Y(), G("");
208
208
  },
209
209
  children: "SQL"
210
- }), /* @__PURE__ */ h(m, {
210
+ }), /* @__PURE__ */ m(p, {
211
211
  size: "sm",
212
212
  type: "button",
213
- "aria-pressed": x === "visual",
213
+ "aria-pressed": b === "visual",
214
214
  disabled: $,
215
215
  onClick: () => {
216
- S("visual"), U(!1), X(), q("");
216
+ x("visual"), V(!1), Y(), G("");
217
217
  },
218
218
  children: "Explore"
219
219
  })]
220
220
  }),
221
- x === "sql" ? /* @__PURE__ */ h(t, {
221
+ b === "sql" ? /* @__PURE__ */ m(t, {
222
222
  language: "sql",
223
- value: C,
224
- onChange: ke,
225
- onEditorMount: Oe,
223
+ value: S,
224
+ onChange: Ae,
225
+ onEditorMount: ke,
226
226
  readOnly: $,
227
227
  saveViewState: !1,
228
228
  inputOptions: {
229
- ariaLabel: y("bigconsole.explore.sqlEditor", "SQL editor"),
229
+ ariaLabel: v("bigconsole.explore.sqlEditor", "SQL editor"),
230
230
  wordBasedSuggestions: "off"
231
231
  }
232
- }) : /* @__PURE__ */ g(ue, { children: [
233
- /* @__PURE__ */ h("p", {
232
+ }) : /* @__PURE__ */ h(fe, { children: [
233
+ /* @__PURE__ */ m("p", {
234
234
  className: "text-sm text-text-secondary",
235
235
  children: "Explore builds a separate query. Return to SQL to see your original text."
236
236
  }),
237
- /* @__PURE__ */ h("fieldset", {
237
+ /* @__PURE__ */ m("fieldset", {
238
238
  disabled: $,
239
- children: /* @__PURE__ */ h(ee, {
240
- sources: E,
241
- value: T,
239
+ children: /* @__PURE__ */ m(ee, {
240
+ sources: w,
241
+ value: C,
242
242
  onChange: (e) => {
243
- de(e), R(""), ye(!0), X(), q("");
243
+ me(e), I(""), xe(!0), Y(), G("");
244
244
  }
245
245
  })
246
246
  }),
247
- /* @__PURE__ */ h("h3", {
247
+ /* @__PURE__ */ m("h3", {
248
248
  className: "font-medium",
249
249
  children: "Generated SQL"
250
250
  }),
251
- Z ? /* @__PURE__ */ h("pre", {
251
+ X ? /* @__PURE__ */ m("pre", {
252
252
  className: "max-w-full overflow-auto rounded bg-bg-surface p-2",
253
- children: Z
254
- }) : /* @__PURE__ */ h("p", {
253
+ children: X
254
+ }) : /* @__PURE__ */ m("p", {
255
255
  className: "text-sm",
256
256
  children: "Choose fields or an aggregate. Complete each filter and join, and group any projected fields when aggregating."
257
257
  })
258
258
  ] }),
259
- /* @__PURE__ */ g("div", {
259
+ /* @__PURE__ */ h("div", {
260
260
  className: "flex flex-wrap gap-2",
261
261
  children: [
262
- /* @__PURE__ */ h(m, {
262
+ /* @__PURE__ */ m(p, {
263
263
  size: "sm",
264
264
  type: "button",
265
- disabled: $ || !Q.trim() || !E.length || N || !!P,
266
- onClick: () => void Ae(),
265
+ disabled: $ || !Z.trim() || !w.length || j || !!M,
266
+ onClick: () => void je(),
267
267
  children: "Run"
268
268
  }),
269
- Y && /* @__PURE__ */ h(m, {
269
+ J && /* @__PURE__ */ m(p, {
270
270
  size: "sm",
271
271
  type: "button",
272
- disabled: Te,
273
- onClick: () => void Se(),
274
- children: Te ? "Cancelling…" : "Cancel"
272
+ disabled: De,
273
+ onClick: () => void we(),
274
+ children: De ? "Cancelling…" : "Cancel"
275
275
  }),
276
- /* @__PURE__ */ h(m, {
276
+ /* @__PURE__ */ m(p, {
277
277
  size: "sm",
278
278
  type: "button",
279
279
  variant: "secondary",
280
- disabled: !Q.trim(),
281
- onClick: () => void Me(),
282
- children: y("bigconsole.explore.copy", "Copy draft")
280
+ disabled: !Z.trim(),
281
+ onClick: () => void Ne(),
282
+ children: v("bigconsole.explore.copy", "Copy draft")
283
283
  })
284
284
  ]
285
285
  }),
286
- Y && /* @__PURE__ */ h("p", {
286
+ J && /* @__PURE__ */ m("p", {
287
287
  role: "status",
288
288
  children: "Running query…"
289
289
  }),
290
- we && /* @__PURE__ */ h("p", {
290
+ Ee && /* @__PURE__ */ m("p", {
291
291
  role: "alert",
292
- children: we
292
+ children: Ee
293
293
  }),
294
- Ce && /* @__PURE__ */ h(ae, { result: Ce }),
295
- /* @__PURE__ */ g("fieldset", {
294
+ Te && /* @__PURE__ */ m(ae, { result: Te }),
295
+ /* @__PURE__ */ h("fieldset", {
296
296
  disabled: $,
297
297
  className: "flex flex-wrap items-end gap-2",
298
298
  children: [
299
- /* @__PURE__ */ h("legend", {
299
+ /* @__PURE__ */ m("legend", {
300
300
  className: "font-medium",
301
301
  children: "Saved queries"
302
302
  }),
303
- /* @__PURE__ */ h(s, {
303
+ /* @__PURE__ */ m(s, {
304
304
  label: "Open saved query",
305
- children: /* @__PURE__ */ g("select", {
306
- className: c,
307
- value: z,
305
+ children: /* @__PURE__ */ h(le, {
306
+ className: te,
307
+ value: L,
308
308
  onChange: (e) => {
309
- e.target.value && je("open", e.target.value);
309
+ e.target.value && Me("open", e.target.value);
310
310
  },
311
- children: [/* @__PURE__ */ h("option", {
311
+ children: [/* @__PURE__ */ m("option", {
312
312
  value: "",
313
313
  children: "Choose a query"
314
- }), fe.map((e) => /* @__PURE__ */ h("option", {
314
+ }), he.map((e) => /* @__PURE__ */ m("option", {
315
315
  value: e.id,
316
316
  children: e.name
317
317
  }, e.id))]
318
318
  })
319
319
  }),
320
- /* @__PURE__ */ h(s, {
320
+ /* @__PURE__ */ m(s, {
321
321
  label: "Query name",
322
- children: /* @__PURE__ */ h("input", {
323
- className: c,
324
- value: B,
325
- onChange: (e) => V(e.target.value)
322
+ children: /* @__PURE__ */ m("input", {
323
+ className: te,
324
+ value: R,
325
+ onChange: (e) => z(e.target.value)
326
326
  })
327
327
  }),
328
- /* @__PURE__ */ h(m, {
328
+ /* @__PURE__ */ m(p, {
329
329
  size: "sm",
330
330
  type: "button",
331
- disabled: !Q.trim() || !B.trim() || !!P || N || !E.length,
332
- onClick: () => void je("save"),
331
+ disabled: !Z.trim() || !R.trim() || !!M || j || !w.length,
332
+ onClick: () => void Me("save"),
333
333
  children: "Save as new query"
334
334
  }),
335
- z && /* @__PURE__ */ h(m, {
335
+ L && /* @__PURE__ */ m(p, {
336
336
  size: "sm",
337
337
  type: "button",
338
- onClick: () => U(!H),
338
+ onClick: () => V(!B),
339
339
  children: "Add to dashboard"
340
340
  })
341
341
  ]
342
342
  }),
343
- W && /* @__PURE__ */ h("p", {
343
+ H && /* @__PURE__ */ m("p", {
344
344
  role: "status",
345
- children: W
345
+ children: H
346
346
  }),
347
- K && /* @__PURE__ */ h("p", {
347
+ W && /* @__PURE__ */ m("p", {
348
348
  role: "alert",
349
- children: K
349
+ children: W
350
350
  }),
351
- H && z && /* @__PURE__ */ h(oe, {
352
- savedId: z,
353
- name: B,
354
- workspaceId: v
355
- }, z),
356
- /* @__PURE__ */ g("details", { children: [/* @__PURE__ */ h("summary", {
351
+ B && L && /* @__PURE__ */ m(oe, {
352
+ savedId: L,
353
+ name: R,
354
+ workspaceId: _
355
+ }, L),
356
+ /* @__PURE__ */ h("details", { children: [/* @__PURE__ */ m("summary", {
357
357
  className: "cursor-pointer font-medium",
358
358
  children: "Query history"
359
- }), O.length ? /* @__PURE__ */ h("ul", {
359
+ }), E.length ? /* @__PURE__ */ m("ul", {
360
360
  className: "mt-1 text-sm",
361
- children: O.map((e) => /* @__PURE__ */ g("li", { children: [
361
+ children: E.map((e) => /* @__PURE__ */ h("li", { children: [
362
362
  e.startedAt,
363
363
  " · ",
364
364
  e.status,
365
365
  e.durationMs == null ? "" : " · " + e.durationMs + " ms"
366
366
  ] }, e.id))
367
- }) : /* @__PURE__ */ h("p", { children: "No query runs to show." })] })
367
+ }) : /* @__PURE__ */ m("p", { children: "No query runs to show." })] })
368
368
  ]
369
369
  });
370
370
  }
371
- export { v as default };
371
+ export { _ as default };