react-semaphor 0.1.541 → 0.1.543

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 (109) hide show
  1. package/dist/analytics-protocol/index.js +75 -75
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/brand-studio/index.js +3 -3
  4. package/dist/briefings/index.js +51 -49
  5. package/dist/chunks/apply-dashboard-operations-CG9S7MGt.js +2260 -0
  6. package/dist/chunks/{assistant-chat-D1fDZD6O.js → assistant-chat-BFMRUYoB.js} +12 -12
  7. package/dist/chunks/bookmark-state-CXw7lZ50.js +118 -0
  8. package/dist/chunks/{calendar-day-equality-Bpl15IBo.js → calendar-day-equality-BmJAWduY.js} +180 -207
  9. package/dist/chunks/comparison-window-caption-Bv18samq.js +1618 -0
  10. package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
  11. package/dist/chunks/{dashboard-B6IrON_Q.js → dashboard-B9mKTJoy.js} +1 -1
  12. package/dist/chunks/{dashboard-briefing-launcher-DwjFpewq.js → dashboard-briefing-launcher-Bdmry_oG.js} +18 -18
  13. package/dist/chunks/{dashboard-controls-C_BI28ME.js → dashboard-controls-UGpjOM2k.js} +69 -70
  14. package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
  15. package/dist/chunks/{dashboard-json-DDY15Trn.js → dashboard-json-DG8dz0eX.js} +4 -4
  16. package/dist/chunks/{document-dashboard-inputs-DP_Op5mu.js → document-dashboard-inputs-OwqCbrVp.js} +2382 -4975
  17. package/dist/chunks/document-sheet-utils-BTb3VZxV.js +3619 -0
  18. package/dist/chunks/{edit-dashboard-visual-CH2dzWW-.js → edit-dashboard-visual-CDpA4y5e.js} +728 -728
  19. package/dist/chunks/{filter-value-text-BhWugPWE.js → filter-value-text-CYsVYPuD.js} +18 -19
  20. package/dist/chunks/{index-DaQlghLY.js → index-l5LclZvs.js} +824 -1351
  21. package/dist/chunks/{matrix-analytical-definition-bcprSe4u.js → matrix-analytical-definition-C7Gb0e12.js} +1 -1
  22. package/dist/chunks/{matrix-card-CJn1hB5V.js → matrix-card-DjwWcCo8.js} +2 -2
  23. package/dist/chunks/{matrix-formatter-DQ8avoIQ.js → matrix-formatter-BnsTX90d.js} +430 -417
  24. package/dist/chunks/{matrix-member-presentation-BNPSDKBG.js → matrix-member-presentation-CQGdVks6.js} +1 -1
  25. package/dist/chunks/{matrix-operation-contract-B8PBF1Gd.js → matrix-operation-contract-8OIO4gob.js} +65 -65
  26. package/dist/chunks/metric-comparison-DEwi9uc2.js +498 -0
  27. package/dist/chunks/numeric-presentation-F_-H6VAw.js +5227 -0
  28. package/dist/chunks/{pivot-header-presentation-MkcKnjn3.js → pivot-header-presentation-DHcx1XGQ.js} +1 -1
  29. package/dist/chunks/{pivot-result-identity-D6hhcRXi.js → pivot-result-identity-DJhXXcns.js} +1 -1
  30. package/dist/chunks/pivot-result-lifecycle-DupbRk-R.js +1155 -0
  31. package/dist/chunks/raw-temporal-presentation-D-azM_98.js +585 -0
  32. package/dist/chunks/{report-preferences-dialog-DpNkFfQO.js → report-preferences-dialog-CPwRwEJx.js} +75 -75
  33. package/dist/chunks/{report-runtime-context-B984Nq1E.js → report-runtime-context-Dq8XyODK.js} +1 -1
  34. package/dist/chunks/{saved-dashboard-context-CJ2WpoMF.js → saved-dashboard-context-BKvMfRfC.js} +233 -206
  35. package/dist/chunks/{selection-reducer-vKIb_jS6.js → selection-reducer-Dj_8xD69.js} +1 -1
  36. package/dist/chunks/{semaphor-ready-indicator-KT598QJq.js → semaphor-ready-indicator-CN2AHm2x.js} +37489 -39476
  37. package/dist/chunks/{shelf-drop-preview-context-BxV3Fl8h.js → shelf-drop-preview-context-BGl_rxcW.js} +6 -6
  38. package/dist/chunks/sort-target-MT1WK1vX.js +29 -0
  39. package/dist/chunks/{source-entity-resolution-CVA1a85c.js → source-entity-resolution-BYn9giz3.js} +1 -1
  40. package/dist/chunks/{switch-DWEWiv1J.js → switch-C3jLxlG0.js} +2 -2
  41. package/dist/chunks/table-export-sheet-BDRXLLdq.js +949 -0
  42. package/dist/chunks/table-settings-CLZocegs.js +501 -0
  43. package/dist/chunks/temporal-bucket-D7NBrrtL.js +2071 -0
  44. package/dist/chunks/{token-types-bxUxXDX2.js → token-types-DBbZVQsm.js} +1 -1
  45. package/dist/chunks/{use-create-flow-overlay-state-DdD12SMY.js → use-create-flow-overlay-state-BnclfB2k.js} +151 -151
  46. package/dist/chunks/{validators-Ej1DdCXa.js → validators-DMHTpf7a.js} +73 -73
  47. package/dist/dashboard/index.js +2 -2
  48. package/dist/dashboard-authoring/index.js +462 -457
  49. package/dist/data-app-sdk/index.js +5 -5
  50. package/dist/data-app-sdk-adapters/index.js +2 -2
  51. package/dist/data-app-sdk-validation/index.js +9 -9
  52. package/dist/format-utils/index.js +346 -241
  53. package/dist/index.js +174 -175
  54. package/dist/report-runtime-context/index.js +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
  57. package/dist/types/briefings/attachments.d.ts +17 -1
  58. package/dist/types/briefings/index.d.ts +5 -3
  59. package/dist/types/index.js +48 -48
  60. package/dist/types/lib/api/exports-api.d.ts +11 -65
  61. package/dist/types/lib/dashboard-inputs/control-contract-overrides.d.ts +17 -0
  62. package/dist/types/lib/dashboard-viewer/export-table-view.d.ts +2 -0
  63. package/dist/types/lib/hooks/use-dashboard.d.ts +3 -6
  64. package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +8 -2
  65. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +8 -6
  66. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +50 -0
  67. package/dist/types/lib/types/explorer-types.d.ts +6 -0
  68. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +3 -3
  69. package/dist/types/shared/assistant-context/index.d.ts +1 -1
  70. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +23 -6
  71. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +173 -0
  72. package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
  73. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +4 -3
  74. package/dist/types/shared/format-utils/exporters/export-cells.d.ts +90 -0
  75. package/dist/types/shared/format-utils/exporters/export-file-format.d.ts +44 -0
  76. package/dist/types/shared/format-utils/exporters/index.d.ts +6 -0
  77. package/dist/types/shared/format-utils/exporters/xlsx-file.d.ts +90 -0
  78. package/dist/types/shared/format-utils/formatters/date-formatter.d.ts +8 -12
  79. package/dist/types/shared/format-utils/formatters/index.d.ts +1 -1
  80. package/dist/types/shared/format-utils/formatters/matrix-formatter.d.ts +2 -0
  81. package/dist/types/shared/format-utils/index.d.ts +2 -0
  82. package/dist/types/shared/format-utils/matrix-continuation.d.ts +55 -9
  83. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +21 -1
  84. package/dist/types/shared/format-utils/matrix-export-xlsx.d.ts +27 -0
  85. package/dist/types/shared/format-utils/presentation-execution.d.ts +27 -2
  86. package/dist/types/shared/format-utils/raw-temporal.d.ts +8 -0
  87. package/dist/types/shared/format-utils/table-export/index.d.ts +8 -0
  88. package/dist/types/shared/format-utils/table-export/prepare-table-export.d.ts +50 -0
  89. package/dist/types/shared/format-utils/table-export/table-export-formatting.d.ts +47 -0
  90. package/dist/types/shared/format-utils/table-export/table-export-raw-temporal.d.ts +40 -0
  91. package/dist/types/shared/format-utils/table-export/table-export-result.d.ts +31 -0
  92. package/dist/types/shared/format-utils/table-export/table-export-sheet.d.ts +38 -0
  93. package/dist/types/shared/format-utils/temporal-bucket.d.ts +9 -0
  94. package/package.json +2 -1
  95. package/dist/chunks/aggregate-table-row-presentation-B_vQjYR3.js +0 -996
  96. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +0 -402
  97. package/dist/chunks/bookmark-state-k7y5SNGf.js +0 -331
  98. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +0 -2161
  99. package/dist/chunks/canonical-result-keys-CEQefvdO.js +0 -33
  100. package/dist/chunks/common-types-CUf03Htv.js +0 -288
  101. package/dist/chunks/csv-utils-GUfKyT1J.js +0 -56
  102. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +0 -3288
  103. package/dist/chunks/document-sheet-utils-C1eEldxs.js +0 -1076
  104. package/dist/chunks/matrix-definition-DQDI2okF.js +0 -206
  105. package/dist/chunks/metric-comparison-CojWeLqx.js +0 -392
  106. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +0 -804
  107. package/dist/chunks/raw-temporal-D61lr48Y.js +0 -1464
  108. package/dist/chunks/temporal-bucket-D8JF7zKz.js +0 -575
  109. package/dist/chunks/temporal-bucket-contract-DaOajRC7.js +0 -108
