react-semaphor 0.1.596 → 0.1.598
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 +329 -322
- 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-DHlDj0Pc.js → aggregate-measure-field-DtKcEjG5.js} +2 -2
- package/dist/chunks/{assistant-chat-DodZKMI6.js → assistant-chat-DrI442Ld.js} +13 -13
- package/dist/chunks/{bookmark-impact-Dh-wiTs3.js → bookmark-impact-C6uWtNWF.js} +3 -3
- package/dist/chunks/{bookmark-state-Be2W3s6t.js → bookmark-state-BfeKmj5s.js} +4 -4
- package/dist/chunks/{card-filter-builder-BZIj-ib3.js → card-filter-builder-CSKCSpNo.js} +58 -58
- package/dist/chunks/{comparison-window-caption-DmMFtNP5.js → comparison-window-caption-3bum5j00.js} +5 -5
- package/dist/chunks/{dashboard-BCd8aKDN.js → dashboard-PYd63LbL.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CE_z5Gh1.js → dashboard-briefing-launcher-C2AuKs10.js} +1157 -1152
- package/dist/chunks/{dashboard-controls-IG2KRX1y.js → dashboard-controls-BSbhyIkY.js} +15 -15
- package/dist/chunks/{dashboard-json-o-XrNqNW.js → dashboard-json-Bd1rxD3y.js} +4 -4
- package/dist/chunks/{dates-B-bKEsiu.js → dates-DHMCf-F7.js} +8 -8
- package/dist/chunks/{edit-dashboard-visual-HPTVtWGk.js → edit-dashboard-visual-D_0ZiWev.js} +498 -496
- package/dist/chunks/{filter-line-BpdPq1D2.js → filter-line-BdLyPYjH.js} +5 -5
- package/dist/chunks/{filter-reach-copy-DoXmRmk-.js → filter-reach-copy-Dxn-mTuG.js} +1301 -1222
- package/dist/chunks/{filter-value-text-CDQCIREQ.js → filter-value-text-C6g-nDUW.js} +4 -4
- package/dist/chunks/{index-C0jX5wlM.js → index-BHSDE54O.js} +5 -5
- package/dist/chunks/{layout-grid-DoFIfQGd.js → layout-grid-CYR-LVpl.js} +1 -1
- package/dist/chunks/{list-filter-BeTQxjNy.js → list-filter-B67GsjTw.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-CyWOwLmE.js → matrix-analytical-definition-C0IGLTZH.js} +21 -21
- package/dist/chunks/matrix-member-presentation-D5BIYuy5.js +258 -0
- package/dist/chunks/{matrix-operation-contract-CAanJeCj.js → matrix-operation-contract-RckfqkQm.js} +15 -15
- package/dist/chunks/{metric-comparison-BeKnUD08.js → metric-comparison-DsE8wdRh.js} +1 -1
- package/dist/chunks/{paintbrush-KeaU1L1a.js → paintbrush-xDDRjIyF.js} +1 -1
- package/dist/chunks/{palette-BcFJLeXB.js → palette-CbOgFCy2.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-Dt0E1Wou.js → pivot-result-contract-expectations-Cnq55Uno.js} +44 -44
- package/dist/chunks/{pivot-result-identity-BKUjYO1u.js → pivot-result-identity-b4-ugQhm.js} +1 -1
- package/dist/chunks/{raw-temporal-value-BzdgeDa7.js → raw-temporal-value-B9W38mi3.js} +1 -1
- package/dist/chunks/{report-preferences-dialog-CgskMwZJ.js → report-preferences-dialog-DTu3a7ce.js} +13 -13
- package/dist/chunks/{report-runtime-context-g4Zp_TU9.js → report-runtime-context-BvJkcbar.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-DfJshnw8.js → resolve-dashboard-input-context-Bw-DesV2.js} +4771 -4712
- package/dist/chunks/{save-C9CZAk6V.js → save-BgvAsp6X.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-DdhPU2Kq.js → saved-dashboard-context-BFh0oOnF.js} +7 -7
- package/dist/chunks/{selection-filter-compiler-BclSpK3P.js → selection-filter-compiler-DHYsq3yM.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-BuasVClR.js → semaphor-ready-indicator-WvgHMnj8.js} +33384 -32853
- package/dist/chunks/{shelf-drop-preview-context-DjOcz0mb.js → shelf-drop-preview-context-D6HgYFJp.js} +5 -5
- package/dist/chunks/{stored-dashboard-D6FtWx_3.js → stored-dashboard-vlG0Knxi.js} +94 -94
- package/dist/chunks/{style-sheet-parts-DM_Mw_sm.js → style-sheet-parts-ClmvtkSC.js} +2 -2
- package/dist/chunks/{table-export-sheet-DBlFMvE8.js → table-export-sheet-Bv6tVuMu.js} +1 -1
- package/dist/chunks/{token-types-BB2ImFx6.js → token-types-eMdcuB6j.js} +1 -1
- package/dist/chunks/{upload-CMTCg47S.js → upload-ClUeK8F0.js} +1 -1
- package/dist/chunks/{validators-BlEWWX9O.js → validators-DwhBEvnh.js} +1074 -1065
- package/dist/chunks/{variable-draft-CxdgKDCx.js → variable-draft-CauoSBN0.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1752 -1684
- package/dist/format-utils/index.js +13 -13
- package/dist/index.js +18 -18
- 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/shared/unsaved-changes/unsaved-changes-alert.d.ts +2 -1
- package/dist/types/components/sharing-and-management/hooks/paged-list.d.ts +22 -0
- package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +17 -2
- package/dist/types/index.js +5 -5
- package/dist/types/lib/hooks/use-dashboard-unsaved-changes-check.d.ts +9 -1
- package/dist/types/lib/utils/filter-default-value-utils.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/catalog-field-grounding.d.ts +7 -0
- package/dist/types/shared/analytics-protocol/index.d.ts +1 -0
- package/dist/types/shared/analytics-protocol/numeric-range-options.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +45 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/filter-model/number-condition-spec.d.ts +24 -0
- package/dist/types/shared/dashboard-authoring/filter-model/number-range-setting.d.ts +47 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +6 -2
- package/package.json +1 -1
- package/dist/chunks/matrix-member-presentation-Bj2YcHAP.js +0 -169
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as w, l as I, r as k } from "./validators-
|
|
2
|
-
import { r as p } from "./metric-comparison-
|
|
3
|
-
import { d as T, c as D } from "./raw-temporal-value-
|
|
1
|
+
import { j as w, l as I, r as k } from "./validators-DwhBEvnh.js";
|
|
2
|
+
import { r as p } from "./metric-comparison-DsE8wdRh.js";
|
|
3
|
+
import { d as T, c as D } from "./raw-temporal-value-B9W38mi3.js";
|
|
4
4
|
import "../value-format-preferences/index.js";
|
|
5
|
-
import { ak as O, ag as L } from "./pivot-result-contract-expectations-
|
|
5
|
+
import { ak as O, ag as L } from "./pivot-result-contract-expectations-Cnq55Uno.js";
|
|
6
6
|
const f = { kind: "plain" }, y = { kind: "temporal" }, S = {
|
|
7
7
|
"=": "=",
|
|
8
8
|
"!=": "!=",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var De = Object.defineProperty;
|
|
2
2
|
var Oe = (e, n, t) => n in e ? De(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var M = (e, n, t) => Oe(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
-
import { aH as Ne, a1 as Fe, as as oe, U as se, j as Re, a0 as Me, Y as F } from "./pivot-result-contract-expectations-
|
|
5
|
-
import { V as X, a7 as Le, U as Be } from "./validators-
|
|
4
|
+
import { aH as Ne, a1 as Fe, as as oe, U as se, j as Re, a0 as Me, Y as F } from "./pivot-result-contract-expectations-Cnq55Uno.js";
|
|
5
|
+
import { V as X, a7 as Le, U as Be } from "./validators-DwhBEvnh.js";
|
|
6
6
|
import { l as Ue, C as Pe } from "./export-file-format-C-tJsxsf.js";
|
|
7
7
|
import { z as y } from "zod";
|
|
8
|
-
import { ai as Ve, ak as ze, X as je } from "./matrix-operation-contract-
|
|
8
|
+
import { ai as Ve, ak as ze, X as je } from "./matrix-operation-contract-RckfqkQm.js";
|
|
9
9
|
import "./analytics-base-schemas-8wz9vqn_.js";
|
|
10
10
|
import "../value-format-preferences/index.js";
|
|
11
11
|
import { r as qe } from "./rendered-file-D8xEuVVx.js";
|
|
12
|
-
import { M as Ke, N as Ge, O as He, P as We, Q as Xe, n as Ye, R as Ze, S as Je, T as Qe, U as et, V as tt, W as nt, X as rt } from "./resolve-dashboard-input-context-
|
|
13
|
-
import { I as ot, J as at } from "./bookmark-state-
|
|
12
|
+
import { M as Ke, N as Ge, O as He, P as We, Q as Xe, n as Ye, R as Ze, S as Je, T as Qe, U as et, V as tt, W as nt, X as rt } from "./resolve-dashboard-input-context-Bw-DesV2.js";
|
|
13
|
+
import { I as ot, J as at } from "./bookmark-state-BfeKmj5s.js";
|
|
14
14
|
import "./pickers-DkqmtnTL.js";
|
|
15
15
|
import "./schema-C9NPiIru.js";
|
|
16
16
|
import "./index-CV_Kzou0.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as
|
|
2
|
-
import {
|
|
3
|
-
import { a as Ie } from "./metric-comparison-
|
|
1
|
+
import { G as z, H as T, E as ge, I as te, F as K, L as he } from "./raw-temporal-value-B9W38mi3.js";
|
|
2
|
+
import { ap as C, ar as $, aj as G, ah as p, aq as pe, ai as M, aw as ve, ak as J, a7 as Q, K as X, t as ke } from "./validators-DwhBEvnh.js";
|
|
3
|
+
import { a as Ie } from "./metric-comparison-DsE8wdRh.js";
|
|
4
4
|
class Y extends Error {
|
|
5
5
|
constructor(t) {
|
|
6
6
|
super(t), this.name = "RelativeDateUsageError";
|
|
@@ -26,14 +26,14 @@ function Ne(e, t, n = {}) {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
case "monthDay": {
|
|
29
|
-
const s = e.day === "first" ?
|
|
30
|
-
return { start:
|
|
29
|
+
const s = e.day === "first" ? z(r, "month", a) : T(r, "month", a);
|
|
30
|
+
return { start: z(s, "day", a), end: T(s, "day", a) };
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
function ne(e, t) {
|
|
35
35
|
const { anchor: n } = e;
|
|
36
|
-
return n === "latest_data" ? t.latestData ?? t.now : n === "now" ? t.now : new Date(
|
|
36
|
+
return n === "latest_data" ? t.latestData ?? t.now : n === "now" ? t.now : new Date(z(t.now, n.lastComplete, t.calendar).getTime() - 1);
|
|
37
37
|
}
|
|
38
38
|
function ie(e, t, n, i) {
|
|
39
39
|
return new Date(K(e, t, n, i).endExclusive.getTime() - 1);
|
|
@@ -61,7 +61,7 @@ function ae(e) {
|
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
function tt(e) {
|
|
64
|
-
const t = e.source.connectionType ? C(e.source.connectionType) : void 0, n = e.source.dialect ?
|
|
64
|
+
const t = e.source.connectionType ? C(e.source.connectionType) : void 0, n = e.source.dialect ? $(e.source.dialect) : void 0, i = e.source.dialect && e.source.dialect !== "unknown" ? C(e.source.dialect) : void 0;
|
|
65
65
|
if (!e.capabilities && e.source.connectionType && e.source.dialect && e.source.dialect !== "unknown" && (!t || n === "unknown" || t.dialect !== n))
|
|
66
66
|
return { kind: "incompatible_capabilities" };
|
|
67
67
|
const a = e.capabilities || t || i;
|
|
@@ -219,7 +219,7 @@ function B(e) {
|
|
|
219
219
|
}
|
|
220
220
|
function Te(e) {
|
|
221
221
|
var k;
|
|
222
|
-
const t = f(e.connectionType), n = f(e.dialect), i = e.capabilities ? B(e.capabilities) : void 0, a = t ? C(t) : void 0, r = n ?
|
|
222
|
+
const t = f(e.connectionType), n = f(e.dialect), i = e.capabilities ? B(e.capabilities) : void 0, a = t ? C(t) : void 0, r = n ? $(n) : void 0, s = n && n !== "unknown" ? C(n) : void 0;
|
|
223
223
|
if (t && !a || n && n !== "unknown" && r === "unknown" || i && a && A(i) !== A(a))
|
|
224
224
|
return;
|
|
225
225
|
const o = i || (a ? B(a) : s ? B(s) : void 0);
|
|
@@ -231,7 +231,7 @@ function Te(e) {
|
|
|
231
231
|
evidence: "explicit"
|
|
232
232
|
};
|
|
233
233
|
const d = e.entities.map((b) => {
|
|
234
|
-
const I = D(b), h = f(I == null ? void 0 : I.connectionType), N = f(I == null ? void 0 : I.dialect), S = h ? C(h) : void 0, E = N ?
|
|
234
|
+
const I = D(b), h = f(I == null ? void 0 : I.connectionType), N = f(I == null ? void 0 : I.dialect), S = h ? C(h) : void 0, E = N ? $(N) : void 0, x = N && N !== "unknown" ? C(N) : void 0;
|
|
235
235
|
if (h && !S || N && N !== "unknown" && E === "unknown" || N && N !== "unknown" && !S && !x || S && E && E !== "unknown" && S.dialect !== E)
|
|
236
236
|
return;
|
|
237
237
|
const V = S || x, P = V ? B(V) : Ae(I);
|
|
@@ -707,7 +707,7 @@ function Oe(e, t) {
|
|
|
707
707
|
i.join(".")
|
|
708
708
|
));
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function we(e) {
|
|
711
711
|
const t = e.map((i) => i.trim()).filter(Boolean);
|
|
712
712
|
if (t.every(
|
|
713
713
|
(i, a) => t.slice(a + 1).every(
|
|
@@ -734,12 +734,12 @@ function W(e) {
|
|
|
734
734
|
function g(e) {
|
|
735
735
|
return typeof e == "string" ? e.trim() : "";
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function ze(e, t) {
|
|
738
738
|
return e.every(
|
|
739
739
|
(n, i) => e.slice(i + 1).every((a) => t(n, a))
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function $e(e, t) {
|
|
743
743
|
const n = g(e.id), i = g(e.name), a = g(t.entityId), r = g(t.entityName);
|
|
744
744
|
return !i || !a && !r ? !1 : (!a || a === n || a === i) && (!r || r === i);
|
|
745
745
|
}
|
|
@@ -751,7 +751,7 @@ function Me(e) {
|
|
|
751
751
|
if (!i)
|
|
752
752
|
return { status: "unresolved", reason: "incomplete_source_identity" };
|
|
753
753
|
const s = g(n == null ? void 0 : n.entityId), o = g(n == null ? void 0 : n.entityName), d = !!(s || o), c = d ? a.filter(
|
|
754
|
-
(h) =>
|
|
754
|
+
(h) => $e(h, {
|
|
755
755
|
entityId: s,
|
|
756
756
|
entityName: o
|
|
757
757
|
})
|
|
@@ -784,7 +784,7 @@ function Qe(e, t) {
|
|
|
784
784
|
d,
|
|
785
785
|
c,
|
|
786
786
|
o
|
|
787
|
-
].filter(Boolean), m =
|
|
787
|
+
].filter(Boolean), m = we(l);
|
|
788
788
|
return !m && l.length > 0 ? { status: "unresolved", reason: "divergent_source_identity" } : !r || !m ? { status: "unresolved", reason: "incomplete_source_identity" } : {
|
|
789
789
|
status: "resolved",
|
|
790
790
|
source: { kind: "physical", connectionId: r, tableName: m }
|
|
@@ -803,7 +803,7 @@ function We(e, t) {
|
|
|
803
803
|
s,
|
|
804
804
|
m
|
|
805
805
|
].filter(Boolean);
|
|
806
|
-
if (
|
|
806
|
+
if (!ze(
|
|
807
807
|
y,
|
|
808
808
|
Oe
|
|
809
809
|
))
|
|
@@ -984,7 +984,7 @@ function U(e) {
|
|
|
984
984
|
)
|
|
985
985
|
};
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function w(e) {
|
|
988
988
|
const { derivedField: t, ...n } = e;
|
|
989
989
|
return {
|
|
990
990
|
...be(n),
|
|
@@ -1031,14 +1031,14 @@ function Nt(e) {
|
|
|
1031
1031
|
source: me(e.source),
|
|
1032
1032
|
rows: e.rows.map((t) => ({
|
|
1033
1033
|
...t,
|
|
1034
|
-
field:
|
|
1034
|
+
field: w(t.field)
|
|
1035
1035
|
})),
|
|
1036
1036
|
columns: e.columns.map((t) => ({
|
|
1037
1037
|
...t,
|
|
1038
|
-
field:
|
|
1038
|
+
field: w(t.field)
|
|
1039
1039
|
})),
|
|
1040
1040
|
measures: e.measures.map(
|
|
1041
|
-
(t) => t.kind === "aggregate" ? { ...t, field:
|
|
1041
|
+
(t) => t.kind === "aggregate" ? { ...t, field: w(t.field) } : {
|
|
1042
1042
|
...t,
|
|
1043
1043
|
definition: U(t.definition)
|
|
1044
1044
|
}
|
|
@@ -1079,7 +1079,7 @@ export {
|
|
|
1079
1079
|
kt as J,
|
|
1080
1080
|
It as K,
|
|
1081
1081
|
de as L,
|
|
1082
|
-
|
|
1082
|
+
we as M,
|
|
1083
1083
|
U as N,
|
|
1084
1084
|
Oe as O,
|
|
1085
1085
|
Y as R,
|
|
@@ -1095,7 +1095,7 @@ export {
|
|
|
1095
1095
|
at as i,
|
|
1096
1096
|
it as j,
|
|
1097
1097
|
ot as k,
|
|
1098
|
-
|
|
1098
|
+
$e as l,
|
|
1099
1099
|
Ve as m,
|
|
1100
1100
|
Ke as n,
|
|
1101
1101
|
Ge as o,
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { m as p } from "./validators-DwhBEvnh.js";
|
|
2
|
+
function _(t) {
|
|
3
|
+
const e = y(t);
|
|
4
|
+
return h(e) ? e : void 0;
|
|
5
|
+
}
|
|
6
|
+
function y(t) {
|
|
7
|
+
if (typeof t != "string" || t.trim().length === 0)
|
|
8
|
+
return;
|
|
9
|
+
const e = t.trim().toLowerCase();
|
|
10
|
+
switch (e) {
|
|
11
|
+
case "=":
|
|
12
|
+
return "=";
|
|
13
|
+
case "!=":
|
|
14
|
+
return "!=";
|
|
15
|
+
case "in":
|
|
16
|
+
return "in";
|
|
17
|
+
case "not_in":
|
|
18
|
+
return "not_in";
|
|
19
|
+
case "contains":
|
|
20
|
+
return "contains";
|
|
21
|
+
case "not_contains":
|
|
22
|
+
return "not_contains";
|
|
23
|
+
case "between":
|
|
24
|
+
return "between";
|
|
25
|
+
case "not_between":
|
|
26
|
+
return "not_between";
|
|
27
|
+
case ">":
|
|
28
|
+
case ">=":
|
|
29
|
+
case "<":
|
|
30
|
+
case "<=":
|
|
31
|
+
return e;
|
|
32
|
+
case "is_null":
|
|
33
|
+
return "is_null";
|
|
34
|
+
case "is_not_null":
|
|
35
|
+
return "is_not_null";
|
|
36
|
+
default:
|
|
37
|
+
return x(t) ? t : void 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function h(t) {
|
|
41
|
+
return t === "=" || t === "!=" || t === "in" || t === "not_in" || t === "contains" || t === "not_contains" || t === "between" || t === "not_between" || t === ">" || t === ">=" || t === "<" || t === "<=";
|
|
42
|
+
}
|
|
43
|
+
function x(t) {
|
|
44
|
+
return h(t) || t === "not_contains" || t === "is_null" || t === "is_not_null";
|
|
45
|
+
}
|
|
46
|
+
function O(t) {
|
|
47
|
+
switch (t) {
|
|
48
|
+
case "not in":
|
|
49
|
+
return "not_in";
|
|
50
|
+
case "like":
|
|
51
|
+
return "contains";
|
|
52
|
+
case "not like":
|
|
53
|
+
return "not_contains";
|
|
54
|
+
case "not between":
|
|
55
|
+
return "not_between";
|
|
56
|
+
case "is null":
|
|
57
|
+
case "is not null":
|
|
58
|
+
return;
|
|
59
|
+
default:
|
|
60
|
+
return _(t);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const E = [
|
|
64
|
+
"=",
|
|
65
|
+
"!=",
|
|
66
|
+
">",
|
|
67
|
+
"<",
|
|
68
|
+
">=",
|
|
69
|
+
"<=",
|
|
70
|
+
"like",
|
|
71
|
+
"not like",
|
|
72
|
+
"between",
|
|
73
|
+
"not between",
|
|
74
|
+
"in",
|
|
75
|
+
"not in",
|
|
76
|
+
"is null",
|
|
77
|
+
"is not null"
|
|
78
|
+
], N = /* @__PURE__ */ new Set(["string", "number", "date", "boolean"]);
|
|
79
|
+
function A(t) {
|
|
80
|
+
return typeof t == "string" && E.includes(t);
|
|
81
|
+
}
|
|
82
|
+
function P(t, e) {
|
|
83
|
+
switch (t) {
|
|
84
|
+
case "is null":
|
|
85
|
+
case "is not null":
|
|
86
|
+
return e.length === 0;
|
|
87
|
+
case "between":
|
|
88
|
+
case "not between":
|
|
89
|
+
return e.length === 2;
|
|
90
|
+
case "in":
|
|
91
|
+
case "not in":
|
|
92
|
+
return e.length >= 1;
|
|
93
|
+
default:
|
|
94
|
+
return e.length === 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function R(t) {
|
|
98
|
+
if (!t || typeof t != "object" || Array.isArray(t))
|
|
99
|
+
return;
|
|
100
|
+
const e = t, n = {};
|
|
101
|
+
for (const o of S)
|
|
102
|
+
e[o] !== void 0 && (n[o] = e[o]);
|
|
103
|
+
return n;
|
|
104
|
+
}
|
|
105
|
+
const S = [
|
|
106
|
+
"operation",
|
|
107
|
+
"values",
|
|
108
|
+
"valueType",
|
|
109
|
+
"temporalBucket",
|
|
110
|
+
"relativeMeta",
|
|
111
|
+
"temporalPrecision"
|
|
112
|
+
];
|
|
113
|
+
function M(t) {
|
|
114
|
+
const e = R(t);
|
|
115
|
+
if (!e) return;
|
|
116
|
+
const { operation: n, values: o } = e;
|
|
117
|
+
if (!A(n) || !Array.isArray(o) || !P(n, o)) return;
|
|
118
|
+
const i = typeof e.valueType == "string" && N.has(e.valueType) ? e.valueType : void 0;
|
|
119
|
+
return {
|
|
120
|
+
operation: n,
|
|
121
|
+
values: o,
|
|
122
|
+
...i ? { valueType: i } : {},
|
|
123
|
+
...e.temporalBucket !== void 0 ? { temporalBucket: e.temporalBucket } : {},
|
|
124
|
+
...e.relativeMeta !== void 0 ? { relativeMeta: e.relativeMeta } : {},
|
|
125
|
+
...e.temporalPrecision !== void 0 ? { temporalPrecision: e.temporalPrecision } : {}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function B(t) {
|
|
129
|
+
const e = M(t);
|
|
130
|
+
if (!e)
|
|
131
|
+
throw new Error(
|
|
132
|
+
`Filter operation "${String(t.operation)}" cannot be expressed as predicate semantics.`
|
|
133
|
+
);
|
|
134
|
+
return e;
|
|
135
|
+
}
|
|
136
|
+
function I(t) {
|
|
137
|
+
return t.operation === "is null" || t.operation === "is not null";
|
|
138
|
+
}
|
|
139
|
+
const w = "numeric_range", F = 32, T = (t) => typeof t == "number" && Number.isFinite(t), f = (t) => {
|
|
140
|
+
if (T(t)) return t;
|
|
141
|
+
if (typeof t == "string" && t.trim() !== "") {
|
|
142
|
+
const e = Number(t);
|
|
143
|
+
return Number.isFinite(e) ? e : null;
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
};
|
|
147
|
+
function V(t) {
|
|
148
|
+
if (!t || typeof t != "object") return;
|
|
149
|
+
const e = t;
|
|
150
|
+
if (e.kind !== w) return;
|
|
151
|
+
const n = f(e.min), o = f(e.max), i = f(e.emptyRows) ?? 0, c = e.bucketing === "value" ? "value" : "width", u = f(e.bucketWidth) ?? 0, r = Array.isArray(e.buckets) ? e.buckets.map((s) => Math.max(0, f(s) ?? 0)) : [];
|
|
152
|
+
if (n === null == (o === null) && !(n !== null && o !== null && n > o) && !(r.length > 0 && !(u > 0)))
|
|
153
|
+
return { kind: w, min: n, max: o, emptyRows: i, bucketing: c, buckets: r, bucketWidth: u };
|
|
154
|
+
}
|
|
155
|
+
function k(t) {
|
|
156
|
+
return t.buckets.reduce((e, n) => e + n, 0);
|
|
157
|
+
}
|
|
158
|
+
function U(t, e) {
|
|
159
|
+
const n = t.min ?? 0;
|
|
160
|
+
return { from: n + e * t.bucketWidth, to: n + (e + 1) * t.bucketWidth };
|
|
161
|
+
}
|
|
162
|
+
function a(t, e, n) {
|
|
163
|
+
const o = k(t);
|
|
164
|
+
if (t.min === null || t.max === null || t.buckets.length === 0)
|
|
165
|
+
return t.min === null ? { rows: 0, exact: !0 } : { rows: (n ? e >= t.min : e > t.min) ? o : 0, exact: !0 };
|
|
166
|
+
if (t.bucketing === "value") {
|
|
167
|
+
let s = 0;
|
|
168
|
+
return t.buckets.forEach((l, d) => {
|
|
169
|
+
const m = t.min + d;
|
|
170
|
+
(n ? m <= e : m < e) && (s += l);
|
|
171
|
+
}), { rows: s, exact: !0 };
|
|
172
|
+
}
|
|
173
|
+
if (e <= t.min) return { rows: 0, exact: !(n && e === t.min) };
|
|
174
|
+
if (e >= t.max) return { rows: o, exact: n || e > t.max };
|
|
175
|
+
const i = (e - t.min) / t.bucketWidth, c = Math.floor(i);
|
|
176
|
+
let u = 0;
|
|
177
|
+
for (let s = 0; s < c; s += 1) u += t.buckets[s] ?? 0;
|
|
178
|
+
const r = i - c;
|
|
179
|
+
return u += (t.buckets[c] ?? 0) * r, { rows: u, exact: r === 0 && !n };
|
|
180
|
+
}
|
|
181
|
+
function j(t, e, n) {
|
|
182
|
+
const o = k(t), i = (r, ...s) => ({
|
|
183
|
+
rows: Math.round(Math.max(0, Math.min(o, r))),
|
|
184
|
+
exact: s.every(Boolean)
|
|
185
|
+
}), [c, u] = n;
|
|
186
|
+
switch (e) {
|
|
187
|
+
case "is null":
|
|
188
|
+
return { rows: t.emptyRows, exact: !0 };
|
|
189
|
+
case "is not null":
|
|
190
|
+
return { rows: o, exact: !0 };
|
|
191
|
+
case ">=": {
|
|
192
|
+
const r = a(t, c, !1);
|
|
193
|
+
return i(o - r.rows, r.exact);
|
|
194
|
+
}
|
|
195
|
+
case ">": {
|
|
196
|
+
const r = a(t, c, !0);
|
|
197
|
+
return i(o - r.rows, r.exact);
|
|
198
|
+
}
|
|
199
|
+
case "<=": {
|
|
200
|
+
const r = a(t, c, !0);
|
|
201
|
+
return i(r.rows, r.exact);
|
|
202
|
+
}
|
|
203
|
+
case "<": {
|
|
204
|
+
const r = a(t, c, !1);
|
|
205
|
+
return i(r.rows, r.exact);
|
|
206
|
+
}
|
|
207
|
+
case "between":
|
|
208
|
+
case "not between": {
|
|
209
|
+
const r = a(t, u, !0), s = a(t, c, !1), l = r.rows - s.rows;
|
|
210
|
+
return i(e === "between" ? l : o - l, r.exact, s.exact);
|
|
211
|
+
}
|
|
212
|
+
case "=":
|
|
213
|
+
case "!=": {
|
|
214
|
+
if (t.bucketing !== "value" && t.buckets.length > 0) return null;
|
|
215
|
+
const r = a(t, c, !0).rows - a(t, c, !1).rows;
|
|
216
|
+
return i(e === "=" ? r : o - r, !0);
|
|
217
|
+
}
|
|
218
|
+
default:
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function C(t, e) {
|
|
223
|
+
var o;
|
|
224
|
+
if (e === null) return !0;
|
|
225
|
+
if (e.overrides.length === 0) return t.length <= e.depth;
|
|
226
|
+
const n = p(t);
|
|
227
|
+
return ((o = e.overrides.find((i) => i.path.length === t.length && p(i.path) === n)) == null ? void 0 : o.expanded) ?? t.length <= e.depth;
|
|
228
|
+
}
|
|
229
|
+
function W(t) {
|
|
230
|
+
var b;
|
|
231
|
+
const { path: e, levelCount: n, expansion: o, total: i, axis: c } = t, u = e.length >= n || ((b = e[e.length - 1]) == null ? void 0 : b.member.kind) === "others", r = !u && !t.childrenEmpty, s = r && C(e, o), l = c === "rows" && t.rowLayout !== "tabular", d = s && !!t.skipRedundant && !!t.singleChild, m = !!(i != null && i.visible) && !d;
|
|
232
|
+
return {
|
|
233
|
+
expandable: r,
|
|
234
|
+
expanded: s,
|
|
235
|
+
memberVisible: l || !s,
|
|
236
|
+
valueVisible: u || m && (!s || i.position === "before"),
|
|
237
|
+
subtotalBefore: !l && s && m && i.position === "before",
|
|
238
|
+
subtotalAfter: s && m && i.position === "after"
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
export {
|
|
242
|
+
E as N,
|
|
243
|
+
y as a,
|
|
244
|
+
M as b,
|
|
245
|
+
B as c,
|
|
246
|
+
w as d,
|
|
247
|
+
F as e,
|
|
248
|
+
k as f,
|
|
249
|
+
U as g,
|
|
250
|
+
j as h,
|
|
251
|
+
I as i,
|
|
252
|
+
C as j,
|
|
253
|
+
W as k,
|
|
254
|
+
_ as n,
|
|
255
|
+
R as p,
|
|
256
|
+
V as r,
|
|
257
|
+
O as t
|
|
258
|
+
};
|
package/dist/chunks/{matrix-operation-contract-CAanJeCj.js → matrix-operation-contract-RckfqkQm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as t } from "zod";
|
|
2
|
-
import { z as Le, P as
|
|
3
|
-
import { E as k, w as de, M as G,
|
|
2
|
+
import { z as Le, P as De, X as Ue, Y as qe, $ as Me, a0 as Be, s as D, L as $, n as Ge, V as ze, W as ce, g as Ve, r as We, N as Xe, E as Ke, F as $e, o as le, b as ue, I as Ze } from "./analytics-base-schemas-8wz9vqn_.js";
|
|
3
|
+
import { E as k, w as de, M as G, b0 as ee, m as A, F as Ye, aV as Z, x as He, q as Qe, t as me, a4 as Je, p as et, a7 as tt, a$ as nt } from "./validators-DwhBEvnh.js";
|
|
4
4
|
const Y = {
|
|
5
5
|
answerSummary: "string",
|
|
6
6
|
responseDetail: "responseDetail",
|
|
@@ -250,11 +250,11 @@ const pt = t.object({
|
|
|
250
250
|
);
|
|
251
251
|
for (const l of e.cells)
|
|
252
252
|
(!s.has(A(l.rowPath)) || !c.has(A(l.columnPath)) || !i.has(l.measureId)) && f(n, ["cells"], "Cell is outside certified coverage.");
|
|
253
|
-
}),
|
|
253
|
+
}), U = t.number().int().nonnegative(), ht = t.object({
|
|
254
254
|
requestId: y,
|
|
255
255
|
coverage: fe,
|
|
256
256
|
values: t.array(
|
|
257
|
-
t.tuple([
|
|
257
|
+
t.tuple([U, U, U, Z]).readonly()
|
|
258
258
|
).readonly()
|
|
259
259
|
}).strict().superRefine((e, n) => {
|
|
260
260
|
ge(e.coverage, n);
|
|
@@ -269,7 +269,7 @@ const pt = t.object({
|
|
|
269
269
|
}
|
|
270
270
|
}), ne = t.object({
|
|
271
271
|
id: O,
|
|
272
|
-
column:
|
|
272
|
+
column: De,
|
|
273
273
|
nativeDataType: y,
|
|
274
274
|
semanticFormat: Le.optional()
|
|
275
275
|
}).strict(), ye = t.object({
|
|
@@ -467,7 +467,7 @@ const Ie = t.object({
|
|
|
467
467
|
next: y.nullable()
|
|
468
468
|
}).strict()
|
|
469
469
|
]), wt = t.union([
|
|
470
|
-
|
|
470
|
+
Ue,
|
|
471
471
|
qe,
|
|
472
472
|
Me,
|
|
473
473
|
Be,
|
|
@@ -481,15 +481,15 @@ const Ie = t.object({
|
|
|
481
481
|
"fanout_risk",
|
|
482
482
|
"unknown"
|
|
483
483
|
]),
|
|
484
|
-
requiredSources: t.array(
|
|
484
|
+
requiredSources: t.array(D).optional(),
|
|
485
485
|
relationshipsUsed: t.array(t.string()).optional(),
|
|
486
486
|
missingSources: t.array(t.string()).optional(),
|
|
487
487
|
warnings: t.array(t.string()).optional(),
|
|
488
488
|
message: t.string().optional(),
|
|
489
489
|
recommendedNextStep: t.string().optional(),
|
|
490
490
|
joinPlanSummary: t.object({
|
|
491
|
-
baseSource:
|
|
492
|
-
joinedSources: t.array(
|
|
491
|
+
baseSource: D.optional(),
|
|
492
|
+
joinedSources: t.array(D).optional(),
|
|
493
493
|
joinCount: t.number().optional()
|
|
494
494
|
}).passthrough().optional(),
|
|
495
495
|
fanoutRisk: t.object({
|
|
@@ -748,7 +748,7 @@ const Ft = t.union([
|
|
|
748
748
|
message: "isNull carries a null value, and only isNull does.",
|
|
749
749
|
path: ["value"]
|
|
750
750
|
});
|
|
751
|
-
}),
|
|
751
|
+
}), Dt = t.object({
|
|
752
752
|
conditions: t.array(Lt).min(1)
|
|
753
753
|
}).strict().superRefine((e, n) => {
|
|
754
754
|
const a = e.conditions.map((r) => Re(r.field));
|
|
@@ -760,8 +760,8 @@ const Ft = t.union([
|
|
|
760
760
|
}), vn = t.object({
|
|
761
761
|
kind: t.literal("selection"),
|
|
762
762
|
sourceCardId: t.string().min(1),
|
|
763
|
-
tuples: t.array(
|
|
764
|
-
}).strict(),
|
|
763
|
+
tuples: t.array(Dt).min(1).max(Ee)
|
|
764
|
+
}).strict(), Ut = t.object({
|
|
765
765
|
field: Ze,
|
|
766
766
|
operator: t.enum(["=", "isNull"]),
|
|
767
767
|
value: t.union([t.string(), t.number().finite(), t.null()]),
|
|
@@ -774,7 +774,7 @@ const Ft = t.union([
|
|
|
774
774
|
path: ["value"]
|
|
775
775
|
});
|
|
776
776
|
}), qt = t.object({
|
|
777
|
-
conditions: t.array(
|
|
777
|
+
conditions: t.array(Ut).min(1)
|
|
778
778
|
}).strict().superRefine((e, n) => {
|
|
779
779
|
for (let a = 0; a < e.conditions.length; a += 1) {
|
|
780
780
|
const r = e.conditions[a];
|
|
@@ -1331,9 +1331,9 @@ export {
|
|
|
1331
1331
|
Tn as B,
|
|
1332
1332
|
jt as C,
|
|
1333
1333
|
Lt as D,
|
|
1334
|
-
|
|
1334
|
+
Dt as E,
|
|
1335
1335
|
vn as F,
|
|
1336
|
-
|
|
1336
|
+
Ut as G,
|
|
1337
1337
|
qt as H,
|
|
1338
1338
|
En as I,
|
|
1339
1339
|
Ht as J,
|