react-semaphor 0.1.586 → 0.1.588

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/analytics-protocol/index.js +341 -338
  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-DhP8wVtM.js → add-to-dashboard-C86FsM8D.js} +1 -1
  7. package/dist/chunks/{aggregate-measure-field-DsFXETpI.js → aggregate-measure-field-BrkXsSJp.js} +2 -2
  8. package/dist/chunks/{analytics-base-schemas-BaIQrEzX.js → analytics-base-schemas-8wz9vqn_.js} +173 -165
  9. package/dist/chunks/{assistant-chat-BU5gchFy.js → assistant-chat-BeM6joPc.js} +19 -18
  10. package/dist/chunks/{bookmark-impact-ZPSGncK6.js → bookmark-impact-B7pbMx2e.js} +2 -2
  11. package/dist/chunks/{bookmark-state-CL4WEpgB.js → bookmark-state-Bn7k3ttp.js} +5 -5
  12. package/dist/chunks/{card-filter-builder-HELJWA4D.js → card-filter-builder-DmodrhyI.js} +81 -81
  13. package/dist/chunks/{comparison-window-caption-CoART8BC.js → comparison-window-caption-fqijZdVd.js} +451 -395
  14. package/dist/chunks/{context-BTLBjQNh.js → context-CVXTFljo.js} +1 -1
  15. package/dist/chunks/{dashboard-BXP-ZxSY.js → dashboard-Tu5wT0Cw.js} +1 -1
  16. package/dist/chunks/{dashboard-briefing-launcher-BGj42whr.js → dashboard-briefing-launcher-D8jMxIJo.js} +249 -265
  17. package/dist/chunks/{dashboard-controls-zvbRp6D2.js → dashboard-controls-uzeAIEkM.js} +65 -65
  18. package/dist/chunks/{dashboard-json-CykexgqL.js → dashboard-json-i5rpFNCg.js} +5 -5
  19. package/dist/chunks/dates-BunbHJH0.js +115 -0
  20. package/dist/chunks/{edit-dashboard-visual-C82JNxbt.js → edit-dashboard-visual-BpEK_Sls.js} +2882 -2843
  21. package/dist/chunks/{filter-line-Cu2u1K36.js → filter-line-Dza3ee4w.js} +5 -5
  22. package/dist/chunks/{filter-reach-copy-ZERaFKsN.js → filter-reach-copy-D5AmDHda.js} +939 -937
  23. package/dist/chunks/{filter-value-text-xefXzZlf.js → filter-value-text-DQw4v3nC.js} +6 -6
  24. package/dist/chunks/{index-otMIColV.js → index-dGxJTaP1.js} +39 -39
  25. package/dist/chunks/{layout-grid-9nSS2SL-.js → layout-grid-XCYphks2.js} +1 -1
  26. package/dist/chunks/{list-filter-CfMPI6v4.js → list-filter-DGV3fqqv.js} +1 -1
  27. package/dist/chunks/{matrix-analytical-definition-DOVSFFuf.js → matrix-analytical-definition-SN0JUJVk.js} +3 -3
  28. package/dist/chunks/{matrix-member-presentation-BKDyxJho.js → matrix-member-presentation-DVBJR0MA.js} +1 -1
  29. package/dist/chunks/{matrix-operation-contract-BM5TveR3.js → matrix-operation-contract-JSmproo9.js} +15 -15
  30. package/dist/chunks/{metric-comparison-ZmurmEIs.js → metric-comparison-xE_J6hkg.js} +2 -2
  31. package/dist/chunks/{paintbrush-LzAje2ff.js → paintbrush-DEEZXhDj.js} +1 -1
  32. package/dist/chunks/{palette-DicJG0TC.js → palette-Bgy0H-Nt.js} +1 -1
  33. package/dist/chunks/{pivot-header-presentation-CdeTU96P.js → pivot-header-presentation-D-DfPAjb.js} +1 -1
  34. package/dist/chunks/{pivot-result-contract-expectations-Bx_BCu-7.js → pivot-result-contract-expectations-DbBahmgc.js} +545 -536
  35. package/dist/chunks/{pivot-result-identity-Bvs6Uq3v.js → pivot-result-identity-CUsMt_4r.js} +1 -1
  36. package/dist/chunks/{raw-temporal-value-DH-feMc2.js → raw-temporal-value-BnGCWJAL.js} +1 -1
  37. package/dist/chunks/{report-preferences-dialog-B-CoyS1x.js → report-preferences-dialog-CTM0xfd0.js} +14 -14
  38. package/dist/chunks/{report-runtime-context-NlOXwyRB.js → report-runtime-context-CrOgmuxO.js} +2 -2
  39. package/dist/chunks/{resolve-dashboard-input-context-BTTdKXH0.js → resolve-dashboard-input-context-DFBIngUZ.js} +5621 -5476
  40. package/dist/chunks/{save-0wu1Z1U7.js → save-xnRCvMeA.js} +1 -1
  41. package/dist/chunks/{saved-dashboard-context-B-rosN4W.js → saved-dashboard-context-DKMTP9ib.js} +17 -17
  42. package/dist/chunks/selection-filter-compiler-DkIjp1yH.js +131 -0
  43. package/dist/chunks/{semaphor-ready-indicator-Cy1n_04D.js → semaphor-ready-indicator-zU9reNmX.js} +47183 -46779
  44. package/dist/chunks/{shelf-drop-preview-context-Bmz54WYm.js → shelf-drop-preview-context-R9sf4oDX.js} +6 -6
  45. package/dist/chunks/{stored-dashboard-rDJ8sw6J.js → stored-dashboard-CksluF2S.js} +1539 -1404
  46. package/dist/chunks/{style-sheet-parts-_dGSFzDi.js → style-sheet-parts-D7NbsFL0.js} +3 -3
  47. package/dist/chunks/{table-export-sheet-Dmtqi5NV.js → table-export-sheet-ClSgERQC.js} +1 -1
  48. package/dist/chunks/{token-types-DEe_FP4l.js → token-types-DTocOcwt.js} +1 -1
  49. package/dist/chunks/{upload-CtyOkU_B.js → upload-BXGgYS4g.js} +1 -1
  50. package/dist/chunks/{validators-CJ8Jh0E8.js → validators-CrYXNnNE.js} +51 -49
  51. package/dist/chunks/{variable-draft-DvngkRMl.js → variable-draft-rbtGPvmX.js} +16 -14
  52. package/dist/chunks/visual-choice-DDfHfHvY.js +172 -0
  53. package/dist/dashboard/index.js +2 -2
  54. package/dist/dashboard-authoring/index.js +1501 -1460
  55. package/dist/format-utils/index.js +162 -158
  56. package/dist/index.js +21 -21
  57. package/dist/report-runtime-context/index.js +2 -2
  58. package/dist/style.css +1 -1
  59. package/dist/surfboard/index.js +2 -2
  60. package/dist/types/index.js +5 -5
  61. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +39 -2
  62. package/dist/types/lib/dashboard-view-state/date-zoom.d.ts +65 -0
  63. package/dist/types/lib/dashboard-view-state/grain-pick.d.ts +38 -0
  64. package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
  65. package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +6 -2
  66. package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
  67. package/dist/types/lib/interactions/get-click-context-from-table.d.ts +2 -2
  68. package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -1
  69. package/dist/types/lib/query-context/build-card-query-context.d.ts +15 -1
  70. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +3 -0
  71. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +14 -1
  72. package/dist/types/lib/stores/dashboard-store.d.ts +7 -1
  73. package/dist/types/lib/types/explorer-types.d.ts +24 -4
  74. package/dist/types/lib/utils/card-config-utils.d.ts +1 -1
  75. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +32 -0
  76. package/dist/types/shared/analytics-protocol/contracts.d.ts +30 -0
  77. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +13 -0
  78. package/dist/types/shared/dashboard-authoring/automatic-grain.d.ts +77 -0
  79. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +10 -3
  80. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  81. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +5 -2
  82. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +5 -2
  83. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +2 -0
  84. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +13 -8
  85. package/dist/types/shared/dashboard-authoring/control-value-resolution.d.ts +24 -0
  86. package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
  87. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +12 -12
  88. package/dist/types/shared/dashboard-authoring/kpi-trend-rule.d.ts +51 -0
  89. package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +1 -0
  90. package/dist/types/shared/format-utils/index.d.ts +1 -0
  91. package/dist/types/shared/format-utils/partial-period.d.ts +40 -0
  92. package/dist/types/shared/format-utils/temporal-bucket.d.ts +11 -0
  93. package/dist/types/shared/usage-events/details.d.ts +2 -2
  94. package/dist/usage-events/index.js +1 -1
  95. package/package.json +1 -1
  96. package/dist/chunks/dates-CaqZtq01.js +0 -92
  97. package/dist/chunks/selection-filter-compiler-BReJy-uv.js +0 -92
  98. package/dist/chunks/visual-choice-BBPizkRo.js +0 -206