@@ -1,67 +1,129 @@
1
- import { f as E } from "../chunks/raw-temporal-D61lr48Y.js";
2
- import { R as h, x as F, t as y, s as I, u as x, c as M, k as N, l as O, b as D, j as L, h as B, g as $, d as k, A as V, e as X, a as G, i as q, p as j, w as U, m as z, o as K, z as Y, r as H, n as W, q as Q, v as J, y as Z } from "../chunks/raw-temporal-D61lr48Y.js";
3
- import { P as re, A as ae, D as te, u as oe, F as se, c as ie, M as le, b as ne, j as me, h as ue, P as ce, n as pe, k as fe, i as Te, g as Ee, e as be, G as Ce, J as Re, K as Ae, E as de, f as Pe, x as ve, y as we, a as _e, t as ge, B as Se, m as he, d as Fe, s as ye, l as Ie, p as xe, I as Me, z as Ne, w as Oe, o as De, q as Le, r as Be, C as $e, H as ke, v as Ve } from "../chunks/aggregate-table-row-presentation-B_vQjYR3.js";
4
- import { d as Ge, a as qe, b as je, e as Ue, f as ze, g as Ke, c as Ye, p as He, h as We, r as Qe } from "../chunks/matrix-formatter-DQ8avoIQ.js";
5
- import { c as b } from "../chunks/csv-utils-GUfKyT1J.js";
6
- import { d as Ze, a as er, C as rr, b as ar, D as tr, f as or, i as sr, j as ir, g as lr, e as nr, p as mr, h as ur, r as cr, t as pr } from "../chunks/csv-utils-GUfKyT1J.js";
7
- import { f as C } from "../chunks/pivot-result-lifecycle-8qCDmpKc.js";
8
- import { M as Tr, i as Er, u as br, P as Cr, d as Rr, x as Ar, n as dr, s as Pr, t as vr, o as wr, q as _r, r as gr, a as Sr, b as hr, c as Fr, m as yr, g as Ir, w as xr, p as Mr, e as Nr, h as Or, l as Dr, j as Lr, k as Br, v as $r } from "../chunks/pivot-result-lifecycle-8qCDmpKc.js";
9
- import { FAST_PDF_POLICY as Vr, PDF_SAFETY_LIMIT_EXCEEDED as Xr, PDF_TABLE_CARD_TYPES as Gr, getUtf8ByteLength as qr, isFastPdfOutputSizeEligible as jr, isFastPdfPageCountEligible as Ur, isFastPdfRequestSizeEligible as zr, isFastPdfRowCountEligible as Kr, isPdfTableCardType as Yr } from "../pdf-export-policy/index.js";
10
- import { D as Wr, T as Qr, a as Jr, d as Zr, f as ea, i as ra, b as aa, p as ta, r as oa, c as sa, t as ia, v as la } from "../chunks/temporal-bucket-D8JF7zKz.js";
11
- import { a as ma, d as ua } from "../chunks/filter-value-text-BhWugPWE.js";
12
- import { S as pa } from "../chunks/analytics-base-schemas-BFAoRlkU.js";
13
- import { r as Ta } from "../chunks/metric-comparison-CojWeLqx.js";
14
- import { P as ba, p as Ca } from "../chunks/pivot-header-presentation-MkcKnjn3.js";
15
- import { P as Aa, b as da, i as Pa, c as va, d as wa, r as _a, a as ga } from "../chunks/pivot-result-identity-D6hhcRXi.js";
16
- import { p as ha, v as Fa } from "../chunks/raw-temporal-contract-C51YG48G.js";
1
+ import { a as x } from "../chunks/temporal-bucket-D7NBrrtL.js";
2
+ import { D as G, R as q, T as U, A as z, L as j, c as H, I as K, J as W, C as Y, e as J, m as Q, n as Z, d as ee, l as re, k as ae, j as te, g as se, M as oe, h as le, f as ie, b as ne, i as me, w as ue, o as ce, K as pe, q as fe, H as Te, E as Ee, B as de, p as be, z as Ce, t as Re, u as xe, r as Ae, F as he, G as Pe, x as Se, s as Fe, v as _e, y as ge } from "../chunks/temporal-bucket-D7NBrrtL.js";
3
+ import { p as A, m as h, r as T, t as P } from "../chunks/comparison-window-caption-Bv18samq.js";
4
+ import { P as ve, K as Ie, D as ye, E as Me, F as Oe, c as Ne, M as Xe, b as Le, n as De, k as ke, P as Be, s as $e, o as Ve, l as Ge, j as qe, i as Ue, e as ze, Q as je, T as He, U as Ke, O as We, f as Ye, H as Je, I as Qe, a as Ze, y as er, L as rr, g as ar, h as tr, A as sr, w as or, q as lr, z as ir, S as nr, J as mr, G as ur, u as cr, v as pr, d as fr, C as Tr, N as Er, R as dr, B as br, x as Cr } from "../chunks/comparison-window-caption-Bv18samq.js";
5
+ import { d as xr, e as Ar, a as hr, b as Pr, h as Sr, f as Fr, g as _r, c as gr, p as wr, i as vr, r as Ir } from "../chunks/matrix-formatter-BnsTX90d.js";
6
+ import { a as S, c as F } from "../chunks/pivot-result-lifecycle-DupbRk-R.js";
7
+ import { e as Mr, b as Or, C as Nr, d as Xr, D as Lr, E as Dr, v as kr, u as Br, M as $r, U as Vr, P as Gr, X as qr, B as Ur, W as zr, L as jr, h as Hr, k as Kr, S as Wr, T as Yr, l as Jr, i as Qr, q as Zr, o as ea, s as ra, n as aa, O as ta, N as sa, f as oa, Q as la, y as ia, z as na, A as ma, w as ua, G as ca, V as pa, g as fa, p as Ta, m as Ea, x as da, F as ba, H as Ca, K as Ra, I as xa, J as Aa, j as ha, r as Pa, t as Sa, R as Fa } from "../chunks/pivot-result-lifecycle-DupbRk-R.js";
8
+ import { d as b } from "../chunks/table-export-sheet-BDRXLLdq.js";
9
+ import { T as ga, a as wa, X as va, b as Ia, k as ya, l as Ma, g as Oa, h as Na, i as Xa, o as La, e as Da, p as ka, n as Ba, c as $a, s as Va, j as Ga, q as qa, m as Ua, t as za, w as ja, f as Ha, x as Ka } from "../chunks/table-export-sheet-BDRXLLdq.js";
10
+ import { w as E } from "../chunks/validators-DMHTpf7a.js";
11
+ import "../chunks/matrix-operation-contract-8OIO4gob.js";
12
+ import { S as Ya } from "../chunks/analytics-base-schemas-BFAoRlkU.js";
13
+ import "zod";
14
+ import { FAST_PDF_POLICY as Qa, PDF_SAFETY_LIMIT_EXCEEDED as Za, PDF_TABLE_CARD_TYPES as et, getUtf8ByteLength as rt, isFastPdfOutputSizeEligible as at, isFastPdfPageCountEligible as tt, isFastPdfRequestSizeEligible as st, isFastPdfRowCountEligible as ot, isPdfTableCardType as lt } from "../pdf-export-policy/index.js";
15
+ import { a as nt, d as mt } from "../chunks/filter-value-text-CYsVYPuD.js";
16
+ import { r as ct } from "../chunks/metric-comparison-DEwi9uc2.js";
17
+ import { P as ft, p as Tt } from "../chunks/pivot-header-presentation-DHcx1XGQ.js";
18
+ import { P as dt, b as bt, i as Ct, c as Rt, d as xt, r as At, a as ht } from "../chunks/pivot-result-identity-DJhXXcns.js";
19
+ import { p as St, v as Ft } from "../chunks/raw-temporal-contract-C51YG48G.js";
20
+ function C(r, t, l) {
21
+ return r.columns.map((s, a) => {
22
+ var n;
23
+ const o = `matrix:${a}`;
24
+ if (s.kind !== "measure")
25
+ return T({ key: o, label: l[a], formattedValues: !0, dataType: "string", presentation: { kind: "text" } });
26
+ const e = t.measureFormats.get(s.measureId);
27
+ return T({
28
+ key: o,
29
+ label: l[a],
30
+ formattedValues: !0,
31
+ dataType: (n = t.measureSemantics.get(s.measureId)) != null && n.isNumeric ? "number" : "string",
32
+ ...e ? { presentation: { kind: "measure", format: e } } : {}
33
+ });
34
+ });
35
+ }
36
+ function R(r, t, l) {
37
+ return t.map((s, a) => {
38
+ const o = r.values[a];
39
+ return P({ value: (o == null ? void 0 : o.kind) === "value" ? o.value : null, text: s, column: l[a] });
40
+ });
41
+ }
42
+ function _(r, t) {
43
+ const l = [];
44
+ for (let s = 0; s < t; s += 1) {
45
+ const a = r.columns.map((e) => e.kind !== "measure" ? null : s < e.columnPath.length ? `member:${E(e.columnPath.slice(0, s + 1))}` : s === e.columnPath.length && e.role !== "member" ? `${e.role}:${E(e.columnPath)}` : null);
46
+ let o = 0;
47
+ for (let e = 1; e <= a.length; e += 1)
48
+ e < a.length && a[e] !== null && a[e] === a[o] || (a[o] !== null && e - 1 > o && l.push({ row: s, firstColumn: o, lastColumn: e - 1 }), o = e);
49
+ }
50
+ return l;
51
+ }
52
+ function X(r, t, l) {
53
+ const s = A(r, t, l), a = C(r, s.formatting, s.headers);
54
+ return {
55
+ /** Header bands as header rows (XL-D16), with merges from identity (XL-D34). */
56
+ xlsxSheet: (o) => b({
57
+ title: o.title,
58
+ columns: a,
59
+ headerRows: o.includeHeaders ? s.headerBands : [],
60
+ merges: o.includeHeaders ? _(r, s.headerBands.length - 1) : []
61
+ }),
62
+ /** Every row label repeated; subtotal and grand-total rows are 'total' (bold). */
63
+ xlsxRows: (o) => o.map((e) => ({
64
+ role: e.kind === "layout" && e.role !== "member" ? "total" : "body",
65
+ // No previous row: every label shows, whatever the screen's layout repeats.
66
+ cells: R(e, s.row(e), a)
67
+ }))
68
+ };
69
+ }
70
+ function L(r, t) {
71
+ const l = r.columns.map((a) => a.label), s = C(r, t, l);
72
+ return {
73
+ /** One header row of the layout's column labels. */
74
+ xlsxSheet: (a) => b({ title: a.title, columns: s, headerRows: a.includeHeaders ? [l] : [] }),
75
+ /** Flat rows with the card's formats (MX-D10) and typed measure cells. */
76
+ xlsxRows: (a) => a.map((o) => ({ role: "body", cells: R(o, h(o, r, t), s) }))
77
+ };
78
+ }
17
79
  function p(r) {
18
80
  if (r === null || typeof r != "object" || Array.isArray(r))
19
81
  return !1;
20
- const a = Object.getPrototypeOf(r);
21
- return a === null || a === Object.prototype;
82
+ const t = Object.getPrototypeOf(r);
83
+ return t === null || t === Object.prototype;
22
84
  }
