react-semaphor 0.1.472 → 0.1.474

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 (67) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +102 -94
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +4 -4
  5. package/dist/briefings/index.js +4 -4
  6. package/dist/chunks/{analyze-result-contract-B3agc2XU.js → analyze-result-contract-C8s8EUL5.js} +1 -1
  7. package/dist/chunks/{common-types-g_1fKJLK.js → common-types-BLPy5_E0.js} +1 -1
  8. package/dist/chunks/{dashboard-briefing-launcher-Lw4gjW_M.js → dashboard-briefing-launcher-B0f28WrK.js} +9 -9
  9. package/dist/chunks/{dashboard-briefing-launcher-8vxGyexK.cjs → dashboard-briefing-launcher-BjCkA5vw.cjs} +1 -1
  10. package/dist/chunks/{dashboard-controls-BKR8g3M9.cjs → dashboard-controls-BRclCQEX.cjs} +1 -1
  11. package/dist/chunks/{dashboard-controls-CRgDlxdt.js → dashboard-controls-CMJqSLgo.js} +9 -9
  12. package/dist/chunks/{dashboard-filter-value-compatibility-ilbH2A31.js → dashboard-filter-value-compatibility-9W8Ckcle.js} +168 -158
  13. package/dist/chunks/dashboard-filter-value-compatibility-Co1dn9Bc.cjs +1 -0
  14. package/dist/chunks/{dashboard-input-contract-Vr_3ApfF.js → dashboard-input-contract-BrGdGFz0.js} +6 -6
  15. package/dist/chunks/{dashboard-json-BhhVg9mI.js → dashboard-json-1ohpjO_q.js} +7 -7
  16. package/dist/chunks/{dashboard-json-CUgAzrYq.cjs → dashboard-json-DmtGHdDq.cjs} +1 -1
  17. package/dist/chunks/{edit-dashboard-visual-DlQtYQOO.js → edit-dashboard-visual-D9oKtOo6.js} +12 -12
  18. package/dist/chunks/{edit-dashboard-visual-BxmanBVo.cjs → edit-dashboard-visual-DNqJHdHE.cjs} +1 -1
  19. package/dist/chunks/{editor-action-buttons-CRWacpxi.js → editor-action-buttons-C_B8Wzkf.js} +6 -6
  20. package/dist/chunks/{editor-action-buttons-DKcD0UQy.cjs → editor-action-buttons-DwI3FcSw.cjs} +1 -1
  21. package/dist/chunks/{index-xdqe-Zvd.cjs → index-B6zSYUN4.cjs} +167 -167
  22. package/dist/chunks/{index-0fmECZL2.js → index-DalKzjEZ.js} +31914 -31864
  23. package/dist/chunks/{index-oVXvCLH-.js → index-DsvIlrI-.js} +9 -9
  24. package/dist/chunks/matrix-result-contract-Bhg60NtS.cjs +1 -0
  25. package/dist/chunks/matrix-result-contract-BpzhImar.js +421 -0
  26. package/dist/chunks/{pivot-header-presentation-7XrwJYDm.js → pivot-header-presentation-Be3FyR0N.js} +2 -2
  27. package/dist/chunks/{pivot-result-identity-5v4hRVbc.js → pivot-result-identity-CIZXsI53.js} +1 -1
  28. package/dist/chunks/{pivot-result-lifecycle-O_roVguV.js → pivot-result-lifecycle-PxmbJWkm.js} +19 -19
  29. package/dist/chunks/{raw-temporal-contract-BEMf3avg.js → raw-temporal-contract-U8J9RlEH.js} +1 -1
  30. package/dist/chunks/{report-preferences-dialog-Dxt9XMpd.js → report-preferences-dialog-C9mJffNQ.js} +6 -6
  31. package/dist/chunks/{report-preferences-dialog-8KYKazoG.cjs → report-preferences-dialog-DGMd-eTT.cjs} +1 -1
  32. package/dist/chunks/{report-runtime-context-DnNbpkGo.js → report-runtime-context-DNbgCsko.js} +7 -7
  33. package/dist/chunks/{saved-temporal-bucket-format-CygnBDO2.js → saved-temporal-bucket-format-CHsXUPJI.js} +8 -8
  34. package/dist/chunks/source-entity-resolution-BDC-Qngk.cjs +1 -0
  35. package/dist/chunks/source-entity-resolution-ugN3sZUk.js +781 -0
  36. package/dist/chunks/{switch-CQN9Hzho.cjs → switch-B4eH4guz.cjs} +13 -13
  37. package/dist/chunks/{switch-n2yUNY8i.js → switch-D20CIzj6.js} +1460 -1455
  38. package/dist/chunks/{temporal-bucket-CUKJktCl.js → temporal-bucket-CtP7hKLa.js} +12 -12
  39. package/dist/chunks/{temporal-bucket-authoring-CZoJV2L6.js → temporal-bucket-authoring-DJ9kK2wD.js} +3 -3
  40. package/dist/chunks/{temporal-bucket-contract-Cno9TlYr.js → temporal-bucket-contract-CZl5D7FZ.js} +1 -1
  41. package/dist/chunks/{token-types-W3EHNW-D.js → token-types-DfDtCqlw.js} +1 -1
  42. package/dist/chunks/{update-policy-kRNJwwUV.js → update-policy-BybMiM61.js} +1 -1
  43. package/dist/chunks/{validators-B5t1s8oh.js → validators-D-T-2HOR.js} +50 -50
  44. package/dist/dashboard/index.cjs +1 -1
  45. package/dist/dashboard/index.js +2 -2
  46. package/dist/dashboard-authoring/index.cjs +3 -3
  47. package/dist/dashboard-authoring/index.js +355 -341
  48. package/dist/data-app-builder/index.cjs +1 -1
  49. package/dist/data-app-builder/index.js +2 -2
  50. package/dist/data-app-codegen/index.js +2 -2
  51. package/dist/data-app-codegen-node/index.js +3 -3
  52. package/dist/data-app-sdk/index.js +3 -3
  53. package/dist/data-app-sdk-adapters/index.js +2 -2
  54. package/dist/data-app-sdk-validation/index.js +9 -9
  55. package/dist/format-utils/index.js +10 -10
  56. package/dist/index.cjs +1 -1
  57. package/dist/index.js +14 -14
  58. package/dist/report-runtime-context/index.js +2 -2
  59. package/dist/surfboard/index.cjs +1 -1
  60. package/dist/surfboard/index.js +3 -3
  61. package/dist/types/analytics-protocol.d.ts +141 -0
  62. package/dist/types/index.js +4 -4
  63. package/dist/types/main.d.ts +7 -0
  64. package/package.json +1 -1
  65. package/dist/chunks/dashboard-filter-value-compatibility-Dmh-NaPK.cjs +0 -1
  66. package/dist/chunks/matrix-result-contract-DoU9diAh.js +0 -822
  67. package/dist/chunks/matrix-result-contract-SrzyG_KQ.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),An=require("react-dom/client"),k=require("../chunks/index-xdqe-Zvd.cjs"),w=require("../chunks/switch-CQN9Hzho.cjs"),Ze=require("../data-app-builder-browser-runtime/index.cjs"),te=require("../chunks/x-B6ghREd2.cjs"),Cn=require("../chunks/save-3dYRmehL.cjs"),Rn=require("../chunks/mouse-pointer-2-DX4A_XZw.cjs"),tt=require("../chunks/search-BqqhaMx9.cjs");function Tr(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,d.get?d:{enumerable:!0,get:()=>t[a]})}}return s.default=t,Object.freeze(s)}const Bn=Tr(p),Dn=Tr(An);/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("react"),An=require("react-dom/client"),k=require("../chunks/index-B6zSYUN4.cjs"),w=require("../chunks/switch-B4eH4guz.cjs"),Ze=require("../data-app-builder-browser-runtime/index.cjs"),te=require("../chunks/x-B6ghREd2.cjs"),Cn=require("../chunks/save-3dYRmehL.cjs"),Rn=require("../chunks/mouse-pointer-2-DX4A_XZw.cjs"),tt=require("../chunks/search-BqqhaMx9.cjs");function Tr(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,d.get?d:{enumerable:!0,get:()=>t[a]})}}return s.default=t,Object.freeze(s)}const Bn=Tr(p),Dn=Tr(An);/**
2
2
  * @license lucide-react v0.453.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -2,8 +2,8 @@ import { jsx as r, jsxs as c, Fragment as re } from "react/jsx-runtime";
2
2
  import * as Zn from "react";
3
3
  import { useContext as qn, useState as x, useRef as oe, useMemo as je, useEffect as W, useCallback as Ot } from "react";
4
4
  import * as Xn from "react-dom/client";
5
- import { aM as ea, aN as ta, aO as Ir, aP as jr, aQ as zr, aR as ra, aS as Wr, aT as Hr, aU as Jr, aV as Vr, aW as _r, aX as Ur, aY as Gr, aZ as na, a_ as aa, a$ as oa, b0 as Ht, b1 as on, R as Kr, b2 as sa, b3 as Vt, b4 as sn, b5 as ia, b6 as la } from "../chunks/index-0fmECZL2.js";
6
- import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, L as me, R as ma, d as _t } from "../chunks/switch-n2yUNY8i.js";
5
+ import { aM as ea, aN as ta, aO as Ir, aP as jr, aQ as zr, aR as ra, aS as Wr, aT as Hr, aU as Jr, aV as Vr, aW as _r, aX as Ur, aY as Gr, aZ as na, a_ as aa, a$ as oa, b0 as Ht, b1 as on, R as Kr, b2 as sa, b3 as Vt, b4 as sn, b5 as ia, b6 as la } from "../chunks/index-DalKzjEZ.js";
6
+ import { B as H, P as it, a as lt, b as dt, _ as da, $ as ca, a0 as ua, a1 as pa, a2 as ha, L as me, R as ma, d as _t } from "../chunks/switch-D20CIzj6.js";
7
7
  import { loadSemaphorBrowserRuntime as ot } from "../data-app-builder-browser-runtime/index.js";
8
8
  import { c as Ve, X as He } from "../chunks/x-CXDkqdur.js";
9
9
  import { S as fa } from "../chunks/save-DgMfP0j8.js";
@@ -1,5 +1,5 @@
1
- import { S as E, a as S, i as A, v as t } from "../chunks/validators-B5t1s8oh.js";
2
- import { C as R, a as r, b as s, G as C, e as o, R as p, c as d, f as O, g as i, h as m, i as n, j as N, v as T, d as I } from "../chunks/update-policy-kRNJwwUV.js";
1
+ import { S as E, a as S, i as A, v as t } from "../chunks/validators-D-T-2HOR.js";
2
+ import { C as R, a as r, b as s, G as C, e as o, R as p, c as d, f as O, g as i, h as m, i as n, j as N, v as T, d as I } from "../chunks/update-policy-BybMiM61.js";
3
3
  export {
4
4
  R as CODEGEN_SUMMARY_SCHEMA_VERSION,
5
5
  r as CODEGEN_SUMMARY_VALIDATOR_VERSION,
@@ -1,6 +1,6 @@
1
- import { S as Vn, a as Fn, i as bn, v as kn } from "../chunks/validators-B5t1s8oh.js";
2
- import { c as ke, G as fe, a as Re, b as Me } from "../chunks/update-policy-kRNJwwUV.js";
3
- import { C as Mn, e as Cn, R as On, f as xn, g as Gn, h as Nn, i as En, j as An, v as jn, d as vn } from "../chunks/update-policy-kRNJwwUV.js";
1
+ import { S as Vn, a as Fn, i as bn, v as kn } from "../chunks/validators-D-T-2HOR.js";
2
+ import { c as ke, G as fe, a as Re, b as Me } from "../chunks/update-policy-BybMiM61.js";
3
+ import { C as Mn, e as Cn, R as On, f as xn, g as Gn, h as Nn, i as En, j as An, v as jn, d as vn } from "../chunks/update-policy-BybMiM61.js";
4
4
  import { createHash as ye } from "node:crypto";
5
5
  const wn = "src/semaphor/generated", v = `// Generated by Semaphor Agent Plugin. Do not hand-edit analytics wiring here.
6
6
  // Regenerate from the accepted semaphor_plan_data_app codegenSummary when the plan changes.
@@ -1,9 +1,9 @@
1
1
  import { toSemaphorInputSnapshots as jr, toSemaphorInputBinding as Hr, toSemaphorActiveInputSnapshots as X, toSemaphorMatrixIntent as Pr, toSemaphorSqlIntent as Vr, toSemaphorInputOptionsIntent as Qr, toSemaphorRecordsIntent as Ur, toSemaphorAnalysisQueryOptions as Gr, toSemaphorAnalysisIntent as Jr, toSemaphorMetricIntent as Yr, hasSemaphorInputValue as ue, normalizeSemaphorInputOptions as hr, toSemaphorInputSpec as br } from "../data-app-sdk-adapters/index.js";
2
2
  import { jsxs as p, Fragment as vr, jsx as a } from "react/jsx-runtime";
3
3
  import { createContext as Ie, useContext as Q, useState as z, useRef as E, useEffect as B, useMemo as I, Fragment as Xr, useId as Sr, useCallback as D, useReducer as Zr } from "react";
4
- import { j as et, ak as rt, x as tt } from "../chunks/validators-B5t1s8oh.js";
5
- import { c as lo, al as uo } from "../chunks/validators-B5t1s8oh.js";
6
- import "../chunks/analyze-result-contract-B3agc2XU.js";
4
+ import { k as et, ak as rt, y as tt } from "../chunks/validators-D-T-2HOR.js";
5
+ import { c as lo, al as uo } from "../chunks/validators-D-T-2HOR.js";
6
+ import "../chunks/analyze-result-contract-C8s8EUL5.js";
7
7
  import "../value-format-preferences/index.js";
8
8
  import { M as nt, a as it, S as ot, E as st, C as at } from "../chunks/search-BHsQIWBV.js";
9
9
  import { X as lt, C as dt, j as ut } from "../chunks/x-CXDkqdur.js";
@@ -1,6 +1,6 @@
1
- import { s as m, p as I, c as p } from "../chunks/validators-B5t1s8oh.js";
1
+ import { s as m, p as I, c as p } from "../chunks/validators-D-T-2HOR.js";
2
2
  import { n as c } from "../chunks/operators-C8TxpM4C.js";
3
- import "../chunks/analyze-result-contract-B3agc2XU.js";
3
+ import "../chunks/analyze-result-contract-C8s8EUL5.js";
4
4
  import "../value-format-preferences/index.js";
5
5
  function F(i) {
6
6
  var n, e, a;
@@ -1,7 +1,7 @@
1
- import { B as H, E as O, s as K, ai as q, x as Q } from "../chunks/validators-B5t1s8oh.js";
2
- import "../chunks/analyze-result-contract-B3agc2XU.js";
1
+ import { C as H, F as O, s as K, ai as q, y as Q } from "../chunks/validators-D-T-2HOR.js";
2
+ import "../chunks/analyze-result-contract-C8s8EUL5.js";
3
3
  import "../value-format-preferences/index.js";
4
- import { p as E } from "../chunks/report-runtime-context-DnNbpkGo.js";
4
+ import { p as E } from "../chunks/report-runtime-context-DNbgCsko.js";
5
5
  import { toSemaphorMetricIntent as J, toSemaphorAnalysisIntent as U, toSemaphorRecordsIntent as W, toSemaphorSqlIntent as L, toSemaphorMatrixIntent as V, toSemaphorInputOptionsIntent as G } from "../data-app-sdk-adapters/index.js";
6
6
  function X({
7
7
  intent: e,
@@ -58,7 +58,7 @@ function m(e, r) {
58
58
  }
59
59
  function u(e, r) {
60
60
  return e.find(
61
- (o) => j(o, r)
61
+ (o) => B(o, r)
62
62
  );
63
63
  }
64
64
  function k(e) {
@@ -256,17 +256,17 @@ function $(e) {
256
256
  function M(e) {
257
257
  const r = [...e.fields];
258
258
  return e.dateField && !r.some(
259
- (o) => B(o, e.dateField)
259
+ (o) => j(o, e.dateField)
260
260
  ) && r.push({ ...e.dateField, role: "date" }), r;
261
261
  }
262
262
  function se(e, r) {
263
- return j(e.field, r.field) && e.allowedRelatedRoles.join("|") === r.allowedRelatedRoles.join("|") && (e.unsupportedRelatedRoleMessage || "") === (r.unsupportedRelatedRoleMessage || "") && (e.recommendedNextStep || "") === (r.recommendedNextStep || "");
263
+ return B(e.field, r.field) && e.allowedRelatedRoles.join("|") === r.allowedRelatedRoles.join("|") && (e.unsupportedRelatedRoleMessage || "") === (r.unsupportedRelatedRoleMessage || "") && (e.recommendedNextStep || "") === (r.recommendedNextStep || "");
264
264
  }
265
- function B(e, r) {
265
+ function j(e, r) {
266
266
  return K(e, r);
267
267
  }
268
- function j(e, r) {
269
- return B(e, r) && ne(
268
+ function B(e, r) {
269
+ return j(e, r) && ne(
270
270
  f(e),
271
271
  f(r)
272
272
  );
@@ -1,12 +1,12 @@
1
1
  import { i as z } from "../chunks/format-types-CFHQoIuk.js";
2
- import { f as w, a as y, b as R } from "../chunks/pivot-result-lifecycle-O_roVguV.js";
3
- import { M as L, E as G, P as H, R as K, z as U, w as W, G as X, n as F, x as Q, C as Y, D as J, o as Z, q as ee, d as re, c as oe, h as te, e as se, B as ne, g as le, F as ae, p as ie, m as ue, k as me, y as ce, i as fe, l as pe, t as be, A as Te, r as we, j as he, u as Ee, v as ye, s as Re } from "../chunks/pivot-result-lifecycle-O_roVguV.js";
4
- import { f as C, a as S, b as p, e as h } from "../chunks/pivot-header-presentation-7XrwJYDm.js";
5
- import { A as Se, D as Ae, F as ve, P as Pe, i as de, n as ge, s as $e, t as Ve, m as ke, c as Me, d as xe, g as _e, h as Be, k as Ie, o as Ne, p as Oe, q as qe, u as je, j as ze, l as De, r as Le } from "../chunks/pivot-header-presentation-7XrwJYDm.js";
6
- import { q as He, ap as Ke, an as Ue, aq as We, ao as Xe, am as Fe } from "../chunks/validators-B5t1s8oh.js";
7
- import { i as Ye, T as Je, h as Ze, j as er, p as rr, a as or, k as tr } from "../chunks/temporal-bucket-CUKJktCl.js";
8
- import { P as nr, b as lr, i as ar, c as ir, d as ur, r as mr, a as cr } from "../chunks/pivot-result-identity-5v4hRVbc.js";
9
- import { p as pr, v as br } from "../chunks/raw-temporal-contract-BEMf3avg.js";
2
+ import { f as w, a as y, b as R } from "../chunks/pivot-result-lifecycle-PxmbJWkm.js";
3
+ import { M as L, E as G, P as H, R as K, z as U, w as W, G as X, n as F, x as Q, C as Y, D as J, o as Z, q as ee, d as re, c as oe, h as te, e as se, B as ne, g as le, F as ae, p as ie, m as ue, k as me, y as ce, i as fe, l as pe, t as be, A as Te, r as we, j as he, u as Ee, v as ye, s as Re } from "../chunks/pivot-result-lifecycle-PxmbJWkm.js";
4
+ import { f as C, a as S, b as p, e as h } from "../chunks/pivot-header-presentation-Be3FyR0N.js";
5
+ import { A as Se, D as Ae, F as ve, P as Pe, i as de, n as ge, s as $e, t as Ve, m as ke, c as Me, d as xe, g as _e, h as Be, k as Ie, o as Ne, p as Oe, q as je, u as qe, j as ze, l as De, r as Le } from "../chunks/pivot-header-presentation-Be3FyR0N.js";
6
+ import { r as He, ap as Ke, an as Ue, aq as We, ao as Xe, am as Fe } from "../chunks/validators-D-T-2HOR.js";
7
+ import { i as Ye, T as Je, h as Ze, j as er, p as rr, a as or, k as tr } from "../chunks/temporal-bucket-CtP7hKLa.js";
8
+ import { P as nr, b as lr, i as ar, c as ir, d as ur, r as mr, a as cr } from "../chunks/pivot-result-identity-CIZXsI53.js";
9
+ import { p as pr, v as br } from "../chunks/raw-temporal-contract-U8J9RlEH.js";
10
10
  function A(r, e, t, o) {
11
11
  const s = r instanceof Date ? r.toISOString() : String(r), l = (o == null ? void 0 : o.browserTimezone) || t, n = (o == null ? void 0 : o.isSqlCard) ?? !1;
12
12
  if (e != null && e.useRelativeTime)
@@ -345,8 +345,8 @@ export {
345
345
  rr as parseTemporalBucketValue,
346
346
  Oe as parseWithSourceTimezone,
347
347
  Te as prepareRawTemporalFormatter,
348
- qe as presentAggregateGroupRow,
349
- je as presentPivotHeader,
348
+ je as presentAggregateGroupRow,
349
+ qe as presentPivotHeader,
350
350
  ir as requirePivotHeaderMembers,
351
351
  ur as requirePivotResultColumnIdentities,
352
352
  ze as requiresChunkedCsvExport,
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-xdqe-Zvd.cjs"),u=require("./chunks/common-types-C1IM7gao.cjs"),_=require("./chunks/report-preferences-dialog-8KYKazoG.cjs"),i=require("react/jsx-runtime"),r=require("./chunks/switch-CQN9Hzho.cjs"),h=require("react"),P=require("./chunks/token-types-CoHsSJ4E.cjs"),l=require("./chunks/dashboard-briefing-launcher-8vxGyexK.cjs"),N=require("./chunks/use-debounced-dirty-check-XHSwAefL.cjs");require("./value-format-preferences/index.cjs");require("./chunks/validators-DcshgK7w.cjs");const R=require("./chunks/report-runtime-context-RFiWq4wK.cjs"),T=require("./chunks/pivot-result-identity-DRUlTWUq.cjs");require("./chunks/analyze-result-contract-OgPk-zGu.cjs");require("./chunks/temporal-bucket-authoring-DSpzgXHc.cjs");require("./chunks/saved-temporal-bucket-format-DNMtD77o.cjs");require("react-dom");require("./chunks/appearance-context-DhyjbQk1.cjs");require("./chunks/color-CyB5o13F.cjs");require("./chunks/index-ByFbacH7.cjs");const B=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.cjs"),w=require("./chunks/x-B6ghREd2.cjs");require("./chunks/appearance-runtime-provider-BgNYdUYH.cjs");function L(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const o in a)if(o!=="default"){const d=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(t,o,d.get?d:{enumerable:!0,get:()=>a[o]})}}return t.default=a,Object.freeze(t)}const m=L(h);function M(a){const{displayPreferences:t,cardId:o,...d}=a,n={...d,id:a.dashboardId};return i.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:i.jsxs(e.SemaphorContextProvider,{dashboardProps:n,children:[i.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:a.cardId}),i.jsx(e.UXProvider,{appearance:a.appearance,children:i.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:i.jsx(e.Container,{type:"visual",cardId:o,...n,children:i.jsx(j,{cardId:o})})})})]})})}function j({cardId:a}){const t=r.useDashboardStore(n=>{var c;return(c=n.dashboard)==null?void 0:c.sheets}),{card:o,frame:d}=h.useMemo(()=>{const n=t==null?void 0:t.flatMap(s=>s.frames),c=n==null?void 0:n.flatMap(s=>s==null?void 0:s.cards),D=c==null?void 0:c.find(s=>(s==null?void 0:s.id)===a),E=n==null?void 0:n.find(s=>{var C;return(C=s==null?void 0:s.cards)==null?void 0:C.find(g=>(g==null?void 0:g.id)===a)});return{card:D,frame:E}},[t,a]);return!o||!d?i.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):i.jsx("main",{className:"flex h-full grow flex-col",children:i.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:c})=>i.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:i.jsx(e.DashboardCard,{card:o,frame:d})})})}function I(a,t,o,d){h.useEffect(()=>{a&&!o&&t&&d(e.cloneDeep(t))},[a,o,t,d])}function q({name:a,items:t,value:o,onChange:d,isLoading:n,isError:c,refetch:D,className:E,icon:s,showNone:C=!1}){const g=m.useRef(null),[y,b]=m.useState(!1),[A,S]=m.useState("100%"),x=C?[...t||[],{id:"none",name:"None"}]:t;m.useLayoutEffect(()=>{g.current&&S(g.current.offsetWidth)},[]);function F(){var f;return n?"Loading...":c?"Error":o?(f=t==null?void 0:t.find(p=>p.id===o))==null?void 0:f.name:`Select ${a}`}function v(f,p){d(p),b(!1)}return i.jsxs(r.Popover,{open:y,onOpenChange:b,children:[i.jsx(r.PopoverTrigger,{asChild:!0,children:i.jsxs(r.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":y,className:r.cn("flex h-9 w-full justify-between",E),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[s&&i.jsx("div",{className:"mr-2",children:s}),i.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:F()})]}),i.jsx(w.ChevronDown,{className:"size-4 opacity-50"})]})}),i.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:A},children:i.jsxs(e.Command,{children:[i.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[i.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),i.jsx(e.IconButton,{className:"h-7",onClick:D,children:i.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),i.jsxs(e.CommandList,{children:[i.jsxs(e.CommandEmpty,{children:["No ",a==null?void 0:a.toLowerCase()," found."]}),i.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>i.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:p=>v(p,f.id),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(r.Check,{className:r.cn("size-4",o===f.id?"opacity-100":"opacity-0")}),i.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function U(a,t){h.useEffect(()=>(a&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{a&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[a,t])}exports.BriefingAuthor=e.BriefingAuthor;exports.BriefingAuthorDialog=e.BriefingAuthorDialog;exports.BriefingUiCapabilitiesBoundary=e.BriefingUiCapabilitiesBoundary;exports.BriefingUiCapabilitiesProvider=e.BriefingUiCapabilitiesProvider;exports.BriefingsApiError=e.BriefingsApiError;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.ExportError=e.ExportError;exports.MatrixTableVisual=e.MatrixTableVisual;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.applyBriefingFormPatch=e.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=e.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=e.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=e.briefingToFormDraft;exports.cancelBriefingPreviewRun=e.cancelBriefingPreviewRun;exports.cancelBriefingRun=e.cancelBriefingRun;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createBriefing=e.createBriefing;exports.createBriefingFormDraft=e.createBriefingFormDraft;exports.createExport=e.createExport;exports.deleteBriefing=e.deleteBriefing;exports.deleteBriefingRun=e.deleteBriefingRun;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getBriefing=e.getBriefing;exports.getBriefingArtifact=e.getBriefingArtifact;exports.getBriefingEvidence=e.getBriefingEvidence;exports.getBriefingPreviewRun=e.getBriefingPreviewRun;exports.getBriefingRun=e.getBriefingRun;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listBriefingRuns=e.listBriefingRuns;exports.listBriefingTenantSummaries=e.listBriefingTenantSummaries;exports.listBriefings=e.listBriefings;exports.pauseBriefing=e.pauseBriefing;exports.polishBriefingText=e.polishBriefingText;exports.previewBriefingPlan=e.previewBriefingPlan;exports.resumeBriefing=e.resumeBriefing;exports.runBriefingNow=e.runBriefingNow;exports.runBriefingPreview=e.runBriefingPreview;exports.updateBriefing=e.updateBriefing;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useBriefingUiCapabilities=e.useBriefingUiCapabilities;exports.useCard=e.useCard;exports.useCardSummary=e.useCardSummary;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.validateBriefingFormDraft=e.validateBriefingFormDraft;exports.CALCULATED_FIELD_ENTITY_MARKER=u.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=u.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=u.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=u.EMPTY_SELECTION;exports.LEGACY_CALCULATED_FIELD_ENTITY_MARKER=u.LEGACY_CALCULATED_FIELD_ENTITY_MARKER;exports.PivotMarkerEnum=u.PivotMarkerEnum;exports.getFieldRuntimeColumnName=u.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=u.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=u.hasCalculatedFormulaInputs;exports.hasSyntheticCalculatedFieldOwner=u.hasSyntheticCalculatedFieldOwner;exports.isCalculatedDimension=u.isCalculatedDimension;exports.isCalculatedField=u.isCalculatedField;exports.isCalculatedMetric=u.isCalculatedMetric;exports.ReportPreferencesDialog=_.ReportPreferencesDialog;exports.createEmptyKpiConfig=r.createEmptyKpiConfig;exports.createSqlGenConfig=r.createSqlGenConfig;exports.emitDashboardLoad=r.emitDashboardLoad;exports.emitDashboardUnload=r.emitDashboardUnload;exports.fmt=r.fmt;exports.getColumnDataType=r.getColumnDataType;exports.getFilterValueType=r.getFilterValueType;exports.getFormattedTableNameForQuery=r.getFormattedTableNameForQuery;exports.getQualifiedTableName=r.getQualifiedTableName;exports.getSql=r.getSql;exports.invalidateToken=r.invalidateToken;exports.isBooleanDataType=r.isBooleanDataType;exports.isColumnInSqlGen=r.isColumnInSqlGen;exports.isDateDataType=r.isDateDataType;exports.isNumberDataType=r.isNumberDataType;exports.isTextDataType=r.isTextDataType;exports.resolveDataType=r.resolveDataType;exports.resolveDatamodelName=r.resolveDatamodelName;exports.useCurrentActiveCard=r.useCurrentActiveCard;exports.useCurrentCardConfig=r.useCurrentCardConfig;exports.useCurrentSheetActiveCards=r.useCurrentSheetActiveCards;exports.useDashboardActions=r.useDashboardActions;exports.useDashboardStore=r.useDashboardStore;exports.useEditorActions=r.useEditorActions;exports.useEditorStore=r.useEditorStore;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=P.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.AdvancedModeToggle=l.AdvancedModeToggle;exports.DashboardBriefingLauncher=l.DashboardBriefingLauncher;exports.DashboardControlsSettings=l.DashboardControlsSettings;exports.DashboardFilterControlsButton=l.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=l.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=l.DocumentControlsSettings;exports.ExportNotificationItem=l.ExportNotificationItem;exports.ExportNotificationList=l.ExportNotificationList;exports.NotificationBell=l.NotificationBell;exports.UnsavedChangesAlert=l.UnsavedChangesAlert;exports.VisualEditingControls=l.VisualEditingControls;exports.VisualsLibraryDialog=l.VisualsLibraryDialog;exports.WatchDashboardButton=l.WatchDashboardButton;exports.useExportPolling=l.useExportPolling;exports.useExportRecovery=l.useExportRecovery;exports.useDebouncedDirtyCheck=N.useDebouncedDirtyCheck;exports.DEFAULT_CALENDAR_CONTEXT=R.DEFAULT_CALENDAR_CONTEXT;exports.resolveQueryColumnKeyMapEntry=T.resolveQueryColumnKeyMapEntry;exports.resolveUniqueQueryColumnKeyMapEntry=T.resolveUniqueQueryColumnKeyMapEntry;exports.normalizeDashboardForDirtyCheck=B.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=B.serializeDashboardForDirtyCheck;exports.Combobox=q;exports.Visual=M;exports.useExposePrintState=U;exports.usePristineSnapshotInitializer=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-B6zSYUN4.cjs"),u=require("./chunks/common-types-C1IM7gao.cjs"),_=require("./chunks/report-preferences-dialog-DGMd-eTT.cjs"),i=require("react/jsx-runtime"),r=require("./chunks/switch-B4eH4guz.cjs"),h=require("react"),P=require("./chunks/token-types-CoHsSJ4E.cjs"),l=require("./chunks/dashboard-briefing-launcher-BjCkA5vw.cjs"),N=require("./chunks/use-debounced-dirty-check-XHSwAefL.cjs");require("./value-format-preferences/index.cjs");require("./chunks/validators-DcshgK7w.cjs");const R=require("./chunks/report-runtime-context-RFiWq4wK.cjs"),T=require("./chunks/pivot-result-identity-DRUlTWUq.cjs");require("./chunks/analyze-result-contract-OgPk-zGu.cjs");require("./chunks/temporal-bucket-authoring-DSpzgXHc.cjs");require("./chunks/saved-temporal-bucket-format-DNMtD77o.cjs");require("react-dom");require("./chunks/appearance-context-DhyjbQk1.cjs");require("./chunks/color-CyB5o13F.cjs");require("./chunks/index-ByFbacH7.cjs");const B=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.cjs"),w=require("./chunks/x-B6ghREd2.cjs");require("./chunks/appearance-runtime-provider-BgNYdUYH.cjs");function L(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const o in a)if(o!=="default"){const d=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(t,o,d.get?d:{enumerable:!0,get:()=>a[o]})}}return t.default=a,Object.freeze(t)}const m=L(h);function M(a){const{displayPreferences:t,cardId:o,...d}=a,n={...d,id:a.dashboardId};return i.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:i.jsxs(e.SemaphorContextProvider,{dashboardProps:n,children:[i.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:a.cardId}),i.jsx(e.UXProvider,{appearance:a.appearance,children:i.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:i.jsx(e.Container,{type:"visual",cardId:o,...n,children:i.jsx(j,{cardId:o})})})})]})})}function j({cardId:a}){const t=r.useDashboardStore(n=>{var c;return(c=n.dashboard)==null?void 0:c.sheets}),{card:o,frame:d}=h.useMemo(()=>{const n=t==null?void 0:t.flatMap(s=>s.frames),c=n==null?void 0:n.flatMap(s=>s==null?void 0:s.cards),D=c==null?void 0:c.find(s=>(s==null?void 0:s.id)===a),E=n==null?void 0:n.find(s=>{var C;return(C=s==null?void 0:s.cards)==null?void 0:C.find(g=>(g==null?void 0:g.id)===a)});return{card:D,frame:E}},[t,a]);return!o||!d?i.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):i.jsx("main",{className:"flex h-full grow flex-col",children:i.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:c})=>i.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:i.jsx(e.DashboardCard,{card:o,frame:d})})})}function I(a,t,o,d){h.useEffect(()=>{a&&!o&&t&&d(e.cloneDeep(t))},[a,o,t,d])}function q({name:a,items:t,value:o,onChange:d,isLoading:n,isError:c,refetch:D,className:E,icon:s,showNone:C=!1}){const g=m.useRef(null),[y,b]=m.useState(!1),[A,S]=m.useState("100%"),x=C?[...t||[],{id:"none",name:"None"}]:t;m.useLayoutEffect(()=>{g.current&&S(g.current.offsetWidth)},[]);function F(){var f;return n?"Loading...":c?"Error":o?(f=t==null?void 0:t.find(p=>p.id===o))==null?void 0:f.name:`Select ${a}`}function v(f,p){d(p),b(!1)}return i.jsxs(r.Popover,{open:y,onOpenChange:b,children:[i.jsx(r.PopoverTrigger,{asChild:!0,children:i.jsxs(r.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":y,className:r.cn("flex h-9 w-full justify-between",E),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[s&&i.jsx("div",{className:"mr-2",children:s}),i.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:F()})]}),i.jsx(w.ChevronDown,{className:"size-4 opacity-50"})]})}),i.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:A},children:i.jsxs(e.Command,{children:[i.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[i.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),i.jsx(e.IconButton,{className:"h-7",onClick:D,children:i.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),i.jsxs(e.CommandList,{children:[i.jsxs(e.CommandEmpty,{children:["No ",a==null?void 0:a.toLowerCase()," found."]}),i.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>i.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:p=>v(p,f.id),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(r.Check,{className:r.cn("size-4",o===f.id?"opacity-100":"opacity-0")}),i.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function U(a,t){h.useEffect(()=>(a&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{a&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[a,t])}exports.BriefingAuthor=e.BriefingAuthor;exports.BriefingAuthorDialog=e.BriefingAuthorDialog;exports.BriefingUiCapabilitiesBoundary=e.BriefingUiCapabilitiesBoundary;exports.BriefingUiCapabilitiesProvider=e.BriefingUiCapabilitiesProvider;exports.BriefingsApiError=e.BriefingsApiError;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.ExportError=e.ExportError;exports.MatrixTableVisual=e.MatrixTableVisual;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.applyBriefingFormPatch=e.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=e.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=e.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=e.briefingToFormDraft;exports.cancelBriefingPreviewRun=e.cancelBriefingPreviewRun;exports.cancelBriefingRun=e.cancelBriefingRun;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createBriefing=e.createBriefing;exports.createBriefingFormDraft=e.createBriefingFormDraft;exports.createExport=e.createExport;exports.deleteBriefing=e.deleteBriefing;exports.deleteBriefingRun=e.deleteBriefingRun;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getBriefing=e.getBriefing;exports.getBriefingArtifact=e.getBriefingArtifact;exports.getBriefingEvidence=e.getBriefingEvidence;exports.getBriefingPreviewRun=e.getBriefingPreviewRun;exports.getBriefingRun=e.getBriefingRun;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listBriefingRuns=e.listBriefingRuns;exports.listBriefingTenantSummaries=e.listBriefingTenantSummaries;exports.listBriefings=e.listBriefings;exports.pauseBriefing=e.pauseBriefing;exports.polishBriefingText=e.polishBriefingText;exports.previewBriefingPlan=e.previewBriefingPlan;exports.resumeBriefing=e.resumeBriefing;exports.runBriefingNow=e.runBriefingNow;exports.runBriefingPreview=e.runBriefingPreview;exports.updateBriefing=e.updateBriefing;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useBriefingUiCapabilities=e.useBriefingUiCapabilities;exports.useCard=e.useCard;exports.useCardSummary=e.useCardSummary;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.validateBriefingFormDraft=e.validateBriefingFormDraft;exports.CALCULATED_FIELD_ENTITY_MARKER=u.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=u.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=u.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=u.EMPTY_SELECTION;exports.LEGACY_CALCULATED_FIELD_ENTITY_MARKER=u.LEGACY_CALCULATED_FIELD_ENTITY_MARKER;exports.PivotMarkerEnum=u.PivotMarkerEnum;exports.getFieldRuntimeColumnName=u.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=u.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=u.hasCalculatedFormulaInputs;exports.hasSyntheticCalculatedFieldOwner=u.hasSyntheticCalculatedFieldOwner;exports.isCalculatedDimension=u.isCalculatedDimension;exports.isCalculatedField=u.isCalculatedField;exports.isCalculatedMetric=u.isCalculatedMetric;exports.ReportPreferencesDialog=_.ReportPreferencesDialog;exports.createEmptyKpiConfig=r.createEmptyKpiConfig;exports.createSqlGenConfig=r.createSqlGenConfig;exports.emitDashboardLoad=r.emitDashboardLoad;exports.emitDashboardUnload=r.emitDashboardUnload;exports.fmt=r.fmt;exports.getColumnDataType=r.getColumnDataType;exports.getFilterValueType=r.getFilterValueType;exports.getFormattedTableNameForQuery=r.getFormattedTableNameForQuery;exports.getQualifiedTableName=r.getQualifiedTableName;exports.getSql=r.getSql;exports.invalidateToken=r.invalidateToken;exports.isBooleanDataType=r.isBooleanDataType;exports.isColumnInSqlGen=r.isColumnInSqlGen;exports.isDateDataType=r.isDateDataType;exports.isNumberDataType=r.isNumberDataType;exports.isTextDataType=r.isTextDataType;exports.resolveDataType=r.resolveDataType;exports.resolveDatamodelName=r.resolveDatamodelName;exports.useCurrentActiveCard=r.useCurrentActiveCard;exports.useCurrentCardConfig=r.useCurrentCardConfig;exports.useCurrentSheetActiveCards=r.useCurrentSheetActiveCards;exports.useDashboardActions=r.useDashboardActions;exports.useDashboardStore=r.useDashboardStore;exports.useEditorActions=r.useEditorActions;exports.useEditorStore=r.useEditorStore;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=P.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.AdvancedModeToggle=l.AdvancedModeToggle;exports.DashboardBriefingLauncher=l.DashboardBriefingLauncher;exports.DashboardControlsSettings=l.DashboardControlsSettings;exports.DashboardFilterControlsButton=l.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=l.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=l.DocumentControlsSettings;exports.ExportNotificationItem=l.ExportNotificationItem;exports.ExportNotificationList=l.ExportNotificationList;exports.NotificationBell=l.NotificationBell;exports.UnsavedChangesAlert=l.UnsavedChangesAlert;exports.VisualEditingControls=l.VisualEditingControls;exports.VisualsLibraryDialog=l.VisualsLibraryDialog;exports.WatchDashboardButton=l.WatchDashboardButton;exports.useExportPolling=l.useExportPolling;exports.useExportRecovery=l.useExportRecovery;exports.useDebouncedDirtyCheck=N.useDebouncedDirtyCheck;exports.DEFAULT_CALENDAR_CONTEXT=R.DEFAULT_CALENDAR_CONTEXT;exports.resolveQueryColumnKeyMapEntry=T.resolveQueryColumnKeyMapEntry;exports.resolveUniqueQueryColumnKeyMapEntry=T.resolveUniqueQueryColumnKeyMapEntry;exports.normalizeDashboardForDirtyCheck=B.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=B.serializeDashboardForDirtyCheck;exports.Combobox=q;exports.Visual=M;exports.useExposePrintState=U;exports.usePristineSnapshotInitializer=I;
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { E as x, F as N, S, c as _, U as P, d as w, C as F, e as y, f as R, g as L, h as M, i as I, I as U, R as k, j as O, k as V, l as q, m as z } from "./chunks/index-0fmECZL2.js";
2
- import { al as Ea, am as ya, an as xa, ao as ba, W as Ta, H as va, D as Aa, B as Ba, A as Na, x as Sa, b as _a, av as Pa, M as wa, o as Fa, r as Ra, r as La, s as Ma, G as Ia, a as Ua, ag as ka, ai as Oa, aj as Va, ah as qa, a7 as za, aa as Wa, au as ja, _ as Qa, af as Ha, aq as Ka, a2 as Ga, ab as Ya, z as Xa, y as $a, ay as Ja, Z as Za, ac as ae, ad as ee, a6 as se, a9 as re, at as oe, as as ie, ar as te, ax as ne, aw as le, a8 as ue, Y as de, X as ce, a0 as fe, ae as pe, a4 as me, a1 as he, a3 as ge, a5 as Ce, $ as De, Q as Ee, N as ye, ap as xe, w as be, K as Te, v as ve, n as Ae, J as Be, L as Ne, p as Se, V as _e, P as Pe, O as we, T as Fe, u as Re, t as Le, q as Me, ak as Ie } from "./chunks/index-0fmECZL2.js";
3
- import { a as ke, C as Oe, D as Ve, E as qe, L as ze, P as We, g as je, d as Qe, h as He, e as Ke, b as Ge, c as Ye, i as Xe } from "./chunks/common-types-g_1fKJLK.js";
4
- import { R as Je } from "./chunks/report-preferences-dialog-Dxt9XMpd.js";
1
+ import { E as x, F as N, S, c as _, U as P, d as w, C as F, e as y, f as R, g as L, h as M, i as I, I as U, R as k, j as O, k as V, l as q, m as z } from "./chunks/index-DalKzjEZ.js";
2
+ import { al as Ea, am as ya, an as xa, ao as ba, W as Ta, H as va, D as Aa, B as Ba, A as Na, x as Sa, b as _a, av as Pa, M as wa, o as Fa, r as Ra, r as La, s as Ma, G as Ia, a as Ua, ag as ka, ai as Oa, aj as Va, ah as qa, a7 as za, aa as Wa, au as ja, _ as Qa, af as Ha, aq as Ka, a2 as Ga, ab as Ya, z as Xa, y as $a, ay as Ja, Z as Za, ac as ae, ad as ee, a6 as se, a9 as re, at as oe, as as ie, ar as te, ax as ne, aw as le, a8 as ue, Y as de, X as ce, a0 as fe, ae as pe, a4 as me, a1 as he, a3 as ge, a5 as Ce, $ as De, Q as Ee, N as ye, ap as xe, w as be, K as Te, v as ve, n as Ae, J as Be, L as Ne, p as Se, V as _e, P as Pe, O as we, T as Fe, u as Re, t as Le, q as Me, ak as Ie } from "./chunks/index-DalKzjEZ.js";
3
+ import { a as ke, C as Oe, D as Ve, E as qe, L as ze, P as We, g as je, d as Qe, h as He, e as Ke, b as Ge, c as Ye, i as Xe } from "./chunks/common-types-BLPy5_E0.js";
4
+ import { R as Je } from "./chunks/report-preferences-dialog-C9mJffNQ.js";
5
5
  import { jsx as a, jsxs as u } from "react/jsx-runtime";
6
- import { u as W, P as j, a as Q, B as H, c as C, b as K, d as G } from "./chunks/switch-n2yUNY8i.js";
7
- import { A as as, n as es, e as ss, f as rs, g as os, p as is, o as ts, s as ns, t as ls, m as us, i as ds, l as cs, q as fs, k as ps, j as ms, h as hs, v as gs, r as Cs, w as Ds, y as Es, x as ys, z as xs, E as bs, D as Ts } from "./chunks/switch-n2yUNY8i.js";
6
+ import { u as W, P as j, a as Q, B as H, c as C, b as K, d as G } from "./chunks/switch-D20CIzj6.js";
7
+ import { A as as, n as es, e as ss, f as rs, g as os, p as is, o as ts, s as ns, t as ls, m as us, i as ds, l as cs, q as fs, k as ps, j as ms, h as hs, v as gs, r as Cs, w as Ds, y as Es, x as ys, z as xs, E as bs, D as Ts } from "./chunks/switch-D20CIzj6.js";
8
8
  import * as p from "react";
9
9
  import { useMemo as Y, useEffect as b } from "react";
10
- import { D as As } from "./chunks/token-types-W3EHNW-D.js";
11
- import { A as Ns, g as Ss, D as _s, e as Ps, f as ws, d as Fs, b as Rs, E as Ls, N as Ms, U as Is, a as Us, V as ks, W as Os, u as Vs, c as qs } from "./chunks/dashboard-briefing-launcher-Lw4gjW_M.js";
10
+ import { D as As } from "./chunks/token-types-DfDtCqlw.js";
11
+ import { A as Ns, g as Ss, D as _s, e as Ps, f as ws, d as Fs, b as Rs, E as Ls, N as Ms, U as Is, a as Us, V as ks, W as Os, u as Vs, c as qs } from "./chunks/dashboard-briefing-launcher-B0f28WrK.js";
12
12
  import { u as Ws } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
13
13
  import "./value-format-preferences/index.js";
14
- import "./chunks/validators-B5t1s8oh.js";
15
- import { D as Qs } from "./chunks/report-runtime-context-DnNbpkGo.js";
16
- import { r as Ks, a as Gs } from "./chunks/pivot-result-identity-5v4hRVbc.js";
17
- import "./chunks/analyze-result-contract-B3agc2XU.js";
18
- import "./chunks/temporal-bucket-authoring-CZoJV2L6.js";
19
- import "./chunks/saved-temporal-bucket-format-CygnBDO2.js";
14
+ import "./chunks/validators-D-T-2HOR.js";
15
+ import { D as Qs } from "./chunks/report-runtime-context-DNbgCsko.js";
16
+ import { r as Ks, a as Gs } from "./chunks/pivot-result-identity-CIZXsI53.js";
17
+ import "./chunks/analyze-result-contract-C8s8EUL5.js";
18
+ import "./chunks/temporal-bucket-authoring-DJ9kK2wD.js";
19
+ import "./chunks/saved-temporal-bucket-format-CHsXUPJI.js";
20
20
  import "react-dom";
21
21
  import "./chunks/appearance-context-DVXt8qjW.js";
22
22
  import "./chunks/color-CJvdlFM_.js";
@@ -1,5 +1,5 @@
1
- import { b as r } from "../chunks/validators-B5t1s8oh.js";
2
- import { D as n, p as o, a as p, b as t } from "../chunks/report-runtime-context-DnNbpkGo.js";
1
+ import { b as r } from "../chunks/validators-D-T-2HOR.js";
2
+ import { D as n, p as o, a as p, b as t } from "../chunks/report-runtime-context-DNbgCsko.js";
3
3
  export {
4
4
  n as DEFAULT_CALENDAR_CONTEXT,
5
5
  r as isValidIanaTimeZone,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-xdqe-Zvd.cjs"),r=require("../chunks/common-types-C1IM7gao.cjs"),o=require("../chunks/report-preferences-dialog-8KYKazoG.cjs");exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.Surfboard=e.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=r.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.ReportPreferencesDialog=o.ReportPreferencesDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-B6zSYUN4.cjs"),r=require("../chunks/common-types-C1IM7gao.cjs"),o=require("../chunks/report-preferences-dialog-DGMd-eTT.cjs");exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.Surfboard=e.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=r.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.ReportPreferencesDialog=o.ReportPreferencesDialog;
@@ -1,6 +1,6 @@
1
- import { b as a, a as o } from "../chunks/index-0fmECZL2.js";
2
- import { C as f, E } from "../chunks/common-types-g_1fKJLK.js";
3
- import { R as t } from "../chunks/report-preferences-dialog-Dxt9XMpd.js";
1
+ import { b as a, a as o } from "../chunks/index-DalKzjEZ.js";
2
+ import { C as f, E } from "../chunks/common-types-BLPy5_E0.js";
3
+ import { R as t } from "../chunks/report-preferences-dialog-C9mJffNQ.js";
4
4
  export {
5
5
  f as CONTROL_CARD_DEFAULT_VALUE,
6
6
  a as DisplayFormatPreferencesFields,
@@ -184,6 +184,13 @@ export declare function getDashboardFilterCompatInputId(filterId: string): strin
184
184
 
185
185
  export declare function getSemaphorAnalyzeResultFieldNames(): SemaphorAnalyzeResultFieldName[];
186
186
 
187
+ /**
188
+ * Catalog metadata always needs a database for database-backed connectors,
189
+ * even when that database is not part of SQL qualification (for example,
190
+ * PostgreSQL). Schema requirements continue to follow connector grammar.
191
+ */
192
+ export declare function getSemaphorCatalogCoordinateLevels(capabilities: Pick<SemaphorConnectionCapabilities, 'prefixLevels'>): SemaphorSourceLevel[];
193
+
187
194
  export declare function getSemaphorConnectionCapabilities(connectionType: string | undefined, options?: {
188
195
  connectionId?: string;
189
196
  }): SemaphorConnectionCapabilities;
