react-semaphor 0.1.598 → 0.1.600
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.
- package/dist/analytics-protocol/index.js +336 -333
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +8 -8
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{add-to-dashboard-C86FsM8D.js → add-to-dashboard-ClhEIFst.js} +1 -1
- package/dist/chunks/{analytics-base-schemas-8wz9vqn_.js → analytics-base-schemas-DevrgqQb.js} +67 -60
- package/dist/chunks/{assistant-chat-DrI442Ld.js → assistant-chat-BULOkG9j.js} +88 -89
- package/dist/chunks/{bookmark-impact-C6uWtNWF.js → bookmark-impact-kdvXke8n.js} +3 -3
- package/dist/chunks/{bookmark-state-BfeKmj5s.js → bookmark-state-h1OLXVjE.js} +153 -153
- package/dist/chunks/{card-filter-builder-CSKCSpNo.js → card-filter-builder-CSCdSQQy.js} +1035 -1063
- package/dist/chunks/{comparison-window-caption-3bum5j00.js → comparison-window-caption-DJDwP9XO.js} +6 -6
- package/dist/chunks/{context-CVXTFljo.js → context-BJoEFgNl.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-C2AuKs10.js → dashboard-briefing-launcher-9YwUclHA.js} +255 -255
- package/dist/chunks/{dashboard-controls-BSbhyIkY.js → dashboard-controls-O6PNXMCp.js} +85 -85
- package/dist/chunks/{dashboard-json-Bd1rxD3y.js → dashboard-json-Bxf91TYq.js} +5 -5
- package/dist/chunks/{dashboard-PYd63LbL.js → dashboard-y9ON19ge.js} +1 -1
- package/dist/chunks/dates-DPTbpNxK.js +164 -0
- package/dist/chunks/{edit-dashboard-visual-D_0ZiWev.js → edit-dashboard-visual-CKwaW8H_.js} +5489 -5435
- package/dist/chunks/{filter-line-BdLyPYjH.js → filter-line-Dkg3yuOX.js} +6 -6
- package/dist/chunks/{filter-reach-copy-Dxn-mTuG.js → filter-reach-copy-ClzNcNhP.js} +1740 -1643
- package/dist/chunks/{filter-value-text-C6g-nDUW.js → filter-value-text-CXyuLW9Q.js} +4 -4
- package/dist/chunks/{index-BHSDE54O.js → index-CRo5--Y6.js} +7 -7
- package/dist/chunks/{layout-grid-CYR-LVpl.js → layout-grid-DSrBSfPM.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-C0IGLTZH.js → matrix-analytical-definition-i9PQY066.js} +443 -394
- package/dist/chunks/{matrix-member-presentation-D5BIYuy5.js → matrix-member-presentation-B_2beBc0.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-RckfqkQm.js → matrix-operation-contract-DdK0J_KU.js} +36 -36
- package/dist/chunks/{metric-comparison-DsE8wdRh.js → metric-comparison-Bhz0V841.js} +2 -2
- package/dist/chunks/{paintbrush-xDDRjIyF.js → paintbrush-1UiU-uTz.js} +1 -1
- package/dist/chunks/{palette-CbOgFCy2.js → palette-DFIFf_-m.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-Cnq55Uno.js → pivot-result-contract-expectations-Dk7WFR_u.js} +8 -8
- package/dist/chunks/{pivot-result-identity-b4-ugQhm.js → pivot-result-identity-CzzrJpEm.js} +1 -1
- package/dist/chunks/{raw-temporal-value-B9W38mi3.js → raw-temporal-value-BLvdaMng.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-DTu3a7ce.js → report-preferences-dialog-DiDsYpng.js} +14 -14
- package/dist/chunks/{report-runtime-context-BvJkcbar.js → report-runtime-context-CEGluufW.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-Bw-DesV2.js → resolve-dashboard-input-context-BAv33KGg.js} +11811 -11331
- package/dist/chunks/{save-BgvAsp6X.js → save-CWQ02kHo.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-BFh0oOnF.js → saved-dashboard-context-CvzYqADe.js} +97 -97
- package/dist/chunks/{selection-filter-compiler-DHYsq3yM.js → selection-filter-compiler-SwrBvyyJ.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-WvgHMnj8.js → semaphor-ready-indicator-1PRI9Yh2.js} +59336 -58569
- package/dist/chunks/{shelf-drop-preview-context-D6HgYFJp.js → shelf-drop-preview-context-BLk5Nc6K.js} +6 -6
- package/dist/chunks/{stored-dashboard-vlG0Knxi.js → stored-dashboard-xhYYKBsO.js} +1200 -1183
- package/dist/chunks/{style-sheet-parts-ClmvtkSC.js → style-sheet-parts-BX7d7-2-.js} +198 -198
- package/dist/chunks/{table-export-sheet-Bv6tVuMu.js → table-export-sheet-BWSVTclx.js} +1 -1
- package/dist/chunks/{token-types-eMdcuB6j.js → token-types-CnlEiAdS.js} +1 -1
- package/dist/chunks/{upload-ClUeK8F0.js → upload-DsqUSS8l.js} +1 -1
- package/dist/chunks/{validators-DwhBEvnh.js → validators-D2Hm57lJ.js} +23 -13
- package/dist/chunks/{variable-draft-CauoSBN0.js → variable-draft-DcKj8T1b.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2497 -2549
- package/dist/format-utils/index.js +14 -14
- package/dist/index.js +48 -48
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/surfboard/filter/types.d.ts +13 -1
- package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +0 -2
- package/dist/types/components/visual/data-table/types/data-table.d.ts +14 -21
- package/dist/types/index.js +5 -5
- package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +11 -1
- package/dist/types/lib/dashboard-view-state/drill-path.d.ts +7 -0
- package/dist/types/lib/dashboard-viewer/table-view.d.ts +20 -0
- package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +8 -0
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +1 -0
- package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +2 -0
- package/dist/types/lib/stores/dashboard-store.d.ts +3 -1
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +64 -0
- package/dist/types/shared/analytics-protocol/catalog-source-address.d.ts +16 -0
- package/dist/types/shared/analytics-protocol/column-filter-id.d.ts +4 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +26 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +12 -1
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/index.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +8 -1
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -1
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +29 -1
- package/dist/types/shared/usage-events/attribution.d.ts +2 -2
- package/dist/types/shared/usage-events/envelope.d.ts +2 -2
- package/dist/usage-events/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/aggregate-measure-field-DtKcEjG5.js +0 -22
- package/dist/chunks/dates-DHMCf-F7.js +0 -115
- package/dist/chunks/list-filter-B67GsjTw.js +0 -15
|
@@ -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-BAv33KGg.js";
|
|
2
|
+
import { d as y, e as T } from "./filter-reach-copy-ClzNcNhP.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-xhYYKBsO.js";
|
|
14
|
+
import { g as C } from "./saved-dashboard-context-CvzYqADe.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
|
+
};
|