react-semaphor 0.1.293 → 0.1.294

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 (40) hide show
  1. package/dist/chunks/{braces-C7GP95Fp.js → braces-DR-GdaLC.js} +1 -1
  2. package/dist/chunks/{braces-BwW2HFlB.js → braces-DfDQiR3J.js} +1 -1
  3. package/dist/chunks/{dashboard-controls-jrkoCSY_.js → dashboard-controls-C3Z9bpYE.js} +504 -472
  4. package/dist/chunks/{dashboard-controls-DgUc38Tn.js → dashboard-controls-DGEVXgP5.js} +9 -9
  5. package/dist/chunks/dashboard-filter-controls-button-BIYT1ucX.js +11 -0
  6. package/dist/chunks/dashboard-filter-controls-button-DxgGUl00.js +1152 -0
  7. package/dist/chunks/{dashboard-json-COjT-zjQ.js → dashboard-json-BvTeHePu.js} +1 -1
  8. package/dist/chunks/{dashboard-json-C0NiRL-A.js → dashboard-json-DQW8TN0I.js} +1 -1
  9. package/dist/chunks/{dashboard-summary-settings-dialog-CXqaN_zj.js → dashboard-summary-settings-dialog-BsmKiGud.js} +1 -1
  10. package/dist/chunks/{dashboard-summary-settings-dialog-CGuFl7Xe.js → dashboard-summary-settings-dialog-q7fx3YAK.js} +1 -1
  11. package/dist/chunks/edit-dashboard-visual-ChKj-Lzr.js +183 -0
  12. package/dist/chunks/{edit-dashboard-visual-ppdXk86H.js → edit-dashboard-visual-RVl9nbDZ.js} +2175 -2160
  13. package/dist/chunks/index-BlspGR07.js +1435 -0
  14. package/dist/chunks/{index-9z-jMqN8.js → index-DerPpfv0.js} +32720 -31308
  15. package/dist/chunks/{resource-management-panel-CP8cegZP.js → resource-management-panel-DnZ1rw1A.js} +64 -64
  16. package/dist/chunks/{resource-management-panel-os6AuEKT.js → resource-management-panel-epydPwyM.js} +1 -1
  17. package/dist/chunks/use-create-flow-overlay-state-Bcg4EgoD.js +21 -0
  18. package/dist/chunks/{use-create-flow-overlay-state-wpuqRZX5.js → use-create-flow-overlay-state-C5vdfXhM.js} +430 -425
  19. package/dist/chunks/use-visual-utils-D9Kknvjl.js +337 -0
  20. package/dist/chunks/use-visual-utils-Dw_yw9zU.js +1 -0
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +258 -253
  25. package/dist/style.css +1 -1
  26. package/dist/surfboard/index.cjs +1 -1
  27. package/dist/surfboard/index.js +2 -2
  28. package/dist/types/dashboard.d.ts +28 -0
  29. package/dist/types/main.d.ts +42 -4
  30. package/dist/types/shared.d.ts +3 -0
  31. package/dist/types/surfboard.d.ts +28 -0
  32. package/dist/types/types.d.ts +28 -0
  33. package/package.json +1 -1
  34. package/dist/chunks/dashboard-filter-controls-button-B19UWmsK.js +0 -11
  35. package/dist/chunks/dashboard-filter-controls-button-DGH4DxJ8.js +0 -1109
  36. package/dist/chunks/edit-dashboard-visual-CDOz4LWO.js +0 -183
  37. package/dist/chunks/index-K25f5Rqr.js +0 -1435
  38. package/dist/chunks/use-create-flow-overlay-state-CecnMS_v.js +0 -21
  39. package/dist/chunks/use-visual-utils-BTfG-ppd.js +0 -1
  40. package/dist/chunks/use-visual-utils-BhRKGJql.js +0 -334