@@ -1,4 +1,4 @@
1
- import { c as a } from "./style-sheet-parts-_dGSFzDi.js";
1
+ import { c as a } from "./style-sheet-parts-D7NbsFL0.js";
2
2
  /**
3
3
  * @license lucide-react v0.453.0 - ISC
4
4
  *
@@ -1,14 +1,14 @@
1
1
  var Z = Object.defineProperty;
2
2
  var Q = (e, t, a) => t in e ? Z(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
3
  var F = (e, t, a) => Q(e, typeof t != "symbol" ? t + "" : t, a);
4
- import { A as S, D as U, F as K, G as W } from "./bookmark-state-CL4WEpgB.js";
5
- import { s as X, i as Y, n as ee, f as te, j as ae, l as re, k as ne, m as se, o as oe, p as j, q as ie, t as de, u as le } from "./resolve-dashboard-input-context-BTTdKXH0.js";
6
- import { c as ce, e as L, d as ue, g as me, p as q, j as fe, k as he, r as _, m as O, n as pe, o as be, q as ge } from "./stored-dashboard-rDJ8sw6J.js";
7
- import { f as g, A as P, c as Ce, d as Ie, e as A } from "./context-BTLBjQNh.js";
8
- import { a as ye, T as ve, P as xe, o as I, d as B, b as D } from "./filter-value-text-xefXzZlf.js";
9
- import { r as Ve, a7 as Se } from "./validators-CJ8Jh0E8.js";
10
- import { b as $e } from "./metric-comparison-ZmurmEIs.js";
11
- import { i as ke } from "./matrix-analytical-definition-DOVSFFuf.js";
4
+ import { A as S, D as U, F as K, G as W } from "./bookmark-state-Bn7k3ttp.js";
5
+ import { s as X, i as Y, n as ee, f as te, j as ae, l as re, k as ne, m as se, o as oe, p as j, q as ie, t as de, u as le } from "./resolve-dashboard-input-context-DFBIngUZ.js";
6
+ import { c as ce, e as L, d as ue, g as me, p as q, j as fe, k as he, r as _, m as O, n as pe, o as be, q as ge } from "./stored-dashboard-CksluF2S.js";
7
+ import { f as g, A as P, c as Ce, d as Ie, e as M } from "./context-CVXTFljo.js";
8
+ import { a as ye, T as ve, P as xe, o as I, d as B, b as D } from "./filter-value-text-DQw4v3nC.js";
9
+ import { r as Ve, a7 as Se } from "./validators-CrYXNnNE.js";
10
+ import { b as $e } from "./metric-comparison-xE_J6hkg.js";
11
+ import { i as ke } from "./matrix-analytical-definition-SN0JUJVk.js";
12
12
  function qe(e) {
13
13
  const t = e.qualifiedFieldName || e.name;
14
14
  return e.label && e.label !== t ? `${e.label} (field ${t})` : t;
@@ -60,15 +60,15 @@ function H(e) {
60
60
  function Fe(e) {
61
61
  return (e == null ? void 0 : e.kind) === "field_date" ? `the ${JSON.stringify(e.label)} filter` : "the dashboard date";
62
62
  }
63
- function Ae(e, t) {
63
+ function Me(e, t) {
64
64
  const a = t.source === "explicit" ? "set on the measure" : `from the dashboard date comparison on ${Fe(t.owner)}`;
65
65
  return `${e} is compared with ${H(t.spec)} (${a})`;
66
66
  }
67
67
  function k(e) {
68
68
  const t = X(e) ?? "undefined";
69
- return `${M(t, 2654435769).toString(16)}${M(t, 2246822507).toString(16)}`;
69
+ return `${A(t, 2654435769).toString(16)}${A(t, 2246822507).toString(16)}`;
70
70
  }
71
- function M(e, t) {
71
+ function A(e, t) {
72
72
  let a = 3735928559 ^ t, r = 1103547991 ^ t;
73
73
  for (let n = 0; n < e.length; n++) {
74
74
  const s = e.charCodeAt(n);
@@ -77,7 +77,7 @@ function M(e, t) {
77
77
  return a = Math.imul(a ^ a >>> 16, 2246822507) ^ Math.imul(r ^ r >>> 13, 3266489909), r = Math.imul(r ^ r >>> 16, 2246822507) ^ Math.imul(a ^ a >>> 13, 3266489909), 4294967296 * (2097151 & r) + (a >>> 0);
78
78
  }
79
79
  const h = P;
80
- function Me(e, t, a) {
80
+ function Ae(e, t, a) {
81
81
  var y;
82
82
  const r = t !== "pending" && (t == null ? void 0 : t.status) === "ready" ? t : void 0, n = Te(e, t);
83
83
  if (n) {
@@ -145,7 +145,7 @@ function je(e) {
145
145
  config: e.queryContext.finalConfig
146
146
  });
147
147
  return Ee.flatMap(([a, r]) => t[r].map((n) => {
148
- const s = n.aggregate, l = n.granularity;
148
+ const s = n.aggregate, l = n.grainMode ?? n.granularity;
149
149
  return {
150
150
  role: a,
151
151
  label: g(n.label || n.name, h.labelChars),
@@ -162,7 +162,7 @@ function Le(e) {
162
162
  metricComparison: a.comparison,
163
163
  globalDateComparison: t.globalDateComparison
164
164
  });
165
- return r ? [g(Ae(Oe(a.label || a.name), r), h.textChars)] : [];
165
+ return r ? [g(Me(Oe(a.label || a.name), r), h.textChars)] : [];
166
166
  });
167
167
  }
168
168
  function Oe(e) {
@@ -262,7 +262,7 @@ function Ge(e) {
262
262
  var f;
263
263
  if (e.surface === "none")
264
264
  return R({
265
- version: A,
265
+ version: M,
266
266
  surface: "none",
267
267
  otherSheets: [],
268
268
  activeInputs: [],
@@ -284,7 +284,7 @@ function Ge(e) {
284
284
  cards: I(m.length, C.summaryCards)
285
285
  }, b = Object.fromEntries(Object.entries(d).filter(([, p]) => p > 0));
286
286
  return R({
287
- version: A,
287
+ version: M,
288
288
  surface: e.editing ? "editor" : "dashboard",
289
289
  dashboard: {
290
290
  id: t.id,
@@ -302,7 +302,7 @@ function Ge(e) {
302
302
  });
303
303
  }
304
304
  function Ze(e, t, a) {
305
- return { ...J(e), ...Me(e, t, { calendar: a }) };
305
+ return { ...J(e), ...Ae(e, t, { calendar: a }) };
306
306
  }
307
307
  function R(e) {
308
308
  const t = Ce(e);
@@ -0,0 +1,131 @@
1
+ import { i as d } from "./matrix-analytical-definition-SN0JUJVk.js";
2
+ function m(e, t) {
3
+ var a, l;
4
+ const n = e.name.split(".").pop(), r = (a = e.fieldMeta) == null ? void 0 : a.qualifiedFieldName, i = !!(t.qualifiedFieldName && (r || e.name) === t.qualifiedFieldName), o = !((l = t.qualifiedFieldName) != null && l.includes(".")) && n === t.name;
5
+ return i || o;
6
+ }
7
+ function c(e) {
8
+ var t;
9
+ return !e.negate && (e.logicalOperator === "AND" || e.conditions.length + (((t = e.groups) == null ? void 0 : t.length) ?? 0) <= 1);
10
+ }
11
+ function F(e, t, n) {
12
+ const r = t.filter((i) => !!i);
13
+ return e ? r.length ? Array.isArray(e.conditions) && c(e) ? { ...e, logicalOperator: "AND", groups: [...e.groups ?? [], ...r] } : { id: n, logicalOperator: "AND", negate: !1, conditions: [], groups: [e, ...r] } : e : r.length ? { id: n, logicalOperator: "AND", negate: !1, conditions: [], groups: r } : void 0;
14
+ }
15
+ function g(e) {
16
+ return !e || !Array.isArray(e.conditions) ? [] : c(e) ? [
17
+ ...e.conditions,
18
+ ...(e.groups ?? []).flatMap((t) => g(t))
19
+ ] : [];
20
+ }
21
+ function A(e, t) {
22
+ const n = e.filters;
23
+ if (!n || !Array.isArray(n.conditions) || !c(n) || !t.length)
24
+ return e;
25
+ const r = (o, a) => {
26
+ var p;
27
+ if (d(o.filterId)) return !1;
28
+ const l = { name: a.field.name, qualifiedFieldName: a.field.qualifiedFieldName }, s = !((p = o.fieldMeta) != null && p.qualifiedFieldName);
29
+ return m(o, l) || s && o.name === l.name;
30
+ }, i = n.conditions.filter(
31
+ (o) => !t.some((a) => r(a, o))
32
+ );
33
+ return i.length === n.conditions.length ? e : { ...e, filters: { ...n, conditions: i } };
34
+ }
35
+ function O(e, t) {
36
+ return {
37
+ id: t,
38
+ field: e.field,
39
+ operator: e.operator,
40
+ value: e.value,
41
+ label: e.label,
42
+ temporalBucket: e.temporalBucket,
43
+ ...e.rawTemporal ? { rawTemporal: e.rawTemporal } : {}
44
+ };
45
+ }
46
+ function u(e) {
47
+ var t;
48
+ return JSON.stringify([
49
+ ((t = e.field) == null ? void 0 : t.id) ?? "",
50
+ e.operator,
51
+ e.value ?? null,
52
+ e.temporalBucket ?? null,
53
+ e.rawTemporal ?? null
54
+ ]);
55
+ }
56
+ function N(e) {
57
+ return JSON.stringify(e.map(u).sort());
58
+ }
59
+ function f(e) {
60
+ const t = /* @__PURE__ */ new Map();
61
+ for (const n of e)
62
+ for (const r of n.tuples) {
63
+ const i = r.conditions.filter(
64
+ (l) => {
65
+ var s;
66
+ return (s = l.field) == null ? void 0 : s.id;
67
+ }
68
+ );
69
+ if (i.length === 0) continue;
70
+ let o = t.get(n.sourceCardId);
71
+ o || (o = /* @__PURE__ */ new Map(), t.set(n.sourceCardId, o));
72
+ const a = [...i].sort(
73
+ (l, s) => u(l).localeCompare(u(s))
74
+ );
75
+ o.set(N(a), a);
76
+ }
77
+ return [...t.entries()].sort(([n], [r]) => n.localeCompare(r)).map(([n, r]) => ({
78
+ sourceCardId: n,
79
+ tuples: [...r.entries()].sort(([i], [o]) => i.localeCompare(o)).map(([, i]) => ({ conditions: i }))
80
+ }));
81
+ }
82
+ function w(e) {
83
+ const t = f(e);
84
+ if (t.length !== 0)
85
+ return {
86
+ id: "selection",
87
+ logicalOperator: "AND",
88
+ negate: !1,
89
+ conditions: [],
90
+ groups: t.map((n) => {
91
+ const r = `selection:${n.sourceCardId}`;
92
+ return {
93
+ id: r,
94
+ logicalOperator: "OR",
95
+ negate: !1,
96
+ conditions: [],
97
+ groups: n.tuples.map((i, o) => {
98
+ const a = `${r}:${o}`;
99
+ return {
100
+ id: a,
101
+ logicalOperator: "AND",
102
+ negate: !1,
103
+ conditions: i.conditions.map((l, s) => ({
104
+ ...l,
105
+ id: `${a}:${s}`
106
+ })),
107
+ groups: []
108
+ };
109
+ })
110
+ };
111
+ })
112
+ };
113
+ }
114
+ function h(e) {
115
+ return JSON.stringify(
116
+ f(e).map((t) => [
117
+ t.sourceCardId,
118
+ t.tuples.map((n) => n.conditions.map(u))
119
+ ])
120
+ );
121
+ }
122
+ export {
123
+ w as c,
124
+ m as f,
125
+ c as i,
126
+ F as n,
127
+ h as s,
128
+ O as t,
129
+ g as u,
130
+ A as w
131
+ };