react-semaphor 0.1.431 → 0.1.433

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 (32) hide show
  1. package/dist/briefings/index.js +1 -1
  2. package/dist/chunks/{csv-utils-suxSkJGj.js → csv-utils-BZDvO2Fw.js} +1 -1
  3. package/dist/chunks/{dashboard-CPq4lMF5.js → dashboard-CCRvBqUy.js} +5816 -5807
  4. package/dist/chunks/{dashboard-D2wh2Avv.js → dashboard-DxynqfO7.js} +152 -152
  5. package/dist/chunks/{dashboard-briefing-launcher-n7BdUvVr.js → dashboard-briefing-launcher-B5y65OKI.js} +3 -3
  6. package/dist/chunks/{dashboard-briefing-launcher-DyhfpSOW.js → dashboard-briefing-launcher-h9DIL6l1.js} +1 -1
  7. package/dist/chunks/{dashboard-controls-BoiZVnIH.js → dashboard-controls-BN09XPen.js} +342 -342
  8. package/dist/chunks/dashboard-controls-Cp_Q8acT.js +36 -0
  9. package/dist/chunks/{dashboard-json-BW3ftPy_.js → dashboard-json-BNxt7dUo.js} +1 -1
  10. package/dist/chunks/{dashboard-json-CC5FPyln.js → dashboard-json-Bf3-8gq8.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-CkVRSfgf.js → edit-dashboard-visual-B8Mofk1U.js} +1 -1
  12. package/dist/chunks/{edit-dashboard-visual-BYhZFx_B.js → edit-dashboard-visual-DX76RXmE.js} +3 -3
  13. package/dist/chunks/{numeric-presentation-CGTcqocU.js → numeric-presentation-BJs5lSar.js} +4 -4
  14. package/dist/chunks/{report-preferences-dialog-Dpt-3Gkx.js → report-preferences-dialog-DMQjY7oS.js} +1 -1
  15. package/dist/chunks/{report-preferences-dialog-CDlNNs5F.js → report-preferences-dialog-DxK9_fbn.js} +1 -1
  16. package/dist/chunks/{use-create-flow-overlay-state-CCJylXK4.js → use-create-flow-overlay-state-BX3dLUMB.js} +1 -1
  17. package/dist/chunks/{use-create-flow-overlay-state-Du9wYMdG.js → use-create-flow-overlay-state-C6savp4F.js} +1 -1
  18. package/dist/dashboard/index.cjs +1 -1
  19. package/dist/dashboard/index.js +1 -1
  20. package/dist/data-app-builder/index.cjs +1 -1
  21. package/dist/data-app-builder/index.js +1 -1
  22. package/dist/format-utils/index.cjs +3 -2
  23. package/dist/format-utils/index.js +237 -137
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.js +4 -4
  26. package/dist/surfboard/index.cjs +1 -1
  27. package/dist/surfboard/index.js +2 -2
  28. package/dist/types/format-utils.d.ts +27 -0
  29. package/dist/types/main.d.ts +16 -10
  30. package/dist/types/types.d.ts +14 -10
  31. package/package.json +1 -1
  32. package/dist/chunks/dashboard-controls-BCkIDYU4.js +0 -36
