react-semaphor 0.1.132 → 0.1.134
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-DQMFJcPB.js → dashboard-controls-bovlMmw3.js} +1 -1
- package/dist/chunks/{dashboard-controls-CWG6EatR.js → dashboard-controls-ecdj2GHc.js} +207 -207
- package/dist/chunks/{dashboard-export-dialog-DofqNYdv.js → dashboard-export-dialog-CK5b2y_K.js} +31 -31
- package/dist/chunks/{dashboard-export-dialog-CYRUEIF0.js → dashboard-export-dialog-D5jbZpR7.js} +1 -1
- package/dist/chunks/{dashboard-json-D5b7lskH.js → dashboard-json-DKVaKR05.js} +1 -1
- package/dist/chunks/{dashboard-json-CfXtWYQo.js → dashboard-json-DUtSSb_n.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-CSfaO06L.js → edit-dashboard-visual-BHmq3HBV.js} +2131 -2182
- package/dist/chunks/edit-dashboard-visual-CSw8uIEZ.js +195 -0
- package/dist/chunks/{editor-action-buttons-7cxzFlCm.js → editor-action-buttons-D7ofzkZ0.js} +2 -2
- package/dist/chunks/{editor-action-buttons-DWHiK2yJ.js → editor-action-buttons-xX1IQPAT.js} +1 -1
- package/dist/chunks/{index-B6RYfqnr.js → index-Ba5bDBGc.js} +200 -200
- package/dist/chunks/{index-CRA38qes.js → index-BbG-vwjD.js} +16134 -15848
- package/dist/chunks/{resource-management-panel-DnKFfVOc.js → resource-management-panel-Bewt6347.js} +116 -116
- package/dist/chunks/{resource-management-panel-CC_r1yro.js → resource-management-panel-CrQMV9vG.js} +1 -1
- package/dist/chunks/{use-visual-utils-CZNuwJRU.js → use-visual-utils-BijuWjGP.js} +1 -1
- package/dist/chunks/{use-visual-utils-B41g03Pc.js → use-visual-utils-auHWALCR.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +30 -29
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/dashboard.d.ts +9 -0
- package/dist/types/main.d.ts +20 -0
- package/dist/types/surfboard.d.ts +9 -0
- package/dist/types/types.d.ts +9 -0
- package/package.json +1 -1
- package/dist/chunks/edit-dashboard-visual-C4ur0h-P.js +0 -195
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { b as X,
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { b as X, bC as qs, bD as _s, u as y, aG as Be, aH as Je, B as k, aJ as We, aK as fe, bE as Me, g as Xe, an as U, as as ke, bF as $s, b8 as Le, at as Ae, au as Ie, av as Ee, aw as Ye, ax as be, b1 as W, aB as js, I as q, bG as Vs, bc as Qs, bH as Hs, bI as Ve, bJ as Ze, c as Y, bK as es, b4 as Ks, h as le, bL as ce, l as L, bM as ss, az as Bs, bN as Js, L as _, bb as $, bO as Ws, bP as Xs, bQ as Ys, bR as as, bS as ts, bT as oe, bU as ie, bz as Ne, bj as ye, bV as we, bd as ns, bW as xe, aA as rs, bh as os, bX as Zs, aO as is, aP as ls, aQ as cs, aS as ds, aT as us, aU as ms, aV as hs, aW as Ce, bY as ea, b6 as sa, bu as aa, bZ as ta, A as na, f as Qe, aE as ne, b_ as ra, R as ve, b$ as oa, c0 as ia, c1 as la, c2 as ca, b9 as da, V as ua, c3 as ma, c4 as ha, c5 as pa, c6 as ga, K as fa, T as va } from "./index-BbG-vwjD.js";
|
|
3
3
|
import * as D from "react";
|
|
4
|
-
import { useState as b, useMemo as
|
|
4
|
+
import { useState as b, useMemo as re, useEffect as ba } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { D as Na, u as ya, A as wa, V as xa, S as Ca, U as Da } from "./dashboard-export-dialog-
|
|
7
|
-
import { S as He } from "./editor-action-buttons-
|
|
6
|
+
import { D as Na, u as ya, A as wa, V as xa, S as Ca, U as Da } from "./dashboard-export-dialog-CK5b2y_K.js";
|
|
7
|
+
import { S as He } from "./editor-action-buttons-D7ofzkZ0.js";
|
|
8
8
|
/**
|
|
9
9
|
* @license lucide-react v0.453.0 - ISC
|
|
10
10
|
*
|
|
@@ -74,11 +74,11 @@ const Aa = X("Sun", [
|
|
|
74
74
|
]);
|
|
75
75
|
var Ia = qs();
|
|
76
76
|
function Ea() {
|
|
77
|
-
const { setTheme: s } = _s(),
|
|
77
|
+
const { setTheme: s } = _s(), n = y(
|
|
78
78
|
(a) => a.actions.setDashboardTheme
|
|
79
79
|
);
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */ e(
|
|
80
|
+
return /* @__PURE__ */ r(Be, { children: [
|
|
81
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ r(k, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
|
|
82
82
|
/* @__PURE__ */ e(
|
|
83
83
|
Aa,
|
|
84
84
|
{
|
|
@@ -95,12 +95,12 @@ function Ea() {
|
|
|
95
95
|
),
|
|
96
96
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
|
|
97
97
|
] }) }),
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ r(We, { align: "end", children: [
|
|
99
99
|
/* @__PURE__ */ e(
|
|
100
100
|
fe,
|
|
101
101
|
{
|
|
102
102
|
onClick: () => {
|
|
103
|
-
s("light"),
|
|
103
|
+
s("light"), n("light");
|
|
104
104
|
},
|
|
105
105
|
children: "Light"
|
|
106
106
|
}
|
|
@@ -109,7 +109,7 @@ function Ea() {
|
|
|
109
109
|
fe,
|
|
110
110
|
{
|
|
111
111
|
onClick: () => {
|
|
112
|
-
s("dark"),
|
|
112
|
+
s("dark"), n("dark");
|
|
113
113
|
},
|
|
114
114
|
children: "Dark"
|
|
115
115
|
}
|
|
@@ -118,7 +118,7 @@ function Ea() {
|
|
|
118
118
|
fe,
|
|
119
119
|
{
|
|
120
120
|
onClick: () => {
|
|
121
|
-
s("system"),
|
|
121
|
+
s("system"), n("system");
|
|
122
122
|
},
|
|
123
123
|
children: "System"
|
|
124
124
|
}
|
|
@@ -126,21 +126,21 @@ function Ea() {
|
|
|
126
126
|
] })
|
|
127
127
|
] });
|
|
128
128
|
}
|
|
129
|
-
async function Ta(s,
|
|
129
|
+
async function Ta(s, n, a, t, l) {
|
|
130
130
|
if (!l)
|
|
131
131
|
return null;
|
|
132
132
|
const o = JSON.stringify(a), c = `${s}/v1/lens`;
|
|
133
133
|
return await Me(c, l, {
|
|
134
|
-
name:
|
|
134
|
+
name: n,
|
|
135
135
|
template: o,
|
|
136
136
|
filterValues: t,
|
|
137
137
|
operation: "create"
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
-
async function De(s,
|
|
140
|
+
async function De(s, n, a) {
|
|
141
141
|
if (!a)
|
|
142
142
|
return null;
|
|
143
|
-
const { id: t, template: l, filterValues: o, isDefault: c, shared: u } =
|
|
143
|
+
const { id: t, template: l, filterValues: o, isDefault: c, shared: u } = n, p = `${s}/v1/lens`;
|
|
144
144
|
return await Me(p, a, {
|
|
145
145
|
lensId: t,
|
|
146
146
|
template: l,
|
|
@@ -150,17 +150,17 @@ async function De(s, r, a) {
|
|
|
150
150
|
operation: "update"
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
async function Pa(s,
|
|
153
|
+
async function Pa(s, n, a) {
|
|
154
154
|
if (!a)
|
|
155
155
|
return null;
|
|
156
156
|
const t = `${s}/v1/lens`;
|
|
157
157
|
return await Me(t, a, {
|
|
158
158
|
operation: "delete",
|
|
159
|
-
lensId:
|
|
159
|
+
lensId: n
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
function Ga() {
|
|
163
|
-
const [s,
|
|
163
|
+
const [s, n] = b(""), [a, t] = b(!1), l = y((C) => C.lenses), { setLenses: o, setSelectedLensId: c } = Xe(), [u, p] = b(!1), [f, d] = b(!1), m = y((C) => C.dashboard), g = y((C) => C.filterValues), { authToken: v, tokenProps: N } = U();
|
|
164
164
|
async function w() {
|
|
165
165
|
p(!0);
|
|
166
166
|
const C = await Ta(
|
|
@@ -172,8 +172,8 @@ function Ga() {
|
|
|
172
172
|
);
|
|
173
173
|
C && (o([...l || [], C]), c(C.id), d(!1)), p(!1);
|
|
174
174
|
}
|
|
175
|
-
return /* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */ e($s, { asChild: !0, children: /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ r(ke, { open: f, onOpenChange: d, children: [
|
|
176
|
+
/* @__PURE__ */ e($s, { asChild: !0, children: /* @__PURE__ */ r(
|
|
177
177
|
k,
|
|
178
178
|
{
|
|
179
179
|
variant: "secondary",
|
|
@@ -185,19 +185,19 @@ function Ga() {
|
|
|
185
185
|
]
|
|
186
186
|
}
|
|
187
187
|
) }),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ r(Ae, { className: "sm:max-w-[425px]", children: [
|
|
189
|
+
/* @__PURE__ */ r(Ie, { children: [
|
|
190
190
|
/* @__PURE__ */ e(Ee, { children: "Create Lens" }),
|
|
191
191
|
/* @__PURE__ */ e(Ye, { children: "Lenses are private by default and are only visible to you." })
|
|
192
192
|
] }),
|
|
193
|
-
/* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-8 items-center gap-4", children: [
|
|
194
194
|
/* @__PURE__ */ e(be, { className: "text-right", children: "Name" }),
|
|
195
195
|
/* @__PURE__ */ e(
|
|
196
196
|
W,
|
|
197
197
|
{
|
|
198
198
|
value: s,
|
|
199
199
|
onChange: (C) => {
|
|
200
|
-
|
|
200
|
+
n(C.target.value);
|
|
201
201
|
},
|
|
202
202
|
id: "name",
|
|
203
203
|
className: "col-span-7 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
|
|
@@ -220,7 +220,7 @@ function Ga() {
|
|
|
220
220
|
] });
|
|
221
221
|
}
|
|
222
222
|
function Fa() {
|
|
223
|
-
const [s,
|
|
223
|
+
const [s, n] = b(!1), a = y((m) => m.lenses), t = y((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: o } = Xe(), { authToken: c, tokenProps: u } = U();
|
|
224
224
|
async function p(m) {
|
|
225
225
|
o(m);
|
|
226
226
|
}
|
|
@@ -253,26 +253,26 @@ function Fa() {
|
|
|
253
253
|
await De(u.apiServiceUrl, w, c == null ? void 0 : c.accessToken);
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
return /* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */ e(
|
|
258
|
-
/* @__PURE__ */
|
|
256
|
+
return /* @__PURE__ */ r(Be, { open: s, onOpenChange: n, children: [
|
|
257
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(q, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Sa, { className: "h-4 w-4" }) }) }),
|
|
258
|
+
/* @__PURE__ */ r(We, { align: "end", className: "w-60", children: [
|
|
259
259
|
/* @__PURE__ */ e(Vs, { className: "px-3", children: "Lenses" }),
|
|
260
260
|
/* @__PURE__ */ e(Qs, {}),
|
|
261
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ r(
|
|
262
262
|
Hs,
|
|
263
263
|
{
|
|
264
264
|
value: t,
|
|
265
265
|
onValueChange: p,
|
|
266
266
|
children: [
|
|
267
267
|
/* @__PURE__ */ e(Ve, { value: "original", children: "Original" }),
|
|
268
|
-
a == null ? void 0 : a.map((m) => /* @__PURE__ */
|
|
268
|
+
a == null ? void 0 : a.map((m) => /* @__PURE__ */ r(
|
|
269
269
|
Ve,
|
|
270
270
|
{
|
|
271
271
|
className: "group flex justify-between gap-2",
|
|
272
272
|
value: m.id,
|
|
273
273
|
children: [
|
|
274
274
|
/* @__PURE__ */ e("p", { children: m.name }),
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ r("span", { className: "flex items-center gap-3", children: [
|
|
276
276
|
/* @__PURE__ */ e(
|
|
277
277
|
Ze,
|
|
278
278
|
{
|
|
@@ -313,8 +313,8 @@ function Fa() {
|
|
|
313
313
|
function Oa({
|
|
314
314
|
iconClassName: s
|
|
315
315
|
}) {
|
|
316
|
-
const [
|
|
317
|
-
return /* @__PURE__ */
|
|
316
|
+
const [n, a] = b(!1), t = y((l) => l.isDownloadingPdf);
|
|
317
|
+
return /* @__PURE__ */ r(I, { children: [
|
|
318
318
|
/* @__PURE__ */ e(
|
|
319
319
|
k,
|
|
320
320
|
{
|
|
@@ -323,41 +323,41 @@ function Oa({
|
|
|
323
323
|
className: "h-7 p-2",
|
|
324
324
|
disabled: t,
|
|
325
325
|
onClick: () => a(!0),
|
|
326
|
-
children: /* @__PURE__ */ e(
|
|
326
|
+
children: /* @__PURE__ */ e(Ks, { className: Y("size-4", s) })
|
|
327
327
|
}
|
|
328
328
|
),
|
|
329
329
|
/* @__PURE__ */ e(
|
|
330
330
|
Na,
|
|
331
331
|
{
|
|
332
|
-
open:
|
|
332
|
+
open: n,
|
|
333
333
|
onOpenChange: a
|
|
334
334
|
}
|
|
335
335
|
)
|
|
336
336
|
] });
|
|
337
337
|
}
|
|
338
|
-
const Ra = async (s,
|
|
338
|
+
const Ra = async (s, n, a) => {
|
|
339
339
|
const t = `${s}/management/v1/groups`;
|
|
340
|
-
return await ss(t,
|
|
341
|
-
}, Ua = async (s,
|
|
340
|
+
return await ss(t, n, a);
|
|
341
|
+
}, Ua = async (s, n, a) => {
|
|
342
342
|
const t = `${s}/management/v1/groups/${a}`, l = await fetch(t, {
|
|
343
343
|
method: "DELETE",
|
|
344
344
|
headers: {
|
|
345
|
-
Authorization: `Bearer ${
|
|
345
|
+
Authorization: `Bearer ${n}`
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
348
|
if (!l.ok) {
|
|
349
349
|
const o = await l.text();
|
|
350
350
|
throw new Error(o || "Failed to delete group");
|
|
351
351
|
}
|
|
352
|
-
}, za = async (s,
|
|
352
|
+
}, za = async (s, n, a, t) => {
|
|
353
353
|
const l = `${s}/management/v1/groups/${a}/members`;
|
|
354
|
-
return await ss(l,
|
|
355
|
-
}, qa = async (s,
|
|
354
|
+
return await ss(l, n, t);
|
|
355
|
+
}, qa = async (s, n, a, t) => {
|
|
356
356
|
const l = `${s}/management/v1/groups/${a}/members`, o = await fetch(l, {
|
|
357
357
|
method: "DELETE",
|
|
358
358
|
headers: {
|
|
359
359
|
"Content-Type": "application/json",
|
|
360
|
-
Authorization: `Bearer ${
|
|
360
|
+
Authorization: `Bearer ${n}`
|
|
361
361
|
},
|
|
362
362
|
body: JSON.stringify(t)
|
|
363
363
|
});
|
|
@@ -367,9 +367,9 @@ const Ra = async (s, r, a) => {
|
|
|
367
367
|
}
|
|
368
368
|
};
|
|
369
369
|
function _a() {
|
|
370
|
-
const { authToken: s, tokenProps:
|
|
370
|
+
const { authToken: s, tokenProps: n } = U(), a = le();
|
|
371
371
|
return ce({
|
|
372
|
-
mutationFn: (t) => Ra(
|
|
372
|
+
mutationFn: (t) => Ra(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
|
|
373
373
|
onSuccess: () => {
|
|
374
374
|
a.invalidateQueries({ queryKey: ["groups"] }), L.success("Group created successfully");
|
|
375
375
|
},
|
|
@@ -381,9 +381,9 @@ function _a() {
|
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
383
|
function $a() {
|
|
384
|
-
const { authToken: s, tokenProps:
|
|
384
|
+
const { authToken: s, tokenProps: n } = U(), a = le();
|
|
385
385
|
return ce({
|
|
386
|
-
mutationFn: (t) => Ua(
|
|
386
|
+
mutationFn: (t) => Ua(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
|
|
387
387
|
onSuccess: (t, l) => {
|
|
388
388
|
a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", l] }), L.success("Group deleted successfully");
|
|
389
389
|
},
|
|
@@ -395,12 +395,12 @@ function $a() {
|
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
397
|
function ja() {
|
|
398
|
-
const { authToken: s, tokenProps:
|
|
398
|
+
const { authToken: s, tokenProps: n } = U(), a = le();
|
|
399
399
|
return ce({
|
|
400
400
|
mutationFn: ({
|
|
401
401
|
groupId: t,
|
|
402
402
|
data: l
|
|
403
|
-
}) => za(
|
|
403
|
+
}) => za(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, l),
|
|
404
404
|
onSuccess: (t, l) => {
|
|
405
405
|
a.invalidateQueries({ queryKey: ["group", l.groupId] }), a.invalidateQueries({
|
|
406
406
|
queryKey: ["group-members", l.groupId]
|
|
@@ -414,12 +414,12 @@ function ja() {
|
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
416
|
function Va() {
|
|
417
|
-
const { authToken: s, tokenProps:
|
|
417
|
+
const { authToken: s, tokenProps: n } = U(), a = le();
|
|
418
418
|
return ce({
|
|
419
419
|
mutationFn: ({
|
|
420
420
|
groupId: t,
|
|
421
421
|
data: l
|
|
422
|
-
}) => qa(
|
|
422
|
+
}) => qa(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, l),
|
|
423
423
|
onSuccess: (t, l) => {
|
|
424
424
|
a.invalidateQueries({ queryKey: ["group", l.groupId] }), a.invalidateQueries({
|
|
425
425
|
queryKey: ["group-members", l.groupId]
|
|
@@ -434,20 +434,20 @@ function Va() {
|
|
|
434
434
|
}
|
|
435
435
|
function Qa({
|
|
436
436
|
onSuccess: s,
|
|
437
|
-
tenantId:
|
|
437
|
+
tenantId: n,
|
|
438
438
|
isTenantUser: a
|
|
439
439
|
}) {
|
|
440
440
|
const [t, l] = b(""), [o, c] = b(""), [u, p] = b({}), f = _a(), d = () => {
|
|
441
441
|
const g = {};
|
|
442
442
|
return t.trim() ? t.length < 3 ? g.name = "Group name must be at least 3 characters" : t.length > 50 && (g.name = "Group name must be less than 50 characters") : g.name = "Group name is required", o && o.length > 200 && (g.description = "Description must be less than 200 characters"), p(g), Object.keys(g).length === 0;
|
|
443
443
|
};
|
|
444
|
-
return /* @__PURE__ */
|
|
444
|
+
return /* @__PURE__ */ r("form", { onSubmit: async (g) => {
|
|
445
445
|
if (g.preventDefault(), !d()) return;
|
|
446
446
|
const v = {
|
|
447
447
|
name: t.trim(),
|
|
448
448
|
description: o.trim() || void 0,
|
|
449
449
|
type: a ? "TENANT_GROUP" : "ORG_GROUP",
|
|
450
|
-
...a &&
|
|
450
|
+
...a && n ? { tenantId: n } : {}
|
|
451
451
|
};
|
|
452
452
|
try {
|
|
453
453
|
await f.mutateAsync(v), l(""), c(""), p({}), s();
|
|
@@ -455,9 +455,9 @@ function Qa({
|
|
|
455
455
|
console.error("Failed to create group:", N);
|
|
456
456
|
}
|
|
457
457
|
}, className: "space-y-6", children: [
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
459
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
460
|
+
/* @__PURE__ */ r(be, { htmlFor: "group-name", children: [
|
|
461
461
|
"Group Name ",
|
|
462
462
|
/* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
|
|
463
463
|
] }),
|
|
@@ -476,13 +476,13 @@ function Qa({
|
|
|
476
476
|
),
|
|
477
477
|
u.name && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: u.name })
|
|
478
478
|
] }),
|
|
479
|
-
/* @__PURE__ */
|
|
480
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
480
|
+
/* @__PURE__ */ r(be, { htmlFor: "group-description", children: [
|
|
481
481
|
"Description",
|
|
482
482
|
/* @__PURE__ */ e("span", { className: "ml-2 text-xs text-muted-foreground", children: "(optional)" })
|
|
483
483
|
] }),
|
|
484
484
|
/* @__PURE__ */ e(
|
|
485
|
-
|
|
485
|
+
Bs,
|
|
486
486
|
{
|
|
487
487
|
id: "group-description",
|
|
488
488
|
placeholder: "Describe the purpose of this group...",
|
|
@@ -496,17 +496,17 @@ function Qa({
|
|
|
496
496
|
}
|
|
497
497
|
),
|
|
498
498
|
u.description && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: u.description }),
|
|
499
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: [
|
|
500
500
|
o.length,
|
|
501
501
|
"/200 characters"
|
|
502
502
|
] })
|
|
503
503
|
] }),
|
|
504
|
-
/* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */
|
|
505
|
-
/* @__PURE__ */ e(
|
|
504
|
+
/* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */ r("div", { className: "flex gap-3", children: [
|
|
505
|
+
/* @__PURE__ */ e(Js, { className: "h-4 w-4 mt-0.5 text-muted-foreground" }),
|
|
506
506
|
/* @__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." })
|
|
507
507
|
] }) })
|
|
508
508
|
] }),
|
|
509
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ r("div", { className: "flex justify-end gap-3", children: [
|
|
510
510
|
/* @__PURE__ */ e(
|
|
511
511
|
k,
|
|
512
512
|
{
|
|
@@ -524,10 +524,10 @@ function Qa({
|
|
|
524
524
|
{
|
|
525
525
|
type: "submit",
|
|
526
526
|
disabled: f.isPending || !t.trim(),
|
|
527
|
-
children: f.isPending ? /* @__PURE__ */
|
|
527
|
+
children: f.isPending ? /* @__PURE__ */ r(I, { children: [
|
|
528
528
|
/* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
529
529
|
"Creating..."
|
|
530
|
-
] }) : /* @__PURE__ */
|
|
530
|
+
] }) : /* @__PURE__ */ r(I, { children: [
|
|
531
531
|
/* @__PURE__ */ e($, { className: "mr-2 h-4 w-4" }),
|
|
532
532
|
"Create Group"
|
|
533
533
|
] })
|
|
@@ -536,7 +536,7 @@ function Qa({
|
|
|
536
536
|
] })
|
|
537
537
|
] });
|
|
538
538
|
}
|
|
539
|
-
function Ha(s,
|
|
539
|
+
function Ha(s, n = []) {
|
|
540
540
|
let a = [];
|
|
541
541
|
function t(o, c) {
|
|
542
542
|
const u = D.createContext(c), p = a.length;
|
|
@@ -566,11 +566,11 @@ function Ha(s, r = []) {
|
|
|
566
566
|
);
|
|
567
567
|
};
|
|
568
568
|
};
|
|
569
|
-
return l.scopeName = s, [t,
|
|
569
|
+
return l.scopeName = s, [t, Ka(l, ...n)];
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
const
|
|
573
|
-
if (s.length === 1) return
|
|
571
|
+
function Ka(...s) {
|
|
572
|
+
const n = s[0];
|
|
573
|
+
if (s.length === 1) return n;
|
|
574
574
|
const a = () => {
|
|
575
575
|
const t = s.map((l) => ({
|
|
576
576
|
useScope: l(),
|
|
@@ -581,22 +581,22 @@ function Ba(...s) {
|
|
|
581
581
|
const m = p(o)[`__scope${f}`];
|
|
582
582
|
return { ...u, ...m };
|
|
583
583
|
}, {});
|
|
584
|
-
return D.useMemo(() => ({ [`__scope${
|
|
584
|
+
return D.useMemo(() => ({ [`__scope${n.scopeName}`]: c }), [c]);
|
|
585
585
|
};
|
|
586
586
|
};
|
|
587
|
-
return a.scopeName =
|
|
587
|
+
return a.scopeName = n.scopeName, a;
|
|
588
588
|
}
|
|
589
|
-
function
|
|
590
|
-
const
|
|
589
|
+
function Ba(s) {
|
|
590
|
+
const n = D.useRef(s);
|
|
591
591
|
return D.useEffect(() => {
|
|
592
|
-
|
|
592
|
+
n.current = s;
|
|
593
593
|
}), D.useMemo(() => (...a) => {
|
|
594
594
|
var t;
|
|
595
|
-
return (t =
|
|
595
|
+
return (t = n.current) == null ? void 0 : t.call(n, ...a);
|
|
596
596
|
}, []);
|
|
597
597
|
}
|
|
598
598
|
var Se = globalThis != null && globalThis.document ? D.useLayoutEffect : () => {
|
|
599
|
-
},
|
|
599
|
+
}, Ja = [
|
|
600
600
|
"a",
|
|
601
601
|
"button",
|
|
602
602
|
"div",
|
|
@@ -614,12 +614,12 @@ var Se = globalThis != null && globalThis.document ? D.useLayoutEffect : () => {
|
|
|
614
614
|
"span",
|
|
615
615
|
"svg",
|
|
616
616
|
"ul"
|
|
617
|
-
], Te =
|
|
618
|
-
const a = Ws(`Primitive.${
|
|
619
|
-
const { asChild: c, ...u } = l, p = c ? a :
|
|
617
|
+
], Te = Ja.reduce((s, n) => {
|
|
618
|
+
const a = Ws(`Primitive.${n}`), t = D.forwardRef((l, o) => {
|
|
619
|
+
const { asChild: c, ...u } = l, p = c ? a : n;
|
|
620
620
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(p, { ...u, ref: o });
|
|
621
621
|
});
|
|
622
|
-
return t.displayName = `Primitive.${
|
|
622
|
+
return t.displayName = `Primitive.${n}`, { ...s, [n]: t };
|
|
623
623
|
}, {});
|
|
624
624
|
function Wa() {
|
|
625
625
|
return Ia.useSyncExternalStore(
|
|
@@ -633,7 +633,7 @@ function Xa() {
|
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
635
|
var Pe = "Avatar", [Ya] = Ha(Pe), [Za, ps] = Ya(Pe), gs = D.forwardRef(
|
|
636
|
-
(s,
|
|
636
|
+
(s, n) => {
|
|
637
637
|
const { __scopeAvatar: a, ...t } = s, [l, o] = D.useState("idle");
|
|
638
638
|
return /* @__PURE__ */ e(
|
|
639
639
|
Za,
|
|
@@ -641,58 +641,58 @@ var Pe = "Avatar", [Ya] = Ha(Pe), [Za, ps] = Ya(Pe), gs = D.forwardRef(
|
|
|
641
641
|
scope: a,
|
|
642
642
|
imageLoadingStatus: l,
|
|
643
643
|
onImageLoadingStatusChange: o,
|
|
644
|
-
children: /* @__PURE__ */ e(Te.span, { ...t, ref:
|
|
644
|
+
children: /* @__PURE__ */ e(Te.span, { ...t, ref: n })
|
|
645
645
|
}
|
|
646
646
|
);
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
649
|
gs.displayName = Pe;
|
|
650
650
|
var fs = "AvatarImage", vs = D.forwardRef(
|
|
651
|
-
(s,
|
|
651
|
+
(s, n) => {
|
|
652
652
|
const { __scopeAvatar: a, src: t, onLoadingStatusChange: l = () => {
|
|
653
|
-
}, ...o } = s, c = ps(fs, a), u = et(t, o), p =
|
|
653
|
+
}, ...o } = s, c = ps(fs, a), u = et(t, o), p = Ba((f) => {
|
|
654
654
|
l(f), c.onImageLoadingStatusChange(f);
|
|
655
655
|
});
|
|
656
656
|
return Se(() => {
|
|
657
657
|
u !== "idle" && p(u);
|
|
658
|
-
}, [u, p]), u === "loaded" ? /* @__PURE__ */ e(Te.img, { ...o, ref:
|
|
658
|
+
}, [u, p]), u === "loaded" ? /* @__PURE__ */ e(Te.img, { ...o, ref: n, src: t }) : null;
|
|
659
659
|
}
|
|
660
660
|
);
|
|
661
661
|
vs.displayName = fs;
|
|
662
662
|
var bs = "AvatarFallback", Ns = D.forwardRef(
|
|
663
|
-
(s,
|
|
663
|
+
(s, n) => {
|
|
664
664
|
const { __scopeAvatar: a, delayMs: t, ...l } = s, o = ps(bs, a), [c, u] = D.useState(t === void 0);
|
|
665
665
|
return D.useEffect(() => {
|
|
666
666
|
if (t !== void 0) {
|
|
667
667
|
const p = window.setTimeout(() => u(!0), t);
|
|
668
668
|
return () => window.clearTimeout(p);
|
|
669
669
|
}
|
|
670
|
-
}, [t]), c && o.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Te.span, { ...l, ref:
|
|
670
|
+
}, [t]), c && o.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Te.span, { ...l, ref: n }) : null;
|
|
671
671
|
}
|
|
672
672
|
);
|
|
673
673
|
Ns.displayName = bs;
|
|
674
|
-
function
|
|
675
|
-
return s ?
|
|
674
|
+
function Ke(s, n) {
|
|
675
|
+
return s ? n ? (s.src !== n && (s.src = n), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
676
676
|
}
|
|
677
|
-
function et(s, { referrerPolicy:
|
|
677
|
+
function et(s, { referrerPolicy: n, crossOrigin: a }) {
|
|
678
678
|
const t = Wa(), l = D.useRef(null), o = t ? (l.current || (l.current = new window.Image()), l.current) : null, [c, u] = D.useState(
|
|
679
|
-
() =>
|
|
679
|
+
() => Ke(o, s)
|
|
680
680
|
);
|
|
681
681
|
return Se(() => {
|
|
682
|
-
u(
|
|
682
|
+
u(Ke(o, s));
|
|
683
683
|
}, [o, s]), Se(() => {
|
|
684
684
|
const p = (m) => () => {
|
|
685
685
|
u(m);
|
|
686
686
|
};
|
|
687
687
|
if (!o) return;
|
|
688
688
|
const f = p("loaded"), d = p("error");
|
|
689
|
-
return o.addEventListener("load", f), o.addEventListener("error", d),
|
|
689
|
+
return o.addEventListener("load", f), o.addEventListener("error", d), n && (o.referrerPolicy = n), typeof a == "string" && (o.crossOrigin = a), () => {
|
|
690
690
|
o.removeEventListener("load", f), o.removeEventListener("error", d);
|
|
691
691
|
};
|
|
692
|
-
}, [o, a,
|
|
692
|
+
}, [o, a, n]), c;
|
|
693
693
|
}
|
|
694
694
|
var ys = gs, ws = vs, xs = Ns;
|
|
695
|
-
const Ge = D.forwardRef(({ className: s, ...
|
|
695
|
+
const Ge = D.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
|
|
696
696
|
ys,
|
|
697
697
|
{
|
|
698
698
|
ref: a,
|
|
@@ -700,20 +700,20 @@ const Ge = D.forwardRef(({ className: s, ...r }, a) => /* @__PURE__ */ e(
|
|
|
700
700
|
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
701
701
|
s
|
|
702
702
|
),
|
|
703
|
-
...
|
|
703
|
+
...n
|
|
704
704
|
}
|
|
705
705
|
));
|
|
706
706
|
Ge.displayName = ys.displayName;
|
|
707
|
-
const st = D.forwardRef(({ className: s, ...
|
|
707
|
+
const st = D.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
|
|
708
708
|
ws,
|
|
709
709
|
{
|
|
710
710
|
ref: a,
|
|
711
711
|
className: Y("aspect-square h-full w-full", s),
|
|
712
|
-
...
|
|
712
|
+
...n
|
|
713
713
|
}
|
|
714
714
|
));
|
|
715
715
|
st.displayName = ws.displayName;
|
|
716
|
-
const Fe = D.forwardRef(({ className: s, ...
|
|
716
|
+
const Fe = D.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
|
|
717
717
|
xs,
|
|
718
718
|
{
|
|
719
719
|
ref: a,
|
|
@@ -721,13 +721,13 @@ const Fe = D.forwardRef(({ className: s, ...r }, a) => /* @__PURE__ */ e(
|
|
|
721
721
|
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
722
722
|
s
|
|
723
723
|
),
|
|
724
|
-
...
|
|
724
|
+
...n
|
|
725
725
|
}
|
|
726
726
|
));
|
|
727
727
|
Fe.displayName = xs.displayName;
|
|
728
728
|
function at({
|
|
729
729
|
open: s,
|
|
730
|
-
onOpenChange:
|
|
730
|
+
onOpenChange: n,
|
|
731
731
|
group: a,
|
|
732
732
|
onUpdate: t
|
|
733
733
|
}) {
|
|
@@ -736,7 +736,7 @@ function at({
|
|
|
736
736
|
tenantId: a.tenantId || void 0,
|
|
737
737
|
active: !0,
|
|
738
738
|
limit: 100
|
|
739
|
-
}), R = ja(), G = Va(), A = (g == null ? void 0 : g.members) || [], F =
|
|
739
|
+
}), R = ja(), G = Va(), A = (g == null ? void 0 : g.members) || [], F = re(() => new Set(A.map((h) => h.userId)), [A]), P = re(() => C.filter((h) => !F.has(h.id)), [C, F]), j = re(() => {
|
|
740
740
|
if (!c) return P;
|
|
741
741
|
const h = c.toLowerCase();
|
|
742
742
|
return P.filter(
|
|
@@ -745,7 +745,7 @@ function at({
|
|
|
745
745
|
return ((E = M.name) == null ? void 0 : E.toLowerCase().includes(h)) || ((z = M.email) == null ? void 0 : z.toLowerCase().includes(h));
|
|
746
746
|
}
|
|
747
747
|
);
|
|
748
|
-
}, [P, c]), x =
|
|
748
|
+
}, [P, c]), x = re(() => {
|
|
749
749
|
if (!c) return A;
|
|
750
750
|
const h = c.toLowerCase();
|
|
751
751
|
return A.filter(
|
|
@@ -788,29 +788,29 @@ function at({
|
|
|
788
788
|
(M) => M.includes(h) ? M.filter((E) => E !== h) : [...M, h]
|
|
789
789
|
);
|
|
790
790
|
};
|
|
791
|
-
return /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(ke, { open: s, onOpenChange:
|
|
792
|
-
/* @__PURE__ */
|
|
791
|
+
return /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(ke, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(Ae, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
|
|
792
|
+
/* @__PURE__ */ r(Ie, { children: [
|
|
793
793
|
/* @__PURE__ */ e(Ee, { children: a.name }),
|
|
794
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */
|
|
794
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: [
|
|
795
795
|
A.length,
|
|
796
796
|
" ",
|
|
797
797
|
A.length === 1 ? "member" : "members"
|
|
798
798
|
] }) }),
|
|
799
|
-
/* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ r("p", { id: "group-members-description", className: "sr-only", children: [
|
|
800
800
|
"Add or remove members from the ",
|
|
801
801
|
a.name,
|
|
802
802
|
" group"
|
|
803
803
|
] })
|
|
804
804
|
] }),
|
|
805
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ r(as, { value: l, onValueChange: (h) => {
|
|
806
806
|
o(h), u(""), m([]);
|
|
807
807
|
}, className: "mt-4", children: [
|
|
808
|
-
/* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ r(ts, { className: "grid w-full grid-cols-2", children: [
|
|
809
809
|
/* @__PURE__ */ e(oe, { value: "members", children: "Current Members" }),
|
|
810
810
|
/* @__PURE__ */ e(oe, { value: "add", children: "Add Members" })
|
|
811
811
|
] }),
|
|
812
|
-
/* @__PURE__ */
|
|
813
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ r(ie, { value: "members", className: "mt-4 space-y-4", children: [
|
|
813
|
+
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
814
814
|
/* @__PURE__ */ e(Ne, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
815
815
|
/* @__PURE__ */ e(
|
|
816
816
|
W,
|
|
@@ -822,7 +822,7 @@ function at({
|
|
|
822
822
|
}
|
|
823
823
|
)
|
|
824
824
|
] }),
|
|
825
|
-
/* @__PURE__ */ e(ye, { className: d.length > 0 ? "h-[300px]" : "h-[350px]", children: v ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((h) => /* @__PURE__ */ e(we, { className: "h-16 w-full" }, h)) }) : x.length === 0 ? /* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ e(ye, { className: d.length > 0 ? "h-[300px]" : "h-[350px]", children: v ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((h) => /* @__PURE__ */ e(we, { className: "h-16 w-full" }, h)) }) : x.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
826
826
|
/* @__PURE__ */ e($, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
827
827
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: c ? "No members found" : "No members yet" }),
|
|
828
828
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: c ? "Try a different search" : 'Switch to the "Add Members" tab to add people to this group' })
|
|
@@ -835,8 +835,8 @@ function at({
|
|
|
835
835
|
},
|
|
836
836
|
h.id
|
|
837
837
|
)) }) }),
|
|
838
|
-
d.length > 0 && /* @__PURE__ */
|
|
839
|
-
/* @__PURE__ */
|
|
838
|
+
d.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-4 border-t", children: [
|
|
839
|
+
/* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
|
|
840
840
|
d.length,
|
|
841
841
|
" member",
|
|
842
842
|
d.length !== 1 ? "s" : "",
|
|
@@ -849,19 +849,19 @@ function at({
|
|
|
849
849
|
size: "sm",
|
|
850
850
|
onClick: de,
|
|
851
851
|
disabled: G.isPending,
|
|
852
|
-
children: G.isPending ? /* @__PURE__ */
|
|
852
|
+
children: G.isPending ? /* @__PURE__ */ r(I, { children: [
|
|
853
853
|
/* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
854
854
|
"Removing..."
|
|
855
|
-
] }) : /* @__PURE__ */
|
|
856
|
-
/* @__PURE__ */ e(
|
|
855
|
+
] }) : /* @__PURE__ */ r(I, { children: [
|
|
856
|
+
/* @__PURE__ */ e(ns, { className: "mr-2 h-4 w-4" }),
|
|
857
857
|
"Remove Selected"
|
|
858
858
|
] })
|
|
859
859
|
}
|
|
860
860
|
)
|
|
861
861
|
] })
|
|
862
862
|
] }),
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ r(ie, { value: "add", className: "mt-4 space-y-4", children: [
|
|
864
|
+
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
865
865
|
/* @__PURE__ */ e(Ne, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
866
866
|
/* @__PURE__ */ e(
|
|
867
867
|
W,
|
|
@@ -873,12 +873,12 @@ function at({
|
|
|
873
873
|
}
|
|
874
874
|
)
|
|
875
875
|
] }),
|
|
876
|
-
/* @__PURE__ */ e(ye, { className: "h-[300px]", children: O ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((h) => /* @__PURE__ */ e(we, { className: "h-16 w-full" }, h)) }) : j.length === 0 ? /* @__PURE__ */
|
|
876
|
+
/* @__PURE__ */ e(ye, { className: "h-[300px]", children: O ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((h) => /* @__PURE__ */ e(we, { className: "h-16 w-full" }, h)) }) : j.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
877
877
|
/* @__PURE__ */ e(xe, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
878
878
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
|
|
879
879
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: c ? "Try a different search" : "All eligible users are already members" })
|
|
880
880
|
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: j.map((h) => /* @__PURE__ */ e(
|
|
881
|
-
|
|
881
|
+
nt,
|
|
882
882
|
{
|
|
883
883
|
user: h,
|
|
884
884
|
selected: p.includes(h.id),
|
|
@@ -886,8 +886,8 @@ function at({
|
|
|
886
886
|
},
|
|
887
887
|
h.id
|
|
888
888
|
)) }) }),
|
|
889
|
-
p.length > 0 && /* @__PURE__ */
|
|
890
|
-
/* @__PURE__ */
|
|
889
|
+
p.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center justify-between pt-4 border-t", children: [
|
|
890
|
+
/* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
|
|
891
891
|
p.length,
|
|
892
892
|
" user",
|
|
893
893
|
p.length !== 1 ? "s" : "",
|
|
@@ -898,10 +898,10 @@ function at({
|
|
|
898
898
|
{
|
|
899
899
|
onClick: V,
|
|
900
900
|
disabled: R.isPending,
|
|
901
|
-
children: R.isPending ? /* @__PURE__ */
|
|
901
|
+
children: R.isPending ? /* @__PURE__ */ r(I, { children: [
|
|
902
902
|
/* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
903
903
|
"Adding..."
|
|
904
|
-
] }) : /* @__PURE__ */
|
|
904
|
+
] }) : /* @__PURE__ */ r(I, { children: [
|
|
905
905
|
/* @__PURE__ */ e(xe, { className: "mr-2 h-4 w-4" }),
|
|
906
906
|
"Add Members"
|
|
907
907
|
] })
|
|
@@ -914,20 +914,20 @@ function at({
|
|
|
914
914
|
}
|
|
915
915
|
function tt({
|
|
916
916
|
member: s,
|
|
917
|
-
selected:
|
|
917
|
+
selected: n,
|
|
918
918
|
onToggle: a
|
|
919
919
|
}) {
|
|
920
920
|
var l, o, c, u;
|
|
921
921
|
const t = ((o = (l = s.user) == null ? void 0 : l.name) == null ? void 0 : o.split(" ").map((p) => p[0]).join("").toUpperCase()) || "?";
|
|
922
|
-
return /* @__PURE__ */
|
|
922
|
+
return /* @__PURE__ */ r(
|
|
923
923
|
"div",
|
|
924
924
|
{
|
|
925
925
|
className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
|
|
926
926
|
onClick: a,
|
|
927
927
|
children: [
|
|
928
|
-
/* @__PURE__ */ e(
|
|
928
|
+
/* @__PURE__ */ e(rs, { checked: n }),
|
|
929
929
|
/* @__PURE__ */ e(Ge, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fe, { className: "text-xs", children: t }) }),
|
|
930
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ r("div", { className: "flex-1", children: [
|
|
931
931
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((c = s.user) == null ? void 0 : c.name) || "Unknown User" }),
|
|
932
932
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (u = s.user) == null ? void 0 : u.email })
|
|
933
933
|
] })
|
|
@@ -935,22 +935,22 @@ function tt({
|
|
|
935
935
|
}
|
|
936
936
|
);
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function nt({
|
|
939
939
|
user: s,
|
|
940
|
-
selected:
|
|
940
|
+
selected: n,
|
|
941
941
|
onToggle: a
|
|
942
942
|
}) {
|
|
943
943
|
var l;
|
|
944
944
|
const t = ((l = s.name) == null ? void 0 : l.split(" ").map((o) => o[0]).join("").toUpperCase()) || "?";
|
|
945
|
-
return /* @__PURE__ */
|
|
945
|
+
return /* @__PURE__ */ r(
|
|
946
946
|
"div",
|
|
947
947
|
{
|
|
948
948
|
className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
|
|
949
949
|
onClick: a,
|
|
950
950
|
children: [
|
|
951
|
-
/* @__PURE__ */ e(
|
|
951
|
+
/* @__PURE__ */ e(rs, { checked: n }),
|
|
952
952
|
/* @__PURE__ */ e(Ge, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fe, { className: "text-xs", children: t }) }),
|
|
953
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ r("div", { className: "flex-1", children: [
|
|
954
954
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: s.name }),
|
|
955
955
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s.email })
|
|
956
956
|
] })
|
|
@@ -958,9 +958,9 @@ function rt({
|
|
|
958
958
|
}
|
|
959
959
|
);
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function rt({
|
|
962
962
|
open: s,
|
|
963
|
-
onOpenChange:
|
|
963
|
+
onOpenChange: n
|
|
964
964
|
}) {
|
|
965
965
|
const [a, t] = b("groups"), [l, o] = b(""), [c, u] = b(null), [p, f] = b(!1), [d, m] = b(null), { tokenProps: g } = U(), { currentUser: v } = os(), N = $a(), w = (v == null ? void 0 : v.type) === "tenant", C = g == null ? void 0 : g.tenantId, { groups: O, isLoading: R, refetch: G } = Zs({
|
|
966
966
|
type: w ? "TENANT_GROUP" : "all",
|
|
@@ -983,28 +983,28 @@ function nt({
|
|
|
983
983
|
}, j = () => {
|
|
984
984
|
t("groups"), G();
|
|
985
985
|
};
|
|
986
|
-
return /* @__PURE__ */
|
|
987
|
-
/* @__PURE__ */ e(ke, { open: s, onOpenChange:
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
/* @__PURE__ */
|
|
986
|
+
return /* @__PURE__ */ r(I, { children: [
|
|
987
|
+
/* @__PURE__ */ e(ke, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(Ae, { className: "max-w-4xl max-h-[80vh]", children: [
|
|
988
|
+
/* @__PURE__ */ r(Ie, { children: [
|
|
989
|
+
/* @__PURE__ */ r(Ee, { className: "flex items-center gap-2", children: [
|
|
990
990
|
/* @__PURE__ */ e($, { className: "h-5 w-5" }),
|
|
991
991
|
"Group Management"
|
|
992
992
|
] }),
|
|
993
993
|
/* @__PURE__ */ e(Ye, { children: "Manage your groups, create new groups, and control group membership" })
|
|
994
994
|
] }),
|
|
995
|
-
/* @__PURE__ */
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ r(as, { value: a, onValueChange: t, className: "mt-4", children: [
|
|
996
|
+
/* @__PURE__ */ r(ts, { className: "grid w-full grid-cols-2", children: [
|
|
997
|
+
/* @__PURE__ */ r(oe, { value: "groups", className: "flex items-center gap-2", children: [
|
|
998
998
|
/* @__PURE__ */ e($, { className: "h-4 w-4" }),
|
|
999
999
|
"Groups"
|
|
1000
1000
|
] }),
|
|
1001
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ r(oe, { value: "create", className: "flex items-center gap-2", children: [
|
|
1002
1002
|
/* @__PURE__ */ e(Le, { className: "h-4 w-4" }),
|
|
1003
1003
|
"Create Group"
|
|
1004
1004
|
] })
|
|
1005
1005
|
] }),
|
|
1006
|
-
/* @__PURE__ */ e(ie, { value: "groups", className: "mt-4", children: /* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ e(ie, { value: "groups", className: "mt-4", children: /* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
1007
|
+
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
1008
1008
|
/* @__PURE__ */ e(Ne, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
1009
1009
|
/* @__PURE__ */ e(
|
|
1010
1010
|
W,
|
|
@@ -1016,7 +1016,7 @@ function nt({
|
|
|
1016
1016
|
}
|
|
1017
1017
|
)
|
|
1018
1018
|
] }),
|
|
1019
|
-
/* @__PURE__ */ e(ye, { className: "h-[400px]", children: R ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(we, { className: "h-24 w-full" }, x)) }) : A.length === 0 ? /* @__PURE__ */
|
|
1019
|
+
/* @__PURE__ */ e(ye, { className: "h-[400px]", children: R ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(we, { className: "h-24 w-full" }, x)) }) : A.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
1020
1020
|
/* @__PURE__ */ e($, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
1021
1021
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No groups found" }),
|
|
1022
1022
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "Create your first group to get started" })
|
|
@@ -1055,16 +1055,16 @@ function nt({
|
|
|
1055
1055
|
{
|
|
1056
1056
|
open: !!d,
|
|
1057
1057
|
onOpenChange: () => m(null),
|
|
1058
|
-
children: /* @__PURE__ */
|
|
1059
|
-
/* @__PURE__ */
|
|
1058
|
+
children: /* @__PURE__ */ r(ls, { children: [
|
|
1059
|
+
/* @__PURE__ */ r(cs, { children: [
|
|
1060
1060
|
/* @__PURE__ */ e(ds, { children: "Delete Group" }),
|
|
1061
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ r(us, { children: [
|
|
1062
1062
|
'Are you sure you want to delete "',
|
|
1063
1063
|
d == null ? void 0 : d.name,
|
|
1064
1064
|
'"? This action cannot be undone and will remove all members from the group.'
|
|
1065
1065
|
] })
|
|
1066
1066
|
] }),
|
|
1067
|
-
/* @__PURE__ */
|
|
1067
|
+
/* @__PURE__ */ r(ms, { children: [
|
|
1068
1068
|
/* @__PURE__ */ e(hs, { children: "Cancel" }),
|
|
1069
1069
|
/* @__PURE__ */ e(
|
|
1070
1070
|
Ce,
|
|
@@ -1072,7 +1072,7 @@ function nt({
|
|
|
1072
1072
|
onClick: F,
|
|
1073
1073
|
disabled: N.isPending,
|
|
1074
1074
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
1075
|
-
children: N.isPending ? /* @__PURE__ */
|
|
1075
|
+
children: N.isPending ? /* @__PURE__ */ r(I, { children: [
|
|
1076
1076
|
/* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
1077
1077
|
"Deleting..."
|
|
1078
1078
|
] }) : "Delete Group"
|
|
@@ -1086,37 +1086,37 @@ function nt({
|
|
|
1086
1086
|
}
|
|
1087
1087
|
function ot({
|
|
1088
1088
|
group: s,
|
|
1089
|
-
onManageMembers:
|
|
1089
|
+
onManageMembers: n,
|
|
1090
1090
|
onDelete: a,
|
|
1091
1091
|
currentUserId: t
|
|
1092
1092
|
}) {
|
|
1093
1093
|
const l = s.createdBy === t;
|
|
1094
|
-
return /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50", children: /* @__PURE__ */
|
|
1095
|
-
/* @__PURE__ */
|
|
1096
|
-
/* @__PURE__ */
|
|
1094
|
+
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: [
|
|
1095
|
+
/* @__PURE__ */ r("div", { className: "flex-1 space-y-2", children: [
|
|
1096
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1097
1097
|
/* @__PURE__ */ e("h4", { className: "font-medium", children: s.name }),
|
|
1098
1098
|
s.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mt-1", children: s.description })
|
|
1099
1099
|
] }),
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1100
|
+
/* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
|
|
1101
|
+
/* @__PURE__ */ r("span", { className: "flex items-center gap-1", children: [
|
|
1102
1102
|
/* @__PURE__ */ e($, { className: "h-3 w-3" }),
|
|
1103
1103
|
s.memberCount,
|
|
1104
1104
|
" ",
|
|
1105
1105
|
s.memberCount === 1 ? "member" : "members"
|
|
1106
1106
|
] }),
|
|
1107
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ r("span", { children: [
|
|
1108
1108
|
"Created ",
|
|
1109
1109
|
ea(new Date(s.createdAt), "MMM d, yyyy")
|
|
1110
1110
|
] })
|
|
1111
1111
|
] })
|
|
1112
1112
|
] }),
|
|
1113
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
|
|
1114
1114
|
/* @__PURE__ */ e(
|
|
1115
1115
|
k,
|
|
1116
1116
|
{
|
|
1117
1117
|
variant: "ghost",
|
|
1118
1118
|
size: "sm",
|
|
1119
|
-
onClick:
|
|
1119
|
+
onClick: n,
|
|
1120
1120
|
title: "Manage members",
|
|
1121
1121
|
children: /* @__PURE__ */ e(xe, { className: "h-4 w-4" })
|
|
1122
1122
|
}
|
|
@@ -1129,7 +1129,7 @@ function ot({
|
|
|
1129
1129
|
onClick: a,
|
|
1130
1130
|
title: "Delete group",
|
|
1131
1131
|
className: "text-destructive hover:text-destructive",
|
|
1132
|
-
children: /* @__PURE__ */ e(
|
|
1132
|
+
children: /* @__PURE__ */ e(ns, { className: "h-4 w-4" })
|
|
1133
1133
|
}
|
|
1134
1134
|
)
|
|
1135
1135
|
] })
|
|
@@ -1139,9 +1139,9 @@ function pt() {
|
|
|
1139
1139
|
var _e, $e, je;
|
|
1140
1140
|
const {
|
|
1141
1141
|
authToken: s,
|
|
1142
|
-
tokenProps:
|
|
1142
|
+
tokenProps: n,
|
|
1143
1143
|
id: a
|
|
1144
|
-
} = U(), { isLocalDev: t } = sa(), { permissions: l } = aa(), o = ta(), { isLoading: c } =
|
|
1144
|
+
} = U(), { isLocalDev: t } = sa(), { permissions: l } = aa(), o = ta(), { isLoading: c } = na();
|
|
1145
1145
|
y((i) => i.theme);
|
|
1146
1146
|
const u = y((i) => i.lenses), p = y((i) => i.selectedLensId), f = u == null ? void 0 : u.find((i) => i.id === p), d = y((i) => i.dashboard);
|
|
1147
1147
|
y((i) => i.selectedSheetId);
|
|
@@ -1151,24 +1151,24 @@ function pt() {
|
|
|
1151
1151
|
(i) => i.actions.setIsDashboardPanelOpen
|
|
1152
1152
|
), ue = y((i) => i.filterValues), S = y((i) => i.isVisualEditing);
|
|
1153
1153
|
Qe((i) => i.card);
|
|
1154
|
-
const h =
|
|
1154
|
+
const h = ne(
|
|
1155
1155
|
(i) => i.selectedDashboard
|
|
1156
|
-
), M =
|
|
1156
|
+
), M = ne(
|
|
1157
1157
|
(i) => i.initialDashboard
|
|
1158
1158
|
);
|
|
1159
|
-
|
|
1159
|
+
ne((i) => i.selectedVisual), y((i) => i.selectedFrameId), Qe((i) => i.frame);
|
|
1160
1160
|
const E = h ? ($e = h == null ? void 0 : h.permissions) == null ? void 0 : $e.canEdit : (_e = M == null ? void 0 : M.permissions) == null ? void 0 : _e.canEdit, z = y((i) => i.showFilters), Z = y(
|
|
1161
1161
|
(i) => i.showDashboardJSON
|
|
1162
1162
|
), Q = y((i) => i.onSaveFunction), Cs = y(
|
|
1163
1163
|
(i) => i.actions.setShowFilters
|
|
1164
1164
|
), { setIsDashboardEditing: Oe, setShowDashboardJSON: Re } = y(
|
|
1165
1165
|
(i) => i.actions
|
|
1166
|
-
), { setInitialDashboard: Ue, clearSelectedDashboard: Ds } =
|
|
1166
|
+
), { setInitialDashboard: Ue, clearSelectedDashboard: Ds } = ne(
|
|
1167
1167
|
(i) => i.actions
|
|
1168
|
-
), { resources: ee } =
|
|
1168
|
+
), { resources: ee } = ra(ve.DASHBOARD), { currentUser: Ss } = os(), Ms = oa(Ss), H = h || M, ze = H ? {
|
|
1169
1169
|
id: H.id,
|
|
1170
1170
|
title: (d == null ? void 0 : d.title) || H.title || "Dashboard"
|
|
1171
|
-
} : null, { handleAddNewFrame: ks } = ia(), [
|
|
1171
|
+
} : null, { handleAddNewFrame: ks } = ia(), [K, me] = b(!1), [Ls, se] = b(!1), ae = la(ve.DASHBOARD), [B, he] = b(
|
|
1172
1172
|
null
|
|
1173
1173
|
), As = async (i, T) => {
|
|
1174
1174
|
if (!(d != null && d.id)) {
|
|
@@ -1188,8 +1188,8 @@ function pt() {
|
|
|
1188
1188
|
onSuccess: () => {
|
|
1189
1189
|
console.log("Dashboard title updated successfully"), L.success("Dashboard title updated");
|
|
1190
1190
|
},
|
|
1191
|
-
onError: (
|
|
1192
|
-
console.error("Failed to update dashboard title:",
|
|
1191
|
+
onError: (J) => {
|
|
1192
|
+
console.error("Failed to update dashboard title:", J), L.error("Failed to update dashboard title"), g(T);
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
1195
|
);
|
|
@@ -1199,13 +1199,13 @@ function pt() {
|
|
|
1199
1199
|
const i = d == null ? void 0 : d.id;
|
|
1200
1200
|
if (i) {
|
|
1201
1201
|
const T = ee.find(
|
|
1202
|
-
(
|
|
1202
|
+
(J) => J.id === i
|
|
1203
1203
|
);
|
|
1204
1204
|
T && Ue(T);
|
|
1205
1205
|
}
|
|
1206
1206
|
}
|
|
1207
1207
|
}, [ee, d == null ? void 0 : d.id, Ue]);
|
|
1208
|
-
const te =
|
|
1208
|
+
const te = n.orgUserId || n.tenantId, Is = m && !S && te && E, { setDashboard: Es } = y((i) => i.actions), Ts = () => {
|
|
1209
1209
|
Oe(!0);
|
|
1210
1210
|
}, pe = () => {
|
|
1211
1211
|
Oe(!1), Re(!1), he(null);
|
|
@@ -1213,20 +1213,20 @@ function pt() {
|
|
|
1213
1213
|
ya(
|
|
1214
1214
|
m,
|
|
1215
1215
|
d,
|
|
1216
|
-
|
|
1216
|
+
B,
|
|
1217
1217
|
(i) => he(i)
|
|
1218
1218
|
);
|
|
1219
|
-
const Ps = () =>
|
|
1219
|
+
const Ps = () => B ? JSON.stringify(d) !== JSON.stringify(B) : !1, Gs = () => {
|
|
1220
1220
|
Ps() ? se(!0) : pe();
|
|
1221
1221
|
}, Fs = async () => {
|
|
1222
1222
|
await ge({ closeAfterSave: !0 });
|
|
1223
1223
|
}, Os = () => {
|
|
1224
|
-
|
|
1224
|
+
B && Es(B), pe(), se(!1);
|
|
1225
1225
|
};
|
|
1226
1226
|
async function ge(i) {
|
|
1227
1227
|
const T = (i == null ? void 0 : i.closeAfterSave) ?? j;
|
|
1228
1228
|
x(T), T && se(!1);
|
|
1229
|
-
const
|
|
1229
|
+
const J = va(d);
|
|
1230
1230
|
A(!0), P(null), me(!0);
|
|
1231
1231
|
const zs = {
|
|
1232
1232
|
template: d
|
|
@@ -1238,7 +1238,7 @@ function pt() {
|
|
|
1238
1238
|
},
|
|
1239
1239
|
{
|
|
1240
1240
|
onSuccess: () => {
|
|
1241
|
-
me(!1), L.success("Dashboard saved!"), he(
|
|
1241
|
+
me(!1), L.success("Dashboard saved!"), he(J), A(!1), x(!1), T && pe();
|
|
1242
1242
|
},
|
|
1243
1243
|
onError: () => {
|
|
1244
1244
|
me(!1), P("Failed to save dashboard. Please try again."), L.error("Failed to save dashboard");
|
|
@@ -1254,7 +1254,7 @@ function pt() {
|
|
|
1254
1254
|
filterValues: ue
|
|
1255
1255
|
};
|
|
1256
1256
|
await De(
|
|
1257
|
-
|
|
1257
|
+
n.apiServiceUrl,
|
|
1258
1258
|
T,
|
|
1259
1259
|
s == null ? void 0 : s.accessToken
|
|
1260
1260
|
), L.success("Lens saved"), Q == null || Q(d), N(!1);
|
|
@@ -1266,15 +1266,15 @@ function pt() {
|
|
|
1266
1266
|
dashboardId: d == null ? void 0 : d.id,
|
|
1267
1267
|
currentLensName: f == null ? void 0 : f.name
|
|
1268
1268
|
});
|
|
1269
|
-
const Us =
|
|
1270
|
-
return /* @__PURE__ */
|
|
1269
|
+
const Us = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail;
|
|
1270
|
+
return /* @__PURE__ */ r(
|
|
1271
1271
|
"div",
|
|
1272
1272
|
{
|
|
1273
1273
|
className: "flex h-11 items-center justify-between gap-2 border-b px-4 py-2",
|
|
1274
1274
|
role: "dashboard-controls",
|
|
1275
1275
|
children: [
|
|
1276
|
-
/* @__PURE__ */
|
|
1277
|
-
Us && /* @__PURE__ */
|
|
1276
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
1277
|
+
Us && /* @__PURE__ */ r(I, { children: [
|
|
1278
1278
|
/* @__PURE__ */ e(
|
|
1279
1279
|
q,
|
|
1280
1280
|
{
|
|
@@ -1298,7 +1298,7 @@ function pt() {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
)
|
|
1300
1300
|
] }),
|
|
1301
|
-
!S && o && (c ? /* @__PURE__ */
|
|
1301
|
+
!S && o && (c ? /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
1302
1302
|
/* @__PURE__ */ e(_, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
|
|
1303
1303
|
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
|
|
1304
1304
|
] }) : /* @__PURE__ */ e(
|
|
@@ -1322,12 +1322,12 @@ function pt() {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
))
|
|
1324
1324
|
] }),
|
|
1325
|
-
/* @__PURE__ */
|
|
1326
|
-
S && /* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
1326
|
+
S && /* @__PURE__ */ r(I, { children: [
|
|
1327
1327
|
/* @__PURE__ */ e(wa, { className: "mr-2" }),
|
|
1328
1328
|
/* @__PURE__ */ e(xa, { className: "h-7" })
|
|
1329
1329
|
] }),
|
|
1330
|
-
t && !S && /* @__PURE__ */
|
|
1330
|
+
t && !S && /* @__PURE__ */ r(I, { children: [
|
|
1331
1331
|
/* @__PURE__ */ e(
|
|
1332
1332
|
q,
|
|
1333
1333
|
{
|
|
@@ -1344,7 +1344,7 @@ function pt() {
|
|
|
1344
1344
|
q,
|
|
1345
1345
|
{
|
|
1346
1346
|
tooltip: "Invalidate Token",
|
|
1347
|
-
onClick: () => ua(
|
|
1347
|
+
onClick: () => ua(n.apiServiceUrl),
|
|
1348
1348
|
className: "h-7 p-2",
|
|
1349
1349
|
children: /* @__PURE__ */ e(La, { className: "h-4 w-4" })
|
|
1350
1350
|
}
|
|
@@ -1382,7 +1382,7 @@ function pt() {
|
|
|
1382
1382
|
),
|
|
1383
1383
|
m && !S && te && t && o && /* @__PURE__ */ e(Ga, {}),
|
|
1384
1384
|
!S && te && t && o && /* @__PURE__ */ e(Fa, {}),
|
|
1385
|
-
m && !S && te && f && t && o && /* @__PURE__ */
|
|
1385
|
+
m && !S && te && f && t && o && /* @__PURE__ */ r(
|
|
1386
1386
|
k,
|
|
1387
1387
|
{
|
|
1388
1388
|
className: "h-7 p-2",
|
|
@@ -1396,7 +1396,7 @@ function pt() {
|
|
|
1396
1396
|
]
|
|
1397
1397
|
}
|
|
1398
1398
|
),
|
|
1399
|
-
m && !S && o && /* @__PURE__ */
|
|
1399
|
+
m && !S && o && /* @__PURE__ */ r(
|
|
1400
1400
|
k,
|
|
1401
1401
|
{
|
|
1402
1402
|
variant: "outline",
|
|
@@ -1410,7 +1410,7 @@ function pt() {
|
|
|
1410
1410
|
]
|
|
1411
1411
|
}
|
|
1412
1412
|
),
|
|
1413
|
-
!S && !m && l.canEdit && o && /* @__PURE__ */
|
|
1413
|
+
!S && !m && l.canEdit && o && /* @__PURE__ */ r(
|
|
1414
1414
|
k,
|
|
1415
1415
|
{
|
|
1416
1416
|
variant: "outline",
|
|
@@ -1423,16 +1423,16 @@ function pt() {
|
|
|
1423
1423
|
]
|
|
1424
1424
|
}
|
|
1425
1425
|
),
|
|
1426
|
-
Is && o && /* @__PURE__ */
|
|
1426
|
+
Is && o && /* @__PURE__ */ r(
|
|
1427
1427
|
k,
|
|
1428
1428
|
{
|
|
1429
1429
|
className: "h-7 p-2",
|
|
1430
|
-
disabled:
|
|
1430
|
+
disabled: K,
|
|
1431
1431
|
onClick: () => ge(),
|
|
1432
1432
|
size: "sm",
|
|
1433
1433
|
children: [
|
|
1434
|
-
|
|
1435
|
-
|
|
1434
|
+
K ? /* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(He, { className: "mr-2 h-4 w-4" }),
|
|
1435
|
+
K ? "Saving..." : "Save"
|
|
1436
1436
|
]
|
|
1437
1437
|
}
|
|
1438
1438
|
),
|
|
@@ -1447,7 +1447,7 @@ function pt() {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
) }),
|
|
1449
1449
|
!S && t && /* @__PURE__ */ e(Ea, {}),
|
|
1450
|
-
m && !S && o && /* @__PURE__ */
|
|
1450
|
+
m && !S && o && /* @__PURE__ */ r(
|
|
1451
1451
|
k,
|
|
1452
1452
|
{
|
|
1453
1453
|
variant: "outline",
|
|
@@ -1468,7 +1468,7 @@ function pt() {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
),
|
|
1470
1470
|
/* @__PURE__ */ e(
|
|
1471
|
-
|
|
1471
|
+
rt,
|
|
1472
1472
|
{
|
|
1473
1473
|
open: O,
|
|
1474
1474
|
onOpenChange: R
|
|
@@ -1479,14 +1479,14 @@ function pt() {
|
|
|
1479
1479
|
{
|
|
1480
1480
|
open: G,
|
|
1481
1481
|
onOpenChange: (i) => {
|
|
1482
|
-
!i &&
|
|
1482
|
+
!i && K && !F || (A(i), i || (P(null), x(!1)));
|
|
1483
1483
|
},
|
|
1484
|
-
children: /* @__PURE__ */
|
|
1485
|
-
/* @__PURE__ */
|
|
1484
|
+
children: /* @__PURE__ */ r(ls, { className: "max-w-sm", children: [
|
|
1485
|
+
/* @__PURE__ */ r(cs, { children: [
|
|
1486
1486
|
/* @__PURE__ */ e(ds, { children: F ? "Save failed" : "Saving dashboard" }),
|
|
1487
1487
|
/* @__PURE__ */ e(us, { className: "pt-2", children: F ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
|
|
1488
1488
|
] }),
|
|
1489
|
-
/* @__PURE__ */ e(ms, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: F ? /* @__PURE__ */
|
|
1489
|
+
/* @__PURE__ */ e(ms, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: F ? /* @__PURE__ */ r(I, { children: [
|
|
1490
1490
|
/* @__PURE__ */ e(
|
|
1491
1491
|
hs,
|
|
1492
1492
|
{
|
|
@@ -1505,7 +1505,7 @@ function pt() {
|
|
|
1505
1505
|
children: "Retry"
|
|
1506
1506
|
}
|
|
1507
1507
|
)
|
|
1508
|
-
] }) : /* @__PURE__ */
|
|
1508
|
+
] }) : /* @__PURE__ */ r(
|
|
1509
1509
|
Ce,
|
|
1510
1510
|
{
|
|
1511
1511
|
disabled: !0,
|
|
@@ -1526,7 +1526,7 @@ function pt() {
|
|
|
1526
1526
|
onOpenChange: se,
|
|
1527
1527
|
onSave: Fs,
|
|
1528
1528
|
onDiscard: Os,
|
|
1529
|
-
isSaving:
|
|
1529
|
+
isSaving: K
|
|
1530
1530
|
}
|
|
1531
1531
|
)
|
|
1532
1532
|
] })
|