react-semaphor 0.1.586 → 0.1.588
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 +341 -338
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +8 -8
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{add-to-dashboard-DhP8wVtM.js → add-to-dashboard-C86FsM8D.js} +1 -1
- package/dist/chunks/{aggregate-measure-field-DsFXETpI.js → aggregate-measure-field-BrkXsSJp.js} +2 -2
- package/dist/chunks/{analytics-base-schemas-BaIQrEzX.js → analytics-base-schemas-8wz9vqn_.js} +173 -165
- package/dist/chunks/{assistant-chat-BU5gchFy.js → assistant-chat-BeM6joPc.js} +19 -18
- package/dist/chunks/{bookmark-impact-ZPSGncK6.js → bookmark-impact-B7pbMx2e.js} +2 -2
- package/dist/chunks/{bookmark-state-CL4WEpgB.js → bookmark-state-Bn7k3ttp.js} +5 -5
- package/dist/chunks/{card-filter-builder-HELJWA4D.js → card-filter-builder-DmodrhyI.js} +81 -81
- package/dist/chunks/{comparison-window-caption-CoART8BC.js → comparison-window-caption-fqijZdVd.js} +451 -395
- package/dist/chunks/{context-BTLBjQNh.js → context-CVXTFljo.js} +1 -1
- package/dist/chunks/{dashboard-BXP-ZxSY.js → dashboard-Tu5wT0Cw.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BGj42whr.js → dashboard-briefing-launcher-D8jMxIJo.js} +249 -265
- package/dist/chunks/{dashboard-controls-zvbRp6D2.js → dashboard-controls-uzeAIEkM.js} +65 -65
- package/dist/chunks/{dashboard-json-CykexgqL.js → dashboard-json-i5rpFNCg.js} +5 -5
- package/dist/chunks/dates-BunbHJH0.js +115 -0
- package/dist/chunks/{edit-dashboard-visual-C82JNxbt.js → edit-dashboard-visual-BpEK_Sls.js} +2882 -2843
- package/dist/chunks/{filter-line-Cu2u1K36.js → filter-line-Dza3ee4w.js} +5 -5
- package/dist/chunks/{filter-reach-copy-ZERaFKsN.js → filter-reach-copy-D5AmDHda.js} +939 -937
- package/dist/chunks/{filter-value-text-xefXzZlf.js → filter-value-text-DQw4v3nC.js} +6 -6
- package/dist/chunks/{index-otMIColV.js → index-dGxJTaP1.js} +39 -39
- package/dist/chunks/{layout-grid-9nSS2SL-.js → layout-grid-XCYphks2.js} +1 -1
- package/dist/chunks/{list-filter-CfMPI6v4.js → list-filter-DGV3fqqv.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-DOVSFFuf.js → matrix-analytical-definition-SN0JUJVk.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-BKDyxJho.js → matrix-member-presentation-DVBJR0MA.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-BM5TveR3.js → matrix-operation-contract-JSmproo9.js} +15 -15
- package/dist/chunks/{metric-comparison-ZmurmEIs.js → metric-comparison-xE_J6hkg.js} +2 -2
- package/dist/chunks/{paintbrush-LzAje2ff.js → paintbrush-DEEZXhDj.js} +1 -1
- package/dist/chunks/{palette-DicJG0TC.js → palette-Bgy0H-Nt.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-CdeTU96P.js → pivot-header-presentation-D-DfPAjb.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-Bx_BCu-7.js → pivot-result-contract-expectations-DbBahmgc.js} +545 -536
- package/dist/chunks/{pivot-result-identity-Bvs6Uq3v.js → pivot-result-identity-CUsMt_4r.js} +1 -1
- package/dist/chunks/{raw-temporal-value-DH-feMc2.js → raw-temporal-value-BnGCWJAL.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-B-CoyS1x.js → report-preferences-dialog-CTM0xfd0.js} +14 -14
- package/dist/chunks/{report-runtime-context-NlOXwyRB.js → report-runtime-context-CrOgmuxO.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-BTTdKXH0.js → resolve-dashboard-input-context-DFBIngUZ.js} +5621 -5476
- package/dist/chunks/{save-0wu1Z1U7.js → save-xnRCvMeA.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-B-rosN4W.js → saved-dashboard-context-DKMTP9ib.js} +17 -17
- package/dist/chunks/selection-filter-compiler-DkIjp1yH.js +131 -0
- package/dist/chunks/{semaphor-ready-indicator-Cy1n_04D.js → semaphor-ready-indicator-zU9reNmX.js} +47183 -46779
- package/dist/chunks/{shelf-drop-preview-context-Bmz54WYm.js → shelf-drop-preview-context-R9sf4oDX.js} +6 -6
- package/dist/chunks/{stored-dashboard-rDJ8sw6J.js → stored-dashboard-CksluF2S.js} +1539 -1404
- package/dist/chunks/{style-sheet-parts-_dGSFzDi.js → style-sheet-parts-D7NbsFL0.js} +3 -3
- package/dist/chunks/{table-export-sheet-Dmtqi5NV.js → table-export-sheet-ClSgERQC.js} +1 -1
- package/dist/chunks/{token-types-DEe_FP4l.js → token-types-DTocOcwt.js} +1 -1
- package/dist/chunks/{upload-CtyOkU_B.js → upload-BXGgYS4g.js} +1 -1
- package/dist/chunks/{validators-CJ8Jh0E8.js → validators-CrYXNnNE.js} +51 -49
- package/dist/chunks/{variable-draft-DvngkRMl.js → variable-draft-rbtGPvmX.js} +16 -14
- package/dist/chunks/visual-choice-DDfHfHvY.js +172 -0
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1501 -1460
- package/dist/format-utils/index.js +162 -158
- package/dist/index.js +21 -21
- 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/index.js +5 -5
- package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +39 -2
- package/dist/types/lib/dashboard-view-state/date-zoom.d.ts +65 -0
- package/dist/types/lib/dashboard-view-state/grain-pick.d.ts +38 -0
- package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
- package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +6 -2
- package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
- package/dist/types/lib/interactions/get-click-context-from-table.d.ts +2 -2
- package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -1
- package/dist/types/lib/query-context/build-card-query-context.d.ts +15 -1
- package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +3 -0
- package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +14 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +7 -1
- package/dist/types/lib/types/explorer-types.d.ts +24 -4
- package/dist/types/lib/utils/card-config-utils.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +32 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +30 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/automatic-grain.d.ts +77 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +10 -3
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +5 -2
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +5 -2
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +13 -8
- package/dist/types/shared/dashboard-authoring/control-value-resolution.d.ts +24 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/kpi-trend-rule.d.ts +51 -0
- package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +1 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/partial-period.d.ts +40 -0
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +11 -0
- package/dist/types/shared/usage-events/details.d.ts +2 -2
- package/dist/usage-events/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/dates-CaqZtq01.js +0 -92
- package/dist/chunks/selection-filter-compiler-BReJy-uv.js +0 -92
- package/dist/chunks/visual-choice-BBPizkRo.js +0 -206
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as e, jsxs as o, Fragment as
|
|
2
|
-
import { bJ as Fr, u as k, bK as $r, bL as Gr, bM as ot, bN as Vr, bO as Hr, bP as jr, bQ as qr, bR as zr, bS as Kr, b2 as J, a$ as xe, bT as ve, bD as C, bU as Qr, bE as $t, bF as Gt, bH as tt, bI as rt, bV as Vt, bW as it, bx as Wr, bX as ne, bY as Jr, bZ as Yr, b_ as Ht, b$ as Xr, c0 as jt, c1 as Zr, bG as ea, c2 as ta, c3 as A, c4 as ra, c5 as aa, c6 as na, aM as sa, c7 as oa, bp as ia, c8 as da, bq as ca, j as la, a4 as ua, ag as Et, i as Be, p as ma, k as Xe, H as ha, c9 as pa, ca as fa, a2 as ga, cb as ba, s as xa, cc as va, w as ya, cd as wa, ce as Na, cf as Sa, cg as At, ch as It, ci as Mt, cj as Da, br as ka, ck as Ca, T as Ea, cl as Aa, cm as Ia, cn as ae, co as he, cp as Ma, cq as La, cr as Oa, cs as Lt, o as Pa, ct as _a, cu as
|
|
3
|
-
import { c as ye, B as V, a5 as Ha, a6 as ja, a7 as at, L as $e, X as qt, s as qa, y as za, z as Ka, A as Qa, D as Wa, E as Ja, e as Ya, f as Xa, h as Za, F as en, t as tn, u as rn, v as an, I as nn, w as sn, j as zt, g as Pt } from "./style-sheet-parts-
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { bJ as Fr, u as k, bK as $r, bL as Gr, bM as ot, bN as Vr, bO as Hr, bP as jr, bQ as qr, bR as zr, bS as Kr, b2 as J, a$ as xe, bT as ve, bD as C, bU as Qr, bE as $t, bF as Gt, bH as tt, bI as rt, bV as Vt, bW as it, bx as Wr, bX as ne, bY as Jr, bZ as Yr, b_ as Ht, b$ as Xr, c0 as jt, c1 as Zr, bG as ea, c2 as ta, c3 as A, c4 as ra, c5 as aa, c6 as na, aM as sa, c7 as oa, bp as ia, c8 as da, bq as ca, j as la, a4 as ua, ag as Et, i as Be, p as ma, k as Xe, H as ha, c9 as pa, ca as fa, a2 as ga, cb as ba, s as xa, cc as va, w as ya, cd as wa, ce as Na, cf as Sa, cg as At, ch as It, ci as Mt, cj as Da, br as ka, ck as Ca, T as Ea, cl as Aa, cm as Ia, cn as ae, co as he, cp as Ma, cq as La, cr as Oa, cs as Lt, o as Pa, ct as _a, cu as Ra, cv as Ta, cw as Ua, cx as Ba, cy as Fa, cz as $a, cA as Ga, cB as Ot, J as Va } from "./semaphor-ready-indicator-zU9reNmX.js";
|
|
3
|
+
import { c as ye, B as V, a5 as Ha, a6 as ja, a7 as at, L as $e, X as qt, s as qa, y as za, z as Ka, A as Qa, D as Wa, E as Ja, e as Ya, f as Xa, h as Za, F as en, t as tn, u as rn, v as an, I as nn, w as sn, j as zt, g as Pt } from "./style-sheet-parts-D7NbsFL0.js";
|
|
4
4
|
import * as E from "react";
|
|
5
5
|
import Kt, { useMemo as H, useState as N, useEffect as ge, useRef as _t, useLayoutEffect as on } from "react";
|
|
6
6
|
import { c as be } from "./pickers-DkqmtnTL.js";
|
|
7
|
-
import "./validators-
|
|
8
|
-
import "./matrix-operation-contract-
|
|
9
|
-
import "./analytics-base-schemas-
|
|
7
|
+
import "./validators-CrYXNnNE.js";
|
|
8
|
+
import "./matrix-operation-contract-JSmproo9.js";
|
|
9
|
+
import "./analytics-base-schemas-8wz9vqn_.js";
|
|
10
10
|
import "../value-format-preferences/index.js";
|
|
11
|
-
import { u as dn, c as cn, k as ln, D as un, A as mn, a as hn, h as pn, l as fn, V as gn, b as bn, d as xn, S as vn, j as yn, i as wn, m as Nn, U as Sn } from "./dashboard-briefing-launcher-
|
|
12
|
-
import { I as Dn } from "./card-filter-builder-
|
|
13
|
-
import { h as kn, R as Cn } from "./report-preferences-dialog-
|
|
11
|
+
import { u as dn, c as cn, k as ln, D as un, A as mn, a as hn, h as pn, l as fn, V as gn, b as bn, d as xn, S as vn, j as yn, i as wn, m as Nn, U as Sn } from "./dashboard-briefing-launcher-D8jMxIJo.js";
|
|
12
|
+
import { I as Dn } from "./card-filter-builder-DmodrhyI.js";
|
|
13
|
+
import { h as kn, R as Cn } from "./report-preferences-dialog-CTM0xfd0.js";
|
|
14
14
|
import { createPortal as En } from "react-dom";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { k as nt } from "./stored-dashboard-
|
|
15
|
+
import { fG as we, fH as dt, fI as Qt, o as An } from "./resolve-dashboard-input-context-DFBIngUZ.js";
|
|
16
|
+
import { aR as Wt } from "./pivot-result-contract-expectations-DbBahmgc.js";
|
|
17
|
+
import { k as nt } from "./stored-dashboard-CksluF2S.js";
|
|
18
18
|
import { r as In } from "./export-file-format-C-tJsxsf.js";
|
|
19
19
|
import { u as Mn, s as Ln } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
|
|
20
|
-
import { z as Jt } from "./bookmark-state-
|
|
21
|
-
import { d as On, a as Pn } from "./bookmark-impact-
|
|
22
|
-
import { S as _n } from "./save-
|
|
23
|
-
import { P as
|
|
24
|
-
import { P as
|
|
20
|
+
import { z as Jt } from "./bookmark-state-Bn7k3ttp.js";
|
|
21
|
+
import { d as On, a as Pn } from "./bookmark-impact-B7pbMx2e.js";
|
|
22
|
+
import { S as _n } from "./save-xnRCvMeA.js";
|
|
23
|
+
import { P as Rn } from "./paintbrush-DEEZXhDj.js";
|
|
24
|
+
import { P as Tn } from "./palette-Bgy0H-Nt.js";
|
|
25
25
|
/**
|
|
26
26
|
* @license lucide-react v0.453.0 - ISC
|
|
27
27
|
*
|
|
@@ -97,10 +97,10 @@ var st = { exports: {} }, Ze = {};
|
|
|
97
97
|
* This source code is licensed under the MIT license found in the
|
|
98
98
|
* LICENSE file in the root directory of this source tree.
|
|
99
99
|
*/
|
|
100
|
-
var
|
|
100
|
+
var Rt;
|
|
101
101
|
function Gn() {
|
|
102
|
-
if (
|
|
103
|
-
|
|
102
|
+
if (Rt) return Ze;
|
|
103
|
+
Rt = 1;
|
|
104
104
|
var t = Kt;
|
|
105
105
|
function n(i, f) {
|
|
106
106
|
return i === f && (i !== 0 || 1 / i === 1 / f) || i !== i && f !== f;
|
|
@@ -148,9 +148,9 @@ var et = {};
|
|
|
148
148
|
* This source code is licensed under the MIT license found in the
|
|
149
149
|
* LICENSE file in the root directory of this source tree.
|
|
150
150
|
*/
|
|
151
|
-
var
|
|
151
|
+
var Tt;
|
|
152
152
|
function Vn() {
|
|
153
|
-
return
|
|
153
|
+
return Tt || (Tt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
154
154
|
function t(l, x) {
|
|
155
155
|
return l === x && (l !== 0 || 1 / l === 1 / x) || l !== l && x !== x;
|
|
156
156
|
}
|
|
@@ -765,14 +765,14 @@ function ps({
|
|
|
765
765
|
" member",
|
|
766
766
|
t.memberCount === 1 ? "" : "s"
|
|
767
767
|
] }),
|
|
768
|
-
s && /* @__PURE__ */ o(
|
|
768
|
+
s && /* @__PURE__ */ o(T, { children: [
|
|
769
769
|
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
770
770
|
/* @__PURE__ */ o("span", { className: "inline-flex items-center gap-1", children: [
|
|
771
771
|
/* @__PURE__ */ e(jt, { className: "h-2.5 w-2.5" }),
|
|
772
772
|
s
|
|
773
773
|
] })
|
|
774
774
|
] }),
|
|
775
|
-
t.description && /* @__PURE__ */ o(
|
|
775
|
+
t.description && /* @__PURE__ */ o(T, { children: [
|
|
776
776
|
/* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
|
|
777
777
|
/* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: t.description })
|
|
778
778
|
] })
|
|
@@ -1153,10 +1153,10 @@ function bs({
|
|
|
1153
1153
|
onClick: f,
|
|
1154
1154
|
disabled: !i || g.isPending,
|
|
1155
1155
|
className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
|
|
1156
|
-
children: g.isPending ? /* @__PURE__ */ o(
|
|
1156
|
+
children: g.isPending ? /* @__PURE__ */ o(T, { children: [
|
|
1157
1157
|
/* @__PURE__ */ e($e, { className: "h-3 w-3 animate-spin" }),
|
|
1158
1158
|
"Creating…"
|
|
1159
|
-
] }) : /* @__PURE__ */ o(
|
|
1159
|
+
] }) : /* @__PURE__ */ o(T, { children: [
|
|
1160
1160
|
/* @__PURE__ */ e(ne, { className: "h-3 w-3" }),
|
|
1161
1161
|
"Create group"
|
|
1162
1162
|
] })
|
|
@@ -1451,7 +1451,7 @@ function Ss({
|
|
|
1451
1451
|
onScheduleReport: a,
|
|
1452
1452
|
onCreateAnalyticalBriefing: r
|
|
1453
1453
|
}) {
|
|
1454
|
-
return /* @__PURE__ */ o(
|
|
1454
|
+
return /* @__PURE__ */ o(T, { children: [
|
|
1455
1455
|
/* @__PURE__ */ e(
|
|
1456
1456
|
Ns,
|
|
1457
1457
|
{
|
|
@@ -1576,7 +1576,7 @@ function Xs() {
|
|
|
1576
1576
|
}), bt = G ? {
|
|
1577
1577
|
id: G.id,
|
|
1578
1578
|
title: (b == null ? void 0 : b.title) || G.title || "Dashboard"
|
|
1579
|
-
} : null, { handleAddNewFrame: vr } = ga(), [Ve, He] = N(!1), [yr, de] = N(!1), [je, Pe] = N("close"), ce = ba(Xe.DASHBOARD), [L, le] = N(null), wr = async (d,
|
|
1579
|
+
} : null, { handleAddNewFrame: vr } = ga(), [Ve, He] = N(!1), [yr, de] = N(!1), [je, Pe] = N("close"), ce = ba(Xe.DASHBOARD), [L, le] = N(null), wr = async (d, R) => {
|
|
1580
1580
|
if (!i) {
|
|
1581
1581
|
if (!(b != null && b.id)) {
|
|
1582
1582
|
console.log("No dashboard ID found");
|
|
@@ -1585,7 +1585,7 @@ function Xs() {
|
|
|
1585
1585
|
console.log("Updating dashboard title:", {
|
|
1586
1586
|
dashboardId: b.id,
|
|
1587
1587
|
newTitle: d,
|
|
1588
|
-
previousTitle:
|
|
1588
|
+
previousTitle: R
|
|
1589
1589
|
}), ce.mutate(
|
|
1590
1590
|
{
|
|
1591
1591
|
resourceId: b.id,
|
|
@@ -1603,7 +1603,7 @@ function Xs() {
|
|
|
1603
1603
|
onError: (_) => {
|
|
1604
1604
|
console.error("Failed to update dashboard title:", _), C.error("Failed to update dashboard title");
|
|
1605
1605
|
const re = k.getState().dashboard;
|
|
1606
|
-
(re == null ? void 0 : re.id) === b.id && re.title === d && Ne(
|
|
1606
|
+
(re == null ? void 0 : re.id) === b.id && re.title === d && Ne(R);
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
1609
|
);
|
|
@@ -1613,10 +1613,10 @@ function Xs() {
|
|
|
1613
1613
|
if (Oe && Oe.length > 0) {
|
|
1614
1614
|
const d = b == null ? void 0 : b.id;
|
|
1615
1615
|
if (d) {
|
|
1616
|
-
const
|
|
1616
|
+
const R = Oe.find(
|
|
1617
1617
|
(_) => _.id === d
|
|
1618
1618
|
);
|
|
1619
|
-
|
|
1619
|
+
R && gt(R);
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
1622
|
}, [Oe, b == null ? void 0 : b.id, gt]);
|
|
@@ -1675,7 +1675,7 @@ function Xs() {
|
|
|
1675
1675
|
Qe,
|
|
1676
1676
|
i,
|
|
1677
1677
|
p
|
|
1678
|
-
), vt = We || kr,
|
|
1678
|
+
), vt = We || kr, Re = Ve || ce.isPending, Cr = () => {
|
|
1679
1679
|
if (i) {
|
|
1680
1680
|
L && Ke(L.dashboard, {
|
|
1681
1681
|
semanticExecutionPayload: L.semanticExecutionPayload
|
|
@@ -1709,20 +1709,20 @@ function Xs() {
|
|
|
1709
1709
|
async function Je(d) {
|
|
1710
1710
|
if (i)
|
|
1711
1711
|
return;
|
|
1712
|
-
const
|
|
1713
|
-
if (!
|
|
1712
|
+
const R = k.getState().dashboard;
|
|
1713
|
+
if (!R)
|
|
1714
1714
|
return;
|
|
1715
1715
|
const _ = (d == null ? void 0 : d.closeAfterSave) ?? ut, re = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
|
|
1716
1716
|
Le(_), _ && de(!1);
|
|
1717
|
-
const _r = nt(
|
|
1717
|
+
const _r = nt(R);
|
|
1718
1718
|
q(!0), K(null), Me([]), He(!0);
|
|
1719
|
-
const
|
|
1720
|
-
template:
|
|
1719
|
+
const Rr = {
|
|
1720
|
+
template: R
|
|
1721
1721
|
};
|
|
1722
1722
|
ce.mutate(
|
|
1723
1723
|
{
|
|
1724
|
-
resourceId:
|
|
1725
|
-
data:
|
|
1724
|
+
resourceId: R.id,
|
|
1725
|
+
data: Rr
|
|
1726
1726
|
},
|
|
1727
1727
|
{
|
|
1728
1728
|
onSuccess: () => {
|
|
@@ -1733,9 +1733,9 @@ function Xs() {
|
|
|
1733
1733
|
)
|
|
1734
1734
|
), q(!1), Le(!1), _ && (_e(), ue(), re && ie && Ge()), Pe("close");
|
|
1735
1735
|
},
|
|
1736
|
-
onError: (
|
|
1736
|
+
onError: (Tr) => {
|
|
1737
1737
|
He(!1), K("Failed to save dashboard. Please try again.");
|
|
1738
|
-
const Ue =
|
|
1738
|
+
const Ue = Tr.details, Ur = Array.isArray(
|
|
1739
1739
|
Ue == null ? void 0 : Ue.errors
|
|
1740
1740
|
) ? (Ue.errors || []).filter(
|
|
1741
1741
|
(Br) => typeof Br == "string"
|
|
@@ -1743,7 +1743,7 @@ function Xs() {
|
|
|
1743
1743
|
Me(
|
|
1744
1744
|
ws({
|
|
1745
1745
|
errors: Ur,
|
|
1746
|
-
dashboard:
|
|
1746
|
+
dashboard: R || void 0
|
|
1747
1747
|
})
|
|
1748
1748
|
), C.error("Failed to save dashboard");
|
|
1749
1749
|
}
|
|
@@ -1759,7 +1759,7 @@ function Xs() {
|
|
|
1759
1759
|
const Lr = ie && !!(t != null && t.accessToken) && !!(n != null && n.apiServiceUrl), Or = !i && Q.showDashboardHub && Lr, Pr = !i && h && Q.showDashboardHub, W = (b == null ? void 0 : b.id) || null, wt = va(
|
|
1760
1760
|
(Ct = n.config) == null ? void 0 : Ct.showBriefings,
|
|
1761
1761
|
r
|
|
1762
|
-
),
|
|
1762
|
+
), Te = cn(W), Ye = ln();
|
|
1763
1763
|
if (!h && !U)
|
|
1764
1764
|
return null;
|
|
1765
1765
|
const me = !U && h && !i, Nt = D && me;
|
|
@@ -1801,8 +1801,8 @@ function Xs() {
|
|
|
1801
1801
|
canEditDashboard: p,
|
|
1802
1802
|
dashboardId: b == null ? void 0 : b.id
|
|
1803
1803
|
});
|
|
1804
|
-
const
|
|
1805
|
-
Ne(d), wr(d,
|
|
1804
|
+
const R = (b == null ? void 0 : b.title) || "";
|
|
1805
|
+
Ne(d), wr(d, R);
|
|
1806
1806
|
},
|
|
1807
1807
|
isEditable: Sa({
|
|
1808
1808
|
isDashboardEditing: D,
|
|
@@ -1820,7 +1820,7 @@ function Xs() {
|
|
|
1820
1820
|
] }),
|
|
1821
1821
|
/* @__PURE__ */ o("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
1822
1822
|
/* @__PURE__ */ o("div", { className: "-m-1 flex min-w-0 items-center gap-1.5 overflow-x-auto p-1 [scrollbar-width:thin] [&>*]:shrink-0", children: [
|
|
1823
|
-
U && /* @__PURE__ */ o(
|
|
1823
|
+
U && /* @__PURE__ */ o(T, { children: [
|
|
1824
1824
|
/* @__PURE__ */ e(mn, {}),
|
|
1825
1825
|
/* @__PURE__ */ e(hn, {})
|
|
1826
1826
|
] }),
|
|
@@ -1922,7 +1922,7 @@ function Xs() {
|
|
|
1922
1922
|
variant: "outline",
|
|
1923
1923
|
size: "xs",
|
|
1924
1924
|
onClick: Ir,
|
|
1925
|
-
disabled:
|
|
1925
|
+
disabled: Re,
|
|
1926
1926
|
"aria-label": "Undo",
|
|
1927
1927
|
title: I.width === "sm" ? "Undo" : void 0,
|
|
1928
1928
|
className: I.width === "sm" ? "w-7 px-0" : void 0,
|
|
@@ -1937,11 +1937,11 @@ function Xs() {
|
|
|
1937
1937
|
{
|
|
1938
1938
|
size: "xs",
|
|
1939
1939
|
className: be(!vt && "opacity-60"),
|
|
1940
|
-
disabled:
|
|
1940
|
+
disabled: Re || !vt,
|
|
1941
1941
|
onClick: () => Je(),
|
|
1942
1942
|
children: [
|
|
1943
|
-
|
|
1944
|
-
|
|
1943
|
+
Re ? /* @__PURE__ */ e($e, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(_n, { className: "h-3.5 w-3.5" }),
|
|
1944
|
+
Re ? "Saving..." : "Save"
|
|
1945
1945
|
]
|
|
1946
1946
|
}
|
|
1947
1947
|
),
|
|
@@ -1961,7 +1961,7 @@ function Xs() {
|
|
|
1961
1961
|
}
|
|
1962
1962
|
)
|
|
1963
1963
|
] }),
|
|
1964
|
-
!U && h && /* @__PURE__ */ o(
|
|
1964
|
+
!U && h && /* @__PURE__ */ o(T, { children: [
|
|
1965
1965
|
/* @__PURE__ */ e(xn, {}),
|
|
1966
1966
|
m && p === !0 && !i && /* @__PURE__ */ e(vn, {})
|
|
1967
1967
|
] }),
|
|
@@ -1986,16 +1986,16 @@ function Xs() {
|
|
|
1986
1986
|
className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
|
|
1987
1987
|
children: [
|
|
1988
1988
|
/* @__PURE__ */ e(Es, {}),
|
|
1989
|
-
|
|
1989
|
+
Te.available && Or && /* @__PURE__ */ o(T, { children: [
|
|
1990
1990
|
/* @__PURE__ */ o(
|
|
1991
1991
|
A,
|
|
1992
1992
|
{
|
|
1993
|
-
disabled:
|
|
1994
|
-
onSelect:
|
|
1993
|
+
disabled: Te.disabled,
|
|
1994
|
+
onSelect: Te.toggle,
|
|
1995
1995
|
children: [
|
|
1996
1996
|
/* @__PURE__ */ e(Ia, { className: "h-3.5 w-3.5" }),
|
|
1997
1997
|
/* @__PURE__ */ e("span", { className: "flex-1", children: "Default dashboard" }),
|
|
1998
|
-
|
|
1998
|
+
Te.isDefault && /* @__PURE__ */ e(zt, { className: "h-3.5 w-3.5" })
|
|
1999
1999
|
]
|
|
2000
2000
|
}
|
|
2001
2001
|
),
|
|
@@ -2033,7 +2033,7 @@ function Xs() {
|
|
|
2033
2033
|
}
|
|
2034
2034
|
),
|
|
2035
2035
|
/* @__PURE__ */ e(ae, {}),
|
|
2036
|
-
(Q.showDashboardSharing || Q.showGroupManagement) && /* @__PURE__ */ o(
|
|
2036
|
+
(Q.showDashboardSharing || Q.showGroupManagement) && /* @__PURE__ */ o(T, { children: [
|
|
2037
2037
|
/* @__PURE__ */ e(he, { children: "Access" }),
|
|
2038
2038
|
Q.showDashboardSharing && /* @__PURE__ */ o(A, { onSelect: () => X(!0), children: [
|
|
2039
2039
|
/* @__PURE__ */ e(Oa, { className: "h-3.5 w-3.5" }),
|
|
@@ -2051,7 +2051,7 @@ function Xs() {
|
|
|
2051
2051
|
),
|
|
2052
2052
|
/* @__PURE__ */ e(ae, {})
|
|
2053
2053
|
] }),
|
|
2054
|
-
Nt && /* @__PURE__ */ o(
|
|
2054
|
+
Nt && /* @__PURE__ */ o(T, { children: [
|
|
2055
2055
|
/* @__PURE__ */ e(he, { children: "Dashboard" }),
|
|
2056
2056
|
/* @__PURE__ */ o(A, { onSelect: Ye.open, children: [
|
|
2057
2057
|
/* @__PURE__ */ e(Pt, { className: "h-3.5 w-3.5" }),
|
|
@@ -2059,7 +2059,7 @@ function Xs() {
|
|
|
2059
2059
|
/* @__PURE__ */ e("span", { className: "pl-4 text-[11px] tabular-nums text-muted-foreground", children: Ye.count })
|
|
2060
2060
|
] }),
|
|
2061
2061
|
/* @__PURE__ */ o(A, { onSelect: gr, children: [
|
|
2062
|
-
/* @__PURE__ */ e(
|
|
2062
|
+
/* @__PURE__ */ e(Rn, { className: "h-3.5 w-3.5" }),
|
|
2063
2063
|
"Style"
|
|
2064
2064
|
] }),
|
|
2065
2065
|
/* @__PURE__ */ e(ae, {})
|
|
@@ -2069,7 +2069,7 @@ function Xs() {
|
|
|
2069
2069
|
/* @__PURE__ */ e(jt, { className: "h-3.5 w-3.5" }),
|
|
2070
2070
|
"Report preferences"
|
|
2071
2071
|
] }),
|
|
2072
|
-
u && h && /* @__PURE__ */ o(
|
|
2072
|
+
u && h && /* @__PURE__ */ o(T, { children: [
|
|
2073
2073
|
/* @__PURE__ */ e(ae, {}),
|
|
2074
2074
|
/* @__PURE__ */ e(he, { children: "Developer" }),
|
|
2075
2075
|
/* @__PURE__ */ o(
|
|
@@ -2126,7 +2126,7 @@ function Xs() {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
),
|
|
2128
2128
|
/* @__PURE__ */ o(A, { onSelect: l, children: [
|
|
2129
|
-
/* @__PURE__ */ e(
|
|
2129
|
+
/* @__PURE__ */ e(Tn, { className: "h-3.5 w-3.5" }),
|
|
2130
2130
|
"Brand Studio"
|
|
2131
2131
|
] }),
|
|
2132
2132
|
D && /* @__PURE__ */ o(
|
|
@@ -2195,13 +2195,13 @@ function Xs() {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
),
|
|
2197
2197
|
/* @__PURE__ */ e(
|
|
2198
|
-
|
|
2198
|
+
Ra,
|
|
2199
2199
|
{
|
|
2200
2200
|
open: Ie,
|
|
2201
2201
|
onOpenChange: (d) => {
|
|
2202
2202
|
!d && Ve && !z || (q(d), d || (K(null), Me([]), Le(!1)));
|
|
2203
2203
|
},
|
|
2204
|
-
children: /* @__PURE__ */ o(
|
|
2204
|
+
children: /* @__PURE__ */ o(Ta, { className: "max-w-sm", children: [
|
|
2205
2205
|
/* @__PURE__ */ o(Ua, { children: [
|
|
2206
2206
|
/* @__PURE__ */ e(Ba, { children: z ? "Save failed" : "Saving dashboard" }),
|
|
2207
2207
|
/* @__PURE__ */ e(Fa, { className: "pt-2", children: z ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
|
|
@@ -2210,7 +2210,7 @@ function Xs() {
|
|
|
2210
2210
|
/* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: oe.slice(0, 5).map((d) => /* @__PURE__ */ e("li", { children: d }, d)) })
|
|
2211
2211
|
] })
|
|
2212
2212
|
] }),
|
|
2213
|
-
/* @__PURE__ */ e($a, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: z ? /* @__PURE__ */ o(
|
|
2213
|
+
/* @__PURE__ */ e($a, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: z ? /* @__PURE__ */ o(T, { children: [
|
|
2214
2214
|
/* @__PURE__ */ e(
|
|
2215
2215
|
Ga,
|
|
2216
2216
|
{
|
|
@@ -2260,7 +2260,7 @@ function Xs() {
|
|
|
2260
2260
|
}
|
|
2261
2261
|
function Es() {
|
|
2262
2262
|
const t = Va();
|
|
2263
|
-
return t.length === 0 ? null : /* @__PURE__ */ o(
|
|
2263
|
+
return t.length === 0 ? null : /* @__PURE__ */ o(T, { children: [
|
|
2264
2264
|
t.map((n) => /* @__PURE__ */ o(A, { onSelect: n.onSelect, children: [
|
|
2265
2265
|
n.icon,
|
|
2266
2266
|
/* @__PURE__ */ e("span", { className: "flex-1", children: n.label }),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as u, useState as f, useRef as b, useEffect as p } from "react";
|
|
3
|
-
import { u as o } from "./semaphor-ready-indicator-
|
|
4
|
-
import { B as S, X as N, C as D } from "./style-sheet-parts-
|
|
3
|
+
import { u as o } from "./semaphor-ready-indicator-zU9reNmX.js";
|
|
4
|
+
import { B as S, X as N, C as D } from "./style-sheet-parts-D7NbsFL0.js";
|
|
5
5
|
import { c as J } from "./pickers-DkqmtnTL.js";
|
|
6
|
-
import "./validators-
|
|
7
|
-
import "./matrix-operation-contract-
|
|
8
|
-
import "./analytics-base-schemas-
|
|
6
|
+
import "./validators-CrYXNnNE.js";
|
|
7
|
+
import "./matrix-operation-contract-JSmproo9.js";
|
|
8
|
+
import "./analytics-base-schemas-8wz9vqn_.js";
|
|
9
9
|
import "../value-format-preferences/index.js";
|
|
10
10
|
function z() {
|
|
11
11
|
const r = o((s) => s.dashboard), c = o((s) => s.actions.setDashboard), h = o(
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { d as D, e as h } from "./filter-reach-copy-D5AmDHda.js";
|
|
2
|
+
import { h as y, d as g, r as b, a as m, e as F } from "./resolve-dashboard-input-context-DFBIngUZ.js";
|
|
3
|
+
import "./validators-CrYXNnNE.js";
|
|
4
|
+
import "./matrix-operation-contract-JSmproo9.js";
|
|
5
|
+
import "./analytics-base-schemas-8wz9vqn_.js";
|
|
6
|
+
import "zod";
|
|
7
|
+
import "./pivot-result-contract-expectations-DbBahmgc.js";
|
|
8
|
+
import "../value-format-preferences/index.js";
|
|
9
|
+
import { A as w } from "./bookmark-state-Bn7k3ttp.js";
|
|
10
|
+
import "./schema-C9NPiIru.js";
|
|
11
|
+
import "./index-CV_Kzou0.js";
|
|
12
|
+
import "./context-CVXTFljo.js";
|
|
13
|
+
import { p as N, r as T } from "./stored-dashboard-CksluF2S.js";
|
|
14
|
+
import { g as C } from "./saved-dashboard-context-DKMTP9ib.js";
|
|
15
|
+
const M = ["hour", "day", "week", "month", "quarter", "year"], O = 12, P = {
|
|
16
|
+
automatic: "Automatic",
|
|
17
|
+
card: "Set on this card",
|
|
18
|
+
trend_by: "From Trend By"
|
|
19
|
+
};
|
|
20
|
+
function j(r, e, n = {}) {
|
|
21
|
+
if (!r) return;
|
|
22
|
+
const t = r.granularity;
|
|
23
|
+
if (r.skipped)
|
|
24
|
+
return {
|
|
25
|
+
head: `Too many points by ${t}`,
|
|
26
|
+
// A Trend By sets the grain, so the fix is there (review P3R-02).
|
|
27
|
+
detail: r.grainSource === "trend_by" ? "Pick a coarser grain on the Trend By." : "Pick a coarser grain, or Automatic."
|
|
28
|
+
};
|
|
29
|
+
const i = P[r.grainSource], a = r.span === "recent" ? `The last 12 ${t}s: no date range` : r.span === "history" ? `The 12 ${t}s ending with this one` : r.window ? D({ ...r.window, timezone: r.calendar.tz }, n.now) : void 0;
|
|
30
|
+
return {
|
|
31
|
+
head: `By ${t} · ${e} ${e === 1 ? "point" : "points"}`,
|
|
32
|
+
detail: a ? `${a} · ${i}` : i
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function q(r, e) {
|
|
36
|
+
var t;
|
|
37
|
+
if (e.status === "blocked" || (t = r.sql) != null && t.trim()) return !1;
|
|
38
|
+
const n = new Set(
|
|
39
|
+
e.mappingDispositions.flatMap(
|
|
40
|
+
(i) => i.status === "apply" ? [i.filterValue.filterId] : []
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
return e.cardFilterValues.some((i) => {
|
|
44
|
+
const a = e.queryFilterDefinitions.find(
|
|
45
|
+
(d) => d.id === i.filterId
|
|
46
|
+
);
|
|
47
|
+
if (!y(i)) return !1;
|
|
48
|
+
if (!(n.has(i.filterId) || (a == null ? void 0 : a.kind) === "global-date"))
|
|
49
|
+
return !!(a && $(
|
|
50
|
+
[a],
|
|
51
|
+
e.resolvedPrimaryDateField,
|
|
52
|
+
[i]
|
|
53
|
+
));
|
|
54
|
+
const s = g(i);
|
|
55
|
+
return !!(s && b({
|
|
56
|
+
card: r,
|
|
57
|
+
filter: s,
|
|
58
|
+
filterValue: i,
|
|
59
|
+
effectiveFilterValue: i,
|
|
60
|
+
temporalBinding: e.resolvedPrimaryDateField
|
|
61
|
+
}).status === "eligible");
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function $(r, e, n) {
|
|
65
|
+
if (!e) return !1;
|
|
66
|
+
const t = e.qualifiedFieldName, i = e.qualifiedEntityName, a = i && e.name ? `${i}.${e.name}` : t;
|
|
67
|
+
return r.some((o) => {
|
|
68
|
+
if (!(m(o.dataType || "") === "date")) return !1;
|
|
69
|
+
const d = h(o, n), l = d.split("."), c = l[l.length - 1] || d, p = l.length > 1 ? l.slice(0, -1).join(".") : void 0, f = o.qualifiedTableName || p, u = f ? `${f}.${c}` : void 0;
|
|
70
|
+
return t ? u ? u === a || u.endsWith(`.${t}`) : c === e.name : u ? u === a : c === e.name;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function R(r, e) {
|
|
74
|
+
const n = (a) => {
|
|
75
|
+
const o = a.field;
|
|
76
|
+
return o ? e.id && o.id === e.id ? !0 : e.qualifiedFieldName && o.qualifiedFieldName ? o.qualifiedFieldName === e.qualifiedFieldName : o.name === e.name : !1;
|
|
77
|
+
}, t = (a) => a.conditions.some((o) => {
|
|
78
|
+
var s;
|
|
79
|
+
return m(((s = o.field) == null ? void 0 : s.dataType) || "") === "date" && n(o);
|
|
80
|
+
}) || a.groups.some(t), i = F(r);
|
|
81
|
+
return i ? t(i) : !1;
|
|
82
|
+
}
|
|
83
|
+
function k(r, e) {
|
|
84
|
+
var s, d;
|
|
85
|
+
const n = (d = (s = r.config) == null ? void 0 : s.groupByColumns) == null ? void 0 : d.find((l) => m(l.dataType || "") === "date"), t = e.resolvedPrimaryDateField, i = n ? { id: n.id, name: n.name, label: n.label || n.name, qualifiedFieldName: n.qualifiedFieldName } : t ? { name: t.name, label: t.name, qualifiedFieldName: t.qualifiedFieldName } : void 0;
|
|
86
|
+
if (!i) return { comparisonDate: null, dateWindow: e.status === "ready" ? "none" : "unknown" };
|
|
87
|
+
const a = { name: i.name, label: i.label };
|
|
88
|
+
if (R(r, i)) return { comparisonDate: a, dateWindow: "applies" };
|
|
89
|
+
if (e.status !== "ready") return { comparisonDate: a, dateWindow: "unknown" };
|
|
90
|
+
const o = q(r, { status: "ready", ...e.compiledFilters });
|
|
91
|
+
return { comparisonDate: a, dateWindow: o ? "applies" : "none" };
|
|
92
|
+
}
|
|
93
|
+
function U(r) {
|
|
94
|
+
const e = N(r.dashboard), n = w(e).find((o) => o.cardId === r.cardId);
|
|
95
|
+
if (!n || n.kind === "documentSectionCard") return { comparisonDate: null, dateWindow: "unknown" };
|
|
96
|
+
const { runtimeValues: t, transientContexts: i } = T({ dashboard: e, capture: {}, calendar: r.calendar }), a = C({
|
|
97
|
+
dashboard: e,
|
|
98
|
+
location: n,
|
|
99
|
+
runtimeValues: t,
|
|
100
|
+
semanticExecutionPayload: r.semanticExecutionPayload,
|
|
101
|
+
calendar: r.calendar,
|
|
102
|
+
transientContexts: i
|
|
103
|
+
});
|
|
104
|
+
return k(
|
|
105
|
+
n.card,
|
|
106
|
+
(a == null ? void 0 : a.status) === "ready" ? { status: "ready", compiledFilters: a.compiledFilters, resolvedPrimaryDateField: a.resolvedPrimaryDateField } : { status: "blocked", resolvedPrimaryDateField: a == null ? void 0 : a.resolvedPrimaryDateField }
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
export {
|
|
110
|
+
M as K,
|
|
111
|
+
O as a,
|
|
112
|
+
U as b,
|
|
113
|
+
j as d,
|
|
114
|
+
k as r
|
|
115
|
+
};
|