@@ -264,6 +271,8 @@ export declare function isSemaphorMatrixTimeGrain(value: unknown): value is Sema
264
271
  */
265
272
  export declare function isSemaphorPhysicalSourceEntity(value: unknown): boolean;
266
273
 
274
+ export declare function isSemaphorSemanticSourceEntity(value: unknown): boolean;
275
+
267
276
  export declare function isSemaphorTimeGrain(value: unknown): value is SemaphorTimeGrain;
268
277
 
269
278
  export declare type MatrixAxisLevelDescriptor = {
@@ -746,6 +755,8 @@ export declare function parseSemaphorQualifiedSourcePath(input: {
746
755
  capabilities: Pick<SemaphorConnectionCapabilities, 'prefixLevels'>;
747
756
  }): SemaphorSourceCoordinateInput;
748
757
 
758
+ declare type PhysicalResolutionCapabilities = Pick<SemaphorConnectionCapabilities, 'dialect' | 'prefixLevels'>;
759
+
749
760
  export declare function preferSemaphorFieldRefMetadata(current: SemaphorFieldRef, next: SemaphorFieldRef): SemaphorFieldRef;
750
761
 
751
762
  export declare function preferSemaphorSourceMetadata(current: SemaphorSourceRef, next: SemaphorSourceRef): SemaphorSourceRef;
@@ -840,6 +851,32 @@ export declare function resolveMetricComparisonRequest(input: {
840
851
  /** Stable result-instance identity shared by query producers and consumers. */
841
852
  export declare function resolveMetricResultAlias(metric: MetricResultAliasInput): string;
842
853
 
854
+ /**
855
+ * Resolves only connector types or normalized dialects whose coordinate
856
+ * grammar is known. Callers that parse persisted identities must not inherit
857
+ * PostgreSQL defaults for absent or unknown capability evidence.
858
+ */
859
+ export declare function resolveSemaphorConnectionCapabilities(connectionTypeOrDialect: string | undefined, options?: {
860
+ connectionId?: string;
861
+ }): SemaphorConnectionCapabilities | undefined;
862
+
863
+ /**
864
+ * Returns the normalized connector/dialect family used to distinguish true
865
+ * aliases from distinct connectors that happen to share one grammar.
866
+ */
867
+ export declare function resolveSemaphorConnectionCapabilityIdentity(connectionTypeOrDialect: string | undefined): string | undefined;
868
+
869
+ /**
870
+ * Separates physical runtime identity from the stronger coordinates required
871
+ * to address the governed columns catalog.
872
+ */
873
+ export declare function resolveSemaphorPhysicalCatalogAddress(input: {
874
+ source: Extract<SemaphorSourceRef, {
875
+ kind: 'physical';
876
+ }>;
877
+ capabilities?: Pick<SemaphorConnectionCapabilities, 'prefixLevels'>;
878
+ }): SemaphorPhysicalCatalogAddressResolution;
879
+
843
880
  /**
844
881
  * Resolves one physical source from persisted structural identity hints.
845
882
  * Qualified identity takes precedence over conflicting bare hints, while
@@ -847,6 +884,23 @@ export declare function resolveMetricResultAlias(metric: MetricResultAliasInput)
847
884
  */
848
885
  export declare function resolveSemaphorPhysicalSourceEntity<T>(input: SemaphorPhysicalSourceResolutionInput<T>): SemaphorPhysicalSourceResolution<T>;
849
886
 
887
+ /**
888
+ * Resolves logical semantic identity from dataset metadata. Physical datasets
889
+ * are excluded by default because the general source resolver must preserve
890
+ * their execution coordinates. Mapping callers operating inside an explicit
891
+ * semantic-domain context may opt into projecting those datasets to their
892
+ * domain/dataset identity.
893
+ */
894
+ export declare function resolveSemaphorSemanticDatasetEntity<T>(input: SemaphorSourceEntityResolutionInput<T>, options?: {
895
+ includePhysicalDatasets?: boolean;
896
+ }): SemaphorSemanticDatasetEntityResolution<T>;
897
+
898
+ /**
899
+ * Resolves one persisted selected source without conflating a dataset's
900
+ * container type with its semantic/physical execution kind.
901
+ */
902
+ export declare function resolveSemaphorSourceEntity<T>(input: SemaphorSourceEntityResolutionInput<T>): SemaphorSourceEntityResolution<T>;
903
+
850
904
  export declare function resolveTemporalContext(input: ResolveTemporalContextInput): ResolvedTemporalContext;
851
905
 
852
906
  export declare type ResolveTemporalContextInput = {
@@ -3745,6 +3799,23 @@ export declare type SemaphorPaginationRequest = {
3745
3799
  pageSize: number;
3746
3800
  };
3747
3801
 
3802
+ export declare type SemaphorPhysicalCatalogAddressResolution = {
3803
+ kind: 'resolved';
3804
+ coordinates: Required<Pick<SemaphorSourceCoordinateInput, 'tableName'>> & Omit<SemaphorSourceCoordinateInput, 'tableName'>;
3805
+ } | {
3806
+ kind: 'missing_coordinates';
3807
+ missing: SemaphorSourceLevel[];
3808
+ } | {
3809
+ kind: 'incompatible_capabilities';
3810
+ };
3811
+
3812
+ export declare type SemaphorPhysicalSourceCapabilityAuthority = {
3813
+ capabilities: PhysicalResolutionCapabilities;
3814
+ connectionType?: string;
3815
+ dialect: SemaphorDialect;
3816
+ evidence: 'explicit' | 'entity' | 'coordinates';
3817
+ };
3818
+
3748
3819
  export declare function semaphorPhysicalSourceCoordinatesAreCompatible(input: {
3749
3820
  left: SemaphorSourceCoordinateInput;
3750
3821
  right: SemaphorSourceCoordinateInput;
@@ -3796,6 +3867,7 @@ export declare type SemaphorPhysicalSourceResolution<T> = {
3796
3867
  basis: SemaphorPhysicalSourceResolutionBasis;
3797
3868
  entity: T;
3798
3869
  coordinates: SemaphorSourceCoordinateInput;
3870
+ capabilityAuthority: SemaphorPhysicalSourceCapabilityAuthority;
3799
3871
  } | {
3800
3872
  kind: 'unqualified';
3801
3873
  } | {
@@ -3809,6 +3881,7 @@ export declare type SemaphorPhysicalSourceResolution<T> = {
3809
3881
  kind: 'not_found';
3810
3882
  basis: Exclude<SemaphorPhysicalSourceResolutionBasis, 'unqualified'>;
3811
3883
  coordinates?: SemaphorSourceCoordinateInput;
3884
+ capabilityAuthority: SemaphorPhysicalSourceCapabilityAuthority;
3812
3885
  } | {
3813
3886
  kind: 'incompatible_capabilities';
3814
3887
  };
@@ -3818,6 +3891,8 @@ export declare type SemaphorPhysicalSourceResolutionBasis = 'qualified' | 'bare'
3818
3891
  export declare type SemaphorPhysicalSourceResolutionInput<T> = {
3819
3892
  entities: readonly T[];
3820
3893
  connectionType?: string;
3894
+ dialect?: SemaphorDialect;
3895
+ capabilities?: PhysicalResolutionCapabilities;
3821
3896
  qualifiedHints?: ReadonlyArray<string | undefined>;
3822
3897
  bareHints?: ReadonlyArray<string | undefined>;
3823
3898
  coordinateHint?: SemaphorSourceCoordinateInput;
@@ -4088,6 +4163,10 @@ export declare type SemaphorRelativeTimeWindow = {
4088
4163
  completeness?: 'include_partial' | 'complete_periods';
4089
4164
  };
4090
4165
 
4166
+ export declare type SemaphorResolvedEntitySource = Extract<SemaphorSourceRef, {
4167
+ kind: 'semantic' | 'physical';
4168
+ }>;
4169
+
4091
4170
  export declare type SemaphorResultCalculation = {
4092
4171
  id: string;
4093
4172
  label: string;
@@ -4195,6 +4274,24 @@ export declare type SemaphorScalarValueFormat = {
4195
4274
  suffix?: string;
4196
4275
  };
4197
4276
 
4277
+ export declare type SemaphorSemanticDatasetEntityResolution<T> = {
4278
+ kind: 'resolved';
4279
+ basis: 'bare' | 'unqualified';
4280
+ entity: T;
4281
+ source: Extract<SemaphorSourceRef, {
4282
+ kind: 'semantic';
4283
+ }>;
4284
+ matchedById: boolean;
4285
+ } | {
4286
+ kind: 'ambiguous';
4287
+ basis: 'bare';
4288
+ } | {
4289
+ kind: 'not_found';
4290
+ basis: 'bare';
4291
+ } | {
4292
+ kind: 'unqualified';
4293
+ };
4294
+
4198
4295
  export declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
4199
4296
  kind: 'semantic';
4200
4297
  }>;
@@ -4232,6 +4329,50 @@ export declare type SemaphorSourceCoordinateInput = {
4232
4329
  tableName?: string;
4233
4330
  };
4234
4331
 
4332
+ export declare type SemaphorSourceEntityResolution<T> = {
4333
+ kind: 'resolved';
4334
+ basis: SemaphorSourceEntityResolutionBasis;
4335
+ source: SemaphorResolvedEntitySource;
4336
+ entity?: T;
4337
+ } | {
4338
+ kind: 'unqualified';
4339
+ } | {
4340
+ kind: 'malformed';
4341
+ } | {
4342
+ kind: 'conflicting';
4343
+ } | {
4344
+ kind: 'ambiguous';
4345
+ basis: Exclude<SemaphorSourceEntityResolutionBasis, 'unqualified'>;
4346
+ } | {
4347
+ kind: 'not_found';
4348
+ basis: Exclude<SemaphorSourceEntityResolutionBasis, 'unqualified'>;
4349
+ } | {
4350
+ kind: 'candidate';
4351
+ basis: 'qualified';
4352
+ source: SemaphorResolvedEntitySource;
4353
+ } | {
4354
+ kind: 'incompatible_capabilities';
4355
+ } | {
4356
+ kind: 'missing_connection';
4357
+ };
4358
+
4359
+ export declare type SemaphorSourceEntityResolutionBasis = SemaphorPhysicalSourceResolutionBasis | 'historical';
4360
+
4361
+ export declare type SemaphorSourceEntityResolutionInput<T> = {
4362
+ entities: readonly T[];
4363
+ semanticDomainId?: string;
4364
+ connectionId?: string;
4365
+ connectionType?: string;
4366
+ dialect?: SemaphorDialect;
4367
+ capabilities?: Pick<SemaphorConnectionCapabilities, 'dialect' | 'prefixLevels'>;
4368
+ fieldEntityType?: string;
4369
+ entityId?: string;
4370
+ entityName?: string;
4371
+ qualifiedHints?: ReadonlyArray<string | undefined>;
4372
+ bareHints?: ReadonlyArray<string | undefined>;
4373
+ fallbackCoordinateHint?: SemaphorSourceCoordinateInput;
4374
+ };
4375
+
4235
4376
  export declare function semaphorSourceHasRequiredCoordinates(input: {
4236
4377
  capabilities: Pick<SemaphorConnectionCapabilities, 'prefixLevels'>;
4237
4378
  source: SemaphorSourceCoordinateInput;
@@ -1,7 +1,7 @@
1
- import { a as s, C as E, D as C, E as l, L as r, P as A, g as t, d as _, h as T, e as o, b as u, c as L, i } from "../chunks/common-types-g_1fKJLK.js";
2
- import { D as n } from "../chunks/token-types-W3EHNW-D.js";
3
- import { r as d, a as F } from "../chunks/pivot-result-identity-5v4hRVbc.js";
4
- import { D as c } from "../chunks/report-runtime-context-DnNbpkGo.js";
1
+ import { a as s, C as E, D as C, E as l, L as r, P as A, g as t, d as _, h as T, e as o, b as u, c as L, i } from "../chunks/common-types-BLPy5_E0.js";
2
+ import { D as n } from "../chunks/token-types-DfDtCqlw.js";
3
+ import { r as d, a as F } from "../chunks/pivot-result-identity-CIZXsI53.js";
4
+ import { D as c } from "../chunks/report-runtime-context-DNbgCsko.js";
5
5
  export {
6
6
  s as CALCULATED_FIELD_ENTITY_MARKER,
7
7
  E as CONTROL_CARD_DEFAULT_VALUE,
@@ -2171,6 +2171,13 @@ declare type DashboardFilterMappingAuthoringRequest = {
2171
2171
  candidatesByCardId: Record<string, DashboardFilterMappingCandidateCatalog | undefined>;
2172
2172
  /** Grounded field that supplies the current filter value. */
2173
2173
  selectionField?: Pick<DashboardFilterTargetField, 'name' | 'sourceField'> & Partial<Pick<DashboardFilterTargetField, 'source'>>;
2174
+ /**
2175
+ * Strictly proven identities eligible for Auto. Physical datasets in a
2176
+ * semantic domain may expose both physical and semantic identities. An
2177
+ * explicit empty array is authoritative and must not fall back to a
2178
+ * candidate-only selectionField source.
2179
+ */
2180
+ automaticSelectionSources?: DashboardFilterTargetField['source'][];
2174
2181
  /** Datatype of the raw selection value, which may differ from the label. */
2175
2182
  selectionDataType?: string;
2176
2183
  /**
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.472",
8
+ "version": "0.1.474",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -1 +0,0 @@
1
- "use strict";var G=Object.defineProperty;var X=(e,t,n)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var q=(e,t,n)=>X(e,typeof t!="symbol"?t+"":t,n);const m=require("./validators-DcshgK7w.cjs");require("./analyze-result-contract-OgPk-zGu.cjs");require("../value-format-preferences/index.cjs");function c(e){return typeof e=="string"&&e.trim().length>0?e.trim():null}function H(e){return Array.from(new Set(e.filter(t=>!!t)))}function Z(e){const t=c(e.table),n=c(e.schema),r=c(e.catalog)||c(e.database);return t?H([t,n?`${n}.${t}`:null,r?`${r}.${t}`:null,r&&n?`${r}.${n}.${t}`:null]):[]}function B(e){const t=c(e.table)||c(e.tableName);return H([c(e.name),c(e.alias),...Z({table:t,schema:c(e.schema)||c(e.schemaName),catalog:c(e.catalog),database:c(e.database)||c(e.databaseName)})])}function ee(e,t){const n=c(e.domainId),r=c(t.domainId);if(n&&r&&n!==r)return!0;if(e.type==="dataset")return!1;const i=c(e.id),d=c(t.id);if(i&&d&&i!==d)return!0;const o=c(e.connectionId),a=c(t.connectionId);return!!(o&&a&&o!==a)}function A(e,t=!1){return c(e.table)||c(e.tableName)||(e.type!=="dataset"||t?c(e.name):null)}function R(e){return c(e.catalog)||c(e.database)||c(e.databaseName)}function x(e){return c(e.schema)||c(e.schemaName)}function $(e){return e.length===1?e[0]:void 0}function te(e,t){const n=A(t,!0),r=R(t),i=x(t);if(!(!n||!r&&!i))return $(e.filter(d=>{const o=d;return!(A(o)!==n||r&&R(o)!==r||i&&x(o)!==i)}))}function D(e,t){if(!t||!(e!=null&&e.length))return;const n=e.filter(a=>!ee(a,t));if(t.type==="dataset"){const a=c(t.id);if(a)return $(n.filter(s=>s.type==="dataset"&&c(s.id)===a));if(c(t.domainId)){const s=c(t.name);return $(n.filter(g=>g.type==="dataset"&&c(g.name)===s))}}let r=[];if(t.type==="dataset"){const a=c(t.name);if(r=n.filter(l=>l.type==="dataset"&&c(l.name)===a),r.length===1)return r[0]}if(!!(A(t,!0)&&(R(t)||x(t))))return te(n,t);if(r.length>1)return;const d=B(t);if(d.length===0)return;const o=n.filter(a=>B(a).some(s=>d.includes(s)));return $(o)}function N(e,t){const n=D(e,t);return n?{...t,...n}:t}function ne(e,t){const n=t||[];return n.length===0?e:{...e,baseEntity:N(n,e.baseEntity),joins:e.joins.map(r=>({...r,source:N(n,r.source),target:N(n,r.target)}))}}function ie(e,t){if(!(e!=null&&e.joins.length))return[];const n=[e.baseEntity,...e.joins.flatMap(i=>[i.source,i.target])],r=[];return n.forEach(i=>{!D(t,i)&&!D(r,i)&&r.push(i)}),r}function I(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function _(e){return I(e)&&typeof e.name=="string"}function E(e){return!I(e)||e.kind!=="semantic"&&e.kind!=="physical"||(e.kind==="semantic"?[e.datasetId,e.datasetName,e.connectionId]:[e.databaseName,e.schemaName]).some(n=>n!==void 0&&typeof n!="string")?!1:m.hasCompleteSemaphorSourceIdentity(e)}function S(e,t){var s,g;const n=Array.isArray(t==null?void 0:t.selectedEntities)?t.selectedEntities.filter(_):void 0,r=D(n,e),i=r?{...e,...r}:e,d=i.type==="dataset"&&"domainId"in i&&typeof i.domainId=="string"&&!!i.domainId.trim();if((t==null?void 0:t.mode)==="semanticDomain"&&!d)return;if((t==null?void 0:t.mode)!=="database"&&i.type==="dataset"&&"domainId"in i&&i.domainId){const u=i,f={kind:"semantic",domainId:u.domainId,datasetId:m.getSemaphorDatasetEntityId(u),datasetName:u.name,connectionId:u.connectionId||(t==null?void 0:t.connectionId),label:u.label};return E(f)?m.canonicalizeSemaphorSourceIdentity(f):void 0}const o=i.connectionId||(t==null?void 0:t.connectionId),a=i.type==="dataset"&&"table"in i&&i.table?i.table:i.name;if(!o||!a)return;const l={kind:"physical",connectionId:o,connectionType:i.connectionType||(t==null?void 0:t.connectionType),tableName:a,databaseName:i.database||((s=t==null?void 0:t.dbSelection)==null?void 0:s.database),schemaName:i.schema||((g=t==null?void 0:t.dbSelection)==null?void 0:g.schema),dialect:i.dialect};return E(l)?l:void 0}function re(e,t){var a,l;const n=S(e,t);if(!n)return;const r=e.type==="dataset"&&"table"in e&&typeof e.table=="string"?e.table.trim():void 0,i=n.kind==="physical"?n.tableName:r,d=e.connectionId||(t==null?void 0:t.connectionId),o=i&&d?{connectionId:d,databaseName:e.database||((a=t==null?void 0:t.dbSelection)==null?void 0:a.database),schemaName:e.schema||((l=t==null?void 0:t.dbSelection)==null?void 0:l.schema),tableName:i}:void 0;return{source:n,...o?{executionTable:o}:{}}}function J(e){const t=I(e.dataSource)?e.dataSource:void 0;if(typeof e.sql=="string"&&e.sql.trim()){const o=[],a=Array.isArray(t==null?void 0:t.selectedEntities)?t.selectedEntities:[];for(const l of a){if(!_(l))continue;const s=re(l,t);s&&!o.some(g=>m.semaphorSourcesReferToSameDataset(g.source,s.source))&&o.push(s)}return{cardId:e.id,kind:"sql",pinnedCatalogSources:o}}if(!I(e.config))return{cardId:e.id,kind:"unconfigured"};const n=[],r=I(e.config.matrixIntent)?e.config.matrixIntent:void 0,i=e.type==="matrixTable"?(r==null?void 0:r.kind)==="matrix"?r.source:e.config.source:void 0;E(i)&&n.push(i);const d=I(e.config.joinPlan)?e.config.joinPlan:void 0;if(d){const o=Array.isArray(d.joins)?d.joins:[],a=[d.baseEntity];for(const s of o)I(s)&&a.push(s.source,s.target);let l=!1;for(const s of a){if(!_(s)){l=!0;continue}const g=S(s,t);g?n.push(g):l=!0}l&&(n.length=0)}else if(e.type!=="matrixTable"){const o=Array.isArray(t==null?void 0:t.selectedEntities)?t.selectedEntities:[];if(o.length===1&&_(o[0])){const a=S(o[0],t);a&&n.push(a)}}if(!n.length&&!d&&e.type!=="matrixTable"){const o=e.config.queryBaseSource;E(o)&&n.push(o)}return{cardId:e.id,kind:"config",executableSources:m.mergeSemaphorSourcesByIdentity(n)}}function L(e,t){return(e.kind==="config"?e.executableSources:e.kind==="sql"?e.pinnedCatalogSources.map(r=>r.source):[]).some(r=>m.semaphorSourcesReferToSameDataset(r,t))}function se(e,t){if(e.kind==="config")return e.executableSources.find(n=>m.semaphorSourcesReferToSameDataset(n,t))}function ae(e,t){var n;return(n=z(e,t))==null?void 0:n.source}function z(e,t){if(e.kind==="sql")return e.pinnedCatalogSources.find(n=>m.semaphorSourcesReferToSameDataset(n.source,t))}function O(e){const t=new Set;for(const n of[e.name,e.sourceField]){if(!n)continue;const r=m.normalizeAnalyticsCatalogName(n);if(!r)continue;t.add(r);const i=r.split("."),d=i[i.length-1];d&&t.add(d)}return t}function V(e,t){const n=m.normalizeAnalyticsCatalogDataType(e),r=m.normalizeAnalyticsCatalogDataType(t);return n==="unknown"||r==="unknown"?!1:(n==="date"||n==="datetime")&&(r==="date"||r==="datetime")?!0:n===r}function oe(e,t){return m.semaphorSourcesReferToSameDataset(e.field.source,t.field.source)&&m.normalizeAnalyticsCatalogName(e.field.name)===m.normalizeAnalyticsCatalogName(t.field.name)&&m.normalizeAnalyticsCatalogName(e.field.sourceField||e.field.name)===m.normalizeAnalyticsCatalogName(t.field.sourceField||t.field.name)}function U(e,t){if(e.kind!=="field")return!1;const n=O(t),r=O(e.field);return V(t.dataType,e.field.dataType)&&[...r].some(i=>n.has(i))}function de(e){const t=e.candidates.filter(n=>U(n,e.logicalValueField));return t.length===1?{status:"matched",target:t[0]}:t.length>1?{status:"ambiguous"}:{status:"notApplicable"}}function ce(e){const t=[];for(const n of e.acceptedTargets)!V(e.logicalValueField.dataType,n.field.dataType)||t.some(r=>oe(r,n))||t.push(n);return t.length===1?{status:"matched",target:t[0]}:t.length>1?{status:"ambiguous"}:{status:"notApplicable"}}const le=/\{\{-?\s*filters\s*\|\s*where\s*-?\}\}/i,ue=/\{\{-?\s*filters\s*\|\s*and\s*-?\}\}/i,fe=/\bwhere\b/i;function j(e){return e!=null&&e.trim()?le.test(e)||ue.test(e):!1}function me(e){return!(e!=null&&e.trim())||j(e)?null:fe.test(e)?{helper:"{{ filters | and }}",description:"For queries with an existing WHERE clause."}:{helper:"{{ filters | where }}",description:"For queries without a WHERE clause."}}function he(e){return(e.field.sourceField||e.field.name).trim()||void 0}function be(e){if(e.inventory.kind!=="sql"||e.target.kind!=="field")return{status:"ineligible"};const t=z(e.inventory,e.target.field.source),n=he(e.target);if(!t||!n)return{status:"ineligible"};if(t.executionTable){const o=[t.executionTable.databaseName,t.executionTable.schemaName,t.executionTable.tableName,n].filter(Boolean).join(".");return{status:"eligible",source:t.source,executionIdentifier:o}}if(e.inventory.pinnedCatalogSources.length!==1)return{status:"ineligible"};const r=m.normalizeAnalyticsCatalogName(n),i=(e.candidateTargets||[]).filter(o=>m.normalizeAnalyticsCatalogName(o.field.sourceField||o.field.name)===r),d=[];for(const o of i)d.some(a=>m.semaphorSourcesReferToSameDataset(a,o.field.source))||d.push(o.field.source);return d.length>1?{status:"ineligible"}:{status:"eligible",source:t.source,executionIdentifier:n}}class W extends Error{constructor(n){super(n.map(r=>r.message).join(" "));q(this,"issues");this.name="DashboardFilterMappingContractError",this.issues=n}}const ge={string:!0,number:!0,boolean:!0,date:!0,datetime:!0};function b(e){return typeof e=="string"&&e.trim().length>0}function h(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function T(e){return Array.isArray(e)&&e.every(t=>typeof t=="string")}function pe(e){if(!h(e))return!1;switch(e.kind){case"allSheets":return e.sheetKinds===void 0||T(e.sheetKinds)&&e.sheetKinds.every(t=>t==="dashboard"||t==="document");case"sheets":return T(e.sheetIds);case"cards":return T(e.cardIds);case"documentSections":return b(e.sheetId)&&T(e.sectionIds);default:return!1}}function ye(e){return e==="shared"||e==="perSheet"||e==="perCard"||e==="perDocumentSection"}function Ie(e){return h(e)?b(e.id)&&b(e.column)&&b(e.dataType):!1}function Fe(e,t,n,r){var a;if(!h(t)){r.push({code:"invalid_option_source",path:n,message:`${n} must be a semantic or physical option source.`,inputId:e});return}const i=t.source,d=[["labelField",t.labelField],["valueField",t.valueField],["searchField",t.searchField]];if(!h(i)||i.kind!=="semantic"&&i.kind!=="physical"||!m.hasCompleteSemaphorSourceIdentity(i)||!h(t.labelField)||!h(t.valueField)||t.searchField!==void 0&&!h(t.searchField)||t.disambiguationFields!==void 0&&(!Array.isArray(t.disambiguationFields)||!t.disambiguationFields.every(h))){r.push({code:"invalid_option_source",path:n,message:`${n} must contain a valid semantic or physical source and field references.`,inputId:e});return}for(const[l,s]of d)s!==void 0&&h(s)&&(!b(s.name)||s.source!==void 0&&!m.semaphorSourcesReferToSameDataset(s.source,i))&&r.push({code:"invalid_option_source",path:`${n}.${l}`,message:`${n}.${l} must be a named field belonging to the declared option source.`,inputId:e});for(const[l,s]of((a=t.disambiguationFields)==null?void 0:a.entries())||[])(!h(s)||!b(s.name)||s.source!==void 0&&!m.semaphorSourcesReferToSameDataset(s.source,i))&&r.push({code:"invalid_option_source",path:`${n}.disambiguationFields[${l}]`,message:`${n}.disambiguationFields[${l}] must be a named field belonging to the declared option source.`,inputId:e});const o=t.valueField;["string","number","boolean","date","datetime"].includes(String(o.dataType))||r.push({code:"invalid_option_source",path:`${n}.valueField.dataType`,message:`${n}.valueField.dataType must be a known option-value datatype.`,inputId:e})}function Te(e,t,n,r,i,d){var s;if(b(t.bindingId)||i.push({code:"invalid_binding_id",path:`${n}.bindingId`,message:`${n}.bindingId must be an opaque non-empty id.`,inputId:e,cardId:t.cardId}),((s=t.target)==null?void 0:s.kind)!=="field"){i.push({code:"unsupported_target",path:`${n}.target`,message:`${n}.target must be one direct field target.`,inputId:e,cardId:t.cardId,bindingId:t.bindingId});return}const o=t.target.field;if(!b(o==null?void 0:o.name)||!o.source||o.source.kind!=="semantic"&&o.source.kind!=="physical"||!m.hasCompleteSemaphorSourceIdentity(o.source)){i.push({code:"invalid_target_field",path:`${n}.target.field`,message:`${n}.target.field must have a name and a source-qualified semantic or physical identity.`,inputId:e,cardId:t.cardId,bindingId:t.bindingId});return}if(Object.prototype.hasOwnProperty.call(ge,o.dataType)||i.push({code:"unknown_target_data_type",path:`${n}.target.field.dataType`,message:`${n}.target.field.dataType must be known.`,inputId:e,cardId:t.cardId,bindingId:t.bindingId}),o.sourceField!==void 0&&!b(o.sourceField)&&i.push({code:"invalid_target_field",path:`${n}.target.field.sourceField`,message:`${n}.target.field.sourceField must be a non-empty catalog-grounded column when provided.`,inputId:e,cardId:t.cardId,bindingId:t.bindingId}),!d)return;const a=r.get(t.cardId);if(!a){i.push({code:"unknown_card",path:`${n}.cardId`,message:`${n}.cardId '${t.cardId}' does not exist.`,inputId:e,cardId:t.cardId,bindingId:t.bindingId});return}const l=J(a);(l.kind==="unconfigured"||!L(l,o.source))&&i.push({code:"unavailable_card_source",path:`${n}.target.field.source`,message:`${n}.target field source is not declared by card '${a.id}'.`,inputId:e,cardId:a.id,bindingId:t.bindingId})}function $e(e,t,n,r,i,d){if(t===void 0)return;if(!h(t)||t.kind!=="cardMappings"||!Array.isArray(t.cards)){i.push({code:"invalid_application",path:n,message:`${n} must be a cardMappings application with a cards array.`,inputId:e});return}const o=new Set;t.cards.forEach((a,l)=>{const s=`${n}.cards[${l}]`;if(!b(a==null?void 0:a.cardId)){i.push({code:"unknown_card",path:`${s}.cardId`,message:`${s}.cardId is required.`,inputId:e});return}if(o.has(a.cardId)){i.push({code:"duplicate_card_application",path:`${s}.cardId`,message:`${n} contains more than one entry for card '${a.cardId}'.`,inputId:e,cardId:a.cardId});return}if(o.add(a.cardId),d&&!r.has(a.cardId)){i.push({code:"unknown_card",path:`${s}.cardId`,message:`${s}.cardId '${a.cardId}' does not exist.`,inputId:e,cardId:a.cardId});return}a.kind==="bound"?Te(e,a,s,r,i,d):a.kind!=="excluded"&&i.push({code:"invalid_application",path:s,message:`${s}.kind must be 'bound' or 'excluded'.`,inputId:e,cardId:a.cardId})})}function K({inputs:e,dashboardFilters:t,cards:n=[],validateCardTargets:r=!1}){const i=[],d=new Map((t||[]).map(s=>[s.id,s])),o=new Map(r?n.map(s=>[s.id,s]):[]),a=[],l=new Map;return e!=null&&!Array.isArray(e)?(i.push({code:"invalid_input",path:"dashboard.inputs",message:"dashboard.inputs must be an array when present."}),{ok:!1,inputs:a,issues:i}):((Array.isArray(e)?e:[]).forEach((s,g)=>{const u=`dashboard.inputs[${g}]`;if(!h(s)||s.kind!=="filter"&&s.kind!=="control"||!b(s.id)||!b(s.label)||!b(s.variableName)||!pe(s.scope)||!ye(s.runtimeScope)){i.push({code:"invalid_input",path:u,message:`${u} must be a complete filter or control Dashboard Input envelope.`,inputId:h(s)&&typeof s.id=="string"?s.id:void 0});return}if(s.kind==="control"&&!h(s.control)){i.push({code:"invalid_input",path:`${u}.control`,message:`${u}.control must be a control definition.`,inputId:s.id});return}const f=s;if(f.kind==="control"){a.push(f);return}const k=f.filter,y=f.filterReference,F=k!==void 0,w=!!y;if(F&&w){i.push({code:"both_filter_definitions",path:u,message:`${u} must contain either filter or filterReference, not both.`,inputId:f.id});return}if(!F&&!w){i.push({code:"missing_filter_definition",path:u,message:`${u} must contain filter or filterReference.`,inputId:f.id});return}if(F&&!Ie(k)){i.push({code:"invalid_input",path:`${u}.filter`,message:`${u}.filter must be a complete dashboard filter definition.`,inputId:f.id});return}let p,v;if(F)p=k,v="embedded";else{if((y==null?void 0:y.kind)!=="dashboardFilter"){i.push({code:"invalid_filter_reference",path:`${u}.filterReference.kind`,message:`${u}.filterReference.kind must be 'dashboardFilter'.`,inputId:f.id});return}const C=typeof(y==null?void 0:y.filterId)=="string"?y.filterId:void 0;if(p=C?d.get(C):void 0,v="dashboardFilter",!p){i.push({code:"orphaned_filter_reference",path:`${u}.filterReference.filterId`,message:`${u}.filterReference cannot resolve dashboard filter '${C||""}'.`,inputId:f.id});return}if(p.kind==="global-date"){i.push({code:"global_date_reference",path:`${u}.filterReference`,message:`${u}.filterReference cannot reference the Global Date filter.`,inputId:f.id});return}const M=l.get(p.id);if(M){i.push({code:"duplicate_filter_reference",path:`${u}.filterReference.filterId`,message:`${u}.filterReference duplicates dashboard filter '${p.id}' already owned by Dashboard Input '${M}'.`,inputId:f.id});return}l.set(p.id,f.id)}if(!p)return;if(f.optionSource!==void 0&&Fe(f.id,f.optionSource,`${u}.optionSource`,i),f.application&&p.kind==="global-date"){i.push({code:"global_date_reference",path:`${u}.application`,message:`${u}.application cannot map the Global Date filter.`,inputId:f.id});return}f.application&&f.scope.kind!=="allSheets"&&f.scope.kind!=="sheets"&&i.push({code:"unsupported_mapped_scope",path:`${u}.scope`,message:`${u}.scope must be allSheets or sheets when cardMappings are present.`,inputId:f.id}),$e(f.id,f.application,`${u}.application`,o,i,r);const{filter:ve,filterReference:Ce,compatibility:P,...Y}=f;a.push({...Y,filter:p,...F&&P?{compatibility:P}:{},...f.optionSource?{optionSource:f.optionSource}:{},definitionOrigin:v})}),i.length?{ok:!1,inputs:a,issues:i}:{ok:!0,inputs:a})}function _e(e){const t=K(e);if(!t.ok)throw new W(t.issues);return t.inputs}function De(e=()=>globalThis.crypto.randomUUID()){return e()}const Ee={date:new Set(["between","not between","=","!=",">",">=","<","<=","is null","is not null"]),number:new Set(["between","not between","=","!=",">",">=","<","<=","in","not in","is null","is not null"]),string:new Set(["=","!=","in","not in","like","not like","is null","is not null"]),boolean:new Set(["=","!=","in","not in","is null","is not null"])};function Q(e){const t=m.normalizeAnalyticsCatalogDataType(e);return t==="number"||t==="boolean"?t:t==="date"||t==="datetime"?"date":"string"}function ke(e,t){return typeof t!="string"?!1:Ee[Q(e)].has(t)}exports.DashboardFilterMappingContractError=W;exports.buildDashboardCardSourceIndex=J;exports.createDashboardFilterBindingId=De;exports.dashboardCardFilterSourceInventoryContains=L;exports.dashboardFilterTargetMatchesLogicalValue=U;exports.dashboardFilterValueTypeForDataType=Q;exports.findDashboardCardExecutableSource=se;exports.findDashboardCardPinnedCatalogSource=ae;exports.findDashboardSqlPinnedCatalogSource=z;exports.findOrphanedJoinPlanEntities=ie;exports.getDashboardFilterSubscriptionHint=me;exports.hasDashboardFilterSubscription=j;exports.isDashboardFilterOperationCompatible=ke;exports.normalizeDashboardInputs=K;exports.normalizeJoinPlanEntityReferences=ne;exports.requireNormalizedDashboardInputs=_e;exports.resolveDashboardFilterAutomaticTarget=de;exports.resolveDashboardFilterInheritedTarget=ce;exports.resolveDashboardSqlFilterTarget=be;