@@ -1,36 +1,36 @@
1
- import { f as a } from "../chunks/numeric-presentation-CGTcqocU.js";
2
- import { a as W, b as $, c as k, d as I, e as O, g as J, p as K, h as Q, i as U, j as X, r as Y, k as Z, v as _ } from "../chunks/numeric-presentation-CGTcqocU.js";
3
- import { f as d, a as w, b as c, e as m } from "../chunks/csv-utils-suxSkJGj.js";
4
- import { c as g, d as ee, g as re, h as se, i as te, o as oe, p as ne, r as ue } from "../chunks/csv-utils-suxSkJGj.js";
5
- function z(r, e, t, s) {
6
- const o = r instanceof Date ? r.toISOString() : String(r), u = (s == null ? void 0 : s.browserTimezone) || t, n = (s == null ? void 0 : s.isSqlCard) ?? !1;
1
+ import { f as b, a as V } from "../chunks/numeric-presentation-BJs5lSar.js";
2
+ import { b as Q, c as U, d as X, e as Y, g as Z, p as _, h as F, i as g, j as ee, r as re, k as oe, v as te } from "../chunks/numeric-presentation-BJs5lSar.js";
3
+ import { f as $, a as C, b as m, e as h } from "../chunks/csv-utils-BZDvO2Fw.js";
4
+ import { c as ne, d as le, g as ue, h as ie, i as ce, o as ae, p as me, r as fe } from "../chunks/csv-utils-BZDvO2Fw.js";
5
+ function v(r, e, t, o) {
6
+ const s = r instanceof Date ? r.toISOString() : String(r), n = (o == null ? void 0 : o.browserTimezone) || t, l = (o == null ? void 0 : o.isSqlCard) ?? !1;
7
7
  if (e != null && e.useRelativeTime)
8
- return d(
9
- o,
8
+ return $(
9
+ s,
10
10
  (e == null ? void 0 : e.sourceTimezone) || "auto"
11
11
  );
12
- const l = e != null && e.useCustomFormat && (e != null && e.customFormat) ? e.customFormat : (e == null ? void 0 : e.format) || "MM/dd/yyyy";
13
- return w(
14
- o,
15
- l,
16
- e != null && e.timezone && (e == null ? void 0 : e.timezone) !== "auto" ? e.timezone : n ? u : t,
12
+ const u = e != null && e.useCustomFormat && (e != null && e.customFormat) ? e.customFormat : (e == null ? void 0 : e.format) || "MM/dd/yyyy";
13
+ return C(
14
+ s,
15
+ u,
16
+ e != null && e.timezone && (e == null ? void 0 : e.timezone) !== "auto" ? e.timezone : l ? n : t,
17
17
  (e == null ? void 0 : e.sourceTimezone) || "auto"
18
18
  );
19
19
  }
20
- function C(r, e, t) {
20
+ function N(r, e, t) {
21
21
  if (r == null)
22
22
  return "";
23
23
  if (!t.useFormattedValues || !e)
24
24
  return String(r);
25
25
  switch (e.type) {
26
26
  case "number":
27
- return typeof r == "number" ? a(
27
+ return typeof r == "number" ? b(
28
28
  r,
29
29
  e.numberFormat,
30
30
  t.locale
31
31
  ) : String(r);
32
32
  case "date":
33
- return z(
33
+ return v(
34
34
  r,
35
35
  e.dateFormat,
36
36
  t.timezone,
@@ -51,194 +51,294 @@ function C(r, e, t) {
51
51
  }
52
52
  function R(r, e) {
53
53
  return e.visibleColumns.map((t) => {
54
- const s = r[t], o = e.columnSettings[t];
55
- return C(s, o, {
54
+ const o = r[t], s = e.columnSettings[t];
55
+ return N(o, s, {
56
56
  useFormattedValues: e.useFormattedValues,
57
57
  timezone: e.timezone,
58
58
  locale: e.locale
59
59
  });
60
60
  });
61
61
  }
62
- function L(r, e) {
62
+ function j(r, e) {
63
63
  const t = [];
64
- e.includeHeaders && t.push(c(e.visibleColumns, e.delimiter));
65
- for (const s of r) {
66
- const o = R(s, e);
64
+ e.includeHeaders && t.push(m(e.visibleColumns, e.delimiter));
65
+ for (const o of r) {
66
+ const s = R(o, e);
67
67
  t.push(
68
- o.map((u) => m(u, e.delimiter)).join(e.delimiter)
68
+ s.map((n) => h(n, e.delimiter)).join(e.delimiter)
69
69
  );
70
70
  }
71
71
  return t;
72
72
  }
73
- function D(r, e, t = `
73
+ function q(r, e, t = `
74
74
  `) {
75
- return L(r, e).join(t);
75
+ return j(r, e).join(t);
76
76
  }
77
- function N(r, e, t) {
78
- return r == null ? "" : t.useFormattedValues ? typeof r == "number" && (e == null ? void 0 : e.type) === "number" ? a(
77
+ function z(r, e, t) {
78
+ return r == null ? "" : t.useFormattedValues ? typeof r == "number" && (e == null ? void 0 : e.type) === "number" ? b(
79
79
  r,
80
80
  e.numberFormat,
81
81
  t.locale
82
82
  ) : typeof r == "number" ? r.toLocaleString(t.locale) : String(r) : String(r);
83
83
  }
84
- function E(r, e, t) {
85
- var o, u;
86
- const s = [];
84
+ function B(r, e, t) {
85
+ var s, n;
86
+ const o = [];
87
87
  if (r.isSubtotal && !r.isGrandTotal) {
88
- const n = e.groupByColumns.findIndex(
89
- (l) => l.alias === r.subtotalLevel
88
+ const l = e.groupByColumns.findIndex(
89
+ (u) => u.alias === r.subtotalLevel
90
90
  );
91
- e.groupByColumns.forEach((l, i) => {
92
- var p, f, h, b;
93
- if (i === n) {
94
- const y = (f = (p = e.rowAggregates) == null ? void 0 : p.find(
95
- (V) => V.groupLevel === r.subtotalLevel
96
- )) == null ? void 0 : f.label, T = (b = (h = r.subtotalContext) == null ? void 0 : h.groupByValues) == null ? void 0 : b[l.alias];
97
- s.push(y ?? `Subtotal (${T ?? "Total"})`);
98
- } else i < n ? s.push(String(r[l.alias] ?? "")) : s.push("");
91
+ e.groupByColumns.forEach((u, i) => {
92
+ var c, a, p, y;
93
+ if (i === l) {
94
+ const T = (a = (c = e.rowAggregates) == null ? void 0 : c.find(
95
+ (d) => d.groupLevel === r.subtotalLevel
96
+ )) == null ? void 0 : a.label, E = (y = (p = r.subtotalContext) == null ? void 0 : p.groupByValues) == null ? void 0 : y[u.alias];
97
+ o.push(T ?? `Subtotal (${E ?? "Total"})`);
98
+ } else i < l ? o.push(String(r[u.alias] ?? "")) : o.push("");
99
99
  });
100
100
  } else if (r.isGrandTotal) {
101
- const n = (u = (o = e.rowAggregates) == null ? void 0 : o.find(
102
- (l) => l.groupLevel === "ALL"
103
- )) == null ? void 0 : u.label;
104
- s.push(n || "Grand Total"), e.groupByColumns.slice(1).forEach(() => s.push(""));
101
+ const l = (n = (s = e.rowAggregates) == null ? void 0 : s.find(
102
+ (u) => u.groupLevel === "ALL"
103
+ )) == null ? void 0 : n.label;
104
+ o.push(l || "Grand Total"), e.groupByColumns.slice(1).forEach(() => o.push(""));
105
105
  } else
106
- e.groupByColumns.forEach((n) => {
107
- s.push(String(r[n.alias] ?? ""));
106
+ e.groupByColumns.forEach((l) => {
107
+ o.push(String(r[l.alias] ?? ""));
108
108
  });
109
- return e.pivotSchema.filter((n) => n.isMetricColumn).forEach((n) => {
110
- const l = r[n.alias], i = t.columnSettings[n.alias];
111
- s.push(N(l, i, t));
112
- }), s;
109
+ return e.pivotSchema.filter((l) => l.isMetricColumn).forEach((l) => {
110
+ const u = r[l.alias], i = t.columnSettings[l.alias];
111
+ o.push(z(u, i, t));
112
+ }), o;
113
113
  }
114
- function A(r) {
114
+ function I(r) {
115
115
  const e = r.groupByColumns.map(
116
- (s) => s.label || s.name
117
- ), t = r.pivotSchema.filter((s) => s.isMetricColumn).map((s) => s.displayLabel || s.metricLabel || s.metricName || s.alias);
116
+ (o) => o.label || o.name
117
+ ), t = r.pivotSchema.filter((o) => o.isMetricColumn).map((o) => o.displayLabel || o.metricLabel || o.metricName || o.alias);
118
118
  return [...e, ...t];
119
119
  }
120
- function j(r, e, t) {
121
- const s = [];
120
+ function M(r, e, t) {
121
+ const o = [];
122
122
  if (t.includeHeaders) {
123
- const o = A(e);
124
- s.push(c(o, t.delimiter));
123
+ const s = I(e);
124
+ o.push(m(s, t.delimiter));
125
125
  }
126
- for (const o of r) {
127
- const u = E(
128
- o,
126
+ for (const s of r) {
127
+ const n = B(
128
+ s,
129
129
  e,
130
130
  t
131
131
  );
132
- s.push(
133
- u.map((n) => m(n, t.delimiter)).join(t.delimiter)
132
+ o.push(
133
+ n.map((l) => h(l, t.delimiter)).join(t.delimiter)
134
134
  );
135
135
  }
136
- return s;
136
+ return o;
137
137
  }
138
138
  function S(r, e, t) {
139
- for (const s of r) {
140
- if (s.level < t) {
141
- e[s.level].push(s.name);
142
- for (let o = 1; o < s.colspan; o++)
143
- e[s.level].push("");
139
+ for (const o of r) {
140
+ if (o.level < t) {
141
+ e[o.level].push(o.name);
142
+ for (let s = 1; s < o.colspan; s++)
143
+ e[o.level].push("");
144
144
  }
145
- s.children ? S(s.children, e, t) : s.columnKey && e[t].push(s.name);
145
+ o.children ? S(o.children, e, t) : o.columnKey && e[t].push(o.name);
146
146
  }
147
147
  }
148
- function B(r) {
149
- const e = r.pivotByColumns.length, t = r.groupByColumns.length, s = Array.from(
148
+ function A(r) {
149
+ const e = r.pivotByColumns.length, t = r.groupByColumns.length, o = Array.from(
150
150
  { length: e + 1 },
151
151
  () => []
152
152
  );
153
- for (let o = 0; o < e; o++)
154
- s[o].push(...Array(t).fill(""));
155
- if (s[e].push(
156
- ...r.groupByColumns.map((o) => o.label || o.name)
157
- ), S(r.columnHeadersTree, s, e), r.showRowTotals) {
158
- for (let o = 0; o < e; o++)
159
- s[o].push("");
160
- s[e].push("Total");
153
+ for (let s = 0; s < e; s++)
154
+ o[s].push(...Array(t).fill(""));
155
+ if (o[e].push(
156
+ ...r.groupByColumns.map((s) => s.label || s.name)
157
+ ), S(r.columnHeadersTree, o, e), r.showRowTotals) {
158
+ for (let s = 0; s < e; s++)
159
+ o[s].push("");
160
+ o[e].push("Total");
161
161
  }
162
- return s;
162
+ return o;
163
163
  }
164
- function H(r, e, t) {
164
+ function L(r, e, t) {
165
165
  if (r == null)
166
166
  return "";
167
167
  if (!t.useFormattedValues)
168
168
  return String(r);
169
- const s = t.columnSettings[e];
170
- return typeof r == "number" && (s == null ? void 0 : s.type) === "number" ? a(
169
+ const o = t.columnSettings[e];
170
+ return typeof r == "number" && (o == null ? void 0 : o.type) === "number" ? b(
171
171
  r,
172
- s.numberFormat,
172
+ o.numberFormat,
173
173
  t.locale
174
174
  ) : typeof r == "number" ? r.toLocaleString(t.locale) : String(r);
175
175
  }
176
176
  function P(r, e, t) {
177
- const s = [];
178
- r.fieldValues.forEach((u, n) => {
179
- r.isSubtotal && n === 0 ? s.push(`${u} Total`) : r.isSubtotal ? s.push("") : s.push(String(u ?? ""));
177
+ const o = [];
178
+ r.fieldValues.forEach((n, l) => {
179
+ r.isSubtotal && l === 0 ? o.push(`${n} Total`) : r.isSubtotal ? o.push("") : o.push(String(n ?? ""));
180
180
  });
181
- let o = 0;
182
- return e.columnHeaders.forEach((u) => {
181
+ let s = 0;
182
+ return e.columnHeaders.forEach((n) => {
183
183
  var i;
184
- const n = (i = r.cells[u]) == null ? void 0 : i.value, l = H(n, u, t);
185
- s.push(l), e.showRowTotals && typeof n == "number" && (o += n);
186
- }), e.showRowTotals && s.push(o.toLocaleString(t.locale)), s;
184
+ const l = (i = r.cells[n]) == null ? void 0 : i.value, u = L(l, n, t);
185
+ o.push(u), e.showRowTotals && typeof l == "number" && (s += l);
186
+ }), e.showRowTotals && o.push(s.toLocaleString(t.locale)), o;
187
187
  }
188
- function M(r, e, t) {
189
- const s = [];
188
+ function k(r, e, t) {
189
+ const o = [];
190
190
  if (t.includeHeaders) {
191
- const o = B(e);
192
- for (const u of o)
193
- s.push(c(u, t.delimiter));
191
+ const s = A(e);
192
+ for (const n of s)
193
+ o.push(m(n, t.delimiter));
194
194
  }
195
- for (const o of r) {
196
- const u = P(
197
- o,
195
+ for (const s of r) {
196
+ const n = P(
197
+ s,
198
198
  e,
199
199
  t
200
200
  );
201
- s.push(
202
- u.map((n) => m(n, t.delimiter)).join(t.delimiter)
201
+ o.push(
202
+ n.map((l) => h(l, t.delimiter)).join(t.delimiter)
203
203
  );
204
204
  }
205
- return s;
205
+ return o;
206
+ }
207
+ function f(r) {
208
+ if (r === null || typeof r != "object" || Array.isArray(r))
209
+ return !1;
210
+ const e = Object.getPrototypeOf(r);
211
+ return e === null || e === Object.prototype;
212
+ }
213
+ function w(r, e, t) {
214
+ const o = new Set(e), s = Object.keys(r).find((n) => !o.has(n));
215
+ if (s)
216
+ throw new Error(`${t} contains unknown property "${s}"`);
217
+ }
218
+ function D(r, e = "tableTotalsRequest") {
219
+ if (!f(r))
220
+ throw new Error(`${e} must be an object`);
221
+ if (w(r, ["source", "columns"], e), r.source !== "documentFlatTable")
222
+ throw new Error(`${e}.source must be documentFlatTable`);
223
+ if (!Array.isArray(r.columns) || r.columns.length === 0)
224
+ throw new Error(`${e}.columns must be a non-empty array`);
225
+ const t = /* @__PURE__ */ new Set();
226
+ let o = 0;
227
+ const s = r.columns.map((n, l) => {
228
+ const u = `${e}.columns.${l}`;
229
+ if (!f(n))
230
+ throw new Error(`${u} must be an object`);
231
+ w(n, ["fieldId", "role", "behavior", "label"], u);
232
+ const i = typeof n.fieldId == "string" ? n.fieldId.trim() : "";
233
+ if (!i)
234
+ throw new Error(`${u}.fieldId must be a non-empty string`);
235
+ if (t.has(i))
236
+ throw new Error(`${e}.columns duplicates fieldId "${i}"`);
237
+ if (t.add(i), n.role !== "detail" && n.role !== "groupby" && n.role !== "metric")
238
+ throw new Error(`${u}.role is invalid`);
239
+ const c = n.role;
240
+ if (n.behavior !== "sum" && n.behavior !== "avg" && n.behavior !== "count" && n.behavior !== "label")
241
+ throw new Error(`${u}.behavior is invalid`);
242
+ const a = n.behavior;
243
+ if (a === "label") {
244
+ if (o += 1, c === "metric")
245
+ throw new Error(`${u}.behavior label requires a non-metric role`);
246
+ } else if (c !== "metric")
247
+ throw new Error(`${u}.${a} requires metric role`);
248
+ if (n.label !== void 0 && typeof n.label != "string")
249
+ throw new Error(`${u}.label must be a string`);
250
+ return {
251
+ fieldId: i,
252
+ role: c,
253
+ behavior: a,
254
+ ...n.label !== void 0 ? { label: n.label } : {}
255
+ };
256
+ });
257
+ if (o > 1)
258
+ throw new Error(`${e}.columns may contain at most one label`);
259
+ return { source: "documentFlatTable", columns: s };
260
+ }
261
+ function G(r, e = "tableTotalsByColumnId") {
262
+ if (!f(r))
263
+ throw new Error(`${e} must be an object`);
264
+ const t = {};
265
+ for (const [o, s] of Object.entries(r)) {
266
+ if (!o.trim())
267
+ throw new Error(`${e} contains an empty column id`);
268
+ if (s !== null && typeof s != "string" && (typeof s != "number" || !Number.isFinite(s)))
269
+ throw new Error(`${e}.${o} must be a string, finite number, or null`);
270
+ t[o] = s;
271
+ }
272
+ if (Object.keys(t).length === 0)
273
+ throw new Error(`${e} must not be empty`);
274
+ return t;
275
+ }
276
+ function x(r) {
277
+ if (typeof r == "number")
278
+ return Number.isFinite(r) ? r : null;
279
+ if (!r.trim())
280
+ return null;
281
+ const e = Number(r);
282
+ return Number.isFinite(e) ? e : null;
283
+ }
284
+ function W(r) {
285
+ const e = new Map(
286
+ r.resolvedNumericFormats.flatMap(
287
+ (o) => o.target.kind === "column" ? [[o.target.columnKey, o.format]] : []
288
+ )
289
+ ), t = r.visibleColumns.map((o) => {
290
+ const n = Object.prototype.hasOwnProperty.call(
291
+ r.totalsByColumnId,
292
+ o
293
+ ) ? r.totalsByColumnId[o] : o === r.labelColumnKey ? "Total" : null;
294
+ if (n === null)
295
+ return "";
296
+ if (!r.useFormattedValues)
297
+ return String(n);
298
+ const l = e.get(o), u = l ? x(n) : null;
299
+ return l && u !== null ? V(u, l) : String(n);
300
+ });
301
+ return `${m(t, r.delimiter)}
302
+ `;
206
303
  }
207
304
  export {
208
- g as arrayToCSV,
209
- c as arrayToCSVRow,
210
- m as escapeCSVValue,
211
- E as formatAggregateRow,
212
- j as formatAggregateTableForCSV,
213
- C as formatCellValue,
214
- W as formatCurrency,
215
- w as formatDate,
216
- ee as formatDuration,
217
- re as formatMetricComparison,
218
- $ as formatNumber,
219
- k as formatNumberCustom,
220
- a as formatNumberWithColumnSettings,
221
- I as formatNumericCanonical,
222
- O as formatPercent,
305
+ ne as arrayToCSV,
306
+ m as arrayToCSVRow,
307
+ W as buildFlatTableExportTotalsFooter,
308
+ h as escapeCSVValue,
309
+ B as formatAggregateRow,
310
+ M as formatAggregateTableForCSV,
311
+ N as formatCellValue,
312
+ Q as formatCurrency,
313
+ C as formatDate,
314
+ le as formatDuration,
315
+ ue as formatMetricComparison,
316
+ U as formatNumber,
317
+ X as formatNumberCustom,
318
+ b as formatNumberWithColumnSettings,
319
+ V as formatNumericCanonical,
320
+ Y as formatPercent,
223
321
  P as formatPivotDataRow,
224
- M as formatPivotTableForCSV,
225
- d as formatRelativeTime,
322
+ k as formatPivotTableForCSV,
323
+ $ as formatRelativeTime,
226
324
  R as formatRowForExport,
227
- J as formatScientific,
228
- L as formatTableForCSV,
229
- A as generateAggregateHeaders,
230
- B as generatePivotHeaders,
231
- D as generateTableCSV,
232
- se as getTimezoneAbbreviation,
233
- te as getTimezoneName,
234
- oe as objectsToCSV,
235
- K as parseNumericCanonicalFormat,
236
- Q as parseNumericPresentationExecutionSnapshot,
237
- U as parseNumericPresentationSnapshotEntries,
238
- X as parseResolvedNumericCanonicalFormat,
239
- ne as parseWithSourceTimezone,
240
- Y as resolveCurrencyFractionDigits,
241
- Z as resolveNumericPresentation,
242
- ue as resolveTimezone,
243
- _ as validateCardExportNumericPresentationSnapshot
325
+ Z as formatScientific,
326
+ j as formatTableForCSV,
327
+ I as generateAggregateHeaders,
328
+ A as generatePivotHeaders,
329
+ q as generateTableCSV,
330
+ ie as getTimezoneAbbreviation,
331
+ ce as getTimezoneName,
332
+ ae as objectsToCSV,
333
+ G as parseFlatTableExportTotalsByColumnId,
334
+ D as parseFlatTableExportTotalsRequest,
335
+ _ as parseNumericCanonicalFormat,
336
+ F as parseNumericPresentationExecutionSnapshot,
337
+ g as parseNumericPresentationSnapshotEntries,
338
+ ee as parseResolvedNumericCanonicalFormat,
339
+ me as parseWithSourceTimezone,
340
+ re as resolveCurrencyFractionDigits,
341
+ oe as resolveNumericPresentation,
342
+ fe as resolveTimezone,
343
+ te as validateCardExportNumericPresentationSnapshot
244
344
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/dashboard-D2wh2Avv.js"),d=require("./chunks/common-types-C73-Ud1-.js"),v=require("./chunks/report-preferences-dialog-CDlNNs5F.js"),i=require("react/jsx-runtime"),r=require("./chunks/code-editor-BSENCZwR.js"),h=require("react"),P=require("./types/index.cjs"),l=require("./chunks/dashboard-briefing-launcher-DyhfpSOW.js"),N=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("./chunks/analyze-result-contract-BswhsmWT.js");require("./value-format-preferences/index.cjs");const R=require("./report-runtime-context/index.cjs");require("react-dom");require("./chunks/index-Dpm_VET4.js");const B=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js"),_=require("./chunks/index-jSrCwPQz.js");function w(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const o in a)if(o!=="default"){const u=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(t,o,u.get?u:{enumerable:!0,get:()=>a[o]})}}return t.default=a,Object.freeze(t)}const C=w(h);function j(a){const{displayPreferences:t,cardId:o,...u}=a,n={...u,id:a.dashboardId};return i.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:i.jsxs(e.SemaphorContextProvider,{dashboardProps:n,children:[i.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:a.cardId}),i.jsx(e.UXProvider,{appearance:a.appearance,children:i.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:i.jsx(e.Container,{type:"visual",cardId:o,...n,children:i.jsx(L,{cardId:o})})})})]})})}function L({cardId:a}){const t=r.useDashboardStore(n=>{var c;return(c=n.dashboard)==null?void 0:c.sheets}),{card:o,frame:u}=h.useMemo(()=>{const n=t==null?void 0:t.flatMap(s=>s.frames),c=n==null?void 0:n.flatMap(s=>s==null?void 0:s.cards),D=c==null?void 0:c.find(s=>(s==null?void 0:s.id)===a),E=n==null?void 0:n.find(s=>{var m;return(m=s==null?void 0:s.cards)==null?void 0:m.find(g=>(g==null?void 0:g.id)===a)});return{card:D,frame:E}},[t,a]);return!o||!u?i.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):i.jsx("main",{className:"flex h-full grow flex-col",children:i.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:c})=>i.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:i.jsx(e.DashboardCard,{card:o,frame:u})})})}function M(a,t,o,u){h.useEffect(()=>{a&&!o&&t&&u(e.cloneDeep(t))},[a,o,t,u])}function I({name:a,items:t,value:o,onChange:u,isLoading:n,isError:c,refetch:D,className:E,icon:s,showNone:m=!1}){const g=C.useRef(null),[b,T]=C.useState(!1),[y,S]=C.useState("100%"),x=m?[...t||[],{id:"none",name:"None"}]:t;C.useLayoutEffect(()=>{g.current&&S(g.current.offsetWidth)},[]);function A(){var f;return n?"Loading...":c?"Error":o?(f=t==null?void 0:t.find(p=>p.id===o))==null?void 0:f.name:`Select ${a}`}function F(f,p){u(p),T(!1)}return i.jsxs(r.Popover,{open:b,onOpenChange:T,children:[i.jsx(r.PopoverTrigger,{asChild:!0,children:i.jsxs(r.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":b,className:r.cn("flex h-9 w-full justify-between",E),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[s&&i.jsx("div",{className:"mr-2",children:s}),i.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:A()})]}),i.jsx(_.ChevronDown,{className:"size-4 opacity-50"})]})}),i.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:y},children:i.jsxs(e.Command,{children:[i.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[i.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),i.jsx(e.IconButton,{className:"h-7",onClick:D,children:i.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),i.jsxs(e.CommandList,{children:[i.jsxs(e.CommandEmpty,{children:["No ",a==null?void 0:a.toLowerCase()," found."]}),i.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>i.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:p=>F(p,f.id),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(r.Check,{className:r.cn("size-4",o===f.id?"opacity-100":"opacity-0")}),i.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function U(a,t){h.useEffect(()=>(a&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{a&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[a,t])}exports.BriefingAuthor=e.BriefingAuthor;exports.BriefingAuthorDialog=e.BriefingAuthorDialog;exports.BriefingUiCapabilitiesBoundary=e.BriefingUiCapabilitiesBoundary;exports.BriefingUiCapabilitiesProvider=e.BriefingUiCapabilitiesProvider;exports.BriefingsApiError=e.BriefingsApiError;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.ExportError=e.ExportError;exports.MatrixTableVisual=e.MatrixTableVisual;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.applyBriefingFormPatch=e.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=e.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=e.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=e.briefingToFormDraft;exports.cancelBriefingPreviewRun=e.cancelBriefingPreviewRun;exports.cancelBriefingRun=e.cancelBriefingRun;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createBriefing=e.createBriefing;exports.createBriefingFormDraft=e.createBriefingFormDraft;exports.createExport=e.createExport;exports.deleteBriefing=e.deleteBriefing;exports.deleteBriefingRun=e.deleteBriefingRun;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getBriefing=e.getBriefing;exports.getBriefingArtifact=e.getBriefingArtifact;exports.getBriefingEvidence=e.getBriefingEvidence;exports.getBriefingPreviewRun=e.getBriefingPreviewRun;exports.getBriefingRun=e.getBriefingRun;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listBriefingRuns=e.listBriefingRuns;exports.listBriefingTenantSummaries=e.listBriefingTenantSummaries;exports.listBriefings=e.listBriefings;exports.pauseBriefing=e.pauseBriefing;exports.polishBriefingText=e.polishBriefingText;exports.previewBriefingPlan=e.previewBriefingPlan;exports.resumeBriefing=e.resumeBriefing;exports.runBriefingNow=e.runBriefingNow;exports.runBriefingPreview=e.runBriefingPreview;exports.updateBriefing=e.updateBriefing;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useBriefingUiCapabilities=e.useBriefingUiCapabilities;exports.useCard=e.useCard;exports.useCardSummary=e.useCardSummary;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.validateBriefingFormDraft=e.validateBriefingFormDraft;exports.CALCULATED_FIELD_ENTITY_MARKER=d.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=d.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=d.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=d.EMPTY_SELECTION;exports.PivotMarkerEnum=d.PivotMarkerEnum;exports.getFieldRuntimeColumnName=d.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=d.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=d.hasCalculatedFormulaInputs;exports.isCalculatedDimension=d.isCalculatedDimension;exports.isCalculatedField=d.isCalculatedField;exports.isCalculatedMetric=d.isCalculatedMetric;exports.ReportPreferencesDialog=v.ReportPreferencesDialog;exports.createEmptyKpiConfig=r.createEmptyKpiConfig;exports.createSqlGenConfig=r.createSqlGenConfig;exports.emitDashboardLoad=r.emitDashboardLoad;exports.emitDashboardUnload=r.emitDashboardUnload;exports.fmt=r.fmt;exports.getColumnDataType=r.getColumnDataType;exports.getFilterValueType=r.getFilterValueType;exports.getFormattedTableNameForQuery=r.getFormattedTableNameForQuery;exports.getQualifiedTableName=r.getQualifiedTableName;exports.getSql=r.getSql;exports.invalidateToken=r.invalidateToken;exports.isBooleanDataType=r.isBooleanDataType;exports.isColumnInSqlGen=r.isColumnInSqlGen;exports.isDateDataType=r.isDateDataType;exports.isNumberDataType=r.isNumberDataType;exports.isTextDataType=r.isTextDataType;exports.resolveDataType=r.resolveDataType;exports.resolveDatamodelName=r.resolveDatamodelName;exports.useCurrentActiveCard=r.useCurrentActiveCard;exports.useCurrentCardConfig=r.useCurrentCardConfig;exports.useCurrentSheetActiveCards=r.useCurrentSheetActiveCards;exports.useDashboardActions=r.useDashboardActions;exports.useDashboardStore=r.useDashboardStore;exports.useEditorActions=r.useEditorActions;exports.useEditorStore=r.useEditorStore;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=P.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.AdvancedModeToggle=l.AdvancedModeToggle;exports.DashboardBriefingLauncher=l.DashboardBriefingLauncher;exports.DashboardControlsSettings=l.DashboardControlsSettings;exports.DashboardFilterControlsButton=l.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=l.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=l.DocumentControlsSettings;exports.ExportNotificationItem=l.ExportNotificationItem;exports.ExportNotificationList=l.ExportNotificationList;exports.NotificationBell=l.NotificationBell;exports.UnsavedChangesAlert=l.UnsavedChangesAlert;exports.VisualEditingControls=l.VisualEditingControls;exports.VisualsLibraryDialog=l.VisualsLibraryDialog;exports.WatchDashboardButton=l.WatchDashboardButton;exports.useExportPolling=l.useExportPolling;exports.useExportRecovery=l.useExportRecovery;exports.useDebouncedDirtyCheck=N.useDebouncedDirtyCheck;exports.DEFAULT_CALENDAR_CONTEXT=R.DEFAULT_CALENDAR_CONTEXT;exports.normalizeDashboardForDirtyCheck=B.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=B.serializeDashboardForDirtyCheck;exports.Combobox=I;exports.Visual=j;exports.useExposePrintState=U;exports.usePristineSnapshotInitializer=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/dashboard-DxynqfO7.js"),d=require("./chunks/common-types-C73-Ud1-.js"),v=require("./chunks/report-preferences-dialog-DxK9_fbn.js"),i=require("react/jsx-runtime"),r=require("./chunks/code-editor-BSENCZwR.js"),h=require("react"),P=require("./types/index.cjs"),l=require("./chunks/dashboard-briefing-launcher-h9DIL6l1.js"),N=require("./chunks/use-debounced-dirty-check-XHSwAefL.js");require("./chunks/analyze-result-contract-BswhsmWT.js");require("./value-format-preferences/index.cjs");const R=require("./report-runtime-context/index.cjs");require("react-dom");require("./chunks/index-Dpm_VET4.js");const B=require("./chunks/normalize-dashboard-for-dirty-check-BXRUMVb2.js"),_=require("./chunks/index-jSrCwPQz.js");function w(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const o in a)if(o!=="default"){const u=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(t,o,u.get?u:{enumerable:!0,get:()=>a[o]})}}return t.default=a,Object.freeze(t)}const C=w(h);function j(a){const{displayPreferences:t,cardId:o,...u}=a,n={...u,id:a.dashboardId};return i.jsx(e.ErrorBoundary,{FallbackComponent:e.Fallback,children:i.jsxs(e.SemaphorContextProvider,{dashboardProps:n,children:[i.jsx(e.SemaphorReadyIndicator,{componentType:"visual",componentId:a.cardId}),i.jsx(e.UXProvider,{appearance:a.appearance,children:i.jsx(e.DisplayPreferencesProvider,{displayPreferences:t,children:i.jsx(e.Container,{type:"visual",cardId:o,...n,children:i.jsx(L,{cardId:o})})})})]})})}function L({cardId:a}){const t=r.useDashboardStore(n=>{var c;return(c=n.dashboard)==null?void 0:c.sheets}),{card:o,frame:u}=h.useMemo(()=>{const n=t==null?void 0:t.flatMap(s=>s.frames),c=n==null?void 0:n.flatMap(s=>s==null?void 0:s.cards),D=c==null?void 0:c.find(s=>(s==null?void 0:s.id)===a),E=n==null?void 0:n.find(s=>{var m;return(m=s==null?void 0:s.cards)==null?void 0:m.find(g=>(g==null?void 0:g.id)===a)});return{card:D,frame:E}},[t,a]);return!o||!u?i.jsx(e.FallbackVisual,{error:new Error("Card not found"),resetErrorBoundary:()=>{},customerFacingMessage:`Card not found with ID: ${a}`}):i.jsx("main",{className:"flex h-full grow flex-col",children:i.jsx(e.ErrorBoundary,{FallbackComponent:({error:n,resetErrorBoundary:c})=>i.jsx(e.FallbackVisual,{error:n,resetErrorBoundary:c,customerFacingMessage:"Error creating visual. Please try again."}),children:i.jsx(e.DashboardCard,{card:o,frame:u})})})}function M(a,t,o,u){h.useEffect(()=>{a&&!o&&t&&u(e.cloneDeep(t))},[a,o,t,u])}function I({name:a,items:t,value:o,onChange:u,isLoading:n,isError:c,refetch:D,className:E,icon:s,showNone:m=!1}){const g=C.useRef(null),[b,T]=C.useState(!1),[y,S]=C.useState("100%"),x=m?[...t||[],{id:"none",name:"None"}]:t;C.useLayoutEffect(()=>{g.current&&S(g.current.offsetWidth)},[]);function A(){var f;return n?"Loading...":c?"Error":o?(f=t==null?void 0:t.find(p=>p.id===o))==null?void 0:f.name:`Select ${a}`}function F(f,p){u(p),T(!1)}return i.jsxs(r.Popover,{open:b,onOpenChange:T,children:[i.jsx(r.PopoverTrigger,{asChild:!0,children:i.jsxs(r.Button,{ref:g,variant:"outline",role:"combobox","aria-expanded":b,className:r.cn("flex h-9 w-full justify-between",E),children:[i.jsxs("div",{className:"flex items-center gap-2",children:[s&&i.jsx("div",{className:"mr-2",children:s}),i.jsx("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:A()})]}),i.jsx(_.ChevronDown,{className:"size-4 opacity-50"})]})}),i.jsx(r.PopoverContent,{className:"w-full p-0",style:{minWidth:y},children:i.jsxs(e.Command,{children:[i.jsxs("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[i.jsx(e.CommandInput,{className:"h-9",placeholder:"Search..."}),i.jsx(e.IconButton,{className:"h-7",onClick:D,children:i.jsx(e.RefreshCw,{className:r.cn("size-3.5 opacity-50",n&&"animate-spin")})})]}),i.jsxs(e.CommandList,{children:[i.jsxs(e.CommandEmpty,{children:["No ",a==null?void 0:a.toLowerCase()," found."]}),i.jsx(e.CommandGroup,{children:x==null?void 0:x.map(f=>i.jsx(e.CommandItem,{className:"overflow-x-auto",value:f.name,onSelect:p=>F(p,f.id),children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(r.Check,{className:r.cn("size-4",o===f.id?"opacity-100":"opacity-0")}),i.jsx("div",{title:f.name,children:f.name})]})},f.id))})]})]})})]})}function U(a,t){h.useEffect(()=>(a&&t&&(window.__SEMAPHOR_PRINT_STATE__={...t}),()=>{a&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__}),[a,t])}exports.BriefingAuthor=e.BriefingAuthor;exports.BriefingAuthorDialog=e.BriefingAuthorDialog;exports.BriefingUiCapabilitiesBoundary=e.BriefingUiCapabilitiesBoundary;exports.BriefingUiCapabilitiesProvider=e.BriefingUiCapabilitiesProvider;exports.BriefingsApiError=e.BriefingsApiError;exports.CardSummary=e.CardSummary;exports.Dashboard=e.Dashboard;exports.DashboardCreateDialogBase=e.DashboardCreateDialogBase;exports.DashboardExportDialog=e.DashboardExportDialog;exports.DashboardWC=e.DashboardWC;exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.ExportError=e.ExportError;exports.MatrixTableVisual=e.MatrixTableVisual;exports.ResourceType=e.ResourceType;exports.SemaphorContextProvider=e.SemaphorContextProvider;exports.SemaphorDataProvider=e.SemaphorQueryClient;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.ShareDialog=e.ShareDialog;exports.SummaryCard=e.SummaryCard;exports.Surfboard=e.DashboardPlus;exports.applyBriefingFormPatch=e.applyBriefingFormPatch;exports.briefingFormDraftToCreateRequest=e.briefingFormDraftToCreateRequest;exports.briefingFormDraftToUpdateRequest=e.briefingFormDraftToUpdateRequest;exports.briefingToFormDraft=e.briefingToFormDraft;exports.cancelBriefingPreviewRun=e.cancelBriefingPreviewRun;exports.cancelBriefingRun=e.cancelBriefingRun;exports.cancelExport=e.cancelExport;exports.cloneDeep=e.cloneDeep;exports.createBriefing=e.createBriefing;exports.createBriefingFormDraft=e.createBriefingFormDraft;exports.createExport=e.createExport;exports.deleteBriefing=e.deleteBriefing;exports.deleteBriefingRun=e.deleteBriefingRun;exports.downloadDocumentPdf=e.downloadDocumentPdf;exports.downloadPdf=e.downloadPdf;exports.formatFileSize=e.formatFileSize;exports.getBriefing=e.getBriefing;exports.getBriefingArtifact=e.getBriefingArtifact;exports.getBriefingEvidence=e.getBriefingEvidence;exports.getBriefingPreviewRun=e.getBriefingPreviewRun;exports.getBriefingRun=e.getBriefingRun;exports.getDownloadUrl=e.getDownloadUrl;exports.getExportStatus=e.getExportStatus;exports.getExports=e.getExports;exports.isExportComplete=e.isExportComplete;exports.isExportInProgress=e.isExportInProgress;exports.listBriefingRuns=e.listBriefingRuns;exports.listBriefingTenantSummaries=e.listBriefingTenantSummaries;exports.listBriefings=e.listBriefings;exports.pauseBriefing=e.pauseBriefing;exports.polishBriefingText=e.polishBriefingText;exports.previewBriefingPlan=e.previewBriefingPlan;exports.resumeBriefing=e.resumeBriefing;exports.runBriefingNow=e.runBriefingNow;exports.runBriefingPreview=e.runBriefingPreview;exports.updateBriefing=e.updateBriefing;exports.useActiveExports=e.useActiveExports;exports.useAddNewFrame=e.useAddNewFrame;exports.useBriefingUiCapabilities=e.useBriefingUiCapabilities;exports.useCard=e.useCard;exports.useCardSummary=e.useCardSummary;exports.useDashboardById=e.useDashboardById;exports.useDashboardQuery=e.useDashboardQuery;exports.useDashboardSummary=e.useDashboardSummary;exports.useDataColumns=e.useDataColumns;exports.useDateFilterHook=e.useDateFilterHook;exports.useEditorAside=e.useEditorAside;exports.useExportActions=e.useExportActions;exports.useExportStore=e.useExportStore;exports.useInProgressExportsCount=e.useInProgressExportsCount;exports.useManagementStore=e.useManagementStore;exports.useResourceManagement=e.useResourceManagement;exports.useTextFilterHook=e.useTextFilterHook;exports.validateBriefingFormDraft=e.validateBriefingFormDraft;exports.CALCULATED_FIELD_ENTITY_MARKER=d.CALCULATED_FIELD_ENTITY_MARKER;exports.CONTROL_CARD_DEFAULT_VALUE=d.CONTROL_CARD_DEFAULT_VALUE;exports.DATE_FORMAT_VALUES=d.DATE_FORMAT_VALUES;exports.EMPTY_SELECTION=d.EMPTY_SELECTION;exports.PivotMarkerEnum=d.PivotMarkerEnum;exports.getFieldRuntimeColumnName=d.getFieldRuntimeColumnName;exports.hasCalculatedFieldMarker=d.hasCalculatedFieldMarker;exports.hasCalculatedFormulaInputs=d.hasCalculatedFormulaInputs;exports.isCalculatedDimension=d.isCalculatedDimension;exports.isCalculatedField=d.isCalculatedField;exports.isCalculatedMetric=d.isCalculatedMetric;exports.ReportPreferencesDialog=v.ReportPreferencesDialog;exports.createEmptyKpiConfig=r.createEmptyKpiConfig;exports.createSqlGenConfig=r.createSqlGenConfig;exports.emitDashboardLoad=r.emitDashboardLoad;exports.emitDashboardUnload=r.emitDashboardUnload;exports.fmt=r.fmt;exports.getColumnDataType=r.getColumnDataType;exports.getFilterValueType=r.getFilterValueType;exports.getFormattedTableNameForQuery=r.getFormattedTableNameForQuery;exports.getQualifiedTableName=r.getQualifiedTableName;exports.getSql=r.getSql;exports.invalidateToken=r.invalidateToken;exports.isBooleanDataType=r.isBooleanDataType;exports.isColumnInSqlGen=r.isColumnInSqlGen;exports.isDateDataType=r.isDateDataType;exports.isNumberDataType=r.isNumberDataType;exports.isTextDataType=r.isTextDataType;exports.resolveDataType=r.resolveDataType;exports.resolveDatamodelName=r.resolveDatamodelName;exports.useCurrentActiveCard=r.useCurrentActiveCard;exports.useCurrentCardConfig=r.useCurrentCardConfig;exports.useCurrentSheetActiveCards=r.useCurrentSheetActiveCards;exports.useDashboardActions=r.useDashboardActions;exports.useDashboardStore=r.useDashboardStore;exports.useEditorActions=r.useEditorActions;exports.useEditorStore=r.useEditorStore;exports.DEFAULT_SEMANTIC_DOMAIN_ACCESS=P.DEFAULT_SEMANTIC_DOMAIN_ACCESS;exports.AdvancedModeToggle=l.AdvancedModeToggle;exports.DashboardBriefingLauncher=l.DashboardBriefingLauncher;exports.DashboardControlsSettings=l.DashboardControlsSettings;exports.DashboardFilterControlsButton=l.DashboardFilterControlsButton;exports.DashboardFilterControlsLauncher=l.DashboardFilterControlsLauncher;exports.DocumentControlsSettings=l.DocumentControlsSettings;exports.ExportNotificationItem=l.ExportNotificationItem;exports.ExportNotificationList=l.ExportNotificationList;exports.NotificationBell=l.NotificationBell;exports.UnsavedChangesAlert=l.UnsavedChangesAlert;exports.VisualEditingControls=l.VisualEditingControls;exports.VisualsLibraryDialog=l.VisualsLibraryDialog;exports.WatchDashboardButton=l.WatchDashboardButton;exports.useExportPolling=l.useExportPolling;exports.useExportRecovery=l.useExportRecovery;exports.useDebouncedDirtyCheck=N.useDebouncedDirtyCheck;exports.DEFAULT_CALENDAR_CONTEXT=R.DEFAULT_CALENDAR_CONTEXT;exports.normalizeDashboardForDirtyCheck=B.normalizeDashboardForDirtyCheck;exports.serializeDashboardForDirtyCheck=B.serializeDashboardForDirtyCheck;exports.Combobox=I;exports.Visual=j;exports.useExposePrintState=U;exports.usePristineSnapshotInitializer=M;
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { E as b, F as N, S, c as P, U as w, d as _, C as F, e as x, f as R, g as M, h as I, i as L, I as k, R as U, j as O, k as V, l as z, m as q } from "./chunks/dashboard-CPq4lMF5.js";
2
- import { B as pa, n as ma, o as ha, p as ga, q as Ca, r as Da, D as Ea, s as xa, t as ba, u as Ta, a as ya, v as Ba, M as va, w as Aa, x as Na, x as Sa, y as Pa, z as wa, b as _a, A as Fa, G as Ra, H as Ma, J as Ia, K as La, L as ka, N as Ua, O as Oa, P as Va, Q as za, T as qa, V as Wa, W as ja, X as Ha, Y as Qa, Z as Ga, _ as Ka, $ as Xa, a0 as Ya, a1 as $a, a2 as Ja, a3 as Za, a4 as ae, a5 as ee, a6 as se, a7 as re, a8 as oe, a9 as ie, aa as te, ab as ne, ac as le, ad as de, ae as ue, af as ce, ag as fe, ah as pe, ai as me, aj as he, ak as ge, al as Ce, am as De, an as Ee, ao as xe, ap as be, aq as Te, ar as ye, as as Be, at as ve, au as Ae, av as Ne, aw as Se, ax as Pe, ay as we } from "./chunks/dashboard-CPq4lMF5.js";
1
+ import { E as b, F as N, S, c as P, U as w, d as _, C as F, e as x, f as R, g as M, h as I, i as L, I as k, R as U, j as O, k as V, l as z, m as q } from "./chunks/dashboard-CCRvBqUy.js";
2
+ import { B as pa, n as ma, o as ha, p as ga, q as Ca, r as Da, D as Ea, s as xa, t as ba, u as Ta, a as ya, v as Ba, M as va, w as Aa, x as Na, x as Sa, y as Pa, z as wa, b as _a, A as Fa, G as Ra, H as Ma, J as Ia, K as La, L as ka, N as Ua, O as Oa, P as Va, Q as za, T as qa, V as Wa, W as ja, X as Ha, Y as Qa, Z as Ga, _ as Ka, $ as Xa, a0 as Ya, a1 as $a, a2 as Ja, a3 as Za, a4 as ae, a5 as ee, a6 as se, a7 as re, a8 as oe, a9 as ie, aa as te, ab as ne, ac as le, ad as de, ae as ue, af as ce, ag as fe, ah as pe, ai as me, aj as he, ak as ge, al as Ce, am as De, an as Ee, ao as xe, ap as be, aq as Te, ar as ye, as as Be, at as ve, au as Ae, av as Ne, aw as Se, ax as Pe, ay as we } from "./chunks/dashboard-CCRvBqUy.js";
3
3
  import { a as Fe, C as Re, D as Me, E as Ie, P as Le, g as ke, h as Ue, b as Oe, i as Ve, c as ze, d as qe } from "./chunks/common-types-ClkOI-3O.js";
4
- import { R as je } from "./chunks/report-preferences-dialog-Dpt-3Gkx.js";
4
+ import { R as je } from "./chunks/report-preferences-dialog-DMQjY7oS.js";
5
5
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
6
6
  import { u as W, P as j, a as H, B as Q, c as C, b as G, d as K } from "./chunks/code-editor-C8zzmSgt.js";
7
7
  import { e as Qe, f as Ge, g as Ke, h as Xe, i as Ye, j as $e, k as Je, l as Ze, m as as, n as es, o as ss, p as rs, q as os, r as is, s as ts, t as ns, v as ls, w as ds, x as us, y as cs, z as fs, A as ps, D as ms, E as hs } from "./chunks/code-editor-C8zzmSgt.js";
8
8
  import * as p from "react";
9
9
  import { useMemo as X, useEffect as T } from "react";
10
10
  import { DEFAULT_SEMANTIC_DOMAIN_ACCESS as Cs } from "./types/index.js";
11
- import { A as Es, D as xs, a as bs, b as Ts, c as ys, d as Bs, E as vs, e as As, N as Ns, U as Ss, V as Ps, f as ws, W as _s, u as Fs, g as Rs } from "./chunks/dashboard-briefing-launcher-n7BdUvVr.js";
11
+ import { A as Es, D as xs, a as bs, b as Ts, c as ys, d as Bs, E as vs, e as As, N as Ns, U as Ss, V as Ps, f as ws, W as _s, u as Fs, g as Rs } from "./chunks/dashboard-briefing-launcher-B5y65OKI.js";
12
12
  import { u as Is } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
13
13
  import "./chunks/analyze-result-contract-CfOBEwaC.js";
14
14
  import "./value-format-preferences/index.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/dashboard-D2wh2Avv.js"),r=require("../chunks/common-types-C73-Ud1-.js"),o=require("../chunks/report-preferences-dialog-CDlNNs5F.js");exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.Surfboard=e.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=r.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.ReportPreferencesDialog=o.ReportPreferencesDialog;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/dashboard-DxynqfO7.js"),r=require("../chunks/common-types-C73-Ud1-.js"),o=require("../chunks/report-preferences-dialog-DxK9_fbn.js");exports.DisplayFormatPreferencesFields=e.DisplayFormatPreferencesFields;exports.Surfboard=e.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=r.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;exports.ReportPreferencesDialog=o.ReportPreferencesDialog;
@@ -1,6 +1,6 @@
1
- import { a, b as o } from "../chunks/dashboard-CPq4lMF5.js";
1
+ import { a, b as o } from "../chunks/dashboard-CCRvBqUy.js";
2
2
  import { C as f, E } from "../chunks/common-types-ClkOI-3O.js";
3
- import { R as t } from "../chunks/report-preferences-dialog-Dpt-3Gkx.js";
3
+ import { R as t } from "../chunks/report-preferences-dialog-DMQjY7oS.js";
4
4
  export {
5
5
  f as CONTROL_CARD_DEFAULT_VALUE,
6
6
  a as DisplayFormatPreferencesFields,
@@ -26,6 +26,15 @@ export declare function arrayToCSV(rows: (string | number | null | undefined)[][
26
26
  */
27
27
  export declare function arrayToCSVRow(values: (string | number | null | undefined)[], delimiter?: string): string;
28
28
 
29
+ export declare function buildFlatTableExportTotalsFooter(params: {
30
+ totalsByColumnId: FlatTableExportTotalsByColumnId;
31
+ visibleColumns: readonly string[];
32
+ labelColumnKey?: string;
33
+ resolvedNumericFormats: readonly NumericPresentationSnapshotEntry[];
34
+ useFormattedValues: boolean;
35
+ delimiter: string;
36
+ }): string;
37
+
29
38
  declare type CalendarContext = {
30
39
  tz: string;
31
40
  weekStart: WeekStart;
@@ -193,6 +202,20 @@ export declare interface ExportFormattingConfig {
193
202
  visibleColumns: string[];
194
203
  }
195
204
 
205
+ export declare type FlatTableExportTotalsBehavior = 'sum' | 'avg' | 'count' | 'label';
206
+
207
+ export declare type FlatTableExportTotalsByColumnId = Record<string, string | number | null>;
208
+
209
+ export declare type FlatTableExportTotalsRequest = {
210
+ source: 'documentFlatTable';
211
+ columns: Array<{
212
+ fieldId: string;
213
+ role: 'detail' | 'groupby' | 'metric';
214
+ behavior: FlatTableExportTotalsBehavior;
215
+ label?: string;
216
+ }>;
217
+ };
218
+
196
219
  /**
197
220
  * Format an aggregate table row for CSV export
198
221
  */
@@ -495,6 +518,10 @@ export declare function objectsToCSV(data: Record<string, unknown>[], options?:
495
518
  columns?: string[];
496
519
  }): string;
497
520
 
521
+ export declare function parseFlatTableExportTotalsByColumnId(input: unknown, path?: string): FlatTableExportTotalsByColumnId;
522
+
523
+ export declare function parseFlatTableExportTotalsRequest(input: unknown, path?: string): FlatTableExportTotalsRequest;
524
+
498
525
  export declare function parseNumericCanonicalFormat(input: unknown): NumericCanonicalFormatParseResult;
499
526
 
500
527
  export declare function parseNumericPresentationExecutionSnapshot(input: unknown): NumericPresentationExecutionSnapshot;