react-semaphor 0.1.583 → 0.1.585

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 (95) hide show
  1. package/dist/analytics-protocol/index.js +470 -428
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +7 -7
  4. package/dist/briefings/index.js +4 -4
  5. package/dist/chunks/aggregate-measure-field-DsFXETpI.js +22 -0
  6. package/dist/chunks/{assistant-chat-D3fm5qod.js → assistant-chat-BdbLmAnK.js} +12 -12
  7. package/dist/chunks/{bookmark-impact-Dpxl46Wd.js → bookmark-impact-BhT3k379.js} +2 -2
  8. package/dist/chunks/{bookmark-state-BEl_G9vr.js → bookmark-state-CL4WEpgB.js} +22 -22
  9. package/dist/chunks/{card-filter-builder-IxkFVxy2.js → card-filter-builder-CEcKF6Fw.js} +124 -124
  10. package/dist/chunks/comparison-window-caption-CoART8BC.js +1254 -0
  11. package/dist/chunks/{dashboard-BMqG98fc.js → dashboard-MPku_x1M.js} +1 -1
  12. package/dist/chunks/{dashboard-briefing-launcher-D45YfCkm.js → dashboard-briefing-launcher-CkFNlkr1.js} +13 -13
  13. package/dist/chunks/{dashboard-controls-DOvZRfof.js → dashboard-controls-Clt4ovXS.js} +84 -84
  14. package/dist/chunks/{dashboard-json-B_4TqF_o.js → dashboard-json-DSmXazIg.js} +4 -4
  15. package/dist/chunks/{dates-44_rcNj2.js → dates-CYZW9owO.js} +8 -8
  16. package/dist/chunks/{edit-dashboard-visual-BBPKJWSe.js → edit-dashboard-visual-Dn2ECRbX.js} +2752 -2687
  17. package/dist/chunks/filter-line-Cu2u1K36.js +131 -0
  18. package/dist/chunks/{filter-reach-copy-DWPq4Swi.js → filter-reach-copy-CmJpPa4G.js} +1745 -1326
  19. package/dist/chunks/{filter-value-text-DXGYypEd.js → filter-value-text-xefXzZlf.js} +6 -6
  20. package/dist/chunks/{index-DPRzcFp0.js → index-0WYn6RMz.js} +37 -37
  21. package/dist/chunks/{layout-grid-8rR-LPTk.js → layout-grid-9nSS2SL-.js} +1 -1
  22. package/dist/chunks/{list-filter-C1-uTgjR.js → list-filter-CfMPI6v4.js} +1 -1
  23. package/dist/chunks/{matrix-analytical-definition-D_HgptqZ.js → matrix-analytical-definition-QjBgUYhP.js} +382 -544
  24. package/dist/chunks/{matrix-member-presentation-DRa-9e6Q.js → matrix-member-presentation-BKDyxJho.js} +1 -1
  25. package/dist/chunks/{matrix-operation-contract-DCVinw1o.js → matrix-operation-contract-BM5TveR3.js} +153 -147
  26. package/dist/chunks/{metric-comparison-n9NsIa-2.js → metric-comparison-ZmurmEIs.js} +3 -3
  27. package/dist/chunks/{paintbrush-aR17Z3C9.js → paintbrush-LzAje2ff.js} +1 -1
  28. package/dist/chunks/{palette-a5FCZKFI.js → palette-DicJG0TC.js} +1 -1
  29. package/dist/chunks/{pivot-header-presentation-MvvlxtIB.js → pivot-header-presentation-CdeTU96P.js} +1 -1
  30. package/dist/chunks/{pivot-result-contract-expectations-8tuNjRvG.js → pivot-result-contract-expectations-Bx_BCu-7.js} +1029 -1010
  31. package/dist/chunks/{pivot-result-identity-B89X5xjb.js → pivot-result-identity-Bvs6Uq3v.js} +1 -1
  32. package/dist/chunks/raw-temporal-value-DH-feMc2.js +322 -0
  33. package/dist/chunks/{report-preferences-dialog-B8PhISua.js → report-preferences-dialog-BRaeufEi.js} +63 -62
  34. package/dist/chunks/{report-runtime-context-BhPzLTbS.js → report-runtime-context-NlOXwyRB.js} +1 -1
  35. package/dist/chunks/{resolve-dashboard-input-context-BfT8y5xL.js → resolve-dashboard-input-context-Cn9jumxl.js} +4924 -4823
  36. package/dist/chunks/{save-D985VvYp.js → save-0wu1Z1U7.js} +1 -1
  37. package/dist/chunks/{saved-dashboard-context-DH91-2B9.js → saved-dashboard-context-CfqkUMzR.js} +6 -6
  38. package/dist/chunks/selection-filter-compiler-BReJy-uv.js +92 -0
  39. package/dist/chunks/{semaphor-ready-indicator-Cg_Z2IDc.js → semaphor-ready-indicator-D6WjdTGl.js} +48377 -47074
  40. package/dist/chunks/{shelf-drop-preview-context-C7-BgcP4.js → shelf-drop-preview-context-Bbbrr9u4.js} +5 -5
  41. package/dist/chunks/{stored-dashboard-BpyCiE49.js → stored-dashboard-sPkTjxYf.js} +210 -221
  42. package/dist/chunks/{style-sheet-parts-C7qGZuH1.js → style-sheet-parts-_dGSFzDi.js} +2 -2
  43. package/dist/chunks/{table-export-sheet-wBkk17aa.js → table-export-sheet-Dmtqi5NV.js} +1 -1
  44. package/dist/chunks/{token-types-iKMplaBL.js → token-types-DEe_FP4l.js} +1 -1
  45. package/dist/chunks/{upload-CiGNKJ_0.js → upload-CtyOkU_B.js} +1 -1
  46. package/dist/chunks/{validators-B8fpdinG.js → validators-CJ8Jh0E8.js} +2 -2
  47. package/dist/chunks/{variable-draft-D8GFhAkm.js → variable-draft-D1RotIEG.js} +4 -4
  48. package/dist/dashboard/index.js +2 -2
  49. package/dist/dashboard-authoring/index.js +670 -647
  50. package/dist/format-utils/index.js +218 -215
  51. package/dist/index.js +234 -231
  52. package/dist/report-runtime-context/index.js +1 -1
  53. package/dist/style.css +1 -1
  54. package/dist/surfboard/index.js +2 -2
  55. package/dist/types/components/visual/data-table/types/data-table.d.ts +3 -0
  56. package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +24 -3
  57. package/dist/types/index.js +5 -5
  58. package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
  59. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +9 -0
  60. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +8 -3
  61. package/dist/types/lib/query-context/compile-selection-filters.d.ts +1 -5
  62. package/dist/types/lib/see-records/click.d.ts +79 -0
  63. package/dist/types/lib/see-records/see-records-offer.d.ts +25 -0
  64. package/dist/types/lib/see-records/use-see-records-offer.d.ts +16 -0
  65. package/dist/types/lib/types/common-types.d.ts +6 -0
  66. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +7 -0
  67. package/dist/types/shared/analytics-protocol/aggregate-measure-field.d.ts +13 -0
  68. package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
  69. package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +3 -0
  70. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +6 -0
  71. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  72. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
  73. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -0
  74. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
  75. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
  76. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  77. package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
  78. package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +191 -0
  79. package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +14 -0
  80. package/dist/types/shared/dashboard-authoring/see-records/availability.d.ts +30 -0
  81. package/dist/types/shared/dashboard-authoring/see-records/click.d.ts +37 -0
  82. package/dist/types/shared/dashboard-authoring/see-records/index.d.ts +12 -0
  83. package/dist/types/shared/dashboard-authoring/see-records/limits.d.ts +18 -0
  84. package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +49 -0
  85. package/dist/types/shared/dashboard-authoring/see-records/request.d.ts +28 -0
  86. package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +94 -0
  87. package/dist/types/shared/format-utils/semantic-format.d.ts +0 -1
  88. package/dist/types/shared/format-utils/temporal-bucket.d.ts +20 -0
  89. package/dist/types/shared/temporal/calendar-periods.d.ts +15 -0
  90. package/dist/types/shared/temporal/raw-temporal-equality.d.ts +14 -0
  91. package/dist/types/shared/usage-events/envelope.d.ts +4 -4
  92. package/package.json +1 -1
  93. package/dist/chunks/comparison-window-caption-sRFtnX1q.js +0 -1371
  94. package/dist/chunks/raw-temporal-value-DdT0s47W.js +0 -159
  95. package/dist/chunks/selection-filter-compiler-CUDRnUxc.js +0 -80
