react-semaphor 0.1.559 → 0.1.560
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 +368 -361
- 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 +630 -0
- package/dist/chunks/{assistant-chat-B_4bVE6I.js → assistant-chat-Bu2fFm_I.js} +206 -207
- package/dist/chunks/{bookmark-state-ssqrs5oP.js → bookmark-state-BFY9oNmr.js} +3 -3
- package/dist/chunks/{braces-Rdxa3H-s.js → braces-Da41xfUd.js} +1 -1
- package/dist/chunks/{comparison-window-caption-CKzQ5LcF.js → comparison-window-caption-4FNkMrzE.js} +166 -166
- package/dist/chunks/{context-DVy4HOU0.js → context-BgPDzLHZ.js} +1 -1
- package/dist/chunks/{custom-visual-inputs-zVa9wX_o.js → custom-visual-inputs-Dz-enUNR.js} +1 -1
- package/dist/chunks/{dashboard-BziwOVpZ.js → dashboard-_MeBuy67.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CbeNR-YI.js → dashboard-briefing-launcher-CEi4Pr_v.js} +1152 -1166
- package/dist/chunks/{dashboard-controls-RD6UJs1r.js → dashboard-controls-Bi7fyG-4.js} +98 -98
- package/dist/chunks/{dashboard-json-DGpv17vL.js → dashboard-json-B1mU_OMa.js} +5 -5
- package/dist/chunks/{document-dashboard-inputs-ChVkcBuu.js → document-dashboard-inputs-CkWfDB8c.js} +64 -64
- package/dist/chunks/{edit-dashboard-visual-AQ2pQkFp.js → edit-dashboard-visual-0CJN31Y3.js} +8375 -8615
- package/dist/chunks/filter-reach-copy-BF4w4kI2.js +3738 -0
- package/dist/chunks/{filter-value-text-B4l-xqJT.js → filter-value-text-CRC-K_l_.js} +3 -3
- package/dist/chunks/{global-date-filter-utils-DBzEOX9M.js → global-date-filter-utils-D8365uPH.js} +4068 -3401
- package/dist/chunks/{index-B1Xr7W24.js → index-DtHidOPV.js} +579 -604
- package/dist/chunks/{layout-grid-Bbz3zKif.js → layout-grid-BvsH4RY2.js} +1 -1
- package/dist/chunks/{list-filter-3sbH0Uy1.js → list-filter-Dg0otx5E.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CEe3PGEo.js → matrix-analytical-definition-CM18W8w6.js} +4 -4
- package/dist/chunks/{matrix-card-BRNGb1C4.js → matrix-card-HPskLaPy.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-CEegvTqg.js → matrix-member-presentation-Bbrfrke4.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-COxrfQTS.js → matrix-operation-contract-WPv4R-H_.js} +110 -110
- package/dist/chunks/{metric-comparison-DQx-uX__.js → metric-comparison-ljMKYZKa.js} +2 -2
- package/dist/chunks/{model-change-CJEj3ZD6.js → model-change-Ccn1zaxl.js} +1 -1
- package/dist/chunks/{palette-DMJtp3Vn.js → palette-Bsh376zO.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DOYhqeZb.js → pivot-result-contract-expectations-Bl5suy4-.js} +602 -696
- package/dist/chunks/{pivot-result-identity-CAj8SiRL.js → pivot-result-identity-vS9TSh4f.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-BmT7z6NH.js → raw-temporal-presentation-BHm7s-hz.js} +230 -274
- package/dist/chunks/{report-preferences-dialog-0sc8B1lh.js → report-preferences-dialog-BV8L0SeS.js} +55 -55
- package/dist/chunks/{report-runtime-context-bYoExeWr.js → report-runtime-context-BZQh9ywy.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-B_C_VAJH.js → resolve-dashboard-input-context-CAMiWvyR.js} +1749 -1989
- package/dist/chunks/{save-DSb1jTtG.js → save-B5EAsgQF.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-BQWM3ldX.js → saved-dashboard-context-n2Wn11cV.js} +57 -57
- package/dist/chunks/{selection-reducer-DSzMWb4x.js → selection-reducer-D0YnaAD9.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-Bz14Oma5.js → semaphor-ready-indicator-XLBLOJ2V.js} +38374 -39104
- package/dist/chunks/{shelf-drop-preview-context-DBHAkgch.js → shelf-drop-preview-context-DHMa54a-.js} +570 -570
- package/dist/chunks/{source-entity-resolution-BOrmNCEM.js → source-entity-resolution-dUG5VWRm.js} +1 -1
- package/dist/chunks/{switch-Dq8XPFpT.js → switch-ByxH4M7t.js} +3 -3
- package/dist/chunks/{table-export-sheet-C_RvEUyO.js → table-export-sheet-C_GdeTYU.js} +1 -1
- package/dist/chunks/{table-settings-DXj_zXwS.js → table-settings-Imz0FgWi.js} +6 -6
- package/dist/chunks/{temporal-input-presentation-AhLSkGPf.js → temporal-input-presentation-uvNK_tM0.js} +1109 -820
- package/dist/chunks/{token-types-LCYMJ3pa.js → token-types-CQtXUVMy.js} +1 -1
- package/dist/chunks/{upload-Dr_WAxHQ.js → upload-wbR-NVzq.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BK3YFkfc.js → use-create-flow-overlay-state-CEBaLOKC.js} +6 -6
- package/dist/chunks/{validators-C87JPd-_.js → validators-CXTneCA4.js} +1206 -1579
- package/dist/chunks/{zoned-wall-clock-E35Frf9v.js → zoned-wall-clock-B1n_WjW3.js} +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2207 -1497
- package/dist/data-app-sdk/index.js +5 -5
- package/dist/data-app-sdk-adapters/index.js +3 -3
- package/dist/data-app-sdk-validation/index.js +6 -6
- package/dist/format-utils/index.js +181 -176
- package/dist/index.js +22 -22
- 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/components/editor/editor-aside/utils.d.ts +1 -1
- package/dist/types/components/visual/data-table/types/data-table.d.ts +5 -20
- package/dist/types/index.js +6 -6
- package/dist/types/lib/formatters/canonical-format-adapter.d.ts +2 -29
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
- package/dist/types/lib/formatters/table-column-settings.d.ts +47 -0
- package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +10 -188
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +1 -1
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +16 -372
- package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
- package/dist/types/lib/stores/editor-store.d.ts +39 -9
- package/dist/types/lib/stores/table-actions.d.ts +9 -3
- package/dist/types/lib/table-formatting/index.d.ts +0 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range-source.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-conditional-formatting-range.d.ts +3 -2
- package/dist/types/lib/table-formatting/table-formatting-normalize.d.ts +1 -2
- package/dist/types/lib/table-formatting/table-formatting-render-model.d.ts +9 -0
- package/dist/types/lib/table-formatting/table-formatting-types.d.ts +5 -95
- package/dist/types/lib/table-formatting/table-presentation-fields.d.ts +35 -0
- package/dist/types/lib/types/common-types.d.ts +40 -47
- package/dist/types/lib/types/explorer-types.d.ts +11 -43
- package/dist/types/lib/utils/card-config-utils.d.ts +8 -0
- package/dist/types/lib/utils/card-definition.d.ts +9 -187
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +159 -513
- package/dist/types/shared/analytics-protocol/contracts.d.ts +32 -9
- package/dist/types/shared/analytics-protocol/execution-input-schemas.d.ts +108 -980
- package/dist/types/shared/analytics-protocol/field-validation.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +281 -4624
- package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +20 -20
- package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +18 -18
- package/dist/types/shared/analytics-protocol/matrix-path-contract.d.ts +40 -40
- package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +3 -203
- package/dist/types/shared/analytics-protocol/scalar-value.d.ts +8 -8
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +8 -0
- package/dist/types/shared/assistant-protocol/context.d.ts +69 -69
- package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +4 -1
- package/dist/types/shared/dashboard-authoring/card-formats/sql-date-pattern.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/card-formats/upgrade-card-formats.d.ts +57 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +24 -24
- package/dist/types/shared/dashboard-authoring/conditional-formatting/editable.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/evaluate.d.ts +16 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/index.d.ts +9 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/kpi.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/resolve-card-column-ref.d.ts +17 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/retain.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +4499 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/store.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/types.d.ts +151 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/upgrade.d.ts +35 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +62 -62
- package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
- package/dist/types/shared/dashboard-authoring/matrix-authoring.d.ts +4 -5
- package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +24 -736
- package/dist/types/shared/dashboard-authoring/retired-presentation-fields.d.ts +31 -0
- package/dist/types/shared/dashboard-authoring/upgrade-card-presentation.d.ts +14 -0
- package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +5 -1
- package/dist/types/shared/format-utils/formatters/number-formatter.d.ts +16 -0
- package/dist/types/shared/format-utils/index.d.ts +2 -0
- package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +10 -366
- package/dist/types/shared/format-utils/raw-temporal.d.ts +15 -1
- package/dist/types/shared/format-utils/resolve-column-format.d.ts +43 -0
- package/dist/types/shared/format-utils/retired-format-adapters.d.ts +68 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +5 -1
- package/dist/types/shared/format-utils/stored-value-format.d.ts +16 -0
- package/dist/types/shared/format-utils/types/format-types.d.ts +10 -12
- package/package.json +1 -1
- package/dist/chunks/analytics-base-schemas-BUFUoO6G.js +0 -472
- package/dist/chunks/editor-draft-sync-BN5qYHPF.js +0 -15
- package/dist/chunks/filter-reach-copy-B5Y7FHzg.js +0 -3411
- package/dist/types/lib/table-formatting/table-conditional-formatting-evaluator.d.ts +0 -9
- package/dist/types/lib/table-formatting/table-formatting-validation.d.ts +0 -12
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { c as fe, B as
|
|
5
|
-
import { L as Ee } from "./layout-grid-
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import Pt, { useState as D, useEffect as ve, useCallback as X, 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 Le, 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 Z, 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 Ve, ck as Be, cS as zt, cl as Me, 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 La, c_ as Va, c$ as ue, d0 as Ba, R as jt, d1 as Ma, d2 as Pa, 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 Ya, di as Wt, dj as Xa, dk as ze, dl as Ja, dm as Za, 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-XLBLOJ2V.js";
|
|
4
|
+
import { c as fe, B as T, X as Ye, 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-ByxH4M7t.js";
|
|
5
|
+
import { L as Ee } from "./layout-grid-BvsH4RY2.js";
|
|
6
6
|
import "./index-CuHybtft.js";
|
|
7
|
-
import { o as
|
|
8
|
-
import "./matrix-operation-contract-
|
|
9
|
-
import "./analytics-base-schemas-
|
|
7
|
+
import { o as vr } from "./validators-CXTneCA4.js";
|
|
8
|
+
import "./matrix-operation-contract-WPv4R-H_.js";
|
|
9
|
+
import "./analytics-base-schemas-CHLxsPfX.js";
|
|
10
10
|
import "zod";
|
|
11
11
|
import "../value-format-preferences/index.js";
|
|
12
|
-
import { c as
|
|
12
|
+
import { c as J } from "./_commonjsHelpers-DimLPMtv.js";
|
|
13
13
|
import { s as _e } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import "./temporal-input-presentation-AhLSkGPf.js";
|
|
14
|
+
import { aY as At, aC as Ft, d8 as Et, ep as xr, eq as He, v as It, er as yr, aw as Nt, es as Cr, dK as wr, dx as Nr, bF as Sr, et as kr } from "./global-date-filter-utils-D8365uPH.js";
|
|
15
|
+
import { createPortal as Dr } from "react-dom";
|
|
16
|
+
import "./temporal-input-presentation-uvNK_tM0.js";
|
|
18
17
|
import "./index-CJW5BdWT.js";
|
|
19
|
-
import { J as
|
|
20
|
-
import { S as
|
|
21
|
-
import { V as
|
|
22
|
-
import { m as
|
|
23
|
-
import {
|
|
24
|
-
import { g as
|
|
25
|
-
import { g as
|
|
18
|
+
import { J as Ar } from "./table-settings-Imz0FgWi.js";
|
|
19
|
+
import { S as Qt } from "./save-B5EAsgQF.js";
|
|
20
|
+
import { V as Fr, L as Er, a as Ir, u as Kt, C as Gt, F as Tr, b as Lr } from "./use-create-flow-overlay-state-CEBaLOKC.js";
|
|
21
|
+
import { m as Vr, k as Yt, n as Xt } from "./report-preferences-dialog-BV8L0SeS.js";
|
|
22
|
+
import { u as Tt } from "./pivot-result-contract-expectations-Bl5suy4-.js";
|
|
23
|
+
import { g as Br, f as Mr } from "./document-dashboard-inputs-CkWfDB8c.js";
|
|
24
|
+
import { g as ie, d as Pr, a as Ur } from "./index-DtHidOPV.js";
|
|
26
25
|
/**
|
|
27
26
|
* @license lucide-react v0.453.0 - ISC
|
|
28
27
|
*
|
|
29
28
|
* This source code is licensed under the ISC license.
|
|
30
29
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
30
|
*/
|
|
32
|
-
const
|
|
31
|
+
const Or = fe("ArrowUpRight", [
|
|
33
32
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
34
33
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
35
34
|
]);
|
|
@@ -39,7 +38,7 @@ const Mr = fe("ArrowUpRight", [
|
|
|
39
38
|
* This source code is licensed under the ISC license.
|
|
40
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
40
|
*/
|
|
42
|
-
const
|
|
41
|
+
const Lt = fe("Bell", [
|
|
43
42
|
["path", { d: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9", key: "1qo2s2" }],
|
|
44
43
|
["path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0", key: "qgo35s" }]
|
|
45
44
|
]);
|
|
@@ -49,7 +48,7 @@ const Et = fe("Bell", [
|
|
|
49
48
|
* This source code is licensed under the ISC license.
|
|
50
49
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
50
|
*/
|
|
52
|
-
const
|
|
51
|
+
const Rr = fe("CalendarRange", [
|
|
53
52
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
54
53
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
55
54
|
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
@@ -65,7 +64,7 @@ const Ur = fe("CalendarRange", [
|
|
|
65
64
|
* This source code is licensed under the ISC license.
|
|
66
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
66
|
*/
|
|
68
|
-
const
|
|
67
|
+
const zr = fe("CodeXml", [
|
|
69
68
|
["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
|
|
70
69
|
["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
|
|
71
70
|
["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
|
|
@@ -76,7 +75,7 @@ const Or = fe("CodeXml", [
|
|
|
76
75
|
* This source code is licensed under the ISC license.
|
|
77
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
78
77
|
*/
|
|
79
|
-
const
|
|
78
|
+
const Vt = fe("MonitorSmartphone", [
|
|
80
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" }],
|
|
81
80
|
["path", { d: "M10 19v-3.96 3.15", key: "1irgej" }],
|
|
82
81
|
["path", { d: "M7 19h5", key: "qswx4l" }],
|
|
@@ -88,7 +87,7 @@ const It = fe("MonitorSmartphone", [
|
|
|
88
87
|
* This source code is licensed under the ISC license.
|
|
89
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
89
|
*/
|
|
91
|
-
const
|
|
90
|
+
const _r = fe("MousePointer2", [
|
|
92
91
|
[
|
|
93
92
|
"path",
|
|
94
93
|
{
|
|
@@ -103,7 +102,7 @@ const zr = fe("MousePointer2", [
|
|
|
103
102
|
* This source code is licensed under the ISC license.
|
|
104
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
104
|
*/
|
|
106
|
-
const
|
|
105
|
+
const jr = fe("Newspaper", [
|
|
107
106
|
[
|
|
108
107
|
"path",
|
|
109
108
|
{
|
|
@@ -115,38 +114,38 @@ const Rr = fe("Newspaper", [
|
|
|
115
114
|
["path", { d: "M15 18h-5", key: "95g1m2" }],
|
|
116
115
|
["path", { d: "M10 6h8v4h-8V6Z", key: "smlsk5" }]
|
|
117
116
|
]);
|
|
118
|
-
function
|
|
119
|
-
return /* @__PURE__ */
|
|
117
|
+
function $r() {
|
|
118
|
+
return /* @__PURE__ */ e("div", { className: "space-y-1.5 py-1", children: [...Array(5)].map((t, a) => /* @__PURE__ */ s(
|
|
120
119
|
"div",
|
|
121
120
|
{
|
|
122
121
|
className: "flex animate-pulse items-start gap-3 rounded-xl border border-transparent px-2.5 py-2.5",
|
|
123
122
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ e("div", { className: "mt-0.5 h-4 w-4 flex-shrink-0 rounded bg-muted/60" }),
|
|
125
124
|
/* @__PURE__ */ s("div", { className: "flex-1 space-y-1.5", children: [
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-3/5 rounded bg-muted/60" }),
|
|
126
|
+
/* @__PURE__ */ e("div", { className: "h-3 w-4/5 rounded bg-muted/40" })
|
|
128
127
|
] })
|
|
129
128
|
]
|
|
130
129
|
},
|
|
131
130
|
a
|
|
132
131
|
)) });
|
|
133
132
|
}
|
|
134
|
-
function
|
|
135
|
-
open:
|
|
133
|
+
function Wr({
|
|
134
|
+
open: t,
|
|
136
135
|
onOpenChange: a,
|
|
137
136
|
onSubmit: o,
|
|
138
137
|
isCreating: n
|
|
139
138
|
}) {
|
|
140
|
-
const i = ot("interactive"), [r, d] =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}, [
|
|
139
|
+
const i = ot("interactive"), [r, d] = D(""), [c, l] = D("");
|
|
140
|
+
ve(() => {
|
|
141
|
+
t || (d(""), l(""));
|
|
142
|
+
}, [t]);
|
|
144
143
|
const u = () => {
|
|
145
144
|
r.trim() && o({ title: r, description: c });
|
|
146
145
|
}, h = (m) => {
|
|
147
146
|
a(m);
|
|
148
147
|
};
|
|
149
|
-
return /* @__PURE__ */
|
|
148
|
+
return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: h, children: /* @__PURE__ */ s(
|
|
150
149
|
Te,
|
|
151
150
|
{
|
|
152
151
|
showCloseButton: !1,
|
|
@@ -155,14 +154,14 @@ function jr({
|
|
|
155
154
|
children: [
|
|
156
155
|
/* @__PURE__ */ s("div", { className: "flex h-10 shrink-0 items-center justify-between gap-2 border-b border-border/60 px-3", children: [
|
|
157
156
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
158
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
159
158
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ e(Le, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "New library visual" }),
|
|
160
|
+
/* @__PURE__ */ e("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Visual" })
|
|
162
161
|
] })
|
|
163
162
|
] }),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
|
|
163
|
+
/* @__PURE__ */ e(
|
|
164
|
+
T,
|
|
166
165
|
{
|
|
167
166
|
size: "xs",
|
|
168
167
|
variant: "ghost",
|
|
@@ -170,15 +169,15 @@ function jr({
|
|
|
170
169
|
onClick: () => h(!1),
|
|
171
170
|
"aria-label": "Close",
|
|
172
171
|
disabled: n,
|
|
173
|
-
children: /* @__PURE__ */
|
|
172
|
+
children: /* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" })
|
|
174
173
|
}
|
|
175
174
|
)
|
|
176
175
|
] }),
|
|
177
176
|
/* @__PURE__ */ s("div", { className: "space-y-3 px-4 py-3", children: [
|
|
178
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: "Create a saved visual that can be reused across dashboards." }),
|
|
179
178
|
/* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ e(De, { htmlFor: "visual-title", className: "text-[12px]", children: "Name" }),
|
|
180
|
+
/* @__PURE__ */ e(
|
|
182
181
|
st,
|
|
183
182
|
{
|
|
184
183
|
id: "visual-title",
|
|
@@ -194,8 +193,8 @@ function jr({
|
|
|
194
193
|
)
|
|
195
194
|
] }),
|
|
196
195
|
/* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ e(De, { htmlFor: "visual-description", className: "text-[12px]", children: "Description" }),
|
|
197
|
+
/* @__PURE__ */ e(
|
|
199
198
|
st,
|
|
200
199
|
{
|
|
201
200
|
id: "visual-description",
|
|
@@ -209,8 +208,8 @@ function jr({
|
|
|
209
208
|
] })
|
|
210
209
|
] }),
|
|
211
210
|
/* @__PURE__ */ s("div", { className: "flex shrink-0 justify-end gap-2 border-t border-border/60 px-4 py-2.5", children: [
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
|
|
211
|
+
/* @__PURE__ */ e(
|
|
212
|
+
T,
|
|
214
213
|
{
|
|
215
214
|
size: "xs",
|
|
216
215
|
variant: "outline",
|
|
@@ -219,14 +218,14 @@ function jr({
|
|
|
219
218
|
children: "Cancel"
|
|
220
219
|
}
|
|
221
220
|
),
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
|
|
221
|
+
/* @__PURE__ */ e(
|
|
222
|
+
T,
|
|
224
223
|
{
|
|
225
224
|
size: "xs",
|
|
226
225
|
onClick: u,
|
|
227
226
|
disabled: !r.trim() || n,
|
|
228
|
-
children: n ? /* @__PURE__ */ s(
|
|
229
|
-
/* @__PURE__ */
|
|
227
|
+
children: n ? /* @__PURE__ */ s(R, { children: [
|
|
228
|
+
/* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
230
229
|
"Creating..."
|
|
231
230
|
] }) : "Create library visual"
|
|
232
231
|
}
|
|
@@ -236,10 +235,10 @@ function jr({
|
|
|
236
235
|
}
|
|
237
236
|
) });
|
|
238
237
|
}
|
|
239
|
-
function
|
|
240
|
-
const [a, o] =
|
|
241
|
-
return
|
|
242
|
-
if (!
|
|
238
|
+
function qr(t) {
|
|
239
|
+
const [a, o] = D(null), [n, i] = D(null), r = na();
|
|
240
|
+
return ve(() => {
|
|
241
|
+
if (!t || t.trim() === "") {
|
|
243
242
|
o(null), i(null);
|
|
244
243
|
return;
|
|
245
244
|
}
|
|
@@ -247,14 +246,14 @@ function $r(e) {
|
|
|
247
246
|
return;
|
|
248
247
|
(async () => {
|
|
249
248
|
try {
|
|
250
|
-
if (!
|
|
251
|
-
throw new Error(`Invalid URL format: ${
|
|
249
|
+
if (!t.startsWith("http://") && !t.startsWith("https://"))
|
|
250
|
+
throw new Error(`Invalid URL format: ${t}`);
|
|
252
251
|
try {
|
|
253
|
-
new URL(
|
|
252
|
+
new URL(t);
|
|
254
253
|
} catch {
|
|
255
|
-
throw new Error(`Invalid URL: ${
|
|
254
|
+
throw new Error(`Invalid URL: ${t}`);
|
|
256
255
|
}
|
|
257
|
-
const l = `${
|
|
256
|
+
const l = `${t.endsWith("/") ? t : `${t}/`}index.js`;
|
|
258
257
|
try {
|
|
259
258
|
if (!(await fetch(l, { method: "HEAD" })).ok)
|
|
260
259
|
throw new Error(`Module not found at ${l}`);
|
|
@@ -273,12 +272,12 @@ function $r(e) {
|
|
|
273
272
|
console.error("Failed to load remote chart store:", l), i(l), o(null);
|
|
274
273
|
}
|
|
275
274
|
})();
|
|
276
|
-
}, [
|
|
275
|
+
}, [t, r]), a;
|
|
277
276
|
}
|
|
278
|
-
function
|
|
279
|
-
if (
|
|
277
|
+
function Hr(t, a) {
|
|
278
|
+
if (t.length === 0)
|
|
280
279
|
return "";
|
|
281
|
-
const o =
|
|
280
|
+
const o = t.find(
|
|
282
281
|
(n) => {
|
|
283
282
|
var i, r;
|
|
284
283
|
return ((i = n.customCardPreferences) == null ? void 0 : i.visualType) === "multiple" || !!((r = n.customCardPreferences) != null && r.dataInputCardIds);
|
|
@@ -287,23 +286,23 @@ function Wr(e, a) {
|
|
|
287
286
|
if (o)
|
|
288
287
|
return o.id;
|
|
289
288
|
if (a) {
|
|
290
|
-
const n =
|
|
289
|
+
const n = t.find((i) => i.id === a);
|
|
291
290
|
if (n) {
|
|
292
291
|
const i = n.tabTitle;
|
|
293
292
|
if (i == "All__Header")
|
|
294
|
-
return
|
|
293
|
+
return t[0].id;
|
|
295
294
|
if (i && i.endsWith("__Header")) {
|
|
296
|
-
const d = i.split("__")[0], c =
|
|
295
|
+
const d = i.split("__")[0], c = t.find(
|
|
297
296
|
(l) => l.tabTitle === d
|
|
298
297
|
);
|
|
299
|
-
return c ? c.id :
|
|
298
|
+
return c ? c.id : t[0].id;
|
|
300
299
|
}
|
|
301
300
|
return a;
|
|
302
301
|
}
|
|
303
302
|
}
|
|
304
|
-
return
|
|
303
|
+
return t[0].id;
|
|
305
304
|
}
|
|
306
|
-
async function
|
|
305
|
+
async function Bt(t, a, o, n, i = "Opening library visual...") {
|
|
307
306
|
if (!a || !o)
|
|
308
307
|
throw new Error("Missing auth token or visual ID");
|
|
309
308
|
const r = ["resource-by-id", "visual", o], d = n.getQueryData(r);
|
|
@@ -315,7 +314,7 @@ async function Tt(e, a, o, n, i = "Opening library visual...") {
|
|
|
315
314
|
});
|
|
316
315
|
try {
|
|
317
316
|
const l = await fetch(
|
|
318
|
-
`${
|
|
317
|
+
`${t}/management/v1/visuals/${o}`,
|
|
319
318
|
{
|
|
320
319
|
headers: {
|
|
321
320
|
Authorization: `Bearer ${a}`
|
|
@@ -330,41 +329,41 @@ async function Tt(e, a, o, n, i = "Opening library visual...") {
|
|
|
330
329
|
throw E.dismiss(c), l;
|
|
331
330
|
}
|
|
332
331
|
}
|
|
333
|
-
function
|
|
334
|
-
if (typeof
|
|
335
|
-
return JSON.parse(
|
|
336
|
-
if (typeof
|
|
337
|
-
return
|
|
332
|
+
function Jt(t) {
|
|
333
|
+
if (typeof t == "string")
|
|
334
|
+
return JSON.parse(t);
|
|
335
|
+
if (typeof t == "object")
|
|
336
|
+
return t;
|
|
338
337
|
throw new Error("Invalid frame object format");
|
|
339
338
|
}
|
|
340
|
-
function
|
|
339
|
+
function Qr(t, a) {
|
|
341
340
|
var r, d;
|
|
342
|
-
const o = (
|
|
341
|
+
const o = (t == null ? void 0 : t.frameObject) ?? ((r = t == null ? void 0 : t.visual) == null ? void 0 : r.frameObject);
|
|
343
342
|
if (!o)
|
|
344
343
|
return !1;
|
|
345
|
-
const n =
|
|
344
|
+
const n = Jt(o);
|
|
346
345
|
if (!(n != null && n.cards) || n.cards.length === 0)
|
|
347
346
|
return !1;
|
|
348
347
|
const i = (d = n.cards) == null ? void 0 : d.find(
|
|
349
348
|
(c) => c.id === n.activeCardId
|
|
350
349
|
);
|
|
351
|
-
return i ? (
|
|
350
|
+
return i ? (la({
|
|
352
351
|
...a,
|
|
353
352
|
frame: n,
|
|
354
353
|
card: i,
|
|
355
|
-
visualId: (
|
|
354
|
+
visualId: (t == null ? void 0 : t.id) || n.visualId
|
|
356
355
|
}), !0) : !1;
|
|
357
356
|
}
|
|
358
|
-
function
|
|
359
|
-
const
|
|
357
|
+
function Kr() {
|
|
358
|
+
const t = Z(
|
|
360
359
|
(n) => {
|
|
361
360
|
var i;
|
|
362
361
|
return ((i = n.card.customCardPreferences) == null ? void 0 : i.url) || "";
|
|
363
362
|
}
|
|
364
|
-
), a =
|
|
365
|
-
return { getUpdatedFrame:
|
|
366
|
-
var
|
|
367
|
-
|
|
363
|
+
), a = qr(t);
|
|
364
|
+
return { getUpdatedFrame: X(() => {
|
|
365
|
+
var N;
|
|
366
|
+
da();
|
|
368
367
|
const {
|
|
369
368
|
frame: n,
|
|
370
369
|
card: i,
|
|
@@ -373,7 +372,7 @@ function Hr() {
|
|
|
373
372
|
selectedDatabaseName: c,
|
|
374
373
|
selectedTableName: l,
|
|
375
374
|
selectedConnectionId: u
|
|
376
|
-
} =
|
|
375
|
+
} = Z.getState(), h = i.sql, m = (N = a == null ? void 0 : a.getState()) == null ? void 0 : N.settings, p = At(i, {
|
|
377
376
|
isDevMode: r,
|
|
378
377
|
cardSql: h,
|
|
379
378
|
selectedSchemaName: d,
|
|
@@ -381,19 +380,25 @@ function Hr() {
|
|
|
381
380
|
selectedTableName: l,
|
|
382
381
|
selectedConnectionId: u,
|
|
383
382
|
remoteChartSettings: m,
|
|
384
|
-
stripConfig:
|
|
385
|
-
}), f = n.cards.map(
|
|
386
|
-
(
|
|
387
|
-
|
|
383
|
+
stripConfig: Ft
|
|
384
|
+
}), f = n.cards.map((S) => {
|
|
385
|
+
if (S.id === i.id) return Et({ before: i, after: p });
|
|
386
|
+
const P = xr(S) ? At(S, { isDevMode: !0, cardSql: S.sql, stripConfig: Ft }) : S;
|
|
387
|
+
return Et({ before: S, after: P });
|
|
388
|
+
}), g = f.flatMap((S) => S.dropped);
|
|
389
|
+
g.length && E.info("Some conditional formatting rules were removed", {
|
|
390
|
+
description: `Their column isn't in the saved visual: ${g.map((S) => S.name || "an unnamed rule").join(", ")}.`
|
|
391
|
+
});
|
|
392
|
+
const x = f.map((S) => S.card);
|
|
388
393
|
return {
|
|
389
394
|
...n,
|
|
390
|
-
cards:
|
|
391
|
-
activeCardId:
|
|
395
|
+
cards: x,
|
|
396
|
+
activeCardId: Hr(x, n.activeCardId)
|
|
392
397
|
};
|
|
393
398
|
}, [a]) };
|
|
394
399
|
}
|
|
395
400
|
function ye() {
|
|
396
|
-
const { authToken:
|
|
401
|
+
const { authToken: t, tokenProps: a } = it(), o = Qe(), n = sa(), i = Ke(), { selectVisual: r } = lt(), {
|
|
397
402
|
setFrame: d,
|
|
398
403
|
setCard: c,
|
|
399
404
|
setIsDevMode: l,
|
|
@@ -403,32 +408,32 @@ function ye() {
|
|
|
403
408
|
setQueryResultColumns: p,
|
|
404
409
|
setSelectedConnectionId: f,
|
|
405
410
|
setSelectedDatabaseName: g,
|
|
406
|
-
setSelectedSchemaName:
|
|
407
|
-
setSelectedTableName:
|
|
408
|
-
setSelectedDatamodelId:
|
|
409
|
-
setInlineFilterValuesMap:
|
|
410
|
-
setApplyFilters:
|
|
411
|
-
clearEditorContext:
|
|
411
|
+
setSelectedSchemaName: x,
|
|
412
|
+
setSelectedTableName: N,
|
|
413
|
+
setSelectedDatamodelId: S,
|
|
414
|
+
setInlineFilterValuesMap: P,
|
|
415
|
+
setApplyFilters: U,
|
|
416
|
+
clearEditorContext: F
|
|
412
417
|
} = Ge(), {
|
|
413
418
|
setIsDashboardEditing: O,
|
|
414
419
|
setIsVisualEditing: b,
|
|
415
|
-
clearSelectedFrameId:
|
|
416
|
-
} =
|
|
417
|
-
(
|
|
418
|
-
),
|
|
419
|
-
enabled: !!(i != null && i.id) && !!(
|
|
420
|
-
}),
|
|
421
|
-
async (
|
|
420
|
+
clearSelectedFrameId: I
|
|
421
|
+
} = de(), C = w((V) => V.selectedSheetId), A = w((V) => V.selectedFrameId), k = w((V) => V.dashboard), j = w(
|
|
422
|
+
(V) => V.inlineFilterValuesMap
|
|
423
|
+
), L = oa((i == null ? void 0 : i.id) || "", {
|
|
424
|
+
enabled: !!(i != null && i.id) && !!(t != null && t.accessToken)
|
|
425
|
+
}), z = X(
|
|
426
|
+
async (V) => {
|
|
422
427
|
try {
|
|
423
|
-
r(
|
|
424
|
-
const { data:
|
|
428
|
+
r(V), I(), F();
|
|
429
|
+
const { data: te, fromCache: Y } = await Bt(
|
|
425
430
|
a.apiServiceUrl,
|
|
426
|
-
(
|
|
427
|
-
|
|
431
|
+
(t == null ? void 0 : t.accessToken) || "",
|
|
432
|
+
V.id,
|
|
428
433
|
o,
|
|
429
434
|
"Opening library visual..."
|
|
430
435
|
);
|
|
431
|
-
if (!
|
|
436
|
+
if (!Qr(te, {
|
|
432
437
|
setFrame: d,
|
|
433
438
|
setCard: c,
|
|
434
439
|
setIsDevMode: l,
|
|
@@ -438,26 +443,26 @@ function ye() {
|
|
|
438
443
|
setQueryResultColumns: p,
|
|
439
444
|
setSelectedConnectionId: f,
|
|
440
445
|
setSelectedDatabaseName: g,
|
|
441
|
-
setSelectedSchemaName:
|
|
442
|
-
setSelectedTableName:
|
|
443
|
-
setSelectedDatamodelId:
|
|
444
|
-
setInlineFilterValuesMap:
|
|
445
|
-
setApplyFilters:
|
|
446
|
+
setSelectedSchemaName: x,
|
|
447
|
+
setSelectedTableName: N,
|
|
448
|
+
setSelectedDatamodelId: S,
|
|
449
|
+
setInlineFilterValuesMap: P,
|
|
450
|
+
setApplyFilters: U,
|
|
446
451
|
setIsDashboardEditing: O,
|
|
447
452
|
setIsVisualEditing: b,
|
|
448
|
-
dashboard:
|
|
453
|
+
dashboard: k,
|
|
449
454
|
selectedSheetId: C,
|
|
450
|
-
selectedFrameId:
|
|
455
|
+
selectedFrameId: A,
|
|
451
456
|
inlineFilterValuesMap: j
|
|
452
457
|
}))
|
|
453
458
|
throw new Error("Failed to setup editor with visual data");
|
|
454
459
|
return { success: !0, fromCache: Y };
|
|
455
|
-
} catch (
|
|
456
|
-
return console.error("Error editing visual:",
|
|
460
|
+
} catch (te) {
|
|
461
|
+
return console.error("Error editing visual:", te), { success: !1, error: "Failed to load visual for editing" };
|
|
457
462
|
}
|
|
458
463
|
},
|
|
459
464
|
[
|
|
460
|
-
|
|
465
|
+
t == null ? void 0 : t.accessToken,
|
|
461
466
|
a.apiServiceUrl,
|
|
462
467
|
o,
|
|
463
468
|
r,
|
|
@@ -472,51 +477,51 @@ function ye() {
|
|
|
472
477
|
p,
|
|
473
478
|
f,
|
|
474
479
|
g,
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
480
|
+
x,
|
|
481
|
+
N,
|
|
482
|
+
S,
|
|
483
|
+
P,
|
|
478
484
|
U,
|
|
479
|
-
M,
|
|
480
|
-
A,
|
|
481
485
|
F,
|
|
482
|
-
|
|
486
|
+
I,
|
|
487
|
+
k,
|
|
483
488
|
C,
|
|
484
|
-
|
|
489
|
+
A,
|
|
485
490
|
j
|
|
486
491
|
]
|
|
487
|
-
),
|
|
488
|
-
async (
|
|
492
|
+
), G = X(
|
|
493
|
+
async (V) => {
|
|
489
494
|
var Y;
|
|
490
|
-
const
|
|
495
|
+
const te = (H) => (E.error(H), { success: !1, error: H });
|
|
491
496
|
try {
|
|
492
|
-
if (r(
|
|
493
|
-
return
|
|
494
|
-
const { data: H, fromCache: he } = await
|
|
497
|
+
if (r(V), !C)
|
|
498
|
+
return te("No sheet selected. Please select a sheet first.");
|
|
499
|
+
const { data: H, fromCache: he } = await Bt(
|
|
495
500
|
a.apiServiceUrl,
|
|
496
|
-
(
|
|
497
|
-
|
|
501
|
+
(t == null ? void 0 : t.accessToken) || "",
|
|
502
|
+
V.id,
|
|
498
503
|
o,
|
|
499
504
|
"Adding visual to dashboard..."
|
|
500
505
|
), ge = (H == null ? void 0 : H.frameObject) ?? ((Y = H == null ? void 0 : H.visual) == null ? void 0 : Y.frameObject);
|
|
501
506
|
if (!ge)
|
|
502
|
-
return
|
|
503
|
-
const Q =
|
|
507
|
+
return te("Visual has no frame data");
|
|
508
|
+
const Q = Jt(ge);
|
|
504
509
|
if (!(Q != null && Q.cards) || Q.cards.length === 0)
|
|
505
|
-
return
|
|
510
|
+
return te("Visual frame is malformed");
|
|
506
511
|
const _ = {
|
|
507
|
-
...
|
|
508
|
-
visualId:
|
|
512
|
+
...ia(Q),
|
|
513
|
+
visualId: V.id
|
|
509
514
|
// Link this frame to the library visual
|
|
510
515
|
};
|
|
511
516
|
return await n(C, _), O(!0), { success: !0, fromCache: he };
|
|
512
517
|
} catch (H) {
|
|
513
|
-
return console.error("Error adding visual:", H),
|
|
518
|
+
return console.error("Error adding visual:", H), te(
|
|
514
519
|
H instanceof Error ? H.message : "Failed to add visual to dashboard"
|
|
515
520
|
);
|
|
516
521
|
}
|
|
517
522
|
},
|
|
518
523
|
[
|
|
519
|
-
|
|
524
|
+
t == null ? void 0 : t.accessToken,
|
|
520
525
|
a.apiServiceUrl,
|
|
521
526
|
o,
|
|
522
527
|
r,
|
|
@@ -526,189 +531,189 @@ function ye() {
|
|
|
526
531
|
]
|
|
527
532
|
);
|
|
528
533
|
return {
|
|
529
|
-
visual:
|
|
530
|
-
isLoading:
|
|
531
|
-
isError:
|
|
532
|
-
error:
|
|
533
|
-
handleEditLibraryVisual:
|
|
534
|
-
handleAddLibraryVisual:
|
|
535
|
-
getUpdatedFrame:
|
|
536
|
-
refetch:
|
|
534
|
+
visual: L.data,
|
|
535
|
+
isLoading: L.isLoading,
|
|
536
|
+
isError: L.isError,
|
|
537
|
+
error: L.error,
|
|
538
|
+
handleEditLibraryVisual: z,
|
|
539
|
+
handleAddLibraryVisual: G,
|
|
540
|
+
getUpdatedFrame: Kr().getUpdatedFrame,
|
|
541
|
+
refetch: L.refetch
|
|
537
542
|
};
|
|
538
543
|
}
|
|
539
|
-
function
|
|
540
|
-
return
|
|
544
|
+
function Zt(t) {
|
|
545
|
+
return t ? new Date(t).toLocaleDateString("en-US", {
|
|
541
546
|
month: "short",
|
|
542
547
|
day: "numeric",
|
|
543
548
|
year: "numeric"
|
|
544
549
|
}) : "Unknown";
|
|
545
550
|
}
|
|
546
|
-
function
|
|
551
|
+
function ea(t, a) {
|
|
547
552
|
var n;
|
|
548
|
-
const o = (n =
|
|
553
|
+
const o = (n = t.ownership.createdBy) == null ? void 0 : n.type;
|
|
549
554
|
return o === "tenant" || o === "organization" && a;
|
|
550
555
|
}
|
|
551
|
-
function St(
|
|
556
|
+
function St(t, a) {
|
|
552
557
|
var o, n;
|
|
553
|
-
return
|
|
558
|
+
return ea(t, a) ? ((o = t.ownership.createdBy) == null ? void 0 : o.name) || ((n = t.createdByTenantUserRel) == null ? void 0 : n.name) || t.lastModifiedBy || "Unknown" : "Organization";
|
|
554
559
|
}
|
|
555
|
-
function
|
|
556
|
-
return St(
|
|
560
|
+
function Gr(t, a) {
|
|
561
|
+
return St(t, a).split(/\s+/).filter(Boolean).slice(0, 2).map((n) => n.charAt(0).toUpperCase()).join("") || "?";
|
|
557
562
|
}
|
|
558
|
-
function
|
|
559
|
-
const a = (
|
|
560
|
-
return a.includes("table") ?
|
|
563
|
+
function Yr(t) {
|
|
564
|
+
const a = (t || "").toLowerCase();
|
|
565
|
+
return a.includes("table") ? qt : a.includes("pie") || a.includes("donut") ? ba : a.includes("line") ? va : a.includes("bar") ? gr : Ee;
|
|
561
566
|
}
|
|
562
|
-
function
|
|
563
|
-
const a =
|
|
564
|
-
return /* @__PURE__ */
|
|
567
|
+
function Xr({ visual: t }) {
|
|
568
|
+
const a = t.ownership.status === "public" ? "Public" : t.ownership.status === "shared" || t.ownership.sharedCount > 0 ? "Shared" : "Private";
|
|
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 });
|
|
565
570
|
}
|
|
566
571
|
function cs({
|
|
567
|
-
open:
|
|
572
|
+
open: t,
|
|
568
573
|
onOpenChange: a
|
|
569
574
|
}) {
|
|
570
|
-
const o = ot("interactive"), [n, i] =
|
|
575
|
+
const o = ot("interactive"), [n, i] = D(""), [r, d] = D(/* @__PURE__ */ new Set()), [c, l] = D(!1), [u, h] = D(
|
|
571
576
|
null
|
|
572
|
-
), [m, p] =
|
|
577
|
+
), [m, p] = D(
|
|
573
578
|
null
|
|
574
|
-
), [f, g] =
|
|
575
|
-
d(/* @__PURE__ */ new Set()), h(null), p(null), g(!1),
|
|
576
|
-
},
|
|
577
|
-
a(!1),
|
|
578
|
-
}, { selectVisual: O } = lt(), { handleAddLibraryVisual: b, handleEditLibraryVisual:
|
|
579
|
-
resources:
|
|
580
|
-
isLoading:
|
|
579
|
+
), [f, g] = D(!1), [x, N] = D(null), [S, P] = D(null), U = () => {
|
|
580
|
+
d(/* @__PURE__ */ new Set()), h(null), p(null), g(!1), N(null);
|
|
581
|
+
}, F = () => {
|
|
582
|
+
a(!1), U();
|
|
583
|
+
}, { selectVisual: O } = lt(), { handleAddLibraryVisual: b, handleEditLibraryVisual: I } = ye(), { isConsoleMode: C } = ca(), {
|
|
584
|
+
resources: A,
|
|
585
|
+
isLoading: k,
|
|
581
586
|
isError: j,
|
|
582
|
-
createResource:
|
|
583
|
-
updateResource:
|
|
584
|
-
deleteResourceAsync:
|
|
585
|
-
duplicateResource:
|
|
586
|
-
isCreating:
|
|
587
|
+
createResource: L,
|
|
588
|
+
updateResource: z,
|
|
589
|
+
deleteResourceAsync: G,
|
|
590
|
+
duplicateResource: V,
|
|
591
|
+
isCreating: te,
|
|
587
592
|
isDeleting: Y
|
|
588
|
-
} =
|
|
593
|
+
} = ua(
|
|
589
594
|
void 0,
|
|
590
|
-
(
|
|
591
|
-
l(!1),
|
|
595
|
+
(v) => {
|
|
596
|
+
l(!1), v && (O(v), I(v), F());
|
|
592
597
|
}
|
|
593
598
|
), {
|
|
594
599
|
startUpdating: H,
|
|
595
600
|
stopUpdating: he,
|
|
596
601
|
isUpdating: ge
|
|
597
|
-
} =
|
|
598
|
-
const
|
|
599
|
-
return
|
|
602
|
+
} = ha(), Q = A, _ = ee(() => {
|
|
603
|
+
const v = n.trim().toLowerCase();
|
|
604
|
+
return v ? Q.filter(
|
|
600
605
|
(B) => {
|
|
601
|
-
var q,
|
|
602
|
-
return ((q = B.title) == null ? void 0 : q.toLowerCase().includes(
|
|
606
|
+
var q, oe, ce;
|
|
607
|
+
return ((q = B.title) == null ? void 0 : q.toLowerCase().includes(v)) || ((oe = B.description) == null ? void 0 : oe.toLowerCase().includes(v)) || ((ce = B.kind) == null ? void 0 : ce.toLowerCase().includes(v));
|
|
603
608
|
}
|
|
604
609
|
) : Q;
|
|
605
|
-
}, [n, Q]),
|
|
610
|
+
}, [n, Q]), se = ee(
|
|
606
611
|
() => Q.filter(
|
|
607
|
-
(
|
|
612
|
+
(v) => r.has(v.id)
|
|
608
613
|
),
|
|
609
614
|
[r, Q]
|
|
610
|
-
), me =
|
|
611
|
-
(
|
|
612
|
-
), pe =
|
|
613
|
-
(
|
|
615
|
+
), me = se.filter(
|
|
616
|
+
(v) => v.permissions.canDelete
|
|
617
|
+
), pe = se.filter(
|
|
618
|
+
(v) => v.permissions.canShare
|
|
614
619
|
), Ce = _.length > 0 && _.every(
|
|
615
|
-
(
|
|
616
|
-
),
|
|
617
|
-
(
|
|
618
|
-
),
|
|
620
|
+
(v) => r.has(v.id)
|
|
621
|
+
), Pe = _.some(
|
|
622
|
+
(v) => r.has(v.id)
|
|
623
|
+
), Xe = (v) => {
|
|
619
624
|
const B = new Set(r);
|
|
620
|
-
|
|
621
|
-
}, $ = (
|
|
622
|
-
|
|
623
|
-
B.has(
|
|
625
|
+
v(B), d(B);
|
|
626
|
+
}, $ = (v) => {
|
|
627
|
+
Xe((B) => {
|
|
628
|
+
B.has(v) ? B.delete(v) : B.add(v);
|
|
624
629
|
});
|
|
625
630
|
}, W = () => {
|
|
626
|
-
d((
|
|
627
|
-
const B = new Set(
|
|
631
|
+
d((v) => {
|
|
632
|
+
const B = new Set(v);
|
|
628
633
|
return Ce ? _.forEach(
|
|
629
634
|
(q) => B.delete(q.id)
|
|
630
635
|
) : _.forEach(
|
|
631
636
|
(q) => B.add(q.id)
|
|
632
637
|
), B;
|
|
633
638
|
});
|
|
634
|
-
},
|
|
635
|
-
(await b(
|
|
639
|
+
}, re = async (v) => {
|
|
640
|
+
(await b(v)).success && F();
|
|
636
641
|
}, we = async () => {
|
|
637
|
-
const
|
|
638
|
-
if (
|
|
642
|
+
const v = se;
|
|
643
|
+
if (v.length === 0) return;
|
|
639
644
|
let B = !1;
|
|
640
|
-
for (const q of
|
|
645
|
+
for (const q of v)
|
|
641
646
|
if (!(await b(q)).success) {
|
|
642
647
|
B = !0;
|
|
643
648
|
break;
|
|
644
649
|
}
|
|
645
|
-
B ||
|
|
646
|
-
}, Je = (
|
|
647
|
-
|
|
648
|
-
}, be = (
|
|
649
|
-
|
|
650
|
-
onSettled: () =>
|
|
650
|
+
B || F();
|
|
651
|
+
}, Je = (v) => {
|
|
652
|
+
I(v), F();
|
|
653
|
+
}, be = (v) => {
|
|
654
|
+
P(v), V(v, {
|
|
655
|
+
onSettled: () => P(null)
|
|
651
656
|
});
|
|
652
657
|
}, Ue = () => {
|
|
653
658
|
if (me.length === 0) {
|
|
654
659
|
E.error("Select a visual you can delete");
|
|
655
660
|
return;
|
|
656
661
|
}
|
|
657
|
-
|
|
662
|
+
N(null), g(!0);
|
|
658
663
|
}, Ze = async () => {
|
|
659
|
-
const
|
|
664
|
+
const v = x ? [x] : me;
|
|
660
665
|
try {
|
|
661
|
-
for (const B of
|
|
662
|
-
await
|
|
666
|
+
for (const B of v)
|
|
667
|
+
await G(B.id);
|
|
663
668
|
d((B) => {
|
|
664
669
|
const q = new Set(B);
|
|
665
|
-
return
|
|
666
|
-
(
|
|
670
|
+
return v.forEach(
|
|
671
|
+
(oe) => q.delete(oe.id)
|
|
667
672
|
), q;
|
|
668
|
-
}), g(!1),
|
|
673
|
+
}), g(!1), N(null);
|
|
669
674
|
} catch {
|
|
670
675
|
}
|
|
671
676
|
}, Ne = () => {
|
|
672
|
-
if (
|
|
677
|
+
if (se.length !== 1) {
|
|
673
678
|
E.error("Select one visual to share");
|
|
674
679
|
return;
|
|
675
680
|
}
|
|
676
|
-
const [
|
|
677
|
-
if (!
|
|
681
|
+
const [v] = se;
|
|
682
|
+
if (!v.permissions.canShare) {
|
|
678
683
|
E.error("You do not have permission to share this visual");
|
|
679
684
|
return;
|
|
680
685
|
}
|
|
681
|
-
h(
|
|
686
|
+
h(v);
|
|
682
687
|
}, Se = ({
|
|
683
|
-
title:
|
|
688
|
+
title: v,
|
|
684
689
|
description: B
|
|
685
690
|
}) => {
|
|
686
691
|
if (!m) return;
|
|
687
692
|
const q = {};
|
|
688
|
-
if (
|
|
693
|
+
if (v !== m.title && (q.title = v), (m.description || "") !== B && (q.description = B), Object.keys(q).length === 0) {
|
|
689
694
|
p(null);
|
|
690
695
|
return;
|
|
691
696
|
}
|
|
692
|
-
const
|
|
693
|
-
H(m.id,
|
|
697
|
+
const oe = Object.keys(q), ce = oe.length === 1 ? oe[0] : void 0;
|
|
698
|
+
H(m.id, ce), z(
|
|
694
699
|
{
|
|
695
700
|
resourceId: m.id,
|
|
696
701
|
data: q
|
|
697
702
|
},
|
|
698
703
|
{
|
|
699
704
|
onSuccess: () => {
|
|
700
|
-
he(m.id,
|
|
705
|
+
he(m.id, ce), p(null);
|
|
701
706
|
},
|
|
702
707
|
onError: () => {
|
|
703
|
-
he(m.id,
|
|
708
|
+
he(m.id, ce);
|
|
704
709
|
}
|
|
705
710
|
}
|
|
706
711
|
);
|
|
707
|
-
},
|
|
708
|
-
a(
|
|
709
|
-
}, ke =
|
|
710
|
-
return /* @__PURE__ */ s(
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
+
}, ne = (v) => {
|
|
713
|
+
a(v), v || U();
|
|
714
|
+
}, ke = x ? 1 : me.length;
|
|
715
|
+
return /* @__PURE__ */ s(R, { children: [
|
|
716
|
+
/* @__PURE__ */ e(Ie, { open: t, onOpenChange: ne, children: /* @__PURE__ */ s(
|
|
712
717
|
Te,
|
|
713
718
|
{
|
|
714
719
|
showCloseButton: !1,
|
|
@@ -717,19 +722,19 @@ function cs({
|
|
|
717
722
|
children: [
|
|
718
723
|
/* @__PURE__ */ s("div", { className: "flex h-10 shrink-0 items-center justify-between gap-2 border-b border-border/60 px-3", children: [
|
|
719
724
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
720
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ e(qt, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
721
726
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
722
|
-
/* @__PURE__ */
|
|
723
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ e(Le, { className: "truncate text-[13px] font-medium leading-none tracking-normal", children: "Visuals library" }),
|
|
728
|
+
/* @__PURE__ */ e("span", { className: "shrink-0 text-[10px] font-medium uppercase leading-none tracking-[0.08em] text-muted-foreground", children: "Add to dashboard" })
|
|
724
729
|
] })
|
|
725
730
|
] }),
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
|
|
731
|
+
/* @__PURE__ */ e(
|
|
732
|
+
T,
|
|
728
733
|
{
|
|
729
734
|
size: "xs",
|
|
730
735
|
variant: "ghost",
|
|
731
736
|
className: "w-7 px-0 text-muted-foreground hover:text-foreground",
|
|
732
|
-
onClick: () =>
|
|
737
|
+
onClick: () => ne(!1),
|
|
733
738
|
"aria-label": "Close visuals library",
|
|
734
739
|
children: "×"
|
|
735
740
|
}
|
|
@@ -737,13 +742,13 @@ function cs({
|
|
|
737
742
|
] }),
|
|
738
743
|
/* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2 border-b border-border/60 px-3 py-2", children: [
|
|
739
744
|
/* @__PURE__ */ s("div", { className: "relative min-w-[12rem] flex-1 md:max-w-md", children: [
|
|
740
|
-
/* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ e(ma, { className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
746
|
+
/* @__PURE__ */ e(
|
|
742
747
|
"input",
|
|
743
748
|
{
|
|
744
749
|
autoFocus: !0,
|
|
745
750
|
value: n,
|
|
746
|
-
onChange: (
|
|
751
|
+
onChange: (v) => i(v.target.value),
|
|
747
752
|
placeholder: "Search visuals...",
|
|
748
753
|
className: "h-7 w-full rounded-control border border-input bg-background pl-7 pr-2 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-ring focus:outline-none",
|
|
749
754
|
"aria-label": "Search visuals"
|
|
@@ -751,54 +756,54 @@ function cs({
|
|
|
751
756
|
)
|
|
752
757
|
] }),
|
|
753
758
|
/* @__PURE__ */ s(
|
|
754
|
-
|
|
759
|
+
T,
|
|
755
760
|
{
|
|
756
761
|
size: "xs",
|
|
757
762
|
variant: "outline",
|
|
758
763
|
className: "ml-auto",
|
|
759
764
|
onClick: () => l(!0),
|
|
760
765
|
children: [
|
|
761
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ e(xe, { className: "h-3.5 w-3.5" }),
|
|
762
767
|
"New library visual"
|
|
763
768
|
]
|
|
764
769
|
}
|
|
765
770
|
)
|
|
766
771
|
] }),
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
/* @__PURE__ */
|
|
769
|
-
/* @__PURE__ */
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
] }) : /* @__PURE__ */
|
|
772
|
-
|
|
772
|
+
/* @__PURE__ */ e("div", { className: "min-h-0 flex-1 overflow-auto", children: k ? /* @__PURE__ */ e("div", { className: "p-3", children: /* @__PURE__ */ e($r, {}) }) : j ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: /* @__PURE__ */ e("p", { className: "text-[13px] text-destructive", children: "Failed to load visuals" }) }) : _.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-2 px-4 py-12 text-center", children: [
|
|
773
|
+
/* @__PURE__ */ e(Ee, { className: "h-5 w-5 text-muted-foreground/60" }),
|
|
774
|
+
/* @__PURE__ */ e("p", { className: "text-[13px] font-medium", children: n ? "No visuals found" : "No visuals yet" }),
|
|
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
|
+
] }) : /* @__PURE__ */ e(
|
|
777
|
+
Jr,
|
|
773
778
|
{
|
|
774
779
|
visuals: _,
|
|
775
780
|
selectedIds: r,
|
|
776
781
|
allFilteredSelected: Ce,
|
|
777
|
-
someFilteredSelected:
|
|
782
|
+
someFilteredSelected: Pe,
|
|
778
783
|
onSelectAll: W,
|
|
779
784
|
onToggleSelection: $,
|
|
780
|
-
onAddVisual:
|
|
785
|
+
onAddVisual: re,
|
|
781
786
|
onOpenVisual: Je,
|
|
782
787
|
onEditDetails: p,
|
|
783
788
|
onShareVisual: h,
|
|
784
|
-
onDeleteVisual: (
|
|
785
|
-
|
|
789
|
+
onDeleteVisual: (v) => {
|
|
790
|
+
N(v), g(!0);
|
|
786
791
|
},
|
|
787
792
|
onDuplicateVisual: be,
|
|
788
|
-
duplicatingId:
|
|
793
|
+
duplicatingId: S,
|
|
789
794
|
isDeleting: Y,
|
|
790
795
|
isConsoleMode: C
|
|
791
796
|
}
|
|
792
797
|
) }),
|
|
793
798
|
/* @__PURE__ */ s("div", { className: "flex shrink-0 items-center justify-between gap-2 border-t border-border/60 px-3 py-2", children: [
|
|
794
|
-
/* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 items-center gap-1.5", children: r.size > 0 && /* @__PURE__ */ s(R, { children: [
|
|
795
800
|
/* @__PURE__ */ s("span", { className: "text-[12px] text-muted-foreground", children: [
|
|
796
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ e("span", { className: "font-medium tabular-nums text-foreground", children: r.size }),
|
|
797
802
|
" ",
|
|
798
803
|
"selected"
|
|
799
804
|
] }),
|
|
800
|
-
/* @__PURE__ */
|
|
801
|
-
|
|
805
|
+
/* @__PURE__ */ e(
|
|
806
|
+
T,
|
|
802
807
|
{
|
|
803
808
|
size: "xs",
|
|
804
809
|
variant: "ghost",
|
|
@@ -807,20 +812,20 @@ function cs({
|
|
|
807
812
|
}
|
|
808
813
|
),
|
|
809
814
|
/* @__PURE__ */ s(
|
|
810
|
-
|
|
815
|
+
T,
|
|
811
816
|
{
|
|
812
817
|
size: "xs",
|
|
813
818
|
variant: "outline",
|
|
814
819
|
onClick: Ne,
|
|
815
|
-
disabled:
|
|
820
|
+
disabled: se.length !== 1 || pe.length !== 1,
|
|
816
821
|
children: [
|
|
817
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ e(Ot, { className: "h-3.5 w-3.5" }),
|
|
818
823
|
"Share"
|
|
819
824
|
]
|
|
820
825
|
}
|
|
821
826
|
),
|
|
822
827
|
/* @__PURE__ */ s(
|
|
823
|
-
|
|
828
|
+
T,
|
|
824
829
|
{
|
|
825
830
|
size: "xs",
|
|
826
831
|
variant: "outline",
|
|
@@ -828,7 +833,7 @@ function cs({
|
|
|
828
833
|
onClick: Ue,
|
|
829
834
|
disabled: me.length === 0,
|
|
830
835
|
children: [
|
|
831
|
-
/* @__PURE__ */
|
|
836
|
+
/* @__PURE__ */ e($e, { className: "h-3.5 w-3.5" }),
|
|
832
837
|
"Delete ",
|
|
833
838
|
me.length || r.size
|
|
834
839
|
]
|
|
@@ -836,23 +841,23 @@ function cs({
|
|
|
836
841
|
)
|
|
837
842
|
] }) }),
|
|
838
843
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
839
|
-
/* @__PURE__ */
|
|
840
|
-
|
|
844
|
+
/* @__PURE__ */ e(
|
|
845
|
+
T,
|
|
841
846
|
{
|
|
842
847
|
size: "xs",
|
|
843
848
|
variant: "outline",
|
|
844
|
-
onClick: () =>
|
|
849
|
+
onClick: () => ne(!1),
|
|
845
850
|
children: "Close"
|
|
846
851
|
}
|
|
847
852
|
),
|
|
848
853
|
/* @__PURE__ */ s(
|
|
849
|
-
|
|
854
|
+
T,
|
|
850
855
|
{
|
|
851
856
|
size: "xs",
|
|
852
857
|
onClick: we,
|
|
853
858
|
disabled: r.size === 0,
|
|
854
859
|
children: [
|
|
855
|
-
/* @__PURE__ */
|
|
860
|
+
/* @__PURE__ */ e(Ct, { className: "h-3.5 w-3.5" }),
|
|
856
861
|
r.size === 0 ? "Add to dashboard" : `Add ${r.size} visual${r.size === 1 ? "" : "s"}`
|
|
857
862
|
]
|
|
858
863
|
}
|
|
@@ -862,25 +867,25 @@ function cs({
|
|
|
862
867
|
]
|
|
863
868
|
}
|
|
864
869
|
) }),
|
|
865
|
-
/* @__PURE__ */
|
|
866
|
-
|
|
870
|
+
/* @__PURE__ */ e(
|
|
871
|
+
Wr,
|
|
867
872
|
{
|
|
868
873
|
open: c,
|
|
869
874
|
onOpenChange: l,
|
|
870
|
-
onSubmit:
|
|
871
|
-
isCreating:
|
|
875
|
+
onSubmit: L,
|
|
876
|
+
isCreating: te
|
|
872
877
|
}
|
|
873
878
|
),
|
|
874
|
-
u && /* @__PURE__ */
|
|
875
|
-
|
|
879
|
+
u && /* @__PURE__ */ e(
|
|
880
|
+
pa,
|
|
876
881
|
{
|
|
877
882
|
resource: u,
|
|
878
|
-
resourceType:
|
|
883
|
+
resourceType: fa.VISUAL,
|
|
879
884
|
onClose: () => h(null)
|
|
880
885
|
}
|
|
881
886
|
),
|
|
882
|
-
m && /* @__PURE__ */
|
|
883
|
-
|
|
887
|
+
m && /* @__PURE__ */ e(
|
|
888
|
+
ga,
|
|
884
889
|
{
|
|
885
890
|
open: !!m,
|
|
886
891
|
resourceLabel: "Visual",
|
|
@@ -891,12 +896,12 @@ function cs({
|
|
|
891
896
|
isSaving: ge(m.id)
|
|
892
897
|
}
|
|
893
898
|
),
|
|
894
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ e(
|
|
895
900
|
dt,
|
|
896
901
|
{
|
|
897
902
|
open: f,
|
|
898
|
-
onOpenChange: (
|
|
899
|
-
!
|
|
903
|
+
onOpenChange: (v) => {
|
|
904
|
+
!v && Y || (g(v), v || N(null));
|
|
900
905
|
},
|
|
901
906
|
children: /* @__PURE__ */ s(ct, { children: [
|
|
902
907
|
/* @__PURE__ */ s(ut, { children: [
|
|
@@ -907,19 +912,19 @@ function cs({
|
|
|
907
912
|
ke === 1 ? "" : "s",
|
|
908
913
|
"?"
|
|
909
914
|
] }),
|
|
910
|
-
/* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ e(mt, { children: "This cannot be undone. Visuals already added to dashboards may need to be removed from those dashboards separately." })
|
|
911
916
|
] }),
|
|
912
917
|
/* @__PURE__ */ s(pt, { children: [
|
|
913
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ e(ft, { disabled: Y, children: "Cancel" }),
|
|
914
919
|
/* @__PURE__ */ s(
|
|
915
|
-
|
|
920
|
+
Rt,
|
|
916
921
|
{
|
|
917
|
-
onClick: (
|
|
918
|
-
|
|
922
|
+
onClick: (v) => {
|
|
923
|
+
v.preventDefault(), Ze();
|
|
919
924
|
},
|
|
920
925
|
disabled: Y || ke === 0,
|
|
921
926
|
children: [
|
|
922
|
-
Y ? /* @__PURE__ */
|
|
927
|
+
Y ? /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5" }),
|
|
923
928
|
Y ? "Deleting..." : "Delete"
|
|
924
929
|
]
|
|
925
930
|
}
|
|
@@ -930,8 +935,8 @@ function cs({
|
|
|
930
935
|
)
|
|
931
936
|
] });
|
|
932
937
|
}
|
|
933
|
-
function
|
|
934
|
-
visuals:
|
|
938
|
+
function Jr({
|
|
939
|
+
visuals: t,
|
|
935
940
|
selectedIds: a,
|
|
936
941
|
allFilteredSelected: o,
|
|
937
942
|
someFilteredSelected: n,
|
|
@@ -949,7 +954,7 @@ function Xr({
|
|
|
949
954
|
}) {
|
|
950
955
|
return /* @__PURE__ */ s("div", { className: "min-w-[48rem]", children: [
|
|
951
956
|
/* @__PURE__ */ s("div", { className: "grid h-9 grid-cols-[2.5rem_minmax(14rem,1.8fr)_minmax(10rem,1fr)_8rem_7rem_5rem_5.5rem] items-center border-b border-border/60 px-3 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: [
|
|
952
|
-
/* @__PURE__ */
|
|
957
|
+
/* @__PURE__ */ e(
|
|
953
958
|
gt,
|
|
954
959
|
{
|
|
955
960
|
checked: o ? !0 : n ? "indeterminate" : !1,
|
|
@@ -957,18 +962,18 @@ function Xr({
|
|
|
957
962
|
"aria-label": "Select all visuals"
|
|
958
963
|
}
|
|
959
964
|
),
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
/* @__PURE__ */
|
|
963
|
-
/* @__PURE__ */
|
|
964
|
-
/* @__PURE__ */
|
|
965
|
-
/* @__PURE__ */
|
|
965
|
+
/* @__PURE__ */ e("span", { children: "Name" }),
|
|
966
|
+
/* @__PURE__ */ e("span", { children: "Created by" }),
|
|
967
|
+
/* @__PURE__ */ e("span", { children: "Updated" }),
|
|
968
|
+
/* @__PURE__ */ e("span", { children: "Visibility" }),
|
|
969
|
+
/* @__PURE__ */ e("span", { className: "text-right", children: "Shared" }),
|
|
970
|
+
/* @__PURE__ */ e("span", { className: "text-right", children: "Actions" })
|
|
966
971
|
] }),
|
|
967
|
-
|
|
968
|
-
|
|
972
|
+
t.map((x) => /* @__PURE__ */ e(
|
|
973
|
+
Zr,
|
|
969
974
|
{
|
|
970
|
-
visual:
|
|
971
|
-
selected: a.has(
|
|
975
|
+
visual: x,
|
|
976
|
+
selected: a.has(x.id),
|
|
972
977
|
onToggleSelection: r,
|
|
973
978
|
onAddVisual: d,
|
|
974
979
|
onOpenVisual: c,
|
|
@@ -980,12 +985,12 @@ function Xr({
|
|
|
980
985
|
isDeleting: f,
|
|
981
986
|
isConsoleMode: g
|
|
982
987
|
},
|
|
983
|
-
|
|
988
|
+
x.id
|
|
984
989
|
))
|
|
985
990
|
] });
|
|
986
991
|
}
|
|
987
|
-
function
|
|
988
|
-
visual:
|
|
992
|
+
function Zr({
|
|
993
|
+
visual: t,
|
|
989
994
|
selected: a,
|
|
990
995
|
onToggleSelection: o,
|
|
991
996
|
onAddVisual: n,
|
|
@@ -999,23 +1004,23 @@ function Yr({
|
|
|
999
1004
|
isConsoleMode: m
|
|
1000
1005
|
}) {
|
|
1001
1006
|
var g;
|
|
1002
|
-
const p =
|
|
1003
|
-
n(
|
|
1007
|
+
const p = Yr(t.kind), f = () => {
|
|
1008
|
+
n(t);
|
|
1004
1009
|
};
|
|
1005
1010
|
return /* @__PURE__ */ s(
|
|
1006
1011
|
"div",
|
|
1007
1012
|
{
|
|
1008
|
-
className:
|
|
1013
|
+
className: J(
|
|
1009
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",
|
|
1010
1015
|
a && "bg-muted/70"
|
|
1011
1016
|
),
|
|
1012
1017
|
children: [
|
|
1013
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
1014
1019
|
gt,
|
|
1015
1020
|
{
|
|
1016
1021
|
checked: a,
|
|
1017
|
-
onCheckedChange: () => o(
|
|
1018
|
-
"aria-label": `Select ${
|
|
1022
|
+
onCheckedChange: () => o(t.id),
|
|
1023
|
+
"aria-label": `Select ${t.title || "visual"}`
|
|
1019
1024
|
}
|
|
1020
1025
|
) }),
|
|
1021
1026
|
/* @__PURE__ */ s(
|
|
@@ -1024,24 +1029,24 @@ function Yr({
|
|
|
1024
1029
|
type: "button",
|
|
1025
1030
|
className: "flex min-w-0 items-center gap-2 rounded-[4px] text-left outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1026
1031
|
onClick: f,
|
|
1027
|
-
"aria-label": `Add ${
|
|
1032
|
+
"aria-label": `Add ${t.title || "visual"} to dashboard`,
|
|
1028
1033
|
children: [
|
|
1029
|
-
/* @__PURE__ */
|
|
1034
|
+
/* @__PURE__ */ e(p, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
1030
1035
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
1031
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ e(
|
|
1032
1037
|
"div",
|
|
1033
1038
|
{
|
|
1034
1039
|
className: "truncate font-medium text-foreground",
|
|
1035
|
-
title:
|
|
1036
|
-
children:
|
|
1040
|
+
title: t.title || "Untitled Visual",
|
|
1041
|
+
children: t.title || "Untitled Visual"
|
|
1037
1042
|
}
|
|
1038
1043
|
),
|
|
1039
|
-
((g =
|
|
1044
|
+
((g = t.description) == null ? void 0 : g.trim()) && /* @__PURE__ */ e(
|
|
1040
1045
|
"div",
|
|
1041
1046
|
{
|
|
1042
1047
|
className: "truncate text-[11px] text-muted-foreground",
|
|
1043
|
-
title:
|
|
1044
|
-
children:
|
|
1048
|
+
title: t.description,
|
|
1049
|
+
children: t.description
|
|
1045
1050
|
}
|
|
1046
1051
|
)
|
|
1047
1052
|
] })
|
|
@@ -1049,16 +1054,16 @@ function Yr({
|
|
|
1049
1054
|
}
|
|
1050
1055
|
),
|
|
1051
1056
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
/* @__PURE__ */
|
|
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
|
+
/* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: St(t, m) })
|
|
1054
1059
|
] }),
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
|
|
1060
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: Zt(t.updatedAt) }),
|
|
1061
|
+
/* @__PURE__ */ e(Xr, { visual: t }),
|
|
1062
|
+
/* @__PURE__ */ e("span", { className: "text-right tabular-nums text-muted-foreground", children: t.ownership.sharedCount > 0 ? t.ownership.sharedCount : "—" }),
|
|
1063
|
+
/* @__PURE__ */ e(
|
|
1064
|
+
en,
|
|
1060
1065
|
{
|
|
1061
|
-
visual:
|
|
1066
|
+
visual: t,
|
|
1062
1067
|
onOpenVisual: i,
|
|
1063
1068
|
onEditDetails: r,
|
|
1064
1069
|
onShareVisual: d,
|
|
@@ -1073,8 +1078,8 @@ function Yr({
|
|
|
1073
1078
|
}
|
|
1074
1079
|
);
|
|
1075
1080
|
}
|
|
1076
|
-
function
|
|
1077
|
-
visual:
|
|
1081
|
+
function en({
|
|
1082
|
+
visual: t,
|
|
1078
1083
|
onOpenVisual: a,
|
|
1079
1084
|
onEditDetails: o,
|
|
1080
1085
|
onShareVisual: n,
|
|
@@ -1090,81 +1095,81 @@ function Jr({
|
|
|
1090
1095
|
className: "flex items-center justify-end gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",
|
|
1091
1096
|
onClick: (u) => u.stopPropagation(),
|
|
1092
1097
|
children: [
|
|
1093
|
-
/* @__PURE__ */
|
|
1094
|
-
|
|
1098
|
+
/* @__PURE__ */ e(
|
|
1099
|
+
T,
|
|
1095
1100
|
{
|
|
1096
1101
|
size: "xs",
|
|
1097
1102
|
variant: "ghost",
|
|
1098
1103
|
className: "w-7 px-0",
|
|
1099
|
-
onClick: () => a(
|
|
1104
|
+
onClick: () => a(t),
|
|
1100
1105
|
"aria-label": "Edit visual",
|
|
1101
|
-
children: /* @__PURE__ */
|
|
1106
|
+
children: /* @__PURE__ */ e(et, { className: "h-3.5 w-3.5" })
|
|
1102
1107
|
}
|
|
1103
1108
|
),
|
|
1104
1109
|
/* @__PURE__ */ s(Ve, { modal: !1, children: [
|
|
1105
|
-
/* @__PURE__ */
|
|
1106
|
-
|
|
1110
|
+
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1111
|
+
T,
|
|
1107
1112
|
{
|
|
1108
1113
|
size: "xs",
|
|
1109
1114
|
variant: "ghost",
|
|
1110
1115
|
className: "w-7 px-0",
|
|
1111
1116
|
"aria-label": "More actions",
|
|
1112
|
-
children: /* @__PURE__ */
|
|
1117
|
+
children: /* @__PURE__ */ e(zt, { className: "h-3.5 w-3.5" })
|
|
1113
1118
|
}
|
|
1114
1119
|
) }),
|
|
1115
1120
|
/* @__PURE__ */ s(
|
|
1116
|
-
|
|
1121
|
+
Me,
|
|
1117
1122
|
{
|
|
1118
1123
|
align: "end",
|
|
1119
1124
|
className: "z-[60] w-44 rounded-[6px] border-border/60 p-1 shadow-sm",
|
|
1120
1125
|
children: [
|
|
1121
|
-
/* @__PURE__ */ s(
|
|
1122
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ s(K, { onClick: () => a(t), children: [
|
|
1127
|
+
/* @__PURE__ */ e(et, { className: "h-3.5 w-3.5" }),
|
|
1123
1128
|
"Edit visual"
|
|
1124
1129
|
] }),
|
|
1125
1130
|
/* @__PURE__ */ s(
|
|
1126
|
-
|
|
1131
|
+
K,
|
|
1127
1132
|
{
|
|
1128
|
-
onClick: () => r(
|
|
1129
|
-
disabled: d ===
|
|
1133
|
+
onClick: () => r(t.id),
|
|
1134
|
+
disabled: d === t.id,
|
|
1130
1135
|
children: [
|
|
1131
|
-
d ===
|
|
1132
|
-
d ===
|
|
1136
|
+
d === t.id ? /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(xa, { className: "h-3.5 w-3.5" }),
|
|
1137
|
+
d === t.id ? "Duplicating..." : "Duplicate"
|
|
1133
1138
|
]
|
|
1134
1139
|
}
|
|
1135
1140
|
),
|
|
1136
|
-
|
|
1137
|
-
/* @__PURE__ */
|
|
1141
|
+
t.permissions.canEdit && /* @__PURE__ */ s(K, { onClick: () => o(t), children: [
|
|
1142
|
+
/* @__PURE__ */ e(et, { className: "h-3.5 w-3.5" }),
|
|
1138
1143
|
"Edit details"
|
|
1139
1144
|
] }),
|
|
1140
|
-
|
|
1141
|
-
/* @__PURE__ */
|
|
1145
|
+
t.permissions.canShare && /* @__PURE__ */ s(K, { onClick: () => n(t), children: [
|
|
1146
|
+
/* @__PURE__ */ e(Ot, { className: "h-3.5 w-3.5" }),
|
|
1142
1147
|
"Share"
|
|
1143
1148
|
] }),
|
|
1144
|
-
|
|
1145
|
-
/* @__PURE__ */
|
|
1149
|
+
t.permissions.canDelete && /* @__PURE__ */ s(R, { children: [
|
|
1150
|
+
/* @__PURE__ */ e(We, {}),
|
|
1146
1151
|
/* @__PURE__ */ s(
|
|
1147
|
-
|
|
1152
|
+
K,
|
|
1148
1153
|
{
|
|
1149
1154
|
className: "text-destructive focus:bg-destructive/10 focus:text-destructive",
|
|
1150
|
-
onClick: () => i(
|
|
1155
|
+
onClick: () => i(t),
|
|
1151
1156
|
disabled: c,
|
|
1152
1157
|
children: [
|
|
1153
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ e($e, { className: "h-3.5 w-3.5" }),
|
|
1154
1159
|
c ? "Deleting..." : "Delete"
|
|
1155
1160
|
]
|
|
1156
1161
|
}
|
|
1157
1162
|
)
|
|
1158
1163
|
] }),
|
|
1159
|
-
/* @__PURE__ */
|
|
1164
|
+
/* @__PURE__ */ e(We, {}),
|
|
1160
1165
|
/* @__PURE__ */ s("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
|
|
1161
|
-
|
|
1162
|
-
/* @__PURE__ */
|
|
1163
|
-
/* @__PURE__ */
|
|
1166
|
+
ea(t, l) && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
1167
|
+
/* @__PURE__ */ e(ya, { className: "h-3 w-3" }),
|
|
1168
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: St(t, l) })
|
|
1164
1169
|
] }),
|
|
1165
1170
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
1166
|
-
/* @__PURE__ */
|
|
1167
|
-
/* @__PURE__ */
|
|
1171
|
+
/* @__PURE__ */ e(Ca, { className: "h-3 w-3" }),
|
|
1172
|
+
/* @__PURE__ */ e("span", { children: Zt(t.updatedAt) })
|
|
1168
1173
|
] })
|
|
1169
1174
|
] })
|
|
1170
1175
|
]
|
|
@@ -1175,26 +1180,26 @@ function Jr({
|
|
|
1175
1180
|
}
|
|
1176
1181
|
);
|
|
1177
1182
|
}
|
|
1178
|
-
function us(
|
|
1183
|
+
function us(t, a, o = !1) {
|
|
1179
1184
|
const n = w((u) => u.dashboard), i = w(
|
|
1180
1185
|
(u) => u.isDashboardEditing
|
|
1181
1186
|
), r = w(
|
|
1182
1187
|
(u) => u.onDashboardLifecycleEvent
|
|
1183
|
-
), d =
|
|
1188
|
+
), d = X(() => {
|
|
1184
1189
|
const u = w.getState().dashboard;
|
|
1185
|
-
return a || !
|
|
1186
|
-
}, [
|
|
1190
|
+
return a || !t || !u || u.id !== t.id ? !1 : _e(u) !== _e(t);
|
|
1191
|
+
}, [t, a]);
|
|
1187
1192
|
Dt(() => (w.setState({ checkUnsavedDashboardChanges: d }), () => {
|
|
1188
1193
|
w.getState().checkUnsavedDashboardChanges === d && w.setState({ checkUnsavedDashboardChanges: null });
|
|
1189
1194
|
}), [d]);
|
|
1190
|
-
const c =
|
|
1195
|
+
const c = ee(() => !o || a || !n || i && (!t || n.id !== t.id) ? null : {
|
|
1191
1196
|
dashboardId: n.id,
|
|
1192
|
-
dirty: i &&
|
|
1197
|
+
dirty: i && t ? _e(n) !== _e(t) : !1
|
|
1193
1198
|
}, [
|
|
1194
1199
|
i,
|
|
1195
1200
|
a,
|
|
1196
1201
|
o,
|
|
1197
|
-
|
|
1202
|
+
t,
|
|
1198
1203
|
n
|
|
1199
1204
|
]), l = nt(null);
|
|
1200
1205
|
return Dt(() => {
|
|
@@ -1214,8 +1219,8 @@ function us(e, a, o = !1) {
|
|
|
1214
1219
|
}));
|
|
1215
1220
|
}, [c, r]), d;
|
|
1216
1221
|
}
|
|
1217
|
-
function
|
|
1218
|
-
open:
|
|
1222
|
+
function tn({
|
|
1223
|
+
open: t,
|
|
1219
1224
|
onOpenChange: a,
|
|
1220
1225
|
isLibraryVisual: o,
|
|
1221
1226
|
currentVisualName: n,
|
|
@@ -1223,14 +1228,14 @@ function Zr({
|
|
|
1223
1228
|
destinationMode: r = "both",
|
|
1224
1229
|
onConfirm: d
|
|
1225
1230
|
}) {
|
|
1226
|
-
const [c, l] =
|
|
1231
|
+
const [c, l] = D(
|
|
1227
1232
|
o && n ? `Copy of ${n}` : n || ""
|
|
1228
|
-
), [u, h] =
|
|
1229
|
-
|
|
1230
|
-
|
|
1233
|
+
), [u, h] = D("");
|
|
1234
|
+
Pt.useEffect(() => {
|
|
1235
|
+
t && (l(
|
|
1231
1236
|
o && n ? `Copy of ${n}` : n || ""
|
|
1232
1237
|
), h(""));
|
|
1233
|
-
}, [
|
|
1238
|
+
}, [t, o, n]);
|
|
1234
1239
|
const m = !!c.trim(), p = r === "local" ? {
|
|
1235
1240
|
saveToLibrary: !1,
|
|
1236
1241
|
saveToCurrentDashboard: !0,
|
|
@@ -1257,12 +1262,12 @@ function Zr({
|
|
|
1257
1262
|
saveToCurrentDashboard: p.saveToCurrentDashboard
|
|
1258
1263
|
});
|
|
1259
1264
|
};
|
|
1260
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: a, children: /* @__PURE__ */ s(Te, { className: "sm:max-w-[500px]", children: [
|
|
1261
1266
|
/* @__PURE__ */ s(bt, { children: [
|
|
1262
1267
|
/* @__PURE__ */ s(Le, { className: "flex items-center gap-2", children: [
|
|
1263
|
-
/* @__PURE__ */
|
|
1264
|
-
p.badgeType !== "local" && /* @__PURE__ */
|
|
1265
|
-
|
|
1268
|
+
/* @__PURE__ */ e("span", { children: "Save Visual As" }),
|
|
1269
|
+
p.badgeType !== "local" && /* @__PURE__ */ e(
|
|
1270
|
+
Fr,
|
|
1266
1271
|
{
|
|
1267
1272
|
type: p.badgeType,
|
|
1268
1273
|
showLabel: !0,
|
|
@@ -1270,12 +1275,12 @@ function Zr({
|
|
|
1270
1275
|
}
|
|
1271
1276
|
)
|
|
1272
1277
|
] }),
|
|
1273
|
-
/* @__PURE__ */
|
|
1278
|
+
/* @__PURE__ */ e(vt, { children: p.description })
|
|
1274
1279
|
] }),
|
|
1275
1280
|
/* @__PURE__ */ s("div", { className: "grid gap-4 py-4", children: [
|
|
1276
1281
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
1277
|
-
/* @__PURE__ */
|
|
1278
|
-
/* @__PURE__ */
|
|
1282
|
+
/* @__PURE__ */ e(De, { htmlFor: "name", children: "Name" }),
|
|
1283
|
+
/* @__PURE__ */ e(
|
|
1279
1284
|
st,
|
|
1280
1285
|
{
|
|
1281
1286
|
id: "name",
|
|
@@ -1287,9 +1292,9 @@ function Zr({
|
|
|
1287
1292
|
)
|
|
1288
1293
|
] }),
|
|
1289
1294
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
1290
|
-
/* @__PURE__ */
|
|
1291
|
-
/* @__PURE__ */
|
|
1292
|
-
|
|
1295
|
+
/* @__PURE__ */ e(De, { htmlFor: "description", children: "Description (optional)" }),
|
|
1296
|
+
/* @__PURE__ */ e(
|
|
1297
|
+
wa,
|
|
1293
1298
|
{
|
|
1294
1299
|
id: "description",
|
|
1295
1300
|
value: u,
|
|
@@ -1301,9 +1306,9 @@ function Zr({
|
|
|
1301
1306
|
)
|
|
1302
1307
|
] })
|
|
1303
1308
|
] }),
|
|
1304
|
-
/* @__PURE__ */ s(
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
|
|
1309
|
+
/* @__PURE__ */ s(Na, { children: [
|
|
1310
|
+
/* @__PURE__ */ e(
|
|
1311
|
+
T,
|
|
1307
1312
|
{
|
|
1308
1313
|
variant: "outline",
|
|
1309
1314
|
onClick: () => a(!1),
|
|
@@ -1311,50 +1316,50 @@ function Zr({
|
|
|
1311
1316
|
children: "Cancel"
|
|
1312
1317
|
}
|
|
1313
1318
|
),
|
|
1314
|
-
/* @__PURE__ */ s(
|
|
1315
|
-
i && /* @__PURE__ */
|
|
1319
|
+
/* @__PURE__ */ s(T, { onClick: f, disabled: !m || i, children: [
|
|
1320
|
+
i && /* @__PURE__ */ e(ae, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
1316
1321
|
p.actionLabel
|
|
1317
1322
|
] })
|
|
1318
1323
|
] })
|
|
1319
1324
|
] }) });
|
|
1320
1325
|
}
|
|
1321
|
-
function kt(
|
|
1326
|
+
function kt(t) {
|
|
1322
1327
|
var a;
|
|
1323
|
-
for (const o of
|
|
1324
|
-
if (o.type === "matrixTable" && !
|
|
1328
|
+
for (const o of t.cards)
|
|
1329
|
+
if (o.type === "matrixTable" && !vr.safeParse((a = o.config) == null ? void 0 : a.matrix).success)
|
|
1325
1330
|
return E.error("Matrix requires at least one row field, one metric, and valid settings."), !1;
|
|
1326
1331
|
return !0;
|
|
1327
1332
|
}
|
|
1328
1333
|
function tt({
|
|
1329
|
-
className:
|
|
1334
|
+
className: t,
|
|
1330
1335
|
variant: a = "outline"
|
|
1331
1336
|
}) {
|
|
1332
|
-
const o =
|
|
1337
|
+
const o = Z((r) => r.onSave), { getUpdatedFrame: n } = ye();
|
|
1333
1338
|
function i() {
|
|
1334
1339
|
const r = n();
|
|
1335
1340
|
kt(r) && (o == null || o(r));
|
|
1336
1341
|
}
|
|
1337
1342
|
return /* @__PURE__ */ s(
|
|
1338
|
-
|
|
1343
|
+
T,
|
|
1339
1344
|
{
|
|
1340
1345
|
onClick: i,
|
|
1341
|
-
className:
|
|
1346
|
+
className: t,
|
|
1342
1347
|
size: "xs",
|
|
1343
1348
|
variant: a,
|
|
1344
1349
|
children: [
|
|
1345
|
-
/* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ e(Ct, { className: "h-3.5 w-3.5" }),
|
|
1346
1351
|
"Done"
|
|
1347
1352
|
]
|
|
1348
1353
|
}
|
|
1349
1354
|
);
|
|
1350
1355
|
}
|
|
1351
|
-
function
|
|
1352
|
-
className:
|
|
1356
|
+
function an({
|
|
1357
|
+
className: t,
|
|
1353
1358
|
variant: a = "default"
|
|
1354
1359
|
}) {
|
|
1355
|
-
const o = Qe(), [n, i] =
|
|
1356
|
-
return /* @__PURE__ */
|
|
1357
|
-
|
|
1360
|
+
const o = Qe(), [n, i] = D(!1), { setIsVisualEditing: r } = de(), { getUpdatedFrame: d } = ye(), c = Ke(), l = Z((m) => m.frame), u = _t();
|
|
1361
|
+
return /* @__PURE__ */ e(
|
|
1362
|
+
T,
|
|
1358
1363
|
{
|
|
1359
1364
|
onClick: () => {
|
|
1360
1365
|
const m = d();
|
|
@@ -1385,25 +1390,25 @@ function en({
|
|
|
1385
1390
|
}
|
|
1386
1391
|
);
|
|
1387
1392
|
},
|
|
1388
|
-
className:
|
|
1393
|
+
className: t,
|
|
1389
1394
|
size: "xs",
|
|
1390
1395
|
variant: a,
|
|
1391
|
-
children: n ? /* @__PURE__ */ s(
|
|
1392
|
-
/* @__PURE__ */
|
|
1396
|
+
children: n ? /* @__PURE__ */ s(R, { children: [
|
|
1397
|
+
/* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
1393
1398
|
"Saving"
|
|
1394
|
-
] }) : /* @__PURE__ */ s(
|
|
1395
|
-
/* @__PURE__ */
|
|
1399
|
+
] }) : /* @__PURE__ */ s(R, { children: [
|
|
1400
|
+
/* @__PURE__ */ e(Qt, { className: "h-3.5 w-3.5" }),
|
|
1396
1401
|
"Save to Library"
|
|
1397
1402
|
] })
|
|
1398
1403
|
}
|
|
1399
1404
|
);
|
|
1400
1405
|
}
|
|
1401
|
-
function
|
|
1402
|
-
className:
|
|
1406
|
+
function rn({
|
|
1407
|
+
className: t
|
|
1403
1408
|
}) {
|
|
1404
|
-
const a = Qe(), [o, n] =
|
|
1405
|
-
return /* @__PURE__ */
|
|
1406
|
-
|
|
1409
|
+
const a = Qe(), [o, n] = D(!1), i = Ke(), r = Z((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
|
+
return /* @__PURE__ */ e(
|
|
1411
|
+
T,
|
|
1407
1412
|
{
|
|
1408
1413
|
onClick: async () => {
|
|
1409
1414
|
if (!d) {
|
|
@@ -1417,52 +1422,52 @@ function tn({
|
|
|
1417
1422
|
}
|
|
1418
1423
|
n(!0);
|
|
1419
1424
|
try {
|
|
1420
|
-
const
|
|
1421
|
-
if (!kt(
|
|
1425
|
+
const x = h();
|
|
1426
|
+
if (!kt(x)) {
|
|
1422
1427
|
n(!1);
|
|
1423
1428
|
return;
|
|
1424
1429
|
}
|
|
1425
|
-
const
|
|
1426
|
-
...
|
|
1430
|
+
const N = {
|
|
1431
|
+
...x,
|
|
1427
1432
|
visualId: g
|
|
1428
1433
|
// Keep the link to library visual
|
|
1429
|
-
},
|
|
1430
|
-
previousFrame:
|
|
1434
|
+
}, S = He(c, N.id), P = await p(N, {
|
|
1435
|
+
previousFrame: S
|
|
1431
1436
|
});
|
|
1432
1437
|
await m.mutateAsync({
|
|
1433
1438
|
visualId: g,
|
|
1434
1439
|
data: {
|
|
1435
|
-
frameObject:
|
|
1440
|
+
frameObject: x
|
|
1436
1441
|
}
|
|
1437
|
-
}), l(d,
|
|
1438
|
-
semanticExecutionPayload:
|
|
1442
|
+
}), l(d, N, {
|
|
1443
|
+
semanticExecutionPayload: P
|
|
1439
1444
|
}), a.invalidateQueries({ queryKey: ["visuals"] }), a.invalidateQueries({ queryKey: ["visual", g] }), E.success("Saved to library and applied locally"), setTimeout(() => {
|
|
1440
1445
|
u(!1);
|
|
1441
1446
|
}, 300);
|
|
1442
|
-
} catch (
|
|
1443
|
-
console.error("Failed to save and apply:",
|
|
1444
|
-
|
|
1447
|
+
} catch (x) {
|
|
1448
|
+
console.error("Failed to save and apply:", x), E.error(
|
|
1449
|
+
x instanceof Error ? x.message : "Failed to save and apply changes"
|
|
1445
1450
|
);
|
|
1446
1451
|
} finally {
|
|
1447
1452
|
n(!1);
|
|
1448
1453
|
}
|
|
1449
1454
|
},
|
|
1450
|
-
className:
|
|
1455
|
+
className: t,
|
|
1451
1456
|
size: "xs",
|
|
1452
1457
|
variant: "default",
|
|
1453
1458
|
disabled: o,
|
|
1454
|
-
children: o ? /* @__PURE__ */ s(
|
|
1455
|
-
/* @__PURE__ */
|
|
1459
|
+
children: o ? /* @__PURE__ */ s(R, { children: [
|
|
1460
|
+
/* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
1456
1461
|
"Saving..."
|
|
1457
|
-
] }) : /* @__PURE__ */ s(
|
|
1458
|
-
/* @__PURE__ */
|
|
1462
|
+
] }) : /* @__PURE__ */ s(R, { children: [
|
|
1463
|
+
/* @__PURE__ */ e(Qt, { className: "h-3.5 w-3.5" }),
|
|
1459
1464
|
"Save & Apply"
|
|
1460
1465
|
] })
|
|
1461
1466
|
}
|
|
1462
1467
|
);
|
|
1463
1468
|
}
|
|
1464
|
-
function at({ className:
|
|
1465
|
-
const { setTempQueryData: a, setSqlGen: o } = Ge(), n = Qe(), i =
|
|
1469
|
+
function at({ className: t }) {
|
|
1470
|
+
const { setTempQueryData: a, setSqlGen: o } = Ge(), n = Qe(), i = Z((c) => c.tempQueryData), r = Z((c) => c.onClose);
|
|
1466
1471
|
function d() {
|
|
1467
1472
|
if (i) {
|
|
1468
1473
|
const { queryKey: c, queryData: l } = i;
|
|
@@ -1471,101 +1476,101 @@ function at({ className: e }) {
|
|
|
1471
1476
|
o({}), r == null || r();
|
|
1472
1477
|
}
|
|
1473
1478
|
return /* @__PURE__ */ s(
|
|
1474
|
-
|
|
1479
|
+
T,
|
|
1475
1480
|
{
|
|
1476
1481
|
onClick: d,
|
|
1477
|
-
className:
|
|
1482
|
+
className: t,
|
|
1478
1483
|
size: "xs",
|
|
1479
1484
|
variant: "outline",
|
|
1480
1485
|
children: [
|
|
1481
|
-
/* @__PURE__ */
|
|
1486
|
+
/* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" }),
|
|
1482
1487
|
"Close"
|
|
1483
1488
|
]
|
|
1484
1489
|
}
|
|
1485
1490
|
);
|
|
1486
1491
|
}
|
|
1487
|
-
function
|
|
1488
|
-
const [
|
|
1489
|
-
var b,
|
|
1490
|
-
return ((b = l == null ? void 0 : l.cards) == null ? void 0 : b.length) === 1 && ((
|
|
1491
|
-
})(),
|
|
1492
|
+
function nn() {
|
|
1493
|
+
const [t, a] = D(!1), [o, n] = D(!1), [i, r] = D(null), [d, c] = D(null), l = Z((b) => b.frame), u = Z((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(), P = !!(l != null && l.visualId), U = (() => {
|
|
1494
|
+
var b, I;
|
|
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
|
+
})(), F = Sa((b) => {
|
|
1492
1497
|
b != null && b.id && (g(b), o && i && d && m && (async () => {
|
|
1493
1498
|
try {
|
|
1494
|
-
const
|
|
1499
|
+
const I = {
|
|
1495
1500
|
...i,
|
|
1496
|
-
id:
|
|
1501
|
+
id: It(),
|
|
1497
1502
|
visualId: b.id
|
|
1498
1503
|
// Link to the newly created library visual
|
|
1499
1504
|
};
|
|
1500
|
-
|
|
1505
|
+
x(m, I, {
|
|
1501
1506
|
semanticExecutionPayload: d
|
|
1502
|
-
}), n(!1), r(null), c(null),
|
|
1503
|
-
} catch (
|
|
1507
|
+
}), n(!1), r(null), c(null), N(!1);
|
|
1508
|
+
} catch (I) {
|
|
1504
1509
|
console.error(
|
|
1505
1510
|
"Failed to promote semantic metadata for saved visual:",
|
|
1506
|
-
|
|
1511
|
+
I
|
|
1507
1512
|
), E.error(
|
|
1508
|
-
|
|
1513
|
+
I instanceof Error ? I.message : "Failed to prepare semantic metadata for the saved visual"
|
|
1509
1514
|
);
|
|
1510
1515
|
}
|
|
1511
1516
|
})(), a(!1));
|
|
1512
1517
|
});
|
|
1513
1518
|
return {
|
|
1514
|
-
saveAsDialogOpen:
|
|
1519
|
+
saveAsDialogOpen: t,
|
|
1515
1520
|
setSaveAsDialogOpen: a,
|
|
1516
1521
|
handleSaveAs: async (b) => {
|
|
1517
1522
|
if (!m) {
|
|
1518
1523
|
E.error("No sheet selected");
|
|
1519
1524
|
return;
|
|
1520
1525
|
}
|
|
1521
|
-
const
|
|
1522
|
-
...
|
|
1523
|
-
cards:
|
|
1524
|
-
...
|
|
1526
|
+
const I = f(), A = I.cards.length === 1 ? {
|
|
1527
|
+
...I,
|
|
1528
|
+
cards: I.cards.map((k) => ({
|
|
1529
|
+
...k,
|
|
1525
1530
|
title: b.name
|
|
1526
1531
|
// Use visual name as card title
|
|
1527
1532
|
}))
|
|
1528
|
-
} :
|
|
1533
|
+
} : I;
|
|
1529
1534
|
if (b.saveToLibrary) {
|
|
1530
|
-
let
|
|
1535
|
+
let k = null;
|
|
1531
1536
|
if (b.saveToCurrentDashboard)
|
|
1532
1537
|
try {
|
|
1533
|
-
|
|
1534
|
-
previousFrame: He(p,
|
|
1538
|
+
k = await S(A, {
|
|
1539
|
+
previousFrame: He(p, A.id)
|
|
1535
1540
|
});
|
|
1536
|
-
} catch (
|
|
1541
|
+
} catch (L) {
|
|
1537
1542
|
console.error(
|
|
1538
1543
|
"Failed to prepare semantic metadata before saving visual:",
|
|
1539
|
-
|
|
1544
|
+
L
|
|
1540
1545
|
), E.error(
|
|
1541
|
-
|
|
1546
|
+
L instanceof Error ? L.message : "Failed to prepare semantic metadata for the saved visual"
|
|
1542
1547
|
);
|
|
1543
1548
|
return;
|
|
1544
1549
|
}
|
|
1545
|
-
n(b.saveToCurrentDashboard), r(
|
|
1550
|
+
n(b.saveToCurrentDashboard), r(A), c(k);
|
|
1546
1551
|
const j = {
|
|
1547
1552
|
title: b.name,
|
|
1548
1553
|
description: b.description,
|
|
1549
|
-
frameObject:
|
|
1554
|
+
frameObject: A,
|
|
1550
1555
|
// Card title synced for single-card frames
|
|
1551
1556
|
isPrivate: !1
|
|
1552
1557
|
};
|
|
1553
|
-
|
|
1558
|
+
F.mutate(j);
|
|
1554
1559
|
} else if (b.saveToCurrentDashboard) {
|
|
1555
|
-
const
|
|
1556
|
-
...
|
|
1560
|
+
const k = {
|
|
1561
|
+
...A,
|
|
1557
1562
|
// Card title already synced
|
|
1558
|
-
id:
|
|
1563
|
+
id: It(),
|
|
1559
1564
|
visualId: void 0
|
|
1560
1565
|
// Explicitly no visualId for local visuals
|
|
1561
1566
|
};
|
|
1562
1567
|
try {
|
|
1563
|
-
const j = await
|
|
1564
|
-
previousFrame: He(p,
|
|
1568
|
+
const j = await S(A, {
|
|
1569
|
+
previousFrame: He(p, A.id)
|
|
1565
1570
|
});
|
|
1566
|
-
|
|
1571
|
+
x(m, k, {
|
|
1567
1572
|
semanticExecutionPayload: j
|
|
1568
|
-
}), E.success("Visual saved to dashboard"), a(!1),
|
|
1573
|
+
}), E.success("Visual saved to dashboard"), a(!1), N(!1);
|
|
1569
1574
|
} catch (j) {
|
|
1570
1575
|
console.error("Failed to save visual to dashboard:", j), E.error(
|
|
1571
1576
|
j instanceof Error ? j.message : "Failed to prepare semantic metadata for the visual"
|
|
@@ -1573,132 +1578,132 @@ function an() {
|
|
|
1573
1578
|
}
|
|
1574
1579
|
}
|
|
1575
1580
|
},
|
|
1576
|
-
isLibraryVisual:
|
|
1577
|
-
currentVisualName:
|
|
1578
|
-
isSaving:
|
|
1581
|
+
isLibraryVisual: P,
|
|
1582
|
+
currentVisualName: U,
|
|
1583
|
+
isSaving: F.isPending
|
|
1579
1584
|
};
|
|
1580
1585
|
}
|
|
1581
|
-
function hs(
|
|
1582
|
-
const { isInspectionMode: a } =
|
|
1583
|
-
saveAsDialogOpen:
|
|
1584
|
-
setSaveAsDialogOpen:
|
|
1586
|
+
function hs(t = {}) {
|
|
1587
|
+
const { isInspectionMode: a } = ka(), o = Z((L) => L.frame), n = Z((L) => L.editorContext), i = Da((L) => L.selectedVisual), r = w((L) => L.selectedFrameId), d = w((L) => L.selectedSheetId), c = w((L) => L.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), P = N && !S, {
|
|
1588
|
+
saveAsDialogOpen: U,
|
|
1589
|
+
setSaveAsDialogOpen: F,
|
|
1585
1590
|
handleSaveAs: O,
|
|
1586
1591
|
isLibraryVisual: b,
|
|
1587
|
-
currentVisualName:
|
|
1592
|
+
currentVisualName: I,
|
|
1588
1593
|
isSaving: C
|
|
1589
|
-
} =
|
|
1594
|
+
} = nn(), { getUpdatedFrame: A } = ye();
|
|
1590
1595
|
if (a)
|
|
1591
|
-
return /* @__PURE__ */ s(
|
|
1592
|
-
/* @__PURE__ */
|
|
1596
|
+
return /* @__PURE__ */ s(R, { children: [
|
|
1597
|
+
/* @__PURE__ */ e(
|
|
1593
1598
|
tt,
|
|
1594
1599
|
{
|
|
1595
1600
|
className: "rounded-control",
|
|
1596
1601
|
variant: "default"
|
|
1597
1602
|
}
|
|
1598
1603
|
),
|
|
1599
|
-
/* @__PURE__ */
|
|
1604
|
+
/* @__PURE__ */ e(at, {})
|
|
1600
1605
|
] });
|
|
1601
|
-
if (
|
|
1602
|
-
return /* @__PURE__ */ s(
|
|
1603
|
-
/* @__PURE__ */
|
|
1604
|
-
/* @__PURE__ */
|
|
1606
|
+
if (x)
|
|
1607
|
+
return /* @__PURE__ */ s(R, { children: [
|
|
1608
|
+
/* @__PURE__ */ e(tt, { className: "rounded-control", variant: "default" }),
|
|
1609
|
+
/* @__PURE__ */ e(at, {})
|
|
1605
1610
|
] });
|
|
1606
|
-
const
|
|
1611
|
+
const k = async () => {
|
|
1607
1612
|
if (!d) {
|
|
1608
1613
|
E.error("No sheet selected");
|
|
1609
1614
|
return;
|
|
1610
1615
|
}
|
|
1611
1616
|
if (h) return;
|
|
1612
1617
|
m(!0);
|
|
1613
|
-
const
|
|
1614
|
-
...
|
|
1618
|
+
const z = {
|
|
1619
|
+
...A(),
|
|
1615
1620
|
visualId: void 0
|
|
1616
|
-
},
|
|
1621
|
+
}, G = He(c, z.id);
|
|
1617
1622
|
try {
|
|
1618
|
-
const
|
|
1619
|
-
previousFrame:
|
|
1623
|
+
const V = await g(z, {
|
|
1624
|
+
previousFrame: G
|
|
1620
1625
|
});
|
|
1621
|
-
u(d,
|
|
1622
|
-
semanticExecutionPayload:
|
|
1626
|
+
u(d, z, {
|
|
1627
|
+
semanticExecutionPayload: V
|
|
1623
1628
|
});
|
|
1624
|
-
} catch (
|
|
1625
|
-
console.error("Failed to apply local semantic metadata:",
|
|
1626
|
-
|
|
1629
|
+
} catch (V) {
|
|
1630
|
+
console.error("Failed to apply local semantic metadata:", V), m(!1), E.error(
|
|
1631
|
+
V instanceof Error ? V.message : "Failed to prepare semantic metadata for this visual"
|
|
1627
1632
|
);
|
|
1628
1633
|
return;
|
|
1629
1634
|
}
|
|
1630
1635
|
setTimeout(() => {
|
|
1631
1636
|
m(!1), E.success("Changes applied. Visual is now local to this dashboard"), l(!1);
|
|
1632
1637
|
}, 300);
|
|
1633
|
-
}, j = (
|
|
1634
|
-
f(
|
|
1638
|
+
}, j = (L) => {
|
|
1639
|
+
f(L), F(!0);
|
|
1635
1640
|
};
|
|
1636
|
-
return /* @__PURE__ */ s(
|
|
1641
|
+
return /* @__PURE__ */ s(R, { children: [
|
|
1637
1642
|
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
1638
|
-
!
|
|
1639
|
-
|
|
1640
|
-
|
|
1643
|
+
!N && /* @__PURE__ */ e(tt, { className: "!rounded-none", variant: "default" }),
|
|
1644
|
+
N && P && /* @__PURE__ */ e(an, { className: "!rounded-none", variant: "default" }),
|
|
1645
|
+
N && S && /* @__PURE__ */ e(rn, { className: "!rounded-none" }),
|
|
1641
1646
|
/* @__PURE__ */ s(Ve, { modal: !1, children: [
|
|
1642
|
-
/* @__PURE__ */
|
|
1643
|
-
|
|
1647
|
+
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1648
|
+
T,
|
|
1644
1649
|
{
|
|
1645
1650
|
variant: "default",
|
|
1646
1651
|
size: "xs",
|
|
1647
1652
|
className: "w-7 !rounded-none border-l border-primary-foreground/20 px-0",
|
|
1648
1653
|
"aria-label": "Open visual save options",
|
|
1649
1654
|
disabled: C || h,
|
|
1650
|
-
children: /* @__PURE__ */
|
|
1655
|
+
children: /* @__PURE__ */ e(wt, { className: "h-3.5 w-3.5" })
|
|
1651
1656
|
}
|
|
1652
1657
|
) }),
|
|
1653
1658
|
/* @__PURE__ */ s(
|
|
1654
|
-
|
|
1659
|
+
Me,
|
|
1655
1660
|
{
|
|
1656
1661
|
align: "end",
|
|
1657
1662
|
className: "min-w-[220px] rounded-control border border-border/60 p-1 shadow-sm",
|
|
1658
1663
|
children: [
|
|
1659
|
-
|
|
1664
|
+
S && /* @__PURE__ */ s(R, { children: [
|
|
1660
1665
|
/* @__PURE__ */ s(
|
|
1661
|
-
|
|
1666
|
+
K,
|
|
1662
1667
|
{
|
|
1663
|
-
onClick:
|
|
1668
|
+
onClick: k,
|
|
1664
1669
|
disabled: h,
|
|
1665
1670
|
children: [
|
|
1666
|
-
/* @__PURE__ */
|
|
1671
|
+
/* @__PURE__ */ e(Ct, { className: "h-3.5 w-3.5" }),
|
|
1667
1672
|
h ? "Applying..." : "Apply Locally"
|
|
1668
1673
|
]
|
|
1669
1674
|
}
|
|
1670
1675
|
),
|
|
1671
|
-
/* @__PURE__ */
|
|
1676
|
+
/* @__PURE__ */ e(We, {})
|
|
1672
1677
|
] }),
|
|
1673
1678
|
/* @__PURE__ */ s(
|
|
1674
|
-
|
|
1679
|
+
K,
|
|
1675
1680
|
{
|
|
1676
1681
|
onClick: () => j("local"),
|
|
1677
1682
|
disabled: C,
|
|
1678
1683
|
children: [
|
|
1679
|
-
/* @__PURE__ */
|
|
1684
|
+
/* @__PURE__ */ e(xe, { className: "h-3.5 w-3.5" }),
|
|
1680
1685
|
"Add to Dashboard (Local)"
|
|
1681
1686
|
]
|
|
1682
1687
|
}
|
|
1683
1688
|
),
|
|
1684
1689
|
/* @__PURE__ */ s(
|
|
1685
|
-
|
|
1690
|
+
K,
|
|
1686
1691
|
{
|
|
1687
1692
|
onClick: () => j("library"),
|
|
1688
1693
|
disabled: C,
|
|
1689
1694
|
children: [
|
|
1690
|
-
/* @__PURE__ */
|
|
1695
|
+
/* @__PURE__ */ e(Er, { className: "h-3.5 w-3.5" }),
|
|
1691
1696
|
"Save as Library Visual"
|
|
1692
1697
|
]
|
|
1693
1698
|
}
|
|
1694
1699
|
),
|
|
1695
1700
|
/* @__PURE__ */ s(
|
|
1696
|
-
|
|
1701
|
+
K,
|
|
1697
1702
|
{
|
|
1698
1703
|
onClick: () => j("both"),
|
|
1699
1704
|
disabled: C,
|
|
1700
1705
|
children: [
|
|
1701
|
-
/* @__PURE__ */
|
|
1706
|
+
/* @__PURE__ */ e(Ir, { className: "h-3.5 w-3.5" }),
|
|
1702
1707
|
"Save Copy as Linked Visual"
|
|
1703
1708
|
]
|
|
1704
1709
|
}
|
|
@@ -1708,16 +1713,16 @@ function hs(e = {}) {
|
|
|
1708
1713
|
)
|
|
1709
1714
|
] })
|
|
1710
1715
|
] }),
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
/* @__PURE__ */
|
|
1713
|
-
|
|
1716
|
+
/* @__PURE__ */ e(at, {}),
|
|
1717
|
+
/* @__PURE__ */ e(
|
|
1718
|
+
tn,
|
|
1714
1719
|
{
|
|
1715
|
-
open:
|
|
1716
|
-
onOpenChange: (
|
|
1717
|
-
C ||
|
|
1720
|
+
open: U,
|
|
1721
|
+
onOpenChange: (L) => {
|
|
1722
|
+
C || F(L);
|
|
1718
1723
|
},
|
|
1719
1724
|
isLibraryVisual: b,
|
|
1720
|
-
currentVisualName:
|
|
1725
|
+
currentVisualName: I,
|
|
1721
1726
|
isSaving: C,
|
|
1722
1727
|
destinationMode: p,
|
|
1723
1728
|
onConfirm: O
|
|
@@ -1725,11 +1730,11 @@ function hs(e = {}) {
|
|
|
1725
1730
|
)
|
|
1726
1731
|
] });
|
|
1727
1732
|
}
|
|
1728
|
-
function ms({ className:
|
|
1729
|
-
const a =
|
|
1730
|
-
if (!n || !d || !
|
|
1733
|
+
function ms({ className: t }) {
|
|
1734
|
+
const a = Z((h) => h.isDevMode), o = Z((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
|
+
if (!n || !d || !yr(o))
|
|
1731
1736
|
return null;
|
|
1732
|
-
const c = a ?
|
|
1737
|
+
const c = a ? _r : zr, l = a ? "Visual editor" : "SQL editor", u = a ? "Switch to visual editor" : "Switch to SQL editor";
|
|
1733
1738
|
return /* @__PURE__ */ s(
|
|
1734
1739
|
"button",
|
|
1735
1740
|
{
|
|
@@ -1737,19 +1742,19 @@ function ms({ className: e }) {
|
|
|
1737
1742
|
"aria-label": u,
|
|
1738
1743
|
title: u,
|
|
1739
1744
|
onClick: () => i(!a),
|
|
1740
|
-
className:
|
|
1745
|
+
className: J(
|
|
1741
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",
|
|
1742
|
-
|
|
1747
|
+
t
|
|
1743
1748
|
),
|
|
1744
1749
|
children: [
|
|
1745
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ e(c, { className: "h-3 w-3 text-muted-foreground" }),
|
|
1746
1751
|
l
|
|
1747
1752
|
]
|
|
1748
1753
|
}
|
|
1749
1754
|
);
|
|
1750
1755
|
}
|
|
1751
1756
|
function ps() {
|
|
1752
|
-
const
|
|
1757
|
+
const t = Vr() === "sm", a = w((l) => l.isDashboardEditing), o = w((l) => l.isVisualEditing), n = w((l) => {
|
|
1753
1758
|
var h;
|
|
1754
1759
|
const u = ((h = l.dashboard) == null ? void 0 : h.sheets) ?? [];
|
|
1755
1760
|
return u.find((m) => m.id === l.selectedSheetId) ?? u[0];
|
|
@@ -1776,74 +1781,74 @@ function ps() {
|
|
|
1776
1781
|
};
|
|
1777
1782
|
return /* @__PURE__ */ s("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
|
|
1778
1783
|
/* @__PURE__ */ s(
|
|
1779
|
-
|
|
1784
|
+
T,
|
|
1780
1785
|
{
|
|
1781
1786
|
variant: "ghost",
|
|
1782
1787
|
size: "xs",
|
|
1783
1788
|
disabled: d,
|
|
1784
1789
|
title: d ? "This sheet has no cards to arrange" : "Lay out the cards by kind on every screen size",
|
|
1785
1790
|
onClick: () => c(!1),
|
|
1786
|
-
"aria-label":
|
|
1787
|
-
className: `h-full rounded-none border-0 shadow-none hover:bg-accent${
|
|
1791
|
+
"aria-label": t ? "Arrange" : void 0,
|
|
1792
|
+
className: `h-full rounded-none border-0 shadow-none hover:bg-accent${t ? " w-7 px-0" : ""}`,
|
|
1788
1793
|
children: [
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
!
|
|
1794
|
+
/* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }),
|
|
1795
|
+
!t && "Arrange"
|
|
1791
1796
|
]
|
|
1792
1797
|
}
|
|
1793
1798
|
),
|
|
1794
1799
|
/* @__PURE__ */ s(Ve, { modal: !1, children: [
|
|
1795
|
-
/* @__PURE__ */
|
|
1796
|
-
|
|
1800
|
+
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1801
|
+
T,
|
|
1797
1802
|
{
|
|
1798
1803
|
variant: "ghost",
|
|
1799
1804
|
size: "xs",
|
|
1800
1805
|
disabled: d,
|
|
1801
1806
|
className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
|
|
1802
1807
|
"aria-label": "Open arrange options",
|
|
1803
|
-
children: /* @__PURE__ */
|
|
1808
|
+
children: /* @__PURE__ */ e(wt, { className: "h-3.5 w-3.5" })
|
|
1804
1809
|
}
|
|
1805
1810
|
) }),
|
|
1806
|
-
/* @__PURE__ */
|
|
1807
|
-
/* @__PURE__ */
|
|
1811
|
+
/* @__PURE__ */ e(Me, { 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
|
+
/* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }),
|
|
1808
1813
|
"Keep my order"
|
|
1809
1814
|
] }) })
|
|
1810
1815
|
] })
|
|
1811
1816
|
] });
|
|
1812
1817
|
}
|
|
1813
1818
|
function fs() {
|
|
1814
|
-
const
|
|
1819
|
+
const t = w((i) => i.screenSizesOpen), a = w((i) => {
|
|
1815
1820
|
var c, l;
|
|
1816
1821
|
const r = ((c = i.dashboard) == null ? void 0 : c.sheets) ?? [], d = r.find((u) => u.id === i.selectedSheetId) ?? r[0];
|
|
1817
1822
|
return !!d && !Nt(d) && !!((l = d.frames) != null && l.length);
|
|
1818
|
-
}), o = w((i) => i.actions.setScreenSizesOpen), n =
|
|
1823
|
+
}), o = w((i) => i.actions.setScreenSizesOpen), n = Yt(
|
|
1819
1824
|
"screen-sizes",
|
|
1820
1825
|
"lg",
|
|
1821
1826
|
a ? {
|
|
1822
1827
|
label: "Screen sizes",
|
|
1823
|
-
icon: /* @__PURE__ */
|
|
1824
|
-
checked:
|
|
1828
|
+
icon: /* @__PURE__ */ e(Vt, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
1829
|
+
checked: t,
|
|
1825
1830
|
order: 40,
|
|
1826
|
-
onSelect: () => o(!
|
|
1831
|
+
onSelect: () => o(!t)
|
|
1827
1832
|
} : void 0
|
|
1828
1833
|
);
|
|
1829
|
-
return !a || n.collapsed ? null : /* @__PURE__ */
|
|
1830
|
-
|
|
1834
|
+
return !a || n.collapsed ? null : /* @__PURE__ */ e(
|
|
1835
|
+
T,
|
|
1831
1836
|
{
|
|
1832
1837
|
type: "button",
|
|
1833
1838
|
size: "xs",
|
|
1834
|
-
variant:
|
|
1835
|
-
"aria-pressed":
|
|
1839
|
+
variant: t ? "secondary" : "ghost",
|
|
1840
|
+
"aria-pressed": t,
|
|
1836
1841
|
"aria-label": "Screen sizes",
|
|
1837
1842
|
title: "Screen sizes",
|
|
1838
|
-
onClick: () => o(!
|
|
1843
|
+
onClick: () => o(!t),
|
|
1839
1844
|
className: "w-7 px-0",
|
|
1840
|
-
children: /* @__PURE__ */
|
|
1845
|
+
children: /* @__PURE__ */ e(Vt, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
|
|
1841
1846
|
}
|
|
1842
1847
|
);
|
|
1843
1848
|
}
|
|
1844
|
-
function gs({ dashboardId:
|
|
1849
|
+
function gs({ dashboardId: t }) {
|
|
1845
1850
|
const { openDashboardId: a, access: o, printMode: n, serverIsFavorite: i, fetchedAt: r } = w(
|
|
1846
|
-
|
|
1851
|
+
Fa((l) => {
|
|
1847
1852
|
var u;
|
|
1848
1853
|
return {
|
|
1849
1854
|
openDashboardId: (u = l.dashboard) == null ? void 0 : u.id,
|
|
@@ -1853,32 +1858,32 @@ function gs({ dashboardId: e }) {
|
|
|
1853
1858
|
fetchedAt: l.viewer.fetchedAt
|
|
1854
1859
|
};
|
|
1855
1860
|
})
|
|
1856
|
-
), d =
|
|
1857
|
-
return a !==
|
|
1858
|
-
|
|
1861
|
+
), d = Ea(), c = d.isFavorite(t, i, r);
|
|
1862
|
+
return a !== t || n || o === "session-only" ? null : /* @__PURE__ */ e(
|
|
1863
|
+
Ia,
|
|
1859
1864
|
{
|
|
1860
1865
|
variant: "toolbar",
|
|
1861
1866
|
isFavorite: c,
|
|
1862
1867
|
readOnly: o === "read-only",
|
|
1863
|
-
pending: d.isPending(
|
|
1864
|
-
onToggle: () => void d.setFavorite({ dashboardId:
|
|
1868
|
+
pending: d.isPending(t),
|
|
1869
|
+
onToggle: () => void d.setFavorite({ dashboardId: t, isFavorite: !c })
|
|
1865
1870
|
}
|
|
1866
1871
|
);
|
|
1867
1872
|
}
|
|
1868
1873
|
function bs({
|
|
1869
|
-
width:
|
|
1874
|
+
width: t,
|
|
1870
1875
|
hasOverflowMenu: a = !0,
|
|
1871
1876
|
children: o
|
|
1872
1877
|
}) {
|
|
1873
|
-
const [n, i] =
|
|
1878
|
+
const [n, i] = D(
|
|
1874
1879
|
() => /* @__PURE__ */ new Map()
|
|
1875
|
-
), [r, d] =
|
|
1880
|
+
), [r, d] = D(null), [c, l] = D(null), u = X((m) => (i((p) => new Map(p).set(m.id, m)), () => i((p) => {
|
|
1876
1881
|
if (p.get(m.id) !== m) return p;
|
|
1877
1882
|
const f = new Map(p);
|
|
1878
1883
|
return f.delete(m.id), f;
|
|
1879
|
-
})), []), h =
|
|
1884
|
+
})), []), h = ee(
|
|
1880
1885
|
() => ({
|
|
1881
|
-
width:
|
|
1886
|
+
width: t,
|
|
1882
1887
|
hasOverflowMenu: a,
|
|
1883
1888
|
overflowItems: [...n.values()].sort((m, p) => m.order - p.order),
|
|
1884
1889
|
register: u,
|
|
@@ -1887,28 +1892,28 @@ function bs({
|
|
|
1887
1892
|
anchorSlot: c,
|
|
1888
1893
|
setAnchorSlot: l
|
|
1889
1894
|
}),
|
|
1890
|
-
[c, a, n, r, u,
|
|
1895
|
+
[c, a, n, r, u, t]
|
|
1891
1896
|
);
|
|
1892
|
-
return /* @__PURE__ */
|
|
1897
|
+
return /* @__PURE__ */ e(Xt.Provider, { value: h, children: o });
|
|
1893
1898
|
}
|
|
1894
|
-
function
|
|
1895
|
-
const { setAnchorSlot:
|
|
1896
|
-
return /* @__PURE__ */
|
|
1899
|
+
function vs() {
|
|
1900
|
+
const { setAnchorSlot: t } = Ut(Xt);
|
|
1901
|
+
return /* @__PURE__ */ e("span", { ref: t, "aria-hidden": !0, className: "relative -mr-1.5 block h-7 w-0" });
|
|
1897
1902
|
}
|
|
1898
|
-
function
|
|
1903
|
+
function xs(t) {
|
|
1899
1904
|
var l;
|
|
1900
|
-
const { authToken: a, tokenProps: o } = it(), { data: n } =
|
|
1905
|
+
const { authToken: a, tokenProps: o } = it(), { data: n } = Ta(), { mutate: i, isPending: r } = La(), d = !!t && ((l = n == null ? void 0 : n.preference) == null ? void 0 : l.defaultDashboardId) === t, c = !n || r;
|
|
1901
1906
|
return {
|
|
1902
|
-
available: !!
|
|
1907
|
+
available: !!t && !!(a != null && a.accessToken) && !!(o != null && o.apiServiceUrl),
|
|
1903
1908
|
isDefault: d,
|
|
1904
1909
|
disabled: c,
|
|
1905
1910
|
toggle: () => {
|
|
1906
|
-
!
|
|
1911
|
+
!t || c || i({ dashboardId: d ? null : t });
|
|
1907
1912
|
}
|
|
1908
1913
|
};
|
|
1909
1914
|
}
|
|
1910
1915
|
function ys({
|
|
1911
|
-
open:
|
|
1916
|
+
open: t,
|
|
1912
1917
|
onOpenChange: a,
|
|
1913
1918
|
onSave: o,
|
|
1914
1919
|
onDiscard: n,
|
|
@@ -1919,16 +1924,16 @@ function ys({
|
|
|
1919
1924
|
discardLabel: l = "Discard changes",
|
|
1920
1925
|
saveLabel: u = "Save"
|
|
1921
1926
|
}) {
|
|
1922
|
-
return /* @__PURE__ */
|
|
1927
|
+
return /* @__PURE__ */ e(dt, { open: t, onOpenChange: (m) => {
|
|
1923
1928
|
!m && i || a(m);
|
|
1924
1929
|
}, children: /* @__PURE__ */ s(ct, { children: [
|
|
1925
1930
|
/* @__PURE__ */ s(ut, { children: [
|
|
1926
|
-
/* @__PURE__ */
|
|
1927
|
-
/* @__PURE__ */
|
|
1931
|
+
/* @__PURE__ */ e(ht, { children: r }),
|
|
1932
|
+
/* @__PURE__ */ e(mt, { children: d })
|
|
1928
1933
|
] }),
|
|
1929
1934
|
/* @__PURE__ */ s(pt, { children: [
|
|
1930
|
-
/* @__PURE__ */
|
|
1931
|
-
|
|
1935
|
+
/* @__PURE__ */ e(
|
|
1936
|
+
T,
|
|
1932
1937
|
{
|
|
1933
1938
|
type: "button",
|
|
1934
1939
|
size: "xs",
|
|
@@ -1939,20 +1944,20 @@ function ys({
|
|
|
1939
1944
|
children: l
|
|
1940
1945
|
}
|
|
1941
1946
|
),
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
/* @__PURE__ */
|
|
1944
|
-
/* @__PURE__ */
|
|
1947
|
+
/* @__PURE__ */ e(ft, { disabled: i, children: c }),
|
|
1948
|
+
/* @__PURE__ */ e(T, { type: "button", size: "xs", onClick: o, disabled: i, children: i ? /* @__PURE__ */ s(R, { children: [
|
|
1949
|
+
/* @__PURE__ */ e(ae, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
|
|
1945
1950
|
"Saving..."
|
|
1946
1951
|
] }) : u })
|
|
1947
1952
|
] })
|
|
1948
1953
|
] }) });
|
|
1949
1954
|
}
|
|
1950
|
-
async function Cs(
|
|
1955
|
+
async function Cs(t) {
|
|
1951
1956
|
var r, d;
|
|
1952
1957
|
const a = (d = (r = w.getState()) == null ? void 0 : r.authToken) == null ? void 0 : d.accessToken;
|
|
1953
1958
|
if (!a)
|
|
1954
1959
|
return;
|
|
1955
|
-
const o = `${
|
|
1960
|
+
const o = `${t}/v1/invalidate-token`, n = await fetch(o, {
|
|
1956
1961
|
method: "POST",
|
|
1957
1962
|
headers: {
|
|
1958
1963
|
Authorization: `Bearer ${a}`
|
|
@@ -1963,116 +1968,97 @@ async function Cs(e) {
|
|
|
1963
1968
|
const i = await n.json();
|
|
1964
1969
|
return console.log("invalidateToken", i), i;
|
|
1965
1970
|
}
|
|
1966
|
-
function
|
|
1967
|
-
switch (e == null ? void 0 : e.kind) {
|
|
1968
|
-
case "queued":
|
|
1969
|
-
return { text: K.queued };
|
|
1970
|
-
case "preparing":
|
|
1971
|
-
return { text: K.preparing };
|
|
1972
|
-
case "fetching":
|
|
1973
|
-
return { text: K.fetchingRows(e.rowsProcessed) };
|
|
1974
|
-
case "finalizing":
|
|
1975
|
-
return { text: K.finalizing };
|
|
1976
|
-
case "processing":
|
|
1977
|
-
return e.percent === null ? { text: K.processing } : { text: K.processing, detail: K.percentComplete(e.percent), bar: e.percent };
|
|
1978
|
-
default:
|
|
1979
|
-
return { text: K.inProgress };
|
|
1980
|
-
}
|
|
1981
|
-
}
|
|
1982
|
-
function nn(e) {
|
|
1971
|
+
function sn(t) {
|
|
1983
1972
|
var o;
|
|
1984
|
-
const a =
|
|
1973
|
+
const a = t.item;
|
|
1985
1974
|
return a.kind === "export" ? {
|
|
1986
1975
|
title: a.title,
|
|
1987
1976
|
status: a.status,
|
|
1988
1977
|
startedAt: a.startedAt,
|
|
1989
1978
|
finishedAt: a.finishedAt,
|
|
1990
|
-
running:
|
|
1979
|
+
running: Ra(a.stage),
|
|
1991
1980
|
finishedDetail: [
|
|
1992
1981
|
a.totalRows !== null ? `${a.totalRows.toLocaleString("en-US")} rows` : null,
|
|
1993
|
-
a.fileSize ?
|
|
1982
|
+
a.fileSize ? Oa(a.fileSize) : null
|
|
1994
1983
|
].filter((n) => !!n),
|
|
1995
|
-
failure: ((o = a.failure) == null ? void 0 : o.kind) === "export" ? a.failure.message : a.status === "failed" ?
|
|
1984
|
+
failure: ((o = a.failure) == null ? void 0 : o.kind) === "export" ? a.failure.message : a.status === "failed" ? ue.failedFallback : null,
|
|
1996
1985
|
note: null
|
|
1997
1986
|
} : {
|
|
1998
1987
|
title: a.title,
|
|
1999
1988
|
status: a.status,
|
|
2000
1989
|
startedAt: a.startedAt,
|
|
2001
1990
|
finishedAt: a.finishedAt,
|
|
2002
|
-
running: { text: a.stageLabel ??
|
|
1991
|
+
running: { text: a.stageLabel ?? ue.inProgress },
|
|
2003
1992
|
finishedDetail: [],
|
|
2004
1993
|
failure: null,
|
|
2005
|
-
note: a.omittedAttachmentCount > 0 ?
|
|
1994
|
+
note: a.omittedAttachmentCount > 0 ? le.attachmentsLeftOut(a.omittedAttachmentCount) : null
|
|
2006
1995
|
};
|
|
2007
1996
|
}
|
|
2008
|
-
function
|
|
2009
|
-
const [n, i] =
|
|
1997
|
+
function on({ row: t, now: a, api: o }) {
|
|
1998
|
+
const [n, i] = D("idle"), r = sn(t), d = Va(t, o), c = async () => {
|
|
2010
1999
|
if (!d) return;
|
|
2011
2000
|
i("working");
|
|
2012
|
-
const g = await
|
|
2001
|
+
const g = await za(o, t, d);
|
|
2013
2002
|
i(g === "done" ? "idle" : g);
|
|
2014
|
-
}, l = r.status === "ready" ? "bg-emerald-500" : r.status === "failed" ? "bg-destructive" : r.status === "cancelled" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", u = r.status === "ready" ?
|
|
2003
|
+
}, l = r.status === "ready" ? "bg-emerald-500" : r.status === "failed" ? "bg-destructive" : r.status === "cancelled" ? "bg-muted-foreground/40" : "animate-pulse bg-muted-foreground/60", u = r.status === "ready" ? ue.ready : r.status === "failed" ? ue.failed : r.status === "cancelled" ? ue.cancelled : ue.inProgress, h = Date.parse(r.startedAt), m = Tt(Date.parse(r.finishedAt ?? r.startedAt), a, { addSuffix: !0 }), p = r.status === "running" && t.item.kind === "export" && a - h >= Ba, f = /* @__PURE__ */ e("span", { className: "text-muted-foreground/50", children: "·" });
|
|
2015
2004
|
return /* @__PURE__ */ s("div", { className: "group flex items-start gap-2.5 px-3 py-2 transition-colors hover:bg-muted/40 focus-within:bg-muted/40", children: [
|
|
2016
|
-
/* @__PURE__ */
|
|
2017
|
-
/* @__PURE__ */
|
|
2005
|
+
/* @__PURE__ */ e("span", { className: "flex h-5 shrink-0 items-center", "aria-hidden": "true", children: /* @__PURE__ */ e("span", { className: `h-1.5 w-1.5 rounded-full ${l}` }) }),
|
|
2006
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: u }),
|
|
2018
2007
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
2019
2008
|
/* @__PURE__ */ s("div", { className: "flex h-5 items-center gap-2", children: [
|
|
2020
|
-
/* @__PURE__ */
|
|
2021
|
-
d && n === "working" && /* @__PURE__ */
|
|
2022
|
-
d && n !== "working" && /* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[13px] font-medium leading-5", children: r.title }),
|
|
2010
|
+
d && n === "working" && /* @__PURE__ */ e("span", { role: "status", className: "inline-flex shrink-0 items-center gap-1.5 text-[12px] text-muted-foreground", children: /* @__PURE__ */ e(jt, { className: "h-3 w-3 animate-spin", strokeWidth: 1.75 }) }),
|
|
2011
|
+
d && n !== "working" && /* @__PURE__ */ e(
|
|
2023
2012
|
"button",
|
|
2024
2013
|
{
|
|
2025
2014
|
type: "button",
|
|
2026
2015
|
onClick: () => void c(),
|
|
2027
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",
|
|
2028
|
-
children:
|
|
2017
|
+
children: Ma[d]
|
|
2029
2018
|
}
|
|
2030
2019
|
)
|
|
2031
2020
|
] }),
|
|
2032
2021
|
r.status === "running" && r.running && /* @__PURE__ */ s("div", { className: "text-[12px] leading-4 text-muted-foreground", children: [
|
|
2033
|
-
/* @__PURE__ */
|
|
2034
|
-
r.running.detail && /* @__PURE__ */ s(
|
|
2022
|
+
/* @__PURE__ */ e("span", { className: "tabular-nums", children: r.running.text }),
|
|
2023
|
+
r.running.detail && /* @__PURE__ */ s(R, { children: [
|
|
2035
2024
|
" ",
|
|
2036
2025
|
f,
|
|
2037
2026
|
" ",
|
|
2038
|
-
/* @__PURE__ */
|
|
2027
|
+
/* @__PURE__ */ e("span", { className: "tabular-nums", children: r.running.detail })
|
|
2039
2028
|
] }),
|
|
2040
2029
|
" ",
|
|
2041
2030
|
f,
|
|
2042
2031
|
" ",
|
|
2043
|
-
/* @__PURE__ */
|
|
2044
|
-
r.running.
|
|
2045
|
-
p && /* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ e("span", { children: ue.started(Tt(h, a)) }),
|
|
2033
|
+
r.running.percent !== void 0 && /* @__PURE__ */ e(Pa, { value: r.running.percent, className: "mt-1.5 h-1" }),
|
|
2034
|
+
p && /* @__PURE__ */ e("div", { className: "mt-1", children: ue.longRunning })
|
|
2046
2035
|
] }),
|
|
2047
2036
|
r.status !== "running" && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 text-[12px] leading-4 text-muted-foreground", children: [
|
|
2048
2037
|
r.status === "ready" && r.finishedDetail.length > 0 ? (
|
|
2049
2038
|
// Disclosed on hover or focus only; the time is what a reader scans.
|
|
2050
2039
|
/* @__PURE__ */ s("span", { className: "hidden group-hover:contents group-focus-within:contents", children: [
|
|
2051
|
-
r.finishedDetail.map((g,
|
|
2052
|
-
|
|
2053
|
-
/* @__PURE__ */
|
|
2054
|
-
] },
|
|
2040
|
+
r.finishedDetail.map((g, x) => /* @__PURE__ */ s(Pt.Fragment, { children: [
|
|
2041
|
+
x > 0 && f,
|
|
2042
|
+
/* @__PURE__ */ e("span", { children: g })
|
|
2043
|
+
] }, x)),
|
|
2055
2044
|
f
|
|
2056
2045
|
] })
|
|
2057
|
-
) : r.status !== "ready" ? /* @__PURE__ */ s(
|
|
2058
|
-
/* @__PURE__ */
|
|
2046
|
+
) : r.status !== "ready" ? /* @__PURE__ */ s(R, { children: [
|
|
2047
|
+
/* @__PURE__ */ e("span", { children: u }),
|
|
2059
2048
|
f
|
|
2060
2049
|
] }) : null,
|
|
2061
|
-
/* @__PURE__ */
|
|
2050
|
+
/* @__PURE__ */ e("span", { children: m })
|
|
2062
2051
|
] }),
|
|
2063
|
-
r.note && /* @__PURE__ */
|
|
2064
|
-
r.status === "failed" && r.failure && /* @__PURE__ */
|
|
2065
|
-
(n === "denied" || n === "blocked") && /* @__PURE__ */
|
|
2066
|
-
/* @__PURE__ */ t(Va, { className: "mt-0.5 h-3 w-3 shrink-0 text-destructive", strokeWidth: 1.75 }),
|
|
2067
|
-
/* @__PURE__ */ t("span", { children: Ba(n) })
|
|
2068
|
-
] })
|
|
2052
|
+
r.note && /* @__PURE__ */ e("div", { className: "text-[12px] leading-4 text-muted-foreground", children: r.note }),
|
|
2053
|
+
r.status === "failed" && r.failure && /* @__PURE__ */ e("div", { className: "mt-1 whitespace-pre-wrap break-words text-[12px] leading-4 text-destructive", children: r.failure }),
|
|
2054
|
+
(n === "denied" || n === "blocked") && /* @__PURE__ */ e(Ua, { problem: n, className: "mt-1" })
|
|
2069
2055
|
] })
|
|
2070
2056
|
] });
|
|
2071
2057
|
}
|
|
2072
|
-
function ws({ variant:
|
|
2073
|
-
const { snapshot: a, markSeen: o } = yt(), n = a.runningCount > 0 ? a.runningCount > 9 ? "9+" : String(a.runningCount) : a.hasUnseenFinished ? "" : null, i =
|
|
2074
|
-
label:
|
|
2075
|
-
icon: /* @__PURE__ */
|
|
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 = Yt("activity", "md", {
|
|
2060
|
+
label: le.title,
|
|
2061
|
+
icon: /* @__PURE__ */ e(Lt, { className: "h-3.5 w-3.5" }),
|
|
2076
2062
|
hint: n || (n === "" ? "New" : void 0),
|
|
2077
2063
|
order: 30,
|
|
2078
2064
|
onOpen: o
|
|
@@ -2085,18 +2071,18 @@ function ws({ variant: e }) {
|
|
|
2085
2071
|
i.setPopoverOpen(r), r && o();
|
|
2086
2072
|
},
|
|
2087
2073
|
children: [
|
|
2088
|
-
i.anchorSlot &&
|
|
2089
|
-
/* @__PURE__ */
|
|
2074
|
+
i.anchorSlot && Dr(
|
|
2075
|
+
/* @__PURE__ */ e(br, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "absolute right-0 top-0 h-7 w-px" }) }),
|
|
2090
2076
|
i.anchorSlot
|
|
2091
2077
|
),
|
|
2092
|
-
/* @__PURE__ */
|
|
2078
|
+
/* @__PURE__ */ e(
|
|
2093
2079
|
Fe,
|
|
2094
2080
|
{
|
|
2095
2081
|
className: "w-80 p-0",
|
|
2096
2082
|
align: "end",
|
|
2097
2083
|
sideOffset: 8,
|
|
2098
2084
|
onFocusOutside: (r) => r.preventDefault(),
|
|
2099
|
-
children: /* @__PURE__ */
|
|
2085
|
+
children: /* @__PURE__ */ e(Mt, {})
|
|
2100
2086
|
}
|
|
2101
2087
|
)
|
|
2102
2088
|
]
|
|
@@ -2104,17 +2090,17 @@ function ws({ variant: e }) {
|
|
|
2104
2090
|
) : /* @__PURE__ */ s(Ae, { onOpenChange: (r) => {
|
|
2105
2091
|
r && o();
|
|
2106
2092
|
}, children: [
|
|
2107
|
-
/* @__PURE__ */
|
|
2108
|
-
|
|
2093
|
+
/* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ s(
|
|
2094
|
+
T,
|
|
2109
2095
|
{
|
|
2110
|
-
variant:
|
|
2096
|
+
variant: t ?? "ghost",
|
|
2111
2097
|
size: "xs",
|
|
2112
2098
|
className: "relative w-7 px-0",
|
|
2113
|
-
"aria-label":
|
|
2114
|
-
title:
|
|
2099
|
+
"aria-label": le.title,
|
|
2100
|
+
title: le.title,
|
|
2115
2101
|
children: [
|
|
2116
|
-
/* @__PURE__ */
|
|
2117
|
-
n !== null && /* @__PURE__ */
|
|
2102
|
+
/* @__PURE__ */ e(Lt, { className: "h-3.5 w-3.5" }),
|
|
2103
|
+
n !== null && /* @__PURE__ */ e(
|
|
2118
2104
|
"span",
|
|
2119
2105
|
{
|
|
2120
2106
|
className: `absolute flex items-center justify-center rounded-full bg-primary text-primary-foreground ${n ? "-right-0.5 -top-0.5 h-3.5 min-w-3.5 px-0.5 text-[9px] font-semibold" : "right-1 top-1 h-1.5 w-1.5"}`,
|
|
@@ -2124,59 +2110,59 @@ function ws({ variant: e }) {
|
|
|
2124
2110
|
]
|
|
2125
2111
|
}
|
|
2126
2112
|
) }),
|
|
2127
|
-
/* @__PURE__ */
|
|
2113
|
+
/* @__PURE__ */ e(Fe, { className: "w-80 p-0", align: "end", sideOffset: 8, children: /* @__PURE__ */ e(Mt, {}) })
|
|
2128
2114
|
] });
|
|
2129
2115
|
}
|
|
2130
|
-
function
|
|
2131
|
-
const
|
|
2116
|
+
function Mt() {
|
|
2117
|
+
const t = yt(), a = _a(), { rows: o, activeTruncated: n } = t.snapshot, i = o.some((r) => ja(r.item.status));
|
|
2132
2118
|
return o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-1.5 px-6 py-8 text-center", children: [
|
|
2133
|
-
/* @__PURE__ */
|
|
2134
|
-
/* @__PURE__ */
|
|
2135
|
-
/* @__PURE__ */
|
|
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 }) }),
|
|
2120
|
+
/* @__PURE__ */ e("p", { className: "text-[13px] font-medium", children: le.title }),
|
|
2121
|
+
/* @__PURE__ */ e("p", { className: "text-[12px] text-muted-foreground", children: le.empty })
|
|
2136
2122
|
] }) : /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
|
|
2137
2123
|
/* @__PURE__ */ s("div", { className: "flex h-8 items-center gap-2 border-b border-border px-3", children: [
|
|
2138
|
-
/* @__PURE__ */
|
|
2139
|
-
/* @__PURE__ */
|
|
2124
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: le.title }),
|
|
2125
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] tabular-nums text-muted-foreground/70", children: o.length }),
|
|
2140
2126
|
/* @__PURE__ */ s("div", { className: "ml-auto flex items-center gap-0.5", children: [
|
|
2141
|
-
i && /* @__PURE__ */
|
|
2142
|
-
|
|
2127
|
+
i && /* @__PURE__ */ e(
|
|
2128
|
+
T,
|
|
2143
2129
|
{
|
|
2144
2130
|
variant: "ghost",
|
|
2145
2131
|
size: "xs",
|
|
2146
2132
|
className: "h-6 px-1.5 text-[12px] text-muted-foreground hover:text-foreground",
|
|
2147
|
-
onClick:
|
|
2148
|
-
children:
|
|
2133
|
+
onClick: t.clearFinished,
|
|
2134
|
+
children: le.clear
|
|
2149
2135
|
}
|
|
2150
2136
|
),
|
|
2151
|
-
/* @__PURE__ */
|
|
2152
|
-
|
|
2137
|
+
/* @__PURE__ */ e(
|
|
2138
|
+
T,
|
|
2153
2139
|
{
|
|
2154
2140
|
variant: "ghost",
|
|
2155
2141
|
size: "xs",
|
|
2156
2142
|
className: "h-6 w-6 px-0 text-muted-foreground hover:text-foreground",
|
|
2157
|
-
onClick:
|
|
2143
|
+
onClick: t.refresh,
|
|
2158
2144
|
title: "Refresh status",
|
|
2159
2145
|
"aria-label": "Refresh status",
|
|
2160
|
-
children: /* @__PURE__ */
|
|
2146
|
+
children: /* @__PURE__ */ e(jt, { strokeWidth: 1.75, className: "h-3.5 w-3.5" })
|
|
2161
2147
|
}
|
|
2162
2148
|
)
|
|
2163
2149
|
] })
|
|
2164
2150
|
] }),
|
|
2165
|
-
n && /* @__PURE__ */
|
|
2166
|
-
/* @__PURE__ */
|
|
2151
|
+
n && /* @__PURE__ */ e("p", { className: "border-b border-border px-3 py-2 text-[12px] leading-4 text-muted-foreground", children: le.truncated }),
|
|
2152
|
+
/* @__PURE__ */ e("div", { className: "max-h-[320px] overflow-y-auto", children: /* @__PURE__ */ e("div", { className: "divide-y divide-border/70", children: o.map((r) => /* @__PURE__ */ e(on, { row: r, now: a, api: t }, Wa(r))) }) })
|
|
2167
2153
|
] });
|
|
2168
2154
|
}
|
|
2169
|
-
function
|
|
2170
|
-
if (
|
|
2155
|
+
function ln(t) {
|
|
2156
|
+
if (t)
|
|
2171
2157
|
return {
|
|
2172
|
-
renamed:
|
|
2173
|
-
removedControlId:
|
|
2174
|
-
cardBindingsById:
|
|
2175
|
-
affectedBindingControlIds:
|
|
2158
|
+
renamed: t.type === "rename" ? { oldId: t.oldId, newId: t.newId } : void 0,
|
|
2159
|
+
removedControlId: t.type === "remove" ? t.controlId : void 0,
|
|
2160
|
+
cardBindingsById: t.type === "add" || t.type === "update" ? t.cardBindingsById : void 0,
|
|
2161
|
+
affectedBindingControlIds: t.type === "add" || t.type === "update" ? t.affectedBindingControlIds : void 0
|
|
2176
2162
|
};
|
|
2177
2163
|
}
|
|
2178
|
-
function
|
|
2179
|
-
open:
|
|
2164
|
+
function dn({
|
|
2165
|
+
open: t,
|
|
2180
2166
|
onOpenChange: a,
|
|
2181
2167
|
trigger: o,
|
|
2182
2168
|
showTrigger: n = !0,
|
|
@@ -2189,8 +2175,8 @@ function ln({
|
|
|
2189
2175
|
preventPassiveDismissDuringCreate: u,
|
|
2190
2176
|
resolvedOpen: h,
|
|
2191
2177
|
setIsCreateFlowActive: m
|
|
2192
|
-
} =
|
|
2193
|
-
open:
|
|
2178
|
+
} = Kt({
|
|
2179
|
+
open: t,
|
|
2194
2180
|
onOpenChange: a,
|
|
2195
2181
|
initialCreateFlowActive: i === "create",
|
|
2196
2182
|
// Dialog mode renders a built-in X close button — allow explicit
|
|
@@ -2200,92 +2186,92 @@ function ln({
|
|
|
2200
2186
|
// create and make consumers use `forceClose()` from a dedicated
|
|
2201
2187
|
// button.
|
|
2202
2188
|
dismissMode: n ? "passive" : "explicit-only"
|
|
2203
|
-
}), p = w((C) => C.dashboard), { setDashboardControlsModel: f } =
|
|
2189
|
+
}), p = w((C) => C.dashboard), { setDashboardControlsModel: f } = de(), { participants: g } = qa(Ar(p)), x = Array.from(
|
|
2204
2190
|
new Map(
|
|
2205
2191
|
g.flatMap(
|
|
2206
|
-
(C) => C.fieldChoices.map((
|
|
2207
|
-
var
|
|
2192
|
+
(C) => C.fieldChoices.map((A) => {
|
|
2193
|
+
var k;
|
|
2208
2194
|
return [
|
|
2209
|
-
|
|
2195
|
+
A.value,
|
|
2210
2196
|
{
|
|
2211
|
-
option:
|
|
2212
|
-
target: (
|
|
2197
|
+
option: A,
|
|
2198
|
+
target: (k = C.fieldTargetMap) == null ? void 0 : k[A.value]
|
|
2213
2199
|
}
|
|
2214
2200
|
];
|
|
2215
2201
|
})
|
|
2216
2202
|
)
|
|
2217
2203
|
).values()
|
|
2218
|
-
),
|
|
2204
|
+
), N = Array.from(
|
|
2219
2205
|
new Map(
|
|
2220
2206
|
g.flatMap(
|
|
2221
|
-
(C) => C.metricChoices.map((
|
|
2222
|
-
var
|
|
2207
|
+
(C) => C.metricChoices.map((A) => {
|
|
2208
|
+
var k;
|
|
2223
2209
|
return [
|
|
2224
|
-
|
|
2210
|
+
A.value,
|
|
2225
2211
|
{
|
|
2226
|
-
option:
|
|
2227
|
-
target: (
|
|
2212
|
+
option: A,
|
|
2213
|
+
target: (k = C.metricTargetMap) == null ? void 0 : k[A.value]
|
|
2228
2214
|
}
|
|
2229
2215
|
];
|
|
2230
2216
|
})
|
|
2231
2217
|
)
|
|
2232
2218
|
).values()
|
|
2233
|
-
),
|
|
2219
|
+
), S = Cr({
|
|
2234
2220
|
...p || {},
|
|
2235
2221
|
controls: []
|
|
2236
|
-
}),
|
|
2222
|
+
}), P = Ha(p), U = (C, A, k) => {
|
|
2237
2223
|
f(
|
|
2238
2224
|
C,
|
|
2239
|
-
|
|
2240
|
-
|
|
2225
|
+
A,
|
|
2226
|
+
ln(k)
|
|
2241
2227
|
);
|
|
2242
|
-
},
|
|
2228
|
+
}, F = X(() => {
|
|
2243
2229
|
if (r) {
|
|
2244
2230
|
d();
|
|
2245
2231
|
return;
|
|
2246
2232
|
}
|
|
2247
2233
|
m(!1);
|
|
2248
|
-
}, [r, d, m]), O = /* @__PURE__ */
|
|
2249
|
-
|
|
2234
|
+
}, [r, d, m]), O = /* @__PURE__ */ e(
|
|
2235
|
+
Gt,
|
|
2250
2236
|
{
|
|
2251
2237
|
scope: "dashboard",
|
|
2252
2238
|
controls: p.controls || [],
|
|
2253
|
-
reservedControlIds:
|
|
2239
|
+
reservedControlIds: S,
|
|
2254
2240
|
defaultValues: p.defaultControlValues || {},
|
|
2255
|
-
usageByControlId:
|
|
2256
|
-
availableFieldChoices:
|
|
2257
|
-
availableMetricChoices:
|
|
2241
|
+
usageByControlId: Qa(p),
|
|
2242
|
+
availableFieldChoices: x,
|
|
2243
|
+
availableMetricChoices: N,
|
|
2258
2244
|
structuralParticipants: g,
|
|
2259
|
-
structuralParticipantIdsByControlId:
|
|
2245
|
+
structuralParticipantIdsByControlId: P,
|
|
2260
2246
|
initialCreateFlow: i === "create",
|
|
2261
2247
|
onCreateFlowActiveChange: m,
|
|
2262
|
-
onCreateFlowComplete:
|
|
2263
|
-
onChange:
|
|
2248
|
+
onCreateFlowComplete: F,
|
|
2249
|
+
onChange: U,
|
|
2264
2250
|
emptyMessage: "No dashboard controls yet."
|
|
2265
2251
|
}
|
|
2266
|
-
), b = l ? "Add dashboard control" : "Dashboard Controls",
|
|
2252
|
+
), b = l ? "Add dashboard control" : "Dashboard Controls", I = /* @__PURE__ */ s(R, { children: [
|
|
2267
2253
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
2268
|
-
/* @__PURE__ */
|
|
2269
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ e("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
2255
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control." })
|
|
2270
2256
|
] }),
|
|
2271
2257
|
O
|
|
2272
2258
|
] });
|
|
2273
2259
|
return n ? /* @__PURE__ */ s(Ae, { open: h, onOpenChange: c, children: [
|
|
2274
|
-
/* @__PURE__ */
|
|
2275
|
-
/* @__PURE__ */
|
|
2260
|
+
/* @__PURE__ */ e(qe, { asChild: !0, children: o || /* @__PURE__ */ s(T, { variant: "outline", className: "h-7 px-2", size: "sm", children: [
|
|
2261
|
+
/* @__PURE__ */ e(Ht, { className: "mr-2 h-4 w-4" }),
|
|
2276
2262
|
"Controls"
|
|
2277
2263
|
] }) }),
|
|
2278
|
-
/* @__PURE__ */
|
|
2264
|
+
/* @__PURE__ */ e(
|
|
2279
2265
|
Fe,
|
|
2280
2266
|
{
|
|
2281
2267
|
className: "w-[620px] max-w-[95vw] space-y-4",
|
|
2282
2268
|
align: "end",
|
|
2283
2269
|
onEscapeKeyDown: u,
|
|
2284
2270
|
onPointerDownOutside: u,
|
|
2285
|
-
children:
|
|
2271
|
+
children: I
|
|
2286
2272
|
}
|
|
2287
2273
|
)
|
|
2288
|
-
] }) : /* @__PURE__ */
|
|
2274
|
+
] }) : /* @__PURE__ */ e(Ie, { open: h, onOpenChange: c, children: /* @__PURE__ */ s(
|
|
2289
2275
|
Te,
|
|
2290
2276
|
{
|
|
2291
2277
|
className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
|
|
@@ -2297,9 +2283,9 @@ function ln({
|
|
|
2297
2283
|
{
|
|
2298
2284
|
className: l ? "space-y-0" : void 0,
|
|
2299
2285
|
children: [
|
|
2300
|
-
/* @__PURE__ */
|
|
2301
|
-
/* @__PURE__ */
|
|
2302
|
-
|
|
2286
|
+
/* @__PURE__ */ e(Le, { className: "text-[15px]", children: b }),
|
|
2287
|
+
/* @__PURE__ */ e(
|
|
2288
|
+
vt,
|
|
2303
2289
|
{
|
|
2304
2290
|
className: l ? "sr-only" : "text-[13px]",
|
|
2305
2291
|
children: l ? "Configure and add a shared dashboard control." : "Add shared controls viewers can use across the dashboard. Each card can decide how to respond to the same control."
|
|
@@ -2308,12 +2294,12 @@ function ln({
|
|
|
2308
2294
|
]
|
|
2309
2295
|
}
|
|
2310
2296
|
),
|
|
2311
|
-
/* @__PURE__ */
|
|
2297
|
+
/* @__PURE__ */ e("div", { className: "min-h-0 overflow-y-auto pr-1", children: O })
|
|
2312
2298
|
]
|
|
2313
2299
|
}
|
|
2314
2300
|
) });
|
|
2315
2301
|
}
|
|
2316
|
-
const
|
|
2302
|
+
const cn = [
|
|
2317
2303
|
"enum",
|
|
2318
2304
|
"multi_enum",
|
|
2319
2305
|
"text",
|
|
@@ -2321,12 +2307,12 @@ const dn = [
|
|
|
2321
2307
|
"boolean",
|
|
2322
2308
|
"date"
|
|
2323
2309
|
];
|
|
2324
|
-
function
|
|
2325
|
-
open:
|
|
2310
|
+
function un({
|
|
2311
|
+
open: t,
|
|
2326
2312
|
onOpenChange: a,
|
|
2327
2313
|
initialMode: o = "manage"
|
|
2328
2314
|
}) {
|
|
2329
|
-
var
|
|
2315
|
+
var I;
|
|
2330
2316
|
const n = o === "create", {
|
|
2331
2317
|
forceClose: i,
|
|
2332
2318
|
handleOpenChange: r,
|
|
@@ -2334,58 +2320,58 @@ function cn({
|
|
|
2334
2320
|
preventPassiveDismissDuringCreate: c,
|
|
2335
2321
|
resolvedOpen: l,
|
|
2336
2322
|
setIsCreateFlowActive: u
|
|
2337
|
-
} =
|
|
2338
|
-
open:
|
|
2323
|
+
} = Kt({
|
|
2324
|
+
open: t,
|
|
2339
2325
|
onOpenChange: a,
|
|
2340
2326
|
initialCreateFlowActive: o === "create",
|
|
2341
2327
|
dismissMode: "explicit-only"
|
|
2342
|
-
}), h = w((C) => C.dashboard), m = w((C) => C.selectedSheetId), { setDashboardInputs: p } =
|
|
2328
|
+
}), h = w((C) => C.dashboard), m = w((C) => C.selectedSheetId), { setDashboardInputs: p } = de(), f = (I = h.sheets) == null ? void 0 : I.find(
|
|
2343
2329
|
(C) => C.id === m
|
|
2344
|
-
), g = (f == null ? void 0 : f.kind) === "document" && !!f.document,
|
|
2345
|
-
() => g && (f != null && f.document) ?
|
|
2330
|
+
), g = (f == null ? void 0 : f.kind) === "document" && !!f.document, x = ee(
|
|
2331
|
+
() => g && (f != null && f.document) ? Br(h, f.id) : [],
|
|
2346
2332
|
[h, g, f == null ? void 0 : f.document, f == null ? void 0 : f.id]
|
|
2347
|
-
),
|
|
2348
|
-
() =>
|
|
2333
|
+
), N = ee(
|
|
2334
|
+
() => x.filter(
|
|
2349
2335
|
(C) => C.kind === "control"
|
|
2350
2336
|
),
|
|
2351
|
-
[
|
|
2352
|
-
),
|
|
2353
|
-
() =>
|
|
2354
|
-
[
|
|
2355
|
-
),
|
|
2356
|
-
() =>
|
|
2357
|
-
[
|
|
2358
|
-
),
|
|
2359
|
-
() =>
|
|
2337
|
+
[x]
|
|
2338
|
+
), S = ee(
|
|
2339
|
+
() => N.map((C) => C.control),
|
|
2340
|
+
[N]
|
|
2341
|
+
), P = ee(
|
|
2342
|
+
() => mn(S),
|
|
2343
|
+
[S]
|
|
2344
|
+
), U = ee(
|
|
2345
|
+
() => hn(h),
|
|
2360
2346
|
[h]
|
|
2361
|
-
),
|
|
2347
|
+
), F = X(() => {
|
|
2362
2348
|
if (n) {
|
|
2363
2349
|
i();
|
|
2364
2350
|
return;
|
|
2365
2351
|
}
|
|
2366
2352
|
u(!1);
|
|
2367
|
-
}, [n, i, u]), O =
|
|
2368
|
-
(C,
|
|
2353
|
+
}, [n, i, u]), O = X(
|
|
2354
|
+
(C, A, k) => {
|
|
2369
2355
|
!g || !(f != null && f.document) || p(
|
|
2370
|
-
|
|
2356
|
+
fn({
|
|
2371
2357
|
allInputs: h.inputs || [],
|
|
2372
2358
|
documentSheetId: f.id,
|
|
2373
|
-
currentDocumentInputs:
|
|
2359
|
+
currentDocumentInputs: x,
|
|
2374
2360
|
nextControls: C,
|
|
2375
|
-
nextDefaultValues:
|
|
2376
|
-
change:
|
|
2361
|
+
nextDefaultValues: A,
|
|
2362
|
+
change: k
|
|
2377
2363
|
})
|
|
2378
2364
|
);
|
|
2379
2365
|
},
|
|
2380
2366
|
[
|
|
2381
2367
|
h.inputs,
|
|
2382
|
-
|
|
2368
|
+
x,
|
|
2383
2369
|
g,
|
|
2384
2370
|
f,
|
|
2385
2371
|
p
|
|
2386
2372
|
]
|
|
2387
2373
|
);
|
|
2388
|
-
return !g || !(f != null && f.document) ? null : /* @__PURE__ */
|
|
2374
|
+
return !g || !(f != null && f.document) ? null : /* @__PURE__ */ e(Ie, { open: l, onOpenChange: r, children: /* @__PURE__ */ s(
|
|
2389
2375
|
Te,
|
|
2390
2376
|
{
|
|
2391
2377
|
className: "flex max-h-[88vh] flex-col overflow-hidden sm:max-w-[600px]",
|
|
@@ -2393,31 +2379,31 @@ function cn({
|
|
|
2393
2379
|
onPointerDownOutside: c,
|
|
2394
2380
|
children: [
|
|
2395
2381
|
/* @__PURE__ */ s(bt, { className: d ? "space-y-0" : void 0, children: [
|
|
2396
|
-
/* @__PURE__ */
|
|
2397
|
-
/* @__PURE__ */
|
|
2398
|
-
|
|
2382
|
+
/* @__PURE__ */ e(Le, { className: "text-[15px]", children: d ? "Add document control" : "Document Controls" }),
|
|
2383
|
+
/* @__PURE__ */ e(
|
|
2384
|
+
vt,
|
|
2399
2385
|
{
|
|
2400
2386
|
className: d ? "sr-only" : "text-[13px]",
|
|
2401
2387
|
children: d ? "Configure and add a document-local control input." : "Add document-local control inputs. They are stored on this document sheet and are not dashboard controls."
|
|
2402
2388
|
}
|
|
2403
2389
|
)
|
|
2404
2390
|
] }),
|
|
2405
|
-
/* @__PURE__ */
|
|
2406
|
-
|
|
2391
|
+
/* @__PURE__ */ e("div", { className: "min-h-0 overflow-y-auto pr-1", children: /* @__PURE__ */ e(
|
|
2392
|
+
Gt,
|
|
2407
2393
|
{
|
|
2408
2394
|
scope: "dashboard",
|
|
2409
|
-
controls:
|
|
2410
|
-
reservedControlIds:
|
|
2411
|
-
defaultValues:
|
|
2395
|
+
controls: S,
|
|
2396
|
+
reservedControlIds: U,
|
|
2397
|
+
defaultValues: P,
|
|
2412
2398
|
usageByControlId: {},
|
|
2413
2399
|
availableFieldChoices: [],
|
|
2414
2400
|
availableMetricChoices: [],
|
|
2415
2401
|
structuralParticipants: [],
|
|
2416
2402
|
structuralParticipantIdsByControlId: {},
|
|
2417
|
-
allowedControlTypes:
|
|
2403
|
+
allowedControlTypes: cn,
|
|
2418
2404
|
initialCreateFlow: o === "create",
|
|
2419
2405
|
onCreateFlowActiveChange: u,
|
|
2420
|
-
onCreateFlowComplete:
|
|
2406
|
+
onCreateFlowComplete: F,
|
|
2421
2407
|
onChange: O,
|
|
2422
2408
|
emptyMessage: "No document controls yet."
|
|
2423
2409
|
}
|
|
@@ -2426,23 +2412,23 @@ function cn({
|
|
|
2426
2412
|
}
|
|
2427
2413
|
) });
|
|
2428
2414
|
}
|
|
2429
|
-
function
|
|
2430
|
-
return (
|
|
2415
|
+
function hn(t) {
|
|
2416
|
+
return (t.controls || []).map((a) => a.id);
|
|
2431
2417
|
}
|
|
2432
|
-
function
|
|
2418
|
+
function mn(t) {
|
|
2433
2419
|
const a = {};
|
|
2434
|
-
for (const o of
|
|
2420
|
+
for (const o of t)
|
|
2435
2421
|
o.defaultValue !== void 0 && (a[o.id] = o.defaultValue);
|
|
2436
2422
|
return a;
|
|
2437
2423
|
}
|
|
2438
|
-
function
|
|
2439
|
-
return a ? Object.prototype.hasOwnProperty.call(a,
|
|
2440
|
-
...
|
|
2441
|
-
defaultValue: a[
|
|
2442
|
-
} :
|
|
2424
|
+
function pn(t, a) {
|
|
2425
|
+
return a ? Object.prototype.hasOwnProperty.call(a, t.id) ? {
|
|
2426
|
+
...t,
|
|
2427
|
+
defaultValue: a[t.id]
|
|
2428
|
+
} : t.defaultValue === void 0 ? t : { ...t, defaultValue: void 0 } : t.defaultValue === void 0 ? t : { ...t, defaultValue: void 0 };
|
|
2443
2429
|
}
|
|
2444
|
-
function
|
|
2445
|
-
allInputs:
|
|
2430
|
+
function fn({
|
|
2431
|
+
allInputs: t,
|
|
2446
2432
|
documentSheetId: a,
|
|
2447
2433
|
currentDocumentInputs: o,
|
|
2448
2434
|
nextControls: n,
|
|
@@ -2452,7 +2438,7 @@ function pn({
|
|
|
2452
2438
|
const d = new Map(
|
|
2453
2439
|
n.map((p) => [
|
|
2454
2440
|
p.id,
|
|
2455
|
-
|
|
2441
|
+
pn(p, i)
|
|
2456
2442
|
])
|
|
2457
2443
|
), c = (r == null ? void 0 : r.type) === "rename" ? { oldId: r.oldId, newId: r.newId } : null, l = /* @__PURE__ */ new Set(), u = [];
|
|
2458
2444
|
for (const p of o) {
|
|
@@ -2464,37 +2450,37 @@ function pn({
|
|
|
2464
2450
|
if (!f)
|
|
2465
2451
|
continue;
|
|
2466
2452
|
l.add(f.id);
|
|
2467
|
-
const g =
|
|
2453
|
+
const g = wr(
|
|
2468
2454
|
f.id,
|
|
2469
|
-
[...
|
|
2470
|
-
(
|
|
2455
|
+
[...t, ...u].filter(
|
|
2456
|
+
(N) => N.id !== p.id
|
|
2471
2457
|
)
|
|
2472
|
-
),
|
|
2458
|
+
), x = f.id === g ? f : { ...f, id: g };
|
|
2473
2459
|
u.push({
|
|
2474
2460
|
...p,
|
|
2475
|
-
label:
|
|
2461
|
+
label: x.label,
|
|
2476
2462
|
variableName: g,
|
|
2477
|
-
requiredAtExecution:
|
|
2478
|
-
control:
|
|
2463
|
+
requiredAtExecution: x.requiredAtExecution,
|
|
2464
|
+
control: x
|
|
2479
2465
|
});
|
|
2480
2466
|
}
|
|
2481
2467
|
for (const p of d.values())
|
|
2482
2468
|
l.has(p.id) || u.push(
|
|
2483
|
-
|
|
2469
|
+
Mr({
|
|
2484
2470
|
control: p,
|
|
2485
|
-
existingInputs: [...
|
|
2471
|
+
existingInputs: [...t, ...u],
|
|
2486
2472
|
sheetId: a
|
|
2487
2473
|
})
|
|
2488
2474
|
);
|
|
2489
2475
|
const h = new Set(
|
|
2490
2476
|
o.map((p) => p.id)
|
|
2491
2477
|
);
|
|
2492
|
-
return [...
|
|
2478
|
+
return [...t.filter(
|
|
2493
2479
|
(p) => !h.has(p.id)
|
|
2494
2480
|
), ...u];
|
|
2495
2481
|
}
|
|
2496
|
-
function
|
|
2497
|
-
showFilters:
|
|
2482
|
+
function gn({
|
|
2483
|
+
showFilters: t,
|
|
2498
2484
|
onShowFiltersChange: a,
|
|
2499
2485
|
pickerContent: o,
|
|
2500
2486
|
settingsContent: n,
|
|
@@ -2505,11 +2491,11 @@ function fn({
|
|
|
2505
2491
|
pickerContentClassName: l,
|
|
2506
2492
|
settingsContentClassName: u
|
|
2507
2493
|
}) {
|
|
2508
|
-
const h = i === "toolbar", [m, p] =
|
|
2494
|
+
const h = i === "toolbar", [m, p] = D(!1), f = ot("interactive");
|
|
2509
2495
|
return /* @__PURE__ */ s(
|
|
2510
2496
|
"div",
|
|
2511
2497
|
{
|
|
2512
|
-
className:
|
|
2498
|
+
className: J(
|
|
2513
2499
|
// Height lives on the shell so the outer border is part of the
|
|
2514
2500
|
// h-7 box (matches regular `size="xs"` buttons). Inner triggers
|
|
2515
2501
|
// stretch to fill via `h-full`.
|
|
@@ -2518,28 +2504,28 @@ function fn({
|
|
|
2518
2504
|
r
|
|
2519
2505
|
),
|
|
2520
2506
|
children: [
|
|
2521
|
-
/* @__PURE__ */ s(Ae, { open:
|
|
2522
|
-
/* @__PURE__ */
|
|
2523
|
-
|
|
2507
|
+
/* @__PURE__ */ s(Ae, { open: t, onOpenChange: a, children: [
|
|
2508
|
+
/* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ s(
|
|
2509
|
+
T,
|
|
2524
2510
|
{
|
|
2525
2511
|
variant: "ghost",
|
|
2526
2512
|
size: "xs",
|
|
2527
|
-
className:
|
|
2513
|
+
className: J(
|
|
2528
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",
|
|
2529
2515
|
d
|
|
2530
2516
|
),
|
|
2531
2517
|
children: [
|
|
2532
|
-
|
|
2518
|
+
t ? /* @__PURE__ */ e(Tr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e($t, { className: "h-3.5 w-3.5" }),
|
|
2533
2519
|
"Filter"
|
|
2534
2520
|
]
|
|
2535
2521
|
}
|
|
2536
2522
|
) }),
|
|
2537
|
-
/* @__PURE__ */
|
|
2523
|
+
/* @__PURE__ */ e(
|
|
2538
2524
|
Fe,
|
|
2539
2525
|
{
|
|
2540
2526
|
align: "end",
|
|
2541
2527
|
sideOffset: 6,
|
|
2542
|
-
className:
|
|
2528
|
+
className: J(
|
|
2543
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)]",
|
|
2544
2530
|
l
|
|
2545
2531
|
),
|
|
@@ -2549,25 +2535,25 @@ function fn({
|
|
|
2549
2535
|
)
|
|
2550
2536
|
] }),
|
|
2551
2537
|
/* @__PURE__ */ s(Ae, { open: m, onOpenChange: p, children: [
|
|
2552
|
-
/* @__PURE__ */
|
|
2553
|
-
|
|
2538
|
+
/* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ e(
|
|
2539
|
+
T,
|
|
2554
2540
|
{
|
|
2555
2541
|
variant: "ghost",
|
|
2556
2542
|
size: "xs",
|
|
2557
|
-
className:
|
|
2543
|
+
className: J(
|
|
2558
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",
|
|
2559
2545
|
c
|
|
2560
2546
|
),
|
|
2561
2547
|
"aria-label": "Filter and control actions",
|
|
2562
|
-
children: /* @__PURE__ */
|
|
2548
|
+
children: /* @__PURE__ */ e(wt, { className: "h-3.5 w-3.5" })
|
|
2563
2549
|
}
|
|
2564
2550
|
) }),
|
|
2565
|
-
/* @__PURE__ */
|
|
2551
|
+
/* @__PURE__ */ e(
|
|
2566
2552
|
Fe,
|
|
2567
2553
|
{
|
|
2568
2554
|
align: "end",
|
|
2569
2555
|
sideOffset: 6,
|
|
2570
|
-
className:
|
|
2556
|
+
className: J(
|
|
2571
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)]",
|
|
2572
2558
|
u
|
|
2573
2559
|
),
|
|
@@ -2580,96 +2566,96 @@ function fn({
|
|
|
2580
2566
|
}
|
|
2581
2567
|
);
|
|
2582
2568
|
}
|
|
2583
|
-
function
|
|
2584
|
-
|
|
2585
|
-
const
|
|
2586
|
-
return
|
|
2569
|
+
function bn() {
|
|
2570
|
+
Lr();
|
|
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 = Z((l) => l.card.dataSource);
|
|
2572
|
+
return ve(() => {
|
|
2587
2573
|
var u, h;
|
|
2588
2574
|
let l = n();
|
|
2589
2575
|
if (!l) {
|
|
2590
|
-
const m = (u = o == null ? void 0 : o.sheets) == null ? void 0 : u.find((f) => f.id ===
|
|
2576
|
+
const m = (u = o == null ? void 0 : o.sheets) == null ? void 0 : u.find((f) => f.id === t), p = (h = m == null ? void 0 : m.frames) == null ? void 0 : h[0];
|
|
2591
2577
|
p && (i(p.id), l = p);
|
|
2592
2578
|
}
|
|
2593
2579
|
if (l) {
|
|
2594
2580
|
const m = l.cards.find((p) => p.id === l.activeCardId);
|
|
2595
2581
|
m && r(m);
|
|
2596
2582
|
}
|
|
2597
|
-
}, [n,
|
|
2583
|
+
}, [n, t, a, o, i, r]), {
|
|
2598
2584
|
hasEntities: !!(d != null && d.selectedEntities && d.selectedEntities.length > 0)
|
|
2599
2585
|
};
|
|
2600
2586
|
}
|
|
2601
|
-
function
|
|
2602
|
-
const
|
|
2587
|
+
function vn() {
|
|
2588
|
+
const t = w((l) => l.dashboard), a = w(
|
|
2603
2589
|
(l) => l.semanticExecutionPayload
|
|
2604
2590
|
), o = w(
|
|
2605
2591
|
(l) => l.actions.addFilterInput
|
|
2606
|
-
), { hasEntities: n } =
|
|
2607
|
-
() =>
|
|
2608
|
-
[
|
|
2609
|
-
), c = !
|
|
2592
|
+
), { hasEntities: n } = bn(), { isLoading: i } = Ka(), r = ee(
|
|
2593
|
+
() => Nr(t, a),
|
|
2594
|
+
[t, a]
|
|
2595
|
+
), c = !Sr(t) && r.hasEligibleCards && !i;
|
|
2610
2596
|
return /* @__PURE__ */ s("div", { className: "flex h-[520px] w-[400px] flex-col", children: [
|
|
2611
|
-
c && /* @__PURE__ */
|
|
2597
|
+
c && /* @__PURE__ */ e("div", { className: "border-b border-border/60 p-2", children: /* @__PURE__ */ s(
|
|
2612
2598
|
"button",
|
|
2613
2599
|
{
|
|
2614
2600
|
type: "button",
|
|
2615
|
-
onClick: () => o(
|
|
2601
|
+
onClick: () => o(kr(), {
|
|
2616
2602
|
kind: "allSheets",
|
|
2617
2603
|
sheetKinds: ["dashboard"]
|
|
2618
2604
|
}),
|
|
2619
2605
|
title: `Applies to ${r.eligibleCardCount} of ${r.totalCardCount} date-aware cards`,
|
|
2620
2606
|
className: "flex w-full items-start gap-2 rounded-control px-2 py-1.5 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-border",
|
|
2621
2607
|
children: [
|
|
2622
|
-
/* @__PURE__ */
|
|
2608
|
+
/* @__PURE__ */ e(Rr, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
2623
2609
|
/* @__PURE__ */ s("span", { className: "flex min-w-0 flex-col", children: [
|
|
2624
|
-
/* @__PURE__ */
|
|
2625
|
-
/* @__PURE__ */
|
|
2610
|
+
/* @__PURE__ */ e("span", { className: "text-[12px] font-medium text-foreground", children: "Add global date filter" }),
|
|
2611
|
+
/* @__PURE__ */ e("span", { className: "text-[11px] leading-[1.4] text-muted-foreground", children: "One date range across all date-aware cards." })
|
|
2626
2612
|
] })
|
|
2627
2613
|
]
|
|
2628
2614
|
}
|
|
2629
2615
|
) }),
|
|
2630
2616
|
!n && /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col items-center justify-center px-6 py-8 text-center", children: [
|
|
2631
|
-
/* @__PURE__ */
|
|
2632
|
-
/* @__PURE__ */
|
|
2633
|
-
/* @__PURE__ */
|
|
2617
|
+
/* @__PURE__ */ e(Ga, { className: "mb-3 h-10 w-10 text-muted-foreground/50" }),
|
|
2618
|
+
/* @__PURE__ */ e("h3", { className: "mb-1 text-[13px] font-medium text-foreground", children: "No fields configured" }),
|
|
2619
|
+
/* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Configure a data source for this card to enable filtering." })
|
|
2634
2620
|
] }),
|
|
2635
|
-
n && /* @__PURE__ */
|
|
2621
|
+
n && /* @__PURE__ */ e("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ e(Ya, { context: "filter" }) })
|
|
2636
2622
|
] });
|
|
2637
2623
|
}
|
|
2638
2624
|
function xn({
|
|
2639
|
-
onAddFilter:
|
|
2625
|
+
onAddFilter: t,
|
|
2640
2626
|
onAddControl: a,
|
|
2641
2627
|
onManageControls: o,
|
|
2642
2628
|
onDismiss: n
|
|
2643
2629
|
}) {
|
|
2644
2630
|
const i = w(
|
|
2645
2631
|
(c) => c.dashboard.filterLayout
|
|
2646
|
-
), { setFilterLayout: r } =
|
|
2632
|
+
), { setFilterLayout: r } = de(), d = (i == null ? void 0 : i.toolbarWrap) ?? !1;
|
|
2647
2633
|
return /* @__PURE__ */ s("div", { className: "w-[300px]", children: [
|
|
2648
2634
|
/* @__PURE__ */ s("div", { className: "p-1", children: [
|
|
2649
|
-
/* @__PURE__ */
|
|
2635
|
+
/* @__PURE__ */ e(
|
|
2650
2636
|
rt,
|
|
2651
2637
|
{
|
|
2652
|
-
icon:
|
|
2638
|
+
icon: $t,
|
|
2653
2639
|
label: "Add filter",
|
|
2654
2640
|
onClick: () => {
|
|
2655
|
-
|
|
2641
|
+
t(), n();
|
|
2656
2642
|
}
|
|
2657
2643
|
}
|
|
2658
2644
|
),
|
|
2659
|
-
/* @__PURE__ */
|
|
2645
|
+
/* @__PURE__ */ e(
|
|
2660
2646
|
rt,
|
|
2661
2647
|
{
|
|
2662
|
-
icon:
|
|
2648
|
+
icon: Ht,
|
|
2663
2649
|
label: "Add control",
|
|
2664
2650
|
onClick: () => {
|
|
2665
2651
|
a(), n();
|
|
2666
2652
|
}
|
|
2667
2653
|
}
|
|
2668
2654
|
),
|
|
2669
|
-
/* @__PURE__ */
|
|
2655
|
+
/* @__PURE__ */ e(
|
|
2670
2656
|
rt,
|
|
2671
2657
|
{
|
|
2672
|
-
icon:
|
|
2658
|
+
icon: Wt,
|
|
2673
2659
|
label: "Manage controls",
|
|
2674
2660
|
onClick: () => {
|
|
2675
2661
|
o(), n();
|
|
@@ -2677,11 +2663,11 @@ function xn({
|
|
|
2677
2663
|
}
|
|
2678
2664
|
)
|
|
2679
2665
|
] }),
|
|
2680
|
-
/* @__PURE__ */
|
|
2666
|
+
/* @__PURE__ */ e("div", { className: "border-t border-border/60" }),
|
|
2681
2667
|
/* @__PURE__ */ s("div", { className: "space-y-1 p-2", children: [
|
|
2682
|
-
/* @__PURE__ */
|
|
2683
|
-
/* @__PURE__ */
|
|
2684
|
-
|
|
2668
|
+
/* @__PURE__ */ e("p", { className: "px-1 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: "Display" }),
|
|
2669
|
+
/* @__PURE__ */ e(
|
|
2670
|
+
yn,
|
|
2685
2671
|
{
|
|
2686
2672
|
id: "filter-display-wrap",
|
|
2687
2673
|
label: "Wrap to multiple lines",
|
|
@@ -2693,7 +2679,7 @@ function xn({
|
|
|
2693
2679
|
] });
|
|
2694
2680
|
}
|
|
2695
2681
|
function rt({
|
|
2696
|
-
icon:
|
|
2682
|
+
icon: t,
|
|
2697
2683
|
label: a,
|
|
2698
2684
|
onClick: o
|
|
2699
2685
|
}) {
|
|
@@ -2704,24 +2690,24 @@ function rt({
|
|
|
2704
2690
|
onClick: o,
|
|
2705
2691
|
className: "flex w-full items-center gap-2 rounded-control px-2 py-1.5 text-left text-[13px] text-foreground outline-none transition-colors hover:bg-muted/40 focus-visible:bg-muted/40",
|
|
2706
2692
|
children: [
|
|
2707
|
-
/* @__PURE__ */ t
|
|
2693
|
+
/* @__PURE__ */ e(t, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
2708
2694
|
a
|
|
2709
2695
|
]
|
|
2710
2696
|
}
|
|
2711
2697
|
);
|
|
2712
2698
|
}
|
|
2713
|
-
function
|
|
2714
|
-
id:
|
|
2699
|
+
function yn({
|
|
2700
|
+
id: t,
|
|
2715
2701
|
label: a,
|
|
2716
2702
|
checked: o,
|
|
2717
2703
|
onCheckedChange: n
|
|
2718
2704
|
}) {
|
|
2719
2705
|
return /* @__PURE__ */ s("div", { className: "flex items-center gap-2 rounded-control px-1 py-1 transition-colors hover:bg-muted/40 focus-within:bg-muted/40", children: [
|
|
2720
|
-
/* @__PURE__ */
|
|
2721
|
-
/* @__PURE__ */
|
|
2706
|
+
/* @__PURE__ */ e(gt, { id: t, checked: o, onCheckedChange: n }),
|
|
2707
|
+
/* @__PURE__ */ e(
|
|
2722
2708
|
De,
|
|
2723
2709
|
{
|
|
2724
|
-
htmlFor:
|
|
2710
|
+
htmlFor: t,
|
|
2725
2711
|
className: "cursor-pointer text-[12px] font-normal leading-[1.3]",
|
|
2726
2712
|
children: a
|
|
2727
2713
|
}
|
|
@@ -2729,7 +2715,7 @@ function vn({
|
|
|
2729
2715
|
] });
|
|
2730
2716
|
}
|
|
2731
2717
|
function Ns({
|
|
2732
|
-
size:
|
|
2718
|
+
size: t,
|
|
2733
2719
|
className: a,
|
|
2734
2720
|
primaryButtonClassName: o,
|
|
2735
2721
|
secondaryButtonClassName: n,
|
|
@@ -2737,15 +2723,15 @@ function Ns({
|
|
|
2737
2723
|
settingsContentClassName: r
|
|
2738
2724
|
}) {
|
|
2739
2725
|
var O;
|
|
2740
|
-
const [d, c] =
|
|
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(
|
|
2741
2727
|
(b) => b.id === u
|
|
2742
|
-
),
|
|
2728
|
+
), x = Nt(g), N = X((b) => {
|
|
2743
2729
|
window.setTimeout(() => {
|
|
2744
2730
|
c(b);
|
|
2745
2731
|
}, 0);
|
|
2746
|
-
}, []),
|
|
2732
|
+
}, []), S = X(
|
|
2747
2733
|
(b) => {
|
|
2748
|
-
if (
|
|
2734
|
+
if (x && u) {
|
|
2749
2735
|
b && p(u, {
|
|
2750
2736
|
kind: "document",
|
|
2751
2737
|
group: "inputs"
|
|
@@ -2755,35 +2741,35 @@ function Ns({
|
|
|
2755
2741
|
f(b);
|
|
2756
2742
|
},
|
|
2757
2743
|
[
|
|
2758
|
-
|
|
2744
|
+
x,
|
|
2759
2745
|
u,
|
|
2760
2746
|
p,
|
|
2761
2747
|
f
|
|
2762
2748
|
]
|
|
2763
|
-
),
|
|
2764
|
-
|
|
2765
|
-
}, [
|
|
2766
|
-
|
|
2767
|
-
}, [
|
|
2768
|
-
|
|
2769
|
-
}, [
|
|
2770
|
-
return /* @__PURE__ */ s(
|
|
2771
|
-
/* @__PURE__ */
|
|
2772
|
-
|
|
2749
|
+
), P = X(() => {
|
|
2750
|
+
S(!0);
|
|
2751
|
+
}, [S]), U = X(() => {
|
|
2752
|
+
N("create");
|
|
2753
|
+
}, [N]), F = X(() => {
|
|
2754
|
+
N("manage");
|
|
2755
|
+
}, [N]);
|
|
2756
|
+
return /* @__PURE__ */ s(R, { children: [
|
|
2757
|
+
/* @__PURE__ */ e(
|
|
2758
|
+
gn,
|
|
2773
2759
|
{
|
|
2774
|
-
showFilters:
|
|
2775
|
-
onShowFiltersChange:
|
|
2776
|
-
pickerContent: /* @__PURE__ */
|
|
2777
|
-
settingsContent: (b) => /* @__PURE__ */
|
|
2760
|
+
showFilters: x ? !1 : h,
|
|
2761
|
+
onShowFiltersChange: S,
|
|
2762
|
+
pickerContent: /* @__PURE__ */ e(vn, {}),
|
|
2763
|
+
settingsContent: (b) => /* @__PURE__ */ e(
|
|
2778
2764
|
xn,
|
|
2779
2765
|
{
|
|
2780
|
-
onAddFilter:
|
|
2781
|
-
onAddControl:
|
|
2782
|
-
onManageControls:
|
|
2766
|
+
onAddFilter: P,
|
|
2767
|
+
onAddControl: U,
|
|
2768
|
+
onManageControls: F,
|
|
2783
2769
|
onDismiss: b
|
|
2784
2770
|
}
|
|
2785
2771
|
),
|
|
2786
|
-
size:
|
|
2772
|
+
size: t,
|
|
2787
2773
|
className: a,
|
|
2788
2774
|
primaryButtonClassName: o,
|
|
2789
2775
|
secondaryButtonClassName: n,
|
|
@@ -2791,8 +2777,8 @@ function Ns({
|
|
|
2791
2777
|
settingsContentClassName: r
|
|
2792
2778
|
}
|
|
2793
2779
|
),
|
|
2794
|
-
d ?
|
|
2795
|
-
|
|
2780
|
+
d ? x ? /* @__PURE__ */ e(
|
|
2781
|
+
un,
|
|
2796
2782
|
{
|
|
2797
2783
|
open: !0,
|
|
2798
2784
|
onOpenChange: (b) => {
|
|
@@ -2800,8 +2786,8 @@ function Ns({
|
|
|
2800
2786
|
},
|
|
2801
2787
|
initialMode: d
|
|
2802
2788
|
}
|
|
2803
|
-
) : /* @__PURE__ */
|
|
2804
|
-
|
|
2789
|
+
) : /* @__PURE__ */ e(
|
|
2790
|
+
dn,
|
|
2805
2791
|
{
|
|
2806
2792
|
open: !0,
|
|
2807
2793
|
onOpenChange: (b) => {
|
|
@@ -2813,38 +2799,38 @@ function Ns({
|
|
|
2813
2799
|
) : null
|
|
2814
2800
|
] });
|
|
2815
2801
|
}
|
|
2816
|
-
function
|
|
2817
|
-
disabled:
|
|
2802
|
+
function Cn({
|
|
2803
|
+
disabled: t,
|
|
2818
2804
|
briefingCount: a,
|
|
2819
2805
|
className: o,
|
|
2820
2806
|
onClick: n
|
|
2821
2807
|
}) {
|
|
2822
2808
|
const i = typeof a == "number" && a > 0;
|
|
2823
2809
|
return /* @__PURE__ */ s(
|
|
2824
|
-
|
|
2810
|
+
T,
|
|
2825
2811
|
{
|
|
2826
2812
|
type: "button",
|
|
2827
2813
|
size: "xs",
|
|
2828
2814
|
variant: "outline",
|
|
2829
|
-
disabled:
|
|
2830
|
-
className:
|
|
2815
|
+
disabled: t,
|
|
2816
|
+
className: J("gap-1.5", o),
|
|
2831
2817
|
onClick: n,
|
|
2832
2818
|
"aria-label": "Reports & briefings",
|
|
2833
2819
|
children: [
|
|
2834
|
-
/* @__PURE__ */
|
|
2820
|
+
/* @__PURE__ */ e(jr, { className: "h-3.5 w-3.5" }),
|
|
2835
2821
|
"Reports & briefings",
|
|
2836
|
-
i ? /* @__PURE__ */
|
|
2822
|
+
i ? /* @__PURE__ */ e("span", { className: "ml-0.5 rounded-control bg-muted px-1 text-[10px] tabular-nums text-foreground/70", children: a }) : null
|
|
2837
2823
|
]
|
|
2838
2824
|
}
|
|
2839
2825
|
);
|
|
2840
2826
|
}
|
|
2841
|
-
const
|
|
2842
|
-
function
|
|
2843
|
-
return
|
|
2827
|
+
const wn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", ta = "inline-flex h-7 items-center gap-1.5 rounded-control px-2 text-[12px] text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-50", je = "inline-flex h-7 items-center gap-1.5 rounded-control bg-primary px-3 text-[12px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50";
|
|
2828
|
+
function Nn(t) {
|
|
2829
|
+
return t === "dashboard" ? "This dashboard" : "Project";
|
|
2844
2830
|
}
|
|
2845
|
-
function
|
|
2846
|
-
if (!
|
|
2847
|
-
const a = new Date(
|
|
2831
|
+
function Sn(t) {
|
|
2832
|
+
if (!t) return "Never";
|
|
2833
|
+
const a = new Date(t);
|
|
2848
2834
|
if (Number.isNaN(a.getTime())) return "Unknown";
|
|
2849
2835
|
const o = Date.now() - a.getTime(), n = Math.round(o / 6e4);
|
|
2850
2836
|
if (n < 1) return "now";
|
|
@@ -2856,49 +2842,49 @@ function Nn(e) {
|
|
|
2856
2842
|
const d = Math.round(r / 7);
|
|
2857
2843
|
return d < 5 ? `${d}w ago` : `${Math.round(r / 30)}mo ago`;
|
|
2858
2844
|
}
|
|
2859
|
-
function
|
|
2860
|
-
return
|
|
2861
|
-
|
|
2862
|
-
|
|
2845
|
+
function kn(t) {
|
|
2846
|
+
return t.scheduleExpr ? Pr(
|
|
2847
|
+
t.scheduleExpr,
|
|
2848
|
+
t.timezone || "UTC"
|
|
2863
2849
|
) ?? "Invalid schedule" : "On demand";
|
|
2864
2850
|
}
|
|
2865
|
-
function
|
|
2866
|
-
if (
|
|
2867
|
-
const a =
|
|
2868
|
-
return a === "SUCCESS" ? "Last run completed." : a === "FAILED" ? "Last run failed." : `Last run ${
|
|
2851
|
+
function Dn(t) {
|
|
2852
|
+
if (t.lastRunStatus) {
|
|
2853
|
+
const a = t.lastRunStatus.toString().toUpperCase();
|
|
2854
|
+
return a === "SUCCESS" ? "Last run completed." : a === "FAILED" ? "Last run failed." : `Last run ${t.lastRunStatus.toString().toLowerCase()}`;
|
|
2869
2855
|
}
|
|
2870
2856
|
return null;
|
|
2871
2857
|
}
|
|
2872
|
-
function
|
|
2873
|
-
return
|
|
2858
|
+
function aa(t) {
|
|
2859
|
+
return t.hasActiveRun ? "Running" : t.lastRunStatus ? `Last run ${t.lastRunStatus.toString().toLowerCase()}` : "Idle";
|
|
2874
2860
|
}
|
|
2875
|
-
function
|
|
2876
|
-
return
|
|
2861
|
+
function An(t) {
|
|
2862
|
+
return t.source.type === "dashboard" ? "This dashboard" : "Project";
|
|
2877
2863
|
}
|
|
2878
|
-
function
|
|
2879
|
-
activeView:
|
|
2864
|
+
function Fn({
|
|
2865
|
+
activeView: t,
|
|
2880
2866
|
onChange: a
|
|
2881
2867
|
}) {
|
|
2882
|
-
return /* @__PURE__ */
|
|
2868
|
+
return /* @__PURE__ */ e(
|
|
2883
2869
|
"div",
|
|
2884
2870
|
{
|
|
2885
2871
|
className: "flex shrink-0 items-center gap-1 rounded-control bg-muted p-0.5",
|
|
2886
2872
|
role: "tablist",
|
|
2887
2873
|
"aria-label": "Briefing source view",
|
|
2888
2874
|
children: ["dashboard", "project"].map((o) => {
|
|
2889
|
-
const n =
|
|
2890
|
-
return /* @__PURE__ */
|
|
2875
|
+
const n = t === o;
|
|
2876
|
+
return /* @__PURE__ */ e(
|
|
2891
2877
|
"button",
|
|
2892
2878
|
{
|
|
2893
2879
|
type: "button",
|
|
2894
2880
|
role: "tab",
|
|
2895
2881
|
"aria-selected": n,
|
|
2896
2882
|
onClick: () => a(o),
|
|
2897
|
-
className:
|
|
2883
|
+
className: J(
|
|
2898
2884
|
"h-6 rounded-[3px] px-2 text-[11px] transition-colors",
|
|
2899
2885
|
n ? "bg-background font-medium text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
2900
2886
|
),
|
|
2901
|
-
children:
|
|
2887
|
+
children: Nn(o)
|
|
2902
2888
|
},
|
|
2903
2889
|
o
|
|
2904
2890
|
);
|
|
@@ -2906,8 +2892,8 @@ function An({
|
|
|
2906
2892
|
}
|
|
2907
2893
|
);
|
|
2908
2894
|
}
|
|
2909
|
-
function
|
|
2910
|
-
briefings:
|
|
2895
|
+
function En({
|
|
2896
|
+
briefings: t,
|
|
2911
2897
|
dashboardLabel: a,
|
|
2912
2898
|
sourceView: o,
|
|
2913
2899
|
error: n,
|
|
@@ -2922,59 +2908,59 @@ function Fn({
|
|
|
2922
2908
|
onRunNow: p,
|
|
2923
2909
|
onTogglePause: f,
|
|
2924
2910
|
onDelete: g,
|
|
2925
|
-
selectingId:
|
|
2926
|
-
busyId:
|
|
2927
|
-
manageBriefingsHref:
|
|
2928
|
-
contentKind:
|
|
2929
|
-
hideHeader:
|
|
2911
|
+
selectingId: x,
|
|
2912
|
+
busyId: N,
|
|
2913
|
+
manageBriefingsHref: S,
|
|
2914
|
+
contentKind: P,
|
|
2915
|
+
hideHeader: U = !1
|
|
2930
2916
|
}) {
|
|
2931
|
-
const
|
|
2917
|
+
const F = t.length, O = t.filter((k) => k.status === "ACTIVE").length, b = P === "reports" ? F === 1 ? "report" : "reports" : P === "briefings" ? F === 1 ? "briefing" : "briefings" : F === 1 ? "item" : "items", I = t.find((k) => k.hasActiveRun) ?? null, C = P ?? "reports & briefings", A = o === "dashboard" ? a : `Project ${C}`;
|
|
2932
2918
|
return /* @__PURE__ */ s(
|
|
2933
2919
|
"section",
|
|
2934
2920
|
{
|
|
2935
2921
|
"aria-label": `Dashboard ${C.replace("&", "and")}`,
|
|
2936
2922
|
className: "flex h-full min-h-0 flex-col bg-background text-foreground",
|
|
2937
2923
|
children: [
|
|
2938
|
-
|
|
2924
|
+
U ? null : /* @__PURE__ */ s("header", { className: "flex items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
2939
2925
|
/* @__PURE__ */ s("div", { className: "min-w-0", children: [
|
|
2940
|
-
/* @__PURE__ */
|
|
2941
|
-
/* @__PURE__ */
|
|
2926
|
+
/* @__PURE__ */ e("div", { className: wn, children: C }),
|
|
2927
|
+
/* @__PURE__ */ e("h2", { className: "mt-0.5 truncate text-[14px] font-semibold leading-5", children: A })
|
|
2942
2928
|
] }),
|
|
2943
|
-
/* @__PURE__ */
|
|
2929
|
+
/* @__PURE__ */ e(
|
|
2944
2930
|
"button",
|
|
2945
2931
|
{
|
|
2946
2932
|
type: "button",
|
|
2947
2933
|
onClick: d,
|
|
2948
2934
|
className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
2949
2935
|
"aria-label": `Close ${C.replace("&", "and")} panel`,
|
|
2950
|
-
children: /* @__PURE__ */
|
|
2936
|
+
children: /* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" })
|
|
2951
2937
|
}
|
|
2952
2938
|
)
|
|
2953
2939
|
] }),
|
|
2954
2940
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-3 border-b border-border px-4 py-2", children: [
|
|
2955
2941
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
|
|
2942
|
+
/* @__PURE__ */ e(
|
|
2943
|
+
Fn,
|
|
2958
2944
|
{
|
|
2959
2945
|
activeView: o,
|
|
2960
2946
|
onChange: r
|
|
2961
2947
|
}
|
|
2962
2948
|
),
|
|
2963
|
-
/* @__PURE__ */
|
|
2949
|
+
/* @__PURE__ */ e("div", { className: "flex min-w-0 items-center gap-1.5 text-[11px] text-muted-foreground", children: i && F === 0 ? /* @__PURE__ */ s("span", { children: [
|
|
2964
2950
|
"Loading ",
|
|
2965
2951
|
C,
|
|
2966
2952
|
"…"
|
|
2967
|
-
] }) :
|
|
2953
|
+
] }) : F === 0 ? /* @__PURE__ */ s("span", { children: [
|
|
2968
2954
|
"No ",
|
|
2969
2955
|
C,
|
|
2970
2956
|
" yet"
|
|
2971
|
-
] }) : /* @__PURE__ */ s(
|
|
2957
|
+
] }) : /* @__PURE__ */ s(R, { children: [
|
|
2972
2958
|
/* @__PURE__ */ s("span", { className: "font-medium text-foreground/80", children: [
|
|
2973
|
-
|
|
2959
|
+
F,
|
|
2974
2960
|
" ",
|
|
2975
2961
|
b
|
|
2976
2962
|
] }),
|
|
2977
|
-
/* @__PURE__ */
|
|
2963
|
+
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
2978
2964
|
/* @__PURE__ */ s("span", { children: [
|
|
2979
2965
|
O,
|
|
2980
2966
|
" active"
|
|
@@ -2987,17 +2973,17 @@ function Fn({
|
|
|
2987
2973
|
// when a manual reload is in flight, but don't show a separate
|
|
2988
2974
|
// refresh button — close+reopen handles the rare "stale list"
|
|
2989
2975
|
// case without crowding the toolbar.
|
|
2990
|
-
/* @__PURE__ */
|
|
2976
|
+
/* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" })
|
|
2991
2977
|
) : null,
|
|
2992
|
-
|
|
2993
|
-
/* @__PURE__ */
|
|
2994
|
-
/* @__PURE__ */
|
|
2978
|
+
F > 0 && u ? m && h ? /* @__PURE__ */ s(Ve, { children: [
|
|
2979
|
+
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ s("button", { className: je, children: [
|
|
2980
|
+
/* @__PURE__ */ e(xe, { className: "h-3 w-3" }),
|
|
2995
2981
|
" New"
|
|
2996
2982
|
] }) }),
|
|
2997
|
-
/* @__PURE__ */ s(
|
|
2998
|
-
/* @__PURE__ */
|
|
2999
|
-
/* @__PURE__ */
|
|
3000
|
-
|
|
2983
|
+
/* @__PURE__ */ s(Me, { align: "end", children: [
|
|
2984
|
+
/* @__PURE__ */ e(K, { onClick: () => l("scheduled_report"), children: "Schedule a report" }),
|
|
2985
|
+
/* @__PURE__ */ e(
|
|
2986
|
+
K,
|
|
3001
2987
|
{
|
|
3002
2988
|
onClick: () => l("analytical_briefing"),
|
|
3003
2989
|
children: "Create analytical briefing"
|
|
@@ -3010,7 +2996,7 @@ function Fn({
|
|
|
3010
2996
|
onClick: () => l("scheduled_report"),
|
|
3011
2997
|
className: je,
|
|
3012
2998
|
children: [
|
|
3013
|
-
/* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ e(xe, { className: "h-3 w-3" }),
|
|
3014
3000
|
" Schedule report"
|
|
3015
3001
|
]
|
|
3016
3002
|
}
|
|
@@ -3020,53 +3006,53 @@ function Fn({
|
|
|
3020
3006
|
onClick: () => l("analytical_briefing"),
|
|
3021
3007
|
className: je,
|
|
3022
3008
|
children: [
|
|
3023
|
-
/* @__PURE__ */
|
|
3009
|
+
/* @__PURE__ */ e(xe, { className: "h-3 w-3" }),
|
|
3024
3010
|
" New briefing"
|
|
3025
3011
|
]
|
|
3026
3012
|
}
|
|
3027
3013
|
) : null : null
|
|
3028
3014
|
] })
|
|
3029
3015
|
] }),
|
|
3030
|
-
|
|
3031
|
-
/* @__PURE__ */
|
|
3032
|
-
/* @__PURE__ */
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */
|
|
3016
|
+
I ? /* @__PURE__ */ s("div", { className: "flex items-center gap-2 border-b border-border bg-muted/60 px-4 py-2 text-[12px]", children: [
|
|
3017
|
+
/* @__PURE__ */ e(ae, { className: "h-3 w-3 shrink-0 animate-spin text-muted-foreground" }),
|
|
3018
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: I.name }),
|
|
3019
|
+
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
3020
|
+
/* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: aa(I) })
|
|
3035
3021
|
] }) : null,
|
|
3036
3022
|
/* @__PURE__ */ s("div", { className: "flex-1 overflow-y-auto", children: [
|
|
3037
|
-
n ? /* @__PURE__ */
|
|
3038
|
-
!i &&
|
|
3039
|
-
|
|
3023
|
+
n ? /* @__PURE__ */ e("div", { className: "m-4 rounded-card border border-destructive/30 bg-destructive/10 px-3 py-2 text-[12px] text-destructive", children: n }) : null,
|
|
3024
|
+
!i && t.length === 0 && !n ? /* @__PURE__ */ e(
|
|
3025
|
+
In,
|
|
3040
3026
|
{
|
|
3041
3027
|
onNew: l,
|
|
3042
3028
|
canCreate: u,
|
|
3043
3029
|
canCreateScheduledReport: h,
|
|
3044
3030
|
analyticalBriefingsEnabled: m,
|
|
3045
|
-
contentKind:
|
|
3031
|
+
contentKind: P
|
|
3046
3032
|
}
|
|
3047
3033
|
) : null,
|
|
3048
|
-
|
|
3049
|
-
|
|
3034
|
+
t.map((k) => /* @__PURE__ */ e(
|
|
3035
|
+
Ln,
|
|
3050
3036
|
{
|
|
3051
|
-
briefing:
|
|
3052
|
-
isOpening:
|
|
3053
|
-
isBusy:
|
|
3054
|
-
onOpen: () => c(
|
|
3055
|
-
onRunNow: () => p(
|
|
3056
|
-
onTogglePause: () => f(
|
|
3057
|
-
onDelete: () => g(
|
|
3037
|
+
briefing: k,
|
|
3038
|
+
isOpening: x === k.id,
|
|
3039
|
+
isBusy: N === k.id,
|
|
3040
|
+
onOpen: () => c(k.id),
|
|
3041
|
+
onRunNow: () => p(k),
|
|
3042
|
+
onTogglePause: () => f(k),
|
|
3043
|
+
onDelete: () => g(k)
|
|
3058
3044
|
},
|
|
3059
|
-
|
|
3045
|
+
k.id
|
|
3060
3046
|
))
|
|
3061
3047
|
] }),
|
|
3062
|
-
|
|
3048
|
+
S ? /* @__PURE__ */ e("div", { className: "border-t border-border px-4 py-2.5", children: /* @__PURE__ */ s(
|
|
3063
3049
|
"a",
|
|
3064
3050
|
{
|
|
3065
|
-
href:
|
|
3066
|
-
className:
|
|
3051
|
+
href: S,
|
|
3052
|
+
className: J(ta, "h-6 px-1 text-[11px]"),
|
|
3067
3053
|
children: [
|
|
3068
3054
|
"Manage all reports & briefings",
|
|
3069
|
-
/* @__PURE__ */
|
|
3055
|
+
/* @__PURE__ */ e(Or, { className: "h-3 w-3" })
|
|
3070
3056
|
]
|
|
3071
3057
|
}
|
|
3072
3058
|
) }) : null
|
|
@@ -3074,8 +3060,8 @@ function Fn({
|
|
|
3074
3060
|
}
|
|
3075
3061
|
);
|
|
3076
3062
|
}
|
|
3077
|
-
function
|
|
3078
|
-
onNew:
|
|
3063
|
+
function In({
|
|
3064
|
+
onNew: t,
|
|
3079
3065
|
canCreate: a,
|
|
3080
3066
|
canCreateScheduledReport: o,
|
|
3081
3067
|
analyticalBriefingsEnabled: n,
|
|
@@ -3089,33 +3075,33 @@ function En({
|
|
|
3089
3075
|
description: "Create an analytical briefing to monitor this dashboard and brief your team."
|
|
3090
3076
|
} : null;
|
|
3091
3077
|
return /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center px-8 py-12 text-center", children: [
|
|
3092
|
-
/* @__PURE__ */
|
|
3093
|
-
/* @__PURE__ */
|
|
3094
|
-
/* @__PURE__ */
|
|
3078
|
+
/* @__PURE__ */ e(Tn, { className: "mb-5 h-[88px] w-[112px] text-border" }),
|
|
3079
|
+
/* @__PURE__ */ e("div", { className: "text-[13px] font-medium text-foreground", children: (r == null ? void 0 : r.title) ?? "Have an analyst brief your team" }),
|
|
3080
|
+
/* @__PURE__ */ e("p", { className: "mt-1.5 max-w-[320px] text-[12px] leading-5 text-muted-foreground", children: (r == null ? void 0 : r.description) ?? "Describe what to watch. An analyst digs into this dashboard and the data behind it, then briefs your team on the cadence you choose." }),
|
|
3095
3081
|
a ? /* @__PURE__ */ s("div", { className: "mt-4 flex flex-wrap justify-center gap-2", children: [
|
|
3096
3082
|
o ? /* @__PURE__ */ s(
|
|
3097
3083
|
"button",
|
|
3098
3084
|
{
|
|
3099
|
-
onClick: () =>
|
|
3085
|
+
onClick: () => t("scheduled_report"),
|
|
3100
3086
|
className: je,
|
|
3101
3087
|
children: [
|
|
3102
|
-
/* @__PURE__ */
|
|
3088
|
+
/* @__PURE__ */ e(xe, { className: "h-3 w-3" }),
|
|
3103
3089
|
" Schedule a report"
|
|
3104
3090
|
]
|
|
3105
3091
|
}
|
|
3106
3092
|
) : null,
|
|
3107
|
-
n ? /* @__PURE__ */
|
|
3093
|
+
n ? /* @__PURE__ */ e(
|
|
3108
3094
|
"button",
|
|
3109
3095
|
{
|
|
3110
|
-
onClick: () =>
|
|
3111
|
-
className:
|
|
3096
|
+
onClick: () => t("analytical_briefing"),
|
|
3097
|
+
className: ta,
|
|
3112
3098
|
children: "Create analytical briefing"
|
|
3113
3099
|
}
|
|
3114
3100
|
) : null
|
|
3115
3101
|
] }) : null
|
|
3116
3102
|
] });
|
|
3117
3103
|
}
|
|
3118
|
-
function
|
|
3104
|
+
function Tn({ className: t }) {
|
|
3119
3105
|
return /* @__PURE__ */ s(
|
|
3120
3106
|
"svg",
|
|
3121
3107
|
{
|
|
@@ -3124,9 +3110,9 @@ function In({ className: e }) {
|
|
|
3124
3110
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3125
3111
|
role: "presentation",
|
|
3126
3112
|
"aria-hidden": "true",
|
|
3127
|
-
className:
|
|
3113
|
+
className: t,
|
|
3128
3114
|
children: [
|
|
3129
|
-
/* @__PURE__ */
|
|
3115
|
+
/* @__PURE__ */ e(
|
|
3130
3116
|
"rect",
|
|
3131
3117
|
{
|
|
3132
3118
|
x: "22",
|
|
@@ -3138,7 +3124,7 @@ function In({ className: e }) {
|
|
|
3138
3124
|
strokeWidth: "1.25"
|
|
3139
3125
|
}
|
|
3140
3126
|
),
|
|
3141
|
-
/* @__PURE__ */
|
|
3127
|
+
/* @__PURE__ */ e(
|
|
3142
3128
|
"line",
|
|
3143
3129
|
{
|
|
3144
3130
|
x1: "30",
|
|
@@ -3150,7 +3136,7 @@ function In({ className: e }) {
|
|
|
3150
3136
|
strokeLinecap: "round"
|
|
3151
3137
|
}
|
|
3152
3138
|
),
|
|
3153
|
-
/* @__PURE__ */
|
|
3139
|
+
/* @__PURE__ */ e(
|
|
3154
3140
|
"line",
|
|
3155
3141
|
{
|
|
3156
3142
|
x1: "30",
|
|
@@ -3163,8 +3149,8 @@ function In({ className: e }) {
|
|
|
3163
3149
|
opacity: "0.5"
|
|
3164
3150
|
}
|
|
3165
3151
|
),
|
|
3166
|
-
/* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ e("circle", { cx: "31", cy: "32", r: "1", fill: "currentColor", opacity: "0.6" }),
|
|
3153
|
+
/* @__PURE__ */ e(
|
|
3168
3154
|
"line",
|
|
3169
3155
|
{
|
|
3170
3156
|
x1: "35",
|
|
@@ -3177,8 +3163,8 @@ function In({ className: e }) {
|
|
|
3177
3163
|
strokeLinecap: "round"
|
|
3178
3164
|
}
|
|
3179
3165
|
),
|
|
3180
|
-
/* @__PURE__ */
|
|
3181
|
-
/* @__PURE__ */
|
|
3166
|
+
/* @__PURE__ */ e("circle", { cx: "31", cy: "38", r: "1", fill: "currentColor", opacity: "0.6" }),
|
|
3167
|
+
/* @__PURE__ */ e(
|
|
3182
3168
|
"line",
|
|
3183
3169
|
{
|
|
3184
3170
|
x1: "35",
|
|
@@ -3191,8 +3177,8 @@ function In({ className: e }) {
|
|
|
3191
3177
|
strokeLinecap: "round"
|
|
3192
3178
|
}
|
|
3193
3179
|
),
|
|
3194
|
-
/* @__PURE__ */
|
|
3195
|
-
/* @__PURE__ */
|
|
3180
|
+
/* @__PURE__ */ e("circle", { cx: "31", cy: "44", r: "1", fill: "currentColor", opacity: "0.6" }),
|
|
3181
|
+
/* @__PURE__ */ e(
|
|
3196
3182
|
"line",
|
|
3197
3183
|
{
|
|
3198
3184
|
x1: "35",
|
|
@@ -3205,7 +3191,7 @@ function In({ className: e }) {
|
|
|
3205
3191
|
strokeLinecap: "round"
|
|
3206
3192
|
}
|
|
3207
3193
|
),
|
|
3208
|
-
/* @__PURE__ */
|
|
3194
|
+
/* @__PURE__ */ e(
|
|
3209
3195
|
"rect",
|
|
3210
3196
|
{
|
|
3211
3197
|
x: "30",
|
|
@@ -3217,7 +3203,7 @@ function In({ className: e }) {
|
|
|
3217
3203
|
opacity: "0.55"
|
|
3218
3204
|
}
|
|
3219
3205
|
),
|
|
3220
|
-
/* @__PURE__ */
|
|
3206
|
+
/* @__PURE__ */ e(
|
|
3221
3207
|
"rect",
|
|
3222
3208
|
{
|
|
3223
3209
|
x: "38",
|
|
@@ -3229,7 +3215,7 @@ function In({ className: e }) {
|
|
|
3229
3215
|
opacity: "0.7"
|
|
3230
3216
|
}
|
|
3231
3217
|
),
|
|
3232
|
-
/* @__PURE__ */
|
|
3218
|
+
/* @__PURE__ */ e(
|
|
3233
3219
|
"rect",
|
|
3234
3220
|
{
|
|
3235
3221
|
x: "46",
|
|
@@ -3241,7 +3227,7 @@ function In({ className: e }) {
|
|
|
3241
3227
|
opacity: "0.85"
|
|
3242
3228
|
}
|
|
3243
3229
|
),
|
|
3244
|
-
/* @__PURE__ */
|
|
3230
|
+
/* @__PURE__ */ e(
|
|
3245
3231
|
"rect",
|
|
3246
3232
|
{
|
|
3247
3233
|
x: "54",
|
|
@@ -3253,7 +3239,7 @@ function In({ className: e }) {
|
|
|
3253
3239
|
opacity: "0.6"
|
|
3254
3240
|
}
|
|
3255
3241
|
),
|
|
3256
|
-
/* @__PURE__ */
|
|
3242
|
+
/* @__PURE__ */ e(
|
|
3257
3243
|
"rect",
|
|
3258
3244
|
{
|
|
3259
3245
|
x: "62",
|
|
@@ -3265,7 +3251,7 @@ function In({ className: e }) {
|
|
|
3265
3251
|
opacity: "0.75"
|
|
3266
3252
|
}
|
|
3267
3253
|
),
|
|
3268
|
-
/* @__PURE__ */
|
|
3254
|
+
/* @__PURE__ */ e(
|
|
3269
3255
|
"circle",
|
|
3270
3256
|
{
|
|
3271
3257
|
cx: "86",
|
|
@@ -3276,7 +3262,7 @@ function In({ className: e }) {
|
|
|
3276
3262
|
strokeWidth: "1.25"
|
|
3277
3263
|
}
|
|
3278
3264
|
),
|
|
3279
|
-
/* @__PURE__ */
|
|
3265
|
+
/* @__PURE__ */ e(
|
|
3280
3266
|
"line",
|
|
3281
3267
|
{
|
|
3282
3268
|
x1: "93.5",
|
|
@@ -3292,8 +3278,8 @@ function In({ className: e }) {
|
|
|
3292
3278
|
}
|
|
3293
3279
|
);
|
|
3294
3280
|
}
|
|
3295
|
-
function
|
|
3296
|
-
briefing:
|
|
3281
|
+
function Ln({
|
|
3282
|
+
briefing: t,
|
|
3297
3283
|
isOpening: a,
|
|
3298
3284
|
isBusy: o,
|
|
3299
3285
|
onOpen: n,
|
|
@@ -3301,11 +3287,11 @@ function Tn({
|
|
|
3301
3287
|
onTogglePause: r,
|
|
3302
3288
|
onDelete: d
|
|
3303
3289
|
}) {
|
|
3304
|
-
const c =
|
|
3290
|
+
const c = t.status === "PAUSED", l = t.hasActiveRun, u = Dn(t), h = Sn(t.lastRunAt), m = t.lastRunStatus, p = ie(t), f = m === "SUCCESS" ? ze.success.dot : m === "FAILED" ? ze.danger.dot : m ? ze.warning.dot : ze.neutral.dot;
|
|
3305
3291
|
return /* @__PURE__ */ s(
|
|
3306
3292
|
"div",
|
|
3307
3293
|
{
|
|
3308
|
-
className:
|
|
3294
|
+
className: J(
|
|
3309
3295
|
"group relative border-b border-border/60 px-4 py-3 transition-colors hover:bg-muted/60",
|
|
3310
3296
|
c && "opacity-70"
|
|
3311
3297
|
),
|
|
@@ -3322,18 +3308,18 @@ function Tn({
|
|
|
3322
3308
|
className: "cursor-pointer pr-8",
|
|
3323
3309
|
children: [
|
|
3324
3310
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
3325
|
-
/* @__PURE__ */
|
|
3326
|
-
c ? /* @__PURE__ */
|
|
3311
|
+
/* @__PURE__ */ e("span", { className: "truncate text-[13px] font-medium text-foreground", children: t.name }),
|
|
3312
|
+
c ? /* @__PURE__ */ e("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: "· Paused" }) : null
|
|
3327
3313
|
] }),
|
|
3328
3314
|
/* @__PURE__ */ s("div", { className: "mt-1 flex flex-wrap items-center gap-x-1.5 text-[11px] text-muted-foreground", children: [
|
|
3329
|
-
/* @__PURE__ */
|
|
3330
|
-
/* @__PURE__ */
|
|
3331
|
-
/* @__PURE__ */
|
|
3332
|
-
/* @__PURE__ */
|
|
3333
|
-
/* @__PURE__ */
|
|
3334
|
-
/* @__PURE__ */
|
|
3335
|
-
|
|
3336
|
-
/* @__PURE__ */
|
|
3315
|
+
/* @__PURE__ */ e("span", { children: p.typeLabel }),
|
|
3316
|
+
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
3317
|
+
/* @__PURE__ */ e("span", { children: An(t) }),
|
|
3318
|
+
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
3319
|
+
/* @__PURE__ */ e(Xa, { className: "h-3 w-3" }),
|
|
3320
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: kn(t) }),
|
|
3321
|
+
t.lastRunAt ? /* @__PURE__ */ s(R, { children: [
|
|
3322
|
+
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
3337
3323
|
/* @__PURE__ */ s("span", { children: [
|
|
3338
3324
|
"Last run ",
|
|
3339
3325
|
h
|
|
@@ -3341,74 +3327,74 @@ function Tn({
|
|
|
3341
3327
|
] }) : null
|
|
3342
3328
|
] }),
|
|
3343
3329
|
u || l ? /* @__PURE__ */ s("div", { className: "mt-1.5 flex items-center gap-1.5 text-[12px] leading-[1.5] text-foreground/80", children: [
|
|
3344
|
-
l ? /* @__PURE__ */
|
|
3330
|
+
l ? /* @__PURE__ */ e(ae, { className: "h-3 w-3 shrink-0 animate-spin text-muted-foreground/70" }) : /* @__PURE__ */ e(
|
|
3345
3331
|
"span",
|
|
3346
3332
|
{
|
|
3347
|
-
className:
|
|
3333
|
+
className: J(
|
|
3348
3334
|
"inline-block h-1.5 w-1.5 shrink-0 rounded-full",
|
|
3349
3335
|
f
|
|
3350
3336
|
)
|
|
3351
3337
|
}
|
|
3352
3338
|
),
|
|
3353
|
-
/* @__PURE__ */
|
|
3339
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: l ? aa(t) : u })
|
|
3354
3340
|
] }) : null
|
|
3355
3341
|
]
|
|
3356
3342
|
}
|
|
3357
3343
|
),
|
|
3358
|
-
/* @__PURE__ */
|
|
3359
|
-
/* @__PURE__ */
|
|
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(Ve, { children: [
|
|
3345
|
+
/* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(
|
|
3360
3346
|
"button",
|
|
3361
3347
|
{
|
|
3362
3348
|
type: "button",
|
|
3363
3349
|
onClick: (g) => g.stopPropagation(),
|
|
3364
3350
|
className: "inline-flex h-6 w-6 items-center justify-center rounded-control text-muted-foreground/70 opacity-60 hover:bg-muted hover:text-foreground/80 focus-visible:opacity-100 group-hover:opacity-100",
|
|
3365
3351
|
"aria-label": `${p.noun === "report" ? "Report" : "Briefing"} actions`,
|
|
3366
|
-
children: /* @__PURE__ */
|
|
3352
|
+
children: /* @__PURE__ */ e(zt, { className: "h-3.5 w-3.5" })
|
|
3367
3353
|
}
|
|
3368
3354
|
) }),
|
|
3369
|
-
/* @__PURE__ */ s(
|
|
3370
|
-
/* @__PURE__ */ s(
|
|
3371
|
-
/* @__PURE__ */
|
|
3355
|
+
/* @__PURE__ */ s(Me, { align: "end", className: "w-44", children: [
|
|
3356
|
+
/* @__PURE__ */ s(K, { onClick: n, children: [
|
|
3357
|
+
/* @__PURE__ */ e(Wt, { className: "h-3.5 w-3.5" }),
|
|
3372
3358
|
"Edit ",
|
|
3373
3359
|
p.noun
|
|
3374
3360
|
] }),
|
|
3375
3361
|
/* @__PURE__ */ s(
|
|
3376
|
-
|
|
3362
|
+
K,
|
|
3377
3363
|
{
|
|
3378
3364
|
onClick: (g) => {
|
|
3379
3365
|
g.preventDefault(), i();
|
|
3380
3366
|
},
|
|
3381
3367
|
children: [
|
|
3382
|
-
/* @__PURE__ */
|
|
3368
|
+
/* @__PURE__ */ e(Ja, { className: "h-3.5 w-3.5" }),
|
|
3383
3369
|
"Run now"
|
|
3384
3370
|
]
|
|
3385
3371
|
}
|
|
3386
3372
|
),
|
|
3387
|
-
|
|
3388
|
-
|
|
3373
|
+
t.scheduleExpr ? /* @__PURE__ */ e(
|
|
3374
|
+
K,
|
|
3389
3375
|
{
|
|
3390
3376
|
onClick: (g) => {
|
|
3391
3377
|
g.preventDefault(), r();
|
|
3392
3378
|
},
|
|
3393
|
-
children: c ? /* @__PURE__ */ s(
|
|
3394
|
-
/* @__PURE__ */
|
|
3379
|
+
children: c ? /* @__PURE__ */ s(R, { children: [
|
|
3380
|
+
/* @__PURE__ */ e(Za, { className: "h-3.5 w-3.5" }),
|
|
3395
3381
|
"Resume"
|
|
3396
|
-
] }) : /* @__PURE__ */ s(
|
|
3397
|
-
/* @__PURE__ */
|
|
3382
|
+
] }) : /* @__PURE__ */ s(R, { children: [
|
|
3383
|
+
/* @__PURE__ */ e(er, { className: "h-3.5 w-3.5" }),
|
|
3398
3384
|
"Pause"
|
|
3399
3385
|
] })
|
|
3400
3386
|
}
|
|
3401
3387
|
) : null,
|
|
3402
|
-
/* @__PURE__ */
|
|
3388
|
+
/* @__PURE__ */ e(We, {}),
|
|
3403
3389
|
/* @__PURE__ */ s(
|
|
3404
|
-
|
|
3390
|
+
K,
|
|
3405
3391
|
{
|
|
3406
3392
|
onClick: (g) => {
|
|
3407
3393
|
g.preventDefault(), d();
|
|
3408
3394
|
},
|
|
3409
3395
|
className: "text-destructive focus:bg-destructive/10 focus:text-destructive",
|
|
3410
3396
|
children: [
|
|
3411
|
-
/* @__PURE__ */
|
|
3397
|
+
/* @__PURE__ */ e($e, { className: "h-3.5 w-3.5" }),
|
|
3412
3398
|
"Delete ",
|
|
3413
3399
|
p.noun
|
|
3414
3400
|
]
|
|
@@ -3420,24 +3406,24 @@ function Tn({
|
|
|
3420
3406
|
}
|
|
3421
3407
|
);
|
|
3422
3408
|
}
|
|
3423
|
-
function
|
|
3424
|
-
return (
|
|
3409
|
+
function Vn(t) {
|
|
3410
|
+
return (t == null ? void 0 : t.trim()) || "This dashboard";
|
|
3425
3411
|
}
|
|
3426
|
-
function
|
|
3427
|
-
return
|
|
3412
|
+
function Bn(t) {
|
|
3413
|
+
return t === "This dashboard" ? "Watch this dashboard" : `Watch ${t}`;
|
|
3428
3414
|
}
|
|
3429
|
-
function
|
|
3430
|
-
return a !== "dashboard" ?
|
|
3415
|
+
function Mn(t, a, o) {
|
|
3416
|
+
return a !== "dashboard" ? t : t.filter(
|
|
3431
3417
|
(n) => n.source.type === "dashboard" && n.source.dashboardId === o
|
|
3432
3418
|
);
|
|
3433
3419
|
}
|
|
3434
|
-
async function Pn(
|
|
3420
|
+
async function Pn(t) {
|
|
3435
3421
|
const o = [];
|
|
3436
3422
|
let n = 1, i = 0, r = Number.POSITIVE_INFINITY;
|
|
3437
3423
|
for (; i < r; ) {
|
|
3438
|
-
const d = await
|
|
3439
|
-
|
|
3440
|
-
|
|
3424
|
+
const d = await t.apiClient.listBriefings(
|
|
3425
|
+
t.apiServiceUrl,
|
|
3426
|
+
t.token,
|
|
3441
3427
|
{ scope: "organization", page: n, pageSize: 100 }
|
|
3442
3428
|
);
|
|
3443
3429
|
if (o.push(...d.briefings), i += d.briefings.length, r = d.total, d.briefings.length === 0 || i >= r) break;
|
|
@@ -3445,19 +3431,19 @@ async function Pn(e) {
|
|
|
3445
3431
|
}
|
|
3446
3432
|
return o;
|
|
3447
3433
|
}
|
|
3448
|
-
const
|
|
3449
|
-
listBriefings:
|
|
3450
|
-
getBriefing:
|
|
3451
|
-
pauseBriefing:
|
|
3452
|
-
resumeBriefing:
|
|
3453
|
-
deleteBriefing:
|
|
3454
|
-
runBriefingNow:
|
|
3434
|
+
const Un = {
|
|
3435
|
+
listBriefings: dr,
|
|
3436
|
+
getBriefing: lr,
|
|
3437
|
+
pauseBriefing: ir,
|
|
3438
|
+
resumeBriefing: or,
|
|
3439
|
+
deleteBriefing: sr,
|
|
3440
|
+
runBriefingNow: nr
|
|
3455
3441
|
};
|
|
3456
|
-
function Ss(
|
|
3457
|
-
return /* @__PURE__ */
|
|
3442
|
+
function Ss(t) {
|
|
3443
|
+
return /* @__PURE__ */ e(tr, { authToken: t.token ? { accessToken: t.token } : void 0, children: /* @__PURE__ */ e(ar, { children: /* @__PURE__ */ e(On, { ...t }) }) });
|
|
3458
3444
|
}
|
|
3459
|
-
function
|
|
3460
|
-
dashboardId:
|
|
3445
|
+
function On({
|
|
3446
|
+
dashboardId: t,
|
|
3461
3447
|
dashboardTitle: a,
|
|
3462
3448
|
apiServiceUrl: o,
|
|
3463
3449
|
token: n,
|
|
@@ -3471,64 +3457,64 @@ function Un({
|
|
|
3471
3457
|
openRun: m,
|
|
3472
3458
|
client: p
|
|
3473
3459
|
}) {
|
|
3474
|
-
const { authToken: f, tokenProps: g } = it(),
|
|
3475
|
-
c === void 0 &&
|
|
3476
|
-
}, [O, b] =
|
|
3460
|
+
const { authToken: f, tokenProps: g } = it(), x = rr(), N = !h || x.canCreate && (h === "scheduled_report" || x.analyticalBriefingsEnabled), [S, P] = D(!1), U = c ?? S, F = (y) => {
|
|
3461
|
+
c === void 0 && P(y), l == null || l(y);
|
|
3462
|
+
}, [O, b] = D(
|
|
3477
3463
|
h ? "author" : "list"
|
|
3478
|
-
), [
|
|
3464
|
+
), [I, C] = D(
|
|
3479
3465
|
h ?? "analytical_briefing"
|
|
3480
|
-
), [
|
|
3466
|
+
), [A, k] = D("dashboard"), [j, L] = D(
|
|
3481
3467
|
[]
|
|
3482
|
-
), [
|
|
3468
|
+
), [z, G] = D(null), V = h && !N && !z ? "list" : O, [te, Y] = D(!1), [H, he] = D(null), [ge, Q] = D(null), [_, se] = D(
|
|
3483
3469
|
null
|
|
3484
|
-
), [me, pe] =
|
|
3485
|
-
|
|
3486
|
-
const y =
|
|
3487
|
-
|
|
3488
|
-
}, [
|
|
3489
|
-
const
|
|
3490
|
-
|
|
3470
|
+
), [me, pe] = D(null), Ce = nt(null), Pe = nt(U);
|
|
3471
|
+
ve(() => {
|
|
3472
|
+
const y = U && !Pe.current;
|
|
3473
|
+
Pe.current = U, !(!y || !h) && (G(null), k("dashboard"), C(h), b("author"), pe(null));
|
|
3474
|
+
}, [U, h]);
|
|
3475
|
+
const Xe = yt(), $ = o ?? (g == null ? void 0 : g.apiServiceUrl), W = n ?? (f == null ? void 0 : f.accessToken), re = ee(() => ({ ...Un, ...p }), [p]), [we, Je] = D(null);
|
|
3476
|
+
ve(() => {
|
|
3491
3477
|
if (!m || !$ || !W) return;
|
|
3492
3478
|
let y = !0;
|
|
3493
|
-
return
|
|
3494
|
-
y && (
|
|
3495
|
-
}, (
|
|
3496
|
-
y && E.error(
|
|
3479
|
+
return re.getBriefing($, W, m.briefingId).then(({ briefing: M }) => {
|
|
3480
|
+
y && (G(M), Je(m), b("author"));
|
|
3481
|
+
}, (M) => {
|
|
3482
|
+
y && E.error(M instanceof Error ? M.message : "Could not open the run.");
|
|
3497
3483
|
}), () => {
|
|
3498
3484
|
y = !1;
|
|
3499
3485
|
};
|
|
3500
|
-
}, [m, $, W,
|
|
3501
|
-
const be =
|
|
3502
|
-
const y =
|
|
3486
|
+
}, [m, $, W, re]);
|
|
3487
|
+
const be = Vn(a), Ue = ee(() => {
|
|
3488
|
+
const y = Mn(
|
|
3503
3489
|
j,
|
|
3504
|
-
|
|
3505
|
-
|
|
3490
|
+
A,
|
|
3491
|
+
t
|
|
3506
3492
|
);
|
|
3507
3493
|
if (!h)
|
|
3508
3494
|
return y;
|
|
3509
|
-
const
|
|
3495
|
+
const M = h === "scheduled_report" ? "report" : "briefing";
|
|
3510
3496
|
return y.filter(
|
|
3511
|
-
(Oe) =>
|
|
3497
|
+
(Oe) => ie(Oe).noun === M
|
|
3512
3498
|
);
|
|
3513
|
-
}, [
|
|
3514
|
-
source: { type: "dashboard", dashboardId:
|
|
3499
|
+
}, [t, j, A, h]), Ze = ee(() => A === "dashboard" ? {
|
|
3500
|
+
source: { type: "dashboard", dashboardId: t },
|
|
3515
3501
|
label: be,
|
|
3516
|
-
detail:
|
|
3502
|
+
detail: Bn(be)
|
|
3517
3503
|
} : {
|
|
3518
3504
|
source: { type: "project" },
|
|
3519
3505
|
label: "This project",
|
|
3520
3506
|
detail: "Use any data in this project."
|
|
3521
|
-
}, [
|
|
3522
|
-
canCreate:
|
|
3523
|
-
analyticalBriefingsEnabled:
|
|
3524
|
-
scheduledReportAvailable:
|
|
3525
|
-
}),
|
|
3507
|
+
}, [t, be, A]), Ne = !!($ && W), Se = Ur({
|
|
3508
|
+
canCreate: x.canCreate,
|
|
3509
|
+
analyticalBriefingsEnabled: x.analyticalBriefingsEnabled,
|
|
3510
|
+
scheduledReportAvailable: A === "dashboard"
|
|
3511
|
+
}), ne = X(async () => {
|
|
3526
3512
|
if (!(!$ || !W)) {
|
|
3527
3513
|
Y(!0), pe(null);
|
|
3528
3514
|
try {
|
|
3529
|
-
|
|
3515
|
+
L(
|
|
3530
3516
|
await Pn({
|
|
3531
|
-
apiClient:
|
|
3517
|
+
apiClient: re,
|
|
3532
3518
|
apiServiceUrl: $,
|
|
3533
3519
|
token: W
|
|
3534
3520
|
})
|
|
@@ -3541,27 +3527,27 @@ function Un({
|
|
|
3541
3527
|
Y(!1);
|
|
3542
3528
|
}
|
|
3543
3529
|
}
|
|
3544
|
-
}, [
|
|
3545
|
-
|
|
3546
|
-
!
|
|
3547
|
-
}, [Ne,
|
|
3530
|
+
}, [re, $, W]);
|
|
3531
|
+
ve(() => {
|
|
3532
|
+
!U || V !== "list" || !Ne || ne();
|
|
3533
|
+
}, [Ne, V, ne, U]);
|
|
3548
3534
|
const ke = () => {
|
|
3549
|
-
|
|
3550
|
-
},
|
|
3551
|
-
|
|
3535
|
+
G(null), k("dashboard"), b("list"), F(!0);
|
|
3536
|
+
}, v = (y) => {
|
|
3537
|
+
G(null), C(y), b("author");
|
|
3552
3538
|
}, B = async (y) => {
|
|
3553
3539
|
if (!(!$ || !W)) {
|
|
3554
3540
|
he(y), pe(null);
|
|
3555
3541
|
try {
|
|
3556
|
-
const
|
|
3542
|
+
const M = await re.getBriefing(
|
|
3557
3543
|
$,
|
|
3558
3544
|
W,
|
|
3559
3545
|
y
|
|
3560
3546
|
);
|
|
3561
|
-
|
|
3562
|
-
} catch (
|
|
3547
|
+
G(M.briefing), b("author");
|
|
3548
|
+
} catch (M) {
|
|
3563
3549
|
pe(
|
|
3564
|
-
|
|
3550
|
+
M instanceof Error ? M.message : "Could not open briefing."
|
|
3565
3551
|
);
|
|
3566
3552
|
} finally {
|
|
3567
3553
|
he(null);
|
|
@@ -3571,90 +3557,90 @@ function Un({
|
|
|
3571
3557
|
if (!(!$ || !W)) {
|
|
3572
3558
|
Q(y.id);
|
|
3573
3559
|
try {
|
|
3574
|
-
const
|
|
3560
|
+
const M = await re.runBriefingNow(
|
|
3575
3561
|
$,
|
|
3576
3562
|
W,
|
|
3577
3563
|
y.id,
|
|
3578
|
-
{ requestId:
|
|
3564
|
+
{ requestId: Rn() }
|
|
3579
3565
|
);
|
|
3580
|
-
|
|
3581
|
-
} catch (
|
|
3566
|
+
Xe.track({ kind: "briefing", id: M.run.id, title: y.name, briefingId: y.id }), ne();
|
|
3567
|
+
} catch (M) {
|
|
3582
3568
|
E.error(
|
|
3583
|
-
|
|
3569
|
+
M instanceof Error ? M.message : "Could not start the run."
|
|
3584
3570
|
);
|
|
3585
3571
|
} finally {
|
|
3586
3572
|
Q(null);
|
|
3587
3573
|
}
|
|
3588
3574
|
}
|
|
3589
|
-
},
|
|
3575
|
+
}, oe = async (y) => {
|
|
3590
3576
|
if (!$ || !W) return;
|
|
3591
|
-
const { noun:
|
|
3577
|
+
const { noun: M } = ie(y), Oe = M === "report" ? "Report" : "Briefing";
|
|
3592
3578
|
Q(y.id);
|
|
3593
3579
|
try {
|
|
3594
|
-
const
|
|
3580
|
+
const Re = y.status === "PAUSED" ? await re.resumeBriefing(
|
|
3595
3581
|
$,
|
|
3596
3582
|
W,
|
|
3597
3583
|
y.id
|
|
3598
|
-
) : await
|
|
3584
|
+
) : await re.pauseBriefing(
|
|
3599
3585
|
$,
|
|
3600
3586
|
W,
|
|
3601
3587
|
y.id
|
|
3602
3588
|
);
|
|
3603
3589
|
E.success(
|
|
3604
|
-
|
|
3605
|
-
),
|
|
3606
|
-
} catch (
|
|
3590
|
+
Re.briefing.status === "PAUSED" ? `${Oe} paused` : `${Oe} resumed`
|
|
3591
|
+
), ne();
|
|
3592
|
+
} catch (Re) {
|
|
3607
3593
|
E.error(
|
|
3608
|
-
|
|
3594
|
+
Re instanceof Error ? Re.message : `Could not update the ${M} status.`
|
|
3609
3595
|
);
|
|
3610
3596
|
} finally {
|
|
3611
3597
|
Q(null);
|
|
3612
3598
|
}
|
|
3613
|
-
},
|
|
3599
|
+
}, ce = async () => {
|
|
3614
3600
|
if (!_ || !$ || !W) return;
|
|
3615
3601
|
const y = _;
|
|
3616
3602
|
Q(y.id);
|
|
3617
3603
|
try {
|
|
3618
|
-
await
|
|
3604
|
+
await re.deleteBriefing(
|
|
3619
3605
|
$,
|
|
3620
3606
|
W,
|
|
3621
3607
|
y.id
|
|
3622
3608
|
);
|
|
3623
|
-
const { noun:
|
|
3624
|
-
E.success(`${
|
|
3625
|
-
} catch (
|
|
3609
|
+
const { noun: M } = ie(y);
|
|
3610
|
+
E.success(`${M === "report" ? "Report" : "Briefing"} deleted`), se(null), ne();
|
|
3611
|
+
} catch (M) {
|
|
3626
3612
|
E.error(
|
|
3627
|
-
|
|
3613
|
+
M instanceof Error ? M.message : "Could not delete the briefing."
|
|
3628
3614
|
);
|
|
3629
3615
|
} finally {
|
|
3630
3616
|
Q(null);
|
|
3631
3617
|
}
|
|
3632
|
-
},
|
|
3633
|
-
return
|
|
3634
|
-
u ? null : /* @__PURE__ */
|
|
3635
|
-
|
|
3618
|
+
}, ra = Ue.length;
|
|
3619
|
+
return x.surfaceVisible ? /* @__PURE__ */ s(cr, { open: U, onOpenChange: F, children: [
|
|
3620
|
+
u ? null : /* @__PURE__ */ e(
|
|
3621
|
+
Cn,
|
|
3636
3622
|
{
|
|
3637
3623
|
disabled: i || !Ne,
|
|
3638
|
-
briefingCount:
|
|
3624
|
+
briefingCount: ra,
|
|
3639
3625
|
className: r,
|
|
3640
3626
|
onClick: ke
|
|
3641
3627
|
}
|
|
3642
3628
|
),
|
|
3643
3629
|
/* @__PURE__ */ s(
|
|
3644
|
-
|
|
3630
|
+
ur,
|
|
3645
3631
|
{
|
|
3646
3632
|
ref: Ce,
|
|
3647
3633
|
side: "right",
|
|
3648
3634
|
hideClose: !0,
|
|
3649
3635
|
className: "flex h-full w-full flex-col overflow-hidden p-0 outline-none sm:max-w-[560px]",
|
|
3650
3636
|
onOpenAutoFocus: (y) => {
|
|
3651
|
-
var
|
|
3652
|
-
y.preventDefault(), (
|
|
3637
|
+
var M;
|
|
3638
|
+
y.preventDefault(), (M = Ce.current) == null || M.focus({ preventScroll: !0 });
|
|
3653
3639
|
},
|
|
3654
3640
|
children: [
|
|
3655
|
-
/* @__PURE__ */ s(
|
|
3656
|
-
/* @__PURE__ */
|
|
3657
|
-
/* @__PURE__ */
|
|
3641
|
+
/* @__PURE__ */ s(hr, { className: "sr-only", children: [
|
|
3642
|
+
/* @__PURE__ */ e(mr, { children: "Reports & briefings" }),
|
|
3643
|
+
/* @__PURE__ */ e(pr, { children: "Manage reports and briefings for this dashboard." })
|
|
3658
3644
|
] }),
|
|
3659
3645
|
h ? /* @__PURE__ */ s("div", { className: "flex shrink-0 items-start justify-between gap-3 border-b border-border pl-4 pr-3 pt-2", children: [
|
|
3660
3646
|
/* @__PURE__ */ s(
|
|
@@ -3664,33 +3650,33 @@ function Un({
|
|
|
3664
3650
|
role: "tablist",
|
|
3665
3651
|
"aria-label": h === "scheduled_report" ? "Email report workflow" : "Analytical briefing workflow",
|
|
3666
3652
|
children: [
|
|
3667
|
-
/* @__PURE__ */
|
|
3653
|
+
/* @__PURE__ */ e(
|
|
3668
3654
|
"button",
|
|
3669
3655
|
{
|
|
3670
3656
|
type: "button",
|
|
3671
3657
|
role: "tab",
|
|
3672
|
-
"aria-selected":
|
|
3673
|
-
disabled: !
|
|
3674
|
-
className:
|
|
3658
|
+
"aria-selected": V === "author",
|
|
3659
|
+
disabled: !N,
|
|
3660
|
+
className: J(
|
|
3675
3661
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
3676
|
-
|
|
3677
|
-
!
|
|
3662
|
+
V === "author" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground",
|
|
3663
|
+
!N && "cursor-not-allowed opacity-50"
|
|
3678
3664
|
),
|
|
3679
3665
|
onClick: () => {
|
|
3680
|
-
|
|
3666
|
+
N && (G(null), C(h), k("dashboard"), b("author"));
|
|
3681
3667
|
},
|
|
3682
|
-
children:
|
|
3668
|
+
children: z ? `Edit ${ie(z).noun}` : h === "scheduled_report" ? "Schedule report" : "Create briefing"
|
|
3683
3669
|
}
|
|
3684
3670
|
),
|
|
3685
|
-
/* @__PURE__ */
|
|
3671
|
+
/* @__PURE__ */ e(
|
|
3686
3672
|
"button",
|
|
3687
3673
|
{
|
|
3688
3674
|
type: "button",
|
|
3689
3675
|
role: "tab",
|
|
3690
|
-
"aria-selected":
|
|
3691
|
-
className:
|
|
3676
|
+
"aria-selected": V === "list",
|
|
3677
|
+
className: J(
|
|
3692
3678
|
"-mb-px border-b-2 px-0.5 pb-2 text-[12px] transition-colors",
|
|
3693
|
-
|
|
3679
|
+
V === "list" ? "border-foreground font-medium text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"
|
|
3694
3680
|
),
|
|
3695
3681
|
onClick: () => b("list"),
|
|
3696
3682
|
children: h === "scheduled_report" ? "Manage reports" : "Manage briefings"
|
|
@@ -3699,31 +3685,31 @@ function Un({
|
|
|
3699
3685
|
]
|
|
3700
3686
|
}
|
|
3701
3687
|
),
|
|
3702
|
-
/* @__PURE__ */
|
|
3688
|
+
/* @__PURE__ */ e(
|
|
3703
3689
|
"button",
|
|
3704
3690
|
{
|
|
3705
3691
|
type: "button",
|
|
3706
|
-
onClick: () =>
|
|
3692
|
+
onClick: () => F(!1),
|
|
3707
3693
|
className: "rounded-control p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
3708
3694
|
"aria-label": h === "scheduled_report" ? "Close email report workflow" : "Close analytical briefing workflow",
|
|
3709
|
-
children: /* @__PURE__ */
|
|
3695
|
+
children: /* @__PURE__ */ e(Ye, { className: "h-3.5 w-3.5" })
|
|
3710
3696
|
}
|
|
3711
3697
|
)
|
|
3712
3698
|
] }) : null,
|
|
3713
|
-
|
|
3714
|
-
|
|
3699
|
+
V === "list" ? /* @__PURE__ */ e(
|
|
3700
|
+
En,
|
|
3715
3701
|
{
|
|
3716
3702
|
briefings: Ue,
|
|
3717
3703
|
dashboardLabel: be,
|
|
3718
|
-
sourceView:
|
|
3704
|
+
sourceView: A,
|
|
3719
3705
|
error: me,
|
|
3720
|
-
loading:
|
|
3721
|
-
onSourceViewChange:
|
|
3722
|
-
onClose: () =>
|
|
3706
|
+
loading: te,
|
|
3707
|
+
onSourceViewChange: k,
|
|
3708
|
+
onClose: () => F(!1),
|
|
3723
3709
|
onEdit: (y) => {
|
|
3724
3710
|
B(y);
|
|
3725
3711
|
},
|
|
3726
|
-
onNew:
|
|
3712
|
+
onNew: v,
|
|
3727
3713
|
canCreate: !h && Se.length > 0,
|
|
3728
3714
|
canCreateScheduledReport: Se.includes(
|
|
3729
3715
|
"scheduled_report"
|
|
@@ -3735,78 +3721,78 @@ function Un({
|
|
|
3735
3721
|
q(y);
|
|
3736
3722
|
},
|
|
3737
3723
|
onTogglePause: (y) => {
|
|
3738
|
-
|
|
3724
|
+
oe(y);
|
|
3739
3725
|
},
|
|
3740
|
-
onDelete: (y) =>
|
|
3726
|
+
onDelete: (y) => se(y),
|
|
3741
3727
|
selectingId: H,
|
|
3742
3728
|
busyId: ge,
|
|
3743
3729
|
manageBriefingsHref: d,
|
|
3744
3730
|
contentKind: h === "scheduled_report" ? "reports" : h === "analytical_briefing" ? "briefings" : void 0,
|
|
3745
3731
|
hideHeader: !!h
|
|
3746
3732
|
}
|
|
3747
|
-
) : /* @__PURE__ */
|
|
3748
|
-
|
|
3733
|
+
) : /* @__PURE__ */ e(
|
|
3734
|
+
fr,
|
|
3749
3735
|
{
|
|
3750
3736
|
apiServiceUrl: $,
|
|
3751
3737
|
token: W,
|
|
3752
|
-
briefing:
|
|
3753
|
-
initialRunId: we && (
|
|
3754
|
-
intent:
|
|
3755
|
-
sourceContext:
|
|
3756
|
-
title:
|
|
3738
|
+
briefing: z,
|
|
3739
|
+
initialRunId: we && (z == null ? void 0 : z.id) === we.briefingId ? we.runId : void 0,
|
|
3740
|
+
intent: I,
|
|
3741
|
+
sourceContext: z ? void 0 : Ze,
|
|
3742
|
+
title: z ? `Edit ${ie(z).noun}` : I === "scheduled_report" ? "Schedule report" : "Create analytical briefing",
|
|
3757
3743
|
hideHeader: !!h,
|
|
3758
3744
|
className: "h-full min-h-0 max-w-none border-0 shadow-none",
|
|
3759
3745
|
onBack: h ? void 0 : () => b("list"),
|
|
3760
|
-
onCancel: () =>
|
|
3746
|
+
onCancel: () => F(!1),
|
|
3761
3747
|
onDeleted: () => {
|
|
3762
|
-
const y =
|
|
3763
|
-
E.success(`${y === "report" ? "Report" : "Briefing"} deleted`),
|
|
3748
|
+
const y = z ? ie(z).noun : "briefing";
|
|
3749
|
+
E.success(`${y === "report" ? "Report" : "Briefing"} deleted`), G(null), b("list"), ne();
|
|
3764
3750
|
},
|
|
3765
3751
|
onRunStarted: () => {
|
|
3766
3752
|
},
|
|
3767
3753
|
onSaved: (y) => {
|
|
3768
|
-
|
|
3754
|
+
G(y), ne();
|
|
3769
3755
|
},
|
|
3770
3756
|
onMinimizeRun: () => {
|
|
3771
|
-
|
|
3757
|
+
F(!1);
|
|
3772
3758
|
}
|
|
3773
3759
|
}
|
|
3774
3760
|
)
|
|
3775
3761
|
]
|
|
3776
3762
|
}
|
|
3777
3763
|
),
|
|
3778
|
-
/* @__PURE__ */
|
|
3764
|
+
/* @__PURE__ */ e(
|
|
3779
3765
|
dt,
|
|
3780
3766
|
{
|
|
3781
3767
|
open: !!_,
|
|
3782
3768
|
onOpenChange: (y) => {
|
|
3783
|
-
y ||
|
|
3769
|
+
y || se(null);
|
|
3784
3770
|
},
|
|
3785
3771
|
children: /* @__PURE__ */ s(ct, { children: [
|
|
3786
3772
|
/* @__PURE__ */ s(ut, { children: [
|
|
3787
3773
|
/* @__PURE__ */ s(ht, { children: [
|
|
3788
3774
|
"Delete",
|
|
3789
3775
|
" ",
|
|
3790
|
-
_ ?
|
|
3776
|
+
_ ? ie(_).noun : "briefing",
|
|
3791
3777
|
"?"
|
|
3792
3778
|
] }),
|
|
3793
3779
|
/* @__PURE__ */ s(mt, { children: [
|
|
3794
3780
|
"This permanently deletes ",
|
|
3795
|
-
/* @__PURE__ */
|
|
3781
|
+
/* @__PURE__ */ e("strong", { children: _ == null ? void 0 : _.name }),
|
|
3796
3782
|
". Recipients will stop receiving it."
|
|
3797
3783
|
] })
|
|
3798
3784
|
] }),
|
|
3799
3785
|
/* @__PURE__ */ s(pt, { children: [
|
|
3800
|
-
/* @__PURE__ */
|
|
3786
|
+
/* @__PURE__ */ e(ft, { children: "Cancel" }),
|
|
3801
3787
|
/* @__PURE__ */ s(
|
|
3802
|
-
|
|
3788
|
+
Rt,
|
|
3803
3789
|
{
|
|
3804
3790
|
className: "bg-destructive/90 hover:bg-destructive",
|
|
3805
|
-
onClick:
|
|
3791
|
+
onClick: ce,
|
|
3806
3792
|
children: [
|
|
3807
3793
|
"Delete",
|
|
3808
3794
|
" ",
|
|
3809
|
-
_ ?
|
|
3795
|
+
_ ? ie(_).noun : "briefing"
|
|
3810
3796
|
]
|
|
3811
3797
|
}
|
|
3812
3798
|
)
|
|
@@ -3816,25 +3802,25 @@ function Un({
|
|
|
3816
3802
|
)
|
|
3817
3803
|
] }) : null;
|
|
3818
3804
|
}
|
|
3819
|
-
function
|
|
3805
|
+
function Rn() {
|
|
3820
3806
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
3821
3807
|
}
|
|
3822
3808
|
export {
|
|
3823
3809
|
ms as A,
|
|
3824
3810
|
gs as D,
|
|
3825
3811
|
fs as S,
|
|
3826
|
-
|
|
3812
|
+
vs as T,
|
|
3827
3813
|
ys as U,
|
|
3828
3814
|
cs as V,
|
|
3829
|
-
|
|
3815
|
+
Cn as W,
|
|
3830
3816
|
hs as a,
|
|
3831
3817
|
ps as b,
|
|
3832
3818
|
bs as c,
|
|
3833
|
-
|
|
3819
|
+
xs as d,
|
|
3834
3820
|
ws as e,
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3821
|
+
dn as f,
|
|
3822
|
+
un as g,
|
|
3823
|
+
gn as h,
|
|
3838
3824
|
Cs as i,
|
|
3839
3825
|
Ns as j,
|
|
3840
3826
|
Ss as k,
|