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
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
var y = Object.defineProperty;
|
|
2
|
-
var h = (t, e, a) => e in t ? y(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
|
|
3
|
-
var l = (t, e, a) => h(t, typeof e != "symbol" ? e + "" : e, a);
|
|
4
|
-
import { R } from "./analytics-base-schemas-BaIQrEzX.js";
|
|
5
|
-
const f = /* @__PURE__ */ new Map();
|
|
6
|
-
function _(t, e) {
|
|
7
|
-
let a = f.get(e);
|
|
8
|
-
a || (a = new Intl.DateTimeFormat("en-CA", {
|
|
9
|
-
calendar: "gregory",
|
|
10
|
-
numberingSystem: "latn",
|
|
11
|
-
timeZone: e,
|
|
12
|
-
year: "numeric",
|
|
13
|
-
month: "2-digit",
|
|
14
|
-
day: "2-digit",
|
|
15
|
-
hour: "2-digit",
|
|
16
|
-
minute: "2-digit",
|
|
17
|
-
second: "2-digit",
|
|
18
|
-
hourCycle: "h23"
|
|
19
|
-
}), f.set(e, a));
|
|
20
|
-
const n = a.formatToParts(t), o = (r) => {
|
|
21
|
-
var s;
|
|
22
|
-
return Number((s = n.find((d) => d.type === r)) == null ? void 0 : s.value);
|
|
23
|
-
};
|
|
24
|
-
return {
|
|
25
|
-
year: o("year"),
|
|
26
|
-
month: o("month"),
|
|
27
|
-
day: o("day"),
|
|
28
|
-
hour: o("hour"),
|
|
29
|
-
minute: o("minute"),
|
|
30
|
-
second: o("second")
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
function m(t) {
|
|
34
|
-
const e = /* @__PURE__ */ new Date(0);
|
|
35
|
-
return e.setUTCFullYear(t.year, t.month - 1, t.day), e.setUTCHours(t.hour, t.minute, t.second, t.millisecond ?? 0), e.getTime();
|
|
36
|
-
}
|
|
37
|
-
function u(t, e) {
|
|
38
|
-
const a = t - (t % 1e3 + 1e3) % 1e3;
|
|
39
|
-
return m(_(new Date(a), e)) - a;
|
|
40
|
-
}
|
|
41
|
-
const c = 864e5;
|
|
42
|
-
function k(t, e) {
|
|
43
|
-
const a = b(t, e);
|
|
44
|
-
if (a.length) return a[0];
|
|
45
|
-
const n = m(t);
|
|
46
|
-
return new Date(n - u(n - c, e));
|
|
47
|
-
}
|
|
48
|
-
function b(t, e) {
|
|
49
|
-
const a = m(t), n = u(a - c, e), o = u(a + c, e);
|
|
50
|
-
return [.../* @__PURE__ */ new Set([n, o])].map((r) => a - r).filter((r) => u(r, e) === a - r).sort((r, s) => r - s).map((r) => new Date(r));
|
|
51
|
-
}
|
|
52
|
-
class i extends Error {
|
|
53
|
-
constructor(a) {
|
|
54
|
-
super(a);
|
|
55
|
-
l(this, "code");
|
|
56
|
-
this.name = "RawTemporalMetadataContractError", this.code = R.invalidMetadata;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
function g(t) {
|
|
60
|
-
if (t === null || typeof t != "object" || Array.isArray(t))
|
|
61
|
-
return !1;
|
|
62
|
-
const e = Object.getPrototypeOf(t);
|
|
63
|
-
return e === null || e === Object.prototype;
|
|
64
|
-
}
|
|
65
|
-
function N(t) {
|
|
66
|
-
if (!g(t))
|
|
67
|
-
throw new i(
|
|
68
|
-
"Raw temporal metadata must be an object."
|
|
69
|
-
);
|
|
70
|
-
const e = Object.keys(t);
|
|
71
|
-
if (e.length !== 2 || !e.includes("kind") || !e.includes("valueKind"))
|
|
72
|
-
throw new i(
|
|
73
|
-
"Raw temporal metadata must contain only kind and valueKind."
|
|
74
|
-
);
|
|
75
|
-
if (t.kind !== "raw_temporal")
|
|
76
|
-
throw new i(
|
|
77
|
-
"Raw temporal metadata kind must be raw_temporal."
|
|
78
|
-
);
|
|
79
|
-
if (t.valueKind !== "date" && t.valueKind !== "wall_datetime" && t.valueKind !== "instant")
|
|
80
|
-
throw new i(
|
|
81
|
-
"Raw temporal valueKind must be date, wall_datetime, or instant."
|
|
82
|
-
);
|
|
83
|
-
return {
|
|
84
|
-
kind: "raw_temporal",
|
|
85
|
-
valueKind: t.valueKind
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
function K(t, e) {
|
|
89
|
-
if (!t.rawTemporal) {
|
|
90
|
-
if (e.metadataRequired)
|
|
91
|
-
throw new i(
|
|
92
|
-
"Activated raw temporal result is missing metadata."
|
|
93
|
-
);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (t.temporalBucket)
|
|
97
|
-
throw new i(
|
|
98
|
-
"A result column cannot carry both raw and grouped temporal metadata."
|
|
99
|
-
);
|
|
100
|
-
const a = N(t.rawTemporal), n = a.valueKind === "date" ? "date" : "datetime";
|
|
101
|
-
if (t.dataType !== n)
|
|
102
|
-
throw new i(
|
|
103
|
-
`${a.valueKind} raw temporal values require dataType ${n}.`
|
|
104
|
-
);
|
|
105
|
-
return a;
|
|
106
|
-
}
|
|
107
|
-
const p = /^(\d{4})-(\d{2})-(\d{2})$/, w = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?$/, T = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|[+-]\d{2}:\d{2})$/;
|
|
108
|
-
function O(t) {
|
|
109
|
-
if (p.test(t)) return "date";
|
|
110
|
-
if (T.test(t)) return "instant";
|
|
111
|
-
if (w.test(t)) return "wall_datetime";
|
|
112
|
-
}
|
|
113
|
-
function A(t) {
|
|
114
|
-
return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
|
|
115
|
-
}
|
|
116
|
-
function C(t, e) {
|
|
117
|
-
return e === 2 ? A(t) ? 29 : 28 : [4, 6, 9, 11].includes(e) ? 30 : 31;
|
|
118
|
-
}
|
|
119
|
-
function v(t) {
|
|
120
|
-
return t.year >= 1 && t.year <= 9999 && t.month >= 1 && t.month <= 12 && t.day >= 1 && t.day <= C(t.year, t.month) && t.hour >= 0 && t.hour <= 23 && t.minute >= 0 && t.minute <= 59 && t.second >= 0 && t.second <= 59;
|
|
121
|
-
}
|
|
122
|
-
function E(t) {
|
|
123
|
-
return {
|
|
124
|
-
year: Number(t[1]),
|
|
125
|
-
month: Number(t[2]),
|
|
126
|
-
day: Number(t[3]),
|
|
127
|
-
hour: Number(t[4] ?? 0),
|
|
128
|
-
minute: Number(t[5] ?? 0),
|
|
129
|
-
second: Number(t[6] ?? 0),
|
|
130
|
-
fraction: t[7] ?? ""
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
function I(t, e) {
|
|
134
|
-
const a = e === "date" ? t.match(p) : e === "wall_datetime" ? t.match(w) : t.match(T);
|
|
135
|
-
if (!a) return { status: "invalid_shape" };
|
|
136
|
-
const n = E(a);
|
|
137
|
-
if (!v(n)) return { status: "out_of_range" };
|
|
138
|
-
if (e === "instant") {
|
|
139
|
-
const o = a[8];
|
|
140
|
-
if (o && o !== "Z") {
|
|
141
|
-
const [s, d] = o.slice(1).split(":").map(Number);
|
|
142
|
-
if (s > 23 || d > 59) return { status: "out_of_range" };
|
|
143
|
-
}
|
|
144
|
-
const r = new Date(t.replace(" ", "T"));
|
|
145
|
-
return Number.isNaN(r.getTime()) ? { status: "out_of_range" } : { status: "valid", fields: n, instant: r };
|
|
146
|
-
}
|
|
147
|
-
return { status: "valid", fields: n };
|
|
148
|
-
}
|
|
149
|
-
export {
|
|
150
|
-
i as R,
|
|
151
|
-
I as a,
|
|
152
|
-
_ as b,
|
|
153
|
-
O as c,
|
|
154
|
-
k as d,
|
|
155
|
-
N as p,
|
|
156
|
-
K as v,
|
|
157
|
-
m as w,
|
|
158
|
-
b as z
|
|
159
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
function u(e) {
|
|
2
|
-
var o;
|
|
3
|
-
return JSON.stringify([
|
|
4
|
-
((o = e.field) == null ? void 0 : o.id) ?? "",
|
|
5
|
-
e.operator,
|
|
6
|
-
e.value ?? null,
|
|
7
|
-
e.temporalBucket ?? null,
|
|
8
|
-
e.rawTemporal ?? null
|
|
9
|
-
]);
|
|
10
|
-
}
|
|
11
|
-
function p(e) {
|
|
12
|
-
return JSON.stringify(e.map(u).sort());
|
|
13
|
-
}
|
|
14
|
-
function c(e) {
|
|
15
|
-
const o = /* @__PURE__ */ new Map();
|
|
16
|
-
for (const t of e)
|
|
17
|
-
for (const r of t.tuples) {
|
|
18
|
-
const n = r.conditions.filter(
|
|
19
|
-
(a) => {
|
|
20
|
-
var i;
|
|
21
|
-
return (i = a.field) == null ? void 0 : i.id;
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
if (n.length === 0) continue;
|
|
25
|
-
let s = o.get(t.sourceCardId);
|
|
26
|
-
s || (s = /* @__PURE__ */ new Map(), o.set(t.sourceCardId, s));
|
|
27
|
-
const l = [...n].sort(
|
|
28
|
-
(a, i) => u(a).localeCompare(u(i))
|
|
29
|
-
);
|
|
30
|
-
s.set(p(l), l);
|
|
31
|
-
}
|
|
32
|
-
return [...o.entries()].sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => ({
|
|
33
|
-
sourceCardId: t,
|
|
34
|
-
tuples: [...r.entries()].sort(([n], [s]) => n.localeCompare(s)).map(([, n]) => ({ conditions: n }))
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
function d(e) {
|
|
38
|
-
const o = c(e);
|
|
39
|
-
if (o.length !== 0)
|
|
40
|
-
return {
|
|
41
|
-
id: "selection",
|
|
42
|
-
logicalOperator: "AND",
|
|
43
|
-
negate: !1,
|
|
44
|
-
conditions: [],
|
|
45
|
-
groups: o.map((t) => {
|
|
46
|
-
const r = `selection:${t.sourceCardId}`;
|
|
47
|
-
return {
|
|
48
|
-
id: r,
|
|
49
|
-
logicalOperator: "OR",
|
|
50
|
-
negate: !1,
|
|
51
|
-
conditions: [],
|
|
52
|
-
groups: t.tuples.map((n, s) => {
|
|
53
|
-
const l = `${r}:${s}`;
|
|
54
|
-
return {
|
|
55
|
-
id: l,
|
|
56
|
-
logicalOperator: "AND",
|
|
57
|
-
negate: !1,
|
|
58
|
-
conditions: n.conditions.map((a, i) => ({
|
|
59
|
-
...a,
|
|
60
|
-
id: `${l}:${i}`
|
|
61
|
-
})),
|
|
62
|
-
groups: []
|
|
63
|
-
};
|
|
64
|
-
})
|
|
65
|
-
};
|
|
66
|
-
})
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function f(e) {
|
|
70
|
-
return JSON.stringify(
|
|
71
|
-
c(e).map((o) => [
|
|
72
|
-
o.sourceCardId,
|
|
73
|
-
o.tuples.map((t) => t.conditions.map(u))
|
|
74
|
-
])
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
export {
|
|
78
|
-
d as c,
|
|
79
|
-
f as s
|
|
80
|
-
};
|