23
- function T(r, a, o) {
24
- const i = new Set(a), t = Object.keys(r).find((l) => !i.has(l));
25
- if (t)
26
- throw new Error(`${o} contains unknown property "${t}"`);
85
+ function d(r, t, l) {
86
+ const s = new Set(t), a = Object.keys(r).find((o) => !s.has(o));
87
+ if (a)
88
+ throw new Error(`${l} contains unknown property "${a}"`);
27
89
  }
28
- function v(r, a = "tableTotalsRequest") {
90
+ function D(r, t = "tableTotalsRequest") {
29
91
  if (!p(r))
30
- throw new Error(`${a} must be an object`);
31
- if (T(r, ["source", "columns"], a), r.source !== "documentFlatTable")
32
- throw new Error(`${a}.source must be documentFlatTable`);
92
+ throw new Error(`${t} must be an object`);
93
+ if (d(r, ["source", "columns"], t), r.source !== "documentFlatTable")
94
+ throw new Error(`${t}.source must be documentFlatTable`);
33
95
  if (!Array.isArray(r.columns) || r.columns.length === 0)
34
- throw new Error(`${a}.columns must be a non-empty array`);
35
- let o = 0;
36
- const i = r.columns.map((e, n) => {
37
- const s = `${a}.columns.${n}`;
96
+ throw new Error(`${t}.columns must be a non-empty array`);
97
+ let l = 0;
98
+ const s = r.columns.map((e, n) => {
99
+ const i = `${t}.columns.${n}`;
38
100
  if (!p(e))
39
- throw new Error(`${s} must be an object`);
40
- T(
101
+ throw new Error(`${i} must be an object`);
102
+ d(
41
103
  e,
42
104
  ["fieldId", "role", "behavior", "metricAlias", "label"],
43
- s
105
+ i
44
106
  );
45
107
  const f = typeof e.fieldId == "string" ? e.fieldId.trim() : "";
46
108
  if (!f)
47
- throw new Error(`${s}.fieldId must be a non-empty string`);
109
+ throw new Error(`${i}.fieldId must be a non-empty string`);
48
110
  if (e.role !== "detail" && e.role !== "groupby" && e.role !== "metric")
49
- throw new Error(`${s}.role is invalid`);
111
+ throw new Error(`${i}.role is invalid`);
50
112
  const m = e.role;
51
113
  if (e.behavior !== "sum" && e.behavior !== "avg" && e.behavior !== "count" && e.behavior !== "label")
52
- throw new Error(`${s}.behavior is invalid`);
114
+ throw new Error(`${i}.behavior is invalid`);
53
115
  const c = e.behavior, u = typeof e.metricAlias == "string" ? e.metricAlias.trim() : void 0;
54
116
  if (e.metricAlias !== void 0 && !u)
55
- throw new Error(`${s}.metricAlias must be a non-empty string`);
117
+ throw new Error(`${i}.metricAlias must be a non-empty string`);
56
118
  if (u && m !== "metric")
57
- throw new Error(`${s}.metricAlias requires metric role`);
119
+ throw new Error(`${i}.metricAlias requires metric role`);
58
120
  if (c === "label") {
59
- if (o += 1, m === "metric")
60
- throw new Error(`${s}.behavior label requires a non-metric role`);
121
+ if (l += 1, m === "metric")
122
+ throw new Error(`${i}.behavior label requires a non-metric role`);
61
123
  } else if (m !== "metric")
62
- throw new Error(`${s}.${c} requires metric role`);
124
+ throw new Error(`${i}.${c} requires metric role`);
63
125
  if (e.label !== void 0 && typeof e.label != "string")
64
- throw new Error(`${s}.label must be a string`);
126
+ throw new Error(`${i}.label must be a string`);
65
127
  return {
66
128
  fieldId: f,
67
129
  role: m,
@@ -69,229 +131,272 @@ function v(r, a = "tableTotalsRequest") {
69
131
  ...u ? { metricAlias: u } : {},
70
132
  ...e.label !== void 0 ? { label: e.label } : {}
71
133
  };
72
- }), t = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
73
- for (const e of i) {
134
+ }), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set();
135
+ for (const e of s) {
74
136
  if (e.metricAlias) {
75
- if (l.has(e.metricAlias))
137
+ if (o.has(e.metricAlias))
76
138
  throw new Error(
77
- `${a}.columns duplicates metricAlias "${e.metricAlias}"`
139
+ `${t}.columns duplicates metricAlias "${e.metricAlias}"`
78
140
  );
79
- l.add(e.metricAlias);
141
+ o.add(e.metricAlias);
80
142
  }
81
- const n = t.get(e.fieldId) ?? [];
82
- n.push(e), t.set(e.fieldId, n);
143
+ const n = a.get(e.fieldId) ?? [];
144
+ n.push(e), a.set(e.fieldId, n);
83
145
  }
84
- for (const [e, n] of t)
146
+ for (const [e, n] of a)
85
147
  if (n.length !== 1) {
86
- for (const s of n)
87
- if (s.role !== "metric" || !s.metricAlias)
148
+ for (const i of n)
149
+ if (i.role !== "metric" || !i.metricAlias)
88
150
  throw new Error(
89
- `${a}.columns duplicates fieldId "${e}" without distinct metricAlias values`
151
+ `${t}.columns duplicates fieldId "${e}" without distinct metricAlias values`
90
152
  );
91
153
  }
92
- if (o > 1)
93
- throw new Error(`${a}.columns may contain at most one label`);
94
- return { source: "documentFlatTable", columns: i };
154
+ if (l > 1)
155
+ throw new Error(`${t}.columns may contain at most one label`);
156
+ return { source: "documentFlatTable", columns: s };
95
157
  }
96
- function w(r, a = "tableTotalsByColumnId") {
158
+ function k(r, t = "tableTotalsByColumnId") {
97
159
  if (!p(r))
98
- throw new Error(`${a} must be an object`);
99
- const o = {};
100
- for (const [i, t] of Object.entries(r)) {
101
- if (!i.trim())
102
- throw new Error(`${a} contains an empty column id`);
103
- if (t !== null && typeof t != "string" && (typeof t != "number" || !Number.isFinite(t)))
104
- throw new Error(`${a}.${i} must be a string, finite number, or null`);
105
- o[i] = t;
160
+ throw new Error(`${t} must be an object`);
161
+ const l = {};
162
+ for (const [s, a] of Object.entries(r)) {
163
+ if (!s.trim())
164
+ throw new Error(`${t} contains an empty column id`);
165
+ if (a !== null && typeof a != "string" && (typeof a != "number" || !Number.isFinite(a)))
166
+ throw new Error(`${t}.${s} must be a string, finite number, or null`);
167
+ l[s] = a;
106
168
  }
107
- if (Object.keys(o).length === 0)
108
- throw new Error(`${a} must not be empty`);
109
- return o;
169
+ if (Object.keys(l).length === 0)
170
+ throw new Error(`${t} must not be empty`);
171
+ return l;
110
172
  }
111
- function R(r) {
173
+ function g(r) {
112
174
  if (typeof r == "number")
113
175
  return Number.isFinite(r) ? r : null;
114
176
  if (!r.trim())
115
177
  return null;
116
- const a = Number(r);
117
- return Number.isFinite(a) ? a : null;
178
+ const t = Number(r);
179
+ return Number.isFinite(t) ? t : null;
118
180
  }
119
- function _(r) {
120
- const a = r.visibleColumns.map((o) => {
121
- const t = Object.prototype.hasOwnProperty.call(
181
+ function B(r) {
182
+ const t = r.visibleColumns.map((l) => {
183
+ const a = Object.prototype.hasOwnProperty.call(
122
184
  r.totalsByColumnId,
123
- o
124
- ) ? r.totalsByColumnId[o] : o === r.labelColumnKey ? "Total" : null;
125
- if (t === null)
185
+ l
186
+ ) ? r.totalsByColumnId[l] : l === r.labelColumnKey ? "Total" : null;
187
+ if (a === null)
126
188
  return "";
127
189
  if (!r.useFormattedValues)
128
- return String(t);
129
- const l = C({
190
+ return String(a);
191
+ const o = S({
130
192
  snapshot: r.snapshot,
131
193
  scope: r.scope,
132
- target: { kind: "column", columnKey: o }
133
- }), e = l ? R(t) : null;
134
- return l && e !== null ? E(e, l) : String(t);
194
+ target: { kind: "column", columnKey: l }
195
+ }), e = o ? g(a) : null;
196
+ return o && e !== null ? x(e, o) : String(a);
135
197
  });
136
- return b(a, r.delimiter);
198
+ return F(t, r.delimiter);
137
199
  }
138
200
  export {
139
- re as AGGREGATE_PDF_CONTINUATION_CLASS,
140
- ae as AGGREGATE_TOTAL_MEMBER_MARKER,
141
- Ze as CSV_CONTENT_TYPE,
142
- er as CSV_DELIMITERS,
143
- rr as CSV_ENCODINGS,
144
- ar as CSV_RECORD_SEPARATOR,
145
- tr as DEFAULT_CSV_ENCODING,
146
- Wr as DEFAULT_RESOLVED_TEMPORAL_STYLE_SET,
147
- te as DIRECT_CSV_EXPORT_MAX_ROWS,
148
- Vr as FAST_PDF_POLICY,
149
- oe as FILTER_LINE_MAX_LISTED_VALUES,
150
- se as FULL_DATASET_CSV_EXPORT_MAX_ROWS,
151
- ie as MATRIX_EXPORT_MAX_ARTIFACT_BYTES,
152
- le as MATRIX_EXPORT_MAX_CELLS,
153
- ne as MATRIX_EXPORT_MAX_ENCODED_BYTES,
154
- Tr as MATRIX_EXPORT_TRANSFER_BYTES,
155
- me as MATRIX_PRINT_DEFAULT_DECIMALS,
156
- ue as MATRIX_PRINT_ORGANIZATION_DEFAULTS,
157
- Er as MissingResolvedRawTemporalFormatError,
158
- ce as PDF_GROUP_CONTINUATION_CLASS,
159
- Xr as PDF_SAFETY_LIMIT_EXCEEDED,
160
- Gr as PDF_TABLE_CARD_TYPES,
161
- pe as PdfSafetyLimitError,
162
- ba as PivotHeaderPresentationError,
163
- Aa as PivotResultIdentityError,
164
- br as PivotResultLifecycleError,
165
- Cr as PresentationExecutionSnapshotError,
166
- h as RawTemporalFormatContractError,
167
- pa as SEMAPHOR_GENERATED_COUNT_METRIC_ID,
168
- Qr as TEMPORAL_BUCKET_PATTERN_TOKENS,
169
- Jr as TemporalBucketContractError,
170
- fe as applyMatrixPrintNumberDefaults,
171
- Te as applyMatrixPrintOrganization,
172
- Rr as assertMatrixBatchResponseSize,
173
- F as assertRawTemporalChunkClassificationAgreement,
174
- _ as buildFlatTableExportTotalsFooter,
175
- Ee as buildMatrixPrintTable,
176
- be as buildMatrixTableStructure,
177
- y as classifyDeclaredSqlTemporalColumn,
178
- I as classifyTemporalLiteral,
179
- Ar as createCanonicalPivotResultTransport,
180
- dr as createPresentationExecutionSnapshot,
181
- x as createRawTemporalChunkClassificationEvidence,
182
- or as csvFilePreamble,
183
- b as csvRecord,
184
- sr as csvRecords,
185
- Pr as deriveMetricInstanceAliasExpectations,
186
- vr as derivePivotResultContractExpectations,
187
- ma as describeConditionInFullDetail,
188
- ua as describeFilterValueInFullDetail,
189
- Zr as describeTemporalBucketCalendar,
190
- ir as encodeCsvFile,
191
- lr as escapeCSVValue,
192
- C as findResolvedMeasureFormat,
193
- wr as findResolvedNumericFormat,
194
- _r as findResolvedRawTemporalFormat,
195
- gr as findResolvedTemporalBucketFormat,
196
- Ce as formatAggregateGrandTotalLabel,
197
- Re as formatAggregateGroupCell,
198
- Ae as formatAggregateGroupRow,
199
- de as formatAggregateSubtotalLabel,
200
- Pe as formatCanonicalComparisonRange,
201
- Ge as formatCellValue,
202
- M as formatCurrency,
203
- qe as formatDate,
204
- N as formatDuration,
205
- O as formatDurationCanonical,
206
- ve as formatFilterCondition,
207
- we as formatFilterLine,
208
- E as formatMeasureCanonical,
209
- _e as formatMetricComparison,
210
- D as formatNumber,
211
- L as formatNumberCustom,
212
- B as formatNumberWithColumnSettings,
213
- $ as formatNumericCanonical,
214
- k as formatPercent,
215
- V as formatRawTemporalValue,
216
- je as formatRelativeTime,
217
- Ue as formatRowForExport,
218
- X as formatScientific,
219
- ea as formatTemporalBucket,
220
- ge as formatTemporalInputValue,
221
- ze as fromSemanticFormat,
222
- Ke as getTimezoneAbbreviation,
223
- Ye as getTimezoneName,
224
- qr as getUtf8ByteLength,
225
- Se as isAggregateTotalMemberMarker,
226
- jr as isFastPdfOutputSizeEligible,
227
- Ur as isFastPdfPageCountEligible,
228
- zr as isFastPdfRequestSizeEligible,
229
- Kr as isFastPdfRowCountEligible,
230
- G as isMeasureCanonicalFormat,
231
- q as isNumericCanonicalFormat,
232
- Yr as isPdfTableCardType,
233
- da as isPivotEmptyTupleAllowed,
234
- Pa as isPivotSubtotalPrefix,
235
- ra as isTemporalBucketPreset,
236
- Sr as matrixAttemptKey,
237
- hr as matrixBatchInputSchema,
238
- Fr as matrixBatchResponseSchema,
239
- yr as matrixExportDeadlineSchema,
240
- he as matrixFlatCsvHeaders,
241
- Fe as matrixFlatCsvRow,
242
- Ir as matrixManifestSchema,
243
- xr as parseCanonicalPivotResultTransport,
244
- nr as parseCsvDelimiter,
245
- mr as parseCsvEncoding,
246
- w as parseFlatTableExportTotalsByColumnId,
247
- v as parseFlatTableExportTotalsRequest,
248
- Mr as parseMatrixAttemptKey,
249
- Nr as parseMatrixBatchResponse,
250
- Or as parseMatrixManifest,
251
- j as parseNumericCanonicalFormat,
252
- Dr as parsePresentationExecutionSnapshot,
253
- Lr as parsePresentationScope,
254
- U as parseRawTemporalChunkClassificationEvidence,
255
- ha as parseRawTemporalValueMetadata,
256
- z as parseResolvedNumericCanonicalFormat,
257
- Br as parseResolvedPresentationEntries,
258
- K as parseResolvedRawTemporalFormat,
259
- aa as parseResolvedTemporalBucketFormat,
260
- ta as parseTemporalBucketValue,
261
- ye as parseTemporalInputPresentation,
262
- He as parseWithSourceTimezone,
263
- Ie as planMatrixKeepWithPrevious,
264
- xe as prepareMatrixExportPresentation,
265
- We as prepareMatrixFormatting,
266
- Y as prepareRawTemporalFormatter,
267
- Me as presentAggregateGroupRow,
268
- Ca as presentPivotHeader,
269
- ur as protectCSVText,
270
- Ne as readAttachmentFilterLineValues,
271
- Oe as readNamedRelativeWindow,
272
- De as readPdfErrorResponse,
273
- Le as requestStructuredPdf,
274
- va as requirePivotHeaderMembers,
275
- wa as requirePivotResultColumnIdentities,
276
- Be as requiresChunkedCsvExport,
277
- $e as resolveAggregateTablePresentationContext,
278
- oa as resolveApplicableTemporalBucketFormat,
279
- cr as resolveCsvEncoding,
280
- H as resolveCurrencyFractionDigits,
281
- Ta as resolveMetricResultAlias,
282
- W as resolveNumericPresentation,
283
- _a as resolveQueryColumnKeyMapEntry,
284
- Q as resolveRawTemporalFormat,
285
- sa as resolveTemporalBucketPresentation,
286
- Qe as resolveTimezone,
287
- ga as resolveUniqueQueryColumnKeyMapEntry,
288
- ke as shouldPresentAggregateGroupValue,
289
- pr as toCsvCell,
290
- ia as tokenizeTemporalBucketPattern,
291
- J as validateCardExportNumericPresentationSnapshot,
292
- $r as validateCardExportPresentationSnapshot,
293
- Z as validateRawTemporalPattern,
294
- Fa as validateRawTemporalResultColumn,
295
- la as validateTemporalBucketFormatApplicability,
296
- Ve as validateTemporalInputPattern
201
+ ve as AGGREGATE_PDF_CONTINUATION_CLASS,
202
+ Ie as AGGREGATE_TOTAL_MEMBER_MARKER,
203
+ Mr as CSV_CONTENT_TYPE,
204
+ Or as CSV_DELIMITERS,
205
+ Nr as CSV_ENCODINGS,
206
+ Xr as CSV_RECORD_SEPARATOR,
207
+ Lr as DEFAULT_CSV_ENCODING,
208
+ G as DEFAULT_RESOLVED_TEMPORAL_STYLE_SET,
209
+ ye as DIRECT_CSV_EXPORT_MAX_ROWS,
210
+ Dr as EXPORT_FILE_FORMATS,
211
+ Qa as FAST_PDF_POLICY,
212
+ Me as FILTER_LINE_MAX_LISTED_VALUES,
213
+ Oe as FULL_DATASET_CSV_EXPORT_MAX_ROWS,
214
+ kr as MATRIX_EXPORT_DECODED_PART_BYTES,
215
+ Ne as MATRIX_EXPORT_MAX_ARTIFACT_BYTES,
216
+ Xe as MATRIX_EXPORT_MAX_CELLS,
217
+ Le as MATRIX_EXPORT_MAX_ENCODED_BYTES,
218
+ Br as MATRIX_EXPORT_TRANSFER_BYTES,
219
+ De as MATRIX_PRINT_DEFAULT_DECIMALS,
220
+ ke as MATRIX_PRINT_ORGANIZATION_DEFAULTS,
221
+ $r as MissingResolvedRawTemporalFormatError,
222
+ Be as PDF_GROUP_CONTINUATION_CLASS,
223
+ Za as PDF_SAFETY_LIMIT_EXCEEDED,
224
+ et as PDF_TABLE_CARD_TYPES,
225
+ $e as PdfSafetyLimitError,
226
+ ft as PivotHeaderPresentationError,
227
+ dt as PivotResultIdentityError,
228
+ Vr as PivotResultLifecycleError,
229
+ Gr as PresentationExecutionSnapshotError,
230
+ q as RawTemporalFormatContractError,
231
+ Ya as SEMAPHOR_GENERATED_COUNT_METRIC_ID,
232
+ ga as TABLE_EXPORT_SHEET_SAMPLE_ROWS,
233
+ U as TEMPORAL_BUCKET_PATTERN_TOKENS,
234
+ z as TemporalBucketContractError,
235
+ qr as XLSX_CONTENT_TYPE,
236
+ wa as XLSX_LIMIT_FAILURE_REASONS,
237
+ va as XlsxLimitError,
238
+ Ve as applyMatrixPrintNumberDefaults,
239
+ Ge as applyMatrixPrintOrganization,
240
+ Ur as assertMatrixBatchResponseSize,
241
+ j as assertRawTemporalChunkClassificationAgreement,
242
+ Ia as assertXlsxColumnCount,
243
+ B as buildFlatTableExportTotalsFooter,
244
+ qe as buildMatrixPrintTable,
245
+ Ue as buildMatrixTableStructure,
246
+ H as classifyDeclaredSqlTemporalColumn,
247
+ K as classifyTemporalLiteral,
248
+ zr as createCanonicalPivotResultTransport,
249
+ jr as createPresentationExecutionSnapshot,
250
+ W as createRawTemporalChunkClassificationEvidence,
251
+ Hr as csvFilePreamble,
252
+ F as csvRecord,
253
+ Kr as csvRecords,
254
+ xr as dateWallClock,
255
+ ya as defineTableExportSheet,
256
+ b as defineXlsxSheet,
257
+ Wr as deriveMetricInstanceAliasExpectations,
258
+ Yr as derivePivotResultContractExpectations,
259
+ nt as describeConditionInFullDetail,
260
+ mt as describeFilterValueInFullDetail,
261
+ Y as describeTemporalBucketCalendar,
262
+ Jr as encodeCsvFile,
263
+ Ma as encodeTableExportWorkbook,
264
+ Oa as encodeXlsxFile,
265
+ Na as encodeXlsxRows,
266
+ Qr as escapeCSVValue,
267
+ ze as exportCellText,
268
+ Zr as exportFileFormatFromContentType,
269
+ ea as exportFileFormatFromStored,
270
+ ra as exportFileName,
271
+ aa as exportFileTraits,
272
+ ta as findResolvedDateFormat,
273
+ S as findResolvedMeasureFormat,
274
+ sa as findResolvedNumericFormat,
275
+ oa as findResolvedRawTemporalFormat,
276
+ la as findResolvedTemporalBucketFormat,
277
+ je as formatAggregateGrandTotalLabel,
278
+ He as formatAggregateGroupCell,
279
+ Ke as formatAggregateGroupRow,
280
+ We as formatAggregateSubtotalLabel,
281
+ Ye as formatCanonicalComparisonRange,
282
+ Ar as formatCellValue,
283
+ J as formatCurrency,
284
+ hr as formatDate,
285
+ Q as formatDuration,
286
+ Z as formatDurationCanonical,
287
+ Je as formatFilterCondition,
288
+ Qe as formatFilterLine,
289
+ x as formatMeasureCanonical,
290
+ Ze as formatMetricComparison,
291
+ ee as formatNumber,
292
+ re as formatNumberCustom,
293
+ ae as formatNumberWithColumnSettings,
294
+ te as formatNumericCanonical,
295
+ se as formatPercent,
296
+ oe as formatRawTemporalValue,
297
+ Pr as formatRelativeTime,
298
+ Sr as formatRowForExport,
299
+ le as formatScientific,
300
+ ie as formatTemporalBucket,
301
+ er as formatTemporalInputValue,
302
+ Fr as fromSemanticFormat,
303
+ _r as getTimezoneAbbreviation,
304
+ gr as getTimezoneName,
305
+ rt as getUtf8ByteLength,
306
+ rr as isAggregateTotalMemberMarker,
307
+ at as isFastPdfOutputSizeEligible,
308
+ tt as isFastPdfPageCountEligible,
309
+ st as isFastPdfRequestSizeEligible,
310
+ ot as isFastPdfRowCountEligible,
311
+ ne as isMeasureCanonicalFormat,
312
+ me as isNumericCanonicalFormat,
313
+ lt as isPdfTableCardType,
314
+ bt as isPivotEmptyTupleAllowed,
315
+ Ct as isPivotSubtotalPrefix,
316
+ ue as isTemporalBucketPreset,
317
+ Xa as isXlsxLimitError,
318
+ ia as matrixAttemptKey,
319
+ na as matrixBatchInputSchema,
320
+ ma as matrixBatchResponseSchema,
321
+ ua as matrixExportDeadlineSchema,
322
+ ar as matrixFlatCsvHeaders,
323
+ tr as matrixFlatCsvRow,
324
+ h as matrixFlatRowText,
325
+ ca as matrixManifestSchema,
326
+ pa as parseCanonicalPivotResultTransport,
327
+ fa as parseCsvDelimiter,
328
+ Ta as parseCsvEncoding,
329
+ Ea as parseExportFileFormat,
330
+ k as parseFlatTableExportTotalsByColumnId,
331
+ D as parseFlatTableExportTotalsRequest,
332
+ da as parseMatrixAttemptKey,
333
+ ba as parseMatrixBatchResponse,
334
+ Ca as parseMatrixManifest,
335
+ ce as parseNumericCanonicalFormat,
336
+ Ra as parsePresentationExecutionSnapshot,
337
+ xa as parsePresentationScope,
338
+ pe as parseRawTemporalChunkClassificationEvidence,
339
+ St as parseRawTemporalValueMetadata,
340
+ fe as parseResolvedNumericCanonicalFormat,
341
+ Aa as parseResolvedPresentationEntries,
342
+ Te as parseResolvedRawTemporalFormat,
343
+ Ee as parseResolvedTemporalBucketFormat,
344
+ sr as parseTableExportFormatting,
345
+ La as parseTableExportSheetColumns,
346
+ de as parseTemporalBucketValue,
347
+ or as parseTemporalInputPresentation,
348
+ wr as parseWithSourceTimezone,
349
+ Da as parseXlsxColumns,
350
+ ka as parseXlsxSheet,
351
+ lr as planMatrixKeepWithPrevious,
352
+ A as prepareMatrixExportPresentation,
353
+ L as prepareMatrixFlatXlsxPresentation,
354
+ vr as prepareMatrixFormatting,
355
+ X as prepareMatrixXlsxPresentation,
356
+ be as prepareRawTemporalFormatter,
357
+ ir as prepareTableExport,
358
+ nr as presentAggregateGroupRow,
359
+ Tt as presentPivotHeader,
360
+ ha as protectCSVText,
361
+ mr as readAttachmentFilterLineValues,
362
+ ur as readNamedRelativeWindow,
363
+ cr as readPdfErrorResponse,
364
+ pr as requestStructuredPdf,
365
+ Rt as requirePivotHeaderMembers,
366
+ xt as requirePivotResultColumnIdentities,
367
+ fr as requiresChunkedCsvExport,
368
+ Tr as requiresRawTemporalSqlChunkEvidence,
369
+ Er as resolveAggregateTablePresentationContext,
370
+ Ce as resolveApplicableTemporalBucketFormat,
371
+ Pa as resolveCsvEncoding,
372
+ Re as resolveCurrencyFractionDigits,
373
+ ct as resolveMetricResultAlias,
374
+ xe as resolveNumericPresentation,
375
+ At as resolveQueryColumnKeyMapEntry,
376
+ Ae as resolveRawTemporalFormat,
377
+ he as resolveTemporalBucketPresentation,
378
+ Ir as resolveTimezone,
379
+ ht as resolveUniqueQueryColumnKeyMapEntry,
380
+ T as resolveXlsxColumn,
381
+ Ba as serializeTableExportSheetColumns,
382
+ $a as serializeXlsxColumns,
383
+ Va as serializeXlsxSheet,
384
+ dr as shouldPresentAggregateGroupValue,
385
+ Ga as streamXlsxFile,
386
+ br as tableExportFormattingFromOptions,
387
+ qa as tableExportJobSheet,
388
+ Ua as tableExportSheetColumns,
389
+ za as tableExportXlsxRows,
390
+ Pe as temporalBucketWallClock,
391
+ Sa as toCsvCell,
392
+ Se as tokenizeTemporalBucketPattern,
393
+ Fe as validateCardExportNumericPresentationSnapshot,
394
+ Fa as validateCardExportPresentationSnapshot,
395
+ _e as validateRawTemporalPattern,
396
+ Ft as validateRawTemporalResultColumn,
397
+ ge as validateTemporalBucketFormatApplicability,
398
+ Cr as validateTemporalInputPattern,
399
+ ja as withXlsxSheetColumns,
400
+ Ha as xlsxColumnsFingerprint,
401
+ Ka as xlsxLimitFailureReason
297
402
  };