react-semaphor 0.1.602 → 0.1.603
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 +415 -375
- 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-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
- package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
- package/dist/chunks/{assistant-chat-BWF3GYip.js → assistant-chat-B6hNQI1t.js} +146 -146
- package/dist/chunks/{bookmark-impact-BF3iRx5a.js → bookmark-impact-Ba2PLcGp.js} +3 -3
- package/dist/chunks/{bookmark-state-CBSTdW6q.js → bookmark-state-n7AaNzR_.js} +517 -516
- package/dist/chunks/{card-filter-builder-B8XHwMY6.js → card-filter-builder-Y22HizVx.js} +104 -104
- package/dist/chunks/{comparison-window-caption-W83qB4V5.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
- package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
- package/dist/chunks/{dashboard-DG5EIYYB.js → dashboard-BghI99oY.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CBSrhyWZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +103 -103
- package/dist/chunks/{dashboard-controls-D6ECO4N1.js → dashboard-controls-CtFXlyjV.js} +53 -53
- package/dist/chunks/{dashboard-json-DrJftBSL.js → dashboard-json-DfGBUtCd.js} +5 -5
- package/dist/chunks/dates-BnrXF4bb.js +185 -0
- package/dist/chunks/{edit-dashboard-visual-BDYAJIbb.js → edit-dashboard-visual-oxt3x1wb.js} +7976 -8184
- package/dist/chunks/{filter-line-BXT6y303.js → filter-line-Cy5YYqRL.js} +27 -27
- package/dist/chunks/{filter-reach-copy-BukhZmzm.js → filter-reach-copy-CE_ZX147.js} +1590 -1729
- package/dist/chunks/{filter-value-text-D3-bf3_b.js → filter-value-text-fWvSDwkl.js} +11 -11
- package/dist/chunks/{index-BW0yozjs.js → index-D5rxbtS4.js} +24 -24
- package/dist/chunks/{layout-grid-Ds0diMeY.js → layout-grid-9LndRoLa.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CgQgVeeI.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
- package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
- package/dist/chunks/{matrix-operation-contract--DkNCOzd.js → matrix-operation-contract-DPBj69D8.js} +3 -2
- package/dist/chunks/{metric-comparison-zMylnIkc.js → metric-comparison-B0FR-Q8I.js} +184 -125
- package/dist/chunks/{paintbrush-CX8pao1j.js → paintbrush-58FQYY-y.js} +1 -1
- package/dist/chunks/{palette-CuA0HlzF.js → palette-Be62Tkoa.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-C8KL7hPx.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
- package/dist/chunks/{pivot-result-identity-C1AOH1PS.js → pivot-result-identity-CAP4--iq.js} +1 -1
- package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
- package/dist/chunks/{report-preferences-dialog-CbuVNDGi.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
- package/dist/chunks/{report-runtime-context-E7USjN7E.js → report-runtime-context-c77_KF9v.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-CULCE_hM.js → resolve-dashboard-input-context-Rtl1ffmE.js} +7115 -6963
- package/dist/chunks/{save-BKHlDONy.js → save-C5A0JnEV.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-C1WlOx5z.js → saved-dashboard-context-tcyTU8jm.js} +193 -207
- package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
- package/dist/chunks/{semaphor-ready-indicator-CBIRcDWs.js → semaphor-ready-indicator-FBvunj6S.js} +35550 -35273
- package/dist/chunks/{shelf-drop-preview-context-xR69SMA8.js → shelf-drop-preview-context-QKStrcK9.js} +6 -6
- package/dist/chunks/{stored-dashboard-BuM8vnWf.js → stored-dashboard-CHozcAY9.js} +621 -616
- package/dist/chunks/{style-sheet-parts-Bt9ZNre8.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
- package/dist/chunks/{table-export-sheet-DVljtHkG.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
- package/dist/chunks/{token-types-D_xKgyVS.js → token-types-XbM6QByy.js} +1 -1
- package/dist/chunks/{upload-Dll_M7XQ.js → upload-H15d7uHK.js} +1 -1
- package/dist/chunks/{validators-ClWHpYql.js → validators-Baf3VIf5.js} +3 -3
- package/dist/chunks/{variable-draft-CDGGl53R.js → variable-draft-C2y8Jp6Z.js} +3 -3
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +2466 -2343
- package/dist/format-utils/index.js +205 -204
- package/dist/index.js +20 -20
- 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/ui-custom/date-range-presets.d.ts +8 -0
- package/dist/types/index.js +5 -5
- package/dist/types/lib/document/document-edits.d.ts +0 -4
- package/dist/types/lib/stores/dashboard-store.d.ts +0 -1
- package/dist/types/lib/types/common-types.d.ts +0 -2
- package/dist/types/lib/types/explorer-types.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
- package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
- package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
- package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
- package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +21 -358
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
- package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
- package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
- package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +33 -8
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +0 -2
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
- package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
- package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
- package/dist/types/shared/temporal/index.d.ts +2 -0
- package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
- package/dist/types/shared/temporal/temporal.d.ts +27 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
- package/dist/usage-events/index.js +1 -1
- package/package.json +3 -2
- package/dist/chunks/dates-Bz-qM5px.js +0 -164
- package/dist/chunks/matrix-member-presentation-DSBIIudt.js +0 -258
- package/dist/chunks/raw-temporal-value-E416F-0L.js +0 -454
- package/dist/chunks/selection-filter-compiler-ifT8JCXS.js +0 -131
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { i as m } from "./matrix-analytical-definition-CCp48UCw.js";
|
|
2
|
+
function d(e, t) {
|
|
3
|
+
var o, l;
|
|
4
|
+
const r = e.name.split(".").pop(), n = (o = e.fieldMeta) == null ? void 0 : o.qualifiedFieldName, i = !!(t.qualifiedFieldName && (n || e.name) === t.qualifiedFieldName), a = !((l = t.qualifiedFieldName) != null && l.includes(".")) && r === t.name;
|
|
5
|
+
return i || a;
|
|
6
|
+
}
|
|
7
|
+
const g = /* @__PURE__ */ new Set(["between", ">=", ">", "<=", "<", "="]);
|
|
8
|
+
function N(e) {
|
|
9
|
+
return e.dateOwner === "global_date";
|
|
10
|
+
}
|
|
11
|
+
function y(e, t, r = {}) {
|
|
12
|
+
const n = e.filters;
|
|
13
|
+
if (!n || !Array.isArray(n.conditions) || !f(n)) return e;
|
|
14
|
+
const i = t.filter(N);
|
|
15
|
+
if (!i.length) return e;
|
|
16
|
+
const a = (l) => {
|
|
17
|
+
var s;
|
|
18
|
+
return g.has(l.operator) && l.latestValue !== !0 && l.viewerZoom !== !0 && !((s = r.resolvedAtRun) != null && s.call(r, l)) && i.some(
|
|
19
|
+
(u) => d(u, { name: l.field.name, qualifiedFieldName: l.field.qualifiedFieldName })
|
|
20
|
+
);
|
|
21
|
+
}, o = n.conditions.filter((l) => !a(l));
|
|
22
|
+
return o.length === n.conditions.length ? e : { ...e, filters: { ...n, conditions: o } };
|
|
23
|
+
}
|
|
24
|
+
function f(e) {
|
|
25
|
+
var t;
|
|
26
|
+
return !e.negate && (e.logicalOperator === "AND" || e.conditions.length + (((t = e.groups) == null ? void 0 : t.length) ?? 0) <= 1);
|
|
27
|
+
}
|
|
28
|
+
function F(e, t, r) {
|
|
29
|
+
const n = t.filter((i) => !!i);
|
|
30
|
+
return e ? n.length ? Array.isArray(e.conditions) && f(e) ? { ...e, logicalOperator: "AND", groups: [...e.groups ?? [], ...n] } : { id: r, logicalOperator: "AND", negate: !1, conditions: [], groups: [e, ...n] } : e : n.length ? { id: r, logicalOperator: "AND", negate: !1, conditions: [], groups: n } : void 0;
|
|
31
|
+
}
|
|
32
|
+
function w(e) {
|
|
33
|
+
return !e || !Array.isArray(e.conditions) ? [] : f(e) ? [
|
|
34
|
+
...e.conditions,
|
|
35
|
+
...(e.groups ?? []).flatMap((t) => w(t))
|
|
36
|
+
] : [];
|
|
37
|
+
}
|
|
38
|
+
function O(e, t) {
|
|
39
|
+
const r = e.filters;
|
|
40
|
+
if (!r || !Array.isArray(r.conditions) || !f(r) || !t.length)
|
|
41
|
+
return e;
|
|
42
|
+
const n = (a, o) => {
|
|
43
|
+
var u;
|
|
44
|
+
if (m(a.filterId)) return !1;
|
|
45
|
+
const l = { name: o.field.name, qualifiedFieldName: o.field.qualifiedFieldName }, s = !((u = a.fieldMeta) != null && u.qualifiedFieldName);
|
|
46
|
+
return d(a, l) || s && a.name === l.name;
|
|
47
|
+
}, i = r.conditions.filter(
|
|
48
|
+
(a) => !t.some((o) => n(o, a))
|
|
49
|
+
);
|
|
50
|
+
return i.length === r.conditions.length ? e : { ...e, filters: { ...r, conditions: i } };
|
|
51
|
+
}
|
|
52
|
+
function q(e, t) {
|
|
53
|
+
return {
|
|
54
|
+
id: t,
|
|
55
|
+
field: e.field,
|
|
56
|
+
operator: e.operator,
|
|
57
|
+
value: e.value,
|
|
58
|
+
label: e.label,
|
|
59
|
+
temporalBucket: e.temporalBucket,
|
|
60
|
+
...e.rawTemporal ? { rawTemporal: e.rawTemporal } : {}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function c(e) {
|
|
64
|
+
var t;
|
|
65
|
+
return JSON.stringify([
|
|
66
|
+
((t = e.field) == null ? void 0 : t.id) ?? "",
|
|
67
|
+
e.operator,
|
|
68
|
+
e.value ?? null,
|
|
69
|
+
e.temporalBucket ?? null,
|
|
70
|
+
e.rawTemporal ?? null
|
|
71
|
+
]);
|
|
72
|
+
}
|
|
73
|
+
function A(e) {
|
|
74
|
+
return JSON.stringify(e.map(c).sort());
|
|
75
|
+
}
|
|
76
|
+
function p(e) {
|
|
77
|
+
const t = /* @__PURE__ */ new Map();
|
|
78
|
+
for (const r of e)
|
|
79
|
+
for (const n of r.tuples) {
|
|
80
|
+
const i = n.conditions.filter(
|
|
81
|
+
(l) => {
|
|
82
|
+
var s;
|
|
83
|
+
return (s = l.field) == null ? void 0 : s.id;
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
if (i.length === 0) continue;
|
|
87
|
+
let a = t.get(r.sourceCardId);
|
|
88
|
+
a || (a = /* @__PURE__ */ new Map(), t.set(r.sourceCardId, a));
|
|
89
|
+
const o = [...i].sort(
|
|
90
|
+
(l, s) => c(l).localeCompare(c(s))
|
|
91
|
+
);
|
|
92
|
+
a.set(A(o), o);
|
|
93
|
+
}
|
|
94
|
+
return [...t.entries()].sort(([r], [n]) => r.localeCompare(n)).map(([r, n]) => ({
|
|
95
|
+
sourceCardId: r,
|
|
96
|
+
tuples: [...n.entries()].sort(([i], [a]) => i.localeCompare(a)).map(([, i]) => ({ conditions: i }))
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
function b(e) {
|
|
100
|
+
const t = p(e);
|
|
101
|
+
if (t.length !== 0)
|
|
102
|
+
return {
|
|
103
|
+
id: "selection",
|
|
104
|
+
logicalOperator: "AND",
|
|
105
|
+
negate: !1,
|
|
106
|
+
conditions: [],
|
|
107
|
+
groups: t.map((r) => {
|
|
108
|
+
const n = `selection:${r.sourceCardId}`;
|
|
109
|
+
return {
|
|
110
|
+
id: n,
|
|
111
|
+
logicalOperator: "OR",
|
|
112
|
+
negate: !1,
|
|
113
|
+
conditions: [],
|
|
114
|
+
groups: r.tuples.map((i, a) => {
|
|
115
|
+
const o = `${n}:${a}`;
|
|
116
|
+
return {
|
|
117
|
+
id: o,
|
|
118
|
+
logicalOperator: "AND",
|
|
119
|
+
negate: !1,
|
|
120
|
+
conditions: i.conditions.map((l, s) => ({
|
|
121
|
+
...l,
|
|
122
|
+
id: `${o}:${s}`
|
|
123
|
+
})),
|
|
124
|
+
groups: []
|
|
125
|
+
};
|
|
126
|
+
})
|
|
127
|
+
};
|
|
128
|
+
})
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function D(e) {
|
|
132
|
+
return JSON.stringify(
|
|
133
|
+
p(e).map((t) => [
|
|
134
|
+
t.sourceCardId,
|
|
135
|
+
t.tuples.map((r) => r.conditions.map(c))
|
|
136
|
+
])
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
export {
|
|
140
|
+
f as a,
|
|
141
|
+
O as b,
|
|
142
|
+
b as c,
|
|
143
|
+
d as f,
|
|
144
|
+
N as i,
|
|
145
|
+
F as n,
|
|
146
|
+
D as s,
|
|
147
|
+
q as t,
|
|
148
|
+
w as u,
|
|
149
|
+
y as w
|
|
150
|
+
};
|