react-semaphor 0.1.560 → 0.1.562
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 +450 -423
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +9 -9
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{analytics-base-schemas-CHLxsPfX.js → analytics-base-schemas-BaIQrEzX.js} +221 -188
- package/dist/chunks/{assistant-chat-Bu2fFm_I.js → assistant-chat-R_yT8xH4.js} +116 -117
- package/dist/chunks/bookmark-impact-D4Kl4amw.js +75 -0
- package/dist/chunks/bookmark-state-CWeoGbrx.js +743 -0
- package/dist/chunks/{braces-Da41xfUd.js → braces-DzgoQC64.js} +1 -1
- package/dist/chunks/{comparison-window-caption-4FNkMrzE.js → comparison-window-caption-D1EUXzaR.js} +550 -425
- package/dist/chunks/{context-BgPDzLHZ.js → context-R31TSL5V.js} +1 -1
- package/dist/chunks/{dashboard-_MeBuy67.js → dashboard-Bp1y5oun.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CEi4Pr_v.js → dashboard-briefing-launcher-S5FB3aUW.js} +236 -236
- package/dist/chunks/dashboard-controls-CfC_6Ztn.js +2277 -0
- package/dist/chunks/{dashboard-json-B1mU_OMa.js → dashboard-json-gYZT7ZQY.js} +5 -5
- package/dist/chunks/dates-DFY7Gfss.js +91 -0
- package/dist/chunks/{edit-dashboard-visual-0CJN31Y3.js → edit-dashboard-visual-u7OI_g8Q.js} +7119 -7198
- package/dist/chunks/filter-reach-copy-CvV7W5dd.js +3965 -0
- package/dist/chunks/{filter-value-text-CRC-K_l_.js → filter-value-text-CPwFkrMz.js} +11 -10
- package/dist/chunks/global-date-filter-utils-N1kcsOFE.js +16722 -0
- package/dist/chunks/{index-DtHidOPV.js → index-CNGkfUp4.js} +269 -264
- package/dist/chunks/{layout-grid-BvsH4RY2.js → layout-grid-BM65viQh.js} +1 -1
- package/dist/chunks/{list-filter-Dg0otx5E.js → list-filter-BoeLBfL3.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CM18W8w6.js → matrix-analytical-definition-hEucouWM.js} +4 -4
- package/dist/chunks/{matrix-card-HPskLaPy.js → matrix-card-CCh9JjP1.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-Bbrfrke4.js → matrix-member-presentation-DsAUbuoL.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-WPv4R-H_.js → matrix-operation-contract-DsLdFdSa.js} +365 -349
- package/dist/chunks/{metric-comparison-ljMKYZKa.js → metric-comparison-Bnso1cm1.js} +6 -6
- package/dist/chunks/{model-change-Ccn1zaxl.js → model-change-T1cRkh3m.js} +1 -1
- package/dist/chunks/{palette-Bsh376zO.js → palette-p1XSJFgB.js} +1 -1
- package/dist/chunks/pivot-result-contract-expectations-B53jqszr.js +56 -0
- package/dist/chunks/{pivot-result-identity-vS9TSh4f.js → pivot-result-identity-Dq5jm-EC.js} +1 -1
- package/dist/chunks/{zoned-wall-clock-B1n_WjW3.js → raw-temporal-value-Bqz8wc7L.js} +97 -46
- package/dist/chunks/{report-preferences-dialog-BV8L0SeS.js → report-preferences-dialog-C4RAR8u5.js} +68 -63
- package/dist/chunks/{report-runtime-context-BZQh9ywy.js → report-runtime-context-BITkNSDa.js} +2 -2
- package/dist/chunks/resolve-dashboard-input-context-DaDrZGuA.js +8214 -0
- package/dist/chunks/{save-B5EAsgQF.js → save-CHV1B1fL.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-n2Wn11cV.js → saved-dashboard-context-DFYBrE6O.js} +93 -94
- package/dist/chunks/{selection-filter-compiler-BKXmyLrS.js → selection-filter-compiler-CUDRnUxc.js} +19 -18
- package/dist/chunks/{selection-reducer-D0YnaAD9.js → selection-reducer-Bz5aywT4.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-XLBLOJ2V.js → semaphor-ready-indicator-Cfuafnem.js} +38188 -40344
- package/dist/chunks/{shelf-drop-preview-context-DHMa54a-.js → shelf-drop-preview-context-BR2GEYog.js} +81 -82
- package/dist/chunks/{source-entity-resolution-dUG5VWRm.js → source-entity-resolution-DdDVXFB8.js} +6 -6
- package/dist/chunks/{switch-ByxH4M7t.js → switch-BW4yXSYs.js} +3 -3
- package/dist/chunks/{table-export-sheet-C_GdeTYU.js → table-export-sheet-bSXxGn-v.js} +1 -1
- package/dist/chunks/temporal-input-presentation-sk9gqLi6.js +4960 -0
- package/dist/chunks/{token-types-CQtXUVMy.js → token-types-BUK06hU2.js} +1 -1
- package/dist/chunks/{upload-wbR-NVzq.js → upload-BnmuyPqW.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-CEBaLOKC.js → use-create-flow-overlay-state-DyzhWvRJ.js} +6 -6
- package/dist/chunks/{validators-CXTneCA4.js → validators-BIM0FE31.js} +774 -895
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2477 -2685
- package/dist/data-app-sdk/index.js +30 -30
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +25 -25
- package/dist/format-utils/index.js +274 -267
- package/dist/index.js +59 -59
- 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/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/components/dashboard/dashboard-create-dialog.d.ts +23 -0
- package/dist/types/components/dashboard/summary-number-formatter.d.ts +6 -0
- package/dist/types/components/index.d.ts +1 -2
- package/dist/types/components/surfboard/filter/types.d.ts +3 -1
- package/dist/types/index.js +50 -51
- package/dist/types/lib/formatters/kpi-number-formatter.d.ts +41 -0
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +59 -2
- package/dist/types/lib/interactions/get-click-context-from-matrix.d.ts +5 -0
- package/dist/types/lib/interactions/get-click-context-from-table.d.ts +45 -0
- package/dist/types/lib/print/print-inputs.d.ts +2 -1
- package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -0
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +5 -0
- package/dist/types/lib/selection/selection-from-click-context.d.ts +41 -0
- package/dist/types/lib/stores/editor-store.d.ts +9 -1
- package/dist/types/lib/stores/table-actions.d.ts +0 -2
- package/dist/types/lib/types/common-types.d.ts +6 -0
- package/dist/types/lib/types/explorer-types.d.ts +7 -1
- package/dist/types/lib/types/interaction-types.d.ts +3 -1
- package/dist/types/lib/types/token-types.d.ts +0 -1
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +13 -1
- package/dist/types/shared/analytics-protocol/contracts.d.ts +9 -40
- package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +12 -0
- package/dist/types/shared/analytics-protocol/selection-contract.d.ts +12 -2
- package/dist/types/shared/analytics-protocol/validators.d.ts +1 -2
- package/dist/types/shared/assistant-protocol/context.d.ts +8 -8
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +7 -1
- package/dist/types/shared/dashboard-authoring/card-settings/apply-card-settings.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +76 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/carry-column-settings.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-format-write.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +51 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-polarity-write.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-sources.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/confirm-class.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/card-settings/highlight-inputs.d.ts +19 -0
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +117 -0
- package/dist/types/shared/dashboard-authoring/card-settings/read-card-settings.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-highlights.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolve-card-settings.d.ts +59 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +51 -0
- package/dist/types/shared/dashboard-authoring/card-settings/views.d.ts +30 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/changes/card-types.d.ts +32 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +3402 -4313
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +49 -8
- package/dist/types/shared/dashboard-authoring/changes/field-ref.d.ts +91 -0
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +52 -2
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-create.d.ts +26 -0
- package/dist/types/shared/dashboard-authoring/click-to-filter-settings.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +1 -8
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +20 -20
- package/dist/types/shared/dashboard-authoring/detail-date-presentation.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +11 -6
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +123 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/apply.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +41 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +63 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +79 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +934 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/sentences.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/set.d.ts +11 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/transform.d.ts +63 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/window-transforms.d.ts +60 -0
- package/dist/types/shared/dashboard-authoring/new-card.d.ts +12 -1
- package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/operations/operation-sentences.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +73 -3
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -3
- package/dist/types/shared/dashboard-authoring/text-card-words/blocks.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/text-card-words/index.d.ts +55 -0
- package/dist/types/shared/dashboard-authoring/text-card-words/rich-content.d.ts +18 -0
- package/dist/types/shared/dashboard-viewer/bookmark-impact.d.ts +33 -0
- package/dist/types/shared/format-utils/document-print.d.ts +82 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +8 -1
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/raw-temporal.d.ts +18 -7
- package/dist/types/shared/temporal/index.d.ts +1 -0
- package/dist/types/shared/temporal/raw-temporal-equality.d.ts +19 -0
- package/dist/types/shared/temporal/raw-temporal-value.d.ts +29 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +6 -0
- package/package.json +2 -2
- package/dist/chunks/bookmark-state-BFY9oNmr.js +0 -111
- package/dist/chunks/custom-visual-inputs-Dz-enUNR.js +0 -292
- package/dist/chunks/dashboard-controls-Bi7fyG-4.js +0 -2339
- package/dist/chunks/document-dashboard-inputs-CkWfDB8c.js +0 -3010
- package/dist/chunks/filter-reach-copy-BF4w4kI2.js +0 -3738
- package/dist/chunks/global-date-filter-utils-D8365uPH.js +0 -12889
- package/dist/chunks/pivot-result-contract-expectations-Bl5suy4-.js +0 -1832
- package/dist/chunks/raw-temporal-presentation-BHm7s-hz.js +0 -540
- package/dist/chunks/resolve-dashboard-input-context-CAMiWvyR.js +0 -5280
- package/dist/chunks/table-settings-Imz0FgWi.js +0 -637
- package/dist/chunks/temporal-input-presentation-uvNK_tM0.js +0 -3228
- package/dist/types/components/dashboard/ai-dashboard-create-dialog.d.ts +0 -38
- package/dist/types/components/dashboard/dashboard-create-template.d.ts +0 -10
- package/dist/types/lib/hooks/use-dashboard-authoring.d.ts +0 -49
- package/dist/types/shared/dashboard-authoring/artifact-compiler.d.ts +0 -6
- package/dist/types/shared/dashboard-authoring/contracts.d.ts +0 -106
- package/dist/types/shared/dashboard-authoring/protocol-adapter.d.ts +0 -7
- package/dist/types/shared/dashboard-authoring/source-matching.d.ts +0 -34
- package/dist/types/shared/dashboard-authoring/validators.d.ts +0 -2
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as R } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { cF as ot, bK as Ie, bL as Te, bN as
|
|
4
|
-
import { c as fe, B as T, X as
|
|
5
|
-
import { L as Ee } from "./layout-grid-
|
|
2
|
+
import Mt, { useState as D, useEffect as ve, useCallback as Y, useMemo as ee, useLayoutEffect as Dt, useRef as nt, useContext as Ut } from "react";
|
|
3
|
+
import { cF as ot, bK as Ie, bL as Te, bN as Ve, cG as na, b8 as it, b5 as Qe, cH as sa, cI as Ke, cJ as lt, a7 as Ge, a4 as de, u as w, cK as oa, cL as ia, bJ as E, cM as la, a6 as J, b3 as da, ca, cN as ua, cO as ha, bD as ma, a$ as xe, cu as Ot, aS as $e, o as pa, k as fa, cP as ga, cx as dt, cy as ct, cz as ut, cA as ht, cB as mt, cC as pt, cD as ft, cE as Rt, aP as gt, cQ as ba, cR as va, cm as et, cj as Le, ck as Be, cS as zt, cl as Pe, c6 as K, cv as xa, cq as We, cT as ya, c4 as Ca, bM as bt, bO as vt, cU as wa, bI as Na, cV as _t, bu as xt, cW as Sa, bv as ka, i as Da, cX as Aa, bp as Fa, w as Ea, t as Ia, cY as Ta, cZ as Va, c_ as La, c$ as ue, d0 as Ba, R as jt, d1 as Pa, d2 as Ma, d3 as Ua, aM as Oa, d4 as Ra, d5 as le, d6 as za, W as yt, d7 as _a, d8 as ja, d9 as $a, da as Wa, db as qa, dc as Ha, dd as Qa, de as $t, df as Ka, dg as Ga, dh as Xa, di as Wt, dj as Ya, dk as ze, dl as Za, dm as Ja, dn as er, A as tr, aB as ar, aC as rr, ah as nr, ag as sr, af as or, ae as ir, ab as lr, a9 as dr, dp as cr, dq as ur, dr as hr, ds as mr, dt as pr, az as fr } from "./semaphor-ready-indicator-Cfuafnem.js";
|
|
4
|
+
import { c as fe, B as T, X as Xe, m as De, r as st, L as ae, k as qt, d as Ct, j as gr, y as wt, P as Ae, a3 as br, b as Fe, a as qe, S as Ht } from "./switch-BW4yXSYs.js";
|
|
5
|
+
import { L as Ee } from "./layout-grid-BM65viQh.js";
|
|
6
6
|
import "./index-CuHybtft.js";
|
|
7
|
-
import { o as vr } from "./validators-
|
|
8
|
-
import "./matrix-operation-contract-
|
|
9
|
-
import "./analytics-base-schemas-
|
|
7
|
+
import { o as vr } from "./validators-BIM0FE31.js";
|
|
8
|
+
import "./matrix-operation-contract-DsLdFdSa.js";
|
|
9
|
+
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
10
10
|
import "zod";
|
|
11
11
|
import "../value-format-preferences/index.js";
|
|
12
|
-
import { c as
|
|
12
|
+
import { c as Z } from "./_commonjsHelpers-DimLPMtv.js";
|
|
13
13
|
import { s as _e } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
14
|
-
import {
|
|
14
|
+
import { bv as At, b8 as Ft, e6 as Et, eO as xr, eP as He, eQ as It, eR as yr, a$ as Nt, eS as Cr, eT as wr, eU as Nr, ck as Sr, eV as kr } from "./global-date-filter-utils-N1kcsOFE.js";
|
|
15
15
|
import { createPortal as Dr } from "react-dom";
|
|
16
|
-
import "./temporal-input-presentation-
|
|
16
|
+
import { aH as Tt } from "./temporal-input-presentation-sk9gqLi6.js";
|
|
17
|
+
import { O as Ar } from "./bookmark-state-CWeoGbrx.js";
|
|
17
18
|
import "./index-CJW5BdWT.js";
|
|
18
|
-
import
|
|
19
|
-
import { S as Qt } from "./save-
|
|
20
|
-
import { V as Fr, L as Er, a as Ir, u as Kt, C as Gt, F as Tr, b as
|
|
21
|
-
import { m as
|
|
22
|
-
import {
|
|
23
|
-
import { g as
|
|
24
|
-
import { g as ie, d as Pr, a as Ur } from "./index-DtHidOPV.js";
|
|
19
|
+
import "./context-R31TSL5V.js";
|
|
20
|
+
import { S as Qt } from "./save-CHV1B1fL.js";
|
|
21
|
+
import { V as Fr, L as Er, a as Ir, u as Kt, C as Gt, F as Tr, b as Vr } from "./use-create-flow-overlay-state-DyzhWvRJ.js";
|
|
22
|
+
import { m as Lr, k as Xt, n as Yt } from "./report-preferences-dialog-C4RAR8u5.js";
|
|
23
|
+
import { s as Br, a8 as Pr } from "./resolve-dashboard-input-context-DaDrZGuA.js";
|
|
24
|
+
import { g as ie, d as Mr, a as Ur } from "./index-CNGkfUp4.js";
|
|
25
25
|
/**
|
|
26
26
|
* @license lucide-react v0.453.0 - ISC
|
|
27
27
|
*
|
|
@@ -38,7 +38,7 @@ const Or = fe("ArrowUpRight", [
|
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
40
|
*/
|
|
41
|
-
const
|
|
41
|
+
const Vt = fe("Bell", [
|
|
42
42
|
["path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9", key: "1qo2s2" }],
|
|
43
43
|
["path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0", key: "qgo35s" }]
|
|
44
44
|
]);
|
|
@@ -75,7 +75,7 @@ const zr = fe("CodeXml", [
|
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
77
|
*/
|
|
78
|
-
const
|
|
78
|
+
const Lt = fe("MonitorSmartphone", [
|
|
79
79
|
["path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8", key: "10dyio" }],
|
|
80
80
|
["path", { d: "M10 19v-3.96 3.15", key: "1irgej" }],
|
|
81
81
|
["path", { d: "M7 19h5", key: "qswx4l" }],
|
|
@@ -156,7 +156,7 @@ function Wr({
|
|
|
156
156
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
157
157
|
/* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
158
158
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
159
|
-
/* @__PURE__ */ e(
|
|
159
|
+
/* @__PURE__ */ e(Ve, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "New library visual" }),
|
|
160
160
|
/* @__PURE__ */ e("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Visual" })
|
|
161
161
|
] })
|
|
162
162
|
] }),
|
|
@@ -169,7 +169,7 @@ function Wr({
|
|
|
169
169
|
onClick: () => h(!1),
|
|
170
170
|
"aria-label": "Close",
|
|
171
171
|
disabled: n,
|
|
172
|
-
children: /* @__PURE__ */ e(
|
|
172
|
+
children: /* @__PURE__ */ e(Xe, { className: "h-3.5 w-3.5" })
|
|
173
173
|
}
|
|
174
174
|
)
|
|
175
175
|
] }),
|
|
@@ -329,7 +329,7 @@ async function Bt(t, a, o, n, i = "Opening library visual...") {
|
|
|
329
329
|
throw E.dismiss(c), l;
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Zt(t) {
|
|
333
333
|
if (typeof t == "string")
|
|
334
334
|
return JSON.parse(t);
|
|
335
335
|
if (typeof t == "object")
|
|
@@ -341,7 +341,7 @@ function Qr(t, a) {
|
|
|
341
341
|
const o = (t == null ? void 0 : t.frameObject) ?? ((r = t == null ? void 0 : t.visual) == null ? void 0 : r.frameObject);
|
|
342
342
|
if (!o)
|
|
343
343
|
return !1;
|
|
344
|
-
const n =
|
|
344
|
+
const n = Zt(o);
|
|
345
345
|
if (!(n != null && n.cards) || n.cards.length === 0)
|
|
346
346
|
return !1;
|
|
347
347
|
const i = (d = n.cards) == null ? void 0 : d.find(
|
|
@@ -355,13 +355,13 @@ function Qr(t, a) {
|
|
|
355
355
|
}), !0) : !1;
|
|
356
356
|
}
|
|
357
357
|
function Kr() {
|
|
358
|
-
const t =
|
|
358
|
+
const t = J(
|
|
359
359
|
(n) => {
|
|
360
360
|
var i;
|
|
361
361
|
return ((i = n.card.customCardPreferences) == null ? void 0 : i.url) || "";
|
|
362
362
|
}
|
|
363
363
|
), a = qr(t);
|
|
364
|
-
return { getUpdatedFrame:
|
|
364
|
+
return { getUpdatedFrame: Y(() => {
|
|
365
365
|
var N;
|
|
366
366
|
da();
|
|
367
367
|
const {
|
|
@@ -372,7 +372,7 @@ function Kr() {
|
|
|
372
372
|
selectedDatabaseName: c,
|
|
373
373
|
selectedTableName: l,
|
|
374
374
|
selectedConnectionId: u
|
|
375
|
-
} =
|
|
375
|
+
} = J.getState(), h = i.sql, m = (N = a == null ? void 0 : a.getState()) == null ? void 0 : N.settings, p = At(i, {
|
|
376
376
|
isDevMode: r,
|
|
377
377
|
cardSql: h,
|
|
378
378
|
selectedSchemaName: d,
|
|
@@ -383,8 +383,8 @@ function Kr() {
|
|
|
383
383
|
stripConfig: Ft
|
|
384
384
|
}), f = n.cards.map((S) => {
|
|
385
385
|
if (S.id === i.id) return Et({ before: i, after: p });
|
|
386
|
-
const
|
|
387
|
-
return Et({ before: S, after:
|
|
386
|
+
const M = xr(S) ? At(S, { isDevMode: !0, cardSql: S.sql, stripConfig: Ft }) : S;
|
|
387
|
+
return Et({ before: S, after: M });
|
|
388
388
|
}), g = f.flatMap((S) => S.dropped);
|
|
389
389
|
g.length && E.info("Some conditional formatting rules were removed", {
|
|
390
390
|
description: `Their column isn't in the saved visual: ${g.map((S) => S.name || "an unnamed rule").join(", ")}.`
|
|
@@ -400,7 +400,7 @@ function Kr() {
|
|
|
400
400
|
function ye() {
|
|
401
401
|
const { authToken: t, tokenProps: a } = it(), o = Qe(), n = sa(), i = Ke(), { selectVisual: r } = lt(), {
|
|
402
402
|
setFrame: d,
|
|
403
|
-
|
|
403
|
+
loadCard: c,
|
|
404
404
|
setIsDevMode: l,
|
|
405
405
|
initializeModeDrafts: u,
|
|
406
406
|
setActiveTabCardId: h,
|
|
@@ -411,31 +411,31 @@ function ye() {
|
|
|
411
411
|
setSelectedSchemaName: x,
|
|
412
412
|
setSelectedTableName: N,
|
|
413
413
|
setSelectedDatamodelId: S,
|
|
414
|
-
setInlineFilterValuesMap:
|
|
414
|
+
setInlineFilterValuesMap: M,
|
|
415
415
|
setApplyFilters: U,
|
|
416
416
|
clearEditorContext: F
|
|
417
417
|
} = Ge(), {
|
|
418
418
|
setIsDashboardEditing: O,
|
|
419
419
|
setIsVisualEditing: b,
|
|
420
420
|
clearSelectedFrameId: I
|
|
421
|
-
} = de(), C = w((
|
|
422
|
-
(
|
|
423
|
-
),
|
|
421
|
+
} = de(), C = w((L) => L.selectedSheetId), A = w((L) => L.selectedFrameId), k = w((L) => L.dashboard), j = w(
|
|
422
|
+
(L) => L.inlineFilterValuesMap
|
|
423
|
+
), V = oa((i == null ? void 0 : i.id) || "", {
|
|
424
424
|
enabled: !!(i != null && i.id) && !!(t != null && t.accessToken)
|
|
425
|
-
}), z =
|
|
426
|
-
async (
|
|
425
|
+
}), z = Y(
|
|
426
|
+
async (L) => {
|
|
427
427
|
try {
|
|
428
|
-
r(
|
|
429
|
-
const { data: te, fromCache:
|
|
428
|
+
r(L), I(), F();
|
|
429
|
+
const { data: te, fromCache: X } = await Bt(
|
|
430
430
|
a.apiServiceUrl,
|
|
431
431
|
(t == null ? void 0 : t.accessToken) || "",
|
|
432
|
-
|
|
432
|
+
L.id,
|
|
433
433
|
o,
|
|
434
434
|
"Opening library visual..."
|
|
435
435
|
);
|
|
436
436
|
if (!Qr(te, {
|
|
437
437
|
setFrame: d,
|
|
438
|
-
|
|
438
|
+
loadCard: c,
|
|
439
439
|
setIsDevMode: l,
|
|
440
440
|
initializeModeDrafts: u,
|
|
441
441
|
setActiveTabCardId: h,
|
|
@@ -446,7 +446,7 @@ function ye() {
|
|
|
446
446
|
setSelectedSchemaName: x,
|
|
447
447
|
setSelectedTableName: N,
|
|
448
448
|
setSelectedDatamodelId: S,
|
|
449
|
-
setInlineFilterValuesMap:
|
|
449
|
+
setInlineFilterValuesMap: M,
|
|
450
450
|
setApplyFilters: U,
|
|
451
451
|
setIsDashboardEditing: O,
|
|
452
452
|
setIsVisualEditing: b,
|
|
@@ -456,7 +456,7 @@ function ye() {
|
|
|
456
456
|
inlineFilterValuesMap: j
|
|
457
457
|
}))
|
|
458
458
|
throw new Error("Failed to setup editor with visual data");
|
|
459
|
-
return { success: !0, fromCache:
|
|
459
|
+
return { success: !0, fromCache: X };
|
|
460
460
|
} catch (te) {
|
|
461
461
|
return console.error("Error editing visual:", te), { success: !1, error: "Failed to load visual for editing" };
|
|
462
462
|
}
|
|
@@ -480,7 +480,7 @@ function ye() {
|
|
|
480
480
|
x,
|
|
481
481
|
N,
|
|
482
482
|
S,
|
|
483
|
-
|
|
483
|
+
M,
|
|
484
484
|
U,
|
|
485
485
|
F,
|
|
486
486
|
I,
|
|
@@ -489,28 +489,28 @@ function ye() {
|
|
|
489
489
|
A,
|
|
490
490
|
j
|
|
491
491
|
]
|
|
492
|
-
), G =
|
|
493
|
-
async (
|
|
494
|
-
var
|
|
492
|
+
), G = Y(
|
|
493
|
+
async (L) => {
|
|
494
|
+
var X;
|
|
495
495
|
const te = (H) => (E.error(H), { success: !1, error: H });
|
|
496
496
|
try {
|
|
497
|
-
if (r(
|
|
497
|
+
if (r(L), !C)
|
|
498
498
|
return te("No sheet selected. Please select a sheet first.");
|
|
499
499
|
const { data: H, fromCache: he } = await Bt(
|
|
500
500
|
a.apiServiceUrl,
|
|
501
501
|
(t == null ? void 0 : t.accessToken) || "",
|
|
502
|
-
|
|
502
|
+
L.id,
|
|
503
503
|
o,
|
|
504
504
|
"Adding visual to dashboard..."
|
|
505
|
-
), ge = (H == null ? void 0 : H.frameObject) ?? ((
|
|
505
|
+
), ge = (H == null ? void 0 : H.frameObject) ?? ((X = H == null ? void 0 : H.visual) == null ? void 0 : X.frameObject);
|
|
506
506
|
if (!ge)
|
|
507
507
|
return te("Visual has no frame data");
|
|
508
|
-
const Q =
|
|
508
|
+
const Q = Zt(ge);
|
|
509
509
|
if (!(Q != null && Q.cards) || Q.cards.length === 0)
|
|
510
510
|
return te("Visual frame is malformed");
|
|
511
511
|
const _ = {
|
|
512
512
|
...ia(Q),
|
|
513
|
-
visualId:
|
|
513
|
+
visualId: L.id
|
|
514
514
|
// Link this frame to the library visual
|
|
515
515
|
};
|
|
516
516
|
return await n(C, _), O(!0), { success: !0, fromCache: he };
|
|
@@ -531,17 +531,17 @@ function ye() {
|
|
|
531
531
|
]
|
|
532
532
|
);
|
|
533
533
|
return {
|
|
534
|
-
visual:
|
|
535
|
-
isLoading:
|
|
536
|
-
isError:
|
|
537
|
-
error:
|
|
534
|
+
visual: V.data,
|
|
535
|
+
isLoading: V.isLoading,
|
|
536
|
+
isError: V.isError,
|
|
537
|
+
error: V.error,
|
|
538
538
|
handleEditLibraryVisual: z,
|
|
539
539
|
handleAddLibraryVisual: G,
|
|
540
540
|
getUpdatedFrame: Kr().getUpdatedFrame,
|
|
541
|
-
refetch:
|
|
541
|
+
refetch: V.refetch
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function Jt(t) {
|
|
545
545
|
return t ? new Date(t).toLocaleDateString("en-US", {
|
|
546
546
|
month: "short",
|
|
547
547
|
day: "numeric",
|
|
@@ -560,11 +560,11 @@ function St(t, a) {
|
|
|
560
560
|
function Gr(t, a) {
|
|
561
561
|
return St(t, a).split(/\s+/).filter(Boolean).slice(0, 2).map((n) => n.charAt(0).toUpperCase()).join("") || "?";
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Xr(t) {
|
|
564
564
|
const a = (t || "").toLowerCase();
|
|
565
565
|
return a.includes("table") ? qt : a.includes("pie") || a.includes("donut") ? ba : a.includes("line") ? va : a.includes("bar") ? gr : Ee;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function Yr({ visual: t }) {
|
|
568
568
|
const a = t.ownership.status === "public" ? "Public" : t.ownership.status === "shared" || t.ownership.sharedCount > 0 ? "Shared" : "Private";
|
|
569
569
|
return /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded-[4px] border border-border/60 px-1.5 py-px text-[11px] text-muted-foreground", children: a });
|
|
570
570
|
}
|
|
@@ -576,7 +576,7 @@ function cs({
|
|
|
576
576
|
null
|
|
577
577
|
), [m, p] = D(
|
|
578
578
|
null
|
|
579
|
-
), [f, g] = D(!1), [x, N] = D(null), [S,
|
|
579
|
+
), [f, g] = D(!1), [x, N] = D(null), [S, M] = D(null), U = () => {
|
|
580
580
|
d(/* @__PURE__ */ new Set()), h(null), p(null), g(!1), N(null);
|
|
581
581
|
}, F = () => {
|
|
582
582
|
a(!1), U();
|
|
@@ -584,12 +584,12 @@ function cs({
|
|
|
584
584
|
resources: A,
|
|
585
585
|
isLoading: k,
|
|
586
586
|
isError: j,
|
|
587
|
-
createResource:
|
|
587
|
+
createResource: V,
|
|
588
588
|
updateResource: z,
|
|
589
589
|
deleteResourceAsync: G,
|
|
590
|
-
duplicateResource:
|
|
590
|
+
duplicateResource: L,
|
|
591
591
|
isCreating: te,
|
|
592
|
-
isDeleting:
|
|
592
|
+
isDeleting: X
|
|
593
593
|
} = ua(
|
|
594
594
|
void 0,
|
|
595
595
|
(v) => {
|
|
@@ -618,13 +618,13 @@ function cs({
|
|
|
618
618
|
(v) => v.permissions.canShare
|
|
619
619
|
), Ce = _.length > 0 && _.every(
|
|
620
620
|
(v) => r.has(v.id)
|
|
621
|
-
),
|
|
621
|
+
), Me = _.some(
|
|
622
622
|
(v) => r.has(v.id)
|
|
623
|
-
),
|
|
623
|
+
), Ye = (v) => {
|
|
624
624
|
const B = new Set(r);
|
|
625
625
|
v(B), d(B);
|
|
626
626
|
}, $ = (v) => {
|
|
627
|
-
|
|
627
|
+
Ye((B) => {
|
|
628
628
|
B.has(v) ? B.delete(v) : B.add(v);
|
|
629
629
|
});
|
|
630
630
|
}, W = () => {
|
|
@@ -648,11 +648,11 @@ function cs({
|
|
|
648
648
|
break;
|
|
649
649
|
}
|
|
650
650
|
B || F();
|
|
651
|
-
},
|
|
651
|
+
}, Ze = (v) => {
|
|
652
652
|
I(v), F();
|
|
653
653
|
}, be = (v) => {
|
|
654
|
-
|
|
655
|
-
onSettled: () =>
|
|
654
|
+
M(v), L(v, {
|
|
655
|
+
onSettled: () => M(null)
|
|
656
656
|
});
|
|
657
657
|
}, Ue = () => {
|
|
658
658
|
if (me.length === 0) {
|
|
@@ -660,7 +660,7 @@ function cs({
|
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
662
|
N(null), g(!0);
|
|
663
|
-
},
|
|
663
|
+
}, Je = async () => {
|
|
664
664
|
const v = x ? [x] : me;
|
|
665
665
|
try {
|
|
666
666
|
for (const B of v)
|
|
@@ -724,7 +724,7 @@ function cs({
|
|
|
724
724
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
725
725
|
/* @__PURE__ */ e(qt, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
726
726
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
727
|
-
/* @__PURE__ */ e(
|
|
727
|
+
/* @__PURE__ */ e(Ve, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "Visuals library" }),
|
|
728
728
|
/* @__PURE__ */ e("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Add to dashboard" })
|
|
729
729
|
] })
|
|
730
730
|
] }),
|
|
@@ -774,16 +774,16 @@ function cs({
|
|
|
774
774
|
/* @__PURE__ */ e("p", { className: "text-[13px] font-medium", children: n ? "No visuals found" : "No visuals yet" }),
|
|
775
775
|
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: n ? "Try a different search." : "Create a saved visual to add it here." })
|
|
776
776
|
] }) : /* @__PURE__ */ e(
|
|
777
|
-
|
|
777
|
+
Zr,
|
|
778
778
|
{
|
|
779
779
|
visuals: _,
|
|
780
780
|
selectedIds: r,
|
|
781
781
|
allFilteredSelected: Ce,
|
|
782
|
-
someFilteredSelected:
|
|
782
|
+
someFilteredSelected: Me,
|
|
783
783
|
onSelectAll: W,
|
|
784
784
|
onToggleSelection: $,
|
|
785
785
|
onAddVisual: re,
|
|
786
|
-
onOpenVisual:
|
|
786
|
+
onOpenVisual: Ze,
|
|
787
787
|
onEditDetails: p,
|
|
788
788
|
onShareVisual: h,
|
|
789
789
|
onDeleteVisual: (v) => {
|
|
@@ -791,7 +791,7 @@ function cs({
|
|
|
791
791
|
},
|
|
792
792
|
onDuplicateVisual: be,
|
|
793
793
|
duplicatingId: S,
|
|
794
|
-
isDeleting:
|
|
794
|
+
isDeleting: X,
|
|
795
795
|
isConsoleMode: C
|
|
796
796
|
}
|
|
797
797
|
) }),
|
|
@@ -872,7 +872,7 @@ function cs({
|
|
|
872
872
|
{
|
|
873
873
|
open: c,
|
|
874
874
|
onOpenChange: l,
|
|
875
|
-
onSubmit:
|
|
875
|
+
onSubmit: V,
|
|
876
876
|
isCreating: te
|
|
877
877
|
}
|
|
878
878
|
),
|
|
@@ -901,7 +901,7 @@ function cs({
|
|
|
901
901
|
{
|
|
902
902
|
open: f,
|
|
903
903
|
onOpenChange: (v) => {
|
|
904
|
-
!v &&
|
|
904
|
+
!v && X || (g(v), v || N(null));
|
|
905
905
|
},
|
|
906
906
|
children: /* @__PURE__ */ s(ct, { children: [
|
|
907
907
|
/* @__PURE__ */ s(ut, { children: [
|
|
@@ -915,17 +915,17 @@ function cs({
|
|
|
915
915
|
/* @__PURE__ */ e(mt, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
|
|
916
916
|
] }),
|
|
917
917
|
/* @__PURE__ */ s(pt, { children: [
|
|
918
|
-
/* @__PURE__ */ e(ft, { disabled:
|
|
918
|
+
/* @__PURE__ */ e(ft, { disabled: X, children: "Cancel" }),
|
|
919
919
|
/* @__PURE__ */ s(
|
|
920
920
|
Rt,
|
|
921
921
|
{
|
|
922
922
|
onClick: (v) => {
|
|
923
|
-
v.preventDefault(),
|
|
923
|
+
v.preventDefault(), Je();
|
|
924
924
|
},
|
|
925
|
-
disabled:
|
|
925
|
+
disabled: X || ke === 0,
|
|
926
926
|
children: [
|
|
927
|
-
|
|
928
|
-
|
|
927
|
+
X ? /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5" }),
|
|
928
|
+
X ? "Deleting..." : "Delete"
|
|
929
929
|
]
|
|
930
930
|
}
|
|
931
931
|
)
|
|
@@ -935,7 +935,7 @@ function cs({
|
|
|
935
935
|
)
|
|
936
936
|
] });
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function Zr({
|
|
939
939
|
visuals: t,
|
|
940
940
|
selectedIds: a,
|
|
941
941
|
allFilteredSelected: o,
|
|
@@ -970,7 +970,7 @@ function Jr({
|
|
|
970
970
|
/* @__PURE__ */ e("span", { className: "text-right", children: "Actions" })
|
|
971
971
|
] }),
|
|
972
972
|
t.map((x) => /* @__PURE__ */ e(
|
|
973
|
-
|
|
973
|
+
Jr,
|
|
974
974
|
{
|
|
975
975
|
visual: x,
|
|
976
976
|
selected: a.has(x.id),
|
|
@@ -989,7 +989,7 @@ function Jr({
|
|
|
989
989
|
))
|
|
990
990
|
] });
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function Jr({
|
|
993
993
|
visual: t,
|
|
994
994
|
selected: a,
|
|
995
995
|
onToggleSelection: o,
|
|
@@ -1004,13 +1004,13 @@ function Zr({
|
|
|
1004
1004
|
isConsoleMode: m
|
|
1005
1005
|
}) {
|
|
1006
1006
|
var g;
|
|
1007
|
-
const p =
|
|
1007
|
+
const p = Xr(t.kind), f = () => {
|
|
1008
1008
|
n(t);
|
|
1009
1009
|
};
|
|
1010
1010
|
return /* @__PURE__ */ s(
|
|
1011
1011
|
"div",
|
|
1012
1012
|
{
|
|
1013
|
-
className:
|
|
1013
|
+
className: Z(
|
|
1014
1014
|
"group grid min-h-12 grid-cols-[2.5rem_minmax(14rem,1.8fr)_minmax(10rem,1fr)_8rem_7rem_5rem_5.5rem] items-center border-b border-border/50 px-3 text-[13px] hover:bg-muted/50",
|
|
1015
1015
|
a && "bg-muted/70"
|
|
1016
1016
|
),
|
|
@@ -1057,8 +1057,8 @@ function Zr({
|
|
|
1057
1057
|
/* @__PURE__ */ e("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-[9px] font-medium text-muted-foreground", children: Gr(t, m) }),
|
|
1058
1058
|
/* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: St(t, m) })
|
|
1059
1059
|
] }),
|
|
1060
|
-
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children:
|
|
1061
|
-
/* @__PURE__ */ e(
|
|
1060
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Jt(t.updatedAt) }),
|
|
1061
|
+
/* @__PURE__ */ e(Yr, { visual: t }),
|
|
1062
1062
|
/* @__PURE__ */ e("span", { className: "text-right tabular-nums text-muted-foreground", children: t.ownership.sharedCount > 0 ? t.ownership.sharedCount : "—" }),
|
|
1063
1063
|
/* @__PURE__ */ e(
|
|
1064
1064
|
en,
|
|
@@ -1106,7 +1106,7 @@ function en({
|
|
|
1106
1106
|
children: /* @__PURE__ */ e(et, { className: "h-3.5 w-3.5" })
|
|
1107
1107
|
}
|
|
1108
1108
|
),
|
|
1109
|
-
/* @__PURE__ */ s(
|
|
1109
|
+
/* @__PURE__ */ s(Le, { modal: !1, children: [
|
|
1110
1110
|
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1111
1111
|
T,
|
|
1112
1112
|
{
|
|
@@ -1118,7 +1118,7 @@ function en({
|
|
|
1118
1118
|
}
|
|
1119
1119
|
) }),
|
|
1120
1120
|
/* @__PURE__ */ s(
|
|
1121
|
-
|
|
1121
|
+
Pe,
|
|
1122
1122
|
{
|
|
1123
1123
|
align: "end",
|
|
1124
1124
|
className: "z-[60] w-44 rounded-[6px] border-border/60 p-1 shadow-sm",
|
|
@@ -1169,7 +1169,7 @@ function en({
|
|
|
1169
1169
|
] }),
|
|
1170
1170
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
1171
1171
|
/* @__PURE__ */ e(Ca, { className: "h-3 w-3" }),
|
|
1172
|
-
/* @__PURE__ */ e("span", { children:
|
|
1172
|
+
/* @__PURE__ */ e("span", { children: Jt(t.updatedAt) })
|
|
1173
1173
|
] })
|
|
1174
1174
|
] })
|
|
1175
1175
|
]
|
|
@@ -1185,7 +1185,7 @@ function us(t, a, o = !1) {
|
|
|
1185
1185
|
(u) => u.isDashboardEditing
|
|
1186
1186
|
), r = w(
|
|
1187
1187
|
(u) => u.onDashboardLifecycleEvent
|
|
1188
|
-
), d =
|
|
1188
|
+
), d = Y(() => {
|
|
1189
1189
|
const u = w.getState().dashboard;
|
|
1190
1190
|
return a || !t || !u || u.id !== t.id ? !1 : _e(u) !== _e(t);
|
|
1191
1191
|
}, [t, a]);
|
|
@@ -1231,7 +1231,7 @@ function tn({
|
|
|
1231
1231
|
const [c, l] = D(
|
|
1232
1232
|
o && n ? `Copy of ${n}` : n || ""
|
|
1233
1233
|
), [u, h] = D("");
|
|
1234
|
-
|
|
1234
|
+
Mt.useEffect(() => {
|
|
1235
1235
|
t && (l(
|
|
1236
1236
|
o && n ? `Copy of ${n}` : n || ""
|
|
1237
1237
|
), h(""));
|
|
@@ -1264,7 +1264,7 @@ function tn({
|
|
|
1264
1264
|
};
|
|
1265
1265
|
return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: a, children: /* @__PURE__ */ s(Te, { className: "sm:max-w-[500px]", children: [
|
|
1266
1266
|
/* @__PURE__ */ s(bt, { children: [
|
|
1267
|
-
/* @__PURE__ */ s(
|
|
1267
|
+
/* @__PURE__ */ s(Ve, { className: "flex items-center gap-2", children: [
|
|
1268
1268
|
/* @__PURE__ */ e("span", { children: "Save Visual As" }),
|
|
1269
1269
|
p.badgeType !== "local" && /* @__PURE__ */ e(
|
|
1270
1270
|
Fr,
|
|
@@ -1334,7 +1334,7 @@ function tt({
|
|
|
1334
1334
|
className: t,
|
|
1335
1335
|
variant: a = "outline"
|
|
1336
1336
|
}) {
|
|
1337
|
-
const o =
|
|
1337
|
+
const o = J((r) => r.onSave), { getUpdatedFrame: n } = ye();
|
|
1338
1338
|
function i() {
|
|
1339
1339
|
const r = n();
|
|
1340
1340
|
kt(r) && (o == null || o(r));
|
|
@@ -1357,7 +1357,7 @@ function an({
|
|
|
1357
1357
|
className: t,
|
|
1358
1358
|
variant: a = "default"
|
|
1359
1359
|
}) {
|
|
1360
|
-
const o = Qe(), [n, i] = D(!1), { setIsVisualEditing: r } = de(), { getUpdatedFrame: d } = ye(), c = Ke(), l =
|
|
1360
|
+
const o = Qe(), [n, i] = D(!1), { setIsVisualEditing: r } = de(), { getUpdatedFrame: d } = ye(), c = Ke(), l = J((m) => m.frame), u = _t();
|
|
1361
1361
|
return /* @__PURE__ */ e(
|
|
1362
1362
|
T,
|
|
1363
1363
|
{
|
|
@@ -1406,7 +1406,7 @@ function an({
|
|
|
1406
1406
|
function rn({
|
|
1407
1407
|
className: t
|
|
1408
1408
|
}) {
|
|
1409
|
-
const a = Qe(), [o, n] = D(!1), i = Ke(), r =
|
|
1409
|
+
const a = Qe(), [o, n] = D(!1), i = Ke(), r = J((g) => g.frame), d = w((g) => g.selectedSheetId), c = w((g) => g.dashboard), { updateFrame: l, setIsVisualEditing: u } = de(), { getUpdatedFrame: h } = ye(), m = _t(), p = xt();
|
|
1410
1410
|
return /* @__PURE__ */ e(
|
|
1411
1411
|
T,
|
|
1412
1412
|
{
|
|
@@ -1431,7 +1431,7 @@ function rn({
|
|
|
1431
1431
|
...x,
|
|
1432
1432
|
visualId: g
|
|
1433
1433
|
// Keep the link to library visual
|
|
1434
|
-
}, S = He(c, N.id),
|
|
1434
|
+
}, S = He(c, N.id), M = await p(N, {
|
|
1435
1435
|
previousFrame: S
|
|
1436
1436
|
});
|
|
1437
1437
|
await m.mutateAsync({
|
|
@@ -1440,7 +1440,7 @@ function rn({
|
|
|
1440
1440
|
frameObject: x
|
|
1441
1441
|
}
|
|
1442
1442
|
}), l(d, N, {
|
|
1443
|
-
semanticExecutionPayload:
|
|
1443
|
+
semanticExecutionPayload: M
|
|
1444
1444
|
}), a.invalidateQueries({ queryKey: ["visuals"] }), a.invalidateQueries({ queryKey: ["visual", g] }), E.success("Saved to library and applied locally"), setTimeout(() => {
|
|
1445
1445
|
u(!1);
|
|
1446
1446
|
}, 300);
|
|
@@ -1467,7 +1467,7 @@ function rn({
|
|
|
1467
1467
|
);
|
|
1468
1468
|
}
|
|
1469
1469
|
function at({ className: t }) {
|
|
1470
|
-
const { setTempQueryData: a, setSqlGen: o } = Ge(), n = Qe(), i =
|
|
1470
|
+
const { setTempQueryData: a, setSqlGen: o } = Ge(), n = Qe(), i = J((c) => c.tempQueryData), r = J((c) => c.onClose);
|
|
1471
1471
|
function d() {
|
|
1472
1472
|
if (i) {
|
|
1473
1473
|
const { queryKey: c, queryData: l } = i;
|
|
@@ -1483,14 +1483,14 @@ function at({ className: t }) {
|
|
|
1483
1483
|
size: "xs",
|
|
1484
1484
|
variant: "outline",
|
|
1485
1485
|
children: [
|
|
1486
|
-
/* @__PURE__ */ e(
|
|
1486
|
+
/* @__PURE__ */ e(Xe, { className: "h-3.5 w-3.5" }),
|
|
1487
1487
|
"Close"
|
|
1488
1488
|
]
|
|
1489
1489
|
}
|
|
1490
1490
|
);
|
|
1491
1491
|
}
|
|
1492
1492
|
function nn() {
|
|
1493
|
-
const [t, a] = D(!1), [o, n] = D(!1), [i, r] = D(null), [d, c] = D(null), l =
|
|
1493
|
+
const [t, a] = D(!1), [o, n] = D(!1), [i, r] = D(null), [d, c] = D(null), l = J((b) => b.frame), u = J((b) => b.card), h = Ke(), m = w((b) => b.selectedSheetId), p = w((b) => b.dashboard), { getUpdatedFrame: f } = ye(), { selectVisual: g } = lt(), { addFrame: x, setIsVisualEditing: N } = de(), S = xt(), M = !!(l != null && l.visualId), U = (() => {
|
|
1494
1494
|
var b, I;
|
|
1495
1495
|
return ((b = l == null ? void 0 : l.cards) == null ? void 0 : b.length) === 1 && ((I = l.cards[0]) != null && I.title) ? l.cards[0].title : h != null && h.title ? h.title : (u == null ? void 0 : u.title) || "Untitled Visual";
|
|
1496
1496
|
})(), F = Sa((b) => {
|
|
@@ -1538,12 +1538,12 @@ function nn() {
|
|
|
1538
1538
|
k = await S(A, {
|
|
1539
1539
|
previousFrame: He(p, A.id)
|
|
1540
1540
|
});
|
|
1541
|
-
} catch (
|
|
1541
|
+
} catch (V) {
|
|
1542
1542
|
console.error(
|
|
1543
1543
|
"Failed to prepare semantic metadata before saving visual:",
|
|
1544
|
-
|
|
1544
|
+
V
|
|
1545
1545
|
), E.error(
|
|
1546
|
-
|
|
1546
|
+
V instanceof Error ? V.message : "Failed to prepare semantic metadata for the saved visual"
|
|
1547
1547
|
);
|
|
1548
1548
|
return;
|
|
1549
1549
|
}
|
|
@@ -1578,13 +1578,13 @@ function nn() {
|
|
|
1578
1578
|
}
|
|
1579
1579
|
}
|
|
1580
1580
|
},
|
|
1581
|
-
isLibraryVisual:
|
|
1581
|
+
isLibraryVisual: M,
|
|
1582
1582
|
currentVisualName: U,
|
|
1583
1583
|
isSaving: F.isPending
|
|
1584
1584
|
};
|
|
1585
1585
|
}
|
|
1586
1586
|
function hs(t = {}) {
|
|
1587
|
-
const { isInspectionMode: a } = ka(), o =
|
|
1587
|
+
const { isInspectionMode: a } = ka(), o = J((V) => V.frame), n = J((V) => V.editorContext), i = Da((V) => V.selectedVisual), r = w((V) => V.selectedFrameId), d = w((V) => V.selectedSheetId), c = w((V) => V.dashboard), { setIsVisualEditing: l, updateFrame: u } = de(), [h, m] = D(!1), [p, f] = D("both"), g = xt(), x = (n == null ? void 0 : n.type) === "documentSection", N = !!(o != null && o.visualId || i != null && i.id), S = !!(o != null && o.visualId && r), M = N && !S, {
|
|
1588
1588
|
saveAsDialogOpen: U,
|
|
1589
1589
|
setSaveAsDialogOpen: F,
|
|
1590
1590
|
handleSaveAs: O,
|
|
@@ -1620,30 +1620,30 @@ function hs(t = {}) {
|
|
|
1620
1620
|
visualId: void 0
|
|
1621
1621
|
}, G = He(c, z.id);
|
|
1622
1622
|
try {
|
|
1623
|
-
const
|
|
1623
|
+
const L = await g(z, {
|
|
1624
1624
|
previousFrame: G
|
|
1625
1625
|
});
|
|
1626
1626
|
u(d, z, {
|
|
1627
|
-
semanticExecutionPayload:
|
|
1627
|
+
semanticExecutionPayload: L
|
|
1628
1628
|
});
|
|
1629
|
-
} catch (
|
|
1630
|
-
console.error("Failed to apply local semantic metadata:",
|
|
1631
|
-
|
|
1629
|
+
} catch (L) {
|
|
1630
|
+
console.error("Failed to apply local semantic metadata:", L), m(!1), E.error(
|
|
1631
|
+
L instanceof Error ? L.message : "Failed to prepare semantic metadata for this visual"
|
|
1632
1632
|
);
|
|
1633
1633
|
return;
|
|
1634
1634
|
}
|
|
1635
1635
|
setTimeout(() => {
|
|
1636
1636
|
m(!1), E.success("Changes applied. Visual is now local to this dashboard"), l(!1);
|
|
1637
1637
|
}, 300);
|
|
1638
|
-
}, j = (
|
|
1639
|
-
f(
|
|
1638
|
+
}, j = (V) => {
|
|
1639
|
+
f(V), F(!0);
|
|
1640
1640
|
};
|
|
1641
1641
|
return /* @__PURE__ */ s(R, { children: [
|
|
1642
1642
|
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
1643
1643
|
!N && /* @__PURE__ */ e(tt, { className: "!rounded-none", variant: "default" }),
|
|
1644
|
-
N &&
|
|
1644
|
+
N && M && /* @__PURE__ */ e(an, { className: "!rounded-none", variant: "default" }),
|
|
1645
1645
|
N && S && /* @__PURE__ */ e(rn, { className: "!rounded-none" }),
|
|
1646
|
-
/* @__PURE__ */ s(
|
|
1646
|
+
/* @__PURE__ */ s(Le, { modal: !1, children: [
|
|
1647
1647
|
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1648
1648
|
T,
|
|
1649
1649
|
{
|
|
@@ -1656,7 +1656,7 @@ function hs(t = {}) {
|
|
|
1656
1656
|
}
|
|
1657
1657
|
) }),
|
|
1658
1658
|
/* @__PURE__ */ s(
|
|
1659
|
-
|
|
1659
|
+
Pe,
|
|
1660
1660
|
{
|
|
1661
1661
|
align: "end",
|
|
1662
1662
|
className: "min-w-[220px] rounded-control border border-border/60 p-1 shadow-sm",
|
|
@@ -1718,8 +1718,8 @@ function hs(t = {}) {
|
|
|
1718
1718
|
tn,
|
|
1719
1719
|
{
|
|
1720
1720
|
open: U,
|
|
1721
|
-
onOpenChange: (
|
|
1722
|
-
C || F(
|
|
1721
|
+
onOpenChange: (V) => {
|
|
1722
|
+
C || F(V);
|
|
1723
1723
|
},
|
|
1724
1724
|
isLibraryVisual: b,
|
|
1725
1725
|
currentVisualName: I,
|
|
@@ -1731,7 +1731,7 @@ function hs(t = {}) {
|
|
|
1731
1731
|
] });
|
|
1732
1732
|
}
|
|
1733
1733
|
function ms({ className: t }) {
|
|
1734
|
-
const a =
|
|
1734
|
+
const a = J((h) => h.isDevMode), o = J((h) => h.card.type), n = w((h) => h.isVisualEditing), { setIsDevMode: i } = Ge(), { config: r } = Ut(Aa).tokenProps, d = (r == null ? void 0 : r.showAdvancedMode) !== !1;
|
|
1735
1735
|
if (!n || !d || !yr(o))
|
|
1736
1736
|
return null;
|
|
1737
1737
|
const c = a ? _r : zr, l = a ? "Visual editor" : "SQL editor", u = a ? "Switch to visual editor" : "Switch to SQL editor";
|
|
@@ -1742,7 +1742,7 @@ function ms({ className: t }) {
|
|
|
1742
1742
|
"aria-label": u,
|
|
1743
1743
|
title: u,
|
|
1744
1744
|
onClick: () => i(!a),
|
|
1745
|
-
className:
|
|
1745
|
+
className: Z(
|
|
1746
1746
|
"inline-flex h-7 items-center gap-1.5 rounded-control border border-input bg-background px-2 text-[12px] font-medium text-foreground transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:outline-none",
|
|
1747
1747
|
t
|
|
1748
1748
|
),
|
|
@@ -1754,7 +1754,7 @@ function ms({ className: t }) {
|
|
|
1754
1754
|
);
|
|
1755
1755
|
}
|
|
1756
1756
|
function ps() {
|
|
1757
|
-
const t =
|
|
1757
|
+
const t = Lr() === "sm", a = w((l) => l.isDashboardEditing), o = w((l) => l.isVisualEditing), n = w((l) => {
|
|
1758
1758
|
var h;
|
|
1759
1759
|
const u = ((h = l.dashboard) == null ? void 0 : h.sheets) ?? [];
|
|
1760
1760
|
return u.find((m) => m.id === l.selectedSheetId) ?? u[0];
|
|
@@ -1796,7 +1796,7 @@ function ps() {
|
|
|
1796
1796
|
]
|
|
1797
1797
|
}
|
|
1798
1798
|
),
|
|
1799
|
-
/* @__PURE__ */ s(
|
|
1799
|
+
/* @__PURE__ */ s(Le, { modal: !1, children: [
|
|
1800
1800
|
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1801
1801
|
T,
|
|
1802
1802
|
{
|
|
@@ -1808,7 +1808,7 @@ function ps() {
|
|
|
1808
1808
|
children: /* @__PURE__ */ e(wt, { className: "h-3.5 w-3.5" })
|
|
1809
1809
|
}
|
|
1810
1810
|
) }),
|
|
1811
|
-
/* @__PURE__ */ e(
|
|
1811
|
+
/* @__PURE__ */ e(Pe, { align: "end", className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm", children: /* @__PURE__ */ s(K, { onClick: () => c(!0), children: [
|
|
1812
1812
|
/* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }),
|
|
1813
1813
|
"Keep my order"
|
|
1814
1814
|
] }) })
|
|
@@ -1820,12 +1820,12 @@ function fs() {
|
|
|
1820
1820
|
var c, l;
|
|
1821
1821
|
const r = ((c = i.dashboard) == null ? void 0 : c.sheets) ?? [], d = r.find((u) => u.id === i.selectedSheetId) ?? r[0];
|
|
1822
1822
|
return !!d && !Nt(d) && !!((l = d.frames) != null && l.length);
|
|
1823
|
-
}), o = w((i) => i.actions.setScreenSizesOpen), n =
|
|
1823
|
+
}), o = w((i) => i.actions.setScreenSizesOpen), n = Xt(
|
|
1824
1824
|
"screen-sizes",
|
|
1825
1825
|
"lg",
|
|
1826
1826
|
a ? {
|
|
1827
1827
|
label: "Screen sizes",
|
|
1828
|
-
icon: /* @__PURE__ */ e(
|
|
1828
|
+
icon: /* @__PURE__ */ e(Lt, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
1829
1829
|
checked: t,
|
|
1830
1830
|
order: 40,
|
|
1831
1831
|
onSelect: () => o(!t)
|
|
@@ -1842,7 +1842,7 @@ function fs() {
|
|
|
1842
1842
|
title: "Screen sizes",
|
|
1843
1843
|
onClick: () => o(!t),
|
|
1844
1844
|
className: "w-7 px-0",
|
|
1845
|
-
children: /* @__PURE__ */ e(
|
|
1845
|
+
children: /* @__PURE__ */ e(Lt, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
|
|
1846
1846
|
}
|
|
1847
1847
|
);
|
|
1848
1848
|
}
|
|
@@ -1877,7 +1877,7 @@ function bs({
|
|
|
1877
1877
|
}) {
|
|
1878
1878
|
const [n, i] = D(
|
|
1879
1879
|
() => /* @__PURE__ */ new Map()
|
|
1880
|
-
), [r, d] = D(null), [c, l] = D(null), u =
|
|
1880
|
+
), [r, d] = D(null), [c, l] = D(null), u = Y((m) => (i((p) => new Map(p).set(m.id, m)), () => i((p) => {
|
|
1881
1881
|
if (p.get(m.id) !== m) return p;
|
|
1882
1882
|
const f = new Map(p);
|
|
1883
1883
|
return f.delete(m.id), f;
|
|
@@ -1894,15 +1894,15 @@ function bs({
|
|
|
1894
1894
|
}),
|
|
1895
1895
|
[c, a, n, r, u, t]
|
|
1896
1896
|
);
|
|
1897
|
-
return /* @__PURE__ */ e(
|
|
1897
|
+
return /* @__PURE__ */ e(Yt.Provider, { value: h, children: o });
|
|
1898
1898
|
}
|
|
1899
1899
|
function vs() {
|
|
1900
|
-
const { setAnchorSlot: t } = Ut(
|
|
1900
|
+
const { setAnchorSlot: t } = Ut(Yt);
|
|
1901
1901
|
return /* @__PURE__ */ e("span", { ref: t, "aria-hidden": !0, className: "relative -mr-1.5 block h-7 w-0" });
|
|
1902
1902
|
}
|
|
1903
1903
|
function xs(t) {
|
|
1904
1904
|
var l;
|
|
1905
|
-
const { authToken: a, tokenProps: o } = it(), { data: n } = Ta(), { mutate: i, isPending: r } =
|
|
1905
|
+
const { authToken: a, tokenProps: o } = it(), { data: n } = Ta(), { mutate: i, isPending: r } = Va(), d = !!t && ((l = n == null ? void 0 : n.preference) == null ? void 0 : l.defaultDashboardId) === t, c = !n || r;
|
|
1906
1906
|
return {
|
|
1907
1907
|
available: !!t && !!(a != null && a.accessToken) && !!(o != null && o.apiServiceUrl),
|
|
1908
1908
|
isDefault: d,
|
|
@@ -1995,7 +1995,7 @@ function sn(t) {
|
|
|
1995
1995
|
};
|
|
1996
1996
|
}
|
|
1997
1997
|
function on({ row: t, now: a, api: o }) {
|
|
1998
|
-
const [n, i] = D("idle"), r = sn(t), d =
|
|
1998
|
+
const [n, i] = D("idle"), r = sn(t), d = La(t, o), c = async () => {
|
|
1999
1999
|
if (!d) return;
|
|
2000
2000
|
i("working");
|
|
2001
2001
|
const g = await za(o, t, d);
|
|
@@ -2014,7 +2014,7 @@ function on({ row: t, now: a, api: o }) {
|
|
|
2014
2014
|
type: "button",
|
|
2015
2015
|
onClick: () => void c(),
|
|
2016
2016
|
className: "shrink-0 text-[12px] font-medium text-foreground/80 underline-offset-2 hover:text-foreground hover:underline focus-visible:underline focus-visible:outline-none",
|
|
2017
|
-
children:
|
|
2017
|
+
children: Pa[d]
|
|
2018
2018
|
}
|
|
2019
2019
|
)
|
|
2020
2020
|
] }),
|
|
@@ -2030,14 +2030,14 @@ function on({ row: t, now: a, api: o }) {
|
|
|
2030
2030
|
f,
|
|
2031
2031
|
" ",
|
|
2032
2032
|
/* @__PURE__ */ e("span", { children: ue.started(Tt(h, a)) }),
|
|
2033
|
-
r.running.percent !== void 0 && /* @__PURE__ */ e(
|
|
2033
|
+
r.running.percent !== void 0 && /* @__PURE__ */ e(Ma, { value: r.running.percent, className: "mt-1.5 h-1" }),
|
|
2034
2034
|
p && /* @__PURE__ */ e("div", { className: "mt-1", children: ue.longRunning })
|
|
2035
2035
|
] }),
|
|
2036
2036
|
r.status !== "running" && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 text-[12px] leading-4 text-muted-foreground", children: [
|
|
2037
2037
|
r.status === "ready" && r.finishedDetail.length > 0 ? (
|
|
2038
2038
|
// Disclosed on hover or focus only; the time is what a reader scans.
|
|
2039
2039
|
/* @__PURE__ */ s("span", { className: "hidden group-hover:contents group-focus-within:contents", children: [
|
|
2040
|
-
r.finishedDetail.map((g, x) => /* @__PURE__ */ s(
|
|
2040
|
+
r.finishedDetail.map((g, x) => /* @__PURE__ */ s(Mt.Fragment, { children: [
|
|
2041
2041
|
x > 0 && f,
|
|
2042
2042
|
/* @__PURE__ */ e("span", { children: g })
|
|
2043
2043
|
] }, x)),
|
|
@@ -2056,9 +2056,9 @@ function on({ row: t, now: a, api: o }) {
|
|
|
2056
2056
|
] });
|
|
2057
2057
|
}
|
|
2058
2058
|
function ws({ variant: t }) {
|
|
2059
|
-
const { snapshot: a, markSeen: o } = yt(), n = a.runningCount > 0 ? a.runningCount > 9 ? "9+" : String(a.runningCount) : a.hasUnseenFinished ? "" : null, i =
|
|
2059
|
+
const { snapshot: a, markSeen: o } = yt(), n = a.runningCount > 0 ? a.runningCount > 9 ? "9+" : String(a.runningCount) : a.hasUnseenFinished ? "" : null, i = Xt("activity", "md", {
|
|
2060
2060
|
label: le.title,
|
|
2061
|
-
icon: /* @__PURE__ */ e(
|
|
2061
|
+
icon: /* @__PURE__ */ e(Vt, { className: "h-3.5 w-3.5" }),
|
|
2062
2062
|
hint: n || (n === "" ? "New" : void 0),
|
|
2063
2063
|
order: 30,
|
|
2064
2064
|
onOpen: o
|
|
@@ -2082,7 +2082,7 @@ function ws({ variant: t }) {
|
|
|
2082
2082
|
align: "end",
|
|
2083
2083
|
sideOffset: 8,
|
|
2084
2084
|
onFocusOutside: (r) => r.preventDefault(),
|
|
2085
|
-
children: /* @__PURE__ */ e(
|
|
2085
|
+
children: /* @__PURE__ */ e(Pt, {})
|
|
2086
2086
|
}
|
|
2087
2087
|
)
|
|
2088
2088
|
]
|
|
@@ -2099,7 +2099,7 @@ function ws({ variant: t }) {
|
|
|
2099
2099
|
"aria-label": le.title,
|
|
2100
2100
|
title: le.title,
|
|
2101
2101
|
children: [
|
|
2102
|
-
/* @__PURE__ */ e(
|
|
2102
|
+
/* @__PURE__ */ e(Vt, { className: "h-3.5 w-3.5" }),
|
|
2103
2103
|
n !== null && /* @__PURE__ */ e(
|
|
2104
2104
|
"span",
|
|
2105
2105
|
{
|
|
@@ -2110,10 +2110,10 @@ function ws({ variant: t }) {
|
|
|
2110
2110
|
]
|
|
2111
2111
|
}
|
|
2112
2112
|
) }),
|
|
2113
|
-
/* @__PURE__ */ e(Fe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ e(
|
|
2113
|
+
/* @__PURE__ */ e(Fe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ e(Pt, {}) })
|
|
2114
2114
|
] });
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2116
|
+
function Pt() {
|
|
2117
2117
|
const t = yt(), a = _a(), { rows: o, activeTruncated: n } = t.snapshot, i = o.some((r) => ja(r.item.status));
|
|
2118
2118
|
return o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-1.5 px-6 py-8 text-center", children: [
|
|
2119
2119
|
/* @__PURE__ */ e("span", { className: "flex h-8 w-8 items-center justify-center rounded-[6px] border border-border text-muted-foreground", children: /* @__PURE__ */ e($a, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }) }),
|
|
@@ -2219,13 +2219,13 @@ function dn({
|
|
|
2219
2219
|
), S = Cr({
|
|
2220
2220
|
...p || {},
|
|
2221
2221
|
controls: []
|
|
2222
|
-
}),
|
|
2222
|
+
}), M = Ha(p), U = (C, A, k) => {
|
|
2223
2223
|
f(
|
|
2224
2224
|
C,
|
|
2225
2225
|
A,
|
|
2226
2226
|
ln(k)
|
|
2227
2227
|
);
|
|
2228
|
-
}, F =
|
|
2228
|
+
}, F = Y(() => {
|
|
2229
2229
|
if (r) {
|
|
2230
2230
|
d();
|
|
2231
2231
|
return;
|
|
@@ -2242,7 +2242,7 @@ function dn({
|
|
|
2242
2242
|
availableFieldChoices: x,
|
|
2243
2243
|
availableMetricChoices: N,
|
|
2244
2244
|
structuralParticipants: g,
|
|
2245
|
-
structuralParticipantIdsByControlId:
|
|
2245
|
+
structuralParticipantIdsByControlId: M,
|
|
2246
2246
|
initialCreateFlow: i === "create",
|
|
2247
2247
|
onCreateFlowActiveChange: m,
|
|
2248
2248
|
onCreateFlowComplete: F,
|
|
@@ -2283,7 +2283,7 @@ function dn({
|
|
|
2283
2283
|
{
|
|
2284
2284
|
className: l ? "space-y-0" : void 0,
|
|
2285
2285
|
children: [
|
|
2286
|
-
/* @__PURE__ */ e(
|
|
2286
|
+
/* @__PURE__ */ e(Ve, { className: "text-[15px]", children: b }),
|
|
2287
2287
|
/* @__PURE__ */ e(
|
|
2288
2288
|
vt,
|
|
2289
2289
|
{
|
|
@@ -2338,19 +2338,19 @@ function un({
|
|
|
2338
2338
|
), S = ee(
|
|
2339
2339
|
() => N.map((C) => C.control),
|
|
2340
2340
|
[N]
|
|
2341
|
-
),
|
|
2341
|
+
), M = ee(
|
|
2342
2342
|
() => mn(S),
|
|
2343
2343
|
[S]
|
|
2344
2344
|
), U = ee(
|
|
2345
2345
|
() => hn(h),
|
|
2346
2346
|
[h]
|
|
2347
|
-
), F =
|
|
2347
|
+
), F = Y(() => {
|
|
2348
2348
|
if (n) {
|
|
2349
2349
|
i();
|
|
2350
2350
|
return;
|
|
2351
2351
|
}
|
|
2352
2352
|
u(!1);
|
|
2353
|
-
}, [n, i, u]), O =
|
|
2353
|
+
}, [n, i, u]), O = Y(
|
|
2354
2354
|
(C, A, k) => {
|
|
2355
2355
|
!g || !(f != null && f.document) || p(
|
|
2356
2356
|
fn({
|
|
@@ -2379,7 +2379,7 @@ function un({
|
|
|
2379
2379
|
onPointerDownOutside: c,
|
|
2380
2380
|
children: [
|
|
2381
2381
|
/* @__PURE__ */ s(bt, { className: d ? "space-y-0" : void 0, children: [
|
|
2382
|
-
/* @__PURE__ */ e(
|
|
2382
|
+
/* @__PURE__ */ e(Ve, { className: "text-[15px]", children: d ? "Add document control" : "Document Controls" }),
|
|
2383
2383
|
/* @__PURE__ */ e(
|
|
2384
2384
|
vt,
|
|
2385
2385
|
{
|
|
@@ -2394,7 +2394,7 @@ function un({
|
|
|
2394
2394
|
scope: "dashboard",
|
|
2395
2395
|
controls: S,
|
|
2396
2396
|
reservedControlIds: U,
|
|
2397
|
-
defaultValues:
|
|
2397
|
+
defaultValues: M,
|
|
2398
2398
|
usageByControlId: {},
|
|
2399
2399
|
availableFieldChoices: [],
|
|
2400
2400
|
availableMetricChoices: [],
|
|
@@ -2466,7 +2466,7 @@ function fn({
|
|
|
2466
2466
|
}
|
|
2467
2467
|
for (const p of d.values())
|
|
2468
2468
|
l.has(p.id) || u.push(
|
|
2469
|
-
|
|
2469
|
+
Pr({
|
|
2470
2470
|
control: p,
|
|
2471
2471
|
existingInputs: [...t, ...u],
|
|
2472
2472
|
sheetId: a
|
|
@@ -2495,7 +2495,7 @@ function gn({
|
|
|
2495
2495
|
return /* @__PURE__ */ s(
|
|
2496
2496
|
"div",
|
|
2497
2497
|
{
|
|
2498
|
-
className:
|
|
2498
|
+
className: Z(
|
|
2499
2499
|
// Height lives on the shell so the outer border is part of the
|
|
2500
2500
|
// h-7 box (matches regular `size="xs"` buttons). Inner triggers
|
|
2501
2501
|
// stretch to fill via `h-full`.
|
|
@@ -2510,7 +2510,7 @@ function gn({
|
|
|
2510
2510
|
{
|
|
2511
2511
|
variant: "ghost",
|
|
2512
2512
|
size: "xs",
|
|
2513
|
-
className:
|
|
2513
|
+
className: Z(
|
|
2514
2514
|
"h-full rounded-none border-0 bg-transparent pl-2.5 pr-2 shadow-none hover:bg-accent/50 data-[state=open]:bg-accent/60",
|
|
2515
2515
|
d
|
|
2516
2516
|
),
|
|
@@ -2525,7 +2525,7 @@ function gn({
|
|
|
2525
2525
|
{
|
|
2526
2526
|
align: "end",
|
|
2527
2527
|
sideOffset: 6,
|
|
2528
|
-
className:
|
|
2528
|
+
className: Z(
|
|
2529
2529
|
"w-auto rounded-card border border-border/60 p-0 shadow-[0_10px_28px_rgba(0,0,0,0.14)] dark:shadow-[0_10px_28px_rgba(0,0,0,0.5)]",
|
|
2530
2530
|
l
|
|
2531
2531
|
),
|
|
@@ -2540,7 +2540,7 @@ function gn({
|
|
|
2540
2540
|
{
|
|
2541
2541
|
variant: "ghost",
|
|
2542
2542
|
size: "xs",
|
|
2543
|
-
className:
|
|
2543
|
+
className: Z(
|
|
2544
2544
|
"h-full w-7 rounded-none border-0 border-l border-border/60 bg-transparent px-0 shadow-none hover:bg-accent/50 data-[state=open]:bg-accent/60",
|
|
2545
2545
|
c
|
|
2546
2546
|
),
|
|
@@ -2553,7 +2553,7 @@ function gn({
|
|
|
2553
2553
|
{
|
|
2554
2554
|
align: "end",
|
|
2555
2555
|
sideOffset: 6,
|
|
2556
|
-
className:
|
|
2556
|
+
className: Z(
|
|
2557
2557
|
"w-auto rounded-card border border-border/60 p-0 shadow-[0_10px_28px_rgba(0,0,0,0.14)] dark:shadow-[0_10px_28px_rgba(0,0,0,0.5)]",
|
|
2558
2558
|
u
|
|
2559
2559
|
),
|
|
@@ -2567,8 +2567,8 @@ function gn({
|
|
|
2567
2567
|
);
|
|
2568
2568
|
}
|
|
2569
2569
|
function bn() {
|
|
2570
|
-
|
|
2571
|
-
const t = w((l) => l.selectedSheetId), a = w((l) => l.selectedFrameId), o = w((l) => l.dashboard), n = w((l) => l.actions.getSelectedFrame), { setSelectedFrameId: i } = de(), { setCard: r } = Ge(), d =
|
|
2570
|
+
Vr();
|
|
2571
|
+
const t = w((l) => l.selectedSheetId), a = w((l) => l.selectedFrameId), o = w((l) => l.dashboard), n = w((l) => l.actions.getSelectedFrame), { setSelectedFrameId: i } = de(), { setCard: r } = Ge(), d = J((l) => l.card.dataSource);
|
|
2572
2572
|
return ve(() => {
|
|
2573
2573
|
var u, h;
|
|
2574
2574
|
let l = n();
|
|
@@ -2618,7 +2618,7 @@ function vn() {
|
|
|
2618
2618
|
/* @__PURE__ */ e("h3", { className: "mb-1 text-[13px] font-medium text-foreground", children: "No fields configured" }),
|
|
2619
2619
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Configure a data source for this card to enable filtering." })
|
|
2620
2620
|
] }),
|
|
2621
|
-
n && /* @__PURE__ */ e("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ e(
|
|
2621
|
+
n && /* @__PURE__ */ e("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ e(Xa, { context: "filter" }) })
|
|
2622
2622
|
] });
|
|
2623
2623
|
}
|
|
2624
2624
|
function xn({
|
|
@@ -2725,11 +2725,11 @@ function Ns({
|
|
|
2725
2725
|
var O;
|
|
2726
2726
|
const [d, c] = D(null), l = w((b) => b.dashboard), u = w((b) => b.selectedSheetId), h = w((b) => b.showFilters), m = w((b) => b.actions), { setDocumentPanelTarget: p, setShowFilters: f } = m, g = (O = l.sheets) == null ? void 0 : O.find(
|
|
2727
2727
|
(b) => b.id === u
|
|
2728
|
-
), x = Nt(g), N =
|
|
2728
|
+
), x = Nt(g), N = Y((b) => {
|
|
2729
2729
|
window.setTimeout(() => {
|
|
2730
2730
|
c(b);
|
|
2731
2731
|
}, 0);
|
|
2732
|
-
}, []), S =
|
|
2732
|
+
}, []), S = Y(
|
|
2733
2733
|
(b) => {
|
|
2734
2734
|
if (x && u) {
|
|
2735
2735
|
b && p(u, {
|
|
@@ -2746,11 +2746,11 @@ function Ns({
|
|
|
2746
2746
|
p,
|
|
2747
2747
|
f
|
|
2748
2748
|
]
|
|
2749
|
-
),
|
|
2749
|
+
), M = Y(() => {
|
|
2750
2750
|
S(!0);
|
|
2751
|
-
}, [S]), U =
|
|
2751
|
+
}, [S]), U = Y(() => {
|
|
2752
2752
|
N("create");
|
|
2753
|
-
}, [N]), F =
|
|
2753
|
+
}, [N]), F = Y(() => {
|
|
2754
2754
|
N("manage");
|
|
2755
2755
|
}, [N]);
|
|
2756
2756
|
return /* @__PURE__ */ s(R, { children: [
|
|
@@ -2763,7 +2763,7 @@ function Ns({
|
|
|
2763
2763
|
settingsContent: (b) => /* @__PURE__ */ e(
|
|
2764
2764
|
xn,
|
|
2765
2765
|
{
|
|
2766
|
-
onAddFilter:
|
|
2766
|
+
onAddFilter: M,
|
|
2767
2767
|
onAddControl: U,
|
|
2768
2768
|
onManageControls: F,
|
|
2769
2769
|
onDismiss: b
|
|
@@ -2813,7 +2813,7 @@ function Cn({
|
|
|
2813
2813
|
size: "xs",
|
|
2814
2814
|
variant: "outline",
|
|
2815
2815
|
disabled: t,
|
|
2816
|
-
className:
|
|
2816
|
+
className: Z("gap-1.5", o),
|
|
2817
2817
|
onClick: n,
|
|
2818
2818
|
"aria-label": "Reports & briefings",
|
|
2819
2819
|
children: [
|
|
@@ -2843,7 +2843,7 @@ function Sn(t) {
|
|
|
2843
2843
|
return d < 5 ? `${d}w ago` : `${Math.round(r / 30)}mo ago`;
|
|
2844
2844
|
}
|
|
2845
2845
|
function kn(t) {
|
|
2846
|
-
return t.scheduleExpr ?
|
|
2846
|
+
return t.scheduleExpr ? Mr(
|
|
2847
2847
|
t.scheduleExpr,
|
|
2848
2848
|
t.timezone || "UTC"
|
|
2849
2849
|
) ?? "Invalid schedule" : "On demand";
|
|
@@ -2880,7 +2880,7 @@ function Fn({
|
|
|
2880
2880
|
role: "tab",
|
|
2881
2881
|
"aria-selected": n,
|
|
2882
2882
|
onClick: () => a(o),
|
|
2883
|
-
className:
|
|
2883
|
+
className: Z(
|
|
2884
2884
|
"h-6 rounded-[3px] px-2 text-[11px] transition-colors",
|
|
2885
2885
|
n ? "bg-background font-medium text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
2886
2886
|
),
|
|
@@ -2911,10 +2911,10 @@ function En({
|
|
|
2911
2911
|
selectingId: x,
|
|
2912
2912
|
busyId: N,
|
|
2913
2913
|
manageBriefingsHref: S,
|
|
2914
|
-
contentKind:
|
|
2914
|
+
contentKind: M,
|
|
2915
2915
|
hideHeader: U = !1
|
|
2916
2916
|
}) {
|
|
2917
|
-
const F = t.length, O = t.filter((k) => k.status === "ACTIVE").length, b =
|
|
2917
|
+
const F = t.length, O = t.filter((k) => k.status === "ACTIVE").length, b = M === "reports" ? F === 1 ? "report" : "reports" : M === "briefings" ? F === 1 ? "briefing" : "briefings" : F === 1 ? "item" : "items", I = t.find((k) => k.hasActiveRun) ?? null, C = M ?? "reports & briefings", A = o === "dashboard" ? a : `Project ${C}`;
|
|
2918
2918
|
return /* @__PURE__ */ s(
|
|
2919
2919
|
"section",
|
|
2920
2920
|
{
|
|
@@ -2933,7 +2933,7 @@ function En({
|
|
|
2933
2933
|
onClick: d,
|
|
2934
2934
|
className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
2935
2935
|
"aria-label": `Close ${C.replace("&", "and")} panel`,
|
|
2936
|
-
children: /* @__PURE__ */ e(
|
|
2936
|
+
children: /* @__PURE__ */ e(Xe, { className: "h-3.5 w-3.5" })
|
|
2937
2937
|
}
|
|
2938
2938
|
)
|
|
2939
2939
|
] }),
|
|
@@ -2975,12 +2975,12 @@ function En({
|
|
|
2975
2975
|
// case without crowding the toolbar.
|
|
2976
2976
|
/* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" })
|
|
2977
2977
|
) : null,
|
|
2978
|
-
F > 0 && u ? m && h ? /* @__PURE__ */ s(
|
|
2978
|
+
F > 0 && u ? m && h ? /* @__PURE__ */ s(Le, { children: [
|
|
2979
2979
|
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ s("button", { className: je, children: [
|
|
2980
2980
|
/* @__PURE__ */ e(xe, { className: "h-3 w-3" }),
|
|
2981
2981
|
" New"
|
|
2982
2982
|
] }) }),
|
|
2983
|
-
/* @__PURE__ */ s(
|
|
2983
|
+
/* @__PURE__ */ s(Pe, { align: "end", children: [
|
|
2984
2984
|
/* @__PURE__ */ e(K, { onClick: () => l("scheduled_report"), children: "Schedule a report" }),
|
|
2985
2985
|
/* @__PURE__ */ e(
|
|
2986
2986
|
K,
|
|
@@ -3028,11 +3028,11 @@ function En({
|
|
|
3028
3028
|
canCreate: u,
|
|
3029
3029
|
canCreateScheduledReport: h,
|
|
3030
3030
|
analyticalBriefingsEnabled: m,
|
|
3031
|
-
contentKind:
|
|
3031
|
+
contentKind: M
|
|
3032
3032
|
}
|
|
3033
3033
|
) : null,
|
|
3034
3034
|
t.map((k) => /* @__PURE__ */ e(
|
|
3035
|
-
|
|
3035
|
+
Vn,
|
|
3036
3036
|
{
|
|
3037
3037
|
briefing: k,
|
|
3038
3038
|
isOpening: x === k.id,
|
|
@@ -3049,7 +3049,7 @@ function En({
|
|
|
3049
3049
|
"a",
|
|
3050
3050
|
{
|
|
3051
3051
|
href: S,
|
|
3052
|
-
className:
|
|
3052
|
+
className: Z(ta, "h-6 px-1 text-[11px]"),
|
|
3053
3053
|
children: [
|
|
3054
3054
|
"Manage all reports & briefings",
|
|
3055
3055
|
/* @__PURE__ */ e(Or, { className: "h-3 w-3" })
|
|
@@ -3278,7 +3278,7 @@ function Tn({ className: t }) {
|
|
|
3278
3278
|
}
|
|
3279
3279
|
);
|
|
3280
3280
|
}
|
|
3281
|
-
function
|
|
3281
|
+
function Vn({
|
|
3282
3282
|
briefing: t,
|
|
3283
3283
|
isOpening: a,
|
|
3284
3284
|
isBusy: o,
|
|
@@ -3291,7 +3291,7 @@ function Ln({
|
|
|
3291
3291
|
return /* @__PURE__ */ s(
|
|
3292
3292
|
"div",
|
|
3293
3293
|
{
|
|
3294
|
-
className:
|
|
3294
|
+
className: Z(
|
|
3295
3295
|
"group relative border-b border-border/60 px-4 py-3 transition-colors hover:bg-muted/60",
|
|
3296
3296
|
c && "opacity-70"
|
|
3297
3297
|
),
|
|
@@ -3316,7 +3316,7 @@ function Ln({
|
|
|
3316
3316
|
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
3317
3317
|
/* @__PURE__ */ e("span", { children: An(t) }),
|
|
3318
3318
|
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
3319
|
-
/* @__PURE__ */ e(
|
|
3319
|
+
/* @__PURE__ */ e(Ya, { className: "h-3 w-3" }),
|
|
3320
3320
|
/* @__PURE__ */ e("span", { className: "truncate", children: kn(t) }),
|
|
3321
3321
|
t.lastRunAt ? /* @__PURE__ */ s(R, { children: [
|
|
3322
3322
|
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
@@ -3330,7 +3330,7 @@ function Ln({
|
|
|
3330
3330
|
l ? /* @__PURE__ */ e(ae, { className: "h-3 w-3 shrink-0 animate-spin text-muted-foreground/70" }) : /* @__PURE__ */ e(
|
|
3331
3331
|
"span",
|
|
3332
3332
|
{
|
|
3333
|
-
className:
|
|
3333
|
+
className: Z(
|
|
3334
3334
|
"inline-block h-1.5 w-1.5 shrink-0 rounded-full",
|
|
3335
3335
|
f
|
|
3336
3336
|
)
|
|
@@ -3341,7 +3341,7 @@ function Ln({
|
|
|
3341
3341
|
]
|
|
3342
3342
|
}
|
|
3343
3343
|
),
|
|
3344
|
-
/* @__PURE__ */ e("div", { className: "absolute right-3 top-3", children: o ? /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground/70" }) : a ? /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground/70" }) : /* @__PURE__ */ s(
|
|
3344
|
+
/* @__PURE__ */ e("div", { className: "absolute right-3 top-3", children: o ? /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground/70" }) : a ? /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground/70" }) : /* @__PURE__ */ s(Le, { children: [
|
|
3345
3345
|
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
|
|
3346
3346
|
"button",
|
|
3347
3347
|
{
|
|
@@ -3352,7 +3352,7 @@ function Ln({
|
|
|
3352
3352
|
children: /* @__PURE__ */ e(zt, { className: "h-3.5 w-3.5" })
|
|
3353
3353
|
}
|
|
3354
3354
|
) }),
|
|
3355
|
-
/* @__PURE__ */ s(
|
|
3355
|
+
/* @__PURE__ */ s(Pe, { align: "end", className: "w-44", children: [
|
|
3356
3356
|
/* @__PURE__ */ s(K, { onClick: n, children: [
|
|
3357
3357
|
/* @__PURE__ */ e(Wt, { className: "h-3.5 w-3.5" }),
|
|
3358
3358
|
"Edit ",
|
|
@@ -3365,7 +3365,7 @@ function Ln({
|
|
|
3365
3365
|
g.preventDefault(), i();
|
|
3366
3366
|
},
|
|
3367
3367
|
children: [
|
|
3368
|
-
/* @__PURE__ */ e(
|
|
3368
|
+
/* @__PURE__ */ e(Za, { className: "h-3.5 w-3.5" }),
|
|
3369
3369
|
"Run now"
|
|
3370
3370
|
]
|
|
3371
3371
|
}
|
|
@@ -3377,7 +3377,7 @@ function Ln({
|
|
|
3377
3377
|
g.preventDefault(), r();
|
|
3378
3378
|
},
|
|
3379
3379
|
children: c ? /* @__PURE__ */ s(R, { children: [
|
|
3380
|
-
/* @__PURE__ */ e(
|
|
3380
|
+
/* @__PURE__ */ e(Ja, { className: "h-3.5 w-3.5" }),
|
|
3381
3381
|
"Resume"
|
|
3382
3382
|
] }) : /* @__PURE__ */ s(R, { children: [
|
|
3383
3383
|
/* @__PURE__ */ e(er, { className: "h-3.5 w-3.5" }),
|
|
@@ -3406,18 +3406,18 @@ function Ln({
|
|
|
3406
3406
|
}
|
|
3407
3407
|
);
|
|
3408
3408
|
}
|
|
3409
|
-
function
|
|
3409
|
+
function Ln(t) {
|
|
3410
3410
|
return (t == null ? void 0 : t.trim()) || "This dashboard";
|
|
3411
3411
|
}
|
|
3412
3412
|
function Bn(t) {
|
|
3413
3413
|
return t === "This dashboard" ? "Watch this dashboard" : `Watch ${t}`;
|
|
3414
3414
|
}
|
|
3415
|
-
function
|
|
3415
|
+
function Pn(t, a, o) {
|
|
3416
3416
|
return a !== "dashboard" ? t : t.filter(
|
|
3417
3417
|
(n) => n.source.type === "dashboard" && n.source.dashboardId === o
|
|
3418
3418
|
);
|
|
3419
3419
|
}
|
|
3420
|
-
async function
|
|
3420
|
+
async function Mn(t) {
|
|
3421
3421
|
const o = [];
|
|
3422
3422
|
let n = 1, i = 0, r = Number.POSITIVE_INFINITY;
|
|
3423
3423
|
for (; i < r; ) {
|
|
@@ -3457,46 +3457,46 @@ function On({
|
|
|
3457
3457
|
openRun: m,
|
|
3458
3458
|
client: p
|
|
3459
3459
|
}) {
|
|
3460
|
-
const { authToken: f, tokenProps: g } = it(), x = rr(), N = !h || x.canCreate && (h === "scheduled_report" || x.analyticalBriefingsEnabled), [S,
|
|
3461
|
-
c === void 0 &&
|
|
3460
|
+
const { authToken: f, tokenProps: g } = it(), x = rr(), N = !h || x.canCreate && (h === "scheduled_report" || x.analyticalBriefingsEnabled), [S, M] = D(!1), U = c ?? S, F = (y) => {
|
|
3461
|
+
c === void 0 && M(y), l == null || l(y);
|
|
3462
3462
|
}, [O, b] = D(
|
|
3463
3463
|
h ? "author" : "list"
|
|
3464
3464
|
), [I, C] = D(
|
|
3465
3465
|
h ?? "analytical_briefing"
|
|
3466
|
-
), [A, k] = D("dashboard"), [j,
|
|
3466
|
+
), [A, k] = D("dashboard"), [j, V] = D(
|
|
3467
3467
|
[]
|
|
3468
|
-
), [z, G] = D(null),
|
|
3468
|
+
), [z, G] = D(null), L = h && !N && !z ? "list" : O, [te, X] = D(!1), [H, he] = D(null), [ge, Q] = D(null), [_, se] = D(
|
|
3469
3469
|
null
|
|
3470
|
-
), [me, pe] = D(null), Ce = nt(null),
|
|
3470
|
+
), [me, pe] = D(null), Ce = nt(null), Me = nt(U);
|
|
3471
3471
|
ve(() => {
|
|
3472
|
-
const y = U && !
|
|
3473
|
-
|
|
3472
|
+
const y = U && !Me.current;
|
|
3473
|
+
Me.current = U, !(!y || !h) && (G(null), k("dashboard"), C(h), b("author"), pe(null));
|
|
3474
3474
|
}, [U, h]);
|
|
3475
|
-
const
|
|
3475
|
+
const Ye = yt(), $ = o ?? (g == null ? void 0 : g.apiServiceUrl), W = n ?? (f == null ? void 0 : f.accessToken), re = ee(() => ({ ...Un, ...p }), [p]), [we, Ze] = D(null);
|
|
3476
3476
|
ve(() => {
|
|
3477
3477
|
if (!m || !$ || !W) return;
|
|
3478
3478
|
let y = !0;
|
|
3479
|
-
return re.getBriefing($, W, m.briefingId).then(({ briefing:
|
|
3480
|
-
y && (G(
|
|
3481
|
-
}, (
|
|
3482
|
-
y && E.error(
|
|
3479
|
+
return re.getBriefing($, W, m.briefingId).then(({ briefing: P }) => {
|
|
3480
|
+
y && (G(P), Ze(m), b("author"));
|
|
3481
|
+
}, (P) => {
|
|
3482
|
+
y && E.error(P instanceof Error ? P.message : "Could not open the run.");
|
|
3483
3483
|
}), () => {
|
|
3484
3484
|
y = !1;
|
|
3485
3485
|
};
|
|
3486
3486
|
}, [m, $, W, re]);
|
|
3487
|
-
const be =
|
|
3488
|
-
const y =
|
|
3487
|
+
const be = Ln(a), Ue = ee(() => {
|
|
3488
|
+
const y = Pn(
|
|
3489
3489
|
j,
|
|
3490
3490
|
A,
|
|
3491
3491
|
t
|
|
3492
3492
|
);
|
|
3493
3493
|
if (!h)
|
|
3494
3494
|
return y;
|
|
3495
|
-
const
|
|
3495
|
+
const P = h === "scheduled_report" ? "report" : "briefing";
|
|
3496
3496
|
return y.filter(
|
|
3497
|
-
(Oe) => ie(Oe).noun ===
|
|
3497
|
+
(Oe) => ie(Oe).noun === P
|
|
3498
3498
|
);
|
|
3499
|
-
}, [t, j, A, h]),
|
|
3499
|
+
}, [t, j, A, h]), Je = ee(() => A === "dashboard" ? {
|
|
3500
3500
|
source: { type: "dashboard", dashboardId: t },
|
|
3501
3501
|
label: be,
|
|
3502
3502
|
detail: Bn(be)
|
|
@@ -3508,12 +3508,12 @@ function On({
|
|
|
3508
3508
|
canCreate: x.canCreate,
|
|
3509
3509
|
analyticalBriefingsEnabled: x.analyticalBriefingsEnabled,
|
|
3510
3510
|
scheduledReportAvailable: A === "dashboard"
|
|
3511
|
-
}), ne =
|
|
3511
|
+
}), ne = Y(async () => {
|
|
3512
3512
|
if (!(!$ || !W)) {
|
|
3513
|
-
|
|
3513
|
+
X(!0), pe(null);
|
|
3514
3514
|
try {
|
|
3515
|
-
|
|
3516
|
-
await
|
|
3515
|
+
V(
|
|
3516
|
+
await Mn({
|
|
3517
3517
|
apiClient: re,
|
|
3518
3518
|
apiServiceUrl: $,
|
|
3519
3519
|
token: W
|
|
@@ -3524,13 +3524,13 @@ function On({
|
|
|
3524
3524
|
y instanceof Error ? y.message : "Could not load briefings."
|
|
3525
3525
|
);
|
|
3526
3526
|
} finally {
|
|
3527
|
-
|
|
3527
|
+
X(!1);
|
|
3528
3528
|
}
|
|
3529
3529
|
}
|
|
3530
3530
|
}, [re, $, W]);
|
|
3531
3531
|
ve(() => {
|
|
3532
|
-
!U ||
|
|
3533
|
-
}, [Ne,
|
|
3532
|
+
!U || L !== "list" || !Ne || ne();
|
|
3533
|
+
}, [Ne, L, ne, U]);
|
|
3534
3534
|
const ke = () => {
|
|
3535
3535
|
G(null), k("dashboard"), b("list"), F(!0);
|
|
3536
3536
|
}, v = (y) => {
|
|
@@ -3539,15 +3539,15 @@ function On({
|
|
|
3539
3539
|
if (!(!$ || !W)) {
|
|
3540
3540
|
he(y), pe(null);
|
|
3541
3541
|
try {
|
|
3542
|
-
const
|
|
3542
|
+
const P = await re.getBriefing(
|
|
3543
3543
|
$,
|
|
3544
3544
|
W,
|
|
3545
3545
|
y
|
|
3546
3546
|
);
|
|
3547
|
-
G(
|
|
3548
|
-
} catch (
|
|
3547
|
+
G(P.briefing), b("author");
|
|
3548
|
+
} catch (P) {
|
|
3549
3549
|
pe(
|
|
3550
|
-
|
|
3550
|
+
P instanceof Error ? P.message : "Could not open briefing."
|
|
3551
3551
|
);
|
|
3552
3552
|
} finally {
|
|
3553
3553
|
he(null);
|
|
@@ -3557,16 +3557,16 @@ function On({
|
|
|
3557
3557
|
if (!(!$ || !W)) {
|
|
3558
3558
|
Q(y.id);
|
|
3559
3559
|
try {
|
|
3560
|
-
const
|
|
3560
|
+
const P = await re.runBriefingNow(
|
|
3561
3561
|
$,
|
|
3562
3562
|
W,
|
|
3563
3563
|
y.id,
|
|
3564
3564
|
{ requestId: Rn() }
|
|
3565
3565
|
);
|
|
3566
|
-
|
|
3567
|
-
} catch (
|
|
3566
|
+
Ye.track({ kind: "briefing", id: P.run.id, title: y.name, briefingId: y.id }), ne();
|
|
3567
|
+
} catch (P) {
|
|
3568
3568
|
E.error(
|
|
3569
|
-
|
|
3569
|
+
P instanceof Error ? P.message : "Could not start the run."
|
|
3570
3570
|
);
|
|
3571
3571
|
} finally {
|
|
3572
3572
|
Q(null);
|
|
@@ -3574,7 +3574,7 @@ function On({
|
|
|
3574
3574
|
}
|
|
3575
3575
|
}, oe = async (y) => {
|
|
3576
3576
|
if (!$ || !W) return;
|
|
3577
|
-
const { noun:
|
|
3577
|
+
const { noun: P } = ie(y), Oe = P === "report" ? "Report" : "Briefing";
|
|
3578
3578
|
Q(y.id);
|
|
3579
3579
|
try {
|
|
3580
3580
|
const Re = y.status === "PAUSED" ? await re.resumeBriefing(
|
|
@@ -3591,7 +3591,7 @@ function On({
|
|
|
3591
3591
|
), ne();
|
|
3592
3592
|
} catch (Re) {
|
|
3593
3593
|
E.error(
|
|
3594
|
-
Re instanceof Error ? Re.message : `Could not update the ${
|
|
3594
|
+
Re instanceof Error ? Re.message : `Could not update the ${P} status.`
|
|
3595
3595
|
);
|
|
3596
3596
|
} finally {
|
|
3597
3597
|
Q(null);
|
|
@@ -3606,11 +3606,11 @@ function On({
|
|
|
3606
3606
|
W,
|
|
3607
3607
|
y.id
|
|
3608
3608
|
);
|
|
3609
|
-
const { noun:
|
|
3610
|
-
E.success(`${
|
|
3611
|
-
} catch (
|
|
3609
|
+
const { noun: P } = ie(y);
|
|
3610
|
+
E.success(`${P === "report" ? "Report" : "Briefing"} deleted`), se(null), ne();
|
|
3611
|
+
} catch (P) {
|
|
3612
3612
|
E.error(
|
|
3613
|
-
|
|
3613
|
+
P instanceof Error ? P.message : "Could not delete the briefing."
|
|
3614
3614
|
);
|
|
3615
3615
|
} finally {
|
|
3616
3616
|
Q(null);
|
|
@@ -3634,8 +3634,8 @@ function On({
|
|
|
3634
3634
|
hideClose: !0,
|
|
3635
3635
|
className: "flex h-full w-full flex-col overflow-hidden p-0 outline-none sm:max-w-[560px]",
|
|
3636
3636
|
onOpenAutoFocus: (y) => {
|
|
3637
|
-
var
|
|
3638
|
-
y.preventDefault(), (
|
|
3637
|
+
var P;
|
|
3638
|
+
y.preventDefault(), (P = Ce.current) == null || P.focus({ preventScroll: !0 });
|
|
3639
3639
|
},
|
|
3640
3640
|
children: [
|
|
3641
3641
|
/* @__PURE__ */ s(hr, { className: "sr-only", children: [
|
|
@@ -3655,11 +3655,11 @@ function On({
|
|
|
3655
3655
|
{
|
|
3656
3656
|
type: "button",
|
|
3657
3657
|
role: "tab",
|
|
3658
|
-
"aria-selected":
|
|
3658
|
+
"aria-selected": L === "author",
|
|
3659
3659
|
disabled: !N,
|
|
3660
|
-
className:
|
|
3660
|
+
className: Z(
|
|
3661
3661
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
3662
|
-
|
|
3662
|
+
L === "author" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground",
|
|
3663
3663
|
!N && "cursor-not-allowed opacity-50"
|
|
3664
3664
|
),
|
|
3665
3665
|
onClick: () => {
|
|
@@ -3673,10 +3673,10 @@ function On({
|
|
|
3673
3673
|
{
|
|
3674
3674
|
type: "button",
|
|
3675
3675
|
role: "tab",
|
|
3676
|
-
"aria-selected":
|
|
3677
|
-
className:
|
|
3676
|
+
"aria-selected": L === "list",
|
|
3677
|
+
className: Z(
|
|
3678
3678
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
3679
|
-
|
|
3679
|
+
L === "list" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
3680
3680
|
),
|
|
3681
3681
|
onClick: () => b("list"),
|
|
3682
3682
|
children: h === "scheduled_report" ? "Manage reports" : "Manage briefings"
|
|
@@ -3692,11 +3692,11 @@ function On({
|
|
|
3692
3692
|
onClick: () => F(!1),
|
|
3693
3693
|
className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
3694
3694
|
"aria-label": h === "scheduled_report" ? "Close email report workflow" : "Close analytical briefing workflow",
|
|
3695
|
-
children: /* @__PURE__ */ e(
|
|
3695
|
+
children: /* @__PURE__ */ e(Xe, { className: "h-3.5 w-3.5" })
|
|
3696
3696
|
}
|
|
3697
3697
|
)
|
|
3698
3698
|
] }) : null,
|
|
3699
|
-
|
|
3699
|
+
L === "list" ? /* @__PURE__ */ e(
|
|
3700
3700
|
En,
|
|
3701
3701
|
{
|
|
3702
3702
|
briefings: Ue,
|
|
@@ -3738,7 +3738,7 @@ function On({
|
|
|
3738
3738
|
briefing: z,
|
|
3739
3739
|
initialRunId: we && (z == null ? void 0 : z.id) === we.briefingId ? we.runId : void 0,
|
|
3740
3740
|
intent: I,
|
|
3741
|
-
sourceContext: z ? void 0 :
|
|
3741
|
+
sourceContext: z ? void 0 : Je,
|
|
3742
3742
|
title: z ? `Edit ${ie(z).noun}` : I === "scheduled_report" ? "Schedule report" : "Create analytical briefing",
|
|
3743
3743
|
hideHeader: !!h,
|
|
3744
3744
|
className: "h-full min-h-0 max-w-none border-0 shadow-none",
|