react-semaphor 0.1.602 → 0.1.603

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.
Files changed (107) hide show
  1. package/dist/analytics-protocol/index.js +415 -375
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
  8. package/dist/chunks/{assistant-chat-BWF3GYip.js → assistant-chat-B6hNQI1t.js} +146 -146
  9. package/dist/chunks/{bookmark-impact-BF3iRx5a.js → bookmark-impact-Ba2PLcGp.js} +3 -3
  10. package/dist/chunks/{bookmark-state-CBSTdW6q.js → bookmark-state-n7AaNzR_.js} +517 -516
  11. package/dist/chunks/{card-filter-builder-B8XHwMY6.js → card-filter-builder-Y22HizVx.js} +104 -104
  12. package/dist/chunks/{comparison-window-caption-W83qB4V5.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
  13. package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
  14. package/dist/chunks/{dashboard-DG5EIYYB.js → dashboard-BghI99oY.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CBSrhyWZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +103 -103
  16. package/dist/chunks/{dashboard-controls-D6ECO4N1.js → dashboard-controls-CtFXlyjV.js} +53 -53
  17. package/dist/chunks/{dashboard-json-DrJftBSL.js → dashboard-json-DfGBUtCd.js} +5 -5
  18. package/dist/chunks/dates-BnrXF4bb.js +185 -0
  19. package/dist/chunks/{edit-dashboard-visual-BDYAJIbb.js → edit-dashboard-visual-oxt3x1wb.js} +7976 -8184
  20. package/dist/chunks/{filter-line-BXT6y303.js → filter-line-Cy5YYqRL.js} +27 -27
  21. package/dist/chunks/{filter-reach-copy-BukhZmzm.js → filter-reach-copy-CE_ZX147.js} +1590 -1729
  22. package/dist/chunks/{filter-value-text-D3-bf3_b.js → filter-value-text-fWvSDwkl.js} +11 -11
  23. package/dist/chunks/{index-BW0yozjs.js → index-D5rxbtS4.js} +24 -24
  24. package/dist/chunks/{layout-grid-Ds0diMeY.js → layout-grid-9LndRoLa.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CgQgVeeI.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
  26. package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
  27. package/dist/chunks/{matrix-operation-contract--DkNCOzd.js → matrix-operation-contract-DPBj69D8.js} +3 -2
  28. package/dist/chunks/{metric-comparison-zMylnIkc.js → metric-comparison-B0FR-Q8I.js} +184 -125
  29. package/dist/chunks/{paintbrush-CX8pao1j.js → paintbrush-58FQYY-y.js} +1 -1
  30. package/dist/chunks/{palette-CuA0HlzF.js → palette-Be62Tkoa.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-C8KL7hPx.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
  32. package/dist/chunks/{pivot-result-identity-C1AOH1PS.js → pivot-result-identity-CAP4--iq.js} +1 -1
  33. package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
  34. package/dist/chunks/{report-preferences-dialog-CbuVNDGi.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
  35. package/dist/chunks/{report-runtime-context-E7USjN7E.js → report-runtime-context-c77_KF9v.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-CULCE_hM.js → resolve-dashboard-input-context-Rtl1ffmE.js} +7115 -6963
  37. package/dist/chunks/{save-BKHlDONy.js → save-C5A0JnEV.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-C1WlOx5z.js → saved-dashboard-context-tcyTU8jm.js} +193 -207
  39. package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
  40. package/dist/chunks/{semaphor-ready-indicator-CBIRcDWs.js → semaphor-ready-indicator-FBvunj6S.js} +35550 -35273
  41. package/dist/chunks/{shelf-drop-preview-context-xR69SMA8.js → shelf-drop-preview-context-QKStrcK9.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-BuM8vnWf.js → stored-dashboard-CHozcAY9.js} +621 -616
  43. package/dist/chunks/{style-sheet-parts-Bt9ZNre8.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
  44. package/dist/chunks/{table-export-sheet-DVljtHkG.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
  45. package/dist/chunks/{token-types-D_xKgyVS.js → token-types-XbM6QByy.js} +1 -1
  46. package/dist/chunks/{upload-Dll_M7XQ.js → upload-H15d7uHK.js} +1 -1
  47. package/dist/chunks/{validators-ClWHpYql.js → validators-Baf3VIf5.js} +3 -3
  48. package/dist/chunks/{variable-draft-CDGGl53R.js → variable-draft-C2y8Jp6Z.js} +3 -3
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2466 -2343
  51. package/dist/format-utils/index.js +205 -204
  52. package/dist/index.js +20 -20
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
  57. package/dist/types/index.js +5 -5
  58. package/dist/types/lib/document/document-edits.d.ts +0 -4
  59. package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
  60. package/dist/types/lib/types/common-types.d.ts +0 -2
  61. package/dist/types/lib/types/explorer-types.d.ts +1 -1
  62. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
  63. package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
  64. package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
  65. package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
  66. package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
  67. package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
  68. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
  69. package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
  70. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  71. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
  72. package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
  73. package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +1 -1
  74. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
  75. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  76. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
  77. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
  78. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +21 -358
  79. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
  80. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  81. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
  82. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
  83. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
  84. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
  85. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
  86. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
  87. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
  88. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
  89. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
  90. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
  91. package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +33 -8
  92. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +0 -2
  93. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
  94. package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
  95. package/dist/types/shared/format-utils/index.d.ts +1 -0
  96. package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
  97. package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
  98. package/dist/types/shared/temporal/index.d.ts +2 -0
  99. package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
  100. package/dist/types/shared/temporal/temporal.d.ts +27 -0
  101. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
  102. package/dist/usage-events/index.js +1 -1
  103. package/package.json +3 -2
  104. package/dist/chunks/dates-Bz-qM5px.js +0 -164
  105. package/dist/chunks/matrix-member-presentation-DSBIIudt.js +0 -258
  106. package/dist/chunks/raw-temporal-value-E416F-0L.js +0 -454
  107. package/dist/chunks/selection-filter-compiler-ifT8JCXS.js +0 -131
@@ -1,27 +1,27 @@
1
1
  import { jsx as e, jsxs as o, Fragment as R } from "react/jsx-runtime";
2
- import { cy as Fr, u as k, cz as $r, cA as Gr, cB as ot, cC as Vr, cD as Hr, cE as jr, cF as qr, cG as zr, cH as Kr, b8 as J, b5 as xe, cI as ve, bF as C, cJ as Qr, bG as $t, bH as Gt, bJ as tt, bK as rt, cK as Vt, bZ as it, bU as Wr, bS as ne, cL as Jr, cM as Yr, cN as Ht, cO as Xr, cP as jt, bO as Zr, bI as ea, cQ as ta, cR as A, cS as ra, bL as aa, cT as na, aS as sa, cU as oa, bv as ia, cV as da, bw as ca, p as la, aa as ua, am as Et, o as Be, x as ma, q as Xe, O as ha, cW as pa, cX as fa, a8 as ga, cY as ba, s as xa, cZ as va, I as ya, c_ as wa, c$ as Na, d0 as Sa, d1 as At, d2 as It, d3 as Lt, d4 as Da, bx as ka, d5 as Ca, T as Ea, d6 as Aa, d7 as Ia, d8 as ae, d9 as he, da as La, db as Ma, dc as Oa, dd as Mt, w as Pa, de as _a, df as Ta, dg as Ra, dh as Ua, di as Ba, dj as Fa, dk as $a, dl as Ga, dm as Ot, Q as Va } from "./semaphor-ready-indicator-CBIRcDWs.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-Bt9ZNre8.js";
2
+ import { cz as Fr, u as k, cA as $r, cB as Gr, cC as ot, cD as Vr, cE as Hr, cF as jr, cG as qr, cH as zr, cI as Kr, b8 as J, b5 as xe, cJ as ve, bG as C, cK as Qr, bH as $t, bI as Gt, bK as tt, bL as rt, cL as Vt, b_ as it, bV as Wr, bT as ne, cM as Jr, cN as Yr, cO as Ht, cP as Xr, cQ as jt, bP as Zr, bJ as ea, cR as ta, cS as A, cT as ra, bM as aa, cU as na, aS as sa, cV as oa, bv as ia, cW as da, bw as ca, p as la, aa as ua, am as Et, o as Be, x as ma, q as Xe, O as ha, cX as pa, cY as fa, a8 as ga, cZ as ba, s as xa, c_ as va, I as ya, c$ as wa, d0 as Na, d1 as Sa, d2 as At, d3 as It, d4 as Mt, d5 as Da, bx as ka, d6 as Ca, T as Ea, d7 as Aa, d8 as Ia, d9 as ae, da as he, db as Ma, dc as La, dd as Oa, de as Lt, w as Pa, df as _a, dg as Ta, dh as Ra, di as Ua, dj as Ba, dk as Fa, dl as $a, dm as Ga, dn as Ot, Q as Va } from "./semaphor-ready-indicator-FBvunj6S.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-CDCG-8Ej.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-ClWHpYql.js";
8
- import "./matrix-operation-contract--DkNCOzd.js";
9
- import "./analytics-base-schemas-DevrgqQb.js";
7
+ import "./validators-Baf3VIf5.js";
8
+ import "./matrix-operation-contract-DPBj69D8.js";
9
+ import "./analytics-base-schemas-DsUh5Q3C.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-CBSrhyWZ.js";
12
- import { I as Dn } from "./card-filter-builder-B8XHwMY6.js";
13
- import { c as kn, R as Cn } from "./report-preferences-dialog-CbuVNDGi.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-DtBAnGiH.js";
12
+ import { I as Dn } from "./card-filter-builder-Y22HizVx.js";
13
+ import { c as kn, R as Cn } from "./report-preferences-dialog-uJp9GBTM.js";
14
14
  import { createPortal as En } from "react-dom";
15
- import { hZ as we, h_ as dt, h$ as Qt, z as An } from "./resolve-dashboard-input-context-CULCE_hM.js";
16
- import { aU as Wt } from "./pivot-result-contract-expectations-C8KL7hPx.js";
17
- import { g as nt } from "./stored-dashboard-BuM8vnWf.js";
15
+ import { i7 as we, i8 as dt, i9 as Qt, q as An } from "./resolve-dashboard-input-context-Rtl1ffmE.js";
16
+ import { aX as Wt } from "./pivot-result-contract-expectations-BYqAmG9n.js";
17
+ import { g as nt } from "./stored-dashboard-CHozcAY9.js";
18
18
  import { r as In } from "./export-file-format-C-tJsxsf.js";
19
- import { u as Ln, s as Mn } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
20
- import { A as Jt } from "./bookmark-state-CBSTdW6q.js";
21
- import { d as On, a as Pn } from "./bookmark-impact-BF3iRx5a.js";
22
- import { S as _n } from "./save-BKHlDONy.js";
23
- import { P as Tn } from "./paintbrush-CX8pao1j.js";
24
- import { P as Rn } from "./palette-CuA0HlzF.js";
19
+ import { u as Mn, s as Ln } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
20
+ import { A as Jt } from "./bookmark-state-n7AaNzR_.js";
21
+ import { d as On, a as Pn } from "./bookmark-impact-Ba2PLcGp.js";
22
+ import { S as _n } from "./save-C5A0JnEV.js";
23
+ import { P as Tn } from "./paintbrush-58FQYY-y.js";
24
+ import { P as Rn } from "./palette-Be62Tkoa.js";
25
25
  /**
26
26
  * @license lucide-react v0.453.0 - ISC
27
27
  *
@@ -844,13 +844,13 @@ function gs({
844
844
  }), S = H(
845
845
  () => new Set(l.map((v) => v.userId)),
846
846
  [l]
847
- ), O = cs(), b = ls(), F = is(), [P, $] = N(!1), [L, D] = N(t.name), [Ne, Y] = N(!1), [X, Z] = N(t.description || ""), [ee, Se] = N(""), [De, ke] = N(!1), Ce = H(() => {
847
+ ), O = cs(), b = ls(), F = is(), [P, $] = N(!1), [M, D] = N(t.name), [Ne, Y] = N(!1), [X, Z] = N(t.description || ""), [ee, Se] = N(""), [De, ke] = N(!1), Ce = H(() => {
848
848
  const v = ee.trim().toLowerCase();
849
849
  return w.filter((B) => !S.has(B.id)).filter(
850
850
  (B) => !v || (B.name || "").toLowerCase().includes(v) || (B.email || "").toLowerCase().includes(v)
851
851
  ).slice(0, 50);
852
852
  }, [w, S, ee]), se = async () => {
853
- const v = L.trim();
853
+ const v = M.trim();
854
854
  if ($(!1), v.length >= 3 && v !== t.name)
855
855
  try {
856
856
  await F.mutateAsync({
@@ -915,7 +915,7 @@ function gs({
915
915
  "input",
916
916
  {
917
917
  autoFocus: !0,
918
- value: L,
918
+ value: M,
919
919
  onChange: (v) => D(v.target.value),
920
920
  onBlur: se,
921
921
  onKeyDown: (v) => {
@@ -1545,14 +1545,14 @@ function Xs() {
1545
1545
  isInspectionSurface: f
1546
1546
  } = ia(), { openBrandStudioPreview: l } = da(), { permissions: x } = qn(), h = ca(), { isLoading: w } = la(), S = k((d) => d.theme), O = k((d) => d.isDownloadingPdf), b = k((d) => d.dashboard), F = k((d) => d.selectedSheetId), P = (St = b == null ? void 0 : b.sheets) == null ? void 0 : St.find(
1547
1547
  (d) => d.id === F
1548
- ), $ = An(P), L = $ ? (Dt = P == null ? void 0 : P.document) == null ? void 0 : Dt.page : void 0, D = k(
1548
+ ), $ = An(P), M = $ ? (Dt = P == null ? void 0 : P.document) == null ? void 0 : Dt.page : void 0, D = k(
1549
1549
  (d) => d.isDashboardEditing
1550
1550
  ), { setDashboardTitle: Ne } = k((d) => d.actions), [Y, X] = N(!1), [Z, ee] = N(!1), [Se, De] = N(!1), [ke, Ce] = N(!1), [se, te] = N(null), [Ee, Ae] = N(null), { registerBriefingViewer: j } = ua();
1551
1551
  ge(
1552
1552
  () => j((d) => Ae(d)),
1553
1553
  [j]
1554
1554
  );
1555
- const [v, B] = N(!1), [Ie, q] = N(!1), [z, K] = N(null), [oe, Le] = N([]), [ut, Me] = N(!1), [mr, mt] = N(!1), U = k((d) => d.isVisualEditing);
1555
+ const [v, B] = N(!1), [Ie, q] = N(!1), [z, K] = N(null), [oe, Me] = N([]), [ut, Le] = N(!1), [mr, mt] = N(!1), U = k((d) => d.isVisualEditing);
1556
1556
  Et((d) => d.card);
1557
1557
  const hr = Be(
1558
1558
  (d) => d.selectedDashboard
@@ -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), [M, le] = N(null), wr = async (d, T) => {
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, T) => {
1580
1580
  if (!i) {
1581
1581
  if (!(b != null && b.id)) {
1582
1582
  console.log("No dashboard ID found");
@@ -1625,8 +1625,8 @@ function Xs() {
1625
1625
  accessToken: t == null ? void 0 : t.accessToken,
1626
1626
  dashboardId: (b == null ? void 0 : b.id) || a || n.dashboard_id,
1627
1627
  selectedSheetId: $ ? F : void 0,
1628
- pageSize: L == null ? void 0 : L.size,
1629
- orientation: L == null ? void 0 : L.orientation,
1628
+ pageSize: M == null ? void 0 : M.size,
1629
+ orientation: M == null ? void 0 : M.orientation,
1630
1630
  theme: S
1631
1631
  }),
1632
1632
  [
@@ -1634,8 +1634,8 @@ function Xs() {
1634
1634
  a,
1635
1635
  b == null ? void 0 : b.id,
1636
1636
  $,
1637
- L == null ? void 0 : L.orientation,
1638
- L == null ? void 0 : L.size,
1637
+ M == null ? void 0 : M.orientation,
1638
+ M == null ? void 0 : M.size,
1639
1639
  F,
1640
1640
  S,
1641
1641
  n.dashboard_id
@@ -1649,10 +1649,10 @@ function Xs() {
1649
1649
  };
1650
1650
  ge(() => {
1651
1651
  if (!D) {
1652
- M && le(null);
1652
+ L && le(null);
1653
1653
  return;
1654
1654
  }
1655
- if (M || !b || w)
1655
+ if (L || !b || w)
1656
1656
  return;
1657
1657
  const d = xa(k.getState());
1658
1658
  le(
@@ -1660,25 +1660,25 @@ function Xs() {
1660
1660
  );
1661
1661
  }, [
1662
1662
  b,
1663
- M,
1663
+ L,
1664
1664
  D,
1665
1665
  w,
1666
1666
  Sr
1667
1667
  ]);
1668
- const Qe = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: We, isDirtyPending: kr, resetDirty: ue } = Ln(
1668
+ const Qe = (L == null ? void 0 : L.dashboard) ?? null, { isDirty: We, isDirtyPending: kr, resetDirty: ue } = Mn(
1669
1669
  b,
1670
1670
  Qe,
1671
1671
  300,
1672
1672
  1e3,
1673
- Mn
1673
+ Ln
1674
1674
  ), xt = dn(
1675
1675
  Qe,
1676
1676
  i,
1677
1677
  p
1678
1678
  ), vt = We || kr, Te = Ve || ce.isPending, Cr = () => {
1679
1679
  if (i) {
1680
- M && Ke(M.dashboard, {
1681
- semanticExecutionPayload: M.semanticExecutionPayload
1680
+ L && Ke(L.dashboard, {
1681
+ semanticExecutionPayload: L.semanticExecutionPayload
1682
1682
  }), _e(), ue();
1683
1683
  return;
1684
1684
  }
@@ -1690,14 +1690,14 @@ function Xs() {
1690
1690
  });
1691
1691
  }, Ar = () => {
1692
1692
  const d = je === "home" && !!ie;
1693
- M && Ke(M.dashboard, {
1694
- semanticExecutionPayload: M.semanticExecutionPayload
1693
+ L && Ke(L.dashboard, {
1694
+ semanticExecutionPayload: L.semanticExecutionPayload
1695
1695
  }), _e(), d && Ge(), Pe("close"), de(!1), ue();
1696
1696
  }, Ir = () => {
1697
- M && (Ke(M.dashboard, {
1698
- semanticExecutionPayload: M.semanticExecutionPayload
1697
+ L && (Ke(L.dashboard, {
1698
+ semanticExecutionPayload: L.semanticExecutionPayload
1699
1699
  }), ue());
1700
- }, Lr = () => {
1700
+ }, Mr = () => {
1701
1701
  if (ie) {
1702
1702
  if (D && xt()) {
1703
1703
  Pe("home"), de(!0);
@@ -1713,9 +1713,9 @@ function Xs() {
1713
1713
  if (!T)
1714
1714
  return;
1715
1715
  const _ = (d == null ? void 0 : d.closeAfterSave) ?? ut, re = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
1716
- Me(_), _ && de(!1);
1716
+ Le(_), _ && de(!1);
1717
1717
  const _r = nt(T);
1718
- q(!0), K(null), Le([]), He(!0);
1718
+ q(!0), K(null), Me([]), He(!0);
1719
1719
  const Tr = {
1720
1720
  template: T
1721
1721
  };
@@ -1731,7 +1731,7 @@ function Xs() {
1731
1731
  _r,
1732
1732
  k.getState().semanticExecutionPayload
1733
1733
  )
1734
- ), q(!1), Me(!1), _ && (_e(), ue(), re && ie && Ge()), Pe("close");
1734
+ ), q(!1), Le(!1), _ && (_e(), ue(), re && ie && Ge()), Pe("close");
1735
1735
  },
1736
1736
  onError: (Rr) => {
1737
1737
  He(!1), K("Failed to save dashboard. Please try again.");
@@ -1740,7 +1740,7 @@ function Xs() {
1740
1740
  ) ? (Ue.errors || []).filter(
1741
1741
  (Br) => typeof Br == "string"
1742
1742
  ) : [];
1743
- Le(
1743
+ Me(
1744
1744
  ws({
1745
1745
  errors: Ur,
1746
1746
  dashboard: T || void 0
@@ -1756,7 +1756,7 @@ function Xs() {
1756
1756
  dashboardStateTitle: b.title,
1757
1757
  dashboardId: b == null ? void 0 : b.id
1758
1758
  });
1759
- const Mr = ie && !!(t != null && t.accessToken) && !!(n != null && n.apiServiceUrl), Or = !i && Q.showDashboardHub && Mr, Pr = !i && h && Q.showDashboardHub, W = (b == null ? void 0 : b.id) || null, wt = va(
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
  ), Re = cn(W), Ye = ln();
@@ -1776,7 +1776,7 @@ function Xs() {
1776
1776
  {
1777
1777
  "aria-label": "Dashboard Hub",
1778
1778
  tooltip: "Dashboard Hub",
1779
- onClick: Lr,
1779
+ onClick: Mr,
1780
1780
  className: "h-7 w-7 px-0",
1781
1781
  buttonProps: { size: "xs" },
1782
1782
  children: /* @__PURE__ */ e(wa, { className: "h-3.5 w-3.5" })
@@ -1860,7 +1860,7 @@ function Xs() {
1860
1860
  }
1861
1861
  ) }),
1862
1862
  /* @__PURE__ */ e(
1863
- Lt,
1863
+ Mt,
1864
1864
  {
1865
1865
  align: "end",
1866
1866
  className: "z-[60] w-48 rounded-control border-border/60 p-1 shadow-sm",
@@ -1980,7 +1980,7 @@ function Xs() {
1980
1980
  }
1981
1981
  ) }),
1982
1982
  /* @__PURE__ */ o(
1983
- Lt,
1983
+ Mt,
1984
1984
  {
1985
1985
  align: "end",
1986
1986
  className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
@@ -2008,7 +2008,7 @@ function Xs() {
2008
2008
  disabled: O,
2009
2009
  onSelect: () => B(!0),
2010
2010
  children: [
2011
- /* @__PURE__ */ e(La, { className: "h-3.5 w-3.5" }),
2011
+ /* @__PURE__ */ e(Ma, { className: "h-3.5 w-3.5" }),
2012
2012
  "Export"
2013
2013
  ]
2014
2014
  }
@@ -2027,7 +2027,7 @@ function Xs() {
2027
2027
  {
2028
2028
  onSelect: () => Ce(!0),
2029
2029
  children: [
2030
- /* @__PURE__ */ e(Ma, { className: "h-3.5 w-3.5" }),
2030
+ /* @__PURE__ */ e(La, { className: "h-3.5 w-3.5" }),
2031
2031
  "Download settings"
2032
2032
  ]
2033
2033
  }
@@ -2082,7 +2082,7 @@ function Xs() {
2082
2082
  ).catch(() => C.error("Unable to copy token")) : C.error("Clipboard not available"));
2083
2083
  },
2084
2084
  children: [
2085
- /* @__PURE__ */ e(Mt, { className: "h-3.5 w-3.5" }),
2085
+ /* @__PURE__ */ e(Lt, { className: "h-3.5 w-3.5" }),
2086
2086
  "Copy token"
2087
2087
  ]
2088
2088
  }
@@ -2110,7 +2110,7 @@ function Xs() {
2110
2110
  ) : C.error("Clipboard not available");
2111
2111
  },
2112
2112
  children: [
2113
- /* @__PURE__ */ e(Mt, { className: "h-3.5 w-3.5" }),
2113
+ /* @__PURE__ */ e(Lt, { className: "h-3.5 w-3.5" }),
2114
2114
  "Copy local document PDF URL"
2115
2115
  ]
2116
2116
  }
@@ -2199,7 +2199,7 @@ function Xs() {
2199
2199
  {
2200
2200
  open: Ie,
2201
2201
  onOpenChange: (d) => {
2202
- !d && Ve && !z || (q(d), d || (K(null), Le([]), Me(!1)));
2202
+ !d && Ve && !z || (q(d), d || (K(null), Me([]), Le(!1)));
2203
2203
  },
2204
2204
  children: /* @__PURE__ */ o(Ra, { className: "max-w-sm", children: [
2205
2205
  /* @__PURE__ */ o(Ua, { children: [
@@ -2215,7 +2215,7 @@ function Xs() {
2215
2215
  Ga,
2216
2216
  {
2217
2217
  onClick: () => {
2218
- q(!1), K(null), Le([]), Me(!1);
2218
+ q(!1), K(null), Me([]), Le(!1);
2219
2219
  },
2220
2220
  className: "m-0",
2221
2221
  children: "Close"
@@ -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-CBIRcDWs.js";
4
- import { B as S, X as N, C as D } from "./style-sheet-parts-Bt9ZNre8.js";
3
+ import { u as o } from "./semaphor-ready-indicator-FBvunj6S.js";
4
+ import { B as S, X as N, C as D } from "./style-sheet-parts-CDCG-8Ej.js";
5
5
  import { c as J } from "./pickers-DkqmtnTL.js";
6
- import "./validators-ClWHpYql.js";
7
- import "./matrix-operation-contract--DkNCOzd.js";
8
- import "./analytics-base-schemas-DevrgqQb.js";
6
+ import "./validators-Baf3VIf5.js";
7
+ import "./matrix-operation-contract-DPBj69D8.js";
8
+ import "./analytics-base-schemas-DsUh5Q3C.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,185 @@
1
+ import { k as w, m as b, n as F, r as y, e as p, o as k, p as T, q as N } from "./resolve-dashboard-input-context-Rtl1ffmE.js";
2
+ import { d as I, g as v } from "./filter-reach-copy-CE_ZX147.js";
3
+ import "./validators-Baf3VIf5.js";
4
+ import "./matrix-operation-contract-DPBj69D8.js";
5
+ import "./analytics-base-schemas-DsUh5Q3C.js";
6
+ import "zod";
7
+ import "./pivot-result-contract-expectations-BYqAmG9n.js";
8
+ import "../value-format-preferences/index.js";
9
+ import { D as C, F as P, G as S } from "./bookmark-state-n7AaNzR_.js";
10
+ import "./schema-C9NPiIru.js";
11
+ import "./index-CV_Kzou0.js";
12
+ import "./context-UCQ7sere.js";
13
+ import { u as R, w as q } from "./selection-filter-compiler-DNijjI5y.js";
14
+ import { b as g } from "./raw-temporal-value-Dg_MTFF7.js";
15
+ import { p as _, r as W } from "./stored-dashboard-CHozcAY9.js";
16
+ import { g as E } from "./saved-dashboard-context-tcyTU8jm.js";
17
+ function ae(e, n, r) {
18
+ const i = e.findIndex((s) => s.id === n);
19
+ if (i === -1) return e;
20
+ const t = e.filter((s, l) => l !== i), a = Math.max(0, Math.min(Math.trunc(r), t.length));
21
+ return a === i ? e : [...t.slice(0, a), e[i], ...t.slice(a)];
22
+ }
23
+ const $ = /* @__PURE__ */ new Set([
24
+ "bar",
25
+ "line",
26
+ "pie",
27
+ "doughnut",
28
+ "table",
29
+ "detailTable",
30
+ "stackedBar",
31
+ "stackedLine",
32
+ "horizontalBar",
33
+ "radar",
34
+ "polarArea",
35
+ "scatter",
36
+ "bubble",
37
+ "funnel",
38
+ "custom"
39
+ ]);
40
+ function oe(e) {
41
+ return !!(e && $.has(e));
42
+ }
43
+ const M = 250;
44
+ function se(e) {
45
+ return {
46
+ id: e.id,
47
+ ...w(e.field, {
48
+ dataSource: e.dataSource,
49
+ connectionId: e.connectionId
50
+ }),
51
+ width: M
52
+ };
53
+ }
54
+ function de(e, n, r) {
55
+ const i = e.flatMap((t) => {
56
+ if (r !== void 0 && t.id !== r) return [];
57
+ const a = (t.inlineFilters ?? []).findIndex((s) => s.id === n);
58
+ return a === -1 ? [] : [{ card: t, filter: t.inlineFilters[a], index: a }];
59
+ });
60
+ return i.length === 1 ? { kind: "found", ...i[0] } : i.length > 1 ? { kind: "ambiguous", cards: i.map((t) => t.card) } : { kind: "none" };
61
+ }
62
+ const le = ["hour", "day", "week", "month", "quarter", "year"], ce = 12, x = {
63
+ automatic: "Automatic",
64
+ card: "Set on this card",
65
+ trend_by: "From Trend By"
66
+ };
67
+ function ue(e, n, r = {}) {
68
+ if (!e) return;
69
+ const i = e.granularity;
70
+ if (e.skipped)
71
+ return {
72
+ head: `Too many points by ${i}`,
73
+ // A Trend By sets the grain, so the fix is there (ledger P3-05).
74
+ detail: e.grainSource === "trend_by" ? "Pick a coarser grain on the Trend By." : "Pick a coarser grain, or Automatic."
75
+ };
76
+ const t = x[e.grainSource], a = e.span === "recent" ? `The last 12 ${i}s: no date range` : e.span === "history" ? `The 12 ${i}s ending with this one` : e.window ? I({ ...e.window, timezone: e.calendar.tz }, r.now) : void 0;
77
+ return {
78
+ head: `By ${i} · ${n} ${n === 1 ? "point" : "points"}`,
79
+ detail: a ? `${a} · ${t}` : t
80
+ };
81
+ }
82
+ function A(e, n) {
83
+ var i;
84
+ if (n.status === "blocked" || (i = e.sql) != null && i.trim()) return [];
85
+ const r = new Set(
86
+ n.mappingDispositions.flatMap(
87
+ (t) => t.status === "apply" ? [t.filterValue.filterId] : []
88
+ )
89
+ );
90
+ return n.cardFilterValues.filter((t) => {
91
+ const a = n.queryFilterDefinitions.find(
92
+ (c) => c.id === t.filterId
93
+ );
94
+ if (!b(t)) return !1;
95
+ if (!(r.has(t.filterId) || (a == null ? void 0 : a.kind) === "global-date"))
96
+ return !!(a && B(
97
+ [a],
98
+ n.resolvedPrimaryDateField,
99
+ [t]
100
+ ));
101
+ const l = F(t);
102
+ return !!(l && y({
103
+ card: e,
104
+ filter: l,
105
+ filterValue: t,
106
+ effectiveFilterValue: t,
107
+ temporalBinding: n.resolvedPrimaryDateField
108
+ }).status === "eligible");
109
+ });
110
+ }
111
+ function B(e, n, r) {
112
+ if (!n) return !1;
113
+ const i = n.qualifiedFieldName, t = n.qualifiedEntityName, a = t && n.name ? `${t}.${n.name}` : i;
114
+ return e.some((s) => {
115
+ if (!(p(s.dataType || "") === "date")) return !1;
116
+ const c = v(s, r), d = c.split("."), f = d[d.length - 1] || c, h = d.length > 1 ? d.slice(0, -1).join(".") : void 0, m = s.qualifiedTableName || h, o = m ? `${m}.${f}` : void 0;
117
+ return i ? o ? o === a || o.endsWith(`.${i}`) : f === n.name : o ? o === a : f === n.name;
118
+ });
119
+ }
120
+ function D(e) {
121
+ return (n) => {
122
+ const r = n.field;
123
+ return !r || p(r.dataType || "") !== "date" ? !1 : e.id && r.id === e.id ? !0 : e.qualifiedFieldName && r.qualifiedFieldName ? r.qualifiedFieldName === e.qualifiedFieldName : r.name === e.name;
124
+ };
125
+ }
126
+ function V(e, n) {
127
+ if (!e) return [];
128
+ const r = (i) => [...i.conditions.filter(D(n)), ...i.groups.flatMap(r)];
129
+ return r(e);
130
+ }
131
+ function L(e, n) {
132
+ if (e.length !== 1 || e[0].operator !== "between") return;
133
+ const [r] = e;
134
+ if (r.relativeMeta) return g({ kind: "relative", window: r.relativeMeta });
135
+ const i = r.value;
136
+ return Array.isArray(i) && i.length === 2 ? g({ kind: "range", start: i[0], end: i[1], calendar: n }) : void 0;
137
+ }
138
+ function O(e, n, r) {
139
+ var m, o;
140
+ const i = (o = (m = e.config) == null ? void 0 : m.groupByColumns) == null ? void 0 : o.find((u) => p(u.dataType || "") === "date"), t = n.resolvedPrimaryDateField, a = i ? { id: i.id, name: i.name, label: i.label || i.name, qualifiedFieldName: i.qualifiedFieldName } : t ? { name: t.name, label: t.name, qualifiedFieldName: t.qualifiedFieldName } : void 0;
141
+ if (!a) return { comparisonDate: null, dateWindow: n.status === "ready" ? "none" : "unknown" };
142
+ const s = { name: a.name, label: a.label }, l = k(e), c = V(l, a);
143
+ if (n.status !== "ready") return { comparisonDate: s, dateWindow: c.length ? "applies" : "unknown" };
144
+ const d = A(e, { status: "ready", ...n.compiledFilters });
145
+ if (!c.length && !d.length) return { comparisonDate: s, dateWindow: "none" };
146
+ const f = R(q({ filters: l }, d).filters).filter(D(a)), h = f.length === 1 && !d.length ? L(f, r) : !f.length && d.length === 1 ? T(d[0], r) : void 0;
147
+ return { comparisonDate: s, dateWindow: "applies", ...h ? { window: h } : {} };
148
+ }
149
+ function fe(e) {
150
+ const n = _(e.dashboard), { runtimeValues: r, transientContexts: i } = W({ dashboard: n, capture: {}, calendar: e.calendar }), t = (o) => {
151
+ const u = E({
152
+ dashboard: n,
153
+ location: o,
154
+ runtimeValues: r,
155
+ semanticExecutionPayload: e.semanticExecutionPayload,
156
+ calendar: e.calendar,
157
+ transientContexts: i
158
+ });
159
+ return O(
160
+ o.card,
161
+ (u == null ? void 0 : u.status) === "ready" ? { status: "ready", compiledFilters: u.compiledFilters, resolvedPrimaryDateField: u.resolvedPrimaryDateField } : { status: "blocked", resolvedPrimaryDateField: u == null ? void 0 : u.resolvedPrimaryDateField },
162
+ e.calendar
163
+ );
164
+ }, a = C(n).find((o) => o.cardId === e.cardId);
165
+ if (a) return a.kind === "documentSectionCard" ? { comparisonDate: null, dateWindow: "unknown" } : t(a);
166
+ const s = P(n, e.cardId);
167
+ if ((s == null ? void 0 : s.kind) !== "variable") return { comparisonDate: null, dateWindow: "unknown" };
168
+ const { card: l } = s, c = (n.sheets ?? []).filter((o) => !N(o) && S(n, { kind: "sheet", sheetId: o.id }).includes(s.id)).map((o) => t({ kind: "sheetCard", sheetId: o.id, cardId: l.id, card: l }));
169
+ if (!c.length) return { comparisonDate: null, dateWindow: "unknown" };
170
+ const [d] = c;
171
+ if (c.every((o) => JSON.stringify(o.window) === JSON.stringify(d.window))) return d;
172
+ const { window: h, ...m } = d;
173
+ return m;
174
+ }
175
+ export {
176
+ le as K,
177
+ ce as a,
178
+ se as b,
179
+ oe as c,
180
+ ue as d,
181
+ fe as e,
182
+ de as f,
183
+ ae as m,
184
+ O as r
185
+ };