react-semaphor 0.1.307 → 0.1.309
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/brand-studio/index.cjs +1 -1
- package/dist/brand-studio/index.js +4 -4
- package/dist/chunks/{braces-CkL8POe0.js → braces-BHDm9arh.js} +1 -1
- package/dist/chunks/{braces-e5qkN-I_.js → braces-DEq8EJtw.js} +1 -1
- package/dist/chunks/chevrons-up-down-Cbtggnqv.js +14 -0
- package/dist/chunks/chevrons-up-down-DDEY9beZ.js +6 -0
- package/dist/chunks/{dashboard-controls-Dwet_9h0.js → dashboard-controls-C_vjMmt2.js} +8 -3
- package/dist/chunks/{dashboard-controls-5bibC_5a.js → dashboard-controls-Cp41403T.js} +233 -223
- package/dist/chunks/{dashboard-filter-controls-button-D0k9NDci.js → dashboard-filter-controls-button-DFKZjkD4.js} +304 -303
- package/dist/chunks/dashboard-filter-controls-button-tfjDO4D4.js +11 -0
- package/dist/chunks/{dashboard-json-CfRKLL7C.js → dashboard-json-Cc8S_uIr.js} +2 -2
- package/dist/chunks/{dashboard-json-Bi5XdgG5.js → dashboard-json-QR7WNDuO.js} +1 -1
- package/dist/chunks/dashboard-summary-settings-dialog-CxXxzyRP.js +1 -0
- package/dist/chunks/{dashboard-summary-settings-dialog-Bj4_wBW9.js → dashboard-summary-settings-dialog-qH6FOt7O.js} +33 -32
- package/dist/chunks/{edit-dashboard-visual-Wfs53Kbn.js → edit-dashboard-visual-J7cHkCD6.js} +32 -32
- package/dist/chunks/{edit-dashboard-visual-DIuzuJfj.js → edit-dashboard-visual-_BZQa5yI.js} +130 -129
- package/dist/chunks/index-AerZtbg0.js +1330 -0
- package/dist/chunks/{index-DMFCfjgD.js → index-CSgoL0P9.js} +59994 -61918
- package/dist/chunks/{palette-Oa4O9jWG.js → palette-CNKSAIrt.js} +1 -1
- package/dist/chunks/{palette-D5Lorzf2.js → palette-CteErylX.js} +1 -1
- package/dist/chunks/{resource-management-panel-Dqc3gfYn.js → resource-management-panel-CcFT7lpL.js} +52 -52
- package/dist/chunks/resource-management-panel-DbYkAk1I.js +6 -0
- package/dist/chunks/{save-CDX2p4v1.js → save-B1-nDZwS.js} +1 -1
- package/dist/chunks/{save-zEdICevW.js → save-BVVnWGeb.js} +1 -1
- package/dist/chunks/{switch-BPFzGTzF.js → switch-BG4RWnrq.js} +25 -25
- package/dist/chunks/{switch-CKiXRRoh.js → switch-BZn7R_Cp.js} +696 -697
- package/dist/chunks/{use-create-flow-overlay-state-CLyv5c2m.js → use-create-flow-overlay-state-CczjbVZY.js} +49 -49
- package/dist/chunks/{use-create-flow-overlay-state-CSMe5Ls6.js → use-create-flow-overlay-state-DImkf832.js} +1 -1
- package/dist/chunks/{use-visual-utils-DDAs4dCz.js → use-visual-utils-BdHwrbtr.js} +1 -1
- package/dist/chunks/{use-visual-utils-Det6M3Wd.js → use-visual-utils-DczvWVbd.js} +2 -2
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +76 -76
- 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 +10 -2
- package/package.json +1 -1
- package/dist/chunks/dashboard-filter-controls-button-ZeYO5jux.js +0 -11
- package/dist/chunks/dashboard-summary-settings-dialog-DD9Aj2XH.js +0 -1
- package/dist/chunks/index-DQCMUspd.js +0 -1350
- package/dist/chunks/resource-management-panel-CNr6uMMf.js +0 -6
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c, Fragment as T } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
2
|
+
import { c as j, u as w, B as L, aI as Nt, m as wt, L as dt, I as ue, a as Y, aJ as Re, aK as da, aL as ua, E as ls, f as X, aM as ds, aN as us, aO as ut, T as ma, q as ha, r as _e, t as Ue, s as mt, aP as pa, aQ as ms, n as ta, z as hs, A as ps, D as fs, F as gs, K as vs, aR as bs } from "./switch-BZn7R_Cp.js";
|
|
3
|
+
import { c4 as ys, u as K, b as Ge, c5 as xs, bk as ht, c as $e, d as Ve, e as qe, f as St, n as Ns, c6 as de, bx as Te, c7 as ws, c8 as aa, c9 as fa, ca as ga, cb as Ss, bN as Dt, cc as Ds, cd as Cs, ce as Es, cf as Is, cg as Ms, ch as Ls, q as ze, M as Be, o as M, bU as As, ci as ks, cj as Os, bR as pt, ck as ft, bw as Ct, bb as va, b9 as ba, cl as Ps, bE as ya, bF as xa, bG as Na, bH as wa, bI as Sa, bJ as Da, bK as Ca, bL as gt, cm as Ts, cn as _s, co as Us, bo as Fs, cp as Rs, cq as Gs, W as $s, V as Oe, cr as Vs, a0 as qs, X as nt, cs as zs, ct as Bs, cu as Hs, ac as js, cv as Ks, I as rt, cw as Qs, cx as Ws, cy as Js, c3 as Ys, bp as Xs, bq as Zs, br as en, bs as tn, bt as $, bY as an, K as sn, bz as nn, cz as rn, bu as sa, cA as on, cB as cn, cC as ln, $ as dn, L as un, cD as mn, H as vt } from "./index-CSgoL0P9.js";
|
|
4
|
+
import * as A from "react";
|
|
5
5
|
import Ea, { useState as N, useMemo as F, useCallback as Fe, useEffect as ot } from "react";
|
|
6
6
|
import "./index-CJdxSyQq.js";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
import { b as
|
|
9
|
-
import { d as
|
|
10
|
-
import { C as wn, D as
|
|
11
|
-
import { u as
|
|
8
|
+
import { b as hn, u as pn, A as fn, V as gn, c as vn, D as bn, N as yn, U as xn } from "./dashboard-filter-controls-button-DFKZjkD4.js";
|
|
9
|
+
import { d as Nn } from "./index-DFOb_6HB.js";
|
|
10
|
+
import { C as wn, D as Sn } from "./dashboard-summary-settings-dialog-qH6FOt7O.js";
|
|
11
|
+
import { u as Dn } from "./use-debounced-dirty-check-BwAbnX_5.js";
|
|
12
12
|
import { s as it } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
|
|
13
|
-
import { u as
|
|
14
|
-
import { S as na } from "./save-
|
|
15
|
-
import { P as
|
|
16
|
-
import { B as
|
|
13
|
+
import { u as Cn, e as En } from "./use-create-flow-overlay-state-CczjbVZY.js";
|
|
14
|
+
import { S as na } from "./save-B1-nDZwS.js";
|
|
15
|
+
import { P as In } from "./palette-CNKSAIrt.js";
|
|
16
|
+
import { B as Mn } from "./braces-DEq8EJtw.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 Ln =
|
|
23
|
+
const Ln = j("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 Ln = Q("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
|
|
36
|
+
const An = j("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 On = Q("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 kn =
|
|
47
|
+
const kn = j("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 kn = Q("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
|
|
58
|
+
const On = j("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 Pn = Q("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
|
|
67
|
+
const Pn = j("ShieldX", [
|
|
68
68
|
[
|
|
69
69
|
"path",
|
|
70
70
|
{
|
|
@@ -81,7 +81,7 @@ const Tn = Q("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
|
|
84
|
+
const Tn = j("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,7 +98,17 @@ const _n = Q("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
|
|
101
|
+
const _n = j("Undo2", [
|
|
102
|
+
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
|
|
103
|
+
["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
|
|
104
|
+
]);
|
|
105
|
+
/**
|
|
106
|
+
* @license lucide-react v0.453.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/
|
|
111
|
+
const bt = j("UserPlus", [
|
|
102
112
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
103
113
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
104
114
|
["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
|
|
@@ -185,16 +195,16 @@ function Fn() {
|
|
|
185
195
|
D = l({
|
|
186
196
|
inst: { value: b, getSnapshot: r }
|
|
187
197
|
});
|
|
188
|
-
var
|
|
198
|
+
var S = D[0].inst, C = D[1];
|
|
189
199
|
return g(
|
|
190
200
|
function() {
|
|
191
|
-
|
|
201
|
+
S.value = b, S.getSnapshot = r, n(S) && C({ inst: S });
|
|
192
202
|
},
|
|
193
203
|
[d, b, r]
|
|
194
204
|
), p(
|
|
195
205
|
function() {
|
|
196
|
-
return n(
|
|
197
|
-
n(
|
|
206
|
+
return n(S) && C({ inst: S }), d(function() {
|
|
207
|
+
n(S) && C({ inst: S });
|
|
198
208
|
});
|
|
199
209
|
},
|
|
200
210
|
[d]
|
|
@@ -222,16 +232,16 @@ process.env.NODE_ENV === "production" ? yt.exports = Un() : yt.exports = Fn();
|
|
|
222
232
|
var Rn = yt.exports;
|
|
223
233
|
const Pe = ["light", "dark", "system"];
|
|
224
234
|
function Gn() {
|
|
225
|
-
const { theme: t, setTheme: a } = ys(), n =
|
|
235
|
+
const { theme: t, setTheme: a } = ys(), n = w(
|
|
226
236
|
(l) => l.actions.setDashboardTheme
|
|
227
237
|
);
|
|
228
238
|
function s() {
|
|
229
239
|
const l = Pe.includes(t) ? t : "system", p = Pe[(Pe.indexOf(l) + 1) % Pe.length];
|
|
230
240
|
a(p), n(p);
|
|
231
241
|
}
|
|
232
|
-
const i = t === "light" ?
|
|
242
|
+
const i = t === "light" ? Tn : t === "dark" ? On : kn, u = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
|
|
233
243
|
return /* @__PURE__ */ e(
|
|
234
|
-
|
|
244
|
+
L,
|
|
235
245
|
{
|
|
236
246
|
type: "button",
|
|
237
247
|
variant: "ghost",
|
|
@@ -277,37 +287,37 @@ async function Vn(t, a, n) {
|
|
|
277
287
|
lensId: a
|
|
278
288
|
});
|
|
279
289
|
}
|
|
280
|
-
const
|
|
281
|
-
function
|
|
290
|
+
const qn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
291
|
+
function zn({
|
|
282
292
|
open: t,
|
|
283
293
|
onOpenChange: a
|
|
284
294
|
} = {}) {
|
|
285
|
-
const [n, s] = N(""), [i, u] = N(!1), l =
|
|
295
|
+
const [n, s] = N(""), [i, u] = N(!1), l = w((I) => I.lenses), { setLenses: p, setSelectedLensId: g } = wt(), [v, m] = N(!1), [f, h] = N(!1), d = t !== void 0, r = d ? t : f, b = (I) => {
|
|
286
296
|
d || h(I), a == null || a(I);
|
|
287
|
-
}, D =
|
|
288
|
-
async function
|
|
297
|
+
}, D = w((I) => I.dashboard), S = w((I) => I.filterValues), { authToken: C, tokenProps: E } = K();
|
|
298
|
+
async function k() {
|
|
289
299
|
m(!0);
|
|
290
300
|
const I = await $n(
|
|
291
301
|
E.apiServiceUrl,
|
|
292
302
|
n,
|
|
293
303
|
D,
|
|
294
|
-
|
|
304
|
+
S,
|
|
295
305
|
C == null ? void 0 : C.accessToken
|
|
296
306
|
);
|
|
297
307
|
I && (p([...l || [], I]), g(I.id), b(!1)), m(!1);
|
|
298
308
|
}
|
|
299
309
|
return /* @__PURE__ */ c(Ge, { open: r, onOpenChange: b, children: [
|
|
300
|
-
d ? null : /* @__PURE__ */ e(xs, { asChild: !0, children: /* @__PURE__ */ c(
|
|
310
|
+
d ? null : /* @__PURE__ */ e(xs, { asChild: !0, children: /* @__PURE__ */ c(L, { variant: "secondary", size: "xs", children: [
|
|
301
311
|
/* @__PURE__ */ e(ht, { className: "h-3.5 w-3.5" }),
|
|
302
312
|
"Lens"
|
|
303
313
|
] }) }),
|
|
304
314
|
/* @__PURE__ */ c($e, { className: "rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control", children: [
|
|
305
315
|
/* @__PURE__ */ c(Ve, { children: [
|
|
306
|
-
/* @__PURE__ */ e(
|
|
307
|
-
/* @__PURE__ */ e(
|
|
316
|
+
/* @__PURE__ */ e(qe, { className: "text-[15px]", children: "Create lens" }),
|
|
317
|
+
/* @__PURE__ */ e(St, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
|
|
308
318
|
] }),
|
|
309
319
|
/* @__PURE__ */ c("div", { className: "space-y-1.5 py-1", children: [
|
|
310
|
-
/* @__PURE__ */ e(dt, { htmlFor: "lens-name", className:
|
|
320
|
+
/* @__PURE__ */ e(dt, { htmlFor: "lens-name", className: qn, children: "Name" }),
|
|
311
321
|
/* @__PURE__ */ e(
|
|
312
322
|
ue,
|
|
313
323
|
{
|
|
@@ -321,13 +331,13 @@ function qn({
|
|
|
321
331
|
i && /* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "A lens with this name already exists. Pick a different one." })
|
|
322
332
|
] }),
|
|
323
333
|
/* @__PURE__ */ c(Ns, { children: [
|
|
324
|
-
/* @__PURE__ */ e(
|
|
334
|
+
/* @__PURE__ */ e(L, { variant: "outline", size: "xs", onClick: () => b(!1), children: "Cancel" }),
|
|
325
335
|
/* @__PURE__ */ e(
|
|
326
|
-
|
|
336
|
+
L,
|
|
327
337
|
{
|
|
328
338
|
size: "xs",
|
|
329
339
|
type: "submit",
|
|
330
|
-
onClick:
|
|
340
|
+
onClick: k,
|
|
331
341
|
disabled: v || !n.trim(),
|
|
332
342
|
children: v ? "Creating…" : "Create"
|
|
333
343
|
}
|
|
@@ -337,7 +347,7 @@ function qn({
|
|
|
337
347
|
] });
|
|
338
348
|
}
|
|
339
349
|
function Bn({ includeLabel: t = !1 } = {}) {
|
|
340
|
-
const a =
|
|
350
|
+
const a = w((m) => m.lenses), n = w((m) => m.selectedLensId), { setLenses: s, setSelectedLensId: i } = wt(), { authToken: u, tokenProps: l } = K();
|
|
341
351
|
async function p(m) {
|
|
342
352
|
i(m);
|
|
343
353
|
}
|
|
@@ -376,7 +386,7 @@ function Bn({ includeLabel: t = !1 } = {}) {
|
|
|
376
386
|
/* @__PURE__ */ e(Te, {})
|
|
377
387
|
] }) : null,
|
|
378
388
|
/* @__PURE__ */ c(
|
|
379
|
-
|
|
389
|
+
ws,
|
|
380
390
|
{
|
|
381
391
|
value: n,
|
|
382
392
|
onValueChange: p,
|
|
@@ -427,14 +437,14 @@ function Bn({ includeLabel: t = !1 } = {}) {
|
|
|
427
437
|
] });
|
|
428
438
|
}
|
|
429
439
|
function Hn() {
|
|
430
|
-
const { displayPreferences: t, shouldShowElement: a } =
|
|
440
|
+
const { displayPreferences: t, shouldShowElement: a } = Ss(), { currentUser: n, userContext: s } = Dt(), i = F(
|
|
431
441
|
() => Ds(n),
|
|
432
442
|
[n]
|
|
433
443
|
), u = F(() => (p) => i && i[p] !== void 0 && i[p] === !1 ? !1 : a(p), [i, a, t]), l = F(
|
|
434
444
|
() => {
|
|
435
445
|
var p, g, v, m, f;
|
|
436
446
|
return {
|
|
437
|
-
canEdit: ((p = s == null ? void 0 : s.permissions) == null ? void 0 : p.canEdit) ??
|
|
447
|
+
canEdit: ((p = s == null ? void 0 : s.permissions) == null ? void 0 : p.canEdit) ?? Ls(n),
|
|
438
448
|
canUseFilters: ((g = s == null ? void 0 : s.permissions) == null ? void 0 : g.canEdit) ?? Ms(n),
|
|
439
449
|
canManageDashboards: ((v = s == null ? void 0 : s.permissions) == null ? void 0 : v.canCreateDashboard) ?? Is(n),
|
|
440
450
|
canCreateDashboards: ((m = s == null ? void 0 : s.permissions) == null ? void 0 : m.canCreateDashboard) ?? Es(n),
|
|
@@ -464,7 +474,7 @@ const jn = async (t, a, n) => {
|
|
|
464
474
|
await da(i, a, "DELETE", s);
|
|
465
475
|
};
|
|
466
476
|
function Jn() {
|
|
467
|
-
const { authToken: t, tokenProps: a } =
|
|
477
|
+
const { authToken: t, tokenProps: a } = K(), n = ze();
|
|
468
478
|
return Be({
|
|
469
479
|
mutationFn: (s) => jn(a.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", s),
|
|
470
480
|
onSuccess: () => {
|
|
@@ -478,7 +488,7 @@ function Jn() {
|
|
|
478
488
|
});
|
|
479
489
|
}
|
|
480
490
|
function Yn() {
|
|
481
|
-
const { authToken: t, tokenProps: a } =
|
|
491
|
+
const { authToken: t, tokenProps: a } = K(), n = ze();
|
|
482
492
|
return Be({
|
|
483
493
|
mutationFn: (s) => Kn(a.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", s),
|
|
484
494
|
onSuccess: (s, i) => {
|
|
@@ -492,7 +502,7 @@ function Yn() {
|
|
|
492
502
|
});
|
|
493
503
|
}
|
|
494
504
|
function Xn() {
|
|
495
|
-
const { authToken: t, tokenProps: a } =
|
|
505
|
+
const { authToken: t, tokenProps: a } = K(), n = ze();
|
|
496
506
|
return Be({
|
|
497
507
|
mutationFn: ({
|
|
498
508
|
groupId: s,
|
|
@@ -511,7 +521,7 @@ function Xn() {
|
|
|
511
521
|
});
|
|
512
522
|
}
|
|
513
523
|
function Zn() {
|
|
514
|
-
const { authToken: t, tokenProps: a } =
|
|
524
|
+
const { authToken: t, tokenProps: a } = K(), n = ze();
|
|
515
525
|
return Be({
|
|
516
526
|
mutationFn: ({
|
|
517
527
|
groupId: s,
|
|
@@ -577,7 +587,7 @@ function er({
|
|
|
577
587
|
/* @__PURE__ */ c("div", { className: "space-y-1.5", children: [
|
|
578
588
|
/* @__PURE__ */ e(dt, { htmlFor: "group-description", className: ia, children: "Description (optional)" }),
|
|
579
589
|
/* @__PURE__ */ e(
|
|
580
|
-
|
|
590
|
+
As,
|
|
581
591
|
{
|
|
582
592
|
id: "group-description",
|
|
583
593
|
placeholder: "Describe the purpose of this group…",
|
|
@@ -601,7 +611,7 @@ function er({
|
|
|
601
611
|
] }),
|
|
602
612
|
/* @__PURE__ */ c("div", { className: "flex justify-end gap-1.5 pt-1", children: [
|
|
603
613
|
/* @__PURE__ */ e(
|
|
604
|
-
|
|
614
|
+
L,
|
|
605
615
|
{
|
|
606
616
|
type: "button",
|
|
607
617
|
variant: "outline",
|
|
@@ -614,7 +624,7 @@ function er({
|
|
|
614
624
|
}
|
|
615
625
|
),
|
|
616
626
|
/* @__PURE__ */ e(
|
|
617
|
-
|
|
627
|
+
L,
|
|
618
628
|
{
|
|
619
629
|
type: "submit",
|
|
620
630
|
size: "xs",
|
|
@@ -631,19 +641,19 @@ function er({
|
|
|
631
641
|
function tr(t, a = []) {
|
|
632
642
|
let n = [];
|
|
633
643
|
function s(u, l) {
|
|
634
|
-
const p =
|
|
644
|
+
const p = A.createContext(l);
|
|
635
645
|
p.displayName = u + "Context";
|
|
636
646
|
const g = n.length;
|
|
637
647
|
n = [...n, l];
|
|
638
648
|
const v = (f) => {
|
|
639
|
-
var
|
|
640
|
-
const { scope: h, children: d, ...r } = f, b = ((
|
|
649
|
+
var S;
|
|
650
|
+
const { scope: h, children: d, ...r } = f, b = ((S = h == null ? void 0 : h[t]) == null ? void 0 : S[g]) || p, D = A.useMemo(() => r, Object.values(r));
|
|
641
651
|
return /* @__PURE__ */ e(b.Provider, { value: D, children: d });
|
|
642
652
|
};
|
|
643
653
|
v.displayName = u + "Provider";
|
|
644
654
|
function m(f, h) {
|
|
645
655
|
var b;
|
|
646
|
-
const d = ((b = h == null ? void 0 : h[t]) == null ? void 0 : b[g]) || p, r =
|
|
656
|
+
const d = ((b = h == null ? void 0 : h[t]) == null ? void 0 : b[g]) || p, r = A.useContext(d);
|
|
647
657
|
if (r) return r;
|
|
648
658
|
if (l !== void 0) return l;
|
|
649
659
|
throw new Error(`\`${f}\` must be used within \`${u}\``);
|
|
@@ -651,10 +661,10 @@ function tr(t, a = []) {
|
|
|
651
661
|
return [v, m];
|
|
652
662
|
}
|
|
653
663
|
const i = () => {
|
|
654
|
-
const u = n.map((l) =>
|
|
664
|
+
const u = n.map((l) => A.createContext(l));
|
|
655
665
|
return function(p) {
|
|
656
666
|
const g = (p == null ? void 0 : p[t]) || u;
|
|
657
|
-
return
|
|
667
|
+
return A.useMemo(
|
|
658
668
|
() => ({ [`__scope${t}`]: { ...p, [t]: g } }),
|
|
659
669
|
[p, g]
|
|
660
670
|
);
|
|
@@ -675,7 +685,7 @@ function ar(...t) {
|
|
|
675
685
|
const f = g(u)[`__scope${v}`];
|
|
676
686
|
return { ...p, ...f };
|
|
677
687
|
}, {});
|
|
678
|
-
return
|
|
688
|
+
return A.useMemo(() => ({ [`__scope${a.scopeName}`]: l }), [l]);
|
|
679
689
|
};
|
|
680
690
|
};
|
|
681
691
|
return n.scopeName = a.scopeName, n;
|
|
@@ -699,7 +709,7 @@ var sr = [
|
|
|
699
709
|
"svg",
|
|
700
710
|
"ul"
|
|
701
711
|
], Et = sr.reduce((t, a) => {
|
|
702
|
-
const n = ds(`Primitive.${a}`), s =
|
|
712
|
+
const n = ds(`Primitive.${a}`), s = A.forwardRef((i, u) => {
|
|
703
713
|
const { asChild: l, ...p } = i, g = l ? n : a;
|
|
704
714
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(g, { ...p, ref: u });
|
|
705
715
|
});
|
|
@@ -716,9 +726,9 @@ function rr() {
|
|
|
716
726
|
return () => {
|
|
717
727
|
};
|
|
718
728
|
}
|
|
719
|
-
var It = "Avatar", [or] = tr(It), [ir, Ia] = or(It), Ma =
|
|
729
|
+
var It = "Avatar", [or] = tr(It), [ir, Ia] = or(It), Ma = A.forwardRef(
|
|
720
730
|
(t, a) => {
|
|
721
|
-
const { __scopeAvatar: n, ...s } = t, [i, u] =
|
|
731
|
+
const { __scopeAvatar: n, ...s } = t, [i, u] = A.useState("idle");
|
|
722
732
|
return /* @__PURE__ */ e(
|
|
723
733
|
ir,
|
|
724
734
|
{
|
|
@@ -731,10 +741,10 @@ var It = "Avatar", [or] = tr(It), [ir, Ia] = or(It), Ma = L.forwardRef(
|
|
|
731
741
|
}
|
|
732
742
|
);
|
|
733
743
|
Ma.displayName = It;
|
|
734
|
-
var
|
|
744
|
+
var La = "AvatarImage", Aa = A.forwardRef(
|
|
735
745
|
(t, a) => {
|
|
736
746
|
const { __scopeAvatar: n, src: s, onLoadingStatusChange: i = () => {
|
|
737
|
-
}, ...u } = t, l = Ia(
|
|
747
|
+
}, ...u } = t, l = Ia(La, n), p = cr(s, u), g = us((v) => {
|
|
738
748
|
i(v), l.onImageLoadingStatusChange(v);
|
|
739
749
|
});
|
|
740
750
|
return ut(() => {
|
|
@@ -742,11 +752,11 @@ var Aa = "AvatarImage", La = L.forwardRef(
|
|
|
742
752
|
}, [p, g]), p === "loaded" ? /* @__PURE__ */ e(Et.img, { ...u, ref: a, src: s }) : null;
|
|
743
753
|
}
|
|
744
754
|
);
|
|
745
|
-
|
|
746
|
-
var
|
|
755
|
+
Aa.displayName = La;
|
|
756
|
+
var ka = "AvatarFallback", Oa = A.forwardRef(
|
|
747
757
|
(t, a) => {
|
|
748
|
-
const { __scopeAvatar: n, delayMs: s, ...i } = t, u = Ia(
|
|
749
|
-
return
|
|
758
|
+
const { __scopeAvatar: n, delayMs: s, ...i } = t, u = Ia(ka, n), [l, p] = A.useState(s === void 0);
|
|
759
|
+
return A.useEffect(() => {
|
|
750
760
|
if (s !== void 0) {
|
|
751
761
|
const g = window.setTimeout(() => p(!0), s);
|
|
752
762
|
return () => window.clearTimeout(g);
|
|
@@ -754,12 +764,12 @@ var Oa = "AvatarFallback", ka = L.forwardRef(
|
|
|
754
764
|
}, [s]), l && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Et.span, { ...i, ref: a }) : null;
|
|
755
765
|
}
|
|
756
766
|
);
|
|
757
|
-
|
|
767
|
+
Oa.displayName = ka;
|
|
758
768
|
function ca(t, a) {
|
|
759
769
|
return t ? a ? (t.src !== a && (t.src = a), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
760
770
|
}
|
|
761
771
|
function cr(t, { referrerPolicy: a, crossOrigin: n }) {
|
|
762
|
-
const s = nr(), i =
|
|
772
|
+
const s = nr(), i = A.useRef(null), u = s ? (i.current || (i.current = new window.Image()), i.current) : null, [l, p] = A.useState(
|
|
763
773
|
() => ca(u, t)
|
|
764
774
|
);
|
|
765
775
|
return ut(() => {
|
|
@@ -775,8 +785,8 @@ function cr(t, { referrerPolicy: a, crossOrigin: n }) {
|
|
|
775
785
|
};
|
|
776
786
|
}, [u, n, a]), l;
|
|
777
787
|
}
|
|
778
|
-
var Pa = Ma, Ta =
|
|
779
|
-
const Mt =
|
|
788
|
+
var Pa = Ma, Ta = Aa, _a = Oa;
|
|
789
|
+
const Mt = A.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
780
790
|
Pa,
|
|
781
791
|
{
|
|
782
792
|
ref: n,
|
|
@@ -788,7 +798,7 @@ const Mt = L.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
788
798
|
}
|
|
789
799
|
));
|
|
790
800
|
Mt.displayName = Pa.displayName;
|
|
791
|
-
const lr =
|
|
801
|
+
const lr = A.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
792
802
|
Ta,
|
|
793
803
|
{
|
|
794
804
|
ref: n,
|
|
@@ -797,7 +807,7 @@ const lr = L.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
797
807
|
}
|
|
798
808
|
));
|
|
799
809
|
lr.displayName = Ta.displayName;
|
|
800
|
-
const
|
|
810
|
+
const Lt = A.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
801
811
|
_a,
|
|
802
812
|
{
|
|
803
813
|
ref: n,
|
|
@@ -808,37 +818,37 @@ const At = L.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
|
|
|
808
818
|
...a
|
|
809
819
|
}
|
|
810
820
|
));
|
|
811
|
-
|
|
821
|
+
Lt.displayName = _a.displayName;
|
|
812
822
|
function dr({
|
|
813
823
|
open: t,
|
|
814
824
|
onOpenChange: a,
|
|
815
825
|
group: n,
|
|
816
826
|
onUpdate: s
|
|
817
827
|
}) {
|
|
818
|
-
const [i, u] = N("members"), [l, p] = N(""), [g, v] = N([]), [m, f] = N([]), { data: h, isLoading: d, refetch: r } =
|
|
828
|
+
const [i, u] = N("members"), [l, p] = N(""), [g, v] = N([]), [m, f] = N([]), { data: h, isLoading: d, refetch: r } = ks(n.id), b = n.type === "TENANT_GROUP" ? "tenant" : "organization", { users: D, isLoading: S } = Os({
|
|
819
829
|
type: b,
|
|
820
830
|
tenantId: n.tenantId || void 0,
|
|
821
831
|
active: !0,
|
|
822
832
|
limit: 100
|
|
823
|
-
}), C = Xn(), E = Zn(),
|
|
833
|
+
}), C = Xn(), E = Zn(), k = (h == null ? void 0 : h.members) || [], I = F(() => new Set(k.map((y) => y.userId)), [k]), V = F(() => D.filter((y) => !I.has(y.id)), [D, I]), q = F(() => {
|
|
824
834
|
if (!l) return V;
|
|
825
835
|
const y = l.toLowerCase();
|
|
826
836
|
return V.filter(
|
|
827
|
-
(
|
|
837
|
+
(O) => {
|
|
828
838
|
var G, H;
|
|
829
|
-
return ((G =
|
|
839
|
+
return ((G = O.name) == null ? void 0 : G.toLowerCase().includes(y)) || ((H = O.email) == null ? void 0 : H.toLowerCase().includes(y));
|
|
830
840
|
}
|
|
831
841
|
);
|
|
832
842
|
}, [V, l]), x = F(() => {
|
|
833
|
-
if (!l) return
|
|
843
|
+
if (!l) return k;
|
|
834
844
|
const y = l.toLowerCase();
|
|
835
|
-
return
|
|
836
|
-
(
|
|
845
|
+
return k.filter(
|
|
846
|
+
(O) => {
|
|
837
847
|
var G, H, me, te;
|
|
838
|
-
return ((H = (G =
|
|
848
|
+
return ((H = (G = O.user) == null ? void 0 : G.name) == null ? void 0 : H.toLowerCase().includes(y)) || ((te = (me = O.user) == null ? void 0 : me.email) == null ? void 0 : te.toLowerCase().includes(y));
|
|
839
849
|
}
|
|
840
850
|
);
|
|
841
|
-
}, [
|
|
851
|
+
}, [k, l]), B = async () => {
|
|
842
852
|
if (g.length !== 0)
|
|
843
853
|
try {
|
|
844
854
|
await C.mutateAsync({
|
|
@@ -865,20 +875,20 @@ function dr({
|
|
|
865
875
|
}
|
|
866
876
|
}, Z = (y) => {
|
|
867
877
|
v(
|
|
868
|
-
(
|
|
878
|
+
(O) => O.includes(y) ? O.filter((G) => G !== y) : [...O, y]
|
|
869
879
|
);
|
|
870
880
|
}, ee = (y) => {
|
|
871
881
|
f(
|
|
872
|
-
(
|
|
882
|
+
(O) => O.includes(y) ? O.filter((G) => G !== y) : [...O, y]
|
|
873
883
|
);
|
|
874
884
|
};
|
|
875
885
|
return /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(Ge, { open: t, onOpenChange: a, children: /* @__PURE__ */ c($e, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
|
|
876
886
|
/* @__PURE__ */ c(Ve, { children: [
|
|
877
|
-
/* @__PURE__ */ e(
|
|
887
|
+
/* @__PURE__ */ e(qe, { children: n.name }),
|
|
878
888
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ c("p", { className: "text-sm text-muted-foreground", children: [
|
|
879
|
-
|
|
889
|
+
k.length,
|
|
880
890
|
" ",
|
|
881
|
-
|
|
891
|
+
k.length === 1 ? "member" : "members"
|
|
882
892
|
] }) }),
|
|
883
893
|
/* @__PURE__ */ c("p", { id: "group-members-description", className: "sr-only", children: [
|
|
884
894
|
"Add or remove members from the ",
|
|
@@ -927,7 +937,7 @@ function dr({
|
|
|
927
937
|
" selected"
|
|
928
938
|
] }),
|
|
929
939
|
/* @__PURE__ */ e(
|
|
930
|
-
|
|
940
|
+
L,
|
|
931
941
|
{
|
|
932
942
|
variant: "destructive",
|
|
933
943
|
size: "sm",
|
|
@@ -957,11 +967,11 @@ function dr({
|
|
|
957
967
|
}
|
|
958
968
|
)
|
|
959
969
|
] }),
|
|
960
|
-
/* @__PURE__ */ e(mt, { className: "h-[300px]", children:
|
|
970
|
+
/* @__PURE__ */ e(mt, { className: "h-[300px]", children: S ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((y) => /* @__PURE__ */ e(ft, { className: "h-16 w-full" }, y)) }) : q.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
961
971
|
/* @__PURE__ */ e(bt, { className: "h-12 w-12 mb-3 opacity-50" }),
|
|
962
972
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
|
|
963
973
|
/* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "All eligible users are already members" })
|
|
964
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children:
|
|
974
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: q.map((y) => /* @__PURE__ */ e(
|
|
965
975
|
mr,
|
|
966
976
|
{
|
|
967
977
|
user: y,
|
|
@@ -978,7 +988,7 @@ function dr({
|
|
|
978
988
|
" selected"
|
|
979
989
|
] }),
|
|
980
990
|
/* @__PURE__ */ e(
|
|
981
|
-
|
|
991
|
+
L,
|
|
982
992
|
{
|
|
983
993
|
onClick: B,
|
|
984
994
|
disabled: C.isPending,
|
|
@@ -1010,7 +1020,7 @@ function ur({
|
|
|
1010
1020
|
onClick: n,
|
|
1011
1021
|
children: [
|
|
1012
1022
|
/* @__PURE__ */ e(ba, { checked: a }),
|
|
1013
|
-
/* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(
|
|
1023
|
+
/* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(Lt, { className: "text-xs", children: s }) }),
|
|
1014
1024
|
/* @__PURE__ */ c("div", { className: "flex-1", children: [
|
|
1015
1025
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((l = t.user) == null ? void 0 : l.name) || "Unknown User" }),
|
|
1016
1026
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (p = t.user) == null ? void 0 : p.email })
|
|
@@ -1033,7 +1043,7 @@ function mr({
|
|
|
1033
1043
|
onClick: n,
|
|
1034
1044
|
children: [
|
|
1035
1045
|
/* @__PURE__ */ e(ba, { checked: a }),
|
|
1036
|
-
/* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(
|
|
1046
|
+
/* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(Lt, { className: "text-xs", children: s }) }),
|
|
1037
1047
|
/* @__PURE__ */ c("div", { className: "flex-1", children: [
|
|
1038
1048
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium", children: t.name }),
|
|
1039
1049
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: t.email })
|
|
@@ -1046,11 +1056,11 @@ function hr({
|
|
|
1046
1056
|
open: t,
|
|
1047
1057
|
onOpenChange: a
|
|
1048
1058
|
}) {
|
|
1049
|
-
const [n, s] = N("groups"), [i, u] = N(""), [l, p] = N(null), [g, v] = N(!1), [m, f] = N(null), { tokenProps: h } =
|
|
1059
|
+
const [n, s] = N("groups"), [i, u] = N(""), [l, p] = N(null), [g, v] = N(!1), [m, f] = N(null), { tokenProps: h } = K(), { currentUser: d } = Dt(), r = Yn(), b = (d == null ? void 0 : d.type) === "tenant", D = h == null ? void 0 : h.tenantId, { groups: S, isLoading: C, refetch: E } = Ps({
|
|
1050
1060
|
type: b ? "TENANT_GROUP" : "all",
|
|
1051
1061
|
tenantId: b ? D : void 0,
|
|
1052
1062
|
includeMembers: !1
|
|
1053
|
-
}),
|
|
1063
|
+
}), k = S.filter(
|
|
1054
1064
|
(x) => {
|
|
1055
1065
|
var B;
|
|
1056
1066
|
return x.name.toLowerCase().includes(i.toLowerCase()) || ((B = x.description) == null ? void 0 : B.toLowerCase().includes(i.toLowerCase()));
|
|
@@ -1064,14 +1074,14 @@ function hr({
|
|
|
1064
1074
|
}
|
|
1065
1075
|
}, V = (x) => {
|
|
1066
1076
|
p(x), v(!0);
|
|
1067
|
-
},
|
|
1077
|
+
}, q = () => {
|
|
1068
1078
|
s("groups"), E();
|
|
1069
1079
|
};
|
|
1070
1080
|
return /* @__PURE__ */ c(T, { children: [
|
|
1071
1081
|
/* @__PURE__ */ e(Ge, { open: t, onOpenChange: a, children: /* @__PURE__ */ c($e, { className: "max-h-[80vh] max-w-3xl rounded-[6px] border-border/60 sm:rounded-[6px]", children: [
|
|
1072
1082
|
/* @__PURE__ */ c(Ve, { children: [
|
|
1073
|
-
/* @__PURE__ */ e(
|
|
1074
|
-
/* @__PURE__ */ e(
|
|
1083
|
+
/* @__PURE__ */ e(qe, { className: "text-[15px]", children: "Group management" }),
|
|
1084
|
+
/* @__PURE__ */ e(St, { className: "text-[13px] leading-5", children: "Manage groups, create new ones, and control membership." })
|
|
1075
1085
|
] }),
|
|
1076
1086
|
/* @__PURE__ */ c(
|
|
1077
1087
|
ma,
|
|
@@ -1118,10 +1128,10 @@ function hr({
|
|
|
1118
1128
|
className: "h-16 w-full rounded-[6px]"
|
|
1119
1129
|
},
|
|
1120
1130
|
x
|
|
1121
|
-
)) }) :
|
|
1131
|
+
)) }) : k.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
|
|
1122
1132
|
/* @__PURE__ */ e("p", { className: "text-[13px]", children: "No groups found." }),
|
|
1123
1133
|
/* @__PURE__ */ e("p", { className: "mt-1 text-[12px]", children: i ? "Try a different search." : "Create your first group to get started." })
|
|
1124
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-2 pr-2", children:
|
|
1134
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-2 pr-2", children: k.map((x) => /* @__PURE__ */ e(
|
|
1125
1135
|
pr,
|
|
1126
1136
|
{
|
|
1127
1137
|
group: x,
|
|
@@ -1135,7 +1145,7 @@ function hr({
|
|
|
1135
1145
|
/* @__PURE__ */ e(Ue, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
|
|
1136
1146
|
er,
|
|
1137
1147
|
{
|
|
1138
|
-
onSuccess:
|
|
1148
|
+
onSuccess: q,
|
|
1139
1149
|
tenantId: D,
|
|
1140
1150
|
isTenantUser: b
|
|
1141
1151
|
}
|
|
@@ -1160,8 +1170,8 @@ function hr({
|
|
|
1160
1170
|
onOpenChange: () => f(null),
|
|
1161
1171
|
children: /* @__PURE__ */ c(xa, { children: [
|
|
1162
1172
|
/* @__PURE__ */ c(Na, { children: [
|
|
1163
|
-
/* @__PURE__ */ e(
|
|
1164
|
-
/* @__PURE__ */ c(
|
|
1173
|
+
/* @__PURE__ */ e(wa, { children: "Delete group" }),
|
|
1174
|
+
/* @__PURE__ */ c(Sa, { children: [
|
|
1165
1175
|
'Delete "',
|
|
1166
1176
|
m == null ? void 0 : m.name,
|
|
1167
1177
|
`"? This removes all members and can't be undone.`
|
|
@@ -1207,13 +1217,13 @@ function pr({
|
|
|
1207
1217
|
] }),
|
|
1208
1218
|
/* @__PURE__ */ c("span", { children: [
|
|
1209
1219
|
"Created ",
|
|
1210
|
-
|
|
1220
|
+
Nn(new Date(t.createdAt), "MMM d, yyyy")
|
|
1211
1221
|
] })
|
|
1212
1222
|
] })
|
|
1213
1223
|
] }),
|
|
1214
1224
|
/* @__PURE__ */ c("div", { className: "flex shrink-0 items-center gap-0.5", children: [
|
|
1215
1225
|
/* @__PURE__ */ e(
|
|
1216
|
-
|
|
1226
|
+
L,
|
|
1217
1227
|
{
|
|
1218
1228
|
variant: "ghost",
|
|
1219
1229
|
size: "xs",
|
|
@@ -1225,7 +1235,7 @@ function pr({
|
|
|
1225
1235
|
}
|
|
1226
1236
|
),
|
|
1227
1237
|
i && /* @__PURE__ */ e(
|
|
1228
|
-
|
|
1238
|
+
L,
|
|
1229
1239
|
{
|
|
1230
1240
|
variant: "ghost",
|
|
1231
1241
|
size: "xs",
|
|
@@ -1353,7 +1363,7 @@ function vr({
|
|
|
1353
1363
|
onOpenChange: a,
|
|
1354
1364
|
initialMode: n = "manage"
|
|
1355
1365
|
}) {
|
|
1356
|
-
var
|
|
1366
|
+
var q;
|
|
1357
1367
|
const s = n === "create", {
|
|
1358
1368
|
forceClose: i,
|
|
1359
1369
|
handleOpenChange: u,
|
|
@@ -1361,12 +1371,12 @@ function vr({
|
|
|
1361
1371
|
preventPassiveDismissDuringCreate: p,
|
|
1362
1372
|
resolvedOpen: g,
|
|
1363
1373
|
setIsCreateFlowActive: v
|
|
1364
|
-
} =
|
|
1374
|
+
} = Cn({
|
|
1365
1375
|
open: t,
|
|
1366
1376
|
onOpenChange: a,
|
|
1367
1377
|
initialCreateFlowActive: n === "create",
|
|
1368
1378
|
dismissMode: "explicit-only"
|
|
1369
|
-
}), m =
|
|
1379
|
+
}), m = w((x) => x.dashboard), f = w((x) => x.selectedSheetId), { setDashboardInputs: h } = wt(), d = (q = m.sheets) == null ? void 0 : q.find(
|
|
1370
1380
|
(x) => x.id === f
|
|
1371
1381
|
), r = (d == null ? void 0 : d.kind) === "document" && !!d.document, b = F(
|
|
1372
1382
|
() => r && (d != null && d.document) ? Ts(m, d.id) : [],
|
|
@@ -1376,16 +1386,16 @@ function vr({
|
|
|
1376
1386
|
(x) => x.kind === "control"
|
|
1377
1387
|
),
|
|
1378
1388
|
[b]
|
|
1379
|
-
),
|
|
1389
|
+
), S = F(
|
|
1380
1390
|
() => D.map((x) => x.control),
|
|
1381
1391
|
[D]
|
|
1382
1392
|
), C = F(
|
|
1383
|
-
() => yr(
|
|
1384
|
-
[
|
|
1393
|
+
() => yr(S),
|
|
1394
|
+
[S]
|
|
1385
1395
|
), E = F(
|
|
1386
1396
|
() => br(m),
|
|
1387
1397
|
[m]
|
|
1388
|
-
),
|
|
1398
|
+
), k = Fe(() => {
|
|
1389
1399
|
if (s) {
|
|
1390
1400
|
i();
|
|
1391
1401
|
return;
|
|
@@ -1420,9 +1430,9 @@ function vr({
|
|
|
1420
1430
|
onPointerDownOutside: p,
|
|
1421
1431
|
children: [
|
|
1422
1432
|
/* @__PURE__ */ c(Ve, { className: l ? "space-y-0" : void 0, children: [
|
|
1423
|
-
/* @__PURE__ */ e(
|
|
1433
|
+
/* @__PURE__ */ e(qe, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
|
|
1424
1434
|
/* @__PURE__ */ e(
|
|
1425
|
-
|
|
1435
|
+
St,
|
|
1426
1436
|
{
|
|
1427
1437
|
className: l ? "sr-only" : "text-[13px]",
|
|
1428
1438
|
children: l ? "Configure and add a document-local control input." : "Add document-local control inputs. They are stored on this document sheet and are not dashboard controls."
|
|
@@ -1430,10 +1440,10 @@ function vr({
|
|
|
1430
1440
|
)
|
|
1431
1441
|
] }),
|
|
1432
1442
|
/* @__PURE__ */ e("div", { className: "min-h-0 overflow-y-auto pr-1", children: /* @__PURE__ */ e(
|
|
1433
|
-
|
|
1443
|
+
En,
|
|
1434
1444
|
{
|
|
1435
1445
|
scope: "dashboard",
|
|
1436
|
-
controls:
|
|
1446
|
+
controls: S,
|
|
1437
1447
|
reservedControlIds: E,
|
|
1438
1448
|
defaultValues: C,
|
|
1439
1449
|
usageByControlId: {},
|
|
@@ -1444,7 +1454,7 @@ function vr({
|
|
|
1444
1454
|
allowedControlTypes: gr,
|
|
1445
1455
|
initialCreateFlow: n === "create",
|
|
1446
1456
|
onCreateFlowActiveChange: v,
|
|
1447
|
-
onCreateFlowComplete:
|
|
1457
|
+
onCreateFlowComplete: k,
|
|
1448
1458
|
onChange: I,
|
|
1449
1459
|
emptyMessage: "No document controls yet."
|
|
1450
1460
|
}
|
|
@@ -1528,41 +1538,41 @@ function la(t, a) {
|
|
|
1528
1538
|
}
|
|
1529
1539
|
function Rr() {
|
|
1530
1540
|
var Qt, Wt, Jt, Yt, Xt, Zt;
|
|
1531
|
-
|
|
1541
|
+
hn(), pn();
|
|
1532
1542
|
const {
|
|
1533
1543
|
authToken: t,
|
|
1534
1544
|
tokenProps: a,
|
|
1535
1545
|
id: n
|
|
1536
|
-
} =
|
|
1546
|
+
} = K(), { isLocalDev: s } = Fs(), { openBrandStudioPreview: i } = Rs(), { permissions: u } = Hn(), l = Gs(), { isLoading: p } = $s(), g = w((o) => o.theme), v = w((o) => o.isDownloadingPdf), m = w(
|
|
1537
1547
|
(o) => o.dashboardAssistantDraftScopeKey
|
|
1538
|
-
), f =
|
|
1548
|
+
), f = w((o) => o.lenses), h = w((o) => o.selectedLensId), d = f == null ? void 0 : f.find((o) => o.id === h), r = w((o) => o.dashboard), b = w((o) => o.selectedSheetId), D = (Qt = r == null ? void 0 : r.sheets) == null ? void 0 : Qt.find(
|
|
1539
1549
|
(o) => o.id === b
|
|
1540
|
-
),
|
|
1550
|
+
), S = ms(D), C = S ? (Wt = D == null ? void 0 : D.document) == null ? void 0 : Wt.page : void 0, E = w(
|
|
1541
1551
|
(o) => o.isDashboardEditing
|
|
1542
|
-
), { setDashboardTitle:
|
|
1552
|
+
), { setDashboardTitle: k } = w((o) => o.actions), [I, V] = N(!1), [q, x] = N(!1), [B, W] = N(!1), [Z, ee] = N(!1), [y, O] = N(!1), [G, H] = N(!1), [me, te] = N(!1), [Ua, At] = N(!1), [He, he] = N(null), [Fa, pe] = N(!1), [fe, ge] = N(null), [kt, ve] = N([]), [Ot, be] = N(!1), Ra = w((o) => o.isDashboardPanelOpen), Ga = w(
|
|
1543
1553
|
(o) => o.actions.setIsDashboardPanelOpen
|
|
1544
|
-
), $a =
|
|
1554
|
+
), $a = w((o) => o.filterValues), _ = w((o) => o.isVisualEditing);
|
|
1545
1555
|
ta((o) => o.card);
|
|
1546
|
-
const ae =
|
|
1556
|
+
const ae = Oe(
|
|
1547
1557
|
(o) => o.selectedDashboard
|
|
1548
|
-
), ye =
|
|
1558
|
+
), ye = Oe(
|
|
1549
1559
|
(o) => o.initialDashboard
|
|
1550
1560
|
);
|
|
1551
|
-
|
|
1552
|
-
const xe = ae ? (Yt = ae == null ? void 0 : ae.permissions) == null ? void 0 : Yt.canEdit : (Jt = ye == null ? void 0 : ye.permissions) == null ? void 0 : Jt.canEdit, Ne =
|
|
1561
|
+
Oe((o) => o.selectedVisual), w((o) => o.selectedFrameId), ta((o) => o.frame);
|
|
1562
|
+
const xe = ae ? (Yt = ae == null ? void 0 : ae.permissions) == null ? void 0 : Yt.canEdit : (Jt = ye == null ? void 0 : ye.permissions) == null ? void 0 : Jt.canEdit, Ne = w((o) => o.showFilters), Pt = Vs((o) => o.setPanelOpen), Tt = w(
|
|
1553
1563
|
(o) => o.showDashboardJSON
|
|
1554
|
-
), je =
|
|
1564
|
+
), je = w((o) => o.onSaveFunction), _t = w(
|
|
1555
1565
|
(o) => o.actions.setShowFilters
|
|
1556
1566
|
), {
|
|
1557
1567
|
setDocumentInspectorTab: Ut,
|
|
1558
1568
|
setIsDashboardEditing: Ft,
|
|
1559
1569
|
setShowDashboardJSON: Rt
|
|
1560
|
-
} =
|
|
1570
|
+
} = w((o) => o.actions), { setInitialDashboard: Gt, clearSelectedDashboard: Ke } = Oe(
|
|
1561
1571
|
(o) => o.actions
|
|
1562
|
-
), { resources:
|
|
1572
|
+
), { resources: we } = qs(nt.DASHBOARD), { data: Qe } = zs(), Va = ((Xt = Qe == null ? void 0 : Qe.preference) == null ? void 0 : Xt.defaultDashboardId) || null, { mutate: qa, isPending: za } = Bs(), { currentUser: Ba } = Dt(), Ha = Hs(Ba), J = ae || ye, $t = J ? {
|
|
1563
1573
|
id: J.id,
|
|
1564
1574
|
title: (r == null ? void 0 : r.title) || J.title || "Dashboard"
|
|
1565
|
-
} : null, { handleAddNewFrame: ja } = js(), [We, Je] = N(!1), [Ka, se] = N(!1), [Ye,
|
|
1575
|
+
} : null, { handleAddNewFrame: ja } = js(), [We, Je] = N(!1), [Ka, se] = N(!1), [Ye, Se] = N("close"), ne = Ks(nt.DASHBOARD), [R, De] = N(null), Vt = Fe((o) => {
|
|
1566
1576
|
window.setTimeout(() => {
|
|
1567
1577
|
he(o);
|
|
1568
1578
|
}, 0);
|
|
@@ -1584,28 +1594,28 @@ function Rr() {
|
|
|
1584
1594
|
onSuccess: () => {
|
|
1585
1595
|
console.log("Dashboard title updated successfully"), M.success("Dashboard title updated");
|
|
1586
1596
|
},
|
|
1587
|
-
onError: (
|
|
1588
|
-
console.error("Failed to update dashboard title:",
|
|
1597
|
+
onError: (z) => {
|
|
1598
|
+
console.error("Failed to update dashboard title:", z), M.error("Failed to update dashboard title"), k(P);
|
|
1589
1599
|
}
|
|
1590
1600
|
}
|
|
1591
1601
|
);
|
|
1592
1602
|
};
|
|
1593
1603
|
ot(() => {
|
|
1594
|
-
if (
|
|
1604
|
+
if (we && we.length > 0) {
|
|
1595
1605
|
const o = r == null ? void 0 : r.id;
|
|
1596
1606
|
if (o) {
|
|
1597
|
-
const P =
|
|
1598
|
-
(
|
|
1607
|
+
const P = we.find(
|
|
1608
|
+
(z) => z.id === o
|
|
1599
1609
|
);
|
|
1600
1610
|
P && Gt(P);
|
|
1601
1611
|
}
|
|
1602
1612
|
}
|
|
1603
|
-
}, [
|
|
1613
|
+
}, [we, r == null ? void 0 : r.id, Gt]);
|
|
1604
1614
|
const re = a.orgUserId || a.tenantId, Xe = F(
|
|
1605
|
-
() =>
|
|
1615
|
+
() => wr({
|
|
1606
1616
|
accessToken: t == null ? void 0 : t.accessToken,
|
|
1607
1617
|
dashboardId: (r == null ? void 0 : r.id) || n || a.dashboard_id,
|
|
1608
|
-
selectedSheetId:
|
|
1618
|
+
selectedSheetId: S ? b : void 0,
|
|
1609
1619
|
pageSize: C == null ? void 0 : C.size,
|
|
1610
1620
|
orientation: C == null ? void 0 : C.orientation,
|
|
1611
1621
|
theme: g
|
|
@@ -1614,14 +1624,14 @@ function Rr() {
|
|
|
1614
1624
|
t == null ? void 0 : t.accessToken,
|
|
1615
1625
|
n,
|
|
1616
1626
|
r == null ? void 0 : r.id,
|
|
1617
|
-
|
|
1627
|
+
S,
|
|
1618
1628
|
C == null ? void 0 : C.orientation,
|
|
1619
1629
|
C == null ? void 0 : C.size,
|
|
1620
1630
|
b,
|
|
1621
1631
|
g,
|
|
1622
1632
|
a.dashboard_id
|
|
1623
1633
|
]
|
|
1624
|
-
),
|
|
1634
|
+
), qt = E && !_ && re && xe, { setDashboard: Ze } = w((o) => o.actions), et = w(
|
|
1625
1635
|
(o) => o.semanticExecutionPayload
|
|
1626
1636
|
), Wa = () => {
|
|
1627
1637
|
Ft(!0);
|
|
@@ -1646,14 +1656,14 @@ function Rr() {
|
|
|
1646
1656
|
p,
|
|
1647
1657
|
et
|
|
1648
1658
|
]);
|
|
1649
|
-
const Ce = (R == null ? void 0 : R.dashboard) ?? null, { isDirty:
|
|
1659
|
+
const Ce = (R == null ? void 0 : R.dashboard) ?? null, { isDirty: zt, isDirtyPending: Ja, resetDirty: Ee } = Dn(
|
|
1650
1660
|
r,
|
|
1651
1661
|
Ce,
|
|
1652
1662
|
300,
|
|
1653
1663
|
1e3,
|
|
1654
1664
|
it
|
|
1655
|
-
), Bt = Fe(() => Ce ? it(r) !== it(Ce) : !1, [r, Ce]), Ht =
|
|
1656
|
-
Bt() ? (
|
|
1665
|
+
), Bt = Fe(() => Ce ? it(r) !== it(Ce) : !1, [r, Ce]), Ht = zt || Ja, Ie = We || ne.isPending, Ya = () => {
|
|
1666
|
+
Bt() ? (Se("close"), se(!0)) : (tt(), Ee());
|
|
1657
1667
|
}, Xa = async () => {
|
|
1658
1668
|
await at({
|
|
1659
1669
|
closeAfterSave: !0,
|
|
@@ -1662,24 +1672,24 @@ function Rr() {
|
|
|
1662
1672
|
}, Za = () => {
|
|
1663
1673
|
R && Ze(R.dashboard, {
|
|
1664
1674
|
semanticExecutionPayload: R.semanticExecutionPayload
|
|
1665
|
-
}), tt(), Ye === "home" && Ke(),
|
|
1675
|
+
}), tt(), Ye === "home" && Ke(), Se("close"), se(!1), Ee();
|
|
1666
1676
|
}, es = () => {
|
|
1667
1677
|
R && (Ze(R.dashboard, {
|
|
1668
1678
|
semanticExecutionPayload: R.semanticExecutionPayload
|
|
1669
1679
|
}), Ee());
|
|
1670
1680
|
}, ts = () => {
|
|
1671
1681
|
if (E && Bt()) {
|
|
1672
|
-
|
|
1682
|
+
Se("home"), se(!0);
|
|
1673
1683
|
return;
|
|
1674
1684
|
}
|
|
1675
1685
|
Ke();
|
|
1676
1686
|
};
|
|
1677
1687
|
async function at(o) {
|
|
1678
|
-
const P =
|
|
1688
|
+
const P = w.getState().dashboard;
|
|
1679
1689
|
if (!P)
|
|
1680
1690
|
return;
|
|
1681
|
-
const
|
|
1682
|
-
be(
|
|
1691
|
+
const z = (o == null ? void 0 : o.closeAfterSave) ?? Ot, os = (o == null ? void 0 : o.navigateHomeAfterSave) ?? !1;
|
|
1692
|
+
be(z), z && se(!1);
|
|
1683
1693
|
const is = vt(P);
|
|
1684
1694
|
pe(!0), ge(null), ve([]), Je(!0);
|
|
1685
1695
|
const cs = {
|
|
@@ -1692,31 +1702,31 @@ function Rr() {
|
|
|
1692
1702
|
},
|
|
1693
1703
|
{
|
|
1694
1704
|
onSuccess: (U) => {
|
|
1695
|
-
var
|
|
1696
|
-
const
|
|
1697
|
-
if (!P.id &&
|
|
1698
|
-
const st = bs.getState(),
|
|
1699
|
-
(
|
|
1700
|
-
|
|
1701
|
-
) :
|
|
1705
|
+
var Le, Ae, ea;
|
|
1706
|
+
const Q = (U == null ? void 0 : U.id) || ((Le = U == null ? void 0 : U.dashboard) == null ? void 0 : Le.id) || ((Ae = U == null ? void 0 : U.resource) == null ? void 0 : Ae.id) || ((ea = U == null ? void 0 : U.template) == null ? void 0 : ea.id) || null;
|
|
1707
|
+
if (!P.id && Q) {
|
|
1708
|
+
const st = bs.getState(), ke = st.pendingDashboardDraftMigration;
|
|
1709
|
+
(ke == null ? void 0 : ke.scopeKey) === m ? st.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
|
|
1710
|
+
Q
|
|
1711
|
+
) : ke && st.actions.clearPendingDashboardDraftMigration();
|
|
1702
1712
|
}
|
|
1703
1713
|
Je(!1), M.success("Dashboard saved!"), De(
|
|
1704
1714
|
la(
|
|
1705
1715
|
is,
|
|
1706
|
-
|
|
1716
|
+
w.getState().semanticExecutionPayload
|
|
1707
1717
|
)
|
|
1708
|
-
), pe(!1), be(!1),
|
|
1718
|
+
), pe(!1), be(!1), z && (tt(), Ee(), os && Ke()), Se("close");
|
|
1709
1719
|
},
|
|
1710
1720
|
onError: (U) => {
|
|
1711
1721
|
Je(!1), ge("Failed to save dashboard. Please try again.");
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1714
|
-
) ? (
|
|
1715
|
-
(
|
|
1722
|
+
const Q = U.details, Le = Array.isArray(
|
|
1723
|
+
Q == null ? void 0 : Q.errors
|
|
1724
|
+
) ? (Q.errors || []).filter(
|
|
1725
|
+
(Ae) => typeof Ae == "string"
|
|
1716
1726
|
) : [];
|
|
1717
1727
|
ve(
|
|
1718
1728
|
fr({
|
|
1719
|
-
errors:
|
|
1729
|
+
errors: Le,
|
|
1720
1730
|
dashboard: P || void 0
|
|
1721
1731
|
})
|
|
1722
1732
|
), M.error("Failed to save dashboard");
|
|
@@ -1726,19 +1736,19 @@ function Rr() {
|
|
|
1726
1736
|
}
|
|
1727
1737
|
async function as() {
|
|
1728
1738
|
if (V(!0), !h || !d) return;
|
|
1729
|
-
const o =
|
|
1739
|
+
const o = w.getState().dashboard;
|
|
1730
1740
|
if (!o) {
|
|
1731
1741
|
V(!1);
|
|
1732
1742
|
return;
|
|
1733
1743
|
}
|
|
1734
|
-
const P = JSON.stringify(o),
|
|
1744
|
+
const P = JSON.stringify(o), z = {
|
|
1735
1745
|
...d,
|
|
1736
1746
|
template: P,
|
|
1737
1747
|
filterValues: $a
|
|
1738
1748
|
};
|
|
1739
1749
|
await xt(
|
|
1740
1750
|
a.apiServiceUrl,
|
|
1741
|
-
|
|
1751
|
+
z,
|
|
1742
1752
|
t == null ? void 0 : t.accessToken
|
|
1743
1753
|
), M.success("Lens saved"), je == null || je(o), V(!1);
|
|
1744
1754
|
}
|
|
@@ -1754,7 +1764,7 @@ function Rr() {
|
|
|
1754
1764
|
!oe && Z && ee(!1);
|
|
1755
1765
|
}, [oe, Z]);
|
|
1756
1766
|
const ns = l, ie = (r == null ? void 0 : r.id) || null, Me = !!ie && Va === ie, rs = () => {
|
|
1757
|
-
ie &&
|
|
1767
|
+
ie && qa({
|
|
1758
1768
|
dashboardId: Me ? null : ie
|
|
1759
1769
|
});
|
|
1760
1770
|
};
|
|
@@ -1776,7 +1786,7 @@ function Rr() {
|
|
|
1776
1786
|
},
|
|
1777
1787
|
className: "h-7 w-7 px-0",
|
|
1778
1788
|
buttonProps: { size: "xs" },
|
|
1779
|
-
children: /* @__PURE__ */ e(
|
|
1789
|
+
children: /* @__PURE__ */ e(An, { className: "h-3.5 w-3.5" })
|
|
1780
1790
|
}
|
|
1781
1791
|
),
|
|
1782
1792
|
ns && !_ && /* @__PURE__ */ e(
|
|
@@ -1811,7 +1821,7 @@ function Rr() {
|
|
|
1811
1821
|
dashboardId: r == null ? void 0 : r.id
|
|
1812
1822
|
});
|
|
1813
1823
|
const P = (r == null ? void 0 : r.title) || "";
|
|
1814
|
-
|
|
1824
|
+
k(o), Qa(o, P);
|
|
1815
1825
|
},
|
|
1816
1826
|
isEditable: xe && !d,
|
|
1817
1827
|
displayClassName: "text-[13px] font-medium",
|
|
@@ -1822,12 +1832,12 @@ function Rr() {
|
|
|
1822
1832
|
),
|
|
1823
1833
|
ss && ie && /* @__PURE__ */ e(hs, { children: /* @__PURE__ */ c(ps, { children: [
|
|
1824
1834
|
/* @__PURE__ */ e(fs, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1825
|
-
|
|
1835
|
+
L,
|
|
1826
1836
|
{
|
|
1827
1837
|
variant: "ghost",
|
|
1828
1838
|
size: "xs",
|
|
1829
1839
|
onClick: rs,
|
|
1830
|
-
disabled:
|
|
1840
|
+
disabled: za || !(t != null && t.accessToken) || !(a != null && a.apiServiceUrl),
|
|
1831
1841
|
className: "w-7 px-0",
|
|
1832
1842
|
"aria-label": Me ? "Remove as default dashboard" : "Make this a default dashboard",
|
|
1833
1843
|
children: /* @__PURE__ */ e(
|
|
@@ -1847,11 +1857,11 @@ function Rr() {
|
|
|
1847
1857
|
] }),
|
|
1848
1858
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
|
|
1849
1859
|
_ && /* @__PURE__ */ c(T, { children: [
|
|
1850
|
-
/* @__PURE__ */ e(
|
|
1851
|
-
/* @__PURE__ */ e(
|
|
1860
|
+
/* @__PURE__ */ e(fn, {}),
|
|
1861
|
+
/* @__PURE__ */ e(gn, {})
|
|
1852
1862
|
] }),
|
|
1853
1863
|
!_ && l && ((Zt = J == null ? void 0 : J.permissions) == null ? void 0 : Zt.canShare) && /* @__PURE__ */ c(
|
|
1854
|
-
|
|
1864
|
+
L,
|
|
1855
1865
|
{
|
|
1856
1866
|
variant: "outline",
|
|
1857
1867
|
size: "xs",
|
|
@@ -1863,18 +1873,18 @@ function Rr() {
|
|
|
1863
1873
|
}
|
|
1864
1874
|
),
|
|
1865
1875
|
!_ && E && u.canUseFilters && l && /* @__PURE__ */ e(
|
|
1866
|
-
|
|
1876
|
+
vn,
|
|
1867
1877
|
{
|
|
1868
|
-
showFilters:
|
|
1878
|
+
showFilters: S ? !1 : Ne,
|
|
1869
1879
|
onToggleFilters: () => {
|
|
1870
|
-
if (
|
|
1880
|
+
if (S && b) {
|
|
1871
1881
|
Ut(b, "inputs");
|
|
1872
1882
|
return;
|
|
1873
1883
|
}
|
|
1874
1884
|
Ne || Pt("dashboard", !1), _t(!Ne);
|
|
1875
1885
|
},
|
|
1876
1886
|
onAddFilter: () => {
|
|
1877
|
-
if (
|
|
1887
|
+
if (S && b) {
|
|
1878
1888
|
Ut(b, "inputs");
|
|
1879
1889
|
return;
|
|
1880
1890
|
}
|
|
@@ -1886,7 +1896,7 @@ function Rr() {
|
|
|
1886
1896
|
onManageControls: () => Vt("manage")
|
|
1887
1897
|
}
|
|
1888
1898
|
),
|
|
1889
|
-
E && !_ && l && He ?
|
|
1899
|
+
E && !_ && l && He ? S ? /* @__PURE__ */ e(
|
|
1890
1900
|
vr,
|
|
1891
1901
|
{
|
|
1892
1902
|
open: !0,
|
|
@@ -1896,7 +1906,7 @@ function Rr() {
|
|
|
1896
1906
|
initialMode: He
|
|
1897
1907
|
}
|
|
1898
1908
|
) : /* @__PURE__ */ e(
|
|
1899
|
-
|
|
1909
|
+
bn,
|
|
1900
1910
|
{
|
|
1901
1911
|
open: !0,
|
|
1902
1912
|
onOpenChange: (o) => {
|
|
@@ -1907,7 +1917,7 @@ function Rr() {
|
|
|
1907
1917
|
}
|
|
1908
1918
|
) : null,
|
|
1909
1919
|
E && !_ && re && d && s && l && /* @__PURE__ */ c(
|
|
1910
|
-
|
|
1920
|
+
L,
|
|
1911
1921
|
{
|
|
1912
1922
|
variant: "secondary",
|
|
1913
1923
|
size: "xs",
|
|
@@ -1919,8 +1929,8 @@ function Rr() {
|
|
|
1919
1929
|
]
|
|
1920
1930
|
}
|
|
1921
1931
|
),
|
|
1922
|
-
E && !_ && l && !
|
|
1923
|
-
|
|
1932
|
+
E && !_ && l && !S && /* @__PURE__ */ c(
|
|
1933
|
+
L,
|
|
1924
1934
|
{
|
|
1925
1935
|
variant: "outline",
|
|
1926
1936
|
size: "xs",
|
|
@@ -1932,25 +1942,25 @@ function Rr() {
|
|
|
1932
1942
|
]
|
|
1933
1943
|
}
|
|
1934
1944
|
),
|
|
1935
|
-
!_ && !E && xe && l && /* @__PURE__ */ c(
|
|
1945
|
+
!_ && !E && xe && l && /* @__PURE__ */ c(L, { size: "xs", onClick: Wa, children: [
|
|
1936
1946
|
/* @__PURE__ */ e(Ys, { className: "h-3.5 w-3.5" }),
|
|
1937
1947
|
"Edit"
|
|
1938
1948
|
] }),
|
|
1939
|
-
|
|
1940
|
-
|
|
1949
|
+
qt && l && zt && /* @__PURE__ */ c(
|
|
1950
|
+
L,
|
|
1941
1951
|
{
|
|
1942
1952
|
variant: "outline",
|
|
1943
1953
|
size: "xs",
|
|
1944
1954
|
onClick: es,
|
|
1945
1955
|
disabled: Ie,
|
|
1946
1956
|
children: [
|
|
1947
|
-
/* @__PURE__ */ e(
|
|
1957
|
+
/* @__PURE__ */ e(_n, { className: "h-3.5 w-3.5" }),
|
|
1948
1958
|
"Undo"
|
|
1949
1959
|
]
|
|
1950
1960
|
}
|
|
1951
1961
|
),
|
|
1952
|
-
|
|
1953
|
-
|
|
1962
|
+
qt && l && /* @__PURE__ */ c(
|
|
1963
|
+
L,
|
|
1954
1964
|
{
|
|
1955
1965
|
size: "xs",
|
|
1956
1966
|
className: Y(!Ht && "opacity-60"),
|
|
@@ -1962,14 +1972,14 @@ function Rr() {
|
|
|
1962
1972
|
]
|
|
1963
1973
|
}
|
|
1964
1974
|
),
|
|
1965
|
-
E && !_ && l && /* @__PURE__ */ c(
|
|
1975
|
+
E && !_ && l && /* @__PURE__ */ c(L, { variant: "outline", size: "xs", onClick: Ya, children: [
|
|
1966
1976
|
/* @__PURE__ */ e(ga, { className: "h-3.5 w-3.5" }),
|
|
1967
1977
|
"Close"
|
|
1968
1978
|
] }),
|
|
1969
|
-
!_ && l && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(
|
|
1979
|
+
!_ && l && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(yn, {}) }),
|
|
1970
1980
|
!_ && s && /* @__PURE__ */ e(Gn, {}),
|
|
1971
|
-
!_ && l && /* @__PURE__ */ c(
|
|
1972
|
-
/* @__PURE__ */ e(
|
|
1981
|
+
!_ && l && /* @__PURE__ */ c(Xs, { children: [
|
|
1982
|
+
/* @__PURE__ */ e(Zs, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1973
1983
|
rt,
|
|
1974
1984
|
{
|
|
1975
1985
|
tooltip: "More Options",
|
|
@@ -1979,11 +1989,11 @@ function Rr() {
|
|
|
1979
1989
|
variant: "ghost",
|
|
1980
1990
|
"aria-label": "More dashboard options"
|
|
1981
1991
|
},
|
|
1982
|
-
children: /* @__PURE__ */ e(
|
|
1992
|
+
children: /* @__PURE__ */ e(en, { className: "h-3.5 w-3.5" })
|
|
1983
1993
|
}
|
|
1984
1994
|
) }),
|
|
1985
1995
|
/* @__PURE__ */ c(
|
|
1986
|
-
|
|
1996
|
+
tn,
|
|
1987
1997
|
{
|
|
1988
1998
|
align: "end",
|
|
1989
1999
|
className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
|
|
@@ -1993,9 +2003,9 @@ function Rr() {
|
|
|
1993
2003
|
$,
|
|
1994
2004
|
{
|
|
1995
2005
|
disabled: v,
|
|
1996
|
-
onSelect: () =>
|
|
2006
|
+
onSelect: () => At(!0),
|
|
1997
2007
|
children: [
|
|
1998
|
-
/* @__PURE__ */ e(
|
|
2008
|
+
/* @__PURE__ */ e(an, { className: "h-3.5 w-3.5" }),
|
|
1999
2009
|
"Export"
|
|
2000
2010
|
]
|
|
2001
2011
|
}
|
|
@@ -2008,7 +2018,7 @@ function Rr() {
|
|
|
2008
2018
|
oe && ee(!0);
|
|
2009
2019
|
},
|
|
2010
2020
|
children: [
|
|
2011
|
-
/* @__PURE__ */ e(
|
|
2021
|
+
/* @__PURE__ */ e(sn, { className: "h-3.5 w-3.5" }),
|
|
2012
2022
|
"Schedule"
|
|
2013
2023
|
]
|
|
2014
2024
|
}
|
|
@@ -2029,12 +2039,12 @@ function Rr() {
|
|
|
2029
2039
|
/* @__PURE__ */ e(Te, {})
|
|
2030
2040
|
] }),
|
|
2031
2041
|
/* @__PURE__ */ e(de, { children: "Preferences" }),
|
|
2032
|
-
/* @__PURE__ */ c($, { onClick: () =>
|
|
2033
|
-
/* @__PURE__ */ e(
|
|
2042
|
+
/* @__PURE__ */ c($, { onClick: () => O(!0), children: [
|
|
2043
|
+
/* @__PURE__ */ e(nn, { className: "h-3.5 w-3.5" }),
|
|
2034
2044
|
"Calendar Preferences"
|
|
2035
2045
|
] }),
|
|
2036
2046
|
/* @__PURE__ */ c($, { onClick: () => H(!0), children: [
|
|
2037
|
-
/* @__PURE__ */ e(
|
|
2047
|
+
/* @__PURE__ */ e(rn, { className: "h-3.5 w-3.5" }),
|
|
2038
2048
|
"Summary Settings"
|
|
2039
2049
|
] }),
|
|
2040
2050
|
s && l && /* @__PURE__ */ c(T, { children: [
|
|
@@ -2055,7 +2065,7 @@ function Rr() {
|
|
|
2055
2065
|
]
|
|
2056
2066
|
}
|
|
2057
2067
|
),
|
|
2058
|
-
|
|
2068
|
+
S && /* @__PURE__ */ c(
|
|
2059
2069
|
$,
|
|
2060
2070
|
{
|
|
2061
2071
|
disabled: !Xe,
|
|
@@ -2088,13 +2098,13 @@ function Rr() {
|
|
|
2088
2098
|
{
|
|
2089
2099
|
onSelect: () => vs(a.apiServiceUrl),
|
|
2090
2100
|
children: [
|
|
2091
|
-
/* @__PURE__ */ e(
|
|
2101
|
+
/* @__PURE__ */ e(Pn, { className: "h-3.5 w-3.5" }),
|
|
2092
2102
|
"Invalidate token"
|
|
2093
2103
|
]
|
|
2094
2104
|
}
|
|
2095
2105
|
),
|
|
2096
2106
|
/* @__PURE__ */ c($, { onSelect: i, children: [
|
|
2097
|
-
/* @__PURE__ */ e(
|
|
2107
|
+
/* @__PURE__ */ e(In, { className: "h-3.5 w-3.5" }),
|
|
2098
2108
|
"Brand Studio"
|
|
2099
2109
|
] }),
|
|
2100
2110
|
E && /* @__PURE__ */ c(
|
|
@@ -2102,7 +2112,7 @@ function Rr() {
|
|
|
2102
2112
|
{
|
|
2103
2113
|
onSelect: () => Rt(!Tt),
|
|
2104
2114
|
children: [
|
|
2105
|
-
/* @__PURE__ */ e(
|
|
2115
|
+
/* @__PURE__ */ e(Mn, { className: "h-3.5 w-3.5" }),
|
|
2106
2116
|
Tt ? "Hide dashboard JSON" : "Show dashboard JSON"
|
|
2107
2117
|
]
|
|
2108
2118
|
}
|
|
@@ -2111,20 +2121,20 @@ function Rr() {
|
|
|
2111
2121
|
/* @__PURE__ */ e(ht, { className: "h-3.5 w-3.5" }),
|
|
2112
2122
|
"Add lens"
|
|
2113
2123
|
] }),
|
|
2114
|
-
re && /* @__PURE__ */ c(
|
|
2115
|
-
/* @__PURE__ */ c(
|
|
2124
|
+
re && /* @__PURE__ */ c(on, { children: [
|
|
2125
|
+
/* @__PURE__ */ c(cn, { children: [
|
|
2116
2126
|
/* @__PURE__ */ e(Ln, { className: "h-3.5 w-3.5" }),
|
|
2117
2127
|
"Lenses"
|
|
2118
2128
|
] }),
|
|
2119
|
-
/* @__PURE__ */ e(
|
|
2129
|
+
/* @__PURE__ */ e(ln, { className: "w-60", children: /* @__PURE__ */ e(Bn, {}) })
|
|
2120
2130
|
] })
|
|
2121
2131
|
] })
|
|
2122
2132
|
]
|
|
2123
2133
|
}
|
|
2124
2134
|
)
|
|
2125
2135
|
] }),
|
|
2126
|
-
|
|
2127
|
-
|
|
2136
|
+
q && $t && /* @__PURE__ */ e(
|
|
2137
|
+
dn,
|
|
2128
2138
|
{
|
|
2129
2139
|
resource: $t,
|
|
2130
2140
|
resourceType: nt.DASHBOARD,
|
|
@@ -2139,7 +2149,7 @@ function Rr() {
|
|
|
2139
2149
|
}
|
|
2140
2150
|
),
|
|
2141
2151
|
oe && (r == null ? void 0 : r.id) && /* @__PURE__ */ e(
|
|
2142
|
-
|
|
2152
|
+
un,
|
|
2143
2153
|
{
|
|
2144
2154
|
open: Z,
|
|
2145
2155
|
onOpenChange: ee,
|
|
@@ -2151,11 +2161,11 @@ function Rr() {
|
|
|
2151
2161
|
wn,
|
|
2152
2162
|
{
|
|
2153
2163
|
open: y,
|
|
2154
|
-
onOpenChange:
|
|
2164
|
+
onOpenChange: O
|
|
2155
2165
|
}
|
|
2156
2166
|
),
|
|
2157
2167
|
/* @__PURE__ */ e(
|
|
2158
|
-
|
|
2168
|
+
Sn,
|
|
2159
2169
|
{
|
|
2160
2170
|
open: G,
|
|
2161
2171
|
onOpenChange: H,
|
|
@@ -2172,12 +2182,12 @@ function Rr() {
|
|
|
2172
2182
|
)
|
|
2173
2183
|
}
|
|
2174
2184
|
),
|
|
2175
|
-
s && re && l && /* @__PURE__ */ e(
|
|
2185
|
+
s && re && l && /* @__PURE__ */ e(zn, { open: me, onOpenChange: te }),
|
|
2176
2186
|
l && /* @__PURE__ */ e(
|
|
2177
|
-
|
|
2187
|
+
mn,
|
|
2178
2188
|
{
|
|
2179
2189
|
open: Ua,
|
|
2180
|
-
onOpenChange:
|
|
2190
|
+
onOpenChange: At
|
|
2181
2191
|
}
|
|
2182
2192
|
),
|
|
2183
2193
|
/* @__PURE__ */ e(
|
|
@@ -2189,11 +2199,11 @@ function Rr() {
|
|
|
2189
2199
|
},
|
|
2190
2200
|
children: /* @__PURE__ */ c(xa, { className: "max-w-sm", children: [
|
|
2191
2201
|
/* @__PURE__ */ c(Na, { children: [
|
|
2192
|
-
/* @__PURE__ */ e(
|
|
2193
|
-
/* @__PURE__ */ e(
|
|
2194
|
-
|
|
2202
|
+
/* @__PURE__ */ e(wa, { children: fe ? "Save failed" : "Saving dashboard" }),
|
|
2203
|
+
/* @__PURE__ */ e(Sa, { className: "pt-2", children: fe ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
|
|
2204
|
+
kt.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
|
|
2195
2205
|
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
|
|
2196
|
-
/* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children:
|
|
2206
|
+
/* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: kt.slice(0, 5).map((o) => /* @__PURE__ */ e("li", { children: o }, o)) })
|
|
2197
2207
|
] })
|
|
2198
2208
|
] }),
|
|
2199
2209
|
/* @__PURE__ */ e(Da, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: fe ? /* @__PURE__ */ c(T, { children: [
|
|
@@ -2211,7 +2221,7 @@ function Rr() {
|
|
|
2211
2221
|
gt,
|
|
2212
2222
|
{
|
|
2213
2223
|
onClick: () => at({
|
|
2214
|
-
closeAfterSave:
|
|
2224
|
+
closeAfterSave: Ot,
|
|
2215
2225
|
navigateHomeAfterSave: Ye === "home"
|
|
2216
2226
|
}),
|
|
2217
2227
|
className: "m-0",
|
|
@@ -2226,7 +2236,7 @@ function Rr() {
|
|
|
2226
2236
|
}
|
|
2227
2237
|
),
|
|
2228
2238
|
/* @__PURE__ */ e(
|
|
2229
|
-
|
|
2239
|
+
xn,
|
|
2230
2240
|
{
|
|
2231
2241
|
open: Ka,
|
|
2232
2242
|
onOpenChange: (o) => {
|
|
@@ -2244,7 +2254,7 @@ function Rr() {
|
|
|
2244
2254
|
}
|
|
2245
2255
|
);
|
|
2246
2256
|
}
|
|
2247
|
-
function
|
|
2257
|
+
function wr({
|
|
2248
2258
|
accessToken: t,
|
|
2249
2259
|
dashboardId: a,
|
|
2250
2260
|
selectedSheetId: n,
|