react-semaphor 0.1.541 → 0.1.542

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-Btbp2-6v.js +2260 -0
  6. package/dist/chunks/{assistant-chat-D1fDZD6O.js → assistant-chat-oHF5lTjA.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-ChIyd_-L.js +1618 -0
  10. package/dist/chunks/custom-visual-inputs-DUtpYZOk.js +323 -0
  11. package/dist/chunks/{dashboard-briefing-launcher-DwjFpewq.js → dashboard-briefing-launcher-B-cm719R.js} +18 -18
  12. package/dist/chunks/{dashboard-controls-C_BI28ME.js → dashboard-controls-CIn22Qgp.js} +69 -70
  13. package/dist/chunks/{dashboard-filter-value-compatibility-D95O4nd7.js → dashboard-filter-value-compatibility-CwQ_iSNb.js} +2 -2
  14. package/dist/chunks/{dashboard-json-DDY15Trn.js → dashboard-json-ZUYsIExq.js} +4 -4
  15. package/dist/chunks/{dashboard-B6IrON_Q.js → dashboard-s5WJBcK8.js} +1 -1
  16. package/dist/chunks/{document-dashboard-inputs-DP_Op5mu.js → document-dashboard-inputs-C6MJVyoI.js} +2382 -4975
  17. package/dist/chunks/document-sheet-utils-BsZUnHRl.js +3619 -0
  18. package/dist/chunks/{edit-dashboard-visual-CH2dzWW-.js → edit-dashboard-visual-DLdereA7.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-CV5rHq5D.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-BSAqPpHt.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-BBlAfBA0.js +1155 -0
  31. package/dist/chunks/raw-temporal-presentation-CZ2r0Vb_.js +585 -0
  32. package/dist/chunks/{report-preferences-dialog-DpNkFfQO.js → report-preferences-dialog-MRUWpMcJ.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-DjPqgFly.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-BWSpRsPj.js} +37489 -39476
  37. package/dist/chunks/{shelf-drop-preview-context-BxV3Fl8h.js → shelf-drop-preview-context-CQbFLm3q.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-BHSnuZHd.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-BJDNqdOh.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
@@ -5,30 +5,30 @@ var xr = (e, t, r) => t.has(e) || yr("Cannot " + r);
5
5
  var Z = (e, t, r) => (xr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), se = (e, t, r) => t.has(e) ? yr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), J = (e, t, r, n) => (xr(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r);
6
6
  import { jsx as m, jsxs as T, Fragment as Ve } from "react/jsx-runtime";
7
7
  import { useCallback as ae, useRef as oe, useMemo as qe, useEffect as ke, useState as L, useLayoutEffect as Ze, useId as fo } from "react";
8
- import { u as H, db as mo, bV as ho, bX as go, aZ as vo, cJ as bo, P as yo, dc as xo, dd as wo, aW as _o, de as Io, bg as So, df as Gt, cE as Eo, dg as No, dh as Yt, di as bn, dj as ko, aR as yn, c8 as wr, dk as xn, dl as To, dm as Ao, dn as Co, bT as wn, aV as _n, aI as $o, aX as zo, bf as at, dp as Oo, dq as Mo, dr as Po, ds as Ro, Z as In, c5 as Zo, c6 as Do, c7 as jo, cc as Fo, dt as Lo, du as Uo, dv as Bo } from "./semaphor-ready-indicator-KT598QJq.js";
8
+ import { u as H, db as mo, bV as ho, bX as go, aZ as vo, cJ as bo, P as yo, dc as xo, dd as wo, aW as _o, de as Io, bg as So, df as Gt, cE as Eo, dg as No, dh as Yt, di as bn, dj as ko, aR as yn, c8 as wr, dk as xn, dl as To, dm as Ao, dn as Co, bT as wn, aV as _n, aI as $o, aX as zo, bf as at, dp as Oo, dq as Mo, dr as Po, ds as Ro, Z as In, c5 as Zo, c6 as Do, c7 as jo, cc as Fo, dt as Lo, du as Uo, dv as Bo } from "./semaphor-ready-indicator-BWSpRsPj.js";
9
9
  import { i as Vo } from "./conversation-sQiWYUOb.js";
10
- import { B as te, i as qo, j as Jo, c as Sn, L as Je, P as En, a as Nn, b as kn } from "./switch-DWEWiv1J.js";
10
+ import { B as te, i as qo, j as Jo, c as Sn, L as Je, P as En, a as Nn, b as kn } from "./switch-C3jLxlG0.js";
11
11
  import "./index-CuHybtft.js";
12
- import "./validators-Ej1DdCXa.js";
13
- import "./matrix-operation-contract-B8PBF1Gd.js";
12
+ import "./validators-DMHTpf7a.js";
13
+ import "./matrix-operation-contract-8OIO4gob.js";
14
14
  import "./analytics-base-schemas-BFAoRlkU.js";
15
15
  import "zod";
16
16
  import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as Ko } from "../value-format-preferences/index.js";
17
17
  import { c as q } from "./class-utils-Df1OVOT1.js";
18
18
  import { f as Tn } from "./editor-draft-sync-BN5qYHPF.js";
19
- import { k as Wo } from "./bookmark-state-k7y5SNGf.js";
19
+ import { A as Wo } from "./table-settings-CLZocegs.js";
20
20
  import { l as Go, m as Ke, c as _r, A as We, d as An } from "./context-ClREvqCZ.js";
21
- import { p as Ir, a as Yo, A as Cn } from "./saved-dashboard-context-CJ2WpoMF.js";
22
- import { al as Ho, j as Xo } from "./document-dashboard-inputs-DP_Op5mu.js";
23
- import { t as Qo } from "./document-sheet-utils-C1eEldxs.js";
21
+ import { p as Ir, a as Yo, A as Cn } from "./saved-dashboard-context-DjPqgFly.js";
22
+ import { ak as Ho, k as Xo } from "./document-dashboard-inputs-C6MJVyoI.js";
23
+ import { x as Qo } from "./document-sheet-utils-BsZUnHRl.js";
24
24
  import { w as es, c as $n } from "./visual-choice-JiJ-_3bi.js";
25
25
  import { A as ts, v as zn, t as rs, e as ue, d as ns, b as as, f as Ht, s as Dt, a as os } from "./add-to-dashboard-BuAqfA2Y.js";
26
- import { v as Sr } from "./custom-visual-inputs-BrUOIwln.js";
26
+ import { v as Sr } from "./custom-visual-inputs-DUtpYZOk.js";
27
27
  import { g as ss } from "./_commonjsHelpers-BkfeUUK-.js";
28
- import { h as Er, j as Nr, k as kr, e as Tr, f as is, c as ls } from "./temporal-bucket-D8JF7zKz.js";
29
- import { C as cs, a as us } from "./selection-reducer-vKIb_jS6.js";
28
+ import { S as Er, U as Nr, V as kr, O as Tr, f as is, F as ls } from "./temporal-bucket-D7NBrrtL.js";
29
+ import { C as cs, a as us } from "./selection-reducer-Dj_8xD69.js";
30
30
  import { c as yt, X as Ge } from "./x-4f5U2XwU.js";
31
- import { q as ds, s as ps, t as fs, u as ot, v as ms, w as Ar, x as hs } from "./matrix-formatter-DQ8avoIQ.js";
31
+ import { x as ds, y as ps, z as fs, A as ot, B as ms, C as Ar, E as hs } from "./matrix-formatter-BnsTX90d.js";
32
32
  import { L as Cr } from "./layout-grid-Bgzth8vd.js";
33
33
  function gs(e, t, r) {
34
34
  const n = ds(), a = (r == null ? void 0 : r.locale) ?? n.locale ?? ps, o = fs(e, t);
@@ -0,0 +1,118 @@
1
+ import { z as t } from "zod";
2
+ import { s as g, b as v } from "./matrix-operation-contract-8OIO4gob.js";
3
+ import { a as T } from "./metric-comparison-DEwi9uc2.js";
4
+ import { D as O, v as y } from "./dashboard-filter-value-compatibility-CwQ_iSNb.js";
5
+ import { k as E, j as A, i as V } from "./table-settings-CLZocegs.js";
6
+ const p = 1, j = ["PRIVATE", "TEAM", "DASHBOARD"], R = t.object({
7
+ filterId: t.string().min(1),
8
+ name: t.string(),
9
+ operation: t.string(),
10
+ valueType: t.enum(["string", "number", "date", "boolean"]),
11
+ values: t.array(t.unknown())
12
+ }).passthrough().superRefine((e, o) => {
13
+ const s = [];
14
+ O.has(e.operation) ? y(
15
+ e.operation,
16
+ e.values,
17
+ e.valueType,
18
+ "filterValue.values",
19
+ s
20
+ ) : s.push("filterValue.operation must be a valid filter operation.");
21
+ for (const i of s) o.addIssue({ code: "custom", message: i });
22
+ }), S = t.unknown().superRefine((e, o) => {
23
+ for (const s of T(e).errors)
24
+ o.addIssue({ code: "custom", message: s.message });
25
+ }), _ = t.discriminatedUnion("kind", [
26
+ t.object({ kind: t.literal("filter"), filterValue: R }).strict(),
27
+ t.object({ kind: t.literal("control"), value: t.unknown() }).strict(),
28
+ t.object({
29
+ kind: t.literal("selection"),
30
+ selection: g
31
+ }).strict()
32
+ ]), w = t.union([
33
+ t.object({
34
+ status: t.literal("set"),
35
+ value: _,
36
+ comparisonSelection: S.optional()
37
+ }).strict(),
38
+ t.object({
39
+ status: t.literal("cleared"),
40
+ comparisonSelection: S.optional()
41
+ }).strict(),
42
+ t.object({ comparisonSelection: S }).strict()
43
+ ]), k = ["bySheetId", "byCardId", "byDocumentSectionId"], B = /* @__PURE__ */ new Set(["version", "selectedSheetId", "inputs", "tableSettings"]), D = /* @__PURE__ */ new Set(["shared", ...k]), d = (e) => !!e && typeof e == "object" && !Array.isArray(e);
44
+ function b(e, o, s) {
45
+ if (e === void 0) return;
46
+ if (!d(e)) {
47
+ o.push({ target: "input", id: s });
48
+ return;
49
+ }
50
+ const i = {};
51
+ for (const [a, u] of Object.entries(e)) {
52
+ const c = a ? w.safeParse(u) : void 0;
53
+ c != null && c.success ? i[a] = c.data : o.push({
54
+ target: v(a) ? "selection" : "input",
55
+ id: a
56
+ });
57
+ }
58
+ return Object.keys(i).length ? i : void 0;
59
+ }
60
+ function K(e, o) {
61
+ if (o !== p)
62
+ return { ok: !1, error: `Unsupported bookmark version ${o}.` };
63
+ if (!d(e) || e.version !== p)
64
+ return { ok: !1, error: "The bookmark state is invalid." };
65
+ const s = [], i = Object.keys(e).filter((l) => !B.has(l));
66
+ let a;
67
+ typeof e.selectedSheetId == "string" && e.selectedSheetId ? a = e.selectedSheetId : e.selectedSheetId !== void 0 && s.push({ target: "sheet", id: String(e.selectedSheetId) });
68
+ const u = {};
69
+ if (d(e.inputs)) {
70
+ i.push(
71
+ ...Object.keys(e.inputs).filter((r) => !D.has(r)).map((r) => `inputs.${r}`)
72
+ );
73
+ const l = b(e.inputs.shared, s, "shared");
74
+ l && (u.shared = l);
75
+ for (const r of k) {
76
+ const n = e.inputs[r];
77
+ if (n === void 0) continue;
78
+ if (!d(n)) {
79
+ s.push({ target: "input", id: r });
80
+ continue;
81
+ }
82
+ const f = {};
83
+ for (const [h, I] of Object.entries(n)) {
84
+ const m = b(I, s, `${r}.${h}`);
85
+ m && (f[h] = m);
86
+ }
87
+ Object.keys(f).length && (u[r] = f);
88
+ }
89
+ } else e.inputs !== void 0 && i.push("inputs");
90
+ const c = {};
91
+ if (d(e.tableSettings))
92
+ for (const [l, r] of Object.entries(e.tableSettings)) {
93
+ const n = l ? E(r, V) : void 0;
94
+ n != null && n.ok ? A(n.value) || (c[l] = n.value) : s.push({ target: "card", id: l });
95
+ }
96
+ else e.tableSettings !== void 0 && i.push("tableSettings");
97
+ return {
98
+ ok: !0,
99
+ value: {
100
+ version: p,
101
+ ...a ? { selectedSheetId: a } : {},
102
+ ...Object.keys(u).length ? { inputs: u } : {},
103
+ ...Object.keys(c).length ? { tableSettings: c } : {}
104
+ },
105
+ issues: s,
106
+ unknownKeys: i
107
+ };
108
+ }
109
+ function F(e, o) {
110
+ const s = K(e, o);
111
+ return s.ok ? s.issues.some((i) => i.target === "card") ? { ok: !1, error: "The bookmark table settings are invalid." } : s.issues.length || s.unknownKeys.length ? { ok: !1, error: "The bookmark state is invalid." } : { ok: !0, value: s.value } : s;
112
+ }
113
+ export {
114
+ p as B,
115
+ j as a,
116
+ F as p,
117
+ K as r
118
+ };