react-semaphor 0.1.282 → 0.1.283
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-B_F5f_BF.js → dashboard-controls-DN8jYCON.js} +102 -102
- package/dist/chunks/{dashboard-controls-XX9__V-e.js → dashboard-controls-wfMo3T6T.js} +1 -1
- package/dist/chunks/{dashboard-filter-controls-button-DZpvfXwU.js → dashboard-filter-controls-button-DKc_6T_O.js} +2 -2
- package/dist/chunks/{dashboard-filter-controls-button-DVLBLHga.js → dashboard-filter-controls-button-zeiatmo1.js} +108 -96
- package/dist/chunks/{dashboard-json-Dd9Q2bZm.js → dashboard-json-DK_hQ4vs.js} +1 -1
- package/dist/chunks/{dashboard-json-CexNQg-E.js → dashboard-json-DyJBSpIU.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-BjdrHb1l.js → dashboard-summary-settings-dialog-BPyawgMV.js} +1 -1
- package/dist/chunks/{dashboard-summary-settings-dialog-zdacBYZZ.js → dashboard-summary-settings-dialog-CWtlFDFP.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-Bi9pQx6G.js → edit-dashboard-visual-0lBlwTCM.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-DQts3aun.js → edit-dashboard-visual-4nQV1U_c.js} +319 -319
- package/dist/chunks/{index-Bgn4zTsp.js → index-B7kUtCgG.js} +12111 -12123
- package/dist/chunks/{index-BY0YEY92.js → index-BHWWNpG6.js} +119 -119
- package/dist/chunks/{resource-management-panel-w7afzaPB.js → resource-management-panel-D8xvqypt.js} +1 -1
- package/dist/chunks/{resource-management-panel--xIMLPdz.js → resource-management-panel-Dpin6Ffw.js} +2 -2
- package/dist/chunks/use-create-flow-overlay-state-VwKDgVAy.js +1597 -0
- package/dist/chunks/use-create-flow-overlay-state-XkHgf9f3.js +21 -0
- package/dist/chunks/{use-visual-utils-CI-7TNJI.js → use-visual-utils-C8YSTPfX.js} +1 -1
- package/dist/chunks/{use-visual-utils-BCWNcaWk.js → use-visual-utils-CBocWNV1.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 +5 -5
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/use-create-flow-overlay-state-AsQy4tbh.js +0 -21
- package/dist/chunks/use-create-flow-overlay-state-COsIHnQp.js +0 -1523
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as o, jsx as e, Fragment as
|
|
2
|
-
import { bM as de,
|
|
1
|
+
import { jsxs as o, jsx as e, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { bM as de, dq as qs, u as x, cC as ra, cD as na, B as A, cF as oa, cG as Q, dr as ia, N as qa, b as $, e as la, ds as Hs, ct as ca, f as da, g as ua, h as ma, i as Ha, L as Qe, I as ce, v as js, a7 as K, dt as we, cK as We, du as Bs, dv as Pa, dw as ja, c as Y, dx as Ba, dy as zs, c$ as ha, dz as Ks, dA as Qs, dB as Ws, dC as Js, dD as Xs, dE as Ys, H as Me, W as Ae, x as k, dF as Le, dG as za, dH as Ka, d8 as Zs, dI as et, w as Z, cJ as J, dJ as at, dK as st, dL as Je, dM as tt, dN as rt, dO as Qa, dP as Wa, dQ as Ce, dR as Ee, d4 as Xe, cP as Ye, dS as Ze, ch as Ja, dT as ea, cc as Xa, dU as nt, cS as Ya, cT as Za, cU as es, cV as as, cW as ss, cX as ts, cY as rs, cZ as aa, dV as ns, cB as ot, dW as it, ag as lt, U as Ua, af as De, dX as ct, am as dt, ah as je, dY as ut, dZ as mt, d_ as ht, aB as pt, d$ as ft, e0 as gt, bT as vt, bU as bt, bV as yt, e1 as Nt, bW as St, cH as xt, at as Dt, e2 as wt, e3 as Ct, dp as Et, e4 as Mt, e5 as At, cE as Lt, a9 as kt, cM as It, e6 as Ot, al as Tt, aa as _t, as as Pt, e7 as Ut } from "./index-B7kUtCgG.js";
|
|
3
3
|
import * as M from "react";
|
|
4
|
-
import os, { useState as N, useMemo as W, useCallback as
|
|
4
|
+
import os, { useState as N, useMemo as W, useCallback as Ga, useEffect as Gt } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { b as
|
|
6
|
+
import { b as Rt, u as Ft, d as $t, A as Vt, V as qt, N as Ht, c as jt, D as Bt, U as zt } from "./dashboard-filter-controls-button-zeiatmo1.js";
|
|
7
7
|
import { l as Kt } from "./date-formatter-vkCj9Ct-.js";
|
|
8
|
-
import { C as Qt, D as Wt } from "./dashboard-summary-settings-dialog-
|
|
8
|
+
import { C as Qt, D as Wt } from "./dashboard-summary-settings-dialog-CWtlFDFP.js";
|
|
9
9
|
import { u as Jt } from "./use-debounced-dirty-check-BwAbnX_5.js";
|
|
10
|
-
import { s as
|
|
11
|
-
import { S as
|
|
10
|
+
import { s as Be } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
11
|
+
import { S as Ra } from "./use-create-flow-overlay-state-VwKDgVAy.js";
|
|
12
12
|
/**
|
|
13
13
|
* @license lucide-react v0.453.0 - ISC
|
|
14
14
|
*
|
|
@@ -76,7 +76,7 @@ const ar = de("Sun", [
|
|
|
76
76
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
77
77
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
78
78
|
]);
|
|
79
|
-
var sa = { exports: {} },
|
|
79
|
+
var sa = { exports: {} }, ze = {};
|
|
80
80
|
/**
|
|
81
81
|
* @license React
|
|
82
82
|
* use-sync-external-store-shim.production.js
|
|
@@ -88,7 +88,7 @@ var sa = { exports: {} }, Be = {};
|
|
|
88
88
|
*/
|
|
89
89
|
var Fa;
|
|
90
90
|
function sr() {
|
|
91
|
-
if (Fa) return
|
|
91
|
+
if (Fa) return ze;
|
|
92
92
|
Fa = 1;
|
|
93
93
|
var a = os;
|
|
94
94
|
function n(r, d) {
|
|
@@ -125,7 +125,7 @@ function sr() {
|
|
|
125
125
|
return d();
|
|
126
126
|
}
|
|
127
127
|
var h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? y : u;
|
|
128
|
-
return
|
|
128
|
+
return ze.useSyncExternalStore = a.useSyncExternalStore !== void 0 ? a.useSyncExternalStore : h, ze;
|
|
129
129
|
}
|
|
130
130
|
var Ke = {};
|
|
131
131
|
/**
|
|
@@ -378,7 +378,7 @@ function cr() {
|
|
|
378
378
|
/* @__PURE__ */ e(we, { className: "px-3", children: "Lenses" }),
|
|
379
379
|
/* @__PURE__ */ e(We, {}),
|
|
380
380
|
/* @__PURE__ */ o(
|
|
381
|
-
|
|
381
|
+
Bs,
|
|
382
382
|
{
|
|
383
383
|
value: t,
|
|
384
384
|
onValueChange: p,
|
|
@@ -409,7 +409,7 @@ function cr() {
|
|
|
409
409
|
}
|
|
410
410
|
),
|
|
411
411
|
/* @__PURE__ */ e(
|
|
412
|
-
|
|
412
|
+
Ba,
|
|
413
413
|
{
|
|
414
414
|
onClick: (d) => {
|
|
415
415
|
d.preventDefault(), y(r.id);
|
|
@@ -430,7 +430,7 @@ function cr() {
|
|
|
430
430
|
] });
|
|
431
431
|
}
|
|
432
432
|
function dr() {
|
|
433
|
-
const { displayPreferences: a, shouldShowElement: n } =
|
|
433
|
+
const { displayPreferences: a, shouldShowElement: n } = zs(), { currentUser: s, userContext: t } = ha(), l = W(
|
|
434
434
|
() => Ks(s),
|
|
435
435
|
[s]
|
|
436
436
|
), c = W(() => (u) => l && l[u] !== void 0 && l[u] === !1 ? !1 : n(u), [l, n, a]), m = W(
|
|
@@ -458,23 +458,23 @@ const ur = async (a, n, s) => {
|
|
|
458
458
|
return await Ka(t, n, s);
|
|
459
459
|
}, mr = async (a, n, s) => {
|
|
460
460
|
const t = `${a}/management/v1/groups/${s}`;
|
|
461
|
-
await
|
|
461
|
+
await za(t, n, "DELETE");
|
|
462
462
|
}, hr = async (a, n, s, t) => {
|
|
463
463
|
const l = `${a}/management/v1/groups/${s}/members`;
|
|
464
464
|
return await Ka(l, n, t);
|
|
465
465
|
}, pr = async (a, n, s, t) => {
|
|
466
466
|
const l = `${a}/management/v1/groups/${s}/members`;
|
|
467
|
-
await
|
|
467
|
+
await za(l, n, "DELETE", t);
|
|
468
468
|
};
|
|
469
469
|
function fr() {
|
|
470
470
|
const { authToken: a, tokenProps: n } = $(), s = Me();
|
|
471
471
|
return Ae({
|
|
472
472
|
mutationFn: (t) => ur(n.apiServiceUrl, (a == null ? void 0 : a.accessToken) || "", t),
|
|
473
473
|
onSuccess: () => {
|
|
474
|
-
s.invalidateQueries({ queryKey: ["groups"] }),
|
|
474
|
+
s.invalidateQueries({ queryKey: ["groups"] }), k.success("Group created successfully");
|
|
475
475
|
},
|
|
476
476
|
onError: (t) => {
|
|
477
|
-
console.error("Failed to create group:", t),
|
|
477
|
+
console.error("Failed to create group:", t), k.error("Failed to create group", {
|
|
478
478
|
description: Le(t, "Failed to create group")
|
|
479
479
|
});
|
|
480
480
|
}
|
|
@@ -485,10 +485,10 @@ function gr() {
|
|
|
485
485
|
return Ae({
|
|
486
486
|
mutationFn: (t) => mr(n.apiServiceUrl, (a == null ? void 0 : a.accessToken) || "", t),
|
|
487
487
|
onSuccess: (t, l) => {
|
|
488
|
-
s.invalidateQueries({ queryKey: ["groups"] }), s.removeQueries({ queryKey: ["group", l] }),
|
|
488
|
+
s.invalidateQueries({ queryKey: ["groups"] }), s.removeQueries({ queryKey: ["group", l] }), k.success("Group deleted successfully");
|
|
489
489
|
},
|
|
490
490
|
onError: (t) => {
|
|
491
|
-
console.error("Failed to delete group:", t),
|
|
491
|
+
console.error("Failed to delete group:", t), k.error("Failed to delete group", {
|
|
492
492
|
description: Le(t, "Failed to delete group")
|
|
493
493
|
});
|
|
494
494
|
}
|
|
@@ -504,10 +504,10 @@ function vr() {
|
|
|
504
504
|
onSuccess: (t, l) => {
|
|
505
505
|
s.invalidateQueries({ queryKey: ["group", l.groupId] }), s.invalidateQueries({
|
|
506
506
|
queryKey: ["group-members", l.groupId]
|
|
507
|
-
}), s.invalidateQueries({ queryKey: ["groups"] }),
|
|
507
|
+
}), s.invalidateQueries({ queryKey: ["groups"] }), k.success("Members added successfully");
|
|
508
508
|
},
|
|
509
509
|
onError: (t) => {
|
|
510
|
-
console.error("Failed to add group members:", t),
|
|
510
|
+
console.error("Failed to add group members:", t), k.error("Failed to add members", {
|
|
511
511
|
description: Le(t, "Failed to add members")
|
|
512
512
|
});
|
|
513
513
|
}
|
|
@@ -523,10 +523,10 @@ function br() {
|
|
|
523
523
|
onSuccess: (t, l) => {
|
|
524
524
|
s.invalidateQueries({ queryKey: ["group", l.groupId] }), s.invalidateQueries({
|
|
525
525
|
queryKey: ["group-members", l.groupId]
|
|
526
|
-
}), s.invalidateQueries({ queryKey: ["groups"] }),
|
|
526
|
+
}), s.invalidateQueries({ queryKey: ["groups"] }), k.success("Members removed successfully");
|
|
527
527
|
},
|
|
528
528
|
onError: (t) => {
|
|
529
|
-
console.error("Failed to remove group members:", t),
|
|
529
|
+
console.error("Failed to remove group members:", t), k.error("Failed to remove members", {
|
|
530
530
|
description: Le(t, "Failed to remove members")
|
|
531
531
|
});
|
|
532
532
|
}
|
|
@@ -624,10 +624,10 @@ function yr({
|
|
|
624
624
|
{
|
|
625
625
|
type: "submit",
|
|
626
626
|
disabled: y.isPending || !t.trim(),
|
|
627
|
-
children: y.isPending ? /* @__PURE__ */ o(
|
|
627
|
+
children: y.isPending ? /* @__PURE__ */ o(I, { children: [
|
|
628
628
|
/* @__PURE__ */ e(Z, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
629
629
|
"Creating..."
|
|
630
|
-
] }) : /* @__PURE__ */ o(
|
|
630
|
+
] }) : /* @__PURE__ */ o(I, { children: [
|
|
631
631
|
/* @__PURE__ */ e(J, { className: "mr-2 h-4 w-4" }),
|
|
632
632
|
"Create Group"
|
|
633
633
|
] })
|
|
@@ -842,8 +842,8 @@ function Lr({
|
|
|
842
842
|
const g = m.toLowerCase();
|
|
843
843
|
return _.filter(
|
|
844
844
|
(E) => {
|
|
845
|
-
var O, F,
|
|
846
|
-
return ((F = (O = E.user) == null ? void 0 : O.name) == null ? void 0 : F.toLowerCase().includes(g)) || ((ae = (
|
|
845
|
+
var O, F, B, ae;
|
|
846
|
+
return ((F = (O = E.user) == null ? void 0 : O.name) == null ? void 0 : F.toLowerCase().includes(g)) || ((ae = (B = E.user) == null ? void 0 : B.email) == null ? void 0 : ae.toLowerCase().includes(g));
|
|
847
847
|
}
|
|
848
848
|
);
|
|
849
849
|
}, [_, m]), j = async () => {
|
|
@@ -875,12 +875,12 @@ function Lr({
|
|
|
875
875
|
y(
|
|
876
876
|
(E) => E.includes(g) ? E.filter((O) => O !== g) : [...E, g]
|
|
877
877
|
);
|
|
878
|
-
},
|
|
878
|
+
}, ke = (g) => {
|
|
879
879
|
r(
|
|
880
880
|
(E) => E.includes(g) ? E.filter((O) => O !== g) : [...E, g]
|
|
881
881
|
);
|
|
882
882
|
};
|
|
883
|
-
return /* @__PURE__ */ e(
|
|
883
|
+
return /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(la, { open: a, onOpenChange: n, children: /* @__PURE__ */ o(da, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
|
|
884
884
|
/* @__PURE__ */ o(ua, { children: [
|
|
885
885
|
/* @__PURE__ */ e(ma, { children: s.name }),
|
|
886
886
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ o("p", { className: "text-sm text-muted-foreground", children: [
|
|
@@ -919,11 +919,11 @@ function Lr({
|
|
|
919
919
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: m ? "No members found" : "No members yet" }),
|
|
920
920
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: m ? "Try a different search" : 'Switch to the "Add Members" tab to add people to this group' })
|
|
921
921
|
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: D.map((g) => /* @__PURE__ */ e(
|
|
922
|
-
|
|
922
|
+
kr,
|
|
923
923
|
{
|
|
924
924
|
member: g,
|
|
925
925
|
selected: h.includes(g.userId),
|
|
926
|
-
onToggle: () =>
|
|
926
|
+
onToggle: () => ke(g.userId)
|
|
927
927
|
},
|
|
928
928
|
g.id
|
|
929
929
|
)) }) }),
|
|
@@ -941,10 +941,10 @@ function Lr({
|
|
|
941
941
|
size: "sm",
|
|
942
942
|
onClick: ue,
|
|
943
943
|
disabled: U.isPending,
|
|
944
|
-
children: U.isPending ? /* @__PURE__ */ o(
|
|
944
|
+
children: U.isPending ? /* @__PURE__ */ o(I, { children: [
|
|
945
945
|
/* @__PURE__ */ e(Z, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
946
946
|
"Removing..."
|
|
947
|
-
] }) : /* @__PURE__ */ o(
|
|
947
|
+
] }) : /* @__PURE__ */ o(I, { children: [
|
|
948
948
|
/* @__PURE__ */ e(Ja, { className: "mr-2 h-4 w-4" }),
|
|
949
949
|
"Remove Selected"
|
|
950
950
|
] })
|
|
@@ -970,7 +970,7 @@ function Lr({
|
|
|
970
970
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
|
|
971
971
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: m ? "Try a different search" : "All eligible users are already members" })
|
|
972
972
|
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: H.map((g) => /* @__PURE__ */ e(
|
|
973
|
-
|
|
973
|
+
Ir,
|
|
974
974
|
{
|
|
975
975
|
user: g,
|
|
976
976
|
selected: p.includes(g.id),
|
|
@@ -990,10 +990,10 @@ function Lr({
|
|
|
990
990
|
{
|
|
991
991
|
onClick: j,
|
|
992
992
|
disabled: P.isPending,
|
|
993
|
-
children: P.isPending ? /* @__PURE__ */ o(
|
|
993
|
+
children: P.isPending ? /* @__PURE__ */ o(I, { children: [
|
|
994
994
|
/* @__PURE__ */ e(Z, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
995
995
|
"Adding..."
|
|
996
|
-
] }) : /* @__PURE__ */ o(
|
|
996
|
+
] }) : /* @__PURE__ */ o(I, { children: [
|
|
997
997
|
/* @__PURE__ */ e(ea, { className: "mr-2 h-4 w-4" }),
|
|
998
998
|
"Add Members"
|
|
999
999
|
] })
|
|
@@ -1004,7 +1004,7 @@ function Lr({
|
|
|
1004
1004
|
] })
|
|
1005
1005
|
] }) }) });
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1007
|
+
function kr({
|
|
1008
1008
|
member: a,
|
|
1009
1009
|
selected: n,
|
|
1010
1010
|
onToggle: s
|
|
@@ -1027,7 +1027,7 @@ function Ir({
|
|
|
1027
1027
|
}
|
|
1028
1028
|
);
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function Ir({
|
|
1031
1031
|
user: a,
|
|
1032
1032
|
selected: n,
|
|
1033
1033
|
onToggle: s
|
|
@@ -1075,7 +1075,7 @@ function Or({
|
|
|
1075
1075
|
}, H = () => {
|
|
1076
1076
|
t("groups"), U();
|
|
1077
1077
|
};
|
|
1078
|
-
return /* @__PURE__ */ o(
|
|
1078
|
+
return /* @__PURE__ */ o(I, { children: [
|
|
1079
1079
|
/* @__PURE__ */ e(la, { open: a, onOpenChange: n, children: /* @__PURE__ */ o(da, { className: "max-w-4xl max-h-[80vh]", children: [
|
|
1080
1080
|
/* @__PURE__ */ o(ua, { children: [
|
|
1081
1081
|
/* @__PURE__ */ o(ma, { className: "flex items-center gap-2", children: [
|
|
@@ -1164,7 +1164,7 @@ function Or({
|
|
|
1164
1164
|
onClick: V,
|
|
1165
1165
|
disabled: v.isPending,
|
|
1166
1166
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
1167
|
-
children: v.isPending ? /* @__PURE__ */ o(
|
|
1167
|
+
children: v.isPending ? /* @__PURE__ */ o(I, { children: [
|
|
1168
1168
|
/* @__PURE__ */ e(Z, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
1169
1169
|
"Deleting..."
|
|
1170
1170
|
] }) : "Delete Group"
|
|
@@ -1328,9 +1328,9 @@ function _r(a) {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
return Array.from(t.values());
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1332
|
-
var
|
|
1333
|
-
|
|
1331
|
+
function Br() {
|
|
1332
|
+
var ka, Ia, Oa, Ta;
|
|
1333
|
+
Rt(), Ft();
|
|
1334
1334
|
const {
|
|
1335
1335
|
authToken: a,
|
|
1336
1336
|
tokenProps: n,
|
|
@@ -1343,7 +1343,7 @@ function zr() {
|
|
|
1343
1343
|
x((i) => i.selectedSheetId);
|
|
1344
1344
|
const d = x(
|
|
1345
1345
|
(i) => i.isDashboardEditing
|
|
1346
|
-
), { setDashboardTitle: f } = x((i) => i.actions), [v, b] = N(!1), [S, C] = N(!1), [P, U] = N(!1), [_, V] = N(!1), [q, H] = N(!1), [D, j] = N(!1), [ue, ee] = N(null), [
|
|
1346
|
+
), { setDashboardTitle: f } = x((i) => i.actions), [v, b] = N(!1), [S, C] = N(!1), [P, U] = N(!1), [_, V] = N(!1), [q, H] = N(!1), [D, j] = N(!1), [ue, ee] = N(null), [ke, g] = N(!1), [E, O] = N(null), [F, B] = N([]), [ae, me] = N(!1), gs = x((i) => i.isDashboardPanelOpen), vs = x(
|
|
1347
1347
|
(i) => i.actions.setIsDashboardPanelOpen
|
|
1348
1348
|
), bs = x((i) => i.filterValues), w = x((i) => i.isVisualEditing);
|
|
1349
1349
|
Ua((i) => i.card);
|
|
@@ -1353,9 +1353,9 @@ function zr() {
|
|
|
1353
1353
|
(i) => i.initialDashboard
|
|
1354
1354
|
);
|
|
1355
1355
|
De((i) => i.selectedVisual), x((i) => i.selectedFrameId), Ua((i) => i.frame);
|
|
1356
|
-
const pe = se ? (
|
|
1356
|
+
const pe = se ? (Ia = se == null ? void 0 : se.permissions) == null ? void 0 : Ia.canEdit : (ka = he == null ? void 0 : he.permissions) == null ? void 0 : ka.canEdit, fe = x((i) => i.showFilters), ba = ct((i) => i.setPanelOpen), ys = x(
|
|
1357
1357
|
(i) => i.showDashboardJSON
|
|
1358
|
-
),
|
|
1358
|
+
), Ie = x((i) => i.onSaveFunction), ya = x(
|
|
1359
1359
|
(i) => i.actions.setShowFilters
|
|
1360
1360
|
), { setIsDashboardEditing: Na, setShowDashboardJSON: Sa } = x(
|
|
1361
1361
|
(i) => i.actions
|
|
@@ -1364,9 +1364,9 @@ function zr() {
|
|
|
1364
1364
|
), { resources: ge } = dt(je.DASHBOARD), { data: Te } = ut(), Ns = ((Oa = Te == null ? void 0 : Te.preference) == null ? void 0 : Oa.defaultDashboardId) || null, { mutate: Ss, isPending: xs } = mt(), { currentUser: Ds } = ha(), ws = ht(Ds), X = se || he, Da = X ? {
|
|
1365
1365
|
id: X.id,
|
|
1366
1366
|
title: (r == null ? void 0 : r.title) || X.title || "Dashboard"
|
|
1367
|
-
} : null, { handleAddNewFrame: Cs } = pt(), [_e, Pe] = N(!1), [Es, te] = N(!1), [Ue, ve] = N("close"), re = ft(je.DASHBOARD), [
|
|
1367
|
+
} : null, { handleAddNewFrame: Cs } = pt(), [_e, Pe] = N(!1), [Es, te] = N(!1), [Ue, ve] = N("close"), re = ft(je.DASHBOARD), [G, Ge] = N(
|
|
1368
1368
|
null
|
|
1369
|
-
), wa =
|
|
1369
|
+
), wa = Ga(
|
|
1370
1370
|
(i) => {
|
|
1371
1371
|
window.setTimeout(() => {
|
|
1372
1372
|
ee(i);
|
|
@@ -1389,53 +1389,53 @@ function zr() {
|
|
|
1389
1389
|
},
|
|
1390
1390
|
{
|
|
1391
1391
|
onSuccess: () => {
|
|
1392
|
-
console.log("Dashboard title updated successfully"),
|
|
1392
|
+
console.log("Dashboard title updated successfully"), k.success("Dashboard title updated");
|
|
1393
1393
|
},
|
|
1394
|
-
onError: (
|
|
1395
|
-
console.error("Failed to update dashboard title:",
|
|
1394
|
+
onError: (R) => {
|
|
1395
|
+
console.error("Failed to update dashboard title:", R), k.error("Failed to update dashboard title"), f(L);
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
);
|
|
1399
1399
|
};
|
|
1400
|
-
|
|
1400
|
+
Gt(() => {
|
|
1401
1401
|
if (ge && ge.length > 0) {
|
|
1402
1402
|
const i = r == null ? void 0 : r.id;
|
|
1403
1403
|
if (i) {
|
|
1404
1404
|
const L = ge.find(
|
|
1405
|
-
(
|
|
1405
|
+
(R) => R.id === i
|
|
1406
1406
|
);
|
|
1407
1407
|
L && xa(L);
|
|
1408
1408
|
}
|
|
1409
1409
|
}
|
|
1410
1410
|
}, [ge, r == null ? void 0 : r.id, xa]);
|
|
1411
|
-
const be = n.orgUserId || n.tenantId, Ca = d && !w && be && pe, { setDashboard:
|
|
1411
|
+
const be = n.orgUserId || n.tenantId, Ca = d && !w && be && pe, { setDashboard: Re } = x((i) => i.actions), As = () => {
|
|
1412
1412
|
Na(!0);
|
|
1413
1413
|
}, Fe = () => {
|
|
1414
|
-
Na(!1), Sa(!1),
|
|
1414
|
+
Na(!1), Sa(!1), Ge(null), ee(null);
|
|
1415
1415
|
};
|
|
1416
1416
|
$t(
|
|
1417
1417
|
d,
|
|
1418
1418
|
r,
|
|
1419
|
-
|
|
1420
|
-
(i) =>
|
|
1419
|
+
G,
|
|
1420
|
+
(i) => Ge(i)
|
|
1421
1421
|
);
|
|
1422
1422
|
const { isDirty: Ea, isDirtyPending: Ls, resetDirty: ye } = Jt(
|
|
1423
1423
|
r,
|
|
1424
|
-
|
|
1424
|
+
G,
|
|
1425
1425
|
300,
|
|
1426
1426
|
1e3,
|
|
1427
|
-
|
|
1428
|
-
), Ma =
|
|
1427
|
+
Be
|
|
1428
|
+
), Ma = Ga(() => G ? Be(r) !== Be(G) : !1, [r, G]), $e = Ea || Ls, ne = _e || re.isPending, ks = () => {
|
|
1429
1429
|
Ma() ? (ve("close"), te(!0)) : (Fe(), ye());
|
|
1430
|
-
},
|
|
1430
|
+
}, Is = async () => {
|
|
1431
1431
|
await Ve({
|
|
1432
1432
|
closeAfterSave: !0,
|
|
1433
1433
|
navigateHomeAfterSave: Ue === "home"
|
|
1434
1434
|
});
|
|
1435
1435
|
}, Os = () => {
|
|
1436
|
-
|
|
1436
|
+
G && Re(G), Fe(), Ue === "home" && Oe(), ve("close"), te(!1), ye();
|
|
1437
1437
|
}, Ts = () => {
|
|
1438
|
-
|
|
1438
|
+
G && (Re(G), ye());
|
|
1439
1439
|
}, _s = () => {
|
|
1440
1440
|
if (d && Ma()) {
|
|
1441
1441
|
ve("home"), te(!0);
|
|
@@ -1447,10 +1447,10 @@ function zr() {
|
|
|
1447
1447
|
const L = x.getState().dashboard;
|
|
1448
1448
|
if (!L)
|
|
1449
1449
|
return;
|
|
1450
|
-
const
|
|
1451
|
-
me(
|
|
1450
|
+
const R = (i == null ? void 0 : i.closeAfterSave) ?? ae, Fs = (i == null ? void 0 : i.navigateHomeAfterSave) ?? !1;
|
|
1451
|
+
me(R), R && te(!1);
|
|
1452
1452
|
const $s = Pt(L);
|
|
1453
|
-
g(!0), O(null),
|
|
1453
|
+
g(!0), O(null), B([]), Pe(!0);
|
|
1454
1454
|
const Vs = {
|
|
1455
1455
|
template: L
|
|
1456
1456
|
};
|
|
@@ -1462,28 +1462,28 @@ function zr() {
|
|
|
1462
1462
|
{
|
|
1463
1463
|
onSuccess: (T) => {
|
|
1464
1464
|
var Ne, Se, _a;
|
|
1465
|
-
const
|
|
1466
|
-
if (!L.id &&
|
|
1465
|
+
const z = (T == null ? void 0 : T.id) || ((Ne = T == null ? void 0 : T.dashboard) == null ? void 0 : Ne.id) || ((Se = T == null ? void 0 : T.resource) == null ? void 0 : Se.id) || ((_a = T == null ? void 0 : T.template) == null ? void 0 : _a.id) || null;
|
|
1466
|
+
if (!L.id && z) {
|
|
1467
1467
|
const He = Ut.getState(), xe = He.pendingDashboardDraftMigration;
|
|
1468
1468
|
(xe == null ? void 0 : xe.scopeKey) === u ? He.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
|
|
1469
|
-
|
|
1469
|
+
z
|
|
1470
1470
|
) : xe && He.actions.clearPendingDashboardDraftMigration();
|
|
1471
1471
|
}
|
|
1472
|
-
Pe(!1),
|
|
1472
|
+
Pe(!1), k.success("Dashboard saved!"), Ge($s), g(!1), me(!1), R && (Fe(), ye(), Fs && Oe()), ve("close");
|
|
1473
1473
|
},
|
|
1474
1474
|
onError: (T) => {
|
|
1475
1475
|
Pe(!1), O("Failed to save dashboard. Please try again.");
|
|
1476
|
-
const
|
|
1477
|
-
|
|
1478
|
-
) ? (
|
|
1476
|
+
const z = T.details, Ne = Array.isArray(
|
|
1477
|
+
z == null ? void 0 : z.errors
|
|
1478
|
+
) ? (z.errors || []).filter(
|
|
1479
1479
|
(Se) => typeof Se == "string"
|
|
1480
1480
|
) : [];
|
|
1481
|
-
|
|
1481
|
+
B(
|
|
1482
1482
|
_r({
|
|
1483
1483
|
errors: Ne,
|
|
1484
1484
|
dashboard: L || void 0
|
|
1485
1485
|
})
|
|
1486
|
-
),
|
|
1486
|
+
), k.error("Failed to save dashboard");
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
1489
|
);
|
|
@@ -1495,16 +1495,16 @@ function zr() {
|
|
|
1495
1495
|
b(!1);
|
|
1496
1496
|
return;
|
|
1497
1497
|
}
|
|
1498
|
-
const L = JSON.stringify(i),
|
|
1498
|
+
const L = JSON.stringify(i), R = {
|
|
1499
1499
|
...h,
|
|
1500
1500
|
template: L,
|
|
1501
1501
|
filterValues: bs
|
|
1502
1502
|
};
|
|
1503
1503
|
await ta(
|
|
1504
1504
|
n.apiServiceUrl,
|
|
1505
|
-
|
|
1505
|
+
R,
|
|
1506
1506
|
a == null ? void 0 : a.accessToken
|
|
1507
|
-
),
|
|
1507
|
+
), k.success("Lens saved"), Ie == null || Ie(i), b(!1);
|
|
1508
1508
|
}
|
|
1509
1509
|
const Aa = (h == null ? void 0 : h.name) || r.title;
|
|
1510
1510
|
re.isPending && console.log("Title during update:", {
|
|
@@ -1513,7 +1513,7 @@ function zr() {
|
|
|
1513
1513
|
dashboardId: r == null ? void 0 : r.id,
|
|
1514
1514
|
currentLensName: h == null ? void 0 : h.name
|
|
1515
1515
|
});
|
|
1516
|
-
const La = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail, Us = !!La && !!(a != null && a.accessToken) && !!(n != null && n.apiServiceUrl),
|
|
1516
|
+
const La = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail, Us = !!La && !!(a != null && a.accessToken) && !!(n != null && n.apiServiceUrl), Gs = c, oe = (r == null ? void 0 : r.id) || null, qe = !!oe && Ns === oe, Rs = () => {
|
|
1517
1517
|
oe && Ss({
|
|
1518
1518
|
dashboardId: qe ? null : oe
|
|
1519
1519
|
});
|
|
@@ -1525,7 +1525,7 @@ function zr() {
|
|
|
1525
1525
|
role: "dashboard-controls",
|
|
1526
1526
|
children: [
|
|
1527
1527
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
1528
|
-
La && /* @__PURE__ */ o(
|
|
1528
|
+
La && /* @__PURE__ */ o(I, { children: [
|
|
1529
1529
|
/* @__PURE__ */ e(
|
|
1530
1530
|
K,
|
|
1531
1531
|
{
|
|
@@ -1538,7 +1538,7 @@ function zr() {
|
|
|
1538
1538
|
children: /* @__PURE__ */ e(Yt, { className: "h-4 w-4" })
|
|
1539
1539
|
}
|
|
1540
1540
|
),
|
|
1541
|
-
|
|
1541
|
+
Gs && !w && /* @__PURE__ */ e(
|
|
1542
1542
|
K,
|
|
1543
1543
|
{
|
|
1544
1544
|
"aria-label": "Dashboard Hub",
|
|
@@ -1557,7 +1557,7 @@ function zr() {
|
|
|
1557
1557
|
role: "status",
|
|
1558
1558
|
children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Loading dashboard title" })
|
|
1559
1559
|
}
|
|
1560
|
-
) : /* @__PURE__ */ o(
|
|
1560
|
+
) : /* @__PURE__ */ o(I, { children: [
|
|
1561
1561
|
/* @__PURE__ */ e(
|
|
1562
1562
|
gt,
|
|
1563
1563
|
{
|
|
@@ -1584,7 +1584,7 @@ function zr() {
|
|
|
1584
1584
|
{
|
|
1585
1585
|
variant: "ghost",
|
|
1586
1586
|
size: "icon",
|
|
1587
|
-
onClick:
|
|
1587
|
+
onClick: Rs,
|
|
1588
1588
|
disabled: xs || !(a != null && a.accessToken) || !(n != null && n.apiServiceUrl),
|
|
1589
1589
|
className: "h-7 w-7",
|
|
1590
1590
|
children: /* @__PURE__ */ e(
|
|
@@ -1603,18 +1603,18 @@ function zr() {
|
|
|
1603
1603
|
] }))
|
|
1604
1604
|
] }),
|
|
1605
1605
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
1606
|
-
w && /* @__PURE__ */ o(
|
|
1606
|
+
w && /* @__PURE__ */ o(I, { children: [
|
|
1607
1607
|
/* @__PURE__ */ e(Vt, { className: "mr-2" }),
|
|
1608
1608
|
/* @__PURE__ */ e(qt, { className: "h-7" })
|
|
1609
1609
|
] }),
|
|
1610
|
-
t && !w && /* @__PURE__ */ o(
|
|
1610
|
+
t && !w && /* @__PURE__ */ o(I, { children: [
|
|
1611
1611
|
/* @__PURE__ */ e(
|
|
1612
1612
|
K,
|
|
1613
1613
|
{
|
|
1614
1614
|
tooltip: "Copy Token",
|
|
1615
1615
|
onClick: () => {
|
|
1616
1616
|
var i;
|
|
1617
|
-
a != null && a.accessToken && ((i = navigator == null ? void 0 : navigator.clipboard) != null && i.writeText ? navigator.clipboard.writeText(a.accessToken).then(() =>
|
|
1617
|
+
a != null && a.accessToken && ((i = navigator == null ? void 0 : navigator.clipboard) != null && i.writeText ? navigator.clipboard.writeText(a.accessToken).then(() => k.success("Token copied to clipboard")).catch(() => k.error("Unable to copy token")) : k.error("Clipboard not available"));
|
|
1618
1618
|
},
|
|
1619
1619
|
className: "h-7 p-2",
|
|
1620
1620
|
children: /* @__PURE__ */ e(xt, { className: "h-4 w-4" })
|
|
@@ -1658,7 +1658,7 @@ function zr() {
|
|
|
1658
1658
|
}
|
|
1659
1659
|
),
|
|
1660
1660
|
d && !w && c && ue ? /* @__PURE__ */ e(
|
|
1661
|
-
|
|
1661
|
+
Bt,
|
|
1662
1662
|
{
|
|
1663
1663
|
open: !0,
|
|
1664
1664
|
onOpenChange: (i) => {
|
|
@@ -1679,7 +1679,7 @@ function zr() {
|
|
|
1679
1679
|
onClick: Ps,
|
|
1680
1680
|
size: "sm",
|
|
1681
1681
|
children: [
|
|
1682
|
-
/* @__PURE__ */ e(
|
|
1682
|
+
/* @__PURE__ */ e(Ra, { className: "mr-2 h-4 w-4" }),
|
|
1683
1683
|
"Save Lens"
|
|
1684
1684
|
]
|
|
1685
1685
|
}
|
|
@@ -1734,7 +1734,7 @@ function zr() {
|
|
|
1734
1734
|
onClick: () => Ve(),
|
|
1735
1735
|
size: "sm",
|
|
1736
1736
|
children: [
|
|
1737
|
-
ne ? /* @__PURE__ */ e(Z, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(
|
|
1737
|
+
ne ? /* @__PURE__ */ e(Z, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Ra, { className: "mr-2 h-4 w-4" }),
|
|
1738
1738
|
ne ? "Saving..." : "Save"
|
|
1739
1739
|
]
|
|
1740
1740
|
}
|
|
@@ -1763,9 +1763,9 @@ function zr() {
|
|
|
1763
1763
|
{
|
|
1764
1764
|
variant: "outline",
|
|
1765
1765
|
className: "h-7 p-2",
|
|
1766
|
-
onClick:
|
|
1766
|
+
onClick: ks,
|
|
1767
1767
|
children: [
|
|
1768
|
-
/* @__PURE__ */ e(
|
|
1768
|
+
/* @__PURE__ */ e(Ba, { className: "mr-2 h-4 w-4" }),
|
|
1769
1769
|
"Close"
|
|
1770
1770
|
]
|
|
1771
1771
|
}
|
|
@@ -1793,13 +1793,13 @@ function zr() {
|
|
|
1793
1793
|
onClick: () => V(!0),
|
|
1794
1794
|
className: "flex items-center gap-2",
|
|
1795
1795
|
children: [
|
|
1796
|
-
/* @__PURE__ */ e(
|
|
1796
|
+
/* @__PURE__ */ e(kt, { className: "mr-2 h-4 w-4" }),
|
|
1797
1797
|
"Schedule Dashboard"
|
|
1798
1798
|
]
|
|
1799
1799
|
}
|
|
1800
1800
|
),
|
|
1801
1801
|
/* @__PURE__ */ e(We, {}),
|
|
1802
|
-
ws && /* @__PURE__ */ o(
|
|
1802
|
+
ws && /* @__PURE__ */ o(I, { children: [
|
|
1803
1803
|
/* @__PURE__ */ e(we, { className: "px-2.5 text-xs font-medium text-muted-foreground", children: "Access" }),
|
|
1804
1804
|
/* @__PURE__ */ o(
|
|
1805
1805
|
Q,
|
|
@@ -1821,7 +1821,7 @@ function zr() {
|
|
|
1821
1821
|
onClick: () => H(!0),
|
|
1822
1822
|
className: "flex items-center gap-2",
|
|
1823
1823
|
children: [
|
|
1824
|
-
/* @__PURE__ */ e(
|
|
1824
|
+
/* @__PURE__ */ e(It, { className: "mr-2 h-4 w-4" }),
|
|
1825
1825
|
"Calendar Preferences"
|
|
1826
1826
|
]
|
|
1827
1827
|
}
|
|
@@ -1879,7 +1879,7 @@ function zr() {
|
|
|
1879
1879
|
onOpenChange: j,
|
|
1880
1880
|
dashboard: r,
|
|
1881
1881
|
disabled: !d,
|
|
1882
|
-
onApply: (i) =>
|
|
1882
|
+
onApply: (i) => Re({
|
|
1883
1883
|
...r,
|
|
1884
1884
|
summary: i
|
|
1885
1885
|
})
|
|
@@ -1888,9 +1888,9 @@ function zr() {
|
|
|
1888
1888
|
/* @__PURE__ */ e(
|
|
1889
1889
|
Ya,
|
|
1890
1890
|
{
|
|
1891
|
-
open:
|
|
1891
|
+
open: ke,
|
|
1892
1892
|
onOpenChange: (i) => {
|
|
1893
|
-
!i && _e && !E || (g(i), i || (O(null),
|
|
1893
|
+
!i && _e && !E || (g(i), i || (O(null), B([]), me(!1)));
|
|
1894
1894
|
},
|
|
1895
1895
|
children: /* @__PURE__ */ o(Za, { className: "max-w-sm", children: [
|
|
1896
1896
|
/* @__PURE__ */ o(es, { children: [
|
|
@@ -1901,12 +1901,12 @@ function zr() {
|
|
|
1901
1901
|
/* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: F.slice(0, 5).map((i) => /* @__PURE__ */ e("li", { children: i }, i)) })
|
|
1902
1902
|
] })
|
|
1903
1903
|
] }),
|
|
1904
|
-
/* @__PURE__ */ e(ts, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: E ? /* @__PURE__ */ o(
|
|
1904
|
+
/* @__PURE__ */ e(ts, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: E ? /* @__PURE__ */ o(I, { children: [
|
|
1905
1905
|
/* @__PURE__ */ e(
|
|
1906
1906
|
rs,
|
|
1907
1907
|
{
|
|
1908
1908
|
onClick: () => {
|
|
1909
|
-
g(!1), O(null),
|
|
1909
|
+
g(!1), O(null), B([]), me(!1);
|
|
1910
1910
|
},
|
|
1911
1911
|
className: "m-0",
|
|
1912
1912
|
children: "Close"
|
|
@@ -1938,13 +1938,13 @@ function zr() {
|
|
|
1938
1938
|
}
|
|
1939
1939
|
),
|
|
1940
1940
|
/* @__PURE__ */ e(
|
|
1941
|
-
|
|
1941
|
+
zt,
|
|
1942
1942
|
{
|
|
1943
1943
|
open: Es,
|
|
1944
1944
|
onOpenChange: (i) => {
|
|
1945
1945
|
te(i);
|
|
1946
1946
|
},
|
|
1947
|
-
onSave:
|
|
1947
|
+
onSave: Is,
|
|
1948
1948
|
onDiscard: Os,
|
|
1949
1949
|
isSaving: _e,
|
|
1950
1950
|
saveLabel: "Save",
|
|
@@ -1957,5 +1957,5 @@ function zr() {
|
|
|
1957
1957
|
);
|
|
1958
1958
|
}
|
|
1959
1959
|
export {
|
|
1960
|
-
|
|
1960
|
+
Br as default
|
|
1961
1961
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-BHWWNpG6.js"),x=require("react");require("react-dom");const P=require("./dashboard-filter-controls-button-DKc_6T_O.js"),_s=require("./date-formatter-CqXdM6JO.js"),Xe=require("./dashboard-summary-settings-dialog-BPyawgMV.js"),Us=require("./use-debounced-dirty-check-XHSwAefL.js"),we=require("./normalize-dashboard-for-dirty-check-BXRUMVb2.js"),Ye=require("./use-create-flow-overlay-state-XkHgf9f3.js");function Rs(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return o.default=t,Object.freeze(o)}const C=Rs(x);/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|