react-semaphor 0.1.548 → 0.1.549
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/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/{assistant-chat-DCcWsoGm.js → assistant-chat-CUSvuESS.js} +1831 -1846
- package/dist/chunks/{custom-visual-inputs-BTRnwsfd.js → custom-visual-inputs-CwAcigQS.js} +1 -1
- package/dist/chunks/{dashboard-BZHL9a-z.js → dashboard-Cm7WkARH.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DML-cAzB.js → dashboard-briefing-launcher-X0HzNpS8.js} +627 -629
- package/dist/chunks/{dashboard-controls-BGoBTPS7.js → dashboard-controls-BuX6TMNK.js} +219 -219
- package/dist/chunks/{dashboard-json-iHPsdn3j.js → dashboard-json-Cc4u2xvy.js} +1 -1
- package/dist/chunks/{document-dashboard-inputs-B2AqPfrq.js → document-dashboard-inputs-DPQ_wUGD.js} +2 -2
- package/dist/chunks/{edit-dashboard-visual-CLEFFf2T.js → edit-dashboard-visual-DX2CzibK.js} +606 -606
- package/dist/chunks/{filter-reach-copy-ByzGadUk.js → filter-reach-copy-Bc-Gei83.js} +3 -3
- package/dist/chunks/{global-date-filter-utils-CeeFJ1CP.js → global-date-filter-utils-CnumW4j2.js} +1656 -1651
- package/dist/chunks/{index-DeDHr3iz.js → index-DzsdV1o4.js} +3 -3
- package/dist/chunks/{raw-temporal-presentation-CrUM2I_o.js → raw-temporal-presentation-CBKeEPYA.js} +1 -1
- package/dist/chunks/report-preferences-dialog-B9oYQ6OJ.js +2180 -0
- package/dist/chunks/{resolve-dashboard-input-context-BmWF9hSl.js → resolve-dashboard-input-context-DVWF7p5C.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-qtfzl9Eb.js → saved-dashboard-context-BMqMzNAo.js} +4 -4
- package/dist/chunks/{semaphor-ready-indicator-Ol6VcaR7.js → semaphor-ready-indicator-wWkPH4ue.js} +11743 -11720
- package/dist/chunks/{shelf-drop-preview-context-C2SEC3I9.js → shelf-drop-preview-context-B86d8IZO.js} +3 -3
- package/dist/chunks/{use-create-flow-overlay-state-CbGIjaVD.js → use-create-flow-overlay-state-DPNjYyi3.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +7 -7
- package/dist/index.js +12 -12
- package/dist/live-channel/index.js +124 -0
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +9 -0
- package/dist/types/lib/types/common-types.d.ts +26 -1
- package/dist/types/live-channel.d.ts +2 -0
- package/dist/types/shared/assistant-protocol/parts.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +14 -44
- package/dist/types/shared/live-channel/index.d.ts +1 -0
- package/dist/types/shared/live-channel/live-channel-contract.d.ts +126 -0
- package/package.json +5 -1
- package/dist/chunks/report-preferences-dialog-CM7kXmXp.js +0 -1977
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { B as U, Z as
|
|
4
|
-
import { c as ye, X as Yt, C as
|
|
2
|
+
import { bN as zr, u as C, bO as qr, bP as Kr, bQ as nt, bR as Qr, bS as Wr, bT as Yr, bU as Jr, bV as Xr, bW as Zr, b2 as Y, b0 as xe, bX as ve, bH as D, bY as ea, bI as zt, bJ as qt, bL as Ze, bM as et, bZ as Kt, aO as ot, aX as re, b_ as ta, b$ as ra, c0 as Qt, c1 as aa, c2 as Wt, bK as na, c3 as oa, c4 as R, c5 as sa, c6 as ia, c7 as da, az as ca, be as la, bv as ua, c8 as ma, bw as ha, j as pa, P as fa, a3 as Ct, i as Oe, p as ba, k as We, c9 as ga, ca as xa, cb as va, cc as ya, N as wa, cd as Na, s as Sa, ce as ka, cf as Ca, bh as Da, cg as Ea, ch as Ia, ci as Dt, cj as Et, ck as It, cl as Aa, bx as La, cm as Oa, cn as Ma, co as Me, cp as Pa, cq as _a, cr as Ye, cs as Ra, ct as At, o as Ta, cu as Ua, cv as $a, cw as Ba, cx as Fa, cy as Ga, cz as Va, cA as ja, cB as Ha, cC as Lt } from "./semaphor-ready-indicator-wWkPH4ue.js";
|
|
3
|
+
import { B as U, Z as za, _ as qa, $ as tt, L as _e, l as Ka, r as Qa, s as Wa, t as Ya, u as Ja, v as Xa, P as Za, a as en, b as tn, m as Ot, n as Mt, o as Pt, p as _t, I as rn } from "./switch-CEBOR4n7.js";
|
|
4
|
+
import { c as ye, X as Yt, C as an } from "./x-4f5U2XwU.js";
|
|
5
5
|
import * as A from "react";
|
|
6
|
-
import Jt, { useMemo as j, useState as N, useEffect as be, useRef as Rt, useLayoutEffect as
|
|
6
|
+
import Jt, { useMemo as j, useState as N, useEffect as be, useRef as Rt, useLayoutEffect as nn } from "react";
|
|
7
7
|
import "./index-CuHybtft.js";
|
|
8
8
|
import "./validators-C-aOQlTB.js";
|
|
9
9
|
import "./matrix-operation-contract-D6vYkZK4.js";
|
|
@@ -11,28 +11,28 @@ import "./analytics-base-schemas-BKs3flFS.js";
|
|
|
11
11
|
import "zod";
|
|
12
12
|
import "../value-format-preferences/index.js";
|
|
13
13
|
import { c as ge } from "./_commonjsHelpers-DimLPMtv.js";
|
|
14
|
-
import { u as
|
|
15
|
-
import { I as
|
|
16
|
-
import { h as
|
|
17
|
-
import { createPortal as
|
|
18
|
-
import { dr as we, ds as st, dt as Xt, as as
|
|
19
|
-
import { S as
|
|
14
|
+
import { u as on, A as sn, a as dn, f as cn, V as ln, b as un, c as mn, S as hn, i as pn, g as fn, U as bn } from "./dashboard-briefing-launcher-X0HzNpS8.js";
|
|
15
|
+
import { I as gn } from "./use-create-flow-overlay-state-DPNjYyi3.js";
|
|
16
|
+
import { h as xn, R as vn } from "./report-preferences-dialog-B9oYQ6OJ.js";
|
|
17
|
+
import { createPortal as yn } from "react-dom";
|
|
18
|
+
import { dr as we, ds as st, dt as Xt, as as wn } from "./global-date-filter-utils-CnumW4j2.js";
|
|
19
|
+
import { S as Nn, C as Sn } from "./selection-reducer-CJzkTZio.js";
|
|
20
20
|
import { o as Zt } from "./matrix-formatter-DWEeC0_c.js";
|
|
21
|
-
import { ac as Tt, ad as
|
|
22
|
-
import { r as
|
|
23
|
-
import { u as
|
|
21
|
+
import { ac as Tt, ad as kn, ae as Cn, a as rt } from "./resolve-dashboard-input-context-DVWF7p5C.js";
|
|
22
|
+
import { r as Dn } from "./export-file-format-C-tJsxsf.js";
|
|
23
|
+
import { u as En, s as In } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
24
24
|
import { K as Re, u as Ut } from "./table-settings-WysCBj62.js";
|
|
25
|
-
import { l as
|
|
26
|
-
import { S as
|
|
27
|
-
import { P as
|
|
28
|
-
import { B as
|
|
25
|
+
import { l as An, h as $t, e as Ln } from "./document-dashboard-inputs-DPQ_wUGD.js";
|
|
26
|
+
import { S as On } from "./save-CfJpQQ68.js";
|
|
27
|
+
import { P as Mn } from "./palette-D10o_yYX.js";
|
|
28
|
+
import { B as Pn } from "./braces-o9UiRQes.js";
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v0.453.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
35
|
+
const _n = ye("Moon", [
|
|
36
36
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
37
37
|
]);
|
|
38
38
|
/**
|
|
@@ -41,7 +41,7 @@ const Pn = ye("Moon", [
|
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
|
-
const
|
|
44
|
+
const Rn = ye("ShieldX", [
|
|
45
45
|
[
|
|
46
46
|
"path",
|
|
47
47
|
{
|
|
@@ -58,7 +58,7 @@ const _n = ye("ShieldX", [
|
|
|
58
58
|
* This source code is licensed under the ISC license.
|
|
59
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
60
|
*/
|
|
61
|
-
const
|
|
61
|
+
const Tn = ye("Sun", [
|
|
62
62
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
63
63
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
64
64
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -75,7 +75,7 @@ const Rn = ye("Sun", [
|
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
77
|
*/
|
|
78
|
-
const
|
|
78
|
+
const Un = ye("UserPlus", [
|
|
79
79
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
80
80
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
81
81
|
["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
|
|
@@ -102,7 +102,7 @@ var at = { exports: {} }, Je = {};
|
|
|
102
102
|
* LICENSE file in the root directory of this source tree.
|
|
103
103
|
*/
|
|
104
104
|
var Bt;
|
|
105
|
-
function
|
|
105
|
+
function $n() {
|
|
106
106
|
if (Bt) return Je;
|
|
107
107
|
Bt = 1;
|
|
108
108
|
var t = Jt;
|
|
@@ -153,7 +153,7 @@ var Xe = {};
|
|
|
153
153
|
* LICENSE file in the root directory of this source tree.
|
|
154
154
|
*/
|
|
155
155
|
var Ft;
|
|
156
|
-
function
|
|
156
|
+
function Bn() {
|
|
157
157
|
return Ft || (Ft = 1, process.env.NODE_ENV !== "production" && function() {
|
|
158
158
|
function t(l, p) {
|
|
159
159
|
return l === p && (l !== 0 || 1 / l === 1 / p) || l !== l && p !== p;
|
|
@@ -205,18 +205,18 @@ function $n() {
|
|
|
205
205
|
Xe.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
206
206
|
}()), Xe;
|
|
207
207
|
}
|
|
208
|
-
process.env.NODE_ENV === "production" ? at.exports =
|
|
209
|
-
var
|
|
208
|
+
process.env.NODE_ENV === "production" ? at.exports = $n() : at.exports = Bn();
|
|
209
|
+
var Fn = at.exports;
|
|
210
210
|
const Pe = ["light", "dark", "system"];
|
|
211
|
-
function
|
|
212
|
-
const { theme: t, setTheme: n } =
|
|
211
|
+
function Gn() {
|
|
212
|
+
const { theme: t, setTheme: n } = zr(), a = C(
|
|
213
213
|
(f) => f.actions.setDashboardTheme
|
|
214
214
|
);
|
|
215
215
|
function r() {
|
|
216
216
|
const f = Pe.includes(t) ? t : "system", m = Pe[(Pe.indexOf(f) + 1) % Pe.length];
|
|
217
217
|
n(m), a(m);
|
|
218
218
|
}
|
|
219
|
-
const o = t === "light" ?
|
|
219
|
+
const o = t === "light" ? Tn : t === "dark" ? _n : qr, d = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
|
|
220
220
|
return /* @__PURE__ */ e(
|
|
221
221
|
U,
|
|
222
222
|
{
|
|
@@ -231,19 +231,19 @@ function Fn() {
|
|
|
231
231
|
}
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
const { displayPreferences: t, shouldShowElement: n } =
|
|
236
|
-
() =>
|
|
234
|
+
function Vn() {
|
|
235
|
+
const { displayPreferences: t, shouldShowElement: n } = Kr(), { currentUser: a, userContext: r } = nt(), o = j(
|
|
236
|
+
() => Qr(a),
|
|
237
237
|
[a]
|
|
238
238
|
), d = j(() => (m) => o && o[m] !== void 0 && o[m] === !1 ? !1 : n(m), [o, n, t]), f = j(
|
|
239
239
|
() => {
|
|
240
240
|
var m, g, v, h, c;
|
|
241
241
|
return {
|
|
242
|
-
canEdit: ((m = r == null ? void 0 : r.permissions) == null ? void 0 : m.canEdit) ??
|
|
243
|
-
canUseFilters: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canEdit) ??
|
|
244
|
-
canManageDashboards: ((v = r == null ? void 0 : r.permissions) == null ? void 0 : v.canCreateDashboard) ??
|
|
245
|
-
canCreateDashboards: ((h = r == null ? void 0 : r.permissions) == null ? void 0 : h.canCreateDashboard) ??
|
|
246
|
-
canAccessVisuals: ((c = r == null ? void 0 : r.permissions) == null ? void 0 : c.canEdit) ??
|
|
242
|
+
canEdit: ((m = r == null ? void 0 : r.permissions) == null ? void 0 : m.canEdit) ?? Zr(a),
|
|
243
|
+
canUseFilters: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canEdit) ?? Xr(a),
|
|
244
|
+
canManageDashboards: ((v = r == null ? void 0 : r.permissions) == null ? void 0 : v.canCreateDashboard) ?? Jr(a),
|
|
245
|
+
canCreateDashboards: ((h = r == null ? void 0 : r.permissions) == null ? void 0 : h.canCreateDashboard) ?? Yr(a),
|
|
246
|
+
canAccessVisuals: ((c = r == null ? void 0 : r.permissions) == null ? void 0 : c.canEdit) ?? Wr(a)
|
|
247
247
|
};
|
|
248
248
|
},
|
|
249
249
|
[a, r]
|
|
@@ -255,7 +255,7 @@ function Gn() {
|
|
|
255
255
|
currentUser: a
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function jn(t, n = []) {
|
|
259
259
|
let a = [];
|
|
260
260
|
function r(d, f) {
|
|
261
261
|
const m = A.createContext(f);
|
|
@@ -287,9 +287,9 @@ function Vn(t, n = []) {
|
|
|
287
287
|
);
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
|
-
return o.scopeName = t, [r,
|
|
290
|
+
return o.scopeName = t, [r, Hn(o, ...n)];
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function Hn(...t) {
|
|
293
293
|
const n = t[0];
|
|
294
294
|
if (t.length === 1) return n;
|
|
295
295
|
const a = () => {
|
|
@@ -307,7 +307,7 @@ function jn(...t) {
|
|
|
307
307
|
};
|
|
308
308
|
return a.scopeName = n.scopeName, a;
|
|
309
309
|
}
|
|
310
|
-
var
|
|
310
|
+
var zn = [
|
|
311
311
|
"a",
|
|
312
312
|
"button",
|
|
313
313
|
"div",
|
|
@@ -325,29 +325,29 @@ var Hn = [
|
|
|
325
325
|
"span",
|
|
326
326
|
"svg",
|
|
327
327
|
"ul"
|
|
328
|
-
], it =
|
|
329
|
-
const a =
|
|
328
|
+
], it = zn.reduce((t, n) => {
|
|
329
|
+
const a = za(`Primitive.${n}`), r = A.forwardRef((o, d) => {
|
|
330
330
|
const { asChild: f, ...m } = o, g = f ? a : n;
|
|
331
331
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(g, { ...m, ref: d });
|
|
332
332
|
});
|
|
333
333
|
return r.displayName = `Primitive.${n}`, { ...t, [n]: r };
|
|
334
334
|
}, {});
|
|
335
|
-
function
|
|
336
|
-
return
|
|
337
|
-
|
|
335
|
+
function qn() {
|
|
336
|
+
return Fn.useSyncExternalStore(
|
|
337
|
+
Kn,
|
|
338
338
|
() => !0,
|
|
339
339
|
() => !1
|
|
340
340
|
);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Kn() {
|
|
343
343
|
return () => {
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
var dt = "Avatar", [
|
|
346
|
+
var dt = "Avatar", [Qn] = jn(dt), [Wn, tr] = Qn(dt), rr = A.forwardRef(
|
|
347
347
|
(t, n) => {
|
|
348
348
|
const { __scopeAvatar: a, ...r } = t, [o, d] = A.useState("idle");
|
|
349
349
|
return /* @__PURE__ */ e(
|
|
350
|
-
|
|
350
|
+
Wn,
|
|
351
351
|
{
|
|
352
352
|
scope: a,
|
|
353
353
|
imageLoadingStatus: o,
|
|
@@ -361,7 +361,7 @@ rr.displayName = dt;
|
|
|
361
361
|
var ar = "AvatarImage", nr = A.forwardRef(
|
|
362
362
|
(t, n) => {
|
|
363
363
|
const { __scopeAvatar: a, src: r, onLoadingStatusChange: o = () => {
|
|
364
|
-
}, ...d } = t, f = tr(ar, a), m =
|
|
364
|
+
}, ...d } = t, f = tr(ar, a), m = Yn(r, d), g = qa((v) => {
|
|
365
365
|
o(v), f.onImageLoadingStatusChange(v);
|
|
366
366
|
});
|
|
367
367
|
return tt(() => {
|
|
@@ -385,8 +385,8 @@ sr.displayName = or;
|
|
|
385
385
|
function Gt(t, n) {
|
|
386
386
|
return t ? n ? (t.src !== n && (t.src = n), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
const r =
|
|
388
|
+
function Yn(t, { referrerPolicy: n, crossOrigin: a }) {
|
|
389
|
+
const r = qn(), o = A.useRef(null), d = r ? (o.current || (o.current = new window.Image()), o.current) : null, [f, m] = A.useState(
|
|
390
390
|
() => Gt(d, t)
|
|
391
391
|
);
|
|
392
392
|
return tt(() => {
|
|
@@ -415,7 +415,7 @@ const lr = A.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
|
415
415
|
}
|
|
416
416
|
));
|
|
417
417
|
lr.displayName = ir.displayName;
|
|
418
|
-
const
|
|
418
|
+
const Jn = A.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
419
419
|
dr,
|
|
420
420
|
{
|
|
421
421
|
ref: a,
|
|
@@ -423,7 +423,7 @@ const Yn = A.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
|
423
423
|
...n
|
|
424
424
|
}
|
|
425
425
|
));
|
|
426
|
-
|
|
426
|
+
Jn.displayName = dr.displayName;
|
|
427
427
|
const ur = A.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
428
428
|
cr,
|
|
429
429
|
{
|
|
@@ -436,26 +436,26 @@ const ur = A.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
|
436
436
|
}
|
|
437
437
|
));
|
|
438
438
|
ur.displayName = cr.displayName;
|
|
439
|
-
const
|
|
439
|
+
const Xn = async (t, n, a) => {
|
|
440
440
|
const r = `${t}/management/v1/groups`;
|
|
441
441
|
return await Xt(r, n, a);
|
|
442
|
-
},
|
|
442
|
+
}, Zn = async (t, n, a, r) => {
|
|
443
443
|
const o = `${t}/management/v1/groups/${a}`;
|
|
444
444
|
return st(o, n, "PATCH", r);
|
|
445
|
-
},
|
|
445
|
+
}, eo = async (t, n, a) => {
|
|
446
446
|
const r = `${t}/management/v1/groups/${a}`;
|
|
447
447
|
await st(r, n, "DELETE");
|
|
448
|
-
},
|
|
448
|
+
}, to = async (t, n, a, r) => {
|
|
449
449
|
const o = `${t}/management/v1/groups/${a}/members`;
|
|
450
450
|
return await Xt(o, n, r);
|
|
451
|
-
},
|
|
451
|
+
}, ro = async (t, n, a, r) => {
|
|
452
452
|
const o = `${t}/management/v1/groups/${a}/members`;
|
|
453
453
|
await st(o, n, "DELETE", r);
|
|
454
454
|
};
|
|
455
|
-
function
|
|
455
|
+
function ao() {
|
|
456
456
|
const { authToken: t, tokenProps: n } = Y(), a = xe();
|
|
457
457
|
return ve({
|
|
458
|
-
mutationFn: (r) =>
|
|
458
|
+
mutationFn: (r) => Xn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r),
|
|
459
459
|
onSuccess: () => {
|
|
460
460
|
a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group created successfully");
|
|
461
461
|
},
|
|
@@ -466,13 +466,13 @@ function ro() {
|
|
|
466
466
|
}
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function no() {
|
|
470
470
|
const { authToken: t, tokenProps: n } = Y(), a = xe();
|
|
471
471
|
return ve({
|
|
472
472
|
mutationFn: ({
|
|
473
473
|
groupId: r,
|
|
474
474
|
data: o
|
|
475
|
-
}) =>
|
|
475
|
+
}) => Zn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
|
|
476
476
|
onSuccess: (r, o) => {
|
|
477
477
|
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group updated successfully");
|
|
478
478
|
},
|
|
@@ -483,10 +483,10 @@ function ao() {
|
|
|
483
483
|
}
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function oo() {
|
|
487
487
|
const { authToken: t, tokenProps: n } = Y(), a = xe();
|
|
488
488
|
return ve({
|
|
489
|
-
mutationFn: (r) =>
|
|
489
|
+
mutationFn: (r) => eo(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r),
|
|
490
490
|
onSuccess: (r, o) => {
|
|
491
491
|
a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", o] }), D.success("Group deleted successfully");
|
|
492
492
|
},
|
|
@@ -497,13 +497,13 @@ function no() {
|
|
|
497
497
|
}
|
|
498
498
|
});
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function so() {
|
|
501
501
|
const { authToken: t, tokenProps: n } = Y(), a = xe();
|
|
502
502
|
return ve({
|
|
503
503
|
mutationFn: ({
|
|
504
504
|
groupId: r,
|
|
505
505
|
data: o
|
|
506
|
-
}) =>
|
|
506
|
+
}) => to(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
|
|
507
507
|
onSuccess: (r, o) => {
|
|
508
508
|
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
|
|
509
509
|
queryKey: ["group-members", o.groupId]
|
|
@@ -516,13 +516,13 @@ function oo() {
|
|
|
516
516
|
}
|
|
517
517
|
});
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function io() {
|
|
520
520
|
const { authToken: t, tokenProps: n } = Y(), a = xe();
|
|
521
521
|
return ve({
|
|
522
522
|
mutationFn: ({
|
|
523
523
|
groupId: r,
|
|
524
524
|
data: o
|
|
525
|
-
}) =>
|
|
525
|
+
}) => ro(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
|
|
526
526
|
onSuccess: (r, o) => {
|
|
527
527
|
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
|
|
528
528
|
queryKey: ["group-members", o.groupId]
|
|
@@ -535,8 +535,8 @@ function so() {
|
|
|
535
535
|
}
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
|
-
const
|
|
539
|
-
function
|
|
538
|
+
const co = [];
|
|
539
|
+
function lo({
|
|
540
540
|
open: t,
|
|
541
541
|
onOpenChange: n
|
|
542
542
|
}) {
|
|
@@ -546,11 +546,11 @@ function co({
|
|
|
546
546
|
isLoading: m,
|
|
547
547
|
error: g,
|
|
548
548
|
refetch: v
|
|
549
|
-
} =
|
|
549
|
+
} = ea({
|
|
550
550
|
type: o ? "TENANT_GROUP" : "all",
|
|
551
551
|
tenantId: o ? d : void 0,
|
|
552
552
|
includeMembers: !1
|
|
553
|
-
}), h = g ? mr(g, "Unable to load groups.") : null, [c, u] = N({ kind: "list" }), [l, p] = N(null), x =
|
|
553
|
+
}), h = g ? mr(g, "Unable to load groups.") : null, [c, u] = N({ kind: "list" }), [l, p] = N(null), x = oo();
|
|
554
554
|
be(() => {
|
|
555
555
|
t || (u({ kind: "list" }), p(null));
|
|
556
556
|
}, [t]);
|
|
@@ -580,7 +580,7 @@ function co({
|
|
|
580
580
|
/* @__PURE__ */ e(et, { className: "sr-only", children: "Create a new group to organize members." })
|
|
581
581
|
] }) : null,
|
|
582
582
|
c.kind === "list" && /* @__PURE__ */ e(
|
|
583
|
-
|
|
583
|
+
uo,
|
|
584
584
|
{
|
|
585
585
|
groups: f,
|
|
586
586
|
isLoading: m,
|
|
@@ -593,7 +593,7 @@ function co({
|
|
|
593
593
|
}
|
|
594
594
|
),
|
|
595
595
|
c.kind === "members" && w && /* @__PURE__ */ e(
|
|
596
|
-
|
|
596
|
+
po,
|
|
597
597
|
{
|
|
598
598
|
group: w,
|
|
599
599
|
isTenantViewer: o,
|
|
@@ -608,7 +608,7 @@ function co({
|
|
|
608
608
|
w.id
|
|
609
609
|
),
|
|
610
610
|
c.kind === "create" && /* @__PURE__ */ e(
|
|
611
|
-
|
|
611
|
+
fo,
|
|
612
612
|
{
|
|
613
613
|
isTenantUser: o,
|
|
614
614
|
tenantId: d,
|
|
@@ -653,7 +653,7 @@ function co({
|
|
|
653
653
|
] })
|
|
654
654
|
] }) });
|
|
655
655
|
}
|
|
656
|
-
function
|
|
656
|
+
function uo({
|
|
657
657
|
groups: t,
|
|
658
658
|
isLoading: n,
|
|
659
659
|
errorMessage: a,
|
|
@@ -672,7 +672,7 @@ function lo({
|
|
|
672
672
|
return /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
673
673
|
/* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
|
|
674
674
|
/* @__PURE__ */ s("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
|
|
675
|
-
/* @__PURE__ */ e(
|
|
675
|
+
/* @__PURE__ */ e(Nn, { className: "h-3 w-3 text-muted-foreground" }),
|
|
676
676
|
/* @__PURE__ */ e(
|
|
677
677
|
"input",
|
|
678
678
|
{
|
|
@@ -718,7 +718,7 @@ function lo({
|
|
|
718
718
|
message: a,
|
|
719
719
|
onRetry: r
|
|
720
720
|
}
|
|
721
|
-
) : h.length === 0 && t.length === 0 ? /* @__PURE__ */ e(
|
|
721
|
+
) : h.length === 0 && t.length === 0 ? /* @__PURE__ */ e(ho, { onCreate: f }) : h.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
|
|
722
722
|
/* @__PURE__ */ s("div", { className: "text-[12px] text-foreground", children: [
|
|
723
723
|
'No groups match "',
|
|
724
724
|
g,
|
|
@@ -728,7 +728,7 @@ function lo({
|
|
|
728
728
|
] }) : h.map((c) => {
|
|
729
729
|
var u;
|
|
730
730
|
return /* @__PURE__ */ e(
|
|
731
|
-
|
|
731
|
+
mo,
|
|
732
732
|
{
|
|
733
733
|
group: c,
|
|
734
734
|
canDelete: ((u = c.permissions) == null ? void 0 : u.canDelete) ?? c.createdBy === o,
|
|
@@ -740,7 +740,7 @@ function lo({
|
|
|
740
740
|
}) })
|
|
741
741
|
] });
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function mo({
|
|
744
744
|
group: t,
|
|
745
745
|
canDelete: n,
|
|
746
746
|
onClick: a,
|
|
@@ -759,7 +759,7 @@ function uo({
|
|
|
759
759
|
onClick: a,
|
|
760
760
|
className: "group flex w-full items-center gap-3 border-b border-border/60 px-5 py-2.5 text-left hover:bg-accent/40",
|
|
761
761
|
children: [
|
|
762
|
-
/* @__PURE__ */ e("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ e(
|
|
762
|
+
/* @__PURE__ */ e("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ e(aa, { className: "h-3.5 w-3.5" }) }),
|
|
763
763
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
764
764
|
/* @__PURE__ */ e("div", { className: "truncate text-[13px] font-medium text-foreground", children: t.name }),
|
|
765
765
|
/* @__PURE__ */ s("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
|
|
@@ -799,13 +799,13 @@ function uo({
|
|
|
799
799
|
children: /* @__PURE__ */ e(ot, { className: "h-3 w-3" })
|
|
800
800
|
}
|
|
801
801
|
),
|
|
802
|
-
/* @__PURE__ */ e(
|
|
802
|
+
/* @__PURE__ */ e(Sn, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
803
803
|
] })
|
|
804
804
|
]
|
|
805
805
|
}
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function ho({ onCreate: t }) {
|
|
809
809
|
return /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
|
|
810
810
|
/* @__PURE__ */ e("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ e(Qt, { className: "h-4 w-4" }) }),
|
|
811
811
|
/* @__PURE__ */ e("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
|
|
@@ -824,7 +824,7 @@ function mo({ onCreate: t }) {
|
|
|
824
824
|
)
|
|
825
825
|
] });
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function po({
|
|
828
828
|
group: t,
|
|
829
829
|
isTenantViewer: n,
|
|
830
830
|
canEdit: a,
|
|
@@ -840,7 +840,7 @@ function ho({
|
|
|
840
840
|
isLoading: h,
|
|
841
841
|
error: c,
|
|
842
842
|
refetch: u
|
|
843
|
-
} =
|
|
843
|
+
} = ta(t.id), l = (v == null ? void 0 : v.members) ?? co, p = c ? mr(c, "Unable to load members for this group.") : null, x = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: w } = ra({
|
|
844
844
|
type: x,
|
|
845
845
|
tenantId: t.tenantId || void 0,
|
|
846
846
|
active: !0,
|
|
@@ -848,7 +848,7 @@ function ho({
|
|
|
848
848
|
}), S = j(
|
|
849
849
|
() => new Set(l.map((y) => y.userId)),
|
|
850
850
|
[l]
|
|
851
|
-
), b =
|
|
851
|
+
), b = so(), L = io(), O = no(), [k, E] = N(!1), [I, J] = N(t.name), [Te, H] = N(!1), [ae, z] = N(t.description || ""), [ne, oe] = N(""), [Ue, se] = N(!1), Ne = j(() => {
|
|
852
852
|
const y = ne.trim().toLowerCase();
|
|
853
853
|
return w.filter((B) => !S.has(B.id)).filter(
|
|
854
854
|
(B) => !y || (B.name || "").toLowerCase().includes(y) || (B.email || "").toLowerCase().includes(y)
|
|
@@ -1011,7 +1011,7 @@ function ho({
|
|
|
1011
1011
|
}
|
|
1012
1012
|
) }),
|
|
1013
1013
|
o && /* @__PURE__ */ e(
|
|
1014
|
-
|
|
1014
|
+
bo,
|
|
1015
1015
|
{
|
|
1016
1016
|
query: ne,
|
|
1017
1017
|
setQuery: oe,
|
|
@@ -1082,13 +1082,13 @@ function ho({
|
|
|
1082
1082
|
) })
|
|
1083
1083
|
] });
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function fo({
|
|
1086
1086
|
isTenantUser: t,
|
|
1087
1087
|
tenantId: n,
|
|
1088
1088
|
onCancel: a,
|
|
1089
1089
|
onCreated: r
|
|
1090
1090
|
}) {
|
|
1091
|
-
const [o, d] = N(""), [f, m] = N(""), [g, v] = N(null), h =
|
|
1091
|
+
const [o, d] = N(""), [f, m] = N(""), [g, v] = N(null), h = ao(), c = o.trim().length >= 3 && o.trim().length <= 50, u = async () => {
|
|
1092
1092
|
if (!c) return;
|
|
1093
1093
|
v(null);
|
|
1094
1094
|
const l = {
|
|
@@ -1169,7 +1169,7 @@ function po({
|
|
|
1169
1169
|
] })
|
|
1170
1170
|
] });
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function bo({
|
|
1173
1173
|
query: t,
|
|
1174
1174
|
setQuery: n,
|
|
1175
1175
|
open: a,
|
|
@@ -1180,7 +1180,7 @@ function fo({
|
|
|
1180
1180
|
busy: m
|
|
1181
1181
|
}) {
|
|
1182
1182
|
const g = Rt(null), v = Rt(null), [h, c] = N(null);
|
|
1183
|
-
|
|
1183
|
+
nn(() => {
|
|
1184
1184
|
if (!a) {
|
|
1185
1185
|
c(null);
|
|
1186
1186
|
return;
|
|
@@ -1216,7 +1216,7 @@ function fo({
|
|
|
1216
1216
|
ref: g,
|
|
1217
1217
|
className: "flex items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40",
|
|
1218
1218
|
children: [
|
|
1219
|
-
/* @__PURE__ */ e(
|
|
1219
|
+
/* @__PURE__ */ e(Un, { className: "h-3 w-3 text-muted-foreground" }),
|
|
1220
1220
|
/* @__PURE__ */ e(
|
|
1221
1221
|
"input",
|
|
1222
1222
|
{
|
|
@@ -1233,7 +1233,7 @@ function fo({
|
|
|
1233
1233
|
]
|
|
1234
1234
|
}
|
|
1235
1235
|
),
|
|
1236
|
-
u && typeof document < "u" &&
|
|
1236
|
+
u && typeof document < "u" && yn(
|
|
1237
1237
|
/* @__PURE__ */ e(
|
|
1238
1238
|
"div",
|
|
1239
1239
|
{
|
|
@@ -1303,15 +1303,15 @@ function pr({ name: t }) {
|
|
|
1303
1303
|
const n = t.split(" ").map((a) => a[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
1304
1304
|
return /* @__PURE__ */ e(lr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ e(ur, { className: "text-[9px] font-semibold", children: n || "?" }) });
|
|
1305
1305
|
}
|
|
1306
|
-
const
|
|
1307
|
-
function
|
|
1306
|
+
const go = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
1307
|
+
function xo({
|
|
1308
1308
|
open: t,
|
|
1309
1309
|
onOpenChange: n
|
|
1310
1310
|
}) {
|
|
1311
1311
|
const a = C(
|
|
1312
1312
|
(o) => {
|
|
1313
1313
|
var d, f;
|
|
1314
|
-
return
|
|
1314
|
+
return Dn({
|
|
1315
1315
|
dashboardDefault: (f = (d = o.dashboard) == null ? void 0 : d.exportDefaults) == null ? void 0 : f.csvEncoding
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
@@ -1319,20 +1319,20 @@ function go({
|
|
|
1319
1319
|
(o) => o.actions
|
|
1320
1320
|
);
|
|
1321
1321
|
return /* @__PURE__ */ e(zt, { open: t, onOpenChange: n, children: /* @__PURE__ */ s(qt, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
|
|
1322
|
-
/* @__PURE__ */ s(
|
|
1322
|
+
/* @__PURE__ */ s(na, { children: [
|
|
1323
1323
|
/* @__PURE__ */ e(Ze, { className: "text-[15px]", children: "Download settings" }),
|
|
1324
1324
|
/* @__PURE__ */ e(et, { className: "text-[13px] leading-5", children: "Applies to every CSV downloaded or delivered from this dashboard. People can still change it for a single download." })
|
|
1325
1325
|
] }),
|
|
1326
1326
|
/* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
1327
|
-
/* @__PURE__ */ e(
|
|
1327
|
+
/* @__PURE__ */ e(Ka, { htmlFor: "dashboard-csv-encoding", className: go, children: "CSV encoding" }),
|
|
1328
1328
|
/* @__PURE__ */ s(
|
|
1329
|
-
|
|
1329
|
+
Qa,
|
|
1330
1330
|
{
|
|
1331
1331
|
value: a,
|
|
1332
1332
|
onValueChange: (o) => r({ csvEncoding: o }),
|
|
1333
1333
|
children: [
|
|
1334
|
-
/* @__PURE__ */ e(
|
|
1335
|
-
/* @__PURE__ */ e(
|
|
1334
|
+
/* @__PURE__ */ e(Wa, { id: "dashboard-csv-encoding", size: "sm", children: /* @__PURE__ */ e(Ya, {}) }),
|
|
1335
|
+
/* @__PURE__ */ e(Ja, { children: oa.map((o) => /* @__PURE__ */ e(Xa, { value: o.value, children: o.label }, o.value)) })
|
|
1336
1336
|
]
|
|
1337
1337
|
}
|
|
1338
1338
|
)
|
|
@@ -1355,7 +1355,7 @@ function fe(t, n) {
|
|
|
1355
1355
|
var a;
|
|
1356
1356
|
return ((a = Re(t, n)) == null ? void 0 : a.title) || n;
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1358
|
+
function vo(t) {
|
|
1359
1359
|
const { errors: n, dashboard: a } = t;
|
|
1360
1360
|
if (!a)
|
|
1361
1361
|
return n;
|
|
@@ -1440,16 +1440,16 @@ function xo(t) {
|
|
|
1440
1440
|
}
|
|
1441
1441
|
return Array.from(r.values());
|
|
1442
1442
|
}
|
|
1443
|
-
function
|
|
1443
|
+
function yo({
|
|
1444
1444
|
visible: t,
|
|
1445
1445
|
onSelect: n
|
|
1446
1446
|
}) {
|
|
1447
1447
|
return t ? /* @__PURE__ */ s(R, { onSelect: n, children: [
|
|
1448
|
-
/* @__PURE__ */ e(
|
|
1448
|
+
/* @__PURE__ */ e(sa, { className: "h-3.5 w-3.5" }),
|
|
1449
1449
|
"Schedule email report"
|
|
1450
1450
|
] }) : null;
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1452
|
+
function wo({
|
|
1453
1453
|
scheduleReportVisible: t,
|
|
1454
1454
|
analyticalBriefingVisible: n,
|
|
1455
1455
|
onScheduleReport: a,
|
|
@@ -1457,7 +1457,7 @@ function yo({
|
|
|
1457
1457
|
}) {
|
|
1458
1458
|
return /* @__PURE__ */ s($, { children: [
|
|
1459
1459
|
/* @__PURE__ */ e(
|
|
1460
|
-
|
|
1460
|
+
yo,
|
|
1461
1461
|
{
|
|
1462
1462
|
visible: t,
|
|
1463
1463
|
onSelect: a
|
|
@@ -1469,14 +1469,14 @@ function yo({
|
|
|
1469
1469
|
] }) : null
|
|
1470
1470
|
] });
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function No(t) {
|
|
1473
1473
|
var v, h, c;
|
|
1474
|
-
const { saved: n, draft: a, usage: r } = t, o = [], d =
|
|
1474
|
+
const { saved: n, draft: a, usage: r } = t, o = [], d = An(n);
|
|
1475
1475
|
for (const [u, l] of Object.entries(r.inputs))
|
|
1476
1476
|
!l || !$t(n, u) || $t(a, u) || o.push({
|
|
1477
1477
|
target: "input",
|
|
1478
1478
|
id: u,
|
|
1479
|
-
label:
|
|
1479
|
+
label: Ln(n, d, u),
|
|
1480
1480
|
bookmarks: l,
|
|
1481
1481
|
remembered: 0
|
|
1482
1482
|
});
|
|
@@ -1508,9 +1508,9 @@ function wo(t) {
|
|
|
1508
1508
|
const w = p ? Tt(p) : void 0, S = Re(a, u), b = S ? Tt(S) : void 0;
|
|
1509
1509
|
if (!(!p || !w || !b))
|
|
1510
1510
|
for (const [L, O] of Object.entries(l.columns)) {
|
|
1511
|
-
if (!(O.bookmarks || O.remembered) ||
|
|
1511
|
+
if (!(O.bookmarks || O.remembered) || kn(L) || !w.has(L) || b.has(L))
|
|
1512
1512
|
continue;
|
|
1513
|
-
const k =
|
|
1513
|
+
const k = Cn(p, L), E = ((c = k == null ? void 0 : k.label) == null ? void 0 : c.trim()) || (k == null ? void 0 : k.name);
|
|
1514
1514
|
o.push({
|
|
1515
1515
|
target: "column",
|
|
1516
1516
|
id: L,
|
|
@@ -1523,49 +1523,49 @@ function wo(t) {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
return o;
|
|
1525
1525
|
}
|
|
1526
|
-
const
|
|
1527
|
-
function
|
|
1526
|
+
const So = "dashboard-bookmark-usage";
|
|
1527
|
+
function ko(t) {
|
|
1528
1528
|
var g;
|
|
1529
|
-
const n = C((v) => v.viewerStateClient), a = (g = t.saved) == null ? void 0 : g.id, o =
|
|
1529
|
+
const n = C((v) => v.viewerStateClient), a = (g = t.saved) == null ? void 0 : g.id, o = ia({
|
|
1530
1530
|
// Keyed by the viewer, never by the client object (TanStack drops functions when hashing).
|
|
1531
|
-
queryKey: [
|
|
1531
|
+
queryKey: [So, (n == null ? void 0 : n.viewerKey) ?? null],
|
|
1532
1532
|
queryFn: () => n.bookmarks.usage(),
|
|
1533
1533
|
enabled: t.enabled && !!n && !!a,
|
|
1534
1534
|
staleTime: 5 * 6e4,
|
|
1535
1535
|
retry: !1
|
|
1536
1536
|
}).data, { saved: d, draft: f, enabled: m } = t;
|
|
1537
|
-
return j(() => !m || !d || !o ? [] : !o.bookmarks && !Object.keys(o.tables).length ? [] :
|
|
1537
|
+
return j(() => !m || !d || !o ? [] : !o.bookmarks && !Object.keys(o.tables).length ? [] : No({ saved: d, draft: f, usage: o }), [f, m, d, o]);
|
|
1538
1538
|
}
|
|
1539
1539
|
function jt(t, n, a) {
|
|
1540
1540
|
return `${t} ${t === 1 ? n : a}`;
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1542
|
+
function Co(t) {
|
|
1543
1543
|
const n = [
|
|
1544
1544
|
t.bookmarks ? jt(t.bookmarks, "bookmark", "bookmarks") : null,
|
|
1545
1545
|
t.remembered ? jt(t.remembered, "remembered layout", "remembered layouts") : null
|
|
1546
1546
|
].filter(Boolean).join(", ");
|
|
1547
1547
|
return t.target === "sheet" ? { name: `${t.label} sheet`, uses: n } : t.target === "table" ? { name: `${t.label} table`, uses: n } : { name: t.label, uses: n };
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function Do({
|
|
1550
1550
|
saved: t,
|
|
1551
1551
|
draft: n,
|
|
1552
1552
|
enabled: a
|
|
1553
1553
|
}) {
|
|
1554
|
-
const r =
|
|
1555
|
-
return r.length ? /* @__PURE__ */ s(
|
|
1556
|
-
/* @__PURE__ */ e(
|
|
1554
|
+
const r = ko({ saved: t, draft: n, enabled: a });
|
|
1555
|
+
return r.length ? /* @__PURE__ */ s(Za, { children: [
|
|
1556
|
+
/* @__PURE__ */ e(en, { asChild: !0, children: /* @__PURE__ */ s(
|
|
1557
1557
|
U,
|
|
1558
1558
|
{
|
|
1559
1559
|
variant: "ghost",
|
|
1560
1560
|
size: "xs",
|
|
1561
1561
|
className: "gap-1 text-muted-foreground hover:text-foreground",
|
|
1562
1562
|
children: [
|
|
1563
|
-
/* @__PURE__ */ e(
|
|
1563
|
+
/* @__PURE__ */ e(da, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
|
|
1564
1564
|
"Affects saved views"
|
|
1565
1565
|
]
|
|
1566
1566
|
}
|
|
1567
1567
|
) }),
|
|
1568
|
-
/* @__PURE__ */ s(
|
|
1568
|
+
/* @__PURE__ */ s(tn, { align: "end", className: "w-[320px] p-3 text-[12px]", children: [
|
|
1569
1569
|
/* @__PURE__ */ e("p", { className: "text-foreground", children: "This edit removes parts of the dashboard that viewers saved. Their views still open, with a note about what no longer applies." }),
|
|
1570
1570
|
/* @__PURE__ */ e(
|
|
1571
1571
|
"ul",
|
|
@@ -1573,7 +1573,7 @@ function Co({
|
|
|
1573
1573
|
"aria-label": "Affected saved views",
|
|
1574
1574
|
className: "mt-2 grid gap-1 border-t border-border/60 pt-2",
|
|
1575
1575
|
children: r.map((o) => {
|
|
1576
|
-
const { name: d, uses: f } =
|
|
1576
|
+
const { name: d, uses: f } = Co(o);
|
|
1577
1577
|
return /* @__PURE__ */ s(
|
|
1578
1578
|
"li",
|
|
1579
1579
|
{
|
|
@@ -1597,24 +1597,24 @@ function Ht(t, n) {
|
|
|
1597
1597
|
semanticExecutionPayload: rt(n)
|
|
1598
1598
|
};
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1600
|
+
function ts() {
|
|
1601
1601
|
var yt, wt, Nt, St, kt;
|
|
1602
1602
|
const {
|
|
1603
1603
|
authToken: t,
|
|
1604
1604
|
tokenProps: n,
|
|
1605
1605
|
id: a,
|
|
1606
1606
|
showBriefings: r
|
|
1607
|
-
} = Y(), o =
|
|
1607
|
+
} = Y(), o = ca(), { isLocalDev: d, isConsoleMode: f } = la(), {
|
|
1608
1608
|
canEditDashboard: m,
|
|
1609
1609
|
hasInspectionUser: g,
|
|
1610
1610
|
inspectionMessage: v,
|
|
1611
1611
|
isInspectionMode: h,
|
|
1612
1612
|
isInspectionSurface: c
|
|
1613
|
-
} =
|
|
1613
|
+
} = ua(), { openBrandStudioPreview: u } = ma(), { permissions: l } = Vn(), p = ha(), { isLoading: x } = pa(), w = C((i) => i.theme), S = C((i) => i.isDownloadingPdf), b = C((i) => i.dashboard), L = C((i) => i.selectedSheetId), O = (yt = b == null ? void 0 : b.sheets) == null ? void 0 : yt.find(
|
|
1614
1614
|
(i) => i.id === L
|
|
1615
|
-
), k =
|
|
1615
|
+
), k = wn(O), E = k ? (wt = O == null ? void 0 : O.document) == null ? void 0 : wt.page : void 0, I = C(
|
|
1616
1616
|
(i) => i.isDashboardEditing
|
|
1617
|
-
), { setDashboardTitle: J } = C((i) => i.actions), [Te, H] = N(!1), [ae, z] = N(!1), [ne, oe] = N(!1), [Ue, se] = N(!1), [Ne, X] = N(null), [ie, Se] = N(null), { registerBriefingViewer: ke } =
|
|
1617
|
+
), { setDashboardTitle: J } = C((i) => i.actions), [Te, H] = N(!1), [ae, z] = N(!1), [ne, oe] = N(!1), [Ue, se] = N(!1), [Ne, X] = N(null), [ie, Se] = N(null), { registerBriefingViewer: ke } = fa();
|
|
1618
1618
|
be(
|
|
1619
1619
|
() => ke((i) => Se(i)),
|
|
1620
1620
|
[ke]
|
|
@@ -1631,19 +1631,19 @@ function es() {
|
|
|
1631
1631
|
(i) => i.showDashboardJSON
|
|
1632
1632
|
);
|
|
1633
1633
|
C((i) => i.onSaveFunction);
|
|
1634
|
-
const { setIsDashboardEditing: mt, setShowDashboardJSON: ht } = C(
|
|
1634
|
+
const { setIsDashboardEditing: mt, setShowDashboardJSON: ht, markDashboardSaved: xr } = C(
|
|
1635
1635
|
(i) => i.actions
|
|
1636
1636
|
), { setInitialDashboard: pt, clearSelectedDashboard: $e } = Oe(
|
|
1637
1637
|
(i) => i.actions
|
|
1638
|
-
), ce = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: De } =
|
|
1638
|
+
), ce = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: De } = ba(We.DASHBOARD), { data: Be } = ga(), vr = ((Nt = Be == null ? void 0 : Be.preference) == null ? void 0 : Nt.defaultDashboardId) || null, { mutate: yr, isPending: wr } = xa(), { currentUser: Nr } = nt(), Sr = va(Nr), F = br || gr, V = ya({
|
|
1639
1639
|
config: n.config,
|
|
1640
1640
|
canNavigateDashboardHub: ce,
|
|
1641
1641
|
canShareDashboard: ((St = F == null ? void 0 : F.permissions) == null ? void 0 : St.canShare) === !0,
|
|
1642
|
-
canManageGroups:
|
|
1642
|
+
canManageGroups: Sr
|
|
1643
1643
|
}), ft = F ? {
|
|
1644
1644
|
id: F.id,
|
|
1645
1645
|
title: (b == null ? void 0 : b.title) || F.title || "Dashboard"
|
|
1646
|
-
} : null, { handleAddNewFrame:
|
|
1646
|
+
} : null, { handleAddNewFrame: kr } = wa(), [Fe, Ge] = N(!1), [Cr, le] = N(!1), [Ve, Ee] = N("close"), ue = Na(We.DASHBOARD), [M, me] = N(null), Dr = async (i, _) => {
|
|
1647
1647
|
if (!h) {
|
|
1648
1648
|
if (!(b != null && b.id)) {
|
|
1649
1649
|
console.log("No dashboard ID found");
|
|
@@ -1687,8 +1687,8 @@ function es() {
|
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
1689
|
}, [De, b == null ? void 0 : b.id, pt]);
|
|
1690
|
-
const
|
|
1691
|
-
() =>
|
|
1690
|
+
const Er = n.orgUserId || n.tenantId, je = j(
|
|
1691
|
+
() => Eo({
|
|
1692
1692
|
accessToken: t == null ? void 0 : t.accessToken,
|
|
1693
1693
|
dashboardId: (b == null ? void 0 : b.id) || a || n.dashboard_id,
|
|
1694
1694
|
selectedSheetId: k ? L : void 0,
|
|
@@ -1707,9 +1707,9 @@ function es() {
|
|
|
1707
1707
|
w,
|
|
1708
1708
|
n.dashboard_id
|
|
1709
1709
|
]
|
|
1710
|
-
), He = I && !T && !h &&
|
|
1710
|
+
), He = I && !T && !h && Er && m, { setDashboard: ze } = C((i) => i.actions), Ir = C(
|
|
1711
1711
|
(i) => i.semanticExecutionPayload
|
|
1712
|
-
),
|
|
1712
|
+
), Ar = () => {
|
|
1713
1713
|
mt(!0);
|
|
1714
1714
|
}, Ie = () => {
|
|
1715
1715
|
mt(!1), ht(!1), me(null);
|
|
@@ -1721,7 +1721,7 @@ function es() {
|
|
|
1721
1721
|
}
|
|
1722
1722
|
if (M || !b || x)
|
|
1723
1723
|
return;
|
|
1724
|
-
const i =
|
|
1724
|
+
const i = Sa(C.getState());
|
|
1725
1725
|
me(
|
|
1726
1726
|
Ht(i.dashboard, i.semanticExecutionPayload)
|
|
1727
1727
|
);
|
|
@@ -1730,19 +1730,19 @@ function es() {
|
|
|
1730
1730
|
M,
|
|
1731
1731
|
I,
|
|
1732
1732
|
x,
|
|
1733
|
-
|
|
1733
|
+
Ir
|
|
1734
1734
|
]);
|
|
1735
|
-
const qe = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: Ke, isDirtyPending:
|
|
1735
|
+
const qe = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: Ke, isDirtyPending: Lr, resetDirty: he } = En(
|
|
1736
1736
|
b,
|
|
1737
1737
|
qe,
|
|
1738
1738
|
300,
|
|
1739
1739
|
1e3,
|
|
1740
|
-
|
|
1741
|
-
), bt =
|
|
1740
|
+
In
|
|
1741
|
+
), bt = on(
|
|
1742
1742
|
qe,
|
|
1743
1743
|
h,
|
|
1744
1744
|
m
|
|
1745
|
-
), gt = Ke ||
|
|
1745
|
+
), gt = Ke || Lr, Ae = Fe || ue.isPending, Or = () => {
|
|
1746
1746
|
if (h) {
|
|
1747
1747
|
M && ze(M.dashboard, {
|
|
1748
1748
|
semanticExecutionPayload: M.semanticExecutionPayload
|
|
@@ -1750,21 +1750,21 @@ function es() {
|
|
|
1750
1750
|
return;
|
|
1751
1751
|
}
|
|
1752
1752
|
bt() ? (Ee("close"), le(!0)) : (Ie(), he());
|
|
1753
|
-
},
|
|
1753
|
+
}, Mr = async () => {
|
|
1754
1754
|
await Qe({
|
|
1755
1755
|
closeAfterSave: !0,
|
|
1756
1756
|
navigateHomeAfterSave: Ve === "home"
|
|
1757
1757
|
});
|
|
1758
|
-
},
|
|
1758
|
+
}, Pr = () => {
|
|
1759
1759
|
const i = Ve === "home" && !!ce;
|
|
1760
1760
|
M && ze(M.dashboard, {
|
|
1761
1761
|
semanticExecutionPayload: M.semanticExecutionPayload
|
|
1762
1762
|
}), Ie(), i && $e(), Ee("close"), le(!1), he();
|
|
1763
|
-
},
|
|
1763
|
+
}, _r = () => {
|
|
1764
1764
|
M && (ze(M.dashboard, {
|
|
1765
1765
|
semanticExecutionPayload: M.semanticExecutionPayload
|
|
1766
1766
|
}), he());
|
|
1767
|
-
},
|
|
1767
|
+
}, Rr = () => {
|
|
1768
1768
|
if (ce) {
|
|
1769
1769
|
if (I && bt()) {
|
|
1770
1770
|
Ee("home"), le(!0);
|
|
@@ -1781,35 +1781,35 @@ function es() {
|
|
|
1781
1781
|
return;
|
|
1782
1782
|
const P = (i == null ? void 0 : i.closeAfterSave) ?? ct, te = (i == null ? void 0 : i.navigateHomeAfterSave) ?? !1;
|
|
1783
1783
|
Ce(P), P && le(!1);
|
|
1784
|
-
const
|
|
1784
|
+
const Fr = rt(_);
|
|
1785
1785
|
q(!0), Q(null), W([]), Ge(!0);
|
|
1786
|
-
const
|
|
1786
|
+
const Gr = {
|
|
1787
1787
|
template: _
|
|
1788
1788
|
};
|
|
1789
1789
|
ue.mutate(
|
|
1790
1790
|
{
|
|
1791
1791
|
resourceId: _.id,
|
|
1792
|
-
data:
|
|
1792
|
+
data: Gr
|
|
1793
1793
|
},
|
|
1794
1794
|
{
|
|
1795
1795
|
onSuccess: () => {
|
|
1796
|
-
Ge(!1), D.success("Dashboard saved!"), me(
|
|
1796
|
+
Ge(!1), xr(), D.success("Dashboard saved!"), me(
|
|
1797
1797
|
Ht(
|
|
1798
|
-
|
|
1798
|
+
Fr,
|
|
1799
1799
|
C.getState().semanticExecutionPayload
|
|
1800
1800
|
)
|
|
1801
1801
|
), q(!1), Ce(!1), P && (Ie(), he(), te && ce && $e()), Ee("close");
|
|
1802
1802
|
},
|
|
1803
|
-
onError: (
|
|
1803
|
+
onError: (Vr) => {
|
|
1804
1804
|
Ge(!1), Q("Failed to save dashboard. Please try again.");
|
|
1805
|
-
const Le =
|
|
1805
|
+
const Le = Vr.details, jr = Array.isArray(
|
|
1806
1806
|
Le == null ? void 0 : Le.errors
|
|
1807
1807
|
) ? (Le.errors || []).filter(
|
|
1808
|
-
(
|
|
1808
|
+
(Hr) => typeof Hr == "string"
|
|
1809
1809
|
) : [];
|
|
1810
1810
|
W(
|
|
1811
|
-
|
|
1812
|
-
errors:
|
|
1811
|
+
vo({
|
|
1812
|
+
errors: jr,
|
|
1813
1813
|
dashboard: _ || void 0
|
|
1814
1814
|
})
|
|
1815
1815
|
), D.error("Failed to save dashboard");
|
|
@@ -1823,11 +1823,11 @@ function es() {
|
|
|
1823
1823
|
dashboardStateTitle: b.title,
|
|
1824
1824
|
dashboardId: b == null ? void 0 : b.id
|
|
1825
1825
|
});
|
|
1826
|
-
const
|
|
1826
|
+
const Tr = ce && !!(t != null && t.accessToken) && !!(n != null && n.apiServiceUrl), Ur = !h && V.showDashboardHub && Tr, $r = !h && p && V.showDashboardHub, G = (b == null ? void 0 : b.id) || null, vt = ka(
|
|
1827
1827
|
(kt = n.config) == null ? void 0 : kt.showBriefings,
|
|
1828
1828
|
r
|
|
1829
|
-
), ee = !!G &&
|
|
1830
|
-
!G || h ||
|
|
1829
|
+
), ee = !!G && vr === G, Br = () => {
|
|
1830
|
+
!G || h || yr({
|
|
1831
1831
|
dashboardId: ee ? null : G
|
|
1832
1832
|
});
|
|
1833
1833
|
};
|
|
@@ -1838,15 +1838,15 @@ function es() {
|
|
|
1838
1838
|
role: "dashboard-controls",
|
|
1839
1839
|
children: [
|
|
1840
1840
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1841
|
-
|
|
1842
|
-
|
|
1841
|
+
$r && !T && /* @__PURE__ */ e(
|
|
1842
|
+
gn,
|
|
1843
1843
|
{
|
|
1844
1844
|
"aria-label": "Dashboard Hub",
|
|
1845
1845
|
tooltip: "Dashboard Hub",
|
|
1846
|
-
onClick:
|
|
1846
|
+
onClick: Rr,
|
|
1847
1847
|
className: "h-7 w-7 px-0",
|
|
1848
1848
|
buttonProps: { size: "xs" },
|
|
1849
|
-
children: /* @__PURE__ */ e(
|
|
1849
|
+
children: /* @__PURE__ */ e(Ca, { className: "h-3.5 w-3.5" })
|
|
1850
1850
|
}
|
|
1851
1851
|
),
|
|
1852
1852
|
!T && p && (x ? /* @__PURE__ */ e(
|
|
@@ -1859,7 +1859,7 @@ function es() {
|
|
|
1859
1859
|
}
|
|
1860
1860
|
) : /* @__PURE__ */ s($, { children: [
|
|
1861
1861
|
/* @__PURE__ */ e(
|
|
1862
|
-
|
|
1862
|
+
Da,
|
|
1863
1863
|
{
|
|
1864
1864
|
value: xt || "Untitled Dashboard",
|
|
1865
1865
|
onSave: (i) => {
|
|
@@ -1869,9 +1869,9 @@ function es() {
|
|
|
1869
1869
|
dashboardId: b == null ? void 0 : b.id
|
|
1870
1870
|
});
|
|
1871
1871
|
const _ = (b == null ? void 0 : b.title) || "";
|
|
1872
|
-
J(i),
|
|
1872
|
+
J(i), Dr(i, _);
|
|
1873
1873
|
},
|
|
1874
|
-
isEditable:
|
|
1874
|
+
isEditable: Ea({
|
|
1875
1875
|
isDashboardEditing: I,
|
|
1876
1876
|
canEditDashboard: m === !0 && !h
|
|
1877
1877
|
}),
|
|
@@ -1889,21 +1889,21 @@ function es() {
|
|
|
1889
1889
|
children: "Default"
|
|
1890
1890
|
}
|
|
1891
1891
|
),
|
|
1892
|
-
|
|
1892
|
+
Ur && G && /* @__PURE__ */ e(Ot, { children: /* @__PURE__ */ s(Mt, { children: [
|
|
1893
1893
|
/* @__PURE__ */ e(Pt, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1894
1894
|
U,
|
|
1895
1895
|
{
|
|
1896
1896
|
variant: "ghost",
|
|
1897
1897
|
size: "xs",
|
|
1898
|
-
onClick:
|
|
1899
|
-
disabled:
|
|
1898
|
+
onClick: Br,
|
|
1899
|
+
disabled: wr || !(t != null && t.accessToken) || !(n != null && n.apiServiceUrl),
|
|
1900
1900
|
className: ge(
|
|
1901
1901
|
"w-7 px-0",
|
|
1902
1902
|
ee ? "bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary focus-visible:bg-primary/15" : "text-muted-foreground hover:text-foreground"
|
|
1903
1903
|
),
|
|
1904
1904
|
"aria-pressed": ee,
|
|
1905
1905
|
"aria-label": ee ? "Remove as default dashboard" : "Set as default dashboard",
|
|
1906
|
-
children: /* @__PURE__ */ e(
|
|
1906
|
+
children: /* @__PURE__ */ e(Ia, { className: "h-3.5 w-3.5" })
|
|
1907
1907
|
}
|
|
1908
1908
|
) }),
|
|
1909
1909
|
/* @__PURE__ */ e(_t, { children: /* @__PURE__ */ e("p", { children: ee ? "Remove as default dashboard" : "Set as default dashboard" }) })
|
|
@@ -1912,11 +1912,11 @@ function es() {
|
|
|
1912
1912
|
] }),
|
|
1913
1913
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
1914
1914
|
T && /* @__PURE__ */ s($, { children: [
|
|
1915
|
-
/* @__PURE__ */ e(
|
|
1916
|
-
/* @__PURE__ */ e(
|
|
1915
|
+
/* @__PURE__ */ e(sn, {}),
|
|
1916
|
+
/* @__PURE__ */ e(dn, {})
|
|
1917
1917
|
] }),
|
|
1918
|
-
p && !h && /* @__PURE__ */ e(
|
|
1919
|
-
!T && I && !h && l.canUseFilters && p && /* @__PURE__ */ e(
|
|
1918
|
+
p && !h && /* @__PURE__ */ e(xn, {}),
|
|
1919
|
+
!T && I && !h && l.canUseFilters && p && /* @__PURE__ */ e(cn, {}),
|
|
1920
1920
|
I && !T && !h && p && !k && /* @__PURE__ */ s("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
|
|
1921
1921
|
/* @__PURE__ */ s(
|
|
1922
1922
|
U,
|
|
@@ -1924,7 +1924,7 @@ function es() {
|
|
|
1924
1924
|
variant: "ghost",
|
|
1925
1925
|
size: "xs",
|
|
1926
1926
|
disabled: !I,
|
|
1927
|
-
onClick: () => void
|
|
1927
|
+
onClick: () => void kr(),
|
|
1928
1928
|
className: "h-full rounded-none border-0 shadow-none hover:bg-accent",
|
|
1929
1929
|
children: [
|
|
1930
1930
|
/* @__PURE__ */ e(re, { className: "h-3.5 w-3.5" }),
|
|
@@ -1941,7 +1941,7 @@ function es() {
|
|
|
1941
1941
|
className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
|
|
1942
1942
|
"aria-label": "Open visual options",
|
|
1943
1943
|
disabled: !I,
|
|
1944
|
-
children: /* @__PURE__ */ e(
|
|
1944
|
+
children: /* @__PURE__ */ e(an, { className: "h-3.5 w-3.5" })
|
|
1945
1945
|
}
|
|
1946
1946
|
) }),
|
|
1947
1947
|
/* @__PURE__ */ e(
|
|
@@ -1957,17 +1957,17 @@ function es() {
|
|
|
1957
1957
|
)
|
|
1958
1958
|
] }),
|
|
1959
1959
|
/* @__PURE__ */ e(
|
|
1960
|
-
|
|
1960
|
+
ln,
|
|
1961
1961
|
{
|
|
1962
1962
|
open: fr,
|
|
1963
1963
|
onOpenChange: lt
|
|
1964
1964
|
}
|
|
1965
1965
|
)
|
|
1966
1966
|
] }),
|
|
1967
|
-
!h && p && /* @__PURE__ */ e(
|
|
1967
|
+
!h && p && /* @__PURE__ */ e(un, {}),
|
|
1968
1968
|
!T && !I && (m || h) && (!c || !g || m !== void 0) && p && /* @__PURE__ */ s("div", { className: "inline-flex items-center gap-1", children: [
|
|
1969
|
-
/* @__PURE__ */ s(U, { size: "xs", onClick:
|
|
1970
|
-
/* @__PURE__ */ e(
|
|
1969
|
+
/* @__PURE__ */ s(U, { size: "xs", onClick: Ar, children: [
|
|
1970
|
+
/* @__PURE__ */ e(Aa, { className: "h-3.5 w-3.5" }),
|
|
1971
1971
|
h ? "Inspect" : "Edit"
|
|
1972
1972
|
] }),
|
|
1973
1973
|
v ? /* @__PURE__ */ e(Ot, { children: /* @__PURE__ */ s(Mt, { children: [
|
|
@@ -1977,14 +1977,14 @@ function es() {
|
|
|
1977
1977
|
type: "button",
|
|
1978
1978
|
"aria-label": v,
|
|
1979
1979
|
className: "inline-flex size-6 items-center justify-center rounded-control text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1980
|
-
children: /* @__PURE__ */ e(
|
|
1980
|
+
children: /* @__PURE__ */ e(rn, { "aria-hidden": "true", className: "size-3.5" })
|
|
1981
1981
|
}
|
|
1982
1982
|
) }),
|
|
1983
1983
|
/* @__PURE__ */ e(_t, { children: /* @__PURE__ */ e("p", { children: v }) })
|
|
1984
1984
|
] }) }) : null
|
|
1985
1985
|
] }),
|
|
1986
1986
|
He && p && Ke && /* @__PURE__ */ e(
|
|
1987
|
-
|
|
1987
|
+
Do,
|
|
1988
1988
|
{
|
|
1989
1989
|
saved: qe,
|
|
1990
1990
|
draft: b,
|
|
@@ -1996,10 +1996,10 @@ function es() {
|
|
|
1996
1996
|
{
|
|
1997
1997
|
variant: "outline",
|
|
1998
1998
|
size: "xs",
|
|
1999
|
-
onClick:
|
|
1999
|
+
onClick: _r,
|
|
2000
2000
|
disabled: Ae,
|
|
2001
2001
|
children: [
|
|
2002
|
-
/* @__PURE__ */ e(
|
|
2002
|
+
/* @__PURE__ */ e(La, { className: "h-3.5 w-3.5" }),
|
|
2003
2003
|
"Undo"
|
|
2004
2004
|
]
|
|
2005
2005
|
}
|
|
@@ -2012,20 +2012,20 @@ function es() {
|
|
|
2012
2012
|
disabled: Ae || !gt,
|
|
2013
2013
|
onClick: () => Qe(),
|
|
2014
2014
|
children: [
|
|
2015
|
-
Ae ? /* @__PURE__ */ e(_e, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(
|
|
2015
|
+
Ae ? /* @__PURE__ */ e(_e, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(On, { className: "h-3.5 w-3.5" }),
|
|
2016
2016
|
Ae ? "Saving..." : "Save"
|
|
2017
2017
|
]
|
|
2018
2018
|
}
|
|
2019
2019
|
),
|
|
2020
|
-
I && !T && p && /* @__PURE__ */ s(U, { variant: "outline", size: "xs", onClick:
|
|
2021
|
-
/* @__PURE__ */ e(
|
|
2020
|
+
I && !T && p && /* @__PURE__ */ s(U, { variant: "outline", size: "xs", onClick: Or, children: [
|
|
2021
|
+
/* @__PURE__ */ e(Oa, { className: "h-3.5 w-3.5" }),
|
|
2022
2022
|
"Close"
|
|
2023
2023
|
] }),
|
|
2024
2024
|
!T && p && /* @__PURE__ */ s("div", { className: "ml-2 flex items-center", children: [
|
|
2025
|
-
/* @__PURE__ */ e(
|
|
2026
|
-
f && m === !0 && !h && /* @__PURE__ */ e(
|
|
2025
|
+
/* @__PURE__ */ e(mn, {}),
|
|
2026
|
+
f && m === !0 && !h && /* @__PURE__ */ e(hn, {})
|
|
2027
2027
|
] }),
|
|
2028
|
-
!T && d && /* @__PURE__ */ e(
|
|
2028
|
+
!T && d && /* @__PURE__ */ e(Gn, {}),
|
|
2029
2029
|
!T && p && !h && /* @__PURE__ */ s(Dt, { children: [
|
|
2030
2030
|
/* @__PURE__ */ e(Et, { asChild: !0, children: /* @__PURE__ */ e(
|
|
2031
2031
|
U,
|
|
@@ -2034,7 +2034,7 @@ function es() {
|
|
|
2034
2034
|
size: "xs",
|
|
2035
2035
|
className: "w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
2036
2036
|
"aria-label": "More dashboard options",
|
|
2037
|
-
children: /* @__PURE__ */ e(
|
|
2037
|
+
children: /* @__PURE__ */ e(Ma, { className: "h-3.5 w-3.5" })
|
|
2038
2038
|
}
|
|
2039
2039
|
) }),
|
|
2040
2040
|
/* @__PURE__ */ s(
|
|
@@ -2050,13 +2050,13 @@ function es() {
|
|
|
2050
2050
|
disabled: S,
|
|
2051
2051
|
onSelect: () => y(!0),
|
|
2052
2052
|
children: [
|
|
2053
|
-
/* @__PURE__ */ e(
|
|
2053
|
+
/* @__PURE__ */ e(Pa, { className: "h-3.5 w-3.5" }),
|
|
2054
2054
|
"Export"
|
|
2055
2055
|
]
|
|
2056
2056
|
}
|
|
2057
2057
|
),
|
|
2058
2058
|
/* @__PURE__ */ e(
|
|
2059
|
-
|
|
2059
|
+
wo,
|
|
2060
2060
|
{
|
|
2061
2061
|
scheduleReportVisible: !!(vt && o.surfaceVisible && G && !I),
|
|
2062
2062
|
analyticalBriefingVisible: !!(vt && o.surfaceVisible && G && !I),
|
|
@@ -2069,7 +2069,7 @@ function es() {
|
|
|
2069
2069
|
{
|
|
2070
2070
|
onSelect: () => se(!0),
|
|
2071
2071
|
children: [
|
|
2072
|
-
/* @__PURE__ */ e(
|
|
2072
|
+
/* @__PURE__ */ e(_a, { className: "h-3.5 w-3.5" }),
|
|
2073
2073
|
"Download settings"
|
|
2074
2074
|
]
|
|
2075
2075
|
}
|
|
@@ -2078,7 +2078,7 @@ function es() {
|
|
|
2078
2078
|
(V.showDashboardSharing || V.showGroupManagement) && /* @__PURE__ */ s($, { children: [
|
|
2079
2079
|
/* @__PURE__ */ e(Me, { children: "Access" }),
|
|
2080
2080
|
V.showDashboardSharing && /* @__PURE__ */ s(R, { onSelect: () => H(!0), children: [
|
|
2081
|
-
/* @__PURE__ */ e(
|
|
2081
|
+
/* @__PURE__ */ e(Ra, { className: "h-3.5 w-3.5" }),
|
|
2082
2082
|
"Share"
|
|
2083
2083
|
] }),
|
|
2084
2084
|
V.showGroupManagement && /* @__PURE__ */ s(
|
|
@@ -2147,15 +2147,15 @@ function es() {
|
|
|
2147
2147
|
/* @__PURE__ */ s(
|
|
2148
2148
|
R,
|
|
2149
2149
|
{
|
|
2150
|
-
onSelect: () =>
|
|
2150
|
+
onSelect: () => pn(n.apiServiceUrl),
|
|
2151
2151
|
children: [
|
|
2152
|
-
/* @__PURE__ */ e(
|
|
2152
|
+
/* @__PURE__ */ e(Rn, { className: "h-3.5 w-3.5" }),
|
|
2153
2153
|
"Invalidate token"
|
|
2154
2154
|
]
|
|
2155
2155
|
}
|
|
2156
2156
|
),
|
|
2157
2157
|
/* @__PURE__ */ s(R, { onSelect: u, children: [
|
|
2158
|
-
/* @__PURE__ */ e(
|
|
2158
|
+
/* @__PURE__ */ e(Mn, { className: "h-3.5 w-3.5" }),
|
|
2159
2159
|
"Brand Studio"
|
|
2160
2160
|
] }),
|
|
2161
2161
|
I && /* @__PURE__ */ s(
|
|
@@ -2163,7 +2163,7 @@ function es() {
|
|
|
2163
2163
|
{
|
|
2164
2164
|
onSelect: () => ht(!ut),
|
|
2165
2165
|
children: [
|
|
2166
|
-
/* @__PURE__ */ e(
|
|
2166
|
+
/* @__PURE__ */ e(Pn, { className: "h-3.5 w-3.5" }),
|
|
2167
2167
|
ut ? "Hide dashboard JSON" : "Show dashboard JSON"
|
|
2168
2168
|
]
|
|
2169
2169
|
}
|
|
@@ -2174,7 +2174,7 @@ function es() {
|
|
|
2174
2174
|
)
|
|
2175
2175
|
] }),
|
|
2176
2176
|
Te && ft && /* @__PURE__ */ e(
|
|
2177
|
-
|
|
2177
|
+
Ta,
|
|
2178
2178
|
{
|
|
2179
2179
|
resource: ft,
|
|
2180
2180
|
resourceType: We.DASHBOARD,
|
|
@@ -2182,28 +2182,28 @@ function es() {
|
|
|
2182
2182
|
}
|
|
2183
2183
|
),
|
|
2184
2184
|
V.showGroupManagement && /* @__PURE__ */ e(
|
|
2185
|
-
|
|
2185
|
+
lo,
|
|
2186
2186
|
{
|
|
2187
2187
|
open: ae,
|
|
2188
2188
|
onOpenChange: z
|
|
2189
2189
|
}
|
|
2190
2190
|
),
|
|
2191
2191
|
/* @__PURE__ */ e(
|
|
2192
|
-
|
|
2192
|
+
vn,
|
|
2193
2193
|
{
|
|
2194
2194
|
open: ne,
|
|
2195
2195
|
onOpenChange: oe
|
|
2196
2196
|
}
|
|
2197
2197
|
),
|
|
2198
2198
|
/* @__PURE__ */ e(
|
|
2199
|
-
|
|
2199
|
+
xo,
|
|
2200
2200
|
{
|
|
2201
2201
|
open: Ue,
|
|
2202
2202
|
onOpenChange: se
|
|
2203
2203
|
}
|
|
2204
2204
|
),
|
|
2205
2205
|
G && (Ne || ie) ? /* @__PURE__ */ e(
|
|
2206
|
-
|
|
2206
|
+
fn,
|
|
2207
2207
|
{
|
|
2208
2208
|
dashboardId: G,
|
|
2209
2209
|
dashboardTitle: (b == null ? void 0 : b.title) || (F == null ? void 0 : F.title),
|
|
@@ -2217,31 +2217,31 @@ function es() {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
) : null,
|
|
2219
2219
|
p && /* @__PURE__ */ e(
|
|
2220
|
-
|
|
2220
|
+
Ua,
|
|
2221
2221
|
{
|
|
2222
2222
|
open: Z,
|
|
2223
2223
|
onOpenChange: y
|
|
2224
2224
|
}
|
|
2225
2225
|
),
|
|
2226
2226
|
/* @__PURE__ */ e(
|
|
2227
|
-
|
|
2227
|
+
$a,
|
|
2228
2228
|
{
|
|
2229
2229
|
open: B,
|
|
2230
2230
|
onOpenChange: (i) => {
|
|
2231
2231
|
!i && Fe && !K || (q(i), i || (Q(null), W([]), Ce(!1)));
|
|
2232
2232
|
},
|
|
2233
|
-
children: /* @__PURE__ */ s(
|
|
2234
|
-
/* @__PURE__ */ s(
|
|
2235
|
-
/* @__PURE__ */ e(
|
|
2236
|
-
/* @__PURE__ */ e(
|
|
2233
|
+
children: /* @__PURE__ */ s(Ba, { className: "max-w-sm", children: [
|
|
2234
|
+
/* @__PURE__ */ s(Fa, { children: [
|
|
2235
|
+
/* @__PURE__ */ e(Ga, { children: K ? "Save failed" : "Saving dashboard" }),
|
|
2236
|
+
/* @__PURE__ */ e(Va, { className: "pt-2", children: K ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
|
|
2237
2237
|
de.length > 0 && /* @__PURE__ */ s("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
|
|
2238
2238
|
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
|
|
2239
2239
|
/* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: de.slice(0, 5).map((i) => /* @__PURE__ */ e("li", { children: i }, i)) })
|
|
2240
2240
|
] })
|
|
2241
2241
|
] }),
|
|
2242
|
-
/* @__PURE__ */ e(
|
|
2242
|
+
/* @__PURE__ */ e(ja, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: K ? /* @__PURE__ */ s($, { children: [
|
|
2243
2243
|
/* @__PURE__ */ e(
|
|
2244
|
-
|
|
2244
|
+
Ha,
|
|
2245
2245
|
{
|
|
2246
2246
|
onClick: () => {
|
|
2247
2247
|
q(!1), Q(null), W([]), Ce(!1);
|
|
@@ -2269,14 +2269,14 @@ function es() {
|
|
|
2269
2269
|
}
|
|
2270
2270
|
),
|
|
2271
2271
|
/* @__PURE__ */ e(
|
|
2272
|
-
|
|
2272
|
+
bn,
|
|
2273
2273
|
{
|
|
2274
|
-
open:
|
|
2274
|
+
open: Cr,
|
|
2275
2275
|
onOpenChange: (i) => {
|
|
2276
2276
|
le(i);
|
|
2277
2277
|
},
|
|
2278
|
-
onSave:
|
|
2279
|
-
onDiscard:
|
|
2278
|
+
onSave: Mr,
|
|
2279
|
+
onDiscard: Pr,
|
|
2280
2280
|
isSaving: Fe,
|
|
2281
2281
|
saveLabel: "Save",
|
|
2282
2282
|
discardLabel: "Discard changes"
|
|
@@ -2287,7 +2287,7 @@ function es() {
|
|
|
2287
2287
|
}
|
|
2288
2288
|
);
|
|
2289
2289
|
}
|
|
2290
|
-
function
|
|
2290
|
+
function Eo({
|
|
2291
2291
|
accessToken: t,
|
|
2292
2292
|
dashboardId: n,
|
|
2293
2293
|
selectedSheetId: a,
|
|
@@ -2303,5 +2303,5 @@ function Do({
|
|
|
2303
2303
|
return m.searchParams.set("pdfMode", "document"), m.searchParams.set("pageSize", r || "letter"), m.searchParams.set("orientation", o || "portrait"), m.searchParams.set("url", f.toString()), m.toString();
|
|
2304
2304
|
}
|
|
2305
2305
|
export {
|
|
2306
|
-
|
|
2306
|
+
ts as default
|
|
2307
2307
|
};
|