react-semaphor 0.1.177 → 0.1.179
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-00cjSeD7.js → dashboard-controls-CeT5saB7.js} +8 -8
- package/dist/chunks/{dashboard-controls-C9IWIFfW.js → dashboard-controls-O2Vl2SaH.js} +204 -203
- package/dist/chunks/{dashboard-json--ke9XK9p.js → dashboard-json--jGkpREU.js} +1 -1
- package/dist/chunks/{dashboard-json-BDjl-3ej.js → dashboard-json-d1qZ8OYo.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-BBsC9feJ.js → edit-dashboard-visual-BsP87bZV.js} +2 -2
- package/dist/chunks/{edit-dashboard-visual-BroCdmtP.js → edit-dashboard-visual-ViDNkE8Q.js} +1 -1
- package/dist/chunks/{editor-action-buttons-JE9t84-4.js → editor-action-buttons-DseT424l.js} +1 -1
- package/dist/chunks/{editor-action-buttons-CHoiNw7F.js → editor-action-buttons-F4_UU-Mk.js} +2 -2
- package/dist/chunks/index-8Crk3ROJ.js +1 -0
- package/dist/chunks/index-B4EhQdS9.js +1857 -0
- package/dist/chunks/{index-CdfFCbJb.js → index-CFWw2cJ5.js} +228 -228
- package/dist/chunks/{index-DZjcALSv.js → index-v6ayK5K2.js} +19466 -21309
- package/dist/chunks/{resource-management-panel-DE8DnPSl.js → resource-management-panel-CApVr9Vd.js} +3 -3
- package/dist/chunks/{resource-management-panel-C96ElLa5.js → resource-management-panel-Cn1aOr6L.js} +1 -1
- package/dist/chunks/{schedule-dashboard-BFa0Uljc.js → schedule-dashboard-B4KUKLfW.js} +3 -3
- package/dist/chunks/{schedule-dashboard-CzU0ziLB.js → schedule-dashboard-vvFw8B1E.js} +1 -1
- package/dist/chunks/{use-role-aware-display-preferences-Rd1BhDG4.js → use-role-aware-display-preferences-Bxp6i8c7.js} +1 -1
- package/dist/chunks/{use-role-aware-display-preferences-Dovp_VmV.js → use-role-aware-display-preferences-C-N0-Iik.js} +1 -1
- package/dist/chunks/{use-visual-utils-Cnju2tnE.js → use-visual-utils-D19qzwzI.js} +1 -1
- package/dist/chunks/{use-visual-utils-BkRr5LoD.js → use-visual-utils-D9lMGeVv.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/format-utils/index.cjs +5 -0
- package/dist/format-utils/index.js +451 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/format-utils.d.ts +375 -0
- package/package.json +14 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { l as J, bE as Bs, u as x, aS as es, aT as ss, B as M, aV as as, aW as ve, bF as ke, o as ts, aA as U, aF as Oe, bG as Qs, bc as Ie, aG as _e, aH as Te, aI as Ge, aJ as
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
+
import { l as J, bE as Bs, u as x, aS as es, aT as ss, B as M, aV as as, aW as ve, bF as ke, o as ts, aA as U, aF as Oe, bG as Qs, bc as Ie, aG as _e, aH as Te, aI as Ge, aJ as rs, aK as Se, bH as W, aO as Ws, K as $, bI as Js, bg as Xs, bJ as Ys, bK as Qe, bL as ns, c as ie, bM as os, p as le, bN as ce, t as A, bO as is, aM as Zs, bP as ea, L as V, bf as j, bQ as sa, bR as aa, bS as xe, bT as ta, bU as ra, bV as ls, bW as cs, bX as ne, bY as oe, bB as we, bm as Ce, bZ as De, bh as ds, b_ as Le, aN as us, e as ms, b$ as na, a_ as hs, a$ as ps, b0 as fs, b2 as gs, b3 as vs, b4 as bs, b5 as ys, b6 as Ee, ba as oa, c0 as ia, T as la, n as We, R as te, c1 as ca, $ as da, V as be, c2 as ua, c3 as ma, c4 as ha, c5 as pa, bd as fa, a6 as ga, c6 as va, c7 as ba, c8 as ya, c9 as Na, ca as Sa, _ as xa, a5 as wa } from "./index-v6ayK5K2.js";
|
|
3
3
|
import * as L from "react";
|
|
4
|
-
import Ns, { useState as S, useMemo as
|
|
4
|
+
import Ns, { useState as S, useMemo as re, useEffect as Ca } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
6
|
+
import { u as Da, A as La, V as Ea, S as Aa, U as Ma } from "./schedule-dashboard-B4KUKLfW.js";
|
|
7
|
+
import { u as ka } from "./use-role-aware-display-preferences-C-N0-Iik.js";
|
|
8
|
+
import { b as Oa } from "./index-B4EhQdS9.js";
|
|
9
|
+
import { S as Je } from "./editor-action-buttons-F4_UU-Mk.js";
|
|
9
10
|
/**
|
|
10
11
|
* @license lucide-react v0.453.0 - ISC
|
|
11
12
|
*
|
|
@@ -88,10 +89,10 @@ function Pa() {
|
|
|
88
89
|
if (Xe) return ye;
|
|
89
90
|
Xe = 1;
|
|
90
91
|
var s = Ns;
|
|
91
|
-
function
|
|
92
|
+
function n(c, h) {
|
|
92
93
|
return c === h && (c !== 0 || 1 / c === 1 / h) || c !== c && h !== h;
|
|
93
94
|
}
|
|
94
|
-
var a = typeof Object.is == "function" ? Object.is :
|
|
95
|
+
var a = typeof Object.is == "function" ? Object.is : n, t = s.useState, o = s.useEffect, i = s.useLayoutEffect, u = s.useDebugValue;
|
|
95
96
|
function m(c, h) {
|
|
96
97
|
var p = h(), v = t({ inst: { value: p, getSnapshot: h } }), y = v[0].inst, N = v[1];
|
|
97
98
|
return i(
|
|
@@ -140,7 +141,7 @@ function Ua() {
|
|
|
140
141
|
function s(p, v) {
|
|
141
142
|
return p === v && (p !== 0 || 1 / p === 1 / v) || p !== p && v !== v;
|
|
142
143
|
}
|
|
143
|
-
function
|
|
144
|
+
function n(p, v) {
|
|
144
145
|
d || o.startTransition === void 0 || (d = !0, console.error(
|
|
145
146
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
146
147
|
));
|
|
@@ -183,18 +184,18 @@ function Ua() {
|
|
|
183
184
|
return v();
|
|
184
185
|
}
|
|
185
186
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
186
|
-
var o = Ns, i = typeof Object.is == "function" ? Object.is : s, u = o.useState, m = o.useEffect, f = o.useLayoutEffect, b = o.useDebugValue, d = !1, c = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? t :
|
|
187
|
+
var o = Ns, i = typeof Object.is == "function" ? Object.is : s, u = o.useState, m = o.useEffect, f = o.useLayoutEffect, b = o.useDebugValue, d = !1, c = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? t : n;
|
|
187
188
|
Ne.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
188
189
|
}()), Ne;
|
|
189
190
|
}
|
|
190
191
|
process.env.NODE_ENV === "production" ? Ae.exports = Pa() : Ae.exports = Ua();
|
|
191
192
|
var Fa = Ae.exports;
|
|
192
193
|
function $a() {
|
|
193
|
-
const { setTheme: s } = Bs(),
|
|
194
|
+
const { setTheme: s } = Bs(), n = x(
|
|
194
195
|
(a) => a.actions.setDashboardTheme
|
|
195
196
|
);
|
|
196
|
-
return /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */ e(ss, { asChild: !0, children: /* @__PURE__ */
|
|
197
|
+
return /* @__PURE__ */ r(es, { children: [
|
|
198
|
+
/* @__PURE__ */ e(ss, { asChild: !0, children: /* @__PURE__ */ r(M, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
|
|
198
199
|
/* @__PURE__ */ e(
|
|
199
200
|
Ra,
|
|
200
201
|
{
|
|
@@ -211,12 +212,12 @@ function $a() {
|
|
|
211
212
|
),
|
|
212
213
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
|
|
213
214
|
] }) }),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ r(as, { align: "end", children: [
|
|
215
216
|
/* @__PURE__ */ e(
|
|
216
217
|
ve,
|
|
217
218
|
{
|
|
218
219
|
onClick: () => {
|
|
219
|
-
s("light"),
|
|
220
|
+
s("light"), n("light");
|
|
220
221
|
},
|
|
221
222
|
children: "Light"
|
|
222
223
|
}
|
|
@@ -225,7 +226,7 @@ function $a() {
|
|
|
225
226
|
ve,
|
|
226
227
|
{
|
|
227
228
|
onClick: () => {
|
|
228
|
-
s("dark"),
|
|
229
|
+
s("dark"), n("dark");
|
|
229
230
|
},
|
|
230
231
|
children: "Dark"
|
|
231
232
|
}
|
|
@@ -234,7 +235,7 @@ function $a() {
|
|
|
234
235
|
ve,
|
|
235
236
|
{
|
|
236
237
|
onClick: () => {
|
|
237
|
-
s("system"),
|
|
238
|
+
s("system"), n("system");
|
|
238
239
|
},
|
|
239
240
|
children: "System"
|
|
240
241
|
}
|
|
@@ -242,21 +243,21 @@ function $a() {
|
|
|
242
243
|
] })
|
|
243
244
|
] });
|
|
244
245
|
}
|
|
245
|
-
async function Va(s,
|
|
246
|
+
async function Va(s, n, a, t, o) {
|
|
246
247
|
if (!o)
|
|
247
248
|
return null;
|
|
248
249
|
const i = JSON.stringify(a), u = `${s}/v1/lens`;
|
|
249
250
|
return await ke(u, o, {
|
|
250
|
-
name:
|
|
251
|
+
name: n,
|
|
251
252
|
template: i,
|
|
252
253
|
filterValues: t,
|
|
253
254
|
operation: "create"
|
|
254
255
|
});
|
|
255
256
|
}
|
|
256
|
-
async function Me(s,
|
|
257
|
+
async function Me(s, n, a) {
|
|
257
258
|
if (!a)
|
|
258
259
|
return null;
|
|
259
|
-
const { id: t, template: o, filterValues: i, isDefault: u, shared: m } =
|
|
260
|
+
const { id: t, template: o, filterValues: i, isDefault: u, shared: m } = n, f = `${s}/v1/lens`;
|
|
260
261
|
return await ke(f, a, {
|
|
261
262
|
lensId: t,
|
|
262
263
|
template: o,
|
|
@@ -266,17 +267,17 @@ async function Me(s, r, a) {
|
|
|
266
267
|
operation: "update"
|
|
267
268
|
});
|
|
268
269
|
}
|
|
269
|
-
async function ja(s,
|
|
270
|
+
async function ja(s, n, a) {
|
|
270
271
|
if (!a)
|
|
271
272
|
return null;
|
|
272
273
|
const t = `${s}/v1/lens`;
|
|
273
274
|
return await ke(t, a, {
|
|
274
275
|
operation: "delete",
|
|
275
|
-
lensId:
|
|
276
|
+
lensId: n
|
|
276
277
|
});
|
|
277
278
|
}
|
|
278
279
|
function qa() {
|
|
279
|
-
const [s,
|
|
280
|
+
const [s, n] = S(""), [a, t] = S(!1), o = x((N) => N.lenses), { setLenses: i, setSelectedLensId: u } = ts(), [m, f] = S(!1), [b, d] = S(!1), c = x((N) => N.dashboard), h = x((N) => N.filterValues), { authToken: p, tokenProps: v } = U();
|
|
280
281
|
async function y() {
|
|
281
282
|
f(!0);
|
|
282
283
|
const N = await Va(
|
|
@@ -288,8 +289,8 @@ function qa() {
|
|
|
288
289
|
);
|
|
289
290
|
N && (i([...o || [], N]), u(N.id), d(!1)), f(!1);
|
|
290
291
|
}
|
|
291
|
-
return /* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */ e(Qs, { asChild: !0, children: /* @__PURE__ */
|
|
292
|
+
return /* @__PURE__ */ r(Oe, { open: b, onOpenChange: d, children: [
|
|
293
|
+
/* @__PURE__ */ e(Qs, { asChild: !0, children: /* @__PURE__ */ r(
|
|
293
294
|
M,
|
|
294
295
|
{
|
|
295
296
|
variant: "secondary",
|
|
@@ -301,19 +302,19 @@ function qa() {
|
|
|
301
302
|
]
|
|
302
303
|
}
|
|
303
304
|
) }),
|
|
304
|
-
/* @__PURE__ */
|
|
305
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ r(_e, { className: "sm:max-w-[425px]", children: [
|
|
306
|
+
/* @__PURE__ */ r(Te, { children: [
|
|
306
307
|
/* @__PURE__ */ e(Ge, { children: "Create Lens" }),
|
|
307
|
-
/* @__PURE__ */ e(
|
|
308
|
+
/* @__PURE__ */ e(rs, { children: "Lenses are private by default and are only visible to you." })
|
|
308
309
|
] }),
|
|
309
|
-
/* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-8 items-center gap-4", children: [
|
|
310
311
|
/* @__PURE__ */ e(Se, { className: "text-right", children: "Name" }),
|
|
311
312
|
/* @__PURE__ */ e(
|
|
312
313
|
W,
|
|
313
314
|
{
|
|
314
315
|
value: s,
|
|
315
316
|
onChange: (N) => {
|
|
316
|
-
|
|
317
|
+
n(N.target.value);
|
|
317
318
|
},
|
|
318
319
|
id: "name",
|
|
319
320
|
className: "col-span-7 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
|
|
@@ -336,7 +337,7 @@ function qa() {
|
|
|
336
337
|
] });
|
|
337
338
|
}
|
|
338
339
|
function za() {
|
|
339
|
-
const [s,
|
|
340
|
+
const [s, n] = S(!1), a = x((c) => c.lenses), t = x((c) => c.selectedLensId), { setLenses: o, setSelectedLensId: i } = ts(), { authToken: u, tokenProps: m } = U();
|
|
340
341
|
async function f(c) {
|
|
341
342
|
i(c);
|
|
342
343
|
}
|
|
@@ -369,28 +370,28 @@ function za() {
|
|
|
369
370
|
await Me(m.apiServiceUrl, y, u == null ? void 0 : u.accessToken);
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
|
-
return /* @__PURE__ */
|
|
373
|
+
return /* @__PURE__ */ r(es, { open: s, onOpenChange: n, children: [
|
|
373
374
|
/* @__PURE__ */ e(ss, { asChild: !0, children: /* @__PURE__ */ e($, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Ia, { className: "h-4 w-4" }) }) }),
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ r(as, { align: "end", className: "w-60", children: [
|
|
375
376
|
/* @__PURE__ */ e(Js, { className: "px-3", children: "Lenses" }),
|
|
376
377
|
/* @__PURE__ */ e(Xs, {}),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ r(
|
|
378
379
|
Ys,
|
|
379
380
|
{
|
|
380
381
|
value: t,
|
|
381
382
|
onValueChange: f,
|
|
382
383
|
children: [
|
|
383
384
|
/* @__PURE__ */ e(Qe, { value: "original", children: "Original" }),
|
|
384
|
-
a == null ? void 0 : a.map((c) => /* @__PURE__ */
|
|
385
|
+
a == null ? void 0 : a.map((c) => /* @__PURE__ */ r(
|
|
385
386
|
Qe,
|
|
386
387
|
{
|
|
387
388
|
className: "group flex justify-between gap-2",
|
|
388
389
|
value: c.id,
|
|
389
390
|
children: [
|
|
390
391
|
/* @__PURE__ */ e("p", { children: c.name }),
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ r("span", { className: "flex items-center gap-3", children: [
|
|
392
393
|
/* @__PURE__ */ e(
|
|
393
|
-
|
|
394
|
+
ns,
|
|
394
395
|
{
|
|
395
396
|
onClick: (h) => {
|
|
396
397
|
h.preventDefault(), d(c);
|
|
@@ -426,29 +427,29 @@ function za() {
|
|
|
426
427
|
] })
|
|
427
428
|
] });
|
|
428
429
|
}
|
|
429
|
-
const Ha = async (s,
|
|
430
|
+
const Ha = async (s, n, a) => {
|
|
430
431
|
const t = `${s}/management/v1/groups`;
|
|
431
|
-
return await is(t,
|
|
432
|
-
}, Ka = async (s,
|
|
432
|
+
return await is(t, n, a);
|
|
433
|
+
}, Ka = async (s, n, a) => {
|
|
433
434
|
const t = `${s}/management/v1/groups/${a}`, o = await fetch(t, {
|
|
434
435
|
method: "DELETE",
|
|
435
436
|
headers: {
|
|
436
|
-
Authorization: `Bearer ${
|
|
437
|
+
Authorization: `Bearer ${n}`
|
|
437
438
|
}
|
|
438
439
|
});
|
|
439
440
|
if (!o.ok) {
|
|
440
441
|
const i = await o.text();
|
|
441
442
|
throw new Error(i || "Failed to delete group");
|
|
442
443
|
}
|
|
443
|
-
}, Ba = async (s,
|
|
444
|
+
}, Ba = async (s, n, a, t) => {
|
|
444
445
|
const o = `${s}/management/v1/groups/${a}/members`;
|
|
445
|
-
return await is(o,
|
|
446
|
-
}, Qa = async (s,
|
|
446
|
+
return await is(o, n, t);
|
|
447
|
+
}, Qa = async (s, n, a, t) => {
|
|
447
448
|
const o = `${s}/management/v1/groups/${a}/members`, i = await fetch(o, {
|
|
448
449
|
method: "DELETE",
|
|
449
450
|
headers: {
|
|
450
451
|
"Content-Type": "application/json",
|
|
451
|
-
Authorization: `Bearer ${
|
|
452
|
+
Authorization: `Bearer ${n}`
|
|
452
453
|
},
|
|
453
454
|
body: JSON.stringify(t)
|
|
454
455
|
});
|
|
@@ -458,9 +459,9 @@ const Ha = async (s, r, a) => {
|
|
|
458
459
|
}
|
|
459
460
|
};
|
|
460
461
|
function Wa() {
|
|
461
|
-
const { authToken: s, tokenProps:
|
|
462
|
+
const { authToken: s, tokenProps: n } = U(), a = le();
|
|
462
463
|
return ce({
|
|
463
|
-
mutationFn: (t) => Ha(
|
|
464
|
+
mutationFn: (t) => Ha(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
|
|
464
465
|
onSuccess: () => {
|
|
465
466
|
a.invalidateQueries({ queryKey: ["groups"] }), A.success("Group created successfully");
|
|
466
467
|
},
|
|
@@ -472,9 +473,9 @@ function Wa() {
|
|
|
472
473
|
});
|
|
473
474
|
}
|
|
474
475
|
function Ja() {
|
|
475
|
-
const { authToken: s, tokenProps:
|
|
476
|
+
const { authToken: s, tokenProps: n } = U(), a = le();
|
|
476
477
|
return ce({
|
|
477
|
-
mutationFn: (t) => Ka(
|
|
478
|
+
mutationFn: (t) => Ka(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
|
|
478
479
|
onSuccess: (t, o) => {
|
|
479
480
|
a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", o] }), A.success("Group deleted successfully");
|
|
480
481
|
},
|
|
@@ -486,12 +487,12 @@ function Ja() {
|
|
|
486
487
|
});
|
|
487
488
|
}
|
|
488
489
|
function Xa() {
|
|
489
|
-
const { authToken: s, tokenProps:
|
|
490
|
+
const { authToken: s, tokenProps: n } = U(), a = le();
|
|
490
491
|
return ce({
|
|
491
492
|
mutationFn: ({
|
|
492
493
|
groupId: t,
|
|
493
494
|
data: o
|
|
494
|
-
}) => Ba(
|
|
495
|
+
}) => Ba(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, o),
|
|
495
496
|
onSuccess: (t, o) => {
|
|
496
497
|
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
|
|
497
498
|
queryKey: ["group-members", o.groupId]
|
|
@@ -505,12 +506,12 @@ function Xa() {
|
|
|
505
506
|
});
|
|
506
507
|
}
|
|
507
508
|
function Ya() {
|
|
508
|
-
const { authToken: s, tokenProps:
|
|
509
|
+
const { authToken: s, tokenProps: n } = U(), a = le();
|
|
509
510
|
return ce({
|
|
510
511
|
mutationFn: ({
|
|
511
512
|
groupId: t,
|
|
512
513
|
data: o
|
|
513
|
-
}) => Qa(
|
|
514
|
+
}) => Qa(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, o),
|
|
514
515
|
onSuccess: (t, o) => {
|
|
515
516
|
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
|
|
516
517
|
queryKey: ["group-members", o.groupId]
|
|
@@ -525,20 +526,20 @@ function Ya() {
|
|
|
525
526
|
}
|
|
526
527
|
function Za({
|
|
527
528
|
onSuccess: s,
|
|
528
|
-
tenantId:
|
|
529
|
+
tenantId: n,
|
|
529
530
|
isTenantUser: a
|
|
530
531
|
}) {
|
|
531
532
|
const [t, o] = S(""), [i, u] = S(""), [m, f] = S({}), b = Wa(), d = () => {
|
|
532
533
|
const h = {};
|
|
533
534
|
return t.trim() ? t.length < 3 ? h.name = "Group name must be at least 3 characters" : t.length > 50 && (h.name = "Group name must be less than 50 characters") : h.name = "Group name is required", i && i.length > 200 && (h.description = "Description must be less than 200 characters"), f(h), Object.keys(h).length === 0;
|
|
534
535
|
};
|
|
535
|
-
return /* @__PURE__ */
|
|
536
|
+
return /* @__PURE__ */ r("form", { onSubmit: async (h) => {
|
|
536
537
|
if (h.preventDefault(), !d()) return;
|
|
537
538
|
const p = {
|
|
538
539
|
name: t.trim(),
|
|
539
540
|
description: i.trim() || void 0,
|
|
540
541
|
type: a ? "TENANT_GROUP" : "ORG_GROUP",
|
|
541
|
-
...a &&
|
|
542
|
+
...a && n ? { tenantId: n } : {}
|
|
542
543
|
};
|
|
543
544
|
try {
|
|
544
545
|
await b.mutateAsync(p), o(""), u(""), f({}), s();
|
|
@@ -546,9 +547,9 @@ function Za({
|
|
|
546
547
|
console.error("Failed to create group:", v);
|
|
547
548
|
}
|
|
548
549
|
}, className: "space-y-6", children: [
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
551
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
552
|
+
/* @__PURE__ */ r(Se, { htmlFor: "group-name", children: [
|
|
552
553
|
"Group Name ",
|
|
553
554
|
/* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
|
|
554
555
|
] }),
|
|
@@ -567,8 +568,8 @@ function Za({
|
|
|
567
568
|
),
|
|
568
569
|
m.name && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: m.name })
|
|
569
570
|
] }),
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
572
|
+
/* @__PURE__ */ r(Se, { htmlFor: "group-description", children: [
|
|
572
573
|
"Description",
|
|
573
574
|
/* @__PURE__ */ e("span", { className: "ml-2 text-xs text-muted-foreground", children: "(optional)" })
|
|
574
575
|
] }),
|
|
@@ -587,17 +588,17 @@ function Za({
|
|
|
587
588
|
}
|
|
588
589
|
),
|
|
589
590
|
m.description && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: m.description }),
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: [
|
|
591
592
|
i.length,
|
|
592
593
|
"/200 characters"
|
|
593
594
|
] })
|
|
594
595
|
] }),
|
|
595
|
-
/* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */ r("div", { className: "flex gap-3", children: [
|
|
596
597
|
/* @__PURE__ */ e(ea, { className: "h-4 w-4 mt-0.5 text-muted-foreground" }),
|
|
597
598
|
/* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: "This group will be accessible to users in your workspace. You can add members after creating the group." })
|
|
598
599
|
] }) })
|
|
599
600
|
] }),
|
|
600
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ r("div", { className: "flex justify-end gap-3", children: [
|
|
601
602
|
/* @__PURE__ */ e(
|
|
602
603
|
M,
|
|
603
604
|
{
|
|
@@ -615,10 +616,10 @@ function Za({
|
|
|
615
616
|
{
|
|
616
617
|
type: "submit",
|
|
617
618
|
disabled: b.isPending || !t.trim(),
|
|
618
|
-
children: b.isPending ? /* @__PURE__ */
|
|
619
|
+
children: b.isPending ? /* @__PURE__ */ r(_, { children: [
|
|
619
620
|
/* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
620
621
|
"Creating..."
|
|
621
|
-
] }) : /* @__PURE__ */
|
|
622
|
+
] }) : /* @__PURE__ */ r(_, { children: [
|
|
622
623
|
/* @__PURE__ */ e(j, { className: "mr-2 h-4 w-4" }),
|
|
623
624
|
"Create Group"
|
|
624
625
|
] })
|
|
@@ -627,7 +628,7 @@ function Za({
|
|
|
627
628
|
] })
|
|
628
629
|
] });
|
|
629
630
|
}
|
|
630
|
-
function et(s,
|
|
631
|
+
function et(s, n = []) {
|
|
631
632
|
let a = [];
|
|
632
633
|
function t(i, u) {
|
|
633
634
|
const m = L.createContext(u);
|
|
@@ -659,11 +660,11 @@ function et(s, r = []) {
|
|
|
659
660
|
);
|
|
660
661
|
};
|
|
661
662
|
};
|
|
662
|
-
return o.scopeName = s, [t, st(o, ...
|
|
663
|
+
return o.scopeName = s, [t, st(o, ...n)];
|
|
663
664
|
}
|
|
664
665
|
function st(...s) {
|
|
665
|
-
const
|
|
666
|
-
if (s.length === 1) return
|
|
666
|
+
const n = s[0];
|
|
667
|
+
if (s.length === 1) return n;
|
|
667
668
|
const a = () => {
|
|
668
669
|
const t = s.map((o) => ({
|
|
669
670
|
useScope: o(),
|
|
@@ -674,10 +675,10 @@ function st(...s) {
|
|
|
674
675
|
const c = f(i)[`__scope${b}`];
|
|
675
676
|
return { ...m, ...c };
|
|
676
677
|
}, {});
|
|
677
|
-
return L.useMemo(() => ({ [`__scope${
|
|
678
|
+
return L.useMemo(() => ({ [`__scope${n.scopeName}`]: u }), [u]);
|
|
678
679
|
};
|
|
679
680
|
};
|
|
680
|
-
return a.scopeName =
|
|
681
|
+
return a.scopeName = n.scopeName, a;
|
|
681
682
|
}
|
|
682
683
|
var at = [
|
|
683
684
|
"a",
|
|
@@ -697,26 +698,26 @@ var at = [
|
|
|
697
698
|
"span",
|
|
698
699
|
"svg",
|
|
699
700
|
"ul"
|
|
700
|
-
], Re = at.reduce((s,
|
|
701
|
-
const a = sa(`Primitive.${
|
|
702
|
-
const { asChild: u, ...m } = o, f = u ? a :
|
|
701
|
+
], Re = at.reduce((s, n) => {
|
|
702
|
+
const a = sa(`Primitive.${n}`), t = L.forwardRef((o, i) => {
|
|
703
|
+
const { asChild: u, ...m } = o, f = u ? a : n;
|
|
703
704
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(f, { ...m, ref: i });
|
|
704
705
|
});
|
|
705
|
-
return t.displayName = `Primitive.${
|
|
706
|
+
return t.displayName = `Primitive.${n}`, { ...s, [n]: t };
|
|
706
707
|
}, {});
|
|
707
708
|
function tt() {
|
|
708
709
|
return Fa.useSyncExternalStore(
|
|
709
|
-
|
|
710
|
+
rt,
|
|
710
711
|
() => !0,
|
|
711
712
|
() => !1
|
|
712
713
|
);
|
|
713
714
|
}
|
|
714
|
-
function
|
|
715
|
+
function rt() {
|
|
715
716
|
return () => {
|
|
716
717
|
};
|
|
717
718
|
}
|
|
718
|
-
var Pe = "Avatar", [
|
|
719
|
-
(s,
|
|
719
|
+
var Pe = "Avatar", [nt] = et(Pe), [ot, Ss] = nt(Pe), xs = L.forwardRef(
|
|
720
|
+
(s, n) => {
|
|
720
721
|
const { __scopeAvatar: a, ...t } = s, [o, i] = L.useState("idle");
|
|
721
722
|
return /* @__PURE__ */ e(
|
|
722
723
|
ot,
|
|
@@ -724,40 +725,40 @@ var Pe = "Avatar", [rt] = et(Pe), [ot, Ss] = rt(Pe), xs = L.forwardRef(
|
|
|
724
725
|
scope: a,
|
|
725
726
|
imageLoadingStatus: o,
|
|
726
727
|
onImageLoadingStatusChange: i,
|
|
727
|
-
children: /* @__PURE__ */ e(Re.span, { ...t, ref:
|
|
728
|
+
children: /* @__PURE__ */ e(Re.span, { ...t, ref: n })
|
|
728
729
|
}
|
|
729
730
|
);
|
|
730
731
|
}
|
|
731
732
|
);
|
|
732
733
|
xs.displayName = Pe;
|
|
733
734
|
var ws = "AvatarImage", Cs = L.forwardRef(
|
|
734
|
-
(s,
|
|
735
|
+
(s, n) => {
|
|
735
736
|
const { __scopeAvatar: a, src: t, onLoadingStatusChange: o = () => {
|
|
736
737
|
}, ...i } = s, u = Ss(ws, a), m = it(t, i), f = aa((b) => {
|
|
737
738
|
o(b), u.onImageLoadingStatusChange(b);
|
|
738
739
|
});
|
|
739
740
|
return xe(() => {
|
|
740
741
|
m !== "idle" && f(m);
|
|
741
|
-
}, [m, f]), m === "loaded" ? /* @__PURE__ */ e(Re.img, { ...i, ref:
|
|
742
|
+
}, [m, f]), m === "loaded" ? /* @__PURE__ */ e(Re.img, { ...i, ref: n, src: t }) : null;
|
|
742
743
|
}
|
|
743
744
|
);
|
|
744
745
|
Cs.displayName = ws;
|
|
745
746
|
var Ds = "AvatarFallback", Ls = L.forwardRef(
|
|
746
|
-
(s,
|
|
747
|
+
(s, n) => {
|
|
747
748
|
const { __scopeAvatar: a, delayMs: t, ...o } = s, i = Ss(Ds, a), [u, m] = L.useState(t === void 0);
|
|
748
749
|
return L.useEffect(() => {
|
|
749
750
|
if (t !== void 0) {
|
|
750
751
|
const f = window.setTimeout(() => m(!0), t);
|
|
751
752
|
return () => window.clearTimeout(f);
|
|
752
753
|
}
|
|
753
|
-
}, [t]), u && i.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Re.span, { ...o, ref:
|
|
754
|
+
}, [t]), u && i.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Re.span, { ...o, ref: n }) : null;
|
|
754
755
|
}
|
|
755
756
|
);
|
|
756
757
|
Ls.displayName = Ds;
|
|
757
|
-
function Ze(s,
|
|
758
|
-
return s ?
|
|
758
|
+
function Ze(s, n) {
|
|
759
|
+
return s ? n ? (s.src !== n && (s.src = n), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
759
760
|
}
|
|
760
|
-
function it(s, { referrerPolicy:
|
|
761
|
+
function it(s, { referrerPolicy: n, crossOrigin: a }) {
|
|
761
762
|
const t = tt(), o = L.useRef(null), i = t ? (o.current || (o.current = new window.Image()), o.current) : null, [u, m] = L.useState(
|
|
762
763
|
() => Ze(i, s)
|
|
763
764
|
);
|
|
@@ -769,13 +770,13 @@ function it(s, { referrerPolicy: r, crossOrigin: a }) {
|
|
|
769
770
|
};
|
|
770
771
|
if (!i) return;
|
|
771
772
|
const b = f("loaded"), d = f("error");
|
|
772
|
-
return i.addEventListener("load", b), i.addEventListener("error", d),
|
|
773
|
+
return i.addEventListener("load", b), i.addEventListener("error", d), n && (i.referrerPolicy = n), typeof a == "string" && (i.crossOrigin = a), () => {
|
|
773
774
|
i.removeEventListener("load", b), i.removeEventListener("error", d);
|
|
774
775
|
};
|
|
775
|
-
}, [i, a,
|
|
776
|
+
}, [i, a, n]), u;
|
|
776
777
|
}
|
|
777
778
|
var Es = xs, As = Cs, Ms = Ls;
|
|
778
|
-
const Ue = L.forwardRef(({ className: s, ...
|
|
779
|
+
const Ue = L.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
|
|
779
780
|
Es,
|
|
780
781
|
{
|
|
781
782
|
ref: a,
|
|
@@ -783,20 +784,20 @@ const Ue = L.forwardRef(({ className: s, ...r }, a) => /* @__PURE__ */ e(
|
|
|
783
784
|
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
784
785
|
s
|
|
785
786
|
),
|
|
786
|
-
...
|
|
787
|
+
...n
|
|
787
788
|
}
|
|
788
789
|
));
|
|
789
790
|
Ue.displayName = Es.displayName;
|
|
790
|
-
const lt = L.forwardRef(({ className: s, ...
|
|
791
|
+
const lt = L.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
|
|
791
792
|
As,
|
|
792
793
|
{
|
|
793
794
|
ref: a,
|
|
794
795
|
className: ie("aspect-square h-full w-full", s),
|
|
795
|
-
...
|
|
796
|
+
...n
|
|
796
797
|
}
|
|
797
798
|
));
|
|
798
799
|
lt.displayName = As.displayName;
|
|
799
|
-
const Fe = L.forwardRef(({ className: s, ...
|
|
800
|
+
const Fe = L.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
|
|
800
801
|
Ms,
|
|
801
802
|
{
|
|
802
803
|
ref: a,
|
|
@@ -804,22 +805,22 @@ const Fe = L.forwardRef(({ className: s, ...r }, a) => /* @__PURE__ */ e(
|
|
|
804
805
|
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
805
806
|
s
|
|
806
807
|
),
|
|
807
|
-
...
|
|
808
|
+
...n
|
|
808
809
|
}
|
|
809
810
|
));
|
|
810
811
|
Fe.displayName = Ms.displayName;
|
|
811
812
|
function ct({
|
|
812
813
|
open: s,
|
|
813
|
-
onOpenChange:
|
|
814
|
+
onOpenChange: n,
|
|
814
815
|
group: a,
|
|
815
816
|
onUpdate: t
|
|
816
817
|
}) {
|
|
817
|
-
const [o, i] = S("members"), [u, m] = S(""), [f, b] = S([]), [d, c] = S([]), { data: h, isLoading: p, refetch: v } = ta(a.id), y = a.type === "TENANT_GROUP" ? "tenant" : "organization", { users: N, isLoading: E } =
|
|
818
|
+
const [o, i] = S("members"), [u, m] = S(""), [f, b] = S([]), [d, c] = S([]), { data: h, isLoading: p, refetch: v } = ta(a.id), y = a.type === "TENANT_GROUP" ? "tenant" : "organization", { users: N, isLoading: E } = ra({
|
|
818
819
|
type: y,
|
|
819
820
|
tenantId: a.tenantId || void 0,
|
|
820
821
|
active: !0,
|
|
821
822
|
limit: 100
|
|
822
|
-
}), T = Xa(), R = Ya(), k = (h == null ? void 0 : h.members) || [], P =
|
|
823
|
+
}), T = Xa(), R = Ya(), k = (h == null ? void 0 : h.members) || [], P = re(() => new Set(k.map((g) => g.userId)), [k]), G = re(() => N.filter((g) => !P.has(g.id)), [N, P]), q = re(() => {
|
|
823
824
|
if (!u) return G;
|
|
824
825
|
const g = u.toLowerCase();
|
|
825
826
|
return G.filter(
|
|
@@ -828,7 +829,7 @@ function ct({
|
|
|
828
829
|
return ((O = D.name) == null ? void 0 : O.toLowerCase().includes(g)) || ((F = D.email) == null ? void 0 : F.toLowerCase().includes(g));
|
|
829
830
|
}
|
|
830
831
|
);
|
|
831
|
-
}, [G, u]), w =
|
|
832
|
+
}, [G, u]), w = re(() => {
|
|
832
833
|
if (!u) return k;
|
|
833
834
|
const g = u.toLowerCase();
|
|
834
835
|
return k.filter(
|
|
@@ -871,29 +872,29 @@ function ct({
|
|
|
871
872
|
(D) => D.includes(g) ? D.filter((O) => O !== g) : [...D, g]
|
|
872
873
|
);
|
|
873
874
|
};
|
|
874
|
-
return /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(Oe, { open: s, onOpenChange:
|
|
875
|
-
/* @__PURE__ */
|
|
875
|
+
return /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(Oe, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(_e, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
|
|
876
|
+
/* @__PURE__ */ r(Te, { children: [
|
|
876
877
|
/* @__PURE__ */ e(Ge, { children: a.name }),
|
|
877
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: [
|
|
878
879
|
k.length,
|
|
879
880
|
" ",
|
|
880
881
|
k.length === 1 ? "member" : "members"
|
|
881
882
|
] }) }),
|
|
882
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ r("p", { id: "group-members-description", className: "sr-only", children: [
|
|
883
884
|
"Add or remove members from the ",
|
|
884
885
|
a.name,
|
|
885
886
|
" group"
|
|
886
887
|
] })
|
|
887
888
|
] }),
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ r(ls, { value: o, onValueChange: (g) => {
|
|
889
890
|
i(g), m(""), c([]);
|
|
890
891
|
}, className: "mt-4", children: [
|
|
891
|
-
/* @__PURE__ */
|
|
892
|
-
/* @__PURE__ */ e(
|
|
893
|
-
/* @__PURE__ */ e(
|
|
892
|
+
/* @__PURE__ */ r(cs, { className: "grid w-full grid-cols-2", children: [
|
|
893
|
+
/* @__PURE__ */ e(ne, { value: "members", children: "Current Members" }),
|
|
894
|
+
/* @__PURE__ */ e(ne, { value: "add", children: "Add Members" })
|
|
894
895
|
] }),
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
/* @__PURE__ */
|
|
896
|
+
/* @__PURE__ */ r(oe, { value: "members", className: "mt-4 space-y-4", children: [
|
|
897
|
+
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
897
898
|
/* @__PURE__ */ e(we, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
898
899
|
/* @__PURE__ */ e(
|
|
899
900
|
W,
|
|
@@ -905,7 +906,7 @@ function ct({
|
|
|
905
906
|
}
|
|
906
907
|
)
|
|
907
908
|
] }),
|
|
908
|
-
/* @__PURE__ */ e(Ce, { className: d.length > 0 ? "h-[300px]" : "h-[350px]", children: p ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(De, { className: "h-16 w-full" }, g)) }) : w.length === 0 ? /* @__PURE__ */
|
|
909
|
+
/* @__PURE__ */ e(Ce, { className: d.length > 0 ? "h-[300px]" : "h-[350px]", children: p ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(De, { className: "h-16 w-full" }, g)) }) : w.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
909
910
|
/* @__PURE__ */ e(j, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
910
911
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: u ? "No members found" : "No members yet" }),
|
|
911
912
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : 'Switch to the "Add Members" tab to add people to this group' })
|
|
@@ -918,8 +919,8 @@ function ct({
|
|
|
918
919
|
},
|
|
919
920
|
g.id
|
|
920
921
|
)) }) }),
|
|
921
|
-
d.length > 0 && /* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
922
|
+
d.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-4 border-t", children: [
|
|
923
|
+
/* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
|
|
923
924
|
d.length,
|
|
924
925
|
" member",
|
|
925
926
|
d.length !== 1 ? "s" : "",
|
|
@@ -932,10 +933,10 @@ function ct({
|
|
|
932
933
|
size: "sm",
|
|
933
934
|
onClick: de,
|
|
934
935
|
disabled: R.isPending,
|
|
935
|
-
children: R.isPending ? /* @__PURE__ */
|
|
936
|
+
children: R.isPending ? /* @__PURE__ */ r(_, { children: [
|
|
936
937
|
/* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
937
938
|
"Removing..."
|
|
938
|
-
] }) : /* @__PURE__ */
|
|
939
|
+
] }) : /* @__PURE__ */ r(_, { children: [
|
|
939
940
|
/* @__PURE__ */ e(ds, { className: "mr-2 h-4 w-4" }),
|
|
940
941
|
"Remove Selected"
|
|
941
942
|
] })
|
|
@@ -943,8 +944,8 @@ function ct({
|
|
|
943
944
|
)
|
|
944
945
|
] })
|
|
945
946
|
] }),
|
|
946
|
-
/* @__PURE__ */
|
|
947
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ r(oe, { value: "add", className: "mt-4 space-y-4", children: [
|
|
948
|
+
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
948
949
|
/* @__PURE__ */ e(we, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
949
950
|
/* @__PURE__ */ e(
|
|
950
951
|
W,
|
|
@@ -956,7 +957,7 @@ function ct({
|
|
|
956
957
|
}
|
|
957
958
|
)
|
|
958
959
|
] }),
|
|
959
|
-
/* @__PURE__ */ e(Ce, { className: "h-[300px]", children: E ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(De, { className: "h-16 w-full" }, g)) }) : q.length === 0 ? /* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ e(Ce, { className: "h-[300px]", children: E ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((g) => /* @__PURE__ */ e(De, { className: "h-16 w-full" }, g)) }) : q.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
960
961
|
/* @__PURE__ */ e(Le, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
961
962
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
|
|
962
963
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : "All eligible users are already members" })
|
|
@@ -969,8 +970,8 @@ function ct({
|
|
|
969
970
|
},
|
|
970
971
|
g.id
|
|
971
972
|
)) }) }),
|
|
972
|
-
f.length > 0 && /* @__PURE__ */
|
|
973
|
-
/* @__PURE__ */
|
|
973
|
+
f.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-4 border-t", children: [
|
|
974
|
+
/* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
|
|
974
975
|
f.length,
|
|
975
976
|
" user",
|
|
976
977
|
f.length !== 1 ? "s" : "",
|
|
@@ -981,10 +982,10 @@ function ct({
|
|
|
981
982
|
{
|
|
982
983
|
onClick: z,
|
|
983
984
|
disabled: T.isPending,
|
|
984
|
-
children: T.isPending ? /* @__PURE__ */
|
|
985
|
+
children: T.isPending ? /* @__PURE__ */ r(_, { children: [
|
|
985
986
|
/* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
986
987
|
"Adding..."
|
|
987
|
-
] }) : /* @__PURE__ */
|
|
988
|
+
] }) : /* @__PURE__ */ r(_, { children: [
|
|
988
989
|
/* @__PURE__ */ e(Le, { className: "mr-2 h-4 w-4" }),
|
|
989
990
|
"Add Members"
|
|
990
991
|
] })
|
|
@@ -997,20 +998,20 @@ function ct({
|
|
|
997
998
|
}
|
|
998
999
|
function dt({
|
|
999
1000
|
member: s,
|
|
1000
|
-
selected:
|
|
1001
|
+
selected: n,
|
|
1001
1002
|
onToggle: a
|
|
1002
1003
|
}) {
|
|
1003
1004
|
var o, i, u, m;
|
|
1004
1005
|
const t = ((i = (o = s.user) == null ? void 0 : o.name) == null ? void 0 : i.split(" ").map((f) => f[0]).join("").toUpperCase()) || "?";
|
|
1005
|
-
return /* @__PURE__ */
|
|
1006
|
+
return /* @__PURE__ */ r(
|
|
1006
1007
|
"div",
|
|
1007
1008
|
{
|
|
1008
1009
|
className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
|
|
1009
1010
|
onClick: a,
|
|
1010
1011
|
children: [
|
|
1011
|
-
/* @__PURE__ */ e(us, { checked:
|
|
1012
|
+
/* @__PURE__ */ e(us, { checked: n }),
|
|
1012
1013
|
/* @__PURE__ */ e(Ue, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fe, { className: "text-xs", children: t }) }),
|
|
1013
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ r("div", { className: "flex-1", children: [
|
|
1014
1015
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((u = s.user) == null ? void 0 : u.name) || "Unknown User" }),
|
|
1015
1016
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (m = s.user) == null ? void 0 : m.email })
|
|
1016
1017
|
] })
|
|
@@ -1020,20 +1021,20 @@ function dt({
|
|
|
1020
1021
|
}
|
|
1021
1022
|
function ut({
|
|
1022
1023
|
user: s,
|
|
1023
|
-
selected:
|
|
1024
|
+
selected: n,
|
|
1024
1025
|
onToggle: a
|
|
1025
1026
|
}) {
|
|
1026
1027
|
var o;
|
|
1027
1028
|
const t = ((o = s.name) == null ? void 0 : o.split(" ").map((i) => i[0]).join("").toUpperCase()) || "?";
|
|
1028
|
-
return /* @__PURE__ */
|
|
1029
|
+
return /* @__PURE__ */ r(
|
|
1029
1030
|
"div",
|
|
1030
1031
|
{
|
|
1031
1032
|
className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
|
|
1032
1033
|
onClick: a,
|
|
1033
1034
|
children: [
|
|
1034
|
-
/* @__PURE__ */ e(us, { checked:
|
|
1035
|
+
/* @__PURE__ */ e(us, { checked: n }),
|
|
1035
1036
|
/* @__PURE__ */ e(Ue, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fe, { className: "text-xs", children: t }) }),
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
+
/* @__PURE__ */ r("div", { className: "flex-1", children: [
|
|
1037
1038
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: s.name }),
|
|
1038
1039
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s.email })
|
|
1039
1040
|
] })
|
|
@@ -1043,9 +1044,9 @@ function ut({
|
|
|
1043
1044
|
}
|
|
1044
1045
|
function mt({
|
|
1045
1046
|
open: s,
|
|
1046
|
-
onOpenChange:
|
|
1047
|
+
onOpenChange: n
|
|
1047
1048
|
}) {
|
|
1048
|
-
const [a, t] = S("groups"), [o, i] = S(""), [u, m] = S(null), [f, b] = S(!1), [d, c] = S(null), { tokenProps: h } = U(), { currentUser: p } = ms(), v = Ja(), y = (p == null ? void 0 : p.type) === "tenant", N = h == null ? void 0 : h.tenantId, { groups: E, isLoading: T, refetch: R } =
|
|
1049
|
+
const [a, t] = S("groups"), [o, i] = S(""), [u, m] = S(null), [f, b] = S(!1), [d, c] = S(null), { tokenProps: h } = U(), { currentUser: p } = ms(), v = Ja(), y = (p == null ? void 0 : p.type) === "tenant", N = h == null ? void 0 : h.tenantId, { groups: E, isLoading: T, refetch: R } = na({
|
|
1049
1050
|
type: y ? "TENANT_GROUP" : "all",
|
|
1050
1051
|
tenantId: y ? N : void 0,
|
|
1051
1052
|
includeMembers: !1
|
|
@@ -1066,28 +1067,28 @@ function mt({
|
|
|
1066
1067
|
}, q = () => {
|
|
1067
1068
|
t("groups"), R();
|
|
1068
1069
|
};
|
|
1069
|
-
return /* @__PURE__ */
|
|
1070
|
-
/* @__PURE__ */ e(Oe, { open: s, onOpenChange:
|
|
1071
|
-
/* @__PURE__ */
|
|
1072
|
-
/* @__PURE__ */
|
|
1070
|
+
return /* @__PURE__ */ r(_, { children: [
|
|
1071
|
+
/* @__PURE__ */ e(Oe, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(_e, { className: "max-w-4xl max-h-[80vh]", children: [
|
|
1072
|
+
/* @__PURE__ */ r(Te, { children: [
|
|
1073
|
+
/* @__PURE__ */ r(Ge, { className: "flex items-center gap-2", children: [
|
|
1073
1074
|
/* @__PURE__ */ e(j, { className: "h-5 w-5" }),
|
|
1074
1075
|
"Group Management"
|
|
1075
1076
|
] }),
|
|
1076
|
-
/* @__PURE__ */ e(
|
|
1077
|
+
/* @__PURE__ */ e(rs, { children: "Manage your groups, create new groups, and control group membership" })
|
|
1077
1078
|
] }),
|
|
1078
|
-
/* @__PURE__ */
|
|
1079
|
-
/* @__PURE__ */
|
|
1080
|
-
/* @__PURE__ */
|
|
1079
|
+
/* @__PURE__ */ r(ls, { value: a, onValueChange: t, className: "mt-4", children: [
|
|
1080
|
+
/* @__PURE__ */ r(cs, { className: "grid w-full grid-cols-2", children: [
|
|
1081
|
+
/* @__PURE__ */ r(ne, { value: "groups", className: "flex items-center gap-2", children: [
|
|
1081
1082
|
/* @__PURE__ */ e(j, { className: "h-4 w-4" }),
|
|
1082
1083
|
"Groups"
|
|
1083
1084
|
] }),
|
|
1084
|
-
/* @__PURE__ */
|
|
1085
|
+
/* @__PURE__ */ r(ne, { value: "create", className: "flex items-center gap-2", children: [
|
|
1085
1086
|
/* @__PURE__ */ e(Ie, { className: "h-4 w-4" }),
|
|
1086
1087
|
"Create Group"
|
|
1087
1088
|
] })
|
|
1088
1089
|
] }),
|
|
1089
|
-
/* @__PURE__ */ e(oe, { value: "groups", className: "mt-4", children: /* @__PURE__ */
|
|
1090
|
-
/* @__PURE__ */
|
|
1090
|
+
/* @__PURE__ */ e(oe, { value: "groups", className: "mt-4", children: /* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
1091
|
+
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
1091
1092
|
/* @__PURE__ */ e(we, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
1092
1093
|
/* @__PURE__ */ e(
|
|
1093
1094
|
W,
|
|
@@ -1099,7 +1100,7 @@ function mt({
|
|
|
1099
1100
|
}
|
|
1100
1101
|
)
|
|
1101
1102
|
] }),
|
|
1102
|
-
/* @__PURE__ */ e(Ce, { className: "h-[400px]", children: T ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((w) => /* @__PURE__ */ e(De, { className: "h-24 w-full" }, w)) }) : k.length === 0 ? /* @__PURE__ */
|
|
1103
|
+
/* @__PURE__ */ e(Ce, { className: "h-[400px]", children: T ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((w) => /* @__PURE__ */ e(De, { className: "h-24 w-full" }, w)) }) : k.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
1103
1104
|
/* @__PURE__ */ e(j, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
1104
1105
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No groups found" }),
|
|
1105
1106
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: o ? "Try a different search" : "Create your first group to get started" })
|
|
@@ -1138,16 +1139,16 @@ function mt({
|
|
|
1138
1139
|
{
|
|
1139
1140
|
open: !!d,
|
|
1140
1141
|
onOpenChange: () => c(null),
|
|
1141
|
-
children: /* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
1142
|
+
children: /* @__PURE__ */ r(ps, { children: [
|
|
1143
|
+
/* @__PURE__ */ r(fs, { children: [
|
|
1143
1144
|
/* @__PURE__ */ e(gs, { children: "Delete Group" }),
|
|
1144
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ r(vs, { children: [
|
|
1145
1146
|
'Are you sure you want to delete "',
|
|
1146
1147
|
d == null ? void 0 : d.name,
|
|
1147
1148
|
'"? This action cannot be undone and will remove all members from the group.'
|
|
1148
1149
|
] })
|
|
1149
1150
|
] }),
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ r(bs, { children: [
|
|
1151
1152
|
/* @__PURE__ */ e(ys, { children: "Cancel" }),
|
|
1152
1153
|
/* @__PURE__ */ e(
|
|
1153
1154
|
Ee,
|
|
@@ -1155,7 +1156,7 @@ function mt({
|
|
|
1155
1156
|
onClick: P,
|
|
1156
1157
|
disabled: v.isPending,
|
|
1157
1158
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
1158
|
-
children: v.isPending ? /* @__PURE__ */
|
|
1159
|
+
children: v.isPending ? /* @__PURE__ */ r(_, { children: [
|
|
1159
1160
|
/* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
1160
1161
|
"Deleting..."
|
|
1161
1162
|
] }) : "Delete Group"
|
|
@@ -1169,37 +1170,37 @@ function mt({
|
|
|
1169
1170
|
}
|
|
1170
1171
|
function ht({
|
|
1171
1172
|
group: s,
|
|
1172
|
-
onManageMembers:
|
|
1173
|
+
onManageMembers: n,
|
|
1173
1174
|
onDelete: a,
|
|
1174
1175
|
currentUserId: t
|
|
1175
1176
|
}) {
|
|
1176
1177
|
const o = s.createdBy === t;
|
|
1177
|
-
return /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50", children: /* @__PURE__ */
|
|
1178
|
-
/* @__PURE__ */
|
|
1179
|
-
/* @__PURE__ */
|
|
1178
|
+
return /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50", children: /* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-3", children: [
|
|
1179
|
+
/* @__PURE__ */ r("div", { className: "flex-1 space-y-2", children: [
|
|
1180
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1180
1181
|
/* @__PURE__ */ e("h4", { className: "font-medium", children: s.name }),
|
|
1181
1182
|
s.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mt-1", children: s.description })
|
|
1182
1183
|
] }),
|
|
1183
|
-
/* @__PURE__ */
|
|
1184
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
|
|
1185
|
+
/* @__PURE__ */ r("span", { className: "flex items-center gap-1", children: [
|
|
1185
1186
|
/* @__PURE__ */ e(j, { className: "h-3 w-3" }),
|
|
1186
1187
|
s.memberCount,
|
|
1187
1188
|
" ",
|
|
1188
1189
|
s.memberCount === 1 ? "member" : "members"
|
|
1189
1190
|
] }),
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
+
/* @__PURE__ */ r("span", { children: [
|
|
1191
1192
|
"Created ",
|
|
1192
|
-
|
|
1193
|
+
Oa(new Date(s.createdAt), "MMM d, yyyy")
|
|
1193
1194
|
] })
|
|
1194
1195
|
] })
|
|
1195
1196
|
] }),
|
|
1196
|
-
/* @__PURE__ */
|
|
1197
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
|
|
1197
1198
|
/* @__PURE__ */ e(
|
|
1198
1199
|
M,
|
|
1199
1200
|
{
|
|
1200
1201
|
variant: "ghost",
|
|
1201
1202
|
size: "sm",
|
|
1202
|
-
onClick:
|
|
1203
|
+
onClick: n,
|
|
1203
1204
|
title: "Manage members",
|
|
1204
1205
|
children: /* @__PURE__ */ e(Le, { className: "h-4 w-4" })
|
|
1205
1206
|
}
|
|
@@ -1218,13 +1219,13 @@ function ht({
|
|
|
1218
1219
|
] })
|
|
1219
1220
|
] }) });
|
|
1220
1221
|
}
|
|
1221
|
-
function
|
|
1222
|
+
function wt() {
|
|
1222
1223
|
var He, Ke, Be;
|
|
1223
1224
|
const {
|
|
1224
1225
|
authToken: s,
|
|
1225
|
-
tokenProps:
|
|
1226
|
+
tokenProps: n,
|
|
1226
1227
|
id: a
|
|
1227
|
-
} = U(), { isLocalDev: t } =
|
|
1228
|
+
} = U(), { isLocalDev: t } = oa(), { permissions: o } = ka(), i = ia(), { isLoading: u } = la();
|
|
1228
1229
|
x((l) => l.theme);
|
|
1229
1230
|
const m = x((l) => l.lenses), f = x((l) => l.selectedLensId), b = m == null ? void 0 : m.find((l) => l.id === f), d = x((l) => l.dashboard);
|
|
1230
1231
|
x((l) => l.selectedSheetId);
|
|
@@ -1240,7 +1241,7 @@ function xt() {
|
|
|
1240
1241
|
(l) => l.initialDashboard
|
|
1241
1242
|
);
|
|
1242
1243
|
te((l) => l.selectedVisual), x((l) => l.selectedFrameId), We((l) => l.frame);
|
|
1243
|
-
const O = g ? (Ke = g == null ? void 0 : g.permissions) == null ? void 0 : Ke.canEdit : (He = D == null ? void 0 : D.permissions) == null ? void 0 : He.canEdit, F = x((l) => l.showFilters), X =
|
|
1244
|
+
const O = g ? (Ke = g == null ? void 0 : g.permissions) == null ? void 0 : Ke.canEdit : (He = D == null ? void 0 : D.permissions) == null ? void 0 : He.canEdit, F = x((l) => l.showFilters), X = ca((l) => l.setPanelOpen), Y = x(
|
|
1244
1245
|
(l) => l.showDashboardJSON
|
|
1245
1246
|
), me = x((l) => l.onSaveFunction), ks = x(
|
|
1246
1247
|
(l) => l.actions.setShowFilters
|
|
@@ -1248,10 +1249,10 @@ function xt() {
|
|
|
1248
1249
|
(l) => l.actions
|
|
1249
1250
|
), { setInitialDashboard: je, clearSelectedDashboard: Os } = te(
|
|
1250
1251
|
(l) => l.actions
|
|
1251
|
-
), { resources: Z } =
|
|
1252
|
+
), { resources: Z } = da(be.DASHBOARD), { currentUser: Is } = ms(), _s = ua(Is), H = g || D, qe = H ? {
|
|
1252
1253
|
id: H.id,
|
|
1253
1254
|
title: (d == null ? void 0 : d.title) || H.title || "Dashboard"
|
|
1254
|
-
} : null, { handleAddNewFrame: Ts } =
|
|
1255
|
+
} : null, { handleAddNewFrame: Ts } = ma(), [K, he] = S(!1), [Gs, ee] = S(!1), se = ha(be.DASHBOARD), [B, pe] = S(
|
|
1255
1256
|
null
|
|
1256
1257
|
), Rs = async (l, I) => {
|
|
1257
1258
|
if (!(d != null && d.id)) {
|
|
@@ -1277,7 +1278,7 @@ function xt() {
|
|
|
1277
1278
|
}
|
|
1278
1279
|
);
|
|
1279
1280
|
};
|
|
1280
|
-
|
|
1281
|
+
Ca(() => {
|
|
1281
1282
|
if (Z && Z.length > 0) {
|
|
1282
1283
|
const l = d == null ? void 0 : d.id;
|
|
1283
1284
|
if (l) {
|
|
@@ -1288,12 +1289,12 @@ function xt() {
|
|
|
1288
1289
|
}
|
|
1289
1290
|
}
|
|
1290
1291
|
}, [Z, d == null ? void 0 : d.id, je]);
|
|
1291
|
-
const ae =
|
|
1292
|
+
const ae = n.orgUserId || n.tenantId, Ps = c && !C && ae && O, { setDashboard: Us } = x((l) => l.actions), Fs = () => {
|
|
1292
1293
|
$e(!0);
|
|
1293
1294
|
}, fe = () => {
|
|
1294
1295
|
$e(!1), Ve(!1), pe(null);
|
|
1295
1296
|
};
|
|
1296
|
-
|
|
1297
|
+
Da(
|
|
1297
1298
|
c,
|
|
1298
1299
|
d,
|
|
1299
1300
|
B,
|
|
@@ -1309,7 +1310,7 @@ function xt() {
|
|
|
1309
1310
|
async function ge(l) {
|
|
1310
1311
|
const I = (l == null ? void 0 : l.closeAfterSave) ?? q;
|
|
1311
1312
|
w(I), I && ee(!1);
|
|
1312
|
-
const Q =
|
|
1313
|
+
const Q = wa(d);
|
|
1313
1314
|
k(!0), G(null), he(!0);
|
|
1314
1315
|
const Ks = {
|
|
1315
1316
|
template: d
|
|
@@ -1337,7 +1338,7 @@ function xt() {
|
|
|
1337
1338
|
filterValues: ue
|
|
1338
1339
|
};
|
|
1339
1340
|
await Me(
|
|
1340
|
-
|
|
1341
|
+
n.apiServiceUrl,
|
|
1341
1342
|
I,
|
|
1342
1343
|
s == null ? void 0 : s.accessToken
|
|
1343
1344
|
), A.success("Lens saved"), me == null || me(d), v(!1);
|
|
@@ -1349,15 +1350,15 @@ function xt() {
|
|
|
1349
1350
|
dashboardId: d == null ? void 0 : d.id,
|
|
1350
1351
|
currentLensName: b == null ? void 0 : b.name
|
|
1351
1352
|
});
|
|
1352
|
-
const Hs =
|
|
1353
|
-
return /* @__PURE__ */
|
|
1353
|
+
const Hs = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail;
|
|
1354
|
+
return /* @__PURE__ */ r(
|
|
1354
1355
|
"div",
|
|
1355
1356
|
{
|
|
1356
1357
|
className: "flex h-11 shrink-0 items-center justify-between gap-2 overflow-x-auto border-b px-4 py-2",
|
|
1357
1358
|
role: "dashboard-controls",
|
|
1358
1359
|
children: [
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
Hs && /* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
1361
|
+
Hs && /* @__PURE__ */ r(_, { children: [
|
|
1361
1362
|
/* @__PURE__ */ e(
|
|
1362
1363
|
$,
|
|
1363
1364
|
{
|
|
@@ -1377,15 +1378,15 @@ function xt() {
|
|
|
1377
1378
|
tooltip: "Dashboard Hub",
|
|
1378
1379
|
onClick: () => Os(),
|
|
1379
1380
|
className: "h-7 p-2",
|
|
1380
|
-
children: /* @__PURE__ */ e(
|
|
1381
|
+
children: /* @__PURE__ */ e(ns, { className: "h-4 w-4" })
|
|
1381
1382
|
}
|
|
1382
1383
|
)
|
|
1383
1384
|
] }),
|
|
1384
|
-
!C && i && (u ? /* @__PURE__ */
|
|
1385
|
+
!C && i && (u ? /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
1385
1386
|
/* @__PURE__ */ e(V, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
|
|
1386
1387
|
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
|
|
1387
1388
|
] }) : /* @__PURE__ */ e(
|
|
1388
|
-
|
|
1389
|
+
pa,
|
|
1389
1390
|
{
|
|
1390
1391
|
value: ze || "Untitled Dashboard",
|
|
1391
1392
|
onSave: (l) => {
|
|
@@ -1405,12 +1406,12 @@ function xt() {
|
|
|
1405
1406
|
}
|
|
1406
1407
|
))
|
|
1407
1408
|
] }),
|
|
1408
|
-
/* @__PURE__ */
|
|
1409
|
-
C && /* @__PURE__ */
|
|
1410
|
-
/* @__PURE__ */ e(
|
|
1411
|
-
/* @__PURE__ */ e(
|
|
1409
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
1410
|
+
C && /* @__PURE__ */ r(_, { children: [
|
|
1411
|
+
/* @__PURE__ */ e(La, { className: "mr-2" }),
|
|
1412
|
+
/* @__PURE__ */ e(Ea, { className: "h-7" })
|
|
1412
1413
|
] }),
|
|
1413
|
-
t && !C && /* @__PURE__ */
|
|
1414
|
+
t && !C && /* @__PURE__ */ r(_, { children: [
|
|
1414
1415
|
/* @__PURE__ */ e(
|
|
1415
1416
|
$,
|
|
1416
1417
|
{
|
|
@@ -1420,21 +1421,21 @@ function xt() {
|
|
|
1420
1421
|
s != null && s.accessToken && ((l = navigator == null ? void 0 : navigator.clipboard) != null && l.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => A.success("Token copied to clipboard")).catch(() => A.error("Unable to copy token")) : A.error("Clipboard not available"));
|
|
1421
1422
|
},
|
|
1422
1423
|
className: "h-7 p-2",
|
|
1423
|
-
children: /* @__PURE__ */ e(
|
|
1424
|
+
children: /* @__PURE__ */ e(fa, { className: "h-4 w-4" })
|
|
1424
1425
|
}
|
|
1425
1426
|
),
|
|
1426
1427
|
/* @__PURE__ */ e(
|
|
1427
1428
|
$,
|
|
1428
1429
|
{
|
|
1429
1430
|
tooltip: "Invalidate Token",
|
|
1430
|
-
onClick: () =>
|
|
1431
|
+
onClick: () => ga(n.apiServiceUrl),
|
|
1431
1432
|
className: "h-7 p-2",
|
|
1432
1433
|
children: /* @__PURE__ */ e(Ga, { className: "h-4 w-4" })
|
|
1433
1434
|
}
|
|
1434
1435
|
)
|
|
1435
1436
|
] }),
|
|
1436
|
-
!C && i && /* @__PURE__ */ e(
|
|
1437
|
-
!C && i && /* @__PURE__ */ e(
|
|
1437
|
+
!C && i && /* @__PURE__ */ e(va, {}),
|
|
1438
|
+
!C && i && /* @__PURE__ */ e(Aa, {}),
|
|
1438
1439
|
!C && i && _s && /* @__PURE__ */ e(
|
|
1439
1440
|
$,
|
|
1440
1441
|
{
|
|
@@ -1450,7 +1451,7 @@ function xt() {
|
|
|
1450
1451
|
tooltip: "Share Dashboard",
|
|
1451
1452
|
onClick: () => N(!0),
|
|
1452
1453
|
className: "h-7 p-2",
|
|
1453
|
-
children: /* @__PURE__ */ e(
|
|
1454
|
+
children: /* @__PURE__ */ e(ba, { className: "h-4 w-4" })
|
|
1454
1455
|
}
|
|
1455
1456
|
),
|
|
1456
1457
|
!F && !C && c && o.canUseFilters && i && /* @__PURE__ */ e(
|
|
@@ -1462,12 +1463,12 @@ function xt() {
|
|
|
1462
1463
|
X("dashboard", !1), ks(!0);
|
|
1463
1464
|
},
|
|
1464
1465
|
size: "sm",
|
|
1465
|
-
children: /* @__PURE__ */ e(
|
|
1466
|
+
children: /* @__PURE__ */ e(ya, { className: "h-4 w-4" })
|
|
1466
1467
|
}
|
|
1467
1468
|
),
|
|
1468
1469
|
c && !C && ae && t && i && /* @__PURE__ */ e(qa, {}),
|
|
1469
1470
|
!C && ae && t && i && /* @__PURE__ */ e(za, {}),
|
|
1470
|
-
c && !C && ae && b && t && i && /* @__PURE__ */
|
|
1471
|
+
c && !C && ae && b && t && i && /* @__PURE__ */ r(
|
|
1471
1472
|
M,
|
|
1472
1473
|
{
|
|
1473
1474
|
className: "h-7 p-2",
|
|
@@ -1481,7 +1482,7 @@ function xt() {
|
|
|
1481
1482
|
]
|
|
1482
1483
|
}
|
|
1483
1484
|
),
|
|
1484
|
-
c && !C && i && /* @__PURE__ */
|
|
1485
|
+
c && !C && i && /* @__PURE__ */ r(
|
|
1485
1486
|
M,
|
|
1486
1487
|
{
|
|
1487
1488
|
variant: "outline",
|
|
@@ -1495,7 +1496,7 @@ function xt() {
|
|
|
1495
1496
|
]
|
|
1496
1497
|
}
|
|
1497
1498
|
),
|
|
1498
|
-
!C && !c && O && i && /* @__PURE__ */
|
|
1499
|
+
!C && !c && O && i && /* @__PURE__ */ r(
|
|
1499
1500
|
M,
|
|
1500
1501
|
{
|
|
1501
1502
|
variant: "outline",
|
|
@@ -1503,12 +1504,12 @@ function xt() {
|
|
|
1503
1504
|
onClick: Fs,
|
|
1504
1505
|
size: "sm",
|
|
1505
1506
|
children: [
|
|
1506
|
-
/* @__PURE__ */ e(
|
|
1507
|
+
/* @__PURE__ */ e(Na, { className: "mr-2 h-4 w-4" }),
|
|
1507
1508
|
"Edit"
|
|
1508
1509
|
]
|
|
1509
1510
|
}
|
|
1510
1511
|
),
|
|
1511
|
-
Ps && i && /* @__PURE__ */
|
|
1512
|
+
Ps && i && /* @__PURE__ */ r(
|
|
1512
1513
|
M,
|
|
1513
1514
|
{
|
|
1514
1515
|
className: "h-7 p-2",
|
|
@@ -1528,11 +1529,11 @@ function xt() {
|
|
|
1528
1529
|
onClick: () => Ve(!Y),
|
|
1529
1530
|
size: "sm",
|
|
1530
1531
|
variant: "ghost",
|
|
1531
|
-
children: /* @__PURE__ */ e(
|
|
1532
|
+
children: /* @__PURE__ */ e(Sa, { className: "h-4 w-4" })
|
|
1532
1533
|
}
|
|
1533
1534
|
) }),
|
|
1534
1535
|
!C && t && /* @__PURE__ */ e($a, {}),
|
|
1535
|
-
c && !C && i && /* @__PURE__ */
|
|
1536
|
+
c && !C && i && /* @__PURE__ */ r(
|
|
1536
1537
|
M,
|
|
1537
1538
|
{
|
|
1538
1539
|
variant: "outline",
|
|
@@ -1545,7 +1546,7 @@ function xt() {
|
|
|
1545
1546
|
}
|
|
1546
1547
|
),
|
|
1547
1548
|
y && qe && /* @__PURE__ */ e(
|
|
1548
|
-
|
|
1549
|
+
xa,
|
|
1549
1550
|
{
|
|
1550
1551
|
resource: qe,
|
|
1551
1552
|
resourceType: be.DASHBOARD,
|
|
@@ -1566,12 +1567,12 @@ function xt() {
|
|
|
1566
1567
|
onOpenChange: (l) => {
|
|
1567
1568
|
!l && K && !P || (k(l), l || (G(null), w(!1)));
|
|
1568
1569
|
},
|
|
1569
|
-
children: /* @__PURE__ */
|
|
1570
|
-
/* @__PURE__ */
|
|
1570
|
+
children: /* @__PURE__ */ r(ps, { className: "max-w-sm", children: [
|
|
1571
|
+
/* @__PURE__ */ r(fs, { children: [
|
|
1571
1572
|
/* @__PURE__ */ e(gs, { children: P ? "Save failed" : "Saving dashboard" }),
|
|
1572
1573
|
/* @__PURE__ */ e(vs, { className: "pt-2", children: P ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
|
|
1573
1574
|
] }),
|
|
1574
|
-
/* @__PURE__ */ e(bs, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: P ? /* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ e(bs, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: P ? /* @__PURE__ */ r(_, { children: [
|
|
1575
1576
|
/* @__PURE__ */ e(
|
|
1576
1577
|
ys,
|
|
1577
1578
|
{
|
|
@@ -1590,7 +1591,7 @@ function xt() {
|
|
|
1590
1591
|
children: "Retry"
|
|
1591
1592
|
}
|
|
1592
1593
|
)
|
|
1593
|
-
] }) : /* @__PURE__ */
|
|
1594
|
+
] }) : /* @__PURE__ */ r(
|
|
1594
1595
|
Ee,
|
|
1595
1596
|
{
|
|
1596
1597
|
disabled: !0,
|
|
@@ -1605,7 +1606,7 @@ function xt() {
|
|
|
1605
1606
|
}
|
|
1606
1607
|
),
|
|
1607
1608
|
/* @__PURE__ */ e(
|
|
1608
|
-
|
|
1609
|
+
Ma,
|
|
1609
1610
|
{
|
|
1610
1611
|
open: Gs,
|
|
1611
1612
|
onOpenChange: ee,
|
|
@@ -1620,5 +1621,5 @@ function xt() {
|
|
|
1620
1621
|
);
|
|
1621
1622
|
}
|
|
1622
1623
|
export {
|
|
1623
|
-
|
|
1624
|
+
wt as default
|
|
1624
1625
|
};
|