@@ -1,7 +1,7 @@
1
1
  var y = Object.defineProperty;
2
2
  var c = (i, t, e) => t in i ? y(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
3
  var a = (i, t, e) => c(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { v as u } from "./metric-comparison-n9NsIa-2.js";
4
+ import { v as u } from "./metric-comparison-ZmurmEIs.js";
5
5
  class l extends Error {
6
6
  constructor(e) {
7
7
  super(`missing_pivot_member_identity: ${e}`);
@@ -0,0 +1,322 @@
1
+ var v = Object.defineProperty;
2
+ var k = (t, e, n) => e in t ? v(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var C = (t, e, n) => k(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { R as O } from "./analytics-base-schemas-BaIQrEzX.js";
5
+ const D = /* @__PURE__ */ new Map();
6
+ function h(t, e) {
7
+ let n = D.get(e);
8
+ n || (n = new Intl.DateTimeFormat("en-CA", {
9
+ calendar: "gregory",
10
+ numberingSystem: "latn",
11
+ timeZone: e,
12
+ year: "numeric",
13
+ month: "2-digit",
14
+ day: "2-digit",
15
+ hour: "2-digit",
16
+ minute: "2-digit",
17
+ second: "2-digit",
18
+ hourCycle: "h23"
19
+ }), D.set(e, n));
20
+ const r = n.formatToParts(t), a = (o) => {
21
+ var s;
22
+ return Number((s = r.find((i) => i.type === o)) == null ? void 0 : s.value);
23
+ };
24
+ return {
25
+ year: a("year"),
26
+ month: a("month"),
27
+ day: a("day"),
28
+ hour: a("hour"),
29
+ minute: a("minute"),
30
+ second: a("second")
31
+ };
32
+ }
33
+ function u(t) {
34
+ const e = /* @__PURE__ */ new Date(0);
35
+ return e.setUTCFullYear(t.year, t.month - 1, t.day), e.setUTCHours(t.hour, t.minute, t.second, t.millisecond ?? 0), e.getTime();
36
+ }
37
+ function l(t, e) {
38
+ const n = t - (t % 1e3 + 1e3) % 1e3;
39
+ return u(h(new Date(n), e)) - n;
40
+ }
41
+ const T = 864e5;
42
+ function U(t, e) {
43
+ const n = I(t, e);
44
+ if (n.length) return n[0];
45
+ const r = u(t);
46
+ return new Date(r - l(r - T, e));
47
+ }
48
+ function I(t, e) {
49
+ const n = u(t), r = l(n - T, e), a = l(n + T, e);
50
+ return [.../* @__PURE__ */ new Set([r, a])].map((o) => n - o).filter((o) => l(o, e) === n - o).sort((o, s) => o - s).map((o) => new Date(o));
51
+ }
52
+ const p = 864e5, b = {
53
+ second: 1e3,
54
+ minute: 6e4,
55
+ hour: 36e5
56
+ };
57
+ function w(t, e) {
58
+ return {
59
+ ...h(t, e),
60
+ millisecond: (t.getTime() % 1e3 + 1e3) % 1e3
61
+ };
62
+ }
63
+ function d(t, e) {
64
+ return U(t, e);
65
+ }
66
+ function y(t) {
67
+ const e = new Date(t);
68
+ return {
69
+ year: e.getUTCFullYear(),
70
+ month: e.getUTCMonth() + 1,
71
+ day: e.getUTCDate(),
72
+ hour: e.getUTCHours(),
73
+ minute: e.getUTCMinutes(),
74
+ second: e.getUTCSeconds(),
75
+ millisecond: e.getUTCMilliseconds()
76
+ };
77
+ }
78
+ function A(t, e) {
79
+ const n = /* @__PURE__ */ new Date(0);
80
+ return n.setUTCFullYear(t, e, 0), n.getUTCDate();
81
+ }
82
+ function f(t, e) {
83
+ const n = t.year * 12 + (t.month - 1) + e, r = Math.floor(n / 12), a = n - r * 12 + 1;
84
+ return { ...t, year: r, month: a, day: Math.min(t.day, A(r, a)) };
85
+ }
86
+ function m(t, e, n) {
87
+ if (e === 0) return t;
88
+ switch (n) {
89
+ case "second":
90
+ case "minute":
91
+ case "hour":
92
+ return y(
93
+ u(t) + e * b[n]
94
+ );
95
+ case "day":
96
+ return y(u(t) + e * p);
97
+ case "week":
98
+ return y(u(t) + e * 7 * p);
99
+ case "month":
100
+ return f(t, e);
101
+ case "quarter":
102
+ return f(t, e * 3);
103
+ case "year":
104
+ return f(t, e * 12);
105
+ }
106
+ }
107
+ function W(t) {
108
+ return new Date(
109
+ u({ ...t, hour: 0, minute: 0, second: 0 })
110
+ ).getUTCDay();
111
+ }
112
+ function _(t) {
113
+ var n;
114
+ const e = (n = t.fiscalCalendar) == null ? void 0 : n.yearStartMonth;
115
+ return e && e >= 1 && e <= 12 ? e : 1;
116
+ }
117
+ function L(t, e, n) {
118
+ const r = { ...t, hour: 0, minute: 0, second: 0, millisecond: 0 };
119
+ switch (e) {
120
+ case "day":
121
+ return r;
122
+ case "week":
123
+ return m(
124
+ r,
125
+ -((W(t) - n.weekStart + 7) % 7),
126
+ "day"
127
+ );
128
+ case "month":
129
+ return { ...r, day: 1 };
130
+ case "quarter": {
131
+ const a = (t.month - _(n) + 12) % 12;
132
+ return f({ ...r, day: 1 }, -(a % 3));
133
+ }
134
+ case "year": {
135
+ const a = _(n);
136
+ return {
137
+ ...r,
138
+ year: t.month >= a ? t.year : t.year - 1,
139
+ month: a,
140
+ day: 1
141
+ };
142
+ }
143
+ }
144
+ }
145
+ function R(t, e, n, r = 0) {
146
+ const a = b[e];
147
+ if (a !== void 0) {
148
+ const i = w(t, n.tz), S = i.millisecond + (e === "second" ? 0 : i.second * 1e3) + (e === "hour" ? i.minute * 6e4 : 0), g = t.getTime() - S + r * a;
149
+ return { start: new Date(g), endExclusive: new Date(g + a) };
150
+ }
151
+ const o = e, s = m(
152
+ L(w(t, n.tz), o, n),
153
+ r,
154
+ e
155
+ );
156
+ return {
157
+ start: d(s, n.tz),
158
+ endExclusive: d(m(s, 1, e), n.tz)
159
+ };
160
+ }
161
+ function B(t, e, n) {
162
+ return R(t, e, n).start;
163
+ }
164
+ function H(t, e, n) {
165
+ return new Date(R(t, e, n).endExclusive.getTime() - 1);
166
+ }
167
+ function V(t, e, n, r) {
168
+ return e === 0 ? t : d(
169
+ m(w(t, r.tz), e, n),
170
+ r.tz
171
+ );
172
+ }
173
+ function G(t, e, n) {
174
+ const r = (a) => {
175
+ const { year: o, month: s, day: i } = h(a, n);
176
+ return u({ year: o, month: s, day: i, hour: 0, minute: 0, second: 0 });
177
+ };
178
+ return Math.round((r(e) - r(t)) / p);
179
+ }
180
+ const P = /^(\d{4})-(\d{2})-(\d{2})$/;
181
+ function J(t, e) {
182
+ const { year: n, month: r, day: a } = h(t, e);
183
+ return `${String(n).padStart(4, "0")}-${String(r).padStart(2, "0")}-${String(a).padStart(2, "0")}`;
184
+ }
185
+ function K(t) {
186
+ const e = P.exec(t);
187
+ if (!e) return null;
188
+ const n = Number(e[1]), r = Number(e[2]), a = Number(e[3]);
189
+ return r < 1 || r > 12 || a < 1 || a > A(n, r) ? null : { year: n, month: r, day: a };
190
+ }
191
+ function Q(t, e) {
192
+ const n = K(t);
193
+ if (!n) return null;
194
+ const r = { ...n, hour: 0, minute: 0, second: 0, millisecond: 0 };
195
+ return {
196
+ start: d(r, e),
197
+ endExclusive: d(m(r, 1, "day"), e)
198
+ };
199
+ }
200
+ class c extends Error {
201
+ constructor(n) {
202
+ super(n);
203
+ C(this, "code");
204
+ this.name = "RawTemporalMetadataContractError", this.code = O.invalidMetadata;
205
+ }
206
+ }
207
+ function $(t) {
208
+ if (t === null || typeof t != "object" || Array.isArray(t))
209
+ return !1;
210
+ const e = Object.getPrototypeOf(t);
211
+ return e === null || e === Object.prototype;
212
+ }
213
+ function x(t) {
214
+ if (!$(t))
215
+ throw new c(
216
+ "Raw temporal metadata must be an object."
217
+ );
218
+ const e = Object.keys(t);
219
+ if (e.length !== 2 || !e.includes("kind") || !e.includes("valueKind"))
220
+ throw new c(
221
+ "Raw temporal metadata must contain only kind and valueKind."
222
+ );
223
+ if (t.kind !== "raw_temporal")
224
+ throw new c(
225
+ "Raw temporal metadata kind must be raw_temporal."
226
+ );
227
+ if (t.valueKind !== "date" && t.valueKind !== "wall_datetime" && t.valueKind !== "instant")
228
+ throw new c(
229
+ "Raw temporal valueKind must be date, wall_datetime, or instant."
230
+ );
231
+ return {
232
+ kind: "raw_temporal",
233
+ valueKind: t.valueKind
234
+ };
235
+ }
236
+ function X(t, e) {
237
+ if (!t.rawTemporal) {
238
+ if (e.metadataRequired)
239
+ throw new c(
240
+ "Activated raw temporal result is missing metadata."
241
+ );
242
+ return;
243
+ }
244
+ if (t.temporalBucket)
245
+ throw new c(
246
+ "A result column cannot carry both raw and grouped temporal metadata."
247
+ );
248
+ const n = x(t.rawTemporal), r = n.valueKind === "date" ? "date" : "datetime";
249
+ if (t.dataType !== r)
250
+ throw new c(
251
+ `${n.valueKind} raw temporal values require dataType ${r}.`
252
+ );
253
+ return n;
254
+ }
255
+ const M = /^(\d{4})-(\d{2})-(\d{2})$/, N = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?$/, E = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}:\d{2})$/;
256
+ function tt(t) {
257
+ if (M.test(t)) return "date";
258
+ if (E.test(t)) return "instant";
259
+ if (N.test(t)) return "wall_datetime";
260
+ }
261
+ function j(t) {
262
+ return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
263
+ }
264
+ function F(t, e) {
265
+ return e === 2 ? j(t) ? 29 : 28 : [4, 6, 9, 11].includes(e) ? 30 : 31;
266
+ }
267
+ function Y(t) {
268
+ return t.year >= 1 && t.year <= 9999 && t.month >= 1 && t.month <= 12 && t.day >= 1 && t.day <= F(t.year, t.month) && t.hour >= 0 && t.hour <= 23 && t.minute >= 0 && t.minute <= 59 && t.second >= 0 && t.second <= 59;
269
+ }
270
+ function q(t) {
271
+ return {
272
+ year: Number(t[1]),
273
+ month: Number(t[2]),
274
+ day: Number(t[3]),
275
+ hour: Number(t[4] ?? 0),
276
+ minute: Number(t[5] ?? 0),
277
+ second: Number(t[6] ?? 0),
278
+ fraction: t[7] ?? ""
279
+ };
280
+ }
281
+ function et(t, e) {
282
+ const n = e === "date" ? t.match(M) : e === "wall_datetime" ? t.match(N) : t.match(E);
283
+ if (!n) return { status: "invalid_shape" };
284
+ const r = q(n);
285
+ if (!Y(r)) return { status: "out_of_range" };
286
+ if (e === "instant") {
287
+ const a = n[8];
288
+ if (a && a !== "Z") {
289
+ const [s, i] = a.slice(1).split(":").map(Number);
290
+ if (s > 23 || i > 59) return { status: "out_of_range" };
291
+ }
292
+ const o = new Date(t.replace(" ", "T"));
293
+ return Number.isNaN(o.getTime()) ? { status: "out_of_range" } : { status: "valid", fields: r, instant: o };
294
+ }
295
+ return { status: "valid", fields: r };
296
+ }
297
+ export {
298
+ b as E,
299
+ c as R,
300
+ et as a,
301
+ h as b,
302
+ tt as c,
303
+ u as d,
304
+ U as e,
305
+ A as f,
306
+ W as g,
307
+ L as h,
308
+ d as i,
309
+ R as j,
310
+ B as k,
311
+ H as l,
312
+ V as m,
313
+ G as n,
314
+ J as o,
315
+ x as p,
316
+ K as q,
317
+ Q as r,
318
+ m as s,
319
+ X as v,
320
+ w,
321
+ I as z
322
+ };