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