react-semaphor 0.1.590 → 0.1.591
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 +254 -236
- 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-BrkXsSJp.js → aggregate-measure-field-DHlDj0Pc.js} +2 -2
- package/dist/chunks/{assistant-chat-C_6dBLUk.js → assistant-chat-Cazikwyh.js} +13 -13
- package/dist/chunks/{bookmark-impact-DkZABEd3.js → bookmark-impact-rWjQgk8h.js} +2 -2
- package/dist/chunks/{bookmark-state-Bn7k3ttp.js → bookmark-state-Bt_eQEqt.js} +569 -537
- package/dist/chunks/{card-filter-builder-6vflbF9O.js → card-filter-builder-DFR-6Jpm.js} +929 -910
- package/dist/chunks/{comparison-window-caption-fqijZdVd.js → comparison-window-caption-CFaw-kIV.js} +6 -6
- package/dist/chunks/{dashboard-DpgRl65K.js → dashboard-DCh9hKnJ.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BLbhONJz.js → dashboard-briefing-launcher-ob8G1b58.js} +91 -91
- package/dist/chunks/{dashboard-controls-kCTYEEsq.js → dashboard-controls-Nszg0k1A.js} +64 -64
- package/dist/chunks/{dashboard-json-CNIFresY.js → dashboard-json-BpwnG23b.js} +4 -4
- package/dist/chunks/{dates-BoeweqEo.js → dates-BOLBSBpn.js} +8 -8
- package/dist/chunks/{edit-dashboard-visual-D0eWTlPL.js → edit-dashboard-visual-BvM7br5P.js} +5501 -5475
- package/dist/chunks/filter-line-CYT7KIXb.js +133 -0
- package/dist/chunks/{filter-reach-copy-eMhDPTYH.js → filter-reach-copy-By3r7O3G.js} +11 -11
- package/dist/chunks/filter-value-text-CFiIZWJP.js +153 -0
- package/dist/chunks/{index-D8LFjI8j.js → index-CsQYlwhU.js} +5 -5
- package/dist/chunks/{layout-grid-BG__sPkb.js → layout-grid-DoFIfQGd.js} +1 -1
- package/dist/chunks/{list-filter-Cb8i7N8f.js → list-filter-BeTQxjNy.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-D9Ll_9R-.js → matrix-analytical-definition-CyWOwLmE.js} +17 -17
- package/dist/chunks/{matrix-member-presentation-DVBJR0MA.js → matrix-member-presentation-Bj2YcHAP.js} +1 -1
- package/dist/chunks/{matrix-operation-contract-JSmproo9.js → matrix-operation-contract-CAanJeCj.js} +60 -60
- package/dist/chunks/{metric-comparison-xE_J6hkg.js → metric-comparison-BeKnUD08.js} +27 -31
- package/dist/chunks/{paintbrush-C310xSuR.js → paintbrush-KeaU1L1a.js} +1 -1
- package/dist/chunks/{palette-Ci5P91Zb.js → palette-BcFJLeXB.js} +1 -1
- package/dist/chunks/{pivot-header-presentation-D-DfPAjb.js → pivot-header-presentation-gUxhdIdr.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DbBahmgc.js → pivot-result-contract-expectations-BkMRCjzf.js} +111 -111
- package/dist/chunks/{pivot-result-identity-CUsMt_4r.js → pivot-result-identity-BKUjYO1u.js} +1 -1
- package/dist/chunks/raw-temporal-value-BzdgeDa7.js +454 -0
- package/dist/chunks/{report-preferences-dialog-dUlVLgEk.js → report-preferences-dialog-ChXt8wCt.js} +13 -13
- package/dist/chunks/{report-runtime-context-CrOgmuxO.js → report-runtime-context-g4Zp_TU9.js} +1 -1
- package/dist/chunks/{resolve-dashboard-input-context-NurwNg4I.js → resolve-dashboard-input-context-BlyFX8He.js} +5053 -4955
- package/dist/chunks/{save-BhhXfp4s.js → save-C9CZAk6V.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-CPp--vXU.js → saved-dashboard-context-BPSdH2jW.js} +7 -7
- package/dist/chunks/{selection-filter-compiler-CHG-8xnW.js → selection-filter-compiler-BclSpK3P.js} +1 -1
- package/dist/chunks/{semaphor-ready-indicator-CXojR95M.js → semaphor-ready-indicator-BZUMCHRU.js} +28962 -28917
- package/dist/chunks/{shelf-drop-preview-context-BDScAUdq.js → shelf-drop-preview-context-yJheoeTC.js} +5 -5
- package/dist/chunks/{stored-dashboard-KkH4zOhq.js → stored-dashboard-CxQl9g0l.js} +653 -657
- package/dist/chunks/{style-sheet-parts-CmXmKqGw.js → style-sheet-parts-DM_Mw_sm.js} +45 -42
- package/dist/chunks/{table-export-sheet-ClSgERQC.js → table-export-sheet-h7wm5TwP.js} +1 -1
- package/dist/chunks/{token-types-DTocOcwt.js → token-types-BB2ImFx6.js} +1 -1
- package/dist/chunks/{upload-DDYc1Qjj.js → upload-CMTCg47S.js} +1 -1
- package/dist/chunks/{validators-CrYXNnNE.js → validators-BlEWWX9O.js} +576 -562
- package/dist/chunks/{variable-draft-Bi3RlULA.js → variable-draft-OpYyaVCW.js} +4 -4
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +1602 -1555
- package/dist/format-utils/index.js +14 -14
- 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/surfboard/filter/types.d.ts +7 -5
- package/dist/types/index.js +5 -5
- package/dist/types/lib/dashboard-inputs/dashboard-date-comparison-plan.d.ts +0 -1
- package/dist/types/lib/formatters/raw-temporal-presentation.d.ts +0 -2
- package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +2 -1
- package/dist/types/shared/analytics-protocol/relative-date/sentence.d.ts +81 -0
- package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +0 -9
- package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +23 -2
- package/dist/types/shared/dashboard-authoring/canonical-result-keys.d.ts +20 -0
- package/dist/types/shared/dashboard-authoring/card-formats/detail-date-display.d.ts +84 -0
- package/dist/types/shared/dashboard-authoring/card-settings/column-names.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +36 -36
- package/dist/types/shared/dashboard-authoring/filter-model/date-filter-default.d.ts +37 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/format-utils/filter-line.d.ts +2 -0
- package/package.json +1 -1
- package/dist/chunks/filter-line-Dza3ee4w.js +0 -131
- package/dist/chunks/filter-value-text-DQw4v3nC.js +0 -146
- package/dist/chunks/raw-temporal-value-BnGCWJAL.js +0 -322
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { j as E, r as v, k as b, l as F } from "./validators-BlEWWX9O.js";
|
|
2
|
+
import "./matrix-operation-contract-CAanJeCj.js";
|
|
3
|
+
import "./analytics-base-schemas-8wz9vqn_.js";
|
|
4
|
+
import { r as w } from "./metric-comparison-BeKnUD08.js";
|
|
5
|
+
import { d as R, c as _ } from "./raw-temporal-value-BzdgeDa7.js";
|
|
6
|
+
import "../value-format-preferences/index.js";
|
|
7
|
+
const A = /^\d{4}-\d{2}-\d{2}$/;
|
|
8
|
+
function L(n) {
|
|
9
|
+
const a = n.split(".");
|
|
10
|
+
return a[a.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 y = 10;
|
|
13
|
+
function g(n, a) {
|
|
14
|
+
const i = n.slice(0, y).map(a).join(", "), r = n.length - y;
|
|
15
|
+
return r > 0 ? `${i}, and ${r} more` : i;
|
|
16
|
+
}
|
|
17
|
+
function I(n) {
|
|
18
|
+
if (n.valueType !== "date") return;
|
|
19
|
+
const a = v(n.relativeMeta);
|
|
20
|
+
return a && b(n.operation, a) && w(a).printsByName ? a : void 0;
|
|
21
|
+
}
|
|
22
|
+
function U(n, a) {
|
|
23
|
+
if (a !== "label") return I(n);
|
|
24
|
+
if (n.valueType !== "date") return;
|
|
25
|
+
const i = v(n.relativeMeta);
|
|
26
|
+
return i && b(n.operation, i) ? i : void 0;
|
|
27
|
+
}
|
|
28
|
+
function D(n, a = {}) {
|
|
29
|
+
const { name: i, operation: r, values: e, valueType: m } = n, t = a.label ?? L(i), d = U(n, a.relativeDates);
|
|
30
|
+
if (d) {
|
|
31
|
+
const o = R(r, d);
|
|
32
|
+
if (o) return `${t}: ${o}`;
|
|
33
|
+
const c = E(d).label;
|
|
34
|
+
if (c)
|
|
35
|
+
return r === "between" ? `${t}: ${c}` : `${t} not in ${c}`;
|
|
36
|
+
}
|
|
37
|
+
if (!e || e.length === 0)
|
|
38
|
+
return r === "is null" ? `${t} is empty` : r === "is not null" ? `${t} is not empty` : "";
|
|
39
|
+
const u = v(n.relativeMeta ?? n.materializedRelativeDate), $ = u ? F(r) : void 0, T = n.temporalPrecision === "minute" || !!(u && ($ ? w(u).bounds[$] === "instant" : w(u).subDay)), s = (o) => {
|
|
40
|
+
if (m === "date" && o) {
|
|
41
|
+
const c = {
|
|
42
|
+
year: "numeric",
|
|
43
|
+
month: "short",
|
|
44
|
+
day: "numeric",
|
|
45
|
+
...T ? {
|
|
46
|
+
hour: "numeric",
|
|
47
|
+
minute: "2-digit"
|
|
48
|
+
} : {}
|
|
49
|
+
};
|
|
50
|
+
if (typeof o == "string" && A.test(o)) {
|
|
51
|
+
const [p, f, h] = o.split("-").map(Number);
|
|
52
|
+
return new Intl.DateTimeFormat(void 0, {
|
|
53
|
+
year: "numeric",
|
|
54
|
+
month: "short",
|
|
55
|
+
day: "numeric",
|
|
56
|
+
timeZone: "UTC"
|
|
57
|
+
}).format(new Date(Date.UTC(p, f - 1, h)));
|
|
58
|
+
}
|
|
59
|
+
if (typeof o == "string" && _(o) === "wall_datetime") {
|
|
60
|
+
const [p, f, h, N, C] = o.split(/[-T :.]/).map(Number);
|
|
61
|
+
return new Intl.DateTimeFormat(void 0, {
|
|
62
|
+
...c,
|
|
63
|
+
timeZone: "UTC"
|
|
64
|
+
}).format(new Date(Date.UTC(p, f - 1, h, N, C)));
|
|
65
|
+
}
|
|
66
|
+
const l = new Date(o);
|
|
67
|
+
if (!isNaN(l.getTime()))
|
|
68
|
+
try {
|
|
69
|
+
return new Intl.DateTimeFormat(void 0, {
|
|
70
|
+
...c,
|
|
71
|
+
...a.timezone ? { timeZone: a.timezone } : {}
|
|
72
|
+
}).format(l);
|
|
73
|
+
} catch {
|
|
74
|
+
return T ? l.toLocaleString(void 0, c) : l.toLocaleDateString(void 0, c);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return String(o);
|
|
78
|
+
};
|
|
79
|
+
switch (r) {
|
|
80
|
+
case "=":
|
|
81
|
+
return `${t}: ${s(e[0])}`;
|
|
82
|
+
case "!=":
|
|
83
|
+
return `${t} ≠ ${s(e[0])}`;
|
|
84
|
+
case ">":
|
|
85
|
+
return `${t} > ${s(e[0])}`;
|
|
86
|
+
case "<":
|
|
87
|
+
return `${t} < ${s(e[0])}`;
|
|
88
|
+
case ">=":
|
|
89
|
+
return `${t} ≥ ${s(e[0])}`;
|
|
90
|
+
case "<=":
|
|
91
|
+
return `${t} ≤ ${s(e[0])}`;
|
|
92
|
+
case "between":
|
|
93
|
+
case "not between": {
|
|
94
|
+
const o = `${s(e[0])} - ${s(e[1])}`;
|
|
95
|
+
return r === "between" ? `${t}: ${o}` : `${t} not in ${o}`;
|
|
96
|
+
}
|
|
97
|
+
case "in":
|
|
98
|
+
return e.length === 1 ? `${t}: ${s(e[0])}` : `${t}: ${g(e, s)}`;
|
|
99
|
+
case "not in":
|
|
100
|
+
return `${t} not in (${g(e, s)})`;
|
|
101
|
+
case "like":
|
|
102
|
+
return `${t} contains "${e[0]}"`;
|
|
103
|
+
case "not like":
|
|
104
|
+
return `${t} doesn't contain "${e[0]}"`;
|
|
105
|
+
default:
|
|
106
|
+
return `${t}: ${g(e, s)}`;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function Z(n, a = {}) {
|
|
110
|
+
if (!n || n.length === 0)
|
|
111
|
+
return "";
|
|
112
|
+
const i = /* @__PURE__ */ new Map();
|
|
113
|
+
n.forEach((e) => {
|
|
114
|
+
const m = i.get(e.name) || [];
|
|
115
|
+
m.push(e), i.set(e.name, m);
|
|
116
|
+
});
|
|
117
|
+
const r = [];
|
|
118
|
+
return i.forEach((e, m) => {
|
|
119
|
+
if (e.length === 1) {
|
|
120
|
+
const t = D(e[0], a);
|
|
121
|
+
t && r.push(t);
|
|
122
|
+
} else {
|
|
123
|
+
const t = L(m), d = e.map((u) => D(u, a).replace(`${t}: `, "").replace(`${t} `, "")).filter(Boolean);
|
|
124
|
+
d.length > 0 && r.push(`${t}: ${d.join(" and ")}`);
|
|
125
|
+
}
|
|
126
|
+
}), r.join(" | ");
|
|
127
|
+
}
|
|
128
|
+
export {
|
|
129
|
+
y as F,
|
|
130
|
+
Z as a,
|
|
131
|
+
D as f,
|
|
132
|
+
I as r
|
|
133
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { J as Hr, K as Yr, M as Qr, N as Tn, O as Xr, P as Jr, Q as Zr, R as ei, S as ti, T as Dn, U as ni, V as Re, W as ri, X as ii, Y as ai, g as oi, k as we, Z as si, _ as ci } from "./stored-dashboard-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { s as yt, P as va, N as Ia, n as Le } from "./matrix-operation-contract-
|
|
5
|
-
import { a as Ca, C as Fa } from "./metric-comparison-
|
|
1
|
+
import { J as Hr, K as Yr, M as Qr, N as Tn, O as Xr, P as Jr, Q as Zr, R as ei, S as ti, T as Dn, U as ni, V as Re, W as ri, X as ii, Y as ai, g as oi, k as we, Z as si, _ as ci } from "./stored-dashboard-CxQl9g0l.js";
|
|
2
|
+
import { gM as kn, bz as xe, gN as li, gO as di, gP as ui, gQ as fi, P as J, gR as _n, bB as mi, gS as pi, gT as ct, aj as lt, gU as hi, gV as gi, gW as yi, L as dt, gX as bi, gY as vi, gZ as Ii, bO as Ci, Q as Fi, g_ as Si, M as wi, m as ut, g$ as ft, h0 as xi, h1 as F, o as Me, h2 as ne, h3 as x, h4 as Ti, h5 as Di, h6 as Vt, h7 as ki, h8 as Bt, h9 as _i, aT as T, ha as Mn, b3 as Oe, hb as Mi, hc as Oi, hd as Ai, he as $i, hf as Pi, gB as On, cF as An, hg as $n, hh as Pn, gw as Te, hi as qt, a4 as Z, hj as mt, hk as Ut, hl as pt, t as zt, hm as jt, cs as ht, hn as Ni, ho as Ei, hp as ce, hq as Ri, hr as Ki, hs as Li, a7 as Nn, cx as gt, aF as Vi, ht as Wt, hu as En, hv as Ge, K as Bi, aI as qi, eB as Ui, hw as zi, hx as ji, hy as Wi, hz as Gi, hA as Hi, hB as Yi, hC as Qi, hD as Xi, hE as He, gv as Ji, gq as Ke, hF as Zi, hG as ea, hH as Rn, a as Kn, hI as ta, hJ as na, dz as Ln, hK as Gt, d4 as ra, dC as Ht, dB as ia, eQ as aa, fc as oa, N as sa, f4 as ca, aY as la, fx as da, bW as Yt, hL as ua, hM as fa, cP as Qt } from "./resolve-dashboard-input-context-BlyFX8He.js";
|
|
3
|
+
import { a7 as me, s as ma, d as pa, aG as ha, a4 as Vn, aw as ga, r as Ye, n as ya, c as ba, j as Bn } from "./validators-BlEWWX9O.js";
|
|
4
|
+
import { s as yt, P as va, N as Ia, n as Le } from "./matrix-operation-contract-CAanJeCj.js";
|
|
5
|
+
import { a as Ca, C as Fa } from "./metric-comparison-BeKnUD08.js";
|
|
6
6
|
import { t as Xt, e as Jt } from "./analytics-base-schemas-8wz9vqn_.js";
|
|
7
7
|
import "zod";
|
|
8
|
-
import { c as te, i as N, b2 as Sa, b3 as wa, n as xa, j as Ta, e as Qe, g as Da, Y as A, ap as ka, aw as _a, d as Ma, ar as Oa, a2 as Aa, w as $a, ad as Pa, aL as M, ag as qn, f as Na, ae as Ea } from "./pivot-result-contract-expectations-
|
|
8
|
+
import { c as te, i as N, b2 as Sa, b3 as wa, n as xa, j as Ta, e as Qe, g as Da, Y as A, ap as ka, aw as _a, d as Ma, ar as Oa, a2 as Aa, w as $a, ad as Pa, aL as M, ag as qn, f as Na, ae as Ea } from "./pivot-result-contract-expectations-BkMRCjzf.js";
|
|
9
9
|
import "../value-format-preferences/index.js";
|
|
10
|
-
import { z as Ra, T as Ka, L as La,
|
|
10
|
+
import { z as Ra, T as Ka, L as La, ai as Va, a4 as Zt, O as Un, A as zn, at as Ba, P as jn, D as qa, a8 as Ua, a9 as za, G as Wn, _ as ja, $ as Gn, I as bt, a0 as Hn, au as Wa } from "./bookmark-state-Bt_eQEqt.js";
|
|
11
11
|
import { g as Ga } from "./pickers-DkqmtnTL.js";
|
|
12
12
|
import { n as Ha } from "./index-BVKzKl5d.js";
|
|
13
13
|
import { f as Ya, D as Qa, g as Xa, C as ye, i as en } from "./edit-9df1zOWe.js";
|
|
@@ -15,10 +15,10 @@ import { D as Ja } from "./resolver-DG_tfEpt.js";
|
|
|
15
15
|
import "./schema-C9NPiIru.js";
|
|
16
16
|
import "./index-CV_Kzou0.js";
|
|
17
17
|
import "./context-CVXTFljo.js";
|
|
18
|
-
import { r as Za, L as eo, x as to } from "./matrix-analytical-definition-
|
|
19
|
-
import { f as no } from "./filter-line-
|
|
20
|
-
import { i as ro } from "./aggregate-measure-field-
|
|
21
|
-
import { r as Xe } from "./pivot-result-identity-
|
|
18
|
+
import { r as Za, L as eo, x as to } from "./matrix-analytical-definition-CyWOwLmE.js";
|
|
19
|
+
import { f as no } from "./filter-line-CYT7KIXb.js";
|
|
20
|
+
import { i as ro } from "./aggregate-measure-field-DHlDj0Pc.js";
|
|
21
|
+
import { r as Xe } from "./pivot-result-identity-BKUjYO1u.js";
|
|
22
22
|
import { r as Yn } from "./applied-constraints-DU-wndZ7.js";
|
|
23
23
|
function io(e, t) {
|
|
24
24
|
if (!(typeof e != "number" || typeof t != "number"))
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { j as w, l as I, r as k } from "./validators-BlEWWX9O.js";
|
|
2
|
+
import { r as p } from "./metric-comparison-BeKnUD08.js";
|
|
3
|
+
import { d as T, c as D } from "./raw-temporal-value-BzdgeDa7.js";
|
|
4
|
+
import "../value-format-preferences/index.js";
|
|
5
|
+
import { ak as O, ag as L } from "./pivot-result-contract-expectations-BkMRCjzf.js";
|
|
6
|
+
const f = { kind: "plain" }, y = { kind: "temporal" }, S = {
|
|
7
|
+
"=": "=",
|
|
8
|
+
"!=": "!=",
|
|
9
|
+
">": ">",
|
|
10
|
+
">=": ">=",
|
|
11
|
+
"<": "<",
|
|
12
|
+
"<=": "<=",
|
|
13
|
+
in: "in",
|
|
14
|
+
"not in": "not in",
|
|
15
|
+
between: "between",
|
|
16
|
+
"not between": "not between",
|
|
17
|
+
contains: "contains (ignoring case)",
|
|
18
|
+
startsWith: "starts with (ignoring case)",
|
|
19
|
+
endsWith: "ends with (ignoring case)",
|
|
20
|
+
like: "matches the LIKE pattern (ignoring case)",
|
|
21
|
+
"not like": "does not match the LIKE pattern (ignoring case)",
|
|
22
|
+
isNull: "is empty",
|
|
23
|
+
isNotNull: "is not empty"
|
|
24
|
+
}, V = { between: "in", "not between": "not in" };
|
|
25
|
+
function A(t, n = {}) {
|
|
26
|
+
const { operator: e, values: i, reading: r } = t, s = r.kind === "bucket" ? `${t.subject} (${O(r.bucket)})` : t.subject, o = S[e], l = t.shownAs ? ` (shown as ${JSON.stringify(t.shownAs)})` : "", d = (a, c = 0) => ({ text: a, omittedValues: c });
|
|
27
|
+
if (e === "isNull" || e === "isNotNull") return d(`${s} ${o}`);
|
|
28
|
+
if (t.latestValue)
|
|
29
|
+
return d(`${s} ${o} the latest value of this field (resolved at run time)`);
|
|
30
|
+
const h = t.relative ? I(e) : void 0;
|
|
31
|
+
if (t.relative && h) {
|
|
32
|
+
const { definition: a } = w(t.relative), c = i.length === 1 && !p(t.relative).dataAnchored ? `; last resolved here as ${u(i[0], r)}` : "";
|
|
33
|
+
return d(
|
|
34
|
+
`${s} ${o} the ${h} of the relative window ${a} (${JSON.stringify(T(e, t.relative))}; resolved again at run time${c})`
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
if (e === "between" || e === "not between") {
|
|
38
|
+
const a = i.length === 2 ? v(i[0], i[1], r, n.timeZone) : void 0;
|
|
39
|
+
if (t.relative)
|
|
40
|
+
return d(`${s} ${V[e]} ${E(t.relative, a)}`);
|
|
41
|
+
if (a) {
|
|
42
|
+
const c = a.wholeDaysIn ? ` (whole days in ${a.wholeDaysIn})` : "";
|
|
43
|
+
return d(`${s} ${o} ${a.from} and ${a.to}${c}${l}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return e === "in" || e === "not in" || i.length !== 1 ? d(
|
|
47
|
+
`${s} ${o} (${N(i, r, n.maxListedValues)})${l}`,
|
|
48
|
+
$(i.length, n.maxListedValues)
|
|
49
|
+
) : d(`${s} ${o} ${u(i[0], r)}${l}`);
|
|
50
|
+
}
|
|
51
|
+
function _(t, n = {}) {
|
|
52
|
+
return t == null ? { text: "no value", omittedValues: 0 } : Array.isArray(t) ? {
|
|
53
|
+
text: N(t, f, n.maxListedValues),
|
|
54
|
+
omittedValues: $(t.length, n.maxListedValues)
|
|
55
|
+
} : { text: u(t), omittedValues: 0 };
|
|
56
|
+
}
|
|
57
|
+
function u(t, n = f) {
|
|
58
|
+
if (n.kind !== "plain") {
|
|
59
|
+
const e = g(t, n);
|
|
60
|
+
if (e !== void 0) return e;
|
|
61
|
+
}
|
|
62
|
+
return t instanceof Date ? g(t, y) ?? JSON.stringify(String(t)) : t === void 0 ? "null" : typeof t == "number" || typeof t == "boolean" || t === null ? String(t) : JSON.stringify(t) ?? String(t);
|
|
63
|
+
}
|
|
64
|
+
function N(t, n = f, e = Number.POSITIVE_INFINITY) {
|
|
65
|
+
const i = t.slice(0, Number.isFinite(e) ? e : void 0).map((s) => u(s, n)).join(", "), r = $(t.length, e);
|
|
66
|
+
return r > 0 ? `${i}, and ${r} more values` : i;
|
|
67
|
+
}
|
|
68
|
+
function $(t, n = Number.POSITIVE_INFINITY) {
|
|
69
|
+
return Math.max(0, t - n);
|
|
70
|
+
}
|
|
71
|
+
function m(t) {
|
|
72
|
+
if (t instanceof Date)
|
|
73
|
+
return Number.isNaN(t.getTime()) ? void 0 : { kind: "instant", instant: t };
|
|
74
|
+
if (typeof t != "string") return;
|
|
75
|
+
const n = D(t);
|
|
76
|
+
return n === "instant" ? { kind: n, instant: new Date(t) } : n ? { kind: n, text: t } : void 0;
|
|
77
|
+
}
|
|
78
|
+
function g(t, n) {
|
|
79
|
+
if (n.kind === "bucket")
|
|
80
|
+
return typeof t == "string" && L(t, n.bucket).ok ? t : void 0;
|
|
81
|
+
const e = m(t);
|
|
82
|
+
if (e)
|
|
83
|
+
return e.kind === "instant" ? e.instant.toISOString() : e.text;
|
|
84
|
+
}
|
|
85
|
+
function v(t, n, e, i) {
|
|
86
|
+
const r = e.kind === "temporal" ? m(t) : void 0, s = e.kind === "temporal" ? m(n) : void 0;
|
|
87
|
+
if (i && (r == null ? void 0 : r.kind) === "instant" && (s == null ? void 0 : s.kind) === "instant") {
|
|
88
|
+
const o = b(r.instant, i), l = b(s.instant, i);
|
|
89
|
+
if (o && l && o.time === "00:00:00" && r.instant.getUTCMilliseconds() === 0 && l.time === "23:59:59" && [0, 999].includes(s.instant.getUTCMilliseconds()))
|
|
90
|
+
return { from: o.date, to: l.date, wholeDaysIn: i };
|
|
91
|
+
}
|
|
92
|
+
return { from: u(t, e), to: u(n, e) };
|
|
93
|
+
}
|
|
94
|
+
function b(t, n) {
|
|
95
|
+
try {
|
|
96
|
+
const e = Object.fromEntries(
|
|
97
|
+
new Intl.DateTimeFormat("en-CA", {
|
|
98
|
+
timeZone: n,
|
|
99
|
+
year: "numeric",
|
|
100
|
+
month: "2-digit",
|
|
101
|
+
day: "2-digit",
|
|
102
|
+
hour: "2-digit",
|
|
103
|
+
minute: "2-digit",
|
|
104
|
+
second: "2-digit",
|
|
105
|
+
hourCycle: "h23"
|
|
106
|
+
}).formatToParts(t).map((i) => [i.type, i.value])
|
|
107
|
+
);
|
|
108
|
+
return {
|
|
109
|
+
date: `${e.year}-${e.month}-${e.day}`,
|
|
110
|
+
time: `${e.hour}:${e.minute}:${e.second}`
|
|
111
|
+
};
|
|
112
|
+
} catch {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function E(t, n) {
|
|
117
|
+
const { label: e, definition: i } = w(t), r = n && !p(t).dataAnchored ? `; last resolved here as ${n.from} to ${n.to}${n.wholeDaysIn ? `, whole days in ${n.wholeDaysIn}` : ""}` : "";
|
|
118
|
+
return `${e ? `${JSON.stringify(e)} ` : ""}(relative window: ${i}; resolved again at run time${r})`;
|
|
119
|
+
}
|
|
120
|
+
const R = {
|
|
121
|
+
"=": "=",
|
|
122
|
+
"!=": "!=",
|
|
123
|
+
">": ">",
|
|
124
|
+
">=": ">=",
|
|
125
|
+
"<": "<",
|
|
126
|
+
"<=": "<=",
|
|
127
|
+
in: "in",
|
|
128
|
+
"not in": "not in",
|
|
129
|
+
like: "like",
|
|
130
|
+
"not like": "not like",
|
|
131
|
+
between: "between",
|
|
132
|
+
"not between": "not between",
|
|
133
|
+
"is null": "isNull",
|
|
134
|
+
"is not null": "isNotNull"
|
|
135
|
+
};
|
|
136
|
+
function j(t, n, e = {}) {
|
|
137
|
+
const i = t.valueType === "date";
|
|
138
|
+
return A({
|
|
139
|
+
subject: n,
|
|
140
|
+
operator: R[t.operation],
|
|
141
|
+
values: t.values,
|
|
142
|
+
reading: i ? y : f,
|
|
143
|
+
...i ? { relative: k(t.relativeMeta) } : {}
|
|
144
|
+
}, e);
|
|
145
|
+
}
|
|
146
|
+
export {
|
|
147
|
+
f as P,
|
|
148
|
+
y as T,
|
|
149
|
+
A as a,
|
|
150
|
+
_ as b,
|
|
151
|
+
j as d,
|
|
152
|
+
$ as o
|
|
153
|
+
};
|
|
@@ -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 { aE as Ne, a2 as Fe, ar as oe, V as se, k as Re, a1 as Me, Z as F } from "./pivot-result-contract-expectations-
|
|
5
|
-
import {
|
|
4
|
+
import { aE as Ne, a2 as Fe, ar as oe, V as se, k as Re, a1 as Me, Z as F } from "./pivot-result-contract-expectations-BkMRCjzf.js";
|
|
5
|
+
import { V as X, a7 as Le, U as Be } from "./validators-BlEWWX9O.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-CAanJeCj.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 { J as Ke, K as Ge, L as He, M as We, N as Xe, n as Ze, O as Ye, P as Je, Q as Qe, R as et, S as tt, T as nt, U as rt } from "./resolve-dashboard-input-context-
|
|
13
|
-
import { H as ot, I as at } from "./bookmark-state-
|
|
12
|
+
import { J as Ke, K as Ge, L as He, M as We, N as Xe, n as Ze, O as Ye, P as Je, Q as Qe, R as et, S as tt, T as nt, U as rt } from "./resolve-dashboard-input-context-BlyFX8He.js";
|
|
13
|
+
import { H as ot, I as at } from "./bookmark-state-Bt_eQEqt.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 {
|
|
2
|
-
import {
|
|
3
|
-
import { a as Ie } from "./metric-comparison-
|
|
1
|
+
import { G as $, H as T, E as ge, I as te, F as K, L as he } from "./raw-temporal-value-BzdgeDa7.js";
|
|
2
|
+
import { ao as C, aq as w, ai as G, ag as p, ap as pe, ah as M, av as ve, aj as J, a7 as Q, K as X, t as ke } from "./validators-BlEWWX9O.js";
|
|
3
|
+
import { a as Ie } from "./metric-comparison-BeKnUD08.js";
|
|
4
4
|
class Y extends Error {
|
|
5
5
|
constructor(t) {
|
|
6
6
|
super(t), this.name = "RelativeDateUsageError";
|
|
@@ -231,15 +231,15 @@ 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 ? w(N) : void 0,
|
|
235
|
-
if (h && !S || N && N !== "unknown" && E === "unknown" || N && N !== "unknown" && !S && !
|
|
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 ? w(N) : void 0, x = N && N !== "unknown" ? C(N) : void 0;
|
|
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
|
-
const V = S ||
|
|
237
|
+
const V = S || x, P = V ? B(V) : Ae(I);
|
|
238
238
|
return P ? {
|
|
239
239
|
capabilities: P,
|
|
240
240
|
connectionType: h,
|
|
241
241
|
capabilityIdentity: h ? pe(h) : void 0,
|
|
242
|
-
inferred: !S && !
|
|
242
|
+
inferred: !S && !x,
|
|
243
243
|
signature: A(P)
|
|
244
244
|
} : void 0;
|
|
245
245
|
});
|
|
@@ -406,7 +406,7 @@ function u(e) {
|
|
|
406
406
|
function _(e) {
|
|
407
407
|
return e && typeof e == "object" && !Array.isArray(e) ? e : void 0;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function Le(e) {
|
|
410
410
|
const t = _(e);
|
|
411
411
|
return !!(t && t.type === "dataset" && u(t.name));
|
|
412
412
|
}
|
|
@@ -445,12 +445,12 @@ function R(e, t) {
|
|
|
445
445
|
...s ? { connectionId: s } : {}
|
|
446
446
|
};
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function xe(e, t = {}) {
|
|
449
449
|
const n = u(e.fieldEntityType);
|
|
450
450
|
if (n && n !== "dataset")
|
|
451
451
|
return { kind: "unqualified" };
|
|
452
452
|
const i = e.entities.filter(
|
|
453
|
-
(s) => t.includePhysicalDatasets ?
|
|
453
|
+
(s) => t.includePhysicalDatasets ? Le(s) : ce(s)
|
|
454
454
|
), a = u(e.entityId);
|
|
455
455
|
if (a) {
|
|
456
456
|
const s = H(a), o = i.filter((d) => {
|
|
@@ -569,7 +569,7 @@ function nt(e) {
|
|
|
569
569
|
oe
|
|
570
570
|
), n = e.entities.filter(
|
|
571
571
|
ce
|
|
572
|
-
), i = t.length > 0 || n.length > 0, a =
|
|
572
|
+
), i = t.length > 0 || n.length > 0, a = xe(e), r = e.qualifiedHints || [], s = r.some(
|
|
573
573
|
(c) => {
|
|
574
574
|
var l;
|
|
575
575
|
return (l = u(c)) == null ? void 0 : l.includes(".");
|
|
@@ -991,7 +991,7 @@ function z(e) {
|
|
|
991
991
|
derivedField: t && U(t)
|
|
992
992
|
};
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function L(e) {
|
|
995
995
|
const {
|
|
996
996
|
label: t,
|
|
997
997
|
format: n,
|
|
@@ -1009,7 +1009,7 @@ function x(e) {
|
|
|
1009
1009
|
derivedField: r && U(r),
|
|
1010
1010
|
calculatedFormula: s && {
|
|
1011
1011
|
...s,
|
|
1012
|
-
inputFields: s.inputFields.map(
|
|
1012
|
+
inputFields: s.inputFields.map(L)
|
|
1013
1013
|
}
|
|
1014
1014
|
};
|
|
1015
1015
|
}
|
|
@@ -1019,7 +1019,7 @@ function ye(e) {
|
|
|
1019
1019
|
conditions: e.conditions.map(
|
|
1020
1020
|
({ label: t, field: n, ...i }) => ({
|
|
1021
1021
|
...i,
|
|
1022
|
-
field:
|
|
1022
|
+
field: L(n)
|
|
1023
1023
|
})
|
|
1024
1024
|
),
|
|
1025
1025
|
groups: e.groups.map(ye)
|
|
@@ -1053,8 +1053,8 @@ function Nt(e) {
|
|
|
1053
1053
|
...n,
|
|
1054
1054
|
keys: n.keys.map((i) => ({
|
|
1055
1055
|
...i,
|
|
1056
|
-
source:
|
|
1057
|
-
target:
|
|
1056
|
+
source: L(i.source),
|
|
1057
|
+
target: L(i.target)
|
|
1058
1058
|
}))
|
|
1059
1059
|
}))
|
|
1060
1060
|
}))
|
|
@@ -1089,7 +1089,7 @@ export {
|
|
|
1089
1089
|
oe as c,
|
|
1090
1090
|
_e as d,
|
|
1091
1091
|
ce as e,
|
|
1092
|
-
|
|
1092
|
+
xe as f,
|
|
1093
1093
|
ht as g,
|
|
1094
1094
|
nt as h,
|
|
1095
1095
|
at as i,
|