react-semaphor 0.1.597 → 0.1.599

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 (96) hide show
  1. package/dist/analytics-protocol/index.js +355 -346
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/assistant-protocol/index.js +5 -5
  4. package/dist/brand-studio/index.js +8 -8
  5. package/dist/briefings/index.js +5 -5
  6. package/dist/chunks/{add-to-dashboard-C86FsM8D.js → add-to-dashboard-ClhEIFst.js} +1 -1
  7. package/dist/chunks/{analytics-base-schemas-8wz9vqn_.js → analytics-base-schemas-DevrgqQb.js} +67 -60
  8. package/dist/chunks/{assistant-chat-DUDiH9z4.js → assistant-chat-f3XuzrAm.js} +88 -89
  9. package/dist/chunks/{bookmark-impact-Dh-wiTs3.js → bookmark-impact-B5hyttm2.js} +3 -3
  10. package/dist/chunks/{bookmark-state-Be2W3s6t.js → bookmark-state-h1OLXVjE.js} +153 -153
  11. package/dist/chunks/{card-filter-builder-2-OxEBWf.js → card-filter-builder-DfLqD2RV.js} +1047 -1075
  12. package/dist/chunks/{comparison-window-caption-DmMFtNP5.js → comparison-window-caption-DJDwP9XO.js} +6 -6
  13. package/dist/chunks/{context-CVXTFljo.js → context-BJoEFgNl.js} +1 -1
  14. package/dist/chunks/{dashboard-g-7XY0Kw.js → dashboard-CoI4aOUc.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-CVDhvsTk.js → dashboard-briefing-launcher-RxYGtk-F.js} +181 -181
  16. package/dist/chunks/{dashboard-controls-CtQY-J33.js → dashboard-controls-DeaXrtLK.js} +85 -85
  17. package/dist/chunks/{dashboard-json-DkhzPI3-.js → dashboard-json-DvxKpKd_.js} +5 -5
  18. package/dist/chunks/dates-BhtO28Sn.js +164 -0
  19. package/dist/chunks/{edit-dashboard-visual-DWn74pCl.js → edit-dashboard-visual-C4f5hONA.js} +5489 -5433
  20. package/dist/chunks/{filter-line-BpdPq1D2.js → filter-line-Dkg3yuOX.js} +6 -6
  21. package/dist/chunks/{filter-reach-copy-DoXmRmk-.js → filter-reach-copy-Cl5Od38Q.js} +1760 -1584
  22. package/dist/chunks/{filter-value-text-CDQCIREQ.js → filter-value-text-CXyuLW9Q.js} +4 -4
  23. package/dist/chunks/{index-C0jX5wlM.js → index-EKpTtkYF.js} +7 -7
  24. package/dist/chunks/{layout-grid-DoFIfQGd.js → layout-grid-DSrBSfPM.js} +1 -1
  25. package/dist/chunks/{matrix-analytical-definition-CyWOwLmE.js → matrix-analytical-definition-BuUSBDm7.js} +242 -214
  26. package/dist/chunks/matrix-member-presentation-B_2beBc0.js +258 -0
  27. package/dist/chunks/{matrix-operation-contract-CAanJeCj.js → matrix-operation-contract-DdK0J_KU.js} +47 -47
  28. package/dist/chunks/{metric-comparison-BeKnUD08.js → metric-comparison-Bhz0V841.js} +2 -2
  29. package/dist/chunks/{paintbrush-KeaU1L1a.js → paintbrush-1UiU-uTz.js} +1 -1
  30. package/dist/chunks/{palette-BcFJLeXB.js → palette-DFIFf_-m.js} +1 -1
  31. package/dist/chunks/{pivot-result-contract-expectations-Dt0E1Wou.js → pivot-result-contract-expectations-Dk7WFR_u.js} +47 -47
  32. package/dist/chunks/{pivot-result-identity-BKUjYO1u.js → pivot-result-identity-CzzrJpEm.js} +1 -1
  33. package/dist/chunks/{raw-temporal-value-BzdgeDa7.js → raw-temporal-value-BLvdaMng.js} +2 -2
  34. package/dist/chunks/{report-preferences-dialog-5WUi6jC0.js → report-preferences-dialog-CZaYsQLK.js} +14 -14
  35. package/dist/chunks/{report-runtime-context-g4Zp_TU9.js → report-runtime-context-CEGluufW.js} +2 -2
  36. package/dist/chunks/{resolve-dashboard-input-context-DfJshnw8.js → resolve-dashboard-input-context-vPtbuDDz.js} +11786 -11247
  37. package/dist/chunks/{save-C9CZAk6V.js → save-CWQ02kHo.js} +1 -1
  38. package/dist/chunks/{saved-dashboard-context-DdhPU2Kq.js → saved-dashboard-context-C6X5nP4C.js} +97 -97
  39. package/dist/chunks/{selection-filter-compiler-BclSpK3P.js → selection-filter-compiler-Ce4BpjRX.js} +1 -1
  40. package/dist/chunks/{semaphor-ready-indicator-miYoJ-HP.js → semaphor-ready-indicator-BUiaKY6O.js} +60709 -59628
  41. package/dist/chunks/{shelf-drop-preview-context-D-awfyyo.js → shelf-drop-preview-context-CwxWJjBv.js} +6 -6
  42. package/dist/chunks/{stored-dashboard-D6FtWx_3.js → stored-dashboard-Bmct-STp.js} +1165 -1148
  43. package/dist/chunks/{style-sheet-parts-DM_Mw_sm.js → style-sheet-parts-BX7d7-2-.js} +198 -198
  44. package/dist/chunks/{table-export-sheet-DBlFMvE8.js → table-export-sheet-BWSVTclx.js} +1 -1
  45. package/dist/chunks/{token-types-BB2ImFx6.js → token-types-CnlEiAdS.js} +1 -1
  46. package/dist/chunks/{upload-CMTCg47S.js → upload-DsqUSS8l.js} +1 -1
  47. package/dist/chunks/{validators-BlEWWX9O.js → validators-D2Hm57lJ.js} +1090 -1071
  48. package/dist/chunks/{variable-draft-CxdgKDCx.js → variable-draft-Bi-zUa_a.js} +4 -4
  49. package/dist/dashboard/index.js +2 -2
  50. package/dist/dashboard-authoring/index.js +2554 -2538
  51. package/dist/format-utils/index.js +14 -14
  52. package/dist/index.js +48 -48
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +2 -2
  56. package/dist/types/components/surfboard/filter/types.d.ts +13 -1
  57. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -2
  58. package/dist/types/components/visual/data-table/types/data-table.d.ts +14 -21
  59. package/dist/types/index.js +5 -5
  60. package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +11 -1
  61. package/dist/types/lib/dashboard-view-state/drill-path.d.ts +7 -0
  62. package/dist/types/lib/dashboard-viewer/table-view.d.ts +20 -0
  63. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +8 -0
  64. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +1 -0
  65. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +2 -0
  66. package/dist/types/lib/stores/dashboard-store.d.ts +3 -1
  67. package/dist/types/lib/utils/filter-default-value-utils.d.ts +1 -1
  68. package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +64 -0
  69. package/dist/types/shared/analytics-protocol/catalog-field-grounding.d.ts +7 -0
  70. package/dist/types/shared/analytics-protocol/column-filter-id.d.ts +4 -0
  71. package/dist/types/shared/analytics-protocol/contracts.d.ts +26 -0
  72. package/dist/types/shared/analytics-protocol/index.d.ts +2 -0
  73. package/dist/types/shared/analytics-protocol/numeric-range-options.d.ts +46 -0
  74. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +12 -1
  75. package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +12 -0
  76. package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
  77. package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
  78. package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +4 -0
  79. package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
  80. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +63 -0
  81. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
  82. package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +2 -0
  83. package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
  84. package/dist/types/shared/dashboard-authoring/filter-model/number-condition-spec.d.ts +24 -0
  85. package/dist/types/shared/dashboard-authoring/filter-model/number-range-setting.d.ts +47 -0
  86. package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +8 -1
  87. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -1
  88. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +35 -3
  89. package/dist/types/shared/usage-events/attribution.d.ts +2 -2
  90. package/dist/types/shared/usage-events/envelope.d.ts +2 -2
  91. package/dist/usage-events/index.js +1 -1
  92. package/package.json +1 -1
  93. package/dist/chunks/aggregate-measure-field-DHlDj0Pc.js +0 -22
  94. package/dist/chunks/dates-B-bKEsiu.js +0 -115
  95. package/dist/chunks/list-filter-BeTQxjNy.js +0 -15
  96. package/dist/chunks/matrix-member-presentation-Bj2YcHAP.js +0 -169