package/dist/index.js CHANGED
@@ -1,51 +1,51 @@
1
- import { d as j, Y as q, Z as H, _ as Q, $ as G, a0 as K, a1 as Y, a2 as X, a3 as J, a4 as Z, u as F, a5 as O, a6 as ee, P as ae, k as te, B as T, b as _, a7 as se, m as re, n as ne, o as ie, a8 as V, a9 as oe, p as le, q as de, r as ce, s as ue, t as me, aa as he, ab as pe, ac as fe, ad as E, ae as be, af as ge } from "./chunks/index-9z-jMqN8.js";
2
- import { aV as Me, aX as Fe, bD as Le, aZ as Ue, aW as ze, ay as Be, a_ as Oe, D as je, aw as Qe, aq as Ve, bJ as We, b2 as $e, ai as qe, al as He, al as Ge, am as Ke, ax as Ye, a as Xe, bI as Je, at as Ze, bo as ea, bl as aa, bE as ta, b9 as sa, bq as ra, av as na, ar as ia, as as oa, b3 as la, bM as da, bn as ca, bx as ua, bu as ma, bB as ha, bv as pa, bw as fa, bt as ba, bs as ga, bb as xa, bH as Na, bG as va, bF as ya, ba as Aa, be as Ca, bf as Sa, b8 as Da, au as Ea, b7 as Ta, b0 as wa, b1 as Ra, a$ as Ia, bc as _a, b6 as Pa, bL as ka, bK as Ma, b5 as Fa, b4 as La, bA as Ua, bm as za, bz as Ba, bg as Oa, bd as ja, br as Qa, bp as Va, by as Wa, bC as $a, aF as qa, aC as Ha, aO as Ga, aM as Ka, aU as Ya, aT as Xa, aL as Ja, aK as Za, aJ as et, aN as at, aY as tt, aH as st, aI as rt, aP as nt, aR as it, ap as ot, aQ as lt, aA as dt, bi as ct, bk as ut, bj as mt, O as ht, ao as pt, ah as ft, az as bt, aB as gt, aj as xt, N as Nt, bh as vt, V as yt, aE as At, aD as Ct, aG as St, ag as Dt, an as Et, aS as Tt, ak as wt } from "./chunks/index-9z-jMqN8.js";
3
- import { CONTROL_CARD_DEFAULT_VALUE as It, DEFAULT_CALENDAR_CONTEXT as _t, DEFAULT_SEMANTIC_DOMAIN_ACCESS as Pt, EMPTY_SELECTION as kt } from "./types/index.js";
4
- import { C as Ft, D as Lt } from "./chunks/dashboard-summary-settings-dialog-CGuFl7Xe.js";
5
- import { jsx as e, jsxs as r, Fragment as xe } from "react/jsx-runtime";
1
+ import { d as j, Z as q, _ as H, $ as Q, a0 as G, a1 as K, a2 as X, a3 as Y, a4 as J, a5 as Z, u as L, a6 as O, a7 as ee, a8 as ae, P as te, k as se, B as T, b as _, a9 as re, m as ne, n as ie, o as oe, aa as W, ab as le, p as de, q as ce, r as ue, s as me, t as he, ac as pe, ad as fe, ae as be, af as E, ag as ge, ah as xe } from "./chunks/index-DerPpfv0.js";
2
+ import { aW as Le, aY as Ue, bE as ze, a_ as Be, aX as Oe, az as je, a$ as Qe, D as We, ax as Ve, as as $e, bK as qe, b3 as He, ak as Ge, an as Ke, an as Xe, ao as Ye, ay as Je, a as Ze, bJ as ea, bp as aa, bm as ta, bF as sa, ba as ra, br as na, aw as ia, at as oa, au as la, b4 as da, bN as ca, bo as ua, by as ma, bv as ha, bC as pa, bw as fa, bx as ba, bu as ga, bt as xa, bc as Na, bI as va, bH as ya, bG as Aa, bb as Ca, bf as Sa, bg as Da, b9 as Ea, av as Ta, b8 as wa, b1 as Ra, b2 as Ia, b0 as _a, bd as Pa, b7 as ka, bM as Ma, bL as Fa, b6 as La, b5 as Ua, bB as za, bn as Ba, bA as Oa, bh as ja, be as Qa, bs as Wa, bq as Va, bz as $a, bD as qa, aG as Ha, aD as Ga, aP as Ka, aN as Xa, aV as Ya, aU as Ja, aM as Za, aL as et, aK as at, aO as tt, aZ as st, aI as rt, aJ as nt, aQ as it, aS as ot, ar as lt, aR as dt, aB as ct, bj as ut, bl as mt, bk as ht, Q as pt, aq as ft, aj as bt, aA as gt, aC as xt, al as Nt, O as vt, bi as yt, W as At, aF as Ct, aE as St, aH as Dt, ai as Et, ap as Tt, aT as wt, am as Rt } from "./chunks/index-DerPpfv0.js";
3
+ import { CONTROL_CARD_DEFAULT_VALUE as _t, DEFAULT_CALENDAR_CONTEXT as Pt, DEFAULT_SEMANTIC_DOMAIN_ACCESS as kt, EMPTY_SELECTION as Mt } from "./types/index.js";
4
+ import { C as Lt, D as Ut } from "./chunks/dashboard-summary-settings-dialog-q7fx3YAK.js";
5
+ import { jsx as e, jsxs as r, Fragment as Ne } from "react/jsx-runtime";
6
6
  import * as R from "react";
7
- import { useMemo as W, useState as P, useEffect as L, useCallback as M } from "react";
8
- import { ResourceManagementPanel as zt } from "./chunks/resource-management-panel-CP8cegZP.js";
9
- import { u as Ot } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
7
+ import { useMemo as V, useEffect as k, useState as P, useCallback as F } from "react";
8
+ import { ResourceManagementPanel as Bt } from "./chunks/resource-management-panel-DnZ1rw1A.js";
9
+ import { u as jt } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
10
10
  import "react-dom";
11
- import { A as Qt, D as Vt, c as Wt, a as $t, E as qt, N as Ht, U as Gt, V as Kt, u as Yt, b as Xt, d as Jt } from "./chunks/dashboard-filter-controls-button-DGH4DxJ8.js";
11
+ import { A as Wt, D as Vt, c as $t, a as qt, E as Ht, N as Gt, U as Kt, V as Xt, u as Yt, b as Jt } from "./chunks/dashboard-filter-controls-button-DxgGUl00.js";
12
12
  import { n as es, s as as } from "./chunks/normalize-dashboard-for-dirty-check-5KpZN8xr.js";
