react-semaphor 0.1.587 → 0.1.589
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 +341 -338
- 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-DhP8wVtM.js → add-to-dashboard-C86FsM8D.js} +1 -1
- package/dist/chunks/{aggregate-measure-field-DsFXETpI.js → aggregate-measure-field-BrkXsSJp.js} +2 -2
- package/dist/chunks/{analytics-base-schemas-BaIQrEzX.js → analytics-base-schemas-8wz9vqn_.js} +173 -165
- package/dist/chunks/{assistant-chat-pfJK-T0b.js → assistant-chat-DBPa6sJU.js} +19 -18
- package/dist/chunks/{bookmark-impact-BSpGQL1M.js → bookmark-impact-B7pbMx2e.js} +2 -2
- package/dist/chunks/{bookmark-state-CL4WEpgB.js → bookmark-state-Bn7k3ttp.js} +5 -5
- package/dist/chunks/{card-filter-builder-C8PbhHjq.js → card-filter-builder-CGM7ROM0.js} +99 -99
- package/dist/chunks/{comparison-window-caption-CoART8BC.js → comparison-window-caption-fqijZdVd.js} +451 -395
- package/dist/chunks/{context-BTLBjQNh.js → context-CVXTFljo.js} +1 -1
- package/dist/chunks/{dashboard-CVj1oMoW.js → dashboard-UXH3E31V.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-TqA58rKz.js → dashboard-briefing-launcher-CTFuSWH_.js} +313 -329
- package/dist/chunks/{dashboard-controls-DQ8FsxAz.js → dashboard-controls-BcxWhOKw.js} +97 -97
- package/dist/chunks/{dashboard-json-DM88pmk2.js → dashboard-json-C-oBcKKC.js} +5 -5
- package/dist/chunks/dates-BunbHJH0.js +115 -0
- package/dist/chunks/{edit-dashboard-visual-BpRnU_6G.js → edit-dashboard-visual-COjKc_Du.js} +2796 -2783
- package/dist/chunks/{filter-line-Cu2u1K36.js → filter-line-Dza3ee4w.js} +5 -5
- package/dist/chunks/{filter-reach-copy-0Xp97cLk.js → filter-reach-copy-D5AmDHda.js} +944 -942
- package/dist/chunks/{filter-value-text-xefXzZlf.js → filter-value-text-DQw4v3nC.js} +6 -6
- package/dist/chunks/{index-D_QSeVKy.js → index-dGxJTaP1.js} +39 -39
- package/dist/chunks/{layout-grid-9nSS2SL-.js → layout-grid-BG__sPkb.js} +1 -1
- package/dist/chunks/{list-filter-CfMPI6v4.js → list-filter-Cb8i7N8f.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-DOVSFFuf.js → matrix-analytical-definition-SN0JUJVk.js} +3 -3
- package/dist/chunks/{matrix-member-presentation-BKDyxJho.js → matrix-member-presentation-DVBJR0MA.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-BM5TveR3.js → matrix-operation-contract-JSmproo9.js} +15 -15
- package/dist/chunks/{metric-comparison-ZmurmEIs.js → metric-comparison-xE_J6hkg.js} +2 -2
- package/dist/chunks/{paintbrush-LzAje2ff.js → paintbrush-C310xSuR.js} +1 -1
- package/dist/chunks/{palette-DicJG0TC.js → palette-Ci5P91Zb.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-CdeTU96P.js → pivot-header-presentation-D-DfPAjb.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-Bx_BCu-7.js → pivot-result-contract-expectations-DbBahmgc.js} +545 -536
- package/dist/chunks/{pivot-result-identity-Bvs6Uq3v.js → pivot-result-identity-CUsMt_4r.js} +1 -1
- package/dist/chunks/{raw-temporal-value-DH-feMc2.js → raw-temporal-value-BnGCWJAL.js} +1 -1
- package/dist/chunks/report-preferences-dialog-DtuOcejh.js +1637 -0
- package/dist/chunks/{report-runtime-context-NlOXwyRB.js → report-runtime-context-CrOgmuxO.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-zEXuitoF.js → resolve-dashboard-input-context-DFBIngUZ.js} +5617 -5485
- package/dist/chunks/{save-0wu1Z1U7.js → save-BhhXfp4s.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-Cll5LipJ.js → saved-dashboard-context-DKMTP9ib.js} +17 -17
- package/dist/chunks/selection-filter-compiler-DkIjp1yH.js +131 -0
- package/dist/chunks/{semaphor-ready-indicator-Bnj3H0Dm.js → semaphor-ready-indicator-HGEnCavj.js} +50770 -49867
- package/dist/chunks/{shelf-drop-preview-context-B8rmn6BD.js → shelf-drop-preview-context-DaCXCdMA.js} +112 -112
- package/dist/chunks/{stored-dashboard-CURqJgoa.js → stored-dashboard-CksluF2S.js} +1539 -1404
- package/dist/chunks/{style-sheet-parts-_dGSFzDi.js → style-sheet-parts-CmXmKqGw.js} +33 -33
- package/dist/chunks/{table-export-sheet-Dmtqi5NV.js → table-export-sheet-ClSgERQC.js} +1 -1
- package/dist/chunks/{token-types-DEe_FP4l.js → token-types-DTocOcwt.js} +1 -1
- package/dist/chunks/{upload-CtyOkU_B.js → upload-DDYc1Qjj.js} +1 -1
- package/dist/chunks/{validators-CJ8Jh0E8.js → validators-CrYXNnNE.js} +51 -49
- package/dist/chunks/{variable-draft-DIv-9y6Q.js → variable-draft-rbtGPvmX.js} +16 -14
- package/dist/chunks/visual-choice-DDfHfHvY.js +172 -0
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +821 -791
- package/dist/format-utils/index.js +162 -158
- package/dist/index.js +214 -215
- 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/index.js +5 -5
- package/dist/types/lib/dashboard-view-state/card-view-state.d.ts +39 -2
- package/dist/types/lib/dashboard-view-state/date-zoom.d.ts +65 -0
- package/dist/types/lib/dashboard-view-state/grain-pick.d.ts +38 -0
- package/dist/types/lib/dashboard-view-state/index.d.ts +2 -0
- package/dist/types/lib/formatters/grouped-temporal-presentation.d.ts +6 -2
- package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
- package/dist/types/lib/interactions/get-click-context-from-table.d.ts +2 -2
- package/dist/types/lib/query-context/assemble-card-query.d.ts +2 -1
- package/dist/types/lib/query-context/build-card-query-context.d.ts +15 -1
- package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +3 -0
- package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +14 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +7 -1
- package/dist/types/lib/types/explorer-types.d.ts +13 -0
- package/dist/types/lib/utils/card-config-utils.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +32 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +30 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +13 -0
- package/dist/types/shared/dashboard-authoring/automatic-grain.d.ts +77 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +13 -8
- package/dist/types/shared/dashboard-authoring/control-value-resolution.d.ts +24 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/kpi-trend-rule.d.ts +6 -29
- package/dist/types/shared/dashboard-authoring/variable-draft.d.ts +1 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/partial-period.d.ts +40 -0
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +11 -0
- package/dist/types/shared/usage-events/details.d.ts +2 -2
- package/dist/usage-events/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/dates-5z3b9Loo.js +0 -136
- package/dist/chunks/report-preferences-dialog-CXKmWyLm.js +0 -2028
- package/dist/chunks/selection-filter-compiler-BReJy-uv.js +0 -92
- package/dist/chunks/visual-choice-BBPizkRo.js +0 -206
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { d as D, e as h } from "./filter-reach-copy-D5AmDHda.js";
|
|
2
|
+
import { h as y, d as g, r as b, a as m, e as F } from "./resolve-dashboard-input-context-DFBIngUZ.js";
|
|
3
|
+
import "./validators-CrYXNnNE.js";
|
|
4
|
+
import "./matrix-operation-contract-JSmproo9.js";
|
|
5
|
+
import "./analytics-base-schemas-8wz9vqn_.js";
|
|
6
|
+
import "zod";
|
|
7
|
+
import "./pivot-result-contract-expectations-DbBahmgc.js";
|
|
8
|
+
import "../value-format-preferences/index.js";
|
|
9
|
+
import { A as w } from "./bookmark-state-Bn7k3ttp.js";
|
|
10
|
+
import "./schema-C9NPiIru.js";
|
|
11
|
+
import "./index-CV_Kzou0.js";
|
|
12
|
+
import "./context-CVXTFljo.js";
|
|
13
|
+
import { p as N, r as T } from "./stored-dashboard-CksluF2S.js";
|
|
14
|
+
import { g as C } from "./saved-dashboard-context-DKMTP9ib.js";
|
|
15
|
+
const M = ["hour", "day", "week", "month", "quarter", "year"], O = 12, P = {
|
|
16
|
+
automatic: "Automatic",
|
|
17
|
+
card: "Set on this card",
|
|
18
|
+
trend_by: "From Trend By"
|
|
19
|
+
};
|
|
20
|
+
function j(r, e, n = {}) {
|
|
21
|
+
if (!r) return;
|
|
22
|
+
const t = r.granularity;
|
|
23
|
+
if (r.skipped)
|
|
24
|
+
return {
|
|
25
|
+
head: `Too many points by ${t}`,
|
|
26
|
+
// A Trend By sets the grain, so the fix is there (review P3R-02).
|
|
27
|
+
detail: r.grainSource === "trend_by" ? "Pick a coarser grain on the Trend By." : "Pick a coarser grain, or Automatic."
|
|
28
|
+
};
|
|
29
|
+
const i = P[r.grainSource], a = r.span === "recent" ? `The last 12 ${t}s: no date range` : r.span === "history" ? `The 12 ${t}s ending with this one` : r.window ? D({ ...r.window, timezone: r.calendar.tz }, n.now) : void 0;
|
|
30
|
+
return {
|
|
31
|
+
head: `By ${t} · ${e} ${e === 1 ? "point" : "points"}`,
|
|
32
|
+
detail: a ? `${a} · ${i}` : i
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function q(r, e) {
|
|
36
|
+
var t;
|
|
37
|
+
if (e.status === "blocked" || (t = r.sql) != null && t.trim()) return !1;
|
|
38
|
+
const n = new Set(
|
|
39
|
+
e.mappingDispositions.flatMap(
|
|
40
|
+
(i) => i.status === "apply" ? [i.filterValue.filterId] : []
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
return e.cardFilterValues.some((i) => {
|
|
44
|
+
const a = e.queryFilterDefinitions.find(
|
|
45
|
+
(d) => d.id === i.filterId
|
|
46
|
+
);
|
|
47
|
+
if (!y(i)) return !1;
|
|
48
|
+
if (!(n.has(i.filterId) || (a == null ? void 0 : a.kind) === "global-date"))
|
|
49
|
+
return !!(a && $(
|
|
50
|
+
[a],
|
|
51
|
+
e.resolvedPrimaryDateField,
|
|
52
|
+
[i]
|
|
53
|
+
));
|
|
54
|
+
const s = g(i);
|
|
55
|
+
return !!(s && b({
|
|
56
|
+
card: r,
|
|
57
|
+
filter: s,
|
|
58
|
+
filterValue: i,
|
|
59
|
+
effectiveFilterValue: i,
|
|
60
|
+
temporalBinding: e.resolvedPrimaryDateField
|
|
61
|
+
}).status === "eligible");
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function $(r, e, n) {
|
|
65
|
+
if (!e) return !1;
|
|
66
|
+
const t = e.qualifiedFieldName, i = e.qualifiedEntityName, a = i && e.name ? `${i}.${e.name}` : t;
|
|
67
|
+
return r.some((o) => {
|
|
68
|
+
if (!(m(o.dataType || "") === "date")) return !1;
|
|
69
|
+
const d = h(o, n), l = d.split("."), c = l[l.length - 1] || d, p = l.length > 1 ? l.slice(0, -1).join(".") : void 0, f = o.qualifiedTableName || p, u = f ? `${f}.${c}` : void 0;
|
|
70
|
+
return t ? u ? u === a || u.endsWith(`.${t}`) : c === e.name : u ? u === a : c === e.name;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function R(r, e) {
|
|
74
|
+
const n = (a) => {
|
|
75
|
+
const o = a.field;
|
|
76
|
+
return o ? e.id && o.id === e.id ? !0 : e.qualifiedFieldName && o.qualifiedFieldName ? o.qualifiedFieldName === e.qualifiedFieldName : o.name === e.name : !1;
|
|
77
|
+
}, t = (a) => a.conditions.some((o) => {
|
|
78
|
+
var s;
|
|
79
|
+
return m(((s = o.field) == null ? void 0 : s.dataType) || "") === "date" && n(o);
|
|
80
|
+
}) || a.groups.some(t), i = F(r);
|
|
81
|
+
return i ? t(i) : !1;
|
|
82
|
+
}
|
|
83
|
+
function k(r, e) {
|
|
84
|
+
var s, d;
|
|
85
|
+
const n = (d = (s = r.config) == null ? void 0 : s.groupByColumns) == null ? void 0 : d.find((l) => m(l.dataType || "") === "date"), t = e.resolvedPrimaryDateField, i = n ? { id: n.id, name: n.name, label: n.label || n.name, qualifiedFieldName: n.qualifiedFieldName } : t ? { name: t.name, label: t.name, qualifiedFieldName: t.qualifiedFieldName } : void 0;
|
|
86
|
+
if (!i) return { comparisonDate: null, dateWindow: e.status === "ready" ? "none" : "unknown" };
|
|
87
|
+
const a = { name: i.name, label: i.label };
|
|
88
|
+
if (R(r, i)) return { comparisonDate: a, dateWindow: "applies" };
|
|
89
|
+
if (e.status !== "ready") return { comparisonDate: a, dateWindow: "unknown" };
|
|
90
|
+
const o = q(r, { status: "ready", ...e.compiledFilters });
|
|
91
|
+
return { comparisonDate: a, dateWindow: o ? "applies" : "none" };
|
|
92
|
+
}
|
|
93
|
+
function U(r) {
|
|
94
|
+
const e = N(r.dashboard), n = w(e).find((o) => o.cardId === r.cardId);
|
|
95
|
+
if (!n || n.kind === "documentSectionCard") return { comparisonDate: null, dateWindow: "unknown" };
|
|
96
|
+
const { runtimeValues: t, transientContexts: i } = T({ dashboard: e, capture: {}, calendar: r.calendar }), a = C({
|
|
97
|
+
dashboard: e,
|
|
98
|
+
location: n,
|
|
99
|
+
runtimeValues: t,
|
|
100
|
+
semanticExecutionPayload: r.semanticExecutionPayload,
|
|
101
|
+
calendar: r.calendar,
|
|
102
|
+
transientContexts: i
|
|
103
|
+
});
|
|
104
|
+
return k(
|
|
105
|
+
n.card,
|
|
106
|
+
(a == null ? void 0 : a.status) === "ready" ? { status: "ready", compiledFilters: a.compiledFilters, resolvedPrimaryDateField: a.resolvedPrimaryDateField } : { status: "blocked", resolvedPrimaryDateField: a == null ? void 0 : a.resolvedPrimaryDateField }
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
export {
|
|
110
|
+
M as K,
|
|
111
|
+
O as a,
|
|
112
|
+
U as b,
|
|
113
|
+
j as d,
|
|
114
|
+
k as r
|
|
115
|
+
};
|