react-semaphor 0.1.348 → 0.1.350
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/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +46 -45
- package/dist/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +3 -3
- package/dist/chunks/{braces-Ccvdip75.js → braces-CBMh5wmd.js} +1 -1
- package/dist/chunks/{braces-DDHkbW1c.js → braces-Cc86y9Ov.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-AVORk8vl.js → calendar-preferences-dialog-BAEeX-ug.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-CaeYg4gz.js → calendar-preferences-dialog-C8flqOjZ.js} +1 -1
- package/dist/chunks/{chevrons-up-down-B9fTSds9.js → chevrons-up-down-CUZL1zaU.js} +1 -1
- package/dist/chunks/{chevrons-up-down-pV0i9ptS.js → chevrons-up-down-fg3WME_w.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-GmwoVZDA.js → dashboard-briefing-launcher--zBBsBWm.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-B7hc62UJ.js → dashboard-briefing-launcher-DU9x-97H.js} +4 -4
- package/dist/chunks/{dashboard-controls-DOwo-4PX.js → dashboard-controls-BwMjIqjP.js} +129 -119
- package/dist/chunks/dashboard-controls-CMShL7m9.js +57 -0
- package/dist/chunks/{dashboard-json-Bjge3tEx.js → dashboard-json-CHKC0bf-.js} +1 -1
- package/dist/chunks/{dashboard-json-CqWAmaOX.js → dashboard-json-kD_jszqF.js} +2 -2
- package/dist/chunks/{edit-dashboard-visual-NXdSdqQS.js → edit-dashboard-visual-C1RUXsWi.js} +6 -6
- package/dist/chunks/{edit-dashboard-visual-biDU5oky.js → edit-dashboard-visual-C1vIFm6H.js} +1 -1
- package/dist/chunks/{index-DhuiooCy.js → index-BJLPtQeK.js} +36385 -36071
- package/dist/chunks/index-D2ai-cZQ.js +1410 -0
- package/dist/chunks/{palette-BMXS-AcI.js → palette-C1k347Tb.js} +1 -1
- package/dist/chunks/{palette-DKecBucs.js → palette-DP6TXUD8.js} +1 -1
- package/dist/chunks/{resource-management-panel-DIt7NxsX.js → resource-management-panel-UkMvz7Cp.js} +3 -3
- package/dist/chunks/{resource-management-panel-MHam0keE.js → resource-management-panel-f4Od7wCB.js} +1 -1
- package/dist/chunks/source-identity-C-xaeE_I.js +1 -0
- package/dist/chunks/source-identity-qAmkNtEK.js +49 -0
- package/dist/chunks/{switch-CP7SmEIZ.js → switch-21kU-tcj.js} +2 -2
- package/dist/chunks/{switch-DYRgERrC.js → switch-C0S63HAv.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-DS5aPcKd.js → use-create-flow-overlay-state-C49F2KdU.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-p_i0aUhH.js → use-create-flow-overlay-state-jpQ2BxKF.js} +3 -3
- package/dist/chunks/{use-visual-utils-EazVs86Z.js → use-visual-utils-CiN4zNkZ.js} +1 -1
- package/dist/chunks/{use-visual-utils-PfpWtYcR.js → use-visual-utils-D8Pe1PSH.js} +2 -2
- package/dist/chunks/{validators-C2eI8fHy.js → validators-B-NiYgGc.js} +178 -224
- package/dist/chunks/validators-DlEfynH8.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-assistant/index.cjs +1 -0
- package/dist/dashboard-assistant/index.js +12 -0
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +16 -15
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +1 -1
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +32 -31
- package/dist/index.cjs +1 -1
- package/dist/index.js +7 -7
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/dashboard-assistant.d.ts +1030 -0
- package/dist/types/dashboard-authoring.d.ts +1 -1
- package/dist/types/dashboard.d.ts +1 -1
- package/dist/types/main.d.ts +1 -1
- package/dist/types/shared.d.ts +1 -1
- package/dist/types/surfboard.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/package.json +6 -1
- package/dist/chunks/dashboard-controls-Bthl3kl3.js +0 -52
- package/dist/chunks/index-D7U5s9Uk.js +0 -1425
- package/dist/chunks/validators-BNvNf_tO.js +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as t, jsxs as i, Fragment as R } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { bg as ea, u as G, c as Jt, bh as ta, aI as re, d as Xt, e as ra, f as at, g as nt, o as aa, bi as ue, aV as Fe, bj as na, bk as Tt, bl as Yt, bm as Zt, bn as sa, b9 as lt, bo as oa, bp as ia, bq as da, br as ca, bs as la, bt as ua, ae as pe, bu as he, p as
|
|
2
|
+
import { c as B, u as N, B as _, aA as dt, E as Vt, L as jr, a2 as qr, a as te, aB as Hr, aC as Vr, aD as rt, aE as me, aF as ct, aG as Kt, f as $e, X as Qt, aH as Wt, aI as Kr, G as Rt, Z as Qr, _ as Wr, $ as Jr, a1 as Xr, S as Ut, j as Yr, aJ as Zr } from "./switch-21kU-tcj.js";
|
|
3
|
+
import { bg as ea, u as G, c as Jt, bh as ta, aI as re, d as Xt, e as ra, f as at, g as nt, o as aa, bi as ue, aV as Fe, bj as na, bk as Tt, bl as Yt, bm as Zt, bn as sa, b9 as lt, bo as oa, bp as ia, bq as da, br as ca, bs as la, bt as ua, ae as pe, bu as he, p as C, bv as ma, bw as er, az as ut, be as pa, bx as ha, by as fa, aU as tr, aX as rr, ay as ga, aM as ba, bz as xa, bA as va, z as ya, y as Ue, K as wa, A as Xe, bB as Na, bC as Sa, bD as Da, _ as ka, bE as Ca, I as Ye, bF as Ea, bG as La, bH as Ia, bI as Aa, aN as Ma, aO as Pa, aP as Oa, aQ as _a, aR as $, bJ as Ra, aS as Ft, bK as Ua, bL as Ta, bM as Fa, J as $a, bN as Ga, b0 as Ba, b1 as za, b2 as ja, b3 as qa, b4 as Ha, b5 as Va, b6 as Ka, b7 as $t, w as st } from "./index-BJLPtQeK.js";
|
|
4
4
|
import "./index-CuHybtft.js";
|
|
5
5
|
import * as I from "react";
|
|
6
|
-
import
|
|
6
|
+
import ar, { useState as w, useMemo as K, useEffect as Ge, useRef as Gt, useLayoutEffect as Qa, useCallback as Wa } from "react";
|
|
7
7
|
import "./index-CJdxSyQq.js";
|
|
8
8
|
import "react-dom/client";
|
|
9
9
|
import { createPortal as Ja } from "react-dom";
|
|
10
|
-
import { L as Xa, b as Ya, u as Za, A as en, V as tn, K as rn, e as an, M as nn, N as sn, U as on } from "./dashboard-briefing-launcher-
|
|
11
|
-
import { d as
|
|
12
|
-
import { C as dn } from "./calendar-preferences-dialog-
|
|
10
|
+
import { L as Xa, b as Ya, u as Za, A as en, V as tn, K as rn, e as an, M as nn, N as sn, U as on } from "./dashboard-briefing-launcher-DU9x-97H.js";
|
|
11
|
+
import { d as nr } from "./index-DFOb_6HB.js";
|
|
12
|
+
import { C as dn } from "./calendar-preferences-dialog-BAEeX-ug.js";
|
|
13
13
|
import { u as cn } from "./use-debounced-dirty-check-BwAbnX_5.js";
|
|
14
14
|
import { s as Ze } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
15
|
-
import { P as ln } from "./palette-
|
|
16
|
-
import { B as un } from "./braces-
|
|
15
|
+
import { P as ln } from "./palette-DP6TXUD8.js";
|
|
16
|
+
import { B as un } from "./braces-CBMh5wmd.js";
|
|
17
17
|
/**
|
|
18
18
|
* @license lucide-react v0.453.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
21
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
22
|
*/
|
|
23
|
-
const mn =
|
|
23
|
+
const mn = B("Glasses", [
|
|
24
24
|
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
|
|
25
25
|
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
|
|
26
26
|
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
|
|
@@ -33,7 +33,7 @@ const mn = K("Glasses", [
|
|
|
33
33
|
* This source code is licensed under the ISC license.
|
|
34
34
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
|
-
const pn =
|
|
36
|
+
const pn = B("Menu", [
|
|
37
37
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
|
|
38
38
|
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
|
|
39
39
|
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
|
|
@@ -44,7 +44,7 @@ const pn = K("Menu", [
|
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
const hn =
|
|
47
|
+
const hn = B("Monitor", [
|
|
48
48
|
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
49
49
|
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
50
50
|
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
@@ -55,7 +55,7 @@ const hn = K("Monitor", [
|
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
57
|
*/
|
|
58
|
-
const fn =
|
|
58
|
+
const fn = B("Moon", [
|
|
59
59
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
60
60
|
]);
|
|
61
61
|
/**
|
|
@@ -64,7 +64,7 @@ const fn = K("Moon", [
|
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/
|
|
67
|
-
const gn =
|
|
67
|
+
const gn = B("ShieldX", [
|
|
68
68
|
[
|
|
69
69
|
"path",
|
|
70
70
|
{
|
|
@@ -81,7 +81,7 @@ const gn = K("ShieldX", [
|
|
|
81
81
|
* This source code is licensed under the ISC license.
|
|
82
82
|
* See the LICENSE file in the root directory of this source tree.
|
|
83
83
|
*/
|
|
84
|
-
const bn =
|
|
84
|
+
const bn = B("Sun", [
|
|
85
85
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
86
86
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
87
87
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -98,12 +98,22 @@ const bn = K("Sun", [
|
|
|
98
98
|
* This source code is licensed under the ISC license.
|
|
99
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
100
|
*/
|
|
101
|
-
const xn =
|
|
101
|
+
const xn = B("UserPlus", [
|
|
102
102
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
103
103
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
104
104
|
["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
|
|
105
105
|
["line", { x1: "22", x2: "16", y1: "11", y2: "11", key: "1shjgl" }]
|
|
106
106
|
]);
|
|
107
|
+
/**
|
|
108
|
+
* @license lucide-react v0.453.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/
|
|
113
|
+
const sr = B("UserRound", [
|
|
114
|
+
["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
|
|
115
|
+
["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
|
|
116
|
+
]);
|
|
107
117
|
var ot = { exports: {} }, et = {};
|
|
108
118
|
/**
|
|
109
119
|
* @license React
|
|
@@ -118,7 +128,7 @@ var Bt;
|
|
|
118
128
|
function vn() {
|
|
119
129
|
if (Bt) return et;
|
|
120
130
|
Bt = 1;
|
|
121
|
-
var e =
|
|
131
|
+
var e = ar;
|
|
122
132
|
function n(c, h) {
|
|
123
133
|
return c === h && (c !== 0 || 1 / c === 1 / h) || c !== c && h !== h;
|
|
124
134
|
}
|
|
@@ -185,16 +195,16 @@ function yn() {
|
|
|
185
195
|
y = f({
|
|
186
196
|
inst: { value: o, getSnapshot: g }
|
|
187
197
|
});
|
|
188
|
-
var S = y[0].inst,
|
|
198
|
+
var S = y[0].inst, k = y[1];
|
|
189
199
|
return b(
|
|
190
200
|
function() {
|
|
191
|
-
S.value = o, S.getSnapshot = g, a(S) &&
|
|
201
|
+
S.value = o, S.getSnapshot = g, a(S) && k({ inst: S });
|
|
192
202
|
},
|
|
193
203
|
[m, o, g]
|
|
194
204
|
), l(
|
|
195
205
|
function() {
|
|
196
|
-
return a(S) &&
|
|
197
|
-
a(S) &&
|
|
206
|
+
return a(S) && k({ inst: S }), m(function() {
|
|
207
|
+
a(S) && k({ inst: S });
|
|
198
208
|
});
|
|
199
209
|
},
|
|
200
210
|
[m]
|
|
@@ -214,7 +224,7 @@ function yn() {
|
|
|
214
224
|
return g();
|
|
215
225
|
}
|
|
216
226
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
217
|
-
var s =
|
|
227
|
+
var s = ar, u = typeof Object.is == "function" ? Object.is : e, f = s.useState, l = s.useEffect, b = s.useLayoutEffect, x = s.useDebugValue, p = !1, c = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
|
|
218
228
|
tt.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
219
229
|
}()), tt;
|
|
220
230
|
}
|
|
@@ -277,14 +287,14 @@ async function Dn(e, n, a) {
|
|
|
277
287
|
lensId: n
|
|
278
288
|
});
|
|
279
289
|
}
|
|
280
|
-
const
|
|
281
|
-
function
|
|
290
|
+
const kn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
291
|
+
function Cn({
|
|
282
292
|
open: e,
|
|
283
293
|
onOpenChange: n
|
|
284
294
|
} = {}) {
|
|
285
295
|
const [a, r] = w(""), [s, u] = w(!1), f = N((D) => D.lenses), { setLenses: l, setSelectedLensId: b } = Vt(), [x, p] = w(!1), [c, h] = w(!1), m = e !== void 0, g = m ? e : c, o = (D) => {
|
|
286
296
|
m || h(D), n == null || n(D);
|
|
287
|
-
}, y = N((D) => D.dashboard), S = N((D) => D.filterValues), { authToken:
|
|
297
|
+
}, y = N((D) => D.dashboard), S = N((D) => D.filterValues), { authToken: k, tokenProps: L } = G();
|
|
288
298
|
async function E() {
|
|
289
299
|
p(!0);
|
|
290
300
|
const D = await Sn(
|
|
@@ -292,7 +302,7 @@ function kn({
|
|
|
292
302
|
a,
|
|
293
303
|
y,
|
|
294
304
|
S,
|
|
295
|
-
|
|
305
|
+
k == null ? void 0 : k.accessToken
|
|
296
306
|
);
|
|
297
307
|
D && (l([...f || [], D]), b(D.id), o(!1)), p(!1);
|
|
298
308
|
}
|
|
@@ -307,7 +317,7 @@ function kn({
|
|
|
307
317
|
/* @__PURE__ */ t(nt, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
|
|
308
318
|
] }),
|
|
309
319
|
/* @__PURE__ */ i("div", { className: "space-y-1.5 py-1", children: [
|
|
310
|
-
/* @__PURE__ */ t(jr, { htmlFor: "lens-name", className:
|
|
320
|
+
/* @__PURE__ */ t(jr, { htmlFor: "lens-name", className: kn, children: "Name" }),
|
|
311
321
|
/* @__PURE__ */ t(
|
|
312
322
|
qr,
|
|
313
323
|
{
|
|
@@ -427,10 +437,10 @@ function En({ includeLabel: e = !1 } = {}) {
|
|
|
427
437
|
] });
|
|
428
438
|
}
|
|
429
439
|
function Ln() {
|
|
430
|
-
const { displayPreferences: e, shouldShowElement: n } = sa(), { currentUser: a, userContext: r } = lt(), s =
|
|
440
|
+
const { displayPreferences: e, shouldShowElement: n } = sa(), { currentUser: a, userContext: r } = lt(), s = K(
|
|
431
441
|
() => oa(a),
|
|
432
442
|
[a]
|
|
433
|
-
), u =
|
|
443
|
+
), u = K(() => (l) => s && s[l] !== void 0 && s[l] === !1 ? !1 : n(l), [s, n, e]), f = K(
|
|
434
444
|
() => {
|
|
435
445
|
var l, b, x, p, c;
|
|
436
446
|
return {
|
|
@@ -652,10 +662,10 @@ function jn() {
|
|
|
652
662
|
return he({
|
|
653
663
|
mutationFn: (r) => Fn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
|
|
654
664
|
onSuccess: () => {
|
|
655
|
-
a.invalidateQueries({ queryKey: ["groups"] }),
|
|
665
|
+
a.invalidateQueries({ queryKey: ["groups"] }), C.success("Group created successfully");
|
|
656
666
|
},
|
|
657
667
|
onError: (r) => {
|
|
658
|
-
console.error("Failed to create group:", r),
|
|
668
|
+
console.error("Failed to create group:", r), C.error("Failed to create group", {
|
|
659
669
|
description: me(r, "Failed to create group")
|
|
660
670
|
});
|
|
661
671
|
}
|
|
@@ -669,10 +679,10 @@ function qn() {
|
|
|
669
679
|
data: s
|
|
670
680
|
}) => $n(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, s),
|
|
671
681
|
onSuccess: (r, s) => {
|
|
672
|
-
a.invalidateQueries({ queryKey: ["group", s.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }),
|
|
682
|
+
a.invalidateQueries({ queryKey: ["group", s.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }), C.success("Group updated successfully");
|
|
673
683
|
},
|
|
674
684
|
onError: (r) => {
|
|
675
|
-
console.error("Failed to update group:", r),
|
|
685
|
+
console.error("Failed to update group:", r), C.error("Failed to update group", {
|
|
676
686
|
description: me(r, "Failed to update group")
|
|
677
687
|
});
|
|
678
688
|
}
|
|
@@ -683,10 +693,10 @@ function Hn() {
|
|
|
683
693
|
return he({
|
|
684
694
|
mutationFn: (r) => Gn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
|
|
685
695
|
onSuccess: (r, s) => {
|
|
686
|
-
a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", s] }),
|
|
696
|
+
a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", s] }), C.success("Group deleted successfully");
|
|
687
697
|
},
|
|
688
698
|
onError: (r) => {
|
|
689
|
-
console.error("Failed to delete group:", r),
|
|
699
|
+
console.error("Failed to delete group:", r), C.error("Failed to delete group", {
|
|
690
700
|
description: me(r, "Failed to delete group")
|
|
691
701
|
});
|
|
692
702
|
}
|
|
@@ -702,10 +712,10 @@ function Vn() {
|
|
|
702
712
|
onSuccess: (r, s) => {
|
|
703
713
|
a.invalidateQueries({ queryKey: ["group", s.groupId] }), a.invalidateQueries({
|
|
704
714
|
queryKey: ["group-members", s.groupId]
|
|
705
|
-
}), a.invalidateQueries({ queryKey: ["groups"] }),
|
|
715
|
+
}), a.invalidateQueries({ queryKey: ["groups"] }), C.success("Members added successfully");
|
|
706
716
|
},
|
|
707
717
|
onError: (r) => {
|
|
708
|
-
console.error("Failed to add group members:", r),
|
|
718
|
+
console.error("Failed to add group members:", r), C.error("Failed to add members", {
|
|
709
719
|
description: me(r, "Failed to add members")
|
|
710
720
|
});
|
|
711
721
|
}
|
|
@@ -721,10 +731,10 @@ function Kn() {
|
|
|
721
731
|
onSuccess: (r, s) => {
|
|
722
732
|
a.invalidateQueries({ queryKey: ["group", s.groupId] }), a.invalidateQueries({
|
|
723
733
|
queryKey: ["group-members", s.groupId]
|
|
724
|
-
}), a.invalidateQueries({ queryKey: ["groups"] }),
|
|
734
|
+
}), a.invalidateQueries({ queryKey: ["groups"] }), C.success("Members removed successfully");
|
|
725
735
|
},
|
|
726
736
|
onError: (r) => {
|
|
727
|
-
console.error("Failed to remove group members:", r),
|
|
737
|
+
console.error("Failed to remove group members:", r), C.error("Failed to remove members", {
|
|
728
738
|
description: me(r, "Failed to remove members")
|
|
729
739
|
});
|
|
730
740
|
}
|
|
@@ -735,7 +745,7 @@ function Wn({
|
|
|
735
745
|
open: e,
|
|
736
746
|
onOpenChange: n
|
|
737
747
|
}) {
|
|
738
|
-
var
|
|
748
|
+
var k, L, E;
|
|
739
749
|
const { tokenProps: a } = G(), { currentUser: r } = lt(), s = (r == null ? void 0 : r.type) === "tenant", u = a == null ? void 0 : a.tenantId, {
|
|
740
750
|
groups: f,
|
|
741
751
|
isLoading: l,
|
|
@@ -792,7 +802,7 @@ function Wn({
|
|
|
792
802
|
{
|
|
793
803
|
group: y,
|
|
794
804
|
isTenantViewer: s,
|
|
795
|
-
canEdit: ((
|
|
805
|
+
canEdit: ((k = y.permissions) == null ? void 0 : k.canEdit) ?? y.createdBy === (r == null ? void 0 : r.id),
|
|
796
806
|
canDelete: ((L = y.permissions) == null ? void 0 : L.canDelete) ?? y.createdBy === (r == null ? void 0 : r.id),
|
|
797
807
|
canManageMembers: ((E = y.permissions) == null ? void 0 : E.canManageMembers) ?? y.createdBy === (r == null ? void 0 : r.id),
|
|
798
808
|
onBack: () => h({ kind: "list" }),
|
|
@@ -858,7 +868,7 @@ function Jn({
|
|
|
858
868
|
onCreate: f,
|
|
859
869
|
onDeleteRequest: l
|
|
860
870
|
}) {
|
|
861
|
-
const [b, x] = w(""), p =
|
|
871
|
+
const [b, x] = w(""), p = K(
|
|
862
872
|
() => e.filter(
|
|
863
873
|
(c) => !b.trim() || c.name.toLowerCase().includes(b.toLowerCase()) || (c.description || "").toLowerCase().includes(b.toLowerCase())
|
|
864
874
|
),
|
|
@@ -943,7 +953,7 @@ function Xn({
|
|
|
943
953
|
}) {
|
|
944
954
|
let s = "";
|
|
945
955
|
try {
|
|
946
|
-
s =
|
|
956
|
+
s = nr(new Date(e.createdAt), "MMM d, yyyy");
|
|
947
957
|
} catch {
|
|
948
958
|
s = "";
|
|
949
959
|
}
|
|
@@ -959,7 +969,7 @@ function Xn({
|
|
|
959
969
|
/* @__PURE__ */ t("div", { className: "truncate text-[13px] font-medium text-foreground", children: e.name }),
|
|
960
970
|
/* @__PURE__ */ i("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
|
|
961
971
|
/* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1", children: [
|
|
962
|
-
/* @__PURE__ */ t(
|
|
972
|
+
/* @__PURE__ */ t(sr, { className: "h-2.5 w-2.5" }),
|
|
963
973
|
e.memberCount,
|
|
964
974
|
" member",
|
|
965
975
|
e.memberCount === 1 ? "" : "s"
|
|
@@ -967,7 +977,7 @@ function Xn({
|
|
|
967
977
|
s && /* @__PURE__ */ i(R, { children: [
|
|
968
978
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
969
979
|
/* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1", children: [
|
|
970
|
-
/* @__PURE__ */ t(
|
|
980
|
+
/* @__PURE__ */ t(rr, { className: "h-2.5 w-2.5" }),
|
|
971
981
|
s
|
|
972
982
|
] })
|
|
973
983
|
] }),
|
|
@@ -1002,7 +1012,7 @@ function Xn({
|
|
|
1002
1012
|
}
|
|
1003
1013
|
function Yn({ onCreate: e }) {
|
|
1004
1014
|
return /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
|
|
1005
|
-
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ t(
|
|
1015
|
+
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ t(tr, { className: "h-4 w-4" }) }),
|
|
1006
1016
|
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
|
|
1007
1017
|
/* @__PURE__ */ t("div", { className: "max-w-[320px] text-[11.5px] leading-[1.55] text-muted-foreground", children: "Groups let you grant shared access to dashboards. Create one and add members." }),
|
|
1008
1018
|
/* @__PURE__ */ i(
|
|
@@ -1040,10 +1050,10 @@ function Zn({
|
|
|
1040
1050
|
tenantId: e.tenantId || void 0,
|
|
1041
1051
|
active: !0,
|
|
1042
1052
|
limit: 200
|
|
1043
|
-
}), S =
|
|
1053
|
+
}), S = K(
|
|
1044
1054
|
() => new Set(m.map((v) => v.userId)),
|
|
1045
1055
|
[m]
|
|
1046
|
-
),
|
|
1056
|
+
), k = Vn(), L = Kn(), E = qn(), [D, ae] = w(!1), [Q, ne] = w(e.name), [fe, W] = w(!1), [J, X] = w(e.description || ""), [Y, ge] = w(""), [be, xe] = w(!1), ve = K(() => {
|
|
1047
1057
|
const v = Y.trim().toLowerCase();
|
|
1048
1058
|
return y.filter((U) => !S.has(U.id)).filter(
|
|
1049
1059
|
(U) => !v || (U.name || "").toLowerCase().includes(v) || (U.email || "").toLowerCase().includes(v)
|
|
@@ -1058,7 +1068,7 @@ function Zn({
|
|
|
1058
1068
|
}), l();
|
|
1059
1069
|
} catch {
|
|
1060
1070
|
}
|
|
1061
|
-
},
|
|
1071
|
+
}, z = async () => {
|
|
1062
1072
|
const v = J.trim();
|
|
1063
1073
|
if (W(!1), v !== (e.description || ""))
|
|
1064
1074
|
try {
|
|
@@ -1072,7 +1082,7 @@ function Zn({
|
|
|
1072
1082
|
if (s) {
|
|
1073
1083
|
ge(""), xe(!1);
|
|
1074
1084
|
try {
|
|
1075
|
-
await
|
|
1085
|
+
await k.mutateAsync({
|
|
1076
1086
|
groupId: e.id,
|
|
1077
1087
|
data: {
|
|
1078
1088
|
userIds: [v.id],
|
|
@@ -1092,11 +1102,11 @@ function Zn({
|
|
|
1092
1102
|
} catch {
|
|
1093
1103
|
}
|
|
1094
1104
|
};
|
|
1095
|
-
let
|
|
1105
|
+
let j = "";
|
|
1096
1106
|
try {
|
|
1097
|
-
|
|
1107
|
+
j = nr(new Date(e.createdAt), "MMM d, yyyy");
|
|
1098
1108
|
} catch {
|
|
1099
|
-
|
|
1109
|
+
j = "";
|
|
1100
1110
|
}
|
|
1101
1111
|
return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
1102
1112
|
/* @__PURE__ */ i("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
|
|
@@ -1136,7 +1146,7 @@ function Zn({
|
|
|
1136
1146
|
}
|
|
1137
1147
|
),
|
|
1138
1148
|
/* @__PURE__ */ i("span", { className: "ml-1 inline-flex shrink-0 items-center gap-1 text-[10.5px] text-muted-foreground", children: [
|
|
1139
|
-
/* @__PURE__ */ t(
|
|
1149
|
+
/* @__PURE__ */ t(sr, { className: "h-2.5 w-2.5" }),
|
|
1140
1150
|
m.length,
|
|
1141
1151
|
" member",
|
|
1142
1152
|
m.length === 1 ? "" : "s"
|
|
@@ -1152,7 +1162,7 @@ function Zn({
|
|
|
1152
1162
|
onChange: (v) => X(v.target.value),
|
|
1153
1163
|
maxLength: 200,
|
|
1154
1164
|
onKeyDown: (v) => {
|
|
1155
|
-
v.key === "Escape" && (X(e.description || ""), W(!1)), v.key === "Enter" && (v.metaKey || v.ctrlKey) &&
|
|
1165
|
+
v.key === "Escape" && (X(e.description || ""), W(!1)), v.key === "Enter" && (v.metaKey || v.ctrlKey) && z();
|
|
1156
1166
|
},
|
|
1157
1167
|
placeholder: "What is this group for?",
|
|
1158
1168
|
className: "block w-full resize-none rounded-[5px] border border-border bg-background px-2 py-1.5 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
|
|
@@ -1179,7 +1189,7 @@ function Zn({
|
|
|
1179
1189
|
"button",
|
|
1180
1190
|
{
|
|
1181
1191
|
type: "button",
|
|
1182
|
-
onClick:
|
|
1192
|
+
onClick: z,
|
|
1183
1193
|
className: "inline-flex h-6 items-center rounded-[5px] bg-foreground px-2 text-[11px] font-medium text-background hover:opacity-90",
|
|
1184
1194
|
children: "Save"
|
|
1185
1195
|
}
|
|
@@ -1199,7 +1209,7 @@ function Zn({
|
|
|
1199
1209
|
children: [
|
|
1200
1210
|
e.description ? /* @__PURE__ */ t("p", { className: "text-[12px] leading-[1.55] text-foreground/90", children: e.description }) : /* @__PURE__ */ t("p", { className: "text-[12px] leading-[1.55] text-muted-foreground", children: a ? "Add a description…" : "No description" }),
|
|
1201
1211
|
/* @__PURE__ */ i("p", { className: "mt-1 text-[10.5px] text-muted-foreground", children: [
|
|
1202
|
-
|
|
1212
|
+
j ? `Created ${j}` : "Recently created",
|
|
1203
1213
|
a ? " · You can edit this group" : ""
|
|
1204
1214
|
] })
|
|
1205
1215
|
]
|
|
@@ -1215,7 +1225,7 @@ function Zn({
|
|
|
1215
1225
|
candidates: ve,
|
|
1216
1226
|
showKindChip: !n,
|
|
1217
1227
|
onAdd: Z,
|
|
1218
|
-
busy:
|
|
1228
|
+
busy: k.isPending
|
|
1219
1229
|
}
|
|
1220
1230
|
),
|
|
1221
1231
|
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto", children: p ? /* @__PURE__ */ t("div", { className: "space-y-px p-3", children: [1, 2, 3].map((v) => /* @__PURE__ */ t(
|
|
@@ -1235,13 +1245,13 @@ function Zn({
|
|
|
1235
1245
|
/* @__PURE__ */ t("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
|
|
1236
1246
|
/* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: s ? "Search above to add people to this group." : "This group does not have any members." })
|
|
1237
1247
|
] }) : m.map((v) => {
|
|
1238
|
-
var U,
|
|
1248
|
+
var U, q, we, Ne, Se, A;
|
|
1239
1249
|
return /* @__PURE__ */ i(
|
|
1240
1250
|
"div",
|
|
1241
1251
|
{
|
|
1242
1252
|
className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
|
|
1243
1253
|
children: [
|
|
1244
|
-
/* @__PURE__ */ t(vr, { name: ((U = v.user) == null ? void 0 : U.name) || ((
|
|
1254
|
+
/* @__PURE__ */ t(vr, { name: ((U = v.user) == null ? void 0 : U.name) || ((q = v.user) == null ? void 0 : q.email) || "?" }),
|
|
1245
1255
|
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
1246
1256
|
/* @__PURE__ */ t("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((we = v.user) == null ? void 0 : we.name) || ((Ne = v.user) == null ? void 0 : Ne.email) || "Unknown" }),
|
|
1247
1257
|
((Se = v.user) == null ? void 0 : Se.email) && v.user.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: v.user.email })
|
|
@@ -1383,12 +1393,12 @@ function ts({
|
|
|
1383
1393
|
const m = () => {
|
|
1384
1394
|
const g = b.current;
|
|
1385
1395
|
if (!g) return;
|
|
1386
|
-
const o = g.getBoundingClientRect(), y = 240,
|
|
1396
|
+
const o = g.getBoundingClientRect(), y = 240, k = window.innerHeight - o.bottom < y + 16 && o.top > y;
|
|
1387
1397
|
c({
|
|
1388
1398
|
left: o.left,
|
|
1389
|
-
top:
|
|
1399
|
+
top: k ? o.top - 6 : o.bottom + 6,
|
|
1390
1400
|
width: o.width,
|
|
1391
|
-
above:
|
|
1401
|
+
above: k
|
|
1392
1402
|
});
|
|
1393
1403
|
};
|
|
1394
1404
|
return m(), window.addEventListener("resize", m), window.addEventListener("scroll", m, !0), () => {
|
|
@@ -1620,9 +1630,9 @@ function ys() {
|
|
|
1620
1630
|
(d) => d.dashboardAssistantDraftScopeKey
|
|
1621
1631
|
), h = N((d) => d.lenses), m = N((d) => d.selectedLensId), g = h == null ? void 0 : h.find((d) => d.id === m), o = N((d) => d.dashboard), y = N((d) => d.selectedSheetId), S = (Et = o == null ? void 0 : o.sheets) == null ? void 0 : Et.find(
|
|
1622
1632
|
(d) => d.id === y
|
|
1623
|
-
),
|
|
1633
|
+
), k = Kr(S), L = k ? (Lt = S == null ? void 0 : S.document) == null ? void 0 : Lt.page : void 0, E = N(
|
|
1624
1634
|
(d) => d.isDashboardEditing
|
|
1625
|
-
), { setDashboardTitle: D } = N((d) => d.actions), [ae, Q] = w(!1), [ne, fe] = w(!1), [W, J] = w(!1), [X, Y] = w(!1), [ge, be] = w(!1), [xe, ve] = w(!1), [ye,
|
|
1635
|
+
), { setDashboardTitle: D } = N((d) => d.actions), [ae, Q] = w(!1), [ne, fe] = w(!1), [W, J] = w(!1), [X, Y] = w(!1), [ge, be] = w(!1), [xe, ve] = w(!1), [ye, z] = w(!1), [Z, ee] = w(null), [j, v] = w([]), [U, q] = w(!1), we = N((d) => d.isDashboardPanelOpen), Ne = N(
|
|
1626
1636
|
(d) => d.actions.setIsDashboardPanelOpen
|
|
1627
1637
|
), Se = N((d) => d.filterValues), A = N((d) => d.isVisualEditing);
|
|
1628
1638
|
Rt((d) => d.card);
|
|
@@ -1632,17 +1642,17 @@ function ys() {
|
|
|
1632
1642
|
(d) => d.initialDashboard
|
|
1633
1643
|
);
|
|
1634
1644
|
Ue((d) => d.selectedVisual), N((d) => d.selectedFrameId), Rt((d) => d.frame);
|
|
1635
|
-
const
|
|
1645
|
+
const ke = se ? (At = se == null ? void 0 : se.permissions) == null ? void 0 : At.canEdit : (It = De == null ? void 0 : De.permissions) == null ? void 0 : It.canEdit, ht = N(
|
|
1636
1646
|
(d) => d.showDashboardJSON
|
|
1637
1647
|
), Be = N((d) => d.onSaveFunction), {
|
|
1638
1648
|
setIsDashboardEditing: ft,
|
|
1639
1649
|
setShowDashboardJSON: gt
|
|
1640
1650
|
} = N((d) => d.actions), { setInitialDashboard: bt, clearSelectedDashboard: ze } = Ue(
|
|
1641
1651
|
(d) => d.actions
|
|
1642
|
-
), { resources:
|
|
1652
|
+
), { resources: Ce } = wa(Xe.DASHBOARD), { data: je } = Na(), yr = ((Mt = je == null ? void 0 : je.preference) == null ? void 0 : Mt.defaultDashboardId) || null, { mutate: wr, isPending: Nr } = Sa(), { currentUser: Sr } = lt(), Dr = Da(Sr), T = se || De, xt = T ? {
|
|
1643
1653
|
id: T.id,
|
|
1644
1654
|
title: (o == null ? void 0 : o.title) || T.title || "Dashboard"
|
|
1645
|
-
} : null, { handleAddNewFrame:
|
|
1655
|
+
} : null, { handleAddNewFrame: kr } = ka(), [qe, He] = w(!1), [Cr, oe] = w(!1), [Ve, Ee] = w("close"), ie = Ca(Xe.DASHBOARD), [O, Le] = w(null), Er = async (d, M) => {
|
|
1646
1656
|
if (!(o != null && o.id)) {
|
|
1647
1657
|
console.log("No dashboard ID found");
|
|
1648
1658
|
return;
|
|
@@ -1658,30 +1668,30 @@ function ys() {
|
|
|
1658
1668
|
},
|
|
1659
1669
|
{
|
|
1660
1670
|
onSuccess: () => {
|
|
1661
|
-
console.log("Dashboard title updated successfully"),
|
|
1671
|
+
console.log("Dashboard title updated successfully"), C.success("Dashboard title updated");
|
|
1662
1672
|
},
|
|
1663
1673
|
onError: (F) => {
|
|
1664
|
-
console.error("Failed to update dashboard title:", F),
|
|
1674
|
+
console.error("Failed to update dashboard title:", F), C.error("Failed to update dashboard title"), D(M);
|
|
1665
1675
|
}
|
|
1666
1676
|
}
|
|
1667
1677
|
);
|
|
1668
1678
|
};
|
|
1669
1679
|
Ge(() => {
|
|
1670
|
-
if (
|
|
1680
|
+
if (Ce && Ce.length > 0) {
|
|
1671
1681
|
const d = o == null ? void 0 : o.id;
|
|
1672
1682
|
if (d) {
|
|
1673
|
-
const M =
|
|
1683
|
+
const M = Ce.find(
|
|
1674
1684
|
(F) => F.id === d
|
|
1675
1685
|
);
|
|
1676
1686
|
M && bt(M);
|
|
1677
1687
|
}
|
|
1678
1688
|
}
|
|
1679
|
-
}, [
|
|
1680
|
-
const de = n.orgUserId || n.tenantId, Ke =
|
|
1689
|
+
}, [Ce, o == null ? void 0 : o.id, bt]);
|
|
1690
|
+
const de = n.orgUserId || n.tenantId, Ke = K(
|
|
1681
1691
|
() => ns({
|
|
1682
1692
|
accessToken: e == null ? void 0 : e.accessToken,
|
|
1683
1693
|
dashboardId: (o == null ? void 0 : o.id) || a || n.dashboard_id,
|
|
1684
|
-
selectedSheetId:
|
|
1694
|
+
selectedSheetId: k ? y : void 0,
|
|
1685
1695
|
pageSize: L == null ? void 0 : L.size,
|
|
1686
1696
|
orientation: L == null ? void 0 : L.orientation,
|
|
1687
1697
|
theme: x
|
|
@@ -1690,14 +1700,14 @@ function ys() {
|
|
|
1690
1700
|
e == null ? void 0 : e.accessToken,
|
|
1691
1701
|
a,
|
|
1692
1702
|
o == null ? void 0 : o.id,
|
|
1693
|
-
|
|
1703
|
+
k,
|
|
1694
1704
|
L == null ? void 0 : L.orientation,
|
|
1695
1705
|
L == null ? void 0 : L.size,
|
|
1696
1706
|
y,
|
|
1697
1707
|
x,
|
|
1698
1708
|
n.dashboard_id
|
|
1699
1709
|
]
|
|
1700
|
-
), vt = E && !A && de &&
|
|
1710
|
+
), vt = E && !A && de && ke, { setDashboard: yt } = N((d) => d.actions), wt = N(
|
|
1701
1711
|
(d) => d.semanticExecutionPayload
|
|
1702
1712
|
), Lr = () => {
|
|
1703
1713
|
ft(!0);
|
|
@@ -1755,9 +1765,9 @@ function ys() {
|
|
|
1755
1765
|
if (!M)
|
|
1756
1766
|
return;
|
|
1757
1767
|
const F = (d == null ? void 0 : d.closeAfterSave) ?? U, Gr = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
|
|
1758
|
-
|
|
1768
|
+
q(F), F && oe(!1);
|
|
1759
1769
|
const Br = st(M);
|
|
1760
|
-
|
|
1770
|
+
z(!0), ee(null), v([]), He(!0);
|
|
1761
1771
|
const zr = {
|
|
1762
1772
|
template: M
|
|
1763
1773
|
};
|
|
@@ -1769,25 +1779,25 @@ function ys() {
|
|
|
1769
1779
|
{
|
|
1770
1780
|
onSuccess: (P) => {
|
|
1771
1781
|
var Oe, _e, _t;
|
|
1772
|
-
const
|
|
1773
|
-
if (!M.id &&
|
|
1782
|
+
const V = (P == null ? void 0 : P.id) || ((Oe = P == null ? void 0 : P.dashboard) == null ? void 0 : Oe.id) || ((_e = P == null ? void 0 : P.resource) == null ? void 0 : _e.id) || ((_t = P == null ? void 0 : P.template) == null ? void 0 : _t.id) || null;
|
|
1783
|
+
if (!M.id && V) {
|
|
1774
1784
|
const Je = Zr.getState(), Re = Je.pendingDashboardDraftMigration;
|
|
1775
1785
|
(Re == null ? void 0 : Re.scopeKey) === c ? Je.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
|
|
1776
|
-
|
|
1786
|
+
V
|
|
1777
1787
|
) : Re && Je.actions.clearPendingDashboardDraftMigration();
|
|
1778
1788
|
}
|
|
1779
|
-
He(!1),
|
|
1789
|
+
He(!1), C.success("Dashboard saved!"), Le(
|
|
1780
1790
|
Ht(
|
|
1781
1791
|
Br,
|
|
1782
1792
|
N.getState().semanticExecutionPayload
|
|
1783
1793
|
)
|
|
1784
|
-
),
|
|
1794
|
+
), z(!1), q(!1), F && (Qe(), Ae(), Gr && ze()), Ee("close");
|
|
1785
1795
|
},
|
|
1786
1796
|
onError: (P) => {
|
|
1787
1797
|
He(!1), ee("Failed to save dashboard. Please try again.");
|
|
1788
|
-
const
|
|
1789
|
-
|
|
1790
|
-
) ? (
|
|
1798
|
+
const V = P.details, Oe = Array.isArray(
|
|
1799
|
+
V == null ? void 0 : V.errors
|
|
1800
|
+
) ? (V.errors || []).filter(
|
|
1791
1801
|
(_e) => typeof _e == "string"
|
|
1792
1802
|
) : [];
|
|
1793
1803
|
v(
|
|
@@ -1795,7 +1805,7 @@ function ys() {
|
|
|
1795
1805
|
errors: Oe,
|
|
1796
1806
|
dashboard: M || void 0
|
|
1797
1807
|
})
|
|
1798
|
-
),
|
|
1808
|
+
), C.error("Failed to save dashboard");
|
|
1799
1809
|
}
|
|
1800
1810
|
}
|
|
1801
1811
|
);
|
|
@@ -1816,21 +1826,21 @@ function ys() {
|
|
|
1816
1826
|
n.apiServiceUrl,
|
|
1817
1827
|
F,
|
|
1818
1828
|
e == null ? void 0 : e.accessToken
|
|
1819
|
-
),
|
|
1829
|
+
), C.success("Lens saved"), Be == null || Be(d), Q(!1);
|
|
1820
1830
|
}
|
|
1821
|
-
const
|
|
1831
|
+
const kt = (g == null ? void 0 : g.name) || o.title;
|
|
1822
1832
|
ie.isPending && console.log("Title during update:", {
|
|
1823
|
-
title:
|
|
1833
|
+
title: kt,
|
|
1824
1834
|
dashboardStateTitle: o.title,
|
|
1825
1835
|
dashboardId: o == null ? void 0 : o.id,
|
|
1826
1836
|
currentLensName: g == null ? void 0 : g.name
|
|
1827
1837
|
});
|
|
1828
|
-
const
|
|
1838
|
+
const Ct = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail, Ur = !!Ct && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Tr = l, H = (o == null ? void 0 : o.id) || null, Fr = as(
|
|
1829
1839
|
(Pt = n.config) == null ? void 0 : Pt.showBriefings,
|
|
1830
1840
|
r
|
|
1831
|
-
), Pe = !!
|
|
1832
|
-
|
|
1833
|
-
dashboardId: Pe ? null :
|
|
1841
|
+
), Pe = !!H && yr === H, $r = () => {
|
|
1842
|
+
H && wr({
|
|
1843
|
+
dashboardId: Pe ? null : H
|
|
1834
1844
|
});
|
|
1835
1845
|
};
|
|
1836
1846
|
return /* @__PURE__ */ i(
|
|
@@ -1840,7 +1850,7 @@ function ys() {
|
|
|
1840
1850
|
role: "dashboard-controls",
|
|
1841
1851
|
children: [
|
|
1842
1852
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
1843
|
-
|
|
1853
|
+
Ct && /* @__PURE__ */ i(R, { children: [
|
|
1844
1854
|
/* @__PURE__ */ t(
|
|
1845
1855
|
Ye,
|
|
1846
1856
|
{
|
|
@@ -1878,24 +1888,24 @@ function ys() {
|
|
|
1878
1888
|
/* @__PURE__ */ t(
|
|
1879
1889
|
Ea,
|
|
1880
1890
|
{
|
|
1881
|
-
value:
|
|
1891
|
+
value: kt || "Untitled Dashboard",
|
|
1882
1892
|
onSave: (d) => {
|
|
1883
1893
|
console.log("EditableText onSave called:", {
|
|
1884
1894
|
newTitle: d,
|
|
1885
|
-
canEditDashboard:
|
|
1895
|
+
canEditDashboard: ke,
|
|
1886
1896
|
dashboardId: o == null ? void 0 : o.id
|
|
1887
1897
|
});
|
|
1888
1898
|
const M = (o == null ? void 0 : o.title) || "";
|
|
1889
1899
|
D(d), Er(d, M);
|
|
1890
1900
|
},
|
|
1891
|
-
isEditable:
|
|
1901
|
+
isEditable: ke && !g,
|
|
1892
1902
|
displayClassName: "text-[13px] font-medium",
|
|
1893
1903
|
inputClassName: "text-[13px] font-medium",
|
|
1894
1904
|
placeholder: "Dashboard Title",
|
|
1895
1905
|
isPending: ie.isPending
|
|
1896
1906
|
}
|
|
1897
1907
|
),
|
|
1898
|
-
Ur &&
|
|
1908
|
+
Ur && H && /* @__PURE__ */ t(Qr, { children: /* @__PURE__ */ i(Wr, { children: [
|
|
1899
1909
|
/* @__PURE__ */ t(Jr, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1900
1910
|
_,
|
|
1901
1911
|
{
|
|
@@ -1937,10 +1947,10 @@ function ys() {
|
|
|
1937
1947
|
]
|
|
1938
1948
|
}
|
|
1939
1949
|
),
|
|
1940
|
-
!A && !E && l &&
|
|
1950
|
+
!A && !E && l && H && Fr && /* @__PURE__ */ t(
|
|
1941
1951
|
rn,
|
|
1942
1952
|
{
|
|
1943
|
-
dashboardId:
|
|
1953
|
+
dashboardId: H,
|
|
1944
1954
|
dashboardTitle: (o == null ? void 0 : o.title) || (T == null ? void 0 : T.title)
|
|
1945
1955
|
}
|
|
1946
1956
|
),
|
|
@@ -1958,20 +1968,20 @@ function ys() {
|
|
|
1958
1968
|
]
|
|
1959
1969
|
}
|
|
1960
1970
|
),
|
|
1961
|
-
E && !A && l && !
|
|
1971
|
+
E && !A && l && !k && /* @__PURE__ */ i(
|
|
1962
1972
|
_,
|
|
1963
1973
|
{
|
|
1964
1974
|
variant: "outline",
|
|
1965
1975
|
size: "xs",
|
|
1966
1976
|
disabled: !E,
|
|
1967
|
-
onClick: () =>
|
|
1977
|
+
onClick: () => kr(),
|
|
1968
1978
|
children: [
|
|
1969
1979
|
/* @__PURE__ */ t(re, { className: "h-3.5 w-3.5" }),
|
|
1970
1980
|
"Visual"
|
|
1971
1981
|
]
|
|
1972
1982
|
}
|
|
1973
1983
|
),
|
|
1974
|
-
!A && !E &&
|
|
1984
|
+
!A && !E && ke && l && /* @__PURE__ */ i(_, { size: "xs", onClick: Lr, children: [
|
|
1975
1985
|
/* @__PURE__ */ t(Aa, { className: "h-3.5 w-3.5" }),
|
|
1976
1986
|
"Edit"
|
|
1977
1987
|
] }),
|
|
@@ -2047,7 +2057,7 @@ function ys() {
|
|
|
2047
2057
|
{
|
|
2048
2058
|
onClick: () => J(!0),
|
|
2049
2059
|
children: [
|
|
2050
|
-
/* @__PURE__ */ t(
|
|
2060
|
+
/* @__PURE__ */ t(tr, { className: "h-3.5 w-3.5" }),
|
|
2051
2061
|
"Manage Groups"
|
|
2052
2062
|
]
|
|
2053
2063
|
}
|
|
@@ -2056,7 +2066,7 @@ function ys() {
|
|
|
2056
2066
|
] }),
|
|
2057
2067
|
/* @__PURE__ */ t(ue, { children: "Preferences" }),
|
|
2058
2068
|
/* @__PURE__ */ i($, { onClick: () => Y(!0), children: [
|
|
2059
|
-
/* @__PURE__ */ t(
|
|
2069
|
+
/* @__PURE__ */ t(rr, { className: "h-3.5 w-3.5" }),
|
|
2060
2070
|
"Calendar Preferences"
|
|
2061
2071
|
] }),
|
|
2062
2072
|
s && l && /* @__PURE__ */ i(R, { children: [
|
|
@@ -2068,8 +2078,8 @@ function ys() {
|
|
|
2068
2078
|
onSelect: () => {
|
|
2069
2079
|
var d;
|
|
2070
2080
|
e != null && e.accessToken && ((d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(e.accessToken).then(
|
|
2071
|
-
() =>
|
|
2072
|
-
).catch(() =>
|
|
2081
|
+
() => C.success("Token copied to clipboard")
|
|
2082
|
+
).catch(() => C.error("Unable to copy token")) : C.error("Clipboard not available"));
|
|
2073
2083
|
},
|
|
2074
2084
|
children: [
|
|
2075
2085
|
/* @__PURE__ */ t(Ft, { className: "h-3.5 w-3.5" }),
|
|
@@ -2077,27 +2087,27 @@ function ys() {
|
|
|
2077
2087
|
]
|
|
2078
2088
|
}
|
|
2079
2089
|
),
|
|
2080
|
-
|
|
2090
|
+
k && /* @__PURE__ */ i(
|
|
2081
2091
|
$,
|
|
2082
2092
|
{
|
|
2083
2093
|
disabled: !Ke,
|
|
2084
2094
|
onSelect: () => {
|
|
2085
2095
|
var d;
|
|
2086
2096
|
if (!Ke) {
|
|
2087
|
-
|
|
2097
|
+
C.error(
|
|
2088
2098
|
"Open a document sheet with a token to copy the local PDF URL"
|
|
2089
2099
|
);
|
|
2090
2100
|
return;
|
|
2091
2101
|
}
|
|
2092
2102
|
(d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(Ke).then(
|
|
2093
|
-
() =>
|
|
2103
|
+
() => C.success(
|
|
2094
2104
|
"Local document PDF URL copied to clipboard"
|
|
2095
2105
|
)
|
|
2096
2106
|
).catch(
|
|
2097
|
-
() =>
|
|
2107
|
+
() => C.error(
|
|
2098
2108
|
"Unable to copy local document PDF URL"
|
|
2099
2109
|
)
|
|
2100
|
-
) :
|
|
2110
|
+
) : C.error("Clipboard not available");
|
|
2101
2111
|
},
|
|
2102
2112
|
children: [
|
|
2103
2113
|
/* @__PURE__ */ t(Ft, { className: "h-3.5 w-3.5" }),
|
|
@@ -2167,7 +2177,7 @@ function ys() {
|
|
|
2167
2177
|
onOpenChange: Y
|
|
2168
2178
|
}
|
|
2169
2179
|
),
|
|
2170
|
-
s && de && l && /* @__PURE__ */ t(
|
|
2180
|
+
s && de && l && /* @__PURE__ */ t(Cn, { open: ge, onOpenChange: be }),
|
|
2171
2181
|
l && /* @__PURE__ */ t(
|
|
2172
2182
|
Ga,
|
|
2173
2183
|
{
|
|
@@ -2180,15 +2190,15 @@ function ys() {
|
|
|
2180
2190
|
{
|
|
2181
2191
|
open: ye,
|
|
2182
2192
|
onOpenChange: (d) => {
|
|
2183
|
-
!d && qe && !Z || (
|
|
2193
|
+
!d && qe && !Z || (z(d), d || (ee(null), v([]), q(!1)));
|
|
2184
2194
|
},
|
|
2185
2195
|
children: /* @__PURE__ */ i(za, { className: "max-w-sm", children: [
|
|
2186
2196
|
/* @__PURE__ */ i(ja, { children: [
|
|
2187
2197
|
/* @__PURE__ */ t(qa, { children: Z ? "Save failed" : "Saving dashboard" }),
|
|
2188
2198
|
/* @__PURE__ */ t(Ha, { className: "pt-2", children: Z ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
|
|
2189
|
-
|
|
2199
|
+
j.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
|
|
2190
2200
|
/* @__PURE__ */ t("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
|
|
2191
|
-
/* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children:
|
|
2201
|
+
/* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: j.slice(0, 5).map((d) => /* @__PURE__ */ t("li", { children: d }, d)) })
|
|
2192
2202
|
] })
|
|
2193
2203
|
] }),
|
|
2194
2204
|
/* @__PURE__ */ t(Va, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: Z ? /* @__PURE__ */ i(R, { children: [
|
|
@@ -2196,7 +2206,7 @@ function ys() {
|
|
|
2196
2206
|
Ka,
|
|
2197
2207
|
{
|
|
2198
2208
|
onClick: () => {
|
|
2199
|
-
|
|
2209
|
+
z(!1), ee(null), v([]), q(!1);
|
|
2200
2210
|
},
|
|
2201
2211
|
className: "m-0",
|
|
2202
2212
|
children: "Close"
|
|
@@ -2223,7 +2233,7 @@ function ys() {
|
|
|
2223
2233
|
/* @__PURE__ */ t(
|
|
2224
2234
|
on,
|
|
2225
2235
|
{
|
|
2226
|
-
open:
|
|
2236
|
+
open: Cr,
|
|
2227
2237
|
onOpenChange: (d) => {
|
|
2228
2238
|
oe(d);
|
|
2229
2239
|
},
|