13
- function De(a) {
14
- const { authToken: s, tokenProps: i } = j();
13
+ function Ee(a) {
14
+ const { authToken: t, tokenProps: n } = j();
15
15
  return q({
16
- mutationFn: async (l) => H(
17
- i.apiServiceUrl,
18
- s.accessToken,
16
+ mutationFn: async (i) => H(
17
+ n.apiServiceUrl,
18
+ t.accessToken,
19
19
  a,
20
- l
20
+ i
21
21
  )
22
22
  });
23
23
  }
24
- function Ee(a) {
25
- const { displayPreferences: s, cardId: i, ...l } = a, n = {
26
- ...l,
24
+ function Te(a) {
25
+ const { displayPreferences: t, cardId: n, ...i } = a, o = {
26
+ ...i,
27
27
  id: a.dashboardId
28
28
  // override the id to the dashboard id so that the dashboard is not loaded
29
29
  };
30
- return /* @__PURE__ */ e(Q, { FallbackComponent: G, children: /* @__PURE__ */ r(K, { dashboardProps: n, children: [
31
- /* @__PURE__ */ e(Y, { componentType: "visual", componentId: a.cardId }),
32
- /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(J, { displayPreferences: s, children: /* @__PURE__ */ e(Z, { type: "visual", cardId: i, ...n, children: /* @__PURE__ */ e(Ne, { cardId: i }) }) }) })
30
+ return /* @__PURE__ */ e(Q, { FallbackComponent: G, children: /* @__PURE__ */ r(K, { dashboardProps: o, children: [
31
+ /* @__PURE__ */ e(X, { componentType: "visual", componentId: a.cardId }),
32
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(J, { displayPreferences: t, children: /* @__PURE__ */ e(Z, { type: "visual", cardId: n, ...o, children: /* @__PURE__ */ e(ve, { cardId: n }) }) }) })
33
33
  ] }) });
34
34
  }
35
- function Ne({ cardId: a }) {
36
- const s = F((n) => {
35
+ function ve({ cardId: a }) {
36
+ const t = L((o) => {
37
37
  var c;
38
- return (c = n.dashboard) == null ? void 0 : c.sheets;
39
- }), { card: i, frame: l } = W(() => {
40
- const n = s == null ? void 0 : s.flatMap((o) => o.frames), c = n == null ? void 0 : n.flatMap((o) => o == null ? void 0 : o.cards), u = c == null ? void 0 : c.find((o) => (o == null ? void 0 : o.id) === a), t = n == null ? void 0 : n.find(
41
- (o) => {
38
+ return (c = o.dashboard) == null ? void 0 : c.sheets;
39
+ }), { card: n, frame: i } = V(() => {
40
+ const o = t == null ? void 0 : t.flatMap((l) => l.frames), c = o == null ? void 0 : o.flatMap((l) => l == null ? void 0 : l.cards), u = c == null ? void 0 : c.find((l) => (l == null ? void 0 : l.id) === a), s = o == null ? void 0 : o.find(
41
+ (l) => {
42
42
  var m;
43
- return (m = o == null ? void 0 : o.cards) == null ? void 0 : m.find((b) => (b == null ? void 0 : b.id) === a);
43
+ return (m = l == null ? void 0 : l.cards) == null ? void 0 : m.find((b) => (b == null ? void 0 : b.id) === a);
44
44
  }
45
45
  );
46
- return { card: u, frame: t };
47
- }, [s, a]);
48
- return !i || !l ? /* @__PURE__ */ e(
46
+ return { card: u, frame: s };
47
+ }, [t, a]);
48
+ return !n || !i ? /* @__PURE__ */ e(
49
49
  O,
50
50
  {
51
51
  error: new Error("Card not found"),
@@ -57,98 +57,103 @@ function Ne({ cardId: a }) {
57
57
  Q,
58
58
  {
59
59
  FallbackComponent: ({
60
- error: n,
60
+ error: o,
61
61
  resetErrorBoundary: c
62
62
  }) => /* @__PURE__ */ e(
63
63
  O,
64
64
  {
65
- error: n,
65
+ error: o,
66
66
  resetErrorBoundary: c,
67
67
  customerFacingMessage: "Error creating visual. Please try again."
68
68
  }
69
69
  ),
70
- children: /* @__PURE__ */ e(ee, { card: i, frame: l })
70
+ children: /* @__PURE__ */ e(ee, { card: n, frame: i })
71
71
  }
72
72
  ) });
73
73
  }
74
- function Te({
74
+ function we(a, t, n, i) {
75
+ k(() => {
76
+ a && !n && t && i(ae(t));
77
+ }, [a, n, t, i]);
78
+ }
79
+ function Re({
75
80
  name: a,
76
- items: s,
77
- value: i,
78
- onChange: l,
79
- isLoading: n,
81
+ items: t,
82
+ value: n,
83
+ onChange: i,
84
+ isLoading: o,
80
85
  isError: c,
81
86
  refetch: u,
82
- className: t,
83
- icon: o,
87
+ className: s,
88
+ icon: l,
84
89
  showNone: m = !1
85
90
  }) {
86
- const b = R.useRef(null), [v, g] = R.useState(!1), [y, A] = R.useState("100%"), x = m ? [...s || [], { id: "none", name: "None" }] : s;
91
+ const b = R.useRef(null), [v, g] = R.useState(!1), [y, A] = R.useState("100%"), x = m ? [...t || [], { id: "none", name: "None" }] : t;
87
92
  R.useLayoutEffect(() => {
88
93
  b.current && A(b.current.offsetWidth);
89
94
  }, []);
90
- function k() {
95
+ function M() {
91
96
  var h;
92
- return n ? "Loading..." : c ? "Error" : i ? (h = s == null ? void 0 : s.find((N) => N.id === i)) == null ? void 0 : h.name : `Select ${a}`;
97
+ return o ? "Loading..." : c ? "Error" : n ? (h = t == null ? void 0 : t.find((N) => N.id === n)) == null ? void 0 : h.name : `Select ${a}`;
93
98
  }
94
99
  function w(h, N) {
95
- l(N), g(!1);
100
+ i(N), g(!1);
96
101
  }
97
- return /* @__PURE__ */ r(ae, { open: v, onOpenChange: g, children: [
98
- /* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ r(
102
+ return /* @__PURE__ */ r(te, { open: v, onOpenChange: g, children: [
103
+ /* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ r(
99
104
  T,
100
105
  {
101
106
  ref: b,
102
107
  variant: "outline",
103
108
  role: "combobox",
104
109
  "aria-expanded": v,
105
- className: _("flex h-9 w-full justify-between", t),
110
+ className: _("flex h-9 w-full justify-between", s),
106
111
  children: [
107
112
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
108
- o && /* @__PURE__ */ e("div", { className: "mr-2", children: o }),
109
- /* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: k() })
113
+ l && /* @__PURE__ */ e("div", { className: "mr-2", children: l }),
114
+ /* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: M() })
110
115
  ] }),
111
- /* @__PURE__ */ e(se, { className: "size-4 opacity-50" })
116
+ /* @__PURE__ */ e(re, { className: "size-4 opacity-50" })
112
117
  ]
113
118
  }
114
119
  ) }),
115
120
  /* @__PURE__ */ e(
116
- re,
121
+ ne,
117
122
  {
118
123
  className: "w-full p-0",
119
124
  style: { minWidth: y },
120
- children: /* @__PURE__ */ r(ne, { children: [
125
+ children: /* @__PURE__ */ r(ie, { children: [
121
126
  /* @__PURE__ */ r("div", { className: "flex h-9 items-center justify-between border-b pr-1", children: [
122
- /* @__PURE__ */ e(ie, { className: "h-9", placeholder: "Search..." }),
123
- /* @__PURE__ */ e(V, { className: "h-7", onClick: u, children: /* @__PURE__ */ e(
124
- oe,
127
+ /* @__PURE__ */ e(oe, { className: "h-9", placeholder: "Search..." }),
128
+ /* @__PURE__ */ e(W, { className: "h-7", onClick: u, children: /* @__PURE__ */ e(
129
+ le,
125
130
  {
126
131
  className: _(
127
132
  "size-3.5 opacity-50",
128
- n && "animate-spin"
133
+ o && "animate-spin"
129
134
  )
130
135
  }
131
136
  ) })
132
137
  ] }),
133
- /* @__PURE__ */ r(le, { children: [
134
- /* @__PURE__ */ r(de, { children: [
138
+ /* @__PURE__ */ r(de, { children: [
139
+ /* @__PURE__ */ r(ce, { children: [
135
140
  "No ",
136
141
  a == null ? void 0 : a.toLowerCase(),
137
142
  " found."
138
143
  ] }),
139
- /* @__PURE__ */ e(ce, { children: x == null ? void 0 : x.map((h) => /* @__PURE__ */ e(
140
- ue,
144
+ /* @__PURE__ */ e(ue, { children: x == null ? void 0 : x.map((h) => /* @__PURE__ */ e(
145
+ me,
141
146
  {
142
147
  className: "overflow-x-auto",
143
148
  value: h.name,
144
149
  onSelect: (N) => w(N, h.id),
145
150
  children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
146
151
  /* @__PURE__ */ e(
147
- me,
152
+ he,
148
153
  {
149
154
  className: _(
150
155
  "size-4",
151
- i === h.id ? "opacity-100" : "opacity-0"
156
+ n === h.id ? "opacity-100" : "opacity-0"
152
157
  )
153
158
  }
154
159
  ),
@@ -163,60 +168,60 @@ function Te({
163
168
  )
164
169
  ] });
165
170
  }
166
- function we({
171
+ function Ie({
167
172
  triggerButtonClassName: a,
168
- variant: s = "ghost"
173
+ variant: t = "ghost"
169
174
  }) {
170
- const [i, l] = P(!1), n = F((u) => {
171
- var t;
172
- return (t = u.dashboard) == null ? void 0 : t.id;
173
- }), c = F((u) => {
174
- var t;
175
- return (t = u.dashboard) == null ? void 0 : t.title;
175
+ const [n, i] = P(!1), o = L((u) => {
176
+ var s;
177
+ return (s = u.dashboard) == null ? void 0 : s.id;
178
+ }), c = L((u) => {
179
+ var s;
180
+ return (s = u.dashboard) == null ? void 0 : s.title;
176
181
  });
177
- return n ? /* @__PURE__ */ r(xe, { children: [
182
+ return o ? /* @__PURE__ */ r(Ne, { children: [
178
183
  /* @__PURE__ */ e(
179
- V,
184
+ W,
180
185
  {
181
186
  tooltip: "Schedule Dashboard",
182
187
  className: _("h-7 p-2", a),
183
- buttonProps: { variant: s },
184
- onClick: () => l(!0),
185
- children: /* @__PURE__ */ e(he, { className: "size-4" })
188
+ buttonProps: { variant: t },
189
+ onClick: () => i(!0),
190
+ children: /* @__PURE__ */ e(pe, { className: "size-4" })
186
191
  }
187
192
  ),
188
193
  /* @__PURE__ */ e(
189
- pe,
194
+ fe,
190
195
  {
191
- open: i,
192
- onOpenChange: l,
193
- dashboardId: n,
196
+ open: n,
197
+ onOpenChange: i,
198
+ dashboardId: o,
194
199
  dashboardName: c
195
200
  }
196
201
  )
197
202
  ] }) : null;
198
203
  }
199
- function Re(a, s) {
200
- L(() => (a && s && (window.__SEMAPHOR_PRINT_STATE__ = {
201
- ...s
204
+ function _e(a, t) {
205
+ k(() => (a && t && (window.__SEMAPHOR_PRINT_STATE__ = {
206
+ ...t
202
207
  }), () => {
203
208
  a && window.__SEMAPHOR_PRINT_STATE__ && delete window.__SEMAPHOR_PRINT_STATE__;
204
- }), [a, s]);
209
+ }), [a, t]);
205
210
  }
206
211
  function I(a) {
207
212
  if (!a) return "--";
208
- const s = new Date(a);
209
- return Number.isNaN(s.getTime()) ? "--" : s.toLocaleString();
213
+ const t = new Date(a);
214
+ return Number.isNaN(t.getTime()) ? "--" : t.toLocaleString();
210
215
  }
211
- function ve(a) {
212
- var s;
213
- return ((s = a.alertState) == null ? void 0 : s.currentState) === "FIRING" ? "Signal surfaced" : a.status === "ACTIVE" ? "Watching" : a.status === "PAUSED" ? "Paused" : a.status;
216
+ function ye(a) {
217
+ var t;
218
+ return ((t = a.alertState) == null ? void 0 : t.currentState) === "FIRING" ? "Signal surfaced" : a.status === "ACTIVE" ? "Watching" : a.status === "PAUSED" ? "Paused" : a.status;
214
219
  }
215
- function Ie({ alertId: a, onBack: s }) {
220
+ function Pe({ alertId: a, onBack: t }) {
216
221
  var h, N, U, z;
217
- const { authToken: i, tokenProps: l } = j(), { data: n, isLoading: c, refetch: u } = fe(a), t = (n == null ? void 0 : n.alert) ?? null, [o, m] = P([]), [b, v] = P([]), [g, y] = P(null), A = M(async () => {
222
+ const { authToken: n, tokenProps: i } = j(), { data: o, isLoading: c, refetch: u } = be(a), s = (o == null ? void 0 : o.alert) ?? null, [l, m] = P([]), [b, v] = P([]), [g, y] = P(null), A = F(async () => {
218
223
  var f;
219
- const d = l == null ? void 0 : l.apiServiceUrl, p = i == null ? void 0 : i.accessToken;
224
+ const d = i == null ? void 0 : i.apiServiceUrl, p = n == null ? void 0 : n.accessToken;
220
225
  if (!d || !p || !a) return null;
221
226
  try {
222
227
  const S = await fetch(`${d}/v1/alerts/${a}/runs?limit=20`, {
@@ -231,8 +236,8 @@ function Ie({ alertId: a, onBack: s }) {
231
236
  return v([]), y(null), null;
232
237
  }
233
238
  return null;
234
- }, [a, i, g, l]), x = M(async (d) => {
235
- const p = l == null ? void 0 : l.apiServiceUrl, f = i == null ? void 0 : i.accessToken, S = d ?? g;
239
+ }, [a, n, g, i]), x = F(async (d) => {
240
+ const p = i == null ? void 0 : i.apiServiceUrl, f = n == null ? void 0 : n.accessToken, S = d ?? g;
236
241
  if (!p || !f || !a || !S) {
237
242
  m([]);
238
243
  return;
@@ -252,35 +257,35 @@ function Ie({ alertId: a, onBack: s }) {
252
257
  } catch {
253
258
  m([]);
254
259
  }
255
- }, [a, i, g, l]), k = M(async () => {
260
+ }, [a, n, g, i]), M = F(async () => {
256
261
  await u();
257
262
  const d = await A();
258
263
  await x(d);
259
264
  }, [x, A, u]);
260
- L(() => {
265
+ k(() => {
261
266
  A().catch(() => {
262
267
  });
263
- }, [A]), L(() => {
268
+ }, [A]), k(() => {
264
269
  x().catch(() => {
265
270
  });
266
271
  }, [x]);
267
- const w = W(() => {
272
+ const w = V(() => {
268
273
  const d = {};
269
- for (const p of o)
274
+ for (const p of l)
270
275
  d[p.channel] || (d[p.channel] = []), d[p.channel].push(p);
271
276
  return d;
272
- }, [o]);
273
- return c ? /* @__PURE__ */ e("div", { className: "p-4 text-sm text-muted-foreground", children: "Loading signal detail..." }) : t ? /* @__PURE__ */ r("div", { className: "space-y-4 p-4", children: [
277
+ }, [l]);
278
+ return c ? /* @__PURE__ */ e("div", { className: "p-4 text-sm text-muted-foreground", children: "Loading signal detail..." }) : s ? /* @__PURE__ */ r("div", { className: "space-y-4 p-4", children: [
274
279
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
275
280
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
276
- s && /* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: s, children: "Back" }),
277
- /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: t.name }),
278
- /* @__PURE__ */ e(E, { variant: t.status === "ACTIVE" ? "default" : "secondary", children: ve(t) }),
279
- ((h = t.alertState) == null ? void 0 : h.currentState) && /* @__PURE__ */ e(E, { variant: t.alertState.currentState === "FIRING" ? "destructive" : "outline", children: t.alertState.currentState === "FIRING" ? "Signal surfaced" : "Stable" })
281
+ t && /* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: t, children: "Back" }),
282
+ /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: s.name }),
283
+ /* @__PURE__ */ e(E, { variant: s.status === "ACTIVE" ? "default" : "secondary", children: ye(s) }),
284
+ ((h = s.alertState) == null ? void 0 : h.currentState) && /* @__PURE__ */ e(E, { variant: s.alertState.currentState === "FIRING" ? "destructive" : "outline", children: s.alertState.currentState === "FIRING" ? "Signal surfaced" : "Stable" })
280
285
  ] }),
281
- /* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: () => void k(), children: "Refresh" })
286
+ /* @__PURE__ */ e(T, { variant: "outline", size: "sm", onClick: () => void M(), children: "Refresh" })
282
287
  ] }),
283
- t.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: t.description }),
288
+ s.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: s.description }),
284
289
  /* @__PURE__ */ r("div", { className: "rounded-md border bg-muted/30 p-4 text-sm", children: [
285
290
  /* @__PURE__ */ e("p", { className: "font-medium", children: "What changed" }),
286
291
  /* @__PURE__ */ e("p", { className: "mt-1 text-muted-foreground", children: "Review the latest signal activity, then investigate the underlying dashboard context if you need more detail." })
@@ -291,28 +296,28 @@ function Ie({ alertId: a, onBack: s }) {
291
296
  /* @__PURE__ */ r("div", { children: [
292
297
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Watching for:" }),
293
298
  " ",
294
- be(t.jobConfig.operator, t.jobConfig.threshold)
299
+ ge(s.jobConfig.operator, s.jobConfig.threshold)
295
300
  ] }),
296
301
  /* @__PURE__ */ r("div", { children: [
297
302
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Severity:" }),
298
303
  " ",
299
- t.jobConfig.severity
304
+ s.jobConfig.severity
300
305
  ] }),
301
306
  /* @__PURE__ */ r("div", { children: [
302
307
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Last Evaluated:" }),
303
308
  " ",
304
- I((N = t.alertState) == null ? void 0 : N.lastEvaluatedAt)
309
+ I((N = s.alertState) == null ? void 0 : N.lastEvaluatedAt)
305
310
  ] }),
306
311
  /* @__PURE__ */ r("div", { children: [
307
312
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Last Surfaced:" }),
308
313
  " ",
309
- I((U = t.alertState) == null ? void 0 : U.lastTriggeredAt)
314
+ I((U = s.alertState) == null ? void 0 : U.lastTriggeredAt)
310
315
  ] })
311
316
  ] })
312
317
  ] }),
313
- ((z = t.deliveryConfig) == null ? void 0 : z.channels) && t.deliveryConfig.channels.length > 0 && /* @__PURE__ */ r("div", { className: "rounded-md border bg-background p-4 space-y-2", children: [
318
+ ((z = s.deliveryConfig) == null ? void 0 : z.channels) && s.deliveryConfig.channels.length > 0 && /* @__PURE__ */ r("div", { className: "rounded-md border bg-background p-4 space-y-2", children: [
314
319
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Where It Surfaces" }),
315
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: t.deliveryConfig.channels.map((d) => /* @__PURE__ */ e(E, { variant: "outline", children: d }, d)) })
320
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2", children: s.deliveryConfig.channels.map((d) => /* @__PURE__ */ e(E, { variant: "outline", children: d }, d)) })
316
321
  ] }),
317
322
  b.length > 0 && /* @__PURE__ */ r("div", { className: "rounded-md border bg-background p-4 space-y-3", children: [
318
323
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Recent Delivery Activity" }),
@@ -353,9 +358,9 @@ function Ie({ alertId: a, onBack: s }) {
353
358
  ] })
354
359
  ] }) : /* @__PURE__ */ e("div", { className: "p-4 text-sm text-muted-foreground", children: "Signal not found." });
355
360
  }
356
- function _e() {
361
+ function ke() {
357
362
  var c, u;
358
- const { quotasQuery: a, usageQuery: s } = ge(), i = ((c = a.data) == null ? void 0 : c.quotas) || [], l = ((u = s.data) == null ? void 0 : u.usage) || [], n = new Map(l.map((t) => [t.tenantId || "org", t]));
363
+ const { quotasQuery: a, usageQuery: t } = xe(), n = ((c = a.data) == null ? void 0 : c.quotas) || [], i = ((u = t.data) == null ? void 0 : u.usage) || [], o = new Map(i.map((s) => [s.tenantId || "org", s]));
359
364
  return /* @__PURE__ */ r("div", { className: "space-y-4 p-4", children: [
360
365
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
361
366
  /* @__PURE__ */ e("h2", { className: "text-xl font-semibold", children: "Alert Quotas" }),
@@ -365,13 +370,13 @@ function _e() {
365
370
  variant: "outline",
366
371
  size: "sm",
367
372
  onClick: () => {
368
- a.refetch(), s.refetch();
373
+ a.refetch(), t.refetch();
369
374
  },
370
375
  children: "Refresh"
371
376
  }
372
377
  )
373
378
  ] }),
374
- a.isLoading || s.isLoading ? /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Loading quota usage..." }) : null,
379
+ a.isLoading || t.isLoading ? /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Loading quota usage..." }) : null,
375
380
  /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-lg border", children: /* @__PURE__ */ r("table", { className: "w-full text-sm", children: [
376
381
  /* @__PURE__ */ e("thead", { className: "bg-muted/40", children: /* @__PURE__ */ r("tr", { children: [
377
382
  /* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Tenant" }),
@@ -380,158 +385,158 @@ function _e() {
380
385
  /* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Min Cadence" }),
381
386
  /* @__PURE__ */ e("th", { className: "px-3 py-2 text-left font-medium", children: "Max Context Sources" })
382
387
  ] }) }),
383
- /* @__PURE__ */ e("tbody", { children: i.map((t) => {
384
- const o = t.tenantId || "org", m = n.get(o);
388
+ /* @__PURE__ */ e("tbody", { children: n.map((s) => {
389
+ const l = s.tenantId || "org", m = o.get(l);
385
390
  return /* @__PURE__ */ r("tr", { className: "border-t", children: [
386
- /* @__PURE__ */ e("td", { className: "px-3 py-2", children: o }),
391
+ /* @__PURE__ */ e("td", { className: "px-3 py-2", children: l }),
387
392
  /* @__PURE__ */ e("td", { className: "px-3 py-2", children: (m == null ? void 0 : m.activeAlerts) ?? 0 }),
388
- /* @__PURE__ */ e("td", { className: "px-3 py-2", children: t.policy.maxActiveAlerts }),
393
+ /* @__PURE__ */ e("td", { className: "px-3 py-2", children: s.policy.maxActiveAlerts }),
389
394
  /* @__PURE__ */ r("td", { className: "px-3 py-2", children: [
390
- t.policy.minCadenceMinutes,
395
+ s.policy.minCadenceMinutes,
391
396
  " min"
392
397
  ] }),
393
- /* @__PURE__ */ e("td", { className: "px-3 py-2", children: t.policy.maxContextSources })
394
- ] }, o);
398
+ /* @__PURE__ */ e("td", { className: "px-3 py-2", children: s.policy.maxContextSources })
399
+ ] }, l);
395
400
  }) })
396
401
  ] }) })
397
402
  ] });
398
403
  }
399
404
  export {
400
- Qt as AdvancedModeToggle,
401
- Ie as AlertDetailPageEmbedded,
402
- Me as AlertManagementPage,
403
- Fe as AlertWizardDialog,
404
- Le as AlertsApiError,
405
- Ue as CALCULATED_FIELD_ENTITY_MARKER,
406
- It as CONTROL_CARD_DEFAULT_VALUE,
407
- Ft as CalendarPreferencesDialog,
408
- ze as CardAlertIndicator,
409
- Be as CardSummary,
410
- Te as Combobox,
411
- Oe as DATE_FORMAT_VALUES,
412
- _t as DEFAULT_CALENDAR_CONTEXT,
413
- Pt as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
414
- je as Dashboard,
405
+ Wt as AdvancedModeToggle,
406
+ Pe as AlertDetailPageEmbedded,
407
+ Le as AlertManagementPage,
408
+ Ue as AlertWizardDialog,
409
+ ze as AlertsApiError,
410
+ Be as CALCULATED_FIELD_ENTITY_MARKER,
411
+ _t as CONTROL_CARD_DEFAULT_VALUE,
412
+ Lt as CalendarPreferencesDialog,
413
+ Oe as CardAlertIndicator,
414
+ je as CardSummary,
415
+ Re as Combobox,
416
+ Qe as DATE_FORMAT_VALUES,
417
+ Pt as DEFAULT_CALENDAR_CONTEXT,
418
+ kt as DEFAULT_SEMANTIC_DOMAIN_ACCESS,
419
+ We as Dashboard,
415
420
  Vt as DashboardControlsSettings,
416
- Qe as DashboardExportDialog,
417
- Wt as DashboardFilterControlsButton,
418
- Lt as DashboardSummarySettingsDialog,
419
- Ve as DashboardWC,
420
- kt as EMPTY_SELECTION,
421
- pe as EmailScheduleDialog,
422
- We as ExportError,
423
- $t as ExportNotificationItem,
424
- qt as ExportNotificationList,
425
- Ht as NotificationBell,
426
- $e as PivotMarkerEnum,
427
- zt as ResourceManagementPanel,
428
- qe as ResourceType,
429
- we as ScheduleDashboard,
421
+ Ve as DashboardExportDialog,
422
+ $t as DashboardFilterControlsButton,
423
+ Ut as DashboardSummarySettingsDialog,
424
+ $e as DashboardWC,
425
+ Mt as EMPTY_SELECTION,
426
+ fe as EmailScheduleDialog,
427
+ qe as ExportError,
428
+ qt as ExportNotificationItem,
429
+ Ht as ExportNotificationList,
430
+ Gt as NotificationBell,
431
+ He as PivotMarkerEnum,
432
+ Bt as ResourceManagementPanel,
433
+ Ge as ResourceType,
434
+ Ie as ScheduleDashboard,
430
435
  K as SemaphorContextProvider,
431
- He as SemaphorDataProvider,
432
- Ge as SemaphorQueryClient,
433
- Ke as ShareDialog,
434
- Ye as SummaryCard,
435
- Xe as Surfboard,
436
- _e as TenantQuotaPage,
437
- Gt as UnsavedChangesAlert,
438
- Ee as Visual,
439
- Kt as VisualEditingControls,
436
+ Ke as SemaphorDataProvider,
437
+ Xe as SemaphorQueryClient,
438
+ Ye as ShareDialog,
439
+ Je as SummaryCard,
440
+ Ze as Surfboard,
441
+ ke as TenantQuotaPage,
442
+ Kt as UnsavedChangesAlert,
443
+ Te as Visual,
444
+ Xt as VisualEditingControls,
440
445
  H as backtestAlert,
441
- Je as cancelExport,
442
- Ze as cloneDeep,
443
- ea as createAlert,
444
- aa as createEmptyKpiConfig,
445
- ta as createExport,
446
- sa as createSqlGenConfig,
447
- ra as deleteAlert,
448
- na as downloadPdf,
449
- ia as emitDashboardLoad,
450
- oa as emitDashboardUnload,
451
- la as fmt,
452
- da as formatFileSize,
453
- ca as getAlert,
454
- ua as getAlertContextSources,
455
- ma as getAlertHistory,
456
- ha as getAlertQuotaUsage,
457
- pa as getAlertRunDeliveries,
458
- fa as getAlertRunSteps,
459
- ba as getAlertRuns,
460
- ga as getAlertState,
461
- xa as getColumnDataType,
462
- Na as getDownloadUrl,
463
- va as getExportStatus,
464
- ya as getExports,
465
- Aa as getFilterValueType,
466
- Ca as getFormattedTableNameForQuery,
467
- Sa as getQualifiedTableName,
468
- Da as getSql,
469
- Ea as invalidateToken,
470
- Ta as isBooleanDataType,
471
- wa as isCalculatedDimension,
472
- Ra as isCalculatedField,
473
- Ia as isCalculatedMetric,
474
- _a as isColumnInSqlGen,
475
- Pa as isDateDataType,
476
- ka as isExportComplete,
477
- Ma as isExportInProgress,
478
- Fa as isNumberDataType,
479
- La as isTextDataType,
480
- Ua as listAlertQuotas,
481
- za as listAlerts,
446
+ ea as cancelExport,
447
+ ae as cloneDeep,
448
+ aa as createAlert,
449
+ ta as createEmptyKpiConfig,
450
+ sa as createExport,
451
+ ra as createSqlGenConfig,
452
+ na as deleteAlert,
453
+ ia as downloadPdf,
454
+ oa as emitDashboardLoad,
455
+ la as emitDashboardUnload,
456
+ da as fmt,
457
+ ca as formatFileSize,
458
+ ua as getAlert,
459
+ ma as getAlertContextSources,
460
+ ha as getAlertHistory,
461
+ pa as getAlertQuotaUsage,
462
+ fa as getAlertRunDeliveries,
463
+ ba as getAlertRunSteps,
464
+ ga as getAlertRuns,
465
+ xa as getAlertState,
466
+ Na as getColumnDataType,
467
+ va as getDownloadUrl,
468
+ ya as getExportStatus,
469
+ Aa as getExports,
470
+ Ca as getFilterValueType,
471
+ Sa as getFormattedTableNameForQuery,
472
+ Da as getQualifiedTableName,
473
+ Ea as getSql,
474
+ Ta as invalidateToken,
475
+ wa as isBooleanDataType,
476
+ Ra as isCalculatedDimension,
477
+ Ia as isCalculatedField,
478
+ _a as isCalculatedMetric,
479
+ Pa as isColumnInSqlGen,
480
+ ka as isDateDataType,
481
+ Ma as isExportComplete,
482
+ Fa as isExportInProgress,
483
+ La as isNumberDataType,
484
+ Ua as isTextDataType,
485
+ za as listAlertQuotas,
486
+ Ba as listAlerts,
482
487
  es as normalizeDashboardForDirtyCheck,
483
- Ba as previewAlertDeliverable,
484
- Oa as resolveDataType,
485
- ja as resolveDatamodelName,
488
+ Oa as previewAlertDeliverable,
489
+ ja as resolveDataType,
490
+ Qa as resolveDatamodelName,
486
491
  as as serializeDashboardForDirtyCheck,
487
- Qa as triggerAlertNow,
492
+ Wa as triggerAlertNow,
488
493
  Va as updateAlert,
489
- Wa as updateAlertContextSources,
490
- $a as updateAlertQuota,
491
- qa as useActiveExports,
492
- Ha as useAddNewFrame,
493
- Ga as useAlertActions,
494
- De as useAlertBacktest,
495
- Ka as useAlertDeliveries,
496
- fe as useAlertDetail,
494
+ $a as updateAlertContextSources,
495
+ qa as updateAlertQuota,
496
+ Ha as useActiveExports,
497
+ Ga as useAddNewFrame,
498
+ Ka as useAlertActions,
499
+ Ee as useAlertBacktest,
500
+ Xa as useAlertDeliveries,
501
+ be as useAlertDetail,
497
502
  Ya as useAlertDraft,
498
- Xa as useAlertFilters,
499
- Ja as useAlertHistory,
500
- ge as useAlertQuotas,
501
- Za as useAlertRuns,
502
- et as useAlertState,
503
- at as useAlertStore,
504
- tt as useAlertWizard,
505
- st as useAlerts,
506
- rt as useAlertsBootstrap,
507
- nt as useAlertsById,
508
- it as useAlertsForCard,
509
- ot as useCard,
510
- lt as useCardAlertMap,
511
- dt as useCardSummary,
512
- ct as useCurrentActiveCard,
513
- ut as useCurrentCardConfig,
514
- mt as useCurrentSheetActiveCards,
515
- ht as useDashboardActions,
516
- pt as useDashboardById,
517
- ft as useDashboardQuery,
518
- F as useDashboardStore,
519
- bt as useDashboardSummary,
520
- gt as useDataColumns,
521
- xt as useDateFilterHook,
522
- Ot as useDebouncedDirtyCheck,
523
- Nt as useEditorActions,
524
- vt as useEditorAside,
525
- yt as useEditorStore,
526
- At as useExportActions,
503
+ Ja as useAlertFilters,
504
+ Za as useAlertHistory,
505
+ xe as useAlertQuotas,
506
+ et as useAlertRuns,
507
+ at as useAlertState,
508
+ tt as useAlertStore,
509
+ st as useAlertWizard,
510
+ rt as useAlerts,
511
+ nt as useAlertsBootstrap,
512
+ it as useAlertsById,
513
+ ot as useAlertsForCard,
514
+ lt as useCard,
515
+ dt as useCardAlertMap,
516
+ ct as useCardSummary,
517
+ ut as useCurrentActiveCard,
518
+ mt as useCurrentCardConfig,
519
+ ht as useCurrentSheetActiveCards,
520
+ pt as useDashboardActions,
521
+ ft as useDashboardById,
522
+ bt as useDashboardQuery,
523
+ L as useDashboardStore,
524
+ gt as useDashboardSummary,
525
+ xt as useDataColumns,
526
+ Nt as useDateFilterHook,
527
+ jt as useDebouncedDirtyCheck,
528
+ vt as useEditorActions,
529
+ yt as useEditorAside,
530
+ At as useEditorStore,
531
+ Ct as useExportActions,
527
532
  Yt as useExportPolling,
528
- Xt as useExportRecovery,
529
- Ct as useExportStore,
530
- Re as useExposePrintState,
531
- St as useInProgressExportsCount,
532
- Dt as useManagementStore,
533
- Jt as usePristineSnapshotInitializer,
534
- Et as useResourceManagement,
535
- Tt as useSelectedAlertId,
536
- wt as useTextFilterHook
533
+ Jt as useExportRecovery,
534
+ St as useExportStore,
535
+ _e as useExposePrintState,
536
+ Dt as useInProgressExportsCount,
537
+ Et as useManagementStore,
538
+ we as usePristineSnapshotInitializer,
539
+ Tt as useResourceManagement,
540
+ wt as useSelectedAlertId,
541
+ Rt as useTextFilterHook
537
542
  };