react-semaphor 0.1.584 → 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 +477 -440
- package/dist/assistant-context/index.js +1 -1
- package/dist/briefings/index.js +2 -2
- package/dist/chunks/{assistant-chat-nmycV1Se.js → assistant-chat-BdbLmAnK.js} +7 -7
- package/dist/chunks/{bookmark-impact-CI3gmxi0.js → bookmark-impact-BhT3k379.js} +2 -2
- package/dist/chunks/{bookmark-state-D9-RFkDg.js → bookmark-state-CL4WEpgB.js} +2 -2
- package/dist/chunks/{card-filter-builder-C7QyPqRy.js → card-filter-builder-CEcKF6Fw.js} +50 -50
- package/dist/chunks/{comparison-window-caption-BAnsTI8y.js → comparison-window-caption-CoART8BC.js} +530 -633
- package/dist/chunks/{dashboard-inJy_V78.js → dashboard-MPku_x1M.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DXs0XA1O.js → dashboard-briefing-launcher-CkFNlkr1.js} +8 -8
- package/dist/chunks/{dashboard-controls-6Zoo8d8Y.js → dashboard-controls-Clt4ovXS.js} +9 -9
- package/dist/chunks/{dashboard-json-D5eJhVA9.js → dashboard-json-DSmXazIg.js} +1 -1
- package/dist/chunks/{dates-B3_GWc_Y.js → dates-CYZW9owO.js} +6 -6
- package/dist/chunks/{edit-dashboard-visual-DR03SYeW.js → edit-dashboard-visual-Dn2ECRbX.js} +2751 -2686
- package/dist/chunks/filter-line-Cu2u1K36.js +131 -0
- package/dist/chunks/{filter-reach-copy-CZwzrxBp.js → filter-reach-copy-CmJpPa4G.js} +1627 -1371
- package/dist/chunks/{filter-value-text-DtOvqcjn.js → filter-value-text-xefXzZlf.js} +10 -10
- package/dist/chunks/{index-BgT1L0p5.js → index-0WYn6RMz.js} +35 -35
- package/dist/chunks/{matrix-analytical-definition-Cs2v43FM.js → matrix-analytical-definition-QjBgUYhP.js} +382 -544
- package/dist/chunks/{metric-comparison-Be4uS3Ql.js → metric-comparison-ZmurmEIs.js} +2 -2
- package/dist/chunks/{pivot-header-presentation-uH06jiZD.js → pivot-header-presentation-CdeTU96P.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-DvZY4eJM.js → pivot-result-contract-expectations-Bx_BCu-7.js} +1010 -1005
- package/dist/chunks/{pivot-result-identity-BZexMfmL.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-DWeVe2so.js → report-preferences-dialog-BRaeufEi.js} +119 -119
- package/dist/chunks/{resolve-dashboard-input-context-uATCuOP7.js → resolve-dashboard-input-context-Cn9jumxl.js} +304 -299
- package/dist/chunks/{saved-dashboard-context-DSVV9iqW.js → saved-dashboard-context-CfqkUMzR.js} +5 -5
- package/dist/chunks/{semaphor-ready-indicator-B9vvRMnJ.js → semaphor-ready-indicator-D6WjdTGl.js} +19776 -19620
- package/dist/chunks/{shelf-drop-preview-context-BHOnp5Bo.js → shelf-drop-preview-context-Bbbrr9u4.js} +2 -2
- package/dist/chunks/{stored-dashboard-xc5iidHL.js → stored-dashboard-sPkTjxYf.js} +7 -7
- package/dist/chunks/{table-export-sheet-Cv_94obr.js → table-export-sheet-Dmtqi5NV.js} +1 -1
- package/dist/chunks/{variable-draft-C3CjhsJQ.js → variable-draft-D1RotIEG.js} +3 -3
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +707 -704
- package/dist/format-utils/index.js +145 -142
- package/dist/index.js +14 -14
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/index.js +2 -2
- package/dist/types/shared/dashboard-authoring/index.d.ts +1 -0
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +191 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +3 -0
- package/dist/types/shared/dashboard-authoring/see-records/measure-kind.d.ts +5 -2
- package/dist/types/shared/dashboard-authoring/see-records/result.d.ts +37 -4
- 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/package.json +1 -1
- package/dist/chunks/raw-temporal-value-DdT0s47W.js +0 -159
|
@@ -2,32 +2,32 @@ var _h = Object.defineProperty;
|
|
|
2
2
|
var Ch = (e, t, n) => t in e ? _h(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var se = (e, t, n) => Ch(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { t as qd, D as Sh, C as kh, y as Th, k as ro, e as oo, d as Ld, S as Di, w as Dh } from "./analytics-base-schemas-BaIQrEzX.js";
|
|
5
|
-
import { r as
|
|
6
|
-
import { a5 as ce, b2 as xi, S as Er, ay as tr, a7 as nr, am as Vd, aq as Eh, r as it, Y as $h, k as tt, a2 as Ie, aw as oe, f as Nh, ai as Sa, af as $r, ah as Ud, C as Fi, aF as Ah, b1 as Mh, J as Oh, b as Et, b3 as Rh, b4 as dl, w as Ph, v as
|
|
5
|
+
import { r as zt, c as xh, P as Fh } from "./pivot-result-identity-Bvs6Uq3v.js";
|
|
6
|
+
import { a5 as ce, b2 as xi, S as Er, ay as tr, a7 as nr, am as Vd, aq as Eh, r as it, Y as $h, k as tt, a2 as Ie, aw as oe, f as Nh, ai as Sa, af as $r, ah as Ud, C as Fi, aF as Ah, b1 as Mh, J as Oh, b as Et, b3 as Rh, b4 as dl, w as Ph, v as Kd, b5 as Bh, c as zd, j as Yd, b0 as Wd, aW as Ei, aU as nt, aX as jh, b6 as qh, aS as Uo, t as Lh, A as Vh, u as Uh, aZ as Kh, o as ul, U as zh, D as Yh, av as Wh, a_ as qe, aL as Gh, aO as Hh, b7 as Nr, aN as Qh, aK as Jh, ae as fl } from "./validators-CJ8Jh0E8.js";
|
|
7
7
|
import { an as Xh, P as ka, s as Zh, C as ey, n as Qt, F as io, o as xt, Q as Ta, q as ty, r as Gd } from "./matrix-operation-contract-BM5TveR3.js";
|
|
8
|
-
import {
|
|
8
|
+
import { r as rr, h as ny, C as ry, D as Da, i as xa, j as oy, a as iy, e as ay } from "./metric-comparison-ZmurmEIs.js";
|
|
9
9
|
import { z as u } from "zod";
|
|
10
|
-
import { ad as sy, i as Fa,
|
|
11
|
-
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as
|
|
10
|
+
import { ad as sy, i as Fa, b4 as Hd, b5 as Ea, b6 as ly, b7 as $i, c as $a, d as cy, aO as dy, aJ as ao, aM as so, aP as uy, an as fy, a6 as my, _ as py, aw as gy, ar as hy, ay as on, ao as yy, av as by, ac as rt, aa as vy, f as Na, az as Iy, aB as Qd, aK as Jd, e as wy, aQ as _y, aL as Cy, af as Sy, a7 as ky, al as Aa, ae as Ty, aC as Dy, o as xy, k as Fy, Y as Ey, b8 as $y, aN as Ny, r as Ma, D as Ay } from "./pivot-result-contract-expectations-Bx_BCu-7.js";
|
|
11
|
+
import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as Ke } from "../value-format-preferences/index.js";
|
|
12
12
|
import { j as My, g as Xd, a as Oy, C as Ry, S as Py } from "./pickers-DkqmtnTL.js";
|
|
13
|
-
import { a3 as Oa, c as Ra, r as Pa, A as Ba, O as or, P as lo, ar as Zd, D as $t, h as By, d as jy, aD as Rt, aL as qy, S as eu, ab as co, aK as Ly, aJ as Vy, aF as Uy, aM as
|
|
13
|
+
import { a3 as Oa, c as Ra, r as Pa, A as Ba, O as or, P as lo, ar as Zd, D as $t, h as By, d as jy, aD as Rt, aL as qy, S as eu, ab as co, aK as Ly, aJ as Vy, aF as Uy, aM as Ky, ad as zy, ag as ja, aj as Yy, af as tu, ak as qa, G as La, C as Va, aA as nu, aI as Ua, aN as uo, I as fo, Q as Wy, L as Gy, H as ru, a9 as Hy, J as Qy, _ as Jy, aO as Ka, e as Xy, F as Zy, ax as ou } from "./bookmark-state-CL4WEpgB.js";
|
|
14
14
|
import { e as ml } from "./schema-C9NPiIru.js";
|
|
15
15
|
import { D as eb, a as tb } from "./index-CV_Kzou0.js";
|
|
16
16
|
import "./context-BTLBjQNh.js";
|
|
17
17
|
import { b as nb } from "./report-runtime-context-NlOXwyRB.js";
|
|
18
|
-
import { j as rb,
|
|
19
|
-
import { v as cu } from "./raw-temporal-value-
|
|
18
|
+
import { j as rb, K as ob, I as ib, f as ab, e as iu, o as Pn, u as pl, a as gl, L as hl, n as sb, l as lb, M as za, J as au, k as Ar, q as cb, t as db, p as su, c as ub, C as Ni, h as fb, A as mb, s as pb, D as gb, S as hb, H as yb, z as bb } from "./matrix-analytical-definition-QjBgUYhP.js";
|
|
19
|
+
import { l as lu, o as vb, i as Ib, w as Ya, r as Wa, k as wb, v as cu } from "./raw-temporal-value-DH-feMc2.js";
|
|
20
20
|
const aN = (e) => Object.keys(e).length === 0;
|
|
21
21
|
function ht(e) {
|
|
22
22
|
return !!e && typeof e == "object";
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Ko(e, t, n) {
|
|
25
25
|
return typeof t == "string" && t.trim().length > 0 && (n.preserveSyntheticMessage || e.usesFallbackMessage !== !0);
|
|
26
26
|
}
|
|
27
27
|
function du(e, t, n = {}) {
|
|
28
|
-
return typeof e == "string" && e.trim() ? e : ht(e) ? e instanceof Error &&
|
|
28
|
+
return typeof e == "string" && e.trim() ? e : ht(e) ? e instanceof Error && Ko(e, e.message, n) || Ko(e, e.message, n) ? e.message : typeof e.details == "string" && e.details.trim() ? e.details : Ko(e, e.error, n) ? e.error : typeof e.detail == "string" && e.detail.trim() ? e.detail : ht(e.details) && typeof e.details.error == "string" && e.details.error.trim() ? e.details.error : t : t;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function zo(e, t, n) {
|
|
31
31
|
if (e instanceof Error) {
|
|
32
32
|
const a = e;
|
|
33
33
|
return a.status ?? (a.status = t), a.payload ?? (a.payload = e), a.error ?? (a.error = a.message), a;
|
|
@@ -58,11 +58,11 @@ function dN(e) {
|
|
|
58
58
|
async function Cb(e) {
|
|
59
59
|
const t = `HTTP error! status: ${e.status}`, n = await e.text();
|
|
60
60
|
if (!n)
|
|
61
|
-
return
|
|
61
|
+
return zo(null, e.status, t);
|
|
62
62
|
try {
|
|
63
|
-
return
|
|
63
|
+
return zo(JSON.parse(n), e.status, t);
|
|
64
64
|
} catch {
|
|
65
|
-
return
|
|
65
|
+
return zo(n, e.status, t);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
async function uu(e, t, n = "GET", r, o) {
|
|
@@ -807,7 +807,7 @@ function yo(e) {
|
|
|
807
807
|
var t;
|
|
808
808
|
return (t = e.candidateDatasetNames) != null && t.length ? Mt(e.candidateDatasetNames) : Mt([e.datasetName]);
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function Kb(e, t) {
|
|
811
811
|
const n = e || [];
|
|
812
812
|
for (const r of yo(t)) {
|
|
813
813
|
const o = n.find(
|
|
@@ -827,7 +827,7 @@ function DN(e, t) {
|
|
|
827
827
|
if (!n)
|
|
828
828
|
return [];
|
|
829
829
|
const r = _u(t).filter(
|
|
830
|
-
(o) =>
|
|
830
|
+
(o) => Kb(e, {
|
|
831
831
|
datasetName: o
|
|
832
832
|
}) === t
|
|
833
833
|
);
|
|
@@ -877,7 +877,7 @@ function Qo(e, t, n, r) {
|
|
|
877
877
|
yo(o)
|
|
878
878
|
);
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function zb(e, t, n, r) {
|
|
881
881
|
var i;
|
|
882
882
|
const o = (i = e.config) == null ? void 0 : i.joinPlan;
|
|
883
883
|
if (o) {
|
|
@@ -912,7 +912,7 @@ function Yb(e, t) {
|
|
|
912
912
|
return;
|
|
913
913
|
}
|
|
914
914
|
const r = be((i = e.dataSource) == null ? void 0 : i.semanticDomainId), o = Su(e);
|
|
915
|
-
Cu(e, r, t),
|
|
915
|
+
Cu(e, r, t), zb(
|
|
916
916
|
e,
|
|
917
917
|
r,
|
|
918
918
|
t,
|
|
@@ -1231,16 +1231,16 @@ function AN(e) {
|
|
|
1231
1231
|
return Eu(e) !== null;
|
|
1232
1232
|
}
|
|
1233
1233
|
function MN(e, t) {
|
|
1234
|
-
const { hour: n, minute: r } =
|
|
1234
|
+
const { hour: n, minute: r } = Ya(e, t);
|
|
1235
1235
|
return `${String(n).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
|
|
1236
1236
|
}
|
|
1237
1237
|
function ON(e, t, n, r = {}) {
|
|
1238
1238
|
const o = Eu(t);
|
|
1239
1239
|
if (!o) return null;
|
|
1240
1240
|
const i = r.boundary === "end";
|
|
1241
|
-
return
|
|
1241
|
+
return Ib(
|
|
1242
1242
|
{
|
|
1243
|
-
...
|
|
1243
|
+
...Ya(e, n),
|
|
1244
1244
|
hour: o.hours,
|
|
1245
1245
|
minute: o.minutes,
|
|
1246
1246
|
second: i ? 59 : 0,
|
|
@@ -1250,14 +1250,14 @@ function ON(e, t, n, r = {}) {
|
|
|
1250
1250
|
);
|
|
1251
1251
|
}
|
|
1252
1252
|
function RN(e, t, n) {
|
|
1253
|
-
return (t === "=" || t === "!=") && n.temporalPrecision !== "minute" ?
|
|
1253
|
+
return (t === "=" || t === "!=") && n.temporalPrecision !== "minute" ? vb(e, n.timezone) : e;
|
|
1254
1254
|
}
|
|
1255
1255
|
function PN(e, t) {
|
|
1256
1256
|
let n = [e == null ? void 0 : e.from, e == null ? void 0 : e.to];
|
|
1257
1257
|
const r = e.from && (e.to === void 0 || e.from.getTime() === e.to.getTime()) ? e.from : void 0;
|
|
1258
1258
|
return t.temporalPrecision !== "minute" && r && (n = [
|
|
1259
1259
|
e.from,
|
|
1260
|
-
|
|
1260
|
+
lu(r, "day", { tz: t.timezone, weekStart: 1 })
|
|
1261
1261
|
]), {
|
|
1262
1262
|
from: n[0],
|
|
1263
1263
|
to: n[1],
|
|
@@ -1481,7 +1481,7 @@ function bv(e) {
|
|
|
1481
1481
|
) : [];
|
|
1482
1482
|
}
|
|
1483
1483
|
function Ru(e, t = {}) {
|
|
1484
|
-
return
|
|
1484
|
+
return ab(
|
|
1485
1485
|
Pu(e, t)
|
|
1486
1486
|
);
|
|
1487
1487
|
}
|
|
@@ -1525,7 +1525,7 @@ function Bu(e, t) {
|
|
|
1525
1525
|
const n = Pu(
|
|
1526
1526
|
e,
|
|
1527
1527
|
t || {}
|
|
1528
|
-
), r =
|
|
1528
|
+
), r = iu(n, {
|
|
1529
1529
|
includePhysicalDatasets: !0
|
|
1530
1530
|
});
|
|
1531
1531
|
return r.kind === "resolved" ? r.source : void 0;
|
|
@@ -1727,7 +1727,7 @@ function Jo(e, t) {
|
|
|
1727
1727
|
const n = Xt(e, t);
|
|
1728
1728
|
return n ? { ...t, ...n } : t;
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1730
|
+
function KN(e, t) {
|
|
1731
1731
|
const n = t || [];
|
|
1732
1732
|
return n.length === 0 ? e : {
|
|
1733
1733
|
...e,
|
|
@@ -1739,7 +1739,7 @@ function zN(e, t) {
|
|
|
1739
1739
|
}))
|
|
1740
1740
|
};
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1742
|
+
function zN(e, t) {
|
|
1743
1743
|
if (!(e != null && e.joins.length))
|
|
1744
1744
|
return [];
|
|
1745
1745
|
const n = [
|
|
@@ -1852,10 +1852,10 @@ function Ev(e, t) {
|
|
|
1852
1852
|
return Ge(a, t);
|
|
1853
1853
|
}
|
|
1854
1854
|
function $v(e, t) {
|
|
1855
|
-
const n =
|
|
1855
|
+
const n = Ku(e, t, is(t));
|
|
1856
1856
|
return n.length === 1 ? n[0] : void 0;
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1858
|
+
function Ku(e, t, n) {
|
|
1859
1859
|
var i, a, s;
|
|
1860
1860
|
const r = !!(Nh(e) || (a = (i = e.calculatedFormula) == null ? void 0 : i.inputFields) != null && a.length || (s = e.derivedField) != null && s.inputs && Object.keys(e.derivedField.inputs).length > 0);
|
|
1861
1861
|
if (e.source && !r) {
|
|
@@ -1880,7 +1880,7 @@ function Nv(e, t) {
|
|
|
1880
1880
|
];
|
|
1881
1881
|
return tr(
|
|
1882
1882
|
[...r, ...i].flatMap(
|
|
1883
|
-
(a) =>
|
|
1883
|
+
(a) => Ku(a, t, n)
|
|
1884
1884
|
)
|
|
1885
1885
|
);
|
|
1886
1886
|
}
|
|
@@ -1894,7 +1894,7 @@ function Ge(e, t) {
|
|
|
1894
1894
|
if ((t == null ? void 0 : t.mode) === "semanticDomain" && !i)
|
|
1895
1895
|
return;
|
|
1896
1896
|
if ((t == null ? void 0 : t.mode) !== "database" && o.type === "dataset") {
|
|
1897
|
-
const f =
|
|
1897
|
+
const f = iu(
|
|
1898
1898
|
{
|
|
1899
1899
|
entities: [o],
|
|
1900
1900
|
semanticDomainId: t == null ? void 0 : t.semanticDomainId,
|
|
@@ -2021,9 +2021,9 @@ function vo(e, t) {
|
|
|
2021
2021
|
}
|
|
2022
2022
|
function YN(e, t) {
|
|
2023
2023
|
var n;
|
|
2024
|
-
return (n =
|
|
2024
|
+
return (n = zu(e, t)) == null ? void 0 : n.source;
|
|
2025
2025
|
}
|
|
2026
|
-
function
|
|
2026
|
+
function zu(e, t) {
|
|
2027
2027
|
if (e.kind === "sql")
|
|
2028
2028
|
return e.pinnedCatalogSources.find(
|
|
2029
2029
|
(n) => oe(n.source, t)
|
|
@@ -2161,7 +2161,7 @@ function Uv(e, t, n) {
|
|
|
2161
2161
|
}
|
|
2162
2162
|
if (e.optionPopulation !== void 0) {
|
|
2163
2163
|
const o = mv(e.optionPopulation);
|
|
2164
|
-
o.ok ? ((r = o.population) == null ? void 0 : r.kind) === "related_population" && !
|
|
2164
|
+
o.ok ? ((r = o.population) == null ? void 0 : r.kind) === "related_population" && !Kv(e.optionSource) && n.push({
|
|
2165
2165
|
code: "invalid_option_population",
|
|
2166
2166
|
path: `${t}.optionPopulation`,
|
|
2167
2167
|
message: `${t}.optionPopulation related_population requires an authored semantic optionSource.`,
|
|
@@ -2174,10 +2174,10 @@ function Uv(e, t, n) {
|
|
|
2174
2174
|
});
|
|
2175
2175
|
}
|
|
2176
2176
|
}
|
|
2177
|
-
function
|
|
2177
|
+
function Kv(e) {
|
|
2178
2178
|
return me(e) && me(e.source) && e.source.kind === "semantic";
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2180
|
+
function zv(e, t, n, r, o, i) {
|
|
2181
2181
|
var d;
|
|
2182
2182
|
we(t.bindingId) || o.push({
|
|
2183
2183
|
code: "invalid_binding_id",
|
|
@@ -2357,7 +2357,7 @@ function Gv(e, t, n, r, o, i) {
|
|
|
2357
2357
|
});
|
|
2358
2358
|
return;
|
|
2359
2359
|
}
|
|
2360
|
-
s.kind === "bound" ?
|
|
2360
|
+
s.kind === "bound" ? zv(
|
|
2361
2361
|
e,
|
|
2362
2362
|
s,
|
|
2363
2363
|
c,
|
|
@@ -2823,16 +2823,16 @@ function oI(e) {
|
|
|
2823
2823
|
}), p = m.ok ? [] : m.issues, g = new Map(m.inputs.map((v) => [v.id, v]));
|
|
2824
2824
|
s.forEach((v, S) => {
|
|
2825
2825
|
const N = `dashboard.inputs[${S}]`, O = p.filter(
|
|
2826
|
-
(
|
|
2826
|
+
(K) => K.inputId === v.raw.id || K.path === N || K.path.startsWith(`${N}.`)
|
|
2827
2827
|
);
|
|
2828
|
-
for (const
|
|
2828
|
+
for (const K of O)
|
|
2829
2829
|
t.push({
|
|
2830
2830
|
code: "contract",
|
|
2831
|
-
message:
|
|
2831
|
+
message: K.message.replace(`dashboard.inputs[${S}]`, v.path),
|
|
2832
2832
|
path: v.path,
|
|
2833
2833
|
inputId: v.raw.id,
|
|
2834
2834
|
filterId: v.raw.filter.id,
|
|
2835
|
-
contractIssue:
|
|
2835
|
+
contractIssue: K
|
|
2836
2836
|
});
|
|
2837
2837
|
const P = g.get(v.raw.id);
|
|
2838
2838
|
O.length || !P || P.kind !== "filter" || a.push({ input: P, origin: v.origin, path: v.path });
|
|
@@ -2840,13 +2840,13 @@ function oI(e) {
|
|
|
2840
2840
|
const h = [], y = /* @__PURE__ */ new Map();
|
|
2841
2841
|
let b;
|
|
2842
2842
|
for (const v of a) {
|
|
2843
|
-
const { input: S, origin: N, path: O } = v, P = S.filter.id,
|
|
2843
|
+
const { input: S, origin: N, path: O } = v, P = S.filter.id, K = Nl(S.id), E = () => {
|
|
2844
2844
|
(N === "embeddedInput" || N === "referencedInput") && n.add(S.id);
|
|
2845
2845
|
};
|
|
2846
|
-
if (
|
|
2846
|
+
if (K !== void 0 && K !== P) {
|
|
2847
2847
|
t.push({
|
|
2848
2848
|
code: "compat_id_conflict",
|
|
2849
|
-
message: `Dashboard input '${S.id}' must hold dashboard filter '${
|
|
2849
|
+
message: `Dashboard input '${S.id}' must hold dashboard filter '${K}'.`,
|
|
2850
2850
|
path: O,
|
|
2851
2851
|
inputId: S.id,
|
|
2852
2852
|
filterId: P
|
|
@@ -2890,26 +2890,26 @@ function oI(e) {
|
|
|
2890
2890
|
const N = _(v);
|
|
2891
2891
|
if (!N) return [];
|
|
2892
2892
|
const O = S != null && S.scope ? { ...N.input, scope: S.scope } : N.input, P = new Map(
|
|
2893
|
-
(e.sheets ?? []).map((
|
|
2893
|
+
(e.sheets ?? []).map((K) => [K.id, K.kind === "document" ? "document" : "dashboard"])
|
|
2894
2894
|
);
|
|
2895
|
-
return Ba(e).flatMap((
|
|
2896
|
-
const E = P.get(
|
|
2895
|
+
return Ba(e).flatMap((K) => {
|
|
2896
|
+
const E = P.get(K.sheetId) ?? "dashboard";
|
|
2897
2897
|
return $t(O, {
|
|
2898
|
-
sheetId:
|
|
2899
|
-
cardId:
|
|
2900
|
-
...
|
|
2898
|
+
sheetId: K.sheetId,
|
|
2899
|
+
cardId: K.cardId,
|
|
2900
|
+
...K.kind === "documentSectionCard" ? { sectionId: K.sectionId } : {},
|
|
2901
2901
|
sheetKind: E
|
|
2902
|
-
}) ? [{ ...
|
|
2902
|
+
}) ? [{ ...K, sheetKind: E }] : [];
|
|
2903
2903
|
});
|
|
2904
2904
|
}, w = (v, S) => {
|
|
2905
2905
|
const N = _(v);
|
|
2906
2906
|
if (!N) return [];
|
|
2907
2907
|
const O = S != null && S.scope ? { ...N.input, scope: S.scope } : N.input;
|
|
2908
2908
|
return (e.variables ?? []).flatMap((P) => {
|
|
2909
|
-
const
|
|
2909
|
+
const K = Zd(e, P.id).filter(
|
|
2910
2910
|
(E) => $t(O, E)
|
|
2911
2911
|
);
|
|
2912
|
-
return
|
|
2912
|
+
return K.length ? [{ variableId: P.id, places: K }] : [];
|
|
2913
2913
|
});
|
|
2914
2914
|
}, x = aI(e, h, C);
|
|
2915
2915
|
let $;
|
|
@@ -3940,7 +3940,7 @@ const df = (e) => {
|
|
|
3940
3940
|
return t.mode === "fixed" && t.unit === "day" && typeof t.date == "string" && $I(t.date);
|
|
3941
3941
|
};
|
|
3942
3942
|
function NI(e, t) {
|
|
3943
|
-
const n =
|
|
3943
|
+
const n = Wa(e, t);
|
|
3944
3944
|
return n ? [n.start, new Date(n.endExclusive.getTime() - 1)] : [new Date(Number.NaN), new Date(Number.NaN)];
|
|
3945
3945
|
}
|
|
3946
3946
|
const AI = (e) => {
|
|
@@ -3954,7 +3954,7 @@ const AI = (e) => {
|
|
|
3954
3954
|
const t = it(e);
|
|
3955
3955
|
return t ? rr(t).monthPickerDefault : !1;
|
|
3956
3956
|
};
|
|
3957
|
-
function
|
|
3957
|
+
function Ki(e, t, n = 1) {
|
|
3958
3958
|
const r = typeof t == "string" ? { tz: t, weekStart: n } : t, o = r.tz, i = it(e);
|
|
3959
3959
|
if (i) {
|
|
3960
3960
|
const d = r.anchor, { start: f, end: m } = pl(i, {
|
|
@@ -3967,7 +3967,7 @@ function zi(e, t, n = 1) {
|
|
|
3967
3967
|
return NI(e.date, o);
|
|
3968
3968
|
if (!cf(e))
|
|
3969
3969
|
return;
|
|
3970
|
-
const a = `${e.year}-${FI(e.month + 1)}-01`, s =
|
|
3970
|
+
const a = `${e.year}-${FI(e.month + 1)}-01`, s = Wa(a, o);
|
|
3971
3971
|
if (!s) return;
|
|
3972
3972
|
const { start: l, end: c } = pl(xI, {
|
|
3973
3973
|
calendar: r,
|
|
@@ -3975,12 +3975,12 @@ function zi(e, t, n = 1) {
|
|
|
3975
3975
|
});
|
|
3976
3976
|
return [l, c];
|
|
3977
3977
|
}
|
|
3978
|
-
const uf = (e) => ({ tz: e, weekStart: 1 }), sA = (e, t) =>
|
|
3978
|
+
const uf = (e) => ({ tz: e, weekStart: 1 }), sA = (e, t) => wb(e, "day", uf(t)), OI = (e, t) => lu(e, "day", uf(t)), RI = /^\d{4}-\d{2}-\d{2}$/, lA = (e, t, n = "start") => {
|
|
3979
3979
|
if (e == null || e === "") return;
|
|
3980
3980
|
if (e instanceof Date)
|
|
3981
3981
|
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
3982
3982
|
if (typeof e == "string" && RI.test(e)) {
|
|
3983
|
-
const o =
|
|
3983
|
+
const o = Wa(e, PI(t));
|
|
3984
3984
|
return o ? n === "end" ? new Date(o.endExclusive.getTime() - 1) : o.start : void 0;
|
|
3985
3985
|
}
|
|
3986
3986
|
if (typeof e != "string" && typeof e != "number") return;
|
|
@@ -4081,7 +4081,7 @@ function jI(e, t, n) {
|
|
|
4081
4081
|
});
|
|
4082
4082
|
}
|
|
4083
4083
|
}
|
|
4084
|
-
function
|
|
4084
|
+
function zi(e, t) {
|
|
4085
4085
|
const n = t === "kpi" ? e.calculationType : e.calculatedAs, r = t === "table" && n === void 0 ? "both" : mf[String(n)], o = H(e.formatOptions) ? e.formatOptions : void 0, i = H(e.conditionalLabels) ? e.conditionalLabels : void 0, a = H(
|
|
4086
4086
|
t === "kpi" ? e.colorConfig : e.colors
|
|
4087
4087
|
) ? t === "kpi" ? e.colorConfig : e.colors : void 0, s = {};
|
|
@@ -4197,7 +4197,7 @@ function Vl(e, t, n, r) {
|
|
|
4197
4197
|
path: `${n}.indicatorStyle`,
|
|
4198
4198
|
message: "Legacy comparison indicatorStyle is unsupported."
|
|
4199
4199
|
}), jI(e.formatOptions, `${n}.formatOptions`, r);
|
|
4200
|
-
const l =
|
|
4200
|
+
const l = zi(e, t);
|
|
4201
4201
|
ny(l, n).errors.forEach((d) => {
|
|
4202
4202
|
r.push({
|
|
4203
4203
|
severity: "error",
|
|
@@ -4208,7 +4208,7 @@ function Vl(e, t, n, r) {
|
|
|
4208
4208
|
});
|
|
4209
4209
|
}
|
|
4210
4210
|
function Ul(e) {
|
|
4211
|
-
const t = ff(e.card), n = t.kpiComparison ?
|
|
4211
|
+
const t = ff(e.card), n = t.kpiComparison ? zi(t.kpiComparison, "kpi") : void 0, r = t.tableComparison ? zi(t.tableComparison, "table") : void 0;
|
|
4212
4212
|
return { namespaces: t, kpi: n, table: r, presentation: n || r };
|
|
4213
4213
|
}
|
|
4214
4214
|
function qI(e) {
|
|
@@ -4396,25 +4396,25 @@ const UI = [
|
|
|
4396
4396
|
"combo",
|
|
4397
4397
|
"stackedBar",
|
|
4398
4398
|
"stackedLine"
|
|
4399
|
-
],
|
|
4399
|
+
], KI = new Set(
|
|
4400
4400
|
UI
|
|
4401
4401
|
);
|
|
4402
4402
|
function pf(e) {
|
|
4403
|
-
return typeof e == "string" &&
|
|
4403
|
+
return typeof e == "string" && KI.has(e);
|
|
4404
4404
|
}
|
|
4405
|
-
function
|
|
4405
|
+
function zI(e) {
|
|
4406
4406
|
return e === "detailTable" || e === "table" || e === "custom" || pf(e);
|
|
4407
4407
|
}
|
|
4408
|
-
function
|
|
4408
|
+
function Kl(e) {
|
|
4409
4409
|
return !!(e != null && e.trim());
|
|
4410
4410
|
}
|
|
4411
4411
|
function gf(e) {
|
|
4412
|
-
return
|
|
4412
|
+
return Kl(e.sql) || Kl(e.normalizedPython) ? "freeform" : e.hasExecutableConfig ? "config" : "none";
|
|
4413
4413
|
}
|
|
4414
4414
|
function Vt(e) {
|
|
4415
4415
|
return JSON.stringify(e, (t, n) => !n || typeof n != "object" || Array.isArray(n) ? n : Object.keys(n).sort().reduce((r, o) => (r[o] = n[o], r), {}));
|
|
4416
4416
|
}
|
|
4417
|
-
function
|
|
4417
|
+
function ze(e, t, n = (r) => {
|
|
4418
4418
|
var o;
|
|
4419
4419
|
return ((o = r.derivedField) == null ? void 0 : o.dataType) ?? r.dataType;
|
|
4420
4420
|
}) {
|
|
@@ -4495,8 +4495,8 @@ function Io(e, t, n = [], r, o = !1) {
|
|
|
4495
4495
|
i.push(...a.notices);
|
|
4496
4496
|
const l = ds(e.spec, s), c = new Set(s.measures.map((I) => I.id)), d = [...s.rows, ...s.columns], f = new Set(d.map((I) => I.id)), m = (I, _, D) => i.push({ kind: I, id: _, message: D }), p = [], g = n.flatMap((I) => {
|
|
4497
4497
|
if (I.target === "sql_param" || I.target === "presentation_currency") return [I];
|
|
4498
|
-
const _ =
|
|
4499
|
-
return
|
|
4498
|
+
const _ = ze(e.spec, I.target, r), D = I.matrixTargetId ?? (_.length === 1 ? _[0].id : void 0);
|
|
4499
|
+
return ze(s, I.target, r).some((k) => k.id === D) ? I.matrixTargetId ? [I] : (m("binding", I.controlId, "Pinned the control binding to its original Matrix target after a structural change."), [{ ...I, matrixTargetId: D }]) : (m(
|
|
4500
4500
|
"binding",
|
|
4501
4501
|
I.controlId,
|
|
4502
4502
|
"Removed a control binding whose original Matrix target is missing, ambiguous or no longer eligible."
|
|
@@ -4583,7 +4583,7 @@ function hf(e, t) {
|
|
|
4583
4583
|
return t ? { ...o, format: t, formatOrigin: "override" } : o;
|
|
4584
4584
|
}
|
|
4585
4585
|
const GI = ["metricColumns", "groupByColumns", "detailColumns", "pivotByColumns"];
|
|
4586
|
-
function
|
|
4586
|
+
function zl(e, t, n) {
|
|
4587
4587
|
const r = e.config;
|
|
4588
4588
|
if (!r) return e;
|
|
4589
4589
|
for (const o of GI) {
|
|
@@ -4624,9 +4624,9 @@ function JI(e, t, n) {
|
|
|
4624
4624
|
function Un(e, t, n) {
|
|
4625
4625
|
switch (t.kind) {
|
|
4626
4626
|
case "field":
|
|
4627
|
-
return
|
|
4627
|
+
return zl(e, t.fieldId, n);
|
|
4628
4628
|
case "pivot":
|
|
4629
|
-
return
|
|
4629
|
+
return zl(e, t.metricId, n);
|
|
4630
4630
|
case "result":
|
|
4631
4631
|
return HI(e, t.key, n);
|
|
4632
4632
|
case "sqlKpiValue":
|
|
@@ -4862,7 +4862,7 @@ function i0(e, t) {
|
|
|
4862
4862
|
return {
|
|
4863
4863
|
...f,
|
|
4864
4864
|
bindings: [
|
|
4865
|
-
|
|
4865
|
+
zt(
|
|
4866
4866
|
t.columnKeyMap,
|
|
4867
4867
|
f.field.id,
|
|
4868
4868
|
f.role
|
|
@@ -5547,8 +5547,8 @@ function I0(e, t) {
|
|
|
5547
5547
|
const x = s.ofDependency(w), $ = s.catalogLabel(x) || w.label || s.label(x);
|
|
5548
5548
|
if (m.has(x))
|
|
5549
5549
|
return { dependency: { entityName: x, label: $, state: "base" } };
|
|
5550
|
-
const
|
|
5551
|
-
if (o &&
|
|
5550
|
+
const z = gs(x, p, i);
|
|
5551
|
+
if (o && z.state === "unreachable") {
|
|
5552
5552
|
const v = `${$} is not one of the selected datasets.`;
|
|
5553
5553
|
return {
|
|
5554
5554
|
dependency: { entityName: x, label: $, state: "absent", reason: v },
|
|
@@ -5560,8 +5560,8 @@ function I0(e, t) {
|
|
|
5560
5560
|
};
|
|
5561
5561
|
}
|
|
5562
5562
|
return {
|
|
5563
|
-
dependency: { entityName: x, label: $, state:
|
|
5564
|
-
evaluated:
|
|
5563
|
+
dependency: { entityName: x, label: $, state: z.state, reason: z.reason },
|
|
5564
|
+
evaluated: z
|
|
5565
5565
|
};
|
|
5566
5566
|
}), h = g.reduce(
|
|
5567
5567
|
(w, x) => Jl[x.dependency.state] > Jl[w.dependency.state] ? x : w
|
|
@@ -5770,7 +5770,7 @@ function kA(e, t, n) {
|
|
|
5770
5770
|
function TA(e) {
|
|
5771
5771
|
return new Set(e.map(Ut));
|
|
5772
5772
|
}
|
|
5773
|
-
function
|
|
5773
|
+
function Kt(e, t) {
|
|
5774
5774
|
const n = (r) => {
|
|
5775
5775
|
var s, l, c;
|
|
5776
5776
|
if (r.source) return r.source;
|
|
@@ -5907,7 +5907,7 @@ function Df(e, t, n) {
|
|
|
5907
5907
|
id: s,
|
|
5908
5908
|
kind: "aggregate",
|
|
5909
5909
|
field: i,
|
|
5910
|
-
aggregate:
|
|
5910
|
+
aggregate: Kd.parse(
|
|
5911
5911
|
(a == null ? void 0 : a.aggregate) ?? ((k = i.derivedField) == null ? void 0 : k.defaultAggregate) ?? (i.dataType === "number" ? "SUM" : "COUNT")
|
|
5912
5912
|
)
|
|
5913
5913
|
};
|
|
@@ -5942,7 +5942,7 @@ function EA(e, t, n, r) {
|
|
|
5942
5942
|
var g, h;
|
|
5943
5943
|
const o = (g = e.config) == null ? void 0 : g.matrix;
|
|
5944
5944
|
if (e.type !== "matrixTable" || !o || !n) return { card: e, notices: [] };
|
|
5945
|
-
const i =
|
|
5945
|
+
const i = Kt(e, t), a = Kt(e, [n])[0];
|
|
5946
5946
|
if (!(a != null && a.field.derivedField))
|
|
5947
5947
|
throw new Error(
|
|
5948
5948
|
"The selected calculation cannot be resolved. Repair its definition before editing."
|
|
@@ -5967,7 +5967,7 @@ function EA(e, t, n, r) {
|
|
|
5967
5967
|
throw new Error(
|
|
5968
5968
|
"This calculation has an ambiguous scoped definition. Give it a unique name before selecting it."
|
|
5969
5969
|
);
|
|
5970
|
-
const f = r ? (h =
|
|
5970
|
+
const f = r ? (h = Kt(e, [r])[0]) == null ? void 0 : h.field : void 0;
|
|
5971
5971
|
if (r && !(f != null && f.derivedField))
|
|
5972
5972
|
throw new Error("The updated calculation has invalid input metadata.");
|
|
5973
5973
|
const m = (y) => o.spec[y].flatMap((b) => {
|
|
@@ -6003,7 +6003,7 @@ function EA(e, t, n, r) {
|
|
|
6003
6003
|
columns: m("columns"),
|
|
6004
6004
|
measures: p
|
|
6005
6005
|
},
|
|
6006
|
-
r ?
|
|
6006
|
+
r ? Kt(e, [...t, r]) : i
|
|
6007
6007
|
);
|
|
6008
6008
|
}
|
|
6009
6009
|
function x0(e) {
|
|
@@ -6038,13 +6038,13 @@ function A0(e, t, n = [], r = () => crypto.randomUUID()) {
|
|
|
6038
6038
|
if (!xf(e, t)) return { card: {}, gaps: [] };
|
|
6039
6039
|
const o = [], i = He(
|
|
6040
6040
|
e,
|
|
6041
|
-
e.type === "matrixTable" ?
|
|
6041
|
+
e.type === "matrixTable" ? Kt(e, n) : []
|
|
6042
6042
|
);
|
|
6043
6043
|
t === "matrixTable" && ((s = e.controlBindings) != null && s.length && o.push({ code: "control_binding", label: "Control bindings" }), !i.configured && ((l = e.sql) != null && l.trim()) && o.push({ code: "no_shelf_fields", label: "SQL query" }));
|
|
6044
6044
|
let a = { ...e, type: t, config: {}, controlBindings: [], sql: "", python: "" };
|
|
6045
6045
|
if (a = { ...a, config: O0(a, i.joinPlan, n, o) }, t === "matrixTable") {
|
|
6046
|
-
const m =
|
|
6047
|
-
a = ec(m.card, i.filters && Mf(i.filters), o, r), a =
|
|
6046
|
+
const m = K0(a, e.type, i.fields, o, r);
|
|
6047
|
+
a = ec(m.card, i.filters && Mf(i.filters), o, r), a = z0(a, e, m.carried, m.catalog);
|
|
6048
6048
|
} else
|
|
6049
6049
|
e.type === "matrixTable" && ((f = (d = (c = e.config) == null ? void 0 : c.matrix) == null ? void 0 : d.spec.measureFilters) != null && f.length) && o.push({ code: "filter_not_accepted", label: "Measure filters" }), a = ec(W0(a, i.fields, o), i.filters, o);
|
|
6050
6050
|
return { card: { config: a.config, controlBindings: a.controlBindings ?? [], sql: "", python: "" }, gaps: o };
|
|
@@ -6119,7 +6119,7 @@ function j0(e, t) {
|
|
|
6119
6119
|
if ((e.fieldScope === "sheet" || e.fieldScope === "dashboard") && !n) return "calculated_field_dashboard_scope";
|
|
6120
6120
|
if (X(e.parameters) || X(e.isPreAggregated) || X(e.comparison)) return "metric_parameters";
|
|
6121
6121
|
if ($f(e)) return "source_field_renamed";
|
|
6122
|
-
const r =
|
|
6122
|
+
const r = zd(e);
|
|
6123
6123
|
if (t === "metrics" && r.representation !== "physical" && r.computeStage !== "aggregate" && !Nf(e) && !n)
|
|
6124
6124
|
return r.computeStage === "row" || X(e.aggregate) ? "calculated_metric_per_row" : "calculated_metric_without_stage";
|
|
6125
6125
|
if (X(e.expression) && !X(e.calculatedFormula) && !X(e.derivedField))
|
|
@@ -6139,7 +6139,7 @@ function Af(e) {
|
|
|
6139
6139
|
var i;
|
|
6140
6140
|
const t = e.calculatedFormula;
|
|
6141
6141
|
if (X(e.aggregate) || !X(e.expression) || X(e.derivedField) || !((i = t == null ? void 0 : t.inputFields) != null && i.length) || X(t.computeStage)) return !1;
|
|
6142
|
-
const { representation: n } =
|
|
6142
|
+
const { representation: n } = zd(e);
|
|
6143
6143
|
if (n !== "manual" && n !== "inline-expression") return !1;
|
|
6144
6144
|
const r = Zh(e.expression);
|
|
6145
6145
|
return !r.calls.length || r.tokensOutsideAggregates.length || r.nestedAggregate || r.windowed ? !1 : r.calls.flatMap((a) => a.tokens).every((a) => /^field_\d+$/.test(a) && Number(a.slice(6)) < t.inputFields.length) && t.inputFields.every((a) => !X(a.expression) && !X(a.calculatedFormula) && !X(a.derivedField));
|
|
@@ -6192,12 +6192,12 @@ function ys(e) {
|
|
|
6192
6192
|
} : {}
|
|
6193
6193
|
};
|
|
6194
6194
|
}
|
|
6195
|
-
function
|
|
6195
|
+
function K0(e, t, n, r, o) {
|
|
6196
6196
|
var f;
|
|
6197
6197
|
const i = [["groupBy", n.rows], ["pivotBy", n.columns], ["metrics", n.metrics]].flatMap(([m, p]) => p.flatMap((g) => {
|
|
6198
6198
|
const h = j0(g, m);
|
|
6199
6199
|
return h ? (r.push({ code: h, label: Dr(g) }), []) : [{ to: m, field: { ...ys(m === "metrics" ? L0(q0(g)) : g), id: o() }, sourceId: g.id }];
|
|
6200
|
-
})), a =
|
|
6200
|
+
})), a = Kt(e, i.map(({ field: m }) => m));
|
|
6201
6201
|
let s = e;
|
|
6202
6202
|
for (const { to: m, field: p } of i)
|
|
6203
6203
|
try {
|
|
@@ -6222,7 +6222,7 @@ function z0(e, t, n, r, o) {
|
|
|
6222
6222
|
return { card: s, carried: i, catalog: a };
|
|
6223
6223
|
}
|
|
6224
6224
|
}
|
|
6225
|
-
function
|
|
6225
|
+
function z0(e, t, n, r) {
|
|
6226
6226
|
var l, c;
|
|
6227
6227
|
const o = (l = e.config) == null ? void 0 : l.matrix;
|
|
6228
6228
|
if (!o) return e;
|
|
@@ -6519,7 +6519,7 @@ function nw(e) {
|
|
|
6519
6519
|
on({
|
|
6520
6520
|
authored: t,
|
|
6521
6521
|
metadata: { kind: "raw_temporal", valueKind: n },
|
|
6522
|
-
preferences:
|
|
6522
|
+
preferences: Ke,
|
|
6523
6523
|
calendar: { tz: "UTC" }
|
|
6524
6524
|
}).formatValue,
|
|
6525
6525
|
n
|
|
@@ -6614,7 +6614,7 @@ function sw(e) {
|
|
|
6614
6614
|
for (const d of i) {
|
|
6615
6615
|
const f = Array.from(a).flatMap(
|
|
6616
6616
|
([D, C]) => {
|
|
6617
|
-
const k =
|
|
6617
|
+
const k = zt(
|
|
6618
6618
|
r,
|
|
6619
6619
|
D,
|
|
6620
6620
|
"detail"
|
|
@@ -6720,7 +6720,7 @@ function lw(e) {
|
|
|
6720
6720
|
e
|
|
6721
6721
|
);
|
|
6722
6722
|
}
|
|
6723
|
-
function
|
|
6723
|
+
function KA(e) {
|
|
6724
6724
|
var r;
|
|
6725
6725
|
const t = e.effectiveCardConfig ?? e.card.config, n = Co(
|
|
6726
6726
|
e.card,
|
|
@@ -6884,7 +6884,7 @@ function cw(e) {
|
|
|
6884
6884
|
);
|
|
6885
6885
|
}
|
|
6886
6886
|
}
|
|
6887
|
-
function
|
|
6887
|
+
function zA(e) {
|
|
6888
6888
|
if (e.value !== null && typeof e.value != "string")
|
|
6889
6889
|
return {
|
|
6890
6890
|
value: e.value,
|
|
@@ -6911,7 +6911,7 @@ function YA(e) {
|
|
|
6911
6911
|
records: t.records,
|
|
6912
6912
|
columns: t.columns,
|
|
6913
6913
|
columnKeyMap: t.columnKeyMap,
|
|
6914
|
-
preferences:
|
|
6914
|
+
preferences: Ke,
|
|
6915
6915
|
calendar: { tz: "UTC" }
|
|
6916
6916
|
});
|
|
6917
6917
|
return n.kind === "inactive" || n.kind === "loaded_empty" || n.kind === "loaded_valid";
|
|
@@ -7018,7 +7018,7 @@ const Is = {
|
|
|
7018
7018
|
quarter: "2026-07-01",
|
|
7019
7019
|
year: "2026-01-01"
|
|
7020
7020
|
};
|
|
7021
|
-
function uw(e, t, n =
|
|
7021
|
+
function uw(e, t, n = Ke) {
|
|
7022
7022
|
return Na({
|
|
7023
7023
|
value: dw[t],
|
|
7024
7024
|
metadata: {
|
|
@@ -7052,7 +7052,7 @@ function uw(e, t, n = ze) {
|
|
|
7052
7052
|
}
|
|
7053
7053
|
});
|
|
7054
7054
|
}
|
|
7055
|
-
function WA(e, t, n =
|
|
7055
|
+
function WA(e, t, n = Ke) {
|
|
7056
7056
|
const r = Is[e], o = (t == null ? void 0 : t.presentation.mode) === "preset" ? t.presentation.preset : void 0, i = o && t && rt(t, e).ok && !r.some(
|
|
7057
7057
|
(s) => {
|
|
7058
7058
|
var l;
|
|
@@ -7205,9 +7205,9 @@ function cn(e) {
|
|
|
7205
7205
|
function QA(e) {
|
|
7206
7206
|
return {
|
|
7207
7207
|
preferences: e.preferences ?? {
|
|
7208
|
-
locale:
|
|
7209
|
-
dateStyle:
|
|
7210
|
-
dateTime: { ...
|
|
7208
|
+
locale: Ke.locale,
|
|
7209
|
+
dateStyle: Ke.dateStyle,
|
|
7210
|
+
dateTime: { ...Ke.dateTime }
|
|
7211
7211
|
},
|
|
7212
7212
|
calendar: e.calendar ?? {
|
|
7213
7213
|
tz: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
@@ -7530,7 +7530,7 @@ function ZA(e) {
|
|
|
7530
7530
|
function Dn(e) {
|
|
7531
7531
|
return e.id || e.name;
|
|
7532
7532
|
}
|
|
7533
|
-
function
|
|
7533
|
+
function Kn(e) {
|
|
7534
7534
|
if (typeof e == "number")
|
|
7535
7535
|
return Number.isFinite(e) ? e : null;
|
|
7536
7536
|
if (typeof e == "string") {
|
|
@@ -7548,18 +7548,18 @@ function Uw(e) {
|
|
|
7548
7548
|
}
|
|
7549
7549
|
function Xi(e, t, n) {
|
|
7550
7550
|
const r = e == null ? void 0 : e.find((o) => o.segment === t && o.metricId === n);
|
|
7551
|
-
return r ?
|
|
7551
|
+
return r ? Kn(r.value) : null;
|
|
7552
7552
|
}
|
|
7553
7553
|
function eM(e, t) {
|
|
7554
7554
|
const n = Dn(t), r = e == null ? void 0 : e.find((o) => o.segment === "current" && o.metricId === n);
|
|
7555
|
-
return r ? { metricId: n, value:
|
|
7555
|
+
return r ? { metricId: n, value: Kn(r.value) } : void 0;
|
|
7556
7556
|
}
|
|
7557
|
-
function
|
|
7557
|
+
function Kw(e) {
|
|
7558
7558
|
const [t, n] = jw(e);
|
|
7559
7559
|
return { ...t !== void 0 ? { value: t } : {}, ...n !== void 0 ? { previous: n } : {} };
|
|
7560
7560
|
}
|
|
7561
|
-
function
|
|
7562
|
-
const n =
|
|
7561
|
+
function zw(e, t) {
|
|
7562
|
+
const n = Kw(t), { value: r, previous: o } = n, i = (t == null ? void 0 : t[0]) ?? {}, a = r !== void 0 ? Kn(i[r]) : null, s = o !== void 0 ? Kn(i[o]) : null;
|
|
7563
7563
|
return {
|
|
7564
7564
|
shape: e,
|
|
7565
7565
|
layout: "value",
|
|
@@ -7585,7 +7585,7 @@ function Yw(e, t, n, r, o) {
|
|
|
7585
7585
|
var c;
|
|
7586
7586
|
const i = Uy(o, e.measure).comparisonKind;
|
|
7587
7587
|
if (i === "none") return;
|
|
7588
|
-
const a =
|
|
7588
|
+
const a = Ky(e.measure), s = i === "target" ? typeof a == "number" && Number.isFinite(a) ? a : null : Xi(n, "comparison", Dn(e.measure));
|
|
7589
7589
|
if (s === null) return;
|
|
7590
7590
|
const l = (c = t.preferences) == null ? void 0 : c.comparisonPresentation;
|
|
7591
7591
|
return {
|
|
@@ -7603,7 +7603,7 @@ function tM(e) {
|
|
|
7603
7603
|
var m, p;
|
|
7604
7604
|
const { renderCard: t, records: n, metadata: r, missingValue: o } = e, i = sr(t);
|
|
7605
7605
|
if ((i == null ? void 0 : i.source) === "sql") {
|
|
7606
|
-
const g =
|
|
7606
|
+
const g = zw(i, n);
|
|
7607
7607
|
return g.value === null && o !== void 0 ? { ...g, value: o } : g;
|
|
7608
7608
|
}
|
|
7609
7609
|
const a = (r == null ? void 0 : r.kpiLayout) ?? Lw({ config: t.config });
|
|
@@ -7642,7 +7642,7 @@ function tM(e) {
|
|
|
7642
7642
|
function Ww(e, t, n) {
|
|
7643
7643
|
if (!n) return;
|
|
7644
7644
|
const r = (e ?? []).flatMap(
|
|
7645
|
-
(o) => o.segment === "trend" && o.metricId === t && typeof o.bucket == "string" ? [{ bucket: o.bucket, value:
|
|
7645
|
+
(o) => o.segment === "trend" && o.metricId === t && typeof o.bucket == "string" ? [{ bucket: o.bucket, value: Kn(o.value), partial: o.partial === !0 }] : []
|
|
7646
7646
|
);
|
|
7647
7647
|
return r.length ? { metadata: n, points: r.sort((o, i) => o.bucket.localeCompare(i.bucket)) } : void 0;
|
|
7648
7648
|
}
|
|
@@ -7714,7 +7714,7 @@ function rM(e) {
|
|
|
7714
7714
|
];
|
|
7715
7715
|
});
|
|
7716
7716
|
}
|
|
7717
|
-
function
|
|
7717
|
+
function Kr(e, t) {
|
|
7718
7718
|
const n = (i) => {
|
|
7719
7719
|
if (nt(i)) return i.value;
|
|
7720
7720
|
const a = typeof i == "string" ? jh(i.trim()) ?? et(i) : et(i);
|
|
@@ -7805,7 +7805,7 @@ function Jw(e) {
|
|
|
7805
7805
|
}
|
|
7806
7806
|
}
|
|
7807
7807
|
function Xw(e) {
|
|
7808
|
-
return e ?
|
|
7808
|
+
return e ? zf({
|
|
7809
7809
|
fontWeight: Jw(e.fontWeight),
|
|
7810
7810
|
fontStyle: e.italic ? "italic" : void 0,
|
|
7811
7811
|
color: e.textColor,
|
|
@@ -7813,20 +7813,20 @@ function Xw(e) {
|
|
|
7813
7813
|
textDecoration: e.textDecoration
|
|
7814
7814
|
}) : {};
|
|
7815
7815
|
}
|
|
7816
|
-
function
|
|
7816
|
+
function Kf(...e) {
|
|
7817
7817
|
return Object.assign(
|
|
7818
7818
|
{},
|
|
7819
|
-
...e.filter((t) => !!t).map(
|
|
7819
|
+
...e.filter((t) => !!t).map(zf)
|
|
7820
7820
|
);
|
|
7821
7821
|
}
|
|
7822
|
-
function
|
|
7822
|
+
function zf(e) {
|
|
7823
7823
|
return Object.fromEntries(
|
|
7824
7824
|
Object.entries(e).filter(([, t]) => t !== void 0)
|
|
7825
7825
|
);
|
|
7826
7826
|
}
|
|
7827
7827
|
function Zw(e, t, n) {
|
|
7828
7828
|
if (nt(e) || nt(n)) {
|
|
7829
|
-
const s =
|
|
7829
|
+
const s = Kr(e, n);
|
|
7830
7830
|
if (s === null) return t === "neq";
|
|
7831
7831
|
switch (t) {
|
|
7832
7832
|
case "eq":
|
|
@@ -7867,7 +7867,7 @@ function e_(e, t, n, r) {
|
|
|
7867
7867
|
return Zw(o, e.operator, e.value);
|
|
7868
7868
|
case "between": {
|
|
7869
7869
|
if ([o, e.min, e.max].some(nt)) {
|
|
7870
|
-
const c =
|
|
7870
|
+
const c = Kr(o, e.min), d = Kr(o, e.max);
|
|
7871
7871
|
return c === null || d === null ? !1 : e.inclusive === !1 ? c > 0 && d < 0 : c >= 0 && d <= 0;
|
|
7872
7872
|
}
|
|
7873
7873
|
const a = et(o), s = et(e.min), l = et(e.max);
|
|
@@ -7906,7 +7906,7 @@ function r_(e, t, n) {
|
|
|
7906
7906
|
);
|
|
7907
7907
|
if (!s)
|
|
7908
7908
|
return {};
|
|
7909
|
-
const l = i.mid, c = l !== void 0 && nt(a) ?
|
|
7909
|
+
const l = i.mid, c = l !== void 0 && nt(a) ? Kr(a, l) : l === void 0 ? null : Math.sign(et(a) - l);
|
|
7910
7910
|
return { cellStyle: { backgroundColor: l !== void 0 && e.condition.colors.mid ? c < 0 ? e.condition.colors.min : c === 0 ? e.condition.colors.mid : e.condition.colors.max : s.midpointComparison < 0 ? e.condition.colors.min : e.condition.colors.max } };
|
|
7911
7911
|
}
|
|
7912
7912
|
if (e.condition.kind === "dataBar") {
|
|
@@ -7927,7 +7927,7 @@ function r_(e, t, n) {
|
|
|
7927
7927
|
} : {};
|
|
7928
7928
|
}
|
|
7929
7929
|
return {
|
|
7930
|
-
cellStyle:
|
|
7930
|
+
cellStyle: Kf(
|
|
7931
7931
|
Xw(e.style),
|
|
7932
7932
|
(r = e.style) != null && r.textColor ? { color: e.style.textColor } : void 0
|
|
7933
7933
|
),
|
|
@@ -7945,7 +7945,7 @@ function o_(e) {
|
|
|
7945
7945
|
if (n.target.matrix !== void 0 || n.enabled === !1 || !t_(n, e.tablePart) || !n_(n, e.columnKey) || !e_(n.condition, e.row, e.range, n.id))
|
|
7946
7946
|
continue;
|
|
7947
7947
|
const r = r_(n, e.row, e.range), o = n.target.level === "row" ? "rowStyle" : "cellStyle";
|
|
7948
|
-
t[o] =
|
|
7948
|
+
t[o] = Kf(
|
|
7949
7949
|
t[o],
|
|
7950
7950
|
r.cellStyle
|
|
7951
7951
|
), r.overlay && (t.overlay = r.overlay), t.matchedRuleIds.push(n.id);
|
|
@@ -8115,7 +8115,7 @@ function cM(e) {
|
|
|
8115
8115
|
addIssue: (h) => f("target.matrix.oppositePath", h.message ?? "Invalid path."),
|
|
8116
8116
|
path: []
|
|
8117
8117
|
};
|
|
8118
|
-
|
|
8118
|
+
Kh(i, p.axis === "rows" ? "columns" : "rows", p.oppositePath, g, []);
|
|
8119
8119
|
}
|
|
8120
8120
|
}
|
|
8121
8121
|
}
|
|
@@ -8221,7 +8221,7 @@ function m_(e, t, n, r, o) {
|
|
|
8221
8221
|
raw: n.items.map((s) => String(s.value)).join(",")
|
|
8222
8222
|
};
|
|
8223
8223
|
case "answered": {
|
|
8224
|
-
if (
|
|
8224
|
+
if (zy(t) && ja(e.variable)) {
|
|
8225
8225
|
if (n.comparisonUnavailable)
|
|
8226
8226
|
return { status: "none", entry: e, why: "noWindow", detail: n.comparisonUnavailable };
|
|
8227
8227
|
if (((a = n.parts[t]) == null ? void 0 : a.value) == null) return { status: "none", entry: e, why: "noRows" };
|
|
@@ -8808,14 +8808,14 @@ function U_(e, t) {
|
|
|
8808
8808
|
const { valueFormat: n, ...r } = t ?? {};
|
|
8809
8809
|
return { ...r, ...e };
|
|
8810
8810
|
}
|
|
8811
|
-
function
|
|
8811
|
+
function K_(e) {
|
|
8812
8812
|
var n, r;
|
|
8813
8813
|
const t = (r = (n = e == null ? void 0 : e.chartOptions) == null ? void 0 : n.plugins) == null ? void 0 : r.datalabels;
|
|
8814
8814
|
return (t == null ? void 0 : t.display) !== !1 && !!(t != null && t.anchor || t != null && t.align);
|
|
8815
8815
|
}
|
|
8816
8816
|
function im(e, t) {
|
|
8817
8817
|
var n;
|
|
8818
|
-
return ((n = am(e, t)) == null ? void 0 : n.enabled) ??
|
|
8818
|
+
return ((n = am(e, t)) == null ? void 0 : n.enabled) ?? K_(t);
|
|
8819
8819
|
}
|
|
8820
8820
|
function am(e, t) {
|
|
8821
8821
|
var n, r, o, i;
|
|
@@ -8864,7 +8864,7 @@ function sm(e) {
|
|
|
8864
8864
|
...t ? { yAxisConfig: t } : {}
|
|
8865
8865
|
};
|
|
8866
8866
|
}
|
|
8867
|
-
const
|
|
8867
|
+
const zr = (e) => {
|
|
8868
8868
|
var t;
|
|
8869
8869
|
return (t = bt(e)) == null ? void 0 : t.properties.orientation;
|
|
8870
8870
|
};
|
|
@@ -8873,9 +8873,9 @@ function bM(e, t) {
|
|
|
8873
8873
|
const n = e.preferences, r = (c) => ({
|
|
8874
8874
|
...c,
|
|
8875
8875
|
chartOptions: { ...c == null ? void 0 : c.chartOptions, indexAxis: t }
|
|
8876
|
-
}), o = { ...e, preferences: r(n) }, i =
|
|
8876
|
+
}), o = { ...e, preferences: r(n) }, i = zr(e);
|
|
8877
8877
|
if (i)
|
|
8878
|
-
return i ===
|
|
8878
|
+
return i === zr(o) ? o : { ...e, preferences: r(sm(n)) };
|
|
8879
8879
|
if (((s = n == null ? void 0 : n.chartOptions) == null ? void 0 : s.indexAxis) === t) return o;
|
|
8880
8880
|
const a = (l = n == null ? void 0 : n.chartOptions) == null ? void 0 : l.scales;
|
|
8881
8881
|
return {
|
|
@@ -8892,10 +8892,10 @@ function Eo(e, t) {
|
|
|
8892
8892
|
...e,
|
|
8893
8893
|
type: t.type,
|
|
8894
8894
|
...r ? { preferences: { ...e.preferences, chartOptions: { ...(c = e.preferences) == null ? void 0 : c.chartOptions, indexAxis: r } } } : {}
|
|
8895
|
-
}, i =
|
|
8895
|
+
}, i = zr(e), a = zr(o);
|
|
8896
8896
|
return i && a && i !== a ? { ...o, preferences: sm(o.preferences) } : o;
|
|
8897
8897
|
}
|
|
8898
|
-
function
|
|
8898
|
+
function z_(e, t) {
|
|
8899
8899
|
const { kpiBand: n, ...r } = e.config ?? {};
|
|
8900
8900
|
return { ...e, config: t ? { ...r, kpiBand: t } : r };
|
|
8901
8901
|
}
|
|
@@ -9022,7 +9022,7 @@ function tC(e) {
|
|
|
9022
9022
|
)
|
|
9023
9023
|
);
|
|
9024
9024
|
}
|
|
9025
|
-
const
|
|
9025
|
+
const zn = (e) => ({ gaps: e, leftOut: e.map((t) => t.label) });
|
|
9026
9026
|
function li(e, t, n = {}) {
|
|
9027
9027
|
var l;
|
|
9028
9028
|
if (e.type === t && !n.customVisual) return { status: "unchanged" };
|
|
@@ -9031,7 +9031,7 @@ function li(e, t, n = {}) {
|
|
|
9031
9031
|
return {
|
|
9032
9032
|
status: "changed",
|
|
9033
9033
|
card: Eo(e, q_(o.type, o.properties)),
|
|
9034
|
-
...
|
|
9034
|
+
...zn([]),
|
|
9035
9035
|
droppedPreferences: [],
|
|
9036
9036
|
crossedMatrixBoundary: !1,
|
|
9037
9037
|
forcesSqlMode: !1
|
|
@@ -9051,7 +9051,7 @@ function li(e, t, n = {}) {
|
|
|
9051
9051
|
return s = rC(s), {
|
|
9052
9052
|
status: "changed",
|
|
9053
9053
|
card: s,
|
|
9054
|
-
...
|
|
9054
|
+
...zn(i.gaps),
|
|
9055
9055
|
droppedPreferences: eC(e.preferences),
|
|
9056
9056
|
crossedMatrixBoundary: "config" in i.card,
|
|
9057
9057
|
forcesSqlMode: a
|
|
@@ -9068,14 +9068,14 @@ function nC(e, t, n = {}) {
|
|
|
9068
9068
|
return o.status !== "changed" ? r : {
|
|
9069
9069
|
...r,
|
|
9070
9070
|
card: o.card,
|
|
9071
|
-
...
|
|
9071
|
+
...zn([...r.gaps, ...o.gaps])
|
|
9072
9072
|
};
|
|
9073
9073
|
}
|
|
9074
9074
|
if (e.type === "detailTable") {
|
|
9075
9075
|
const r = ci(e, "table");
|
|
9076
9076
|
if (r.status !== "changed") return r;
|
|
9077
9077
|
const o = li(r.card, t, n);
|
|
9078
|
-
return o.status !== "changed" ? o : { ...o, ...
|
|
9078
|
+
return o.status !== "changed" ? o : { ...o, ...zn([...r.gaps, ...o.gaps]) };
|
|
9079
9079
|
}
|
|
9080
9080
|
return li(e, t, n);
|
|
9081
9081
|
}
|
|
@@ -9088,7 +9088,7 @@ function ci(e, t) {
|
|
|
9088
9088
|
return {
|
|
9089
9089
|
status: "changed",
|
|
9090
9090
|
card: { ...e, type: t, config: O_(e.type, t, n) },
|
|
9091
|
-
...
|
|
9091
|
+
...zn(r),
|
|
9092
9092
|
droppedPreferences: [],
|
|
9093
9093
|
crossedMatrixBoundary: !1,
|
|
9094
9094
|
forcesSqlMode: !1
|
|
@@ -9144,7 +9144,7 @@ function dC(e) {
|
|
|
9144
9144
|
function uC(e) {
|
|
9145
9145
|
if (e.inventory.kind !== "sql" || e.target.kind !== "field")
|
|
9146
9146
|
return { status: "ineligible" };
|
|
9147
|
-
const t =
|
|
9147
|
+
const t = zu(
|
|
9148
9148
|
e.inventory,
|
|
9149
9149
|
e.target.field.source
|
|
9150
9150
|
), n = dC(e.target);
|
|
@@ -9484,9 +9484,9 @@ function xM(e, t) {
|
|
|
9484
9484
|
}
|
|
9485
9485
|
function FM(e, t, n) {
|
|
9486
9486
|
var a, s, l, c;
|
|
9487
|
-
const r = t ?
|
|
9487
|
+
const r = t ? ze(t, "config_metric_selector").flatMap(
|
|
9488
9488
|
(d) => d.kind === "measure" ? [`${d.id} (${d.measure.field.name}, ${d.measure.aggregate})`] : []
|
|
9489
|
-
) : ((s = (a = e.config) == null ? void 0 : a.metricColumns) == null ? void 0 : s.map((d) => `${d.id} (${d.label})`)) || [], o = t ?
|
|
9489
|
+
) : ((s = (a = e.config) == null ? void 0 : a.metricColumns) == null ? void 0 : s.map((d) => `${d.id} (${d.label})`)) || [], o = t ? ze(t, "config_field_selector").flatMap(
|
|
9490
9490
|
(d) => d.kind === "level" ? [`${d.id} (${d.axis}: ${d.level.field.name})`] : []
|
|
9491
9491
|
) : ((c = (l = e.config) == null ? void 0 : l.groupByColumns) == null ? void 0 : c.map((d) => `${d.id} (${d.label})`)) || [], i = gm(e, t, n).some(
|
|
9492
9492
|
(d) => d.value === "config_grain"
|
|
@@ -9494,7 +9494,7 @@ function FM(e, t, n) {
|
|
|
9494
9494
|
return {
|
|
9495
9495
|
config_metric_selector: r,
|
|
9496
9496
|
config_field_selector: o,
|
|
9497
|
-
config_aggregation: t ?
|
|
9497
|
+
config_aggregation: t ? Kd.options : fm,
|
|
9498
9498
|
config_grain: i ? mm : []
|
|
9499
9499
|
};
|
|
9500
9500
|
}
|
|
@@ -9519,7 +9519,7 @@ function EM(e) {
|
|
|
9519
9519
|
function gm(e, t, n) {
|
|
9520
9520
|
var o, i, a;
|
|
9521
9521
|
const r = [];
|
|
9522
|
-
return (t ?
|
|
9522
|
+
return (t ? ze(t, "config_metric_selector").length > 0 : (((o = e.config) == null ? void 0 : o.metricColumns) || []).length > 0) && (r.push({ value: "config_metric_selector", label: "Metric Selector" }), r.push({ value: "config_aggregation", label: "Aggregation" })), (t ? ze(t, "config_field_selector").length > 0 : (((i = e.config) == null ? void 0 : i.groupByColumns) || []).length > 0) && r.push({ value: "config_field_selector", label: "Group By Selector" }), (t ? ze(t, "config_grain", n).length > 0 : (((a = e.config) == null ? void 0 : a.groupByColumns) || []).some(
|
|
9523
9523
|
(s) => ["date", "datetime"].includes((s.dataType || "").toLowerCase())
|
|
9524
9524
|
)) && r.push({ value: "config_grain", label: "Time Grain" }), r;
|
|
9525
9525
|
}
|
|
@@ -9596,7 +9596,7 @@ function NM(e, t = "SUM", n = !1) {
|
|
|
9596
9596
|
function AM(e) {
|
|
9597
9597
|
var n, r;
|
|
9598
9598
|
const t = (n = e == null ? void 0 : e.config) == null ? void 0 : n.matrix;
|
|
9599
|
-
return t ?
|
|
9599
|
+
return t ? ze(t.spec, "config_field_selector").map((o) => ({
|
|
9600
9600
|
value: o.id,
|
|
9601
9601
|
label: o.kind === "level" ? `${o.axis === "rows" ? "Rows" : "Columns"}: ${ao(o.level, t.presentation)}` : o.id
|
|
9602
9602
|
})) : lr(
|
|
@@ -9611,7 +9611,7 @@ function AM(e) {
|
|
|
9611
9611
|
function MM(e) {
|
|
9612
9612
|
var n, r;
|
|
9613
9613
|
const t = (n = e == null ? void 0 : e.config) == null ? void 0 : n.matrix;
|
|
9614
|
-
return t ?
|
|
9614
|
+
return t ? ze(t.spec, "config_metric_selector").map((o) => ({
|
|
9615
9615
|
value: o.id,
|
|
9616
9616
|
label: o.kind === "measure" ? `${so(o.measure, t.presentation)} (${o.measure.aggregate})` : o.id
|
|
9617
9617
|
})) : lr(
|
|
@@ -9639,7 +9639,7 @@ function DC(e) {
|
|
|
9639
9639
|
);
|
|
9640
9640
|
}
|
|
9641
9641
|
function $s(e, t) {
|
|
9642
|
-
return e.matrixSpec && Ns(t) ?
|
|
9642
|
+
return e.matrixSpec && Ns(t) ? ze(e.matrixSpec, t === "field_selector" ? "config_field_selector" : "config_metric_selector").map((n) => {
|
|
9643
9643
|
var r, o, i;
|
|
9644
9644
|
return {
|
|
9645
9645
|
...n,
|
|
@@ -9840,7 +9840,7 @@ function UM(e, t) {
|
|
|
9840
9840
|
if (n !== -1)
|
|
9841
9841
|
return NC(n);
|
|
9842
9842
|
}
|
|
9843
|
-
function
|
|
9843
|
+
function KM(e, t) {
|
|
9844
9844
|
if (!t.startsWith(na))
|
|
9845
9845
|
return;
|
|
9846
9846
|
const n = Number(t.slice(na.length));
|
|
@@ -9901,7 +9901,7 @@ const $n = [
|
|
|
9901
9901
|
label: "Displayed metric",
|
|
9902
9902
|
description: "Switch which metric the card shows."
|
|
9903
9903
|
}
|
|
9904
|
-
],
|
|
9904
|
+
], zM = {
|
|
9905
9905
|
enum: "Dropdown",
|
|
9906
9906
|
multi_enum: "Multi-select",
|
|
9907
9907
|
boolean: "Toggle",
|
|
@@ -10189,7 +10189,7 @@ function sO(e) {
|
|
|
10189
10189
|
return t;
|
|
10190
10190
|
}
|
|
10191
10191
|
function cr(e) {
|
|
10192
|
-
return e.kind === "filter" &&
|
|
10192
|
+
return e.kind === "filter" && sb(e);
|
|
10193
10193
|
}
|
|
10194
10194
|
function ye(e) {
|
|
10195
10195
|
return typeof e == "string" ? e.trim() : "";
|
|
@@ -10199,7 +10199,7 @@ function qC(e) {
|
|
|
10199
10199
|
return t.length > 1 ? t.slice(0, -1).join(".") : "";
|
|
10200
10200
|
}
|
|
10201
10201
|
function Sm(e, t) {
|
|
10202
|
-
return !e || !t || e.kind !== t.kind ? !1 : e.kind === "semantic" && t.kind === "semantic" ? oe(e, t) : e.kind === "physical" && t.kind === "physical" ? !!(e.connectionId === t.connectionId &&
|
|
10202
|
+
return !e || !t || e.kind !== t.kind ? !1 : e.kind === "semantic" && t.kind === "semantic" ? oe(e, t) : e.kind === "physical" && t.kind === "physical" ? !!(e.connectionId === t.connectionId && au(
|
|
10203
10203
|
e.tableName,
|
|
10204
10204
|
t.tableName
|
|
10205
10205
|
)) : oe(e, t);
|
|
@@ -10218,7 +10218,7 @@ function LC(e, t) {
|
|
|
10218
10218
|
};
|
|
10219
10219
|
}
|
|
10220
10220
|
function VC(e, t) {
|
|
10221
|
-
const n =
|
|
10221
|
+
const n = lb(e);
|
|
10222
10222
|
return n.status !== "eligible" || n.kind !== "field_date" ? t : ra(
|
|
10223
10223
|
e.filter,
|
|
10224
10224
|
t,
|
|
@@ -10232,7 +10232,7 @@ function UC(e, t, n) {
|
|
|
10232
10232
|
const o = qC(n), i = n.split("."), a = i[i.length - 1] || "", s = ye(
|
|
10233
10233
|
r.qualifiedFieldName
|
|
10234
10234
|
);
|
|
10235
|
-
if (s && !
|
|
10235
|
+
if (s && !za(
|
|
10236
10236
|
s,
|
|
10237
10237
|
n
|
|
10238
10238
|
))
|
|
@@ -10243,12 +10243,12 @@ function UC(e, t, n) {
|
|
|
10243
10243
|
const c = ye(
|
|
10244
10244
|
r.qualifiedEntityName
|
|
10245
10245
|
), d = ye((f = e.fieldMeta) == null ? void 0 : f.qualifiedEntityName) || o;
|
|
10246
|
-
return !(c && (!d || !
|
|
10246
|
+
return !(c && (!d || !au(
|
|
10247
10247
|
c,
|
|
10248
10248
|
d
|
|
10249
10249
|
)));
|
|
10250
10250
|
}
|
|
10251
|
-
function
|
|
10251
|
+
function KC(e, t, n) {
|
|
10252
10252
|
var s, l, c, d;
|
|
10253
10253
|
const r = Ar(e), o = LC(
|
|
10254
10254
|
e,
|
|
@@ -10274,14 +10274,14 @@ function zC(e, t, n) {
|
|
|
10274
10274
|
function ra(e, t, n) {
|
|
10275
10275
|
if (t.filterId !== e.id) return;
|
|
10276
10276
|
const r = ye(t.name), o = ye(e.column);
|
|
10277
|
-
if (!r || r !== o && r !== n && !
|
|
10277
|
+
if (!r || r !== o && r !== n && !za(
|
|
10278
10278
|
r,
|
|
10279
10279
|
n
|
|
10280
10280
|
) || !UC(
|
|
10281
10281
|
e,
|
|
10282
10282
|
t,
|
|
10283
10283
|
n
|
|
10284
|
-
) || !
|
|
10284
|
+
) || !KC(
|
|
10285
10285
|
e,
|
|
10286
10286
|
t,
|
|
10287
10287
|
n
|
|
@@ -10305,7 +10305,7 @@ function ra(e, t, n) {
|
|
|
10305
10305
|
value: i
|
|
10306
10306
|
});
|
|
10307
10307
|
}
|
|
10308
|
-
function
|
|
10308
|
+
function zC(e, t) {
|
|
10309
10309
|
return !!(e.operation === t.operation && e.valueType === t.valueType && e.values.length === t.values.length && e.values.every(
|
|
10310
10310
|
(n, r) => n === t.values[r]
|
|
10311
10311
|
));
|
|
@@ -10328,7 +10328,7 @@ function YC(e) {
|
|
|
10328
10328
|
const n = t.qualifiedFieldName, r = ye(
|
|
10329
10329
|
e.temporalBinding.qualifiedFieldName
|
|
10330
10330
|
);
|
|
10331
|
-
if (!n || !r || !
|
|
10331
|
+
if (!n || !r || !za(
|
|
10332
10332
|
n,
|
|
10333
10333
|
r
|
|
10334
10334
|
))
|
|
@@ -10386,7 +10386,7 @@ function lO(e) {
|
|
|
10386
10386
|
e.effectiveFilterValue,
|
|
10387
10387
|
n.qualifiedFieldName
|
|
10388
10388
|
) : o;
|
|
10389
|
-
return !i || !
|
|
10389
|
+
return !i || !zC(o, i) ? {
|
|
10390
10390
|
status: "ineligible",
|
|
10391
10391
|
reason: "filter_value_execution_mismatch"
|
|
10392
10392
|
} : iv(i) ? {
|
|
@@ -10770,7 +10770,7 @@ function $m(e, t = {}) {
|
|
|
10770
10770
|
const n = [], r = [...t.existingInputs || []];
|
|
10771
10771
|
for (const o of e.inlineFilters || []) {
|
|
10772
10772
|
const i = o.title || o.column || o.id, a = JC(o), s = {
|
|
10773
|
-
id:
|
|
10773
|
+
id: cb(e.id, o.id),
|
|
10774
10774
|
kind: "filter",
|
|
10775
10775
|
label: i,
|
|
10776
10776
|
variableName: o.variableName ? Ln(
|
|
@@ -10792,7 +10792,7 @@ function $m(e, t = {}) {
|
|
|
10792
10792
|
}
|
|
10793
10793
|
for (const o of e.controls || []) {
|
|
10794
10794
|
const i = o.label || o.id, a = {
|
|
10795
|
-
id:
|
|
10795
|
+
id: db(e.id, o.id),
|
|
10796
10796
|
kind: "control",
|
|
10797
10797
|
label: i,
|
|
10798
10798
|
variableName: Ln(
|
|
@@ -10847,7 +10847,7 @@ function Nm(e, t = {}) {
|
|
|
10847
10847
|
const n = [], r = [...t.existingInputs || []];
|
|
10848
10848
|
for (const o of e.controls || []) {
|
|
10849
10849
|
const i = o.label || o.id, a = {
|
|
10850
|
-
id:
|
|
10850
|
+
id: su(o.id),
|
|
10851
10851
|
kind: "control",
|
|
10852
10852
|
label: i,
|
|
10853
10853
|
variableName: Ln(
|
|
@@ -10870,7 +10870,7 @@ function Nm(e, t = {}) {
|
|
|
10870
10870
|
return n;
|
|
10871
10871
|
}
|
|
10872
10872
|
function XC(e) {
|
|
10873
|
-
const t =
|
|
10873
|
+
const t = ub({
|
|
10874
10874
|
entities: e.entities,
|
|
10875
10875
|
connectionType: e.connectionType,
|
|
10876
10876
|
qualifiedHints: [e.identity.qualifiedEntityName],
|
|
@@ -11702,14 +11702,14 @@ function ES(e) {
|
|
|
11702
11702
|
case "dashboardFilter":
|
|
11703
11703
|
return Pn(e.filterId);
|
|
11704
11704
|
case "dashboardControl":
|
|
11705
|
-
return
|
|
11705
|
+
return su(e.controlId);
|
|
11706
11706
|
case "input":
|
|
11707
11707
|
return e.inputId;
|
|
11708
11708
|
default:
|
|
11709
11709
|
return;
|
|
11710
11710
|
}
|
|
11711
11711
|
}
|
|
11712
|
-
function
|
|
11712
|
+
function Km(e, t, n = {}) {
|
|
11713
11713
|
const r = "label" in t ? Xa(t.label) : Nu(t.name), o = /* @__PURE__ */ new Set([
|
|
11714
11714
|
...Um(e, n.exclude),
|
|
11715
11715
|
...(n.alsoTaken ?? []).map((a) => a.variableName)
|
|
@@ -11843,7 +11843,7 @@ function DO(e) {
|
|
|
11843
11843
|
for (const i of fo(o)) n(i);
|
|
11844
11844
|
return t;
|
|
11845
11845
|
}
|
|
11846
|
-
function
|
|
11846
|
+
function zm(e, t) {
|
|
11847
11847
|
if (!t.size)
|
|
11848
11848
|
return e;
|
|
11849
11849
|
const n = Oa(e.scope, {
|
|
@@ -11864,7 +11864,7 @@ function PS(e, t) {
|
|
|
11864
11864
|
var n, r;
|
|
11865
11865
|
if (t.size) {
|
|
11866
11866
|
RS(e, t), e.inputs && (e.inputs = e.inputs.map(
|
|
11867
|
-
(o) =>
|
|
11867
|
+
(o) => zm(o, t)
|
|
11868
11868
|
));
|
|
11869
11869
|
for (const o of t)
|
|
11870
11870
|
(r = (n = e.defaultInputValues) == null ? void 0 : n.byCardId) == null || delete r[o];
|
|
@@ -11979,7 +11979,7 @@ function jS(e, t) {
|
|
|
11979
11979
|
let r = 0;
|
|
11980
11980
|
const o = (a = e.inputs) == null ? void 0 : a.map((l) => {
|
|
11981
11981
|
var d, f;
|
|
11982
|
-
const c =
|
|
11982
|
+
const c = zm(l, n);
|
|
11983
11983
|
return c !== l && l.kind === "filter" && c.kind === "filter" && (r += (((d = l.application) == null ? void 0 : d.cards.length) ?? 0) - (((f = c.application) == null ? void 0 : f.cards.length) ?? 0)), c;
|
|
11984
11984
|
});
|
|
11985
11985
|
let i = e.defaultInputValues;
|
|
@@ -12068,7 +12068,7 @@ function FO(e) {
|
|
|
12068
12068
|
function EO(e, t) {
|
|
12069
12069
|
return `${e}-${t}`;
|
|
12070
12070
|
}
|
|
12071
|
-
const $O = "CONTROL_PLACEHOLDER_QUOTED", LS = "CONTROL_REFERENCE_MISSING", VS = "CONTROL_VALUE_MISSING", NO = "CONTROL_VALUE_INVALID", AO = "CONTROL_CONTEXT_UNSUPPORTED", US = "CONTROL_DEFINITION_DUPLICATE",
|
|
12071
|
+
const $O = "CONTROL_PLACEHOLDER_QUOTED", LS = "CONTROL_REFERENCE_MISSING", VS = "CONTROL_VALUE_MISSING", NO = "CONTROL_VALUE_INVALID", AO = "CONTROL_CONTEXT_UNSUPPORTED", US = "CONTROL_DEFINITION_DUPLICATE", KS = "CONTROL_DEFINITION_INVALID", Bs = "CONTROL_BINDING_MAPPING_MISSING", MO = "CONTROL_BINDING_TARGET_INVALID", Bc = "CONTROL_BINDING_VALUE_INVALID";
|
|
12072
12072
|
class Be extends Error {
|
|
12073
12073
|
constructor(n, r) {
|
|
12074
12074
|
super(n);
|
|
@@ -12084,7 +12084,7 @@ function OO(e, t) {
|
|
|
12084
12084
|
throw new Be(
|
|
12085
12085
|
"Malformed control definition was provided for query execution.",
|
|
12086
12086
|
{
|
|
12087
|
-
code:
|
|
12087
|
+
code: KS
|
|
12088
12088
|
}
|
|
12089
12089
|
);
|
|
12090
12090
|
if (n.get(r.id))
|
|
@@ -12099,7 +12099,7 @@ function OO(e, t) {
|
|
|
12099
12099
|
}
|
|
12100
12100
|
return n;
|
|
12101
12101
|
}
|
|
12102
|
-
const
|
|
12102
|
+
const zS = /^-?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/;
|
|
12103
12103
|
function YS(e) {
|
|
12104
12104
|
switch (e.source.kind) {
|
|
12105
12105
|
case "manual":
|
|
@@ -12171,7 +12171,7 @@ function js(e, t) {
|
|
|
12171
12171
|
case "number": {
|
|
12172
12172
|
if (typeof t == "number" && Number.isFinite(t))
|
|
12173
12173
|
return t;
|
|
12174
|
-
if (typeof t == "string" &&
|
|
12174
|
+
if (typeof t == "string" && zS.test(t.trim()))
|
|
12175
12175
|
return Number(t);
|
|
12176
12176
|
throw new Error(
|
|
12177
12177
|
`Control ${Ze(e)} requires a numeric value.`
|
|
@@ -12323,7 +12323,7 @@ const GS = u.unknown().optional(), Hm = u.object({
|
|
|
12323
12323
|
entityId: u.string().trim().min(1),
|
|
12324
12324
|
entityName: u.string().trim().min(1),
|
|
12325
12325
|
entityType: u.string().trim().min(1),
|
|
12326
|
-
source:
|
|
12326
|
+
source: zh.optional(),
|
|
12327
12327
|
expression: u.string().optional(),
|
|
12328
12328
|
format: GS
|
|
12329
12329
|
}).passthrough(), HS = Hm.extend({
|
|
@@ -12650,7 +12650,7 @@ function lk(e) {
|
|
|
12650
12650
|
}
|
|
12651
12651
|
}
|
|
12652
12652
|
}
|
|
12653
|
-
function
|
|
12653
|
+
function KO(e) {
|
|
12654
12654
|
const t = ik({
|
|
12655
12655
|
controlDefinitions: e.controlDefinitions,
|
|
12656
12656
|
cardControlDefinitions: e.cardControlDefinitions,
|
|
@@ -12700,7 +12700,7 @@ function Vc(e, t, n) {
|
|
|
12700
12700
|
message: `${t.split(".").pop()} must be a supported time granularity`
|
|
12701
12701
|
});
|
|
12702
12702
|
}
|
|
12703
|
-
function
|
|
12703
|
+
function zO(e) {
|
|
12704
12704
|
if (e == null)
|
|
12705
12705
|
return { ok: !0 };
|
|
12706
12706
|
if (!dk(e))
|
|
@@ -12888,7 +12888,7 @@ function HO(e) {
|
|
|
12888
12888
|
a.map(({ field: p, role: g }) => `${g}:${p.id}`)
|
|
12889
12889
|
), l = new Map(
|
|
12890
12890
|
(t.columns || []).map((p) => [p.key, p])
|
|
12891
|
-
), c =
|
|
12891
|
+
), c = zt(
|
|
12892
12892
|
i,
|
|
12893
12893
|
Di,
|
|
12894
12894
|
"metric"
|
|
@@ -12906,7 +12906,7 @@ function HO(e) {
|
|
|
12906
12906
|
([p, g]) => Object.keys(g || {}).map((h) => `${p}:${h}`)
|
|
12907
12907
|
);
|
|
12908
12908
|
if (d.length !== s.size || d.some((p) => !s.has(p)) || a.some(
|
|
12909
|
-
({ field: p, role: g }) => !
|
|
12909
|
+
({ field: p, role: g }) => !zt(i, p.id, g)
|
|
12910
12910
|
))
|
|
12911
12911
|
return !1;
|
|
12912
12912
|
try {
|
|
@@ -12927,7 +12927,7 @@ function HO(e) {
|
|
|
12927
12927
|
});
|
|
12928
12928
|
return r !== 0 && ((m = n.cardConfig.pivotByColumns) != null && m.length) && f.length === 0 ? !1 : n.fields.every((p) => {
|
|
12929
12929
|
var y;
|
|
12930
|
-
const g =
|
|
12930
|
+
const g = zt(
|
|
12931
12931
|
i,
|
|
12932
12932
|
p.id,
|
|
12933
12933
|
p.role
|
|
@@ -12950,7 +12950,7 @@ function Gr(e, t) {
|
|
|
12950
12950
|
if (!o.ok) throw new Error(o.error.code);
|
|
12951
12951
|
return o.format;
|
|
12952
12952
|
}
|
|
12953
|
-
function gk(e, t, n =
|
|
12953
|
+
function gk(e, t, n = Ke) {
|
|
12954
12954
|
const r = Gr(e, "card"), o = Gr(e, "semantic"), i = e.semanticTemporalPresentation;
|
|
12955
12955
|
return Aa({
|
|
12956
12956
|
metadata: t,
|
|
@@ -13045,12 +13045,12 @@ function JO(e) {
|
|
|
13045
13045
|
}) : gk(
|
|
13046
13046
|
c,
|
|
13047
13047
|
d,
|
|
13048
|
-
e.valueFormatPreferences ??
|
|
13048
|
+
e.valueFormatPreferences ?? Ke
|
|
13049
13049
|
)
|
|
13050
13050
|
};
|
|
13051
13051
|
};
|
|
13052
13052
|
for (const c of t.fields) {
|
|
13053
|
-
const d =
|
|
13053
|
+
const d = zt(
|
|
13054
13054
|
e.columnKeyMap,
|
|
13055
13055
|
c.id,
|
|
13056
13056
|
c.role
|
|
@@ -13305,7 +13305,7 @@ function oR(e) {
|
|
|
13305
13305
|
// Raw detail-table presentation has its own result/adapter contract.
|
|
13306
13306
|
// This module remains grouped-only even though the shared producer
|
|
13307
13307
|
// registry now recognizes detailTable.
|
|
13308
|
-
supportsCardType: (t) => t !== "detailTable" &&
|
|
13308
|
+
supportsCardType: (t) => t !== "detailTable" && zI(t)
|
|
13309
13309
|
});
|
|
13310
13310
|
}
|
|
13311
13311
|
const Fk = [
|
|
@@ -13401,16 +13401,16 @@ function sR(e, t) {
|
|
|
13401
13401
|
function lR(e, t) {
|
|
13402
13402
|
return Ao(e, t) === "y" ? t == null ? void 0 : t.yAxisConfig : (t == null ? void 0 : t.xAxisConfig) || (jk.has(e || "") ? t == null ? void 0 : t.yAxisConfig : void 0);
|
|
13403
13403
|
}
|
|
13404
|
-
const Uc = { kind: "overall" },
|
|
13404
|
+
const Uc = { kind: "overall" }, Kc = { kind: "sumOfRows" }, pi = { kind: "none", reason: "no_single_total" };
|
|
13405
13405
|
function sa(e) {
|
|
13406
13406
|
const { measure: t, transform: n, setting: r } = e;
|
|
13407
|
-
if (r === "sumOfRows") return
|
|
13407
|
+
if (r === "sumOfRows") return Kc;
|
|
13408
13408
|
if (!n) return Uc;
|
|
13409
13409
|
switch (n.function) {
|
|
13410
13410
|
case "running_total":
|
|
13411
13411
|
return n.partitionByFieldIds.length === 0 && ka(t).reaggregation.kind === "additive" ? Uc : pi;
|
|
13412
13412
|
case "percent_of_total":
|
|
13413
|
-
return n.scope === "grand_total" ?
|
|
13413
|
+
return n.scope === "grand_total" ? Kc : pi;
|
|
13414
13414
|
default:
|
|
13415
13415
|
return pi;
|
|
13416
13416
|
}
|
|
@@ -13419,16 +13419,16 @@ const Uk = "Adds each row's value; a customer in two rows counts twice.";
|
|
|
13419
13419
|
function cR(e) {
|
|
13420
13420
|
return e.kind === "overall" ? "Overall" : e.kind === "sumOfRows" ? "Sum of rows" : "No total";
|
|
13421
13421
|
}
|
|
13422
|
-
const
|
|
13422
|
+
const Kk = {
|
|
13423
13423
|
running_total: "This running total has no single total for the whole table.",
|
|
13424
13424
|
moving_average: "A moving average has no single total.",
|
|
13425
13425
|
previous_period_delta: "A change from the previous value has no single total.",
|
|
13426
13426
|
percent_of_total: "A percent of each group's total has no single total."
|
|
13427
13427
|
};
|
|
13428
13428
|
function ap(e, t) {
|
|
13429
|
-
return e.kind === "overall" ? "Across the whole table" : e.kind === "sumOfRows" ? "Sum of all rows" : e.reason === "separate_tables" ? "This table combines measures from separate tables, so it has no single overall value." : t ?
|
|
13429
|
+
return e.kind === "overall" ? "Across the whole table" : e.kind === "sumOfRows" ? "Sum of all rows" : e.reason === "separate_tables" ? "This table combines measures from separate tables, so it has no single overall value." : t ? Kk[t.function] : "This column has no single total for the whole table.";
|
|
13430
13430
|
}
|
|
13431
|
-
const sp = (e) => de(e) === "date",
|
|
13431
|
+
const sp = (e) => de(e) === "date", zk = /* @__PURE__ */ new Set([
|
|
13432
13432
|
"running_total",
|
|
13433
13433
|
"moving_average",
|
|
13434
13434
|
"previous_period_delta"
|
|
@@ -13460,7 +13460,7 @@ function Gk(e) {
|
|
|
13460
13460
|
function bn(e) {
|
|
13461
13461
|
return e.label || e.name || e.id || "metric";
|
|
13462
13462
|
}
|
|
13463
|
-
function
|
|
13463
|
+
function zc(e) {
|
|
13464
13464
|
var t, n;
|
|
13465
13465
|
return (n = (t = e.parameters) == null ? void 0 : t.windowTransform) == null ? void 0 : n.function;
|
|
13466
13466
|
}
|
|
@@ -13514,13 +13514,13 @@ function Mo({
|
|
|
13514
13514
|
};
|
|
13515
13515
|
const a = i.filter(
|
|
13516
13516
|
(C) => !la.includes(
|
|
13517
|
-
|
|
13517
|
+
zc(C)
|
|
13518
13518
|
)
|
|
13519
13519
|
);
|
|
13520
13520
|
if (a.length > 0)
|
|
13521
13521
|
return {
|
|
13522
13522
|
errors: a.map((C) => {
|
|
13523
|
-
const k =
|
|
13523
|
+
const k = zc(C), w = typeof k == "string" && k.trim().length > 0 ? k : "undefined";
|
|
13524
13524
|
return {
|
|
13525
13525
|
code: pe.INVALID_WINDOW_TRANSFORM,
|
|
13526
13526
|
message: `Metric "${bn(C)}" uses unsupported window transform function "${w}". Supported functions: ${la.join(", ")}.`,
|
|
@@ -13587,7 +13587,7 @@ function Mo({
|
|
|
13587
13587
|
});
|
|
13588
13588
|
continue;
|
|
13589
13589
|
}
|
|
13590
|
-
const x =
|
|
13590
|
+
const x = zk.has(w), z = ((g = k.orderBy) == null ? void 0 : g.fieldId) || (f == null ? void 0 : f.id), v = x && z ? d.get(z) : void 0;
|
|
13591
13591
|
if (x && (!v || !v.id)) {
|
|
13592
13592
|
s.push({
|
|
13593
13593
|
code: pe.WINDOW_ORDER_FIELD_INVALID,
|
|
@@ -13599,13 +13599,13 @@ function Mo({
|
|
|
13599
13599
|
x && v && !sp(v.dataType) && l.add(lp.WINDOW_NON_DATE_ORDER);
|
|
13600
13600
|
const S = w === "percent_of_total" ? [] : r.filter((E) => E.id && E.id !== (v == null ? void 0 : v.id)).map((E) => E.id), N = new Set(
|
|
13601
13601
|
r.filter((E) => !!E.id).map((E) => E.id)
|
|
13602
|
-
), O = w === "percent_of_total" ? Zk(k) : void 0, P = O === "grand_total" ? [] : ((h = k.partitionByFieldIds) == null ? void 0 : h.filter(Boolean)) ?? S,
|
|
13602
|
+
), O = w === "percent_of_total" ? Zk(k) : void 0, P = O === "grand_total" ? [] : ((h = k.partitionByFieldIds) == null ? void 0 : h.filter(Boolean)) ?? S, K = P.filter(
|
|
13603
13603
|
(E) => !N.has(E)
|
|
13604
13604
|
);
|
|
13605
|
-
if (
|
|
13605
|
+
if (K.length > 0) {
|
|
13606
13606
|
s.push({
|
|
13607
13607
|
code: pe.INVALID_WINDOW_TRANSFORM,
|
|
13608
|
-
message: `Metric "${bn(C)}" references invalid partition fields: ${
|
|
13608
|
+
message: `Metric "${bn(C)}" references invalid partition fields: ${K.join(", ")}.`,
|
|
13609
13609
|
metricId: C.id
|
|
13610
13610
|
});
|
|
13611
13611
|
continue;
|
|
@@ -14107,18 +14107,18 @@ const ca = [
|
|
|
14107
14107
|
group_by: yi(hi.group_by),
|
|
14108
14108
|
detail: yi(hi.detail)
|
|
14109
14109
|
}, Ot = (e) => typeof e == "string" ? e.trim().toLowerCase() : "";
|
|
14110
|
-
function
|
|
14110
|
+
function Ks(e) {
|
|
14111
14111
|
const t = e.source;
|
|
14112
14112
|
return (t == null ? void 0 : t.kind) === "semantic" ? t.datasetName : (t == null ? void 0 : t.kind) === "physical" ? t.tableName : e.entityName || e.entityId || "";
|
|
14113
14113
|
}
|
|
14114
|
-
function
|
|
14114
|
+
function zs(e, t) {
|
|
14115
14115
|
return `${e === "__count" ? "*" : Ot(e)}|${Ot(t)}`;
|
|
14116
14116
|
}
|
|
14117
14117
|
function Qe(e) {
|
|
14118
|
-
return
|
|
14118
|
+
return zs(e.name, Ks(e));
|
|
14119
14119
|
}
|
|
14120
14120
|
function vR(e, t, n) {
|
|
14121
|
-
const r =
|
|
14121
|
+
const r = zs(t, n);
|
|
14122
14122
|
return e.find((o) => Qe(o) === r) ?? e.find((o) => Ot(o.name) === Ot(t));
|
|
14123
14123
|
}
|
|
14124
14124
|
const Hc = (e, t) => e === "metric" ? Ot(t.aggregate) : e === "group_by" ? Ot(t.granularity) : "";
|
|
@@ -14152,12 +14152,12 @@ function hT(e) {
|
|
|
14152
14152
|
];
|
|
14153
14153
|
}
|
|
14154
14154
|
function Wn(e, t) {
|
|
14155
|
-
const n = hT(e), r =
|
|
14155
|
+
const n = hT(e), r = fb(n, t);
|
|
14156
14156
|
return r ? n[r.group].fields[r.index] : void 0;
|
|
14157
14157
|
}
|
|
14158
14158
|
function Qc(e, t) {
|
|
14159
14159
|
const n = e.role === "metric" ? "metric" : e.role === "detail" ? "detail" : "groupby";
|
|
14160
|
-
return { ...e, alias:
|
|
14160
|
+
return { ...e, alias: pb(e, n), role: "sortby", direction: t };
|
|
14161
14161
|
}
|
|
14162
14162
|
function da(e) {
|
|
14163
14163
|
return typeof e == "string" ? e : e.name;
|
|
@@ -14167,7 +14167,7 @@ function yT(e, t) {
|
|
|
14167
14167
|
return typeof e == "string" ? t : e.datasetName ?? ((n = e.source) == null ? void 0 : n.datasetName) ?? t;
|
|
14168
14168
|
}
|
|
14169
14169
|
function ut(e, t) {
|
|
14170
|
-
return
|
|
14170
|
+
return zs(da(e), yT(e, t));
|
|
14171
14171
|
}
|
|
14172
14172
|
function Jc(e) {
|
|
14173
14173
|
if (e) {
|
|
@@ -14201,9 +14201,9 @@ function _R(e, t, n, r) {
|
|
|
14201
14201
|
h && I.push("measures"), (y || f("timeGrain") || p && (m("timeGrain") || g) || b) && I.push("groupings"), c(s(i, "columns"), s(a, "columns")) || I.push("columns"), (f("filters") || f("timeWindow") || p && (m("timeWindow") || g)) && I.push("filters"), d(i.orderBy, a.orderBy) || I.push("order"), f("limit") && I.push("limit");
|
|
14202
14202
|
const _ = [], D = (v, S, N) => {
|
|
14203
14203
|
const O = mt(v, S, (P) => ut(P, o));
|
|
14204
|
-
mt(v, N, (P) => ut(P, o)).forEach((P,
|
|
14204
|
+
mt(v, N, (P) => ut(P, o)).forEach((P, K) => {
|
|
14205
14205
|
const E = O.findIndex((G) => le(G, P));
|
|
14206
|
-
E >= 0 && l(S[E], N[
|
|
14206
|
+
E >= 0 && l(S[E], N[K]) && _.push(P);
|
|
14207
14207
|
});
|
|
14208
14208
|
}, C = (v) => [
|
|
14209
14209
|
...s(v, "dimensions"),
|
|
@@ -14212,13 +14212,13 @@ function _R(e, t, n, r) {
|
|
|
14212
14212
|
D("metric", s(i, "measures"), s(a, "measures")), D("detail", s(i, "columns"), s(a, "columns")), D("group_by", f("timeGrain") ? s(i, "dimensions") : C(i), f("timeGrain") ? s(a, "dimensions") : C(a));
|
|
14213
14213
|
const k = i.filters ?? [], w = (a.filters ?? []).flatMap(
|
|
14214
14214
|
(v) => v.id && k.some((S) => qe(S, v)) ? [v.id] : []
|
|
14215
|
-
), x = s(i, "measures"), $ = mt("metric", x, (v) => ut(v, o)),
|
|
14215
|
+
), x = s(i, "measures"), $ = mt("metric", x, (v) => ut(v, o)), z = mt("metric", s(a, "measures"), (v) => ut(v, o)).some((v, S) => {
|
|
14216
14216
|
const N = Ir(s(a, "measures")[S]), O = $.findIndex((P) => le(P, v));
|
|
14217
14217
|
return O < 0 ? N !== void 0 : N !== Ir(x[O]);
|
|
14218
14218
|
});
|
|
14219
14219
|
return {
|
|
14220
14220
|
aspects: I,
|
|
14221
|
-
parts: { measureAggregates:
|
|
14221
|
+
parts: { measureAggregates: z, dimensions: y, timeGrain: f("timeGrain") },
|
|
14222
14222
|
keptColumns: _,
|
|
14223
14223
|
keptFilterIds: w,
|
|
14224
14224
|
keptWindow: !!i.timeWindow && !f("timeWindow") && !p,
|
|
@@ -14343,7 +14343,7 @@ function IT(e, t) {
|
|
|
14343
14343
|
else {
|
|
14344
14344
|
const Ct = { ...ae, id: Te.id };
|
|
14345
14345
|
for (const yn of gn)
|
|
14346
|
-
Vo &&
|
|
14346
|
+
Vo && mb.includes(yn) || (yn in Te ? Ct[yn] = Te[yn] : delete Ct[yn]);
|
|
14347
14347
|
st.pass === 2 && !Vo && Te.label && Te.label !== ae.label && s.push({ label: Te.label, field: ae.name, role: F });
|
|
14348
14348
|
const cl = F === "metric" ? (ll = Te.parameters) == null ? void 0 : ll.windowTransform : void 0;
|
|
14349
14349
|
cl && (Ct.parameters = { ...Ct.parameters, windowTransform: cl }), hn = Ct;
|
|
@@ -14354,7 +14354,7 @@ function IT(e, t) {
|
|
|
14354
14354
|
});
|
|
14355
14355
|
}, D = _("metric", n.metricColumns, r.metricColumns, i("measures")), C = _("group_by", n.groupByColumns, r.groupByColumns, i("groupings")), k = o && i("groupings") ? yp(n.groupByColumns ?? [], C, (F) => Hr(F, F.granularity)) : C, w = _("detail", n.detailColumns, r.detailColumns, i("columns"));
|
|
14356
14356
|
if (g.length) return Xc(e, g);
|
|
14357
|
-
const x = i("measures") || i("groupings") || i("columns"), $ = !!((te = n.sortByColumns) != null && te.length),
|
|
14357
|
+
const x = i("measures") || i("groupings") || i("columns"), $ = !!((te = n.sortByColumns) != null && te.length), z = i("limit") ? r.rowLimit : n.rowLimit, v = typeof z == "number" && z > 0, S = i("order") || o !== void 0 && !o.orderChosen && ($ ? x : v && i("limit")), N = (ue = r.sortByColumns) == null ? void 0 : ue.map((F) => {
|
|
14358
14358
|
const j = Wn(r, F), V = j && p.get(j);
|
|
14359
14359
|
return V ? Qc(V, F.direction) : F;
|
|
14360
14360
|
});
|
|
@@ -14369,7 +14369,7 @@ function IT(e, t) {
|
|
|
14369
14369
|
}), F && (O = N);
|
|
14370
14370
|
}
|
|
14371
14371
|
const P = !o || CT(n, r, i);
|
|
14372
|
-
let
|
|
14372
|
+
let K = r.matrix, E = e.controlBindings;
|
|
14373
14373
|
if (r.matrix && n.matrix)
|
|
14374
14374
|
try {
|
|
14375
14375
|
const F = TT(n.matrix, r.matrix, e.controlBindings ?? [], { pairing: f, stated: l, change: o, owns: i, sourceChanged: P });
|
|
@@ -14381,7 +14381,7 @@ function IT(e, t) {
|
|
|
14381
14381
|
message: `A control on "${e.title ?? "this card"}" chooses ${F.controlled}, so changing it here wouldn't take effect; change the control in the editor.`,
|
|
14382
14382
|
parts: ["controlBindings"]
|
|
14383
14383
|
};
|
|
14384
|
-
|
|
14384
|
+
K = F.config, s.push(...F.keptLabels), e.controlBindings && (E = [...F.bindings]);
|
|
14385
14385
|
} catch (F) {
|
|
14386
14386
|
return { ok: !1, code: "query_invalid", message: `The new Matrix definition isn't valid: ${F.message}` };
|
|
14387
14387
|
}
|
|
@@ -14395,7 +14395,7 @@ function IT(e, t) {
|
|
|
14395
14395
|
rowLimit: i("limit") ? r.rowLimit : n.rowLimit,
|
|
14396
14396
|
queryBaseSource: P ? r.queryBaseSource : n.queryBaseSource,
|
|
14397
14397
|
joinPlan: P ? r.joinPlan : n.joinPlan,
|
|
14398
|
-
matrix:
|
|
14398
|
+
matrix: K
|
|
14399
14399
|
}, T = { ...n }, M = (F) => Array.isArray(F) && F.length === 0;
|
|
14400
14400
|
for (const F of ca) {
|
|
14401
14401
|
const j = n[F];
|
|
@@ -14507,7 +14507,7 @@ function Zc(e, t) {
|
|
|
14507
14507
|
}
|
|
14508
14508
|
}
|
|
14509
14509
|
function CT(e, t, n) {
|
|
14510
|
-
const r = (a) => new Set(a.map((s) => Ot(
|
|
14510
|
+
const r = (a) => new Set(a.map((s) => Ot(Ks(s)))), o = r(Gc.flatMap((a) => Zc(e, a))), i = r(Gc.flatMap((a) => Zc(n(a) ? t : e, a)));
|
|
14511
14511
|
return o.size !== i.size || [...i].some((a) => !o.has(a));
|
|
14512
14512
|
}
|
|
14513
14513
|
const ST = /* @__PURE__ */ new Set(["config", "dataSource", "connectionId", "sql", "python", "controlBindings"]);
|
|
@@ -14597,7 +14597,7 @@ function TT(e, t, n, r) {
|
|
|
14597
14597
|
return { controlled: `${"field" in te && te.field ? te.field.label || te.field.name : te.id}'s ${B ? "aggregate" : "grain"}` };
|
|
14598
14598
|
}
|
|
14599
14599
|
}
|
|
14600
|
-
const k = (T) => Hr(T.field, T.grain), w = t.spec.rows.map((T, M) => I(T, M)), x = i("groupings") ? o ? yp(e.spec.rows, w, k) ?? w : w : e.spec.rows, $ = i("groupings") ? t.spec.columns.map((T, M) => I(T, t.spec.rows.length + M)) : e.spec.columns,
|
|
14600
|
+
const k = (T) => Hr(T.field, T.grain), w = t.spec.rows.map((T, M) => I(T, M)), x = i("groupings") ? o ? yp(e.spec.rows, w, k) ?? w : w : e.spec.rows, $ = i("groupings") ? t.spec.columns.map((T, M) => I(T, t.spec.rows.length + M)) : e.spec.columns, z = i("measures") ? t.spec.measures.map((T, M) => _(T, M)) : e.spec.measures, v = {
|
|
14601
14601
|
...e.spec,
|
|
14602
14602
|
...r.sourceChanged ? { source: t.spec.source, joinPlan: t.spec.joinPlan, relationshipHint: t.spec.relationshipHint } : {},
|
|
14603
14603
|
filters: i("filters") ? o ? bp(e.spec.filters, t.spec.filters, o) : t.spec.filters : e.spec.filters
|
|
@@ -14605,7 +14605,7 @@ function TT(e, t, n, r) {
|
|
|
14605
14605
|
v.filters === void 0 && delete v.filters, v.joinPlan === void 0 && delete v.joinPlan, v.relationshipHint === void 0 && delete v.relationshipHint;
|
|
14606
14606
|
const S = { ...e, spec: v };
|
|
14607
14607
|
if (!i("measures") && !i("groupings")) return { config: S, bindings: n, keptLabels: a };
|
|
14608
|
-
const N = Io(S, { kind: "structure", rows: x, columns: $, measures:
|
|
14608
|
+
const N = Io(S, { kind: "structure", rows: x, columns: $, measures: z }, n), O = { ...N.config.presentation.levelLabels }, P = { ...N.config.presentation.measureLabels };
|
|
14609
14609
|
return l.forEach((T, M) => {
|
|
14610
14610
|
var B;
|
|
14611
14611
|
const R = (B = t.presentation.levelLabels) == null ? void 0 : B[T.id];
|
|
@@ -14888,7 +14888,7 @@ function BT(e, t) {
|
|
|
14888
14888
|
let l = (i = n.preferences) == null ? void 0 : i[a];
|
|
14889
14889
|
s.title !== void 0 && (l = H_(l, s.title === null ? { enabled: !1 } : { enabled: !0, text: s.title })), (s.min !== void 0 || s.max !== void 0) && (l = Q_(l, { ...s.min !== void 0 ? { min: s.min } : {}, ...s.max !== void 0 ? { max: s.max } : {} })), l && o(J_(n.preferences, a, l));
|
|
14890
14890
|
}
|
|
14891
|
-
if (t.comparisonDisplay && o(lm(n.preferences, t.comparisonDisplay)), t.inheritComparison !== void 0 && o(Z_(n.preferences, t.inheritComparison)), t.band !== void 0 && (n =
|
|
14891
|
+
if (t.comparisonDisplay && o(lm(n.preferences, t.comparisonDisplay)), t.inheritComparison !== void 0 && o(Z_(n.preferences, t.inheritComparison)), t.band !== void 0 && (n = z_(n, t.band)), t.seeRecords !== void 0 && (n = X_(n, t.seeRecords)), t.highlights) {
|
|
14892
14892
|
const a = new Set(t.highlights.remove ?? []), s = It(n);
|
|
14893
14893
|
for (const l of a) s.some((c) => c.id === l) || r.push({ setting: "highlight", reason: "rule_missing" });
|
|
14894
14894
|
n = Gf(n, [...s.filter((l) => !a.has(l.id)), ...t.highlights.add ?? []]);
|
|
@@ -15059,10 +15059,10 @@ const Z = {
|
|
|
15059
15059
|
// A KPI shows its value, a number.
|
|
15060
15060
|
kpi: { number: Re, date: [], grouped_date: [], text: [], category: [], result: Re }
|
|
15061
15061
|
};
|
|
15062
|
-
function
|
|
15062
|
+
function KT(e, t) {
|
|
15063
15063
|
return UT[e][t];
|
|
15064
15064
|
}
|
|
15065
|
-
const
|
|
15065
|
+
const zT = {
|
|
15066
15066
|
table: "table",
|
|
15067
15067
|
detail_table: "detail_table",
|
|
15068
15068
|
matrix: "matrix",
|
|
@@ -15079,7 +15079,7 @@ function YT(e, t) {
|
|
|
15079
15079
|
return nr(n) ? oo(e.granularity) ? "grouped_date" : "date" : n === "number" ? e.role === "dimension" ? "category" : "number" : n === "unknown" && e.role === "measure" ? "number" : "text";
|
|
15080
15080
|
}
|
|
15081
15081
|
function _p(e, t, n, r) {
|
|
15082
|
-
const o =
|
|
15082
|
+
const o = zT[t.type], i = n.ref.kind === "result" && (o === "cartesian" || o === "pie") && r !== void 0 && !Vk({ chartType: e.type, resultKeys: r, preferences: e.preferences }).includes(n.ref.key), a = YT(n, i), s = n.dataType !== void 0 && ce(n.dataType) === "date";
|
|
15083
15083
|
return {
|
|
15084
15084
|
surface: o,
|
|
15085
15085
|
value: a,
|
|
@@ -15088,7 +15088,7 @@ function _p(e, t, n, r) {
|
|
|
15088
15088
|
};
|
|
15089
15089
|
}
|
|
15090
15090
|
function WT(e) {
|
|
15091
|
-
return
|
|
15091
|
+
return KT(e.surface, e.value);
|
|
15092
15092
|
}
|
|
15093
15093
|
function xR(e, t) {
|
|
15094
15094
|
const n = ur(e);
|
|
@@ -15097,7 +15097,7 @@ function xR(e, t) {
|
|
|
15097
15097
|
if (o != null && o.dataType)
|
|
15098
15098
|
return WT(_p(e, n, o));
|
|
15099
15099
|
}
|
|
15100
|
-
const Mn =
|
|
15100
|
+
const Mn = Ke, GT = { tz: "UTC" }, HT = {
|
|
15101
15101
|
date: "2026-07-31",
|
|
15102
15102
|
wall_datetime: "2026-07-31T14:30:00",
|
|
15103
15103
|
instant: "2026-07-31T14:30:00Z"
|
|
@@ -15794,7 +15794,7 @@ function UD(e, t, n) {
|
|
|
15794
15794
|
const r = Ds(Ts(e.type) ?? e.type), o = !!((c = t == null ? void 0 : t.parameters) != null && c.windowTransform), i = Qs(e), a = !i && rp.includes(e.type), s = a && op.includes(e.type), l = (d) => a ? d === "target" && !s ? Wt("comparison_not_for_card", "Targets show on KPIs and tables.") : (d === "previous_period" || d === "previous_year") && !n.comparisonDate ? Wt("comparison_needs_date", "Add a date to compare over.") : d !== "inherit" && d !== "off" && o ? { offered: !0, replaces: "transform" } : { offered: !0 } : Wt("comparison_not_for_card", i ? `A card written in SQL ${i.comparison}.` : `A ${r} doesn't show comparisons.`);
|
|
15795
15795
|
return Object.fromEntries(LD.map((d) => [d, l(d)]));
|
|
15796
15796
|
}
|
|
15797
|
-
function
|
|
15797
|
+
function KD(e, t, n) {
|
|
15798
15798
|
const r = e.config ?? {}, o = r.groupByColumns ?? [], i = n ? o[xe("group_by", o).findIndex((c) => le(c, n))] : o[0], a = Fr(Ro(t == null ? void 0 : t.metric.comparison)), s = Qs(e), l = (c) => {
|
|
15799
15799
|
if (s) return Wt("transform_not_for_card", `A card written in SQL ${s.transform}.`);
|
|
15800
15800
|
if (!t) return Wt("transform_not_for_card", "The card has no measure there to calculate on.");
|
|
@@ -15810,11 +15810,11 @@ function zD(e, t, n) {
|
|
|
15810
15810
|
};
|
|
15811
15811
|
return Object.fromEntries(VD.map((c) => [c, l(c)]));
|
|
15812
15812
|
}
|
|
15813
|
-
function
|
|
15813
|
+
function zD(e, t, n) {
|
|
15814
15814
|
const r = Gt(e, t), { groupings: o, defaultOrder: i } = mr(e);
|
|
15815
15815
|
return {
|
|
15816
15816
|
comparison: UD(e, r == null ? void 0 : r.metric, n),
|
|
15817
|
-
transform: { kinds:
|
|
15817
|
+
transform: { kinds: KD(e, r, i), groupings: o, defaultOrder: i }
|
|
15818
15818
|
};
|
|
15819
15819
|
}
|
|
15820
15820
|
const Fp = /* @__PURE__ */ new Set(["running_total", "moving_average", "difference_from_previous"]);
|
|
@@ -15877,7 +15877,7 @@ function WD(e, t, n) {
|
|
|
15877
15877
|
return !!(l && c && qe(l, c));
|
|
15878
15878
|
}
|
|
15879
15879
|
function GD(e, t, n) {
|
|
15880
|
-
var b, I, _, D, C, k, w, x, $,
|
|
15880
|
+
var b, I, _, D, C, k, w, x, $, z, v;
|
|
15881
15881
|
const r = e.config ?? {}, o = (_ = (I = (b = r.metricColumns) == null ? void 0 : b.find((S) => S.id === t)) == null ? void 0 : I.parameters) == null ? void 0 : _.windowTransform;
|
|
15882
15882
|
if (!o || !(o.function in fd)) return;
|
|
15883
15883
|
const i = Jr(r, e.type, t), a = r.groupByColumns ?? [], s = (S) => S ? a.find((N) => N.id === S) : void 0, l = (S) => S == null ? void 0 : S.filter((N) => s(N)), c = (S) => S.map((N) => n(s(N))), d = fd[o.function];
|
|
@@ -15893,7 +15893,7 @@ function GD(e, t, n) {
|
|
|
15893
15893
|
...g ? { resetBy: c(g) } : {}
|
|
15894
15894
|
}, y = d === "moving_average" ? {
|
|
15895
15895
|
window: ((f == null ? void 0 : f.function) === "moving_average" ? f.windowSize : ($ = o.movingAverage) == null ? void 0 : $.windowSize) ?? 7,
|
|
15896
|
-
minPeriods: ((f == null ? void 0 : f.function) === "moving_average" ? f.minPeriods : (
|
|
15896
|
+
minPeriods: ((f == null ? void 0 : f.function) === "moving_average" ? f.minPeriods : (z = o.movingAverage) == null ? void 0 : z.minPeriods) ?? 1
|
|
15897
15897
|
} : d === "difference_from_previous" ? { mode: ((f == null ? void 0 : f.function) === "previous_period_delta" ? f.mode : (v = o.previousPeriodDelta) == null ? void 0 : v.mode) === "percent" ? "percent_change" : "difference" } : {};
|
|
15898
15898
|
return {
|
|
15899
15899
|
transform: { kind: d, ...h, ...y },
|
|
@@ -16193,7 +16193,7 @@ const Js = qp(
|
|
|
16193
16193
|
values: u.array(u.union([u.string(), u.number(), u.boolean()])).optional(),
|
|
16194
16194
|
/** "aggregate" filters a measure after aggregation (HAVING). */
|
|
16195
16195
|
scope: u.enum(["row", "aggregate"]).optional()
|
|
16196
|
-
}).strict(), Vp = Hh((e) => e.at(-1) === "defaultPeriod" ? "filterDefault" : "cardFilter"), Xs = Vp, wd = Vp, Up = ["minute", "hour", "day", "week", "month", "quarter", "year"],
|
|
16196
|
+
}).strict(), Vp = Hh((e) => e.at(-1) === "defaultPeriod" ? "filterDefault" : "cardFilter"), Xs = Vp, wd = Vp, Up = ["minute", "hour", "day", "week", "month", "quarter", "year"], Kp = u.enum(Up), Zs = u.object({ field: Lp, direction: u.enum(["asc", "desc"]) }).strict(), zp = 1e3, el = u.number().int().positive().max(zp), Yp = { ...Po, aggregate: u.enum(pr).optional() }, yx = u.union([
|
|
16197
16197
|
A,
|
|
16198
16198
|
u.object({
|
|
16199
16199
|
...Yp,
|
|
@@ -16215,7 +16215,7 @@ function Hp(e) {
|
|
|
16215
16215
|
measures: u.array(e).min(1),
|
|
16216
16216
|
dimensions: u.array(Fe).optional(),
|
|
16217
16217
|
dateField: Fe.optional(),
|
|
16218
|
-
timeGrain:
|
|
16218
|
+
timeGrain: Kp.optional(),
|
|
16219
16219
|
filters: u.array(Bo).optional(),
|
|
16220
16220
|
timeWindow: Xs.optional(),
|
|
16221
16221
|
orderBy: Zs.optional(),
|
|
@@ -16240,7 +16240,7 @@ function Jp(e) {
|
|
|
16240
16240
|
columns: u.array(Fe).min(1).optional(),
|
|
16241
16241
|
dimensions: u.array(Fe).nullable().optional(),
|
|
16242
16242
|
dateField: Fe.nullable().optional(),
|
|
16243
|
-
timeGrain:
|
|
16243
|
+
timeGrain: Kp.nullable().optional(),
|
|
16244
16244
|
filters: u.array(Bo).nullable().optional(),
|
|
16245
16245
|
timeWindow: Xs.nullable().optional(),
|
|
16246
16246
|
orderBy: Zs.nullable().optional(),
|
|
@@ -16430,7 +16430,7 @@ const sg = [
|
|
|
16430
16430
|
}).strict(), jx = ["metric query: one dimension (only, first, list) or one measure (aggregate, which may compare with the period before or last year), with filters and orderBy", "SQL query"], qx = (e) => e ? Nr([kd, tl], jx) : kd, Lx = "{ domainId, datasetName, dimensions: [field] | measures: [{ name, aggregate, comparison? }], filters?, orderBy? }", Td = ["only", "first", "list", "aggregate"], Vx = u.union([
|
|
16431
16431
|
u.enum(Td),
|
|
16432
16432
|
u.object({ kind: u.enum(Td), limit: u.number().int().positive().max(Hy).optional(), separator: u.string().max(ax).optional() }).strict()
|
|
16433
|
-
]), Ux = "only (nothing when more than one matches) | first (by orderBy) | list | aggregate, or { kind: 'list', limit?, separator? }.",
|
|
16433
|
+
]), Ux = "only (nothing when more than one matches) | first (by orderBy) | list | aggregate, or { kind: 'list', limit?, separator? }.", Kx = "only | first | list | aggregate, or { kind, limit?, separator? }.", zx = u.union([
|
|
16434
16434
|
u.object({ region: u.enum(["header", "footer"]), role: u.enum(["title", "metadata", "note", "pageInfo"]) }).strict(),
|
|
16435
16435
|
u.object({ sectionId: A }).strict()
|
|
16436
16436
|
]), lg = `{ size?: ${Pp}-${Bp} px, align?: ${jp.join(" | ")} }`, Yx = u.object({
|
|
@@ -16443,7 +16443,7 @@ function cg(e) {
|
|
|
16443
16443
|
get: Vx.describe(Ux),
|
|
16444
16444
|
presentation: Zp,
|
|
16445
16445
|
text: tg,
|
|
16446
|
-
target:
|
|
16446
|
+
target: zx,
|
|
16447
16447
|
style: Yx.describe(lg)
|
|
16448
16448
|
});
|
|
16449
16449
|
}
|
|
@@ -16451,7 +16451,7 @@ function Wx(e) {
|
|
|
16451
16451
|
const t = u.unknown().optional();
|
|
16452
16452
|
return dg({
|
|
16453
16453
|
query: u.unknown().describe(`${Lx}${e ? ", or { connectionId, sql }" : ""}.`),
|
|
16454
|
-
get: u.unknown().describe(
|
|
16454
|
+
get: u.unknown().describe(Kx),
|
|
16455
16455
|
presentation: u.unknown().describe(Cx),
|
|
16456
16456
|
text: u.unknown().describe("Runs: strings, { text | variable, bold?, italic?, underline?, link?, presentation? } or { when, then, else? }."),
|
|
16457
16457
|
target: u.unknown().describe("{ region, role: title | metadata | note | pageInfo } | { sectionId }."),
|
|
@@ -16716,14 +16716,14 @@ function Zr(e) {
|
|
|
16716
16716
|
t != null && t.filters && U("a measure with its own filter");
|
|
16717
16717
|
}
|
|
16718
16718
|
function ke(e, t) {
|
|
16719
|
-
const n =
|
|
16719
|
+
const n = Ks(e);
|
|
16720
16720
|
return !n || n.toLowerCase() === t.datasetName.toLowerCase() ? e.name : { name: e.name, datasetName: n };
|
|
16721
16721
|
}
|
|
16722
16722
|
const iF = (e) => e.id === Gn || e.alias === Gn || e.name === "*" && e.aggregate === "COUNT";
|
|
16723
16723
|
function bg(e, t) {
|
|
16724
16724
|
if (iF(e)) return Gn;
|
|
16725
16725
|
const n = ke(e, t);
|
|
16726
|
-
return
|
|
16726
|
+
return bb(e) ? typeof n == "string" ? { name: n, aggregate: e.aggregate } : { ...n, aggregate: e.aggregate } : n;
|
|
16727
16727
|
}
|
|
16728
16728
|
function aF(e, t, n) {
|
|
16729
16729
|
const r = bg(e, t);
|
|
@@ -16734,12 +16734,12 @@ function aF(e, t, n) {
|
|
|
16734
16734
|
};
|
|
16735
16735
|
}
|
|
16736
16736
|
function sF(e, t, n, r) {
|
|
16737
|
-
var C, k, w, x, $,
|
|
16737
|
+
var C, k, w, x, $, z;
|
|
16738
16738
|
const o = e.config ?? {};
|
|
16739
|
-
!((C = o.metricColumns) != null && C.length) && !((k = o.groupByColumns) != null && k.length) && !((w = o.detailColumns) != null && w.length) && U("no fields yet"), (x = o.pivotByColumns) != null && x.length && U("pivot columns"), (
|
|
16739
|
+
!((C = o.metricColumns) != null && C.length) && !((k = o.groupByColumns) != null && k.length) && !((w = o.detailColumns) != null && w.length) && U("no fields yet"), (x = o.pivotByColumns) != null && x.length && U("pivot columns"), (z = ($ = o.joinPlan) == null ? void 0 : $.joins) != null && z.some((v) => !v.autoResolved) && U("a join set in the editor");
|
|
16740
16740
|
const i = o.metricColumns ?? [], a = o.groupByColumns ?? [], s = o.detailColumns ?? [];
|
|
16741
16741
|
[...i, ...a, ...s].forEach(Zr);
|
|
16742
|
-
const l = Ig(o.filters, n), c = wg(l), d = (v) => ({ query: v, ...c ? { timeWindowReadOnly: c } : {} }), f = typeof o.rowLimit == "number" && o.rowLimit > 0 && o.rowLimit <=
|
|
16742
|
+
const l = Ig(o.filters, n), c = wg(l), d = (v) => ({ query: v, ...c ? { timeWindowReadOnly: c } : {} }), f = typeof o.rowLimit == "number" && o.rowLimit > 0 && o.rowLimit <= zp ? { limit: o.rowLimit } : {};
|
|
16743
16743
|
if (t === "detail_table") {
|
|
16744
16744
|
(i.length || a.length) && U("a detail table with grouped columns"), s.length || U("no columns yet");
|
|
16745
16745
|
const v = xd(l, void 0, n), S = Fd(o.sortByColumns, o, n, void 0);
|
|
@@ -16761,7 +16761,7 @@ function sF(e, t, n, r) {
|
|
|
16761
16761
|
t === "kpi" && g.length && U("a KPI grouped by a dimension");
|
|
16762
16762
|
const h = p ? { dateField: ke(p, n), timeGrain: vg(p.granularity) } : xd(l, void 0, n);
|
|
16763
16763
|
p && l.windowField && Qe(l.windowField) !== Qe(p) && U("a date window on another date field");
|
|
16764
|
-
const y =
|
|
16764
|
+
const y = gb({ groupedDate: p, measures: i, grouped: a.length > 0 }), b = y && { column: y.target, direction: y.direction }, I = Fd(o.sortByColumns, o, n, b), _ = r ? rF(e, (v) => ke(v, n)) : void 0;
|
|
16765
16765
|
_ && !_.ok && U(_.detail);
|
|
16766
16766
|
const D = _ != null && _.ok ? _.measures : [];
|
|
16767
16767
|
return d({
|
|
@@ -16810,7 +16810,7 @@ const lF = {
|
|
|
16810
16810
|
function cF(e, t) {
|
|
16811
16811
|
const n = Array.isArray(t) ? t : [t];
|
|
16812
16812
|
(n.length !== 1 || typeof n[0] != "string") && U("a pattern filter on a value that isn't text");
|
|
16813
|
-
const r =
|
|
16813
|
+
const r = yb(e, n[0]);
|
|
16814
16814
|
return r || U("a pattern filter that matches a value exactly"), r;
|
|
16815
16815
|
}
|
|
16816
16816
|
function Ig(e, t) {
|
|
@@ -16837,7 +16837,7 @@ function Ig(e, t) {
|
|
|
16837
16837
|
operator: i,
|
|
16838
16838
|
...a ? { scope: "aggregate" } : {}
|
|
16839
16839
|
};
|
|
16840
|
-
if (
|
|
16840
|
+
if (hb.has(o.operator)) {
|
|
16841
16841
|
const c = cF(o.operator, o.value);
|
|
16842
16842
|
l.operator = c.operator, l.values = [c.value];
|
|
16843
16843
|
} else if (i !== "is_null" && i !== "is_not_null") {
|
|
@@ -16967,11 +16967,11 @@ function mF(e, t) {
|
|
|
16967
16967
|
r.matrix.columns.length ? `puts ${Me(a.across)} across the top` : "puts nothing across the top"
|
|
16968
16968
|
), s.length ? Me(s) : "keeps its query";
|
|
16969
16969
|
}
|
|
16970
|
-
const
|
|
16970
|
+
const KR = [];
|
|
16971
16971
|
function pF(e) {
|
|
16972
16972
|
return e.label || e.name;
|
|
16973
16973
|
}
|
|
16974
|
-
function
|
|
16974
|
+
function zR(e, t, n) {
|
|
16975
16975
|
const r = e == null ? void 0 : e.drill;
|
|
16976
16976
|
return {
|
|
16977
16977
|
...e,
|
|
@@ -17727,7 +17727,7 @@ function eP({
|
|
|
17727
17727
|
sheetId: r,
|
|
17728
17728
|
inputId: o
|
|
17729
17729
|
}) {
|
|
17730
|
-
const i =
|
|
17730
|
+
const i = Km(
|
|
17731
17731
|
t,
|
|
17732
17732
|
{ name: e.id || e.label },
|
|
17733
17733
|
{ alsoTaken: n }
|
|
@@ -17751,7 +17751,7 @@ function tP({
|
|
|
17751
17751
|
label: n,
|
|
17752
17752
|
variableName: r
|
|
17753
17753
|
}) {
|
|
17754
|
-
const o = (n == null ? void 0 : n.trim()) || e.label, i = r === void 0 ? e.variableName :
|
|
17754
|
+
const o = (n == null ? void 0 : n.trim()) || e.label, i = r === void 0 ? e.variableName : Km(
|
|
17755
17755
|
t,
|
|
17756
17756
|
{ name: r },
|
|
17757
17757
|
{ exclude: { source: "input", inputId: e.id } }
|
|
@@ -18063,7 +18063,7 @@ function dP(e, t, n, r, o, i) {
|
|
|
18063
18063
|
}
|
|
18064
18064
|
const k = f !== void 0;
|
|
18065
18065
|
if (!d.includes(C.ref.kind) || k && ee(C.ref) !== ee(f)) {
|
|
18066
|
-
const $ = k ? n.filter((
|
|
18066
|
+
const $ = k ? n.filter((z) => ee(z.ref) === ee(f)).map((z) => z.name) : [];
|
|
18067
18067
|
i.push(
|
|
18068
18068
|
J("setting_not_for_card", {
|
|
18069
18069
|
message: k ? `A highlight on ${Pe(e.title)} colors its value, ${$[0] ?? "its measure"}.` : `${y.column} on ${Pe(e.title)} takes no highlight.`,
|
|
@@ -18095,10 +18095,10 @@ function dP(e, t, n, r, o, i) {
|
|
|
18095
18095
|
continue;
|
|
18096
18096
|
}
|
|
18097
18097
|
const x = ("scale" in y ? [["scale.low", y.scale.low], ["scale.high", y.scale.high], ["scale.mid", y.scale.mid]] : "bars" in y ? [["bars.color", y.bars.color]] : [["color", y.color]]).filter(([, $]) => $ !== void 0 && !Lg($));
|
|
18098
|
-
for (const [$,
|
|
18098
|
+
for (const [$, z] of x)
|
|
18099
18099
|
i.push(
|
|
18100
18100
|
J("color_unknown", {
|
|
18101
|
-
message: `${JSON.stringify(
|
|
18101
|
+
message: `${JSON.stringify(z)} isn't a color a highlight takes.`,
|
|
18102
18102
|
path: `${b}.${$}`,
|
|
18103
18103
|
fix: "Send red, amber, green, blue or gray, or a hex color like #1d4ed8.",
|
|
18104
18104
|
allowed: qg
|
|
@@ -18142,12 +18142,12 @@ function Vg(e) {
|
|
|
18142
18142
|
}
|
|
18143
18143
|
return { colors: t, complete: n };
|
|
18144
18144
|
}
|
|
18145
|
-
function
|
|
18145
|
+
function KF(e, t) {
|
|
18146
18146
|
return e.map(
|
|
18147
18147
|
(n, r) => kp({ column: t, apply: "cell", when: n.when, color: n.color }, { ref: Ss, label: t }, `color-${r + 1}`, r)
|
|
18148
18148
|
);
|
|
18149
18149
|
}
|
|
18150
|
-
function
|
|
18150
|
+
function zF(e, t) {
|
|
18151
18151
|
return (e ?? []).flatMap(
|
|
18152
18152
|
(n, r) => Lg(n.color) ? [] : [
|
|
18153
18153
|
{
|
|
@@ -18166,7 +18166,7 @@ function YF(e, t, n) {
|
|
|
18166
18166
|
if (r === void 0) return i.colors.length === 0 && ((s = t == null ? void 0 : t.colorRules) != null && s.length) ? { ...o, colorRules: t.colorRules } : o;
|
|
18167
18167
|
if (!r.length) return o;
|
|
18168
18168
|
const a = i.colors.length > 0 && JSON.stringify(i.colors) === JSON.stringify(r);
|
|
18169
|
-
return { ...o, colorRules: a ? t.colorRules :
|
|
18169
|
+
return { ...o, colorRules: a ? t.colorRules : KF(r, n) };
|
|
18170
18170
|
}
|
|
18171
18171
|
function WF(e) {
|
|
18172
18172
|
const t = [[]];
|
|
@@ -18256,7 +18256,7 @@ function eE(e, t) {
|
|
|
18256
18256
|
return;
|
|
18257
18257
|
}
|
|
18258
18258
|
}
|
|
18259
|
-
function
|
|
18259
|
+
function Kg(e) {
|
|
18260
18260
|
var n, r;
|
|
18261
18261
|
const t = (n = e.preferences) == null ? void 0 : n.textVisualOptions;
|
|
18262
18262
|
return ln(t == null ? void 0 : t.richContent) ? { form: "rich", blocks: t.richContent.blocks, editorOnly: [] } : Array.isArray(t == null ? void 0 : t.content) && t.content.length ? { form: "legacy_runs", blocks: WF(t.content), editorOnly: [] } : (r = e.description) != null && r.trim() ? { form: "legacy_html", ...XF(e.description) } : { form: "empty", blocks: [], editorOnly: [] };
|
|
@@ -18288,7 +18288,7 @@ function Nd(e, t) {
|
|
|
18288
18288
|
if ((n == null ? void 0 : n.kind) === "report") return `${rn}.${e}`;
|
|
18289
18289
|
if ((n == null ? void 0 : n.kind) === "input") return `${e}.${n.defaultPart}`;
|
|
18290
18290
|
const r = (t.variables ?? []).find((a) => a.name === e);
|
|
18291
|
-
return r ? `${e}.${eu(r)[0] ?? co}` : ![...t.inputs ?? [], ...t.documentInputs ?? []].some((a) => a.variableName === e) &&
|
|
18291
|
+
return r ? `${e}.${eu(r)[0] ?? co}` : ![...t.inputs ?? [], ...t.documentInputs ?? []].some((a) => a.variableName === e) && Ka(e) ? `${rn}.${e}` : `${e}.label`;
|
|
18292
18292
|
}
|
|
18293
18293
|
function Jn(e, t) {
|
|
18294
18294
|
return e.map((n) => _e(n) ? {
|
|
@@ -18314,7 +18314,7 @@ function nE(e) {
|
|
|
18314
18314
|
function On(e, t, n, r) {
|
|
18315
18315
|
return e.flatMap((o) => {
|
|
18316
18316
|
var l, c, d;
|
|
18317
|
-
if (o.type === "link") return On(o.children, t, n,
|
|
18317
|
+
if (o.type === "link") return On(o.children, t, n, zg(o.url, t, n));
|
|
18318
18318
|
if (o.type === "when") {
|
|
18319
18319
|
const f = o.test ?? {}, m = t(f.ref);
|
|
18320
18320
|
m === "?" && n.add(ya);
|
|
@@ -18340,7 +18340,7 @@ function On(e, t, n, r) {
|
|
|
18340
18340
|
return [{ variable: a, ...i, ...s ? { presentation: s } : {} }];
|
|
18341
18341
|
});
|
|
18342
18342
|
}
|
|
18343
|
-
function
|
|
18343
|
+
function zg(e, t, n) {
|
|
18344
18344
|
return typeof e == "string" ? e : To(e).map((r) => {
|
|
18345
18345
|
if (r.type === "text") return r.value;
|
|
18346
18346
|
const o = t(r.ref);
|
|
@@ -18381,7 +18381,7 @@ function Hg(e) {
|
|
|
18381
18381
|
function Ht(e, t, n) {
|
|
18382
18382
|
for (const r of e)
|
|
18383
18383
|
if (r.type === "link") {
|
|
18384
|
-
const o = Hn(
|
|
18384
|
+
const o = Hn(zg(r.url, t));
|
|
18385
18385
|
n.held.add(Xn("link", o)), n.links.has(o) || n.links.set(o, r.url);
|
|
18386
18386
|
for (const i of To(r.url)) {
|
|
18387
18387
|
if (i.type !== "variable") continue;
|
|
@@ -18409,7 +18409,7 @@ function eo(e, t, n) {
|
|
|
18409
18409
|
function iE(e, t) {
|
|
18410
18410
|
const n = e.indexOf("."), r = n < 0 ? e : e.slice(0, n), o = n < 0 ? void 0 : e.slice(n + 1);
|
|
18411
18411
|
if (r === rn) {
|
|
18412
|
-
const s =
|
|
18412
|
+
const s = Ka(o) ? t.byKey.get(`report:${o}`) : void 0;
|
|
18413
18413
|
return s ? ii(s) : void 0;
|
|
18414
18414
|
}
|
|
18415
18415
|
const i = t.byName.get(r);
|
|
@@ -18433,7 +18433,7 @@ function aE(e, t, n) {
|
|
|
18433
18433
|
function Qg(e, t) {
|
|
18434
18434
|
const n = e.indexOf("."), r = n < 0 ? e : e.slice(0, n), o = n < 0 ? null : e.slice(n + 1);
|
|
18435
18435
|
if (r === rn) {
|
|
18436
|
-
const a =
|
|
18436
|
+
const a = Ka(o) ? t.byKey.get(`report:${o}`) : void 0;
|
|
18437
18437
|
return a ? { entry: a, part: null } : void 0;
|
|
18438
18438
|
}
|
|
18439
18439
|
const i = t.byName.get(r);
|
|
@@ -18474,7 +18474,7 @@ function Ia(e, t, n) {
|
|
|
18474
18474
|
if (c) r.push(c);
|
|
18475
18475
|
else if (l.presentation && !n.held.held.has(Xn("presentation", l.variable, l.presentation))) {
|
|
18476
18476
|
const d = uE(l.variable, l.presentation, `${a}.presentation`, n.catalog);
|
|
18477
|
-
d ? r.push(d) : r.push(...
|
|
18477
|
+
d ? r.push(d) : r.push(...zF(l.presentation.colors, `${a}.presentation`));
|
|
18478
18478
|
}
|
|
18479
18479
|
}
|
|
18480
18480
|
return r;
|
|
@@ -18639,7 +18639,7 @@ function fP(e, t, n) {
|
|
|
18639
18639
|
}
|
|
18640
18640
|
function pE(e, t) {
|
|
18641
18641
|
if (lT(e)) return { editable: !1, form: "dynamic", message: ZF };
|
|
18642
|
-
const n =
|
|
18642
|
+
const n = Kg(e), r = new Set(n.editorOnly), o = qo(n.blocks, fn(jo(t)), r);
|
|
18643
18643
|
return { editable: !0, form: n.form, text: o, editorOnly: [...r] };
|
|
18644
18644
|
}
|
|
18645
18645
|
const gE = "A block is a heading (level 1 or 2), a paragraph or a one-level list. A run is a string, { text } or a { variable } the place offers (an input, a data variable or a report value, as name or name.part) with bold, italic, underline, link or presentation, or a wording block { when, then, else? }. Text is taken as written.", hE = (e, t) => JSON.stringify(e) === JSON.stringify(t);
|
|
@@ -18648,20 +18648,20 @@ function mP(e) {
|
|
|
18648
18648
|
if (i && !i.editable)
|
|
18649
18649
|
return { ok: !1, problems: [{ code: "card_not_editable", message: i.message, path: n, fix: "Tell the user to change it in the editor.", details: { reason: "text" } }] };
|
|
18650
18650
|
const a = (w, x, $ = gE) => ({ code: "text_invalid", message: w, path: x, fix: $ }), s = e.text.flatMap(
|
|
18651
|
-
(w, x) => w.type === "list" ? w.items.flatMap(($,
|
|
18651
|
+
(w, x) => w.type === "list" ? w.items.flatMap(($, z) => va($, `${n}[${x}].items[${z}]`)) : va(w.content, `${n}[${x}].content`)
|
|
18652
18652
|
);
|
|
18653
18653
|
if (s.length) return { ok: !1, problems: s };
|
|
18654
18654
|
if (BF(e.text) > $d)
|
|
18655
18655
|
return { ok: !1, problems: [a(`A text card holds at most ${$d.toLocaleString("en-US")} characters of text.`, n, "Shorten the words.")] };
|
|
18656
18656
|
const l = tE(e.text, o), c = Og(l), d = (i == null ? void 0 : i.editable) && (i.form === "legacy_runs" || i.form === "legacy_html");
|
|
18657
18657
|
if (i && hE(c, i.text) && !(e.storeAsRichText && d)) return { ok: !0, unchanged: !0 };
|
|
18658
|
-
const f = t ?
|
|
18658
|
+
const f = t ? Kg(t) : { form: "empty", blocks: [] }, m = fn(o), p = qo(f.blocks, m, /* @__PURE__ */ new Set()), g = Gg();
|
|
18659
18659
|
for (const w of f.blocks)
|
|
18660
18660
|
w.type === "list" ? w.items.forEach((x) => Ht(x, m, g)) : Ht(w.children, m, g);
|
|
18661
18661
|
const h = bE(p.map((w) => JSON.stringify(w)), c.map((w) => JSON.stringify(w))), y = { catalog: r, held: g, rules: { links: !0, lineBreaks: !1 } }, b = l.flatMap((w, x) => {
|
|
18662
18662
|
if (h.has(x)) return [];
|
|
18663
18663
|
const $ = `${n}[${x}]`;
|
|
18664
|
-
return w.type === "list" ? w.items.flatMap((
|
|
18664
|
+
return w.type === "list" ? w.items.flatMap((z, v) => Ia(z, `${$}.items[${v}]`, y)) : Ia(w.content, `${$}.content`, y);
|
|
18665
18665
|
});
|
|
18666
18666
|
if (b.length) return { ok: !1, problems: b };
|
|
18667
18667
|
const I = /* @__PURE__ */ new Map(), _ = (w) => to(w, g, I, r), D = (w) => {
|
|
@@ -19273,7 +19273,7 @@ function Ad(e) {
|
|
|
19273
19273
|
function UE(e) {
|
|
19274
19274
|
return e === "date" || e === "datetime" ? "date" : e;
|
|
19275
19275
|
}
|
|
19276
|
-
function
|
|
19276
|
+
function KE(e, t = e.field.source) {
|
|
19277
19277
|
const n = e.field, r = fs(t), o = `${r.qualifiedEntityName}.${n.name}`;
|
|
19278
19278
|
return {
|
|
19279
19279
|
id: o,
|
|
@@ -19312,7 +19312,7 @@ function Md(e, t, n, r, o) {
|
|
|
19312
19312
|
semanticContext: a.semanticContext
|
|
19313
19313
|
};
|
|
19314
19314
|
}
|
|
19315
|
-
function
|
|
19315
|
+
function zE(e, t, n) {
|
|
19316
19316
|
var i;
|
|
19317
19317
|
const r = ((i = e.optionSource) == null ? void 0 : i.valueField.dataType) || e.filter.dataType || (t == null ? void 0 : t.dataType) || (t == null ? void 0 : t.valueType);
|
|
19318
19318
|
if (!r && !t) return !0;
|
|
@@ -19427,7 +19427,7 @@ function dh(e, t, n = sn(t), r) {
|
|
|
19427
19427
|
}
|
|
19428
19428
|
if (i.target.kind !== "field") return { status: "unsupportedTarget", bindingId: i.bindingId };
|
|
19429
19429
|
const p = lh({ sourceIndex: n, target: i.target });
|
|
19430
|
-
return p.status === "stale" ? { status: "stale", bindingId: i.bindingId } :
|
|
19430
|
+
return p.status === "stale" ? { status: "stale", bindingId: i.bindingId } : zE(e, r, i.target) ? { status: "bound", bindingId: i.bindingId, target: i.target, validation: p } : { status: "incompatible", bindingId: i.bindingId };
|
|
19431
19431
|
}
|
|
19432
19432
|
if (e.filter.kind === "global-date") return { status: "notApplicable" };
|
|
19433
19433
|
if (n.kind === "sql")
|
|
@@ -19722,7 +19722,7 @@ const ZE = {
|
|
|
19722
19722
|
grouped: "A comparison runs over the card's date grouping. Group by a date (a date dimension, or dateField with timeGrain); a dateField with only a timeWindow sets the window and isn't compared over. Or use a dataset with a primary date."
|
|
19723
19723
|
};
|
|
19724
19724
|
function wP(e) {
|
|
19725
|
-
var I, _, D, C, k, w, x, $,
|
|
19725
|
+
var I, _, D, C, k, w, x, $, z, v, S, N, O, P, K;
|
|
19726
19726
|
const { card: t, context: n } = e, r = Pe(t.title), o = [], i = [], { defaultOrder: a } = mr(t), s = nl(t), l = (((I = t.config) == null ? void 0 : I.groupByColumns) ?? []).map((E) => {
|
|
19727
19727
|
const G = (s == null ? void 0 : s.kind) === "semantic" ? ke(E, s) : E.name;
|
|
19728
19728
|
return typeof G == "string" ? G : JSON.stringify({ name: G.name, datasetName: G.datasetName });
|
|
@@ -19778,7 +19778,7 @@ function wP(e) {
|
|
|
19778
19778
|
fix: "Choose one; the other can go on a second measure of the same field."
|
|
19779
19779
|
})
|
|
19780
19780
|
);
|
|
19781
|
-
const at =
|
|
19781
|
+
const at = zD(t, E.measure, n.dates);
|
|
19782
19782
|
if (B) {
|
|
19783
19783
|
const j = at.comparison[B.kind];
|
|
19784
19784
|
j.offered || o.push(
|
|
@@ -19825,7 +19825,7 @@ function wP(e) {
|
|
|
19825
19825
|
}
|
|
19826
19826
|
if (o.length > G) continue;
|
|
19827
19827
|
const ue = { measure: E.measure };
|
|
19828
|
-
B && (ue.comparison = jD(B) ?? null), te !== void 0 && (ue.transform = te), te && B === void 0 && Fr(Ro(M.comparison)) && (ue.comparison = null, ue.replaces = "comparison"), Fr(B) && te === void 0 && ((
|
|
19828
|
+
B && (ue.comparison = jD(B) ?? null), te !== void 0 && (ue.transform = te), te && B === void 0 && Fr(Ro(M.comparison)) && (ue.comparison = null, ue.replaces = "comparison"), Fr(B) && te === void 0 && ((z = M.parameters) != null && z.windowTransform) && (ue.transform = null, ue.replaces = "transform");
|
|
19829
19829
|
const _t = (v = M.parameters) == null ? void 0 : v.windowTransform, F = (_t == null ? void 0 : _t.function) === "percent_of_total" ? ((S = _t.percentOfTotal) == null ? void 0 : S.output) === "fraction" ? "fraction" : "percent" : void 0;
|
|
19830
19830
|
if (ue.transform !== void 0) {
|
|
19831
19831
|
const j = ((N = ue.transform) == null ? void 0 : N.function) === "percent_of_total" ? ((O = ue.transform.percentOfTotal) == null ? void 0 : O.output) === "fraction" ? "fraction" : "percent" : void 0, V = Ma({ card: t, column: { kind: "field", fieldId: M.id } }), ie = V.source === "override" ? V.format : void 0;
|
|
@@ -19841,10 +19841,10 @@ function wP(e) {
|
|
|
19841
19841
|
})
|
|
19842
19842
|
), h = (E) => n.check !== "stated" || (E.metricId ? g.has(E.metricId) : g.size > 0);
|
|
19843
19843
|
for (const E of m.errors.filter(h)) {
|
|
19844
|
-
const G = p.find((M) => M.id === E.metricId), T = G ? (
|
|
19844
|
+
const G = p.find((M) => M.id === E.metricId), T = G ? (K = e.stated.find((M) => {
|
|
19845
19845
|
var R;
|
|
19846
19846
|
return ((R = Gt(f, M.measure)) == null ? void 0 : R.metric.id) === G.id;
|
|
19847
|
-
})) == null ? void 0 :
|
|
19847
|
+
})) == null ? void 0 : K.path : void 0;
|
|
19848
19848
|
o.push(
|
|
19849
19849
|
J(ZE[E.code] ?? "document_invalid", {
|
|
19850
19850
|
message: `${G ? `${G.label || G.name} on ` : ""}${r}: ${E.message}`,
|
|
@@ -20214,7 +20214,7 @@ function d$(e) {
|
|
|
20214
20214
|
function hh(e, t) {
|
|
20215
20215
|
const n = ph(t), { tz: r } = n, o = gh(e.dataType);
|
|
20216
20216
|
if (o === "date" && e.defaultDateFilter) {
|
|
20217
|
-
const a =
|
|
20217
|
+
const a = Ki(
|
|
20218
20218
|
e.defaultDateFilter,
|
|
20219
20219
|
n
|
|
20220
20220
|
);
|
|
@@ -20225,7 +20225,7 @@ function hh(e, t) {
|
|
|
20225
20225
|
c && (l = OI(s, r));
|
|
20226
20226
|
const d = e.dateSelectionMode === "months" && !MI(e.defaultDateFilter);
|
|
20227
20227
|
if (d) {
|
|
20228
|
-
const { year: m, month: p } =
|
|
20228
|
+
const { year: m, month: p } = Ya(s, r), g = Ki(
|
|
20229
20229
|
{ mode: "fixed", unit: "month", year: m, month: p - 1 },
|
|
20230
20230
|
n
|
|
20231
20231
|
);
|
|
@@ -20276,7 +20276,7 @@ function OP(e, t) {
|
|
|
20276
20276
|
function RP(e, t) {
|
|
20277
20277
|
const n = it(e);
|
|
20278
20278
|
if (!(!n || rr(n).dataAnchored))
|
|
20279
|
-
return
|
|
20279
|
+
return Ki(n, ph(t));
|
|
20280
20280
|
}
|
|
20281
20281
|
function u$(e, t) {
|
|
20282
20282
|
if (e.id !== t.filterId)
|
|
@@ -20484,8 +20484,13 @@ function I$(e, t, n) {
|
|
|
20484
20484
|
return {
|
|
20485
20485
|
id: n,
|
|
20486
20486
|
field: {
|
|
20487
|
-
...
|
|
20488
|
-
...r ? { nativeDataType: r } : {}
|
|
20487
|
+
...KE(t),
|
|
20488
|
+
...r ? { nativeDataType: r } : {},
|
|
20489
|
+
// A clicked date bucket ("this day") reads on the target column at the
|
|
20490
|
+
// bucket's own grain: the filter compiler requires the field's grain to
|
|
20491
|
+
// match the bucket's, and a card that doesn't group by this date (a
|
|
20492
|
+
// KPI) has none of its own.
|
|
20493
|
+
...e.temporalBucket ? { granularity: e.temporalBucket.granularity } : {}
|
|
20489
20494
|
},
|
|
20490
20495
|
operator: e.operator,
|
|
20491
20496
|
value: e.value,
|
|
@@ -21000,11 +21005,11 @@ export {
|
|
|
21000
21005
|
aN as X,
|
|
21001
21006
|
mN as Y,
|
|
21002
21007
|
AP as Z,
|
|
21003
|
-
|
|
21008
|
+
zO as _,
|
|
21004
21009
|
de as a,
|
|
21005
21010
|
IT as a$,
|
|
21006
21011
|
gf as a0,
|
|
21007
|
-
|
|
21012
|
+
KO as a1,
|
|
21008
21013
|
Iv as a2,
|
|
21009
21014
|
sv as a3,
|
|
21010
21015
|
vt as a4,
|
|
@@ -21016,7 +21021,7 @@ export {
|
|
|
21016
21021
|
IR as aA,
|
|
21017
21022
|
Qr as aB,
|
|
21018
21023
|
Wn as aC,
|
|
21019
|
-
|
|
21024
|
+
zs as aD,
|
|
21020
21025
|
OR as aE,
|
|
21021
21026
|
PR as aF,
|
|
21022
21027
|
Ug as aG,
|
|
@@ -21040,7 +21045,7 @@ export {
|
|
|
21040
21045
|
_R as aY,
|
|
21041
21046
|
wR as aZ,
|
|
21042
21047
|
_T as a_,
|
|
21043
|
-
|
|
21048
|
+
Ks as aa,
|
|
21044
21049
|
J as ab,
|
|
21045
21050
|
Pe as ac,
|
|
21046
21051
|
bt as ad,
|
|
@@ -21052,7 +21057,7 @@ export {
|
|
|
21052
21057
|
Ao as aj,
|
|
21053
21058
|
Vw as ak,
|
|
21054
21059
|
Ds as al,
|
|
21055
|
-
|
|
21060
|
+
KT as am,
|
|
21056
21061
|
nD as an,
|
|
21057
21062
|
ur as ao,
|
|
21058
21063
|
un as ap,
|
|
@@ -21087,12 +21092,12 @@ export {
|
|
|
21087
21092
|
fT as bG,
|
|
21088
21093
|
yt as bH,
|
|
21089
21094
|
Df as bI,
|
|
21090
|
-
|
|
21095
|
+
Kt as bJ,
|
|
21091
21096
|
sw as bK,
|
|
21092
21097
|
cA as bL,
|
|
21093
21098
|
UI as bM,
|
|
21094
21099
|
pf as bN,
|
|
21095
|
-
|
|
21100
|
+
zI as bO,
|
|
21096
21101
|
nw as bP,
|
|
21097
21102
|
Ae as bQ,
|
|
21098
21103
|
uw as bR,
|
|
@@ -21134,7 +21139,7 @@ export {
|
|
|
21134
21139
|
Xa as c,
|
|
21135
21140
|
PO as c$,
|
|
21136
21141
|
YN as c0,
|
|
21137
|
-
|
|
21142
|
+
zu as c1,
|
|
21138
21143
|
N0 as c2,
|
|
21139
21144
|
Ff as c3,
|
|
21140
21145
|
bo as c4,
|
|
@@ -21152,7 +21157,7 @@ export {
|
|
|
21152
21157
|
SN as cG,
|
|
21153
21158
|
kN as cH,
|
|
21154
21159
|
TN as cI,
|
|
21155
|
-
|
|
21160
|
+
ze as cJ,
|
|
21156
21161
|
ds as cK,
|
|
21157
21162
|
WI as cL,
|
|
21158
21163
|
EO as cM,
|
|
@@ -21162,7 +21167,7 @@ export {
|
|
|
21162
21167
|
NO as cQ,
|
|
21163
21168
|
AO as cR,
|
|
21164
21169
|
US as cS,
|
|
21165
|
-
|
|
21170
|
+
KS as cT,
|
|
21166
21171
|
Bs as cU,
|
|
21167
21172
|
MO as cV,
|
|
21168
21173
|
Bc as cW,
|
|
@@ -21215,7 +21220,7 @@ export {
|
|
|
21215
21220
|
hx as dE,
|
|
21216
21221
|
Bo as dF,
|
|
21217
21222
|
Up as dG,
|
|
21218
|
-
|
|
21223
|
+
zp as dH,
|
|
21219
21224
|
Wp as dI,
|
|
21220
21225
|
bx as dJ,
|
|
21221
21226
|
_d as dK,
|
|
@@ -21277,9 +21282,9 @@ export {
|
|
|
21277
21282
|
XA as eC,
|
|
21278
21283
|
ZA as eD,
|
|
21279
21284
|
Dn as eE,
|
|
21280
|
-
|
|
21285
|
+
Kn as eF,
|
|
21281
21286
|
eM as eG,
|
|
21282
|
-
|
|
21287
|
+
Kw as eH,
|
|
21283
21288
|
tM as eI,
|
|
21284
21289
|
no as eJ,
|
|
21285
21290
|
t$ as eK,
|
|
@@ -21329,7 +21334,7 @@ export {
|
|
|
21329
21334
|
OI as f$,
|
|
21330
21335
|
hd as f0,
|
|
21331
21336
|
rF as f1,
|
|
21332
|
-
|
|
21337
|
+
zD as f2,
|
|
21333
21338
|
mr as f3,
|
|
21334
21339
|
fd as f4,
|
|
21335
21340
|
$p as f5,
|
|
@@ -21361,7 +21366,7 @@ export {
|
|
|
21361
21366
|
Ns as fV,
|
|
21362
21367
|
jM as fW,
|
|
21363
21368
|
Nu as fX,
|
|
21364
|
-
|
|
21369
|
+
zM as fY,
|
|
21365
21370
|
lA as fZ,
|
|
21366
21371
|
RN as f_,
|
|
21367
21372
|
ap as fa,
|
|
@@ -21400,7 +21405,7 @@ export {
|
|
|
21400
21405
|
xN as g5,
|
|
21401
21406
|
x0 as g6,
|
|
21402
21407
|
SM as g7,
|
|
21403
|
-
|
|
21408
|
+
Km as g8,
|
|
21404
21409
|
eP as g9,
|
|
21405
21410
|
We as gA,
|
|
21406
21411
|
ol as gB,
|
|
@@ -21479,19 +21484,19 @@ export {
|
|
|
21479
21484
|
op as hJ,
|
|
21480
21485
|
bO as hK,
|
|
21481
21486
|
iO as hL,
|
|
21482
|
-
|
|
21487
|
+
KR as hM,
|
|
21483
21488
|
IP as hN,
|
|
21484
21489
|
BA as hO,
|
|
21485
21490
|
IO as hP,
|
|
21486
21491
|
en as hQ,
|
|
21487
21492
|
RP as hR,
|
|
21488
21493
|
T$ as hS,
|
|
21489
|
-
|
|
21494
|
+
KN as hT,
|
|
21490
21495
|
c0 as hU,
|
|
21491
21496
|
OA as hV,
|
|
21492
21497
|
Q0 as hW,
|
|
21493
21498
|
vA as hX,
|
|
21494
|
-
|
|
21499
|
+
zN as hY,
|
|
21495
21500
|
Cf as hZ,
|
|
21496
21501
|
bA as h_,
|
|
21497
21502
|
MP as ha,
|
|
@@ -21502,7 +21507,7 @@ export {
|
|
|
21502
21507
|
_A as hf,
|
|
21503
21508
|
wc as hg,
|
|
21504
21509
|
p0 as hh,
|
|
21505
|
-
|
|
21510
|
+
zA as hi,
|
|
21506
21511
|
hk as hj,
|
|
21507
21512
|
jb as hk,
|
|
21508
21513
|
WO as hl,
|
|
@@ -21534,7 +21539,7 @@ export {
|
|
|
21534
21539
|
LM as i9,
|
|
21535
21540
|
U_ as iA,
|
|
21536
21541
|
XN as iB,
|
|
21537
|
-
|
|
21542
|
+
z_ as iC,
|
|
21538
21543
|
II as iD,
|
|
21539
21544
|
ni as iE,
|
|
21540
21545
|
LA as iF,
|
|
@@ -21600,14 +21605,14 @@ export {
|
|
|
21600
21605
|
ZN as jC,
|
|
21601
21606
|
rR as jD,
|
|
21602
21607
|
sR as jE,
|
|
21603
|
-
|
|
21608
|
+
K_ as jF,
|
|
21604
21609
|
ti as jG,
|
|
21605
21610
|
Lk as jH,
|
|
21606
21611
|
Vk as jI,
|
|
21607
21612
|
Bw as jJ,
|
|
21608
21613
|
dp as jK,
|
|
21609
21614
|
oM as jL,
|
|
21610
|
-
|
|
21615
|
+
Kf as jM,
|
|
21611
21616
|
Xw as jN,
|
|
21612
21617
|
iM as jO,
|
|
21613
21618
|
aM as jP,
|
|
@@ -21615,7 +21620,7 @@ export {
|
|
|
21615
21620
|
fc as jR,
|
|
21616
21621
|
sM as jS,
|
|
21617
21622
|
lw as jT,
|
|
21618
|
-
|
|
21623
|
+
KA as jU,
|
|
21619
21624
|
GO as jV,
|
|
21620
21625
|
yN as jW,
|
|
21621
21626
|
jA as jX,
|
|
@@ -21626,9 +21631,9 @@ export {
|
|
|
21626
21631
|
rO as jb,
|
|
21627
21632
|
aO as jc,
|
|
21628
21633
|
YR as jd,
|
|
21629
|
-
|
|
21634
|
+
zR as je,
|
|
21630
21635
|
kO as jf,
|
|
21631
|
-
|
|
21636
|
+
zm as jg,
|
|
21632
21637
|
TO as jh,
|
|
21633
21638
|
hA as ji,
|
|
21634
21639
|
vN as jj,
|
|
@@ -21646,7 +21651,7 @@ export {
|
|
|
21646
21651
|
fR as jv,
|
|
21647
21652
|
Fu as jw,
|
|
21648
21653
|
yo as jx,
|
|
21649
|
-
|
|
21654
|
+
Kb as jy,
|
|
21650
21655
|
DN as jz,
|
|
21651
21656
|
hr as k,
|
|
21652
21657
|
vS as k$,
|
|
@@ -21685,7 +21690,7 @@ export {
|
|
|
21685
21690
|
UM as kW,
|
|
21686
21691
|
VM as kX,
|
|
21687
21692
|
NC as kY,
|
|
21688
|
-
|
|
21693
|
+
KM as kZ,
|
|
21689
21694
|
AC as k_,
|
|
21690
21695
|
d0 as ka,
|
|
21691
21696
|
DA as kb,
|
|
@@ -21712,7 +21717,7 @@ export {
|
|
|
21712
21717
|
MN as kw,
|
|
21713
21718
|
ZC as kx,
|
|
21714
21719
|
NI as ky,
|
|
21715
|
-
|
|
21720
|
+
Ki as kz,
|
|
21716
21721
|
DS as l,
|
|
21717
21722
|
Yc as l0,
|
|
21718
21723
|
yF as l1,
|