@@ -0,0 +1,164 @@
1
+ import { d as p, h as D, e as F, r as b, a as m, j as g } from "./resolve-dashboard-input-context-vPtbuDDz.js";
2
+ import { d as y, e as T } from "./filter-reach-copy-Cl5Od38Q.js";
3
+ import "./validators-D2Hm57lJ.js";
4
+ import "./matrix-operation-contract-DdK0J_KU.js";
5
+ import "./analytics-base-schemas-DevrgqQb.js";
6
+ import "zod";
7
+ import "./pivot-result-contract-expectations-Dk7WFR_u.js";
8
+ import "../value-format-preferences/index.js";
9
+ import { D as N } from "./bookmark-state-h1OLXVjE.js";
10
+ import "./schema-C9NPiIru.js";
11
+ import "./index-CV_Kzou0.js";
12
+ import "./context-BJoEFgNl.js";
13
+ import { p as P, r as w } from "./stored-dashboard-Bmct-STp.js";
14
+ import { g as C } from "./saved-dashboard-context-C6X5nP4C.js";
15
+ function H(e, a, r) {
16
+ const t = e.findIndex((o) => o.id === a);
17
+ if (t === -1) return e;
18
+ const n = e.filter((o, s) => s !== t), i = Math.max(0, Math.min(Math.trunc(r), n.length));
19
+ return i === t ? e : [...n.slice(0, i), e[t], ...n.slice(i)];
20
+ }
21
+ const I = /* @__PURE__ */ new Set([
22
+ "bar",
23
+ "line",
24
+ "pie",
25
+ "doughnut",
26
+ "table",
27
+ "detailTable",
28
+ "stackedBar",
29
+ "stackedLine",
30
+ "horizontalBar",
31
+ "radar",
32
+ "polarArea",
33
+ "scatter",
34
+ "bubble",
35
+ "funnel",
36
+ "custom"
37
+ ]);
38
+ function U(e) {
39
+ return !!(e && I.has(e));
40
+ }
41
+ const k = 250;
42
+ function Y(e) {
43
+ return {
44
+ id: e.id,
45
+ ...p(e.field, {
46
+ dataSource: e.dataSource,
47
+ connectionId: e.connectionId
48
+ }),
49
+ width: k
50
+ };
51
+ }
52
+ function J(e, a, r) {
53
+ const t = e.flatMap((n) => {
54
+ if (r !== void 0 && n.id !== r) return [];
55
+ const i = (n.inlineFilters ?? []).findIndex((o) => o.id === a);
56
+ return i === -1 ? [] : [{ card: n, filter: n.inlineFilters[i], index: i }];
57
+ });
58
+ return t.length === 1 ? { kind: "found", ...t[0] } : t.length > 1 ? { kind: "ambiguous", cards: t.map((n) => n.card) } : { kind: "none" };
59
+ }
60
+ const X = ["hour", "day", "week", "month", "quarter", "year"], Z = 12, R = {
61
+ automatic: "Automatic",
62
+ card: "Set on this card",
63
+ trend_by: "From Trend By"
64
+ };
65
+ function G(e, a, r = {}) {
66
+ if (!e) return;
67
+ const t = e.granularity;
68
+ if (e.skipped)
69
+ return {
70
+ head: `Too many points by ${t}`,
71
+ // A Trend By sets the grain, so the fix is there (ledger P3-05).
72
+ detail: e.grainSource === "trend_by" ? "Pick a coarser grain on the Trend By." : "Pick a coarser grain, or Automatic."
73
+ };
74
+ const n = R[e.grainSource], i = e.span === "recent" ? `The last 12 ${t}s: no date range` : e.span === "history" ? `The 12 ${t}s ending with this one` : e.window ? y({ ...e.window, timezone: e.calendar.tz }, r.now) : void 0;
75
+ return {
76
+ head: `By ${t} · ${a} ${a === 1 ? "point" : "points"}`,
77
+ detail: i ? `${i} · ${n}` : n
78
+ };
79
+ }
80
+ function S(e, a) {
81
+ var t;
82
+ if (a.status === "blocked" || (t = e.sql) != null && t.trim()) return !1;
83
+ const r = new Set(
84
+ a.mappingDispositions.flatMap(
85
+ (n) => n.status === "apply" ? [n.filterValue.filterId] : []
86
+ )
87
+ );
88
+ return a.cardFilterValues.some((n) => {
89
+ const i = a.queryFilterDefinitions.find(
90
+ (d) => d.id === n.filterId
91
+ );
92
+ if (!D(n)) return !1;
93
+ if (!(r.has(n.filterId) || (i == null ? void 0 : i.kind) === "global-date"))
94
+ return !!(i && q(
95
+ [i],
96
+ a.resolvedPrimaryDateField,
97
+ [n]
98
+ ));
99
+ const s = F(n);
100
+ return !!(s && b({
101
+ card: e,
102
+ filter: s,
103
+ filterValue: n,
104
+ effectiveFilterValue: n,
105
+ temporalBinding: a.resolvedPrimaryDateField
106
+ }).status === "eligible");
107
+ });
108
+ }
109
+ function q(e, a, r) {
110
+ if (!a) return !1;
111
+ const t = a.qualifiedFieldName, n = a.qualifiedEntityName, i = n && a.name ? `${n}.${a.name}` : t;
112
+ return e.some((o) => {
113
+ if (!(m(o.dataType || "") === "date")) return !1;
114
+ const d = T(o, r), l = d.split("."), c = l[l.length - 1] || d, h = l.length > 1 ? l.slice(0, -1).join(".") : void 0, f = o.qualifiedTableName || h, u = f ? `${f}.${c}` : void 0;
115
+ return t ? u ? u === i || u.endsWith(`.${t}`) : c === a.name : u ? u === i : c === a.name;
116
+ });
117
+ }
118
+ function _(e, a) {
119
+ const r = (i) => {
120
+ const o = i.field;
121
+ return o ? a.id && o.id === a.id ? !0 : a.qualifiedFieldName && o.qualifiedFieldName ? o.qualifiedFieldName === a.qualifiedFieldName : o.name === a.name : !1;
122
+ }, t = (i) => i.conditions.some((o) => {
123
+ var s;
124
+ return m(((s = o.field) == null ? void 0 : s.dataType) || "") === "date" && r(o);
125
+ }) || i.groups.some(t), n = g(e);
126
+ return n ? t(n) : !1;
127
+ }
128
+ function v(e, a) {
129
+ var s, d;
130
+ const r = (d = (s = e.config) == null ? void 0 : s.groupByColumns) == null ? void 0 : d.find((l) => m(l.dataType || "") === "date"), t = a.resolvedPrimaryDateField, n = r ? { id: r.id, name: r.name, label: r.label || r.name, qualifiedFieldName: r.qualifiedFieldName } : t ? { name: t.name, label: t.name, qualifiedFieldName: t.qualifiedFieldName } : void 0;
131
+ if (!n) return { comparisonDate: null, dateWindow: a.status === "ready" ? "none" : "unknown" };
132
+ const i = { name: n.name, label: n.label };
133
+ if (_(e, n)) return { comparisonDate: i, dateWindow: "applies" };
134
+ if (a.status !== "ready") return { comparisonDate: i, dateWindow: "unknown" };
135
+ const o = S(e, { status: "ready", ...a.compiledFilters });
136
+ return { comparisonDate: i, dateWindow: o ? "applies" : "none" };
137
+ }
138
+ function ee(e) {
139
+ const a = P(e.dashboard), r = N(a).find((o) => o.cardId === e.cardId);
140
+ if (!r || r.kind === "documentSectionCard") return { comparisonDate: null, dateWindow: "unknown" };
141
+ const { runtimeValues: t, transientContexts: n } = w({ dashboard: a, capture: {}, calendar: e.calendar }), i = C({
142
+ dashboard: a,
143
+ location: r,
144
+ runtimeValues: t,
145
+ semanticExecutionPayload: e.semanticExecutionPayload,
146
+ calendar: e.calendar,
147
+ transientContexts: n
148
+ });
149
+ return v(
150
+ r.card,
151
+ (i == null ? void 0 : i.status) === "ready" ? { status: "ready", compiledFilters: i.compiledFilters, resolvedPrimaryDateField: i.resolvedPrimaryDateField } : { status: "blocked", resolvedPrimaryDateField: i == null ? void 0 : i.resolvedPrimaryDateField }
152
+ );
153
+ }
154
+ export {
155
+ X as K,
156
+ Z as a,
157
+ Y as b,
158
+ U as c,
159
+ G as d,
160
+ ee as e,
161
+ J as f,
162
+ H as m,
163
+ v as r
164
+ };