react-semaphor 0.1.209 → 0.1.211
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-BNTI4r0_.js → dashboard-controls-7KpXzAWL.js} +662 -607
- package/dist/chunks/dashboard-controls-CnDq9Uh_.js +42 -0
- package/dist/chunks/{dashboard-json-BjOqpGbW.js → dashboard-json-dqey5VK0.js} +1 -1
- package/dist/chunks/{dashboard-json-kIoBtmBF.js → dashboard-json-stWvjp2O.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-CO1SwHHD.js → dashboard-summary-settings-dialog-DPEe6XBC.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-BoX18wiA.js → dashboard-summary-settings-dialog-DuxhidK1.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DG4VLoJF.js → edit-dashboard-visual-CQAk_UsI.js} +3416 -3531
- package/dist/chunks/edit-dashboard-visual-D_XPr8f8.js +164 -0
- package/dist/chunks/editor-action-buttons-CH7W6KdH.js +21 -0
- package/dist/chunks/editor-action-buttons-D34_GSZu.js +404 -0
- package/dist/chunks/{index-D0TdW88i.js → index-BDS2sWhv.js} +26669 -26443
- package/dist/chunks/index-BfiIPyeS.js +1109 -0
- package/dist/chunks/normalize-dashboard-for-dirty-check-D9x96J2F.js +1 -0
- package/dist/chunks/normalize-dashboard-for-dirty-check-XKgH3GFX.js +119 -0
- package/dist/chunks/notification-bell-Cu3qDd9V.js +837 -0
- package/dist/chunks/notification-bell-hijGST9g.js +6 -0
- package/dist/chunks/{resource-management-panel-DS_WEv1x.js → resource-management-panel-BvHqslqC.js} +346 -335
- package/dist/chunks/resource-management-panel-gK3a6OEj.js +6 -0
- package/dist/chunks/{use-role-aware-display-preferences-D8j5_cnK.js → use-role-aware-display-preferences-BlR29aKQ.js} +1 -1
- package/dist/chunks/{use-role-aware-display-preferences-DfihB5pN.js → use-role-aware-display-preferences-a5FH9Y0k.js} +1 -1
- package/dist/chunks/{use-visual-utils-CzcVz3zB.js → use-visual-utils-B11AA2fd.js} +1 -1
- package/dist/chunks/{use-visual-utils-BfLXO_vi.js → use-visual-utils-ptPsQ3nC.js} +23 -23
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +253 -214
- package/dist/shared/index.cjs +1 -0
- package/dist/shared/index.js +6 -0
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/main.d.ts +88 -1
- package/dist/types/shared.d.ts +1762 -0
- package/package.json +6 -1
- package/dist/chunks/dashboard-controls-Dcpx9_an.js +0 -42
- package/dist/chunks/edit-dashboard-visual-B9HuGExj.js +0 -179
- package/dist/chunks/editor-action-buttons-CDTIx_Jc.js +0 -11
- package/dist/chunks/editor-action-buttons-CszdZ4Fw.js +0 -345
- package/dist/chunks/index-DSA80lEg.js +0 -1104
- package/dist/chunks/notification-bell-D2V1-ARa.js +0 -11
- package/dist/chunks/notification-bell-DFiRaeJQ.js +0 -862
- package/dist/chunks/resource-management-panel-BhiWNPcw.js +0 -6
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { jsxs as a, jsx as e, Fragment as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { bS as oe, cS as Na, u as w, c8 as ze, c9 as $e, B as L, cb as Be, cc as q, cT as Ke, Z as ws, l as P, m as Qe, cU as Sa, c7 as We, n as Je, o as Ze, p as Xe, q as xs, L as Ue, Q as re, G as wa, ac as j, cV as xa, cg as Da, cW as Ca, cX as gs, cY as Ds, c as Z, cZ as Cs, U as be, c_ as ye, I as E, c$ as Ls, cH as La, d0 as Ea, H, cf as V, d1 as Ye, d2 as Aa, d3 as ka, d4 as Ge, d5 as Ma, d6 as Oa, d7 as Es, d8 as As, d9 as ge, da as ve, cD as Re, cm as Pe, db as Fe, ch as ks, dc as je, dd as Ms, e as Os, de as Ia, cp as Is, cq as Ts, cr as _s, cs as Us, ct as Gs, cu as Rs, cv as Ps, cw as qe, c6 as Ta, df as _a, bG as Ua, a1 as vs, bO as pe, dg as Ga, bP as Ra, as as Oe, dh as Pa, di as Fa, dj as ja, bj as qa, dk as Ha, dl as Va, bZ as za, b_ as $a, b$ as Ba, dm as Ka, c1 as Qa, cd as Wa, a_ as Ja, dn as Za, dp as Xa, dq as Ya, dr as et, ds as st, dt as at, ca as tt, ae as nt, cj as rt, du as ot, au as it, af as lt, ay as ct } from "./index-BDS2sWhv.js";
|
|
3
3
|
import * as _ from "react";
|
|
4
|
-
import
|
|
4
|
+
import Fs, { useState as S, useMemo as fe, useEffect as dt, useCallback as ut } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { b as
|
|
7
|
-
import { u as
|
|
8
|
-
import { d as
|
|
9
|
-
import { C as
|
|
10
|
-
import {
|
|
6
|
+
import { b as mt, u as ht, c as pt, A as ft, V as gt, N as vt, U as bt } from "./notification-bell-Cu3qDd9V.js";
|
|
7
|
+
import { u as yt } from "./use-role-aware-display-preferences-a5FH9Y0k.js";
|
|
8
|
+
import { d as Nt } from "./date-formatter-Y8Za1ib3.js";
|
|
9
|
+
import { C as St, D as wt } from "./dashboard-summary-settings-dialog-DPEe6XBC.js";
|
|
10
|
+
import { u as xt, s as Ie } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
11
|
+
import { S as bs } from "./editor-action-buttons-D34_GSZu.js";
|
|
11
12
|
/**
|
|
12
13
|
* @license lucide-react v0.453.0 - ISC
|
|
13
14
|
*
|
|
14
15
|
* This source code is licensed under the ISC license.
|
|
15
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
17
|
*/
|
|
17
|
-
const
|
|
18
|
+
const Dt = oe("Glasses", [
|
|
18
19
|
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
|
|
19
20
|
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
|
|
20
21
|
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
|
|
@@ -27,7 +28,7 @@ const it = se("Glasses", [
|
|
|
27
28
|
* This source code is licensed under the ISC license.
|
|
28
29
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
30
|
*/
|
|
30
|
-
const
|
|
31
|
+
const Ct = oe("Menu", [
|
|
31
32
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
|
|
32
33
|
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
|
|
33
34
|
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
|
|
@@ -38,7 +39,7 @@ const lt = se("Menu", [
|
|
|
38
39
|
* This source code is licensed under the ISC license.
|
|
39
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
41
|
*/
|
|
41
|
-
const
|
|
42
|
+
const Lt = oe("Moon", [
|
|
42
43
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
43
44
|
]);
|
|
44
45
|
/**
|
|
@@ -47,7 +48,7 @@ const ct = se("Moon", [
|
|
|
47
48
|
* This source code is licensed under the ISC license.
|
|
48
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
49
50
|
*/
|
|
50
|
-
const
|
|
51
|
+
const Et = oe("ShieldX", [
|
|
51
52
|
[
|
|
52
53
|
"path",
|
|
53
54
|
{
|
|
@@ -64,7 +65,7 @@ const dt = se("ShieldX", [
|
|
|
64
65
|
* This source code is licensed under the ISC license.
|
|
65
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
67
|
*/
|
|
67
|
-
const
|
|
68
|
+
const At = oe("Sun", [
|
|
68
69
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
69
70
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
70
71
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -75,7 +76,7 @@ const ut = se("Sun", [
|
|
|
75
76
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
76
77
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
77
78
|
]);
|
|
78
|
-
var
|
|
79
|
+
var He = { exports: {} }, Te = {};
|
|
79
80
|
/**
|
|
80
81
|
* @license React
|
|
81
82
|
* use-sync-external-store-shim.production.js
|
|
@@ -85,18 +86,18 @@ var Ie = { exports: {} }, xe = {};
|
|
|
85
86
|
* This source code is licensed under the MIT license found in the
|
|
86
87
|
* LICENSE file in the root directory of this source tree.
|
|
87
88
|
*/
|
|
88
|
-
var
|
|
89
|
-
function
|
|
90
|
-
if (
|
|
91
|
-
|
|
92
|
-
var s =
|
|
93
|
-
function
|
|
89
|
+
var ys;
|
|
90
|
+
function kt() {
|
|
91
|
+
if (ys) return Te;
|
|
92
|
+
ys = 1;
|
|
93
|
+
var s = Fs;
|
|
94
|
+
function o(d, m) {
|
|
94
95
|
return d === m && (d !== 0 || 1 / d === 1 / m) || d !== d && m !== m;
|
|
95
96
|
}
|
|
96
|
-
var t = typeof Object.is == "function" ? Object.is :
|
|
97
|
+
var t = typeof Object.is == "function" ? Object.is : o, n = s.useState, l = s.useEffect, c = s.useLayoutEffect, u = s.useDebugValue;
|
|
97
98
|
function p(d, m) {
|
|
98
|
-
var h = m(), b =
|
|
99
|
-
return
|
|
99
|
+
var h = m(), b = n({ inst: { value: h, getSnapshot: m } }), y = b[0].inst, N = b[1];
|
|
100
|
+
return c(
|
|
100
101
|
function() {
|
|
101
102
|
y.value = h, y.getSnapshot = m, g(y) && N({ inst: y });
|
|
102
103
|
},
|
|
@@ -123,10 +124,10 @@ function mt() {
|
|
|
123
124
|
function v(d, m) {
|
|
124
125
|
return m();
|
|
125
126
|
}
|
|
126
|
-
var
|
|
127
|
-
return
|
|
127
|
+
var i = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : p;
|
|
128
|
+
return Te.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : i, Te;
|
|
128
129
|
}
|
|
129
|
-
var
|
|
130
|
+
var _e = {};
|
|
130
131
|
/**
|
|
131
132
|
* @license React
|
|
132
133
|
* use-sync-external-store-shim.development.js
|
|
@@ -136,20 +137,20 @@ var De = {};
|
|
|
136
137
|
* This source code is licensed under the MIT license found in the
|
|
137
138
|
* LICENSE file in the root directory of this source tree.
|
|
138
139
|
*/
|
|
139
|
-
var
|
|
140
|
-
function
|
|
141
|
-
return
|
|
140
|
+
var Ns;
|
|
141
|
+
function Mt() {
|
|
142
|
+
return Ns || (Ns = 1, process.env.NODE_ENV !== "production" && function() {
|
|
142
143
|
function s(h, b) {
|
|
143
144
|
return h === b && (h !== 0 || 1 / h === 1 / b) || h !== h && b !== b;
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
-
|
|
146
|
+
function o(h, b) {
|
|
147
|
+
i || l.startTransition === void 0 || (i = !0, console.error(
|
|
147
148
|
"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."
|
|
148
149
|
));
|
|
149
150
|
var y = b();
|
|
150
151
|
if (!d) {
|
|
151
152
|
var N = b();
|
|
152
|
-
|
|
153
|
+
c(y, N) || (console.error(
|
|
153
154
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
154
155
|
), d = !0);
|
|
155
156
|
}
|
|
@@ -176,36 +177,36 @@ function ht() {
|
|
|
176
177
|
h = h.value;
|
|
177
178
|
try {
|
|
178
179
|
var y = b();
|
|
179
|
-
return !
|
|
180
|
+
return !c(h, y);
|
|
180
181
|
} catch {
|
|
181
182
|
return !0;
|
|
182
183
|
}
|
|
183
184
|
}
|
|
184
|
-
function
|
|
185
|
+
function n(h, b) {
|
|
185
186
|
return b();
|
|
186
187
|
}
|
|
187
188
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
188
|
-
var l =
|
|
189
|
-
|
|
190
|
-
}()),
|
|
189
|
+
var l = Fs, c = typeof Object.is == "function" ? Object.is : s, u = l.useState, p = l.useEffect, g = l.useLayoutEffect, v = l.useDebugValue, i = !1, d = !1, m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : o;
|
|
190
|
+
_e.useSyncExternalStore = l.useSyncExternalStore !== void 0 ? l.useSyncExternalStore : m, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
191
|
+
}()), _e;
|
|
191
192
|
}
|
|
192
|
-
process.env.NODE_ENV === "production" ?
|
|
193
|
-
var
|
|
194
|
-
function
|
|
195
|
-
const { setTheme: s } =
|
|
193
|
+
process.env.NODE_ENV === "production" ? He.exports = kt() : He.exports = Mt();
|
|
194
|
+
var Ot = He.exports;
|
|
195
|
+
function It() {
|
|
196
|
+
const { setTheme: s } = Na(), o = w(
|
|
196
197
|
(t) => t.actions.setDashboardTheme
|
|
197
198
|
);
|
|
198
|
-
return /* @__PURE__ */ a(
|
|
199
|
-
/* @__PURE__ */ e(
|
|
199
|
+
return /* @__PURE__ */ a(ze, { children: [
|
|
200
|
+
/* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ a(L, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
|
|
200
201
|
/* @__PURE__ */ e(
|
|
201
|
-
|
|
202
|
+
At,
|
|
202
203
|
{
|
|
203
204
|
strokeWidth: 1.5,
|
|
204
205
|
className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
|
|
205
206
|
}
|
|
206
207
|
),
|
|
207
208
|
/* @__PURE__ */ e(
|
|
208
|
-
|
|
209
|
+
Lt,
|
|
209
210
|
{
|
|
210
211
|
strokeWidth: 1.5,
|
|
211
212
|
className: "absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
|
|
@@ -213,30 +214,30 @@ function ft() {
|
|
|
213
214
|
),
|
|
214
215
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
|
|
215
216
|
] }) }),
|
|
216
|
-
/* @__PURE__ */ a(
|
|
217
|
+
/* @__PURE__ */ a(Be, { align: "end", children: [
|
|
217
218
|
/* @__PURE__ */ e(
|
|
218
|
-
|
|
219
|
+
q,
|
|
219
220
|
{
|
|
220
221
|
onClick: () => {
|
|
221
|
-
s("light"),
|
|
222
|
+
s("light"), o("light");
|
|
222
223
|
},
|
|
223
224
|
children: "Light"
|
|
224
225
|
}
|
|
225
226
|
),
|
|
226
227
|
/* @__PURE__ */ e(
|
|
227
|
-
|
|
228
|
+
q,
|
|
228
229
|
{
|
|
229
230
|
onClick: () => {
|
|
230
|
-
s("dark"),
|
|
231
|
+
s("dark"), o("dark");
|
|
231
232
|
},
|
|
232
233
|
children: "Dark"
|
|
233
234
|
}
|
|
234
235
|
),
|
|
235
236
|
/* @__PURE__ */ e(
|
|
236
|
-
|
|
237
|
+
q,
|
|
237
238
|
{
|
|
238
239
|
onClick: () => {
|
|
239
|
-
s("system"),
|
|
240
|
+
s("system"), o("system");
|
|
240
241
|
},
|
|
241
242
|
children: "System"
|
|
242
243
|
}
|
|
@@ -244,78 +245,78 @@ function ft() {
|
|
|
244
245
|
] })
|
|
245
246
|
] });
|
|
246
247
|
}
|
|
247
|
-
async function
|
|
248
|
+
async function Tt(s, o, t, n, l) {
|
|
248
249
|
if (!l)
|
|
249
250
|
return null;
|
|
250
|
-
const
|
|
251
|
-
return await
|
|
252
|
-
name:
|
|
253
|
-
template:
|
|
254
|
-
filterValues:
|
|
251
|
+
const c = JSON.stringify(t), u = `${s}/v1/lens`;
|
|
252
|
+
return await Ke(u, l, {
|
|
253
|
+
name: o,
|
|
254
|
+
template: c,
|
|
255
|
+
filterValues: n,
|
|
255
256
|
operation: "create"
|
|
256
257
|
});
|
|
257
258
|
}
|
|
258
|
-
async function
|
|
259
|
+
async function Ve(s, o, t) {
|
|
259
260
|
if (!t)
|
|
260
261
|
return null;
|
|
261
|
-
const { id:
|
|
262
|
-
return await
|
|
263
|
-
lensId:
|
|
262
|
+
const { id: n, template: l, filterValues: c, isDefault: u, shared: p } = o, g = `${s}/v1/lens`;
|
|
263
|
+
return await Ke(g, t, {
|
|
264
|
+
lensId: n,
|
|
264
265
|
template: l,
|
|
265
|
-
filterValues:
|
|
266
|
+
filterValues: c,
|
|
266
267
|
isDefault: u,
|
|
267
268
|
shared: p,
|
|
268
269
|
operation: "update"
|
|
269
270
|
});
|
|
270
271
|
}
|
|
271
|
-
async function
|
|
272
|
+
async function _t(s, o, t) {
|
|
272
273
|
if (!t)
|
|
273
274
|
return null;
|
|
274
|
-
const
|
|
275
|
-
return await
|
|
275
|
+
const n = `${s}/v1/lens`;
|
|
276
|
+
return await Ke(n, t, {
|
|
276
277
|
operation: "delete",
|
|
277
|
-
lensId:
|
|
278
|
+
lensId: o
|
|
278
279
|
});
|
|
279
280
|
}
|
|
280
|
-
function
|
|
281
|
-
const [s,
|
|
281
|
+
function Ut() {
|
|
282
|
+
const [s, o] = S(""), [t, n] = S(!1), l = w((N) => N.lenses), { setLenses: c, setSelectedLensId: u } = ws(), [p, g] = S(!1), [v, i] = S(!1), d = w((N) => N.dashboard), m = w((N) => N.filterValues), { authToken: h, tokenProps: b } = P();
|
|
282
283
|
async function y() {
|
|
283
284
|
g(!0);
|
|
284
|
-
const N = await
|
|
285
|
+
const N = await Tt(
|
|
285
286
|
b.apiServiceUrl,
|
|
286
287
|
s,
|
|
287
288
|
d,
|
|
288
289
|
m,
|
|
289
290
|
h == null ? void 0 : h.accessToken
|
|
290
291
|
);
|
|
291
|
-
N && (
|
|
292
|
+
N && (c([...l || [], N]), u(N.id), i(!1)), g(!1);
|
|
292
293
|
}
|
|
293
|
-
return /* @__PURE__ */ a(
|
|
294
|
-
/* @__PURE__ */ e(
|
|
295
|
-
|
|
294
|
+
return /* @__PURE__ */ a(Qe, { open: v, onOpenChange: i, children: [
|
|
295
|
+
/* @__PURE__ */ e(Sa, { asChild: !0, children: /* @__PURE__ */ a(
|
|
296
|
+
L,
|
|
296
297
|
{
|
|
297
298
|
variant: "secondary",
|
|
298
299
|
className: "h-7 p-2",
|
|
299
300
|
size: "sm",
|
|
300
301
|
children: [
|
|
301
|
-
/* @__PURE__ */ e(
|
|
302
|
+
/* @__PURE__ */ e(We, { className: "mr-2 h-4 w-4" }),
|
|
302
303
|
"Lens"
|
|
303
304
|
]
|
|
304
305
|
}
|
|
305
306
|
) }),
|
|
306
|
-
/* @__PURE__ */ a(
|
|
307
|
-
/* @__PURE__ */ a(
|
|
308
|
-
/* @__PURE__ */ e(
|
|
309
|
-
/* @__PURE__ */ e(
|
|
307
|
+
/* @__PURE__ */ a(Je, { className: "sm:max-w-[425px]", children: [
|
|
308
|
+
/* @__PURE__ */ a(Ze, { children: [
|
|
309
|
+
/* @__PURE__ */ e(Xe, { children: "Create Lens" }),
|
|
310
|
+
/* @__PURE__ */ e(xs, { children: "Lenses are private by default and are only visible to you." })
|
|
310
311
|
] }),
|
|
311
312
|
/* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ a("div", { className: "grid grid-cols-8 items-center gap-4", children: [
|
|
312
|
-
/* @__PURE__ */ e(
|
|
313
|
+
/* @__PURE__ */ e(Ue, { className: "text-right", children: "Name" }),
|
|
313
314
|
/* @__PURE__ */ e(
|
|
314
|
-
|
|
315
|
+
re,
|
|
315
316
|
{
|
|
316
317
|
value: s,
|
|
317
318
|
onChange: (N) => {
|
|
318
|
-
|
|
319
|
+
o(N.target.value);
|
|
319
320
|
},
|
|
320
321
|
id: "name",
|
|
321
322
|
className: "col-span-7 focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
|
|
@@ -323,8 +324,8 @@ function bt() {
|
|
|
323
324
|
)
|
|
324
325
|
] }) }),
|
|
325
326
|
t && /* @__PURE__ */ e("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
|
|
326
|
-
/* @__PURE__ */ e(
|
|
327
|
-
|
|
327
|
+
/* @__PURE__ */ e(wa, { children: /* @__PURE__ */ e(
|
|
328
|
+
L,
|
|
328
329
|
{
|
|
329
330
|
size: "sm",
|
|
330
331
|
variant: "outline",
|
|
@@ -337,18 +338,18 @@ function bt() {
|
|
|
337
338
|
] })
|
|
338
339
|
] });
|
|
339
340
|
}
|
|
340
|
-
function
|
|
341
|
-
const [s,
|
|
341
|
+
function Gt() {
|
|
342
|
+
const [s, o] = S(!1), t = w((d) => d.lenses), n = w((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: c } = ws(), { authToken: u, tokenProps: p } = P();
|
|
342
343
|
async function g(d) {
|
|
343
|
-
|
|
344
|
+
c(d);
|
|
344
345
|
}
|
|
345
346
|
async function v(d) {
|
|
346
|
-
if (await
|
|
347
|
+
if (await _t(p.apiServiceUrl, d, u == null ? void 0 : u.accessToken)) {
|
|
347
348
|
const h = t == null ? void 0 : t.filter((b) => b.id !== d);
|
|
348
|
-
l(h || []),
|
|
349
|
+
l(h || []), c("original");
|
|
349
350
|
}
|
|
350
351
|
}
|
|
351
|
-
async function
|
|
352
|
+
async function i(d) {
|
|
352
353
|
const m = t == null ? void 0 : t.map((y) => y.id === d.id ? {
|
|
353
354
|
...y,
|
|
354
355
|
isDefault: !d.isDefault
|
|
@@ -361,30 +362,30 @@ function yt() {
|
|
|
361
362
|
...d,
|
|
362
363
|
isDefault: !d.isDefault
|
|
363
364
|
};
|
|
364
|
-
await
|
|
365
|
+
await Ve(p.apiServiceUrl, h, u == null ? void 0 : u.accessToken);
|
|
365
366
|
const b = t == null ? void 0 : t.find((y) => y.isDefault);
|
|
366
367
|
if (b && b.id !== d.id) {
|
|
367
368
|
const y = {
|
|
368
369
|
...b,
|
|
369
370
|
isDefault: !1
|
|
370
371
|
};
|
|
371
|
-
await
|
|
372
|
+
await Ve(p.apiServiceUrl, y, u == null ? void 0 : u.accessToken);
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
|
-
return /* @__PURE__ */ a(
|
|
375
|
-
/* @__PURE__ */ e(
|
|
376
|
-
/* @__PURE__ */ a(
|
|
377
|
-
/* @__PURE__ */ e(
|
|
378
|
-
/* @__PURE__ */ e(
|
|
375
|
+
return /* @__PURE__ */ a(ze, { open: s, onOpenChange: o, children: [
|
|
376
|
+
/* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ e(j, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Dt, { className: "h-4 w-4" }) }) }),
|
|
377
|
+
/* @__PURE__ */ a(Be, { align: "end", className: "w-60", children: [
|
|
378
|
+
/* @__PURE__ */ e(xa, { className: "px-3", children: "Lenses" }),
|
|
379
|
+
/* @__PURE__ */ e(Da, {}),
|
|
379
380
|
/* @__PURE__ */ a(
|
|
380
|
-
|
|
381
|
+
Ca,
|
|
381
382
|
{
|
|
382
|
-
value:
|
|
383
|
+
value: n,
|
|
383
384
|
onValueChange: g,
|
|
384
385
|
children: [
|
|
385
|
-
/* @__PURE__ */ e(
|
|
386
|
+
/* @__PURE__ */ e(gs, { value: "original", children: "Original" }),
|
|
386
387
|
t == null ? void 0 : t.map((d) => /* @__PURE__ */ a(
|
|
387
|
-
|
|
388
|
+
gs,
|
|
388
389
|
{
|
|
389
390
|
className: "group flex justify-between gap-2",
|
|
390
391
|
value: d.id,
|
|
@@ -392,12 +393,12 @@ function yt() {
|
|
|
392
393
|
/* @__PURE__ */ e("p", { children: d.name }),
|
|
393
394
|
/* @__PURE__ */ a("span", { className: "flex items-center gap-3", children: [
|
|
394
395
|
/* @__PURE__ */ e(
|
|
395
|
-
|
|
396
|
+
Ds,
|
|
396
397
|
{
|
|
397
398
|
onClick: (m) => {
|
|
398
|
-
m.preventDefault(),
|
|
399
|
+
m.preventDefault(), i(d);
|
|
399
400
|
},
|
|
400
|
-
className:
|
|
401
|
+
className: Z(
|
|
401
402
|
"size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
|
|
402
403
|
{
|
|
403
404
|
invisible: !d.isDefault,
|
|
@@ -408,7 +409,7 @@ function yt() {
|
|
|
408
409
|
}
|
|
409
410
|
),
|
|
410
411
|
/* @__PURE__ */ e(
|
|
411
|
-
|
|
412
|
+
Cs,
|
|
412
413
|
{
|
|
413
414
|
onClick: (m) => {
|
|
414
415
|
m.preventDefault(), v(d.id);
|
|
@@ -428,119 +429,119 @@ function yt() {
|
|
|
428
429
|
] })
|
|
429
430
|
] });
|
|
430
431
|
}
|
|
431
|
-
const
|
|
432
|
-
const
|
|
433
|
-
return await
|
|
434
|
-
},
|
|
435
|
-
const
|
|
432
|
+
const Rt = async (s, o, t) => {
|
|
433
|
+
const n = `${s}/management/v1/groups`;
|
|
434
|
+
return await Ls(n, o, t);
|
|
435
|
+
}, Pt = async (s, o, t) => {
|
|
436
|
+
const n = `${s}/management/v1/groups/${t}`, l = await fetch(n, {
|
|
436
437
|
method: "DELETE",
|
|
437
438
|
headers: {
|
|
438
|
-
Authorization: `Bearer ${
|
|
439
|
+
Authorization: `Bearer ${o}`
|
|
439
440
|
}
|
|
440
441
|
});
|
|
441
442
|
if (!l.ok) {
|
|
442
|
-
const
|
|
443
|
-
throw new Error(
|
|
443
|
+
const c = await l.text();
|
|
444
|
+
throw new Error(c || "Failed to delete group");
|
|
444
445
|
}
|
|
445
|
-
},
|
|
446
|
+
}, Ft = async (s, o, t, n) => {
|
|
446
447
|
const l = `${s}/management/v1/groups/${t}/members`;
|
|
447
|
-
return await
|
|
448
|
-
},
|
|
449
|
-
const l = `${s}/management/v1/groups/${t}/members`,
|
|
448
|
+
return await Ls(l, o, n);
|
|
449
|
+
}, jt = async (s, o, t, n) => {
|
|
450
|
+
const l = `${s}/management/v1/groups/${t}/members`, c = await fetch(l, {
|
|
450
451
|
method: "DELETE",
|
|
451
452
|
headers: {
|
|
452
453
|
"Content-Type": "application/json",
|
|
453
|
-
Authorization: `Bearer ${
|
|
454
|
+
Authorization: `Bearer ${o}`
|
|
454
455
|
},
|
|
455
|
-
body: JSON.stringify(
|
|
456
|
+
body: JSON.stringify(n)
|
|
456
457
|
});
|
|
457
|
-
if (!
|
|
458
|
-
const u = await
|
|
458
|
+
if (!c.ok) {
|
|
459
|
+
const u = await c.text();
|
|
459
460
|
throw new Error(u || "Failed to remove group members");
|
|
460
461
|
}
|
|
461
462
|
};
|
|
462
|
-
function
|
|
463
|
-
const { authToken: s, tokenProps:
|
|
464
|
-
return
|
|
465
|
-
mutationFn: (
|
|
463
|
+
function qt() {
|
|
464
|
+
const { authToken: s, tokenProps: o } = P(), t = be();
|
|
465
|
+
return ye({
|
|
466
|
+
mutationFn: (n) => Rt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", n),
|
|
466
467
|
onSuccess: () => {
|
|
467
|
-
t.invalidateQueries({ queryKey: ["groups"] }),
|
|
468
|
+
t.invalidateQueries({ queryKey: ["groups"] }), E.success("Group created successfully");
|
|
468
469
|
},
|
|
469
|
-
onError: (
|
|
470
|
-
console.error("Failed to create group:",
|
|
471
|
-
description:
|
|
470
|
+
onError: (n) => {
|
|
471
|
+
console.error("Failed to create group:", n), E.error("Failed to create group", {
|
|
472
|
+
description: n.message
|
|
472
473
|
});
|
|
473
474
|
}
|
|
474
475
|
});
|
|
475
476
|
}
|
|
476
|
-
function
|
|
477
|
-
const { authToken: s, tokenProps:
|
|
478
|
-
return
|
|
479
|
-
mutationFn: (
|
|
480
|
-
onSuccess: (
|
|
481
|
-
t.invalidateQueries({ queryKey: ["groups"] }), t.removeQueries({ queryKey: ["group", l] }),
|
|
477
|
+
function Ht() {
|
|
478
|
+
const { authToken: s, tokenProps: o } = P(), t = be();
|
|
479
|
+
return ye({
|
|
480
|
+
mutationFn: (n) => Pt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", n),
|
|
481
|
+
onSuccess: (n, l) => {
|
|
482
|
+
t.invalidateQueries({ queryKey: ["groups"] }), t.removeQueries({ queryKey: ["group", l] }), E.success("Group deleted successfully");
|
|
482
483
|
},
|
|
483
|
-
onError: (
|
|
484
|
-
console.error("Failed to delete group:",
|
|
485
|
-
description:
|
|
484
|
+
onError: (n) => {
|
|
485
|
+
console.error("Failed to delete group:", n), E.error("Failed to delete group", {
|
|
486
|
+
description: n.message
|
|
486
487
|
});
|
|
487
488
|
}
|
|
488
489
|
});
|
|
489
490
|
}
|
|
490
|
-
function
|
|
491
|
-
const { authToken: s, tokenProps:
|
|
492
|
-
return
|
|
491
|
+
function Vt() {
|
|
492
|
+
const { authToken: s, tokenProps: o } = P(), t = be();
|
|
493
|
+
return ye({
|
|
493
494
|
mutationFn: ({
|
|
494
|
-
groupId:
|
|
495
|
+
groupId: n,
|
|
495
496
|
data: l
|
|
496
|
-
}) =>
|
|
497
|
-
onSuccess: (
|
|
497
|
+
}) => Ft(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", n, l),
|
|
498
|
+
onSuccess: (n, l) => {
|
|
498
499
|
t.invalidateQueries({ queryKey: ["group", l.groupId] }), t.invalidateQueries({
|
|
499
500
|
queryKey: ["group-members", l.groupId]
|
|
500
|
-
}), t.invalidateQueries({ queryKey: ["groups"] }),
|
|
501
|
+
}), t.invalidateQueries({ queryKey: ["groups"] }), E.success("Members added successfully");
|
|
501
502
|
},
|
|
502
|
-
onError: (
|
|
503
|
-
console.error("Failed to add group members:",
|
|
504
|
-
description:
|
|
503
|
+
onError: (n) => {
|
|
504
|
+
console.error("Failed to add group members:", n), E.error("Failed to add members", {
|
|
505
|
+
description: n.message
|
|
505
506
|
});
|
|
506
507
|
}
|
|
507
508
|
});
|
|
508
509
|
}
|
|
509
|
-
function
|
|
510
|
-
const { authToken: s, tokenProps:
|
|
511
|
-
return
|
|
510
|
+
function zt() {
|
|
511
|
+
const { authToken: s, tokenProps: o } = P(), t = be();
|
|
512
|
+
return ye({
|
|
512
513
|
mutationFn: ({
|
|
513
|
-
groupId:
|
|
514
|
+
groupId: n,
|
|
514
515
|
data: l
|
|
515
|
-
}) =>
|
|
516
|
-
onSuccess: (
|
|
516
|
+
}) => jt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", n, l),
|
|
517
|
+
onSuccess: (n, l) => {
|
|
517
518
|
t.invalidateQueries({ queryKey: ["group", l.groupId] }), t.invalidateQueries({
|
|
518
519
|
queryKey: ["group-members", l.groupId]
|
|
519
|
-
}), t.invalidateQueries({ queryKey: ["groups"] }),
|
|
520
|
+
}), t.invalidateQueries({ queryKey: ["groups"] }), E.success("Members removed successfully");
|
|
520
521
|
},
|
|
521
|
-
onError: (
|
|
522
|
-
console.error("Failed to remove group members:",
|
|
523
|
-
description:
|
|
522
|
+
onError: (n) => {
|
|
523
|
+
console.error("Failed to remove group members:", n), E.error("Failed to remove members", {
|
|
524
|
+
description: n.message
|
|
524
525
|
});
|
|
525
526
|
}
|
|
526
527
|
});
|
|
527
528
|
}
|
|
528
|
-
function
|
|
529
|
+
function $t({
|
|
529
530
|
onSuccess: s,
|
|
530
|
-
tenantId:
|
|
531
|
+
tenantId: o,
|
|
531
532
|
isTenantUser: t
|
|
532
533
|
}) {
|
|
533
|
-
const [
|
|
534
|
+
const [n, l] = S(""), [c, u] = S(""), [p, g] = S({}), v = qt(), i = () => {
|
|
534
535
|
const m = {};
|
|
535
|
-
return
|
|
536
|
+
return n.trim() ? n.length < 3 ? m.name = "Group name must be at least 3 characters" : n.length > 50 && (m.name = "Group name must be less than 50 characters") : m.name = "Group name is required", c && c.length > 200 && (m.description = "Description must be less than 200 characters"), g(m), Object.keys(m).length === 0;
|
|
536
537
|
};
|
|
537
538
|
return /* @__PURE__ */ a("form", { onSubmit: async (m) => {
|
|
538
|
-
if (m.preventDefault(), !
|
|
539
|
+
if (m.preventDefault(), !i()) return;
|
|
539
540
|
const h = {
|
|
540
|
-
name:
|
|
541
|
-
description:
|
|
541
|
+
name: n.trim(),
|
|
542
|
+
description: c.trim() || void 0,
|
|
542
543
|
type: t ? "TENANT_GROUP" : "ORG_GROUP",
|
|
543
|
-
...t &&
|
|
544
|
+
...t && o ? { tenantId: o } : {}
|
|
544
545
|
};
|
|
545
546
|
try {
|
|
546
547
|
await v.mutateAsync(h), l(""), u(""), g({}), s();
|
|
@@ -550,16 +551,16 @@ function At({
|
|
|
550
551
|
}, className: "space-y-6", children: [
|
|
551
552
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
552
553
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
553
|
-
/* @__PURE__ */ a(
|
|
554
|
+
/* @__PURE__ */ a(Ue, { htmlFor: "group-name", children: [
|
|
554
555
|
"Group Name ",
|
|
555
556
|
/* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
|
|
556
557
|
] }),
|
|
557
558
|
/* @__PURE__ */ e(
|
|
558
|
-
|
|
559
|
+
re,
|
|
559
560
|
{
|
|
560
561
|
id: "group-name",
|
|
561
562
|
placeholder: "e.g., Marketing Team, Engineering Squad",
|
|
562
|
-
value:
|
|
563
|
+
value: n,
|
|
563
564
|
onChange: (m) => {
|
|
564
565
|
l(m.target.value), p.name && g((h) => ({ ...h, name: "" }));
|
|
565
566
|
},
|
|
@@ -570,16 +571,16 @@ function At({
|
|
|
570
571
|
p.name && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: p.name })
|
|
571
572
|
] }),
|
|
572
573
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
573
|
-
/* @__PURE__ */ a(
|
|
574
|
+
/* @__PURE__ */ a(Ue, { htmlFor: "group-description", children: [
|
|
574
575
|
"Description",
|
|
575
576
|
/* @__PURE__ */ e("span", { className: "ml-2 text-xs text-muted-foreground", children: "(optional)" })
|
|
576
577
|
] }),
|
|
577
578
|
/* @__PURE__ */ e(
|
|
578
|
-
|
|
579
|
+
La,
|
|
579
580
|
{
|
|
580
581
|
id: "group-description",
|
|
581
582
|
placeholder: "Describe the purpose of this group...",
|
|
582
|
-
value:
|
|
583
|
+
value: c,
|
|
583
584
|
onChange: (m) => {
|
|
584
585
|
u(m.target.value), p.description && g((h) => ({ ...h, description: "" }));
|
|
585
586
|
},
|
|
@@ -590,18 +591,18 @@ function At({
|
|
|
590
591
|
),
|
|
591
592
|
p.description && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: p.description }),
|
|
592
593
|
/* @__PURE__ */ a("p", { className: "text-xs text-muted-foreground", children: [
|
|
593
|
-
|
|
594
|
+
c.length,
|
|
594
595
|
"/200 characters"
|
|
595
596
|
] })
|
|
596
597
|
] }),
|
|
597
598
|
/* @__PURE__ */ e("div", { className: "rounded-lg border bg-muted/50 p-4", children: /* @__PURE__ */ a("div", { className: "flex gap-3", children: [
|
|
598
|
-
/* @__PURE__ */ e(
|
|
599
|
+
/* @__PURE__ */ e(Ea, { className: "h-4 w-4 mt-0.5 text-muted-foreground" }),
|
|
599
600
|
/* @__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." })
|
|
600
601
|
] }) })
|
|
601
602
|
] }),
|
|
602
603
|
/* @__PURE__ */ a("div", { className: "flex justify-end gap-3", children: [
|
|
603
604
|
/* @__PURE__ */ e(
|
|
604
|
-
|
|
605
|
+
L,
|
|
605
606
|
{
|
|
606
607
|
type: "button",
|
|
607
608
|
variant: "outline",
|
|
@@ -613,15 +614,15 @@ function At({
|
|
|
613
614
|
}
|
|
614
615
|
),
|
|
615
616
|
/* @__PURE__ */ e(
|
|
616
|
-
|
|
617
|
+
L,
|
|
617
618
|
{
|
|
618
619
|
type: "submit",
|
|
619
|
-
disabled: v.isPending || !
|
|
620
|
-
children: v.isPending ? /* @__PURE__ */ a(
|
|
621
|
-
/* @__PURE__ */ e(
|
|
620
|
+
disabled: v.isPending || !n.trim(),
|
|
621
|
+
children: v.isPending ? /* @__PURE__ */ a(k, { children: [
|
|
622
|
+
/* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
622
623
|
"Creating..."
|
|
623
|
-
] }) : /* @__PURE__ */ a(
|
|
624
|
-
/* @__PURE__ */ e(
|
|
624
|
+
] }) : /* @__PURE__ */ a(k, { children: [
|
|
625
|
+
/* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4" }),
|
|
625
626
|
"Create Group"
|
|
626
627
|
] })
|
|
627
628
|
}
|
|
@@ -629,140 +630,140 @@ function At({
|
|
|
629
630
|
] })
|
|
630
631
|
] });
|
|
631
632
|
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
634
|
-
|
|
633
|
+
function Bt() {
|
|
634
|
+
return Ot.useSyncExternalStore(
|
|
635
|
+
Kt,
|
|
635
636
|
() => !0,
|
|
636
637
|
() => !1
|
|
637
638
|
);
|
|
638
639
|
}
|
|
639
|
-
function
|
|
640
|
+
function Kt() {
|
|
640
641
|
return () => {
|
|
641
642
|
};
|
|
642
643
|
}
|
|
643
|
-
var
|
|
644
|
-
(s,
|
|
645
|
-
const { __scopeAvatar: t, ...
|
|
644
|
+
var es = "Avatar", [Qt] = Aa(es), [Wt, js] = Qt(es), qs = _.forwardRef(
|
|
645
|
+
(s, o) => {
|
|
646
|
+
const { __scopeAvatar: t, ...n } = s, [l, c] = _.useState("idle");
|
|
646
647
|
return /* @__PURE__ */ e(
|
|
647
|
-
|
|
648
|
+
Wt,
|
|
648
649
|
{
|
|
649
650
|
scope: t,
|
|
650
651
|
imageLoadingStatus: l,
|
|
651
|
-
onImageLoadingStatusChange:
|
|
652
|
-
children: /* @__PURE__ */ e(
|
|
652
|
+
onImageLoadingStatusChange: c,
|
|
653
|
+
children: /* @__PURE__ */ e(Ye.span, { ...n, ref: o })
|
|
653
654
|
}
|
|
654
655
|
);
|
|
655
656
|
}
|
|
656
657
|
);
|
|
657
|
-
|
|
658
|
-
var
|
|
659
|
-
(s,
|
|
660
|
-
const { __scopeAvatar: t, src:
|
|
661
|
-
}, ...
|
|
658
|
+
qs.displayName = es;
|
|
659
|
+
var Hs = "AvatarImage", Vs = _.forwardRef(
|
|
660
|
+
(s, o) => {
|
|
661
|
+
const { __scopeAvatar: t, src: n, onLoadingStatusChange: l = () => {
|
|
662
|
+
}, ...c } = s, u = js(Hs, t), p = Jt(n, c), g = ka((v) => {
|
|
662
663
|
l(v), u.onImageLoadingStatusChange(v);
|
|
663
664
|
});
|
|
664
|
-
return
|
|
665
|
+
return Ge(() => {
|
|
665
666
|
p !== "idle" && g(p);
|
|
666
|
-
}, [p, g]), p === "loaded" ? /* @__PURE__ */ e(
|
|
667
|
+
}, [p, g]), p === "loaded" ? /* @__PURE__ */ e(Ye.img, { ...c, ref: o, src: n }) : null;
|
|
667
668
|
}
|
|
668
669
|
);
|
|
669
|
-
|
|
670
|
-
var
|
|
671
|
-
(s,
|
|
672
|
-
const { __scopeAvatar: t, delayMs:
|
|
670
|
+
Vs.displayName = Hs;
|
|
671
|
+
var zs = "AvatarFallback", $s = _.forwardRef(
|
|
672
|
+
(s, o) => {
|
|
673
|
+
const { __scopeAvatar: t, delayMs: n, ...l } = s, c = js(zs, t), [u, p] = _.useState(n === void 0);
|
|
673
674
|
return _.useEffect(() => {
|
|
674
|
-
if (
|
|
675
|
-
const g = window.setTimeout(() => p(!0),
|
|
675
|
+
if (n !== void 0) {
|
|
676
|
+
const g = window.setTimeout(() => p(!0), n);
|
|
676
677
|
return () => window.clearTimeout(g);
|
|
677
678
|
}
|
|
678
|
-
}, [
|
|
679
|
+
}, [n]), u && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Ye.span, { ...l, ref: o }) : null;
|
|
679
680
|
}
|
|
680
681
|
);
|
|
681
|
-
|
|
682
|
-
function
|
|
683
|
-
return s ?
|
|
682
|
+
$s.displayName = zs;
|
|
683
|
+
function Ss(s, o) {
|
|
684
|
+
return s ? o ? (s.src !== o && (s.src = o), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
684
685
|
}
|
|
685
|
-
function
|
|
686
|
-
const
|
|
687
|
-
() =>
|
|
686
|
+
function Jt(s, { referrerPolicy: o, crossOrigin: t }) {
|
|
687
|
+
const n = Bt(), l = _.useRef(null), c = n ? (l.current || (l.current = new window.Image()), l.current) : null, [u, p] = _.useState(
|
|
688
|
+
() => Ss(c, s)
|
|
688
689
|
);
|
|
689
|
-
return
|
|
690
|
-
p(
|
|
691
|
-
}, [
|
|
690
|
+
return Ge(() => {
|
|
691
|
+
p(Ss(c, s));
|
|
692
|
+
}, [c, s]), Ge(() => {
|
|
692
693
|
const g = (d) => () => {
|
|
693
694
|
p(d);
|
|
694
695
|
};
|
|
695
|
-
if (!
|
|
696
|
-
const v = g("loaded"),
|
|
697
|
-
return
|
|
698
|
-
|
|
696
|
+
if (!c) return;
|
|
697
|
+
const v = g("loaded"), i = g("error");
|
|
698
|
+
return c.addEventListener("load", v), c.addEventListener("error", i), o && (c.referrerPolicy = o), typeof t == "string" && (c.crossOrigin = t), () => {
|
|
699
|
+
c.removeEventListener("load", v), c.removeEventListener("error", i);
|
|
699
700
|
};
|
|
700
|
-
}, [
|
|
701
|
+
}, [c, t, o]), u;
|
|
701
702
|
}
|
|
702
|
-
var
|
|
703
|
-
const
|
|
704
|
-
|
|
703
|
+
var Bs = qs, Ks = Vs, Qs = $s;
|
|
704
|
+
const ss = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
|
|
705
|
+
Bs,
|
|
705
706
|
{
|
|
706
707
|
ref: t,
|
|
707
|
-
className:
|
|
708
|
+
className: Z(
|
|
708
709
|
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
709
710
|
s
|
|
710
711
|
),
|
|
711
|
-
...
|
|
712
|
+
...o
|
|
712
713
|
}
|
|
713
714
|
));
|
|
714
|
-
|
|
715
|
-
const
|
|
716
|
-
|
|
715
|
+
ss.displayName = Bs.displayName;
|
|
716
|
+
const Zt = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
|
|
717
|
+
Ks,
|
|
717
718
|
{
|
|
718
719
|
ref: t,
|
|
719
|
-
className:
|
|
720
|
-
...
|
|
720
|
+
className: Z("aspect-square h-full w-full", s),
|
|
721
|
+
...o
|
|
721
722
|
}
|
|
722
723
|
));
|
|
723
|
-
|
|
724
|
-
const
|
|
725
|
-
|
|
724
|
+
Zt.displayName = Ks.displayName;
|
|
725
|
+
const as = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
|
|
726
|
+
Qs,
|
|
726
727
|
{
|
|
727
728
|
ref: t,
|
|
728
|
-
className:
|
|
729
|
+
className: Z(
|
|
729
730
|
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
730
731
|
s
|
|
731
732
|
),
|
|
732
|
-
...
|
|
733
|
+
...o
|
|
733
734
|
}
|
|
734
735
|
));
|
|
735
|
-
|
|
736
|
-
function
|
|
736
|
+
as.displayName = Qs.displayName;
|
|
737
|
+
function Xt({
|
|
737
738
|
open: s,
|
|
738
|
-
onOpenChange:
|
|
739
|
+
onOpenChange: o,
|
|
739
740
|
group: t,
|
|
740
|
-
onUpdate:
|
|
741
|
+
onUpdate: n
|
|
741
742
|
}) {
|
|
742
|
-
const [l,
|
|
743
|
+
const [l, c] = S("members"), [u, p] = S(""), [g, v] = S([]), [i, d] = S([]), { data: m, isLoading: h, refetch: b } = Ma(t.id), y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: N, isLoading: A } = Oa({
|
|
743
744
|
type: y,
|
|
744
745
|
tenantId: t.tenantId || void 0,
|
|
745
746
|
active: !0,
|
|
746
747
|
limit: 100
|
|
747
|
-
}), I =
|
|
748
|
-
if (!u) return
|
|
748
|
+
}), I = Vt(), U = zt(), M = (m == null ? void 0 : m.members) || [], z = fe(() => new Set(M.map((f) => f.userId)), [M]), R = fe(() => N.filter((f) => !z.has(f.id)), [N, z]), $ = fe(() => {
|
|
749
|
+
if (!u) return R;
|
|
749
750
|
const f = u.toLowerCase();
|
|
750
|
-
return
|
|
751
|
-
(
|
|
752
|
-
var T,
|
|
753
|
-
return ((T =
|
|
751
|
+
return R.filter(
|
|
752
|
+
(C) => {
|
|
753
|
+
var T, F;
|
|
754
|
+
return ((T = C.name) == null ? void 0 : T.toLowerCase().includes(f)) || ((F = C.email) == null ? void 0 : F.toLowerCase().includes(f));
|
|
754
755
|
}
|
|
755
756
|
);
|
|
756
|
-
}, [
|
|
757
|
-
if (!u) return
|
|
757
|
+
}, [R, u]), x = fe(() => {
|
|
758
|
+
if (!u) return M;
|
|
758
759
|
const f = u.toLowerCase();
|
|
759
|
-
return
|
|
760
|
-
(
|
|
761
|
-
var T,
|
|
762
|
-
return ((
|
|
760
|
+
return M.filter(
|
|
761
|
+
(C) => {
|
|
762
|
+
var T, F, ie, D;
|
|
763
|
+
return ((F = (T = C.user) == null ? void 0 : T.name) == null ? void 0 : F.toLowerCase().includes(f)) || ((D = (ie = C.user) == null ? void 0 : ie.email) == null ? void 0 : D.toLowerCase().includes(f));
|
|
763
764
|
}
|
|
764
765
|
);
|
|
765
|
-
}, [
|
|
766
|
+
}, [M, u]), B = async () => {
|
|
766
767
|
if (g.length !== 0)
|
|
767
768
|
try {
|
|
768
769
|
await I.mutateAsync({
|
|
@@ -771,38 +772,38 @@ function Gt({
|
|
|
771
772
|
userIds: g,
|
|
772
773
|
userType: y === "tenant" ? "tenant" : "org"
|
|
773
774
|
}
|
|
774
|
-
}), v([]),
|
|
775
|
+
}), v([]), c("members"), b(), n == null || n();
|
|
775
776
|
} catch (f) {
|
|
776
777
|
console.error("Failed to add members:", f);
|
|
777
778
|
}
|
|
778
|
-
},
|
|
779
|
-
if (
|
|
779
|
+
}, K = async () => {
|
|
780
|
+
if (i.length !== 0)
|
|
780
781
|
try {
|
|
781
|
-
await
|
|
782
|
+
await U.mutateAsync({
|
|
782
783
|
groupId: t.id,
|
|
783
784
|
data: {
|
|
784
|
-
userIds:
|
|
785
|
+
userIds: i
|
|
785
786
|
}
|
|
786
|
-
}), d([]), b(),
|
|
787
|
+
}), d([]), b(), n == null || n();
|
|
787
788
|
} catch (f) {
|
|
788
789
|
console.error("Failed to remove members:", f);
|
|
789
790
|
}
|
|
790
|
-
},
|
|
791
|
+
}, Q = (f) => {
|
|
791
792
|
v(
|
|
792
|
-
(
|
|
793
|
+
(C) => C.includes(f) ? C.filter((T) => T !== f) : [...C, f]
|
|
793
794
|
);
|
|
794
|
-
},
|
|
795
|
+
}, W = (f) => {
|
|
795
796
|
d(
|
|
796
|
-
(
|
|
797
|
+
(C) => C.includes(f) ? C.filter((T) => T !== f) : [...C, f]
|
|
797
798
|
);
|
|
798
799
|
};
|
|
799
|
-
return /* @__PURE__ */ e(
|
|
800
|
-
/* @__PURE__ */ a(
|
|
801
|
-
/* @__PURE__ */ e(
|
|
800
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(Qe, { open: s, onOpenChange: o, children: /* @__PURE__ */ a(Je, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
|
|
801
|
+
/* @__PURE__ */ a(Ze, { children: [
|
|
802
|
+
/* @__PURE__ */ e(Xe, { children: t.name }),
|
|
802
803
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ a("p", { className: "text-sm text-muted-foreground", children: [
|
|
803
|
-
|
|
804
|
+
M.length,
|
|
804
805
|
" ",
|
|
805
|
-
|
|
806
|
+
M.length === 1 ? "member" : "members"
|
|
806
807
|
] }) }),
|
|
807
808
|
/* @__PURE__ */ a("p", { id: "group-members-description", className: "sr-only", children: [
|
|
808
809
|
"Add or remove members from the ",
|
|
@@ -810,18 +811,18 @@ function Gt({
|
|
|
810
811
|
" group"
|
|
811
812
|
] })
|
|
812
813
|
] }),
|
|
813
|
-
/* @__PURE__ */ a(
|
|
814
|
-
|
|
814
|
+
/* @__PURE__ */ a(Es, { value: l, onValueChange: (f) => {
|
|
815
|
+
c(f), p(""), d([]);
|
|
815
816
|
}, className: "mt-4", children: [
|
|
816
|
-
/* @__PURE__ */ a(
|
|
817
|
-
/* @__PURE__ */ e(
|
|
818
|
-
/* @__PURE__ */ e(
|
|
817
|
+
/* @__PURE__ */ a(As, { className: "grid w-full grid-cols-2", children: [
|
|
818
|
+
/* @__PURE__ */ e(ge, { value: "members", children: "Current Members" }),
|
|
819
|
+
/* @__PURE__ */ e(ge, { value: "add", children: "Add Members" })
|
|
819
820
|
] }),
|
|
820
|
-
/* @__PURE__ */ a(
|
|
821
|
+
/* @__PURE__ */ a(ve, { value: "members", className: "mt-4 space-y-4", children: [
|
|
821
822
|
/* @__PURE__ */ a("div", { className: "relative", children: [
|
|
822
|
-
/* @__PURE__ */ e(
|
|
823
|
+
/* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
823
824
|
/* @__PURE__ */ e(
|
|
824
|
-
|
|
825
|
+
re,
|
|
825
826
|
{
|
|
826
827
|
placeholder: "Search members...",
|
|
827
828
|
value: u,
|
|
@@ -830,49 +831,49 @@ function Gt({
|
|
|
830
831
|
}
|
|
831
832
|
)
|
|
832
833
|
] }),
|
|
833
|
-
/* @__PURE__ */ e(
|
|
834
|
-
/* @__PURE__ */ e(
|
|
834
|
+
/* @__PURE__ */ e(Pe, { className: i.length > 0 ? "h-[300px]" : "h-[350px]", children: h ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((f) => /* @__PURE__ */ e(Fe, { className: "h-16 w-full" }, f)) }) : x.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
835
|
+
/* @__PURE__ */ e(V, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
835
836
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: u ? "No members found" : "No members yet" }),
|
|
836
837
|
/* @__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' })
|
|
837
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
838
|
-
|
|
838
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: x.map((f) => /* @__PURE__ */ e(
|
|
839
|
+
Yt,
|
|
839
840
|
{
|
|
840
841
|
member: f,
|
|
841
|
-
selected:
|
|
842
|
-
onToggle: () =>
|
|
842
|
+
selected: i.includes(f.userId),
|
|
843
|
+
onToggle: () => W(f.userId)
|
|
843
844
|
},
|
|
844
845
|
f.id
|
|
845
846
|
)) }) }),
|
|
846
|
-
|
|
847
|
+
i.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center justify-between pt-4 border-t", children: [
|
|
847
848
|
/* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
|
|
848
|
-
|
|
849
|
+
i.length,
|
|
849
850
|
" member",
|
|
850
|
-
|
|
851
|
+
i.length !== 1 ? "s" : "",
|
|
851
852
|
" selected"
|
|
852
853
|
] }),
|
|
853
854
|
/* @__PURE__ */ e(
|
|
854
|
-
|
|
855
|
+
L,
|
|
855
856
|
{
|
|
856
857
|
variant: "destructive",
|
|
857
858
|
size: "sm",
|
|
858
|
-
onClick:
|
|
859
|
-
disabled:
|
|
860
|
-
children:
|
|
861
|
-
/* @__PURE__ */ e(
|
|
859
|
+
onClick: K,
|
|
860
|
+
disabled: U.isPending,
|
|
861
|
+
children: U.isPending ? /* @__PURE__ */ a(k, { children: [
|
|
862
|
+
/* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
862
863
|
"Removing..."
|
|
863
|
-
] }) : /* @__PURE__ */ a(
|
|
864
|
-
/* @__PURE__ */ e(
|
|
864
|
+
] }) : /* @__PURE__ */ a(k, { children: [
|
|
865
|
+
/* @__PURE__ */ e(ks, { className: "mr-2 h-4 w-4" }),
|
|
865
866
|
"Remove Selected"
|
|
866
867
|
] })
|
|
867
868
|
}
|
|
868
869
|
)
|
|
869
870
|
] })
|
|
870
871
|
] }),
|
|
871
|
-
/* @__PURE__ */ a(
|
|
872
|
+
/* @__PURE__ */ a(ve, { value: "add", className: "mt-4 space-y-4", children: [
|
|
872
873
|
/* @__PURE__ */ a("div", { className: "relative", children: [
|
|
873
|
-
/* @__PURE__ */ e(
|
|
874
|
+
/* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
874
875
|
/* @__PURE__ */ e(
|
|
875
|
-
|
|
876
|
+
re,
|
|
876
877
|
{
|
|
877
878
|
placeholder: "Search users to add...",
|
|
878
879
|
value: u,
|
|
@@ -881,16 +882,16 @@ function Gt({
|
|
|
881
882
|
}
|
|
882
883
|
)
|
|
883
884
|
] }),
|
|
884
|
-
/* @__PURE__ */ e(
|
|
885
|
-
/* @__PURE__ */ e(
|
|
885
|
+
/* @__PURE__ */ e(Pe, { className: "h-[300px]", children: A ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((f) => /* @__PURE__ */ e(Fe, { className: "h-16 w-full" }, f)) }) : $.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
886
|
+
/* @__PURE__ */ e(je, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
886
887
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
|
|
887
888
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : "All eligible users are already members" })
|
|
888
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
889
|
-
|
|
889
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: $.map((f) => /* @__PURE__ */ e(
|
|
890
|
+
en,
|
|
890
891
|
{
|
|
891
892
|
user: f,
|
|
892
893
|
selected: g.includes(f.id),
|
|
893
|
-
onToggle: () =>
|
|
894
|
+
onToggle: () => Q(f.id)
|
|
894
895
|
},
|
|
895
896
|
f.id
|
|
896
897
|
)) }) }),
|
|
@@ -902,15 +903,15 @@ function Gt({
|
|
|
902
903
|
" selected"
|
|
903
904
|
] }),
|
|
904
905
|
/* @__PURE__ */ e(
|
|
905
|
-
|
|
906
|
+
L,
|
|
906
907
|
{
|
|
907
|
-
onClick:
|
|
908
|
+
onClick: B,
|
|
908
909
|
disabled: I.isPending,
|
|
909
|
-
children: I.isPending ? /* @__PURE__ */ a(
|
|
910
|
-
/* @__PURE__ */ e(
|
|
910
|
+
children: I.isPending ? /* @__PURE__ */ a(k, { children: [
|
|
911
|
+
/* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
911
912
|
"Adding..."
|
|
912
|
-
] }) : /* @__PURE__ */ a(
|
|
913
|
-
/* @__PURE__ */ e(
|
|
913
|
+
] }) : /* @__PURE__ */ a(k, { children: [
|
|
914
|
+
/* @__PURE__ */ e(je, { className: "mr-2 h-4 w-4" }),
|
|
914
915
|
"Add Members"
|
|
915
916
|
] })
|
|
916
917
|
}
|
|
@@ -920,21 +921,21 @@ function Gt({
|
|
|
920
921
|
] })
|
|
921
922
|
] }) }) });
|
|
922
923
|
}
|
|
923
|
-
function
|
|
924
|
+
function Yt({
|
|
924
925
|
member: s,
|
|
925
|
-
selected:
|
|
926
|
+
selected: o,
|
|
926
927
|
onToggle: t
|
|
927
928
|
}) {
|
|
928
|
-
var l,
|
|
929
|
-
const
|
|
929
|
+
var l, c, u, p;
|
|
930
|
+
const n = ((c = (l = s.user) == null ? void 0 : l.name) == null ? void 0 : c.split(" ").map((g) => g[0]).join("").toUpperCase()) || "?";
|
|
930
931
|
return /* @__PURE__ */ a(
|
|
931
932
|
"div",
|
|
932
933
|
{
|
|
933
934
|
className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
|
|
934
935
|
onClick: t,
|
|
935
936
|
children: [
|
|
936
|
-
/* @__PURE__ */ e(
|
|
937
|
-
/* @__PURE__ */ e(
|
|
937
|
+
/* @__PURE__ */ e(Ms, { checked: o }),
|
|
938
|
+
/* @__PURE__ */ e(ss, { className: "h-8 w-8", children: /* @__PURE__ */ e(as, { className: "text-xs", children: n }) }),
|
|
938
939
|
/* @__PURE__ */ a("div", { className: "flex-1", children: [
|
|
939
940
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((u = s.user) == null ? void 0 : u.name) || "Unknown User" }),
|
|
940
941
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (p = s.user) == null ? void 0 : p.email })
|
|
@@ -943,21 +944,21 @@ function Rt({
|
|
|
943
944
|
}
|
|
944
945
|
);
|
|
945
946
|
}
|
|
946
|
-
function
|
|
947
|
+
function en({
|
|
947
948
|
user: s,
|
|
948
|
-
selected:
|
|
949
|
+
selected: o,
|
|
949
950
|
onToggle: t
|
|
950
951
|
}) {
|
|
951
952
|
var l;
|
|
952
|
-
const
|
|
953
|
+
const n = ((l = s.name) == null ? void 0 : l.split(" ").map((c) => c[0]).join("").toUpperCase()) || "?";
|
|
953
954
|
return /* @__PURE__ */ a(
|
|
954
955
|
"div",
|
|
955
956
|
{
|
|
956
957
|
className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
|
|
957
958
|
onClick: t,
|
|
958
959
|
children: [
|
|
959
|
-
/* @__PURE__ */ e(
|
|
960
|
-
/* @__PURE__ */ e(
|
|
960
|
+
/* @__PURE__ */ e(Ms, { checked: o }),
|
|
961
|
+
/* @__PURE__ */ e(ss, { className: "h-8 w-8", children: /* @__PURE__ */ e(as, { className: "text-xs", children: n }) }),
|
|
961
962
|
/* @__PURE__ */ a("div", { className: "flex-1", children: [
|
|
962
963
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: s.name }),
|
|
963
964
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s.email })
|
|
@@ -966,83 +967,83 @@ function Pt({
|
|
|
966
967
|
}
|
|
967
968
|
);
|
|
968
969
|
}
|
|
969
|
-
function
|
|
970
|
+
function sn({
|
|
970
971
|
open: s,
|
|
971
|
-
onOpenChange:
|
|
972
|
+
onOpenChange: o
|
|
972
973
|
}) {
|
|
973
|
-
const [t,
|
|
974
|
+
const [t, n] = S("groups"), [l, c] = S(""), [u, p] = S(null), [g, v] = S(!1), [i, d] = S(null), { tokenProps: m } = P(), { currentUser: h } = Os(), b = Ht(), y = (h == null ? void 0 : h.type) === "tenant", N = m == null ? void 0 : m.tenantId, { groups: A, isLoading: I, refetch: U } = Ia({
|
|
974
975
|
type: y ? "TENANT_GROUP" : "all",
|
|
975
976
|
tenantId: y ? N : void 0,
|
|
976
977
|
includeMembers: !1
|
|
977
|
-
}),
|
|
978
|
-
(
|
|
979
|
-
var
|
|
980
|
-
return
|
|
978
|
+
}), M = A.filter(
|
|
979
|
+
(x) => {
|
|
980
|
+
var B;
|
|
981
|
+
return x.name.toLowerCase().includes(l.toLowerCase()) || ((B = x.description) == null ? void 0 : B.toLowerCase().includes(l.toLowerCase()));
|
|
981
982
|
}
|
|
982
|
-
),
|
|
983
|
-
if (
|
|
983
|
+
), z = async () => {
|
|
984
|
+
if (i)
|
|
984
985
|
try {
|
|
985
|
-
await b.mutateAsync(
|
|
986
|
-
} catch (
|
|
987
|
-
console.error("Failed to delete group:",
|
|
986
|
+
await b.mutateAsync(i.id), d(null), U();
|
|
987
|
+
} catch (x) {
|
|
988
|
+
console.error("Failed to delete group:", x);
|
|
988
989
|
}
|
|
989
|
-
},
|
|
990
|
-
p(
|
|
991
|
-
},
|
|
992
|
-
|
|
990
|
+
}, R = (x) => {
|
|
991
|
+
p(x), v(!0);
|
|
992
|
+
}, $ = () => {
|
|
993
|
+
n("groups"), U();
|
|
993
994
|
};
|
|
994
|
-
return /* @__PURE__ */ a(
|
|
995
|
-
/* @__PURE__ */ e(
|
|
996
|
-
/* @__PURE__ */ a(
|
|
997
|
-
/* @__PURE__ */ a(
|
|
998
|
-
/* @__PURE__ */ e(
|
|
995
|
+
return /* @__PURE__ */ a(k, { children: [
|
|
996
|
+
/* @__PURE__ */ e(Qe, { open: s, onOpenChange: o, children: /* @__PURE__ */ a(Je, { className: "max-w-4xl max-h-[80vh]", children: [
|
|
997
|
+
/* @__PURE__ */ a(Ze, { children: [
|
|
998
|
+
/* @__PURE__ */ a(Xe, { className: "flex items-center gap-2", children: [
|
|
999
|
+
/* @__PURE__ */ e(V, { className: "h-5 w-5" }),
|
|
999
1000
|
"Group Management"
|
|
1000
1001
|
] }),
|
|
1001
|
-
/* @__PURE__ */ e(
|
|
1002
|
+
/* @__PURE__ */ e(xs, { children: "Manage your groups, create new groups, and control group membership" })
|
|
1002
1003
|
] }),
|
|
1003
|
-
/* @__PURE__ */ a(
|
|
1004
|
-
/* @__PURE__ */ a(
|
|
1005
|
-
/* @__PURE__ */ a(
|
|
1006
|
-
/* @__PURE__ */ e(
|
|
1004
|
+
/* @__PURE__ */ a(Es, { value: t, onValueChange: n, className: "mt-4", children: [
|
|
1005
|
+
/* @__PURE__ */ a(As, { className: "grid w-full grid-cols-2", children: [
|
|
1006
|
+
/* @__PURE__ */ a(ge, { value: "groups", className: "flex items-center gap-2", children: [
|
|
1007
|
+
/* @__PURE__ */ e(V, { className: "h-4 w-4" }),
|
|
1007
1008
|
"Groups"
|
|
1008
1009
|
] }),
|
|
1009
|
-
/* @__PURE__ */ a(
|
|
1010
|
-
/* @__PURE__ */ e(
|
|
1010
|
+
/* @__PURE__ */ a(ge, { value: "create", className: "flex items-center gap-2", children: [
|
|
1011
|
+
/* @__PURE__ */ e(We, { className: "h-4 w-4" }),
|
|
1011
1012
|
"Create Group"
|
|
1012
1013
|
] })
|
|
1013
1014
|
] }),
|
|
1014
|
-
/* @__PURE__ */ e(
|
|
1015
|
+
/* @__PURE__ */ e(ve, { value: "groups", className: "mt-4", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
1015
1016
|
/* @__PURE__ */ a("div", { className: "relative", children: [
|
|
1016
|
-
/* @__PURE__ */ e(
|
|
1017
|
+
/* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
1017
1018
|
/* @__PURE__ */ e(
|
|
1018
|
-
|
|
1019
|
+
re,
|
|
1019
1020
|
{
|
|
1020
1021
|
placeholder: "Search groups...",
|
|
1021
1022
|
value: l,
|
|
1022
|
-
onChange: (
|
|
1023
|
+
onChange: (x) => c(x.target.value),
|
|
1023
1024
|
className: "pl-10"
|
|
1024
1025
|
}
|
|
1025
1026
|
)
|
|
1026
1027
|
] }),
|
|
1027
|
-
/* @__PURE__ */ e(
|
|
1028
|
-
/* @__PURE__ */ e(
|
|
1028
|
+
/* @__PURE__ */ e(Pe, { className: "h-[400px]", children: I ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(Fe, { className: "h-24 w-full" }, x)) }) : M.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
1029
|
+
/* @__PURE__ */ e(V, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
1029
1030
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No groups found" }),
|
|
1030
1031
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "Create your first group to get started" })
|
|
1031
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children:
|
|
1032
|
-
|
|
1032
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: M.map((x) => /* @__PURE__ */ e(
|
|
1033
|
+
an,
|
|
1033
1034
|
{
|
|
1034
|
-
group:
|
|
1035
|
-
onManageMembers: () =>
|
|
1036
|
-
onDelete: () => d(
|
|
1035
|
+
group: x,
|
|
1036
|
+
onManageMembers: () => R(x),
|
|
1037
|
+
onDelete: () => d(x),
|
|
1037
1038
|
currentUserId: h == null ? void 0 : h.id
|
|
1038
1039
|
},
|
|
1039
|
-
|
|
1040
|
+
x.id
|
|
1040
1041
|
)) }) })
|
|
1041
1042
|
] }) }),
|
|
1042
|
-
/* @__PURE__ */ e(
|
|
1043
|
-
|
|
1043
|
+
/* @__PURE__ */ e(ve, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
|
|
1044
|
+
$t,
|
|
1044
1045
|
{
|
|
1045
|
-
onSuccess:
|
|
1046
|
+
onSuccess: $,
|
|
1046
1047
|
tenantId: N,
|
|
1047
1048
|
isTenantUser: y
|
|
1048
1049
|
}
|
|
@@ -1050,38 +1051,38 @@ function Ut({
|
|
|
1050
1051
|
] })
|
|
1051
1052
|
] }) }),
|
|
1052
1053
|
u && /* @__PURE__ */ e(
|
|
1053
|
-
|
|
1054
|
+
Xt,
|
|
1054
1055
|
{
|
|
1055
1056
|
open: g,
|
|
1056
1057
|
onOpenChange: v,
|
|
1057
1058
|
group: u,
|
|
1058
|
-
onUpdate: () =>
|
|
1059
|
+
onUpdate: () => U()
|
|
1059
1060
|
}
|
|
1060
1061
|
),
|
|
1061
1062
|
/* @__PURE__ */ e(
|
|
1062
|
-
|
|
1063
|
+
Is,
|
|
1063
1064
|
{
|
|
1064
|
-
open: !!
|
|
1065
|
+
open: !!i,
|
|
1065
1066
|
onOpenChange: () => d(null),
|
|
1066
|
-
children: /* @__PURE__ */ a(
|
|
1067
|
-
/* @__PURE__ */ a(
|
|
1068
|
-
/* @__PURE__ */ e(
|
|
1069
|
-
/* @__PURE__ */ a(
|
|
1067
|
+
children: /* @__PURE__ */ a(Ts, { children: [
|
|
1068
|
+
/* @__PURE__ */ a(_s, { children: [
|
|
1069
|
+
/* @__PURE__ */ e(Us, { children: "Delete Group" }),
|
|
1070
|
+
/* @__PURE__ */ a(Gs, { children: [
|
|
1070
1071
|
'Are you sure you want to delete "',
|
|
1071
|
-
|
|
1072
|
+
i == null ? void 0 : i.name,
|
|
1072
1073
|
'"? This action cannot be undone and will remove all members from the group.'
|
|
1073
1074
|
] })
|
|
1074
1075
|
] }),
|
|
1075
|
-
/* @__PURE__ */ a(
|
|
1076
|
-
/* @__PURE__ */ e(
|
|
1076
|
+
/* @__PURE__ */ a(Rs, { children: [
|
|
1077
|
+
/* @__PURE__ */ e(Ps, { children: "Cancel" }),
|
|
1077
1078
|
/* @__PURE__ */ e(
|
|
1078
|
-
|
|
1079
|
+
qe,
|
|
1079
1080
|
{
|
|
1080
|
-
onClick:
|
|
1081
|
+
onClick: z,
|
|
1081
1082
|
disabled: b.isPending,
|
|
1082
1083
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
1083
|
-
children: b.isPending ? /* @__PURE__ */ a(
|
|
1084
|
-
/* @__PURE__ */ e(
|
|
1084
|
+
children: b.isPending ? /* @__PURE__ */ a(k, { children: [
|
|
1085
|
+
/* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
1085
1086
|
"Deleting..."
|
|
1086
1087
|
] }) : "Delete Group"
|
|
1087
1088
|
}
|
|
@@ -1092,13 +1093,13 @@ function Ut({
|
|
|
1092
1093
|
)
|
|
1093
1094
|
] });
|
|
1094
1095
|
}
|
|
1095
|
-
function
|
|
1096
|
+
function an({
|
|
1096
1097
|
group: s,
|
|
1097
|
-
onManageMembers:
|
|
1098
|
+
onManageMembers: o,
|
|
1098
1099
|
onDelete: t,
|
|
1099
|
-
currentUserId:
|
|
1100
|
+
currentUserId: n
|
|
1100
1101
|
}) {
|
|
1101
|
-
const l = s.createdBy ===
|
|
1102
|
+
const l = s.createdBy === n;
|
|
1102
1103
|
return /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50", children: /* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-3", children: [
|
|
1103
1104
|
/* @__PURE__ */ a("div", { className: "flex-1 space-y-2", children: [
|
|
1104
1105
|
/* @__PURE__ */ a("div", { children: [
|
|
@@ -1107,177 +1108,194 @@ function Ft({
|
|
|
1107
1108
|
] }),
|
|
1108
1109
|
/* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
|
|
1109
1110
|
/* @__PURE__ */ a("span", { className: "flex items-center gap-1", children: [
|
|
1110
|
-
/* @__PURE__ */ e(
|
|
1111
|
+
/* @__PURE__ */ e(V, { className: "h-3 w-3" }),
|
|
1111
1112
|
s.memberCount,
|
|
1112
1113
|
" ",
|
|
1113
1114
|
s.memberCount === 1 ? "member" : "members"
|
|
1114
1115
|
] }),
|
|
1115
1116
|
/* @__PURE__ */ a("span", { children: [
|
|
1116
1117
|
"Created ",
|
|
1117
|
-
|
|
1118
|
+
Nt(new Date(s.createdAt), "MMM d, yyyy")
|
|
1118
1119
|
] })
|
|
1119
1120
|
] })
|
|
1120
1121
|
] }),
|
|
1121
1122
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
|
|
1122
1123
|
/* @__PURE__ */ e(
|
|
1123
|
-
|
|
1124
|
+
L,
|
|
1124
1125
|
{
|
|
1125
1126
|
variant: "ghost",
|
|
1126
1127
|
size: "sm",
|
|
1127
|
-
onClick:
|
|
1128
|
+
onClick: o,
|
|
1128
1129
|
title: "Manage members",
|
|
1129
|
-
children: /* @__PURE__ */ e(
|
|
1130
|
+
children: /* @__PURE__ */ e(je, { className: "h-4 w-4" })
|
|
1130
1131
|
}
|
|
1131
1132
|
),
|
|
1132
1133
|
l && /* @__PURE__ */ e(
|
|
1133
|
-
|
|
1134
|
+
L,
|
|
1134
1135
|
{
|
|
1135
1136
|
variant: "ghost",
|
|
1136
1137
|
size: "sm",
|
|
1137
1138
|
onClick: t,
|
|
1138
1139
|
title: "Delete group",
|
|
1139
1140
|
className: "text-destructive hover:text-destructive",
|
|
1140
|
-
children: /* @__PURE__ */ e(
|
|
1141
|
+
children: /* @__PURE__ */ e(ks, { className: "h-4 w-4" })
|
|
1141
1142
|
}
|
|
1142
1143
|
)
|
|
1143
1144
|
] })
|
|
1144
1145
|
] }) });
|
|
1145
1146
|
}
|
|
1146
|
-
function
|
|
1147
|
-
var
|
|
1148
|
-
|
|
1147
|
+
function pn() {
|
|
1148
|
+
var ms, hs, ps, fs;
|
|
1149
|
+
mt(), ht();
|
|
1149
1150
|
const {
|
|
1150
1151
|
authToken: s,
|
|
1151
|
-
tokenProps:
|
|
1152
|
+
tokenProps: o,
|
|
1152
1153
|
id: t
|
|
1153
|
-
} =
|
|
1154
|
-
|
|
1155
|
-
const p =
|
|
1156
|
-
|
|
1157
|
-
const d =
|
|
1158
|
-
(
|
|
1159
|
-
), { setDashboardTitle: m } =
|
|
1160
|
-
(
|
|
1161
|
-
),
|
|
1162
|
-
|
|
1163
|
-
const
|
|
1164
|
-
(
|
|
1165
|
-
),
|
|
1166
|
-
(
|
|
1154
|
+
} = P(), { isLocalDev: n } = Ta(), { permissions: l } = yt(), c = _a(), { isLoading: u } = Ua();
|
|
1155
|
+
w((r) => r.theme);
|
|
1156
|
+
const p = w((r) => r.lenses), g = w((r) => r.selectedLensId), v = p == null ? void 0 : p.find((r) => r.id === g), i = w((r) => r.dashboard);
|
|
1157
|
+
w((r) => r.selectedSheetId);
|
|
1158
|
+
const d = w(
|
|
1159
|
+
(r) => r.isDashboardEditing
|
|
1160
|
+
), { setDashboardTitle: m } = w((r) => r.actions), [h, b] = S(!1), [y, N] = S(!1), [A, I] = S(!1), [U, M] = S(!1), [z, R] = S(!1), [$, x] = S(!1), [B, K] = S(!1), [Q, W] = S(null), [f, C] = S(!1), T = w((r) => r.isDashboardPanelOpen), F = w(
|
|
1161
|
+
(r) => r.actions.setIsDashboardPanelOpen
|
|
1162
|
+
), ie = w((r) => r.filterValues), D = w((r) => r.isVisualEditing);
|
|
1163
|
+
vs((r) => r.card);
|
|
1164
|
+
const X = pe(
|
|
1165
|
+
(r) => r.selectedDashboard
|
|
1166
|
+
), le = pe(
|
|
1167
|
+
(r) => r.initialDashboard
|
|
1167
1168
|
);
|
|
1168
|
-
|
|
1169
|
-
const
|
|
1170
|
-
(
|
|
1171
|
-
),
|
|
1172
|
-
(
|
|
1173
|
-
), { setIsDashboardEditing:
|
|
1174
|
-
(
|
|
1175
|
-
), { setInitialDashboard:
|
|
1176
|
-
(
|
|
1177
|
-
), { resources:
|
|
1178
|
-
id:
|
|
1179
|
-
title: (
|
|
1180
|
-
} : null, { handleAddNewFrame:
|
|
1169
|
+
pe((r) => r.selectedVisual), w((r) => r.selectedFrameId), vs((r) => r.frame);
|
|
1170
|
+
const ce = X ? (hs = X == null ? void 0 : X.permissions) == null ? void 0 : hs.canEdit : (ms = le == null ? void 0 : le.permissions) == null ? void 0 : ms.canEdit, Ws = w((r) => r.showFilters), Js = Ga((r) => r.setPanelOpen), Zs = w(
|
|
1171
|
+
(r) => r.showDashboardJSON
|
|
1172
|
+
), Ne = w((r) => r.onSaveFunction), Xs = w(
|
|
1173
|
+
(r) => r.actions.setShowFilters
|
|
1174
|
+
), { setIsDashboardEditing: ts, setShowDashboardJSON: ns } = w(
|
|
1175
|
+
(r) => r.actions
|
|
1176
|
+
), { setInitialDashboard: rs, clearSelectedDashboard: Se } = pe(
|
|
1177
|
+
(r) => r.actions
|
|
1178
|
+
), { resources: de } = Ra(Oe.DASHBOARD), { data: we } = Pa(), Ys = ((ps = we == null ? void 0 : we.preference) == null ? void 0 : ps.defaultDashboardId) || null, { mutate: ea, isPending: sa } = Fa(), { currentUser: aa } = Os(), ta = ja(aa), J = X || le, os = J ? {
|
|
1179
|
+
id: J.id,
|
|
1180
|
+
title: (i == null ? void 0 : i.title) || J.title || "Dashboard"
|
|
1181
|
+
} : null, { handleAddNewFrame: na } = qa(), [xe, De] = S(!1), [ra, Y] = S(!1), [ee, ue] = S("close"), se = Ha(Oe.DASHBOARD), [G, Ce] = S(
|
|
1181
1182
|
null
|
|
1182
|
-
),
|
|
1183
|
-
if (!(
|
|
1183
|
+
), oa = async (r, O) => {
|
|
1184
|
+
if (!(i != null && i.id)) {
|
|
1184
1185
|
console.log("No dashboard ID found");
|
|
1185
1186
|
return;
|
|
1186
1187
|
}
|
|
1187
1188
|
console.log("Updating dashboard title:", {
|
|
1188
|
-
dashboardId:
|
|
1189
|
-
newTitle:
|
|
1189
|
+
dashboardId: i.id,
|
|
1190
|
+
newTitle: r,
|
|
1190
1191
|
previousTitle: O
|
|
1191
|
-
}),
|
|
1192
|
+
}), se.mutate(
|
|
1192
1193
|
{
|
|
1193
|
-
resourceId:
|
|
1194
|
-
data: { title:
|
|
1194
|
+
resourceId: i.id,
|
|
1195
|
+
data: { title: r }
|
|
1195
1196
|
},
|
|
1196
1197
|
{
|
|
1197
1198
|
onSuccess: () => {
|
|
1198
|
-
console.log("Dashboard title updated successfully"),
|
|
1199
|
+
console.log("Dashboard title updated successfully"), E.success("Dashboard title updated");
|
|
1199
1200
|
},
|
|
1200
|
-
onError: (
|
|
1201
|
-
console.error("Failed to update dashboard title:",
|
|
1201
|
+
onError: (ne) => {
|
|
1202
|
+
console.error("Failed to update dashboard title:", ne), E.error("Failed to update dashboard title"), m(O);
|
|
1202
1203
|
}
|
|
1203
1204
|
}
|
|
1204
1205
|
);
|
|
1205
1206
|
};
|
|
1206
|
-
|
|
1207
|
-
if (
|
|
1208
|
-
const
|
|
1209
|
-
if (
|
|
1210
|
-
const O =
|
|
1211
|
-
(
|
|
1207
|
+
dt(() => {
|
|
1208
|
+
if (de && de.length > 0) {
|
|
1209
|
+
const r = i == null ? void 0 : i.id;
|
|
1210
|
+
if (r) {
|
|
1211
|
+
const O = de.find(
|
|
1212
|
+
(ne) => ne.id === r
|
|
1212
1213
|
);
|
|
1213
|
-
O &&
|
|
1214
|
+
O && rs(O);
|
|
1214
1215
|
}
|
|
1215
1216
|
}
|
|
1216
|
-
}, [
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1219
|
-
},
|
|
1220
|
-
|
|
1217
|
+
}, [de, i == null ? void 0 : i.id, rs]);
|
|
1218
|
+
const me = o.orgUserId || o.tenantId, is = d && !D && me && ce, { setDashboard: Le } = w((r) => r.actions), ia = () => {
|
|
1219
|
+
ts(!0);
|
|
1220
|
+
}, Ee = () => {
|
|
1221
|
+
ts(!1), ns(!1), Ce(null);
|
|
1221
1222
|
};
|
|
1222
|
-
|
|
1223
|
+
pt(
|
|
1223
1224
|
d,
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
(
|
|
1225
|
+
i,
|
|
1226
|
+
G,
|
|
1227
|
+
(r) => Ce(r)
|
|
1227
1228
|
);
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1229
|
+
const { isDirty: ls, isDirtyPending: la, resetDirty: he } = xt(
|
|
1230
|
+
i,
|
|
1231
|
+
G,
|
|
1232
|
+
300,
|
|
1233
|
+
1e3,
|
|
1234
|
+
Ie
|
|
1235
|
+
), cs = ut(() => G ? Ie(i) !== Ie(G) : !1, [i, G]), Ae = ls || la, ae = xe || se.isPending, ca = () => {
|
|
1236
|
+
cs() ? (ue("close"), Y(!0)) : (Ee(), he());
|
|
1237
|
+
}, da = async () => {
|
|
1238
|
+
await ke({
|
|
1239
|
+
closeAfterSave: !0,
|
|
1240
|
+
navigateHomeAfterSave: ee === "home"
|
|
1241
|
+
});
|
|
1242
|
+
}, ua = () => {
|
|
1243
|
+
G && Le(G), Ee(), ee === "home" && Se(), ue("close"), Y(!1), he();
|
|
1244
|
+
}, ma = () => {
|
|
1245
|
+
G && (Le(G), he());
|
|
1246
|
+
}, ha = () => {
|
|
1247
|
+
if (d && cs()) {
|
|
1248
|
+
ue("home"), Y(!0);
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
Se();
|
|
1234
1252
|
};
|
|
1235
|
-
async function
|
|
1236
|
-
const O = (
|
|
1237
|
-
|
|
1238
|
-
const
|
|
1239
|
-
|
|
1240
|
-
const
|
|
1241
|
-
template:
|
|
1253
|
+
async function ke(r) {
|
|
1254
|
+
const O = (r == null ? void 0 : r.closeAfterSave) ?? f, ne = (r == null ? void 0 : r.navigateHomeAfterSave) ?? !1;
|
|
1255
|
+
C(O), O && Y(!1);
|
|
1256
|
+
const ba = ct(i);
|
|
1257
|
+
K(!0), W(null), De(!0);
|
|
1258
|
+
const ya = {
|
|
1259
|
+
template: i
|
|
1242
1260
|
};
|
|
1243
|
-
|
|
1261
|
+
se.mutate(
|
|
1244
1262
|
{
|
|
1245
|
-
resourceId:
|
|
1246
|
-
data:
|
|
1263
|
+
resourceId: i.id,
|
|
1264
|
+
data: ya
|
|
1247
1265
|
},
|
|
1248
1266
|
{
|
|
1249
1267
|
onSuccess: () => {
|
|
1250
|
-
|
|
1268
|
+
De(!1), E.success("Dashboard saved!"), Ce(ba), K(!1), C(!1), O && (Ee(), he(), ne && Se()), ue("close");
|
|
1251
1269
|
},
|
|
1252
1270
|
onError: () => {
|
|
1253
|
-
|
|
1271
|
+
De(!1), W("Failed to save dashboard. Please try again."), E.error("Failed to save dashboard");
|
|
1254
1272
|
}
|
|
1255
1273
|
}
|
|
1256
1274
|
);
|
|
1257
1275
|
}
|
|
1258
|
-
async function
|
|
1276
|
+
async function pa() {
|
|
1259
1277
|
if (b(!0), !g || !v) return;
|
|
1260
|
-
const
|
|
1278
|
+
const r = JSON.stringify(i), O = {
|
|
1261
1279
|
...v,
|
|
1262
|
-
template:
|
|
1263
|
-
filterValues:
|
|
1280
|
+
template: r,
|
|
1281
|
+
filterValues: ie
|
|
1264
1282
|
};
|
|
1265
|
-
await
|
|
1266
|
-
|
|
1283
|
+
await Ve(
|
|
1284
|
+
o.apiServiceUrl,
|
|
1267
1285
|
O,
|
|
1268
1286
|
s == null ? void 0 : s.accessToken
|
|
1269
|
-
),
|
|
1287
|
+
), E.success("Lens saved"), Ne == null || Ne(i), b(!1);
|
|
1270
1288
|
}
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
title:
|
|
1274
|
-
dashboardStateTitle:
|
|
1275
|
-
dashboardId:
|
|
1289
|
+
const ds = (v == null ? void 0 : v.name) || i.title;
|
|
1290
|
+
se.isPending && console.log("Title during update:", {
|
|
1291
|
+
title: ds,
|
|
1292
|
+
dashboardStateTitle: i.title,
|
|
1293
|
+
dashboardId: i == null ? void 0 : i.id,
|
|
1276
1294
|
currentLensName: v == null ? void 0 : v.name
|
|
1277
1295
|
});
|
|
1278
|
-
const
|
|
1279
|
-
|
|
1280
|
-
dashboardId:
|
|
1296
|
+
const us = o.orgUserId || o.tenantId && o.endUserId && o.endUserEmail, fa = !!us && !!(s != null && s.accessToken) && !!(o != null && o.apiServiceUrl), ga = c, te = (i == null ? void 0 : i.id) || null, Me = !!te && Ys === te, va = () => {
|
|
1297
|
+
te && ea({
|
|
1298
|
+
dashboardId: Me ? null : te
|
|
1281
1299
|
});
|
|
1282
1300
|
};
|
|
1283
1301
|
return /* @__PURE__ */ a(
|
|
@@ -1287,304 +1305,337 @@ function Wt() {
|
|
|
1287
1305
|
role: "dashboard-controls",
|
|
1288
1306
|
children: [
|
|
1289
1307
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
1290
|
-
|
|
1308
|
+
us && /* @__PURE__ */ a(k, { children: [
|
|
1291
1309
|
/* @__PURE__ */ e(
|
|
1292
|
-
|
|
1310
|
+
j,
|
|
1293
1311
|
{
|
|
1294
1312
|
"aria-label": "Manage Dashboards",
|
|
1295
1313
|
tooltip: "Manage Dashboards",
|
|
1296
1314
|
onClick: () => {
|
|
1297
|
-
|
|
1315
|
+
F(!T);
|
|
1298
1316
|
},
|
|
1299
1317
|
className: "h-7 p-2",
|
|
1300
|
-
children: /* @__PURE__ */ e(
|
|
1318
|
+
children: /* @__PURE__ */ e(Ct, { className: "h-4 w-4" })
|
|
1301
1319
|
}
|
|
1302
1320
|
),
|
|
1303
|
-
|
|
1304
|
-
|
|
1321
|
+
ga && !D && /* @__PURE__ */ e(
|
|
1322
|
+
j,
|
|
1305
1323
|
{
|
|
1306
1324
|
"aria-label": "Dashboard Hub",
|
|
1307
1325
|
tooltip: "Dashboard Hub",
|
|
1308
|
-
onClick:
|
|
1326
|
+
onClick: ha,
|
|
1309
1327
|
className: "h-7 p-2",
|
|
1310
|
-
children: /* @__PURE__ */ e(
|
|
1328
|
+
children: /* @__PURE__ */ e(Ds, { className: "h-4 w-4" })
|
|
1311
1329
|
}
|
|
1312
1330
|
)
|
|
1313
1331
|
] }),
|
|
1314
|
-
!
|
|
1315
|
-
/* @__PURE__ */ e(
|
|
1332
|
+
!D && c && (u ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
1333
|
+
/* @__PURE__ */ e(H, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
|
|
1316
1334
|
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
|
|
1317
|
-
] }) : /* @__PURE__ */ a(
|
|
1335
|
+
] }) : /* @__PURE__ */ a(k, { children: [
|
|
1318
1336
|
/* @__PURE__ */ e(
|
|
1319
|
-
|
|
1337
|
+
Va,
|
|
1320
1338
|
{
|
|
1321
|
-
value:
|
|
1322
|
-
onSave: (
|
|
1339
|
+
value: ds || "Untitled Dashboard",
|
|
1340
|
+
onSave: (r) => {
|
|
1323
1341
|
console.log("EditableText onSave called:", {
|
|
1324
|
-
newTitle:
|
|
1325
|
-
canEditDashboard:
|
|
1326
|
-
dashboardId:
|
|
1342
|
+
newTitle: r,
|
|
1343
|
+
canEditDashboard: ce,
|
|
1344
|
+
dashboardId: i == null ? void 0 : i.id
|
|
1327
1345
|
});
|
|
1328
|
-
const O = (
|
|
1329
|
-
m(
|
|
1346
|
+
const O = (i == null ? void 0 : i.title) || "";
|
|
1347
|
+
m(r), oa(r, O);
|
|
1330
1348
|
},
|
|
1331
|
-
isEditable:
|
|
1349
|
+
isEditable: ce && !v,
|
|
1332
1350
|
displayClassName: "text-sm font-medium",
|
|
1333
1351
|
inputClassName: "text-sm font-medium",
|
|
1334
1352
|
placeholder: "Dashboard Title",
|
|
1335
|
-
isPending:
|
|
1353
|
+
isPending: se.isPending
|
|
1336
1354
|
}
|
|
1337
1355
|
),
|
|
1338
|
-
|
|
1339
|
-
/* @__PURE__ */ e(
|
|
1340
|
-
|
|
1356
|
+
fa && te && /* @__PURE__ */ e(za, { children: /* @__PURE__ */ a($a, { children: [
|
|
1357
|
+
/* @__PURE__ */ e(Ba, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1358
|
+
L,
|
|
1341
1359
|
{
|
|
1342
1360
|
variant: "ghost",
|
|
1343
1361
|
size: "icon",
|
|
1344
|
-
onClick:
|
|
1345
|
-
disabled:
|
|
1362
|
+
onClick: va,
|
|
1363
|
+
disabled: sa || !(s != null && s.accessToken) || !(o != null && o.apiServiceUrl),
|
|
1346
1364
|
className: "h-7 w-7",
|
|
1347
1365
|
children: /* @__PURE__ */ e(
|
|
1348
|
-
|
|
1366
|
+
Ka,
|
|
1349
1367
|
{
|
|
1350
|
-
className:
|
|
1368
|
+
className: Z(
|
|
1351
1369
|
"h-4 w-4 transition-colors",
|
|
1352
|
-
|
|
1370
|
+
Me ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground hover:text-yellow-400"
|
|
1353
1371
|
)
|
|
1354
1372
|
}
|
|
1355
1373
|
)
|
|
1356
1374
|
}
|
|
1357
1375
|
) }),
|
|
1358
|
-
/* @__PURE__ */ e(
|
|
1376
|
+
/* @__PURE__ */ e(Qa, { children: /* @__PURE__ */ e("p", { children: Me ? "Remove as default dashboard" : "Make this a default dashboard" }) })
|
|
1359
1377
|
] }) })
|
|
1360
1378
|
] }))
|
|
1361
1379
|
] }),
|
|
1362
1380
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
1363
|
-
|
|
1364
|
-
/* @__PURE__ */ e(
|
|
1365
|
-
/* @__PURE__ */ e(
|
|
1381
|
+
D && /* @__PURE__ */ a(k, { children: [
|
|
1382
|
+
/* @__PURE__ */ e(ft, { className: "mr-2" }),
|
|
1383
|
+
/* @__PURE__ */ e(gt, { className: "h-7" })
|
|
1366
1384
|
] }),
|
|
1367
|
-
|
|
1385
|
+
n && !D && /* @__PURE__ */ a(k, { children: [
|
|
1368
1386
|
/* @__PURE__ */ e(
|
|
1369
|
-
|
|
1387
|
+
j,
|
|
1370
1388
|
{
|
|
1371
1389
|
tooltip: "Copy Token",
|
|
1372
1390
|
onClick: () => {
|
|
1373
|
-
var
|
|
1374
|
-
s != null && s.accessToken && ((
|
|
1391
|
+
var r;
|
|
1392
|
+
s != null && s.accessToken && ((r = navigator == null ? void 0 : navigator.clipboard) != null && r.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => E.success("Token copied to clipboard")).catch(() => E.error("Unable to copy token")) : E.error("Clipboard not available"));
|
|
1375
1393
|
},
|
|
1376
1394
|
className: "h-7 p-2",
|
|
1377
|
-
children: /* @__PURE__ */ e(
|
|
1395
|
+
children: /* @__PURE__ */ e(Wa, { className: "h-4 w-4" })
|
|
1378
1396
|
}
|
|
1379
1397
|
),
|
|
1380
1398
|
/* @__PURE__ */ e(
|
|
1381
|
-
|
|
1399
|
+
j,
|
|
1382
1400
|
{
|
|
1383
1401
|
tooltip: "Invalidate Token",
|
|
1384
|
-
onClick: () =>
|
|
1402
|
+
onClick: () => Ja(o.apiServiceUrl),
|
|
1385
1403
|
className: "h-7 p-2",
|
|
1386
|
-
children: /* @__PURE__ */ e(
|
|
1404
|
+
children: /* @__PURE__ */ e(Et, { className: "h-4 w-4" })
|
|
1387
1405
|
}
|
|
1388
1406
|
)
|
|
1389
1407
|
] }),
|
|
1390
|
-
!
|
|
1391
|
-
!
|
|
1392
|
-
!
|
|
1393
|
-
|
|
1394
|
-
F,
|
|
1395
|
-
{
|
|
1396
|
-
tooltip: "Manage Groups",
|
|
1397
|
-
onClick: () => I(!0),
|
|
1398
|
-
className: "h-7 p-2",
|
|
1399
|
-
children: /* @__PURE__ */ e(z, { className: "h-4 w-4" })
|
|
1400
|
-
}
|
|
1401
|
-
),
|
|
1402
|
-
!w && i && ((ts = Q == null ? void 0 : Q.permissions) == null ? void 0 : ts.canShare) && /* @__PURE__ */ e(
|
|
1403
|
-
F,
|
|
1408
|
+
!D && c && /* @__PURE__ */ e(Za, {}),
|
|
1409
|
+
!D && c && /* @__PURE__ */ e(vt, {}),
|
|
1410
|
+
!D && c && ((fs = J == null ? void 0 : J.permissions) == null ? void 0 : fs.canShare) && /* @__PURE__ */ e(
|
|
1411
|
+
j,
|
|
1404
1412
|
{
|
|
1405
1413
|
tooltip: "Share Dashboard",
|
|
1406
1414
|
onClick: () => N(!0),
|
|
1407
1415
|
className: "h-7 p-2",
|
|
1408
|
-
children: /* @__PURE__ */ e(
|
|
1416
|
+
children: /* @__PURE__ */ e(Xa, { className: "h-4 w-4" })
|
|
1409
1417
|
}
|
|
1410
1418
|
),
|
|
1411
|
-
!
|
|
1412
|
-
|
|
1419
|
+
!Ws && !D && d && l.canUseFilters && c && /* @__PURE__ */ e(
|
|
1420
|
+
L,
|
|
1413
1421
|
{
|
|
1414
1422
|
className: "h-7 p-2",
|
|
1415
1423
|
variant: "outline",
|
|
1416
1424
|
onClick: () => {
|
|
1417
|
-
|
|
1425
|
+
Js("dashboard", !1), Xs(!0);
|
|
1418
1426
|
},
|
|
1419
1427
|
size: "sm",
|
|
1420
|
-
children: /* @__PURE__ */ e(
|
|
1428
|
+
children: /* @__PURE__ */ e(Ya, { className: "h-4 w-4" })
|
|
1421
1429
|
}
|
|
1422
1430
|
),
|
|
1423
|
-
d && !
|
|
1424
|
-
!
|
|
1425
|
-
d && !
|
|
1426
|
-
|
|
1431
|
+
d && !D && me && n && c && /* @__PURE__ */ e(Ut, {}),
|
|
1432
|
+
!D && me && n && c && /* @__PURE__ */ e(Gt, {}),
|
|
1433
|
+
d && !D && me && v && n && c && /* @__PURE__ */ a(
|
|
1434
|
+
L,
|
|
1427
1435
|
{
|
|
1428
1436
|
className: "h-7 p-2",
|
|
1429
1437
|
variant: "secondary",
|
|
1430
1438
|
disabled: h,
|
|
1431
|
-
onClick:
|
|
1439
|
+
onClick: pa,
|
|
1432
1440
|
size: "sm",
|
|
1433
1441
|
children: [
|
|
1434
|
-
/* @__PURE__ */ e(
|
|
1442
|
+
/* @__PURE__ */ e(bs, { className: "mr-2 h-4 w-4" }),
|
|
1435
1443
|
"Save Lens"
|
|
1436
1444
|
]
|
|
1437
1445
|
}
|
|
1438
1446
|
),
|
|
1439
|
-
d && !
|
|
1440
|
-
|
|
1447
|
+
d && !D && c && /* @__PURE__ */ a(
|
|
1448
|
+
L,
|
|
1441
1449
|
{
|
|
1442
1450
|
variant: "outline",
|
|
1443
1451
|
className: "h-7 p-2",
|
|
1444
1452
|
size: "sm",
|
|
1445
1453
|
disabled: !d,
|
|
1446
|
-
onClick: () =>
|
|
1454
|
+
onClick: () => na(),
|
|
1447
1455
|
children: [
|
|
1448
|
-
/* @__PURE__ */ e(
|
|
1456
|
+
/* @__PURE__ */ e(We, { className: "mr-2 h-4 w-4" }),
|
|
1449
1457
|
"Visual"
|
|
1450
1458
|
]
|
|
1451
1459
|
}
|
|
1452
1460
|
),
|
|
1453
|
-
!
|
|
1454
|
-
|
|
1461
|
+
!D && !d && ce && c && /* @__PURE__ */ a(
|
|
1462
|
+
L,
|
|
1455
1463
|
{
|
|
1456
1464
|
variant: "outline",
|
|
1457
1465
|
className: "h-7 p-2",
|
|
1458
|
-
onClick:
|
|
1466
|
+
onClick: ia,
|
|
1459
1467
|
size: "sm",
|
|
1460
1468
|
children: [
|
|
1461
|
-
/* @__PURE__ */ e(
|
|
1469
|
+
/* @__PURE__ */ e(et, { className: "mr-2 h-4 w-4" }),
|
|
1462
1470
|
"Edit"
|
|
1463
1471
|
]
|
|
1464
1472
|
}
|
|
1465
1473
|
),
|
|
1466
|
-
|
|
1467
|
-
|
|
1474
|
+
is && c && ls && /* @__PURE__ */ a(
|
|
1475
|
+
L,
|
|
1468
1476
|
{
|
|
1477
|
+
variant: "outline",
|
|
1469
1478
|
className: "h-7 p-2",
|
|
1470
|
-
|
|
1471
|
-
onClick: () => Ne(),
|
|
1479
|
+
onClick: ma,
|
|
1472
1480
|
size: "sm",
|
|
1481
|
+
disabled: ae,
|
|
1473
1482
|
children: [
|
|
1474
|
-
|
|
1475
|
-
|
|
1483
|
+
/* @__PURE__ */ e(st, { className: "mr-2 h-4 w-4" }),
|
|
1484
|
+
"Undo"
|
|
1476
1485
|
]
|
|
1477
1486
|
}
|
|
1478
1487
|
),
|
|
1479
|
-
|
|
1480
|
-
|
|
1488
|
+
is && c && /* @__PURE__ */ a("div", { className: "relative inline-flex", children: [
|
|
1489
|
+
/* @__PURE__ */ a(
|
|
1490
|
+
L,
|
|
1491
|
+
{
|
|
1492
|
+
className: Z("h-7 p-2", !Ae && "opacity-60"),
|
|
1493
|
+
disabled: ae || !Ae,
|
|
1494
|
+
onClick: () => ke(),
|
|
1495
|
+
size: "sm",
|
|
1496
|
+
children: [
|
|
1497
|
+
ae ? /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(bs, { className: "mr-2 h-4 w-4" }),
|
|
1498
|
+
ae ? "Saving..." : "Save"
|
|
1499
|
+
]
|
|
1500
|
+
}
|
|
1501
|
+
),
|
|
1502
|
+
Ae && !ae && /* @__PURE__ */ e(
|
|
1503
|
+
"span",
|
|
1504
|
+
{
|
|
1505
|
+
"aria-hidden": "true",
|
|
1506
|
+
className: "pointer-events-none absolute -right-1 -top-1 h-2.5 w-2.5 rounded-full bg-orange-500 ring-2 ring-background"
|
|
1507
|
+
}
|
|
1508
|
+
)
|
|
1509
|
+
] }),
|
|
1510
|
+
!D && d && n && c && /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e(
|
|
1511
|
+
L,
|
|
1481
1512
|
{
|
|
1482
1513
|
className: "h-7 p-2",
|
|
1483
|
-
onClick: () =>
|
|
1514
|
+
onClick: () => ns(!Zs),
|
|
1484
1515
|
size: "sm",
|
|
1485
1516
|
variant: "ghost",
|
|
1486
|
-
children: /* @__PURE__ */ e(
|
|
1517
|
+
children: /* @__PURE__ */ e(at, { className: "h-4 w-4" })
|
|
1487
1518
|
}
|
|
1488
1519
|
) }),
|
|
1489
|
-
!
|
|
1490
|
-
d && !
|
|
1491
|
-
|
|
1520
|
+
!D && n && /* @__PURE__ */ e(It, {}),
|
|
1521
|
+
d && !D && c && /* @__PURE__ */ a(
|
|
1522
|
+
L,
|
|
1492
1523
|
{
|
|
1493
1524
|
variant: "outline",
|
|
1494
1525
|
className: "h-7 p-2",
|
|
1495
|
-
onClick:
|
|
1526
|
+
onClick: ca,
|
|
1496
1527
|
children: [
|
|
1497
|
-
/* @__PURE__ */ e(
|
|
1528
|
+
/* @__PURE__ */ e(Cs, { className: "mr-2 h-4 w-4" }),
|
|
1498
1529
|
"Close"
|
|
1499
1530
|
]
|
|
1500
1531
|
}
|
|
1501
1532
|
),
|
|
1502
|
-
!
|
|
1503
|
-
/* @__PURE__ */ e(
|
|
1504
|
-
/* @__PURE__ */ a(
|
|
1505
|
-
/* @__PURE__ */ a(
|
|
1506
|
-
/* @__PURE__ */ e(
|
|
1533
|
+
!D && c && /* @__PURE__ */ a(ze, { children: [
|
|
1534
|
+
/* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ e(j, { tooltip: "More Options", className: "h-7 p-2", children: /* @__PURE__ */ e(tt, { className: "h-4 w-4" }) }) }),
|
|
1535
|
+
/* @__PURE__ */ a(Be, { align: "end", children: [
|
|
1536
|
+
/* @__PURE__ */ a(q, { onClick: () => M(!0), children: [
|
|
1537
|
+
/* @__PURE__ */ e(nt, { className: "mr-2 h-4 w-4" }),
|
|
1538
|
+
"Schedule Dashboard"
|
|
1539
|
+
] }),
|
|
1540
|
+
ta && /* @__PURE__ */ a(q, { onClick: () => I(!0), children: [
|
|
1541
|
+
/* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4" }),
|
|
1542
|
+
"Manage Groups"
|
|
1543
|
+
] }),
|
|
1544
|
+
/* @__PURE__ */ a(q, { onClick: () => R(!0), children: [
|
|
1545
|
+
/* @__PURE__ */ e(rt, { className: "mr-2 h-4 w-4" }),
|
|
1507
1546
|
"Calendar Preferences"
|
|
1508
1547
|
] }),
|
|
1509
|
-
/* @__PURE__ */ a(
|
|
1510
|
-
/* @__PURE__ */ e(
|
|
1548
|
+
/* @__PURE__ */ a(q, { onClick: () => x(!0), children: [
|
|
1549
|
+
/* @__PURE__ */ e(ot, { className: "mr-2 h-4 w-4" }),
|
|
1511
1550
|
"Summary Settings"
|
|
1512
1551
|
] })
|
|
1513
1552
|
] })
|
|
1514
1553
|
] }),
|
|
1515
|
-
y &&
|
|
1516
|
-
|
|
1554
|
+
y && os && /* @__PURE__ */ e(
|
|
1555
|
+
it,
|
|
1517
1556
|
{
|
|
1518
|
-
resource:
|
|
1519
|
-
resourceType:
|
|
1557
|
+
resource: os,
|
|
1558
|
+
resourceType: Oe.DASHBOARD,
|
|
1520
1559
|
onClose: () => N(!1)
|
|
1521
1560
|
}
|
|
1522
1561
|
),
|
|
1523
1562
|
/* @__PURE__ */ e(
|
|
1524
|
-
|
|
1563
|
+
sn,
|
|
1525
1564
|
{
|
|
1526
1565
|
open: A,
|
|
1527
1566
|
onOpenChange: I
|
|
1528
1567
|
}
|
|
1529
1568
|
),
|
|
1569
|
+
(i == null ? void 0 : i.id) && /* @__PURE__ */ e(
|
|
1570
|
+
lt,
|
|
1571
|
+
{
|
|
1572
|
+
open: U,
|
|
1573
|
+
onOpenChange: M,
|
|
1574
|
+
dashboardId: i.id,
|
|
1575
|
+
dashboardName: i == null ? void 0 : i.title
|
|
1576
|
+
}
|
|
1577
|
+
),
|
|
1530
1578
|
/* @__PURE__ */ e(
|
|
1531
|
-
|
|
1579
|
+
St,
|
|
1532
1580
|
{
|
|
1533
|
-
open:
|
|
1534
|
-
onOpenChange:
|
|
1581
|
+
open: z,
|
|
1582
|
+
onOpenChange: R
|
|
1535
1583
|
}
|
|
1536
1584
|
),
|
|
1537
1585
|
/* @__PURE__ */ e(
|
|
1538
|
-
|
|
1586
|
+
wt,
|
|
1539
1587
|
{
|
|
1540
1588
|
open: $,
|
|
1541
|
-
onOpenChange:
|
|
1542
|
-
dashboard:
|
|
1589
|
+
onOpenChange: x,
|
|
1590
|
+
dashboard: i,
|
|
1543
1591
|
disabled: !d,
|
|
1544
|
-
onApply: (
|
|
1545
|
-
...
|
|
1546
|
-
summary:
|
|
1592
|
+
onApply: (r) => Le({
|
|
1593
|
+
...i,
|
|
1594
|
+
summary: r
|
|
1547
1595
|
})
|
|
1548
1596
|
}
|
|
1549
1597
|
),
|
|
1550
1598
|
/* @__PURE__ */ e(
|
|
1551
|
-
|
|
1599
|
+
Is,
|
|
1552
1600
|
{
|
|
1553
|
-
open:
|
|
1554
|
-
onOpenChange: (
|
|
1555
|
-
!
|
|
1601
|
+
open: B,
|
|
1602
|
+
onOpenChange: (r) => {
|
|
1603
|
+
!r && xe && !Q || (K(r), r || (W(null), C(!1)));
|
|
1556
1604
|
},
|
|
1557
|
-
children: /* @__PURE__ */ a(
|
|
1558
|
-
/* @__PURE__ */ a(
|
|
1559
|
-
/* @__PURE__ */ e(
|
|
1560
|
-
/* @__PURE__ */ e(
|
|
1605
|
+
children: /* @__PURE__ */ a(Ts, { className: "max-w-sm", children: [
|
|
1606
|
+
/* @__PURE__ */ a(_s, { children: [
|
|
1607
|
+
/* @__PURE__ */ e(Us, { children: Q ? "Save failed" : "Saving dashboard" }),
|
|
1608
|
+
/* @__PURE__ */ e(Gs, { className: "pt-2", children: Q ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
|
|
1561
1609
|
] }),
|
|
1562
|
-
/* @__PURE__ */ e(
|
|
1610
|
+
/* @__PURE__ */ e(Rs, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: Q ? /* @__PURE__ */ a(k, { children: [
|
|
1563
1611
|
/* @__PURE__ */ e(
|
|
1564
|
-
|
|
1612
|
+
Ps,
|
|
1565
1613
|
{
|
|
1566
1614
|
onClick: () => {
|
|
1567
|
-
|
|
1615
|
+
K(!1), W(null), C(!1);
|
|
1568
1616
|
},
|
|
1569
1617
|
className: "m-0",
|
|
1570
1618
|
children: "Close"
|
|
1571
1619
|
}
|
|
1572
1620
|
),
|
|
1573
1621
|
/* @__PURE__ */ e(
|
|
1574
|
-
|
|
1622
|
+
qe,
|
|
1575
1623
|
{
|
|
1576
|
-
onClick: () =>
|
|
1624
|
+
onClick: () => ke({
|
|
1625
|
+
closeAfterSave: f,
|
|
1626
|
+
navigateHomeAfterSave: ee === "home"
|
|
1627
|
+
}),
|
|
1577
1628
|
className: "m-0",
|
|
1578
1629
|
children: "Retry"
|
|
1579
1630
|
}
|
|
1580
1631
|
)
|
|
1581
1632
|
] }) : /* @__PURE__ */ a(
|
|
1582
|
-
|
|
1633
|
+
qe,
|
|
1583
1634
|
{
|
|
1584
1635
|
disabled: !0,
|
|
1585
1636
|
className: "m-0 cursor-default",
|
|
1586
1637
|
children: [
|
|
1587
|
-
/* @__PURE__ */ e(
|
|
1638
|
+
/* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
1588
1639
|
"Saving..."
|
|
1589
1640
|
]
|
|
1590
1641
|
}
|
|
@@ -1593,13 +1644,17 @@ function Wt() {
|
|
|
1593
1644
|
}
|
|
1594
1645
|
),
|
|
1595
1646
|
/* @__PURE__ */ e(
|
|
1596
|
-
|
|
1647
|
+
bt,
|
|
1597
1648
|
{
|
|
1598
|
-
open:
|
|
1599
|
-
onOpenChange:
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1649
|
+
open: ra,
|
|
1650
|
+
onOpenChange: (r) => {
|
|
1651
|
+
Y(r);
|
|
1652
|
+
},
|
|
1653
|
+
onSave: da,
|
|
1654
|
+
onDiscard: ua,
|
|
1655
|
+
isSaving: xe,
|
|
1656
|
+
saveLabel: ee === "home" ? "Save & Return to Hub" : "Save & Close",
|
|
1657
|
+
discardLabel: ee === "home" ? "Discard & Return to Hub" : "Discard"
|
|
1603
1658
|
}
|
|
1604
1659
|
)
|
|
1605
1660
|
] })
|
|
@@ -1608,5 +1663,5 @@ function Wt() {
|
|
|
1608
1663
|
);
|
|
1609
1664
|
}
|
|
1610
1665
|
export {
|
|
1611
|
-
|
|
1666
|
+
pn as default
|
|
1612
1667
|
};
|