react-semaphor 0.1.601 → 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 (123) 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-BE0XXzZP.js → assistant-chat-B6hNQI1t.js} +146 -146
  9. package/dist/chunks/{bookmark-impact-DXDAN5AY.js → bookmark-impact-Ba2PLcGp.js} +3 -3
  10. package/dist/chunks/{bookmark-state-BMyB3Tb6.js → bookmark-state-n7AaNzR_.js} +517 -516
  11. package/dist/chunks/{card-filter-builder-CE0-YVN5.js → card-filter-builder-Y22HizVx.js} +474 -474
  12. package/dist/chunks/{comparison-window-caption-Dxj2CHOa.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-mJKPFRbb.js → dashboard-BghI99oY.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CntwKyiZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +725 -716
  16. package/dist/chunks/{dashboard-controls-XO089DMg.js → dashboard-controls-CtFXlyjV.js} +53 -53
  17. package/dist/chunks/{dashboard-json-CQRiydUv.js → dashboard-json-DfGBUtCd.js} +5 -5
  18. package/dist/chunks/dates-BnrXF4bb.js +185 -0
  19. package/dist/chunks/{edit-dashboard-visual-f-Dm-BLR.js → edit-dashboard-visual-oxt3x1wb.js} +8081 -8268
  20. package/dist/chunks/{filter-line-CKNMyNTQ.js → filter-line-Cy5YYqRL.js} +27 -27
  21. package/dist/chunks/{filter-reach-copy-B8GGyVuR.js → filter-reach-copy-CE_ZX147.js} +1786 -2214
  22. package/dist/chunks/{filter-value-text-CRtKecI5.js → filter-value-text-fWvSDwkl.js} +11 -11
  23. package/dist/chunks/{index-DoPApnxg.js → index-D5rxbtS4.js} +24 -24
  24. package/dist/chunks/{layout-grid-CiSCZdIr.js → layout-grid-9LndRoLa.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-myf3D3Qx.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-C1SuOHLZ.js → matrix-operation-contract-DPBj69D8.js} +518 -514
  28. package/dist/chunks/{metric-comparison-Cm0G893W.js → metric-comparison-B0FR-Q8I.js} +184 -125
  29. package/dist/chunks/{paintbrush-DQIwqlck.js → paintbrush-58FQYY-y.js} +1 -1
  30. package/dist/chunks/{palette-Cun747Rg.js → palette-Be62Tkoa.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-C1Dyx8du.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
  32. package/dist/chunks/{pivot-result-identity-CBS-ssEp.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-SDZEcG2x.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
  35. package/dist/chunks/{report-runtime-context-BbedQdtc.js → report-runtime-context-c77_KF9v.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-DRBS0eRa.js → resolve-dashboard-input-context-Rtl1ffmE.js} +8808 -7291
  37. package/dist/chunks/{save-Dj5bjm7P.js → save-C5A0JnEV.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-DWVlJcsa.js → saved-dashboard-context-tcyTU8jm.js} +199 -213
  39. package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
  40. package/dist/chunks/{semaphor-ready-indicator-OFOoAY-A.js → semaphor-ready-indicator-FBvunj6S.js} +37894 -35726
  41. package/dist/chunks/{shelf-drop-preview-context-2swWypXu.js → shelf-drop-preview-context-QKStrcK9.js} +54 -54
  42. package/dist/chunks/{stored-dashboard-NtOuEX6a.js → stored-dashboard-CHozcAY9.js} +770 -743
  43. package/dist/chunks/{style-sheet-parts-Qv4UcLAo.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
  44. package/dist/chunks/{table-export-sheet-Do7ZB0_F.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
  45. package/dist/chunks/{token-types-Dy_aXO-U.js → token-types-XbM6QByy.js} +1 -1
  46. package/dist/chunks/{upload-Bq-puSVy.js → upload-H15d7uHK.js} +1 -1
  47. package/dist/chunks/{validators-C7DFk3QK.js → validators-Baf3VIf5.js} +5 -5
  48. package/dist/chunks/{variable-draft-Cy03qnEi.js → variable-draft-C2y8Jp6Z.js} +27 -28
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +3392 -2761
  51. package/dist/format-utils/index.js +205 -204
  52. package/dist/index.js +73 -75
  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/dashboard/dashboard-web-component.d.ts +7 -0
  57. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
  58. package/dist/types/index.js +5 -5
  59. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +1 -1
  60. package/dist/types/lib/document/document-edits.d.ts +0 -4
  61. package/dist/types/lib/query-context/assemble-card-query.d.ts +6 -1
  62. package/dist/types/lib/stores/dashboard-store.d.ts +30 -1
  63. package/dist/types/lib/types/common-types.d.ts +0 -2
  64. package/dist/types/lib/types/explorer-types.d.ts +1 -1
  65. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +15 -0
  66. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
  67. package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
  68. package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
  69. package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
  70. package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
  71. package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
  72. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
  73. package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
  74. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  75. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
  76. package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
  77. package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +52 -0
  78. package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +129 -0
  79. package/dist/types/shared/dashboard-authoring/calculations/resolve-dashboard-field-copies.d.ts +46 -0
  80. package/dist/types/shared/dashboard-authoring/calculations/tokens.d.ts +36 -0
  81. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
  82. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  83. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
  84. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
  85. package/dist/types/shared/dashboard-authoring/changes/calculation-change.d.ts +399 -0
  86. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +165 -360
  87. package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +23 -2
  88. package/dist/types/shared/dashboard-authoring/changes/domain-change.d.ts +143 -266
  89. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +2 -0
  90. package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +46 -0
  91. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  92. package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
  93. package/dist/types/shared/dashboard-authoring/index.d.ts +7 -1
  94. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
  95. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
  96. package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
  97. package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
  98. package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
  99. package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
  100. package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
  101. package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
  102. package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
  103. package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +158 -0
  104. package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +71 -0
  105. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +17 -6
  106. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -0
  107. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
  108. package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
  109. package/dist/types/shared/format-utils/index.d.ts +1 -0
  110. package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
  111. package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
  112. package/dist/types/shared/temporal/index.d.ts +2 -0
  113. package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
  114. package/dist/types/shared/temporal/temporal.d.ts +27 -0
  115. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
  116. package/dist/types/shared/usage-events/details.d.ts +2 -2
  117. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  118. package/dist/usage-events/index.js +1 -1
  119. package/package.json +3 -2
  120. package/dist/chunks/dates-B-Urp5OD.js +0 -164
  121. package/dist/chunks/matrix-member-presentation-g0c_NpDW.js +0 -258
  122. package/dist/chunks/raw-temporal-value-DN_l-Tss.js +0 -454
  123. package/dist/chunks/selection-filter-compiler-DmAr7yqC.js +0 -131
@@ -1,25 +1,25 @@
1
- import { aX as H, aW as xt, j as Tt, k as G, aE as ft, r as Et } from "./validators-C7DFk3QK.js";
2
- import { at as St, ay as $t, au as Ft, f as kt, a as K, a6 as J, am as It, a4 as Dt, an as Lt, ao as _t, o as Q, s as Nt, aF as At, Y as tt, _ as Mt, a0 as Kt, a7 as Ot } from "./pivot-result-contract-expectations-C1Dyx8du.js";
3
- import { c as Rt, b as et } from "./pivot-result-identity-CBS-ssEp.js";
4
- import { v as Vt, d as zt, c as Pt } from "./raw-temporal-value-DN_l-Tss.js";
1
+ import { aX as H, aW as xt, j as Tt, k as G, aE as ft, r as Et } from "./validators-Baf3VIf5.js";
2
+ import { au as St, az as $t, av as Ft, f as kt, a as K, a7 as J, an as It, a5 as Dt, ao as Lt, ap as _t, q as Q, t as Nt, aG as At, Z as tt, $ as Mt, a1 as Kt, a8 as Ot } from "./pivot-result-contract-expectations-BYqAmG9n.js";
3
+ import { c as Rt, b as et } from "./pivot-result-identity-CAP4--iq.js";
4
+ import { v as Vt, d as zt, c as Pt } from "./raw-temporal-value-Dg_MTFF7.js";
5
5
  import { e as jt, p as Bt, k as Ut } from "./export-file-format-C-tJsxsf.js";
6
- import "./matrix-operation-contract-C1SuOHLZ.js";
7
- import "./analytics-base-schemas-DevrgqQb.js";
8
- import { a as U } from "./metric-comparison-Cm0G893W.js";
6
+ import "./matrix-operation-contract-DPBj69D8.js";
7
+ import { a as U } from "./metric-comparison-B0FR-Q8I.js";
8
+ import "./analytics-base-schemas-DsUh5Q3C.js";
9
9
  import "../value-format-preferences/index.js";
10
10
  const Ht = /* @__PURE__ */ new Set(["second", "minute", "hour", "day", "month"]);
11
11
  function Gt(t) {
12
12
  const { presentation: e } = t;
13
13
  return t.formattedValues ? (e == null ? void 0 : e.kind) === "text" || (e == null ? void 0 : e.kind) === "measure" && e.format.type === "duration" ? "text" : (e == null ? void 0 : e.kind) === "temporal_bucket" ? Ht.has(e.grain) ? "date" : "text" : (e == null ? void 0 : e.kind) === "datetime" ? "date" : t.dataType === "number" ? "number" : t.dataType === "boolean" ? "boolean" : t.dataType === "unknown" ? "by_value" : "text" : "by_value";
14
14
  }
15
- function Wt(t) {
15
+ function qt(t) {
16
16
  const e = (i, d) => Number.isInteger(i) ? Math.min(20, Math.max(0, i)) : d, r = e(t.minimumFractionDigits, 0), o = Math.max(r, e(t.maximumFractionDigits, 2));
17
17
  return o === 0 ? "" : `.${"0".repeat(o)}`;
18
18
  }
19
19
  function j(t) {
20
20
  return `"${t.replace(/"/g, "")}"`;
21
21
  }
22
- function qt(t) {
22
+ function Wt(t) {
23
23
  let e;
24
24
  try {
25
25
  e = new Intl.NumberFormat(t.locale ?? "en-US", {
@@ -37,25 +37,25 @@ function qt(t) {
37
37
  text: i(o + 1, r) + e[r].value
38
38
  };
39
39
  }
40
- function Yt(t) {
41
- const e = Wt(t);
40
+ function Xt(t) {
41
+ const e = qt(t);
42
42
  let r;
43
43
  if (t.type === "scientific")
44
44
  r = `0${e}E+00`;
45
45
  else {
46
46
  const o = `${t.useGrouping === !1 ? "0" : "#,##0"}${e}`;
47
47
  if (t.type === "currency") {
48
- const i = qt(t);
48
+ const i = Wt(t);
49
49
  r = i ? i.side === "before" ? `${j(i.text)}${o}` : `${o}${j(i.text)}` : o;
50
50
  } else t.type === "percent" ? r = t.percentValueMode === "whole" ? `${o}${j("%")}` : `${o}%` : r = o;
51
51
  }
52
52
  return t.negativeStyle === "parentheses" ? `${r};(${r})` : r;
53
53
  }
54
- function Xt(t, e) {
54
+ function Yt(t, e) {
55
55
  if (!t.formattedValues) return;
56
56
  const { presentation: r } = t;
57
57
  if (e === "number" || e === "by_value")
58
- return (r == null ? void 0 : r.kind) !== "measure" || r.format.type === "duration" ? void 0 : Yt(r.format);
58
+ return (r == null ? void 0 : r.kind) !== "measure" || r.format.type === "duration" ? void 0 : Xt(r.format);
59
59
  if (e === "date") {
60
60
  if ((r == null ? void 0 : r.kind) === "temporal_bucket")
61
61
  return r.grain === "day" ? "yyyy-mm-dd" : r.grain === "month" ? "mmm yyyy" : "yyyy-mm-dd hh:mm";
@@ -64,7 +64,7 @@ function Xt(t, e) {
64
64
  }
65
65
  }
66
66
  function rt(t) {
67
- const e = Gt(t), r = Xt(t, e);
67
+ const e = Gt(t), r = Yt(t, e);
68
68
  return Object.freeze({
69
69
  key: t.key,
70
70
  label: t.label,
@@ -323,7 +323,7 @@ function De(t) {
323
323
  const m = A(n);
324
324
  return m && n.temporalBucket ? [[m, n.temporalBucket]] : [];
325
325
  })
326
- ), q = /* @__PURE__ */ new Map();
326
+ ), W = /* @__PURE__ */ new Map();
327
327
  for (const n of E) {
328
328
  const m = J({
329
329
  snapshot: e.presentationExecutionSnapshot,
@@ -334,7 +334,7 @@ function De(t) {
334
334
  if (m && !v) throw new Error(`Missing temporal bucket metadata for column "${n}"`);
335
335
  if (v && !m) throw new Error(`Missing resolved temporal presentation for column "${n}"`);
336
336
  }
337
- m && v && q.set(n, w(v, m));
337
+ m && v && W.set(n, w(v, m));
338
338
  }
339
339
  const z = E.map((n) => {
340
340
  const m = ht.get(n), v = m && ce.has(m) ? m : "unknown", S = o ? p(n, I, V) : void 0, F = y(n, k.get(n)), L = o && I.activatedColumnKeys.has(n) && at(I, n) === void 0;
@@ -353,7 +353,7 @@ function De(t) {
353
353
  if (F !== void 0) return { text: F.text, value: n, ...F.wallClock ? { wallClock: F.wallClock } : {} };
354
354
  const L = V.get(m);
355
355
  if (L) {
356
- const $ = q.get(m);
356
+ const $ = W.get(m);
357
357
  if (!$) throw new Error(`Missing resolved temporal presentation for column "${m}"`);
358
358
  if (n != null && typeof n != "string")
359
359
  throw new Error(`Canonical temporal column "${m}" must contain a string or null`);
@@ -383,9 +383,9 @@ function De(t) {
383
383
  return { text: D ? K(n, D) : n.value, value: n };
384
384
  const M = st(e, m);
385
385
  if (M && (n instanceof Date || typeof n == "string" && le.test(n))) {
386
- const $ = n instanceof Date ? n.toISOString() : n, _ = typeof n == "string" && me.test(n), N = _ ? "UTC" : lt(M.timezone, e.timezone), X = _ ? "UTC" : M.sourceTimezone || "auto", Z = Nt($, N, X);
386
+ const $ = n instanceof Date ? n.toISOString() : n, _ = typeof n == "string" && me.test(n), N = _ ? "UTC" : lt(M.timezone, e.timezone), Y = _ ? "UTC" : M.sourceTimezone || "auto", Z = Nt($, N, Y);
387
387
  return {
388
- text: Q($, ct(M), N, X),
388
+ text: Q($, ct(M), N, Y),
389
389
  value: n,
390
390
  ...Z ? { wallClock: Z } : {}
391
391
  };
@@ -401,14 +401,14 @@ function De(t) {
401
401
  const S = vt(n[v.key], v.key, m, v);
402
402
  return O({ value: S.value, text: S.text, column: v.xlsx, wallClock: S.wallClock });
403
403
  })
404
- ), Y = (l == null ? void 0 : l.withHeader) !== !1 && e.includeHeaders;
405
- if (Y)
404
+ ), X = (l == null ? void 0 : l.withHeader) !== !1 && e.includeHeaders;
405
+ if (X)
406
406
  for (const n of E) {
407
407
  const m = k.get(n);
408
408
  m != null && m.pivotIdentity && et({ identity: m.pivotIdentity, columnKey: A(m) || n });
409
409
  }
410
410
  return {
411
- ...Y ? { header: z.map((n) => n.label) } : {},
411
+ ...X ? { header: z.map((n) => n.label) } : {},
412
412
  columns: z,
413
413
  rows: Ct,
414
414
  ...I.sqlChunkEvidence ? { rawTemporalClassification: I.sqlChunkEvidence } : {}
@@ -461,18 +461,18 @@ const be = /* @__PURE__ */ new Set([
461
461
  "fileFormat",
462
462
  "title"
463
463
  ]);
464
- function W(t) {
464
+ function q(t) {
465
465
  return t !== null && typeof t == "object" && !Array.isArray(t);
466
466
  }
467
467
  function mt(t, e) {
468
468
  if (t !== void 0) {
469
- if (!W(t))
469
+ if (!q(t))
470
470
  throw new Error(`formatting.${e} must be an object`);
471
471
  return t;
472
472
  }
473
473
  }
474
474
  function Le(t) {
475
- if (!W(t))
475
+ if (!q(t))
476
476
  throw new Error("formatting must be an object");
477
477
  const e = ["reportContext", "resolvedFormats"].find(
478
478
  (a) => Object.prototype.hasOwnProperty.call(t, a)
@@ -550,7 +550,7 @@ function Le(t) {
550
550
  };
551
551
  }
552
552
  function _e(t) {
553
- const e = t.formatOptions, r = (o) => W(o) ? o : void 0;
553
+ const e = t.formatOptions, r = (o) => q(o) ? o : void 0;
554
554
  return {
555
555
  scope: { dashboardId: t.dashboardId, cardId: t.cardId },
556
556
  useFormattedValues: e.useFormattedValues !== !1,