react-semaphor 0.1.537 → 0.1.539
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.js +352 -341
- package/dist/assistant-context/index.js +10 -0
- package/dist/assistant-protocol/index.js +104 -0
- package/dist/brand-studio/index.js +35 -31
- package/dist/briefings/index.js +46 -45
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
- package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +979 -0
- package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
- package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
- package/dist/chunks/assistant-chat-DgiSuFT4.js +8083 -0
- package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
- package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
- package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
- package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
- package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
- package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
- package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
- package/dist/chunks/context-HD9usB1P.js +349 -0
- package/dist/chunks/conversation-sQiWYUOb.js +16 -0
- package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
- package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
- package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bl3gCeBR.js} +580 -556
- package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-0EX0HiJt.js} +683 -686
- package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
- package/dist/chunks/dashboard-json-6X_2BDiL.js +69 -0
- package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-y5BwcvzT.js} +1 -1
- package/dist/chunks/document-dashboard-inputs-BrYYlRVo.js +10678 -0
- package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
- package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-Bzchfgga.js} +4744 -4746
- package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
- package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
- package/dist/chunks/index-CqMiAkay.js +3164 -0
- package/dist/chunks/index-CuHybtft.js +51 -0
- package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
- package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
- package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
- package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
- package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-DQ8avoIQ.js} +648 -457
- package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
- package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
- package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
- package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
- package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
- package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
- package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
- package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
- package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
- package/dist/chunks/report-preferences-dialog-CWhSbc5_.js +1808 -0
- package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
- package/dist/chunks/save-CfJpQQ68.js +21 -0
- package/dist/chunks/saved-dashboard-context-Dqve2jlB.js +566 -0
- package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
- package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-ldcwmLoY.js} +65803 -62954
- package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-BWxunXTq.js} +199 -196
- package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
- package/dist/chunks/switch-CvItuC1Q.js +8199 -0
- package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
- package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
- package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
- package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-RHgzVfcz.js} +331 -339
- package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
- package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
- package/dist/chunks/x-4f5U2XwU.js +100 -0
- package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +823 -661
- package/dist/data-app-sdk/index.js +32 -30
- package/dist/data-app-sdk-adapters/index.js +23 -22
- package/dist/data-app-sdk-validation/index.js +23 -22
- package/dist/format-utils/index.js +173 -168
- package/dist/index.js +267 -258
- package/dist/layouts/index.js +236 -24
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/assistant-context.d.ts +2 -0
- package/dist/types/assistant-protocol.d.ts +2 -0
- package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
- package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
- package/dist/types/components/assistant/assistant-store.d.ts +52 -0
- package/dist/types/components/assistant/use-assistant.d.ts +38 -0
- package/dist/types/components/index.d.ts +5 -1
- package/dist/types/components/surfboard/filter/types.d.ts +5 -2
- package/dist/types/index.js +50 -51
- package/dist/types/lib/api/invalidate-token.d.ts +7 -0
- package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
- package/dist/types/lib/charts/types.d.ts +7 -0
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
- package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
- package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
- package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
- package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
- package/dist/types/lib/hooks/use-filter-option-browse.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +9 -0
- package/dist/types/lib/print/print-inputs.d.ts +4 -2
- package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
- package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
- package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
- package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
- package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
- package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
- package/dist/types/lib/stores/editor-store.d.ts +4 -2
- package/dist/types/lib/types/token-types.d.ts +11 -0
- package/dist/types/lib/utils/card-type-change.d.ts +30 -0
- package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
- package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
- package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
- package/dist/types/shared/assistant-context/index.d.ts +9 -0
- package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
- package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
- package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
- package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
- package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
- package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
- package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
- package/dist/types/shared/assistant-protocol/parts.d.ts +140 -0
- package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
- package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
- package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
- package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
- package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
- package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
- package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
- package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
- package/dist/types/shared/format-utils/index.d.ts +3 -0
- package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
- package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
- package/dist/types/shared/layouts/index.d.ts +1 -0
- package/package.json +12 -2
- package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
- package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
- package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
- package/dist/chunks/constants-DNWVy8Y3.js +0 -9
- package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
- package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
- package/dist/chunks/index-DTcTAGGM.js +0 -4101
- package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
- package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
- package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
- package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
- package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
- package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
- package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
- package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
- package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
- package/dist/chunks/save-kO6cIaob.js +0 -34
- package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
- package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
- package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
- package/dist/chunks/x-CXDkqdur.js +0 -149
- package/dist/types/lib/class-utils.d.ts +0 -2
- package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
- package/dist/types/lib/utils.d.ts +0 -51
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
import { jsx as t, jsxs as i, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { c as te, X as
|
|
2
|
+
import { by as Br, u as C, bz as Gr, bA as at, bB as Vr, bC as jr, bD as Hr, bE as qr, bF as zr, bG as Kr, aX as z, aV as ge, bH as xe, bI as Qr, bt as Vt, bu as jt, bw as Xe, bx as Ze, bJ as Ht, aI as nt, aR as ee, bK as Wr, bL as Yr, bM as qt, bN as Jr, bO as zt, bv as Xr, bP as Zr, bQ as _, bR as ea, bS as ta, bT as ra, at as aa, b6 as na, bU as oa, bV as sa, bW as ia, g as da, Z as Nt, f as Le, m as ca, h as Qe, bX as la, bY as ua, bZ as ma, b_ as ha, I as pa, b$ as fa, s as ba, c0 as ga, c1 as xa, b8 as va, c2 as ya, c3 as wa, c4 as St, c5 as kt, c6 as Ct, c7 as Na, c8 as Sa, c9 as ka, ca as Ca, cb as Me, cc as Da, cd as Ea, ce as We, cf as Ia, cg as Dt, l as Aa, ch as La, ci as Ma, cj as Oa, ck as Pa, cl as _a, cm as Ra, cn as Ua, co as Ta, cp as Et } from "./semaphor-ready-indicator-ldcwmLoY.js";
|
|
3
|
+
import { B as T, Q as $a, U as Fa, V as et, L as Pe, l as Ba, r as Ga, s as Va, t as ja, u as Ha, v as qa, P as za, a as Ka, b as Qa, m as It, n as At, o as Lt, p as Mt, I as Wa } from "./switch-CvItuC1Q.js";
|
|
4
|
+
import { c as te, X as Kt, C as Ya } from "./x-4f5U2XwU.js";
|
|
5
5
|
import * as I from "react";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import "./
|
|
10
|
-
import
|
|
11
|
-
import "./
|
|
12
|
-
import "./matrix-operation-contract-BKupLHXL.js";
|
|
6
|
+
import Qt, { useMemo as j, useState as S, useEffect as _e, useRef as Ot, useLayoutEffect as Ja } from "react";
|
|
7
|
+
import { u as D } from "./custom-visual-inputs-BrUOIwln.js";
|
|
8
|
+
import "./index-CuHybtft.js";
|
|
9
|
+
import "./validators-Ej1DdCXa.js";
|
|
10
|
+
import "./matrix-operation-contract-B8PBF1Gd.js";
|
|
11
|
+
import "./analytics-base-schemas-BFAoRlkU.js";
|
|
13
12
|
import "zod";
|
|
14
13
|
import "../value-format-preferences/index.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { I as
|
|
18
|
-
import { R as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
14
|
+
import { c as be } from "./class-utils-Df1OVOT1.js";
|
|
15
|
+
import { d as Xa, c as Za, u as en, A as tn, a as rn, g as an, V as nn, N as on, i as sn, h as dn, U as cn } from "./dashboard-briefing-launcher-Bl3gCeBR.js";
|
|
16
|
+
import { I as ln } from "./use-create-flow-overlay-state-RHgzVfcz.js";
|
|
17
|
+
import { h as un, R as mn } from "./report-preferences-dialog-CWhSbc5_.js";
|
|
18
|
+
import { createPortal as hn } from "react-dom";
|
|
19
|
+
import { a5 as ve, a6 as ot, a7 as Wt, a8 as pn, a9 as Pt, aa as fn, ab as _t, ac as bn, ad as gn } from "./document-dashboard-inputs-BrYYlRVo.js";
|
|
20
|
+
import { S as xn, C as vn } from "./selection-reducer-vKIb_jS6.js";
|
|
21
|
+
import { n as Yt } from "./matrix-formatter-DQ8avoIQ.js";
|
|
22
|
+
import { c as tt } from "./apply-dashboard-operations-C-iahGka.js";
|
|
23
|
+
import { r as yn } from "./csv-utils-GUfKyT1J.js";
|
|
24
|
+
import { t as wn } from "./document-sheet-utils-C1eEldxs.js";
|
|
25
|
+
import { u as Nn } from "./use-debounced-dirty-check-BwAbnX_5.js";
|
|
26
|
+
import { s as Sn } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
|
|
27
|
+
import { l as Re, h as Rt } from "./bookmark-state-k7y5SNGf.js";
|
|
28
|
+
import { S as kn } from "./save-CfJpQQ68.js";
|
|
29
|
+
import { P as Cn } from "./palette-D10o_yYX.js";
|
|
30
|
+
import { B as Dn } from "./braces-o9UiRQes.js";
|
|
26
31
|
/**
|
|
27
32
|
* @license lucide-react v0.453.0 - ISC
|
|
28
33
|
*
|
|
29
34
|
* This source code is licensed under the ISC license.
|
|
30
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
36
|
*/
|
|
32
|
-
const
|
|
37
|
+
const En = te("Monitor", [
|
|
33
38
|
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
34
39
|
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
35
40
|
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
@@ -40,7 +45,7 @@ const Cn = te("Monitor", [
|
|
|
40
45
|
* This source code is licensed under the ISC license.
|
|
41
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
47
|
*/
|
|
43
|
-
const
|
|
48
|
+
const In = te("Moon", [
|
|
44
49
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
45
50
|
]);
|
|
46
51
|
/**
|
|
@@ -49,7 +54,7 @@ const Dn = te("Moon", [
|
|
|
49
54
|
* This source code is licensed under the ISC license.
|
|
50
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
56
|
*/
|
|
52
|
-
const
|
|
57
|
+
const An = te("ShieldX", [
|
|
53
58
|
[
|
|
54
59
|
"path",
|
|
55
60
|
{
|
|
@@ -66,7 +71,7 @@ const En = te("ShieldX", [
|
|
|
66
71
|
* This source code is licensed under the ISC license.
|
|
67
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
73
|
*/
|
|
69
|
-
const
|
|
74
|
+
const Ln = te("Sun", [
|
|
70
75
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
71
76
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
72
77
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -83,7 +88,7 @@ const In = te("Sun", [
|
|
|
83
88
|
* This source code is licensed under the ISC license.
|
|
84
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
90
|
*/
|
|
86
|
-
const
|
|
91
|
+
const Mn = te("UserPlus", [
|
|
87
92
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
88
93
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
89
94
|
["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
|
|
@@ -95,19 +100,136 @@ const An = te("UserPlus", [
|
|
|
95
100
|
* This source code is licensed under the ISC license.
|
|
96
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
102
|
*/
|
|
98
|
-
const
|
|
103
|
+
const Jt = te("UserRound", [
|
|
99
104
|
["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
|
|
100
105
|
["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
|
|
101
|
-
])
|
|
102
|
-
|
|
103
|
-
|
|
106
|
+
]);
|
|
107
|
+
var rt = { exports: {} }, Ye = {};
|
|
108
|
+
/**
|
|
109
|
+
* @license React
|
|
110
|
+
* use-sync-external-store-shim.production.js
|
|
111
|
+
*
|
|
112
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the MIT license found in the
|
|
115
|
+
* LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/
|
|
117
|
+
var Ut;
|
|
118
|
+
function On() {
|
|
119
|
+
if (Ut) return Ye;
|
|
120
|
+
Ut = 1;
|
|
121
|
+
var e = Qt;
|
|
122
|
+
function n(l, u) {
|
|
123
|
+
return l === u && (l !== 0 || 1 / l === 1 / u) || l !== l && u !== u;
|
|
124
|
+
}
|
|
125
|
+
var a = typeof Object.is == "function" ? Object.is : n, r = e.useState, o = e.useEffect, c = e.useLayoutEffect, m = e.useDebugValue;
|
|
126
|
+
function p(l, u) {
|
|
127
|
+
var s = u(), x = r({ inst: { value: s, getSnapshot: u } }), v = x[0].inst, w = x[1];
|
|
128
|
+
return c(
|
|
129
|
+
function() {
|
|
130
|
+
v.value = s, v.getSnapshot = u, b(v) && w({ inst: v });
|
|
131
|
+
},
|
|
132
|
+
[l, s, u]
|
|
133
|
+
), o(
|
|
134
|
+
function() {
|
|
135
|
+
return b(v) && w({ inst: v }), l(function() {
|
|
136
|
+
b(v) && w({ inst: v });
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
[l]
|
|
140
|
+
), m(s), s;
|
|
141
|
+
}
|
|
142
|
+
function b(l) {
|
|
143
|
+
var u = l.getSnapshot;
|
|
144
|
+
l = l.value;
|
|
145
|
+
try {
|
|
146
|
+
var s = u();
|
|
147
|
+
return !a(l, s);
|
|
148
|
+
} catch {
|
|
149
|
+
return !0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function f(l, u) {
|
|
153
|
+
return u();
|
|
154
|
+
}
|
|
155
|
+
var g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : p;
|
|
156
|
+
return Ye.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : g, Ye;
|
|
157
|
+
}
|
|
158
|
+
var Je = {};
|
|
159
|
+
/**
|
|
160
|
+
* @license React
|
|
161
|
+
* use-sync-external-store-shim.development.js
|
|
162
|
+
*
|
|
163
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the MIT license found in the
|
|
166
|
+
* LICENSE file in the root directory of this source tree.
|
|
167
|
+
*/
|
|
168
|
+
var Tt;
|
|
169
|
+
function Pn() {
|
|
170
|
+
return Tt || (Tt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
171
|
+
function e(s, x) {
|
|
172
|
+
return s === x && (s !== 0 || 1 / s === 1 / x) || s !== s && x !== x;
|
|
173
|
+
}
|
|
174
|
+
function n(s, x) {
|
|
175
|
+
g || o.startTransition === void 0 || (g = !0, console.error(
|
|
176
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
177
|
+
));
|
|
178
|
+
var v = x();
|
|
179
|
+
if (!l) {
|
|
180
|
+
var w = x();
|
|
181
|
+
c(v, w) || (console.error(
|
|
182
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
183
|
+
), l = !0);
|
|
184
|
+
}
|
|
185
|
+
w = m({
|
|
186
|
+
inst: { value: v, getSnapshot: x }
|
|
187
|
+
});
|
|
188
|
+
var h = w[0].inst, E = w[1];
|
|
189
|
+
return b(
|
|
190
|
+
function() {
|
|
191
|
+
h.value = v, h.getSnapshot = x, a(h) && E({ inst: h });
|
|
192
|
+
},
|
|
193
|
+
[s, v, x]
|
|
194
|
+
), p(
|
|
195
|
+
function() {
|
|
196
|
+
return a(h) && E({ inst: h }), s(function() {
|
|
197
|
+
a(h) && E({ inst: h });
|
|
198
|
+
});
|
|
199
|
+
},
|
|
200
|
+
[s]
|
|
201
|
+
), f(v), v;
|
|
202
|
+
}
|
|
203
|
+
function a(s) {
|
|
204
|
+
var x = s.getSnapshot;
|
|
205
|
+
s = s.value;
|
|
206
|
+
try {
|
|
207
|
+
var v = x();
|
|
208
|
+
return !c(s, v);
|
|
209
|
+
} catch {
|
|
210
|
+
return !0;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function r(s, x) {
|
|
214
|
+
return x();
|
|
215
|
+
}
|
|
216
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
217
|
+
var o = Qt, c = typeof Object.is == "function" ? Object.is : e, m = o.useState, p = o.useEffect, b = o.useLayoutEffect, f = o.useDebugValue, g = !1, l = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
|
|
218
|
+
Je.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());
|
|
219
|
+
}()), Je;
|
|
220
|
+
}
|
|
221
|
+
process.env.NODE_ENV === "production" ? rt.exports = On() : rt.exports = Pn();
|
|
222
|
+
var _n = rt.exports;
|
|
223
|
+
const Oe = ["light", "dark", "system"];
|
|
224
|
+
function Rn() {
|
|
225
|
+
const { theme: e, setTheme: n } = Br(), a = C(
|
|
104
226
|
(m) => m.actions.setDashboardTheme
|
|
105
227
|
);
|
|
106
228
|
function r() {
|
|
107
229
|
const m = Oe.includes(e) ? e : "system", p = Oe[(Oe.indexOf(m) + 1) % Oe.length];
|
|
108
230
|
n(p), a(p);
|
|
109
231
|
}
|
|
110
|
-
const o = e === "light" ?
|
|
232
|
+
const o = e === "light" ? Ln : e === "dark" ? In : En, c = e === "light" ? "Theme: light (click for dark)" : e === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
|
|
111
233
|
return /* @__PURE__ */ t(
|
|
112
234
|
T,
|
|
113
235
|
{
|
|
@@ -116,71 +238,71 @@ function Ln() {
|
|
|
116
238
|
size: "xs",
|
|
117
239
|
className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
|
|
118
240
|
onClick: r,
|
|
119
|
-
"aria-label":
|
|
120
|
-
title:
|
|
241
|
+
"aria-label": c,
|
|
242
|
+
title: c,
|
|
121
243
|
children: /* @__PURE__ */ t(o, { className: "h-3.5 w-3.5", strokeWidth: 1.5 })
|
|
122
244
|
}
|
|
123
245
|
);
|
|
124
246
|
}
|
|
125
|
-
function
|
|
126
|
-
const { displayPreferences: e, shouldShowElement: n } =
|
|
127
|
-
() =>
|
|
247
|
+
function Un() {
|
|
248
|
+
const { displayPreferences: e, shouldShowElement: n } = Gr(), { currentUser: a, userContext: r } = at(), o = j(
|
|
249
|
+
() => Vr(a),
|
|
128
250
|
[a]
|
|
129
|
-
),
|
|
251
|
+
), c = j(() => (p) => o && o[p] !== void 0 && o[p] === !1 ? !1 : n(p), [o, n, e]), m = j(
|
|
130
252
|
() => {
|
|
131
253
|
var p, b, f, g, l;
|
|
132
254
|
return {
|
|
133
|
-
canEdit: ((p = r == null ? void 0 : r.permissions) == null ? void 0 : p.canEdit) ??
|
|
134
|
-
canUseFilters: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canEdit) ??
|
|
135
|
-
canManageDashboards: ((f = r == null ? void 0 : r.permissions) == null ? void 0 : f.canCreateDashboard) ??
|
|
136
|
-
canCreateDashboards: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canCreateDashboard) ??
|
|
137
|
-
canAccessVisuals: ((l = r == null ? void 0 : r.permissions) == null ? void 0 : l.canEdit) ??
|
|
255
|
+
canEdit: ((p = r == null ? void 0 : r.permissions) == null ? void 0 : p.canEdit) ?? Kr(a),
|
|
256
|
+
canUseFilters: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canEdit) ?? zr(a),
|
|
257
|
+
canManageDashboards: ((f = r == null ? void 0 : r.permissions) == null ? void 0 : f.canCreateDashboard) ?? qr(a),
|
|
258
|
+
canCreateDashboards: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canCreateDashboard) ?? Hr(a),
|
|
259
|
+
canAccessVisuals: ((l = r == null ? void 0 : r.permissions) == null ? void 0 : l.canEdit) ?? jr(a)
|
|
138
260
|
};
|
|
139
261
|
},
|
|
140
262
|
[a, r]
|
|
141
263
|
);
|
|
142
264
|
return {
|
|
143
265
|
displayPreferences: e,
|
|
144
|
-
shouldShowElement:
|
|
266
|
+
shouldShowElement: c,
|
|
145
267
|
permissions: m,
|
|
146
268
|
currentUser: a
|
|
147
269
|
};
|
|
148
270
|
}
|
|
149
|
-
function
|
|
271
|
+
function Tn(e, n = []) {
|
|
150
272
|
let a = [];
|
|
151
|
-
function r(
|
|
273
|
+
function r(c, m) {
|
|
152
274
|
const p = I.createContext(m);
|
|
153
|
-
p.displayName =
|
|
275
|
+
p.displayName = c + "Context";
|
|
154
276
|
const b = a.length;
|
|
155
277
|
a = [...a, m];
|
|
156
278
|
const f = (l) => {
|
|
157
279
|
var h;
|
|
158
|
-
const { scope:
|
|
280
|
+
const { scope: u, children: s, ...x } = l, v = ((h = u == null ? void 0 : u[e]) == null ? void 0 : h[b]) || p, w = I.useMemo(() => x, Object.values(x));
|
|
159
281
|
return /* @__PURE__ */ t(v.Provider, { value: w, children: s });
|
|
160
282
|
};
|
|
161
|
-
f.displayName =
|
|
162
|
-
function g(l,
|
|
283
|
+
f.displayName = c + "Provider";
|
|
284
|
+
function g(l, u) {
|
|
163
285
|
var v;
|
|
164
|
-
const s = ((v =
|
|
286
|
+
const s = ((v = u == null ? void 0 : u[e]) == null ? void 0 : v[b]) || p, x = I.useContext(s);
|
|
165
287
|
if (x) return x;
|
|
166
288
|
if (m !== void 0) return m;
|
|
167
|
-
throw new Error(`\`${l}\` must be used within \`${
|
|
289
|
+
throw new Error(`\`${l}\` must be used within \`${c}\``);
|
|
168
290
|
}
|
|
169
291
|
return [f, g];
|
|
170
292
|
}
|
|
171
293
|
const o = () => {
|
|
172
|
-
const
|
|
294
|
+
const c = a.map((m) => I.createContext(m));
|
|
173
295
|
return function(p) {
|
|
174
|
-
const b = (p == null ? void 0 : p[e]) ||
|
|
296
|
+
const b = (p == null ? void 0 : p[e]) || c;
|
|
175
297
|
return I.useMemo(
|
|
176
298
|
() => ({ [`__scope${e}`]: { ...p, [e]: b } }),
|
|
177
299
|
[p, b]
|
|
178
300
|
);
|
|
179
301
|
};
|
|
180
302
|
};
|
|
181
|
-
return o.scopeName = e, [r,
|
|
303
|
+
return o.scopeName = e, [r, $n(o, ...n)];
|
|
182
304
|
}
|
|
183
|
-
function
|
|
305
|
+
function $n(...e) {
|
|
184
306
|
const n = e[0];
|
|
185
307
|
if (e.length === 1) return n;
|
|
186
308
|
const a = () => {
|
|
@@ -188,9 +310,9 @@ function Pn(...e) {
|
|
|
188
310
|
useScope: o(),
|
|
189
311
|
scopeName: o.scopeName
|
|
190
312
|
}));
|
|
191
|
-
return function(
|
|
313
|
+
return function(c) {
|
|
192
314
|
const m = r.reduce((p, { useScope: b, scopeName: f }) => {
|
|
193
|
-
const l = b(
|
|
315
|
+
const l = b(c)[`__scope${f}`];
|
|
194
316
|
return { ...p, ...l };
|
|
195
317
|
}, {});
|
|
196
318
|
return I.useMemo(() => ({ [`__scope${n.scopeName}`]: m }), [m]);
|
|
@@ -198,7 +320,7 @@ function Pn(...e) {
|
|
|
198
320
|
};
|
|
199
321
|
return a.scopeName = n.scopeName, a;
|
|
200
322
|
}
|
|
201
|
-
var
|
|
323
|
+
var Fn = [
|
|
202
324
|
"a",
|
|
203
325
|
"button",
|
|
204
326
|
"div",
|
|
@@ -216,201 +338,86 @@ var _n = [
|
|
|
216
338
|
"span",
|
|
217
339
|
"svg",
|
|
218
340
|
"ul"
|
|
219
|
-
], st =
|
|
220
|
-
const a =
|
|
341
|
+
], st = Fn.reduce((e, n) => {
|
|
342
|
+
const a = $a(`Primitive.${n}`), r = I.forwardRef((o, c) => {
|
|
221
343
|
const { asChild: m, ...p } = o, b = m ? a : n;
|
|
222
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(b, { ...p, ref:
|
|
344
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(b, { ...p, ref: c });
|
|
223
345
|
});
|
|
224
346
|
return r.displayName = `Primitive.${n}`, { ...e, [n]: r };
|
|
225
|
-
}, {})
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
*
|
|
230
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
231
|
-
*
|
|
232
|
-
* This source code is licensed under the MIT license found in the
|
|
233
|
-
* LICENSE file in the root directory of this source tree.
|
|
234
|
-
*/
|
|
235
|
-
var $t;
|
|
236
|
-
function Rn() {
|
|
237
|
-
if ($t) return Ye;
|
|
238
|
-
$t = 1;
|
|
239
|
-
var e = Jt;
|
|
240
|
-
function n(l, c) {
|
|
241
|
-
return l === c && (l !== 0 || 1 / l === 1 / c) || l !== l && c !== c;
|
|
242
|
-
}
|
|
243
|
-
var a = typeof Object.is == "function" ? Object.is : n, r = e.useState, o = e.useEffect, d = e.useLayoutEffect, m = e.useDebugValue;
|
|
244
|
-
function p(l, c) {
|
|
245
|
-
var s = c(), x = r({ inst: { value: s, getSnapshot: c } }), v = x[0].inst, w = x[1];
|
|
246
|
-
return d(
|
|
247
|
-
function() {
|
|
248
|
-
v.value = s, v.getSnapshot = c, b(v) && w({ inst: v });
|
|
249
|
-
},
|
|
250
|
-
[l, s, c]
|
|
251
|
-
), o(
|
|
252
|
-
function() {
|
|
253
|
-
return b(v) && w({ inst: v }), l(function() {
|
|
254
|
-
b(v) && w({ inst: v });
|
|
255
|
-
});
|
|
256
|
-
},
|
|
257
|
-
[l]
|
|
258
|
-
), m(s), s;
|
|
259
|
-
}
|
|
260
|
-
function b(l) {
|
|
261
|
-
var c = l.getSnapshot;
|
|
262
|
-
l = l.value;
|
|
263
|
-
try {
|
|
264
|
-
var s = c();
|
|
265
|
-
return !a(l, s);
|
|
266
|
-
} catch {
|
|
267
|
-
return !0;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
function f(l, c) {
|
|
271
|
-
return c();
|
|
272
|
-
}
|
|
273
|
-
var g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : p;
|
|
274
|
-
return Ye.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : g, Ye;
|
|
275
|
-
}
|
|
276
|
-
var Je = {};
|
|
277
|
-
/**
|
|
278
|
-
* @license React
|
|
279
|
-
* use-sync-external-store-shim.development.js
|
|
280
|
-
*
|
|
281
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the MIT license found in the
|
|
284
|
-
* LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/
|
|
286
|
-
var Ft;
|
|
287
|
-
function Un() {
|
|
288
|
-
return Ft || (Ft = 1, process.env.NODE_ENV !== "production" && function() {
|
|
289
|
-
function e(s, x) {
|
|
290
|
-
return s === x && (s !== 0 || 1 / s === 1 / x) || s !== s && x !== x;
|
|
291
|
-
}
|
|
292
|
-
function n(s, x) {
|
|
293
|
-
g || o.startTransition === void 0 || (g = !0, console.error(
|
|
294
|
-
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
295
|
-
));
|
|
296
|
-
var v = x();
|
|
297
|
-
if (!l) {
|
|
298
|
-
var w = x();
|
|
299
|
-
d(v, w) || (console.error(
|
|
300
|
-
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
301
|
-
), l = !0);
|
|
302
|
-
}
|
|
303
|
-
w = m({
|
|
304
|
-
inst: { value: v, getSnapshot: x }
|
|
305
|
-
});
|
|
306
|
-
var h = w[0].inst, E = w[1];
|
|
307
|
-
return b(
|
|
308
|
-
function() {
|
|
309
|
-
h.value = v, h.getSnapshot = x, a(h) && E({ inst: h });
|
|
310
|
-
},
|
|
311
|
-
[s, v, x]
|
|
312
|
-
), p(
|
|
313
|
-
function() {
|
|
314
|
-
return a(h) && E({ inst: h }), s(function() {
|
|
315
|
-
a(h) && E({ inst: h });
|
|
316
|
-
});
|
|
317
|
-
},
|
|
318
|
-
[s]
|
|
319
|
-
), f(v), v;
|
|
320
|
-
}
|
|
321
|
-
function a(s) {
|
|
322
|
-
var x = s.getSnapshot;
|
|
323
|
-
s = s.value;
|
|
324
|
-
try {
|
|
325
|
-
var v = x();
|
|
326
|
-
return !d(s, v);
|
|
327
|
-
} catch {
|
|
328
|
-
return !0;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
function r(s, x) {
|
|
332
|
-
return x();
|
|
333
|
-
}
|
|
334
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
335
|
-
var o = Jt, d = typeof Object.is == "function" ? Object.is : e, m = o.useState, p = o.useEffect, b = o.useLayoutEffect, f = o.useDebugValue, g = !1, l = !1, c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
|
|
336
|
-
Je.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : c, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
337
|
-
}()), Je;
|
|
338
|
-
}
|
|
339
|
-
process.env.NODE_ENV === "production" ? rt.exports = Rn() : rt.exports = Un();
|
|
340
|
-
var Tn = rt.exports;
|
|
341
|
-
function $n() {
|
|
342
|
-
return Tn.useSyncExternalStore(
|
|
343
|
-
Fn,
|
|
347
|
+
}, {});
|
|
348
|
+
function Bn() {
|
|
349
|
+
return _n.useSyncExternalStore(
|
|
350
|
+
Gn,
|
|
344
351
|
() => !0,
|
|
345
352
|
() => !1
|
|
346
353
|
);
|
|
347
354
|
}
|
|
348
|
-
function
|
|
355
|
+
function Gn() {
|
|
349
356
|
return () => {
|
|
350
357
|
};
|
|
351
358
|
}
|
|
352
|
-
var it = "Avatar", [
|
|
359
|
+
var it = "Avatar", [Vn] = Tn(it), [jn, Xt] = Vn(it), Zt = I.forwardRef(
|
|
353
360
|
(e, n) => {
|
|
354
|
-
const { __scopeAvatar: a, ...r } = e, [o,
|
|
361
|
+
const { __scopeAvatar: a, ...r } = e, [o, c] = I.useState("idle");
|
|
355
362
|
return /* @__PURE__ */ t(
|
|
356
|
-
|
|
363
|
+
jn,
|
|
357
364
|
{
|
|
358
365
|
scope: a,
|
|
359
366
|
imageLoadingStatus: o,
|
|
360
|
-
onImageLoadingStatusChange:
|
|
367
|
+
onImageLoadingStatusChange: c,
|
|
361
368
|
children: /* @__PURE__ */ t(st.span, { ...r, ref: n })
|
|
362
369
|
}
|
|
363
370
|
);
|
|
364
371
|
}
|
|
365
372
|
);
|
|
366
|
-
|
|
367
|
-
var
|
|
373
|
+
Zt.displayName = it;
|
|
374
|
+
var er = "AvatarImage", tr = I.forwardRef(
|
|
368
375
|
(e, n) => {
|
|
369
376
|
const { __scopeAvatar: a, src: r, onLoadingStatusChange: o = () => {
|
|
370
|
-
}, ...
|
|
377
|
+
}, ...c } = e, m = Xt(er, a), p = Hn(r, c), b = Fa((f) => {
|
|
371
378
|
o(f), m.onImageLoadingStatusChange(f);
|
|
372
379
|
});
|
|
373
|
-
return
|
|
380
|
+
return et(() => {
|
|
374
381
|
p !== "idle" && b(p);
|
|
375
|
-
}, [p, b]), p === "loaded" ? /* @__PURE__ */ t(st.img, { ...
|
|
382
|
+
}, [p, b]), p === "loaded" ? /* @__PURE__ */ t(st.img, { ...c, ref: n, src: r }) : null;
|
|
376
383
|
}
|
|
377
384
|
);
|
|
378
|
-
|
|
379
|
-
var
|
|
385
|
+
tr.displayName = er;
|
|
386
|
+
var rr = "AvatarFallback", ar = I.forwardRef(
|
|
380
387
|
(e, n) => {
|
|
381
|
-
const { __scopeAvatar: a, delayMs: r, ...o } = e,
|
|
388
|
+
const { __scopeAvatar: a, delayMs: r, ...o } = e, c = Xt(rr, a), [m, p] = I.useState(r === void 0);
|
|
382
389
|
return I.useEffect(() => {
|
|
383
390
|
if (r !== void 0) {
|
|
384
391
|
const b = window.setTimeout(() => p(!0), r);
|
|
385
392
|
return () => window.clearTimeout(b);
|
|
386
393
|
}
|
|
387
|
-
}, [r]), m &&
|
|
394
|
+
}, [r]), m && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ t(st.span, { ...o, ref: n }) : null;
|
|
388
395
|
}
|
|
389
396
|
);
|
|
390
|
-
|
|
391
|
-
function
|
|
397
|
+
ar.displayName = rr;
|
|
398
|
+
function $t(e, n) {
|
|
392
399
|
return e ? n ? (e.src !== n && (e.src = n), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
|
|
393
400
|
}
|
|
394
|
-
function
|
|
395
|
-
const r =
|
|
396
|
-
() =>
|
|
401
|
+
function Hn(e, { referrerPolicy: n, crossOrigin: a }) {
|
|
402
|
+
const r = Bn(), o = I.useRef(null), c = r ? (o.current || (o.current = new window.Image()), o.current) : null, [m, p] = I.useState(
|
|
403
|
+
() => $t(c, e)
|
|
397
404
|
);
|
|
398
|
-
return
|
|
399
|
-
p(
|
|
400
|
-
}, [
|
|
405
|
+
return et(() => {
|
|
406
|
+
p($t(c, e));
|
|
407
|
+
}, [c, e]), et(() => {
|
|
401
408
|
const b = (l) => () => {
|
|
402
409
|
p(l);
|
|
403
410
|
};
|
|
404
|
-
if (!
|
|
411
|
+
if (!c) return;
|
|
405
412
|
const f = b("loaded"), g = b("error");
|
|
406
|
-
return
|
|
407
|
-
|
|
413
|
+
return c.addEventListener("load", f), c.addEventListener("error", g), n && (c.referrerPolicy = n), typeof a == "string" && (c.crossOrigin = a), () => {
|
|
414
|
+
c.removeEventListener("load", f), c.removeEventListener("error", g);
|
|
408
415
|
};
|
|
409
|
-
}, [
|
|
416
|
+
}, [c, a, n]), m;
|
|
410
417
|
}
|
|
411
|
-
var
|
|
412
|
-
const
|
|
413
|
-
|
|
418
|
+
var nr = Zt, or = tr, sr = ar;
|
|
419
|
+
const ir = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
|
|
420
|
+
nr,
|
|
414
421
|
{
|
|
415
422
|
ref: a,
|
|
416
423
|
className: be(
|
|
@@ -420,18 +427,18 @@ const lr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
|
|
|
420
427
|
...n
|
|
421
428
|
}
|
|
422
429
|
));
|
|
423
|
-
|
|
424
|
-
const
|
|
425
|
-
|
|
430
|
+
ir.displayName = nr.displayName;
|
|
431
|
+
const qn = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
|
|
432
|
+
or,
|
|
426
433
|
{
|
|
427
434
|
ref: a,
|
|
428
435
|
className: be("aspect-square h-full w-full", e),
|
|
429
436
|
...n
|
|
430
437
|
}
|
|
431
438
|
));
|
|
432
|
-
|
|
433
|
-
const
|
|
434
|
-
|
|
439
|
+
qn.displayName = or.displayName;
|
|
440
|
+
const dr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
|
|
441
|
+
sr,
|
|
435
442
|
{
|
|
436
443
|
ref: a,
|
|
437
444
|
className: be(
|
|
@@ -441,172 +448,172 @@ const cr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
|
|
|
441
448
|
...n
|
|
442
449
|
}
|
|
443
450
|
));
|
|
444
|
-
|
|
445
|
-
const
|
|
451
|
+
dr.displayName = sr.displayName;
|
|
452
|
+
const zn = async (e, n, a) => {
|
|
446
453
|
const r = `${e}/management/v1/groups`;
|
|
447
|
-
return await
|
|
448
|
-
},
|
|
454
|
+
return await Wt(r, n, a);
|
|
455
|
+
}, Kn = async (e, n, a, r) => {
|
|
449
456
|
const o = `${e}/management/v1/groups/${a}`;
|
|
450
|
-
return
|
|
451
|
-
},
|
|
457
|
+
return ot(o, n, "PATCH", r);
|
|
458
|
+
}, Qn = async (e, n, a) => {
|
|
452
459
|
const r = `${e}/management/v1/groups/${a}`;
|
|
453
|
-
await
|
|
454
|
-
},
|
|
460
|
+
await ot(r, n, "DELETE");
|
|
461
|
+
}, Wn = async (e, n, a, r) => {
|
|
455
462
|
const o = `${e}/management/v1/groups/${a}/members`;
|
|
456
|
-
return await
|
|
457
|
-
},
|
|
463
|
+
return await Wt(o, n, r);
|
|
464
|
+
}, Yn = async (e, n, a, r) => {
|
|
458
465
|
const o = `${e}/management/v1/groups/${a}/members`;
|
|
459
|
-
await
|
|
466
|
+
await ot(o, n, "DELETE", r);
|
|
460
467
|
};
|
|
461
|
-
function
|
|
462
|
-
const { authToken: e, tokenProps: n } =
|
|
463
|
-
return
|
|
464
|
-
mutationFn: (r) =>
|
|
468
|
+
function Jn() {
|
|
469
|
+
const { authToken: e, tokenProps: n } = z(), a = ge();
|
|
470
|
+
return xe({
|
|
471
|
+
mutationFn: (r) => zn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
|
|
465
472
|
onSuccess: () => {
|
|
466
|
-
a.invalidateQueries({ queryKey: ["groups"] }),
|
|
473
|
+
a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group created successfully");
|
|
467
474
|
},
|
|
468
475
|
onError: (r) => {
|
|
469
|
-
console.error("Failed to create group:", r),
|
|
470
|
-
description:
|
|
476
|
+
console.error("Failed to create group:", r), D.error("Failed to create group", {
|
|
477
|
+
description: ve(r, "Failed to create group")
|
|
471
478
|
});
|
|
472
479
|
}
|
|
473
480
|
});
|
|
474
481
|
}
|
|
475
|
-
function
|
|
476
|
-
const { authToken: e, tokenProps: n } =
|
|
477
|
-
return
|
|
482
|
+
function Xn() {
|
|
483
|
+
const { authToken: e, tokenProps: n } = z(), a = ge();
|
|
484
|
+
return xe({
|
|
478
485
|
mutationFn: ({
|
|
479
486
|
groupId: r,
|
|
480
487
|
data: o
|
|
481
|
-
}) =>
|
|
488
|
+
}) => Kn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
|
|
482
489
|
onSuccess: (r, o) => {
|
|
483
|
-
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }),
|
|
490
|
+
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group updated successfully");
|
|
484
491
|
},
|
|
485
492
|
onError: (r) => {
|
|
486
|
-
console.error("Failed to update group:", r),
|
|
487
|
-
description:
|
|
493
|
+
console.error("Failed to update group:", r), D.error("Failed to update group", {
|
|
494
|
+
description: ve(r, "Failed to update group")
|
|
488
495
|
});
|
|
489
496
|
}
|
|
490
497
|
});
|
|
491
498
|
}
|
|
492
|
-
function
|
|
493
|
-
const { authToken: e, tokenProps: n } =
|
|
494
|
-
return
|
|
495
|
-
mutationFn: (r) =>
|
|
499
|
+
function Zn() {
|
|
500
|
+
const { authToken: e, tokenProps: n } = z(), a = ge();
|
|
501
|
+
return xe({
|
|
502
|
+
mutationFn: (r) => Qn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
|
|
496
503
|
onSuccess: (r, o) => {
|
|
497
|
-
a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", o] }),
|
|
504
|
+
a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", o] }), D.success("Group deleted successfully");
|
|
498
505
|
},
|
|
499
506
|
onError: (r) => {
|
|
500
|
-
console.error("Failed to delete group:", r),
|
|
501
|
-
description:
|
|
507
|
+
console.error("Failed to delete group:", r), D.error("Failed to delete group", {
|
|
508
|
+
description: ve(r, "Failed to delete group")
|
|
502
509
|
});
|
|
503
510
|
}
|
|
504
511
|
});
|
|
505
512
|
}
|
|
506
|
-
function
|
|
507
|
-
const { authToken: e, tokenProps: n } =
|
|
508
|
-
return
|
|
513
|
+
function eo() {
|
|
514
|
+
const { authToken: e, tokenProps: n } = z(), a = ge();
|
|
515
|
+
return xe({
|
|
509
516
|
mutationFn: ({
|
|
510
517
|
groupId: r,
|
|
511
518
|
data: o
|
|
512
|
-
}) =>
|
|
519
|
+
}) => Wn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
|
|
513
520
|
onSuccess: (r, o) => {
|
|
514
521
|
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
|
|
515
522
|
queryKey: ["group-members", o.groupId]
|
|
516
|
-
}), a.invalidateQueries({ queryKey: ["groups"] }),
|
|
523
|
+
}), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Members added successfully");
|
|
517
524
|
},
|
|
518
525
|
onError: (r) => {
|
|
519
|
-
console.error("Failed to add group members:", r),
|
|
520
|
-
description:
|
|
526
|
+
console.error("Failed to add group members:", r), D.error("Failed to add members", {
|
|
527
|
+
description: ve(r, "Failed to add members")
|
|
521
528
|
});
|
|
522
529
|
}
|
|
523
530
|
});
|
|
524
531
|
}
|
|
525
|
-
function
|
|
526
|
-
const { authToken: e, tokenProps: n } =
|
|
527
|
-
return
|
|
532
|
+
function to() {
|
|
533
|
+
const { authToken: e, tokenProps: n } = z(), a = ge();
|
|
534
|
+
return xe({
|
|
528
535
|
mutationFn: ({
|
|
529
536
|
groupId: r,
|
|
530
537
|
data: o
|
|
531
|
-
}) =>
|
|
538
|
+
}) => Yn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
|
|
532
539
|
onSuccess: (r, o) => {
|
|
533
540
|
a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
|
|
534
541
|
queryKey: ["group-members", o.groupId]
|
|
535
|
-
}), a.invalidateQueries({ queryKey: ["groups"] }),
|
|
542
|
+
}), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Members removed successfully");
|
|
536
543
|
},
|
|
537
544
|
onError: (r) => {
|
|
538
|
-
console.error("Failed to remove group members:", r),
|
|
539
|
-
description:
|
|
545
|
+
console.error("Failed to remove group members:", r), D.error("Failed to remove members", {
|
|
546
|
+
description: ve(r, "Failed to remove members")
|
|
540
547
|
});
|
|
541
548
|
}
|
|
542
549
|
});
|
|
543
550
|
}
|
|
544
|
-
const
|
|
545
|
-
function
|
|
551
|
+
const ro = [];
|
|
552
|
+
function ao({
|
|
546
553
|
open: e,
|
|
547
554
|
onOpenChange: n
|
|
548
555
|
}) {
|
|
549
556
|
var E, A, L;
|
|
550
|
-
const { tokenProps: a } =
|
|
557
|
+
const { tokenProps: a } = z(), { currentUser: r } = at(), o = (r == null ? void 0 : r.type) === "tenant", c = a == null ? void 0 : a.tenantId, {
|
|
551
558
|
groups: m,
|
|
552
559
|
isLoading: p,
|
|
553
560
|
error: b,
|
|
554
561
|
refetch: f
|
|
555
|
-
} =
|
|
562
|
+
} = Qr({
|
|
556
563
|
type: o ? "TENANT_GROUP" : "all",
|
|
557
|
-
tenantId: o ?
|
|
564
|
+
tenantId: o ? c : void 0,
|
|
558
565
|
includeMembers: !1
|
|
559
|
-
}), g = b ?
|
|
566
|
+
}), g = b ? cr(b, "Unable to load groups.") : null, [l, u] = S({ kind: "list" }), [s, x] = S(null), v = Zn();
|
|
560
567
|
_e(() => {
|
|
561
|
-
e || (
|
|
568
|
+
e || (u({ kind: "list" }), x(null));
|
|
562
569
|
}, [e]);
|
|
563
570
|
const w = l.kind === "members" && m.find((N) => N.id === l.groupId) || null, h = async () => {
|
|
564
571
|
if (s)
|
|
565
572
|
try {
|
|
566
|
-
await v.mutateAsync(s.id), x(null),
|
|
573
|
+
await v.mutateAsync(s.id), x(null), u({ kind: "list" }), f();
|
|
567
574
|
} catch {
|
|
568
575
|
}
|
|
569
576
|
};
|
|
570
|
-
return /* @__PURE__ */ t(
|
|
577
|
+
return /* @__PURE__ */ t(Vt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(jt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
|
|
571
578
|
l.kind === "list" ? /* @__PURE__ */ i("div", { className: "shrink-0 border-b border-border px-5 pt-4 pb-3.5", children: [
|
|
572
|
-
/* @__PURE__ */ t(
|
|
573
|
-
/* @__PURE__ */ t(
|
|
579
|
+
/* @__PURE__ */ t(Xe, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
|
|
580
|
+
/* @__PURE__ */ t(Ze, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
|
|
574
581
|
] }) : l.kind === "create" ? /* @__PURE__ */ i("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
|
|
575
582
|
/* @__PURE__ */ t(
|
|
576
583
|
"button",
|
|
577
584
|
{
|
|
578
585
|
type: "button",
|
|
579
|
-
onClick: () =>
|
|
586
|
+
onClick: () => u({ kind: "list" }),
|
|
580
587
|
"aria-label": "Back",
|
|
581
588
|
className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
582
|
-
children: /* @__PURE__ */ t(
|
|
589
|
+
children: /* @__PURE__ */ t(Ht, { className: "h-3.5 w-3.5" })
|
|
583
590
|
}
|
|
584
591
|
),
|
|
585
|
-
/* @__PURE__ */ t(
|
|
586
|
-
/* @__PURE__ */ t(
|
|
592
|
+
/* @__PURE__ */ t(Xe, { className: "truncate text-[13px] font-medium", children: "New group" }),
|
|
593
|
+
/* @__PURE__ */ t(Ze, { className: "sr-only", children: "Create a new group to organize members." })
|
|
587
594
|
] }) : null,
|
|
588
595
|
l.kind === "list" && /* @__PURE__ */ t(
|
|
589
|
-
|
|
596
|
+
no,
|
|
590
597
|
{
|
|
591
598
|
groups: m,
|
|
592
599
|
isLoading: p,
|
|
593
600
|
errorMessage: g,
|
|
594
601
|
onRetry: () => f(),
|
|
595
602
|
currentUserId: r == null ? void 0 : r.id,
|
|
596
|
-
onOpenGroup: (N) =>
|
|
597
|
-
onCreate: () =>
|
|
603
|
+
onOpenGroup: (N) => u({ kind: "members", groupId: N }),
|
|
604
|
+
onCreate: () => u({ kind: "create" }),
|
|
598
605
|
onDeleteRequest: (N) => x(N)
|
|
599
606
|
}
|
|
600
607
|
),
|
|
601
608
|
l.kind === "members" && w && /* @__PURE__ */ t(
|
|
602
|
-
|
|
609
|
+
io,
|
|
603
610
|
{
|
|
604
611
|
group: w,
|
|
605
612
|
isTenantViewer: o,
|
|
606
613
|
canEdit: ((E = w.permissions) == null ? void 0 : E.canEdit) ?? w.createdBy === (r == null ? void 0 : r.id),
|
|
607
614
|
canDelete: ((A = w.permissions) == null ? void 0 : A.canDelete) ?? w.createdBy === (r == null ? void 0 : r.id),
|
|
608
615
|
canManageMembers: ((L = w.permissions) == null ? void 0 : L.canManageMembers) ?? w.createdBy === (r == null ? void 0 : r.id),
|
|
609
|
-
onBack: () =>
|
|
616
|
+
onBack: () => u({ kind: "list" }),
|
|
610
617
|
onMembersChanged: f,
|
|
611
618
|
onUpdated: f,
|
|
612
619
|
onRequestDelete: () => x(w)
|
|
@@ -614,13 +621,13 @@ function to({
|
|
|
614
621
|
w.id
|
|
615
622
|
),
|
|
616
623
|
l.kind === "create" && /* @__PURE__ */ t(
|
|
617
|
-
|
|
624
|
+
co,
|
|
618
625
|
{
|
|
619
626
|
isTenantUser: o,
|
|
620
|
-
tenantId:
|
|
621
|
-
onCancel: () =>
|
|
627
|
+
tenantId: c,
|
|
628
|
+
onCancel: () => u({ kind: "list" }),
|
|
622
629
|
onCreated: (N) => {
|
|
623
|
-
f(),
|
|
630
|
+
f(), u({ kind: "members", groupId: N });
|
|
624
631
|
}
|
|
625
632
|
}
|
|
626
633
|
),
|
|
@@ -650,7 +657,7 @@ function to({
|
|
|
650
657
|
disabled: v.isPending,
|
|
651
658
|
className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-rose-600 px-2.5 text-[12px] font-medium text-white hover:bg-rose-700 disabled:opacity-60",
|
|
652
659
|
children: [
|
|
653
|
-
v.isPending ? /* @__PURE__ */ t(Pe, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(
|
|
660
|
+
v.isPending ? /* @__PURE__ */ t(Pe, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(nt, { className: "h-3 w-3" }),
|
|
654
661
|
"Delete group"
|
|
655
662
|
]
|
|
656
663
|
}
|
|
@@ -659,17 +666,17 @@ function to({
|
|
|
659
666
|
] })
|
|
660
667
|
] }) });
|
|
661
668
|
}
|
|
662
|
-
function
|
|
669
|
+
function no({
|
|
663
670
|
groups: e,
|
|
664
671
|
isLoading: n,
|
|
665
672
|
errorMessage: a,
|
|
666
673
|
onRetry: r,
|
|
667
674
|
currentUserId: o,
|
|
668
|
-
onOpenGroup:
|
|
675
|
+
onOpenGroup: c,
|
|
669
676
|
onCreate: m,
|
|
670
677
|
onDeleteRequest: p
|
|
671
678
|
}) {
|
|
672
|
-
const [b, f] = S(""), g =
|
|
679
|
+
const [b, f] = S(""), g = j(
|
|
673
680
|
() => e.filter(
|
|
674
681
|
(l) => !b.trim() || l.name.toLowerCase().includes(b.toLowerCase()) || (l.description || "").toLowerCase().includes(b.toLowerCase())
|
|
675
682
|
),
|
|
@@ -678,7 +685,7 @@ function ro({
|
|
|
678
685
|
return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
679
686
|
/* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
|
|
680
687
|
/* @__PURE__ */ i("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
|
|
681
|
-
/* @__PURE__ */ t(
|
|
688
|
+
/* @__PURE__ */ t(xn, { className: "h-3 w-3 text-muted-foreground" }),
|
|
682
689
|
/* @__PURE__ */ t(
|
|
683
690
|
"input",
|
|
684
691
|
{
|
|
@@ -694,7 +701,7 @@ function ro({
|
|
|
694
701
|
type: "button",
|
|
695
702
|
onClick: () => f(""),
|
|
696
703
|
className: "flex h-4 w-4 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
697
|
-
children: /* @__PURE__ */ t(
|
|
704
|
+
children: /* @__PURE__ */ t(Kt, { className: "h-2.5 w-2.5" })
|
|
698
705
|
}
|
|
699
706
|
)
|
|
700
707
|
] }),
|
|
@@ -718,13 +725,13 @@ function ro({
|
|
|
718
725
|
},
|
|
719
726
|
l
|
|
720
727
|
)) }) : a ? /* @__PURE__ */ t(
|
|
721
|
-
|
|
728
|
+
lr,
|
|
722
729
|
{
|
|
723
730
|
title: "Can't load groups",
|
|
724
731
|
message: a,
|
|
725
732
|
onRetry: r
|
|
726
733
|
}
|
|
727
|
-
) : g.length === 0 && e.length === 0 ? /* @__PURE__ */ t(
|
|
734
|
+
) : g.length === 0 && e.length === 0 ? /* @__PURE__ */ t(so, { onCreate: m }) : g.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
|
|
728
735
|
/* @__PURE__ */ i("div", { className: "text-[12px] text-foreground", children: [
|
|
729
736
|
'No groups match "',
|
|
730
737
|
b,
|
|
@@ -732,13 +739,13 @@ function ro({
|
|
|
732
739
|
] }),
|
|
733
740
|
/* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: "Try a different search." })
|
|
734
741
|
] }) : g.map((l) => {
|
|
735
|
-
var
|
|
742
|
+
var u;
|
|
736
743
|
return /* @__PURE__ */ t(
|
|
737
|
-
|
|
744
|
+
oo,
|
|
738
745
|
{
|
|
739
746
|
group: l,
|
|
740
|
-
canDelete: ((
|
|
741
|
-
onClick: () =>
|
|
747
|
+
canDelete: ((u = l.permissions) == null ? void 0 : u.canDelete) ?? l.createdBy === o,
|
|
748
|
+
onClick: () => c(l.id),
|
|
742
749
|
onDelete: () => p(l)
|
|
743
750
|
},
|
|
744
751
|
l.id
|
|
@@ -746,7 +753,7 @@ function ro({
|
|
|
746
753
|
}) })
|
|
747
754
|
] });
|
|
748
755
|
}
|
|
749
|
-
function
|
|
756
|
+
function oo({
|
|
750
757
|
group: e,
|
|
751
758
|
canDelete: n,
|
|
752
759
|
onClick: a,
|
|
@@ -754,7 +761,7 @@ function ao({
|
|
|
754
761
|
}) {
|
|
755
762
|
let o = "";
|
|
756
763
|
try {
|
|
757
|
-
o =
|
|
764
|
+
o = Yt(new Date(e.createdAt), "MMM d, yyyy");
|
|
758
765
|
} catch {
|
|
759
766
|
o = "";
|
|
760
767
|
}
|
|
@@ -765,12 +772,12 @@ function ao({
|
|
|
765
772
|
onClick: a,
|
|
766
773
|
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",
|
|
767
774
|
children: [
|
|
768
|
-
/* @__PURE__ */ t("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__ */ t(
|
|
775
|
+
/* @__PURE__ */ t("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__ */ t(Jr, { className: "h-3.5 w-3.5" }) }),
|
|
769
776
|
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
770
777
|
/* @__PURE__ */ t("div", { className: "truncate text-[13px] font-medium text-foreground", children: e.name }),
|
|
771
778
|
/* @__PURE__ */ i("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
|
|
772
779
|
/* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1", children: [
|
|
773
|
-
/* @__PURE__ */ t(
|
|
780
|
+
/* @__PURE__ */ t(Jt, { className: "h-2.5 w-2.5" }),
|
|
774
781
|
e.memberCount,
|
|
775
782
|
" member",
|
|
776
783
|
e.memberCount === 1 ? "" : "s"
|
|
@@ -778,7 +785,7 @@ function ao({
|
|
|
778
785
|
o && /* @__PURE__ */ i($, { children: [
|
|
779
786
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
780
787
|
/* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1", children: [
|
|
781
|
-
/* @__PURE__ */ t(
|
|
788
|
+
/* @__PURE__ */ t(zt, { className: "h-2.5 w-2.5" }),
|
|
782
789
|
o
|
|
783
790
|
] })
|
|
784
791
|
] }),
|
|
@@ -794,26 +801,26 @@ function ao({
|
|
|
794
801
|
{
|
|
795
802
|
role: "button",
|
|
796
803
|
tabIndex: 0,
|
|
797
|
-
onClick: (
|
|
798
|
-
|
|
804
|
+
onClick: (c) => {
|
|
805
|
+
c.stopPropagation(), r();
|
|
799
806
|
},
|
|
800
|
-
onKeyDown: (
|
|
801
|
-
(
|
|
807
|
+
onKeyDown: (c) => {
|
|
808
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), c.stopPropagation(), r());
|
|
802
809
|
},
|
|
803
810
|
"aria-label": `Delete ${e.name}`,
|
|
804
811
|
className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
805
|
-
children: /* @__PURE__ */ t(
|
|
812
|
+
children: /* @__PURE__ */ t(nt, { className: "h-3 w-3" })
|
|
806
813
|
}
|
|
807
814
|
),
|
|
808
|
-
/* @__PURE__ */ t(
|
|
815
|
+
/* @__PURE__ */ t(vn, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
809
816
|
] })
|
|
810
817
|
]
|
|
811
818
|
}
|
|
812
819
|
);
|
|
813
820
|
}
|
|
814
|
-
function
|
|
821
|
+
function so({ onCreate: e }) {
|
|
815
822
|
return /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
|
|
816
|
-
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ t(
|
|
823
|
+
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ t(qt, { className: "h-4 w-4" }) }),
|
|
817
824
|
/* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
|
|
818
825
|
/* @__PURE__ */ t("div", { className: "max-w-[320px] text-[11.5px] leading-[1.55] text-muted-foreground", children: "Groups let you grant shared access to dashboards. Create one and add members." }),
|
|
819
826
|
/* @__PURE__ */ i(
|
|
@@ -830,13 +837,13 @@ function no({ onCreate: e }) {
|
|
|
830
837
|
)
|
|
831
838
|
] });
|
|
832
839
|
}
|
|
833
|
-
function
|
|
840
|
+
function io({
|
|
834
841
|
group: e,
|
|
835
842
|
isTenantViewer: n,
|
|
836
843
|
canEdit: a,
|
|
837
844
|
canDelete: r,
|
|
838
845
|
canManageMembers: o,
|
|
839
|
-
onBack:
|
|
846
|
+
onBack: c,
|
|
840
847
|
onMembersChanged: m,
|
|
841
848
|
onUpdated: p,
|
|
842
849
|
onRequestDelete: b
|
|
@@ -845,21 +852,21 @@ function oo({
|
|
|
845
852
|
data: f,
|
|
846
853
|
isLoading: g,
|
|
847
854
|
error: l,
|
|
848
|
-
refetch:
|
|
849
|
-
} =
|
|
855
|
+
refetch: u
|
|
856
|
+
} = Wr(e.id), s = (f == null ? void 0 : f.members) ?? ro, x = l ? cr(l, "Unable to load members for this group.") : null, v = e.type === "TENANT_GROUP" ? "tenant" : "organization", { users: w } = Yr({
|
|
850
857
|
type: v,
|
|
851
858
|
tenantId: e.tenantId || void 0,
|
|
852
859
|
active: !0,
|
|
853
860
|
limit: 200
|
|
854
|
-
}), h =
|
|
861
|
+
}), h = j(
|
|
855
862
|
() => new Set(s.map((y) => y.userId)),
|
|
856
863
|
[s]
|
|
857
|
-
), E =
|
|
858
|
-
const y =
|
|
864
|
+
), E = eo(), A = to(), L = Xn(), [N, k] = S(!1), [re, ae] = S(e.name), [ye, K] = S(!1), [Q, W] = S(e.description || ""), [Y, we] = S(""), [Ne, ne] = S(!1), oe = j(() => {
|
|
865
|
+
const y = Y.trim().toLowerCase();
|
|
859
866
|
return w.filter((U) => !h.has(U.id)).filter(
|
|
860
867
|
(U) => !y || (U.name || "").toLowerCase().includes(y) || (U.email || "").toLowerCase().includes(y)
|
|
861
868
|
).slice(0, 50);
|
|
862
|
-
}, [w, h,
|
|
869
|
+
}, [w, h, Y]), Se = async () => {
|
|
863
870
|
const y = re.trim();
|
|
864
871
|
if (k(!1), y.length >= 3 && y !== e.name)
|
|
865
872
|
try {
|
|
@@ -870,8 +877,8 @@ function oo({
|
|
|
870
877
|
} catch {
|
|
871
878
|
}
|
|
872
879
|
}, se = async () => {
|
|
873
|
-
const y =
|
|
874
|
-
if (
|
|
880
|
+
const y = Q.trim();
|
|
881
|
+
if (K(!1), y !== (e.description || ""))
|
|
875
882
|
try {
|
|
876
883
|
await L.mutateAsync({
|
|
877
884
|
groupId: e.id,
|
|
@@ -889,23 +896,23 @@ function oo({
|
|
|
889
896
|
userIds: [y.id],
|
|
890
897
|
userType: v === "tenant" ? "tenant" : "org"
|
|
891
898
|
}
|
|
892
|
-
}),
|
|
899
|
+
}), u(), m();
|
|
893
900
|
} catch {
|
|
894
901
|
}
|
|
895
902
|
}
|
|
896
|
-
},
|
|
903
|
+
}, J = async (y) => {
|
|
897
904
|
if (o)
|
|
898
905
|
try {
|
|
899
906
|
await A.mutateAsync({
|
|
900
907
|
groupId: e.id,
|
|
901
908
|
data: { userIds: [y] }
|
|
902
|
-
}),
|
|
909
|
+
}), u(), m();
|
|
903
910
|
} catch {
|
|
904
911
|
}
|
|
905
912
|
};
|
|
906
913
|
let F = "";
|
|
907
914
|
try {
|
|
908
|
-
F =
|
|
915
|
+
F = Yt(new Date(e.createdAt), "MMM d, yyyy");
|
|
909
916
|
} catch {
|
|
910
917
|
F = "";
|
|
911
918
|
}
|
|
@@ -915,10 +922,10 @@ function oo({
|
|
|
915
922
|
"button",
|
|
916
923
|
{
|
|
917
924
|
type: "button",
|
|
918
|
-
onClick:
|
|
925
|
+
onClick: c,
|
|
919
926
|
"aria-label": "Back",
|
|
920
927
|
className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
921
|
-
children: /* @__PURE__ */ t(
|
|
928
|
+
children: /* @__PURE__ */ t(Ht, { className: "h-3.5 w-3.5" })
|
|
922
929
|
}
|
|
923
930
|
),
|
|
924
931
|
N ? /* @__PURE__ */ t(
|
|
@@ -947,7 +954,7 @@ function oo({
|
|
|
947
954
|
}
|
|
948
955
|
),
|
|
949
956
|
/* @__PURE__ */ i("span", { className: "ml-1 inline-flex shrink-0 items-center gap-1 text-[10.5px] text-muted-foreground", children: [
|
|
950
|
-
/* @__PURE__ */ t(
|
|
957
|
+
/* @__PURE__ */ t(Jt, { className: "h-2.5 w-2.5" }),
|
|
951
958
|
s.length,
|
|
952
959
|
" member",
|
|
953
960
|
s.length === 1 ? "" : "s"
|
|
@@ -959,11 +966,11 @@ function oo({
|
|
|
959
966
|
{
|
|
960
967
|
autoFocus: !0,
|
|
961
968
|
rows: 2,
|
|
962
|
-
value:
|
|
963
|
-
onChange: (y) =>
|
|
969
|
+
value: Q,
|
|
970
|
+
onChange: (y) => W(y.target.value),
|
|
964
971
|
maxLength: 200,
|
|
965
972
|
onKeyDown: (y) => {
|
|
966
|
-
y.key === "Escape" && (
|
|
973
|
+
y.key === "Escape" && (W(e.description || ""), K(!1)), y.key === "Enter" && (y.metaKey || y.ctrlKey) && se();
|
|
967
974
|
},
|
|
968
975
|
placeholder: "What is this group for?",
|
|
969
976
|
className: "block w-full resize-none rounded-[5px] border border-border bg-background px-2 py-1.5 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
|
|
@@ -971,7 +978,7 @@ function oo({
|
|
|
971
978
|
),
|
|
972
979
|
/* @__PURE__ */ i("div", { className: "mt-1.5 flex items-center justify-between", children: [
|
|
973
980
|
/* @__PURE__ */ i("span", { className: "text-[10.5px] text-muted-foreground", children: [
|
|
974
|
-
|
|
981
|
+
Q.length,
|
|
975
982
|
"/200 · Esc to cancel · ⌘↩ to save"
|
|
976
983
|
] }),
|
|
977
984
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
|
|
@@ -980,7 +987,7 @@ function oo({
|
|
|
980
987
|
{
|
|
981
988
|
type: "button",
|
|
982
989
|
onClick: () => {
|
|
983
|
-
|
|
990
|
+
W(e.description || ""), K(!1);
|
|
984
991
|
},
|
|
985
992
|
className: "h-6 rounded-[5px] px-2 text-[11px] font-medium text-foreground/80 hover:bg-accent",
|
|
986
993
|
children: "Cancel"
|
|
@@ -1002,7 +1009,7 @@ function oo({
|
|
|
1002
1009
|
{
|
|
1003
1010
|
type: "button",
|
|
1004
1011
|
onClick: () => {
|
|
1005
|
-
a && (
|
|
1012
|
+
a && (W(e.description || ""), K(!0));
|
|
1006
1013
|
},
|
|
1007
1014
|
disabled: !a,
|
|
1008
1015
|
title: a ? "Click to edit description" : void 0,
|
|
@@ -1017,9 +1024,9 @@ function oo({
|
|
|
1017
1024
|
}
|
|
1018
1025
|
) }),
|
|
1019
1026
|
o && /* @__PURE__ */ t(
|
|
1020
|
-
|
|
1027
|
+
lo,
|
|
1021
1028
|
{
|
|
1022
|
-
query:
|
|
1029
|
+
query: Y,
|
|
1023
1030
|
setQuery: we,
|
|
1024
1031
|
open: Ne,
|
|
1025
1032
|
setOpen: ne,
|
|
@@ -1036,25 +1043,25 @@ function oo({
|
|
|
1036
1043
|
},
|
|
1037
1044
|
y
|
|
1038
1045
|
)) }) : x ? /* @__PURE__ */ t(
|
|
1039
|
-
|
|
1046
|
+
lr,
|
|
1040
1047
|
{
|
|
1041
1048
|
title: "Can't load members",
|
|
1042
1049
|
message: x,
|
|
1043
|
-
onRetry: () =>
|
|
1050
|
+
onRetry: () => u()
|
|
1044
1051
|
}
|
|
1045
1052
|
) : s.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
|
|
1046
1053
|
/* @__PURE__ */ t("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
|
|
1047
1054
|
/* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: o ? "Search above to add people to this group." : "This group does not have any members." })
|
|
1048
1055
|
] }) : s.map((y) => {
|
|
1049
|
-
var U,
|
|
1056
|
+
var U, H, ie, q, ke, de;
|
|
1050
1057
|
return /* @__PURE__ */ i(
|
|
1051
1058
|
"div",
|
|
1052
1059
|
{
|
|
1053
1060
|
className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
|
|
1054
1061
|
children: [
|
|
1055
|
-
/* @__PURE__ */ t(
|
|
1062
|
+
/* @__PURE__ */ t(ur, { name: ((U = y.user) == null ? void 0 : U.name) || ((H = y.user) == null ? void 0 : H.email) || "?" }),
|
|
1056
1063
|
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
1057
|
-
/* @__PURE__ */ t("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((ie = y.user) == null ? void 0 : ie.name) || ((
|
|
1064
|
+
/* @__PURE__ */ t("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((ie = y.user) == null ? void 0 : ie.name) || ((q = y.user) == null ? void 0 : q.email) || "Unknown" }),
|
|
1058
1065
|
((ke = y.user) == null ? void 0 : ke.email) && y.user.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: y.user.email })
|
|
1059
1066
|
] }),
|
|
1060
1067
|
!n && /* @__PURE__ */ t("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: y.userType }),
|
|
@@ -1062,11 +1069,11 @@ function oo({
|
|
|
1062
1069
|
"button",
|
|
1063
1070
|
{
|
|
1064
1071
|
type: "button",
|
|
1065
|
-
onClick: () =>
|
|
1072
|
+
onClick: () => J(y.userId),
|
|
1066
1073
|
disabled: !o || A.isPending,
|
|
1067
1074
|
"aria-label": `Remove ${((de = y.user) == null ? void 0 : de.name) || "member"}`,
|
|
1068
1075
|
className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100 disabled:opacity-30",
|
|
1069
|
-
children: /* @__PURE__ */ t(
|
|
1076
|
+
children: /* @__PURE__ */ t(Kt, { className: "h-3 w-3" })
|
|
1070
1077
|
}
|
|
1071
1078
|
)
|
|
1072
1079
|
]
|
|
@@ -1081,20 +1088,20 @@ function oo({
|
|
|
1081
1088
|
onClick: b,
|
|
1082
1089
|
className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] border border-rose-200 bg-background px-2.5 text-[12px] font-medium text-rose-600 hover:bg-rose-50 dark:border-rose-900/60 dark:text-rose-400 dark:hover:bg-rose-950/30",
|
|
1083
1090
|
children: [
|
|
1084
|
-
/* @__PURE__ */ t(
|
|
1091
|
+
/* @__PURE__ */ t(nt, { className: "h-3 w-3" }),
|
|
1085
1092
|
"Delete group"
|
|
1086
1093
|
]
|
|
1087
1094
|
}
|
|
1088
1095
|
) })
|
|
1089
1096
|
] });
|
|
1090
1097
|
}
|
|
1091
|
-
function
|
|
1098
|
+
function co({
|
|
1092
1099
|
isTenantUser: e,
|
|
1093
1100
|
tenantId: n,
|
|
1094
1101
|
onCancel: a,
|
|
1095
1102
|
onCreated: r
|
|
1096
1103
|
}) {
|
|
1097
|
-
const [o,
|
|
1104
|
+
const [o, c] = S(""), [m, p] = S(""), [b, f] = S(null), g = Jn(), l = o.trim().length >= 3 && o.trim().length <= 50, u = async () => {
|
|
1098
1105
|
if (!l) return;
|
|
1099
1106
|
f(null);
|
|
1100
1107
|
const s = {
|
|
@@ -1112,13 +1119,13 @@ function so({
|
|
|
1112
1119
|
};
|
|
1113
1120
|
return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
|
|
1114
1121
|
/* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
|
|
1115
|
-
/* @__PURE__ */ t(
|
|
1122
|
+
/* @__PURE__ */ t(Ft, { children: "Name" }),
|
|
1116
1123
|
/* @__PURE__ */ t(
|
|
1117
1124
|
"input",
|
|
1118
1125
|
{
|
|
1119
1126
|
autoFocus: !0,
|
|
1120
1127
|
value: o,
|
|
1121
|
-
onChange: (s) =>
|
|
1128
|
+
onChange: (s) => c(s.target.value),
|
|
1122
1129
|
placeholder: "Marketing leads, North America sales, …",
|
|
1123
1130
|
maxLength: 50,
|
|
1124
1131
|
className: "mt-1 block h-7 w-full rounded-[5px] border border-border bg-background px-2 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
|
|
@@ -1126,7 +1133,7 @@ function so({
|
|
|
1126
1133
|
),
|
|
1127
1134
|
/* @__PURE__ */ t("div", { className: "mt-1 text-[10.5px] text-muted-foreground", children: "3–50 characters." }),
|
|
1128
1135
|
/* @__PURE__ */ i("div", { className: "mt-4", children: [
|
|
1129
|
-
/* @__PURE__ */ t(
|
|
1136
|
+
/* @__PURE__ */ t(Ft, { children: "Description (optional)" }),
|
|
1130
1137
|
/* @__PURE__ */ t(
|
|
1131
1138
|
"textarea",
|
|
1132
1139
|
{
|
|
@@ -1160,7 +1167,7 @@ function so({
|
|
|
1160
1167
|
"button",
|
|
1161
1168
|
{
|
|
1162
1169
|
type: "button",
|
|
1163
|
-
onClick:
|
|
1170
|
+
onClick: u,
|
|
1164
1171
|
disabled: !l || g.isPending,
|
|
1165
1172
|
className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
|
|
1166
1173
|
children: g.isPending ? /* @__PURE__ */ i($, { children: [
|
|
@@ -1175,18 +1182,18 @@ function so({
|
|
|
1175
1182
|
] })
|
|
1176
1183
|
] });
|
|
1177
1184
|
}
|
|
1178
|
-
function
|
|
1185
|
+
function lo({
|
|
1179
1186
|
query: e,
|
|
1180
1187
|
setQuery: n,
|
|
1181
1188
|
open: a,
|
|
1182
1189
|
setOpen: r,
|
|
1183
1190
|
candidates: o,
|
|
1184
|
-
showKindChip:
|
|
1191
|
+
showKindChip: c,
|
|
1185
1192
|
onAdd: m,
|
|
1186
1193
|
busy: p
|
|
1187
1194
|
}) {
|
|
1188
|
-
const b =
|
|
1189
|
-
|
|
1195
|
+
const b = Ot(null), f = Ot(null), [g, l] = S(null);
|
|
1196
|
+
Ja(() => {
|
|
1190
1197
|
if (!a) {
|
|
1191
1198
|
l(null);
|
|
1192
1199
|
return;
|
|
@@ -1214,7 +1221,7 @@ function io({
|
|
|
1214
1221
|
};
|
|
1215
1222
|
return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
|
|
1216
1223
|
}, [a, r]);
|
|
1217
|
-
const
|
|
1224
|
+
const u = a && o.length > 0 && g;
|
|
1218
1225
|
return /* @__PURE__ */ i("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: [
|
|
1219
1226
|
/* @__PURE__ */ i(
|
|
1220
1227
|
"div",
|
|
@@ -1222,7 +1229,7 @@ function io({
|
|
|
1222
1229
|
ref: b,
|
|
1223
1230
|
className: "flex items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40",
|
|
1224
1231
|
children: [
|
|
1225
|
-
/* @__PURE__ */ t(
|
|
1232
|
+
/* @__PURE__ */ t(Mn, { className: "h-3 w-3 text-muted-foreground" }),
|
|
1226
1233
|
/* @__PURE__ */ t(
|
|
1227
1234
|
"input",
|
|
1228
1235
|
{
|
|
@@ -1239,7 +1246,7 @@ function io({
|
|
|
1239
1246
|
]
|
|
1240
1247
|
}
|
|
1241
1248
|
),
|
|
1242
|
-
|
|
1249
|
+
u && typeof document < "u" && hn(
|
|
1243
1250
|
/* @__PURE__ */ t(
|
|
1244
1251
|
"div",
|
|
1245
1252
|
{
|
|
@@ -1259,12 +1266,12 @@ function io({
|
|
|
1259
1266
|
onClick: () => m(s),
|
|
1260
1267
|
className: "flex w-full items-center gap-2 border-b border-border/60 px-2.5 py-2 text-left last:border-b-0 hover:bg-accent",
|
|
1261
1268
|
children: [
|
|
1262
|
-
/* @__PURE__ */ t(
|
|
1269
|
+
/* @__PURE__ */ t(ur, { name: s.name || s.email || "?" }),
|
|
1263
1270
|
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
1264
1271
|
/* @__PURE__ */ t("div", { className: "truncate text-[12px] font-medium text-foreground", children: s.name || s.email || "Unknown" }),
|
|
1265
1272
|
s.email && s.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: s.email })
|
|
1266
1273
|
] }),
|
|
1267
|
-
|
|
1274
|
+
c && s.type && /* @__PURE__ */ t("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: s.type === "tenant" ? "tenant" : "org" })
|
|
1268
1275
|
]
|
|
1269
1276
|
},
|
|
1270
1277
|
s.id
|
|
@@ -1275,7 +1282,7 @@ function io({
|
|
|
1275
1282
|
)
|
|
1276
1283
|
] });
|
|
1277
1284
|
}
|
|
1278
|
-
function
|
|
1285
|
+
function cr(e, n) {
|
|
1279
1286
|
if (!e) return n;
|
|
1280
1287
|
if (e instanceof Error) {
|
|
1281
1288
|
const a = e.message || "", r = a.match(/\{[\s\S]*"error"\s*:\s*"([^"]+)"[\s\S]*\}/);
|
|
@@ -1283,7 +1290,7 @@ function ur(e, n) {
|
|
|
1283
1290
|
}
|
|
1284
1291
|
return typeof e == "string" ? e : n;
|
|
1285
1292
|
}
|
|
1286
|
-
function
|
|
1293
|
+
function lr({
|
|
1287
1294
|
title: e,
|
|
1288
1295
|
message: n,
|
|
1289
1296
|
onRetry: a
|
|
@@ -1302,43 +1309,43 @@ function mr({
|
|
|
1302
1309
|
)
|
|
1303
1310
|
] });
|
|
1304
1311
|
}
|
|
1305
|
-
function
|
|
1312
|
+
function Ft({ children: e }) {
|
|
1306
1313
|
return /* @__PURE__ */ t("label", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: e });
|
|
1307
1314
|
}
|
|
1308
|
-
function
|
|
1315
|
+
function ur({ name: e }) {
|
|
1309
1316
|
const n = e.split(" ").map((a) => a[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
1310
|
-
return /* @__PURE__ */ t(
|
|
1317
|
+
return /* @__PURE__ */ t(ir, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ t(dr, { className: "text-[9px] font-semibold", children: n || "?" }) });
|
|
1311
1318
|
}
|
|
1312
|
-
const
|
|
1313
|
-
function
|
|
1319
|
+
const uo = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
|
|
1320
|
+
function mo({
|
|
1314
1321
|
open: e,
|
|
1315
1322
|
onOpenChange: n
|
|
1316
1323
|
}) {
|
|
1317
|
-
const a =
|
|
1324
|
+
const a = C(
|
|
1318
1325
|
(o) => {
|
|
1319
|
-
var
|
|
1320
|
-
return
|
|
1321
|
-
dashboardDefault: (m = (
|
|
1326
|
+
var c, m;
|
|
1327
|
+
return yn({
|
|
1328
|
+
dashboardDefault: (m = (c = o.dashboard) == null ? void 0 : c.exportDefaults) == null ? void 0 : m.csvEncoding
|
|
1322
1329
|
});
|
|
1323
1330
|
}
|
|
1324
|
-
), { setDashboardExportDefaults: r } =
|
|
1331
|
+
), { setDashboardExportDefaults: r } = C(
|
|
1325
1332
|
(o) => o.actions
|
|
1326
1333
|
);
|
|
1327
|
-
return /* @__PURE__ */ t(
|
|
1328
|
-
/* @__PURE__ */ i(
|
|
1329
|
-
/* @__PURE__ */ t(
|
|
1330
|
-
/* @__PURE__ */ t(
|
|
1334
|
+
return /* @__PURE__ */ t(Vt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(jt, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
|
|
1335
|
+
/* @__PURE__ */ i(Xr, { children: [
|
|
1336
|
+
/* @__PURE__ */ t(Xe, { className: "text-[15px]", children: "Download settings" }),
|
|
1337
|
+
/* @__PURE__ */ t(Ze, { 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." })
|
|
1331
1338
|
] }),
|
|
1332
1339
|
/* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
1333
|
-
/* @__PURE__ */ t(
|
|
1340
|
+
/* @__PURE__ */ t(Ba, { htmlFor: "dashboard-csv-encoding", className: uo, children: "CSV encoding" }),
|
|
1334
1341
|
/* @__PURE__ */ i(
|
|
1335
|
-
|
|
1342
|
+
Ga,
|
|
1336
1343
|
{
|
|
1337
1344
|
value: a,
|
|
1338
1345
|
onValueChange: (o) => r({ csvEncoding: o }),
|
|
1339
1346
|
children: [
|
|
1340
|
-
/* @__PURE__ */ t(
|
|
1341
|
-
/* @__PURE__ */ t(
|
|
1347
|
+
/* @__PURE__ */ t(Va, { id: "dashboard-csv-encoding", size: "sm", children: /* @__PURE__ */ t(ja, {}) }),
|
|
1348
|
+
/* @__PURE__ */ t(Ha, { children: Zr.map((o) => /* @__PURE__ */ t(qa, { value: o.value, children: o.label }, o.value)) })
|
|
1342
1349
|
]
|
|
1343
1350
|
}
|
|
1344
1351
|
)
|
|
@@ -1346,13 +1353,13 @@ function co({
|
|
|
1346
1353
|
] }) });
|
|
1347
1354
|
}
|
|
1348
1355
|
function pe(e, n, a) {
|
|
1349
|
-
var
|
|
1356
|
+
var c, m;
|
|
1350
1357
|
const r = (e.controls || []).find(
|
|
1351
1358
|
(p) => p.id === a
|
|
1352
1359
|
);
|
|
1353
1360
|
if (r)
|
|
1354
1361
|
return r.label;
|
|
1355
|
-
const o = (m = (
|
|
1362
|
+
const o = (m = (c = Re(e, n)) == null ? void 0 : c.controls) == null ? void 0 : m.find(
|
|
1356
1363
|
(p) => p.id === a
|
|
1357
1364
|
);
|
|
1358
1365
|
return (o == null ? void 0 : o.label) || a;
|
|
@@ -1361,19 +1368,19 @@ function fe(e, n) {
|
|
|
1361
1368
|
var a;
|
|
1362
1369
|
return ((a = Re(e, n)) == null ? void 0 : a.title) || n;
|
|
1363
1370
|
}
|
|
1364
|
-
function
|
|
1371
|
+
function ho(e) {
|
|
1365
1372
|
const { errors: n, dashboard: a } = e;
|
|
1366
1373
|
if (!a)
|
|
1367
1374
|
return n;
|
|
1368
1375
|
const r = /* @__PURE__ */ new Map();
|
|
1369
1376
|
for (const o of n) {
|
|
1370
|
-
const
|
|
1377
|
+
const c = o.match(
|
|
1371
1378
|
/^Card '(.+)' binding for control '(.+)' maps to missing metric '(.+)'\.$/
|
|
1372
1379
|
);
|
|
1373
|
-
if (
|
|
1374
|
-
const [, g, l] =
|
|
1375
|
-
r.has(
|
|
1376
|
-
|
|
1380
|
+
if (c) {
|
|
1381
|
+
const [, g, l] = c, u = `${g}:${l}:missing-metric`;
|
|
1382
|
+
r.has(u) || r.set(
|
|
1383
|
+
u,
|
|
1377
1384
|
`"${fe(a, g)}" has an outdated "${pe(
|
|
1378
1385
|
a,
|
|
1379
1386
|
g,
|
|
@@ -1386,9 +1393,9 @@ function uo(e) {
|
|
|
1386
1393
|
/^Card '(.+)' binding for control '(.+)' maps to missing group-by field '(.+)'\.$/
|
|
1387
1394
|
);
|
|
1388
1395
|
if (m) {
|
|
1389
|
-
const [, g, l] = m,
|
|
1390
|
-
r.has(
|
|
1391
|
-
|
|
1396
|
+
const [, g, l] = m, u = `${g}:${l}:missing-group-by`;
|
|
1397
|
+
r.has(u) || r.set(
|
|
1398
|
+
u,
|
|
1392
1399
|
`"${fe(a, g)}" has an outdated "${pe(
|
|
1393
1400
|
a,
|
|
1394
1401
|
g,
|
|
@@ -1401,9 +1408,9 @@ function uo(e) {
|
|
|
1401
1408
|
/^Card '(.+)' binding for control '(.+)' maps to an invalid metric target\.$/
|
|
1402
1409
|
);
|
|
1403
1410
|
if (p) {
|
|
1404
|
-
const [, g, l] = p,
|
|
1405
|
-
r.has(
|
|
1406
|
-
|
|
1411
|
+
const [, g, l] = p, u = `${g}:${l}:invalid-metric`;
|
|
1412
|
+
r.has(u) || r.set(
|
|
1413
|
+
u,
|
|
1407
1414
|
`"${fe(a, g)}" has an invalid "${pe(
|
|
1408
1415
|
a,
|
|
1409
1416
|
g,
|
|
@@ -1416,9 +1423,9 @@ function uo(e) {
|
|
|
1416
1423
|
/^Card '(.+)' binding for control '(.+)' maps to an invalid group-by target\.$/
|
|
1417
1424
|
);
|
|
1418
1425
|
if (b) {
|
|
1419
|
-
const [, g, l] = b,
|
|
1420
|
-
r.has(
|
|
1421
|
-
|
|
1426
|
+
const [, g, l] = b, u = `${g}:${l}:invalid-group-by`;
|
|
1427
|
+
r.has(u) || r.set(
|
|
1428
|
+
u,
|
|
1422
1429
|
`"${fe(a, g)}" has an invalid "${pe(
|
|
1423
1430
|
a,
|
|
1424
1431
|
g,
|
|
@@ -1431,9 +1438,9 @@ function uo(e) {
|
|
|
1431
1438
|
/^Card '(.+)' binding for control '(.+)' requires at least one temporal group-by field\.$/
|
|
1432
1439
|
);
|
|
1433
1440
|
if (f) {
|
|
1434
|
-
const [, g, l] = f,
|
|
1435
|
-
r.has(
|
|
1436
|
-
|
|
1441
|
+
const [, g, l] = f, u = `${g}:${l}:missing-temporal-group-by`;
|
|
1442
|
+
r.has(u) || r.set(
|
|
1443
|
+
u,
|
|
1437
1444
|
`"${fe(a, g)}" can no longer use "${pe(
|
|
1438
1445
|
a,
|
|
1439
1446
|
g,
|
|
@@ -1446,16 +1453,16 @@ function uo(e) {
|
|
|
1446
1453
|
}
|
|
1447
1454
|
return Array.from(r.values());
|
|
1448
1455
|
}
|
|
1449
|
-
function
|
|
1456
|
+
function po({
|
|
1450
1457
|
visible: e,
|
|
1451
1458
|
onSelect: n
|
|
1452
1459
|
}) {
|
|
1453
|
-
return e ? /* @__PURE__ */ i(
|
|
1454
|
-
/* @__PURE__ */ t(
|
|
1460
|
+
return e ? /* @__PURE__ */ i(_, { onSelect: n, children: [
|
|
1461
|
+
/* @__PURE__ */ t(ea, { className: "h-3.5 w-3.5" }),
|
|
1455
1462
|
"Schedule email report"
|
|
1456
1463
|
] }) : null;
|
|
1457
1464
|
}
|
|
1458
|
-
function
|
|
1465
|
+
function fo({
|
|
1459
1466
|
scheduleReportVisible: e,
|
|
1460
1467
|
analyticalBriefingVisible: n,
|
|
1461
1468
|
onScheduleReport: a,
|
|
@@ -1463,64 +1470,64 @@ function ho({
|
|
|
1463
1470
|
}) {
|
|
1464
1471
|
return /* @__PURE__ */ i($, { children: [
|
|
1465
1472
|
/* @__PURE__ */ t(
|
|
1466
|
-
|
|
1473
|
+
po,
|
|
1467
1474
|
{
|
|
1468
1475
|
visible: e,
|
|
1469
1476
|
onSelect: a
|
|
1470
1477
|
}
|
|
1471
1478
|
),
|
|
1472
|
-
n ? /* @__PURE__ */ i(
|
|
1479
|
+
n ? /* @__PURE__ */ i(_, { onSelect: r, children: [
|
|
1473
1480
|
/* @__PURE__ */ t(ee, { className: "h-3.5 w-3.5" }),
|
|
1474
1481
|
"Create analytical briefing"
|
|
1475
1482
|
] }) : null
|
|
1476
1483
|
] });
|
|
1477
1484
|
}
|
|
1478
|
-
function
|
|
1485
|
+
function bo(e) {
|
|
1479
1486
|
var f, g, l;
|
|
1480
|
-
const { saved: n, draft: a, usage: r } = e, o = [],
|
|
1481
|
-
for (const [
|
|
1482
|
-
!s || !
|
|
1487
|
+
const { saved: n, draft: a, usage: r } = e, o = [], c = pn(n);
|
|
1488
|
+
for (const [u, s] of Object.entries(r.inputs))
|
|
1489
|
+
!s || !Pt(n, u) || Pt(a, u) || o.push({
|
|
1483
1490
|
target: "input",
|
|
1484
|
-
id:
|
|
1485
|
-
label:
|
|
1491
|
+
id: u,
|
|
1492
|
+
label: fn(n, c, u),
|
|
1486
1493
|
bookmarks: s,
|
|
1487
1494
|
remembered: 0
|
|
1488
1495
|
});
|
|
1489
|
-
const m = new Set((a.sheets ?? []).map((
|
|
1490
|
-
for (const
|
|
1491
|
-
const s = r.sheets[
|
|
1492
|
-
!s || m.has(
|
|
1496
|
+
const m = new Set((a.sheets ?? []).map((u) => u.id));
|
|
1497
|
+
for (const u of n.sheets ?? []) {
|
|
1498
|
+
const s = r.sheets[u.id] ?? 0;
|
|
1499
|
+
!s || m.has(u.id) || o.push({
|
|
1493
1500
|
target: "sheet",
|
|
1494
|
-
id:
|
|
1495
|
-
label: ((f =
|
|
1501
|
+
id: u.id,
|
|
1502
|
+
label: ((f = u.title) == null ? void 0 : f.trim()) || "Untitled sheet",
|
|
1496
1503
|
bookmarks: s,
|
|
1497
1504
|
remembered: 0
|
|
1498
1505
|
});
|
|
1499
1506
|
}
|
|
1500
|
-
const p =
|
|
1501
|
-
for (const [
|
|
1502
|
-
if (!p.has(
|
|
1503
|
-
const x = Re(n,
|
|
1504
|
-
if (!b.has(
|
|
1507
|
+
const p = Rt(n), b = Rt(a);
|
|
1508
|
+
for (const [u, s] of Object.entries(r.tables)) {
|
|
1509
|
+
if (!p.has(u)) continue;
|
|
1510
|
+
const x = Re(n, u), v = ((g = x == null ? void 0 : x.title) == null ? void 0 : g.trim()) || "Untitled table";
|
|
1511
|
+
if (!b.has(u)) {
|
|
1505
1512
|
o.push({
|
|
1506
1513
|
target: "table",
|
|
1507
|
-
id:
|
|
1514
|
+
id: u,
|
|
1508
1515
|
label: v,
|
|
1509
1516
|
bookmarks: s.bookmarks,
|
|
1510
1517
|
remembered: s.remembered
|
|
1511
1518
|
});
|
|
1512
1519
|
continue;
|
|
1513
1520
|
}
|
|
1514
|
-
const w = x ?
|
|
1521
|
+
const w = x ? _t(x) : void 0, h = Re(a, u), E = h ? _t(h) : void 0;
|
|
1515
1522
|
if (!(!x || !w || !E))
|
|
1516
1523
|
for (const [A, L] of Object.entries(s.columns)) {
|
|
1517
|
-
if (!(L.bookmarks || L.remembered) ||
|
|
1524
|
+
if (!(L.bookmarks || L.remembered) || bn(A) || !w.has(A) || E.has(A))
|
|
1518
1525
|
continue;
|
|
1519
|
-
const N =
|
|
1526
|
+
const N = gn(x, A), k = ((l = N == null ? void 0 : N.label) == null ? void 0 : l.trim()) || (N == null ? void 0 : N.name);
|
|
1520
1527
|
o.push({
|
|
1521
1528
|
target: "column",
|
|
1522
1529
|
id: A,
|
|
1523
|
-
cardId:
|
|
1530
|
+
cardId: u,
|
|
1524
1531
|
label: k ? `${k} in ${v}` : `A column in ${v}`,
|
|
1525
1532
|
bookmarks: L.bookmarks,
|
|
1526
1533
|
remembered: L.remembered
|
|
@@ -1529,49 +1536,49 @@ function po(e) {
|
|
|
1529
1536
|
}
|
|
1530
1537
|
return o;
|
|
1531
1538
|
}
|
|
1532
|
-
const
|
|
1533
|
-
function
|
|
1539
|
+
const go = "dashboard-bookmark-usage";
|
|
1540
|
+
function xo(e) {
|
|
1534
1541
|
var b;
|
|
1535
|
-
const n =
|
|
1542
|
+
const n = C((f) => f.viewerStateClient), a = (b = e.saved) == null ? void 0 : b.id, o = ta({
|
|
1536
1543
|
// Keyed by the viewer, never by the client object (TanStack drops functions when hashing).
|
|
1537
|
-
queryKey: [
|
|
1544
|
+
queryKey: [go, (n == null ? void 0 : n.viewerKey) ?? null],
|
|
1538
1545
|
queryFn: () => n.bookmarks.usage(),
|
|
1539
1546
|
enabled: e.enabled && !!n && !!a,
|
|
1540
1547
|
staleTime: 5 * 6e4,
|
|
1541
1548
|
retry: !1
|
|
1542
|
-
}).data, { saved:
|
|
1543
|
-
return
|
|
1549
|
+
}).data, { saved: c, draft: m, enabled: p } = e;
|
|
1550
|
+
return j(() => !p || !c || !o ? [] : !o.bookmarks && !Object.keys(o.tables).length ? [] : bo({ saved: c, draft: m, usage: o }), [m, p, c, o]);
|
|
1544
1551
|
}
|
|
1545
|
-
function
|
|
1552
|
+
function Bt(e, n, a) {
|
|
1546
1553
|
return `${e} ${e === 1 ? n : a}`;
|
|
1547
1554
|
}
|
|
1548
|
-
function
|
|
1555
|
+
function vo(e) {
|
|
1549
1556
|
const n = [
|
|
1550
|
-
e.bookmarks ?
|
|
1551
|
-
e.remembered ?
|
|
1557
|
+
e.bookmarks ? Bt(e.bookmarks, "bookmark", "bookmarks") : null,
|
|
1558
|
+
e.remembered ? Bt(e.remembered, "remembered layout", "remembered layouts") : null
|
|
1552
1559
|
].filter(Boolean).join(", ");
|
|
1553
1560
|
return e.target === "sheet" ? { name: `${e.label} sheet`, uses: n } : e.target === "table" ? { name: `${e.label} table`, uses: n } : { name: e.label, uses: n };
|
|
1554
1561
|
}
|
|
1555
|
-
function
|
|
1562
|
+
function yo({
|
|
1556
1563
|
saved: e,
|
|
1557
1564
|
draft: n,
|
|
1558
1565
|
enabled: a
|
|
1559
1566
|
}) {
|
|
1560
|
-
const r =
|
|
1561
|
-
return r.length ? /* @__PURE__ */ i(
|
|
1562
|
-
/* @__PURE__ */ t(
|
|
1567
|
+
const r = xo({ saved: e, draft: n, enabled: a });
|
|
1568
|
+
return r.length ? /* @__PURE__ */ i(za, { children: [
|
|
1569
|
+
/* @__PURE__ */ t(Ka, { asChild: !0, children: /* @__PURE__ */ i(
|
|
1563
1570
|
T,
|
|
1564
1571
|
{
|
|
1565
1572
|
variant: "ghost",
|
|
1566
1573
|
size: "xs",
|
|
1567
1574
|
className: "gap-1 text-muted-foreground hover:text-foreground",
|
|
1568
1575
|
children: [
|
|
1569
|
-
/* @__PURE__ */ t(
|
|
1576
|
+
/* @__PURE__ */ t(ra, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
|
|
1570
1577
|
"Affects saved views"
|
|
1571
1578
|
]
|
|
1572
1579
|
}
|
|
1573
1580
|
) }),
|
|
1574
|
-
/* @__PURE__ */ i(
|
|
1581
|
+
/* @__PURE__ */ i(Qa, { align: "end", className: "w-[320px] p-3 text-[12px]", children: [
|
|
1575
1582
|
/* @__PURE__ */ t("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." }),
|
|
1576
1583
|
/* @__PURE__ */ t(
|
|
1577
1584
|
"ul",
|
|
@@ -1579,13 +1586,13 @@ function xo({
|
|
|
1579
1586
|
"aria-label": "Affected saved views",
|
|
1580
1587
|
className: "mt-2 grid gap-1 border-t border-border/60 pt-2",
|
|
1581
1588
|
children: r.map((o) => {
|
|
1582
|
-
const { name:
|
|
1589
|
+
const { name: c, uses: m } = vo(o);
|
|
1583
1590
|
return /* @__PURE__ */ i(
|
|
1584
1591
|
"li",
|
|
1585
1592
|
{
|
|
1586
1593
|
className: "flex items-baseline justify-between gap-3",
|
|
1587
1594
|
children: [
|
|
1588
|
-
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-foreground", children:
|
|
1595
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-foreground", children: c }),
|
|
1589
1596
|
/* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] text-muted-foreground", children: m })
|
|
1590
1597
|
]
|
|
1591
1598
|
},
|
|
@@ -1597,55 +1604,55 @@ function xo({
|
|
|
1597
1604
|
] })
|
|
1598
1605
|
] }) : null;
|
|
1599
1606
|
}
|
|
1600
|
-
function
|
|
1607
|
+
function Gt(e, n) {
|
|
1601
1608
|
return {
|
|
1602
1609
|
dashboard: tt(e),
|
|
1603
1610
|
semanticExecutionPayload: tt(n)
|
|
1604
1611
|
};
|
|
1605
1612
|
}
|
|
1606
|
-
function
|
|
1607
|
-
var xt, vt, yt, wt
|
|
1608
|
-
|
|
1613
|
+
function Jo() {
|
|
1614
|
+
var gt, xt, vt, yt, wt;
|
|
1615
|
+
Xa(), Za();
|
|
1609
1616
|
const {
|
|
1610
1617
|
authToken: e,
|
|
1611
1618
|
tokenProps: n,
|
|
1612
1619
|
id: a,
|
|
1613
1620
|
showBriefings: r
|
|
1614
|
-
} =
|
|
1621
|
+
} = z(), o = aa(), { isLocalDev: c } = na(), {
|
|
1615
1622
|
canEditDashboard: m,
|
|
1616
1623
|
hasInspectionUser: p,
|
|
1617
1624
|
inspectionMessage: b,
|
|
1618
1625
|
isInspectionMode: f,
|
|
1619
1626
|
isInspectionSurface: g
|
|
1620
|
-
} =
|
|
1621
|
-
(
|
|
1622
|
-
), L =
|
|
1623
|
-
(
|
|
1624
|
-
), { setDashboardTitle: re } =
|
|
1625
|
-
|
|
1626
|
-
const
|
|
1627
|
-
(
|
|
1628
|
-
),
|
|
1629
|
-
(
|
|
1627
|
+
} = oa(), { openBrandStudioPreview: l } = sa(), { permissions: u } = Un(), s = ia(), { isLoading: x } = da(), v = C((d) => d.theme), w = C((d) => d.isDownloadingPdf), h = C((d) => d.dashboard), E = C((d) => d.selectedSheetId), A = (gt = h == null ? void 0 : h.sheets) == null ? void 0 : gt.find(
|
|
1628
|
+
(d) => d.id === E
|
|
1629
|
+
), L = wn(A), N = L ? (xt = A == null ? void 0 : A.document) == null ? void 0 : xt.page : void 0, k = C(
|
|
1630
|
+
(d) => d.isDashboardEditing
|
|
1631
|
+
), { setDashboardTitle: re } = C((d) => d.actions), [ae, ye] = S(!1), [K, Q] = S(!1), [W, Y] = S(!1), [we, Ne] = S(!1), [ne, oe] = S(null), [Se, se] = S(!1), [Ue, J] = S(!1), [F, y] = S(null), [U, H] = S([]), [ie, q] = S(!1), [ke, de] = S(!1), R = C((d) => d.isVisualEditing);
|
|
1632
|
+
Nt((d) => d.card);
|
|
1633
|
+
const mr = Le(
|
|
1634
|
+
(d) => d.selectedDashboard
|
|
1635
|
+
), hr = Le(
|
|
1636
|
+
(d) => d.initialDashboard
|
|
1630
1637
|
);
|
|
1631
|
-
Le((
|
|
1632
|
-
const dt =
|
|
1633
|
-
(
|
|
1638
|
+
Le((d) => d.selectedVisual), C((d) => d.selectedFrameId), Nt((d) => d.frame);
|
|
1639
|
+
const dt = C(
|
|
1640
|
+
(d) => d.showDashboardJSON
|
|
1634
1641
|
);
|
|
1635
|
-
|
|
1636
|
-
const { setIsDashboardEditing:
|
|
1637
|
-
(
|
|
1642
|
+
C((d) => d.onSaveFunction);
|
|
1643
|
+
const { setIsDashboardEditing: ct, setShowDashboardJSON: lt } = C(
|
|
1644
|
+
(d) => d.actions
|
|
1638
1645
|
), { setInitialDashboard: ut, clearSelectedDashboard: Te } = Le(
|
|
1639
|
-
(
|
|
1640
|
-
),
|
|
1646
|
+
(d) => d.actions
|
|
1647
|
+
), ce = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: Ce } = ca(Qe.DASHBOARD), { data: $e } = la(), pr = ((vt = $e == null ? void 0 : $e.preference) == null ? void 0 : vt.defaultDashboardId) || null, { mutate: fr, isPending: br } = ua(), { currentUser: gr } = at(), xr = ma(gr), B = mr || hr, V = ha({
|
|
1641
1648
|
config: n.config,
|
|
1642
|
-
canNavigateDashboardHub:
|
|
1643
|
-
canShareDashboard: ((
|
|
1644
|
-
canManageGroups:
|
|
1649
|
+
canNavigateDashboardHub: ce,
|
|
1650
|
+
canShareDashboard: ((yt = B == null ? void 0 : B.permissions) == null ? void 0 : yt.canShare) === !0,
|
|
1651
|
+
canManageGroups: xr
|
|
1645
1652
|
}), mt = B ? {
|
|
1646
1653
|
id: B.id,
|
|
1647
1654
|
title: (h == null ? void 0 : h.title) || B.title || "Dashboard"
|
|
1648
|
-
} : null, { handleAddNewFrame:
|
|
1655
|
+
} : null, { handleAddNewFrame: vr } = pa(), [Fe, Be] = S(!1), [yr, le] = S(!1), [Ge, De] = S("close"), ue = fa(Qe.DASHBOARD), [M, me] = S(null), wr = async (d, P) => {
|
|
1649
1656
|
if (!f) {
|
|
1650
1657
|
if (!(h != null && h.id)) {
|
|
1651
1658
|
console.log("No dashboard ID found");
|
|
@@ -1653,26 +1660,26 @@ function Ho() {
|
|
|
1653
1660
|
}
|
|
1654
1661
|
console.log("Updating dashboard title:", {
|
|
1655
1662
|
dashboardId: h.id,
|
|
1656
|
-
newTitle:
|
|
1657
|
-
previousTitle:
|
|
1663
|
+
newTitle: d,
|
|
1664
|
+
previousTitle: P
|
|
1658
1665
|
}), ue.mutate(
|
|
1659
1666
|
{
|
|
1660
1667
|
resourceId: h.id,
|
|
1661
|
-
data: { title:
|
|
1668
|
+
data: { title: d }
|
|
1662
1669
|
},
|
|
1663
1670
|
{
|
|
1664
1671
|
onSuccess: () => {
|
|
1665
1672
|
me(
|
|
1666
1673
|
(O) => (O == null ? void 0 : O.dashboard.id) === h.id ? {
|
|
1667
1674
|
...O,
|
|
1668
|
-
dashboard: { ...O.dashboard, title:
|
|
1675
|
+
dashboard: { ...O.dashboard, title: d }
|
|
1669
1676
|
} : O
|
|
1670
|
-
),
|
|
1677
|
+
), D.success("Dashboard title updated");
|
|
1671
1678
|
},
|
|
1672
1679
|
onError: (O) => {
|
|
1673
|
-
console.error("Failed to update dashboard title:", O),
|
|
1674
|
-
const Z =
|
|
1675
|
-
(Z == null ? void 0 : Z.id) === h.id && Z.title ===
|
|
1680
|
+
console.error("Failed to update dashboard title:", O), D.error("Failed to update dashboard title");
|
|
1681
|
+
const Z = C.getState().dashboard;
|
|
1682
|
+
(Z == null ? void 0 : Z.id) === h.id && Z.title === d && re(P);
|
|
1676
1683
|
}
|
|
1677
1684
|
}
|
|
1678
1685
|
);
|
|
@@ -1680,17 +1687,17 @@ function Ho() {
|
|
|
1680
1687
|
};
|
|
1681
1688
|
_e(() => {
|
|
1682
1689
|
if (Ce && Ce.length > 0) {
|
|
1683
|
-
const
|
|
1684
|
-
if (
|
|
1685
|
-
const
|
|
1686
|
-
(O) => O.id ===
|
|
1690
|
+
const d = h == null ? void 0 : h.id;
|
|
1691
|
+
if (d) {
|
|
1692
|
+
const P = Ce.find(
|
|
1693
|
+
(O) => O.id === d
|
|
1687
1694
|
);
|
|
1688
|
-
|
|
1695
|
+
P && ut(P);
|
|
1689
1696
|
}
|
|
1690
1697
|
}
|
|
1691
1698
|
}, [Ce, h == null ? void 0 : h.id, ut]);
|
|
1692
|
-
const
|
|
1693
|
-
() =>
|
|
1699
|
+
const Nr = n.orgUserId || n.tenantId, Ve = j(
|
|
1700
|
+
() => wo({
|
|
1694
1701
|
accessToken: e == null ? void 0 : e.accessToken,
|
|
1695
1702
|
dashboardId: (h == null ? void 0 : h.id) || a || n.dashboard_id,
|
|
1696
1703
|
selectedSheetId: L ? E : void 0,
|
|
@@ -1709,149 +1716,149 @@ function Ho() {
|
|
|
1709
1716
|
v,
|
|
1710
1717
|
n.dashboard_id
|
|
1711
1718
|
]
|
|
1712
|
-
), je = k && !
|
|
1713
|
-
(
|
|
1714
|
-
),
|
|
1715
|
-
|
|
1719
|
+
), je = k && !R && !f && Nr && m, { setDashboard: He } = C((d) => d.actions), Sr = C(
|
|
1720
|
+
(d) => d.semanticExecutionPayload
|
|
1721
|
+
), kr = () => {
|
|
1722
|
+
ct(!0);
|
|
1716
1723
|
}, Ee = () => {
|
|
1717
|
-
|
|
1724
|
+
ct(!1), lt(!1), me(null);
|
|
1718
1725
|
};
|
|
1719
1726
|
_e(() => {
|
|
1720
1727
|
if (!k) {
|
|
1721
1728
|
M && me(null);
|
|
1722
1729
|
return;
|
|
1723
1730
|
}
|
|
1724
|
-
M || !h || x
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
)
|
|
1731
|
+
if (M || !h || x)
|
|
1732
|
+
return;
|
|
1733
|
+
const d = ba(C.getState());
|
|
1734
|
+
me(
|
|
1735
|
+
Gt(d.dashboard, d.semanticExecutionPayload)
|
|
1729
1736
|
);
|
|
1730
1737
|
}, [
|
|
1731
1738
|
h,
|
|
1732
1739
|
M,
|
|
1733
1740
|
k,
|
|
1734
1741
|
x,
|
|
1735
|
-
|
|
1742
|
+
Sr
|
|
1736
1743
|
]);
|
|
1737
|
-
const qe = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: ze, isDirtyPending:
|
|
1744
|
+
const qe = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: ze, isDirtyPending: Cr, resetDirty: he } = Nn(
|
|
1738
1745
|
h,
|
|
1739
1746
|
qe,
|
|
1740
1747
|
300,
|
|
1741
1748
|
1e3,
|
|
1742
|
-
|
|
1743
|
-
),
|
|
1749
|
+
Sn
|
|
1750
|
+
), ht = en(
|
|
1744
1751
|
qe,
|
|
1745
1752
|
f,
|
|
1746
1753
|
m
|
|
1747
|
-
),
|
|
1754
|
+
), pt = ze || Cr, Ie = Fe || ue.isPending, Dr = () => {
|
|
1748
1755
|
if (f) {
|
|
1749
1756
|
M && He(M.dashboard, {
|
|
1750
1757
|
semanticExecutionPayload: M.semanticExecutionPayload
|
|
1751
1758
|
}), Ee(), he();
|
|
1752
1759
|
return;
|
|
1753
1760
|
}
|
|
1754
|
-
|
|
1755
|
-
},
|
|
1761
|
+
ht() ? (De("close"), le(!0)) : (Ee(), he());
|
|
1762
|
+
}, Er = async () => {
|
|
1756
1763
|
await Ke({
|
|
1757
1764
|
closeAfterSave: !0,
|
|
1758
1765
|
navigateHomeAfterSave: Ge === "home"
|
|
1759
1766
|
});
|
|
1760
|
-
},
|
|
1761
|
-
const
|
|
1767
|
+
}, Ir = () => {
|
|
1768
|
+
const d = Ge === "home" && !!ce;
|
|
1762
1769
|
M && He(M.dashboard, {
|
|
1763
1770
|
semanticExecutionPayload: M.semanticExecutionPayload
|
|
1764
|
-
}), Ee(),
|
|
1765
|
-
},
|
|
1771
|
+
}), Ee(), d && Te(), De("close"), le(!1), he();
|
|
1772
|
+
}, Ar = () => {
|
|
1766
1773
|
M && (He(M.dashboard, {
|
|
1767
1774
|
semanticExecutionPayload: M.semanticExecutionPayload
|
|
1768
1775
|
}), he());
|
|
1769
|
-
},
|
|
1770
|
-
if (
|
|
1771
|
-
if (k &&
|
|
1772
|
-
De("home"),
|
|
1776
|
+
}, Lr = () => {
|
|
1777
|
+
if (ce) {
|
|
1778
|
+
if (k && ht()) {
|
|
1779
|
+
De("home"), le(!0);
|
|
1773
1780
|
return;
|
|
1774
1781
|
}
|
|
1775
1782
|
Te();
|
|
1776
1783
|
}
|
|
1777
1784
|
};
|
|
1778
|
-
async function Ke(
|
|
1785
|
+
async function Ke(d) {
|
|
1779
1786
|
if (f)
|
|
1780
1787
|
return;
|
|
1781
|
-
const
|
|
1782
|
-
if (!
|
|
1788
|
+
const P = C.getState().dashboard;
|
|
1789
|
+
if (!P)
|
|
1783
1790
|
return;
|
|
1784
|
-
const O = (
|
|
1785
|
-
|
|
1786
|
-
const
|
|
1787
|
-
|
|
1788
|
-
const
|
|
1789
|
-
template:
|
|
1791
|
+
const O = (d == null ? void 0 : d.closeAfterSave) ?? ie, Z = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
|
|
1792
|
+
q(O), O && le(!1);
|
|
1793
|
+
const Rr = tt(P);
|
|
1794
|
+
J(!0), y(null), H([]), Be(!0);
|
|
1795
|
+
const Ur = {
|
|
1796
|
+
template: P
|
|
1790
1797
|
};
|
|
1791
1798
|
ue.mutate(
|
|
1792
1799
|
{
|
|
1793
|
-
resourceId:
|
|
1794
|
-
data:
|
|
1800
|
+
resourceId: P.id,
|
|
1801
|
+
data: Ur
|
|
1795
1802
|
},
|
|
1796
1803
|
{
|
|
1797
1804
|
onSuccess: () => {
|
|
1798
|
-
Be(!1),
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1805
|
+
Be(!1), D.success("Dashboard saved!"), me(
|
|
1806
|
+
Gt(
|
|
1807
|
+
Rr,
|
|
1808
|
+
C.getState().semanticExecutionPayload
|
|
1802
1809
|
)
|
|
1803
|
-
),
|
|
1810
|
+
), J(!1), q(!1), O && (Ee(), he(), Z && ce && Te()), De("close");
|
|
1804
1811
|
},
|
|
1805
|
-
onError: (
|
|
1812
|
+
onError: (Tr) => {
|
|
1806
1813
|
Be(!1), y("Failed to save dashboard. Please try again.");
|
|
1807
|
-
const Ae =
|
|
1814
|
+
const Ae = Tr.details, $r = Array.isArray(
|
|
1808
1815
|
Ae == null ? void 0 : Ae.errors
|
|
1809
1816
|
) ? (Ae.errors || []).filter(
|
|
1810
|
-
(
|
|
1817
|
+
(Fr) => typeof Fr == "string"
|
|
1811
1818
|
) : [];
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
errors:
|
|
1815
|
-
dashboard:
|
|
1819
|
+
H(
|
|
1820
|
+
ho({
|
|
1821
|
+
errors: $r,
|
|
1822
|
+
dashboard: P || void 0
|
|
1816
1823
|
})
|
|
1817
|
-
),
|
|
1824
|
+
), D.error("Failed to save dashboard");
|
|
1818
1825
|
}
|
|
1819
1826
|
}
|
|
1820
1827
|
);
|
|
1821
1828
|
}
|
|
1822
|
-
const
|
|
1829
|
+
const ft = h.title;
|
|
1823
1830
|
ue.isPending && console.log("Title during update:", {
|
|
1824
|
-
title:
|
|
1831
|
+
title: ft,
|
|
1825
1832
|
dashboardStateTitle: h.title,
|
|
1826
1833
|
dashboardId: h == null ? void 0 : h.id
|
|
1827
1834
|
});
|
|
1828
|
-
const
|
|
1829
|
-
(
|
|
1835
|
+
const Mr = ce && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Or = !f && V.showDashboardHub && Mr, Pr = !f && s && V.showDashboardHub, G = (h == null ? void 0 : h.id) || null, bt = ga(
|
|
1836
|
+
(wt = n.config) == null ? void 0 : wt.showBriefings,
|
|
1830
1837
|
r
|
|
1831
|
-
), X = !!G &&
|
|
1832
|
-
!G || f ||
|
|
1838
|
+
), X = !!G && pr === G, _r = () => {
|
|
1839
|
+
!G || f || fr({
|
|
1833
1840
|
dashboardId: X ? null : G
|
|
1834
1841
|
});
|
|
1835
1842
|
};
|
|
1836
|
-
return !s && !
|
|
1843
|
+
return !s && !R ? null : /* @__PURE__ */ i(
|
|
1837
1844
|
"div",
|
|
1838
1845
|
{
|
|
1839
1846
|
className: "flex min-h-11 shrink-0 items-center justify-between gap-2 overflow-x-auto border-b px-4 py-1.5",
|
|
1840
1847
|
role: "dashboard-controls",
|
|
1841
1848
|
children: [
|
|
1842
1849
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
1843
|
-
|
|
1844
|
-
|
|
1850
|
+
Pr && !R && /* @__PURE__ */ t(
|
|
1851
|
+
ln,
|
|
1845
1852
|
{
|
|
1846
1853
|
"aria-label": "Dashboard Hub",
|
|
1847
1854
|
tooltip: "Dashboard Hub",
|
|
1848
|
-
onClick:
|
|
1855
|
+
onClick: Lr,
|
|
1849
1856
|
className: "h-7 w-7 px-0",
|
|
1850
1857
|
buttonProps: { size: "xs" },
|
|
1851
|
-
children: /* @__PURE__ */ t(
|
|
1858
|
+
children: /* @__PURE__ */ t(xa, { className: "h-3.5 w-3.5" })
|
|
1852
1859
|
}
|
|
1853
1860
|
),
|
|
1854
|
-
!
|
|
1861
|
+
!R && s && (x ? /* @__PURE__ */ t(
|
|
1855
1862
|
"div",
|
|
1856
1863
|
{
|
|
1857
1864
|
className: "h-4 w-28 animate-pulse rounded-md bg-muted/70",
|
|
@@ -1861,19 +1868,19 @@ function Ho() {
|
|
|
1861
1868
|
}
|
|
1862
1869
|
) : /* @__PURE__ */ i($, { children: [
|
|
1863
1870
|
/* @__PURE__ */ t(
|
|
1864
|
-
|
|
1871
|
+
va,
|
|
1865
1872
|
{
|
|
1866
|
-
value:
|
|
1867
|
-
onSave: (
|
|
1873
|
+
value: ft || "Untitled Dashboard",
|
|
1874
|
+
onSave: (d) => {
|
|
1868
1875
|
console.log("EditableText onSave called:", {
|
|
1869
|
-
newTitle:
|
|
1876
|
+
newTitle: d,
|
|
1870
1877
|
canEditDashboard: m,
|
|
1871
1878
|
dashboardId: h == null ? void 0 : h.id
|
|
1872
1879
|
});
|
|
1873
|
-
const
|
|
1874
|
-
re(
|
|
1880
|
+
const P = (h == null ? void 0 : h.title) || "";
|
|
1881
|
+
re(d), wr(d, P);
|
|
1875
1882
|
},
|
|
1876
|
-
isEditable:
|
|
1883
|
+
isEditable: ya({
|
|
1877
1884
|
isDashboardEditing: k,
|
|
1878
1885
|
canEditDashboard: m === !0 && !f
|
|
1879
1886
|
}),
|
|
@@ -1883,7 +1890,7 @@ function Ho() {
|
|
|
1883
1890
|
isPending: ue.isPending
|
|
1884
1891
|
}
|
|
1885
1892
|
),
|
|
1886
|
-
|
|
1893
|
+
V.showDashboardHub && X && /* @__PURE__ */ t(
|
|
1887
1894
|
"span",
|
|
1888
1895
|
{
|
|
1889
1896
|
className: "shrink-0 rounded-[4px] border border-border/60 px-1.5 py-px text-[10px] font-medium uppercase tracking-[0.06em] text-muted-foreground",
|
|
@@ -1891,53 +1898,42 @@ function Ho() {
|
|
|
1891
1898
|
children: "Default"
|
|
1892
1899
|
}
|
|
1893
1900
|
),
|
|
1894
|
-
|
|
1895
|
-
/* @__PURE__ */ t(
|
|
1901
|
+
Or && G && /* @__PURE__ */ t(It, { children: /* @__PURE__ */ i(At, { children: [
|
|
1902
|
+
/* @__PURE__ */ t(Lt, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1896
1903
|
T,
|
|
1897
1904
|
{
|
|
1898
1905
|
variant: "ghost",
|
|
1899
1906
|
size: "xs",
|
|
1900
|
-
onClick:
|
|
1901
|
-
disabled:
|
|
1907
|
+
onClick: _r,
|
|
1908
|
+
disabled: br || !(e != null && e.accessToken) || !(n != null && n.apiServiceUrl),
|
|
1902
1909
|
className: be(
|
|
1903
1910
|
"w-7 px-0",
|
|
1904
1911
|
X ? "bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary focus-visible:bg-primary/15" : "text-muted-foreground hover:text-foreground"
|
|
1905
1912
|
),
|
|
1906
1913
|
"aria-pressed": X,
|
|
1907
1914
|
"aria-label": X ? "Remove as default dashboard" : "Set as default dashboard",
|
|
1908
|
-
children: /* @__PURE__ */ t(
|
|
1915
|
+
children: /* @__PURE__ */ t(wa, { className: "h-3.5 w-3.5" })
|
|
1909
1916
|
}
|
|
1910
1917
|
) }),
|
|
1911
|
-
/* @__PURE__ */ t(
|
|
1918
|
+
/* @__PURE__ */ t(Mt, { children: /* @__PURE__ */ t("p", { children: X ? "Remove as default dashboard" : "Set as default dashboard" }) })
|
|
1912
1919
|
] }) })
|
|
1913
1920
|
] }))
|
|
1914
1921
|
] }),
|
|
1915
1922
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
1916
|
-
|
|
1917
|
-
/* @__PURE__ */ t(
|
|
1918
|
-
/* @__PURE__ */ t(
|
|
1923
|
+
R && /* @__PURE__ */ i($, { children: [
|
|
1924
|
+
/* @__PURE__ */ t(tn, {}),
|
|
1925
|
+
/* @__PURE__ */ t(rn, {})
|
|
1919
1926
|
] }),
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
variant: "outline",
|
|
1924
|
-
size: "xs",
|
|
1925
|
-
onClick: () => ye(!0),
|
|
1926
|
-
children: [
|
|
1927
|
-
/* @__PURE__ */ t(Ba, { className: "h-3.5 w-3.5" }),
|
|
1928
|
-
"Share"
|
|
1929
|
-
]
|
|
1930
|
-
}
|
|
1931
|
-
),
|
|
1932
|
-
!P && k && !f && c.canUseFilters && s && /* @__PURE__ */ t(cn, {}),
|
|
1933
|
-
k && !P && !f && s && !L && /* @__PURE__ */ i("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
|
|
1927
|
+
s && !f && /* @__PURE__ */ t(un, {}),
|
|
1928
|
+
!R && k && !f && u.canUseFilters && s && /* @__PURE__ */ t(an, {}),
|
|
1929
|
+
k && !R && !f && s && !L && /* @__PURE__ */ i("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
|
|
1934
1930
|
/* @__PURE__ */ i(
|
|
1935
1931
|
T,
|
|
1936
1932
|
{
|
|
1937
1933
|
variant: "ghost",
|
|
1938
1934
|
size: "xs",
|
|
1939
1935
|
disabled: !k,
|
|
1940
|
-
onClick: () => void
|
|
1936
|
+
onClick: () => void vr(),
|
|
1941
1937
|
className: "h-full rounded-none border-0 shadow-none hover:bg-accent",
|
|
1942
1938
|
children: [
|
|
1943
1939
|
/* @__PURE__ */ t(ee, { className: "h-3.5 w-3.5" }),
|
|
@@ -1945,8 +1941,8 @@ function Ho() {
|
|
|
1945
1941
|
]
|
|
1946
1942
|
}
|
|
1947
1943
|
),
|
|
1948
|
-
/* @__PURE__ */ i(
|
|
1949
|
-
/* @__PURE__ */ t(
|
|
1944
|
+
/* @__PURE__ */ i(St, { modal: !1, children: [
|
|
1945
|
+
/* @__PURE__ */ t(kt, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1950
1946
|
T,
|
|
1951
1947
|
{
|
|
1952
1948
|
variant: "ghost",
|
|
@@ -1954,15 +1950,15 @@ function Ho() {
|
|
|
1954
1950
|
className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
|
|
1955
1951
|
"aria-label": "Open visual options",
|
|
1956
1952
|
disabled: !k,
|
|
1957
|
-
children: /* @__PURE__ */ t(
|
|
1953
|
+
children: /* @__PURE__ */ t(Ya, { className: "h-3.5 w-3.5" })
|
|
1958
1954
|
}
|
|
1959
1955
|
) }),
|
|
1960
1956
|
/* @__PURE__ */ t(
|
|
1961
|
-
|
|
1957
|
+
Ct,
|
|
1962
1958
|
{
|
|
1963
1959
|
align: "end",
|
|
1964
1960
|
className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm",
|
|
1965
|
-
children: /* @__PURE__ */ i(
|
|
1961
|
+
children: /* @__PURE__ */ i(_, { onClick: () => de(!0), children: [
|
|
1966
1962
|
/* @__PURE__ */ t(ee, { className: "h-3.5 w-3.5" }),
|
|
1967
1963
|
"From library..."
|
|
1968
1964
|
] })
|
|
@@ -1970,33 +1966,33 @@ function Ho() {
|
|
|
1970
1966
|
)
|
|
1971
1967
|
] }),
|
|
1972
1968
|
/* @__PURE__ */ t(
|
|
1973
|
-
|
|
1969
|
+
nn,
|
|
1974
1970
|
{
|
|
1975
1971
|
open: ke,
|
|
1976
1972
|
onOpenChange: de
|
|
1977
1973
|
}
|
|
1978
1974
|
)
|
|
1979
1975
|
] }),
|
|
1980
|
-
!
|
|
1981
|
-
/* @__PURE__ */ i(T, { size: "xs", onClick:
|
|
1982
|
-
/* @__PURE__ */ t(
|
|
1976
|
+
!R && !k && (m || f) && (!g || !p || m !== void 0) && s && /* @__PURE__ */ i("div", { className: "inline-flex items-center gap-1", children: [
|
|
1977
|
+
/* @__PURE__ */ i(T, { size: "xs", onClick: kr, children: [
|
|
1978
|
+
/* @__PURE__ */ t(Na, { className: "h-3.5 w-3.5" }),
|
|
1983
1979
|
f ? "Inspect" : "Edit"
|
|
1984
1980
|
] }),
|
|
1985
|
-
b ? /* @__PURE__ */ t(
|
|
1986
|
-
/* @__PURE__ */ t(
|
|
1981
|
+
b ? /* @__PURE__ */ t(It, { children: /* @__PURE__ */ i(At, { children: [
|
|
1982
|
+
/* @__PURE__ */ t(Lt, { asChild: !0, children: /* @__PURE__ */ t(
|
|
1987
1983
|
"button",
|
|
1988
1984
|
{
|
|
1989
1985
|
type: "button",
|
|
1990
1986
|
"aria-label": b,
|
|
1991
1987
|
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",
|
|
1992
|
-
children: /* @__PURE__ */ t(
|
|
1988
|
+
children: /* @__PURE__ */ t(Wa, { "aria-hidden": "true", className: "size-3.5" })
|
|
1993
1989
|
}
|
|
1994
1990
|
) }),
|
|
1995
|
-
/* @__PURE__ */ t(
|
|
1991
|
+
/* @__PURE__ */ t(Mt, { children: /* @__PURE__ */ t("p", { children: b }) })
|
|
1996
1992
|
] }) }) : null
|
|
1997
1993
|
] }),
|
|
1998
1994
|
je && s && ze && /* @__PURE__ */ t(
|
|
1999
|
-
|
|
1995
|
+
yo,
|
|
2000
1996
|
{
|
|
2001
1997
|
saved: qe,
|
|
2002
1998
|
draft: h,
|
|
@@ -2008,10 +2004,10 @@ function Ho() {
|
|
|
2008
2004
|
{
|
|
2009
2005
|
variant: "outline",
|
|
2010
2006
|
size: "xs",
|
|
2011
|
-
onClick:
|
|
2007
|
+
onClick: Ar,
|
|
2012
2008
|
disabled: Ie,
|
|
2013
2009
|
children: [
|
|
2014
|
-
/* @__PURE__ */ t(
|
|
2010
|
+
/* @__PURE__ */ t(Sa, { className: "h-3.5 w-3.5" }),
|
|
2015
2011
|
"Undo"
|
|
2016
2012
|
]
|
|
2017
2013
|
}
|
|
@@ -2020,81 +2016,82 @@ function Ho() {
|
|
|
2020
2016
|
T,
|
|
2021
2017
|
{
|
|
2022
2018
|
size: "xs",
|
|
2023
|
-
className: be(!
|
|
2024
|
-
disabled: Ie || !
|
|
2019
|
+
className: be(!pt && "opacity-60"),
|
|
2020
|
+
disabled: Ie || !pt,
|
|
2025
2021
|
onClick: () => Ke(),
|
|
2026
2022
|
children: [
|
|
2027
|
-
Ie ? /* @__PURE__ */ t(Pe, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(
|
|
2023
|
+
Ie ? /* @__PURE__ */ t(Pe, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(kn, { className: "h-3.5 w-3.5" }),
|
|
2028
2024
|
Ie ? "Saving..." : "Save"
|
|
2029
2025
|
]
|
|
2030
2026
|
}
|
|
2031
2027
|
),
|
|
2032
|
-
k && !
|
|
2033
|
-
/* @__PURE__ */ t(
|
|
2028
|
+
k && !R && s && /* @__PURE__ */ i(T, { variant: "outline", size: "xs", onClick: Dr, children: [
|
|
2029
|
+
/* @__PURE__ */ t(ka, { className: "h-3.5 w-3.5" }),
|
|
2034
2030
|
"Close"
|
|
2035
2031
|
] }),
|
|
2036
|
-
!
|
|
2037
|
-
!
|
|
2038
|
-
!
|
|
2039
|
-
/* @__PURE__ */ t(
|
|
2040
|
-
|
|
2032
|
+
!R && s && /* @__PURE__ */ t("div", { className: "ml-2 flex items-center", children: /* @__PURE__ */ t(on, {}) }),
|
|
2033
|
+
!R && c && /* @__PURE__ */ t(Rn, {}),
|
|
2034
|
+
!R && s && !f && /* @__PURE__ */ i(St, { children: [
|
|
2035
|
+
/* @__PURE__ */ t(kt, { asChild: !0, children: /* @__PURE__ */ t(
|
|
2036
|
+
T,
|
|
2041
2037
|
{
|
|
2042
|
-
|
|
2038
|
+
variant: "ghost",
|
|
2039
|
+
size: "xs",
|
|
2043
2040
|
className: "w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
variant: "ghost",
|
|
2047
|
-
"aria-label": "More dashboard options"
|
|
2048
|
-
},
|
|
2049
|
-
children: /* @__PURE__ */ t(Ha, { className: "h-3.5 w-3.5" })
|
|
2041
|
+
"aria-label": "More dashboard options",
|
|
2042
|
+
children: /* @__PURE__ */ t(Ca, { className: "h-3.5 w-3.5" })
|
|
2050
2043
|
}
|
|
2051
2044
|
) }),
|
|
2052
2045
|
/* @__PURE__ */ i(
|
|
2053
|
-
|
|
2046
|
+
Ct,
|
|
2054
2047
|
{
|
|
2055
2048
|
align: "end",
|
|
2056
2049
|
className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
|
|
2057
2050
|
children: [
|
|
2058
2051
|
/* @__PURE__ */ t(Me, { children: "Reports & briefings" }),
|
|
2059
2052
|
/* @__PURE__ */ i(
|
|
2060
|
-
|
|
2053
|
+
_,
|
|
2061
2054
|
{
|
|
2062
2055
|
disabled: w,
|
|
2063
2056
|
onSelect: () => se(!0),
|
|
2064
2057
|
children: [
|
|
2065
|
-
/* @__PURE__ */ t(
|
|
2058
|
+
/* @__PURE__ */ t(Da, { className: "h-3.5 w-3.5" }),
|
|
2066
2059
|
"Export"
|
|
2067
2060
|
]
|
|
2068
2061
|
}
|
|
2069
2062
|
),
|
|
2070
2063
|
/* @__PURE__ */ t(
|
|
2071
|
-
|
|
2064
|
+
fo,
|
|
2072
2065
|
{
|
|
2073
|
-
scheduleReportVisible: !!(
|
|
2074
|
-
analyticalBriefingVisible: !!(
|
|
2066
|
+
scheduleReportVisible: !!(bt && o.surfaceVisible && G && !k),
|
|
2067
|
+
analyticalBriefingVisible: !!(bt && o.surfaceVisible && G && !k),
|
|
2075
2068
|
onScheduleReport: () => oe("scheduled_report"),
|
|
2076
2069
|
onCreateAnalyticalBriefing: () => oe("analytical_briefing")
|
|
2077
2070
|
}
|
|
2078
2071
|
),
|
|
2079
2072
|
k && /* @__PURE__ */ i(
|
|
2080
|
-
|
|
2073
|
+
_,
|
|
2081
2074
|
{
|
|
2082
2075
|
onSelect: () => Ne(!0),
|
|
2083
2076
|
children: [
|
|
2084
|
-
/* @__PURE__ */ t(
|
|
2077
|
+
/* @__PURE__ */ t(Ea, { className: "h-3.5 w-3.5" }),
|
|
2085
2078
|
"Download settings"
|
|
2086
2079
|
]
|
|
2087
2080
|
}
|
|
2088
2081
|
),
|
|
2089
2082
|
/* @__PURE__ */ t(We, {}),
|
|
2090
|
-
|
|
2083
|
+
(V.showDashboardSharing || V.showGroupManagement) && /* @__PURE__ */ i($, { children: [
|
|
2091
2084
|
/* @__PURE__ */ t(Me, { children: "Access" }),
|
|
2092
|
-
/* @__PURE__ */ i(
|
|
2093
|
-
|
|
2085
|
+
V.showDashboardSharing && /* @__PURE__ */ i(_, { onSelect: () => ye(!0), children: [
|
|
2086
|
+
/* @__PURE__ */ t(Ia, { className: "h-3.5 w-3.5" }),
|
|
2087
|
+
"Share"
|
|
2088
|
+
] }),
|
|
2089
|
+
V.showGroupManagement && /* @__PURE__ */ i(
|
|
2090
|
+
_,
|
|
2094
2091
|
{
|
|
2095
|
-
onClick: () =>
|
|
2092
|
+
onClick: () => Q(!0),
|
|
2096
2093
|
children: [
|
|
2097
|
-
/* @__PURE__ */ t(
|
|
2094
|
+
/* @__PURE__ */ t(qt, { className: "h-3.5 w-3.5" }),
|
|
2098
2095
|
"Manage Groups"
|
|
2099
2096
|
]
|
|
2100
2097
|
}
|
|
@@ -2102,76 +2099,76 @@ function Ho() {
|
|
|
2102
2099
|
/* @__PURE__ */ t(We, {})
|
|
2103
2100
|
] }),
|
|
2104
2101
|
/* @__PURE__ */ t(Me, { children: "Preferences" }),
|
|
2105
|
-
/* @__PURE__ */ i(
|
|
2106
|
-
/* @__PURE__ */ t(
|
|
2102
|
+
/* @__PURE__ */ i(_, { onClick: () => Y(!0), children: [
|
|
2103
|
+
/* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5" }),
|
|
2107
2104
|
"Report preferences"
|
|
2108
2105
|
] }),
|
|
2109
|
-
|
|
2106
|
+
c && s && /* @__PURE__ */ i($, { children: [
|
|
2110
2107
|
/* @__PURE__ */ t(We, {}),
|
|
2111
2108
|
/* @__PURE__ */ t(Me, { children: "Developer" }),
|
|
2112
2109
|
/* @__PURE__ */ i(
|
|
2113
|
-
|
|
2110
|
+
_,
|
|
2114
2111
|
{
|
|
2115
2112
|
onSelect: () => {
|
|
2116
|
-
var
|
|
2117
|
-
e != null && e.accessToken && ((
|
|
2118
|
-
() =>
|
|
2119
|
-
).catch(() =>
|
|
2113
|
+
var d;
|
|
2114
|
+
e != null && e.accessToken && ((d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(e.accessToken).then(
|
|
2115
|
+
() => D.success("Token copied to clipboard")
|
|
2116
|
+
).catch(() => D.error("Unable to copy token")) : D.error("Clipboard not available"));
|
|
2120
2117
|
},
|
|
2121
2118
|
children: [
|
|
2122
|
-
/* @__PURE__ */ t(
|
|
2119
|
+
/* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5" }),
|
|
2123
2120
|
"Copy token"
|
|
2124
2121
|
]
|
|
2125
2122
|
}
|
|
2126
2123
|
),
|
|
2127
2124
|
L && /* @__PURE__ */ i(
|
|
2128
|
-
|
|
2125
|
+
_,
|
|
2129
2126
|
{
|
|
2130
2127
|
disabled: !Ve,
|
|
2131
2128
|
onSelect: () => {
|
|
2132
|
-
var
|
|
2129
|
+
var d;
|
|
2133
2130
|
if (!Ve) {
|
|
2134
|
-
|
|
2131
|
+
D.error(
|
|
2135
2132
|
"Open a document sheet with a token to copy the local PDF URL"
|
|
2136
2133
|
);
|
|
2137
2134
|
return;
|
|
2138
2135
|
}
|
|
2139
|
-
(
|
|
2140
|
-
() =>
|
|
2136
|
+
(d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(Ve).then(
|
|
2137
|
+
() => D.success(
|
|
2141
2138
|
"Local document PDF URL copied to clipboard"
|
|
2142
2139
|
)
|
|
2143
2140
|
).catch(
|
|
2144
|
-
() =>
|
|
2141
|
+
() => D.error(
|
|
2145
2142
|
"Unable to copy local document PDF URL"
|
|
2146
2143
|
)
|
|
2147
|
-
) :
|
|
2144
|
+
) : D.error("Clipboard not available");
|
|
2148
2145
|
},
|
|
2149
2146
|
children: [
|
|
2150
|
-
/* @__PURE__ */ t(
|
|
2147
|
+
/* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5" }),
|
|
2151
2148
|
"Copy local document PDF URL"
|
|
2152
2149
|
]
|
|
2153
2150
|
}
|
|
2154
2151
|
),
|
|
2155
2152
|
/* @__PURE__ */ i(
|
|
2156
|
-
|
|
2153
|
+
_,
|
|
2157
2154
|
{
|
|
2158
|
-
onSelect: () =>
|
|
2155
|
+
onSelect: () => sn(n.apiServiceUrl),
|
|
2159
2156
|
children: [
|
|
2160
|
-
/* @__PURE__ */ t(
|
|
2157
|
+
/* @__PURE__ */ t(An, { className: "h-3.5 w-3.5" }),
|
|
2161
2158
|
"Invalidate token"
|
|
2162
2159
|
]
|
|
2163
2160
|
}
|
|
2164
2161
|
),
|
|
2165
|
-
/* @__PURE__ */ i(
|
|
2166
|
-
/* @__PURE__ */ t(
|
|
2162
|
+
/* @__PURE__ */ i(_, { onSelect: l, children: [
|
|
2163
|
+
/* @__PURE__ */ t(Cn, { className: "h-3.5 w-3.5" }),
|
|
2167
2164
|
"Brand Studio"
|
|
2168
2165
|
] }),
|
|
2169
2166
|
k && /* @__PURE__ */ i(
|
|
2170
|
-
|
|
2167
|
+
_,
|
|
2171
2168
|
{
|
|
2172
|
-
onSelect: () =>
|
|
2169
|
+
onSelect: () => lt(!dt),
|
|
2173
2170
|
children: [
|
|
2174
|
-
/* @__PURE__ */ t(
|
|
2171
|
+
/* @__PURE__ */ t(Dn, { className: "h-3.5 w-3.5" }),
|
|
2175
2172
|
dt ? "Hide dashboard JSON" : "Show dashboard JSON"
|
|
2176
2173
|
]
|
|
2177
2174
|
}
|
|
@@ -2182,83 +2179,83 @@ function Ho() {
|
|
|
2182
2179
|
)
|
|
2183
2180
|
] }),
|
|
2184
2181
|
ae && mt && /* @__PURE__ */ t(
|
|
2185
|
-
|
|
2182
|
+
Aa,
|
|
2186
2183
|
{
|
|
2187
2184
|
resource: mt,
|
|
2188
2185
|
resourceType: Qe.DASHBOARD,
|
|
2189
2186
|
onClose: () => ye(!1)
|
|
2190
2187
|
}
|
|
2191
2188
|
),
|
|
2192
|
-
|
|
2193
|
-
|
|
2189
|
+
V.showGroupManagement && /* @__PURE__ */ t(
|
|
2190
|
+
ao,
|
|
2194
2191
|
{
|
|
2195
|
-
open:
|
|
2196
|
-
onOpenChange:
|
|
2192
|
+
open: K,
|
|
2193
|
+
onOpenChange: Q
|
|
2197
2194
|
}
|
|
2198
2195
|
),
|
|
2199
2196
|
/* @__PURE__ */ t(
|
|
2200
|
-
|
|
2197
|
+
mn,
|
|
2201
2198
|
{
|
|
2202
|
-
open:
|
|
2203
|
-
onOpenChange:
|
|
2199
|
+
open: W,
|
|
2200
|
+
onOpenChange: Y
|
|
2204
2201
|
}
|
|
2205
2202
|
),
|
|
2206
2203
|
/* @__PURE__ */ t(
|
|
2207
|
-
|
|
2204
|
+
mo,
|
|
2208
2205
|
{
|
|
2209
2206
|
open: we,
|
|
2210
2207
|
onOpenChange: Ne
|
|
2211
2208
|
}
|
|
2212
2209
|
),
|
|
2213
2210
|
G && ne ? /* @__PURE__ */ t(
|
|
2214
|
-
|
|
2211
|
+
dn,
|
|
2215
2212
|
{
|
|
2216
2213
|
dashboardId: G,
|
|
2217
2214
|
dashboardTitle: (h == null ? void 0 : h.title) || (B == null ? void 0 : B.title),
|
|
2218
2215
|
open: !0,
|
|
2219
|
-
onOpenChange: (
|
|
2220
|
-
|
|
2216
|
+
onOpenChange: (d) => {
|
|
2217
|
+
d || oe(null);
|
|
2221
2218
|
},
|
|
2222
2219
|
hideTrigger: !0,
|
|
2223
2220
|
workflowIntent: ne
|
|
2224
2221
|
}
|
|
2225
2222
|
) : null,
|
|
2226
2223
|
s && /* @__PURE__ */ t(
|
|
2227
|
-
|
|
2224
|
+
La,
|
|
2228
2225
|
{
|
|
2229
2226
|
open: Se,
|
|
2230
2227
|
onOpenChange: se
|
|
2231
2228
|
}
|
|
2232
2229
|
),
|
|
2233
2230
|
/* @__PURE__ */ t(
|
|
2234
|
-
|
|
2231
|
+
Ma,
|
|
2235
2232
|
{
|
|
2236
2233
|
open: Ue,
|
|
2237
|
-
onOpenChange: (
|
|
2238
|
-
!
|
|
2234
|
+
onOpenChange: (d) => {
|
|
2235
|
+
!d && Fe && !F || (J(d), d || (y(null), H([]), q(!1)));
|
|
2239
2236
|
},
|
|
2240
|
-
children: /* @__PURE__ */ i(
|
|
2241
|
-
/* @__PURE__ */ i(
|
|
2242
|
-
/* @__PURE__ */ t(
|
|
2243
|
-
/* @__PURE__ */ t(
|
|
2237
|
+
children: /* @__PURE__ */ i(Oa, { className: "max-w-sm", children: [
|
|
2238
|
+
/* @__PURE__ */ i(Pa, { children: [
|
|
2239
|
+
/* @__PURE__ */ t(_a, { children: F ? "Save failed" : "Saving dashboard" }),
|
|
2240
|
+
/* @__PURE__ */ t(Ra, { className: "pt-2", children: F ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
|
|
2244
2241
|
U.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
|
|
2245
2242
|
/* @__PURE__ */ t("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
|
|
2246
|
-
/* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: U.slice(0, 5).map((
|
|
2243
|
+
/* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: U.slice(0, 5).map((d) => /* @__PURE__ */ t("li", { children: d }, d)) })
|
|
2247
2244
|
] })
|
|
2248
2245
|
] }),
|
|
2249
|
-
/* @__PURE__ */ t(
|
|
2246
|
+
/* @__PURE__ */ t(Ua, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: F ? /* @__PURE__ */ i($, { children: [
|
|
2250
2247
|
/* @__PURE__ */ t(
|
|
2251
|
-
|
|
2248
|
+
Ta,
|
|
2252
2249
|
{
|
|
2253
2250
|
onClick: () => {
|
|
2254
|
-
|
|
2251
|
+
J(!1), y(null), H([]), q(!1);
|
|
2255
2252
|
},
|
|
2256
2253
|
className: "m-0",
|
|
2257
2254
|
children: "Close"
|
|
2258
2255
|
}
|
|
2259
2256
|
),
|
|
2260
2257
|
/* @__PURE__ */ t(
|
|
2261
|
-
|
|
2258
|
+
Et,
|
|
2262
2259
|
{
|
|
2263
2260
|
onClick: () => Ke({
|
|
2264
2261
|
closeAfterSave: ie,
|
|
@@ -2268,7 +2265,7 @@ function Ho() {
|
|
|
2268
2265
|
children: "Retry"
|
|
2269
2266
|
}
|
|
2270
2267
|
)
|
|
2271
|
-
] }) : /* @__PURE__ */ i(
|
|
2268
|
+
] }) : /* @__PURE__ */ i(Et, { disabled: !0, className: "m-0 cursor-default", children: [
|
|
2272
2269
|
/* @__PURE__ */ t(Pe, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
2273
2270
|
"Saving..."
|
|
2274
2271
|
] }) })
|
|
@@ -2276,14 +2273,14 @@ function Ho() {
|
|
|
2276
2273
|
}
|
|
2277
2274
|
),
|
|
2278
2275
|
/* @__PURE__ */ t(
|
|
2279
|
-
|
|
2276
|
+
cn,
|
|
2280
2277
|
{
|
|
2281
|
-
open:
|
|
2282
|
-
onOpenChange: (
|
|
2283
|
-
|
|
2278
|
+
open: yr,
|
|
2279
|
+
onOpenChange: (d) => {
|
|
2280
|
+
le(d);
|
|
2284
2281
|
},
|
|
2285
|
-
onSave:
|
|
2286
|
-
onDiscard:
|
|
2282
|
+
onSave: Er,
|
|
2283
|
+
onDiscard: Ir,
|
|
2287
2284
|
isSaving: Fe,
|
|
2288
2285
|
saveLabel: "Save",
|
|
2289
2286
|
discardLabel: "Discard changes"
|
|
@@ -2294,21 +2291,21 @@ function Ho() {
|
|
|
2294
2291
|
}
|
|
2295
2292
|
);
|
|
2296
2293
|
}
|
|
2297
|
-
function
|
|
2294
|
+
function wo({
|
|
2298
2295
|
accessToken: e,
|
|
2299
2296
|
dashboardId: n,
|
|
2300
2297
|
selectedSheetId: a,
|
|
2301
2298
|
pageSize: r,
|
|
2302
2299
|
orientation: o,
|
|
2303
|
-
theme:
|
|
2300
|
+
theme: c
|
|
2304
2301
|
}) {
|
|
2305
2302
|
if (!e || !a)
|
|
2306
2303
|
return null;
|
|
2307
2304
|
const m = new URL("http://localhost:5173/print-document");
|
|
2308
|
-
m.searchParams.set("token", e), n && m.searchParams.set("dashboardId", n), m.searchParams.set("selectedSheetId", a),
|
|
2305
|
+
m.searchParams.set("token", e), n && m.searchParams.set("dashboardId", n), m.searchParams.set("selectedSheetId", a), c && m.searchParams.set("theme", c);
|
|
2309
2306
|
const p = new URL("http://127.0.0.1:3002/");
|
|
2310
2307
|
return p.searchParams.set("pdfMode", "document"), p.searchParams.set("pageSize", r || "letter"), p.searchParams.set("orientation", o || "portrait"), p.searchParams.set("url", m.toString()), p.toString();
|
|
2311
2308
|
}
|
|
2312
2309
|
export {
|
|
2313
|
-
|
|
2310
|
+
Jo as default
|
|
2314
2311
|
};
|