react-semaphor 0.1.293 → 0.1.295
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/{braces-BwW2HFlB.js → braces-BdoTYzuj.js} +1 -1
- package/dist/chunks/{braces-C7GP95Fp.js → braces-DWldEFn5.js} +1 -1
- package/dist/chunks/{dashboard-controls-DgUc38Tn.js → dashboard-controls-B3lrnI_r.js} +9 -9
- package/dist/chunks/{dashboard-controls-jrkoCSY_.js → dashboard-controls-D7U6E1sB.js} +504 -472
- package/dist/chunks/dashboard-filter-controls-button-D0AsV28-.js +11 -0
- package/dist/chunks/dashboard-filter-controls-button-XwenlcXw.js +1152 -0
- package/dist/chunks/{dashboard-json-COjT-zjQ.js → dashboard-json-CU55qPXj.js} +1 -1
- package/dist/chunks/{dashboard-json-C0NiRL-A.js → dashboard-json-V6m6lJ_c.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CGuFl7Xe.js → dashboard-summary-settings-dialog-0CIiWsKc.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CXqaN_zj.js → dashboard-summary-settings-dialog-DRLPzp1P.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-ppdXk86H.js → edit-dashboard-visual-8ha6EM_g.js} +2205 -2147
- package/dist/chunks/edit-dashboard-visual-sSLAkmgf.js +183 -0
- package/dist/chunks/{index-9z-jMqN8.js → index-14M0TnH6.js} +35272 -33064
- package/dist/chunks/index-Ze8VskG1.js +1435 -0
- package/dist/chunks/{resource-management-panel-CP8cegZP.js → resource-management-panel-BL5-5ouC.js} +64 -64
- package/dist/chunks/{resource-management-panel-os6AuEKT.js → resource-management-panel-CcDAn86l.js} +1 -1
- package/dist/chunks/use-create-flow-overlay-state-BbQVNDCj.js +21 -0
- package/dist/chunks/{use-create-flow-overlay-state-wpuqRZX5.js → use-create-flow-overlay-state-D3PxfjYv.js} +430 -425
- package/dist/chunks/use-visual-utils-CdIOq4nt.js +337 -0
- package/dist/chunks/use-visual-utils-kh8p2QFm.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +258 -253
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/dashboard.d.ts +65 -0
- package/dist/types/main.d.ts +79 -4
- package/dist/types/shared.d.ts +40 -0
- package/dist/types/surfboard.d.ts +65 -0
- package/dist/types/types.d.ts +65 -0
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-controls-button-B19UWmsK.js +0 -11
- package/dist/chunks/dashboard-filter-controls-button-DGH4DxJ8.js +0 -1109
- package/dist/chunks/edit-dashboard-visual-CDOz4LWO.js +0 -183
- package/dist/chunks/index-K25f5Rqr.js +0 -1435
- package/dist/chunks/use-create-flow-overlay-state-CecnMS_v.js +0 -21
- package/dist/chunks/use-visual-utils-BTfG-ppd.js +0 -1
- package/dist/chunks/use-visual-utils-BhRKGJql.js +0 -334
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c, Fragment as O } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as Y, ds as Ys, u as S, B as E, dt as ma, Q as Za, d as q, e as ha, du as Zs, cw as aa, f as pa, g as fa, h as ga, i as es, L as sa, I as ce, w as et, dv as ie, cN as Ie, dw as at, dx as Ha, dy as as, b as J, dz as ss, dA as st, d2 as va, dB as tt, dC as nt, dD as rt, dE as ot, dF as it, dG as ct, J as Te, Z as _e, y as I, dH as Ue, dI as ts, dJ as ns, db as lt, dK as dt, x as X, dL as ut, dM as mt, dN as ta, dO as ht, dP as pt, dQ as rs, dR as os, dS as Oe, dT as Pe, d7 as na, cS as ra, dU as oa, cM as ba, ck as is, dV as ia, cf as cs, dW as ft, cV as ls, cW as ds, cX as us, cY as ms, cZ as hs, c_ as ps, c$ as fs, d0 as ca, dX as gs, cE as gt, dY as vt, aj as bt, W as ja, ai as Le, dZ as yt, ap as xt, ak as We, d_ as St, d$ as Nt, e0 as Dt, aD as wt, e1 as Ct, aa as Je, e2 as Et, bU as Mt, bV as At, bW as Lt, e3 as kt, bX as It, e4 as Ot, dr as Pt, e5 as Tt, cF as _t, cG as Ut, cH as Rt, cI as Ft, cJ as V, dh as Gt, ac as $t, cP as zt, e6 as Vt, cK as qt, av as Ht, e7 as jt, e8 as Bt, e9 as Kt, ao as Qt, ad as Wt, ea as Jt, a8 as la, eb as Xt } from "./index-14M0TnH6.js";
|
|
3
3
|
import * as M from "react";
|
|
4
|
-
import
|
|
4
|
+
import vs, { useState as x, useMemo as B, useCallback as Ba, useEffect as Xe } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { b as
|
|
7
|
-
import { l as
|
|
8
|
-
import { C as
|
|
9
|
-
import { u as
|
|
10
|
-
import { s as
|
|
11
|
-
import { S as
|
|
12
|
-
import { B as
|
|
6
|
+
import { b as Yt, u as Zt, A as en, V as an, c as sn, D as tn, N as nn, U as rn } from "./dashboard-filter-controls-button-XwenlcXw.js";
|
|
7
|
+
import { l as on } from "./date-formatter-vkCj9Ct-.js";
|
|
8
|
+
import { C as cn, D as ln } from "./dashboard-summary-settings-dialog-0CIiWsKc.js";
|
|
9
|
+
import { u as dn } from "./use-debounced-dirty-check-BwAbnX_5.js";
|
|
10
|
+
import { s as Ye } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
11
|
+
import { S as Ka } from "./use-create-flow-overlay-state-D3PxfjYv.js";
|
|
12
|
+
import { B as un } from "./braces-BdoTYzuj.js";
|
|
13
13
|
/**
|
|
14
14
|
* @license lucide-react v0.453.0 - ISC
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the ISC license.
|
|
17
17
|
* See the LICENSE file in the root directory of this source tree.
|
|
18
18
|
*/
|
|
19
|
-
const
|
|
19
|
+
const mn = Y("Glasses", [
|
|
20
20
|
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
|
|
21
21
|
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
|
|
22
22
|
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
|
|
@@ -29,7 +29,7 @@ const dn = X("Glasses", [
|
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
31
|
*/
|
|
32
|
-
const
|
|
32
|
+
const hn = Y("Menu", [
|
|
33
33
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
|
|
34
34
|
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
|
|
35
35
|
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
|
|
@@ -40,7 +40,7 @@ const un = X("Menu", [
|
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
42
|
*/
|
|
43
|
-
const
|
|
43
|
+
const pn = Y("Monitor", [
|
|
44
44
|
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
45
45
|
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
46
46
|
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
@@ -51,7 +51,7 @@ const mn = X("Monitor", [
|
|
|
51
51
|
* This source code is licensed under the ISC license.
|
|
52
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
53
|
*/
|
|
54
|
-
const
|
|
54
|
+
const fn = Y("Moon", [
|
|
55
55
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
56
56
|
]);
|
|
57
57
|
/**
|
|
@@ -60,7 +60,7 @@ const hn = X("Moon", [
|
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
62
|
*/
|
|
63
|
-
const
|
|
63
|
+
const gn = Y("ShieldX", [
|
|
64
64
|
[
|
|
65
65
|
"path",
|
|
66
66
|
{
|
|
@@ -77,7 +77,7 @@ const pn = X("ShieldX", [
|
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
79
|
*/
|
|
80
|
-
const
|
|
80
|
+
const vn = Y("Sun", [
|
|
81
81
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
82
82
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
83
83
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -88,7 +88,7 @@ const fn = X("Sun", [
|
|
|
88
88
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
89
89
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
90
90
|
]);
|
|
91
|
-
var
|
|
91
|
+
var da = { exports: {} }, Ze = {};
|
|
92
92
|
/**
|
|
93
93
|
* @license React
|
|
94
94
|
* use-sync-external-store-shim.production.js
|
|
@@ -98,11 +98,11 @@ var oa = { exports: {} }, Je = {};
|
|
|
98
98
|
* This source code is licensed under the MIT license found in the
|
|
99
99
|
* LICENSE file in the root directory of this source tree.
|
|
100
100
|
*/
|
|
101
|
-
var
|
|
102
|
-
function
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
var a =
|
|
101
|
+
var Qa;
|
|
102
|
+
function bn() {
|
|
103
|
+
if (Qa) return Ze;
|
|
104
|
+
Qa = 1;
|
|
105
|
+
var a = vs;
|
|
106
106
|
function n(u, r) {
|
|
107
107
|
return u === r && (u !== 0 || 1 / u === 1 / r) || u !== u && r !== r;
|
|
108
108
|
}
|
|
@@ -137,9 +137,9 @@ function gn() {
|
|
|
137
137
|
return r();
|
|
138
138
|
}
|
|
139
139
|
var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : m;
|
|
140
|
-
return
|
|
140
|
+
return Ze.useSyncExternalStore = a.useSyncExternalStore !== void 0 ? a.useSyncExternalStore : d, Ze;
|
|
141
141
|
}
|
|
142
|
-
var
|
|
142
|
+
var ea = {};
|
|
143
143
|
/**
|
|
144
144
|
* @license React
|
|
145
145
|
* use-sync-external-store-shim.development.js
|
|
@@ -149,9 +149,9 @@ var Ye = {};
|
|
|
149
149
|
* This source code is licensed under the MIT license found in the
|
|
150
150
|
* LICENSE file in the root directory of this source tree.
|
|
151
151
|
*/
|
|
152
|
-
var
|
|
153
|
-
function
|
|
154
|
-
return
|
|
152
|
+
var Wa;
|
|
153
|
+
function yn() {
|
|
154
|
+
return Wa || (Wa = 1, process.env.NODE_ENV !== "production" && function() {
|
|
155
155
|
function a(p, g) {
|
|
156
156
|
return p === g && (p !== 0 || 1 / p === 1 / g) || p !== p && g !== g;
|
|
157
157
|
}
|
|
@@ -198,22 +198,22 @@ function vn() {
|
|
|
198
198
|
return g();
|
|
199
199
|
}
|
|
200
200
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
201
|
-
var i =
|
|
202
|
-
|
|
203
|
-
}()),
|
|
201
|
+
var i = vs, l = typeof Object.is == "function" ? Object.is : a, h = i.useState, m = i.useEffect, f = i.useLayoutEffect, v = i.useDebugValue, d = !1, u = !1, r = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? s : n;
|
|
202
|
+
ea.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : r, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
203
|
+
}()), ea;
|
|
204
204
|
}
|
|
205
|
-
process.env.NODE_ENV === "production" ?
|
|
206
|
-
var
|
|
207
|
-
const
|
|
208
|
-
function
|
|
209
|
-
const { theme: a, setTheme: n } =
|
|
205
|
+
process.env.NODE_ENV === "production" ? da.exports = bn() : da.exports = yn();
|
|
206
|
+
var xn = da.exports;
|
|
207
|
+
const ke = ["light", "dark", "system"];
|
|
208
|
+
function Sn() {
|
|
209
|
+
const { theme: a, setTheme: n } = Ys(), t = S(
|
|
210
210
|
(h) => h.actions.setDashboardTheme
|
|
211
211
|
);
|
|
212
212
|
function s() {
|
|
213
|
-
const h =
|
|
213
|
+
const h = ke.includes(a) ? a : "system", m = ke[(ke.indexOf(h) + 1) % ke.length];
|
|
214
214
|
n(m), t(m);
|
|
215
215
|
}
|
|
216
|
-
const i = a === "light" ?
|
|
216
|
+
const i = a === "light" ? vn : a === "dark" ? fn : pn, l = a === "light" ? "Theme: light (click for dark)" : a === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
|
|
217
217
|
return /* @__PURE__ */ e(
|
|
218
218
|
E,
|
|
219
219
|
{
|
|
@@ -228,22 +228,22 @@ function yn() {
|
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
230
|
}
|
|
231
|
-
async function
|
|
231
|
+
async function Nn(a, n, t, s, i) {
|
|
232
232
|
if (!i)
|
|
233
233
|
return null;
|
|
234
234
|
const l = JSON.stringify(t), h = `${a}/v1/lens`;
|
|
235
|
-
return await
|
|
235
|
+
return await ma(h, i, {
|
|
236
236
|
name: n,
|
|
237
237
|
template: l,
|
|
238
238
|
filterValues: s,
|
|
239
239
|
operation: "create"
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
|
-
async function
|
|
242
|
+
async function ua(a, n, t) {
|
|
243
243
|
if (!t)
|
|
244
244
|
return null;
|
|
245
245
|
const { id: s, template: i, filterValues: l, isDefault: h, shared: m } = n, f = `${a}/v1/lens`;
|
|
246
|
-
return await
|
|
246
|
+
return await ma(f, t, {
|
|
247
247
|
lensId: s,
|
|
248
248
|
template: i,
|
|
249
249
|
filterValues: l,
|
|
@@ -252,27 +252,27 @@ async function ia(a, n, t) {
|
|
|
252
252
|
operation: "update"
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
|
-
async function
|
|
255
|
+
async function Dn(a, n, t) {
|
|
256
256
|
if (!t)
|
|
257
257
|
return null;
|
|
258
258
|
const s = `${a}/v1/lens`;
|
|
259
|
-
return await
|
|
259
|
+
return await ma(s, t, {
|
|
260
260
|
operation: "delete",
|
|
261
261
|
lensId: n
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
|
-
const
|
|
265
|
-
function
|
|
264
|
+
const wn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
265
|
+
function Cn({
|
|
266
266
|
open: a,
|
|
267
267
|
onOpenChange: n
|
|
268
268
|
} = {}) {
|
|
269
|
-
const [t, s] = x(""), [i, l] = x(!1), h = S((D) => D.lenses), { setLenses: m, setSelectedLensId: f } =
|
|
269
|
+
const [t, s] = x(""), [i, l] = x(!1), h = S((D) => D.lenses), { setLenses: m, setSelectedLensId: f } = Za(), [v, d] = x(!1), [u, r] = x(!1), p = a !== void 0, g = p ? a : u, y = (D) => {
|
|
270
270
|
p || r(D), n == null || n(D);
|
|
271
|
-
}, N = S((D) => D.dashboard), C = S((D) => D.filterValues), { authToken: A, tokenProps:
|
|
272
|
-
async function
|
|
271
|
+
}, N = S((D) => D.dashboard), C = S((D) => D.filterValues), { authToken: A, tokenProps: F } = q();
|
|
272
|
+
async function P() {
|
|
273
273
|
d(!0);
|
|
274
|
-
const D = await
|
|
275
|
-
|
|
274
|
+
const D = await Nn(
|
|
275
|
+
F.apiServiceUrl,
|
|
276
276
|
t,
|
|
277
277
|
N,
|
|
278
278
|
C,
|
|
@@ -280,18 +280,18 @@ function Dn({
|
|
|
280
280
|
);
|
|
281
281
|
D && (m([...h || [], D]), f(D.id), y(!1)), d(!1);
|
|
282
282
|
}
|
|
283
|
-
return /* @__PURE__ */ c(
|
|
284
|
-
p ? null : /* @__PURE__ */ e(
|
|
285
|
-
/* @__PURE__ */ e(
|
|
283
|
+
return /* @__PURE__ */ c(ha, { open: g, onOpenChange: y, children: [
|
|
284
|
+
p ? null : /* @__PURE__ */ e(Zs, { asChild: !0, children: /* @__PURE__ */ c(E, { variant: "secondary", size: "xs", children: [
|
|
285
|
+
/* @__PURE__ */ e(aa, { className: "h-3.5 w-3.5" }),
|
|
286
286
|
"Lens"
|
|
287
287
|
] }) }),
|
|
288
|
-
/* @__PURE__ */ c(
|
|
289
|
-
/* @__PURE__ */ c(
|
|
290
|
-
/* @__PURE__ */ e(
|
|
291
|
-
/* @__PURE__ */ e(
|
|
288
|
+
/* @__PURE__ */ c(pa, { className: "rounded-[6px] border-border/60 sm:max-w-[420px] sm:rounded-[6px]", children: [
|
|
289
|
+
/* @__PURE__ */ c(fa, { children: [
|
|
290
|
+
/* @__PURE__ */ e(ga, { className: "text-[15px]", children: "Create lens" }),
|
|
291
|
+
/* @__PURE__ */ e(es, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
|
|
292
292
|
] }),
|
|
293
293
|
/* @__PURE__ */ c("div", { className: "space-y-1.5 py-1", children: [
|
|
294
|
-
/* @__PURE__ */ e(
|
|
294
|
+
/* @__PURE__ */ e(sa, { htmlFor: "lens-name", className: wn, children: "Name" }),
|
|
295
295
|
/* @__PURE__ */ e(
|
|
296
296
|
ce,
|
|
297
297
|
{
|
|
@@ -304,14 +304,14 @@ function Dn({
|
|
|
304
304
|
),
|
|
305
305
|
i && /* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "A lens with this name already exists. Pick a different one." })
|
|
306
306
|
] }),
|
|
307
|
-
/* @__PURE__ */ c(
|
|
307
|
+
/* @__PURE__ */ c(et, { children: [
|
|
308
308
|
/* @__PURE__ */ e(E, { variant: "outline", size: "xs", onClick: () => y(!1), children: "Cancel" }),
|
|
309
309
|
/* @__PURE__ */ e(
|
|
310
310
|
E,
|
|
311
311
|
{
|
|
312
312
|
size: "xs",
|
|
313
313
|
type: "submit",
|
|
314
|
-
onClick:
|
|
314
|
+
onClick: P,
|
|
315
315
|
disabled: v || !t.trim(),
|
|
316
316
|
children: v ? "Creating…" : "Create"
|
|
317
317
|
}
|
|
@@ -320,13 +320,13 @@ function Dn({
|
|
|
320
320
|
] })
|
|
321
321
|
] });
|
|
322
322
|
}
|
|
323
|
-
function
|
|
324
|
-
const n = S((d) => d.lenses), t = S((d) => d.selectedLensId), { setLenses: s, setSelectedLensId: i } =
|
|
323
|
+
function En({ includeLabel: a = !1 } = {}) {
|
|
324
|
+
const n = S((d) => d.lenses), t = S((d) => d.selectedLensId), { setLenses: s, setSelectedLensId: i } = Za(), { authToken: l, tokenProps: h } = q();
|
|
325
325
|
async function m(d) {
|
|
326
326
|
i(d);
|
|
327
327
|
}
|
|
328
328
|
async function f(d) {
|
|
329
|
-
if (await
|
|
329
|
+
if (await Dn(h.apiServiceUrl, d, l == null ? void 0 : l.accessToken)) {
|
|
330
330
|
const r = n == null ? void 0 : n.filter((p) => p.id !== d);
|
|
331
331
|
s(r || []), i("original");
|
|
332
332
|
}
|
|
@@ -344,30 +344,30 @@ function wn({ includeLabel: a = !1 } = {}) {
|
|
|
344
344
|
...d,
|
|
345
345
|
isDefault: !d.isDefault
|
|
346
346
|
};
|
|
347
|
-
await
|
|
347
|
+
await ua(h.apiServiceUrl, r, l == null ? void 0 : l.accessToken);
|
|
348
348
|
const p = n == null ? void 0 : n.find((g) => g.isDefault);
|
|
349
349
|
if (p && p.id !== d.id) {
|
|
350
350
|
const g = {
|
|
351
351
|
...p,
|
|
352
352
|
isDefault: !1
|
|
353
353
|
};
|
|
354
|
-
await
|
|
354
|
+
await ua(h.apiServiceUrl, g, l == null ? void 0 : l.accessToken);
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
return /* @__PURE__ */ c(O, { children: [
|
|
358
358
|
a ? /* @__PURE__ */ c(O, { children: [
|
|
359
359
|
/* @__PURE__ */ e(ie, { className: "px-3", children: "Lenses" }),
|
|
360
|
-
/* @__PURE__ */ e(
|
|
360
|
+
/* @__PURE__ */ e(Ie, {})
|
|
361
361
|
] }) : null,
|
|
362
362
|
/* @__PURE__ */ c(
|
|
363
|
-
|
|
363
|
+
at,
|
|
364
364
|
{
|
|
365
365
|
value: t,
|
|
366
366
|
onValueChange: m,
|
|
367
367
|
children: [
|
|
368
|
-
/* @__PURE__ */ e(
|
|
368
|
+
/* @__PURE__ */ e(Ha, { value: "original", children: "Original" }),
|
|
369
369
|
n == null ? void 0 : n.map((d) => /* @__PURE__ */ c(
|
|
370
|
-
|
|
370
|
+
Ha,
|
|
371
371
|
{
|
|
372
372
|
className: "group flex justify-between gap-2",
|
|
373
373
|
value: d.id,
|
|
@@ -375,7 +375,7 @@ function wn({ includeLabel: a = !1 } = {}) {
|
|
|
375
375
|
/* @__PURE__ */ e("p", { children: d.name }),
|
|
376
376
|
/* @__PURE__ */ c("span", { className: "flex items-center gap-3", children: [
|
|
377
377
|
/* @__PURE__ */ e(
|
|
378
|
-
|
|
378
|
+
as,
|
|
379
379
|
{
|
|
380
380
|
onClick: (u) => {
|
|
381
381
|
u.preventDefault(), v(d);
|
|
@@ -391,7 +391,7 @@ function wn({ includeLabel: a = !1 } = {}) {
|
|
|
391
391
|
}
|
|
392
392
|
),
|
|
393
393
|
/* @__PURE__ */ e(
|
|
394
|
-
|
|
394
|
+
ss,
|
|
395
395
|
{
|
|
396
396
|
onClick: (u) => {
|
|
397
397
|
u.preventDefault(), f(d.id);
|
|
@@ -410,19 +410,19 @@ function wn({ includeLabel: a = !1 } = {}) {
|
|
|
410
410
|
)
|
|
411
411
|
] });
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
const { displayPreferences: a, shouldShowElement: n } =
|
|
415
|
-
() =>
|
|
413
|
+
function Mn() {
|
|
414
|
+
const { displayPreferences: a, shouldShowElement: n } = st(), { currentUser: t, userContext: s } = va(), i = B(
|
|
415
|
+
() => tt(t),
|
|
416
416
|
[t]
|
|
417
|
-
), l =
|
|
417
|
+
), l = B(() => (m) => i && i[m] !== void 0 && i[m] === !1 ? !1 : n(m), [i, n, a]), h = B(
|
|
418
418
|
() => {
|
|
419
419
|
var m, f, v, d, u;
|
|
420
420
|
return {
|
|
421
|
-
canEdit: ((m = s == null ? void 0 : s.permissions) == null ? void 0 : m.canEdit) ??
|
|
422
|
-
canUseFilters: ((f = s == null ? void 0 : s.permissions) == null ? void 0 : f.canEdit) ??
|
|
423
|
-
canManageDashboards: ((v = s == null ? void 0 : s.permissions) == null ? void 0 : v.canCreateDashboard) ??
|
|
424
|
-
canCreateDashboards: ((d = s == null ? void 0 : s.permissions) == null ? void 0 : d.canCreateDashboard) ??
|
|
425
|
-
canAccessVisuals: ((u = s == null ? void 0 : s.permissions) == null ? void 0 : u.canEdit) ??
|
|
421
|
+
canEdit: ((m = s == null ? void 0 : s.permissions) == null ? void 0 : m.canEdit) ?? ct(t),
|
|
422
|
+
canUseFilters: ((f = s == null ? void 0 : s.permissions) == null ? void 0 : f.canEdit) ?? it(t),
|
|
423
|
+
canManageDashboards: ((v = s == null ? void 0 : s.permissions) == null ? void 0 : v.canCreateDashboard) ?? ot(t),
|
|
424
|
+
canCreateDashboards: ((d = s == null ? void 0 : s.permissions) == null ? void 0 : d.canCreateDashboard) ?? rt(t),
|
|
425
|
+
canAccessVisuals: ((u = s == null ? void 0 : s.permissions) == null ? void 0 : u.canEdit) ?? nt(t)
|
|
426
426
|
};
|
|
427
427
|
},
|
|
428
428
|
[t, s]
|
|
@@ -434,92 +434,92 @@ function Cn() {
|
|
|
434
434
|
currentUser: t
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
|
-
const
|
|
437
|
+
const An = async (a, n, t) => {
|
|
438
438
|
const s = `${a}/management/v1/groups`;
|
|
439
|
-
return await
|
|
440
|
-
},
|
|
439
|
+
return await ns(s, n, t);
|
|
440
|
+
}, Ln = async (a, n, t) => {
|
|
441
441
|
const s = `${a}/management/v1/groups/${t}`;
|
|
442
|
-
await
|
|
443
|
-
},
|
|
442
|
+
await ts(s, n, "DELETE");
|
|
443
|
+
}, kn = async (a, n, t, s) => {
|
|
444
444
|
const i = `${a}/management/v1/groups/${t}/members`;
|
|
445
|
-
return await
|
|
446
|
-
},
|
|
445
|
+
return await ns(i, n, s);
|
|
446
|
+
}, In = async (a, n, t, s) => {
|
|
447
447
|
const i = `${a}/management/v1/groups/${t}/members`;
|
|
448
|
-
await
|
|
448
|
+
await ts(i, n, "DELETE", s);
|
|
449
449
|
};
|
|
450
|
-
function
|
|
451
|
-
const { authToken: a, tokenProps: n } = q(), t =
|
|
452
|
-
return
|
|
453
|
-
mutationFn: (s) =>
|
|
450
|
+
function On() {
|
|
451
|
+
const { authToken: a, tokenProps: n } = q(), t = Te();
|
|
452
|
+
return _e({
|
|
453
|
+
mutationFn: (s) => An(n.apiServiceUrl, (a == null ? void 0 : a.accessToken) || "", s),
|
|
454
454
|
onSuccess: () => {
|
|
455
|
-
t.invalidateQueries({ queryKey: ["groups"] }),
|
|
455
|
+
t.invalidateQueries({ queryKey: ["groups"] }), I.success("Group created successfully");
|
|
456
456
|
},
|
|
457
457
|
onError: (s) => {
|
|
458
|
-
console.error("Failed to create group:", s),
|
|
459
|
-
description:
|
|
458
|
+
console.error("Failed to create group:", s), I.error("Failed to create group", {
|
|
459
|
+
description: Ue(s, "Failed to create group")
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
|
-
function
|
|
465
|
-
const { authToken: a, tokenProps: n } = q(), t =
|
|
466
|
-
return
|
|
467
|
-
mutationFn: (s) =>
|
|
464
|
+
function Pn() {
|
|
465
|
+
const { authToken: a, tokenProps: n } = q(), t = Te();
|
|
466
|
+
return _e({
|
|
467
|
+
mutationFn: (s) => Ln(n.apiServiceUrl, (a == null ? void 0 : a.accessToken) || "", s),
|
|
468
468
|
onSuccess: (s, i) => {
|
|
469
|
-
t.invalidateQueries({ queryKey: ["groups"] }), t.removeQueries({ queryKey: ["group", i] }),
|
|
469
|
+
t.invalidateQueries({ queryKey: ["groups"] }), t.removeQueries({ queryKey: ["group", i] }), I.success("Group deleted successfully");
|
|
470
470
|
},
|
|
471
471
|
onError: (s) => {
|
|
472
|
-
console.error("Failed to delete group:", s),
|
|
473
|
-
description:
|
|
472
|
+
console.error("Failed to delete group:", s), I.error("Failed to delete group", {
|
|
473
|
+
description: Ue(s, "Failed to delete group")
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
});
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
const { authToken: a, tokenProps: n } = q(), t =
|
|
480
|
-
return
|
|
478
|
+
function Tn() {
|
|
479
|
+
const { authToken: a, tokenProps: n } = q(), t = Te();
|
|
480
|
+
return _e({
|
|
481
481
|
mutationFn: ({
|
|
482
482
|
groupId: s,
|
|
483
483
|
data: i
|
|
484
|
-
}) =>
|
|
484
|
+
}) => kn(n.apiServiceUrl, (a == null ? void 0 : a.accessToken) || "", s, i),
|
|
485
485
|
onSuccess: (s, i) => {
|
|
486
486
|
t.invalidateQueries({ queryKey: ["group", i.groupId] }), t.invalidateQueries({
|
|
487
487
|
queryKey: ["group-members", i.groupId]
|
|
488
|
-
}), t.invalidateQueries({ queryKey: ["groups"] }),
|
|
488
|
+
}), t.invalidateQueries({ queryKey: ["groups"] }), I.success("Members added successfully");
|
|
489
489
|
},
|
|
490
490
|
onError: (s) => {
|
|
491
|
-
console.error("Failed to add group members:", s),
|
|
492
|
-
description:
|
|
491
|
+
console.error("Failed to add group members:", s), I.error("Failed to add members", {
|
|
492
|
+
description: Ue(s, "Failed to add members")
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
|
-
function
|
|
498
|
-
const { authToken: a, tokenProps: n } = q(), t =
|
|
499
|
-
return
|
|
497
|
+
function _n() {
|
|
498
|
+
const { authToken: a, tokenProps: n } = q(), t = Te();
|
|
499
|
+
return _e({
|
|
500
500
|
mutationFn: ({
|
|
501
501
|
groupId: s,
|
|
502
502
|
data: i
|
|
503
|
-
}) =>
|
|
503
|
+
}) => In(n.apiServiceUrl, (a == null ? void 0 : a.accessToken) || "", s, i),
|
|
504
504
|
onSuccess: (s, i) => {
|
|
505
505
|
t.invalidateQueries({ queryKey: ["group", i.groupId] }), t.invalidateQueries({
|
|
506
506
|
queryKey: ["group-members", i.groupId]
|
|
507
|
-
}), t.invalidateQueries({ queryKey: ["groups"] }),
|
|
507
|
+
}), t.invalidateQueries({ queryKey: ["groups"] }), I.success("Members removed successfully");
|
|
508
508
|
},
|
|
509
509
|
onError: (s) => {
|
|
510
|
-
console.error("Failed to remove group members:", s),
|
|
511
|
-
description:
|
|
510
|
+
console.error("Failed to remove group members:", s), I.error("Failed to remove members", {
|
|
511
|
+
description: Ue(s, "Failed to remove members")
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
|
-
const
|
|
517
|
-
function
|
|
516
|
+
const Ja = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
517
|
+
function Un({
|
|
518
518
|
onSuccess: a,
|
|
519
519
|
tenantId: n,
|
|
520
520
|
isTenantUser: t
|
|
521
521
|
}) {
|
|
522
|
-
const [s, i] = x(""), [l, h] = x(""), [m, f] = x({}), v =
|
|
522
|
+
const [s, i] = x(""), [l, h] = x(""), [m, f] = x({}), v = On(), d = () => {
|
|
523
523
|
const r = {};
|
|
524
524
|
return s.trim() ? s.length < 3 ? r.name = "Group name must be at least 3 characters" : s.length > 50 && (r.name = "Group name must be less than 50 characters") : r.name = "Group name is required", l && l.length > 200 && (r.description = "Description must be less than 200 characters"), f(r), Object.keys(r).length === 0;
|
|
525
525
|
};
|
|
@@ -538,7 +538,7 @@ function Pn({
|
|
|
538
538
|
}
|
|
539
539
|
}, className: "space-y-4", children: [
|
|
540
540
|
/* @__PURE__ */ c("div", { className: "space-y-1.5", children: [
|
|
541
|
-
/* @__PURE__ */ c(
|
|
541
|
+
/* @__PURE__ */ c(sa, { htmlFor: "group-name", className: Ja, children: [
|
|
542
542
|
"Group name ",
|
|
543
543
|
/* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
|
|
544
544
|
] }),
|
|
@@ -559,9 +559,9 @@ function Pn({
|
|
|
559
559
|
m.name && /* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: m.name })
|
|
560
560
|
] }),
|
|
561
561
|
/* @__PURE__ */ c("div", { className: "space-y-1.5", children: [
|
|
562
|
-
/* @__PURE__ */ e(
|
|
562
|
+
/* @__PURE__ */ e(sa, { htmlFor: "group-description", className: Ja, children: "Description (optional)" }),
|
|
563
563
|
/* @__PURE__ */ e(
|
|
564
|
-
|
|
564
|
+
lt,
|
|
565
565
|
{
|
|
566
566
|
id: "group-description",
|
|
567
567
|
placeholder: "Describe the purpose of this group…",
|
|
@@ -580,7 +580,7 @@ function Pn({
|
|
|
580
580
|
] })
|
|
581
581
|
] }),
|
|
582
582
|
/* @__PURE__ */ c("div", { className: "flex gap-2 text-[12px] text-muted-foreground", children: [
|
|
583
|
-
/* @__PURE__ */ e(
|
|
583
|
+
/* @__PURE__ */ e(dt, { className: "h-3.5 w-3.5 shrink-0 mt-0.5" }),
|
|
584
584
|
/* @__PURE__ */ e("p", { children: "This group will be accessible to users in your workspace. You can add members after creating it." })
|
|
585
585
|
] }),
|
|
586
586
|
/* @__PURE__ */ c("div", { className: "flex justify-end gap-1.5 pt-1", children: [
|
|
@@ -604,7 +604,7 @@ function Pn({
|
|
|
604
604
|
size: "xs",
|
|
605
605
|
disabled: v.isPending || !s.trim(),
|
|
606
606
|
children: v.isPending ? /* @__PURE__ */ c(O, { children: [
|
|
607
|
-
/* @__PURE__ */ e(
|
|
607
|
+
/* @__PURE__ */ e(X, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
608
608
|
"Creating…"
|
|
609
609
|
] }) : "Create group"
|
|
610
610
|
}
|
|
@@ -612,7 +612,7 @@ function Pn({
|
|
|
612
612
|
] })
|
|
613
613
|
] });
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function Rn(a, n = []) {
|
|
616
616
|
let t = [];
|
|
617
617
|
function s(l, h) {
|
|
618
618
|
const m = M.createContext(h);
|
|
@@ -644,9 +644,9 @@ function _n(a, n = []) {
|
|
|
644
644
|
);
|
|
645
645
|
};
|
|
646
646
|
};
|
|
647
|
-
return i.scopeName = a, [s,
|
|
647
|
+
return i.scopeName = a, [s, Fn(i, ...n)];
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function Fn(...a) {
|
|
650
650
|
const n = a[0];
|
|
651
651
|
if (a.length === 1) return n;
|
|
652
652
|
const t = () => {
|
|
@@ -664,7 +664,7 @@ function Un(...a) {
|
|
|
664
664
|
};
|
|
665
665
|
return t.scopeName = n.scopeName, t;
|
|
666
666
|
}
|
|
667
|
-
var
|
|
667
|
+
var Gn = [
|
|
668
668
|
"a",
|
|
669
669
|
"button",
|
|
670
670
|
"div",
|
|
@@ -682,73 +682,73 @@ var Rn = [
|
|
|
682
682
|
"span",
|
|
683
683
|
"svg",
|
|
684
684
|
"ul"
|
|
685
|
-
],
|
|
686
|
-
const t =
|
|
685
|
+
], ya = Gn.reduce((a, n) => {
|
|
686
|
+
const t = ut(`Primitive.${n}`), s = M.forwardRef((i, l) => {
|
|
687
687
|
const { asChild: h, ...m } = i, f = h ? t : n;
|
|
688
688
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(f, { ...m, ref: l });
|
|
689
689
|
});
|
|
690
690
|
return s.displayName = `Primitive.${n}`, { ...a, [n]: s };
|
|
691
691
|
}, {});
|
|
692
|
-
function
|
|
693
|
-
return
|
|
694
|
-
|
|
692
|
+
function $n() {
|
|
693
|
+
return xn.useSyncExternalStore(
|
|
694
|
+
zn,
|
|
695
695
|
() => !0,
|
|
696
696
|
() => !1
|
|
697
697
|
);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function zn() {
|
|
700
700
|
return () => {
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
var
|
|
703
|
+
var xa = "Avatar", [Vn] = Rn(xa), [qn, bs] = Vn(xa), ys = M.forwardRef(
|
|
704
704
|
(a, n) => {
|
|
705
705
|
const { __scopeAvatar: t, ...s } = a, [i, l] = M.useState("idle");
|
|
706
706
|
return /* @__PURE__ */ e(
|
|
707
|
-
|
|
707
|
+
qn,
|
|
708
708
|
{
|
|
709
709
|
scope: t,
|
|
710
710
|
imageLoadingStatus: i,
|
|
711
711
|
onImageLoadingStatusChange: l,
|
|
712
|
-
children: /* @__PURE__ */ e(
|
|
712
|
+
children: /* @__PURE__ */ e(ya.span, { ...s, ref: n })
|
|
713
713
|
}
|
|
714
714
|
);
|
|
715
715
|
}
|
|
716
716
|
);
|
|
717
|
-
|
|
718
|
-
var
|
|
717
|
+
ys.displayName = xa;
|
|
718
|
+
var xs = "AvatarImage", Ss = M.forwardRef(
|
|
719
719
|
(a, n) => {
|
|
720
720
|
const { __scopeAvatar: t, src: s, onLoadingStatusChange: i = () => {
|
|
721
|
-
}, ...l } = a, h =
|
|
721
|
+
}, ...l } = a, h = bs(xs, t), m = Hn(s, l), f = mt((v) => {
|
|
722
722
|
i(v), h.onImageLoadingStatusChange(v);
|
|
723
723
|
});
|
|
724
|
-
return
|
|
724
|
+
return ta(() => {
|
|
725
725
|
m !== "idle" && f(m);
|
|
726
|
-
}, [m, f]), m === "loaded" ? /* @__PURE__ */ e(
|
|
726
|
+
}, [m, f]), m === "loaded" ? /* @__PURE__ */ e(ya.img, { ...l, ref: n, src: s }) : null;
|
|
727
727
|
}
|
|
728
728
|
);
|
|
729
|
-
|
|
730
|
-
var
|
|
729
|
+
Ss.displayName = xs;
|
|
730
|
+
var Ns = "AvatarFallback", Ds = M.forwardRef(
|
|
731
731
|
(a, n) => {
|
|
732
|
-
const { __scopeAvatar: t, delayMs: s, ...i } = a, l =
|
|
732
|
+
const { __scopeAvatar: t, delayMs: s, ...i } = a, l = bs(Ns, t), [h, m] = M.useState(s === void 0);
|
|
733
733
|
return M.useEffect(() => {
|
|
734
734
|
if (s !== void 0) {
|
|
735
735
|
const f = window.setTimeout(() => m(!0), s);
|
|
736
736
|
return () => window.clearTimeout(f);
|
|
737
737
|
}
|
|
738
|
-
}, [s]), h && l.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(
|
|
738
|
+
}, [s]), h && l.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(ya.span, { ...i, ref: n }) : null;
|
|
739
739
|
}
|
|
740
740
|
);
|
|
741
|
-
|
|
742
|
-
function
|
|
741
|
+
Ds.displayName = Ns;
|
|
742
|
+
function Xa(a, n) {
|
|
743
743
|
return a ? n ? (a.src !== n && (a.src = n), a.complete && a.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
const s =
|
|
747
|
-
() =>
|
|
745
|
+
function Hn(a, { referrerPolicy: n, crossOrigin: t }) {
|
|
746
|
+
const s = $n(), i = M.useRef(null), l = s ? (i.current || (i.current = new window.Image()), i.current) : null, [h, m] = M.useState(
|
|
747
|
+
() => Xa(l, a)
|
|
748
748
|
);
|
|
749
|
-
return
|
|
750
|
-
m(
|
|
751
|
-
}, [l, a]),
|
|
749
|
+
return ta(() => {
|
|
750
|
+
m(Xa(l, a));
|
|
751
|
+
}, [l, a]), ta(() => {
|
|
752
752
|
const f = (u) => () => {
|
|
753
753
|
m(u);
|
|
754
754
|
};
|
|
@@ -759,9 +759,9 @@ function Vn(a, { referrerPolicy: n, crossOrigin: t }) {
|
|
|
759
759
|
};
|
|
760
760
|
}, [l, t, n]), h;
|
|
761
761
|
}
|
|
762
|
-
var
|
|
763
|
-
const
|
|
764
|
-
|
|
762
|
+
var ws = ys, Cs = Ss, Es = Ds;
|
|
763
|
+
const Sa = M.forwardRef(({ className: a, ...n }, t) => /* @__PURE__ */ e(
|
|
764
|
+
ws,
|
|
765
765
|
{
|
|
766
766
|
ref: t,
|
|
767
767
|
className: J(
|
|
@@ -771,18 +771,18 @@ const va = M.forwardRef(({ className: a, ...n }, t) => /* @__PURE__ */ e(
|
|
|
771
771
|
...n
|
|
772
772
|
}
|
|
773
773
|
));
|
|
774
|
-
|
|
775
|
-
const
|
|
776
|
-
|
|
774
|
+
Sa.displayName = ws.displayName;
|
|
775
|
+
const jn = M.forwardRef(({ className: a, ...n }, t) => /* @__PURE__ */ e(
|
|
776
|
+
Cs,
|
|
777
777
|
{
|
|
778
778
|
ref: t,
|
|
779
779
|
className: J("aspect-square h-full w-full", a),
|
|
780
780
|
...n
|
|
781
781
|
}
|
|
782
782
|
));
|
|
783
|
-
|
|
784
|
-
const
|
|
785
|
-
|
|
783
|
+
jn.displayName = Cs.displayName;
|
|
784
|
+
const Na = M.forwardRef(({ className: a, ...n }, t) => /* @__PURE__ */ e(
|
|
785
|
+
Es,
|
|
786
786
|
{
|
|
787
787
|
ref: t,
|
|
788
788
|
className: J(
|
|
@@ -792,37 +792,37 @@ const ba = M.forwardRef(({ className: a, ...n }, t) => /* @__PURE__ */ e(
|
|
|
792
792
|
...n
|
|
793
793
|
}
|
|
794
794
|
));
|
|
795
|
-
|
|
796
|
-
function
|
|
795
|
+
Na.displayName = Es.displayName;
|
|
796
|
+
function Bn({
|
|
797
797
|
open: a,
|
|
798
798
|
onOpenChange: n,
|
|
799
799
|
group: t,
|
|
800
800
|
onUpdate: s
|
|
801
801
|
}) {
|
|
802
|
-
const [i, l] = x("members"), [h, m] = x(""), [f, v] = x([]), [d, u] = x([]), { data: r, isLoading: p, refetch: g } =
|
|
802
|
+
const [i, l] = x("members"), [h, m] = x(""), [f, v] = x([]), [d, u] = x([]), { data: r, isLoading: p, refetch: g } = ht(t.id), y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: N, isLoading: C } = pt({
|
|
803
803
|
type: y,
|
|
804
804
|
tenantId: t.tenantId || void 0,
|
|
805
805
|
active: !0,
|
|
806
806
|
limit: 100
|
|
807
|
-
}), A =
|
|
808
|
-
if (!h) return
|
|
807
|
+
}), A = Tn(), F = _n(), P = (r == null ? void 0 : r.members) || [], D = B(() => new Set(P.map((b) => b.userId)), [P]), G = B(() => N.filter((b) => !D.has(b.id)), [N, D]), K = B(() => {
|
|
808
|
+
if (!h) return G;
|
|
809
809
|
const b = h.toLowerCase();
|
|
810
|
-
return
|
|
810
|
+
return G.filter(
|
|
811
811
|
(L) => {
|
|
812
|
-
var U,
|
|
813
|
-
return ((U = L.name) == null ? void 0 : U.toLowerCase().includes(b)) || ((
|
|
812
|
+
var U, $;
|
|
813
|
+
return ((U = L.name) == null ? void 0 : U.toLowerCase().includes(b)) || (($ = L.email) == null ? void 0 : $.toLowerCase().includes(b));
|
|
814
814
|
}
|
|
815
815
|
);
|
|
816
|
-
}, [
|
|
817
|
-
if (!h) return
|
|
816
|
+
}, [G, h]), w = B(() => {
|
|
817
|
+
if (!h) return P;
|
|
818
818
|
const b = h.toLowerCase();
|
|
819
|
-
return
|
|
819
|
+
return P.filter(
|
|
820
820
|
(L) => {
|
|
821
|
-
var U,
|
|
822
|
-
return ((
|
|
821
|
+
var U, $, ue, H;
|
|
822
|
+
return (($ = (U = L.user) == null ? void 0 : U.name) == null ? void 0 : $.toLowerCase().includes(b)) || ((H = (ue = L.user) == null ? void 0 : ue.email) == null ? void 0 : H.toLowerCase().includes(b));
|
|
823
823
|
}
|
|
824
824
|
);
|
|
825
|
-
}, [
|
|
825
|
+
}, [P, h]), Q = async () => {
|
|
826
826
|
if (f.length !== 0)
|
|
827
827
|
try {
|
|
828
828
|
await A.mutateAsync({
|
|
@@ -838,7 +838,7 @@ function Hn({
|
|
|
838
838
|
}, le = async () => {
|
|
839
839
|
if (d.length !== 0)
|
|
840
840
|
try {
|
|
841
|
-
await
|
|
841
|
+
await F.mutateAsync({
|
|
842
842
|
groupId: t.id,
|
|
843
843
|
data: {
|
|
844
844
|
userIds: d
|
|
@@ -847,7 +847,7 @@ function Hn({
|
|
|
847
847
|
} catch (b) {
|
|
848
848
|
console.error("Failed to remove members:", b);
|
|
849
849
|
}
|
|
850
|
-
},
|
|
850
|
+
}, Re = (b) => {
|
|
851
851
|
v(
|
|
852
852
|
(L) => L.includes(b) ? L.filter((U) => U !== b) : [...L, b]
|
|
853
853
|
);
|
|
@@ -856,13 +856,13 @@ function Hn({
|
|
|
856
856
|
(L) => L.includes(b) ? L.filter((U) => U !== b) : [...L, b]
|
|
857
857
|
);
|
|
858
858
|
};
|
|
859
|
-
return /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
|
|
860
|
-
/* @__PURE__ */ c(
|
|
861
|
-
/* @__PURE__ */ e(
|
|
859
|
+
return /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(ha, { open: a, onOpenChange: n, children: /* @__PURE__ */ c(pa, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
|
|
860
|
+
/* @__PURE__ */ c(fa, { children: [
|
|
861
|
+
/* @__PURE__ */ e(ga, { children: t.name }),
|
|
862
862
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ c("p", { className: "text-sm text-muted-foreground", children: [
|
|
863
|
-
|
|
863
|
+
P.length,
|
|
864
864
|
" ",
|
|
865
|
-
|
|
865
|
+
P.length === 1 ? "member" : "members"
|
|
866
866
|
] }) }),
|
|
867
867
|
/* @__PURE__ */ c("p", { id: "group-members-description", className: "sr-only", children: [
|
|
868
868
|
"Add or remove members from the ",
|
|
@@ -870,16 +870,16 @@ function Hn({
|
|
|
870
870
|
" group"
|
|
871
871
|
] })
|
|
872
872
|
] }),
|
|
873
|
-
/* @__PURE__ */ c(
|
|
873
|
+
/* @__PURE__ */ c(rs, { value: i, onValueChange: (b) => {
|
|
874
874
|
l(b), m(""), u([]);
|
|
875
875
|
}, className: "mt-4", children: [
|
|
876
|
-
/* @__PURE__ */ c(
|
|
877
|
-
/* @__PURE__ */ e(
|
|
878
|
-
/* @__PURE__ */ e(
|
|
876
|
+
/* @__PURE__ */ c(os, { className: "grid w-full grid-cols-2", children: [
|
|
877
|
+
/* @__PURE__ */ e(Oe, { value: "members", children: "Current Members" }),
|
|
878
|
+
/* @__PURE__ */ e(Oe, { value: "add", children: "Add Members" })
|
|
879
879
|
] }),
|
|
880
|
-
/* @__PURE__ */ c(
|
|
880
|
+
/* @__PURE__ */ c(Pe, { value: "members", className: "mt-4 space-y-4", children: [
|
|
881
881
|
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
882
|
-
/* @__PURE__ */ e(
|
|
882
|
+
/* @__PURE__ */ e(na, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
883
883
|
/* @__PURE__ */ e(
|
|
884
884
|
ce,
|
|
885
885
|
{
|
|
@@ -890,12 +890,12 @@ function Hn({
|
|
|
890
890
|
}
|
|
891
891
|
)
|
|
892
892
|
] }),
|
|
893
|
-
/* @__PURE__ */ e(
|
|
894
|
-
/* @__PURE__ */ e(
|
|
893
|
+
/* @__PURE__ */ e(ra, { className: d.length > 0 ? "h-[300px]" : "h-[350px]", children: p ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((b) => /* @__PURE__ */ e(oa, { className: "h-16 w-full" }, b)) }) : w.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
894
|
+
/* @__PURE__ */ e(ba, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
895
895
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: h ? "No members found" : "No members yet" }),
|
|
896
896
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: h ? "Try a different search" : 'Switch to the "Add Members" tab to add people to this group' })
|
|
897
897
|
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: w.map((b) => /* @__PURE__ */ e(
|
|
898
|
-
|
|
898
|
+
Kn,
|
|
899
899
|
{
|
|
900
900
|
member: b,
|
|
901
901
|
selected: d.includes(b.userId),
|
|
@@ -916,21 +916,21 @@ function Hn({
|
|
|
916
916
|
variant: "destructive",
|
|
917
917
|
size: "sm",
|
|
918
918
|
onClick: le,
|
|
919
|
-
disabled:
|
|
920
|
-
children:
|
|
921
|
-
/* @__PURE__ */ e(
|
|
919
|
+
disabled: F.isPending,
|
|
920
|
+
children: F.isPending ? /* @__PURE__ */ c(O, { children: [
|
|
921
|
+
/* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
922
922
|
"Removing..."
|
|
923
923
|
] }) : /* @__PURE__ */ c(O, { children: [
|
|
924
|
-
/* @__PURE__ */ e(
|
|
924
|
+
/* @__PURE__ */ e(is, { className: "mr-2 h-4 w-4" }),
|
|
925
925
|
"Remove Selected"
|
|
926
926
|
] })
|
|
927
927
|
}
|
|
928
928
|
)
|
|
929
929
|
] })
|
|
930
930
|
] }),
|
|
931
|
-
/* @__PURE__ */ c(
|
|
931
|
+
/* @__PURE__ */ c(Pe, { value: "add", className: "mt-4 space-y-4", children: [
|
|
932
932
|
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
933
|
-
/* @__PURE__ */ e(
|
|
933
|
+
/* @__PURE__ */ e(na, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
934
934
|
/* @__PURE__ */ e(
|
|
935
935
|
ce,
|
|
936
936
|
{
|
|
@@ -941,16 +941,16 @@ function Hn({
|
|
|
941
941
|
}
|
|
942
942
|
)
|
|
943
943
|
] }),
|
|
944
|
-
/* @__PURE__ */ e(
|
|
945
|
-
/* @__PURE__ */ e(
|
|
944
|
+
/* @__PURE__ */ e(ra, { className: "h-[300px]", children: C ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((b) => /* @__PURE__ */ e(oa, { className: "h-16 w-full" }, b)) }) : K.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
945
|
+
/* @__PURE__ */ e(ia, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
946
946
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
|
|
947
947
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: h ? "Try a different search" : "All eligible users are already members" })
|
|
948
948
|
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: K.map((b) => /* @__PURE__ */ e(
|
|
949
|
-
|
|
949
|
+
Qn,
|
|
950
950
|
{
|
|
951
951
|
user: b,
|
|
952
952
|
selected: f.includes(b.id),
|
|
953
|
-
onToggle: () =>
|
|
953
|
+
onToggle: () => Re(b.id)
|
|
954
954
|
},
|
|
955
955
|
b.id
|
|
956
956
|
)) }) }),
|
|
@@ -967,10 +967,10 @@ function Hn({
|
|
|
967
967
|
onClick: Q,
|
|
968
968
|
disabled: A.isPending,
|
|
969
969
|
children: A.isPending ? /* @__PURE__ */ c(O, { children: [
|
|
970
|
-
/* @__PURE__ */ e(
|
|
970
|
+
/* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
971
971
|
"Adding..."
|
|
972
972
|
] }) : /* @__PURE__ */ c(O, { children: [
|
|
973
|
-
/* @__PURE__ */ e(
|
|
973
|
+
/* @__PURE__ */ e(ia, { className: "mr-2 h-4 w-4" }),
|
|
974
974
|
"Add Members"
|
|
975
975
|
] })
|
|
976
976
|
}
|
|
@@ -980,7 +980,7 @@ function Hn({
|
|
|
980
980
|
] })
|
|
981
981
|
] }) }) });
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function Kn({
|
|
984
984
|
member: a,
|
|
985
985
|
selected: n,
|
|
986
986
|
onToggle: t
|
|
@@ -993,8 +993,8 @@ function Bn({
|
|
|
993
993
|
className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
|
|
994
994
|
onClick: t,
|
|
995
995
|
children: [
|
|
996
|
-
/* @__PURE__ */ e(
|
|
997
|
-
/* @__PURE__ */ e(
|
|
996
|
+
/* @__PURE__ */ e(cs, { checked: n }),
|
|
997
|
+
/* @__PURE__ */ e(Sa, { className: "h-8 w-8", children: /* @__PURE__ */ e(Na, { className: "text-xs", children: s }) }),
|
|
998
998
|
/* @__PURE__ */ c("div", { className: "flex-1", children: [
|
|
999
999
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((h = a.user) == null ? void 0 : h.name) || "Unknown User" }),
|
|
1000
1000
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (m = a.user) == null ? void 0 : m.email })
|
|
@@ -1003,7 +1003,7 @@ function Bn({
|
|
|
1003
1003
|
}
|
|
1004
1004
|
);
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Qn({
|
|
1007
1007
|
user: a,
|
|
1008
1008
|
selected: n,
|
|
1009
1009
|
onToggle: t
|
|
@@ -1016,8 +1016,8 @@ function jn({
|
|
|
1016
1016
|
className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
|
|
1017
1017
|
onClick: t,
|
|
1018
1018
|
children: [
|
|
1019
|
-
/* @__PURE__ */ e(
|
|
1020
|
-
/* @__PURE__ */ e(
|
|
1019
|
+
/* @__PURE__ */ e(cs, { checked: n }),
|
|
1020
|
+
/* @__PURE__ */ e(Sa, { className: "h-8 w-8", children: /* @__PURE__ */ e(Na, { className: "text-xs", children: s }) }),
|
|
1021
1021
|
/* @__PURE__ */ c("div", { className: "flex-1", children: [
|
|
1022
1022
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: a.name }),
|
|
1023
1023
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: a.email })
|
|
@@ -1026,15 +1026,15 @@ function jn({
|
|
|
1026
1026
|
}
|
|
1027
1027
|
);
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1029
|
+
function Wn({
|
|
1030
1030
|
open: a,
|
|
1031
1031
|
onOpenChange: n
|
|
1032
1032
|
}) {
|
|
1033
|
-
const [t, s] = x("groups"), [i, l] = x(""), [h, m] = x(null), [f, v] = x(!1), [d, u] = x(null), { tokenProps: r } = q(), { currentUser: p } =
|
|
1033
|
+
const [t, s] = x("groups"), [i, l] = x(""), [h, m] = x(null), [f, v] = x(!1), [d, u] = x(null), { tokenProps: r } = q(), { currentUser: p } = va(), g = Pn(), y = (p == null ? void 0 : p.type) === "tenant", N = r == null ? void 0 : r.tenantId, { groups: C, isLoading: A, refetch: F } = ft({
|
|
1034
1034
|
type: y ? "TENANT_GROUP" : "all",
|
|
1035
1035
|
tenantId: y ? N : void 0,
|
|
1036
1036
|
includeMembers: !1
|
|
1037
|
-
}),
|
|
1037
|
+
}), P = C.filter(
|
|
1038
1038
|
(w) => {
|
|
1039
1039
|
var Q;
|
|
1040
1040
|
return w.name.toLowerCase().includes(i.toLowerCase()) || ((Q = w.description) == null ? void 0 : Q.toLowerCase().includes(i.toLowerCase()));
|
|
@@ -1042,31 +1042,31 @@ function Kn({
|
|
|
1042
1042
|
), D = async () => {
|
|
1043
1043
|
if (d)
|
|
1044
1044
|
try {
|
|
1045
|
-
await g.mutateAsync(d.id), u(null),
|
|
1045
|
+
await g.mutateAsync(d.id), u(null), F();
|
|
1046
1046
|
} catch (w) {
|
|
1047
1047
|
console.error("Failed to delete group:", w);
|
|
1048
1048
|
}
|
|
1049
|
-
},
|
|
1049
|
+
}, G = (w) => {
|
|
1050
1050
|
m(w), v(!0);
|
|
1051
1051
|
}, K = () => {
|
|
1052
|
-
s("groups"),
|
|
1052
|
+
s("groups"), F();
|
|
1053
1053
|
};
|
|
1054
1054
|
return /* @__PURE__ */ c(O, { children: [
|
|
1055
|
-
/* @__PURE__ */ e(
|
|
1056
|
-
/* @__PURE__ */ c(
|
|
1057
|
-
/* @__PURE__ */ e(
|
|
1058
|
-
/* @__PURE__ */ e(
|
|
1055
|
+
/* @__PURE__ */ e(ha, { open: a, onOpenChange: n, children: /* @__PURE__ */ c(pa, { className: "max-h-[80vh] max-w-3xl rounded-[6px] border-border/60 sm:rounded-[6px]", children: [
|
|
1056
|
+
/* @__PURE__ */ c(fa, { children: [
|
|
1057
|
+
/* @__PURE__ */ e(ga, { className: "text-[15px]", children: "Group management" }),
|
|
1058
|
+
/* @__PURE__ */ e(es, { className: "text-[13px] leading-5", children: "Manage groups, create new ones, and control membership." })
|
|
1059
1059
|
] }),
|
|
1060
1060
|
/* @__PURE__ */ c(
|
|
1061
|
-
|
|
1061
|
+
rs,
|
|
1062
1062
|
{
|
|
1063
1063
|
value: t,
|
|
1064
1064
|
onValueChange: s,
|
|
1065
1065
|
className: "mt-2",
|
|
1066
1066
|
children: [
|
|
1067
|
-
/* @__PURE__ */ c(
|
|
1067
|
+
/* @__PURE__ */ c(os, { className: "h-8 w-full justify-start gap-1 bg-transparent p-0 border-b border-border/60 rounded-none", children: [
|
|
1068
1068
|
/* @__PURE__ */ e(
|
|
1069
|
-
|
|
1069
|
+
Oe,
|
|
1070
1070
|
{
|
|
1071
1071
|
value: "groups",
|
|
1072
1072
|
className: "h-8 rounded-none border-b-2 border-transparent bg-transparent px-3 text-[13px] data-[state=active]:border-foreground data-[state=active]:bg-transparent data-[state=active]:shadow-none",
|
|
@@ -1074,7 +1074,7 @@ function Kn({
|
|
|
1074
1074
|
}
|
|
1075
1075
|
),
|
|
1076
1076
|
/* @__PURE__ */ e(
|
|
1077
|
-
|
|
1077
|
+
Oe,
|
|
1078
1078
|
{
|
|
1079
1079
|
value: "create",
|
|
1080
1080
|
className: "h-8 rounded-none border-b-2 border-transparent bg-transparent px-3 text-[13px] data-[state=active]:border-foreground data-[state=active]:bg-transparent data-[state=active]:shadow-none",
|
|
@@ -1082,9 +1082,9 @@ function Kn({
|
|
|
1082
1082
|
}
|
|
1083
1083
|
)
|
|
1084
1084
|
] }),
|
|
1085
|
-
/* @__PURE__ */ e(
|
|
1085
|
+
/* @__PURE__ */ e(Pe, { value: "groups", className: "mt-4", children: /* @__PURE__ */ c("div", { className: "space-y-3", children: [
|
|
1086
1086
|
/* @__PURE__ */ c("div", { className: "relative", children: [
|
|
1087
|
-
/* @__PURE__ */ e(
|
|
1087
|
+
/* @__PURE__ */ e(na, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
1088
1088
|
/* @__PURE__ */ e(
|
|
1089
1089
|
ce,
|
|
1090
1090
|
{
|
|
@@ -1096,28 +1096,28 @@ function Kn({
|
|
|
1096
1096
|
}
|
|
1097
1097
|
)
|
|
1098
1098
|
] }),
|
|
1099
|
-
/* @__PURE__ */ e(
|
|
1100
|
-
|
|
1099
|
+
/* @__PURE__ */ e(ra, { className: "h-[400px]", children: A ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((w) => /* @__PURE__ */ e(
|
|
1100
|
+
oa,
|
|
1101
1101
|
{
|
|
1102
1102
|
className: "h-16 w-full rounded-[6px]"
|
|
1103
1103
|
},
|
|
1104
1104
|
w
|
|
1105
|
-
)) }) :
|
|
1105
|
+
)) }) : P.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
1106
1106
|
/* @__PURE__ */ e("p", { className: "text-[13px]", children: "No groups found." }),
|
|
1107
1107
|
/* @__PURE__ */ e("p", { className: "mt-1 text-[12px]", children: i ? "Try a different search." : "Create your first group to get started." })
|
|
1108
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-2 pr-2", children:
|
|
1109
|
-
|
|
1108
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-2 pr-2", children: P.map((w) => /* @__PURE__ */ e(
|
|
1109
|
+
Jn,
|
|
1110
1110
|
{
|
|
1111
1111
|
group: w,
|
|
1112
|
-
onManageMembers: () =>
|
|
1112
|
+
onManageMembers: () => G(w),
|
|
1113
1113
|
onDelete: () => u(w),
|
|
1114
1114
|
currentUserId: p == null ? void 0 : p.id
|
|
1115
1115
|
},
|
|
1116
1116
|
w.id
|
|
1117
1117
|
)) }) })
|
|
1118
1118
|
] }) }),
|
|
1119
|
-
/* @__PURE__ */ e(
|
|
1120
|
-
|
|
1119
|
+
/* @__PURE__ */ e(Pe, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
|
|
1120
|
+
Un,
|
|
1121
1121
|
{
|
|
1122
1122
|
onSuccess: K,
|
|
1123
1123
|
tenantId: N,
|
|
@@ -1129,38 +1129,38 @@ function Kn({
|
|
|
1129
1129
|
)
|
|
1130
1130
|
] }) }),
|
|
1131
1131
|
h && /* @__PURE__ */ e(
|
|
1132
|
-
|
|
1132
|
+
Bn,
|
|
1133
1133
|
{
|
|
1134
1134
|
open: f,
|
|
1135
1135
|
onOpenChange: v,
|
|
1136
1136
|
group: h,
|
|
1137
|
-
onUpdate: () =>
|
|
1137
|
+
onUpdate: () => F()
|
|
1138
1138
|
}
|
|
1139
1139
|
),
|
|
1140
1140
|
/* @__PURE__ */ e(
|
|
1141
|
-
|
|
1141
|
+
ls,
|
|
1142
1142
|
{
|
|
1143
1143
|
open: !!d,
|
|
1144
1144
|
onOpenChange: () => u(null),
|
|
1145
|
-
children: /* @__PURE__ */ c(
|
|
1146
|
-
/* @__PURE__ */ c(
|
|
1147
|
-
/* @__PURE__ */ e(
|
|
1148
|
-
/* @__PURE__ */ c(
|
|
1145
|
+
children: /* @__PURE__ */ c(ds, { children: [
|
|
1146
|
+
/* @__PURE__ */ c(us, { children: [
|
|
1147
|
+
/* @__PURE__ */ e(ms, { children: "Delete group" }),
|
|
1148
|
+
/* @__PURE__ */ c(hs, { children: [
|
|
1149
1149
|
'Delete "',
|
|
1150
1150
|
d == null ? void 0 : d.name,
|
|
1151
1151
|
`"? This removes all members and can't be undone.`
|
|
1152
1152
|
] })
|
|
1153
1153
|
] }),
|
|
1154
|
-
/* @__PURE__ */ c(
|
|
1155
|
-
/* @__PURE__ */ e(
|
|
1154
|
+
/* @__PURE__ */ c(ps, { children: [
|
|
1155
|
+
/* @__PURE__ */ e(fs, { children: "Cancel" }),
|
|
1156
1156
|
/* @__PURE__ */ e(
|
|
1157
|
-
|
|
1157
|
+
ca,
|
|
1158
1158
|
{
|
|
1159
1159
|
onClick: D,
|
|
1160
1160
|
disabled: g.isPending,
|
|
1161
1161
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
1162
1162
|
children: g.isPending ? /* @__PURE__ */ c(O, { children: [
|
|
1163
|
-
/* @__PURE__ */ e(
|
|
1163
|
+
/* @__PURE__ */ e(X, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
1164
1164
|
"Deleting…"
|
|
1165
1165
|
] }) : "Delete group"
|
|
1166
1166
|
}
|
|
@@ -1171,7 +1171,7 @@ function Kn({
|
|
|
1171
1171
|
)
|
|
1172
1172
|
] });
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function Jn({
|
|
1175
1175
|
group: a,
|
|
1176
1176
|
onManageMembers: n,
|
|
1177
1177
|
onDelete: t,
|
|
@@ -1184,14 +1184,14 @@ function Qn({
|
|
|
1184
1184
|
a.description && /* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: a.description }),
|
|
1185
1185
|
/* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground", children: [
|
|
1186
1186
|
/* @__PURE__ */ c("span", { className: "inline-flex items-center gap-1", children: [
|
|
1187
|
-
/* @__PURE__ */ e(
|
|
1187
|
+
/* @__PURE__ */ e(ba, { className: "h-3 w-3" }),
|
|
1188
1188
|
a.memberCount,
|
|
1189
1189
|
" ",
|
|
1190
1190
|
a.memberCount === 1 ? "member" : "members"
|
|
1191
1191
|
] }),
|
|
1192
1192
|
/* @__PURE__ */ c("span", { children: [
|
|
1193
1193
|
"Created ",
|
|
1194
|
-
|
|
1194
|
+
on(new Date(a.createdAt), "MMM d, yyyy")
|
|
1195
1195
|
] })
|
|
1196
1196
|
] })
|
|
1197
1197
|
] }),
|
|
@@ -1205,7 +1205,7 @@ function Qn({
|
|
|
1205
1205
|
onClick: n,
|
|
1206
1206
|
title: "Manage members",
|
|
1207
1207
|
"aria-label": "Manage members",
|
|
1208
|
-
children: /* @__PURE__ */ e(
|
|
1208
|
+
children: /* @__PURE__ */ e(ia, { className: "h-3.5 w-3.5" })
|
|
1209
1209
|
}
|
|
1210
1210
|
),
|
|
1211
1211
|
i && /* @__PURE__ */ e(
|
|
@@ -1217,7 +1217,7 @@ function Qn({
|
|
|
1217
1217
|
onClick: t,
|
|
1218
1218
|
title: "Delete group",
|
|
1219
1219
|
"aria-label": "Delete group",
|
|
1220
|
-
children: /* @__PURE__ */ e(
|
|
1220
|
+
children: /* @__PURE__ */ e(is, { className: "h-3.5 w-3.5" })
|
|
1221
1221
|
}
|
|
1222
1222
|
)
|
|
1223
1223
|
] })
|
|
@@ -1230,16 +1230,16 @@ function re(a, n, t) {
|
|
|
1230
1230
|
);
|
|
1231
1231
|
if (s)
|
|
1232
1232
|
return s.label;
|
|
1233
|
-
const i = (h = (l =
|
|
1233
|
+
const i = (h = (l = gs(a, n)) == null ? void 0 : l.controls) == null ? void 0 : h.find(
|
|
1234
1234
|
(m) => m.id === t
|
|
1235
1235
|
);
|
|
1236
1236
|
return (i == null ? void 0 : i.label) || t;
|
|
1237
1237
|
}
|
|
1238
1238
|
function oe(a, n) {
|
|
1239
1239
|
var t;
|
|
1240
|
-
return ((t =
|
|
1240
|
+
return ((t = gs(a, n)) == null ? void 0 : t.title) || n;
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1242
|
+
function Xn(a) {
|
|
1243
1243
|
const { errors: n, dashboard: t } = a;
|
|
1244
1244
|
if (!t)
|
|
1245
1245
|
return n;
|
|
@@ -1324,14 +1324,20 @@ function Wn(a) {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
return Array.from(s.values());
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1328
|
-
|
|
1329
|
-
|
|
1327
|
+
function Ya(a, n) {
|
|
1328
|
+
return {
|
|
1329
|
+
dashboard: la(a),
|
|
1330
|
+
semanticExecutionPayload: la(n)
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
function lr() {
|
|
1334
|
+
var Ga, $a, za, Va;
|
|
1335
|
+
Yt(), Zt();
|
|
1330
1336
|
const {
|
|
1331
1337
|
authToken: a,
|
|
1332
1338
|
tokenProps: n,
|
|
1333
1339
|
id: t
|
|
1334
|
-
} = q(), { isLocalDev: s } =
|
|
1340
|
+
} = q(), { isLocalDev: s } = gt(), { permissions: i } = Mn(), l = vt(), { isLoading: h } = bt();
|
|
1335
1341
|
S((o) => o.theme);
|
|
1336
1342
|
const m = S((o) => o.isDownloadingPdf), f = S(
|
|
1337
1343
|
(o) => o.dashboardAssistantDraftScopeKey
|
|
@@ -1339,37 +1345,35 @@ function ir() {
|
|
|
1339
1345
|
S((o) => o.selectedSheetId);
|
|
1340
1346
|
const p = S(
|
|
1341
1347
|
(o) => o.isDashboardEditing
|
|
1342
|
-
), { setDashboardTitle: g } = S((o) => o.actions), [y, N] = x(!1), [C, A] = x(!1), [
|
|
1348
|
+
), { setDashboardTitle: g } = S((o) => o.actions), [y, N] = x(!1), [C, A] = x(!1), [F, P] = x(!1), [D, G] = x(!1), [K, w] = x(!1), [Q, le] = x(!1), [Re, de] = x(!1), [b, L] = x(!1), [U, $] = x(null), [ue, H] = x(!1), [me, he] = x(null), [Da, pe] = x([]), [wa, fe] = x(!1), Ms = S((o) => o.isDashboardPanelOpen), As = S(
|
|
1343
1349
|
(o) => o.actions.setIsDashboardPanelOpen
|
|
1344
|
-
),
|
|
1345
|
-
|
|
1346
|
-
const Z =
|
|
1350
|
+
), Ls = S((o) => o.filterValues), T = S((o) => o.isVisualEditing);
|
|
1351
|
+
ja((o) => o.card);
|
|
1352
|
+
const Z = Le(
|
|
1347
1353
|
(o) => o.selectedDashboard
|
|
1348
|
-
), ge =
|
|
1354
|
+
), ge = Le(
|
|
1349
1355
|
(o) => o.initialDashboard
|
|
1350
1356
|
);
|
|
1351
|
-
|
|
1352
|
-
const ve = Z ? (
|
|
1357
|
+
Le((o) => o.selectedVisual), S((o) => o.selectedFrameId), ja((o) => o.frame);
|
|
1358
|
+
const ve = Z ? ($a = Z == null ? void 0 : Z.permissions) == null ? void 0 : $a.canEdit : (Ga = ge == null ? void 0 : ge.permissions) == null ? void 0 : Ga.canEdit, be = S((o) => o.showFilters), Ca = yt((o) => o.setPanelOpen), Ea = S(
|
|
1353
1359
|
(o) => o.showDashboardJSON
|
|
1354
|
-
),
|
|
1360
|
+
), Fe = S((o) => o.onSaveFunction), Ma = S(
|
|
1355
1361
|
(o) => o.actions.setShowFilters
|
|
1356
|
-
), { setIsDashboardEditing:
|
|
1362
|
+
), { setIsDashboardEditing: Aa, setShowDashboardJSON: La } = S(
|
|
1357
1363
|
(o) => o.actions
|
|
1358
|
-
), { setInitialDashboard:
|
|
1364
|
+
), { setInitialDashboard: ka, clearSelectedDashboard: Ge } = Le(
|
|
1359
1365
|
(o) => o.actions
|
|
1360
|
-
), { resources: ye } =
|
|
1366
|
+
), { resources: ye } = xt(We.DASHBOARD), { data: $e } = St(), ks = ((za = $e == null ? void 0 : $e.preference) == null ? void 0 : za.defaultDashboardId) || null, { mutate: Is, isPending: Os } = Nt(), { currentUser: Ps } = va(), Ts = Dt(Ps), W = Z || ge, Ia = W ? {
|
|
1361
1367
|
id: W.id,
|
|
1362
1368
|
title: (r == null ? void 0 : r.title) || W.title || "Dashboard"
|
|
1363
|
-
} : null, { handleAddNewFrame:
|
|
1364
|
-
null
|
|
1365
|
-
), Aa = Va(
|
|
1369
|
+
} : null, { handleAddNewFrame: _s } = wt(), [ze, Ve] = x(!1), [Us, ee] = x(!1), [qe, xe] = x("close"), ae = Ct(We.DASHBOARD), [R, Se] = x(null), Oa = Ba(
|
|
1366
1370
|
(o) => {
|
|
1367
1371
|
window.setTimeout(() => {
|
|
1368
|
-
|
|
1372
|
+
$(o);
|
|
1369
1373
|
}, 0);
|
|
1370
1374
|
},
|
|
1371
1375
|
[]
|
|
1372
|
-
),
|
|
1376
|
+
), Rs = async (o, k) => {
|
|
1373
1377
|
if (!(r != null && r.id)) {
|
|
1374
1378
|
console.log("No dashboard ID found");
|
|
1375
1379
|
return;
|
|
@@ -1377,7 +1381,7 @@ function ir() {
|
|
|
1377
1381
|
console.log("Updating dashboard title:", {
|
|
1378
1382
|
dashboardId: r.id,
|
|
1379
1383
|
newTitle: o,
|
|
1380
|
-
previousTitle:
|
|
1384
|
+
previousTitle: k
|
|
1381
1385
|
}), ae.mutate(
|
|
1382
1386
|
{
|
|
1383
1387
|
resourceId: r.id,
|
|
@@ -1385,137 +1389,160 @@ function ir() {
|
|
|
1385
1389
|
},
|
|
1386
1390
|
{
|
|
1387
1391
|
onSuccess: () => {
|
|
1388
|
-
console.log("Dashboard title updated successfully"),
|
|
1392
|
+
console.log("Dashboard title updated successfully"), I.success("Dashboard title updated");
|
|
1389
1393
|
},
|
|
1390
1394
|
onError: (z) => {
|
|
1391
|
-
console.error("Failed to update dashboard title:", z),
|
|
1395
|
+
console.error("Failed to update dashboard title:", z), I.error("Failed to update dashboard title"), g(k);
|
|
1392
1396
|
}
|
|
1393
1397
|
}
|
|
1394
1398
|
);
|
|
1395
1399
|
};
|
|
1396
|
-
|
|
1400
|
+
Xe(() => {
|
|
1397
1401
|
if (ye && ye.length > 0) {
|
|
1398
1402
|
const o = r == null ? void 0 : r.id;
|
|
1399
1403
|
if (o) {
|
|
1400
|
-
const
|
|
1404
|
+
const k = ye.find(
|
|
1401
1405
|
(z) => z.id === o
|
|
1402
1406
|
);
|
|
1403
|
-
|
|
1407
|
+
k && ka(k);
|
|
1404
1408
|
}
|
|
1405
1409
|
}
|
|
1406
|
-
}, [ye, r == null ? void 0 : r.id,
|
|
1407
|
-
const se = n.orgUserId || n.tenantId,
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1410
|
+
}, [ye, r == null ? void 0 : r.id, ka]);
|
|
1411
|
+
const se = n.orgUserId || n.tenantId, Pa = p && !T && se && ve, { setDashboard: He } = S((o) => o.actions), je = S(
|
|
1412
|
+
(o) => o.semanticExecutionPayload
|
|
1413
|
+
), Fs = () => {
|
|
1414
|
+
Aa(!0);
|
|
1415
|
+
}, Be = () => {
|
|
1416
|
+
Aa(!1), La(!1), Se(null), $(null);
|
|
1411
1417
|
};
|
|
1412
|
-
|
|
1413
|
-
p
|
|
1418
|
+
Xe(() => {
|
|
1419
|
+
if (!p) {
|
|
1420
|
+
R && Se(null);
|
|
1421
|
+
return;
|
|
1422
|
+
}
|
|
1423
|
+
R || !r || h || Se(
|
|
1424
|
+
Ya(
|
|
1425
|
+
r,
|
|
1426
|
+
je
|
|
1427
|
+
)
|
|
1428
|
+
);
|
|
1429
|
+
}, [
|
|
1414
1430
|
r,
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1431
|
+
R,
|
|
1432
|
+
p,
|
|
1433
|
+
h,
|
|
1434
|
+
je
|
|
1435
|
+
]);
|
|
1436
|
+
const Ne = (R == null ? void 0 : R.dashboard) ?? null, { isDirty: Ta, isDirtyPending: Gs, resetDirty: De } = dn(
|
|
1419
1437
|
r,
|
|
1420
|
-
|
|
1438
|
+
Ne,
|
|
1421
1439
|
300,
|
|
1422
1440
|
1e3,
|
|
1423
|
-
|
|
1424
|
-
),
|
|
1425
|
-
|
|
1426
|
-
},
|
|
1427
|
-
await
|
|
1441
|
+
Ye
|
|
1442
|
+
), _a = Ba(() => Ne ? Ye(r) !== Ye(Ne) : !1, [r, Ne]), Ua = Ta || Gs, we = ze || ae.isPending, $s = () => {
|
|
1443
|
+
_a() ? (xe("close"), ee(!0)) : (Be(), De());
|
|
1444
|
+
}, zs = async () => {
|
|
1445
|
+
await Ke({
|
|
1428
1446
|
closeAfterSave: !0,
|
|
1429
|
-
navigateHomeAfterSave:
|
|
1447
|
+
navigateHomeAfterSave: qe === "home"
|
|
1430
1448
|
});
|
|
1431
|
-
},
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
},
|
|
1436
|
-
|
|
1449
|
+
}, Vs = () => {
|
|
1450
|
+
R && He(R.dashboard, {
|
|
1451
|
+
semanticExecutionPayload: R.semanticExecutionPayload
|
|
1452
|
+
}), Be(), qe === "home" && Ge(), xe("close"), ee(!1), De();
|
|
1453
|
+
}, qs = () => {
|
|
1454
|
+
R && (He(R.dashboard, {
|
|
1455
|
+
semanticExecutionPayload: R.semanticExecutionPayload
|
|
1456
|
+
}), De());
|
|
1457
|
+
}, Hs = () => {
|
|
1458
|
+
if (p && _a()) {
|
|
1437
1459
|
xe("home"), ee(!0);
|
|
1438
1460
|
return;
|
|
1439
1461
|
}
|
|
1440
|
-
|
|
1462
|
+
Ge();
|
|
1441
1463
|
};
|
|
1442
|
-
async function
|
|
1443
|
-
const
|
|
1444
|
-
if (!
|
|
1464
|
+
async function Ke(o) {
|
|
1465
|
+
const k = S.getState().dashboard;
|
|
1466
|
+
if (!k)
|
|
1445
1467
|
return;
|
|
1446
|
-
const z = (o == null ? void 0 : o.closeAfterSave) ??
|
|
1468
|
+
const z = (o == null ? void 0 : o.closeAfterSave) ?? wa, Ws = (o == null ? void 0 : o.navigateHomeAfterSave) ?? !1;
|
|
1447
1469
|
fe(z), z && ee(!1);
|
|
1448
|
-
const
|
|
1449
|
-
H(!0), he(null), pe([]),
|
|
1450
|
-
const
|
|
1451
|
-
template:
|
|
1470
|
+
const Js = la(k);
|
|
1471
|
+
H(!0), he(null), pe([]), Ve(!0);
|
|
1472
|
+
const Xs = {
|
|
1473
|
+
template: k
|
|
1452
1474
|
};
|
|
1453
1475
|
ae.mutate(
|
|
1454
1476
|
{
|
|
1455
|
-
resourceId:
|
|
1456
|
-
data:
|
|
1477
|
+
resourceId: k.id,
|
|
1478
|
+
data: Xs
|
|
1457
1479
|
},
|
|
1458
1480
|
{
|
|
1459
1481
|
onSuccess: (_) => {
|
|
1460
|
-
var
|
|
1461
|
-
const
|
|
1462
|
-
if (!
|
|
1463
|
-
const
|
|
1464
|
-
(
|
|
1465
|
-
|
|
1466
|
-
) :
|
|
1482
|
+
var Ee, Me, qa;
|
|
1483
|
+
const j = (_ == null ? void 0 : _.id) || ((Ee = _ == null ? void 0 : _.dashboard) == null ? void 0 : Ee.id) || ((Me = _ == null ? void 0 : _.resource) == null ? void 0 : Me.id) || ((qa = _ == null ? void 0 : _.template) == null ? void 0 : qa.id) || null;
|
|
1484
|
+
if (!k.id && j) {
|
|
1485
|
+
const Qe = Xt.getState(), Ae = Qe.pendingDashboardDraftMigration;
|
|
1486
|
+
(Ae == null ? void 0 : Ae.scopeKey) === f ? Qe.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
|
|
1487
|
+
j
|
|
1488
|
+
) : Ae && Qe.actions.clearPendingDashboardDraftMigration();
|
|
1467
1489
|
}
|
|
1468
|
-
|
|
1490
|
+
Ve(!1), I.success("Dashboard saved!"), Se(
|
|
1491
|
+
Ya(
|
|
1492
|
+
Js,
|
|
1493
|
+
S.getState().semanticExecutionPayload
|
|
1494
|
+
)
|
|
1495
|
+
), H(!1), fe(!1), z && (Be(), De(), Ws && Ge()), xe("close");
|
|
1469
1496
|
},
|
|
1470
1497
|
onError: (_) => {
|
|
1471
|
-
|
|
1472
|
-
const
|
|
1473
|
-
|
|
1474
|
-
) ? (
|
|
1475
|
-
(
|
|
1498
|
+
Ve(!1), he("Failed to save dashboard. Please try again.");
|
|
1499
|
+
const j = _.details, Ee = Array.isArray(
|
|
1500
|
+
j == null ? void 0 : j.errors
|
|
1501
|
+
) ? (j.errors || []).filter(
|
|
1502
|
+
(Me) => typeof Me == "string"
|
|
1476
1503
|
) : [];
|
|
1477
1504
|
pe(
|
|
1478
|
-
|
|
1479
|
-
errors:
|
|
1480
|
-
dashboard:
|
|
1505
|
+
Xn({
|
|
1506
|
+
errors: Ee,
|
|
1507
|
+
dashboard: k || void 0
|
|
1481
1508
|
})
|
|
1482
|
-
),
|
|
1509
|
+
), I.error("Failed to save dashboard");
|
|
1483
1510
|
}
|
|
1484
1511
|
}
|
|
1485
1512
|
);
|
|
1486
1513
|
}
|
|
1487
|
-
async function
|
|
1514
|
+
async function js() {
|
|
1488
1515
|
if (N(!0), !d || !u) return;
|
|
1489
1516
|
const o = S.getState().dashboard;
|
|
1490
1517
|
if (!o) {
|
|
1491
1518
|
N(!1);
|
|
1492
1519
|
return;
|
|
1493
1520
|
}
|
|
1494
|
-
const
|
|
1521
|
+
const k = JSON.stringify(o), z = {
|
|
1495
1522
|
...u,
|
|
1496
|
-
template:
|
|
1497
|
-
filterValues:
|
|
1523
|
+
template: k,
|
|
1524
|
+
filterValues: Ls
|
|
1498
1525
|
};
|
|
1499
|
-
await
|
|
1526
|
+
await ua(
|
|
1500
1527
|
n.apiServiceUrl,
|
|
1501
1528
|
z,
|
|
1502
1529
|
a == null ? void 0 : a.accessToken
|
|
1503
|
-
),
|
|
1530
|
+
), I.success("Lens saved"), Fe == null || Fe(o), N(!1);
|
|
1504
1531
|
}
|
|
1505
|
-
const
|
|
1532
|
+
const Ra = (u == null ? void 0 : u.name) || r.title, te = !!(r != null && r.id);
|
|
1506
1533
|
ae.isPending && console.log("Title during update:", {
|
|
1507
|
-
title:
|
|
1534
|
+
title: Ra,
|
|
1508
1535
|
dashboardStateTitle: r.title,
|
|
1509
1536
|
dashboardId: r == null ? void 0 : r.id,
|
|
1510
1537
|
currentLensName: u == null ? void 0 : u.name
|
|
1511
1538
|
});
|
|
1512
|
-
const
|
|
1513
|
-
|
|
1514
|
-
!te && D &&
|
|
1539
|
+
const Fa = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail, Bs = !!Fa && !!(a != null && a.accessToken) && !!(n != null && n.apiServiceUrl);
|
|
1540
|
+
Xe(() => {
|
|
1541
|
+
!te && D && G(!1);
|
|
1515
1542
|
}, [te, D]);
|
|
1516
|
-
const
|
|
1517
|
-
ne &&
|
|
1518
|
-
dashboardId:
|
|
1543
|
+
const Ks = l, ne = (r == null ? void 0 : r.id) || null, Ce = !!ne && ks === ne, Qs = () => {
|
|
1544
|
+
ne && Is({
|
|
1545
|
+
dashboardId: Ce ? null : ne
|
|
1519
1546
|
});
|
|
1520
1547
|
};
|
|
1521
1548
|
return /* @__PURE__ */ c(
|
|
@@ -1525,33 +1552,33 @@ function ir() {
|
|
|
1525
1552
|
role: "dashboard-controls",
|
|
1526
1553
|
children: [
|
|
1527
1554
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
1528
|
-
|
|
1555
|
+
Fa && /* @__PURE__ */ c(O, { children: [
|
|
1529
1556
|
/* @__PURE__ */ e(
|
|
1530
|
-
|
|
1557
|
+
Je,
|
|
1531
1558
|
{
|
|
1532
1559
|
"aria-label": "Manage Dashboards",
|
|
1533
1560
|
tooltip: "Manage Dashboards",
|
|
1534
1561
|
onClick: () => {
|
|
1535
|
-
|
|
1562
|
+
As(!Ms);
|
|
1536
1563
|
},
|
|
1537
1564
|
className: "h-7 w-7 px-0",
|
|
1538
1565
|
buttonProps: { size: "xs" },
|
|
1539
|
-
children: /* @__PURE__ */ e(
|
|
1566
|
+
children: /* @__PURE__ */ e(hn, { className: "h-3.5 w-3.5" })
|
|
1540
1567
|
}
|
|
1541
1568
|
),
|
|
1542
|
-
|
|
1543
|
-
|
|
1569
|
+
Ks && !T && /* @__PURE__ */ e(
|
|
1570
|
+
Je,
|
|
1544
1571
|
{
|
|
1545
1572
|
"aria-label": "Dashboard Hub",
|
|
1546
1573
|
tooltip: "Dashboard Hub",
|
|
1547
|
-
onClick:
|
|
1574
|
+
onClick: Hs,
|
|
1548
1575
|
className: "h-7 w-7 px-0",
|
|
1549
1576
|
buttonProps: { size: "xs" },
|
|
1550
|
-
children: /* @__PURE__ */ e(
|
|
1577
|
+
children: /* @__PURE__ */ e(as, { className: "h-3.5 w-3.5" })
|
|
1551
1578
|
}
|
|
1552
1579
|
)
|
|
1553
1580
|
] }),
|
|
1554
|
-
!
|
|
1581
|
+
!T && l && (h ? /* @__PURE__ */ e(
|
|
1555
1582
|
"div",
|
|
1556
1583
|
{
|
|
1557
1584
|
className: "h-4 w-28 rounded-md bg-muted/70 animate-pulse",
|
|
@@ -1561,17 +1588,17 @@ function ir() {
|
|
|
1561
1588
|
}
|
|
1562
1589
|
) : /* @__PURE__ */ c(O, { children: [
|
|
1563
1590
|
/* @__PURE__ */ e(
|
|
1564
|
-
|
|
1591
|
+
Et,
|
|
1565
1592
|
{
|
|
1566
|
-
value:
|
|
1593
|
+
value: Ra || "Untitled Dashboard",
|
|
1567
1594
|
onSave: (o) => {
|
|
1568
1595
|
console.log("EditableText onSave called:", {
|
|
1569
1596
|
newTitle: o,
|
|
1570
1597
|
canEditDashboard: ve,
|
|
1571
1598
|
dashboardId: r == null ? void 0 : r.id
|
|
1572
1599
|
});
|
|
1573
|
-
const
|
|
1574
|
-
g(o),
|
|
1600
|
+
const k = (r == null ? void 0 : r.title) || "";
|
|
1601
|
+
g(o), Rs(o, k);
|
|
1575
1602
|
},
|
|
1576
1603
|
isEditable: ve && !u,
|
|
1577
1604
|
displayClassName: "text-[13px] font-medium",
|
|
@@ -1580,148 +1607,148 @@ function ir() {
|
|
|
1580
1607
|
isPending: ae.isPending
|
|
1581
1608
|
}
|
|
1582
1609
|
),
|
|
1583
|
-
|
|
1584
|
-
/* @__PURE__ */ e(
|
|
1610
|
+
Bs && ne && /* @__PURE__ */ e(Mt, { children: /* @__PURE__ */ c(At, { children: [
|
|
1611
|
+
/* @__PURE__ */ e(Lt, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1585
1612
|
E,
|
|
1586
1613
|
{
|
|
1587
1614
|
variant: "ghost",
|
|
1588
1615
|
size: "xs",
|
|
1589
|
-
onClick:
|
|
1590
|
-
disabled:
|
|
1616
|
+
onClick: Qs,
|
|
1617
|
+
disabled: Os || !(a != null && a.accessToken) || !(n != null && n.apiServiceUrl),
|
|
1591
1618
|
className: "w-7 px-0",
|
|
1592
|
-
"aria-label":
|
|
1619
|
+
"aria-label": Ce ? "Remove as default dashboard" : "Make this a default dashboard",
|
|
1593
1620
|
children: /* @__PURE__ */ e(
|
|
1594
|
-
|
|
1621
|
+
kt,
|
|
1595
1622
|
{
|
|
1596
1623
|
className: J(
|
|
1597
1624
|
"h-3.5 w-3.5 transition-colors",
|
|
1598
|
-
|
|
1625
|
+
Ce ? "fill-foreground text-foreground" : "text-muted-foreground hover:text-foreground"
|
|
1599
1626
|
)
|
|
1600
1627
|
}
|
|
1601
1628
|
)
|
|
1602
1629
|
}
|
|
1603
1630
|
) }),
|
|
1604
|
-
/* @__PURE__ */ e(
|
|
1631
|
+
/* @__PURE__ */ e(It, { children: /* @__PURE__ */ e("p", { children: Ce ? "Remove as default dashboard" : "Make this a default dashboard" }) })
|
|
1605
1632
|
] }) })
|
|
1606
1633
|
] }))
|
|
1607
1634
|
] }),
|
|
1608
1635
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
1609
|
-
|
|
1610
|
-
/* @__PURE__ */ e(
|
|
1611
|
-
/* @__PURE__ */ e(
|
|
1636
|
+
T && /* @__PURE__ */ c(O, { children: [
|
|
1637
|
+
/* @__PURE__ */ e(en, {}),
|
|
1638
|
+
/* @__PURE__ */ e(an, {})
|
|
1612
1639
|
] }),
|
|
1613
|
-
!
|
|
1640
|
+
!T && l && ((Va = W == null ? void 0 : W.permissions) == null ? void 0 : Va.canShare) && /* @__PURE__ */ c(
|
|
1614
1641
|
E,
|
|
1615
1642
|
{
|
|
1616
1643
|
variant: "outline",
|
|
1617
1644
|
size: "xs",
|
|
1618
1645
|
onClick: () => A(!0),
|
|
1619
1646
|
children: [
|
|
1620
|
-
/* @__PURE__ */ e(
|
|
1647
|
+
/* @__PURE__ */ e(Ot, { className: "h-3.5 w-3.5" }),
|
|
1621
1648
|
"Share"
|
|
1622
1649
|
]
|
|
1623
1650
|
}
|
|
1624
1651
|
),
|
|
1625
|
-
!
|
|
1626
|
-
|
|
1652
|
+
!T && p && i.canUseFilters && l && /* @__PURE__ */ e(
|
|
1653
|
+
sn,
|
|
1627
1654
|
{
|
|
1628
1655
|
showFilters: be,
|
|
1629
1656
|
onToggleFilters: () => {
|
|
1630
|
-
be ||
|
|
1657
|
+
be || Ca("dashboard", !1), Ma(!be);
|
|
1631
1658
|
},
|
|
1632
1659
|
onAddFilter: () => {
|
|
1633
|
-
be || (
|
|
1660
|
+
be || (Ca("dashboard", !1), Ma(!0));
|
|
1634
1661
|
},
|
|
1635
1662
|
onAddControl: () => {
|
|
1636
|
-
|
|
1663
|
+
Oa("create");
|
|
1637
1664
|
},
|
|
1638
|
-
onManageControls: () =>
|
|
1665
|
+
onManageControls: () => Oa("manage")
|
|
1639
1666
|
}
|
|
1640
1667
|
),
|
|
1641
|
-
p && !
|
|
1642
|
-
|
|
1668
|
+
p && !T && l && U ? /* @__PURE__ */ e(
|
|
1669
|
+
tn,
|
|
1643
1670
|
{
|
|
1644
1671
|
open: !0,
|
|
1645
1672
|
onOpenChange: (o) => {
|
|
1646
|
-
o ||
|
|
1673
|
+
o || $(null);
|
|
1647
1674
|
},
|
|
1648
1675
|
showTrigger: !1,
|
|
1649
1676
|
initialMode: U
|
|
1650
1677
|
}
|
|
1651
1678
|
) : null,
|
|
1652
|
-
p && !
|
|
1679
|
+
p && !T && se && u && s && l && /* @__PURE__ */ c(
|
|
1653
1680
|
E,
|
|
1654
1681
|
{
|
|
1655
1682
|
variant: "secondary",
|
|
1656
1683
|
size: "xs",
|
|
1657
1684
|
disabled: y,
|
|
1658
|
-
onClick:
|
|
1685
|
+
onClick: js,
|
|
1659
1686
|
children: [
|
|
1660
|
-
/* @__PURE__ */ e(
|
|
1687
|
+
/* @__PURE__ */ e(Ka, { className: "h-3.5 w-3.5" }),
|
|
1661
1688
|
"Save Lens"
|
|
1662
1689
|
]
|
|
1663
1690
|
}
|
|
1664
1691
|
),
|
|
1665
|
-
p && !
|
|
1692
|
+
p && !T && l && /* @__PURE__ */ c(
|
|
1666
1693
|
E,
|
|
1667
1694
|
{
|
|
1668
1695
|
variant: "outline",
|
|
1669
1696
|
size: "xs",
|
|
1670
1697
|
disabled: !p,
|
|
1671
|
-
onClick: () =>
|
|
1698
|
+
onClick: () => _s(),
|
|
1672
1699
|
children: [
|
|
1673
|
-
/* @__PURE__ */ e(
|
|
1700
|
+
/* @__PURE__ */ e(aa, { className: "h-3.5 w-3.5" }),
|
|
1674
1701
|
"Visual"
|
|
1675
1702
|
]
|
|
1676
1703
|
}
|
|
1677
1704
|
),
|
|
1678
|
-
!
|
|
1679
|
-
/* @__PURE__ */ e(
|
|
1705
|
+
!T && !p && ve && l && /* @__PURE__ */ c(E, { size: "xs", onClick: Fs, children: [
|
|
1706
|
+
/* @__PURE__ */ e(Pt, { className: "h-3.5 w-3.5" }),
|
|
1680
1707
|
"Edit"
|
|
1681
1708
|
] }),
|
|
1682
|
-
|
|
1709
|
+
Pa && l && Ta && /* @__PURE__ */ c(
|
|
1683
1710
|
E,
|
|
1684
1711
|
{
|
|
1685
1712
|
variant: "outline",
|
|
1686
1713
|
size: "xs",
|
|
1687
|
-
onClick:
|
|
1688
|
-
disabled:
|
|
1714
|
+
onClick: qs,
|
|
1715
|
+
disabled: we,
|
|
1689
1716
|
children: [
|
|
1690
|
-
/* @__PURE__ */ e(
|
|
1717
|
+
/* @__PURE__ */ e(Tt, { className: "h-3.5 w-3.5" }),
|
|
1691
1718
|
"Undo"
|
|
1692
1719
|
]
|
|
1693
1720
|
}
|
|
1694
1721
|
),
|
|
1695
|
-
|
|
1722
|
+
Pa && l && /* @__PURE__ */ c(
|
|
1696
1723
|
E,
|
|
1697
1724
|
{
|
|
1698
1725
|
size: "xs",
|
|
1699
|
-
className: J(!
|
|
1700
|
-
disabled:
|
|
1701
|
-
onClick: () =>
|
|
1726
|
+
className: J(!Ua && "opacity-60"),
|
|
1727
|
+
disabled: we || !Ua,
|
|
1728
|
+
onClick: () => Ke(),
|
|
1702
1729
|
children: [
|
|
1703
|
-
|
|
1704
|
-
|
|
1730
|
+
we ? /* @__PURE__ */ e(X, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(Ka, { className: "h-3.5 w-3.5" }),
|
|
1731
|
+
we ? "Saving..." : "Save"
|
|
1705
1732
|
]
|
|
1706
1733
|
}
|
|
1707
1734
|
),
|
|
1708
|
-
p && !
|
|
1735
|
+
p && !T && l && /* @__PURE__ */ c(
|
|
1709
1736
|
E,
|
|
1710
1737
|
{
|
|
1711
1738
|
variant: "outline",
|
|
1712
1739
|
size: "xs",
|
|
1713
|
-
onClick:
|
|
1740
|
+
onClick: $s,
|
|
1714
1741
|
children: [
|
|
1715
|
-
/* @__PURE__ */ e(
|
|
1742
|
+
/* @__PURE__ */ e(ss, { className: "h-3.5 w-3.5" }),
|
|
1716
1743
|
"Close"
|
|
1717
1744
|
]
|
|
1718
1745
|
}
|
|
1719
1746
|
),
|
|
1720
|
-
!
|
|
1721
|
-
!
|
|
1722
|
-
!
|
|
1723
|
-
/* @__PURE__ */ e(
|
|
1724
|
-
|
|
1747
|
+
!T && l && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(nn, {}) }),
|
|
1748
|
+
!T && s && /* @__PURE__ */ e(Sn, {}),
|
|
1749
|
+
!T && l && /* @__PURE__ */ c(_t, { children: [
|
|
1750
|
+
/* @__PURE__ */ e(Ut, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1751
|
+
Je,
|
|
1725
1752
|
{
|
|
1726
1753
|
tooltip: "More Options",
|
|
1727
1754
|
className: "w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
@@ -1730,11 +1757,11 @@ function ir() {
|
|
|
1730
1757
|
variant: "ghost",
|
|
1731
1758
|
"aria-label": "More dashboard options"
|
|
1732
1759
|
},
|
|
1733
|
-
children: /* @__PURE__ */ e(
|
|
1760
|
+
children: /* @__PURE__ */ e(Rt, { className: "h-3.5 w-3.5" })
|
|
1734
1761
|
}
|
|
1735
1762
|
) }),
|
|
1736
1763
|
/* @__PURE__ */ c(
|
|
1737
|
-
|
|
1764
|
+
Ft,
|
|
1738
1765
|
{
|
|
1739
1766
|
align: "end",
|
|
1740
1767
|
className: "w-56 rounded-[6px] border border-border/60 p-1 shadow-sm",
|
|
@@ -1746,7 +1773,7 @@ function ir() {
|
|
|
1746
1773
|
disabled: m,
|
|
1747
1774
|
onSelect: () => L(!0),
|
|
1748
1775
|
children: [
|
|
1749
|
-
/* @__PURE__ */ e(
|
|
1776
|
+
/* @__PURE__ */ e(Gt, { className: "h-3.5 w-3.5" }),
|
|
1750
1777
|
"Export"
|
|
1751
1778
|
]
|
|
1752
1779
|
}
|
|
@@ -1756,40 +1783,40 @@ function ir() {
|
|
|
1756
1783
|
{
|
|
1757
1784
|
disabled: !te,
|
|
1758
1785
|
onSelect: () => {
|
|
1759
|
-
te &&
|
|
1786
|
+
te && G(!0);
|
|
1760
1787
|
},
|
|
1761
1788
|
children: [
|
|
1762
|
-
/* @__PURE__ */ e(
|
|
1789
|
+
/* @__PURE__ */ e($t, { className: "h-3.5 w-3.5" }),
|
|
1763
1790
|
"Schedule"
|
|
1764
1791
|
]
|
|
1765
1792
|
}
|
|
1766
1793
|
),
|
|
1767
|
-
/* @__PURE__ */ e(
|
|
1768
|
-
|
|
1794
|
+
/* @__PURE__ */ e(Ie, {}),
|
|
1795
|
+
Ts && /* @__PURE__ */ c(O, { children: [
|
|
1769
1796
|
/* @__PURE__ */ e(ie, { children: "Access" }),
|
|
1770
1797
|
/* @__PURE__ */ c(
|
|
1771
1798
|
V,
|
|
1772
1799
|
{
|
|
1773
|
-
onClick: () =>
|
|
1800
|
+
onClick: () => P(!0),
|
|
1774
1801
|
children: [
|
|
1775
|
-
/* @__PURE__ */ e(
|
|
1802
|
+
/* @__PURE__ */ e(ba, { className: "h-3.5 w-3.5" }),
|
|
1776
1803
|
"Manage Groups"
|
|
1777
1804
|
]
|
|
1778
1805
|
}
|
|
1779
1806
|
),
|
|
1780
|
-
/* @__PURE__ */ e(
|
|
1807
|
+
/* @__PURE__ */ e(Ie, {})
|
|
1781
1808
|
] }),
|
|
1782
1809
|
/* @__PURE__ */ e(ie, { children: "Preferences" }),
|
|
1783
1810
|
/* @__PURE__ */ c(V, { onClick: () => w(!0), children: [
|
|
1784
|
-
/* @__PURE__ */ e(
|
|
1811
|
+
/* @__PURE__ */ e(zt, { className: "h-3.5 w-3.5" }),
|
|
1785
1812
|
"Calendar Preferences"
|
|
1786
1813
|
] }),
|
|
1787
1814
|
/* @__PURE__ */ c(V, { onClick: () => le(!0), children: [
|
|
1788
|
-
/* @__PURE__ */ e(
|
|
1815
|
+
/* @__PURE__ */ e(Vt, { className: "h-3.5 w-3.5" }),
|
|
1789
1816
|
"Summary Settings"
|
|
1790
1817
|
] }),
|
|
1791
1818
|
s && l && /* @__PURE__ */ c(O, { children: [
|
|
1792
|
-
/* @__PURE__ */ e(
|
|
1819
|
+
/* @__PURE__ */ e(Ie, {}),
|
|
1793
1820
|
/* @__PURE__ */ e(ie, { children: "Developer" }),
|
|
1794
1821
|
/* @__PURE__ */ c(
|
|
1795
1822
|
V,
|
|
@@ -1797,11 +1824,11 @@ function ir() {
|
|
|
1797
1824
|
onSelect: () => {
|
|
1798
1825
|
var o;
|
|
1799
1826
|
a != null && a.accessToken && ((o = navigator == null ? void 0 : navigator.clipboard) != null && o.writeText ? navigator.clipboard.writeText(a.accessToken).then(
|
|
1800
|
-
() =>
|
|
1801
|
-
).catch(() =>
|
|
1827
|
+
() => I.success("Token copied to clipboard")
|
|
1828
|
+
).catch(() => I.error("Unable to copy token")) : I.error("Clipboard not available"));
|
|
1802
1829
|
},
|
|
1803
1830
|
children: [
|
|
1804
|
-
/* @__PURE__ */ e(
|
|
1831
|
+
/* @__PURE__ */ e(qt, { className: "h-3.5 w-3.5" }),
|
|
1805
1832
|
"Copy token"
|
|
1806
1833
|
]
|
|
1807
1834
|
}
|
|
@@ -1809,9 +1836,9 @@ function ir() {
|
|
|
1809
1836
|
/* @__PURE__ */ c(
|
|
1810
1837
|
V,
|
|
1811
1838
|
{
|
|
1812
|
-
onSelect: () =>
|
|
1839
|
+
onSelect: () => Ht(n.apiServiceUrl),
|
|
1813
1840
|
children: [
|
|
1814
|
-
/* @__PURE__ */ e(
|
|
1841
|
+
/* @__PURE__ */ e(gn, { className: "h-3.5 w-3.5" }),
|
|
1815
1842
|
"Invalidate token"
|
|
1816
1843
|
]
|
|
1817
1844
|
}
|
|
@@ -1819,10 +1846,10 @@ function ir() {
|
|
|
1819
1846
|
p && /* @__PURE__ */ c(
|
|
1820
1847
|
V,
|
|
1821
1848
|
{
|
|
1822
|
-
onSelect: () =>
|
|
1849
|
+
onSelect: () => La(!Ea),
|
|
1823
1850
|
children: [
|
|
1824
|
-
/* @__PURE__ */ e(
|
|
1825
|
-
|
|
1851
|
+
/* @__PURE__ */ e(un, { className: "h-3.5 w-3.5" }),
|
|
1852
|
+
Ea ? "Hide dashboard JSON" : "Show dashboard JSON"
|
|
1826
1853
|
]
|
|
1827
1854
|
}
|
|
1828
1855
|
),
|
|
@@ -1831,100 +1858,105 @@ function ir() {
|
|
|
1831
1858
|
{
|
|
1832
1859
|
onSelect: () => de(!0),
|
|
1833
1860
|
children: [
|
|
1834
|
-
/* @__PURE__ */ e(
|
|
1861
|
+
/* @__PURE__ */ e(aa, { className: "h-3.5 w-3.5" }),
|
|
1835
1862
|
"Add lens"
|
|
1836
1863
|
]
|
|
1837
1864
|
}
|
|
1838
1865
|
),
|
|
1839
|
-
se && /* @__PURE__ */ c(
|
|
1840
|
-
/* @__PURE__ */ c(
|
|
1841
|
-
/* @__PURE__ */ e(
|
|
1866
|
+
se && /* @__PURE__ */ c(jt, { children: [
|
|
1867
|
+
/* @__PURE__ */ c(Bt, { children: [
|
|
1868
|
+
/* @__PURE__ */ e(mn, { className: "h-3.5 w-3.5" }),
|
|
1842
1869
|
"Lenses"
|
|
1843
1870
|
] }),
|
|
1844
|
-
/* @__PURE__ */ e(
|
|
1871
|
+
/* @__PURE__ */ e(Kt, { className: "w-60", children: /* @__PURE__ */ e(En, {}) })
|
|
1845
1872
|
] })
|
|
1846
1873
|
] })
|
|
1847
1874
|
]
|
|
1848
1875
|
}
|
|
1849
1876
|
)
|
|
1850
1877
|
] }),
|
|
1851
|
-
C &&
|
|
1852
|
-
|
|
1878
|
+
C && Ia && /* @__PURE__ */ e(
|
|
1879
|
+
Qt,
|
|
1853
1880
|
{
|
|
1854
|
-
resource:
|
|
1855
|
-
resourceType:
|
|
1881
|
+
resource: Ia,
|
|
1882
|
+
resourceType: We.DASHBOARD,
|
|
1856
1883
|
onClose: () => A(!1)
|
|
1857
1884
|
}
|
|
1858
1885
|
),
|
|
1859
1886
|
/* @__PURE__ */ e(
|
|
1860
|
-
|
|
1887
|
+
Wn,
|
|
1861
1888
|
{
|
|
1862
|
-
open:
|
|
1863
|
-
onOpenChange:
|
|
1889
|
+
open: F,
|
|
1890
|
+
onOpenChange: P
|
|
1864
1891
|
}
|
|
1865
1892
|
),
|
|
1866
1893
|
te && (r == null ? void 0 : r.id) && /* @__PURE__ */ e(
|
|
1867
|
-
|
|
1894
|
+
Wt,
|
|
1868
1895
|
{
|
|
1869
1896
|
open: D,
|
|
1870
|
-
onOpenChange:
|
|
1897
|
+
onOpenChange: G,
|
|
1871
1898
|
dashboardId: r.id,
|
|
1872
1899
|
dashboardName: r == null ? void 0 : r.title
|
|
1873
1900
|
}
|
|
1874
1901
|
),
|
|
1875
1902
|
/* @__PURE__ */ e(
|
|
1876
|
-
|
|
1903
|
+
cn,
|
|
1877
1904
|
{
|
|
1878
1905
|
open: K,
|
|
1879
1906
|
onOpenChange: w
|
|
1880
1907
|
}
|
|
1881
1908
|
),
|
|
1882
1909
|
/* @__PURE__ */ e(
|
|
1883
|
-
|
|
1910
|
+
ln,
|
|
1884
1911
|
{
|
|
1885
1912
|
open: Q,
|
|
1886
1913
|
onOpenChange: le,
|
|
1887
1914
|
dashboard: r,
|
|
1888
1915
|
disabled: !p,
|
|
1889
|
-
onApply: (o) =>
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1916
|
+
onApply: (o) => He(
|
|
1917
|
+
{
|
|
1918
|
+
...r,
|
|
1919
|
+
summary: o
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
semanticExecutionPayload: je
|
|
1923
|
+
}
|
|
1924
|
+
)
|
|
1893
1925
|
}
|
|
1894
1926
|
),
|
|
1895
1927
|
s && se && l && /* @__PURE__ */ e(
|
|
1896
|
-
|
|
1928
|
+
Cn,
|
|
1897
1929
|
{
|
|
1898
|
-
open:
|
|
1930
|
+
open: Re,
|
|
1899
1931
|
onOpenChange: de
|
|
1900
1932
|
}
|
|
1901
1933
|
),
|
|
1902
1934
|
l && /* @__PURE__ */ e(
|
|
1903
|
-
|
|
1935
|
+
Jt,
|
|
1904
1936
|
{
|
|
1905
1937
|
open: b,
|
|
1906
1938
|
onOpenChange: L
|
|
1907
1939
|
}
|
|
1908
1940
|
),
|
|
1909
1941
|
/* @__PURE__ */ e(
|
|
1910
|
-
|
|
1942
|
+
ls,
|
|
1911
1943
|
{
|
|
1912
1944
|
open: ue,
|
|
1913
1945
|
onOpenChange: (o) => {
|
|
1914
|
-
!o &&
|
|
1946
|
+
!o && ze && !me || (H(o), o || (he(null), pe([]), fe(!1)));
|
|
1915
1947
|
},
|
|
1916
|
-
children: /* @__PURE__ */ c(
|
|
1917
|
-
/* @__PURE__ */ c(
|
|
1918
|
-
/* @__PURE__ */ e(
|
|
1919
|
-
/* @__PURE__ */ e(
|
|
1920
|
-
|
|
1948
|
+
children: /* @__PURE__ */ c(ds, { className: "max-w-sm", children: [
|
|
1949
|
+
/* @__PURE__ */ c(us, { children: [
|
|
1950
|
+
/* @__PURE__ */ e(ms, { children: me ? "Save failed" : "Saving dashboard" }),
|
|
1951
|
+
/* @__PURE__ */ e(hs, { className: "pt-2", children: me ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
|
|
1952
|
+
Da.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
|
|
1921
1953
|
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
|
|
1922
|
-
/* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children:
|
|
1954
|
+
/* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: Da.slice(0, 5).map((o) => /* @__PURE__ */ e("li", { children: o }, o)) })
|
|
1923
1955
|
] })
|
|
1924
1956
|
] }),
|
|
1925
|
-
/* @__PURE__ */ e(
|
|
1957
|
+
/* @__PURE__ */ e(ps, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: me ? /* @__PURE__ */ c(O, { children: [
|
|
1926
1958
|
/* @__PURE__ */ e(
|
|
1927
|
-
|
|
1959
|
+
fs,
|
|
1928
1960
|
{
|
|
1929
1961
|
onClick: () => {
|
|
1930
1962
|
H(!1), he(null), pe([]), fe(!1);
|
|
@@ -1934,23 +1966,23 @@ function ir() {
|
|
|
1934
1966
|
}
|
|
1935
1967
|
),
|
|
1936
1968
|
/* @__PURE__ */ e(
|
|
1937
|
-
|
|
1969
|
+
ca,
|
|
1938
1970
|
{
|
|
1939
|
-
onClick: () =>
|
|
1940
|
-
closeAfterSave:
|
|
1941
|
-
navigateHomeAfterSave:
|
|
1971
|
+
onClick: () => Ke({
|
|
1972
|
+
closeAfterSave: wa,
|
|
1973
|
+
navigateHomeAfterSave: qe === "home"
|
|
1942
1974
|
}),
|
|
1943
1975
|
className: "m-0",
|
|
1944
1976
|
children: "Retry"
|
|
1945
1977
|
}
|
|
1946
1978
|
)
|
|
1947
1979
|
] }) : /* @__PURE__ */ c(
|
|
1948
|
-
|
|
1980
|
+
ca,
|
|
1949
1981
|
{
|
|
1950
1982
|
disabled: !0,
|
|
1951
1983
|
className: "m-0 cursor-default",
|
|
1952
1984
|
children: [
|
|
1953
|
-
/* @__PURE__ */ e(
|
|
1985
|
+
/* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
1954
1986
|
"Saving..."
|
|
1955
1987
|
]
|
|
1956
1988
|
}
|
|
@@ -1959,15 +1991,15 @@ function ir() {
|
|
|
1959
1991
|
}
|
|
1960
1992
|
),
|
|
1961
1993
|
/* @__PURE__ */ e(
|
|
1962
|
-
|
|
1994
|
+
rn,
|
|
1963
1995
|
{
|
|
1964
|
-
open:
|
|
1996
|
+
open: Us,
|
|
1965
1997
|
onOpenChange: (o) => {
|
|
1966
1998
|
ee(o);
|
|
1967
1999
|
},
|
|
1968
|
-
onSave:
|
|
1969
|
-
onDiscard:
|
|
1970
|
-
isSaving:
|
|
2000
|
+
onSave: zs,
|
|
2001
|
+
onDiscard: Vs,
|
|
2002
|
+
isSaving: ze,
|
|
1971
2003
|
saveLabel: "Save",
|
|
1972
2004
|
discardLabel: "Discard"
|
|
1973
2005
|
}
|
|
@@ -1978,5 +2010,5 @@ function ir() {
|
|
|
1978
2010
|
);
|
|
1979
2011
|
}
|
|
1980
2012
|
export {
|
|
1981
|
-
|
|
2013
|
+
lr as default
|
|
1982
2014
|
};
|