react-semaphor 0.1.583 → 0.1.585
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 +470 -428
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +7 -7
- package/dist/briefings/index.js +4 -4
- package/dist/chunks/aggregate-measure-field-DsFXETpI.js +22 -0
- package/dist/chunks/{assistant-chat-D3fm5qod.js → assistant-chat-BdbLmAnK.js} +12 -12
- package/dist/chunks/{bookmark-impact-Dpxl46Wd.js → bookmark-impact-BhT3k379.js} +2 -2
- package/dist/chunks/{bookmark-state-BEl_G9vr.js → bookmark-state-CL4WEpgB.js} +22 -22
- package/dist/chunks/{card-filter-builder-IxkFVxy2.js → card-filter-builder-CEcKF6Fw.js} +124 -124
- package/dist/chunks/comparison-window-caption-CoART8BC.js +1254 -0
- package/dist/chunks/{dashboard-BMqG98fc.js → dashboard-MPku_x1M.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D45YfCkm.js → dashboard-briefing-launcher-CkFNlkr1.js} +13 -13
- package/dist/chunks/{dashboard-controls-DOvZRfof.js → dashboard-controls-Clt4ovXS.js} +84 -84
- package/dist/chunks/{dashboard-json-B_4TqF_o.js → dashboard-json-DSmXazIg.js} +4 -4
- package/dist/chunks/{dates-44_rcNj2.js → dates-CYZW9owO.js} +8 -8
- package/dist/chunks/{edit-dashboard-visual-BBPKJWSe.js → edit-dashboard-visual-Dn2ECRbX.js} +2752 -2687
- package/dist/chunks/filter-line-Cu2u1K36.js +131 -0
- package/dist/chunks/{filter-reach-copy-DWPq4Swi.js → filter-reach-copy-CmJpPa4G.js} +1745 -1326
- package/dist/chunks/{filter-value-text-DXGYypEd.js → filter-value-text-xefXzZlf.js} +6 -6
- package/dist/chunks/{index-DPRzcFp0.js → index-0WYn6RMz.js} +37 -37
- package/dist/chunks/{layout-grid-8rR-LPTk.js → layout-grid-9nSS2SL-.js} +1 -1
- package/dist/chunks/{list-filter-C1-uTgjR.js → list-filter-CfMPI6v4.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-D_HgptqZ.js → matrix-analytical-definition-QjBgUYhP.js} +382 -544
- package/dist/chunks/{matrix-member-presentation-DRa-9e6Q.js → matrix-member-presentation-BKDyxJho.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-DCVinw1o.js → matrix-operation-contract-BM5TveR3.js} +153 -147
- package/dist/chunks/{metric-comparison-n9NsIa-2.js → metric-comparison-ZmurmEIs.js} +3 -3
- package/dist/chunks/{paintbrush-aR17Z3C9.js → paintbrush-LzAje2ff.js} +1 -1
- package/dist/chunks/{palette-a5FCZKFI.js → palette-DicJG0TC.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-MvvlxtIB.js → pivot-header-presentation-CdeTU96P.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-8tuNjRvG.js → pivot-result-contract-expectations-Bx_BCu-7.js} +1029 -1010
- package/dist/chunks/{pivot-result-identity-B89X5xjb.js → pivot-result-identity-Bvs6Uq3v.js} +1 -1
- package/dist/chunks/raw-temporal-value-DH-feMc2.js +322 -0
- package/dist/chunks/{report-preferences-dialog-B8PhISua.js → report-preferences-dialog-BRaeufEi.js} +63 -62
- package/dist/chunks/{report-runtime-context-BhPzLTbS.js → report-runtime-context-NlOXwyRB.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-BfT8y5xL.js → resolve-dashboard-input-context-Cn9jumxl.js} +4924 -4823
- package/dist/chunks/{save-D985VvYp.js → save-0wu1Z1U7.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-DH91-2B9.js → saved-dashboard-context-CfqkUMzR.js} +6 -6
- package/dist/chunks/selection-filter-compiler-BReJy-uv.js +92 -0
- package/dist/chunks/{semaphor-ready-indicator-Cg_Z2IDc.js → semaphor-ready-indicator-D6WjdTGl.js} +48377 -47074
- package/dist/chunks/{shelf-drop-preview-context-C7-BgcP4.js → shelf-drop-preview-context-Bbbrr9u4.js} +5 -5
- package/dist/chunks/{stored-dashboard-BpyCiE49.js → stored-dashboard-sPkTjxYf.js} +210 -221
- package/dist/chunks/{style-sheet-parts-C7qGZuH1.js → style-sheet-parts-_dGSFzDi.js} +2 -2
- package/dist/chunks/{table-export-sheet-wBkk17aa.js → table-export-sheet-Dmtqi5NV.js} +1 -1
- package/dist/chunks/{token-types-iKMplaBL.js → token-types-DEe_FP4l.js} +1 -1
- package/dist/chunks/{upload-CiGNKJ_0.js → upload-CtyOkU_B.js} +1 -1
- package/dist/chunks/{validators-B8fpdinG.js → validators-CJ8Jh0E8.js} +2 -2
- package/dist/chunks/{variable-draft-D8GFhAkm.js → variable-draft-D1RotIEG.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +670 -647
- package/dist/format-utils/index.js +218 -215
- package/dist/index.js +234 -231
- package/dist/report-runtime-context/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/visual/data-table/types/data-table.d.ts +3 -0
- package/dist/types/components/visual/matrix-table/matrix-interaction-actions.d.ts +24 -3
- package/dist/types/index.js +5 -5
- package/dist/types/lib/hooks/interactions/use-drill-actions.d.ts +1 -1
- package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +9 -0
- package/dist/types/lib/matrix-table/matrix-runtime.d.ts +8 -3
- package/dist/types/lib/query-context/compile-selection-filters.d.ts +1 -5
- package/dist/types/lib/see-records/click.d.ts +79 -0
- package/dist/types/lib/see-records/see-records-offer.d.ts +25 -0
- package/dist/types/lib/see-records/use-see-records-offer.d.ts +16 -0
- package/dist/types/lib/types/common-types.d.ts +6 -0
- package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/aggregate-measure-field.d.ts +13 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/selection-filter-compiler.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +6 -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 +2 -0
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +191 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +14 -0
- package/dist/types/shared/dashboard-authoring/see-records/availability.d.ts +30 -0
- package/dist/types/shared/dashboard-authoring/see-records/click.d.ts +37 -0
- package/dist/types/shared/dashboard-authoring/see-records/index.d.ts +12 -0
- package/dist/types/shared/dashboard-authoring/see-records/limits.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +49 -0
- package/dist/types/shared/dashboard-authoring/see-records/request.d.ts +28 -0
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +94 -0
- package/dist/types/shared/format-utils/semantic-format.d.ts +0 -1
- package/dist/types/shared/format-utils/temporal-bucket.d.ts +20 -0
- package/dist/types/shared/temporal/calendar-periods.d.ts +15 -0
- package/dist/types/shared/temporal/raw-temporal-equality.d.ts +14 -0
- package/dist/types/shared/usage-events/envelope.d.ts +4 -4
- package/package.json +1 -1
- package/dist/chunks/comparison-window-caption-sRFtnX1q.js +0 -1371
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +0 -159
- package/dist/chunks/selection-filter-compiler-CUDRnUxc.js +0 -80
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { j as N, r as g } from "./validators-CJ8Jh0E8.js";
|
|
2
|
+
import "./matrix-operation-contract-BM5TveR3.js";
|
|
3
|
+
import "./analytics-base-schemas-BaIQrEzX.js";
|
|
4
|
+
import { r as b } from "./metric-comparison-ZmurmEIs.js";
|
|
5
|
+
import { c as F } from "./raw-temporal-value-DH-feMc2.js";
|
|
6
|
+
import "../value-format-preferences/index.js";
|
|
7
|
+
const C = /^\d{4}-\d{2}-\d{2}$/;
|
|
8
|
+
function D(n) {
|
|
9
|
+
const r = n.split(".");
|
|
10
|
+
return r[r.length - 1].replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").split(" ").map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" ");
|
|
11
|
+
}
|
|
12
|
+
const T = 10;
|
|
13
|
+
function h(n, r) {
|
|
14
|
+
const s = n.slice(0, T).map(r).join(", "), o = n.length - T;
|
|
15
|
+
return o > 0 ? `${s}, and ${o} more` : s;
|
|
16
|
+
}
|
|
17
|
+
function E(n) {
|
|
18
|
+
if (n.valueType !== "date" || n.operation !== "between" && n.operation !== "not between")
|
|
19
|
+
return;
|
|
20
|
+
const r = g(n.relativeMeta);
|
|
21
|
+
return r && b(r).printsByName ? r : void 0;
|
|
22
|
+
}
|
|
23
|
+
function _(n, r) {
|
|
24
|
+
if (r !== "label") return E(n);
|
|
25
|
+
if (!(n.valueType !== "date" || n.operation !== "between" && n.operation !== "not between"))
|
|
26
|
+
return g(n.relativeMeta);
|
|
27
|
+
}
|
|
28
|
+
function y(n, r = {}) {
|
|
29
|
+
const { name: s, operation: o, values: e, valueType: m } = n, t = r.label ?? D(s), c = _(n, r.relativeDates);
|
|
30
|
+
if (c) {
|
|
31
|
+
const a = N(c).label;
|
|
32
|
+
if (a)
|
|
33
|
+
return o === "between" ? `${t}: ${a}` : `${t} not in ${a}`;
|
|
34
|
+
}
|
|
35
|
+
if (!e || e.length === 0)
|
|
36
|
+
return o === "is null" ? `${t} is empty` : o === "is not null" ? `${t} is not empty` : "";
|
|
37
|
+
const u = g(n.relativeMeta), $ = n.temporalPrecision === "minute" || !!(u && b(u).subDay), i = (a) => {
|
|
38
|
+
if (m === "date" && a) {
|
|
39
|
+
const d = {
|
|
40
|
+
year: "numeric",
|
|
41
|
+
month: "short",
|
|
42
|
+
day: "numeric",
|
|
43
|
+
...$ ? {
|
|
44
|
+
hour: "numeric",
|
|
45
|
+
minute: "2-digit"
|
|
46
|
+
} : {}
|
|
47
|
+
};
|
|
48
|
+
if (typeof a == "string" && C.test(a)) {
|
|
49
|
+
const [p, f, w] = a.split("-").map(Number);
|
|
50
|
+
return new Intl.DateTimeFormat(void 0, {
|
|
51
|
+
year: "numeric",
|
|
52
|
+
month: "short",
|
|
53
|
+
day: "numeric",
|
|
54
|
+
timeZone: "UTC"
|
|
55
|
+
}).format(new Date(Date.UTC(p, f - 1, w)));
|
|
56
|
+
}
|
|
57
|
+
if (typeof a == "string" && F(a) === "wall_datetime") {
|
|
58
|
+
const [p, f, w, v, L] = a.split(/[-T :.]/).map(Number);
|
|
59
|
+
return new Intl.DateTimeFormat(void 0, {
|
|
60
|
+
...d,
|
|
61
|
+
timeZone: "UTC"
|
|
62
|
+
}).format(new Date(Date.UTC(p, f - 1, w, v, L)));
|
|
63
|
+
}
|
|
64
|
+
const l = new Date(a);
|
|
65
|
+
if (!isNaN(l.getTime()))
|
|
66
|
+
try {
|
|
67
|
+
return new Intl.DateTimeFormat(void 0, {
|
|
68
|
+
...d,
|
|
69
|
+
...r.timezone ? { timeZone: r.timezone } : {}
|
|
70
|
+
}).format(l);
|
|
71
|
+
} catch {
|
|
72
|
+
return $ ? l.toLocaleString(void 0, d) : l.toLocaleDateString(void 0, d);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return String(a);
|
|
76
|
+
};
|
|
77
|
+
switch (o) {
|
|
78
|
+
case "=":
|
|
79
|
+
return `${t}: ${i(e[0])}`;
|
|
80
|
+
case "!=":
|
|
81
|
+
return `${t} ≠ ${i(e[0])}`;
|
|
82
|
+
case ">":
|
|
83
|
+
return `${t} > ${i(e[0])}`;
|
|
84
|
+
case "<":
|
|
85
|
+
return `${t} < ${i(e[0])}`;
|
|
86
|
+
case ">=":
|
|
87
|
+
return `${t} ≥ ${i(e[0])}`;
|
|
88
|
+
case "<=":
|
|
89
|
+
return `${t} ≤ ${i(e[0])}`;
|
|
90
|
+
case "between":
|
|
91
|
+
case "not between": {
|
|
92
|
+
const a = `${i(e[0])} - ${i(e[1])}`;
|
|
93
|
+
return o === "between" ? `${t}: ${a}` : `${t} not in ${a}`;
|
|
94
|
+
}
|
|
95
|
+
case "in":
|
|
96
|
+
return e.length === 1 ? `${t}: ${i(e[0])}` : `${t}: ${h(e, i)}`;
|
|
97
|
+
case "not in":
|
|
98
|
+
return `${t} not in (${h(e, i)})`;
|
|
99
|
+
case "like":
|
|
100
|
+
return `${t} contains "${e[0]}"`;
|
|
101
|
+
case "not like":
|
|
102
|
+
return `${t} doesn't contain "${e[0]}"`;
|
|
103
|
+
default:
|
|
104
|
+
return `${t}: ${h(e, i)}`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function S(n, r = {}) {
|
|
108
|
+
if (!n || n.length === 0)
|
|
109
|
+
return "";
|
|
110
|
+
const s = /* @__PURE__ */ new Map();
|
|
111
|
+
n.forEach((e) => {
|
|
112
|
+
const m = s.get(e.name) || [];
|
|
113
|
+
m.push(e), s.set(e.name, m);
|
|
114
|
+
});
|
|
115
|
+
const o = [];
|
|
116
|
+
return s.forEach((e, m) => {
|
|
117
|
+
if (e.length === 1) {
|
|
118
|
+
const t = y(e[0], r);
|
|
119
|
+
t && o.push(t);
|
|
120
|
+
} else {
|
|
121
|
+
const t = D(m), c = e.map((u) => y(u, r).replace(`${t}: `, "").replace(`${t} `, "")).filter(Boolean);
|
|
122
|
+
c.length > 0 && o.push(`${t}: ${c.join(" and ")}`);
|
|
123
|
+
}
|
|
124
|
+
}), o.join(" | ");
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
T as F,
|
|
128
|
+
S as a,
|
|
129
|
+
y as f,
|
|
130
|
+
E as r
|
|
131
|
+
};
|