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