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