react-semaphor 0.1.556 → 0.1.557
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/DATA_APP_SDK.md +6 -29
- package/dist/analytics-protocol/index.js +19 -20
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +28 -29
- package/dist/briefings/index.js +55 -56
- package/dist/chunks/{assistant-chat-C7Acww1T.js → assistant-chat-WMTpYirZ.js} +78 -80
- package/dist/chunks/{bookmark-state-7iZErWnR.js → bookmark-state-PjQpxbG7.js} +3 -3
- package/dist/chunks/{braces-o9UiRQes.js → braces-BOErQVyi.js} +1 -1
- package/dist/chunks/{comparison-window-caption-BseG5aOZ.js → comparison-window-caption-Dc7BaCMz.js} +186 -189
- package/dist/chunks/{custom-visual-inputs-ChuKjx27.js → custom-visual-inputs-CxYI-gFa.js} +1 -1
- package/dist/chunks/{dashboard-BU6rE5kV.js → dashboard-4D8Vy4pL.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-qrYd2zkN.js → dashboard-briefing-launcher-C4EmOfxs.js} +147 -149
- package/dist/chunks/{dashboard-controls-BsapXI2H.js → dashboard-controls-DBWykmvL.js} +170 -172
- package/dist/chunks/{dashboard-json-CJqPqYnI.js → dashboard-json-DiX-p0F7.js} +20 -21
- package/dist/chunks/{document-dashboard-inputs-BNSprf5_.js → document-dashboard-inputs-DP5hquBR.js} +30 -30
- package/dist/chunks/{edit-dashboard-visual-CjAdV-WG.js → edit-dashboard-visual-n1jLV_7V.js} +4773 -4802
- package/dist/chunks/{filter-reach-copy-BTrqtFkh.js → filter-reach-copy-BB9iakLA.js} +147 -148
- package/dist/chunks/{filter-value-text-CJTJDCym.js → filter-value-text-CUBpotVN.js} +3 -3
- package/dist/chunks/{global-date-filter-utils-CTVf3dG3.js → global-date-filter-utils-Cc5tqkoW.js} +585 -591
- package/dist/chunks/{index-B_vIRa-q.js → index-CgjhzkKM.js} +69 -70
- package/dist/chunks/{layout-grid-Bgzth8vd.js → layout-grid-CcNklCwL.js} +1 -1
- package/dist/chunks/{list-filter-DsaTbM3J.js → list-filter-Ds_4UTpD.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-Cg0ioFGQ.js → matrix-analytical-definition-4GTUDheD.js} +3 -3
- package/dist/chunks/{matrix-card-yYibXSw1.js → matrix-card-fS_4O7zA.js} +2 -2
- package/dist/chunks/{matrix-member-presentation-DEEauKXC.js → matrix-member-presentation-Dj7HaAHC.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-C1G6AJNh.js → matrix-operation-contract-CpgLZ7E5.js} +21 -21
- package/dist/chunks/{metric-comparison-BfcmwxM1.js → metric-comparison-C8LY7GG5.js} +1 -1
- package/dist/chunks/{palette-D10o_yYX.js → palette-DMkIhagj.js} +1 -1
- package/dist/chunks/{matrix-formatter-C2kjsCDf.js → pivot-result-contract-expectations-DMk-mKhG.js} +444 -395
- package/dist/chunks/{pivot-result-identity-CWi5WrrY.js → pivot-result-identity-CrQ54Xbj.js} +1 -1
- package/dist/chunks/{raw-temporal-presentation-DWzLIHc3.js → raw-temporal-presentation-DdEpgPRB.js} +24 -25
- package/dist/chunks/report-preferences-dialog-CFg5VFLk.js +2109 -0
- package/dist/chunks/{report-runtime-context-BgM-iNWB.js → report-runtime-context-CohdtiMg.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-Df8V5QHW.js → resolve-dashboard-input-context-Djl3kCFL.js} +224 -226
- package/dist/chunks/{save-CfJpQQ68.js → save-D1EpMcwT.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-VvXI6r03.js → saved-dashboard-context-umlQFevH.js} +8 -8
- package/dist/chunks/selection-reducer-_d6aKJnj.js +46 -0
- package/dist/chunks/{semaphor-ready-indicator-fejZmdq9.js → semaphor-ready-indicator-4cOp6sla.js} +40458 -43400
- package/dist/chunks/{shelf-drop-preview-context-BuTCXe-S.js → shelf-drop-preview-context-DAtRuvR7.js} +6 -6
- package/dist/chunks/{source-entity-resolution-B46EZIzX.js → source-entity-resolution-DXW1HpKf.js} +1 -1
- package/dist/chunks/{switch-Bq92UGId.js → switch-9CJt5EF_.js} +1430 -1341
- package/dist/chunks/{table-export-sheet-noKl8-en.js → table-export-sheet-CTCTA_bd.js} +1 -1
- package/dist/chunks/{table-settings-PpINOzw8.js → table-settings-DF1gdVQR.js} +2 -2
- package/dist/chunks/temporal-input-presentation-DoSniQj1.js +2939 -0
- package/dist/chunks/{token-types--0bgRCaO.js → token-types-DFyLflLY.js} +1 -1
- package/dist/chunks/{upload-BFX7apKV.js → upload-LSNKpt0w.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-Cz-ve64t.js → use-create-flow-overlay-state-esyMT9vU.js} +124 -126
- package/dist/chunks/{validators-CZo_H4E6.js → validators-hmfNNQz8.js} +5 -5
- package/dist/chunks/zoned-wall-clock-E35Frf9v.js +191 -0
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +130 -131
- package/dist/data-app-sdk/index.js +788 -4153
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.js +5 -5
- package/dist/format-utils/index.js +230 -233
- package/dist/index.js +216 -217
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/data-app-sdk/contracts.d.ts +0 -146
- package/dist/types/data-app-sdk/index.d.ts +0 -2
- package/dist/types/index.js +6 -6
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +1 -7
- package/package.json +1 -3
- package/src/data-app-sdk/README.md +7 -31
- package/dist/chunks/pivot-result-contract-expectations-fKBHFPfz.js +0 -56
- package/dist/chunks/raw-temporal-contract-CjHaUIsE.js +0 -64
- package/dist/chunks/report-preferences-dialog-D_wrbIQt.js +0 -2261
- package/dist/chunks/selection-reducer-By4CSmEF.js +0 -111
- package/dist/chunks/temporal-bucket-DzyadxVY.js +0 -2071
- package/dist/chunks/temporal-input-presentation-CJWS4d0L.js +0 -879
- package/dist/chunks/x-4f5U2XwU.js +0 -100
- package/dist/chunks/zoned-wall-clock-MulfA26h.js +0 -129
- package/dist/types/data-app-sdk/devtools/index.d.ts +0 -49
- package/dist/types/data-app-sdk/devtools.d.ts +0 -1
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import { jsx as t, jsxs as s, Fragment as
|
|
1
|
+
import { jsx as t, jsxs as s, Fragment as z } from "react/jsx-runtime";
|
|
2
2
|
import Vt, { useState as S, useEffect as xe, useCallback as J, useMemo as te, useLayoutEffect as Dt, useRef as nt, useContext as Bt } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { B as I,
|
|
5
|
-
import { L as Ee } from "./layout-grid-
|
|
6
|
-
import { c as fe, X as Xe, C as wt } from "./x-4f5U2XwU.js";
|
|
3
|
+
import { cD as ot, bI as Ie, bJ as Te, bL as Le, cE as ta, b6 as it, b4 as Qe, cF as aa, cG as Ke, cH as lt, a7 as Ge, a4 as ce, u as w, cI as ra, cJ as na, bH as E, cK as sa, a6 as ee, c8 as oa, cL as ia, cM as la, bB as da, a$ as ve, cs as Pt, aS as $e, o as ca, k as ua, cN as ha, cv as dt, cw as ct, cx as ut, cy as ht, cz as mt, cA as pt, cB as ft, cC as Mt, aP as gt, cO as ma, cP as pa, ck as et, ch as Ve, ci as Be, cQ as Ut, cj as Pe, c4 as G, ct as fa, co as We, cR as ga, c2 as ba, bK as bt, bM as xt, cS as xa, bG as va, cT as Ot, bs as vt, cU as ya, bt as Ca, i as wa, cV as Na, bn as Sa, w as ka, t as Da, cW as Aa, cX as Fa, cY as Ea, cZ as K, c_ as Ia, R as zt, c$ as Ta, d0 as La, d1 as Va, d2 as Ba, aM as Pa, d3 as de, d4 as Ma, W as yt, d5 as Ua, d6 as Oa, d7 as za, d8 as Ra, d9 as _a, da as ja, db as $a, dc as Rt, dd as Wa, de as qa, df as Ha, dg as _t, dh as Qa, di as Re, dj as Ka, dk as Ga, dl as Xa, A as Ya, aB as Ja, aC as Za, ah as er, ag as tr, af as ar, ae as rr, ab as nr, a9 as sr, dm as or, dn as ir, dp as lr, dq as dr, dr as cr, az as ur } from "./semaphor-ready-indicator-4cOp6sla.js";
|
|
4
|
+
import { c as fe, B as I, X as Xe, m as De, r as st, L as re, k as jt, d as Ct, j as hr, y as wt, P as Ae, a3 as mr, b as Fe, a as qe, S as $t } from "./switch-9CJt5EF_.js";
|
|
5
|
+
import { L as Ee } from "./layout-grid-CcNklCwL.js";
|
|
7
6
|
import "./index-CuHybtft.js";
|
|
8
|
-
import { o as
|
|
9
|
-
import "./matrix-operation-contract-
|
|
7
|
+
import { o as pr } from "./validators-hmfNNQz8.js";
|
|
8
|
+
import "./matrix-operation-contract-CpgLZ7E5.js";
|
|
10
9
|
import "./analytics-base-schemas-BUFUoO6G.js";
|
|
11
10
|
import "zod";
|
|
12
11
|
import "../value-format-preferences/index.js";
|
|
13
12
|
import { c as Z } from "./_commonjsHelpers-DimLPMtv.js";
|
|
14
|
-
import { S as pr } from "./selection-reducer-By4CSmEF.js";
|
|
15
13
|
import { s as _e } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
16
|
-
import { aL as fr, ay as gr,
|
|
14
|
+
import { aL as fr, ay as gr, e2 as He, v as At, e3 as br, as as Nt, e4 as xr, dq as vr, dc as yr, br as Cr, e5 as wr } from "./global-date-filter-utils-Cc5tqkoW.js";
|
|
17
15
|
import { f as Nr } from "./editor-draft-sync-BN5qYHPF.js";
|
|
18
16
|
import { createPortal as Sr } from "react-dom";
|
|
19
|
-
import "./temporal-input-presentation-
|
|
17
|
+
import "./temporal-input-presentation-DoSniQj1.js";
|
|
20
18
|
import "./index-dIV-Gdsb.js";
|
|
21
|
-
import { J as kr } from "./table-settings-
|
|
22
|
-
import { S as Wt } from "./save-
|
|
23
|
-
import { V as Dr, L as Ar, a as Fr, u as qt, C as Ht, F as Er, b as Ir } from "./use-create-flow-overlay-state-
|
|
24
|
-
import { m as Tr, k as Qt, n as Kt } from "./report-preferences-dialog-
|
|
25
|
-
import {
|
|
26
|
-
import { g as Lr, f as Vr } from "./document-dashboard-inputs-
|
|
27
|
-
import { g as le, d as Br, a as Pr } from "./index-
|
|
19
|
+
import { J as kr } from "./table-settings-DF1gdVQR.js";
|
|
20
|
+
import { S as Wt } from "./save-D1EpMcwT.js";
|
|
21
|
+
import { V as Dr, L as Ar, a as Fr, u as qt, C as Ht, F as Er, b as Ir } from "./use-create-flow-overlay-state-esyMT9vU.js";
|
|
22
|
+
import { m as Tr, k as Qt, n as Kt } from "./report-preferences-dialog-CFg5VFLk.js";
|
|
23
|
+
import { t as Ft } from "./pivot-result-contract-expectations-DMk-mKhG.js";
|
|
24
|
+
import { g as Lr, f as Vr } from "./document-dashboard-inputs-DP5hquBR.js";
|
|
25
|
+
import { g as le, d as Br, a as Pr } from "./index-CgjhzkKM.js";
|
|
28
26
|
/**
|
|
29
27
|
* @license lucide-react v0.453.0 - ISC
|
|
30
28
|
*
|
|
@@ -90,7 +88,7 @@ const It = fe("MonitorSmartphone", [
|
|
|
90
88
|
* This source code is licensed under the ISC license.
|
|
91
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
90
|
*/
|
|
93
|
-
const
|
|
91
|
+
const zr = fe("MousePointer2", [
|
|
94
92
|
[
|
|
95
93
|
"path",
|
|
96
94
|
{
|
|
@@ -105,7 +103,7 @@ const Rr = fe("MousePointer2", [
|
|
|
105
103
|
* This source code is licensed under the ISC license.
|
|
106
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
105
|
*/
|
|
108
|
-
const
|
|
106
|
+
const Rr = fe("Newspaper", [
|
|
109
107
|
[
|
|
110
108
|
"path",
|
|
111
109
|
{
|
|
@@ -227,7 +225,7 @@ function jr({
|
|
|
227
225
|
size: "xs",
|
|
228
226
|
onClick: u,
|
|
229
227
|
disabled: !r.trim() || n,
|
|
230
|
-
children: n ? /* @__PURE__ */ s(
|
|
228
|
+
children: n ? /* @__PURE__ */ s(z, { children: [
|
|
231
229
|
/* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
232
230
|
"Creating..."
|
|
233
231
|
] }) : "Create library visual"
|
|
@@ -419,7 +417,7 @@ function ye() {
|
|
|
419
417
|
(L) => L.inlineFilterValuesMap
|
|
420
418
|
), T = ra((i == null ? void 0 : i.id) || "", {
|
|
421
419
|
enabled: !!(i != null && i.id) && !!(e != null && e.accessToken)
|
|
422
|
-
}),
|
|
420
|
+
}), R = J(
|
|
423
421
|
async (L) => {
|
|
424
422
|
try {
|
|
425
423
|
r(L), F(), A();
|
|
@@ -532,7 +530,7 @@ function ye() {
|
|
|
532
530
|
isLoading: T.isLoading,
|
|
533
531
|
isError: T.isError,
|
|
534
532
|
error: T.error,
|
|
535
|
-
handleEditLibraryVisual:
|
|
533
|
+
handleEditLibraryVisual: R,
|
|
536
534
|
handleAddLibraryVisual: X,
|
|
537
535
|
getUpdatedFrame: Hr().getUpdatedFrame,
|
|
538
536
|
refetch: T.refetch
|
|
@@ -559,13 +557,13 @@ function Qr(e, a) {
|
|
|
559
557
|
}
|
|
560
558
|
function Kr(e) {
|
|
561
559
|
const a = (e || "").toLowerCase();
|
|
562
|
-
return a.includes("table") ? jt : a.includes("pie") || a.includes("donut") ?
|
|
560
|
+
return a.includes("table") ? jt : a.includes("pie") || a.includes("donut") ? ma : a.includes("line") ? pa : a.includes("bar") ? hr : Ee;
|
|
563
561
|
}
|
|
564
562
|
function Gr({ visual: e }) {
|
|
565
563
|
const a = e.ownership.status === "public" ? "Public" : e.ownership.status === "shared" || e.ownership.sharedCount > 0 ? "Shared" : "Private";
|
|
566
564
|
return /* @__PURE__ */ t("span", { className: "inline-flex items-center rounded-[4px] border border-border/60 px-1.5 py-px text-[11px] text-muted-foreground", children: a });
|
|
567
565
|
}
|
|
568
|
-
function
|
|
566
|
+
function cs({
|
|
569
567
|
open: e,
|
|
570
568
|
onOpenChange: a
|
|
571
569
|
}) {
|
|
@@ -582,7 +580,7 @@ function hs({
|
|
|
582
580
|
isLoading: N,
|
|
583
581
|
isError: j,
|
|
584
582
|
createResource: T,
|
|
585
|
-
updateResource:
|
|
583
|
+
updateResource: R,
|
|
586
584
|
deleteResourceAsync: X,
|
|
587
585
|
duplicateResource: L,
|
|
588
586
|
isCreating: ae,
|
|
@@ -692,7 +690,7 @@ function hs({
|
|
|
692
690
|
return;
|
|
693
691
|
}
|
|
694
692
|
const ie = Object.keys(q), ue = ie.length === 1 ? ie[0] : void 0;
|
|
695
|
-
H(m.id, ue),
|
|
693
|
+
H(m.id, ue), R(
|
|
696
694
|
{
|
|
697
695
|
resourceId: m.id,
|
|
698
696
|
data: q
|
|
@@ -709,7 +707,7 @@ function hs({
|
|
|
709
707
|
}, se = (x) => {
|
|
710
708
|
a(x), x || M();
|
|
711
709
|
}, ke = v ? 1 : me.length;
|
|
712
|
-
return /* @__PURE__ */ s(
|
|
710
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
713
711
|
/* @__PURE__ */ t(Ie, { open: e, onOpenChange: se, children: /* @__PURE__ */ s(
|
|
714
712
|
Te,
|
|
715
713
|
{
|
|
@@ -739,7 +737,7 @@ function hs({
|
|
|
739
737
|
] }),
|
|
740
738
|
/* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2 border-b border-border/60 px-3 py-2", children: [
|
|
741
739
|
/* @__PURE__ */ s("div", { className: "relative min-w-[12rem] flex-1 md:max-w-md", children: [
|
|
742
|
-
/* @__PURE__ */ t(
|
|
740
|
+
/* @__PURE__ */ t(da, { className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }),
|
|
743
741
|
/* @__PURE__ */ t(
|
|
744
742
|
"input",
|
|
745
743
|
{
|
|
@@ -793,7 +791,7 @@ function hs({
|
|
|
793
791
|
}
|
|
794
792
|
) }),
|
|
795
793
|
/* @__PURE__ */ s("div", { className: "flex shrink-0 items-center justify-between gap-2 border-t border-border/60 px-3 py-2", children: [
|
|
796
|
-
/* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5", children: r.size > 0 && /* @__PURE__ */ s(
|
|
794
|
+
/* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5", children: r.size > 0 && /* @__PURE__ */ s(z, { children: [
|
|
797
795
|
/* @__PURE__ */ s("span", { className: "text-[12px] text-muted-foreground", children: [
|
|
798
796
|
/* @__PURE__ */ t("span", { className: "font-medium tabular-nums text-foreground", children: r.size }),
|
|
799
797
|
" ",
|
|
@@ -874,15 +872,15 @@ function hs({
|
|
|
874
872
|
}
|
|
875
873
|
),
|
|
876
874
|
u && /* @__PURE__ */ t(
|
|
877
|
-
|
|
875
|
+
ca,
|
|
878
876
|
{
|
|
879
877
|
resource: u,
|
|
880
|
-
resourceType:
|
|
878
|
+
resourceType: ua.VISUAL,
|
|
881
879
|
onClose: () => h(null)
|
|
882
880
|
}
|
|
883
881
|
),
|
|
884
882
|
m && /* @__PURE__ */ t(
|
|
885
|
-
|
|
883
|
+
ha,
|
|
886
884
|
{
|
|
887
885
|
open: !!m,
|
|
888
886
|
resourceLabel: "Visual",
|
|
@@ -1130,7 +1128,7 @@ function Jr({
|
|
|
1130
1128
|
onClick: () => r(e.id),
|
|
1131
1129
|
disabled: d === e.id,
|
|
1132
1130
|
children: [
|
|
1133
|
-
d === e.id ? /* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(
|
|
1131
|
+
d === e.id ? /* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(fa, { className: "h-3.5 w-3.5" }),
|
|
1134
1132
|
d === e.id ? "Duplicating..." : "Duplicate"
|
|
1135
1133
|
]
|
|
1136
1134
|
}
|
|
@@ -1143,7 +1141,7 @@ function Jr({
|
|
|
1143
1141
|
/* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
|
|
1144
1142
|
"Share"
|
|
1145
1143
|
] }),
|
|
1146
|
-
e.permissions.canDelete && /* @__PURE__ */ s(
|
|
1144
|
+
e.permissions.canDelete && /* @__PURE__ */ s(z, { children: [
|
|
1147
1145
|
/* @__PURE__ */ t(We, {}),
|
|
1148
1146
|
/* @__PURE__ */ s(
|
|
1149
1147
|
G,
|
|
@@ -1161,11 +1159,11 @@ function Jr({
|
|
|
1161
1159
|
/* @__PURE__ */ t(We, {}),
|
|
1162
1160
|
/* @__PURE__ */ s("div", { className: "space-y-1 px-2 py-1.5 text-[11px] text-muted-foreground", children: [
|
|
1163
1161
|
Yt(e, l) && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
1164
|
-
/* @__PURE__ */ t(
|
|
1162
|
+
/* @__PURE__ */ t(ga, { className: "h-3 w-3" }),
|
|
1165
1163
|
/* @__PURE__ */ t("span", { className: "truncate", children: St(e, l) })
|
|
1166
1164
|
] }),
|
|
1167
1165
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
|
|
1168
|
-
/* @__PURE__ */ t(
|
|
1166
|
+
/* @__PURE__ */ t(ba, { className: "h-3 w-3" }),
|
|
1169
1167
|
/* @__PURE__ */ t("span", { children: Xt(e.updatedAt) })
|
|
1170
1168
|
] })
|
|
1171
1169
|
] })
|
|
@@ -1177,7 +1175,7 @@ function Jr({
|
|
|
1177
1175
|
}
|
|
1178
1176
|
);
|
|
1179
1177
|
}
|
|
1180
|
-
function
|
|
1178
|
+
function us(e, a, o = !1) {
|
|
1181
1179
|
const n = w((u) => u.dashboard), i = w(
|
|
1182
1180
|
(u) => u.isDashboardEditing
|
|
1183
1181
|
), r = w(
|
|
@@ -1291,7 +1289,7 @@ function Zr({
|
|
|
1291
1289
|
/* @__PURE__ */ s("div", { className: "grid gap-2", children: [
|
|
1292
1290
|
/* @__PURE__ */ t(De, { htmlFor: "description", children: "Description (optional)" }),
|
|
1293
1291
|
/* @__PURE__ */ t(
|
|
1294
|
-
|
|
1292
|
+
xa,
|
|
1295
1293
|
{
|
|
1296
1294
|
id: "description",
|
|
1297
1295
|
value: u,
|
|
@@ -1303,7 +1301,7 @@ function Zr({
|
|
|
1303
1301
|
)
|
|
1304
1302
|
] })
|
|
1305
1303
|
] }),
|
|
1306
|
-
/* @__PURE__ */ s(
|
|
1304
|
+
/* @__PURE__ */ s(va, { children: [
|
|
1307
1305
|
/* @__PURE__ */ t(
|
|
1308
1306
|
I,
|
|
1309
1307
|
{
|
|
@@ -1323,7 +1321,7 @@ function Zr({
|
|
|
1323
1321
|
function kt(e) {
|
|
1324
1322
|
var a;
|
|
1325
1323
|
for (const o of e.cards)
|
|
1326
|
-
if (o.type === "matrixTable" && !
|
|
1324
|
+
if (o.type === "matrixTable" && !pr.safeParse((a = o.config) == null ? void 0 : a.matrix).success)
|
|
1327
1325
|
return E.error("Matrix requires at least one row field, one metric, and valid settings."), !1;
|
|
1328
1326
|
return !0;
|
|
1329
1327
|
}
|
|
@@ -1390,10 +1388,10 @@ function en({
|
|
|
1390
1388
|
className: e,
|
|
1391
1389
|
size: "xs",
|
|
1392
1390
|
variant: a,
|
|
1393
|
-
children: n ? /* @__PURE__ */ s(
|
|
1391
|
+
children: n ? /* @__PURE__ */ s(z, { children: [
|
|
1394
1392
|
/* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
1395
1393
|
"Saving"
|
|
1396
|
-
] }) : /* @__PURE__ */ s(
|
|
1394
|
+
] }) : /* @__PURE__ */ s(z, { children: [
|
|
1397
1395
|
/* @__PURE__ */ t(Wt, { className: "h-3.5 w-3.5" }),
|
|
1398
1396
|
"Save to Library"
|
|
1399
1397
|
] })
|
|
@@ -1453,10 +1451,10 @@ function tn({
|
|
|
1453
1451
|
size: "xs",
|
|
1454
1452
|
variant: "default",
|
|
1455
1453
|
disabled: o,
|
|
1456
|
-
children: o ? /* @__PURE__ */ s(
|
|
1454
|
+
children: o ? /* @__PURE__ */ s(z, { children: [
|
|
1457
1455
|
/* @__PURE__ */ t(re, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
1458
1456
|
"Saving..."
|
|
1459
|
-
] }) : /* @__PURE__ */ s(
|
|
1457
|
+
] }) : /* @__PURE__ */ s(z, { children: [
|
|
1460
1458
|
/* @__PURE__ */ t(Wt, { className: "h-3.5 w-3.5" }),
|
|
1461
1459
|
"Save & Apply"
|
|
1462
1460
|
] })
|
|
@@ -1490,7 +1488,7 @@ function an() {
|
|
|
1490
1488
|
const [e, a] = S(!1), [o, n] = S(!1), [i, r] = S(null), [d, c] = S(null), l = ee((b) => b.frame), u = ee((b) => b.card), h = Ke(), m = w((b) => b.selectedSheetId), p = w((b) => b.dashboard), { getUpdatedFrame: f } = ye(), { selectVisual: g } = lt(), { addFrame: v, setIsVisualEditing: k } = ce(), V = vt(), U = !!(l != null && l.visualId), M = (() => {
|
|
1491
1489
|
var b, F;
|
|
1492
1490
|
return ((b = l == null ? void 0 : l.cards) == null ? void 0 : b.length) === 1 && ((F = l.cards[0]) != null && F.title) ? l.cards[0].title : h != null && h.title ? h.title : (u == null ? void 0 : u.title) || "Untitled Visual";
|
|
1493
|
-
})(), A =
|
|
1491
|
+
})(), A = ya((b) => {
|
|
1494
1492
|
b != null && b.id && (g(b), o && i && d && m && (async () => {
|
|
1495
1493
|
try {
|
|
1496
1494
|
const F = {
|
|
@@ -1580,8 +1578,8 @@ function an() {
|
|
|
1580
1578
|
isSaving: A.isPending
|
|
1581
1579
|
};
|
|
1582
1580
|
}
|
|
1583
|
-
function
|
|
1584
|
-
const { isInspectionMode: a } =
|
|
1581
|
+
function hs(e = {}) {
|
|
1582
|
+
const { isInspectionMode: a } = Ca(), o = ee((T) => T.frame), n = ee((T) => T.editorContext), i = wa((T) => T.selectedVisual), r = w((T) => T.selectedFrameId), d = w((T) => T.selectedSheetId), c = w((T) => T.dashboard), { setIsVisualEditing: l, updateFrame: u } = ce(), [h, m] = S(!1), [p, f] = S("both"), g = vt(), v = (n == null ? void 0 : n.type) === "documentSection", k = !!(o != null && o.visualId || i != null && i.id), V = !!(o != null && o.visualId && r), U = k && !V, {
|
|
1585
1583
|
saveAsDialogOpen: M,
|
|
1586
1584
|
setSaveAsDialogOpen: A,
|
|
1587
1585
|
handleSaveAs: O,
|
|
@@ -1590,7 +1588,7 @@ function ps(e = {}) {
|
|
|
1590
1588
|
isSaving: C
|
|
1591
1589
|
} = an(), { getUpdatedFrame: D } = ye();
|
|
1592
1590
|
if (a)
|
|
1593
|
-
return /* @__PURE__ */ s(
|
|
1591
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
1594
1592
|
/* @__PURE__ */ t(
|
|
1595
1593
|
tt,
|
|
1596
1594
|
{
|
|
@@ -1601,7 +1599,7 @@ function ps(e = {}) {
|
|
|
1601
1599
|
/* @__PURE__ */ t(at, {})
|
|
1602
1600
|
] });
|
|
1603
1601
|
if (v)
|
|
1604
|
-
return /* @__PURE__ */ s(
|
|
1602
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
1605
1603
|
/* @__PURE__ */ t(tt, { className: "rounded-control", variant: "default" }),
|
|
1606
1604
|
/* @__PURE__ */ t(at, {})
|
|
1607
1605
|
] });
|
|
@@ -1612,15 +1610,15 @@ function ps(e = {}) {
|
|
|
1612
1610
|
}
|
|
1613
1611
|
if (h) return;
|
|
1614
1612
|
m(!0);
|
|
1615
|
-
const
|
|
1613
|
+
const R = {
|
|
1616
1614
|
...D(),
|
|
1617
1615
|
visualId: void 0
|
|
1618
|
-
}, X = He(c,
|
|
1616
|
+
}, X = He(c, R.id);
|
|
1619
1617
|
try {
|
|
1620
|
-
const L = await g(
|
|
1618
|
+
const L = await g(R, {
|
|
1621
1619
|
previousFrame: X
|
|
1622
1620
|
});
|
|
1623
|
-
u(d,
|
|
1621
|
+
u(d, R, {
|
|
1624
1622
|
semanticExecutionPayload: L
|
|
1625
1623
|
});
|
|
1626
1624
|
} catch (L) {
|
|
@@ -1635,7 +1633,7 @@ function ps(e = {}) {
|
|
|
1635
1633
|
}, j = (T) => {
|
|
1636
1634
|
f(T), A(!0);
|
|
1637
1635
|
};
|
|
1638
|
-
return /* @__PURE__ */ s(
|
|
1636
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
1639
1637
|
/* @__PURE__ */ s("div", { className: "inline-flex items-center overflow-hidden rounded-control", children: [
|
|
1640
1638
|
!k && /* @__PURE__ */ t(tt, { className: "!rounded-none", variant: "default" }),
|
|
1641
1639
|
k && U && /* @__PURE__ */ t(en, { className: "!rounded-none", variant: "default" }),
|
|
@@ -1658,7 +1656,7 @@ function ps(e = {}) {
|
|
|
1658
1656
|
align: "end",
|
|
1659
1657
|
className: "min-w-[220px] rounded-control border border-border/60 p-1 shadow-sm",
|
|
1660
1658
|
children: [
|
|
1661
|
-
V && /* @__PURE__ */ s(
|
|
1659
|
+
V && /* @__PURE__ */ s(z, { children: [
|
|
1662
1660
|
/* @__PURE__ */ s(
|
|
1663
1661
|
G,
|
|
1664
1662
|
{
|
|
@@ -1727,11 +1725,11 @@ function ps(e = {}) {
|
|
|
1727
1725
|
)
|
|
1728
1726
|
] });
|
|
1729
1727
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const a = ee((h) => h.isDevMode), o = ee((h) => h.card.type), n = w((h) => h.isVisualEditing), { setIsDevMode: i } = Ge(), { config: r } = Bt(
|
|
1728
|
+
function ms({ className: e }) {
|
|
1729
|
+
const a = ee((h) => h.isDevMode), o = ee((h) => h.card.type), n = w((h) => h.isVisualEditing), { setIsDevMode: i } = Ge(), { config: r } = Bt(Na).tokenProps, d = (r == null ? void 0 : r.showAdvancedMode) !== !1;
|
|
1732
1730
|
if (!n || !d || !br(o))
|
|
1733
1731
|
return null;
|
|
1734
|
-
const c = a ?
|
|
1732
|
+
const c = a ? zr : Or, l = a ? "Visual editor" : "SQL editor", u = a ? "Switch to visual editor" : "Switch to SQL editor";
|
|
1735
1733
|
return /* @__PURE__ */ s(
|
|
1736
1734
|
"button",
|
|
1737
1735
|
{
|
|
@@ -1750,7 +1748,7 @@ function fs({ className: e }) {
|
|
|
1750
1748
|
}
|
|
1751
1749
|
);
|
|
1752
1750
|
}
|
|
1753
|
-
function
|
|
1751
|
+
function ps() {
|
|
1754
1752
|
const e = Tr() === "sm", a = w((l) => l.isDashboardEditing), o = w((l) => l.isVisualEditing), n = w((l) => {
|
|
1755
1753
|
var h;
|
|
1756
1754
|
const u = ((h = l.dashboard) == null ? void 0 : h.sheets) ?? [];
|
|
@@ -1812,7 +1810,7 @@ function gs() {
|
|
|
1812
1810
|
] })
|
|
1813
1811
|
] });
|
|
1814
1812
|
}
|
|
1815
|
-
function
|
|
1813
|
+
function fs() {
|
|
1816
1814
|
const e = w((i) => i.screenSizesOpen), a = w((i) => {
|
|
1817
1815
|
var c, l;
|
|
1818
1816
|
const r = ((c = i.dashboard) == null ? void 0 : c.sheets) ?? [], d = r.find((u) => u.id === i.selectedSheetId) ?? r[0];
|
|
@@ -1843,9 +1841,9 @@ function bs() {
|
|
|
1843
1841
|
}
|
|
1844
1842
|
);
|
|
1845
1843
|
}
|
|
1846
|
-
function
|
|
1844
|
+
function gs({ dashboardId: e }) {
|
|
1847
1845
|
const { openDashboardId: a, access: o, printMode: n, serverIsFavorite: i, fetchedAt: r } = w(
|
|
1848
|
-
|
|
1846
|
+
Sa((l) => {
|
|
1849
1847
|
var u;
|
|
1850
1848
|
return {
|
|
1851
1849
|
openDashboardId: (u = l.dashboard) == null ? void 0 : u.id,
|
|
@@ -1855,9 +1853,9 @@ function xs({ dashboardId: e }) {
|
|
|
1855
1853
|
fetchedAt: l.viewer.fetchedAt
|
|
1856
1854
|
};
|
|
1857
1855
|
})
|
|
1858
|
-
), d =
|
|
1856
|
+
), d = ka(), c = d.isFavorite(e, i, r);
|
|
1859
1857
|
return a !== e || n || o === "session-only" ? null : /* @__PURE__ */ t(
|
|
1860
|
-
|
|
1858
|
+
Da,
|
|
1861
1859
|
{
|
|
1862
1860
|
variant: "toolbar",
|
|
1863
1861
|
isFavorite: c,
|
|
@@ -1867,7 +1865,7 @@ function xs({ dashboardId: e }) {
|
|
|
1867
1865
|
}
|
|
1868
1866
|
);
|
|
1869
1867
|
}
|
|
1870
|
-
function
|
|
1868
|
+
function bs({
|
|
1871
1869
|
width: e,
|
|
1872
1870
|
hasOverflowMenu: a = !0,
|
|
1873
1871
|
children: o
|
|
@@ -1893,13 +1891,13 @@ function vs({
|
|
|
1893
1891
|
);
|
|
1894
1892
|
return /* @__PURE__ */ t(Kt.Provider, { value: h, children: o });
|
|
1895
1893
|
}
|
|
1896
|
-
function
|
|
1894
|
+
function xs() {
|
|
1897
1895
|
const { setAnchorSlot: e } = Bt(Kt);
|
|
1898
1896
|
return /* @__PURE__ */ t("span", { ref: e, "aria-hidden": !0, className: "relative -mr-1.5 block h-7 w-0" });
|
|
1899
1897
|
}
|
|
1900
|
-
function
|
|
1898
|
+
function vs(e) {
|
|
1901
1899
|
var l;
|
|
1902
|
-
const { authToken: a, tokenProps: o } = it(), { data: n } =
|
|
1900
|
+
const { authToken: a, tokenProps: o } = it(), { data: n } = Aa(), { mutate: i, isPending: r } = Fa(), d = !!e && ((l = n == null ? void 0 : n.preference) == null ? void 0 : l.defaultDashboardId) === e, c = !n || r;
|
|
1903
1901
|
return {
|
|
1904
1902
|
available: !!e && !!(a != null && a.accessToken) && !!(o != null && o.apiServiceUrl),
|
|
1905
1903
|
isDefault: d,
|
|
@@ -1909,7 +1907,7 @@ function Cs(e) {
|
|
|
1909
1907
|
}
|
|
1910
1908
|
};
|
|
1911
1909
|
}
|
|
1912
|
-
function
|
|
1910
|
+
function ys({
|
|
1913
1911
|
open: e,
|
|
1914
1912
|
onOpenChange: a,
|
|
1915
1913
|
onSave: o,
|
|
@@ -1942,14 +1940,14 @@ function ws({
|
|
|
1942
1940
|
}
|
|
1943
1941
|
),
|
|
1944
1942
|
/* @__PURE__ */ t(ft, { disabled: i, children: c }),
|
|
1945
|
-
/* @__PURE__ */ t(I, { type: "button", size: "xs", onClick: o, disabled: i, children: i ? /* @__PURE__ */ s(
|
|
1943
|
+
/* @__PURE__ */ t(I, { type: "button", size: "xs", onClick: o, disabled: i, children: i ? /* @__PURE__ */ s(z, { children: [
|
|
1946
1944
|
/* @__PURE__ */ t(re, { className: "mr-2 h-3.5 w-3.5 animate-spin" }),
|
|
1947
1945
|
"Saving..."
|
|
1948
1946
|
] }) : u })
|
|
1949
1947
|
] })
|
|
1950
1948
|
] }) });
|
|
1951
1949
|
}
|
|
1952
|
-
async function
|
|
1950
|
+
async function Cs(e) {
|
|
1953
1951
|
var r, d;
|
|
1954
1952
|
const a = (d = (r = w.getState()) == null ? void 0 : r.authToken) == null ? void 0 : d.accessToken;
|
|
1955
1953
|
if (!a)
|
|
@@ -1992,7 +1990,7 @@ function nn(e) {
|
|
|
1992
1990
|
running: rn(a.stage),
|
|
1993
1991
|
finishedDetail: [
|
|
1994
1992
|
a.totalRows !== null ? `${a.totalRows.toLocaleString("en-US")} rows` : null,
|
|
1995
|
-
a.fileSize ?
|
|
1993
|
+
a.fileSize ? Pa(a.fileSize) : null
|
|
1996
1994
|
].filter((n) => !!n),
|
|
1997
1995
|
failure: ((o = a.failure) == null ? void 0 : o.kind) === "export" ? a.failure.message : a.status === "failed" ? K.failedFallback : null,
|
|
1998
1996
|
note: null
|
|
@@ -2008,32 +2006,32 @@ function nn(e) {
|
|
|
2008
2006
|
};
|
|
2009
2007
|
}
|
|
2010
2008
|
function sn({ row: e, now: a, api: o }) {
|
|
2011
|
-
const [n, i] = S("idle"), r = nn(e), d =
|
|
2009
|
+
const [n, i] = S("idle"), r = nn(e), d = Ea(e, o), c = async () => {
|
|
2012
2010
|
if (!d) return;
|
|
2013
2011
|
i("working");
|
|
2014
|
-
const g = await
|
|
2012
|
+
const g = await Ma(o, e, d);
|
|
2015
2013
|
i(g === "done" ? "idle" : g);
|
|
2016
|
-
}, 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" ? K.ready : r.status === "failed" ? K.failed : r.status === "cancelled" ? K.cancelled : K.inProgress, h = Date.parse(r.startedAt), m = Ft(Date.parse(r.finishedAt ?? r.startedAt), a, { addSuffix: !0 }), p = r.status === "running" && e.item.kind === "export" && a - h >=
|
|
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" ? K.ready : r.status === "failed" ? K.failed : r.status === "cancelled" ? K.cancelled : K.inProgress, h = Date.parse(r.startedAt), m = Ft(Date.parse(r.finishedAt ?? r.startedAt), a, { addSuffix: !0 }), p = r.status === "running" && e.item.kind === "export" && a - h >= Ia, f = /* @__PURE__ */ t("span", { className: "text-muted-foreground/50", children: "·" });
|
|
2017
2015
|
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: [
|
|
2018
2016
|
/* @__PURE__ */ t("span", { className: "flex h-5 shrink-0 items-center", "aria-hidden": "true", children: /* @__PURE__ */ t("span", { className: `h-1.5 w-1.5 rounded-full ${l}` }) }),
|
|
2019
2017
|
/* @__PURE__ */ t("span", { className: "sr-only", children: u }),
|
|
2020
2018
|
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
|
|
2021
2019
|
/* @__PURE__ */ s("div", { className: "flex h-5 items-center gap-2", children: [
|
|
2022
2020
|
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-[13px] font-medium leading-5", children: r.title }),
|
|
2023
|
-
d && n === "working" && /* @__PURE__ */ t("span", { role: "status", className: "inline-flex shrink-0 items-center gap-1.5 text-[12px] text-muted-foreground", children: /* @__PURE__ */ t(
|
|
2021
|
+
d && n === "working" && /* @__PURE__ */ t("span", { role: "status", className: "inline-flex shrink-0 items-center gap-1.5 text-[12px] text-muted-foreground", children: /* @__PURE__ */ t(zt, { className: "h-3 w-3 animate-spin", strokeWidth: 1.75 }) }),
|
|
2024
2022
|
d && n !== "working" && /* @__PURE__ */ t(
|
|
2025
2023
|
"button",
|
|
2026
2024
|
{
|
|
2027
2025
|
type: "button",
|
|
2028
2026
|
onClick: () => void c(),
|
|
2029
2027
|
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",
|
|
2030
|
-
children:
|
|
2028
|
+
children: Ta[d]
|
|
2031
2029
|
}
|
|
2032
2030
|
)
|
|
2033
2031
|
] }),
|
|
2034
2032
|
r.status === "running" && r.running && /* @__PURE__ */ s("div", { className: "text-[12px] leading-4 text-muted-foreground", children: [
|
|
2035
2033
|
/* @__PURE__ */ t("span", { className: "tabular-nums", children: r.running.text }),
|
|
2036
|
-
r.running.detail && /* @__PURE__ */ s(
|
|
2034
|
+
r.running.detail && /* @__PURE__ */ s(z, { children: [
|
|
2037
2035
|
" ",
|
|
2038
2036
|
f,
|
|
2039
2037
|
" ",
|
|
@@ -2043,7 +2041,7 @@ function sn({ row: e, now: a, api: o }) {
|
|
|
2043
2041
|
f,
|
|
2044
2042
|
" ",
|
|
2045
2043
|
/* @__PURE__ */ t("span", { children: K.started(Ft(h, a)) }),
|
|
2046
|
-
r.running.bar !== void 0 && /* @__PURE__ */ t(
|
|
2044
|
+
r.running.bar !== void 0 && /* @__PURE__ */ t(La, { value: r.running.bar, className: "mt-1.5 h-1" }),
|
|
2047
2045
|
p && /* @__PURE__ */ t("div", { className: "mt-1", children: K.longRunning })
|
|
2048
2046
|
] }),
|
|
2049
2047
|
r.status !== "running" && /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 text-[12px] leading-4 text-muted-foreground", children: [
|
|
@@ -2056,7 +2054,7 @@ function sn({ row: e, now: a, api: o }) {
|
|
|
2056
2054
|
] }, v)),
|
|
2057
2055
|
f
|
|
2058
2056
|
] })
|
|
2059
|
-
) : r.status !== "ready" ? /* @__PURE__ */ s(
|
|
2057
|
+
) : r.status !== "ready" ? /* @__PURE__ */ s(z, { children: [
|
|
2060
2058
|
/* @__PURE__ */ t("span", { children: u }),
|
|
2061
2059
|
f
|
|
2062
2060
|
] }) : null,
|
|
@@ -2065,13 +2063,13 @@ function sn({ row: e, now: a, api: o }) {
|
|
|
2065
2063
|
r.note && /* @__PURE__ */ t("div", { className: "text-[12px] leading-4 text-muted-foreground", children: r.note }),
|
|
2066
2064
|
r.status === "failed" && r.failure && /* @__PURE__ */ t("div", { className: "mt-1 whitespace-pre-wrap break-words text-[12px] leading-4 text-destructive", children: r.failure }),
|
|
2067
2065
|
(n === "denied" || n === "blocked") && /* @__PURE__ */ s("div", { role: "alert", className: "mt-1 flex items-start gap-1.5 text-[12px] leading-4 text-foreground", children: [
|
|
2068
|
-
/* @__PURE__ */ t(
|
|
2069
|
-
/* @__PURE__ */ t("span", { children:
|
|
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) })
|
|
2070
2068
|
] })
|
|
2071
2069
|
] })
|
|
2072
2070
|
] });
|
|
2073
2071
|
}
|
|
2074
|
-
function
|
|
2072
|
+
function ws({ variant: e }) {
|
|
2075
2073
|
const { snapshot: a, markSeen: o } = yt(), n = a.runningCount > 0 ? a.runningCount > 9 ? "9+" : String(a.runningCount) : a.hasUnseenFinished ? "" : null, i = Qt("activity", "md", {
|
|
2076
2074
|
label: de.title,
|
|
2077
2075
|
icon: /* @__PURE__ */ t(Et, { className: "h-3.5 w-3.5" }),
|
|
@@ -2088,7 +2086,7 @@ function Ss({ variant: e }) {
|
|
|
2088
2086
|
},
|
|
2089
2087
|
children: [
|
|
2090
2088
|
i.anchorSlot && Sr(
|
|
2091
|
-
/* @__PURE__ */ t(
|
|
2089
|
+
/* @__PURE__ */ t(mr, { asChild: !0, children: /* @__PURE__ */ t("span", { className: "absolute right-0 top-0 h-7 w-px" }) }),
|
|
2092
2090
|
i.anchorSlot
|
|
2093
2091
|
),
|
|
2094
2092
|
/* @__PURE__ */ t(
|
|
@@ -2130,9 +2128,9 @@ function Ss({ variant: e }) {
|
|
|
2130
2128
|
] });
|
|
2131
2129
|
}
|
|
2132
2130
|
function Lt() {
|
|
2133
|
-
const e = yt(), a =
|
|
2131
|
+
const e = yt(), a = Ua(), { rows: o, activeTruncated: n } = e.snapshot, i = o.some((r) => Oa(r.item.status));
|
|
2134
2132
|
return o.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-1.5 px-6 py-8 text-center", children: [
|
|
2135
|
-
/* @__PURE__ */ t("span", { className: "flex h-8 w-8 items-center justify-center rounded-[6px] border border-border text-muted-foreground", children: /* @__PURE__ */ t(
|
|
2133
|
+
/* @__PURE__ */ t("span", { className: "flex h-8 w-8 items-center justify-center rounded-[6px] border border-border text-muted-foreground", children: /* @__PURE__ */ t(za, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }) }),
|
|
2136
2134
|
/* @__PURE__ */ t("p", { className: "text-[13px] font-medium", children: de.title }),
|
|
2137
2135
|
/* @__PURE__ */ t("p", { className: "text-[12px] text-muted-foreground", children: de.empty })
|
|
2138
2136
|
] }) : /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
|
|
@@ -2159,7 +2157,7 @@ function Lt() {
|
|
|
2159
2157
|
onClick: e.refresh,
|
|
2160
2158
|
title: "Refresh status",
|
|
2161
2159
|
"aria-label": "Refresh status",
|
|
2162
|
-
children: /* @__PURE__ */ t(
|
|
2160
|
+
children: /* @__PURE__ */ t(zt, { strokeWidth: 1.75, className: "h-3.5 w-3.5" })
|
|
2163
2161
|
}
|
|
2164
2162
|
)
|
|
2165
2163
|
] })
|
|
@@ -2202,7 +2200,7 @@ function ln({
|
|
|
2202
2200
|
// create and make consumers use `forceClose()` from a dedicated
|
|
2203
2201
|
// button.
|
|
2204
2202
|
dismissMode: n ? "passive" : "explicit-only"
|
|
2205
|
-
}), p = w((C) => C.dashboard), { setDashboardControlsModel: f } = ce(), { participants: g } =
|
|
2203
|
+
}), p = w((C) => C.dashboard), { setDashboardControlsModel: f } = ce(), { participants: g } = _a(kr(p)), v = Array.from(
|
|
2206
2204
|
new Map(
|
|
2207
2205
|
g.flatMap(
|
|
2208
2206
|
(C) => C.fieldChoices.map((D) => {
|
|
@@ -2235,7 +2233,7 @@ function ln({
|
|
|
2235
2233
|
), V = xr({
|
|
2236
2234
|
...p || {},
|
|
2237
2235
|
controls: []
|
|
2238
|
-
}), U =
|
|
2236
|
+
}), U = ja(p), M = (C, D, N) => {
|
|
2239
2237
|
f(
|
|
2240
2238
|
C,
|
|
2241
2239
|
D,
|
|
@@ -2254,7 +2252,7 @@ function ln({
|
|
|
2254
2252
|
controls: p.controls || [],
|
|
2255
2253
|
reservedControlIds: V,
|
|
2256
2254
|
defaultValues: p.defaultControlValues || {},
|
|
2257
|
-
usageByControlId:
|
|
2255
|
+
usageByControlId: $a(p),
|
|
2258
2256
|
availableFieldChoices: v,
|
|
2259
2257
|
availableMetricChoices: k,
|
|
2260
2258
|
structuralParticipants: g,
|
|
@@ -2265,7 +2263,7 @@ function ln({
|
|
|
2265
2263
|
onChange: M,
|
|
2266
2264
|
emptyMessage: "No dashboard controls yet."
|
|
2267
2265
|
}
|
|
2268
|
-
), b = l ? "Add dashboard control" : "Dashboard Controls", F = /* @__PURE__ */ s(
|
|
2266
|
+
), b = l ? "Add dashboard control" : "Dashboard Controls", F = /* @__PURE__ */ s(z, { children: [
|
|
2269
2267
|
/* @__PURE__ */ s("div", { className: "space-y-1", children: [
|
|
2270
2268
|
/* @__PURE__ */ t("h4", { className: "text-sm font-medium", children: "Dashboard Controls" }),
|
|
2271
2269
|
/* @__PURE__ */ t("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." })
|
|
@@ -2531,7 +2529,7 @@ function fn({
|
|
|
2531
2529
|
d
|
|
2532
2530
|
),
|
|
2533
2531
|
children: [
|
|
2534
|
-
e ? /* @__PURE__ */ t(Er, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(
|
|
2532
|
+
e ? /* @__PURE__ */ t(Er, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Rt, { className: "h-3.5 w-3.5" }),
|
|
2535
2533
|
"Filter"
|
|
2536
2534
|
]
|
|
2537
2535
|
}
|
|
@@ -2605,7 +2603,7 @@ function bn() {
|
|
|
2605
2603
|
(l) => l.semanticExecutionPayload
|
|
2606
2604
|
), o = w(
|
|
2607
2605
|
(l) => l.actions.addFilterInput
|
|
2608
|
-
), { hasEntities: n } = gn(), { isLoading: i } =
|
|
2606
|
+
), { hasEntities: n } = gn(), { isLoading: i } = Wa(), r = te(
|
|
2609
2607
|
() => yr(e, a),
|
|
2610
2608
|
[e, a]
|
|
2611
2609
|
), c = !Cr(e) && r.hasEligibleCards && !i;
|
|
@@ -2630,11 +2628,11 @@ function bn() {
|
|
|
2630
2628
|
}
|
|
2631
2629
|
) }),
|
|
2632
2630
|
!n && /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col items-center justify-center px-6 py-8 text-center", children: [
|
|
2633
|
-
/* @__PURE__ */ t(
|
|
2631
|
+
/* @__PURE__ */ t(qa, { className: "mb-3 h-10 w-10 text-muted-foreground/50" }),
|
|
2634
2632
|
/* @__PURE__ */ t("h3", { className: "mb-1 text-[13px] font-medium text-foreground", children: "No fields configured" }),
|
|
2635
2633
|
/* @__PURE__ */ t("p", { className: "text-[11px] text-muted-foreground", children: "Configure a data source for this card to enable filtering." })
|
|
2636
2634
|
] }),
|
|
2637
|
-
n && /* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ t(
|
|
2635
|
+
n && /* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: /* @__PURE__ */ t(Ha, { context: "filter" }) })
|
|
2638
2636
|
] });
|
|
2639
2637
|
}
|
|
2640
2638
|
function xn({
|
|
@@ -2651,7 +2649,7 @@ function xn({
|
|
|
2651
2649
|
/* @__PURE__ */ t(
|
|
2652
2650
|
rt,
|
|
2653
2651
|
{
|
|
2654
|
-
icon:
|
|
2652
|
+
icon: Rt,
|
|
2655
2653
|
label: "Add filter",
|
|
2656
2654
|
onClick: () => {
|
|
2657
2655
|
e(), n();
|
|
@@ -2730,7 +2728,7 @@ function vn({
|
|
|
2730
2728
|
)
|
|
2731
2729
|
] });
|
|
2732
2730
|
}
|
|
2733
|
-
function
|
|
2731
|
+
function Ns({
|
|
2734
2732
|
size: e,
|
|
2735
2733
|
className: a,
|
|
2736
2734
|
primaryButtonClassName: o,
|
|
@@ -2769,7 +2767,7 @@ function ks({
|
|
|
2769
2767
|
}, [k]), A = J(() => {
|
|
2770
2768
|
k("manage");
|
|
2771
2769
|
}, [k]);
|
|
2772
|
-
return /* @__PURE__ */ s(
|
|
2770
|
+
return /* @__PURE__ */ s(z, { children: [
|
|
2773
2771
|
/* @__PURE__ */ t(
|
|
2774
2772
|
fn,
|
|
2775
2773
|
{
|
|
@@ -2833,7 +2831,7 @@ function yn({
|
|
|
2833
2831
|
onClick: n,
|
|
2834
2832
|
"aria-label": "Reports & briefings",
|
|
2835
2833
|
children: [
|
|
2836
|
-
/* @__PURE__ */ t(
|
|
2834
|
+
/* @__PURE__ */ t(Rr, { className: "h-3.5 w-3.5" }),
|
|
2837
2835
|
"Reports & briefings",
|
|
2838
2836
|
i ? /* @__PURE__ */ t("span", { className: "ml-0.5 rounded-control bg-muted px-1 text-[10px] tabular-nums text-foreground/70", children: a }) : null
|
|
2839
2837
|
]
|
|
@@ -2970,7 +2968,7 @@ function Fn({
|
|
|
2970
2968
|
"No ",
|
|
2971
2969
|
C,
|
|
2972
2970
|
" yet"
|
|
2973
|
-
] }) : /* @__PURE__ */ s(
|
|
2971
|
+
] }) : /* @__PURE__ */ s(z, { children: [
|
|
2974
2972
|
/* @__PURE__ */ s("span", { className: "font-medium text-foreground/80", children: [
|
|
2975
2973
|
A,
|
|
2976
2974
|
" ",
|
|
@@ -3303,7 +3301,7 @@ function Tn({
|
|
|
3303
3301
|
onTogglePause: r,
|
|
3304
3302
|
onDelete: d
|
|
3305
3303
|
}) {
|
|
3306
|
-
const c = e.status === "PAUSED", l = e.hasActiveRun, u = kn(e), h = Nn(e.lastRunAt), m = e.lastRunStatus, p = le(e), f = m === "SUCCESS" ?
|
|
3304
|
+
const c = e.status === "PAUSED", l = e.hasActiveRun, u = kn(e), h = Nn(e.lastRunAt), m = e.lastRunStatus, p = le(e), f = m === "SUCCESS" ? Re.success.dot : m === "FAILED" ? Re.danger.dot : m ? Re.warning.dot : Re.neutral.dot;
|
|
3307
3305
|
return /* @__PURE__ */ s(
|
|
3308
3306
|
"div",
|
|
3309
3307
|
{
|
|
@@ -3332,9 +3330,9 @@ function Tn({
|
|
|
3332
3330
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
3333
3331
|
/* @__PURE__ */ t("span", { children: Dn(e) }),
|
|
3334
3332
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
3335
|
-
/* @__PURE__ */ t(
|
|
3333
|
+
/* @__PURE__ */ t(Qa, { className: "h-3 w-3" }),
|
|
3336
3334
|
/* @__PURE__ */ t("span", { className: "truncate", children: Sn(e) }),
|
|
3337
|
-
e.lastRunAt ? /* @__PURE__ */ s(
|
|
3335
|
+
e.lastRunAt ? /* @__PURE__ */ s(z, { children: [
|
|
3338
3336
|
/* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
|
|
3339
3337
|
/* @__PURE__ */ s("span", { children: [
|
|
3340
3338
|
"Last run ",
|
|
@@ -3381,7 +3379,7 @@ function Tn({
|
|
|
3381
3379
|
g.preventDefault(), i();
|
|
3382
3380
|
},
|
|
3383
3381
|
children: [
|
|
3384
|
-
/* @__PURE__ */ t(
|
|
3382
|
+
/* @__PURE__ */ t(Ka, { className: "h-3.5 w-3.5" }),
|
|
3385
3383
|
"Run now"
|
|
3386
3384
|
]
|
|
3387
3385
|
}
|
|
@@ -3392,11 +3390,11 @@ function Tn({
|
|
|
3392
3390
|
onClick: (g) => {
|
|
3393
3391
|
g.preventDefault(), r();
|
|
3394
3392
|
},
|
|
3395
|
-
children: c ? /* @__PURE__ */ s(
|
|
3396
|
-
/* @__PURE__ */ t(Ka, { className: "h-3.5 w-3.5" }),
|
|
3397
|
-
"Resume"
|
|
3398
|
-
] }) : /* @__PURE__ */ s(R, { children: [
|
|
3393
|
+
children: c ? /* @__PURE__ */ s(z, { children: [
|
|
3399
3394
|
/* @__PURE__ */ t(Ga, { className: "h-3.5 w-3.5" }),
|
|
3395
|
+
"Resume"
|
|
3396
|
+
] }) : /* @__PURE__ */ s(z, { children: [
|
|
3397
|
+
/* @__PURE__ */ t(Xa, { className: "h-3.5 w-3.5" }),
|
|
3400
3398
|
"Pause"
|
|
3401
3399
|
] })
|
|
3402
3400
|
}
|
|
@@ -3448,15 +3446,15 @@ async function Pn(e) {
|
|
|
3448
3446
|
return o;
|
|
3449
3447
|
}
|
|
3450
3448
|
const Mn = {
|
|
3451
|
-
listBriefings:
|
|
3452
|
-
getBriefing:
|
|
3453
|
-
pauseBriefing:
|
|
3454
|
-
resumeBriefing:
|
|
3455
|
-
deleteBriefing:
|
|
3456
|
-
runBriefingNow:
|
|
3449
|
+
listBriefings: sr,
|
|
3450
|
+
getBriefing: nr,
|
|
3451
|
+
pauseBriefing: rr,
|
|
3452
|
+
resumeBriefing: ar,
|
|
3453
|
+
deleteBriefing: tr,
|
|
3454
|
+
runBriefingNow: er
|
|
3457
3455
|
};
|
|
3458
|
-
function
|
|
3459
|
-
return /* @__PURE__ */ t(
|
|
3456
|
+
function Ss(e) {
|
|
3457
|
+
return /* @__PURE__ */ t(Ya, { authToken: e.token ? { accessToken: e.token } : void 0, children: /* @__PURE__ */ t(Ja, { children: /* @__PURE__ */ t(Un, { ...e }) }) });
|
|
3460
3458
|
}
|
|
3461
3459
|
function Un({
|
|
3462
3460
|
dashboardId: e,
|
|
@@ -3473,7 +3471,7 @@ function Un({
|
|
|
3473
3471
|
openRun: m,
|
|
3474
3472
|
client: p
|
|
3475
3473
|
}) {
|
|
3476
|
-
const { authToken: f, tokenProps: g } = it(), v =
|
|
3474
|
+
const { authToken: f, tokenProps: g } = it(), v = Za(), k = !h || v.canCreate && (h === "scheduled_report" || v.analyticalBriefingsEnabled), [V, U] = S(!1), M = c ?? V, A = (y) => {
|
|
3477
3475
|
c === void 0 && U(y), l == null || l(y);
|
|
3478
3476
|
}, [O, b] = S(
|
|
3479
3477
|
h ? "author" : "list"
|
|
@@ -3481,7 +3479,7 @@ function Un({
|
|
|
3481
3479
|
h ?? "analytical_briefing"
|
|
3482
3480
|
), [D, N] = S("dashboard"), [j, T] = S(
|
|
3483
3481
|
[]
|
|
3484
|
-
), [
|
|
3482
|
+
), [R, X] = S(null), L = h && !k && !R ? "list" : O, [ae, Y] = S(!1), [H, he] = S(null), [ge, Q] = S(null), [_, oe] = S(
|
|
3485
3483
|
null
|
|
3486
3484
|
), [me, pe] = S(null), Ce = nt(null), Me = nt(M);
|
|
3487
3485
|
xe(() => {
|
|
@@ -3593,7 +3591,7 @@ function Un({
|
|
|
3593
3591
|
const { noun: P } = le(y), Oe = P === "report" ? "Report" : "Briefing";
|
|
3594
3592
|
Q(y.id);
|
|
3595
3593
|
try {
|
|
3596
|
-
const
|
|
3594
|
+
const ze = y.status === "PAUSED" ? await ne.resumeBriefing(
|
|
3597
3595
|
$,
|
|
3598
3596
|
W,
|
|
3599
3597
|
y.id
|
|
@@ -3603,11 +3601,11 @@ function Un({
|
|
|
3603
3601
|
y.id
|
|
3604
3602
|
);
|
|
3605
3603
|
E.success(
|
|
3606
|
-
|
|
3604
|
+
ze.briefing.status === "PAUSED" ? `${Oe} paused` : `${Oe} resumed`
|
|
3607
3605
|
), se();
|
|
3608
|
-
} catch (
|
|
3606
|
+
} catch (ze) {
|
|
3609
3607
|
E.error(
|
|
3610
|
-
|
|
3608
|
+
ze instanceof Error ? ze.message : `Could not update the ${P} status.`
|
|
3611
3609
|
);
|
|
3612
3610
|
} finally {
|
|
3613
3611
|
Q(null);
|
|
@@ -3632,7 +3630,7 @@ function Un({
|
|
|
3632
3630
|
Q(null);
|
|
3633
3631
|
}
|
|
3634
3632
|
}, ea = Ue.length;
|
|
3635
|
-
return v.surfaceVisible ? /* @__PURE__ */ s(
|
|
3633
|
+
return v.surfaceVisible ? /* @__PURE__ */ s(or, { open: M, onOpenChange: A, children: [
|
|
3636
3634
|
u ? null : /* @__PURE__ */ t(
|
|
3637
3635
|
yn,
|
|
3638
3636
|
{
|
|
@@ -3643,7 +3641,7 @@ function Un({
|
|
|
3643
3641
|
}
|
|
3644
3642
|
),
|
|
3645
3643
|
/* @__PURE__ */ s(
|
|
3646
|
-
|
|
3644
|
+
ir,
|
|
3647
3645
|
{
|
|
3648
3646
|
ref: Ce,
|
|
3649
3647
|
side: "right",
|
|
@@ -3654,9 +3652,9 @@ function Un({
|
|
|
3654
3652
|
y.preventDefault(), (P = Ce.current) == null || P.focus({ preventScroll: !0 });
|
|
3655
3653
|
},
|
|
3656
3654
|
children: [
|
|
3657
|
-
/* @__PURE__ */ s(
|
|
3658
|
-
/* @__PURE__ */ t(
|
|
3659
|
-
/* @__PURE__ */ t(
|
|
3655
|
+
/* @__PURE__ */ s(lr, { className: "sr-only", children: [
|
|
3656
|
+
/* @__PURE__ */ t(dr, { children: "Reports & briefings" }),
|
|
3657
|
+
/* @__PURE__ */ t(cr, { children: "Manage reports and briefings for this dashboard." })
|
|
3660
3658
|
] }),
|
|
3661
3659
|
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: [
|
|
3662
3660
|
/* @__PURE__ */ s(
|
|
@@ -3681,7 +3679,7 @@ function Un({
|
|
|
3681
3679
|
onClick: () => {
|
|
3682
3680
|
k && (X(null), C(h), N("dashboard"), b("author"));
|
|
3683
3681
|
},
|
|
3684
|
-
children:
|
|
3682
|
+
children: R ? `Edit ${le(R).noun}` : h === "scheduled_report" ? "Schedule report" : "Create briefing"
|
|
3685
3683
|
}
|
|
3686
3684
|
),
|
|
3687
3685
|
/* @__PURE__ */ t(
|
|
@@ -3747,21 +3745,21 @@ function Un({
|
|
|
3747
3745
|
hideHeader: !!h
|
|
3748
3746
|
}
|
|
3749
3747
|
) : /* @__PURE__ */ t(
|
|
3750
|
-
|
|
3748
|
+
ur,
|
|
3751
3749
|
{
|
|
3752
3750
|
apiServiceUrl: $,
|
|
3753
3751
|
token: W,
|
|
3754
|
-
briefing:
|
|
3755
|
-
initialRunId: we && (
|
|
3752
|
+
briefing: R,
|
|
3753
|
+
initialRunId: we && (R == null ? void 0 : R.id) === we.briefingId ? we.runId : void 0,
|
|
3756
3754
|
intent: F,
|
|
3757
|
-
sourceContext:
|
|
3758
|
-
title:
|
|
3755
|
+
sourceContext: R ? void 0 : Ze,
|
|
3756
|
+
title: R ? `Edit ${le(R).noun}` : F === "scheduled_report" ? "Schedule report" : "Create analytical briefing",
|
|
3759
3757
|
hideHeader: !!h,
|
|
3760
3758
|
className: "h-full min-h-0 max-w-none border-0 shadow-none",
|
|
3761
3759
|
onBack: h ? void 0 : () => b("list"),
|
|
3762
3760
|
onCancel: () => A(!1),
|
|
3763
3761
|
onDeleted: () => {
|
|
3764
|
-
const y =
|
|
3762
|
+
const y = R ? le(R).noun : "briefing";
|
|
3765
3763
|
E.success(`${y === "report" ? "Report" : "Briefing"} deleted`), X(null), b("list"), se();
|
|
3766
3764
|
},
|
|
3767
3765
|
onRunStarted: () => {
|
|
@@ -3822,23 +3820,23 @@ function On() {
|
|
|
3822
3820
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `briefing-run-now-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
3823
3821
|
}
|
|
3824
3822
|
export {
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3823
|
+
ms as A,
|
|
3824
|
+
gs as D,
|
|
3825
|
+
fs as S,
|
|
3826
|
+
xs as T,
|
|
3827
|
+
ys as U,
|
|
3828
|
+
cs as V,
|
|
3831
3829
|
yn as W,
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3830
|
+
hs as a,
|
|
3831
|
+
ps as b,
|
|
3832
|
+
bs as c,
|
|
3833
|
+
vs as d,
|
|
3834
|
+
ws as e,
|
|
3837
3835
|
ln as f,
|
|
3838
3836
|
cn as g,
|
|
3839
3837
|
fn as h,
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3838
|
+
Cs as i,
|
|
3839
|
+
Ns as j,
|
|
3840
|
+
Ss as k,
|
|
3841
|
+
us as u
|
|
3844
3842
|
};
|